Files
StudyDiary-20251025/.obsidian/plugins/obsidian-memos/main.js
2025-08-12 16:40:13 +08:00

319 lines
2.0 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("obsidian"),a1=require("@codemirror/language"),_p=require("@codemirror/state"),_i=require("@codemirror/view");function XV(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N9={exports:{}},_h={},O9={exports:{}},At={},EN;function QV(){if(EN)return At;EN=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.iterator;function p(G){return G===null||typeof G!="object"?null:(G=h&&G[h]||G["@@iterator"],typeof G=="function"?G:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function y(G,X,ee){this.props=G,this.context=X,this.refs=b,this.updater=ee||m}y.prototype.isReactComponent={},y.prototype.setState=function(G,X){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,X,"setState")},y.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function S(){}S.prototype=y.prototype;function x(G,X,ee){this.props=G,this.context=X,this.refs=b,this.updater=ee||m}var E=x.prototype=new S;E.constructor=x,w(E,y.prototype),E.isPureReactComponent=!0;var C=Array.isArray,M=Object.prototype.hasOwnProperty,k={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function F(G,X,ee){var ie,fe={},he=null,we=null;if(X!=null)for(ie in X.ref!==void 0&&(we=X.ref),X.key!==void 0&&(he=""+X.key),X)M.call(X,ie)&&!O.hasOwnProperty(ie)&&(fe[ie]=X[ie]);var Ne=arguments.length-2;if(Ne===1)fe.children=ee;else if(1<Ne){for(var Ae=Array(Ne),Te=0;Te<Ne;Te++)Ae[Te]=arguments[Te+2];fe.children=Ae}if(G&&G.defaultProps)for(ie in Ne=G.defaultProps,Ne)fe[ie]===void 0&&(fe[ie]=Ne[ie]);return{$$typeof:e,type:G,key:he,ref:we,props:fe,_owner:k.current}}function R(G,X){return{$$typeof:e,type:G.type,key:X,ref:G.ref,props:G.props,_owner:G._owner}}function B(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function Y(G){var X={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(ee){return X[ee]})}var H=/\/+/g;function Z(G,X){return typeof G=="object"&&G!==null&&G.key!=null?Y(""+G.key):X.toString(36)}function W(G,X,ee,ie,fe){var he=typeof G;(he==="undefined"||he==="boolean")&&(G=null);var we=!1;if(G===null)we=!0;else switch(he){case"string":case"number":we=!0;break;case"object":switch(G.$$typeof){case e:case t:we=!0}}if(we)return we=G,fe=fe(we),G=ie===""?"."+Z(we,0):ie,C(fe)?(ee="",G!=null&&(ee=G.replace(H,"$&/")+"/"),W(fe,X,ee,"",function(Te){return Te})):fe!=null&&(B(fe)&&(fe=R(fe,ee+(!fe.key||we&&we.key===fe.key?"":(""+fe.key).replace(H,"$&/")+"/")+G)),X.push(fe)),1;if(we=0,ie=ie===""?".":ie+":",C(G))for(var Ne=0;Ne<G.length;Ne++){he=G[Ne];var Ae=ie+Z(he,Ne);we+=W(he,X,ee,Ae,fe)}else if(Ae=p(G),typeof Ae=="function")for(G=Ae.call(G),Ne=0;!(he=G.next()).done;)he=he.value,Ae=ie+Z(he,Ne++),we+=W(he,X,ee,Ae,fe);else if(he==="object")throw X=String(G),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return we}function $(G,X,ee){if(G==null)return G;var ie=[],fe=0;return W(G,ie,"","",function(he){return X.call(ee,he,fe++)}),ie}function V(G){if(G._status===-1){var X=G._result;X=X(),X.then(function(ee){(G._status===0||G._status===-1)&&(G._status=1,G._result=ee)},function(ee){(G._status===0||G._status===-1)&&(G._status=2,G._result=ee)}),G._status===-1&&(G._status=0,G._result=X)}if(G._status===1)return G._result.default;throw G._result}var ne={current:null},Q={transition:null},te={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:Q,ReactCurrentOwner:k};return At.Children={map:$,forEach:function(G,X,ee){$(G,function(){X.apply(this,arguments)},ee)},count:function(G){var X=0;return $(G,function(){X++}),X},toArray:function(G){return $(G,function(X){return X})||[]},only:function(G){if(!B(G))throw Error("React.Children.only expected to receive a single React element child.");return G}},At.Component=y,At.Fragment=n,At.Profiler=o,At.PureComponent=x,At.StrictMode=r,At.Suspense=l,At.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,At.cloneElement=function(G,X,ee){if(G==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+G+".");var ie=w({},G.props),fe=G.key,he=G.ref,we=G._owner;if(X!=null){if(X.ref!==void 0&&(he=X.ref,we=k.current),X.key!==void 0&&(fe=""+X.key),G.type&&G.type.defaultProps)var Ne=G.type.defaultProps;for(Ae in X)M.call(X,Ae)&&!O.hasOwnProperty(Ae)&&(ie[Ae]=X[Ae]===void 0&&Ne!==void 0?Ne[Ae]:X[Ae])}var Ae=arguments.length-2;if(Ae===1)ie.children=ee;else if(1<Ae){Ne=Array(Ae);for(var Te=0;Te<Ae;Te++)Ne[Te]=arguments[Te+2];ie.children=Ne}return{$$typeof:e,type:G.type,key:fe,ref:he,props:ie,_owner:we}},At.createContext=function(G){return G={$$typeof:i,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},G.Provider={$$typeof:a,_context:G},G.Consumer=G},At.createElement=F,At.createFactory=function(G){var X=F.bind(null,G);return X.type=G,X},At.createRef=function(){return{current:null}},At.forwardRef=function(G){return{$$typeof:s,render:G}},At.isValidElement=B,At.lazy=function(G){return{$$typeof:f,_payload:{_status:-1,_result:G},_init:V}},At.memo=function(G,X){return{$$typeof:u,type:G,compare:X===void 0?null:X}},At.startTransition=function(G){var X=Q.transition;Q.transition={};try{G()}finally{Q.transition=X}},At.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},At.useCallback=function(G,X){return ne.current.useCallback(G,X)},At.useContext=function(G){return ne.current.useContext(G)},At.useDebugValue=function(){},At.useDeferredValue=function(G){return ne.current.useDeferredValue(G)},At.useEffect=function(G,X){return ne.current.useEffect(G,X)},At.useId=function(){return ne.current.useId()},At.useImperativeHandle=function(G,X,ee){return ne.current.useImperativeHandle(G,X,ee)},At.useInsertionEffect=function(G,X){return ne.current.useInsertionEffect(G,X)},At.useLayoutEffect=function(G,X){return ne.current.useLayoutEffect(G,X)},At.useMemo=function(G,X){return ne.current.useMemo(G,X)},At.useReducer=function(G,X,ee){return ne.current.useReducer(G,X,ee)},At.useRef=function(G){return ne.current.useRef(G)},At.useState=function(G){return ne.current.useState(G)},At.useSyncExternalStore=function(G,X,ee){return ne.current.useSyncExternalStore(G,X,ee)},At.useTransition=function(){return ne.current.useTransition()},At.version="18.2.0",At}O9.exports=QV();var D=O9.exports;const _=Xe(D),eW=XV({__proto__:null,default:_},[D]);var CN;function tW(){if(CN)return _h;CN=1;var e=D,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,u){var f,h={},p=null,m=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(m=l.ref);for(f in l)r.call(l,f)&&!a.hasOwnProperty(f)&&(h[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)h[f]===void 0&&(h[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:m,props:h,_owner:o.current}}return _h.Fragment=n,_h.jsx=i,_h.jsxs=i,_h}N9.exports=tW();var g=N9.exports;const Ea=e=>{const{children:t,store:n,context:r}=e,[o,a]=D.useState(n.getState());return D.useEffect(()=>{const i=n.subscribe(s=>{a(s)});return()=>{i()}},[]),g.jsx(r.Provider,{value:o,children:t})};function nW(e){const t=Object.keys(e),n={};for(const r of t)typeof e[r]=="function"&&(n[r]=e[r]);return(r={},o)=>{let a=!1;const i={};for(const s of t){const l=r[s],u=n[s](l,o);i[s]=u,a=a||u!==l}return a?i:r}}function rW(e,t){const n=[];let r=e;return{dispatch:s=>{const l=t(r,s),u=r;r=l;for(const f of n)f(r,u)},getState:()=>r,subscribe:s=>{let l=!0;return n.push(s),()=>{if(!l)return;const u=n.indexOf(s);n.splice(u,1),l=!1}}}}function oW(e,t){switch(t.type){case"SET_MARK_MEMO_ID":return t.payload.markMemoId===e.markMemoId?e:{...e,markMemoId:t.payload.markMemoId};case"SET_EDIT_MEMO_ID":return t.payload.editMemoId===e.editMemoId?e:{...e,editMemoId:t.payload.editMemoId};case"SET_GLOBAL_EDITOR_SHOWN":return t.payload.globalEditorShown===e.globalEditorShown?e:{...e,globalEditorShown:t.payload.globalEditorShown};case"SET_COMMENT_MEMO_ID":return t.payload.commentMemoId===e.commentMemoId?e:{...e,commentMemoId:t.payload.commentMemoId};case"SET_MOBILE_VIEW":return t.payload.isMobileView===e.isMobileView?e:{...e,isMobileView:t.payload.isMobileView};case"SET_CHANGED_BY_MEMOS":return t.payload.changedByMemos===e.changedByMemos?e:{...e,changedByMemos:t.payload.changedByMemos};case"SET_REFRESH":return t.payload.refresh===e.refresh?e:{...e,refresh:t.payload.refresh};case"SET_INSTANCE":return{...e,instanceList:e.instanceList.set(t.payload.id,t.payload.instance)};case"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW":return t.payload.showSiderbarInMobileView===e.showSiderbarInMobileView?e:{...e,showSiderbarInMobileView:t.payload.showSiderbarInMobileView};case"SET_MEMO_LIST_VIEW":return t.payload.memoListView===e.memoListView?e:{...e,memoListView:t.payload.memoListView};case"SET_MEMO_PLUGIN_MANIFEST":return{...e,manifest:t.payload.manifest};case"SET_LOADED":return{...e,loaded:t.payload.loaded};case"SET_EXIT_STEPS":return{...e,exited:t.payload.exited};case"SET_LOCKED":return{...e,locked:t.payload.locked};case"SET_APP_SETTING":return{...e,...t.payload};default:return e}}const aW={markMemoId:"",editMemoId:"",commentMemoId:"",shouldSplitMemoWord:!0,shouldHideImageUrl:!0,shouldUseMarkdownParser:!0,useTinyUndoHistoryCache:!1,isMobileView:!1,showSiderbarInMobileView:!1,changedByMemos:!1,memoListView:null,manifest:null,refresh:!1,loaded:!1,globalEditorShown:!1,instanceList:new Map,locked:!1,exited:!1};function iW(e,t){switch(t.type){case"RELOAD":return P9;case"SET_LOCATION":return t.payload;case"SET_PATHNAME":return t.payload.pathname===e.pathname?e:{...e,pathname:t.payload.pathname};case"SET_HASH":return t.payload.hash===e.hash?e:{...e,hash:t.payload.hash};case"SET_QUERY":return{...e,query:{...t.payload}};case"SET_TAG_QUERY":return t.payload.tag===e.query.tag?e:{...e,query:{...e.query,tag:t.payload.tag}};case"SET_DURATION_QUERY":return t.payload.duration===e.query.duration?e:{...e,query:{...e.query,duration:{...e.query.duration,...t.payload.duration}}};case"SET_PATH_QUERY":return t.payload.path===e.query.path?e:{...e,query:{...e.query,path:t.payload.path}};case"SET_TYPE":return t.payload.type===e.query.type?e:{...e,query:{...e.query,type:t.payload.type}};case"SET_TEXT":return t.payload.text===e.query.text?e:{...e,query:{...e.query,text:t.payload.text}};case"SET_QUERY_FILTER":return t.payload===e.query.filter?e:{...e,query:{...e.query,filter:t.payload}};default:return e}}const P9={pathname:"/",hash:"",query:{tag:"",duration:null,type:"",path:"",metadata:{},text:"",filter:""}};var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0});var Nn=A;const yI="YYYY-MM-DD",bI="gggg-[W]ww",j9="YYYY-MM",L9="YYYY-[Q]Q",R9="YYYY";function $m(e){const t=window.app.plugins.getPlugin("periodic-notes");return t&&t.settings?.[e]?.enabled}function Km(){try{const{internalPlugins:e,plugins:t}=window.app;if($m("daily")){const{format:a,folder:i,template:s}=t.getPlugin("periodic-notes")?.settings?.daily||{};return{format:a||yI,folder:i?.trim()||"",template:s?.trim()||""}}const{folder:n,format:r,template:o}=e.getPluginById("daily-notes")?.instance?.options||{};return{format:r||yI,folder:n?.trim()||"",template:o?.trim()||""}}catch{}}function Jm(){try{const e=window.app.plugins,t=e.getPlugin("calendar")?.options,n=e.getPlugin("periodic-notes")?.settings?.weekly;if($m("weekly"))return{format:n.format||bI,folder:n.folder?.trim()||"",template:n.template?.trim()||""};const r=t||{};return{format:r.weeklyNoteFormat||bI,folder:r.weeklyNoteFolder?.trim()||"",template:r.weeklyNoteTemplate?.trim()||""}}catch{}}function Xm(){const e=window.app.plugins;try{const t=$m("monthly")&&e.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:t.format||j9,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function Qm(){const e=window.app.plugins;try{const t=$m("quarterly")&&e.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:t.format||L9,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function eg(){const e=window.app.plugins;try{const t=$m("yearly")&&e.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:t.format||R9,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function F9(...e){let t=[];for(let r=0,o=e.length;r<o;r++)t=t.concat(e[r].split("/"));const n=[];for(let r=0,o=t.length;r<o;r++){const a=t[r];!a||a==="."||n.push(a)}return t[0]===""&&n.unshift(""),n.join("/")}function sW(e){let t=e.substring(e.lastIndexOf("/")+1);return t.lastIndexOf(".")!=-1&&(t=t.substring(0,t.lastIndexOf("."))),t}async function lW(e){const t=e.replace(/\\/g,"/").split("/");if(t.pop(),t.length){const n=F9(...t);window.app.vault.getAbstractFileByPath(n)||await window.app.vault.createFolder(n)}}async function tg(e,t){t.endsWith(".md")||(t+=".md");const n=Nn.normalizePath(F9(e,t));return await lW(n),n}async function If(e){const{metadataCache:t,vault:n}=window.app,r=Nn.normalizePath(e);if(r==="/")return Promise.resolve(["",null]);try{const o=t.getFirstLinkpathDest(r,""),a=await n.cachedRead(o),i=window.app.foldManager.load(o);return[a,i]}catch(o){return console.error(`Failed to read the daily note template '${r}'`,o),new Nn.Notice("Failed to read the daily note template"),["",null]}}function ai(e,t="day"){const n=e.clone().startOf(t).format();return`${t}-${n}`}function H9(e){return e.replace(/\[[^\]]*\]/g,"")}function cW(e,t){if(t==="week"){const n=H9(e);return/w{1,2}/i.test(n)&&(/M{1,4}/.test(n)||/D{1,4}/.test(n))}return!1}function kf(e,t){return B9(e.basename,t)}function uW(e,t){return B9(sW(e),t)}function B9(e,t){const r={day:Km,week:Jm,month:Xm,quarter:Qm,year:eg}[t]().format.split("/").pop(),o=window.moment(e,r,!0);if(!o.isValid())return null;if(cW(r,t)&&t==="week"){const a=H9(r);if(/w{1,2}/i.test(a))return window.moment(e,r.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return o}class dW extends Error{}async function _9(e){const t=window.app,{vault:n}=t,r=window.moment,{template:o,format:a,folder:i}=Km(),[s,l]=await If(o),u=e.format(a),f=await tg(i,u);try{const h=await n.create(f,s.replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,r().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,m,w,b,y,S)=>{const x=r(),E=e.clone().set({hour:x.get("hour"),minute:x.get("minute"),second:x.get("second")});return w&&E.add(parseInt(b,10),y),S?E.format(S.substring(1).trim()):E.format(a)}).replace(/{{\s*yesterday\s*}}/gi,e.clone().subtract(1,"day").format(a)).replace(/{{\s*tomorrow\s*}}/gi,e.clone().add(1,"d").format(a)));return t.foldManager.save(h,l),h}catch(h){console.error(`Failed to create file: '${f}'`,h),new Nn.Notice("Unable to create new file.")}}function fW(e,t){return t[ai(e,"day")]??null}function hW(){const{vault:e}=window.app,{folder:t}=Km(),n=e.getAbstractFileByPath(Nn.normalizePath(t));if(!n)throw new dW("Failed to find daily notes folder");const r={};return Nn.Vault.recurseChildren(n,o=>{if(o instanceof Nn.TFile){const a=kf(o,"day");if(a){const i=ai(a,"day");r[i]=o}}}),r}class pW extends Error{}function mW(){const{moment:e}=window;let t=e.localeData()._week.dow;const n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)n.push(n.shift()),t--;return n}function gW(e){return mW().indexOf(e.toLowerCase())}async function Y9(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Jm(),[a,i]=await If(n),s=e.format(r),l=await tg(o,s);try{const u=await t.create(l,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(f,h,p,m,w,b)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),w),b?S.format(b.substring(1).trim()):S.format(r)}).replace(/{{\s*title\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(f,h,p)=>{const m=gW(h);return e.weekday(m).format(p.trim())}));return window.app.foldManager.save(u,i),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Nn.Notice("Unable to create new file.")}}function vW(e,t){return t[ai(e,"week")]??null}function yW(){const e={};if(!U9())return e;const{vault:t}=window.app,{folder:n}=Jm(),r=t.getAbstractFileByPath(Nn.normalizePath(n));if(!r)throw new pW("Failed to find weekly notes folder");return Nn.Vault.recurseChildren(r,o=>{if(o instanceof Nn.TFile){const a=kf(o,"week");if(a){const i=ai(a,"week");e[i]=o}}}),e}class bW extends Error{}async function z9(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Xm(),[a,i]=await If(n),s=e.format(r),l=await tg(o,s);try{const u=await t.create(l,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(f,h,p,m,w,b)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),w),b?S.format(b.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,i),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Nn.Notice("Unable to create new file.")}}function wW(e,t){return t[ai(e,"month")]??null}function SW(){const e={};if(!V9())return e;const{vault:t}=window.app,{folder:n}=Xm(),r=t.getAbstractFileByPath(Nn.normalizePath(n));if(!r)throw new bW("Failed to find monthly notes folder");return Nn.Vault.recurseChildren(r,o=>{if(o instanceof Nn.TFile){const a=kf(o,"month");if(a){const i=ai(a,"month");e[i]=o}}}),e}class TW extends Error{}async function xW(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Qm(),[a,i]=await If(n),s=e.format(r),l=await tg(o,s);try{const u=await t.create(l,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(f,h,p,m,w,b)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),w),b?S.format(b.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,i),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Nn.Notice("Unable to create new file.")}}function IW(e,t){return t[ai(e,"quarter")]??null}function kW(){const e={};if(!W9())return e;const{vault:t}=window.app,{folder:n}=Qm(),r=t.getAbstractFileByPath(Nn.normalizePath(n));if(!r)throw new TW("Failed to find quarterly notes folder");return Nn.Vault.recurseChildren(r,o=>{if(o instanceof Nn.TFile){const a=kf(o,"quarter");if(a){const i=ai(a,"quarter");e[i]=o}}}),e}class EW extends Error{}async function CW(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=eg(),[a,i]=await If(n),s=e.format(r),l=await tg(o,s);try{const u=await t.create(l,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(f,h,p,m,w,b)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),w),b?S.format(b.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,i),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Nn.Notice("Unable to create new file.")}}function MW(e,t){return t[ai(e,"year")]??null}function DW(){const e={};if(!G9())return e;const{vault:t}=window.app,{folder:n}=eg(),r=t.getAbstractFileByPath(Nn.normalizePath(n));if(!r)throw new EW("Failed to find yearly notes folder");return Nn.Vault.recurseChildren(r,o=>{if(o instanceof Nn.TFile){const a=kf(o,"year");if(a){const i=ai(a,"year");e[i]=o}}}),e}function AW(){const{app:e}=window,t=e.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;const n=e.plugins.getPlugin("periodic-notes");return n&&n.settings?.daily?.enabled}function U9(){const{app:e}=window;if(e.plugins.getPlugin("calendar"))return!0;const t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.weekly?.enabled}function V9(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.monthly?.enabled}function W9(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.quarterly?.enabled}function G9(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.yearly?.enabled}function NW(e){const t={day:Km,week:Jm,month:Xm,quarter:Qm,year:eg}[e];return t()}function OW(e,t){return{day:_9,month:z9,week:Y9}[e](t)}Nt.DEFAULT_DAILY_NOTE_FORMAT=yI;Nt.DEFAULT_MONTHLY_NOTE_FORMAT=j9;Nt.DEFAULT_QUARTERLY_NOTE_FORMAT=L9;Nt.DEFAULT_WEEKLY_NOTE_FORMAT=bI;Nt.DEFAULT_YEARLY_NOTE_FORMAT=R9;var Yp=Nt.appHasDailyNotesPluginLoaded=AW;Nt.appHasMonthlyNotesPluginLoaded=V9;Nt.appHasQuarterlyNotesPluginLoaded=W9;Nt.appHasWeeklyNotesPluginLoaded=U9;Nt.appHasYearlyNotesPluginLoaded=G9;var Z9=Nt.createDailyNote=_9;Nt.createMonthlyNote=z9;Nt.createPeriodicNote=OW;Nt.createQuarterlyNote=xW;Nt.createWeeklyNote=Y9;Nt.createYearlyNote=CW;var Xs=Nt.getAllDailyNotes=hW;Nt.getAllMonthlyNotes=SW;Nt.getAllQuarterlyNotes=kW;Nt.getAllWeeklyNotes=yW;Nt.getAllYearlyNotes=DW;var qw=Nt.getDailyNote=fW,Rl=Nt.getDailyNoteSettings=Km,xd=Nt.getDateFromFile=kf;Nt.getDateFromPath=uW;Nt.getDateUID=ai;Nt.getMonthlyNote=wW;Nt.getMonthlyNoteSettings=Xm;Nt.getPeriodicNoteSettings=NW;Nt.getQuarterlyNote=IW;Nt.getQuarterlyNoteSettings=Qm;Nt.getTemplateInfo=If;Nt.getWeeklyNote=vW;Nt.getWeeklyNoteSettings=Jm;Nt.getYearlyNote=MW;Nt.getYearlyNoteSettings=eg;const PW={},jW={},LW={welcome:"Velkommen til Thino",ribbonIconTitle:"Thino",to:"til",months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","Maj","Jun.","Jul.","Aug.","Sep.","Okt.","Nov.","Dec."],weekDays:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],weekDaysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],year:null,month:null,"Basic Options":"Grundlæggende indstillinger","User name":"Brugernavn","Set your user name here. 'Memos 😏' By default":"Indstil dit brugernavn her. 'Thino 😏' som standard",'You can set target heading like "# Heading" to control data location':'Du kan indstille målrubrik som "# Rubrik" for at kontrollere dataplacering',"Insert after heading":"Indsæt efter rubrik","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Du bør indstille samme rubrik nedenfor, hvis du vil indsætte og behandle thino under samme rubrik.","Allows admonitions to be created using ":"Tillader at advarselsbokse oprettes ved hjælp af ","Process Memos below":"Behandl thino nedenfor","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Hvis tomt, vil Thino-grænsefladen vise alt thino-indhold; hvis en titel er angivet, vil Thino-grænsefladen kun vise indholdet under den titel, og indhold skrevet andetsteds vil ikke blive vist.","Save Memo button label":"Gem thino-knappens etiket","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Teksten vist på gem thino-knappen i brugergrænsefladen. 'NOTEIT' som standard.","Focus on editor when open memos":"Fokuser på editor når thino åbnes","Focus on editor when open memos. Focus by default.":"Fokuser på editor når thino åbnes. Fokus som standard.","Open daily memos with open memos":"Åbn daglig thino med åben thino","Open daily memos with open memos. Open by default.":"Åbn daglig thino med åben thino. Åben som standard.","Open Memos when obsidian opens":"Åbn Thino når obsidian åbnes","When enable this, Memos will open when Obsidian opens. False by default.":"Når dette er aktiveret, vil Thino åbne når Obsidian åbnes. Deaktiveret som standard.","Hide done tasks in Memo list":"Skjul færdige opgaver i Thino-listen","Hide all done tasks in Memo list. Show done tasks by default.":"Skjul alle færdige opgaver i Thino-listen. Vis færdige opgaver som standard.","Advanced Options":"Avancerede indstillinger","UI language for date":"UI-sprog for dato","Translates the date UI language. Only 'en' and 'zh' are available.":"Oversætter dato UI-sproget. Kun 'en' og 'zh' er tilgængelige.","Default prefix when save thino":"Standard præfiks ved gem thino","Set the default prefix when create memo, 'List' by default.":"Indstil standard præfiks ved oprettelse af thino, 'Liste' som standard.","Default insert date format":"Standard indsæt datoformat","Set the default date format when insert date by @, 'Tasks' by default.":"Indstil standard datoformat ved indsættelse af dato med @, 'Opgaver' som standard.","Default editor position on mobile":"Standard editor position på mobil","Set the default editor position on Mobile, 'Top' by default.":"Indstil standard editor position på mobil, 'Top' som standard.","Use button to show editor on mobile":"Brug knap til at vise editor på mobil","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Indstil en flydende knap til at kalde editor på mobil. Virker kun når editor er placeret i bunden.","Show Time When Copy Results":"Vis tid ved kopiering af resultater","Show time when you copy results, like 12:00. Copy time by default.":"Vis tid når du kopierer resultater, som 12:00. Kopier tid som standard.","Show Date When Copy Results":"Vis dato ved kopiering af resultater","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Vis dato når du kopierer resultater, som [[2022-01-01]]. Kopier dato som standard.","Add Blank Line Between Different Date":"Tilføj tom linje mellem forskellige datoer","Add blank line when copy result with date. No blank line by default.":"Tilføj tom linje når du kopierer resultat med dato. Ingen tom linje som standard.","Share Options":"Delingsindstillinger","Share Memos Image Footer Start":"Del Thino-billede fodtekst start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Indstil hvad du vil her, brug {ThinoNum} for at vise antal thino, {UsedDay} for dage. '{ThinoNum} Thino {UsedDay} Dage' som standard","Share Memos Image Footer End":"Del Thino-billede fodtekst slut","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Indstil hvad du vil her, brug {UserName} som dit brugernavn. '✍️ Af {UserName}' som standard","Save Shared Image To Folder For Mobile":"Gem delt billede til mappe for mobil","Save image to folder for mobile. False by Default":"Gem billede til mappe for mobil. Deaktiveret som standard","Say Thank You":"Sig tak",Donate:"Donér","If you like this plugin, consider donating to support continued development:":"Hvis du kan lide dette plugin, overvej at donere for at støtte fortsat udvikling:","File Name of Recycle Bin":"Filnavn på papirkurv","Set the filename for recycle bin. 'delete' By default":"Indstil filnavnet for papirkurven. 'slet' som standard","File Name of Query File":"Filnavn på forespørgselsfil","Set the filename for query file. 'query' By default":"Indstil filnavnet for forespørgselsfilen. 'forespørgsel' som standard","Use Tags In Vault":"Brug tags i boks","Use tags in vault rather than only in Memos. False by default.":"Brug tags i boks i stedet for kun i Thino. Deaktiveret som standard.","Ready to convert image into background":"Klar til at konvertere billede til baggrund",List:"Liste",Task:"Opgave",Top:"Top",Bottom:"Bund",TAG:"TAG",DAY:"DAG",QUERY:"FORESPØRGSEL",EDIT:"REDIGER",PIN:"FASTGØR",UNPIN:"FRIGØR",DELETE:"SLET","CONFIRM!":"BEKRÆFT!","CREATE FILTER":"OPRET FILTER","Comment it...":"Kommenter det...",Settings:"Indstillinger","Recycle bin":"Papirkurv","About Me":"Om mig","Fetching data...":"Henter data...","Here is No Memos.":"Her er ingen Thino.","Frequently Used Tags":"Hyppigt brugte tags","What do you think now...":"Hvad tænker du nu...",READ:"LÆS",MARK:"MARKÉR",SHARE:"DEL",SOURCE:"KILDE",RESTORE:"GENDAN",ARCHIVE:"Arkiv","Daily Review":"Daglig gennemgang","DELETE AT":"SLETTET DEN","Noooop!":"Neeej!","All Data is Loaded 🎉":"Alle data er indlæst 🎉","Quick filter":"Hurtig filter",TYPE:"TYPE",LINKED:"LINKET","NO TAGS":"INGEN TAGS","HAS LINKS":"HAR LINKS","HAS IMAGES":"HAR BILLEDER",INCLUDE:"INKLUDER",EXCLUDE:"EKSKLUDER",TEXT:"TEKST",IS:"ER",AND:"OG",OR:"ELLER",LIST:"LISTE",ISNOT:"ER IKKE",PATH:"STI",METADATA:"METADATA",SELECT:"VÆLG","ADD FILTER TERMS":"TILFØJ FILTERBETINGELSER",FILTER:"FILTER",Filter:"Filter",TITLE:"TITEL","CREATE QUERY":"OPRET FORESPØRGSEL","EDIT QUERY":"REDIGER FORESPØRGSEL",MATCH:"MATCH",TIMES:"GANGE","Share Memo Image":"Del Thino-billede","↗Click the button to save":"↗Klik på knappen for at gemme","Image is generating...":"Billede genereres...","Image is loading...":"Billede indlæses...","Loading...":"Indlæser...","😟 Cannot load image, image link maybe broken":"😟 Kan ikke indlæse billede, billedlink er måske brudt","Daily Memos":"Daglige Thino","CANCEL EDIT":"ANNULLER REDIGERING","LINK TO THE":"LINK TIL","Mobile Options":"Mobilindstillinger","Experimental Options":"Eksperimentelle indstillinger","Don't support web image yet, please input image path in vault":"Understøtter ikke webbilleder endnu, indtast venligst billedsti i boksen","Background Image in Dark Theme":"Baggrundsbillede i mørkt tema","Background Image in Light Theme":"Baggrundsbillede i lyst tema",'Set background image in dark theme. Set something like "Daily/one.png"':'Indstil baggrundsbillede i mørkt tema. Indstil noget som "Daglig/et.png"','Set background image in light theme. Set something like "Daily/one.png"':'Indstil baggrundsbillede i lyst tema. Indstil noget som "Daglig/et.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Indstil standard thino-komposition, du bør bruge {TIME} som "TT:mm" og {CONTENT} som indhold. "{TIME} {CONTENT}" som standard',"Default Memo Composition":"[Forældet] Standard Thino-komposition","Show Tasks Label":"Vis opgaveetiket","Show tasks label near the time text. False by default":"Vis opgaveetiket nær tidsteksten. Deaktiveret som standard","Please Open Memos First":"Åbn venligst Thino først",DATE:"DATO",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_IKKE_AKTIVERET",BEFORE:"FØR",AFTER:"EFTER","Allow Comments On Memos":"Tillad kommentarer på Thino","You can comment on memos. False by default":"Du kan kommentere på thino. Deaktiveret som standard",Import:"Importer","TITLE CANNOT BE NULL!":"TITEL KAN IKKE VÆRE TOM!","FILTER CANNOT BE NULL!":"FILTER KAN IKKE VÆRE TOMT!","Comments In Original DailyNotes/Notes":"Kommentarer i originale daglige noter/noter","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Du bør installere Dataview Plugin ver 0.5.9 eller senere for at bruge denne funktion.","Open Memos Successfully":"Åbn Thino med succes","Fetch Memos Error":"😭 Hentningsfejl","Copied to clipboard Successfully":"Kopieret til udklipsholder med succes","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Kontroller om du har åbnet Daily Notes Plugin eller Periodic Notes Plugin","Please finish the last filter setting first":"Afslut venligst den sidste filterindstilling først","Close Memos Successfully":"Luk Thino med succes","Insert as Memo":"Indsæt som Thino","Insert file as memo content":"Indsæt fil som thino-indhold","Image load failed":"Billedindlæsning mislykkedes","Content cannot be empty":"Indhold kan ikke være tomt","Unable to create new file.":"Kan ikke oprette ny fil.","Failed to fetch deleted memos: ":"Kunne ikke hente slettede thino: ","RESTORE SUCCEED":"GENDANNELSE LYKKEDES","DELETE SUCCEED":"SLETNING LYKKEDES","Save Memo button icon":"Gem Thino-knappens ikon","The icon shown on the save Memo button in the UI.":"Ikonet vist på gem Thino-knappen i brugergrænsefladen.","Fetch Memos From Particular Notes":"Hent Thino fra bestemte noter",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Du kan indstille enhver Dataview-forespørgsel for thino for at hente det. Alle thino i disse noter vil blive vist på listen. "#memo" som standard',"Allow Memos to Fetch Memo from Notes":"Tillad Thino at hente Thino fra noter","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Brug Thino til at administrere alle thino i dine noter, ikke kun i daglige noter. Deaktiveret som standard","Always Show Memo Comments":"Vis altid Thino-kommentarer","Always show memo comments on memos. False by default":"Vis altid thino-kommentarer på thino. Deaktiveret som standard","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Du har ikke indstillet mappe til daglige noter i hverken periodic-notes eller daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Kontroller venligst dine indstillinger for daily note plugin ELLER periodic notes plugin","Use which plugin's default configuration":"Brug hvilket plugins standardkonfiguration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino bruger pluginets standardkonfiguration til at hente thino fra daglig, 'Daglig' som standard.",Daily:"Daglig","Always Show Leaf Sidebar on PC":"Vis altid blad-sidepanel på PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Vis venstre sidepanel på PC/tablet selv når bladbredden er mindre end 875px. Deaktiveret som standard.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"Du har ikke indstillet format for daglige noter i hverken periodic-notes eller daily-notes plugins.","fetch more":"hent mere","Search all settings":"Søg i alle indstillinger",General:"Generelt",Theme:"Tema",Share:"Del",Advanced:"Avanceret",Thino:"Thino","Random Review":"Tilfældig gennemgang","ARCHIVED AT":"ARKIVERET DEN","Failed to get memos from daily notes":"Kunne ikke hente thino fra daglige noter","Failed to delete memo":"Kunne ikke slette thino","CTRL + ENTER to save":"CTRL + ENTER for at gemme","Started from":"Startet fra","Custom Background Image":"Tilpasset baggrundsbillede","Set custom background image.":"Indstil tilpasset baggrundsbillede.","Custom Memo Footer":"Tilpasset Thino-fodtekst","Set custom memo footer.":"Indstil tilpasset thino-fodtekst.","Heatmap Color Scheme":"Varmekort farveskema","Set different color scheme for heatmap.":"Indstil forskelligt farveskema for varmekort.","Enable Local Http Server":"Aktiver lokal Http-server","Memos Http Server Port":"Thino Http-server port","Set memos http server port to listen. '43999' by default":"Indstil thino http-server port til at lytte. '43999' som standard","Default Editor Mode":"Standard editor-tilstand","Live-Preview Mode OR Source Mode.":"Live-forhåndsvisning tilstand/Kildetilstand.","Save type for Thino":"Gem type for Thino",DAILY:"DAGLIG",MULTI:"MULTI",CANVAS:"LÆRRED",ALL:"ALLE",FILE:"FIL",TODO:"TODO",DONE:"FÆRDIG",JOURNAL:"JOURNAL",OTHER:"ANDET","Failed to create daily note, check if it exists.":"Kunne ikke oprette daglig note, kontroller om den eksisterer.","Failed to create daily note. Please check if you created a folder for daily notes.":"Kunne ikke oprette daglig note. Kontroller venligst om du har oprettet en mappe til daglige noter.","After you verify your account, please refresh this page.":"Efter du har verificeret din konto, opdater venligst denne side.",Verify:"Verificer","Oops! You forget to verify insider account":"Ups! Du glemte at verificere insider-konto","If you have any questions, please contact us.":"Hvis du har spørgsmål, kontakt os venligst.","Delete Thino Directly":"Slet Thino direkte","When delete thino directly, it will not be moved to trash. False by default.":"Når du sletter thino direkte, vil det ikke blive flyttet til papirkurven. Deaktiveret som standard.","Enable opening thino globally":"Aktiver åbning af thino globalt","Enable opening thino globally. False by default.":"Aktiver åbning af thino globalt. Deaktiveret som standard.","Key for opening thino globally":"Tast for at åbne thino globalt","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Indstil tast for at åbne thino globalt. CTRL + SHIFT + T som standard.","Key for showing thino globally":"Tast for at vise thino globalt","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Indstil tast for at vise thino globalt. CTRL + SHIFT + E som standard.","Get activation code":"Få aktiveringskode","Input activation code here":"Indtast aktiveringskode her","Copy Thino id":"Kopier Thino-id","Activate Pro Version":"Aktiver Pro-version","Please copy Thino id first":"Kopier venligst Thino-id først",'You can set folder name with file name like "folder/file"':'Du kan indstille mappenavn med filnavn som "mappe/fil"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Du kan indstille mappenavn som "mappe1/mappe2/mappe3" for at oprette undermappe',"Default save type":"Standard gem placering",'Set the default save type for thino. "DAILY" by default':'Indstil standard gem type for thino. "DAGLIG" som standard',"Sync Thino via PKMer":"Synkroniser Thino via PKMer",Unlink:"Fjern link",Link:"Link","Connect to PKMer Sync, you can check it in ":"Forbind til PKMer Sync, du kan tjekke det i ","PKMer Sync":"PKMer Sync","Remove successfully":"Fjernet med succes",Deactivate:"Deaktiver",Remove:"Fjern","Confirm?":"Bekræft?","Sync Status":"Synkroniseringsstatus","Start or stop sync":"Start eller stop synkronisering","Stop sync successfully":"Stop synkronisering med succes","Start sync successfully":"Start synkronisering med succes",Stop:"Stop",Start:"Start","Show thino near mouse":"Vis thino nær mus","Query not found":"Forespørgsel ikke fundet","Send to clipboard successfully":"Sendt til udklipsholder med succes","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Kunne ikke starte HTTP-server, kontroller venligst om porten er tilgængelig.","Thino - Started HTTP server on port":"Thino - Startede HTTP-server på port","Thino - Terminated HTTP server":"Thino - Afsluttede HTTP-server","File not exist":"Fil eksisterer ikke","Thino not found":"Thino ikke fundet","File not found for the given thino path, is creating a new file":"Fil ikke fundet for den angivne thino-sti, opretter en ny fil","Saved sync token successfully":"Gemte synkroniseringstoken med succes","Failed to find daily notes folder":"Kunne ikke finde mappe til daglige noter","Please install obsidian-hover-editor plugin first":"Installer venligst obsidian-hover-editor plugin først","Copied app id successfully":"Kopierede app-id med succes","Please input token first":"Indtast venligst token først","Please enable sync first":"Aktiver venligst synkronisering først","Init Failed":"Initialisering mislykkedes","Verify successfully":"Verificeret med succes","Failed to verify":"Kunne ikke verificere","Folder not found for the given thino path, is creating a new folder":"Mappe ikke fundet for den angivne thino-sti, opretter en ny mappe","File not found for the given thino path":"Fil ikke fundet for den angivne thino-sti","Failed to read current daily note, check if it exists.":"Kunne ikke læse aktuel daglig note, kontroller om den eksisterer.","Failed to save":"Kunne ikke gemme","Failed to login, please login again":"Kunne ikke logge ind, log venligst ind igen","COPY FAILED":"KOPIERING MISLYKKEDES","COPY SUCCEED":"KOPIERING LYKKEDES","Copy selected text":"Kopier valgt tekst","Copy thino":"Kopier thino",COPY:"KOPIER","This is a pro feature, please upgrade to pro version to use it.":"Dette er en pro-funktion, opgrader venligst til pro-versionen for at bruge den.","You can get pro version from: ":"Du kan få pro-versionen fra: ",Save:"Gem",Cancel:"Annuller","Thino Daily Target":"Thino dagligt mål",Input:"Input","#Tag":"#Tag","to create tag":"for at oprette tag","You have verified your account. Congrats!":"Du har verificeret din konto. Tillykke!","Pro features":"Pro-funktioner","Target Thino Count":"Målrettet Thino-antal",on:"på","Switch waterfall view":"Skift vandfald-visning","Switch view":"Skift visning","Switch list view":"Skift listevisning","Set daily target":"Indstil dagligt mål","Thino Save To: ":"Thino gem til: ","Enter fullscreen mode":"Gå til fuldskærmstilstand","Exit fullscreen mode":"Afslut fuldskærmstilstand",words:"ord",word:"ord","Return To Home Page":"Tilbage til hjemmesiden","No thinos to review!":"Ingen thinos at gennemgå!","Thinos to review":"Thinos til gennemgang","Start Review":"Start gennemgang",Hard:"Svær",Good:"God",Easy:"Let",Again:"Igen","Clear all review data":"Ryd alle gennemgangsdata","Daily Progress":"Daglig fremgang","Show stats":"Vis statistik","Hide stats":"Skjul statistik",Remaining:"Resterende","Total Reviews":"Samlede gennemgange","Today, you have reviewed all your thinos!":"I dag har du gennemgået alle dine thinos!","Daily review limit reached! Come back tomorrow.":"Daglig gennemgangsgrænse nået! Kom tilbage i morgen.","Open thino in center window":"Åbn thino i centervindue","Open thino in float window":"Åbn thino i flydende vindue","Open thino in right sidebar":"Åbn thino i højre sidepanel","Open thino in left sidebar":"Åbn thino i venstre sidepanel","Show thino editor":"Vis thino-editor","Toggle minimal mode":"Skift minimal tilstand","Focus on thino editor":"Fokuser på thino-editor","ReSync web thinos to local":"Gensynkroniser web-thinos til lokal","Sync local thinos to web":"Synkroniser lokale thinos til web","Show daily thino":"Vis daglig thino","Focus on search bar":"Fokuser på søgefelt","Show-thino in popover(Hover editor)":"Vis-thino i popover(Hover editor)","Center window":"Centervindue","You should set the same heading below if you want to insert and process thino below the same heading.":"Du bør indstille samme rubrik nedenfor, hvis du vil indsætte og behandle thino under samme rubrik.","Float window":"Flydende vindue","Right sidebar":"Højre sidepanel","Left sidebar":"Venstre sidepanel","Save thino type when sync local":"Gem thino-type når lokal synkronisering","Set the default save thino type when sync local, FILE by default.":"Indstil standard gem type for thino når lokal synkronisering, FILE som standard.","Sync service":"Synkroniseringsservice","Pro verification status":"Pro-verificering status","Live-preview":"Live-preview",Source:"Kilde","Global copy":"Global kopi","Set the folder name":"Indstil mappe-navn","Set the filename":"Indstil filnavn","Set the filename for current location file":"Indstil filnavn for aktuel sti","Switch calendar type":"Skift kalender-type",alphabetical:"alfabetisk",alphabeticalReverse:"alfabetiskReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type her",Today:"I dag",Yesterday:"I går","Last 7 days":"Sidste 7 dage","Last 30 days":"Sidste 30 dage","Last 90 days":"Sidste 90 dage","Last 180 days":"Sidste 180 dage","Last 365 days":"Sidste 365 dage",Found:"Fundet","Copy filtered thinos":"Kopier filtrerede thinos","Bulk delete":"Bulk slet","Bulk archive":"Bulk arkiver","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk gendan","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Hvis du deaktiverer daglige notesplugin, kan det være, at thino ikke bliver slettet eller repareret korrekt. Aktiver plugin og prøv igen.",Preview:"Forhåndsvisning","Set and save":"Indstil og gem","Show day mark in thino list":"Vis dagmarke i thino-liste","Show day mark on the top of daily range thino. False by default.":"Vis dagmarke i toppen af daglige thino-rækker. False som standard.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Klik for at udvide eller fold, Cmd+Klik for at vise alle thinos af dagen","You can buy a license from":"Du kan købe en licens fra","No thinos in range":"Ingen thinos i række",Month:"Måned",Week:"Uge",Day:"Dag",Agenda:"Agenda",Tomorrow:"I morgen",Previous:"Forrige",Next:"Næste","Search all columns...":"Søg i alle kolonner...","Basic Info":"Grundlæggende info","Additional Info":"Yderligere info","Created At":"Oprettet den",Content:"Indhold","Thino Type":"Thino-type","Source Type":"Kildetype","Row status":"Række status",Path:"Sti","Pinned Status":"Fastgjort status",Table:"Tabel",Chat:"Chat",Moments:"Øjeblikke",Waterfall:"Vandfald",Calendar:"Kalender","Go to page":"Gå til side",Page:"Side",Show:"Vis",rows:"rækker","Temp Filter":"Midlertidig filter","Open link directly in Thino view":"Åbn link direkte i Thino-visning","Day mark range":"Dagmærke-område","Set the range of day mark. Day by default.":"Indstil området for dagmærke. Dag som standard.","Thino is locked":"Thino er låst","Please unlock Thino by input password":"Lås venligst Thino op ved at indtaste adgangskode","Auto Download Image":"Auto-download billede","Auto download image when save to thino. 'false' by default":"Auto-download billede når der gemmes til thino. 'false' som standard","Thino Http IP Type":"Thino Http IP-type","Set Thino http server ip to listen. 'localhost' by default":"Indstil Thino http-server IP til at lytte. 'localhost' som standard","Password to lock Thino":"Adgangskode til at låse Thino",Unlock:"Lås op",Locked:"Låst","Password is incorrect":"Adgangskoden er forkert",Lock:"Lås","Need password to unlock Thino":"Adgangskode påkrævet for at låse Thino op","You have not set a password or enable this feature yet":"Du har ikke indstillet en adgangskode eller aktiveret denne funktion endnu",Password:"Adgangskode","Password for Thino":"Adgangskode til Thino","Please input your password to change password settings":"Indtast venligst din adgangskode for at ændre adgangskodeindstillinger","Please input your password":"Indtast venligst din adgangskode","Lock thino":"Lås thino",date:"dato",time:"tid",event:"begivenhed","Add tag position":"Tilføj tag-position","Set the position of the tag when adding tag automatically":"Indstil positionen af tagget når der tilføjes tag automatisk","Add tag automatically":"Tilføj tag automatisk","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Tilføj tag til slutningen eller begyndelsen af thino-indholdet når der oprettes en thino og filtreres tags","Add tag with new line":"Tilføj tag med ny linje","Add tag with new line when adding tag automatically":"Tilføj tag med ny linje når der tilføjes tag automatisk","Input to select more tags":"Indtast for at vælge flere tags","Tag Bulk Edit":"Tag masseredigering","Tag Bulk Select":"Tag massevalg","Exist Tags":"Eksisterende tags","Selected Tags":"Valgte tags","Click to remove exist tag":"Klik for at fjerne eksisterende tag","Click to remove selected tag":"Klik for at fjerne valgt tag","Select tags":"Vælg tags","Input to select exist tag":"Indtast for at vælge eksisterende tag",Beginning:"Begyndelse",End:"Slutning","Set the heading for saving thino":"Indstil overskriften for at gemme thino","# Heading":"# Overskrift","Chat view style":"Chat-visningsstil","Set the style of chat view":"Indstil stilen for chat-visning","Background image for moments view":"Baggrundsbillede for øjeblikke-visning","Set the background image for moments view":"Indstil baggrundsbilledet for øjeblikke-visning","Icon for moments/chat view/share image":"Ikon for øjeblikke/chat-visning/delt billede","Set the icon for moments/chat view/share image":"Indstil ikonet for øjeblikke/chat-visning/delt billede","Quote for moments view/share image":"Citat for øjeblikke-visning/delt billede","Set the quote for moments view/share image":"Indstil citatet for øjeblikke-visning/delt billede","Theme for Thino":"Tema for Thino","Set the theme for Thino":"Indstil temaet for Thino","Interface Details":"Grænsefladedetaljer","Task amount":"Opgavemængde","Thino status":"Thino-status","Used tags":"Brugte tags","Used days":"Brugte dage","Most active day":"Mest aktive dag","Most active hour":"Mest aktive time","Thino amount":"Thino-mængde","No content to generate.":"Intet indhold at generere.","Image generated successfully.":"Billede genereret med succes.","Failed to generate image.":"Kunne ikke generere billede.","Share filtered thinos as image":"Del filtrerede thinos som billede","Latest version":"Seneste version","Previous version":"Tidligere version","Thino update info":"Thino opdateringsinfo","Debug info copied to clipboard":"Fejlfindingsinfo kopieret til udklipsholder","Copy debug info":"Kopier fejlfindingsinfo","Failed to load changelog":"Kunne ikke indlæse ændringslog","View online":"Se online",ChangeLog:"Ændringslog","Please open thino first":"Åbn venligst thino først","Insert editor":"Indsæt editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Indstil venligst forskellige gemmeplacering for multi-fil-indstillinger i Thino. Dagbogsmappen overlapper med multi-fil-gemmeplaceringen, eller der er risiko for at den bliver læst gentagne gange.","Default time prefix for thino in daily notes":"Standard tidspræfiks for thino i daglige noter","Set default time prefix for thino in daily notes.":"Indstil standard tidspræfiks for thino i daglige noter.","Save image successfully":"Gem billede med succes","User quote":"Brugercitat","Set user quote for thino":"Indstil brugercitat for thino","User icon":"Brugerikon","Set user icon for thino. You can input http/https link or file path in vault.":"Indstil brugerikon for thino. Du kan indtaste http/https-link eller filsti i boks.","User info":"Brugerinfo","Copy filtered results":"Kopier filtrerede resultater","Share image":"Del billede",Default:"Standard",Gray:"Grå",Grass:"Græs",Flame:"Flamme",Olive:"Oliven",Ice:"Is",Magenta:"Magenta","Daily notes":"Daglige noter",Editor:"Editor","Append/prepend text when share to Thino":"Tilføj/foranstil tekst når der deles til Thino","Append text when share to Thino":"Tilføj tekst når der deles til Thino","Prepend text when share to Thino":"Foranstil tekst når der deles til Thino","Add newline when append/prepend text":"Tilføj ny linje når der tilføjes/foranstilles tekst","Input anything here":"Indtast hvad som helst her",Prepend:"Foranstil",Append:"Tilføj",Both:"Begge",None:"Ingen","Hide pinned group":"Skjul fastgjort gruppe","Hide pinned group in thino list. False by default.":"Skjul fastgjort gruppe i thino-liste. Falsk som standard.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Indstil overskriften for opgavetypen af thino, som standard vil det registrerede thino-indhold blive indsat i slutningen af dagbogen; hvis en titel er angivet, vil alt registreret thino-indhold blive ensartet kategoriseret under den titel.","Different insert target for different type":"Forskelligt indsætningsmål for forskellige typer","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Skift dette for at indstille forskellige indsætningsmål for forskellige typer af thino, som opgave- eller listetyper af thino","You can set whole diary or only part of it":"Du kan indstille hele dagbogen eller kun en del af den","Set process target":"Indstil procesmål",Custom:"Tilpasset","Whole diary":"Hele dagbogen","Set thino insert place":"Indstil thino indsætningssted","Set where to insert thino content":"Indstil hvor thino-indhold skal indsættes","End of the diary":"Slutningen af dagbogen","Custom location":"Tilpasset placering","Setting guide":"Indstillingsguide","Details settings":"Detaljerede indstillinger","Start Thino":"Start Thino","About Thino Pro":"Om Thino Pro",Enabled:"Aktiveret",Enable:"Aktiver","Daily notes folder":"Daglige noter-mappe","Set daily notes folder":"Indstil daglige noter-mappe","Daily note name format":"Daglig note navneformat","Set daily note name format":"Indstil daglig note navneformat","Daily note plugin":"Daglig note-plugin","Enable daily note plugin":"Aktiver daglig note-plugin",Selected:"Valgt",Select:"Vælg","A classic theme for Thino with a two-column layout":"Et klassisk tema for Thino med et to-kolonne layout",Classic:"Klassisk","A modern theme for Thino with a three-column layout and some unique features.":"Et moderne tema for Thino med et tre-kolonne layout og nogle unikke funktioner.",Modern:"Moderne","Go and enjoy Thino":"Gå og nyd Thino","Congrats! All settings done":"Tillykke! Alle indstillinger er færdige","Adjust settings that influence your user experience with Thino.":"Juster indstillinger der påvirker din brugeroplevelse med Thino.","Set preferences for using Thino":"Indstil præferencer for brug af Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Hvis du bruger Thino basisversionen, er aktivering af daglig note-plugin påkrævet. Konfigurer dets indstillinger for at arbejde effektivt med det.","Go with daily note plugin":"Gå med daglig note-plugin","Choose a theme for Thino.":"Vælg et tema til Thino.","Set theme for Thino":"Indstil tema for Thino","Set up your user info for Thino.":"Opsæt din brugerinfo for Thino.","Get started with Thino":"Kom i gang med Thino","Skip and start Thino":"Spring over og start Thino","Next step":"Næste trin","Back to previous step":"Tilbage til forrige trin","Click to enable =>":"Klik for at aktivere =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Dette er Thino's sidepanel. Naviger til forskellige stier eller vælg forespørgselsfilter.","Click here and go to settings page.":"Klik her og gå til indstillingssiden.","Click here and go to different path.":"Klik her og gå til forskellige stier.","Select or create query filter here.":"Vælg eller opret forespørgselsfilter her.","See the status of Thinos here.":"Se status for Thinos her.","Search your thino quickly here.":"Søg hurtigt efter din thino her.","Edit or create your thino here.":"Rediger eller opret din thino her.","See your thinos here.":"Se dine thinos her.","See your time status of thinos here.":"Se din tidsstatus for thinos her.","See your tags here. Tags will be shown when thino contains tags.":"Se dine tags her. Tags vil blive vist når thino indeholder tags.",Done:"Færdig","Thino is ready to use. ":"Thino er klar til brug. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Du kan begynde at bruge Thino nu. Hvis du vil vide mere om Thino Pro, klik på knappen nedenfor.","Default time prefix":"Standard tidspræfiks","Append Text Action":"Tilføj tekst-handling","Prepend Text Action":"Foranstil tekst-handling",Preset:"Forudindstilling","Select Tags":"Vælg Tags","It is not available on small view":"Det er ikke tilgængeligt på lille visning","Append text":"Tilføj tekst","Prepend text":"Foranstil tekst","Your daily note folder is not set correctly, please check your settings":"Din daglige note-mappe er ikke indstillet korrekt, tjek venligst dine indstillinger","Default sharing style":"Standard delingsstil","Set the default style for sharing thino, 'Modern' by default.":'Indstil standardstilen for deling af thino, "Moderne" som standard.',Clean:"Ren",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino-deling","Copy to clipboard failed":"Kopiering til udklipsholder mislykkedes","Copy to clipboard successfully":"Kopieret til udklipsholder med succes","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Dit indhold er blevet kopieret til udklipsholderen og indsat i editoren. Prøv venligst igen","Share thino":"Del thino","Set file name after create thino":"Indstil filnavn efter oprettelse af thino","You can set file name after create thino. A input box will show when you create thino.":"Du kan indstille filnavn efter oprettelse af thino. En inputboks vil blive vist, når du opretter thino.",SPLIT:"OPDEL","Split by Heading 1":"Opdel efter Overskrift 1","Split by Heading 2":"Opdel efter Overskrift 2","Split by Heading 3":"Opdel efter Overskrift 3","Insert task":"Indsæt opgave","All settings have been reset to default.":"Alle indstillinger er blevet nulstillet til standard.","Reset all Thino settings":"Nulstil alle Thino-indstillinger","Reset settings":"Nulstil indstillinger","Reset Thino settings to default settings.":"Nulstil Thino-indstillinger til standardindstillinger.","Task Management":"Opgavestyring","Append completed date when task done in thino":"Tilføj fuldført dato når opgave er udført i thino","Append completed date when task done in thino. False by default":"Tilføj fuldført dato når opgave er udført i thino. Falsk som standard","Set tag for single file that Thino indexes":"Indstil tag for enkelt fil som Thino indekserer","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Når du indstiller et tag her, vil Thino indeksere denne fil indeholder dette tag og vise det i listen. Behøver ikke at tilføje `#`.","Set tag for file type file":"Indstil tag for filtype-fil","Set tag for multi type file":"Indstil tag for multi-type fil","Please input the tag":"Indtast venligst tagget","Merge thinos in to thino share image":"Flet thinos ind i thino-delingsbillede","Custom height for Thino content":"Tilpasset højde for Thino-indhold","Set custom height for Thino content. Like 200px or 20rem":"Indstil tilpasset højde for Thino-indhold. Som 200px eller 20rem","Input height":"Indtast højde","Submit issue":"Indsend problem","Current version":"Nuværende version","Bug report":"Fejlrapport","Click the button to copy debug info and open the issue page":"Klik på knappen for at kopiere fejlfindingsinfo og åbne problemsiden","Copy and go":"Kopier og gå","Debug info copied":"Fejlfindingsinfo kopieret","Feature request":"Funktionsanmodning","Submit your feature request to the issue page":"Indsend din funktionsanmodning til problemsiden",Go:"Gå","Toggle query list visibility":"Skift synlighed for forespørgselsliste","Toggle tags visibility":"Skift synlighed for tags","Toggle sidebar visibility":"Skift synlighed for sidepanel",Collapse:"Sammenfold",Expand:"Udvid","Max height for collapse":"Maksimal højde for sammenfoldning","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Den maksimale højde for thino-sammenfoldning, når indstillet til 0, vil thino ikke folde sammen. 0 som standard. (Dette er ikke linjeantal, det er højde i px.)","Render content":"Generer indhold","Optimize for Callout":"Optimer for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Vil ikke automatisk gengive indhold, der indeholder mere end 3 callouts. Sand som standard","The value should be greater than":"Værdien skal være større end","Append Text":"Tilføj tekst","Prepend Text":"Foranstil tekst","Thino height when collapsed":"Thino-højde når sammenfoldet","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Højden for thino når den er sammenfoldet, når indstillet til 0, vil thino ikke folde sammen. 100 som standard. (Dette er ikke linjeantal, det er højde i px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Denne mulighed vil tillade dig at bruge andre visninger, når bladbredden ikke er tilstrækkelig. Falsk som standard.","Can select other views when leaf width is not enough":"Kan vælge andre visninger, når bladbredden ikke er tilstrækkelig","TRASH BOX":"PAPIRKURV","Wait templater to finish parse before insert thino":"Vent på at skabelonbehandler færdiggør parsing før indsættelse af thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Denne mulighed vil tillade dig at vente på at skabelonbehandleren færdiggør parsing før indsættelse af thino, hvilket kan medføre at du skal bekræfte to gange mellem indsættelse af thino. Falsk som standard.","Get thino capture extension":"Få thino-optagelsesudvidelse","You can capture idea/text from chrome now.":"Du kan nu optage idé/tekst fra Chrome.","Open File":"Åbn fil","Exported CSV file":"Eksporteret CSV-fil","Updated At":"Opdateret den","Export to CSV":"Eksporter til CSV","Quick add button on mobile navbar":"Hurtig tilføj-knap på mobil navigationslinje","Always show status text":"Vis altid statustekst","Support filter by metadata from file":"Understøt filtrering efter metadata fra fil","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Når dette aktiveres, kan du filtrere via metadata fra fil, som tags i fil. Men thinos fra lærred understøttes ikke. Falsk som standard.","Show source near timestamp in thino":"Vis kilde nær tidsstempel i thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Når dette aktiveres, kan du se kilden nær tidsstemplet i thino. Du kan indstille titel i metadata for at overskrive dette. Falsk som standard.","Show Update Message":"Vis opdateringsbesked","Show update message when Thino is updated. True by default":"Vis opdateringsbesked når Thino opdateres. Sand som standard","Sync manually":"Synkroniser manuelt","Show all scrollbars":"Vis alle rullebjælker","TIME RANGE":"TIDSINTERVAL",WITHIN:"INDEN FOR","7 days":"7 dage","14 days":"14 dage","30 days":"30 dage","3 months":"3 måneder","6 months":"6 måneder","1 year":"1 år","This week":"Denne uge","Last week":"Sidste uge","This month":"Denne måned","Last month":"Sidste måned","This year":"Dette år","Last year":"Sidste år","No history":"Ingen historik","Today Remaining":"Resterende i dag","Today Total":"I alt i dag","Historical Statistics":"Historisk statistik",byTime:"Efter tid",byTimeReverse:"Efter tid omvendt",Stat:"Statistik",Statistics:"Statistikker","Daily Thino Count":"Daglig Thino-antal",Total:"Total",thinos:"thinos","Thino Types":"Thino-typer","Distribution of thino types":"Fordeling af thino-typer","Thino Status":"Thino-status","Distribution of thino status":"Fordeling af thino-status","Popular Tags":"Populære tags","Top 10 most used tags":"Top 10 mest brugte tags","Thino Count":"Thino-antal","Hourly distribution":"Timefordeling","Current month":"Nuværende måned","Monthly distribution":"Månedlig fordeling","30 Days":"Sidste 30 dage",Year:"År","Time Distribution":"Tidsfordeling","When do you write thinos":"Hvornår skriver du thinos","Content Length":"Indholdslængde","Distribution of thino lengths":"Fordeling af thino-længder","Daily Thinos":"Daglige Thinos","Show Time Distribution":"Vis tidsfordeling","Hide date picker":"Skjul datoværktøj","Show date picker":"Vis datoværktøj","Clear filter":"Ryd filter","Copy link":"Kopier link","Copy embed link":"Kopier indlejringslink","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter for at gemme thino","Fixed strings for thinos":"Faste strenge for thinos","Use fixed strings for thinos":"Brug faste strenge for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Aktiver for at tilføje faste strenge i begyndelsen eller slutningen af thinos.","Fixed prefix for thinos":"Fast præfiks for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Tilføj denne streng i begyndelsen af hver thino. Understøtter pladsholdere som {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fast suffiks for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Tilføj denne streng i slutningen af hver thino. Understøtter pladsholdere som {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Ordantal overskredet","Word count feature":"Ordtællingsfunktion","Enable real-time word count display in the editor":"Aktiver realtids ordtælling i editoren","Maximum word count":"Maksimalt ordantal","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Indstil et maksimalt ordantal for thino. Editoren vil vise en advarsel når det overskrides. Indstil til 0 for ubegrænset.","No linked thinos found":"Ingen linkede thinos fundet","Reference links group":"Referencelinks-gruppe","Enable reference links group in thino.":"Aktiver referencelinks-gruppe i thino.","No reference links found":"Ingen referencelinks fundet","Outgoing Links":"Udgående links","Incoming Links":"Indgående links","Error fetching reference links":"Fejl ved hentning af referencelinks","Double click behavior":"Dobbeltklik-adfærd","Set the behavior when double click on a thino.":"Indstil adfærden ved dobbeltklik på en thino.","Open thino":"Åbn thino","Edit thino":"Rediger thino","Go to source":"Gå til kilde","Do nothing":"Gør ingenting","Use default header in mobile view":"Brug standardoverskrift i mobilvisning","Use default header in mobile view of thino rather than custom header.":"Brug standardoverskrift i mobilvisning af thino i stedet for en custom overskrift."},RW={welcome:"Willkommen bei Thino",ribbonIconTitle:"Thino",to:"zu",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],weekDays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekDaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],year:null,month:null,"Basic Options":"Grundeinstellungen","User name":"Benutzername","Set your user name here. 'Memos 😏' By default":"Setze deinen Benutzernamen hier. 'Thino 😏' als Standard",'You can set target heading like "# Heading" to control data location':'Du kannst eine Zielüberschrift wie "# Überschrift" setzen, um den Datenspeicherort zu steuern',"Insert after heading":"Nach Überschrift einfügen","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Wenn leer gelassen, wird der aufgezeichnete Thino-Inhalt am Ende des Tagebuchs eingefügt; wenn ein Titel angegeben wird, werden alle aufgezeichneten Thino-Inhalte einheitlich unter diesem Titel kategorisiert.","Allows admonitions to be created using ":"Erlaubt das Erstellen von Hinweisen mit ","Process Memos below":"Thinos unten verarbeiten","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Wenn leer gelassen, zeigt die Thino-Oberfläche alle Thino-Aufzeichnungen an; wenn ein Titel angegeben wird, zeigt die Thino-Oberfläche nur die Inhalte unter diesem Titel an, und anderswo geschriebene Inhalte werden nicht angezeigt.","Save Memo button label":"Beschriftung des Thino-Speichern-Buttons","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Der Text, der auf dem Thino-Speichern-Button in der Benutzeroberfläche angezeigt wird. 'NOTEIT' als Standard.","Focus on editor when open memos":"Fokus auf Editor beim Öffnen von Thino","Focus on editor when open memos. Focus by default.":"Fokus auf Editor beim Öffnen von Thino. Standardmäßig fokussiert.","Open daily memos with open memos":"Tägliche Thinos beim Öffnen von Thino öffnen","Open daily memos with open memos. Open by default.":"Tägliche Thinos beim Öffnen von Thino öffnen. Standardmäßig geöffnet.","Open Memos when obsidian opens":"Thino beim Öffnen von Obsidian öffnen","When enable this, Memos will open when Obsidian opens. False by default.":"Wenn aktiviert, wird Thino beim Öffnen von Obsidian geöffnet. Standardmäßig deaktiviert.","Hide done tasks in Memo list":"Erledigte Aufgaben in der Thino-Liste ausblenden","Hide all done tasks in Memo list. Show done tasks by default.":"Alle erledigten Aufgaben in der Thino-Liste ausblenden. Standardmäßig werden erledigte Aufgaben angezeigt.","Advanced Options":"Erweiterte Einstellungen","UI language for date":"UI-Sprache für Datum","Translates the date UI language. Only 'en' and 'zh' are available.":"Übersetzt die Datums-UI-Sprache. Nur 'en' und 'zh' sind verfügbar.","Default prefix when save thino":"Standardpräfix beim Speichern von Thino","Set the default prefix when create memo, 'List' by default.":"Setze das Standardpräfix beim Erstellen von Thino, 'Liste' als Standard.","Default insert date format":"Standardformat für Datumseinfügung","Set the default date format when insert date by @, 'Tasks' by default.":"Setze das Standarddatumsformat beim Einfügen von Datum mit @, 'Aufgaben' als Standard.","Default editor position on mobile":"Standardposition des Editors auf Mobilgeräten","Set the default editor position on Mobile, 'Top' by default.":"Setze die Standardposition des Editors auf Mobilgeräten, 'Oben' als Standard.","Use button to show editor on mobile":"Button zum Anzeigen des Editors auf Mobilgeräten verwenden","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Setze einen schwebenden Button, um den Editor auf Mobilgeräten aufzurufen. Funktioniert nur, wenn der Editor unten positioniert ist.","Show Time When Copy Results":"Zeit beim Kopieren der Ergebnisse anzeigen","Show time when you copy results, like 12:00. Copy time by default.":"Zeit beim Kopieren der Ergebnisse anzeigen, wie 12:00. Standardmäßig wird die Zeit kopiert.","Show Date When Copy Results":"Datum beim Kopieren der Ergebnisse anzeigen","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Datum beim Kopieren der Ergebnisse anzeigen, wie [[2022-01-01]]. Standardmäßig wird das Datum kopiert.","Add Blank Line Between Different Date":"Leerzeile zwischen verschiedenen Daten einfügen","Add blank line when copy result with date. No blank line by default.":"Leerzeile beim Kopieren von Ergebnissen mit Datum einfügen. Standardmäßig keine Leerzeile.","Share Options":"Freigabeoptionen","Share Memos Image Footer Start":"Start der Fußzeile beim Teilen von Thino-Bildern","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Setze hier beliebigen Text, verwende {ThinoNum} für die Anzahl der Thinos, {UsedDay} für Tage. '{ThinoNum} Thino {UsedDay} Tage' als Standard","Share Memos Image Footer End":"Ende der Fußzeile beim Teilen von Thino-Bildern","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Setze hier beliebigen Text, verwende {UserName} als deinen Benutzernamen. '✍️ Von {UserName}' als Standard","Save Shared Image To Folder For Mobile":"Geteiltes Bild für Mobilgeräte in Ordner speichern","Save image to folder for mobile. False by Default":"Bild für Mobilgeräte in Ordner speichern. Standardmäßig deaktiviert","Say Thank You":"Danke sagen",Donate:"Spenden","If you like this plugin, consider donating to support continued development:":"Wenn dir dieses Plugin gefällt, erwäge eine Spende zur Unterstützung der weiteren Entwicklung:","File Name of Recycle Bin":"Dateiname des Papierkorbs","Set the filename for recycle bin. 'delete' By default":"Setze den Dateinamen für den Papierkorb. 'delete' als Standard","File Name of Query File":"Dateiname der Abfragedatei","Set the filename for query file. 'query' By default":"Setze den Dateinamen für die Abfragedatei. 'query' als Standard","Use Tags In Vault":"Tags im Vault verwenden","Use tags in vault rather than only in Memos. False by default.":"Tags im Vault anstatt nur in Thino verwenden. Standardmäßig deaktiviert.","Ready to convert image into background":"Bereit, Bild in Hintergrund umzuwandeln",List:"Liste",Task:"Aufgabe",Top:"Oben",Bottom:"Unten",TAG:"TAG",DAY:"TAG",QUERY:"ABFRAGE",EDIT:"BEARBEITEN",PIN:"ANHEFTEN",UNPIN:"LÖSEN",DELETE:"LÖSCHEN","CONFIRM!":"BESTÄTIGEN!","CREATE FILTER":"FILTER ERSTELLEN","Comment it...":"Kommentieren...",Settings:"Einstellungen","Recycle bin":"Papierkorb","About Me":"Über mich","Fetching data...":"Daten werden geladen...","Here is No Memos.":"Keine Thinos vorhanden.","Frequently Used Tags":"Häufig verwendete Tags","What do you think now...":"Was denkst du gerade...",READ:"LESEN",MARK:"MARKIEREN",SHARE:"TEILEN",SOURCE:"QUELLE",RESTORE:"WIEDERHERSTELLEN",ARCHIVE:"ARCHIVIEREN","Daily Review":"Tagesrückblick","DELETE AT":"GELÖSCHT AM","Noooop!":"Nööö!","All Data is Loaded 🎉":"Alle Daten geladen 🎉","Quick filter":"Schnellfilter",TYPE:"TYP",LINKED:"VERLINKT","NO TAGS":"KEINE TAGS","HAS LINKS":"HAT LINKS","HAS IMAGES":"HAT BILDER",INCLUDE:"EINSCHLIESSEN",EXCLUDE:"AUSSCHLIESSEN",TEXT:"TEXT",IS:"IST",AND:"UND",OR:"ODER",LIST:"LISTE",ISNOT:"IST NICHT",PATH:"PFAD",METADATA:"METADATEN",SELECT:"AUSWÄHLEN","ADD FILTER TERMS":"FILTERKRITERIEN HINZUFÜGEN",FILTER:"FILTER",Filter:"Filter",TITLE:"TITEL","CREATE QUERY":"ABFRAGE ERSTELLEN","EDIT QUERY":"ABFRAGE BEARBEITEN",MATCH:"ÜBEREINSTIMMUNG",TIMES:"ZEITEN","Share Memo Image":"Thino-Bild teilen","↗Click the button to save":"↗Klicke den Button zum Speichern","Image is generating...":"Bild wird generiert...","Image is loading...":"Bild wird geladen...","Loading...":"Lädt...","😟 Cannot load image, image link maybe broken":"😟 Bild kann nicht geladen werden, Link ist möglicherweise defekt","Daily Memos":"Tägliche Thinos","CANCEL EDIT":"BEARBEITUNG ABBRECHEN","LINK TO THE":"LINK ZUM","Mobile Options":"Mobile Optionen","Experimental Options":"Experimentelle Optionen","Don't support web image yet, please input image path in vault":"Webbilder werden noch nicht unterstützt, bitte Bildpfad im Vault eingeben","Background Image in Dark Theme":"Hintergrundbild im dunklen Theme","Background Image in Light Theme":"Hintergrundbild im hellen Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Setze Hintergrundbild im dunklen Theme. Setze etwas wie "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Setze Hintergrundbild im hellen Theme. Setze etwas wie "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Setze Standard-Thino-Zusammensetzung, verwende {TIME} als "HH:mm" und {CONTENT} als Inhalt. "{TIME} {CONTENT}" als Standard',"Default Memo Composition":"[Veraltet] Standard-Thino-Zusammensetzung","Show Tasks Label":"Aufgaben-Label anzeigen","Show tasks label near the time text. False by default":"Aufgaben-Label neben dem Zeittext anzeigen. Standardmäßig deaktiviert","Please Open Memos First":"Bitte öffne zuerst Thino",DATE:"DATUM",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NICHT_AKTIVIERT",BEFORE:"VOR",AFTER:"NACH","Allow Comments On Memos":"Kommentare für Thinos erlauben","You can comment on memos. False by default":"Du kannst Thinos kommentieren. Standardmäßig deaktiviert",Import:"Importieren","TITLE CANNOT BE NULL!":"TITEL DARF NICHT LEER SEIN!","FILTER CANNOT BE NULL!":"FILTER DARF NICHT LEER SEIN!","Comments In Original DailyNotes/Notes":"Kommentare in Original-Tagesnotizen/Notizen","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Du solltest das Dataview Plugin Ver. 0.5.9 oder höher installieren, um diese Funktion zu nutzen.","Open Memos Successfully":"Thino erfolgreich geöffnet","Fetch Memos Error":"😭 Fehler beim Laden","Copied to clipboard Successfully":"Erfolgreich in die Zwischenablage kopiert","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Prüfe, ob du das Daily Notes Plugin oder Periodic Notes Plugin geöffnet hast","Please finish the last filter setting first":"Bitte beende zuerst die letzte Filtereinstellung","Close Memos Successfully":"Thino erfolgreich geschlossen","Insert as Memo":"Als Thino einfügen","Insert file as memo content":"Datei als Thino-Inhalt einfügen","Image load failed":"Bildladung fehlgeschlagen","Content cannot be empty":"Inhalt darf nicht leer sein","Unable to create new file.":"Neue Datei konnte nicht erstellt werden.","Failed to fetch deleted memos: ":"Fehler beim Laden gelöschter Thinos: ","RESTORE SUCCEED":"WIEDERHERSTELLUNG ERFOLGREICH","DELETE SUCCEED":"LÖSCHEN ERFOLGREICH","Save Memo button icon":"Thino-Speichern-Button-Symbol","The icon shown on the save Memo button in the UI.":"Das Symbol auf dem Thino-Speichern-Button in der Benutzeroberfläche.","Fetch Memos From Particular Notes":"Thinos aus bestimmten Notizen laden",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Du kannst jede Dataview-Abfrage für Thinos setzen. Alle Thinos in diesen Notizen werden in der Liste angezeigt. "#memo" als Standard',"Allow Memos to Fetch Memo from Notes":"Thino erlauben, Thinos aus Notizen zu laden","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Verwende Thino, um alle Thinos in deinen Notizen zu verwalten, nicht nur in Tagesnotizen. Standardmäßig deaktiviert","Always Show Memo Comments":"Thino-Kommentare immer anzeigen","Always show memo comments on memos. False by default":"Thino-Kommentare immer bei Thinos anzeigen. Standardmäßig deaktiviert","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Du hast keinen Ordner für Tagesnotizen in beiden Plugins (periodic-notes und daily-notes) festgelegt.","Please check your daily note plugin OR periodic notes plugin settings":"Bitte überprüfe deine Einstellungen für das Daily Note Plugin ODER Periodic Notes Plugin","Use which plugin's default configuration":"Welche Plugin-Standardkonfiguration verwenden","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino verwendet die Plugin-Standardkonfiguration zum Laden von Thinos aus Tagesnotizen, 'Daily' als Standard.",Daily:"Täglich","Always Show Leaf Sidebar on PC":"Seitenleiste auf PC immer anzeigen","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Linke Seitenleiste auf PC/Tablet auch bei einer Blattbreite unter 875px anzeigen. Standardmäßig deaktiviert.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"Du hast kein Format für Tagesnotizen in beiden Plugins (periodic-notes und daily-notes) festgelegt.","fetch more":"mehr laden","Search all settings":"Alle Einstellungen durchsuchen",General:"Allgemein",Theme:"Theme",Share:"Teilen",Advanced:"Erweitert",Thino:"Thino","Random Review":"Zufällige Überprüfung","ARCHIVED AT":"ARCHIVIERT AM","Failed to get memos from daily notes":"Fehler beim Laden von Thinos aus Tagesnotizen","Failed to delete memo":"Fehler beim Löschen des Thinos","CTRL + ENTER to save":"STRG + ENTER zum Speichern","Started from":"Gestartet von","Custom Background Image":"Benutzerdefiniertes Hintergrundbild","Set custom background image.":"Benutzerdefiniertes Hintergrundbild festlegen.","Custom Memo Footer":"Benutzerdefinierte Thino-Fußzeile","Set custom memo footer.":"Benutzerdefinierte Thino-Fußzeile festlegen.","Heatmap Color Scheme":"Heatmap-Farbschema","Set different color scheme for heatmap.":"Verschiedene Farbschemata für die Heatmap festlegen.","Enable Local Http Server":"Lokalen HTTP-Server aktivieren","Memos Http Server Port":"Thino HTTP-Server-Port","Set memos http server port to listen. '43999' by default":"Port für den Thino HTTP-Server festlegen. '43999' als Standard","Default Editor Mode":"Standard-Editor-Modus","Live-Preview Mode OR Source Mode.":"Live-Vorschau-Modus ODER Quelltext-Modus.","Save type for Thino":"Speichertyp für Thino",DAILY:"TÄGLICH",MULTI:"MEHRFACH",CANVAS:"LEINWAND",ALL:"ALLE",FILE:"DATEI",TODO:"TODO",DONE:"ERLEDIGT",JOURNAL:"JOURNAL",OTHER:"ANDERE","Failed to create daily note, check if it exists.":"Fehler beim Erstellen der Tagesnotiz, prüfe ob sie existiert.","Failed to create daily note. Please check if you created a folder for daily notes.":"Fehler beim Erstellen der Tagesnotiz. Bitte prüfe, ob du einen Ordner für Tagesnotizen erstellt hast.","After you verify your account, please refresh this page.":"Nach der Verifizierung deines Kontos aktualisiere bitte diese Seite.",Verify:"Verifizieren","Oops! You forget to verify insider account":"Ups! Du hast vergessen, das Insider-Konto zu verifizieren","If you have any questions, please contact us.":"Bei Fragen kontaktiere uns bitte.","Delete Thino Directly":"Thino direkt löschen","When delete thino directly, it will not be moved to trash. False by default.":"Wenn Thino direkt gelöscht wird, wird es nicht in den Papierkorb verschoben. Standardmäßig deaktiviert.","Enable opening thino globally":"Globales Öffnen von Thino aktivieren","Enable opening thino globally. False by default.":"Globales Öffnen von Thino aktivieren. Standardmäßig deaktiviert.","Key for opening thino globally":"Tastenkombination für globales Öffnen von Thino","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Tastenkombination für globales Öffnen von Thino festlegen. STRG + SHIFT + T als Standard.","Key for showing thino globally":"Tastenkombination für globales Anzeigen von Thino","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Tastenkombination für globales Anzeigen von Thino festlegen. STRG + SHIFT + E als Standard.","Get activation code":"Aktivierungscode erhalten","Input activation code here":"Aktivierungscode hier eingeben","Copy Thino id":"Thino-ID kopieren","Activate Pro Version":"Pro-Version aktivieren","Please copy Thino id first":"Bitte kopiere zuerst die Thino-ID",'You can set folder name with file name like "folder/file"':'Du kannst den Ordnernamen mit Dateinamen wie "ordner/datei" festlegen','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Du kannst Ordnernamen wie "ordner1/ordner2/ordner3" festlegen, um Unterordner zu erstellen',"Default save type":"Standard-Speicherort",'Set the default save type for thino. "DAILY" by default':'Standard-Speichertyp für Thino festlegen. "DAILY" als Standard',"Sync Thino via PKMer":"Thino über PKMer synchronisieren",Unlink:"Verknüpfung aufheben",Link:"Verknüpfen","Connect to PKMer Sync, you can check it in ":"Mit PKMer Sync verbinden, du kannst es überprüfen in ","PKMer Sync":"PKMer Sync","Remove successfully":"Erfolgreich entfernt",Deactivate:"Deaktivieren",Remove:"Entfernen","Confirm?":"Bestätigen?","Sync Status":"Synchronisierungsstatus","Start or stop sync":"Synchronisierung starten oder stoppen","Stop sync successfully":"Synchronisierung erfolgreich gestoppt","Start sync successfully":"Synchronisierung erfolgreich gestartet",Stop:"Stopp",Start:"Start","Show thino near mouse":"Thino in Mausnähe anzeigen","Query not found":"Abfrage nicht gefunden","Send to clipboard successfully":"Erfolgreich in die Zwischenablage kopiert","Thino - Failed to start HTTP server, please check the port is available.":"Thino - HTTP-Server konnte nicht gestartet werden, bitte prüfe ob der Port verfügbar ist.","Thino - Started HTTP server on port":"Thino - HTTP-Server gestartet auf Port","Thino - Terminated HTTP server":"Thino - HTTP-Server beendet","File not exist":"Datei existiert nicht","Thino not found":"Thino nicht gefunden","File not found for the given thino path, is creating a new file":"Datei für den angegebenen Thino-Pfad nicht gefunden, erstelle neue Datei","Saved sync token successfully":"Sync-Token erfolgreich gespeichert","Failed to find daily notes folder":"Tagesnotizen-Ordner konnte nicht gefunden werden","Please install obsidian-hover-editor plugin first":"Bitte installiere zuerst das obsidian-hover-editor Plugin","Copied app id successfully":"App-ID erfolgreich kopiert","Please input token first":"Bitte gib zuerst den Token ein","Please enable sync first":"Bitte aktiviere zuerst die Synchronisierung","Init Failed":"Initialisierung fehlgeschlagen","Verify successfully":"Erfolgreich verifiziert","Failed to verify":"Verifizierung fehlgeschlagen","Folder not found for the given thino path, is creating a new folder":"Ordner für den angegebenen Thino-Pfad nicht gefunden, erstelle neuen Ordner","File not found for the given thino path":"Datei für den angegebenen Thino-Pfad nicht gefunden","Failed to read current daily note, check if it exists.":"Aktuelle Tagesnotiz konnte nicht gelesen werden, prüfe ob sie existiert.","Failed to save":"Speichern fehlgeschlagen","Failed to login, please login again":"Anmeldung fehlgeschlagen, bitte erneut anmelden","COPY FAILED":"KOPIEREN FEHLGESCHLAGEN","COPY SUCCEED":"KOPIEREN ERFOLGREICH","Copy selected text":"Ausgewählten Text kopieren","Copy thino":"Thino kopieren",COPY:"KOPIEREN","This is a pro feature, please upgrade to pro version to use it.":"Dies ist eine Pro-Funktion, bitte upgrade auf die Pro-Version um sie zu nutzen.","You can get pro version from: ":"Du kannst die Pro-Version hier erhalten: ",Save:"Speichern",Cancel:"Abbrechen","Thino Daily Target":"Thino Tagesziel",Input:"Eingabe","#Tag":"#Tag","to create tag":"um Tag zu erstellen","You have verified your account. Congrats!":"Du hast dein Konto verifiziert. Glückwunsch!","Pro features":"Pro-Funktionen","Target Thino Count":"Ziel-Thino-Anzahl",on:"am","Switch waterfall view":"Zur Wasserfall-Ansicht wechseln","Switch view":"Ansicht wechseln","Switch list view":"Zur Listen-Ansicht wechseln","Set daily target":"Tagesziel festlegen","Thino Save To: ":"Thino speichern unter: ","Enter fullscreen mode":"Vollbildmodus aktivieren","Exit fullscreen mode":"Vollbildmodus verlassen",words:"Wörter",word:"Wort","Return To Home Page":"Zur Startseite zurückkehren","No thinos to review!":"Keine Thinos zum Überprüfen!","Thinos to review":"Thinos zum Überprüfen","Start Review":"Überprüfen starten",Hard:"Schwer",Good:"Gut",Easy:"Leicht",Again:"Wiederholen","Clear all review data":"Alle Überprüfungsdaten löschen","Daily Progress":"Täglicher Fortschritt","Show stats":"Stats anzeigen","Hide stats":"Stats ausblenden",Remaining:"Verbleibend","Total Reviews":"Gesamte Überprüfungen","Today, you have reviewed all your thinos!":"Heute hast du alle deine Thinos überprüft!","Daily review limit reached! Come back tomorrow.":"Tägliche Überprüfungslimit erreicht! Komm morgen wieder.","Open thino in center window":"Thino im zentralen Fenster öffnen","Open thino in float window":"Thino im schwebenden Fenster öffnen","Open thino in right sidebar":"Thino in der rechten Seitenleiste öffnen","Open thino in left sidebar":"Thino in der linken Seitenleiste öffnen","Show thino editor":"Thino-Editor anzeigen","Toggle minimal mode":"Minimalen Modus umschalten","Focus on thino editor":"Fokus auf Thino-Editor","ReSync web thinos to local":"Web-Thinos mit lokalen synchronisieren","Sync local thinos to web":"Lokale Thinos mit Web synchronisieren","Show daily thino":"Tägliches Thino anzeigen","Focus on search bar":"Fokus auf Suchleiste","Show-thino in popover(Hover editor)":"Thino in Popover anzeigen (Hover-Editor)","Center window":"Zentrales Fenster","Float window":"Schwebendes Fenster","Right sidebar":"Rechte Seitenleiste","Left sidebar":"Linke Seitenleiste","Save thino type when sync local":"Thino-Typ beim lokalen Synchronisieren speichern","Set the default save thino type when sync local, FILE by default.":"Standardtyp zum Speichern von Thino beim lokalen Synchronisieren festlegen, standardmäßig DATEI.","Sync service":"Synchronisierungsdienst","Pro verification status":"Pro-Verifizierungsstatus","Live-preview":"Live-Vorschau",Source:"Quelle","Global copy":"Globales Kopieren","Set the folder name":"Ordnernamen festlegen","Set the filename":"Dateinamen festlegen","Set the filename for current location file":"Dateinamen für aktuelle Ortsdatei festlegen","Switch calendar type":"Kalendertyp wechseln",alphabetical:"alphabetisch",alphabeticalReverse:"alphabetisch rückwärts",byCount:"nach Anzahl",byCountReverse:"nach Anzahl rückwärts","Type here":"Hier tippen",Today:"Heute",Yesterday:"Gestern","Last 7 days":"Letzte 7 Tage","Last 30 days":"Letzte 30 Tage","Last 90 days":"Letzte 90 Tage","Last 180 days":"Letzte 180 Tage","Last 365 days":"Letzte 365 Tage",Found:"Gefunden","Copy filtered thinos":"Gefilterte Thinos kopieren","Bulk delete":"Massenweise löschen","Bulk archive":"Massenweise archivieren","Bulk tag operation":"Massenhafte Tag-Operation","Bulk restore":"Massenweise wiederherstellen","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Wenn du das tägliche Notizen-Plugin deaktivierst, könnte es sein, dass das Thino nicht richtig gelöscht oder aktualisiert wird. Bitte aktiviere das Plugin und versuche es erneut.",Preview:"Vorschau","Set and save":"Festlegen und speichern","Show day mark in thino list":"Tagesmarkierung in Thino-Liste anzeigen","Show day mark on the top of daily range thino. False by default.":"Tagesmarkierung oben auf dem täglichen Bereichs-Thino anzeigen. Standardmäßig deaktiviert.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Klicken zum Erweitern oder Falten, Cmd+Klick um alle Thinos des Tages anzuzeigen","You can buy a license from":"Du kannst eine Lizenz kaufen von","No thinos in range":"Keine Thinos im Bereich",Month:"Monat",Week:"Woche",Day:"Tag",Agenda:"Agenda",Tomorrow:"Morgen",Previous:"Vorherige",Next:"Nächste","Search all columns...":"Alle Spalten durchsuchen...","Basic Info":"Grundinformationen","Additional Info":"Zusätzliche Informationen","Created At":"Erstellt am",Content:"Inhalt","Thino Type":"Thino-Typ","Source Type":"Quelltyp","Row status":"Zeilenstatus",Path:"Pfad","Pinned Status":"Angeheftet-Status",Table:"Tabelle",Chat:"Chat",Moments:"Momente",Waterfall:"Wasserfall",Calendar:"Kalender","Go to page":"Zur Seite gehen",Page:"Seite",Show:"Zeigen",rows:"Zeilen","Temp Filter":"Temporärer Filter","Open link directly in Thino view":"Link direkt in Thino-Ansicht öffnen","Day mark range":"Tagesmarkierungsbereich","Set the range of day mark. Day by default.":"Bereich der Tagesmarkierung festlegen. Standardmäßig Tag.","Thino is locked":"Thino ist gesperrt","Please unlock Thino by input password":"Bitte entsperre Thino durch Eingabe des Passworts","Auto Download Image":"Automatischer Bilddownload","Auto download image when save to thino. 'false' by default":"Automatischer Bilddownload beim Speichern in Thino. Standardmäßig 'false'","Thino Http IP Type":"Thino Http IP-Typ","Set Thino http server ip to listen. 'localhost' by default":"Thino-HTTP-Server-IP zum Abhören festlegen. Standardmäßig 'localhost'","Password to lock Thino":"Passwort zum Sperren von Thino",Unlock:"Entsperren",Locked:"Gesperrt","Password is incorrect":"Passwort ist falsch",Lock:"Sperren","Need password to unlock Thino":"Passwort zum Entsperren von Thino erforderlich","You have not set a password or enable this feature yet":"Du hast noch kein Passwort festgelegt oder diese Funktion aktiviert",Password:"Passwort","Password for Thino":"Passwort für Thino","Please input your password to change password settings":"Bitte gib dein Passwort ein, um die Passworteinstellungen zu ändern","Please input your password":"Bitte gib dein Passwort ein","Lock thino":"Thino sperren",date:"Datum",time:"Zeit",event:"Ereignis","Add tag position":"Tag-Position hinzufügen","Set the position of the tag when adding tag automatically":"Position des Tags festlegen, wenn Tags automatisch hinzugefügt werden","Add tag automatically":"Tag automatisch hinzufügen","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Tag am Ende oder Anfang des Thino-Inhalts hinzufügen, wenn ein Thino erstellt und Tags gefiltert werden","Add tag with new line":"Tag mit neuer Zeile hinzufügen","Add tag with new line when adding tag automatically":"Tag mit neuer Zeile hinzufügen, wenn Tags automatisch hinzugefügt werden","Input to select more tags":"Eingabe, um weitere Tags auszuwählen","Tag Bulk Edit":"Tag-Massenbearbeitung","Tag Bulk Select":"Tag-Massenauswahl","Exist Tags":"Vorhandene Tags","Selected Tags":"Ausgewählte Tags","Click to remove exist tag":"Klicken, um vorhandenes Tag zu entfernen","Click to remove selected tag":"Klicken, um ausgewähltes Tag zu entfernen","Select tags":"Tags auswählen","Input to select exist tag":"Eingabe, um vorhandenes Tag auszuwählen",Beginning:"Anfang",End:"Ende","Set the heading for saving thino":"Überschrift zum Speichern von Thino festlegen","# Heading":"# Überschrift","Chat view style":"Chat-Ansichtsstil","Set the style of chat view":"Stil der Chat-Ansicht festlegen","Background image for moments view":"Hintergrundbild für Momente-Ansicht","Set the background image for moments view":"Hintergrundbild für Momente-Ansicht festlegen","Icon for moments/chat view/share image":"Symbol für Momente/Chat-Ansicht/Freigabebild","Set the icon for moments/chat view/share image":"Symbol für Momente/Chat-Ansicht/Freigabebild festlegen","Quote for moments view/share image":"Zitat für Momente-Ansicht/Freigabebild","Set the quote for moments view/share image":"Zitat für Momente-Ansicht/Freigabebild festlegen","Theme for Thino":"Thema für Thino","Set the theme for Thino":"Thema für Thino festlegen","Interface Details":"Schnittstellendetails","Task amount":"Aufgabenmenge","Thino status":"Thino-Status","Used tags":"Verwendete Tags","Used days":"Verwendete Tage","Most active day":"Aktivster Tag","Most active hour":"Aktivste Stunde","Thino amount":"Thino-Menge","No content to generate.":"Kein Inhalt zum Generieren.","Image generated successfully.":"Bild erfolgreich generiert.","Failed to generate image.":"Fehler beim Generieren des Bildes.","Share filtered thinos as image":"Gefilterte Thinos als Bild teilen","Latest version":"Neueste Version","Previous version":"Vorherige Version","Thino update info":"Thino-Update-Info","Debug info copied to clipboard":"Debug-Informationen in die Zwischenablage kopiert","Copy debug info":"Debug-Informationen kopieren","Failed to load changelog":"Fehler beim Laden des Changelogs","View online":"Online ansehen",ChangeLog:"Änderungsprotokoll","Please open thino first":"Bitte öffne zuerst Thino","Insert editor":"Editor einfügen","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Bitte lege unterschiedliche Speicherorte für Mehrfachdatei-Einstellungen in Thino fest. Der Tagebuchordner überschneidet sich mit dem Mehrfachdatei-Speicherort, oder es besteht die Gefahr, dass er wiederholt gelesen wird.","Default time prefix for thino in daily notes":"Standard-Zeitpräfix für Thino in täglichen Notizen","Set default time prefix for thino in daily notes.":"Standard-Zeitpräfix für Thino in täglichen Notizen festlegen.","Save image successfully":"Bild erfolgreich gespeichert","User quote":"Benutzerzitat","Set user quote for thino":"Benutzerzitat für Thino festlegen","User icon":"Benutzersymbol","Set user icon for thino. You can input http/https link or file path in vault.":"Benutzersymbol für Thino festlegen. Du kannst einen http/https-Link oder Dateipfad im Tresor eingeben.","User info":"Benutzerinfo","Copy filtered results":"Gefilterte Ergebnisse kopieren","Share image":"Bild teilen",Default:"Standard",Gray:"Grau",Grass:"Gras",Flame:"Flamme",Olive:"Olive",Ice:"Eis",Magenta:"Magenta","Daily notes":"Tägliche Notizen",Editor:"Editor","Append/prepend text when share to Thino":"Text anhängen/voranstellen beim Teilen zu Thino","Append text when share to Thino":"Text anhängen beim Teilen zu Thino","Prepend text when share to Thino":"Text voranstellen beim Teilen zu Thino","Add newline when append/prepend text":"Neue Zeile hinzufügen beim Anhängen/Voranstellen von Text","Input anything here":"Hier etwas eingeben",Prepend:"Voranstellen",Append:"Anhängen",Both:"Beides",None:"Keines","Hide pinned group":"Angeheftete Gruppe ausblenden","Hide pinned group in thino list. False by default.":"Angeheftete Gruppe in Thino-Liste ausblenden. Standardmäßig deaktiviert.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Überschrift für den Aufgabentyp von Thino festlegen. Standardmäßig wird der aufgezeichnete Thino-Inhalt am Ende des Tagebuchs eingefügt; wenn ein Titel angegeben wird, werden alle aufgezeichneten Thino-Inhalte einheitlich unter diesem Titel kategorisiert.","Different insert target for different type":"Unterschiedliches Einfügeziel für verschiedene Typen","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Aktiviere dies, um unterschiedliche Einfügeziele für verschiedene Thino-Typen festzulegen, wie Aufgaben- oder Listentyp von Thino","You can set whole diary or only part of it":"Du kannst das gesamte Tagebuch oder nur einen Teil davon festlegen","Set process target":"Verarbeitungsziel festlegen",Custom:"Benutzerdefiniert","Whole diary":"Gesamtes Tagebuch","Set thino insert place":"Thino-Einfügeort festlegen","Set where to insert thino content":"Festlegen, wo Thino-Inhalt eingefügt werden soll","End of the diary":"Ende des Tagebuchs","Custom location":"Benutzerdefinierter Ort","Setting guide":"Einstellungsanleitung","Details settings":"Detaileinstellungen","Start Thino":"Thino starten","About Thino Pro":"Über Thino Pro",Enabled:"Aktiviert",Enable:"Aktivieren","Daily notes folder":"Ordner für tägliche Notizen","Set daily notes folder":"Ordner für tägliche Notizen festlegen","Daily note name format":"Namensformat für tägliche Notizen","Set daily note name format":"Namensformat für tägliche Notizen festlegen","Daily note plugin":"Plugin für tägliche Notizen","Enable daily note plugin":"Plugin für tägliche Notizen aktivieren",Selected:"Ausgewählt",Select:"Auswählen","A classic theme for Thino with a two-column layout":"Ein klassisches Thema für Thino mit zweispaltigem Layout",Classic:"Klassisch","A modern theme for Thino with a three-column layout and some unique features.":"Ein modernes Thema für Thino mit dreispaltigem Layout und einigen einzigartigen Funktionen.",Modern:"Modern","Go and enjoy Thino":"Los geht's, viel Spaß mit Thino","Congrats! All settings done":"Glückwunsch! Alle Einstellungen abgeschlossen","Adjust settings that influence your user experience with Thino.":"Passe Einstellungen an, die deine Benutzererfahrung mit Thino beeinflussen.","Set preferences for using Thino":"Präferenzen für die Verwendung von Thino festlegen","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Wenn du die Thino-Basisversion verwendest, ist die Aktivierung des Plugins für tägliche Notizen erforderlich. Konfiguriere seine Einstellungen, um effektiv damit zu arbeiten.","Go with daily note plugin":"Mit Plugin für tägliche Notizen fortfahren","Choose a theme for Thino.":"Wähle ein Thema für Thino.","Set theme for Thino":"Thema für Thino festlegen","Set up your user info for Thino.":"Richte deine Benutzerinformationen für Thino ein.","Get started with Thino":"Erste Schritte mit Thino","Skip and start Thino":"Überspringen und Thino starten","Next step":"Nächster Schritt","Back to previous step":"Zurück zum vorherigen Schritt","Click to enable =>":"Klicken zum Aktivieren =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Dies ist Thinos Seitenleiste. Navigiere zu verschiedenen Pfaden oder wähle Abfragefilter.","Click here and go to settings page.":"Klicke hier und gehe zur Einstellungsseite.","Click here and go to different path.":"Klicke hier und gehe zu einem anderen Pfad.","Select or create query filter here.":"Wähle oder erstelle hier Abfragefilter.","See the status of Thinos here.":"Siehe hier den Status von Thinos.","Search your thino quickly here.":"Suche dein Thino schnell hier.","Edit or create your thino here.":"Bearbeite oder erstelle dein Thino hier.","See your thinos here.":"Siehe deine Thinos hier.","See your time status of thinos here.":"Siehe hier deinen Zeitstatus von Thinos.","See your tags here. Tags will be shown when thino contains tags.":"Siehe deine Tags hier. Tags werden angezeigt, wenn Thino Tags enthält.",Done:"Fertig","Thino is ready to use. ":"Thino ist einsatzbereit. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Du kannst Thino jetzt verwenden. Wenn du mehr über Thino Pro erfahren möchtest, klicke auf die Schaltfläche unten.","Default time prefix":"Standard-Zeitpräfix","Append Text Action":"Text-Anhänge-Aktion","Prepend Text Action":"Text-Voranstell-Aktion",Preset:"Voreinstellung","Select Tags":"Tags auswählen","It is not available on small view":"Es ist nicht verfügbar in der kleinen Ansicht","Append text":"Text anhängen","Prepend text":"Text voranstellen","Your daily note folder is not set correctly, please check your settings":"Dein Ordner für tägliche Notizen ist nicht korrekt eingestellt, bitte überprüfe deine Einstellungen","Default sharing style":"Standard-Freigabestil","Set the default style for sharing thino, 'Modern' by default.":'Lege den Standardstil für die Freigabe von Thino fest, standardmäßig "Modern".',Clean:"Sauber",Minimal:"Minimal",Gradient:"Farbverlauf","Thino share":"Thino-Freigabe","Copy to clipboard failed":"Kopieren in die Zwischenablage fehlgeschlagen","Copy to clipboard successfully":"Erfolgreich in die Zwischenablage kopiert","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Dein Inhalt wurde in die Zwischenablage kopiert und in den Editor eingefügt. Bitte versuche es erneut","Share thino":"Thino teilen","Set file name after create thino":"Dateinamen nach Erstellung von Thino festlegen","You can set file name after create thino. A input box will show when you create thino.":"Du kannst den Dateinamen nach der Erstellung von Thino festlegen. Ein Eingabefeld wird angezeigt, wenn du Thino erstellst.",SPLIT:"TEILEN","Split by Heading 1":"Nach Überschrift 1 teilen","Split by Heading 2":"Nach Überschrift 2 teilen","Split by Heading 3":"Nach Überschrift 3 teilen","Insert task":"Aufgabe einfügen","All settings have been reset to default.":"Alle Einstellungen wurden auf die Standardwerte zurückgesetzt.","Reset all Thino settings":"Alle Thino-Einstellungen zurücksetzen","Reset settings":"Einstellungen zurücksetzen","Reset Thino settings to default settings.":"Thino-Einstellungen auf Standardeinstellungen zurücksetzen.","Task Management":"Aufgabenverwaltung","Append completed date when task done in thino":"Abschlussdatum anhängen, wenn Aufgabe in Thino erledigt ist","Append completed date when task done in thino. False by default":"Abschlussdatum anhängen, wenn Aufgabe in Thino erledigt ist. Standardmäßig deaktiviert","Set tag for single file that Thino indexes":"Tag für einzelne Datei festlegen, die Thino indiziert","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Wenn du hier ein Tag festlegst, wird Thino diese Datei indizieren, die dieses Tag enthält, und es in der Liste anzeigen. Du musst kein `#` hinzufügen.","Set tag for file type file":"Tag für Dateityp-Datei festlegen","Set tag for multi type file":"Tag für Mehrfachtyp-Datei festlegen","Please input the tag":"Bitte gib das Tag ein","Merge thinos in to thino share image":"Thinos in Thino-Freigabebild zusammenführen","Custom height for Thino content":"Benutzerdefinierte Höhe für Thino-Inhalt","Set custom height for Thino content. Like 200px or 20rem":"Benutzerdefinierte Höhe für Thino-Inhalt festlegen. Wie 200px oder 20rem","Input height":"Höhe eingeben","Submit issue":"Problem melden","Current version":"Aktuelle Version","Bug report":"Fehlerbericht","Click the button to copy debug info and open the issue page":"Klicke auf die Schaltfläche, um Debug-Informationen zu kopieren und die Problemseite zu öffnen","Copy and go":"Kopieren und los","Debug info copied":"Debug-Informationen kopiert","Feature request":"Funktionsanfrage","Submit your feature request to the issue page":"Reiche deine Funktionsanfrage auf der Problemseite ein",Go:"Los","Toggle query list visibility":"Abfragelistensichtbarkeit umschalten","Toggle tags visibility":"Tag-Sichtbarkeit umschalten","Toggle sidebar visibility":"Seitenleistensichtbarkeit umschalten",Collapse:"Einklappen",Expand:"Ausklappen","Max height for collapse":"Maximale Höhe für Einklappen","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Die maximale Höhe für Thino-Einklappen, wenn auf 0 gesetzt, würde Thino nicht einklappen. Standardmäßig 0. (Dies ist keine Zeilenanzahl, sondern die Höhe in px.)","Render content":"Inhalt rendern","Optimize for Callout":"Für Callout optimieren","Won't render content contains more than 3 callouts automatically. True by default":"Rendert Inhalte mit mehr als 3 Callouts nicht automatisch. Standardmäßig aktiviert","The value should be greater than":"Der Wert sollte größer sein als","Append Text":"Text anhängen","Prepend Text":"Text voranstellen","Thino height when collapsed":"Thino-Höhe im eingeklappten Zustand","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Die Höhe für Thino im eingeklappten Zustand, wenn auf 0 gesetzt, würde Thino nicht einklappen. Standardmäßig 100. (Dies ist keine Zeilenanzahl, sondern die Höhe in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Diese Option ermöglicht es dir, andere Ansichten zu verwenden, wenn die Blattbreite nicht ausreicht. Standardmäßig deaktiviert.","Can select other views when leaf width is not enough":"Kann andere Ansichten auswählen, wenn Blattbreite nicht ausreicht","TRASH BOX":"PAPIERKORB","Wait templater to finish parse before insert thino":"Warte, bis Templater das Parsen beendet hat, bevor Thino eingefügt wird","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Diese Option ermöglicht es dir, zu warten, bis Templater das Parsen beendet hat, bevor Thino eingefügt wird, was dazu führen kann, dass du zwischen dem Einfügen von Thino zweimal bestätigen musst. Standardmäßig deaktiviert.","Get thino capture extension":"Thino-Erfassungserweiterung holen","You can capture idea/text from chrome now.":"Du kannst jetzt Ideen/Text aus Chrome erfassen.","Open File":"Datei öffnen","Exported CSV file":"Exportierte CSV-Datei","Updated At":"Aktualisiert am","Export to CSV":"Nach CSV exportieren","Quick add button on mobile navbar":"Schnellhinzufügen-Schaltfläche in der mobilen Navigationsleiste","Always show status text":"Statustext immer anzeigen","Support filter by metadata from file":"Filterung nach Metadaten aus Datei unterstützen","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Wenn du dies aktivierst, kannst du über Metadaten aus der Datei filtern, wie z.B. Tags in der Datei. Thinos aus Canvas werden jedoch nicht unterstützt. Standardmäßig deaktiviert.","Show source near timestamp in thino":"Quelle neben Zeitstempel in Thino anzeigen","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Wenn du dies aktivierst, kannst du die Quelle neben dem Zeitstempel in Thino sehen. Du kannst den Titel in den Metadaten festlegen, um dies zu überschreiben. Standardmäßig deaktiviert.","Show Update Message":"Aktualisierungsnachricht anzeigen","Show update message when Thino is updated. True by default":"Aktualisierungsnachricht anzeigen, wenn Thino aktualisiert wird. Standardmäßig aktiviert","Sync manually":"Manuell synchronisieren","Show all scrollbars":"Alle Scrollbalken anzeigen","TIME RANGE":"ZEITRAUM",WITHIN:"INNERHALB","7 days":"7 Tage","14 days":"14 Tage","30 days":"30 Tage","3 months":"3 Monate","6 months":"6 Monate","1 year":"1 Jahr","This week":"Diese Woche","Last week":"Letzte Woche","This month":"Dieser Monat","Last month":"Letzter Monat","This year":"Dieses Jahr","Last year":"Letztes Jahr","No history":"Keine Historie","Today Remaining":"Heute verbleibend","Today Total":"Heute gesamt","Historical Statistics":"Historische Statistiken",byTime:"Nach Zeit",byTimeReverse:"Nach Zeit (umgekehrt)",Stat:"Statistik",Statistics:"Statistiken","Daily Thino Count":"Tägliche Thino-Anzahl",Total:"Gesamt",thinos:"Thinos","Thino Types":"Thino-Typen","Distribution of thino types":"Verteilung der Thino-Typen","Thino Status":"Thino-Status","Distribution of thino status":"Verteilung des Thino-Status","Popular Tags":"Beliebte Tags","Top 10 most used tags":"Top 10 der meistverwendeten Tags","Thino Count":"Thino-Anzahl","Hourly distribution":"Stündliche Verteilung","Current month":"Aktueller Monat","Monthly distribution":"Monatliche Verteilung","30 Days":"Letzte 30 Tage",Year:"Jahr","Time Distribution":"Zeitverteilung","When do you write thinos":"Wann schreibst du Thinos","Content Length":"Inhaltslänge","Distribution of thino lengths":"Verteilung der Thino-Längen","Daily Thinos":"Tägliche Thinos","Show Time Distribution":"Zeitverteilung anzeigen","Hide date picker":"Datumsauswahl ausblenden","Show date picker":"Datumsauswahl anzeigen","Clear filter":"Filter löschen","Copy link":"Link kopieren","Copy embed link":"Einbettungslink kopieren","Ctrl/Cmd + Enter to save thino":"Strg/Cmd + Enter zum Speichern des Thinos","Fixed strings for thinos":"Feste Zeichenketten für Thinos","Use fixed strings for thinos":"Feste Zeichenketten für Thinos verwenden","Enable to add fixed strings at the beginning or end of thinos.":"Aktivieren, um feste Zeichenketten am Anfang oder Ende von Thinos hinzuzufügen.","Fixed prefix for thinos":"Festes Präfix für Thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Füge diese Zeichenkette am Anfang jedes Thinos hinzu. Unterstützt Platzhalter wie {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Festes Suffix für Thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Füge diese Zeichenkette am Ende jedes Thinos hinzu. Unterstützt Platzhalter wie {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Wortzahl überschritten","Word count feature":"Wortzählfunktion","Enable real-time word count display in the editor":"Echtzeit-Wortzählanzeige im Editor aktivieren","Maximum word count":"Maximale Wortzahl","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Lege eine maximale Wortzahl für Thino fest. Der Editor zeigt eine Warnung an, wenn diese überschritten wird. Setze auf 0 für unbegrenzt.","No linked thinos found":"Keine verknüpften Thinos gefunden","Reference links group":"Referenzlinks-Gruppe","Enable reference links group in thino.":"Referenzlinks-Gruppe in Thino aktivieren.","No reference links found":"Keine Referenzlinks gefunden","Outgoing Links":"Ausgehende Links","Incoming Links":"Eingehende Links","Error fetching reference links":"Fehler beim Abrufen von Referenzlinks","Double click behavior":"Doppelklick-Verhalten","Set the behavior when double click on a thino.":"Lege das Verhalten fest, wenn du auf ein Thino doppelklickst.","Open thino":"Thino öffnen","Edit thino":"Thino bearbeiten","Go to source":"Zur Quelle gehen","Do nothing":"Nichts tun","Use default header in mobile view":"Standardkopfzeile in der mobilen Ansicht verwenden","Use default header in mobile view of thino rather than custom header.":"Verwende die Standardkopfzeile in der mobilen Ansicht von Thino anstelle einer benutzerdefinierten Kopfzeile."},q9={welcome:"Welcome to Thino",ribbonIconTitle:"Thino",to:"to",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],year:null,month:null,"Basic Options":"Basic options","User name":"User name","Set your user name here. 'Memos 😏' By default":"Set your user name here. 'Thino 😏' By default",'You can set target heading like "# Heading" to control data location':'You can set target heading like "# Heading" to control data location',"Insert after heading":"Insert after heading","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"You should set the same heading below if you want to insert and process thino below the same heading.","Allows admonitions to be created using ":"Allows admonitions to be created using ","Process Memos below":"Process thino below","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.","Save Memo button label":"Save thino button label","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"The text shown on the save Thino button in the UI. 'NOTEIT' by default.","Focus on editor when open memos":"Focus on editor when open thino","Focus on editor when open memos. Focus by default.":"Focus on editor when open thino. Focus by default.","Open daily memos with open memos":"Open daily thino with open thino","Open daily memos with open memos. Open by default.":"Open daily thino with open thino. Open by default.","Open Memos when obsidian opens":"Open Thino when obsidian opens","When enable this, Memos will open when Obsidian opens. False by default.":"When enable this, Thino will open when Obsidian opens. False by default.","Hide done tasks in Memo list":"Hide done tasks in Thino list","Hide all done tasks in Memo list. Show done tasks by default.":"Hide all done tasks in Thino list. Show done tasks by default.","Advanced Options":"Advanced Options","UI language for date":"UI language for date","Translates the date UI language. Only 'en' and 'zh' are available.":"Translates the date UI language. Only 'en' and 'zh' are available.","Default prefix when save thino":"Default prefix when save thino","Set the default prefix when create memo, 'List' by default.":"Set the default prefix when create thino, 'List' by default.","Default insert date format":"Default insert date format","Set the default date format when insert date by @, 'Tasks' by default.":"Set the default date format when insert date by @, 'Tasks' by default.","Default editor position on mobile":"Default editor position on mobile","Set the default editor position on Mobile, 'Top' by default.":"Set the default editor position on Mobile, 'Top' by default.","Use button to show editor on mobile":"Use button to show editor on mobile","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Set a float button to call editor on mobile. Only when editor located at the bottom works.","Show Time When Copy Results":"Show Time When Copy Results","Show time when you copy results, like 12:00. Copy time by default.":"Show time when you copy results, like 12:00. Copy time by default.","Show Date When Copy Results":"Show Date When Copy Results","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Show date when you copy results, like [[2022-01-01]]. Copy date by default.","Add Blank Line Between Different Date":"Add Blank Line Between Different Date","Add blank line when copy result with date. No blank line by default.":"Add blank line when copy result with date. No blank line by default.","Share Options":"Share Options","Share Memos Image Footer Start":"Share Thino Image Footer Start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default","Share Memos Image Footer End":"Share Thino Image Footer End","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default","Save Shared Image To Folder For Mobile":"Save Shared Image To Folder For Mobile","Save image to folder for mobile. False by Default":"Save image to folder for mobile. False by Default","Say Thank You":"Say Thank You",Donate:"Donate","If you like this plugin, consider donating to support continued development:":"If you like this plugin, consider donating to support continued development:","File Name of Recycle Bin":"File Name of Recycle Bin","Set the filename for recycle bin. 'delete' By default":"Set the filename for recycle bin. 'delete' By default","File Name of Query File":"File Name of Query File","Set the filename for query file. 'query' By default":"Set the filename for query file. 'query' By default","Use Tags In Vault":"Use Tags In Vault","Use tags in vault rather than only in Memos. False by default.":"Use tags in vault rather than only in Thino. False by default.","Ready to convert image into background":"Ready to convert image into background",List:"List",Task:"Task",Top:"Top",Bottom:"Bottom",TAG:"TAG",DAY:"DAY",QUERY:"Query",EDIT:"EDIT",PIN:"PIN",UNPIN:"UNPIN",DELETE:"DELETE","CONFIRM!":"CONFIRM!","CREATE FILTER":"CREATE FILTER","Comment it...":"Comment it...",Settings:"Settings","Recycle bin":"Recycle bin","About Me":"About Me","Fetching data...":"Fetching data...","Here is No Memos.":"Here is No Thino.","Frequently Used Tags":"Frequently Used Tags","What do you think now...":"What do you think now...",READ:"READ",MARK:"MARK",SHARE:"SHARE",SOURCE:"SOURCE",RESTORE:"RESTORE",ARCHIVE:"Archive","Daily Review":"Daily Review","DELETE AT":"DELETE AT","Noooop!":"Noooop!","All Data is Loaded 🎉":"All Data is Loaded 🎉","Quick filter":"Quick filter",TYPE:"TYPE",LINKED:"LINKED","NO TAGS":"NO TAGS","HAS LINKS":"HAS LINKS","HAS IMAGES":"HAS IMAGES",INCLUDE:"INCLUDE",EXCLUDE:"EXCLUDE",TEXT:"TEXT",IS:"IS",AND:"AND",OR:"OR",LIST:"LIST",ISNOT:"ISNOT",PATH:"PATH",METADATA:"METADATA",SELECT:"SELECT","ADD FILTER TERMS":"ADD FILTER TERMS",FILTER:"FILTER",Filter:"Filter",TITLE:"TITLE","CREATE QUERY":"CREATE QUERY","EDIT QUERY":"EDIT QUERY",MATCH:"MATCH",TIMES:"TIMES","Share Memo Image":"Share Thino Image","↗Click the button to save":"↗Click the button to save","Image is generating...":"Image is generating...","Image is loading...":"Image is loading...","Loading...":"Loading...","😟 Cannot load image, image link maybe broken":"😟 Cannot load image, image link maybe broken","Daily Memos":"Daily Thino","CANCEL EDIT":"CANCEL EDIT","LINK TO THE":"LINK TO THE","Mobile Options":"Mobile Options","Experimental Options":"Experimental Options","Don't support web image yet, please input image path in vault":"Don't support web image yet, please input image path in vault","Background Image in Dark Theme":"Background Image in Dark Theme","Background Image in Light Theme":"Background Image in Light Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Set background image in dark theme. Set something like "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Set background image in light theme. Set something like "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Set default thino composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default',"Default Memo Composition":"[Deprecated] Default Thino Composition","Show Tasks Label":"Show Tasks Label","Show tasks label near the time text. False by default":"Show tasks label near the time text. False by default","Please Open Memos First":"Please Open Thino First",DATE:"DATE",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"BEFORE",AFTER:"AFTER","Allow Comments On Memos":"Allow Comments On Thino","You can comment on memos. False by default":"You can comment on thino. False by default",Import:"Import","TITLE CANNOT BE NULL!":"TITLE CANNOT BE NULL!","FILTER CANNOT BE NULL!":"FILTER CANNOT BE NULL!","Comments In Original DailyNotes/Notes":"Comments In Original DailyNotes/Notes","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"You should install Dataview Plugin ver 0.5.9 or later to use this feature.","Open Memos Successfully":"Open Thino Successfully","Fetch Memos Error":"😭 Fetch Error","Copied to clipboard Successfully":"Copied to clipboard Successfully","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Check if you opened Daily Notes Plugin Or Periodic Notes Plugin","Please finish the last filter setting first":"Please finish the last filter setting first","Close Memos Successfully":"Close Thino Successfully","Insert as Memo":"Insert as Thino","Insert file as memo content":"Insert file as thino content","Image load failed":"Image load failed","Content cannot be empty":"Content cannot be empty","Unable to create new file.":"Unable to create new file.","Failed to fetch deleted memos: ":"Failed to fetch deleted thino: ","RESTORE SUCCEED":"RESTORE SUCCEED","DELETE SUCCEED":"DELETE SUCCEED","Save Memo button icon":"Save Thino button icon","The icon shown on the save Memo button in the UI.":"The icon shown on the save Thino button in the UI.","Fetch Memos From Particular Notes":"Fetch Thino From Particular Notes",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'You can set any Dataview Query for thino to fetch it. All thino in those notes will show on list. "#memo" by default',"Allow Memos to Fetch Memo from Notes":"Allow Thino to Fetch Thino from Notes","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Use Thino to manage all thino in your notes, not only in daily notes. False by default","Always Show Memo Comments":"Always Show Thino Comments","Always show memo comments on memos. False by default":"Always show thino comments on thino. False by default","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Please check your daily note plugin OR periodic notes plugin settings","Use which plugin's default configuration":"Use which plugin's default configuration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino use the plugin's default configuration to fetch thino from daily, 'Daily' by default.",Daily:"Daily","Always Show Leaf Sidebar on PC":"Always Show Leaf Sidebar on PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set format for daily notes in both periodic-notes and daily-notes plugins.","fetch more":"fetch more","Search all settings":"Search all settings",General:"General",Theme:"Theme",Share:"Share",Advanced:"Advanced",Thino:"Thino","Random Review":"Random Review","ARCHIVED AT":"ARCHIVED AT","Failed to get memos from daily notes":"Failed to get thino from daily notes","Failed to delete memo":"Failed to delete thino","CTRL + ENTER to save":"CTRL + ENTER to save","Started from":"Started from","Custom Background Image":"Custom Background Image","Set custom background image.":"Set custom background image.","Custom Memo Footer":"Custom Thino Footer","Set custom memo footer.":"Set custom thino footer.","Heatmap Color Scheme":"Heatmap Color Scheme","Set different color scheme for heatmap.":"Set different color scheme for heatmap.","Enable Local Http Server":"Enable Local Http Server","Memos Http Server Port":"Thino Http Server Port","Set memos http server port to listen. '43999' by default":"Set thino http server port to listen. '43999' by default","Default Editor Mode":"Default Editor Mode","Live-Preview Mode OR Source Mode.":"Live-Preview Mode/Source Mode.","Save type for Thino":"Save type for Thino",DAILY:"DAILY",MULTI:"MULTI",CANVAS:"CANVAS",ALL:"ALL",FILE:"FILE",TODO:"TODO",DONE:"DONE",JOURNAL:"JOURNAL",OTHER:"OTHER","Failed to create daily note, check if it exists.":"Failed to create daily note, check if it exists.","Failed to create daily note. Please check if you created a folder for daily notes.":"Failed to create daily note. Please check if you created a folder for daily notes.","After you verify your account, please refresh this page.":"After you verify your account, please refresh this page.",Verify:"Verify","Oops! You forget to verify insider account":"Oops! You forget to verify insider account","If you have any questions, please contact us.":"If you have any questions, please contact us.","Delete Thino Directly":"Delete Thino Directly","When delete thino directly, it will not be moved to trash. False by default.":"When delete thino directly, it will not be moved to trash. False by default.","Enable opening thino globally":"Enable opening thino globally","Enable opening thino globally. False by default.":"Enable opening thino globally. False by default.","Key for opening thino globally":"Key for opening thino globally","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Set key for opening thino globally. CTRL + SHIFT + T by default.","Key for showing thino globally":"Key for showing thino globally","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Set key for showing thino globally. CTRL + SHIFT + E by default.","Get activation code":"Get activation code","Input activation code here":"Input activation code here","Copy Thino id":"Copy Thino id","Activate Pro Version":"Activate Pro Version","Please copy Thino id first":"Please copy Thino id first",'You can set folder name with file name like "folder/file"':'You can set folder name with file name like "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'You can set folder name like "folder1/folder2/folder3" to create sub-folder',"Default save type":"Default save location",'Set the default save type for thino. "DAILY" by default':'Set the default save type for thino. "DAILY" by default',"Sync Thino via PKMer":"Sync Thino via PKMer",Unlink:"Unlink",Link:"Link","Connect to PKMer Sync, you can check it in ":"Connect to PKMer Sync, you can check it in ","PKMer Sync":"PKMer Sync","Remove successfully":"Remove successfully",Deactivate:"Deactivate",Remove:"Remove","Confirm?":"Confirm?","Sync Status":"Sync Status","Start or stop sync":"Start or stop sync","Stop sync successfully":"Stop sync successfully","Start sync successfully":"Start sync successfully",Stop:"Stop",Start:"Start","Show thino near mouse":"Show thino near mouse","Query not found":"Query not found","Send to clipboard successfully":"Send to clipboard successfully","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Failed to start HTTP server, please check the port is available.","Thino - Started HTTP server on port":"Thino - Started HTTP server on port","Thino - Terminated HTTP server":"Thino - Terminated HTTP server","File not exist":"File not exist","Thino not found":"Thino not found","File not found for the given thino path, is creating a new file":"File not found for the given thino path, is creating a new file","Saved sync token successfully":"Saved sync token successfully","Failed to find daily notes folder":"Failed to find daily notes folder","Please install obsidian-hover-editor plugin first":"Please install obsidian-hover-editor plugin first","Copied app id successfully":"Copied app id successfully","Please input token first":"Please input token first","Please enable sync first":"Please enable sync first","Init Failed":"Init Failed","Verify successfully":"Verify successfully","Failed to verify":"Failed to verify","Folder not found for the given thino path, is creating a new folder":"Folder not found for the given thino path, is creating a new folder","File not found for the given thino path":"File not found for the given thino path","Failed to read current daily note, check if it exists.":"Failed to read current daily note, check if it exists.","Failed to save":"Failed to save","Failed to login, please login again":"Failed to login, please login again","COPY FAILED":"COPY FAILED","COPY SUCCEED":"COPY SUCCEED","Copy selected text":"Copy selected text","Copy thino":"Copy thino",COPY:"COPY","This is a pro feature, please upgrade to pro version to use it.":"This is a pro feature, please upgrade to pro version to use it.","You can get pro version from: ":"You can get pro version from: ",Save:"Save",Cancel:"Cancel","Thino Daily Target":"Thino Daily Target",Input:"Input","#Tag":"#Tag","to create tag":"to create tag","You have verified your account. Congrats!":"You have verified your account. Congrats!","Pro features":"Pro features","Target Thino Count":"Target Thino Count",on:"on","Switch waterfall view":"Switch waterfall view","Switch view":"Switch view","Switch list view":"Switch list view","Set daily target":"Set daily target","Thino Save To: ":"Thino Save To: ","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",words:"words",word:"word","Return To Home Page":"Return To Home Page","No thinos to review!":"No thinos to review!","Thinos to review":"Thinos to review","Start Review":"Start Review",Hard:"Hard",Good:"Good",Easy:"Easy",Again:"Again","Clear all review data":"Clear all review data","Daily Progress":"Daily Progress","Show stats":"Show stats","Hide stats":"Hide stats",Remaining:"Remaining","Total Reviews":"Total Reviews","Today, you have reviewed all your thinos!":"Today, you have reviewed all your thinos!","Daily review limit reached! Come back tomorrow.":"Daily review limit reached! Come back tomorrow.","Open thino in center window":"Open thino in center window","Open thino in float window":"Open thino in float window","Open thino in right sidebar":"Open thino in right sidebar","Open thino in left sidebar":"Open thino in left sidebar","Show thino editor":"Show thino editor","Toggle minimal mode":"Toggle minimal mode","Focus on thino editor":"Focus on thino editor","ReSync web thinos to local":"ReSync web thinos to local","Sync local thinos to web":"Sync local thinos to web","Show daily thino":"Show daily thino","Focus on search bar":"Focus on search bar","Show-thino in popover(Hover editor)":"Show-thino in popover(Hover editor)","Center window":"Center window","Float window":"Float window","Right sidebar":"Right sidebar","Left sidebar":"Left sidebar","Save thino type when sync local":"Save thino type when sync local","Set the default save thino type when sync local, FILE by default.":"Set the default save thino type when sync local, FILE by default.","Sync service":"Sync service","Pro verification status":"Pro verification status","Live-preview":"Live-preview",Source:"Source","Global copy":"Global copy","Set the folder name":"Set the folder name","Set the filename":"Set the filename","Set the filename for current location file":"Set the filename for current location file","Switch calendar type":"Switch calendar type",alphabetical:"alphabetical",alphabeticalReverse:"alphabeticalReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type here",Today:"Today",Yesterday:"Yesterday","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 90 days":"Last 90 days","Last 180 days":"Last 180 days","Last 365 days":"Last 365 days",Found:"Found","Copy filtered thinos":"Copy filtered thinos","Bulk delete":"Bulk delete","Bulk archive":"Bulk archive","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk restore","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.",Preview:"Preview","Set and save":"Set and save","Show day mark in thino list":"Show day mark in thino list","Show day mark on the top of daily range thino. False by default.":"Show day mark on the top of daily range thino. False by default.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Click to expand or fold, Cmd+Click to show all thinos of the day","You can buy a license from":"You can buy a license from","No thinos in range":"No thinos in range",Month:"Month",Week:"Week",Day:"Day",Agenda:"Agenda",Tomorrow:"Tomorrow",Previous:"Previous",Next:"Next","Search all columns...":"Search all columns...","Basic Info":"Basic Info","Additional Info":"Additional Info","Created At":"Created At",Content:"Content","Thino Type":"Thino Type","Source Type":"Source Type","Row status":"Row status",Path:"Path","Pinned Status":"Pinned Status",Table:"Table",Chat:"Chat",Moments:"Moments",Waterfall:"Waterfall",Calendar:"Calendar","Go to page":"Go to page",Page:"Page",Show:"Show",rows:"rows","Temp Filter":"Temp Filter","Open link directly in Thino view":"Open link directly in Thino view","Day mark range":"Day mark range","Set the range of day mark. Day by default.":"Set the range of day mark. Day by default.","Thino is locked":"Thino is locked","Please unlock Thino by input password":"Please unlock Thino by input password","Auto Download Image":"Auto Download Image","Auto download image when save to thino. 'false' by default":"Auto download image when save to thino. 'false' by default","Thino Http IP Type":"Thino Http IP Type","Set Thino http server ip to listen. 'localhost' by default":"Set Thino http server ip to listen. 'localhost' by default","Password to lock Thino":"Password to lock Thino",Unlock:"Unlock",Locked:"Locked","Password is incorrect":"Password is incorrect",Lock:"Lock","Need password to unlock Thino":"Need password to unlock Thino","You have not set a password or enable this feature yet":"You have not set a password or enable this feature yet",Password:"Password","Password for Thino":"Password for Thino","Please input your password to change password settings":"Please input your password to change password settings","Please input your password":"Please input your password","Lock thino":"Lock thino",date:"date",time:"time",event:"event","Add tag position":"Add tag position","Set the position of the tag when adding tag automatically":"Set the position of the tag when adding tag automatically","Add tag automatically":"Add tag automatically","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Add tag to the end or beginning of the thino content when creating a thino and filtering tags","Add tag with new line":"Add tag with new line","Add tag with new line when adding tag automatically":"Add tag with new line when adding tag automatically","Input to select more tags":"Input to select more tags","Tag Bulk Edit":"Tag Bulk Edit","Tag Bulk Select":"Tag Bulk Select","Exist Tags":"Exist Tags","Selected Tags":"Selected Tags","Click to remove exist tag":"Click to remove exist tag","Click to remove selected tag":"Click to remove selected tag","Select tags":"Select tags","Input to select exist tag":"Input to select exist tag",Beginning:"Beginning",End:"End","Set the heading for saving thino":"Set the heading for saving thino","# Heading":"# Heading","Chat view style":"Chat view style","Set the style of chat view":"Set the style of chat view","Background image for moments view":"Background image for moments view","Set the background image for moments view":"Set the background image for moments view","Icon for moments/chat view/share image":"Icon for moments/chat view/share image","Set the icon for moments/chat view/share image":"Set the icon for moments/chat view/share image","Quote for moments view/share image":"Quote for moments view/share image","Set the quote for moments view/share image":"Set the quote for moments view/share image","Theme for Thino":"Theme for Thino","Set the theme for Thino":"Set the theme for Thino","Interface Details":"Interface Details","Task amount":"Task amount","Thino status":"Thino status","Used tags":"Used tags","Used days":"Used days","Most active day":"Most active day","Most active hour":"Most active hour","Thino amount":"Thino amount","No content to generate.":"No content to generate.","Image generated successfully.":"Image generated successfully.","Failed to generate image.":"Failed to generate image.","Share filtered thinos as image":"Share filtered thinos as image","Latest version":"Latest version","Previous version":"Previous version","Thino update info":"Thino update info","Debug info copied to clipboard":"Debug info copied to clipboard","Copy debug info":"Copy debug info","Failed to load changelog":"Failed to load changelog","View online":"View online",ChangeLog:"ChangeLog","Please open thino first":"Please open thino first","Insert editor":"Insert editor",Gallery:"Gallery","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.","Default time prefix for thino in daily notes":"Default time prefix for thino in daily notes","Set default time prefix for thino in daily notes.":"Set default time prefix for thino in daily notes.","Save image successfully":"Save image successfully","User quote":"User quote","Set user quote for thino":"Set user quote for thino","User icon":"User icon","Set user icon for thino. You can input http/https link or file path in vault.":"Set user icon for thino. You can input http/https link or file path in vault.","User info":"User info","Copy filtered results":"Copy filtered results","Share image":"Share image",Default:"Default",Gray:"Gray",Grass:"Grass",Flame:"Flame",Olive:"Olive",Ice:"Ice",Magenta:"Magenta","Daily notes":"Daily notes",Editor:"Editor","Append/prepend text when share to Thino":"Append/prepend text when share to Thino","Append text when share to Thino":"Append text when share to Thino","Prepend text when share to Thino":"Prepend text when share to Thino","Add newline when append/prepend text":"Add newline when append/prepend text","Input anything here":"Input anything here",Prepend:"Prepend",Append:"Append",Both:"Both",None:"None","Hide pinned group":"Hide pinned group","Hide pinned group in thino list. False by default.":"Hide pinned group in thino list. False by default.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.","Different insert target for different type":"Different insert target for different type","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Toggle this to set different insert target for different type of thino, like task or list type of thino","You can set whole diary or only part of it":"You can set whole diary or only part of it","Set process target":"Set process target",Custom:"Custom","Whole diary":"Whole Diary","Set thino insert place":"Set thino insert place","Set where to insert thino content":"Set where to insert thino content","End of the diary":"End of the diary","Custom location":"Custom location","Setting guide":"User setting guide","Details settings":"Details settings","Start Thino":"Start Thino","About Thino Pro":"About Thino Pro",Enabled:"Enabled",Enable:"Enable","Daily notes folder":"Daily notes folder","Set daily notes folder":"Set daily notes folder","Daily note name format":"Daily note name format","Set daily note name format":"Set daily note name format","Daily note plugin":"Daily note plugin","Enable daily note plugin":"Enable daily note plugin",Selected:"Selected",Select:"Select","A classic theme for Thino with a two-column layout":"A classic theme for Thino with a two-column layout",Classic:"Classic","A modern theme for Thino with a three-column layout and some unique features.":"A modern theme for Thino with a three-column layout and some unique features.",Modern:"Modern","Go and enjoy Thino":"Go and enjoy Thino","Congrats! All settings done":"Congrats! All settings done","Adjust settings that influence your user experience with Thino.":"Adjust settings that influence your user experience with Thino.","Set preferences for using Thino":"Set preferences for using Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.","Go with daily note plugin":"Go with daily note plugin","Choose a theme for Thino.":"Choose a theme for Thino.","Set theme for Thino":"Set theme for Thino","Set up your user info for Thino.":"Set up your user info for Thino.","Get started with Thino":"Get started with Thino","Skip and start Thino":"Skip and start Thino","Next step":"Next step","Back to previous step":"Back to previous step","Click to enable =>":"Click to enable =>","This is Thino's sidebar. Navigate to different path or select query filter.":"This is Thino's sidebar. Navigate to different path or select query filter.","Click here and go to settings page.":"Click here and go to settings page.","Click here and go to different path.":"Click here and go to different path.","Select or create query filter here.":"Select or create query filter here.","See the status of Thinos here.":"See the status of Thinos here.","Search your thino quickly here.":"Search your thino quickly here.","Edit or create your thino here.":"Edit or create your thino here.","See your thinos here.":"See your thinos here.","See your time status of thinos here.":"See your time status of thinos here.","See your tags here. Tags will be shown when thino contains tags.":"See your tags here. Tags will be shown when thino contains tags.",Done:"Done","Thino is ready to use. ":"Thino is ready to use. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"You can start using Thino now. If you want to know more about Thino Pro, click the button below.","Default time prefix":"Default time prefix","Append Text Action":"Append Text Action","Prepend Text Action":"Prepend Text Action",Preset:"Preset","Select Tags":"Select Tags","It is not available on small view":"It is not available on small view","Append text":"Append text","Prepend text":"Prepend text","Your daily note folder is not set correctly, please check your settings":"Your daily note folder is not set correctly, please check your settings","Default sharing style":"Default sharing style","Select the font for the memo content":"Select the font for the memo content","Select the background for the memo image":"Select the background for the memo image","Select the content type for the left bottom area":"Select the content type for the left bottom area","Default text":"Default text","Activity heatmap":"Activity heatmap","Left bottom content":"Left bottom content",Font:"Font",Background:"Background","Default font":"Default font","Orange gradient":"Orange gradient","Blue gradient":"Blue gradient","Green gradient":"Green gradient","Pink gradient":"Pink gradient","Image read failed, please try again":"Image read failed, please try again","Please select a valid image file":"Please select a valid image file","Default background":"Default background","Select local image":"Select local image","Image file cannot exceed 5MB":"Image file cannot exceed 5MB","Font size":"Font size","Adjust the font size":"Adjust the font size","Set the default style for sharing thino, 'Modern' by default.":'Set the default style for sharing thino, "Modern" by default.',Clean:"Clean",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino share","Copy to clipboard failed":"Copy to clipboard failed","Copy to clipboard successfully":"Copy to clipboard successfully","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Your content has been copied to clipboard, and inserted into the editor. Please try it again","Share thino":"Share thino","Set file name after create thino":"Set file name after create thino","You can set file name after create thino. A input box will show when you create thino.":"You can set file name after create thino. A input box will show when you create thino.",SPLIT:"SPLIT","Split by Heading 1":"Split by Heading 1","Split by Heading 2":"Split by Heading 2","Split by Heading 3":"Split by Heading 3","Insert task":"Insert task","All settings have been reset to default.":"All settings have been reset to default.","Reset all Thino settings":"Reset all Thino settings","Reset settings":"Reset settings","Reset Thino settings to default settings.":"Reset Thino settings to default settings.","Task Management":"Task Management","Append completed date when task done in thino":"Append completed date when task done in thino","Append completed date when task done in thino. False by default":"Append completed date when task done in thino. False by default","Set tag for single file that Thino indexes":"Set tag for single file that Thino indexes","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.","Set tag for file type file":"Set tag for file type file","Set tag for multi type file":"Set tag for multi type file","Ignore folders for multi type":"Ignore folders for multi type","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"Set folders to ignore when using multi type. Separate multiple folders with comma (,).","folder1,folder2/subfolder":"folder1,folder2/subfolder",Interface:"Interface","Please input the tag":"Please input the tag","Merge thinos in to thino share image":"Merge thinos in to thino share image","Custom height for Thino content":"Custom height for Thino content","Set custom height for Thino content. Like 200px or 20rem":"Set custom height for Thino content. Like 200px or 20rem","Input height":"Input height","Submit issue":"Submit issue","Current version":"Current version","Bug report":"Bug report","Click the button to copy debug info and open the issue page":"Click the button to copy debug info and open the issue page","Copy and go":"Copy and go","Debug info copied":"Debug info copied","Feature request":"Feature request","Submit your feature request to the issue page":"Submit your feature request to the issue page",Go:"Go","Toggle query list visibility":"Toggle query list visibility","Toggle tags visibility":"Toggle tags visibility","Toggle sidebar visibility":"Toggle sidebar visibility",Collapse:"Collapse",Expand:"Expand","Max height for collapse":"Max height for collapse","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)","Render content":"Render content","Optimize for Callout":"Optimize for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Won't render content contains more than 3 callouts automatically. True by default","The value should be greater than":"The value should be greater than","Append Text":"Append Text","Prepend Text":"Prepend Text","Thino height when collapsed":"Thino height when collapsed","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"This option will allow you use other views when leaf width is not enough. False by default.","Can select other views when leaf width is not enough":"Can select other views when leaf width is not enough","TRASH BOX":"TRASH BOX","Wait templater to finish parse before insert thino":"Wait templater to finish parse before insert thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.","Get thino capture extension":"Get thino capture extension","You can capture idea/text from chrome now.":"You can capture idea/text from chrome now.","Open File":"Open File","Exported CSV file":"Exported CSV file","Updated At":"Updated At","Export to CSV":"Export to CSV","Quick add button on mobile navbar":"Quick add button on mobile navbar","Always show status text":"Always show status text","Support filter by metadata from file":"Support filter by metadata from file","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.","Show source near timestamp in thino":"Show source near timestamp in thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.","Show Update Message":"Show Update Message","Show update message when Thino is updated. True by default":"Show update message when Thino is updated. True by default","Sync manually":"Sync manually","Show all scrollbars":"Show all scrollbars","TIME RANGE":"TIME RANGE",WITHIN:"WITHIN","7 days":"7 days","14 days":"14 days","30 days":"30 days","3 months":"3 months","6 months":"6 months","1 year":"1 year","This week":"This week","Last week":"Last week","This month":"This month","Last month":"Last month","This year":"This year","Last year":"Last year","No history":"No history","Today Remaining":"Today Remaining","Today Total":"Today Total","Historical Statistics":"Historical Statistics",byTime:"By Time",byTimeReverse:"By Time Reverse",Stat:"Stat",Statistics:"Statistics","Daily Thino Count":"Daily Thino Count",Total:"Total",thinos:"thinos","Thino Types":"Thino Types","Distribution of thino types":"Distribution of thino types","Thino Status":"Thino Status","Distribution of thino status":"Distribution of thino status","Popular Tags":"Popular Tags","Top 10 most used tags":"Top 10 most used tags","Thino Count":"Thino Count","Hourly distribution":"Hourly distribution","Current month":"Current month","Monthly distribution":"Monthly distribution","30 Days":"Last 30 days",Year:"Year","Time Distribution":"Time Distribution","When do you write thinos":"When do you write thinos","Content Length":"Content Length","Distribution of thino lengths":"Distribution of thino lengths","Daily Thinos":"Daily Thinos","Show Time Distribution":"Show Time Distribution","Hide date picker":"Hide date picker","Show date picker":"Show date picker","Clear filter":"Clear filter","Copy link":"Copy link","Copy embed link":"Copy embed link","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter to save thino","Fixed strings for thinos":"Fixed strings for thinos","Use fixed strings for thinos":"Use fixed strings for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Enable to add fixed strings at the beginning or end of thinos.","Fixed prefix for thinos":"Fixed prefix for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fixed suffix for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Word count exceeded","Word count feature":"Word count feature","Enable real-time word count display in the editor":"Enable real-time word count display in the editor","Maximum word count":"Maximum word count","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.","No linked thinos found":"No linked thinos found","Reference links group":"Reference links group","Enable reference links group in thino.":"Enable reference links group in thino.","No reference links found":"No reference links found","Outgoing Links":"Outgoing Links","Incoming Links":"Incoming Links","Error fetching reference links":"Error fetching reference links","Double click behavior":"Double click behavior","Set the behavior when double click on a thino.":"Set the behavior when double click on a thino.","Open thino":"Open thino","Edit thino":"Edit thino","Go to source":"Go to source","Do nothing":"Do nothing","Use default header in mobile view":"Use default header in mobile view","Use default header in mobile view of thino rather than custom header.":"Use default header in mobile view of thino rather than custom header.","Using block link when dragging a thino":"Using block link when dragging a thino","Using block link when dragging a thino for daily":"Using block link when dragging a thino for daily","Matched via tag in content":"Matched via tag in content","Matched via tag in file":"Matched via tag in file","Focus on editor when open":"Focus on editor when open","Focus on editor when open. True by default.":"Focus on editor when open. True by default.","Show scroll to top button":"Show scroll to top button","Show scroll to top button. True by default":"Show scroll to top button. True by default.","Zoom image by default":"Zoom image by default","Zoom image by default when viewing image.":"Zoom image by default when viewing image.","View archive in random review":"View archive in random review","View archived thinos in random review. True by default":"View archived thinos in random review. True by default.","Linked by":"Linked by",Linked:"Linked",DUPLICATE:"Duplicate","Show scrollbars in all thino views.":"Show scrollbars in all thino views.","Drag to paste content":"Drag to paste content","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"You will be able to paste content from other apps to thino by dragging rather than pasting the block link.","Dragging behavior":"Dragging behavior","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.","Block link":"Block link","Quick capture tool that allows you to create and manage your ideas, tasks, and more.":"Quick capture tool that allows you to create and manage your ideas, tasks, and more.",About:"About",Blank:"Blank",Text:"Text","Open Documentation":"Open Documentation",Documentation:"Documentation",Version:"Version","View the documentation for this plugin":"View the documentation for this plugin","Activate Pro":"Activate Pro",Pro:"Pro","Activated Pro":"Activated Pro",Tasks:"Tasks","Show release notes":"Show release notes","Show release notes when Thino is updated. True by default":"Show release notes when Thino is updated. True by default","Open change log":"Open change log","Change log":"Change log","View the change log for this plugin":"View the change log for this plugin"},FW={welcome:"Welcome to Thino",ribbonIconTitle:"Thino",to:"to",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],year:null,month:null,"Basic Options":"Basic Options","User name":"User Name","Set your user name here. 'Memos 😏' By default":"Set your user name here. 'Thino 😏' By default",'You can set target heading like "# Heading" to control data location':'You can set target heading like "# Heading" to control data location',"Insert after heading":"Insert After Heading","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorised under that title.":"If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorised under that title.","Allows admonitions to be created using ":"Allows admonitions to be created using ","Process Memos below":"Process Thino Below","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.","Save Memo button label":"Save Thino Button Label","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"The text shown on the save Thino button in the UI. 'NOTEIT' by default.","Focus on editor when open memos":"Focus on Editor When Open Thino","Focus on editor when open memos. Focus by default.":"Focus on editor when open thino. Focus by default.","Open daily memos with open memos":"Open Daily Thino with Open Thino","Open daily memos with open memos. Open by default.":"Open daily thino with open thino. Open by default.","Open Memos when obsidian opens":"Open Thino When Obsidian Opens","When enable this, Memos will open when Obsidian opens. False by default.":"When enabled, Thino will open when Obsidian opens. False by default.","Hide done tasks in Memo list":"Hide Done Tasks in Thino List","Hide all done tasks in Memo list. Show done tasks by default.":"Hide all done tasks in Thino list. Show done tasks by default.","Advanced Options":"Advanced Options","UI language for date":"UI Language for Date","Translates the date UI language. Only 'en' and 'zh' are available.":"Translates the date UI language. Only 'en' and 'zh' are available.","Default prefix when save thino":"Default Prefix When Save Thino","Set the default prefix when create memo, 'List' by default.":"Set the default prefix when create thino, 'List' by default.","Default insert date format":"Default Insert Date Format","Set the default date format when insert date by @, 'Tasks' by default.":"Set the default date format when insert date by @, 'Tasks' by default.","Default editor position on mobile":"Default Editor Position on Mobile","Set the default editor position on Mobile, 'Top' by default.":"Set the default editor position on Mobile, 'Top' by default.","Use button to show editor on mobile":"Use Button to Show Editor on Mobile","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Set a float button to call editor on mobile. Only when editor located at the bottom works.","Show Time When Copy Results":"Show Time When Copy Results","Show time when you copy results, like 12:00. Copy time by default.":"Show time when you copy results, like 12:00. Copy time by default.","Show Date When Copy Results":"Show Date When Copy Results","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Show date when you copy results, like [[2022-01-01]]. Copy date by default.","Add Blank Line Between Different Date":"Add Blank Line Between Different Date","Add blank line when copy result with date. No blank line by default.":"Add blank line when copy result with date. No blank line by default.","Share Options":"Share Options","Share Memos Image Footer Start":"Share Thino Image Footer Start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default","Share Memos Image Footer End":"Share Thino Image Footer End","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default","Save Shared Image To Folder For Mobile":"Save Shared Image To Folder For Mobile","Save image to folder for mobile. False by Default":"Save image to folder for mobile. False by Default","Say Thank You":"Say Thank You",Donate:"Donate","If you like this plugin, consider donating to support continued development:":"If you like this plugin, consider donating to support continued development:","File Name of Recycle Bin":"File Name of Recycle Bin","Set the filename for recycle bin. 'delete' By default":"Set the filename for recycle bin. 'delete' By default","File Name of Query File":"File Name of Query File","Set the filename for query file. 'query' By default":"Set the filename for query file. 'query' By default","Use Tags In Vault":"Use Tags In Vault","Use tags in vault rather than only in Memos. False by default.":"Use tags in vault rather than only in Thino. False by default.","Ready to convert image into background":"Ready to convert image into background",List:"List",Task:"Task",Top:"Top",Bottom:"Bottom",TAG:"TAG",DAY:"DAY",QUERY:"Query",EDIT:"EDIT",PIN:"PIN",UNPIN:"UNPIN",DELETE:"DELETE","CONFIRM!":"CONFIRM!","CREATE FILTER":"CREATE FILTER","Comment it...":"Comment it...",Settings:"Settings","Recycle bin":"Recycle Bin","About Me":"About Me","Fetching data...":"Fetching data...","Here is No Memos.":"Here is No Thino.","Frequently Used Tags":"Frequently Used Tags","What do you think now...":"What do you think now...",READ:"READ",MARK:"MARK",SHARE:"SHARE",SOURCE:"SOURCE",RESTORE:"RESTORE",ARCHIVE:"Archive","Daily Review":"Daily Review","DELETE AT":"DELETE AT","Noooop!":"Noooop!","All Data is Loaded 🎉":"All Data is Loaded 🎉","Quick filter":"Quick Filter",TYPE:"TYPE",LINKED:"LINKED","NO TAGS":"NO TAGS","HAS LINKS":"HAS LINKS","HAS IMAGES":"HAS IMAGES",INCLUDE:"INCLUDE",EXCLUDE:"EXCLUDE",TEXT:"TEXT",IS:"IS",AND:"AND",OR:"OR",LIST:"LIST",ISNOT:"IS NOT",PATH:"PATH",METADATA:"METADATA",SELECT:"SELECT","ADD FILTER TERMS":"ADD FILTER TERMS",FILTER:"FILTER",Filter:"Filter",TITLE:"TITLE","CREATE QUERY":"CREATE QUERY","EDIT QUERY":"EDIT QUERY",MATCH:"MATCH",TIMES:"TIMES","Share Memo Image":"Share Thino Image","↗Click the button to save":"↗Click the button to save","Image is generating...":"Image is generating...","Image is loading...":"Image is loading...","Loading...":"Loading...","😟 Cannot load image, image link maybe broken":"😟 Cannot load image, image link may be broken","Daily Memos":"Daily Thino","CANCEL EDIT":"CANCEL EDIT","LINK TO THE":"LINK TO THE","Mobile Options":"Mobile Options","Experimental Options":"Experimental Options","Don't support web image yet, please input image path in vault":"Don't support web image yet, please input image path in vault","Background Image in Dark Theme":"Background Image in Dark Theme","Background Image in Light Theme":"Background Image in Light Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Set background image in dark theme. Set something like "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Set background image in light theme. Set something like "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Set default thino composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default',"Default Memo Composition":"[Deprecated] Default Thino Composition","Show Tasks Label":"Show Tasks Label","Show tasks label near the time text. False by default":"Show tasks label near the time text. False by default","Please Open Memos First":"Please Open Thino First",DATE:"DATE",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"BEFORE",AFTER:"AFTER","Allow Comments On Memos":"Allow Comments On Thino","You can comment on memos. False by default":"You can comment on thino. False by default",Import:"Import","TITLE CANNOT BE NULL!":"TITLE CANNOT BE NULL!","FILTER CANNOT BE NULL!":"FILTER CANNOT BE NULL!","Comments In Original DailyNotes/Notes":"Comments In Original DailyNotes/Notes","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"You should install Dataview Plugin ver 0.5.9 or later to use this feature.","Open Memos Successfully":"Open Thino Successfully","Fetch Memos Error":"😭 Fetch Error","Copied to clipboard Successfully":"Copied to clipboard Successfully","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Check if you opened Daily Notes Plugin Or Periodic Notes Plugin","Please finish the last filter setting first":"Please finish the last filter setting first","Close Memos Successfully":"Close Thino Successfully","Insert as Memo":"Insert as Thino","Insert file as memo content":"Insert file as thino content","Image load failed":"Image load failed","Content cannot be empty":"Content cannot be empty","Unable to create new file.":"Unable to create new file.","Failed to fetch deleted memos: ":"Failed to fetch deleted thino: ","RESTORE SUCCEED":"RESTORE SUCCEED","DELETE SUCCEED":"DELETE SUCCEED","Save Memo button icon":"Save Thino button icon","The icon shown on the save Memo button in the UI.":"The icon shown on the save Thino button in the UI.","Fetch Memos From Particular Notes":"Fetch Thino From Particular Notes",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'You can set any Dataview Query for thino to fetch it. All thino in those notes will show on list. "#memo" by default',"Allow Memos to Fetch Memo from Notes":"Allow Thino to Fetch Thino from Notes","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Use Thino to manage all thino in your notes, not only in daily notes. False by default","Always Show Memo Comments":"Always Show Thino Comments","Always show memo comments on memos. False by default":"Always show thino comments on thino. False by default","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"You haven't set folder for daily notes in both periodic-notes and daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Please check your daily note plugin OR periodic notes plugin settings","Use which plugin's default configuration":"Use which plugin's default configuration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino use the plugin's default configuration to fetch thino from daily, 'Daily' by default.",Daily:"Daily","Always Show Leaf Sidebar on PC":"Always Show Leaf Sidebar on PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"You haven't set format for daily notes in both periodic-notes and daily-notes plugins.","fetch more":"fetch more","Search all settings":"Search all settings",General:"General",Theme:"Theme",Share:"Share",Advanced:"Advanced",Thino:"Thino","Random Review":"Random Review","ARCHIVED AT":"ARCHIVED AT","Failed to get memos from daily notes":"Failed to get thino from daily notes","Failed to delete memo":"Failed to delete thino","CTRL + ENTER to save":"CTRL + ENTER to save","Started from":"Started from","Custom Background Image":"Custom Background Image","Set custom background image.":"Set custom background image.","Custom Memo Footer":"Custom Thino Footer","Set custom memo footer.":"Set custom thino footer.","Heatmap Color Scheme":"Heatmap Colour Scheme","Set different color scheme for heatmap.":"Set different colour scheme for heatmap.","Enable Local Http Server":"Enable Local Http Server","Memos Http Server Port":"Thino Http Server Port","Set memos http server port to listen. '43999' by default":"Set thino http server port to listen. '43999' by default","Default Editor Mode":"Default Editor Mode","Live-Preview Mode OR Source Mode.":"Live-Preview Mode/Source Mode.","Save type for Thino":"Save type for Thino",DAILY:"DAILY",MULTI:"MULTI",CANVAS:"CANVAS",ALL:"ALL",FILE:"FILE",TODO:"TODO",DONE:"DONE",JOURNAL:"JOURNAL",OTHER:"OTHER","Failed to create daily note, check if it exists.":"Failed to create daily note, check if it exists.","Failed to create daily note. Please check if you created a folder for daily notes.":"Failed to create daily note. Please check if you created a folder for daily notes.","After you verify your account, please refresh this page.":"After you verify your account, please refresh this page.",Verify:"Verify","Oops! You forget to verify insider account":"Oops! You forgot to verify insider account","If you have any questions, please contact us.":"If you have any questions, please contact us.","Delete Thino Directly":"Delete Thino Directly","When delete thino directly, it will not be moved to trash. False by default.":"When delete thino directly, it will not be moved to bin. False by default.","Enable opening thino globally":"Enable opening thino globally","Enable opening thino globally. False by default.":"Enable opening thino globally. False by default.","Key for opening thino globally":"Key for opening thino globally","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Set key for opening thino globally. CTRL + SHIFT + T by default.","Key for showing thino globally":"Key for showing thino globally","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Set key for showing thino globally. CTRL + SHIFT + E by default.","Get activation code":"Get activation code","Input activation code here":"Input activation code here","Copy Thino id":"Copy Thino id","Activate Pro Version":"Activate Pro Version","Please copy Thino id first":"Please copy Thino id first",'You can set folder name with file name like "folder/file"':'You can set folder name with file name like "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'You can set folder name like "folder1/folder2/folder3" to create sub-folder',"Default save type":"Default save location",'Set the default save type for thino. "DAILY" by default':'Set the default save type for thino. "DAILY" by default',"Sync Thino via PKMer":"Sync Thino via PKMer",Unlink:"Unlink",Link:"Link","Connect to PKMer Sync, you can check it in ":"Connect to PKMer Sync, you can check it in ","PKMer Sync":"PKMer Sync","Remove successfully":"Remove successfully",Deactivate:"Deactivate",Remove:"Remove","Confirm?":"Confirm?","Sync Status":"Sync Status","Start or stop sync":"Start or stop sync","Stop sync successfully":"Stop sync successfully","Start sync successfully":"Start sync successfully",Stop:"Stop",Start:"Start","Show thino near mouse":"Show thino near mouse","Query not found":"Query not found","Send to clipboard successfully":"Send to clipboard successfully","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Failed to start HTTP server, please check the port is available.","Thino - Started HTTP server on port":"Thino - Started HTTP server on port","Thino - Terminated HTTP server":"Thino - Terminated HTTP server","File not exist":"File does not exist","Thino not found":"Thino not found","File not found for the given thino path, is creating a new file":"File not found for the given thino path, creating a new file","Saved sync token successfully":"Saved sync token successfully","Failed to find daily notes folder":"Failed to find daily notes folder","Please install obsidian-hover-editor plugin first":"Please install obsidian-hover-editor plugin first","Copied app id successfully":"Copied app id successfully","Please input token first":"Please input token first","Please enable sync first":"Please enable sync first","Init Failed":"Init Failed","Verify successfully":"Verify successfully","Failed to verify":"Failed to verify","Folder not found for the given thino path, is creating a new folder":"Folder not found for the given thino path, creating a new folder","File not found for the given thino path":"File not found for the given thino path","Failed to read current daily note, check if it exists.":"Failed to read current daily note, check if it exists.","Failed to save":"Failed to save","Failed to login, please login again":"Failed to login, please login again","COPY FAILED":"COPY FAILED","COPY SUCCEED":"COPY SUCCEED","Copy selected text":"Copy selected text","Copy thino":"Copy thino",COPY:"COPY","This is a pro feature, please upgrade to pro version to use it.":"This is a pro feature, please upgrade to pro version to use it.","You can get pro version from: ":"You can get pro version from: ",Save:"Save",Cancel:"Cancel","Thino Daily Target":"Thino Daily Target",Input:"Input","#Tag":"#Tag","to create tag":"to create tag","You have verified your account. Congrats!":"You have verified your account. Congrats!","Pro features":"Pro features","Target Thino Count":"Target Thino Count",on:"on","Switch waterfall view":"Switch waterfall view","Switch view":"Switch view","Switch list view":"Switch list view","Set daily target":"Set daily target","Thino Save To: ":"Thino Save To: ","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",words:"words",word:"word","Return To Home Page":"Return To Home Page","No thinos to review!":"No thinos to review!","Thinos to review":"Thinos to review","Start Review":"Start Review",Hard:"Hard",Good:"Good",Easy:"Easy",Again:"Again","Clear all review data":"Clear all review data","Daily Progress":"Daily Progress","Show stats":"Show stats","Hide stats":"Hide stats",Remaining:"Remaining","Total Reviews":"Total Reviews","Today, you have reviewed all your thinos!":"Today, you have reviewed all your thinos!","Daily review limit reached! Come back tomorrow.":"Daily review limit reached! Come back tomorrow.","Open thino in center window":"Open thino in centre window","Open thino in float window":"Open thino in float window","Open thino in right sidebar":"Open thino in right sidebar","Open thino in left sidebar":"Open thino in left sidebar","Show thino editor":"Show thino editor","Toggle minimal mode":"Toggle minimal mode","Focus on thino editor":"Focus on thino editor","ReSync web thinos to local":"ReSync web thinos to local","Sync local thinos to web":"Sync local thinos to web","Show daily thino":"Show daily thino","Focus on search bar":"Focus on search bar","Show-thino in popover(Hover editor)":"Show-thino in popover(Hover editor)","Center window":"Centre window","Float window":"Float window","Right sidebar":"Right sidebar","Left sidebar":"Left sidebar","Save thino type when sync local":"Save thino type when sync local","Set the default save thino type when sync local, FILE by default.":"Set the default save thino type when sync local, FILE by default.","Sync service":"Sync service","Pro verification status":"Pro verification status","Live-preview":"Live-preview",Source:"Source","Global copy":"Global copy","Set the folder name":"Set the folder name","Set the filename":"Set the filename","Set the filename for current location file":"Set the filename for current location file","Switch calendar type":"Switch calendar type",alphabetical:"alphabetical",alphabeticalReverse:"alphabeticalReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type here",Today:"Today",Yesterday:"Yesterday","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 90 days":"Last 90 days","Last 180 days":"Last 180 days","Last 365 days":"Last 365 days",Found:"Found","Copy filtered thinos":"Copy filtered thinos","Bulk delete":"Bulk delete","Bulk archive":"Bulk archive","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk restore","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.",Preview:"Preview","Set and save":"Set and save","Show day mark in thino list":"Show day mark in thino list","Show day mark on the top of daily range thino. False by default.":"Show day mark on the top of daily range thino. False by default.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Click to expand or fold, Cmd+Click to show all thinos of the day","You can buy a license from":"You can buy a licence from","No thinos in range":"No thinos in range",Month:"Month",Week:"Week",Day:"Day",Agenda:"Agenda",Tomorrow:"Tomorrow",Previous:"Previous",Next:"Next","Search all columns...":"Search all columns...","Basic Info":"Basic Info","Additional Info":"Additional Info","Created At":"Created At",Content:"Content","Thino Type":"Thino Type","Source Type":"Source Type","Row status":"Row status",Path:"Path","Pinned Status":"Pinned Status",Table:"Table",Chat:"Chat",Moments:"Moments",Waterfall:"Waterfall",Calendar:"Calendar","Go to page":"Go to page",Page:"Page",Show:"Show",rows:"rows","Temp Filter":"Temp Filter","Open link directly in Thino view":"Open link directly in Thino view","Day mark range":"Day mark range","Set the range of day mark. Day by default.":"Set the range of day mark. Day by default.","Thino is locked":"Thino is locked","Please unlock Thino by input password":"Please unlock Thino by input password","Auto Download Image":"Auto Download Image","Auto download image when save to thino. 'false' by default":"Auto download image when save to thino. 'false' by default","Thino Http IP Type":"Thino Http IP Type","Set Thino http server ip to listen. 'localhost' by default":"Set Thino http server ip to listen. 'localhost' by default","Password to lock Thino":"Password to lock Thino",Unlock:"Unlock",Locked:"Locked","Password is incorrect":"Password is incorrect",Lock:"Lock","Need password to unlock Thino":"Need password to unlock Thino","You have not set a password or enable this feature yet":"You have not set a password or enabled this feature yet",Password:"Password","Password for Thino":"Password for Thino","Please input your password to change password settings":"Please input your password to change password settings","Please input your password":"Please input your password","Lock thino":"Lock thino",date:"date",time:"time",event:"event","Add tag position":"Add tag position","Set the position of the tag when adding tag automatically":"Set the position of the tag when adding tag automatically","Add tag automatically":"Add tag automatically","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Add tag to the end or beginning of the thino content when creating a thino and filtering tags","Add tag with new line":"Add tag with new line","Add tag with new line when adding tag automatically":"Add tag with new line when adding tag automatically","Input to select more tags":"Input to select more tags","Tag Bulk Edit":"Tag Bulk Edit","Tag Bulk Select":"Tag Bulk Select","Exist Tags":"Exist Tags","Selected Tags":"Selected Tags","Click to remove exist tag":"Click to remove exist tag","Click to remove selected tag":"Click to remove selected tag","Select tags":"Select tags","Input to select exist tag":"Input to select exist tag",Beginning:"Beginning",End:"End","Set the heading for saving thino":"Set the heading for saving thino","# Heading":"# Heading","Chat view style":"Chat view style","Set the style of chat view":"Set the style of chat view","Background image for moments view":"Background image for moments view","Set the background image for moments view":"Set the background image for moments view","Icon for moments/chat view/share image":"Icon for moments/chat view/share image","Set the icon for moments/chat view/share image":"Set the icon for moments/chat view/share image","Quote for moments view/share image":"Quote for moments view/share image","Set the quote for moments view/share image":"Set the quote for moments view/share image","Theme for Thino":"Theme for Thino","Set the theme for Thino":"Set the theme for Thino","Interface Details":"Interface Details","Task amount":"Task amount","Thino status":"Thino status","Used tags":"Used tags","Used days":"Used days","Most active day":"Most active day","Most active hour":"Most active hour","Thino amount":"Thino amount","No content to generate.":"No content to generate.","Image generated successfully.":"Image generated successfully.","Failed to generate image.":"Failed to generate image.","Share filtered thinos as image":"Share filtered thinos as image","Latest version":"Latest version","Previous version":"Previous version","Thino update info":"Thino update info","Debug info copied to clipboard":"Debug info copied to clipboard","Copy debug info":"Copy debug info","Failed to load changelog":"Failed to load changelog","View online":"View online",ChangeLog:"ChangeLog","Please open thino first":"Please open thino first","Insert editor":"Insert editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.","Default time prefix for thino in daily notes":"Default time prefix for thino in daily notes","Set default time prefix for thino in daily notes.":"Set default time prefix for thino in daily notes.","Save image successfully":"Save image successfully","User quote":"User quote","Set user quote for thino":"Set user quote for thino","User icon":"User icon","Set user icon for thino. You can input http/https link or file path in vault.":"Set user icon for thino. You can input http/https link or file path in vault.","User info":"User info","Copy filtered results":"Copy filtered results","Share image":"Share image",Default:"Default",Gray:"Gray",Grass:"Grass",Flame:"Flame",Olive:"Olive",Ice:"Ice",Magenta:"Magenta","Daily notes":"Daily notes",Editor:"Editor","Append/prepend text when share to Thino":"Append/prepend text when share to Thino","Append text when share to Thino":"Append text when share to Thino","Prepend text when share to Thino":"Prepend text when share to Thino","Add newline when append/prepend text":"Add newline when append/prepend text","Input anything here":"Input anything here",Prepend:"Prepend",Append:"Append",Both:"Both",None:"None","Hide pinned group":"Hide pinned group","Hide pinned group in thino list. False by default.":"Hide pinned group in thino list. False by default.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.","Different insert target for different type":"Different insert target for different type","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Toggle this to set different insert target for different type of thino, like task or list type of thino","You can set whole diary or only part of it":"You can set whole diary or only part of it","Set process target":"Set process target",Custom:"Custom","Whole diary":"Whole Diary","Set thino insert place":"Set thino insert place","Set where to insert thino content":"Set where to insert thino content","End of the diary":"End of the diary","Custom location":"Custom location","Setting guide":"User setting guide","Details settings":"Details settings","Start Thino":"Start Thino","About Thino Pro":"About Thino Pro",Enabled:"Enabled",Enable:"Enable","Daily notes folder":"Daily notes folder","Set daily notes folder":"Set daily notes folder","Daily note name format":"Daily note name format","Set daily note name format":"Set daily note name format","Daily note plugin":"Daily note plugin","Enable daily note plugin":"Enable daily note plugin",Selected:"Selected",Select:"Select","A classic theme for Thino with a two-column layout":"A classic theme for Thino with a two-column layout",Classic:"Classic","A modern theme for Thino with a three-column layout and some unique features.":"A modern theme for Thino with a three-column layout and some unique features.",Modern:"Modern","Go and enjoy Thino":"Go and enjoy Thino","Congrats! All settings done":"Congrats! All settings done","Adjust settings that influence your user experience with Thino.":"Adjust settings that influence your user experience with Thino.","Set preferences for using Thino":"Set preferences for using Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.","Go with daily note plugin":"Go with daily note plugin","Choose a theme for Thino.":"Choose a theme for Thino.","Set theme for Thino":"Set theme for Thino","Set up your user info for Thino.":"Set up your user info for Thino.","Get started with Thino":"Get started with Thino","Skip and start Thino":"Skip and start Thino","Next step":"Next step","Back to previous step":"Back to previous step","Click to enable =>":"Click to enable =>","This is Thino's sidebar. Navigate to different path or select query filter.":"This is Thino's sidebar. Navigate to different path or select query filter.","Click here and go to settings page.":"Click here and go to settings page.","Click here and go to different path.":"Click here and go to different path.","Select or create query filter here.":"Select or create query filter here.","See the status of Thinos here.":"See the status of Thinos here.","Search your thino quickly here.":"Search your thino quickly here.","Edit or create your thino here.":"Edit or create your thino here.","See your thinos here.":"See your thinos here.","See your time status of thinos here.":"See your time status of thinos here.","See your tags here. Tags will be shown when thino contains tags.":"See your tags here. Tags will be shown when thino contains tags.",Done:"Done","Thino is ready to use. ":"Thino is ready to use. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"You can start using Thino now. If you want to know more about Thino Pro, click the button below.","Default time prefix":"Default time prefix","Append Text Action":"Append Text Action","Prepend Text Action":"Prepend Text Action",Preset:"Preset","Select Tags":"Select Tags","It is not available on small view":"It is not available on small view","Append text":"Append text","Prepend text":"Prepend text","Your daily note folder is not set correctly, please check your settings":"Your daily note folder is not set correctly, please check your settings","Default sharing style":"Default sharing style","Set the default style for sharing thino, 'Modern' by default.":'Set the default style for sharing thino, "Modern" by default.',Clean:"Clean",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino share","Copy to clipboard failed":"Copy to clipboard failed","Copy to clipboard successfully":"Copy to clipboard successfully","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Your content has been copied to clipboard, and inserted into the editor. Please try it again","Share thino":"Share thino","Set file name after create thino":"Set file name after create thino","You can set file name after create thino. A input box will show when you create thino.":"You can set file name after create thino. A input box will show when you create thino.",SPLIT:"SPLIT","Split by Heading 1":"Split by Heading 1","Split by Heading 2":"Split by Heading 2","Split by Heading 3":"Split by Heading 3","Insert task":"Insert task","All settings have been reset to default.":"All settings have been reset to default.","Reset all Thino settings":"Reset all Thino settings","Reset settings":"Reset settings","Reset Thino settings to default settings.":"Reset Thino settings to default settings.","Task Management":"Task Management","Append completed date when task done in thino":"Append completed date when task done in thino","Append completed date when task done in thino. False by default":"Append completed date when task done in thino. False by default","Set tag for single file that Thino indexes":"Set tag for single file that Thino indexes","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.","Set tag for file type file":"Set tag for file type file","Set tag for multi type file":"Set tag for multi type file","Please input the tag":"Please input the tag","Merge thinos in to thino share image":"Merge thinos in to thino share image","Custom height for Thino content":"Custom height for Thino content","Set custom height for Thino content. Like 200px or 20rem":"Set custom height for Thino content. Like 200px or 20rem","Input height":"Input height","Submit issue":"Submit issue","Current version":"Current version","Bug report":"Bug report","Click the button to copy debug info and open the issue page":"Click the button to copy debug info and open the issue page","Copy and go":"Copy and go","Debug info copied":"Debug info copied","Feature request":"Feature request","Submit your feature request to the issue page":"Submit your feature request to the issue page",Go:"Go","Toggle query list visibility":"Toggle query list visibility","Toggle tags visibility":"Toggle tags visibility","Toggle sidebar visibility":"Toggle sidebar visibility",Collapse:"Collapse",Expand:"Expand","Max height for collapse":"Max height for collapse","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)","Render content":"Render content","Optimize for Callout":"Optimize for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Won't render content contains more than 3 callouts automatically. True by default","The value should be greater than":"The value should be greater than","Append Text":"Append Text","Prepend Text":"Prepend Text","Thino height when collapsed":"Thino height when collapsed","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"This option will allow you use other views when leaf width is not enough. False by default.","Can select other views when leaf width is not enough":"Can select other views when leaf width is not enough","TRASH BOX":"TRASH BOX","Wait templater to finish parse before insert thino":"Wait templater to finish parse before insert thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.","Get thino capture extension":"Get thino capture extension","You can capture idea/text from chrome now.":"You can capture idea/text from chrome now.","Open File":"Open File","Exported CSV file":"Exported CSV file","Updated At":"Updated At","Export to CSV":"Export to CSV","Quick add button on mobile navbar":"Quick add button on mobile navbar","Always show status text":"Always show status text","Support filter by metadata from file":"Support filter by metadata from file","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.","Show source near timestamp in thino":"Show source near timestamp in thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.","Show Update Message":"Show Update Message","Show update message when Thino is updated. True by default":"Show update message when Thino is updated. True by default","Sync manually":"Sync manually","Show all scrollbars":"Show all scrollbars","TIME RANGE":"TIME RANGE",WITHIN:"WITHIN","7 days":"7 days","14 days":"14 days","30 days":"30 days","3 months":"3 months","6 months":"6 months","1 year":"1 year","This week":"This week","Last week":"Last week","This month":"This month","Last month":"Last month","This year":"This year","Last year":"Last year","No history":"No history","Today Remaining":"Today Remaining","Today Total":"Today Total","Historical Statistics":"Historical Statistics",byTime:"By Time",byTimeReverse:"By Time Reverse",Stat:"Stat",Statistics:"Statistics","Daily Thino Count":"Daily Thino Count",Total:"Total",thinos:"thinos","Thino Types":"Thino Types","Distribution of thino types":"Distribution of thino types","Thino Status":"Thino Status","Distribution of thino status":"Distribution of thino status","Popular Tags":"Popular Tags","Top 10 most used tags":"Top 10 most used tags","Thino Count":"Thino Count","Hourly distribution":"Hourly distribution","Current month":"Current month","Monthly distribution":"Monthly distribution","30 Days":"Last 30 days",Year:"Year","Time Distribution":"Time Distribution","When do you write thinos":"When do you write thinos","Content Length":"Content Length","Distribution of thino lengths":"Distribution of thino lengths","Daily Thinos":"Daily Thinos","Show Time Distribution":"Show Time Distribution","Hide date picker":"Hide date picker","Show date picker":"Show date picker","Clear filter":"Clear filter","Copy link":"Copy link","Copy embed link":"Copy embed link","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter to save thino","Fixed strings for thinos":"Fixed strings for thinos","Use fixed strings for thinos":"Use fixed strings for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Enable to add fixed strings at the beginning or end of thinos.","Fixed prefix for thinos":"Fixed prefix for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fixed suffix for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Word count exceeded","Word count feature":"Word count feature","Enable real-time word count display in the editor":"Enable real-time word count display in the editor","Maximum word count":"Maximum word count","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.","No linked thinos found":"No linked thinos found","Reference links group":"Reference links group","Enable reference links group in thino.":"Enable reference links group in thino.","No reference links found":"No reference links found","Outgoing Links":"Outgoing Links","Incoming Links":"Incoming Links","Error fetching reference links":"Error fetching reference links","Double click behavior":"Double click behavior","Set the behavior when double click on a thino.":"Set the behavior when double click on a thino.","Open thino":"Open thino","Edit thino":"Edit thino","Go to source":"Go to source","Do nothing":"Do nothing","Use default header in mobile view":"Use default header in mobile view","Use default header in mobile view of thino rather than custom header.":"Use default header in mobile view of thino rather than custom header."},HW={welcome:"¡Bienvenido a Thino!",ribbonIconTitle:"Thino",to:"a",months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene.","Feb.","Mar.","Abr.","May.","Jun.","Jul.","Ago.","Sep.","Oct.","Nov.","Dic."],weekDays:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],weekDaysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],year:null,month:null,"Basic Options":"Opciones básicas","User name":"Nombre de usuario","Set your user name here. 'Memos 😏' By default":"Establece tu nombre de usuario aquí. 'Thino 😏' por defecto",'You can set target heading like "# Heading" to control data location':'Puedes establecer un encabezado objetivo como "# Encabezado" para controlar la ubicación de los datos',"Insert after heading":"Insertar después del encabezado","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Si se deja en blanco, el contenido thino registrado se insertará al final del diario; si se proporciona un título, todo el contenido thino registrado se categorizará uniformemente bajo ese título.","Allows admonitions to be created using ":"Permite crear advertencias usando ","Process Memos below":"Procesar thinos debajo","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Si se deja en blanco, la interfaz de Thino mostrará todos los contenidos de registros thino; si se proporciona un título, la interfaz de Thino solo mostrará los contenidos bajo ese título, y los contenidos escritos en otros lugares no se mostrarán.","Save Memo button label":"Etiqueta del botón Guardar thino","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"El texto mostrado en el botón guardar Thino en la interfaz. 'NOTEIT' por defecto.","Focus on editor when open memos":"Enfocar en el editor al abrir thinos","Focus on editor when open memos. Focus by default.":"Enfocar en el editor al abrir thinos. Enfocado por defecto.","Open daily memos with open memos":"Abrir thinos diarios al abrir thinos","Open daily memos with open memos. Open by default.":"Abrir thinos diarios al abrir thinos. Abierto por defecto.","Open Memos when obsidian opens":"Abrir Thino cuando se abre Obsidian","When enable this, Memos will open when Obsidian opens. False by default.":"Cuando esto está habilitado, Thino se abrirá cuando se abra Obsidian. Deshabilitado por defecto.","Hide done tasks in Memo list":"Ocultar tareas completadas en la lista de thinos","Hide all done tasks in Memo list. Show done tasks by default.":"Ocultar todas las tareas completadas en la lista de thinos. Mostrar tareas completadas por defecto.","Advanced Options":"Opciones avanzadas","UI language for date":"Idioma de la interfaz para fechas","Translates the date UI language. Only 'en' and 'zh' are available.":"Traduce el idioma de la interfaz de fechas. Solo 'en' y 'zh' están disponibles.","Default prefix when save thino":"Prefijo predeterminado al guardar thino","Set the default prefix when create memo, 'List' by default.":"Establece el prefijo predeterminado al crear thino, 'Lista' por defecto.","Default insert date format":"Formato de fecha de inserción predeterminado","Set the default date format when insert date by @, 'Tasks' by default.":"Establece el formato de fecha predeterminado al insertar fecha con @, 'Tareas' por defecto.","Default editor position on mobile":"Posición predeterminada del editor en móvil","Set the default editor position on Mobile, 'Top' by default.":"Establece la posición predeterminada del editor en móvil, 'Arriba' por defecto.","Use button to show editor on mobile":"Usar botón para mostrar editor en móvil","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Establece un botón flotante para llamar al editor en móvil. Solo funciona cuando el editor está ubicado en la parte inferior.","Show Time When Copy Results":"Mostrar hora al copiar resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar hora cuando copias resultados, como 12:00. Copiar hora por defecto.","Show Date When Copy Results":"Mostrar fecha al copiar resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Mostrar fecha cuando copias resultados, como [[2022-01-01]]. Copiar fecha por defecto.","Add Blank Line Between Different Date":"Agregar línea en blanco entre fechas diferentes","Add blank line when copy result with date. No blank line by default.":"Agregar línea en blanco al copiar resultado con fecha. Sin línea en blanco por defecto.","Share Options":"Opciones de compartir","Share Memos Image Footer Start":"Inicio del pie de imagen al compartir Thino","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Establece lo que quieras aquí, usa {ThinoNum} para mostrar el número de thino, {UsedDay} para días. '{ThinoNum} Thino {UsedDay} Días' por defecto","Share Memos Image Footer End":"Final del pie de imagen al compartir Thino","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Establece lo que quieras aquí, usa {UserName} como tu nombre de usuario. '✍️ Por {UserName}' por defecto","Save Shared Image To Folder For Mobile":"Guardar imagen compartida en carpeta para móvil","Save image to folder for mobile. False by Default":"Guardar imagen en carpeta para móvil. Deshabilitado por defecto","Say Thank You":"Dar las gracias",Donate:"Donar","If you like this plugin, consider donating to support continued development:":"Si te gusta este plugin, considera donar para apoyar el desarrollo continuo:","File Name of Recycle Bin":"Nombre del archivo de la papelera de reciclaje","Set the filename for recycle bin. 'delete' By default":"Establece el nombre de archivo para la papelera. 'eliminar' por defecto","File Name of Query File":"Nombre del archivo de consulta","Set the filename for query file. 'query' By default":"Establece el nombre de archivo para consulta. 'consulta' por defecto","Use Tags In Vault":"Usar etiquetas en la bóveda","Use tags in vault rather than only in Memos. False by default.":"Usar etiquetas en la bóveda en lugar de solo en Thino. Deshabilitado por defecto.","Ready to convert image into background":"Listo para convertir imagen en fondo",List:"Lista",Task:"Tarea",Top:"Arriba",Bottom:"Abajo",TAG:"ETIQUETA",DAY:"DÍA",QUERY:"CONSULTA",EDIT:"EDITAR",PIN:"FIJAR",UNPIN:"DESFIJAR",DELETE:"ELIMINAR","CONFIRM!":"¡CONFIRMAR!","CREATE FILTER":"CREAR FILTRO","Comment it...":"Comentar...",Settings:"Ajustes","Recycle bin":"Papelera de reciclaje","About Me":"Sobre mí","Fetching data...":"Obteniendo datos...","Here is No Memos.":"No hay thinos aquí.","Frequently Used Tags":"Etiquetas frecuentes","What do you think now...":"¿Qué piensas ahora...?",READ:"LEER",MARK:"MARCAR",SHARE:"COMPARTIR",SOURCE:"FUENTE",RESTORE:"RESTAURAR",ARCHIVE:"Archivar","Daily Review":"Revisión diaria","DELETE AT":"ELIMINADO EL","Noooop!":"¡Noooop!","All Data is Loaded 🎉":"Todos los datos están cargados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"ENLAZADO","NO TAGS":"SIN ETIQUETAS","HAS LINKS":"TIENE ENLACES","HAS IMAGES":"TIENE IMÁGENES",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"ES",AND:"Y",OR:"O",LIST:"LISTA",ISNOT:"NO ES",PATH:"RUTA",METADATA:"METADATOS",SELECT:"SELECCIONAR","ADD FILTER TERMS":"AGREGAR TÉRMINOS DE FILTRO",FILTER:"FILTRAR",Filter:"Filtro",TITLE:"TÍTULO","CREATE QUERY":"CREAR CONSULTA","EDIT QUERY":"EDITAR CONSULTA",MATCH:"COINCIDE",TIMES:"VECES","Share Memo Image":"Compartir imagen de Thino","↗Click the button to save":"↗Haz clic en el botón para guardar","Image is generating...":"Generando imagen...","Image is loading...":"Cargando imagen...","Loading...":"Cargando...","😟 Cannot load image, image link maybe broken":"😟 No se puede cargar la imagen, el enlace puede estar roto","Daily Memos":"Thinos diarios","CANCEL EDIT":"CANCELAR EDICIÓN","LINK TO THE":"ENLAZAR A","Mobile Options":"Opciones móviles","Experimental Options":"Opciones experimentales","Don't support web image yet, please input image path in vault":"Aún no se admiten imágenes web, por favor ingresa la ruta de la imagen en la bóveda","Background Image in Dark Theme":"Imagen de fondo en tema oscuro","Background Image in Light Theme":"Imagen de fondo en tema claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Establece la imagen de fondo en tema oscuro. Establece algo como "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Establece la imagen de fondo en tema claro. Establece algo como "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Establece la composición predeterminada de thino, debes usar {TIME} como "HH:mm" y {CONTENT} como contenido. "{TIME} {CONTENT}" por defecto',"Default Memo Composition":"[Obsoleto] Composición predeterminada de Thino","Show Tasks Label":"Mostrar etiqueta de tareas","Show tasks label near the time text. False by default":"Mostrar etiqueta de tareas cerca del texto de hora. Deshabilitado por defecto","Please Open Memos First":"Por favor abre Thino primero",DATE:"FECHA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"PLUGIN_NLDATES_DE_OBSIDIAN_NO_HABILITADO",BEFORE:"ANTES",AFTER:"DESPUÉS","Allow Comments On Memos":"Permitir comentarios en Thino","You can comment on memos. False by default":"Puedes comentar en thinos. Deshabilitado por defecto",Import:"Importar","TITLE CANNOT BE NULL!":"¡EL TÍTULO NO PUEDE ESTAR VACÍO!","FILTER CANNOT BE NULL!":"¡EL FILTRO NO PUEDE ESTAR VACÍO!","Comments In Original DailyNotes/Notes":"Comentarios en notas diarias/notas originales","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Debes instalar el Plugin Dataview ver 0.5.9 o posterior para usar esta función.","Open Memos Successfully":"Thino abierto exitosamente","Fetch Memos Error":"😭 Error al obtener","Copied to clipboard Successfully":"Copiado al portapapeles exitosamente","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifica si abriste el Plugin de notas diarias o el Plugin de notas periódicas","Please finish the last filter setting first":"Por favor termina la última configuración de filtro primero","Close Memos Successfully":"Thino cerrado exitosamente","Insert as Memo":"Insertar como Thino","Insert file as memo content":"Insertar archivo como contenido de thino","Image load failed":"Error al cargar la imagen","Content cannot be empty":"El contenido no puede estar vacío","Unable to create new file.":"No se puede crear nuevo archivo.","Failed to fetch deleted memos: ":"Error al obtener thinos eliminados: ","RESTORE SUCCEED":"RESTAURACIÓN EXITOSA","DELETE SUCCEED":"ELIMINACIÓN EXITOSA","Save Memo button icon":"Icono del botón guardar Thino","The icon shown on the save Memo button in the UI.":"El icono mostrado en el botón guardar Thino en la interfaz.","Fetch Memos From Particular Notes":"Obtener Thinos de notas específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Puedes establecer cualquier consulta Dataview para thinos para obtenerlos. Todos los thinos en esas notas se mostrarán en la lista. "#memo" por defecto',"Allow Memos to Fetch Memo from Notes":"Permitir a Thino obtener Thino de notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Usar Thino para administrar todos los thinos en tus notas, no solo en notas diarias. Deshabilitado por defecto","Always Show Memo Comments":"Mostrar siempre comentarios de Thino","Always show memo comments on memos. False by default":"Mostrar siempre comentarios de thino en thinos. Deshabilitado por defecto","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"No estableciste carpeta para notas diarias en los plugins de notas periódicas y notas diarias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor verifica la configuración de tu plugin de notas diarias O plugin de notas periódicas","Use which plugin's default configuration":"Usar la configuración predeterminada de qué plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino usa la configuración predeterminada del plugin para obtener thinos de diario, 'Diario' por defecto.",Daily:"Diario","Always Show Leaf Sidebar on PC":"Mostrar siempre barra lateral en PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Mostrar barra lateral izquierda en PC/Tablet incluso cuando el ancho de la hoja es menor a 875px. Deshabilitado por defecto.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"No estableciste formato para notas diarias en los plugins de notas periódicas y notas diarias.","fetch more":"cargar más","Search all settings":"Buscar todos los ajustes",General:"General",Theme:"Tema",Share:"Compartir",Advanced:"Avanzado",Thino:"Thino","Random Review":"Revisión aleatoria","ARCHIVED AT":"ARCHIVADO EL","Failed to get memos from daily notes":"Error al obtener thinos de notas diarias","Failed to delete memo":"Error al eliminar thino","CTRL + ENTER to save":"CTRL + ENTER para guardar","Started from":"Comenzado desde","Custom Background Image":"Imagen de fondo personalizada","Set custom background image.":"Establecer imagen de fondo personalizada.","Custom Memo Footer":"Pie de Thino personalizado","Set custom memo footer.":"Establecer pie de thino personalizado.","Heatmap Color Scheme":"Esquema de color del mapa de calor","Set different color scheme for heatmap.":"Establecer diferente esquema de color para el mapa de calor.","Enable Local Http Server":"Habilitar servidor Http local","Memos Http Server Port":"Puerto del servidor Http de Thino","Set memos http server port to listen. '43999' by default":"Establecer puerto del servidor http de thino para escuchar. '43999' por defecto","Default Editor Mode":"Modo de editor predeterminado","Live-Preview Mode OR Source Mode.":"Modo vista previa en vivo O modo fuente.","Save type for Thino":"Tipo de guardado para Thino",DAILY:"DIARIO",MULTI:"MÚLTIPLE",CANVAS:"LIENZO",ALL:"TODO",FILE:"ARCHIVO",TODO:"POR HACER",DONE:"HECHO",JOURNAL:"DIARIO",OTHER:"OTRO","Failed to create daily note, check if it exists.":"Error al crear nota diaria, verifica si existe.","Failed to create daily note. Please check if you created a folder for daily notes.":"Error al crear nota diaria. Por favor verifica si creaste una carpeta para notas diarias.","After you verify your account, please refresh this page.":"Después de verificar tu cuenta, por favor actualiza esta página.",Verify:"Verificar","Oops! You forget to verify insider account":"¡Ups! Olvidaste verificar la cuenta insider","If you have any questions, please contact us.":"Si tienes alguna pregunta, por favor contáctanos.","Delete Thino Directly":"Eliminar Thino directamente","When delete thino directly, it will not be moved to trash. False by default.":"Al eliminar thino directamente, no se moverá a la papelera. Deshabilitado por defecto.","Enable opening thino globally":"Habilitar apertura global de thino","Enable opening thino globally. False by default.":"Habilitar apertura global de thino. Deshabilitado por defecto.","Key for opening thino globally":"Tecla para abrir thino globalmente","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Establecer tecla para abrir thino globalmente. CTRL + SHIFT + T por defecto.","Key for showing thino globally":"Tecla para mostrar thino globalmente","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Establecer tecla para mostrar thino globalmente. CTRL + SHIFT + E por defecto.","Get activation code":"Obtener código de activación","Input activation code here":"Ingresa el código de activación aquí","Copy Thino id":"Copiar id de Thino","Activate Pro Version":"Activar versión Pro","Please copy Thino id first":"Por favor copia el id de Thino primero",'You can set folder name with file name like "folder/file"':'Puedes establecer nombre de carpeta con nombre de archivo como "carpeta/archivo"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Puedes establecer nombre de carpeta como "carpeta1/carpeta2/carpeta3" para crear subcarpeta',"Default save type":"Ubicación de guardado predeterminada",'Set the default save type for thino. "DAILY" by default':'Establece el tipo de guardado predeterminado para thino. "DIARIO" por defecto',"Sync Thino via PKMer":"Sincronizar Thino vía PKMer",Unlink:"Desvincular",Link:"Vincular","Connect to PKMer Sync, you can check it in ":"Conectar a PKMer Sync, puedes verificarlo en ","PKMer Sync":"PKMer Sync","Remove successfully":"Eliminado exitosamente",Deactivate:"Desactivar",Remove:"Eliminar","Confirm?":"¿Confirmar?","Sync Status":"Estado de sincronización","Start or stop sync":"Iniciar o detener sincronización","Stop sync successfully":"Sincronización detenida exitosamente","Start sync successfully":"Sincronización iniciada exitosamente",Stop:"Detener",Start:"Iniciar","Show thino near mouse":"Mostrar thino cerca del mouse","Query not found":"Consulta no encontrada","Send to clipboard successfully":"Enviado al portapapeles exitosamente","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Error al iniciar servidor HTTP, por favor verifica que el puerto esté disponible.","Thino - Started HTTP server on port":"Thino - Servidor HTTP iniciado en el puerto","Thino - Terminated HTTP server":"Thino - Servidor HTTP terminado","File not exist":"Archivo no existe","Thino not found":"Thino no encontrado","File not found for the given thino path, is creating a new file":"Archivo no encontrado para la ruta de thino dada, creando nuevo archivo","Saved sync token successfully":"Token de sincronización guardado exitosamente","Failed to find daily notes folder":"Error al encontrar carpeta de notas diarias","Please install obsidian-hover-editor plugin first":"Por favor instala primero el plugin obsidian-hover-editor","Copied app id successfully":"ID de aplicación copiado exitosamente","Please input token first":"Por favor ingresa el token primero","Please enable sync first":"Por favor habilita la sincronización primero","Init Failed":"Fallo de inicialización","Verify successfully":"Verificación exitosa","Failed to verify":"Error al verificar","Folder not found for the given thino path, is creating a new folder":"Carpeta no encontrada para la ruta de thino dada, creando nueva carpeta","File not found for the given thino path":"Archivo no encontrado para la ruta de thino dada","Failed to read current daily note, check if it exists.":"Error al leer nota diaria actual, verifica si existe.","Failed to save":"Error al guardar","Failed to login, please login again":"Error al iniciar sesión, por favor inicia sesión nuevamente","COPY FAILED":"ERROR AL COPIAR","COPY SUCCEED":"COPIADO EXITOSO","Copy selected text":"Copiar texto seleccionado","Copy thino":"Copiar thino",COPY:"COPIAR","This is a pro feature, please upgrade to pro version to use it.":"Esta es una función pro, por favor actualiza a la versión pro para usarla.","You can get pro version from: ":"Puedes obtener la versión pro desde: ",Save:"Guardar",Cancel:"Cancelar","Thino Daily Target":"Objetivo diario de Thino",Input:"Entrada","#Tag":"#Etiqueta","to create tag":"para crear etiqueta","You have verified your account. Congrats!":"¡Has verificado tu cuenta. ¡Felicitaciones!","Pro features":"Funciones pro","Target Thino Count":"Contador objetivo de Thino",on:"en","Switch waterfall view":"Cambiar a vista cascada","Switch view":"Cambiar vista","Switch list view":"Cambiar a vista lista","Set daily target":"Establecer objetivo diario","Thino Save To: ":"Guardar Thino en: ","Enter fullscreen mode":"Entrar en modo pantalla completa","Exit fullscreen mode":"Salir del modo pantalla completa",words:"palabras",word:"palabra","Return To Home Page":"Volver a la página principal","No thinos to review!":"¡No hay thinos para revisar!","Thinos to review":"Thinos para revisar","Start Review":"Comenzar revisión",Hard:"Difícil",Good:"Bueno",Easy:"Fácil",Again:"De nuevo","Clear all review data":"Borrar todos los datos de revisión","Daily Progress":"Progreso diario","Show stats":"Mostrar estadísticas","Hide stats":"Ocultar estadísticas",Remaining:"Restante","Total Reviews":"Total de revisiones","Today, you have reviewed all your thinos!":"¡Hoy has revisado todos tus thinos!","Daily review limit reached! Come back tomorrow.":"¡Límite de revisión diaria alcanzado! Vuelve mañana.","Open thino in center window":"Abrir thino en ventana central","Open thino in float window":"Abrir thino en ventana flotante","Open thino in right sidebar":"Abrir thino en barra lateral derecha","Open thino in left sidebar":"Abrir thino en barra lateral izquierda","Show thino editor":"Mostrar editor de thino","Toggle minimal mode":"Alternar modo mínimo","Focus on thino editor":"Enfocar en editor de thino","ReSync web thinos to local":"Resincronizar thinos web a local","Sync local thinos to web":"Sincronizar thinos locales a web","Show daily thino":"Mostrar thino diario","Focus on search bar":"Enfocar en barra de búsqueda","Show-thino in popover(Hover editor)":"Mostrar thino en ventana emergente (Editor flotante)","Center window":"Ventana central","Float window":"Ventana flotante","Right sidebar":"Barra lateral derecha","Left sidebar":"Barra lateral izquierda","Save thino type when sync local":"Guardar tipo de thino al sincronizar local","Set the default save thino type when sync local, FILE by default.":"Establecer el tipo de guardado predeterminado de thino al sincronizar local, ARCHIVO por defecto.","Sync service":"Servicio de sincronización","Pro verification status":"Estado de verificación Pro","Live-preview":"Vista previa en vivo",Source:"Fuente","Global copy":"Copia global","Set the folder name":"Establecer el nombre de la carpeta","Set the filename":"Establecer el nombre del archivo","Set the filename for current location file":"Establecer el nombre del archivo para la ubicación actual","Switch calendar type":"Cambiar tipo de calendario",alphabetical:"alfabético",alphabeticalReverse:"alfabético inverso",byCount:"por conteo",byCountReverse:"por conteo inverso","Type here":"Escribe aquí",Today:"Hoy",Yesterday:"Ayer","Last 7 days":"Últimos 7 días","Last 30 days":"Últimos 30 días","Last 90 days":"Últimos 90 días","Last 180 days":"Últimos 180 días","Last 365 days":"Últimos 365 días",Found:"Encontrado","Copy filtered thinos":"Copiar thinos filtrados","Bulk delete":"Eliminación masiva","Bulk archive":"Archivo masivo","Bulk tag operation":"Operación masiva de etiquetas","Bulk restore":"Restauración masiva","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Si estás desactivando el complemento de notas diarias, es posible que el thino no se elimine o actualice correctamente. Por favor, activa el complemento e inténtalo de nuevo.",Preview:"Vista previa","Set and save":"Establecer y guardar","Show day mark in thino list":"Mostrar marca de día en la lista de thinos","Show day mark on the top of daily range thino. False by default.":"Mostrar marca de día en la parte superior del rango diario de thino. Falso por defecto.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Clic para expandir o plegar, Cmd+Clic para mostrar todos los thinos del día","You can buy a license from":"Puedes comprar una licencia desde","No thinos in range":"No hay thinos en el rango",Month:"Mes",Week:"Semana",Day:"Día",Agenda:"Agenda",Tomorrow:"Mañana",Previous:"Anterior",Next:"Siguiente","Search all columns...":"Buscar en todas las columnas...","Basic Info":"Información básica","Additional Info":"Información adicional","Created At":"Creado el",Content:"Contenido","Thino Type":"Tipo de Thino","Source Type":"Tipo de fuente","Row status":"Estado de la fila",Path:"Ruta","Pinned Status":"Estado fijado",Table:"Tabla",Chat:"Chat",Moments:"Momentos",Waterfall:"Cascada",Calendar:"Calendario","Go to page":"Ir a la página",Page:"Página",Show:"Mostrar",rows:"filas","Temp Filter":"Filtro temporal","Open link directly in Thino view":"Abrir enlace directamente en vista Thino","Day mark range":"Rango de marca de día","Set the range of day mark. Day by default.":"Establecer el rango de marca de día. Día por defecto.","Thino is locked":"Thino está bloqueado","Please unlock Thino by input password":"Por favor, desbloquea Thino introduciendo la contraseña","Auto Download Image":"Descarga automática de imagen","Auto download image when save to thino. 'false' by default":"Descargar imagen automáticamente al guardar en thino. 'falso' por defecto","Thino Http IP Type":"Tipo de IP Http de Thino","Set Thino http server ip to listen. 'localhost' by default":"Establecer IP del servidor http de Thino para escuchar. 'localhost' por defecto","Password to lock Thino":"Contraseña para bloquear Thino",Unlock:"Desbloquear",Locked:"Bloqueado","Password is incorrect":"La contraseña es incorrecta",Lock:"Bloquear","Need password to unlock Thino":"Se necesita contraseña para desbloquear Thino","You have not set a password or enable this feature yet":"No has establecido una contraseña o habilitado esta función aún",Password:"Contraseña","Password for Thino":"Contraseña para Thino","Please input your password to change password settings":"Por favor, introduce tu contraseña para cambiar la configuración de contraseña","Please input your password":"Por favor, introduce tu contraseña","Lock thino":"Bloquear thino",date:"fecha",time:"hora",event:"evento","Add tag position":"Agregar posición de etiqueta","Set the position of the tag when adding tag automatically":"Establecer la posición de la etiqueta al agregarla automáticamente","Add tag automatically":"Agregar etiqueta automáticamente","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Agregar etiqueta al final o al principio del contenido del thino al crear un thino y filtrar etiquetas","Add tag with new line":"Agregar etiqueta con nueva línea","Add tag with new line when adding tag automatically":"Agregar etiqueta con nueva línea al agregar etiqueta automáticamente","Input to select more tags":"Ingresa para seleccionar más etiquetas","Tag Bulk Edit":"Edición masiva de etiquetas","Tag Bulk Select":"Selección masiva de etiquetas","Exist Tags":"Etiquetas existentes","Selected Tags":"Etiquetas seleccionadas","Click to remove exist tag":"Clic para eliminar etiqueta existente","Click to remove selected tag":"Clic para eliminar etiqueta seleccionada","Select tags":"Seleccionar etiquetas","Input to select exist tag":"Ingresa para seleccionar etiqueta existente",Beginning:"Inicio",End:"Fin","Set the heading for saving thino":"Establecer el encabezado para guardar thino","# Heading":"# Encabezado","Chat view style":"Estilo de vista de chat","Set the style of chat view":"Establecer el estilo de vista de chat","Background image for moments view":"Imagen de fondo para vista de momentos","Set the background image for moments view":"Establecer la imagen de fondo para vista de momentos","Icon for moments/chat view/share image":"Icono para vista de momentos/chat/imagen compartida","Set the icon for moments/chat view/share image":"Establecer el icono para vista de momentos/chat/imagen compartida","Quote for moments view/share image":"Cita para vista de momentos/imagen compartida","Set the quote for moments view/share image":"Establecer la cita para vista de momentos/imagen compartida","Theme for Thino":"Tema para Thino","Set the theme for Thino":"Establecer el tema para Thino","Interface Details":"Detalles de interfaz","Task amount":"Cantidad de tareas","Thino status":"Estado de Thino","Used tags":"Etiquetas usadas","Used days":"Días usados","Most active day":"Día más activo","Most active hour":"Hora más activa","Thino amount":"Cantidad de Thinos","No content to generate.":"No hay contenido para generar.","Image generated successfully.":"Imagen generada exitosamente.","Failed to generate image.":"Error al generar imagen.","Share filtered thinos as image":"Compartir thinos filtrados como imagen","Latest version":"Última versión","Previous version":"Versión anterior","Thino update info":"Información de actualización de Thino","Debug info copied to clipboard":"Información de depuración copiada al portapapeles","Copy debug info":"Copiar información de depuración","Failed to load changelog":"Error al cargar el registro de cambios","View online":"Ver en línea",ChangeLog:"Registro de cambios","Please open thino first":"Por favor, abre thino primero","Insert editor":"Insertar editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Por favor, establece diferentes ubicaciones de guardado para la configuración multi-archivo en Thino. La carpeta del diario se superpone con la ubicación de guardado multi-archivo, o hay riesgo de que se lea repetidamente.","Default time prefix for thino in daily notes":"Prefijo de tiempo predeterminado para thino en notas diarias","Set default time prefix for thino in daily notes.":"Establecer prefijo de tiempo predeterminado para thino en notas diarias.","Save image successfully":"Imagen guardada exitosamente","User quote":"Cita de usuario","Set user quote for thino":"Establecer cita de usuario para thino","User icon":"Icono de usuario","Set user icon for thino. You can input http/https link or file path in vault.":"Establecer icono de usuario para thino. Puedes ingresar enlace http/https o ruta de archivo en la bóveda.","User info":"Información de usuario","Copy filtered results":"Copiar resultados filtrados","Share image":"Compartir imagen",Default:"Predeterminado",Gray:"Gris",Grass:"Hierba",Flame:"Llama",Olive:"Oliva",Ice:"Hielo",Magenta:"Magenta","Daily notes":"Notas diarias",Editor:"Editor","Append/prepend text when share to Thino":"Agregar texto al principio/final al compartir en Thino","Append text when share to Thino":"Agregar texto al final al compartir en Thino","Prepend text when share to Thino":"Agregar texto al principio al compartir en Thino","Add newline when append/prepend text":"Agregar nueva línea al agregar texto al principio/final","Input anything here":"Ingresa cualquier cosa aquí",Prepend:"Agregar al principio",Append:"Agregar al final",Both:"Ambos",None:"Ninguno","Hide pinned group":"Ocultar grupo fijado","Hide pinned group in thino list. False by default.":"Ocultar grupo fijado en la lista de thino. Falso por defecto.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Establecer el encabezado para el tipo de tarea de thino, por defecto el contenido de thino grabado se insertará al final del diario; si se proporciona un título, todo el contenido de thino grabado se categorizará uniformemente bajo ese título.","Different insert target for different type":"Diferente objetivo de inserción para diferente tipo","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Activa esto para establecer diferente objetivo de inserción para diferente tipo de thino, como tipo tarea o lista de thino","You can set whole diary or only part of it":"Puedes establecer todo el diario o solo una parte","Set process target":"Establecer objetivo de proceso",Custom:"Personalizado","Whole diary":"Diario completo","Set thino insert place":"Establecer lugar de inserción de thino","Set where to insert thino content":"Establecer dónde insertar contenido de thino","End of the diary":"Final del diario","Custom location":"Ubicación personalizada","Setting guide":"Guía de configuración","Details settings":"Configuraciones detalladas","Start Thino":"Iniciar Thino","About Thino Pro":"Acerca de Thino Pro",Enabled:"Habilitado",Enable:"Habilitar","Daily notes folder":"Carpeta de notas diarias","Set daily notes folder":"Establecer carpeta de notas diarias","Daily note name format":"Formato de nombre de nota diaria","Set daily note name format":"Establecer formato de nombre de nota diaria","Daily note plugin":"Complemento de nota diaria","Enable daily note plugin":"Habilitar complemento de nota diaria",Selected:"Seleccionado",Select:"Seleccionar","A classic theme for Thino with a two-column layout":"Un tema clásico para Thino con diseño de dos columnas",Classic:"Clásico","A modern theme for Thino with a three-column layout and some unique features.":"Un tema moderno para Thino con diseño de tres columnas y algunas características únicas.",Modern:"Moderno","Go and enjoy Thino":"Ve y disfruta Thino","Congrats! All settings done":"¡Felicitaciones! Todas las configuraciones completadas","Adjust settings that influence your user experience with Thino.":"Ajusta las configuraciones que influyen en tu experiencia de usuario con Thino.","Set preferences for using Thino":"Establecer preferencias para usar Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Si estás usando la versión básica de Thino, se requiere habilitar el complemento de nota diaria. Configura sus ajustes para trabajar efectivamente con él.","Go with daily note plugin":"Ir con complemento de nota diaria","Choose a theme for Thino.":"Elige un tema para Thino.","Set theme for Thino":"Establecer tema para Thino","Set up your user info for Thino.":"Configura tu información de usuario para Thino.","Get started with Thino":"Comenzar con Thino","Skip and start Thino":"Saltar e iniciar Thino","Next step":"Siguiente paso","Back to previous step":"Volver al paso anterior","Click to enable =>":"Clic para habilitar =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Esta es la barra lateral de Thino. Navega a diferentes rutas o selecciona filtro de consulta.","Click here and go to settings page.":"Haz clic aquí y ve a la página de configuración.","Click here and go to different path.":"Haz clic aquí y ve a una ruta diferente.","Select or create query filter here.":"Selecciona o crea filtro de consulta aquí.","See the status of Thinos here.":"Ve el estado de los Thinos aquí.","Search your thino quickly here.":"Busca tu thino rápidamente aquí.","Edit or create your thino here.":"Edita o crea tu thino aquí.","See your thinos here.":"Ve tus thinos aquí.","See your time status of thinos here.":"Ve tu estado de tiempo de thinos aquí.","See your tags here. Tags will be shown when thino contains tags.":"Ve tus etiquetas aquí. Las etiquetas se mostrarán cuando thino contenga etiquetas.",Done:"Hecho","Thino is ready to use. ":"Thino está listo para usar. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Puedes comenzar a usar Thino ahora. Si quieres saber más sobre Thino Pro, haz clic en el botón de abajo.","Default time prefix":"Prefijo de tiempo predeterminado","Append Text Action":"Acción de agregar texto al final","Prepend Text Action":"Acción de agregar texto al principio",Preset:"Preestablecido","Select Tags":"Seleccionar etiquetas","It is not available on small view":"No está disponible en vista pequeña","Append text":"Agregar texto al final","Prepend text":"Agregar texto al principio","Your daily note folder is not set correctly, please check your settings":"Tu carpeta de notas diarias no está configurada correctamente, por favor revisa tu configuración","Default sharing style":"Estilo de compartir predeterminado","Set the default style for sharing thino, 'Modern' by default.":'Establecer el estilo predeterminado para compartir thino, "Moderno" por defecto.',Clean:"Limpio",Minimal:"Mínimo",Gradient:"Gradiente","Thino share":"Compartir Thino","Copy to clipboard failed":"Error al copiar al portapapeles","Copy to clipboard successfully":"Copiado al portapapeles exitosamente","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Tu contenido ha sido copiado al portapapeles e insertado en el editor. Por favor inténtalo de nuevo","Share thino":"Compartir thino","Set file name after create thino":"Establecer nombre de archivo después de crear thino","You can set file name after create thino. A input box will show when you create thino.":"Puedes establecer el nombre del archivo después de crear thino. Se mostrará una caja de entrada cuando crees thino.",SPLIT:"DIVIDIR","Split by Heading 1":"Dividir por Encabezado 1","Split by Heading 2":"Dividir por Encabezado 2","Split by Heading 3":"Dividir por Encabezado 3","Insert task":"Insertar tarea","All settings have been reset to default.":"Todas las configuraciones han sido restablecidas a los valores predeterminados.","Reset all Thino settings":"Restablecer todas las configuraciones de Thino","Reset settings":"Restablecer configuraciones","Reset Thino settings to default settings.":"Restablecer configuraciones de Thino a valores predeterminados.","Task Management":"Gestión de tareas","Append completed date when task done in thino":"Agregar fecha de completado cuando la tarea se complete en thino","Append completed date when task done in thino. False by default":"Agregar fecha de completado cuando la tarea se complete en thino. Falso por defecto","Set tag for single file that Thino indexes":"Establecer etiqueta para archivo único que Thino indexa","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Cuando estableces una etiqueta aquí, Thino indexará este archivo que contiene esta etiqueta y lo mostrará en la lista. No necesitas agregar `#`.","Set tag for file type file":"Establecer etiqueta para archivo tipo archivo","Set tag for multi type file":"Establecer etiqueta para archivo multi tipo","Please input the tag":"Por favor ingresa la etiqueta","Merge thinos in to thino share image":"Fusionar thinos en imagen compartida de thino","Custom height for Thino content":"Altura personalizada para contenido de Thino","Set custom height for Thino content. Like 200px or 20rem":"Establecer altura personalizada para contenido de Thino. Como 200px o 20rem","Input height":"Ingresar altura","Submit issue":"Enviar problema","Current version":"Versión actual","Bug report":"Reporte de error","Click the button to copy debug info and open the issue page":"Haz clic en el botón para copiar información de depuración y abrir la página de problemas","Copy and go":"Copiar e ir","Debug info copied":"Información de depuración copiada","Feature request":"Solicitud de función","Submit your feature request to the issue page":"Envía tu solicitud de función a la página de problemas",Go:"Ir","Toggle query list visibility":"Alternar visibilidad de lista de consultas","Toggle tags visibility":"Alternar visibilidad de etiquetas","Toggle sidebar visibility":"Alternar visibilidad de barra lateral",Collapse:"Colapsar",Expand:"Expandir","Max height for collapse":"Altura máxima para colapsar","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"La altura máxima para colapsar thino, cuando se establece en 0, thino no colapsará. 0 por defecto. (Esto no es conteo de líneas, es altura en px.)","Render content":"Renderizar contenido","Optimize for Callout":"Optimizar para Callout","Won't render content contains more than 3 callouts automatically. True by default":"No renderizará automáticamente contenido que contenga más de 3 callouts. Verdadero por defecto","The value should be greater than":"El valor debe ser mayor que","Append Text":"Agregar texto al final","Prepend Text":"Agregar texto al principio","Thino height when collapsed":"Altura de Thino cuando está colapsado","The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)":"La altura para thino cuando está colapsado, cuando se establece en 0, thino no colapsará. 100 por defecto. (Esto no es conteo de líneas, es altura en px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Esta opción te permitirá usar otras vistas cuando el ancho de la hoja no sea suficiente. Falso por defecto.","Can select other views when leaf width is not enough":"Puede seleccionar otras vistas cuando el ancho de la hoja no es suficiente","TRASH BOX":"PAPELERA","Wait templater to finish parse before insert thino":"Esperar a que templater termine de analizar antes de insertar thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Esta opción te permitirá esperar a que templater termine de analizar antes de insertar thino, lo que puede hacer que necesites confirmar dos veces entre insertar thino. Falso por defecto.","Get thino capture extension":"Obtener extensión de captura de thino","You can capture idea/text from chrome now.":"Ahora puedes capturar idea/texto desde chrome.","Open File":"Abrir archivo","Exported CSV file":"Archivo CSV exportado","Updated At":"Actualizado el","Export to CSV":"Exportar a CSV","Quick add button on mobile navbar":"Botón de agregar rápido en barra de navegación móvil","Always show status text":"Siempre mostrar texto de estado","Support filter by metadata from file":"Soportar filtro por metadatos desde archivo","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Cuando habilites esto, podrás filtrar a través de metadatos desde archivo, como etiquetas en archivo. Pero los thinos desde canvas no están soportados. Falso por defecto.","Show source near timestamp in thino":"Mostrar fuente cerca de marca de tiempo en thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Cuando habilites esto, podrás ver la fuente cerca de la marca de tiempo en thino. Puedes establecer título en metadatos para sobrescribir esto. Falso por defecto.","Show Update Message":"Mostrar mensaje de actualización","Show update message when Thino is updated. True by default":"Mostrar mensaje de actualización cuando Thino se actualiza. Verdadero por defecto","Sync manually":"Sincronizar manualmente","Show all scrollbars":"Mostrar todas las barras de desplazamiento","TIME RANGE":"RANGO DE TIEMPO",WITHIN:"DENTRO DE","7 days":"7 días","14 days":"14 días","30 days":"30 días","3 months":"3 meses","6 months":"6 meses","1 year":"1 año","This week":"Esta semana","Last week":"Semana pasada","This month":"Este mes","Last month":"Mes pasado","This year":"Este año","Last year":"Año pasado","No history":"Sin historial","Today Remaining":"Restante hoy","Today Total":"Total hoy","Historical Statistics":"Estadísticas históricas",byTime:"Por tiempo",byTimeReverse:"Por tiempo inverso",Stat:"Estadística",Statistics:"Estadísticas","Daily Thino Count":"Conteo diario de Thino",Total:"Total",thinos:"thinos","Thino Types":"Tipos de Thino","Distribution of thino types":"Distribución de tipos de thino","Thino Status":"Estado de Thino","Distribution of thino status":"Distribución de estado de thino","Popular Tags":"Etiquetas populares","Top 10 most used tags":"Top 10 etiquetas más usadas","Thino Count":"Conteo de Thino","Hourly distribution":"Distribución por hora","Current month":"Mes actual","Monthly distribution":"Distribución mensual","30 Days":"Últimos 30 días",Year:"Año","Time Distribution":"Distribución de tiempo","When do you write thinos":"Cuándo escribes thinos","Content Length":"Longitud de contenido","Distribution of thino lengths":"Distribución de longitudes de thino","Daily Thinos":"Thinos diarios","Show Time Distribution":"Mostrar distribución de tiempo","Hide date picker":"Ocultar selector de fecha","Show date picker":"Mostrar selector de fecha","Clear filter":"Limpiar filtro","Copy link":"Copiar enlace","Copy embed link":"Copiar enlace incrustado","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter para guardar thino","Fixed strings for thinos":"Cadenas fijas para thinos","Use fixed strings for thinos":"Usar cadenas fijas para thinos","Enable to add fixed strings at the beginning or end of thinos.":"Habilitar para agregar cadenas fijas al principio o final de los thinos.","Fixed prefix for thinos":"Prefijo fijo para thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Agregar esta cadena al principio de cada thino. Admite marcadores como {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Sufijo fijo para thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Agregar esta cadena al final de cada thino. Admite marcadores como {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Conteo de palabras excedido","Word count feature":"Función de conteo de palabras","Enable real-time word count display in the editor":"Habilitar visualización de conteo de palabras en tiempo real en el editor","Maximum word count":"Conteo máximo de palabras","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Establecer un conteo máximo de palabras para thino. El editor mostrará una advertencia cuando se exceda. Establecer en 0 para ilimitado.","No linked thinos found":"No se encontraron thinos vinculados","Reference links group":"Grupo de enlaces de referencia","Enable reference links group in thino.":"Habilitar grupo de enlaces de referencia en thino.","No reference links found":"No se encontraron enlaces de referencia","Outgoing Links":"Enlaces salientes","Incoming Links":"Enlaces entrantes","Error fetching reference links":"Error al obtener enlaces de referencia","Double click behavior":"Comportamiento de doble clic","Set the behavior when double click on a thino.":"Establecer el comportamiento al hacer doble clic en un thino.","Open thino":"Abrir thino","Edit thino":"Editar thino","Go to source":"Ir a la fuente","Do nothing":"No hacer nada","Use default header in mobile view":"Usar encabezado predeterminado en vista móvil","Use default header in mobile view of thino rather than custom header.":"Usar encabezado predeterminado en vista móvil de thino en lugar de encabezado personalizado."},BW={welcome:"Bienvenue dans Mémo !",ribbonIconTitle:"Mémos",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekDaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],to:"à",year:null,month:null,"Basic Options":"Options basique","User name":"Username","Set your user name here. 'Memos 😏' By default":"Définissez votre username ici. Défaut : 'Memo 😏'","Insert after heading":"Insérer après le titre","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Vous devez définir le même titre en-dessous si vous voulez insérer et traiter des mémos sous le même titre.","Allows admonitions to be created using ":"Permet de créer des admonitions en utilisant","Process Memos below":"Insérer Mémo sous","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Seulement les entrée sous cette section/phrase dans vos notes seront considérés. S'il n'existe pas, aucune notes ne sera traité pour ce fichier.","Save Memo button label":"Titre du bouton de sauvegarde","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Le texte affiché sur le bouton de sauvegarde dans l'UI. Défaut : 'NOTEIT'","Focus on editor when open memos":"Focus sur l'éditeur lors de l'ouverture du mémo.","Focus on editor when open memos. Focus by default.":"Focus sur l'éditeur lors de l'ouverture du mémo. Focus par défaut.","Open daily memos with open memos":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open daily memos with open memos. Open by default.":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open Memos when obsidian opens":"Ouvrir Mémo quand Obsidian est ouvert.","When enable this, Memos will open when Obsidian opens. False by default.":"Quand activé, Memo sera ouvert quand Obsidian à l'ouverture d'Obsidian. Désactivé par défaut.","Hide done tasks in Memo list":"Masquer les tâches accomplies dans la liste des mémos.","Hide all done tasks in Memo list. Show done tasks by default.":"Masquer les tâches accomplies dans les mémos. Affiche les tâches accomplies par défaut.","Advanced Options":"Options avancées","UI language for date":"Langue de l'UI pour la date","Translates the date UI language. Only 'en' and 'zh' are available.":"Traduit la langue des dates dans l'UI. Seuls 'en', 'fr' et 'zh' sont disponibles. ","Default prefix":"Préfix par défaut.","Set the default prefix when create memo, 'List' by default.":"Définit le préfix par défaut lors de la création d'un mémo. Défault : 'Liste'","Default insert date format":"Format de la date insérée par défaut.","Default editor position on mobile":"Position par défaut de l'éditeur sur mobile.","Set the default date format when insert date by @, 'Tasks' by default.":"Définit le format de la date par défaut lors de l'insertion de la date par @. Défaut : 'Tâches'.","Set the default editor position on Mobile, 'Top' by default.":"Position par défaut de l'éditeur sur le mobile. Défaut : 'Haut'.","Use button to show editor on mobile":"Utilisation du bouton pour afficher l'éditeur sur le mobile.","Show Time When Copy Results":"Aficher l'heure quand les résultats sont copiés","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Place un bouton flottant pour appeler l'éditeur sur mobile. Fonctionne uniquement quand l'éditeur est placé en bas.","Show time when you copy results, like 12:00. Copy time by default.":"Affiche l'heure quand les résultats sont copiés, comme '12:00'. Copie l'heure par défaut","Show Date When Copy Results":"Affiche la date quand les résultats sont copiés","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Affiche la date quand les résultats sont copiés, comme [[2022-01-01]]. Par défaut, copie la date.","Add Blank Line Between Different Date":"Ajoute une ligne entre les différentes dates.","Add blank line when copy result with date. No blank line by default.":"Ajoute une ligne lors de la copie du résultat avec la date. Pas de ligne par défaut.","Share Options":"Options de partage","Share Memos Image Footer Start":"Début du pied de page — Partage de mémo de mémos","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Définissez ce que vous voulez ici, utilisez {ThinoNum} pour afficher le nombre de thino, {UsedDay} pour les jours. Par défaut : '{ThinoNum} Thino {UsedDay} Days.","Share Memos Image Footer End":"Fin du pied de page — Partage de mémo","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Définissez ce que vous voulez ici. Utilisez {UserName} comme username. Par défaut : '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"Sauvegarde des images partagés dans un dossier sur mobile.","Save image to folder for mobile. False by Default":"Sauvegarder les images dans un dossier sur mobile. Désactivé par défaut.","Say Thank You":"Dites Merci",Donate:"Faire un don","If you like this plugin, consider donating to support continued development:":"Si vous aimez ce plugin, envisagez de faire un don pour soutenir le développement continu :","File Name of Recycle Bin":"Nom de la corbeille","Set the filename for recycle bin. 'delete' By default":"Définition du nom de la poubelle. Défaut : 'Delete'","Set the filename for query file. 'query' By default":"Définit le nom de fichier pour les requête. Défaut : 'Query'","Use Tags In Vault":"Utiliser des tags dans le Coffre","Use tags in vault rather than only in Memos. False by default.":"Utiliser des tags du coffre plutôt que ceux que seulement dans Mémo. Désactivé par défaut.","Ready to convert image into background":"Prêt pour convertir des image en arrière-plan.",List:"Liste",Task:"Tâche",Top:"Haut",Bottom:"Bas",TAG:"TAG",DAY:"JOUR",QUERY:"RECHERCHE",EDIT:"EDITER",PIN:"PIN",UNPIN:"ÉPINGLER",DELETE:"DESÉPINGLER","CONFIRM!":"CONFIRMER !","CREATE FILTER":"CRÉER FILTRE",Settings:"Paramètres","Recycle bin":"Corbeille","About Me":"À propos de moi","Fetching data...":"Récupération des données...","Here is No Memos.":"Il n'y a pas de Memos.","Frequently Used Tags":"Tags fréquemment utilisés","What do you think now...":"Que pensez-vous maintenant...",READ:"LU",MARK:"MARQUER",SHARE:"PARTAGER",SOURCE:"SOURCE",RESTORE:"RESTAURER","DELETE AT":"SUPPRIMER","Noooop!":"Noooop!","All Data is Loaded 🎉":"Toutes les données sont chargées 🎉","Quick filter":"Filtre rapide",TYPE:"TYPE",LINKED:"LIEN","NO TAGS":"PAS DE TAGS","HAS LINKS":"A DES LIENS","HAS IMAGES":"A DES IMAGES",INCLUDE:"INCLUS",EXCLUDE:"EXCLUS",TEXT:"TEXTE",IS:"EST",ISNOT:"N'EST PAS",SELECT:"SELECTION","ADD FILTER TERMS":"AJOUTER DES TERMES FILTRÉ",FILTER:"FILTRE",TITLE:"TITRE","CREATE QUERY":"CRÉER UNE RECHERCHE","EDIT QUERY":"ÉDITER UNE RECHERCHE",MATCH:"MATCH",TIMES:"HEURE","Share Memo Image":"Partager un mémo image","↗Click the button to save":"↗Clique pour sauvegarder","Image is generating...":"Génération de l'image...","Image is loading...":"Image en chargement...","Loading...":"Chargement...","😟 Cannot load image, image link maybe broken":"😟 Impossible de charger l'image, le lien peut être brisé","Daily Memos":"Mémo quotidien","CANCEL EDIT":"ANNULER L'ÉDITION","LINK TO THE":"LIENS À","Mobile Options":"Options mobile","Don't support web image yet, please input image path in vault":"Ne supporte pas les images webs. Merci d'insérer le chemin de l'image depuis le coffre.","Background Image in Dark Theme":"Image de fond en thème sombre","Background Image in Light Theme":"Image de fond en thème clair",'Set background image in dark theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème sombre. Définir 'Daily/one.png' par exemple.",'Set background image in light theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème clair. Définir 'Daily/one.png' par exemple.",'Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Définir la composition par défaut du mémo, vous devez utiliser {TIME} comme "HH:mm" et {CONTENT} comme contenu. "{TIME} {CONTENT}" par défaut',"Default Memo Composition":"Composition par défaut du mémo","Show Tasks Label":"Afficher les étiquettes des tâches","Show tasks label near the time text. False by default":"Afficher les étiquettes des tâches à côté du texte horaire. Désactivé par défaut.","Please Open Memos First":"Merci d'ouvrir les mémos en premier"},_W={},YW={},zW={},UW={},VW={},WW={},GW={},ZW={},qW={welcome:"Bem-vindo ao Thino!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},$W={welcome:"Bem-vindo ao Memos!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of memos, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},KW={},JW={},XW={},QW={welcome:"欢迎使用 Thino ",ribbonIconTitle:"Thino",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:[null,null,null,null,null,null,null,null,null,null,null,null],weekDays:["周日","周一","周二","周三","周四","周五","周六"],weekDaysShort:["周日","周一","周二","周三","周四","周五","周六"],to:"至",year:"年",month:"月","Basic Options":"基础选项","User name":"用户名","Set your user name here. 'Memos 😏' By default":"在这里设置你喜欢的用户名。 默认为 'Thino 😏'",'You can set target heading like "# Heading" to control data location':'你可以设置目标标题,例如 "# Heading" 来控制数据的位置',"Insert after heading":"在指定标题后插入 Thino","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"若留空,则记录的 thino 内容在日记末尾插入,若填写标题,则记录的 thino 内容统一都记录在该标题下","Process Memos below":"解析指定标题后的 Thino","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"若留空,则在Thino界面会显示所有thino记录内容,若填写标题,则Thino界面只显示该标题下的内容,写入其他位置的内容不显示","Save Memo button label":"保存按钮上的文本","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"在保存按钮上展示的文本。默认为 'NOTEIT'","Focus on editor when open memos":"自动聚焦到 Thino 输入框","Focus on editor when open memos. Focus by default.":"当打开 Thino 的时候自动聚焦到 Thino 输入框。默认开启","Open daily memos with open memos":"打开每日 Thino 的时候打开 Thino 界面","Open daily memos with open memos. Open by default.":"打开每日 Thino 的时候打开 Thino 界面。默认开启","Open Memos when obsidian opens":"当开启 Obsidian 的时候自动打开 Thino","When enable this, Memos will open when Obsidian opens. False by default.":"当开启该选项, Thino 会在 Obsidian 打开时自动打开。默认不开启。","Hide done tasks in Memo list":"在 Thino 列表中隐藏已完成 Thino","Hide all done tasks in Memo list. Show done tasks by default.":"在 Thino 列表中隐藏已完成 Thino。默认不开启","Advanced Options":"进阶选项","UI language for date":"针对日期展示的语言界面","Translates the date UI language. Only 'en' and 'zh' are available.":"对日期的不同翻译。目前只能选择 'en' 和 'zh'(未来会废置)","Default prefix when save thino":"保存 Thino 时的默认前缀","Set the default prefix when create memo, 'List' by default.":"设置默认的前缀样式。默认为列表","Default insert date format":"插入日期附带的样式","Set the default date format when insert date by @, 'Tasks' by default.":"当使用 @ 来快速插入日期时,插入日期附带的样式,默认为 'Tasks' 样式","Default editor position on mobile":"在移动端上的默认编辑器位置","Set the default editor position on Mobile, 'Top' by default.":"设置在移动端上的默认编辑器位置,默认在顶部。","Use button to show editor on mobile":"当编辑器位置在底部时,用按钮来唤出编辑器","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"设置一个浮动按钮来唤出编辑器。当在移动端上启用该选项才会生效","Show Time When Copy Results":"当复制检索结果时附带时间","Show time when you copy results, like 12:00. Copy time by default.":"在复制检索结果时附带其时间,例如 12:00 。默认开启","Show Date When Copy Results":"当复制检索结果时附带日期","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"在复制检索结果时附带其日期,例如 [[2022-01-01]]。默认开启","Add Blank Line Between Different Date":"在复制日期的时候加上空行","Add blank line when copy result with date. No blank line by default.":"在复制日期的时候在相邻的日期之间加上空行。默认无空行","Share Options":"分享选项","Share Memos Image Footer Start":"分享 Thino 图片的左边页脚","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"你可以在这里设置你想要的任意文本,用 {ThinoNum} 来展示你记录的 thino 数量,{UsedDay} 来展示使用日期。默认为'{ThinoNum} Thino {UsedDay} Days'","Share Memos Image Footer End":"分享 Thino 图片的右边页脚","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"你可以在这里设置你想要的任意文本,用 {UserName} 来展示你的用户名。默认为 '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"当在移动端上时保存图片到文件夹","Save image to folder for mobile. False by Default":"当在移动端上时,保存生成的图片到文件夹","Say Thank You":"感谢开发",Donate:"捐赠","If you like this plugin, consider donating to support continued development:":"如果你喜欢这个插件,而且也希望给我买鸡腿,那么可以考虑 Github 页面右边的 Sponsor~","File Name of Recycle Bin":"回收站的文件名","Set the filename for recycle bin. 'delete' By default":"给回收站设置一个文件名。默认为'delete'","File Name of Query File":"检索文件的文件名","Set the filename for query file. 'query' By default":"设置存放检索式的文件的文件名。默认为'query'","Use Tags In Vault":"使用在库内的所有标签","Use tags in vault rather than only in Memos. False by default.":"使用在库内的而不是 Thino 内的标签。默认关闭","Don't support web image yet, please input image path in vault":"暂不支持网络图片,请使用本地图片","Ready to convert image into background":"正在将图片转换为背景图",List:"列表",Task:"任务",Top:"顶部",Bottom:"底部",TAG:"标签",DAY:"天",QUERY:"检索式",EDIT:"编辑",PIN:"置顶",UNPIN:"取消置顶",DELETE:"删除","CONFIRM!":"确定删除","CREATE FILTER":"创建检索式",Filter:"筛选",Settings:"设置","Recycle bin":"回收站","About Me":"关于","Fetching data...":"获取数据中...","Here is No Memos.":"没有找到 Thino","Frequently Used Tags":"常用标签","What do you think now...":"你现在在想什么?",READ:"阅读",MARK:"引用",SHARE:"分享",SOURCE:"来源",RESTORE:"恢复",ARCHIVE:"归档","Daily Review":"每日回顾","DELETE AT":"删除于","Noooop!":"啥都没有!","All Data is Loaded 🎉":"所有数据都加载好啦 🎉","Quick filter":"快速筛选",TYPE:"类型",LINKED:"有链接","NO TAGS":"无标签","HAS LINKS":"有超链接","HAS IMAGES":"有图片",INCLUDE:"包括",EXCLUDE:"排除",TEXT:"文本",IS:"是",AND:"和",OR:"或",LIST:"状态",ISNOT:"不是",SELECT:"选择",PATH:"路径",METADATA:"元数据","ADD FILTER TERMS":"添加检索条件",FILTER:"筛选器",TITLE:"标题","CREATE QUERY":"创建检索式","EDIT QUERY":"编辑检索式",MATCH:"匹配",TIMES:"次","Share Memo Image":"分享 Thino 图片","↗Click the button to save":"↗点击右上角的按钮来保存","Image is generating...":"图片正在生成中...","Image is loading...":"图片正在加载中...","😟 Cannot load image, image link maybe broken":"😟 无法加载图片,图片链接也许不存在","Loading...":"努力加载中...","Daily Memos":"每日 Thino","CANCEL EDIT":"取消编辑","LINK TO THE":"链接到","Mobile Options":"移动端选项","Experimental Options":"实验性选项","Background Image in Dark Theme":"深色主题的背景图","Background Image in Light Theme":"浅色主题的背景图",'Set background image in dark theme. Set something like "Daily/one.png"':'设置深色主题的背景图。请设置类似"Daily/one.png"的路径','Set background image in light theme. Set something like "Daily/one.png"':'设置浅色主题的背景图。请设置类似"Daily/one.png"的路径','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'设置默认 Thino 组成,你必须要使用 {TIME} 作为 "HH:mm" 而且要设置 {CONTENT} 作为内容识别。默认情况下, Thino 基于 "{TIME} {CONTENT}" 识别',"Default Memo Composition":"【已弃置】默认 Thino 组成","Show Tasks Label":"展示任务标签",Gallery:"画廊","Show tasks label near the time text. False by default":"在 Thino 的时间旁展示任务标签。默认情况下不展示","Please Open Memos First":"请先打开 Thino","Comment it...":"评论...",DATE:"日期",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"Obsidian Natrual DATES language 插件没启动",BEFORE:"在之前",AFTER:"在之后","Allow Comments On Memos":"允许在 Thino 上评论","You can comment on memos. False by default":"你可以在 Thino 点击图标进行评论了。默认不开启",Import:"导入","TITLE CANNOT BE NULL!":"标题不可以为空!","FILTER CANNOT BE NULL!":"筛选器不可以为空!","Comments In Original DailyNotes/Notes":"在原文件中进行评论","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"你需要安装 0.5.9 版本以上的 Dataview 插件来使用该功能","Open Memos Successfully":"成功打开 Thino ","Fetch Memos Error":"😭 Thino 获取失败","Copied to clipboard Successfully":"复制成功","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"请检查你有没有开启日记插件或者 Periodic Notes 插件且启用了日记模式","Please finish the last filter setting first":"先完善上一个过滤器吧","Close Memos Successfully":"成功关闭 Thino ","Insert as Memo":"插入内容为 Thino","Insert file as memo content":"插入文件为 Thino","Image load failed":"有个图片加载失败了😟","Content cannot be empty":"内容不能为空呀","Unable to create new file.":"无法新建文件","Failed to fetch deleted memos: ":"无法获取已删除的 Thino :","RESTORE SUCCEED":"成功恢复 Thino","DELETE SUCCEED":"删除成功","Save Memo button icon":"保存按钮上的图标","The icon shown on the save Memo button in the UI.":"你可以设置保存按钮上的图标","Fetch Memos From Particular Notes":"从指定的文件中获取 Thino",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'你可以给笔记设置指定检索式来让 Memos 可以索引到它。默认为 "#memo" ',"Allow Memos to Fetch Memo from Notes":"允许 Thino 从笔记中获取 Thino","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"使用 Memos 来管理你笔记中的 Memos,不单只 DailyNotes 中的内容。默认为关闭","Always Show Memo Comments":"评论将总是可见","Always show memo comments on memos. False by default":"当开启后评论总是会在 Thino 的下方展示。默认为关闭","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的所在文件夹","Please check your daily note plugin OR periodic notes plugin settings":"请检查你的日记插件和/或 Periodic Notes 插件的设置","Use which plugin's default configuration":"使用哪个插件的默认日记配置","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino 采用指定插件的默认配置来获取 Thino。默认为日记插件。",Daily:"日记插件","Always Show Leaf Sidebar on PC":"在 PC 上总是展示左侧栏","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"在 PC 或平板上即使页面宽度小于 875px 时都展示左侧栏。默认为关闭","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的格式","fetch more":"加载更多","Search all settings":"搜索所有设置","Random Review":"随机回顾","ARCHIVED AT":"归档于","Failed to get memos from daily notes":"无法从日记中获取 Thino","Failed to delete memo":"无法删除 Thino","CTRL + ENTER to save":"CTRL + ENTER 保存","Started from":"开始于","Custom Background Image":"自定义背景图","Set custom background image.":"设置自定义背景图","Custom Memo Footer":"自定义 Thino 页脚","Set custom memo footer.":"设置自定义 Thino 页脚","Heatmap Color Scheme":"热力图颜色","Set different color scheme for heatmap.":"设置热力图的颜色","Enable Local Http Server":"启用本地 HTTP 服务器","Memos Http Server Port":"Thino HTTP 服务器端口","Set memos http server port to listen. '43999' by default":"设置 Thino HTTP 服务器端口。默认为 '43999'","Live-Preview Mode OR Source Mode.":"基于 Thino 的所见即所得模式(默认) 或者 源码模式,你可以自己选择适合自己的输入体验。","Default Editor Mode":"默认编辑器模式","Save type for Thino":"Thino 保存类型",DAILY:"日记",MULTI:"多文件",CANVAS:"画布",FILE:"单文件",ALL:"所有","Failed to create daily note, check if it exists.":"无法创建日记,请检查是否存在文件夹","Failed to create daily note. Please check if you created a folder for daily notes.":"无法创建日记,请检查是否存在日记文件夹","After you verify your account, please refresh this page.":"验证成功后,请刷新页面。",Verify:"去验证","Oops! You forget to verify insider account":"内测账户验证失败","If you have any questions, please contact us.":"如果你有任何问题,请联系我们。","Delete Thino Directly":"直接删除 Thino","When delete thino directly, it will not be moved to trash. False by default.":"当直接删除 Thino 时,不会移动到回收站。默认为关闭","Get activation code":"获取激活码","Input activation code here":"在这里输入激活码","Copy Thino id":"获取 Thino id","Activate Pro Version":"激活专业版","Please copy Thino id first":"请先获取 Thino id",'You can set folder name with file name like "folder/file"':'你可以设置例如 "folder/file" 的文件夹名+文件名的搭配来存放在指定文件夹','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'你可以设置例如 "folder1/folder2/folder3" 的文件夹名来创建子文件夹',"Default save type":"默认保存类型",'Set the default save type for thino. "DAILY" by default':'设置 Thino 的默认保存类型。默认为 "日记"',"Enable opening thino globally":"全局唤醒 Thino","Enable opening thino globally. False by default.":"全局唤醒 Thino。默认为关闭","Key for opening thino globally":"全局唤醒 Thino 的快捷键","Set key for opening thino globally. CTRL + SHIFT + T by default.":"设置全局唤醒 Thino 的快捷键。默认为 CTRL + SHIFT + T","Sync Thino via PKMer":"通过 PKMer 同步 Thino",Unlink:"取消链接",Link:"链接","Connect to PKMer Sync, you can check it in ":"连接到 PKMer 同步,你可以在该链接中查看:","PKMer Sync":"PKMer 同步","Remove successfully":"移除成功",Deactivate:"取消激活",Remove:"移除","Confirm?":"确认?","Sync Status":"同步状态","Start or stop sync":"开始或停止同步","Stop sync successfully":"停止同步成功","Start sync successfully":"开始同步成功",Stop:"停止",Start:"开始","Show thino near mouse":"在鼠标附近展示 Thino","Query not found":"检索式未找到","Send to clipboard successfully":"发送到剪贴板成功","Thino - Failed to start HTTP server, please check the port is available.":"Thino - 启动 HTTP 服务器失败,请检查端口是否可用。","Thino - Started HTTP server on port":"Thino - 启动 HTTP 服务器成功,端口为","Thino - Terminated HTTP server":"Thino - 终止 HTTP 服务器","File not exist":"文件不存在","Thino not found":"Thino 未找到","File not found for the given thino path, is creating a new file":"未找到承载指定 Thino 的文件,正在创建新文件","Saved sync token successfully":"保存同步令牌成功","Failed to find daily notes folder":"未找到日记文件夹","Please install obsidian-hover-editor plugin first":"请先安装 obsidian-hover-editor 插件","Copied app id successfully":"复制 app id 成功","Please input token first":"请先输入 token","Please enable sync first":"请先启用同步","Init Failed":"初始化失败","Folder not found for the given thino path, is creating a new folder":"未找到承载指定 Thino 的文件夹,正在创建新文件夹","File not found for the given thino path":"未找到承载指定 Thino 的文件","Failed to read current daily note, check if it exists.":"无法读取日记文件,请检查是否存在","Verify successfully":"验证成功","Failed to verify":"验证失败","Failed to save":"保存失败","Failed to login, please login again":"登录已过期,请重新登录","COPY FAILED":"复制失败","COPY SUCCEED":"复制成功","Copy selected text":"复制选中文本","Copy thino":"复制",COPY:"复制","This is a pro feature, please upgrade to pro version to use it.":"这是专业版功能,请升级到专业版来使用它。","You can get pro version from: ":"你可以从这里获取专业版:",Save:"保存",Cancel:"取消","Thino Daily Target":"Thino 每日目标",Input:"输入","#Tag":"#标签","to create tag":"来创建标签","You have verified your account. Congrats!":"你已经验证了你的账户。恭喜!","Pro features":"专业版功能","Target Thino Count":"目标 Thino 数量",on:"在","Switch waterfall view":"切换瀑布流视图","Switch view":"切换视图","Switch list view":"切换列表视图","Set daily target":"设置每日目标","Thino Save To: ":"Thino 保存到:","Enter fullscreen mode":"进入全屏模式","Exit fullscreen mode":"退出全屏模式",words:"字词",word:"字","Return To Home Page":"返回首页","No thinos to review!":"没有 thino 需要回顾!","Thinos to review":"Thino 需要回顾","Start Review":"开始回顾",Hard:"困难",Good:"良好",Easy:"简单",Again:"重来","Daily Progress":"每日进度","Clear all review data":"清除所有回顾数据","Show stats":"显示统计","Hide stats":"隐藏统计",Remaining:"剩余","Total Reviews":"总回顾","Today, you have reviewed all your thinos!":"今天你已经回顾了所有 thino!","Daily review limit reached! Come back tomorrow.":"每日回顾上限已达到!明天再来吧。","Open thino in center window":"在中心窗口打开 thino","Open thino in float window":"在浮动窗口打开 thino","Open thino in right sidebar":"在右侧边栏打开 thino","Open thino in left sidebar":"在左侧边栏打开 thino","Show thino editor":"显示 thino 编辑器","Toggle minimal mode":"切换 Minimal 模式","Focus on thino editor":"聚焦到 thino 编辑器","ReSync web thinos to local":"重新同步 web 上的 thino 到本地","Sync local thinos to web":"同步本地的 thino 到 web","Show daily thino":"显示每日 thino 视图","Focus on search bar":"聚焦到搜索栏","Show-thino in popover(Hover editor)":"在弹出框中显示 thino","Center window":"中心窗口","Float window":"浮动窗口","Right sidebar":"右侧边栏","Left sidebar":"左侧边栏","Save thino type when sync local":"同步本地时保存的 thino 类型","Set the default save thino type when sync local, FILE by default.":"设置同步本地时保存的 thino 类型,默认为单文件。","Sync service":"同步服务","Pro verification status":"专业版激活状态","Live-preview":"所见即所得",Source:"源码",General:"通用",Thino:"Thino",Theme:"主题",Share:"分享",Interface:"界面",Advanced:"进阶","Global copy":"全局复制","Set the folder name":"设置文件夹名","Set the filename":"设置文件名","Set the filename for current location file":"设置当前位置文件的文件名","Switch calendar type":"切换日历类型",alphabetical:"按名称(A-Z)",alphabeticalReverse:"按名称(Z-A)",byCount:"按使用次数(从高到低)",byCountReverse:"按使用次数(从低到高)","Type here":"在这里输入",Today:"今天",Yesterday:"昨天","Last 7 days":"最近 7 天","Last 30 days":"最近 30 天","Last 90 days":"最近 90 天","Last 180 days":"最近 180 天","Last 365 days":"最近 365 天",Found:"被找到","Copy filtered thinos":"复制筛选的 thino","Bulk delete":"批量删除","Bulk archive":"批量归档","Bulk tag operation":"标签编辑","Bulk restore":"批量恢复","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"如果你禁用了日记插件,可能会导致 thino 无法被正确删除。请启用插件后再试一次。",Preview:"预览","Set and save":"设置并保存","Show day mark in thino list":"在 Thino 列中展示日期标记","Show day mark on the top of daily range thino. False by default.":"在 Thino 列中展示日期标记。默认为关闭","Click to expand or fold, Cmd+Click to show all thinos of the day":"点击展开或折叠,Cmd+点击展示当天所有 thino","You can buy a license from":"你可以从这里购买许可证","No thinos in range":"该范围内没有 thino",Month:"月视图",Week:"周视图",Day:"日视图",Agenda:"日程视图",Tomorrow:"明天",Previous:"往前",Next:"往后","Search all columns...":"搜索所有的列...","Basic Info":"基础信息","Additional Info":"附加信息","Created At":"创建于",Content:"内容","Thino Type":"Thino 类型","Source Type":"来源类型","Row status":"归档状态",Path:"路径","Pinned Status":"置顶状态",Table:"表格",Chat:"聊天",Moments:"动态",Waterfall:"瀑布流",Calendar:"日历","Go to page":"跳转到页",Page:"页",Show:"展示",rows:"行","Temp Filter":"临时筛选器","Set the heading for saving thino":"设置保存 Thino 的标题","# Heading":"# 标题","Open link directly in Thino view":"Thino 视图内直接打开双链","Day mark range":"日期标记范围","Set the range of day mark. Day by default.":"设置日期标记的范围,默认为天","Thino is locked":"Thino 已锁定","Please unlock Thino by input password":"请输入密码来解锁 Thino","Auto Download Image":"自动下载图片","Auto download image when save to thino. 'false' by default":"当保存到 Thino 时自动下载图片。默认为 'false'","Thino Http IP Type":"Thino HTTP 服务器 IP 类型","Set Thino http server ip to listen. 'localhost' by default":"设置 Thino HTTP 服务器 IP。默认为 'localhost'","Password to lock Thino":"锁定 Thino 的密码",Unlock:"解锁",Locked:"已锁定","Password is incorrect":"密码错误",Lock:"锁定","Need password to unlock Thino":"需要密码来解锁 Thino","You have not set a password or enable this feature yet":"你还没有设置密码或者启用该功能",Password:"密码","Password for Thino":"Thino 的密码","Please input your password to change password settings":"请输入原来的密码来修改密码设置","Please input your password":"请输入密码","Lock thino":"锁定 Thino",date:"日期",time:"时间",event:"事件","Add tag position":"添加标签位置","Set the position of the tag when adding tag automatically":"设置自动添加标签的位置","Add tag automatically":"自动添加标签","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"在创建 Thino 和筛选标签时,将标签添加到 Thino 内容的末尾或开头","Add tag with new line":"添加标签时换行","Add tag with new line when adding tag automatically":"自动添加标签时换行","Input to select more tags":"输入来选择更多标签","Tag Bulk Edit":"标签批量编辑","Tag Bulk Select":"标签批量选择","Exist Tags":"已有标签","Selected Tags":"已选标签","Click to remove exist tag":"点击移除已有标签","Click to remove selected tag":"点击移除已选标签","Select tags":"选择标签","Input to select exist tag":"输入来选择已有标签",Beginning:"开头",End:"末尾","Chat view style":"聊天视图样式","Set the style of chat view":"设置聊天视图的样式","Background image for moments view":"动态视图的背景图","Set the background image for moments view":"设置动态视图的背景图","Icon for moments/chat view/share image":"动态/聊天视图/分享图的头像","Set the icon for moments/chat view/share image":"设置动态/聊天视图/分享图的头像","Quote for moments view/share image":"动态视图/分享图的个性签名","Set the quote for moments view/share image":"设置动态视图/分享图的个性签名","Theme for Thino":"Thino 主题","Set the theme for Thino":"设置 Thino 的主题","Interface Details":"界面详情","Task amount":"任务数量","Thino status":"Thino 状态","Used tags":"使用的标签","Used days":"使用的天数","Most active day":"最活跃的一天","Most active hour":"最活跃的一小时","Thino amount":"Thino 数量","No content to generate.":"没有内容可以生成。","Image generated successfully.":"图片生成成功。","Failed to generate image.":"图片生成失败。","Share filtered thinos as image":"分享筛选的 Thino 为图片","Latest version":"最新版本","Previous version":"之前版本","Thino update info":"Thino 更新信息","Debug info copied to clipboard":"调试信息已复制到剪贴板","Copy debug info":"复制调试信息","Failed to load changelog":"无法加载更新日志","View online":"在线查看",ChangeLog:"更新日志","Please open thino first":"请先打开 Thino","Insert editor":"插入编辑器","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"请在 Thino 设置中为多文件设置不同的路径,日记文件夹与多文件保存路径重复,或者存在被重复读取可能","Default time prefix for thino in daily notes":"日记中 Thino 的默认时间前缀","Set default time prefix for thino in daily notes.":"设置日记中 Thino 的默认时间前缀","Save image successfully":"保存图片成功","User quote":"用户签名","Set user quote for thino":"设置用户签名","User icon":"用户头像","Set user icon for thino. You can input http/https link or file path in vault.":"设置用户头像。你可以设置 http/https 链接或者 vault 中的文件路径。","User info":"用户信息","Copy filtered results":"复制筛选结果","Share image":"分享图片",Default:"默认",Gray:"灰色",Grass:"草绿",Flame:"火焰",Olive:"橄榄",Ice:"冰",Magenta:"品红","Daily notes":"日记相关",Editor:"编辑器","Append/prepend text when share to Thino":"分享到 Thino 时添加/前置文本","Append text when share to Thino":"分享到 Thino 时添加文本","Prepend text when share to Thino":"分享到 Thino 时前置文本","Add newline when append/prepend text":"添加换行符",Prepend:"前置",Append:"后置",Both:"两者",None:"无","Hide pinned group":"隐藏置顶分组","Hide pinned group in thino list. False by default.":"隐藏置顶的 Thino 分组。默认为关闭","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"设置 Thino 任务类型的标题,如果提供了标题,所有记录的 Thino 内容将统一归类到该标题下。","Different insert target for different type":"不同类型的 Thino 有不同的插入目标","Toggle this to set different insert target for different type of thino, like task or list type of thino":"切换此选项以为不同类型的 Thino 设置不同的插入目标,例如任务或列表类型的 Thino","Set process target":"设置处理目标","You can set whole diary or only part of it":"你可以设置整个日记或者其中的一部分",Custom:"自定义","Whole diary":"整个日记","Set thino insert place":"设置 Thino 插入位置","Set where to insert thino content":"设置 Thino 内容插入位置","End of the diary":"日记的末尾","Custom location":"自定义位置","Setting guide":"设置流程","Details settings":"详细设置","Start Thino":"开始 Thino","About Thino Pro":"关于 Thino 专业版",Enabled:"已启用",Enable:"启用","Daily notes folder":"日记文件夹","Set daily notes folder":"设置日记文件夹","Daily note name format":"日记文件名格式","Set daily note name format":"设置日记文件名格式","Daily note plugin":"日记插件","Enable daily note plugin":"启用日记插件",Selected:"已选择",Select:"选择","A classic theme for Thino with a two-column layout":"Thino 的经典主题,采用两列布局",Classic:"经典","A modern theme for Thino with a three-column layout and some unique features.":"Thino 的现代主题,采用三列布局和一些独特的功能。",Modern:"现代","Go and enjoy Thino":"去享受 Thino 吧","Congrats! All settings done":"恭喜!所有设置已完成","Adjust settings that influence your user experience with Thino.":"调整影响你使用 Thino 的设置。","Set preferences for using Thino":"设置使用 Thino 的偏好","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"如果你使用的是 Thino 基础版,启用日记插件是必须的。配置其设置以有效地使用它。","Go with daily note plugin":"使用日记插件","Choose a theme for Thino.":"选择 Thino 的主题。","Set theme for Thino":"设置 Thino 的主题","Set up your user info for Thino.":"设置你的用户信息。","Get started with Thino":"开始使用 Thino","Skip and start Thino":"跳过并开始 Thino","Next step":"下一步","Back to previous step":"返回上一步","Click to enable =>":"点击启用 =>","This is Thino's sidebar. Navigate to different path or select query filter.":"这是 Thino 的侧边栏。你可以导航到不同的路径或选择查询过滤器。","Click here and go to settings page.":"点击这里并转到设置页面。","Click here and go to different path.":"点击这里并转到不同的路径。","Select or create query filter here.":"在这里选择或创建查询过滤器。","See the status of Thinos here.":"在这里看到 Thino 的状态。","Search your thino quickly here.":"在这里快速搜索你的 Thino。","Edit or create your thino here.":"在这里编辑或创建你的 Thino。","See your thinos here.":"在这里看到你的 Thino。","See your time status of thinos here.":"在这里看到你的 Thino 时间状态。","See your tags here. Tags will be shown when thino contains tags.":"在这里看到你的标签。当 Thino 包含标签时,标签将显示。",Done:"完成","Thino is ready to use. ":"Thino 已准备好使用。","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"你现在可以开始使用 Thino 了。如果你想了解更多关于 Thino 专业版的信息,请点击下面的按钮。","Default time prefix":"默认时间前缀","Append Text Action":"分享到 Thino 时的后置文本动作","Prepend Text Action":"分享到 Thino 时的前置文本动作",Preset:"预设","Select Tags":"选择标签","It is not available on small view":"在窄的视图中不可用","Append text":"在末尾添加文本","Prepend text":"在开头添加文本","Your daily note folder is not set correctly, please check your settings":"你的日记文件夹设置不正确,请检查你的设置","Default sharing style":"默认分享样式","Select the font for the memo content":"选择备忘录内容的字体","Select the background for the memo image":"选择备忘录图片的背景","Select the content type for the left bottom area":"选择左下角区域的内容类型","Default text":"默认文本","Activity heatmap":"活动热图","Left bottom content":"左下角内容",Font:"字体",Background:"背景","Default font":"默认字体","Orange gradient":"橙色渐变","Blue gradient":"蓝色渐变","Green gradient":"绿色渐变","Pink gradient":"粉色渐变","Image read failed, please try again":"图片读取失败,请重试","Please select a valid image file":"请选择有效的图片文件","Default background":"默认背景","Select local image":"选择本地图片","Image file cannot exceed 5MB":"图片文件不能超过 5MB","Font size":"字体大小","Adjust the font size":"调整字体大小","Set the default style for sharing thino, 'Modern' by default.":'设置 Thino 的默认分享样式,默认为"现代"。',Clean:"清爽",Minimal:"极简",Gradient:"渐变","Thino share":"Thino 分享","Copy to clipboard failed":"复制到剪贴板失败","Copy to clipboard successfully":"复制到剪贴板成功","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"你的内容已经复制到剪贴板,并插入到编辑器中。请再试一次","Share thino":"分享 Thino","Set file name after create thino":"创建 Thino 后设置文件名","You can set file name after create thino. A input box will show when you create thino.":"你可以在创建 Thino 后设置文件名。当你创建 Thino 时,会显示一个输入框。",SPLIT:"分割","Split by Heading 1":"按一级标题分割","Split by Heading 2":"按二级标题分割","Split by Heading 3":"按三级标题分割","Insert task":"插入任务","All settings have been reset to default.":"所有设置已重置为默认值。","Reset all Thino settings":"重置所有 Thino 设置","Reset settings":"重置设置","Reset Thino settings to default settings.":"将 Thino 设置重置为默认设置。","Task Management":"任务管理","Append completed date when task done in thino":"在 Thino 中的任务完成时添加完成日期","Append completed date when task done in thino. False by default":"在 Thino 中的任务完成时添加完成日期。默认为关闭","Set tag for single file that Thino indexes":"Thino 会索引被设置标签的单文件","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"当你在这里设置一个标签时,Thino 会索引包含这个标签的文件,并在列表中显示。不需要添加 `#`。","Set tag for file type file":"为单文件类型文件设置标签","Set tag for multi type file":"为多文件类型文件设置标签","Please input the tag":"请输入标签","Merge thinos in to thino share image":"合并 Thino 到 Thino 分享图片","Custom height for Thino content":"自定义 Thino 内容高度","Set custom height for Thino content. Like 200px or 20rem":"设置 Thino 内容的自定义高度。如 200px 或 20rem","Input height":"输入高度","Submit issue":"提交问题","Current version":"当前版本","Bug report":"Bug 报告","Click the button to copy debug info and open the issue page":"点击按钮复制调试信息并打开问题页面","Copy and go":"复制并前往","Debug info copied":"调试信息已复制","Feature request":"功能请求","Submit your feature request to the issue page":"提交你的功能请求到问题页面",Go:"前往","Toggle query list visibility":"切换 Query 列表可见性","Toggle tags visibility":"切换标签可见性","Toggle sidebar visibility":"切换侧边栏可见性",Collapse:"收起",Expand:"展开","Max height for collapse":"折叠的最大高度","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Thino 折叠的最大高度,设置为 0 时,Thino 不会折叠。默认为 0。(这不是行数,而是像素高度值)","Render content":"渲染内容","Optimize for Callout":"优化 Callout 渲染性能问题","Won't render content contains more than 3 callouts automatically. True by default":"不会自动渲染包含超过 3 个 Callout 的内容。默认为开启","The value should be greater than":"值应大于","Append Text":"后置文本","Prepend Text":"前置文本","Thino height when collapsed":"Thino 折叠时的高度","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Thino 折叠时的高度,当设置为 0 时,完全折叠。默认为 100。(这不是行数,而是像素高度值)","This option will allow you use other views when leaf width is not enough. False by default.":"当页面宽度不够时,可以选择其他视图。默认为关闭。","Can select other views when leaf width is not enough":"当页面宽度不够时,可以选择其他视图","TRASH BOX":"回收站","Wait templater to finish parse before insert thino":"在插入 Thino 之前等待 Templater 完成解析","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"此选项将允许您在插入 Thino 之前等待 Templater 完成解析,这可能会导致您在插入 Thino 之间需要确认两次。默认为关闭。","Get thino capture extension":"获取 Thino 剪裁扩展","You can capture idea/text from chrome now.":"你现在可以从 Chrome 中捕获想法/文本。","Open File":"打开文件","Exported CSV file":"导出的 CSV 文件","Updated At":"更新于","Export to CSV":"导出为 CSV","Quick add button on mobile navbar":"移动端导航栏的快速添加按钮","Always show status text":"始终显示状态文本","Support filter by metadata from file":"支持通过文件中的元数据进行筛选","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"启用后,你可以通过文件中的元数据进行筛选,例如文件中的标签。但画布中的 Thino 不支持。默认为关闭。","Show source near timestamp in thino":"在 Thino 时间戳旁显示 Thino 的来源","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"启用后,你可以在 Thino 时间戳旁看到 Thino 的来源。你可以在元数据中设置 title 来覆盖文件名。默认为关闭。","Show Update Message":"显示更新消息","Show update message when Thino is updated. True by default":"Thino 更新时显示更新消息。默认为开启","Sync manually":"手动同步","Show all scrollbars":"显示所有滚动条","TIME RANGE":"时间范围",WITHIN:"在内","7 days":"7天","14 days":"14天","30 days":"30天","3 months":"3个月","6 months":"6个月","1 year":"1年","This week":"本周","Last week":"上周","This month":"本月","Last month":"上月","This year":"今年","Last year":"去年","No history":"没有历史记录","Today Remaining":"今日剩余","Today Total":"今日总计","Historical Statistics":"历史统计",byTime:"按时间",byTimeReverse:"按时间反序",Stat:"统计",Statistics:"统计","Daily Thino Count":"每日 Thino 数量",Total:"总计",thinos:"thinos","Thino Types":"Thino 类型","Distribution of thino types":"Thino 类型分布","Thino Status":"Thino 状态","Distribution of thino status":"Thino 状态分布","Popular Tags":"常用标签","Top 10 most used tags":"Top 10 常用标签","Thino Count":"Thino 数量","Hourly distribution":"每小时分布","Current month":"当前月份","Monthly distribution":"每月分布","30 Days":"过去 30 天",Year:"年份","Time Distribution":"时间分布","When do you write thinos":"你什么时候写 Thino","Content Length":"内容长度","Distribution of thino lengths":"Thino 长度分布","Daily Thinos":"每日 Thino","Show Time Distribution":"显示时间分布","Hide date picker":"隐藏日期选择器","Show date picker":"显示日期选择器","Clear filter":"清除筛选","Copy link":"复制链接","Copy embed link":"复制嵌入链接","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter 保存 Thino","Fixed strings for thinos":"固定字符串","Use fixed strings for thinos":"使用固定字符串","Enable to add fixed strings at the beginning or end of thinos.":"启用为每个 Thino 添加固定字符串。","Fixed prefix for thinos":"固定前缀","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每个 Thino 的开头添加此字符串。支持占位符,如 {{TIME|YYYYMMDDHHmmss}}。","Fixed suffix for thinos":"固定后缀","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每个 Thino 的末尾添加此字符串。支持占位符,如 {{TIME|YYYYMMDDHHmmss}}。","Word count exceeded":"字数超出限制","Word count feature":"字数统计","Enable real-time word count display in the editor":"启用实时字数显示","Maximum word count":"最大字数","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"设置 Thino 的最大字数。当超过时,编辑器将显示警告。设置为 0 时,没有限制。","No linked thinos found":"没有找到链接的 Thino","Reference links group":"链接组","Enable reference links group in thino.":"在 Thino 中启用链接组。","No reference links found":"没有找到链接","Error fetching reference links":"获取链接失败","Outgoing Links":"出链","Incoming Links":"入链","Double click behavior":"双击行为","Set the behavior when double click on a thino.":"设置双击 Thino 的行为。","Open thino":"打开 Thino","Edit thino":"编辑 Thino","Go to source":"前往来源","Do nothing":"什么都不做","Use default header in mobile view":"使用默认的移动端头部","Use default header in mobile view of thino rather than custom header.":"使用默认的移动端头部,而不是自定义的头部。","Ignore folders for multi type":"忽略多文件类型文件夹","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"设置多文件类型时忽略的文件夹。用逗号 (,) 分隔多个文件夹。","folder1,folder2/subfolder":"folder1,folder2/subfolder","Using block link when dragging a thino":"拖动 Thino 以插入连结","Using block link when dragging a thino for daily":"拖动 Thino 以插入连结到日记","Matched via tag in content":"通过内容中的标签匹配","Matched via tag in file":"通过文件中的标签匹配","Focus on editor when open":"打开时聚焦编辑器","Focus on editor when open. True by default.":"打开时聚焦编辑器。默认为开启","Show scroll to top button":"显示滚动到顶部按钮","Show scroll to top button. True by default":"显示滚动到顶部按钮。默认为开启","Zoom image by default":"默认缩放图片","Zoom image by default when viewing image.":"查看图片时默认缩放图片。","View archive in random review":"在随机回顾中查看归档的 Thino","View archived thinos in random review. True by default":"在随机回顾中查看归档的 Thino。默认为开启","Linked by":"链接自",Linked:"链接",DUPLICATE:"复制","Show scrollbars in all thino views.":"在所有 Thino 视图中显示滚动条。","Drag to paste content":"拖动粘贴内容","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"你可以通过拖动而不是粘贴块链接来将内容从其他应用粘贴到 Thino 中。","Dragging behavior":"拖动行为","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"控制拖动 Thino 的行为。默认粘贴块链接。块链接选项仅在源类型为日记时有效。","Block link":"块链接","Quick capture tool that allows you to create and manage your ideas, tasks, and more.":"快速捕获工具,允许你创建和管理你的想法、任务等。",About:"关于",Text:"文本","Open Documentation":"打开文档",Documentation:"文档",Version:"版本","View the documentation for this plugin":"查看此插件的文档","Activate Pro":"激活专业版",Pro:"专业版","Activated Pro":"已激活专业版",Tasks:"任务","Show release notes":"显示发布说明","Show release notes when Thino is updated. True by default":"显示发布说明当 Thino 更新时。默认为开启","Open change log":"打开更新日志","Change log":"更新日志","View the change log for this plugin":"查看此插件的更新日志"},eG={welcome:"歡迎使用 Thino",ribbonIconTitle:"Thino",to:"至",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weekDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],weekDaysShort:["日","一","二","三","四","五","六"],year:null,month:null,"Basic Options":"基本選項","User name":"使用者名稱","Set your user name here. 'Memos 😏' By default":"設定您的使用者名稱。預設為 'Thino 😏'",'You can set target heading like "# Heading" to control data location':'您可以設定目標標題如 "# 標題" 來控制資料位置',"Insert after heading":"在標題後插入","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"如果留空,記錄的 thino 內容將插入日記末尾;如果提供標題,所有記錄的 thino 內容將統一歸類在該標題下。","Allows admonitions to be created using ":"允許使用以下方式創建提示 ","Process Memos below":"在以下處理 thino","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"如果留空,Thino 介面將顯示所有 thino 記錄內容;如果提供標題,Thino 介面將只顯示該標題下的內容,其他地方寫的內容將不會顯示。","Save Memo button label":"儲存 thino 按鈕標籤","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"UI 中儲存 Thino 按鈕顯示的文字。預設為 'NOTEIT'。","Focus on editor when open memos":"開啟 thino 時聚焦編輯器","Focus on editor when open memos. Focus by default.":"開啟 thino 時聚焦編輯器。預設聚焦。","Open daily memos with open memos":"開啟 thino 時開啟每日 thino","Open daily memos with open memos. Open by default.":"開啟 thino 時開啟每日 thino。預設開啟。","Open Memos when obsidian opens":"Obsidian 開啟時開啟 Thino","When enable this, Memos will open when Obsidian opens. False by default.":"啟用此選項時,Obsidian 開啟時將開啟 Thino。預設為關閉。","Hide done tasks in Memo list":"在 Thino 列表中隱藏已完成的任務","Hide all done tasks in Memo list. Show done tasks by default.":"在 Thino 列表中隱藏所有已完成的任務。預設顯示已完成的任務。","Advanced Options":"進階選項","UI language for date":"日期 UI 語言","Translates the date UI language. Only 'en' and 'zh' are available.":"翻譯日期 UI 語言。僅支援 'en' 和 'zh'。","Default prefix when save thino":"儲存 thino 時的預設前綴","Set the default prefix when create memo, 'List' by default.":"創建 thino 時的預設前綴,預設為 'List'。","Default insert date format":"預設插入日期格式","Set the default date format when insert date by @, 'Tasks' by default.":"使用 @ 插入日期時的預設格式,預設為 'Tasks'。","Default editor position on mobile":"行動裝置上的預設編輯器位置","Set the default editor position on Mobile, 'Top' by default.":"設定行動裝置上的預設編輯器位置,預設為 'Top'。","Use button to show editor on mobile":"在行動裝置上使用按鈕顯示編輯器","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"在行動裝置上設定浮動按鈕來呼叫編輯器。僅當編輯器位於底部時有效。","Show Time When Copy Results":"複製結果時顯示時間","Show time when you copy results, like 12:00. Copy time by default.":"複製結果時顯示時間,如 12:00。預設複製時間。","Show Date When Copy Results":"複製結果時顯示日期","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"複製結果時顯示日期,如 [[2022-01-01]]。預設複製日期。","Add Blank Line Between Different Date":"不同日期間添加空行","Add blank line when copy result with date. No blank line by default.":"複製帶日期的結果時添加空行。預設不添加空行。","Share Options":"分享選項","Share Memos Image Footer Start":"分享 Thino 圖片頁尾開始","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"在此設定任何您想要的內容,使用 {ThinoNum} 顯示 thino 數量,{UsedDay} 顯示天數。預設為 '{ThinoNum} Thino {UsedDay} Days'","Share Memos Image Footer End":"分享 Thino 圖片頁尾結束","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"在此設定任何您想要的內容,使用 {UserName} 作為您的使用者名稱。預設為 '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"為行動裝置將分享的圖片儲存到資料夾","Save image to folder for mobile. False by Default":"為行動裝置將圖片儲存到資料夾。預設為關閉","Say Thank You":"說謝謝",Donate:"贊助","If you like this plugin, consider donating to support continued development:":"如果您喜歡這個外掛,請考慮贊助以支持持續開發:","File Name of Recycle Bin":"回收桶檔案名稱","Set the filename for recycle bin. 'delete' By default":"設定回收桶的檔案名稱。預設為 'delete'","File Name of Query File":"查詢檔案名稱","Set the filename for query file. 'query' By default":"設定查詢檔案的檔案名稱。預設為 'query'","Use Tags In Vault":"使用儲存庫中的標籤","Use tags in vault rather than only in Memos. False by default.":"使用儲存庫中的標籤而不是僅在 Thino 中使用。預設為關閉。","Ready to convert image into background":"準備將圖片轉換為背景",List:"列表",Task:"任務",Top:"頂部",Bottom:"底部",TAG:"標籤",DAY:"日",QUERY:"查詢",EDIT:"編輯",PIN:"釘選",UNPIN:"取消釘選",DELETE:"刪除","CONFIRM!":"確認!","CREATE FILTER":"創建過濾器","Comment it...":"添加評論...",Settings:"設定","Recycle bin":"回收桶","About Me":"關於我","Fetching data...":"獲取資料中...","Here is No Memos.":"這裡沒有 Thino。","Frequently Used Tags":"常用標籤","What do you think now...":"你現在在想什麼...",READ:"閱讀",MARK:"標記",SHARE:"分享",SOURCE:"來源",RESTORE:"還原",ARCHIVE:"封存","Daily Review":"每日回顧","DELETE AT":"刪除於","Noooop!":"不要!","All Data is Loaded 🎉":"所有資料已載入 🎉","Quick filter":"快速過濾",TYPE:"類型",LINKED:"已連結","NO TAGS":"無標籤","HAS LINKS":"有連結","HAS IMAGES":"有圖片",INCLUDE:"包含",EXCLUDE:"排除",TEXT:"文字",IS:"是",AND:"且",OR:"或",LIST:"列表",ISNOT:"不是",PATH:"路徑",METADATA:"元資料",SELECT:"選擇","ADD FILTER TERMS":"添加過濾條件",FILTER:"過濾",Filter:"過濾",TITLE:"標題","CREATE QUERY":"創建查詢","EDIT QUERY":"編輯查詢",MATCH:"匹配",TIMES:"次數","Share Memo Image":"分享 Thino 圖片","↗Click the button to save":"↗點擊按鈕儲存","Image is generating...":"圖片生成中...","Image is loading...":"圖片載入中...","Loading...":"載入中...","😟 Cannot load image, image link maybe broken":"😟 無法載入圖片,圖片連結可能已損壞","Daily Memos":"每日 Thino","CANCEL EDIT":"取消編輯","LINK TO THE":"連結到","Mobile Options":"行動裝置選項","Experimental Options":"實驗性選項","Don't support web image yet, please input image path in vault":"尚不支援網路圖片,請輸入儲存庫中的圖片路徑","Background Image in Dark Theme":"深色主題背景圖片","Background Image in Light Theme":"淺色主題背景圖片",'Set background image in dark theme. Set something like "Daily/one.png"':'設定深色主題的背景圖片。設定類似 "Daily/one.png" 的路徑','Set background image in light theme. Set something like "Daily/one.png"':'設定淺色主題的背景圖片。設定類似 "Daily/one.png" 的路徑','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'設定預設 thino 組成,您應該使用 {TIME} 作為 "HH:mm" 和 {CONTENT} 作為內容。預設為 "{TIME} {CONTENT}"',"Default Memo Composition":"[已棄用] 預設 Thino 組成","Show Tasks Label":"顯示任務標籤",Gallery:"畫廊","Show tasks label near the time text. False by default":"在時間文字旁顯示任務標籤。預設為關閉","Please Open Memos First":"請先開啟 Thino",DATE:"日期",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_未啟用",BEFORE:"之前",AFTER:"之後","Allow Comments On Memos":"允許在 Thino 上評論","You can comment on memos. False by default":"您可以在 thino 上評論。預設為關閉",Import:"匯入","TITLE CANNOT BE NULL!":"標題不能為空!","FILTER CANNOT BE NULL!":"過濾器不能為空!","Comments In Original DailyNotes/Notes":"原始每日筆記/筆記中的評論","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"您需要安裝 Dataview 外掛 0.5.9 或更新版本才能使用此功能。","Open Memos Successfully":"成功開啟 Thino","Fetch Memos Error":"😭 獲取錯誤","Copied to clipboard Successfully":"成功複製到剪貼簿","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"請檢查是否已開啟每日筆記外掛或定期筆記外掛","Please finish the last filter setting first":"請先完成上一個過濾器設定","Close Memos Successfully":"成功關閉 Thino","Insert as Memo":"插入為 Thino","Insert file as memo content":"將檔案插入為 thino 內容","Image load failed":"圖片載入失敗","Content cannot be empty":"內容不能為空","Unable to create new file.":"無法創建新檔案。","Failed to fetch deleted memos: ":"獲取已刪除的 thino 失敗:","RESTORE SUCCEED":"還原成功","DELETE SUCCEED":"刪除成功","Save Memo button icon":"儲存 Thino 按鈕圖示","The icon shown on the save Memo button in the UI.":"UI 中儲存 Thino 按鈕顯示的圖示。","Fetch Memos From Particular Notes":"從特定筆記獲取 Thino",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'您可以為 thino 設定任何 Dataview 查詢來獲取它。這些筆記中的所有 thino 都會顯示在列表中。預設為 "#memo"',"Allow Memos to Fetch Memo from Notes":"允許 Thino 從筆記中獲取 Thino","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"使用 Thino 管理您筆記中的所有 thino,而不僅僅是每日筆記中的。預設為關閉","Always Show Memo Comments":"始終顯示 Thino 評論","Always show memo comments on memos. False by default":"始終在 thino 上顯示評論。預設為關閉","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"您尚未在定期筆記和每日筆記外掛中設定每日筆記的資料夾。","Please check your daily note plugin OR periodic notes plugin settings":"請檢查您的每日筆記外掛或定期筆記外掛設定","Use which plugin's default configuration":"使用哪個外掛的預設配置","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino 使用外掛的預設配置從每日筆記中獲取 thino,預設為 'Daily'。",Daily:"每日","Always Show Leaf Sidebar on PC":"在 PC 上始終顯示葉面側邊欄","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"即使葉面寬度小於 875px,也在 PC/平板上顯示左側邊欄。預設為關閉。","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"您尚未在定期筆記和每日筆記外掛中設定每日筆記的格式。","fetch more":"獲取更多","Search all settings":"搜尋所有設定",General:"一般",Theme:"主題",Share:"分享",Advanced:"進階",Interface:"介面",Thino:"Thino","Random Review":"隨機回顧","ARCHIVED AT":"封存於","Failed to get memos from daily notes":"從每日筆記獲取 thino 失敗","Failed to delete memo":"刪除 thino 失敗","CTRL + ENTER to save":"CTRL + ENTER 儲存","Started from":"開始於","Custom Background Image":"自訂背景圖片","Set custom background image.":"設定自訂背景圖片。","Custom Memo Footer":"自訂 Thino 頁尾","Set custom memo footer.":"設定自訂 thino 頁尾。","Heatmap Color Scheme":"熱圖顏色方案","Set different color scheme for heatmap.":"為熱圖設定不同的顏色方案。","Enable Local Http Server":"啟用本地 Http 伺服器","Memos Http Server Port":"Thino Http 伺服器埠","Set memos http server port to listen. '43999' by default":"設定 thino http 伺服器監聽埠。預設為 '43999'","Default Editor Mode":"預設編輯器模式","Live-Preview Mode OR Source Mode.":"即時預覽模式或原始碼模式。","Save type for Thino":"Thino 的儲存類型",DAILY:"每日",MULTI:"多個",CANVAS:"畫布",ALL:"全部",FILE:"檔案",TODO:"待辦",DONE:"已完成",JOURNAL:"日誌",OTHER:"其他","Failed to create daily note, check if it exists.":"創建每日筆記失敗,請檢查是否已存在。","Failed to create daily note. Please check if you created a folder for daily notes.":"創建每日筆記失敗。請檢查是否已創建每日筆記的資料夾。","After you verify your account, please refresh this page.":"驗證帳號後,請重新整理此頁面。",Verify:"驗證","Oops! You forget to verify insider account":"糟糕!您忘記驗證內部帳號","If you have any questions, please contact us.":"如果您有任何問題,請聯繫我們。","Delete Thino Directly":"直接刪除 Thino","When delete thino directly, it will not be moved to trash. False by default.":"直接刪除 thino 時,不會移至垃圾桶。預設為關閉。","Enable opening thino globally":"啟用全域開啟 thino","Enable opening thino globally. False by default.":"啟用全域開啟 thino。預設為關閉。","Key for opening thino globally":"全域開啟 thino 的快速鍵","Set key for opening thino globally. CTRL + SHIFT + T by default.":"設定全域開啟 thino 的快速鍵。預設為 CTRL + SHIFT + T。","Key for showing thino globally":"全域顯示 thino 的快速鍵","Set key for showing thino globally. CTRL + SHIFT + E by default.":"設定全域顯示 thino 的快速鍵。預設為 CTRL + SHIFT + E。","Get activation code":"獲取啟用碼","Input activation code here":"在此輸入啟用碼","Copy Thino id":"複製 Thino id","Activate Pro Version":"啟用專業版","Please copy Thino id first":"請先複製 Thino id",'You can set folder name with file name like "folder/file"':'您可以設定帶有檔案名稱的資料夾名稱,如 "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'您可以設定如 "folder1/folder2/folder3" 的資料夾名稱來創建子資料夾',"Default save type":"預設儲存位置",'Set the default save type for thino. "DAILY" by default':'設定 thino 的預設儲存類型。預設為 "DAILY"',"Sync Thino via PKMer":"通過 PKMer 同步 Thino",Unlink:"取消連結",Link:"連結","Connect to PKMer Sync, you can check it in ":"連接到 PKMer 同步,您可以在此檢查 ","PKMer Sync":"PKMer 同步","Remove successfully":"移除成功",Deactivate:"停用",Remove:"移除","Confirm?":"確認?","Sync Status":"同步狀態","Start or stop sync":"開始或停止同步","Stop sync successfully":"成功停止同步","Start sync successfully":"成功開始同步",Stop:"停止",Start:"開始","Show thino near mouse":"在滑鼠附近顯示 thino","Query not found":"未找到查詢","Send to clipboard successfully":"成功發送到剪貼簿","Thino - Failed to start HTTP server, please check the port is available.":"Thino - 啟動 HTTP 伺服器失敗,請檢查埠是否可用。","Thino - Started HTTP server on port":"Thino - 在埠口啟動 HTTP 伺服器","Thino - Terminated HTTP server":"Thino - 終止 HTTP 伺服器","File not exist":"檔案不存在","Thino not found":"未找到 Thino","File not found for the given thino path, is creating a new file":"未找到給定 thino 路徑的檔案,正在創建新檔案","Saved sync token successfully":"成功儲存同步令牌","Failed to find daily notes folder":"找不到每日筆記資料夾","Please install obsidian-hover-editor plugin first":"請先安裝 obsidian-hover-editor 外掛","Copied app id successfully":"成功複製應用程式 id","Please input token first":"請先輸入令牌","Please enable sync first":"請先啟用同步","Init Failed":"初始化失敗","Verify successfully":"驗證成功","Failed to verify":"驗證失敗","Folder not found for the given thino path, is creating a new folder":"未找到給定 thino 路徑的資料夾,正在創建新資料夾","File not found for the given thino path":"未找到給定 thino 路徑的檔案","Failed to read current daily note, check if it exists.":"讀取當前每日筆記失敗,請檢查是否存在。","Failed to save":"儲存失敗","Failed to login, please login again":"登入失敗,請重新登入","COPY FAILED":"複製失敗","COPY SUCCEED":"複製成功","Copy selected text":"複製選定文字","Copy thino":"複製 thino",COPY:"複製","This is a pro feature, please upgrade to pro version to use it.":"這是專業版功能,請升級到專業版以使用。","You can get pro version from: ":"您可以從以下位置獲取專業版:",Save:"儲存",Cancel:"取消","Thino Daily Target":"Thino 每日目標",Input:"輸入","#Tag":"#標籤","to create tag":"創建標籤","You have verified your account. Congrats!":"您已驗證您的帳號。恭喜!","Pro features":"專業版功能","Target Thino Count":"目標 Thino 數量",on:"開啟","Switch waterfall view":"切換瀑布流視圖","Switch view":"切換視圖","Switch list view":"切換列表視圖","Set daily target":"設定每日目標","Thino Save To: ":"Thino 儲存至:","Enter fullscreen mode":"進入全螢幕模式","Exit fullscreen mode":"退出全螢幕模式",words:"字",word:"字","Return To Home Page":"返回首頁","No thinos to review!":"沒有要回顧的 thino!","Thinos to review":"要回顧的 thino","Start Review":"開始回顧",Hard:"困難",Good:"良好",Easy:"簡單",Again:"再次","Clear all review data":"清除所有回顧資料","Daily Progress":"每日進度","Show stats":"顯示統計","Hide stats":"隱藏統計",Remaining:"剩餘","Total Reviews":"總回顧次數","Today, you have reviewed all your thinos!":"今天,您已回顧完所有 thino!","Daily review limit reached! Come back tomorrow.":"已達到每日回顧限制!明天再來。","Open thino in center window":"在中央視窗開啟 thino","Open thino in float window":"在浮動視窗開啟 thino","Open thino in right sidebar":"在右側邊欄開啟 thino","Open thino in left sidebar":"在左側邊欄開啟 thino","Show thino editor":"顯示 thino 編輯器","Toggle minimal mode":"切換最小化模式","Focus on thino editor":"聚焦 thino 編輯器","ReSync web thinos to local":"重新同步網路 thino 到本地","Sync local thinos to web":"同步本地 thino 到網路","Show daily thino":"顯示每日 thino","Focus on search bar":"聚焦搜尋欄","Show-thino in popover(Hover editor)":"在彈出視窗中顯示 thino(懸停編輯器)","Center window":"中央視窗","Float window":"浮動視窗","Right sidebar":"右側邊欄","Left sidebar":"左側邊欄","Save thino type when sync local":"同步本地時儲存 thino 類型","Set the default save thino type when sync local, FILE by default.":"設定同步本地時的預設儲存 thino 類型,預設為檔案。","Sync service":"同步服務","Pro verification status":"專業版驗證狀態","Live-preview":"即時預覽",Source:"來源","Global copy":"全域複製","Set the folder name":"設定資料夾名稱","Set the filename":"設定檔案名稱","Set the filename for current location file":"設定目前位置檔案的檔案名稱","Switch calendar type":"切換日曆類型",alphabetical:"按字母順序",alphabeticalReverse:"按字母倒序",byCount:"按數量",byCountReverse:"按數量倒序","Type here":"在此輸入",Today:"今天",Yesterday:"昨天","Last 7 days":"最近 7 天","Last 30 days":"最近 30 天","Last 90 days":"最近 90 天","Last 180 days":"最近 180 天","Last 365 days":"最近 365 天",Found:"找到","Copy filtered thinos":"複製已篩選的 thinos","Bulk delete":"批量刪除","Bulk archive":"批量歸檔","Bulk tag operation":"批量標籤操作","Bulk restore":"批量還原","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"如果您停用了每日筆記外掛程式,thino 可能無法正確刪除或修補。請啟用外掛程式後重試。",Preview:"預覽","Set and save":"設定並儲存","Show day mark in thino list":"在 thino 列表中顯示日期標記","Show day mark on the top of daily range thino. False by default.":"在每日範圍 thino 頂部顯示日期標記。預設為否。","Click to expand or fold, Cmd+Click to show all thinos of the day":"點擊展開或摺疊,Cmd+點擊顯示當天所有 thinos","You can buy a license from":"您可以從以下位置購買授權:","No thinos in range":"範圍內沒有 thinos",Month:"月",Week:"週",Day:"日",Agenda:"議程",Tomorrow:"明天",Previous:"上一個",Next:"下一個","Search all columns...":"搜尋所有欄位...","Basic Info":"基本資訊","Additional Info":"額外資訊","Created At":"建立時間",Content:"內容","Thino Type":"Thino 類型","Source Type":"來源類型","Row status":"行狀態",Path:"路徑","Pinned Status":"釘選狀態",Table:"表格",Chat:"聊天",Moments:"動態",Waterfall:"瀑布流",Calendar:"日曆","Go to page":"前往頁面",Page:"頁面",Show:"顯示",rows:"行","Temp Filter":"臨時篩選","Open link directly in Thino view":"在 Thino 視圖中直接開啟連結","Day mark range":"日期標記範圍","Set the range of day mark. Day by default.":"設定日期標記範圍。預設為日。","Thino is locked":"Thino 已鎖定","Please unlock Thino by input password":"請輸入密碼解鎖 Thino","Auto Download Image":"自動下載圖片","Auto download image when save to thino. 'false' by default":"儲存到 thino 時自動下載圖片。預設為否。","Thino Http IP Type":"Thino Http IP 類型","Set Thino http server ip to listen. 'localhost' by default":"設定 Thino http 伺服器監聽的 IP。預設為 localhost。","Password to lock Thino":"鎖定 Thino 的密碼",Unlock:"解鎖",Locked:"已鎖定","Password is incorrect":"密碼錯誤",Lock:"鎖定","Need password to unlock Thino":"需要密碼解鎖 Thino","You have not set a password or enable this feature yet":"您尚未設定密碼或啟用此功能",Password:"密碼","Password for Thino":"Thino 的密碼","Please input your password to change password settings":"請輸入密碼以更改密碼設定","Please input your password":"請輸入密碼","Lock thino":"鎖定 thino",date:"日期",time:"時間",event:"事件","Add tag position":"新增標籤位置","Set the position of the tag when adding tag automatically":"設定自動新增標籤時的位置","Add tag automatically":"自動新增標籤","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"建立 thino 和篩選標籤時,在 thino 內容的結尾或開頭新增標籤","Add tag with new line":"換行新增標籤","Add tag with new line when adding tag automatically":"自動新增標籤時換行","Input to select more tags":"輸入以選擇更多標籤","Tag Bulk Edit":"標籤批量編輯","Tag Bulk Select":"標籤批量選擇","Exist Tags":"現有標籤","Selected Tags":"已選標籤","Click to remove exist tag":"點擊移除現有標籤","Click to remove selected tag":"點擊移除已選標籤","Select tags":"選擇標籤","Input to select exist tag":"輸入以選擇現有標籤",Beginning:"開頭",End:"結尾","Set the heading for saving thino":"設定儲存 thino 的標題","# Heading":"# 標題","Chat view style":"聊天視圖樣式","Set the style of chat view":"設定聊天視圖的樣式","Background image for moments view":"動態視圖的背景圖片","Set the background image for moments view":"設定動態視圖的背景圖片","Icon for moments/chat view/share image":"動態/聊天視圖/分享圖片的圖示","Set the icon for moments/chat view/share image":"設定動態/聊天視圖/分享圖片的圖示","Quote for moments view/share image":"動態視圖/分享圖片的引言","Set the quote for moments view/share image":"設定動態視圖/分享圖片的引言","Theme for Thino":"Thino 主題","Set the theme for Thino":"設定 Thino 主題","Interface Details":"介面詳情","Task amount":"任務數量","Thino status":"Thino 狀態","Used tags":"已使用標籤","Used days":"已使用天數","Most active day":"最活躍日","Most active hour":"最活躍時段","Thino amount":"Thino 數量","No content to generate.":"沒有內容可生成。","Image generated successfully.":"圖片生成成功。","Failed to generate image.":"圖片生成失敗。","Share filtered thinos as image":"將已篩選的 thinos 分享為圖片","Latest version":"最新版本","Previous version":"上一版本","Thino update info":"Thino 更新資訊","Debug info copied to clipboard":"除錯資訊已複製到剪貼簿","Copy debug info":"複製除錯資訊","Failed to load changelog":"載入更新日誌失敗","View online":"線上檢視",ChangeLog:"更新日誌","Please open thino first":"請先開啟 thino","Insert editor":"插入編輯器","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"請為 Thino 的多檔案設定設定不同的儲存位置。日記資料夾與多檔案儲存位置重疊,或有重複讀取的風險。","Default time prefix for thino in daily notes":"每日筆記中 thino 的預設時間前綴","Set default time prefix for thino in daily notes.":"設定每日筆記中 thino 的預設時間前綴。","Save image successfully":"圖片儲存成功","User quote":"使用者引言","Set user quote for thino":"設定 thino 的使用者引言","User icon":"使用者圖示","Set user icon for thino. You can input http/https link or file path in vault.":"設定 thino 的使用者圖示。您可以輸入 http/https 連結或儲存庫中的檔案路徑。","User info":"使用者資訊","Copy filtered results":"複製篩選結果","Share image":"分享圖片",Default:"預設",Gray:"灰色",Grass:"草綠",Flame:"火焰",Olive:"橄欖",Ice:"冰藍",Magenta:"洋紅","Daily notes":"每日筆記",Editor:"編輯器","Append/prepend text when share to Thino":"分享到 Thino 時附加/前置文字","Append text when share to Thino":"分享到 Thino 時附加文字","Prepend text when share to Thino":"分享到 Thino 時前置文字","Add newline when append/prepend text":"附加/前置文字時換行","Input anything here":"在此輸入任何內容",Prepend:"前置",Append:"附加",Both:"兩者",None:"無","Hide pinned group":"隱藏釘選群組","Hide pinned group in thino list. False by default.":"在 thino 列表中隱藏釘選群組。預設為否。","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"設定任務類型 thino 的標題,預設情況下,記錄的 thino 內容將插入日記末尾;如果提供標題,所有記錄的 thino 內容將統一歸類在該標題下。","Different insert target for different type":"不同類型的不同插入目標","Toggle this to set different insert target for different type of thino, like task or list type of thino":"切換此選項以為不同類型的 thino 設定不同的插入目標,如任務或列表類型的 thino","You can set whole diary or only part of it":"您可以設定整個日記或僅部分內容","Set process target":"設定處理目標",Custom:"自訂","Whole diary":"整個日記","Set thino insert place":"設定 thino 插入位置","Set where to insert thino content":"設定插入 thino 內容的位置","End of the diary":"日記末尾","Custom location":"自訂位置","Setting guide":"設定指南","Details settings":"詳細設定","Start Thino":"開始使用 Thino","About Thino Pro":"關於 Thino Pro",Enabled:"已啟用",Enable:"啟用","Daily notes folder":"每日筆記資料夾","Set daily notes folder":"設定每日筆記資料夾","Daily note name format":"每日筆記名稱格式","Set daily note name format":"設定每日筆記名稱格式","Daily note plugin":"每日筆記外掛程式","Enable daily note plugin":"啟用每日筆記外掛程式",Selected:"已選擇",Select:"選擇","A classic theme for Thino with a two-column layout":"具有雙欄佈局的 Thino 經典主題",Classic:"經典","A modern theme for Thino with a three-column layout and some unique features.":"具有三欄佈局和一些獨特功能的 Thino 現代主題。",Modern:"現代","Go and enjoy Thino":"開始使用並享受 Thino","Congrats! All settings done":"恭喜!所有設定已完成","Adjust settings that influence your user experience with Thino.":"調整影響您使用 Thino 體驗的設定。","Set preferences for using Thino":"設定使用 Thino 的偏好","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"如果您使用的是 Thino 基本版,需要啟用每日筆記外掛程式。配置其設定以有效使用。","Go with daily note plugin":"使用每日筆記外掛程式","Choose a theme for Thino.":"為 Thino 選擇主題。","Set theme for Thino":"設定 Thino 主題","Set up your user info for Thino.":"設定您的 Thino 使用者資訊。","Get started with Thino":"開始使用 Thino","Skip and start Thino":"跳過並開始使用 Thino","Next step":"下一步","Back to previous step":"返回上一步","Click to enable =>":"點擊啟用 =>","This is Thino's sidebar. Navigate to different path or select query filter.":"這是 Thino 的側邊欄。導航到不同路徑或選擇查詢篩選器。","Click here and go to settings page.":"點擊此處前往設定頁面。","Click here and go to different path.":"點擊此處前往不同路徑。","Select or create query filter here.":"在此選擇或建立查詢篩選器。","See the status of Thinos here.":"在此查看 Thinos 的狀態。","Search your thino quickly here.":"在此快速搜尋您的 thino。","Edit or create your thino here.":"在此編輯或建立您的 thino。","See your thinos here.":"在此查看您的 thinos。","See your time status of thinos here.":"在此查看您的 thinos 時間狀態。","See your tags here. Tags will be shown when thino contains tags.":"在此查看您的標籤。當 thino 包含標籤時會顯示標籤。",Done:"完成","Thino is ready to use. ":"Thino 已準備就緒。","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"您現在可以開始使用 Thino。如果您想了解更多關於 Thino Pro 的資訊,請點擊下方按鈕。","Default time prefix":"預設時間前綴","Append Text Action":"附加文字動作","Prepend Text Action":"前置文字動作",Preset:"預設","Select Tags":"選擇標籤","It is not available on small view":"在小視圖中不可用","Append text":"附加文字","Prepend text":"前置文字","Your daily note folder is not set correctly, please check your settings":"您的每日筆記資料夾設定不正確,請檢查您的設定","Default sharing style":"預設分享樣式","Set the default style for sharing thino, 'Modern' by default.":"設定分享 thino 的預設樣式,預設為「現代」。",Clean:"簡潔",Minimal:"極簡",Gradient:"漸層","Thino share":"Thino 分享","Copy to clipboard failed":"複製到剪貼簿失敗","Copy to clipboard successfully":"成功複製到剪貼簿","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"您的內容已複製到剪貼簿,並插入到編輯器中。請重試","Share thino":"分享 thino","Set file name after create thino":"建立 thino 後設定檔案名稱","You can set file name after create thino. A input box will show when you create thino.":"您可以在建立 thino 後設定檔案名稱。建立 thino 時會顯示輸入框。",SPLIT:"分割","Split by Heading 1":"按一級標題分割","Split by Heading 2":"按二級標題分割","Split by Heading 3":"按三級標題分割","Insert task":"插入任務","All settings have been reset to default.":"所有設定已重設為預設值。","Reset all Thino settings":"重設所有 Thino 設定","Reset settings":"重設設定","Reset Thino settings to default settings.":"將 Thino 設定重設為預設設定。","Task Management":"任務管理","Append completed date when task done in thino":"在 thino 中完成任務時附加完成日期","Append completed date when task done in thino. False by default":"在 thino 中完成任務時附加完成日期。預設為否","Set tag for single file that Thino indexes":"設定 Thino 索引的單一檔案的標籤","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"當您在此設定標籤時,Thino 將索引包含此標籤的檔案並在列表中顯示。不需要加上 `#`。","Set tag for file type file":"設定檔案類型檔案的標籤","Set tag for multi type file":"設定多類型檔案的標籤","Please input the tag":"請輸入標籤","Merge thinos in to thino share image":"將 thinos 合併到 thino 分享圖片中","Custom height for Thino content":"自訂 Thino 內容高度","Set custom height for Thino content. Like 200px or 20rem":"設定 Thino 內容的自訂高度。如 200px 或 20rem","Input height":"輸入高度","Submit issue":"提交問題","Current version":"目前版本","Bug report":"錯誤回報","Click the button to copy debug info and open the issue page":"點擊按鈕複製除錯資訊並開啟問題頁面","Copy and go":"複製並前往","Debug info copied":"除錯資訊已複製","Feature request":"功能請求","Submit your feature request to the issue page":"將您的功能請求提交到問題頁面",Go:"前往","Toggle query list visibility":"切換查詢列表可見性","Toggle tags visibility":"切換標籤可見性","Toggle sidebar visibility":"切換側邊欄可見性",Collapse:"摺疊",Expand:"展開","Max height for collapse":"摺疊的最大高度","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"thino 摺疊的最大高度,設為 0 時 thino 不會摺疊。預設為 0。(這不是行數,而是以像素為單位的高度。)","Render content":"渲染內容","Optimize for Callout":"優化 Callout","Won't render content contains more than 3 callouts automatically. True by default":"不會自動渲染包含超過 3 個 callouts 的內容。預設為是","The value should be greater than":"值應大於","Append Text":"附加文字","Prepend Text":"前置文字","Thino height when collapsed":"Thino 摺疊時的高度","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"thino 摺疊時的高度,設為 0 時 thino 不會摺疊。預設為 100。(這不是行數,而是以像素為單位的高度。)","This option will allow you use other views when leaf width is not enough. False by default.":"此選項將允許您在葉寬度不足時使用其他視圖。預設為否。","Can select other views when leaf width is not enough":"當葉寬度不足時可以選擇其他視圖","TRASH BOX":"垃圾箱","Wait templater to finish parse before insert thino":"在插入 thino 前等待模板解析完成","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"此選項將允許您在插入 thino 前等待模板解析完成,這可能導致您需要在插入 thino 時確認兩次。預設為否。","Get thino capture extension":"獲取 thino 擷取擴充功能","You can capture idea/text from chrome now.":"您現在可以從 Chrome 擷取想法/文字。","Open File":"開啟檔案","Exported CSV file":"匯出的 CSV 檔案","Updated At":"更新時間","Export to CSV":"匯出為 CSV","Quick add button on mobile navbar":"行動導航欄上的快速新增按鈕","Always show status text":"始終顯示狀態文字","Support filter by metadata from file":"支援從檔案中的元資料進行篩選","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"啟用此選項後,您可以通過檔案中的元資料進行篩選,如檔案中的標籤。但不支援來自畫布的 thinos。預設為否。","Show source near timestamp in thino":"在 thino 中的時間戳記附近顯示來源","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"啟用此選項後,您可以在 thino 中的時間戳記附近看到來源。您可以在元資料中設定標題來覆寫此設定。預設為否。","Show Update Message":"顯示更新訊息","Show update message when Thino is updated. True by default":"Thino 更新時顯示更新訊息。預設為是","Sync manually":"手動同步","Show all scrollbars":"顯示所有捲軸","TIME RANGE":"時間範圍",WITHIN:"在","7 days":"7 天","14 days":"14 天","30 days":"30 天","3 months":"3 個月","6 months":"6 個月","1 year":"1 年","This week":"本週","Last week":"上週","This month":"本月","Last month":"上月","This year":"今年","Last year":"去年","No history":"無歷史記錄","Today Remaining":"今日剩餘","Today Total":"今日總計","Historical Statistics":"歷史統計",byTime:"按時間",byTimeReverse:"按時間倒序",Stat:"統計",Statistics:"統計資料","Daily Thino Count":"每日 Thino 數量",Total:"總計",thinos:"thinos","Thino Types":"Thino 類型","Distribution of thino types":"Thino 類型分佈","Thino Status":"Thino 狀態","Distribution of thino status":"Thino 狀態分佈","Popular Tags":"熱門標籤","Top 10 most used tags":"前 10 個最常用標籤","Thino Count":"Thino 數量","Hourly distribution":"每小時分佈","Current month":"本月","Monthly distribution":"每月分佈","30 Days":"最近 30 天",Year:"年","Time Distribution":"時間分佈","When do you write thinos":"您何時寫 thinos","Content Length":"內容長度","Distribution of thino lengths":"Thino 長度分佈","Daily Thinos":"每日 Thinos","Show Time Distribution":"顯示時間分佈","Hide date picker":"隱藏日期選擇器","Show date picker":"顯示日期選擇器","Clear filter":"清除篩選","Copy link":"複製連結","Copy embed link":"複製嵌入連結","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter 儲存 thino","Fixed strings for thinos":"Thinos 的固定字串","Use fixed strings for thinos":"使用 thinos 的固定字串","Enable to add fixed strings at the beginning or end of thinos.":"啟用在 thinos 的開頭或結尾新增固定字串。","Fixed prefix for thinos":"Thinos 的固定前綴","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每個 thino 的開頭添加此字串。支援像 {{TIME|YYYYMMDDHHmmss}} 這樣的佔位符。","Fixed suffix for thinos":"Thinos 的固定後綴","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每個 thino 的結尾添加此字串。支援像 {{TIME|YYYYMMDDHHmmss}} 這樣的佔位符。","Word count exceeded":"字數超出限制","Word count feature":"字數統計功能","Enable real-time word count display in the editor":"在編輯器中啟用即時字數顯示","Maximum word count":"最大字數","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"為 thino 設定最大字數。超出時編輯器將顯示警告。設為 0 則無限制。","No linked thinos found":"未找到相關連結的 thinos","Reference links group":"參考連結群組","Enable reference links group in thino.":"在 thino 中啟用參考連結群組。","No reference links found":"未找到參考連結","Outgoing Links":"外部連結","Incoming Links":"內部連結","Error fetching reference links":"獲取參考連結時出錯","Double click behavior":"雙擊行為","Set the behavior when double click on a thino.":"設定在 thino 上雙擊時的行為。","Open thino":"開啟 thino","Edit thino":"編輯 thino","Go to source":"前往來源","Do nothing":"不做任何操作","Use default header in mobile view":"在行動裝置視圖中使用預設標頭","Use default header in mobile view of thino rather than custom header.":"在 thino 的行動裝置視圖中使用預設標頭而非自定義標頭。","Ignore folders for multi type":"忽略多文件類型文件夾","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"設置多文件類型時忽略的文件夾。用逗號 (,) 分隔多個文件夾。","folder1,folder2/subfolder":"folder1,folder2/subfolder","Using block link when dragging a thino":"拖動 thino 以插入連結","Using block link when dragging a thino for daily":"拖動 thino 以插入連結到日記","Matched via tag in content":"通過內容中的標籤匹配","Matched via tag in file":"通過文件中的標籤匹配","Focus on editor when open":"打開時聚焦編輯器","Focus on editor when open. True by default.":"打開時聚焦編輯器。默認為開啟","Show scroll to top button":"顯示滾動到頂部按鈕","Show scroll to top button. True by default":"顯示滾動到頂部按鈕。默認為開啟","Zoom image by default":"預設縮放圖片","Zoom image by default when viewing image.":"查看圖片時預設縮放圖片。","View archive in random review":"在隨機回顧中查看歸檔的 Thino","View archived thinos in random review. True by default":"在隨機回顧中查看歸檔的 Thino。默認為開啟","Linked by":"鏈接自",Linked:"鏈接",DUPLICATE:"複製","Show scrollbars in all thino views.":"在所有 Thino 視圖中顯示滾動條。","Drag to paste content":"拖動粘貼內容","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"您將能夠通過拖動而不是粘貼塊鏈接來將內容從其他應用程序粘貼到 Thino 中。","Dragging behavior":"拖動行為","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"控制拖動 Thino 的行為。默認粘貼塊鏈接。塊鏈接選項僅在源類型為日記時有效。","Block link":"塊鏈接","Quick capture tool that allows you to create and manage your ideas, tasks, and more.":"快速捕獲工具,允許你創建和管理你的想法、任務等。",About:"關於",Text:"文本","Open Documentation":"開啟文件",Documentation:"文件",Version:"版本","View the documentation for this plugin":"查看此插件的文件","Activate Pro":"激活專業版","Activated Pro":"已激活專業版",Tasks:"任務","Show release notes":"顯示發布說明","Show release notes when Thino is updated. True by default":"顯示發布說明當 Thino 更新時。默認為開啟","Open change log":"開啟更新日志","Change log":"更新日志","View the change log for this plugin":"查看此插件的更新日志"},tG={ar:PW,cs:jW,da:LW,de:RW,en:q9,"en-gb":FW,es:HW,fr:BW,hi:_W,id:YW,it:zW,ja:UW,ko:VW,nl:WW,nn:GW,pl:ZW,pt:qW,"pt-br":$W,ro:KW,ru:JW,tr:XW,"zh-cn":QW,"zh-tw":eG},MN=tG[A.moment.locale()];function I(e){const t=MN&&MN[e]||q9[e];return t===null?t:t||e}const nG=/```([\s\S]*?)```/g,rG=/\*\*(.+?)\*\*/g,oG=/\*(.+?)\*/g,aG=/\[ \] /g,iG=/\[.{1}\] /g,sG=/^[*-]/g,lG=/(\d+)\. /g,cG=(e,t)=>e.replace(nG,"<pre lang=''>$1</pre>").replace(sG,"<span class='counter-block'>•</span>").replace(lG,"<span class='counter-block'>$1.</span>").replace(aG,"<span class='todo-block' data-type='todo'>⬜</span>").replace(iG,"<span class='todo-block' data-type='done'>✅</span>").replace(rG,"<strong>$1</strong>").replace(oG,"<em>$1</em>").replace(/&lt;br&gt;/g,"</p><p>").replace(/&amp;/g,"&"),sb=e=>{const t=document.createElement("div");return t.className="memo-content-text",t.innerHTML=e,t.innerText},uG=e=>e.replace(/\n/g,"<br>"),dG=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},DN="mobile-show-sidebar",wI=200,Do=3600*24*1e3,Ef=/\s#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,ng=/(<p>|<br>)#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,rC=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,$w=/(\s|:|\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,fG=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,Kw=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,hG=/(\s|:|^)(http[s]?:\/\/)([^\/\s]+\/)(\S*?)(jpeg|jpg|gif|png|svg|bmp|wepg)(?!\))/g,pG=/!\[\[((.*?)\.(jpeg|jpg|gif|png|svg|bmp|wepg))?(\|)?(.*?)\]\]/g,mG=/(!\[([^\]]*)(\|)?(.*?)\]\((.*?)("(?:.*(?:jpg|png|gif|jpeg|svg|bmp|wepg))")?\s*\))/g,yu=/\[@(.+?)\]\((.+?)\)/g,gG=/[#*"\/\\<>:|\[\]\?]/gim,vG=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)(-\d{1,2}:\d{2}(:\d{2})?)?\s(.*)/g,zp=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var SI;(e=>{function t(){return parseInt(A.moment().format("x"))}e.getNowTimeStamp=t;function n(F){const R=/'’A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,B=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,Y=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,H=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${R}])+`,B,Y].join("|"),"g");return(F.match(H)||[]).length}e.getWordCount=n;function r(F){Yp()&&F?.EnabledLocationList.some(R=>R.value==="DAILY")&&F?.EnabledLocationList.some(R=>R.value==="MULTI")&&Jw().contains(F?.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new A.Notice(I("Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly."),5e3)}e.checkDailyInMulti=r;function o(){const F=navigator.userAgent;let R="Unknown";return F.indexOf("Win")!=-1?R="Windows":F.indexOf("Mac")!=-1?R="MacOS":F.indexOf("Linux")!=-1&&(R="Linux"),R}e.getOSVersion=o;function a(F){return typeof F=="string"&&(F=F.replaceAll("-","/")),new Date(F).getTime()}e.getTimeStampByDate=a;function i(F){const R=new Date(a(F));return new Date(R.getFullYear(),R.getMonth(),R.getDate()).getTime()}e.getDateStampByDate=i;function s(F){const R=new Date(a(F)),B=R.getFullYear(),Y=R.getMonth()+1,H=R.getDate();return`${B}/${Y}/${H}`}e.getDateString=s;function l(F){const R=new Date(a(F)),B=R.getHours(),Y=R.getMinutes(),H=B<10?"0"+B:B,Z=Y<10?"0"+Y:Y;return`${H}:${Z}`}e.getTimeString=l;function u(F){const R=new Date(a(F)),B=R.getFullYear(),Y=R.getMonth()+1,H=R.getDate(),Z=R.getHours(),W=R.getMinutes(),$=R.getSeconds(),V=Y<10?"0"+Y:Y,ne=H<10?"0"+H:H,Q=Z<10?"0"+Z:Z,te=W<10?"0"+W:W,G=$<10?"0"+$:$;return`${B}/${V}/${ne} ${Q}:${te}:${G}`}e.getDateTimeString=u;function f(F){return Array.from(new Set(F))}e.dedupe=f;function h(F){const R=new Set,B=[];for(const Y of F)R.has(Y.id)||(R.add(Y.id),B.push(Y));return B}e.dedupeObjectWithId=h;function p(F,R){let B=null;return()=>{B&&clearTimeout(B),B=setTimeout(F,R)}}e.debounce=p;function m(F,R,B=!1,Y){let H=null,Z=!1;function W(...$){if(H&&clearTimeout(H),B&&!Z){const V=F.apply(this,$);Y&&typeof Y=="function"&&Y(V),Z=!0}else H=setTimeout(()=>{const V=F.apply(this,$);Y&&typeof Y=="function"&&Y(V),Z=!1,H=null},R)}return W.cancel=function(){H&&clearTimeout(H),H=null,Z=!1},W}e.debouncePlus=m;function w(F,R){let B=!0;return()=>{if(!B)return!1;B=!1,setTimeout(()=>{F(),B=!0},R)}}e.throttle=w;function b(F){const R=[],B=Object.keys(F).sort();for(const Y of B){const H=F[Y];H&&(typeof H=="object"?R.push(...b(H).split("&")):R.push(`${Y}=${H}`))}return R.join("&")}e.transformObjectToParamsString=b;function y(F){const R={},B=F.split("&");for(const Y of B){const[H,Z]=Y.split("=");H&&Z&&(R[H]=Z)}return R}e.transformParamsStringToObject=y;function S(F){if(!F)return{};const R={},B=Object.keys(F).sort();for(const Y of B){const H=F[Y];if(typeof H=="object"){const Z=S(JSON.parse(JSON.stringify(H)));Z&&Object.keys(Z).length>0&&(R[Y]=Z)}else H&&(R[Y]=H)}return R}e.filterObjectNullKeys=S;async function x(F){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(F)}catch(R){console.warn("Copy to clipboard failed.",R)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=x;function E(F){return new Promise(R=>{const B=new Image;B.onload=()=>{const{width:Y,height:H}=B;Y>0&&H>0?R({width:Y,height:H}):R({width:0,height:0})},B.onerror=()=>{R({width:0,height:0})},B.className="thino-hidden",B.src=F,document.body.appendChild(B),B.remove()})}e.getImageSize=E;async function C(F){let R;const Y=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!Y&&window.app.plugins?.getPlugin("periodic-notes")?.calendarSetManager?.getActiveConfig("day")?.enabled?(R=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",F),R):(R=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(F)||await Z9(F),R)}catch(H){return console.error(H),new A.Notice(I("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=C;function M(F){const R=[];let B=0;for(;B<F;B++)R.push((16*Math.random()|0).toString(16));return R.join("")}e.randomId=M;function k(F){return F.replace(/[\p{P}\p{Z}\p{S}]/gu,"").length}e.countWords=k;async function O(F){try{const R=await A.requestUrl(F),B=new Uint8Array(R.arrayBuffer);return new Blob([B],{type:"image/png"})}catch(R){return console.error("error in grabImageFromUrl",F,R),new Blob}}e.grabImageFromUrl=O})(SI||(SI={}));const je=SI;function yG(){let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=window.app.plugins.getPlugin("periodic-notes")?.calendarSetManager?.getActiveConfig("day")?.folder,o=window.app.plugins.getPlugin("periodic-notes")?.settings?.daily?.format;switch(r===void 0?n=o:n=r,t?.UseDailyOrPeriodic||"Daily"){case"Daily":e=Rl().format||"YYYY-MM-DD";break;case"Periodic":e=n||"YYYY-MM-DD";break;default:e=Rl().format||"YYYY-MM-DD";break}return e===void 0&&new A.Notice(I("You didn't set format for daily notes in both periodic-notes and daily-notes plugins.")),e}function Jw(){let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=window.app.plugins.getPlugin("periodic-notes")?.calendarSetManager?.getActiveConfig("day")?.folder,o=window.app.plugins.getPlugin("periodic-notes")?.settings?.daily?.folder;switch(r===void 0?n=o:n=r,t?.UseDailyOrPeriodic||"Daily"){case"Daily":e=Rl().folder||"";break;case"Periodic":e=n||"";break;default:e=Rl().folder||"";break}return e===void 0&&new A.Notice(I("You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.")),e}function bG(){const e=Jw();return!(e!==void 0&&!app.vault.getFolderByPath(e))}function Up(e,t){e=dG(e),e=uG(e).split("<br>").map(r=>`<p>${r!==""?r:"<br>"}</p>`).join(""),e=cG(e),e=e.replace(Ef,"<span class='tag-span'>#$1</span>").replace(ng,"<p><span class='tag-span'>#$2</span>").replace($w,"$1<a class='link' target='_blank' rel='noreferrer' href='$2'>$2</a>").replace(fG,"<a class='link' target='_blank' rel='noreferrer' href='$2'>$1</a>").replace(yu,"<span class='memo-link-text' data-value='$2'>$1</span>").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let r=0;r<n.children.length;r++){const o=n.children[r];if(o.tagName==="P"&&o.textContent===""&&o.firstElementChild?.tagName!=="BR"){o.remove(),r--;continue}}return n.innerHTML}const Xw=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let a=0;a<n.length;a++)o[a]=n.charCodeAt(a);return new Blob([r],{type:t})};function $9(e,t){return Object.keys(t).every(n=>typeof t[n]=="object"&&t[n]!==null&&typeof e[n]=="object"&&e[n]!==null?$9(e[n],t[n]):Object.prototype.hasOwnProperty.call(e,n)&&e[n]===t[n])}function wG(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((o,a)=>{const i=je.getTimeStampByDate(o.createdAt),s=je.getTimeStampByDate(a.createdAt);return i===s?a.id.localeCompare(o.id):je.getTimeStampByDate(a.createdAt)-je.getTimeStampByDate(o.createdAt)}),r=je.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=je.dedupeObjectWithId(t.payload.commentMemos.sort((r,o)=>je.getTimeStampByDate(o.createdAt)-je.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"SET_TAGS":return{...e,tags:t.payload.tags,tagsNum:t.payload.tagsNum};case"INSERT_MEMO":{const n=je.dedupeObjectWithId([t.payload.memo,...e.memos].sort((r,o)=>je.getTimeStampByDate(o.createdAt)-je.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=je.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,o)=>je.getTimeStampByDate(o.createdAt)-je.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"DELETE_MEMO_BY_ID":return{...e,memos:[...e.memos].filter(n=>n.id!==t.payload.id)};case"DELETE_MEMO_BY_ID_BATCH":{const n=[...e.memos];return t.payload.ids.forEach(r=>{n.splice(n.findIndex(o=>o.id===r),1)}),{...e,memos:[...n]}}case"REPLACE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?t.payload.memo:r);return{...e,memos:[...n]}}case"REMOVE_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[]};case"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:e.preparingUpdateMemo.filter(n=>n.id!==t.payload.id)};case"SET_WAITING_FOR_TEMPLATER":return{...e,preparingUpdateMemo:[...e.preparingUpdateMemo,{origin:t.payload.origin,date:t.payload.date,isList:t.payload.isList,id:t.payload.id,type:t.payload.type}]};case"CLEAR_MEMOS":return{...K9};case"EDIT_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"EDIT_MEMO_PATH":{const n=e.memos.map(r=>r.path===t.payload.path?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"UPDATE_MEMO_BATCH":{const n=e.memos.filter(o=>o.path!==t.payload.path),r=je.dedupeObjectWithId([...t.payload.memos,...n].sort((o,a)=>je.getTimeStampByDate(a.createdAt)-je.getTimeStampByDate(o.createdAt)));return{...e,memos:[...r]}}case"ARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"ARCHIVE_MEMO_BY_ID_BULK":{const n=e.memos.map(r=>t.payload.some(o=>o.id===r.id)?{...r,...t.payload.filter(o=>o.id===r.id)[0]}:r);return{...e,memos:[...n]}}case"UNARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"PIN_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,pinned:t.payload.pinned}:r);return{...e,memos:[...n]}}case"EDIT_COMMENT_MEMO":{const n=e.commentMemos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,commentMemos:[...n]}}default:return e}}const K9={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function SG(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const TG={user:null};function xG(e,t){switch(t.type){case"SET_QUERIES":{const n=je.dedupeObjectWithId(t.payload.queries.sort((r,o)=>je.getTimeStampByDate(o.createdAt)-je.getTimeStampByDate(r.createdAt)).sort((r,o)=>je.getTimeStampByDate(o.pinnedAt??0)-je.getTimeStampByDate(r.pinnedAt??0)));return{...e,queries:n}}case"INSERT_QUERY":{const n=je.dedupeObjectWithId([t.payload.query,...e.queries].sort((r,o)=>je.getTimeStampByDate(o.createdAt)-je.getTimeStampByDate(r.createdAt)));return{...e,queries:n}}case"DELETE_QUERY_BY_ID":return{...e,queries:[...e.queries].filter(n=>n.id!==t.payload.id)};case"UPDATE_QUERY":{const n=e.queries.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,queries:n}}default:return e}}const IG={queries:[]};function kG(e,t){switch(t.type){case"SET_DAILY_NOTES":return{...e,dailyNotes:t.payload.dailyNotes};case"SET_APP":return e.app?{...e}:{...e,app:t.payload.app};case"SET_PLUGIN":return e.plugin?{...e}:{...e,plugin:t.payload.plugin};case"SET_EDITOR":return e.editor?{...e}:{...e,editor:t.payload.editor};case"SET_SETTINGS":return e.settings&&e.settings===t.payload.settings?{...e}:{...e,settings:t.payload.settings};case"SET_VIEW":return e.view&&e.view?.leaf?.id===t.payload.view?.leaf?.id?{...e}:{...e,view:t.payload.view};case"CLEAR_VIEW":return e.view&&e.view.unload(),{...e,view:null};case"CLEAR_FILES":return{...e,dailyNotes:null};case"SET_VERIFY_STATE":return{...e,verifyState:t.payload.verifyState};default:return e}}const EG={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},Se=rW({globalState:aW,locationState:P9,memoState:K9,userState:TG,queryState:IG,dailyNotesState:EG},nW({globalState:oW,locationState:iW,memoState:wG,userState:SG,queryState:xG,dailyNotesState:kG})),it=D.createContext(Se.getState());String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object regexp]"?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});class CG{initialized=!1;getState(){return Se.getState().dailyNotesState}setApp(t){return Se.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return Se.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return Se.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return Se.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return Se.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,o=xd(t,"day");return n?delete r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,Se.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return Se.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=Xs();return Se.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const Ze=new CG;var Xn;(e=>{function t(a){const i={};for(const s of a)try{const l=localStorage.getItem(s);if(l!==null){const u=JSON.parse(l);i[s]=u}}catch(l){console.error("Get storage failed in ",s,l)}return i}e.get=t;function n(a){for(const i in a)try{const s=JSON.stringify(a[i]);localStorage.setItem(i,s)}catch(s){console.error("Save storage failed in ",i,s)}}e.set=n;function r(a){for(const i of a)try{localStorage.removeItem(i)}catch(s){console.error("Remove storage failed in ",i,s)}}e.remove=r;function o(){const a=document.createElement("iframe");a.style.display="none",document.body.appendChild(a),a.contentWindow?.localStorage.setItem("t",Date.now().toString()),a.remove()}e.emitStorageChangedEvent=o})(Xn||(Xn={}));class MG{constructor(){const t=Xn.get(["shouldSplitMemoWord","shouldHideImageUrl","shouldUseMarkdownParser","useTinyUndoHistoryCache"]),n={shouldSplitMemoWord:t.shouldSplitMemoWord||!0,shouldHideImageUrl:t.shouldHideImageUrl||!0,shouldUseMarkdownParser:t.shouldUseMarkdownParser||!0,useTinyUndoHistoryCache:t.useTinyUndoHistoryCache||!1};this.setAppSetting(n)}getState=()=>Se.getState().globalState;setEditMemoId=t=>{Se.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})};setRefresh=t=>{Se.dispatch({type:"SET_REFRESH",payload:{refresh:t}})};setCommentMemoId=t=>{Se.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})};setMarkMemoId=t=>{Se.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})};setLoaded=t=>{Se.dispatch({type:"SET_LOADED",payload:{loaded:t}})};setGlobalEditorShown=t=>{Se.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})};setIsMobileView=t=>{Se.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})};setChangedByMemos=t=>{Se.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})};setShowSiderbarInMobileView=t=>{Se.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})};setAppSetting=t=>{Se.dispatch({type:"SET_APP_SETTING",payload:t}),Xn.set(t)};setMemoListView=t=>{Se.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})};setInstance=(t,n)=>{Se.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})};setLocked=t=>{Se.dispatch({type:"SET_LOCKED",payload:{locked:t}})};setExitSteps=t=>{Se.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})};setPluginManifest=t=>{Se.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})}}const Ge=new MG;class DG{constructor(){this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}updateStateWithLocation=()=>{const{pathname:t,search:n,hash:r}=window.location,o=new URLSearchParams(n),a={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:"",path:"",metadata:{}}};a.query.tag=o.get("tag")||"",a.query.type=o.get("type")??"",a.query.text=o.get("text")??"",a.query.filter=o.get("filter")??"";const i=parseInt(o.get("from")??"0"),s=parseInt(o.get("to")??"0");s>i&&s!==0&&(a.query.duration={from:i,to:s}),a.hash=r,a.pathname=this.getValidPathname(t),Se.dispatch({type:"SET_LOCATION",payload:a})};getState=()=>Se.getState().locationState;clearQuery=()=>{Se.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:"",path:"",metadata:{}}})};setQuery=t=>{Se.dispatch({type:"SET_QUERY",payload:t})};reloadApp=()=>{Se.dispatch({type:"RELOAD"})};setHash=t=>{Se.dispatch({type:"SET_HASH",payload:{hash:t}})};setPathname=t=>{Se.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};pushHistory=t=>{Se.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};replaceHistory=t=>{Se.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};setMemoTypeQuery=(t="")=>{Se.dispatch({type:"SET_TYPE",payload:{type:t}})};setMemoFilter=t=>{Se.dispatch({type:"SET_QUERY_FILTER",payload:t})};setTextQuery=t=>{Se.dispatch({type:"SET_TEXT",payload:{text:t}})};setTimeQuery=t=>{Se.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})};setPathQuery=t=>{Se.dispatch({type:"SET_PATH_QUERY",payload:{path:t}})};setMetadataQuery=(t,n)=>{Se.dispatch({type:"SET_METADATA_QUERY",payload:{name:t,value:n}})};setTagQuery=t=>{Se.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})};setFromAndToQuery=(t,n)=>{Se.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})};getValidPathname=t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/"}const Ye=new DG,qc=e=>`${e.vault.configDir}/query.json`,J9=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},Cf=async e=>(await J9(e,qc(e))||await X9(e),JSON.parse(await e.vault.adapter.read(qc(e))).queries||[]),rg=async(e,t)=>{await e.vault.adapter.write(qc(e),JSON.stringify({queries:t},null,2))},X9=async e=>{const t=Ge.getState().manifest,n=e.plugins.getPlugin(t.id||"obsidian-memos").settings,r=e.metadataCache.getFirstLinkpathDest(n.QueryFileName,"");if(!r)await e.vault.adapter.write(qc(e),JSON.stringify({queries:[]},null,2));else{const a=(await e.vault.read(r)).split(`
`);a.length===0&&await e.vault.adapter.write(qc(e),JSON.stringify({queries:[]},null,2));const i=[];for(let s=0;s<a.length;s++){const l=s,u="Memos";let f="未命名";const h=a[s];let p=A.moment().format("YYYY/MM/DD HH:mm:ss"),m="[]";const w=h.match(/^\d{14,16}/);w&&(p=A.moment(w[0].slice(0,14),"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:ss"));const b=h.match(/\[\{(.+)\}\]/);b&&(m=b[0]);const y=h.match(/\s(.+)\s\[\{/);y&&(f=y[0].slice(1,-3)),i.push({id:l,pinnedAt:"",createdAt:p,updatedAt:p,title:f,querystring:m,userId:u})}await e.vault.adapter.write(qc(e),JSON.stringify({queries:i},null,2))}},AG=async()=>{const{app:e}=Se.getState().dailyNotesState;return await J9(e,qc(e))||await X9(e),await Cf(e)||[]},NG=(e,t)=>({createdAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:I("Temp Filter"),updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),OG=async(e,t)=>{const n=await Cf(Se.getState().dailyNotesState.app)||[],r={createdAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),id:A.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await rg(Se.getState().dailyNotesState.app,n),r};function ru(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(typeof e!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!ru(e[o],t[o]))return!1;return!0}if(e.constructor!==t.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp)return e.toString()===t.toString();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o)||!ru(e[o],t[o]))return!1;return!0}function PG(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:typeof e=="object"?Object.keys(e).length===0:!1}function jG(e,t,n){let r;function o(){r=void 0}function a(...i){const s=Date.now();if(r===void 0){r=s,e.apply(this,i);return}s-r>=t&&(r=s,e.apply(this,i))}return a.cancel=o,a}function qv(e){const t=e.match(/^#+/);return t?t[0].length:0}function AN(e,t){const n=e.split(`
`);let r="",o=[],a=!1,i=1;for(let s=0;s<n.length;s++){const l=n[s];if(l.startsWith("#")&&/^#{1,6}\s/g.test(l)){if(a&&qv(l)<=qv(t))break;r=l,r===t?(a=!0,i=s+1):a&&qv(l)>qv(t)?o.push(l):(a=!1,o=[])}else a&&o.push(l)}return t?PG(o)?{content:"",startLine:-1}:{content:o.join(`
`),startLine:i}:{content:e,startLine:0}}function oC(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function LG(e,t,n){const r={},o=(p,m)=>{for(;p[m]!==void 0&&p[m]!==m;)m=p[m];return m},a=Ze.getState().app,i=n.split(`
`),s=t+i.length-1,l=a.metadataCache.getFileCache(e)?.listItems,u={};if(!l)return[];const f=p=>{const m=/^(-|\*|\d\.)\s/,w=/(\[.\]\s)?/,b=/(\d{1,2}:\d{2}(:\d{2})?)(-\d{1,2}:\d{2}(:\d{2})?)?\s?/;return new RegExp(m.source+w.source+b.source).test(p)};return l.forEach(p=>{const m=p.position.start.line,w=p.position.end.line;if(m>=t&&w<=s){const b=m-t,y=w-t,S=i.slice(b,y+1),x=S.join(`
`);if(p.parent&&p.parent>0&&(r[p.position.start.line]=p.parent),p.parent&&u[p.parent]){if(m-p.parent===1){const C=i[b]?.match(/^(\s*)/);C&&(u[p.parent].indent=C[0])}const E=new RegExp("^"+u[p.parent].indent);u[p.parent].content+=`
`+x.split(`
`).map(C=>C?.replace(E,"")).join(`
`)}else if(p.parent&&u[o(r,p.parent)]){const E=new RegExp("^"+u[o(r,p.parent)].indent);u[o(r,p.parent)].content+=`
`+x.split(`
`).map(C=>C?.replace(E,"")).join(`
`)}else if(f(x)||new RegExp(vG).test(x)){u[m]||(u[m]={content:"",blockId:"",indent:""});const E=S.length>1&&S[1]?.match(/^(\s*)/);E&&(u[m].indent=E[0]),u[m].content=x.split(`
`).map(C=>C?.replace(u[m].indent,"")).join(`
`),u[m].blockId=p.id}}}),Object.keys(u).map(p=>{const m=parseInt(p);return{line:u[m].content,blockId:u[m].blockId||"",index:m}})}async function RG(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new A.Notice(I("File not found for the given thino path, is creating a new file")),n=await t.vault.create(e,'{"nodes": [], "edges": []}'),Ge.setChangedByMemos(!0)),n}async function FG(e,t){let n;try{n=await t.vault.read(e)}catch(o){console.error(o),n=await t.vault.cachedRead(e)}const r=t.metadataCache.getFileCache(e)?.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function HG(e){const t=e.split(/\r?\n/),n=[];let r=!1,o=[],a="";for(let i=0;i<t.length;i++){const s=t[i];s.startsWith("> [!thino]")?(r&&(n.push({metadata:a,content:o.join(`
`).trim()}),o=[]),r=!0,a=s.replace("> [!thino]","").trim()):r&&s.startsWith(">")?o.push(s.replace(/^> /,"")):r&&!s.startsWith(">")&&(r=!1,n.push({metadata:a,content:o.join(`
`).trim()}),o=[],a="")}return r&&n.push({metadata:a,content:o.join(`
`).trim()}),n}async function BG(e,t={}){const{maxRetries:n=3,retryDelay:r=200,useExponentialBackoff:o=!0,forceReread:a=!1}=t;return Q9(e,0,n,r,o,a)}async function Q9(e,t,n,r,o,a){try{const{vault:i,metadataCache:s}=Se.getState().dailyNotesState.app;if(a)await i.read(e);else try{await i.cachedRead(e)}catch{await i.read(e)}s.getFileCache(e),await new Promise(f=>setTimeout(f,150));const u=s.getFileCache(e)?.listItems||[];return!0}catch(i){if(console.warn(`Failed to refresh file cache for ${e.path} (attempt ${t+1}):`,i),t<n){const s=o?r*Math.pow(2,t):r;return await new Promise(l=>setTimeout(l,s)),Q9(e,t+1,n,r,o,a)}return!1}}async function _G(e,t,n,r){const o=n.replace(/\s?\[pinned::[^\]]+\]/g,"").replace(/\s?\[visibility::[^\]]+\]/g,"").replace(/\s?\[archived::[^\]]+\]/g,"").replace(/\s?\[deleted::[^\]]+\]/g,"").replace(/\s?\[webId::[^\]]+\]/g,"").replace(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/g,"").trim(),a=eF(o);let i=null,s=0;for(const l of e){if(!l.position)continue;const h=t.slice(l.position.start.line,l.position.end.line+1).join(`
`).replace(/^- \d{2}:\d{2}\s*/,"").replace(/^- \[.\]\s*\d{2}:\d{2}\s*/,"").replace(/^- \[.\]\s*/,"").replace(/^- /,"").replace(/\s?\[pinned::[^\]]+\]/g,"").replace(/\s?\[visibility::[^\]]+\]/g,"").replace(/\s?\[archived::[^\]]+\]/g,"").replace(/\s?\[deleted::[^\]]+\]/g,"").replace(/\s?\[webId::[^\]]+\]/g,"").replace(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/g,"").trim(),p=YG(o,h,a);if(p===1)return l;p>s&&p>.8&&(i=l,s=p)}return i&&s>.8?i:(console.warn(`⚠️ Could not find memo by content for memo ${r.slice(-6)} (best score: ${s.toFixed(2)})`),null)}function eF(e){const t=e.split(/\s+/).filter(a=>a.length>3),n=[...new Set(t)].slice(0,5).join(" "),r=e.substring(0,30),o=e.length>30?e.substring(e.length-30):"";return`${r}|${o}|${n}`}function YG(e,t,n){if(e===t)return 1;const r=eF(t);if(n===r)return .95;const o=Math.min(e.length,t.length)/Math.max(e.length,t.length);if(o<.5)return 0;const a=new Set(e.toLowerCase().split(/\s+/)),i=new Set(t.toLowerCase().split(/\s+/)),s=new Set([...a].filter(h=>i.has(h))),l=new Set([...a,...i]),u=s.size/l.size,f=e.length>20&&t.includes(e.substring(0,Math.min(50,e.length)))?.3:0;return Math.max(u,f)*o}function zG(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const o=r[1].trim(),a={};o.split(" ").forEach(s=>{const[l,u]=s.slice(1,-1).split("::");a[l]=u});for(const s of Object.keys(t))if(s!=="id"&&s!=="content"){if(s==="rowStatus"&&t.rowStatus==="ARCHIVED"){a.archived="true";continue}else if(s==="rowStatus"&&t.rowStatus==="NORMAL"){delete a.archived;continue}if(s==="deleted"&&t.deleted){const l=A.moment().format("YYYYMMDDHHmmss");a.deleted=l}else typeof t[s]=="boolean"?t[s]?a[s]="true":delete a[s]:t[s]&&(typeof t[s]=="string"||typeof t[s]=="boolean")&&(a[s]=t[s])}const i=Object.entries(a).map(([s,l])=>`[${s}::${l}]`).join(" ");return e.replace(n,`%% ${i} %%`)}async function Wa(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=Se.getState().dailyNotesState.app,o=n.getAbstractFileByPath(e.path);if(!o)return e;const a=A.moment();if(await r.processFrontMatter(o,i=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&Ge.setChangedByMemos(!0),t.id&&(i.id=t.id),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.webId&&(i.webId=t.webId),t.pinned!==void 0&&(i.pinned=t.pinned),t.deleted!==void 0&&(i.deletedAt=t.deleted?a.format("YYYY/MM/DD HH:mm:ss"):""),i.createdAt||(i.createdAt=a.format("YYYY/MM/DD HH:mm:ss")),i.updatedAt=a.format("YYYY/MM/DD HH:mm:ss")}),t.content){const i=await n.read(o);let s=i;const l=t.content.replace(/\$/g,"$$$$");s=i.replace(e.content,l),await n.modify(o,s)}return Ge.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?a.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function ji(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=Se.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=A.moment();let a="";try{a=await n.read(r)}catch(S){console.error(S),a=await n.cachedRead(r)}const i=a.split(/\r?\n/),s=i.findIndex(S=>S.includes("id::"+e.id)||S.includes("Id::"+e.id)||e.webId&&S.includes(e.webId)),l=i[s];if(!l)return e;const u=zG(l,t);if(!l)return e;const f=u+`
`,h=i.findIndex((S,x)=>x>s&&S.trim()==="");let p="";h===-1&&(p=i.slice(s+1).join(`
`)),h!==-1&&(p=i.slice(s+1,h).join(`
`));let m=p;t?.content&&(m=t.content.split(/\r?\n/).map(C=>"> "+C).join(`
`));const b=(f+m).split(/\r?\n/);i.splice(s,h!==-1?h-s:i.length-s,...b);const y=i.join(`
`);return await n.modify(r,y),Ge.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Li(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=Se.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=await n.read(r),a=JSON.parse(o),i=a.nodes.find(u=>u.id===e.id);if(!i)return e;t.content&&(i.text=t.content),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.pinned!==void 0&&(i.pinned=t.pinned),t.webId&&(i.webId=t.webId);const s=A.moment();t.deleted!==void 0&&(i.deletedAt=t.deleted?s.format("YYYY/MM/DD HH:mm:ss"):""),i.updatedAt=s.format("YYYY/MM/DD HH:mm:ss");const l=JSON.stringify(a,null,2);return await n.modify(r,l),Ge.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?s.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}function UG(e,t,n){const r=[];if(!t.find(u=>u.position.start.line===e))return r;const i=(n[e]||"").match(/^(\s*)/),s=i?i[1].length:0,l=u=>/^(\s*)- (\[.\] )?\d{2}:\d{2}/.test(u);for(const u of t){const f=u.position.start.line;if(f<=e)continue;const h=n[f]||"",p=h.match(/^(\s*)/),m=p?p[1].length:0;if(m>s){let w=!0;for(const b of t){const y=b.position.start.line;if(y>e&&y<f){const x=(n[y]||"").match(/^(\s*)/);if((x?x[1].length:0)<=s){w=!1;break}}}w&&r.push(f)}else if(m===s){if(l(h))break}else break}return r}async function Zo(e,t){tF()||new A.Notice(I("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."));const{vault:n,metadataCache:r}=Se.getState().dailyNotesState.app,o=Se.getState().dailyNotesState.app,{settings:a}=Se.getState().dailyNotesState,i=e.id.toString().slice(0,14),s=A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(A.moment(i,"YYYYMMDDHHmmss"))?A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):A.moment(i,"YYYYMMDDHHmmss"),l=A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(s,"day"),u=e.path,f=n.getAbstractFileByPath(u)||n.getAbstractFileByPath(e.path);if(!f)return new A.Notice(I("Please check your daily note plugin OR periodic notes plugin settings")),e;const p=(await n.read(f)).split(`
`);let m=r.getFileCache(f),w=m?.listItems||[];if(w.length===0&&(await BG(f)&&(m=r.getFileCache(f),w=m?.listItems||[],w.length>0),w.length===0)){console.warn(`⚠️ No list items found for memo ${e.id.slice(-6)} even after cache refresh. This might be a newly created memo.`);const G={...e,content:t.content||e.content,thinoType:t.thinoType||e.thinoType,updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),pinned:t.pinned!==void 0?t.pinned:e.pinned,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,webId:t.webId||e.webId,deletedAt:t.deleted?A.moment().format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt||""};return console.warn(`Returning updated memo without file modification for memo ${e.id.slice(-6)}`),G}const b=parseInt(e.id.slice(14));let y=b;oC(w);let S=w.find(te=>te.position.start.line===b);if(!S&&e.content&&(S=await _G(w,p,e.content,e.id)),!S&&e.hasId&&(S=w.find(te=>te.position?p.slice(te.position.start.line,te.position.end.line+1).join(`
`).includes(`^${e.hasId}`):!1)),!S){console.warn(`⚠️ List item not found after all search strategies for memo ${e.id.slice(-6)}. Original line: ${b}. This might indicate a line number mismatch.`);const te={...e,content:t.content||e.content,thinoType:t.thinoType||e.thinoType,updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),pinned:t.pinned!==void 0?t.pinned:e.pinned,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,webId:t.webId||e.webId,deletedAt:t.deleted?A.moment().format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt||""};return console.warn(`Returning updated memo without file modification for memo ${e.id.slice(-6)}`),te}const x=S.position.start.line,E=e.content.split(`
`).length;y=x+E,y>=p.length&&(y=p.length-1);const C=w.find(te=>{const G=te.position.start.line;if(G<=x)return!1;const X=p[G]||"";return/^(\s*)- (\[.\] )?\d{2}:\d{2}/.test(X)});C&&y>=C.position.start.line&&(console.warn(`⚠️ Limiting endLine to prevent including next memo. Original: ${y}, Limited: ${C.position.start.line-1}`),y=C.position.start.line-1);const M=p.slice(x,y+1),k=M.join(`
`);let O=k;const F=o.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,R=F?1:o.vault.getConfig("tabSize"),B=(F?" ":" ").repeat(R),Y=k.match(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/),H=t.hasId!==void 0?t.hasId:Y?Y[1]:e.hasId||null,Z=M[0]||"",W=bu(Z);let $;W.fullTimeMatch?$=W.fullTimeMatch:$=l?A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm"):(parseInt(e.id.toString().slice(10,12))+24).toString()+":"+e.id.toString().slice(12,14);let V=$;!W.fullTimeMatch&&a.DefaultTimePrefix!=="HH:mm"&&(V=A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(a.DefaultTimePrefix));const ne={pinned:k.includes("[pinned::true]"),deleted:k.match(/\[deleted::([^\]]+)\]/)?.[1]||"",archived:k.includes("[archived::true]"),webId:k.match(/\[webId::([^\]]+)\]/)?.[1]||"",visibility:k.match(/\[visibility::"([^"]+)"\]/)?.[1]||""};if(k.match(/^(- \[.\] |- |(\*|\d{1,2}\.) )/)?.[0],t.content){const te=t.thinoType?t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ":e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",G=[];if((t.pinned!==void 0?t.pinned:ne.pinned)&&G.push("[pinned::true]"),t.deleted||t.deleted!==!1&&ne.deleted){const fe=t.deleted?A.moment().format("YYYYMMDDHHmmss"):ne.deleted;G.push(`[deleted::${fe}]`)}(t.rowStatus==="ARCHIVED"||t.rowStatus!=="NORMAL"&&ne.archived)&&G.push("[archived::true]"),(t.webId!==void 0?t.webId:ne.webId)&&G.push(`[webId::${t.webId!==void 0?t.webId:ne.webId}]`),(t.visibility||ne.visibility)&&G.push(`[visibility::"${t.visibility||ne.visibility}"]`);const X=H?`^${H}`:"",ee=t.content.trim().split(`
`).length>1;/^((-|\*|\d\.|>)\s|```)/g.test(t.content);const ie=t.content.trim().split(`
`);if(/(^(-|\*|\d\.|>)\s)/g.test(ie[ie.length-1]),ee){const fe=ie.map(we=>B+we);let he=!1;for(let we=fe.length-1;we>=0;we--)if(!/(^(-|\*|\d\.|>)\s)/g.test(fe[we].trim())){fe[we]=fe[we]+(H?` ${X}`:""),he=!0;break}!he&&H&&(fe[fe.length-1]+=` ${X}`),O=`${te}${V}
${fe.join(`
`)} ${G.join(" ")}`.trim()}else O=`${te}${V} ${t.content.trim()} ${G.join(" ")}`.trim()+(X?` ${X}`:"")}else{if(t.thinoType){const te=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";O=O.replace(/^((- \[.\] )|((-|\*) ))/,te)}if(t.rowStatus&&(t.rowStatus==="ARCHIVED"?O.includes("[archived::")?O=O.replace(/\[archived::(true|false)\]/,"[archived::true]"):O+=(O.endsWith(" ")?"":" ")+"[archived::true]":t.rowStatus==="NORMAL"&&(O=O.replace(/\s?\[archived::(true|false)\]/,""))),t.visibility){const te=`[visibility::"${t.visibility}"]`;O.includes("[visibility::")?O=O.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/,te):O+=(O.endsWith(" ")?"":" ")+te}if(t.pinned!==void 0&&(t.pinned?O.includes("[pinned::")?O=O.replace(/\[pinned::(true|false)\]/,"[pinned::true]"):O+=(O.endsWith(" ")?"":" ")+"[pinned::true]":O=O.replace(/\s?\[pinned::(true|false)\]/,"")),t.webId!==void 0&&(O.includes("[webId::")?t.webId===""?O=O.replace(/\s?\[webId::([^\]]+)\]/,""):O=O.replace(/\[webId::([^\]]+)\]/,`[webId::${t.webId}]`):t.webId!==""&&(O+=(O.endsWith(" ")?"":" ")+`[webId::${t.webId}]`)),t.deleted!==void 0){const te=A.moment();if(t.deleted){const G=`[deleted::${te.format("YYYYMMDDHHmmss")}]`;O.includes("[deleted::")?O=O.replace(/\[deleted::([^\]]+)\]/,G):O+=(O.endsWith(" ")?"":" ")+G}else O=O.replace(/\s?\[deleted::([^\]]+)\]/,"")}if(t.hasId!==void 0||H){const te=t.hasId!==void 0?t.hasId:H;O=O.replace(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/g,""),te&&(O=O.trimEnd(),O+=` ^${te}`)}}if(O!==k){const te=y-x+1,G=O.trim().split(`
`);te>10&&G.length<te/2&&console.warn(`⚠️ Safety check: Replacing ${te} lines with ${G.length} lines for memo ${e.id.slice(-6)}. This might indicate content mixing.`);const X=(k.match(/^- \d{2}:\d{2}/gm)||[]).length;if(X>1){console.warn(`⚠️ Safety check: Original content contains ${X} memo-like structures. Limiting replacement to single memo.`);const fe=k.match(/^- \d{2}:\d{2}.*$/m);if(fe){const he=k.indexOf(fe[0]),we=k.substring(he+fe[0].length).match(/^- \d{2}:\d{2}/m);if(we){const Ne=x+k.substring(0,he+fe[0].length+k.substring(he+fe[0].length).indexOf(we[0])).split(`
`).length-1;y=Math.min(y,Ne-1)}}}const ee=y-x+1;p.splice(x,ee,O.trim()),await n.modify(f,p.join(`
`)),Ge.setChangedByMemos(!0);const ie=A.moment();return{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,hasId:t.hasId??e.hasId,deletedAt:t.deleted?ie.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}return e}async function VG(e,t,n){const{vault:r,metadataCache:o}=Se.getState().dailyNotesState.app||window.app,a=r.getFileByPath(e);if(!a)return;const i=o.getFileCache(a)?.listItems||[];oC(i);const s=[],l=r.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,u=l?1:r.getConfig("tabSize"),f=(l?" ":" ").repeat(u),h=A.moment(),m=(await r.read(a)).split(`
`);return t.map(b=>{const y=parseInt(b.id.slice(14));let S=i.find(O=>O.position.start.line===y);if(!S&&b.content&&(S=i.find(O=>{if(!O.position)return!1;const B=m.slice(O.position.start.line,O.position.end.line+1).join(`
`).replace(/^- \d{2}:\d{2}\s*/,"").replace(/^- \[.\]\s*\d{2}:\d{2}\s*/,"").replace(/^- \[.\]\s*/,"").replace(/^- /,"").trim(),Y=b.content.trim();return B.includes(Y.substring(0,50))})),!S)return console.warn(`⚠️ Bulk update: Could not find memo ${b.id.slice(-6)} at line ${y}`),null;const x=S.position.start.line,C=UG(x,i,m).map(O=>{const F=i.find(R=>R.position.start.line===O);return F?F.position.end.line:-1});let M=Math.max(...C,S.position.end.line);const k=i.find(O=>O.position.start.line>x&&(!O.parent||O.parent<=0));return k&&M>=k.position.start.line&&(console.warn(`⚠️ Bulk update: Limiting endLine to prevent including next block. Original: ${M}, Limited: ${k.position.start.line-1}`),M=k.position.start.line-1),{id:b.id,start:x,end:M}}).filter(Boolean).forEach(b=>{const S=m.slice(b.start,b.end+1).join(`
`),x=S.split(`
`),E=x.length-1,M=x[E].trim();let k=S;const O=/\[(pinned|archived|deleted|webId|visibility)::[^\]]*\]\s*$/.test(M),F=(R,B)=>R.split(`
`).length>1&&(/```/g.test(M)||!O)?R+`
`+f+B:R+(R.endsWith(" ")?"":" ")+B;if(n==="delete"){const R="[deleted::"+h.format("YYYYMMDDHHmmss")+"]";k=k.replace(/\[deleted::([^\]]+)\]/,""),k=F(k,R)}if(n==="restoreFromDelete"&&(k=k.replace(/ ?\[deleted::([^\]]+)\]/,"")),n==="archive"){const R="[archived::true]";k.includes("[archived::")?k=k.replace(/\[archived::(true|false)\]/,R):k=F(k,R)}n==="restoreFromArchive"&&(k=k.replace(/ ?\[archived::(true|false)\]/,"")),n==="deleteForever"?m.splice(b.start,b.end-b.start+1):m.splice(b.start,b.end-b.start+1,k),s.push({...t.find(R=>R.id===b.id),deletedAt:n==="delete"?h.format("YYYY/MM/DD HH:mm:ss"):"",rowStatus:n==="archive"?"ARCHIVED":"NORMAL"})}),await r.modify(a,m.join(`
`)),Ge.setChangedByMemos(!0),s}const WG=e=>{switch(e?.sourceType){case"CANVAS":return Li(e,{id:e.id,pinned:!0});case"DAILY":return Zo(e,{id:e.id,pinned:!0});case"MULTI":return Wa(e,{id:e.id,pinned:!0});case"FILE":return ji(e,{id:e.id,pinned:!0})}},GG=e=>{switch(e?.sourceType){case"CANVAS":return Li(e,{id:e.id,pinned:!1});case"DAILY":return Zo(e,{id:e.id,pinned:!1});case"MULTI":return Wa(e,{id:e.id,pinned:!1});case"FILE":return ji(e,{id:e.id,pinned:!1})}},ZG=e=>{let t;switch(e){case" ":t="TASK-TODO";break;case"x":case"X":t="TASK-DONE";break;default:t="TASK-"+e;break}return t};async function qG(e,t){if(!t)return 0;const{vault:n}=Se.getState().dailyNotesState.app,r=e?.DefaultMemoComposition,o=e?.ProcessEntriesBelow&&e?.ProcessContentTarget!=="whole"?e?.ProcessEntriesBelow:"",a=e?.ProcessContentTarget!=="whole"?e?.DifferentInsertTarget?e?.InsertAfterForTask?e?.InsertAfterForTask:"":o:"";let i;try{i=await n.read(t)}catch(w){console.error(w),i=await n.cachedRead(t)}let s;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?s="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\<time\\>)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):s="(-|\\*) (\\[(.{1})\\]\\s)?((\\<time\\>)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const l=new RegExp(s,"g"),u=(i.match(l)||[]).length,f=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),h=new RegExp(a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),p=(i.match(f)||[]).length,m=(i.match(h)||[]).length;return i=null,p||m?u:0}function NN(e,t,n,r,o){const a=Se.getState().dailyNotesState.app||window.app,i=xd(o,"day")||A.moment(o.stat.ctime),s=LG(o,n,t),l=a?.metadataCache.getFileCache(o),u={frontmatter:l?.frontmatter||{},tags:l?.frontmatter?.tags||[]};for(const f of s){$G(i,f,e);const{rawText:h,memoType:p}=KG(f),{content:m,pinned:w,archived:b,deleted:y,deletedAtStr:S,webId:x,visibility:E}=JG(h,f),C=Qw(m);r.push({id:i.format("YYYYMMDDHHmmss")+`${f.index}`,content:m.trim(),createdAt:i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:i.format("YYYY/MM/DD HH:mm:ss"),thinoType:p,hasId:f.blockId?f.blockId:"",linkId:C,path:o.path,deletedAt:y?A.moment(S,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:b?"ARCHIVED":"NORMAL",visibility:E,pinned:w,creatorName:"Thino",resourceList:[],sourceType:"DAILY",webId:x,fileInfo:u})}}function $G(e,t,n){const r=bu(t.line);if(r.startHour&&r.startMin)e.hours(parseInt(r.startHour)),e.minutes(parseInt(r.startMin)),r.startSec?e.seconds(parseInt(r.startSec)):e.seconds(0);else{const o=XG(n.DefaultMemoComposition,t.line),a=QG(n.DefaultMemoComposition,t.line),i=eZ(t.line);e.hours(parseInt(o)),e.minutes(parseInt(a)),i?e.seconds(parseInt(i)):e.seconds(0)}}function KG(e){let t=nZ(e.line),n;if(/^\s*[-*]\s(\[(.)\])\s/g.test(e.line)){const r=tZ(e.line);t=rZ(e.line),n=ZG(r)}else n="JOURNAL";return{rawText:t,memoType:n}}function JG(e,t){if(!e)return{content:"",pinned:!1,archived:!1,deleted:!1,deletedAtStr:"",webId:"",visibility:"PRIVATE"};let n=e.trim().replaceAll(/<br>/g,`
`);const r=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(e),o=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(e),a=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(e),i=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(e)?.[2],s=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(e)?.[2],l=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(e)?"PUBLIC":"PRIVATE";return n=n.replace(/\s?\[pinned::[^\]]+\]/g,"").replace(/\s?\[visibility::[^\]]+\]/g,"").replace(/\s?\[archived::[^\]]+\]/g,"").replace(/\s?\[deleted::[^\]]+\]/g,"").replace(/\s?\[webId::[^\]]+\]/g,""),t.blockId&&(n=n.replace("^"+t.blockId,"")),{content:n,pinned:r,archived:o,deleted:a,deletedAtStr:i,webId:s,visibility:l}}function Qw(e){const t=[],n=/(?:\[\[([^\]|]+)#\^([a-zA-Z0-9-]+)(?:\|[^\]]+)?\]\])|(?:\[.+?\]\(([^)]+)#\^([a-zA-Z0-9-]+)\))/g;let r;for(;(r=n.exec(e))!==null;)r[1]&&r[2]?t.push(`${r[1]}#^${r[2]}`):r[3]&&r[4]&&t.push(`${r[3]}#^${r[4]}`);return t}function bu(e){const t=/((\d{1,2}):(\d{2})(:(\d{2}))?)-(\d{1,2}):(\d{2})(:(\d{2}))?/,n=/(\d{1,2}):(\d{2})(:(\d{2}))?/,r=e.match(t);if(r)return{startHour:r[2],startMin:r[3],startSec:r[5],endHour:r[6],endMin:r[7],endSec:r[9],fullTimeMatch:r[0]};const o=e.match(n);return o?{startHour:o[1],startMin:o[2],startSec:o[4],fullTimeMatch:o[0]}:{startHour:"",startMin:"",fullTimeMatch:""}}const XG=(e,t)=>{const n=bu(t);if(n.startHour)return n.startHour;let r;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",new RegExp(r,"").exec(t)?.[6]},QG=(e,t)=>{const n=bu(t);if(n.startMin)return n.startMin;let r;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",new RegExp(r,"").exec(t)?.[7]},eZ=e=>{const t=bu(e);if(t.startSec)return t.startSec;const n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\d{1,2})\\:(\\d{2})\\:(\\d{2})(.*)";return new RegExp(n,"").exec(e)?.[7]},tZ=e=>/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e)?.[2],tF=()=>Yp()?!0:(new A.Notice(I("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);function nZ(e){const t=bu(e);return t.fullTimeMatch?e.replace(new RegExp(`^(-|\\*|\\d\\.) (${t.fullTimeMatch})\\s(.*)`),"$3"):e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function rZ(e){return oZ(e)}const oZ=e=>{const t=bu(e);if(t.fullTimeMatch)return new RegExp(`^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(${t.fullTimeMatch})\\s([\\w\\W]*)`).exec(e)?.[3];const n="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)";return new RegExp(n,"").exec(e)?.[4]};async function nF(e,t=!1){const n=Se.getState().dailyNotesState.app,r=n.vault.getFileByPath(e.path);if(r&&e.hasId)return t?"!"+n.fileManager.generateMarkdownLink(r,"","#^"+e.hasId,e.id):e.hasId?n.fileManager.generateMarkdownLink(r,"","#^"+e.hasId,e.id):`[@THINO](${e.id})`;const o=je.randomId(6);return await Zo(e,{id:e.id,hasId:o}),r?t?"!"+n.fileManager.generateMarkdownLink(r,"","#^"+o,e.id):n.fileManager.generateMarkdownLink(r,"","#^"+o,e.id):`[@THINO](${e.id})`}async function rF(e,t){if(!e)return t;const n=Se.getState().dailyNotesState.app||window.app,r=Se.getState().dailyNotesState.settings,o=await FG(e,n),a=r.IgnoreFolderForMultiType;if(new Set(a.filter(h=>h!=="")).has(e.parent?.path))return t;let l=A.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");const u=n?.metadataCache.getFileCache(e),f={frontmatter:u?.frontmatter||{},tags:u?.frontmatter?.tags||[]};await n.fileManager.processFrontMatter(e,h=>{if(h.id||(h.id=je.randomId(16)),h.createdAt?l=A.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?h.createdAt:l:h.createdAt=l,!o.trim())return t;const p=!!h.pinned,m=h.rowStatus&&h.rowStatus==="ARCHIVED",w=!!h.deletedAt,b=h.deletedAt?h.deletedAt:"",y=h.visibility?h.visibility:"PRIVATE",S=h.thinoType?h.thinoType:"JOURNAL",x=h.webId?h.webId:"",E=h.id?h.id:"",C=h.hasId?h.hasId:"",M=h.linkId?h.linkId:"",k=e.path,O="Memo",F="MULTI",R=[];return t.push({id:E,content:o,createdAt:l,updatedAt:l,deletedAt:w?A.moment(b,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:p,rowStatus:m?"ARCHIVED":"NORMAL",visibility:y,thinoType:S,hasId:C,linkId:M,path:k,creatorName:O,sourceType:F,resourceList:R,webId:x,fileInfo:f}),t})}async function TI(e,t){if(!e)return t;const{vault:n,metadataCache:r}=Se.getState().dailyNotesState.app||window.app;let o;try{o=await n.read(e)}catch(y){console.error(y),o=await n.cachedRead(e)}if(!o)return;const a=A.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),i=A.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),s=e.path,l="Thino",u="FILE",f="",h=[],p=[],m=r.getFileCache(e),w={frontmatter:m?.frontmatter||{},tags:m?.frontmatter?.tags||[]},b=HG(o);for(const y of b){const S=y.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!S)continue;const x=y.metadata.match(/id::([^\]]*)/g)?.[0]?.replace("id::","");if(!x)continue;const E=S?S[0]:a,C=S?S[0]:i,M=y.metadata.match(/webId::([^\]]*)/g)?y.metadata.match(/webId::([^\]]*)/g)?.[0]?.replace("webId::",""):"",k=y.metadata.contains("[pinned::true]"),O=y.metadata.contains("[archived::true]"),F=y.metadata.contains("[deleted::"),R=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(y.metadata)?.[2],B=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(y.metadata)?"PUBLIC":"PRIVATE",Y=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(y.metadata)?.[2];t.push({id:x,content:y.content,createdAt:E,updatedAt:C,deletedAt:F?A.moment(R,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:k,rowStatus:O?"ARCHIVED":"NORMAL",visibility:B,thinoType:Y||"JOURNAL",hasId:f,linkId:h,path:s,creatorName:l,sourceType:u,resourceList:p,webId:M,fileInfo:w})}return t}async function oF(e,t){if(!e)return[];const n=Se.getState().dailyNotesState.settings,{vault:r}=Se.getState().dailyNotesState.app||window.app;if(await qG(n,e)===0)return;let a;try{a=await r.read(e)}catch(h){console.error(h),a=await r.cachedRead(e)}const{content:i,startLine:s}=AN(a,n?.ProcessContentTarget==="whole"?"":n.ProcessEntriesBelow);let l="",u=0;if(n.DifferentInsertTarget&&n?.ProcessContentTarget!=="whole"&&n.InsertAfterForTask&&!i.includes(n.InsertAfterForTask)){const{content:h,startLine:p}=AN(a,n.InsertAfterForTask);l=h,u=p}const f=[];NN(n,i,s,f,e),n.DifferentInsertTarget&&l&&NN(n,l,u,f,e),f.length!==0&&t.push(...f.sort((h,p)=>h.createdAt>p.createdAt?-1:1))}async function aF(e,t){const n=Se.getState().dailyNotesState.app||window.app;if(!(e instanceof A.TFile))return;let r;try{r=await n.vault.read(e)}catch(i){console.error(i),r=await n.vault.cachedRead(e)}if(!r)return;const a=JSON.parse(r)?.nodes;for(const i of a){if(i.type==="group"||i.createdAt===void 0||i.text.trim()==="")continue;const l=A.moment(i?.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),u=A.moment(i?.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),f=i?.deletedAt?A.moment(i?.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",h=!!i?.pinned,p=i?.archived?"ARCHIVED":"NORMAL",m=i?.visibility?i?.visibility:"PRIVATE",w=i?.thinoType?i?.thinoType:"JOURNAL",b=i?.text?i?.text:"",y=i?.id?i?.id:"",S=i?.hasId?i?.hasId:"",x=i?.linkId?i?.linkId:"",E=e.path,C="Memo",M="CANVAS",k=[],O=i?.webId?i?.webId:void 0;t.push({id:y,content:b,createdAt:l,updatedAt:u,deletedAt:f,pinned:h,rowStatus:p,visibility:m,thinoType:w,hasId:S,linkId:x,path:E,creatorName:C,sourceType:M,resourceList:k,webId:O,fileInfo:{frontmatter:{},tags:[]}})}}async function ON(e=[]){const t=[],n=[],r=Se.getState().dailyNotesState.app||app,{vault:o}=r,{settings:a}=Se.getState().dailyNotesState,i=r.loadLocalStorage("tokenForSync"),s=async(l,u)=>{for(const f of l)try{await u(f,t,a)}catch(h){console.error(h),new A.Notice(h)}};try{if(e.includes("CANVAS")){const l=aZ(o);await s(l,aF)}}catch(l){console.error(l)}try{if(e.includes("MULTI")){const l=iZ(o,r,a);await s(l,rF)}}catch(l){console.error(l)}try{if(e.includes("DAILY")){const l=await sZ(o);await s(l,oF)}}catch(l){console.error(l)}try{if(e.includes("FILE")||i){const l=lZ(o,r,a);await s(l,TI)}}catch(l){console.error(l)}return{memos:t,commentMemos:n}}function aZ(e){return e.getAllLoadedFiles().filter(t=>t instanceof A.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function iZ(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(i=>i.parent?.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!i.path?.endsWith("thino.md")),a=n.TagForMultiTypeFiles?r.filter(i=>!(i.parent?.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!i.path?.endsWith("thino.md"))&&A.getAllTags(t.metadataCache.getFileCache(i))?.contains("#"+n.TagForMultiTypeFiles.replace("#",""))):[];return[...o,...a]}async function sZ(e){const t=Jw();t===void 0&&new A.Notice(I("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(A.normalizePath(t))||new A.Notice(I("Failed to find daily notes folder"));const r=Xs();return Object.values(r).filter(o=>o instanceof A.TFile&&o.extension==="md")}function lZ(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(i=>i.name.trim().includes("thino")),a=n.TagForFileTypeFiles?r.filter(i=>!i.name.trim().includes("thino")&&A.getAllTags(t.metadataCache.getFileCache(i))?.contains("#"+n.TagForFileTypeFiles.replace("#",""))):[];return[...o,...a]}const cZ=async(e,t,n)=>{const r=await Cf(Se.getState().dailyNotesState.app)||[],o=r.find(s=>s.id===e),a={...o,title:t,querystring:n},i=r.findIndex(s=>s.id===e);return r[i]=a,await rg(Se.getState().dailyNotesState.app,r),[o]},uZ="https://api.thino.pkmer.cn/test",Mf=uZ,dZ="unknown",fZ=/!\[(?<content>[^\]]+)\]\((?<link>[^)]+)\)/g;function hZ(e){return e.substring(e.lastIndexOf(".")+1)}function pZ(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${hZ(e.id)}`,size:e.size.toString()}}function mZ(e){const t=e?.matchAll(fZ);return t?Array.from(t).map(n=>pZ({url:n.groups?.link,id:dZ,size:0})).filter(n=>n.type!="html"):[]}function og(e){return{id:e.id,createdAt:A.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:A.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:e.ttime?.toString()?A.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:mZ(e.content),creatorName:"thino",sourceType:e?.thinoType||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime,thinoType:e?.thinoStatus||"JOURNAL"}}async function gZ(e){const n={url:`${Mf}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(a=>og(a))}catch(o){console.error(`Error processing memo response: ${o}`)}}).catch(r=>(console.error(r),[]))}function Df(){return(Se.getState().dailyNotesState.app||app)?.loadLocalStorage("tokenForSync")||""}async function aC(e){const t=`${Mf}/thino/createThino`,n={content:e.content,thinoType:e?.thinoType||"FILE",thinoStatus:e?.thinoStatus||"JOURNAL",pinned:!1,rowStatus:"NORMAL",encrypted:!1},r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create memo: ${o.status}`);try{const a=o.json;return og(a.payload)}catch(a){console.error(`Error processing memo creation response: ${a}`)}}).catch(o=>(console.error(o),null))}function vZ(e){return{id:e.id,ctime:A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:A.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?A.moment(e.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():void 0,rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,encrypted:!1,thinoType:e.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:e.thinoType,tags:[]}}async function yZ(e){const t=`${Mf}/thino/createThinosByData`,n=e.map(o=>vZ(o)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create thinos: ${o.status}`);try{return o.json.payload.map(s=>og(s))}catch(a){console.error(`Error processing thinos creation response: ${a}`)}}).catch(o=>(console.error(o),[]))}async function i1(e){const n={url:`${Mf}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const o=r.json;return og(o.payload)}catch(o){console.error(`Error processing memo update response: ${o}`)}}).catch(r=>(console.error(r),null))}async function Vp(e){const n={url:`${Mf}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const o=r.json;return og(o.payload)}catch(o){console.error(`Error processing memo recovery response: ${o}`)}}).catch(r=>(console.error(r),null))}async function iC(e){const n={url:`${Mf}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${Df()}`}};return A.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function bZ(e){return e?.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")||e}function lb(e,t){return e&&e.replace(/\{\{TIME\|(.*?)\}\}/g,(n,r)=>{try{return t.format(r)}catch(o){return console.error("Invalid time format:",r,o),n}})}function wZ(e){const t=[];let n=e;for(;n.contains(`
`);){const r=n.indexOf(`
`);t.push(n.slice(0,r)),n=n.slice(r+1)}return t.push(n),t}async function SZ({content:e,isList:t,name:n}){const r=Se.getState().dailyNotesState.settings,o=A.moment(),a=je.randomId(16),i=r?.MemoOtherSaveLocation.MemoDefaultMultiFilePath||"Thino",s=n||`${o.format("YYYYMMDD")}-${a}`,l=`${i}/${s}.md`,u={id:a,content:e,deletedAt:"",path:l,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"MULTI",fileInfo:{tags:[],frontmatter:{}}},f=Ze.getState().app||window.app,{vault:h,fileManager:p}=f,m=h.getAbstractFileByPath(i);(!m||!(m instanceof A.TFolder))&&(new A.Notice(I("Folder not found for the given thino path, is creating a new folder")),await h.createFolder(i)),Ge.setChangedByMemos(!0);let w;const b=f.vault.getFileByPath(l);b?w=await h.create(`${i}/${o.format("YYYYMMDD")}-${a}.md`,e):w=await h.create(l,e),await p.processFrontMatter(w,x=>{x.id=a,x.createdAt=o.format("YYYY/MM/DD HH:mm:ss"),x.updatedAt=o.format("YYYY/MM/DD HH:mm:ss"),x.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||b)&&r?.SetFileNameAfterCreate&&f.fileManager.promptForFileRename(w);const y=f.metadataCache.getFileCache(w),S={tags:y?.frontmatter?.tags||[],frontmatter:y?.frontmatter||{}};return{...u,fileInfo:S}}async function TZ({content:e,isList:t}){const n=Se.getState().dailyNotesState.settings,r=A.moment(),o=je.randomId(16),a=n?.MemoOtherSaveLocation.MemoDefaultSingleFilePath||"basic.thino.md",i={id:o,content:e,deletedAt:"",path:a,createdAt:r.format("YYYY/MM/DD HH:mm:ss"),updatedAt:r.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",fileInfo:{tags:[],frontmatter:{}}},s=Ze.getState().app,{vault:l}=s;let u=l.getAbstractFileByPath(a);(!u||!(u instanceof A.TFile))&&(new A.Notice(I("File not found for the given thino path, is creating a new file")),u=await l.create(a,""));const f=s.metadataCache.getFileCache(u),h={tags:f?.frontmatter?.tags||[],frontmatter:f?.frontmatter||{}};let p="";try{p=await l.read(u)||await l.cachedRead(u)}catch(E){console.error(E),new A.Notice(I("Failed to read current daily note, check if it exists."))}const m=p.indexOf(`# ${r.format("YYYY-MM-DD")}`);let w=p.indexOf(`
#`,m+1);w===-1&&(w=p.length);const b=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${o}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,y=e.replace(/\n/g,`
> `),S=`
${b}
> ${y}
`;let x;if(m===-1){const E=`# ${r.format("YYYY-MM-DD")}`;x=`${p.substring(0,w)}
${E}${S}
${p.substring(w)}`}else x=`${p.substring(0,w)}${S}${p.substring(w)}`;return setTimeout(async()=>{Ge.setChangedByMemos(!0),await l.modify(u,x)},200),{...i,fileInfo:h}}async function PN(e){const t=Se.getState().dailyNotesState.settings,n=A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,o=t?.MemoOtherSaveLocation.MemoDefaultSingleFilePath||"basic.thino.md",a={id:r,content:e.content,deletedAt:e.deletedAt||"",path:o,createdAt:n.format("YYYY/MM/DD HH:mm:ss"),updatedAt:n.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",hasId:"",linkId:[],pinned:e.pinned,visibility:"PUBLIC",rowStatus:e.rowStatus||"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",webId:e.id,fileInfo:e?.fileInfo},i=Ze.getState().app,{vault:s}=i;let l=s.getAbstractFileByPath(o);(!l||!(l instanceof A.TFile))&&(new A.Notice(I("File not found for the given thino path, is creating a new file")),l=await s.create(o,""));let u="";try{u=await s.read(l)||await s.cachedRead(l)}catch(x){console.error(x),new A.Notice(I("Failed to read current daily note, check if it exists."))}const f=i.metadataCache.getFileCache(l),h={tags:f?.frontmatter?.tags||[],frontmatter:f?.frontmatter||{}},p=u.indexOf(`# ${n.format("YYYY-MM-DD")}`);let m=u.indexOf(`
#`,p+1);m===-1&&(m=u.length);const w=`> [!thino] ${n.format("YYYY/MM/DD HH:mm:ss")} %% [id::${r}] [thinoType::JOURNAL]${e.rowStatus==="ARCHIVED"?" [archived::true]":""}${e.pinned===!0?" [pinned::true]":""}${e.deletedAt?` [deleted::${e.deletedAt}]`:""}${e.id?` [webId::${e.id}]`:""} %%`,b=e.content.replace(/\n/g,`
> `),y=`
${w}
> ${b}
`;let S;if(p===-1){const x=`# ${n.format("YYYY-MM-DD")}`;S=`${u.substring(0,m)}
${x}${y}
${u.substring(m)}`}else S=`${u.substring(0,m)}${y}${u.substring(m)}`;return Ge.setChangedByMemos(!0),await s.modify(l,S),{...a,fileInfo:h}}async function xZ({content:e,isList:t}){const r=Se.getState().dailyNotesState.settings?.MemoOtherSaveLocation.MemoDefaultCanvasPath||"basic.thino.canvas",o=A.moment(),a=je.randomId(16),i={id:a,content:e,deletedAt:"",path:r,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"CANVAS",fileInfo:{tags:[],frontmatter:{}}},s=Ze.getState().app,{vault:l}=s,u=await RG(r,s);if(!u||!(u instanceof A.TFile)){new A.Notice(I("File not found for the given thino path, is creating a new file"));return}const f=await l.read(u),h=JSON.parse(f);if(h.nodes.find(y=>y.id===i.id))return;let m;h.nodes.length>0&&(m=[...h.nodes].reduce((y,S)=>{if(!y.createdAt)return S;const x=A.moment(y.createdAt,"YYYY/MM/DD HH:mm:ss"),E=A.moment(S.createdAt,"YYYY/MM/DD HH:mm:ss");return x.isAfter(E)?y:S}));const w=m?{x:m.x,y:m.y+100,width:m.width,height:m.height}:{x:0,y:0,width:200,height:100};h.nodes.push({...w,type:"text",id:a,text:e,deletedAt:"",createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[]}),Ge.setChangedByMemos(!0);const b=JSON.stringify(h,null,2);return await l.modify(u,b),i}async function s1(e,t,n,r){const{vault:o}=Se.getState().dailyNotesState.app||window.app,a=Se.getState().dailyNotesState.app||window.app,i=Se.getState().dailyNotesState.settings,s=a.vault.getConfig("useTab")===void 0||window.app.vault.getConfig("useTab")===!0,l=s?1:a.vault.getConfig("tabSize"),u=(s?" ":" ").repeat(l),f=e.split(`
`).join(`
`+u),h=n||A.moment(),{DifferentInsertTarget:p,InsertAfterForTask:m,InsertType:w}=i,b=h.format(i.DefaultTimePrefix||"HH:mm");let y="",S="";i.UseMemoFixedStrings&&(y=lb(i.MemoFixedPrefix||"",h),S=lb(i.MemoFixedSuffix||"",h));const x=w==="end"?"":t?i.InsertAfter:p&&m||i.InsertAfter,E=a?.loadLocalStorage("tokenForSync");let C="";try{!r&&e&&E&&i.startSync&&(C=(await aC({content:e,thinoType:"DAILY",thinoStatus:t?"JOURNAL":"TASK-TODO"})).id)}catch(G){console.error(G)}const M=y?y+(y.endsWith(" ")?"":" ")+f:f,k=S?M+(M.endsWith(" ")?"":" ")+S:M,O=t?"- ":"- [ ] ",F=i?.DefaultMemoComposition?`${O}${i?.DefaultMemoComposition?.replace(/{TIME}/g,b).replace(/{CONTENT}/g,(k.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(k)?`
`+u:"")+k)}${k.split(`
`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(k.split(`
`)[k.split(`
`).length-1])&&C?`
`+u:" "}${C?`[webId::${C}]`:""}`:`${O}${b} ${k.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(k)?`
`+u:""}${k}${k.split(`
`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(k.split(`
`)[k.split(`
`).length-1])&&C?`
`+u:" "}${C?`[webId::${C}]`:""}`,R=Xs(),B=qw(h,R),Y="fake"+je.randomId(16);let H=!1;const Z=a.plugins.getPlugin("templater-obsidian");let W;if(B?W=B:(Z?.templater&&Z?.settings.trigger_on_file_creation&&(le.setWaitingForTemplater({origin:e,date:h,isList:t,id:Y,type:C?"web":"local"}),H=!0),W=await je.createDailyNoteCheck(h)),!W){new A.Notice(I("Failed to create daily note, check if it exists."));return}if(B||await Ze.fechLocalDailyNotes(),Z&&Z?.templater&&Z?.settings.trigger_on_file_creation&&H)return Ge.setChangedByMemos(!0),{id:Y,content:k,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:W.path,hasId:"",linkId:[],webId:C,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:{tags:[],frontmatter:{}}};let $="";try{$=await o.read(W)||await o.cachedRead(W)}catch(G){console.error(G),new A.Notice(I("Failed to read current daily note, check if it exists."))}const V=a.metadataCache.getFileCache(W),ne={tags:V?.frontmatter?.tags||[],frontmatter:V?.frontmatter||{}},Q=await iF(x,F,$);await o.modify(W,Q.content);const te=Q.posNum===-1?sF(Q.content).length-(F.split(`
`).length-1)-1:Q.posNum+1;return Ge.setChangedByMemos(!0),{id:h.format("YYYYMMDDHHmm")+"00"+te,content:k,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:W.path,hasId:"",linkId:[],webId:C,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:ne}}async function jN(e){const{vault:t}=Se.getState().dailyNotesState.app||window.app,n=Se.getState().dailyNotesState.app||window.app,{DefaultMemoComposition:r,InsertAfter:o,DefaultTimePrefix:a,DifferentInsertTarget:i,InsertAfterForTask:s,InsertType:l,UseMemoFixedStrings:u,MemoFixedPrefix:f,MemoFixedSuffix:h}=Se.getState().dailyNotesState.settings;let p=(e.pinned?" [pinned::true]":"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.visibility==="PRIVATE"?' [visibility::"PRIVATE"]':"");if(e.id){const ee=" [webId::"+e.id+"]";p+=ee}const m=A.moment();if(e.deletedAt){const ee=" [deleted::"+m.format("YYYYMMDDHHmmss")+"]";p+=ee}const w=n.vault.getConfig("useTab")===void 0||n.vault.getConfig("useTab")===!0,b=w?1:n.vault.getConfig("tabSize"),y=(w?" ":" ").repeat(b),S=e.content.split(`
`).join(`
`+y),x=A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss");let E="",C="";u&&(E=lb(f||"",x),C=lb(h||"",x));const M=E?E+(E.endsWith(" ")?"":" ")+S:S,k=C?M+(M.endsWith(" ")?"":" ")+C:M,O=x.format(a||"HH:mm"),F=!e.thinoType||e.thinoType==="JOURNAL"?"- ":e.thinoType==="TASK-TODO"?"- [ ] ":"- [x] ",R=r?`${F}${r?.replace(/{TIME}/g,O).replace(/{CONTENT}/g,(k.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(k)?`
`+y:"")+k)}${k.split(`
`).length>1&&/```/g.test(k.split(`
`)[k.split(`
`).length-1])&&p.trim()?`
`+y:" "}${p}`:`${F}${O} ${k.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(k)?`
`+y:""}${k}${k.split(`
`).length>1&&/```/g.test(k.split(`
`)[k.split(`
`).length-1])&&p.trim()?`
`+y:" "}${p}`,B=Xs(),Y=qw(x,B),H="fake"+je.randomId(16);let Z=!1;const W=n.plugins.getPlugin("templater-obsidian");let $;if(Y?$=Y:(W?.templater&&W?.settings.trigger_on_file_creation&&(le.setWaitingForTemplater({origin:e.content,date:x,isList:e.thinoType&&e.thinoType==="JOURNAL",id:H,type:"local"}),Z=!0),$=await je.createDailyNoteCheck(x)),!$){new A.Notice(I("Failed to create daily note, check if it exists.")),new A.Notice(I("Your content has been copied to clipboard, and inserted into the editor. Please try it again")),await navigator.clipboard.writeText(e.content);const ee=n.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,ee);return}if(Y||await Ze.fechLocalDailyNotes(),W&&W?.templater&&W?.settings.trigger_on_file_creation&&Z)return Ge.setChangedByMemos(!0),{id:H,content:e.content,deletedAt:e.deletedAt??"",createdAt:x.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:$.path,hasId:"",linkId:[],pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.webId||e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:e?.fileInfo||{tags:[],frontmatter:{}}};const V=n.metadataCache.getFileCache($),ne={tags:V?.frontmatter?.tags||[],frontmatter:V?.frontmatter||{}};let Q="";try{Q=await t.read($)||await t.cachedRead($)}catch(ee){console.error(ee),new A.Notice(I("Failed to read current daily note, check if it exists."))}const te=l==="end"?"":e.thinoType&&i&&s||o,G=await iF(te,R,Q);await t.modify($,G.content);const X=G.posNum===-1?sF(G.content).length-1:G.posNum+1;return Ge.setChangedByMemos(!0),{id:x.format("YYYYMMDDHHmm")+"00"+X,content:e.content,deletedAt:e.deletedAt??"",createdAt:x.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:$.path,hasId:"",linkId:[],pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:ne}}async function iF(e,t,n){const r=new RegExp(`(s*?)${await bZ(e)}(s*?)`),o=wZ(n),a=o.findIndex(u=>r.test(u)),i=e?.trim()===""?!0:a===-1,s=o.slice(a+1).findIndex(u=>/(^#+ |---|^\^[a-zA-Z0-9-]{2,}$)/.test(u)),l=s!==-1;if(l){let u;for(let f=s+a;f>a;f--)if(!/^[\s\n ]*$/.test(o[f])){u=f;break}return u||(u=a),await LN(t,n,i?-1:u,l)}else return await LN(t,n,o.length-1,l)}async function LN(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t}
${e}`,posNum:-1};const o=t.split(`
`),a=o.slice(0,n+1).join(`
`),i=o.slice(n+1).join(`
`),s=i.trim().length>0;return{content:`${a}${!s&&!r||!a.endsWith(`
`)?`
`:""}${e}${(s||r?`
`:"")+i}`,posNum:n}}const sF=e=>e.split(/\r?\n/);async function IZ(e){const t=Se.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof A.TFile)){new A.Notice(I("File not found for the given thino path"));return}await t.vault.delete(n)}async function kZ(e){const t=Se.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof A.TFile)){new A.Notice(I("File not found for the given thino path"));return}const o=(await t.vault.read(n)).split(`
`),a=o.findIndex(l=>l.includes(e.id));if(a===-1){new A.Notice(I("Thino not found"));return}const i=o.findIndex((l,u)=>u>a&&l.trim()==="");i===-1?o.splice(a,o.length-a):o.splice(a,i-a);const s=o.join(`
`);if(!s){new A.Notice(I("Thino not found"));return}Ge.setChangedByMemos(!0),await t.vault.modify(n,s)}async function EZ(e){const t=Se.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new A.Notice(I("File not found for the given thino path"));return}const r=await t.vault.read(n),o=JSON.parse(r),a=o.nodes,i=a.findIndex(f=>f.id===e.id);if(i===-1){new A.Notice(I("Thino not found"));return}a.splice(i,1);const s=o.edges;s.filter(f=>f.fromNode===e.id||f.toNode===e.id).forEach(f=>{const h=s.findIndex(p=>p.id===f.id);h!==-1&&s.splice(h,1)}),Ge.setChangedByMemos(!0);const u=JSON.stringify(o,null,2);await t.vault.modify(n,u)}async function CZ(e){tF()||new A.Notice(I("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."),5e3);const{vault:t,metadataCache:n}=Se.getState().dailyNotesState.app,r=e.path,o=t.getAbstractFileByPath(r);if(!o){new A.Notice(I("Please check your daily note plugin OR periodic notes plugin settings"));return}const a=await t.read(o),i=a.split(`
`),l=n.getFileCache(o)?.listItems||[],u=parseInt(e.id.slice(14));let f=u;function h(b,y){const S=[];for(const x in y)y[x]===b&&S.push(parseInt(x),...h(parseInt(x),y));return S}const p=oC(l),m=l.find(b=>b.position.start.line===u),w=h(u,p);if(w.length>0){const b=w.map(y=>{const S=l.find(x=>x.position.start.line===y);return S?S.position.end.line:-1});f=Math.max(...b,m.position.end.line)}else f=m.position.end.line;if(!a){new A.Notice(I("Thino not found"));return}Ge.setChangedByMemos(!0),i.splice(u,f-u+1),await t.modify(o,i.join(`
`))}async function MZ(){const{vault:e,metadataCache:t}=Se.getState().dailyNotesState.app,n=Se.getState().dailyNotesState.settings,o=Jw()+"/"+n.DeleteFileName+".md",a=[],i=t.getFirstLinkpathDest("",o);if(i instanceof A.TFile){let s=await e.read(i),l=DZ(s);if(l.length===0)return a;for(let u=0;u<l.length;u++){const f=l[u];if(/- /.test(f)){const p=AZ(f).slice(0,13),m=A.moment(p,"YYYYMMDDHHmmss"),w=OZ(l[u]),b=A.moment(w.slice(0,13),"YYYYMMDDHHmmss"),y=NZ(l[u]);a.push({id:w,content:y,user_id:1,createdAt:m.format("YYYY/MM/DD HH:mm:SS"),updatedAt:m.format("YYYY/MM/DD HH:mm:SS"),deletedAt:b})}else continue}l=null,s=null}return a}const DZ=e=>e.split(/\r?\n/),AZ=e=>/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[1],NZ=e=>/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[2],OZ=e=>/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[4];async function PZ(e){const t=await Cf(Se.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await rg(Se.getState().dailyNotesState.app,t)}const jZ=async e=>{const{app:t}=Se.getState().dailyNotesState,n=await Cf(t)||[],r=n.find(o=>o.id===e);if(r){const o=A.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=o,await rg(t,n),o}else{new A.Notice(I("Query not found"));return}},LZ=async e=>{const{app:t}=Se.getState().dailyNotesState,n=await Cf(t)||[],r=n.find(o=>o.id===e);if(r){r.pinnedAt="",await rg(t,n);return}else{new A.Notice(I("Query not found"));return}};var xI;(e=>{async function t(b){return await ON(b)}e.getMyMemos=t;async function n(b){return await ON([b])}e.updateSpecificTypeMemo=n;function r(){return MZ()}e.getMyDeletedMemos=r;function o(b){const y=le.getMemoById(b);if(y)switch(y?.sourceType){case"DAILY":return Zo(y,{id:y.id,deleted:!1});case"CANVAS":return Li(y,{id:y.id,deleted:!1});case"MULTI":return Wa(y,{id:y.id,deleted:!1});case"FILE":return ji(y,{id:y.id,deleted:!1})}}e.restoreMemo=o;function a(b){return kZ(b)}e.deleteMemoInSingleFile=a;function i(b){return IZ(b)}e.deleteMemoInMultiFiles=i;function s(b){return CZ(b)}e.deleteMemoInDailyNote=s;function l(b){return EZ(b)}e.deleteMemoInCanvas=l;function u(){return AG()}e.getMyQueries=u;async function f(b,y){return await OG(b,y)}e.createQuery=f;function h(b,y,S){return cZ(b,y,S)}e.updateQuery=h;function p(b){return PZ(b)}e.deleteQueryById=p;function m(b){return jZ(b)}e.pinQuery=m;function w(b){return LZ(b)}e.unpinQuery=w})(xI||(xI={}));const xo=xI;async function RZ(e,t,n,r,o){const{vault:a,metadataCache:i}=Se.getState().dailyNotesState.app===void 0?app:Se.getState().dailyNotesState.app;Se.getState().dailyNotesState.settings;const s=e.replace(/\n/g,"<br>");if(n===void 0)return;const l=i.getFirstLinkpathDest("",n),u=A.moment(),f=u.format("YYYYMMDDHHmmss");r.slice(14);const h=" ",p=f+" "+s.trim(),m=h+"- "+f+" "+s.trim();if(l){const w=await a.read(l),b=0,y=await FZ(m,w,b);if(await a.modify(l,y.content),t)return{id:f+(b+1),content:p,deletedAt:"",createdAt:u.format("YYYY/MM/DD HH:mm:ss"),updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:l.path,hasId:"",linkId:[o]}}}async function FZ(e,t,n){const r=t.split(`
`),o=r.slice(0,n+1).join(`
`),a=r.slice(n+1).join(`
`);return/^\s*$/g.test(r[n+1])?{content:`${o}
${e}
${a}`,posNum:n}:{content:`${o}
${e}
${a}`,posNum:n}}function HZ(e,t,n){const r=t.workspace.getLeavesOfType("markdown");for(const o of r)if(o.view?.file?.path===e){t.workspace.revealLeaf(o);try{return o.view.setEphemeralState({line:n}),!0}catch(i){return console.error(i),!1}}return!1}const sC=async e=>{const t=Ze.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const a of n)if(a.view?.file?.path===e){t.workspace.revealLeaf(a);return}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new A.Notice(I("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},lC=async(e,t)=>{const{app:n}=Ze.getState(),r=parseInt(e.slice(14));if(HZ(t,n,r))return;const o=n.metadataCache.getFirstLinkpathDest("",t);if(!A.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(o,{eState:{line:r}});else{let a=n.workspace.activeLeaf;a===null&&(a=n.workspace.getLeaf(!0)),await a.openFile(o,{eState:{line:r}})}},cC=async(e,t)=>{const n=Ze.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new A.Notice(I("File not found for the given thino path"));return}let o="";try{o=await n.vault.read(r)}catch(u){console.error(u),o=await n.vault.cachedRead(r)}const i=o.split(/\r?\n/).findIndex(u=>u.contains(e)),s=n.workspace.getLeavesOfType("markdown");for(const u of s)if(u.view?.file?.path===r.path){n.workspace.revealLeaf(u);try{u.view.editor?.setCursor({line:i,ch:1});return}catch(h){console.error(h)}}const l=n.workspace.getLeaf(!0);await l.openFile(r,{eState:{line:i}});try{l.view.editor?.setCursor({line:i,ch:1})}catch(u){console.error(u)}},uC=async(e,t)=>{const n=Ze.getState().app,r=(s,l)=>{const u=Array.from(s.nodes.values())?.find(f=>f.id===l);return u?(s.selectOnly(u),s.zoomToSelection(),!0):!1},o=n.workspace.getLeavesOfType("canvas");for(const s of o){const l=s.view;if(l?.file?.path===t&&(n.workspace.revealLeaf(s),r(l.canvas,e)))return}const a=n.metadataCache.getFirstLinkpathDest("",t);if(!a){new A.Notice(I("File not found for the given thino path"));return}const i=n.workspace.getLeaf(!0);await i.openFile(a),setTimeout(()=>{r(i.view?.canvas,e)},10)};class BZ{initialized=!1;getState(){return Se.getState().memoState}async fetchAllMemos(){const t=Ze.getState().settings;je.checkDailyInMulti(t);const n=await xo.getMyMemos(t.EnabledLocationList.map(a=>a.value)),r=[...n.memos],o=[...n.commentMemos];return Se.dispatch({type:"SET_MEMOS",payload:{memos:r}}),Se.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:o}}),this.initialized||(this.initialized=!0,Ge.setLoaded(!0)),r}async updateTypeMemos(t){const n=await xo.updateSpecificTypeMemo(t),r=this.getState().memos.filter(o=>o.sourceType!==t);Se.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);Se.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await xo.getMyDeletedMemos();return t.sort((n,r)=>je.getTimeStampByDate(r.deletedAt)-je.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){Se.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){Se.dispatch({type:"INSERT_COMMENT_MEMO",payload:{memo:{...t}}})}getMemoById(t){for(const n of this.getState().memos)if(n.id===t)return n;return null}getCommentMemoById(t){for(const n of this.getState().commentMemos)if(n.id===t)return n;return null}getMemoByWebId(t){for(const n of this.getState().memos)if(n.webId===t||n.id===t)return n;return null}async finishWaitingForTemplaterThinos(){const t=this.getState().preparingUpdateMemo;if(t.length!==0)for(const n of t){const r=this.getMemoById(n.id),o=n.type==="local"?await s1(n.origin,n.isList,n.date,!0):await jN(r);await this.replaceOldThinoWithNewThino(n.id,o),Se.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:n.id}})}}async replaceOldThinoWithNewThino(t,n){this.getMemoById(t)&&Se.dispatch({type:"REPLACE_MEMO_BY_ID",payload:{id:t,memo:n}})}async updateMemoById(t,n,r){const o=this.getMemoByWebId(t);if(!o)return;let a=null;const i=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType||"JOURNAL"};if($9({...o,deleted:!!n.deletedAt},{...i,webId:n.id}))return o;switch(o.sourceType){case"DAILY":a=await Zo(o,{id:o.id,webId:n.id,...i});break;case"CANVAS":a=await Li(o,{id:o.id,webId:n.id,...i});break;case"MULTI":a=await Wa(o,{id:o.id,webId:n.id,...i});break;case"FILE":a=await ji(o,{id:o.id,webId:n.id,...i});break}if(!a)return o;Se.dispatch({type:"EDIT_MEMO",payload:a})}async archiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await Zo(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"CANVAS":o=await Li(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"MULTI":o=await Wa(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"FILE":o=await ji(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break}}return n.length>0?(Se.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async dealWithDailyThinoBulk(t,n,r){const o=await VG(t,n,r);return r==="deleteForever"?await this.deleteThinosWithIdBulk(o.map(a=>a.id)):this.editMemoBulk(o),o}async deleteThinosWithIdBulk(t){for(const n of t)Se.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:n}})}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Zo(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await Li(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await Wa(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await ji(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(Se.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){Se.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){Se.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:t}})}async removePrepareUpdateThino(){Se.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await Zo(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"CANVAS":o=await Li(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"MULTI":o=await Wa(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"FILE":o=await ji(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break}}return n.length>0?(Se.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Zo(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await Li(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await Wa(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await ji(t,{id:t.id,rowStatus:"NORMAL"});break}return Se.dispatch({type:"UNARCHIVE_MEMO_BY_ID",payload:n}),n}async hideMemoById(t){const n=this.getMemoById(t);if(!n)return n;let r=null;switch(n.sourceType){case"DAILY":r=await Zo(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await Li(n,{id:n.id,deleted:!0});break;case"MULTI":r=await Wa(n,{id:n.id,deleted:!0});break;case"FILE":r=await ji(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await xo.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await xo.deleteMemoInDailyNote(r);break;case"CANVAS":await xo.deleteMemoInCanvas(r);break;case"MULTI":await xo.deleteMemoInMultiFiles(r);break;case"FILE":await xo.deleteMemoInSingleFile(r);break}Se.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(s){console.error(s),new A.Notice(I("Failed to delete memo"))}if(n&&n==="local")return;const o=Ze.getState().settings;!Ze.getState().app?.loadLocalStorage("tokenForSync")||!o.startSync||r.webId&&await iC(r.webId)}async removeMemosInFile(t,n){const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const a=this.getState().memos.filter(i=>i.path.trim()===t.path.trim());r.push(...a)}else if(t.path.contains("thino.canvas")){const a=this.getState().memos.filter(i=>i.path.trim()===t.path.trim());r.push(...a)}else if(t?.parent?.path.contains(n)||!t?.parent&&!t?.parent?.path){const a=this.getState().memos.filter(i=>i.path.trim()===t.path.trim());a.length>0&&r.push(...a)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await TI(t,r);const o=r.map(a=>a.id);Se.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:o}})}catch(o){console.error(o)}}async removeThinosByPath(t){const r=this.getState().memos.filter(o=>o.path===t).map(o=>o.id);Se.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],o=async()=>{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await oF(t,r);return}else if(t.path.contains("thino.canvas")){await aF(t,r);return}else if(t?.parent?.path.contains(n)&&!t.path.endsWith(".thino.md")){await rF(t,r);return}else if(t.path.endsWith(".thino.md")){await TI(t,r);return}};try{await o(),Se.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}}),this.editMemoBulk(r)}catch(a){console.error(a)}}async updateMemoProperty(t){const n=je.randomId(16),r=await Wa(t,{id:n});Se.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t,n=!1){const r=t.webId;Se.dispatch({type:"EDIT_MEMO",payload:t});const o=Ze.getState().plugin;o&&!n&&o.thinoWorkerManager.memoUpdated(t.id);const a=Ze.getState().settings;if(!(!Ze.getState().app?.loadLocalStorage("tokenForSync")||!a.startSync))try{t&&r&&i1({id:r,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?A.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:t.thinoType==="JOURNAL"?"JOURNAL":t.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"})}catch(l){console.error(l)}}editMemoBulk(t){const n=Ze.getState().plugin;n&&n.thinoWorkerManager.memosUpdated(t.map(r=>r.id));for(const r of t)this.editMemo(r,!0);this.updateTagsState()}editCommentMemo(t){Se.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(o=>o.content.toLowerCase().includes(t?.toLowerCase()))}updateTagsStateThrottled=je.throttle(()=>{const{memos:t}=this.getState(),{plugin:n}=Ze.getState();!n||!t||t.length===0||n.thinoWorkerManager.buildTagTree(t).then(({tagsSet:r,counts:o})=>{Se.dispatch({type:"SET_TAGS",payload:{tags:Array.from(r),tagsNum:o}})})},300);async throttleUpdateTagsState(){this.updateTagsStateThrottled()}updateTagsState(){this.updateTagsStateThrottled()}clearMemos(){Se.dispatch({type:"SET_MEMOS",payload:{memos:[]}})}async getLinkedMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes(t))}async getLinkedMemoByBlockId(t,n){const{memos:r}=this.getState();return r.find(o=>o.hasId===t?n&&o.path?o.path.includes(n)||n.includes(o.path):!0:!1)}async getLinkedMemosByLinkId(t,n){const{memos:r}=this.getState(),o=`${n}#^${t}`;return r.filter(a=>a.linkId?a.linkId.some(i=>i===o||n&&i.endsWith(`#^${t}`)):!1)}async getCommentMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes("comment: "+t))}async createMemoMultiFile({content:t,isList:n,name:r}){return await SZ({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await TZ({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&n?.some(a=>a.id===t.localId))return await this.updateMemoById(t.localId,t,!0),null;if(n?.some(a=>a.id===t.id)||n?.some(a=>a.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const o=Ze.getState().settings;switch(o&&o?.saveThinoType&&(r=o.saveThinoType!=="FILE"?o.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await PN(t);case"DAILY":return await jN(t);default:return await PN(t)}}async initSync(){const n=this.getState().memos.filter(o=>!o.webId),r=await yZ(n);for(const o of r)await this.createOrPatchThinoFromWeb(o)}async createMemoCanvas({text:t,isList:n}){return await xZ({content:t,isList:n})}async createMemoDaily(t,n){return await s1(t,n)}setWaitingForTemplater({origin:t,date:n,isList:r,id:o,type:a}){Se.dispatch({type:"SET_WAITING_FOR_TEMPLATER",payload:{origin:t,date:n,isList:r,id:o,type:a}})}async pinMemoById(t){const n=this.getMemoById(t),r=await WG(n);Se.dispatch({type:"PIN_MEMO",payload:r});try{const o=Ze.getState().settings;if(Ze.getState().app?.loadLocalStorage("tokenForSync")&&o.startSync){const s=await i1({id:r.webId,pinned:!0});this.editMemo(s)}}catch(o){console.error(o)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await GG(n);Se.dispatch({type:"PIN_MEMO",payload:r});try{const o=Ze.getState().settings;if(Ze.getState().app?.loadLocalStorage("tokenForSync")&&o.startSync){const s=await i1({id:r.webId,pinned:!1});this.editMemo(s)}}catch(o){console.error(o)}}async createCommentMemo(t,n,r,o,a){return await RZ(t,n,r,o,a)}async importMemos(t,n,r){return await s1(t,n,r)}async createThino({content:t,isList:n,type:r,name:o}){let a=null;switch(r.toLowerCase()){case"canvas":a=await le.createMemoCanvas({text:t,isList:n});break;case"multi":a=await le.createMemoMultiFile({content:t,isList:n,name:o});break;case"daily":a=await le.createMemoDaily(t,n);break;case"file":a=await le.createMemoSingleFile({content:t,isList:n});break;default:a=await le.createMemoDaily(t,n);break}const i=Ze.getState().settings,s=Ze.getState().app,l=Ze.getState().plugin;l&&l.thinoWorkerManager.memoUpdated(a.id);const u=s?.loadLocalStorage("tokenForSync");return a&&u&&i.startSync&&r!=="DAILY"&&setTimeout(async()=>{try{const f=await aC({content:t,thinoType:"FILE",thinoStatus:n?"JOURNAL":"TASK-TODO"});await this.updateMemoById(a.id,f,!0)}catch(f){console.error(f)}},200),a}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await lC(n.id,n.path);break;case"CANVAS":await uC(n.id,n.path);break;case"MULTI":await sC(n.path);break;case"FILE":await cC(n.id,n.path);break}}async updateMemo(t,n,r){const o=this.getMemoById(t);if(!o)return console.warn(`Memo with ID ${t} not found for update`),null;if(o){let a=null;switch(o.sourceType){case"DAILY":a=await Zo(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"CANVAS":a=await Li(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"MULTI":a=await Wa(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"FILE":a=await ji(o,{id:o.id,content:n,thinoType:r||o.thinoType});break}if(a)return a}return console.warn(`Failed to update memo ${t}: no updated memo returned`),null}}const le=new BZ;class _Z{getState(){return Se.getState().queryState}async getMyAllQueries(){const t=Ye.getState().query.filter,n=this.getQueryById(t),r=await xo.getMyQueries();return Se.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){Se.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){Se.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await xo.deleteQueryById(t),Se.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await xo.createQuery(t,n)}createTempQuery(t,n){return NG(t,n)}async updateQuery(t,n,r){return await xo.updateQuery(t,n,r)}async pinQuery(t){await xo.pinQuery(t)}async unpinQuery(t){await xo.unpinQuery(t)}}const St=new _Z;class YZ{async upload(t){const{vault:n,fileManager:r}=Se.getState().dailyNotesState.app,o=await t.arrayBuffer(),a=zZ(t.type),i=Xs(),s=A.moment(),l=qw(s,i);let u;if(l)l instanceof A.TFile&&(u=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,a,l),o));else{const f=await Z9(s);u=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,a,f),o)}return r.generateMarkdownLink(u,u.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const o=Array.from(r.getElementsByClassName("memo"));for(const a of o){const i=a.getElementsByClassName("content")[0],s=A.htmlToMarkdown(i.innerHTML),l=await le.importMemos(s,!0,A.moment(a.getElementsByClassName("time")[0].innerHTML));le.pushMemo(l)}}}const zZ=e=>/^image\/(.+)$/.exec(e)?.[1],dC=new YZ;var Sa={},lF={exports:{}},To={},l1={exports:{}},c1={},RN;function UZ(){return RN||(RN=1,function(e){function t(Q,te){var G=Q.length;Q.push(te);e:for(;0<G;){var X=G-1>>>1,ee=Q[X];if(0<o(ee,te))Q[X]=te,Q[G]=ee,G=X;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var te=Q[0],G=Q.pop();if(G!==te){Q[0]=G;e:for(var X=0,ee=Q.length,ie=ee>>>1;X<ie;){var fe=2*(X+1)-1,he=Q[fe],we=fe+1,Ne=Q[we];if(0>o(he,G))we<ee&&0>o(Ne,he)?(Q[X]=Ne,Q[we]=G,X=we):(Q[X]=he,Q[fe]=G,X=fe);else if(we<ee&&0>o(Ne,G))Q[X]=Ne,Q[we]=G,X=we;else break e}}return te}function o(Q,te){var G=Q.sortIndex-te.sortIndex;return G!==0?G:Q.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],u=[],f=1,h=null,p=3,m=!1,w=!1,b=!1,y=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(Q){for(var te=n(u);te!==null;){if(te.callback===null)r(u);else if(te.startTime<=Q)r(u),te.sortIndex=te.expirationTime,t(l,te);else break;te=n(u)}}function C(Q){if(b=!1,E(Q),!w)if(n(l)!==null)w=!0,V(M);else{var te=n(u);te!==null&&ne(C,te.startTime-Q)}}function M(Q,te){w=!1,b&&(b=!1,S(F),F=-1),m=!0;var G=p;try{for(E(te),h=n(l);h!==null&&(!(h.expirationTime>te)||Q&&!Y());){var X=h.callback;if(typeof X=="function"){h.callback=null,p=h.priorityLevel;var ee=X(h.expirationTime<=te);te=e.unstable_now(),typeof ee=="function"?h.callback=ee:h===n(l)&&r(l),E(te)}else r(l);h=n(l)}if(h!==null)var ie=!0;else{var fe=n(u);fe!==null&&ne(C,fe.startTime-te),ie=!1}return ie}finally{h=null,p=G,m=!1}}var k=!1,O=null,F=-1,R=5,B=-1;function Y(){return!(e.unstable_now()-B<R)}function H(){if(O!==null){var Q=e.unstable_now();B=Q;var te=!0;try{te=O(!0,Q)}finally{te?Z():(k=!1,O=null)}}else k=!1}var Z;if(typeof x=="function")Z=function(){x(H)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,$=W.port2;W.port1.onmessage=H,Z=function(){$.postMessage(null)}}else Z=function(){y(H,0)};function V(Q){O=Q,k||(k=!0,Z())}function ne(Q,te){F=y(function(){Q(e.unstable_now())},te)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){w||m||(w=!0,V(M))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(Q){switch(p){case 1:case 2:case 3:var te=3;break;default:te=p}var G=p;p=te;try{return Q()}finally{p=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,te){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var G=p;p=Q;try{return te()}finally{p=G}},e.unstable_scheduleCallback=function(Q,te,G){var X=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?X+G:X):G=X,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=G+ee,Q={id:f++,callback:te,priorityLevel:Q,startTime:G,expirationTime:ee,sortIndex:-1},G>X?(Q.sortIndex=G,t(u,Q),n(l)===null&&Q===n(u)&&(b?(S(F),F=-1):b=!0,ne(C,G-X))):(Q.sortIndex=ee,t(l,Q),w||m||(w=!0,V(M))),Q},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(Q){var te=p;return function(){var G=p;p=te;try{return Q.apply(this,arguments)}finally{p=G}}}}(c1)),c1}var FN;function VZ(){return FN||(FN=1,l1.exports=UZ()),l1.exports}var HN;function WZ(){if(HN)return To;HN=1;var e=D,t=VZ();function n(c){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;v<arguments.length;v++)d+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(c,d){i(c,d),i(c+"Capture",d)}function i(c,d){for(o[c]=d,c=0;c<d.length;c++)r.add(d[c])}var s=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},h={};function p(c){return l.call(h,c)?!0:l.call(f,c)?!1:u.test(c)?h[c]=!0:(f[c]=!0,!1)}function m(c,d,v,T){if(v!==null&&v.type===0)return!1;switch(typeof d){case"function":case"symbol":return!0;case"boolean":return T?!1:v!==null?!v.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function w(c,d,v,T){if(d===null||typeof d>"u"||m(c,d,v,T))return!0;if(T)return!1;if(v!==null)switch(v.type){case 3:return!d;case 4:return d===!1;case 5:return isNaN(d);case 6:return isNaN(d)||1>d}return!1}function b(c,d,v,T,N,L,q){this.acceptsBooleans=d===2||d===3||d===4,this.attributeName=T,this.attributeNamespace=N,this.mustUseProperty=v,this.propertyName=c,this.type=d,this.sanitizeURL=L,this.removeEmptyString=q}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){y[c]=new b(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var d=c[0];y[d]=new b(d,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){y[c]=new b(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){y[c]=new b(c,2,!1,c,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){y[c]=new b(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){y[c]=new b(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){y[c]=new b(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){y[c]=new b(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){y[c]=new b(c,5,!1,c.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function x(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var d=c.replace(S,x);y[d]=new b(d,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var d=c.replace(S,x);y[d]=new b(d,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var d=c.replace(S,x);y[d]=new b(d,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){y[c]=new b(c,1,!1,c.toLowerCase(),null,!1,!1)}),y.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){y[c]=new b(c,1,!1,c.toLowerCase(),null,!0,!0)});function E(c,d,v,T){var N=y.hasOwnProperty(d)?y[d]:null;(N!==null?N.type!==0:T||!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(w(d,v,N,T)&&(v=null),T||N===null?p(d)&&(v===null?c.removeAttribute(d):c.setAttribute(d,""+v)):N.mustUseProperty?c[N.propertyName]=v===null?N.type===3?!1:"":v:(d=N.attributeName,T=N.attributeNamespace,v===null?c.removeAttribute(d):(N=N.type,v=N===3||N===4&&v===!0?"":""+v,T?c.setAttributeNS(T,d,v):c.setAttribute(d,v))))}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,M=Symbol.for("react.element"),k=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),Y=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),Q=Symbol.iterator;function te(c){return c===null||typeof c!="object"?null:(c=Q&&c[Q]||c["@@iterator"],typeof c=="function"?c:null)}var G=Object.assign,X;function ee(c){if(X===void 0)try{throw Error()}catch(v){var d=v.stack.trim().match(/\n( *(at )?)/);X=d&&d[1]||""}return`
`+X+c}var ie=!1;function fe(c,d){if(!c||ie)return"";ie=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(xe){var T=xe}Reflect.construct(c,[],d)}else{try{d.call()}catch(xe){T=xe}c.call(d.prototype)}else{try{throw Error()}catch(xe){T=xe}c()}}catch(xe){if(xe&&T&&typeof xe.stack=="string"){for(var N=xe.stack.split(`
`),L=T.stack.split(`
`),q=N.length-1,ae=L.length-1;1<=q&&0<=ae&&N[q]!==L[ae];)ae--;for(;1<=q&&0<=ae;q--,ae--)if(N[q]!==L[ae]){if(q!==1||ae!==1)do if(q--,ae--,0>ae||N[q]!==L[ae]){var se=`
`+N[q].replace(" at new "," at ");return c.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",c.displayName)),se}while(1<=q&&0<=ae);break}}}finally{ie=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?ee(c):""}function he(c){switch(c.tag){case 5:return ee(c.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return c=fe(c.type,!1),c;case 11:return c=fe(c.type.render,!1),c;case 1:return c=fe(c.type,!0),c;default:return""}}function we(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case O:return"Fragment";case k:return"Portal";case R:return"Profiler";case F:return"StrictMode";case Z:return"Suspense";case W:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case Y:return(c.displayName||"Context")+".Consumer";case B:return(c._context.displayName||"Context")+".Provider";case H:var d=c.render;return c=c.displayName,c||(c=d.displayName||d.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case $:return d=c.displayName||null,d!==null?d:we(c.type)||"Memo";case V:d=c._payload,c=c._init;try{return we(c(d))}catch{}}return null}function Ne(c){var d=c.type;switch(c.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=d.render,c=c.displayName||c.name||"",d.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(d);case 8:return d===F?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function Ae(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function Te(c){var d=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function Fe(c){var d=Te(c)?"checked":"value",v=Object.getOwnPropertyDescriptor(c.constructor.prototype,d),T=""+c[d];if(!c.hasOwnProperty(d)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var N=v.get,L=v.set;return Object.defineProperty(c,d,{configurable:!0,get:function(){return N.call(this)},set:function(q){T=""+q,L.call(this,q)}}),Object.defineProperty(c,d,{enumerable:v.enumerable}),{getValue:function(){return T},setValue:function(q){T=""+q},stopTracking:function(){c._valueTracker=null,delete c[d]}}}}function We(c){c._valueTracker||(c._valueTracker=Fe(c))}function ke(c){if(!c)return!1;var d=c._valueTracker;if(!d)return!0;var v=d.getValue(),T="";return c&&(T=Te(c)?c.checked?"true":"false":c.value),c=T,c!==v?(d.setValue(c),!0):!1}function Ie(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function ce(c,d){var v=d.checked;return G({},d,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??c._wrapperState.initialChecked})}function Pe(c,d){var v=d.defaultValue==null?"":d.defaultValue,T=d.checked!=null?d.checked:d.defaultChecked;v=Ae(d.value!=null?d.value:v),c._wrapperState={initialChecked:T,initialValue:v,controlled:d.type==="checkbox"||d.type==="radio"?d.checked!=null:d.value!=null}}function Oe(c,d){d=d.checked,d!=null&&E(c,"checked",d,!1)}function Ve(c,d){Oe(c,d);var v=Ae(d.value),T=d.type;if(v!=null)T==="number"?(v===0&&c.value===""||c.value!=v)&&(c.value=""+v):c.value!==""+v&&(c.value=""+v);else if(T==="submit"||T==="reset"){c.removeAttribute("value");return}d.hasOwnProperty("value")?ot(c,d.type,v):d.hasOwnProperty("defaultValue")&&ot(c,d.type,Ae(d.defaultValue)),d.checked==null&&d.defaultChecked!=null&&(c.defaultChecked=!!d.defaultChecked)}function tt(c,d,v){if(d.hasOwnProperty("value")||d.hasOwnProperty("defaultValue")){var T=d.type;if(!(T!=="submit"&&T!=="reset"||d.value!==void 0&&d.value!==null))return;d=""+c._wrapperState.initialValue,v||d===c.value||(c.value=d),c.defaultValue=d}v=c.name,v!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,v!==""&&(c.name=v)}function ot(c,d,v){(d!=="number"||Ie(c.ownerDocument)!==c)&&(v==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+v&&(c.defaultValue=""+v))}var st=Array.isArray;function wt(c,d,v,T){if(c=c.options,d){d={};for(var N=0;N<v.length;N++)d["$"+v[N]]=!0;for(v=0;v<c.length;v++)N=d.hasOwnProperty("$"+c[v].value),c[v].selected!==N&&(c[v].selected=N),N&&T&&(c[v].defaultSelected=!0)}else{for(v=""+Ae(v),d=null,N=0;N<c.length;N++){if(c[N].value===v){c[N].selected=!0,T&&(c[N].defaultSelected=!0);return}d!==null||c[N].disabled||(d=c[N])}d!==null&&(d.selected=!0)}}function Ot(c,d){if(d.dangerouslySetInnerHTML!=null)throw Error(n(91));return G({},d,{value:void 0,defaultValue:void 0,children:""+c._wrapperState.initialValue})}function Wt(c,d){var v=d.value;if(v==null){if(v=d.children,d=d.defaultValue,v!=null){if(d!=null)throw Error(n(92));if(st(v)){if(1<v.length)throw Error(n(93));v=v[0]}d=v}d==null&&(d=""),v=d}c._wrapperState={initialValue:Ae(v)}}function an(c,d){var v=Ae(d.value),T=Ae(d.defaultValue);v!=null&&(v=""+v,v!==c.value&&(c.value=v),d.defaultValue==null&&c.defaultValue!==v&&(c.defaultValue=v)),T!=null&&(c.defaultValue=""+T)}function mn(c){var d=c.textContent;d===c._wrapperState.initialValue&&d!==""&&d!==null&&(c.value=d)}function Fn(c){switch(c){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function qe(c,d){return c==null||c==="http://www.w3.org/1999/xhtml"?Fn(d):c==="http://www.w3.org/2000/svg"&&d==="foreignObject"?"http://www.w3.org/1999/xhtml":c}var mt,Tt=function(c){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(d,v,T,N){MSApp.execUnsafeLocalFunction(function(){return c(d,v,T,N)})}:c}(function(c,d){if(c.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in c)c.innerHTML=d;else{for(mt=mt||document.createElement("div"),mt.innerHTML="<svg>"+d.valueOf().toString()+"</svg>",d=mt.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;d.firstChild;)c.appendChild(d.firstChild)}});function Et(c,d){if(d){var v=c.firstChild;if(v&&v===c.lastChild&&v.nodeType===3){v.nodeValue=d;return}}c.textContent=d}var Lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mr=["Webkit","ms","Moz","O"];Object.keys(Lt).forEach(function(c){mr.forEach(function(d){d=d+c.charAt(0).toUpperCase()+c.substring(1),Lt[d]=Lt[c]})});function gr(c,d,v){return d==null||typeof d=="boolean"||d===""?"":v||typeof d!="number"||d===0||Lt.hasOwnProperty(c)&&Lt[c]?(""+d).trim():d+"px"}function Aa(c,d){c=c.style;for(var v in d)if(d.hasOwnProperty(v)){var T=v.indexOf("--")===0,N=gr(v,d[v],T);v==="float"&&(v="cssFloat"),T?c.setProperty(v,N):c[v]=N}}var ao=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Zn(c,d){if(d){if(ao[c]&&(d.children!=null||d.dangerouslySetInnerHTML!=null))throw Error(n(137,c));if(d.dangerouslySetInnerHTML!=null){if(d.children!=null)throw Error(n(60));if(typeof d.dangerouslySetInnerHTML!="object"||!("__html"in d.dangerouslySetInnerHTML))throw Error(n(61))}if(d.style!=null&&typeof d.style!="object")throw Error(n(62))}}function qr(c,d){if(c.indexOf("-")===-1)return typeof d.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var io=null;function En(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var na=null,Dr=null,Ct=null;function so(c){if(c=kh(c)){if(typeof na!="function")throw Error(n(280));var d=c.stateNode;d&&(d=cv(d),na(c.stateNode,c.type,d))}}function lo(c){Dr?Ct?Ct.push(c):Ct=[c]:Dr=c}function ra(){if(Dr){var c=Dr,d=Ct;if(Ct=Dr=null,so(c),d)for(c=0;c<d.length;c++)so(d[c])}}function Hn(c,d){return c(d)}function oa(){}var Ar=!1;function di(c,d,v){if(Ar)return c(d,v);Ar=!0;try{return Hn(c,d,v)}finally{Ar=!1,(Dr!==null||Ct!==null)&&(oa(),ra())}}function Na(c,d){var v=c.stateNode;if(v===null)return null;var T=cv(v);if(T===null)return null;v=T[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(c=c.type,T=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!T;break e;default:c=!1}if(c)return null;if(v&&typeof v!="function")throw Error(n(231,d,typeof v));return v}var os=!1;if(s)try{var fi={};Object.defineProperty(fi,"passive",{get:function(){os=!0}}),window.addEventListener("test",fi,fi),window.removeEventListener("test",fi,fi)}catch{os=!1}function Du(c,d,v,T,N,L,q,ae,se){var xe=Array.prototype.slice.call(arguments,3);try{d.apply(v,xe)}catch(Re){this.onError(Re)}}var hi=!1,al=null,il=!1,pi=null,Au={onError:function(c){hi=!0,al=c}};function sl(c,d,v,T,N,L,q,ae,se){hi=!1,al=null,Du.apply(Au,arguments)}function ac(c,d,v,T,N,L,q,ae,se){if(sl.apply(this,arguments),hi){if(hi){var xe=al;hi=!1,al=null}else throw Error(n(198));il||(il=!0,pi=xe)}}function Oa(c){var d=c,v=c;if(c.alternate)for(;d.return;)d=d.return;else{c=d;do d=c,d.flags&4098&&(v=d.return),c=d.return;while(c)}return d.tag===3?v:null}function mi(c){if(c.tag===13){var d=c.memoizedState;if(d===null&&(c=c.alternate,c!==null&&(d=c.memoizedState)),d!==null)return d.dehydrated}return null}function Nu(c){if(Oa(c)!==c)throw Error(n(188))}function ic(c){var d=c.alternate;if(!d){if(d=Oa(c),d===null)throw Error(n(188));return d!==c?null:c}for(var v=c,T=d;;){var N=v.return;if(N===null)break;var L=N.alternate;if(L===null){if(T=N.return,T!==null){v=T;continue}break}if(N.child===L.child){for(L=N.child;L;){if(L===v)return Nu(N),c;if(L===T)return Nu(N),d;L=L.sibling}throw Error(n(188))}if(v.return!==T.return)v=N,T=L;else{for(var q=!1,ae=N.child;ae;){if(ae===v){q=!0,v=N,T=L;break}if(ae===T){q=!0,T=N,v=L;break}ae=ae.sibling}if(!q){for(ae=L.child;ae;){if(ae===v){q=!0,v=L,T=N;break}if(ae===T){q=!0,T=L,v=N;break}ae=ae.sibling}if(!q)throw Error(n(189))}}if(v.alternate!==T)throw Error(n(190))}if(v.tag!==3)throw Error(n(188));return v.stateNode.current===v?c:d}function as(c){return c=ic(c),c!==null?gi(c):null}function gi(c){if(c.tag===5||c.tag===6)return c;for(c=c.child;c!==null;){var d=gi(c);if(d!==null)return d;c=c.sibling}return null}var is=t.unstable_scheduleCallback,sc=t.unstable_cancelCallback,Ou=t.unstable_shouldYield,Pu=t.unstable_requestPaint,sn=t.unstable_now,vr=t.unstable_getCurrentPriorityLevel,ll=t.unstable_ImmediatePriority,cl=t.unstable_UserBlockingPriority,vi=t.unstable_NormalPriority,ju=t.unstable_LowPriority,Pa=t.unstable_IdlePriority,Lo=null,$r=null;function ss(c){if($r&&typeof $r.onCommitFiberRoot=="function")try{$r.onCommitFiberRoot(Lo,c,void 0,(c.current.flags&128)===128)}catch{}}var qn=Math.clz32?Math.clz32:uc,lc=Math.log,cc=Math.LN2;function uc(c){return c>>>=0,c===0?32:31-(lc(c)/cc|0)|0}var ja=64,ls=4194304;function yi(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function bi(c,d){var v=c.pendingLanes;if(v===0)return 0;var T=0,N=c.suspendedLanes,L=c.pingedLanes,q=v&268435455;if(q!==0){var ae=q&~N;ae!==0?T=yi(ae):(L&=q,L!==0&&(T=yi(L)))}else q=v&~N,q!==0?T=yi(q):L!==0&&(T=yi(L));if(T===0)return 0;if(d!==0&&d!==T&&!(d&N)&&(N=T&-T,L=d&-d,N>=L||N===16&&(L&4194240)!==0))return d;if(T&4&&(T|=v&16),d=c.entangledLanes,d!==0)for(c=c.entanglements,d&=T;0<d;)v=31-qn(d),N=1<<v,T|=c[v],d&=~N;return T}function P(c,d){switch(c){case 1:case 2:case 4:return d+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U(c,d){for(var v=c.suspendedLanes,T=c.pingedLanes,N=c.expirationTimes,L=c.pendingLanes;0<L;){var q=31-qn(L),ae=1<<q,se=N[q];se===-1?(!(ae&v)||ae&T)&&(N[q]=P(ae,d)):se<=d&&(c.expiredLanes|=ae),L&=~ae}}function J(c){return c=c.pendingLanes&-1073741825,c!==0?c:c&1073741824?1073741824:0}function oe(){var c=ja;return ja<<=1,!(ja&4194240)&&(ja=64),c}function ve(c){for(var d=[],v=0;31>v;v++)d.push(c);return d}function pe(c,d,v){c.pendingLanes|=d,d!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,d=31-qn(d),c[d]=v}function Ce(c,d){var v=c.pendingLanes&~d;c.pendingLanes=d,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=d,c.mutableReadLanes&=d,c.entangledLanes&=d,d=c.entanglements;var T=c.eventTimes;for(c=c.expirationTimes;0<v;){var N=31-qn(v),L=1<<N;d[N]=0,T[N]=-1,c[N]=-1,v&=~L}}function Ue(c,d){var v=c.entangledLanes|=d;for(c=c.entanglements;v;){var T=31-qn(v),N=1<<T;N&d|c[T]&d&&(c[T]|=d),v&=~N}}var $e=0;function ht(c){return c&=-c,1<c?4<c?c&268435455?16:536870912:4:1}var bt,tn,co,uo,Nr,La=!1,fo=[],ho=null,Or=null,Ro=null,po=new Map,wi=new Map,Si=[],FS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qg(c,d){switch(c){case"focusin":case"focusout":ho=null;break;case"dragenter":case"dragleave":Or=null;break;case"mouseover":case"mouseout":Ro=null;break;case"pointerover":case"pointerout":po.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(d.pointerId)}}function dc(c,d,v,T,N,L){return c===null||c.nativeEvent!==L?(c={blockedOn:d,domEventName:v,eventSystemFlags:T,nativeEvent:L,targetContainers:[N]},d!==null&&(d=kh(d),d!==null&&tn(d)),c):(c.eventSystemFlags|=T,d=c.targetContainers,N!==null&&d.indexOf(N)===-1&&d.push(N),c)}function HS(c,d,v,T,N){switch(d){case"focusin":return ho=dc(ho,c,d,v,T,N),!0;case"dragenter":return Or=dc(Or,c,d,v,T,N),!0;case"mouseover":return Ro=dc(Ro,c,d,v,T,N),!0;case"pointerover":var L=N.pointerId;return po.set(L,dc(po.get(L)||null,c,d,v,T,N)),!0;case"gotpointercapture":return L=N.pointerId,wi.set(L,dc(wi.get(L)||null,c,d,v,T,N)),!0}return!1}function aa(c){var d=bc(c.target);if(d!==null){var v=Oa(d);if(v!==null){if(d=v.tag,d===13){if(d=mi(v),d!==null){c.blockedOn=d,Nr(c.priority,function(){co(v)});return}}else if(d===3&&v.stateNode.current.memoizedState.isDehydrated){c.blockedOn=v.tag===3?v.stateNode.containerInfo:null;return}}}c.blockedOn=null}function ul(c){if(c.blockedOn!==null)return!1;for(var d=c.targetContainers;0<d.length;){var v=hc(c.domEventName,c.eventSystemFlags,d[0],c.nativeEvent);if(v===null){v=c.nativeEvent;var T=new v.constructor(v.type,v);io=T,v.target.dispatchEvent(T),io=null}else return d=kh(v),d!==null&&tn(d),c.blockedOn=v,!1;d.shift()}return!0}function fc(c,d,v){ul(c)&&v.delete(d)}function nn(){La=!1,ho!==null&&ul(ho)&&(ho=null),Or!==null&&ul(Or)&&(Or=null),Ro!==null&&ul(Ro)&&(Ro=null),po.forEach(fc),wi.forEach(fc)}function Ra(c,d){c.blockedOn===d&&(c.blockedOn=null,La||(La=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nn)))}function Ti(c){function d(N){return Ra(N,c)}if(0<fo.length){Ra(fo[0],c);for(var v=1;v<fo.length;v++){var T=fo[v];T.blockedOn===c&&(T.blockedOn=null)}}for(ho!==null&&Ra(ho,c),Or!==null&&Ra(Or,c),Ro!==null&&Ra(Ro,c),po.forEach(d),wi.forEach(d),v=0;v<Si.length;v++)T=Si[v],T.blockedOn===c&&(T.blockedOn=null);for(;0<Si.length&&(v=Si[0],v.blockedOn===null);)aa(v),v.blockedOn===null&&Si.shift()}var ia=C.ReactCurrentBatchConfig,Fo=!0;function Lu(c,d,v,T){var N=$e,L=ia.transition;ia.transition=null;try{$e=1,Ru(c,d,v,T)}finally{$e=N,ia.transition=L}}function cs(c,d,v,T){var N=$e,L=ia.transition;ia.transition=null;try{$e=4,Ru(c,d,v,T)}finally{$e=N,ia.transition=L}}function Ru(c,d,v,T){if(Fo){var N=hc(c,d,v,T);if(N===null)$S(c,d,T,dl,v),qg(c,T);else if(HS(N,c,d,v,T))T.stopPropagation();else if(qg(c,T),d&4&&-1<FS.indexOf(c)){for(;N!==null;){var L=kh(N);if(L!==null&&bt(L),L=hc(c,d,v,T),L===null&&$S(c,d,T,dl,v),L===N)break;N=L}N!==null&&T.stopPropagation()}else $S(c,d,T,null,v)}}var dl=null;function hc(c,d,v,T){if(dl=null,c=En(T),c=bc(c),c!==null)if(d=Oa(c),d===null)c=null;else if(v=d.tag,v===13){if(c=mi(d),c!==null)return c;c=null}else if(v===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;c=null}else d!==c&&(c=null);return dl=c,null}function ch(c){switch(c){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vr()){case ll:return 1;case cl:return 4;case vi:case ju:return 16;case Pa:return 536870912;default:return 16}default:return 16}}var Fa=null,Fu=null,Hu=null;function $g(){if(Hu)return Hu;var c,d=Fu,v=d.length,T,N="value"in Fa?Fa.value:Fa.textContent,L=N.length;for(c=0;c<v&&d[c]===N[c];c++);var q=v-c;for(T=1;T<=q&&d[v-T]===N[L-T];T++);return Hu=N.slice(c,1<T?1-T:void 0)}function us(c){var d=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&d===13&&(c=13)):c=d,c===10&&(c=13),32<=c||c===13?c:0}function pc(){return!0}function mc(){return!1}function yr(c){function d(v,T,N,L,q){this._reactName=v,this._targetInst=N,this.type=T,this.nativeEvent=L,this.target=q,this.currentTarget=null;for(var ae in c)c.hasOwnProperty(ae)&&(v=c[ae],this[ae]=v?v(L):L[ae]);return this.isDefaultPrevented=(L.defaultPrevented!=null?L.defaultPrevented:L.returnValue===!1)?pc:mc,this.isPropagationStopped=mc,this}return G(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var v=this.nativeEvent;v&&(v.preventDefault?v.preventDefault():typeof v.returnValue!="unknown"&&(v.returnValue=!1),this.isDefaultPrevented=pc)},stopPropagation:function(){var v=this.nativeEvent;v&&(v.stopPropagation?v.stopPropagation():typeof v.cancelBubble!="unknown"&&(v.cancelBubble=!0),this.isPropagationStopped=pc)},persist:function(){},isPersistent:pc}),d}var fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ds=yr(fl),gc=G({},fl,{view:0,detail:0}),uh=yr(gc),hl,fs,xi,vc=G({},gc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uu,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==xi&&(xi&&c.type==="mousemove"?(hl=c.screenX-xi.screenX,fs=c.screenY-xi.screenY):fs=hl=0,xi=c),hl)},movementY:function(c){return"movementY"in c?c.movementY:fs}}),dh=yr(vc),Kg=G({},vc,{dataTransfer:0}),fh=yr(Kg),Kr=G({},gc,{relatedTarget:0}),Bu=yr(Kr),hh=G({},fl,{animationName:0,elapsedTime:0,pseudoElement:0}),BS=yr(hh),Jg=G({},fl,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),_u=yr(Jg),Xg=G({},fl,{data:0}),ph=yr(Xg),Yu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zu={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ev(c){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(c):(c=Qg[c])?!!d[c]:!1}function Uu(){return ev}var mh=G({},gc,{key:function(c){if(c.key){var d=Yu[c.key]||c.key;if(d!=="Unidentified")return d}return c.type==="keypress"?(c=us(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?zu[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uu,charCode:function(c){return c.type==="keypress"?us(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?us(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),tv=yr(mh),j=G({},vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),z=yr(j),K=G({},gc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uu}),re=yr(K),be=G({},fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ge=yr(be),Me=G({},vc,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),_e=yr(Me),ft=[9,13,27,32],xt=s&&"CompositionEvent"in window,vt=null;s&&"documentMode"in document&&(vt=document.documentMode);var ln=s&&"TextEvent"in window&&!vt,Pr=s&&(!xt||vt&&8<vt&&11>=vt),mo=" ",go=!1;function yc(c,d){switch(c){case"keyup":return ft.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gh(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Ii=!1;function $U(c,d){switch(c){case"compositionend":return gh(d);case"keypress":return d.which!==32?null:(go=!0,mo);case"textInput":return c=d.data,c===mo&&go?null:c;default:return null}}function KU(c,d){if(Ii)return c==="compositionend"||!xt&&yc(c,d)?(c=$g(),Hu=Fu=Fa=null,Ii=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return Pr&&d.locale!=="ko"?null:d.data;default:return null}}var JU={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function TA(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d==="input"?!!JU[c.type]:d==="textarea"}function xA(c,d,v,T){lo(T),d=iv(d,"onChange"),0<d.length&&(v=new ds("onChange","change",null,v,T),c.push({event:v,listeners:d}))}var vh=null,yh=null;function XU(c){YA(c,0)}function nv(c){var d=qu(c);if(ke(d))return c}function QU(c,d){if(c==="change")return d}var IA=!1;if(s){var _S;if(s){var YS="oninput"in document;if(!YS){var kA=document.createElement("div");kA.setAttribute("oninput","return;"),YS=typeof kA.oninput=="function"}_S=YS}else _S=!1;IA=_S&&(!document.documentMode||9<document.documentMode)}function EA(){vh&&(vh.detachEvent("onpropertychange",CA),yh=vh=null)}function CA(c){if(c.propertyName==="value"&&nv(yh)){var d=[];xA(d,yh,c,En(c)),di(XU,d)}}function eV(c,d,v){c==="focusin"?(EA(),vh=d,yh=v,vh.attachEvent("onpropertychange",CA)):c==="focusout"&&EA()}function tV(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return nv(yh)}function nV(c,d){if(c==="click")return nv(d)}function rV(c,d){if(c==="input"||c==="change")return nv(d)}function oV(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var Ha=typeof Object.is=="function"?Object.is:oV;function bh(c,d){if(Ha(c,d))return!0;if(typeof c!="object"||c===null||typeof d!="object"||d===null)return!1;var v=Object.keys(c),T=Object.keys(d);if(v.length!==T.length)return!1;for(T=0;T<v.length;T++){var N=v[T];if(!l.call(d,N)||!Ha(c[N],d[N]))return!1}return!0}function MA(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function DA(c,d){var v=MA(c);c=0;for(var T;v;){if(v.nodeType===3){if(T=c+v.textContent.length,c<=d&&T>=d)return{node:v,offset:d-c};c=T}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=MA(v)}}function AA(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?AA(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function NA(){for(var c=window,d=Ie();d instanceof c.HTMLIFrameElement;){try{var v=typeof d.contentWindow.location.href=="string"}catch{v=!1}if(v)c=d.contentWindow;else break;d=Ie(c.document)}return d}function zS(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}function aV(c){var d=NA(),v=c.focusedElem,T=c.selectionRange;if(d!==v&&v&&v.ownerDocument&&AA(v.ownerDocument.documentElement,v)){if(T!==null&&zS(v)){if(d=T.start,c=T.end,c===void 0&&(c=d),"selectionStart"in v)v.selectionStart=d,v.selectionEnd=Math.min(c,v.value.length);else if(c=(d=v.ownerDocument||document)&&d.defaultView||window,c.getSelection){c=c.getSelection();var N=v.textContent.length,L=Math.min(T.start,N);T=T.end===void 0?L:Math.min(T.end,N),!c.extend&&L>T&&(N=T,T=L,L=N),N=DA(v,L);var q=DA(v,T);N&&q&&(c.rangeCount!==1||c.anchorNode!==N.node||c.anchorOffset!==N.offset||c.focusNode!==q.node||c.focusOffset!==q.offset)&&(d=d.createRange(),d.setStart(N.node,N.offset),c.removeAllRanges(),L>T?(c.addRange(d),c.extend(q.node,q.offset)):(d.setEnd(q.node,q.offset),c.addRange(d)))}}for(d=[],c=v;c=c.parentNode;)c.nodeType===1&&d.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<d.length;v++)c=d[v],c.element.scrollLeft=c.left,c.element.scrollTop=c.top}}var iV=s&&"documentMode"in document&&11>=document.documentMode,Vu=null,US=null,wh=null,VS=!1;function OA(c,d,v){var T=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;VS||Vu==null||Vu!==Ie(T)||(T=Vu,"selectionStart"in T&&zS(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),wh&&bh(wh,T)||(wh=T,T=iv(US,"onSelect"),0<T.length&&(d=new ds("onSelect","select",null,d,v),c.push({event:d,listeners:T}),d.target=Vu)))}function rv(c,d){var v={};return v[c.toLowerCase()]=d.toLowerCase(),v["Webkit"+c]="webkit"+d,v["Moz"+c]="moz"+d,v}var Wu={animationend:rv("Animation","AnimationEnd"),animationiteration:rv("Animation","AnimationIteration"),animationstart:rv("Animation","AnimationStart"),transitionend:rv("Transition","TransitionEnd")},WS={},PA={};s&&(PA=document.createElement("div").style,"AnimationEvent"in window||(delete Wu.animationend.animation,delete Wu.animationiteration.animation,delete Wu.animationstart.animation),"TransitionEvent"in window||delete Wu.transitionend.transition);function ov(c){if(WS[c])return WS[c];if(!Wu[c])return c;var d=Wu[c],v;for(v in d)if(d.hasOwnProperty(v)&&v in PA)return WS[c]=d[v];return c}var jA=ov("animationend"),LA=ov("animationiteration"),RA=ov("animationstart"),FA=ov("transitionend"),HA=new Map,BA="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function pl(c,d){HA.set(c,d),a(d,[c])}for(var GS=0;GS<BA.length;GS++){var ZS=BA[GS],sV=ZS.toLowerCase(),lV=ZS[0].toUpperCase()+ZS.slice(1);pl(sV,"on"+lV)}pl(jA,"onAnimationEnd"),pl(LA,"onAnimationIteration"),pl(RA,"onAnimationStart"),pl("dblclick","onDoubleClick"),pl("focusin","onFocus"),pl("focusout","onBlur"),pl(FA,"onTransitionEnd"),i("onMouseEnter",["mouseout","mouseover"]),i("onMouseLeave",["mouseout","mouseover"]),i("onPointerEnter",["pointerout","pointerover"]),i("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),cV=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sh));function _A(c,d,v){var T=c.type||"unknown-event";c.currentTarget=v,ac(T,d,void 0,c),c.currentTarget=null}function YA(c,d){d=(d&4)!==0;for(var v=0;v<c.length;v++){var T=c[v],N=T.event;T=T.listeners;e:{var L=void 0;if(d)for(var q=T.length-1;0<=q;q--){var ae=T[q],se=ae.instance,xe=ae.currentTarget;if(ae=ae.listener,se!==L&&N.isPropagationStopped())break e;_A(N,ae,xe),L=se}else for(q=0;q<T.length;q++){if(ae=T[q],se=ae.instance,xe=ae.currentTarget,ae=ae.listener,se!==L&&N.isPropagationStopped())break e;_A(N,ae,xe),L=se}}}if(il)throw c=pi,il=!1,pi=null,c}function gn(c,d){var v=d[tT];v===void 0&&(v=d[tT]=new Set);var T=c+"__bubble";v.has(T)||(zA(d,c,2,!1),v.add(T))}function qS(c,d,v){var T=0;d&&(T|=4),zA(v,c,T,d)}var av="_reactListening"+Math.random().toString(36).slice(2);function Th(c){if(!c[av]){c[av]=!0,r.forEach(function(v){v!=="selectionchange"&&(cV.has(v)||qS(v,!1,c),qS(v,!0,c))});var d=c.nodeType===9?c:c.ownerDocument;d===null||d[av]||(d[av]=!0,qS("selectionchange",!1,d))}}function zA(c,d,v,T){switch(ch(d)){case 1:var N=Lu;break;case 4:N=cs;break;default:N=Ru}v=N.bind(null,d,v,c),N=void 0,!os||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(N=!0),T?N!==void 0?c.addEventListener(d,v,{capture:!0,passive:N}):c.addEventListener(d,v,!0):N!==void 0?c.addEventListener(d,v,{passive:N}):c.addEventListener(d,v,!1)}function $S(c,d,v,T,N){var L=T;if(!(d&1)&&!(d&2)&&T!==null)e:for(;;){if(T===null)return;var q=T.tag;if(q===3||q===4){var ae=T.stateNode.containerInfo;if(ae===N||ae.nodeType===8&&ae.parentNode===N)break;if(q===4)for(q=T.return;q!==null;){var se=q.tag;if((se===3||se===4)&&(se=q.stateNode.containerInfo,se===N||se.nodeType===8&&se.parentNode===N))return;q=q.return}for(;ae!==null;){if(q=bc(ae),q===null)return;if(se=q.tag,se===5||se===6){T=L=q;continue e}ae=ae.parentNode}}T=T.return}di(function(){var xe=L,Re=En(v),He=[];e:{var Le=HA.get(c);if(Le!==void 0){var Je=ds,nt=c;switch(c){case"keypress":if(us(v)===0)break e;case"keydown":case"keyup":Je=tv;break;case"focusin":nt="focus",Je=Bu;break;case"focusout":nt="blur",Je=Bu;break;case"beforeblur":case"afterblur":Je=Bu;break;case"click":if(v.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Je=dh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Je=fh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Je=re;break;case jA:case LA:case RA:Je=BS;break;case FA:Je=ge;break;case"scroll":Je=uh;break;case"wheel":Je=_e;break;case"copy":case"cut":case"paste":Je=_u;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Je=z}var rt=(d&4)!==0,Bn=!rt&&c==="scroll",me=rt?Le!==null?Le+"Capture":null:Le;rt=[];for(var ue=xe,ye;ue!==null;){ye=ue;var ze=ye.stateNode;if(ye.tag===5&&ze!==null&&(ye=ze,me!==null&&(ze=Na(ue,me),ze!=null&&rt.push(xh(ue,ze,ye)))),Bn)break;ue=ue.return}0<rt.length&&(Le=new Je(Le,nt,null,v,Re),He.push({event:Le,listeners:rt}))}}if(!(d&7)){e:{if(Le=c==="mouseover"||c==="pointerover",Je=c==="mouseout"||c==="pointerout",Le&&v!==io&&(nt=v.relatedTarget||v.fromElement)&&(bc(nt)||nt[hs]))break e;if((Je||Le)&&(Le=Re.window===Re?Re:(Le=Re.ownerDocument)?Le.defaultView||Le.parentWindow:window,Je?(nt=v.relatedTarget||v.toElement,Je=xe,nt=nt?bc(nt):null,nt!==null&&(Bn=Oa(nt),nt!==Bn||nt.tag!==5&&nt.tag!==6)&&(nt=null)):(Je=null,nt=xe),Je!==nt)){if(rt=dh,ze="onMouseLeave",me="onMouseEnter",ue="mouse",(c==="pointerout"||c==="pointerover")&&(rt=z,ze="onPointerLeave",me="onPointerEnter",ue="pointer"),Bn=Je==null?Le:qu(Je),ye=nt==null?Le:qu(nt),Le=new rt(ze,ue+"leave",Je,v,Re),Le.target=Bn,Le.relatedTarget=ye,ze=null,bc(Re)===xe&&(rt=new rt(me,ue+"enter",nt,v,Re),rt.target=ye,rt.relatedTarget=Bn,ze=rt),Bn=ze,Je&&nt)t:{for(rt=Je,me=nt,ue=0,ye=rt;ye;ye=Gu(ye))ue++;for(ye=0,ze=me;ze;ze=Gu(ze))ye++;for(;0<ue-ye;)rt=Gu(rt),ue--;for(;0<ye-ue;)me=Gu(me),ye--;for(;ue--;){if(rt===me||me!==null&&rt===me.alternate)break t;rt=Gu(rt),me=Gu(me)}rt=null}else rt=null;Je!==null&&UA(He,Le,Je,rt,!1),nt!==null&&Bn!==null&&UA(He,Bn,nt,rt,!0)}}e:{if(Le=xe?qu(xe):window,Je=Le.nodeName&&Le.nodeName.toLowerCase(),Je==="select"||Je==="input"&&Le.type==="file")var at=QU;else if(TA(Le))if(IA)at=rV;else{at=tV;var lt=eV}else(Je=Le.nodeName)&&Je.toLowerCase()==="input"&&(Le.type==="checkbox"||Le.type==="radio")&&(at=nV);if(at&&(at=at(c,xe))){xA(He,at,v,Re);break e}lt&&lt(c,Le,xe),c==="focusout"&&(lt=Le._wrapperState)&&lt.controlled&&Le.type==="number"&&ot(Le,"number",Le.value)}switch(lt=xe?qu(xe):window,c){case"focusin":(TA(lt)||lt.contentEditable==="true")&&(Vu=lt,US=xe,wh=null);break;case"focusout":wh=US=Vu=null;break;case"mousedown":VS=!0;break;case"contextmenu":case"mouseup":case"dragend":VS=!1,OA(He,v,Re);break;case"selectionchange":if(iV)break;case"keydown":case"keyup":OA(He,v,Re)}var ct;if(xt)e:{switch(c){case"compositionstart":var yt="onCompositionStart";break e;case"compositionend":yt="onCompositionEnd";break e;case"compositionupdate":yt="onCompositionUpdate";break e}yt=void 0}else Ii?yc(c,v)&&(yt="onCompositionEnd"):c==="keydown"&&v.keyCode===229&&(yt="onCompositionStart");yt&&(Pr&&v.locale!=="ko"&&(Ii||yt!=="onCompositionStart"?yt==="onCompositionEnd"&&Ii&&(ct=$g()):(Fa=Re,Fu="value"in Fa?Fa.value:Fa.textContent,Ii=!0)),lt=iv(xe,yt),0<lt.length&&(yt=new ph(yt,c,null,v,Re),He.push({event:yt,listeners:lt}),ct?yt.data=ct:(ct=gh(v),ct!==null&&(yt.data=ct)))),(ct=ln?$U(c,v):KU(c,v))&&(xe=iv(xe,"onBeforeInput"),0<xe.length&&(Re=new ph("onBeforeInput","beforeinput",null,v,Re),He.push({event:Re,listeners:xe}),Re.data=ct))}YA(He,d)})}function xh(c,d,v){return{instance:c,listener:d,currentTarget:v}}function iv(c,d){for(var v=d+"Capture",T=[];c!==null;){var N=c,L=N.stateNode;N.tag===5&&L!==null&&(N=L,L=Na(c,v),L!=null&&T.unshift(xh(c,L,N)),L=Na(c,d),L!=null&&T.push(xh(c,L,N))),c=c.return}return T}function Gu(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5);return c||null}function UA(c,d,v,T,N){for(var L=d._reactName,q=[];v!==null&&v!==T;){var ae=v,se=ae.alternate,xe=ae.stateNode;if(se!==null&&se===T)break;ae.tag===5&&xe!==null&&(ae=xe,N?(se=Na(v,L),se!=null&&q.unshift(xh(v,se,ae))):N||(se=Na(v,L),se!=null&&q.push(xh(v,se,ae)))),v=v.return}q.length!==0&&c.push({event:d,listeners:q})}var uV=/\r\n?/g,dV=/\u0000|\uFFFD/g;function VA(c){return(typeof c=="string"?c:""+c).replace(uV,`
`).replace(dV,"")}function sv(c,d,v){if(d=VA(d),VA(c)!==d&&v)throw Error(n(425))}function lv(){}var KS=null,JS=null;function XS(c,d){return c==="textarea"||c==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var QS=typeof setTimeout=="function"?setTimeout:void 0,fV=typeof clearTimeout=="function"?clearTimeout:void 0,WA=typeof Promise=="function"?Promise:void 0,hV=typeof queueMicrotask=="function"?queueMicrotask:typeof WA<"u"?function(c){return WA.resolve(null).then(c).catch(pV)}:QS;function pV(c){setTimeout(function(){throw c})}function eT(c,d){var v=d,T=0;do{var N=v.nextSibling;if(c.removeChild(v),N&&N.nodeType===8)if(v=N.data,v==="/$"){if(T===0){c.removeChild(N),Ti(d);return}T--}else v!=="$"&&v!=="$?"&&v!=="$!"||T++;v=N}while(v);Ti(d)}function ml(c){for(;c!=null;c=c.nextSibling){var d=c.nodeType;if(d===1||d===3)break;if(d===8){if(d=c.data,d==="$"||d==="$!"||d==="$?")break;if(d==="/$")return null}}return c}function GA(c){c=c.previousSibling;for(var d=0;c;){if(c.nodeType===8){var v=c.data;if(v==="$"||v==="$!"||v==="$?"){if(d===0)return c;d--}else v==="/$"&&d++}c=c.previousSibling}return null}var Zu=Math.random().toString(36).slice(2),ki="__reactFiber$"+Zu,Ih="__reactProps$"+Zu,hs="__reactContainer$"+Zu,tT="__reactEvents$"+Zu,mV="__reactListeners$"+Zu,gV="__reactHandles$"+Zu;function bc(c){var d=c[ki];if(d)return d;for(var v=c.parentNode;v;){if(d=v[hs]||v[ki]){if(v=d.alternate,d.child!==null||v!==null&&v.child!==null)for(c=GA(c);c!==null;){if(v=c[ki])return v;c=GA(c)}return d}c=v,v=c.parentNode}return null}function kh(c){return c=c[ki]||c[hs],!c||c.tag!==5&&c.tag!==6&&c.tag!==13&&c.tag!==3?null:c}function qu(c){if(c.tag===5||c.tag===6)return c.stateNode;throw Error(n(33))}function cv(c){return c[Ih]||null}var nT=[],$u=-1;function gl(c){return{current:c}}function vn(c){0>$u||(c.current=nT[$u],nT[$u]=null,$u--)}function dn(c,d){$u++,nT[$u]=c.current,c.current=d}var vl={},jr=gl(vl),vo=gl(!1),wc=vl;function Ku(c,d){var v=c.type.contextTypes;if(!v)return vl;var T=c.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===d)return T.__reactInternalMemoizedMaskedChildContext;var N={},L;for(L in v)N[L]=d[L];return T&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=d,c.__reactInternalMemoizedMaskedChildContext=N),N}function yo(c){return c=c.childContextTypes,c!=null}function uv(){vn(vo),vn(jr)}function ZA(c,d,v){if(jr.current!==vl)throw Error(n(168));dn(jr,d),dn(vo,v)}function qA(c,d,v){var T=c.stateNode;if(d=d.childContextTypes,typeof T.getChildContext!="function")return v;T=T.getChildContext();for(var N in T)if(!(N in d))throw Error(n(108,Ne(c)||"Unknown",N));return G({},v,T)}function dv(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||vl,wc=jr.current,dn(jr,c),dn(vo,vo.current),!0}function $A(c,d,v){var T=c.stateNode;if(!T)throw Error(n(169));v?(c=qA(c,d,wc),T.__reactInternalMemoizedMergedChildContext=c,vn(vo),vn(jr),dn(jr,c)):vn(vo),dn(vo,v)}var ps=null,fv=!1,rT=!1;function KA(c){ps===null?ps=[c]:ps.push(c)}function vV(c){fv=!0,KA(c)}function yl(){if(!rT&&ps!==null){rT=!0;var c=0,d=$e;try{var v=ps;for($e=1;c<v.length;c++){var T=v[c];do T=T(!0);while(T!==null)}ps=null,fv=!1}catch(N){throw ps!==null&&(ps=ps.slice(c+1)),is(ll,yl),N}finally{$e=d,rT=!1}}return null}var Ju=[],Xu=0,hv=null,pv=0,sa=[],la=0,Sc=null,ms=1,gs="";function Tc(c,d){Ju[Xu++]=pv,Ju[Xu++]=hv,hv=c,pv=d}function JA(c,d,v){sa[la++]=ms,sa[la++]=gs,sa[la++]=Sc,Sc=c;var T=ms;c=gs;var N=32-qn(T)-1;T&=~(1<<N),v+=1;var L=32-qn(d)+N;if(30<L){var q=N-N%5;L=(T&(1<<q)-1).toString(32),T>>=q,N-=q,ms=1<<32-qn(d)+N|v<<N|T,gs=L+c}else ms=1<<L|v<<N|T,gs=c}function oT(c){c.return!==null&&(Tc(c,1),JA(c,1,0))}function aT(c){for(;c===hv;)hv=Ju[--Xu],Ju[Xu]=null,pv=Ju[--Xu],Ju[Xu]=null;for(;c===Sc;)Sc=sa[--la],sa[la]=null,gs=sa[--la],sa[la]=null,ms=sa[--la],sa[la]=null}var Ho=null,Bo=null,Tn=!1,Ba=null;function XA(c,d){var v=fa(5,null,null,0);v.elementType="DELETED",v.stateNode=d,v.return=c,d=c.deletions,d===null?(c.deletions=[v],c.flags|=16):d.push(v)}function QA(c,d){switch(c.tag){case 5:var v=c.type;return d=d.nodeType!==1||v.toLowerCase()!==d.nodeName.toLowerCase()?null:d,d!==null?(c.stateNode=d,Ho=c,Bo=ml(d.firstChild),!0):!1;case 6:return d=c.pendingProps===""||d.nodeType!==3?null:d,d!==null?(c.stateNode=d,Ho=c,Bo=null,!0):!1;case 13:return d=d.nodeType!==8?null:d,d!==null?(v=Sc!==null?{id:ms,overflow:gs}:null,c.memoizedState={dehydrated:d,treeContext:v,retryLane:1073741824},v=fa(18,null,null,0),v.stateNode=d,v.return=c,c.child=v,Ho=c,Bo=null,!0):!1;default:return!1}}function iT(c){return(c.mode&1)!==0&&(c.flags&128)===0}function sT(c){if(Tn){var d=Bo;if(d){var v=d;if(!QA(c,d)){if(iT(c))throw Error(n(418));d=ml(v.nextSibling);var T=Ho;d&&QA(c,d)?XA(T,v):(c.flags=c.flags&-4097|2,Tn=!1,Ho=c)}}else{if(iT(c))throw Error(n(418));c.flags=c.flags&-4097|2,Tn=!1,Ho=c}}}function e2(c){for(c=c.return;c!==null&&c.tag!==5&&c.tag!==3&&c.tag!==13;)c=c.return;Ho=c}function mv(c){if(c!==Ho)return!1;if(!Tn)return e2(c),Tn=!0,!1;var d;if((d=c.tag!==3)&&!(d=c.tag!==5)&&(d=c.type,d=d!=="head"&&d!=="body"&&!XS(c.type,c.memoizedProps)),d&&(d=Bo)){if(iT(c))throw t2(),Error(n(418));for(;d;)XA(c,d),d=ml(d.nextSibling)}if(e2(c),c.tag===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(n(317));e:{for(c=c.nextSibling,d=0;c;){if(c.nodeType===8){var v=c.data;if(v==="/$"){if(d===0){Bo=ml(c.nextSibling);break e}d--}else v!=="$"&&v!=="$!"&&v!=="$?"||d++}c=c.nextSibling}Bo=null}}else Bo=Ho?ml(c.stateNode.nextSibling):null;return!0}function t2(){for(var c=Bo;c;)c=ml(c.nextSibling)}function Qu(){Bo=Ho=null,Tn=!1}function lT(c){Ba===null?Ba=[c]:Ba.push(c)}var yV=C.ReactCurrentBatchConfig;function _a(c,d){if(c&&c.defaultProps){d=G({},d),c=c.defaultProps;for(var v in c)d[v]===void 0&&(d[v]=c[v]);return d}return d}var gv=gl(null),vv=null,ed=null,cT=null;function uT(){cT=ed=vv=null}function dT(c){var d=gv.current;vn(gv),c._currentValue=d}function fT(c,d,v){for(;c!==null;){var T=c.alternate;if((c.childLanes&d)!==d?(c.childLanes|=d,T!==null&&(T.childLanes|=d)):T!==null&&(T.childLanes&d)!==d&&(T.childLanes|=d),c===v)break;c=c.return}}function td(c,d){vv=c,cT=ed=null,c=c.dependencies,c!==null&&c.firstContext!==null&&(c.lanes&d&&(bo=!0),c.firstContext=null)}function ca(c){var d=c._currentValue;if(cT!==c)if(c={context:c,memoizedValue:d,next:null},ed===null){if(vv===null)throw Error(n(308));ed=c,vv.dependencies={lanes:0,firstContext:c}}else ed=ed.next=c;return d}var xc=null;function hT(c){xc===null?xc=[c]:xc.push(c)}function n2(c,d,v,T){var N=d.interleaved;return N===null?(v.next=v,hT(d)):(v.next=N.next,N.next=v),d.interleaved=v,vs(c,T)}function vs(c,d){c.lanes|=d;var v=c.alternate;for(v!==null&&(v.lanes|=d),v=c,c=c.return;c!==null;)c.childLanes|=d,v=c.alternate,v!==null&&(v.childLanes|=d),v=c,c=c.return;return v.tag===3?v.stateNode:null}var bl=!1;function pT(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function r2(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,effects:c.effects})}function ys(c,d){return{eventTime:c,lane:d,tag:0,payload:null,callback:null,next:null}}function wl(c,d,v){var T=c.updateQueue;if(T===null)return null;if(T=T.shared,Bt&2){var N=T.pending;return N===null?d.next=d:(d.next=N.next,N.next=d),T.pending=d,vs(c,v)}return N=T.interleaved,N===null?(d.next=d,hT(T)):(d.next=N.next,N.next=d),T.interleaved=d,vs(c,v)}function yv(c,d,v){if(d=d.updateQueue,d!==null&&(d=d.shared,(v&4194240)!==0)){var T=d.lanes;T&=c.pendingLanes,v|=T,d.lanes=v,Ue(c,v)}}function o2(c,d){var v=c.updateQueue,T=c.alternate;if(T!==null&&(T=T.updateQueue,v===T)){var N=null,L=null;if(v=v.firstBaseUpdate,v!==null){do{var q={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};L===null?N=L=q:L=L.next=q,v=v.next}while(v!==null);L===null?N=L=d:L=L.next=d}else N=L=d;v={baseState:T.baseState,firstBaseUpdate:N,lastBaseUpdate:L,shared:T.shared,effects:T.effects},c.updateQueue=v;return}c=v.lastBaseUpdate,c===null?v.firstBaseUpdate=d:c.next=d,v.lastBaseUpdate=d}function bv(c,d,v,T){var N=c.updateQueue;bl=!1;var L=N.firstBaseUpdate,q=N.lastBaseUpdate,ae=N.shared.pending;if(ae!==null){N.shared.pending=null;var se=ae,xe=se.next;se.next=null,q===null?L=xe:q.next=xe,q=se;var Re=c.alternate;Re!==null&&(Re=Re.updateQueue,ae=Re.lastBaseUpdate,ae!==q&&(ae===null?Re.firstBaseUpdate=xe:ae.next=xe,Re.lastBaseUpdate=se))}if(L!==null){var He=N.baseState;q=0,Re=xe=se=null,ae=L;do{var Le=ae.lane,Je=ae.eventTime;if((T&Le)===Le){Re!==null&&(Re=Re.next={eventTime:Je,lane:0,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null});e:{var nt=c,rt=ae;switch(Le=d,Je=v,rt.tag){case 1:if(nt=rt.payload,typeof nt=="function"){He=nt.call(Je,He,Le);break e}He=nt;break e;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=rt.payload,Le=typeof nt=="function"?nt.call(Je,He,Le):nt,Le==null)break e;He=G({},He,Le);break e;case 2:bl=!0}}ae.callback!==null&&ae.lane!==0&&(c.flags|=64,Le=N.effects,Le===null?N.effects=[ae]:Le.push(ae))}else Je={eventTime:Je,lane:Le,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},Re===null?(xe=Re=Je,se=He):Re=Re.next=Je,q|=Le;if(ae=ae.next,ae===null){if(ae=N.shared.pending,ae===null)break;Le=ae,ae=Le.next,Le.next=null,N.lastBaseUpdate=Le,N.shared.pending=null}}while(!0);if(Re===null&&(se=He),N.baseState=se,N.firstBaseUpdate=xe,N.lastBaseUpdate=Re,d=N.shared.interleaved,d!==null){N=d;do q|=N.lane,N=N.next;while(N!==d)}else L===null&&(N.shared.lanes=0);Ec|=q,c.lanes=q,c.memoizedState=He}}function a2(c,d,v){if(c=d.effects,d.effects=null,c!==null)for(d=0;d<c.length;d++){var T=c[d],N=T.callback;if(N!==null){if(T.callback=null,T=v,typeof N!="function")throw Error(n(191,N));N.call(T)}}}var i2=new e.Component().refs;function mT(c,d,v,T){d=c.memoizedState,v=v(T,d),v=v==null?d:G({},d,v),c.memoizedState=v,c.lanes===0&&(c.updateQueue.baseState=v)}var wv={isMounted:function(c){return(c=c._reactInternals)?Oa(c)===c:!1},enqueueSetState:function(c,d,v){c=c._reactInternals;var T=Xr(),N=Il(c),L=ys(T,N);L.payload=d,v!=null&&(L.callback=v),d=wl(c,L,N),d!==null&&(Ua(d,c,N,T),yv(d,c,N))},enqueueReplaceState:function(c,d,v){c=c._reactInternals;var T=Xr(),N=Il(c),L=ys(T,N);L.tag=1,L.payload=d,v!=null&&(L.callback=v),d=wl(c,L,N),d!==null&&(Ua(d,c,N,T),yv(d,c,N))},enqueueForceUpdate:function(c,d){c=c._reactInternals;var v=Xr(),T=Il(c),N=ys(v,T);N.tag=2,d!=null&&(N.callback=d),d=wl(c,N,T),d!==null&&(Ua(d,c,T,v),yv(d,c,T))}};function s2(c,d,v,T,N,L,q){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(T,L,q):d.prototype&&d.prototype.isPureReactComponent?!bh(v,T)||!bh(N,L):!0}function l2(c,d,v){var T=!1,N=vl,L=d.contextType;return typeof L=="object"&&L!==null?L=ca(L):(N=yo(d)?wc:jr.current,T=d.contextTypes,L=(T=T!=null)?Ku(c,N):vl),d=new d(v,L),c.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=wv,c.stateNode=d,d._reactInternals=c,T&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=N,c.__reactInternalMemoizedMaskedChildContext=L),d}function c2(c,d,v,T){c=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(v,T),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(v,T),d.state!==c&&wv.enqueueReplaceState(d,d.state,null)}function gT(c,d,v,T){var N=c.stateNode;N.props=v,N.state=c.memoizedState,N.refs=i2,pT(c);var L=d.contextType;typeof L=="object"&&L!==null?N.context=ca(L):(L=yo(d)?wc:jr.current,N.context=Ku(c,L)),N.state=c.memoizedState,L=d.getDerivedStateFromProps,typeof L=="function"&&(mT(c,d,L,v),N.state=c.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(d=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),d!==N.state&&wv.enqueueReplaceState(N,N.state,null),bv(c,v,N,T),N.state=c.memoizedState),typeof N.componentDidMount=="function"&&(c.flags|=4194308)}function Eh(c,d,v){if(c=v.ref,c!==null&&typeof c!="function"&&typeof c!="object"){if(v._owner){if(v=v._owner,v){if(v.tag!==1)throw Error(n(309));var T=v.stateNode}if(!T)throw Error(n(147,c));var N=T,L=""+c;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===L?d.ref:(d=function(q){var ae=N.refs;ae===i2&&(ae=N.refs={}),q===null?delete ae[L]:ae[L]=q},d._stringRef=L,d)}if(typeof c!="string")throw Error(n(284));if(!v._owner)throw Error(n(290,c))}return c}function Sv(c,d){throw c=Object.prototype.toString.call(d),Error(n(31,c==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":c))}function u2(c){var d=c._init;return d(c._payload)}function d2(c){function d(me,ue){if(c){var ye=me.deletions;ye===null?(me.deletions=[ue],me.flags|=16):ye.push(ue)}}function v(me,ue){if(!c)return null;for(;ue!==null;)d(me,ue),ue=ue.sibling;return null}function T(me,ue){for(me=new Map;ue!==null;)ue.key!==null?me.set(ue.key,ue):me.set(ue.index,ue),ue=ue.sibling;return me}function N(me,ue){return me=El(me,ue),me.index=0,me.sibling=null,me}function L(me,ue,ye){return me.index=ye,c?(ye=me.alternate,ye!==null?(ye=ye.index,ye<ue?(me.flags|=2,ue):ye):(me.flags|=2,ue)):(me.flags|=1048576,ue)}function q(me){return c&&me.alternate===null&&(me.flags|=2),me}function ae(me,ue,ye,ze){return ue===null||ue.tag!==6?(ue=QT(ye,me.mode,ze),ue.return=me,ue):(ue=N(ue,ye),ue.return=me,ue)}function se(me,ue,ye,ze){var at=ye.type;return at===O?Re(me,ue,ye.props.children,ze,ye.key):ue!==null&&(ue.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===V&&u2(at)===ue.type)?(ze=N(ue,ye.props),ze.ref=Eh(me,ue,ye),ze.return=me,ze):(ze=_v(ye.type,ye.key,ye.props,null,me.mode,ze),ze.ref=Eh(me,ue,ye),ze.return=me,ze)}function xe(me,ue,ye,ze){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==ye.containerInfo||ue.stateNode.implementation!==ye.implementation?(ue=e1(ye,me.mode,ze),ue.return=me,ue):(ue=N(ue,ye.children||[]),ue.return=me,ue)}function Re(me,ue,ye,ze,at){return ue===null||ue.tag!==7?(ue=Ac(ye,me.mode,ze,at),ue.return=me,ue):(ue=N(ue,ye),ue.return=me,ue)}function He(me,ue,ye){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=QT(""+ue,me.mode,ye),ue.return=me,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case M:return ye=_v(ue.type,ue.key,ue.props,null,me.mode,ye),ye.ref=Eh(me,null,ue),ye.return=me,ye;case k:return ue=e1(ue,me.mode,ye),ue.return=me,ue;case V:var ze=ue._init;return He(me,ze(ue._payload),ye)}if(st(ue)||te(ue))return ue=Ac(ue,me.mode,ye,null),ue.return=me,ue;Sv(me,ue)}return null}function Le(me,ue,ye,ze){var at=ue!==null?ue.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return at!==null?null:ae(me,ue,""+ye,ze);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case M:return ye.key===at?se(me,ue,ye,ze):null;case k:return ye.key===at?xe(me,ue,ye,ze):null;case V:return at=ye._init,Le(me,ue,at(ye._payload),ze)}if(st(ye)||te(ye))return at!==null?null:Re(me,ue,ye,ze,null);Sv(me,ye)}return null}function Je(me,ue,ye,ze,at){if(typeof ze=="string"&&ze!==""||typeof ze=="number")return me=me.get(ye)||null,ae(ue,me,""+ze,at);if(typeof ze=="object"&&ze!==null){switch(ze.$$typeof){case M:return me=me.get(ze.key===null?ye:ze.key)||null,se(ue,me,ze,at);case k:return me=me.get(ze.key===null?ye:ze.key)||null,xe(ue,me,ze,at);case V:var lt=ze._init;return Je(me,ue,ye,lt(ze._payload),at)}if(st(ze)||te(ze))return me=me.get(ye)||null,Re(ue,me,ze,at,null);Sv(ue,ze)}return null}function nt(me,ue,ye,ze){for(var at=null,lt=null,ct=ue,yt=ue=0,ir=null;ct!==null&&yt<ye.length;yt++){ct.index>yt?(ir=ct,ct=null):ir=ct.sibling;var zt=Le(me,ct,ye[yt],ze);if(zt===null){ct===null&&(ct=ir);break}c&&ct&&zt.alternate===null&&d(me,ct),ue=L(zt,ue,yt),lt===null?at=zt:lt.sibling=zt,lt=zt,ct=ir}if(yt===ye.length)return v(me,ct),Tn&&Tc(me,yt),at;if(ct===null){for(;yt<ye.length;yt++)ct=He(me,ye[yt],ze),ct!==null&&(ue=L(ct,ue,yt),lt===null?at=ct:lt.sibling=ct,lt=ct);return Tn&&Tc(me,yt),at}for(ct=T(me,ct);yt<ye.length;yt++)ir=Je(ct,me,yt,ye[yt],ze),ir!==null&&(c&&ir.alternate!==null&&ct.delete(ir.key===null?yt:ir.key),ue=L(ir,ue,yt),lt===null?at=ir:lt.sibling=ir,lt=ir);return c&&ct.forEach(function(Cl){return d(me,Cl)}),Tn&&Tc(me,yt),at}function rt(me,ue,ye,ze){var at=te(ye);if(typeof at!="function")throw Error(n(150));if(ye=at.call(ye),ye==null)throw Error(n(151));for(var lt=at=null,ct=ue,yt=ue=0,ir=null,zt=ye.next();ct!==null&&!zt.done;yt++,zt=ye.next()){ct.index>yt?(ir=ct,ct=null):ir=ct.sibling;var Cl=Le(me,ct,zt.value,ze);if(Cl===null){ct===null&&(ct=ir);break}c&&ct&&Cl.alternate===null&&d(me,ct),ue=L(Cl,ue,yt),lt===null?at=Cl:lt.sibling=Cl,lt=Cl,ct=ir}if(zt.done)return v(me,ct),Tn&&Tc(me,yt),at;if(ct===null){for(;!zt.done;yt++,zt=ye.next())zt=He(me,zt.value,ze),zt!==null&&(ue=L(zt,ue,yt),lt===null?at=zt:lt.sibling=zt,lt=zt);return Tn&&Tc(me,yt),at}for(ct=T(me,ct);!zt.done;yt++,zt=ye.next())zt=Je(ct,me,yt,zt.value,ze),zt!==null&&(c&&zt.alternate!==null&&ct.delete(zt.key===null?yt:zt.key),ue=L(zt,ue,yt),lt===null?at=zt:lt.sibling=zt,lt=zt);return c&&ct.forEach(function(JV){return d(me,JV)}),Tn&&Tc(me,yt),at}function Bn(me,ue,ye,ze){if(typeof ye=="object"&&ye!==null&&ye.type===O&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case M:e:{for(var at=ye.key,lt=ue;lt!==null;){if(lt.key===at){if(at=ye.type,at===O){if(lt.tag===7){v(me,lt.sibling),ue=N(lt,ye.props.children),ue.return=me,me=ue;break e}}else if(lt.elementType===at||typeof at=="object"&&at!==null&&at.$$typeof===V&&u2(at)===lt.type){v(me,lt.sibling),ue=N(lt,ye.props),ue.ref=Eh(me,lt,ye),ue.return=me,me=ue;break e}v(me,lt);break}else d(me,lt);lt=lt.sibling}ye.type===O?(ue=Ac(ye.props.children,me.mode,ze,ye.key),ue.return=me,me=ue):(ze=_v(ye.type,ye.key,ye.props,null,me.mode,ze),ze.ref=Eh(me,ue,ye),ze.return=me,me=ze)}return q(me);case k:e:{for(lt=ye.key;ue!==null;){if(ue.key===lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){v(me,ue.sibling),ue=N(ue,ye.children||[]),ue.return=me,me=ue;break e}else{v(me,ue);break}else d(me,ue);ue=ue.sibling}ue=e1(ye,me.mode,ze),ue.return=me,me=ue}return q(me);case V:return lt=ye._init,Bn(me,ue,lt(ye._payload),ze)}if(st(ye))return nt(me,ue,ye,ze);if(te(ye))return rt(me,ue,ye,ze);Sv(me,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(v(me,ue.sibling),ue=N(ue,ye),ue.return=me,me=ue):(v(me,ue),ue=QT(ye,me.mode,ze),ue.return=me,me=ue),q(me)):v(me,ue)}return Bn}var nd=d2(!0),f2=d2(!1),Ch={},Ei=gl(Ch),Mh=gl(Ch),Dh=gl(Ch);function Ic(c){if(c===Ch)throw Error(n(174));return c}function vT(c,d){switch(dn(Dh,d),dn(Mh,c),dn(Ei,Ch),c=d.nodeType,c){case 9:case 11:d=(d=d.documentElement)?d.namespaceURI:qe(null,"");break;default:c=c===8?d.parentNode:d,d=c.namespaceURI||null,c=c.tagName,d=qe(d,c)}vn(Ei),dn(Ei,d)}function rd(){vn(Ei),vn(Mh),vn(Dh)}function h2(c){Ic(Dh.current);var d=Ic(Ei.current),v=qe(d,c.type);d!==v&&(dn(Mh,c),dn(Ei,v))}function yT(c){Mh.current===c&&(vn(Ei),vn(Mh))}var Cn=gl(0);function Tv(c){for(var d=c;d!==null;){if(d.tag===13){var v=d.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||v.data==="$?"||v.data==="$!"))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if(d.flags&128)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var bT=[];function wT(){for(var c=0;c<bT.length;c++)bT[c]._workInProgressVersionPrimary=null;bT.length=0}var xv=C.ReactCurrentDispatcher,ST=C.ReactCurrentBatchConfig,kc=0,Mn=null,$n=null,or=null,Iv=!1,Ah=!1,Nh=0,bV=0;function Lr(){throw Error(n(321))}function TT(c,d){if(d===null)return!1;for(var v=0;v<d.length&&v<c.length;v++)if(!Ha(c[v],d[v]))return!1;return!0}function xT(c,d,v,T,N,L){if(kc=L,Mn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,xv.current=c===null||c.memoizedState===null?xV:IV,c=v(T,N),Ah){L=0;do{if(Ah=!1,Nh=0,25<=L)throw Error(n(301));L+=1,or=$n=null,d.updateQueue=null,xv.current=kV,c=v(T,N)}while(Ah)}if(xv.current=Cv,d=$n!==null&&$n.next!==null,kc=0,or=$n=Mn=null,Iv=!1,d)throw Error(n(300));return c}function IT(){var c=Nh!==0;return Nh=0,c}function Ci(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return or===null?Mn.memoizedState=or=c:or=or.next=c,or}function ua(){if($n===null){var c=Mn.alternate;c=c!==null?c.memoizedState:null}else c=$n.next;var d=or===null?Mn.memoizedState:or.next;if(d!==null)or=d,$n=c;else{if(c===null)throw Error(n(310));$n=c,c={memoizedState:$n.memoizedState,baseState:$n.baseState,baseQueue:$n.baseQueue,queue:$n.queue,next:null},or===null?Mn.memoizedState=or=c:or=or.next=c}return or}function Oh(c,d){return typeof d=="function"?d(c):d}function kT(c){var d=ua(),v=d.queue;if(v===null)throw Error(n(311));v.lastRenderedReducer=c;var T=$n,N=T.baseQueue,L=v.pending;if(L!==null){if(N!==null){var q=N.next;N.next=L.next,L.next=q}T.baseQueue=N=L,v.pending=null}if(N!==null){L=N.next,T=T.baseState;var ae=q=null,se=null,xe=L;do{var Re=xe.lane;if((kc&Re)===Re)se!==null&&(se=se.next={lane:0,action:xe.action,hasEagerState:xe.hasEagerState,eagerState:xe.eagerState,next:null}),T=xe.hasEagerState?xe.eagerState:c(T,xe.action);else{var He={lane:Re,action:xe.action,hasEagerState:xe.hasEagerState,eagerState:xe.eagerState,next:null};se===null?(ae=se=He,q=T):se=se.next=He,Mn.lanes|=Re,Ec|=Re}xe=xe.next}while(xe!==null&&xe!==L);se===null?q=T:se.next=ae,Ha(T,d.memoizedState)||(bo=!0),d.memoizedState=T,d.baseState=q,d.baseQueue=se,v.lastRenderedState=T}if(c=v.interleaved,c!==null){N=c;do L=N.lane,Mn.lanes|=L,Ec|=L,N=N.next;while(N!==c)}else N===null&&(v.lanes=0);return[d.memoizedState,v.dispatch]}function ET(c){var d=ua(),v=d.queue;if(v===null)throw Error(n(311));v.lastRenderedReducer=c;var T=v.dispatch,N=v.pending,L=d.memoizedState;if(N!==null){v.pending=null;var q=N=N.next;do L=c(L,q.action),q=q.next;while(q!==N);Ha(L,d.memoizedState)||(bo=!0),d.memoizedState=L,d.baseQueue===null&&(d.baseState=L),v.lastRenderedState=L}return[L,T]}function p2(){}function m2(c,d){var v=Mn,T=ua(),N=d(),L=!Ha(T.memoizedState,N);if(L&&(T.memoizedState=N,bo=!0),T=T.queue,CT(y2.bind(null,v,T,c),[c]),T.getSnapshot!==d||L||or!==null&&or.memoizedState.tag&1){if(v.flags|=2048,Ph(9,v2.bind(null,v,T,N,d),void 0,null),ar===null)throw Error(n(349));kc&30||g2(v,d,N)}return N}function g2(c,d,v){c.flags|=16384,c={getSnapshot:d,value:v},d=Mn.updateQueue,d===null?(d={lastEffect:null,stores:null},Mn.updateQueue=d,d.stores=[c]):(v=d.stores,v===null?d.stores=[c]:v.push(c))}function v2(c,d,v,T){d.value=v,d.getSnapshot=T,b2(d)&&w2(c)}function y2(c,d,v){return v(function(){b2(d)&&w2(c)})}function b2(c){var d=c.getSnapshot;c=c.value;try{var v=d();return!Ha(c,v)}catch{return!0}}function w2(c){var d=vs(c,1);d!==null&&Ua(d,c,1,-1)}function S2(c){var d=Ci();return typeof c=="function"&&(c=c()),d.memoizedState=d.baseState=c,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oh,lastRenderedState:c},d.queue=c,c=c.dispatch=TV.bind(null,Mn,c),[d.memoizedState,c]}function Ph(c,d,v,T){return c={tag:c,create:d,destroy:v,deps:T,next:null},d=Mn.updateQueue,d===null?(d={lastEffect:null,stores:null},Mn.updateQueue=d,d.lastEffect=c.next=c):(v=d.lastEffect,v===null?d.lastEffect=c.next=c:(T=v.next,v.next=c,c.next=T,d.lastEffect=c)),c}function T2(){return ua().memoizedState}function kv(c,d,v,T){var N=Ci();Mn.flags|=c,N.memoizedState=Ph(1|d,v,void 0,T===void 0?null:T)}function Ev(c,d,v,T){var N=ua();T=T===void 0?null:T;var L=void 0;if($n!==null){var q=$n.memoizedState;if(L=q.destroy,T!==null&&TT(T,q.deps)){N.memoizedState=Ph(d,v,L,T);return}}Mn.flags|=c,N.memoizedState=Ph(1|d,v,L,T)}function x2(c,d){return kv(8390656,8,c,d)}function CT(c,d){return Ev(2048,8,c,d)}function I2(c,d){return Ev(4,2,c,d)}function k2(c,d){return Ev(4,4,c,d)}function E2(c,d){if(typeof d=="function")return c=c(),d(c),function(){d(null)};if(d!=null)return c=c(),d.current=c,function(){d.current=null}}function C2(c,d,v){return v=v!=null?v.concat([c]):null,Ev(4,4,E2.bind(null,d,c),v)}function MT(){}function M2(c,d){var v=ua();d=d===void 0?null:d;var T=v.memoizedState;return T!==null&&d!==null&&TT(d,T[1])?T[0]:(v.memoizedState=[c,d],c)}function D2(c,d){var v=ua();d=d===void 0?null:d;var T=v.memoizedState;return T!==null&&d!==null&&TT(d,T[1])?T[0]:(c=c(),v.memoizedState=[c,d],c)}function A2(c,d,v){return kc&21?(Ha(v,d)||(v=oe(),Mn.lanes|=v,Ec|=v,c.baseState=!0),d):(c.baseState&&(c.baseState=!1,bo=!0),c.memoizedState=v)}function wV(c,d){var v=$e;$e=v!==0&&4>v?v:4,c(!0);var T=ST.transition;ST.transition={};try{c(!1),d()}finally{$e=v,ST.transition=T}}function N2(){return ua().memoizedState}function SV(c,d,v){var T=Il(c);if(v={lane:T,action:v,hasEagerState:!1,eagerState:null,next:null},O2(c))P2(d,v);else if(v=n2(c,d,v,T),v!==null){var N=Xr();Ua(v,c,T,N),j2(v,d,T)}}function TV(c,d,v){var T=Il(c),N={lane:T,action:v,hasEagerState:!1,eagerState:null,next:null};if(O2(c))P2(d,N);else{var L=c.alternate;if(c.lanes===0&&(L===null||L.lanes===0)&&(L=d.lastRenderedReducer,L!==null))try{var q=d.lastRenderedState,ae=L(q,v);if(N.hasEagerState=!0,N.eagerState=ae,Ha(ae,q)){var se=d.interleaved;se===null?(N.next=N,hT(d)):(N.next=se.next,se.next=N),d.interleaved=N;return}}catch{}v=n2(c,d,N,T),v!==null&&(N=Xr(),Ua(v,c,T,N),j2(v,d,T))}}function O2(c){var d=c.alternate;return c===Mn||d!==null&&d===Mn}function P2(c,d){Ah=Iv=!0;var v=c.pending;v===null?d.next=d:(d.next=v.next,v.next=d),c.pending=d}function j2(c,d,v){if(v&4194240){var T=d.lanes;T&=c.pendingLanes,v|=T,d.lanes=v,Ue(c,v)}}var Cv={readContext:ca,useCallback:Lr,useContext:Lr,useEffect:Lr,useImperativeHandle:Lr,useInsertionEffect:Lr,useLayoutEffect:Lr,useMemo:Lr,useReducer:Lr,useRef:Lr,useState:Lr,useDebugValue:Lr,useDeferredValue:Lr,useTransition:Lr,useMutableSource:Lr,useSyncExternalStore:Lr,useId:Lr,unstable_isNewReconciler:!1},xV={readContext:ca,useCallback:function(c,d){return Ci().memoizedState=[c,d===void 0?null:d],c},useContext:ca,useEffect:x2,useImperativeHandle:function(c,d,v){return v=v!=null?v.concat([c]):null,kv(4194308,4,E2.bind(null,d,c),v)},useLayoutEffect:function(c,d){return kv(4194308,4,c,d)},useInsertionEffect:function(c,d){return kv(4,2,c,d)},useMemo:function(c,d){var v=Ci();return d=d===void 0?null:d,c=c(),v.memoizedState=[c,d],c},useReducer:function(c,d,v){var T=Ci();return d=v!==void 0?v(d):d,T.memoizedState=T.baseState=d,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:d},T.queue=c,c=c.dispatch=SV.bind(null,Mn,c),[T.memoizedState,c]},useRef:function(c){var d=Ci();return c={current:c},d.memoizedState=c},useState:S2,useDebugValue:MT,useDeferredValue:function(c){return Ci().memoizedState=c},useTransition:function(){var c=S2(!1),d=c[0];return c=wV.bind(null,c[1]),Ci().memoizedState=c,[d,c]},useMutableSource:function(){},useSyncExternalStore:function(c,d,v){var T=Mn,N=Ci();if(Tn){if(v===void 0)throw Error(n(407));v=v()}else{if(v=d(),ar===null)throw Error(n(349));kc&30||g2(T,d,v)}N.memoizedState=v;var L={value:v,getSnapshot:d};return N.queue=L,x2(y2.bind(null,T,L,c),[c]),T.flags|=2048,Ph(9,v2.bind(null,T,L,v,d),void 0,null),v},useId:function(){var c=Ci(),d=ar.identifierPrefix;if(Tn){var v=gs,T=ms;v=(T&~(1<<32-qn(T)-1)).toString(32)+v,d=":"+d+"R"+v,v=Nh++,0<v&&(d+="H"+v.toString(32)),d+=":"}else v=bV++,d=":"+d+"r"+v.toString(32)+":";return c.memoizedState=d},unstable_isNewReconciler:!1},IV={readContext:ca,useCallback:M2,useContext:ca,useEffect:CT,useImperativeHandle:C2,useInsertionEffect:I2,useLayoutEffect:k2,useMemo:D2,useReducer:kT,useRef:T2,useState:function(){return kT(Oh)},useDebugValue:MT,useDeferredValue:function(c){var d=ua();return A2(d,$n.memoizedState,c)},useTransition:function(){var c=kT(Oh)[0],d=ua().memoizedState;return[c,d]},useMutableSource:p2,useSyncExternalStore:m2,useId:N2,unstable_isNewReconciler:!1},kV={readContext:ca,useCallback:M2,useContext:ca,useEffect:CT,useImperativeHandle:C2,useInsertionEffect:I2,useLayoutEffect:k2,useMemo:D2,useReducer:ET,useRef:T2,useState:function(){return ET(Oh)},useDebugValue:MT,useDeferredValue:function(c){var d=ua();return $n===null?d.memoizedState=c:A2(d,$n.memoizedState,c)},useTransition:function(){var c=ET(Oh)[0],d=ua().memoizedState;return[c,d]},useMutableSource:p2,useSyncExternalStore:m2,useId:N2,unstable_isNewReconciler:!1};function od(c,d){try{var v="",T=d;do v+=he(T),T=T.return;while(T);var N=v}catch(L){N=`
Error generating stack: `+L.message+`
`+L.stack}return{value:c,source:d,stack:N,digest:null}}function DT(c,d,v){return{value:c,source:null,stack:v??null,digest:d??null}}function AT(c,d){try{console.error(d.value)}catch(v){setTimeout(function(){throw v})}}var EV=typeof WeakMap=="function"?WeakMap:Map;function L2(c,d,v){v=ys(-1,v),v.tag=3,v.payload={element:null};var T=d.value;return v.callback=function(){jv||(jv=!0,WT=T),AT(c,d)},v}function R2(c,d,v){v=ys(-1,v),v.tag=3;var T=c.type.getDerivedStateFromError;if(typeof T=="function"){var N=d.value;v.payload=function(){return T(N)},v.callback=function(){AT(c,d)}}var L=c.stateNode;return L!==null&&typeof L.componentDidCatch=="function"&&(v.callback=function(){AT(c,d),typeof T!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var q=d.stack;this.componentDidCatch(d.value,{componentStack:q!==null?q:""})}),v}function F2(c,d,v){var T=c.pingCache;if(T===null){T=c.pingCache=new EV;var N=new Set;T.set(d,N)}else N=T.get(d),N===void 0&&(N=new Set,T.set(d,N));N.has(v)||(N.add(v),c=_V.bind(null,c,d,v),d.then(c,c))}function H2(c){do{var d;if((d=c.tag===13)&&(d=c.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return c;c=c.return}while(c!==null);return null}function B2(c,d,v,T,N){return c.mode&1?(c.flags|=65536,c.lanes=N,c):(c===d?c.flags|=65536:(c.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(d=ys(-1,1),d.tag=2,wl(v,d,1))),v.lanes|=1),c)}var CV=C.ReactCurrentOwner,bo=!1;function Jr(c,d,v,T){d.child=c===null?f2(d,null,v,T):nd(d,c.child,v,T)}function _2(c,d,v,T,N){v=v.render;var L=d.ref;return td(d,N),T=xT(c,d,v,T,L,N),v=IT(),c!==null&&!bo?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~N,bs(c,d,N)):(Tn&&v&&oT(d),d.flags|=1,Jr(c,d,T,N),d.child)}function Y2(c,d,v,T,N){if(c===null){var L=v.type;return typeof L=="function"&&!XT(L)&&L.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(d.tag=15,d.type=L,z2(c,d,L,T,N)):(c=_v(v.type,null,T,d,d.mode,N),c.ref=d.ref,c.return=d,d.child=c)}if(L=c.child,!(c.lanes&N)){var q=L.memoizedProps;if(v=v.compare,v=v!==null?v:bh,v(q,T)&&c.ref===d.ref)return bs(c,d,N)}return d.flags|=1,c=El(L,T),c.ref=d.ref,c.return=d,d.child=c}function z2(c,d,v,T,N){if(c!==null){var L=c.memoizedProps;if(bh(L,T)&&c.ref===d.ref)if(bo=!1,d.pendingProps=T=L,(c.lanes&N)!==0)c.flags&131072&&(bo=!0);else return d.lanes=c.lanes,bs(c,d,N)}return NT(c,d,v,T,N)}function U2(c,d,v){var T=d.pendingProps,N=T.children,L=c!==null?c.memoizedState:null;if(T.mode==="hidden")if(!(d.mode&1))d.memoizedState={baseLanes:0,cachePool:null,transitions:null},dn(id,_o),_o|=v;else{if(!(v&1073741824))return c=L!==null?L.baseLanes|v:v,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:c,cachePool:null,transitions:null},d.updateQueue=null,dn(id,_o),_o|=c,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},T=L!==null?L.baseLanes:v,dn(id,_o),_o|=T}else L!==null?(T=L.baseLanes|v,d.memoizedState=null):T=v,dn(id,_o),_o|=T;return Jr(c,d,N,v),d.child}function V2(c,d){var v=d.ref;(c===null&&v!==null||c!==null&&c.ref!==v)&&(d.flags|=512,d.flags|=2097152)}function NT(c,d,v,T,N){var L=yo(v)?wc:jr.current;return L=Ku(d,L),td(d,N),v=xT(c,d,v,T,L,N),T=IT(),c!==null&&!bo?(d.updateQueue=c.updateQueue,d.flags&=-2053,c.lanes&=~N,bs(c,d,N)):(Tn&&T&&oT(d),d.flags|=1,Jr(c,d,v,N),d.child)}function W2(c,d,v,T,N){if(yo(v)){var L=!0;dv(d)}else L=!1;if(td(d,N),d.stateNode===null)Dv(c,d),l2(d,v,T),gT(d,v,T,N),T=!0;else if(c===null){var q=d.stateNode,ae=d.memoizedProps;q.props=ae;var se=q.context,xe=v.contextType;typeof xe=="object"&&xe!==null?xe=ca(xe):(xe=yo(v)?wc:jr.current,xe=Ku(d,xe));var Re=v.getDerivedStateFromProps,He=typeof Re=="function"||typeof q.getSnapshotBeforeUpdate=="function";He||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(ae!==T||se!==xe)&&c2(d,q,T,xe),bl=!1;var Le=d.memoizedState;q.state=Le,bv(d,T,q,N),se=d.memoizedState,ae!==T||Le!==se||vo.current||bl?(typeof Re=="function"&&(mT(d,v,Re,T),se=d.memoizedState),(ae=bl||s2(d,v,ae,T,Le,se,xe))?(He||typeof q.UNSAFE_componentWillMount!="function"&&typeof q.componentWillMount!="function"||(typeof q.componentWillMount=="function"&&q.componentWillMount(),typeof q.UNSAFE_componentWillMount=="function"&&q.UNSAFE_componentWillMount()),typeof q.componentDidMount=="function"&&(d.flags|=4194308)):(typeof q.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=T,d.memoizedState=se),q.props=T,q.state=se,q.context=xe,T=ae):(typeof q.componentDidMount=="function"&&(d.flags|=4194308),T=!1)}else{q=d.stateNode,r2(c,d),ae=d.memoizedProps,xe=d.type===d.elementType?ae:_a(d.type,ae),q.props=xe,He=d.pendingProps,Le=q.context,se=v.contextType,typeof se=="object"&&se!==null?se=ca(se):(se=yo(v)?wc:jr.current,se=Ku(d,se));var Je=v.getDerivedStateFromProps;(Re=typeof Je=="function"||typeof q.getSnapshotBeforeUpdate=="function")||typeof q.UNSAFE_componentWillReceiveProps!="function"&&typeof q.componentWillReceiveProps!="function"||(ae!==He||Le!==se)&&c2(d,q,T,se),bl=!1,Le=d.memoizedState,q.state=Le,bv(d,T,q,N);var nt=d.memoizedState;ae!==He||Le!==nt||vo.current||bl?(typeof Je=="function"&&(mT(d,v,Je,T),nt=d.memoizedState),(xe=bl||s2(d,v,xe,T,Le,nt,se)||!1)?(Re||typeof q.UNSAFE_componentWillUpdate!="function"&&typeof q.componentWillUpdate!="function"||(typeof q.componentWillUpdate=="function"&&q.componentWillUpdate(T,nt,se),typeof q.UNSAFE_componentWillUpdate=="function"&&q.UNSAFE_componentWillUpdate(T,nt,se)),typeof q.componentDidUpdate=="function"&&(d.flags|=4),typeof q.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof q.componentDidUpdate!="function"||ae===c.memoizedProps&&Le===c.memoizedState||(d.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||ae===c.memoizedProps&&Le===c.memoizedState||(d.flags|=1024),d.memoizedProps=T,d.memoizedState=nt),q.props=T,q.state=nt,q.context=se,T=xe):(typeof q.componentDidUpdate!="function"||ae===c.memoizedProps&&Le===c.memoizedState||(d.flags|=4),typeof q.getSnapshotBeforeUpdate!="function"||ae===c.memoizedProps&&Le===c.memoizedState||(d.flags|=1024),T=!1)}return OT(c,d,v,T,L,N)}function OT(c,d,v,T,N,L){V2(c,d);var q=(d.flags&128)!==0;if(!T&&!q)return N&&$A(d,v,!1),bs(c,d,L);T=d.stateNode,CV.current=d;var ae=q&&typeof v.getDerivedStateFromError!="function"?null:T.render();return d.flags|=1,c!==null&&q?(d.child=nd(d,c.child,null,L),d.child=nd(d,null,ae,L)):Jr(c,d,ae,L),d.memoizedState=T.state,N&&$A(d,v,!0),d.child}function G2(c){var d=c.stateNode;d.pendingContext?ZA(c,d.pendingContext,d.pendingContext!==d.context):d.context&&ZA(c,d.context,!1),vT(c,d.containerInfo)}function Z2(c,d,v,T,N){return Qu(),lT(N),d.flags|=256,Jr(c,d,v,T),d.child}var PT={dehydrated:null,treeContext:null,retryLane:0};function jT(c){return{baseLanes:c,cachePool:null,transitions:null}}function q2(c,d,v){var T=d.pendingProps,N=Cn.current,L=!1,q=(d.flags&128)!==0,ae;if((ae=q)||(ae=c!==null&&c.memoizedState===null?!1:(N&2)!==0),ae?(L=!0,d.flags&=-129):(c===null||c.memoizedState!==null)&&(N|=1),dn(Cn,N&1),c===null)return sT(d),c=d.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(d.mode&1?c.data==="$!"?d.lanes=8:d.lanes=1073741824:d.lanes=1,null):(q=T.children,c=T.fallback,L?(T=d.mode,L=d.child,q={mode:"hidden",children:q},!(T&1)&&L!==null?(L.childLanes=0,L.pendingProps=q):L=Yv(q,T,0,null),c=Ac(c,T,v,null),L.return=d,c.return=d,L.sibling=c,d.child=L,d.child.memoizedState=jT(v),d.memoizedState=PT,c):LT(d,q));if(N=c.memoizedState,N!==null&&(ae=N.dehydrated,ae!==null))return MV(c,d,q,T,ae,N,v);if(L){L=T.fallback,q=d.mode,N=c.child,ae=N.sibling;var se={mode:"hidden",children:T.children};return!(q&1)&&d.child!==N?(T=d.child,T.childLanes=0,T.pendingProps=se,d.deletions=null):(T=El(N,se),T.subtreeFlags=N.subtreeFlags&14680064),ae!==null?L=El(ae,L):(L=Ac(L,q,v,null),L.flags|=2),L.return=d,T.return=d,T.sibling=L,d.child=T,T=L,L=d.child,q=c.child.memoizedState,q=q===null?jT(v):{baseLanes:q.baseLanes|v,cachePool:null,transitions:q.transitions},L.memoizedState=q,L.childLanes=c.childLanes&~v,d.memoizedState=PT,T}return L=c.child,c=L.sibling,T=El(L,{mode:"visible",children:T.children}),!(d.mode&1)&&(T.lanes=v),T.return=d,T.sibling=null,c!==null&&(v=d.deletions,v===null?(d.deletions=[c],d.flags|=16):v.push(c)),d.child=T,d.memoizedState=null,T}function LT(c,d){return d=Yv({mode:"visible",children:d},c.mode,0,null),d.return=c,c.child=d}function Mv(c,d,v,T){return T!==null&&lT(T),nd(d,c.child,null,v),c=LT(d,d.pendingProps.children),c.flags|=2,d.memoizedState=null,c}function MV(c,d,v,T,N,L,q){if(v)return d.flags&256?(d.flags&=-257,T=DT(Error(n(422))),Mv(c,d,q,T)):d.memoizedState!==null?(d.child=c.child,d.flags|=128,null):(L=T.fallback,N=d.mode,T=Yv({mode:"visible",children:T.children},N,0,null),L=Ac(L,N,q,null),L.flags|=2,T.return=d,L.return=d,T.sibling=L,d.child=T,d.mode&1&&nd(d,c.child,null,q),d.child.memoizedState=jT(q),d.memoizedState=PT,L);if(!(d.mode&1))return Mv(c,d,q,null);if(N.data==="$!"){if(T=N.nextSibling&&N.nextSibling.dataset,T)var ae=T.dgst;return T=ae,L=Error(n(419)),T=DT(L,T,void 0),Mv(c,d,q,T)}if(ae=(q&c.childLanes)!==0,bo||ae){if(T=ar,T!==null){switch(q&-q){case 4:N=2;break;case 16:N=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:N=32;break;case 536870912:N=268435456;break;default:N=0}N=N&(T.suspendedLanes|q)?0:N,N!==0&&N!==L.retryLane&&(L.retryLane=N,vs(c,N),Ua(T,c,N,-1))}return JT(),T=DT(Error(n(421))),Mv(c,d,q,T)}return N.data==="$?"?(d.flags|=128,d.child=c.child,d=YV.bind(null,c),N._reactRetry=d,null):(c=L.treeContext,Bo=ml(N.nextSibling),Ho=d,Tn=!0,Ba=null,c!==null&&(sa[la++]=ms,sa[la++]=gs,sa[la++]=Sc,ms=c.id,gs=c.overflow,Sc=d),d=LT(d,T.children),d.flags|=4096,d)}function $2(c,d,v){c.lanes|=d;var T=c.alternate;T!==null&&(T.lanes|=d),fT(c.return,d,v)}function RT(c,d,v,T,N){var L=c.memoizedState;L===null?c.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:T,tail:v,tailMode:N}:(L.isBackwards=d,L.rendering=null,L.renderingStartTime=0,L.last=T,L.tail=v,L.tailMode=N)}function K2(c,d,v){var T=d.pendingProps,N=T.revealOrder,L=T.tail;if(Jr(c,d,T.children,v),T=Cn.current,T&2)T=T&1|2,d.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=d.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&$2(c,v,d);else if(c.tag===19)$2(c,v,d);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===d)break e;for(;c.sibling===null;){if(c.return===null||c.return===d)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}T&=1}if(dn(Cn,T),!(d.mode&1))d.memoizedState=null;else switch(N){case"forwards":for(v=d.child,N=null;v!==null;)c=v.alternate,c!==null&&Tv(c)===null&&(N=v),v=v.sibling;v=N,v===null?(N=d.child,d.child=null):(N=v.sibling,v.sibling=null),RT(d,!1,N,v,L);break;case"backwards":for(v=null,N=d.child,d.child=null;N!==null;){if(c=N.alternate,c!==null&&Tv(c)===null){d.child=N;break}c=N.sibling,N.sibling=v,v=N,N=c}RT(d,!0,v,null,L);break;case"together":RT(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function Dv(c,d){!(d.mode&1)&&c!==null&&(c.alternate=null,d.alternate=null,d.flags|=2)}function bs(c,d,v){if(c!==null&&(d.dependencies=c.dependencies),Ec|=d.lanes,!(v&d.childLanes))return null;if(c!==null&&d.child!==c.child)throw Error(n(153));if(d.child!==null){for(c=d.child,v=El(c,c.pendingProps),d.child=v,v.return=d;c.sibling!==null;)c=c.sibling,v=v.sibling=El(c,c.pendingProps),v.return=d;v.sibling=null}return d.child}function DV(c,d,v){switch(d.tag){case 3:G2(d),Qu();break;case 5:h2(d);break;case 1:yo(d.type)&&dv(d);break;case 4:vT(d,d.stateNode.containerInfo);break;case 10:var T=d.type._context,N=d.memoizedProps.value;dn(gv,T._currentValue),T._currentValue=N;break;case 13:if(T=d.memoizedState,T!==null)return T.dehydrated!==null?(dn(Cn,Cn.current&1),d.flags|=128,null):v&d.child.childLanes?q2(c,d,v):(dn(Cn,Cn.current&1),c=bs(c,d,v),c!==null?c.sibling:null);dn(Cn,Cn.current&1);break;case 19:if(T=(v&d.childLanes)!==0,c.flags&128){if(T)return K2(c,d,v);d.flags|=128}if(N=d.memoizedState,N!==null&&(N.rendering=null,N.tail=null,N.lastEffect=null),dn(Cn,Cn.current),T)break;return null;case 22:case 23:return d.lanes=0,U2(c,d,v)}return bs(c,d,v)}var J2,FT,X2,Q2;J2=function(c,d){for(var v=d.child;v!==null;){if(v.tag===5||v.tag===6)c.appendChild(v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===d)break;for(;v.sibling===null;){if(v.return===null||v.return===d)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},FT=function(){},X2=function(c,d,v,T){var N=c.memoizedProps;if(N!==T){c=d.stateNode,Ic(Ei.current);var L=null;switch(v){case"input":N=ce(c,N),T=ce(c,T),L=[];break;case"select":N=G({},N,{value:void 0}),T=G({},T,{value:void 0}),L=[];break;case"textarea":N=Ot(c,N),T=Ot(c,T),L=[];break;default:typeof N.onClick!="function"&&typeof T.onClick=="function"&&(c.onclick=lv)}Zn(v,T);var q;v=null;for(xe in N)if(!T.hasOwnProperty(xe)&&N.hasOwnProperty(xe)&&N[xe]!=null)if(xe==="style"){var ae=N[xe];for(q in ae)ae.hasOwnProperty(q)&&(v||(v={}),v[q]="")}else xe!=="dangerouslySetInnerHTML"&&xe!=="children"&&xe!=="suppressContentEditableWarning"&&xe!=="suppressHydrationWarning"&&xe!=="autoFocus"&&(o.hasOwnProperty(xe)?L||(L=[]):(L=L||[]).push(xe,null));for(xe in T){var se=T[xe];if(ae=N?.[xe],T.hasOwnProperty(xe)&&se!==ae&&(se!=null||ae!=null))if(xe==="style")if(ae){for(q in ae)!ae.hasOwnProperty(q)||se&&se.hasOwnProperty(q)||(v||(v={}),v[q]="");for(q in se)se.hasOwnProperty(q)&&ae[q]!==se[q]&&(v||(v={}),v[q]=se[q])}else v||(L||(L=[]),L.push(xe,v)),v=se;else xe==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,ae=ae?ae.__html:void 0,se!=null&&ae!==se&&(L=L||[]).push(xe,se)):xe==="children"?typeof se!="string"&&typeof se!="number"||(L=L||[]).push(xe,""+se):xe!=="suppressContentEditableWarning"&&xe!=="suppressHydrationWarning"&&(o.hasOwnProperty(xe)?(se!=null&&xe==="onScroll"&&gn("scroll",c),L||ae===se||(L=[])):(L=L||[]).push(xe,se))}v&&(L=L||[]).push("style",v);var xe=L;(d.updateQueue=xe)&&(d.flags|=4)}},Q2=function(c,d,v,T){v!==T&&(d.flags|=4)};function jh(c,d){if(!Tn)switch(c.tailMode){case"hidden":d=c.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?c.tail=null:v.sibling=null;break;case"collapsed":v=c.tail;for(var T=null;v!==null;)v.alternate!==null&&(T=v),v=v.sibling;T===null?d||c.tail===null?c.tail=null:c.tail.sibling=null:T.sibling=null}}function Rr(c){var d=c.alternate!==null&&c.alternate.child===c.child,v=0,T=0;if(d)for(var N=c.child;N!==null;)v|=N.lanes|N.childLanes,T|=N.subtreeFlags&14680064,T|=N.flags&14680064,N.return=c,N=N.sibling;else for(N=c.child;N!==null;)v|=N.lanes|N.childLanes,T|=N.subtreeFlags,T|=N.flags,N.return=c,N=N.sibling;return c.subtreeFlags|=T,c.childLanes=v,d}function AV(c,d,v){var T=d.pendingProps;switch(aT(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rr(d),null;case 1:return yo(d.type)&&uv(),Rr(d),null;case 3:return T=d.stateNode,rd(),vn(vo),vn(jr),wT(),T.pendingContext&&(T.context=T.pendingContext,T.pendingContext=null),(c===null||c.child===null)&&(mv(d)?d.flags|=4:c===null||c.memoizedState.isDehydrated&&!(d.flags&256)||(d.flags|=1024,Ba!==null&&(qT(Ba),Ba=null))),FT(c,d),Rr(d),null;case 5:yT(d);var N=Ic(Dh.current);if(v=d.type,c!==null&&d.stateNode!=null)X2(c,d,v,T,N),c.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!T){if(d.stateNode===null)throw Error(n(166));return Rr(d),null}if(c=Ic(Ei.current),mv(d)){T=d.stateNode,v=d.type;var L=d.memoizedProps;switch(T[ki]=d,T[Ih]=L,c=(d.mode&1)!==0,v){case"dialog":gn("cancel",T),gn("close",T);break;case"iframe":case"object":case"embed":gn("load",T);break;case"video":case"audio":for(N=0;N<Sh.length;N++)gn(Sh[N],T);break;case"source":gn("error",T);break;case"img":case"image":case"link":gn("error",T),gn("load",T);break;case"details":gn("toggle",T);break;case"input":Pe(T,L),gn("invalid",T);break;case"select":T._wrapperState={wasMultiple:!!L.multiple},gn("invalid",T);break;case"textarea":Wt(T,L),gn("invalid",T)}Zn(v,L),N=null;for(var q in L)if(L.hasOwnProperty(q)){var ae=L[q];q==="children"?typeof ae=="string"?T.textContent!==ae&&(L.suppressHydrationWarning!==!0&&sv(T.textContent,ae,c),N=["children",ae]):typeof ae=="number"&&T.textContent!==""+ae&&(L.suppressHydrationWarning!==!0&&sv(T.textContent,ae,c),N=["children",""+ae]):o.hasOwnProperty(q)&&ae!=null&&q==="onScroll"&&gn("scroll",T)}switch(v){case"input":We(T),tt(T,L,!0);break;case"textarea":We(T),mn(T);break;case"select":case"option":break;default:typeof L.onClick=="function"&&(T.onclick=lv)}T=N,d.updateQueue=T,T!==null&&(d.flags|=4)}else{q=N.nodeType===9?N:N.ownerDocument,c==="http://www.w3.org/1999/xhtml"&&(c=Fn(v)),c==="http://www.w3.org/1999/xhtml"?v==="script"?(c=q.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild)):typeof T.is=="string"?c=q.createElement(v,{is:T.is}):(c=q.createElement(v),v==="select"&&(q=c,T.multiple?q.multiple=!0:T.size&&(q.size=T.size))):c=q.createElementNS(c,v),c[ki]=d,c[Ih]=T,J2(c,d,!1,!1),d.stateNode=c;e:{switch(q=qr(v,T),v){case"dialog":gn("cancel",c),gn("close",c),N=T;break;case"iframe":case"object":case"embed":gn("load",c),N=T;break;case"video":case"audio":for(N=0;N<Sh.length;N++)gn(Sh[N],c);N=T;break;case"source":gn("error",c),N=T;break;case"img":case"image":case"link":gn("error",c),gn("load",c),N=T;break;case"details":gn("toggle",c),N=T;break;case"input":Pe(c,T),N=ce(c,T),gn("invalid",c);break;case"option":N=T;break;case"select":c._wrapperState={wasMultiple:!!T.multiple},N=G({},T,{value:void 0}),gn("invalid",c);break;case"textarea":Wt(c,T),N=Ot(c,T),gn("invalid",c);break;default:N=T}Zn(v,N),ae=N;for(L in ae)if(ae.hasOwnProperty(L)){var se=ae[L];L==="style"?Aa(c,se):L==="dangerouslySetInnerHTML"?(se=se?se.__html:void 0,se!=null&&Tt(c,se)):L==="children"?typeof se=="string"?(v!=="textarea"||se!=="")&&Et(c,se):typeof se=="number"&&Et(c,""+se):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(o.hasOwnProperty(L)?se!=null&&L==="onScroll"&&gn("scroll",c):se!=null&&E(c,L,se,q))}switch(v){case"input":We(c),tt(c,T,!1);break;case"textarea":We(c),mn(c);break;case"option":T.value!=null&&c.setAttribute("value",""+Ae(T.value));break;case"select":c.multiple=!!T.multiple,L=T.value,L!=null?wt(c,!!T.multiple,L,!1):T.defaultValue!=null&&wt(c,!!T.multiple,T.defaultValue,!0);break;default:typeof N.onClick=="function"&&(c.onclick=lv)}switch(v){case"button":case"input":case"select":case"textarea":T=!!T.autoFocus;break e;case"img":T=!0;break e;default:T=!1}}T&&(d.flags|=4)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return Rr(d),null;case 6:if(c&&d.stateNode!=null)Q2(c,d,c.memoizedProps,T);else{if(typeof T!="string"&&d.stateNode===null)throw Error(n(166));if(v=Ic(Dh.current),Ic(Ei.current),mv(d)){if(T=d.stateNode,v=d.memoizedProps,T[ki]=d,(L=T.nodeValue!==v)&&(c=Ho,c!==null))switch(c.tag){case 3:sv(T.nodeValue,v,(c.mode&1)!==0);break;case 5:c.memoizedProps.suppressHydrationWarning!==!0&&sv(T.nodeValue,v,(c.mode&1)!==0)}L&&(d.flags|=4)}else T=(v.nodeType===9?v:v.ownerDocument).createTextNode(T),T[ki]=d,d.stateNode=T}return Rr(d),null;case 13:if(vn(Cn),T=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(Tn&&Bo!==null&&d.mode&1&&!(d.flags&128))t2(),Qu(),d.flags|=98560,L=!1;else if(L=mv(d),T!==null&&T.dehydrated!==null){if(c===null){if(!L)throw Error(n(318));if(L=d.memoizedState,L=L!==null?L.dehydrated:null,!L)throw Error(n(317));L[ki]=d}else Qu(),!(d.flags&128)&&(d.memoizedState=null),d.flags|=4;Rr(d),L=!1}else Ba!==null&&(qT(Ba),Ba=null),L=!0;if(!L)return d.flags&65536?d:null}return d.flags&128?(d.lanes=v,d):(T=T!==null,T!==(c!==null&&c.memoizedState!==null)&&T&&(d.child.flags|=8192,d.mode&1&&(c===null||Cn.current&1?Kn===0&&(Kn=3):JT())),d.updateQueue!==null&&(d.flags|=4),Rr(d),null);case 4:return rd(),FT(c,d),c===null&&Th(d.stateNode.containerInfo),Rr(d),null;case 10:return dT(d.type._context),Rr(d),null;case 17:return yo(d.type)&&uv(),Rr(d),null;case 19:if(vn(Cn),L=d.memoizedState,L===null)return Rr(d),null;if(T=(d.flags&128)!==0,q=L.rendering,q===null)if(T)jh(L,!1);else{if(Kn!==0||c!==null&&c.flags&128)for(c=d.child;c!==null;){if(q=Tv(c),q!==null){for(d.flags|=128,jh(L,!1),T=q.updateQueue,T!==null&&(d.updateQueue=T,d.flags|=4),d.subtreeFlags=0,T=v,v=d.child;v!==null;)L=v,c=T,L.flags&=14680066,q=L.alternate,q===null?(L.childLanes=0,L.lanes=c,L.child=null,L.subtreeFlags=0,L.memoizedProps=null,L.memoizedState=null,L.updateQueue=null,L.dependencies=null,L.stateNode=null):(L.childLanes=q.childLanes,L.lanes=q.lanes,L.child=q.child,L.subtreeFlags=0,L.deletions=null,L.memoizedProps=q.memoizedProps,L.memoizedState=q.memoizedState,L.updateQueue=q.updateQueue,L.type=q.type,c=q.dependencies,L.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),v=v.sibling;return dn(Cn,Cn.current&1|2),d.child}c=c.sibling}L.tail!==null&&sn()>sd&&(d.flags|=128,T=!0,jh(L,!1),d.lanes=4194304)}else{if(!T)if(c=Tv(q),c!==null){if(d.flags|=128,T=!0,v=c.updateQueue,v!==null&&(d.updateQueue=v,d.flags|=4),jh(L,!0),L.tail===null&&L.tailMode==="hidden"&&!q.alternate&&!Tn)return Rr(d),null}else 2*sn()-L.renderingStartTime>sd&&v!==1073741824&&(d.flags|=128,T=!0,jh(L,!1),d.lanes=4194304);L.isBackwards?(q.sibling=d.child,d.child=q):(v=L.last,v!==null?v.sibling=q:d.child=q,L.last=q)}return L.tail!==null?(d=L.tail,L.rendering=d,L.tail=d.sibling,L.renderingStartTime=sn(),d.sibling=null,v=Cn.current,dn(Cn,T?v&1|2:v&1),d):(Rr(d),null);case 22:case 23:return KT(),T=d.memoizedState!==null,c!==null&&c.memoizedState!==null!==T&&(d.flags|=8192),T&&d.mode&1?_o&1073741824&&(Rr(d),d.subtreeFlags&6&&(d.flags|=8192)):Rr(d),null;case 24:return null;case 25:return null}throw Error(n(156,d.tag))}function NV(c,d){switch(aT(d),d.tag){case 1:return yo(d.type)&&uv(),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return rd(),vn(vo),vn(jr),wT(),c=d.flags,c&65536&&!(c&128)?(d.flags=c&-65537|128,d):null;case 5:return yT(d),null;case 13:if(vn(Cn),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(n(340));Qu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return vn(Cn),null;case 4:return rd(),null;case 10:return dT(d.type._context),null;case 22:case 23:return KT(),null;case 24:return null;default:return null}}var Av=!1,Fr=!1,OV=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function ad(c,d){var v=c.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(T){Pn(c,d,T)}else v.current=null}function HT(c,d,v){try{v()}catch(T){Pn(c,d,T)}}var eN=!1;function PV(c,d){if(KS=Fo,c=NA(),zS(c)){if("selectionStart"in c)var v={start:c.selectionStart,end:c.selectionEnd};else e:{v=(v=c.ownerDocument)&&v.defaultView||window;var T=v.getSelection&&v.getSelection();if(T&&T.rangeCount!==0){v=T.anchorNode;var N=T.anchorOffset,L=T.focusNode;T=T.focusOffset;try{v.nodeType,L.nodeType}catch{v=null;break e}var q=0,ae=-1,se=-1,xe=0,Re=0,He=c,Le=null;t:for(;;){for(var Je;He!==v||N!==0&&He.nodeType!==3||(ae=q+N),He!==L||T!==0&&He.nodeType!==3||(se=q+T),He.nodeType===3&&(q+=He.nodeValue.length),(Je=He.firstChild)!==null;)Le=He,He=Je;for(;;){if(He===c)break t;if(Le===v&&++xe===N&&(ae=q),Le===L&&++Re===T&&(se=q),(Je=He.nextSibling)!==null)break;He=Le,Le=He.parentNode}He=Je}v=ae===-1||se===-1?null:{start:ae,end:se}}else v=null}v=v||{start:0,end:0}}else v=null;for(JS={focusedElem:c,selectionRange:v},Fo=!1,Qe=d;Qe!==null;)if(d=Qe,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,Qe=c;else for(;Qe!==null;){d=Qe;try{var nt=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(nt!==null){var rt=nt.memoizedProps,Bn=nt.memoizedState,me=d.stateNode,ue=me.getSnapshotBeforeUpdate(d.elementType===d.type?rt:_a(d.type,rt),Bn);me.__reactInternalSnapshotBeforeUpdate=ue}break;case 3:var ye=d.stateNode.containerInfo;ye.nodeType===1?ye.textContent="":ye.nodeType===9&&ye.documentElement&&ye.removeChild(ye.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ze){Pn(d,d.return,ze)}if(c=d.sibling,c!==null){c.return=d.return,Qe=c;break}Qe=d.return}return nt=eN,eN=!1,nt}function Lh(c,d,v){var T=d.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var N=T=T.next;do{if((N.tag&c)===c){var L=N.destroy;N.destroy=void 0,L!==void 0&&HT(d,v,L)}N=N.next}while(N!==T)}}function Nv(c,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var v=d=d.next;do{if((v.tag&c)===c){var T=v.create;v.destroy=T()}v=v.next}while(v!==d)}}function BT(c){var d=c.ref;if(d!==null){var v=c.stateNode;switch(c.tag){case 5:c=v;break;default:c=v}typeof d=="function"?d(c):d.current=c}}function tN(c){var d=c.alternate;d!==null&&(c.alternate=null,tN(d)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(d=c.stateNode,d!==null&&(delete d[ki],delete d[Ih],delete d[tT],delete d[mV],delete d[gV])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function nN(c){return c.tag===5||c.tag===3||c.tag===4}function rN(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||nN(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function _T(c,d,v){var T=c.tag;if(T===5||T===6)c=c.stateNode,d?v.nodeType===8?v.parentNode.insertBefore(c,d):v.insertBefore(c,d):(v.nodeType===8?(d=v.parentNode,d.insertBefore(c,v)):(d=v,d.appendChild(c)),v=v._reactRootContainer,v!=null||d.onclick!==null||(d.onclick=lv));else if(T!==4&&(c=c.child,c!==null))for(_T(c,d,v),c=c.sibling;c!==null;)_T(c,d,v),c=c.sibling}function YT(c,d,v){var T=c.tag;if(T===5||T===6)c=c.stateNode,d?v.insertBefore(c,d):v.appendChild(c);else if(T!==4&&(c=c.child,c!==null))for(YT(c,d,v),c=c.sibling;c!==null;)YT(c,d,v),c=c.sibling}var br=null,Ya=!1;function Sl(c,d,v){for(v=v.child;v!==null;)oN(c,d,v),v=v.sibling}function oN(c,d,v){if($r&&typeof $r.onCommitFiberUnmount=="function")try{$r.onCommitFiberUnmount(Lo,v)}catch{}switch(v.tag){case 5:Fr||ad(v,d);case 6:var T=br,N=Ya;br=null,Sl(c,d,v),br=T,Ya=N,br!==null&&(Ya?(c=br,v=v.stateNode,c.nodeType===8?c.parentNode.removeChild(v):c.removeChild(v)):br.removeChild(v.stateNode));break;case 18:br!==null&&(Ya?(c=br,v=v.stateNode,c.nodeType===8?eT(c.parentNode,v):c.nodeType===1&&eT(c,v),Ti(c)):eT(br,v.stateNode));break;case 4:T=br,N=Ya,br=v.stateNode.containerInfo,Ya=!0,Sl(c,d,v),br=T,Ya=N;break;case 0:case 11:case 14:case 15:if(!Fr&&(T=v.updateQueue,T!==null&&(T=T.lastEffect,T!==null))){N=T=T.next;do{var L=N,q=L.destroy;L=L.tag,q!==void 0&&(L&2||L&4)&&HT(v,d,q),N=N.next}while(N!==T)}Sl(c,d,v);break;case 1:if(!Fr&&(ad(v,d),T=v.stateNode,typeof T.componentWillUnmount=="function"))try{T.props=v.memoizedProps,T.state=v.memoizedState,T.componentWillUnmount()}catch(ae){Pn(v,d,ae)}Sl(c,d,v);break;case 21:Sl(c,d,v);break;case 22:v.mode&1?(Fr=(T=Fr)||v.memoizedState!==null,Sl(c,d,v),Fr=T):Sl(c,d,v);break;default:Sl(c,d,v)}}function aN(c){var d=c.updateQueue;if(d!==null){c.updateQueue=null;var v=c.stateNode;v===null&&(v=c.stateNode=new OV),d.forEach(function(T){var N=zV.bind(null,c,T);v.has(T)||(v.add(T),T.then(N,N))})}}function za(c,d){var v=d.deletions;if(v!==null)for(var T=0;T<v.length;T++){var N=v[T];try{var L=c,q=d,ae=q;e:for(;ae!==null;){switch(ae.tag){case 5:br=ae.stateNode,Ya=!1;break e;case 3:br=ae.stateNode.containerInfo,Ya=!0;break e;case 4:br=ae.stateNode.containerInfo,Ya=!0;break e}ae=ae.return}if(br===null)throw Error(n(160));oN(L,q,N),br=null,Ya=!1;var se=N.alternate;se!==null&&(se.return=null),N.return=null}catch(xe){Pn(N,d,xe)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)iN(d,c),d=d.sibling}function iN(c,d){var v=c.alternate,T=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:if(za(d,c),Mi(c),T&4){try{Lh(3,c,c.return),Nv(3,c)}catch(rt){Pn(c,c.return,rt)}try{Lh(5,c,c.return)}catch(rt){Pn(c,c.return,rt)}}break;case 1:za(d,c),Mi(c),T&512&&v!==null&&ad(v,v.return);break;case 5:if(za(d,c),Mi(c),T&512&&v!==null&&ad(v,v.return),c.flags&32){var N=c.stateNode;try{Et(N,"")}catch(rt){Pn(c,c.return,rt)}}if(T&4&&(N=c.stateNode,N!=null)){var L=c.memoizedProps,q=v!==null?v.memoizedProps:L,ae=c.type,se=c.updateQueue;if(c.updateQueue=null,se!==null)try{ae==="input"&&L.type==="radio"&&L.name!=null&&Oe(N,L),qr(ae,q);var xe=qr(ae,L);for(q=0;q<se.length;q+=2){var Re=se[q],He=se[q+1];Re==="style"?Aa(N,He):Re==="dangerouslySetInnerHTML"?Tt(N,He):Re==="children"?Et(N,He):E(N,Re,He,xe)}switch(ae){case"input":Ve(N,L);break;case"textarea":an(N,L);break;case"select":var Le=N._wrapperState.wasMultiple;N._wrapperState.wasMultiple=!!L.multiple;var Je=L.value;Je!=null?wt(N,!!L.multiple,Je,!1):Le!==!!L.multiple&&(L.defaultValue!=null?wt(N,!!L.multiple,L.defaultValue,!0):wt(N,!!L.multiple,L.multiple?[]:"",!1))}N[Ih]=L}catch(rt){Pn(c,c.return,rt)}}break;case 6:if(za(d,c),Mi(c),T&4){if(c.stateNode===null)throw Error(n(162));N=c.stateNode,L=c.memoizedProps;try{N.nodeValue=L}catch(rt){Pn(c,c.return,rt)}}break;case 3:if(za(d,c),Mi(c),T&4&&v!==null&&v.memoizedState.isDehydrated)try{Ti(d.containerInfo)}catch(rt){Pn(c,c.return,rt)}break;case 4:za(d,c),Mi(c);break;case 13:za(d,c),Mi(c),N=c.child,N.flags&8192&&(L=N.memoizedState!==null,N.stateNode.isHidden=L,!L||N.alternate!==null&&N.alternate.memoizedState!==null||(VT=sn())),T&4&&aN(c);break;case 22:if(Re=v!==null&&v.memoizedState!==null,c.mode&1?(Fr=(xe=Fr)||Re,za(d,c),Fr=xe):za(d,c),Mi(c),T&8192){if(xe=c.memoizedState!==null,(c.stateNode.isHidden=xe)&&!Re&&c.mode&1)for(Qe=c,Re=c.child;Re!==null;){for(He=Qe=Re;Qe!==null;){switch(Le=Qe,Je=Le.child,Le.tag){case 0:case 11:case 14:case 15:Lh(4,Le,Le.return);break;case 1:ad(Le,Le.return);var nt=Le.stateNode;if(typeof nt.componentWillUnmount=="function"){T=Le,v=Le.return;try{d=T,nt.props=d.memoizedProps,nt.state=d.memoizedState,nt.componentWillUnmount()}catch(rt){Pn(T,v,rt)}}break;case 5:ad(Le,Le.return);break;case 22:if(Le.memoizedState!==null){cN(He);continue}}Je!==null?(Je.return=Le,Qe=Je):cN(He)}Re=Re.sibling}e:for(Re=null,He=c;;){if(He.tag===5){if(Re===null){Re=He;try{N=He.stateNode,xe?(L=N.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none"):(ae=He.stateNode,se=He.memoizedProps.style,q=se!=null&&se.hasOwnProperty("display")?se.display:null,ae.style.display=gr("display",q))}catch(rt){Pn(c,c.return,rt)}}}else if(He.tag===6){if(Re===null)try{He.stateNode.nodeValue=xe?"":He.memoizedProps}catch(rt){Pn(c,c.return,rt)}}else if((He.tag!==22&&He.tag!==23||He.memoizedState===null||He===c)&&He.child!==null){He.child.return=He,He=He.child;continue}if(He===c)break e;for(;He.sibling===null;){if(He.return===null||He.return===c)break e;Re===He&&(Re=null),He=He.return}Re===He&&(Re=null),He.sibling.return=He.return,He=He.sibling}}break;case 19:za(d,c),Mi(c),T&4&&aN(c);break;case 21:break;default:za(d,c),Mi(c)}}function Mi(c){var d=c.flags;if(d&2){try{e:{for(var v=c.return;v!==null;){if(nN(v)){var T=v;break e}v=v.return}throw Error(n(160))}switch(T.tag){case 5:var N=T.stateNode;T.flags&32&&(Et(N,""),T.flags&=-33);var L=rN(c);YT(c,L,N);break;case 3:case 4:var q=T.stateNode.containerInfo,ae=rN(c);_T(c,ae,q);break;default:throw Error(n(161))}}catch(se){Pn(c,c.return,se)}c.flags&=-3}d&4096&&(c.flags&=-4097)}function jV(c,d,v){Qe=c,sN(c)}function sN(c,d,v){for(var T=(c.mode&1)!==0;Qe!==null;){var N=Qe,L=N.child;if(N.tag===22&&T){var q=N.memoizedState!==null||Av;if(!q){var ae=N.alternate,se=ae!==null&&ae.memoizedState!==null||Fr;ae=Av;var xe=Fr;if(Av=q,(Fr=se)&&!xe)for(Qe=N;Qe!==null;)q=Qe,se=q.child,q.tag===22&&q.memoizedState!==null?uN(N):se!==null?(se.return=q,Qe=se):uN(N);for(;L!==null;)Qe=L,sN(L),L=L.sibling;Qe=N,Av=ae,Fr=xe}lN(c)}else N.subtreeFlags&8772&&L!==null?(L.return=N,Qe=L):lN(c)}}function lN(c){for(;Qe!==null;){var d=Qe;if(d.flags&8772){var v=d.alternate;try{if(d.flags&8772)switch(d.tag){case 0:case 11:case 15:Fr||Nv(5,d);break;case 1:var T=d.stateNode;if(d.flags&4&&!Fr)if(v===null)T.componentDidMount();else{var N=d.elementType===d.type?v.memoizedProps:_a(d.type,v.memoizedProps);T.componentDidUpdate(N,v.memoizedState,T.__reactInternalSnapshotBeforeUpdate)}var L=d.updateQueue;L!==null&&a2(d,L,T);break;case 3:var q=d.updateQueue;if(q!==null){if(v=null,d.child!==null)switch(d.child.tag){case 5:v=d.child.stateNode;break;case 1:v=d.child.stateNode}a2(d,q,v)}break;case 5:var ae=d.stateNode;if(v===null&&d.flags&4){v=ae;var se=d.memoizedProps;switch(d.type){case"button":case"input":case"select":case"textarea":se.autoFocus&&v.focus();break;case"img":se.src&&(v.src=se.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(d.memoizedState===null){var xe=d.alternate;if(xe!==null){var Re=xe.memoizedState;if(Re!==null){var He=Re.dehydrated;He!==null&&Ti(He)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Fr||d.flags&512&&BT(d)}catch(Le){Pn(d,d.return,Le)}}if(d===c){Qe=null;break}if(v=d.sibling,v!==null){v.return=d.return,Qe=v;break}Qe=d.return}}function cN(c){for(;Qe!==null;){var d=Qe;if(d===c){Qe=null;break}var v=d.sibling;if(v!==null){v.return=d.return,Qe=v;break}Qe=d.return}}function uN(c){for(;Qe!==null;){var d=Qe;try{switch(d.tag){case 0:case 11:case 15:var v=d.return;try{Nv(4,d)}catch(se){Pn(d,v,se)}break;case 1:var T=d.stateNode;if(typeof T.componentDidMount=="function"){var N=d.return;try{T.componentDidMount()}catch(se){Pn(d,N,se)}}var L=d.return;try{BT(d)}catch(se){Pn(d,L,se)}break;case 5:var q=d.return;try{BT(d)}catch(se){Pn(d,q,se)}}}catch(se){Pn(d,d.return,se)}if(d===c){Qe=null;break}var ae=d.sibling;if(ae!==null){ae.return=d.return,Qe=ae;break}Qe=d.return}}var LV=Math.ceil,Ov=C.ReactCurrentDispatcher,zT=C.ReactCurrentOwner,da=C.ReactCurrentBatchConfig,Bt=0,ar=null,Un=null,wr=0,_o=0,id=gl(0),Kn=0,Rh=null,Ec=0,Pv=0,UT=0,Fh=null,wo=null,VT=0,sd=1/0,ws=null,jv=!1,WT=null,Tl=null,Lv=!1,xl=null,Rv=0,Hh=0,GT=null,Fv=-1,Hv=0;function Xr(){return Bt&6?sn():Fv!==-1?Fv:Fv=sn()}function Il(c){return c.mode&1?Bt&2&&wr!==0?wr&-wr:yV.transition!==null?(Hv===0&&(Hv=oe()),Hv):(c=$e,c!==0||(c=window.event,c=c===void 0?16:ch(c.type)),c):1}function Ua(c,d,v,T){if(50<Hh)throw Hh=0,GT=null,Error(n(185));pe(c,v,T),(!(Bt&2)||c!==ar)&&(c===ar&&(!(Bt&2)&&(Pv|=v),Kn===4&&kl(c,wr)),So(c,T),v===1&&Bt===0&&!(d.mode&1)&&(sd=sn()+500,fv&&yl()))}function So(c,d){var v=c.callbackNode;U(c,d);var T=bi(c,c===ar?wr:0);if(T===0)v!==null&&sc(v),c.callbackNode=null,c.callbackPriority=0;else if(d=T&-T,c.callbackPriority!==d){if(v!=null&&sc(v),d===1)c.tag===0?vV(fN.bind(null,c)):KA(fN.bind(null,c)),hV(function(){!(Bt&6)&&yl()}),v=null;else{switch(ht(T)){case 1:v=ll;break;case 4:v=cl;break;case 16:v=vi;break;case 536870912:v=Pa;break;default:v=vi}v=wN(v,dN.bind(null,c))}c.callbackPriority=d,c.callbackNode=v}}function dN(c,d){if(Fv=-1,Hv=0,Bt&6)throw Error(n(327));var v=c.callbackNode;if(ld()&&c.callbackNode!==v)return null;var T=bi(c,c===ar?wr:0);if(T===0)return null;if(T&30||T&c.expiredLanes||d)d=Bv(c,T);else{d=T;var N=Bt;Bt|=2;var L=pN();(ar!==c||wr!==d)&&(ws=null,sd=sn()+500,Mc(c,d));do try{HV();break}catch(ae){hN(c,ae)}while(!0);uT(),Ov.current=L,Bt=N,Un!==null?d=0:(ar=null,wr=0,d=Kn)}if(d!==0){if(d===2&&(N=J(c),N!==0&&(T=N,d=ZT(c,N))),d===1)throw v=Rh,Mc(c,0),kl(c,T),So(c,sn()),v;if(d===6)kl(c,T);else{if(N=c.current.alternate,!(T&30)&&!RV(N)&&(d=Bv(c,T),d===2&&(L=J(c),L!==0&&(T=L,d=ZT(c,L))),d===1))throw v=Rh,Mc(c,0),kl(c,T),So(c,sn()),v;switch(c.finishedWork=N,c.finishedLanes=T,d){case 0:case 1:throw Error(n(345));case 2:Dc(c,wo,ws);break;case 3:if(kl(c,T),(T&130023424)===T&&(d=VT+500-sn(),10<d)){if(bi(c,0)!==0)break;if(N=c.suspendedLanes,(N&T)!==T){Xr(),c.pingedLanes|=c.suspendedLanes&N;break}c.timeoutHandle=QS(Dc.bind(null,c,wo,ws),d);break}Dc(c,wo,ws);break;case 4:if(kl(c,T),(T&4194240)===T)break;for(d=c.eventTimes,N=-1;0<T;){var q=31-qn(T);L=1<<q,q=d[q],q>N&&(N=q),T&=~L}if(T=N,T=sn()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*LV(T/1960))-T,10<T){c.timeoutHandle=QS(Dc.bind(null,c,wo,ws),T);break}Dc(c,wo,ws);break;case 5:Dc(c,wo,ws);break;default:throw Error(n(329))}}}return So(c,sn()),c.callbackNode===v?dN.bind(null,c):null}function ZT(c,d){var v=Fh;return c.current.memoizedState.isDehydrated&&(Mc(c,d).flags|=256),c=Bv(c,d),c!==2&&(d=wo,wo=v,d!==null&&qT(d)),c}function qT(c){wo===null?wo=c:wo.push.apply(wo,c)}function RV(c){for(var d=c;;){if(d.flags&16384){var v=d.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var T=0;T<v.length;T++){var N=v[T],L=N.getSnapshot;N=N.value;try{if(!Ha(L(),N))return!1}catch{return!1}}}if(v=d.child,d.subtreeFlags&16384&&v!==null)v.return=d,d=v;else{if(d===c)break;for(;d.sibling===null;){if(d.return===null||d.return===c)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function kl(c,d){for(d&=~UT,d&=~Pv,c.suspendedLanes|=d,c.pingedLanes&=~d,c=c.expirationTimes;0<d;){var v=31-qn(d),T=1<<v;c[v]=-1,d&=~T}}function fN(c){if(Bt&6)throw Error(n(327));ld();var d=bi(c,0);if(!(d&1))return So(c,sn()),null;var v=Bv(c,d);if(c.tag!==0&&v===2){var T=J(c);T!==0&&(d=T,v=ZT(c,T))}if(v===1)throw v=Rh,Mc(c,0),kl(c,d),So(c,sn()),v;if(v===6)throw Error(n(345));return c.finishedWork=c.current.alternate,c.finishedLanes=d,Dc(c,wo,ws),So(c,sn()),null}function $T(c,d){var v=Bt;Bt|=1;try{return c(d)}finally{Bt=v,Bt===0&&(sd=sn()+500,fv&&yl())}}function Cc(c){xl!==null&&xl.tag===0&&!(Bt&6)&&ld();var d=Bt;Bt|=1;var v=da.transition,T=$e;try{if(da.transition=null,$e=1,c)return c()}finally{$e=T,da.transition=v,Bt=d,!(Bt&6)&&yl()}}function KT(){_o=id.current,vn(id)}function Mc(c,d){c.finishedWork=null,c.finishedLanes=0;var v=c.timeoutHandle;if(v!==-1&&(c.timeoutHandle=-1,fV(v)),Un!==null)for(v=Un.return;v!==null;){var T=v;switch(aT(T),T.tag){case 1:T=T.type.childContextTypes,T!=null&&uv();break;case 3:rd(),vn(vo),vn(jr),wT();break;case 5:yT(T);break;case 4:rd();break;case 13:vn(Cn);break;case 19:vn(Cn);break;case 10:dT(T.type._context);break;case 22:case 23:KT()}v=v.return}if(ar=c,Un=c=El(c.current,null),wr=_o=d,Kn=0,Rh=null,UT=Pv=Ec=0,wo=Fh=null,xc!==null){for(d=0;d<xc.length;d++)if(v=xc[d],T=v.interleaved,T!==null){v.interleaved=null;var N=T.next,L=v.pending;if(L!==null){var q=L.next;L.next=N,T.next=q}v.pending=T}xc=null}return c}function hN(c,d){do{var v=Un;try{if(uT(),xv.current=Cv,Iv){for(var T=Mn.memoizedState;T!==null;){var N=T.queue;N!==null&&(N.pending=null),T=T.next}Iv=!1}if(kc=0,or=$n=Mn=null,Ah=!1,Nh=0,zT.current=null,v===null||v.return===null){Kn=1,Rh=d,Un=null;break}e:{var L=c,q=v.return,ae=v,se=d;if(d=wr,ae.flags|=32768,se!==null&&typeof se=="object"&&typeof se.then=="function"){var xe=se,Re=ae,He=Re.tag;if(!(Re.mode&1)&&(He===0||He===11||He===15)){var Le=Re.alternate;Le?(Re.updateQueue=Le.updateQueue,Re.memoizedState=Le.memoizedState,Re.lanes=Le.lanes):(Re.updateQueue=null,Re.memoizedState=null)}var Je=H2(q);if(Je!==null){Je.flags&=-257,B2(Je,q,ae,L,d),Je.mode&1&&F2(L,xe,d),d=Je,se=xe;var nt=d.updateQueue;if(nt===null){var rt=new Set;rt.add(se),d.updateQueue=rt}else nt.add(se);break e}else{if(!(d&1)){F2(L,xe,d),JT();break e}se=Error(n(426))}}else if(Tn&&ae.mode&1){var Bn=H2(q);if(Bn!==null){!(Bn.flags&65536)&&(Bn.flags|=256),B2(Bn,q,ae,L,d),lT(od(se,ae));break e}}L=se=od(se,ae),Kn!==4&&(Kn=2),Fh===null?Fh=[L]:Fh.push(L),L=q;do{switch(L.tag){case 3:L.flags|=65536,d&=-d,L.lanes|=d;var me=L2(L,se,d);o2(L,me);break e;case 1:ae=se;var ue=L.type,ye=L.stateNode;if(!(L.flags&128)&&(typeof ue.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(Tl===null||!Tl.has(ye)))){L.flags|=65536,d&=-d,L.lanes|=d;var ze=R2(L,ae,d);o2(L,ze);break e}}L=L.return}while(L!==null)}gN(v)}catch(at){d=at,Un===v&&v!==null&&(Un=v=v.return);continue}break}while(!0)}function pN(){var c=Ov.current;return Ov.current=Cv,c===null?Cv:c}function JT(){(Kn===0||Kn===3||Kn===2)&&(Kn=4),ar===null||!(Ec&268435455)&&!(Pv&268435455)||kl(ar,wr)}function Bv(c,d){var v=Bt;Bt|=2;var T=pN();(ar!==c||wr!==d)&&(ws=null,Mc(c,d));do try{FV();break}catch(N){hN(c,N)}while(!0);if(uT(),Bt=v,Ov.current=T,Un!==null)throw Error(n(261));return ar=null,wr=0,Kn}function FV(){for(;Un!==null;)mN(Un)}function HV(){for(;Un!==null&&!Ou();)mN(Un)}function mN(c){var d=bN(c.alternate,c,_o);c.memoizedProps=c.pendingProps,d===null?gN(c):Un=d,zT.current=null}function gN(c){var d=c;do{var v=d.alternate;if(c=d.return,d.flags&32768){if(v=NV(v,d),v!==null){v.flags&=32767,Un=v;return}if(c!==null)c.flags|=32768,c.subtreeFlags=0,c.deletions=null;else{Kn=6,Un=null;return}}else if(v=AV(v,d,_o),v!==null){Un=v;return}if(d=d.sibling,d!==null){Un=d;return}Un=d=c}while(d!==null);Kn===0&&(Kn=5)}function Dc(c,d,v){var T=$e,N=da.transition;try{da.transition=null,$e=1,BV(c,d,v,T)}finally{da.transition=N,$e=T}return null}function BV(c,d,v,T){do ld();while(xl!==null);if(Bt&6)throw Error(n(327));v=c.finishedWork;var N=c.finishedLanes;if(v===null)return null;if(c.finishedWork=null,c.finishedLanes=0,v===c.current)throw Error(n(177));c.callbackNode=null,c.callbackPriority=0;var L=v.lanes|v.childLanes;if(Ce(c,L),c===ar&&(Un=ar=null,wr=0),!(v.subtreeFlags&2064)&&!(v.flags&2064)||Lv||(Lv=!0,wN(vi,function(){return ld(),null})),L=(v.flags&15990)!==0,v.subtreeFlags&15990||L){L=da.transition,da.transition=null;var q=$e;$e=1;var ae=Bt;Bt|=4,zT.current=null,PV(c,v),iN(v,c),aV(JS),Fo=!!KS,JS=KS=null,c.current=v,jV(v),Pu(),Bt=ae,$e=q,da.transition=L}else c.current=v;if(Lv&&(Lv=!1,xl=c,Rv=N),L=c.pendingLanes,L===0&&(Tl=null),ss(v.stateNode),So(c,sn()),d!==null)for(T=c.onRecoverableError,v=0;v<d.length;v++)N=d[v],T(N.value,{componentStack:N.stack,digest:N.digest});if(jv)throw jv=!1,c=WT,WT=null,c;return Rv&1&&c.tag!==0&&ld(),L=c.pendingLanes,L&1?c===GT?Hh++:(Hh=0,GT=c):Hh=0,yl(),null}function ld(){if(xl!==null){var c=ht(Rv),d=da.transition,v=$e;try{if(da.transition=null,$e=16>c?16:c,xl===null)var T=!1;else{if(c=xl,xl=null,Rv=0,Bt&6)throw Error(n(331));var N=Bt;for(Bt|=4,Qe=c.current;Qe!==null;){var L=Qe,q=L.child;if(Qe.flags&16){var ae=L.deletions;if(ae!==null){for(var se=0;se<ae.length;se++){var xe=ae[se];for(Qe=xe;Qe!==null;){var Re=Qe;switch(Re.tag){case 0:case 11:case 15:Lh(8,Re,L)}var He=Re.child;if(He!==null)He.return=Re,Qe=He;else for(;Qe!==null;){Re=Qe;var Le=Re.sibling,Je=Re.return;if(tN(Re),Re===xe){Qe=null;break}if(Le!==null){Le.return=Je,Qe=Le;break}Qe=Je}}}var nt=L.alternate;if(nt!==null){var rt=nt.child;if(rt!==null){nt.child=null;do{var Bn=rt.sibling;rt.sibling=null,rt=Bn}while(rt!==null)}}Qe=L}}if(L.subtreeFlags&2064&&q!==null)q.return=L,Qe=q;else e:for(;Qe!==null;){if(L=Qe,L.flags&2048)switch(L.tag){case 0:case 11:case 15:Lh(9,L,L.return)}var me=L.sibling;if(me!==null){me.return=L.return,Qe=me;break e}Qe=L.return}}var ue=c.current;for(Qe=ue;Qe!==null;){q=Qe;var ye=q.child;if(q.subtreeFlags&2064&&ye!==null)ye.return=q,Qe=ye;else e:for(q=ue;Qe!==null;){if(ae=Qe,ae.flags&2048)try{switch(ae.tag){case 0:case 11:case 15:Nv(9,ae)}}catch(at){Pn(ae,ae.return,at)}if(ae===q){Qe=null;break e}var ze=ae.sibling;if(ze!==null){ze.return=ae.return,Qe=ze;break e}Qe=ae.return}}if(Bt=N,yl(),$r&&typeof $r.onPostCommitFiberRoot=="function")try{$r.onPostCommitFiberRoot(Lo,c)}catch{}T=!0}return T}finally{$e=v,da.transition=d}}return!1}function vN(c,d,v){d=od(v,d),d=L2(c,d,1),c=wl(c,d,1),d=Xr(),c!==null&&(pe(c,1,d),So(c,d))}function Pn(c,d,v){if(c.tag===3)vN(c,c,v);else for(;d!==null;){if(d.tag===3){vN(d,c,v);break}else if(d.tag===1){var T=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(Tl===null||!Tl.has(T))){c=od(v,c),c=R2(d,c,1),d=wl(d,c,1),c=Xr(),d!==null&&(pe(d,1,c),So(d,c));break}}d=d.return}}function _V(c,d,v){var T=c.pingCache;T!==null&&T.delete(d),d=Xr(),c.pingedLanes|=c.suspendedLanes&v,ar===c&&(wr&v)===v&&(Kn===4||Kn===3&&(wr&130023424)===wr&&500>sn()-VT?Mc(c,0):UT|=v),So(c,d)}function yN(c,d){d===0&&(c.mode&1?(d=ls,ls<<=1,!(ls&130023424)&&(ls=4194304)):d=1);var v=Xr();c=vs(c,d),c!==null&&(pe(c,d,v),So(c,v))}function YV(c){var d=c.memoizedState,v=0;d!==null&&(v=d.retryLane),yN(c,v)}function zV(c,d){var v=0;switch(c.tag){case 13:var T=c.stateNode,N=c.memoizedState;N!==null&&(v=N.retryLane);break;case 19:T=c.stateNode;break;default:throw Error(n(314))}T!==null&&T.delete(d),yN(c,v)}var bN;bN=function(c,d,v){if(c!==null)if(c.memoizedProps!==d.pendingProps||vo.current)bo=!0;else{if(!(c.lanes&v)&&!(d.flags&128))return bo=!1,DV(c,d,v);bo=!!(c.flags&131072)}else bo=!1,Tn&&d.flags&1048576&&JA(d,pv,d.index);switch(d.lanes=0,d.tag){case 2:var T=d.type;Dv(c,d),c=d.pendingProps;var N=Ku(d,jr.current);td(d,v),N=xT(null,d,T,c,N,v);var L=IT();return d.flags|=1,typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,yo(T)?(L=!0,dv(d)):L=!1,d.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,pT(d),N.updater=wv,d.stateNode=N,N._reactInternals=d,gT(d,T,c,v),d=OT(null,d,T,!0,L,v)):(d.tag=0,Tn&&L&&oT(d),Jr(null,d,N,v),d=d.child),d;case 16:T=d.elementType;e:{switch(Dv(c,d),c=d.pendingProps,N=T._init,T=N(T._payload),d.type=T,N=d.tag=VV(T),c=_a(T,c),N){case 0:d=NT(null,d,T,c,v);break e;case 1:d=W2(null,d,T,c,v);break e;case 11:d=_2(null,d,T,c,v);break e;case 14:d=Y2(null,d,T,_a(T.type,c),v);break e}throw Error(n(306,T,""))}return d;case 0:return T=d.type,N=d.pendingProps,N=d.elementType===T?N:_a(T,N),NT(c,d,T,N,v);case 1:return T=d.type,N=d.pendingProps,N=d.elementType===T?N:_a(T,N),W2(c,d,T,N,v);case 3:e:{if(G2(d),c===null)throw Error(n(387));T=d.pendingProps,L=d.memoizedState,N=L.element,r2(c,d),bv(d,T,null,v);var q=d.memoizedState;if(T=q.element,L.isDehydrated)if(L={element:T,isDehydrated:!1,cache:q.cache,pendingSuspenseBoundaries:q.pendingSuspenseBoundaries,transitions:q.transitions},d.updateQueue.baseState=L,d.memoizedState=L,d.flags&256){N=od(Error(n(423)),d),d=Z2(c,d,T,v,N);break e}else if(T!==N){N=od(Error(n(424)),d),d=Z2(c,d,T,v,N);break e}else for(Bo=ml(d.stateNode.containerInfo.firstChild),Ho=d,Tn=!0,Ba=null,v=f2(d,null,T,v),d.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(Qu(),T===N){d=bs(c,d,v);break e}Jr(c,d,T,v)}d=d.child}return d;case 5:return h2(d),c===null&&sT(d),T=d.type,N=d.pendingProps,L=c!==null?c.memoizedProps:null,q=N.children,XS(T,N)?q=null:L!==null&&XS(T,L)&&(d.flags|=32),V2(c,d),Jr(c,d,q,v),d.child;case 6:return c===null&&sT(d),null;case 13:return q2(c,d,v);case 4:return vT(d,d.stateNode.containerInfo),T=d.pendingProps,c===null?d.child=nd(d,null,T,v):Jr(c,d,T,v),d.child;case 11:return T=d.type,N=d.pendingProps,N=d.elementType===T?N:_a(T,N),_2(c,d,T,N,v);case 7:return Jr(c,d,d.pendingProps,v),d.child;case 8:return Jr(c,d,d.pendingProps.children,v),d.child;case 12:return Jr(c,d,d.pendingProps.children,v),d.child;case 10:e:{if(T=d.type._context,N=d.pendingProps,L=d.memoizedProps,q=N.value,dn(gv,T._currentValue),T._currentValue=q,L!==null)if(Ha(L.value,q)){if(L.children===N.children&&!vo.current){d=bs(c,d,v);break e}}else for(L=d.child,L!==null&&(L.return=d);L!==null;){var ae=L.dependencies;if(ae!==null){q=L.child;for(var se=ae.firstContext;se!==null;){if(se.context===T){if(L.tag===1){se=ys(-1,v&-v),se.tag=2;var xe=L.updateQueue;if(xe!==null){xe=xe.shared;var Re=xe.pending;Re===null?se.next=se:(se.next=Re.next,Re.next=se),xe.pending=se}}L.lanes|=v,se=L.alternate,se!==null&&(se.lanes|=v),fT(L.return,v,d),ae.lanes|=v;break}se=se.next}}else if(L.tag===10)q=L.type===d.type?null:L.child;else if(L.tag===18){if(q=L.return,q===null)throw Error(n(341));q.lanes|=v,ae=q.alternate,ae!==null&&(ae.lanes|=v),fT(q,v,d),q=L.sibling}else q=L.child;if(q!==null)q.return=L;else for(q=L;q!==null;){if(q===d){q=null;break}if(L=q.sibling,L!==null){L.return=q.return,q=L;break}q=q.return}L=q}Jr(c,d,N.children,v),d=d.child}return d;case 9:return N=d.type,T=d.pendingProps.children,td(d,v),N=ca(N),T=T(N),d.flags|=1,Jr(c,d,T,v),d.child;case 14:return T=d.type,N=_a(T,d.pendingProps),N=_a(T.type,N),Y2(c,d,T,N,v);case 15:return z2(c,d,d.type,d.pendingProps,v);case 17:return T=d.type,N=d.pendingProps,N=d.elementType===T?N:_a(T,N),Dv(c,d),d.tag=1,yo(T)?(c=!0,dv(d)):c=!1,td(d,v),l2(d,T,N),gT(d,T,N,v),OT(null,d,T,!0,c,v);case 19:return K2(c,d,v);case 22:return U2(c,d,v)}throw Error(n(156,d.tag))};function wN(c,d){return is(c,d)}function UV(c,d,v,T){this.tag=c,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fa(c,d,v,T){return new UV(c,d,v,T)}function XT(c){return c=c.prototype,!(!c||!c.isReactComponent)}function VV(c){if(typeof c=="function")return XT(c)?1:0;if(c!=null){if(c=c.$$typeof,c===H)return 11;if(c===$)return 14}return 2}function El(c,d){var v=c.alternate;return v===null?(v=fa(c.tag,d,c.key,c.mode),v.elementType=c.elementType,v.type=c.type,v.stateNode=c.stateNode,v.alternate=c,c.alternate=v):(v.pendingProps=d,v.type=c.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=c.flags&14680064,v.childLanes=c.childLanes,v.lanes=c.lanes,v.child=c.child,v.memoizedProps=c.memoizedProps,v.memoizedState=c.memoizedState,v.updateQueue=c.updateQueue,d=c.dependencies,v.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},v.sibling=c.sibling,v.index=c.index,v.ref=c.ref,v}function _v(c,d,v,T,N,L){var q=2;if(T=c,typeof c=="function")XT(c)&&(q=1);else if(typeof c=="string")q=5;else e:switch(c){case O:return Ac(v.children,N,L,d);case F:q=8,N|=8;break;case R:return c=fa(12,v,d,N|2),c.elementType=R,c.lanes=L,c;case Z:return c=fa(13,v,d,N),c.elementType=Z,c.lanes=L,c;case W:return c=fa(19,v,d,N),c.elementType=W,c.lanes=L,c;case ne:return Yv(v,N,L,d);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case B:q=10;break e;case Y:q=9;break e;case H:q=11;break e;case $:q=14;break e;case V:q=16,T=null;break e}throw Error(n(130,c==null?c:typeof c,""))}return d=fa(q,v,d,N),d.elementType=c,d.type=T,d.lanes=L,d}function Ac(c,d,v,T){return c=fa(7,c,T,d),c.lanes=v,c}function Yv(c,d,v,T){return c=fa(22,c,T,d),c.elementType=ne,c.lanes=v,c.stateNode={isHidden:!1},c}function QT(c,d,v){return c=fa(6,c,null,d),c.lanes=v,c}function e1(c,d,v){return d=fa(4,c.children!==null?c.children:[],c.key,d),d.lanes=v,d.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},d}function WV(c,d,v,T,N){this.tag=d,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ve(0),this.expirationTimes=ve(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ve(0),this.identifierPrefix=T,this.onRecoverableError=N,this.mutableSourceEagerHydrationData=null}function t1(c,d,v,T,N,L,q,ae,se){return c=new WV(c,d,v,ae,se),d===1?(d=1,L===!0&&(d|=8)):d=0,L=fa(3,null,null,d),c.current=L,L.stateNode=c,L.memoizedState={element:T,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},pT(L),c}function GV(c,d,v){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:T==null?null:""+T,children:c,containerInfo:d,implementation:v}}function SN(c){if(!c)return vl;c=c._reactInternals;e:{if(Oa(c)!==c||c.tag!==1)throw Error(n(170));var d=c;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(yo(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(n(171))}if(c.tag===1){var v=c.type;if(yo(v))return qA(c,v,d)}return d}function TN(c,d,v,T,N,L,q,ae,se){return c=t1(v,T,!0,c,N,L,q,ae,se),c.context=SN(null),v=c.current,T=Xr(),N=Il(v),L=ys(T,N),L.callback=d??null,wl(v,L,N),c.current.lanes=N,pe(c,N,T),So(c,T),c}function zv(c,d,v,T){var N=d.current,L=Xr(),q=Il(N);return v=SN(v),d.context===null?d.context=v:d.pendingContext=v,d=ys(L,q),d.payload={element:c},T=T===void 0?null:T,T!==null&&(d.callback=T),c=wl(N,d,q),c!==null&&(Ua(c,N,q,L),yv(c,N,q)),q}function Uv(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return c.child.stateNode;default:return c.child.stateNode}}function xN(c,d){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var v=c.retryLane;c.retryLane=v!==0&&v<d?v:d}}function n1(c,d){xN(c,d),(c=c.alternate)&&xN(c,d)}function ZV(){return null}var IN=typeof reportError=="function"?reportError:function(c){console.error(c)};function r1(c){this._internalRoot=c}Vv.prototype.render=r1.prototype.render=function(c){var d=this._internalRoot;if(d===null)throw Error(n(409));zv(c,d,null,null)},Vv.prototype.unmount=r1.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var d=c.containerInfo;Cc(function(){zv(null,c,null,null)}),d[hs]=null}};function Vv(c){this._internalRoot=c}Vv.prototype.unstable_scheduleHydration=function(c){if(c){var d=uo();c={blockedOn:null,target:c,priority:d};for(var v=0;v<Si.length&&d!==0&&d<Si[v].priority;v++);Si.splice(v,0,c),v===0&&aa(c)}};function o1(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function Wv(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11&&(c.nodeType!==8||c.nodeValue!==" react-mount-point-unstable "))}function kN(){}function qV(c,d,v,T,N){if(N){if(typeof T=="function"){var L=T;T=function(){var xe=Uv(q);L.call(xe)}}var q=TN(d,T,c,0,null,!1,!1,"",kN);return c._reactRootContainer=q,c[hs]=q.current,Th(c.nodeType===8?c.parentNode:c),Cc(),q}for(;N=c.lastChild;)c.removeChild(N);if(typeof T=="function"){var ae=T;T=function(){var xe=Uv(se);ae.call(xe)}}var se=t1(c,0,!1,null,null,!1,!1,"",kN);return c._reactRootContainer=se,c[hs]=se.current,Th(c.nodeType===8?c.parentNode:c),Cc(function(){zv(d,se,v,T)}),se}function Gv(c,d,v,T,N){var L=v._reactRootContainer;if(L){var q=L;if(typeof N=="function"){var ae=N;N=function(){var se=Uv(q);ae.call(se)}}zv(d,q,c,N)}else q=qV(v,d,c,N,T);return Uv(q)}bt=function(c){switch(c.tag){case 3:var d=c.stateNode;if(d.current.memoizedState.isDehydrated){var v=yi(d.pendingLanes);v!==0&&(Ue(d,v|1),So(d,sn()),!(Bt&6)&&(sd=sn()+500,yl()))}break;case 13:Cc(function(){var T=vs(c,1);if(T!==null){var N=Xr();Ua(T,c,1,N)}}),n1(c,1)}},tn=function(c){if(c.tag===13){var d=vs(c,134217728);if(d!==null){var v=Xr();Ua(d,c,134217728,v)}n1(c,134217728)}},co=function(c){if(c.tag===13){var d=Il(c),v=vs(c,d);if(v!==null){var T=Xr();Ua(v,c,d,T)}n1(c,d)}},uo=function(){return $e},Nr=function(c,d){var v=$e;try{return $e=c,d()}finally{$e=v}},na=function(c,d,v){switch(d){case"input":if(Ve(c,v),d=v.name,v.type==="radio"&&d!=null){for(v=c;v.parentNode;)v=v.parentNode;for(v=v.querySelectorAll("input[name="+JSON.stringify(""+d)+'][type="radio"]'),d=0;d<v.length;d++){var T=v[d];if(T!==c&&T.form===c.form){var N=cv(T);if(!N)throw Error(n(90));ke(T),Ve(T,N)}}}break;case"textarea":an(c,v);break;case"select":d=v.value,d!=null&&wt(c,!!v.multiple,d,!1)}},Hn=$T,oa=Cc;var $V={usingClientEntryPoint:!1,Events:[kh,qu,cv,lo,ra,$T]},Bh={findFiberByHostInstance:bc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},KV={bundleType:Bh.bundleType,version:Bh.version,rendererPackageName:Bh.rendererPackageName,rendererConfig:Bh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(c){return c=as(c),c===null?null:c.stateNode},findFiberByHostInstance:Bh.findFiberByHostInstance||ZV,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zv.isDisabled&&Zv.supportsFiber)try{Lo=Zv.inject(KV),$r=Zv}catch{}}return To.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$V,To.createPortal=function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o1(d))throw Error(n(200));return GV(c,d,null,v)},To.createRoot=function(c,d){if(!o1(c))throw Error(n(299));var v=!1,T="",N=IN;return d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(T=d.identifierPrefix),d.onRecoverableError!==void 0&&(N=d.onRecoverableError)),d=t1(c,1,!1,null,null,v,!1,T,N),c[hs]=d.current,Th(c.nodeType===8?c.parentNode:c),new r1(d)},To.findDOMNode=function(c){if(c==null)return null;if(c.nodeType===1)return c;var d=c._reactInternals;if(d===void 0)throw typeof c.render=="function"?Error(n(188)):(c=Object.keys(c).join(","),Error(n(268,c)));return c=as(d),c=c===null?null:c.stateNode,c},To.flushSync=function(c){return Cc(c)},To.hydrate=function(c,d,v){if(!Wv(d))throw Error(n(200));return Gv(null,c,d,!0,v)},To.hydrateRoot=function(c,d,v){if(!o1(c))throw Error(n(405));var T=v!=null&&v.hydratedSources||null,N=!1,L="",q=IN;if(v!=null&&(v.unstable_strictMode===!0&&(N=!0),v.identifierPrefix!==void 0&&(L=v.identifierPrefix),v.onRecoverableError!==void 0&&(q=v.onRecoverableError)),d=TN(d,null,c,1,v??null,N,!1,L,q),c[hs]=d.current,Th(c),T)for(c=0;c<T.length;c++)v=T[c],N=v._getVersion,N=N(v._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[v,N]:d.mutableSourceEagerHydrationData.push(v,N);return new Vv(d)},To.render=function(c,d,v){if(!Wv(d))throw Error(n(200));return Gv(null,c,d,!1,v)},To.unmountComponentAtNode=function(c){if(!Wv(c))throw Error(n(40));return c._reactRootContainer?(Cc(function(){Gv(null,null,c,!1,function(){c._reactRootContainer=null,c[hs]=null})}),!0):!1},To.unstable_batchedUpdates=$T,To.unstable_renderSubtreeIntoContainer=function(c,d,v,T){if(!Wv(v))throw Error(n(200));if(c==null||c._reactInternals===void 0)throw Error(n(38));return Gv(c,d,v,!1,T)},To.version="18.2.0-next-9e3b772b8-20220608",To}function cF(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cF)}catch(e){console.error(e)}}cF();lF.exports=WZ();var fC=lF.exports;const hC=Xe(fC);var ag,uF=fC;ag=Sa.createRoot=uF.createRoot;Sa.hydrateRoot=uF.hydrateRoot;const GZ=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:o}=e,a=()=>{r&&o()},i=s=>{(s.key==="Escape"||(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="w")&&o()};return g.jsx("div",{className:`dialog-wrapper ${n}`,onClick:a,onKeyDown:s=>i(s),children:g.jsx("div",{className:"dialog-container",onClick:s=>s.stopPropagation(),children:t})})};function e0(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{r.firstElementChild?.classList.add("showup")},0);const o={destroy:()=>{r.firstElementChild?.classList.remove("showup"),r.firstElementChild?.classList.add("showoff"),setTimeout(()=>{r.detach(),s.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(u=>{u.detach()})},wI)}},a={...n,destroy:o.destroy};let i=g.jsx(GZ,{destroy:o.destroy,clickSpaceDestroy:!0,...e,children:g.jsx(t,{...a})});i=g.jsx(Ea,{store:Se,context:it,children:i});const s=Sa.createRoot(r);return s.render(i),o}class ZZ extends A.Modal{constructor(t,n,r){super(t),this.version=r,this.plugin=n}plugin;onOpen(){super.onOpen(),this.titleEl.setText(I("Submit issue")),new A.Setting(this.contentEl).setName(I("Current version")+": "+this.version),new A.Setting(this.contentEl).setName(I("Bug report")).setDesc(I("Click the button to copy debug info and open the issue page")).addButton(t=>{t.setButtonText(I("Copy and go")).onClick(async()=>{await SA(this.plugin),new A.Notice(I("Debug info copied")),setTimeout(()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()},100)})}),new A.Setting(this.contentEl).setName(I("Feature request")).setDesc(I("Submit your feature request to the issue page")).addButton(t=>{t.setButtonText(I("Go")).onClick(async()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()})})}}function dF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=dF(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qt(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=dF(e))&&(r&&(r+=" "),r+=t);return r}function en(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function xn(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function pC(e,t){const n=en(e);return isNaN(t)?xn(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function fF(e,t){const n=en(e);if(isNaN(t))return xn(e,NaN);if(!t)return n;const r=n.getDate(),o=xn(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const a=o.getDate();return r>=a?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const hF=6048e5,qZ=864e5,$Z=6e4,KZ=36e5,JZ=1e3;let XZ={};function Af(){return XZ}function Ta(e,t){const n=Af(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=en(e),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Bd(e){return Ta(e,{weekStartsOn:1})}function QZ(e){const t=en(e),n=t.getFullYear(),r=xn(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const o=Bd(r),a=xn(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=Bd(a);return t.getTime()>=o.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function cb(e){const t=en(e);return t.setHours(0,0,0,0),t}function ub(e){const t=en(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function eq(e,t){const n=cb(e),r=cb(t),o=+n-ub(n),a=+r-ub(r);return Math.round((o-a)/qZ)}function tq(e){const t=QZ(e),n=xn(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Bd(n)}function nq(e,t){return fF(e,t*12)}function rq(e,t){const n=en(e),r=en(t),o=BN(n,r),a=Math.abs(eq(n,r));n.setDate(n.getDate()-o*a);const i=+(BN(n,r)===-o),s=o*(a-i);return s===0?0:s}function BN(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function oq(e){const t=en(e);return t.setHours(23,59,59,999),t}function db(e){const t=en(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function fb(e){const t=en(e);return t.setDate(1),t.setHours(0,0,0,0),t}function hb(e){const t=en(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function pb(e){const t=en(e),n=xn(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function mb(e,t){const n=Af(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=en(e),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const aq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},iq=(e,t,n)=>{let r;const o=aq[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function u1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},lq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},uq={date:u1({formats:sq,defaultWidth:"full"}),time:u1({formats:lq,defaultWidth:"full"}),dateTime:u1({formats:cq,defaultWidth:"full"})},dq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fq=(e,t,n,r)=>dq[e];function Yh(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const hq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bq=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},wq={ordinalNumber:bq,era:Yh({values:hq,defaultWidth:"wide"}),quarter:Yh({values:pq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Yh({values:mq,defaultWidth:"wide"}),day:Yh({values:gq,defaultWidth:"wide"}),dayPeriod:Yh({values:vq,defaultWidth:"wide",formattingValues:yq,defaultFormattingWidth:"wide"})};function zh(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Tq(s,h=>h.test(i)):Sq(s,h=>h.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function Sq(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Tq(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xq(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const Iq=/^(\d+)(th|st|nd|rd)?/i,kq=/\d+/i,Eq={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Cq={any:[/^b/i,/^(a|c)/i]},Mq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Dq={any:[/1/i,/2/i,/3/i,/4/i]},Aq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Oq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Pq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},jq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Lq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Rq={ordinalNumber:xq({matchPattern:Iq,parsePattern:kq,valueCallback:e=>parseInt(e,10)}),era:zh({matchPatterns:Eq,defaultMatchWidth:"wide",parsePatterns:Cq,defaultParseWidth:"any"}),quarter:zh({matchPatterns:Mq,defaultMatchWidth:"wide",parsePatterns:Dq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zh({matchPatterns:Aq,defaultMatchWidth:"wide",parsePatterns:Nq,defaultParseWidth:"any"}),day:zh({matchPatterns:Oq,defaultMatchWidth:"wide",parsePatterns:Pq,defaultParseWidth:"any"}),dayPeriod:zh({matchPatterns:jq,defaultMatchWidth:"any",parsePatterns:Lq,defaultParseWidth:"any"})},Fq={code:"en-US",formatDistance:iq,formatLong:uq,formatRelative:fq,localize:wq,match:Rq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hq(e){const t=en(e),n=+Bd(t)-+tq(t);return Math.round(n/hF)+1}function pF(e,t){const n=en(e),r=n.getFullYear(),o=Af(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=xn(e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Ta(i,t),l=xn(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Ta(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Bq(e,t){const n=Af(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=pF(e,t),a=xn(e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Ta(a,t)}function _q(e,t){const n=en(e),r=+Ta(n,t)-+Bq(n,t);return Math.round(r/hF)+1}const _N=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},mF=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Yq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return _N(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",_N(r,t)).replace("{{time}}",mF(o,t))},YN={p:mF,P:Yq},zq=/^D+$/,Uq=/^Y+$/,Vq=["D","DD","YY","YYYY"];function Wq(e){return zq.test(e)}function Gq(e){return Uq.test(e)}function zN(e,t,n){const r=Zq(e,t,n);if(console.warn(r),Vq.includes(e))throw new RangeError(r)}function Zq(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function qq(){return Object.assign({},Af())}function $q(e){let n=en(e).getDay();return n===0&&(n=7),n}function Kq(e,t){const n=en(e),r=en(t);return n.getTime()>r.getTime()}function Jq(e,t){const n=t instanceof Date?xn(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Xq=10;class gF{subPriority=0;validate(t,n){return!0}}class Qq extends gF{constructor(t,n,r,o,a){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,a&&(this.subPriority=a)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class e$ extends gF{priority=Xq;subPriority=-1;set(t,n){return n.timestampIsSet?t:xn(t,Jq(t,Date))}}class $t{run(t,n,r,o){const a=this.parse(t,n,r,o);return a?{setter:new Qq(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,n,r){return!0}}class t$ extends $t{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Yn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Yi={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function zn(e,t){return e&&{value:t(e.value),rest:e.rest}}function An(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function zi(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*KZ+a*$Z+i*JZ),rest:t.slice(n[0].length)}}function vF(e){return An(Yn.anyDigitsSigned,e)}function Rn(e,t){switch(e){case 1:return An(Yn.singleDigit,t);case 2:return An(Yn.twoDigits,t);case 3:return An(Yn.threeDigits,t);case 4:return An(Yn.fourDigits,t);default:return An(new RegExp("^\\d{1,"+e+"}"),t)}}function gb(e,t){switch(e){case 1:return An(Yn.singleDigitSigned,t);case 2:return An(Yn.twoDigitsSigned,t);case 3:return An(Yn.threeDigitsSigned,t);case 4:return An(Yn.fourDigitsSigned,t);default:return An(new RegExp("^-?\\d{1,"+e+"}"),t)}}function mC(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function yF(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const a=r+50,i=Math.trunc(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function bF(e){return e%400===0||e%4===0&&e%100!==0}class n$ extends $t{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=a=>({year:a,isTwoDigitYear:n==="yy"});switch(n){case"y":return zn(Rn(4,t),o);case"yo":return zn(r.ordinalNumber(t,{unit:"year"}),o);default:return zn(Rn(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const i=yF(r.year,o);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}}class r$ extends $t{priority=130;parse(t,n,r){const o=a=>({year:a,isTwoDigitYear:n==="YY"});switch(n){case"Y":return zn(Rn(4,t),o);case"Yo":return zn(r.ordinalNumber(t,{unit:"year"}),o);default:return zn(Rn(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const a=pF(t,o);if(r.isTwoDigitYear){const s=yF(r.year,a);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Ta(t,o)}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Ta(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class o$ extends $t{priority=130;parse(t,n){return gb(n==="R"?4:n.length,t)}set(t,n,r){const o=xn(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Bd(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class a$ extends $t{priority=130;parse(t,n){return gb(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class i$ extends $t{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Rn(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class s$ extends $t{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Rn(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class l$ extends $t{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=a=>a-1;switch(n){case"M":return zn(An(Yn.month,t),o);case"MM":return zn(Rn(2,t),o);case"Mo":return zn(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class c$ extends $t{priority=110;parse(t,n,r){const o=a=>a-1;switch(n){case"L":return zn(An(Yn.month,t),o);case"LL":return zn(Rn(2,t),o);case"Lo":return zn(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function u$(e,t,n){const r=en(e),o=_q(r,n)-t;return r.setDate(r.getDate()-o*7),r}class d$ extends $t{priority=100;parse(t,n,r){switch(n){case"w":return An(Yn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Rn(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Ta(u$(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function f$(e,t){const n=en(e),r=Hq(n)-t;return n.setDate(n.getDate()-r*7),n}class h$ extends $t{priority=100;parse(t,n,r){switch(n){case"I":return An(Yn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Rn(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Bd(f$(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const p$=[31,28,31,30,31,30,31,31,30,31,30,31],m$=[31,29,31,30,31,30,31,31,30,31,30,31];class g$ extends $t{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return An(Yn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Rn(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=bF(r),a=t.getMonth();return o?n>=1&&n<=m$[a]:n>=1&&n<=p$[a]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class v$ extends $t{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return An(Yn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Rn(n.length,t)}}validate(t,n){const r=t.getFullYear();return bF(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function gC(e,t,n){const r=Af(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=en(e),i=a.getDay(),l=(t%7+7)%7,u=7-o,f=t<0||t>6?t-(i+u)%7:(l+u)%7-(i+u)%7;return pC(a,f)}class y$ extends $t{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gC(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class b$ extends $t{priority=90;parse(t,n,r,o){const a=i=>{const s=Math.floor((i-1)/7)*7;return(i+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return zn(Rn(n.length,t),a);case"eo":return zn(r.ordinalNumber(t,{unit:"day"}),a);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gC(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class w$ extends $t{priority=90;parse(t,n,r,o){const a=i=>{const s=Math.floor((i-1)/7)*7;return(i+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return zn(Rn(n.length,t),a);case"co":return zn(r.ordinalNumber(t,{unit:"day"}),a);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=gC(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function S$(e,t){const n=en(e),r=$q(n),o=t-r;return pC(n,o)}class T$ extends $t{priority=90;parse(t,n,r){const o=a=>a===0?7:a;switch(n){case"i":case"ii":return Rn(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return zn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return zn(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return zn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return zn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=S$(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class x$ extends $t{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mC(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class I$ extends $t{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mC(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class k$ extends $t{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(mC(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class E$ extends $t{priority=70;parse(t,n,r){switch(n){case"h":return An(Yn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Rn(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class C$ extends $t{priority=70;parse(t,n,r){switch(n){case"H":return An(Yn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Rn(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class M$ extends $t{priority=70;parse(t,n,r){switch(n){case"K":return An(Yn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Rn(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class D$ extends $t{priority=70;parse(t,n,r){switch(n){case"k":return An(Yn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Rn(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class A$ extends $t{priority=60;parse(t,n,r){switch(n){case"m":return An(Yn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Rn(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class N$ extends $t{priority=50;parse(t,n,r){switch(n){case"s":return An(Yn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Rn(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class O$ extends $t{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return zn(Rn(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class P$ extends $t{priority=10;parse(t,n){switch(n){case"X":return zi(Yi.basicOptionalMinutes,t);case"XX":return zi(Yi.basic,t);case"XXXX":return zi(Yi.basicOptionalSeconds,t);case"XXXXX":return zi(Yi.extendedOptionalSeconds,t);case"XXX":default:return zi(Yi.extended,t)}}set(t,n,r){return n.timestampIsSet?t:xn(t,t.getTime()-ub(t)-r)}incompatibleTokens=["t","T","x"]}class j$ extends $t{priority=10;parse(t,n){switch(n){case"x":return zi(Yi.basicOptionalMinutes,t);case"xx":return zi(Yi.basic,t);case"xxxx":return zi(Yi.basicOptionalSeconds,t);case"xxxxx":return zi(Yi.extendedOptionalSeconds,t);case"xxx":default:return zi(Yi.extended,t)}}set(t,n,r){return n.timestampIsSet?t:xn(t,t.getTime()-ub(t)-r)}incompatibleTokens=["t","T","X"]}class L$ extends $t{priority=40;parse(t){return vF(t)}set(t,n,r){return[xn(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class R$ extends $t{priority=20;parse(t){return vF(t)}set(t,n,r){return[xn(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const F$={G:new t$,y:new n$,Y:new r$,R:new o$,u:new a$,Q:new i$,q:new s$,M:new l$,L:new c$,w:new d$,I:new h$,d:new g$,D:new v$,E:new y$,e:new b$,c:new w$,i:new T$,a:new x$,b:new I$,B:new k$,h:new E$,H:new C$,K:new M$,k:new D$,m:new A$,s:new N$,S:new O$,X:new P$,x:new j$,t:new L$,T:new R$},H$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_$=/^'([^]*?)'?$/,Y$=/''/g,z$=/\S/,U$=/[a-zA-Z]/;function wF(e,t,n,r){const o=qq(),a=o.locale??Fq,i=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(t==="")return e===""?en(n):xn(n,NaN);const l={firstWeekContainsDate:i,weekStartsOn:s,locale:a},u=[new e$],f=t.match(B$).map(b=>{const y=b[0];if(y in YN){const S=YN[y];return S(b,a.formatLong)}return b}).join("").match(H$),h=[];for(let b of f){Gq(b)&&zN(b,t,e),Wq(b)&&zN(b,t,e);const y=b[0],S=F$[y];if(S){const{incompatibleTokens:x}=S;if(Array.isArray(x)){const C=h.find(M=>x.includes(M.token)||M.token===y);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${b}\` at the same time`)}else if(S.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${b}\` and any other token at the same time`);h.push({token:y,fullToken:b});const E=S.run(e,b,a.match,l);if(!E)return xn(n,NaN);u.push(E.setter),e=E.rest}else{if(y.match(U$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(b==="''"?b="'":y==="'"&&(b=V$(b)),e.indexOf(b)===0)e=e.slice(b.length);else return xn(n,NaN)}}if(e.length>0&&z$.test(e))return xn(n,NaN);const p=u.map(b=>b.priority).sort((b,y)=>y-b).filter((b,y,S)=>S.indexOf(b)===y).map(b=>u.filter(y=>y.priority===b).sort((y,S)=>S.subPriority-y.subPriority)).map(b=>b[0]);let m=en(n);if(isNaN(m.getTime()))return xn(n,NaN);const w={};for(const b of p){if(!b.validate(m,l))return xn(n,NaN);const y=b.set(m,w,l);Array.isArray(y)?(m=y[0],Object.assign(w,y[1])):m=y}return xn(n,m)}function V$(e){return e.match(_$)[1].replace(Y$,"'")}function SF(e,t){const n=+en(e),[r,o]=[+en(t.start),+en(t.end)].sort((a,i)=>a-i);return n>=r&&n<=o}function ko(e,t){return pC(e,-t)}function TF(e,t){return fF(e,-1)}function xF(e,t){return nq(e,-1)}const W$=({statusType:e})=>g.jsx("div",{className:qt("status-text-container status-skeleton",e),children:e==="banner"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"status-text memos-text",children:[g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"}),g.jsx("span",{className:"type-text skeleton-text skeleton-type"})]}),g.jsxs("div",{className:"status-text tags-text",children:[g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"}),g.jsx("span",{className:"type-text skeleton-text skeleton-type"})]}),g.jsxs("div",{className:"status-text duration-text",children:[g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"}),g.jsx("span",{className:"type-text skeleton-text skeleton-type"})]})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"status-sidebar-header title-text",children:g.jsx("span",{className:"normal-text skeleton-text skeleton-title"})}),g.jsxs("div",{className:"status-sidebar-wrapper",children:[g.jsxs("div",{className:"status-text memos-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"})]}),g.jsxs("div",{className:"status-text memos-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"})]}),g.jsxs("div",{className:"status-text tags-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"})]}),g.jsxs("div",{className:"status-text duration-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-amount"})]}),g.jsxs("div",{className:"status-text most-active-day-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-date"})]}),g.jsxs("div",{className:"status-text most-active-hour-text",children:[g.jsx("span",{className:"type-text skeleton-text skeleton-label"}),g.jsx("span",{className:"amount-text skeleton-text skeleton-hour"})]})]})]})}),G$=(e,t,n)=>{console.warn("This function is deprecated, use ThinoWorkerManager.calculateStatsBanner() instead");const r={memosLength:0,tagsLength:0,createdDays:0,taskAmount:0,mostActiveDay:"",mostActiveHour:"",earliestMemo:null,lengthOverflow:!1};if(r.memosLength=e.filter(a=>!(a.deletedAt!==""&&a.deletedAt)).length,r.tagsLength=t.length,r.earliestMemo=e.length>0?e[e.length-1]:null,r.earliestMemo&&r.earliestMemo.createdAt){const a=wF(r.earliestMemo.createdAt,"yyyy/MM/dd HH:mm:ss",new Date);r.createdDays=rq(new Date,a)+1}const o=e.filter(a=>!a.deletedAt&&a.rowStatus!=="ARCHIVED");return r.taskAmount=o.filter(a=>a.thinoType&&a.thinoType?.startsWith("TASK")).length,r.mostActiveDay=Z$(e),r.mostActiveHour=q$(e),r.lengthOverflow=r.memosLength>9999||r.tagsLength>999||r.createdDays>999,n&&kF(n)&&EF({tags:r.tagsLength,memos:r.memosLength,days:r.createdDays},n),r},Z$=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.split(" ")[0];t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},q$=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.slice(11,13);t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]};function UN(e,t=1e3){const[n,r]=D.useState(e),o=D.useRef(),a=D.useRef(),i=D.useRef(!0);return D.useEffect(()=>(i.current=!0,()=>{i.current=!1,o.current&&cancelAnimationFrame(o.current)}),[]),D.useEffect(()=>{if(!i.current)return;const s=n,l=e-s;if(Math.abs(l)<.01){r(e);return}const u=f=>{if(!i.current)return;a.current||(a.current=f);const h=f-a.current,p=Math.min(h/t,1),m=s+l*p;i.current&&r(m),p<1&&i.current?o.current=requestAnimationFrame(u):(i.current&&r(e),a.current=void 0)};return o.current=requestAnimationFrame(u),()=>{o.current&&cancelAnimationFrame(o.current),a.current=void 0}},[e,t,n]),Math.round(n)}const vC=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:o,app:a,plugin:i}}=D.useContext(it),s=D.useRef(!0),l=D.useRef(null),[u,f]=D.useState({memosLength:0,createdDays:0,tagsLength:0,taskAmount:0,mostActiveDay:"",mostActiveHour:"",earliestMemo:null,lengthOverflow:!1}),[h,p]=D.useState(!1),[m,w]=D.useState(!1),[b,y]=D.useState(null),S=UN(u.memosLength),x=UN(u.createdDays),E=_.useCallback((F,R)=>{if(!s.current)return;if(m&&R===b){Ye.setMemoFilter(""),w(!1);return}const B=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([F]));St.pushQuery(B),Ye.setMemoFilter(B.id),w(!0),y(R)},[m,b]),C=_.useCallback(()=>{E({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},[E]),M=_.useCallback(()=>{E({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")},[E]),k=_.useCallback(()=>{Ge.setShowSiderbarInMobileView(!1),Ye.setPathname("/daily")},[]),O=_.useCallback(()=>{if(!u.mostActiveDay)return;const F=wF(u.mostActiveDay,"yyyy/MM/dd",new Date),R=cb(F).getTime(),B=oq(F).getTime();Ye.setFromAndToQuery(R,B)},[u.mostActiveDay]);return D.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]),D.useEffect(()=>{if(!s.current)return;(()=>{const R=!!(le.initialized&&a&&o&&i?.thinoWorkerManager&&Array.isArray(t)&&Array.isArray(n));s.current&&p(R)})()},[le.initialized,a,o,i,t,n]),D.useEffect(()=>{if(!a||!a.appId||!s.current)return;const F=kF(a);s.current&&f(R=>({...R,tagsLength:F.tags,memosLength:F.memos,createdDays:F.days}))},[a]),D.useEffect(()=>{if(!s.current||!le.initialized||!i?.thinoWorkerManager||!t||r!=="/")return;let F=!1;return(async()=>{try{const B=await i.thinoWorkerManager.calculateStatsBanner(t,n);if(F||!s.current)return;const Y={memosLength:B.memosLength,tagsLength:Math.max(B.tagsLength,n.length),earliestMemo:B.earliestMemo,lengthOverflow:B.lengthOverflow,createdDays:B.createdDays||0,taskAmount:B.taskAmount||0,mostActiveDay:B.mostActiveDay||"",mostActiveHour:B.mostActiveHour||""};s.current&&f(H=>({...H,...Y})),a&&s.current&&EF({tags:Y.tagsLength,memos:Y.memosLength,days:Y.createdDays},a)}catch(B){if(F||!s.current)return;console.error("Failed to calculate stats banner:",B);try{const Y=G$(t,n,i.app);s.current&&f(H=>({...H,memosLength:Y.memosLength,tagsLength:Y.tagsLength,earliestMemo:Y.earliestMemo,lengthOverflow:Y.lengthOverflow}))}catch(Y){console.error("Fallback calculation also failed:",Y)}}})(),()=>{F=!0}},[n,t,r,i,a]),D.useEffect(()=>{if(!s.current||e==="banner"||!i?.thinoWorkerManager)return;let F=!1;return(async()=>{try{const B=await i.thinoWorkerManager.calculateStatsBanner(t,n);if(F||!s.current)return;f(Y=>({...Y,taskAmount:B.taskAmount||0,mostActiveDay:B.mostActiveDay||"",mostActiveHour:B.mostActiveHour||""}))}catch(B){!F&&s.current&&console.error("Failed to calculate sidebar stats:",B)}})(),()=>{F=!0}},[t,n,e,i]),D.useEffect(()=>{!s.current||!l.current||!u.earliestMemo?.createdAt||A.requireApiVersion("1.4.4")&&A.setTooltip(l.current,I("Started from")+" "+je.getDateTimeString(u.earliestMemo?.createdAt??""))},[u.earliestMemo]),h?g.jsx("div",{className:qt("status-text-container",u.lengthOverflow?"text-overflow":"",e),children:e==="banner"?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"status-text memos-text",children:[g.jsx("span",{className:"amount-text",children:S}),g.jsx("span",{className:"type-text",children:"THINO"})]}),g.jsxs("div",{className:"status-text tags-text",children:[g.jsx("span",{className:"amount-text",children:u.tagsLength}),g.jsx("span",{className:"type-text",children:I("TAG")})]}),g.jsxs("div",{ref:l,className:"status-text duration-text",onClick:k,children:[g.jsx("span",{className:"amount-text",children:x??0}),g.jsx("span",{className:"type-text",children:I("DAY")})]})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"status-sidebar-header title-text",children:g.jsx("span",{className:"normal-text",children:I("Thino status")})}),g.jsxs("div",{className:"status-sidebar-wrapper",children:[g.jsxs("div",{className:"status-text memos-text",children:[g.jsx("span",{className:"type-text",children:I("Thino amount")}),g.jsx("span",{className:"amount-text",children:S})]}),g.jsxs("div",{className:"status-text memos-text",onClick:C,children:[g.jsx("span",{className:"type-text",children:I("Task amount")}),g.jsx("span",{className:"amount-text",children:u.taskAmount??0})]}),g.jsxs("div",{className:"status-text tags-text",onClick:M,children:[g.jsx("span",{className:"type-text",children:I("Used tags")}),g.jsx("span",{className:"amount-text",children:u.tagsLength})]}),g.jsxs("div",{ref:l,className:"status-text duration-text",onClick:k,children:[g.jsx("span",{className:"type-text",children:I("Used days")}),g.jsx("span",{className:"amount-text",children:x??0})]}),g.jsxs("div",{className:"status-text most-active-day-text",onClick:O,children:[g.jsx("span",{className:"type-text",children:I("Most active day")}),g.jsx("span",{className:"amount-text",children:u.mostActiveDay})]}),g.jsxs("div",{className:"status-text most-active-hour-text",children:[g.jsx("span",{className:"type-text",children:I("Most active hour")}),g.jsx("span",{className:"amount-text",children:u.mostActiveHour})]})]})]})}):g.jsx(W$,{statusType:e})};function IF(e){return`userBannerCache:${e}`}function kF(e){try{if(!e?.appId)return{tags:0,memos:0,days:0};const t=IF(e.appId),n=Xn.get([t])[t];return n?JSON.parse(n):{tags:0,memos:0,days:0}}catch(t){return console.error(t),{tags:0,memos:0,days:0}}}function EF({tags:e,memos:t,days:n},r){try{if(!r?.appId)return;const o={tags:e,memos:t,days:n},a=IF(r.appId);Xn.set({[a]:JSON.stringify(o)})}catch(o){console.error(o)}}const CF="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIEQodCl7Y29uc3QgZT1PYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodCk7cmV0dXJuIHQgaW5zdGFuY2VvZiBEYXRlfHx0eXBlb2YgdD09Im9iamVjdCImJmU9PT0iW29iamVjdCBEYXRlXSI/bmV3IHQuY29uc3RydWN0b3IoK3QpOnR5cGVvZiB0PT0ibnVtYmVyInx8ZT09PSJbb2JqZWN0IE51bWJlcl0ifHx0eXBlb2YgdD09InN0cmluZyJ8fGU9PT0iW29iamVjdCBTdHJpbmddIj9uZXcgRGF0ZSh0KTpuZXcgRGF0ZShOYU4pfWZ1bmN0aW9uIGsodCxlKXtyZXR1cm4gdCBpbnN0YW5jZW9mIERhdGU/bmV3IHQuY29uc3RydWN0b3IoZSk6bmV3IERhdGUoZSl9ZnVuY3Rpb24gVyh0LGUpe2NvbnN0IG89RCh0KTtyZXR1cm4gaXNOYU4oZSk/ayh0LE5hTik6KGUmJm8uc2V0RGF0ZShvLmdldERhdGUoKStlKSxvKX1mdW5jdGlvbiBMKHQsZSl7Y29uc3Qgbz1EKHQpO2lmKGlzTmFOKGUpKXJldHVybiBrKHQsTmFOKTtpZighZSlyZXR1cm4gbztjb25zdCByPW8uZ2V0RGF0ZSgpLGE9ayh0LG8uZ2V0VGltZSgpKTthLnNldE1vbnRoKG8uZ2V0TW9udGgoKStlKzEsMCk7Y29uc3Qgcz1hLmdldERhdGUoKTtyZXR1cm4gcj49cz9hOihvLnNldEZ1bGxZZWFyKGEuZ2V0RnVsbFllYXIoKSxhLmdldE1vbnRoKCksciksbyl9bGV0IF89e307ZnVuY3Rpb24gdigpe3JldHVybiBffWZ1bmN0aW9uIGoodCxlKXtjb25zdCBvPXYoKSxyPW8ud2Vla1N0YXJ0c09uPz9vLmxvY2FsZT8ub3B0aW9ucz8ud2Vla1N0YXJ0c09uPz8wLGE9RCh0KSxzPWEuZ2V0RGF5KCksbj0oczxyPzc6MCkrcy1yO3JldHVybiBhLnNldERhdGUoYS5nZXREYXRlKCktbiksYS5zZXRIb3VycygwLDAsMCwwKSxhfWZ1bmN0aW9uIFYodCxlKXtyZXR1cm4gTCh0LGUqMTIpfWZ1bmN0aW9uICQodCl7Y29uc3QgZT1EKHQpLG89ZS5nZXRNb250aCgpO3JldHVybiBlLnNldEZ1bGxZZWFyKGUuZ2V0RnVsbFllYXIoKSxvKzEsMCksZS5zZXRIb3VycygyMyw1OSw1OSw5OTkpLGV9ZnVuY3Rpb24gSCh0KXtjb25zdCBlPUQodCk7cmV0dXJuIGUuc2V0RGF0ZSgxKSxlLnNldEhvdXJzKDAsMCwwLDApLGV9ZnVuY3Rpb24gWSh0KXtjb25zdCBlPUQodCksbz1lLmdldEZ1bGxZZWFyKCk7cmV0dXJuIGUuc2V0RnVsbFllYXIobysxLDAsMCksZS5zZXRIb3VycygyMyw1OSw1OSw5OTkpLGV9ZnVuY3Rpb24gUih0KXtjb25zdCBlPUQodCksbz1rKHQsMCk7cmV0dXJuIG8uc2V0RnVsbFllYXIoZS5nZXRGdWxsWWVhcigpLDAsMSksby5zZXRIb3VycygwLDAsMCwwKSxvfWZ1bmN0aW9uIHgodCxlKXtjb25zdCBvPXYoKSxyPW8ud2Vla1N0YXJ0c09uPz9vLmxvY2FsZT8ub3B0aW9ucz8ud2Vla1N0YXJ0c09uPz8wLGE9RCh0KSxzPWEuZ2V0RGF5KCksbj0oczxyPy03OjApKzYtKHMtcik7cmV0dXJuIGEuc2V0RGF0ZShhLmdldERhdGUoKStuKSxhLnNldEhvdXJzKDIzLDU5LDU5LDk5OSksYX1mdW5jdGlvbiBQKHQsZSl7Y29uc3Qgbz0rRCh0KSxbcixhXT1bK0QoZS5zdGFydCksK0QoZS5lbmQpXS5zb3J0KChzLG4pPT5zLW4pO3JldHVybiBvPj1yJiZvPD1hfWZ1bmN0aW9uIEkodCxlKXtyZXR1cm4gVyh0LC1lKX1mdW5jdGlvbiBxKHQsZSl7cmV0dXJuIEwodCwtMSl9ZnVuY3Rpb24gSih0LGUpe3JldHVybiBWKHQsLTEpfWNvbnN0IEM9L1xzIyhbXlx1MjAwMC1cdTIwNkZcdTJFMDAtXHUyRTdGJyEiIyQlJigpKissLjo7PD0+P0BeYHt8fX5cW1xdXFxcc10rKS9nLE09Lyg8cD58PGJyPikjKFteXHUyMDAwLVx1MjA2Rlx1MkUwMC1cdTJFN0YnISIjJCUmKCkqKywuOjs8PT4/QF5ge3x9flxbXF1cXFxzXSspL2csSz0vXiMoW15cdTIwMDAtXHUyMDZGXHUyRTAwLVx1MkU3RichIiMkJSYoKSorLC46Ozw9Pj9AXmB7fH1+XFtcXVxcXHNdKykvZ3UsQj0vKFxzfO+8mnxcKHw+fF4pKChodHRwfGZ0cHxodHRwcyk6XC9cLyhbXHdfLV0rKD86KD86XC5bXHdfLV0rKSspKShbXHcuLEA/Xj0lJjovfisjLV0qW1x3QD9ePSUmL34rIy1dKSkvZyxYPS8oW15cczxcXCo+JyhdK1wuKGpwZWd8anBnfGdpZnxwbmd8c3ZnKSkoXF1cXSk/KFwpKT8vZyx6PS9cW0AoLis/KVxdXCgoLis/KVwpL2c7ZnVuY3Rpb24gUSh0KXtyZXR1cm5bLyMoW15ccyNdKykvZywvXG4jKFteXHMjXSspL2csL14jKFteXHMjXSspL2ddLnJlZHVjZSgoYSxzKT0+KCh0Lm1hdGNoKHMpfHxbXSkuZm9yRWFjaChuPT57Y29uc3QgbD1uLnJlcGxhY2UocywiJDEiKS50cmltKCkuc3BsaXQoIi8iKTtsZXQgdT0iIjtsLmZvckVhY2gocD0+e3UrPXAsYS5hZGQodSksdSs9Ii8ifSl9KSxhKSxuZXcgU2V0KX1mdW5jdGlvbiBaKHQpe2lmKCFBcnJheS5pc0FycmF5KHQpfHx0Lmxlbmd0aD09PTApcmV0dXJuIG5ldyBTZXQ7Y29uc3QgZT10LmZpbHRlcihyPT4hIXIpLm1hcChyPT5yLnRvU3RyaW5nKCkudHJpbSgpKTtpZihlLmxlbmd0aD09PTApcmV0dXJuIG5ldyBTZXQ7Y29uc3Qgbz1uZXcgU2V0O3JldHVybiBlLmZvckVhY2gocj0+e2NvbnN0IGE9ci5zcGxpdCgiLyIpO2xldCBzPSIiO2EuZm9yRWFjaCgobixjKT0+e3MrPShjPjA/Ii8iOiIiKStuLG8uYWRkKHMpfSl9KSxvfWZ1bmN0aW9uIHR0KHQpe2NvbnN0IGU9dC50b0xvd2VyQ2FzZSgpO3JldHVybiBvPT5vLmluY2x1ZGVzKGUpfWZ1bmN0aW9uIGV0KHQsZSxvKXtjb25zdHtvbmx5RmlsdGVyVHlwZTpyLGZpbHRlckFyY2hpdmVkOmE9ITAsZmlsdGVyRGVsZXRlZDpzPSEwLGZpbHRlckRvbmVUYXNrczpuPSExLGZpbHRlckNvbW1lbnRzOmM9ITAsZmlsdGVyVGFnc0luRmlsZTpsPSExfT1vfHx7fSx1PS8jKFteXHMjXSspL2cscD0vXiMoW15ccyNdKykvZyxoPS9cbiMoW15ccyNdKykvZyxOPS9cWyguKz8pXF1cKCguKz8pXCkvZyxtPS8hXFsoLis/KVxdXCgoLis/KVwpL2csZD0vXFtcWyguKz8pXF1cXS9nO2xldCBUPXQ7aWYociYmciE9PSJhbGwiKXN3aXRjaChyKXtjYXNlImFyY2hpdmVkIjpUPXQuZmlsdGVyKGk9Pmkucm93U3RhdHVzPT09IkFSQ0hJVkVEIiYmIWkuZGVsZXRlZEF0KTticmVhaztjYXNlImRlbGV0ZWQiOlQ9dC5maWx0ZXIoaT0+aS5kZWxldGVkQXQhPT0iIiYmaS5kZWxldGVkQXQpO2JyZWFrO2Nhc2UiZG9uZVRhc2tzIjpUPXQuZmlsdGVyKGk9PmkudGhpbm9UeXBlPT09IlRBU0stRE9ORSIpO2JyZWFrO2Nhc2UiY29tbWVudHMiOlQ9dC5maWx0ZXIoaT0+aS5jb250ZW50LmluY2x1ZGVzKCJjb21tZW50OiIpKTticmVha31lbHNlIFQ9dC5maWx0ZXIoaT0+IShhJiZpLnJvd1N0YXR1cz09PSJBUkNISVZFRCJ8fHMmJmkuZGVsZXRlZEF0fHxjJiZpLmNvbnRlbnQuaW5jbHVkZXMoImNvbW1lbnQ6Iil8fG4mJmkudGhpbm9UeXBlPT09IlRBU0stRE9ORSIpKTtpZihudChlKSlyZXR1cm4gVDtjb25zdHt0YWc6eSxkdXJhdGlvbjpmLHR5cGU6Zyx0ZXh0OlMsZmlsdGVyOncscGF0aDpiLG1ldGFkYXRhOk99PWUsRj1TPy50b0xvd2VyQ2FzZSgpfHwiIixsdD0hT3x8T2JqZWN0LmtleXMoTykubGVuZ3RoPT09MCxVPUY/dHQoRik6bnVsbDtyZXR1cm4gVC5maWx0ZXIoaT0+e2lmKHcpdHJ5e2NvbnN0IEE9ZS5maWx0ZXJDb250ZW50O2lmKEFycmF5LmlzQXJyYXkoQSkmJiFzdChpLEEpKXJldHVybiExfWNhdGNoKEEpe2NvbnNvbGUuZXJyb3IoIkZhaWxlZCB0byBwYXJzZSBxdWVyeSBmaWx0ZXJzOiIsQSl9aWYoIWx0JiZPYmplY3Qua2V5cyhPKS5zb21lKEU9PmkuZmlsZUluZm8/LmZyb250bWF0dGVyW0VdIT09T1tFXSl8fGImJmkucGF0aCYmIWkucGF0aC50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKGIudG9Mb3dlckNhc2UoKSkpcmV0dXJuITE7aWYoVSl7Y29uc3QgQT1VKGkuY29udGVudC50b0xvd2VyQ2FzZSgpKSxFPWkucGF0aD9pLnBhdGgudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyhGKTohMTtpZihpLnRoaW5vVHlwZT09PSJNVUxUSSImJmkucGF0aCl7aWYoIUEmJiFFKXJldHVybiExfWVsc2UgaWYoIUEpcmV0dXJuITF9aWYoeSl7Y29uc3QgQT1RKGkuY29udGVudCksRT1sP1ooaS5maWxlSW5mbz8udGFnc3x8W10pOm5ldyBTZXQ7aWYoIUEuaGFzKHkpJiYhRS5oYXMoeSkpcmV0dXJuITF9aWYoZiYmZi5mcm9tIT09MCYmZi50byE9PTApe2NvbnN0IEE9cnQoaS5jcmVhdGVkQXQpO2lmKEE8Zi5mcm9tfHxBPmYudG8pcmV0dXJuITF9aWYoZylzd2l0Y2goZyl7Y2FzZSJOT1RfVEFHR0VEIjppZihpLmNvbnRlbnQubWF0Y2godSl8fGkuY29udGVudC5tYXRjaChwKXx8aS5jb250ZW50Lm1hdGNoKGgpKXJldHVybiExO2JyZWFrO2Nhc2UiTElOS0VEIjppZighaS5jb250ZW50Lm1hdGNoKE4pKXJldHVybiExO2JyZWFrO2Nhc2UiSU1BR0VEIjppZighaS5jb250ZW50Lm1hdGNoKG0pKXJldHVybiExO2JyZWFrO2Nhc2UiQ09OTkVDVEVEIjppZighaS5jb250ZW50Lm1hdGNoKGQpKXJldHVybiExO2JyZWFrfXJldHVybiEwfSl9ZnVuY3Rpb24gbnQodCl7aWYoIXQpcmV0dXJuITA7Y29uc3R7dGFnOmUsZHVyYXRpb246byx0eXBlOnIsdGV4dDphLGZpbHRlcjpzLHBhdGg6bixtZXRhZGF0YTpjfT10LGw9IWN8fE9iamVjdC5rZXlzKGMpLmxlbmd0aD09PTA7cmV0dXJuIShlfHxvJiZvLmZyb208by50b3x8cnx8YXx8c3x8bnx8IWwpfWZ1bmN0aW9uIHJ0KHQpe3JldHVybiBuZXcgRGF0ZSh0KS5nZXRUaW1lKCl9ZnVuY3Rpb24gc3QodCxlKXtpZighQXJyYXkuaXNBcnJheShlKXx8ZS5sZW5ndGg9PT0wKXJldHVybiEwO2xldCBvPUcodCxlWzBdKTtmb3IobGV0IHI9MTtyPGUubGVuZ3RoO3IrKyl7Y29uc3QgYT1lW3JdLHM9Ryh0LGEpO2EucmVsYXRpb249PT0iT1IiP289b3x8czpvPW8mJnN9cmV0dXJuIG99ZnVuY3Rpb24gRyh0LGUpe2lmKCFlfHx0eXBlb2YgZSE9Im9iamVjdCJ8fCFlLnR5cGV8fCFlLnZhbHVlfHx0eXBlb2YgZS52YWx1ZSE9Im9iamVjdCIpcmV0dXJuITA7Y29uc3R7dHlwZTpvLHZhbHVlOnJ9PWUsYT1yLm9wZXJhdG9yLHM9ci52YWx1ZTtzd2l0Y2gobyl7Y2FzZSJUQUciOntjb25zdCBuPXR5cGVvZiBzPT0ic3RyaW5nIj9zOiIiLGM9dC5jb250ZW50LmluY2x1ZGVzKGAjJHtufWApO3JldHVybiBhPT09IkNPTlRBSU4iP2M6IWN9Y2FzZSJURVhUIjp7Y29uc3Qgbj10eXBlb2Ygcz09InN0cmluZyI/cy50b0xvd2VyQ2FzZSgpOiIiLGM9dC5jb250ZW50LnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMobik7cmV0dXJuIGE9PT0iQ09OVEFJTiI/YzohY31jYXNlIlRZUEUiOntsZXQgbj0hMTtyZXR1cm4ocz09PSJOT1RfVEFHR0VEIiYmdC5jb250ZW50Lm1hdGNoKEMpPT09bnVsbCYmdC5jb250ZW50Lm1hdGNoKE0pPT09bnVsbHx8cz09PSJMSU5LRUQiJiZ0LmNvbnRlbnQubWF0Y2goQikhPT1udWxsfHxzPT09IklNQUdFRCImJnQuY29udGVudC5tYXRjaChYKSE9PW51bGx8fHM9PT0iQ09OTkVDVEVEIiYmdC5jb250ZW50Lm1hdGNoKHopIT09bnVsbCkmJihuPSEwKSxhPT09IklTIj9uOiFufWNhc2UiREFURSI6e2NvbnN0IG49dHlwZW9mIHM9PSJzdHJpbmciP25ldyBEYXRlKHMpOnR5cGVvZiBzPT0ib2JqZWN0IiYmcyE9PW51bGwmJiJ2YWx1ZSJpbiBzP25ldyBEYXRlKHMudmFsdWUpOm51bGw7aWYoIW4pcmV0dXJuITA7Y29uc3QgYz1uZXcgRGF0ZSh0LmNyZWF0ZWRBdCk7cmV0dXJuIGE9PT0iQ09OVEFJTiI/Yz49bjpjPG59Y2FzZSJMSVNUIjpzd2l0Y2gocyl7Y2FzZSJUT0RPIjp7Y29uc3Qgbj10LnRoaW5vVHlwZT09PSJUQVNLLVRPRE8iO3JldHVybiBhPT09IklTIj9uOiFufWNhc2UiRE9ORSI6e2NvbnN0IG49dC50aGlub1R5cGU9PT0iVEFTSy1ET05FIjtyZXR1cm4gYT09PSJJUyI/bjohbn1jYXNlIkxJU1QiOntjb25zdCBuPXQudGhpbm9UeXBlPT09IkpPVVJOQUwiO3JldHVybiBhPT09IklTIj9uOiFufWNhc2UiT1RIRVIiOntjb25zdCBuPSFbIlRBU0stVE9ETyIsIlRBU0stRE9ORSIsIkpPVVJOQUwiXS5pbmNsdWRlcyh0LnRoaW5vVHlwZSk7cmV0dXJuIGE9PT0iSVMiP246IW59ZGVmYXVsdDpyZXR1cm4hMH1jYXNlIlNPVVJDRSI6cmV0dXJuIGE9PT0iSVMiP3Quc291cmNlVHlwZT09PXM6dC5zb3VyY2VUeXBlIT09cztjYXNlIlBBVEgiOntpZighdC5wYXRoKXJldHVybiBhIT09IkNPTlRBSU4iO2NvbnN0IG49dHlwZW9mIHM9PSJzdHJpbmciP3MudG9Mb3dlckNhc2UoKToiIixjPXQucGF0aC50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKG4pO3JldHVybiBhPT09IkNPTlRBSU4iP2M6IWN9Y2FzZSJNRVRBREFUQSI6e2lmKCF0LmZpbGVJbmZvPy5mcm9udG1hdHRlcilyZXR1cm4gYSE9PSJDT05UQUlOIjtjb25zdCBuPXR5cGVvZiBzPT0ib2JqZWN0IiYmcyE9PW51bGw/czp7bmFtZToiIix2YWx1ZToiIn0sYz0ibmFtZSJpbiBuP24ubmFtZToiIixsPSJ2YWx1ZSJpbiBuP24udmFsdWU6IiI7aWYoIWMpcmV0dXJuITA7Y29uc3QgdT10LmZpbGVJbmZvLmZyb250bWF0dGVyW2NdPT09bDtyZXR1cm4gYT09PSJDT05UQUlOIj91OiF1fWNhc2UiVElNRV9SQU5HRSI6e2NvbnN0IG49bmV3IERhdGU7bGV0IGMsbD1uO2lmKHR5cGVvZiBzIT0ic3RyaW5nIilyZXR1cm4hMDtzd2l0Y2gocyl7Y2FzZSI3ZCI6Yz1JKG4sNyk7YnJlYWs7Y2FzZSIxNGQiOmM9SShuLDE0KTticmVhaztjYXNlIjMwZCI6Yz1JKG4sMzApO2JyZWFrO2Nhc2UiOTBkIjpjPUkobiw5MCk7YnJlYWs7Y2FzZSIxODBkIjpjPUkobiwxODApO2JyZWFrO2Nhc2UiMzY1ZCI6Yz1JKG4sMzY1KTticmVhaztjYXNlInRoaXNXZWVrIjpjPWoobiksbD14KG4pO2JyZWFrO2Nhc2UidGhpc01vbnRoIjpjPUgobiksbD0kKG4pO2JyZWFrO2Nhc2UidGhpc1llYXIiOmM9UihuKSxsPVkobik7YnJlYWs7Y2FzZSJsYXN0V2VlayI6e2NvbnN0IHA9SShuLDcpO2M9aihwKSxsPXgocCk7YnJlYWt9Y2FzZSJsYXN0TW9udGgiOntjb25zdCBwPXEobik7Yz1IKHApLGw9JChwKTticmVha31jYXNlImxhc3RZZWFyIjp7Y29uc3QgcD1KKG4pO2M9UihwKSxsPVkocCk7YnJlYWt9ZGVmYXVsdDpyZXR1cm4hMH1jb25zdCB1PW5ldyBEYXRlKHQuY3JlYXRlZEF0KTtyZXR1cm4gYT09PSJXSVRISU4iP1AodSx7c3RhcnQ6YyxlbmQ6bH0pOmE9PT0iQkVGT1JFIj91PGM6ITB9ZGVmYXVsdDpyZXR1cm4hMH19Y29uc3Qgb3Q9dD0+e2NvbnN0IGU9e307cmV0dXJuIHQuZm9yRWFjaChvPT57Y29uc3Qgcj1vLmNyZWF0ZWRBdC5zcGxpdCgiICIpWzBdO2Vbcl0/ZVtyXSsrOmVbcl09MX0pLE9iamVjdC5rZXlzKGUpLnNvcnQoKG8scik9PmVbcl0tZVtvXSlbMF18fCIifSxhdD10PT57Y29uc3QgZT17fTtyZXR1cm4gdC5mb3JFYWNoKG89Pntjb25zdCByPW8uY3JlYXRlZEF0LnNsaWNlKDExLDEzKTtlW3JdP2Vbcl0rKzplW3JdPTF9KSxPYmplY3Qua2V5cyhlKS5zb3J0KChvLHIpPT5lW3JdLWVbb10pWzBdfHwiIn0sY3Q9KHQsZSk9Pntjb25zdCByPU1hdGguYWJzKGUuZ2V0VGltZSgpLXQuZ2V0VGltZSgpKTtyZXR1cm4gTWF0aC5yb3VuZChyLzg2NGU1KSsxfTtmdW5jdGlvbiBpdCh0LGUpe2NvbnN0IG89bmV3IFNldCxyPXt9LGE9bmV3IE1hcDtmb3IoY29uc3QgcyBvZiB0KXtpZihzLmRlbGV0ZWRBdCE9PSIiJiZzLmRlbGV0ZWRBdHx8cy5yb3dTdGF0dXM9PT0iQVJDSElWRUQiKWNvbnRpbnVlO2NvbnN0IG49W107aWYoIWEuaGFzKHMucGF0aCkmJnMuc291cmNlVHlwZSE9PSJGSUxFIil7Y29uc3QgdT1lLmZpbHRlclRhZ3NJbkZpbGU/QXJyYXkuaXNBcnJheShzPy5maWxlSW5mbz8udGFncyk/cy5maWxlSW5mby50YWdzOltdOltdLHA9ZS5maWx0ZXJUYWdzSW5GaWxlP3U6dS5maWx0ZXIoaD0+aCkubWFwKGg9PmgudG9TdHJpbmcoKS50cmltKCkpO2Euc2V0KHMucGF0aCxwKSxuLnB1c2goLi4ucCl9Y29uc3QgYz1zLmNvbnRlbnQucmVwbGFjZSgvPFtePl0qPi9nLCIiKS5yZXBsYWNlKC9cYFxgXGAoLiopP1xuW1xzXFNdKj9cblxgXGBcYC9nbSwiIikucmVwbGFjZSgvXGAoW15cYF0uKj8pXGAvZywiIiksbD1bLi4uQXJyYXkuZnJvbShjLm1hdGNoKEMpfHxbXSksLi4uQXJyYXkuZnJvbShjLm1hdGNoKEspfHxbXSksLi4uQXJyYXkuZnJvbShjLm1hdGNoKE0pfHxbXSldO24ucHVzaCguLi5sKTtmb3IoY29uc3QgdSBvZiBuKXtpZighdXx8dT09PSJ1bmRlZmluZWQifHwhdSljb250aW51ZTtsZXQgcD11O3R5cGVvZiB1IT0ic3RyaW5nIiYmKHA9dT8udG9TdHJpbmcoKSk7Y29uc3QgaD1wPy5yZXBsYWNlKEMsIiQxIik/LnJlcGxhY2UoSywiJDEiKT8ucmVwbGFjZShNLCIkMiIpPy50cmltKCk7L15cZCskLy50ZXN0KGgpfHwoby5hZGQoaCkscltoXT0ocltoXXx8MCkrMSl9fXJldHVybnt0YWdzU2V0Om8sY291bnRzOnJ9fXNlbGYuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsdD0+e1Byb21pc2UucmVzb2x2ZSgpLnRoZW4oYXN5bmMoKT0+e3RyeXtjb25zdHt0eXBlOmUsZGF0YTpvfT10LmRhdGE7aWYoZT09PSJmaWx0ZXItbWVtb3MiKXtjb25zdHttZW1vczpyLHF1ZXJ5OmEsZmlsdGVyT3B0aW9uczpzfT1vLG49ZXQocixhLHMpO3Bvc3RNZXNzYWdlKHt0eXBlOiJmaWx0ZXItcmVzdWx0IixkYXRhOm59KX1lbHNlIGlmKGU9PT0iYnVpbGQtdGFnLXRyZWUiKXtjb25zdHttZW1vczpyLGZpbHRlck9wdGlvbnM6YX09byx7dGFnc1NldDpzLGNvdW50czpufT1pdChyLGEpO3Bvc3RNZXNzYWdlKHt0eXBlOiJidWlsZC10YWctdHJlZS1yZXN1bHQiLGRhdGE6e3RhZ3NTZXQ6cyxjb3VudHM6bn19KX1lbHNlIGlmKGU9PT0iY2FsY3VsYXRlLXN0YXRzLWJhbm5lciIpe2NvbnN0e21lbW9zOnIsdGFnczphfT1vLHM9ci5maWx0ZXIoZD0+IShkLmRlbGV0ZWRBdCE9PSIiJiZkLmRlbGV0ZWRBdCkpLmxlbmd0aCxuPWEubGVuZ3RoLGM9ci5sZW5ndGg+MD9yW3IubGVuZ3RoLTFdOm51bGw7bGV0IGw9MDtpZihjJiZjLmNyZWF0ZWRBdCl7Y29uc3QgZD1jLmNyZWF0ZWRBdC5zcGxpdCgiICIpWzBdLnNwbGl0KCIvIiksVD1uZXcgRGF0ZShwYXJzZUludChkWzBdKSxwYXJzZUludChkWzFdKS0xLHBhcnNlSW50KGRbMl0pKTtsPWN0KFQsbmV3IERhdGUpfWNvbnN0IHA9ci5maWx0ZXIoZD0+IWQuZGVsZXRlZEF0JiZkLnJvd1N0YXR1cyE9PSJBUkNISVZFRCIpLmZpbHRlcihkPT5kLnRoaW5vVHlwZSYmZC50aGlub1R5cGU/LnN0YXJ0c1dpdGgoIlRBU0siKSkubGVuZ3RoLGg9b3QociksTj1hdChyKSxtPXM+OTk5OXx8bj45OTl8fGw+OTk5O3Bvc3RNZXNzYWdlKHt0eXBlOiJzdGF0cy1iYW5uZXItcmVzdWx0IixkYXRhOnttZW1vc0xlbmd0aDpzLHRhZ3NMZW5ndGg6bixjcmVhdGVkRGF5czpsLHRhc2tBbW91bnQ6cCxtb3N0QWN0aXZlRGF5OmgsbW9zdEFjdGl2ZUhvdXI6TixlYXJsaWVzdE1lbW86YyxsZW5ndGhPdmVyZmxvdzptfX0pfWVsc2UgaWYoZT09PSJjYWxjdWxhdGUtc3RhdHMiKXtjb25zdHttZW1vczpyfT1vLGE9bmV3IERhdGUscz1uZXcgRGF0ZShhKSxuPVsuLi5BcnJheSgzMCldLm1hcCgoeSxmKT0+e2NvbnN0IGc9bmV3IERhdGUocyk7Zy5zZXREYXRlKHMuZ2V0RGF0ZSgpLSgyOS1mKSk7Y29uc3QgUz1nLnRvSVNPU3RyaW5nKCkuc3BsaXQoIlQiKVswXS5yZXBsYWNlKC8tL2csIi8iKSx3PXIuZmlsdGVyKGI9PmIuY3JlYXRlZEF0LnNwbGl0KCIgIilbMF09PT1TKS5sZW5ndGg7cmV0dXJue2RhdGU6YCR7KGcuZ2V0TW9udGgoKSsxKS50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX0vJHtnLmdldERhdGUoKS50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX1gLGNvdW50Ond9fSksYz1hLmdldE1vbnRoKCksbD1hLmdldEZ1bGxZZWFyKCksdT1uZXcgRGF0ZShsLGMrMSwwKS5nZXREYXRlKCkscD1bLi4uQXJyYXkodSldLm1hcCgoeSxmKT0+e2NvbnN0IGc9bmV3IERhdGUobCxjLGYrMSksUz1nLnRvSVNPU3RyaW5nKCkuc3BsaXQoIlQiKVswXS5yZXBsYWNlKC8tL2csIi8iKSx3PXIuZmlsdGVyKGI9PmIuY3JlYXRlZEF0LnNwbGl0KCIgIilbMF09PT1TKS5sZW5ndGg7cmV0dXJue2RhdGU6YCR7KGcuZ2V0TW9udGgoKSsxKS50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX0vJHtnLmdldERhdGUoKS50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX1gLGNvdW50Ond9fSksaD1bLi4uQXJyYXkoMTIpXS5tYXAoKHksZik9Pntjb25zdCBnPW5ldyBEYXRlKGwsZiwxKSxTPWcudG9JU09TdHJpbmcoKS5zbGljZSgwLDcpLnJlcGxhY2UoLy0vZywiLyIpLHc9ci5maWx0ZXIoYj0+Yi5jcmVhdGVkQXQuc2xpY2UoMCw3KT09PVMpLmxlbmd0aDtyZXR1cm57ZGF0ZTpgJHsoZy5nZXRNb250aCgpKzEpLnRvU3RyaW5nKCkucGFkU3RhcnQoMiwiMCIpfWAsY291bnQ6d319KSxOPVsuLi5BcnJheSgyNCldLm1hcCgoeSxmKT0+e2NvbnN0IGc9ci5maWx0ZXIoUz0+cGFyc2VJbnQoUy5jcmVhdGVkQXQuc3BsaXQoIiAiKVsxXS5zcGxpdCgiOiIpWzBdKT09PWYpLmxlbmd0aDtyZXR1cm57aG91cjpgJHtmLnRvU3RyaW5nKCkucGFkU3RhcnQoMiwiMCIpfTowMGAsY291bnQ6Z319KSxtPVt7cGVyaW9kOiIwMDowMC0wMzowMCIsY291bnQ6MH0se3BlcmlvZDoiMDM6MDAtMDY6MDAiLGNvdW50OjB9LHtwZXJpb2Q6IjA2OjAwLTA5OjAwIixjb3VudDowfSx7cGVyaW9kOiIwOTowMC0xMjowMCIsY291bnQ6MH0se3BlcmlvZDoiMTI6MDAtMTU6MDAiLGNvdW50OjB9LHtwZXJpb2Q6IjE1OjAwLTE4OjAwIixjb3VudDowfSx7cGVyaW9kOiIxODowMC0yMTowMCIsY291bnQ6MH0se3BlcmlvZDoiMjE6MDAtMjQ6MDAiLGNvdW50OjB9XTtyLmZvckVhY2goeT0+e2NvbnN0IGY9cGFyc2VJbnQoeS5jcmVhdGVkQXQuc3BsaXQoIiAiKVsxXS5zcGxpdCgiOiIpWzBdKTtmPDM/bVswXS5jb3VudCsrOmY8Nj9tWzFdLmNvdW50Kys6Zjw5P21bMl0uY291bnQrKzpmPDEyP21bM10uY291bnQrKzpmPDE1P21bNF0uY291bnQrKzpmPDE4P21bNV0uY291bnQrKzpmPDIxP21bNl0uY291bnQrKzptWzddLmNvdW50Kyt9KTtjb25zdCBUPVt7bWluOjAsbWF4OjI1LGxhYmVsOiIwLTI1In0se21pbjoyNixtYXg6NTAsbGFiZWw6IjI2LTUwIn0se21pbjo1MSxtYXg6NzUsbGFiZWw6IjUxLTc1In0se21pbjo3NixtYXg6MTAwLGxhYmVsOiI3Ni0xMDAifSx7bWluOjEwMSxtYXg6MjAwLGxhYmVsOiIxMDEtMjAwIn0se21pbjoyMDEsbWF4OjUwMCxsYWJlbDoiMjAxLTUwMCJ9LHttaW46NTAxLG1heDoxLzAsbGFiZWw6IjUwMCsifV0ubWFwKHk9Pih7cmFuZ2U6eS5sYWJlbCxjb3VudDpyLmZpbHRlcihmPT57Y29uc3QgZz1mLmNvbnRlbnQubGVuZ3RoO3JldHVybiBnPj15Lm1pbiYmZzw9eS5tYXh9KS5sZW5ndGh9KSk7cG9zdE1lc3NhZ2Uoe3R5cGU6InN0YXRzLXJlc3VsdCIsZGF0YTp7ZGFpbHlEYXRhOm4sbW9udGhseURhdGE6cCx5ZWFybHlEYXRhOmgsaG91cmx5RGF0YTpOLHRpbWVEaXN0RGF0YTptLGxlbmd0aERhdGE6VH19KX19Y2F0Y2goZSl7Y29uc29sZS5lcnJvcigiV29ya2VyIGZhaWxlZCB0byBwcm9jZXNzOiIsZSkscG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIixlcnJvcjplLm1lc3NhZ2V8fCJVbmtub3duIGVycm9yIGluIHdvcmtlciJ9KX19KX0pfSkoKTsK",$$=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),VN=typeof self<"u"&&self.Blob&&new Blob([$$(CF)],{type:"text/javascript;charset=utf-8"});function K$(e){let t;try{if(t=VN&&(self.URL||self.webkitURL).createObjectURL(VN),!t)throw"";const n=new Worker(t,{name:e?.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;base64,"+CF,{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}function Uh(){let e,t;const r=new Promise((o,a)=>{e=o,t=a});return r.resolve=e,r.reject=t,r}const WN={workers:8,utilization:.75,workerName:"Thino Parser Worker"},$v={BUILD_TAG_TREE:0,CALCULATE_STATS:0,CALCULATE_STATS_BANNER:0,FILTER_MEMOS:2},J$=e=>{const t={...e};if(e.filter){const n=St.getQueryById(e.filter);n&&n.querystring&&(t.filterContent=JSON.parse(n.querystring))}return t};class MF extends A.Component{workers;nextWorkerId;shutdown;taskQueue;outstanding;throttle;cacheVersion=0;memoVersions=new Map;app;plugin;constructor(t,n,r,o){super(),this.workers=new Map,this.shutdown=!1,this.nextWorkerId=0,this.throttle=r??(()=>({...WN,workerName:o??WN.workerName})),this.taskQueue=[],this.outstanding=new Map,this.app=t,this.plugin=n}import(t){const n=t.map(a=>a.id).join(","),r=this.outstanding.get(n);if(r)return r;const o=Uh();return this.outstanding.set(n,o),this.addToQueue({type:"FILTER_MEMOS",memos:t,promise:o,priority:2,timestamp:Date.now()}),this.schedule(),o}addToQueue(t){this.taskQueue.push(t),this.taskQueue.sort((n,r)=>n.priority!==r.priority?n.priority-r.priority:n.timestamp-r.timestamp)}getNextTask(){if(this.taskQueue.length!==0)return this.taskQueue.shift()}unthrottle(){for(const t of this.workers.values())t.availableAt=Date.now()}async schedule(){if(this.taskQueue.length===0||this.shutdown)return;const t=this.availableWorker();if(!t)return;const n=this.getNextTask();if(n){t.active=[n.memos,n.promise,Date.now()];try{switch(n.type){case"CALCULATE_STATS":t.worker.postMessage({type:"calculate-stats",data:{memos:n.memos}});break;case"CALCULATE_STATS_BANNER":t.worker.postMessage({type:"calculate-stats-banner",data:{memos:n.memos,tags:n.tags||[]}});break;case"FILTER_MEMOS":t.worker.postMessage({type:"filter-memos",data:{memos:n.memos,query:J$(n.query),filterOptions:n.filterOptions}});break;case"BUILD_TAG_TREE":t.worker.postMessage({type:"build-tag-tree",data:{memos:n.memos,filterOptions:n.filterOptions}});break}}catch{t.active=void 0,setTimeout(this.schedule.bind(this),0)}}}finish(t,n){if(!t.active)return;const[r,o,a]=t.active;"error"in n?o.reject(n.error):o.resolve(n);const i=r.map(s=>s.id).join(",");if(this.outstanding.delete(i),this.workers.size>this.throttle().workers)this.workers.delete(t.id),GN(t);else{const s=Date.now(),l=Math.max(.1,this.throttle().utilization)-1,u=(s-a)*l;t.active=void 0,u<=1e-10?(t.availableAt=s,this.schedule()):(t.availableAt=s+u,setTimeout(this.schedule.bind(this),u))}}availableWorker(){const t=Date.now();for(const n of this.workers.values())if(!n.active&&n.availableAt<=t)return n;if(this.workers.size<this.throttle().workers){const n=this.newWorker();return this.workers.set(n.id,n),n}}newWorker(){const t={id:this.nextWorkerId++,availableAt:Date.now(),worker:new K$,name:this.throttle().workerName};return t.worker.onmessage=async n=>await this.handleWorkerMessage(t,n.data),t}onunload(){for(const t of this.workers.values())GN(t);for(;this.taskQueue.length>0;){const t=this.taskQueue.shift();t&&t.promise.reject("Terminated")}this.shutdown=!0}invalidateCache(t){if(!t||t.length===0){this.cacheVersion++;return}for(const r of t){const o=this.memoVersions.get(r)||0;this.memoVersions.set(r,o+1)}const n=[];this.outstanding.forEach((r,o)=>{const a=o.split("_");t.some(s=>a.includes(s))&&n.push(o)}),n.forEach(r=>this.outstanding.delete(r))}getVersionString(t){let n=`_v${this.cacheVersion}`;if(t&&t.length>0){const r=t.map(o=>`${o.id}:${this.memoVersions.get(o.id)||0}`).join(";");n+=`_m${r}`}return n}async calculateStats(t,n=!1){try{if(!t||t.length===0)return{};const r=n?`_force${Date.now()}`:this.getVersionString(t),o=t.map(s=>s.id).join(",")+"_stats"+r,a=this.outstanding.get(o);if(a&&!n)return a;const i=Uh();return this.outstanding.set(o,i),this.addToQueue({type:"CALCULATE_STATS",memos:t,promise:i,priority:$v.CALCULATE_STATS,timestamp:Date.now()}),this.schedule(),i}catch(r){return console.error("Obsidian-Thino: Failed to calculate stats. "+r),Promise.reject(r)}}async calculateStatsBanner(t,n,r=!1){try{if(!t||t.length===0)return{memosLength:0,tagsLength:n?.length||0,createdDays:0,taskAmount:0,mostActiveDay:"",mostActiveHour:"",earliestMemo:null,lengthOverflow:!1};const o=r?`_force${Date.now()}`:this.getVersionString(t),a=t.map(l=>l.id).join(",")+"_banner"+o,i=this.outstanding.get(a);if(i&&!r)return i;const s=Uh();return this.outstanding.set(a,s),this.addToQueue({type:"CALCULATE_STATS_BANNER",memos:t,tags:n,promise:s,priority:$v.CALCULATE_STATS_BANNER,timestamp:Date.now()}),this.schedule(),s}catch(o){return console.error("Obsidian-Thino: Failed to calculate banner stats. "+o),Promise.reject(o)}}async filterMemos(t,n,r={},o=!1){try{if(!t||t.length===0)return[];const a=JSON.stringify(n),i=JSON.stringify({...r,filterTagsInFile:this.plugin.settings.FilterByMetadata}),s=o?`_force${Date.now()}`:this.getVersionString(t),l=t.map(h=>h.id).join(",")+"_filter_"+a+"_"+i+s,u=this.outstanding.get(l);if(u&&!o)return u;const f=Uh();return this.outstanding.set(l,f),this.addToQueue({type:"FILTER_MEMOS",memos:t,promise:f,query:n,filterOptions:r,priority:$v.FILTER_MEMOS,timestamp:Date.now()}),this.schedule(),f}catch(a){return console.error("Obsidian-Thino: Failed to filter memos. "+a),Promise.reject(a)}}async buildTagTree(t,n=!1){try{if(!t||t.length===0)return{};const r={filterTagsInFile:this.plugin.settings.FilterByMetadata},o=n?`_force${Date.now()}`:this.getVersionString(t),a=t.map(l=>l.id).join(",")+"_tags_"+JSON.stringify(r)+o,i=this.outstanding.get(a);if(i&&!n)return i;const s=Uh();return this.outstanding.set(a,s),this.addToQueue({type:"BUILD_TAG_TREE",memos:t,promise:s,filterOptions:r,priority:$v.BUILD_TAG_TREE,timestamp:Date.now()}),this.schedule(),s}catch(r){return console.error("Obsidian-Thino: Failed to build tag tree. "+r),Promise.reject(r)}}async handleWorkerMessage(t,n){if(n.type==="stats-result"){t.active&&this.finish(t,n.data);return}if(n.type==="stats-banner-result"){t.active&&this.finish(t,n.data);return}if(n.type==="filter-result"){t.active&&this.finish(t,n.data);return}if(n.type==="build-tag-tree-result"){t.active&&this.finish(t,n.data);return}if(n.type==="error"){t.active&&this.finish(t,{error:n.error});return}}memoUpdated(t){const n=this.memoVersions.get(t)||0;this.memoVersions.set(t,n+1);const r=[];this.outstanding.forEach((o,a)=>{a.includes(t)&&r.push(a)}),r.forEach(o=>this.outstanding.delete(o))}memosUpdated(t){if(!t||t.length===0)return;for(const r of t){const o=this.memoVersions.get(r)||0;this.memoVersions.set(r,o+1)}const n=[];this.outstanding.forEach((r,o)=>{const a=o.split(",")[0].split("_");t.some(s=>a.includes(s))&&n.push(o)}),n.forEach(r=>this.outstanding.delete(r))}}function GN(e){e.worker.terminate(),e.active&&e.active[1].reject("Terminated"),e.active=void 0}function X$(e){return e.thinoWorkerManager||(e.thinoWorkerManager=new MF(e.app,e),e.addChild(e.thinoWorkerManager)),e.thinoWorkerManager}const _l=async({memos:e,query:t={},filterOptions:n={},plugin:r})=>{const o={onlyFilterType:"all",filterArchived:!0,filterDeleted:!0,filterDoneTasks:!!n.filterDoneTasks,filterComments:!0,...n},a={...t};try{return await X$(r).filterMemos(e,a,o)}catch(i){return console.error("Failed to filter memos using worker, falling back to synchronous filtering",i),Q$(e,a,o)}};function Q$(e,t,n){const{filterArchived:r=!0,filterDeleted:o=!0,filterDoneTasks:a=!1,filterComments:i=!0}=n,s=e.filter(x=>!(r&&x.rowStatus==="ARCHIVED"||o&&x.deletedAt||i&&x.content.includes("comment:")||a&&x.thinoType==="TASK-DONE"));if(eK(t))return s;const{tag:l,duration:u,type:f,text:h,filter:p,path:m,metadata:w}=t,b=h?.toLowerCase()||"",y=!w||Object.keys(w).length===0,S=b?A.prepareSimpleSearch(b):null;return s.filter(x=>{if(p){const E=St.getQueryById(p);if(E){const C=JSON.parse(E.querystring);if(Array.isArray(C)&&!nK(x,C))return!1}}if(!y&&Object.keys(w).some(C=>x.fileInfo?.frontmatter[C]!==w[C])||m&&x.path&&!x.path.toLowerCase().includes(m.toLowerCase()))return!1;if(S){const E=S(x.content.toLowerCase()),C=x.path?x.path.toLowerCase().includes(b):!1;if(x.thinoType==="MULTI"&&x.path){if(!E&&!C)return!1}else if(!E)return!1}if(l){const E=DF(x.content),C=x?.fileInfo?.tags?tK(x.fileInfo.tags):new Set;if(!E.has(l)&&!C.has(l))return!1}if(u&&u.from!==0&&u.to!==0){const E=je.getTimeStampByDate(x.createdAt);if(E<u.from||E>u.to)return!1}if(f)switch(f){case"NOT_TAGGED":if(x.content.match(Ef)||x.content.match(ng)||x.content.match(rC))return!1;break;case"LINKED":if(!x.content.match($w))return!1;break;case"IMAGED":if(!x.content.match(Kw))return!1;break;case"CONNECTED":if(!x.content.match(yu))return!1;break}return!0})}function eK(e){if(!e)return!0;const{tag:t,duration:n,type:r,text:o,filter:a,path:i,metadata:s}=e,l=!s||Object.keys(s).length===0;return!(t||n&&n.from<n.to||r||o||a||i||!l)}function DF(e){return[Ef,rC,ng]?.reduce((n,r)=>((e.match(r)||[]).forEach(o=>{const i=(o?.replace(r,"$1").trim()).split("/");let s="";i.forEach(l=>{s+=l,n.add(s),s+="/"})}),n),new Set)}function tK(e){if(!Array.isArray(e)||e.length===0)return new Set;const t=e.filter(r=>!!r).map(r=>r.toString().trim());if(t.length===0)return new Set;const n=new Set;return t.forEach(r=>{const o=r.split("/");let a="";o.forEach((i,s)=>{a+=(s>0?"/":"")+i,n.add(a)})}),n}function nK(e,t){return!Array.isArray(t)||t.length===0?!0:t.every(n=>{if(!n||typeof n!="object"||!n.type||!n.value||typeof n.value!="object")return!0;const{type:r,value:o}=n,a=o.operator,i=o.value;switch(r){case"TAG":{const s=typeof i=="string"?i:"",l=e.content.includes(`#${s}`);return a==="CONTAIN"?l:!l}case"TEXT":{const s=typeof i=="string"?i.toLowerCase():"",l=e.content.toLowerCase().includes(s);return a==="CONTAIN"?l:!l}case"TYPE":{let s=!1;return(i==="NOT_TAGGED"&&e.content.match(Ef)===null&&e.content.match(ng)===null||i==="LINKED"&&e.content.match($w)!==null||i==="IMAGED"&&e.content.match(Kw)!==null||i==="CONNECTED"&&e.content.match(yu)!==null)&&(s=!0),a==="IS"?s:!s}case"DATE":{const s=typeof i=="string"?new Date(i):typeof i=="object"&&i!==null&&"value"in i?new Date(i.value):null;if(!s)return!0;const l=new Date(e.createdAt);return a==="CONTAIN"?l>=s:l<s}case"LIST":switch(i){case"TODO":{const s=e.thinoType==="TASK-TODO";return a==="IS"?s:!s}case"DONE":{const s=e.thinoType==="TASK-DONE";return a==="IS"?s:!s}case"LIST":{const s=e.thinoType==="JOURNAL";return a==="IS"?s:!s}case"OTHER":{const s=!["TASK-TODO","TASK-DONE","JOURNAL"].includes(e.thinoType);return a==="IS"?s:!s}default:return!0}case"SOURCE":return a==="IS"?e.sourceType===i:e.sourceType!==i;case"PATH":{if(!e.path)return a!=="CONTAIN";const s=typeof i=="string"?i.toLowerCase():"",l=e.path.toLowerCase().includes(s);return a==="CONTAIN"?l:!l}case"METADATA":{if(!e.fileInfo?.frontmatter)return a!=="CONTAIN";const s=typeof i=="object"&&i!==null?i:{name:"",value:""},l="name"in s?s.name:"",u="value"in s?s.value:"";if(!l)return!0;const f=e.fileInfo.frontmatter[l]===u;return a==="CONTAIN"?f:!f}case"TIME_RANGE":{const s=new Date;let l,u=s;if(typeof i!="string")return!0;switch(i){case"7d":l=ko(s,7);break;case"14d":l=ko(s,14);break;case"30d":l=ko(s,30);break;case"90d":l=ko(s,90);break;case"180d":l=ko(s,180);break;case"365d":l=ko(s,365);break;case"thisWeek":l=Ta(s),u=mb(s);break;case"thisMonth":l=fb(s),u=db(s);break;case"thisYear":l=pb(s),u=hb(s);break;case"lastWeek":{const h=ko(s,7);l=Ta(h),u=mb(h);break}case"lastMonth":{const h=TF(s);l=fb(h),u=db(h);break}case"lastYear":{const h=xF(s);l=pb(h),u=hb(h);break}default:return!0}const f=new Date(e.createdAt);return a==="WITHIN"?SF(f,{start:l,end:u}):a==="BEFORE"?f<l:!0}default:return!0}})}const rK=[{text:I("AND"),value:"AND"},{text:I("OR"),value:"OR"}],Pi={TAG:{value:"TAG",text:I("TAG"),operators:[{text:I("INCLUDE"),value:"CONTAIN"},{text:I("EXCLUDE"),value:"NOT_CONTAIN"}]},TYPE:{value:"TYPE",text:I("TYPE"),operators:[{value:"IS",text:I("IS")},{value:"IS_NOT",text:I("ISNOT")}],values:[{value:"CONNECTED",text:I("LINKED")},{value:"NOT_TAGGED",text:I("NO TAGS")},{value:"LINKED",text:I("HAS LINKS")},{value:"IMAGED",text:I("HAS IMAGES")}]},TEXT:{value:"TEXT",text:I("TEXT"),operators:[{value:"CONTAIN",text:I("INCLUDE")},{value:"NOT_CONTAIN",text:I("EXCLUDE")}]},DATE:{value:"DATE",text:I("DATE"),operators:[{value:"NOT_CONTAIN",text:I("BEFORE")},{value:"CONTAIN",text:I("AFTER")}]},LIST:{value:"LIST",text:I("LIST"),operators:[{value:"IS",text:I("IS")},{value:"IS_NOT",text:I("ISNOT")}],values:[{value:"TODO",text:I("TODO")},{value:"DONE",text:I("DONE")},{value:"LIST",text:I("JOURNAL")},{value:"OTHER",text:I("OTHER")}]},SOURCE:{value:"SOURCE",text:I("SOURCE"),operators:[{value:"IS",text:I("IS")},{value:"IS_NOT",text:I("ISNOT")}],values:[{value:"DAILY",text:I("DAILY")},{value:"MULTI",text:I("MULTI")},{value:"FILE",text:I("FILE")},{value:"CANVAS",text:I("CANVAS")}]},PATH:{value:"PATH",text:I("PATH"),operators:[{value:"CONTAIN",text:I("INCLUDE")},{value:"NOT_CONTAIN",text:I("EXCLUDE")}]},METADATA:{value:"METADATA",text:I("METADATA"),operators:[{value:"CONTAIN",text:I("INCLUDE")},{value:"NOT_CONTAIN",text:I("EXCLUDE")}]},TIME_RANGE:{value:"TIME_RANGE",text:I("TIME RANGE"),operators:[{value:"WITHIN",text:I("WITHIN")},{value:"BEFORE",text:I("BEFORE")}],values:[{value:"7d",text:I("7 days")},{value:"14d",text:I("14 days")},{value:"30d",text:I("30 days")},{value:"90d",text:I("3 months")},{value:"180d",text:I("6 months")},{value:"365d",text:I("1 year")},{value:"thisWeek",text:I("This week")},{value:"thisMonth",text:I("This month")},{value:"thisYear",text:I("This year")},{value:"lastWeek",text:I("Last week")},{value:"lastMonth",text:I("Last month")},{value:"lastYear",text:I("Last year")}]}},II=Pi.TYPE.values,oK=e=>{for(const t of II)if(t.value===e)return t.text;return""},ZN=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),aK=(e,t)=>{if(!t||t.length===0)return!0;let n=qN(e,t[0]);for(let r=1;r<t.length;r++){const o=t[r],{relation:a}=o,i=qN(e,o);a==="OR"?n=n||i:n=n&&i}return n},qN=(e,t)=>{if(!t||typeof t!="object"||!t.type||!t.value||typeof t.value!="object")return!0;const{type:n,value:r}=t,o=r.operator,a=r.value;if(a===""&&n!=="TYPE"&&n!=="LIST")return!0;switch(n){case"TAG":{const i=DF(e.content),s=typeof a=="string"?a:"",l=i.has(s);return o==="CONTAIN"?l:!l}case"TEXT":{const i=typeof a=="string"?a.toLowerCase():"",l=A.prepareSimpleSearch(i)(e.content.toLowerCase());return o==="CONTAIN"?l:!l}case"TYPE":{let i=!1;return(a==="NOT_TAGGED"&&e.content.match(Ef)===null&&e.content.match(ng)===null||a==="LINKED"&&e.content.match($w)!==null||a==="IMAGED"&&e.content.match(Kw)!==null||a==="CONNECTED"&&e.content.match(yu)!==null)&&(i=!0),o==="IS"?i:!i}case"LIST":{const s=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER")===a;return o==="IS"?s:!s}case"SOURCE":return o==="IS"?e.sourceType===a:e.sourceType!==a;case"PATH":{if(!e.path)return o!=="CONTAIN";const i=typeof a=="string"?a.toLowerCase():"",s=e.path.toLowerCase().includes(i);return o==="CONTAIN"?s:!s}case"METADATA":{if(!e.fileInfo?.frontmatter)return o!=="CONTAIN";const i=typeof a=="object"&&a!==null?a:{name:"",value:""},s="name"in i?i.name:"",l="value"in i?i.value:"";if(!s)return!0;const u=e.fileInfo.frontmatter,f=u[s]&&u[s]?.toString().includes(l);return o==="CONTAIN"?f:!f}case"TIME_RANGE":{const i=new Date;let s,l=i;if(typeof a!="string")return!0;switch(a){case"7d":s=ko(i,7);break;case"14d":s=ko(i,14);break;case"30d":s=ko(i,30);break;case"90d":s=ko(i,90);break;case"180d":s=ko(i,180);break;case"365d":s=ko(i,365);break;case"thisWeek":s=Ta(i),l=mb(i);break;case"thisMonth":s=fb(i),l=db(i);break;case"thisYear":s=pb(i),l=hb(i);break;case"lastWeek":{const f=ko(i,7);s=Ta(f),l=mb(f);break}case"lastMonth":{const f=TF(i);s=fb(f),l=db(f);break}case"lastYear":{const f=xF(i);s=pb(f),l=hb(f);break}default:return!0}const u=new Date(e.createdAt);return o==="WITHIN"?SF(u,{start:s,end:l}):o==="BEFORE"?u<s:!0}case"DATE":{let i=null;if(typeof a=="string"){const u=new Date(a);if(!isNaN(u.getTime()))i=u;else{const f=app.plugins.enabledPlugins.has("nldates-obsidian")&&app.plugins.getPlugin("nldates-obsidian");if(f){const h=f.parseDate(a);if(h.date!==null)i=new Date(h.date);else return!0}else return!0}}else typeof a=="object"&&a!==null&&"value"in a&&(i=new Date(a.value));if(!i||isNaN(i.getTime()))return!0;const s=new Date(e.createdAt),l=Kq(s,cb(i));return o==="CONTAIN"?l:!l}default:return!0}};function Nf(e){const[t,n]=D.useState(()=>!!e),r=D.useCallback(o=>{n(typeof o=="boolean"?o:a=>!a)},[]);return[t,r]}const ig=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=D.useContext(it),r=_.useRef(null),o=_.useRef(null),[a,i]=Nf(!1);D.useEffect(()=>{!r||!t||!e||(t.registerEvent(e.workspace.on("blur-on-memos",()=>{r.current?.blur()})),t.registerEvent(e.workspace.on("focus-on-searchBar",()=>{r.current?.focus()})))},[r,e,t]),D.useEffect(()=>{o&&A.setIcon(o.current,"search")},[o]);const s=h=>{const{type:p}=Ye.getState().query;h===p&&(h=""),Ye.setMemoTypeQuery(h)},l=h=>{const p=h.currentTarget.value;if(!p.contains(" -time: ")){Ye.setTextQuery(p);return}const m=p.split(" -time: ")[1],w=m.length>10?m.match(/\d{4}-\d{2}-\d{2}/g):null;if(w==null){Ye.setTextQuery(p.split(" -time: ")[0]);return}if(w.length===1){const b=A.moment(w[0]);Ye.setTimeQuery({from:b.startOf("day").valueOf(),to:b.endOf("day").valueOf()})}else if(w.length===2){const b=A.moment(w[0]),y=A.moment(w[1]);Ye.setTimeQuery({from:b.startOf("day").valueOf(),to:y.endOf("day").valueOf()})}Ye.setTextQuery(p.split(" -time: ")[0])},u=()=>{i(!0)},f=()=>{i(!1)};return g.jsxs("div",{className:"search-bar-container",children:[g.jsxs("div",{className:"search-bar-inputer",children:[g.jsx("span",{ref:o,className:"btn icon-img"}),g.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:u,onMouseOut:f,placeholder:a?I("Type here"):"",onChange:l})]}),g.jsx("div",{className:"quickly-action-wrapper",children:g.jsxs("div",{className:"quickly-action-container",children:[g.jsx("span",{className:"title-text",children:I("Quick filter")}),g.jsxs("div",{className:"section-container types-container",children:[g.jsxs("span",{className:"section-text",children:[I("TYPE"),":"]}),g.jsx("div",{className:"values-container",children:II.map((h,p)=>g.jsxs("div",{children:[g.jsx("span",{className:`type-item ${n===h.value?"selected":""}`,onClick:()=>{s(h.value)},children:h.text}),p+1<II.length?g.jsx("span",{className:"split-text",children:"/"}):null]},h.value))})]})]})})]})},iK=e=>{const{children:t,when:n}=e;return n?g.jsx(g.Fragment,{children:t}):null},js=iK;function It(){const e=document.createDocumentFragment();e.createEl("div",{cls:"thino-info"}).createEl("div",{text:I("This is a pro feature, please upgrade to pro version to use it.")});const r=e.createEl("div",{cls:"thino-link"}).createEl("div",{text:I("You can get pro version from: ")}),o=localStorage.getItem("language");let a="https://pkmer.cn/products/UserProfile/";o&&o==="zh"?a="https://pkmer.cn/products/thino/":a="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:a}}),new A.Notice(e,5e3)}const{exec:sK,execSync:DKe}=A.Platform.isDesktop&&require("child_process"),{createHash:lK}=A.Platform.isDesktop&&require("crypto"),cK={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},uK=A.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${cK[dK()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`,linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"};function dK(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function fK(e){return lK("sha256").update(e).digest("hex")}function hK(e){switch(process.platform){case"darwin":return e.split("IOPlatformUUID")[1].split(`
`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error(`Unsupported platform: ${process.platform}`)}}function pn(e=!1){return new Promise((t,n)=>{sK(uK[process.platform],{},(r,o)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const a=hK(o.toString());return t(e?a:fK(a))})})}const $N={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome",flow:"workflow"},pK=({className:e})=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:o},globalState:{manifest:a,isMobileView:i}}=D.useContext(it),s=D.useRef(null),l=D.useRef(null),[u,f]=D.useState(()=>(window.app||t)?.loadLocalStorage("thinoListView")||"list"),[h,p]=D.useState(null),m=D.useCallback(()=>{if(!n?.leaf||n.leaf.height===0||!h?.settings)return;const S=h.settings.MemoListView;if(h.settings.SupportSelectOtherView||S==="chat"||S==="moments"||S==="flow")return;const x=n.leaf.width>950?S:"list";f(x),Ge.setMemoListView(x)},[n,h]);D.useEffect(()=>{if(!a||!t)return;const S=t.plugins.getPlugin(a.id);if(S){p(S);const x=S.settings?.MemoListView||"list";f(x),Ge.setMemoListView(x)}},[a,t]),D.useEffect(()=>{if(!(!t||!n||!h?.settings))return m(),l.current||(l.current=t.workspace.on("resize",m),n.registerEvent(l.current)),()=>{l.current&&(t.workspace.offref(l.current),l.current=null)}},[t,n,h,m]),D.useEffect(()=>{s.current&&(A.setIcon(s.current,$N[u]),Ge.setMemoListView(u),A.requireApiVersion("1.4.4")&&A.setTooltip(s.current,I("Switch view")))},[u]);const w=D.useMemo(()=>{const S=[{view:"list",title:I("List")},{view:"chat",title:I("Chat")},{view:"moments",title:I("Moments")}];return(!i||o?.SupportSelectOtherView)&&S.push({view:"waterfall",title:I("Waterfall")},{view:"calendar",title:I("Calendar")},{view:"table",title:I("Table")}),S},[i,o?.SupportSelectOtherView]),b=D.useCallback(async S=>{try{const x=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),E=A.Platform.isDesktop?await pn():x?.identifier||x?.uuid;if(!r||r.appId!==E){It();return}const C=async k=>{u!==k&&(Ge.setMemoListView(k),h&&(h.settings.MemoListView=k,await h.saveSettings()),f(k))},M=new A.Menu;w.forEach(({view:k,title:O})=>{M.addItem(F=>{F.setChecked(u===k).setIcon($N[k]).setTitle(O).onClick(()=>C(k))})}),M.showAtMouseEvent(S.nativeEvent)}catch(x){console.error("Error handling view switcher click:",x)}},[r,u,h,w]),y=D.useMemo(()=>`memos-view-switcher-wrapper ${e||""} pro`.trim(),[e]);return g.jsx("div",{className:y,ref:s,onClick:b})},mK=()=>{const e=D.useRef(null);return D.useEffect(()=>{e&&(A.setIcon(e.current,"calendar-check"),A.setTooltip&&A.setTooltip(e.current,I("Daily Memos")))},[e]),g.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{Ye.setPathname("/daily")}})},d1=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),KN={initialValue:"",interval:300};class gK{constructor(t,n=KN){this.listeners=[],this.runUndo=()=>{const r=this.actions[this.currentIndex].selectionStart;this.currentIndex>0&&this.currentIndex--,this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.runRedo=()=>{this.currentIndex<this.actions.length-1&&this.currentIndex++;const r=this.actions[this.currentIndex].selectionEnd;this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.getActions=()=>this.actions,this.setState=(r,o)=>{this.actions=[...r],this.currentIndex=o<this.actions.length?o:this.actions.length-1,this.dispatchChange()},this.resetState=()=>{this.actions=[d1()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const o=r;o.key==="z"&&!o.shiftKey&&(o.metaKey||o.ctrlKey)?(r.preventDefault(),this.runUndo()):(o.key==="z"&&o.shiftKey&&(o.metaKey||o.ctrlKey)||o.key==="y"&&(o.metaKey||o.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const o=r,a=this.actions[this.currentIndex];this.pushNewAction({type:o.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-a.value.length),selectionEnd:this.element.selectionEnd})},this.addEventListeners=()=>{this.element.addEventListener("keydown",this.handleElementKeydown),this.element.addEventListener("input",this.handleElementInput)},this.rmEventListeners=()=>{this.element.removeEventListener("keydown",this.handleElementKeydown),this.element.removeEventListener("input",this.handleElementInput)},this.pushNewAction=r=>{const o=this.actions[this.currentIndex];o&&o.type===r.type&&r.timestamp-o.timestamp<this.config.interval?this.actions[this.currentIndex]=Object.assign(Object.assign({},o),{value:r.value,selectionEnd:r.selectionEnd,timestamp:r.timestamp}):(this.config.maxSize&&this.currentIndex>=this.config.maxSize?(this.actions.shift(),this.actions[0]=d1()):this.currentIndex++,this.actions[this.currentIndex]=r,this.actions=this.actions.slice(0,this.currentIndex+1)),this.dispatchChange()},this.dispatchChange=()=>{for(const r of this.listeners)r([...this.actions],this.currentIndex)},this.element=t,this.config=Object.assign(Object.assign({},KN),n),this.config.initialActions&&this.config.initialActions.length>0?(this.actions=this.config.initialActions,this.config.initialIndex!==void 0&&this.config.initialIndex<this.actions.length?this.currentIndex=this.config.initialIndex:this.currentIndex=this.actions.length-1):(this.actions=[d1()],this.currentIndex=0,this.config.initialValue!==""&&(this.actions.push({type:"insertText",value:this.config.initialValue,timestamp:Date.now(),selectionStart:0,selectionEnd:this.config.initialValue.length}),this.currentIndex++)),this.element.value=this.actions[this.currentIndex].value,this.addEventListeners()}}function vK(){const[,e]=D.useState(!1);return D.useCallback(()=>{e(n=>!n)},[])}var AF={exports:{}};(function(e){(function(){var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n=typeof window<"u",r=n&&window.mozInnerScreenX!=null;function o(a,i,s){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var l=s&&s.debug||!1;if(l){var u=document.querySelector("#input-textarea-caret-position-mirror-div");u&&u.parentNode.removeChild(u)}var f=document.createElement("div");f.id="input-textarea-caret-position-mirror-div",document.body.appendChild(f);var h=f.style,p=window.getComputedStyle?getComputedStyle(a):a.currentStyle;h.whiteSpace="pre-wrap",a.nodeName!=="INPUT"&&(h.wordWrap="break-word"),h.position="absolute",l||(h.visibility="hidden"),t.forEach(function(b){h[b]=p[b]}),r?a.scrollHeight>parseInt(p.height)&&(h.overflowY="scroll"):h.overflow="hidden",f.textContent=a.value.substring(0,i),a.nodeName==="INPUT"&&(f.textContent=f.textContent.replace(/\s/g," "));var m=document.createElement("span");m.textContent=a.value.substring(i)||".",f.appendChild(m);var w={top:m.offsetTop+parseInt(p.borderTopWidth),left:m.offsetLeft+parseInt(p.borderLeftWidth)};return l?m.style.backgroundColor="#aaa":document.body.removeChild(f),w}e.exports=o})()})(AF);var yK=AF.exports;const bK=Xe(yK);var NF=ur.CustomEvent;function wK(){try{var e=new NF("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var SK=wK()?NF:typeof document<"u"&&typeof document.createEvent=="function"?function(t,n){var r=document.createEvent("CustomEvent");return n?r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):r.initCustomEvent(t,!1,!1,void 0),r}:function(t,n){var r=document.createEventObject();return r.type=t,n?(r.bubbles=!!n.bubbles,r.cancelable=!!n.cancelable,r.detail=n.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r};const TK=Xe(SK);function xK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){xK(e,o,n[o])})}return e}function sg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JN(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,r.key,r)}}function t0(e,t,n){return t&&JN(e.prototype,t),n&&JN(e,n),e}function Nd(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nd=function(n){return typeof n}:Nd=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nd(e)}function Yy(e){return typeof Symbol=="function"&&Nd(Symbol.iterator)==="symbol"?Yy=function(n){return Nd(n)}:Yy=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":Nd(n)},Yy(e)}function kK(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n0(e,t){return t&&(Yy(t)==="object"||typeof t=="function")?t:kK(e)}function _d(e){return _d=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_d(e)}function kI(e,t){return kI=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},kI(e,t)}function r0(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}}),t&&kI(e,t)}function EK(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function CK(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function MK(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function DK(e){return EK(e)||CK(e)||MK()}var Wo={ESC:27,UP:38,DOWN:40,LEFT:37,RIGHT:39,ENTER:13,TAB:9},AK=function e(){var t=this;sg(this,e),this.startListen=function(n){n&&n.addEventListener("keydown",t.f)},this.stopListen=function(n){n&&n.removeEventListener("keydown",t.f)},this.add=function(n,r){var o=n;return typeof o!="object"&&(o=[o]),t.listeners[t.index]={keyCode:o,fn:r},t.index++},this.remove=function(n){delete t.listeners[n]},this.removeAll=function(){t.listeners={},t.index=1},this.index=1,this.listeners={},this.f=function(n){if(n){var r=n.keyCode||n.which;Object.values(t.listeners).forEach(function(o){var a=o.keyCode,i=o.fn;a.includes(r)&&(n.stopPropagation(),n.preventDefault(),i(n))})}}},Uc=new AK,NK=function(e){r0(t,e);function t(){var n,r;sg(this,t);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n0(this,(n=_d(t)).call.apply(n,[this].concat(a))),r.selectItem=function(){var s=r.props,l=s.item,u=s.onSelectHandler;u(l)},r}return t0(t,[{key:"shouldComponentUpdate",value:function(r){return this.props.item!==r.item||this.props.selected!==r.selected||this.props.style!==r.style||this.props.className!==r.className}},{key:"render",value:function(){var r=this,o=this.props,a=o.component,i=o.style,s=o.onClickHandler,l=o.item,u=o.selected,f=o.className,h=o.innerRef;return _.createElement("li",{className:"rta__item ".concat(u===!0?"rta__item--selected":""," ").concat(f||""),style:i},_.createElement("div",{className:"rta__entity ".concat(u===!0?"rta__entity--selected":""),role:"button",tabIndex:0,onClick:s,onFocus:this.selectItem,onMouseEnter:this.selectItem,onTouchStart:function(){r.clicked=!0,r.selectItem()},onTouchEnd:function(m){m.preventDefault(),r.clicked&&s(m)},onTouchMove:function(){r.clicked=!1},onTouchCancel:function(){r.clicked=!1},ref:h},_.createElement(a,{selected:u,entity:l})))}}]),t}(_.Component),OK=function(e){r0(t,e);function t(){var n,r;sg(this,t);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=n0(this,(n=_d(t)).call.apply(n,[this].concat(a))),r.state={selectedItem:null},r.cachedIdOfItems=new Map,r.onPressEnter=function(s){typeof s<"u"&&s.preventDefault();var l=r.props.values;r.modifyText(l[r.getPositionInList()])},r.getPositionInList=function(){var s=r.props.values,l=r.state.selectedItem;return l?s.findIndex(function(u){return r.getId(u)===r.getId(l)}):0},r.getId=function(s){if(r.cachedIdOfItems.has(s))return r.cachedIdOfItems.get(s);var l=r.props.getTextToReplace(s),u=function(){if(l){if(l.key)return l.key;if(typeof s=="string"||!s.key)return l.text}if(!s.key)throw new Error("Item ".concat(JSON.stringify(s),' has to have defined "key" property'));return s.key},f=u();return r.cachedIdOfItems.set(s,f),f},r.listeners=[],r.itemsRef={},r.modifyText=function(s){if(s){var l=r.props.onSelect;l(s)}},r.selectItem=function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=r.props.onItemHighlighted;r.state.selectedItem!==s&&r.setState({selectedItem:s},function(){u(s),l&&r.props.dropdownScroll(r.itemsRef[r.getId(s)])})},r.scroll=function(s){s.preventDefault();var l=r.props.values,u=s.keyCode||s.which,f=r.getPositionInList(),h;switch(u){case Wo.DOWN:h=f+1;break;case Wo.UP:h=f-1;break;default:h=f;break}h=(h%l.length+l.length)%l.length,r.selectItem(l[h],[Wo.DOWN,Wo.UP].includes(u))},r.isSelected=function(s){var l=r.state.selectedItem;return l?r.getId(l)===r.getId(s):!1},r}return t0(t,[{key:"componentDidMount",value:function(){this.listeners.push(Uc.add([Wo.DOWN,Wo.UP],this.scroll),Uc.add([Wo.ENTER,Wo.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var o=this,a=r.values,i=this.props.values,s=a.map(function(u){return o.getId(u)}).join(""),l=i.map(function(u){return o.getId(u)}).join("");s!==l&&i&&i[0]&&this.selectItem(i[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),Uc.remove(r)}},{key:"render",value:function(){var r=this,o=this.props,a=o.values,i=o.component,s=o.style,l=o.itemClassName,u=o.className,f=o.itemStyle;return _.createElement("ul",{className:"rta__list ".concat(u||""),style:s},a.map(function(h){return _.createElement(NK,{key:r.getId(h),innerRef:function(m){r.itemsRef[r.getId(h)]=m},selected:r.isSelected(h),item:h,className:l,style:f,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:i})}))}}]),t}(_.Component);function PK(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,o=t.offsetTop,a=e.scrollTop;o<a+r&&a<o||(e.scrollTop=o)}var XN="next",Ml={X:{LEFT:"rta__autocomplete--left",RIGHT:"rta__autocomplete--right"},Y:{TOP:"rta__autocomplete--top",BOTTOM:"rta__autocomplete--bottom"}},QN=function(t){return console.error("RTA: dataProvider fails: ".concat(t,`
Check the documentation or create issue if you think it's bug. https://github.com/webscopeio/react-textarea-autocomplete/issues`))},jK=[".","^","$","*","+","-","?","(",")","[","]","{","}","\\","|"],Kv=function(t){return DK(t).map(function(n){return jK.includes(n)?"\\".concat(n):n}).join("")},LK=function(e){r0(t,e);function t(){return sg(this,t),n0(this,_d(t).apply(this,arguments))}return t0(t,[{key:"componentDidMount",value:function(){var r=this.props.boundariesElement;if(typeof r=="string"){var o=document.querySelector(r);if(!o)throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");this.containerElem=o}else if(r instanceof HTMLElement)this.containerElem=r;else throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");if(!this.containerElem||!this.containerElem.contains(this.ref))throw new Error("RTA: Invalid prop boundariesElement: it has to be one of the parents of the RTA.")}},{key:"componentDidUpdate",value:function(){var r,o,a=this.props.top||0,i=this.props.left||0,s=[],l=[],u=0,f=0,h=this.containerElem.getBoundingClientRect(),p=this.ref.getBoundingClientRect(),m=this.props.textareaRef.getBoundingClientRect(),w=window.getComputedStyle(this.ref),b=parseInt(w.getPropertyValue("margin-top"),10),y=parseInt(w.getPropertyValue("margin-bottom"),10),S=parseInt(w.getPropertyValue("margin-left"),10),x=parseInt(w.getPropertyValue("margin-right"),10),E=b+y+m.top+a+p.height,C=S+x+m.left+i+p.width;C>h.right&&m.left+i>p.width?(f=i-p.width,s.push(Ml.X.LEFT),l.push(Ml.X.RIGHT)):(f=i,s.push(Ml.X.RIGHT),l.push(Ml.X.LEFT)),E>h.bottom&&m.top+a>p.height?(u=a-p.height,s.push(Ml.Y.TOP),l.push(Ml.Y.BOTTOM)):(u=a,s.push(Ml.Y.BOTTOM),l.push(Ml.Y.TOP)),this.props.renderToBody&&(u+=m.top,f+=m.left),this.ref.style.top="".concat(u,"px"),this.ref.style.left="".concat(f,"px"),(r=this.ref.classList).remove.apply(r,l),(o=this.ref.classList).add.apply(o,s)}},{key:"render",value:function(){var r=this,o=this.props,a=o.style,i=o.className,s=o.innerRef,l=o.children,u=o.renderToBody,f=document.body,h=_.createElement("div",{ref:function(m){r.ref=m,s(m)},className:"rta__autocomplete ".concat(i||""),style:a},l);return u&&f!==null?hC.createPortal(h,f):h}}]),t}(_.Component),OF=function(e){r0(t,e);function t(n){var r;sg(this,t),r=n0(this,_d(t).call(this,n)),r.state={top:null,left:null,currentTrigger:null,actualToken:"",data:null,value:"",dataLoading:!1,selectionEnd:0,component:null,textToReplace:null},r.escListenerInit=function(){r.escListener||(r.escListener=Uc.add(Wo.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(Uc.remove(r.escListener),r.escListener=null)},r.getSelectionPosition=function(){return r.textareaRef?{selectionStart:r.textareaRef.selectionStart,selectionEnd:r.textareaRef.selectionEnd}:null},r.getSelectedText=function(){if(!r.textareaRef)return null;var l=r.textareaRef,u=l.selectionStart,f=l.selectionEnd;return u===f?null:r.state.value.substr(u,f-u)},r.setCaretPosition=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(l,l))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var l=r.textareaRef.selectionEnd;return l},r._handleCaretChange=function(l){var u=function(){var p=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?p:0};if(l.type==="keydown"){var f=l.keyCode||l.which;switch(f){case Wo.UP:case Wo.DOWN:r._isAutocompleteOpen()||u();break;case Wo.LEFT:case Wo.RIGHT:u();break}return}u()},r._onSelect=function(l){var u=r.state,f=u.selectionEnd,h=u.currentTrigger,p=u.value,m=r.props.onItemSelected;if(h){var w=r._getTextToReplace(h);if(!w){r._closeAutocomplete();return}var b=w(l);if(!b){r._closeAutocomplete();return}m&&m({currentTrigger:h,item:l});var y=function(B,Y,H){switch(B){case"start":return H;case"next":case"end":return H+Y.length;default:if(!Number.isInteger(B))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return B}},S=p.slice(0,f),x=Kv(h),E=S.length-S.lastIndexOf(h),C=S.search(new RegExp("(?!".concat(x,")$")))-E,M=b.caretPosition==="next"?"".concat(b.text," "):b.text,k=y(b.caretPosition,M,C),O=S.substring(0,C)+M,F=p.replace(S,O);r.setState({value:F,dataLoading:!1},function(){var R=r.tokenRegExpEnding.exec(M),B=R?R[0].length:1;r.lastTrigger=k&&k-B,r.textareaRef.value=F,r.textareaRef.selectionEnd=k,r._changeHandler();var Y=r.textareaRef.scrollTop;r.setCaretPosition(k),window.chrome&&(r.textareaRef.scrollTop=Y)})}},r._getTextToReplace=function(l){var u=r.props.trigger[l];if(!l||!u)return null;var f=u.output;return function(h){if(typeof h=="object"&&(!f||typeof f!="function"))throw new Error('Output functor is not defined! If you are using items as object you have to define "output" function. https://github.com/webscopeio/react-textarea-autocomplete#trigger-type');if(f){var p=f(h,l);if(p===void 0||typeof p=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}.
Got "`.concat(String(p),'". Check the implementation for trigger "').concat(l,`"
See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for more information.
`));if(p===null)return null;if(typeof p=="string")return{text:p,caretPosition:XN};if(!p.text&&typeof p.text!="string")throw new Error('Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(l,`"
`));if(!p.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(l,`"
`));return p}if(typeof h!="string")throw new Error(`Output item should be string
`);return{text:"".concat(l).concat(h).concat(l),caretPosition:XN}}},r._getCurrentTriggerSettings=function(){var l=r.state.currentTrigger;return l?r.props.trigger[l]:null},r._getValuesFromProvider=function(){var l=r.state,u=l.currentTrigger,f=l.actualToken,h=r._getCurrentTriggerSettings();if(!(!u||!h)){var p=h.dataProvider,m=h.component;if(typeof p!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var w=p(f);w instanceof Promise||(w=Promise.resolve(w)),w.then(function(b){if(!Array.isArray(b))throw new Error("Trigger provider has to provide an array!");if(typeof m!="function")throw new Error("Component should be defined!");if(u===r.state.currentTrigger){if(!b.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:b,component:m})}}).catch(function(b){return QN(b.message)})}},r._getSuggestions=function(){var l=r.state,u=l.currentTrigger,f=l.data;return!u||!f||f&&!f.length?null:f},r._createRegExp=function(){var l=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(l).sort(function(u,f){return u<f?1:u>f?-1:0}).map(function(u){return Kv(u)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(l).sort(function(u,f){return u<f?1:u>f?-1:0}).map(function(u){return Kv(u)}).join("|"),")$"))},r._closeAutocomplete=function(){var l=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){l&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var l=IK({},r.props),u=["loadingComponent","boundariesElement","containerStyle","minChar","scrollToItem","ref","innerRef","onChange","onCaretPositionChange","className","value","trigger","listStyle","itemStyle","containerStyle","loaderStyle","className","containerClassName","listClassName","itemClassName","loaderClassName","dropdownStyle","dropdownClassName","movePopupAsYouType","textAreaComponent","renderToBody","onItemSelected","onItemHighlighted"];for(var f in l)u.includes(f)&&delete l[f];return l},r._changeHandler=function(l){var u=r.props,f=u.trigger,h=u.onChange,p=u.minChar,m=u.onCaretPositionChange,w=u.movePopupAsYouType,b=r.state,y=b.top,S=b.left,x=l;x||(x=new TK("change",{bubbles:!0}),r.textareaRef.dispatchEvent(x));var E=x.target||r.textareaRef,C=E.selectionEnd,M=E.value;if(r.lastValueBubbledEvent=M,h&&x&&(x.persist&&x.persist(),h(new Proxy(x,{get:function(G,X,ee){return X==="target"?E:Reflect.get(G,X,ee)}}))),m){var k=r.getCaretPosition();m(k)}r.setState({value:M});var O=function(){var G=bK(E,C),X=G.top,ee=G.left;r.setState({top:X-r.textareaRef.scrollTop||0,left:ee})},F=function(G){r.lastTrigger=C-G,r._closeAutocomplete(),O()};if(C<=r.lastTrigger){var R=M.slice(0,C),B=r.tokenRegExp.exec(R);F(B?B[0].length:0)}var Y=M.slice(r.lastTrigger,C),H=r.tokenRegExp.exec(Y),Z=H&&H[0],W=H&&H[1]||null,$=W?W.length-1:0,V=r.tokenRegExpEnding.exec(Y);if(V?F(V[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!Z||Z.length<=p+$)&&(r.state.currentTrigger&&!f[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(W&&f[W].afterWhitespace&&!/\s/.test(M[C-Z.length-1])&&M[C-Z.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&f[r.state.currentTrigger].allowWhitespace){if(H=new RegExp("".concat(Kv(r.state.currentTrigger),".*$")).exec(M.slice(0,C)),Z=H&&H[0],!Z){r._closeAutocomplete();return}W=Object.keys(f).find(function(te){return te.slice(0,$+1)===Z.slice(0,$+1)})||null}var ne=Z.slice(1);if(W){(w||y===null&&S===null||r.state.currentTrigger!==W)&&O(),r.escListenerInit();var Q=r._getTextToReplace(W);r.setState({selectionEnd:C,currentTrigger:W,textToReplace:Q,actualToken:ne},function(){try{r._getValuesFromProvider()}catch(te){QN(te.message)}})}},r._selectHandler=function(l){var u=r.props,f=u.onCaretPositionChange,h=u.onSelect;if(f){var p=r.getCaretPosition();f(p)}h&&(l.persist(),h(l))},r._shouldStayOpen=function(l){var u=l.relatedTarget;return u===null&&(u=document.activeElement),!!(r.dropdownRef&&u instanceof Node&&r.dropdownRef.contains(u))},r._onClick=function(l){var u=r.props.onClick;u&&(l.persist(),u(l)),!r._shouldStayOpen(l)&&r._closeAutocomplete()},r._onBlur=function(l){var u=r.props.onBlur;u&&(l.persist(),u(l)),!r._shouldStayOpen(l)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(l){var u=r.props.onItemHighlighted,f=r.state.currentTrigger;if(u)if(typeof u=="function")u({currentTrigger:f,item:l});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(l){var u=r.props.scrollToItem;if(u){if(u===!0){PK(r.dropdownRef,l);return}if(typeof u!="function"||u.length!==2)throw new Error("`scrollToItem` has to be boolean (true for default implementation) or function with two parameters: container, item.");u(r.dropdownRef,l)}},r._isAutocompleteOpen=function(){var l=r.state,u=l.dataLoading,f=l.currentTrigger,h=r._getSuggestions();return!!((u||h)&&f)},r._textareaRef=function(l){r.props.innerRef&&r.props.innerRef(l),r.textareaRef=l},r.lastTrigger=0,r.escListener=null;var o=r.props,a=o.loadingComponent,i=o.trigger,s=o.value;if(s&&(r.state.value=s),r._createRegExp(),!a)throw new Error("RTA: loadingComponent is not defined");if(!i)throw new Error("RTA: trigger is not defined");return r}return t0(t,[{key:"componentDidMount",value:function(){Uc.startListen(this.textareaRef),this.textareaRef&&this.textareaRef.addEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("keydown",this._handleCaretChange)}},{key:"componentDidUpdate",value:function(r){var o=r.trigger,a=r.value,i=this.props,s=i.trigger,l=i.value;Object.keys(s).join("")!==Object.keys(o).join("")&&this._createRegExp(),a!==l&&this.lastValueBubbledEvent!==l&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),Uc.stopListen(this.textareaRef),this.textareaRef&&this.textareaRef.removeEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("keydown",this._handleCaretChange)}},{key:"render",value:function(){var r=this,o=this.props,a=o.loadingComponent,i=o.style,s=o.className,l=o.listStyle,u=o.itemStyle,f=o.boundariesElement,h=o.movePopupAsYouType,p=o.listClassName,m=o.itemClassName,w=o.dropdownClassName,b=o.dropdownStyle,y=o.containerStyle,S=o.containerClassName,x=o.loaderStyle,E=o.loaderClassName,C=o.textAreaComponent,M=o.renderToBody,k=this.state,O=k.left,F=k.top,R=k.dataLoading,B=k.component,Y=k.value,H=k.textToReplace,Z=this._isAutocompleteOpen(),W=this._getSuggestions(),$={},V;return C.component?(V=C.component,$[C.ref]=this._textareaRef):(V=C,$.ref=this._textareaRef),_.createElement("div",{className:"rta ".concat(R===!0?"rta--loading":""," ").concat(S||""),style:y},_.createElement(V,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(s||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:Y,style:i},$)),Z&&_.createElement(LK,{innerRef:function(Q){r.dropdownRef=Q},top:F,left:O,style:b,className:w,movePopupAsYouType:h,boundariesElement:f,textareaRef:this.textareaRef,renderToBody:M},W&&B&&H&&_.createElement(OK,{values:W,component:B,style:l,className:p,itemClassName:m,itemStyle:u,getTextToReplace:H,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),R&&_.createElement("div",{className:"rta__loader ".concat(W!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(E||""),style:x},_.createElement(a,{data:W}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var o=r.value;return o==null?null:{value:o}}}]),t}(_.Component);OF.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const RK=()=>{const{app:e}=Ze.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},FK=e=>{let t=[];const n=Ze.getState().settings;if(n&&n?.UseVaultTags)t=RK();else{const{tags:a}=le.getState();t=a}const r=e.toLowerCase(),o=[];return t.forEach(a=>{a&&a.toLowerCase().contains(r)&&o.push({name:a,char:a})}),o},HK=e=>{const{app:t}=Ze.getState(),n=t.vault.getAllLoadedFiles(),r=[];let o;return n.forEach(a=>{e==="["?o="":e.contains("[")&&(o=e.slice(1));const i=o.toLowerCase();a instanceof A.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(a.extension)&&a.path.toLowerCase().contains(i)&&r.push({name:a.basename,char:a.name,file:a})}),r};var f1=D,BK=function(e){return typeof e=="function"},_K=function(e){var t=f1.useState(e),n=t[0],r=t[1],o=f1.useRef(n),a=f1.useCallback(function(i){o.current=BK(i)?i(o.current):i,r(o.current)},[]);return[n,a,o]},YK=_K;const Eo=Xe(YK);function wu(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function o0(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=wu(n);return(o,a)=>r.then(i=>a(i.transaction(t,o).objectStore(t)))}let h1;function lg(){return h1||(h1=o0("keyval-store","keyval")),h1}function Ls(e,t=lg()){return t("readonly",n=>wu(n.get(e)))}function Ys(e,t,n=lg()){return n("readwrite",r=>(r.put(t,e),wu(r.transaction)))}function PF(e,t=lg()){return t("readwrite",n=>(n.delete(e),wu(n.transaction)))}function zK(e=lg()){return e("readwrite",t=>(t.clear(),wu(t.transaction)))}function UK(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},wu(e.transaction)}function jF(e=lg()){return e("readonly",t=>{if(t.getAllKeys)return wu(t.getAllKeys());const n=[];return UK(t,r=>n.push(r.key)).then(()=>n)})}const vb=o0("editor-history-db","editor-history-store"),VK=50;function yC(e,t){return`thinoEditorHistory:${e}:${t||"view"}`}async function WK(e,t,n){try{if(!t?.appId)return;const r=yC(t.appId,n),o=await Ls(r,vb)||[];if(o.some(l=>l.content===e))return;const s=[{content:e,timestamp:Date.now()},...o].slice(0,VK);await Ys(r,s,vb)}catch(r){console.error("Failed to save editor history:",r)}}const GK=A.debounce((e,t,n)=>{WK(e,t,n)},1e3);async function LF(e,t){try{if(!e?.appId)return[];const n=yC(e.appId,t);return await Ls(n,vb)||[]}catch(n){return console.error("Failed to get editor history:",n),[]}}async function ZK(e,t){try{if(!e?.appId)return;const n=yC(e.appId,t);await PF(n,vb)}catch(n){console.error("Failed to clear editor history:",n)}}function qK(e){return e.containerEl.matches(".memos-list-view")}function p1(){}function $K(e){const n=e.app.workspace.getLeavesOfType("thino_view")[0];return{app:e.app,showSearch:p1,toggleMode:p1,onMarkdownScroll:p1,getMode:()=>"source",getViewType:()=>"thino_view",id:n?.id||je.randomId(6),scroll:0,editMode:null,get file(){return n?.view?.file||null},get path(){return n?.view?.file?.path||""}}}const KK=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,view:o,dailyNotes:a}}=D.useContext(it),[i,s]=D.useState(null),[l,u]=D.useState(!1),[f,h]=D.useState(""),[p,m]=D.useState(null),[w,b]=D.useState(!0),[y,S]=D.useState(!1),x=D.useRef(null),E=D.useRef(A.debounce(async(W,$,V)=>{eO(W,$,V),W.trim()&&!y&&await GK(W,$,V)},100)),C=D.useRef();D.useEffect(()=>{if(!p){if(!a&&!(n&&window.app)){const W=(n||window.app)?.vault.getMarkdownFiles();m(W[0]);return}for(const W in a)if(a[W]instanceof A.TFile){m(a[W]);break}}},[a]),D.useEffect(()=>{if(!r?.MarkdownEditor||!e)return;class W extends r.MarkdownEditor{updateBottomPadding(){}onUpdate(G,X){super.onUpdate(G,X),k&&k(this.get())}}const $=$K(r),V=r.addChild(new W(n,e,$));V&&!t&&o&&Ge.setInstance(`${o.leaf?.id}`,V),$.editMode=V,V.owner.editor=V.editor;const ne=JK(n,t?"modal":"view");V.set&&V.set(ne||"",!0),n.workspace.trigger("thino-editor-created",e,V.editor);const Q=V.cm;return C.current=Q,u(!0),s(V),()=>{u(!1),i?.destroy(),r.removeChild(V),C.current=null}},[e,r]),D.useEffect(()=>{!i||!n||(E.current(f,n,t?"modal":"view"),w&&b(!1),x.current&&x.current(f))},[f,n]);const M=()=>{i&&i.toggleSource()},k=A.debounce(W=>O(W),500,!0),O=W=>{h(W)};return{instance:i,value:f,set:W=>{try{i&&((i?.editor).replaceSelection(W),h(W))}catch($){console.error($)}},get:()=>i?i.get():"",append:(W,$)=>{if(!i||$&&$!==o?.leaf?.id)return;const ne=(i.get()||"")+W;(i?.editor).replaceSelection(W),h(ne)},clear:async(W=!1)=>{i&&(i.clear(),h(""),eO("",n,t?"modal":"view"),W&&await ZK(n,t?"modal":"view"))},toggleSource:M,getHistoryEntries:async()=>!i||!n?[]:await LF(n,t?"modal":"view"),setFullContent:(W,$=!1)=>{i&&(S($),i.set(W),E.current(W,n,t?"modal":"view"),S(!1))}}};function RF(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function JK(e,t){try{if(!e?.appId)return"";const n=RF(e.appId,t);return Xn.get([n])[n]||""}catch(n){return console.error(n),""}}function eO(e,t,n){try{if(!t?.appId)return;const r=RF(t.appId,n);Xn.set({[r]:e})}catch(r){console.error(r)}}const XK=D.memo(({value:e,maxCount:t=100})=>{const[n,r]=D.useState(0);D.useEffect(()=>{const a=e.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""),i=je.getWordCount(a);r(i)},[e]);const o=n>t&&t>0;return g.jsxs("div",{className:qt("thino-editor-word-count",o&&"exceeded"),children:[n," ",t>0&&g.jsxs("span",{children:[" / ",t]})," ",I("word")]})},(e,t)=>e.value===t.value&&e.maxCount===t.maxCount);function QK(e,t){return{line:e.line,ch:e.ch+t}}const tO=({entity:{name:e,char:t,file:n}})=>g.jsx("div",{children:`${t}`}),eJ=({data:e})=>g.jsx("div",{children:"Loading"});let Di;const tJ=D.forwardRef((e,t)=>{const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:o},dailyNotesState:{settings:a,app:i}}=D.useContext(it),{SaveMemoButtonLabel:s,SaveMemoButtonIcon:l}=a,{className:u,inputerType:f,initialContent:h,placeholder:p,showConfirmBtn:m,showCancelBtn:w,onConfirmBtnClick:b,onCancelBtnClick:y,onContentChange:S,onCheckCount:x}=e,E=D.useRef(null),C=D.useRef(null),M=D.useRef(null),k=vK(),{instance:O,value:F,set:R,get:B,append:Y,clear:H,toggleSource:Z,setFullContent:W}=KK(C.current,e.modal),[,$,V]=Eo(0),[ne,Q]=Eo(!1);D.useEffect(()=>{if(a&&a.FocusOnEditor)switch(f){case"minimal":case"memos":E.current?.focus();break;case"obsidian":O&&O.editor?.focus()}},[a,O]),D.useEffect(()=>{if(!i)return;const we=i.workspace.getLeavesOfType(Yr);let Ne,Ae;we.length>0?(Ae=we[0].view.containerEl,Ne=Ae.offsetHeight):(Ae=document,Ne=window.outerHeight),$(Ne)},[i]),D.useEffect(()=>{!E.current||f==="obsidian"||h&&(E.current.value=h,k())},[]),D.useEffect(()=>{if(f!=="obsidian")if(n){if(!E.current)return;const{tinyUndoActionsCache:we,tinyUndoIndexCache:Ne}=Xn.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return M.current=new gK(E.current,{interval:5e3,initialActions:we,initialIndex:Ne}),M.current.subscribe((Ae,Te)=>{Xn.set({tinyUndoActionsCache:Ae,tinyUndoIndexCache:Te})}),()=>{M.current?.destroy()}}else M.current?.destroy(),M.current=null,Xn.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),D.useEffect(()=>{E.current&&(E.current.style.height="auto",E.current.style.height=(E.current.scrollHeight??0)+"px")},[E.current?.value]),D.useImperativeHandle(t,()=>({element:E.current,blur:()=>{switch(f){case"minimal":case"memos":E.current?.blur();break;case"obsidian":O&&O.editor?.blur()}},focus:we=>{switch(f){case"minimal":case"memos":E.current?.focus();break;case"obsidian":if(O){if(we&&we!==O?.owner?.view?.leaf?.id)return;O.editor?.focus()}}},insertTag:we=>{switch(f){case"minimal":case"memos":{if(!E.current)return;const Ne=E.current.value;E.current.value=Ne.slice(0,E.current.selectionStart)+"# "+Ne.slice(E.current.selectionStart),S(E.current.value),k();break}case"obsidian":if(we&&we!==O?.owner?.view?.leaf?.id)return;if(O){const Ne=O.editor,Ae=Ne.getCursor("from");Ne.replaceRange("#",Ae),Ne.setSelection(QK(Ae,1))}break}},insertText:(we,Ne)=>{switch(f){case"minimal":case"memos":{if(!E.current)return;const Ae=E.current.value;E.current.value=Ae.slice(0,E.current.selectionStart)+we+Ae.slice(E.current.selectionStart),S(E.current.value),k()}break;case"obsidian":O&&Y(we,Ne);break}},setContent:we=>{switch(f){case"minimal":case"memos":E.current&&(E.current.value=we,S(E.current.value),k());break;case"obsidian":O&&R(we);break}},updateContent:we=>{switch(f){case"minimal":case"memos":E.current&&(E.current.value=we);break;case"obsidian":O&&W(we);break}},getContent:()=>{switch(f){case"minimal":case"memos":return E.current?E.current.value:"";case"obsidian":return B()}},toggleSource:()=>{switch(f){case"minimal":case"memos":break;case"obsidian":Z();break}},clear:(we=!1)=>{switch(f){case"minimal":case"memos":E.current&&(E.current.value="",S(E.current.value),k());break;case"obsidian":H(we);break}}}),[O,f]);const te=we=>{if(!E.current)return;const{fileManager:Ne}=Se.getState().dailyNotesState.app;if(we.currentTrigger==="#"){const Ae=E.current.value;let Te;Di!=null?Te=Di.length:Te=0;let Fe=E.current.selectionStart;for(let We=0;We<Ae.length;We++)/\s/g.test(Ae[Fe])||Fe++;E.current.value=Ae.slice(0,E.current.selectionStart-Te)+we.item.char+Ae.slice(Fe),S(E.current.value),k()}else if(we.currentTrigger==="[["){const Ae=Ne.generateMarkdownLink(we.item.file,we.item.file.path,"",""),Te=E.current.value;let Fe;Di!=null?Ae.contains("[[")||we.item.file.extension!=="md"?Fe=Di.length+1:Fe=Di.length+2:Fe=2;let We=E.current.selectionStart;for(let ke=0;ke<Te.length;ke++)/\s/g.test(Te[We])||We++;E.current.value=Te.slice(0,E.current.selectionStart-Fe)+Ae+Te.slice(We),S(E.current.value),k()}},G=D.useCallback(()=>{S(E.current?.value||""),k()},[]),X=async()=>{switch(f){case"minimal":case"memos":if(!E.current)return;E.current.value=ie(),b(E.current.value),E.current.value="",k(),M.current?.resetState();break;case"obsidian":await x(B())?(b(B()),H(!0),k()):new Notice(I("Word count exceeded"));break}},ee=D.useCallback(()=>{switch(f){case"minimal":case"memos":E.current&&(E.current.value="",S(E.current.value),k());break;case"obsidian":H(!1);break}y()},[f,O,E]),ie=()=>Xn.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",fe=()=>{if(E.current)return E.current.value=ie(),E.current.value},he=we=>{switch(we){case"memos":return g.jsx(OF,{className:`common-editor-inputer scroll ${ne?" editing":""}`,loadingComponent:eJ,placeholder:p,movePopupAsYouType:!0,value:fe(),innerRef:Ne=>{E.current=Ne},onFocus:()=>{Q(!0)},onBlur:()=>{Q(!1)},onInput:G,style:{maxHeight:`${V.current>400?V.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:te,scrollToItem:!0,trigger:{"#":{dataProvider:Ne=>(Di=Ne,FK(Ne).map(({name:Ae,char:Te})=>({name:Ae,char:Te}))),component:tO,afterWhitespace:!0,output:Ne=>Ne.char},"[[":{dataProvider:Ne=>(Di=Ne,HK(Ne).slice(0,10).map(({name:Ae,char:Te,file:Fe})=>({name:Ae,char:Te,file:Fe}))),component:tO,afterWhitespace:!0,output:Ne=>Ne.char}}});case"minimal":return g.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:p,ref:E,onInput:G});case"obsidian":return g.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",onClick:()=>{O?.editor?.focus()},ref:C});default:return g.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:C})}};return g.jsxs("div",{className:"common-editor-wrapper "+u,children:[he(f),g.jsxs("div",{className:"common-tools-wrapper",children:[g.jsx("div",{className:"common-tools-container",children:g.jsx(js,{when:e.tools!==void 0,children:e.tools})}),g.jsxs("div",{className:"btns-container",children:[a.enableWordCount&&g.jsx(XK,{value:F,maxCount:a.maxWordCount}),g.jsx(js,{when:w,children:g.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!r&&ee()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||r)&&ee()},children:Ye.getState().pathname==="/"&&o==="chat"&&(a?.chatViewStyle==="fluent"||a?.chatViewStyle==="inline")?"":I("CANCEL EDIT")})}),g.jsx(js,{when:m,children:g.jsxs("button",{"aria-label":I("Ctrl/Cmd + Enter to save thino"),className:"action-btn confirm-btn",onClick:async()=>{a&&a.DefaultEditorLocation==="Top"&&!r&&await X()},onPointerDown:async()=>{(a&&a.DefaultEditorLocation==="Bottom"||r)&&await X()},children:[o==="chat"&&(a?.chatViewStyle==="fluent"||a?.chatViewStyle==="inline")?"":s,g.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),nJ=typeof window<"u"?D.useLayoutEffect:D.useEffect;function rJ(e,t,n,r){const o=D.useRef(t);nJ(()=>{o.current=t},[t]),D.useEffect(()=>{const a=window;if(!(a&&a.addEventListener))return;const i=s=>{o.current(s)};return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[e,n,r])}function cg(e,t,n="mousedown"){rJ(n,r=>{const o=r.target;if(!o||!o.isConnected||o.closest(".suggestion-container")||o.closest(".menu"))return;(Array.isArray(e)?e.every(i=>i.current&&!i.current.contains(o)):e.current&&!e.current.contains(o))&&t(r)})}const FF=e=>{const{year:t,handleYearChange:n}=e,[r,o]=D.useState([]),[a,i]=D.useState(t),s=D.useRef(null),l=D.useRef(null),[u,f]=_.useState(!1),h=_.useRef(null);cg(h,()=>{f(!1)}),D.useEffect(()=>{s.current&&A.setIcon(s.current,"chevron-left"),l.current&&A.setIcon(l.current,"chevron-right")},[s,l,u]),D.useEffect(()=>{m(a)},[t]);const m=w=>{const b=parseInt(w),y=b-b%10,S=[];for(let x=0;x<10;x++)S.push(`${y+x}`);o(S)};return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"btn year-btn",onClick:()=>{f(!u)},children:[g.jsx("span",{children:t}),g.jsx("span",{children:I("year")})]}),u&&g.jsxs("div",{ref:h,className:"year-picker-wrapper",children:[g.jsxs("div",{className:"year-picker-header",children:[g.jsxs("div",{className:"year-picker-header-title",children:[a," "+(I("year")||"")]}),g.jsxs("div",{className:"year-picker-header-btns",children:[g.jsx("span",{className:"btn",ref:s,onClick:()=>{const w=parseInt(a)-10;i(w.toString()),m(w.toString())}}),g.jsx("span",{className:"btn",ref:l,onClick:()=>{const w=parseInt(a)+10;i(w.toString()),m(w.toString())}})]})]}),g.jsx("div",{className:"year-picker-body",children:g.jsx("div",{className:"year-picker-body-list",children:r.map(w=>g.jsx("div",{className:`year-picker-body-item ${w===a?"selected":""}`,onClick:()=>{i(w),n(w),f(!1)},children:w},w))})})]})]})},HF=e=>{const{month:t,handleMonthChange:n}=e,[r,o]=D.useState([]),[a,i]=D.useState((parseInt(t)+1).toString()),[s,l]=_.useState(!1),u=_.useRef(null);cg(u,()=>{l(!1)}),D.useEffect(()=>{h()},[t]);const h=()=>{const p=[];for(let m=1;m<=12;m++)p.push(`${m}`);o(p)};return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"btn month-btn",onClick:()=>{l(!s)},children:[g.jsxs("span",{children:[I("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),g.jsx("span",{children:I("month")||""})]}),s&&g.jsxs("div",{ref:u,className:"month-picker-wrapper",children:[g.jsxs("div",{className:"month-picker-header",children:[g.jsxs("div",{className:"month-picker-header-title",children:[a," "+(I("month")||"")]}),g.jsx("div",{className:"month-picker-header-btns"})]}),g.jsx("div",{className:"month-picker-body",children:g.jsx("div",{className:"month-picker-body-list",children:r.map(p=>g.jsx("div",{className:`month-picker-body-item ${p===a?"selected":""}`,onClick:()=>{i(p),n(p),l(!1)},children:p},p))})})]})]})},a0=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[o,a]=D.useState(Vh(n)),[i,s]=D.useState(n);D.useEffect(()=>{a(Vh(n))},[n]);const l=new Date(o),u=l.getDay(),f=[];for(let w=0;w<u;w++)f.push({date:0,datestamp:l.getTime()-Do*(7-w)});const h=oJ(o);for(let w=1;w<=h;w++)f.push({date:w,datestamp:l.getTime()+Do*(w-1)});const p=(w,b)=>{r(b,w.nativeEvent),s(b)},m=w=>{const b=l.getFullYear(),y=l.getMonth()+1;let S=0;y===1&&w===-1?S=new Date(`${b-1}/12/1`).getTime():y===12&&w===1?S=new Date(`${b+1}/1/1`).getTime():S=new Date(`${b}/${y+w}/1`).getTime(),a(Vh(S))};return g.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[g.jsxs("div",{className:"date-picker-header",children:[g.jsx("span",{ref:w=>{w&&A.setIcon(w,"chevron-left")},className:"btn btn-text",onClick:()=>m(-1)}),g.jsxs("span",{className:"normal-text",children:[g.jsx(FF,{year:l.getFullYear().toString(),handleYearChange:w=>{a(Vh(new Date(`${w}/${l.getMonth()+1}/1`).getTime()))}}),g.jsx(HF,{month:l.getMonth().toString(),handleMonthChange:w=>{a(Vh(new Date(`${l.getFullYear()}/${parseInt(w)}/1`).getTime()))}})]}),g.jsx("span",{ref:w=>{w&&A.setIcon(w,"chevron-right")},className:"btn btn-text",onClick:()=>m(1)})]}),g.jsxs("div",{className:"date-picker-day-container",children:[g.jsx("div",{className:"date-picker-day-header",children:I("weekDaysShort").map(w=>g.jsx("span",{className:"day-item",children:w},w))}),g.jsx("div",{className:"date-picker-day-content",children:f.map(w=>w.date===0?g.jsx("span",{className:"day-item null",children:""},w.datestamp):g.jsx("span",{className:`day-item ${w.datestamp===n?"current":""} ${w.datestamp===i?"selected":""}`,onClick:b=>p(b,w.datestamp),children:g.jsx("span",{className:"day-item-text",children:w.date})},w.datestamp))})]})]})};function oJ(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/Do}function Vh(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var nO=function(t){return t.reduce(function(n,r){var o=r[0],a=r[1];return n[o]=a,n},{})},rO=typeof window<"u"&&window.document&&window.document.createElement?D.useLayoutEffect:D.useEffect,Ao="top",xa="bottom",Ia="right",No="left",bC="auto",ug=[Ao,xa,Ia,No],Yd="start",Wp="end",aJ="clippingParents",BF="viewport",Wh="popper",iJ="reference",oO=ug.reduce(function(e,t){return e.concat([t+"-"+Yd,t+"-"+Wp])},[]),wC=[].concat(ug,[bC]).reduce(function(e,t){return e.concat([t,t+"-"+Yd,t+"-"+Wp])},[]),sJ="beforeRead",lJ="read",cJ="afterRead",uJ="beforeMain",dJ="main",fJ="afterMain",hJ="beforeWrite",pJ="write",mJ="afterWrite",gJ=[sJ,lJ,cJ,uJ,dJ,fJ,hJ,pJ,mJ];function Xi(e){return e?(e.nodeName||"").toLowerCase():null}function Jo(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ou(e){var t=Jo(e).Element;return e instanceof t||e instanceof Element}function va(e){var t=Jo(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function SC(e){if(typeof ShadowRoot>"u")return!1;var t=Jo(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vJ(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},a=t.elements[n];!va(a)||!Xi(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(i){var s=o[i];s===!1?a.removeAttribute(i):a.setAttribute(i,s===!0?"":s)}))})}function yJ(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],a=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=i.reduce(function(l,u){return l[u]="",l},{});!va(o)||!Xi(o)||(Object.assign(o.style,s),Object.keys(a).forEach(function(l){o.removeAttribute(l)}))})}}const bJ={name:"applyStyles",enabled:!0,phase:"write",fn:vJ,effect:yJ,requires:["computeStyles"]};function Gi(e){return e.split("-")[0]}var $c=Math.max,yb=Math.min,zd=Math.round;function EI(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function _F(){return!/^((?!chrome|android).)*safari/i.test(EI())}function Ud(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&va(e)&&(o=e.offsetWidth>0&&zd(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&zd(r.height)/e.offsetHeight||1);var i=ou(e)?Jo(e):window,s=i.visualViewport,l=!_F()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,f=(r.top+(l&&s?s.offsetTop:0))/a,h=r.width/o,p=r.height/a;return{width:h,height:p,top:f,right:u+h,bottom:f+p,left:u,x:u,y:f}}function TC(e){var t=Ud(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function YF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&SC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zs(e){return Jo(e).getComputedStyle(e)}function wJ(e){return["table","td","th"].indexOf(Xi(e))>=0}function $l(e){return((ou(e)?e.ownerDocument:e.document)||window.document).documentElement}function i0(e){return Xi(e)==="html"?e:e.assignedSlot||e.parentNode||(SC(e)?e.host:null)||$l(e)}function aO(e){return!va(e)||zs(e).position==="fixed"?null:e.offsetParent}function SJ(e){var t=/firefox/i.test(EI()),n=/Trident/i.test(EI());if(n&&va(e)){var r=zs(e);if(r.position==="fixed")return null}var o=i0(e);for(SC(o)&&(o=o.host);va(o)&&["html","body"].indexOf(Xi(o))<0;){var a=zs(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function dg(e){for(var t=Jo(e),n=aO(e);n&&wJ(n)&&zs(n).position==="static";)n=aO(n);return n&&(Xi(n)==="html"||Xi(n)==="body"&&zs(n).position==="static")?t:n||SJ(e)||t}function xC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dp(e,t,n){return $c(e,yb(t,n))}function TJ(e,t,n){var r=Dp(e,t,n);return r>n?n:r}function zF(){return{top:0,right:0,bottom:0,left:0}}function UF(e){return Object.assign({},zF(),e)}function VF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var xJ=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,UF(typeof t!="number"?t:VF(t,ug))};function IJ(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,s=Gi(n.placement),l=xC(s),u=[No,Ia].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!i)){var h=xJ(o.padding,n),p=TC(a),m=l==="y"?Ao:No,w=l==="y"?xa:Ia,b=n.rects.reference[f]+n.rects.reference[l]-i[l]-n.rects.popper[f],y=i[l]-n.rects.reference[l],S=dg(a),x=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,E=b/2-y/2,C=h[m],M=x-p[f]-h[w],k=x/2-p[f]/2+E,O=Dp(C,k,M),F=l;n.modifiersData[r]=(t={},t[F]=O,t.centerOffset=O-k,t)}}function kJ(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||YF(t.elements.popper,o)&&(t.elements.arrow=o))}const WF={name:"arrow",enabled:!0,phase:"main",fn:IJ,effect:kJ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vd(e){return e.split("-")[1]}var EJ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CJ(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:zd(n*o)/o||0,y:zd(r*o)/o||0}}function iO(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=i.x,m=p===void 0?0:p,w=i.y,b=w===void 0?0:w,y=typeof f=="function"?f({x:m,y:b}):{x:m,y:b};m=y.x,b=y.y;var S=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),E=No,C=Ao,M=window;if(u){var k=dg(n),O="clientHeight",F="clientWidth";if(k===Jo(n)&&(k=$l(n),zs(k).position!=="static"&&s==="absolute"&&(O="scrollHeight",F="scrollWidth")),o===Ao||(o===No||o===Ia)&&a===Wp){C=xa;var R=h&&k===M&&M.visualViewport?M.visualViewport.height:k[O];b-=R-r.height,b*=l?1:-1}if(o===No||(o===Ao||o===xa)&&a===Wp){E=Ia;var B=h&&k===M&&M.visualViewport?M.visualViewport.width:k[F];m-=B-r.width,m*=l?1:-1}}var Y=Object.assign({position:s},u&&EJ),H=f===!0?CJ({x:m,y:b},Jo(n)):{x:m,y:b};if(m=H.x,b=H.y,l){var Z;return Object.assign({},Y,(Z={},Z[C]=x?"0":"",Z[E]=S?"0":"",Z.transform=(M.devicePixelRatio||1)<=1?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",Z))}return Object.assign({},Y,(t={},t[C]=x?b+"px":"",t[E]=S?m+"px":"",t.transform="",t))}function MJ(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,i=a===void 0?!0:a,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Gi(t.placement),variation:Vd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,iO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,iO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const GF={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:MJ,data:{}};var Jv={passive:!0};function DJ(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,i=r.resize,s=i===void 0?!0:i,l=Jo(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",n.update,Jv)}),s&&l.addEventListener("resize",n.update,Jv),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",n.update,Jv)}),s&&l.removeEventListener("resize",n.update,Jv)}}const ZF={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:DJ,data:{}};var AJ={left:"right",right:"left",bottom:"top",top:"bottom"};function zy(e){return e.replace(/left|right|bottom|top/g,function(t){return AJ[t]})}var NJ={start:"end",end:"start"};function sO(e){return e.replace(/start|end/g,function(t){return NJ[t]})}function IC(e){var t=Jo(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function kC(e){return Ud($l(e)).left+IC(e).scrollLeft}function OJ(e,t){var n=Jo(e),r=$l(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var u=_F();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+kC(e),y:l}}function PJ(e){var t,n=$l(e),r=IC(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=$c(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=$c(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+kC(e),l=-r.scrollTop;return zs(o||n).direction==="rtl"&&(s+=$c(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function EC(e){var t=zs(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function qF(e){return["html","body","#document"].indexOf(Xi(e))>=0?e.ownerDocument.body:va(e)&&EC(e)?e:qF(i0(e))}function Ap(e,t){var n;t===void 0&&(t=[]);var r=qF(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=Jo(r),i=o?[a].concat(a.visualViewport||[],EC(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(Ap(i0(i)))}function CI(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jJ(e,t){var n=Ud(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function lO(e,t,n){return t===BF?CI(OJ(e,n)):ou(t)?jJ(t,n):CI(PJ($l(e)))}function LJ(e){var t=Ap(i0(e)),n=["absolute","fixed"].indexOf(zs(e).position)>=0,r=n&&va(e)?dg(e):e;return ou(r)?t.filter(function(o){return ou(o)&&YF(o,r)&&Xi(o)!=="body"}):[]}function RJ(e,t,n,r){var o=t==="clippingParents"?LJ(e):[].concat(t),a=[].concat(o,[n]),i=a[0],s=a.reduce(function(l,u){var f=lO(e,u,r);return l.top=$c(f.top,l.top),l.right=yb(f.right,l.right),l.bottom=yb(f.bottom,l.bottom),l.left=$c(f.left,l.left),l},lO(e,i,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $F(e){var t=e.reference,n=e.element,r=e.placement,o=r?Gi(r):null,a=r?Vd(r):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case Ao:l={x:i,y:t.y-n.height};break;case xa:l={x:i,y:t.y+t.height};break;case Ia:l={x:t.x+t.width,y:s};break;case No:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?xC(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case Yd:l[u]=l[u]-(t[f]/2-n[f]/2);break;case Wp:l[u]=l[u]+(t[f]/2-n[f]/2);break}}return l}function Gp(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,i=a===void 0?e.strategy:a,s=n.boundary,l=s===void 0?aJ:s,u=n.rootBoundary,f=u===void 0?BF:u,h=n.elementContext,p=h===void 0?Wh:h,m=n.altBoundary,w=m===void 0?!1:m,b=n.padding,y=b===void 0?0:b,S=UF(typeof y!="number"?y:VF(y,ug)),x=p===Wh?iJ:Wh,E=e.rects.popper,C=e.elements[w?x:p],M=RJ(ou(C)?C:C.contextElement||$l(e.elements.popper),l,f,i),k=Ud(e.elements.reference),O=$F({reference:k,element:E,placement:o}),F=CI(Object.assign({},E,O)),R=p===Wh?F:k,B={top:M.top-R.top+S.top,bottom:R.bottom-M.bottom+S.bottom,left:M.left-R.left+S.left,right:R.right-M.right+S.right},Y=e.modifiersData.offset;if(p===Wh&&Y){var H=Y[o];Object.keys(B).forEach(function(Z){var W=[Ia,xa].indexOf(Z)>=0?1:-1,$=[Ao,xa].indexOf(Z)>=0?"y":"x";B[Z]+=H[$]*W})}return B}function FJ(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?wC:l,f=Vd(r),h=f?s?oO:oO.filter(function(w){return Vd(w)===f}):ug,p=h.filter(function(w){return u.indexOf(w)>=0});p.length===0&&(p=h);var m=p.reduce(function(w,b){return w[b]=Gp(e,{placement:b,boundary:o,rootBoundary:a,padding:i})[Gi(b)],w},{});return Object.keys(m).sort(function(w,b){return m[w]-m[b]})}function HJ(e){if(Gi(e)===bC)return[];var t=zy(e);return[sO(e),t,sO(t)]}function BJ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!0:i,l=n.fallbackPlacements,u=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,w=m===void 0?!0:m,b=n.allowedAutoPlacements,y=t.options.placement,S=Gi(y),x=S===y,E=l||(x||!w?[zy(y)]:HJ(y)),C=[y].concat(E).reduce(function(fe,he){return fe.concat(Gi(he)===bC?FJ(t,{placement:he,boundary:f,rootBoundary:h,padding:u,flipVariations:w,allowedAutoPlacements:b}):he)},[]),M=t.rects.reference,k=t.rects.popper,O=new Map,F=!0,R=C[0],B=0;B<C.length;B++){var Y=C[B],H=Gi(Y),Z=Vd(Y)===Yd,W=[Ao,xa].indexOf(H)>=0,$=W?"width":"height",V=Gp(t,{placement:Y,boundary:f,rootBoundary:h,altBoundary:p,padding:u}),ne=W?Z?Ia:No:Z?xa:Ao;M[$]>k[$]&&(ne=zy(ne));var Q=zy(ne),te=[];if(a&&te.push(V[H]<=0),s&&te.push(V[ne]<=0,V[Q]<=0),te.every(function(fe){return fe})){R=Y,F=!1;break}O.set(Y,te)}if(F)for(var G=w?3:1,X=function(he){var we=C.find(function(Ne){var Ae=O.get(Ne);if(Ae)return Ae.slice(0,he).every(function(Te){return Te})});if(we)return R=we,"break"},ee=G;ee>0;ee--){var ie=X(ee);if(ie==="break")break}t.placement!==R&&(t.modifiersData[r]._skip=!0,t.placement=R,t.reset=!0)}}const KF={name:"flip",enabled:!0,phase:"main",fn:BJ,requiresIfExists:["offset"],data:{_skip:!1}};function cO(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function uO(e){return[Ao,Ia,xa,No].some(function(t){return e[t]>=0})}function _J(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Gp(t,{elementContext:"reference"}),s=Gp(t,{altBoundary:!0}),l=cO(i,r),u=cO(s,o,a),f=uO(l),h=uO(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const JF={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:_J};function YJ(e,t,n){var r=Gi(e),o=[No,Ao].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[No,Ia].indexOf(r)>=0?{x:s,y:i}:{x:i,y:s}}function zJ(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,i=wC.reduce(function(f,h){return f[h]=YJ(h,t.rects,a),f},{}),s=i[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const XF={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zJ};function UJ(e){var t=e.state,n=e.name;t.modifiersData[n]=$F({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const QF={name:"popperOffsets",enabled:!0,phase:"read",fn:UJ,data:{}};function VJ(e){return e==="x"?"y":"x"}function WJ(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,i=n.altAxis,s=i===void 0?!1:i,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,w=n.tetherOffset,b=w===void 0?0:w,y=Gp(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:f}),S=Gi(t.placement),x=Vd(t.placement),E=!x,C=xC(S),M=VJ(C),k=t.modifiersData.popperOffsets,O=t.rects.reference,F=t.rects.popper,R=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,B=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),Y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(k){if(a){var Z,W=C==="y"?Ao:No,$=C==="y"?xa:Ia,V=C==="y"?"height":"width",ne=k[C],Q=ne+y[W],te=ne-y[$],G=m?-F[V]/2:0,X=x===Yd?O[V]:F[V],ee=x===Yd?-F[V]:-O[V],ie=t.elements.arrow,fe=m&&ie?TC(ie):{width:0,height:0},he=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:zF(),we=he[W],Ne=he[$],Ae=Dp(0,O[V],fe[V]),Te=E?O[V]/2-G-Ae-we-B.mainAxis:X-Ae-we-B.mainAxis,Fe=E?-O[V]/2+G+Ae+Ne+B.mainAxis:ee+Ae+Ne+B.mainAxis,We=t.elements.arrow&&dg(t.elements.arrow),ke=We?C==="y"?We.clientTop||0:We.clientLeft||0:0,Ie=(Z=Y?.[C])!=null?Z:0,ce=ne+Te-Ie-ke,Pe=ne+Fe-Ie,Oe=Dp(m?yb(Q,ce):Q,ne,m?$c(te,Pe):te);k[C]=Oe,H[C]=Oe-ne}if(s){var Ve,tt=C==="x"?Ao:No,ot=C==="x"?xa:Ia,st=k[M],wt=M==="y"?"height":"width",Ot=st+y[tt],Wt=st-y[ot],an=[Ao,No].indexOf(S)!==-1,mn=(Ve=Y?.[M])!=null?Ve:0,Fn=an?Ot:st-O[wt]-F[wt]-mn+B.altAxis,qe=an?st+O[wt]+F[wt]-mn-B.altAxis:Wt,mt=m&&an?TJ(Fn,st,qe):Dp(m?Fn:Ot,st,m?qe:Wt);k[M]=mt,H[M]=mt-st}t.modifiersData[r]=H}}const e6={name:"preventOverflow",enabled:!0,phase:"main",fn:WJ,requiresIfExists:["offset"]};function GJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ZJ(e){return e===Jo(e)||!va(e)?IC(e):GJ(e)}function qJ(e){var t=e.getBoundingClientRect(),n=zd(t.width)/e.offsetWidth||1,r=zd(t.height)/e.offsetHeight||1;return n!==1||r!==1}function $J(e,t,n){n===void 0&&(n=!1);var r=va(t),o=va(t)&&qJ(t),a=$l(t),i=Ud(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Xi(t)!=="body"||EC(a))&&(s=ZJ(t)),va(t)?(l=Ud(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=kC(a))),{x:i.left+s.scrollLeft-l.x,y:i.top+s.scrollTop-l.y,width:i.width,height:i.height}}function KJ(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function o(a){n.add(a.name);var i=[].concat(a.requires||[],a.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function JJ(e){var t=KJ(e);return gJ.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function XJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function QJ(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var dO={placement:"bottom",modifiers:[],strategy:"absolute"};function fO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function t6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,a=o===void 0?dO:o;return function(s,l,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},dO,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},h=[],p=!1,m={state:f,setOptions:function(S){var x=typeof S=="function"?S(f.options):S;b(),f.options=Object.assign({},a,f.options,x),f.scrollParents={reference:ou(s)?Ap(s):s.contextElement?Ap(s.contextElement):[],popper:Ap(l)};var E=JJ(QJ([].concat(r,f.options.modifiers)));return f.orderedModifiers=E.filter(function(C){return C.enabled}),w(),m.update()},forceUpdate:function(){if(!p){var S=f.elements,x=S.reference,E=S.popper;if(fO(x,E)){f.rects={reference:$J(x,dg(E),f.options.strategy==="fixed"),popper:TC(E)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(B){return f.modifiersData[B.name]=Object.assign({},B.data)});for(var C=0;C<f.orderedModifiers.length;C++){if(f.reset===!0){f.reset=!1,C=-1;continue}var M=f.orderedModifiers[C],k=M.fn,O=M.options,F=O===void 0?{}:O,R=M.name;typeof k=="function"&&(f=k({state:f,options:F,name:R,instance:m})||f)}}}},update:XJ(function(){return new Promise(function(y){m.forceUpdate(),y(f)})}),destroy:function(){b(),p=!0}};if(!fO(s,l))return m;m.setOptions(u).then(function(y){!p&&u.onFirstUpdate&&u.onFirstUpdate(y)});function w(){f.orderedModifiers.forEach(function(y){var S=y.name,x=y.options,E=x===void 0?{}:x,C=y.effect;if(typeof C=="function"){var M=C({state:f,name:S,instance:m,options:E}),k=function(){};h.push(M||k)}})}function b(){h.forEach(function(y){return y()}),h=[]}return m}}var eX=[ZF,QF,GF,bJ,XF,KF,e6,WF,JF],n6=t6({defaultModifiers:eX}),tX=typeof Element<"u",nX=typeof Map=="function",rX=typeof Set=="function",oX=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Uy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Uy(e[r],t[r]))return!1;return!0}var a;if(nX&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!Uy(r.value[1],t.get(r.value[0])))return!1;return!0}if(rX&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(oX&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(tX&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((o[r]==="_owner"||o[r]==="__v"||o[r]==="__o")&&e.$$typeof)&&!Uy(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}var aX=function(t,n){try{return Uy(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const iX=Xe(aX);var sX=[],s0=function(t,n,r){r===void 0&&(r={});var o=D.useRef(null),a={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||sX},i=D.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=i[0],l=i[1],u=D.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var w=m.state,b=Object.keys(w.elements);fC.flushSync(function(){l({styles:nO(b.map(function(y){return[y,w.styles[y]||{}]})),attributes:nO(b.map(function(y){return[y,w.attributes[y]]}))})})},requires:["computeStyles"]}},[]),f=D.useMemo(function(){var p={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return iX(o.current,p)?o.current||p:(o.current=p,p)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),h=D.useRef();return rO(function(){h.current&&h.current.setOptions(f)},[f]),rO(function(){if(!(t==null||n==null)){var p=r.createPopper||n6,m=p(t,n,f);return h.current=m,function(){m.destroy(),h.current=null}}},[t,n,r.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}},lX=function(){},cX=lX;const uX=Xe(cX),dX=(e,t)=>({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),fX=e=>{const n=D.useRef(null),[r,o]=D.useState(null),[a,i]=D.useState(0);let s,l;const u=()=>{if(A.Platform.isMobile){s="right-end",l=["bottom"];return}const h=window.innerWidth-a>280*1.2,p=window.innerWidth-a<280,m=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){h?(s="right-end",l=["left-end"]):p&&m?(s="left-end",l=["right-end"]):(s="bottom",l=["bottom"]);return}h?(s="top-end",l=["top-start"]):p&&a>280?(s="top-start",l=["top-end"]):(s="top",l=["top"])};D.useEffect(()=>{e&&u()},[a,e?.DefaultEditorLocation]);const f=s0(n.current,r,dX(s,l));return{setPosX:i,popperRef:n,setPopperElement:o,popper:f}},hX=()=>{const e=new Set,t=Ye.getState().query.filter,n=Ye.getState().query.tag,r=St.getQueryById(t||"");if(r&&r.querystring){const o=JSON.parse(r.querystring);if(Array.isArray(o))for(const a of o)a.type==="TAG"&&a.value&&a.value.operator==="CONTAIN"&&typeof a.value.value=="string"&&e.add(a.value.value)}return n&&e.add(n),Array.from(e)},pX=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:o,selectionEnd:a}=e,i=document.createElement("div"),s=window.getComputedStyle(e);for(const b of s)i.style.setProperty(b,s.getPropertyValue(b));i.style.position="fixed",i.style.visibility="hidden",i.style.whiteSpace="pre-wrap";const u=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;i.textContent=u.substring(0,a||0),e.tagName==="TEXTAREA"&&(i.style.height="auto");const f=document.createElement("span");f.textContent=u.substring(a||0)||".",i.appendChild(f),document.body.appendChild(i);const{offsetLeft:h,offsetTop:p,offsetHeight:m,offsetWidth:w}=f;return document.body.removeChild(i),{x:t+h,y:n+p,h:r+m,w:o+w}},Kc=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:o,dailyNotesState:{app:a,settings:i,view:s,verifyState:l}}=D.useContext(it);if(o.memoListView==="flow")return null;const[u,f]=Nf(!0),h=D.useRef(u),[p,m]=Eo(!0),w=D.useRef(null),b=D.useRef(null),y=D.useRef(o),[S,x]=Eo(!1),[E,C]=Eo(!1),{setPosX:M,popperRef:k,setPopperElement:O,popper:F}=fX(i),[R]=Eo(parseInt(A.moment().format("x"))),B=D.useRef(null),[Y,H]=Eo(i?.EnabledLocationList.length===1?i?.EnabledLocationList[0].value:i?.MemoSaveLocation||"DAILY"),Z=D.useRef(i.MemoSaveLocation||"DAILY");D.useEffect(()=>{h.current=u},[u]),D.useEffect(()=>{!b.current||!a||!s||(s.registerEvent(a.workspace.on("focus-on-textarea",ce=>{b.current?.focus(ce?.id)})),s.registerEvent(a.workspace.on("blur-on-memos",()=>{b.current?.blur()})),s.registerEvent(a.workspace.on("send-to-thino",async(ce,Pe)=>{if(typeof ce=="string")b.current?.insertText(ce+`
`,Pe.id);else{const Oe=ce.toPNG(),Ve=new Blob([Oe],{type:"image/png"}),tt=new File([Ve],"image.png",{type:"image/png",lastModified:Date.now()});if(!tt)return;const ot=await te(tt);ot&&b.current?.insertText(ot+`
`,Pe.id)}})))},[b,s,a]),D.useEffect(()=>{i&&f(i.DefaultPrefix==="List")},[i?.DefaultPrefix]),D.useEffect(()=>{if(i){if(i.EnabledLocationList.length===1){H(i.EnabledLocationList[0].value);return}H(i.MemoSaveLocation||"DAILY")}},[i?.MemoSaveLocation,i?.EnabledLocationList]),D.useEffect(()=>{if(!i||!B.current)return;const ce=zp.find(Oe=>Oe.title===Y)?.icon;A.setIcon(B.current,ce),A.requireApiVersion("1.4.4")&&A.setTooltip(B.current,I("Thino Save To: ")+Y),Z.current=Y;const Pe=o.manifest;if(Pe){const Oe=a?.plugins.getPlugin(Pe.id);if(Oe){if(Oe.settings.MemoSaveLocation===Y)return;Oe.settings.MemoSaveLocation=Y,Oe.saveSettings()}}},[Y,p]),D.useEffect(()=>{b.current&&i&&i.MemoSaveLocation&&H(i.MemoSaveLocation)},[B,i]),D.useEffect(()=>{if(!b.current||!i||A.Platform.isDesktop||o.globalEditorShown)return;const ce=i.UseButtonToShowEditor&&i.DefaultEditorLocation==="Bottom";if(A.Platform.isDesktop){m(!0);return}if(t&&t==="inline"){m(!0);return}if(m(A.Platform.isMobile&&!ce),!ce||o.memoListView==="chat")return;const Pe=document.body.find(".memolist-scrollview");Pe&&(Pe.onscroll=()=>{if(o.globalEditorShown)return;if(!o.memoListView&&Ge.getState().memoListView==="chat"){Pe.onscroll=null;return}const Oe=b.current.getContent();A.Platform.isMobile&&ce&&!Oe&&m(!1)})},[o.globalEditorShown,t,b]);const W=()=>{C(!1)};D.useEffect(()=>{if(a&&(o.markMemoId||o.editMemoId?.trim()&&o.editMemoId!==y.current.editMemoId)){const ce=a.workspace.getLeavesOfType("thino_view");ce.length>0&&a.workspace.revealLeaf(ce[0])}if(o.markMemoId){const ce=le.getMemoById(o.markMemoId);if(ce&&ce.sourceType==="DAILY")nF(ce).then(Pe=>{const Oe=`${I("MARK")}: ${Pe}`;b.current?.insertText(Oe),b.current?.focus(),Ge.setMarkMemoId("")});else{const Pe=`${I("MARK")}: [@THINO](${o.markMemoId})`;b.current?.insertText(Pe),b.current?.focus(),Ge.setMarkMemoId("")}return}if(o.editMemoId?.trim()&&o.editMemoId!==y.current.editMemoId){const ce=le.getMemoById(o.editMemoId);if(ce)switch(f(ce.thinoType==="JOURNAL"),i.EditorType){case"memos":b.current?.setContent(ce.content.replace(/ \^\S{6}$/,"")||""),b.current?.focus();break;case"obsidian":b.current?.clear(!1),b.current?.setContent(ce.content.replace(/ \^\S{6}$/,"")||""),b.current?.focus();break}}y.current=o},[o.markMemoId,o.editMemoId]),D.useEffect(()=>{!b.current||S||i.EditorType==="memos"&&(b.current?.element.addEventListener("paste",$),b.current?.element.addEventListener("drop",V),b.current?.element.addEventListener("click",ne),x(!0))},[b.current]);const $=async ce=>{if(ce.clipboardData&&ce.clipboardData.files.length>0){ce.preventDefault();const Pe=ce.clipboardData.files;for(const Oe of Pe){const Ve=await te(Oe);Ve&&b.current?.insertText(Ve)}}},V=async ce=>{if(ce.dataTransfer&&ce.dataTransfer.files.length>0){ce.preventDefault();const Pe=ce.dataTransfer.files;for(const Oe of Pe){const Ve=await te(Oe);Ve&&b.current?.insertText(Ve)}}},ne=()=>{ie(b.current?.element.value||"")},Q=async(ce,Pe)=>{const Oe=ce.ctrlKey||ce.metaKey,Ve=ce.altKey;if(ce.key==="Escape"&&o.globalEditorShown&&(Ge.setGlobalEditorShown(!1),ce.preventDefault()),Oe&&ce.key==="Enter"){ce.preventDefault(),ce.stopPropagation(),await X(b.current?.getContent()),b.current?.clear(!0);return}if(Ve)for(let tt=0;tt<i.EnabledLocationList.length;tt++)ce.key===(tt+1).toString()&&H(i.EnabledLocationList[tt].value);setTimeout(()=>{})},te=D.useCallback(async ce=>{const{type:Pe}=ce;if(Pe.startsWith("image"))try{return`${await dC.upload(ce)}`}catch(Oe){new A.Notice(Oe)}},[]),G=D.useCallback(async ce=>{if(i.enableWordCount){const Pe=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),Oe=A.Platform.isDesktop?await pn():Pe.identifier||Pe.uuid;if(!(l&&l?.appId===Oe))return It(),!1;if(i.maxWordCount===0)return!0;const tt=ce.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""),ot=je.getWordCount(tt),st=i.maxWordCount||1e3;return!(ot>st&&st>0)}return!0},[i.enableWordCount,i.maxWordCount]),X=async ce=>{if(!ce||ce.trim()===""){new A.Notice(I("Content cannot be empty"));return}const Pe=Ze.getState().settings,Oe=Pe?.addTagAutomatically,Ve=Pe?.addTagWithNewline,tt=Pe?.addTagPosition,st=(hX()||[]).filter(an=>!ce.includes(`#${an}`)),wt=async(an,mn)=>{mn=mn.replaceAll("&nbsp;"," "),Xv("");try{if(!an){let qe;switch(Z.current){case"CANVAS":qe=await le.createMemoCanvas({text:mn,isList:h.current});break;case"MULTI":qe=await le.createMemoMultiFile({content:mn,isList:h.current});break;case"DAILY":qe=await le.createMemoDaily(mn,h.current);break;case"FILE":qe=await le.createMemoSingleFile({content:mn,isList:h.current});break}if(!qe)return;le.pushMemo(qe),(!Oe||st.length===0)&&Ye.clearQuery();const Tt=(a||Ze.getState().app)?.loadLocalStorage("tokenForSync");qe&&Tt&&i.startSync&&setTimeout(async()=>{try{if(Z.current!=="DAILY"){const Et=await aC({content:mn,thinoType:"FILE",thinoStatus:qe.thinoType==="JOURNAL"?"JOURNAL":qe.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"});await le.updateMemoById(qe.id,Et,!0)}}catch(Et){console.error(Et)}},200);return}const Fn=le.getMemoById(an);if(Fn&&(Fn.content!==mn||Fn.thinoType!==(h.current?"JOURNAL":"TASK-TODO"))){const qe=await le.updateMemo(Fn.id,mn,h.current?"JOURNAL":Fn.thinoType.startsWith("TASK")?Fn.thinoType:"TASK-TODO");qe.updatedAt=je.getDateTimeString(Date.now()),le.editMemo(qe)}Ge.setEditMemoId("")}catch(Fn){new A.Notice(Fn.message)}};n&&n(),n&&b.current?.clear(!0);const{editMemoId:Ot}=Ge.getState(),Wt=st&&st.length>0&&Oe&&!Ot?tt==="Beginning"?`${st.map(an=>`#${an}`).join(" ")} ${Ve?`
`:""}${ce}`:`${ce} ${Ve?`
`:""}${st.map(an=>`#${an}`).join(" ")}`:ce;await wt(Ot,Wt),Xv("")},ee=D.useCallback(()=>{Ge.setEditMemoId(""),b.current?.setContent(""),Xv("")},[]),ie=D.useCallback(ce=>{if(Xv(ce??""),!b.current)return;const Pe=b.current.getContent(),Oe=b.current.element.selectionStart,Ve=Pe.slice(0,Oe),tt=Pe.slice(Oe);(Ve.endsWith("@")||Ve.endsWith("📆"))&&tt.startsWith(" ")||(Ve.endsWith("@")||Ve.endsWith("📆"))&&tt===""?(Fe(),C(!0)):C(!1),setTimeout(()=>{b.current?.focus()})},[i.EditorType]),fe=ce=>{if(!b.current||!i)return;ce&&(W(),f(!1));const Pe=b.current.getContent(),Oe=b.current.element.selectionStart,Ve=Pe.slice(0,Oe),tt=Pe.slice(Oe),ot=A.moment(ce);if(Ve.endsWith("@"))switch(i.InsertDateFormat){case"Dataview":b.current.element.value=Pe.slice(0,b.current.element.selectionStart-1)+"[due:: "+ot.format("YYYY-MM-DD")+"]"+tt,b.current.element.setSelectionRange(Oe+17,Oe+17),b.current.focus(),ie(b.current.element.value);break;case"Tasks":b.current.element.value=Pe.slice(0,b.current.element.selectionStart-1)+"📅 "+ot.format("YYYY-MM-DD")+tt,b.current.element.setSelectionRange(Oe+11,Oe+11),b.current.focus(),ie(b.current.element.value)}else{b.current.element.value=Ve+ot.format("YYYY-MM-DD")+tt,b.current.element.setSelectionRange(Oe+10,Oe+10),b.current.focus(),ie(b.current.element.value);return}},he=()=>{b.current&&f()},we=async()=>{const ce=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),Pe=A.Platform.isDesktop?await pn():ce.identifier||ce.uuid;return!l||l?.appId!==Pe?(It(),!1):!0},Ne=async ce=>{if(!await we())return;const Pe=new A.Menu;i.EnabledLocationList.forEach(ot=>{Pe.addItem(st=>{st.setTitle(I(ot.value)).setIcon(zp.find(wt=>wt.title===ot.value)?.icon??"file").setChecked(Y===ot.value).onClick(()=>{H(ot.value)})})});let Oe=ce.target,Ve=null;for(;!Oe.hasClass("location-wrapper")&&(Ve=Oe.parentElement,Ve);)Oe=Ve;const tt=Oe.getBoundingClientRect();setTimeout(()=>{Pe.showAtPosition({x:tt.x,y:tt.bottom,width:tt.width,left:!1,overlap:!0})},200)},Ae=D.useCallback(async ce=>{const Pe=await LF(a,r?"modal":"view"),Oe=new A.Menu;if(Oe.dom.addClass("history-menu"),Pe.length===0){Oe.addItem(Ve=>{Ve.setTitle(I("No history")),Ve.setIcon("file-clock"),Ve.setDisabled(!0)}),Oe.showAtMouseEvent(ce.nativeEvent);return}Pe.forEach(Ve=>{Oe.addItem(tt=>{tt.titleEl.addClass("history-item"),tt.titleEl.createEl("span",{text:`${Ve.content.length} chars`}),tt.titleEl.createEl("span",{text:A.moment(Ve.timestamp).format("YYYY-MM-DD HH:mm:ss")}),tt.onClick(()=>{b.current?.updateContent(Ve.content)}),tt.dom.onmouseover=ot=>{const st=new A.HoverPopover(s,tt.dom,1e3);st.hoverEl.createEl("div",{text:"History content:",cls:"history-popover-title"}),st.hoverEl.createEl("div",{cls:"history-popover-content"},wt=>{A.MarkdownRenderer.render(a,Ve.content,wt,"",s)}),st.hoverEl.addClass("history-popover"),st.load(),s.addChild(st),setTimeout(()=>{st.unload()},1e3)}})}),Oe.showAtMouseEvent(ce.nativeEvent)},[a]),Te=D.useCallback(()=>{if(!(!b.current&&i.EditorType==="memos"))switch(i.EditorType){case"obsidian":b.current?.focus(),b.current?.insertTag();break;case"memos":{const ce=b.current.getContent(),Pe=b.current.element.selectionStart,Oe=ce.slice(0,Pe),Ve=ce.slice(Pe);let tt=Oe+"# "+Ve,ot=Oe.length+1;Oe.endsWith("#")&&Ve.startsWith(" ")&&(tt=Oe.slice(0,Oe.length-1)+Ve.slice(1),ot=Oe.length-1),b.current.element.value=tt,b.current.element.setSelectionRange(ot,ot),b.current.focus();const st=new Event("input",{bubbles:!0,cancelable:!0});b.current.element.dispatchEvent(st),ie(b.current.element.value)}}},[a]),Fe=D.useCallback(()=>{if(!b.current||!k.current||!i||!a)return;const Oe=a.workspace.getLeavesOfType(Yr)[0].view.containerEl,Ve=280,tt=Oe.clientWidth,{x:ot,y:st}=pX(b.current.element);let wt,Ot;A.Platform.isMobile?(window.innerWidth-ot>Ve?wt=(ot+Ve+16>tt,ot+18):window.innerWidth-ot<Ve?wt=(ot+Ve+16>tt,ot+34):wt=b.current.element.clientWidth/2,i.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?Ot=st+4:i.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?Ot=st+19:i.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&(Ot=st+36)):(wt=(ot+Ve+16>tt,ot+18),Ot=st+34),M(ot),k.current.style.left=`${wt}px`,k.current.style.top=`${Ot}px`},[i,a]),We=D.useCallback(()=>{const ce=document.createElement("input");document.body.appendChild(ce),ce.type="file",ce.multiple=!1,ce.accept="image/png, image/gif, image/jpeg",ce.onchange=async()=>{if(!ce.files||ce.files.length===0)return;const Pe=ce.files[0],Oe=await te(Pe);Oe&&b.current?.insertText(Oe),document.body.removeChild(ce)},ce.click()},[]),ke=!!o.editMemoId,Ie=D.useMemo(()=>({className:"memo-editor",inputerType:i.EditorType||"obsidian",modal:r,initialContent:mX(),placeholder:I("What do you think now..."),showConfirmBtn:!0,showCancelBtn:ke,showTools:!0,onConfirmBtnClick:X,onCancelBtnClick:ee,onContentChange:ie,onCheckCount:G}),[ke,i.EditorType]);return g.jsxs(g.Fragment,{children:[!o.globalEditorShown&&t==="block"&&g.jsx("div",{ref:ce=>{w.current=ce,ce&&A.setIcon&&A.setIcon(ce,"plus-circle")},className:`memo-show-editor-button ${p?"thino-hidden":""}`,onClick:()=>{w.current.firstElementChild?.toggleClass("rotate-hidden",!0),setTimeout(()=>{m(!0),w.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{b.current?.focus()},600)}}),g.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${ke?"edit-ing":""} ${o.globalEditorShown?"fullscreen-editor":""} ${p?"":"thino-hidden"}`,onKeyDownCapture:ce=>Q(ce),children:[g.jsx("span",{className:`tip-text ${ke?"":"thino-hidden"}`,children:"Modifying..."}),g.jsx(tJ,{ref:b,...Ie,tools:g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:ce=>{ce&&A.setIcon(ce,"hash")},className:"btn action-btn add-tag",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&Te()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&Te()}}),g.jsx("span",{ref:ce=>{ce&&A.setIcon(ce,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&We()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&We()}}),o.editMemoId===""&&g.jsx("span",{ref:ce=>{ce&&A.setIcon(ce,u?"layout-list":"check-square")},className:qt("btn action-btn list-or-task",u?"list":"task"),onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&he()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&he()}}),g.jsx("div",{ref:ce=>{ce&&(A.setIcon&&A.setIcon(ce,o.globalEditorShown?"shrink":"expand"),A.setTooltip&&A.setTooltip(ce,o.globalEditorShown?I("Exit fullscreen mode"):I("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await we()&&(m(!0),Ge.setGlobalEditorShown(!o.globalEditorShown))}}),g.jsx("div",{className:"action-btn split-line pro"}),g.jsx("div",{className:"action-btn location-wrapper pro",onClick:async ce=>{i&&i.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&await Ne(ce)},onPointerDown:async ce=>{(i&&i.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&await Ne(ce)},children:g.jsx("div",{ref:B,className:"action-btn file-location-btn"})}),g.jsx("div",{className:"action-btn history-btn",onClick:ce=>{i&&i.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&Ae(ce)},onPointerDown:ce=>{(i&&i.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&Ae(ce)},ref:ce=>{ce&&A.setIcon(ce,"file-clock")}})]})}),g.jsx("div",{ref:k,className:"date-picker",children:E&&g.jsx("div",{tabIndex:-1,style:F.styles.popper,...F.attributes.popper,ref:O,role:"dialog",children:g.jsx(a0,{className:`editor-date-picker ${E?"":"thino-hidden"}`,datestamp:R,handleDateStampChange:fe})})})]})]})};function mX(){return Xn.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function Xv(e){Xn.set({thinoEditorContentCache:e})}const gX=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:A.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(o=>{if(o.date==A.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return o.have.push(n),!0})||t.push({date:A.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},vX=e=>le.getState().commentMemos.filter(t=>t.linkId===e.hasId).sort((t,n)=>je.getTimeStampByDate(t.createdAt)-je.getTimeStampByDate(n.createdAt)).map(t=>({...t,createdAtStr:je.getDateTimeString(t.createdAt),dateStr:je.getDateString(t.createdAt)})),yX=e=>{const t=Ze.getState().settings,n=yG(),r=t?.ShowDate?" ":"",o="YYYY/MM/DD HH:mm:ss",a=/comment:(.*)$/g,i=/^\d{14}/g,s=(h,p,m)=>{const w=A.moment(h.createdAt,o).format("HH:mm");return m?m.replace(/{TIME}/g,w).replace(/{CONTENT}/g,p):`${w} ${p}`},l=h=>{const p=h.match(/TASK-(.*)?/g);return p?p[1]:""},u=h=>h==="TASK-TODO"?"- [ ] ":h==="TASK-DONE"?"- [x] ":h.match(/TASK-(.*)?/g)?`- [${l(h)}] `:"- ",f=h=>h.reduce((p,m)=>{const w=m.sourceType!=="MULTI"?`${m.content}`:`[[${m.path}]]`,b=t?.ShowTime?s(m,w,t?.DefaultMemoComposition):w,y=`${u(m.thinoType)}${b}`;let S="";return t.CommentOnMemos&&m.hasId!==void 0&&m.hasId!==""&&(S=vX(m).reduce((E,C)=>{const M=u(C.thinoType),k=C.content.replace(a,"").replace(i,""),O=t?.ShowDate?`${M}[[${A.moment(C.createdAt).format(n)}]] ${A.moment(C.createdAt).format("HH:mm")} ${k}`:`${M}${k}`;return E+r+" "+O+`
`},"")),p+r+y.replace(/ \^\S{6}/g,"")+`
`+S},"");return e.reduce((h,p)=>{const m=t?.ShowDate?`- [[${A.moment(p.date,"YYYY-MM-DD").format(n)}]]
`:"",w=f(p.have),b=t?.ShowDate&&t?.AddBlankLineWhenDate&&!t?.CommentOnMemos?`
`:"";return h+m+w+b},"").replace(/<br>/g,`
`)},bX=[{label:I("Today"),value:A.moment().format("YYYY-MM-DD")},{label:I("Yesterday"),value:A.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:I("Last 7 days"),value:A.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:I("Last 30 days"),value:A.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:I("Last 90 days"),value:A.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:I("Last 180 days"),value:A.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:I("Last 365 days"),value:A.moment().subtract(365,"days").format("YYYY-MM-DD")}],r6=e=>{const{handleValueChange:t,setShownStatus:n}=e;return g.jsxs(g.Fragment,{children:[e.type==="icon"&&g.jsx("div",{className:"quick-date-btn-group",children:bX.map((r,o)=>g.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},o))}),g.jsx(a0,{className:"calendar-date-picker",datestamp:e?.defaultValue||A.moment().startOf("day").valueOf(),handleDateStampChange:(r,o)=>{t(e.type==="icon"?A.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},bb=e=>{const{handleValueChange:t}=e,[n,r]=_.useState(!1),o=_.useRef(null),a=_.useRef(null),i=s0(a.current,o.current,{placement:"bottom-start"});return cg(o,()=>{r(!1)}),g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:l=>{a.current=l,l&&e.type==="icon"&&A.setIcon(l,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!A.Platform.isMobile&&r(!n),!A.Platform.isMobile&&i?.update&&i?.update(),A.Platform.isMobile&&new o6(Ze.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:A.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),g.jsx("div",{className:`menu-btns-popup ${n?"":"thino-hidden"}`,ref:o,style:i.styles.popper,children:g.jsx(r6,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class o6 extends A.Modal{root;type;handleValueChange;constructor(t,n,r){super(t),this.type=n,this.handleValueChange=r}onOpen(){const{contentEl:t}=this;this.root=ag(t),this.root.render(g.jsx(r6,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:n=>{!n&&this.close()}}))}onClose(){this.root?.unmount()}}const wX=(e,t)=>(e%t+t)%t;class SX{owner;values;suggestions;selectedItem;containerEl;constructor(t,n,r){this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),r.register([],"ArrowUp",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",o=>{if(!o.isComposing)return this.useSelectedItem(o),!1})}onSuggestionClick(t,n){t.preventDefault();const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,n){const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1)}setSuggestions(t){this.containerEl.empty();const n=[];t.forEach(r=>{const o=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,o),n.push(o)}),this.values=t,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(t){const n=this.values[this.selectedItem];n&&this.owner.selectSuggestion(n,t)}setSelectedItem(t,n){const r=wX(t,this.suggestions.length),o=this.suggestions[this.selectedItem],a=this.suggestions[r];o?.removeClass("is-selected"),a?.addClass("is-selected"),this.selectedItem=r,n&&a.scrollIntoView(!1)}}class a6{inputEl;popper;scope;suggestEl;suggest;cb;constructor(t,n){this.inputEl=t,this.scope=new A.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new SX(this,r,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("click",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",o=>{o.preventDefault()})}clearInput(){this.inputEl.value="",this.inputEl.trigger("blur"),this.inputEl.trigger("focus"),this.inputEl.trigger("input"),this.onInputChanged()}onInputChanged(){const t=this.inputEl.value,n=this.getSuggestions(t);if(!n){this.close();return}n.length>0?(this.suggest.setSuggestions(n),this.open(app.dom.appContainerEl,this.inputEl)):this.close()}open(t,n){app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=n6(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:o})=>{const a=`${r.rects.reference.width}px`;r.styles.popper.width!==a&&(r.styles.popper.width=a,o.update())},phase:"beforeWrite",requires:["computeStyles"]}]})}close(){app.keymap.popScope(this.scope),this.suggest.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}destroy(){this.inputEl.removeEventListener("input",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("blur",this.close.bind(this)),this.close()}updateCb(t){this.cb=t}}const TX=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let Zp=class extends a6{fuzzySearchItemsOptimized(t,n){const r=A.prepareFuzzySearch(t);return n.map(o=>{const a=r(o);return a?{item:o,match:a,score:a.score}:null}).sort((o,a)=>a?.score-o?.score).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=Ze.getState(),o=t.toLocaleLowerCase(),a=n.UseVaultTags?TX(r):le.getState().tags;return this.fuzzySearchItemsOptimized(o,a).map(i=>i.item)}renderSuggestion(t,n){n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:t})}selectSuggestion(t){this.inputEl.value=t,this.cb&&this.cb(t),this.inputEl.dispatchEvent(new Event("change")),this.inputEl.trigger("change"),this.close()}};const xX=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp(Ef).exec(n.content),o=new RegExp(rC).exec(n.content);if(r)for(let a=1;a<r.length;a++)t.add(r[a]);if(o)for(let a=1;a<o.length;a++)t.add(o[a])}),Array.from(t)};class IX extends A.Modal{root;cb;tags=[];constructor(t,n){super(t),this.cb=n}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=Sa.createRoot(this.contentEl),this.root.render(g.jsx(Ea,{store:Se,context:it,children:g.jsx(kX,{closeDialog:this.closeDialog.bind(this)})}))}closeDialog(t){this.tags=t,this.close()}onClose(){this.cb(this.tags),super.onClose(),this.root?.unmount()}}const kX=({closeDialog:e})=>{const[t,n]=_.useState([]),r=_.useRef(null),o=_.useRef(null);D.useEffect(()=>{if(o.current){if(r.current){r.current.updateCb(a);return}r.current=new Zp(o.current,a)}},[o.current,t]);const a=s=>{if(!s)return;const l=new Set(t);l.add(s),n(Array.from(l)),r.current.clearInput()},i=()=>{e(t)};return g.jsxs("div",{className:"thino-tag-operation",children:[g.jsx("div",{className:"tag-operation-title",children:I("Tag Bulk Select")}),g.jsxs("div",{className:"tag-operation-content",children:[g.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[g.jsx("div",{className:"name",children:I("Selected Tags")}),g.jsx("div",{className:"desc",children:I("Click to remove selected tag")})]}),g.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(s=>g.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(l=>l!==s))},children:s},s))}),g.jsx("div",{className:"tag-operation-content-inputer",children:g.jsx("input",{placeholder:I("Input to select exist tag"),ref:o,onKeyDown:s=>{s.key==="Enter"&&a(o.current.value)}})}),g.jsxs("div",{className:"tag-operation-content-btn-group",children:[g.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:I("Cancel")}),g.jsx("button",{className:"save-btn",onClick:i,children:I("Save")})]})]})]})},EX=({app:e,thinos:t,closeDialog:n})=>{const[r,o]=_.useState([]),[a,i]=_.useState([]),[s,l]=_.useState([]),u=_.useRef(null),f=_.useRef(null),h=_.useRef(null),p=_.useRef("End"),m=_.useRef(!1),w=_.useRef(null);D.useEffect(()=>{t&&t.length&&o(xX(t))},[t]),D.useEffect(()=>{!h.current||!f.current||(new A.Setting(f.current).setName(I("Add tag position")).addDropdown(x=>{x.addOption("End",I("End")),x.addOption("Beginning",I("Beginning")),x.setValue("End").onChange(async E=>{p.current=E})}),new A.Setting(h.current).setName(I("Add tag with new line")).addToggle(x=>{x.setValue(!1).onChange(async E=>{m.current=E})}))},[]);const b=x=>{if(!x)return;const E=new Set(a);E.add(x),i(Array.from(E)),u.current.clearInput()};D.useEffect(()=>{if(w.current){if(u.current){u.current.updateCb(b);return}u.current=new Zp(w.current,b)}},[w.current,a]);const y=()=>{n(),S({remove:s,add:a,targetThinos:t})},S=async({remove:x,add:E,targetThinos:C})=>{const M=m.current||!1,k=[];for(const O of C){let F=O.content;for(const R of x)F=F.replace(new RegExp(`#${R}`,"g"),"");if(F=F.trim(),E.length>0&&(F=p.current==="Beginning"?`${E.map(R=>`#${R}`).join(" ")} ${M?`
`:""}${F}`:`${F} ${M?`
`:""}${E.map(R=>`#${R}`).join(" ")}`),O&&O.content!==F){const R=await le.updateMemo(O.id,F?.trim());k.push(R)}}k.length>0&&le.editMemoBulk(k),k.length>0&&Ye.clearQuery()};return g.jsxs("div",{className:"thino-tag-operation",children:[g.jsx("div",{className:"tag-operation-title",children:I("Tag Bulk Edit")}),g.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[g.jsx("div",{className:"name",children:I("Exist Tags")}),g.jsx("div",{className:"desc",children:I("Click to remove exist tag")})]}),g.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(x=>g.jsx("div",{className:qt("tag-operation-content-tag",s.includes(x)&&"tag-operation-content-tag-removed"),onClick:()=>{s.includes(x)||l([...s,x]),s.includes(x)&&l(s.filter(E=>E!==x)),a.includes(x)&&i(a.filter(E=>E!==x))},children:x},x))})]}),g.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[g.jsx("div",{className:"name",children:I("Selected Tags")}),g.jsx("div",{className:"desc",children:I("Click to remove selected tag")})]}),g.jsx("div",{className:"tag-operation-content-tags selected-tags",children:a.map(x=>g.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{i(a.filter(E=>E!==x))},children:x},x))}),g.jsx("div",{className:"tag-operation-content-inputer",children:g.jsx("input",{placeholder:I("Input to select exist tag"),ref:w,onKeyDown:x=>{x.key==="Enter"&&b(w.current.value)}})}),g.jsxs("div",{className:"tag-operation-settings",children:[g.jsx("div",{ref:f}),g.jsx("div",{ref:h})]}),g.jsxs("div",{className:"tag-operation-content-btn-group",children:[g.jsx("button",{className:"cancel-btn",onClick:n,children:I("Cancel")}),g.jsx("button",{className:"save-btn",onClick:y,children:I("Save")})]})]})]})},MI=new Map,ya=async(e,t=!0)=>{const{vault:n,metadataCache:r}=Ze.getState().app;if(t&&MI.has(e))return Promise.resolve(MI.get(e));if(e.contains("data:image"))return e;let o;const a=await n.adapter.exists(A.normalizePath(e));let i="";try{if(!a&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let s;if(e.startsWith("app://")){const l=A.normalizePath(decodeURIComponent(e).replace(A.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(A.normalizePath(app?.vault.adapter.basePath),""));i=A.normalizePath(decodeURIComponent(l))}else{if(s=r.getFirstLinkpathDest(e,""),!s){new A.Notice(I("File not exist"));return}i=s.path}}else i=e}catch(s){console.error(s)}if(i){if(/(http|https)/g.test(i))if(i.startsWith("http://localhost")){let s=i;s=s.replace("http://localhost/_capacitor_file_",""),s=decodeURIComponent(s).replace(/\?(.*)$/,"").replace(app?.vault.adapter.basePath,""),s=A.normalizePath(decodeURIComponent(s));const l=await n.adapter.readBinary(s),u=new Uint8Array(l);o=new Blob([u],{type:"image/png"})}else try{const s=await A.requestUrl(e),l=new Uint8Array(s.arrayBuffer);o=new Blob([l],{type:"image/png"})}catch{}else if(i){const s=await n.adapter.readBinary(i),l=new Uint8Array(s);o=new Blob([l],{type:"image/png"})}return o?await CX(o,e):""}},CX=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const o=r.result;MI.set(t,o),n(o)},r.readAsDataURL(e)}),mp=async e=>{if(!e.style.backgroundImage.includes("url(")&&!e.style.backgroundImage.includes("http"))return;let t=e.style.backgroundImage.includes("url(")?e.style.backgroundImage.slice(5,-2):e.style.backgroundImage;return t?(t.startsWith("http://localhost")&&(t=t.replace("http://localhost/_capacitor_file_",""),t=decodeURIComponent(t).replace(/\?(.*)$/,"").replace(app?.vault.adapter.basePath,""),t=A.normalizePath(decodeURIComponent(t))),await ya(t)):void 0},MX=async e=>e.getAttribute("src")?e?.src?.startsWith("http://localhost")?await ya(e.getAttribute("path")||A.normalizePath(e?.parentElement.getAttribute("src"))):await ya(e.getAttribute("src")):void 0,gt=HX(),wb=BX(),i6=_X(),s6=YX(),Nc={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},Pt={toSvg:l6,toPng:NX,toJpeg:OX,toBlob:PX,toPixelData:AX,toCanvas:jX,impl:{fontFaces:i6,images:s6,util:gt,inliner:wb,urlCache:[],options:{}}},CC=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,Vy=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,DX=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function l6(e,t){Pt.impl.util.getWindow(e),t=t||{},LX(t);let n=[];return Promise.resolve(e).then(r).then(function(l){return c6(l,t,null)}).then(RX).then(FX).then(i).then(s).then(o).then(a);function r(l){if(l.nodeType===CC)return l;const u=l,f=l.parentNode,h=document.createElement("span");return f.replaceChild(h,u),h.append(l),n.push({parent:f,child:u,wrapper:h}),h}function o(l){for(;n.length>0;){const u=n.pop();u.parent.replaceChild(u.child,u.wrapper)}return l}function a(l){return Pt.impl.urlCache=[],ZX(),l}function i(l){t.bgcolor&&(l.style.backgroundColor=t.bgcolor),t.width&&(l.style.width=`${t.width}px`),t.height&&(l.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(f){l.style[f]=t.style[f]});let u=null;return typeof t.onclone=="function"&&(u=t.onclone(l)),Promise.resolve(u).then(function(){return l})}function s(l){let u=t.width||gt.width(l),f=t.height||gt.height(l);return Promise.resolve(l).then(function(h){return h.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(h)}).then(gt.escapeXhtml).then(function(h){const p=(gt.isDimensionMissing(u)?' width="100%"':` width="${u}"`)+(gt.isDimensionMissing(f)?' height="100%"':` height="${f}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(gt.isDimensionMissing(u)?"":` width="${u}"`)+(gt.isDimensionMissing(f)?"":` height="${f}"`)}><foreignObject${p}>${h}</foreignObject></svg>`}).then(function(h){return`data:image/svg+xml;charset=utf-8,${h}`})}}function AX(e,t){return fg(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,gt.width(e),gt.height(e)).data})}function NX(e,t){return fg(e,t).then(function(n){return n.toDataURL()})}function OX(e,t){return fg(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function PX(e,t){return fg(e,t).then(gt.canvasToBlob)}function jX(e,t){return fg(e,t)}function LX(e){typeof e.copyDefaultStyles>"u"?Pt.impl.options.copyDefaultStyles=Nc.copyDefaultStyles:Pt.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?Pt.impl.options.imagePlaceholder=Nc.imagePlaceholder:Pt.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?Pt.impl.options.cacheBust=Nc.cacheBust:Pt.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?Pt.impl.options.corsImg=Nc.corsImg:Pt.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?Pt.impl.options.useCredentials=Nc.useCredentials:Pt.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?Pt.impl.options.httpTimeout=Nc.httpTimeout:Pt.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?Pt.impl.options.styleCaching=Nc.styleCaching:Pt.impl.options.styleCaching=e.styleCaching,Pt.impl.options.requestUrl=e.requestUrl,Pt.impl.options.type=e.type||"image/png"}function fg(e,t){return t=t||{},l6(e,t).then(gt.makeImage).then(function(r){const o=typeof t.scale!="number"?1:t.scale,a=n(e,o),i=a.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(o,o),i.drawImage(r,0,0)),a});function n(r,o){let a=t.width||gt.width(r),i=t.height||gt.height(r);gt.isDimensionMissing(a)&&(a=gt.isDimensionMissing(i)?300:i*2),gt.isDimensionMissing(i)&&(i=a/2);const s=document.createElement("canvas");if(s.width=a*o,s.height=i*o,t.bgcolor){const l=s.getContext("2d");l.fillStyle=t.bgcolor,l.fillRect(0,0,s.width,s.height)}return s}}let Vo=null;function c6(e,t,n,r){const o=t.filter;if(e===Vo||gt.isHTMLScriptElement(e)||gt.isHTMLStyleElement(e)||gt.isHTMLLinkElement(e)||n!==null&&o&&!o(e))return Promise.resolve();return Promise.resolve(e).then(a).then(function(u){return s(u,i(e))}).then(function(u){return l(u,e)});function a(u){return gt.isHTMLCanvasElement(u)?gt.makeImage(u.toDataURL()):u.cloneNode(!1)}function i(u){return gt.isElementHostForOpenShadowRoot(u)?u.shadowRoot:u}function s(u,f){const h=w(f);let p=Promise.resolve();if(h.length!==0){const b=Vy(m(f));gt.asArray(h).forEach(function(y){p=p.then(function(){return c6(y,t,b).then(function(S){S&&u.appendChild(S)})})})}return p.then(function(){return u});function m(b){return gt.isShadowRoot(b)?b.host:b}function w(b){return gt.isShadowSlotElement(b)?b.assignedNodes():b.childNodes}}function l(u,f){if(!gt.isElement(u)||gt.isShadowSlotElement(f))return Promise.resolve(u);return Promise.resolve().then(h).then(p).then(m).then(w).then(function(){return u});function h(){y(f,u);function b(S,x){x.font=S.font,x.fontFamily=S.fontFamily,x.fontFeatureSettings=S.fontFeatureSettings,x.fontKerning=S.fontKerning,x.fontSize=S.fontSize,x.fontStretch=S.fontStretch,x.fontStyle=S.fontStyle,x.fontVariant=S.fontVariant,x.fontVariantCaps=S.fontVariantCaps,x.fontVariantEastAsian=S.fontVariantEastAsian,x.fontVariantLigatures=S.fontVariantLigatures,x.fontVariantNumeric=S.fontVariantNumeric,x.fontVariationSettings=S.fontVariationSettings,x.fontWeight=S.fontWeight}function y(S,x){const E=Vy(S);E.cssText?(x.style.cssText=E.cssText,b(E,x.style)):(UX(t,S,E,n,x),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(C=>x.style.removeProperty(C)),["left","right","top","bottom"].forEach(C=>{x.style.getPropertyValue(C)&&x.style.setProperty(C,"0px")})))}}function p(){const b=gt.uid();[":before",":after"].forEach(function(S){y(S)});function y(S){const x=Vy(f,S),E=x.getPropertyValue("content");if(E===""||E==="none")return;const C=u.getAttribute("class")||"";u.setAttribute("class",`${C} ${b}`);const M=document.createElement("style");M.appendChild(k()),u.appendChild(M);function k(){const O=`.${b}:${S}`,F=x.cssText?R():B();return document.createTextNode(`${O}{${F}}`);function R(){return`${x.cssText} content: ${E};`}function B(){return`${gt.asArray(x).map(H).join("; ")};`;function H(Z){const W=x.getPropertyValue(Z),$=x.getPropertyPriority(Z)?" !important":"";return`${Z}: ${W}${$}`}}}}}function m(){gt.isHTMLTextAreaElement(f)&&(u.innerHTML=f.value),gt.isHTMLInputElement(f)&&u.setAttribute("value",f.value)}function w(){gt.isSVGElement(u)&&(u.setAttribute("xmlns","http://www.w3.org/2000/svg"),gt.isSVGRectElement(u)&&["width","height"].forEach(function(b){const y=u.getAttribute(b);y&&u.style.setProperty(b,y)}))}}}function RX(e){return i6.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function FX(e){return s6.inlineAll(e).then(function(){return e})}function HX(){let e=0;return{escape:R,isDataUrl:S,canvasToBlob:C,resolveUrl:M,getAndEncode:F,uid:k,delay:B,asArray:Y,escapeXhtml:H,makeImage:O,width:Z,height:W,getWindow:t,isElement:a,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:o,isHTMLElement:s,isHTMLCanvasElement:i,isHTMLInputElement:u,isHTMLImageElement:l,isHTMLLinkElement:f,isHTMLScriptElement:h,isHTMLStyleElement:p,isHTMLTextAreaElement:m,isShadowSlotElement:w,isSVGElement:b,isSVGRectElement:y,isDimensionMissing:x};function t(V){const ne=V?V.ownerDocument:void 0;return(ne?ne.defaultView:void 0)||global||window}function n(V){return a(V)&&V.shadowRoot!==null}function r(V){return V instanceof t(V).ShadowRoot}function o(V){return V!==null&&Object.prototype.hasOwnProperty.call(V,"getRootNode")&&r(V.getRootNode())}function a(V){return V instanceof t(V).Element}function i(V){return V instanceof t(V).HTMLCanvasElement}function s(V){return V instanceof t(V).HTMLElement}function l(V){return V instanceof t(V).HTMLImageElement}function u(V){return V instanceof t(V).HTMLInputElement}function f(V){return V instanceof t(V).HTMLLinkElement}function h(V){return V instanceof t(V).HTMLScriptElement}function p(V){return V instanceof t(V).HTMLStyleElement}function m(V){return V instanceof t(V).HTMLTextAreaElement}function w(V){return o(V)&&V instanceof t(V).HTMLSlotElement}function b(V){return V instanceof t(V).SVGElement}function y(V){return V instanceof t(V).SVGRectElement}function S(V){return V.search(/^(data:)/)!==-1}function x(V){return isNaN(V)||V<=0}function E(V){return new Promise(function(ne){const Q=DX(V.toDataURL().split(",")[1]),te=Q.length,G=new Uint8Array(te);for(let X=0;X<te;X++)G[X]=Q.charCodeAt(X);ne(new Blob([G],{type:Pt.impl.options.type}))})}function C(V){return V.toBlob?new Promise(function(ne){V.toBlob(ne)}):E(V)}function M(V,ne){const Q=document.implementation.createHTMLDocument(),te=Q.createElement("base");Q.head.appendChild(te);const G=Q.createElement("a");return Q.body.appendChild(G),te.href=ne,G.href=V,G.href}function k(){return`u${V()}${e++}`;function V(){return`0000${(Math.random()*Math.pow(36,4)<<0).toString(36)}`.slice(-4)}}function O(V){return V==="data:,"?Promise.resolve():new Promise(function(ne,Q){const te=new Image;Pt.impl.options.useCredentials&&(te.crossOrigin="use-credentials"),te.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){ne(te)}):ne(te)},te.onerror=Q,te.src=V})}function F(V){let ne=Pt.impl.urlCache.find(function(Q){return Q.url===V});return ne||(ne={url:V,promise:null},Pt.impl.urlCache.push(ne)),ne.promise===null&&(Pt.impl.options.cacheBust&&(V+=(/\?/.test(V)?"&":"?")+new Date().getTime()),Pt.impl.options.requestUrl&&/^http/.test(V)?ne.promise=Pt.impl.options.requestUrl({url:V,method:"GET"}).then(Q=>new Promise(te=>{const G=new FileReader;G.onload=function(X){te(X.target.result)},G.readAsDataURL(new Blob([Q.arrayBuffer],{type:Q.headers["content-type"]}))})).catch(Q=>(console.error("cannot fetch resource: "+V+", error: "+Q),"")):ne.promise=new Promise(function(Q){const te=Pt.impl.options.httpTimeout,G=new XMLHttpRequest;if(G.onreadystatechange=ee,G.ontimeout=ie,G.responseType="blob",G.timeout=te,Pt.impl.options.useCredentials&&(G.withCredentials=!0),Pt.impl.options.corsImg&&V.indexOf("http")===0&&V.indexOf(window.location.origin)===-1){const we=(Pt.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";G.open(we,(Pt.impl.options.corsImg.url||"").replace("#{cors}",V),!0);let Ne=!1;const Ae=Pt.impl.options.corsImg.headers||{};Object.keys(Ae).forEach(function(Fe){Ae[Fe].indexOf("application/json")!==-1&&(Ne=!0),G.setRequestHeader(Fe,Ae[Fe])});const Te=fe(Pt.impl.options.corsImg.data||"");Object.keys(Te).forEach(function(Fe){typeof Te[Fe]=="string"&&(Te[Fe]=Te[Fe].replace("#{cors}",V))}),G.send(Ne?JSON.stringify(Te):Te)}else G.open("GET",V,!0),G.send();let X;if(Pt.impl.options.imagePlaceholder){const we=Pt.impl.options.imagePlaceholder.split(/,/);we&&we[1]&&(X=we[1])}function ee(){if(G.readyState!==4)return;if(G.status>=300){X?Q(X):he(`cannot fetch resource: ${V}, status: ${G.status}`);return}const we=new FileReader;we.onloadend=function(){Q(we.result)},we.readAsDataURL(G.response)}function ie(){X?Q(X):he(`timeout of ${te}ms occured while fetching resource: ${V}`)}function fe(we){try{return JSON.parse(JSON.stringify(we))}catch{he("corsImg.data is missing or invalid");return}}function he(we){console.error(we),Q("")}})),ne.promise}function R(V){return V.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function B(V){return function(ne){return new Promise(function(Q){setTimeout(function(){Q(ne)},V)})}}function Y(V){const ne=[],Q=V.length;for(let te=0;te<Q;te++)ne.push(V[te]);return ne}function H(V){return V.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")}function Z(V){const ne=$(V,"width");if(!isNaN(ne))return ne;const Q=$(V,"border-left-width"),te=$(V,"border-right-width");return V.scrollWidth+Q+te}function W(V){const ne=$(V,"height");if(!isNaN(ne))return ne;const Q=$(V,"border-top-width"),te=$(V,"border-bottom-width");return V.scrollHeight+Q+te}function $(V,ne){if(V.nodeType===CC){let Q=Vy(V).getPropertyValue(ne);if(Q.slice(-2)==="px")return Q=Q.slice(0,-2),parseFloat(Q)}return NaN}}function BX(){const e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:o,shouldProcess:t,impl:{readUrls:n,inline:r}};function t(a){return a.search(e)!==-1}function n(a){const i=[];let s;for(;(s=e.exec(a))!==null;)i.push(s[1]);return i.filter(function(l){return!gt.isDataUrl(l)})}function r(a,i,s,l){return Promise.resolve(i).then(function(f){return s?gt.resolveUrl(f,s):f}).then(l||gt.getAndEncode).then(function(f){return a.replace(u(i),`$1${f}$3`)});function u(f){return new RegExp(`(url\\(['"]?)(${gt.escape(f)})(['"]?\\))`,"g")}}function o(a,i,s){if(l())return Promise.resolve(a);return Promise.resolve(a).then(n).then(function(u){let f=Promise.resolve(a);return u.forEach(function(h){f=f.then(function(p){return r(p,h,i,s)})}),f});function l(){return!t(a)}}}function _X(){return{resolveAll:e,impl:{readAll:t}};function e(){return t().then(function(n){return Promise.all(n.map(function(r){return r.resolve()}))}).then(function(n){return n.join(`
`)})}function t(){return Promise.resolve(gt.asArray(document.styleSheets)).then(r).then(n).then(function(a){return a.map(o)});function n(a){return a.filter(function(i){return i.type===CSSRule.FONT_FACE_RULE}).filter(function(i){return wb.shouldProcess(i.style.getPropertyValue("src"))})}function r(a){const i=[];return a.forEach(function(s){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(s),"cssRules"))try{gt.asArray(s.cssRules||[]).forEach(i.push.bind(i))}catch(l){console.error(`domtoimage: Error while reading CSS rules from ${s.href}`,l.toString())}}),i}function o(a){return{resolve:function(){const s=(a.parentStyleSheet||{}).href;return wb.inlineAll(a.cssText,s)},src:function(){return a.style.getPropertyValue("src")}}}}}function YX(){return{inlineAll:t,impl:{newImage:e}};function e(n){return{inline:r};function r(o){return gt.isDataUrl(n.src)?Promise.resolve():Promise.resolve(n.src).then(o||gt.getAndEncode).then(function(a){return new Promise(function(i){n.onload=i,n.onerror=i,n.src=a})})}}function t(n){if(!gt.isElement(n))return Promise.resolve(n);return r(n).then(function(){return gt.isHTMLImageElement(n)?e(n).inline():Promise.all(gt.asArray(n.childNodes).map(function(o){return t(o)}))});function r(o){const i=["background","background-image"].map(function(s){const l=o.style.getPropertyValue(s),u=o.style.getPropertyPriority(s);return l?wb.inlineAll(l).then(function(f){o.style.setProperty(s,f,u)}):Promise.resolve()});return Promise.all(i).then(function(){return o})}}}function zX(e,t,n,r){const o=["background-clip"].indexOf(t)>=0;r?(e.setProperty(t,n,r),o&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),o&&e.setProperty(`-webkit-${t}`,n))}function UX(e,t,n,r,o){const a=Pt.impl.options.copyDefaultStyles?WX(e,t):{},i=o.style;gt.asArray(n).forEach(function(s){const l=n.getPropertyValue(s),u=a[s],f=r?r.getPropertyValue(s):void 0;if(l!==u||r&&l!==f){const h=n.getPropertyPriority(s);zX(i,s,l,h)}})}let Qv=null,Wy={};const VX=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];function WX(e,t){const n=s(t),r=l(n);if(Wy[r])return Wy[r];const o=GX(),a=u(o.document,n),i=f(o,a);return h(a),Wy[r]=i,i;function s(p){const m=[];do{if(p.nodeType===CC){const w=p.tagName;if(m.push(w),VX.includes(w))break}p=p.parentNode}while(p);return m}function l(p){return e.styleCaching==="relaxed"?p.filter((m,w,b)=>w===0||w===b.length-1).join(">"):p.join(">")}function u(p,m){let w=p.body;do{const b=m.pop(),y=p.createElement(b);w.appendChild(y),w=y}while(m.length>0);return w.textContent="​",w}function f(p,m){const w={},b=p.getComputedStyle(m);return gt.asArray(b).forEach(function(y){w[y]=y==="width"||y==="height"?"auto":b.getPropertyValue(y)}),w}function h(p){do{const m=p.parentElement;m!==null&&m.removeChild(p),p=m}while(p&&p.tagName!=="BODY")}}function GX(){if(Vo)return Vo.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`<!DOCTYPE ${r(t.name)} ${r(t.publicId)} ${r(t.systemId)}`.trim()+">":"";return Vo=document.createElement("iframe"),Vo.id="domtoimage-sandbox-"+gt.uid(),Vo.className="domtoimage-thino",Vo.style.visibility="hidden",Vo.style.position="fixed",document.body.appendChild(Vo),o(Vo,n,e,"domtoimage-sandbox");function r(a){if(a){const i=document.createElement("div");return i.innerText=a,i.innerHTML}else return""}function o(a,i,s,l){try{return a.contentWindow.document.write(`${i}<html><head><meta charset='${s}'><title>${l}</title></head><body></body></html>`),a.contentWindow}catch{}const u=document.createElement("meta");u.setAttribute("charset",s);try{const f=document.implementation.createHTMLDocument(l);f.head.appendChild(u);const h=i+f.documentElement.outerHTML;return a.setAttribute("srcdoc",h),a.contentWindow}catch{}return a.contentDocument.head.appendChild(u),a.contentDocument.title=l,a.contentWindow}}function ZX(){Vo&&(document.body.removeChild(Vo),Vo=null),Qv&&clearTimeout(Qv),Qv=setTimeout(()=>{Qv=null,Wy={}},20*1e3)}async function qX(e,t,n){return await Pt.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:2,requestUrl:A.requestUrl,type:n})}const l0=async(e,t)=>(await qX(e,!0,"image/jpeg")).toDataURL(),hO=async e=>{e.startsWith("http")&&(e=await ya(e));const t=e.split("base64,")[1],n=Xw(t,"image/png");await u6(n),new A.Notice(I("Send to clipboard successfully"))},$X=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const s=e.metadataCache.getFirstLinkpathDest(t,"");if(!s){new A.Notice(I("File not exist"));return}r=s.path}const o=await e.vault.adapter.readBinary(r),a=new Uint8Array(o),i=new Blob([a],{type:"image/png"});await u6(i)},u6=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},pO=1.1,mO=300,gO=20,KX=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:o})=>{const a=Se.getState().dailyNotesState.settings.ZoomImageWhenViewing,i=D.useRef(null),[s,l]=D.useState(-1),u=Se.getState().dailyNotesState.app,[f,h]=D.useState(o),[p,m]=D.useState(t),[w,b]=D.useState(!1),y={close:D.useRef(null),previous:D.useRef(null),next:D.useRef(null),decrease:D.useRef(null),increase:D.useRef(null),zoom:D.useRef(null),copy:D.useRef(null)};D.useEffect(()=>{!n&&!t||(A.setIcon(y.close.current,"x"),y.previous.current&&A.setIcon(y.previous.current,"arrow-left"),y.next.current&&A.setIcon(y.next.current,"arrow-right"),A.setIcon(y.decrease.current,"zoom-out"),A.setIcon(y.increase.current,"zoom-in"),A.setIcon(y.zoom.current,"circle"),A.setIcon(y.copy.current,"clipboard"))},[y]),D.useEffect(()=>{je.getImageSize(p).then(({width:R})=>{R!==0?(l(40),a&&!w&&(l(80),b(!0))):l(0)})},[p,a,w]);const S=()=>{let R=f-1;R<0&&(R=r.length-1),h(R),m(r[R].src)},x=()=>{let R=f+1;R>=r.length&&(R=0),h(R),m(r[R].src)},E=()=>{e()},C=()=>{s>30&&l(s-10)},M=()=>{l(s+10)},k=R=>{R.target!==i.current&&R.target===i.current.parentElement&&E()},O=R=>{if(R.ctrlKey){R.preventDefault();const B=i.current,Y=R.nativeEvent.offsetX,H=R.nativeEvent.offsetY,Z=Y/B.clientWidth,W=H/B.clientHeight;let $;R.deltaY>0?$=s/pO:$=s*pO,$>mO?$=mO:$<gO&&($=gO);const V=s;l($);const ne=R.currentTarget;ne.scrollLeft+=($-V)*Z,ne.scrollTop+=($-V)*W}else R.deltaX!==0&&(R.currentTarget.scrollLeft+=R.deltaX)},F=async()=>{if(p&&!n)await hO(t);else if(n){const B=r[f].parentElement.getAttribute("src");if(!B){await hO(p);return}await $X(u,B)}};return g.jsxs(g.Fragment,{children:[g.jsx("button",{ref:y.close,className:"btn close-btn",onClick:E}),g.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:k,onWheel:O,children:[g.jsx("img",{className:s<=0?"thino-hidden":"",ref:i,height:s+"%",src:p}),g.jsx("span",{className:"loading-text "+(s===-1?"":"thino-hidden"),children:I("Image is loading...")}),g.jsx("span",{className:"loading-text "+(s===0?"":"thino-hidden"),children:I("😟 Cannot load image, image link maybe broken")})]}),g.jsxs("div",{className:"action-btns-container",children:[r&&r?.length>1&&g.jsxs(g.Fragment,{children:[g.jsx("button",{ref:y.previous,className:"btn",onClick:S}),g.jsx("button",{ref:y.next,className:"btn",onClick:x})]}),g.jsx("button",{ref:y.decrease,className:"btn",onClick:C}),g.jsx("button",{ref:y.increase,className:"btn",onClick:M}),g.jsx("button",{ref:y.zoom,className:"btn",onClick:()=>l(80)}),g.jsx("button",{ref:y.copy,className:"btn",onClick:F})]})]})};function Wd({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){e0({className:"preview-image-dialog"},KX,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}var JX=class extends Error{constructor(e){super(`react-collapsed: ${e}`)}},Sb=(...e)=>(e[0],`${e[1]}`,void 0);function d6(e){const t=D.useRef(e);return D.useEffect(()=>{t.current=e}),D.useCallback((...n)=>t.current?.(...n),[])}function XX(e,t,n){const[r,o]=D.useState(t),a=D.useRef(typeof e<"u"),i=a.current?e:r,s=d6(n),l=D.useCallback(u=>{const h=typeof u=="function"?u(i):u;a.current||o(h),s?.(h)},[s,i]);return D.useEffect(()=>{Sb(!(a.current&&e==null),"`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."),Sb(!(!a.current&&e!=null),"`isExpanded` state is changing from uncontrolled to controlled. useCollapse should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop.")},[e]),[i,l]}var QX="(prefers-reduced-motion: reduce)";function eQ(){const[e,t]=D.useState(!1);return D.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(QX);t(n.matches);const r=o=>{t(o.matches)};if(n.addEventListener)return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)};if(n.addListener)return n.addListener(r),()=>{n.removeListener(r)}},[]),e}var tQ=eW.useId||(()=>{});function nQ(){return tQ()??""}var rQ=typeof window<"u"?D.useLayoutEffect:D.useEffect,m1=!1,oQ=0,vO=()=>++oQ;function aQ(e){const t=e||(m1?vO():null),[n,r]=D.useState(t);return rQ(()=>{n===null&&r(vO())},[]),D.useEffect(()=>{m1===!1&&(m1=!0)},[]),n!=null?String(n):void 0}function iQ(e){const t=nQ(),n=aQ(e);return typeof e=="string"?e:typeof t=="string"?t:n}function sQ(e,t){const n=performance.now(),r={};function o(){r.id=requestAnimationFrame(a=>{a-n>t?e():o()})}return o(),r}function yO(e){e.id&&cancelAnimationFrame(e.id)}function bO(e){return e?.current?e.current.scrollHeight:(Sb(!0,"Was not able to find a ref to the collapse element via `getCollapseProps`. Ensure that the element exposes its `ref` prop. If it exposes the ref prop under a different name (like `innerRef`), use the `refKey` property to change it. Example:\n\nconst collapseProps = getCollapseProps({refKey: 'innerRef'})"),0)}function lQ(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function cQ(e,t){if(e!=null)if(typeof e=="function")e(t);else try{e.current=t}catch{throw new JX(`Cannot assign value "${t}" to ref "${e}"`)}}function wO(...e){return e.every(t=>t==null)?null:t=>{e.forEach(n=>{cQ(n,t)})}}function uQ(e){let t=n=>{};t=n=>{if(!n?.current)return;const{paddingTop:r,paddingBottom:o}=window.getComputedStyle(n.current);Sb(!(r&&r!=="0px"||o&&o!=="0px"),`Padding applied to the collapse element will cause the animation to break and not perform as expected. To fix, apply equivalent padding to the direct descendent of the collapse element. Example:
Before: <div {...getCollapseProps({style: {padding: 10}})}>{children}</div>
After: <div {...getCollapseProps()}>
<div style={{padding: 10}}>
{children}
</div>
</div>`)},D.useEffect(()=>{t(e)},[e])}var dQ=typeof window>"u"?D.useEffect:D.useLayoutEffect;function fQ({duration:e,easing:t="cubic-bezier(0.4, 0, 0.2, 1)",onTransitionStateChange:n=()=>{},isExpanded:r,defaultExpanded:o=!1,hasDisabledAnimation:a,id:i,...s}={}){const l=d6(n),u=iQ(i?`${i}`:void 0),[f,h]=XX(r,o),p=D.useRef(f),[m,w]=D.useState(!1),b=eQ(),y=a??b,S=D.useRef(),x=D.useRef(),E=D.useRef(null),[C,M]=D.useState(null);uQ(E);const k=`${s.collapsedHeight||0}px`;function O(F){if(!E.current)return;const R=E.current;for(const B in F){const Y=F[B];Y?R.style[B]=Y:R.style.removeProperty(B)}}return dQ(()=>{if(!E.current||f===p.current)return;p.current=f;function R(H){return y?0:e??lQ(H)}const B=H=>`height ${R(H)}ms ${t}`,Y=H=>{function Z(){f?(O({height:"",overflow:"",transition:"",display:""}),l("expandEnd")):(O({transition:""}),l("collapseEnd")),w(!1)}x.current&&yO(x.current),x.current=sQ(Z,H)};return w(!0),f?S.current=requestAnimationFrame(()=>{l("expandStart"),O({display:"block",overflow:"hidden",height:k}),S.current=requestAnimationFrame(()=>{l("expanding");const H=bO(E);Y(R(H)),E.current&&(E.current.style.transition=B(H),E.current.style.height=`${H}px`)})}):S.current=requestAnimationFrame(()=>{l("collapseStart");const H=bO(E);Y(R(H)),O({transition:B(H),height:`${H}px`}),S.current=requestAnimationFrame(()=>{l("collapsing"),O({height:k,overflow:"hidden"})})}),()=>{S.current&&cancelAnimationFrame(S.current),x.current&&yO(x.current)}},[f,k,y,e,t,l]),{isExpanded:f,setExpanded:h,getToggleProps(F){const{disabled:R,onClick:B,refKey:Y,...H}={refKey:"ref",onClick(){},disabled:!1,...F},Z=C?C.tagName==="BUTTON":void 0,W=F?.[Y||"ref"],$={id:`react-collapsed-toggle-${u}`,"aria-controls":`react-collapsed-panel-${u}`,"aria-expanded":f,onClick(Q){R||(B?.(Q),h(te=>!te))},[Y||"ref"]:wO(W,M)},V={type:"button",disabled:R?!0:void 0},ne={"aria-disabled":R?!0:void 0,role:"button",tabIndex:R?-1:0};return Z===!1?{...$,...ne,...H}:Z===!0?{...$,...V,...H}:{...$,...V,...ne,...H}},getCollapseProps(F){const{style:R,refKey:B}={refKey:"ref",style:{},...F},Y=F?.[B||"ref"];return{id:`react-collapsed-panel-${u}`,"aria-hidden":!f,"aria-labelledby":`react-collapsed-toggle-${u}`,role:"region",...F,[B||"ref"]:wO(E,Y),style:{boxSizing:"border-box",...!m&&!f?{display:k==="0px"?"none":"block",height:k,overflow:"hidden"}:{},...R}}}}}const f6=D.memo(({memoId:e,showOutgoingLinks:t=!0,showIncomingLinks:n=!0})=>{const[r,o]=D.useState([]),[a,i]=D.useState([]),[s,l]=D.useState(null),[u,f]=D.useState(!1),[h,p]=D.useState(!1),m=D.useRef(null);D.useEffect(()=>{!s&&!u&&!h&&(f(!0),(async()=>{const y=le.getMemoById(e);y&&l(y),f(!1)})())},[e,s,u,h]),D.useEffect(()=>{s&&!h&&!u&&(f(!0),(async()=>{try{if(t){const y=[],S=[...s.content.matchAll(yu)];for(const E of S)if(E&&E.length===3){const C=E[2],M=le.getMemoById(C);M&&y.push({...M,createdAtStr:je.getDateTimeString(M.createdAt),dateStr:je.getDateString(M.createdAt)})}const x=Qw(s.content);for(const E of x){const[C,M]=E.split("#^"),k=M;if(C&&k){const O=await le.getLinkedMemoByBlockId(k,C);O&&(y.some(F=>F.id===O.id)||y.push({...O,createdAtStr:je.getDateTimeString(O.createdAt),dateStr:je.getDateString(O.createdAt)}))}}o([...y])}if(n){const y=await le.getLinkedMemos(s.id);let S=[];s.hasId&&s.path&&(S=await le.getLinkedMemosByLinkId(s.hasId,s.path));const x=[...y,...S],E=Array.from(new Map(x.map(C=>[C.id,C])).values());i(E.sort((C,M)=>je.getTimeStampByDate(M.createdAt)-je.getTimeStampByDate(C.createdAt)).map(C=>({...C,createdAtStr:je.getDateTimeString(C.createdAt),dateStr:je.getDateString(C.createdAt)})))}p(!0)}catch(y){console.error("Error fetching linked memos:",y)}f(!1)})())},[s,t,n,h,u]);const w=D.useCallback(b=>{Qa(b)},[]);return g.jsxs("div",{className:qt("reference-links-group",u?"loading":"loaded"),ref:m,children:[u&&g.jsx("div",{className:"links-loading",children:g.jsx("span",{className:"loading-text",children:I("Loading...")})}),h&&g.jsxs(g.Fragment,{children:[t&&r.length>0&&g.jsx("div",{className:"links-section outgoing-links",children:g.jsx("div",{className:"links-list",children:r.map(b=>{const y=sb(Up(b.content)).replaceAll(`
`," ");return g.jsxs("div",{"aria-label":`${I("Linked")} ${b.content}`,className:"link-item",onClick:()=>w(b),children:[g.jsx("div",{className:"link-icon",ref:S=>S&&A.setIcon(S,"circle-dot")}),g.jsxs("div",{className:"link-date",children:[b.dateStr,":"]}),g.jsx("div",{className:"link-content",children:y})]},b.id)})})}),n&&a.length>0&&g.jsx("div",{className:"links-section incoming-links",children:g.jsx("div",{className:"links-list",children:a.map(b=>{const y=sb(Up(b.content)).replaceAll(`
`," ");return g.jsxs("div",{"aria-label":`${I("Linked by")} ${b.content}`,className:"link-item",onClick:()=>w(b),children:[g.jsx("div",{className:"link-icon",ref:S=>S&&A.setIcon(S,"circle-dot-dashed")}),g.jsxs("div",{className:"link-date",children:[b.dateStr,":"]}),g.jsx("div",{className:"link-content",children:y})]},b.id)})})}),h&&!u&&r.length===0&&a.length===0&&null]})]})},(e,t)=>e.memoId===t.memoId&&e.showIncomingLinks===t.showIncomingLinks&&e.showOutgoingLinks===t.showOutgoingLinks),hQ=e=>{const{dailyNotesState:{app:t,view:n,settings:r},globalState:{memoListView:o}}=D.useContext(it),{getCollapseProps:a,getToggleProps:i,isExpanded:s,setExpanded:l}=fQ({defaultExpanded:!0,collapsedHeight:r?.ThinoCollapsedHeight??100}),{memo:u,handleMemoContentClick:f,handleMemoDoubleClick:h}=e,p=_.useRef(null),[m,w]=_.useState(""),b=_.useRef(m),y=_.useRef(0),[S,x]=_.useState(!1),[E,C]=_.useState(!1),M=A.debounce((O,F,R)=>{for(const B of O){const{height:Y}=B.contentRect,H=F?.ThinoMaxHeight||340,Z=Y>H;x(Z),l(!Z),R.disconnect()}},500);D.useEffect(()=>{if(u.content!==b.current){if(r?.OptimizeForCallout&&u.content.split("> [!").length>3&&u.content.split(`
`).length>10&&!E){const O=p.current.createEl("button");O.setText(I("Render content")),O.onclick=async()=>{C(!0),await k()};const F=p.current.createEl("textarea");F.setText(u.content),F.disabled=!0,p.current?.toggleClass(["raw-content"],!0),l(!0),x(!1);return}k()}},[u.content]),D.useEffect(()=>{E&&y.current!==r?.ThinoMaxHeight&&(p?.current.hasChildNodes()&&C(!1),k())},[r?.ThinoMaxHeight]),D.useEffect(()=>{if(!E)return;const O=p.current;if(!O)return;if(!r?.ThinoMaxHeight){l(!0),x(!1);return}const F=new ResizeObserver(R=>{M(R,r,F)});return F.observe(O),()=>F.disconnect()},[E]);const k=async()=>{p.current&&n&&t&&u.content!==b.current&&(p.current.empty(),await A.MarkdownRenderer.render(t,u.content,p.current,u.path,n),p.current?.querySelectorAll(".internal-link")?.forEach(F=>{const R=F,B=R.getAttribute("data-href");if(!B)return;t.metadataCache.getFirstLinkpathDest(B,u.path)||F.classList.add("is-unresolved"),R.addEventListener("mouseover",H=>{H.stopPropagation(),t.workspace.trigger("hover-link",{event:H,source:"thino",hoverParent:n.containerEl,targetEl:R,linktext:B,sourcePath:R.href})})})),b.current=u.content,p.current?.toggleClass(["markdown-rendered"],!0),p.current?.toggleClass(["raw-content"],!1),C&&C(!0),y.current=r?.ThinoMaxHeight||340};return g.jsxs(g.Fragment,{children:[S&&o==="moments"&&g.jsxs(g.Fragment,{children:[g.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:I(s?"Collapse":"Expand")}),!s&&r?.ThinoCollapsedHeight!==0&&g.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:h})]}),g.jsx("div",{...a({style:{margin:0}}),ref:p,className:"memo-content-text",onClick:O=>f(O,u),onDoubleClick:h,onContextMenu:O=>{O.preventDefault()}}),o==="list"&&r?.enableReferenceLinksGroup&&g.jsx(f6,{memoId:u.id}),S&&o!=="moments"&&g.jsxs(g.Fragment,{children:[!s&&r?.ThinoCollapsedHeight!==0&&g.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:h}),g.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:I(s?"Collapse":"Expand")})]})]})},h6=D.memo(hQ,(e,t)=>e.memo.content===t.memo.content),pQ=e=>{const[t,n]=D.useState({...e.memo,createdAtStr:je.getDateTimeString(e.memo.createdAt)}),[r,o]=D.useState([]),[a,i]=D.useState([]);D.useEffect(()=>{(async()=>{try{const h=[],p=[...t.content.matchAll(yu)];for(const x of p)if(x&&x.length===3){const E=x[2],C=le.getMemoById(E);C&&h.push({...C,createdAtStr:je.getDateTimeString(C.createdAt),dateStr:je.getDateString(C.createdAt)})}const m=Qw(t.content);for(const x of m){const[E,C]=x.split("#^"),M=C;if(E&&M){const k=await le.getLinkedMemoByBlockId(M,E);k&&(h.some(O=>O.id===k.id)||h.push({...k,createdAtStr:je.getDateTimeString(k.createdAt),dateStr:je.getDateString(k.createdAt)}))}}o([...h]);const w=await le.getLinkedMemos(t.id);let b=[];t.hasId&&t.path&&(b=await le.getLinkedMemosByLinkId(t.hasId,t.path));const y=[...w,...b],S=Array.from(new Map(y.map(x=>[x.id,x])).values());i(S.sort((x,E)=>je.getTimeStampByDate(E.createdAt)-je.getTimeStampByDate(x.createdAt)).map(x=>({...x,createdAtStr:je.getDateTimeString(x.createdAt),dateStr:je.getDateString(x.createdAt)})))}catch(h){console.error("Error fetching linked memos:",h)}})()},[t.id,t.hasId,t.path]);const s=D.useCallback(async f=>{const h=f.target;if(h.className==="memo-link-text"){const p=h.dataset?.value,m=le.getMemoById(p??"");if(m){const w={...m,createdAtStr:je.getDateTimeString(m.createdAt)};o([]),i([]),n(w)}else new A.Notice(I("Thino not found")),h.classList.remove("memo-link-text")}},[]),l=D.useCallback(f=>{o([]),i([]),n({...f,createdAtStr:je.getDateTimeString(f.createdAt)})},[t.id]),u=D.useCallback(()=>{e.destroy(),Ge.setEditMemoId(t.id)},[t.id]);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"memo-card-container",children:[g.jsxs("div",{className:"header-container",children:[g.jsx("span",{className:"time-text",children:t.createdAtStr}),g.jsxs("div",{className:"btns-container",children:[g.jsx("button",{ref:f=>{f&&A.setIcon(f,"edit")},className:"btn edit-btn",onClick:u}),g.jsx("button",{ref:f=>{f&&A.setIcon(f,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),g.jsx("div",{className:"memo-container",children:g.jsx("div",{className:"memo-content-text",children:g.jsx(h6,{memo:t,handleMemoContentClick:s,handleMemoDoubleClick:()=>{}})})}),g.jsx("div",{className:"layer-container"})]}),r.length>0?g.jsxs("div",{className:"linked-memos-wrapper",children:[g.jsxs("span",{className:"normal-text",children:[I("LINKED")," ",r.length," THINO"," "]}),r.map(f=>{const h=sb(Up(f.content)).replaceAll(`
`," ");return g.jsxs("div",{className:"linked-memo-container",onClick:()=>l(f),children:[g.jsxs("span",{className:"time-text",children:[f.dateStr," "]}),h]},f.id)})]}):null,a.length>0?g.jsxs("div",{className:"linked-memos-wrapper",children:[g.jsxs("span",{className:"normal-text",children:[a.length," THINO ",I("LINK TO THE")," THINO"]}),a.map(f=>{const h=sb(Up(f.content)).replaceAll(`
`," ");return g.jsxs("div",{className:"linked-memo-container",onClick:()=>l(f),children:[g.jsxs("span",{className:"time-text",children:[f.dateStr," "]}),h]},f.id)})]}):null]})};function Qa(e){e0({className:"memo-card-dialog"},pQ,{memo:e})}function mQ({mouseEnterDelayMS:e=0,mouseLeaveDelayMS:t=0}={}){const[n,r]=D.useState(!1);let o,a;return[n,{onMouseEnter:()=>{clearTimeout(a),o=window.setTimeout(()=>r(!0),e)},onMouseLeave:()=>{clearTimeout(o),a=window.setTimeout(()=>r(!1),t)}}]}const gQ=e=>{const{memo:t,memoListView:n,handlePinMemoClick:r,handleFixMemoClick:o,handleSourceMemoClick:a,handleShowMemoStoryDialog:i,handleCopyMemoClick:s,handleEditMemoClick:l,handleGenMemoImageBtnClick:u,handleMarkMemoClick:f,handleArchiveMemo:h,handleDeleteMemoClick:p,handleSplitMemoClick:m,handleCopyEmbedLink:w,handleReferenceLinksGroupClick:b}=e,y=Ye.getState().query.tag,S=Se.getState().dailyNotesState.settings,x=S.EnabledLocationList.find(Z=>Z.value==="MULTI"),[E,C]=Nf(!1),M=D.useRef(null),k={pinRef:D.useRef(null),fixRef:D.useRef(null),typeRef:D.useRef(null),referenceLinksGroupRef:D.useRef(null),moreRef:D.useRef(null)},[O,F]=mQ({mouseEnterDelayMS:500}),R=D.useRef();D.useEffect(()=>{if(!k.typeRef)return;const Z=zp.find(W=>W.title===t.sourceType);A.setIcon(k.typeRef.current,Z.icon),A.requireApiVersion("1.4.4")&&A.setTooltip(k.typeRef.current,t.path),k.fixRef&&(A.setIcon(k.fixRef.current,"shield-alert"),A.requireApiVersion("1.4.4")&&A.setTooltip(k.fixRef.current,"Update Thino property")),k.referenceLinksGroupRef&&S?.enableReferenceLinksGroup&&(A.setIcon(k.referenceLinksGroupRef.current,"link"),A.requireApiVersion("1.4.4")&&A.setTooltip(k.referenceLinksGroupRef.current,"Reference links group"))},[k.typeRef,k.referenceLinksGroupRef]),D.useEffect(()=>{k.pinRef&&(t.pinned?(A.setIcon(k.pinRef.current,"pin-off"),A.requireApiVersion("1.4.4")&&A.setTooltip(k.pinRef.current,I("UNPIN"))):(A.setIcon(k.pinRef.current,"pin"),A.requireApiVersion("1.4.4")&&A.setTooltip(k.pinRef.current,I("PIN"))))},[k.pinRef,t.pinned]);const B=A.debounce(()=>{if(O&&k.moreRef.current){if(R.current&&R.current._loaded||R.current?.useNativeMenu||document.body.find(".more-action-btns-wrapper"))return;const Z=Y(),W=k.moreRef.current.getBoundingClientRect();Z.showAtPosition({x:W.left,y:W.bottom})}},200);D.useEffect(()=>{B()},[O]);const Y=()=>{const Z=new A.Menu;return Z.dom.toggleClass(["more-action-btns-wrapper"],!0),Z.useNativeMenu?(Z.setNoIcon(),Z.addItem(W=>{W.setTitle(I("COPY")).onClick(s)}),Z.addItem(W=>{W.setTitle(I("EDIT")).onClick(l)}),Z.addItem(W=>{W.setTitle(I("SHARE")).onClick(u)})):Z.addItem(W=>{const $=W.dom;W.dom.empty(),W.dom.toggleClass(["more-action-btn-group","more-action-menu-item"],!0);const V=$.createEl("span");new A.ExtraButtonComponent(V).setIcon("copy"),V.toggleClass(["menu-item-icon","more-action-item-icon"],!0),V.onclick=te=>{te.stopPropagation(),te.preventDefault(),s(),Z.close()};const ne=$.createEl("span");ne.toggleClass(["menu-item-icon","more-action-item-icon"],!0),ne.onclick=te=>{te.stopPropagation(),te.preventDefault(),l(),Z.close()},new A.ExtraButtonComponent(ne).setIcon("pencil");const Q=$.createEl("span");Q.toggleClass(["menu-item-icon","more-action-item-icon"],!0),Q.onclick=te=>{te.stopPropagation(),te.preventDefault(),u(),Z.close()},new A.ExtraButtonComponent(Q).setIcon("share-2")}),Z.addSeparator(),t.sourceType==="DAILY"&&(Z.addItem(W=>{W.setIcon("copy").setTitle(I("Copy embed link")).onClick(()=>{w(!0)})}),Z.addItem(W=>{W.setIcon("copy").setTitle(I("Copy link")).onClick(()=>{w(!1)})}),Z.addSeparator()),Z.addItem(W=>{W.setIcon("book-open").setTitle(I("READ")).onClick(()=>i(new MouseEvent("click")))}),Z.addItem(W=>{W.setIcon("bookmark").setTitle(I("MARK")).onClick(f)}),/(^|\n)#{1,6}\s/g.exec(t.content)?.length>1&&x&&Z.addItem(W=>{W.setIcon("separator-horizontal").setTitle(I("SPLIT")).onClick(m)}),Z.addItem(W=>{W.setIcon("home").setTitle(I("SOURCE")).onClick(()=>a(t))}),Z.addSeparator(),Z.addItem(W=>{W.setWarning(!0).setIcon("archive").setTitle(I("ARCHIVE").toUpperCase()).onClick(()=>h(t))}),Z.addItem(W=>{W.setWarning(!0).setIcon("trash").setTitle(S.DeleteThinoDirectly?I("DELETE"):I("TRASH BOX").toUpperCase().toUpperCase()).onClick($=>{if(Z.useNativeMenu)p(),Z.close();else if($.stopPropagation(),$.preventDefault(),!E){C(!0),W.setTitle(I("CONFIRM!")).onClick(V=>{p(),Z.close()});return}})}),Z.addSeparator(),Z.addItem(W=>{W.setDisabled(!0).setTitle(je.getWordCount(t.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${I("words")}`)}),Z.onHide(()=>{C(!1)}),R.current=Z,Z},H=Z=>{Y().showAtMouseEvent(Z.nativeEvent)};return g.jsxs("div",{ref:M,className:"memo-top-right-wrapper",children:[y&&S.FilterByMetadata?t.content.includes(y)?g.jsx("span",{className:"tag-text tag-in-content",children:I("Matched via tag in content")}):t.fileInfo?.tags.includes(y)?g.jsx("span",{className:"tag-text tag-in-file",children:I("Matched via tag in file")}):null:null,g.jsxs("div",{className:"btns-container",children:[g.jsx("span",{ref:k.fixRef,className:`btn ${t.sourceType!=="MULTI"||t.id!==""?"thino-hidden":""} fix-memo-btn`,onClick:()=>o(t)}),S?.enableReferenceLinksGroup&&g.jsx("span",{ref:k.referenceLinksGroupRef,className:`btn ${n==="list"||n==="moments"?"thino-hidden":""} reference-links-group-btn`,onClick:b}),g.jsx("span",{ref:k.typeRef,className:`btn ${t.sourceType==="DAILY"?"thino-hidden":""} source-type-btn`,onClick:()=>a(t)}),g.jsx("span",{ref:k.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:r}),g.jsx("span",{...F,ref:Z=>{k.moreRef.current=Z,Z&&A.setIcon(Z,"more-horizontal")},onClick:H,className:"btn more-action-btn"})]})]})},vQ=e=>{const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:o}=e,a=t.fileInfo?.frontmatter?.title||t.path.split("/").pop().split(".").shift();return g.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,g.jsx("span",{title:t.createdAt,className:"time-text",onClick:i=>r(i),children:t.createdAt}),g.jsx("div",{className:`btn memo-type-img ${o?.ShowTaskLabel?"":"thino-hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&g.jsx("input",{className:"task-list-item-checkbox",type:"checkbox",checked:t.thinoType!=="TASK-TODO","data-task":t.thinoType==="TASK-TODO"?"":t.thinoType==="TASK-DONE"?"x":t.thinoType?.slice(5)})}),o?.ShowSourcePath&&(t.sourceType==="FILE"||t.sourceType==="MULTI")&&g.jsx("span",{className:"time-text source-path","aria-label":a,onClick:()=>{Ye.setPathQuery(a)},children:a})]})};class yQ extends A.SuggestModal{constructor(t,n){super(t),this.thino=n}sanitisedFileName(t){const n=gG;return t.replace(n,"").trim().slice(0,255)}ensureUniqueFileNames(t){const n=[];return t.map(o=>{const a=this.sanitisedFileName(o[0]),i=n.filter(s=>s==a);return n.push(a),i.length>=1?`${a}${i.length+1}`:a})}contentSplitByHeading(t,n){const r=t.split(`
`),o=new Array(n).join("#")+" ",a=new Array(n+1).join("#")+" ",i=[];let s=[];return r.forEach((l,u)=>{l.startsWith(a)?(s.length>0&&(i.push(s),s=[]),s.push(l)):s.length>0&&!l.startsWith(o)?s.push(l):s.length>0&&(i.push(s),s=[]),u===r.length-1&&s.length>0&&i.push(s)}),i}onChooseSuggestion(t,n){this.selectSuggestion(t,n)}renderSuggestion(t,n){n.setText(t.title)}getSuggestions(){return[{id:"splitByHeading1",title:I("Split by Heading 1")},{id:"splitByHeading2",title:I("Split by Heading 2")},{id:"splitByHeading3",title:I("Split by Heading 3")}]}async selectSuggestion(t,n){let r=[];if(t.id==="splitByHeading1"?r=this.contentSplitByHeading(this.thino.content,1):t.id==="splitByHeading2"?r=this.contentSplitByHeading(this.thino.content,2):t.id==="splitByHeading3"&&(r=this.contentSplitByHeading(this.thino.content,3)),r.length===0){new A.Notice("No headings found"),this.close();return}const o=this.ensureUniqueFileNames(r);for(const s of r){const l=r.indexOf(s),u=await le.createThino({content:s.join(`
`),name:o[l],type:"MULTI",isList:!0});le.pushMemo(u)}let a=this.thino.content;r.forEach((s,l)=>{a=a.replace(s.join(`
`),`[[${o[l]}]]`)});const i=await le.updateMemo(this.thino.id,a);i&&le.editMemo(i),this.close()}}const bQ=async(e,t,n)=>{const r=n.getAttribute("href"),o=n.className;if(o.contains("tag"))wQ(n.innerText.slice(1));else if(o.contains("internal-link")){const a=n.getAttribute("data-href"),i=le.getMemoById(a??"");i?Qa(i):await e.workspace.openLinkText(a,a,!A.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},wQ=e=>{const t=Ye.getState().query.tag;Ye.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},SQ=(e,t)=>{const n=t?.getAttribute("src"),r=t?.parentElement.getAttribute("src"),o=[...e?.querySelectorAll("img")||[]],a=o.indexOf(t);Wd({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:o,currentIndex:a})},TQ=e=>{const t=e.dataset?.value,n=le.getMemoById(t??"");n?Qa(n):(new A.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},xQ=async(e,t,n,r)=>{const o=e?.AppendDateWhenTaskDone?" ✅ "+A.moment().format("YYYY-MM-DD"):"",a=r.parentElement.dataset?.task==="x"?"DONE":"TODO",i=[...n?.querySelectorAll("li.task-list-item")||[]];for(const s of i)if(s===r||s===r.closest("li.task-list-item")){const l=i.indexOf(s),u=t.content.split(/\n/),f=[];for(let y=0;y<u.length;y++)/^\s*(-|\*|\d+\.)\s\[.\]\s/.test(u[y])&&f.push(y);const h=f[l],p=u[h],m=p.match(/^\s*(-|\*|\d+\.)\s\[.\]\s/)[0];let w=p.replace(/^\s*(-|\*|\d+\.)\s\[.\]\s/,m.replace(/\[.\]/,a==="TODO"?"[x]":"[ ]"))+(a==="TODO"?o:"");e.AppendDateWhenTaskDone&&a!=="TODO"&&(w=w.replace(/ ✅ \d{4}-\d{2}-\d{2}/g,"")),u[h]=w;const b=u.join(`
`).trim();if(t&&t.content!==b){const y=await le.updateMemo(t.id,b);le.editMemo(y)}}},IQ=e=>{const{globalState:{editMemoId:t,memoListView:n},dailyNotesState:{app:r,view:o,settings:a,verifyState:i},locationState:{pathname:s}}=D.useContext(it),{memo:l,type:u="inline"}=e,f=D.useRef(null),h=D.useRef(null),[p,m]=D.useState(!1),w=D.useRef(null),[b,y]=D.useState(!1);D.useEffect(()=>{p&&setTimeout(()=>{Ge.setEditMemoId(l.id)},100)},[p]),D.useEffect(()=>{(s==="/review"||s==="/daily")&&t!==l.id&&p&&m(!1)},[t]),D.useEffect(()=>{w.current&&!b&&f.current&&(r.dragManager.handleDrag(w.current,ee=>{r.dragManager.updateSource([f.current],"is-dragging");const ie=le.getMemoById(l.id);if(ee.dataTransfer.setData("text/plain",l.content),ee.dataTransfer.setData("text/uri-list",l.content),ee.dataTransfer.setData("Text",l.content),a?.DraggingBehavior==="block-link")if(ie?.sourceType==="DAILY"){const fe=r.vault.getFileByPath(ie.path);let he=ie.hasId;return ie.hasId||(he=je.randomId(6),Zo(ie,{id:ie.id,hasId:he})),{type:"link",icon:"lucide-link",title:fe.basename,linktext:`${ie.path}#^${he}`,sourcePath:ie.path,file:fe,memo:ie,blockId:he,source:"thino-plugin"}}else return null;else if(a?.DraggingBehavior==="text")return null}),y(!0))},[w.current,f.current,a?.DraggingBehavior]);const S=ee=>{if(ee.ctrlKey||ee.metaKey){const ie=A.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss");Ye.setFromAndToQuery(ie.startOf("day").valueOf(),ie.endOf("day").valueOf());return}Qa(l)},x=()=>{if(a?.UseButtonToShowEditor&&a?.DefaultEditorLocation==="Bottom"){const ee=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");ee&&ee.trigger("click")}Ge.setMarkMemoId(l.id)},E=async()=>{const ee=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),ie=A.Platform.isDesktop?await pn():ee.identifier||ee.uuid;if(!i||i?.appId!==ie){It();return}l.pinned?await le.unpinMemoById(l.id):await le.pinMemoById(l.id)},C=()=>{if(a?.UseButtonToShowEditor&&a?.DefaultEditorLocation==="Bottom"&&A.Platform.isMobile){const ee=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");ee&&ee.trigger("click")}(s==="/review"||s==="/daily")&&m(!0),s!=="/review"&&s!=="/daily"&&Ge.setEditMemoId(l.id)},M=async ee=>{ee.sourceType==="MULTI"&&ee.id.trim()===""&&await le.updateMemoProperty(ee)},k=async ee=>{await le.openThinoByID(ee.id)},O=async ee=>{try{const ie=await le.archiveMemo(ee);ie&&le.editMemo(ie)}catch(ie){console.error(ie),new A.Notice(ie.message)}},F=async()=>{try{if(a.DeleteThinoDirectly)await le.deleteMemoById(l.id);else{const ee=await le.hideMemoById(l.id);ee&&le.editMemo(ee)}}catch(ee){new A.Notice(ee.message)}Ge.getState().editMemoId===l.id&&Ge.setEditMemoId("")},R=()=>{if(h.current&&!h.current.confirmStatus){h.current&&h.current.toggleConfirm(!1);return}},B=()=>{Yc(l)},Y=async()=>{const ee=await le.updateMemo(l.id,l.content,l.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");ee&&le.editMemo(ee)},H=async()=>{navigator.clipboard.writeText(l.content).then(()=>{new A.Notice(I("COPY SUCCEED"))}).catch(()=>{new A.Notice(I("COPY FAILED"))})},Z=async()=>{new yQ(r,l).open()},W=ee=>{if(!ee||ee.target.tagName==="INPUT")return;switch(a?.doubleClickBehavior||"edit-thino"){case"open-thino":Qa(l);break;case"edit-thino":C();break;case"go-to-source":k(l);break;case"do-nothing":break;default:C();break}},$=async(ee,ie)=>{ee.preventDefault(),ee.stopPropagation();const fe=ee.target;if(ee.ctrlKey||ee.metaKey){await k(ie);return}if(fe.tagName==="A"){await bQ(r,o,fe);return}if(fe.tagName==="IMG"){SQ(f.current,fe);return}if(fe.tagName==="A"&&fe.getAttribute("href")){const he=fe.getAttribute("href");window.open(he,"_blank");return}if(fe.className==="memo-link-text"){TQ(fe);return}if(fe.tagName==="INPUT"&&fe.hasClass("task-list-item-checkbox")){await xQ(a,ie,f.current,fe);return}},V=async ee=>{const ie=await nF(l,ee);navigator.clipboard.writeText(ie),new A.Notice(I("COPY SUCCEED"))},ne=ee=>{const ie=new A.Menu;ie.dom.toggleClass("memo-context-menu",!0);const fe=window.getSelection();fe?.toString().length>0&&ie.addItem(he=>{he.setIcon("copy").setTitle(I("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(fe.toString()).then(()=>{new A.Notice(I("COPY SUCCEED"))}).catch(()=>{new A.Notice(I("COPY FAILED"))})})}).addSeparator(),l.sourceType==="DAILY"&&(ie.addItem(he=>{he.setIcon("link").setTitle(I("Copy embed link")).onClick(()=>{V(!0)})}),ie.addItem(he=>{he.setIcon("link").setTitle(I("Copy link")).onClick(()=>{V(!1)})}),ie.addSeparator()),a?.enableReferenceLinksGroup&&n!=="list"&&ie.addItem(he=>{he.setIcon("link").setTitle(I("Reference links group")).onClick(()=>Q(ee))}),ie.addItem(he=>{he.setIcon("copy").setTitle(I("Copy thino").toLocaleUpperCase()).onClick(async()=>{await H(),ie.close()})}).addItem(he=>{he.setIcon("book-open").setTitle(I("READ")).onClick(()=>S(ee))}).addItem(he=>{he.setIcon(l.pinned?"pin-off":"pin").setTitle(l.pinned?I("UNPIN"):I("PIN")).onClick(E)}).addItem(he=>{he.setIcon("bookmark").setTitle(I("MARK")).onClick(x)}).addItem(he=>{he.setIcon("share-2").setTitle(I("SHARE")).onClick(B)}).addItem(he=>{he.setIcon("pencil").setTitle(I("EDIT")).onClick(C)}).addItem(he=>{he.setIcon("home").setTitle(I("SOURCE")).onClick(()=>k(l))}).addSeparator().addItem(he=>{he.setIcon("archive").setWarning(!0).setTitle(I("ARCHIVE").toLocaleUpperCase()).onClick(()=>O(l))}).addItem(he=>{he.setIcon("trash").setWarning(!0).setTitle(I("DELETE")).onClick(async()=>{await F()})}),ie.showAtMouseEvent(ee.nativeEvent)},Q=ee=>{ee.stopPropagation(),ee.preventDefault();const ie=new A.Menu;(async()=>{try{const he=[],we=[],Ne=[...l.content.matchAll(yu)];for(const Ie of Ne)if(Ie&&Ie.length===3){const ce=Ie[2],Pe=le.getMemoById(ce);Pe&&he.push({...Pe,createdAtStr:je.getDateTimeString(Pe.createdAt),dateStr:je.getDateString(Pe.createdAt)})}const Ae=Qw(l.content);for(const Ie of Ae){const[ce,Pe]=Ie.split("#^"),Oe=Pe;if(ce&&Oe){const Ve=await le.getLinkedMemoByBlockId(Oe,ce);Ve&&(he.some(tt=>tt.id===Ve.id)||he.push({...Ve,createdAtStr:je.getDateTimeString(Ve.createdAt),dateStr:je.getDateString(Ve.createdAt)}))}}const Te=await le.getLinkedMemos(l.id);let Fe=[];l.hasId&&l.path&&(Fe=await le.getLinkedMemosByLinkId(l.hasId,l.path));const We=[...Te,...Fe];Array.from(new Map(We.map(Ie=>[Ie.id,Ie])).values()).sort((Ie,ce)=>je.getTimeStampByDate(ce.createdAt)-je.getTimeStampByDate(Ie.createdAt)).forEach(Ie=>{we.push({...Ie,createdAtStr:je.getDateTimeString(Ie.createdAt),dateStr:je.getDateString(Ie.createdAt)})}),ie.addSections(["Outgoing","Incoming"]),he.length>0&&he.forEach(Ie=>{ie.addItem(ce=>{const Pe=Ie.content.length>10?Ie.content.substring(0,10)+"...":Ie.content;ce.setTitle(Pe).setIcon("arrow-right").onClick(()=>{Qa(Ie)})})}),we.length>0&&we.forEach(Ie=>{ie.addItem(ce=>{const Pe=Ie.content.length>10?Ie.content.substring(0,10)+"...":Ie.content;ce.setTitle(Pe).setSection("Incoming").setIcon("arrow-left").onClick(()=>{Qa(Ie)})})}),he.length===0&&we.length===0&&ie.addItem(Ie=>{Ie.setDisabled(!0).setTitle(I("No reference links found"))}),ie.showAtMouseEvent(ee.nativeEvent)}catch(he){console.error("Error fetching linked memos:",he),new A.Notice(I("Error fetching reference links"))}})()},te=D.useMemo(()=>({memo:l,memoListView:n,handlePinMemoClick:E,handleFixMemoClick:M,handleSourceMemoClick:k,handleArchiveMemo:O,handleDeleteMemoClick:F,handleGenMemoImageBtnClick:B,handleMarkMemoClick:x,handleEditMemoClick:C,handleCopyMemoClick:H,handleShowMemoStoryDialog:S,handleSplitMemoClick:Z,handleCopyEmbedLink:V,handleReferenceLinksGroupClick:Q}),[l]),G=D.useMemo(()=>({memo:l,handleMemoTypeToggle:Y,handleShowMemoStoryDialog:S,settings:a}),[l,a]),X=D.useMemo(()=>g.jsxs("div",{ref:f,className:`memo-wrapper ${l.pinned?"pinned":""}`,"data-source-type":l.sourceType,"data-thino-type":l.thinoType,"data-thino-id":l.id,onMouseLeave:R,onMouseOver:ee=>{ee.shiftKey&&(ee.stopPropagation(),r.workspace.trigger("hover-link",{event:ee,source:"thino",hoverParent:o.containerEl,targetEl:f.current,linktext:l.path,sourcePath:l.path,state:{scroll:l.sourceType==="DAILY"?parseInt(l.id.slice(14)):0}}))},onContextMenu:ne,children:[p&&g.jsx(Kc,{editorType:"inline"}),!p&&g.jsxs(g.Fragment,{children:[u==="inline"&&g.jsxs("div",{ref:w,className:"memo-top-wrapper",draggable:!0,children:[g.jsx(vQ,{...G}),g.jsx(gQ,{...te})]}),g.jsx(h6,{memo:l,handleMemoContentClick:$,handleMemoDoubleClick:W})]})]}),[l,p]);return g.jsx(g.Fragment,{children:X})},no=D.memo(IQ,(e,t)=>ru(e.memo,t.memo));class De extends A.Setting{settingTab;name="";desc="";constructor(t,n){super(t),this.settingTab=n}setName(t){return super.setName(t),this.name=t,this}setDesc(t){return super.setDesc(t),this.desc=t,this}setTab(t){const n=typeof this.name=="string"?this.name:this.name.textContent||"",r=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(t,this.settingEl,n,r),this}}class kQ extends A.Modal{plugin;settingTab;target=5;cb;constructor(t,n,r,o,a){super(t),this.app=t,this.settingTab=n,this.plugin=r,this.target=o,this.cb=a}onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("memo-save-location-modal"),t.createEl("h3",{text:I("Thino Daily Target")});const n=t.createDiv("modal-setting");new De(n,this.settingTab).setName(I("Target Thino Count")).addSlider(i=>{i.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async s=>{this.target=s})});const r=t.createDiv("button-group"),o=r.createEl("button",{text:I("Cancel")}),a=r.createEl("button",{text:I("Save")});a.onclick=async()=>{this.plugin.settings.MemoDailyTarget=this.target,this.settingTab.applySettingsUpdate(),this.cb(this.target),this.close()},o.onclick=async()=>{this.close()}}onClose(){const{contentEl:t}=this;t.empty()}}const EQ=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:o,settings:a},globalState:{manifest:i}}=D.useContext(it),[s,l]=D.useState(),[u,f]=D.useState(5),[h,p]=D.useState(0),[m,w]=D.useState(0),[b,y]=D.useState(a.HeatmapColorScheme||"default"),S=D.useRef(null),x=D.useRef(null);D.useEffect(()=>{a.HeatmapColorScheme&&y(a.HeatmapColorScheme)},[a.HeatmapColorScheme]),D.useEffect(()=>{let C,M=5;i&&o&&(C=o?.plugins.getPlugin(i.id),M=C?.settings.MemoDailyTarget,l(C)),f(M)},[i,o]),D.useEffect(()=>{const C=e.find(O=>O.timestamp===t),M=C?C.count:0;w(M);const k=Math.min(100,M/u*100);p(k)},[e,u]),D.useEffect(()=>{A.requireApiVersion("1.4.4")&&(A.setTooltip(x.current,h.toFixed(2)+"%"),A.setTooltip(S.current,I("Set daily target")+` (${m}/${u})`))},[h,m]),D.useEffect(()=>{S.current&&(S.current.hasChildNodes()||A.setIcon(S.current,"crosshair"),A.requireApiVersion("1.4.4")&&A.setTooltip(x.current,h+"%"))},[S,u]);const E=D.useCallback(()=>{if(!s)return;new kQ(o,s?.settingTab,s,u,M=>{f(M)}).open()},[s,u]);return g.jsx(g.Fragment,{children:g.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${b}`,children:[g.jsx("div",{ref:x,className:"daily-progress-bar",children:g.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${h}%`}})}),g.jsx("div",{ref:S,className:"daily-progress-target",onClick:E}),g.jsx("div",{ref:C=>{C&&A.setIcon(C,n==="basic"?"layout-grid":"calendar"),C&&A.setTooltip&&A.setTooltip(C,I("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},CQ=(e,t)=>{const n=[],r=Math.floor((e-t)/Do);for(let o=0;o<=r;o++)n.push({timestamp:t+Do*o,count:0,list:0});return n},MQ=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:o,handleDateItemClick:a,handleMonthChange:i,dailyStat:s}=e,l=A.moment().startOf("day").valueOf(),[u,f]=D.useState(cd(r)),[h,p]=D.useState(null),[m,w]=D.useState(e.dailyStat);D.useEffect(()=>{f(cd(r));const C=CQ(AQ(r),cd(r)),M=e.thinos.filter(k=>!k.deletedAt&&k.rowStatus!=="ARCHIVED");for(const k of M){const F=A.moment(k.createdAt,"YYYY/MM/DD HH:mm:ss").startOf("day").diff(A.moment(u).startOf("day"),"days");F>=0&&F<C.length&&(C[F].count+=1,k.thinoType==="JOURNAL"&&(C[F].list+=1))}w(C)},[r,e.thinos]);const b=new Date(u),y=b.getDay(),S=[];for(let C=0;C<y;C++)S.push({date:0,datestamp:b.getTime()-Do*(7-C)});const x=DQ(u);for(let C=1;C<=x;C++)S.push({date:C,datestamp:b.getTime()+Do*(C-1)});const E=C=>{const M=b.getFullYear(),k=b.getMonth()+1;let O=0;k===1&&C===-1?O=new Date(`${M-1}/12/1`).getTime():k===12&&C===1?O=new Date(`${M+1}/1/1`).getTime():O=new Date(`${M}/${k+C}/1`).getTime(),f(cd(O)),i&&i(O)};return g.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[g.jsxs("div",{className:"date-picker-header",children:[g.jsx("span",{ref:C=>{C&&A.setIcon(C,"chevron-left")},className:"btn btn-text",onClick:()=>E(-1)}),g.jsxs("span",{className:"normal-text",children:[g.jsx(FF,{year:b.getFullYear().toString(),handleYearChange:C=>{f(cd(new Date(`${C}/${b.getMonth()+1}/1`).getTime()))}}),g.jsx(HF,{month:b.getMonth().toString(),handleMonthChange:C=>{f(cd(new Date(`${b.getFullYear()}/${parseInt(C)}/1`).getTime()))}})]}),g.jsx("span",{ref:C=>{C&&A.setIcon(C,"chevron-right")},className:"btn btn-text",onClick:()=>E(1)})]}),g.jsxs("div",{className:"date-picker-day-container",children:[g.jsx("div",{className:"date-picker-day-header",children:I("weekDaysShort").map(C=>g.jsx("span",{className:"day-item",children:C},C))}),g.jsx("div",{className:"date-picker-day-content",children:S.map(C=>{if(C.date===0)return g.jsx("span",{className:"day-item null",children:""},C.datestamp);const M=m.find(F=>F.timestamp===C.datestamp)||{count:0,timestamp:C.datestamp,list:0},k=M.count-M.list,O=M.list;return g.jsxs("span",{className:`day-item ${C.datestamp===l?"current":""} ${C.datestamp===h?"selected":""} ${g1(M.count)}`,onClick:F=>{o(r,F.nativeEvent),p(C.datestamp===h?null:C.datestamp),a&&a(F,M)},onMouseOver:F=>{if(!M||!M.count)return;const R=new A.HoverPopover(n,F.currentTarget,100);p6(R,{d:C,list:O,task:k})},children:[g.jsx("span",{className:"day-item-text",children:C.date}),g.jsx(g.Fragment,{children:M&&M.count!==0&&g.jsxs("span",{className:"day-item-dots",children:[k>0&&g.jsx("div",{className:`day-item-dot thino-task-dot ${g1(k)}`}),O>0&&g.jsx("div",{className:`day-item-dot thino-list-dot ${g1(O)}`})]})})]},C.datestamp)})})]})]})};function p6(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const o=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});o.createDiv({cls:"thino-date-item",text:`${A.moment(t.datestamp).format("YYYY-MM-DD")}`});const a=o.createDiv({cls:"thino-task-item"});a.createSpan({cls:"thino-task-item-title-text",text:`${I("Task")}: `}),a.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const i=o.createDiv({cls:"thino-list-item"});i.createSpan({cls:"thino-list-item-title-text",text:`${I("List")}: `}),i.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function DQ(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/Do}function cd(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function AQ(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return(n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-Do}function g1(e){return e<=0?"":e<=1?"stat-day-L1-bg":e<=2?"stat-day-L2-bg":e<=4?"stat-day-L3-bg":"stat-day-L4-bg"}const SO={width:12,height:7},TO=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:t+Do*r,count:0,list:0});return n},qp=({initThinos:e,basicType:t})=>{const n=parseInt(A.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(A.moment().startOf("day").format("x")),o=new Array(6-new Date(n).getDay()).fill(0),a=SO.width*SO.height,i=parseInt(A.moment().startOf("day").subtract(a,"days").format("x")),s=A.moment().startOf("day").subtract(a,"days"),{memoState:{memos:l},dailyNotesState:{view:u,app:f,settings:h,verifyState:p}}=D.useContext(it),[m,w]=Eo(t||OQ(f||window.app)||"heatmap"),[b,y]=Eo(A.moment().startOf("day").valueOf()),[S,x]=Eo(h.HeatmapColorScheme||"default"),[E,C]=Eo(TO(a,i)),[M,k]=Eo(null),[O,F,R]=Eo(""),B=D.useRef(null);D.useEffect(()=>{const Q=TO(a,i),te=(e||l).filter(G=>!G.deletedAt&&G.rowStatus!=="ARCHIVED");for(const G of te){const ee=A.moment(G.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(s,"days");ee>=0&&ee<Q.length&&(Q[ee].count+=1,G.thinoType==="JOURNAL"&&(Q[ee].list+=1))}C([...Q])},[l,e]),D.useEffect(()=>{h.HeatmapColorScheme&&x(h.HeatmapColorScheme)},[h.HeatmapColorScheme]);const Y=D.useCallback((Q,te)=>{if(!te||!te.count)return;const G=te.count-te.list,X=te.list,ee={date:te.timestamp,datestamp:te.timestamp},ie=new A.HoverPopover(u,Q.currentTarget,100);p6(ie,{d:ee,list:X,task:G})},[]),H=()=>{w(m==="heatmap"?"basic":"heatmap"),NQ(f,m==="heatmap"?"basic":"heatmap"),y(A.moment().startOf("day").valueOf())},Z=D.useCallback(async(Q,te)=>{if(te.count===0){V(te);return}const G=Ye.getState().query.duration,X=G?.from,ee=G?.to,ie=A.moment(X).diff(ee,"day")===0;if(X===te.timestamp&&ie){Ye.setFromAndToQuery(0,0),k(null),F(null);return}if(Q.shiftKey){W(te,X,ee);return}if(Q.ctrlKey||Q.metaKey){await $(te.timestamp);return}V(te)},[]),W=(Q,te,G,X)=>{const ee=Q.timestamp;if(te===0){Ye.setFromAndToQuery(ee,parseInt(A.moment().endOf("day").format("x"))),F("from");return}const ie=A.moment(ee).endOf("day").diff(G,"day");A.moment(te).isBefore(ee)?R.current==="to"?ie<0?Ye.setFromAndToQuery(ee,G):(Ye.setFromAndToQuery(parseInt(A.moment(G).startOf("day").format("x")),parseInt(A.moment(ee).endOf("day").format("x"))),F("from")):R.current==="from"&&Ye.setFromAndToQuery(te,parseInt(A.moment(ee).endOf("day").format("x"))):R.current==="to"?Ye.setFromAndToQuery(ee,G):R.current==="from"&&(Ye.setFromAndToQuery(ee,parseInt(A.moment(te).endOf("day").format("x"))),F("to"))},$=async Q=>{const{app:te,dailyNotes:G}=Ze.getState(),X=qw(A.moment(Q),G);if(X)if(!A.Platform.isMobile)await te.workspace.getLeaf(!0).openFile(X);else{let ee=te.workspace.activeLeaf;ee===null&&(ee=te.workspace.getLeaf(!0)),ee.openFile(X)}},V=Q=>{["/","/recycle"].includes(Ye.getState().pathname)||Ye.setPathname("/"),Ye.setFromAndToQuery(Q.timestamp,je.getTimeStampByDate(A.moment(Q.timestamp+Do).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),k(Q)},ne=D.useMemo(()=>g.jsx(MQ,{className:`heatmap-${S}`,view:u,datestamp:b,dailyStat:E,thinos:e||l,handleMonthChange:Q=>{y(Q)},handleDateStampChange:Q=>{},handleDateItemClick:(Q,te)=>Z(Q,te)}),[JSON.stringify(E),e,l,u,b,S]);return g.jsxs(g.Fragment,{children:[m==="basic"&&ne,m==="heatmap"&&g.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${S}`,ref:B,children:[g.jsxs("div",{className:"day-tip-text-container",children:[g.jsx("span",{className:"tip-text",children:I("weekDaysShort")[0]}),g.jsx("span",{className:"tip-text"}),g.jsx("span",{className:"tip-text",children:I("weekDaysShort")[2]}),g.jsx("span",{className:"tip-text"}),g.jsx("span",{className:"tip-text",children:I("weekDaysShort")[4]}),g.jsx("span",{className:"tip-text"}),g.jsx("span",{className:"tip-text",children:I("weekDaysShort")[6]})]}),g.jsxs("div",{className:"usage-heat-map",children:[E.slice(E.length-84+o.length,E.length).map((Q,te)=>{const G=Q.count,X=G<=0?"":G<=1?"stat-day-L1-bg":G<=2?"stat-day-L2-bg":G<=4?"stat-day-L3-bg":"stat-day-L4-bg";return g.jsx("span",{"data-timestamp":Q.timestamp,"data-count":Q.count,"data-list-count":Q.list,"data-task-count":Q.count-Q.list,className:`stat-container ${X} ${M===Q?"current":""} ${r===Q.timestamp?"today":""}`,onMouseOver:ee=>Y(ee,Q),onClick:ee=>Z(ee,Q)},te)}),o.map((Q,te)=>g.jsx("span",{className:"stat-container null"},te))]})]}),!t&&g.jsx(EQ,{allStat:E,todayTimeStamp:r,calendarType:m,handleCalendarTypeChange:H})]})};function NQ(e,t){try{e?.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function OQ(e){try{return e?.loadLocalStorage("calendarType")||"heatmap"}catch(t){return console.error(t),"heatmap"}}const m6=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=D.useContext(it),[r,o]=D.useState([]),a=_.useRef(null);return D.useEffect(()=>{if(e==="daily"){if(t){const s=n.filter(l=>A.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(A.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));o(s);return}const i=n.filter(s=>A.moment(s.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(A.moment(),"day"));o(i)}else if(e==="latest"){const i=n.filter(u=>!u.deletedAt&&u.rowStatus!=="ARCHIVED"),s=i.filter(u=>u.pinned),l=i.filter(u=>!u.pinned).slice(0,5);o([...s,...l])}},[n]),D.useEffect(()=>{a.current&&(a.current.scrollTop=0)},[n]),r.length>0?g.jsx("div",{ref:a,className:"thino-list-container",children:r.map(i=>g.jsx(no,{memo:i}))}):g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:I("Here is No Memos.")})})},PQ=(e,t)=>{Sa.createRoot(e).render(g.jsx(_.StrictMode,{children:g.jsx(Ea,{store:Se,context:it,children:g.jsx(jQ,{plugin:t})})}))},jQ=({plugin:e})=>g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"thino-error-code-block",children:I("Please open thino first")}),g.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:I("Open thino in center window")})]}),LQ=(e,t)=>{Sa.createRoot(e).render(g.jsx(_.StrictMode,{children:g.jsx(Ea,{store:Se,context:it,children:g.jsx(RQ,{yaml:t})})}))},RQ=({yaml:e})=>{const t=Object.keys(e).filter(o=>e[o]),n=e.daily?e.daily:"",r=o=>{switch(o){case"editor":return xO;case"heatmap":return HQ;case"calendar":return BQ;case"daily":return YQ;case"list":return zQ;case"status":return _Q;default:return xO}};return g.jsx(g.Fragment,{children:t.map(o=>g.jsx("div",{"data-embed-type":o,className:qt("thino-embed-container",o==="editor"?"thino-editor-modal":""),children:o==="daily"?r(o)(n):r(o)()}))})};function xO(){return g.jsx(Kc,{editorType:"inline",modal:!0})}function FQ(e,t,n){try{const r=Sa.createRoot(e);return r.render(g.jsx(_.StrictMode,{children:g.jsx(Ea,{store:Se,context:it,children:g.jsx(Kc,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function HQ(){return g.jsx(qp,{basicType:"heatmap"})}function BQ(){return g.jsx(qp,{basicType:"basic"})}function _Q(){return g.jsx(vC,{statusType:"banner"})}function YQ(e){return g.jsx(m6,{type:"daily",timestamp:e})}function zQ(){return g.jsx(m6,{type:"latest"})}class DI extends A.Modal{root;constructor(t){super(t)}getViewType(){return"thino_view"}onOpen(){const{contentEl:t,modalEl:n}=this;try{this.root=FQ(t,this.close.bind(this),this),n.toggleClass("thino-editor-modal",!0),setTimeout(()=>{t.querySelector("textarea")?.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(r){console.error(r)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function UQ(e,t){if(e==null)return{};var n=VQ(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Tb(){return Tb=Object.assign||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},Tb.apply(this,arguments)}function IO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IO(Object(n),!0).forEach(function(r){WQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const GQ={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},v1=2;class $p extends _.Component{constructor(t){super(t),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this);let n;this.props.breakpointCols&&this.props.breakpointCols.default?n=this.props.breakpointCols.default:n=parseInt(this.props.breakpointCols)||v1,this.state={columnCount:n}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){if(!window||!window.requestAnimationFrame){this.reCalculateColumnCount();return}window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let n=this.props.breakpointCols;typeof n!="object"&&(n={default:parseInt(n)||v1});let r=1/0,o=n.default||v1;for(let a in n){const i=parseInt(a);i>0&&t<=i&&i<r&&(r=i,o=n[a])}o=Math.max(1,parseInt(o)||1),this.state.columnCount!==o&&this.setState({columnCount:o})}itemsInColumns(){const t=this.state.columnCount,n=new Array(t),r=_.Children.toArray(this.props.children);for(let o=0;o<r.length;o++){const a=o%t;n[a]||(n[a]=[]),n[a].push(r[o])}return n}renderColumns(){const{column:t,columnAttrs:n={},columnClassName:r}=this.props,o=this.itemsInColumns(),a=`${100/o.length}%`;let i=r;i&&typeof i!="string"&&(this.logDeprecated('The property "columnClassName" requires a string'),typeof i>"u"&&(i="my-masonry-grid_column"));const s=Gh(Gh(Gh({},t),n),{},{style:Gh(Gh({},n.style),{},{width:a}),className:i});return o.map((l,u)=>_.createElement("div",Tb({},s,{key:u}),l))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:o,columnAttrs:a,column:i,className:s}=t,l=UQ(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let u=s;return typeof s!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof s>"u"&&(u="my-masonry-grid")),_.createElement("div",Tb({},l,{className:u}),this.renderColumns())}}$p.defaultProps=GQ;const AI=e=>{const{locationState:{query:t}}=D.useContext(it),n=Se.getState().dailyNotesState.settings,{thinos:r,dayMark:o,dayMarkRange:a="day",thinoWrapper:i}=e,[s,l]=_.useState(!(n?.hidePinnedGroup&&o==="PINNED")),u=_.useRef(null);D.useEffect(()=>{u&&A.setTooltip&&A.setTooltip(u.current,I("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[u]);const f=h=>{if(A.Keymap.isModifier(h.nativeEvent,"Mod")){const p={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},m=A.moment(o,p[a]);Ye.setFromAndToQuery(m.startOf(a).valueOf(),m.endOf(a).valueOf());return}l(!s)};return g.jsx(g.Fragment,{children:e.type==="list"?g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:u,className:`day-mark ${s?"":"folded"} PINNED`,onClick:f,children:g.jsxs("span",{className:"day-mark-text",children:[s?"▼ ":"▶ ",o==="PINNED"?o+" 📌":o]})},o),s&&r.map((h,p)=>i?g.jsx("div",{children:i({thino:h})},`${h.id}-${A.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${p}`):g.jsx(no,{memo:h},`${h.id}-${A.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${p}`))]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:u,className:`day-mark ${s?"":"folded"}`,onClick:f,children:g.jsxs("span",{className:"day-mark-text",children:[s?"▼ ":"▶ ",o==="PINNED"?o+" 📌":o]})},o),g.jsx($p,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:s&&r.map((h,p)=>i?g.jsx("div",{children:i({thino:h})},`${h.id}-${A.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${p}`):g.jsx(no,{memo:h},`${h.id}-${A.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${p}`))})]})})};function Us(e){"@babel/helpers - typeof";return Us=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},Us(e)}function ZQ(e,t){if(Us(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Us(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function g6(e){var t=ZQ(e,"string");return Us(t)=="symbol"?t:String(t)}function _c(e,t,n){return t=g6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kO(Object(n),!0).forEach(function(r){_c(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function c0(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Qi(e,t){if(e==null)return{};var n=c0(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EO(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,g6(r.key),r)}}function fr(e,t,n){return t&&EO(e.prototype,t),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xb(e){return xb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xb(e)}function v6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(v6=function(){return!!e})()}function y6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qQ(e,t){if(t&&(Us(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y6(e)}function ro(e,t,n){return t=xb(t),qQ(e,v6()?Reflect.construct(t,n||[],xb(e).constructor):t.apply(e,n))}function Ib(e,t){return Ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ib(e,t)}function oo(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&&Ib(e,t)}function b6(e){if(Array.isArray(e))return e}function $Q(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function NI(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 MC(e,t){if(e){if(typeof e=="string")return NI(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 NI(e,t)}}function w6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Es(e,t){return b6(e)||$Q(e,t)||MC(e,t)||w6()}function jn(){return jn=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},jn.apply(this,arguments)}var KQ=function(e,t,n,r,o,a,i,s){if(!e){var l;if(t===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],f=0;l=new Error(t.replace(/%s/g,function(){return u[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},JQ=KQ;const Kp=Xe(JQ);var XQ=function(){};function QQ(e,t){var n={};return Object.keys(e).forEach(function(r){n[Gy(r)]=XQ}),n}function CO(e,t){return e[t]!==void 0}function Gy(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function eee(e){return!!e&&(typeof e!="function"||e.prototype&&e.prototype.isReactComponent)}function tee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ib(e,t)}function S6(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function T6(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function x6(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}S6.__suppressDeprecationWarning=!0;T6.__suppressDeprecationWarning=!0;x6.__suppressDeprecationWarning=!0;function nee(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var a=e.displayName||e.name,i=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
`+a+" uses "+i+" but also contains the following legacy lifecycles:"+(n!==null?`
`+n:"")+(r!==null?`
`+r:"")+(o!==null?`
`+o:"")+`
The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=S6,t.componentWillReceiveProps=T6),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=x6;var s=t.componentDidUpdate;t.componentDidUpdate=function(u,f,h){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:h;s.call(this,u,f,p)}}return e}var ree="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function I6(e,t,n){n===void 0&&(n=[]);var r=e.displayName||e.name||"Component",o=eee(e),a=Object.keys(t),i=a.map(Gy);o||!n.length||Kp(!1);var s=function(u){tee(f,u);function f(){for(var p,m=arguments.length,w=new Array(m),b=0;b<m;b++)w[b]=arguments[b];p=u.call.apply(u,[this].concat(w))||this,p.handlers=Object.create(null),a.forEach(function(S){var x=t[S],E=function(M){if(p.props[x]){var k;p._notifying=!0;for(var O=arguments.length,F=new Array(O>1?O-1:0),R=1;R<O;R++)F[R-1]=arguments[R];(k=p.props)[x].apply(k,[M].concat(F)),p._notifying=!1}p.unmounted||p.setState(function(B){var Y,H=B.values;return{values:jn(Object.create(null),H,(Y={},Y[S]=M,Y))}})};p.handlers[x]=E}),n.length&&(p.attachRef=function(S){p.inner=S});var y=Object.create(null);return a.forEach(function(S){y[S]=p.props[Gy(S)]}),p.state={values:y,prevProps:{}},p}var h=f.prototype;return h.shouldComponentUpdate=function(){return!this._notifying},f.getDerivedStateFromProps=function(m,w){var b=w.values,y=w.prevProps,S={values:jn(Object.create(null),b),prevProps:{}};return a.forEach(function(x){S.prevProps[x]=m[x],!CO(m,x)&&CO(y,x)&&(S.values[x]=m[Gy(x)])}),S},h.componentWillUnmount=function(){this.unmounted=!0},h.render=function(){var m=this,w=this.props,b=w.innerRef,y=c0(w,["innerRef"]);i.forEach(function(x){delete y[x]});var S={};return a.forEach(function(x){var E=m.props[x];S[x]=E!==void 0?E:m.state.values[x]}),_.createElement(e,jn({},y,S,this.handlers,{ref:b||this.attachRef}))},f}(_.Component);nee(s),s.displayName="Uncontrolled("+r+")",s.propTypes=jn({innerRef:function(){}},QQ(t)),n.forEach(function(u){s.prototype[u]=function(){var h;return(h=this.inner)[u].apply(h,arguments)}});var l=s;return _.forwardRef&&(l=_.forwardRef(function(u,f){return _.createElement(s,jn({},u,{innerRef:f,__source:{fileName:ree,lineNumber:128},__self:this}))}),l.propTypes=s.propTypes),l.ControlledComponent=e,l.deferControlTo=function(u,f,h){return f===void 0&&(f={}),I6(u,jn({},t,f),h)},l}function k6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=k6(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function er(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=k6(e))&&(r&&(r+=" "),r+=t);return r}var E6={exports:{}},y1,MO;function oee(){if(MO)return y1;MO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return y1=e,y1}var b1,DO;function aee(){if(DO)return b1;DO=1;var e=oee();function t(){}function n(){}return n.resetWarningCache=t,b1=function(){function r(i,s,l,u,f,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},b1}E6.exports=aee()();var iee=E6.exports;const de=Xe(iee);var kb="milliseconds",Jp="seconds",Xp="minutes",Qp="hours",au="day",Gd="week",em="month",iu="year",su="decade",lu="century",C6={milliseconds:1,seconds:1e3,minutes:60*1e3,hours:60*60*1e3,day:24*60*60*1e3,week:7*24*60*60*1e3},see={month:1,year:12,decade:10*12,century:100*12};function lee(e){return[31,cee(e),31,30,31,30,31,31,30,31,30,31]}function cee(e){return e%4===0&&e%100!==0||e%400===0?29:28}function oi(e,t,n){switch(e=new Date(e),n){case kb:case Jp:case Xp:case Qp:case au:case Gd:return uee(e,t*C6[n]);case em:case iu:case su:case lu:return dee(e,t*see[n])}throw new TypeError('Invalid units: "'+n+'"')}function uee(e,t){var n=new Date(+e+t);return fee(e,n)}function dee(e,t){var n=e.getFullYear(),r=e.getMonth(),o=e.getDate(),a=n*12+r+t,i=Math.trunc(a/12),s=a%12,l=Math.min(o,lee(i)[s]),u=new Date(e);return u.setFullYear(i),u.setDate(1),u.setMonth(s),u.setDate(l),u}function fee(e,t){var n=e.getTimezoneOffset(),r=t.getTimezoneOffset(),o=r-n;return new Date(+t+o*C6.minutes)}function tm(e,t,n){return oi(e,-t,n)}function Er(e,t,n){switch(e=new Date(e),t){case lu:case su:case iu:e=Cb(e,0);case em:e=O6(e,1);case Gd:case au:e=om(e,0);case Qp:e=Zd(e,0);case Xp:e=rm(e,0);case Jp:e=nm(e,0)}return t===su&&(e=tm(e,cu(e)%10,"year")),t===lu&&(e=tm(e,cu(e)%100,"year")),t===Gd&&(e=P6(e,0,n)),e}function Eb(e,t,n){switch(e=new Date(e),e=Er(e,t,n),t){case lu:case su:case iu:case em:case Gd:e=oi(e,1,t),e=tm(e,1,au),e.setHours(23,59,59,999);break;case au:e.setHours(23,59,59,999);break;case Qp:case Xp:case Jp:e=oi(e,1,t),e=tm(e,1,kb)}return e}var hg=Pf(function(e,t){return e===t}),DC=Pf(function(e,t){return e!==t}),u0=Pf(function(e,t){return e>t}),pg=Pf(function(e,t){return e>=t}),AC=Pf(function(e,t){return e<t}),Of=Pf(function(e,t){return e<=t});function M6(){return new Date(Math.min.apply(Math,arguments))}function D6(){return new Date(Math.max.apply(Math,arguments))}function A6(e,t,n,r){return r=r||"day",(!t||pg(e,t,r))&&(!n||Of(e,n,r))}var nm=Kl("Milliseconds"),rm=Kl("Seconds"),Zd=Kl("Minutes"),om=Kl("Hours"),N6=Kl("Day"),O6=Kl("Date"),Cb=Kl("Month"),cu=Kl("FullYear");function hee(e,t){return t===void 0?cu(Er(e,su)):oi(e,t+10,iu)}function pee(e,t){return t===void 0?cu(Er(e,lu)):oi(e,t+100,iu)}function P6(e,t,n){var r=(N6(e)+7-(n||0))%7;return t===void 0?r:oi(e,t-r,au)}function mee(e,t,n,r){var o,a,i;switch(n){case kb:case Jp:case Xp:case Qp:case au:case Gd:o=t.getTime()-e.getTime();break;case em:case iu:case su:case lu:o=(cu(t)-cu(e))*12+Cb(t)-Cb(e);break;default:throw new TypeError('Invalid units: "'+n+'"')}switch(n){case kb:a=1;break;case Jp:a=1e3;break;case Xp:a=1e3*60;break;case Qp:a=1e3*60*60;break;case au:a=1e3*60*60*24;break;case Gd:a=1e3*60*60*24*7;break;case em:a=1;break;case iu:a=12;break;case su:a=120;break;case lu:a=1200;break;default:throw new TypeError('Invalid units: "'+n+'"')}return i=o/a,r?i:Math.round(i)}function Kl(e){var t=function(n){switch(n){case"Milliseconds":return 36e5;case"Seconds":return 3600;case"Minutes":return 60;case"Hours":return 1;default:return null}}(e);return function(n,r){if(r===void 0)return n["get"+e]();var o=new Date(n);return o["set"+e](r),t&&o["get"+e]()!=r&&(e==="Hours"||r>=t&&o.getHours()-n.getHours()<Math.floor(r/t))&&o["set"+e](r+t),o}}function Pf(e){return function(t,n,r){return e(+Er(t,r),+Er(n,r))}}const AO=Object.freeze(Object.defineProperty({__proto__:null,add:oi,century:pee,date:O6,day:N6,decade:hee,diff:mee,endOf:Eb,eq:hg,gt:u0,gte:pg,hours:om,inRange:A6,lt:AC,lte:Of,max:D6,milliseconds:nm,min:M6,minutes:Zd,month:Cb,neq:DC,seconds:rm,startOf:Er,subtract:tm,weekday:P6,year:cu},Symbol.toStringTag,{value:"Module"}));function gee(e){if(Array.isArray(e))return NI(e)}function j6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zy(e){return gee(e)||j6(e)||MC(e)||vee()}function yee(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}var NC=yee;function bee(e,t){return e===t||e!==e&&t!==t}var mg=bee,wee=typeof ur=="object"&&ur&&ur.Object===Object&&ur,L6=wee,See=L6,Tee=typeof self=="object"&&self&&self.Object===Object&&self,xee=See||Tee||Function("return this")(),ii=xee,Iee=ii,kee=Iee.Symbol,jf=kee,NO=jf,R6=Object.prototype,Eee=R6.hasOwnProperty,Cee=R6.toString,Zh=NO?NO.toStringTag:void 0;function Mee(e){var t=Eee.call(e,Zh),n=e[Zh];try{e[Zh]=void 0;var r=!0}catch{}var o=Cee.call(e);return r&&(t?e[Zh]=n:delete e[Zh]),o}var Dee=Mee,Aee=Object.prototype,Nee=Aee.toString;function Oee(e){return Nee.call(e)}var Pee=Oee,OO=jf,jee=Dee,Lee=Pee,Ree="[object Null]",Fee="[object Undefined]",PO=OO?OO.toStringTag:void 0;function Hee(e){return e==null?e===void 0?Fee:Ree:PO&&PO in Object(e)?jee(e):Lee(e)}var Qs=Hee;function Bee(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ca=Bee;const Lf=Xe(Ca);var _ee=Qs,Yee=Ca,zee="[object AsyncFunction]",Uee="[object Function]",Vee="[object GeneratorFunction]",Wee="[object Proxy]";function Gee(e){if(!Yee(e))return!1;var t=_ee(e);return t==Uee||t==Vee||t==zee||t==Wee}var d0=Gee;const Mt=Xe(d0);var Zee=9007199254740991;function qee(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Zee}var OC=qee,$ee=d0,Kee=OC;function Jee(e){return e!=null&&Kee(e.length)&&!$ee(e)}var Rf=Jee,Xee=9007199254740991,Qee=/^(?:0|[1-9]\d*)$/;function ete(e,t){var n=typeof e;return t=t??Xee,!!t&&(n=="number"||n!="symbol"&&Qee.test(e))&&e>-1&&e%1==0&&e<t}var PC=ete,tte=mg,nte=Rf,rte=PC,ote=Ca;function ate(e,t,n){if(!ote(n))return!1;var r=typeof t;return(r=="number"?nte(n)&&rte(t,n.length):r=="string"&&t in n)?tte(n[t],e):!1}var Ff=ate,ite=/\s/;function ste(e){for(var t=e.length;t--&&ite.test(e.charAt(t)););return t}var lte=ste,cte=lte,ute=/^\s+/;function dte(e){return e&&e.slice(0,cte(e)+1).replace(ute,"")}var fte=dte;function hte(e){return e!=null&&typeof e=="object"}var si=hte,pte=Qs,mte=si,gte="[object Symbol]";function vte(e){return typeof e=="symbol"||mte(e)&&pte(e)==gte}var Hf=vte,yte=fte,jO=Ca,bte=Hf,LO=NaN,wte=/^[-+]0x[0-9a-f]+$/i,Ste=/^0b[01]+$/i,Tte=/^0o[0-7]+$/i,xte=parseInt;function Ite(e){if(typeof e=="number")return e;if(bte(e))return LO;if(jO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yte(e);var n=Ste.test(e);return n||Tte.test(e)?xte(e.slice(2),n?2:8):wte.test(e)?LO:+e}var F6=Ite,kte=F6,RO=1/0,Ete=17976931348623157e292;function Cte(e){if(!e)return e===0?e:0;if(e=kte(e),e===RO||e===-RO){var t=e<0?-1:1;return t*Ete}return e===e?e:0}var H6=Cte,Mte=H6;function Dte(e){var t=Mte(e),n=t%1;return t===t?n?t-n:t:0}var B6=Dte,Ate=NC,Nte=Ff,Ote=B6,Pte=Math.ceil,jte=Math.max;function Lte(e,t,n){(n?Nte(e,t,n):t===void 0)?t=1:t=jte(Ote(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var o=0,a=0,i=Array(Pte(r/t));o<r;)i[a++]=Ate(e,o,o+=t);return i}var Rte=Lte;const Fte=Xe(Rte);function gg(e){return e&&e.ownerDocument||document}function Hte(e){var t=gg(e);return t&&t.defaultView||window}function Bte(e,t){return Hte(e).getComputedStyle(e,t)}var _te=/([A-Z])/g;function Yte(e){return e.replace(_te,"-$1").toLowerCase()}var zte=/^ms-/;function ey(e){return Yte(e).replace(zte,"-ms-")}var Ute=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Vte(e){return!!(e&&Ute.test(e))}function Sd(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(ey(t))||Bte(e).getPropertyValue(ey(t));Object.keys(t).forEach(function(o){var a=t[o];!a&&a!==0?e.style.removeProperty(ey(o)):Vte(o)?r+=o+"("+a+") ":n+=ey(o)+": "+a+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}function am(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function Wte(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function jC(e){return"window"in e&&e.window===e?e:Wte(e)&&e.defaultView||!1}function _6(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function n(r,o){var a=jC(r);if(o===void 0)return a?a[e]:r[t];a?a.scrollTo(a[e],o):r[t]=o}return n}const Y6=_6("pageXOffset"),z6=_6("pageYOffset");function Jc(e){var t=gg(e),n={top:0,left:0,height:0,width:0},r=t&&t.documentElement;return!r||!am(r,e)||(e.getBoundingClientRect!==void 0&&(n=e.getBoundingClientRect()),n={top:n.top+z6(r)-(r.clientTop||0),left:n.left+Y6(r)-(r.clientLeft||0),width:n.width,height:n.height}),n}var Gte=function(t){return!!t&&"offsetParent"in t};function Zte(e){for(var t=gg(e),n=e&&e.offsetParent;Gte(n)&&n.nodeName!=="HTML"&&Sd(n,"position")==="static";)n=n.offsetParent;return n||t.documentElement}var qte=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function U6(e,t){var n={top:0,left:0},r;if(Sd(e,"position")==="fixed")r=e.getBoundingClientRect();else{var o=t||Zte(e);r=Jc(e),qte(o)!=="html"&&(n=Jc(o));var a=String(Sd(o,"borderTopWidth")||0);n.top+=parseInt(a,10)-z6(o)||0;var i=String(Sd(o,"borderLeftWidth")||0);n.left+=parseInt(i,10)-Y6(o)||0}var s=String(Sd(e,"marginTop")||0),l=String(Sd(e,"marginLeft")||0);return jn({},r,{top:r.top-n.top-(parseInt(s,10)||0),left:r.left-n.left-(parseInt(l,10)||0)})}const LC=!!(typeof window<"u"&&window.document&&window.document.createElement);var FO=new Date().getTime();function $te(e){var t=new Date().getTime(),n=Math.max(0,16-(t-FO)),r=setTimeout(e,n);return FO=t,r}var Kte=["","webkit","moz","o","ms"],OI="clearTimeout",PI=$te,HO=function(t,n){return t+(t?n[0].toUpperCase()+n.substr(1):n)+"AnimationFrame"};LC&&Kte.some(function(e){var t=HO(e,"request");return t in window&&(OI=HO(e,"cancel"),PI=function(r){return window[t](r)}),!!PI});var BO=function(t){typeof window[OI]=="function"&&window[OI](t)},V6=PI,w1;function Jte(e,t){if(!w1){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;w1=function(a,i){return r.call(a,i)}}return w1(e,t)}var Xte=Function.prototype.bind.call(Function.prototype.call,[].slice);function Qte(e,t){return Xte(e.querySelectorAll(t))}var jI=!1,LI=!1;try{var S1={get passive(){return jI=!0},get once(){return LI=jI=!0}};LC&&(window.addEventListener("test",S1,S1),window.removeEventListener("test",S1,!0))}catch{}function ene(e,t,n,r){if(r&&typeof r!="boolean"&&!LI){var o=r.once,a=r.capture,i=n;!LI&&o&&(i=n.__once||function s(l){this.removeEventListener(t,s,a),n.call(this,l)},n.__once=i),e.addEventListener(t,i,jI?r:a)}e.addEventListener(t,n,r)}function tne(e){const t=D.useRef(e);return D.useEffect(()=>{t.current=e},[e]),t}function _O(e){const t=tne(e);return D.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function YO(){return D.useState(null)}function nne(){const e=D.useRef(!0),t=D.useRef(()=>e.current);return D.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function rne(e){const t=nne();return[e[0],D.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var one=t6({defaultModifiers:[JF,QF,GF,ZF,XF,KF,e6,WF]}),zO=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},ane={name:"applyStyles",enabled:!1},ine={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var n=t.state;return function(){var r=n.elements,o=r.reference,a=r.popper;if("removeAttribute"in o){var i=(o.getAttribute("aria-describedby")||"").split(",").filter(function(s){return s.trim()!==a.id});i.length?o.setAttribute("aria-describedby",i.join(",")):o.removeAttribute("aria-describedby")}}},fn:function(t){var n,r=t.state,o=r.elements,a=o.popper,i=o.reference,s=(n=a.getAttribute("role"))==null?void 0:n.toLowerCase();if(a.id&&s==="tooltip"&&"setAttribute"in i){var l=i.getAttribute("aria-describedby");if(l&&l.split(",").indexOf(a.id)!==-1)return;i.setAttribute("aria-describedby",l?l+","+a.id:a.id)}}},sne=[];function lne(e,t,n){var r=n===void 0?{}:n,o=r.enabled,a=o===void 0?!0:o,i=r.placement,s=i===void 0?"bottom":i,l=r.strategy,u=l===void 0?"absolute":l,f=r.modifiers,h=f===void 0?sne:f,p=c0(r,["enabled","placement","strategy","modifiers"]),m=D.useRef(),w=D.useCallback(function(){var C;(C=m.current)==null||C.update()},[]),b=D.useCallback(function(){var C;(C=m.current)==null||C.forceUpdate()},[]),y=rne(D.useState({placement:s,update:w,forceUpdate:b,attributes:{},styles:{popper:zO(u),arrow:{}}})),S=y[0],x=y[1],E=D.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(M){var k=M.state,O={},F={};Object.keys(k.elements).forEach(function(R){O[R]=k.styles[R],F[R]=k.attributes[R]}),x({state:k,styles:O,attributes:F,update:w,forceUpdate:b,placement:k.placement})}}},[w,b,x]);return D.useEffect(function(){!m.current||!a||m.current.setOptions({placement:s,strategy:u,modifiers:[].concat(h,[E,ane])})},[u,s,E,a]),D.useEffect(function(){if(!(!a||e==null||t==null))return m.current=one(e,t,jn({},p,{placement:s,strategy:u,modifiers:[].concat(h,[ine,E])})),function(){m.current!=null&&(m.current.destroy(),m.current=void 0,x(function(C){return jn({},C,{attributes:{},styles:{popper:zO(u)}})}))}},[a,e,t]),S}function cne(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function gp(e,t,n,r){return ene(e,t,n,r),function(){cne(e,t,n,r)}}function une(e){return e&&"setState"in e?hC.findDOMNode(e):e??null}const dne=function(e){return gg(une(e))};var fne=27,UO=function(){};function hne(e){return e.button===0}function pne(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var VO=function(t){return t&&("current"in t?t.current:t)};function mne(e,t,n){var r=n===void 0?{}:n,o=r.disabled,a=r.clickTrigger,i=a===void 0?"click":a,s=D.useRef(!1),l=t||UO,u=D.useCallback(function(p){var m,w=VO(e);uX(!!w,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!w||pne(p)||!hne(p)||!!am(w,(m=p.composedPath==null?void 0:p.composedPath()[0])!=null?m:p.target)},[e]),f=_O(function(p){s.current||l(p)}),h=_O(function(p){p.keyCode===fne&&l(p)});D.useEffect(function(){if(!(o||e==null)){var p=window.event,m=dne(VO(e)),w=gp(m,i,u,!0),b=gp(m,i,function(x){if(x===p){p=void 0;return}f(x)}),y=gp(m,"keyup",function(x){if(x===p){p=void 0;return}h(x)}),S=[];return"ontouchstart"in m.documentElement&&(S=[].slice.call(m.body.children).map(function(x){return gp(x,"mousemove",UO)})),function(){w(),b(),y(),S.forEach(function(x){return x()})}}},[e,o,i,u,f,h])}function gne(e){var t={};return Array.isArray(e)?(e?.forEach(function(n){t[n.name]=n}),t):e||t}function vne(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function yne(e){var t,n,r,o,a=e.enabled,i=e.enableEvents,s=e.placement,l=e.flip,u=e.offset,f=e.fixed,h=e.containerPadding,p=e.arrowElement,m=e.popperConfig,w=m===void 0?{}:m,b=gne(w.modifiers);return jn({},w,{placement:s,enabled:a,strategy:f?"fixed":w.strategy,modifiers:vne(jn({},b,{eventListeners:{enabled:i},preventOverflow:jn({},b.preventOverflow,{options:h?jn({padding:h},(t=b.preventOverflow)==null?void 0:t.options):(n=b.preventOverflow)==null?void 0:n.options}),offset:{options:jn({offset:u},(r=b.offset)==null?void 0:r.options)},arrow:jn({},b.arrow,{enabled:!!p,options:jn({},(o=b.arrow)==null?void 0:o.options,{element:p})}),flip:jn({enabled:!!l},b.flip)}))})}function bne(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function wne(e,t){e.classList?e.classList.add(t):bne(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function WO(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Sne(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=WO(e.className,t):e.setAttribute("class",WO(e.className&&e.className.baseVal||"",t))}var ty;function W6(e){if((!ty&&ty!==0||e)&&LC){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),ty=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ty}var T1=function(t){var n;return typeof document>"u"?null:t==null?gg().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(n=t)!=null&&n.nodeType&&t||null)};function GO(e,t){var n=D.useState(function(){return T1(e)}),r=n[0],o=n[1];if(!r){var a=T1(e);a&&o(a)}return D.useEffect(function(){},[t,r]),D.useEffect(function(){var i=T1(e);i!==r&&o(i)},[e,r]),r}const ZO=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Tne(e,t){const n=ZO(e),r=ZO(t);return o=>{n&&n(o),r&&r(o)}}function xne(e,t){return D.useMemo(()=>Tne(e,t),[e,t])}var RC=_.forwardRef(function(e,t){var n=e.flip,r=e.offset,o=e.placement,a=e.containerPadding,i=a===void 0?5:a,s=e.popperConfig,l=s===void 0?{}:s,u=e.transition,f=YO(),h=f[0],p=f[1],m=YO(),w=m[0],b=m[1],y=xne(p,t),S=GO(e.container),x=GO(e.target),E=D.useState(!e.show),C=E[0],M=E[1],k=lne(x,h,yne({placement:o,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:w,popperConfig:l})),O=k.styles,F=k.attributes,R=c0(k,["styles","attributes"]);e.show?C&&M(!1):!e.transition&&!C&&M(!0);var B=function(){M(!0),e.onExited&&e.onExited.apply(e,arguments)},Y=e.show||u&&!C;if(mne(h,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!Y)return null;var H=e.children(jn({},R,{show:!!e.show,props:jn({},F.popper,{style:O.popper,ref:y}),arrowProps:jn({},F.arrow,{style:O.arrow,ref:b})}));if(u){var Z=e.onExit,W=e.onExiting,$=e.onEnter,V=e.onEntering,ne=e.onEntered;H=_.createElement(u,{in:e.show,appear:!0,onExit:Z,onExiting:W,onExited:B,onEnter:$,onEntering:V,onEntered:ne},H)}return S?hC.createPortal(H,S):null});RC.displayName="Overlay";RC.propTypes={show:de.bool,placement:de.oneOf(wC),target:de.any,container:de.any,flip:de.bool,children:de.func.isRequired,containerPadding:de.number,popperConfig:de.object,rootClose:de.bool,rootCloseEvent:de.oneOf(["click","mousedown"]),rootCloseDisabled:de.bool,onHide:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(t.rootClose){var a;return(a=de.func).isRequired.apply(a,[t].concat(r))}return de.func.apply(de,[t].concat(r))},transition:de.elementType,onEnter:de.func,onEntering:de.func,onEntered:de.func,onExit:de.func,onExiting:de.func,onExited:de.func};function Ine(){this.__data__=[],this.size=0}var kne=Ine,Ene=mg;function Cne(e,t){for(var n=e.length;n--;)if(Ene(e[n][0],t))return n;return-1}var f0=Cne,Mne=f0,Dne=Array.prototype,Ane=Dne.splice;function Nne(e){var t=this.__data__,n=Mne(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ane.call(t,n,1),--this.size,!0}var One=Nne,Pne=f0;function jne(e){var t=this.__data__,n=Pne(t,e);return n<0?void 0:t[n][1]}var Lne=jne,Rne=f0;function Fne(e){return Rne(this.__data__,e)>-1}var Hne=Fne,Bne=f0;function _ne(e,t){var n=this.__data__,r=Bne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Yne=_ne,zne=kne,Une=One,Vne=Lne,Wne=Hne,Gne=Yne;function Bf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Bf.prototype.clear=zne;Bf.prototype.delete=Une;Bf.prototype.get=Vne;Bf.prototype.has=Wne;Bf.prototype.set=Gne;var h0=Bf,Zne=h0;function qne(){this.__data__=new Zne,this.size=0}var $ne=qne;function Kne(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Jne=Kne;function Xne(e){return this.__data__.get(e)}var Qne=Xne;function ere(e){return this.__data__.has(e)}var tre=ere,nre=ii,rre=nre["__core-js_shared__"],ore=rre,x1=ore,qO=function(){var e=/[^.]+$/.exec(x1&&x1.keys&&x1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function are(e){return!!qO&&qO in e}var ire=are,sre=Function.prototype,lre=sre.toString;function cre(e){if(e!=null){try{return lre.call(e)}catch{}try{return e+""}catch{}}return""}var G6=cre,ure=d0,dre=ire,fre=Ca,hre=G6,pre=/[\\^$.*+?()[\]{}|]/g,mre=/^\[object .+?Constructor\]$/,gre=Function.prototype,vre=Object.prototype,yre=gre.toString,bre=vre.hasOwnProperty,wre=RegExp("^"+yre.call(bre).replace(pre,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sre(e){if(!fre(e)||dre(e))return!1;var t=ure(e)?wre:mre;return t.test(hre(e))}var Tre=Sre;function xre(e,t){return e?.[t]}var Ire=xre,kre=Tre,Ere=Ire;function Cre(e,t){var n=Ere(e,t);return kre(n)?n:void 0}var Su=Cre,Mre=Su,Dre=ii,Are=Mre(Dre,"Map"),FC=Are,Nre=Su,Ore=Nre(Object,"create"),p0=Ore,$O=p0;function Pre(){this.__data__=$O?$O(null):{},this.size=0}var jre=Pre;function Lre(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Rre=Lre,Fre=p0,Hre="__lodash_hash_undefined__",Bre=Object.prototype,_re=Bre.hasOwnProperty;function Yre(e){var t=this.__data__;if(Fre){var n=t[e];return n===Hre?void 0:n}return _re.call(t,e)?t[e]:void 0}var zre=Yre,Ure=p0,Vre=Object.prototype,Wre=Vre.hasOwnProperty;function Gre(e){var t=this.__data__;return Ure?t[e]!==void 0:Wre.call(t,e)}var Zre=Gre,qre=p0,$re="__lodash_hash_undefined__";function Kre(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=qre&&t===void 0?$re:t,this}var Jre=Kre,Xre=jre,Qre=Rre,eoe=zre,toe=Zre,noe=Jre;function _f(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_f.prototype.clear=Xre;_f.prototype.delete=Qre;_f.prototype.get=eoe;_f.prototype.has=toe;_f.prototype.set=noe;var roe=_f,KO=roe,ooe=h0,aoe=FC;function ioe(){this.size=0,this.__data__={hash:new KO,map:new(aoe||ooe),string:new KO}}var soe=ioe;function loe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var coe=loe,uoe=coe;function doe(e,t){var n=e.__data__;return uoe(t)?n[typeof t=="string"?"string":"hash"]:n.map}var m0=doe,foe=m0;function hoe(e){var t=foe(this,e).delete(e);return this.size-=t?1:0,t}var poe=hoe,moe=m0;function goe(e){return moe(this,e).get(e)}var voe=goe,yoe=m0;function boe(e){return yoe(this,e).has(e)}var woe=boe,Soe=m0;function Toe(e,t){var n=Soe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var xoe=Toe,Ioe=soe,koe=poe,Eoe=voe,Coe=woe,Moe=xoe;function Yf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yf.prototype.clear=Ioe;Yf.prototype.delete=koe;Yf.prototype.get=Eoe;Yf.prototype.has=Coe;Yf.prototype.set=Moe;var HC=Yf,Doe=h0,Aoe=FC,Noe=HC,Ooe=200;function Poe(e,t){var n=this.__data__;if(n instanceof Doe){var r=n.__data__;if(!Aoe||r.length<Ooe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Noe(r)}return n.set(e,t),this.size=n.size,this}var joe=Poe,Loe=h0,Roe=$ne,Foe=Jne,Hoe=Qne,Boe=tre,_oe=joe;function zf(e){var t=this.__data__=new Loe(e);this.size=t.size}zf.prototype.clear=Roe;zf.prototype.delete=Foe;zf.prototype.get=Hoe;zf.prototype.has=Boe;zf.prototype.set=_oe;var BC=zf,Yoe="__lodash_hash_undefined__";function zoe(e){return this.__data__.set(e,Yoe),this}var Uoe=zoe;function Voe(e){return this.__data__.has(e)}var Woe=Voe,Goe=HC,Zoe=Uoe,qoe=Woe;function Mb(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Goe;++t<n;)this.add(e[t])}Mb.prototype.add=Mb.prototype.push=Zoe;Mb.prototype.has=qoe;var Z6=Mb;function $oe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var q6=$oe;function Koe(e,t){return e.has(t)}var $6=Koe,Joe=Z6,Xoe=q6,Qoe=$6,eae=1,tae=2;function nae(e,t,n,r,o,a){var i=n&eae,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var h=-1,p=!0,m=n&tae?new Joe:void 0;for(a.set(e,t),a.set(t,e);++h<s;){var w=e[h],b=t[h];if(r)var y=i?r(b,w,h,t,e,a):r(w,b,h,e,t,a);if(y!==void 0){if(y)continue;p=!1;break}if(m){if(!Xoe(t,function(S,x){if(!Qoe(m,x)&&(w===S||o(w,S,n,r,a)))return m.push(x)})){p=!1;break}}else if(!(w===b||o(w,b,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var K6=nae,rae=ii,oae=rae.Uint8Array,J6=oae;function aae(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var iae=aae;function sae(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var _C=sae,JO=jf,XO=J6,lae=mg,cae=K6,uae=iae,dae=_C,fae=1,hae=2,pae="[object Boolean]",mae="[object Date]",gae="[object Error]",vae="[object Map]",yae="[object Number]",bae="[object RegExp]",wae="[object Set]",Sae="[object String]",Tae="[object Symbol]",xae="[object ArrayBuffer]",Iae="[object DataView]",QO=JO?JO.prototype:void 0,I1=QO?QO.valueOf:void 0;function kae(e,t,n,r,o,a,i){switch(n){case Iae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xae:return!(e.byteLength!=t.byteLength||!a(new XO(e),new XO(t)));case pae:case mae:case yae:return lae(+e,+t);case gae:return e.name==t.name&&e.message==t.message;case bae:case Sae:return e==t+"";case vae:var s=uae;case wae:var l=r&fae;if(s||(s=dae),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;r|=hae,i.set(e,t);var f=cae(s(e),s(t),r,o,a,i);return i.delete(e),f;case Tae:if(I1)return I1.call(e)==I1.call(t)}return!1}var Eae=kae;function Cae(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var YC=Cae,Mae=Array.isArray,Gr=Mae,Dae=YC,Aae=Gr;function Nae(e,t,n){var r=t(e);return Aae(e)?r:Dae(r,n(e))}var X6=Nae;function Oae(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}var Pae=Oae;function jae(){return[]}var Q6=jae,Lae=Pae,Rae=Q6,Fae=Object.prototype,Hae=Fae.propertyIsEnumerable,eP=Object.getOwnPropertySymbols,Bae=eP?function(e){return e==null?[]:(e=Object(e),Lae(eP(e),function(t){return Hae.call(e,t)}))}:Rae,zC=Bae;function _ae(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Yae=_ae,zae=Qs,Uae=si,Vae="[object Arguments]";function Wae(e){return Uae(e)&&zae(e)==Vae}var Gae=Wae,tP=Gae,Zae=si,e8=Object.prototype,qae=e8.hasOwnProperty,$ae=e8.propertyIsEnumerable,Kae=tP(function(){return arguments}())?tP:function(e){return Zae(e)&&qae.call(e,"callee")&&!$ae.call(e,"callee")},UC=Kae,Db={exports:{}};function Jae(){return!1}var Xae=Jae;Db.exports;(function(e,t){var n=ii,r=Xae,o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===o,s=i?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(Db,Db.exports);var g0=Db.exports,Qae=Qs,eie=OC,tie=si,nie="[object Arguments]",rie="[object Array]",oie="[object Boolean]",aie="[object Date]",iie="[object Error]",sie="[object Function]",lie="[object Map]",cie="[object Number]",uie="[object Object]",die="[object RegExp]",fie="[object Set]",hie="[object String]",pie="[object WeakMap]",mie="[object ArrayBuffer]",gie="[object DataView]",vie="[object Float32Array]",yie="[object Float64Array]",bie="[object Int8Array]",wie="[object Int16Array]",Sie="[object Int32Array]",Tie="[object Uint8Array]",xie="[object Uint8ClampedArray]",Iie="[object Uint16Array]",kie="[object Uint32Array]",bn={};bn[vie]=bn[yie]=bn[bie]=bn[wie]=bn[Sie]=bn[Tie]=bn[xie]=bn[Iie]=bn[kie]=!0;bn[nie]=bn[rie]=bn[mie]=bn[oie]=bn[gie]=bn[aie]=bn[iie]=bn[sie]=bn[lie]=bn[cie]=bn[uie]=bn[die]=bn[fie]=bn[hie]=bn[pie]=!1;function Eie(e){return tie(e)&&eie(e.length)&&!!bn[Qae(e)]}var Cie=Eie;function Mie(e){return function(t){return e(t)}}var v0=Mie,Ab={exports:{}};Ab.exports;(function(e,t){var n=L6,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,i=a&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s})(Ab,Ab.exports);var VC=Ab.exports,Die=Cie,Aie=v0,nP=VC,rP=nP&&nP.isTypedArray,Nie=rP?Aie(rP):Die,WC=Nie,Oie=Yae,Pie=UC,jie=Gr,Lie=g0,Rie=PC,Fie=WC,Hie=Object.prototype,Bie=Hie.hasOwnProperty;function _ie(e,t){var n=jie(e),r=!n&&Pie(e),o=!n&&!r&&Lie(e),a=!n&&!r&&!o&&Fie(e),i=n||r||o||a,s=i?Oie(e.length,String):[],l=s.length;for(var u in e)(t||Bie.call(e,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Rie(u,l)))&&s.push(u);return s}var t8=_ie,Yie=Object.prototype;function zie(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Yie;return e===n}var GC=zie;function Uie(e,t){return function(n){return e(t(n))}}var n8=Uie,Vie=n8,Wie=Vie(Object.keys,Object),Gie=Wie,Zie=GC,qie=Gie,$ie=Object.prototype,Kie=$ie.hasOwnProperty;function Jie(e){if(!Zie(e))return qie(e);var t=[];for(var n in Object(e))Kie.call(e,n)&&n!="constructor"&&t.push(n);return t}var Xie=Jie,Qie=t8,ese=Xie,tse=Rf;function nse(e){return tse(e)?Qie(e):ese(e)}var Uf=nse,rse=X6,ose=zC,ase=Uf;function ise(e){return rse(e,ase,ose)}var r8=ise,oP=r8,sse=1,lse=Object.prototype,cse=lse.hasOwnProperty;function use(e,t,n,r,o,a){var i=n&sse,s=oP(e),l=s.length,u=oP(t),f=u.length;if(l!=f&&!i)return!1;for(var h=l;h--;){var p=s[h];if(!(i?p in t:cse.call(t,p)))return!1}var m=a.get(e),w=a.get(t);if(m&&w)return m==t&&w==e;var b=!0;a.set(e,t),a.set(t,e);for(var y=i;++h<l;){p=s[h];var S=e[p],x=t[p];if(r)var E=i?r(x,S,p,t,e,a):r(S,x,p,e,t,a);if(!(E===void 0?S===x||o(S,x,n,r,a):E)){b=!1;break}y||(y=p=="constructor")}if(b&&!y){var C=e.constructor,M=t.constructor;C!=M&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof M=="function"&&M instanceof M)&&(b=!1)}return a.delete(e),a.delete(t),b}var dse=use,fse=Su,hse=ii,pse=fse(hse,"DataView"),mse=pse,gse=Su,vse=ii,yse=gse(vse,"Promise"),bse=yse,wse=Su,Sse=ii,Tse=wse(Sse,"Set"),o8=Tse,xse=Su,Ise=ii,kse=xse(Ise,"WeakMap"),Ese=kse,RI=mse,FI=FC,HI=bse,BI=o8,_I=Ese,a8=Qs,Vf=G6,aP="[object Map]",Cse="[object Object]",iP="[object Promise]",sP="[object Set]",lP="[object WeakMap]",cP="[object DataView]",Mse=Vf(RI),Dse=Vf(FI),Ase=Vf(HI),Nse=Vf(BI),Ose=Vf(_I),Rc=a8;(RI&&Rc(new RI(new ArrayBuffer(1)))!=cP||FI&&Rc(new FI)!=aP||HI&&Rc(HI.resolve())!=iP||BI&&Rc(new BI)!=sP||_I&&Rc(new _I)!=lP)&&(Rc=function(e){var t=a8(e),n=t==Cse?e.constructor:void 0,r=n?Vf(n):"";if(r)switch(r){case Mse:return cP;case Dse:return aP;case Ase:return iP;case Nse:return sP;case Ose:return lP}return t});var y0=Rc,k1=BC,Pse=K6,jse=Eae,Lse=dse,uP=y0,dP=Gr,fP=g0,Rse=WC,Fse=1,hP="[object Arguments]",pP="[object Array]",ny="[object Object]",Hse=Object.prototype,mP=Hse.hasOwnProperty;function Bse(e,t,n,r,o,a){var i=dP(e),s=dP(t),l=i?pP:uP(e),u=s?pP:uP(t);l=l==hP?ny:l,u=u==hP?ny:u;var f=l==ny,h=u==ny,p=l==u;if(p&&fP(e)){if(!fP(t))return!1;i=!0,f=!1}if(p&&!f)return a||(a=new k1),i||Rse(e)?Pse(e,t,n,r,o,a):jse(e,t,l,n,r,o,a);if(!(n&Fse)){var m=f&&mP.call(e,"__wrapped__"),w=h&&mP.call(t,"__wrapped__");if(m||w){var b=m?e.value():e,y=w?t.value():t;return a||(a=new k1),o(b,y,n,r,a)}}return p?(a||(a=new k1),Lse(e,t,n,r,o,a)):!1}var _se=Bse,Yse=_se,gP=si;function i8(e,t,n,r,o){return e===t?!0:e==null||t==null||!gP(e)&&!gP(t)?e!==e&&t!==t:Yse(e,t,n,r,i8,o)}var ZC=i8,zse=ZC;function Use(e,t){return zse(e,t)}var Vse=Use;const vg=Xe(Vse);function E1(e,t){var n=jC(e);return n?n.innerHeight:Jc(e).height}function s8(e,t,n){e.closest&&!n&&e.closest(t);var r=e;do{if(Jte(r,t))return r;r=r.parentElement}while(r&&r!==n&&r.nodeType===document.ELEMENT_NODE);return null}function Wse(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}var l8=Wse,Gse=BC,Zse=ZC,qse=1,$se=2;function Kse(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],u=e[l],f=s[1];if(i&&s[2]){if(u===void 0&&!(l in e))return!1}else{var h=new Gse;if(r)var p=r(u,f,l,e,t,h);if(!(p===void 0?Zse(f,u,qse|$se,r,h):p))return!1}}return!0}var Jse=Kse,Xse=Ca;function Qse(e){return e===e&&!Xse(e)}var c8=Qse,ele=c8,tle=Uf;function nle(e){for(var t=tle(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ele(o)]}return t}var rle=nle;function ole(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var u8=ole,ale=Jse,ile=rle,sle=u8;function lle(e){var t=ile(e);return t.length==1&&t[0][2]?sle(t[0][0],t[0][1]):function(n){return n===e||ale(n,e,t)}}var cle=lle,ule=Gr,dle=Hf,fle=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hle=/^\w*$/;function ple(e,t){if(ule(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||dle(e)?!0:hle.test(e)||!fle.test(e)||t!=null&&e in Object(t)}var qC=ple,d8=HC,mle="Expected a function";function $C(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mle);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new($C.Cache||d8),n}$C.Cache=d8;var f8=$C;const gle=Xe(f8);var vle=f8,yle=500;function ble(e){var t=vle(e,function(r){return n.size===yle&&n.clear(),r}),n=t.cache;return t}var wle=ble,Sle=wle,Tle=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xle=/\\(\\)?/g,Ile=Sle(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Tle,function(n,r,o,a){t.push(o?a.replace(xle,"$1"):r||n)}),t}),kle=Ile;function Ele(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var b0=Ele,vP=jf,Cle=b0,Mle=Gr,Dle=Hf,yP=vP?vP.prototype:void 0,bP=yP?yP.toString:void 0;function h8(e){if(typeof e=="string")return e;if(Mle(e))return Cle(e,h8)+"";if(Dle(e))return bP?bP.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ale=h8,Nle=Ale;function Ole(e){return e==null?"":Nle(e)}var p8=Ole,Ple=Gr,jle=qC,Lle=kle,Rle=p8;function Fle(e,t){return Ple(e)?e:jle(e,t)?[e]:Lle(Rle(e))}var w0=Fle,Hle=Hf;function Ble(e){if(typeof e=="string"||Hle(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var yg=Ble,_le=w0,Yle=yg;function zle(e,t){t=_le(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Yle(t[n++])];return n&&n==r?e:void 0}var S0=zle,Ule=S0;function Vle(e,t,n){var r=e==null?void 0:Ule(e,t);return r===void 0?n:r}var m8=Vle;const ba=Xe(m8);function Wle(e,t){return e!=null&&t in Object(e)}var Gle=Wle,Zle=w0,qle=UC,$le=Gr,Kle=PC,Jle=OC,Xle=yg;function Qle(e,t,n){t=Zle(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=Xle(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&Jle(o)&&Kle(i,o)&&($le(e)||qle(e)))}var ece=Qle,tce=Gle,nce=ece;function rce(e,t){return e!=null&&nce(e,t,tce)}var oce=rce,ace=ZC,ice=m8,sce=oce,lce=qC,cce=c8,uce=u8,dce=yg,fce=1,hce=2;function pce(e,t){return lce(e)&&cce(t)?uce(dce(e),t):function(n){var r=ice(n,e);return r===void 0&&r===t?sce(n,e):ace(t,r,fce|hce)}}var mce=pce;function gce(e){return e}var Wf=gce;function vce(e){return function(t){return t?.[e]}}var yce=vce,bce=S0;function wce(e){return function(t){return bce(t,e)}}var Sce=wce,Tce=yce,xce=Sce,Ice=qC,kce=yg;function Ece(e){return Ice(e)?Tce(kce(e)):xce(e)}var Cce=Ece,Mce=cle,Dce=mce,Ace=Wf,Nce=Gr,Oce=Cce;function Pce(e){return typeof e=="function"?e:e==null?Ace:typeof e=="object"?Nce(e)?Dce(e[0],e[1]):Mce(e):Oce(e)}var el=Pce,jce=l8,Lce=el,Rce=B6,Fce=Math.max;function Hce(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:Rce(n);return o<0&&(o=Fce(r+o,0)),jce(e,Lce(t),o)}var g8=Hce;const Bce=Xe(g8);var _ce=Math.ceil,Yce=Math.max;function zce(e,t,n,r){for(var o=-1,a=Yce(_ce((t-e)/(n||1)),0),i=Array(a);a--;)i[r?a:++o]=e,e+=n;return i}var Uce=zce,Vce=Uce,Wce=Ff,C1=H6;function Gce(e){return function(t,n,r){return r&&typeof r!="number"&&Wce(t,n,r)&&(n=r=void 0),t=C1(t),n===void 0?(n=t,t=0):n=C1(n),r=r===void 0?t<n?1:-1:C1(r),Vce(t,n,r,e)}}var Zce=Gce,qce=Zce,$ce=qce(),Kce=$ce;const im=Xe(Kce);var wP=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Jce(e,t){return!!(e===t||wP(e)&&wP(t))}function Xce(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Jce(e[n],t[n]))return!1;return!0}function v8(e,t){t===void 0&&(t=Xce);var n=null;function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}var SP=jf,Qce=UC,eue=Gr,TP=SP?SP.isConcatSpreadable:void 0;function tue(e){return eue(e)||Qce(e)||!!(TP&&e&&e[TP])}var nue=tue,rue=YC,oue=nue;function y8(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=oue),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?y8(s,t-1,n,r,o):rue(o,s):r||(o[o.length]=s)}return o}var KC=y8;function aue(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var iue=aue,sue=iue,lue=sue(),cue=lue,uue=cue,due=Uf;function fue(e,t){return e&&uue(e,t,due)}var JC=fue,hue=Rf;function pue(e,t){return function(n,r){if(n==null)return n;if(!hue(n))return e(n,r);for(var o=n.length,a=t?o:-1,i=Object(n);(t?a--:++a<o)&&r(i[a],a,i)!==!1;);return n}}var mue=pue,gue=JC,vue=mue,yue=vue(gue),XC=yue,bue=XC,wue=Rf;function Sue(e,t){var n=-1,r=wue(e)?Array(e.length):[];return bue(e,function(o,a,i){r[++n]=t(o,a,i)}),r}var b8=Sue;function Tue(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var xue=Tue,xP=Hf;function Iue(e,t){if(e!==t){var n=e!==void 0,r=e===null,o=e===e,a=xP(e),i=t!==void 0,s=t===null,l=t===t,u=xP(t);if(!s&&!u&&!a&&e>t||a&&i&&l&&!s&&!u||r&&i&&l||!n&&l||!o)return 1;if(!r&&!a&&!u&&e<t||u&&n&&o&&!r&&!a||s&&n&&o||!i&&o||!l)return-1}return 0}var kue=Iue,Eue=kue;function Cue(e,t,n){for(var r=-1,o=e.criteria,a=t.criteria,i=o.length,s=n.length;++r<i;){var l=Eue(o[r],a[r]);if(l){if(r>=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Mue=Cue,M1=b0,Due=S0,Aue=el,Nue=b8,Oue=xue,Pue=v0,jue=Mue,Lue=Wf,Rue=Gr;function Fue(e,t,n){t.length?t=M1(t,function(a){return Rue(a)?function(i){return Due(i,a.length===1?a[0]:a)}:a}):t=[Lue];var r=-1;t=M1(t,Pue(Aue));var o=Nue(e,function(a,i,s){var l=M1(t,function(u){return u(a)});return{criteria:l,index:++r,value:a}});return Oue(o,function(a,i){return jue(a,i,n)})}var Hue=Fue;function Bue(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var _ue=Bue,Yue=_ue,IP=Math.max;function zue(e,t,n){return t=IP(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=IP(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),Yue(e,this,s)}}var w8=zue;function Uue(e){return function(){return e}}var Vue=Uue,Wue=Su,Gue=function(){try{var e=Wue(Object,"defineProperty");return e({},"",{}),e}catch{}}(),S8=Gue,Zue=Vue,kP=S8,que=Wf,$ue=kP?function(e,t){return kP(e,"toString",{configurable:!0,enumerable:!1,value:Zue(t),writable:!0})}:que,Kue=$ue,Jue=800,Xue=16,Que=Date.now;function ede(e){var t=0,n=0;return function(){var r=Que(),o=Xue-(r-n);if(n=r,o>0){if(++t>=Jue)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var tde=ede,nde=Kue,rde=tde,ode=rde(nde),T8=ode,ade=Wf,ide=w8,sde=T8;function lde(e,t){return sde(ide(e,t,ade),e+"")}var x8=lde,cde=KC,ude=Hue,dde=x8,EP=Ff,fde=dde(function(e,t){if(e==null)return[];var n=t.length;return n>1&&EP(e,t[0],t[1])?t=[]:n>2&&EP(t[0],t[1],t[2])&&(t=[t[0]]),ude(e,cde(t,1),[])}),hde=fde;const T0=Xe(hde);function YI(e,t){var n=jC(e);return n?n.innerWidth:Jc(e).width}function I8(e){return b6(e)||j6(e)||MC(e)||w6()}function pde(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var k8=pde,CP=S8;function mde(e,t,n){t=="__proto__"&&CP?CP(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var QC=mde,gde=QC,vde=mg,yde=Object.prototype,bde=yde.hasOwnProperty;function wde(e,t,n){var r=e[t];(!(bde.call(e,t)&&vde(r,n))||n===void 0&&!(t in e))&&gde(e,t,n)}var E8=wde,Sde=E8,Tde=QC;function xde(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Tde(n,s,l):Sde(n,s,l)}return n}var bg=xde,Ide=bg,kde=Uf;function Ede(e,t){return e&&Ide(t,kde(t),e)}var Cde=Ede;function Mde(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Dde=Mde,Ade=Ca,Nde=GC,Ode=Dde,Pde=Object.prototype,jde=Pde.hasOwnProperty;function Lde(e){if(!Ade(e))return Ode(e);var t=Nde(e),n=[];for(var r in e)r=="constructor"&&(t||!jde.call(e,r))||n.push(r);return n}var Rde=Lde,Fde=t8,Hde=Rde,Bde=Rf;function _de(e){return Bde(e)?Fde(e,!0):Hde(e)}var x0=_de,Yde=bg,zde=x0;function Ude(e,t){return e&&Yde(t,zde(t),e)}var Vde=Ude,Nb={exports:{}};Nb.exports;(function(e,t){var n=ii,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,i=a?n.Buffer:void 0,s=i?i.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var h=u.length,p=s?s(h):new u.constructor(h);return u.copy(p),p}e.exports=l})(Nb,Nb.exports);var Wde=Nb.exports;function Gde(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Zde=Gde,qde=bg,$de=zC;function Kde(e,t){return qde(e,$de(e),t)}var Jde=Kde,Xde=n8,Qde=Xde(Object.getPrototypeOf,Object),I0=Qde,efe=YC,tfe=I0,nfe=zC,rfe=Q6,ofe=Object.getOwnPropertySymbols,afe=ofe?function(e){for(var t=[];e;)efe(t,nfe(e)),e=tfe(e);return t}:rfe,C8=afe,ife=bg,sfe=C8;function lfe(e,t){return ife(e,sfe(e),t)}var cfe=lfe,ufe=X6,dfe=C8,ffe=x0;function hfe(e){return ufe(e,ffe,dfe)}var M8=hfe,pfe=Object.prototype,mfe=pfe.hasOwnProperty;function gfe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&mfe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var vfe=gfe,MP=J6;function yfe(e){var t=new e.constructor(e.byteLength);return new MP(t).set(new MP(e)),t}var eM=yfe,bfe=eM;function wfe(e,t){var n=t?bfe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Sfe=wfe,Tfe=/\w*$/;function xfe(e){var t=new e.constructor(e.source,Tfe.exec(e));return t.lastIndex=e.lastIndex,t}var Ife=xfe,DP=jf,AP=DP?DP.prototype:void 0,NP=AP?AP.valueOf:void 0;function kfe(e){return NP?Object(NP.call(e)):{}}var Efe=kfe,Cfe=eM;function Mfe(e,t){var n=t?Cfe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Dfe=Mfe,Afe=eM,Nfe=Sfe,Ofe=Ife,Pfe=Efe,jfe=Dfe,Lfe="[object Boolean]",Rfe="[object Date]",Ffe="[object Map]",Hfe="[object Number]",Bfe="[object RegExp]",_fe="[object Set]",Yfe="[object String]",zfe="[object Symbol]",Ufe="[object ArrayBuffer]",Vfe="[object DataView]",Wfe="[object Float32Array]",Gfe="[object Float64Array]",Zfe="[object Int8Array]",qfe="[object Int16Array]",$fe="[object Int32Array]",Kfe="[object Uint8Array]",Jfe="[object Uint8ClampedArray]",Xfe="[object Uint16Array]",Qfe="[object Uint32Array]";function ehe(e,t,n){var r=e.constructor;switch(t){case Ufe:return Afe(e);case Lfe:case Rfe:return new r(+e);case Vfe:return Nfe(e,n);case Wfe:case Gfe:case Zfe:case qfe:case $fe:case Kfe:case Jfe:case Xfe:case Qfe:return jfe(e,n);case Ffe:return new r;case Hfe:case Yfe:return new r(e);case Bfe:return Ofe(e);case _fe:return new r;case zfe:return Pfe(e)}}var the=ehe,nhe=Ca,OP=Object.create,rhe=function(){function e(){}return function(t){if(!nhe(t))return{};if(OP)return OP(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),D8=rhe,ohe=D8,ahe=I0,ihe=GC;function she(e){return typeof e.constructor=="function"&&!ihe(e)?ohe(ahe(e)):{}}var lhe=she,che=y0,uhe=si,dhe="[object Map]";function fhe(e){return uhe(e)&&che(e)==dhe}var hhe=fhe,phe=hhe,mhe=v0,PP=VC,jP=PP&&PP.isMap,ghe=jP?mhe(jP):phe,vhe=ghe,yhe=y0,bhe=si,whe="[object Set]";function She(e){return bhe(e)&&yhe(e)==whe}var The=She,xhe=The,Ihe=v0,LP=VC,RP=LP&&LP.isSet,khe=RP?Ihe(RP):xhe,Ehe=khe,Che=BC,Mhe=k8,Dhe=E8,Ahe=Cde,Nhe=Vde,Ohe=Wde,Phe=Zde,jhe=Jde,Lhe=cfe,Rhe=r8,Fhe=M8,Hhe=y0,Bhe=vfe,_he=the,Yhe=lhe,zhe=Gr,Uhe=g0,Vhe=vhe,Whe=Ca,Ghe=Ehe,Zhe=Uf,qhe=x0,$he=1,Khe=2,Jhe=4,A8="[object Arguments]",Xhe="[object Array]",Qhe="[object Boolean]",epe="[object Date]",tpe="[object Error]",N8="[object Function]",npe="[object GeneratorFunction]",rpe="[object Map]",ope="[object Number]",O8="[object Object]",ape="[object RegExp]",ipe="[object Set]",spe="[object String]",lpe="[object Symbol]",cpe="[object WeakMap]",upe="[object ArrayBuffer]",dpe="[object DataView]",fpe="[object Float32Array]",hpe="[object Float64Array]",ppe="[object Int8Array]",mpe="[object Int16Array]",gpe="[object Int32Array]",vpe="[object Uint8Array]",ype="[object Uint8ClampedArray]",bpe="[object Uint16Array]",wpe="[object Uint32Array]",fn={};fn[A8]=fn[Xhe]=fn[upe]=fn[dpe]=fn[Qhe]=fn[epe]=fn[fpe]=fn[hpe]=fn[ppe]=fn[mpe]=fn[gpe]=fn[rpe]=fn[ope]=fn[O8]=fn[ape]=fn[ipe]=fn[spe]=fn[lpe]=fn[vpe]=fn[ype]=fn[bpe]=fn[wpe]=!0;fn[tpe]=fn[N8]=fn[cpe]=!1;function qy(e,t,n,r,o,a){var i,s=t&$he,l=t&Khe,u=t&Jhe;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Whe(e))return e;var f=zhe(e);if(f){if(i=Bhe(e),!s)return Phe(e,i)}else{var h=Hhe(e),p=h==N8||h==npe;if(Uhe(e))return Ohe(e,s);if(h==O8||h==A8||p&&!o){if(i=l||p?{}:Yhe(e),!s)return l?Lhe(e,Nhe(i,e)):jhe(e,Ahe(i,e))}else{if(!fn[h])return o?e:{};i=_he(e,h,s)}}a||(a=new Che);var m=a.get(e);if(m)return m;a.set(e,i),Ghe(e)?e.forEach(function(y){i.add(qy(y,t,n,y,e,a))}):Vhe(e)&&e.forEach(function(y,S){i.set(S,qy(y,t,n,S,e,a))});var w=u?l?Fhe:Rhe:l?qhe:Zhe,b=f?void 0:w(e);return Mhe(b||e,function(y,S){b&&(S=y,y=e[S]),Dhe(i,S,qy(y,t,n,S,e,a))}),i}var Spe=qy;function Tpe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var P8=Tpe;const xpe=Xe(P8);var Ipe=S0,kpe=NC;function Epe(e,t){return t.length<2?e:Ipe(e,kpe(t,0,-1))}var Cpe=Epe,Mpe=w0,Dpe=P8,Ape=Cpe,Npe=yg;function Ope(e,t){return t=Mpe(t,e),e=Ape(e,t),e==null||delete e[Npe(Dpe(t))]}var Ppe=Ope,jpe=Qs,Lpe=I0,Rpe=si,Fpe="[object Object]",Hpe=Function.prototype,Bpe=Object.prototype,j8=Hpe.toString,_pe=Bpe.hasOwnProperty,Ype=j8.call(Object);function zpe(e){if(!Rpe(e)||jpe(e)!=Fpe)return!1;var t=Lpe(e);if(t===null)return!0;var n=_pe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&j8.call(n)==Ype}var L8=zpe;const Upe=Xe(L8);var Vpe=L8;function Wpe(e){return Vpe(e)?void 0:e}var Gpe=Wpe,Zpe=KC;function qpe(e){var t=e==null?0:e.length;return t?Zpe(e,1):[]}var $pe=qpe,Kpe=$pe,Jpe=w8,Xpe=T8;function Qpe(e){return Xpe(Jpe(e,void 0,Kpe),e+"")}var eme=Qpe,tme=b0,nme=Spe,rme=Ppe,ome=w0,ame=bg,ime=Gpe,sme=eme,lme=M8,cme=1,ume=2,dme=4,fme=sme(function(e,t){var n={};if(e==null)return n;var r=!1;t=tme(t,function(a){return a=ome(a,e),r||(r=a.length>1),a}),ame(e,lme(e),n),r&&(n=nme(n,cme|ume|dme,ime));for(var o=t.length;o--;)rme(n,t[o]);return n}),hme=fme;const pme=Xe(hme);var mme=x8,gme=mg,vme=Ff,yme=x0,R8=Object.prototype,bme=R8.hasOwnProperty,wme=mme(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&vme(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],i=yme(a),s=-1,l=i.length;++s<l;){var u=i[s],f=e[u];(f===void 0||gme(f,R8[u])&&!bme.call(e,u))&&(e[u]=a[u])}return e}),Sme=wme;const Tme=Xe(Sme);var xme=k8,Ime=D8,kme=JC,Eme=el,Cme=I0,Mme=Gr,Dme=g0,Ame=d0,Nme=Ca,Ome=WC;function Pme(e,t,n){var r=Mme(e),o=r||Dme(e)||Ome(e);if(t=Eme(t),n==null){var a=e&&e.constructor;o?n=r?new a:[]:Nme(e)?n=Ame(a)?Ime(Cme(e)):{}:n={}}return(o?xme:kme)(e,function(i,s,l){return t(n,i,s,l)}),n}var jme=Pme;const Lme=Xe(jme);var Rme=QC,Fme=JC,Hme=el;function Bme(e,t){var n={};return t=Hme(t),Fme(e,function(r,o,a){Rme(n,o,t(r,o,a))}),n}var _me=Bme;const F8=Xe(_me);var Yme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){return function(n,r,o){r.prototype.isBetween=function(a,i,s,l){var u=o(a),f=o(i),h=(l=l||"()")[0]==="(",p=l[1]===")";return(h?this.isAfter(u,s):!this.isBefore(u,s))&&(p?this.isBefore(f,s):!this.isAfter(f,s))||(h?this.isBefore(u,s):!this.isAfter(u,s))&&(p?this.isAfter(f,s):!this.isBefore(f,s))}}})})(Yme);var zme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){return function(n,r){r.prototype.isSameOrAfter=function(o,a){return this.isSame(o,a)||this.isAfter(o,a)}}})})(zme);var Ume={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){return function(n,r){r.prototype.isSameOrBefore=function(o,a){return this.isSame(o,a)||this.isBefore(o,a)}}})})(Ume);var Vme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){return function(n,r,o){var a=r.prototype,i=function(h){return h&&(h.indexOf?h:h.s)},s=function(h,p,m,w,b){var y=h.name?h:h.$locale(),S=i(y[p]),x=i(y[m]),E=S||x.map(function(M){return M.slice(0,w)});if(!b)return E;var C=y.weekStart;return E.map(function(M,k){return E[(k+(C||0))%7]})},l=function(){return o.Ls[o.locale()]},u=function(h,p){return h.formats[p]||function(m){return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,b,y){return b||y.slice(1)})}(h.formats[p.toUpperCase()])},f=function(){var h=this;return{months:function(p){return p?p.format("MMMM"):s(h,"months")},monthsShort:function(p){return p?p.format("MMM"):s(h,"monthsShort","months",3)},firstDayOfWeek:function(){return h.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):s(h,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):s(h,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):s(h,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return u(h.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};a.localeData=function(){return f.bind(this)()},o.localeData=function(){var h=l();return{firstDayOfWeek:function(){return h.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(p){return u(h,p)},meridiem:h.meridiem,ordinal:h.ordinal}},o.months=function(){return s(l(),"months")},o.monthsShort=function(){return s(l(),"monthsShort","months",3)},o.weekdays=function(h){return s(l(),"weekdays",null,null,h)},o.weekdaysShort=function(h){return s(l(),"weekdaysShort","weekdays",3,h)},o.weekdaysMin=function(h){return s(l(),"weekdaysMin","weekdays",2,h)}}})})(Vme);var Wme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var i=o.prototype,s=i.format;a.en.formats=n,i.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(h,p){return h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,w,b){var y=b&&b.toUpperCase();return w||p[b]||n[b]||p[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(S,x,E){return x||E.slice(1)})})}(l,u===void 0?{}:u);return s.call(this,f)}}})})(Wme);var Gme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){return function(n,r,o){var a=function(i,s){if(!s||!s.length||s.length===1&&!s[0]||s.length===1&&Array.isArray(s[0])&&!s[0].length)return null;var l;s.length===1&&s[0].length>0&&(s=s[0]),l=(s=s.filter(function(f){return f}))[0];for(var u=1;u<s.length;u+=1)s[u].isValid()&&!s[u][i](l)||(l=s[u]);return l};o.max=function(){var i=[].slice.call(arguments,0);return a("isAfter",i)},o.min=function(){var i=[].slice.call(arguments,0);return a("isBefore",i)}}})})(Gme);var Zme={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ur,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(a,i,s){var l=i.prototype;s.utc=function(b){var y={date:b,utc:!0,args:arguments};return new i(y)},l.utc=function(b){var y=s(this.toDate(),{locale:this.$L,utc:!0});return b?y.add(this.utcOffset(),n):y},l.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),u.call(this,b)};var f=l.init;l.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else f.call(this)};var h=l.utcOffset;l.utcOffset=function(b,y){var S=this.$utils().u;if(S(b))return this.$u?0:S(this.$offset)?h.call(this):this.$offset;if(typeof b=="string"&&(b=function(M){M===void 0&&(M="");var k=M.match(r);if(!k)return null;var O=(""+k[0]).match(o)||["-",0,0],F=O[0],R=60*+O[1]+ +O[2];return R===0?0:F==="+"?R:-R}(b),b===null))return this;var x=Math.abs(b)<=16?60*b:b,E=this;if(y)return E.$offset=x,E.$u=b===0,E;if(b!==0){var C=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(E=this.local().add(x+C,n)).$offset=x,E.$x.$localOffset=C}else E=this.utc();return E};var p=l.format;l.format=function(b){var y=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,y)},l.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var m=l.toDate;l.toDate=function(b){return b==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var w=l.diff;l.diff=function(b,y,S){if(b&&this.$u===b.$u)return w.call(this,b,y,S);var x=this.local(),E=s(b).local();return w.call(x,E,y,S)}}})})(Zme);function ks(e){return e.children}var Oo={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},eo={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"},FP=Object.keys(eo).map(function(e){return eo[e]});de.oneOfType([de.string,de.func]);de.any;de.func;de.oneOfType([de.arrayOf(de.oneOf(FP)),de.objectOf(function(e,t){var n=FP.indexOf(t)!==-1&&typeof e[t]=="boolean";if(n)return null;for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];return de.elementType.apply(de,[e,t].concat(o))})]);de.oneOfType([de.oneOf(["overlap","no-overlap"]),de.func]);function In(e,t){e&&e.apply(null,[].concat(t))}var HP={seconds:1e3,minutes:1e3*60,hours:1e3*60*60,day:1e3*60*60*24};function H8(e,t){var n=Er(e,"month");return Er(n,"week",t.startOfWeek())}function B8(e,t){var n=Eb(e,"month");return Eb(n,"week",t.startOfWeek())}function qme(e,t){for(var n=H8(e,t),r=B8(e,t),o=[];Of(n,r,"day");)o.push(n),n=oi(n,1,"day");return o}function $me(e,t){var n=Er(e,t);return hg(n,e)?n:oi(n,1,t)}function Kme(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",r=e,o=[];Of(r,t,n);)o.push(r),r=oi(r,1,n);return o}function Jme(e,t){return t==null&&e==null?null:(t==null&&(t=new Date),e==null&&(e=new Date),e=Er(e,"day"),e=om(e,om(t)),e=Zd(e,Zd(t)),e=rm(e,rm(t)),nm(e,nm(t)))}function BP(e){return om(e)===0&&Zd(e)===0&&rm(e)===0&&nm(e)===0}function Xme(e,t,n,r){return n==="day"&&(n="date"),Math.abs(AO[n](e,void 0,r)-AO[n](t,void 0,r))}function tM(e,t,n){return!n||n==="milliseconds"?Math.abs(+e-+t):Math.round(Math.abs(+Er(e,n)/HP[n]-+Er(t,n)/HP[n]))}var Qme=de.oneOfType([de.string,de.func]);function ege(e,t,n,r,o){var a=typeof r=="function"?r(n,o,e):t.call(e,n,r,o);return Kp(a==null||typeof a=="string","`localizer format(..)` must return a string, null, or undefined"),a}function tge(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function nM(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function nge(e,t){return tM(e,t,"minutes")+nM(e,t)}function rge(e){var t=Er(e,"day");return tM(t,e,"minutes")+nM(t,e)}function oge(e,t){return AC(e,t,"day")}function age(e,t,n){var r=hg(e,t,"minutes");return r?pg(t,n,"minutes"):u0(t,n,"minutes")}function zI(e,t){return Xme(e,t,"day")}function ige(e){var t=e.evtA,n=t.start,r=t.end,o=t.allDay,a=e.evtB,i=a.start,s=a.end,l=a.allDay,u=+Er(n,"day")-+Er(i,"day"),f=zI(n,r),h=zI(i,s);return u||h-f||!!l-!!o||+n-+i||+r-+s}function sge(e){var t=e.event,n=t.start,r=t.end,o=e.range,a=o.start,i=o.end,s=Er(n,"day"),l=Of(s,i,"day"),u=DC(s,r,"minutes"),f=u?u0(r,a,"minutes"):pg(r,a,"minutes");return l&&f}function lge(e,t){return hg(e,t,"day")}function cge(e,t){return BP(e)&&BP(t)}var uge=fr(function e(t){var n=this;dr(this,e),Kp(typeof t.format=="function","date localizer `format(..)` must be a function"),Kp(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||Qme,this.formats=t.formats,this.format=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return ege.apply(void 0,[n,t.format].concat(o))},this.startOfWeek=t.firstOfWeek,this.merge=t.merge||Jme,this.inRange=t.inRange||A6,this.lt=t.lt||AC,this.lte=t.lte||Of,this.gt=t.gt||u0,this.gte=t.gte||pg,this.eq=t.eq||hg,this.neq=t.neq||DC,this.startOf=t.startOf||Er,this.endOf=t.endOf||Eb,this.add=t.add||oi,this.range=t.range||Kme,this.diff=t.diff||tM,this.ceil=t.ceil||$me,this.min=t.min||M6,this.max=t.max||D6,this.minutes=t.minutes||Zd,this.daySpan=t.daySpan||zI,this.firstVisibleDay=t.firstVisibleDay||H8,this.lastVisibleDay=t.lastVisibleDay||B8,this.visibleDays=t.visibleDays||qme,this.getSlotDate=t.getSlotDate||tge,this.getTimezoneOffset=t.getTimezoneOffset||function(r){return r.getTimezoneOffset()},this.getDstOffset=t.getDstOffset||nM,this.getTotalMin=t.getTotalMin||nge,this.getMinutesFromMidnight=t.getMinutesFromMidnight||rge,this.continuesPrior=t.continuesPrior||oge,this.continuesAfter=t.continuesAfter||age,this.sortEvents=t.sortEvents||ige,this.inEventRange=t.inEventRange||sge,this.isSameDate=t.isSameDate||lge,this.startAndEndAreDateOnly=t.startAndEndAreDateOnly||cge,this.segmentOffset=t.browserTZOffset?t.browserTZOffset():0});function dge(e,t,n,r){var o=cn(cn({},e.formats),n);return cn(cn({},e),{},{messages:r,startOfWeek:function(){return e.startOfWeek(t)},format:function(i,s){return e.format(i,o[s]||s,t)}})}var fge={date:"Date",time:"Time",event:"Event",allDay:"All Day",week:"Week",work_week:"Work Week",day:"Day",month:"Month",previous:"Back",next:"Next",yesterday:"Yesterday",tomorrow:"Tomorrow",today:"Today",agenda:"Agenda",noEventsInRange:"There are no events in this range.",showMore:function(t){return"+".concat(t," more")}};function hge(e){return cn(cn({},fge),e)}function pge(e){var t=e.ref,n=e.callback;D.useEffect(function(){var r=function(a){t.current&&!t.current.contains(a.target)&&n()};return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[t,n])}var mge=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],_8=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.style,a=r.className,i=r.event,s=r.selected,l=r.isAllDay,u=r.onSelect,f=r.onDoubleClick,h=r.onKeyPress,p=r.localizer,m=r.continuesPrior,w=r.continuesAfter,b=r.accessors,y=r.getters,S=r.children,x=r.components,E=x.event,C=x.eventWrapper,M=r.slotStart,k=r.slotEnd,O=Qi(r,mge);delete O.resizable;var F=b.title(i),R=b.tooltip(i),B=b.end(i),Y=b.start(i),H=b.allDay(i),Z=l||H||p.diff(Y,p.ceil(B,"day"),"day")>1,W=y.eventProp(i,Y,B,s),$=_.createElement("div",{className:"rbc-event-content",title:R||void 0},E?_.createElement(E,{event:i,continuesPrior:m,continuesAfter:w,title:F,isAllDay:H,localizer:p,slotStart:M,slotEnd:k}):F);return _.createElement(C,Object.assign({},this.props,{type:"date"}),_.createElement("div",Object.assign({},O,{style:cn(cn({},W.style),o),className:er("rbc-event",a,W.className,{"rbc-selected":s,"rbc-event-allday":Z,"rbc-event-continues-prior":m,"rbc-event-continues-after":w}),onClick:function(ne){return u&&u(i,ne)},onDoubleClick:function(ne){return f&&f(i,ne)},onKeyDown:function(ne){return h&&h(i,ne)}}),typeof S=="function"?S($):$))}}]),t}(_.Component);function k0(e,t){return!e||t==null?!1:vg(e,t)}function Y8(e,t){var n=e.right-e.left,r=n/t;return r}function z8(e,t,n,r){var o=Y8(e,r);return n?r-1-Math.floor((t-e.left)/o):Math.floor((t-e.left)/o)}function gge(e,t){var n=t.x,r=t.y;return r>=e.top&&r<=e.bottom&&n>=e.left&&n<=e.right}function vge(e,t,n,r,o){var a=-1,i=-1,s=r-1,l=Y8(t,r),u=z8(t,n.x,o,r),f=t.top<n.y&&t.bottom>n.y,h=t.top<e.y&&t.bottom>e.y,p=e.y>t.bottom,m=t.top>e.y,w=n.top<t.top&&n.bottom>t.bottom;return w&&(a=0,i=s),f&&(m?(a=0,i=u):p&&(a=u,i=s)),h&&(a=i=o?s-Math.floor((e.x-t.left)/l):Math.floor((e.x-t.left)/l),f?u<a?a=u:i=u:e.y<n.y?i=s:a=0),{startIdx:a,endIdx:i}}function yge(e){var t=e.target,n=e.offset,r=e.container,o=e.box,a=Jc(t),i=a.top,s=a.left,l=a.width,u=a.height,f=Jc(r),h=f.top,p=f.left,m=f.width,w=f.height,b=Jc(o),y=b.width,S=b.height,x=h+w,E=p+m,C=i+S,M=s+y,k=n.x,O=n.y,F=C>x?i-S-O:i+O+u,R=M>E?s+k-y+l:s+k;return{topOffset:F,leftOffset:R}}function bge(e){var t=e.containerRef,n=e.accessors,r=e.getters,o=e.selected,a=e.components,i=e.localizer,s=e.position,l=e.show,u=e.events,f=e.slotStart,h=e.slotEnd,p=e.onSelect,m=e.onDoubleClick,w=e.onKeyPress,b=e.handleDragStart,y=e.popperRef,S=e.target,x=e.offset;pge({ref:y,callback:l}),D.useLayoutEffect(function(){var M=yge({target:S,offset:x,container:t.current,box:y.current}),k=M.topOffset,O=M.leftOffset;y.current.style.top="".concat(k,"px"),y.current.style.left="".concat(O,"px")},[x.x,x.y,S]);var E=s.width,C={minWidth:E+E/2};return _.createElement("div",{style:C,className:"rbc-overlay",ref:y},_.createElement("div",{className:"rbc-overlay-header"},i.format(f,"dayHeaderFormat")),u.map(function(M,k){return _.createElement(_8,{key:k,type:"popup",localizer:i,event:M,getters:r,onSelect:p,accessors:n,components:a,onDoubleClick:m,onKeyPress:w,continuesPrior:i.lt(n.end(M),f,"day"),continuesAfter:i.gte(n.start(M),h,"day"),slotStart:f,slotEnd:h,selected:k0(M,o),draggable:!0,onDragStart:function(){return b(M)},onDragEnd:function(){return l()}})}))}var U8=_.forwardRef(function(e,t){return _.createElement(bge,Object.assign({},e,{popperRef:t}))});U8.propTypes={accessors:de.object.isRequired,getters:de.object.isRequired,selected:de.object,components:de.object.isRequired,localizer:de.object.isRequired,position:de.object.isRequired,show:de.func.isRequired,events:de.array.isRequired,slotStart:de.instanceOf(Date).isRequired,slotEnd:de.instanceOf(Date),onSelect:de.func,onDoubleClick:de.func,onKeyPress:de.func,handleDragStart:de.func,style:de.object,offset:de.shape({x:de.number,y:de.number})};function wge(e){var t=e.containerRef,n=e.popupOffset,r=n===void 0?5:n,o=e.overlay,a=e.accessors,i=e.localizer,s=e.components,l=e.getters,u=e.selected,f=e.handleSelectEvent,h=e.handleDoubleClickEvent,p=e.handleKeyPressEvent,m=e.handleDragStart,w=e.onHide,b=e.overlayDisplay,y=D.useRef(null);if(!o.position)return null;var S=r;isNaN(r)||(S={x:r,y:r});var x=o.position,E=o.events,C=o.date,M=o.end;return _.createElement(RC,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:w,target:o.target},function(k){var O=k.props;return _.createElement(U8,Object.assign({},O,{containerRef:t,ref:y,target:o.target,offset:S,accessors:a,getters:l,selected:u,components:s,localizer:i,position:x,show:b,events:E,slotStart:C,slotEnd:M,onSelect:f,onDoubleClick:h,onKeyPress:p,handleDragStart:m}))})}var rM=_.forwardRef(function(e,t){return _.createElement(wge,Object.assign({},e,{containerRef:t}))});rM.propTypes={popupOffset:de.oneOfType([de.number,de.shape({x:de.number,y:de.number})]),overlay:de.shape({position:de.object,events:de.array,date:de.instanceOf(Date),end:de.instanceOf(Date)}),accessors:de.object.isRequired,localizer:de.object.isRequired,components:de.object.isRequired,getters:de.object.isRequired,selected:de.object,handleSelectEvent:de.func,handleDoubleClickEvent:de.func,handleKeyPressEvent:de.func,handleDragStart:de.func,onHide:de.func,overlayDisplay:de.func};function Hr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return gp(n,e,t,{passive:!1})}function Sge(e,t,n){return!e||am(e,document.elementFromPoint(t,n))}function Tge(e,t){var n=t.clientX,r=t.clientY,o=document.elementFromPoint(n,r);return s8(o,".rbc-event",e)}function xge(e,t){var n=t.clientX,r=t.clientY,o=document.elementFromPoint(n,r);return s8(o,".rbc-show-more",e)}function Ob(e,t){return!!Tge(e,t)}function Ige(e,t){return!!xge(e,t)}function ud(e){var t=e;return e.touches&&e.touches.length&&(t=e.touches[0]),{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var _P=5,kge=250,V8=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,o=r===void 0?!1:r,a=n.longPressThreshold,i=a===void 0?250:a,s=n.validContainers,l=s===void 0?[]:s;dr(this,e),this.isDetached=!1,this.container=t,this.globalMouse=!t||o,this.longPressThreshold=i,this.validContainers=l,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=Hr("touchmove",function(){},window),this._removeKeyDownListener=Hr("keydown",this._keyListener),this._removeKeyUpListener=Hr("keyup",this._keyListener),this._removeDropFromOutsideListener=Hr("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=Hr("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return fr(e,[{key:"on",value:function(n,r){var o=this._listeners[n]||(this._listeners[n]=[]);return o.push(r),{remove:function(){var i=o.indexOf(r);i!==-1&&o.splice(i,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];var i,s=this._listeners[n]||[];return s.forEach(function(l){i===void 0&&(i=l.apply(void 0,o))}),i}},{key:"teardown",value:function(){this.isDetached=!0,this._listeners=Object.create(null),this._removeTouchMoveWindowListener&&this._removeTouchMoveWindowListener(),this._removeInitialEventListener&&this._removeInitialEventListener(),this._removeEndListener&&this._removeEndListener(),this._onEscListener&&this._onEscListener(),this._removeMoveListener&&this._removeMoveListener(),this._removeKeyUpListener&&this._removeKeyUpListener(),this._removeKeyDownListener&&this._removeKeyDownListener(),this._removeDropFromOutsideListener&&this._removeDropFromOutsideListener(),this._removeDragOverFromOutsideListener&&this._removeDragOverFromOutsideListener()}},{key:"isSelected",value:function(n){var r=this._selectRect;return!r||!this.selecting?!1:YP(r,uu(n))}},{key:"filter",value:function(n){var r=this._selectRect;return!r||!this.selecting?[]:n.filter(this.isSelected,this)}},{key:"_addLongPressListener",value:function(n,r){var o=this,a=null,i=null,s=null,l=function(p){a=setTimeout(function(){f(),n(p)},o.longPressThreshold),i=Hr("touchmove",function(){return f()}),s=Hr("touchend",function(){return f()})},u=Hr("touchstart",l),f=function(){a&&clearTimeout(a),i&&i(),s&&s(),a=null,i=null,s=null};return r&&l(r),function(){f(),u()}}},{key:"_addInitialEventListener",value:function(){var n=this,r=Hr("mousedown",function(a){n._removeInitialEventListener(),n._handleInitialEvent(a),n._removeInitialEventListener=Hr("mousedown",n._handleInitialEvent)}),o=Hr("touchstart",function(a){n._removeInitialEventListener(),n._removeInitialEventListener=n._addLongPressListener(n._handleInitialEvent,a)});this._removeInitialEventListener=function(){r(),o()}}},{key:"_dropFromOutsideListener",value:function(n){var r=ud(n),o=r.pageX,a=r.pageY,i=r.clientX,s=r.clientY;this.emit("dropFromOutside",{x:o,y:a,clientX:i,clientY:s}),n.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(n){var r=ud(n),o=r.pageX,a=r.pageY,i=r.clientX,s=r.clientY;this.emit("dragOverFromOutside",{x:o,y:a,clientX:i,clientY:s}),n.preventDefault()}},{key:"_handleInitialEvent",value:function(n){if(!this.isDetached){var r=ud(n),o=r.clientX,a=r.clientY,i=r.pageX,s=r.pageY,l=this.container(),u,f;if(!(n.which===3||n.button===2||!Sge(l,o,a))){if(!this.globalMouse&&l&&!am(l,n.target)){var h=Ege(0),p=h.top,m=h.left,w=h.bottom,b=h.right;if(f=uu(l),u=YP({top:f.top-p,left:f.left-m,bottom:f.bottom+w,right:f.right+b},{top:s,left:i}),!u)return}var y=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(n.type),x:i,y:s,clientX:o,clientY:a});if(y!==!1)switch(n.type){case"mousedown":this._removeEndListener=Hr("mouseup",this._handleTerminatingEvent),this._onEscListener=Hr("keydown",this._handleTerminatingEvent),this._removeMoveListener=Hr("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(n),this._removeEndListener=Hr("touchend",this._handleTerminatingEvent),this._removeMoveListener=Hr("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(n){var r=n.target,o=this.validContainers;return!o||!o.length||!r?!0:o.some(function(a){return!!r.closest(a)})}},{key:"_handleTerminatingEvent",value:function(n){var r=ud(n),o=r.pageX,a=r.pageY;if(this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),!!this._initialEventData){var i=!this.container||am(this.container(),n.target),s=this._isWithinValidContainer(n),l=this._selectRect,u=this.isClick(o,a);return this._initialEventData=null,n.key==="Escape"||!s?this.emit("reset"):u&&i?this._handleClickEvent(n):u?this.emit("reset"):this.emit("select",l)}}},{key:"_handleClickEvent",value:function(n){var r=ud(n),o=r.pageX,a=r.pageY,i=r.clientX,s=r.clientY,l=new Date().getTime();return this._lastClickData&&l-this._lastClickData.timestamp<kge?(this._lastClickData=null,this.emit("doubleClick",{x:o,y:a,clientX:i,clientY:s})):(this._lastClickData={timestamp:l},this.emit("click",{x:o,y:a,clientX:i,clientY:s}))}},{key:"_handleMoveEvent",value:function(n){if(!(this._initialEventData===null||this.isDetached)){var r=this._initialEventData,o=r.x,a=r.y,i=ud(n),s=i.pageX,l=i.pageY,u=Math.abs(o-s),f=Math.abs(a-l),h=Math.min(s,o),p=Math.min(l,a),m=this.selecting;this.isClick(s,l)&&!m&&!(u||f)||(this.selecting=!0,this._selectRect={top:p,left:h,x:s,y:l,right:h+u,bottom:p+f},m||this.emit("selectStart",this._initialEventData),this.isClick(s,l)||this.emit("selecting",this._selectRect),n.preventDefault())}}},{key:"_keyListener",value:function(n){this.ctrl=n.metaKey||n.ctrlKey}},{key:"isClick",value:function(n,r){var o=this._initialEventData,a=o.x,i=o.y,s=o.isTouch;return!s&&Math.abs(n-a)<=_P&&Math.abs(r-i)<=_P}}]),e}();function Ege(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return Us(e)!=="object"&&(e={top:e,left:e,right:e,bottom:e}),e}function YP(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=uu(e),o=r.top,a=r.left,i=r.right,s=i===void 0?a:i,l=r.bottom,u=l===void 0?o:l,f=uu(t),h=f.top,p=f.left,m=f.right,w=m===void 0?p:m,b=f.bottom,y=b===void 0?h:b;return!(u-n<h||o+n>y||s-n<p||a+n>w)}function uu(e){if(!e.getBoundingClientRect)return e;var t=e.getBoundingClientRect(),n=t.left+zP("left"),r=t.top+zP("top");return{top:r,left:n,right:(e.offsetWidth||0)+n,bottom:(e.offsetHeight||0)+r}}function zP(e){if(e==="left")return window.pageXOffset||document.body.scrollLeft||0;if(e==="top")return window.pageYOffset||document.body.scrollTop||0}var Cge=function(e){oo(t,e);function t(n,r){var o;return dr(this,t),o=ro(this,t,[n,r]),o.state={selecting:!1},o.containerRef=D.createRef(),o}return fr(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"componentDidUpdate",value:function(r){!r.selectable&&this.props.selectable&&this._selectable(),r.selectable&&!this.props.selectable&&this._teardownSelectable()}},{key:"render",value:function(){var r=this.props,o=r.range,a=r.getNow,i=r.getters,s=r.date,l=r.components.dateCellWrapper,u=r.localizer,f=this.state,h=f.selecting,p=f.startIdx,m=f.endIdx,w=a();return _.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},o.map(function(b,y){var S=h&&y>=p&&y<=m,x=i.dayProp(b),E=x.className,C=x.style;return _.createElement(l,{key:y,value:b,range:o},_.createElement("div",{style:C,className:er("rbc-day-bg",E,S&&"rbc-selected-cell",u.isSameDate(b,w)&&"rbc-today",s&&u.neq(s,b,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,o=this.containerRef.current,a=this._selector=new V8(this.props.container,{longPressThreshold:this.props.longPressThreshold}),i=function(l,u){if(!Ob(o,l)&&!Ige(o,l)){var f=uu(o),h=r.props,p=h.range,m=h.rtl;if(gge(f,l)){var w=z8(f,l.x,m,p.length);r._selectSlot({startIdx:w,endIdx:w,action:u,box:l})}}r._initial={},r.setState({selecting:!1})};a.on("selecting",function(s){var l=r.props,u=l.range,f=l.rtl,h=-1,p=-1;if(r.state.selecting||(In(r.props.onSelectStart,[s]),r._initial={x:s.x,y:s.y}),a.isSelected(o)){var m=uu(o),w=vge(r._initial,m,s,u.length,f);h=w.startIdx,p=w.endIdx}r.setState({selecting:!0,startIdx:h,endIdx:p})}),a.on("beforeSelect",function(s){if(r.props.selectable==="ignoreEvents")return!Ob(r.containerRef.current,s)}),a.on("click",function(s){return i(s,"click")}),a.on("doubleClick",function(s){return i(s,"doubleClick")}),a.on("select",function(s){r._selectSlot(cn(cn({},r.state),{},{action:"select",bounds:s})),r._initial={},r.setState({selecting:!1}),In(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var o=r.endIdx,a=r.startIdx,i=r.action,s=r.bounds,l=r.box;o!==-1&&a!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:a,end:o,action:i,bounds:s,box:l,resourceId:this.props.resourceId})}}]),t}(_.Component),Ui={propTypes:{slotMetrics:de.object.isRequired,selected:de.object,isAllDay:de.bool,accessors:de.object.isRequired,localizer:de.object.isRequired,components:de.object.isRequired,getters:de.object.isRequired,onSelect:de.func,onDoubleClick:de.func,onKeyPress:de.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,n){var r=t.selected;t.isAllDay;var o=t.accessors,a=t.getters,i=t.onSelect,s=t.onDoubleClick,l=t.onKeyPress,u=t.localizer,f=t.slotMetrics,h=t.components,p=t.resizable,m=f.continuesPrior(n),w=f.continuesAfter(n);return _.createElement(_8,{event:n,getters:a,localizer:u,accessors:o,components:h,onSelect:i,onDoubleClick:s,onKeyPress:l,continuesPrior:m,continuesAfter:w,slotStart:f.first,slotEnd:f.last,selected:k0(n,r),resizable:p})},renderSpan:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",a=Math.abs(n)/t*100+"%";return _.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:a,flexBasis:a,maxWidth:a}},o)}},W8=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this,o=this.props,a=o.segments,i=o.slotMetrics.slots,s=o.className,l=1;return _.createElement("div",{className:er(s,"rbc-row")},a.reduce(function(u,f,h){var p=f.event,m=f.left,w=f.right,b=f.span,y="_lvl_"+h,S=m-l,x=Ui.renderEvent(r.props,p);return S&&u.push(Ui.renderSpan(i,S,"".concat(y,"_gap"))),u.push(Ui.renderSpan(i,b,y,x)),l=w+1,u},[]))}}]),t}(_.Component);W8.defaultProps=cn({},Ui.defaultProps);function G8(e){var t=e.dateRange,n=e.unit,r=n===void 0?"day":n,o=e.localizer;return{first:t[0],last:o.add(t[t.length-1],1,r)}}function Mge(e,t,n,r){var o=G8({dateRange:t,localizer:r}),a=o.first,i=o.last,s=r.diff(a,i,"day"),l=r.max(r.startOf(n.start(e),"day"),a),u=r.min(r.ceil(n.end(e),"day"),i),f=Bce(t,function(p){return r.isSameDate(p,l)}),h=r.diff(l,u,"day");return h=Math.min(h,s),h=Math.max(h-r.segmentOffset,1),{event:e,span:h,left:f+1,right:Math.max(f+h,1)}}function Z8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,o,a=[],i=[];for(n=0;n<e.length;n++){for(o=e[n],r=0;r<a.length&&Dge(o,a[r]);r++);r>=t?i.push(o):(a[r]||(a[r]=[])).push(o)}for(n=0;n<a.length;n++)a[n].sort(function(s,l){return s.left-l.left});return{levels:a,extra:i}}function sm(e,t,n,r,o){var a={start:r.start(e),end:r.end(e)},i={start:t,end:n};return o.inEventRange({event:a,range:i})}function Dge(e,t){return t.some(function(n){return n.left<=e.right&&n.right>=e.left})}function Age(e,t,n){var r=Zy(e),o=[],a=[];r.forEach(function(l){var u=t.start(l),f=t.end(l);n.daySpan(u,f)>1?o.push(l):a.push(l)});var i=o.sort(function(l,u){return UI(l,u,t,n)}),s=a.sort(function(l,u){return UI(l,u,t,n)});return[].concat(Zy(i),Zy(s))}function UI(e,t,n,r){var o={start:n.start(e),end:n.end(e),allDay:n.allDay(e)},a={start:n.start(t),end:n.end(t),allDay:n.allDay(t)};return r.sortEvents({evtA:o,evtB:a})}var q8=function(t,n){return t.left<=n&&t.right>=n},UP=function(t,n){return t.filter(function(r){return q8(r,n)}).map(function(r){return r.event})},$8=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){for(var r=this.props,o=r.segments,a=r.slotMetrics.slots,i=Z8(o).levels[0],s=1,l=1,u=[];s<=a;){var f="_lvl_"+s,h=i.filter(function(x){return q8(x,s)})[0]||{},p=h.event,m=h.left,w=h.right,b=h.span;if(!p){s++;continue}var y=Math.max(0,m-l);if(this.canRenderSlotEvent(m,b)){var S=Ui.renderEvent(this.props,p);y&&u.push(Ui.renderSpan(a,y,f+"_gap")),u.push(Ui.renderSpan(a,b,f,S)),l=s=w+1}else y&&u.push(Ui.renderSpan(a,y,f+"_gap")),u.push(Ui.renderSpan(a,1,f,this.renderShowMore(o,s))),l=s+=1}return _.createElement("div",{className:"rbc-row"},u)}},{key:"canRenderSlotEvent",value:function(r,o){var a=this.props.segments;return im(r,r+o).every(function(i){var s=UP(a,i).length;return s===1})}},{key:"renderShowMore",value:function(r,o){var a=this,i=this.props,s=i.localizer,l=i.slotMetrics,u=l.getEventsForSlot(o),f=UP(r,o),h=f.length;return h?_.createElement("button",{type:"button",key:"sm_"+o,className:er("rbc-button-link","rbc-show-more"),onClick:function(m){return a.showMore(o,m)}},s.messages.showMore(h,f,u)):!1}},{key:"showMore",value:function(r,o){o.preventDefault(),o.stopPropagation(),this.props.onShowMore(r,o.target)}}]),t}(_.Component);$8.defaultProps=cn({},Ui.defaultProps);var Nge=function(t){var n=t.children;return _.createElement("div",{className:"rbc-row-content-scroll-container"},n)},Oge=function(t,n){return t.left<=n&&t.right>=n},Pge=function(t,n){return t[0].range===n[0].range&&t[0].events===n[0].events};function K8(){return v8(function(e){for(var t=e.range,n=e.events,r=e.maxRows,o=e.minRows,a=e.accessors,i=e.localizer,s=G8({dateRange:t,localizer:i}),l=s.first,u=s.last,f=n.map(function(b){return Mge(b,t,a,i)}),h=Z8(f,Math.max(r-1,1)),p=h.levels,m=h.extra,w=m.length>0?o-1:o;p.length<w;)p.push([]);return{first:l,last:u,levels:p,extra:m,range:t,slots:t.length,clone:function(y){var S=K8();return S(cn(cn({},e),y))},getDateForSlot:function(y){return t[y]},getSlotForDate:function(y){return t.find(function(S){return i.isSameDate(S,y)})},getEventsForSlot:function(y){return f.filter(function(S){return Oge(S,y)}).map(function(S){return S.event})},continuesPrior:function(y){return i.continuesPrior(a.start(y),l)},continuesAfter:function(y){var S=a.start(y),x=a.end(y);return i.continuesAfter(S,x,u)}}},Pge)}var Pb=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.handleSelectSlot=function(i){var s=n.props,l=s.range,u=s.onSelectSlot;u(l.slice(i.start,i.end+1),i)},n.handleShowMore=function(i,s){var l=n.props,u=l.range,f=l.onShowMore,h=n.slotMetrics(n.props),p=Qte(n.containerRef.current,".rbc-row-bg")[0],m;p&&(m=p.children[i-1]);var w=h.getEventsForSlot(i);f(w,u[i-1],m,i,s)},n.getContainer=function(){var i=n.props.container;return i?i():n.containerRef.current},n.renderHeadingCell=function(i,s){var l=n.props,u=l.renderHeader,f=l.getNow,h=l.localizer;return u({date:i,key:"header_".concat(s),className:er("rbc-date-cell",h.isSameDate(i,f())&&"rbc-now")})},n.renderDummy=function(){var i=n.props,s=i.className,l=i.range,u=i.renderHeader,f=i.showAllEvents;return _.createElement("div",{className:s,ref:n.containerRef},_.createElement("div",{className:er("rbc-row-content",f&&"rbc-row-content-scrollable")},u&&_.createElement("div",{className:"rbc-row",ref:n.headingRowRef},l.map(n.renderHeadingCell)),_.createElement("div",{className:"rbc-row",ref:n.eventRowRef},_.createElement("div",{className:"rbc-row-segment"},_.createElement("div",{className:"rbc-event"},_.createElement("div",{className:"rbc-event-content"}," "))))))},n.containerRef=D.createRef(),n.headingRowRef=D.createRef(),n.eventRowRef=D.createRef(),n.slotMetrics=K8(),n}return fr(t,[{key:"getRowLimit",value:function(){var r,o=E1(this.eventRowRef.current),a=(r=this.headingRowRef)!==null&&r!==void 0&&r.current?E1(this.headingRowRef.current):0,i=E1(this.containerRef.current)-a;return Math.max(Math.floor(i/o),1)}},{key:"render",value:function(){var r=this.props,o=r.date,a=r.rtl,i=r.range,s=r.className,l=r.selected,u=r.selectable,f=r.renderForMeasure,h=r.accessors,p=r.getters,m=r.components,w=r.getNow,b=r.renderHeader,y=r.onSelect,S=r.localizer,x=r.onSelectStart,E=r.onSelectEnd,C=r.onDoubleClick,M=r.onKeyPress,k=r.resourceId,O=r.longPressThreshold,F=r.isAllDay,R=r.resizable,B=r.showAllEvents;if(f)return this.renderDummy();var Y=this.slotMetrics(this.props),H=Y.levels,Z=Y.extra,W=B?Nge:ks,$=m.weekWrapper,V={selected:l,accessors:h,getters:p,localizer:S,components:m,onSelect:y,onDoubleClick:C,onKeyPress:M,resourceId:k,slotMetrics:Y,resizable:R};return _.createElement("div",{className:s,role:"rowgroup",ref:this.containerRef},_.createElement(Cge,{localizer:S,date:o,getNow:w,rtl:a,range:i,selectable:u,container:this.getContainer,getters:p,onSelectStart:x,onSelectEnd:E,onSelectSlot:this.handleSelectSlot,components:m,longPressThreshold:O,resourceId:k}),_.createElement("div",{className:er("rbc-row-content",B&&"rbc-row-content-scrollable"),role:"row"},b&&_.createElement("div",{className:"rbc-row ",ref:this.headingRowRef},i.map(this.renderHeadingCell)),_.createElement(W,null,_.createElement($,Object.assign({isAllDay:F},V,{rtl:this.props.rtl}),H.map(function(ne,Q){return _.createElement(W8,Object.assign({key:Q,segments:ne},V))}),!!Z.length&&_.createElement($8,Object.assign({segments:Z,onShowMore:this.handleShowMore},V))))))}}]),t}(_.Component);Pb.defaultProps={minRows:0,maxRows:1/0};var J8=function(t){var n=t.label;return _.createElement("span",{role:"columnheader","aria-sort":"none"},n)},jge=function(t){var n=t.label,r=t.drilldownView,o=t.onDrillDown;return r?_.createElement("button",{type:"button",className:"rbc-button-link",onClick:o,role:"cell"},n):_.createElement("span",null,n)},Lge=["date","className"],Rge=function(t,n,r,o,a){return t.filter(function(i){return sm(i,n,r,o,a)})},E0=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.getContainer=function(){return n.containerRef.current},n.renderWeek=function(i,s){var l=n.props,u=l.events,f=l.components,h=l.selectable,p=l.getNow,m=l.selected,w=l.date,b=l.localizer,y=l.longPressThreshold,S=l.accessors,x=l.getters,E=l.showAllEvents,C=n.state,M=C.needLimitMeasure,k=C.rowLimit,O=Rge(Zy(u),i[0],i[i.length-1],S,b),F=Age(O,S,b);return _.createElement(Pb,{key:s,ref:s===0?n.slotRowRef:void 0,container:n.getContainer,className:"rbc-month-row",getNow:p,date:w,range:i,events:F,maxRows:E?1/0:k,selected:m,selectable:h,components:f,accessors:S,getters:x,localizer:b,renderHeader:n.readerDateHeading,renderForMeasure:M,onShowMore:n.handleShowMore,onSelect:n.handleSelectEvent,onDoubleClick:n.handleDoubleClickEvent,onKeyPress:n.handleKeyPressEvent,onSelectSlot:n.handleSelectSlot,longPressThreshold:y,rtl:n.props.rtl,resizable:n.props.resizable,showAllEvents:E})},n.readerDateHeading=function(i){var s=i.date,l=i.className,u=Qi(i,Lge),f=n.props,h=f.date,p=f.getDrilldownView,m=f.localizer,w=m.neq(s,h,"month"),b=m.isSameDate(s,h),y=p(s),S=m.format(s,"dateFormat"),x=n.props.components.dateHeader||jge;return _.createElement("div",Object.assign({},u,{className:er(l,w&&"rbc-off-range",b&&"rbc-current"),role:"cell"}),_.createElement(x,{label:S,date:s,drilldownView:y,isOffRange:w,onDrillDown:function(C){return n.handleHeadingClick(s,y,C)}}))},n.handleSelectSlot=function(i,s){n._pendingSelection=n._pendingSelection.concat(i),clearTimeout(n._selectTimer),n._selectTimer=setTimeout(function(){return n.selectDates(s)})},n.handleHeadingClick=function(i,s,l){l.preventDefault(),n.clearSelection(),In(n.props.onDrillDown,[i,s])},n.handleSelectEvent=function(){n.clearSelection();for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onSelectEvent,s)},n.handleDoubleClickEvent=function(){n.clearSelection();for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onDoubleClickEvent,s)},n.handleKeyPressEvent=function(){n.clearSelection();for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onKeyPressEvent,s)},n.handleShowMore=function(i,s,l,u,f){var h=n.props,p=h.popup,m=h.onDrillDown,w=h.onShowMore,b=h.getDrilldownView,y=h.doShowMoreDrillDown;if(n.clearSelection(),p){var S=U6(l,n.containerRef.current);n.setState({overlay:{date:s,events:i,position:S,target:f}})}else y&&In(m,[s,b(s)||eo.DAY]);In(w,[i,s,u])},n.overlayDisplay=function(){n.setState({overlay:null})},n.state={rowLimit:5,needLimitMeasure:!0,date:null},n.containerRef=D.createRef(),n.slotRowRef=D.createRef(),n._bgRows=[],n._pendingSelection=[],n}return fr(t,[{key:"componentDidMount",value:function(){var r=this,o;this.state.needLimitMeasure&&this.measureRowLimit(this.props),window.addEventListener("resize",this._resizeListener=function(){o||V6(function(){o=!1,r.setState({needLimitMeasure:!0})})},!1)}},{key:"componentDidUpdate",value:function(){this.state.needLimitMeasure&&this.measureRowLimit(this.props)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._resizeListener,!1)}},{key:"render",value:function(){var r=this.props,o=r.date,a=r.localizer,i=r.className,s=a.visibleDays(o,a),l=Fte(s,7);return this._weekCount=l.length,_.createElement("div",{className:er("rbc-month-view",i),role:"table","aria-label":"Month View",ref:this.containerRef},_.createElement("div",{className:"rbc-row rbc-month-header",role:"row"},this.renderHeaders(l[0])),l.map(this.renderWeek),this.props.popup&&this.renderOverlay())}},{key:"renderHeaders",value:function(r){var o=this.props,a=o.localizer,i=o.components,s=r[0],l=r[r.length-1],u=i.header||J8;return a.range(s,l,"day").map(function(f,h){return _.createElement("div",{key:"header_"+h,className:"rbc-header"},_.createElement(u,{date:f,localizer:a,label:a.format(f,"weekdayFormat")}))})}},{key:"renderOverlay",value:function(){var r,o,a=this,i=(r=(o=this.state)===null||o===void 0?void 0:o.overlay)!==null&&r!==void 0?r:{},s=this.props,l=s.accessors,u=s.localizer,f=s.components,h=s.getters,p=s.selected,m=s.popupOffset,w=s.handleDragStart,b=function(){return a.setState({overlay:null})};return _.createElement(rM,{overlay:i,accessors:l,localizer:u,components:f,getters:h,selected:p,popupOffset:m,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:w,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:b})}},{key:"measureRowLimit",value:function(){this.setState({needLimitMeasure:!1,rowLimit:this.slotRowRef.current.getRowLimit()})}},{key:"selectDates",value:function(r){var o=this._pendingSelection.slice();this._pendingSelection=[],o.sort(function(s,l){return+s-+l});var a=new Date(o[0]),i=new Date(o[o.length-1]);i.setDate(o[o.length-1].getDate()+1),In(this.props.onSelectSlot,{slots:o,start:a,end:i,action:r.action,bounds:r.bounds,box:r.box})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}}],[{key:"getDerivedStateFromProps",value:function(r,o){var a=r.date,i=r.localizer;return{date:a,needLimitMeasure:i.neq(a,o.date,"month")}}}]),t}(_.Component);E0.range=function(e,t){var n=t.localizer,r=n.firstVisibleDay(e,n),o=n.lastVisibleDay(e,n);return{start:r,end:o}};E0.navigate=function(e,t,n){var r=n.localizer;switch(t){case Oo.PREVIOUS:return r.add(e,-1,"month");case Oo.NEXT:return r.add(e,1,"month");default:return e}};E0.title=function(e,t){var n=t.localizer;return n.format(e,"monthHeaderFormat")};var VP=function(t){var n=t.min,r=t.max,o=t.step,a=t.slots,i=t.localizer;return"".concat(+i.startOf(n,"minutes"))+"".concat(+i.startOf(r,"minutes"))+"".concat(o,"-").concat(a)};function oM(e){for(var t=e.min,n=e.max,r=e.step,o=e.timeslots,a=e.localizer,i=VP({step:r,localizer:a}),s=1+a.getTotalMin(t,n),l=a.getMinutesFromMidnight(t),u=Math.ceil((s-1)/(r*o)),f=u*o,h=new Array(u),p=new Array(f),m=0;m<u;m++){h[m]=new Array(o);for(var w=0;w<o;w++){var b=m*o+w,y=b*r;p[b]=h[m][w]=a.getSlotDate(t,l,y)}}var S=p.length*r;p.push(a.getSlotDate(t,l,S));function x(E){var C=a.diff(t,E,"minutes")+a.getDstOffset(t,E);return Math.min(C,s)}return{groups:h,update:function(C){return VP(C)!==i?oM(C):this},dateIsInGroup:function(C,M){var k=h[M+1];return a.inRange(C,h[M][0],k?k[0]:n,"minutes")},nextSlot:function(C){var M=p[Math.min(p.indexOf(C)+1,p.length-1)];return M===C&&(M=a.add(C,r,"minutes")),M},closestSlotToPosition:function(C){var M=Math.min(p.length-1,Math.max(0,Math.floor(C*f)));return p[M]},closestSlotFromPoint:function(C,M){var k=Math.abs(M.top-M.bottom);return this.closestSlotToPosition((C.y-M.top)/k)},closestSlotFromDate:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(a.lt(C,t,"minutes"))return p[0];if(a.gt(C,n,"minutes"))return p[p.length-1];var k=a.diff(t,C,"minutes");return p[(k-k%r)/r+M]},startsBeforeDay:function(C){return a.lt(C,t,"day")},startsAfterDay:function(C){return a.gt(C,n,"day")},startsBefore:function(C){return a.lt(a.merge(t,C),t,"minutes")},startsAfter:function(C){return a.gt(a.merge(n,C),n,"minutes")},getRange:function(C,M,k,O){k||(C=a.min(n,a.max(t,C))),O||(M=a.min(n,a.max(t,M)));var F=x(C),R=x(M),B=R>r*f&&!a.eq(n,M)?(F-r)/(r*f)*100:F/(r*f)*100;return{top:B,height:R/(r*f)*100-B,start:x(C),startDate:C,end:x(M),endDate:M}},getCurrentTimePosition:function(C){var M=x(C),k=M/(r*f)*100;return k}}}var Fge=function(){function e(t,n){var r=n.accessors,o=n.slotMetrics;dr(this,e);var a=o.getRange(r.start(t),r.end(t)),i=a.start,s=a.startDate,l=a.end,u=a.endDate,f=a.top,h=a.height;this.start=i,this.end=l,this.startMs=+s,this.endMs=+u,this.top=f,this.height=h,this.data=t}return fr(e,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(o,a){return Math.max(o,a.leaves.length+1)},0)+1;return 100/n}if(this.leaves){var r=100-this.container._width;return r/(this.leaves.length+1)}return this.row._width}},{key:"width",get:function(){var n=this._width,r=Math.min(100,this._width*1.7);if(this.rows)return r;if(this.leaves)return this.leaves.length>0?r:n;var o=this.row.leaves,a=o.indexOf(this);return a===o.length-1?n:r}},{key:"xOffset",get:function(){if(this.rows)return 0;if(this.leaves)return this.container._width;var n=this.row,r=n.leaves,o=n.xOffset,a=n._width,i=r.indexOf(this)+1;return o+i*a}}]),e}();function Hge(e,t,n){return Math.abs(t.start-e.start)<n||t.start>e.start&&t.start<e.end}function Bge(e){for(var t=T0(e,["startMs",function(s){return-s.endMs}]),n=[];t.length>0;){var r=t.shift();n.push(r);for(var o=0;o<t.length;o++){var a=t[o];if(!(r.endMs>a.startMs)){if(o>0){var i=t.splice(o,1)[0];n.push(i)}break}}}return n}function X8(e){for(var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,o=e.accessors,a=t.map(function(f){return new Fge(f,{slotMetrics:r,accessors:o})}),i=Bge(a),s=[],l=function(){var h=i[u],p=s.find(function(b){return b.end>h.start||Math.abs(h.start-b.start)<n});if(!p)return h.rows=[],s.push(h),1;h.container=p;for(var m=null,w=p.rows.length-1;!m&&w>=0;w--)Hge(p.rows[w],h,n)&&(m=p.rows[w]);m?(m.leaves.push(h),h.row=m):(h.leaves=[],p.rows.push(h))},u=0;u<i.length;u++)l();return i.map(function(f){return{event:f.data,style:{top:f.top,height:f.height,width:f.width,xOffset:Math.max(0,f.xOffset)}}})}function Q8(e,t,n){for(var r=0;r<e.friends.length;++r)if(!(n.indexOf(e.friends[r])>-1)){t=t>e.friends[r].idx?t:e.friends[r].idx,n.push(e.friends[r]);var o=Q8(e.friends[r],t,n);t=t>o?t:o}return t}function _ge(e){var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,o=e.accessors,a=X8({events:t,minimumStartDifference:n,slotMetrics:r,accessors:o});a.sort(function($,V){return $=$.style,V=V.style,$.top!==V.top?$.top>V.top?1:-1:$.height!==V.height?$.top+$.height<V.top+V.height?1:-1:0});for(var i=0;i<a.length;++i)a[i].friends=[],delete a[i].style.left,delete a[i].style.left,delete a[i].idx,delete a[i].size;for(var s=0;s<a.length-1;++s)for(var l=a[s],u=l.style.top,f=l.style.top+l.style.height,h=s+1;h<a.length;++h){var p=a[h],m=p.style.top,w=p.style.top+p.style.height;(m>=u&&w<=f||w>u&&w<=f||m>=u&&m<f)&&(l.friends.push(p),p.friends.push(l))}for(var b=0;b<a.length;++b){for(var y=a[b],S=[],x=0;x<100;++x)S.push(1);for(var E=0;E<y.friends.length;++E)y.friends[E].idx!==void 0&&(S[y.friends[E].idx]=0);y.idx=S.indexOf(1)}for(var C=0;C<a.length;++C){var M=0;if(!a[C].size){var k=[],O=Q8(a[C],0,k);M=100/(O+1),a[C].size=M;for(var F=0;F<k.length;++F)k[F].size=M}}for(var R=0;R<a.length;++R){var B=a[R];B.style.left=B.idx*B.size;for(var Y=0,H=0;H<B.friends.length;++H){var Z=B.friends[H].idx;Y=Y>Z?Y:Z}Y<=B.idx&&(B.size=100-B.idx*B.size);var W=B.idx===0?0:3;B.style.width="calc(".concat(B.size,"% - ").concat(W,"px)"),B.style.height="calc(".concat(B.style.height,"% - 2px)"),B.style.xOffset="calc(".concat(B.style.left,"% + ").concat(W,"px)")}return a}var WP={overlap:X8,"no-overlap":_ge};function Yge(e){return!!(e&&e.constructor&&e.call&&e.apply)}function zge(e){e.events,e.minimumStartDifference,e.slotMetrics,e.accessors;var t=e.dayLayoutAlgorithm,n=t;return t in WP&&(n=WP[t]),Yge(n)?n.apply(this,arguments):[]}var eH=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.renderSlot,a=r.resource,i=r.group,s=r.getters,l=r.components,u=l===void 0?{}:l,f=u.timeSlotWrapper,h=f===void 0?ks:f,p=s?s.slotGroupProp(i):{};return _.createElement("div",Object.assign({className:"rbc-timeslot-group"},p),i.map(function(m,w){var b=s?s.slotProp(m,a):{};return _.createElement(h,{key:w,value:m,resource:a},_.createElement("div",Object.assign({},b,{className:er("rbc-time-slot",b.className)}),o&&o(m,w)))}))}}]),t}(D.Component);function ry(e){return typeof e=="string"?e:e+"%"}function Uge(e){var t=e.style,n=e.className,r=e.event,o=e.accessors,a=e.rtl,i=e.selected,s=e.label,l=e.continuesPrior,u=e.continuesAfter,f=e.getters,h=e.onClick,p=e.onDoubleClick,m=e.isBackgroundEvent,w=e.onKeyPress,b=e.components,y=b.event,S=b.eventWrapper,x=o.title(r),E=o.tooltip(r),C=o.end(r),M=o.start(r),k=f.eventProp(r,M,C,i),O=[_.createElement("div",{key:"1",className:"rbc-event-label"},s),_.createElement("div",{key:"2",className:"rbc-event-content"},y?_.createElement(y,{event:r,title:x}):x)],F=t.height,R=t.top,B=t.width,Y=t.xOffset,H=cn(cn({},k.style),{},_c({top:ry(R),height:ry(F),width:ry(B)},a?"right":"left",ry(Y)));return _.createElement(S,Object.assign({type:"time"},e),_.createElement("div",{role:"button",tabIndex:0,onClick:h,onDoubleClick:p,style:H,onKeyDown:w,title:E?(typeof s=="string"?s+": ":"")+E:void 0,className:er(m?"rbc-background-event":"rbc-event",n,k.className,{"rbc-selected":i,"rbc-event-continues-earlier":l,"rbc-event-continues-later":u})},O))}var Vge=function(t){var n=t.children,r=t.className,o=t.style,a=t.innerRef;return _.createElement("div",{className:r,style:o,ref:a},n)},Wge=_.forwardRef(function(e,t){return _.createElement(Vge,Object.assign({},e,{innerRef:t}))}),Gge=["dayProp"],Zge=["eventContainerWrapper"],tH=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.state={selecting:!1,timeIndicatorPosition:null},n.intervalTriggered=!1,n.renderEvents=function(i){var s=i.events,l=i.isBackgroundEvent,u=n.props,f=u.rtl,h=u.selected,p=u.accessors,m=u.localizer,w=u.getters,b=u.components,y=u.step,S=u.timeslots,x=u.dayLayoutAlgorithm,E=u.resizable,C=y6(n),M=C.slotMetrics,k=m.messages,O=zge({events:s,accessors:p,slotMetrics:M,minimumStartDifference:Math.ceil(y*S/2),dayLayoutAlgorithm:x});return O.map(function(F,R){var B=F.event,Y=F.style,H=p.end(B),Z=p.start(B),W="eventTimeRangeFormat",$,V=M.startsBeforeDay(Z),ne=M.startsAfterDay(H);V?W="eventTimeRangeEndFormat":ne&&(W="eventTimeRangeStartFormat"),V&&ne?$=k.allDay:$=m.format({start:Z,end:H},W);var Q=V||M.startsBefore(Z),te=ne||M.startsAfter(H);return _.createElement(Uge,{style:Y,event:B,label:$,key:"evt_"+R,getters:w,rtl:f,components:b,continuesPrior:Q,continuesAfter:te,accessors:p,resource:n.props.resource,selected:k0(B,h),onClick:function(X){return n._select(cn(cn(cn({},B),n.props.resource&&{sourceResource:n.props.resource}),l&&{isBackgroundEvent:!0}),X)},onDoubleClick:function(X){return n._doubleClick(B,X)},isBackgroundEvent:l,onKeyPress:function(X){return n._keyPress(B,X)},resizable:E})})},n._selectable=function(){var i=n.containerRef.current,s=n.props,l=s.longPressThreshold,u=s.localizer,f=n._selector=new V8(function(){return i},{longPressThreshold:l}),h=function(b){var y=n.props.onSelecting,S=n.state||{},x=p(b),E=x.startDate,C=x.endDate;y&&(u.eq(S.startDate,E,"minutes")&&u.eq(S.endDate,C,"minutes")||y({start:E,end:C,resourceId:n.props.resource})===!1)||(n.state.start!==x.start||n.state.end!==x.end||n.state.selecting!==x.selecting)&&n.setState(x)},p=function(b){var y=n.slotMetrics.closestSlotFromPoint(b,uu(i));n.state.selecting||(n._initialSlot=y);var S=n._initialSlot;u.lte(S,y)?y=n.slotMetrics.nextSlot(y):u.gt(S,y)&&(S=n.slotMetrics.nextSlot(S));var x=n.slotMetrics.getRange(u.min(S,y),u.max(S,y));return cn(cn({},x),{},{selecting:!0,top:"".concat(x.top,"%"),height:"".concat(x.height,"%")})},m=function(b,y){if(!Ob(n.containerRef.current,b)){var S=p(b),x=S.startDate,E=S.endDate;n._selectSlot({startDate:x,endDate:E,action:y,box:b})}n.setState({selecting:!1})};f.on("selecting",h),f.on("selectStart",h),f.on("beforeSelect",function(w){if(n.props.selectable==="ignoreEvents")return!Ob(n.containerRef.current,w)}),f.on("click",function(w){return m(w,"click")}),f.on("doubleClick",function(w){return m(w,"doubleClick")}),f.on("select",function(w){n.state.selecting&&(n._selectSlot(cn(cn({},n.state),{},{action:"select",bounds:w})),n.setState({selecting:!1}))}),f.on("reset",function(){n.state.selecting&&n.setState({selecting:!1})})},n._teardownSelectable=function(){n._selector&&(n._selector.teardown(),n._selector=null)},n._selectSlot=function(i){for(var s=i.startDate,l=i.endDate,u=i.action,f=i.bounds,h=i.box,p=s,m=[];n.props.localizer.lte(p,l);)m.push(p),p=new Date(+p+n.props.step*60*1e3);In(n.props.onSelectSlot,{slots:m,start:s,end:l,resourceId:n.props.resource,action:u,bounds:f,box:h})},n._select=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onSelectEvent,s)},n._doubleClick=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onDoubleClickEvent,s)},n._keyPress=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onKeyPressEvent,s)},n.slotMetrics=oM(n.props),n.containerRef=D.createRef(),n}return fr(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable(),this.props.isNow&&this.setTimeIndicatorPositionUpdateInterval()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable(),this.clearTimeIndicatorInterval()}},{key:"componentDidUpdate",value:function(r,o){this.props.selectable&&!r.selectable&&this._selectable(),!this.props.selectable&&r.selectable&&this._teardownSelectable(),this.slotMetrics=this.slotMetrics.update(this.props);var a=this.props,i=a.getNow,s=a.isNow,l=a.localizer,u=a.date,f=a.min,h=a.max,p=l.neq(r.getNow(),i(),"minutes");if(r.isNow!==s||p){if(this.clearTimeIndicatorInterval(),s){var m=!p&&l.eq(r.date,u,"minutes")&&o.timeIndicatorPosition===this.state.timeIndicatorPosition;this.setTimeIndicatorPositionUpdateInterval(m)}}else s&&(l.neq(r.min,f,"minutes")||l.neq(r.max,h,"minutes"))&&this.positionTimeIndicator()}},{key:"setTimeIndicatorPositionUpdateInterval",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!o&&this.positionTimeIndicator(),this._timeIndicatorTimeout=window.setTimeout(function(){r.intervalTriggered=!0,r.positionTimeIndicator(),r.setTimeIndicatorPositionUpdateInterval()},6e4)}},{key:"clearTimeIndicatorInterval",value:function(){this.intervalTriggered=!1,window.clearTimeout(this._timeIndicatorTimeout)}},{key:"positionTimeIndicator",value:function(){var r=this.props,o=r.min,a=r.max,i=r.getNow,s=i();if(s>=o&&s<=a){var l=this.slotMetrics.getCurrentTimePosition(s);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:l})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,o=r.date,a=r.max,i=r.rtl,s=r.isNow,l=r.resource,u=r.accessors,f=r.localizer,h=r.getters,p=h.dayProp,m=Qi(h,Gge),w=r.components,b=w.eventContainerWrapper,y=Qi(w,Zge),S=this.slotMetrics,x=this.state,E=x.selecting,C=x.top,M=x.height,k=x.startDate,O=x.endDate,F={start:k,end:O},R=p(a),B=R.className,Y=R.style,H=y.dayColumnWrapper||Wge;return _.createElement(H,{ref:this.containerRef,date:o,style:Y,className:er(B,"rbc-day-slot","rbc-time-column",s&&"rbc-now",s&&"rbc-today",E&&"rbc-slot-selecting"),slotMetrics:S},S.groups.map(function(Z,W){return _.createElement(eH,{key:W,group:Z,resource:l,getters:m,components:y})}),_.createElement(b,{localizer:f,resource:l,accessors:u,getters:m,components:y,slotMetrics:S},_.createElement("div",{className:er("rbc-events-container",i&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),E&&_.createElement("div",{className:"rbc-slot-selection",style:{top:C,height:M}},_.createElement("span",null,f.format(F,"selectRangeFormat"))),s&&this.intervalTriggered&&_.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),t}(_.Component);tH.defaultProps={dragThroughEvents:!0,timeslots:2};function qge(e){var t=e.min,n=e.max,r=e.localizer;return r.getTimezoneOffset(t)!==r.getTimezoneOffset(n)?{start:r.add(t,-1,"day"),end:r.add(n,-1,"day")}:{start:t,end:n}}var $ge=function(t){var n=t.min,r=t.max,o=t.timeslots,a=t.step,i=t.localizer,s=t.getNow,l=t.resource,u=t.components,f=t.getters,h=t.gutterRef,p=u.timeGutterWrapper,m=D.useMemo(function(){return qge({min:n,max:r,localizer:i})},[n?.toISOString(),r?.toISOString(),i]),w=m.start,b=m.end,y=D.useState(oM({min:w,max:b,timeslots:o,step:a,localizer:i})),S=Es(y,2),x=S[0],E=S[1];D.useEffect(function(){x&&E(x.update({min:w,max:b,timeslots:o,step:a,localizer:i}))},[w?.toISOString(),b?.toISOString(),o,a]);var C=D.useCallback(function(M,k){if(k)return null;var O=x.dateIsInGroup(s(),k);return _.createElement("span",{className:er("rbc-label",O&&"rbc-now")},i.format(M,"timeGutterFormat"))},[x,i,s]);return _.createElement(p,{slotMetrics:x},_.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:h},x.groups.map(function(M,k){return _.createElement(eH,{key:k,group:M,resource:l,components:u,renderSlot:C,getters:f})})))},Kge=_.forwardRef(function(e,t){return _.createElement($ge,Object.assign({gutterRef:t},e))}),Jge=function(t){var n=t.label;return _.createElement(_.Fragment,null,n)},Xge=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.handleHeaderClick=function(i,s,l){l.preventDefault(),In(n.props.onDrillDown,[i,s])},n.renderRow=function(i){var s=n.props,l=s.events,u=s.rtl,f=s.selectable,h=s.getNow,p=s.range,m=s.getters,w=s.localizer,b=s.accessors,y=s.components,S=s.resizable,x=b.resourceId(i),E=i?l.filter(function(C){return b.resource(C)===x}):l;return _.createElement(Pb,{isAllDay:!0,rtl:u,getNow:h,minRows:2,maxRows:n.props.allDayMaxRows+1,range:p,events:E,resourceId:x,className:"rbc-allday-cell",selectable:f,selected:n.props.selected,components:y,accessors:b,getters:m,localizer:w,onSelect:n.props.onSelectEvent,onShowMore:n.props.onShowMore,onDoubleClick:n.props.onDoubleClickEvent,onKeyPress:n.props.onKeyPressEvent,onSelectSlot:n.props.onSelectSlot,longPressThreshold:n.props.longPressThreshold,resizable:S})},n}return fr(t,[{key:"renderHeaderCells",value:function(r){var o=this,a=this.props,i=a.localizer,s=a.getDrilldownView,l=a.getNow,u=a.getters.dayProp,f=a.components.header,h=f===void 0?J8:f,p=l();return r.map(function(m,w){var b=s(m),y=i.format(m,"dayFormat"),S=u(m),x=S.className,E=S.style,C=_.createElement(h,{date:m,label:y,localizer:i});return _.createElement("div",{key:w,style:E,className:er("rbc-header",x,i.isSameDate(m,p)&&"rbc-today")},b?_.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(k){return o.handleHeaderClick(m,b,k)}},C):_.createElement("span",null,C))})}},{key:"render",value:function(){var r=this,o=this.props,a=o.width,i=o.rtl,s=o.resources,l=o.range,u=o.events,f=o.getNow,h=o.accessors,p=o.selectable,m=o.components,w=o.getters,b=o.scrollRef,y=o.localizer,S=o.isOverflowing,x=o.components,E=x.timeGutterHeader,C=x.resourceHeader,M=C===void 0?Jge:C,k=o.resizable,O={};S&&(O[i?"marginLeft":"marginRight"]="".concat(W6()-1,"px"));var F=s.groupEvents(u);return _.createElement("div",{style:O,ref:b,className:er("rbc-time-header",S&&"rbc-overflowing")},_.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:a,minWidth:a,maxWidth:a}},E&&_.createElement(E,null)),s.map(function(R,B){var Y=Es(R,2),H=Y[0],Z=Y[1];return _.createElement("div",{className:"rbc-time-header-content",key:H||B},Z&&_.createElement("div",{className:"rbc-row rbc-row-resource",key:"resource_".concat(B)},_.createElement("div",{className:"rbc-header"},_.createElement(M,{index:B,label:h.resourceTitle(Z),resource:Z}))),_.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(l.length<=1?" rbc-time-header-cell-single-day":"")},r.renderHeaderCells(l)),_.createElement(Pb,{isAllDay:!0,rtl:i,getNow:f,minRows:2,maxRows:r.props.allDayMaxRows+1,range:l,events:F.get(H)||[],resourceId:Z&&H,className:"rbc-allday-cell",selectable:p,selected:r.props.selected,components:m,accessors:h,getters:w,localizer:y,onSelect:r.props.onSelectEvent,onShowMore:r.props.onShowMore,onDoubleClick:r.props.onDoubleClickEvent,onKeyDown:r.props.onKeyPressEvent,onSelectSlot:r.props.onSelectSlot,longPressThreshold:r.props.longPressThreshold,resizable:k}))}))}}]),t}(_.Component),D1={};function Qge(e,t){return{map:function(r){return e?e.map(function(o,a){return r([t.resourceId(o),o],a)}):[r([D1,null],0)]},groupEvents:function(r){var o=new Map;return e?(r.forEach(function(a){var i=t.resource(a)||D1;if(Array.isArray(i))i.forEach(function(l){var u=o.get(l)||[];u.push(a),o.set(l,u)});else{var s=o.get(i)||[];s.push(a),o.set(i,s)}}),o):(o.set(D1,r),o)}}}var Gf=function(e){oo(t,e);function t(n){var r;return dr(this,t),r=ro(this,t,[n]),r.handleScroll=function(o){r.scrollRef.current&&(r.scrollRef.current.scrollLeft=o.target.scrollLeft)},r.handleResize=function(){BO(r.rafHandle),r.rafHandle=V6(r.checkOverflow)},r.handleKeyPressEvent=function(){r.clearSelection();for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];In(r.props.onKeyPressEvent,a)},r.handleSelectEvent=function(){r.clearSelection();for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];In(r.props.onSelectEvent,a)},r.handleDoubleClickEvent=function(){r.clearSelection();for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];In(r.props.onDoubleClickEvent,a)},r.handleShowMore=function(o,a,i,s,l){var u=r.props,f=u.popup,h=u.onDrillDown,p=u.onShowMore,m=u.getDrilldownView,w=u.doShowMoreDrillDown;if(r.clearSelection(),f){var b=U6(i,r.containerRef.current);r.setState({overlay:{date:a,events:o,position:cn(cn({},b),{},{width:"200px"}),target:l}})}else w&&In(h,[a,m(a)||eo.DAY]);In(p,[o,a,s])},r.handleSelectAllDaySlot=function(o,a){var i=r.props.onSelectSlot,s=new Date(o[0]),l=new Date(o[o.length-1]);l.setDate(o[o.length-1].getDate()+1),In(i,{slots:o,start:s,end:l,action:a.action,resourceId:a.resourceId})},r.overlayDisplay=function(){r.setState({overlay:null})},r.checkOverflow=function(){if(!r._updatingOverflow){var o=r.contentRef.current;if(o!=null&&o.scrollHeight){var a=o.scrollHeight>o.clientHeight;r.state.isOverflowing!==a&&(r._updatingOverflow=!0,r.setState({isOverflowing:a},function(){r._updatingOverflow=!1}))}}},r.memoizedResources=v8(function(o,a){return Qge(o,a)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=_.createRef(),r.contentRef=_.createRef(),r.containerRef=_.createRef(),r._scrollRatio=null,r.gutterRef=D.createRef(),r}return fr(t,[{key:"getSnapshotBeforeUpdate",value:function(){return this.checkOverflow(),null}},{key:"componentDidMount",value:function(){this.props.width==null&&this.measureGutter(),this.calculateScroll(),this.applyScroll(),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),BO(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,o,a,i){var s=this,l=this.props,u=l.min,f=l.max,h=l.components,p=l.accessors,m=l.localizer,w=l.dayLayoutAlgorithm,b=this.memoizedResources(this.props.resources,p),y=b.groupEvents(o),S=b.groupEvents(a);return b.map(function(x,E){var C=Es(x,2),M=C[0],k=C[1];return r.map(function(O,F){var R=(y.get(M)||[]).filter(function(Y){return m.inRange(O,p.start(Y),p.end(Y),"day")}),B=(S.get(M)||[]).filter(function(Y){return m.inRange(O,p.start(Y),p.end(Y),"day")});return _.createElement(tH,Object.assign({},s.props,{localizer:m,min:m.merge(O,u),max:m.merge(O,f),resource:k&&M,components:h,isNow:m.isSameDate(O,i),key:E+"-"+F,date:O,events:R,backgroundEvents:B,dayLayoutAlgorithm:w}))})})}},{key:"render",value:function(){var r,o=this.props,a=o.events,i=o.backgroundEvents,s=o.range,l=o.width,u=o.rtl,f=o.selected,h=o.getNow,p=o.resources,m=o.components,w=o.accessors,b=o.getters,y=o.localizer,S=o.min,x=o.max,E=o.showMultiDayTimes,C=o.longPressThreshold,M=o.resizable;l=l||this.state.gutterWidth;var k=s[0],O=s[s.length-1];this.slots=s.length;var F=[],R=[],B=[];return a.forEach(function(Y){if(sm(Y,k,O,w,y)){var H=w.start(Y),Z=w.end(Y);w.allDay(Y)||y.startAndEndAreDateOnly(H,Z)||!E&&!y.isSameDate(H,Z)?F.push(Y):R.push(Y)}}),i.forEach(function(Y){sm(Y,k,O,w,y)&&B.push(Y)}),F.sort(function(Y,H){return UI(Y,H,w,y)}),_.createElement("div",{className:er("rbc-time-view",p&&"rbc-time-view-resources"),ref:this.containerRef},_.createElement(Xge,{range:s,events:F,width:l,rtl:u,getNow:h,localizer:y,selected:f,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(p,w),selectable:this.props.selectable,accessors:w,getters:b,components:m,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:C,onSelectSlot:this.handleSelectAllDaySlot,onSelectEvent:this.handleSelectEvent,onShowMore:this.handleShowMore,onDoubleClickEvent:this.props.onDoubleClickEvent,onKeyPressEvent:this.props.onKeyPressEvent,onDrillDown:this.props.onDrillDown,getDrilldownView:this.props.getDrilldownView,resizable:M}),this.props.popup&&this.renderOverlay(),_.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},_.createElement(Kge,{date:k,ref:this.gutterRef,localizer:y,min:y.merge(k,S),max:y.merge(k,x),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:m,className:"rbc-time-gutter",getters:b}),this.renderEvents(s,R,B,h())))}},{key:"renderOverlay",value:function(){var r,o,a=this,i=(r=(o=this.state)===null||o===void 0?void 0:o.overlay)!==null&&r!==void 0?r:{},s=this.props,l=s.accessors,u=s.localizer,f=s.components,h=s.getters,p=s.selected,m=s.popupOffset,w=s.handleDragStart,b=function(){return a.setState({overlay:null})};return _.createElement(rM,{overlay:i,accessors:l,localizer:u,components:f,getters:h,selected:p,popupOffset:m,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:w,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:b})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}},{key:"measureGutter",value:function(){var r=this;this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest),this.measureGutterAnimationFrameRequest=window.requestAnimationFrame(function(){var o,a=(o=r.gutterRef)!==null&&o!==void 0&&o.current?YI(r.gutterRef.current):void 0;a&&r.state.gutterWidth!==a&&r.setState({gutterWidth:a})})}},{key:"applyScroll",value:function(){if(this._scrollRatio!=null&&this.props.enableAutoScroll===!0){var r=this.contentRef.current;r.scrollTop=r.scrollHeight*this._scrollRatio,this._scrollRatio=null}}},{key:"calculateScroll",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,o=r.min,a=r.max,i=r.scrollToTime,s=r.localizer,l=s.diff(s.merge(i,o),i,"milliseconds"),u=s.diff(o,a,"milliseconds");this._scrollRatio=l/u}}]),t}(D.Component);Gf.defaultProps={step:30,timeslots:2};var eve=["date","localizer","min","max","scrollToTime","enableAutoScroll"],C0=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.date,a=r.localizer,i=r.min,s=i===void 0?a.startOf(new Date,"day"):i,l=r.max,u=l===void 0?a.endOf(new Date,"day"):l,f=r.scrollToTime,h=f===void 0?a.startOf(new Date,"day"):f,p=r.enableAutoScroll,m=p===void 0?!0:p,w=Qi(r,eve),b=t.range(o,{localizer:a});return _.createElement(Gf,Object.assign({},w,{range:b,eventOffset:10,localizer:a,min:s,max:u,scrollToTime:h,enableAutoScroll:m}))}}]),t}(_.Component);C0.range=function(e,t){var n=t.localizer;return[n.startOf(e,"day")]};C0.navigate=function(e,t,n){var r=n.localizer;switch(t){case Oo.PREVIOUS:return r.add(e,-1,"day");case Oo.NEXT:return r.add(e,1,"day");default:return e}};C0.title=function(e,t){var n=t.localizer;return n.format(e,"dayHeaderFormat")};var tve=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Wl=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.date,a=r.localizer,i=r.min,s=i===void 0?a.startOf(new Date,"day"):i,l=r.max,u=l===void 0?a.endOf(new Date,"day"):l,f=r.scrollToTime,h=f===void 0?a.startOf(new Date,"day"):f,p=r.enableAutoScroll,m=p===void 0?!0:p,w=Qi(r,tve),b=t.range(o,this.props);return _.createElement(Gf,Object.assign({},w,{range:b,eventOffset:15,localizer:a,min:s,max:u,scrollToTime:h,enableAutoScroll:m}))}}]),t}(_.Component);Wl.defaultProps=Gf.defaultProps;Wl.navigate=function(e,t,n){var r=n.localizer;switch(t){case Oo.PREVIOUS:return r.add(e,-1,"week");case Oo.NEXT:return r.add(e,1,"week");default:return e}};Wl.range=function(e,t){var n=t.localizer,r=n.startOfWeek(),o=n.startOf(e,"week",r),a=n.endOf(e,"week",r);return n.range(o,a)};Wl.title=function(e,t){var n=t.localizer,r=Wl.range(e,{localizer:n}),o=I8(r),a=o[0],i=o.slice(1);return n.format({start:a,end:i.pop()},"dayRangeHeaderFormat")};var nve=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function aM(e,t){return Wl.range(e,t).filter(function(n){return[6,0].indexOf(n.getDay())===-1})}var wg=function(e){oo(t,e);function t(){return dr(this,t),ro(this,t,arguments)}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.date,a=r.localizer,i=r.min,s=i===void 0?a.startOf(new Date,"day"):i,l=r.max,u=l===void 0?a.endOf(new Date,"day"):l,f=r.scrollToTime,h=f===void 0?a.startOf(new Date,"day"):f,p=r.enableAutoScroll,m=p===void 0?!0:p,w=Qi(r,nve),b=aM(o,this.props);return _.createElement(Gf,Object.assign({},w,{range:b,eventOffset:15,localizer:a,min:s,max:u,scrollToTime:h,enableAutoScroll:m}))}}]),t}(_.Component);wg.defaultProps=Gf.defaultProps;wg.range=aM;wg.navigate=Wl.navigate;wg.title=function(e,t){var n=t.localizer,r=aM(e,{localizer:n}),o=I8(r),a=o[0],i=o.slice(1);return n.format({start:a,end:i.pop()},"dayRangeHeaderFormat")};function Gl(e){var t=e.accessors,n=e.components,r=e.date,o=e.events,a=e.getters,i=e.length,s=e.localizer,l=e.onDoubleClickEvent,u=e.onSelectEvent,f=e.selected,h=D.useRef(null),p=D.useRef(null),m=D.useRef(null),w=D.useRef(null),b=D.useRef(null);D.useEffect(function(){x()});var y=function(O,F,R){var B=n.event,Y=n.date;return F=F.filter(function(H){return sm(H,s.startOf(O,"day"),s.endOf(O,"day"),t,s)}),F.map(function(H,Z){var W=t.title(H),$=t.end(H),V=t.start(H),ne=a.eventProp(H,V,$,k0(H,f)),Q=Z===0&&s.format(O,"agendaDateFormat"),te=Z===0?_.createElement("td",{rowSpan:F.length,className:"rbc-agenda-date-cell"},Y?_.createElement(Y,{day:O,label:Q}):Q):!1;return _.createElement("tr",{key:R+"_"+Z,className:ne.className,style:ne.style},te,_.createElement("td",{className:"rbc-agenda-time-cell"},S(O,H)),_.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(X){return u&&u(H,X)},onDoubleClick:function(X){return l&&l(H,X)}},B?_.createElement(B,{event:H,title:W}):W))},[])},S=function(O,F){var R="",B=n.time,Y=s.messages.allDay,H=t.end(F),Z=t.start(F);return t.allDay(F)||(s.eq(Z,H)?Y=s.format(Z,"agendaTimeFormat"):s.isSameDate(Z,H)?Y=s.format({start:Z,end:H},"agendaTimeRangeFormat"):s.isSameDate(O,Z)?Y=s.format(Z,"agendaTimeFormat"):s.isSameDate(O,H)&&(Y=s.format(H,"agendaTimeFormat"))),s.gt(O,Z,"day")&&(R="rbc-continues-prior"),s.lt(O,H,"day")&&(R+=" rbc-continues-after"),_.createElement("span",{className:R.trim()},B?_.createElement(B,{event:F,day:O,label:Y}):Y)},x=function(){if(b.current){var O=h.current,F=b.current.firstChild;if(F){var R=w.current.scrollHeight>w.current.clientHeight,B=[],Y=B;B=[YI(F.children[0]),YI(F.children[1])],(Y[0]!==B[0]||Y[1]!==B[1])&&(p.current.style.width=B[0]+"px",m.current.style.width=B[1]+"px"),R?(wne(O,"rbc-header-overflowing"),O.style.marginRight=W6()+"px"):Sne(O,"rbc-header-overflowing")}}},E=s.messages,C=s.add(r,i,"day"),M=s.range(r,C,"day");return o=o.filter(function(k){return sm(k,s.startOf(r,"day"),s.endOf(C,"day"),t,s)}),o.sort(function(k,O){return+t.start(k)-+t.start(O)}),_.createElement("div",{className:"rbc-agenda-view"},o.length!==0?_.createElement(_.Fragment,null,_.createElement("table",{ref:h,className:"rbc-agenda-table"},_.createElement("thead",null,_.createElement("tr",null,_.createElement("th",{className:"rbc-header",ref:p},E.date),_.createElement("th",{className:"rbc-header",ref:m},E.time),_.createElement("th",{className:"rbc-header"},E.event)))),_.createElement("div",{className:"rbc-agenda-content",ref:w},_.createElement("table",{className:"rbc-agenda-table"},_.createElement("tbody",{ref:b},M.map(function(k,O){return y(k,o,O)}))))):_.createElement("span",{className:"rbc-agenda-empty"},E.noEventsInRange))}Gl.defaultProps={length:30};Gl.range=function(e,t){var n=t.length,r=n===void 0?Gl.defaultProps.length:n,o=t.localizer,a=o.add(e,r,"day");return{start:e,end:a}};Gl.navigate=function(e,t,n){var r=n.length,o=r===void 0?Gl.defaultProps.length:r,a=n.localizer;switch(t){case Oo.PREVIOUS:return a.add(e,-o,"day");case Oo.NEXT:return a.add(e,o,"day");default:return e}};Gl.title=function(e,t){var n=t.length,r=n===void 0?Gl.defaultProps.length:n,o=t.localizer,a=o.add(e,r,"day");return o.format({start:e,end:a},"agendaHeaderFormat")};var $y=_c(_c(_c(_c(_c({},eo.MONTH,E0),eo.WEEK,Wl),eo.WORK_WEEK,wg),eo.DAY,C0),eo.AGENDA,Gl),rve=["action","date","today"];function ove(e,t){var n=t.action,r=t.date,o=t.today,a=Qi(t,rve);switch(e=typeof e=="string"?$y[e]:e,n){case Oo.TODAY:r=o||new Date;break;case Oo.DATE:break;default:Kp(e&&typeof e.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=e.navigate(r,n,a)}return r}var ave=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.navigate=function(i){n.props.onNavigate(i)},n.view=function(i){n.props.onView(i)},n}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.localizer.messages,a=r.label;return _.createElement("div",{className:"rbc-toolbar"},_.createElement("span",{className:"rbc-btn-group"},_.createElement("button",{type:"button",onClick:this.navigate.bind(null,Oo.TODAY)},o.today),_.createElement("button",{type:"button",onClick:this.navigate.bind(null,Oo.PREVIOUS)},o.previous),_.createElement("button",{type:"button",onClick:this.navigate.bind(null,Oo.NEXT)},o.next)),_.createElement("span",{className:"rbc-toolbar-label"},a),_.createElement("span",{className:"rbc-btn-group"},this.viewNamesGroup(o)))}},{key:"viewNamesGroup",value:function(r){var o=this,a=this.props.views,i=this.props.view;if(a.length>1)return a.map(function(s){return _.createElement("button",{type:"button",key:s,className:er({"rbc-active":i===s}),onClick:o.view.bind(null,s)},r[s])})}}]),t}(_.Component);function ive(e,t){var n=null;return typeof t=="function"?n=t(e):typeof t=="string"&&Us(e)==="object"&&e!=null&&t in e&&(n=e[t]),n}var Dl=function(t){return function(n){return ive(n,t)}},sve=["view","date","getNow","onNavigate"],lve=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function nH(e){if(Array.isArray(e))return e;for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var o=Es(r[n],2),a=o[0],i=o[1];i&&t.push(a)}return t}function cve(e,t){var n=t.views,r=nH(n);return r.indexOf(e)!==-1}var rH=function(e){oo(t,e);function t(){var n;dr(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=ro(this,t,[].concat(o)),n.getViews=function(){var i=n.props.views;return Array.isArray(i)?Lme(i,function(s,l){return s[l]=$y[l]},{}):Us(i)==="object"?F8(i,function(s,l){return s===!0?$y[l]:s}):$y},n.getView=function(){var i=n.getViews();return i[n.props.view]},n.getDrilldownView=function(i){var s=n.props,l=s.view,u=s.drilldownView,f=s.getDrilldownView;return f?f(i,l,Object.keys(n.getViews())):u},n.handleRangeChange=function(i,s,l){var u=n.props,f=u.onRangeChange,h=u.localizer;f&&s.range&&f(s.range(i,{localizer:h}),l)},n.handleNavigate=function(i,s){var l=n.props,u=l.view,f=l.date,h=l.getNow,p=l.onNavigate,m=Qi(l,sve),w=n.getView(),b=h();f=ove(w,cn(cn({},m),{},{action:i,date:s||f||b,today:b})),p(f,u,i),n.handleRangeChange(f,w)},n.handleViewChange=function(i){i!==n.props.view&&cve(i,n.props)&&n.props.onView(i);var s=n.getViews();n.handleRangeChange(n.props.date||n.props.getNow(),s[i],i)},n.handleSelectEvent=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onSelectEvent,s)},n.handleDoubleClickEvent=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onDoubleClickEvent,s)},n.handleKeyPressEvent=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];In(n.props.onKeyPressEvent,s)},n.handleSelectSlot=function(i){In(n.props.onSelectSlot,i)},n.handleDrillDown=function(i,s){var l=n.props.onDrillDown;if(l){l(i,s,n.drilldownView);return}s&&n.handleViewChange(s),n.handleNavigate(Oo.DATE,i)},n.state={context:t.getContext(n.props)},n}return fr(t,[{key:"render",value:function(){var r=this.props,o=r.view,a=r.toolbar,i=r.events,s=r.backgroundEvents,l=r.style,u=r.className,f=r.elementProps,h=r.date,p=r.getNow,m=r.length,w=r.showMultiDayTimes,b=r.onShowMore,y=r.doShowMoreDrillDown;r.components,r.formats,r.messages,r.culture;var S=Qi(r,lve);h=h||p();var x=this.getView(),E=this.state.context,C=E.accessors,M=E.components,k=E.getters,O=E.localizer,F=E.viewNames,R=M.toolbar||ave,B=x.title(h,{localizer:O,length:m});return _.createElement("div",Object.assign({},f,{className:er(u,"rbc-calendar",S.rtl&&"rbc-rtl"),style:l}),a&&_.createElement(R,{date:h,view:o,views:F,label:B,onView:this.handleViewChange,onNavigate:this.handleNavigate,localizer:O}),_.createElement(x,Object.assign({},S,{events:i,backgroundEvents:s,date:h,getNow:p,length:m,localizer:O,getters:k,components:M,accessors:C,showMultiDayTimes:w,getDrilldownView:this.getDrilldownView,onNavigate:this.handleNavigate,onDrillDown:this.handleDrillDown,onSelectEvent:this.handleSelectEvent,onDoubleClickEvent:this.handleDoubleClickEvent,onKeyPressEvent:this.handleKeyPressEvent,onSelectSlot:this.handleSelectSlot,onShowMore:b,doShowMoreDrillDown:y})))}}],[{key:"getDerivedStateFromProps",value:function(r){return{context:t.getContext(r)}}},{key:"getContext",value:function(r){var o=r.startAccessor,a=r.endAccessor,i=r.allDayAccessor,s=r.tooltipAccessor,l=r.titleAccessor,u=r.resourceAccessor,f=r.resourceIdAccessor,h=r.resourceTitleAccessor,p=r.eventPropGetter,m=r.backgroundEventPropGetter,w=r.slotPropGetter,b=r.slotGroupPropGetter,y=r.dayPropGetter,S=r.view,x=r.views,E=r.localizer,C=r.culture,M=r.messages,k=M===void 0?{}:M,O=r.components,F=O===void 0?{}:O,R=r.formats,B=R===void 0?{}:R,Y=nH(x),H=hge(k);return{viewNames:Y,localizer:dge(E,C,B,H),getters:{eventProp:function(){return p&&p.apply(void 0,arguments)||{}},backgroundEventProp:function(){return m&&m.apply(void 0,arguments)||{}},slotProp:function(){return w&&w.apply(void 0,arguments)||{}},slotGroupProp:function(){return b&&b.apply(void 0,arguments)||{}},dayProp:function(){return y&&y.apply(void 0,arguments)||{}}},components:Tme(F[S]||{},pme(F,Y),{eventWrapper:ks,backgroundEventWrapper:ks,eventContainerWrapper:ks,dateCellWrapper:ks,weekWrapper:ks,timeSlotWrapper:ks,timeGutterWrapper:ks}),accessors:{start:Dl(o),end:Dl(a),allDay:Dl(i),tooltip:Dl(s),title:Dl(l),resource:Dl(u),resourceId:Dl(f),resourceTitle:Dl(h)}}}}]),t}(_.Component);rH.defaultProps={events:[],backgroundEvents:[],elementProps:{},popup:!1,toolbar:!0,view:eo.MONTH,views:[eo.MONTH,eo.WEEK,eo.DAY,eo.AGENDA],step:30,length:30,allDayMaxRows:1/0,doShowMoreDrillDown:!0,drilldownView:eo.DAY,titleAccessor:"title",tooltipAccessor:"title",allDayAccessor:"allDay",startAccessor:"start",endAccessor:"end",resourceAccessor:"resourceId",resourceIdAccessor:"id",resourceTitleAccessor:"title",longPressThreshold:250,getNow:function(){return new Date},dayLayoutAlgorithm:"overlap"};var uve=I6(rH,{view:"onView",date:"onNavigate",selected:"onSelectEvent"}),dve=function(t,n,r){var o=t.start,a=t.end;return r.format(o,"MMMM DD",n)+" – "+r.format(a,r.eq(o,a,"month")?"DD":"MMMM DD",n)},fve=function(t,n,r){var o=t.start,a=t.end;return r.format(o,"L",n)+" – "+r.format(a,"L",n)},A1=function(t,n,r){var o=t.start,a=t.end;return r.format(o,"LT",n)+" – "+r.format(a,"LT",n)},hve=function(t,n,r){var o=t.start;return r.format(o,"LT",n)+" – "},pve=function(t,n,r){var o=t.end;return" – "+r.format(o,"LT",n)},mve={dateFormat:"DD",dayFormat:"DD ddd",weekdayFormat:"ddd",selectRangeFormat:A1,eventTimeRangeFormat:A1,eventTimeRangeStartFormat:hve,eventTimeRangeEndFormat:pve,timeGutterFormat:"LT",monthHeaderFormat:"MMMM YYYY",dayHeaderFormat:"dddd MMM DD",dayRangeHeaderFormat:dve,agendaHeaderFormat:fve,agendaDateFormat:"ddd MMM DD",agendaTimeFormat:"LT",agendaTimeRangeFormat:A1};function Al(e){var t=e&&e.toLowerCase();return t==="FullYear"?t="year":t||(t=void 0),t}function gve(e){var t=function(ee,ie){return ie?ee.locale(ie):ee};function n(X){return e(X).toDate().getTimezoneOffset()}function r(X,ee){var ie,fe,he=e(X).local(),we=e(ee).local();if(!e.tz)return he.toDate().getTimezoneOffset()-we.toDate().getTimezoneOffset();var Ne=(ie=he==null||(fe=he._z)===null||fe===void 0?void 0:fe.name)!==null&&ie!==void 0?ie:e.tz.guess(),Ae=e.tz.zone(Ne).utcOffset(+he),Te=e.tz.zone(Ne).utcOffset(+we);return Ae-Te}function o(X){var ee=e(X).startOf("day");return r(ee,X)}function a(X,ee,ie){var fe=Al(ie),he=fe?e(X).startOf(fe):e(X),we=fe?e(ee).startOf(fe):e(ee);return[he,we,fe]}function i(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,ee=arguments.length>1?arguments[1]:void 0,ie=Al(ee);return ie?e(X).startOf(ie).toDate():e(X).toDate()}function s(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,ee=arguments.length>1?arguments[1]:void 0,ie=Al(ee);return ie?e(X).endOf(ie).toDate():e(X).toDate()}function l(X,ee,ie){var fe=a(X,ee,ie),he=Es(fe,3),we=he[0],Ne=he[1],Ae=he[2];return we.isSame(Ne,Ae)}function u(X,ee,ie){return!l(X,ee,ie)}function f(X,ee,ie){var fe=a(X,ee,ie),he=Es(fe,3),we=he[0],Ne=he[1],Ae=he[2];return we.isAfter(Ne,Ae)}function h(X,ee,ie){var fe=a(X,ee,ie),he=Es(fe,3),we=he[0],Ne=he[1],Ae=he[2];return we.isBefore(Ne,Ae)}function p(X,ee,ie){var fe=a(X,ee,ie),he=Es(fe,3),we=he[0],Ne=he[1],Ae=he[2];return we.isSameOrBefore(Ne,Ae)}function m(X,ee,ie){var fe=a(X,ee,ie),he=Es(fe,3),we=he[0],Ne=he[1],Ae=he[2];return we.isSameOrBefore(Ne,Ae)}function w(X,ee,ie){var fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",he=Al(fe),we=e(X),Ne=e(ee),Ae=e(ie);return we.isBetween(Ne,Ae,he,"[]")}function b(X,ee){var ie=e(X),fe=e(ee),he=e.min(ie,fe);return he.toDate()}function y(X,ee){var ie=e(X),fe=e(ee),he=e.max(ie,fe);return he.toDate()}function S(X,ee){if(!X&&!ee)return null;var ie=e(ee).format("HH:mm:ss"),fe=e(X).startOf("day").format("MM/DD/YYYY");return e("".concat(fe," ").concat(ie),"MM/DD/YYYY HH:mm:ss").toDate()}function x(X,ee,ie){var fe=Al(ie);return e(X).add(ee,fe).toDate()}function E(X,ee){for(var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",fe=Al(ie),he=e(X).toDate(),we=[];m(he,ee);)we.push(he),he=x(he,1,fe);return we}function C(X,ee){var ie=Al(ee),fe=i(X,ie);return l(fe,X)?fe:x(fe,1,ie)}function M(X,ee){var ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",fe=Al(ie),he=e(X),we=e(ee);return we.diff(he,fe)}function k(X){var ee=e(X);return ee.minutes()}function O(X){var ee=X?e.localeData(X):e.localeData();return ee?ee.firstDayOfWeek():0}function F(X){return e(X).startOf("month").startOf("week").toDate()}function R(X){return e(X).endOf("month").endOf("week").toDate()}function B(X){for(var ee=F(X),ie=R(X),fe=[];m(ee,ie);)fe.push(ee),ee=x(ee,1,"d");return fe}function Y(X,ee,ie){return e(X).startOf("day").minute(ee+ie).toDate()}function H(X,ee){return M(X,ee,"minutes")}function Z(X){var ee=e(X).startOf("day"),ie=e(X);return ie.diff(ee,"minutes")+o(X)}function W(X,ee){var ie=e(X),fe=e(ee);return ie.isBefore(fe,"day")}function $(X,ee,ie){var fe=e(ee),he=e(ie);return fe.isSameOrAfter(he,"minutes")}function V(X,ee){var ie=e(X),fe=e(ee),he=e.duration(fe.diff(ie));return he.days()}function ne(X){var ee=X.evtA,ie=ee.start,fe=ee.end,he=ee.allDay,we=X.evtB,Ne=we.start,Ae=we.end,Te=we.allDay,Fe=+i(ie,"day")-+i(Ne,"day"),We=V(ie,fe),ke=V(Ne,Ae);return Fe||ke-We||!!Te-!!he||+ie-+Ne||+fe-+Ae}function Q(X){var ee=X.event,ie=ee.start,fe=ee.end,he=X.range,we=he.start,Ne=he.end,Ae=e(ie).startOf("day"),Te=e(fe),Fe=e(we),We=e(Ne),ke=Ae.isSameOrBefore(We,"day"),Ie=!Ae.isSame(Te,"minutes"),ce=Ie?Te.isAfter(Fe,"minutes"):Te.isSameOrAfter(Fe,"minutes");return ke&&ce}function te(X,ee){var ie=e(X),fe=e(ee);return ie.isSame(fe,"day")}function G(){var X=new Date,ee=/-/.test(X.toString())?"-":"",ie=X.getTimezoneOffset(),fe=Number("".concat(ee).concat(Math.abs(ie))),he=e().utcOffset();return he>fe?1:0}return new uge({formats:mve,firstOfWeek:O,firstVisibleDay:F,lastVisibleDay:R,visibleDays:B,format:function(ee,ie,fe){return t(e(ee),fe).format(ie)},lt:h,lte:m,gt:f,gte:p,eq:l,neq:u,merge:S,inRange:w,startOf:i,endOf:s,range:E,add:x,diff:M,ceil:C,min:b,max:y,minutes:k,getSlotDate:Y,getTimezoneOffset:n,getDstOffset:r,getTotalMin:H,getMinutesFromMidnight:Z,continuesPrior:W,continuesAfter:$,sortEvents:ne,inEventRange:Q,isSameDate:te,daySpan:V,browserTZOffset:G})}function GP(e,t,n,r,o){const a={start:r.start(e),end:r.end(e)},i={start:t,end:n};return o.inEventRange({event:a,range:i})}function vve(e,t){return!e||t==null?!1:ru(e,t)}const Id={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"};function Vs({accessors:e,components:t,date:n,events:r,getters:o,length:a,localizer:i,onDoubleClickEvent:s,onSelectEvent:l,selected:u}){D.useRef(null);const f=D.useRef(null),h=D.useRef(null),p=D.useRef(null),m=D.useRef(null),[w,b]=D.useState(!1),[y,S]=D.useState(!1),x=(B,Y,H)=>{const{event:Z,date:W}=t;return Y=Y.filter($=>GP($,i.startOf(B,"day"),i.endOf(B,"day"),e,i)),Y.map(($,V)=>{const ne=e.title($),Q=e.end($),te=e.start($),G=o.eventProp($,te,Q,vve($,u)),X=V===0&&i.format(B,"agendaDateFormat"),ee=V===0?g.jsx("td",{rowSpan:Y.length,className:"rbc-agenda-date-cell",children:W?g.jsx(W,{day:B,label:X}):X}):!1;return g.jsxs("tr",{className:G.className,style:G.style,children:[ee,g.jsx("td",{className:"rbc-agenda-time-cell",children:E(B,$)}),g.jsx("td",{className:"rbc-agenda-event-cell",onClick:ie=>l&&l($,ie),onDoubleClick:ie=>s&&s($,ie),children:Z?g.jsx(Z,{event:$,title:ne}):ne})]},H+"_"+V)},[])},E=(B,Y)=>{const H=t.time;let Z="",W=i.messages.allDay;const $=e.end(Y),V=e.start(Y);return e.allDay(Y)||(i.eq(V,$)?W=i.format(V,"agendaTimeFormat"):i.isSameDate(V,$)?W=i.format({start:V,end:$},"agendaTimeRangeFormat"):i.isSameDate(B,V)?W=i.format(V,"agendaTimeFormat"):i.isSameDate(B,$)&&(W=i.format($,"agendaTimeFormat"))),i.gt(B,V,"day")&&(Z="rbc-continues-prior"),i.lt(B,$,"day")&&(Z+=" rbc-continues-after"),g.jsx("span",{className:Z.trim(),children:H?g.jsx(H,{event:Y,day:B,label:W}):W})},{messages:C}=i,M=i.add(n,-a/2,"day"),k=i.add(n,a/2,"day"),O=i.range(M,k,"day");w&&O.reverse(),r=r.filter(B=>GP(B,i.startOf(M,"day"),i.endOf(k,"day"),e,i)),r.sort((B,Y)=>+e.start(B)-+e.start(Y)),y&&r.reverse();const F=D.useCallback(()=>setTimeout(()=>{m.current&&l0(m.current,{backgroundColor:"#ffffff",pixelRatio:window.devicePixelRatio*2}).then(B=>{new A.Notice(I("Image is generating..."));const Y=Ze.getState().settings.AutoSaveWhenOnMobile,H=Ze.getState().app.vault;if(Y&&A.Platform.isMobile){const Z=B.split("base64,")[1];Xw(Z,"image/png").arrayBuffer().then(async $=>{let V;const ne="png",Q=Xs();for(const te in Q)if(Q[te]instanceof A.TFile){V=Q[te];break}V!==void 0&&await H.createBinary(await H.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,ne,V),$)})}Wd({imgUrl:B})}).catch(B=>{console.error(B)})},0),[m.current,O]),R=D.useCallback(B=>{const Y=new A.Menu;Y.addItem(H=>{H.setIcon("share-2").setTitle(I("Share")).onClick(()=>{F()})}),Y.showAtMouseEvent(B.nativeEvent)},[m.current,O,F]);return g.jsx("div",{className:"rbc-agenda-view",children:r.length!==0?g.jsx(_.Fragment,{children:g.jsxs("table",{ref:m,className:"rbc-agenda-table",children:[g.jsx("thead",{onContextMenu:R,children:g.jsxs("tr",{children:[g.jsx("th",{className:"rbc-header",ref:f,onClick:()=>{b(!w)},children:C.date+(w?" 🔼":" 🔽")}),g.jsx("th",{className:"rbc-header",ref:h,onClick:()=>{S(!y)},children:C.time+(y?" 🔼":" 🔽")}),g.jsx("th",{className:"rbc-header",children:C.event})]})}),g.jsx("tbody",{ref:p,children:O.map((B,Y)=>x(B,r,Y))})]})}):g.jsx("span",{className:"rbc-agenda-empty",children:C.noEventsInRange})})}Vs.propTypes={accessors:de.object.isRequired,components:de.object.isRequired,date:de.instanceOf(Date),events:de.array,getters:de.object.isRequired,length:de.number.isRequired,localizer:de.object.isRequired,onSelectEvent:de.func,onDoubleClickEvent:de.func,selected:de.object};Vs.defaultProps={length:30};Vs.range=(e,{length:t=Vs.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),o=n.add(e,t/2,"day");return{customStart:r,customEnd:o}};Vs.navigate=(e,t,{length:n=Vs.defaultProps.length,localizer:r})=>{switch(t){case Id.PREVIOUS:return r.add(e,-n,"day");case Id.NEXT:return r.add(e,n,"day");default:return e}};Vs.title=(e,{length:t=Vs.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),o=n.add(e,t/2,"day");return n.format({start:r,end:o},"agendaHeaderFormat")};function yve(e,t){e.hoverEl.toggleClass("thino-hover-popover",!0);const n=ag(e.hoverEl);return n.render(g.jsx(Ea,{store:Se,context:it,children:g.jsx(no,{memo:t})})),n}function bve({event:e}){const t=e.resource,n=t.content.split(`
`)[0].slice(0,20),r=_.useRef(null),o=_.useRef(null),a=_.useRef(null);D.useEffect(()=>{if(o.current)return A.setIcon(o.current,"calendar"),()=>{r.current&&(r.current=null)}},[r]);const i=D.useCallback(l=>{a.current&&(a.current.unmount(),a.current=null),a.current=l},[]),s=D.useCallback(l=>{if(!r.current||!A.Keymap.isModifier(l.nativeEvent,"Mod"))return;const u=new A.HoverPopover(Ze.getState().view,r.current,100),f=yve(u,t);i(f)},[r.current]);return g.jsxs("span",{className:"rbc-event-renderer","data-source-type":t.sourceType,"data-thino-type":t.thinoType,"data-thino-id":t.id,ref:r,"aria-label":t.path,onMouseOver:s,children:[g.jsx(wve,{event:e}),g.jsx("span",{children:n})]})}const wve=({event:e})=>{const t=_.useRef(null),n=e.resource;D.useEffect(()=>{t.current&&A.setIcon(t.current,n.thinoType==="JOURNAL"?"calendar":n.thinoType==="TASK-TODO"?"square":"check-square")},[n?.thinoType,t]);const r=D.useCallback(async o=>{o.stopPropagation(),o.preventDefault(),await(async()=>{const i=await le.updateMemo(n.id,n.content,n.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");i&&le.editMemo(i)})()},[n?.thinoType,n?.id,n?.content]);return g.jsx(g.Fragment,{children:g.jsxs("span",{className:"rbc-event-icon-group",children:[g.jsx("span",{className:"rbc-event-icon",ref:t,onClick:r}),g.jsx("span",{className:qt("rbc-event-time","thino-hidden"),children:g.jsx("span",{className:"rbc-event-time-text",children:A.moment(e.start).format("HH:mm")})})]})})};function oH({views:e,view:t,messages:n,onView:r}){return e.map(o=>g.jsx("button",{type:"button",className:qt({"rbc-active":t===o}),onClick:()=>r(o),children:n[o]},o))}oH.propTypes={messages:de.object,onView:de.func,view:de.string,views:de.array};function aH({date:e,label:t,localizer:{messages:n},onNavigate:r,onView:o,view:a,views:i}){const s={previous:D.useRef(null),today:D.useRef(null),next:D.useRef(null)};D.useEffect(()=>{s&&(A.setIcon(s.previous.current,"chevron-left"),A.setIcon(s.today.current,"dot"),A.setIcon(s.next.current,"chevron-right"))},[s]);const l=D.useMemo(()=>g.jsxs(g.Fragment,{children:[g.jsx("button",{ref:s.previous,type:"button",onClick:()=>r(Id.PREVIOUS),"aria-label":n.previous,children:"<"}),g.jsx("button",{ref:s.today,type:"button",onClick:()=>r(Id.TODAY),"aria-label":n.today,children:"•"}),g.jsx("button",{ref:s.next,type:"button",onClick:()=>r(Id.NEXT),"aria-label":n.next,children:">"})]}),[n]);return g.jsxs("div",{className:"rbc-toolbar",children:[g.jsx("span",{className:qt("rbc-btn-group","thino-view-custom-toolbar"),children:l}),g.jsx("span",{className:"rbc-toolbar-label",children:g.jsx(bb,{type:"text",handleValueChange:u=>{r(Id.DATE,A.moment(u,"YYYY-MM-DD").format("YYYY-MM-DDTHH:mm:ssZ"))},defaultText:t+(a==="week"?A.moment(e.valueOf(),"x").format(" [W]WW"):""),defaultValue:A.moment(e.valueOf(),"x").valueOf()})}),g.jsx("span",{className:"rbc-btn-group",children:g.jsx(oH,{view:a,views:i,messages:n,onView:o})})]})}aH.propTypes={date:de.instanceOf(Date),label:de.string,localizer:de.object,messages:de.object,onNavigate:de.func,onView:de.func,view:de.string,views:de.array};function Sve({event:e,children:t,showPopup:n,callRender:r,...o}){const a=D.useRef(null),i=D.useRef(null),s=D.useCallback(l=>{if(!l.isTrusted){r();return}i.current=l.nativeEvent.target,i.current&&(i.current.hasClass("rbc-event")||(i.current=i.current.closest(".rbc-event")),a.current!==null?(window.clearTimeout(a.current),a.current=null):a.current=window.setTimeout(()=>{n(e,i.current),a.current=null},250))},[e,n]);return g.jsx(g.Fragment,{children:g.jsx("div",{className:"rbc-event-wrapper","aria-describedby":"thino",onClick:s,children:t})})}const Tve=gve(A.moment),xve=({event:e})=>{const t=e.resource;return g.jsx(g.Fragment,{children:g.jsx(no,{memo:t})})},Ive=e=>{const{thinos:t}=e,[n,r]=_.useState([]),[o,a]=_.useState(app?.loadLocalStorage("thino-calendar-view")||"month"),[i,s]=_.useState(null),l=_.useRef(null),u=_.useRef(null),[f,h]=_.useState(!1),p=D.useRef(null),[m,w]=D.useState(new Date);D.useEffect(()=>()=>{l.current&&(l.current=null),u.current&&(u.current=null),p.current&&(p.current=null)},[]),D.useEffect(()=>{const H=t.map(Z=>{const W=A.moment(Z.createdAt,"YYYY/MM/DD HH:mm:ss"),$=W.clone().add(1,"minute");return{title:Z.content,start:new Date(W.format("YYYY-MM-DDTHH:mm:ss")),end:new Date($.format("YYYY-MM-DDTHH:mm:ss")),resource:Z}});r(H)},[t]),D.useEffect(()=>{app?.saveLocalStorage("thino-calendar-view",o)},[o]),D.useEffect(()=>{i&&f&&s(t.find(H=>H.id===i.id))},[t,i,f]),D.useEffect(()=>{i&&p.current.update()},[i]),p.current=s0(l.current,u.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}]});const b=D.useCallback(()=>{p.current.update(),p.current.update()},[]),y=D.useCallback((H,Z)=>{s(null),C(),p.current.state.elements.reference=Z,s(H.resource),M()},[]),S=D.useCallback(()=>{C(),s(null)},[]),x=D.useCallback((H,Z,W)=>{if(E(H),Z==="week"||Z==="day"){const $=l.current.find(".rbc-event-wrapper");if(l.current.closest(".memolist-wrapper"),$){$.children[0]?.click();return}else{setTimeout(()=>{l.current.find(".rbc-event-wrapper")?.children?.[0]?.click()},0);return}}},[]),E=D.useCallback(H=>{w(H)},[w]);cg(u,S);const C=D.useCallback(()=>{h(!1)},[h]),M=D.useCallback(()=>{p.current.update(),h(!0)},[h]),k=D.useCallback(H=>{const Z=H.resource;Ge.setEditMemoId(Z.id)},[]),O=D.useCallback(H=>{a(H)},[a]),{components:F,views:R,messages:B}=D.useMemo(()=>({components:{toolbar:aH,eventWrapper:H=>g.jsx(Sve,{...H,callRender:b,showPopup:y}),agenda:{event:xve},event:bve},views:{month:!0,agenda:Vs,week:!0,day:!0},messages:{month:I("Month"),day:I("Day"),next:I("Next"),previous:I("Previous"),today:I("Today"),agenda:I("Agenda"),week:I("Week"),yesterday:I("Yesterday"),tomorrow:I("Tomorrow"),noEventsInRange:I("No thinos in range"),date:I("date"),time:I("time"),event:I("event")}}),[]),Y=D.useMemo(()=>({timeGutterFormat:(H,Z,W)=>W.format(H,"HH:mm",Z),agendaTimeRangeFormat:({start:H,end:Z},W,$)=>$.format(H,"HH:mm",W)+" — "+$.format(Z,"HH:mm",W),agendaHeaderFormat:({start:H,end:Z},W,$)=>$.format(H,"YYYY-MM-DD")+" — "+$.format(Z,"YYYY-MM-DD")}),[]);return g.jsxs("div",{ref:l,className:"calendar-view",children:[g.jsx(uve,{date:m,messages:B,components:F,localizer:Tve,events:n,views:R,onView:O,onDoubleClickEvent:k,onNavigate:x,formats:Y,defaultView:o,tooltipAccessor:null,startAccessor:"start",endAccessor:"end"}),g.jsx("div",{ref:u,style:p.current?.styles.popper,className:qt("thino-popup-container",f?"":"thino-hidden"),children:i&&g.jsx(no,{memo:i})})]})};function Fl(e,t){return typeof e=="function"?e(t):e}function Xo(e,t){return n=>{t.setState(r=>({...r,[e]:Fl(n,r[e])}))}}function jb(e){return e instanceof Function}function kve(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Eve(e,t){const n=[],r=o=>{o.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i)})};return r(e),n}function ut(e,t,n){let r=[],o;return a=>{let i;n.key&&n.debug&&(i=Date.now());const s=e(a);if(!(s.length!==r.length||s.some((f,h)=>r[h]!==f)))return o;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-i)*100)/100,p=Math.round((Date.now()-u)*100)/100/16,m=(w,b)=>{for(w=String(w);w.length<b;)w=" "+w;return w}}return o}}function dt(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function Cve(e,t,n,r){var o,a;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(o=(a=s.id)!=null?a:l?l.replace(".","_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,f;if(s.accessorFn?f=s.accessorFn:l&&(l.includes(".")?f=p=>{let m=p;for(const b of l.split(".")){var w;m=(w=m)==null?void 0:w[b]}return m}:f=p=>p[s.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:f,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:ut(()=>[!0],()=>{var p;return[h,...(p=h.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},dt(e.options,"debugColumns")),getLeafColumns:ut(()=>[e._getOrderColumnsFn()],p=>{var m;if((m=h.columns)!=null&&m.length){let w=h.columns.flatMap(b=>b.getLeafColumns());return p(w)}return[h]},dt(e.options,"debugColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(h,e);return h}const Br="debugHeaders";function ZP(e,t,n){var r;let a={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const Mve={createTable:e=>{e.getHeaderGroups=ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var a,i;const s=(a=r?.map(h=>n.find(p=>p.id===h)).filter(Boolean))!=null?a:[],l=(i=o?.map(h=>n.find(p=>p.id===h)).filter(Boolean))!=null?i:[],u=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(o!=null&&o.includes(h.id)));return oy(t,[...s,...u,...l],e)},dt(e.options,Br)),e.getCenterHeaderGroups=ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(o!=null&&o.includes(a.id))),oy(t,n,e,"center")),dt(e.options,Br)),e.getLeftHeaderGroups=ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const a=(o=r?.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return oy(t,a,e,"left")},dt(e.options,Br)),e.getRightHeaderGroups=ut(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const a=(o=r?.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return oy(t,a,e,"right")},dt(e.options,Br)),e.getFooterGroups=ut(()=>[e.getHeaderGroups()],t=>[...t].reverse(),dt(e.options,Br)),e.getLeftFooterGroups=ut(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),dt(e.options,Br)),e.getCenterFooterGroups=ut(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),dt(e.options,Br)),e.getRightFooterGroups=ut(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),dt(e.options,Br)),e.getFlatHeaders=ut(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Br)),e.getLeftFlatHeaders=ut(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Br)),e.getCenterFlatHeaders=ut(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Br)),e.getRightFlatHeaders=ut(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),dt(e.options,Br)),e.getCenterLeafHeaders=ut(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Br)),e.getLeftLeafHeaders=ut(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Br)),e.getRightLeafHeaders=ut(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),dt(e.options,Br)),e.getLeafHeaders=ut(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,a,i,s,l,u;return[...(o=(a=t[0])==null?void 0:a.headers)!=null?o:[],...(i=(s=n[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(f=>f.getLeafHeaders()).flat()},dt(e.options,Br))}};function oy(e,t,n,r){var o,a;let i=0;const s=function(p,m){m===void 0&&(m=1),i=Math.max(i,m),p.filter(w=>w.getIsVisible()).forEach(w=>{var b;(b=w.columns)!=null&&b.length&&s(w.columns,m+1)},0)};s(e);let l=[];const u=(p,m)=>{const w={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},b=[];p.forEach(y=>{const S=[...b].reverse()[0],x=y.column.depth===w.depth;let E,C=!1;if(x&&y.column.parent?E=y.column.parent:(E=y.column,C=!0),S&&S?.column===E)S.subHeaders.push(y);else{const M=ZP(n,E,{id:[r,m,E.id,y?.id].filter(Boolean).join("_"),isPlaceholder:C,placeholderId:C?`${b.filter(k=>k.column===E).length}`:void 0,depth:m,index:b.length});M.subHeaders.push(y),b.push(M)}w.headers.push(y),y.headerGroup=w}),l.push(w),m>0&&u(b,m-1)},f=t.map((p,m)=>ZP(n,p,{depth:i,index:m}));u(f,i-1),l.reverse();const h=p=>p.filter(w=>w.column.getIsVisible()).map(w=>{let b=0,y=0,S=[0];w.subHeaders&&w.subHeaders.length?(S=[],h(w.subHeaders).forEach(E=>{let{colSpan:C,rowSpan:M}=E;b+=C,S.push(M)})):b=1;const x=Math.min(...S);return y+=x,w.colSpan=b,w.rowSpan=y,{colSpan:b,rowSpan:y}});return h((o=(a=l[0])==null?void 0:a.headers)!=null?o:[]),l}const ay={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},N1=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Dve={getDefaultColumnDef:()=>ay,getInitialState:e=>({columnSizing:{},columnSizingInfo:N1(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Xo("columnSizing",e),onColumnSizingInfoChange:Xo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:ay.minSize,(r=a??e.columnDef.size)!=null?r:ay.size),(o=e.columnDef.maxSize)!=null?o:ay.maxSize)},e.getStart=ut(n=>[n,Np(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,a)=>o+a.getSize(),0),dt(t.options,"debugColumns")),e.getAfter=ut(n=>[n,Np(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,a)=>o+a.getSize(),0),dt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var a;n+=(a=o.column.getSize())!=null?a:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return a=>{if(!r||!o||(a.persist==null||a.persist(),O1(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(S=>[S.column.id,S.column.getSize()]):[[r.id,r.getSize()]],l=O1(a)?Math.round(a.touches[0].clientX):a.clientX,u={},f=(S,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(E=>{var C,M;const k=t.options.columnResizeDirection==="rtl"?-1:1,O=(x-((C=E?.startOffset)!=null?C:0))*k,F=Math.max(O/((M=E?.startSize)!=null?M:0),-.999999);return E.columnSizingStart.forEach(R=>{let[B,Y]=R;u[B]=Math.round(Math.max(Y+Y*F,0)*100)/100}),{...E,deltaOffset:O,deltaPercentage:F}}),(t.options.columnResizeMode==="onChange"||S==="end")&&t.setColumnSizing(E=>({...E,...u})))},h=S=>f("move",S),p=S=>{f("end",S),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=n||typeof document<"u"?document:null,w={moveHandler:S=>h(S.clientX),upHandler:S=>{m?.removeEventListener("mousemove",w.moveHandler),m?.removeEventListener("mouseup",w.upHandler),p(S.clientX)}},b={moveHandler:S=>(S.cancelable&&(S.preventDefault(),S.stopPropagation()),h(S.touches[0].clientX),!1),upHandler:S=>{var x;m?.removeEventListener("touchmove",b.moveHandler),m?.removeEventListener("touchend",b.upHandler),S.cancelable&&(S.preventDefault(),S.stopPropagation()),p((x=S.touches[0])==null?void 0:x.clientX)}},y=Ave()?{passive:!1}:!1;O1(a)?(m?.addEventListener("touchmove",b.moveHandler,y),m?.addEventListener("touchend",b.upHandler,y)):(m?.addEventListener("mousemove",w.moveHandler,y),m?.addEventListener("mouseup",w.upHandler,y)),t.setColumnSizingInfo(S=>({...S,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?N1():(n=e.initialState.columnSizingInfo)!=null?n:N1())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let iy=null;function Ave(){if(typeof iy=="boolean")return iy;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return iy=e,iy}function O1(e){return e.type==="touchstart"}const Nve={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Xo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,a;e.setExpanded(r?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=r,n=(o=n)!=null?o:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:s,...l}=i;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},iH=(e,t,n)=>{var r;const o=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};iH.autoRemove=e=>ni(e);const sH=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};sH.autoRemove=e=>ni(e);const lH=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};lH.autoRemove=e=>ni(e);const cH=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};cH.autoRemove=e=>ni(e)||!(e!=null&&e.length);const uH=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});uH.autoRemove=e=>ni(e)||!(e!=null&&e.length);const dH=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});dH.autoRemove=e=>ni(e)||!(e!=null&&e.length);const fH=(e,t,n)=>e.getValue(t)===n;fH.autoRemove=e=>ni(e);const hH=(e,t,n)=>e.getValue(t)==n;hH.autoRemove=e=>ni(e);const iM=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};iM.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(o)?1/0:o;if(a>i){const s=a;a=i,i=s}return[a,i]};iM.autoRemove=e=>ni(e)||ni(e[0])&&ni(e[1]);const Ss={includesString:iH,includesStringSensitive:sH,equalsString:lH,arrIncludes:cH,arrIncludesAll:uH,arrIncludesSome:dH,equals:fH,weakEquals:hH,inNumberRange:iM};function ni(e){return e==null||e===""}const Ove={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Xo("columnFilters",e),onGlobalFilterChange:Xo("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Ss.includesString:typeof r=="number"?Ss.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ss.equals:Array.isArray(r)?Ss.arrIncludes:Ss.weakEquals},e.getFilterFn=()=>{var n,r;return jb(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Ss[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),a=r?.find(f=>f.id===e.id),i=Fl(n,a?a.value:void 0);if(qP(o,i,e)){var s;return(s=r?.filter(f=>f.id!==e.id))!=null?s:[]}const l={id:e.id,value:i};if(a){var u;return(u=r?.map(f=>f.id===e.id?l:f))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ss.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return jb(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ss[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var a;return(a=Fl(t,o))==null?void 0:a.filter(i=>{const s=n.find(l=>l.id===i.id);if(s){const l=s.getFilterFn();if(qP(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function qP(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Pve=(e,t,n)=>n.reduce((r,o)=>{const a=o.getValue(e);return r+(typeof a=="number"?a:0)},0),jve=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},Lve=(e,t,n)=>{let r;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},Rve=(e,t,n)=>{let r,o;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},Fve=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},Hve=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!kve(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((a,i)=>a-i);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},Bve=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),_ve=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Yve=(e,t)=>t.length,P1={sum:Pve,min:jve,max:Lve,extent:Rve,mean:Fve,median:Hve,unique:Bve,uniqueCount:_ve,count:Yve},zve={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Xo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r,o,a;return(n=(r=(o=(a=e.columnDef.enableGrouping)!=null?a:!0)!=null?o:t.options.enableGrouping)!=null?r:!0)!=null?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return P1.sum;if(Object.prototype.toString.call(r)==="[object Date]")return P1.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return jb(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:P1[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function Uve(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const Vve={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Xo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ut(n=>[Np(t,n)],n=>n.findIndex(r=>r.id===e.id),dt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Np(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Np(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ut(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let a=[];if(!(t!=null&&t.length))a=o;else{const i=[...t],s=[...o];for(;s.length&&i.length;){const l=i.shift(),u=s.findIndex(f=>f.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return Uve(a,n,r)},dt(e.options,"debugTable"))}},VI=0,WI=10,j1=()=>({pageIndex:VI,pageSize:WI}),Wve={getInitialState:e=>({...e,pagination:{...j1(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Xo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=a=>Fl(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?j1():(o=e.initialState.pagination)!=null?o:j1())},e.setPageIndex=r=>{e.setPagination(o=>{let a=Fl(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}})},e.resetPageIndex=r=>{var o,a;e.setPageIndex(r?VI:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:VI)},e.resetPageSize=r=>{var o,a;e.setPageSize(r?WI:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:WI)},e.setPageSize=r=>{e.setPagination(o=>{const a=Math.max(1,Fl(r,o.pageSize)),i=o.pageSize*o.pageIndex,s=Math.floor(i/a);return{...o,pageIndex:s,pageSize:a}})},e.setPageCount=r=>e.setPagination(o=>{var a;let i=Fl(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=ut(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((a,i)=>i)),o},dt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},L1=()=>({left:[],right:[]}),R1=()=>({top:[],bottom:[]}),Gve={getInitialState:e=>({columnPinning:L1(),rowPinning:R1(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Xo("columnPinning",e),onRowPinningChange:Xo("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var a,i;if(n==="right"){var s,l;return{left:((s=o?.left)!=null?s:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((l=o?.right)!=null?l:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var u,f;return{left:[...((u=o?.left)!=null?u:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((f=o?.right)!=null?f:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((a=o?.left)!=null?a:[]).filter(h=>!(r!=null&&r.includes(h))),right:((i=o?.right)!=null?i:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,a,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:o}=t.getState().columnPinning,a=n.some(s=>r?.includes(s)),i=n.some(s=>o?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],i=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var u,f;if(n==="bottom"){var h,p;return{top:((h=l?.top)!=null?h:[]).filter(b=>!(s!=null&&s.has(b))),bottom:[...((p=l?.bottom)!=null?p:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)]}}if(n==="top"){var m,w;return{top:[...((m=l?.top)!=null?m:[]).filter(b=>!(s!=null&&s.has(b))),...Array.from(s)],bottom:((w=l?.bottom)!=null?w:[]).filter(b=>!(s!=null&&s.has(b)))}}return{top:((u=l?.top)!=null?u:[]).filter(b=>!(s!=null&&s.has(b))),bottom:((f=l?.bottom)!=null?f:[]).filter(b=>!(s!=null&&s.has(b)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some(s=>r?.includes(s)),i=n.some(s=>o?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=(n=t._getPinnedRows(o))==null?void 0:n.map(i=>{let{id:s}=i;return s});return(r=a?.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const a=[...r??[],...o??[]];return n.filter(i=>!a.includes(i.column.id))},dt(t.options,"debugRows")),e.getLeftVisibleCells=ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),dt(t.options,"debugRows")),e.getRightVisibleCells=ut(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),dt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?L1():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:L1())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,a;return!!((o=r.left)!=null&&o.length||(a=r.right)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),dt(e.options,"debugColumns")),e.getRightLeafColumns=ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),dt(e.options,"debugColumns")),e.getCenterLeafColumns=ut(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(a=>!o.includes(a.id))},dt(e.options,"debugColumns")),e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?R1():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:R1())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,a;return!!((o=r.top)!=null&&o.length||(a=r.bottom)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=ut(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:r}))},dt(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=ut(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(a=>!o.has(a.id))},dt(e.options,"debugRows"))}},Zve={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Xo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):o.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(a=>{GI(o,a.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ut(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?F1(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getFilteredSelectedRowModel=ut(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?F1(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getGroupedSelectedRowModel=ut(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?F1(e,n):{rows:[],flatRows:[],rowsById:{}},dt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return a;const s={...a};return GI(s,e.id,n,(i=r?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return sM(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ZI(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ZI(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},GI=(e,t,n,r,o)=>{var a;const i=o.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>GI(e,s.id,n,r,o))};function F1(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(i,s){return i.map(l=>{var u;const f=sM(l,n);if(f&&(r.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),f)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function sM(e,t){var n;return(n=t[e.id])!=null?n:!1}function ZI(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(sM(i,t)?a=!0:o=!1),i.subRows&&i.subRows.length)){const s=ZI(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const qI=/([0-9]+)/gm,qve=(e,t,n)=>pH(Zl(e.getValue(n)).toLowerCase(),Zl(t.getValue(n)).toLowerCase()),$ve=(e,t,n)=>pH(Zl(e.getValue(n)),Zl(t.getValue(n))),Kve=(e,t,n)=>lM(Zl(e.getValue(n)).toLowerCase(),Zl(t.getValue(n)).toLowerCase()),Jve=(e,t,n)=>lM(Zl(e.getValue(n)),Zl(t.getValue(n))),Xve=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},Qve=(e,t,n)=>lM(e.getValue(n),t.getValue(n));function lM(e,t){return e===t?0:e>t?1:-1}function Zl(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pH(e,t){const n=e.split(qI).filter(Boolean),r=t.split(qI).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),a=r.shift(),i=parseInt(o,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return n.length-r.length}const Td={alphanumeric:qve,alphanumericCaseSensitive:$ve,text:Kve,textCaseSensitive:Jve,datetime:Xve,basic:Qve},eye={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Xo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const a=o?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return Td.datetime;if(typeof a=="string"&&(r=!0,a.split(qI).length>1))return Td.alphanumeric}return r?Td.text:Td.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return jb(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Td[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const s=i?.find(m=>m.id===e.id),l=i?.findIndex(m=>m.id===e.id);let u=[],f,h=a?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?s?f="toggle":f="add":i!=null&&i.length&&l!==i.length-1?f="replace":s?f="toggle":f="replace",f==="toggle"&&(a||o||(f="remove")),f==="add"){var p;u=[...i,{id:e.id,desc:h}],u.splice(0,u.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else f==="toggle"?u=i.map(m=>m.id===e.id?{...m,desc:h}:m):f==="remove"?u=i.filter(m=>m.id!==e.id):u=[{id:e.id,desc:h}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},tye={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Xo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ut(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),dt(t.options,"debugRows")),e.getVisibleCells=ut(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],dt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>ut(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),dt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Np(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const $P=[Mve,tye,Vve,Gve,Ove,eye,zve,Nve,Wve,Zve,Dve];function nye(e){var t;e.debugAll||e.debugTable;let n={_features:$P};const r=n._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(n)),{}),o=f=>n.options.mergeOptions?n.options.mergeOptions(r,f):{...r,...f};let i={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(f=>{var h;i=(h=f.getInitialState==null?void 0:f.getInitialState(i))!=null?h:i});const s=[];let l=!1;const u={_features:$P,options:{...r,...e},initialState:i,_queue:f=>{s.push(f),l||(l=!0,Promise.resolve().then(()=>{for(;s.length;)s.shift()();l=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{const h=Fl(f,n.options);n.options=o(h)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,h,p)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,h,p))!=null?m:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!p&&(p=n.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:ut(()=>[n.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,w;return(m=(w=p.renderValue())==null||w.toString==null?void 0:w.toString())!=null?m:null},...n._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},dt(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:ut(()=>[n._getColumnDefs()],f=>{const h=function(p,m,w){return w===void 0&&(w=0),p.map(b=>{const y=Cve(n,b,w,m),S=b;return y.columns=S.columns?h(S.columns,y,w+1):[],y})};return h(f)},dt(e,"debugColumns")),getAllFlatColumns:ut(()=>[n.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),dt(e,"debugColumns")),_getAllFlatColumnsById:ut(()=>[n.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),dt(e,"debugColumns")),getAllLeafColumns:ut(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(m=>m.getLeafColumns());return h(p)},dt(e,"debugColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,u);for(let f=0;f<n._features.length;f++){const h=n._features[f];h==null||h.createTable==null||h.createTable(n)}return n}function rye(e,t,n,r){const o=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:ut(()=>[e,n,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),dt(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e)},{}),a}const cM=(e,t,n,r,o,a,i)=>{let s={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Eve(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const f=u.getParentRow();if(!f)break;l.push(f),u=f}return l.reverse()},getAllCells:ut(()=>[e.getAllLeafColumns()],l=>l.map(u=>rye(e,s,u,u.id)),dt(e.options,"debugRows")),_getAllCellsByColumnId:ut(()=>[s.getAllCells()],l=>l.reduce((u,f)=>(u[f.column.id]=f,u),{}),dt(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s};function oye(){return e=>ut(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,a,i){a===void 0&&(a=0);const s=[];for(let u=0;u<o.length;u++){const f=cM(e,e._getRowId(o[u],u,i),o[u],u,a,void 0,i?.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,s.push(f),e.options.getSubRows){var l;f.originalSubRows=e.options.getSubRows(o[u],u),(l=f.originalSubRows)!=null&&l.length&&(f.subRows=r(f.originalSubRows,a+1,f))}}return s};return n.rows=r(t),n},dt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function mH(e,t,n){return n.options.filterFromLeafRows?aye(e,t,n):iye(e,t,n)}function aye(e,t,n){var r;const o=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const f=[];for(let p=0;p<l.length;p++){var h;let m=l[p];const w=cM(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(w.columnFilters=m.columnFilters,(h=m.subRows)!=null&&h.length&&u<i){if(w.subRows=s(m.subRows,u+1),m=w,t(m)&&!w.subRows.length){f.push(m),a[m.id]=m,o.push(m);continue}if(t(m)||w.subRows.length){f.push(m),a[m.id]=m,o.push(m);continue}}else m=w,t(m)&&(f.push(m),a[m.id]=m,o.push(m))}return f};return{rows:s(e),flatRows:o,rowsById:a}}function iye(e,t,n){var r;const o=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(l,u){u===void 0&&(u=0);const f=[];for(let p=0;p<l.length;p++){let m=l[p];if(t(m)){var h;if((h=m.subRows)!=null&&h.length&&u<i){const b=cM(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);b.subRows=s(m.subRows,u+1),m=b}f.push(m),o.push(m),a[m.id]=m}}return f};return{rows:s(e),flatRows:o,rowsById:a}}function sye(){return e=>ut(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let p=0;p<t.flatRows.length;p++)t.flatRows[p].columnFilters={},t.flatRows[p].columnFiltersMeta={};return t}const o=[],a=[];(n??[]).forEach(p=>{var m;const w=e.getColumn(p.id);if(!w)return;const b=w.getFilterFn();b&&o.push({id:p.id,filterFn:b,resolvedValue:(m=b.resolveFilterValue==null?void 0:b.resolveFilterValue(p.value))!=null?m:p.value})});const i=n.map(p=>p.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(p=>p.getCanGlobalFilter());r&&s&&l.length&&(i.push("__global__"),l.forEach(p=>{var m;a.push({id:p.id,filterFn:s,resolvedValue:(m=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?m:r})}));let u,f;for(let p=0;p<t.flatRows.length;p++){const m=t.flatRows[p];if(m.columnFilters={},o.length)for(let w=0;w<o.length;w++){u=o[w];const b=u.id;m.columnFilters[b]=u.filterFn(m,b,u.resolvedValue,y=>{m.columnFiltersMeta[b]=y})}if(a.length){for(let w=0;w<a.length;w++){f=a[w];const b=f.id;if(f.filterFn(m,b,f.resolvedValue,y=>{m.columnFiltersMeta[b]=y})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const h=p=>{for(let m=0;m<i.length;m++)if(p.columnFilters[i[m]]===!1)return!1;return!0};return mH(t.rows,h,e)},dt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function lye(){return(e,t)=>ut(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const a=[...r.map(s=>s.id).filter(s=>s!==t),o?"__global__":void 0].filter(Boolean),i=s=>{for(let l=0;l<a.length;l++)if(s.columnFilters[a[l]]===!1)return!1;return!0};return mH(n.rows,i,e)},dt(e.options,"debugTable"))}function cye(){return(e,t)=>ut(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let a=0;a<n.flatRows.length;a++){const i=n.flatRows[a].getUniqueValues(t);for(let s=0;s<i.length;s++){const l=i[s];if(r.has(l)){var o;r.set(l,((o=r.get(l))!=null?o:0)+1)}else r.set(l,1)}}return r},dt(e.options,"debugTable"))}function uye(){return(e,t)=>ut(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{var r;if(!n)return;const o=(r=n.flatRows[0])==null?void 0:r.getUniqueValues(t);if(typeof o>"u")return;let a=[o,o];for(let i=0;i<n.flatRows.length;i++){const s=n.flatRows[i].getUniqueValues(t);for(let l=0;l<s.length;l++){const u=s[l];u<a[0]?a[0]=u:u>a[1]&&(a[1]=u)}}return a},dt(e.options,"debugTable"))}function dye(){return e=>ut(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],a=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),i={};a.forEach(l=>{const u=e.getColumn(l.id);u&&(i[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const s=l=>{const u=l.map(f=>({...f}));return u.sort((f,h)=>{for(let m=0;m<a.length;m+=1){var p;const w=a[m],b=i[w.id],y=(p=w?.desc)!=null?p:!1;let S=0;if(b.sortUndefined){const x=f.getValue(w.id),E=h.getValue(w.id),C=x===void 0,M=E===void 0;(C||M)&&(S=C&&M?0:C?b.sortUndefined:-b.sortUndefined)}if(S===0&&(S=b.sortingFn(f,h,w.id)),S!==0)return y&&(S*=-1),b.invertSorting&&(S*=-1),S}return f.index-h.index}),u.forEach(f=>{var h;o.push(f),(h=f.subRows)!=null&&h.length&&(f.subRows=s(f.subRows))}),u};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},dt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function fye(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function hye(e){return t=>ut(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:a}=n;let{rows:i,flatRows:s,rowsById:l}=r;const u=o*a,f=u+o;i=i.slice(u,f);let h;t.options.paginateExpandedRows?h={rows:i,flatRows:s,rowsById:l}:h=fye({rows:i,flatRows:s,rowsById:l}),h.flatRows=[];const p=m=>{h.flatRows.push(m),m.subRows.length&&m.subRows.forEach(p)};return h.rows.forEach(p),h},dt(t.options,"debugTable"))}function KP(e,t){return e?pye(e)?D.createElement(e,t):e:null}function pye(e){return mye(e)||typeof e=="function"||gye(e)}function mye(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function gye(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function vye(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=D.useState(()=>({current:nye(t)})),[r,o]=D.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const gH={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},yye=Object.keys(gH).join("|"),bye=new RegExp(yye,"g");function wye(e){return e.replace(bye,t=>gH[t])}const Io={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Sye(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Io.MATCHES,!n.accessors){const i=JP(e,t,n);return{rankedValue:e,rank:i,accessorIndex:-1,accessorThreshold:n.threshold,passed:i>=n.threshold}}const o=Eye(e,n.accessors),a={rankedValue:e,rank:Io.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let i=0;i<o.length;i++){const s=o[i];let l=JP(s.itemValue,t,n);const{minRanking:u,maxRanking:f,threshold:h=n.threshold}=s.attributes;l<u&&l>=Io.MATCHES?l=u:l>f&&(l=f),l=Math.min(l,f),l>=h&&l>a.rank&&(a.rank=l,a.passed=!0,a.accessorIndex=i,a.accessorThreshold=h,a.rankedValue=s.itemValue)}return a}function JP(e,t,n){return e=XP(e,n),t=XP(t,n),t.length>e.length?Io.NO_MATCH:e===t?Io.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Io.EQUAL:e.startsWith(t)?Io.STARTS_WITH:e.includes(` ${t}`)?Io.WORD_STARTS_WITH:e.includes(t)?Io.CONTAINS:t.length===1?Io.NO_MATCH:Tye(e).includes(t)?Io.ACRONYM:xye(e,t))}function Tye(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(a=>{t+=a.substr(0,1)})}),t}function xye(e,t){let n=0,r=0;function o(l,u,f){for(let h=f,p=u.length;h<p;h++)if(u[h]===l)return n+=1,h+1;return-1}function a(l){const u=1/l,f=n/t.length;return Io.MATCHES+f*u}const i=o(t[0],e,0);if(i<0)return Io.NO_MATCH;r=i;for(let l=1,u=t.length;l<u;l++){const f=t[l];if(r=o(f,e,r),!(r>-1))return Io.NO_MATCH}const s=r-i;return a(s)}function Iye(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}function XP(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=wye(e)),e}function kye(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function Eye(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const a=t[r],i=Cye(a),s=kye(e,a);for(let l=0,u=s.length;l<u;l++)n.push({itemValue:s[l],attributes:i})}return n}const QP={maxRanking:1/0,minRanking:-1/0};function Cye(e){return typeof e=="function"?QP:{...QP,...e}}var Mye={fieldSeparator:",",decimalSeparator:".",quoteStrings:!0,quoteCharacter:'"',showTitle:!1,title:"My Generated Report",filename:"generated",showColumnHeaders:!0,useTextFile:!1,useBom:!0,columnHeaders:[],useKeysAsHeaders:!1,boolDisplay:{true:"TRUE",false:"FALSE"},replaceUndefinedWith:""},Dye=`\r
`,Aye="\uFEFF",vH=e=>Object.assign({},Mye,e);let Nye=class extends Error{constructor(t){super(t),this.name="CsvGenerationError"}},Oye=class extends Error{constructor(t){super(t),this.name="EmptyHeadersError"}};var Sg=e=>e,ri=e=>e,M0=Sg,qd=Sg,e3=Sg,t3=Sg,Pye=function(e,t){return t=='"'&&e.indexOf('"')>-1?e.replace(/"/g,'""'):e},jye=e=>e3(typeof e=="object"?e.key:e),Lye=e=>t3(typeof e=="object"?e.displayLabel:e),Rye=(e,...t)=>t.reduce((n,r)=>r(n),e),Fye=e=>t=>e.useBom?M0(ri(t)+Aye):t,Hye=e=>t=>e.showTitle?uM(M0(ri(t)+e.title))(qd("")):t,uM=e=>t=>M0(ri(e)+ri(t)+Dye),yH=e=>(t,n)=>Bye(e)(qd(t+n)),Bye=e=>t=>Sg(ri(t)+e.fieldSeparator),_ye=(e,t)=>n=>{if(!e.showColumnHeaders)return n;if(t.length<1)throw new Oye("Option to show headers but none supplied. Make sure there are keys in your collection or that you've supplied headers through the config options.");let r=qd("");for(let o=0;o<t.length;o++){const a=Lye(t[o]);r=yH(e)(r,bH(e,a))}return r=qd(ri(r).slice(0,-1)),uM(n)(r)},Yye=(e,t,n)=>r=>{let o=r;for(var a=0;a<n.length;a++){let i=qd("");for(let s=0;s<t.length;s++){const l=jye(t[s]),u=typeof n[a][ri(l)]>"u"?e.replaceUndefinedWith:n[a][ri(l)];i=yH(e)(i,bH(e,u))}i=qd(ri(i).slice(0,-1)),o=uM(o)(i)}return o},zye=ri,n3=e=>+e===e&&(!isFinite(e)||!!(e%1)),bH=(e,t)=>{if(e.decimalSeparator==="locale"&&n3(t))return t.toLocaleString();if(e.decimalSeparator!=="."&&n3(t))return t.toString().replace(".",e.decimalSeparator);if(typeof t=="string"){let n=t;return(e.quoteStrings||e.fieldSeparator&&t.indexOf(e.fieldSeparator)>-1||e.quoteCharacter&&t.indexOf(e.quoteCharacter)>-1||t.indexOf(`
`)>-1||t.indexOf("\r")>-1)&&(n=e.quoteCharacter+Pye(t,e.quoteCharacter)+e.quoteCharacter),n}if(typeof t=="boolean"&&e.boolDisplay){const n=t?"true":"false";return e.boolDisplay[n]}return t},Uye=e=>t=>{const n=vH(e),r=n.useKeysAsHeaders?Object.keys(t[0]):n.columnHeaders;let o=Rye(M0(""),Fye(n),Hye(n),_ye(n,r),Yye(n,r,t));if(ri(o).length<1)throw new Nye("Output is empty. Is your data formatted correctly?");return o};const Vye=({thino:e})=>{const t=D.useRef(null);D.useEffect(()=>(t.current&&A.setIcon(t.current,"pin"),()=>{t.current&&(t.current=null)}),[t]);const n=D.useCallback(async()=>{e.pinned?await le.unpinMemoById(e.id):await le.pinMemoById(e.id)},[e]);return g.jsx("span",{ref:t,className:qt("pinned-status",e.pinned?"pinned":"not-pinned"),onClick:n})},Wye=({thino:e})=>{const t=D.useRef(null);D.useEffect(()=>(t.current&&A.setIcon(t.current,e.thinoType==="JOURNAL"?"calendar":"check-square"),()=>{t.current&&(t.current=null)}),[t,e?.thinoType]);const n=D.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const r=await le.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");r&&le.editMemo(r)},[e]);return g.jsx(g.Fragment,{children:e.thinoType!=="JOURNAL"?g.jsx("input",{className:qt("thino-type-status","task-list-item-checkbox"),type:"checkbox",checked:e.thinoType!=="TASK-TODO","data-task":e.thinoType==="TASK-TODO"?"":e.thinoType==="TASK-DONE"?"x":e.thinoType?.slice(5),onClick:n}):g.jsx("span",{ref:t,className:"thino-type-status"})})},Gye=({id:e,path:t})=>{const n=D.useRef(null);D.useEffect(()=>(n.current&&A.setIcon(n.current,"link"),()=>{n.current&&(n.current=null)}),[]);const r=D.useCallback(()=>{!e||!t||le.openThinoByID(e)},[e,t]);return g.jsxs("span",{className:"source-thino",onClick:r,children:[g.jsx("span",{children:t}),g.jsx("span",{ref:n,className:"source-thino-icon"})]})},Zye=({id:e,sourceType:t})=>{const n=D.useRef(null);D.useEffect(()=>(n.current&&A.setIcon(n.current,zp.find(o=>o.title===t)?.icon||"list"),()=>{n.current&&(n.current=null)}),[]);const r=D.useCallback(async()=>{e&&await le.openThinoByID(e)},[e]);return g.jsx("span",{ref:n,className:"source-type-icon",onClick:r})},r3=(e,t,n,r)=>{const o=Sye(e.getValue(t),n);return r({itemRank:o}),o.passed},o3=(e,t,n)=>{let r=0;return e.columnFiltersMeta[n]&&(r=Iye(e.columnFiltersMeta[n]?.itemRank,t.columnFiltersMeta[n]?.itemRank)),r===0?Td.alphanumeric(e,t,n):r},qye=vH({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!0}),$ye=e=>e+`
`;function Kye({thinos:e,isFiltering:t}){_.useReducer(()=>({}),{})[1];const[n,r]=_.useState([]),[o,a]=_.useState(""),i=_.useMemo(()=>[{header:I("Basic Info"),footer:m=>m.column.id,columns:[{accessorKey:"createdAt",header:()=>g.jsx("span",{className:"create-at-header-cell",children:I("Created At")}),cell:m=>m.getValue(),footer:m=>m.column.id,enableColumnFilter:!1},{accessorFn:m=>m.content,id:"content",header:()=>g.jsx("span",{className:"thino-header-cell",children:I("Thino")}),cell:m=>g.jsx(no,{memo:m.row.original,type:"table"}),footer:m=>m.column.id,filterFn:"fuzzy",sortingFn:o3},{accessorFn:m=>m.thinoType,id:"thinoType",cell:m=>g.jsx(Wye,{thino:m.row.original}),header:()=>g.jsx("span",{children:I("Thino Type")}),footer:m=>m.column.id},{accessorFn:m=>m.sourceType,id:"sourceType",cell:m=>g.jsx(Zye,{id:m.row.original.id,sourceType:m.getValue()}),header:()=>g.jsx("span",{children:I("Source Type")}),footer:m=>m.column.id}]},{header:I("Additional Info"),footer:m=>m.column.id,columns:[{accessorKey:"pinned",header:()=>g.jsx("span",{children:I("Pinned Status")}),cell:m=>g.jsx(Vye,{thino:m.row.original}),footer:m=>m.column.id,filterFn:"fuzzy",sortingFn:o3},{accessorKey:"rowStatus",header:()=>g.jsx("span",{children:I("Row status")}),cell:m=>g.jsx("span",{children:m.getValue()==="NORMAL"?"":m.getValue()}),footer:m=>m.column.id},{accessorKey:"path",header:()=>I("Path"),cell:m=>g.jsx(Gye,{id:m.row.original.id,path:m.getValue()}),footer:m=>m.column.id}]}],[]),[s,l]=_.useState(()=>e),u=()=>l(m=>e);D.useEffect(()=>{u()},[e]);const f=vye({data:s,columns:i,filterFns:{fuzzy:r3},initialState:{pagination:{pageSize:20}},state:{columnFilters:n,globalFilter:o},onColumnFiltersChange:r,onGlobalFilterChange:a,globalFilterFn:r3,getCoreRowModel:oye(),getFilteredRowModel:sye(),getSortedRowModel:dye(),getPaginationRowModel:hye(),getFacetedRowModel:lye(),getFacetedUniqueValues:cye(),getFacetedMinMaxValues:uye(),debugTable:!1,debugHeaders:!1,debugColumns:!1});_.useEffect(()=>{f.getState().columnFilters[0]?.id==="createdAt"&&f.getState().sorting[0]?.id!=="createdAt"&&f.setSorting([{id:"createdAt",desc:!1}])},[f.getState().columnFilters[0]?.id]);async function h(m,w){const b=I("Created At"),y=I("Updated At"),S=I("Content"),x=I("Path"),E=m.map(F=>({[b]:F.createdAt,[y]:F.updatedAt,[S]:F.content,Thino:`=hyperlink("obsidian://thino?openId=${F.id}","${F.id}")`,[x]:`=hyperlink("obsidian://open?path=${A.normalizePath(F.path)},"${F.path}")`})),C=Uye(qye)(E),M=Ze.getState().app||window.app,k=$ye(zye(C));return{file:await M.vault.create(`${w}-${je.randomId(6)}.csv`,k),app:M}}async function p(m){const{file:w,app:b}=await h(m.map(x=>x.original),"thino-export"),y=document.createDocumentFragment(),S=y.createEl("div",{cls:"export-file-btn-group"});y.createEl("div",{cls:"open-file-button"}),new A.Setting(S).setName(I("Exported CSV file")).addButton(x=>{x.setButtonText(I("Open File")).onClick(()=>{const E=A.normalizePath(w.path);b.openWithDefaultApp(E)})}),new A.Notice(y)}return g.jsxs("div",{className:"table-view",children:[g.jsxs("div",{children:[g.jsx(Ky,{value:o||"",onChange:m=>a(String(m)),className:"table-search-bar",placeholder:I("Search all columns...")}),A.Platform.isDesktop&&(o||n.length>0||t)&&g.jsx("button",{className:"mod-cta",disabled:f.getPrePaginationRowModel().rows.length===0,onClick:()=>p(f.getPrePaginationRowModel().rows),children:I("Export to CSV")})]}),g.jsxs("table",{className:"thino-table",children:[g.jsx("thead",{children:f.getHeaderGroups().map(m=>g.jsx("tr",{children:m.headers.map(w=>g.jsx("th",{colSpan:w.colSpan,children:w.isPlaceholder?null:g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:qt(w.column.getCanSort()?"filter-header":"","table-header",w.column.id==="content"?"content-header":""),onClick:w.column.getToggleSortingHandler(),children:[KP(w.column.columnDef.header,w.getContext()),{asc:" 🔼",desc:" 🔽"}[w.column.getIsSorted()]??null]}),w.column.getCanFilter()?g.jsx(Xye,{column:w.column,table:f}):null]})},w.id))},m.id))}),g.jsx("tbody",{children:f.getRowModel().rows.map(m=>g.jsx("tr",{className:qt(m.getValue("pinned")?"pinned":""),children:m.getVisibleCells().map(w=>g.jsx("td",{children:KP(w.column.columnDef.cell,w.getContext())},w.id))},m.id))})]}),g.jsxs("div",{className:"table-nav-bar",children:[g.jsx("button",{className:"prev-start-btn",onClick:()=>f.setPageIndex(0),disabled:!f.getCanPreviousPage(),children:"<<"}),g.jsx("button",{className:"prev-btn",onClick:()=>f.previousPage(),disabled:!f.getCanPreviousPage(),children:"<"}),g.jsx("button",{className:"next-btn",onClick:()=>f.nextPage(),disabled:!f.getCanNextPage(),children:">"}),g.jsx("button",{className:"next-end-btn",onClick:()=>f.setPageIndex(f.getPageCount()-1),disabled:!f.getCanNextPage(),children:">>"}),g.jsxs("span",{className:"table-page-info",children:[g.jsx("div",{children:I("Page")}),g.jsxs("strong",{children:[f.getState().pagination.pageIndex+1," of ",f.getPageCount()]})]}),g.jsxs("span",{className:"table-page-jump",children:["| ",I("Go to page"),":",g.jsx("input",{type:"number",defaultValue:f.getState().pagination.pageIndex+1,onChange:m=>{const w=m.target.value?Number(m.target.value)-1:0;f.setPageIndex(w)},className:"jump-inputer"})]}),g.jsx("select",{value:f.getState().pagination.pageSize,onChange:m=>{f.setPageSize(Number(m.target.value))},children:[10,20,30,40,50].map(m=>g.jsxs("option",{value:m,children:[I("Show")," ",m," ",I("rows")]},m))})]})]})}const Jye=e=>e==="sourceType"?["ALL"]:["ALL","ALL-TASK"];function Xye({column:e,table:t}){const n=t.getPreFilteredRowModel().flatRows[0]?.getValue(e.id),r=e.getFilterValue(),o=_.useMemo(()=>typeof n=="number"?[]:Array.from(e.getFacetedUniqueValues().keys()).sort(),[e.getFacetedUniqueValues()]);return typeof n=="number"?g.jsx("div",{children:g.jsxs("div",{className:"filter-input-group",children:[g.jsx(Ky,{type:"number",min:Number(e.getFacetedMinMaxValues()?.[0]??""),max:Number(e.getFacetedMinMaxValues()?.[1]??""),value:r?.[0]??"",onChange:a=>e.setFilterValue(i=>[a,i?.[1]]),placeholder:`Min ${e.getFacetedMinMaxValues()?.[0]?`(${e.getFacetedMinMaxValues()?.[0]})`:""}`,className:"filter-input-short"}),g.jsx(Ky,{type:"number",min:Number(e.getFacetedMinMaxValues()?.[0]??""),max:Number(e.getFacetedMinMaxValues()?.[1]??""),value:r?.[1]??"",onChange:a=>e.setFilterValue(i=>[i?.[0],a]),placeholder:`Max ${e.getFacetedMinMaxValues()?.[1]?`(${e.getFacetedMinMaxValues()?.[1]})`:""}`,className:"filter-input-short"})]})}):g.jsx(g.Fragment,{children:o.length>1?g.jsxs(g.Fragment,{children:[e.id!=="path"&&e.id!=="content"&&e.id!=="thinoType"&&e.id!=="sourceType"&&g.jsx("datalist",{id:e.id+"list",children:o.slice(0,5e3).map(a=>g.jsx("option",{value:a},a))}),e.id==="thinoType"||e.id==="sourceType"?g.jsx("select",{id:e.id,onChange:a=>e.setFilterValue(a.target.value==="ALL"?"":a.target.value==="ALL-TASK"?"TASK":a.target.value),children:[...Jye(e.id),...o].map(a=>g.jsx("option",{value:a,children:I(a)||a},a))}):"",e.id!=="thinoType"&&e.id!=="sourceType"?g.jsx(Ky,{type:"text",value:r??"",onChange:a=>e.setFilterValue(a),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,className:"filter-input-long",list:e.id+"list"}):""]}):""})}function Ky({value:e,onChange:t,debounce:n=500,...r}){const[o,a]=_.useState(e);return _.useEffect(()=>{a(e)},[e]),_.useEffect(()=>{const i=setTimeout(()=>{t(o)},n);return()=>clearTimeout(i)},[o]),g.jsx("input",{...r,value:o,onChange:i=>a(i.target.value)})}function Qye(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function ebe(){Qye("react-scroll-to-bottom:version","4.2.0")}var qh=function(e){return e&&e.Math===Math&&e},Cr=qh(typeof globalThis=="object"&&globalThis)||qh(typeof window=="object"&&window)||qh(typeof self=="object"&&self)||qh(typeof ur=="object"&&ur)||qh(typeof ur=="object"&&ur)||function(){return this}()||Function("return this")(),tr=function(e){try{return!!e()}catch{return!0}},tbe=tr,D0=!tbe(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),nbe=D0,wH=Function.prototype,a3=wH.apply,i3=wH.call,dM=typeof Reflect=="object"&&Reflect.apply||(nbe?i3.bind(a3):function(){return i3.apply(a3,arguments)}),SH=D0,TH=Function.prototype,$I=TH.call,rbe=SH&&TH.bind.bind($I,$I),nr=SH?rbe:function(e){return function(){return $I.apply(e,arguments)}},xH=nr,obe=xH({}.toString),abe=xH("".slice),Zf=function(e){return abe(obe(e),8,-1)},ibe=Zf,sbe=nr,fM=function(e){if(ibe(e)==="Function")return sbe(e)},H1=typeof document=="object"&&document.all,Zr=typeof H1>"u"&&H1!==void 0?function(e){return typeof e=="function"||e===H1}:function(e){return typeof e=="function"},Tg={},lbe=tr,jo=!lbe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),cbe=D0,sy=Function.prototype.call,ts=cbe?sy.bind(sy):function(){return sy.apply(sy,arguments)},hM={},IH={}.propertyIsEnumerable,kH=Object.getOwnPropertyDescriptor,ube=kH&&!IH.call({1:2},1);hM.f=ube?function(t){var n=kH(this,t);return!!n&&n.enumerable}:IH;var xg=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},dbe=nr,fbe=tr,hbe=Zf,B1=Object,pbe=dbe("".split),EH=fbe(function(){return!B1("z").propertyIsEnumerable(0)})?function(e){return hbe(e)==="String"?pbe(e,""):B1(e)}:B1,pM=function(e){return e==null},mbe=pM,gbe=TypeError,mM=function(e){if(mbe(e))throw new gbe("Can't call method on "+e);return e},vbe=EH,ybe=mM,ns=function(e){return vbe(ybe(e))},bbe=Zr,tl=function(e){return typeof e=="object"?e!==null:bbe(e)},Mr={},_1=Mr,Y1=Cr,wbe=Zr,s3=function(e){return wbe(e)?e:void 0},rs=function(e,t){return arguments.length<2?s3(_1[e])||s3(Y1[e]):_1[e]&&_1[e][t]||Y1[e]&&Y1[e][t]},Sbe=nr,nl=Sbe({}.isPrototypeOf),CH=typeof navigator<"u"&&String(navigator.userAgent)||"",MH=Cr,z1=CH,l3=MH.process,c3=MH.Deno,u3=l3&&l3.versions||c3&&c3.version,d3=u3&&u3.v8,$a,Lb;d3&&($a=d3.split("."),Lb=$a[0]>0&&$a[0]<4?1:+($a[0]+$a[1]));!Lb&&z1&&($a=z1.match(/Edge\/(\d+)/),(!$a||$a[1]>=74)&&($a=z1.match(/Chrome\/(\d+)/),$a&&(Lb=+$a[1])));var gM=Lb,f3=gM,Tbe=tr,xbe=Cr,Ibe=xbe.String,qf=!!Object.getOwnPropertySymbols&&!Tbe(function(){var e=Symbol("symbol detection");return!Ibe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&f3&&f3<41}),kbe=qf,DH=kbe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ebe=rs,Cbe=Zr,Mbe=nl,Dbe=DH,Abe=Object,Ig=Dbe?function(e){return typeof e=="symbol"}:function(e){var t=Ebe("Symbol");return Cbe(t)&&Mbe(t.prototype,Abe(e))},Nbe=String,A0=function(e){try{return Nbe(e)}catch{return"Object"}},Obe=Zr,Pbe=A0,jbe=TypeError,vM=function(e){if(Obe(e))return e;throw new jbe(Pbe(e)+" is not a function")},Lbe=vM,Rbe=pM,yM=function(e,t){var n=e[t];return Rbe(n)?void 0:Lbe(n)},U1=ts,V1=Zr,W1=tl,Fbe=TypeError,Hbe=function(e,t){var n,r;if(t==="string"&&V1(n=e.toString)&&!W1(r=U1(n,e))||V1(n=e.valueOf)&&!W1(r=U1(n,e))||t!=="string"&&V1(n=e.toString)&&!W1(r=U1(n,e)))return r;throw new Fbe("Can't convert object to primitive value")},AH={exports:{}},h3=Cr,Bbe=Object.defineProperty,_be=function(e,t){try{Bbe(h3,e,{value:t,configurable:!0,writable:!0})}catch{h3[e]=t}return t},Ybe=Cr,zbe=_be,p3="__core-js_shared__",m3=AH.exports=Ybe[p3]||zbe(p3,{});(m3.versions||(m3.versions=[])).push({version:"3.37.0",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var bM=AH.exports,g3=bM,$f=function(e,t){return g3[e]||(g3[e]=t||{})},Ube=mM,Vbe=Object,rl=function(e){return Vbe(Ube(e))},Wbe=nr,Gbe=rl,Zbe=Wbe({}.hasOwnProperty),ea=Object.hasOwn||function(t,n){return Zbe(Gbe(t),n)},qbe=nr,$be=0,Kbe=Math.random(),Jbe=qbe(1 .toString),wM=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Jbe(++$be+Kbe,36)},Xbe=Cr,Qbe=$f,v3=ea,ewe=wM,twe=qf,nwe=DH,kd=Xbe.Symbol,G1=Qbe("wks"),rwe=nwe?kd.for||kd:kd&&kd.withoutSetter||ewe,hr=function(e){return v3(G1,e)||(G1[e]=twe&&v3(kd,e)?kd[e]:rwe("Symbol."+e)),G1[e]},owe=ts,y3=tl,b3=Ig,awe=yM,iwe=Hbe,swe=hr,lwe=TypeError,cwe=swe("toPrimitive"),uwe=function(e,t){if(!y3(e)||b3(e))return e;var n=awe(e,cwe),r;if(n){if(t===void 0&&(t="default"),r=owe(n,e,t),!y3(r)||b3(r))return r;throw new lwe("Can't convert object to primitive value")}return t===void 0&&(t="number"),iwe(e,t)},dwe=uwe,fwe=Ig,SM=function(e){var t=dwe(e,"string");return fwe(t)?t:t+""},hwe=Cr,w3=tl,KI=hwe.document,pwe=w3(KI)&&w3(KI.createElement),NH=function(e){return pwe?KI.createElement(e):{}},mwe=jo,gwe=tr,vwe=NH,OH=!mwe&&!gwe(function(){return Object.defineProperty(vwe("div"),"a",{get:function(){return 7}}).a!==7}),ywe=jo,bwe=ts,wwe=hM,Swe=xg,Twe=ns,xwe=SM,Iwe=ea,kwe=OH,S3=Object.getOwnPropertyDescriptor;Tg.f=ywe?S3:function(t,n){if(t=Twe(t),n=xwe(n),kwe)try{return S3(t,n)}catch{}if(Iwe(t,n))return Swe(!bwe(wwe.f,t,n),t[n])};var Ewe=tr,Cwe=Zr,Mwe=/#|\.prototype\./,kg=function(e,t){var n=Awe[Dwe(e)];return n===Owe?!0:n===Nwe?!1:Cwe(t)?Ewe(t):!!t},Dwe=kg.normalize=function(e){return String(e).replace(Mwe,".").toLowerCase()},Awe=kg.data={},Nwe=kg.NATIVE="N",Owe=kg.POLYFILL="P",Pwe=kg,T3=fM,jwe=vM,Lwe=D0,Rwe=T3(T3.bind),TM=function(e,t){return jwe(e),t===void 0?e:Lwe?Rwe(e,t):function(){return e.apply(t,arguments)}},li={},Fwe=jo,Hwe=tr,PH=Fwe&&Hwe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Bwe=tl,_we=String,Ywe=TypeError,Jl=function(e){if(Bwe(e))return e;throw new Ywe(_we(e)+" is not an object")},zwe=jo,Uwe=OH,Vwe=PH,ly=Jl,x3=SM,Wwe=TypeError,Z1=Object.defineProperty,Gwe=Object.getOwnPropertyDescriptor,q1="enumerable",$1="configurable",K1="writable";li.f=zwe?Vwe?function(t,n,r){if(ly(t),n=x3(n),ly(r),typeof t=="function"&&n==="prototype"&&"value"in r&&K1 in r&&!r[K1]){var o=Gwe(t,n);o&&o[K1]&&(t[n]=r.value,r={configurable:$1 in r?r[$1]:o[$1],enumerable:q1 in r?r[q1]:o[q1],writable:!1})}return Z1(t,n,r)}:Z1:function(t,n,r){if(ly(t),n=x3(n),ly(r),Uwe)try{return Z1(t,n,r)}catch{}if("get"in r||"set"in r)throw new Wwe("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var Zwe=jo,qwe=li,$we=xg,N0=Zwe?function(e,t,n){return qwe.f(e,t,$we(1,n))}:function(e,t,n){return e[t]=n,e},$h=Cr,Kwe=dM,Jwe=fM,Xwe=Zr,Qwe=Tg.f,e0e=Pwe,dd=Mr,t0e=TM,fd=N0,I3=ea,n0e=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return Kwe(e,this,arguments)};return t.prototype=e.prototype,t},on=function(e,t){var n=e.target,r=e.global,o=e.stat,a=e.proto,i=r?$h:o?$h[n]:$h[n]&&$h[n].prototype,s=r?dd:dd[n]||fd(dd,n,{})[n],l=s.prototype,u,f,h,p,m,w,b,y,S;for(p in t)u=e0e(r?p:n+(o?".":"#")+p,e.forced),f=!u&&i&&I3(i,p),w=s[p],f&&(e.dontCallGetSet?(S=Qwe(i,p),b=S&&S.value):b=i[p]),m=f&&b?b:t[p],!(!u&&!a&&typeof w==typeof m)&&(e.bind&&f?y=t0e(m,$h):e.wrap&&f?y=n0e(m):a&&Xwe(m)?y=Jwe(m):y=m,(e.sham||m&&m.sham||w&&w.sham)&&fd(y,"sham",!0),fd(s,p,y),a&&(h=n+"Prototype",I3(dd,h)||fd(dd,h,{}),fd(dd[h],p,m),e.real&&l&&(u||!l[p])&&fd(l,p,m)))},r0e=Zf,Kf=Array.isArray||function(t){return r0e(t)==="Array"},o0e=on,a0e=Kf;o0e({target:"Array",stat:!0},{isArray:a0e});var i0e=Mr,s0e=i0e.Array.isArray,l0e=s0e,jH=l0e,c0e=jH,u0e=c0e,d0e=u0e,f0e=d0e,h0e=f0e;const LH=Xe(h0e);function p0e(e){if(LH(e))return e}var m0e=Math.ceil,g0e=Math.floor,v0e=Math.trunc||function(t){var n=+t;return(n>0?g0e:m0e)(n)},y0e=v0e,O0=function(e){var t=+e;return t!==t||t===0?0:y0e(t)},b0e=O0,w0e=Math.min,S0e=function(e){var t=b0e(e);return t>0?w0e(t,9007199254740991):0},T0e=S0e,Tu=function(e){return T0e(e.length)},x0e=TypeError,I0e=9007199254740991,xM=function(e){if(e>I0e)throw x0e("Maximum allowed index exceeded");return e},k0e=jo,E0e=li,C0e=xg,Eg=function(e,t,n){k0e?E0e.f(e,t,C0e(0,n)):e[t]=n},M0e=hr,D0e=M0e("toStringTag"),RH={};RH[D0e]="z";var IM=String(RH)==="[object z]",A0e=IM,N0e=Zr,Jy=Zf,O0e=hr,P0e=O0e("toStringTag"),j0e=Object,L0e=Jy(function(){return arguments}())==="Arguments",R0e=function(e,t){try{return e[t]}catch{}},Cg=A0e?Jy:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=R0e(t=j0e(e),P0e))=="string"?n:L0e?Jy(t):(r=Jy(t))==="Object"&&N0e(t.callee)?"Arguments":r},F0e=nr,H0e=Zr,JI=bM,B0e=F0e(Function.toString);H0e(JI.inspectSource)||(JI.inspectSource=function(e){return B0e(e)});var _0e=JI.inspectSource,Y0e=nr,z0e=tr,FH=Zr,U0e=Cg,V0e=rs,W0e=_0e,HH=function(){},BH=V0e("Reflect","construct"),kM=/^\s*(?:class|function)\b/,G0e=Y0e(kM.exec),Z0e=!kM.test(HH),Kh=function(t){if(!FH(t))return!1;try{return BH(HH,[],t),!0}catch{return!1}},_H=function(t){if(!FH(t))return!1;switch(U0e(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Z0e||!!G0e(kM,W0e(t))}catch{return!0}};_H.sham=!0;var EM=!BH||z0e(function(){var e;return Kh(Kh.call)||!Kh(Object)||!Kh(function(){e=!0})||e})?_H:Kh,k3=Kf,q0e=EM,$0e=tl,K0e=hr,J0e=K0e("species"),E3=Array,X0e=function(e){var t;return k3(e)&&(t=e.constructor,q0e(t)&&(t===E3||k3(t.prototype))?t=void 0:$0e(t)&&(t=t[J0e],t===null&&(t=void 0))),t===void 0?E3:t},Q0e=X0e,CM=function(e,t){return new(Q0e(e))(t===0?0:t)},eSe=tr,tSe=hr,nSe=gM,rSe=tSe("species"),P0=function(e){return nSe>=51||!eSe(function(){var t=[],n=t.constructor={};return n[rSe]=function(){return{foo:1}},t[e](Boolean).foo!==1})},oSe=on,aSe=tr,iSe=Kf,sSe=tl,lSe=rl,cSe=Tu,C3=xM,M3=Eg,uSe=CM,dSe=P0,fSe=hr,hSe=gM,YH=fSe("isConcatSpreadable"),pSe=hSe>=51||!aSe(function(){var e=[];return e[YH]=!1,e.concat()[0]!==e}),mSe=function(e){if(!sSe(e))return!1;var t=e[YH];return t!==void 0?!!t:iSe(e)},gSe=!pSe||!dSe("concat");oSe({target:"Array",proto:!0,forced:gSe},{concat:function(t){var n=lSe(this),r=uSe(n,0),o=0,a,i,s,l,u;for(a=-1,s=arguments.length;a<s;a++)if(u=a===-1?n:arguments[a],mSe(u))for(l=cSe(u),C3(o+l),i=0;i<l;i++,o++)i in u&&M3(r,o,u[i]);else C3(o+1),M3(r,o++,u);return r.length=o,r}});var vSe=Cg,ySe=String,Mg=function(e){if(vSe(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return ySe(e)},j0={},bSe=O0,wSe=Math.max,SSe=Math.min,MM=function(e,t){var n=bSe(e);return n<0?wSe(n+t,0):SSe(n,t)},TSe=ns,xSe=MM,ISe=Tu,kSe=function(e){return function(t,n,r){var o=TSe(t),a=ISe(o);if(a===0)return!e&&-1;var i=xSe(r,a),s;if(e&&n!==n){for(;a>i;)if(s=o[i++],s!==s)return!0}else for(;a>i;i++)if((e||i in o)&&o[i]===n)return e||i||0;return!e&&-1}},zH={indexOf:kSe(!1)},L0={},ESe=nr,J1=ea,CSe=ns,MSe=zH.indexOf,DSe=L0,D3=ESe([].push),UH=function(e,t){var n=CSe(e),r=0,o=[],a;for(a in n)!J1(DSe,a)&&J1(n,a)&&D3(o,a);for(;t.length>r;)J1(n,a=t[r++])&&(~MSe(o,a)||D3(o,a));return o},DM=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ASe=UH,NSe=DM,AM=Object.keys||function(t){return ASe(t,NSe)},OSe=jo,PSe=PH,jSe=li,LSe=Jl,RSe=ns,FSe=AM;j0.f=OSe&&!PSe?Object.defineProperties:function(t,n){LSe(t);for(var r=RSe(n),o=FSe(n),a=o.length,i=0,s;a>i;)jSe.f(t,s=o[i++],r[s]);return t};var HSe=rs,BSe=HSe("document","documentElement"),_Se=$f,YSe=wM,A3=_Se("keys"),R0=function(e){return A3[e]||(A3[e]=YSe(e))},zSe=Jl,USe=j0,N3=DM,VSe=L0,WSe=BSe,GSe=NH,ZSe=R0,O3=">",P3="<",XI="prototype",QI="script",VH=ZSe("IE_PROTO"),X1=function(){},WH=function(e){return P3+QI+O3+e+P3+"/"+QI+O3},j3=function(e){e.write(WH("")),e.close();var t=e.parentWindow.Object;return e=null,t},qSe=function(){var e=GSe("iframe"),t="java"+QI+":",n;return e.style.display="none",WSe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(WH("document.F=Object")),n.close(),n.F},cy,Xy=function(){try{cy=new ActiveXObject("htmlfile")}catch{}Xy=typeof document<"u"?document.domain&&cy?j3(cy):qSe():j3(cy);for(var e=N3.length;e--;)delete Xy[XI][N3[e]];return Xy()};VSe[VH]=!0;var NM=Object.create||function(t,n){var r;return t!==null?(X1[XI]=zSe(t),r=new X1,X1[XI]=null,r[VH]=t):r=Xy(),n===void 0?r:USe.f(r,n)},F0={},$Se=UH,KSe=DM,JSe=KSe.concat("length","prototype");F0.f=Object.getOwnPropertyNames||function(t){return $Se(t,JSe)};var GH={},XSe=nr,H0=XSe([].slice),QSe=Zf,eTe=ns,ZH=F0.f,tTe=H0,qH=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],nTe=function(e){try{return ZH(e)}catch{return tTe(qH)}};GH.f=function(t){return qH&&QSe(t)==="Window"?nTe(t):ZH(eTe(t))};var B0={};B0.f=Object.getOwnPropertySymbols;var rTe=N0,_0=function(e,t,n,r){return r&&r.enumerable?e[t]=n:rTe(e,t,n),e},oTe=li,aTe=function(e,t,n){return oTe.f(e,t,n)},Dg={},iTe=hr;Dg.f=iTe;var L3=Mr,sTe=ea,lTe=Dg,cTe=li.f,On=function(e){var t=L3.Symbol||(L3.Symbol={});sTe(t,e)||cTe(t,e,{value:lTe.f(e)})},uTe=ts,dTe=rs,fTe=hr,hTe=_0,$H=function(){var e=dTe("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=fTe("toPrimitive");t&&!t[r]&&hTe(t,r,function(o){return uTe(n,this)},{})},pTe=IM,mTe=Cg,gTe=pTe?{}.toString:function(){return"[object "+mTe(this)+"]"},vTe=IM,yTe=li.f,bTe=N0,wTe=ea,STe=gTe,TTe=hr,R3=TTe("toStringTag"),Jf=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(wTe(o,R3)||yTe(o,R3,{configurable:!0,value:t}),r&&!vTe&&bTe(o,"toString",STe))},xTe=Cr,ITe=Zr,F3=xTe.WeakMap,kTe=ITe(F3)&&/native code/.test(String(F3)),ETe=kTe,KH=Cr,CTe=tl,MTe=N0,Q1=ea,ex=bM,DTe=R0,ATe=L0,H3="Object already initialized",ek=KH.TypeError,NTe=KH.WeakMap,Rb,lm,Fb,OTe=function(e){return Fb(e)?lm(e):Rb(e,{})},PTe=function(e){return function(t){var n;if(!CTe(t)||(n=lm(t)).type!==e)throw new ek("Incompatible receiver, "+e+" required");return n}};if(ETe||ex.state){var Ai=ex.state||(ex.state=new NTe);Ai.get=Ai.get,Ai.has=Ai.has,Ai.set=Ai.set,Rb=function(e,t){if(Ai.has(e))throw new ek(H3);return t.facade=e,Ai.set(e,t),t},lm=function(e){return Ai.get(e)||{}},Fb=function(e){return Ai.has(e)}}else{var hd=DTe("state");ATe[hd]=!0,Rb=function(e,t){if(Q1(e,hd))throw new ek(H3);return t.facade=e,MTe(e,hd,t),t},lm=function(e){return Q1(e,hd)?e[hd]:{}},Fb=function(e){return Q1(e,hd)}}var OM={set:Rb,get:lm,has:Fb,enforce:OTe,getterFor:PTe},jTe=TM,LTe=nr,RTe=EH,FTe=rl,HTe=Tu,BTe=CM,B3=LTe([].push),_3=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,a=e===6,i=e===7,s=e===5||a;return function(l,u,f,h){for(var p=FTe(l),m=RTe(p),w=HTe(m),b=jTe(u,f),y=0,S=h||BTe,x=t?S(l,w):n||i?S(l,0):void 0,E,C;w>y;y++)if((s||y in m)&&(E=m[y],C=b(E,y,p),e))if(t)x[y]=C;else if(C)switch(e){case 3:return!0;case 5:return E;case 6:return y;case 2:B3(x,E)}else switch(e){case 4:return!1;case 7:B3(x,E)}return a?-1:r||o?o:x}},PM={forEach:_3(0),filter:_3(2)},Y0=on,Ag=Cr,jM=ts,_Te=nr,$d=jo,Kd=qf,YTe=tr,cr=ea,zTe=nl,tk=Jl,z0=ns,LM=SM,UTe=Mg,nk=xg,Jd=NM,JH=AM,VTe=F0,XH=GH,WTe=B0,QH=Tg,e7=li,GTe=j0,t7=hM,Y3=_0,ZTe=aTe,RM=$f,qTe=R0,n7=L0,z3=wM,$Te=hr,KTe=Dg,JTe=On,XTe=$H,QTe=Jf,r7=OM,U0=PM.forEach,Co=qTe("hidden"),V0="Symbol",cm="prototype",e1e=r7.set,U3=r7.getterFor(V0),ei=Object[cm],Xc=Ag.Symbol,vp=Xc&&Xc[cm],t1e=Ag.RangeError,n1e=Ag.TypeError,tx=Ag.QObject,o7=QH.f,Qc=e7.f,a7=XH.f,r1e=t7.f,i7=_Te([].push),Ws=RM("symbols"),Ng=RM("op-symbols"),o1e=RM("wks"),rk=!tx||!tx[cm]||!tx[cm].findChild,s7=function(e,t,n){var r=o7(ei,t);r&&delete ei[t],Qc(e,t,n),r&&e!==ei&&Qc(ei,t,r)},ok=$d&&YTe(function(){return Jd(Qc({},"a",{get:function(){return Qc(this,"a",{value:7}).a}})).a!==7})?s7:Qc,nx=function(e,t){var n=Ws[e]=Jd(vp);return e1e(n,{type:V0,tag:e,description:t}),$d||(n.description=t),n},W0=function(t,n,r){t===ei&&W0(Ng,n,r),tk(t);var o=LM(n);return tk(r),cr(Ws,o)?(r.enumerable?(cr(t,Co)&&t[Co][o]&&(t[Co][o]=!1),r=Jd(r,{enumerable:nk(0,!1)})):(cr(t,Co)||Qc(t,Co,nk(1,Jd(null))),t[Co][o]=!0),ok(t,o,r)):Qc(t,o,r)},FM=function(t,n){tk(t);var r=z0(n),o=JH(r).concat(d7(r));return U0(o,function(a){(!$d||jM(l7,r,a))&&W0(t,a,r[a])}),t},a1e=function(t,n){return n===void 0?Jd(t):FM(Jd(t),n)},l7=function(t){var n=LM(t),r=jM(r1e,this,n);return this===ei&&cr(Ws,n)&&!cr(Ng,n)?!1:r||!cr(this,n)||!cr(Ws,n)||cr(this,Co)&&this[Co][n]?r:!0},c7=function(t,n){var r=z0(t),o=LM(n);if(!(r===ei&&cr(Ws,o)&&!cr(Ng,o))){var a=o7(r,o);return a&&cr(Ws,o)&&!(cr(r,Co)&&r[Co][o])&&(a.enumerable=!0),a}},u7=function(t){var n=a7(z0(t)),r=[];return U0(n,function(o){!cr(Ws,o)&&!cr(n7,o)&&i7(r,o)}),r},d7=function(e){var t=e===ei,n=a7(t?Ng:z0(e)),r=[];return U0(n,function(o){cr(Ws,o)&&(!t||cr(ei,o))&&i7(r,Ws[o])}),r};Kd||(Xc=function(){if(zTe(vp,this))throw new n1e("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:UTe(arguments[0]),n=z3(t),r=function(o){var a=this===void 0?Ag:this;a===ei&&jM(r,Ng,o),cr(a,Co)&&cr(a[Co],n)&&(a[Co][n]=!1);var i=nk(1,o);try{ok(a,n,i)}catch(s){if(!(s instanceof t1e))throw s;s7(a,n,i)}};return $d&&rk&&ok(ei,n,{configurable:!0,set:r}),nx(n,t)},vp=Xc[cm],Y3(vp,"toString",function(){return U3(this).tag}),Y3(Xc,"withoutSetter",function(e){return nx(z3(e),e)}),t7.f=l7,e7.f=W0,GTe.f=FM,QH.f=c7,VTe.f=XH.f=u7,WTe.f=d7,KTe.f=function(e){return nx($Te(e),e)},$d&&ZTe(vp,"description",{configurable:!0,get:function(){return U3(this).description}}));Y0({global:!0,wrap:!0,forced:!Kd,sham:!Kd},{Symbol:Xc});U0(JH(o1e),function(e){JTe(e)});Y0({target:V0,stat:!0,forced:!Kd},{useSetter:function(){rk=!0},useSimple:function(){rk=!1}});Y0({target:"Object",stat:!0,forced:!Kd,sham:!$d},{create:a1e,defineProperty:W0,defineProperties:FM,getOwnPropertyDescriptor:c7});Y0({target:"Object",stat:!0,forced:!Kd},{getOwnPropertyNames:u7});XTe();QTe(Xc,V0);n7[Co]=!0;var i1e=qf,f7=i1e&&!!Symbol.for&&!!Symbol.keyFor,s1e=on,l1e=rs,c1e=ea,u1e=Mg,h7=$f,d1e=f7,rx=h7("string-to-symbol-registry"),f1e=h7("symbol-to-string-registry");s1e({target:"Symbol",stat:!0,forced:!d1e},{for:function(e){var t=u1e(e);if(c1e(rx,t))return rx[t];var n=l1e("Symbol")(t);return rx[t]=n,f1e[n]=t,n}});var h1e=on,p1e=ea,m1e=Ig,g1e=A0,v1e=$f,y1e=f7,V3=v1e("symbol-to-string-registry");h1e({target:"Symbol",stat:!0,forced:!y1e},{keyFor:function(t){if(!m1e(t))throw new TypeError(g1e(t)+" is not a symbol");if(p1e(V3,t))return V3[t]}});var b1e=nr,W3=Kf,w1e=Zr,G3=Zf,S1e=Mg,Z3=b1e([].push),T1e=function(e){if(w1e(e))return e;if(W3(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?Z3(n,o):(typeof o=="number"||G3(o)==="Number"||G3(o)==="String")&&Z3(n,S1e(o))}var a=n.length,i=!0;return function(s,l){if(i)return i=!1,l;if(W3(this))return l;for(var u=0;u<a;u++)if(n[u]===s)return l}}},x1e=on,p7=rs,m7=dM,I1e=ts,Og=nr,g7=tr,q3=Zr,$3=Ig,v7=H0,k1e=T1e,E1e=qf,C1e=String,Yl=p7("JSON","stringify"),uy=Og(/./.exec),K3=Og("".charAt),M1e=Og("".charCodeAt),D1e=Og("".replace),A1e=Og(1 .toString),N1e=/[\uD800-\uDFFF]/g,J3=/^[\uD800-\uDBFF]$/,X3=/^[\uDC00-\uDFFF]$/,Q3=!E1e||g7(function(){var e=p7("Symbol")("stringify detection");return Yl([e])!=="[null]"||Yl({a:e})!=="{}"||Yl(Object(e))!=="{}"}),ej=g7(function(){return Yl("\uDF06\uD834")!=='"\\udf06\\ud834"'||Yl("\uDEAD")!=='"\\udead"'}),O1e=function(e,t){var n=v7(arguments),r=k1e(t);if(!(!q3(r)&&(e===void 0||$3(e))))return n[1]=function(o,a){if(q3(r)&&(a=I1e(r,this,C1e(o),a)),!$3(a))return a},m7(Yl,null,n)},P1e=function(e,t,n){var r=K3(n,t-1),o=K3(n,t+1);return uy(J3,e)&&!uy(X3,o)||uy(X3,e)&&!uy(J3,r)?"\\u"+A1e(M1e(e,0),16):e};Yl&&x1e({target:"JSON",stat:!0,forced:Q3||ej},{stringify:function(t,n,r){var o=v7(arguments),a=m7(Q3?O1e:Yl,null,o);return ej&&typeof a=="string"?D1e(a,N1e,P1e):a}});var j1e=on,L1e=qf,R1e=tr,y7=B0,F1e=rl,H1e=!L1e||R1e(function(){y7.f(1)});j1e({target:"Object",stat:!0,forced:H1e},{getOwnPropertySymbols:function(t){var n=y7.f;return n?n(F1e(t)):[]}});var B1e=On;B1e("asyncIterator");var _1e=On;_1e("hasInstance");var Y1e=On;Y1e("isConcatSpreadable");var z1e=On;z1e("iterator");var U1e=On;U1e("match");var V1e=On;V1e("matchAll");var W1e=On;W1e("replace");var G1e=On;G1e("search");var Z1e=On;Z1e("species");var q1e=On;q1e("split");var $1e=On,K1e=$H;$1e("toPrimitive");K1e();var J1e=rs,X1e=On,Q1e=Jf;X1e("toStringTag");Q1e(J1e("Symbol"),"Symbol");var exe=On;exe("unscopables");var txe=Cr,nxe=Jf;nxe(txe.JSON,"JSON",!0);var rxe=Mr,oxe=rxe.Symbol,Xf={},ak=jo,axe=ea,b7=Function.prototype,ixe=ak&&Object.getOwnPropertyDescriptor,w7=axe(b7,"name"),sxe=w7&&function(){}.name==="something",lxe=w7&&(!ak||ak&&ixe(b7,"name").configurable),cxe={PROPER:sxe,CONFIGURABLE:lxe},uxe=tr,dxe=!uxe(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),fxe=ea,hxe=Zr,pxe=rl,mxe=R0,gxe=dxe,tj=mxe("IE_PROTO"),ik=Object,vxe=ik.prototype,S7=gxe?ik.getPrototypeOf:function(e){var t=pxe(e);if(fxe(t,tj))return t[tj];var n=t.constructor;return hxe(n)&&t instanceof n?n.prototype:t instanceof ik?vxe:null},yxe=tr,bxe=Zr,wxe=tl,Sxe=NM,nj=S7,Txe=_0,xxe=hr,sk=xxe("iterator"),T7=!1,Rs,ox,ax;[].keys&&(ax=[].keys(),"next"in ax?(ox=nj(nj(ax)),ox!==Object.prototype&&(Rs=ox)):T7=!0);var Ixe=!wxe(Rs)||yxe(function(){var e={};return Rs[sk].call(e)!==e});Ixe?Rs={}:Rs=Sxe(Rs);bxe(Rs[sk])||Txe(Rs,sk,function(){return this});var x7={IteratorPrototype:Rs,BUGGY_SAFARI_ITERATORS:T7},kxe=x7.IteratorPrototype,Exe=NM,Cxe=xg,Mxe=Jf,Dxe=Xf,Axe=function(){return this},Nxe=function(e,t,n,r){var o=t+" Iterator";return e.prototype=Exe(kxe,{next:Cxe(+!r,n)}),Mxe(e,o,!1,!0),Dxe[o]=Axe,e},Oxe=on,Pxe=ts,I7=cxe,jxe=Nxe,Lxe=S7,Rxe=Jf,rj=_0,Fxe=hr,oj=Xf,k7=x7,Hxe=I7.PROPER;I7.CONFIGURABLE;k7.IteratorPrototype;var dy=k7.BUGGY_SAFARI_ITERATORS,ix=Fxe("iterator"),aj="keys",fy="values",ij="entries",Bxe=function(){return this},E7=function(e,t,n,r,o,a,i){jxe(n,t,r);var s=function(S){if(S===o&&p)return p;if(!dy&&S&&S in f)return f[S];switch(S){case aj:return function(){return new n(this,S)};case fy:return function(){return new n(this,S)};case ij:return function(){return new n(this,S)}}return function(){return new n(this)}},l=t+" Iterator",u=!1,f=e.prototype,h=f[ix]||f["@@iterator"]||o&&f[o],p=!dy&&h||s(o),m=t==="Array"&&f.entries||h,w,b,y;if(m&&(w=Lxe(m.call(new e)),w!==Object.prototype&&w.next&&(Rxe(w,l,!0,!0),oj[l]=Bxe)),Hxe&&o===fy&&h&&h.name!==fy&&(u=!0,p=function(){return Pxe(h,this)}),o)if(b={values:s(fy),keys:a?p:s(aj),entries:s(ij)},i)for(y in b)(dy||u||!(y in f))&&rj(f,y,b[y]);else Oxe({target:t,proto:!0,forced:dy||u},b);return i&&f[ix]!==p&&rj(f,ix,p,{}),oj[t]=p,b},C7=function(e,t){return{value:e,done:t}},_xe=ns,sj=Xf,M7=OM;li.f;var Yxe=E7,hy=C7,D7="Array Iterator",zxe=M7.set,Uxe=M7.getterFor(D7);Yxe(Array,"Array",function(e,t){zxe(this,{type:D7,target:_xe(e),index:0,kind:t})},function(){var e=Uxe(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,hy(void 0,!0);switch(e.kind){case"keys":return hy(n,!1);case"values":return hy(t[n],!1)}return hy([n,t[n]],!1)},"values");sj.Arguments=sj.Array;var Vxe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Wxe=Vxe,Gxe=Cr,Zxe=Jf,lj=Xf;for(var sx in Wxe)Zxe(Gxe[sx],sx),lj[sx]=lj.Array;var qxe=oxe,$xe=qxe,Kxe=hr,Jxe=li.f,cj=Kxe("metadata"),uj=Function.prototype;uj[cj]===void 0&&Jxe(uj,cj,{value:null});var Xxe=On;Xxe("asyncDispose");var Qxe=On;Qxe("dispose");var eIe=On;eIe("metadata");var tIe=$xe,nIe=tIe,rIe=rs,oIe=nr,HM=rIe("Symbol"),aIe=HM.keyFor,iIe=oIe(HM.prototype.valueOf),A7=HM.isRegisteredSymbol||function(t){try{return aIe(iIe(t))!==void 0}catch{return!1}},sIe=on,lIe=A7;sIe({target:"Symbol",stat:!0},{isRegisteredSymbol:lIe});var cIe=$f,N7=rs,uIe=nr,dIe=Ig,fIe=hr,Hb=N7("Symbol"),dj=Hb.isWellKnownSymbol,O7=N7("Object","getOwnPropertyNames"),hIe=uIe(Hb.prototype.valueOf),fj=cIe("wks");for(var lx=0,hj=O7(Hb),pIe=hj.length;lx<pIe;lx++)try{var pj=hj[lx];dIe(Hb[pj])&&fIe(pj)}catch{}var P7=function(t){if(dj&&dj(t))return!0;try{for(var n=hIe(t),r=0,o=O7(fj),a=o.length;r<a;r++)if(fj[o[r]]==n)return!0}catch{}return!1},mIe=on,gIe=P7;mIe({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:gIe});var vIe=On;vIe("customMatcher");var yIe=On;yIe("observable");var bIe=on,wIe=A7;bIe({target:"Symbol",stat:!0},{isRegistered:wIe});var SIe=on,TIe=P7;SIe({target:"Symbol",stat:!0,forced:!0},{isWellKnown:TIe});var xIe=On;xIe("matcher");var IIe=On;IIe("metadataKey");var kIe=On;kIe("patternMatch");var EIe=On;EIe("replaceAll");var CIe=nIe,MIe=CIe,DIe=MIe;const Ed=Xe(DIe);var BM=nr,AIe=O0,NIe=Mg,OIe=mM,PIe=BM("".charAt),mj=BM("".charCodeAt),jIe=BM("".slice),LIe=function(e){return function(t,n){var r=NIe(OIe(t)),o=AIe(n),a=r.length,i,s;return o<0||o>=a?e?"":void 0:(i=mj(r,o),i<55296||i>56319||o+1===a||(s=mj(r,o+1))<56320||s>57343?e?PIe(r,o):i:e?jIe(r,o,o+2):(i-55296<<10)+(s-56320)+65536)}},RIe={charAt:LIe(!0)},FIe=RIe.charAt,HIe=Mg,j7=OM,BIe=E7,gj=C7,L7="String Iterator",_Ie=j7.set,YIe=j7.getterFor(L7);BIe(String,"String",function(e){_Ie(this,{type:L7,string:HIe(e),index:0})},function(){var t=YIe(this),n=t.string,r=t.index,o;return r>=n.length?gj(void 0,!0):(o=FIe(n,r),t.index+=o.length,gj(o,!1))});var zIe=Cg,vj=yM,UIe=pM,VIe=Xf,WIe=hr,GIe=WIe("iterator"),_M=function(e){if(!UIe(e))return vj(e,GIe)||vj(e,"@@iterator")||VIe[zIe(e)]},ZIe=_M,qIe=ZIe,$Ie=qIe,KIe=$Ie,JIe=KIe,XIe=JIe,QIe=XIe,eke=QIe,tke=eke;const R7=Xe(tke);var nke=jo,rke=Kf,oke=TypeError,ake=Object.getOwnPropertyDescriptor,ike=nke&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),F7=ike?function(e,t){if(rke(e)&&!ake(e,"length").writable)throw new oke("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ske=on,lke=rl,cke=Tu,uke=F7,dke=xM,fke=tr,hke=fke(function(){return[].push.call({length:4294967296},1)!==4294967297}),pke=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},mke=hke||!pke();ske({target:"Array",proto:!0,forced:mke},{push:function(t){var n=lke(this),r=cke(n),o=arguments.length;dke(r+o);for(var a=0;a<o;a++)n[r]=arguments[a],r++;return uke(n,r),r}});var gke=Cr,vke=Mr,xu=function(e,t){var n=vke[e+"Prototype"],r=n&&n[t];if(r)return r;var o=gke[e],a=o&&o.prototype;return a&&a[t]},yke=xu,bke=yke("Array","push"),wke=nl,Ske=bke,cx=Array.prototype,Tke=function(e){var t=e.push;return e===cx||wke(cx,e)&&t===cx.push?Ske:t},xke=Tke,Ike=xke,kke=Ike,Eke=kke,Cke=Eke,Mke=Cke,Dke=Mke;const Ake=Xe(Dke);function Nke(e,t){var n=e==null?null:typeof Ed<"u"&&R7(e)||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(Ake(s).call(s,r.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}var Oke=on,yj=Kf,Pke=EM,jke=tl,bj=MM,Lke=Tu,Rke=ns,Fke=Eg,Hke=hr,Bke=P0,_ke=H0,Yke=Bke("slice"),zke=Hke("species"),ux=Array,Uke=Math.max;Oke({target:"Array",proto:!0,forced:!Yke},{slice:function(t,n){var r=Rke(this),o=Lke(r),a=bj(t,o),i=bj(n===void 0?o:n,o),s,l,u;if(yj(r)&&(s=r.constructor,Pke(s)&&(s===ux||yj(s.prototype))?s=void 0:jke(s)&&(s=s[zke],s===null&&(s=void 0)),s===ux||s===void 0))return _ke(r,a,i);for(l=new(s===void 0?ux:s)(Uke(i-a,0)),u=0;a<i;a++,u++)a in r&&Fke(l,u,r[a]);return l.length=u,l}});var Vke=xu,Wke=Vke("Array","slice"),Gke=nl,Zke=Wke,dx=Array.prototype,qke=function(e){var t=e.slice;return e===dx||Gke(dx,e)&&t===dx.slice?Zke:t},$ke=qke,Kke=$ke,Jke=Kke,Xke=Jke,Qke=Xke,eEe=Qke,tEe=eEe;const nEe=Xe(tEe);var rEe=ts,wj=Jl,oEe=yM,aEe=function(e,t,n){var r,o;wj(e);try{if(r=oEe(e,"return"),!r){if(t==="throw")throw n;return n}r=rEe(r,e)}catch(a){o=!0,r=a}if(t==="throw")throw n;if(o)throw r;return wj(r),n},iEe=Jl,sEe=aEe,lEe=function(e,t,n,r){try{return r?t(iEe(n)[0],n[1]):t(n)}catch(o){sEe(e,"throw",o)}},cEe=hr,uEe=Xf,dEe=cEe("iterator"),fEe=Array.prototype,hEe=function(e){return e!==void 0&&(uEe.Array===e||fEe[dEe]===e)},pEe=ts,mEe=vM,gEe=Jl,vEe=A0,yEe=_M,bEe=TypeError,wEe=function(e,t){var n=arguments.length<2?yEe(e):t;if(mEe(n))return gEe(pEe(n,e));throw new bEe(vEe(e)+" is not iterable")},SEe=TM,TEe=ts,xEe=rl,IEe=lEe,kEe=hEe,EEe=EM,CEe=Tu,Sj=Eg,MEe=wEe,DEe=_M,Tj=Array,AEe=function(t){var n=xEe(t),r=EEe(this),o=arguments.length,a=o>1?arguments[1]:void 0,i=a!==void 0;i&&(a=SEe(a,o>2?arguments[2]:void 0));var s=DEe(n),l=0,u,f,h,p,m,w;if(s&&!(this===Tj&&kEe(s)))for(f=r?new this:[],p=MEe(n,s),m=p.next;!(h=TEe(m,p)).done;l++)w=i?IEe(p,a,[h.value,l],!0):h.value,Sj(f,l,w);else for(u=CEe(n),f=r?new this(u):Tj(u);u>l;l++)w=i?a(n[l],l):n[l],Sj(f,l,w);return f.length=l,f},NEe=hr,H7=NEe("iterator"),B7=!1;try{var OEe=0,xj={next:function(){return{done:!!OEe++}},return:function(){B7=!0}};xj[H7]=function(){return this},Array.from(xj,function(){throw 2})}catch{}var PEe=function(e,t){try{if(!t&&!B7)return!1}catch{return!1}var n=!1;try{var r={};r[H7]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},jEe=on,LEe=AEe,REe=PEe,FEe=!REe(function(e){Array.from(e)});jEe({target:"Array",stat:!0,forced:FEe},{from:LEe});var HEe=Mr,BEe=HEe.Array.from,_Ee=BEe,YEe=_Ee,zEe=YEe,UEe=zEe,VEe=UEe,WEe=VEe,GEe=WEe;const _7=Xe(GEe);function lk(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 Y7(e,t){var n;if(e){if(typeof e=="string")return lk(e,t);var r=nEe(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return _7(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lk(e,t)}}function ZEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ri(e,t){return p0e(e)||Nke(e,t)||Y7(e,t)||ZEe()}var z7={exports:{}};(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object")if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&r.push(l);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(z7);var qEe=z7.exports;const YM=Xe(qEe);var U7={exports:{}},fx,Ij;function $Ee(){if(Ij)return fx;Ij=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fx=e,fx}var hx,kj;function KEe(){if(kj)return hx;kj=1;var e=$Ee();function t(){}function n(){}return n.resetWarningCache=t,hx=function(){function r(i,s,l,u,f,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},hx}U7.exports=KEe()();var JEe=U7.exports;const _t=Xe(JEe);var zM=_.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});zM.displayName="ScrollToBottomFunctionContext";function G0(){return D.useContext(zM)}function XEe(){var e=G0(),t=e.scrollToEnd;return t}var UM=_.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});UM.displayName="ScrollToBottomState1Context";var VM=_.createContext({animating:!1,animatingToEnd:!1,sticky:!0});VM.displayName="ScrollToBottomState2Context";var WM=_.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});WM.displayName="ScrollToBottomStateContext";var Ej=[WM,UM,VM];function QEe(e){return D.useContext(Ej[e]||Ej[0])}function eCe(){var e=QEe(2),t=e.sticky;return[t]}var Z0=_.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Z0.displayName="ScrollToBottomInternalContext";function tCe(){return D.useContext(Z0)}function GM(){var e=tCe(),t=e.styleToClassName;return t}var nCe={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},ZM=function(t){var n=t.children,r=t.className,o=eCe(),a=Ri(o,1),i=a[0],s=GM()(nCe),l=XEe();return!i&&_.createElement("button",{className:YM(s,(r||"")+""),onClick:l,type:"button"},n)};ZM.defaultProps={children:void 0,className:""};ZM.propTypes={children:_t.any,className:_t.string};var V7={exports:{}},rCe=on,oCe=jo,Cj=li.f;rCe({target:"Object",stat:!0,forced:Object.defineProperty!==Cj,sham:!oCe},{defineProperty:Cj});var aCe=Mr,W7=aCe.Object,iCe=V7.exports=function(t,n,r){return W7.defineProperty(t,n,r)};W7.defineProperty.sham&&(iCe.sham=!0);var sCe=V7.exports,lCe=sCe,G7=lCe,cCe=G7,uCe=cCe,dCe=uCe,fCe=dCe,hCe=fCe;const pCe=Xe(hCe);var mCe=Dg,gCe=mCe.f("iterator"),vCe=gCe,yCe=vCe,bCe=yCe,wCe=bCe,SCe=wCe,TCe=SCe,xCe=TCe;const ICe=Xe(xCe);function um(e){"@babel/helpers - typeof";return um=typeof Ed=="function"&&typeof ICe=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ed=="function"&&t.constructor===Ed&&t!==Ed.prototype?"symbol":typeof t},um(e)}var kCe=Dg,ECe=kCe.f("toPrimitive"),CCe=ECe,MCe=CCe,DCe=MCe,ACe=DCe,NCe=ACe,OCe=NCe,PCe=OCe;const jCe=Xe(PCe);function LCe(e,t){if(um(e)!="object"||!e)return e;var n=e[jCe];if(n!==void 0){var r=n.call(e,t);if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RCe(e){var t=LCe(e,"string");return um(t)=="symbol"?t:t+""}function FCe(e,t,n){return t=RCe(t),t in e?pCe(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HCe(e){if(LH(e))return lk(e)}function BCe(e){if(typeof Ed<"u"&&R7(e)!=null||e["@@iterator"]!=null)return _7(e)}function _Ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ft(e){return HCe(e)||BCe(e)||Y7(e)||_Ce()}var py=function(e){return e&&e.Math==Math&&e},ta=py(typeof globalThis=="object"&&globalThis)||py(typeof window=="object"&&window)||py(typeof self=="object"&&self)||py(typeof ur=="object"&&ur)||function(){return this}()||Function("return this")(),qM={},ci=function(e){try{return!!e()}catch{return!0}},YCe=ci,Iu=!YCe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Z7={},q7={}.propertyIsEnumerable,$7=Object.getOwnPropertyDescriptor,zCe=$7&&!q7.call({1:2},1);Z7.f=zCe?function(t){var n=$7(this,t);return!!n&&n.enumerable}:q7;var K7=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},UCe={}.toString,$M=function(e){return UCe.call(e).slice(8,-1)},VCe=ci,WCe=$M,GCe="".split,ZCe=VCe(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return WCe(e)=="String"?GCe.call(e,""):Object(e)}:Object,q0=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},qCe=ZCe,$Ce=q0,KM=function(e){return qCe($Ce(e))},Ma=function(e){return typeof e=="function"},KCe=Ma,$0=function(e){return typeof e=="object"?e!==null:KCe(e)},px=ta,JCe=Ma,XCe=function(e){return JCe(e)?e:void 0},K0=function(e,t){return arguments.length<2?XCe(px[e]):px[e]&&px[e][t]},QCe=K0,eMe=QCe("navigator","userAgent")||"",J7=ta,mx=eMe,Mj=J7.process,Dj=J7.Deno,Aj=Mj&&Mj.versions||Dj&&Dj.version,Nj=Aj&&Aj.v8,Ni,Bb;Nj?(Ni=Nj.split("."),Bb=Ni[0]<4?1:Ni[0]+Ni[1]):mx&&(Ni=mx.match(/Edge\/(\d+)/),(!Ni||Ni[1]>=74)&&(Ni=mx.match(/Chrome\/(\d+)/),Ni&&(Bb=Ni[1])));var tMe=Bb&&+Bb,Oj=tMe,nMe=ci,X7=!!Object.getOwnPropertySymbols&&!nMe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Oj&&Oj<41}),rMe=X7,Q7=rMe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",oMe=Ma,aMe=K0,iMe=Q7,eB=iMe?function(e){return typeof e=="symbol"}:function(e){var t=aMe("Symbol");return oMe(t)&&Object(e)instanceof t},sMe=function(e){try{return String(e)}catch{return"Object"}},lMe=Ma,cMe=sMe,uMe=function(e){if(lMe(e))return e;throw TypeError(cMe(e)+" is not a function")},dMe=uMe,tB=function(e,t){var n=e[t];return n==null?void 0:dMe(n)},gx=Ma,vx=$0,fMe=function(e,t){var n,r;if(t==="string"&&gx(n=e.toString)&&!vx(r=n.call(e))||gx(n=e.valueOf)&&!vx(r=n.call(e))||t!=="string"&&gx(n=e.toString)&&!vx(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},nB={exports:{}},Pj=ta,JM=function(e,t){try{Object.defineProperty(Pj,e,{value:t,configurable:!0,writable:!0})}catch{Pj[e]=t}return t},hMe=ta,pMe=JM,jj="__core-js_shared__",mMe=hMe[jj]||pMe(jj,{}),XM=mMe,Lj=XM;(nB.exports=function(e,t){return Lj[e]||(Lj[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var QM=nB.exports,gMe=q0,rB=function(e){return Object(gMe(e))},vMe=rB,yMe={}.hasOwnProperty,ku=Object.hasOwn||function(t,n){return yMe.call(vMe(t),n)},bMe=0,wMe=Math.random(),oB=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++bMe+wMe).toString(36)},SMe=ta,TMe=QM,Rj=ku,xMe=oB,Fj=X7,IMe=Q7,Jh=TMe("wks"),Op=SMe.Symbol,kMe=IMe?Op:Op&&Op.withoutSetter||xMe,Pg=function(e){return(!Rj(Jh,e)||!(Fj||typeof Jh[e]=="string"))&&(Fj&&Rj(Op,e)?Jh[e]=Op[e]:Jh[e]=kMe("Symbol."+e)),Jh[e]},Hj=$0,Bj=eB,EMe=tB,CMe=fMe,MMe=Pg,DMe=MMe("toPrimitive"),AMe=function(e,t){if(!Hj(e)||Bj(e))return e;var n=EMe(e,DMe),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Hj(r)||Bj(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),CMe(e,t)},NMe=AMe,OMe=eB,aB=function(e){var t=NMe(e,"string");return OMe(t)?t:String(t)},PMe=ta,_j=$0,ck=PMe.document,jMe=_j(ck)&&_j(ck.createElement),iB=function(e){return jMe?ck.createElement(e):{}},LMe=Iu,RMe=ci,FMe=iB,sB=!LMe&&!RMe(function(){return Object.defineProperty(FMe("div"),"a",{get:function(){return 7}}).a!=7}),HMe=Iu,BMe=Z7,_Me=K7,YMe=KM,zMe=aB,UMe=ku,VMe=sB,Yj=Object.getOwnPropertyDescriptor;qM.f=HMe?Yj:function(t,n){if(t=YMe(t),n=zMe(n),VMe)try{return Yj(t,n)}catch{}if(UMe(t,n))return _Me(!BMe.f.call(t,n),t[n])};var jg={},WMe=$0,Xl=function(e){if(WMe(e))return e;throw TypeError(String(e)+" is not an object")},GMe=Iu,ZMe=sB,zj=Xl,qMe=aB,Uj=Object.defineProperty;jg.f=GMe?Uj:function(t,n,r){if(zj(t),n=qMe(n),zj(r),ZMe)try{return Uj(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var $Me=Iu,KMe=jg,JMe=K7,J0=$Me?function(e,t,n){return KMe.f(e,t,JMe(1,n))}:function(e,t,n){return e[t]=n,e},lB={exports:{}},XMe=Ma,uk=XM,QMe=Function.toString;XMe(uk.inspectSource)||(uk.inspectSource=function(e){return QMe.call(e)});var cB=uk.inspectSource,eDe=ta,tDe=Ma,nDe=cB,Vj=eDe.WeakMap,rDe=tDe(Vj)&&/native code/.test(nDe(Vj)),oDe=QM,aDe=oB,Wj=oDe("keys"),uB=function(e){return Wj[e]||(Wj[e]=aDe(e))},eD={},iDe=rDe,sDe=ta,lDe=J0,yx=ku,bx=XM,cDe=uB,uDe=eD,Gj="Object already initialized",dDe=sDe.WeakMap,dk,_b,fk,fDe=function(e){return fk(e)?_b(e):dk(e,{})};if(iDe||bx.state){var Oc=bx.state||(bx.state=new dDe),hDe=Oc.get,Zj=Oc.has,pDe=Oc.set;dk=function(e,t){if(Zj.call(Oc,e))throw new TypeError(Gj);return t.facade=e,pDe.call(Oc,e,t),t},_b=function(e){return hDe.call(Oc,e)||{}},fk=function(e){return Zj.call(Oc,e)}}else{var pd=cDe("state");uDe[pd]=!0,dk=function(e,t){if(yx(e,pd))throw new TypeError(Gj);return t.facade=e,lDe(e,pd,t),t},_b=function(e){return yx(e,pd)?e[pd]:{}},fk=function(e){return yx(e,pd)}}var dB={get:_b,enforce:fDe},hk=Iu,mDe=ku,fB=Function.prototype,gDe=hk&&Object.getOwnPropertyDescriptor,tD=mDe(fB,"name"),vDe=tD&&function(){}.name==="something",yDe=tD&&(!hk||hk&&gDe(fB,"name").configurable),nD={EXISTS:tD,PROPER:vDe,CONFIGURABLE:yDe},bDe=ta,qj=Ma,wDe=ku,$j=J0,SDe=JM,TDe=cB,hB=dB,xDe=nD.CONFIGURABLE,IDe=hB.get,kDe=hB.enforce,EDe=String(String).split("String");(lB.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,i=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(qj(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!wDe(n,"name")||xDe&&n.name!==s)&&$j(n,"name",s),l=kDe(n),l.source||(l.source=EDe.join(typeof s=="string"?s:""))),e===bDe){a?e[t]=n:SDe(t,n);return}else o?!i&&e[t]&&(a=!0):delete e[t];a?e[t]=n:$j(e,t,n)})(Function.prototype,"toString",function(){return qj(this)&&IDe(this).source||TDe(this)});var Lg=lB.exports,pB={},CDe=Math.ceil,MDe=Math.floor,X0=function(e){var t=+e;return t!==t||t===0?0:(t>0?MDe:CDe)(t)},DDe=X0,ADe=Math.max,NDe=Math.min,ODe=function(e,t){var n=DDe(e);return n<0?ADe(n+t,0):NDe(n,t)},PDe=X0,jDe=Math.min,mB=function(e){return e>0?jDe(PDe(e),9007199254740991):0},LDe=mB,RDe=function(e){return LDe(e.length)},FDe=KM,HDe=ODe,BDe=RDe,_De=function(e){return function(t,n,r){var o=FDe(t),a=BDe(o),i=HDe(r,a),s;if(e&&n!=n){for(;a>i;)if(s=o[i++],s!=s)return!0}else for(;a>i;i++)if((e||i in o)&&o[i]===n)return e||i||0;return!e&&-1}},YDe={indexOf:_De(!1)},wx=ku,zDe=KM,UDe=YDe.indexOf,VDe=eD,gB=function(e,t){var n=zDe(e),r=0,o=[],a;for(a in n)!wx(VDe,a)&&wx(n,a)&&o.push(a);for(;t.length>r;)wx(n,a=t[r++])&&(~UDe(o,a)||o.push(a));return o},rD=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],WDe=gB,GDe=rD,ZDe=GDe.concat("length","prototype");pB.f=Object.getOwnPropertyNames||function(t){return WDe(t,ZDe)};var vB={};vB.f=Object.getOwnPropertySymbols;var qDe=K0,$De=pB,KDe=vB,JDe=Xl,XDe=qDe("Reflect","ownKeys")||function(t){var n=$De.f(JDe(t)),r=KDe.f;return r?n.concat(r(t)):n},QDe=ku,eAe=XDe,tAe=qM,nAe=jg,rAe=function(e,t){for(var n=eAe(t),r=nAe.f,o=tAe.f,a=0;a<n.length;a++){var i=n[a];QDe(e,i)||r(e,i,o(t,i))}},oAe=ci,aAe=Ma,iAe=/#|\.prototype\./,Rg=function(e,t){var n=lAe[sAe(e)];return n==uAe?!0:n==cAe?!1:aAe(t)?oAe(t):!!t},sAe=Rg.normalize=function(e){return String(e).replace(iAe,".").toLowerCase()},lAe=Rg.data={},cAe=Rg.NATIVE="N",uAe=Rg.POLYFILL="P",dAe=Rg,Sx=ta,fAe=qM.f,hAe=J0,pAe=Lg,mAe=JM,gAe=rAe,vAe=dAe,yAe=function(e,t){var n=e.target,r=e.global,o=e.stat,a,i,s,l,u,f;if(r?i=Sx:o?i=Sx[n]||mAe(n,{}):i=(Sx[n]||{}).prototype,i)for(s in t){if(u=t[s],e.noTargetGet?(f=fAe(i,s),l=f&&f.value):l=i[s],a=vAe(r?s:n+(o?".":"#")+s,e.forced),!a&&l!==void 0){if(typeof u==typeof l)continue;gAe(u,l)}(e.sham||l&&l.sham)&&hAe(u,"sham",!0),pAe(i,s,u,e)}},bAe=Pg,wAe=bAe("toStringTag"),yB={};yB[wAe]="z";var oD=String(yB)==="[object z]",SAe=oD,TAe=Ma,Qy=$M,xAe=Pg,IAe=xAe("toStringTag"),kAe=Qy(function(){return arguments}())=="Arguments",EAe=function(e,t){try{return e[t]}catch{}},bB=SAe?Qy:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=EAe(t=Object(e),IAe))=="string"?n:kAe?Qy(t):(r=Qy(t))=="Object"&&TAe(t.callee)?"Arguments":r},CAe=bB,Q0=function(e){if(CAe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},MAe=Xl,wB=function(){var e=MAe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},aD={},SB=ci,DAe=ta,TB=DAe.RegExp;aD.UNSUPPORTED_Y=SB(function(){var e=TB("a","y");return e.lastIndex=2,e.exec("abcd")!=null});aD.BROKEN_CARET=SB(function(){var e=TB("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var AAe=gB,NAe=rD,OAe=Object.keys||function(t){return AAe(t,NAe)},PAe=Iu,jAe=jg,LAe=Xl,RAe=OAe,FAe=PAe?Object.defineProperties:function(t,n){LAe(t);for(var r=RAe(n),o=r.length,a=0,i;o>a;)jAe.f(t,i=r[a++],n[i]);return t},HAe=K0,BAe=HAe("document","documentElement"),_Ae=Xl,YAe=FAe,Kj=rD,zAe=eD,UAe=BAe,VAe=iB,WAe=uB,Jj=">",Xj="<",pk="prototype",mk="script",xB=WAe("IE_PROTO"),Tx=function(){},IB=function(e){return Xj+mk+Jj+e+Xj+"/"+mk+Jj},Qj=function(e){e.write(IB("")),e.close();var t=e.parentWindow.Object;return e=null,t},GAe=function(){var e=VAe("iframe"),t="java"+mk+":",n;return e.style.display="none",UAe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(IB("document.F=Object")),n.close(),n.F},my,eb=function(){try{my=new ActiveXObject("htmlfile")}catch{}eb=typeof document<"u"?document.domain&&my?Qj(my):GAe():Qj(my);for(var e=Kj.length;e--;)delete eb[pk][Kj[e]];return eb()};zAe[xB]=!0;var ZAe=Object.create||function(t,n){var r;return t!==null?(Tx[pk]=_Ae(t),r=new Tx,Tx[pk]=null,r[xB]=t):r=eb(),n===void 0?r:YAe(r,n)},qAe=ci,$Ae=ta,KAe=$Ae.RegExp,JAe=qAe(function(){var e=KAe(".","s");return!(e.dotAll&&e.exec(`
`)&&e.flags==="s")}),XAe=ci,QAe=ta,e2e=QAe.RegExp,t2e=XAe(function(){var e=e2e("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),n2e=Q0,r2e=wB,e4=aD,o2e=QM,a2e=ZAe,i2e=dB.get,s2e=JAe,l2e=t2e,Yb=RegExp.prototype.exec,c2e=o2e("native-string-replace",String.prototype.replace),gk=Yb,vk=function(){var e=/a/,t=/b*/g;return Yb.call(e,"a"),Yb.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),kB=e4.UNSUPPORTED_Y||e4.BROKEN_CARET,yk=/()??/.exec("")[1]!==void 0,u2e=vk||yk||kB||s2e||l2e;u2e&&(gk=function(t){var n=this,r=i2e(n),o=n2e(t),a=r.raw,i,s,l,u,f,h,p;if(a)return a.lastIndex=n.lastIndex,i=gk.call(a,o),n.lastIndex=a.lastIndex,i;var m=r.groups,w=kB&&n.sticky,b=r2e.call(n),y=n.source,S=0,x=o;if(w&&(b=b.replace("y",""),b.indexOf("g")===-1&&(b+="g"),x=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
`)&&(y="(?: "+y+")",x=" "+x,S++),s=new RegExp("^(?:"+y+")",b)),yk&&(s=new RegExp("^"+y+"$(?!\\s)",b)),vk&&(l=n.lastIndex),u=Yb.call(w?s:n,x),w?u?(u.input=u.input.slice(S),u[0]=u[0].slice(S),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:vk&&u&&(n.lastIndex=n.global?u.index+u[0].length:l),yk&&u&&u.length>1&&c2e.call(u[0],s,function(){for(f=1;f<arguments.length-2;f++)arguments[f]===void 0&&(u[f]=void 0)}),u&&m)for(u.groups=h=a2e(null),f=0;f<m.length;f++)p=m[f],h[p[0]]=u[p[1]];return u});var iD=gk,d2e=yAe,t4=iD;d2e({target:"RegExp",proto:!0,forced:/./.exec!==t4},{exec:t4});var n4=Lg,f2e=iD,r4=ci,EB=Pg,h2e=J0,p2e=EB("species"),xx=RegExp.prototype,m2e=function(e,t,n,r){var o=EB(e),a=!r4(function(){var u={};return u[o]=function(){return 7},""[e](u)!=7}),i=a&&!r4(function(){var u=!1,f=/a/;return e==="split"&&(f={},f.constructor={},f.constructor[p2e]=function(){return f},f.flags="",f[o]=/./[o]),f.exec=function(){return u=!0,null},f[o](""),!u});if(!a||!i||n){var s=/./[o],l=t(o,""[e],function(u,f,h,p,m){var w=f.exec;return w===f2e||w===xx.exec?a&&!m?{done:!0,value:s.call(f,h,p)}:{done:!0,value:u.call(h,f,p)}:{done:!1}});n4(String.prototype,e,l[0]),n4(xx,o,l[1])}r&&h2e(xx[o],"sham",!0)},g2e=X0,v2e=Q0,y2e=q0,b2e=function(e){return function(t,n){var r=v2e(y2e(t)),o=g2e(n),a=r.length,i,s;return o<0||o>=a?e?"":void 0:(i=r.charCodeAt(o),i<55296||i>56319||o+1===a||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):i:e?r.slice(o,o+2):(i-55296<<10)+(s-56320)+65536)}},w2e={charAt:b2e(!0)},S2e=w2e.charAt,T2e=function(e,t,n){return t+(n?S2e(e,t).length:1)},x2e=rB,I2e=Math.floor,k2e="".replace,E2e=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,C2e=/\$([$&'`]|\d{1,2})/g,M2e=function(e,t,n,r,o,a){var i=n+e.length,s=r.length,l=C2e;return o!==void 0&&(o=x2e(o),l=E2e),k2e.call(a,l,function(u,f){var h;switch(f.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(i);case"<":h=o[f.slice(1,-1)];break;default:var p=+f;if(p===0)return u;if(p>s){var m=I2e(p/10);return m===0?u:m<=s?r[m-1]===void 0?f.charAt(1):r[m-1]+f.charAt(1):u}h=r[p-1]}return h===void 0?"":h})},D2e=Xl,A2e=Ma,N2e=$M,O2e=iD,P2e=function(e,t){var n=e.exec;if(A2e(n)){var r=n.call(e,t);return r!==null&&D2e(r),r}if(N2e(e)==="RegExp")return O2e.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},j2e=m2e,L2e=ci,R2e=Xl,F2e=Ma,H2e=X0,B2e=mB,md=Q0,_2e=q0,Y2e=T2e,z2e=tB,U2e=M2e,V2e=P2e,W2e=Pg,bk=W2e("replace"),G2e=Math.max,Z2e=Math.min,q2e=function(e){return e===void 0?e:String(e)},$2e=function(){return"a".replace(/./,"$0")==="$0"}(),o4=function(){return/./[bk]?/./[bk]("a","$0")==="":!1}(),K2e=!L2e(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});j2e("replace",function(e,t,n){var r=o4?"$":"$0";return[function(a,i){var s=_2e(this),l=a==null?void 0:z2e(a,bk);return l?l.call(a,s,i):t.call(md(s),a,i)},function(o,a){var i=R2e(this),s=md(o);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var l=n(t,i,s,a);if(l.done)return l.value}var u=F2e(a);u||(a=md(a));var f=i.global;if(f){var h=i.unicode;i.lastIndex=0}for(var p=[];;){var m=V2e(i,s);if(m===null||(p.push(m),!f))break;var w=md(m[0]);w===""&&(i.lastIndex=Y2e(s,B2e(i.lastIndex),h))}for(var b="",y=0,S=0;S<p.length;S++){m=p[S];for(var x=md(m[0]),E=G2e(Z2e(H2e(m.index),s.length),0),C=[],M=1;M<m.length;M++)C.push(q2e(m[M]));var k=m.groups;if(u){var O=[x].concat(C,E,s);k!==void 0&&O.push(k);var F=md(a.apply(void 0,O))}else F=U2e(x,s,E,C,k,a);E>=y&&(b+=s.slice(y,E)+F,y=E+x.length)}return b+s.slice(y)}]},!K2e||!$2e||o4);var J2e=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",X2e=TypeError,Q2e=function(e,t){if(e<t)throw new X2e("Not enough arguments");return e},CB=Cr,eNe=dM,tNe=Zr,nNe=J2e,rNe=CH,oNe=H0,aNe=Q2e,iNe=CB.Function,sNe=/MSIE .\./.test(rNe)||nNe&&function(){var e=CB.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),MB=function(e,t){var n=t?2:1;return sNe?function(r,o){var a=aNe(arguments.length,1)>n,i=tNe(r)?r:iNe(r),s=a?oNe(arguments,n):[],l=a?function(){eNe(i,this,s)}:i;return t?e(l,o):e(l)}:e},lNe=on,DB=Cr,cNe=MB,a4=cNe(DB.setInterval,!0);lNe({global:!0,bind:!0,forced:DB.setInterval!==a4},{setInterval:a4});var uNe=on,AB=Cr,dNe=MB,i4=dNe(AB.setTimeout,!0);uNe({global:!0,bind:!0,forced:AB.setTimeout!==i4},{setTimeout:i4});var fNe=Mr,hNe=fNe.setInterval,pNe=hNe;const mNe=Xe(pNe);var gNe=tr,NB=function(e,t){var n=[][e];return!!n&&gNe(function(){n.call(null,t||function(){return 1},1)})},vNe=on,yNe=fM,bNe=zH.indexOf,wNe=NB,wk=yNe([].indexOf),OB=!!wk&&1/wk([1],1,-0)<0,SNe=OB||!wNe("indexOf");vNe({target:"Array",proto:!0,forced:SNe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return OB?wk(this,t,n)||0:bNe(this,t,n)}});var TNe=xu,xNe=TNe("Array","indexOf"),INe=nl,kNe=xNe,Ix=Array.prototype,ENe=function(e){var t=e.indexOf;return e===Ix||INe(Ix,e)&&t===Ix.indexOf?kNe:t},CNe=ENe,MNe=CNe,DNe=MNe;const ANe=Xe(DNe);var s4=A0,NNe=TypeError,ONe=function(e,t){if(!delete e[t])throw new NNe("Cannot delete property "+s4(t)+" of "+s4(e))},PNe=on,jNe=rl,LNe=MM,RNe=O0,FNe=Tu,HNe=F7,BNe=xM,_Ne=CM,YNe=Eg,kx=ONe,zNe=P0,UNe=zNe("splice"),VNe=Math.max,WNe=Math.min;PNe({target:"Array",proto:!0,forced:!UNe},{splice:function(t,n){var r=jNe(this),o=FNe(r),a=LNe(t,o),i=arguments.length,s,l,u,f,h,p;for(i===0?s=l=0:i===1?(s=0,l=o-a):(s=i-2,l=WNe(VNe(RNe(n),0),o-a)),BNe(o+s-l),u=_Ne(r,l),f=0;f<l;f++)h=a+f,h in r&&YNe(u,f,r[h]);if(u.length=l,s<l){for(f=a;f<o-l;f++)h=f+l,p=f+s,h in r?r[p]=r[h]:kx(r,p);for(f=o;f>o-l+s;f--)kx(r,f-1)}else if(s>l)for(f=o-l;f>a;f--)h=f+l-1,p=f+s-1,h in r?r[p]=r[h]:kx(r,p);for(f=0;f<s;f++)r[f+a]=arguments[f+2];return HNe(r,o-l+s),u}});var GNe=xu,ZNe=GNe("Array","splice"),qNe=nl,$Ne=ZNe,Ex=Array.prototype,KNe=function(e){var t=e.splice;return e===Ex||qNe(Ex,e)&&t===Ex.splice?$Ne:t},JNe=KNe,XNe=JNe,QNe=XNe;const eOe=Xe(QNe);var tOe=xu,nOe=tOe("Array","concat"),rOe=nl,oOe=nOe,Cx=Array.prototype,aOe=function(e){var t=e.concat;return e===Cx||rOe(Cx,e)&&t===Cx.concat?oOe:t},iOe=aOe,sOe=iOe,lOe=sOe;const Dn=Xe(lOe);var cOe=on,uOe=nr,PB=Date,dOe=uOe(PB.prototype.getTime);cOe({target:"Date",stat:!0},{now:function(){return dOe(new PB)}});var fOe=Mr,hOe=fOe.Date.now,pOe=hOe,mOe=pOe,gOe=mOe;const zl=Xe(gOe);var vOe=PM.forEach,yOe=NB,bOe=yOe("forEach"),wOe=bOe?[].forEach:function(t){return vOe(this,t,arguments.length>1?arguments[1]:void 0)},SOe=on,l4=wOe;SOe({target:"Array",proto:!0,forced:[].forEach!==l4},{forEach:l4});var TOe=xu,xOe=TOe("Array","forEach"),IOe=xOe,kOe=IOe,EOe=Cg,COe=ea,MOe=nl,DOe=kOe,Mx=Array.prototype,AOe={DOMTokenList:!0,NodeList:!0},NOe=function(e){var t=e.forEach;return e===Mx||MOe(Mx,e)&&t===Mx.forEach||COe(AOe,EOe(e))?DOe:t},OOe=NOe;const zb=Xe(OOe);var POe=on,jOe=rl,jB=AM,LOe=tr,ROe=LOe(function(){jB(1)});POe({target:"Object",stat:!0,forced:ROe},{keys:function(t){return jB(jOe(t))}});var FOe=Mr,HOe=FOe.Object.keys,BOe=HOe,_Oe=BOe,YOe=_Oe;const zOe=Xe(YOe);var UOe=Mr,VOe=UOe.Object.getOwnPropertySymbols,WOe=VOe,GOe=WOe,ZOe=GOe;const c4=Xe(ZOe);var qOe=on,$Oe=PM.filter,KOe=P0,JOe=KOe("filter");qOe({target:"Array",proto:!0,forced:!JOe},{filter:function(t){return $Oe(this,t,arguments.length>1?arguments[1]:void 0)}});var XOe=xu,QOe=XOe("Array","filter"),ePe=nl,tPe=QOe,Dx=Array.prototype,nPe=function(e){var t=e.filter;return e===Dx||ePe(Dx,e)&&t===Dx.filter?tPe:t},rPe=nPe,oPe=rPe,aPe=oPe;const iPe=Xe(aPe);var LB={exports:{}},sPe=on,lPe=tr,cPe=ns,RB=Tg.f,FB=jo,uPe=!FB||lPe(function(){RB(1)});sPe({target:"Object",stat:!0,forced:uPe,sham:!FB},{getOwnPropertyDescriptor:function(t,n){return RB(cPe(t),n)}});var dPe=Mr,HB=dPe.Object,fPe=LB.exports=function(t,n){return HB.getOwnPropertyDescriptor(t,n)};HB.getOwnPropertyDescriptor.sham&&(fPe.sham=!0);var hPe=LB.exports,pPe=hPe,mPe=pPe,gPe=mPe;const BB=Xe(gPe);var vPe=rs,yPe=nr,bPe=F0,wPe=B0,SPe=Jl,TPe=yPe([].concat),xPe=vPe("Reflect","ownKeys")||function(t){var n=bPe.f(SPe(t)),r=wPe.f;return r?TPe(n,r(t)):n},IPe=on,kPe=jo,EPe=xPe,CPe=ns,MPe=Tg,DPe=Eg;IPe({target:"Object",stat:!0,sham:!kPe},{getOwnPropertyDescriptors:function(t){for(var n=CPe(t),r=MPe.f,o=EPe(n),a={},i=0,s,l;o.length>i;)l=r(n,s=o[i++]),l!==void 0&&DPe(a,s,l);return a}});var APe=Mr,NPe=APe.Object.getOwnPropertyDescriptors,OPe=NPe,PPe=OPe,jPe=PPe;const u4=Xe(jPe);var _B={exports:{}},LPe=on,RPe=jo,d4=j0.f;LPe({target:"Object",stat:!0,forced:Object.defineProperties!==d4,sham:!RPe},{defineProperties:d4});var FPe=Mr,YB=FPe.Object,HPe=_B.exports=function(t,n){return YB.defineProperties(t,n)};YB.defineProperties.sham&&(HPe.sham=!0);var BPe=_B.exports,_Pe=BPe,YPe=_Pe,zPe=YPe;const UPe=Xe(zPe);var VPe=G7;const WPe=Xe(VPe);function GPe(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ZPe(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var qPe=function(){function e(n){var r=this;this._insertTag=function(o){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,a),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ZPe(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=GPe(o);try{a.insertRule(r,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),_r="-ms-",Ub="-moz-",Gt="-webkit-",zB="comm",sD="rule",lD="decl",$Pe="@import",UB="@keyframes",KPe="@layer",JPe=Math.abs,eS=String.fromCharCode,XPe=Object.assign;function QPe(e,t){return Ir(e,0)^45?(((t<<2^Ir(e,0))<<2^Ir(e,1))<<2^Ir(e,2))<<2^Ir(e,3):0}function VB(e){return e.trim()}function e3e(e,t){return(e=t.exec(e))?e[0]:e}function Zt(e,t,n){return e.replace(t,n)}function Sk(e,t){return e.indexOf(t)}function Ir(e,t){return e.charCodeAt(t)|0}function dm(e,t,n){return e.slice(t,n)}function Hi(e){return e.length}function cD(e){return e.length}function gy(e,t){return t.push(e),e}function t3e(e,t){return e.map(t).join("")}var tS=1,Xd=1,WB=0,Po=0,Wn=0,Qf="";function nS(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:tS,column:Xd,length:i,return:""}}function Xh(e,t){return XPe(nS("",null,null,"",null,null,0),e,{length:-e.length},t)}function n3e(){return Wn}function r3e(){return Wn=Po>0?Ir(Qf,--Po):0,Xd--,Wn===10&&(Xd=1,tS--),Wn}function Ko(){return Wn=Po<WB?Ir(Qf,Po++):0,Xd++,Wn===10&&(Xd=1,tS++),Wn}function Zi(){return Ir(Qf,Po)}function tb(){return Po}function Fg(e,t){return dm(Qf,e,t)}function fm(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function GB(e){return tS=Xd=1,WB=Hi(Qf=e),Po=0,[]}function ZB(e){return Qf="",e}function nb(e){return VB(Fg(Po-1,Tk(e===91?e+2:e===40?e+1:e)))}function o3e(e){for(;(Wn=Zi())&&Wn<33;)Ko();return fm(e)>2||fm(Wn)>3?"":" "}function a3e(e,t){for(;--t&&Ko()&&!(Wn<48||Wn>102||Wn>57&&Wn<65||Wn>70&&Wn<97););return Fg(e,tb()+(t<6&&Zi()==32&&Ko()==32))}function Tk(e){for(;Ko();)switch(Wn){case e:return Po;case 34:case 39:e!==34&&e!==39&&Tk(Wn);break;case 40:e===41&&Tk(e);break;case 92:Ko();break}return Po}function i3e(e,t){for(;Ko()&&e+Wn!==57;)if(e+Wn===84&&Zi()===47)break;return"/*"+Fg(t,Po-1)+"*"+eS(e===47?e:Ko())}function s3e(e){for(;!fm(Zi());)Ko();return Fg(e,Po)}function l3e(e){return ZB(rb("",null,null,null,[""],e=GB(e),0,[0],e))}function rb(e,t,n,r,o,a,i,s,l){for(var u=0,f=0,h=i,p=0,m=0,w=0,b=1,y=1,S=1,x=0,E="",C=o,M=a,k=r,O=E;y;)switch(w=x,x=Ko()){case 40:if(w!=108&&Ir(O,h-1)==58){Sk(O+=Zt(nb(x),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:O+=nb(x);break;case 9:case 10:case 13:case 32:O+=o3e(w);break;case 92:O+=a3e(tb()-1,7);continue;case 47:switch(Zi()){case 42:case 47:gy(c3e(i3e(Ko(),tb()),t,n),l);break;default:O+="/"}break;case 123*b:s[u++]=Hi(O)*S;case 125*b:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+f:S==-1&&(O=Zt(O,/\f/g,"")),m>0&&Hi(O)-h&&gy(m>32?h4(O+";",r,n,h-1):h4(Zt(O," ","")+";",r,n,h-2),l);break;case 59:O+=";";default:if(gy(k=f4(O,t,n,u,f,o,s,E,C=[],M=[],h),a),x===123)if(f===0)rb(O,t,k,k,C,a,h,s,M);else switch(p===99&&Ir(O,3)===110?100:p){case 100:case 108:case 109:case 115:rb(e,k,k,r&&gy(f4(e,k,k,0,0,o,s,E,o,C=[],h),M),o,M,h,s,r?C:M);break;default:rb(O,k,k,k,[""],M,0,s,M)}}u=f=m=0,b=S=1,E=O="",h=i;break;case 58:h=1+Hi(O),m=w;default:if(b<1){if(x==123)--b;else if(x==125&&b++==0&&r3e()==125)continue}switch(O+=eS(x),x*b){case 38:S=f>0?1:(O+="\f",-1);break;case 44:s[u++]=(Hi(O)-1)*S,S=1;break;case 64:Zi()===45&&(O+=nb(Ko())),p=Zi(),f=h=Hi(E=O+=s3e(tb())),x++;break;case 45:w===45&&Hi(O)==2&&(b=0)}}return a}function f4(e,t,n,r,o,a,i,s,l,u,f){for(var h=o-1,p=o===0?a:[""],m=cD(p),w=0,b=0,y=0;w<r;++w)for(var S=0,x=dm(e,h+1,h=JPe(b=i[w])),E=e;S<m;++S)(E=VB(b>0?p[S]+" "+x:Zt(x,/&\f/g,p[S])))&&(l[y++]=E);return nS(e,t,n,o===0?sD:s,l,u,f)}function c3e(e,t,n){return nS(e,t,n,zB,eS(n3e()),dm(e,2,-2),0)}function h4(e,t,n,r){return nS(e,t,n,lD,dm(e,0,r),dm(e,r+1,-1),r)}function Od(e,t){for(var n="",r=cD(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function u3e(e,t,n,r){switch(e.type){case KPe:if(e.children.length)break;case $Pe:case lD:return e.return=e.return||e.value;case zB:return"";case UB:return e.return=e.value+"{"+Od(e.children,r)+"}";case sD:e.value=e.props.join(",")}return Hi(n=Od(e.children,r))?e.return=e.value+"{"+n+"}":""}function d3e(e){var t=cD(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}function f3e(e){return function(t){t.root||(t=t.return)&&e(t)}}function h3e(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var p3e=function(t,n,r){for(var o=0,a=0;o=a,a=Zi(),o===38&&a===12&&(n[r]=1),!fm(a);)Ko();return Fg(t,Po)},m3e=function(t,n){var r=-1,o=44;do switch(fm(o)){case 0:o===38&&Zi()===12&&(n[r]=1),t[r]+=p3e(Po-1,n,r);break;case 2:t[r]+=nb(o);break;case 4:if(o===44){t[++r]=Zi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=eS(o)}while(o=Ko());return t},g3e=function(t,n){return ZB(m3e(GB(t),n))},p4=new WeakMap,v3e=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!p4.get(r))&&!o){p4.set(t,!0);for(var a=[],i=g3e(n,a),s=r.props,l=0,u=0;l<i.length;l++)for(var f=0;f<s.length;f++,u++)t.props[u]=a[l]?i[l].replace(/&\f/g,s[f]):s[f]+" "+i[l]}}},y3e=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function qB(e,t){switch(QPe(e,t)){case 5103:return Gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gt+e+Ub+e+_r+e+e;case 6828:case 4268:return Gt+e+_r+e+e;case 6165:return Gt+e+_r+"flex-"+e+e;case 5187:return Gt+e+Zt(e,/(\w+).+(:[^]+)/,Gt+"box-$1$2"+_r+"flex-$1$2")+e;case 5443:return Gt+e+_r+"flex-item-"+Zt(e,/flex-|-self/,"")+e;case 4675:return Gt+e+_r+"flex-line-pack"+Zt(e,/align-content|flex-|-self/,"")+e;case 5548:return Gt+e+_r+Zt(e,"shrink","negative")+e;case 5292:return Gt+e+_r+Zt(e,"basis","preferred-size")+e;case 6060:return Gt+"box-"+Zt(e,"-grow","")+Gt+e+_r+Zt(e,"grow","positive")+e;case 4554:return Gt+Zt(e,/([^-])(transform)/g,"$1"+Gt+"$2")+e;case 6187:return Zt(Zt(Zt(e,/(zoom-|grab)/,Gt+"$1"),/(image-set)/,Gt+"$1"),e,"")+e;case 5495:case 3959:return Zt(e,/(image-set\([^]*)/,Gt+"$1$`$1");case 4968:return Zt(Zt(e,/(.+:)(flex-)?(.*)/,Gt+"box-pack:$3"+_r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gt+e+e;case 4095:case 3583:case 4068:case 2532:return Zt(e,/(.+)-inline(.+)/,Gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hi(e)-1-t>6)switch(Ir(e,t+1)){case 109:if(Ir(e,t+4)!==45)break;case 102:return Zt(e,/(.+:)(.+)-([^]+)/,"$1"+Gt+"$2-$3$1"+Ub+(Ir(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Sk(e,"stretch")?qB(Zt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ir(e,t+1)!==115)break;case 6444:switch(Ir(e,Hi(e)-3-(~Sk(e,"!important")&&10))){case 107:return Zt(e,":",":"+Gt)+e;case 101:return Zt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gt+(Ir(e,14)===45?"inline-":"")+"box$3$1"+Gt+"$2$3$1"+_r+"$2box$3")+e}break;case 5936:switch(Ir(e,t+11)){case 114:return Gt+e+_r+Zt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gt+e+_r+Zt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gt+e+_r+Zt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Gt+e+_r+e+e}return e}var b3e=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case lD:t.return=qB(t.value,t.length);break;case UB:return Od([Xh(t,{value:Zt(t.value,"@","@"+Gt)})],o);case sD:if(t.length)return t3e(t.props,function(a){switch(e3e(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Od([Xh(t,{props:[Zt(a,/:(read-\w+)/,":"+Ub+"$1")]})],o);case"::placeholder":return Od([Xh(t,{props:[Zt(a,/:(plac\w+)/,":"+Gt+"input-$1")]}),Xh(t,{props:[Zt(a,/:(plac\w+)/,":"+Ub+"$1")]}),Xh(t,{props:[Zt(a,/:(plac\w+)/,_r+"input-$1")]})],o)}return""})}},w3e=[b3e],S3e=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var y=b.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var o=t.stylisPlugins||w3e,a={},i,s=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var y=b.getAttribute("data-emotion").split(" "),S=1;S<y.length;S++)a[y[S]]=!0;s.push(b)});var l,u=[v3e,y3e],f,h=[u3e,f3e(function(b){f.insert(b)})],p=d3e(u.concat(o,h)),m=function(y){return Od(l3e(y),p)};l=function(y,S,x,E){f=x,m(y?y+"{"+S.styles+"}":S.styles),E&&(w.inserted[S.name]=!0)};var w={key:n,sheet:new qPe({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return w.sheet.hydrate(s),w};function T3e(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var x3e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},I3e=/[A-Z]|^ms/g,k3e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$B=function(t){return t.charCodeAt(1)===45},m4=function(t){return t!=null&&typeof t!="boolean"},Ax=h3e(function(e){return $B(e)?e:e.replace(I3e,"-$&").toLowerCase()}),g4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(k3e,function(r,o,a){return Hl={name:o,styles:a,next:Hl},o})}return x3e[t]!==1&&!$B(t)&&typeof n=="number"&&n!==0?n+"px":n};function Vb(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":if(n.anim===1)return Hl={name:n.name,styles:n.styles,next:Hl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Hl={name:r.name,styles:r.styles,next:Hl},r=r.next;var o=n.styles+";";return o}return E3e(e,t,n)}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function E3e(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Vb(e,t,n[o])+";";else for(var a in n){var i=n[a];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=a+"{"+t[i]+"}":m4(i)&&(r+=Ax(a)+":"+g4(a,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var s=0;s<i.length;s++)m4(i[s])&&(r+=Ax(a)+":"+g4(a,i[s])+";");else{var l=Vb(e,t,i);switch(a){case"animation":case"animationName":r+=Ax(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}}return r}var v4=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Hl,Nx=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";Hl=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,a+=Vb(r,n,i)):a+=i[0];for(var s=1;s<t.length;s++)a+=Vb(r,n,t[s]),o&&(a+=i[s]);v4.lastIndex=0;for(var l="",u;(u=v4.exec(a))!==null;)l+="-"+u[1];var f=T3e(a)+l;return{name:f,styles:a,next:Hl}};function KB(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var C3e=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},M3e=function(t,n,r){C3e(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function y4(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function b4(e,t,n){var r=[],o=KB(e,r,n);return r.length<2?n:o+t(r)}var D3e=function(t){var n=S3e(t);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var h=Nx(u,n.registered,void 0);return M3e(n,h),n.key+"-"+h.name},o=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var h=Nx(u,n.registered),p="animation-"+h.name;return y4(n,{name:h.name,styles:"@keyframes "+p+"{"+h.styles+"}"}),p},a=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var h=Nx(u,n.registered);y4(n,h)},i=function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];return b4(n.registered,r,A3e(u))};return{css:r,cx:i,injectGlobal:a,keyframes:o,hydrate:function(l){l.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:KB.bind(null,n.registered),merge:b4.bind(null,n.registered,r)}},A3e=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];if(o!=null){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else{a="";for(var i in o)o[i]&&i&&(a&&(a+=" "),a+=i)}break;default:a=o}a&&(n&&(n+=" "),n+=a)}}return n},N3e=Lg,uD=Date.prototype,w4="Invalid Date",JB="toString",O3e=uD[JB],P3e=uD.getTime;String(new Date(NaN))!=w4&&N3e(uD,JB,function(){var t=P3e.call(this);return t===t?O3e.call(this):w4});var j3e=oD,L3e=bB,R3e=j3e?{}.toString:function(){return"[object "+L3e(this)+"]"},F3e=oD,H3e=Lg,B3e=R3e;F3e||H3e(Object.prototype,"toString",B3e,{unsafe:!0});var _3e=nD.PROPER,Y3e=Lg,z3e=Xl,S4=Q0,U3e=ci,V3e=wB,dD="toString",XB=RegExp.prototype,QB=XB[dD],W3e=U3e(function(){return QB.call({source:"a",flags:"b"})!="/a/b"}),G3e=_3e&&QB.name!=dD;(W3e||G3e)&&Y3e(RegExp.prototype,dD,function(){var t=z3e(this),n=S4(t.source),r=t.flags,o=S4(r===void 0&&t instanceof RegExp&&!("flags"in XB)?V3e.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var T4=typeof window<"u"?window:self,Z3e=T4.crypto||T4.msCrypto,q3e=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(Z3e);const $3e=Xe(q3e);function K3e(){return $3e().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var J3e=jH;const x4=Xe(J3e);function Jt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function I4(e,t){for(var n,r,o=arguments.length,a=new Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];return Dn(n=[Dn(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Ft(Jt("green","white")),a)}function X3e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];if(a.length){var s=a,l=Ri(s,1),u=l[0];typeof u=="function"&&(a=u());var f=x4(a[0])?a:[a],h=f.length===1;zb(f).call(f,function(p,m){if(h){var w,b;(w=console).log.apply(w,Ft(I4.apply(void 0,Dn(b=[e]).call(b,Ft(p)))))}else if(m){var y;(y=console).log.apply(y,Ft(x4(p)?p:[p]))}else{var S,x;(S=console).groupCollapsed.apply(S,Ft(I4.apply(void 0,Dn(x=[e]).call(x,Ft(p)))))}}),h||console.groupEnd()}}:function(){return 0}}var Q3e=Iu,eje=nD.EXISTS,tje=jg.f,e_=Function.prototype,nje=e_.toString,rje=/^\s*function ([^ (]*)/,oje="name";Q3e&&!eje&&tje(e_,oje,{configurable:!0,get:function(){try{return nje.call(this).match(rje)[1]}catch{return""}}});var aje=Mr,ije=aje.setTimeout,sje=ije;const lje=Xe(sje);function cje(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];var s=zl();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=lje(function(){e.apply(void 0,a),n=zl()},Math.max(0,t-s+n)))}}var t_=function(t){var n=t.debounce,r=t.name,o=t.onEvent,a=t.target,i=D.useRef();i.current=o;var s=D.useMemo(function(){return cje(function(u){var f=i.current;f&&f(u)},n)},[n,i]),l=D.useCallback(function(u){u.timeStampLow=zl(),s(u)},[s]);return D.useLayoutEffect(function(){return a.addEventListener(r,l,{passive:!0}),l({target:a,type:r}),function(){return a.removeEventListener(r,l)}},[r,l,a]),!1};t_.defaultProps={debounce:200};var uje=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},dje=on,fje=uje;dje({target:"Math",stat:!0},{sign:fje});var hje=Mr,pje=hje.Math.sign,mje=pje,gje=mje,vje=gje;const yje=Xe(vje);function bje(e,t){var n=yje(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function wje(e,t,n,r){for(var o=e,a=0;a<r;a++)o=n(o,t);return o}var n_=function(t){var n=t.name,r=t.onEnd,o=t.target,a=t.value,i=D.useRef(),s=D.useCallback(function(u,f,h,p){var m=arguments.length>4&&arguments[4]!==void 0?arguments[4]:zl();(h==="100%"||typeof h=="number")&&(cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){if(o){var w=h==="100%"?o.scrollHeight-o.offsetHeight:h,b=wje(f,w,bje,(zl()-m)/5);Math.abs(w-b)<1.5&&(b=w),o[u]=b,w===b?r&&r(!0):s(u,f,h,p+1,m)}}))},[i,r,o]),l=D.useCallback(function(){cancelAnimationFrame(i.current),r&&r(!1)},[r]);return D.useLayoutEffect(function(){return s(n,o[n],a,1),o?(o.addEventListener("pointerdown",l,{passive:!0}),o.addEventListener("wheel",l,{passive:!0}),function(){o.removeEventListener("pointerdown",l),o.removeEventListener("wheel",l),cancelAnimationFrame(i.current)}):function(){return cancelAnimationFrame(i.current)}},[s,i,l,n,o,a]),!1};n_.propTypes={name:_t.string.isRequired,onEnd:_t.func,target:_t.any.isRequired,value:_t.oneOfType([_t.number,_t.oneOf(["100%"])]).isRequired};function Ox(e){var t=D.useState(e),n=Ri(t,2),r=n[0],o=n[1],a=D.useRef(),i=D.useCallback(function(s){typeof s=="function"?i(function(l){return s=s(l),a.current=s,s}):(a.current=s,i(s))},[a]);return a.current=r,[r,o,a]}function k4(e,t){var n=zOe(e);if(c4){var r=c4(e);t&&(r=iPe(r).call(r,function(o){return BB(e,o).enumerable})),n.push.apply(n,r)}return n}function E4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;zb(r=k4(Object(n),!0)).call(r,function(a){FCe(e,a,n[a])})}else if(u4)UPe(e,u4(n));else{var o;zb(o=k4(Object(n))).call(o,function(a){WPe(e,a,BB(n,a))})}}return e}var Sje=function(){return 1/0},C4=17,Tje="bottom",Ga="top",M4=1,xje=34,D4={};function Ije(e,t){return e(),mNe(e,t)}function A4(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,a=n.scrollTop,i=o-a-r<M4,s=a<M4,l=t===Ga?s:i,u=t!==Ga?s:i;return{atBottom:i,atEnd:l,atStart:u,atTop:s}}function Qh(e,t){return e===(t===Ga?0:"100%")}var fD=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,a=t.debug,i=t.initialScrollBehavior,s=t.mode,l=t.nonce,u=t.scroller,f=D.useMemo(function(){return X3e("<ScrollToBottom>",{force:a})},[a]);s=s===Ga?Ga:Tje;var h=D.useRef(0),p=D.useRef(i),m=Ox(s===Ga?0:"100%"),w=Ri(m,3),b=w[0],y=w[1],S=w[2],x=Ox(null),E=Ri(x,3),C=E[0],M=E[1],k=E[2],O=D.useRef(0),F=D.useRef(0),R=D.useRef(0),B=D.useState(!0),Y=Ri(B,2),H=Y[0],Z=Y[1],W=D.useState(!0),$=Ri(W,2),V=$[0],ne=$[1],Q=D.useState(!0),te=Ri(Q,2),G=te[0],X=te[1],ee=D.useState(!1),ie=Ri(ee,2),fe=ie[0],he=ie[1],we=Ox(!0),Ne=Ri(we,3),Ae=Ne[0],Te=Ne[1],Fe=Ne[2],We=D.useRef([]),ke=D.useCallback(function(qe){var mt=k.current;return We.current.push(qe),mt&&qe({scrollTop:mt.scrollTop}),function(){var Tt=We.current,Et=ANe(Tt).call(Tt,qe);~Et&&eOe(Tt).call(Tt,Et,1)}},[We,k]),Ie=D.useCallback(function(){var qe=S.current;f(function(){var mt;return Dn(mt=["%cSpineTo%c: %conEnd%c is fired."]).call(mt,Ft(Jt("magenta")),Ft(Jt("orange")),[{animateTo:qe}])}),h.current=zl(),Qh(qe,s)||Te(!1),y(null)},[S,f,h,s,y,Te]),ce=D.useCallback(function(qe){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Tt=mt.behavior,Et=k.current;if(typeof qe!="number"&&qe!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');f(function(){var Lt;return[Dn(Lt=["%cscrollTo%c: Will scroll to %c".concat(typeof qe=="number"?qe+"px":qe.replace(/%/g,"%%"),"%c")]).call(Lt,Ft(Jt("lime","")),Ft(Jt("purple"))),{behavior:Tt,nextAnimateTo:qe,target:Et}]}),Tt==="auto"?(Ie(),Et&&(Et.scrollTop=qe==="100%"?Et.scrollHeight-Et.offsetHeight:qe)):(Tt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(qe)),Qh(qe,s)&&(f(function(){var Lt;return[Dn(Lt=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Lt,Ft(Jt("lime","")),Ft(Jt("purple"))),[{mode:s,nextAnimateTo:qe}]]}),Te(!0))},[f,Ie,s,y,Te,k]),Pe=D.useCallback(function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mt=qe.behavior;f(function(){var Tt;return Dn(Tt=["%cscrollToBottom%c: Called"]).call(Tt,Ft(Jt("yellow","")))}),mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ce("100%",{behavior:mt||"smooth"})},[f,ce]),Oe=D.useCallback(function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mt=qe.behavior;f(function(){var Tt;return Dn(Tt=["%cscrollToTop%c: Called"]).call(Tt,Ft(Jt("yellow","")))}),mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ce(0,{behavior:mt||"smooth"})},[f,ce]),Ve=D.useCallback(function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mt=qe.behavior;f(function(){var Et;return Dn(Et=["%cscrollToEnd%c: Called"]).call(Et,Ft(Jt("yellow","")))}),mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Tt={behavior:mt||"smooth"};s===Ga?Oe(Tt):Pe(Tt)},[f,s,Pe,Oe]),tt=D.useCallback(function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mt=qe.behavior;f(function(){var Et;return Dn(Et=["%cscrollToStart%c: Called"]).call(Et,Ft(Jt("yellow","")))}),mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Tt={behavior:mt||"smooth"};s===Ga?Pe(Tt):Oe(Tt)},[f,s,Pe,Oe]),ot=D.useCallback(function(){var qe=k.current;if(qe){if(p.current==="auto"){f(function(){var qr;return Dn(qr=["%ctarget changed%c: Initial scroll"]).call(qr,Ft(Jt("blue")))}),qe.scrollTop=s===Ga?0:qe.scrollHeight-qe.offsetHeight,p.current=!1;return}var mt=O.current,Tt=qe.offsetHeight,Et=qe.scrollHeight,Lt=qe.scrollTop,mr=s===Ga?0:Math.max(0,Et-Tt-Lt),gr=Math.max(0,mt-Lt),Aa=u({maxValue:mr,minValue:gr,offsetHeight:Tt,scrollHeight:Et,scrollTop:Lt}),ao=Math.max(0,Math.min(mr,Aa)),Zn;s===Ga||ao!==mr?Zn=Lt+ao:Zn="100%",f(function(){var qr,io,En;return[Dn(qr=[Dn(io=Dn(En="%cscrollToSticky%c: Will animate from %c".concat(mt,"px%c to %c")).call(En,typeof Zn=="number"?Zn+"px":Zn.replace(/%/g,"%%"),"%c (%c")).call(io,(Zn==="100%"?mr:Zn)+mt,"px%c)")]).call(qr,Ft(Jt("orange")),Ft(Jt("purple")),Ft(Jt("purple")),Ft(Jt("purple"))),{animateFrom:mt,maxValue:mr,minValue:gr,nextAnimateTo:Zn,nextValue:ao,offsetHeight:Tt,rawNextValue:Aa,scrollHeight:Et,scrollTop:Lt}]}),ce(Zn,{behavior:"smooth"})}},[O,f,s,u,ce,k]),st=D.useCallback(function(qe){var mt,Tt=qe.timeStampLow,Et=S.current,Lt=k.current,mr=Et!==null;if(!(Tt<=h.current||!Lt)){var gr=A4({mode:s,target:Lt}),Aa=gr.atBottom,ao=gr.atEnd,Zn=gr.atStart,qr=gr.atTop;Z(Aa),ne(ao),he(Zn),X(qr);var io=Lt.offsetHeight,En=Lt.scrollHeight,na=F.current,Dr=R.current,Ct=io!==na,so=En!==Dr;if(Ct&&(F.current=io),so&&(R.current=En),!Ct&&!so){var lo=mr&&Qh(Et,s)||ao;Fe.current!==lo&&(f(function(){var Hn,oa,Ar,di;return[Dn(Hn=["%conScroll%c: %csetSticky%c(%c".concat(lo,"%c)")]).call(Hn,Ft(Jt("red")),Ft(Jt("red")),Ft(Jt("purple"))),Dn(oa=[Dn(Ar=Dn(di="(animating = %c".concat(mr,"%c && isEnd = %c")).call(di,Qh(Et,s),"%c) || atEnd = %c")).call(Ar,ao,"%c")]).call(oa,Ft(Jt("purple")),Ft(Jt("purple")),Ft(Jt("purple")),[{animating:mr,animateTo:Et,atEnd:ao,mode:s,offsetHeight:Lt.offsetHeight,scrollHeight:Lt.scrollHeight,sticky:Fe.current,nextSticky:lo}])]}),Te(lo))}else Fe.current&&(f(function(){var Hn;return[Dn(Hn=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(Hn,Ft(Jt("red")),Ft(Jt("orange")),[{offsetHeightChanged:Ct,scrollHeightChanged:so}]),{nextOffsetHeight:io,prevOffsetHeight:na,nextScrollHeight:En,prevScrollHeight:Dr}]}),ot());var ra=Lt.scrollTop;zb(mt=We.current).call(mt,function(Hn){return Hn({scrollTop:ra})})}},[S,f,h,s,F,R,We,ot,Z,ne,he,X,Te,Fe,k]);D.useEffect(function(){if(C){var qe=!1,mt=Ije(function(){var Tt=k.current,Et=S.current!==null;Fe.current?A4({mode:s,target:Tt}).atEnd?qe=!1:qe?zl()-qe>xje&&(Et||(O.current=Tt.scrollTop,f(function(){var Lt;return Dn(Lt=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Lt,Ft(Jt("navy")),Ft(Jt("orange")))}),ot()),qe=!1):qe=zl():Tt.scrollHeight<=Tt.offsetHeight&&!Fe.current&&(f(function(){var Lt;return[Dn(Lt=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Lt,Ft(Jt("navy")),Ft(Jt("purple"))),[{offsetHeight:Tt.offsetHeight,scrollHeight:Tt.scrollHeight,sticky:Fe.current}]]}),Te(!0))},Math.max(C4,n)||C4);return function(){return clearInterval(mt)}}},[S,n,f,s,ot,Te,Fe,C,k]);var wt=D.useMemo(function(){var qe=D4[l]||(D4[l]=D3e({key:"react-scroll-to-bottom--css-"+K3e(),nonce:l}));return function(mt){return qe.css(mt)+""}},[l]),Ot=D.useMemo(function(){return{observeScrollPosition:ke,setTarget:M,styleToClassName:wt}},[ke,M,wt]),Wt=D.useMemo(function(){return{atBottom:H,atEnd:V,atStart:fe,atTop:G,mode:s}},[H,V,fe,G,s]),an=D.useMemo(function(){var qe=b!==null;return{animating:qe,animatingToEnd:qe&&Qh(b,s),sticky:Ae}},[b,s,Ae]),mn=D.useMemo(function(){return E4(E4({},Wt),an)},[Wt,an]),Fn=D.useMemo(function(){return{scrollTo:ce,scrollToBottom:Pe,scrollToEnd:Ve,scrollToStart:tt,scrollToTop:Oe}},[ce,Pe,Ve,tt,Oe]);return D.useEffect(function(){if(C){var qe=function(){R.current=C.scrollHeight};return C.addEventListener("focus",qe,{capture:!0,passive:!0}),function(){return C.removeEventListener("focus",qe)}}},[C]),f(function(){var qe;return[Dn(qe=["%cRender%c: Render"]).call(qe,Ft(Jt("cyan",""))),{animateTo:b,animating:b!==null,sticky:Ae,target:C}]}),_.createElement(Z0.Provider,{value:Ot},_.createElement(zM.Provider,{value:Fn},_.createElement(WM.Provider,{value:mn},_.createElement(UM.Provider,{value:Wt},_.createElement(VM.Provider,{value:an},r,C&&_.createElement(t_,{debounce:o,name:"scroll",onEvent:st,target:C}),C&&b!==null&&_.createElement(n_,{name:"scrollTop",onEnd:Ie,target:C,value:b}))))))};fD.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Sje};fD.propTypes={checkInterval:_t.number,children:_t.any,debounce:_t.number,debug:_t.bool,initialScrollBehavior:_t.oneOf(["auto","smooth"]),mode:_t.oneOf(["bottom","top"]),nonce:_t.string,scroller:_t.func};var kje={height:"100%",overflowY:"auto",width:"100%"},hD=function(t){var n=t.children,r=t.className,o=D.useContext(Z0),a=o.setTarget,i=GM()(kje);return _.createElement("div",{className:YM(i,(r||"")+""),ref:a},n)};hD.defaultProps={children:void 0,className:void 0};hD.propTypes={children:_t.any,className:_t.string};var Eje={position:"relative"},pD=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,a=t.scrollViewClassName,i=GM()(Eje);return _.createElement("div",{className:YM(i,(r||"")+"")},_.createElement(hD,{className:(a||"")+""},n),_.createElement(ZM,{className:(o||"")+""}))};pD.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0};pD.propTypes={children:_t.any,className:_t.string,followButtonClassName:_t.string,scrollViewClassName:_t.string};var mD=function(t){var n=t.checkInterval,r=t.children,o=t.className,a=t.debounce,i=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,u=t.mode,f=t.nonce,h=t.scroller,p=t.scrollViewClassName;return _.createElement(fD,{checkInterval:n,debounce:a,debug:i,initialScrollBehavior:l,mode:u,nonce:f,scroller:h},_.createElement(pD,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};mD.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0};mD.propTypes={checkInterval:_t.number,children:_t.any,className:_t.string,debounce:_t.number,debug:_t.bool,followButtonClassName:_t.string,initialScrollBehavior:_t.oneOf(["auto","smooth"]),mode:_t.oneOf(["bottom","top"]),nonce:_t.string,scroller:_t.func,scrollViewClassName:_t.string};function Cje(){var e=G0(),t=e.scrollToBottom;return t}function Mje(){var e=G0(),t=e.scrollToStart;return t}function Dje(){var e=G0(),t=e.scrollToTop;return t}ebe();const Aje=e=>{const{locationState:{query:t},globalState:{memoListView:n,manifest:r},dailyNotesState:{app:o,settings:a}}=D.useContext(it),{thinos:i}=e,[s,l]=_.useState(hm(i,"day")),u=_.useRef(null),f=Cje(),h=D.useRef([]);D.useRef(0),D.useEffect(()=>{const w=hm(i,"day");ru(w,s)||l(w)},[i]),D.useEffect(()=>{if(ru(h.current,i))return;const w=i.filter(x=>x.pinned),b=i.filter(x=>!x.pinned),y=h.current.filter(x=>x.pinned)[0],S=h.current.filter(x=>!x.pinned)[0];(y&&y.id!==w[0]?.id||S&&S.id!==b[0]?.id)&&f()},[i]),D.useEffect(()=>{u.current&&f()},[t]);const p=D.useCallback(()=>{o.setting.open(),o.setting.openTabById(r.id||"obsidian-memos")},[o]),m=D.useMemo(()=>g.jsx(g.Fragment,{children:Object.keys(s).map((w,b)=>g.jsx(g.Fragment,{children:g.jsx(Nje,{thinos:s[w],dayMark:w,handleOpenSettings:p},w+b)}))}),[s]);return g.jsx("div",{ref:u,className:qt("chat-view",`${a?.chatViewStyle}-style`),children:m})},Nje=({thinos:e,dayMark:t,handleOpenSettings:n})=>{const{dailyNotesState:{settings:r,app:o}}=D.useContext(it),[a,i]=_.useState(!0),s=_.useRef(null),[l,u]=_.useState(r?.MomentsIcon);D.useEffect(()=>{if(!r?.MomentsIcon||!o)return;const m=o.vault.adapter.getResourcePath(A.normalizePath(r.MomentsIcon));m&&!r?.MomentsIcon.startsWith("http")?u(m):u(r?.MomentsIcon)},[r?.MomentsIcon]);const f=m=>{if(A.Keymap.isModifier(m.nativeEvent,"Mod")){const w=A.moment(t,"YYYY-MM-DD");Ye.setFromAndToQuery(w.startOf("day").valueOf(),w.endOf("day").valueOf());return}i(!a),s.current.scrollIntoView(!0)},h=m=>{Qa(m)},p=D.useMemo(()=>e.map((m,w)=>g.jsxs("div",{className:"thino-bubble right",children:[g.jsx(Oje,{icon:l,handleOpenSettings:n}),g.jsx("div",{className:"wrap",children:g.jsx(Pje,{thino:m,handleClickTimeStamp:h},`${m.id}-${A.moment(m.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${w}`)})]},m.id+w)),[e,l]);return g.jsxs(g.Fragment,{children:[a&&p,g.jsx("div",{className:`thino-chat-day-mark day-mark ${a?"":"folded"}`,onClick:f,children:g.jsx("div",{className:"day-mark-bubble",children:(t==="PINNED"?t+" 📌":t)+(a?"":"...")})})]})},Oje=({icon:e,handleOpenSettings:t})=>g.jsx("div",{ref:n=>{if(e){n?.empty();return}e||n&&A.setIcon(n,"Memos")},className:"icon-img",style:{backgroundImage:`url("${e}")`}}),Pje=({thino:e,handleClickTimeStamp:t})=>{const n=D.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const a=await le.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");a&&le.editMemo(a)},[e]),r=D.useMemo(()=>g.jsxs("div",{className:"content",children:[g.jsx("div",{className:"time-stamp","data-date":A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),g.jsx(no,{memo:e})]}),[e.content]),o=D.useMemo(()=>g.jsxs("div",{className:"content task",children:[g.jsx("div",{className:"task-inputer",children:g.jsx("input",{className:qt("thino-type-status","task-list-item-checkbox"),type:"checkbox",checked:e.thinoType!=="TASK-TODO","data-task":e.thinoType==="TASK-TODO"?"":e.thinoType==="TASK-DONE"?"x":e.thinoType?.slice(5),onClick:n})}),g.jsx("div",{className:"time-stamp","data-date":A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),g.jsx(no,{memo:e})]}),[e.content,e.thinoType]);return e.thinoType==="JOURNAL"?r:o},jje=3e3;function Lje({statusRef:e,isComplete:t,fetchMore:n,cachedMemos:r}){const o=D.useRef(!1),a=D.useCallback(jG(()=>{if(!(o.current||t)){o.current=!0;try{n()}finally{setTimeout(()=>{o.current=!1},500)}}},jje),[n,t]);D.useEffect(()=>{const i=e.current;if(!i)return;const s=new IntersectionObserver(([l])=>{l.isIntersecting&&!t&&!o.current&&a()});return s.observe(i),()=>{s.unobserve(i),a.cancel()}},[t,e,a]),D.useEffect(()=>{if(r.length<40&&!t&&!o.current){const i=setTimeout(()=>{a()},100);return()=>clearTimeout(i)}},[r.length,t,a])}function N4(e,t){switch(t){case"createdAt":case"updatedAt":return new Date(e[t]).getTime();case"content-length":return e.content.length;case"sourceType":return e.sourceType||"";case"thinoType":return e.thinoType||"";case"pinned":return e.pinned?1:0;default:return t in e&&e[t]||""}}function Rje(e,t,n){let r=0;if(typeof e=="number"&&typeof t=="number")r=e-t;else if(typeof e=="string"&&typeof t=="string")r=e.localeCompare(t);else{const o=String(e),a=String(t);r=o.localeCompare(a)}return n==="desc"?-r:r}function Fje(e,t){return e.slice().sort((n,r)=>{if(n.pinned!==r.pinned)return n.pinned?-1:1;const o=N4(n,t.field),a=N4(r,t.field);return Rje(o,a,t.direction)})}function Hje(){return{field:"createdAt",direction:"desc",label:"Created Time"}}function Bje(e){try{const t=e?.loadLocalStorage("memoSortConfig");if(t){const n=JSON.parse(t);if(n.field&&n.direction&&n.label)return n}}catch(t){console.warn("Failed to load sort config:",t)}return Hje()}function hm(e,t){const n={},r={day:"YYYY-MM-DD ddd",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"};return e.forEach(o=>{const a=o.pinned?"PINNED":A.moment(o.createdAt,"YYYY/MM/DD HH:mm:ss").format(r[t]);n[a]||(n[a]=[]),n[a].push(o)}),n}function _je(e){const{tag:t,duration:n,type:r,text:o,filter:a,path:i,metadata:s}=e,l=St.getQueryById(a),u=!s||Object.keys(s).length===0;return!(!!(t||n&&n.from<n.to||r||o||!u||i||l?.id)||l)}const Yje=({updateThinos:e,listView:t,sortConfig:n})=>{const{locationState:{query:r},memoState:{memos:o},dailyNotesState:{app:a,settings:i,plugin:s}}=D.useContext(it),[l,u]=D.useState([]),[f,h,p]=Eo([]),[m,w]=D.useState({isFetching:!1,isComplete:!1,batchSize:20,currentBatchIndex:0}),b=D.useRef(null),y=D.useRef(null),S=D.useRef(null),[x,E]=D.useState({showDayMark:a?.loadLocalStorage("showDayMark")||!1,dayMarkRange:a?.loadLocalStorage("dayMarkRange")||"day",dayMarkThinos:{}}),C=Dje(),M=Mje(),k=D.useRef(!1);D.useEffect(()=>{M(),O()},[t]),D.useEffect(()=>()=>{y.current&&(y.current=null),S.current&&(S.current=null)},[]),D.useLayoutEffect(()=>{if(o.length!==0&&k.current===!0)return;const W=zje(a||window.app);if(!W||W.length===0)return;h(W),u(W);const $=a?.loadLocalStorage("showDayMark")||!1;E(V=>({...V,showDayMark:$,dayMarkThinos:$?hm(W,a?.loadLocalStorage("dayMarkRange")||"day"):V.dayMarkThinos}))},[]),D.useEffect(()=>{if(o.length===0&&!le.initialized)return;w($=>({...$,isFetching:!1,isComplete:!1,currentBatchIndex:0}));const W=n?Fje(o,n):o.slice().sort(($,V)=>$.pinned!==V.pinned?$.pinned?-1:1:new Date(V.createdAt).getTime()-new Date($.createdAt).getTime());return _l({memos:W,query:r,filterOptions:{filterDoneTasks:i?.HideDoneTasks||!1},plugin:s}).then($=>(k.current=!0,e&&e($),!ru(p.current,$)&&h($),$)),()=>{k.current=!1}},[o,r,i?.HideDoneTasks,n]),D.useEffect(()=>{w(W=>({...W,isComplete:!1,currentBatchIndex:0})),O(),f.length>0&&f.length<=m.batchSize&&w(W=>({...W,isComplete:!0}))},[f]),D.useEffect(()=>{const W=l.length===f.length&&f.length>0;W!==m.isComplete&&w(ne=>({...ne,isComplete:W})),Uje(l||[],a);const $=i?.showDayMark||!1,V=i?.dayMarkRange||"day";a?.saveLocalStorage("showDayMark",$),a?.saveLocalStorage("dayMarkRange",V),E(ne=>({showDayMark:$,dayMarkRange:V,dayMarkThinos:$?hm(l,V):ne.dayMarkThinos}))},[l,i?.showDayMark,i?.dayMarkRange]),D.useEffect(()=>{C()},[r]);const O=()=>{const W=m.batchSize,$=f.slice(0,W);u($),w(V=>({...V,currentBatchIndex:1,isComplete:$.length===f.length}))},F=D.useCallback(A.debounce(()=>{try{if(m.isFetching)return;const{batchSize:W,currentBatchIndex:$,isComplete:V}=m,ne=p.current.length,Q=l.length;if(V&&Q>=ne)return;V&&Q<ne&&w(G=>({...G,isComplete:!1}));const te=$*W;if(te>=p.current.length){w(G=>({...G,isComplete:!0}));return}w(G=>({...G,isFetching:!0})),setTimeout(()=>{const G=Math.min(te+W,p.current.length),X=p.current.slice(0,G);u(X);const ee=G===p.current.length;w(ie=>({...ie,isFetching:!1,isComplete:ee,currentBatchIndex:ie.currentBatchIndex+1}))},300)}catch(W){console.error(W),new A.Notice(W.response?.data?.message||W.message||"Failed to load more memos"),w($=>({...$,isFetching:!1}))}},500),[m,l,p]);Lje({statusRef:y,isComplete:m.isComplete||t==="flow",fetchMore:t==="flow"?()=>{}:F,cachedMemos:l});const R=()=>le.fetchAllMemos().then(()=>{}).catch(W=>{console.error("Failed to refresh memos:",W)}),B=D.useCallback(A.debounce(async()=>{if(!m.isFetching){w(W=>({...W,isFetching:!0,isComplete:!1,currentBatchIndex:0}));try{await R(),setTimeout(()=>{C(),setTimeout(()=>{w(W=>({...W,isFetching:!1}))},300)},100)}catch(W){console.error("Pull-to-refresh failed:",W),new A.Notice("Failed to refresh data"),w($=>({...$,isFetching:!1}))}}},800),[m.isFetching,R,C]),Y=D.useMemo(()=>g.jsx("div",{ref:y,className:qt("status-text-container",t==="calendar"||t==="table"?"visually-hidden":""),children:g.jsx("p",{className:"status-text",children:m.isFetching?g.jsx("span",{className:"fetching-indicator",children:I("Fetching data...")}):m.isComplete?g.jsx(g.Fragment,{children:f.length===0?I("Noooop!"):g.jsxs(g.Fragment,{children:[I("All Data is Loaded 🎉"),g.jsx("span",{className:"cursor-pointer hover:text-green-600 ml-2",onClick:B,title:"Refresh to check for new memos",children:"↻"})]})}):g.jsx(g.Fragment,{children:g.jsx("span",{ref:S,className:"cursor-pointer hover:text-green-600",onClick:()=>!m.isFetching&&F(),children:I("fetch more")})})})}),[t,F,f,m.isFetching,m.isComplete,B]),H=W=>{const{showDayMark:$,dayMarkRange:V,dayMarkThinos:ne}=x;switch(W){case"list":return g.jsx($p,{breakpointCols:1,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:$?g.jsx(g.Fragment,{children:Object.keys(ne).sort((Q,te)=>Q==="PINNED"?-1:te==="PINNED"?1:te.localeCompare(Q)).map(Q=>g.jsx(AI,{type:"list",thinos:ne[Q],dayMark:Q,dayMarkRange:V},Q))}):l.map((Q,te)=>g.jsx(no,{memo:Q},`${Q.id}-${te}`))});case"waterfall":return g.jsx(g.Fragment,{children:$&&Object.keys(ne).length>0?Object.keys(ne).sort((Q,te)=>Q==="PINNED"?-1:te==="PINNED"?1:te.localeCompare(Q)).map(Q=>g.jsx(AI,{type:"waterfall",thinos:ne[Q],dayMark:Q,dayMarkRange:V},Q)):g.jsx($p,{breakpointCols:3,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:l.map((Q,te)=>g.jsx(no,{memo:Q},`${Q.id}-${te}`))})});case"chat":return g.jsx(Aje,{thinos:l});case"calendar":return g.jsx(Ive,{thinos:f});case"table":return g.jsx(Kye,{thinos:f,isFiltering:!_je(r)});case"moments":return g.jsx(Wje,{thinos:l})}},Z=W=>{switch(W){case"top":return t==="flow"?null:t==="chat"&&Y;case"bottom":return t==="flow"?null:t!=="table"&&t!=="calendar"&&Y}};return g.jsxs(mD,{className:`memolist-wrapper ${m.isComplete?"completed":""} `,mode:t==="chat"?"bottom":"top",initialScrollBehavior:"auto",checkInterval:30,followButtonClassName:qt("scroll-to-bottom-button",t==="chat"?"to-bottom":"to-top",t==="flow"&&"thino-hidden",(t==="table"||t==="calendar")&&"thino-hidden",!i?.ShowScrollToTopButton&&"thino-hidden"),scrollViewClassName:"memolist-scrollview",children:[Z("top"),g.jsx("div",{ref:b,className:"memolist-container",children:H(t)}),Z("bottom")]})};function r_(e){return`memosListCache:${e}`}function zje(e){try{if(!e?.appId)return[];const t=r_(e.appId),n=Xn.get([t])[t];return n?JSON.parse(n)?.memos||[]:[]}catch(t){return console.error(t),[]}}function Uje(e,t){try{if(!e||!t?.appId)return;const n=e?.slice(0,100),r=r_(t.appId);Xn.set({[r]:JSON.stringify({memos:n})})}catch(n){console.error(n)}}const Vje=({userIcon:e})=>g.jsx("div",{className:"moments-view-user-icon",ref:t=>{if(e){t?.empty();return}e||t&&A.setIcon(t,"Memos")},style:{backgroundImage:`url("${e}")`}}),xk="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnN2Z2pzPSJodHRwOi8vc3ZnanMuZGV2L3N2Z2pzIiB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHZpZXdCb3g9IjAgMCAxNDQwIDU2MCI+PGcgbWFzaz0idXJsKCZxdW90OyNTdmdqc01hc2sxMDgwJnF1b3Q7KSIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE0NDAiIGhlaWdodD0iNTYwIiB4PSIwIiB5PSIwIiBmaWxsPSIjMGUyYTQ3Ij48L3JlY3Q+PHVzZSB4bGluazpocmVmPSIjU3ZnanNTeW1ib2wxMDg3IiB4PSIwIiB5PSIwIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1N5bWJvbDEwODciIHg9IjcyMCIgeT0iMCI+PC91c2U+PC9nPjxkZWZzPjxtYXNrIGlkPSJTdmdqc01hc2sxMDgwIj48cmVjdCB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIGZpbGw9IiNmZmZmZmYiPjwvcmVjdD48L21hc2s+PHBhdGggZD0iTS0xIDAgYTEgMSAwIDEgMCAyIDAgYTEgMSAwIDEgMCAtMiAweiIgaWQ9IlN2Z2pzUGF0aDEwODIiPjwvcGF0aD48cGF0aCBkPSJNLTMgMCBhMyAzIDAgMSAwIDYgMCBhMyAzIDAgMSAwIC02IDB6IiBpZD0iU3ZnanNQYXRoMTA4NiI+PC9wYXRoPjxwYXRoIGQ9Ik0tNSAwIGE1IDUgMCAxIDAgMTAgMCBhNSA1IDAgMSAwIC0xMCAweiIgaWQ9IlN2Z2pzUGF0aDEwODMiPjwvcGF0aD48cGF0aCBkPSJNMiAtMiBMLTIgMnoiIGlkPSJTdmdqc1BhdGgxMDg0Ij48L3BhdGg+PHBhdGggZD0iTTYgLTYgTC02IDZ6IiBpZD0iU3ZnanNQYXRoMTA4MSI+PC9wYXRoPjxwYXRoIGQ9Ik0zMCAtMzAgTC0zMCAzMHoiIGlkPSJTdmdqc1BhdGgxMDg1Ij48L3BhdGg+PC9kZWZzPjxzeW1ib2wgaWQ9IlN2Z2pzU3ltYm9sMTA4NyI+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSI5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI5MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iOTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iOTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjkwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjE1MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMTUwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjIxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjIxMCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIyMTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjIxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIyMTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMjEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyMTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyMTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMjcwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMjcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMjcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjI3MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjMzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjMzMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMzMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjM5MCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzOTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzkwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjM5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzOTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjM5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIzOTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzOTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iNDUwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI0NTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjQ1MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iNDUwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjQ1MCIgeT0iNDUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI0NTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1MTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1MTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjUxMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjU3MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI1NzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNTcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjU3MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjU3MCIgeT0iNTEwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjYzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2MzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNjMwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjYzMCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNjMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iNTEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2MzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjY5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjY5MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI2OTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjY5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNjkwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjY5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNjkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2OTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjY5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48L3N5bWJvbD48L3N2Zz4=",ob="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnN2Z2pzPSJodHRwOi8vc3ZnanMuZGV2L3N2Z2pzIiB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHZpZXdCb3g9IjAgMCAxNDQwIDU2MCI+PGcgbWFzaz0idXJsKCZxdW90OyNTdmdqc01hc2sxMDgwJnF1b3Q7KSIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE0NDAiIGhlaWdodD0iNTYwIiB4PSIwIiB5PSIwIiBmaWxsPSJyZ2JhKDIzMSwgMjM4LCAyNDUsIDEpIj48L3JlY3Q+PHVzZSB4bGluazpocmVmPSIjU3ZnanNTeW1ib2wxMDg3IiB4PSIwIiB5PSIwIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1N5bWJvbDEwODciIHg9IjcyMCIgeT0iMCI+PC91c2U+PC9nPjxkZWZzPjxtYXNrIGlkPSJTdmdqc01hc2sxMDgwIj48cmVjdCB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIGZpbGw9IiNmZmZmZmYiPjwvcmVjdD48L21hc2s+PHBhdGggZD0iTS0xIDAgYTEgMSAwIDEgMCAyIDAgYTEgMSAwIDEgMCAtMiAweiIgaWQ9IlN2Z2pzUGF0aDEwODUiPjwvcGF0aD48cGF0aCBkPSJNLTMgMCBhMyAzIDAgMSAwIDYgMCBhMyAzIDAgMSAwIC02IDB6IiBpZD0iU3ZnanNQYXRoMTA4MyI+PC9wYXRoPjxwYXRoIGQ9Ik0tNSAwIGE1IDUgMCAxIDAgMTAgMCBhNSA1IDAgMSAwIC0xMCAweiIgaWQ9IlN2Z2pzUGF0aDEwODYiPjwvcGF0aD48cGF0aCBkPSJNMiAtMiBMLTIgMnoiIGlkPSJTdmdqc1BhdGgxMDg0Ij48L3BhdGg+PHBhdGggZD0iTTYgLTYgTC02IDZ6IiBpZD0iU3ZnanNQYXRoMTA4MSI+PC9wYXRoPjxwYXRoIGQ9Ik0zMCAtMzAgTC0zMCAzMHoiIGlkPSJTdmdqc1BhdGgxMDgyIj48L3BhdGg+PC9kZWZzPjxzeW1ib2wgaWQ9IlN2Z2pzU3ltYm9sMTA4NyI+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjMwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIzMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iOTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI5MCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjkwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iOTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iOTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMTUwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIxNTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIxNTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIxNTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIxNTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjE1MCIgeT0iNTEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMjEwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIyMTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjIxMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMjEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMjEwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyMTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyMTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIyMTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyNzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjI3MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMjcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyNzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjMzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzMwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMzMwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMzkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIzOTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjM5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjM5MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjM5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzkwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzkwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNDUwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSI0NTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNDUwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNDUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI1MTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjUxMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTEwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTEwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTEwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTEwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1NzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjU3MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTcwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTcwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI1NzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI1NzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjYzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjY5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2OTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2OTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2OTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2OTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48L3N5bWJvbD48L3N2Zz4=",Wje=e=>{const{globalState:{memoListView:t,markMemoId:n,manifest:r,editMemoId:o},dailyNotesState:{app:a,settings:i}}=D.useContext(it),{thinos:s}=e,l=_.useRef(null),u=_.useRef(null),[f,h]=_.useState(!1),[p,m]=D.useState({}),[w,b]=D.useState(a?.loadLocalStorage("dayMarkRange")||"day"),[y,S]=_.useState(i?.MomentsIcon);D.useEffect(()=>{if(!i?.MomentsIcon||!a)return;const E=a.vault.adapter.getResourcePath(A.normalizePath(i.MomentsIcon));E&&!i?.MomentsIcon.startsWith("http")?S(E):S(i?.MomentsIcon)},[i?.MomentsIcon,a]),D.useEffect(()=>{i?.showDayMark&&m(hm(s,a?.loadLocalStorage("dayMarkRange")||"day"))},[s]),D.useEffect(()=>{l.current.closest(".workspace-window")&&h(!0)},[l.current]),D.useEffect(()=>{n&&h(!0)},[n]),D.useEffect(()=>{o?(h(!0),setTimeout(()=>{a.workspace.trigger("focus-on-textarea")},200)):h(!1)},[o]),D.useEffect(()=>{u.current&&(!f&&A.setIcon(u.current,"camera"),f&&A.setIcon(u.current,"camera-off"))},[u.current,f]);const x=D.useCallback(()=>{a.setting.open(),a.setting.openTabById(r.id||"obsidian-memos")},[a]);return g.jsxs("div",{ref:l,className:qt("moments-view",f?"show-editor":""),children:[g.jsxs("div",{className:"moments-view-background-wrapper",children:[g.jsx(Gje,{}),g.jsx("div",{ref:u,className:"moments-show-editor-btn",onClick:()=>{o&&f||((f||o)&&h(!f),!f&&!o&&new DI(a).open())}}),g.jsxs("div",{className:"moments-view-background-overlay",children:[g.jsxs("div",{className:"moments-view-user-info",children:[g.jsx("div",{className:"moments-view-user-name",children:i?.UserName}),g.jsx(Vje,{userIcon:y})]}),g.jsx("div",{className:"moments-view-user-idea",children:i.MomentsQuote||" "})]})]}),i?.showDayMark?p&&Object.keys(p).length>0&&Object.keys(p).map((E,C)=>g.jsx(AI,{type:"list",thinos:p[E],dayMark:E,dayMarkRange:w,thinoWrapper:M=>g.jsx(O4,{thino:M.thino,handleOpenSettings:x},M.thino.createdAt+C)},E)):s.map((E,C)=>g.jsx(O4,{thino:E,handleOpenSettings:x},E.createdAt+C))]})},Gje=()=>{const{dailyNotesState:{app:e,view:t,settings:n}}=D.useContext(it),[r,o]=D.useState(n?.MomentsBackgroundImage||ob);return D.useEffect(()=>{if(!n?.MomentsBackgroundImage||!e){o(document.body.hasClass("theme-dark")?xk:ob);return}const a=e.vault.adapter.getResourcePath(A.normalizePath(n.MomentsBackgroundImage));a&&!n?.MomentsBackgroundImage.startsWith("http")?o(a):o(n?.MomentsBackgroundImage)},[n?.MomentsBackgroundImage,e]),D.useEffect(()=>{t&&t.registerEvent(t.app.workspace.on("css-change",()=>{o(document.body.hasClass("theme-dark")&&!n?.MomentsBackgroundImage?xk:!document.body.hasClass("theme-dark")&&!n?.MomentsBackgroundImage?ob:n?.MomentsBackgroundImage)}))},[t]),g.jsx("div",{className:"moments-view-background",style:{backgroundImage:`url("${r}")`}})},Zje=e=>{const{icon:t}=e,n=D.useCallback(()=>{app.setting.open(),app.setting.openTabById(manifest.id||"obsidian-memos")},[]);return g.jsx("div",{className:"thino-moment-icon",ref:r=>{if(t){r?.empty();return}t||r&&A.setIcon(r,"Memos")},style:{backgroundImage:`url("${t}")`},onClick:n})},O4=e=>{const{dailyNotesState:{settings:t,app:n}}=D.useContext(it),r=D.useRef(null),o=D.useRef(null),{thino:a}=e,[i,s]=D.useState("");return D.useEffect(()=>{if(!t?.MomentsIcon||!n)return;const l=n.vault.adapter.getResourcePath(A.normalizePath(t.MomentsIcon));l&&!t?.MomentsIcon.startsWith("http")?s(l):s(t?.MomentsIcon)},[t?.MomentsIcon,n]),D.useEffect(()=>{r.current&&A.setIcon(r.current,"more-horizontal")},[r.current]),g.jsxs("div",{className:"thino-moment-wrapper",children:[g.jsx(Zje,{icon:i}),g.jsxs("div",{ref:o,className:"thino-moment-container",children:[g.jsx("div",{className:"thino-moment-user-name",children:t?.UserName}),g.jsx("div",{className:"thino-moment-user-content",children:g.jsx(no,{memo:a})}),t?.enableReferenceLinksGroup&&g.jsx(f6,{memoId:a.id})]})]})},qje='<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="1146.31828" height="801.00361" viewBox="0 0 1146.31828 801.00361" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1050.69918,514.5082a456.24913,456.24913,0,0,1-37.38013-261.87c3.6001-23.1,9.44006-46.85,24.43018-64.79,14.38989-17.23,39.34985-27.37,60.0299-19.29-13.56994-29.61-47.76-46.5-80.59-47.33-34.09-.86-66.92,12.5-97.25,28.1-30.33,15.6-59.65,33.81006-92.21,43.99-53.5,16.72-111.91,10.34-165.5-6.09-53.58-16.44-103.62-42.47-154.62-65.71-51.01-23.24-104.17-44.03-160.01-48.91-55.84-4.87-115.25,7.89-157.24,45.01s-61.87,101.28-38.27,152.11c14.25,30.7,42.22,54.32,52.04,86.7,12.32,40.65-7.08,83.96-30.41,119.45-23.34,35.49-51.8,69.58-60.47,111.16-8.01,38.38,2.72,78.02,24.05,111.38a197.34468,197.34468,0,0,0,35.74,41.61c43.09,37.91,98.77,58.15,154.17,73.13,200.27,54.17,416.13,49.29,613.75-13.88,34.99-11.18,69.95-24.43,99.32-46.48,19.16-14.38,35.83-33.02,46.39-54.35a114.10574,114.10574,0,0,0,11.13-36.18005C1104.43917,610.17819,1072.9692,562.05819,1050.69918,514.5082Z" transform="translate(-26.84086 -49.49819)" fill="#6c63ff"/><g opacity="0.17"><path d="M890.75032,246.45145c9.64171-4.20394-9.91163-6.65119-32.09585-7.45582s-49.02061-.76011-63.19756-3.04875c-13.71114-2.21343-12.7009-6.14907-13.85427-9.71489s-6.42446-7.222-27.81928-8.0147c-26.6607-.98774-70.62581,2.81434-90.75171.53173-18.78121-2.13011-7.61723-8.81182-35.00344-9.06755-15.63837-.146-35.7849,2.05682-53.18577,2.58844-16.33647.49909-28.42216-.53441-36.90357-1.924s-14.38875-3.15126-23.93413-4.37864c-25.06068-3.2224-74.09133-2.13925-117.853,1.99071s-81.27344,10.89816-102.42889,17.60175-27.00029,13.30376-22.07239,18.90071c3.14674,3.574,11.19915,6.91585,30.73235,8.352,36.53555,2.68621,101.58387-1.9375,139.33713.50645,21.0415,1.36213,30.3764,4.73924,48.83812,6.58716,19.83407,1.98528,48.86935,2.09051,77.39656,2.04341,59.39721-.09807,120.3137-.70829,182.42994-1.82747,25.94486-.46745,53.13-1.0752,80.73761-3.30289s55.76623-6.52591,61.59076-10.5553" transform="translate(-26.84086 -49.49819)" fill="#fff"/></g><path d="M1099.25911,172.04818c-.46-1.18-.96-2.35-1.48-3.49.84.33,1.68006.69,2.51,1.08Z" transform="translate(-26.84086 -49.49819)" fill="#6c63ff"/><path d="M648.74482,314.5843c-7.66935-12.68445-16.75721-26.22767-30.98955-30.36953-16.482-4.7965-33.41319,4.73193-47.77473,14.13453a1392.15692,1392.15692,0,0,0-123.89338,91.28311l.04331.49239q46.22556-3.18781,92.451-6.37555c22.26532-1.53546,45.29557-3.2827,64.97195-13.8156,7.46652-3.99683,14.74475-9.33579,23.20555-9.70782,10.51175-.46217,19.67733,6.87923,26.8802,14.54931,42.60732,45.371,54.937,114.7541,102.73817,154.61592A1516.99458,1516.99458,0,0,0,648.74482,314.5843Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M910.64576,699.4127c-4.71168-5.94958-6.63691-7.343-11.28457-13.34761Q842.5968,612.64872,792.65327,534.27272q-33.92353-53.23005-64.48275-108.50439-14.54863-26.27808-28.29961-52.96872-10.67043-20.6952-20.8646-41.63793c-1.94357-3.98781-3.83209-7.99393-5.71122-12.00922-4.42788-9.44232-8.7734-18.93047-13.43942-28.24449-5.31687-10.61571-11.78905-21.74485-21.55259-28.877a29.4049,29.4049,0,0,0-15.31855-5.89457c-7.948-.51337-15.28185,2.76854-22.17569,6.35294-50.43858,26.301-97.65921,59.27589-140.36959,96.79771A730.77781,730.77781,0,0,0,346.39748,485.87843c-1.008,1.43927-3.39163.06418-2.37419-1.38422q6.00935-8.49818,12.25681-16.81288A734.81742,734.81742,0,0,1,543.87972,292.6956q18.24825-11.82579,37.18269-22.54245c6.36206-3.60275,12.75188-7.15967,19.25136-10.49653,6.37147-3.27274,13.13684-6.21547,20.41563-6.32547,24.77011-.385,37.5954,27.667,46.40506,46.54248q4.15283,8.9106,8.40636,17.76626,16.07481,33.62106,33.38729,66.628,10.68453,20.379,21.83683,40.51955,34.7071,62.71816,73.77854,122.897c34.5059,53.1429,68.73651,100.08874,108.04586,149.78473C913.67124,698.84433,911.73706,700.80615,910.64576,699.4127Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M457.9912,345.4352c-1.43911-1.60428-2.86926-3.20856-4.31777-4.81284-11.42244-12.63259-23.6788-25.11847-39.3644-32.36067a57.11021,57.11021,0,0,0-23.92678-5.54622c-8.56213.02753-16.93178,2.27348-24.84307,5.41792-3.74034,1.49428-7.39831,3.19021-11.00078,4.99614-4.11634,2.07182-8.15927,4.28118-12.1834,6.50883q-11.33112,6.27044-22.36816,13.0909-21.9606,13.5722-42.54565,29.21623-10.67111,8.11311-20.90175,16.75788-9.51557,8.03052-18.64618,16.492c-1.30168,1.20091-3.24526-.74255-1.94358-1.94347,1.60428-1.49428,3.22692-2.97938,4.84955-4.44612q6.87549-6.21547,13.9712-12.19258,12.93921-10.91827,26.54851-20.99312,21.16295-15.67614,43.78289-29.2254,11.3036-6.76547,22.91829-12.9626c2.33793-1.24674,4.70317-2.466,7.09571-3.6211a113.11435,113.11435,0,0,1,16.86778-6.86631,60.00626,60.00626,0,0,1,25.476-2.50266,66.32725,66.32725,0,0,1,23.50512,8.1314c15.40091,8.60812,27.34573,21.919,38.97005,34.90916C461.10844,344.80265,459.17382,346.75529,457.9912,345.4352Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M773.55166,476.34216l36.90462-13.498,18.32327-6.70182c5.96758-2.18267,11.92082-4.66747,18.08989-6.23037a28.53868,28.53868,0,0,1,16.37355.20862,37.73731,37.73731,0,0,1,12.771,7.91667,103.63871,103.63871,0,0,1,10.47488,11.18642c3.98932,4.79426,7.9197,9.63878,11.86772,14.46706q24.44135,29.89093,48.56306,60.04134,24.12118,30.14991,47.91981,60.556,23.85681,30.48042,47.38548,61.21573,2.8823,3.76519,5.75967,7.53415c1.0598,1.38809,3.44948.01962,2.37471-1.38807q-23.70225-31.04441-47.73491-61.83464-24.09177-30.86383-48.51646-61.46586-24.42423-30.60142-49.17854-60.93744-6.167-7.5576-12.35444-15.09858c-3.47954-4.24072-6.91984-8.52718-10.73629-12.47426-7.00538-7.24516-15.75772-13.64794-26.23437-13.82167-6.15972-.10214-12.121,1.85248-17.844,3.92288-6.16967,2.232-12.32455,4.50571-18.48632,6.7594L782.11123,470.2921l-9.29068,3.39811c-1.64874.603-.9365,3.26189.73111,2.65195Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M409.45248,324.15733c-18.75411-9.63866-42.77137-7.75087-60.00507,4.29119A855.84532,855.84532,0,0,1,446.818,351.17434C433.53537,343.3904,423.14521,331.19475,409.45248,324.15733Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M349.26282,328.41534,345.6524,331.35c1.22123-1.02713,2.4908-1.99013,3.795-2.90144C349.3858,328.43789,349.32442,328.426,349.26282,328.41534Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M874.62436,476.477c-3.63279-4.42206-7.56046-9.05222-12.99421-10.84836l-5.07308.20009a575.43629,575.43629,0,0,0,153.26729,175.22056Q942.22437,558.76317,874.62436,476.477Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M1086.66915,698.4482c-10.56006,21.33-27.23,39.97-46.39,54.35-29.37,22.05-64.33,35.3-99.32,46.48-197.62,63.17-413.48,68.05-613.75,13.88-55.4-14.98-111.08-35.22-154.17-73.13a197.34468,197.34468,0,0,1-35.74-41.61c57.35-31.52,126.86-43.4,193.19-41.95,95.09,2.08,187.96,27.46,282.16,40.59a1102.669,1102.669,0,0,0,334.04-4.6c38.31994-6.43,77.98-14.84,115.49-4.66A95.14954,95.14954,0,0,1,1086.66915,698.4482Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><circle cx="179.31828" cy="51" r="51" fill="#ccc"/><path d="M362.30892,97.84042C348.81185,83.6816,333.13643,70.765,314.57961,63.93948a76.71521,76.71521,0,0,0-15.98633-4.01734c-.04388-.006-.08545.00287-.12909-.00067a2.35576,2.35576,0,0,0-.26965-.05292,61.5388,61.5388,0,0,0-22.84131,1.379,63.10735,63.10735,0,0,0-10.63519,3.7049,93.00467,93.00467,0,0,0-9.97943,5.65557A64.90832,64.90832,0,0,1,232.6863,78.8348a74.1877,74.1877,0,0,1-11.84406,1.16248c-3.44714.06915-6.698.1889-9.964,1.43426a23.91573,23.91573,0,0,0-14.56494,15.77051,1.55078,1.55078,0,0,0,.68933,1.694c.88349.63275,1.74476,1.35065,2.673,1.91437a8.33922,8.33922,0,0,0,2.611.71209q2.21366.46711,4.43292.90693,8.17584,1.61992,16.41962,2.86792,16.681,2.5252,33.54217,3.55755a373.48132,373.48132,0,0,0,67.51026-2.029A374.77144,374.77144,0,0,0,361.647,100.3475,1.5139,1.5139,0,0,0,362.30892,97.84042Z" transform="translate(-26.84086 -49.49819)" fill="#f0f0f0"/><path d="M208.57961,131.93948a76.71521,76.71521,0,0,0-15.98633-4.01734c-.04388-.006-.08545.00287-.12909-.00067a2.35576,2.35576,0,0,0-.26965-.05292,61.5388,61.5388,0,0,0-22.84131,1.379,63.10735,63.10735,0,0,0-10.63519,3.7049,93.00467,93.00467,0,0,0-9.97943,5.65557,64.90832,64.90832,0,0,1-22.05231,8.22681,74.1877,74.1877,0,0,1-11.84406,1.16248c-3.44714.06915-6.698.1889-9.964,1.43426a23.91573,23.91573,0,0,0-14.56494,15.77051,1.55078,1.55078,0,0,0,.68933,1.694c.88349.63275,1.74476,1.35065,2.673,1.91437a8.33922,8.33922,0,0,0,2.611.71209q2.21366.46712,4.43292.90693,8.17584,1.61992,16.41962,2.86792,16.681,2.5252,33.54217,3.55755a373.48132,373.48132,0,0,0,67.51026-2.029A374.77144,374.77144,0,0,0,255.647,168.3475a1.5139,1.5139,0,0,0,.66193-2.50708C242.81185,151.6816,227.13643,138.765,208.57961,131.93948Z" transform="translate(-26.84086 -49.49819)" fill="#f0f0f0"/><polygon points="1047.411 588.142 1074.576 567.518 1087.816 580.759 1043.563 611.042 1047.411 588.142" fill="#2f2e41"/><path d="M1048.91635,694.42781H955.99269l3.25907-10.55987,0,0c20.1993-7.31227,8.85333-23.02957,28.06751-32.63666,46.9968-23.4984,65.19118-93.62006,58.30932-121.33935l30.798-1.30221S1118.95877,649.37476,1048.91635,694.42781Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M1128.24653,644.78888a15.61893,15.61893,0,0,1-20.18272.37759l-.0604-.04961-.00207-.07767a14.96483,14.96483,0,0,0-.6-3.81936,10.69077,10.69077,0,0,1-.38818,2.64366l-.07784.28991-.20873-.21549c-.18027-.18589-.35474-.37472-.51859-.561a15.75088,15.75088,0,0,1-2.399-3.63269,45.91623,45.91623,0,0,0-12.74-15.87972,22.29237,22.29237,0,0,1-2.6727-2.57172,22.03415,22.03415,0,0,1,27.66955-33.56911l.13767.0806-.07148.1425a11.47756,11.47756,0,0,1-2.04788,2.954,14.96829,14.96829,0,0,0,3.15395-2.27865l.10006-.09436.11337.07818a22.12793,22.12793,0,0,1,4.0294,3.5867l.12844.14726a9.83643,9.83643,0,0,0,7.28375,3.36123,15.614,15.614,0,0,1,15.11947,18.29291l-.01769.10315-.10034.0304a13.39866,13.39866,0,0,1-5.45694.68088,15.22208,15.22208,0,0,0,4.86061,1.2174l.21654.01718-.06874.20619a15.6035,15.6035,0,0,1-4.50339,6.79l-.05928.05187-.06294.05509a15.3329,15.3329,0,0,0-5.297,10.64272A15.73345,15.73345,0,0,1,1128.24653,644.78888Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M1131.089,639.76934a15.57418,15.57418,0,0,1-.1756,1.67894,15.78521,15.78521,0,0,0,2.53772-7.82047c.02071-.42637.06546-.8511.12549-1.27393A14.8141,14.8141,0,0,0,1131.089,639.76934Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1136.00331,620.789a15.19815,15.19815,0,0,0,3.88418,1.09822,15.63,15.63,0,0,0,1.42322-1.73647A13.24363,13.24363,0,0,1,1136.00331,620.789Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1141.72736,615.66082a15.70907,15.70907,0,0,1-.11112,4.05194,15.52908,15.52908,0,0,0,1.75758-3.62455l.06874-.2062-.21655-.01718A15.09472,15.09472,0,0,1,1141.72736,615.66082Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1140.28241,600.83967a15.65079,15.65079,0,0,0-11.46149-5.29958,9.83649,9.83649,0,0,1-7.28378-3.36124l-.12843-.14726a22.12785,22.12785,0,0,0-4.02939-3.58669l-.11338-.07817-.10005.09434a14.9676,14.9676,0,0,1-3.154,2.27865,11.47832,11.47832,0,0,0,2.04794-2.954l.07146-.1425-.13766-.08059a22.01777,22.01777,0,0,0-32.62113,14.2542,22.02182,22.02182,0,0,1,30.259-8.11268l.13765.08059-.07145.1425a11.47814,11.47814,0,0,1-2.04794,2.954,14.96754,14.96754,0,0,0,3.154-2.27865l.10006-.09434.11338.07817a22.12857,22.12857,0,0,1,4.02939,3.5867l.12843.14725a9.83643,9.83643,0,0,0,7.28377,3.36124,15.61675,15.61675,0,0,1,15.10347,12.83488,18.92714,18.92714,0,0,0,2.26005-.55l.10034-.03039.01776-.10314A15.554,15.554,0,0,0,1140.28241,600.83967Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1173.15913,536.54065a50.29141,50.29141,0,0,1-42.007,49.59965l-.2484.04053-.19219-.16016a48.18565,48.18565,0,0,0-10.51008-6.67159,34.42316,34.42316,0,0,1,5.5662,6.56047l.53537.80469-.96485.04641c-.8328.04053-1.66038.0608-2.45919.0608a50.71554,50.71554,0,0,1-13.88445-1.92513c-20.51748-5.83748-42.55022-6.83567-65.48571-2.96711a71.77856,71.77856,0,0,1-11.90147.993A70.94787,70.94787,0,0,1,1009.287,444.63723l.48765-.16146.19251.47589a36.95659,36.95659,0,0,1,2.787,11.23306,48.19635,48.19635,0,0,0,1.19789-12.47116l-.01536-.44255.43013-.10786a71.24939,71.24939,0,0,1,17.24051-2.1147l.62918.00262a31.67228,31.67228,0,0,0,23.616-10.46237,50.27568,50.27568,0,0,1,76.38016,2.34611l.2118.26213-.1399.30723c-2.93769,6.47484-6.13818,11.19189-9.95836,14.64143a49.01343,49.01343,0,0,0,13.27978-9.16282l.502-.487.35234.60466A50.24214,50.24214,0,0,1,1143.32,464.4278l-.00065.25363c-.00065.08956-.00065.17977-.00065.26932,0,13.61317,5.26419,26.51577,14.46689,35.43934A50.66021,50.66021,0,0,1,1173.15913,536.54065Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><g opacity="0.15"><path d="M1111.68868,417.71713a35.519,35.519,0,0,1-6.33509,7.77159,48.88929,48.88929,0,0,0,9.89823-6.1865Q1113.50228,418.44038,1111.68868,417.71713Z" transform="translate(-26.84086 -49.49819)"/><path d="M1140.79293,477.73323a50.48191,50.48191,0,0,1,7.22981,8.80775,51.39288,51.39288,0,0,1-4.70405-21.59022c0-.08957,0-.17978.00065-.26932l.00064-.25364a50.24245,50.24245,0,0,0-6.83956-25.32735l-.35235-.60468-.50207.487a49.12616,49.12616,0,0,1-9.17043,6.983A48.97185,48.97185,0,0,0,1140.79293,477.73323Z" transform="translate(-26.84086 -49.49819)"/><path d="M1126.32733,441.77093l-.00065.25364c-.00064.08954-.00064.17975-.00064.26931,0,.49355.00894.98585.02272,1.47739a52.3648,52.3648,0,0,0,5.95587-10.26709l.13985-.30725-.21176-.26212a50.68811,50.68811,0,0,0-9.096-8.79733A50.35621,50.35621,0,0,1,1126.32733,441.77093Z" transform="translate(-26.84086 -49.49819)"/><path d="M1157.78559,500.3901a45.45934,45.45934,0,0,1-6.40838-7.79666,50.2297,50.2297,0,0,1-37.21772,70.89l-.24841.04054-.19217-.16016a48.188,48.188,0,0,0-10.5101-6.67159,34.42262,34.42262,0,0,1,5.56617,6.56046l.5354.80471-.96482.0464c-.83286.04054-1.66041.0608-2.4592.0608a50.71549,50.71549,0,0,1-13.88448-1.92514c-20.51749-5.83747-42.55022-6.83566-65.4857-2.9671a71.7793,71.7793,0,0,1-11.90145.993,70.62389,70.62389,0,0,1-47.12-17.969,71.01118,71.01118,0,0,0,64.1127,40.6259,71.77947,71.77947,0,0,0,11.90145-.99294c22.93547-3.86857,44.96821-2.87037,65.4857,2.96709a50.71543,50.71543,0,0,0,13.88448,1.92514c.79878,0,1.62634-.02026,2.45919-.0608l.96483-.0464-.5354-.80471a34.42263,34.42263,0,0,0-5.56618-6.56045,48.18774,48.18774,0,0,1,10.51011,6.67159l.19217.16016.24841-.04055a50.25392,50.25392,0,0,0,26.63344-85.75019Z" transform="translate(-26.84086 -49.49819)"/></g><polygon points="134.035 560.973 97.223 533.025 79.28 550.968 139.25 592.007 134.035 560.973" fill="#2f2e41"/><path d="M195.21,687.42781h125.9266L316.72,673.11747l0,0c-27.37332-9.9093-11.99769-31.20879-38.036-44.228-63.68827-31.84414-88.3446-126.87035-79.01856-164.43447l-41.73625-1.76471S100.29113,626.37364,195.21,687.42781Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M80.55365,605.25219a20.7786,20.7786,0,0,0-7.17833-14.42261c-.0283-.02489-.05681-.05-.08529-.07465l-.08034-.0703a21.14539,21.14539,0,0,1-6.10283-9.20148l-.09315-.27942.29345-.02329a20.6283,20.6283,0,0,0,6.58691-1.64977,18.15726,18.15726,0,0,1-7.395-.9227l-.136-.0412-.024-.13979a21.15953,21.15953,0,0,1,20.48932-24.78985,13.32987,13.32987,0,0,0,9.87066-4.555l.17406-.19956a29.9868,29.9868,0,0,1,5.46049-4.86055l.15364-.106.13559.12786a20.2845,20.2845,0,0,0,4.27411,3.088,15.554,15.554,0,0,1-2.77519-4.00312l-.09688-.19312.18657-.10923A29.85984,29.85984,0,0,1,141.70818,588.318a30.209,30.209,0,0,1-3.62195,3.48511,62.224,62.224,0,0,0-17.26483,21.51959,21.34447,21.34447,0,0,1-3.251,4.92289c-.222.25244-.45848.50834-.70277.76026l-.28286.292-.10549-.39287a14.48742,14.48742,0,0,1-.526-3.58259,20.27961,20.27961,0,0,0-.813,5.17585l-.00281.10525-.08185.06724a21.15037,21.15037,0,0,1-34.50192-15.41853Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M83.85266,613.35673a21.10374,21.10374,0,0,0,.238,2.27524,21.39156,21.39156,0,0,1-3.439-10.598c-.02806-.57781-.08871-1.15339-.17006-1.72639A20.07562,20.07562,0,0,1,83.85266,613.35673Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M77.193,587.63524a20.59681,20.59681,0,0,1-5.2637,1.48826,21.18029,21.18029,0,0,1-1.92868-2.3532A17.94731,17.94731,0,0,0,77.193,587.63524Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M69.436,580.68579a21.28893,21.28893,0,0,0,.1506,5.491,21.04389,21.04389,0,0,1-2.3818-4.91186l-.09316-.27943.29346-.02329A20.4517,20.4517,0,0,0,69.436,580.68579Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M71.39415,560.60073a21.20931,21.20931,0,0,1,15.53218-7.18179,13.33,13.33,0,0,0,9.87069-4.555l.174-.19955a29.98717,29.98717,0,0,1,5.46048-4.86056l.15364-.10593.13559.12785a20.28377,20.28377,0,0,0,4.27415,3.08794,15.55474,15.55474,0,0,1-2.77529-4.00312l-.09683-.19312.18655-.10921A29.83764,29.83764,0,0,1,148.51627,561.925a29.84315,29.84315,0,0,0-41.00585-10.994l-.18655.10921.09683.19311a15.5548,15.5548,0,0,0,2.77529,4.00313,20.28412,20.28412,0,0,1-4.27415-3.08794l-.13559-.12786-.15364.10594a29.98711,29.98711,0,0,0-5.46048,4.86055l-.174.19956a13.33,13.33,0,0,1-9.87069,4.555A21.16316,21.16316,0,0,0,69.65975,579.135a25.64845,25.64845,0,0,1-3.06273-.74529l-.136-.04118-.02407-.13978A21.07824,21.07824,0,0,1,71.39415,560.60073Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M47.67454,424.47529c12.47114-12.09289,19.605-29.578,19.605-48.026,0-.12136,0-.24361-.00089-.365l-.00088-.34372a68.08611,68.08611,0,0,1,9.26876-34.32266l.47748-.81942.68034.66a66.42122,66.42122,0,0,0,17.99625,12.41711c-5.177-4.67469-9.51414-11.06706-13.4952-19.8415l-.18957-.41636.287-.35523a68.13168,68.13168,0,0,1,103.50749-3.17935,42.9211,42.9211,0,0,0,32.00348,14.1782l.85264-.00355a96.55467,96.55467,0,0,1,23.36369,2.86576l.58289.14617-.02081.59973a65.31307,65.31307,0,0,0,1.62334,16.90044,50.08227,50.08227,0,0,1,3.77686-15.22262l.26089-.64491.66085.21881a96.14585,96.14585,0,0,1-30.24771,187.39848A97.27192,97.27192,0,0,1,202.538,534.974c-31.0813-5.24253-60.93923-3.88982-88.74374,4.02092a68.72787,68.72787,0,0,1-18.81567,2.60886c-1.08252,0-2.204-.02747-3.33261-.08239l-1.30753-.0629L91.064,540.368a46.64968,46.64968,0,0,1,7.5431-8.8905,65.29981,65.29981,0,0,0-14.24286,9.0411l-.26045.217-.33662-.05492A68.10219,68.10219,0,0,1,47.67454,424.47529Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><g opacity="0.15"><path d="M110.14328,312.44a48.13438,48.13438,0,0,0,8.58508,10.53176,66.25283,66.25283,0,0,1-13.4137-8.38371Q107.68556,313.42016,110.14328,312.44Z" transform="translate(-26.84086 -49.49819)"/><path d="M70.70231,393.77157a68.411,68.411,0,0,0-9.79756,11.93592,69.64577,69.64577,0,0,0,6.37475-29.25825c0-.12137,0-.24362-.00088-.365l-.00087-.34372a68.08661,68.08661,0,0,1,9.26871-34.32266l.4775-.81944.68039.66a66.5738,66.5738,0,0,0,12.42741,9.46305C88.97194,367.31049,82.046,382.77189,70.70231,393.77157Z" transform="translate(-26.84086 -49.49819)"/><path d="M90.30555,345.03683l.00087.34372c.00088.12134.00088.24359.00088.365,0,.66884-.01212,1.336-.0308,2.0021A70.9624,70.9624,0,0,1,82.20534,333.834l-.18953-.41637.287-.35522a68.69044,68.69044,0,0,1,12.32659-11.92181A68.24086,68.24086,0,0,0,90.30555,345.03683Z" transform="translate(-26.84086 -49.49819)"/><path d="M47.67451,424.4753a61.60525,61.60525,0,0,0,8.6844-10.56575,68.06938,68.06938,0,0,0,50.436,96.06741l.33664.05494.26042-.217a65.30253,65.30253,0,0,1,14.24289-9.04108,46.64767,46.64767,0,0,0-7.54306,8.89047l-.72556,1.09052,1.3075.06287c1.12865.05494,2.25012.08239,3.33261.08239a68.72762,68.72762,0,0,0,18.81572-2.60886c27.80451-7.91072,57.66244-9.26344,88.74372-4.0209a97.27262,97.27262,0,0,0,16.12839,1.3456,95.7069,95.7069,0,0,0,63.8553-24.35094,96.23165,96.23165,0,0,1-86.88309,55.05467A97.27245,97.27245,0,0,1,202.538,534.974c-31.08129-5.24254-60.93922-3.88982-88.74373,4.0209a68.72763,68.72763,0,0,1-18.81572,2.60887c-1.08249,0-2.204-.02746-3.33261-.0824l-1.30749-.06287L91.064,540.368a46.64834,46.64834,0,0,1,7.54306-8.89047,65.30253,65.30253,0,0,0-14.24289,9.04108l-.26042.217-.33663-.05494A68.10219,68.10219,0,0,1,47.67451,424.4753Z" transform="translate(-26.84086 -49.49819)"/></g><circle cx="460.31828" cy="185" r="5" fill="#fff"/><circle cx="834.31828" cy="305" r="3" fill="#fff"/><circle cx="892.31828" cy="170" r="3" fill="#fff"/><circle cx="355.31828" cy="80" r="3" fill="#fff"/><circle cx="325.31828" cy="201" r="3" fill="#fff"/><circle cx="179.31828" cy="170" r="3" fill="#fff"/><circle cx="696.31828" cy="195" r="3" fill="#fff"/><circle cx="1003.31828" cy="98" r="3" fill="#fff"/><path d="M328.95929,413.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C339.30268,425.75443,332.75886,420.59829,328.95929,413.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M910.95929,612.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.795,4.95494l-.13433.50325C921.30268,624.75443,914.75886,619.59829,910.95929,612.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M591.95929,449.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.795,4.95494l-.13433.50325C602.30268,461.75443,595.75886,456.59829,591.95929,449.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M287.95929,565.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C298.30268,577.75443,291.75886,572.59829,287.95929,565.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M249.95929,651.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C260.30268,663.75443,253.75886,658.59829,249.95929,651.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><rect x="843.31828" y="68" width="11" height="589" fill="#3f3d56"/><rect x="813.31828" y="20" width="72" height="72" rx="35.99996" fill="#ff6582"/><path d="M418.64263,424.1385c0,11.47771,12.51572,21.67823,23.99344,21.67823s17.571-10.20052,17.571-21.67823a20.78224,20.78224,0,0,0-41.56448,0Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><polygon points="398.471 484.489 437.067 483.005 439.294 442.925 394.76 442.925 398.471 484.489" fill="#ffb8b8"/><path d="M400.81364,561.4928a6.18231,6.18231,0,0,0-.36494-9.4728l7.00739-20.82235-11.03775,2.917-4.96213,19.32605a6.21581,6.21581,0,0,0,9.35743,8.05215Z" transform="translate(-26.84086 -49.49819)" fill="#ffb6b6"/><circle cx="415.75835" cy="381.62478" r="14.69804" fill="#ffb8b8"/><path d="M442.96047,429.64379l-10.73253-.28426a1.504,1.504,0,0,1-1.28014-.78738l-3.58787-6.65514a1.49783,1.49783,0,0,1,.39563-1.89138L441.79818,409.047a1.49679,1.49679,0,0,1,1.25618-.28037l11.34184,2.58422a1.499,1.499,0,0,1,1.1066,1.04314l4.4413,15.29492a1.49935,1.49935,0,0,1-1.51389,1.916l-5.5602-.27779a1.50724,1.50724,0,0,1-1.34747-1.0276l-.23052-.69867a.17342.17342,0,0,0-.338.05439,1.49974,1.49974,0,0,1-1.57346,1.4977l-1.84088-.09194a1.4954,1.4954,0,0,1-1.396-1.205l-.79385-3.99256a.1732.1732,0,0,0-.34188.01359l-.51866,4.442a1.492,1.492,0,0,1-1.48734,1.32546Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M432.2515,449.58079l19.00323.25331,6.18481,7.85346,9.95684,2.3481,2.5878,14.95427c1.29375,7.47624-.07979,12.21089-3.88076,18.77751l0,0-.45522,12.91771.503.91426a2.09364,2.09364,0,0,1-.63119,2.72267h0a4.27726,4.27726,0,0,1,.11752,2.81491l-.24528.81046s-.70783,5.66261-40.83239-.29293a3.95632,3.95632,0,0,1-3.34345-3.3986h0a2.95406,2.95406,0,0,1-.547-3.4038l.08175-.16348-.412-.48529a3.177,3.177,0,0,1-.1608-3.90659h0l-5.76652-41.25217,11.91192-3.71Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M419.16862,464.99288l-4.75684-3.94828s-4.22952,1.25013-7.18334,9.58077-13.08957,71.52656-13.08957,71.52656l11.87557-5.93778,16.8392-46.43085Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M524.81946,532.274a6.18228,6.18228,0,0,1-7.09116-6.29147l-20.54147-7.79242,9.257-6.682,18.08733,8.42424a6.21581,6.21581,0,0,1,.28831,12.34162Z" transform="translate(-26.84086 -49.49819)" fill="#ffb6b6"/><path d="M461.88061,464.63253l3.22471-5.27425s4.40655-.18456,9.89528,6.74353c2.81373,3.55161,21.04874,34.01719,21.04874,34.01719l16.86311,14.05546-13.80628,4.93081-16.27169-6.90314-18.244-30.078Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><polygon points="435.555 666.81 444.739 666.81 449.108 631.385 435.553 631.386 435.555 666.81" fill="#ffb6b6"/><polygon points="355.157 661.099 364.044 663.415 377.208 630.238 364.091 626.819 355.157 661.099" fill="#ffb6b6"/><path d="M460.11787,711.77763l14.51826-.86655v6.22026l13.80293,9.53279a3.88541,3.88541,0,0,1-2.20782,7.08274H468.9467l-2.97925-6.15279-1.16325,6.15279h-6.517Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M380.13111,705.42858l14.2674,2.8235-1.569,6.01913,10.95211,12.70615a3.88541,3.88541,0,0,1-3.923,6.29683L383.133,728.91441l-1.331-6.70531-2.67759,5.66043-6.30624-1.64381Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M383.1248,688.31931l26.92081-55.33021,2.11353-65.49091C406.33233,556.677,423.491,532.805,423.491,532.805v-9.24491l41.91852,7.90812v0a201.21489,201.21489,0,0,1,12.26151,73.06026L475.982,694.04734h.52987a3.31527,3.31527,0,1,1,0,6.63053H459.9355a3.31527,3.31527,0,1,1,0-6.63053h.4274L448.4631,580.16351l-13.83654,56.19881L401.189,688.1066a3.3069,3.3069,0,0,1-.26524,6.60379H384.34739a3.31182,3.31182,0,0,1-1.22259-6.39108Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M382.75841,426.29647c6.19395-6.05935,10.09279-14.02773,15.22255-21.01108,5.1296-6.98327,12.35472-13.3824,21.01083-13.77026a13.03786,13.03786,0,0,1,8.16579,2.129,8.30541,8.30541,0,0,1,3.60455,7.36741c.9138-2.56674,4.99718-3.1453,6.588-.93331,1.59062,2.21191-.25722,5.89893-2.98115,5.94838l-.2671-1.05666a18.24877,18.24877,0,0,1-11.80141,7.83613,2.9783,2.9783,0,0,1-3.35526-3.85425C409.59087,410.80666,412.56052,428.25234,407,436s-21.45259,6.99551-30.82907,8.7353c-9.05466,1.68-17.85857-3.34756-25.69931-8.178A38.2715,38.2715,0,0,0,382.75841,426.29647Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M732.68989,636.90373,704.47275,624.455V613.75265l10.0561-.05651a7.46918,7.46918,0,0,0,7.044-5.10714l7.06437-21.19305a7.46924,7.46924,0,0,0-7.086-9.83122H704.47275v-9.959H725.913a7.46925,7.46925,0,0,0,7.27937-5.79584l4.865-21.16286a7.46923,7.46923,0,0,0-7.27937-9.14265H704.47275v-2.48975a4.97949,4.97949,0,0,0-9.959,0v2.48975H518.1566v-2.48975a4.9795,4.9795,0,0,0-9.959,0v2.48975H487.2868a7.46923,7.46923,0,0,0-7.27937,9.14265l4.865,21.16286a7.46925,7.46925,0,0,0,7.27937,5.79584H508.1976v9.959H496.51328a7.46923,7.46923,0,0,0-7.10927,9.76l7.21041,22.37711a7.46925,7.46925,0,0,0,7.15123,5.17837l4.432-.0249V624.455l-22.82269,12.44874a7.46922,7.46922,0,0,0-7.46924,7.46922v0a7.46925,7.46925,0,0,0,7.46924,7.46925H508.1976v54.77446a4.9795,4.9795,0,0,0,9.959,0V651.84222H694.51376v54.77446a4.97949,4.97949,0,0,0,9.959,0V651.84222h28.21714a7.46925,7.46925,0,0,0,7.46925-7.46925v0A7.46922,7.46922,0,0,0,732.68989,636.90373Zm-214.53329-69.298H694.51376v9.959H518.1566Zm0,56.84925v-9.65563l176.35716-.99076V624.455Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/></svg>',$je='<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="855.93958" height="630.06608" viewBox="0 0 855.93958 630.06608" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M935.43234,472.55767c-3.73,43.08-22.51,84.71-49.3,119.14q-1.68,2.16-3.4,4.28-3.87,4.77-7.94,9.36-4.98,5.655-10.25,11.05005-4.29,4.43994-8.78,8.68994-3.465,3.315-7.01,6.5c-28.43,25.69-61.09,46.89-94.74,65.43005-65.67,36.17-137.65,63.56995-212.52,67.56-74.86,3.98-153.01-17.46-207.91-68.52-73.99-68.81-94.63995-183.58-64.6-280.05,19.98-64.18,60.76-122.24,116.26-160.16,55.02-37.59,124.43-54.51,190.12-43.44995,52.44-31.87006,121.09-32.48,178.1-8.89,30.42,12.59,57.72,31.31,81.67,53.93a339.34337,339.34337,0,0,1,30.72,33.23q1.455,1.785,2.88,3.6,5.97,7.545,11.55,15.4,8.01,11.265,15.21,23.03c1.32,2.16,2.63,4.33,3.91,6.52.86,1.47,1.73,2.95,2.58,4.44a.29776.29776,0,0,1,.04.1c13.31,23.41,24.19,48.39,29.86005,74.5,1,4.62,1.84,9.26,2.49,13.94v.01q.855,5.955,1.29,11.97A176.97711,176.97711,0,0,1,935.43234,472.55767Z" transform="translate(-172.03021 -134.96696)" fill="#3f3d56"/><path d="M740.07386,537.68412,591.61233,414.00627,735.84027,542.638a3.44161,3.44161,0,1,0,4.23359-4.95386Z" transform="translate(-172.03021 -134.96696)" fill="#f0f0f0" opacity="0.3"/><circle cx="227.58212" cy="250.78071" r="89" fill="#f2f2f2"/><path d="M478.61233,379.74767a80.99369,80.99369,0,0,1-81,81,81.57161,81.57161,0,0,1-27.8-4.9,81.05489,81.05489,0,1,1,108.8-76.1Z" transform="translate(-172.03021 -134.96696)" fill="#fff"/><circle cx="211.58212" cy="217.78071" r="25" fill="#e4e4e4"/><path d="M475.45236,357.27764a25.00115,25.00115,0,0,1-27.6-41.08A81.05279,81.05279,0,0,1,475.45236,357.27764Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><circle cx="252.58212" cy="271.78071" r="9" fill="#e4e4e4"/><path d="M387.61233,457.74767a9.04581,9.04581,0,0,1-.31,2.34,79.52774,79.52774,0,0,1-17.49-4.24,9.00157,9.00157,0,0,1,17.8,1.9Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><path d="M334.61233,375.74767a18.002,18.002,0,0,1-16.8,17.96,81.54773,81.54773,0,0,1,1.76-35.71A18.00026,18.00026,0,0,1,334.61233,375.74767Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><circle cx="606.45653" cy="208.48305" r="3.70234" fill="#6c63ff"/><circle cx="572.30231" cy="119.94851" r="2.16307" fill="#f0f0f0"/><circle cx="225.30231" cy="543.94851" r="2.16307" fill="#f0f0f0"/><circle cx="584.58144" cy="331.59402" r="2.16307" fill="#f0f0f0"/><circle cx="305.45653" cy="350.48305" r="3.70234" fill="#6c63ff"/><circle cx="171.45653" cy="416.48305" r="17.48305" fill="#6c63ff"/><circle cx="267.30231" cy="435.94851" r="2.16307" fill="#f0f0f0"/><circle cx="487.30231" cy="97.94851" r="2.16307" fill="#f0f0f0"/><circle cx="358.30231" cy="558.94851" r="2.16307" fill="#f0f0f0"/><circle cx="326.30231" cy="117.94851" r="2.16307" fill="#f0f0f0"/><circle cx="382.30231" cy="222.94851" r="2.16307" fill="#f0f0f0"/><circle cx="296.58144" cy="480.59402" r="2.16307" fill="#f0f0f0"/><circle cx="549.58144" cy="494.59402" r="2.16307" fill="#f0f0f0"/><circle cx="437.58144" cy="368.59402" r="2.16307" fill="#f0f0f0"/><circle cx="494.58144" cy="222.59402" r="2.16307" fill="#f0f0f0"/><circle cx="598.21204" cy="292.65473" r="4.28889" fill="#ff6584"/><circle cx="424.21204" cy="150.65473" r="4.28889" fill="#ff6584"/><circle cx="424.21204" cy="445.65473" r="4.28889" fill="#ff6584"/><path d="M863.45236,605.33764a7.694,7.694,0,0,0-7.39,5.58,7.3896,7.3896,0,0,0-.3,2.12v12.04q4.485-4.24494,8.78-8.68994,5.265-5.40006,10.25-11.05005Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><path d="M890.68118,667.89806q-19.36816,0-42.45654-1.46386c-79.61377-5.05567-182.7378-22.63282-290.376-49.49219-107.6377-26.85938-206.93018-59.79395-279.58545-92.73438-35.39258-16.04687-62.55615-31.23632-80.73535-45.14746-19.24707-14.72705-27.666-27.564-25.02393-38.15283,5.148-20.62891,50.731-25.14209,88.064-25.29541l.01269,3c-51.26806.21045-81.51367,8.38672-85.16552,23.022-4.65186,18.64014,33.28662,47.74073,104.08691,79.84131,72.49561,32.86817,171.60547,65.73926,279.07324,92.55664,107.46729,26.81641,210.40137,44.36328,289.83985,49.40821,77.57861,4.92773,124.74316-2.9375,129.39453-21.57813,3.86181-15.47656-21.59815-38.27539-71.68946-64.19824l1.37891-2.66406c36.397,18.83593,78.64551,45.85156,73.22168,67.58886-2.64258,10.58887-16.10547,17.96485-40.01514,21.92285C927.0762,666.7672,910.33548,667.89806,890.68118,667.89806Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><circle cx="714.58212" cy="208.78071" r="100.5" fill="#fff"/><path d="M886.61233,241.74767a102,102,0,1,0,102,102A101.635,101.635,0,0,0,886.61233,241.74767Zm0,201a99,99,0,1,1,99-99A98.61767,98.61767,0,0,1,886.61233,442.74767Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M798.417,367.81847a2.00078,2.00078,0,0,1-1.957-1.59765,97.66924,97.66924,0,0,1,22.34082-83.13526,2,2,0,0,1,2.98633,2.66114A93.59682,93.59682,0,0,0,800.378,365.41515a2.00228,2.00228,0,0,1-1.96094,2.40332Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><circle cx="714.51924" cy="238.27373" r="63.87702" fill="#6c63ff"/><path d="M866.24805,397.35666c-4.14062-.115-9.29385-.25869-13.26384-3.15874a10.18618,10.18618,0,0,1-4.00806-7.60607,6.85213,6.85213,0,0,1,2.33007-5.62763c2.07352-1.75216,5.10139-2.16313,8.36441-1.2042l-3.38076-24.7061,2.48174-.34,3.97444,29.04518-2.07245-.951c-2.4027-1.10205-5.70088-1.66285-7.7504.06911a4.40263,4.40263,0,0,0-1.44375,3.62659,7.69887,7.69887,0,0,0,2.98246,5.67107c3.08949,2.25668,7.19708,2.54779,11.85585,2.678Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><rect x="658.49493" y="222.21767" width="13.49133" height="2.50498" fill="#2f2e41"/><rect x="701.07961" y="222.21765" width="13.49133" height="2.50498" fill="#2f2e41"/><path d="M889.23233,452.90765h-57.9a8.14716,8.14716,0,0,0-8.13995,8.14v128.33a47.66955,47.66955,0,0,0,25.56,42.19995q3.555-3.18,7.01-6.5,4.485-4.24494,8.78-8.68994,5.265-5.40006,10.25-11.05005,4.08006-4.59,7.94-9.36,1.725-2.115,3.4-4.28c26.79-34.43,45.57-76.06,49.3-119.14A64.04854,64.04854,0,0,0,889.23233,452.90765Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M891.34231,479.68767a14.61136,14.61136,0,0,0-10.43-4.17,14.465,14.465,0,0,0-9.16,3.36005,13.12263,13.12263,0,0,0-1.17,1.07l-47.38995,48.6-34.37,35.25a6.80061,6.80061,0,0,0-1.28,1.8,7.29573,7.29573,0,0,0-.77,3.32,7.16751,7.16751,0,0,0,2.18006,5.07l1.35,1.32,9.8,9.55.01-.01a7.29073,7.29073,0,0,0,4.66,1.63,7.167,7.167,0,0,0,5.07-2.18l1.59-1.62,11.38-11.67.38-.39,68.41-70.16a14.69128,14.69128,0,0,0-.26-20.77Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><path d="M890.86152,343.44c2.1124-4.46658-.05349-9.23761-3.76378-12.09072-4.67557-3.59539-10.7221-3.00085-16.04008-1.29905-5.82238,1.8632-11.51366,5.21608-17.80383,5.02337a11.13058,11.13058,0,0,1-10.24407-7.27764c-3.3687-8.639.43561-18.29488,6.29971-24.84681a34.26766,34.26766,0,0,1,26.544-11.586,34.64989,34.64989,0,0,1,28.068,16.9026,1.54079,1.54079,0,0,0,2.05229.53813,36.88225,36.88225,0,0,1,28.39377-.71432,36.28984,36.28984,0,0,1,22.58042,34.49188c-.05,1.93122,2.95005,1.9301,3,0a39.89155,39.89155,0,0,0-10.59928-27.81249,38.71871,38.71871,0,0,0-27.56681-12.16772,39.33641,39.33641,0,0,0-17.32226,3.61223l2.05229.53813a37.69886,37.69886,0,0,0-25.0988-17.728,36.48542,36.48542,0,0,0-29.42384,7.32772c-7.70165,6.02707-13.53849,15.38016-13.17519,25.41071.15721,4.34047,1.44713,8.796,4.4606,12.03051,3.85981,4.14287,9.62229,4.85944,14.94631,3.798,7.07554-1.41071,13.53533-6.06449,20.91133-5.92113a10.21164,10.21164,0,0,1,7.6417,3.4453c1.62455,1.83335,2.6042,4.47042,1.49716,6.81122-.82094,1.73585,1.76463,3.26026,2.59041,1.51416Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M412.09426,704.32287c-35.59912.001-68.69433-1.22071-98.32226-3.68555-38.72656-3.22266-69.41455-8.40332-91.21045-15.39648-23.07666-7.40528-35.31934-16.667-36.38818-27.52832-2.083-21.15821,39.334-40.72461,74.44531-53.41309l1.01953,2.82227c-48.2168,17.42382-73.957,35.28613-72.47949,50.29785,1.88183,19.11914,47.39209,33.78125,124.86181,40.22754,79.3252,6.60058,183.71729,4.26172,293.94727-6.58985,110.23-10.84863,213.07568-28.90625,289.59131-50.8457,74.72607-21.42578,116.50488-44.67969,114.623-63.79883-1.5625-15.874-33.20264-28.793-89.0918-36.3789l.40332-2.97266c40.60986,5.51172,89.47949,16.76172,91.67383,39.05762,1.06933,10.86132-9.1333,22.332-30.32276,34.09375-20.01465,11.10937-49.10351,22.17285-86.45849,32.88281-76.68506,21.98828-179.71973,40.08105-290.12451,50.94824C539.00247,700.86,472.01663,704.32287,412.09426,704.32287Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><circle cx="838.45653" cy="434.48305" r="17.48305" fill="#6c63ff"/><circle cx="331.45653" cy="17.48305" r="17.48305" fill="#e6e6e6"/><circle cx="19.45653" cy="433.48305" r="17.48305" fill="#e6e6e6"/><circle cx="127.45653" cy="108.48305" r="10.70234" fill="#ff6584"/><circle cx="77.45653" cy="514.48305" r="10.70234" fill="#ff6584"/><circle cx="807.45653" cy="339.48305" r="10.70234" fill="#ff6584"/><circle cx="645.45653" cy="598.48305" r="17.48305" fill="#e6e6e6"/></svg>',P4=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let a=0;a<n.length;a++)o[a]=n.charCodeAt(a);return new Blob([r],{type:t})},Px=async e=>{const{vault:t}=Ze.getState().app,n=await t.adapter.readBinary(e),r=new Uint8Array(n),o=new Blob([r],{type:"image/png"});return new Promise(a=>{const i=new FileReader;i.onloadend=()=>{const s=i.result;a(s)},i.readAsDataURL(o)})},Kje=async e=>{const t=e.find(".thino-user-icon");if(!(t&&!/(http|app|base64)/.test(t?.style?.backgroundImage))&&t&&t?.style?.backgroundImage){const n=await mp(t);t.style.backgroundImage=`url("${n}")`}},Jje=async e=>{const t=e.findAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await ya(n.getAttribute("path")||A.normalizePath(n?.parentElement.getAttribute("src")));n.src=r}else{const r=await MX(n);n.src=r}},Xje=async(e,t)=>{const{app:n,settings:r}=Ze.getState();let o,a;if(t&&t!=="default"&&(t.startsWith("http")?o=await ya(t):t.startsWith("data:")?o=t:await n.vault.adapter.exists(t)&&/\.(png|svg|jpg|jpeg)/g.test(t)&&(o=await Px(t))),!o){const i=document.body.hasClass("theme-light"),s=i?e==="modern"?r?.DefaultLightBackgroundImage:r?.DefaultLightBackgroundImageForClean:e==="modern"?r?.DefaultDarkBackgroundImage:r?.DefaultDarkBackgroundImageForClean,l=await n.vault.adapter.exists(s)&&/\.(png|svg|jpg|jpeg)/g.test(s),u=s?.startsWith("http");switch(e){case"clean":l||u?(a=s,o=u?await ya(s):await Px(a)):o=i?ob:xk;break;case"minimal":break;case"modern":default:l||u?(a=s,o=u?await ya(s):await Px(a)):o="data:image/svg+xml;base64,"+btoa(i?qje:$je);break}}switch(e){case"modern":{const i=document.querySelector(".dialog-wrapper .memo-background .property-image");i&&o&&(i.style.backgroundImage="url('"+o+"')");break}case"clean":{const i=document.querySelector(".dialog-wrapper .memo-container.clean .memo-background .property-image");i&&o&&(i.style.backgroundImage="url('"+o+"')");break}case"minimal":break;default:{const i=document.querySelector(".dialog-wrapper .memo-background .property-image");i&&o&&(i.style.backgroundImage="url('"+o+"')")}}return o},Qje=e=>{const t=new Date,n=[];for(let r=11;r>=0;r--){const o=new Date(t);o.setDate(o.getDate()-r);const a=o.toISOString().split("T")[0],i=e.filter(s=>new Date(s.createdAt).toISOString().split("T")[0]===a).length;n.push({date:a,count:i})}return n},e4e=({data:e})=>g.jsx("div",{className:"heatmap-grid",children:e.map((t,n)=>{const r=t.count,o=r<=0?"stat-day-L0-bg":r<=1?"stat-day-L1-bg":r<=2?"stat-day-L2-bg":r<=4?"stat-day-L3-bg":"stat-day-L4-bg";return g.jsx("div",{className:`heatmap-cell ${o}`,title:`${t.date}: ${t.count} memos`,children:r>0&&g.jsx("span",{className:"heatmap-count",children:r})},n)})}),t4e=({memo:e,currentStyle:t,iconString:n,footerStart:r,footerEnd:o,app:a,view:i,propsMemo:s,settings:l,onImageGenerated:u,onImageClick:f,selectedFont:h,customBackground:p,leftContentType:m,customRightContent:w,fontSize:b})=>{const[y,S]=D.useState(!1),[x,E]=D.useState(""),C=D.useRef(null),M=D.useRef(null),k=async()=>{C.current&&(await Kje(C.current),await Jje(C.current),Xje(t,p).then(R=>{setTimeout(()=>{l0(C.current,{pixelRatio:window.devicePixelRatio*2}).then(B=>{E(B),S(!0),u(B)}).catch(()=>{})},600)}))};D.useEffect(()=>{if(!M.current||!i)return;M.current.hasChildNodes()&&M.current.empty();async function R(){M.current?.toggleClass(["markdown-rendered"],!0),await A.MarkdownRenderer.render(a,s.content+`
`,M.current,s.path,i)}R()},[C,M,e,i,s,a]),D.useEffect(()=>{y&&(S(!1),E(""),setTimeout(async()=>{await k()},wI))},[t,h,p,m,w,b]),D.useEffect(()=>{y||setTimeout(async()=>{await k()},wI)},[]);const{memos:O}=Se.getState().memoState,F=Qje(O);return g.jsxs("div",{className:qt("memo-container",t),ref:C,style:{fontFamily:h!=="default"?h:void 0},children:[g.jsx(js,{when:x!=="",children:g.jsx("img",{className:"memo-shortcut-img",onClick:f,src:x})}),g.jsxs("div",{className:"memo-background",children:[g.jsx("div",{className:"property-image",style:{backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}}),g.jsx("span",{className:"background-container"}),g.jsxs("div",{className:"thino-user-header",children:[g.jsx("div",{className:"thino-user-icon",ref:R=>{if(l?.MomentsIcon){R?.empty();return}l?.MomentsIcon||R&&A.setIcon(R,"Memos")},style:{backgroundImage:`url("${n}")`}}),g.jsxs("div",{className:"thino-user-info",children:[g.jsx("div",{className:"thino-user-name",children:l?.UserName}),l?.MomentsQuote&&g.jsx("div",{className:"thino-user-quote",children:l?.MomentsQuote})]})]}),g.jsx("div",{ref:M,className:"memo-content-text",style:{minHeight:l.MinHeightForShare||"200px",fontSize:`${b}px`}}),g.jsx("div",{className:"thino-time-footer",children:e.createdAt}),g.jsxs("div",{className:"watermark-container",children:[g.jsx("span",{className:"normal-text footer-start",children:m==="heatmap"?g.jsx("div",{className:"footer-heatmap",children:g.jsx(e4e,{data:F})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"property-social-icons"}),g.jsx("span",{className:"name-text",children:r})]})}),g.jsx("span",{className:"normal-text footer-end",children:g.jsx("span",{className:"name-text",children:w||"THINO"})})]})]})]})},n4e=e=>{const{memo:t,destroy:n}=e,{memos:r}=Se.getState().memoState,{view:o,app:a,settings:i,verifyState:s}=Se.getState().dailyNotesState,l={...t,createdAtStr:je.getDateTimeString(t.createdAt)},[u,f]=D.useState(!1),h=D.useRef(null),p=D.useRef(null),m=D.useRef(null),[w,b]=D.useState(e.style||(a||window.app).loadLocalStorage("memoShareDialogStyle")||"clean"),[y,S]=D.useState(""),[x,E]=D.useState((a||window.app).loadLocalStorage("memoShareDialogFont")||"default"),[C,M]=D.useState((a||window.app).loadLocalStorage("memoShareDialogBackground")||"default"),k=D.useRef(null),[O,F]=D.useState((a||window.app).loadLocalStorage("memoShareDialogLeftContent")||"default"),[R,B]=D.useState((a||window.app).loadLocalStorage("memoShareDialogRightContent")||""),[Y,H]=D.useState(parseInt((a||window.app).loadLocalStorage("memoShareDialogFontSize")||"14")),[Z,W]=_.useState(i?.MomentsIcon),$=[{value:"default",label:I("Default font")},{value:"serif",label:"Serif"},{value:"sans-serif",label:"Sans Serif"},{value:"monospace",label:"Monospace"},{value:"Georgia",label:"Georgia"},{value:"Times New Roman",label:"Times New Roman"},{value:"Arial",label:"Arial"},{value:"Helvetica",label:"Helvetica"},{value:"Courier New",label:"Courier New"}],V=[{value:"default",label:I("Default background")},{value:"custom",label:I("Select local image")},{value:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNmZmNkYjIiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmI3YjciLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgZmlsbD0idXJsKCNhKSIvPjwvc3ZnPg==",label:I("Orange gradient")},{value:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImIiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNhZGJlZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhM2E4ZjUiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgZmlsbD0idXJsKCNiKSIvPjwvc3ZnPg==",label:I("Blue gradient")},{value:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImMiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNjZGZiZjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNhM2Y0YzQiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgZmlsbD0idXJsKCNjKSIvPjwvc3ZnPg==",label:I("Green gradient")},{value:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNmZGNmZGYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmYmNmZTgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgZmlsbD0idXJsKCNkKSIvPjwvc3ZnPg==",label:I("Pink gradient")}];D.useEffect(()=>{if(!i?.MomentsIcon||!a)return;const Ie=a.vault.adapter.getResourcePath(A.normalizePath(i.MomentsIcon));Ie&&!i?.MomentsIcon.startsWith("http")?W(Ie):W(i?.MomentsIcon)},[i?.MomentsIcon,a]);let ne,Q;r.length&&(ne=r.length>0?r[r.length-1]:null,ne?Q=r?Math.ceil((Date.now()-je.getTimeStampByDate(ne?.createdAt))/1e3/3600/24)+1:0:Q=0);const te=i?.ShareFooterEnd.replace("{UserName}",i?.UserName),G=i?.ShareFooterStart.replace("{ThinoNum}",r.length.toString()).replace("{UsedDay}",Q.toString());D.useEffect(()=>{!h.current||!p.current||(A.setIcon(h.current,"copy"),A.setIcon(p.current,"x"))},[h,p]),D.useEffect(()=>{m.current&&A.setIcon(m.current,"file-down")},[m]),D.useEffect(()=>{A.setIcon(h.current,u?"loader":"copy"),h.current.disabled=u,h.current.toggleClass("copying",u)},[u]);const X=()=>{n()},ee=D.useCallback(Ie=>{f(Ie)},[u]),ie=async()=>{const{vault:Ie}=Se.getState().dailyNotesState.app,ce=document.querySelector(".memo-shortcut-img");if(!ce)return;const Pe=ce?.getAttribute("src").split("base64,")[1],Oe=P4(Pe,"image/png");let Ve;Oe.arrayBuffer().then(async tt=>{const ot="png",st=Xs();for(const wt in st)if(st[wt]instanceof A.TFile){Ve=st[wt];break}if(Ve!==void 0){const wt=await Ie.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,ot,Ve);await Ie.createBinary(wt,tt),new A.Notice(I("Save image successfully"))}})},fe=async()=>{ee(!0);const Ie=document.querySelector(".memo-shortcut-img");if(!Ie)return;const ce=Ie?.getAttribute("src").split("base64,")[1],Pe=P4(ce,"image/png");if(!Pe){new A.Notice(I("Copy to clipboard failed"));return}const Oe=new ClipboardItem({"image/png":Pe});window.navigator.clipboard.write([Oe]).then(()=>{setTimeout(()=>{ee(!1)},500)}),new A.Notice(I("Copy to clipboard successfully"))},he=Ie=>{S(Ie)},we=async Ie=>{Ie!==w&&(S(""),b(Ie),(a||window.app).saveLocalStorage("memoShareDialogStyle",Ie))},Ne=Ie=>{E(Ie),(a||window.app).saveLocalStorage("memoShareDialogFont",Ie)},Ae=Ie=>{if(Ie==="custom"){We();return}M(Ie),(a||window.app).saveLocalStorage("memoShareDialogBackground",Ie)},Te=Ie=>{F(Ie),(a||window.app).saveLocalStorage("memoShareDialogLeftContent",Ie)},Fe=Ie=>{H(Ie),(a||window.app).saveLocalStorage("memoShareDialogFontSize",Ie.toString())},We=()=>{k.current?.click()},ke=Ie=>{const ce=Ie.target.files?.[0];if(ce&&ce.type.startsWith("image/")){if(ce.size>5*1024*1024){new A.Notice(I("Image file cannot exceed 5MB"));return}const Pe=new FileReader;Pe.onload=Oe=>{const Ve=Oe.target?.result;M(Ve),(a||window.app).saveLocalStorage("memoShareDialogBackground",Ve)},Pe.onerror=()=>{new A.Notice(I("Image read failed, please try again"))},Pe.readAsDataURL(ce)}else ce&&new A.Notice(I("Please select a valid image file"));Ie.target.value=""};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:qt("dialog-header-container"),children:[g.jsxs("p",{className:"title-text",children:[g.jsx("span",{className:"icon-text",children:"🥰"}),I("Share Memo Image")]}),g.jsxs("div",{className:"btn-group",children:[A.Platform.isMobile&&g.jsx("button",{ref:m,className:"btn download-btn",onClick:ie}),g.jsx("button",{ref:h,className:"btn copy-btn",onClick:fe}),g.jsx("button",{ref:p,className:"btn close-btn",onClick:X})]})]}),g.jsxs("div",{className:qt("dialog-content-container",w,A.Platform.isDesktop?"split-layout":""),children:[g.jsxs("div",{className:"config-container",children:[g.jsx("div",{className:`tip-words-container ${y?"finish":"loading"}`,children:g.jsx("p",{className:"tip-text",children:I(y?"↗Click the button to save":"Image is generating...")})}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Default sharing style")}),g.jsx("div",{className:"setting-item-description",children:I("Set the default style for sharing thino, 'Modern' by default.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",value:w,onChange:async Ie=>{await we(Ie.currentTarget.value)},children:[g.jsx("option",{value:"modern",children:I("Modern")}),g.jsx("option",{value:"clean",children:I("Clean")}),g.jsx("option",{value:"minimal",children:I("Minimal")}),g.jsx("option",{value:"gradient",children:I("Gradient")})]})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Font")}),g.jsx("div",{className:"setting-item-description",children:I("Select the font for the memo content")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("select",{className:"dropdown",value:x,onChange:Ie=>Ne(Ie.currentTarget.value),children:$.map(Ie=>g.jsx("option",{value:Ie.value,children:Ie.label},Ie.value))})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Background")}),g.jsx("div",{className:"setting-item-description",children:I("Select the background for the memo image")})]}),g.jsxs("div",{className:"setting-item-control",children:[g.jsx("select",{className:"dropdown",value:C.startsWith("data:image")&&!C.includes("svg")?"custom":C,onChange:Ie=>Ae(Ie.currentTarget.value),children:V.map(Ie=>g.jsx("option",{value:Ie.value,children:Ie.label},Ie.value))}),C.startsWith("data:image")&&!C.includes("svg")&&g.jsxs("div",{style:{marginTop:"4px",display:"flex",alignItems:"center",gap:"8px"},children:[g.jsx("span",{style:{fontSize:"12px",color:"var(--text-muted)"},children:"已选择自定义图片"}),g.jsx("button",{onClick:()=>Ae("default"),style:{fontSize:"10px",padding:"2px 6px",border:"1px solid var(--background-modifier-border)",borderRadius:"3px",background:"var(--background-primary)",color:"var(--text-muted)",cursor:"pointer"},children:"清除"})]})]})]}),g.jsx("input",{ref:k,type:"file",accept:"image/*",style:{display:"none"},onChange:ke}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Font size")}),g.jsx("div",{className:"setting-item-description",children:I("Adjust the font size")})]}),g.jsxs("div",{className:"setting-item-control",children:[g.jsx("input",{type:"range",min:"10",max:"24",step:"1",value:Y,onChange:Ie=>Fe(parseInt(Ie.target.value)),style:{width:"120px"}}),g.jsxs("span",{style:{marginLeft:"8px",fontSize:"12px"},children:[Y,"px"]})]})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Left bottom content")}),g.jsx("div",{className:"setting-item-description",children:I("Select the content type for the left bottom area")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",value:O,onChange:Ie=>Te(Ie.currentTarget.value),children:[g.jsx("option",{value:"default",children:I("Default text")}),g.jsx("option",{value:"heatmap",children:I("Activity heatmap")})]})})]})]}),g.jsx(t4e,{memo:l,currentStyle:w,iconString:Z,footerStart:G,footerEnd:te,app:a,view:o||e.view,propsMemo:t,settings:i,onImageGenerated:he,onImageClick:fe,selectedFont:x,customBackground:C,leftContentType:O,customRightContent:R,fontSize:Y})]})]})};function Yc(e,t,n){e0({className:"share-memo-image-dialog no-twp"},n4e,{memo:e,style:t,view:n})}function Ql(e=!0){const[t,n]=D.useState({isLoading:e,isFailed:!1,isSucceed:!1,isPending:!1});return{...t,setLoading:()=>{n({...t,isLoading:!0,isFailed:!1,isPending:!1,isSucceed:!1})},setFinish:()=>{n({...t,isLoading:!1,isFailed:!1,isPending:!1,isSucceed:!0})},setError:()=>{n({...t,isLoading:!1,isFailed:!0,isPending:!1,isSucceed:!1})},setPending:()=>{n({...t,isLoading:!1,isFailed:!1,isPending:!0,isSucceed:!1})}}}const r4e=e=>{const{dailyNotesState:{app:t,settings:n,view:r}}=D.useContext(it),{memo:o,handleUnarchivedMemoAction:a}=e,i=_.useRef(null),s=_.useRef(null),[l,u]=_.useState(""),f={...o,createdAtStr:je.getDateTimeString(o.createdAt),deletedAtStr:je.getDateTimeString(o.deletedAt||o.createdAt)},h=D.useRef(null);D.useEffect(()=>{!s||!h.current||A.setIcon(h.current,"more-horizontal")},[s]),D.useEffect(()=>{if(!i.current||!s.current||i.current.hasChildNodes()&&o.content===l||!r)return;u(o.content),i.current.hasChildNodes()&&i.current.empty();async function y(){i.current?.toggleClass(["markdown-rendered"],!0),await A.MarkdownRenderer.render(t,o.content+`
`,i.current,o.path,r),i.current?.querySelectorAll(".internal-link")?.forEach(x=>{const E=x,C=E.getAttribute("data-href");if(!C)return;t.metadataCache.getFirstLinkpathDest(C,o.path)||x.classList.add("is-unresolved"),E.addEventListener("mouseover",k=>{k.stopPropagation(),t.workspace.trigger("hover-link",{event:k,source:"thino",hoverParent:r.containerEl,targetEl:E,linktext:C,sourcePath:E.href})})})}y()},[o.content,s]);const p=async()=>{switch(f.sourceType){case"DAILY":await lC(f.id,f.path);break;case"CANVAS":await uC(f.id,f.path);break;case"MULTI":await sC(f.path);break;case"FILE":await cC(f.id,f.path);break}},m=async()=>{try{if(n.DeleteThinoDirectly)await le.deleteMemoById(f.id);else{const y=await le.hideMemoById(f.id);y&&le.editMemo(y)}}catch(y){new A.Notice(y.message)}},w=async()=>{try{const y=await le.unarchiveMemo(f);y&&le.editMemo(y),a(f.id),new A.Notice(I("RESTORE SUCCEED"))}catch(y){new A.Notice(y.message)}},b=y=>{y.stopPropagation();const S=new A.Menu;S.addItem(x=>{x.setTitle(I("RESTORE")).setIcon("archive-restore").onClick(w)}),S.addItem(x=>{x.setTitle(I("SOURCE")).setIcon("home").onClick(p)}),S.addItem(x=>{x.setTitle(I("DELETE")).setIcon("trash").setWarning(!0).onClick(()=>{const E=new A.Menu;E.addItem(C=>{C.setTitle(I("CONFIRM!")).setIcon("trash").setWarning(!0).onClick(m)}),E.addItem(C=>{C.setTitle(I("Cancel")).setIcon("x").onClick(()=>{})}),E.showAtMouseEvent(y.nativeEvent)})}),S.showAtMouseEvent(y.nativeEvent)};return g.jsxs("div",{ref:s,className:`memo-wrapper ${"memos-"+f.id}`,children:[g.jsxs("div",{className:"memo-top-wrapper",children:[g.jsxs("span",{className:"time-text",children:[I("ARCHIVED AT")," ",f.updatedAt]}),g.jsx("div",{className:"btns-container",children:g.jsx("span",{ref:h,className:"btn more-action-btn",onClick:b})})]}),g.jsx("div",{ref:i,className:"memo-content-text"})]})},Fs=({title:e,showSidebar:t=!1,onShowSidebarClick:n,showHomeButton:r=!0,children:o,rightContent:a})=>{const i=D.useCallback(()=>{n?n():Ge.setShowSiderbarInMobileView(!0)},[n]),s=D.useCallback(()=>{Ye.clearQuery(),Ye.setPathname("/")},[]);return g.jsxs("div",{className:"section-header-container",children:[g.jsx("div",{className:"title-wrapper",children:g.jsx("div",{className:"title-btns-left-wrapper",children:g.jsxs("div",{className:"title-text",children:[t&&g.jsx(js,{when:!0,children:g.jsx("button",{ref:l=>{l&&A.setIcon(l,"menu")},className:"btn action-btn clickable-icon",onClick:i})}),e&&g.jsx("span",{className:"normal-text",children:e}),r&&g.jsxs("button",{className:"go-home-btn",onClick:s,children:["🏠 ",I("Return To Home Page")]}),o]})})}),a&&g.jsx("div",{className:"title-btns-right-wrapper",children:a})]})},Cs=e=>{const t=new Map;for(const n of e){const r=n.path;t.has(r)||t.set(r,[]),t.get(r)?.push(n)}return Array.from(t).map(([n,r])=>({path:n,thinos:r}))},o4e=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n},dailyNotesState:{plugin:r}}=D.useContext(it),o=Ql(),[a,i]=D.useState([]),s=_.useRef(null),l=_.useRef(null);D.useEffect(()=>{l.current&&A.setIcon(l.current,"more-horizontal")},[l]),D.useEffect(()=>{_l({memos:n,query:e,filterOptions:{filterDoneTasks:!1,onlyFilterType:"archived"},plugin:r}).then(w=>{i(w)}),o.setFinish()},[n,s.current,e]);const u=D.useCallback(w=>{i(b=>b.filter(y=>y.id!==w))},[]),f=D.useCallback(w=>{i(b=>b.filter(y=>y.id!==w))},[]);D.useCallback(()=>{Ge.setShowSiderbarInMobileView(!0)},[]);const h=async()=>{if(!(a?.length>0))return;if(!await Bi()){It();return}const w=[...a];try{const b=w.filter(E=>E.sourceType==="DAILY"),y=w.filter(E=>E.sourceType!=="DAILY"),S=await le.unarchiveThinoBulk(y);for(const E of S)E&&le.editMemo(E);const x=Cs(b);for(const{path:E,thinos:C}of x)await le.dealWithDailyThinoBulk(E,C,"restoreFromArchive");new A.Notice(I("RESTORE SUCCEED")),Ye.clearQuery()}catch(b){console.error("error",b),new A.Notice(b.message)}},p=async()=>{if(!(a?.length>0))return;if(!await Bi()){It();return}const w=[...a],b=Ze.getState().settings.DeleteThinoDirectly;try{const y=w.filter(E=>E.sourceType==="DAILY"),S=w.filter(E=>E.sourceType!=="DAILY");for(const E of S)if(b)await le.deleteMemoById(E.id);else{const C=await le.hideMemoById(E.id);C&&le.editMemo(C)}const x=Cs(y);for(const{path:E,thinos:C}of x)await le.dealWithDailyThinoBulk(E,C,b?"deleteForever":"delete");Ye.clearQuery()}catch(y){console.error("error",y),new A.Notice(y.message)}},m=w=>{const b=new A.Menu;b.addItem(y=>{y.setTitle(I("Bulk restore")).setIcon("archive").onClick(async()=>{new Ka(app,I("RESTORE"),async S=>{S==="confirm"&&await h()}).open()})}).addItem(y=>{y.setTitle(I("Bulk delete")).setIcon("trash").onClick(async()=>{new Ka(app,I("DELETE"),async S=>{S==="confirm"&&await p()}).open()})}),b.showAtMouseEvent(w.nativeEvent)};return g.jsxs("div",{className:"memo-trash-wrapper",ref:s,children:[g.jsx(Fs,{showSidebar:t,rightContent:g.jsx("div",{className:"header-right-section",children:g.jsx(ig,{})}),children:g.jsx("span",{ref:l,className:"menu-popup-btn",onClick:m})}),g.jsx(Hg,{thinosCount:a.length,thinos:a}),o.isLoading?g.jsx("div",{className:"tip-text-container",children:g.jsx("p",{className:"tip-text",children:I("Fetching data...")})}):a.length===0?g.jsx("div",{className:"tip-text-container",children:g.jsx("p",{className:"tip-text",children:I("Here is No Memos.")})}):g.jsx("div",{className:"deleted-memos-container",children:a.map(w=>g.jsx(r4e,{memo:w,handleUnarchivedMemoAction:f,handleDeletedMemoAction:u},`${w.id}-${w.updatedAt}`))})]})},a4e=async e=>{const t=e.querySelectorAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await ya(n.getAttribute("path")||A.normalizePath(n?.parentElement?.getAttribute("src")||""));n.src=r}else{const r=await ya(n.src);n.src=r}},Bi=async()=>{const{verifyState:e}=Ze.getState(),t=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),n=A.Platform.isDesktop?await pn():t.identifier||t.uuid;return e&&e?.appId===n},i4e=async(e,t)=>{if(!(t!=="chat"&&t!=="moments")){if(t==="moments"){const n=e.querySelectorAll(".thino-moment-icon"),r=e.find(".moments-view-user-icon"),o=e.find(".moments-view-background");for(const a of n){const i=await mp(a);a.style.backgroundImage=`url(${i})`}if(r){const a=await mp(r);r.style.backgroundImage=`url(${a})`}if(o){const a=await mp(o);o.style.backgroundImage=`url(${a})`}}else if(t==="chat"){const n=e.querySelectorAll(".icon-img");for(const r of n){const o=await mp(r);r.style.backgroundImage=`url(${o})`}}}};class Ka extends A.Modal{constructor(t,n,r){super(t),this.title=n,this.cb=r}onOpen(){super.onOpen(),this.containerEl.toggleClass("thino-bulk-action-dialog",!0),this.titleEl.setText(this.title+" "+I("Confirm?")),this.contentEl.createEl("button",{cls:"mod-warning",text:I("Confirm?").replace(/\?|?/,"")}).onclick=()=>{this.cb("confirm"),this.close()},this.contentEl.createEl("button",{text:I("Cancel")}).onclick=()=>{this.cb("cancel"),this.close()}}onClose(){super.onClose()}}class s4e extends A.Modal{constructor(t,n){super(t),this.thinos=n}root;onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=Sa.createRoot(this.contentEl),this.root.render(g.jsx(Ea,{store:Se,context:it,children:g.jsx(EX,{app:this.app,closeDialog:this.close.bind(this),thinos:this.thinos})}))}onClose(){super.onClose(),this.root?.unmount()}}const Hg=({thinosCount:e,thinos:t})=>{const{globalState:{memoListView:n},locationState:{query:r,pathname:o},dailyNotesState:{settings:a,app:i}}=D.useContext(it),{tag:s,duration:l,type:u,text:f,filter:h,path:p}=r,m=St.getQueryById(h),w=!!(s||l&&l.from<l.to||u||f||m||p),b=D.useRef(null);D.useEffect(()=>{b&&A.setIcon(b.current,"more-horizontal")},[b]);const y=async()=>{if(!(t?.length>0))return;const R=gX(t),B=yX(R);await je.copyTextToClipboard(B),new A.Notice(I("Copied to clipboard Successfully"))},S=async()=>{if(!(t?.length>0))return;if(!await Bi()){It();return}const R=[...t],B=a.DeleteThinoDirectly;try{const Y=R.filter(W=>W.sourceType==="DAILY"),H=R.filter(W=>W.sourceType!=="DAILY");for(const W of H)if(B)await le.deleteMemoById(W.id);else{const $=await le.hideMemoById(W.id);$&&le.editMemo($)}const Z=Cs(Y);for(const{path:W,thinos:$}of Z)await le.dealWithDailyThinoBulk(W,$,B?"deleteForever":"delete");le.updateTagsState(),Ye.clearQuery()}catch(Y){console.error("error",Y),new A.Notice(Y.message)}},x=async()=>{if(!(t?.length>0))return;if(!await Bi()){It();return}const R=[...t],B=Ze.getState().settings.startSync,H=Ze.getState().app?.loadLocalStorage("tokenForSync");try{const Z=R.filter(V=>V.sourceType==="DAILY"),W=R.filter(V=>V.sourceType!=="DAILY");for(const V of W)await le.deleteMemoById(V.id);const $=Cs(Z);for(const{path:V,thinos:ne}of $){const Q=await le.dealWithDailyThinoBulk(V,ne,"deleteForever");if(!(!H||!B))for(const te of Q)te&&te.webId&&await iC(te.webId)}le.updateTagsState(),Ye.clearQuery(),new A.Notice(I("DELETE SUCCEED"))}catch(Z){console.error("error",Z),new A.Notice(Z.message)}},E=async()=>{if(!(t?.length>0))return;if(!await Bi()){It();return}const R=[...t];try{const B=R.filter(W=>W.sourceType==="DAILY"),Y=R.filter(W=>W.sourceType!=="DAILY"),H=await le.unarchiveThinoBulk(Y);for(const W of H)W&&le.editMemo(W);const Z=Cs(B);for(const{path:W,thinos:$}of Z)await le.dealWithDailyThinoBulk(W,$,"restoreFromArchive");new A.Notice(I("RESTORE SUCCEED")),le.updateTagsState(),Ye.clearQuery()}catch(B){console.error("error",B),new A.Notice(B.message)}},C=async()=>{if(!(t?.length>0))return;if(!await Bi()){It();return}const R=[...t],B=Ze.getState().settings.startSync,H=Ze.getState().app?.loadLocalStorage("tokenForSync");try{const Z=R.filter(V=>V.sourceType==="DAILY"),W=R.filter(V=>V.sourceType!=="DAILY");for(const V of W){const ne=await le.restoreMemoById(V.id);ne&&ne.webId&&H&&B&&await Vp(ne.webId),ne&&le.editMemo(ne)}const $=Cs(Z);for(const{path:V,thinos:ne}of $){const Q=await le.dealWithDailyThinoBulk(V,ne,"restoreFromDelete");for(const te of Q)te&&te.webId&&H&&B&&await Vp(te.webId),te&&le.editMemo(te)}le.updateTagsState(),Ye.clearQuery(),new A.Notice(I("RESTORE SUCCEED"))}catch(Z){new A.Notice(Z.message)}},M=async()=>{if(!(t?.length>0))return;if(!await Bi()){It();return}const R=[...t];try{const B=R.filter(W=>W.sourceType==="DAILY"),Y=R.filter(W=>W.sourceType!=="DAILY"),H=await le.archiveThinoBulk(Y);for(const W of H)W&&le.editMemo(W);const Z=Cs(B);for(const{path:W,thinos:$}of Z)await le.dealWithDailyThinoBulk(W,$,"archive");le.updateTagsState(),Ye.clearQuery()}catch(B){console.error("error",B),new A.Notice(B.message)}},k=async()=>{if(t?.length>0){if(!await Bi()){It();return}new s4e(i,t).open()}},O=async R=>{document.body.toggleClass("thino-share-page",!0),setTimeout(async()=>{if(new A.Notice(I("Image is generating...")),!R){new A.Notice(I("No content to generate."));return}await i4e(R,n),await a4e(R);let B;document.body.hasClass("theme-dark")?B="#232323":B="#eaeaea",l0(R,{backgroundColor:B,pixelRatio:window.devicePixelRatio*2}).then(Y=>{if(a?.AutoSaveWhenOnMobile&&A.Platform.isMobile){const H=Y.split("base64,")[1];Xw(H,"image/png").arrayBuffer().then(async W=>{let $;const V="png",ne=Xs();for(const Q in ne)if(ne[Q]instanceof A.TFile){$=ne[Q];break}$!==void 0&&await i.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,V,$),W)})}document.body.toggleClass("thino-share-page",!1),Wd({imgUrl:Y}),new A.Notice(I("Image generated successfully.")),R.hasClass("share-image")?R.toggleClass("share-image",!1):R.closest(".share-image").toggleClass("share-image",!1)}).catch(Y=>{document.body.toggleClass("thino-share-page",!1),console.error(Y)})},0)},F=R=>{const B=new A.Menu;switch(B.addItem(Y=>{Y.setTitle(I("Clear filter")).setIcon("x").onClick(async()=>{Ye.clearQuery()})}),B.addSeparator(),B.addItem(Y=>{Y.setTitle(I("Copy filtered thinos")).setIcon("copy").onClick(async()=>{await y()})}),B.addItem(Y=>{Y.setTitle(I("Share filtered thinos as image")).setIcon("image").onClick(async()=>{const H=document.querySelector(".memolist-container");H.toggleClass("share-image",!0);try{if(n==="calendar"){if(H.find(".rbc-agenda-table")){const Z=H.find(".rbc-agenda-table");await O(Z)}if(H.find(".rbc-month-view")){const Z=H.find(".rbc-month-view");await O(Z)}}else if(n==="table"){if(H.find(".thino-table")){const Z=H.find(".thino-table");await O(Z)}}else await O(H)}catch(Z){console.error(Z),new A.Notice(I("Failed to generate image.")),H.toggleClass("share-image",!1)}})}),B.addItem(Y=>{Y.setTitle(I("Merge thinos in to thino share image")).setIcon("image").onClick(async()=>{let H="";t.forEach((W,$)=>{H+=`> [!thino] ${W.createdAt}
${W.content.split(`
`).map(V=>V.trim()?`> ${V}
`:`>
`)}
`+($===t.length-1?`
`:`
------
`)});const Z={createdAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),updatedAt:A.moment().format("YYYY/MM/DD HH:mm:ss"),content:H.replace(/(^|\n),>/g,`
>`),id:"temp-"+Math.random().toString(36).substr(2,9),thinoType:"JOURNAL",sourceType:"DAILY",rowStatus:"NORMAL",visibility:"PRIVATE",pinned:!1,creatorName:"thino",deletedAt:"",path:"",resourceList:[]};Yc(Z,"clean")})}),B.addSeparator(),o){case"/":B.addItem(Y=>{Y.setTitle(I("Bulk tag operation")).setIcon("hash").onClick(async()=>{await k()})}).addItem(Y=>{Y.setTitle(I("Bulk archive")).setIcon("archive").onClick(async()=>{new Ka(i,I("ARCHIVE"),async H=>{H==="confirm"&&await M()}).open()})}).addItem(Y=>{Y.setTitle(I("Bulk delete")).setIcon("trash").onClick(async()=>{new Ka(i,I("DELETE"),async H=>{H==="confirm"&&await S()}).open()})});break;case"/archive":B.addItem(Y=>{Y.setTitle(I("Bulk restore")).setIcon("archive").onClick(async()=>{new Ka(i,I("RESTORE"),async H=>{H==="confirm"&&await E()}).open()})}).addItem(Y=>{Y.setTitle(I("Bulk delete")).setIcon("trash").onClick(async()=>{new Ka(i,I("DELETE"),async H=>{H==="confirm"&&await S()}).open()})});break;case"/recycle":B.addItem(Y=>{Y.setTitle(I("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new Ka(i,I("RESTORE"),async H=>{H==="confirm"&&await C()}).open()})}).addItem(Y=>{Y.setTitle(I("Bulk delete")).setIcon("trash").onClick(async()=>{new Ka(i,I("DELETE"),async H=>{H==="confirm"&&await x()}).open()})});break}B.showAtMouseEvent(R.nativeEvent)};return g.jsxs("div",{className:`filter-query-container ${w?"":"thino-hidden"}`,children:[g.jsxs("div",{className:"filter-query",children:[g.jsx("span",{className:"tip-text",children:I("FILTER")}),g.jsxs("div",{"data-filter-type":"query",className:"filter-item-container "+(m?"":"thino-hidden"),onClick:()=>{Ye.setMemoFilter("")},children:[g.jsx("span",{className:"icon-text",children:"🔖"})," ",m?.title]}),g.jsxs("div",{"data-filter-type":"tag",className:"filter-item-container "+(s?"":"thino-hidden"),onClick:()=>{Ye.setTagQuery("")},children:[g.jsx("span",{className:"icon-text",children:"🏷️"})," ",s]}),g.jsxs("div",{"data-filter-type":"type",className:"filter-item-container "+(u?"":"thino-hidden"),onClick:()=>{Ye.setMemoTypeQuery("")},children:[g.jsx("span",{className:"icon-text",children:"📦"})," ",oK(u)]}),l&&l.from<l.to&&g.jsxs("div",{"data-filter-type":"date",className:"filter-item-container",children:[g.jsxs("div",{className:"day-picker-component-group",children:[g.jsx("span",{className:"icon-text",children:"🗓️"})," ",g.jsx(bb,{type:"text",startOrEnd:"start",defaultValue:A.moment(l.from,"x").valueOf(),handleValueChange:R=>{const B=A.moment(l.to,"x"),Y=A.moment(R,"x"),H=Y.isAfter(B)||Y.isSame(B);Ye.setFromAndToQuery(H?B.startOf("day").valueOf():A.moment(R,"x").startOf("day").valueOf(),l.to)}}),g.jsx("span",{children:I("to")}),g.jsx(bb,{type:"text",startOrEnd:"end",defaultValue:A.moment(l.to,"x").add(1,"days").valueOf(),handleValueChange:R=>{const B=A.moment(l.from,"x"),Y=A.moment(R,"x"),H=Y.isBefore(B)||Y.isSame(B),Z=A.moment(R,"x").endOf("day").valueOf();Ye.setFromAndToQuery(l.from,H?B.endOf("day").valueOf():Z)}})]}),g.jsx("div",{ref:R=>R&&A.setIcon(R,"x"),className:"btn close-btn",onClick:()=>{Ye.setFromAndToQuery(0,0)}})]}),g.jsxs("div",{className:"filter-item-container "+(f?"":"thino-hidden"),onClick:()=>{Ye.setTextQuery("")},children:[g.jsx("span",{className:"icon-text",children:"🔍"})," ",f]}),g.jsxs("div",{className:"filter-item-container "+(p?"":"thino-hidden"),onClick:()=>{Ye.setPathQuery("")},children:[g.jsx("span",{className:"icon-text",children:"📦"})," ",g.jsx("span",{className:"path-text",children:p})]})]}),g.jsxs("div",{className:"thino-filter-items",children:[e&&g.jsx("div",{className:"thinos-count",children:`${e?`${e} Thinos `:""}`}),g.jsx("div",{ref:b,className:"btn memo-action-menu",onClick:F})]})]})},zc=async e=>{const{app:t,settings:n}=Ze.getState();if(!n.startSync||!t?.loadLocalStorage("tokenForSync"))return;const r=await gZ(e);if(!r||r.length===0)return;r.sort((i,s)=>A.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(A.moment(s.createdAt,"YYYY/MM/DD HH:mm:ss"))?1:-1);const o=r.filter(i=>!i.deleted),a=r.filter(i=>i.deleted);for(let i=0;i<o.length;i++){const s=o[i],l=await le.createOrPatchThinoFromWeb(s);l&&le.pushMemo(l)}for(let i=0;i<a.length;i++){const s=a[i],l=le.getMemoByWebId(s.id);l&&await le.deleteMemoById(l.id,"local")}le.updateTagsState(),u4e(t)};function l4e(){const{settings:e,app:t,view:n}=Ze.getState(),{globalState:{loaded:r,memoListView:o}}=D.useContext(it),a=A.Platform.isMobile&&e.DefaultEditorLocation==="Bottom",i=_.useRef(null),[s,l]=_.useState([]),[u,f]=_.useState((window.app||t).loadLocalStorage("thinoListView")||"list"),[h,p]=D.useState(()=>Bje(t||window.app)),m=b=>{p(b)};D.useEffect(()=>{o===u||!o||(f(o),t&&t?.saveLocalStorage("thinoListView",o))},[o]),D.useEffect(()=>{if(e.SyncManually||!t||!r||!n||!t?.loadLocalStorage("tokenForSync")||!e.startSync)return;i.current=window.setInterval(async()=>{const S=Ik(t);await zc(S)},3e4),n.registerInterval(i.current);const y=Ik(t);return zc(y),()=>{i.current&&window.clearInterval(i.current)}},[n,t,r,e.startSync]);const w=[g.jsx(Hg,{thinosCount:s.length,thinos:s},"filter"),g.jsx(Yje,{listView:u,sortConfig:h,updateThinos:b=>{l(b)}},"list")];return g.jsx(g.Fragment,{children:o==="chat"?g.jsx(g.Fragment,{children:[g.jsx(ab,{syncThino:zc,onSortChange:m,currentSort:h},"header"),...w.reverse(),g.jsx(Kc,{className:"mod-editor-bottom",editorType:"inline"},"editor")]}):g.jsx(g.Fragment,{children:a?[g.jsx(ab,{syncThino:zc,onSortChange:m,currentSort:h},"header"),...w,g.jsx(Kc,{className:"mod-editor-bottom",editorType:"block"},"editor")]:[g.jsx(ab,{syncThino:zc,onSortChange:m,currentSort:h},"header"),g.jsx(Kc,{editorType:"block"},"editor"),...w]})})}function c4e(e){try{e?.saveLocalStorage&&e?.saveLocalStorage("thinoLastUpdated",A.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x"))}catch(t){console.error(t)}}function Ik(e){try{const t=e?.loadLocalStorage&&e?.loadLocalStorage("thinoLastUpdated");return t||A.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")}catch(t){return console.error(t),A.moment().format("x")}}function u4e(e){try{e?.saveLocalStorage&&e?.saveLocalStorage("thinoLastUpdated",A.moment().format("x"))}catch(t){console.error(t)}}const d4e={text:I("SELECT")},f4e=e=>{const{className:t,dataSource:n,handleValueChanged:r,value:o}=e,[a,i]=Nf(!1),s=D.useRef(null);let l=d4e;for(const h of n)if(h.value===o){l=h;break}D.useEffect(()=>{if(a){const h=p=>{s.current?.contains(p.target)||i(!1)};window.addEventListener("click",h,{capture:!0,once:!0})}},[a]);const u=h=>{r&&r(h.value),i(!1)},f=h=>{h.stopPropagation(),i()};return g.jsxs("div",{className:`selector-wrapper ${t||""}`,ref:s,children:[g.jsxs("div",{className:`current-value-container ${a?"active":""}`,onClick:f,children:[g.jsx("span",{className:"value-text",children:l.text}),g.jsx("span",{ref:h=>{h&&A.setIcon(h,"chevron-right")},className:"btn arrow-text"})]}),g.jsx("div",{className:`items-wrapper ${a?"":"thino-hidden"}`,children:n.map(h=>g.jsx("div",{className:`item-container ${h.value===o?"selected":""}`,onClick:()=>{u(h)},children:h.text},h.value))})]})},Pc=D.memo(f4e),gD=e=>{const{destroy:t,queryId:n,type:r="dialog"}=e,[o,a]=D.useState(""),[i,s]=D.useState(r!=="dialog"?[ZN()]:[]),l=Ql(!1),[u,f]=D.useState(!1),[h,p]=Nf(!1),m=D.useMemo(()=>le.getState().memos.filter(k=>k.deletedAt!==""&&k.deletedAt||k.rowStatus==="ARCHIVED"?!1:aK(k,i)).length,[i]);D.useEffect(()=>{w()},[n]);const w=()=>{const k=St.getQueryById(n??"");if(k){a(k.title);const O=JSON.parse(k.querystring);return Array.isArray(O)&&s(O),k}},b=k=>{const O=k.target.value;a(O)},y=async()=>{if(!o)return new A.Notice(I("TITLE CANNOT BE NULL!")),null;if(i.length===0)return new A.Notice(I("FILTER CANNOT BE NULL!")),null;if(i.length===1&&i[i.length-1].value.value==="")return new A.Notice(I("Please finish the last filter setting first")),null;let k;const O=St.getQueryById(n||"");try{n&&!n.startsWith("Filter [Temp] ")&&O.title===o?(k=await St.updateQuery(n,o,JSON.stringify(i)),St.editQuery(k),await St.getMyAllQueries()):(k=await St.createQuery(o,JSON.stringify(i)),St.pushQuery(k),await St.getMyAllQueries())}catch(F){new A.Notice(F.message)}return k},S=async()=>{switch(r){case"modal":case"inline":if(i.length===0){new A.Notice(I("FILTER CANNOT BE NULL!"));return}if(i.length===1&&i[i.length-1].value.value===""){new A.Notice(I("Please finish the last filter setting first"));return}try{const k=St.getQueryById(n??"");if(k&&JSON.stringify(i)===k.querystring){Ye.setMemoFilter(k.id),t();return}const O=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));St.pushQuery(O),Ye.setMemoFilter(O.id)}catch(k){new A.Notice(k.message)}t();break;case"dialog":try{if(!await y())return}catch(k){console.error(k),new A.Notice(k.message)}t();break}},x=()=>{if(i.length===0){new A.Notice(I("FILTER CANNOT BE NULL!"));return}if(u){Ye.setMemoFilter(""),f(!1);return}const k=St.getQueryById(n??"");if(k&&JSON.stringify(i)===k.querystring){Ye.setMemoFilter(k.id);return}const O=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));St.pushQuery(O),Ye.setMemoFilter(O.id),e.setPreview&&e.setPreview(O.id),f(!0)},E=()=>{if(i.length>0&&i[i.length-1].value.value===""){new A.Notice(I("Please finish the last filter setting first"));return}s([...i,ZN()])},C=D.useCallback((k,O)=>{s(F=>{const R=[...F];return R[k]=O,R})},[]),M=D.useCallback(k=>{s(O=>O.filter((R,B)=>B!==k))},[]);return g.jsxs(g.Fragment,{children:[r==="dialog"&&g.jsxs("div",{className:"dialog-header-container",children:[g.jsxs("span",{className:"title-text",children:[g.jsx("span",{className:"icon-text",children:"🔖"}),I(n?"EDIT QUERY":"CREATE QUERY")]}),g.jsx("button",{ref:k=>{k&&A.setIcon(k,"x")},className:"btn close-btn",onClick:t})]}),g.jsxs("div",{className:"dialog-content-container",children:[(r==="dialog"||h)&&g.jsxs("div",{className:"form-item-container input-form-container",children:[g.jsx("span",{className:"normal-text",children:I("TITLE")}),g.jsx("input",{className:"title-input",type:"text",value:o,onChange:b})]}),g.jsxs("div",{className:"form-item-container filter-form-container",children:[g.jsx("span",{className:"normal-text",children:I("FILTER")}),g.jsxs("div",{className:"filters-wrapper",children:[i.map((k,O)=>g.jsx(p4e,{index:O,filter:k,handleFilterChange:C,handleFilterRemove:M},O)),g.jsx("div",{className:"create-filter-btn",onClick:E,children:I("ADD FILTER TERMS")})]})]})]}),g.jsx("div",{className:"dialog-footer-container",children:g.jsxs("div",{className:"btns-container",children:[(r==="inline"||r==="modal")&&g.jsx("button",{className:`btn ${h?"mod-cta":"save-btn"}`,onClick:async()=>{if(!h)p();else{const k=await y();p(!1),t(),k&&Ye.setMemoFilter(k.id)}},children:I(h?"Set and save":"Save")}),g.jsxs("div",{className:"btns-group-container",children:[g.jsxs("span",{className:`tip-text ${i.length===0&&"thino-hidden"}`,children:[I("MATCH")," Thino ",g.jsx("strong",{children:m})," ",I("TIMES")]}),g.jsx(g.Fragment,{children:r==="inline"&&g.jsx("button",{className:"btn mod-cta",onClick:x,children:I("Preview")})}),g.jsx("button",{className:`btn save-btn ${l.isLoading?"requesting":""}`,onClick:S,children:I(r==="inline"||r==="modal"?"Filter":n?"EDIT":"Save")})]})]})})]})},h4e=e=>{const{index:t,filter:n,handleFilterChange:r,handleFilterRemove:o}=e,{type:a}=n,i=D.useRef(null),s=D.useRef(null),l=D.useRef(n),u=D.useRef(a);D.useEffect(()=>{l.current=e.filter},[n]),D.useEffect(()=>{if(i.current)return a!=="TAG"&&s.current&&(s.current.destroy(),s.current=null,i.current.detach()),a==="TAG"&&!s.current&&(u.current=a,s.current=new Zp(i.current,m)),()=>{s.current&&(s.current.destroy(),s.current=null)}},[i,a]);const f=D.useCallback(y=>{["AND","OR"].includes(y)&&r(t,{...n,relation:y})},[n]),h=D.useCallback(async y=>{if(n.type!==y){const{verifyState:S}=Ze.getState(),x=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),E=A.Platform.isDesktop?await pn():x.identifier||x.uuid,C=S&&S?.appId===E;if((y==="SOURCE"||y==="PATH"||y==="METADATA"||y==="TIME_RANGE")&&!C){It();return}const M=Object.values(Pi[y].operators);r(t,{...n,type:y,value:{operator:M[0].value,value:y==="METADATA"?{name:"",value:""}:y==="TIME_RANGE"?Pi.TIME_RANGE.values[0].value:""}})}},[n]),p=D.useCallback(y=>{r(t,{...n,value:{...n.value,operator:y}})},[n]),m=D.useCallback((y,S="OTHERS")=>{if(S==="OTHERS")r(t,{...l.current,value:{...l.current.value,value:y}});else{const x={...l.current,value:{...l.current.value,value:{...l.current.value.value,[S==="METADATA_NAME"?"name":"value"]:y}}};r(t,x)}},[n]),w=()=>{o(t)},b={TYPE:g.jsx(Pc,{className:"value-selector",dataSource:Pi.TYPE.values,value:n.value.value,handleValueChanged:m}),LIST:g.jsx(Pc,{className:"value-selector",dataSource:Pi.LIST.values,value:n.value.value,handleValueChanged:m}),SOURCE:g.jsx(Pc,{className:"value-selector",dataSource:Pi.SOURCE.values,value:n.value.value,handleValueChanged:m}),PATH:g.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:y=>{m(y.target.value)}}),METADATA:g.jsxs(g.Fragment,{children:[g.jsx("input",{type:"text",className:"value-inputer",value:n.value.value.name,onChange:y=>{m(y.target.value,"METADATA_NAME")}}),g.jsx("input",{type:"text",className:"value-inputer",value:n.value.value.value,onChange:y=>{m(y.target.value,"METADATA_VALUE")}})]}),TAG:g.jsx("input",{type:"text",id:Math.random().toString(36).substring(7),className:"value-inputer",ref:i,value:n.value.value,onChange:y=>{m(y.target.value)}}),TEXT:g.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:y=>{m(y.target.value)}}),DATE:g.jsxs("div",{className:"date-inputer",children:[g.jsx(bb,{type:"icon",handleValueChange:m}),g.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:y=>{m(y.target.value)}})]}),TIME_RANGE:g.jsx(Pc,{className:"value-selector",dataSource:Pi.TIME_RANGE.values,value:n.value.value,handleValueChanged:m})};return g.jsxs("div",{className:"memo-filter-input-wrapper",children:[t>0&&g.jsx(Pc,{className:"relation-selector",dataSource:rK,value:n.relation,handleValueChanged:f}),g.jsx(Pc,{className:"type-selector",dataSource:Object.values(Pi),value:n.type,handleValueChanged:h}),g.jsxs(g.Fragment,{children:[Object.keys(Pi).includes(a)&&g.jsx(Pc,{className:"operator-selector",dataSource:Object.values(Pi[a].operators),value:n.value.operator,handleValueChanged:p}),b[a]]}),g.jsx("div",{ref:y=>{y&&A.setIcon(y,"x")},className:"btn remove-btn",onClick:w})]})},p4e=D.memo(h4e);function kk(e){e0({className:"create-query-dialog"},gD,{queryId:e})}const vD=e=>{const{dailyNotesState:{app:t,verifyState:n},locationState:{query:r}}=D.useContext(it),o=_.useRef(null),[a,i]=_.useState(!1),s=_.useRef(null),[l,u]=_.useState(""),f=s0(o.current,s.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}}]});D.useEffect(()=>{a&&f.update&&f?.update()},[a]),D.useEffect(()=>{o&&A.setIcon(o.current,"filter")},[o]);const h=async()=>{const m=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),w=A.Platform.isDesktop?await pn():m.identifier||m.uuid;return!n||n?.appId!==w?(It(),!1):!0};return cg(s,()=>{i(!1),l&&Ye.getState().query.filter===l&&Ye.setMemoFilter("")}),g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"thino-inline-filter-wrapper pro",ref:o,onClick:async()=>{await h()&&(A.Platform.isDesktop?(i(!a),await f?.update()):new m4e(Ze.getState().app,r.filter,w=>{u(w)}).open())}}),g.jsx("div",{ref:s,className:`thino-inline-filter-container ${a?"":"thino-hidden"}`,style:f.styles.popper,children:a&&g.jsx(gD,{type:"inline",queryId:r.filter?.startsWith("Filter [Temp] ")&&!r.filter?.includes("Filter [Temp]")?"":r.filter,destroy:()=>{i(!1)},setPreview:m=>{u(m)}})})]})};class m4e extends A.Modal{constructor(t,n,r){super(t),this.filter=n,this.setPreview=r}root;setPreview;onOpen(){const{contentEl:t}=this;this.root=ag(t),this.root.render(g.jsx(Ea,{store:Se,context:it,children:g.jsx("div",{className:"thino-inline-filter-container",children:g.jsx(gD,{type:"modal",queryId:this.filter?.startsWith("Filter [Temp] ")&&!this.filter?.includes("Filter [Temp]")?"":this.filter,destroy:()=>{this.close()},setPreview:n=>{this.setPreview(n)}})})}))}onClose(){this.root?.unmount()}}const g4e=[{field:"createdAt",label:"Created Time"},{field:"updatedAt",label:"Updated Time"},{field:"content-length",label:"Content Length"},{field:"sourceType",label:"Source Type"},{field:"thinoType",label:"Thino Type"}],v4e=({onSortChange:e,currentSort:t})=>{const{dailyNotesState:{app:n}}=D.useContext(it),[r]=D.useState(_.createRef());D.useEffect(()=>{r.current&&A.setIcon(r.current,"arrow-up-down")},[r.current]);const o=D.useCallback(i=>{i.stopPropagation();const s=new A.Menu;g4e.forEach(({field:l,label:u})=>{s.addItem(f=>{const h=t.field===l&&t.direction==="asc";f.setTitle(`${u} (Ascending)`).setIcon(h?"check":"").onClick(()=>{const p={field:l,direction:"asc",label:u};e(p),n?.saveLocalStorage("memoSortConfig",JSON.stringify(p))})}),s.addItem(f=>{const h=t.field===l&&t.direction==="desc";f.setTitle(`${u} (Descending)`).setIcon(h?"check":"").onClick(()=>{const p={field:l,direction:"desc",label:u};e(p),n?.saveLocalStorage("memoSortConfig",JSON.stringify(p))})})}),s.showAtMouseEvent(i.nativeEvent)},[t,e,n]),a=()=>`${t.label} ${t.direction==="asc"?"↑":"↓"}`;return g.jsx("div",{className:"sort-selector-wrapper",onClick:o,title:a(),children:g.jsx("span",{ref:r,className:"sort-icon"})})},o_=()=>{const{dailyNotesState:{app:e},globalState:{isMobileView:t,showSiderbarInMobileView:n}}=D.useContext(it),[r]=D.useState(_.createRef());D.useEffect(()=>{if(!r.current)return;const a=r.current;A.setIcon(a,"refresh-cw")},[r.current]);const o=D.useCallback(async()=>{if(!(t&&n)){if(zc){const a=Ik(e);await zc(a)}await le.fetchAllMemos()}},[]);return g.jsx("span",{className:"refresh-icon",ref:r,onClick:()=>{o(),r&&r.current.firstElementChild.toggleClass("rotate-hidden",!0),setTimeout(()=>{r&&r.current.firstElementChild.toggleClass("rotate-hidden",!1)},1e3)}})},ab=({onSortChange:e,currentSort:t})=>{const{locationState:{query:{filter:n}},globalState:{isMobileView:r},queryState:{queries:o}}=D.useContext(it),[a,i]=D.useState("THINO");D.useEffect(()=>{const l=St.getQueryById(n);i(l?l.title:"THINO")},[n,o]);const s=D.useCallback(l=>{l.stopPropagation(),Ge.setShowSiderbarInMobileView(!0)},[]);return g.jsxs("div",{className:"section-header-container memos-header-container",children:[g.jsxs("div",{className:"title-text",children:[g.jsx(js,{when:r,children:g.jsx("button",{ref:l=>{l&&A.setIcon(l,"menu")},className:"btn action-btn clickable-icon",onClick:s})}),g.jsx("span",{className:"normal-text",children:a}),g.jsx(o_,{})]}),g.jsxs("div",{className:"memos-header-search-section",children:[g.jsx(mK,{}),g.jsx(pK,{}),e&&t&&g.jsx(v4e,{onSortChange:e,currentSort:t}),g.jsx(vD,{}),g.jsx(ig,{})]})]})},y4e=()=>g.jsxs("div",{className:"user-banner-container user-banner-skeleton",children:[g.jsxs("div",{className:"userinfo-header-container",children:[g.jsxs("div",{className:"userinfo-container",children:[g.jsx("div",{className:"thino-user-icon skeleton-icon"}),g.jsxs("div",{className:"thino-user-info",children:[g.jsxs("span",{className:"username-container",children:[g.jsx("span",{className:"username-text skeleton-text skeleton-username"}),g.jsx("span",{className:"user-pro-badge skeleton-badge"})]}),g.jsx("span",{className:"thino-user-quote skeleton-text skeleton-quote"})]})]}),g.jsx("span",{className:"btn-group",children:g.jsx("span",{className:"btn action-btn menu-popup-btn skeleton-button"})})]}),g.jsx("div",{className:"status-text-container",children:g.jsxs("div",{className:"status-text",children:[g.jsx("div",{className:"amount-text skeleton-text skeleton-amount"}),g.jsx("div",{className:"type-text skeleton-text skeleton-type"})]})})]}),b4e=()=>{const{dailyNotesState:{settings:e,plugin:t,app:n,verifyState:r},globalState:{manifest:o,showSiderbarInMobileView:a,isMobileView:i}}=D.useContext(it),[s,l]=D.useState("Memos"),[u,f]=D.useState(""),[h,p]=D.useState(!1);D.useEffect(()=>{(()=>{p(!!(n&&e&&o))})()},[n,e,o,r]),D.useEffect(()=>{if(!e?.MomentsIcon||!n)return;const k=n.vault.adapter.getResourcePath(A.normalizePath(e.MomentsIcon));k&&!e?.MomentsIcon.startsWith("http")?f(k):f(e?.MomentsIcon)},[e?.MomentsIcon,n]),D.useEffect(()=>{e&&l(e.UserName)},[e]);const m=D.useCallback(()=>{Ye.pushHistory("/"),Ye.clearQuery()},[]),w=()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},b=()=>{if(e?.needVerify){Ge.setLocked(!0);return}else new A.Notice(I("You have not set a password or enable this feature yet")),n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},y=()=>{new RS(n,o.version).open()},S=()=>{Ge.setShowSiderbarInMobileView(!1),t.settingTab.updateSettings("FirstLoaded",!0)},x=()=>{new ZZ(n,t,o.version).open()},E=D.useCallback(async k=>{const{type:O}=k;if(O.startsWith("text"))try{return`${await dC.parseHtml(k)}`}catch(F){new A.Notice(F)}},[]),C=D.useCallback(()=>{const k=document.createElement("input");document.body.appendChild(k),k.type="file",k.multiple=!1,k.accept="text/html",k.onchange=async()=>{if(!k.files||k.files.length===0)return;const O=k.files[0];await E(O),document.body.removeChild(k)},k.click()},[]),M=k=>{const O=new A.Menu;O.addItem(F=>{F.setIcon("user").setTitle(I("Settings")).onClick(w)}),e?.needVerify&&O.addItem(F=>{F.setIcon("lock").setTitle(I("Lock")).onClick(b)}),O.addItem(F=>{F.setIcon("import").setTitle(I("Import")).onClick(C)}),O.addSeparator(),O.addItem(F=>{F.setIcon("file-text").setTitle(I("ChangeLog")).onClick(y)}),O.addItem(F=>{F.setIcon("settings").setTitle(I("Setting guide")).onClick(S)}),O.addItem(F=>{F.setIcon("alert-circle").setTitle(I("Submit issue")).onClick(x)}),O.showAtMouseEvent(k.nativeEvent)};return h?g.jsxs("div",{className:"user-banner-container",children:[g.jsxs("div",{className:"userinfo-header-container",children:[g.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:[g.jsx("div",{ref:k=>{if(u){k?.empty();return}u||k&&A.setIcon(k,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${u}")`}}),g.jsxs("div",{className:"thino-user-info",children:[g.jsxs("span",{className:"username-container",children:[g.jsx("span",{"aria-label":s==="MEMO 😉"?"THINO 😉":s||"THINO",className:"username-text",onClick:m,children:s==="MEMO 😉"?"THINO 😉":s||"THINO"}),g.jsx("span",{className:`user-pro-badge ${r?"activated":""}`,onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:"PRO"})]}),e?.MomentsQuote&&g.jsx("span",{className:"thino-user-quote",children:e?.MomentsQuote})]})]}),g.jsxs("span",{className:"btn-group",children:[e?.DefaultThemeForThino==="modern"&&!i&&g.jsx(o_,{}),g.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&A.setIcon(k,"more-horizontal")},className:"btn action-btn menu-popup-btn",onClick:M}),a&&g.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&A.setIcon(k,"x")},className:"btn action-btn close-sidebar-btn",onClick:()=>{Ge.setShowSiderbarInMobileView(!1)}})]})]}),g.jsx(vC,{statusType:"banner"})]}):g.jsx(y4e,{})},w4e=D.memo(({query:e,className:t})=>{const{memoState:{memos:n},dailyNotesState:{plugin:r}}=D.useContext(it),[o,a]=D.useState(null),[i,s]=D.useState(!1),[l,u]=D.useState(!1),f=D.useRef(null);return D.useEffect(()=>{e&&r&&r.thinoWorkerManager.filterMemos(n,{tag:"",duration:null,type:"",text:"",path:"",metadata:{},filter:e.id}).then(h=>{a(h.length),u(!0)}).catch(h=>{console.error("Error calculating query count:",h),a(0)}).finally(()=>{s(!1)})},[e,r,n]),g.jsx("div",{className:qt("query-count",i?"loading":"loaded",t),ref:f,children:l&&o!==null&&g.jsx("span",{className:"count-text",children:o.toString()||""})})},(e,t)=>e.query.id===t.query.id),j4=()=>{const{queryState:{queries:e},dailyNotesState:{app:t},locationState:{query:{filter:n}}}=D.useContext(it),r=Ql(),[o,a]=D.useState([]),[i,s]=D.useState(t?.loadLocalStorage("thino-query-sort-order")||"byTime");D.useEffect(()=>{const f=e.filter(h=>!h.id?.toString().startsWith("Filter [Temp]")&&!h.id?.toString().includes("Filter [Temp]")).sort((h,p)=>{if(p.pinnedAt&&!h.pinnedAt)return 1;if(h.pinnedAt&&!p.pinnedAt)return-1;switch(i){case"alphabetical":return h.title.localeCompare(p.title);case"alphabeticalReverse":return p.title.localeCompare(h.title);case"byTime":return je.getTimeStampByDate(p.createdAt)-je.getTimeStampByDate(h.createdAt);case"byTimeReverse":return je.getTimeStampByDate(h.createdAt)-je.getTimeStampByDate(p.createdAt);default:return 0}});a(f)},[e,i]),D.useEffect(()=>{St.getMyAllQueries().catch(()=>{}).finally(()=>{r.setFinish()})},[t]);const l=u=>{u.stopPropagation();const f=new A.Menu;for(const h of["alphabetical","alphabeticalReverse","byTime","byTimeReverse"])f.addItem(p=>{p.setTitle(I(h)).onClick(()=>{s(h),t?.saveLocalStorage("thino-query-sort-order",h)}).setChecked(i===h)}),h==="alphabeticalReverse"&&f.addSeparator();f.showAtMouseEvent(u.nativeEvent)};return g.jsxs("div",{className:"queries-wrapper",children:[g.jsxs("div",{className:"title-text",children:[g.jsx("span",{className:"normal-text",children:I("QUERY")}),g.jsxs("div",{className:"sort-btn-container",children:[g.jsx("span",{ref:u=>{u&&A.setIcon(u,"arrow-down-narrow-wide")},className:"sort-btn",onClick:l}),g.jsx("span",{ref:u=>{u&&A.setIcon(u,"plus")},className:"btn create-query-btn",onClick:()=>kk()})]})]}),g.jsx(js,{when:r.isSucceed&&o.length===0,children:g.jsx("div",{className:"create-query-btn-container",children:g.jsx("span",{className:"btn",onClick:()=>kk(),children:I("CREATE FILTER")})})}),g.jsx("div",{className:"queries-container",children:o.map(u=>g.jsx(S4e,{query:u,isActive:u.id===n},`${u.id}-${A.moment(u.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}`))})]})},S4e=e=>{const{query:t,isActive:n}=e,r=()=>{Ye.setMemoFilter(n?"":t.id)},o=a=>{a.stopPropagation();const i=new A.Menu;i.addItem(s=>{s.setTitle(t.pinnedAt?I("UNPIN"):I("PIN")).setIcon(t.pinnedAt?"pin-off":"pin").onClick(async()=>{try{t.pinnedAt?await St.unpinQuery(t.id):await St.pinQuery(t.id),St.editQuery({...t,pinnedAt:t.pinnedAt?"":je.getDateTimeString(Date.now())})}catch(l){console.error(l)}})}),i.addItem(s=>{s.setTitle(I("EDIT")).setIcon("edit").onClick(()=>{kk(t.id)})}),i.addItem(s=>{s.setTitle(I("DUPLICATE")).setIcon("copy").onClick(async()=>{try{const l=St.getQueryById(t.id);if(l){const u=`${l.title} ${I("DUPLICATE")}`,f=await St.createQuery(u,l.querystring);St.pushQuery(f),await St.getMyAllQueries(),new A.Notice(`Query "${u}" created successfully`)}}catch(l){console.error(l),new A.Notice(`Failed to duplicate query: ${l.message}`)}})}),i.addItem(s=>{s.setTitle(I("DELETE")).setIcon("trash-2").setWarning(!0).onClick(()=>{const l=new A.Menu;l.addItem(u=>{u.setTitle(I("CONFIRM!")).setIcon("trash-2").setWarning(!0).onClick(async()=>{try{await St.deleteQuery(t.id)}catch(f){new A.Notice(f.message)}})}),l.addItem(u=>{u.setTitle(I("Cancel")).setIcon("x").onClick(()=>{})}),l.showAtMouseEvent(a.nativeEvent)})}),i.showAtMouseEvent(a.nativeEvent)};return g.jsx(g.Fragment,{children:g.jsxs("div",{className:`query-item-container ${n?"active":""}`,onClick:r,children:[g.jsxs("div",{className:"query-text-container",children:[g.jsx("span",{ref:a=>{a&&!a.hasChildNodes()&&A.setIcon(a,"filter")},className:"icon-text"}),g.jsxs("span",{className:"query-text",children:[t.title,t.pinnedAt&&" 📌"]})]}),g.jsxs("div",{className:"btns-container",children:[g.jsx(w4e,{query:t}),g.jsx("span",{ref:a=>{a&&!a.hasChildNodes()&&A.setIcon(a,"more-horizontal")},className:"btn action-btn toggle-btn",onClick:o})]})]})})},L4=()=>{const{locationState:{query:{tag:e,filter:t}},dailyNotesState:{app:n},memoState:{tags:r,tagsNum:o,memos:a}}=D.useContext(it),[i,s]=D.useState(!0),l=D.useMemo(()=>t&&t?.toString()?.startsWith("Filter [Temp] ")&&St.getQueryById(t),[t]),[u,f]=D.useState([]),[h,p]=D.useState((n||window.app)?.loadLocalStorage("thino-tag-sort-order")||"alphabetical");D.useEffect(()=>{s(!0);const y=(n||window.app)?.loadLocalStorage("thino-temp-tags");if(y?.tags?.length>0){const S=m(y.tags||[],y.tagsNum||{});f(S.subTags)}s(!1)},[]),D.useEffect(()=>{le.initialized&&le.updateTagsState()},[a]),D.useEffect(()=>{if(!r?.length)return;s(!0);const y=requestAnimationFrame(()=>{const S=m(r,o);f(S.subTags),(n||window.app)?.saveLocalStorage("thino-temp-tags",{tags:r,tagsNum:o}),s(!1)});return()=>cancelAnimationFrame(y)},[r,o]);const m=D.useCallback((y,S)=>{const x=Array.from(y).sort();if(x.length===0)return{key:"",text:"",count:0,subTags:[]};const E={key:"",text:"",count:0,subTags:[]},C=new Map;for(const M of x){const k=M.split("/");let O=E,F="";for(let R=0;R<k.length;R++){const B=k[R];F+=R===0?B:"/"+B;let Y=C.get(F);if(Y||(Y=O.subTags.find(H=>H.text===F)),Y||(Y={key:B,text:F,count:S[F]||0,subTags:[],parent:O},O.subTags.push(Y),C.set(F,Y)),R===k.length-1){let H=Y.parent;for(;H;)H.count||(H.count=0),H.count+=S[F]||0,H=H.parent}O=Y}}return E},[]),w=y=>{y.stopPropagation();const S=new A.Menu;for(const x of["alphabetical","alphabeticalReverse","byCount","byCountReverse"])S.addItem(E=>{E.setTitle(I(x)).onClick(()=>{p(x),n?.saveLocalStorage("thino-tag-sort-order",x)}).setChecked(h===x)}),x==="alphabeticalReverse"&&S.addSeparator();S.showAtMouseEvent(y.nativeEvent)},b=D.useMemo(()=>[...u].sort(T4e(h)),[u,h]);return g.jsxs("div",{className:"tags-wrapper",children:[g.jsxs("div",{className:"tags-header title-text",children:[g.jsx("span",{className:"normal-text",children:I("Frequently Used Tags")}),g.jsx("span",{ref:y=>{y&&A.setIcon(y,"arrow-down-narrow-wide")},className:"tags-sort-btn",onClick:w})]}),g.jsx("div",{className:"tags-container",children:i?g.jsx("div",{className:"tag-loading",children:"Loading..."}):g.jsxs(g.Fragment,{children:[b.map((y,S)=>g.jsx(a_,{tag:y,tagQuery:e,filterQuery:l},y.text+"-"+S)),g.jsx(js,{when:u.length<5&&le.initialized,children:g.jsxs("span",{className:"tag-tip-container",children:[I("Input")," ",g.jsxs("span",{className:"code-text",children:[I("#Tag")," "]}),I("to create tag"),"..."]})})]})})]})},a_=_.memo(e=>{const{tag:t,tagQuery:n,filterQuery:r}=e,o=D.useMemo(()=>n===t.text||r&&JSON.parse(r.querystring).find(f=>f.type==="TAG"&&f.value.value===t.text),[t.text,n,r]),a=t.subTags.length>0,[i,s]=Nf(!1),l=async f=>{if(f.ctrlKey||f.metaKey){const{verifyState:h}=Ze.getState(),p=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),m=A.Platform.isDesktop?await pn():p.identifier||p.uuid;if(!(h&&h?.appId===m)){It();return}const b=Ye.getState().query.filter;if(b&&b?.startsWith("Filter [Temp] ")){const S=St.getQueryById(b).querystring,x=JSON.parse(S);let E;if(x.some(C=>C.type==="TAG"&&C.value.value===t.text)){if(E=x.filter(M=>M.value.value!==t.text),E.length===0){Ye.setMemoFilter("");return}const C=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...E[0],relation:"AND"},...E.slice(1)]));St.pushQuery(C),Ye.setMemoFilter(C.id)}else{E=[...x,{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}];const C=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(E));St.pushQuery(C),Ye.setMemoFilter(C.id)}}else if(n){Ye.setTagQuery("");const y=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:n,operator:"CONTAIN"},relation:"AND"},{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}]));St.pushQuery(y),Ye.setMemoFilter(y.id)}else if(!n){const y=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"AND"}]));St.pushQuery(y),Ye.setMemoFilter(y.id)}je.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(Ye.getState().pathname)||Ye.setPathname("/");return}if(o){if(Ye.setTagQuery(""),r){const p=JSON.parse(r.querystring).filter(w=>w.value.value!==t.text);if(p.length===0){Ye.setMemoFilter("");return}const m=St.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...p[0],relation:"AND"},...p.slice(1)]));St.pushQuery(m),Ye.setMemoFilter(m.id)}}else await je.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(Ye.getState().pathname)||Ye.setPathname("/"),Ye.setTagQuery(t.text)},u=f=>{f.stopPropagation(),s()};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:`tag-item-container ${o?"active":""}`,onClick:l,children:[g.jsxs("div",{className:"tag-text-container",children:[g.jsx("span",{ref:f=>{f&&A.setIcon(f,"hash")},className:"btn tag-btn"}),g.jsx("span",{className:"tag-text",children:t.key})]}),g.jsxs("div",{className:"btns-container",children:[g.jsx("span",{className:"tag-count",children:t.count}),a?g.jsx("span",{ref:f=>{f&&A.setIcon(f,"chevron-right")},className:`btn action-btn toggle-btn ${i?"shown":""}`,onClick:u}):null]})]}),a&&i&&g.jsx("div",{className:"subtags-container",children:t.subTags.map((f,h)=>g.jsx(a_,{tag:f,tagQuery:n,filterQuery:r},f.text+"-"+h))})]})}),R4=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base",numeric:!0}).compare,jx={alphabetical:(e,t)=>R4(e.text,t.text),alphabeticalReverse:(e,t)=>-R4(e.text,t.text),byCount:(e,t)=>t.count-e.count,byCountReverse:(e,t)=>e.count-t.count},T4e=(e="byCount")=>jx.hasOwnProperty(e)?jx[e]:jx.alphabetical,F4=()=>{const{dailyNotesState:{app:e,settings:t,verifyState:n}}=D.useContext(it),r=[{name:I("Random Review"),path:"/review",iconID:"star"},{name:I("Gallery"),path:"/gallery",iconID:"image"},{name:I("Stat"),path:"/stat",iconID:"chart-bar"},{name:I("ARCHIVE"),path:"/archive",iconID:"archive"},{name:I("Recycle bin"),path:"/recycle",iconID:"recycle"}],o=D.useRef([]);return D.useEffect(()=>{o.current.forEach((a,i)=>{a&&A.setIcon(a,r[i].iconID)})},[t,o]),g.jsx(g.Fragment,{children:g.jsx("div",{className:"path-entry-wrapper",children:r.map((a,i)=>g.jsx(g.Fragment,{children:g.jsxs("div",{className:`path-entry-container ${Ye.getState().pathname===a.path?"active":""} ${t.DeleteThinoDirectly&&a.path==="/recycle"?"thino-hidden":""} ${a.path==="/review"||a.path==="/daily-review"||a.path==="/stat"?"pro":""}`,onClick:async()=>{const s=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),l=A.Platform.isDesktop?await pn():s.identifier||s.uuid;if(!n&&n?.appId!==l&&(a.path==="/review"||a.path==="/daily-review"||a.path==="/stat")){It();return}if(Ye.setPathname(a.path),a.path==="/review"&&Ye.getState().pathname==="/review"){e.workspace.trigger("refresh-review-memos");return}Ye.clearQuery()},children:[g.jsx("span",{ref:s=>o.current[i]=s,className:"path-entry-icon"}),g.jsx("span",{className:"path-entry-text",children:a.name})]},i)}))})})},H4=e=>{const{dailyNotesState:{settings:t},locationState:n,globalState:{isMobileView:r,showSiderbarInMobileView:o}}=D.useContext(it),a=D.useRef(null),i=D.useMemo(()=>s=>{const l=Ge.getState().showSiderbarInMobileView;if(!l){window.removeEventListener("click",i,{capture:!0});return}const u=s.target;!u.closest(".close-sidebar-btn")&&u.closest(".memos-sidebar-wrapper")||a.current?.contains(s.target)||a.current?.parentNode?.contains(s.target)&&(l&&s.stopPropagation(),Ge.setShowSiderbarInMobileView(!1),window.removeEventListener("click",i,{capture:!0}))},[]);return D.useEffect(()=>{Ge.setShowSiderbarInMobileView(!1)},[n]),D.useEffect(()=>{o?document.body.classList.add(DN):document.body.classList.remove(DN)},[o]),D.useEffect(()=>{r&&o&&window.addEventListener("click",i,{capture:!0})},[r,o]),g.jsxs("aside",{className:qt("memos-sidebar-wrapper",e.className),ref:a,children:[e.children,g.jsx(b4e,{}),t?.DefaultThemeForThino==="modern"&&!r?e?.sidebarPosition==="right"?g.jsx(qp,{}):null:g.jsx(qp,{}),t?.DefaultThemeForThino==="modern"&&!r?e?.sidebarPosition==="left"?g.jsxs(g.Fragment,{children:[g.jsx(F4,{}),g.jsx(j4,{}),g.jsx(vC,{statusType:"sidebar"})]}):null:g.jsxs(g.Fragment,{children:[g.jsx(F4,{}),g.jsx(j4,{})]}),t?.DefaultThemeForThino==="modern"&&!r?e?.sidebarPosition==="right"?g.jsx(g.Fragment,{children:g.jsx(L4,{})}):null:g.jsx(g.Fragment,{children:g.jsx(L4,{})})]})},x4e=()=>{const{dailyNotesState:{settings:e}}=D.useContext(it),[t,n]=_.useState(""),r=o=>{n(o.target.value)};return g.jsx("div",{className:"locked-screen-wrapper",children:g.jsxs("div",{className:"locked-screen-content",children:[g.jsx("div",{className:"locked-screen-header",children:g.jsx("div",{className:"locked-screen-header-title",children:I("Locked")})}),g.jsx("div",{className:"locked-screen-body",children:g.jsxs("div",{className:"locked-screen-body-content",children:[g.jsxs("div",{className:"locked-screen-body-content-text",children:[g.jsx("div",{className:"locked-screen-body-content-text-title",children:I("Thino is locked")}),g.jsx("div",{className:"locked-screen-body-content-text-desc",children:I("Please unlock Thino by input password")})]}),g.jsxs("div",{className:"locked-screen-body-content-inputer",children:[g.jsx("input",{onKeyDown:o=>{o.key==="Enter"&&(e?.password===t?Ge.setLocked(!1):new A.Notice(I("Password is incorrect")))},onChange:r,value:t,type:"password",className:"locked-screen-body-content-input"}),g.jsx("button",{className:"locked-screen-body-content-btn",onClick:()=>{e?.password===t?Ge.setLocked(!1):new A.Notice(I("Password is incorrect"))},children:I("Unlock")})]})]})})]})})};class Fc extends a6{fuzzySearchItemsOptimized(t,n){const r=A.prepareFuzzySearch(t);return n.map(o=>{const a=r(o.path);return a?{item:o,match:a,score:a.score}:null}).sort((o,a)=>a?.score-o?.score).filter(Boolean)}getSuggestions(t){const r=app.vault.getFiles().filter(a=>["png","jpg","jpeg","gif"].includes(a.extension)),o=t.toLowerCase();return this.fuzzySearchItemsOptimized(o,r).map(a=>a.item)}renderSuggestion(t,n){const r=t.basename,o=t.parent?.path||"";n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:r}),n.createSpan({cls:"suggestion-path",text:o})}selectSuggestion(t){this.inputEl.value=t.path,this.inputEl.trigger("input"),this.close()}}const I4e=e=>{const{dailyNotesState:{settings:t,app:n,plugin:r},globalState:{manifest:o}}=D.useContext(it),[a,i]=_.useState(0),[s,l]=_.useState(""),u=_.useRef(null),f=_.useRef(null),[h,p]=_.useState({enabled:!1,path:"",format:""});D.useEffect(()=>{if(a===2&&t?.EnabledLocationList.find(y=>y.value==="DAILY"))if(!Yp())p({enabled:!1,path:"",format:""});else{const y=Rl().folder,S=Rl().format;p({enabled:!0,path:y,format:S})}},[a]),D.useEffect(()=>{if(!t?.MomentsIcon||!n){l("");return}const y=n.vault.adapter.getResourcePath(A.normalizePath(t.MomentsIcon));y&&!t?.MomentsIcon.startsWith("http")?l(y):l(t?.MomentsIcon)},[t?.MomentsIcon,n]),D.useEffect(()=>{f&&(f.current=null)},[a]),D.useEffect(()=>{u.current&&(f.current||(f.current=new Fc(u.current)))},[u.current]);const m=(y,S)=>{let x=r;x||(x=n.plugins.getPlugin("obsidian-memos")),x.settingTab.updateSettings(y,S)},w=D.useMemo(()=>{switch(a){case 0:return g.jsxs(g.Fragment,{children:[g.jsx("h1",{children:I("Get started with Thino")}),g.jsx("p",{children:I("Set up your user info for Thino.")})]});case 1:return g.jsxs(g.Fragment,{children:[g.jsx("h1",{children:I("Set theme for Thino")}),g.jsx("p",{children:I("Choose a theme for Thino.")})]});case 2:return g.jsxs(g.Fragment,{children:[g.jsx("h1",{children:I("Go with daily note plugin")}),g.jsx("p",{children:I("If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.")})]});case 3:return g.jsxs(g.Fragment,{children:[g.jsx("h1",{children:I("Set preferences for using Thino")}),g.jsx("p",{children:I("Adjust settings that influence your user experience with Thino.")})]});case 4:return g.jsxs(g.Fragment,{children:[g.jsx("h1",{children:I("Congrats! All settings done")}),g.jsx("p",{children:I("Go and enjoy Thino")})]})}},[a]),b=()=>{switch(a){case 0:return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"thino-user-preview-wrapper",children:g.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:[g.jsx("div",{ref:y=>{if(t?.MomentsIcon){y?.empty();return}t?.MomentsIcon||y&&A.setIcon(y,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${s}")`}}),g.jsxs("div",{className:"thino-user-info",children:[g.jsx("span",{className:"username-container",children:g.jsx("span",{"aria-label":t?.UserName==="MEMO 😉"?"THINO 😉":t?.UserName||"THINO",className:"username-text",children:t?.UserName==="MEMO 😉"?"THINO 😉":t?.UserName||"THINO"})}),t?.MomentsQuote&&g.jsx("span",{className:"thino-user-quote",children:t?.MomentsQuote})]})]})}),g.jsxs("div",{className:"thino-user-info-wrapper",children:[g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("User name")}),g.jsx("div",{className:"setting-item-description",children:I("Set your user name here. 'Memos 😏' By default")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"Thino 😏",defaultValue:t?.UserName,onInput:y=>m("UserName",y.currentTarget.value)})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("User quote")}),g.jsx("div",{className:"setting-item-description",children:I("Set user quote for thino")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"Share thino with the world",defaultValue:t?.MomentsQuote,onInput:y=>m("MomentsQuote",y.currentTarget.value)})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("User icon")}),g.jsx("div",{className:"setting-item-description",children:I("Set user icon for thino. You can input http/https link or file path in vault.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",ref:u,placeholder:"Input url or file path",defaultValue:t?.MomentsIcon,onInput:y=>m("MomentsIcon",y.currentTarget.value)})})]})]})]});case 1:return g.jsx(g.Fragment,{children:g.jsxs("div",{className:qt("theme-selector-group","selected"),children:[g.jsxs("div",{className:qt("theme-selector",t?.DefaultThemeForThino==="modern"?"selected":""),onClick:()=>m("DefaultThemeForThino","modern"),children:[g.jsxs("div",{className:"theme-selector-header-component",children:[g.jsx("div",{className:"theme-selector-header",children:I("Modern")}),g.jsx("div",{className:"theme-selector-description",children:I("A modern theme for Thino with a three-column layout and some unique features.")})]}),g.jsxs("div",{className:"theme-selector-content",children:[g.jsx("div",{className:"left-column column-component"}),g.jsx("div",{className:"center-column column-component"}),g.jsx("div",{className:"right-column column-component"})]}),g.jsx("div",{className:"theme-selector-footer",children:g.jsx("button",{className:"mod-cta",disabled:t?.DefaultThemeForThino==="modern",onClick:()=>m("DefaultThemeForThino","modern"),children:t?.DefaultThemeForThino==="modern"?I("Selected"):I("Select")})})]}),g.jsxs("div",{className:qt("theme-selector",t?.DefaultThemeForThino==="classic"?"selected":""),onClick:()=>m("DefaultThemeForThino","classic"),children:[g.jsxs("div",{className:"theme-selector-header-component",children:[g.jsx("div",{className:"theme-selector-header",children:I("Classic")}),g.jsx("div",{className:"theme-selector-description",children:I("A classic theme for Thino with a two-column layout")})]}),g.jsxs("div",{className:"theme-selector-content",children:[g.jsx("div",{className:"left-column column-component"}),g.jsx("div",{className:"center-column column-component"})]}),g.jsx("div",{className:"theme-selector-footer",children:g.jsx("button",{className:"mod-cta",disabled:t?.DefaultThemeForThino==="classic",onClick:()=>m("DefaultThemeForThino","classic"),children:t?.DefaultThemeForThino==="classic"?I("Selected"):I("Select")})})]})]})});case 2:return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"daily-note-plugin-status",children:[g.jsxs("div",{className:"daily-note-plugin-status-header",children:[g.jsx("div",{className:"plugin-status-header",children:I("Daily note plugin")}),g.jsx("div",{className:"plugin-status-description",children:I("Enable daily note plugin")})]}),g.jsx("div",{className:"daily-note-plugin-status-content",children:h.enabled&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:"daily-note-format",children:[g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Daily note name format")}),g.jsx("div",{className:"setting-item-description",children:I("Set daily note name format")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:h.format,onInput:y=>{p({...h,format:y.currentTarget.value.trim()});try{const S=n.internalPlugins.getPluginById("daily-notes");S.instance.options={...S.instance.options,format:y.currentTarget.value.trim()},S.saveData({...S.instance.options,format:y.currentTarget.value.trim()})}catch(S){console.error(S)}}})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Daily notes folder")}),g.jsx("div",{className:"setting-item-description",children:I("Set daily notes folder")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:h.path,onInput:y=>{p({...h,path:y.currentTarget.value.trim()});try{const S=n.internalPlugins.getPluginById("daily-notes");S.instance.options={...S.instance.options,folder:y.currentTarget.value.trim()},S.saveData({...S.instance.options,folder:y.currentTarget.value.trim()})}catch(S){console.error(S)}}})})]})]})})}),g.jsxs("div",{className:"daily-note-plugin-status-footer",children:[!h.enabled&&g.jsx("div",{className:"notice-click",children:I("Click to enable =>")}),g.jsx("button",{className:"mod-cta",disabled:h.enabled,onClick:()=>{if(!h.enabled){n.internalPlugins.getPluginById("daily-notes").enable();const y=Rl().folder,S=Rl().format;p({enabled:!0,format:S,path:y})}},children:h.enabled?I("Enabled"):I("Enable")})]})]}),g.jsxs("div",{className:"thino-daily-settings-wrapper",children:[g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Default time prefix")}),g.jsx("div",{className:"setting-item-description",children:I("Set default time prefix for thino in daily notes.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",defaultValue:t?.DefaultTimePrefix,onChange:y=>m("DefaultTimePrefix",y.currentTarget.value),children:[g.jsx("option",{value:"HH:mm",children:"HH:mm"}),g.jsx("option",{value:"HH:mm:ss",children:"HH:mm:ss"})]})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Set thino insert place")}),g.jsx("div",{className:"setting-item-description",children:I("Set where to insert thino content")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",defaultValue:t?.InsertType,onChange:y=>m("InsertType",y.currentTarget.value),children:[g.jsx("option",{value:"end",children:I("End of the diary")}),g.jsx("option",{value:"custom",children:I("Custom location")})]})})]}),t?.InsertType==="custom"&&g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Insert after heading")}),g.jsx("div",{className:"setting-item-description",children:I("If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t?.InsertAfter,onInput:y=>m("InsertAfter",y.currentTarget.value)})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Set process target")}),g.jsx("div",{className:"setting-item-description",children:I("You can set whole diary or only part of it")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",defaultValue:t?.ProcessContentTarget,onChange:y=>m("ProcessContentTarget",y.currentTarget.value),children:[g.jsx("option",{value:"custom",children:I("Custom")}),g.jsx("option",{value:"whole",children:I("Whole diary")})]})})]}),t?.ProcessContentTarget==="custom"&&g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Process Memos below")}),g.jsx("div",{className:"setting-item-description",children:I("If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t?.ProcessEntriesBelow,onInput:y=>m("ProcessEntriesBelow",y.currentTarget.value)})})]})]})]});case 3:return g.jsx(g.Fragment,{children:g.jsxs("div",{className:"thino-custom-settings-wrapper",children:[g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Default prefix when save thino")}),g.jsx("div",{className:"setting-item-description",children:I("Set the default prefix when create memo, 'List' by default.")})]}),g.jsx("div",{className:"setting-item-control",children:g.jsxs("select",{className:"dropdown",defaultValue:t?.DefaultPrefix,onChange:y=>m("DefaultPrefix",y.currentTarget.value),children:[g.jsx("option",{value:"List",children:I("List")}),g.jsx("option",{value:"Task",children:I("Task")})]})})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Use Tags In Vault")}),g.jsx("div",{className:"setting-item-description",children:I("Use tags in vault rather than only in Memos. False by default.")})]}),g.jsx("div",{className:"setting-item-control",ref:y=>{y&&(y.hasChildNodes()||new A.ToggleComponent(y).setValue(t?.UseVaultTags===void 0?!1:t?.UseVaultTags).onChange(S=>{m("UseVaultTags",S)}))}})]}),g.jsxs("div",{className:"setting-item",children:[g.jsxs("div",{className:"setting-item-info",children:[g.jsx("div",{className:"setting-item-name",children:I("Delete Thino Directly")}),g.jsx("div",{className:"setting-item-description",children:I("When delete thino directly, it will not be moved to trash. False by default.")})]}),g.jsx("div",{className:"setting-item-control",ref:y=>{y&&(y.hasChildNodes()||new A.ToggleComponent(y).setValue(t?.DeleteThinoDirectly===void 0?!1:t?.DeleteThinoDirectly).onChange(S=>{m("DeleteThinoDirectly",S)}))}})]})]})});case 4:return g.jsx(g.Fragment,{children:g.jsxs("div",{className:"thino-congrats",children:[g.jsxs("div",{className:"final-congrats-text",children:[g.jsx("p",{className:"ready-use",children:I("Thino is ready to use. ")}),g.jsx("p",{className:"start-to-use",children:I("You can start using Thino now. If you want to know more about Thino Pro, click the button below.")})]}),g.jsxs("div",{className:"next-btns-group",children:[g.jsx("button",{onClick:()=>{const y=localStorage.getItem("language");y&&(y==="zh"||y==="zh-TW")?window.open("https://pkmer.cn/products/thino","_blank"):window.open("https://thino.pkmer.net/en/#price","_blank")},children:I("About Thino Pro")}),g.jsx("button",{className:"mod-cta",onClick:()=>{m("FirstLoaded",!1),Ge.getState().isMobileView?(setTimeout(()=>{Ge.setShowSiderbarInMobileView(!0)},500),setTimeout(()=>{Ge.setExitSteps(!0)},1e3)):setTimeout(()=>{Ge.setExitSteps(!0)},800)},children:I("Start Thino")})]})]})})}};return g.jsx(g.Fragment,{children:g.jsx("div",{className:"onboarding-view-container",children:g.jsx("div",{className:"onboarding-view-wrapper",children:g.jsxs("div",{"data-onboarding-step":a,className:"onboarding-view-content",children:[g.jsxs("div",{className:"onboarding-step-heading",children:[g.jsxs("div",{className:"onboarding-step-count",children:[a+1,"/5"]}),g.jsx("div",{className:"close-btn",children:g.jsx("button",{onClick:()=>{m("FirstLoaded",!1)},children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[g.jsx("path",{d:"M18 6 6 18"}),g.jsx("path",{d:"m6 6 12 12"})]})})})]}),g.jsxs("div",{className:"onboarding-view-details",children:[g.jsxs("div",{className:"details-content",children:[g.jsx("div",{className:"onboarding-header-group",children:w}),g.jsx(g.Fragment,{children:g.jsx("div",{className:"onboarding-form",children:b()})})]}),g.jsxs("div",{className:"details-footer",children:[g.jsx("div",{className:"skip-btn",children:a!==4&&g.jsx("button",{onClick:()=>{m("FirstLoaded",!1)},children:I("Skip and start Thino")})}),g.jsxs("div",{className:"navigate-btns-group",children:[a!==0&&g.jsx("button",{onClick:()=>i(a-1),children:I("Back to previous step")}),a!==4&&g.jsx("button",{className:"mod-cta",onClick:()=>i(a+1),children:I("Next step")}),a===4&&g.jsx("button",{className:"details-settings-btn",onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:I("Details settings")})]})]})]})]})})})})};function Wb(e){return Wb=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},Wb(e)}function Xt(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(u){try{l(r.next(u))}catch(f){a(f)}}function s(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){var f;u.done?o(u.value):(f=u.value,f instanceof n?f:new n(function(h){h(f)})).then(i,s)}l((r=r.apply(e,[])).next())})}function Qt(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return function(f){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&f[0]?r.return:f[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,f[1])).done)return o;switch(r=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,r=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(o=i.trys,!((o=o.length>0&&o[o.length-1])||f[0]!==6&&f[0]!==2)){i=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){i.label=f[1];break}if(f[0]===6&&i.label<o[1]){i.label=o[1],o=f;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(f);break}o[2]&&i.ops.pop(),i.trys.pop();continue}f=t.call(e,i)}catch(h){f=[6,h],r=0}finally{n=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([l,u])}}}function B4(e,t,n){var r,o=((r={})[e]=t,r.path="/",r.expires=void 0,r);if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),o.expires=a.toUTCString()}var i=[];for(var s in o)i.push("".concat(s,"=").concat(o[s]));return document.cookie=i.join("; "),i_(e)}function i_(e){return(t={},document.cookie.split(";").forEach(function(n){var r=n.split("="),o=r[0],a=r[1];t[o.trim()]=a}),t)[e];var t}function k4e(e,t){t?B4(e._options.dontShowAgainCookie,"true",e._options.dontShowAgainCookieDays):B4(e._options.dontShowAgainCookie,"",-1)}var vy,Ek=(vy={},function(e,t){return t===void 0&&(t="introjs-stamp"),vy[t]=vy[t]||0,e[t]===void 0&&(e[t]=vy[t]++),e[t]}),qi=new(function(){function e(){this.events_key="introjs_event"}return e.prototype._id=function(t,n,r){return t+Ek(n)+(r?"_".concat(Ek(r)):"")},e.prototype.on=function(t,n,r,o,a){var i=this._id(n,r,o),s=function(l){return r(o||t,l||window.event)};"addEventListener"in t?t.addEventListener(n,s,a):"attachEvent"in t&&t.attachEvent("on".concat(n),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][i]=s},e.prototype.off=function(t,n,r,o,a){var i=this._id(n,r,o),s=t[this.events_key]&&t[this.events_key][i];s&&("removeEventListener"in t?t.removeEventListener(n,s,a):"detachEvent"in t&&t.detachEvent("on".concat(n),s),t[this.events_key][i]=null)},e}()),wn=function(e){return typeof e=="function"};function Vi(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";n.match(t)||e.setAttribute("class","".concat(n," ").concat(t))}else if(e.classList!==void 0)for(var r=0,o=t.split(" ");r<o.length;r++){var a=o[r];e.classList.add(a)}else e.className.match(t)||(e.className+=" ".concat(t))}function yD(e,t){var n="";return"currentStyle"in e?n=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function _4(e,t){if(e){var n=function(r){var o=window.getComputedStyle(r),a=o.position==="absolute",i=/(auto|scroll)/;if(o.position==="fixed")return document.body;for(var s=r;s=s.parentElement;)if(o=window.getComputedStyle(s),(!a||o.position!=="static")&&i.test(o.overflow+o.overflowY+o.overflowX))return s;return document.body}(t);n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop)}}function bD(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function Y4(e,t,n,r,o){var a;if(t!=="off"&&e&&(a=t==="tooltip"?o.getBoundingClientRect():r.getBoundingClientRect(),!function(s){var l=s.getBoundingClientRect();return l.top>=0&&l.left>=0&&l.bottom+80<=window.innerHeight&&l.right<=window.innerWidth}(r))){var i=bD().height;a.bottom-(a.bottom-a.top)<0||r.clientHeight>i?window.scrollBy(0,a.top-(i/2-a.height/2)-n):window.scrollBy(0,a.top-(i/2-a.height/2)+n)}}function Pp(e){e.setAttribute("role","button"),e.tabIndex=0}function rS(e){var t=e.parentElement;return!(!t||t.nodeName==="HTML")&&(yD(e,"position")==="fixed"||rS(t))}function Qd(e,t){var n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),l=yD(t,"position"),u={width:i.width,height:i.height};return t.tagName.toLowerCase()!=="body"&&l==="relative"||l==="sticky"?Object.assign(u,{top:i.top-s.top,left:i.left-s.left}):rS(e)?Object.assign(u,{top:i.top,left:i.left}):Object.assign(u,{top:i.top+o,left:i.left+a})}function wD(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";e.setAttribute("class",n.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function ql(e,t){var n="";if(e.style.cssText&&(n+=e.style.cssText),typeof t=="string")n+=t;else for(var r in t)n+="".concat(r,":").concat(t[r],";");e.style.cssText=n}function Ms(e,t,n){if(n&&t){var r=Qd(t.element,e._targetElement),o=e._options.helperElementPadding;t.element instanceof Element&&rS(t.element)?Vi(n,"introjs-fixedTooltip"):wD(n,"introjs-fixedTooltip"),t.position==="floating"&&(o=0),ql(n,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")})}}function yy(e,t,n,r,o){return e.left+t+n.width>r.width?(o.style.left="".concat(r.width-n.width-e.left,"px"),!1):(o.style.left="".concat(t,"px"),!0)}function by(e,t,n,r){return e.left+e.width-t-n.width<0?(r.style.left="".concat(-e.left,"px"),!1):(r.style.right="".concat(t,"px"),!0)}function Oi(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function E4e(e,t,n,r){var o=e.slice(),a=bD(),i=Qd(n).height+10,s=Qd(n).width+20,l=t.getBoundingClientRect(),u="floating";if(l.bottom+i>a.height&&Oi(o,"bottom"),l.top-i<0&&Oi(o,"top"),l.right+s>a.width&&Oi(o,"right"),l.left-s<0&&Oi(o,"left"),r&&(r=r.split("-")[0]),o.length&&(u=o[0],o.includes(r)&&(u=r)),u==="top"||u==="bottom"){var f=void 0,h=[];u==="top"?(f="top-middle-aligned",h=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(f="bottom-middle-aligned",h=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),u=function(p,m,w,b){var y=m/2,S=Math.min(w,window.screen.width);return S-p<m&&(Oi(b,"top-left-aligned"),Oi(b,"bottom-left-aligned")),(p<y||S-p<y)&&(Oi(b,"top-middle-aligned"),Oi(b,"bottom-middle-aligned")),p<m&&(Oi(b,"top-right-aligned"),Oi(b,"bottom-right-aligned")),b.length?b[0]:null}(l.left,s,a.width,h)||f}return u}function Gb(e,t,n,r,o){if(o===void 0&&(o=!1),t){var a,i,s,l,u="";n.style.top="",n.style.right="",n.style.bottom="",n.style.left="",n.style.marginLeft="",n.style.marginTop="",r.style.display="inherit",u=typeof t.tooltipClass=="string"?t.tooltipClass:e._options.tooltipClass,n.className=["introjs-tooltip",u].filter(Boolean).join(" "),n.setAttribute("role","dialog"),(l=t.position)!=="floating"&&e._options.autoPosition&&(l=E4e(e._options.positionPrecedence,t.element,n,l)),i=Qd(t.element),a=Qd(n),s=bD(),Vi(n,"introjs-".concat(l));var f=i.width/2-a.width/2;switch(l){case"top-right-aligned":r.className="introjs-arrow bottom-right";var h=0;by(i,h,a,n),n.style.bottom="".concat(i.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(f+=5),by(i,f,a,n)&&(n.style.right="",yy(i,f,a,s,n)),n.style.bottom="".concat(i.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",yy(i,o?0:15,a,s,n),n.style.bottom="".concat(i.height+20,"px");break;case"right":n.style.left="".concat(i.width+20,"px"),i.top+a.height>s.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(a.height-i.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||e._options.showStepNumbers!==!0||(n.style.top="15px"),i.top+a.height>s.height?(n.style.top="-".concat(a.height-i.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",n.style.right="".concat(i.width+20,"px");break;case"floating":r.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(a.width/2,"px"),n.style.marginTop="-".concat(a.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",by(i,h=0,a,n),n.style.top="".concat(i.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(f+=5),by(i,f,a,n)&&(n.style.right="",yy(i,f,a,s,n)),n.style.top="".concat(i.height+20,"px");break;default:r.className="introjs-arrow top",yy(i,0,a,s,n),n.style.top="".concat(i.height+20,"px")}}}function s_(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e<t.length;e++)wD(t[e],/introjs-[a-zA-Z]+/g)}function Ht(e,t){var n=document.createElement(e);t=t||{};var r=/^(?:role|data-|aria-)/;for(var o in t){var a=t[o];o==="style"&&typeof a!="function"?ql(n,a):typeof a=="string"&&o.match(r)?n.setAttribute(o,a):n[o]=a}return n}function z4(e,t,n){if(n===void 0&&(n=!1),n){var r=t.style.opacity||"1";ql(t,{opacity:"0"}),window.setTimeout(function(){ql(t,{opacity:r})},10)}e.appendChild(t)}function l_(e,t){return(e+1)/t*100}function c_(e,t){var n=Ht("div",{className:"introjs-bullets"});e._options.showBullets===!1&&(n.style.display="none");var r=Ht("ul");r.setAttribute("role","tablist");for(var o=function(){var u=this.getAttribute("data-step-number");u!=null&&e.goToStep(parseInt(u,10))},a=0;a<e._introItems.length;a++){var i=e._introItems[a].step,s=Ht("li"),l=Ht("a");s.setAttribute("role","presentation"),l.setAttribute("role","tab"),l.onclick=o,a===t.step-1&&(l.className="active"),Pp(l),l.innerHTML="&nbsp;",l.setAttribute("data-step-number",i.toString()),s.appendChild(l),r.appendChild(s)}return n.appendChild(r),n}function u_(e,t,n){var r=e.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=l_(t,n);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString())}}function d_(e,t){return Xt(this,void 0,void 0,function(){var n,r,o,a,i,s,l,u,f,h,p,m,w,b,y,S,x,E,C,M,k,O,F,R,B=this;return Qt(this,function(Y){switch(Y.label){case 0:return wn(e._introChangeCallback)?[4,e._introChangeCallback.call(e,t.element)]:[3,2];case 1:Y.sent(),Y.label=2;case 2:return n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer",typeof t.highlightClass=="string"&&(o+=" ".concat(t.highlightClass)),typeof e._options.highlightClass=="string"&&(o+=" ".concat(e._options.highlightClass)),n!==null&&r!==null?(l=r.querySelector(".introjs-helperNumberLayer"),u=r.querySelector(".introjs-tooltiptext"),f=r.querySelector(".introjs-tooltip-title"),h=r.querySelector(".introjs-arrow"),p=r.querySelector(".introjs-tooltip"),s=r.querySelector(".introjs-skipbutton"),i=r.querySelector(".introjs-prevbutton"),a=r.querySelector(".introjs-nextbutton"),n.className=o,p.style.opacity="0",p.style.display="none",_4(e._options.scrollToElement,t.element),Ms(e,t,n),Ms(e,t,r),s_(),e._lastShowElementTimer&&window.clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=window.setTimeout(function(){l!==null&&(l.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length)),u.innerHTML=t.intro||"",f.innerHTML=t.title||"",p.style.display="block",Gb(e,t,p,h),function(H,Z,W){if(H){var $=Z.querySelector(".introjs-bullets li > a.active"),V=Z.querySelector('.introjs-bullets li > a[data-step-number="'.concat(W.step,'"]'));$&&V&&($.className="",V.className="active")}}(e._options.showBullets,r,t),u_(r,e._currentStep,e._introItems.length),p.style.opacity="1",(a!=null&&/introjs-donebutton/gi.test(a.className)||a!=null)&&a.focus(),Y4(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,u)},350)):(m=Ht("div",{className:o}),w=Ht("div",{className:"introjs-tooltipReferenceLayer"}),b=Ht("div",{className:"introjs-arrow"}),y=Ht("div",{className:"introjs-tooltip"}),S=Ht("div",{className:"introjs-tooltiptext"}),x=Ht("div",{className:"introjs-tooltip-header"}),E=Ht("h1",{className:"introjs-tooltip-title"}),C=Ht("div"),ql(m,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(e._options.overlayOpacity.toString(),") 0 0 0 5000px")}),_4(e._options.scrollToElement,t.element),Ms(e,t,m),Ms(e,t,w),z4(e._targetElement,m,!0),z4(e._targetElement,w),S.innerHTML=t.intro,E.innerHTML=t.title,C.className="introjs-tooltipbuttons",e._options.showButtons===!1&&(C.style.display="none"),x.appendChild(E),y.appendChild(x),y.appendChild(S),e._options.dontShowAgain&&(M=Ht("div",{className:"introjs-dontShowAgain"}),(k=Ht("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(H){e.setDontShowAgain(H.target.checked)},(O=Ht("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,M.appendChild(k),M.appendChild(O),y.appendChild(M)),y.appendChild(c_(e,t)),y.appendChild(function(H){var Z=Ht("div");Z.className="introjs-progress",H._options.showProgress===!1&&(Z.style.display="none");var W=Ht("div",{className:"introjs-progressbar"});H._options.progressBarAdditionalClass&&(W.className+=" "+H._options.progressBarAdditionalClass);var $=l_(H._currentStep,H._introItems.length);return W.setAttribute("role","progress"),W.setAttribute("aria-valuemin","0"),W.setAttribute("aria-valuemax","100"),W.setAttribute("aria-valuenow",$.toString()),W.style.cssText="width:".concat($,"%;"),Z.appendChild(W),Z}(e)),F=Ht("div"),e._options.showStepNumbers===!0&&(F.className="introjs-helperNumberLayer",F.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),y.appendChild(F)),y.appendChild(b),w.appendChild(y),(a=Ht("a")).onclick=function(){return Xt(B,void 0,void 0,function(){return Qt(this,function(H){switch(H.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,du(e)];case 1:return H.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(a.className)?wn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:H.sent(),H.label=4;case 4:return[4,fu(e,e._targetElement)];case 5:H.sent(),H.label=6;case 6:return[2]}})})},Pp(a),a.innerHTML=e._options.nextLabel,(i=Ht("a")).onclick=function(){return Xt(B,void 0,void 0,function(){return Qt(this,function(H){switch(H.label){case 0:return e._currentStep>0?[4,Zb(e)]:[3,2];case 1:H.sent(),H.label=2;case 2:return[2]}})})},Pp(i),i.innerHTML=e._options.prevLabel,Pp(s=Ht("a",{className:"introjs-skipbutton"})),s.innerHTML=e._options.skipLabel,s.onclick=function(){return Xt(B,void 0,void 0,function(){return Qt(this,function(H){switch(H.label){case 0:return e._introItems.length-1===e._currentStep&&wn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:H.sent(),H.label=2;case 2:return wn(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:H.sent(),H.label=4;case 4:return[4,fu(e,e._targetElement)];case 5:return H.sent(),[2]}})})},x.appendChild(s),e._introItems.length>1&&C.appendChild(i),C.appendChild(a),y.appendChild(C),Gb(e,t,y,b),Y4(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,y)),(R=e._targetElement.querySelector(".introjs-disableInteraction"))&&R.parentNode&&R.parentNode.removeChild(R),t.disableInteraction&&function(H,Z){var W=document.querySelector(".introjs-disableInteraction");W===null&&(W=Ht("div",{className:"introjs-disableInteraction"}),H._targetElement.appendChild(W)),Ms(H,Z,W)}(e,t),e._currentStep===0&&e._introItems.length>1?(a!=null&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel),e._options.hidePrev===!0?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),a!=null&&Vi(a,"introjs-fullbutton")):i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-disabled"))):e._introItems.length-1===e._currentStep||e._introItems.length===1?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton")),e._options.hideNext===!0?(a!=null&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),i!=null&&Vi(i,"introjs-fullbutton")):a!=null&&(e._options.nextToDone===!0?(a.innerHTML=e._options.doneLabel,Vi(a,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):a.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton")),a!=null&&(a.className="".concat(e._options.buttonClass," introjs-nextbutton"),a.innerHTML=e._options.nextLabel)),i?.setAttribute("role","button"),a?.setAttribute("role","button"),s?.setAttribute("role","button"),a?.focus(),function(H){Vi(H,"introjs-showElement");var Z=yD(H,"position");Z!=="absolute"&&Z!=="relative"&&Z!=="sticky"&&Z!=="fixed"&&Vi(H,"introjs-relativePosition")}(t.element),wn(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:Y.sent(),Y.label=4;case 4:return[2]}})})}function C4e(e,t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,e._introItems===void 0?[3,2]:[4,du(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function M4e(e,t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,e._introItems===void 0?[3,2]:[4,du(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function du(e){return Xt(this,void 0,void 0,function(){var t,n,r;return Qt(this,function(o){switch(o.label){case 0:if(e._direction="forward",e._currentStepNumber!==void 0)for(t=0;t<e._introItems.length;t++)e._introItems[t].step===e._currentStepNumber&&(e._currentStep=t-1,e._currentStepNumber=void 0);return e._currentStep===-1?e._currentStep=0:++e._currentStep,n=e._introItems[e._currentStep],r=!0,wn(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,n&&n.element,e._currentStep,e._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return r===!1?(--e._currentStep,[2,!1]):e._introItems.length<=e._currentStep?wn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,fu(e,e._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,d_(e,n)];case 7:return o.sent(),[2,!0]}})})}function Zb(e){return Xt(this,void 0,void 0,function(){var t,n;return Qt(this,function(r){switch(r.label){case 0:return e._direction="backward",e._currentStep<=0?[2,!1]:(--e._currentStep,t=e._introItems[e._currentStep],n=!0,wn(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,t&&t.element,e._currentStep,e._direction)]:[3,2]);case 1:n=r.sent(),r.label=2;case 2:return n===!1?(++e._currentStep,[2,!1]):[4,d_(e,t)];case 3:return r.sent(),[2,!0]}})})}function f_(e,t){return Xt(this,void 0,void 0,function(){var n,r;return Qt(this,function(o){switch(o.label){case 0:return(n=t.code===void 0?t.which:t.code)===null&&(n=t.charCode===null?t.keyCode:t.charCode),n!=="Escape"&&n!==27||e._options.exitOnEsc!==!0?[3,2]:[4,fu(e,e._targetElement)];case 1:return o.sent(),[3,16];case 2:return n!=="ArrowLeft"&&n!==37?[3,4]:[4,Zb(e)];case 3:return o.sent(),[3,16];case 4:return n!=="ArrowRight"&&n!==39?[3,6]:[4,du(e)];case 5:return o.sent(),[3,16];case 6:return n!=="Enter"&&n!=="NumpadEnter"&&n!==13?[3,16]:(r=t.target||t.srcElement)&&r.className.match("introjs-prevbutton")?[4,Zb(e)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?e._introItems.length-1===e._currentStep&&wn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,fu(e,e._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,du(e)];case 14:o.sent(),o.label=15;case 15:t.preventDefault?t.preventDefault():t.returnValue=!1,o.label=16;case 16:return[2]}})})}function SD(e){if(e===null||Wb(e)!=="object"||"nodeType"in e)return e;var t={};for(var n in e)"jQuery"in window&&e[n]instanceof window.jQuery?t[n]=e[n]:t[n]=SD(e[n]);return t}function eh(e){var t=document.querySelector(".introjs-hints");return t?Array.from(t.querySelectorAll(e)):[]}function TD(e,t){return Xt(this,void 0,void 0,function(){var n;return Qt(this,function(r){switch(r.label){case 0:return n=eh('.introjs-hint[data-step="'.concat(t,'"]'))[0],oS(),n&&Vi(n,"introjs-hidehint"),wn(e._hintCloseCallback)?[4,e._hintCloseCallback.call(e,t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}function D4e(e){return Xt(this,void 0,void 0,function(){var t,n,r,o,a;return Qt(this,function(i){switch(i.label){case 0:t=eh(".introjs-hint"),n=0,r=t,i.label=1;case 1:return n<r.length?(o=r[n],(a=o.getAttribute("data-step"))?[4,TD(e,parseInt(a,10))]:[3,3]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})})}function A4e(e){return Xt(this,void 0,void 0,function(){var t,n,r,o,a;return Qt(this,function(i){switch(i.label){case 0:if(!(t=eh(".introjs-hint"))||!t.length)return[3,1];for(n=0,r=t;n<r.length;n++)o=r[n],(a=o.getAttribute("data-step"))&&h_(parseInt(a,10));return[3,3];case 1:return[4,g_(e,e._targetElement)];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function h_(e){var t=eh('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&wD(t,/introjs-hidehint/g)}function U4(e){var t=eh('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&t.parentNode&&t.parentNode.removeChild(t)}function N4e(e){return Xt(this,void 0,void 0,function(){var t,n,r,o,a,i,s;return Qt(this,function(l){switch(l.label){case 0:for((t=document.querySelector(".introjs-hints"))===null&&(t=Ht("div",{className:"introjs-hints"})),n=function(p){return function(m){var w=m||window.event;w&&w.stopPropagation&&w.stopPropagation(),w&&w.cancelBubble!==null&&(w.cancelBubble=!0),m_(e,p)}},r=0;r<e._hintItems.length;r++){if(o=e._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];Pp(a=Ht("a",{className:"introjs-hint"})),a.onclick=n(r),o.hintAnimation||Vi(a,"introjs-hint-no-anim"),rS(o.element)&&Vi(a,"introjs-fixedhint"),i=Ht("div",{className:"introjs-hint-dot"}),s=Ht("div",{className:"introjs-hint-pulse"}),a.appendChild(i),a.appendChild(s),a.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=a,p_(o.hintPosition,a,o.hintTargetElement),t.appendChild(a)}return document.body.appendChild(t),wn(e._hintsAddedCallback)?[4,e._hintsAddedCallback.call(e)]:[3,2];case 1:l.sent(),l.label=2;case 2:return e._options.hintAutoRefreshInterval>=0&&(e._hintsAutoRefreshFunction=(u=function(){return aS(e)},f=e._options.hintAutoRefreshInterval,function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];window.clearTimeout(h),h=window.setTimeout(function(){u(p)},f)}),qi.on(window,"scroll",e._hintsAutoRefreshFunction,e,!0)),[2]}var u,f,h})})}function p_(e,t,n){if(n!==void 0){var r=Qd(n),o=20,a=20;switch(e){default:case"top-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top,"px");break;case"top-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top,"px");break;case"bottom-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+r.height-a,"px");break;case"bottom-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top+r.height-a,"px");break;case"middle-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+(r.height-a)/2,"px");break;case"middle-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top+(r.height-a)/2,"px");break;case"middle-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top+(r.height-a)/2,"px");break;case"bottom-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top+r.height-a,"px");break;case"top-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top,"px")}}}function m_(e,t){return Xt(this,void 0,void 0,function(){var n,r,o,a,i,s,l,u,f,h,p;return Qt(this,function(m){switch(m.label){case 0:return n=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),r=e._hintItems[t],wn(e._hintClickCallback)?[4,e._hintClickCallback.call(e,n,r,t)]:[3,2];case 1:m.sent(),m.label=2;case 2:return(o=oS())!==void 0&&parseInt(o,10)===t||(a=Ht("div",{className:"introjs-tooltip"}),i=Ht("div"),s=Ht("div"),l=Ht("div"),a.onclick=function(w){w.stopPropagation?w.stopPropagation():w.cancelBubble=!0},i.className="introjs-tooltiptext",(u=Ht("p")).innerHTML=r.hint||"",i.appendChild(u),e._options.hintShowButton&&((f=Ht("a")).className=e._options.buttonClass,f.setAttribute("role","button"),f.innerHTML=e._options.hintButtonLabel,f.onclick=function(){return TD(e,t)},i.appendChild(f)),s.className="introjs-arrow",a.appendChild(s),a.appendChild(i),h=n.getAttribute("data-step")||"",e._currentStep=parseInt(h,10),p=e._hintItems[e._currentStep],l.className="introjs-tooltipReferenceLayer introjs-hintReference",l.setAttribute("data-step",h),Ms(e,p,l),l.appendChild(a),document.body.appendChild(l),Gb(e,p,a,s,!0)),[2]}})})}function oS(){var e=document.querySelector(".introjs-hintReference");if(e&&e.parentNode){var t=e.getAttribute("data-step");return t?(e.parentNode.removeChild(e),t):void 0}}function g_(e,t){return Xt(this,void 0,void 0,function(){var n,r,o,a,i,s,l,u,f,h;return Qt(this,function(p){switch(p.label){case 0:if(e._hintItems=[],e._options.hints&&e._options.hints.length>0)for(n=0,r=e._options.hints;n<r.length;n++)o=r[n],typeof(a=SD(o)).element=="string"&&(a.element=document.querySelector(a.element)),a.hintPosition=a.hintPosition||e._options.hintPosition,a.hintAnimation=a.hintAnimation||e._options.hintAnimation,a.element!==null&&e._hintItems.push(a);else{if(!(i=Array.from(t.querySelectorAll("*[data-hint]")))||!i.length)return[2,!1];for(s=0,l=i;s<l.length;s++)u=l[s],f=u.getAttribute("data-hint-animation"),h=e._options.hintAnimation,f&&(h=f==="true"),e._hintItems.push({element:u,hint:u.getAttribute("data-hint")||"",hintPosition:u.getAttribute("data-hint-position")||e._options.hintPosition,hintAnimation:h,tooltipClass:u.getAttribute("data-tooltip-class")||void 0,position:u.getAttribute("data-position")||e._options.tooltipPosition})}return[4,N4e(e)];case 1:return p.sent(),qi.on(document,"click",oS,e,!1),qi.on(window,"resize",aS,e,!0),[2,!0]}})})}function aS(e){for(var t=0,n=e._hintItems;t<n.length;t++){var r=n[t],o=r.hintTargetElement;p_(r.hintPosition,r.element,o)}}function v_(e,t){var n=Array.from(t.querySelectorAll("*[data-intro]")),r=[];if(e._options.steps&&e._options.steps.length)for(var o=0,a=e._options.steps;o<a.length;o++){var i=SD(p=a[o]);if(i.step=r.length+1,i.title=i.title||"",typeof i.element=="string"&&(i.element=document.querySelector(i.element)||void 0),i.element===void 0||i.element===null){var s=document.querySelector(".introjsFloatingElement");s===null&&(s=Ht("div",{className:"introjsFloatingElement"}),document.body.appendChild(s)),i.element=s,i.position="floating"}i.position=i.position||e._options.tooltipPosition,i.scrollTo=i.scrollTo||e._options.scrollTo,i.disableInteraction===void 0&&(i.disableInteraction=e._options.disableInteraction),i.element!==null&&r.push(i)}else{var l=void 0;if(n.length<1)return[];for(var u=0,f=n;u<f.length;u++){var h=f[u];if((!e._options.group||h.getAttribute("data-intro-group")===e._options.group)&&h.style.display!=="none"){var p=parseInt(h.getAttribute("data-step")||"",10);l=e._options.disableInteraction,h.hasAttribute("data-disable-interaction")&&(l=!!h.getAttribute("data-disable-interaction")),p>0&&(r[p-1]={step:p,element:h,title:h.getAttribute("data-title")||"",intro:h.getAttribute("data-intro")||"",tooltipClass:h.getAttribute("data-tooltip-class")||void 0,highlightClass:h.getAttribute("data-highlight-class")||void 0,position:h.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:h.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l})}}for(var m=0,w=0,b=n;w<b.length;w++)if(h=b[w],(!e._options.group||h.getAttribute("data-intro-group")===e._options.group)&&h.getAttribute("data-step")===null){for(;r[m]!==void 0;)m++;l=h.hasAttribute("data-disable-interaction")?!!h.getAttribute("data-disable-interaction"):e._options.disableInteraction,r[m]={element:h,title:h.getAttribute("data-title")||"",intro:h.getAttribute("data-intro")||"",step:m+1,tooltipClass:h.getAttribute("data-tooltip-class")||void 0,highlightClass:h.getAttribute("data-highlight-class")||void 0,position:h.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:h.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:l}}}for(var y=[],S=0;S<r.length;S++)r[S]&&y.push(r[S]);return(r=y).sort(function(x,E){return x.step-E.step}),r}function y_(e,t){var n=e._currentStep;if(n!=null&&n!=-1){var r=e._introItems[n],o=document.querySelector(".introjs-tooltipReferenceLayer"),a=document.querySelector(".introjs-helperLayer"),i=document.querySelector(".introjs-disableInteraction");Ms(e,r,a),Ms(e,r,o),Ms(e,r,i),t&&(e._introItems=v_(e,e._targetElement),function(u,f){if(u._options.showBullets){var h=document.querySelector(".introjs-bullets");h&&h.parentNode&&h.parentNode.replaceChild(c_(u,f),h)}}(e,r),u_(o,n,e._introItems.length));var s=document.querySelector(".introjs-arrow"),l=document.querySelector(".introjs-tooltip");return l&&s&&Gb(e,e._introItems[n],l,s),aS(e),e}}function b_(e){y_(e)}function ep(e,t){if(t===void 0&&(t=!1),e&&e.parentElement){var n=e.parentElement;t?(ql(e,{opacity:"0"}),window.setTimeout(function(){try{n.removeChild(e)}catch{}},500)):n.removeChild(e)}}function fu(e,t,n){return n===void 0&&(n=!1),Xt(this,void 0,void 0,function(){var r,o,a,i;return Qt(this,function(s){switch(s.label){case 0:return r=!0,e._introBeforeExitCallback===void 0?[3,2]:[4,e._introBeforeExitCallback.call(e,t)];case 1:r=s.sent(),s.label=2;case 2:if(!n&&r===!1)return[2];if((o=Array.from(t.querySelectorAll(".introjs-overlay")))&&o.length)for(a=0,i=o;a<i.length;a++)ep(i[a]);return ep(t.querySelector(".introjs-helperLayer"),!0),ep(t.querySelector(".introjs-tooltipReferenceLayer")),ep(t.querySelector(".introjs-disableInteraction")),ep(document.querySelector(".introjsFloatingElement")),s_(),qi.off(window,"keydown",f_,e,!0),qi.off(window,"resize",b_,e,!0),wn(e._introExitCallback)?[4,e._introExitCallback.call(e)]:[3,4];case 3:s.sent(),s.label=4;case 4:return e._currentStep=-1,[2]}})})}function O4e(e,t){return Xt(this,void 0,void 0,function(){var n;return Qt(this,function(r){switch(r.label){case 0:return e.isActive()?wn(e._introStartCallback)?[4,e._introStartCallback.call(e,t)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return(n=v_(e,t)).length===0?[2,!1]:(e._introItems=n,function(o,a){var i=this,s=Ht("div",{className:"introjs-overlay"});ql(s,{top:0,bottom:0,left:0,right:0,position:"fixed"}),a.appendChild(s),o._options.exitOnOverlayClick===!0&&(ql(s,{cursor:"pointer"}),s.onclick=function(){return Xt(i,void 0,void 0,function(){return Qt(this,function(l){switch(l.label){case 0:return[4,fu(o,a)];case 1:return l.sent(),[2]}})})})}(e,t),[4,du(e)]);case 3:r.sent(),t.addEventListener,e._options.keyboardNavigation&&qi.on(window,"keydown",f_,e,!0),qi.on(window,"resize",b_,e,!0),r.label=4;case 4:return[2,!1]}})})}function V4(e,t,n){return e[t]=n,e}var Lx=function(){function e(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return e.prototype.isActive=function(){return(!this._options.dontShowAgain||(t=i_(this._options.dontShowAgainCookie))===""||t!=="true")&&this._options.isActive;var t},e.prototype.clone=function(){return new e(this._targetElement)},e.prototype.setOption=function(t,n){return this._options=V4(this._options,t,n),this},e.prototype.setOptions=function(t){return this._options=function(n,r){for(var o=0,a=Object.entries(r);o<a.length;o++){var i=a[o];n=V4(n,i[0],i[1])}return n}(this._options,t),this},e.prototype.start=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,O4e(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.goToStep=function(t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return[4,C4e(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},e.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this},e.prototype.goToStepNumber=function(t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return[4,M4e(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.nextStep=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,du(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.previousStep=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,Zb(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.currentStep=function(){return this._currentStep},e.prototype.exit=function(t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return[4,fu(this,this._targetElement,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.refresh=function(t){return y_(this,t),this},e.prototype.setDontShowAgain=function(t){return k4e(this,t),this},e.prototype.onbeforechange=function(t){if(!wn(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},e.prototype.onchange=function(t){if(!wn(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},e.prototype.onafterchange=function(t){if(!wn(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},e.prototype.oncomplete=function(t){if(!wn(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},e.prototype.onhintsadded=function(t){if(!wn(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},e.prototype.onhintclick=function(t){if(!wn(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},e.prototype.onhintclose=function(t){if(!wn(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},e.prototype.onstart=function(t){if(!wn(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this},e.prototype.onexit=function(t){if(!wn(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},e.prototype.onskip=function(t){if(!wn(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},e.prototype.onbeforeexit=function(t){if(!wn(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},e.prototype.addHints=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,g_(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.hideHint=function(t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return[4,TD(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.hideHints=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,D4e(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.showHint=function(t){return h_(t),this},e.prototype.showHints=function(){return Xt(this,void 0,void 0,function(){return Qt(this,function(t){switch(t.label){case 0:return[4,A4e(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.removeHints=function(){return function(t){for(var n=0,r=eh(".introjs-hint");n<r.length;n++){var o=r[n].getAttribute("data-step");o&&U4(parseInt(o,10))}qi.off(document,"click",oS,t,!1),qi.off(window,"resize",aS,t,!0),t._hintsAutoRefreshFunction&&qi.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0)}(this),this},e.prototype.removeHint=function(t){return U4(t),this},e.prototype.showHintDialog=function(t){return Xt(this,void 0,void 0,function(){return Qt(this,function(n){switch(n.label){case 0:return[4,m_(this,t)];case 1:return n.sent(),[2,this]}})})},e}(),qb=function e(t){var n;if(Wb(t)==="object")n=new Lx(t);else if(typeof t=="string"){var r=document.querySelector(t);if(!r)throw new Error("There is no element with given selector.");n=new Lx(r)}else n=new Lx(document.body);return e.instances[Ek(n,"introjs-instance")]=n,n};qb.version="7.2.0",qb.instances={};var jc={},W4;function P4e(){if(W4)return jc;W4=1;var e=D;function t(P){for(var U="https://reactjs.org/docs/error-decoder.html?invariant="+P,J=1;J<arguments.length;J++)U+="&args[]="+encodeURIComponent(arguments[J]);return"Minified React error #"+P+"; visit "+U+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,o={},a={};function i(P){return n.call(a,P)?!0:n.call(o,P)?!1:r.test(P)?a[P]=!0:(o[P]=!0,!1)}function s(P,U,J,oe,ve,pe,Ce){this.acceptsBooleans=U===2||U===3||U===4,this.attributeName=oe,this.attributeNamespace=ve,this.mustUseProperty=J,this.propertyName=P,this.type=U,this.sanitizeURL=pe,this.removeEmptyString=Ce}var l={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(P){l[P]=new s(P,0,!1,P,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(P){var U=P[0];l[U]=new s(U,1,!1,P[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(P){l[P]=new s(P,2,!1,P.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(P){l[P]=new s(P,2,!1,P,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(P){l[P]=new s(P,3,!1,P.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(P){l[P]=new s(P,3,!0,P,null,!1,!1)}),["capture","download"].forEach(function(P){l[P]=new s(P,4,!1,P,null,!1,!1)}),["cols","rows","size","span"].forEach(function(P){l[P]=new s(P,6,!1,P,null,!1,!1)}),["rowSpan","start"].forEach(function(P){l[P]=new s(P,5,!1,P.toLowerCase(),null,!1,!1)});var u=/[\-:]([a-z])/g;function f(P){return P[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(P){var U=P.replace(u,f);l[U]=new s(U,1,!1,P,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(P){var U=P.replace(u,f);l[U]=new s(U,1,!1,P,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(P){var U=P.replace(u,f);l[U]=new s(U,1,!1,P,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(P){l[P]=new s(P,1,!1,P.toLowerCase(),null,!1,!1)}),l.xlinkHref=new s("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(P){l[P]=new s(P,1,!1,P.toLowerCase(),null,!0,!0)});var h={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},p=["Webkit","ms","Moz","O"];Object.keys(h).forEach(function(P){p.forEach(function(U){U=U+P.charAt(0).toUpperCase()+P.substring(1),h[U]=h[P]})});var m=/["'&<>]/;function w(P){if(typeof P=="boolean"||typeof P=="number")return""+P;P=""+P;var U=m.exec(P);if(U){var J="",oe,ve=0;for(oe=U.index;oe<P.length;oe++){switch(P.charCodeAt(oe)){case 34:U="&quot;";break;case 38:U="&amp;";break;case 39:U="&#x27;";break;case 60:U="&lt;";break;case 62:U="&gt;";break;default:continue}ve!==oe&&(J+=P.substring(ve,oe)),ve=oe+1,J+=U}P=ve!==oe?J+P.substring(ve,oe):J}return P}var b=/([A-Z])/g,y=/^ms-/,S=Array.isArray;function x(P,U){return{insertionMode:P,selectedValue:U}}function E(P,U,J){switch(U){case"select":return x(1,J.value!=null?J.value:J.defaultValue);case"svg":return x(2,null);case"math":return x(3,null);case"foreignObject":return x(1,null);case"table":return x(4,null);case"thead":case"tbody":case"tfoot":return x(5,null);case"colgroup":return x(7,null);case"tr":return x(6,null)}return 4<=P.insertionMode||P.insertionMode===0?x(1,null):P}var C=new Map;function M(P,U,J){if(typeof J!="object")throw Error(t(62));U=!0;for(var oe in J)if(n.call(J,oe)){var ve=J[oe];if(ve!=null&&typeof ve!="boolean"&&ve!==""){if(oe.indexOf("--")===0){var pe=w(oe);ve=w((""+ve).trim())}else{pe=oe;var Ce=C.get(pe);Ce!==void 0||(Ce=w(pe.replace(b,"-$1").toLowerCase().replace(y,"-ms-")),C.set(pe,Ce)),pe=Ce,ve=typeof ve=="number"?ve===0||n.call(h,oe)?""+ve:ve+"px":w((""+ve).trim())}U?(U=!1,P.push(' style="',pe,":",ve)):P.push(";",pe,":",ve)}}U||P.push('"')}function k(P,U,J,oe){switch(J){case"style":M(P,U,oe);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<J.length)||J[0]!=="o"&&J[0]!=="O"||J[1]!=="n"&&J[1]!=="N"){if(U=l.hasOwnProperty(J)?l[J]:null,U!==null){switch(typeof oe){case"function":case"symbol":return;case"boolean":if(!U.acceptsBooleans)return}switch(J=U.attributeName,U.type){case 3:oe&&P.push(" ",J,'=""');break;case 4:oe===!0?P.push(" ",J,'=""'):oe!==!1&&P.push(" ",J,'="',w(oe),'"');break;case 5:isNaN(oe)||P.push(" ",J,'="',w(oe),'"');break;case 6:!isNaN(oe)&&1<=oe&&P.push(" ",J,'="',w(oe),'"');break;default:U.sanitizeURL&&(oe=""+oe),P.push(" ",J,'="',w(oe),'"')}}else if(i(J)){switch(typeof oe){case"function":case"symbol":return;case"boolean":if(U=J.toLowerCase().slice(0,5),U!=="data-"&&U!=="aria-")return}P.push(" ",J,'="',w(oe),'"')}}}function O(P,U,J){if(U!=null){if(J!=null)throw Error(t(60));if(typeof U!="object"||!("__html"in U))throw Error(t(61));U=U.__html,U!=null&&P.push(""+U)}}function F(P){var U="";return e.Children.forEach(P,function(J){J!=null&&(U+=J)}),U}function R(P,U,J,oe){P.push(H(J));var ve=J=null,pe;for(pe in U)if(n.call(U,pe)){var Ce=U[pe];if(Ce!=null)switch(pe){case"children":J=Ce;break;case"dangerouslySetInnerHTML":ve=Ce;break;default:k(P,oe,pe,Ce)}}return P.push(">"),O(P,ve,J),typeof J=="string"?(P.push(w(J)),null):J}var B=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Y=new Map;function H(P){var U=Y.get(P);if(U===void 0){if(!B.test(P))throw Error(t(65,P));U="<"+P,Y.set(P,U)}return U}function Z(P,U,J,oe,ve){switch(U){case"select":P.push(H("select"));var pe=null,Ce=null;for(bt in J)if(n.call(J,bt)){var Ue=J[bt];if(Ue!=null)switch(bt){case"children":pe=Ue;break;case"dangerouslySetInnerHTML":Ce=Ue;break;case"defaultValue":case"value":break;default:k(P,oe,bt,Ue)}}return P.push(">"),O(P,Ce,pe),pe;case"option":Ce=ve.selectedValue,P.push(H("option"));var $e=Ue=null,ht=null,bt=null;for(pe in J)if(n.call(J,pe)){var tn=J[pe];if(tn!=null)switch(pe){case"children":Ue=tn;break;case"selected":ht=tn;break;case"dangerouslySetInnerHTML":bt=tn;break;case"value":$e=tn;default:k(P,oe,pe,tn)}}if(Ce!=null)if(J=$e!==null?""+$e:F(Ue),S(Ce)){for(oe=0;oe<Ce.length;oe++)if(""+Ce[oe]===J){P.push(' selected=""');break}}else""+Ce===J&&P.push(' selected=""');else ht&&P.push(' selected=""');return P.push(">"),O(P,bt,Ue),Ue;case"textarea":P.push(H("textarea")),bt=Ce=pe=null;for(Ue in J)if(n.call(J,Ue)&&($e=J[Ue],$e!=null))switch(Ue){case"children":bt=$e;break;case"value":pe=$e;break;case"defaultValue":Ce=$e;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:k(P,oe,Ue,$e)}if(pe===null&&Ce!==null&&(pe=Ce),P.push(">"),bt!=null){if(pe!=null)throw Error(t(92));if(S(bt)&&1<bt.length)throw Error(t(93));pe=""+bt}return typeof pe=="string"&&pe[0]===`
`&&P.push(`
`),pe!==null&&P.push(w(""+pe)),null;case"input":P.push(H("input")),$e=bt=Ue=pe=null;for(Ce in J)if(n.call(J,Ce)&&(ht=J[Ce],ht!=null))switch(Ce){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":$e=ht;break;case"defaultValue":Ue=ht;break;case"checked":bt=ht;break;case"value":pe=ht;break;default:k(P,oe,Ce,ht)}return bt!==null?k(P,oe,"checked",bt):$e!==null&&k(P,oe,"checked",$e),pe!==null?k(P,oe,"value",pe):Ue!==null&&k(P,oe,"value",Ue),P.push("/>"),null;case"menuitem":P.push(H("menuitem"));for(var co in J)if(n.call(J,co)&&(pe=J[co],pe!=null))switch(co){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:k(P,oe,co,pe)}return P.push(">"),null;case"title":P.push(H("title")),pe=null;for(tn in J)if(n.call(J,tn)&&(Ce=J[tn],Ce!=null))switch(tn){case"children":pe=Ce;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:k(P,oe,tn,Ce)}return P.push(">"),pe;case"listing":case"pre":P.push(H(U)),Ce=pe=null;for($e in J)if(n.call(J,$e)&&(Ue=J[$e],Ue!=null))switch($e){case"children":pe=Ue;break;case"dangerouslySetInnerHTML":Ce=Ue;break;default:k(P,oe,$e,Ue)}if(P.push(">"),Ce!=null){if(pe!=null)throw Error(t(60));if(typeof Ce!="object"||!("__html"in Ce))throw Error(t(61));J=Ce.__html,J!=null&&(typeof J=="string"&&0<J.length&&J[0]===`
`?P.push(`
`,J):P.push(""+J))}return typeof pe=="string"&&pe[0]===`
`&&P.push(`
`),pe;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":P.push(H(U));for(var uo in J)if(n.call(J,uo)&&(pe=J[uo],pe!=null))switch(uo){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,U));default:k(P,oe,uo,pe)}return P.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return R(P,J,U,oe);case"html":return ve.insertionMode===0&&P.push("<!DOCTYPE html>"),R(P,J,U,oe);default:if(U.indexOf("-")===-1&&typeof J.is!="string")return R(P,J,U,oe);P.push(H(U)),Ce=pe=null;for(ht in J)if(n.call(J,ht)&&(Ue=J[ht],Ue!=null))switch(ht){case"children":pe=Ue;break;case"dangerouslySetInnerHTML":Ce=Ue;break;case"style":M(P,oe,Ue);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:i(ht)&&typeof Ue!="function"&&typeof Ue!="symbol"&&P.push(" ",ht,'="',w(Ue),'"')}return P.push(">"),O(P,Ce,pe),pe}}function W(P,U,J){if(P.push('<!--$?--><template id="'),J===null)throw Error(t(395));return P.push(J),P.push('"></template>')}function $(P,U,J,oe){switch(J.insertionMode){case 0:case 1:return P.push('<div hidden id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 2:return P.push('<svg aria-hidden="true" style="display:none" id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 3:return P.push('<math aria-hidden="true" style="display:none" id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 4:return P.push('<table hidden id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 5:return P.push('<table hidden><tbody id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 6:return P.push('<table hidden><tr id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');case 7:return P.push('<table hidden><colgroup id="'),P.push(U.segmentPrefix),U=oe.toString(16),P.push(U),P.push('">');default:throw Error(t(397))}}function V(P,U){switch(U.insertionMode){case 0:case 1:return P.push("</div>");case 2:return P.push("</svg>");case 3:return P.push("</math>");case 4:return P.push("</table>");case 5:return P.push("</tbody></table>");case 6:return P.push("</tr></table>");case 7:return P.push("</colgroup></table>");default:throw Error(t(397))}}var ne=/[<\u2028\u2029]/g;function Q(P){return JSON.stringify(P).replace(ne,function(U){switch(U){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function te(P,U){return U=U===void 0?"":U,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:U+"P:",segmentPrefix:U+"S:",boundaryPrefix:U+"B:",idPrefix:U,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:P}}function G(P,U,J,oe){return J.generateStaticMarkup?(P.push(w(U)),!1):(U===""?P=oe:(oe&&P.push("<!-- -->"),P.push(w(U)),P=!0),P)}var X=Object.assign,ee=Symbol.for("react.element"),ie=Symbol.for("react.portal"),fe=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),Ae=Symbol.for("react.context"),Te=Symbol.for("react.forward_ref"),Fe=Symbol.for("react.suspense"),We=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),Ie=Symbol.for("react.lazy"),ce=Symbol.for("react.scope"),Pe=Symbol.for("react.debug_trace_mode"),Oe=Symbol.for("react.legacy_hidden"),Ve=Symbol.for("react.default_value"),tt=Symbol.iterator;function ot(P){if(P==null)return null;if(typeof P=="function")return P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case fe:return"Fragment";case ie:return"Portal";case we:return"Profiler";case he:return"StrictMode";case Fe:return"Suspense";case We:return"SuspenseList"}if(typeof P=="object")switch(P.$$typeof){case Ae:return(P.displayName||"Context")+".Consumer";case Ne:return(P._context.displayName||"Context")+".Provider";case Te:var U=P.render;return P=P.displayName,P||(P=U.displayName||U.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case ke:return U=P.displayName||null,U!==null?U:ot(P.type)||"Memo";case Ie:U=P._payload,P=P._init;try{return ot(P(U))}catch{}}return null}var st={};function wt(P,U){if(P=P.contextTypes,!P)return st;var J={},oe;for(oe in P)J[oe]=U[oe];return J}var Ot=null;function Wt(P,U){if(P!==U){P.context._currentValue2=P.parentValue,P=P.parent;var J=U.parent;if(P===null){if(J!==null)throw Error(t(401))}else{if(J===null)throw Error(t(401));Wt(P,J)}U.context._currentValue2=U.value}}function an(P){P.context._currentValue2=P.parentValue,P=P.parent,P!==null&&an(P)}function mn(P){var U=P.parent;U!==null&&mn(U),P.context._currentValue2=P.value}function Fn(P,U){if(P.context._currentValue2=P.parentValue,P=P.parent,P===null)throw Error(t(402));P.depth===U.depth?Wt(P,U):Fn(P,U)}function qe(P,U){var J=U.parent;if(J===null)throw Error(t(402));P.depth===J.depth?Wt(P,J):qe(P,J),U.context._currentValue2=U.value}function mt(P){var U=Ot;U!==P&&(U===null?mn(P):P===null?an(U):U.depth===P.depth?Wt(U,P):U.depth>P.depth?Fn(U,P):qe(U,P),Ot=P)}var Tt={isMounted:function(){return!1},enqueueSetState:function(P,U){P=P._reactInternals,P.queue!==null&&P.queue.push(U)},enqueueReplaceState:function(P,U){P=P._reactInternals,P.replace=!0,P.queue=[U]},enqueueForceUpdate:function(){}};function Et(P,U,J,oe){var ve=P.state!==void 0?P.state:null;P.updater=Tt,P.props=J,P.state=ve;var pe={queue:[],replace:!1};P._reactInternals=pe;var Ce=U.contextType;if(P.context=typeof Ce=="object"&&Ce!==null?Ce._currentValue2:oe,Ce=U.getDerivedStateFromProps,typeof Ce=="function"&&(Ce=Ce(J,ve),ve=Ce==null?ve:X({},ve,Ce),P.state=ve),typeof U.getDerivedStateFromProps!="function"&&typeof P.getSnapshotBeforeUpdate!="function"&&(typeof P.UNSAFE_componentWillMount=="function"||typeof P.componentWillMount=="function"))if(U=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),U!==P.state&&Tt.enqueueReplaceState(P,P.state,null),pe.queue!==null&&0<pe.queue.length)if(U=pe.queue,Ce=pe.replace,pe.queue=null,pe.replace=!1,Ce&&U.length===1)P.state=U[0];else{for(pe=Ce?U[0]:P.state,ve=!0,Ce=Ce?1:0;Ce<U.length;Ce++){var Ue=U[Ce];Ue=typeof Ue=="function"?Ue.call(P,pe,J,oe):Ue,Ue!=null&&(ve?(ve=!1,pe=X({},pe,Ue)):X(pe,Ue))}P.state=pe}else pe.queue=null}var Lt={id:1,overflow:""};function mr(P,U,J){var oe=P.id;P=P.overflow;var ve=32-gr(oe)-1;oe&=~(1<<ve),J+=1;var pe=32-gr(U)+ve;if(30<pe){var Ce=ve-ve%5;return pe=(oe&(1<<Ce)-1).toString(32),oe>>=Ce,ve-=Ce,{id:1<<32-gr(U)+ve|J<<ve|oe,overflow:pe+P}}return{id:1<<pe|J<<ve|oe,overflow:P}}var gr=Math.clz32?Math.clz32:Zn,Aa=Math.log,ao=Math.LN2;function Zn(P){return P>>>=0,P===0?32:31-(Aa(P)/ao|0)|0}function qr(P,U){return P===U&&(P!==0||1/P===1/U)||P!==P&&U!==U}var io=typeof Object.is=="function"?Object.is:qr,En=null,na=null,Dr=null,Ct=null,so=!1,lo=!1,ra=0,Hn=null,oa=0;function Ar(){if(En===null)throw Error(t(321));return En}function di(){if(0<oa)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Na(){return Ct===null?Dr===null?(so=!1,Dr=Ct=di()):(so=!0,Ct=Dr):Ct.next===null?(so=!1,Ct=Ct.next=di()):(so=!0,Ct=Ct.next),Ct}function os(){na=En=null,lo=!1,Dr=null,oa=0,Ct=Hn=null}function fi(P,U){return typeof U=="function"?U(P):U}function Du(P,U,J){if(En=Ar(),Ct=Na(),so){var oe=Ct.queue;if(U=oe.dispatch,Hn!==null&&(J=Hn.get(oe),J!==void 0)){Hn.delete(oe),oe=Ct.memoizedState;do oe=P(oe,J.action),J=J.next;while(J!==null);return Ct.memoizedState=oe,[oe,U]}return[Ct.memoizedState,U]}return P=P===fi?typeof U=="function"?U():U:J!==void 0?J(U):U,Ct.memoizedState=P,P=Ct.queue={last:null,dispatch:null},P=P.dispatch=al.bind(null,En,P),[Ct.memoizedState,P]}function hi(P,U){if(En=Ar(),Ct=Na(),U=U===void 0?null:U,Ct!==null){var J=Ct.memoizedState;if(J!==null&&U!==null){var oe=J[1];e:if(oe===null)oe=!1;else{for(var ve=0;ve<oe.length&&ve<U.length;ve++)if(!io(U[ve],oe[ve])){oe=!1;break e}oe=!0}if(oe)return J[0]}}return P=P(),Ct.memoizedState=[P,U],P}function al(P,U,J){if(25<=oa)throw Error(t(301));if(P===En)if(lo=!0,P={action:J,next:null},Hn===null&&(Hn=new Map),J=Hn.get(U),J===void 0)Hn.set(U,P);else{for(U=J;U.next!==null;)U=U.next;U.next=P}}function il(){throw Error(t(394))}function pi(){}var Au={readContext:function(P){return P._currentValue2},useContext:function(P){return Ar(),P._currentValue2},useMemo:hi,useReducer:Du,useRef:function(P){En=Ar(),Ct=Na();var U=Ct.memoizedState;return U===null?(P={current:P},Ct.memoizedState=P):U},useState:function(P){return Du(fi,P)},useInsertionEffect:pi,useLayoutEffect:function(){},useCallback:function(P,U){return hi(function(){return P},U)},useImperativeHandle:pi,useEffect:pi,useDebugValue:pi,useDeferredValue:function(P){return Ar(),P},useTransition:function(){return Ar(),[!1,il]},useId:function(){var P=na.treeContext,U=P.overflow;P=P.id,P=(P&~(1<<32-gr(P)-1)).toString(32)+U;var J=sl;if(J===null)throw Error(t(404));return U=ra++,P=":"+J.idPrefix+"R"+P,0<U&&(P+="H"+U.toString(32)),P+":"},useMutableSource:function(P,U){return Ar(),U(P._source)},useSyncExternalStore:function(P,U,J){if(J===void 0)throw Error(t(407));return J()}},sl=null,ac=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Oa(P){return console.error(P),null}function mi(){}function Nu(P,U,J,oe,ve,pe,Ce,Ue,$e){var ht=[],bt=new Set;return U={destination:null,responseState:U,progressiveChunkSize:oe===void 0?12800:oe,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:bt,pingedTasks:ht,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:ve===void 0?Oa:ve,onAllReady:mi,onShellReady:Ce===void 0?mi:Ce,onShellError:mi,onFatalError:mi},J=as(U,0,null,J,!1,!1),J.parentFlushed=!0,P=ic(U,P,null,J,bt,st,null,Lt),ht.push(P),U}function ic(P,U,J,oe,ve,pe,Ce,Ue){P.allPendingTasks++,J===null?P.pendingRootTasks++:J.pendingTasks++;var $e={node:U,ping:function(){var ht=P.pingedTasks;ht.push($e),ht.length===1&&$r(P)},blockedBoundary:J,blockedSegment:oe,abortSet:ve,legacyContext:pe,context:Ce,treeContext:Ue};return ve.add($e),$e}function as(P,U,J,oe,ve,pe){return{status:0,id:-1,index:U,parentFlushed:!1,chunks:[],children:[],formatContext:oe,boundary:J,lastPushedText:ve,textEmbedded:pe}}function gi(P,U){if(P=P.onError(U),P!=null&&typeof P!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof P+'" instead');return P}function is(P,U){var J=P.onShellError;J(U),J=P.onFatalError,J(U),P.destination!==null?(P.status=2,P.destination.destroy(U)):(P.status=1,P.fatalError=U)}function sc(P,U,J,oe,ve){for(En={},na=U,ra=0,P=J(oe,ve);lo;)lo=!1,ra=0,oa+=1,Ct=null,P=J(oe,ve);return os(),P}function Ou(P,U,J,oe){var ve=J.render(),pe=oe.childContextTypes;if(pe!=null){var Ce=U.legacyContext;if(typeof J.getChildContext!="function")oe=Ce;else{J=J.getChildContext();for(var Ue in J)if(!(Ue in pe))throw Error(t(108,ot(oe)||"Unknown",Ue));oe=X({},Ce,J)}U.legacyContext=oe,vr(P,U,ve),U.legacyContext=Ce}else vr(P,U,ve)}function Pu(P,U){if(P&&P.defaultProps){U=X({},U),P=P.defaultProps;for(var J in P)U[J]===void 0&&(U[J]=P[J]);return U}return U}function sn(P,U,J,oe,ve){if(typeof J=="function")if(J.prototype&&J.prototype.isReactComponent){ve=wt(J,U.legacyContext);var pe=J.contextType;pe=new J(oe,typeof pe=="object"&&pe!==null?pe._currentValue2:ve),Et(pe,J,oe,ve),Ou(P,U,pe,J)}else{pe=wt(J,U.legacyContext),ve=sc(P,U,J,oe,pe);var Ce=ra!==0;if(typeof ve=="object"&&ve!==null&&typeof ve.render=="function"&&ve.$$typeof===void 0)Et(ve,J,oe,pe),Ou(P,U,ve,J);else if(Ce){oe=U.treeContext,U.treeContext=mr(oe,1,0);try{vr(P,U,ve)}finally{U.treeContext=oe}}else vr(P,U,ve)}else if(typeof J=="string"){switch(ve=U.blockedSegment,pe=Z(ve.chunks,J,oe,P.responseState,ve.formatContext),ve.lastPushedText=!1,Ce=ve.formatContext,ve.formatContext=E(Ce,J,oe),cl(P,U,pe),ve.formatContext=Ce,J){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:ve.chunks.push("</",J,">")}ve.lastPushedText=!1}else{switch(J){case Oe:case Pe:case he:case we:case fe:vr(P,U,oe.children);return;case We:vr(P,U,oe.children);return;case ce:throw Error(t(343));case Fe:e:{J=U.blockedBoundary,ve=U.blockedSegment,pe=oe.fallback,oe=oe.children,Ce=new Set;var Ue={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Ce,errorDigest:null},$e=as(P,ve.chunks.length,Ue,ve.formatContext,!1,!1);ve.children.push($e),ve.lastPushedText=!1;var ht=as(P,0,null,ve.formatContext,!1,!1);ht.parentFlushed=!0,U.blockedBoundary=Ue,U.blockedSegment=ht;try{if(cl(P,U,oe),P.responseState.generateStaticMarkup||ht.lastPushedText&&ht.textEmbedded&&ht.chunks.push("<!-- -->"),ht.status=1,Pa(Ue,ht),Ue.pendingTasks===0)break e}catch(bt){ht.status=4,Ue.forceClientRender=!0,Ue.errorDigest=gi(P,bt)}finally{U.blockedBoundary=J,U.blockedSegment=ve}U=ic(P,pe,J,$e,Ce,U.legacyContext,U.context,U.treeContext),P.pingedTasks.push(U)}return}if(typeof J=="object"&&J!==null)switch(J.$$typeof){case Te:if(oe=sc(P,U,J.render,oe,ve),ra!==0){J=U.treeContext,U.treeContext=mr(J,1,0);try{vr(P,U,oe)}finally{U.treeContext=J}}else vr(P,U,oe);return;case ke:J=J.type,oe=Pu(J,oe),sn(P,U,J,oe,ve);return;case Ne:if(ve=oe.children,J=J._context,oe=oe.value,pe=J._currentValue2,J._currentValue2=oe,Ce=Ot,Ot=oe={parent:Ce,depth:Ce===null?0:Ce.depth+1,context:J,parentValue:pe,value:oe},U.context=oe,vr(P,U,ve),P=Ot,P===null)throw Error(t(403));oe=P.parentValue,P.context._currentValue2=oe===Ve?P.context._defaultValue:oe,P=Ot=P.parent,U.context=P;return;case Ae:oe=oe.children,oe=oe(J._currentValue2),vr(P,U,oe);return;case Ie:ve=J._init,J=ve(J._payload),oe=Pu(J,oe),sn(P,U,J,oe,void 0);return}throw Error(t(130,J==null?J:typeof J,""))}}function vr(P,U,J){if(U.node=J,typeof J=="object"&&J!==null){switch(J.$$typeof){case ee:sn(P,U,J.type,J.props,J.ref);return;case ie:throw Error(t(257));case Ie:var oe=J._init;J=oe(J._payload),vr(P,U,J);return}if(S(J)){ll(P,U,J);return}if(J===null||typeof J!="object"?oe=null:(oe=tt&&J[tt]||J["@@iterator"],oe=typeof oe=="function"?oe:null),oe&&(oe=oe.call(J))){if(J=oe.next(),!J.done){var ve=[];do ve.push(J.value),J=oe.next();while(!J.done);ll(P,U,ve)}return}throw P=Object.prototype.toString.call(J),Error(t(31,P==="[object Object]"?"object with keys {"+Object.keys(J).join(", ")+"}":P))}typeof J=="string"?(oe=U.blockedSegment,oe.lastPushedText=G(U.blockedSegment.chunks,J,P.responseState,oe.lastPushedText)):typeof J=="number"&&(oe=U.blockedSegment,oe.lastPushedText=G(U.blockedSegment.chunks,""+J,P.responseState,oe.lastPushedText))}function ll(P,U,J){for(var oe=J.length,ve=0;ve<oe;ve++){var pe=U.treeContext;U.treeContext=mr(pe,oe,ve);try{cl(P,U,J[ve])}finally{U.treeContext=pe}}}function cl(P,U,J){var oe=U.blockedSegment.formatContext,ve=U.legacyContext,pe=U.context;try{return vr(P,U,J)}catch($e){if(os(),typeof $e=="object"&&$e!==null&&typeof $e.then=="function"){J=$e;var Ce=U.blockedSegment,Ue=as(P,Ce.chunks.length,null,Ce.formatContext,Ce.lastPushedText,!0);Ce.children.push(Ue),Ce.lastPushedText=!1,P=ic(P,U.node,U.blockedBoundary,Ue,U.abortSet,U.legacyContext,U.context,U.treeContext).ping,J.then(P,P),U.blockedSegment.formatContext=oe,U.legacyContext=ve,U.context=pe,mt(pe)}else throw U.blockedSegment.formatContext=oe,U.legacyContext=ve,U.context=pe,mt(pe),$e}}function vi(P){var U=P.blockedBoundary;P=P.blockedSegment,P.status=3,Lo(this,U,P)}function ju(P,U,J){var oe=P.blockedBoundary;P.blockedSegment.status=3,oe===null?(U.allPendingTasks--,U.status!==2&&(U.status=2,U.destination!==null&&U.destination.push(null))):(oe.pendingTasks--,oe.forceClientRender||(oe.forceClientRender=!0,P=J===void 0?Error(t(432)):J,oe.errorDigest=U.onError(P),oe.parentFlushed&&U.clientRenderedBoundaries.push(oe)),oe.fallbackAbortableTasks.forEach(function(ve){return ju(ve,U,J)}),oe.fallbackAbortableTasks.clear(),U.allPendingTasks--,U.allPendingTasks===0&&(oe=U.onAllReady,oe()))}function Pa(P,U){if(U.chunks.length===0&&U.children.length===1&&U.children[0].boundary===null){var J=U.children[0];J.id=U.id,J.parentFlushed=!0,J.status===1&&Pa(P,J)}else P.completedSegments.push(U)}function Lo(P,U,J){if(U===null){if(J.parentFlushed){if(P.completedRootSegment!==null)throw Error(t(389));P.completedRootSegment=J}P.pendingRootTasks--,P.pendingRootTasks===0&&(P.onShellError=mi,U=P.onShellReady,U())}else U.pendingTasks--,U.forceClientRender||(U.pendingTasks===0?(J.parentFlushed&&J.status===1&&Pa(U,J),U.parentFlushed&&P.completedBoundaries.push(U),U.fallbackAbortableTasks.forEach(vi,P),U.fallbackAbortableTasks.clear()):J.parentFlushed&&J.status===1&&(Pa(U,J),U.completedSegments.length===1&&U.parentFlushed&&P.partialBoundaries.push(U)));P.allPendingTasks--,P.allPendingTasks===0&&(P=P.onAllReady,P())}function $r(P){if(P.status!==2){var U=Ot,J=ac.current;ac.current=Au;var oe=sl;sl=P.responseState;try{var ve=P.pingedTasks,pe;for(pe=0;pe<ve.length;pe++){var Ce=ve[pe],Ue=P,$e=Ce.blockedSegment;if($e.status===0){mt(Ce.context);try{vr(Ue,Ce,Ce.node),Ue.responseState.generateStaticMarkup||$e.lastPushedText&&$e.textEmbedded&&$e.chunks.push("<!-- -->"),Ce.abortSet.delete(Ce),$e.status=1,Lo(Ue,Ce.blockedBoundary,$e)}catch(Nr){if(os(),typeof Nr=="object"&&Nr!==null&&typeof Nr.then=="function"){var ht=Ce.ping;Nr.then(ht,ht)}else{Ce.abortSet.delete(Ce),$e.status=4;var bt=Ce.blockedBoundary,tn=Nr,co=gi(Ue,tn);if(bt===null?is(Ue,tn):(bt.pendingTasks--,bt.forceClientRender||(bt.forceClientRender=!0,bt.errorDigest=co,bt.parentFlushed&&Ue.clientRenderedBoundaries.push(bt))),Ue.allPendingTasks--,Ue.allPendingTasks===0){var uo=Ue.onAllReady;uo()}}}}}ve.splice(0,pe),P.destination!==null&&ja(P,P.destination)}catch(Nr){gi(P,Nr),is(P,Nr)}finally{sl=oe,ac.current=J,J===Au&&mt(U)}}}function ss(P,U,J){switch(J.parentFlushed=!0,J.status){case 0:var oe=J.id=P.nextSegmentId++;return J.lastPushedText=!1,J.textEmbedded=!1,P=P.responseState,U.push('<template id="'),U.push(P.placeholderPrefix),P=oe.toString(16),U.push(P),U.push('"></template>');case 1:J.status=2;var ve=!0;oe=J.chunks;var pe=0;J=J.children;for(var Ce=0;Ce<J.length;Ce++){for(ve=J[Ce];pe<ve.index;pe++)U.push(oe[pe]);ve=qn(P,U,ve)}for(;pe<oe.length-1;pe++)U.push(oe[pe]);return pe<oe.length&&(ve=U.push(oe[pe])),ve;default:throw Error(t(390))}}function qn(P,U,J){var oe=J.boundary;if(oe===null)return ss(P,U,J);if(oe.parentFlushed=!0,oe.forceClientRender)return P.responseState.generateStaticMarkup||(oe=oe.errorDigest,U.push("<!--$!-->"),U.push("<template"),oe&&(U.push(' data-dgst="'),oe=w(oe),U.push(oe),U.push('"')),U.push("></template>")),ss(P,U,J),P=P.responseState.generateStaticMarkup?!0:U.push("<!--/$-->"),P;if(0<oe.pendingTasks){oe.rootSegmentID=P.nextSegmentId++,0<oe.completedSegments.length&&P.partialBoundaries.push(oe);var ve=P.responseState,pe=ve.nextSuspenseID++;return ve=ve.boundaryPrefix+pe.toString(16),oe=oe.id=ve,W(U,P.responseState,oe),ss(P,U,J),U.push("<!--/$-->")}if(oe.byteSize>P.progressiveChunkSize)return oe.rootSegmentID=P.nextSegmentId++,P.completedBoundaries.push(oe),W(U,P.responseState,oe.id),ss(P,U,J),U.push("<!--/$-->");if(P.responseState.generateStaticMarkup||U.push("<!--$-->"),J=oe.completedSegments,J.length!==1)throw Error(t(391));return qn(P,U,J[0]),P=P.responseState.generateStaticMarkup?!0:U.push("<!--/$-->"),P}function lc(P,U,J){return $(U,P.responseState,J.formatContext,J.id),qn(P,U,J),V(U,J.formatContext)}function cc(P,U,J){for(var oe=J.completedSegments,ve=0;ve<oe.length;ve++)uc(P,U,J,oe[ve]);if(oe.length=0,P=P.responseState,oe=J.id,J=J.rootSegmentID,U.push(P.startInlineScript),P.sentCompleteBoundaryFunction?U.push('$RC("'):(P.sentCompleteBoundaryFunction=!0,U.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),oe===null)throw Error(t(395));return J=J.toString(16),U.push(oe),U.push('","'),U.push(P.segmentPrefix),U.push(J),U.push('")<\/script>')}function uc(P,U,J,oe){if(oe.status===2)return!0;var ve=oe.id;if(ve===-1){if((oe.id=J.rootSegmentID)===-1)throw Error(t(392));return lc(P,U,oe)}return lc(P,U,oe),P=P.responseState,U.push(P.startInlineScript),P.sentCompleteSegmentFunction?U.push('$RS("'):(P.sentCompleteSegmentFunction=!0,U.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),U.push(P.segmentPrefix),ve=ve.toString(16),U.push(ve),U.push('","'),U.push(P.placeholderPrefix),U.push(ve),U.push('")<\/script>')}function ja(P,U){try{var J=P.completedRootSegment;if(J!==null&&P.pendingRootTasks===0){qn(P,U,J),P.completedRootSegment=null;var oe=P.responseState.bootstrapChunks;for(J=0;J<oe.length-1;J++)U.push(oe[J]);J<oe.length&&U.push(oe[J])}var ve=P.clientRenderedBoundaries,pe;for(pe=0;pe<ve.length;pe++){var Ce=ve[pe];oe=U;var Ue=P.responseState,$e=Ce.id,ht=Ce.errorDigest,bt=Ce.errorMessage,tn=Ce.errorComponentStack;if(oe.push(Ue.startInlineScript),Ue.sentClientRenderFunction?oe.push('$RX("'):(Ue.sentClientRenderFunction=!0,oe.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),$e===null)throw Error(t(395));if(oe.push($e),oe.push('"'),ht||bt||tn){oe.push(",");var co=Q(ht||"");oe.push(co)}if(bt||tn){oe.push(",");var uo=Q(bt||"");oe.push(uo)}if(tn){oe.push(",");var Nr=Q(tn);oe.push(Nr)}if(!oe.push(")<\/script>")){P.destination=null,pe++,ve.splice(0,pe);return}}ve.splice(0,pe);var La=P.completedBoundaries;for(pe=0;pe<La.length;pe++)if(!cc(P,U,La[pe])){P.destination=null,pe++,La.splice(0,pe);return}La.splice(0,pe);var fo=P.partialBoundaries;for(pe=0;pe<fo.length;pe++){var ho=fo[pe];e:{ve=P,Ce=U;var Or=ho.completedSegments;for(Ue=0;Ue<Or.length;Ue++)if(!uc(ve,Ce,ho,Or[Ue])){Ue++,Or.splice(0,Ue);var Ro=!1;break e}Or.splice(0,Ue),Ro=!0}if(!Ro){P.destination=null,pe++,fo.splice(0,pe);return}}fo.splice(0,pe);var po=P.completedBoundaries;for(pe=0;pe<po.length;pe++)if(!cc(P,U,po[pe])){P.destination=null,pe++,po.splice(0,pe);return}po.splice(0,pe)}finally{P.allPendingTasks===0&&P.pingedTasks.length===0&&P.clientRenderedBoundaries.length===0&&P.completedBoundaries.length===0&&U.push(null)}}function ls(P,U){try{var J=P.abortableTasks;J.forEach(function(oe){return ju(oe,P,U)}),J.clear(),P.destination!==null&&ja(P,P.destination)}catch(oe){gi(P,oe),is(P,oe)}}function yi(){}function bi(P,U,J,oe){var ve=!1,pe=null,Ce="",Ue={push:function(ht){return ht!==null&&(Ce+=ht),!0},destroy:function(ht){ve=!0,pe=ht}},$e=!1;if(P=Nu(P,te(J,U?U.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,yi,void 0,function(){$e=!0}),$r(P),ls(P,oe),P.status===1)P.status=2,Ue.destroy(P.fatalError);else if(P.status!==2&&P.destination===null){P.destination=Ue;try{ja(P,Ue)}catch(ht){gi(P,ht),is(P,ht)}}if(ve)throw pe;if(!$e)throw Error(t(426));return Ce}return jc.renderToNodeStream=function(){throw Error(t(207))},jc.renderToStaticMarkup=function(P,U){return bi(P,U,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},jc.renderToStaticNodeStream=function(){throw Error(t(208))},jc.renderToString=function(P,U){return bi(P,U,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},jc.version="18.2.0",jc}var wy={},G4;function j4e(){if(G4)return wy;G4=1;var e=D;function t(j){for(var z="https://reactjs.org/docs/error-decoder.html?invariant="+j,K=1;K<arguments.length;K++)z+="&args[]="+encodeURIComponent(arguments[K]);return"Minified React error #"+j+"; visit "+z+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,r=0;function o(j,z){if(z.length!==0)if(512<z.length)0<r&&(j.enqueue(new Uint8Array(n.buffer,0,r)),n=new Uint8Array(512),r=0),j.enqueue(z);else{var K=n.length-r;K<z.length&&(K===0?j.enqueue(n):(n.set(z.subarray(0,K),r),j.enqueue(n),z=z.subarray(K)),n=new Uint8Array(512),r=0),n.set(z,r),r+=z.length}}function a(j,z){return o(j,z),!0}function i(j){n&&0<r&&(j.enqueue(new Uint8Array(n.buffer,0,r)),n=null,r=0)}var s=new TextEncoder;function l(j){return s.encode(j)}function u(j){return s.encode(j)}function f(j,z){typeof j.error=="function"?j.error(z):j.close()}var h=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},w={};function b(j){return h.call(w,j)?!0:h.call(m,j)?!1:p.test(j)?w[j]=!0:(m[j]=!0,!1)}function y(j,z,K,re,be,ge,Me){this.acceptsBooleans=z===2||z===3||z===4,this.attributeName=re,this.attributeNamespace=be,this.mustUseProperty=K,this.propertyName=j,this.type=z,this.sanitizeURL=ge,this.removeEmptyString=Me}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(j){S[j]=new y(j,0,!1,j,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(j){var z=j[0];S[z]=new y(z,1,!1,j[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(j){S[j]=new y(j,2,!1,j.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(j){S[j]=new y(j,2,!1,j,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(j){S[j]=new y(j,3,!1,j.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(j){S[j]=new y(j,3,!0,j,null,!1,!1)}),["capture","download"].forEach(function(j){S[j]=new y(j,4,!1,j,null,!1,!1)}),["cols","rows","size","span"].forEach(function(j){S[j]=new y(j,6,!1,j,null,!1,!1)}),["rowSpan","start"].forEach(function(j){S[j]=new y(j,5,!1,j.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function E(j){return j[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(j){var z=j.replace(x,E);S[z]=new y(z,1,!1,j,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(j){var z=j.replace(x,E);S[z]=new y(z,1,!1,j,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(j){var z=j.replace(x,E);S[z]=new y(z,1,!1,j,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(j){S[j]=new y(j,1,!1,j.toLowerCase(),null,!1,!1)}),S.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(j){S[j]=new y(j,1,!1,j.toLowerCase(),null,!0,!0)});var C={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},M=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(j){M.forEach(function(z){z=z+j.charAt(0).toUpperCase()+j.substring(1),C[z]=C[j]})});var k=/["'&<>]/;function O(j){if(typeof j=="boolean"||typeof j=="number")return""+j;j=""+j;var z=k.exec(j);if(z){var K="",re,be=0;for(re=z.index;re<j.length;re++){switch(j.charCodeAt(re)){case 34:z="&quot;";break;case 38:z="&amp;";break;case 39:z="&#x27;";break;case 60:z="&lt;";break;case 62:z="&gt;";break;default:continue}be!==re&&(K+=j.substring(be,re)),be=re+1,K+=z}j=be!==re?K+j.substring(be,re):K}return j}var F=/([A-Z])/g,R=/^ms-/,B=Array.isArray,Y=u("<script>"),H=u("<\/script>"),Z=u('<script src="'),W=u('<script type="module" src="'),$=u('" async=""><\/script>'),V=/(<\/|<)(s)(cript)/gi;function ne(j,z,K,re){return z+(K==="s"?"\\u0073":"\\u0053")+re}function Q(j,z,K,re,be){j=j===void 0?"":j,z=z===void 0?Y:u('<script nonce="'+O(z)+'">');var ge=[];if(K!==void 0&&ge.push(z,l((""+K).replace(V,ne)),H),re!==void 0)for(K=0;K<re.length;K++)ge.push(Z,l(O(re[K])),$);if(be!==void 0)for(re=0;re<be.length;re++)ge.push(W,l(O(be[re])),$);return{bootstrapChunks:ge,startInlineScript:z,placeholderPrefix:u(j+"P:"),segmentPrefix:u(j+"S:"),boundaryPrefix:j+"B:",idPrefix:j,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function te(j,z){return{insertionMode:j,selectedValue:z}}function G(j){return te(j==="http://www.w3.org/2000/svg"?2:j==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function X(j,z,K){switch(z){case"select":return te(1,K.value!=null?K.value:K.defaultValue);case"svg":return te(2,null);case"math":return te(3,null);case"foreignObject":return te(1,null);case"table":return te(4,null);case"thead":case"tbody":case"tfoot":return te(5,null);case"colgroup":return te(7,null);case"tr":return te(6,null)}return 4<=j.insertionMode||j.insertionMode===0?te(1,null):j}var ee=u("<!-- -->");function ie(j,z,K,re){return z===""?re:(re&&j.push(ee),j.push(l(O(z))),!0)}var fe=new Map,he=u(' style="'),we=u(":"),Ne=u(";");function Ae(j,z,K){if(typeof K!="object")throw Error(t(62));z=!0;for(var re in K)if(h.call(K,re)){var be=K[re];if(be!=null&&typeof be!="boolean"&&be!==""){if(re.indexOf("--")===0){var ge=l(O(re));be=l(O((""+be).trim()))}else{ge=re;var Me=fe.get(ge);Me!==void 0||(Me=u(O(ge.replace(F,"-$1").toLowerCase().replace(R,"-ms-"))),fe.set(ge,Me)),ge=Me,be=typeof be=="number"?be===0||h.call(C,re)?l(""+be):l(be+"px"):l(O((""+be).trim()))}z?(z=!1,j.push(he,ge,we,be)):j.push(Ne,ge,we,be)}}z||j.push(We)}var Te=u(" "),Fe=u('="'),We=u('"'),ke=u('=""');function Ie(j,z,K,re){switch(K){case"style":Ae(j,z,re);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<K.length)||K[0]!=="o"&&K[0]!=="O"||K[1]!=="n"&&K[1]!=="N"){if(z=S.hasOwnProperty(K)?S[K]:null,z!==null){switch(typeof re){case"function":case"symbol":return;case"boolean":if(!z.acceptsBooleans)return}switch(K=l(z.attributeName),z.type){case 3:re&&j.push(Te,K,ke);break;case 4:re===!0?j.push(Te,K,ke):re!==!1&&j.push(Te,K,Fe,l(O(re)),We);break;case 5:isNaN(re)||j.push(Te,K,Fe,l(O(re)),We);break;case 6:!isNaN(re)&&1<=re&&j.push(Te,K,Fe,l(O(re)),We);break;default:z.sanitizeURL&&(re=""+re),j.push(Te,K,Fe,l(O(re)),We)}}else if(b(K)){switch(typeof re){case"function":case"symbol":return;case"boolean":if(z=K.toLowerCase().slice(0,5),z!=="data-"&&z!=="aria-")return}j.push(Te,l(K),Fe,l(O(re)),We)}}}var ce=u(">"),Pe=u("/>");function Oe(j,z,K){if(z!=null){if(K!=null)throw Error(t(60));if(typeof z!="object"||!("__html"in z))throw Error(t(61));z=z.__html,z!=null&&j.push(l(""+z))}}function Ve(j){var z="";return e.Children.forEach(j,function(K){K!=null&&(z+=K)}),z}var tt=u(' selected=""');function ot(j,z,K,re){j.push(Wt(K));var be=K=null,ge;for(ge in z)if(h.call(z,ge)){var Me=z[ge];if(Me!=null)switch(ge){case"children":K=Me;break;case"dangerouslySetInnerHTML":be=Me;break;default:Ie(j,re,ge,Me)}}return j.push(ce),Oe(j,be,K),typeof K=="string"?(j.push(l(O(K))),null):K}var st=u(`
`),wt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ot=new Map;function Wt(j){var z=Ot.get(j);if(z===void 0){if(!wt.test(j))throw Error(t(65,j));z=u("<"+j),Ot.set(j,z)}return z}var an=u("<!DOCTYPE html>");function mn(j,z,K,re,be){switch(z){case"select":j.push(Wt("select"));var ge=null,Me=null;for(vt in K)if(h.call(K,vt)){var _e=K[vt];if(_e!=null)switch(vt){case"children":ge=_e;break;case"dangerouslySetInnerHTML":Me=_e;break;case"defaultValue":case"value":break;default:Ie(j,re,vt,_e)}}return j.push(ce),Oe(j,Me,ge),ge;case"option":Me=be.selectedValue,j.push(Wt("option"));var ft=_e=null,xt=null,vt=null;for(ge in K)if(h.call(K,ge)){var ln=K[ge];if(ln!=null)switch(ge){case"children":_e=ln;break;case"selected":xt=ln;break;case"dangerouslySetInnerHTML":vt=ln;break;case"value":ft=ln;default:Ie(j,re,ge,ln)}}if(Me!=null)if(K=ft!==null?""+ft:Ve(_e),B(Me)){for(re=0;re<Me.length;re++)if(""+Me[re]===K){j.push(tt);break}}else""+Me===K&&j.push(tt);else xt&&j.push(tt);return j.push(ce),Oe(j,vt,_e),_e;case"textarea":j.push(Wt("textarea")),vt=Me=ge=null;for(_e in K)if(h.call(K,_e)&&(ft=K[_e],ft!=null))switch(_e){case"children":vt=ft;break;case"value":ge=ft;break;case"defaultValue":Me=ft;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:Ie(j,re,_e,ft)}if(ge===null&&Me!==null&&(ge=Me),j.push(ce),vt!=null){if(ge!=null)throw Error(t(92));if(B(vt)&&1<vt.length)throw Error(t(93));ge=""+vt}return typeof ge=="string"&&ge[0]===`
`&&j.push(st),ge!==null&&j.push(l(O(""+ge))),null;case"input":j.push(Wt("input")),ft=vt=_e=ge=null;for(Me in K)if(h.call(K,Me)&&(xt=K[Me],xt!=null))switch(Me){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":ft=xt;break;case"defaultValue":_e=xt;break;case"checked":vt=xt;break;case"value":ge=xt;break;default:Ie(j,re,Me,xt)}return vt!==null?Ie(j,re,"checked",vt):ft!==null&&Ie(j,re,"checked",ft),ge!==null?Ie(j,re,"value",ge):_e!==null&&Ie(j,re,"value",_e),j.push(Pe),null;case"menuitem":j.push(Wt("menuitem"));for(var Pr in K)if(h.call(K,Pr)&&(ge=K[Pr],ge!=null))switch(Pr){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:Ie(j,re,Pr,ge)}return j.push(ce),null;case"title":j.push(Wt("title")),ge=null;for(ln in K)if(h.call(K,ln)&&(Me=K[ln],Me!=null))switch(ln){case"children":ge=Me;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:Ie(j,re,ln,Me)}return j.push(ce),ge;case"listing":case"pre":j.push(Wt(z)),Me=ge=null;for(ft in K)if(h.call(K,ft)&&(_e=K[ft],_e!=null))switch(ft){case"children":ge=_e;break;case"dangerouslySetInnerHTML":Me=_e;break;default:Ie(j,re,ft,_e)}if(j.push(ce),Me!=null){if(ge!=null)throw Error(t(60));if(typeof Me!="object"||!("__html"in Me))throw Error(t(61));K=Me.__html,K!=null&&(typeof K=="string"&&0<K.length&&K[0]===`
`?j.push(st,l(K)):j.push(l(""+K)))}return typeof ge=="string"&&ge[0]===`
`&&j.push(st),ge;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":j.push(Wt(z));for(var mo in K)if(h.call(K,mo)&&(ge=K[mo],ge!=null))switch(mo){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,z));default:Ie(j,re,mo,ge)}return j.push(Pe),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return ot(j,K,z,re);case"html":return be.insertionMode===0&&j.push(an),ot(j,K,z,re);default:if(z.indexOf("-")===-1&&typeof K.is!="string")return ot(j,K,z,re);j.push(Wt(z)),Me=ge=null;for(xt in K)if(h.call(K,xt)&&(_e=K[xt],_e!=null))switch(xt){case"children":ge=_e;break;case"dangerouslySetInnerHTML":Me=_e;break;case"style":Ae(j,re,_e);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:b(xt)&&typeof _e!="function"&&typeof _e!="symbol"&&j.push(Te,l(xt),Fe,l(O(_e)),We)}return j.push(ce),Oe(j,Me,ge),ge}}var Fn=u("</"),qe=u(">"),mt=u('<template id="'),Tt=u('"></template>'),Et=u("<!--$-->"),Lt=u('<!--$?--><template id="'),mr=u('"></template>'),gr=u("<!--$!-->"),Aa=u("<!--/$-->"),ao=u("<template"),Zn=u('"'),qr=u(' data-dgst="');u(' data-msg="'),u(' data-stck="');var io=u("></template>");function En(j,z,K){if(o(j,Lt),K===null)throw Error(t(395));return o(j,K),a(j,mr)}var na=u('<div hidden id="'),Dr=u('">'),Ct=u("</div>"),so=u('<svg aria-hidden="true" style="display:none" id="'),lo=u('">'),ra=u("</svg>"),Hn=u('<math aria-hidden="true" style="display:none" id="'),oa=u('">'),Ar=u("</math>"),di=u('<table hidden id="'),Na=u('">'),os=u("</table>"),fi=u('<table hidden><tbody id="'),Du=u('">'),hi=u("</tbody></table>"),al=u('<table hidden><tr id="'),il=u('">'),pi=u("</tr></table>"),Au=u('<table hidden><colgroup id="'),sl=u('">'),ac=u("</colgroup></table>");function Oa(j,z,K,re){switch(K.insertionMode){case 0:case 1:return o(j,na),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,Dr);case 2:return o(j,so),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,lo);case 3:return o(j,Hn),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,oa);case 4:return o(j,di),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,Na);case 5:return o(j,fi),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,Du);case 6:return o(j,al),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,il);case 7:return o(j,Au),o(j,z.segmentPrefix),o(j,l(re.toString(16))),a(j,sl);default:throw Error(t(397))}}function mi(j,z){switch(z.insertionMode){case 0:case 1:return a(j,Ct);case 2:return a(j,ra);case 3:return a(j,Ar);case 4:return a(j,os);case 5:return a(j,hi);case 6:return a(j,pi);case 7:return a(j,ac);default:throw Error(t(397))}}var Nu=u('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),ic=u('$RS("'),as=u('","'),gi=u('")<\/script>'),is=u('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),sc=u('$RC("'),Ou=u('","'),Pu=u('")<\/script>'),sn=u('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),vr=u('$RX("'),ll=u('"'),cl=u(")<\/script>"),vi=u(","),ju=/[<\u2028\u2029]/g;function Pa(j){return JSON.stringify(j).replace(ju,function(z){switch(z){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Lo=Object.assign,$r=Symbol.for("react.element"),ss=Symbol.for("react.portal"),qn=Symbol.for("react.fragment"),lc=Symbol.for("react.strict_mode"),cc=Symbol.for("react.profiler"),uc=Symbol.for("react.provider"),ja=Symbol.for("react.context"),ls=Symbol.for("react.forward_ref"),yi=Symbol.for("react.suspense"),bi=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),J=Symbol.for("react.scope"),oe=Symbol.for("react.debug_trace_mode"),ve=Symbol.for("react.legacy_hidden"),pe=Symbol.for("react.default_value"),Ce=Symbol.iterator;function Ue(j){if(j==null)return null;if(typeof j=="function")return j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case qn:return"Fragment";case ss:return"Portal";case cc:return"Profiler";case lc:return"StrictMode";case yi:return"Suspense";case bi:return"SuspenseList"}if(typeof j=="object")switch(j.$$typeof){case ja:return(j.displayName||"Context")+".Consumer";case uc:return(j._context.displayName||"Context")+".Provider";case ls:var z=j.render;return j=j.displayName,j||(j=z.displayName||z.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case P:return z=j.displayName||null,z!==null?z:Ue(j.type)||"Memo";case U:z=j._payload,j=j._init;try{return Ue(j(z))}catch{}}return null}var $e={};function ht(j,z){if(j=j.contextTypes,!j)return $e;var K={},re;for(re in j)K[re]=z[re];return K}var bt=null;function tn(j,z){if(j!==z){j.context._currentValue=j.parentValue,j=j.parent;var K=z.parent;if(j===null){if(K!==null)throw Error(t(401))}else{if(K===null)throw Error(t(401));tn(j,K)}z.context._currentValue=z.value}}function co(j){j.context._currentValue=j.parentValue,j=j.parent,j!==null&&co(j)}function uo(j){var z=j.parent;z!==null&&uo(z),j.context._currentValue=j.value}function Nr(j,z){if(j.context._currentValue=j.parentValue,j=j.parent,j===null)throw Error(t(402));j.depth===z.depth?tn(j,z):Nr(j,z)}function La(j,z){var K=z.parent;if(K===null)throw Error(t(402));j.depth===K.depth?tn(j,K):La(j,K),z.context._currentValue=z.value}function fo(j){var z=bt;z!==j&&(z===null?uo(j):j===null?co(z):z.depth===j.depth?tn(z,j):z.depth>j.depth?Nr(z,j):La(z,j),bt=j)}var ho={isMounted:function(){return!1},enqueueSetState:function(j,z){j=j._reactInternals,j.queue!==null&&j.queue.push(z)},enqueueReplaceState:function(j,z){j=j._reactInternals,j.replace=!0,j.queue=[z]},enqueueForceUpdate:function(){}};function Or(j,z,K,re){var be=j.state!==void 0?j.state:null;j.updater=ho,j.props=K,j.state=be;var ge={queue:[],replace:!1};j._reactInternals=ge;var Me=z.contextType;if(j.context=typeof Me=="object"&&Me!==null?Me._currentValue:re,Me=z.getDerivedStateFromProps,typeof Me=="function"&&(Me=Me(K,be),be=Me==null?be:Lo({},be,Me),j.state=be),typeof z.getDerivedStateFromProps!="function"&&typeof j.getSnapshotBeforeUpdate!="function"&&(typeof j.UNSAFE_componentWillMount=="function"||typeof j.componentWillMount=="function"))if(z=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),z!==j.state&&ho.enqueueReplaceState(j,j.state,null),ge.queue!==null&&0<ge.queue.length)if(z=ge.queue,Me=ge.replace,ge.queue=null,ge.replace=!1,Me&&z.length===1)j.state=z[0];else{for(ge=Me?z[0]:j.state,be=!0,Me=Me?1:0;Me<z.length;Me++){var _e=z[Me];_e=typeof _e=="function"?_e.call(j,ge,K,re):_e,_e!=null&&(be?(be=!1,ge=Lo({},ge,_e)):Lo(ge,_e))}j.state=ge}else ge.queue=null}var Ro={id:1,overflow:""};function po(j,z,K){var re=j.id;j=j.overflow;var be=32-wi(re)-1;re&=~(1<<be),K+=1;var ge=32-wi(z)+be;if(30<ge){var Me=be-be%5;return ge=(re&(1<<Me)-1).toString(32),re>>=Me,be-=Me,{id:1<<32-wi(z)+be|K<<be|re,overflow:ge+j}}return{id:1<<ge|K<<be|re,overflow:j}}var wi=Math.clz32?Math.clz32:qg,Si=Math.log,FS=Math.LN2;function qg(j){return j>>>=0,j===0?32:31-(Si(j)/FS|0)|0}function dc(j,z){return j===z&&(j!==0||1/j===1/z)||j!==j&&z!==z}var HS=typeof Object.is=="function"?Object.is:dc,aa=null,ul=null,fc=null,nn=null,Ra=!1,Ti=!1,ia=0,Fo=null,Lu=0;function cs(){if(aa===null)throw Error(t(321));return aa}function Ru(){if(0<Lu)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function dl(){return nn===null?fc===null?(Ra=!1,fc=nn=Ru()):(Ra=!0,nn=fc):nn.next===null?(Ra=!1,nn=nn.next=Ru()):(Ra=!0,nn=nn.next),nn}function hc(){ul=aa=null,Ti=!1,fc=null,Lu=0,nn=Fo=null}function ch(j,z){return typeof z=="function"?z(j):z}function Fa(j,z,K){if(aa=cs(),nn=dl(),Ra){var re=nn.queue;if(z=re.dispatch,Fo!==null&&(K=Fo.get(re),K!==void 0)){Fo.delete(re),re=nn.memoizedState;do re=j(re,K.action),K=K.next;while(K!==null);return nn.memoizedState=re,[re,z]}return[nn.memoizedState,z]}return j=j===ch?typeof z=="function"?z():z:K!==void 0?K(z):z,nn.memoizedState=j,j=nn.queue={last:null,dispatch:null},j=j.dispatch=Hu.bind(null,aa,j),[nn.memoizedState,j]}function Fu(j,z){if(aa=cs(),nn=dl(),z=z===void 0?null:z,nn!==null){var K=nn.memoizedState;if(K!==null&&z!==null){var re=K[1];e:if(re===null)re=!1;else{for(var be=0;be<re.length&&be<z.length;be++)if(!HS(z[be],re[be])){re=!1;break e}re=!0}if(re)return K[0]}}return j=j(),nn.memoizedState=[j,z],j}function Hu(j,z,K){if(25<=Lu)throw Error(t(301));if(j===aa)if(Ti=!0,j={action:K,next:null},Fo===null&&(Fo=new Map),K=Fo.get(z),K===void 0)Fo.set(z,j);else{for(z=K;z.next!==null;)z=z.next;z.next=j}}function $g(){throw Error(t(394))}function us(){}var pc={readContext:function(j){return j._currentValue},useContext:function(j){return cs(),j._currentValue},useMemo:Fu,useReducer:Fa,useRef:function(j){aa=cs(),nn=dl();var z=nn.memoizedState;return z===null?(j={current:j},nn.memoizedState=j):z},useState:function(j){return Fa(ch,j)},useInsertionEffect:us,useLayoutEffect:function(){},useCallback:function(j,z){return Fu(function(){return j},z)},useImperativeHandle:us,useEffect:us,useDebugValue:us,useDeferredValue:function(j){return cs(),j},useTransition:function(){return cs(),[!1,$g]},useId:function(){var j=ul.treeContext,z=j.overflow;j=j.id,j=(j&~(1<<32-wi(j)-1)).toString(32)+z;var K=mc;if(K===null)throw Error(t(404));return z=ia++,j=":"+K.idPrefix+"R"+j,0<z&&(j+="H"+z.toString(32)),j+":"},useMutableSource:function(j,z){return cs(),z(j._source)},useSyncExternalStore:function(j,z,K){if(K===void 0)throw Error(t(407));return K()}},mc=null,yr=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function fl(j){return console.error(j),null}function ds(){}function gc(j,z,K,re,be,ge,Me,_e,ft){var xt=[],vt=new Set;return z={destination:null,responseState:z,progressiveChunkSize:re===void 0?12800:re,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:vt,pingedTasks:xt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:be===void 0?fl:be,onAllReady:ge===void 0?ds:ge,onShellReady:Me===void 0?ds:Me,onShellError:_e===void 0?ds:_e,onFatalError:ft===void 0?ds:ft},K=hl(z,0,null,K,!1,!1),K.parentFlushed=!0,j=uh(z,j,null,K,vt,$e,null,Ro),xt.push(j),z}function uh(j,z,K,re,be,ge,Me,_e){j.allPendingTasks++,K===null?j.pendingRootTasks++:K.pendingTasks++;var ft={node:z,ping:function(){var xt=j.pingedTasks;xt.push(ft),xt.length===1&&ph(j)},blockedBoundary:K,blockedSegment:re,abortSet:be,legacyContext:ge,context:Me,treeContext:_e};return be.add(ft),ft}function hl(j,z,K,re,be,ge){return{status:0,id:-1,index:z,parentFlushed:!1,chunks:[],children:[],formatContext:re,boundary:K,lastPushedText:be,textEmbedded:ge}}function fs(j,z){if(j=j.onError(z),j!=null&&typeof j!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof j+'" instead');return j}function xi(j,z){var K=j.onShellError;K(z),K=j.onFatalError,K(z),j.destination!==null?(j.status=2,f(j.destination,z)):(j.status=1,j.fatalError=z)}function vc(j,z,K,re,be){for(aa={},ul=z,ia=0,j=K(re,be);Ti;)Ti=!1,ia=0,Lu+=1,nn=null,j=K(re,be);return hc(),j}function dh(j,z,K,re){var be=K.render(),ge=re.childContextTypes;if(ge!=null){var Me=z.legacyContext;if(typeof K.getChildContext!="function")re=Me;else{K=K.getChildContext();for(var _e in K)if(!(_e in ge))throw Error(t(108,Ue(re)||"Unknown",_e));re=Lo({},Me,K)}z.legacyContext=re,Kr(j,z,be),z.legacyContext=Me}else Kr(j,z,be)}function Kg(j,z){if(j&&j.defaultProps){z=Lo({},z),j=j.defaultProps;for(var K in j)z[K]===void 0&&(z[K]=j[K]);return z}return z}function fh(j,z,K,re,be){if(typeof K=="function")if(K.prototype&&K.prototype.isReactComponent){be=ht(K,z.legacyContext);var ge=K.contextType;ge=new K(re,typeof ge=="object"&&ge!==null?ge._currentValue:be),Or(ge,K,re,be),dh(j,z,ge,K)}else{ge=ht(K,z.legacyContext),be=vc(j,z,K,re,ge);var Me=ia!==0;if(typeof be=="object"&&be!==null&&typeof be.render=="function"&&be.$$typeof===void 0)Or(be,K,re,ge),dh(j,z,be,K);else if(Me){re=z.treeContext,z.treeContext=po(re,1,0);try{Kr(j,z,be)}finally{z.treeContext=re}}else Kr(j,z,be)}else if(typeof K=="string"){switch(be=z.blockedSegment,ge=mn(be.chunks,K,re,j.responseState,be.formatContext),be.lastPushedText=!1,Me=be.formatContext,be.formatContext=X(Me,K,re),hh(j,z,ge),be.formatContext=Me,K){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:be.chunks.push(Fn,l(K),qe)}be.lastPushedText=!1}else{switch(K){case ve:case oe:case lc:case cc:case qn:Kr(j,z,re.children);return;case bi:Kr(j,z,re.children);return;case J:throw Error(t(343));case yi:e:{K=z.blockedBoundary,be=z.blockedSegment,ge=re.fallback,re=re.children,Me=new Set;var _e={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Me,errorDigest:null},ft=hl(j,be.chunks.length,_e,be.formatContext,!1,!1);be.children.push(ft),be.lastPushedText=!1;var xt=hl(j,0,null,be.formatContext,!1,!1);xt.parentFlushed=!0,z.blockedBoundary=_e,z.blockedSegment=xt;try{if(hh(j,z,re),xt.lastPushedText&&xt.textEmbedded&&xt.chunks.push(ee),xt.status=1,_u(_e,xt),_e.pendingTasks===0)break e}catch(vt){xt.status=4,_e.forceClientRender=!0,_e.errorDigest=fs(j,vt)}finally{z.blockedBoundary=K,z.blockedSegment=be}z=uh(j,ge,K,ft,Me,z.legacyContext,z.context,z.treeContext),j.pingedTasks.push(z)}return}if(typeof K=="object"&&K!==null)switch(K.$$typeof){case ls:if(re=vc(j,z,K.render,re,be),ia!==0){K=z.treeContext,z.treeContext=po(K,1,0);try{Kr(j,z,re)}finally{z.treeContext=K}}else Kr(j,z,re);return;case P:K=K.type,re=Kg(K,re),fh(j,z,K,re,be);return;case uc:if(be=re.children,K=K._context,re=re.value,ge=K._currentValue,K._currentValue=re,Me=bt,bt=re={parent:Me,depth:Me===null?0:Me.depth+1,context:K,parentValue:ge,value:re},z.context=re,Kr(j,z,be),j=bt,j===null)throw Error(t(403));re=j.parentValue,j.context._currentValue=re===pe?j.context._defaultValue:re,j=bt=j.parent,z.context=j;return;case ja:re=re.children,re=re(K._currentValue),Kr(j,z,re);return;case U:be=K._init,K=be(K._payload),re=Kg(K,re),fh(j,z,K,re,void 0);return}throw Error(t(130,K==null?K:typeof K,""))}}function Kr(j,z,K){if(z.node=K,typeof K=="object"&&K!==null){switch(K.$$typeof){case $r:fh(j,z,K.type,K.props,K.ref);return;case ss:throw Error(t(257));case U:var re=K._init;K=re(K._payload),Kr(j,z,K);return}if(B(K)){Bu(j,z,K);return}if(K===null||typeof K!="object"?re=null:(re=Ce&&K[Ce]||K["@@iterator"],re=typeof re=="function"?re:null),re&&(re=re.call(K))){if(K=re.next(),!K.done){var be=[];do be.push(K.value),K=re.next();while(!K.done);Bu(j,z,be)}return}throw j=Object.prototype.toString.call(K),Error(t(31,j==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":j))}typeof K=="string"?(re=z.blockedSegment,re.lastPushedText=ie(z.blockedSegment.chunks,K,j.responseState,re.lastPushedText)):typeof K=="number"&&(re=z.blockedSegment,re.lastPushedText=ie(z.blockedSegment.chunks,""+K,j.responseState,re.lastPushedText))}function Bu(j,z,K){for(var re=K.length,be=0;be<re;be++){var ge=z.treeContext;z.treeContext=po(ge,re,be);try{hh(j,z,K[be])}finally{z.treeContext=ge}}}function hh(j,z,K){var re=z.blockedSegment.formatContext,be=z.legacyContext,ge=z.context;try{return Kr(j,z,K)}catch(ft){if(hc(),typeof ft=="object"&&ft!==null&&typeof ft.then=="function"){K=ft;var Me=z.blockedSegment,_e=hl(j,Me.chunks.length,null,Me.formatContext,Me.lastPushedText,!0);Me.children.push(_e),Me.lastPushedText=!1,j=uh(j,z.node,z.blockedBoundary,_e,z.abortSet,z.legacyContext,z.context,z.treeContext).ping,K.then(j,j),z.blockedSegment.formatContext=re,z.legacyContext=be,z.context=ge,fo(ge)}else throw z.blockedSegment.formatContext=re,z.legacyContext=be,z.context=ge,fo(ge),ft}}function BS(j){var z=j.blockedBoundary;j=j.blockedSegment,j.status=3,Xg(this,z,j)}function Jg(j,z,K){var re=j.blockedBoundary;j.blockedSegment.status=3,re===null?(z.allPendingTasks--,z.status!==2&&(z.status=2,z.destination!==null&&z.destination.close())):(re.pendingTasks--,re.forceClientRender||(re.forceClientRender=!0,j=K===void 0?Error(t(432)):K,re.errorDigest=z.onError(j),re.parentFlushed&&z.clientRenderedBoundaries.push(re)),re.fallbackAbortableTasks.forEach(function(be){return Jg(be,z,K)}),re.fallbackAbortableTasks.clear(),z.allPendingTasks--,z.allPendingTasks===0&&(re=z.onAllReady,re()))}function _u(j,z){if(z.chunks.length===0&&z.children.length===1&&z.children[0].boundary===null){var K=z.children[0];K.id=z.id,K.parentFlushed=!0,K.status===1&&_u(j,K)}else j.completedSegments.push(z)}function Xg(j,z,K){if(z===null){if(K.parentFlushed){if(j.completedRootSegment!==null)throw Error(t(389));j.completedRootSegment=K}j.pendingRootTasks--,j.pendingRootTasks===0&&(j.onShellError=ds,z=j.onShellReady,z())}else z.pendingTasks--,z.forceClientRender||(z.pendingTasks===0?(K.parentFlushed&&K.status===1&&_u(z,K),z.parentFlushed&&j.completedBoundaries.push(z),z.fallbackAbortableTasks.forEach(BS,j),z.fallbackAbortableTasks.clear()):K.parentFlushed&&K.status===1&&(_u(z,K),z.completedSegments.length===1&&z.parentFlushed&&j.partialBoundaries.push(z)));j.allPendingTasks--,j.allPendingTasks===0&&(j=j.onAllReady,j())}function ph(j){if(j.status!==2){var z=bt,K=yr.current;yr.current=pc;var re=mc;mc=j.responseState;try{var be=j.pingedTasks,ge;for(ge=0;ge<be.length;ge++){var Me=be[ge],_e=j,ft=Me.blockedSegment;if(ft.status===0){fo(Me.context);try{Kr(_e,Me,Me.node),ft.lastPushedText&&ft.textEmbedded&&ft.chunks.push(ee),Me.abortSet.delete(Me),ft.status=1,Xg(_e,Me.blockedBoundary,ft)}catch(go){if(hc(),typeof go=="object"&&go!==null&&typeof go.then=="function"){var xt=Me.ping;go.then(xt,xt)}else{Me.abortSet.delete(Me),ft.status=4;var vt=Me.blockedBoundary,ln=go,Pr=fs(_e,ln);if(vt===null?xi(_e,ln):(vt.pendingTasks--,vt.forceClientRender||(vt.forceClientRender=!0,vt.errorDigest=Pr,vt.parentFlushed&&_e.clientRenderedBoundaries.push(vt))),_e.allPendingTasks--,_e.allPendingTasks===0){var mo=_e.onAllReady;mo()}}}}}be.splice(0,ge),j.destination!==null&&mh(j,j.destination)}catch(go){fs(j,go),xi(j,go)}finally{mc=re,yr.current=K,K===pc&&fo(z)}}}function Yu(j,z,K){switch(K.parentFlushed=!0,K.status){case 0:var re=K.id=j.nextSegmentId++;return K.lastPushedText=!1,K.textEmbedded=!1,j=j.responseState,o(z,mt),o(z,j.placeholderPrefix),j=l(re.toString(16)),o(z,j),a(z,Tt);case 1:K.status=2;var be=!0;re=K.chunks;var ge=0;K=K.children;for(var Me=0;Me<K.length;Me++){for(be=K[Me];ge<be.index;ge++)o(z,re[ge]);be=zu(j,z,be)}for(;ge<re.length-1;ge++)o(z,re[ge]);return ge<re.length&&(be=a(z,re[ge])),be;default:throw Error(t(390))}}function zu(j,z,K){var re=K.boundary;if(re===null)return Yu(j,z,K);if(re.parentFlushed=!0,re.forceClientRender)re=re.errorDigest,a(z,gr),o(z,ao),re&&(o(z,qr),o(z,l(O(re))),o(z,Zn)),a(z,io),Yu(j,z,K);else if(0<re.pendingTasks){re.rootSegmentID=j.nextSegmentId++,0<re.completedSegments.length&&j.partialBoundaries.push(re);var be=j.responseState,ge=be.nextSuspenseID++;be=u(be.boundaryPrefix+ge.toString(16)),re=re.id=be,En(z,j.responseState,re),Yu(j,z,K)}else if(re.byteSize>j.progressiveChunkSize)re.rootSegmentID=j.nextSegmentId++,j.completedBoundaries.push(re),En(z,j.responseState,re.id),Yu(j,z,K);else{if(a(z,Et),K=re.completedSegments,K.length!==1)throw Error(t(391));zu(j,z,K[0])}return a(z,Aa)}function Qg(j,z,K){return Oa(z,j.responseState,K.formatContext,K.id),zu(j,z,K),mi(z,K.formatContext)}function ev(j,z,K){for(var re=K.completedSegments,be=0;be<re.length;be++)Uu(j,z,K,re[be]);if(re.length=0,j=j.responseState,re=K.id,K=K.rootSegmentID,o(z,j.startInlineScript),j.sentCompleteBoundaryFunction?o(z,sc):(j.sentCompleteBoundaryFunction=!0,o(z,is)),re===null)throw Error(t(395));return K=l(K.toString(16)),o(z,re),o(z,Ou),o(z,j.segmentPrefix),o(z,K),a(z,Pu)}function Uu(j,z,K,re){if(re.status===2)return!0;var be=re.id;if(be===-1){if((re.id=K.rootSegmentID)===-1)throw Error(t(392));return Qg(j,z,re)}return Qg(j,z,re),j=j.responseState,o(z,j.startInlineScript),j.sentCompleteSegmentFunction?o(z,ic):(j.sentCompleteSegmentFunction=!0,o(z,Nu)),o(z,j.segmentPrefix),be=l(be.toString(16)),o(z,be),o(z,as),o(z,j.placeholderPrefix),o(z,be),a(z,gi)}function mh(j,z){n=new Uint8Array(512),r=0;try{var K=j.completedRootSegment;if(K!==null&&j.pendingRootTasks===0){zu(j,z,K),j.completedRootSegment=null;var re=j.responseState.bootstrapChunks;for(K=0;K<re.length-1;K++)o(z,re[K]);K<re.length&&a(z,re[K])}var be=j.clientRenderedBoundaries,ge;for(ge=0;ge<be.length;ge++){var Me=be[ge];re=z;var _e=j.responseState,ft=Me.id,xt=Me.errorDigest,vt=Me.errorMessage,ln=Me.errorComponentStack;if(o(re,_e.startInlineScript),_e.sentClientRenderFunction?o(re,vr):(_e.sentClientRenderFunction=!0,o(re,sn)),ft===null)throw Error(t(395));o(re,ft),o(re,ll),(xt||vt||ln)&&(o(re,vi),o(re,l(Pa(xt||"")))),(vt||ln)&&(o(re,vi),o(re,l(Pa(vt||"")))),ln&&(o(re,vi),o(re,l(Pa(ln)))),a(re,cl)}be.splice(0,ge);var Pr=j.completedBoundaries;for(ge=0;ge<Pr.length;ge++)ev(j,z,Pr[ge]);Pr.splice(0,ge),i(z),n=new Uint8Array(512),r=0;var mo=j.partialBoundaries;for(ge=0;ge<mo.length;ge++){var go=mo[ge];e:{be=j,Me=z;var yc=go.completedSegments;for(_e=0;_e<yc.length;_e++)if(!Uu(be,Me,go,yc[_e])){_e++,yc.splice(0,_e);var gh=!1;break e}yc.splice(0,_e),gh=!0}if(!gh){j.destination=null,ge++,mo.splice(0,ge);return}}mo.splice(0,ge);var Ii=j.completedBoundaries;for(ge=0;ge<Ii.length;ge++)ev(j,z,Ii[ge]);Ii.splice(0,ge)}finally{i(z),j.allPendingTasks===0&&j.pingedTasks.length===0&&j.clientRenderedBoundaries.length===0&&j.completedBoundaries.length===0&&z.close()}}function tv(j,z){try{var K=j.abortableTasks;K.forEach(function(re){return Jg(re,j,z)}),K.clear(),j.destination!==null&&mh(j,j.destination)}catch(re){fs(j,re),xi(j,re)}}return wy.renderToReadableStream=function(j,z){return new Promise(function(K,re){var be,ge,Me=new Promise(function(vt,ln){ge=vt,be=ln}),_e=gc(j,Q(z?z.identifierPrefix:void 0,z?z.nonce:void 0,z?z.bootstrapScriptContent:void 0,z?z.bootstrapScripts:void 0,z?z.bootstrapModules:void 0),G(z?z.namespaceURI:void 0),z?z.progressiveChunkSize:void 0,z?z.onError:void 0,ge,function(){var vt=new ReadableStream({type:"bytes",pull:function(ln){if(_e.status===1)_e.status=2,f(ln,_e.fatalError);else if(_e.status!==2&&_e.destination===null){_e.destination=ln;try{mh(_e,ln)}catch(Pr){fs(_e,Pr),xi(_e,Pr)}}},cancel:function(){tv(_e)}},{highWaterMark:0});vt.allReady=Me,K(vt)},function(vt){Me.catch(function(){}),re(vt)},be);if(z&&z.signal){var ft=z.signal,xt=function(){tv(_e,ft.reason),ft.removeEventListener("abort",xt)};ft.addEventListener("abort",xt)}ph(_e)})},wy.version="18.2.0",wy}var th,w_;th=P4e();w_=j4e();th.version;th.renderToString;var L4e=th.renderToStaticMarkup;th.renderToNodeStream;th.renderToStaticNodeStream;w_.renderToReadableStream;const S_=de.oneOf(["top","right","bottom","left","bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned","top-left-aligned","top-middle-aligned","top-right-aligned","auto"]),T_=de.oneOf(["top-middle","top-left","top-right","bottom-left","bottom-right","bottom-middle","middle-left","middle-right","middle-middle"]),x_=de.shape({nextLabel:de.string,prevLabel:de.string,skipLabel:de.string,doneLabel:de.string,hidePrev:de.bool,hideNext:de.bool,tooltipPosition:S_,tooltipClass:de.string,highlightClass:de.string,exitOnEsc:de.bool,exitOnOverlayClick:de.bool,showStepNumbers:de.bool,keyboardNavigation:de.bool,showButtons:de.bool,showBullets:de.bool,showProgress:de.bool,scrollToElement:de.bool,overlayOpacity:de.number,scrollPadding:de.number,positionPrecedence:de.arrayOf(de.string),disableInteraction:de.bool,hintPosition:T_,hintButtonLabel:de.string,hintAnimation:de.bool}),I_={hidePrev:!0,hideNext:!0};function k_(){return typeof window>"u"}class R4e extends D.Component{static propTypes={enabled:de.bool,initialStep:de.number.isRequired,steps:de.arrayOf(de.shape({element:de.oneOfType([de.string,typeof Element>"u"?de.any:de.instanceOf(Element)]),intro:de.node.isRequired,position:S_,tooltipClass:de.string,highlightClass:de.string})).isRequired,onStart:de.func,onExit:de.func.isRequired,onBeforeExit:de.func,onBeforeChange:de.func,onAfterChange:de.func,onChange:de.func,onPreventChange:de.func,onComplete:de.func,options:x_};static defaultProps={enabled:!1,onStart:null,onBeforeExit:null,onBeforeChange:null,onAfterChange:null,onChange:null,onPreventChange:null,onComplete:null,options:I_};constructor(t){super(t),this.introJs=null,this.isConfigured=!1,this.isVisible=!1,this.installIntroJs()}componentDidMount(){this.props.enabled&&(this.configureIntroJs(),this.renderSteps())}componentDidUpdate(t){const{enabled:n,steps:r,options:o}=this.props;(!this.isConfigured||t.steps!==r||t.options!==o)&&(this.configureIntroJs(),this.renderSteps()),t.enabled!==n&&this.renderSteps()}componentWillUnmount(){this.introJs.exit()}onExit=()=>{const{onExit:t}=this.props;this.isVisible=!1,t(this.introJs._currentStep)};onBeforeExit=()=>{const{onBeforeExit:t}=this.props;return t?t(this.introJs._currentStep):!0};onBeforeChange=t=>{if(!this.isVisible)return!0;const{onBeforeChange:n,onPreventChange:r}=this.props;if(n){const o=n(this.introJs._currentStep,t);return o===!1&&r&&setTimeout(()=>{r(this.introJs._currentStep)},0),o}return!0};onAfterChange=t=>{if(!this.isVisible)return;const{onAfterChange:n}=this.props;n&&n(this.introJs._currentStep,t)};onChange=t=>{if(!this.isVisible)return;const{onChange:n}=this.props;n&&n(this.introJs._currentStep,t)};onComplete=()=>{const{onComplete:t}=this.props;t&&t()};updateStepElement=t=>{const n=document.querySelector(this.introJs._options.steps[t].element);n&&(this.introJs._introItems[t].element=n,this.introJs._introItems[t].position=this.introJs._options.steps[t].position||"auto")};installIntroJs(){k_()||(this.introJs=qb(),this.introJs.onexit(this.onExit),this.introJs.onbeforeexit(this.onBeforeExit),this.introJs.onbeforechange(this.onBeforeChange),this.introJs.onafterchange(this.onAfterChange),this.introJs.onchange(this.onChange),this.introJs.oncomplete(this.onComplete))}configureIntroJs(){const{options:t,steps:n}=this.props,r=n.map(o=>D.isValidElement(o.intro)?{...o,intro:L4e(o.intro)}:o);this.introJs.setOptions({...t,steps:r}),this.isConfigured=!0}renderSteps(){const{enabled:t,initialStep:n,steps:r,onStart:o}=this.props;t&&r.length>0&&!this.isVisible?(this.introJs.start(),this.isVisible=!0,this.introJs.goToStepNumber(n+1),o&&o(this.introJs._currentStep)):!t&&this.isVisible&&(this.isVisible=!1,this.introJs.exit())}render(){return null}}class PKe extends D.Component{static propTypes={enabled:de.bool,hints:de.arrayOf(de.shape({element:de.string.isRequired,hint:de.string.isRequired,hintPosition:T_})).isRequired,onClick:de.func,onClose:de.func,options:x_};static defaultProps={enabled:!1,onClick:null,onClose:null,options:I_};constructor(t){super(t),this.introJs=null,this.isConfigured=!1,this.installIntroJs()}componentDidMount(){this.props.enabled&&(this.configureIntroJs(),this.renderHints())}componentDidUpdate(t){const{enabled:n,hints:r,options:o}=this.props;(!this.isConfigured||t.hints!==r||t.options!==o)&&(this.configureIntroJs(),this.renderHints()),t.enabled!==n&&this.renderHints()}componentWillUnmount(){this.introJs.hideHints()}installIntroJs(){if(k_())return;this.introJs=qb();const{onClick:t,onClose:n}=this.props;t&&this.introJs.onhintclick(t),n&&this.introJs.onhintclose(n)}configureIntroJs(){const{options:t,hints:n}=this.props;this.introJs.removeHints(),this.introJs.setOptions({...t,hints:n}),this.isConfigured=!0}renderHints(){const{enabled:t,hints:n}=this.props;t&&n.length>0?this.introJs.showHints():t||this.introJs.hideHints()}render(){return null}}const F4e=[{element:".left-sidebar",intro:I("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:I("Click here and go to settings page.")},{element:".path-entry-wrapper",intro:I("Click here and go to different path.")},{element:".queries-wrapper",intro:I("Select or create query filter here.")},{element:".status-text-container.sidebar",intro:I("See the status of Thinos here.")+I("It is not available on small view")},{element:".heatmap-default",intro:I("See your time status of thinos here.")},{element:".tags-wrapper",intro:I("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:I("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:I("Edit or create your thino here.")},{element:".memolist-wrapper",intro:I("See your thinos here.")}],H4e=[{element:".memos-sidebar-wrapper.left-sidebar",intro:I("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:I("Click here and go to settings page.")},{element:".heatmap-default",intro:I("See your time status of thinos here.")},{element:".path-entry-wrapper",intro:I("Click here and go to different path.")},{element:".queries-wrapper",intro:I("Select or create query filter here.")},{element:".tags-wrapper",intro:I("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:I("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:I("Edit or create your thino here.")},{element:".memolist-wrapper",intro:I("See your thinos here.")}],B4e={nextLabel:I("Next"),prevLabel:I("Previous"),doneLabel:I("Done"),hideNext:!1},_4e=(e,t)=>{D.useEffect(()=>{if(!e.needVerify){Ge.setLocked(!1);return}Ge.setLocked(!0)},[e?.needVerify]),D.useEffect(()=>{(async()=>{const r=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),o=A.Platform.isDesktop?await pn():r?.identifier||r?.uuid;!t||t?.appId!==o?document.body.toggleClass("hide-pro",!0):document.body.toggleClass("hide-pro",!1)})()},[t])},Y4e=({settings:e,exited:t,isMobileView:n})=>{const r=D.useRef(null),o=()=>{Ge.setExitSteps(!1)},a=i=>{n&&(e?.DefaultThemeForThino==="classic"&&i===6||e?.DefaultThemeForThino==="modern"&&i===7)&&Ge.setShowSiderbarInMobileView(!1)};return g.jsx(R4e,{ref:r,enabled:t,steps:e?.DefaultThemeForThino==="modern"?F4e:H4e,initialStep:0,onExit:o,options:B4e,onBeforeChange:a})},z4e=({settings:e,pathname:t,isMobileView:n,memoListView:r,sectionRef:o})=>{const a=e?.DefaultThemeForThino==="modern",i=`memos-${t==="/"?r:"list"}-view`,s=!a||n?"classic":"modern";return g.jsxs("section",{ref:o,id:"page-wrapper","data-path":t,className:qt(i,s),children:[g.jsx(H4,{sidebarPosition:"left",className:"left-sidebar"}),g.jsx("main",{className:"content-wrapper",children:gqe(t)}),a&&!n&&g.jsx(H4,{sidebarPosition:"right",className:"right-sidebar"})]})};function U4e(){const{dailyNotesState:{settings:e,verifyState:t},locationState:{pathname:n},globalState:{isMobileView:r,memoListView:o,globalEditorShown:a,locked:i,exited:s}}=D.useContext(it),l=D.useRef(null),u=e?.FirstLoaded||app.plugins.getPlugin("obsidian-memos").settings?.FirstLoaded;return _4e(e,t),u?g.jsx(I4e,{}):g.jsxs(g.Fragment,{children:[g.jsx(Y4e,{settings:e,exited:s,isMobileView:r}),i&&g.jsx(x4e,{}),!i&&a&&g.jsx(Kc,{editorType:"block"}),!i&&!a&&g.jsx(z4e,{settings:e,pathname:n,isMobileView:r,memoListView:o,sectionRef:l})]})}const V4e={"*":g.jsx(U4e,{})},W4e=e=>{const{memo:t,handleDeletedMemoAction:n}=e,{dailyNotesState:r}=D.useContext(it),o={...t,createdAtStr:je.getDateTimeString(t.createdAt),deletedAtStr:je.getDateTimeString(t.deletedAt||t.createdAt)},a=_.useRef(null),i=_.useRef(null),[s,l]=_.useState(""),u=D.useRef(null);D.useEffect(()=>{!i||!u.current||A.setIcon(u.current,"more-horizontal")},[i]),D.useEffect(()=>{if(!a.current||!i.current||a.current.hasChildNodes()&&t.content===s||!r.view)return;const w=r.view;l(t.content),a.current.hasChildNodes()&&a.current.empty();async function b(){await A.MarkdownRenderer.render(r.app,t.content+`
`,a.current,t.path,w),a.current?.querySelectorAll(".internal-link")?.forEach(S=>{const x=S,E=x.getAttribute("data-href");if(!E)return;r.app.metadataCache.getFirstLinkpathDest(E,t.path)||S.classList.add("is-unresolved"),x.addEventListener("mouseover",M=>{M.stopPropagation(),r.app.workspace.trigger("hover-link",{event:M,source:"thino",hoverParent:w.containerEl,targetEl:x,linktext:E,sourcePath:x.href})})})}b()},[t.content,i]);const f=async()=>{try{await le.deleteMemoById(o.id),n(o.id)}catch(w){new A.Notice(w.message)}},h=async()=>{switch(o.sourceType){case"DAILY":await lC(o.id,o.path);break;case"CANVAS":await uC(o.id,o.path);break;case"MULTI":await sC(o.path);break;case"FILE":await cC(o.id,o.path);break}},p=async()=>{try{const w=await le.restoreMemoById(o.id),y=r.app?.loadLocalStorage("tokenForSync");w&&w.webId&&y&&r.settings.startSync&&await Vp(w.webId),w&&le.editMemo(w),n(o.id),new A.Notice(I("RESTORE SUCCEED"))}catch(w){new A.Notice(w.message)}},m=w=>{w.stopPropagation();const b=new A.Menu;b.addItem(y=>{y.setTitle(I("RESTORE")).setIcon("archive-restore").onClick(p)}),b.addItem(y=>{y.setTitle(I("SOURCE")).setIcon("home").onClick(h)}),b.addItem(y=>{y.setTitle(I("DELETE")).setIcon("trash").setWarning(!0).onClick(()=>{const S=new A.Menu;S.addItem(x=>{x.setTitle(I("CONFIRM!")).setIcon("trash").setWarning(!0).onClick(f)}),S.addItem(x=>{x.setTitle(I("Cancel")).setIcon("x").onClick(()=>{})}),S.showAtMouseEvent(w.nativeEvent)})}),b.showAtMouseEvent(w.nativeEvent)};return g.jsxs("div",{ref:i,className:`memo-wrapper ${"memos-"+o.id}`,children:[g.jsxs("div",{className:"memo-top-wrapper",children:[g.jsxs("span",{className:"time-text",children:[I("DELETE AT")," ",o.deletedAtStr]}),g.jsx("div",{className:"btns-container",children:g.jsx("span",{ref:u,className:"btn more-action-btn",onClick:m})})]}),g.jsx("div",{ref:a,className:"memo-content-text",onContextMenu:w=>{w.preventDefault(),w.stopPropagation()}})]})},xD=({isLoading:e,isEmpty:t,emptyMessage:n=I("Here is No Memos.")})=>e?g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:I("Fetching data...")})}):t?g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:n})}):null,G4e=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n},dailyNotesState:{app:r,plugin:o}}=D.useContext(it),a=Ql(),[i,s]=D.useState([]),l=_.useRef(null),u=_.useRef(null);D.useEffect(()=>{u.current&&A.setIcon(u.current,"more-horizontal")},[u]),D.useEffect(()=>{_l({memos:n,query:e,filterOptions:{filterDoneTasks:!1,onlyFilterType:"deleted"},plugin:o}).then(b=>{s(b)}),a.setFinish()},[n,l.current,e]);const f=D.useCallback(b=>{s(y=>y.filter(S=>S.id!==b))},[]),h=async()=>{if(!(i?.length>0))return;if(!await Bi()){It();return}const b=[...i],y=Ze.getState().settings.startSync,S=r?.loadLocalStorage("tokenForSync");try{const x=b.filter(M=>M.sourceType==="DAILY"),E=b.filter(M=>M.sourceType!=="DAILY");for(const M of E){const k=await le.restoreMemoById(M.id);k&&k.webId&&S&&y&&await Vp(k.webId),k&&le.editMemo(k)}const C=Cs(x);for(const{path:M,thinos:k}of C){const O=await le.dealWithDailyThinoBulk(M,k,"restoreFromDelete");for(const F of O)F&&F.webId&&S&&y&&await Vp(F.webId)}Ye.clearQuery(),new A.Notice(I("RESTORE SUCCEED"))}catch(x){new A.Notice(x.message)}},p=async()=>{if(!(i?.length>0))return;if(!await Bi()){It();return}const b=[...i],y=Ze.getState().settings,S=r?.loadLocalStorage("tokenForSync");try{const x=b.filter(M=>M.sourceType==="DAILY"),E=b.filter(M=>M.sourceType!=="DAILY");for(const M of E)await le.deleteMemoById(M.id);const C=Cs(x);for(const{path:M,thinos:k}of C){const O=await le.dealWithDailyThinoBulk(M,k,"deleteForever");if(!(!S||!y.startSync))for(const F of O)F&&F.webId&&await iC(F.webId)}Ye.clearQuery(),new A.Notice(I("DELETE SUCCEED"))}catch(x){console.error("error",x),new A.Notice(x.message)}},m=b=>{const y=new A.Menu;y.addItem(S=>{S.setTitle(I("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new Ka(r,I("RESTORE"),async x=>{x==="confirm"&&await h()}).open()})}).addItem(S=>{S.setTitle(I("Bulk delete")).setIcon("trash").onClick(async()=>{new Ka(r,I("DELETE"),async x=>{x==="confirm"&&await p()}).open()})}),y.showAtMouseEvent(b.nativeEvent)},w=g.jsx(g.Fragment,{children:g.jsx("div",{className:"header-right-section",children:g.jsx(ig,{})})});return g.jsxs("div",{className:"memo-trash-wrapper",ref:l,children:[g.jsx(Fs,{showSidebar:t,rightContent:w,children:g.jsx("span",{ref:u,className:"menu-popup-btn",onClick:m})}),g.jsx(Hg,{thinosCount:i.length,thinos:i}),g.jsx(xD,{isLoading:a.isLoading,isEmpty:i.length===0}),!a.isLoading&&i.length>0&&g.jsx("div",{className:"deleted-memos-container",children:i.map(b=>g.jsx(W4e,{memo:b,handleDeletedMemoAction:f},`${b.id}-${b.updatedAt}`))})]})},Z4e=()=>{const{globalState:e}=D.useContext(it),{useTinyUndoHistoryCache:t,shouldHideImageUrl:n,shouldSplitMemoWord:r,shouldUseMarkdownParser:o}=e,a=`👋 你好呀~欢迎使用memos!
* ✨ **开源项目**;
* 😋 精美且细节的视觉样式;
* 📑 体验优良的交互逻辑;`,i=()=>{Ge.setAppSetting({useTinyUndoHistoryCache:!t})},s=()=>{Ge.setAppSetting({shouldSplitMemoWord:!r})},l=()=>{Ge.setAppSetting({shouldHideImageUrl:!n})},u=()=>{Ge.setAppSetting({shouldUseMarkdownParser:!o})},f=async()=>{const h=le.getState().memos.map(w=>({...w})),p=JSON.stringify(h),m=document.createElement("a");m.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(p)),m.setAttribute("download","data.json"),m.style.display="none",document.body.appendChild(m),m.click(),document.body.removeChild(m)};return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"section-container preferences-section-container",children:[g.jsx("p",{className:"title-text",children:"Memo 显示相关"}),g.jsx("div",{className:"demo-content-container memo-content-text",dangerouslySetInnerHTML:{__html:Up(a)}}),g.jsx("label",{className:"form-label checkbox-form-label",onClick:s,children:g.jsx("span",{className:"normal-text",children:"中英文内容自动间隔"})}),g.jsx("label",{className:"form-label checkbox-form-label",onClick:u,children:g.jsx("span",{className:"normal-text",children:"部分 markdown 格式解析"})}),g.jsx("label",{className:"form-label checkbox-form-label",onClick:l,children:g.jsx("span",{className:"normal-text",children:"隐藏图片链接地址"})})]}),g.jsxs("div",{className:"section-container preferences-section-container",children:[g.jsx("p",{className:"title-text",children:"编辑器"}),g.jsxs("label",{className:"form-label checkbox-form-label",onClick:i,children:[g.jsxs("span",{className:"normal-text",children:["启用"," ",g.jsx("a",{target:"_blank",href:"https://github.com/boojack/tiny-undo",onClick:h=>h.stopPropagation(),rel:"noreferrer",children:"tiny-undo"})]}),g.jsx("img",{className:"icon-img",src:t?checkboxActive:checkbox})]})]}),g.jsxs("div",{className:"section-container thino-hidden",children:[g.jsx("p",{className:"title-text",children:"其他"}),g.jsx("div",{className:"btn-container",children:g.jsx("button",{className:"btn export-btn",onClick:f,children:"导出数据(JSON)"})})]})]})},q4e=()=>{const{globalState:{isMobileView:e}}=D.useContext(it);D.useEffect(()=>{le.fetchAllMemos()},[]);const t=D.useCallback(()=>{Ge.setShowSiderbarInMobileView(!0)},[]);return g.jsxs("div",{className:"preference-wrapper",children:[g.jsx("div",{className:"section-header-container",children:g.jsxs("div",{className:"title-text",children:[g.jsx(js,{when:e,children:g.jsx("button",{className:"action-btn",onClick:t})}),g.jsx("span",{className:"normal-text",children:"账号与设置"})]})}),g.jsx("div",{className:"sections-wrapper",children:g.jsx(Z4e,{})})]})},$4e=()=>{const{dailyNotesState:{app:e,plugin:t,settings:n},locationState:{query:r},globalState:{isMobileView:o,changedByMemos:a},memoState:{memos:i}}=D.useContext(it),s=Ql(),[l,u]=D.useState([]),[f,h]=D.useState([]),p=_.useRef(null),m=_.useRef(null),[w,b]=D.useState(!1),[y,S]=D.useState([]),x=_.useRef([]);D.useEffect(()=>{m.current&&(A.setIcon(m.current,"refresh-cw"),e.workspace.on("refresh-review-memos",E))},[m]),D.useEffect(()=>{if(!w)return;if(r){_l({memos:i,query:r,filterOptions:{filterDoneTasks:!1,filterArchived:!n.ViewArchiveInRandomReview},plugin:t}).then(M=>{const k=[...M].sort(()=>Math.random()-Math.random()).slice(0,10);u(k),b(!1)});return}const C=[...y].sort(()=>Math.random()-Math.random()).slice(0,10);u(C),b(!1)},[w,n.ViewArchiveInRandomReview]),D.useEffect(()=>{if(!(y.length>0))return;const C=[...y].sort(()=>Math.random()-Math.random()).slice(0,10);u(C),b(!1)},[y]),D.useEffect(()=>{p.current&&(_l({memos:i,query:r,filterOptions:{filterDoneTasks:!1,filterArchived:!n.ViewArchiveInRandomReview},plugin:t}).then(C=>{S(C.filter(M=>M.rowStatus!=="ARCHIVED"&&!(M.deletedAt!==""&&M.deletedAt)))}),s.setFinish(),Ye.clearQuery())},[i,p.current,n.ViewArchiveInRandomReview]),D.useEffect(()=>{if(a&&x.current.length>0){const C=y.filter(k=>x.current.includes(k.id)),M=x.current.map(k=>C.find(O=>O.id===k)).filter(k=>k!==void 0);h(M);return}x.current=l.map(C=>C.id),h(l)},[l]),D.useEffect(()=>{l.length!==0&&_l({memos:l,query:r,filterOptions:{filterDoneTasks:!1,filterArchived:!1},plugin:t}).then(C=>{h(C)})},[r]);const E=()=>{b(!0)};return g.jsxs("div",{className:"memo-review-wrapper",ref:p,children:[g.jsx(Fs,{showSidebar:o,children:g.jsx("span",{ref:m,onClick:E,className:"refresh-icon"})}),g.jsx(Hg,{}),g.jsx(xD,{isLoading:s.isLoading,isEmpty:i.length===0}),!s.isLoading&&i.length>0&&g.jsx("div",{className:"review-memos-container",children:f.map(C=>g.jsx(no,{memo:C},`${C?.id}-${C.createdAt}`))})]})};function E_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=E_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ut(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=E_(e))&&(r&&(r+=" "),r+=t);return r}function K4e(e){return e==null}var J4e=K4e;const jt=Xe(J4e);var X4e=Qs,Q4e=Gr,eLe=si,tLe="[object String]";function nLe(e){return typeof e=="string"||!Q4e(e)&&eLe(e)&&X4e(e)==tLe}var rLe=nLe;const Bg=Xe(rLe);var C_={exports:{}},Kt={},Z4;function oLe(){if(Z4)return Kt;Z4=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function b(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case n:case o:case r:case u:case f:return y;default:switch(y=y&&y.$$typeof,y){case s:case i:case l:case p:case h:case a:return y;default:return S}}case t:return S}}}return Kt.ContextConsumer=i,Kt.ContextProvider=a,Kt.Element=e,Kt.ForwardRef=l,Kt.Fragment=n,Kt.Lazy=p,Kt.Memo=h,Kt.Portal=t,Kt.Profiler=o,Kt.StrictMode=r,Kt.Suspense=u,Kt.SuspenseList=f,Kt.isAsyncMode=function(){return!1},Kt.isConcurrentMode=function(){return!1},Kt.isContextConsumer=function(y){return b(y)===i},Kt.isContextProvider=function(y){return b(y)===a},Kt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Kt.isForwardRef=function(y){return b(y)===l},Kt.isFragment=function(y){return b(y)===n},Kt.isLazy=function(y){return b(y)===p},Kt.isMemo=function(y){return b(y)===h},Kt.isPortal=function(y){return b(y)===t},Kt.isProfiler=function(y){return b(y)===o},Kt.isStrictMode=function(y){return b(y)===r},Kt.isSuspense=function(y){return b(y)===u},Kt.isSuspenseList=function(y){return b(y)===f},Kt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===u||y===f||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===h||y.$$typeof===a||y.$$typeof===i||y.$$typeof===l||y.$$typeof===w||y.getModuleId!==void 0)},Kt.typeOf=b,Kt}C_.exports=oLe();var aLe=C_.exports,iLe=Qs,sLe=si,lLe="[object Number]";function cLe(e){return typeof e=="number"||sLe(e)&&iLe(e)==lLe}var M_=cLe;const uLe=Xe(M_);var dLe=M_;function fLe(e){return dLe(e)&&e!=+e}var hLe=fLe;const _g=Xe(hLe);var ti=function(t){return t===0?0:t>0?1:-1},Vc=function(t){return Bg(t)&&t.indexOf("%")===t.length-1},Ke=function(t){return uLe(t)&&!_g(t)},Qn=function(t){return Ke(t)||Bg(t)},pLe=0,Yg=function(t){var n=++pLe;return"".concat(t||"").concat(n)},hu=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ke(t)&&!Bg(t))return r;var a;if(Vc(t)){var i=t.indexOf("%");a=n*parseFloat(t.slice(0,i))/100}else a=+t;return _g(a)&&(a=r),o&&a>n&&(a=n),a},Ll=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},mLe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o<n;o++)if(!r[t[o]])r[t[o]]=!0;else return!0;return!1},Ja=function(t,n){return Ke(t)&&Ke(n)?function(r){return t+r*(n-t)}:function(){return n}};function $b(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ba(r,t))===n})}function Pd(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Ck(e){"@babel/helpers - typeof";return Ck=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},Ck(e)}var gLe=["viewBox","children"],vLe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],q4=["points","pathLength"],Rx={svg:gLe,polygon:q4,polyline:q4},ID=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Kb=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(D.isValidElement(t)&&(r=t.props),!Lf(r))return null;var o={};return Object.keys(r).forEach(function(a){ID.includes(a)&&(o[a]=n||function(i){return r[a](r,i)})}),o},yLe=function(t,n,r){return function(o){return t(n,r,o),null}},Jb=function(t,n,r){if(!Lf(t)||Ck(t)!=="object")return null;var o=null;return Object.keys(t).forEach(function(a){var i=t[a];ID.includes(a)&&typeof i=="function"&&(o||(o={}),o[a]=yLe(i,n,r))}),o},bLe=["children"],wLe=["children"];function $4(e,t){if(e==null)return{};var n=SLe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SLe(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 Mk(e){"@babel/helpers - typeof";return Mk=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},Mk(e)}var K4={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Hs=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},J4=null,Fx=null,kD=function e(t){if(t===J4&&Array.isArray(Fx))return Fx;var n=[];return D.Children.forEach(t,function(r){jt(r)||(aLe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Fx=n,J4=t,n};function wa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return Hs(o)}):r=[Hs(t)],kD(e).forEach(function(o){var a=ba(o,"type.displayName")||ba(o,"type.name");r.indexOf(a)!==-1&&n.push(o)}),n}function Go(e,t){var n=wa(e,t);return n&&n[0]}var X4=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!Ke(r)||r<=0||!Ke(o)||o<=0)},TLe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xLe=function(t){return t&&t.type&&Bg(t.type)&&TLe.indexOf(t.type)>=0},ILe=function(t){return t&&Mk(t)==="object"&&"clipDot"in t},kLe=function(t,n,r,o){var a,i=(a=Rx?.[o])!==null&&a!==void 0?a:[];return!Mt(t)&&(o&&i.includes(n)||vLe.includes(n))||r&&ID.includes(n)},Rt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(D.isValidElement(t)&&(o=t.props),!Lf(o))return null;var a={};return Object.keys(o).forEach(function(i){var s;kLe((s=o)===null||s===void 0?void 0:s[i],i,n,r)&&(a[i]=o[i])}),a},Dk=function e(t,n){if(t===n)return!0;var r=D.Children.count(t);if(r!==D.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Q4(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var a=t[o],i=n[o];if(Array.isArray(a)||Array.isArray(i)){if(!e(a,i))return!1}else if(!Q4(a,i))return!1}return!0},Q4=function(t,n){if(jt(t)&&jt(n))return!0;if(!jt(t)&&!jt(n)){var r=t.props||{},o=r.children,a=$4(r,bLe),i=n.props||{},s=i.children,l=$4(i,wLe);return o&&s?Pd(a,l)&&Dk(o,s):!o&&!s?Pd(a,l):!1}return!1},eL=function(t,n){var r=[],o={};return kD(t).forEach(function(a,i){if(xLe(a))r.push(a);else if(a){var s=Hs(a.type),l=n[s]||{},u=l.handler,f=l.once;if(u&&(!f||!o[s])){var h=u(a,s,i);r.push(h),o[s]=!0}}}),r},ELe=function(t){var n=t&&t.type;return n&&K4[n]?K4[n]:null},CLe=function(t,n){return kD(n).indexOf(t)},MLe=["children","width","height","viewBox","className","style","title","desc"];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 DLe(e,t){if(e==null)return{};var n=ALe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ALe(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 Nk(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,s=e.title,l=e.desc,u=DLe(e,MLe),f=o||{width:n,height:r,x:0,y:0},h=Ut("recharts-surface",a);return _.createElement("svg",Ak({},Rt(u,!0,"svg"),{className:h,width:n,height:r,style:i,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),_.createElement("title",null,s),_.createElement("desc",null,l),t)}var NLe=["children","className"];function Ok(){return Ok=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},Ok.apply(this,arguments)}function OLe(e,t){if(e==null)return{};var n=PLe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PLe(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 _n=_.forwardRef(function(e,t){var n=e.children,r=e.className,o=OLe(e,NLe),a=Ut("recharts-layer",r);return _.createElement("g",Ok({className:a},Rt(o,!0),{ref:t}),n)}),Bs=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a]},jLe=NC;function LLe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:jLe(e,t,n)}var RLe=LLe,FLe="\\ud800-\\udfff",HLe="\\u0300-\\u036f",BLe="\\ufe20-\\ufe2f",_Le="\\u20d0-\\u20ff",YLe=HLe+BLe+_Le,zLe="\\ufe0e\\ufe0f",ULe="\\u200d",VLe=RegExp("["+ULe+FLe+YLe+zLe+"]");function WLe(e){return VLe.test(e)}var D_=WLe;function GLe(e){return e.split("")}var ZLe=GLe,A_="\\ud800-\\udfff",qLe="\\u0300-\\u036f",$Le="\\ufe20-\\ufe2f",KLe="\\u20d0-\\u20ff",JLe=qLe+$Le+KLe,XLe="\\ufe0e\\ufe0f",QLe="["+A_+"]",Pk="["+JLe+"]",jk="\\ud83c[\\udffb-\\udfff]",eRe="(?:"+Pk+"|"+jk+")",N_="[^"+A_+"]",O_="(?:\\ud83c[\\udde6-\\uddff]){2}",P_="[\\ud800-\\udbff][\\udc00-\\udfff]",tRe="\\u200d",j_=eRe+"?",L_="["+XLe+"]?",nRe="(?:"+tRe+"(?:"+[N_,O_,P_].join("|")+")"+L_+j_+")*",rRe=L_+j_+nRe,oRe="(?:"+[N_+Pk+"?",Pk,O_,P_,QLe].join("|")+")",aRe=RegExp(jk+"(?="+jk+")|"+oRe+rRe,"g");function iRe(e){return e.match(aRe)||[]}var sRe=iRe,lRe=ZLe,cRe=D_,uRe=sRe;function dRe(e){return cRe(e)?uRe(e):lRe(e)}var fRe=dRe,hRe=RLe,pRe=D_,mRe=fRe,gRe=p8;function vRe(e){return function(t){t=gRe(t);var n=pRe(t)?mRe(t):void 0,r=n?n[0]:t.charAt(0),o=n?hRe(n,1).join(""):t.slice(1);return r[e]()+o}}var yRe=vRe,bRe=yRe,wRe=bRe("toUpperCase"),SRe=wRe;const iS=Xe(SRe);function hn(e){return function(){return e}}const R_=Math.cos,Xb=Math.sin,ui=Math.sqrt,Qb=Math.PI,sS=2*Qb,Lk=Math.PI,Rk=2*Lk,Hc=1e-6,TRe=Rk-Hc;function F_(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function xRe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return F_;const n=10**t;return function(r){this._+=r[0];for(let o=1,a=r.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+r[o]}}class IRe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?F_:xRe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,o){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+o}`}bezierCurveTo(t,n,r,o,a,i){this._append`C${+t},${+n},${+r},${+o},${this._x1=+a},${this._y1=+i}`}arcTo(t,n,r,o,a){if(t=+t,n=+n,r=+r,o=+o,a=+a,a<0)throw new Error(`negative radius: ${a}`);let i=this._x1,s=this._y1,l=r-t,u=o-n,f=i-t,h=s-n,p=f*f+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Hc)if(!(Math.abs(h*l-u*f)>Hc)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-i,w=o-s,b=l*l+u*u,y=m*m+w*w,S=Math.sqrt(b),x=Math.sqrt(p),E=a*Math.tan((Lk-Math.acos((b+p-y)/(2*S*x)))/2),C=E/x,M=E/S;Math.abs(C-1)>Hc&&this._append`L${t+C*f},${n+C*h}`,this._append`A${a},${a},0,0,${+(h*m>f*w)},${this._x1=t+M*l},${this._y1=n+M*u}`}}arc(t,n,r,o,a,i){if(t=+t,n=+n,r=+r,i=!!i,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),u=t+s,f=n+l,h=1^i,p=i?o-a:a-o;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Hc||Math.abs(this._y1-f)>Hc)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%Rk+Rk),p>TRe?this._append`A${r},${r},0,1,${h},${t-s},${n-l}A${r},${r},0,1,${h},${this._x1=u},${this._y1=f}`:p>Hc&&this._append`A${r},${r},0,${+(p>=Lk)},${h},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function ED(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new IRe(t)}function CD(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function H_(e){this._context=e}H_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function lS(e){return new H_(e)}function B_(e){return e[0]}function __(e){return e[1]}function Y_(e,t){var n=hn(!0),r=null,o=lS,a=null,i=ED(s);e=typeof e=="function"?e:e===void 0?B_:hn(e),t=typeof t=="function"?t:t===void 0?__:hn(t);function s(l){var u,f=(l=CD(l)).length,h,p=!1,m;for(r==null&&(a=o(m=i())),u=0;u<=f;++u)!(u<f&&n(h=l[u],u,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(h,u,l),+t(h,u,l));if(m)return a=null,m+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:hn(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:hn(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:hn(!!l),s):n},s.curve=function(l){return arguments.length?(o=l,r!=null&&(a=o(r)),s):o},s.context=function(l){return arguments.length?(l==null?r=a=null:a=o(r=l),s):r},s}function Sy(e,t,n){var r=null,o=hn(!0),a=null,i=lS,s=null,l=ED(u);e=typeof e=="function"?e:e===void 0?B_:hn(+e),t=typeof t=="function"?t:hn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?__:hn(+n);function u(h){var p,m,w,b=(h=CD(h)).length,y,S=!1,x,E=new Array(b),C=new Array(b);for(a==null&&(s=i(x=l())),p=0;p<=b;++p){if(!(p<b&&o(y=h[p],p,h))===S)if(S=!S)m=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),w=p-1;w>=m;--w)s.point(E[w],C[w]);s.lineEnd(),s.areaEnd()}S&&(E[p]=+e(y,p,h),C[p]=+t(y,p,h),s.point(r?+r(y,p,h):E[p],n?+n(y,p,h):C[p]))}if(x)return s=null,x+""||null}function f(){return Y_().defined(o).curve(i).context(a)}return u.x=function(h){return arguments.length?(e=typeof h=="function"?h:hn(+h),r=null,u):e},u.x0=function(h){return arguments.length?(e=typeof h=="function"?h:hn(+h),u):e},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:hn(+h),u):r},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:hn(+h),n=null,u):t},u.y0=function(h){return arguments.length?(t=typeof h=="function"?h:hn(+h),u):t},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:hn(+h),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(h){return arguments.length?(o=typeof h=="function"?h:hn(!!h),u):o},u.curve=function(h){return arguments.length?(i=h,a!=null&&(s=i(a)),u):i},u.context=function(h){return arguments.length?(h==null?a=s=null:s=i(a=h),u):a},u}class z_{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}this._x0=t,this._y0=n}}function kRe(e){return new z_(e,!0)}function ERe(e){return new z_(e,!1)}const MD={draw(e,t){const n=ui(t/Qb);e.moveTo(n,0),e.arc(0,0,n,0,sS)}},CRe={draw(e,t){const n=ui(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},U_=ui(1/3),MRe=U_*2,DRe={draw(e,t){const n=ui(t/MRe),r=n*U_;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},ARe={draw(e,t){const n=ui(t),r=-n/2;e.rect(r,r,n,n)}},NRe=.8908130915292852,V_=Xb(Qb/10)/Xb(7*Qb/10),ORe=Xb(sS/10)*V_,PRe=-R_(sS/10)*V_,jRe={draw(e,t){const n=ui(t*NRe),r=ORe*n,o=PRe*n;e.moveTo(0,-n),e.lineTo(r,o);for(let a=1;a<5;++a){const i=sS*a/5,s=R_(i),l=Xb(i);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},Hx=ui(3),LRe={draw(e,t){const n=-ui(t/(Hx*3));e.moveTo(0,n*2),e.lineTo(-Hx*n,-n),e.lineTo(Hx*n,-n),e.closePath()}},ha=-.5,pa=ui(3)/2,Fk=1/ui(12),RRe=(Fk/2+1)*3,FRe={draw(e,t){const n=ui(t/RRe),r=n/2,o=n*Fk,a=r,i=n*Fk+n,s=-a,l=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(s,l),e.lineTo(ha*r-pa*o,pa*r+ha*o),e.lineTo(ha*a-pa*i,pa*a+ha*i),e.lineTo(ha*s-pa*l,pa*s+ha*l),e.lineTo(ha*r+pa*o,ha*o-pa*r),e.lineTo(ha*a+pa*i,ha*i-pa*a),e.lineTo(ha*s+pa*l,ha*l-pa*s),e.closePath()}};function HRe(e,t){let n=null,r=ED(o);e=typeof e=="function"?e:hn(e||MD),t=typeof t=="function"?t:hn(t===void 0?64:+t);function o(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return o.type=function(a){return arguments.length?(e=typeof a=="function"?a:hn(a),o):e},o.size=function(a){return arguments.length?(t=typeof a=="function"?a:hn(+a),o):t},o.context=function(a){return arguments.length?(n=a??null,o):n},o}function ew(){}function tw(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function W_(e){this._context=e}W_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function BRe(e){return new W_(e)}function G_(e){this._context=e}G_.prototype={areaStart:ew,areaEnd:ew,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _Re(e){return new G_(e)}function Z_(e){this._context=e}Z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function YRe(e){return new Z_(e)}function q_(e){this._context=e}q_.prototype={areaStart:ew,areaEnd:ew,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function zRe(e){return new q_(e)}function tL(e){return e<0?-1:1}function nL(e,t,n){var r=e._x1-e._x0,o=t-e._x1,a=(e._y1-e._y0)/(r||o<0&&-0),i=(n-e._y1)/(o||r<0&&-0),s=(a*o+i*r)/(r+o);return(tL(a)+tL(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function rL(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bx(e,t,n){var r=e._x0,o=e._y0,a=e._x1,i=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,o+s*t,a-s,i-s*n,a,i)}function nw(e){this._context=e}nw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bx(this,this._t0,rL(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Bx(this,rL(this,n=nL(this,e,t)),n);break;default:Bx(this,this._t0,n=nL(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function $_(e){this._context=new K_(e)}($_.prototype=Object.create(nw.prototype)).point=function(e,t){nw.prototype.point.call(this,t,e)};function K_(e){this._context=e}K_.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,a){this._context.bezierCurveTo(t,e,r,n,a,o)}};function URe(e){return new nw(e)}function VRe(e){return new $_(e)}function J_(e){this._context=e}J_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=oL(e),o=oL(t),a=0,i=1;i<n;++a,++i)this._context.bezierCurveTo(r[0][a],o[0][a],r[1][a],o[1][a],e[i],t[i]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function oL(e){var t,n=e.length-1,r,o=new Array(n),a=new Array(n),i=new Array(n);for(o[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t<n-1;++t)o[t]=1,a[t]=4,i[t]=4*e[t]+2*e[t+1];for(o[n-1]=2,a[n-1]=7,i[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=o[t]/a[t-1],a[t]-=r,i[t]-=r*i[t-1];for(o[n-1]=i[n-1]/a[n-1],t=n-2;t>=0;--t)o[t]=(i[t]-o[t+1])/a[t];for(a[n-1]=(e[n]+o[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-o[t+1];return[o,a]}function WRe(e){return new J_(e)}function cS(e,t){this._context=e,this._t=t}cS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function GRe(e){return new cS(e,.5)}function ZRe(e){return new cS(e,0)}function qRe(e){return new cS(e,1)}function ef(e,t){if((i=e.length)>1)for(var n=1,r,o,a=e[t[0]],i,s=a.length;n<i;++n)for(o=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(o[r][1])?o[r][0]:o[r][1]}function Hk(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function $Re(e,t){return e[t]}function KRe(e){const t=[];return t.key=e,t}function JRe(){var e=hn([]),t=Hk,n=ef,r=$Re;function o(a){var i=Array.from(e.apply(this,arguments),KRe),s,l=i.length,u=-1,f;for(const h of a)for(s=0,++u;s<l;++s)(i[s][u]=[0,+r(h,i[s].key,u,a)]).data=h;for(s=0,f=CD(t(i));s<l;++s)i[f[s]].index=s;return n(i,f),i}return o.keys=function(a){return arguments.length?(e=typeof a=="function"?a:hn(Array.from(a)),o):e},o.value=function(a){return arguments.length?(r=typeof a=="function"?a:hn(+a),o):r},o.order=function(a){return arguments.length?(t=a==null?Hk:typeof a=="function"?a:hn(Array.from(a)),o):t},o.offset=function(a){return arguments.length?(n=a??ef,o):n},o}function XRe(e,t){if((r=e.length)>0){for(var n,r,o=0,a=e[0].length,i;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}ef(e,t)}}function QRe(e,t){if((o=e.length)>0){for(var n=0,r=e[t[0]],o,a=r.length;n<a;++n){for(var i=0,s=0;i<o;++i)s+=e[i][n][1]||0;r[n][1]+=r[n][0]=-s/2}ef(e,t)}}function e5e(e,t){if(!(!((i=e.length)>0)||!((a=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,a,i;r<a;++r){for(var s=0,l=0,u=0;s<i;++s){for(var f=e[t[s]],h=f[r][1]||0,p=f[r-1][1]||0,m=(h-p)/2,w=0;w<s;++w){var b=e[t[w]],y=b[r][1]||0,S=b[r-1][1]||0;m+=y-S}l+=h,u+=m*h}o[r-1][1]+=o[r-1][0]=n,l&&(n-=u/l)}o[r-1][1]+=o[r-1][0]=n,ef(e,t)}}function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}var t5e=["type","size","sizeType"];function Bk(){return Bk=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},Bk.apply(this,arguments)}function aL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function iL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aL(Object(n),!0).forEach(function(r){n5e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n5e(e,t,n){return t=r5e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r5e(e){var t=o5e(e,"string");return pm(t)=="symbol"?t:t+""}function o5e(e,t){if(pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a5e(e,t){if(e==null)return{};var n=i5e(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i5e(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 X_={symbolCircle:MD,symbolCross:CRe,symbolDiamond:DRe,symbolSquare:ARe,symbolStar:jRe,symbolTriangle:LRe,symbolWye:FRe},s5e=Math.PI/180,l5e=function(t){var n="symbol".concat(iS(t));return X_[n]||MD},c5e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":var o=18*s5e;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2));case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},u5e=function(t,n){X_["symbol".concat(iS(t))]=n},DD=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,a=o===void 0?64:o,i=t.sizeType,s=i===void 0?"area":i,l=a5e(t,t5e),u=iL(iL({},l),{},{type:r,size:a,sizeType:s}),f=function(){var y=l5e(r),S=HRe().type(y).size(c5e(a,s,r));return S()},h=u.className,p=u.cx,m=u.cy,w=Rt(u,!0);return p===+p&&m===+m&&a===+a?_.createElement("path",Bk({},w,{className:Ut("recharts-symbols",h),transform:"translate(".concat(p,", ").concat(m,")"),d:f()})):null};DD.registerSymbol=u5e;function tf(e){"@babel/helpers - typeof";return tf=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},tf(e)}function _k(){return _k=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},_k.apply(this,arguments)}function sL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function d5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sL(Object(n),!0).forEach(function(r){mm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h5e(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,eY(r.key),r)}}function p5e(e,t,n){return t&&h5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function m5e(e,t,n){return t=rw(t),g5e(e,Q_()?Reflect.construct(t,n||[],rw(e).constructor):t.apply(e,n))}function g5e(e,t){if(t&&(tf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v5e(e)}function v5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Q_=function(){return!!e})()}function rw(e){return rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rw(e)}function y5e(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&&Yk(e,t)}function Yk(e,t){return Yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Yk(e,t)}function mm(e,t,n){return t=eY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eY(e){var t=b5e(e,"string");return tf(t)=="symbol"?t:t+""}function b5e(e,t){if(tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ma=32,AD=function(e){function t(){return f5e(this,t),m5e(this,t,arguments)}return y5e(t,e),p5e(t,[{key:"renderIcon",value:function(r){var o=this.props.inactiveColor,a=ma/2,i=ma/6,s=ma/3,l=r.inactive?o:r.color;if(r.type==="plainline")return _.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:ma,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return _.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(a,"h").concat(s,`
A`).concat(i,",").concat(i,",0,1,1,").concat(2*s,",").concat(a,`
H`).concat(ma,"M").concat(2*s,",").concat(a,`
A`).concat(i,",").concat(i,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return _.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(ma/8,"h").concat(ma,"v").concat(ma*3/4,"h").concat(-ma,"z"),className:"recharts-legend-icon"});if(_.isValidElement(r.legendIcon)){var u=d5e({},r);return delete u.legendIcon,_.cloneElement(r.legendIcon,u)}return _.createElement(DD,{fill:l,cx:a,cy:a,size:ma,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,a=o.payload,i=o.iconSize,s=o.layout,l=o.formatter,u=o.inactiveColor,f={x:0,y:0,width:ma,height:ma},h={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(m,w){var b=m.formatter||l,y=Ut(mm(mm({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",m.inactive));if(m.type==="none")return null;var S=Mt(m.value)?null:m.value;Bs(!Mt(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var x=m.inactive?u:m.color;return _.createElement("li",_k({className:y,style:h,key:"legend-item-".concat(w)},Jb(r.props,m,w)),_.createElement(Nk,{width:i,height:i,viewBox:f,style:p},r.renderIcon(m)),_.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},b?b(S,m,w):S))})}},{key:"render",value:function(){var r=this.props,o=r.payload,a=r.layout,i=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?i:"left"};return _.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(D.PureComponent);mm(AD,"displayName","Legend");mm(AD,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});function w5e(e){return e!==e}var S5e=w5e;function T5e(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}var x5e=T5e,I5e=l8,k5e=S5e,E5e=x5e;function C5e(e,t,n){return t===t?E5e(e,t,n):I5e(e,k5e,n)}var M5e=C5e,D5e=M5e;function A5e(e,t){var n=e==null?0:e.length;return!!n&&D5e(e,t,0)>-1}var N5e=A5e;function O5e(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}var P5e=O5e;function j5e(){}var L5e=j5e,_x=o8,R5e=L5e,F5e=_C,H5e=1/0,B5e=_x&&1/F5e(new _x([,-0]))[1]==H5e?function(e){return new _x(e)}:R5e,_5e=B5e,Y5e=Z6,z5e=N5e,U5e=P5e,V5e=$6,W5e=_5e,G5e=_C,Z5e=200;function q5e(e,t,n){var r=-1,o=z5e,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=U5e;else if(a>=Z5e){var u=t?null:W5e(e);if(u)return G5e(u);i=!1,o=V5e,l=new Y5e}else l=t?[]:s;e:for(;++r<a;){var f=e[r],h=t?t(f):f;if(f=n||f!==0?f:0,i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue e;t&&l.push(h),s.push(f)}else o(l,h,n)||(l!==s&&l.push(h),s.push(f))}return s}var $5e=q5e,K5e=el,J5e=$5e;function X5e(e,t){return e&&e.length?J5e(e,K5e(t)):[]}var Q5e=X5e;const lL=Xe(Q5e);function tY(e,t,n){return t===!0?lL(e,n):Mt(t)?lL(e,t):e}function nf(e){"@babel/helpers - typeof";return nf=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},nf(e)}var e9e=["ref"];function cL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ts(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cL(Object(n),!0).forEach(function(r){uS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function t9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uL(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,rY(r.key),r)}}function n9e(e,t,n){return t&&uL(e.prototype,t),n&&uL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function r9e(e,t,n){return t=ow(t),o9e(e,nY()?Reflect.construct(t,n||[],ow(e).constructor):t.apply(e,n))}function o9e(e,t){if(t&&(nf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a9e(e)}function a9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nY=function(){return!!e})()}function ow(e){return ow=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ow(e)}function i9e(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&&zk(e,t)}function zk(e,t){return zk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},zk(e,t)}function uS(e,t,n){return t=rY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rY(e){var t=s9e(e,"string");return nf(t)=="symbol"?t:t+""}function s9e(e,t){if(nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function l9e(e,t){if(e==null)return{};var n=c9e(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c9e(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 u9e(e){return e.value}function d9e(e,t){if(_.isValidElement(e))return _.cloneElement(e,t);if(typeof e=="function")return _.createElement(e,t);t.ref;var n=l9e(t,e9e);return _.createElement(AD,n)}var dL=1,jd=function(e){function t(){var n;t9e(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=r9e(this,t,[].concat(o)),uS(n,"lastBoundingBox",{width:-1,height:-1}),n}return i9e(t,e),n9e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,o=this.getBBox();o?(Math.abs(o.width-this.lastBoundingBox.width)>dL||Math.abs(o.height-this.lastBoundingBox.height)>dL)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ts({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,a=o.layout,i=o.align,s=o.verticalAlign,l=o.margin,u=o.chartWidth,f=o.chartHeight,h,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(i==="center"&&a==="vertical"){var m=this.getBBoxSnapshot();h={left:((u||0)-m.width)/2}}else h=i==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var w=this.getBBoxSnapshot();p={top:((f||0)-w.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ts(Ts({},h),p)}},{key:"render",value:function(){var r=this,o=this.props,a=o.content,i=o.width,s=o.height,l=o.wrapperStyle,u=o.payloadUniqBy,f=o.payload,h=Ts(Ts({position:"absolute",width:i||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return _.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(m){r.wrapperNode=m}},d9e(a,Ts(Ts({},this.props),{},{payload:tY(f,u,u9e)})))}}],[{key:"getWithHeight",value:function(r,o){var a=Ts(Ts({},this.defaultProps),r.props),i=a.layout;return i==="vertical"&&Ke(r.props.height)?{height:r.props.height}:i==="horizontal"?{width:r.props.width||o}:null}}])}(D.PureComponent);uS(jd,"displayName","Legend");uS(jd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}function Uk(){return Uk=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},Uk.apply(this,arguments)}function f9e(e,t){return g9e(e)||m9e(e,t)||p9e(e,t)||h9e()}function h9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p9e(e,t){if(e){if(typeof e=="string")return fL(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 fL(e,t)}}function fL(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 m9e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function g9e(e){if(Array.isArray(e))return e}function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Yx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hL(Object(n),!0).forEach(function(r){v9e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v9e(e,t,n){return t=y9e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y9e(e){var t=b9e(e,"string");return gm(t)=="symbol"?t:t+""}function b9e(e,t){if(gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w9e(e){return Array.isArray(e)&&Qn(e[0])&&Qn(e[1])?e.join(" ~ "):e}var S9e=function(t){var n=t.separator,r=n===void 0?" : ":n,o=t.contentStyle,a=o===void 0?{}:o,i=t.itemStyle,s=i===void 0?{}:i,l=t.labelStyle,u=l===void 0?{}:l,f=t.payload,h=t.formatter,p=t.itemSorter,m=t.wrapperClassName,w=t.labelClassName,b=t.label,y=t.labelFormatter,S=t.accessibilityLayer,x=S===void 0?!1:S,E=function(){if(f&&f.length){var H={padding:0,margin:0},Z=(p?T0(f,p):f).map(function(W,$){if(W.type==="none")return null;var V=Yx({display:"block",paddingTop:4,paddingBottom:4,color:W.color||"#000"},s),ne=W.formatter||h||w9e,Q=W.value,te=W.name,G=Q,X=te;if(ne&&G!=null&&X!=null){var ee=ne(Q,te,W,$,f);if(Array.isArray(ee)){var ie=f9e(ee,2);G=ie[0],X=ie[1]}else G=ee}return _.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:V},Qn(X)?_.createElement("span",{className:"recharts-tooltip-item-name"},X):null,Qn(X)?_.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,_.createElement("span",{className:"recharts-tooltip-item-value"},G),_.createElement("span",{className:"recharts-tooltip-item-unit"},W.unit||""))});return _.createElement("ul",{className:"recharts-tooltip-item-list",style:H},Z)}return null},C=Yx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),M=Yx({margin:0},u),k=!jt(b),O=k?b:"",F=Ut("recharts-default-tooltip",m),R=Ut("recharts-tooltip-label",w);k&&y&&f!==void 0&&f!==null&&(O=y(b,f));var B=x?{role:"status","aria-live":"assertive"}:{};return _.createElement("div",Uk({className:F,style:C},B),_.createElement("p",{className:R,style:M},_.isValidElement(O)?O:"".concat(O)),E())};function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function Ty(e,t,n){return t=T9e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T9e(e){var t=x9e(e,"string");return vm(t)=="symbol"?t:t+""}function x9e(e,t){if(vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tp="recharts-tooltip-wrapper",I9e={visibility:"hidden"};function k9e(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ut(tp,Ty(Ty(Ty(Ty({},"".concat(tp,"-right"),Ke(n)&&t&&Ke(t.x)&&n>=t.x),"".concat(tp,"-left"),Ke(n)&&t&&Ke(t.x)&&n<t.x),"".concat(tp,"-bottom"),Ke(r)&&t&&Ke(t.y)&&r>=t.y),"".concat(tp,"-top"),Ke(r)&&t&&Ke(t.y)&&r<t.y))}function pL(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(a&&Ke(a[r]))return a[r];var f=n[r]-s-o,h=n[r]+o;if(t[r])return i[r]?f:h;if(i[r]){var p=f,m=l[r];return p<m?Math.max(h,l[r]):Math.max(f,l[r])}var w=h+s,b=l[r]+u;return w>b?Math.max(f,l[r]):Math.max(h,l[r])}function E9e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function C9e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,a=e.reverseDirection,i=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,h;return i.height>0&&i.width>0&&n?(f=pL({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:a,tooltipDimension:i.width,viewBox:l,viewBoxDimension:l.width}),h=pL({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:a,tooltipDimension:i.height,viewBox:l,viewBoxDimension:l.height}),u=E9e({translateX:f,translateY:h,useTranslate3d:s})):u=I9e,{cssProperties:u,cssClasses:k9e({translateX:f,translateY:h,coordinate:n})}}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 mL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mL(Object(n),!0).forEach(function(r){Wk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D9e(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,aY(r.key),r)}}function A9e(e,t,n){return t&&D9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N9e(e,t,n){return t=aw(t),O9e(e,oY()?Reflect.construct(t,n||[],aw(e).constructor):t.apply(e,n))}function O9e(e,t){if(t&&(rf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P9e(e)}function P9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oY=function(){return!!e})()}function aw(e){return aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},aw(e)}function j9e(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&&Vk(e,t)}function Vk(e,t){return Vk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Vk(e,t)}function Wk(e,t,n){return t=aY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aY(e){var t=L9e(e,"string");return rf(t)=="symbol"?t:t+""}function L9e(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 String(e)}var vL=1,R9e=function(e){function t(){var n;M9e(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=N9e(this,t,[].concat(o)),Wk(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Wk(n,"handleKeyDown",function(i){if(i.key==="Escape"){var s,l,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return j9e(t,e),A9e(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>vL||Math.abs(r.height-this.state.lastBoundingBox.height)>vL)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,a=o.active,i=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,u=o.children,f=o.coordinate,h=o.hasPayload,p=o.isAnimationActive,m=o.offset,w=o.position,b=o.reverseDirection,y=o.useTranslate3d,S=o.viewBox,x=o.wrapperStyle,E=C9e({allowEscapeViewBox:i,coordinate:f,offsetTopLeft:m,position:w,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:S}),C=E.cssClasses,M=E.cssProperties,k=gL(gL({transition:p&&a?"transform ".concat(s,"ms ").concat(l):void 0},M),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},x);return _.createElement("div",{tabIndex:-1,className:C,style:k,ref:function(F){r.wrapperNode=F}},u)}}])}(D.PureComponent),F9e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},nh={isSsr:F9e()};function of(e){"@babel/helpers - typeof";return of=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},of(e)}function yL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yL(Object(n),!0).forEach(function(r){ND(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H9e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B9e(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,sY(r.key),r)}}function _9e(e,t,n){return t&&B9e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y9e(e,t,n){return t=iw(t),z9e(e,iY()?Reflect.construct(t,n||[],iw(e).constructor):t.apply(e,n))}function z9e(e,t){if(t&&(of(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U9e(e)}function U9e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iY=function(){return!!e})()}function iw(e){return iw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iw(e)}function V9e(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&&Gk(e,t)}function Gk(e,t){return Gk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Gk(e,t)}function ND(e,t,n){return t=sY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sY(e){var t=W9e(e,"string");return of(t)=="symbol"?t:t+""}function W9e(e,t){if(of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function G9e(e){return e.dataKey}function Z9e(e,t){return _.isValidElement(e)?_.cloneElement(e,t):typeof e=="function"?_.createElement(e,t):_.createElement(S9e,t)}var Fi=function(e){function t(){return H9e(this,t),Y9e(this,t,arguments)}return V9e(t,e),_9e(t,[{key:"render",value:function(){var r=this,o=this.props,a=o.active,i=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,u=o.content,f=o.coordinate,h=o.filterNull,p=o.isAnimationActive,m=o.offset,w=o.payload,b=o.payloadUniqBy,y=o.position,S=o.reverseDirection,x=o.useTranslate3d,E=o.viewBox,C=o.wrapperStyle,M=w??[];h&&M.length&&(M=tY(w.filter(function(O){return O.value!=null&&(O.hide!==!0||r.props.includeHidden)}),b,G9e));var k=M.length>0;return _.createElement(R9e,{allowEscapeViewBox:i,animationDuration:s,animationEasing:l,isAnimationActive:p,active:a,coordinate:f,hasPayload:k,offset:m,position:y,reverseDirection:S,useTranslate3d:x,viewBox:E,wrapperStyle:C},Z9e(u,bL(bL({},this.props),{},{payload:M})))}}])}(D.PureComponent);ND(Fi,"displayName","Tooltip");ND(Fi,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nh.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var q9e=ii,$9e=function(){return q9e.Date.now()},K9e=$9e,J9e=Ca,zx=K9e,wL=F6,X9e="Expected a function",Q9e=Math.max,eFe=Math.min;function tFe(e,t,n){var r,o,a,i,s,l,u=0,f=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(X9e);t=wL(t)||0,J9e(n)&&(f=!!n.leading,h="maxWait"in n,a=h?Q9e(wL(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function m(k){var O=r,F=o;return r=o=void 0,u=k,i=e.apply(F,O),i}function w(k){return u=k,s=setTimeout(S,t),f?m(k):i}function b(k){var O=k-l,F=k-u,R=t-O;return h?eFe(R,a-F):R}function y(k){var O=k-l,F=k-u;return l===void 0||O>=t||O<0||h&&F>=a}function S(){var k=zx();if(y(k))return x(k);s=setTimeout(S,b(k))}function x(k){return s=void 0,p&&r?m(k):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),u=0,r=l=o=s=void 0}function C(){return s===void 0?i:x(zx())}function M(){var k=zx(),O=y(k);if(r=arguments,o=this,l=k,O){if(s===void 0)return w(l);if(h)return clearTimeout(s),s=setTimeout(S,t),m(l)}return s===void 0&&(s=setTimeout(S,t)),i}return M.cancel=E,M.flush=C,M}var nFe=tFe,rFe=nFe,oFe=Ca,aFe="Expected a function";function iFe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(aFe);return oFe(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),rFe(e,t,{leading:r,maxWait:t,trailing:o})}var sFe=iFe;const lY=Xe(sFe);function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function SL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SL(Object(n),!0).forEach(function(r){lFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lFe(e,t,n){return t=cFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cFe(e){var t=uFe(e,"string");return ym(t)=="symbol"?t:t+""}function uFe(e,t){if(ym(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dFe(e,t){return mFe(e)||pFe(e,t)||hFe(e,t)||fFe()}function fFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hFe(e,t){if(e){if(typeof e=="string")return TL(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 TL(e,t)}}function TL(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 pFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function mFe(e){if(Array.isArray(e))return e}var gFe=D.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,o=r===void 0?{width:-1,height:-1}:r,a=e.width,i=a===void 0?"100%":a,s=e.height,l=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,h=e.minHeight,p=e.maxHeight,m=e.children,w=e.debounce,b=w===void 0?0:w,y=e.id,S=e.className,x=e.onResize,E=e.style,C=E===void 0?{}:E,M=D.useRef(null),k=D.useRef();k.current=x,D.useImperativeHandle(t,function(){return Object.defineProperty(M.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),M.current},configurable:!0})});var O=D.useState({containerWidth:o.width,containerHeight:o.height}),F=dFe(O,2),R=F[0],B=F[1],Y=D.useCallback(function(Z,W){B(function($){var V=Math.round(Z),ne=Math.round(W);return $.containerWidth===V&&$.containerHeight===ne?$:{containerWidth:V,containerHeight:ne}})},[]);D.useEffect(function(){var Z=function(te){var G,X=te[0].contentRect,ee=X.width,ie=X.height;Y(ee,ie),(G=k.current)===null||G===void 0||G.call(k,ee,ie)};b>0&&(Z=lY(Z,b,{trailing:!0,leading:!1}));var W=new ResizeObserver(Z),$=M.current.getBoundingClientRect(),V=$.width,ne=$.height;return Y(V,ne),W.observe(M.current),function(){W.disconnect()}},[Y,b]);var H=D.useMemo(function(){var Z=R.containerWidth,W=R.containerHeight;if(Z<0||W<0)return null;Bs(Vc(i)||Vc(l),`The width(%s) and height(%s) are both fixed numbers,
maybe you don't need to use a ResponsiveContainer.`,i,l),Bs(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Vc(i)?Z:i,V=Vc(l)?W:l;n&&n>0&&($?V=$/n:V&&($=V*n),p&&V>p&&(V=p)),Bs($>0||V>0,`The width(%s) and height(%s) of chart should be greater than 0,
please check the style of container, or the props width(%s) and height(%s),
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
height and width.`,$,V,i,l,f,h,n);var ne=!Array.isArray(m)&&Hs(m.type).endsWith("Chart");return _.Children.map(m,function(Q){return _.isValidElement(Q)?D.cloneElement(Q,xy({width:$,height:V},ne?{style:xy({height:"100%",width:"100%",maxHeight:V,maxWidth:$},Q.props.style)}:{})):Q})},[n,m,l,p,h,f,R,i]);return _.createElement("div",{id:y?"".concat(y):void 0,className:Ut("recharts-responsive-container",S),style:xy(xy({},C),{},{width:i,height:l,minWidth:f,minHeight:h,maxHeight:p}),ref:M},H)}),cY=function(t){return null};cY.displayName="Cell";function bm(e){"@babel/helpers - typeof";return bm=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},bm(e)}function xL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).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?xL(Object(n),!0).forEach(function(r){vFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vFe(e,t,n){return t=yFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yFe(e){var t=bFe(e,"string");return bm(t)=="symbol"?t:t+""}function bFe(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gd={widthCache:{},cacheCount:0},wFe=2e3,SFe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},IL="recharts_measurement_span";function TFe(e){var t=Zk({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var jp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nh.isSsr)return{width:0,height:0};var r=TFe(n),o=JSON.stringify({text:t,copyStyle:r});if(gd.widthCache[o])return gd.widthCache[o];try{var a=document.getElementById(IL);a||(a=document.createElement("span"),a.setAttribute("id",IL),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var i=Zk(Zk({},SFe),r);Object.assign(a.style,i),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return gd.widthCache[o]=l,++gd.cacheCount>wFe&&(gd.cacheCount=0,gd.widthCache={}),l}catch{return{width:0,height:0}}},xFe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function wm(e){"@babel/helpers - typeof";return wm=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},wm(e)}function sw(e,t){return CFe(e)||EFe(e,t)||kFe(e,t)||IFe()}function IFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kFe(e,t){if(e){if(typeof e=="string")return kL(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 kL(e,t)}}function kL(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 EFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function CFe(e){if(Array.isArray(e))return e}function MFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EL(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,AFe(r.key),r)}}function DFe(e,t,n){return t&&EL(e.prototype,t),n&&EL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function AFe(e){var t=NFe(e,"string");return wm(t)=="symbol"?t:t+""}function NFe(e,t){if(wm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var CL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ML=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OFe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,PFe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,uY={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},jFe=Object.keys(uY),Cd="NaN";function LFe(e,t){return e*uY[t]}var Iy=function(){function e(t,n){MFe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!OFe.test(n)&&(this.num=NaN,this.unit=""),jFe.includes(n)&&(this.num=LFe(t,n),this.unit="px")}return DFe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,o=(r=PFe.exec(n))!==null&&r!==void 0?r:[],a=sw(o,3),i=a[1],s=a[2];return new e(parseFloat(i),s??"")}}])}();function dY(e){if(e.includes(Cd))return Cd;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=CL.exec(t))!==null&&n!==void 0?n:[],o=sw(r,4),a=o[1],i=o[2],s=o[3],l=Iy.parse(a??""),u=Iy.parse(s??""),f=i==="*"?l.multiply(u):l.divide(u);if(f.isNaN())return Cd;t=t.replace(CL,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,p=(h=ML.exec(t))!==null&&h!==void 0?h:[],m=sw(p,4),w=m[1],b=m[2],y=m[3],S=Iy.parse(w??""),x=Iy.parse(y??""),E=b==="+"?S.add(x):S.subtract(x);if(E.isNaN())return Cd;t=t.replace(ML,E.toString())}return t}var DL=/\(([^()]*)\)/;function RFe(e){for(var t=e;t.includes("(");){var n=DL.exec(t),r=sw(n,2),o=r[1];t=t.replace(DL,dY(o))}return t}function FFe(e){var t=e.replace(/\s+/g,"");return t=RFe(t),t=dY(t),t}function HFe(e){try{return FFe(e)}catch{return Cd}}function Ux(e){var t=HFe(e.slice(5,-1));return t===Cd?"":t}var BFe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_Fe=["dx","dy","angle","className","breakAll"];function qk(){return qk=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},qk.apply(this,arguments)}function AL(e,t){if(e==null)return{};var n=YFe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YFe(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 NL(e,t){return WFe(e)||VFe(e,t)||UFe(e,t)||zFe()}function zFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UFe(e,t){if(e){if(typeof e=="string")return OL(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 OL(e,t)}}function OL(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 VFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function WFe(e){if(Array.isArray(e))return e}var fY=/[ \f\n\r\t\v\u2028\u2029]+/,hY=function(t){var n=t.children,r=t.breakAll,o=t.style;try{var a=[];jt(n)||(r?a=n.toString().split(""):a=n.toString().split(fY));var i=a.map(function(l){return{word:l,width:jp(l,o).width}}),s=r?0:jp(" ",o).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}},GFe=function(t,n,r,o,a){var i=t.maxLines,s=t.children,l=t.style,u=t.breakAll,f=Ke(i),h=s,p=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(V,ne){var Q=ne.word,te=ne.width,G=V[V.length-1];if(G&&(o==null||a||G.width+te+r<Number(o)))G.words.push(Q),G.width+=te+r;else{var X={words:[Q],width:te};V.push(X)}return V},[])},m=p(n),w=function($){return $.reduce(function(V,ne){return V.width>ne.width?V:ne})};if(!f)return m;for(var b="…",y=function($){var V=h.slice(0,$),ne=hY({breakAll:u,style:l,children:V+b}).wordsWithComputedWidth,Q=p(ne),te=Q.length>i||w(Q).width>Number(o);return[te,Q]},S=0,x=h.length-1,E=0,C;S<=x&&E<=h.length-1;){var M=Math.floor((S+x)/2),k=M-1,O=y(k),F=NL(O,2),R=F[0],B=F[1],Y=y(M),H=NL(Y,1),Z=H[0];if(!R&&!Z&&(S=M+1),R&&Z&&(x=M-1),!R&&Z){C=B;break}E++}return C||m},PL=function(t){var n=jt(t)?[]:t.toString().split(fY);return[{words:n}]},ZFe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,a=t.style,i=t.breakAll,s=t.maxLines;if((n||r)&&!nh.isSsr){var l,u,f=hY({breakAll:i,children:o,style:a});if(f){var h=f.wordsWithComputedWidth,p=f.spaceWidth;l=h,u=p}else return PL(o);return GFe({breakAll:i,children:o,maxLines:s,style:a},l,u,n,r)}return PL(o)},jL="#808080",lw=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,a=o===void 0?0:o,i=t.lineHeight,s=i===void 0?"1em":i,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,h=f===void 0?!1:f,p=t.textAnchor,m=p===void 0?"start":p,w=t.verticalAnchor,b=w===void 0?"end":w,y=t.fill,S=y===void 0?jL:y,x=AL(t,BFe),E=D.useMemo(function(){return ZFe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:h,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,h,x.style,x.width]),C=x.dx,M=x.dy,k=x.angle,O=x.className,F=x.breakAll,R=AL(x,_Fe);if(!Qn(r)||!Qn(a))return null;var B=r+(Ke(C)?C:0),Y=a+(Ke(M)?M:0),H;switch(b){case"start":H=Ux("calc(".concat(u,")"));break;case"middle":H=Ux("calc(".concat((E.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:H=Ux("calc(".concat(E.length-1," * -").concat(s,")"));break}var Z=[];if(h){var W=E[0].width,$=x.width;Z.push("scale(".concat((Ke($)?$/W:1)/W,")"))}return k&&Z.push("rotate(".concat(k,", ").concat(B,", ").concat(Y,")")),Z.length&&(R.transform=Z.join(" ")),_.createElement("text",qk({},Rt(R,!0),{x:B,y:Y,className:Ut("recharts-text",O),textAnchor:m,fill:S.includes("url")?jL:S}),E.map(function(V,ne){var Q=V.words.join(F?"":" ");return _.createElement("tspan",{x:B,dy:ne===0?H:s,key:"".concat(Q,"-").concat(ne)},Q)}))};function Ul(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qFe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function OD(e){let t,n,r;e.length!==2?(t=Ul,n=(s,l)=>Ul(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ul||e===qFe?e:$Fe,n=e,r=e);function o(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const h=u+f>>>1;n(s[h],l)<0?u=h+1:f=h}while(u<f)}return u}function a(s,l,u=0,f=s.length){if(u<f){if(t(l,l)!==0)return f;do{const h=u+f>>>1;n(s[h],l)<=0?u=h+1:f=h}while(u<f)}return u}function i(s,l,u=0,f=s.length){const h=o(s,l,u,f-1);return h>u&&r(s[h-1],l)>-r(s[h],l)?h-1:h}return{left:o,center:i,right:a}}function $Fe(){return 0}function pY(e){return e===null?NaN:+e}function*KFe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const JFe=OD(Ul),zg=JFe.right;OD(pY).center;class LL extends Map{constructor(t,n=e6e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(RL(this,t))}has(t){return super.has(RL(this,t))}set(t,n){return super.set(XFe(this,t),n)}delete(t){return super.delete(QFe(this,t))}}function RL({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function XFe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function QFe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function e6e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function t6e(e=Ul){if(e===Ul)return mY;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function mY(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const n6e=Math.sqrt(50),r6e=Math.sqrt(10),o6e=Math.sqrt(2);function cw(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),a=r/Math.pow(10,o),i=a>=n6e?10:a>=r6e?5:a>=o6e?2:1;let s,l,u;return o<0?(u=Math.pow(10,-o)/i,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,o)*i,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?cw(e,t,n*2):[s,l,u]}function $k(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,a,i]=r?cw(t,e,n):cw(e,t,n);if(!(a>=o))return[];const s=a-o+1,l=new Array(s);if(r)if(i<0)for(let u=0;u<s;++u)l[u]=(a-u)/-i;else for(let u=0;u<s;++u)l[u]=(a-u)*i;else if(i<0)for(let u=0;u<s;++u)l[u]=(o+u)/-i;else for(let u=0;u<s;++u)l[u]=(o+u)*i;return l}function Kk(e,t,n){return t=+t,e=+e,n=+n,cw(e,t,n)[2]}function Jk(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?Kk(t,e,n):Kk(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function FL(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function HL(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function gY(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?mY:t6e(o);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),h=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*h*(l-h)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*h/l+p)),w=Math.min(r,Math.floor(t+(l-u)*h/l+p));gY(e,t,m,w,o)}const a=e[t];let i=n,s=r;for(np(e,n,t),o(e[r],a)>0&&np(e,n,r);i<s;){for(np(e,i,s),++i,--s;o(e[i],a)<0;)++i;for(;o(e[s],a)>0;)--s}o(e[n],a)===0?np(e,n,s):(++s,np(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function np(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function a6e(e,t,n){if(e=Float64Array.from(KFe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return HL(e);if(t>=1)return FL(e);var r,o=(r-1)*t,a=Math.floor(o),i=FL(gY(e,a).subarray(0,a+1)),s=HL(e.subarray(a+1));return i+(s-i)*(o-a)}}function i6e(e,t,n=pY){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,a=Math.floor(o),i=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return i+(s-i)*(o-a)}}function s6e(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(o);++r<o;)a[r]=e+r*n;return a}function Da(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ol(e,t){switch(arguments.length){case 0:break;case 1:typeof e=="function"?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}return this}const Xk=Symbol("implicit");function PD(){var e=new LL,t=[],n=[],r=Xk;function o(a){let i=e.get(a);if(i===void 0){if(r!==Xk)return r;e.set(a,i=t.push(a)-1)}return n[i%n.length]}return o.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new LL;for(const i of a)e.has(i)||e.set(i,t.push(i)-1);return o},o.range=function(a){return arguments.length?(n=Array.from(a),o):n.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.copy=function(){return PD(t,n).unknown(r)},Da.apply(o,arguments),o}function Sm(){var e=PD().unknown(void 0),t=e.domain,n=e.range,r=0,o=1,a,i,s=!1,l=0,u=0,f=.5;delete e.unknown;function h(){var p=t().length,m=o<r,w=m?o:r,b=m?r:o;a=(b-w)/Math.max(1,p-l+u*2),s&&(a=Math.floor(a)),w+=(b-w-a*(p-l))*f,i=a*(1-l),s&&(w=Math.round(w),i=Math.round(i));var y=s6e(p).map(function(S){return w+a*S});return n(m?y.reverse():y)}return e.domain=function(p){return arguments.length?(t(p),h()):t()},e.range=function(p){return arguments.length?([r,o]=p,r=+r,o=+o,h()):[r,o]},e.rangeRound=function(p){return[r,o]=p,r=+r,o=+o,s=!0,h()},e.bandwidth=function(){return i},e.step=function(){return a},e.round=function(p){return arguments.length?(s=!!p,h()):s},e.padding=function(p){return arguments.length?(l=Math.min(1,u=+p),h()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),h()):l},e.paddingOuter=function(p){return arguments.length?(u=+p,h()):u},e.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),h()):f},e.copy=function(){return Sm(t(),[r,o]).round(s).paddingInner(l).paddingOuter(u).align(f)},Da.apply(h(),arguments)}function vY(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return vY(t())},e}function Lp(){return vY(Sm.apply(null,arguments).paddingInner(1))}function jD(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yY(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ug(){}var Tm=.7,uw=1/Tm,Ld="\\s*([+-]?\\d+)\\s*",xm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$i="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l6e=/^#([0-9a-f]{3,8})$/,c6e=new RegExp(`^rgb\\(${Ld},${Ld},${Ld}\\)$`),u6e=new RegExp(`^rgb\\(${$i},${$i},${$i}\\)$`),d6e=new RegExp(`^rgba\\(${Ld},${Ld},${Ld},${xm}\\)$`),f6e=new RegExp(`^rgba\\(${$i},${$i},${$i},${xm}\\)$`),h6e=new RegExp(`^hsl\\(${xm},${$i},${$i}\\)$`),p6e=new RegExp(`^hsla\\(${xm},${$i},${$i},${xm}\\)$`),BL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jD(Ug,Im,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_L,formatHex:_L,formatHex8:m6e,formatHsl:g6e,formatRgb:YL,toString:YL});function _L(){return this.rgb().formatHex()}function m6e(){return this.rgb().formatHex8()}function g6e(){return bY(this).formatHsl()}function YL(){return this.rgb().formatRgb()}function Im(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=l6e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?zL(t):n===3?new Mo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ky(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ky(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=c6e.exec(e))?new Mo(t[1],t[2],t[3],1):(t=u6e.exec(e))?new Mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=d6e.exec(e))?ky(t[1],t[2],t[3],t[4]):(t=f6e.exec(e))?ky(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=h6e.exec(e))?WL(t[1],t[2]/100,t[3]/100,1):(t=p6e.exec(e))?WL(t[1],t[2]/100,t[3]/100,t[4]):BL.hasOwnProperty(e)?zL(BL[e]):e==="transparent"?new Mo(NaN,NaN,NaN,0):null}function zL(e){return new Mo(e>>16&255,e>>8&255,e&255,1)}function ky(e,t,n,r){return r<=0&&(e=t=n=NaN),new Mo(e,t,n,r)}function v6e(e){return e instanceof Ug||(e=Im(e)),e?(e=e.rgb(),new Mo(e.r,e.g,e.b,e.opacity)):new Mo}function Qk(e,t,n,r){return arguments.length===1?v6e(e):new Mo(e,t,n,r??1)}function Mo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}jD(Mo,Qk,yY(Ug,{brighter(e){return e=e==null?uw:Math.pow(uw,e),new Mo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Tm:Math.pow(Tm,e),new Mo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mo(eu(this.r),eu(this.g),eu(this.b),dw(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:UL,formatHex:UL,formatHex8:y6e,formatRgb:VL,toString:VL}));function UL(){return`#${Wc(this.r)}${Wc(this.g)}${Wc(this.b)}`}function y6e(){return`#${Wc(this.r)}${Wc(this.g)}${Wc(this.b)}${Wc((isNaN(this.opacity)?1:this.opacity)*255)}`}function VL(){const e=dw(this.opacity);return`${e===1?"rgb(":"rgba("}${eu(this.r)}, ${eu(this.g)}, ${eu(this.b)}${e===1?")":`, ${e})`}`}function dw(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wc(e){return e=eu(e),(e<16?"0":"")+e.toString(16)}function WL(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Xa(e,t,n,r)}function bY(e){if(e instanceof Xa)return new Xa(e.h,e.s,e.l,e.opacity);if(e instanceof Ug||(e=Im(e)),!e)return new Xa;if(e instanceof Xa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(t===a?i=(n-r)/s+(n<r)*6:n===a?i=(r-t)/s+2:i=(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new Xa(i,s,l,e.opacity)}function b6e(e,t,n,r){return arguments.length===1?bY(e):new Xa(e,t,n,r??1)}function Xa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}jD(Xa,b6e,yY(Ug,{brighter(e){return e=e==null?uw:Math.pow(uw,e),new Xa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Tm:Math.pow(Tm,e),new Xa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Mo(Vx(e>=240?e-240:e+120,o,r),Vx(e,o,r),Vx(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Xa(GL(this.h),Ey(this.s),Ey(this.l),dw(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=dw(this.opacity);return`${e===1?"hsl(":"hsla("}${GL(this.h)}, ${Ey(this.s)*100}%, ${Ey(this.l)*100}%${e===1?")":`, ${e})`}`}}));function GL(e){return e=(e||0)%360,e<0?e+360:e}function Ey(e){return Math.max(0,Math.min(1,e||0))}function Vx(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const LD=e=>()=>e;function w6e(e,t){return function(n){return e+n*t}}function S6e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function T6e(e){return(e=+e)==1?wY:function(t,n){return n-t?S6e(t,n,e):LD(isNaN(t)?n:t)}}function wY(e,t){var n=t-e;return n?w6e(e,n):LD(isNaN(e)?t:e)}const ZL=function e(t){var n=T6e(t);function r(o,a){var i=n((o=Qk(o)).r,(a=Qk(a)).r),s=n(o.g,a.g),l=n(o.b,a.b),u=wY(o.opacity,a.opacity);return function(f){return o.r=i(f),o.g=s(f),o.b=l(f),o.opacity=u(f),o+""}}return r.gamma=e,r}(1);function x6e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(a){for(o=0;o<n;++o)r[o]=e[o]*(1-a)+t[o]*a;return r}}function I6e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function k6e(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),a=new Array(n),i;for(i=0;i<r;++i)o[i]=rh(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<r;++i)a[i]=o[i](s);return a}}function E6e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fw(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function C6e(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=rh(e[o],t[o]):r[o]=t[o];return function(a){for(o in n)r[o]=n[o](a);return r}}var eE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wx=new RegExp(eE.source,"g");function M6e(e){return function(){return e}}function D6e(e){return function(t){return e(t)+""}}function A6e(e,t){var n=eE.lastIndex=Wx.lastIndex=0,r,o,a,i=-1,s=[],l=[];for(e+="",t+="";(r=eE.exec(e))&&(o=Wx.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(r=r[0])===(o=o[0])?s[i]?s[i]+=o:s[++i]=o:(s[++i]=null,l.push({i,x:fw(r,o)})),n=Wx.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?D6e(l[0].x):M6e(t):(t=l.length,function(u){for(var f=0,h;f<t;++f)s[(h=l[f]).i]=h.x(u);return s.join("")})}function rh(e,t){var n=typeof t,r;return t==null||n==="boolean"?LD(t):(n==="number"?fw:n==="string"?(r=Im(t))?(t=r,ZL):A6e:t instanceof Im?ZL:t instanceof Date?E6e:I6e(t)?x6e:Array.isArray(t)?k6e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?C6e:fw)(e,t)}function RD(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function N6e(e,t){t===void 0&&(t=e,e=rh);for(var n=0,r=t.length-1,o=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(o,o=t[++n]);return function(i){var s=Math.max(0,Math.min(r-1,Math.floor(i*=r)));return a[s](i-s)}}function O6e(e){return function(){return e}}function hw(e){return+e}var qL=[0,1];function to(e){return e}function tE(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:O6e(isNaN(t)?NaN:.5)}function P6e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function j6e(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o<r?(r=tE(o,r),a=n(i,a)):(r=tE(r,o),a=n(a,i)),function(s){return a(r(s))}}function L6e(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),a=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)o[i]=tE(e[i],e[i+1]),a[i]=n(t[i],t[i+1]);return function(s){var l=zg(e,s,1,r)-1;return a[l](o[l](s))}}function Vg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dS(){var e=qL,t=qL,n=rh,r,o,a,i=to,s,l,u;function f(){var p=Math.min(e.length,t.length);return i!==to&&(i=P6e(e[0],e[p-1])),s=p>2?L6e:j6e,l=u=null,h}function h(p){return p==null||isNaN(p=+p)?a:(l||(l=s(e.map(r),t,n)))(r(i(p)))}return h.invert=function(p){return i(o((u||(u=s(t,e.map(r),fw)))(p)))},h.domain=function(p){return arguments.length?(e=Array.from(p,hw),f()):e.slice()},h.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},h.rangeRound=function(p){return t=Array.from(p),n=RD,f()},h.clamp=function(p){return arguments.length?(i=p?!0:to,f()):i!==to},h.interpolate=function(p){return arguments.length?(n=p,f()):n},h.unknown=function(p){return arguments.length?(a=p,h):a},function(p,m){return r=p,o=m,f()}}function FD(){return dS()(to,to)}function R6e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function pw(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function af(e){return e=pw(Math.abs(e)),e?e[1]:NaN}function F6e(e,t){return function(n,r){for(var o=n.length,a=[],i=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[i=(i+1)%e.length];return a.reverse().join(t)}}function H6e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var B6e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function km(e){if(!(t=B6e.exec(e)))throw new Error("invalid format: "+e);var t;return new HD({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}km.prototype=HD.prototype;function HD(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}HD.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _6e(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var SY;function Y6e(e,t){var n=pw(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(SY=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+pw(e,Math.max(0,t+a-1))[0]}function $L(e,t){var n=pw(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const KL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:R6e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>$L(e*100,t),r:$L,s:Y6e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function JL(e){return e}var XL=Array.prototype.map,QL=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z6e(e){var t=e.grouping===void 0||e.thousands===void 0?JL:F6e(XL.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?JL:H6e(XL.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(h){h=km(h);var p=h.fill,m=h.align,w=h.sign,b=h.symbol,y=h.zero,S=h.width,x=h.comma,E=h.precision,C=h.trim,M=h.type;M==="n"?(x=!0,M="g"):KL[M]||(E===void 0&&(E=12),C=!0,M="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var k=b==="$"?n:b==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():"",O=b==="$"?r:/[%p]/.test(M)?i:"",F=KL[M],R=/[defgprs%]/.test(M);E=E===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function B(Y){var H=k,Z=O,W,$,V;if(M==="c")Z=F(Y)+Z,Y="";else{Y=+Y;var ne=Y<0||1/Y<0;if(Y=isNaN(Y)?l:F(Math.abs(Y),E),C&&(Y=_6e(Y)),ne&&+Y==0&&w!=="+"&&(ne=!1),H=(ne?w==="("?w:s:w==="-"||w==="("?"":w)+H,Z=(M==="s"?QL[8+SY/3]:"")+Z+(ne&&w==="("?")":""),R){for(W=-1,$=Y.length;++W<$;)if(V=Y.charCodeAt(W),48>V||V>57){Z=(V===46?o+Y.slice(W+1):Y.slice(W))+Z,Y=Y.slice(0,W);break}}}x&&!y&&(Y=t(Y,1/0));var Q=H.length+Y.length+Z.length,te=Q<S?new Array(S-Q+1).join(p):"";switch(x&&y&&(Y=t(te+Y,te.length?S-Z.length:1/0),te=""),m){case"<":Y=H+Y+Z+te;break;case"=":Y=H+te+Y+Z;break;case"^":Y=te.slice(0,Q=te.length>>1)+H+Y+Z+te.slice(Q);break;default:Y=te+H+Y+Z;break}return a(Y)}return B.toString=function(){return h+""},B}function f(h,p){var m=u((h=km(h),h.type="f",h)),w=Math.max(-8,Math.min(8,Math.floor(af(p)/3)))*3,b=Math.pow(10,-w),y=QL[8+w/3];return function(S){return m(b*S)+y}}return{format:u,formatPrefix:f}}var Cy,BD,TY;U6e({thousands:",",grouping:[3],currency:["$",""]});function U6e(e){return Cy=z6e(e),BD=Cy.format,TY=Cy.formatPrefix,Cy}function V6e(e){return Math.max(0,-af(Math.abs(e)))}function W6e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(af(t)/3)))*3-af(Math.abs(e)))}function G6e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,af(t)-af(e))+1}function xY(e,t,n,r){var o=Jk(e,t,n),a;switch(r=km(r??",f"),r.type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=W6e(o,i))&&(r.precision=a),TY(r,i);case"":case"e":case"g":case"p":case"r":r.precision==null&&!isNaN(a=G6e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break;case"f":case"%":r.precision==null&&!isNaN(a=V6e(o))&&(r.precision=a-(r.type==="%")*2);break}return BD(r)}function ec(e){var t=e.domain;return e.ticks=function(n){var r=t();return $k(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return xY(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,a=r.length-1,i=r[o],s=r[a],l,u,f=10;for(s<i&&(u=i,i=s,s=u,u=o,o=a,a=u);f-- >0;){if(u=Kk(i,s,n),u===l)return r[o]=i,r[a]=s,t(r);if(u>0)i=Math.floor(i/u)*u,s=Math.ceil(s/u)*u;else if(u<0)i=Math.ceil(i*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function mw(){var e=FD();return e.copy=function(){return Vg(e,mw())},Da.apply(e,arguments),ec(e)}function IY(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,hw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return IY(e).unknown(t)},e=arguments.length?Array.from(e,hw):[0,1],ec(n)}function kY(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],a=e[r],i;return a<o&&(i=n,n=r,r=i,i=o,o=a,a=i),e[n]=t.floor(o),e[r]=t.ceil(a),e}function eR(e){return Math.log(e)}function tR(e){return Math.exp(e)}function Z6e(e){return-Math.log(-e)}function q6e(e){return-Math.exp(-e)}function $6e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function K6e(e){return e===10?$6e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function J6e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function nR(e){return(t,n)=>-e(-t,n)}function _D(e){const t=e(eR,tR),n=t.domain;let r=10,o,a;function i(){return o=J6e(r),a=K6e(r),n()[0]<0?(o=nR(o),a=nR(a),e(Z6e,q6e)):e(eR,tR),t}return t.base=function(s){return arguments.length?(r=+s,i()):r},t.domain=function(s){return arguments.length?(n(s),i()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const h=f<u;h&&([u,f]=[f,u]);let p=o(u),m=o(f),w,b;const y=s==null?10:+s;let S=[];if(!(r%1)&&m-p<y){if(p=Math.floor(p),m=Math.ceil(m),u>0){for(;p<=m;++p)for(w=1;w<r;++w)if(b=p<0?w/a(-p):w*a(p),!(b<u)){if(b>f)break;S.push(b)}}else for(;p<=m;++p)for(w=r-1;w>=1;--w)if(b=p>0?w/a(-p):w*a(p),!(b<u)){if(b>f)break;S.push(b)}S.length*2<y&&(S=$k(u,f,y))}else S=$k(p,m,Math.min(m-p,y)).map(a);return h?S.reverse():S},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=km(l)).precision==null&&(l.trim=!0),l=BD(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let h=f/a(Math.round(o(f)));return h*r<r-.5&&(h*=r),h<=u?l(f):""}},t.nice=()=>n(kY(n(),{floor:s=>a(Math.floor(o(s))),ceil:s=>a(Math.ceil(o(s)))})),t}function EY(){const e=_D(dS()).domain([1,10]);return e.copy=()=>Vg(e,EY()).base(e.base()),Da.apply(e,arguments),e}function rR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function oR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function YD(e){var t=1,n=e(rR(t),oR(t));return n.constant=function(r){return arguments.length?e(rR(t=+r),oR(t)):t},ec(n)}function CY(){var e=YD(dS());return e.copy=function(){return Vg(e,CY()).constant(e.constant())},Da.apply(e,arguments)}function aR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function X6e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Q6e(e){return e<0?-e*e:e*e}function zD(e){var t=e(to,to),n=1;function r(){return n===1?e(to,to):n===.5?e(X6e,Q6e):e(aR(n),aR(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},ec(t)}function UD(){var e=zD(dS());return e.copy=function(){return Vg(e,UD()).exponent(e.exponent())},Da.apply(e,arguments),e}function e8e(){return UD.apply(null,arguments).exponent(.5)}function iR(e){return Math.sign(e)*e*e}function t8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function MY(){var e=FD(),t=[0,1],n=!1,r;function o(a){var i=t8e(e(a));return isNaN(i)?r:n?Math.round(i):i}return o.invert=function(a){return e.invert(iR(a))},o.domain=function(a){return arguments.length?(e.domain(a),o):e.domain()},o.range=function(a){return arguments.length?(e.range((t=Array.from(a,hw)).map(iR)),o):t.slice()},o.rangeRound=function(a){return o.range(a).round(!0)},o.round=function(a){return arguments.length?(n=!!a,o):n},o.clamp=function(a){return arguments.length?(e.clamp(a),o):e.clamp()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.copy=function(){return MY(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Da.apply(o,arguments),ec(o)}function DY(){var e=[],t=[],n=[],r;function o(){var i=0,s=Math.max(1,t.length);for(n=new Array(s-1);++i<s;)n[i-1]=i6e(e,i/s);return a}function a(i){return i==null||isNaN(i=+i)?r:t[zg(n,i)]}return a.invertExtent=function(i){var s=t.indexOf(i);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let s of i)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Ul),o()},a.range=function(i){return arguments.length?(t=Array.from(i),o()):t.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return DY().domain(e).range(t).unknown(r)},Da.apply(a,arguments)}function AY(){var e=0,t=1,n=1,r=[.5],o=[0,1],a;function i(l){return l!=null&&l<=l?o[zg(r,l,0,n)]:a}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return i}return i.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},i.range=function(l){return arguments.length?(n=(o=Array.from(l)).length-1,s()):o.slice()},i.invertExtent=function(l){var u=o.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},i.unknown=function(l){return arguments.length&&(a=l),i},i.thresholds=function(){return r.slice()},i.copy=function(){return AY().domain([e,t]).range(o).unknown(a)},Da.apply(ec(i),arguments)}function NY(){var e=[.5],t=[0,1],n,r=1;function o(a){return a!=null&&a<=a?t[zg(e,a,0,r)]:n}return o.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(a){var i=t.indexOf(a);return[e[i-1],e[i]]},o.unknown=function(a){return arguments.length?(n=a,o):n},o.copy=function(){return NY().domain(e).range(t).unknown(n)},Da.apply(o,arguments)}const Gx=new Date,Zx=new Date;function rr(e,t,n,r){function o(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return o.floor=a=>(e(a=new Date(+a)),a),o.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),o.round=a=>{const i=o(a),s=o.ceil(a);return a-i<s-a?i:s},o.offset=(a,i)=>(t(a=new Date(+a),i==null?1:Math.floor(i)),a),o.range=(a,i,s)=>{const l=[];if(a=o.ceil(a),s=s==null?1:Math.floor(s),!(a<i)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<i);return l},o.filter=a=>rr(i=>{if(i>=i)for(;e(i),!a(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!a(i););else for(;--s>=0;)for(;t(i,1),!a(i););}),n&&(o.count=(a,i)=>(Gx.setTime(+a),Zx.setTime(+i),e(Gx),e(Zx),Math.floor(n(Gx,Zx))),o.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?o.filter(r?i=>r(i)%a===0:i=>o.count(0,i)%a===0):o)),o}const gw=rr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);gw.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?rr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):gw);gw.range;const Ds=1e3,ga=Ds*60,As=ga*60,Gs=As*24,VD=Gs*7,sR=Gs*30,qx=Gs*365,Gc=rr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ds)},(e,t)=>(t-e)/Ds,e=>e.getUTCSeconds());Gc.range;const WD=rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ds)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getMinutes());WD.range;const GD=rr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getUTCMinutes());GD.range;const ZD=rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ds-e.getMinutes()*ga)},(e,t)=>{e.setTime(+e+t*As)},(e,t)=>(t-e)/As,e=>e.getHours());ZD.range;const qD=rr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*As)},(e,t)=>(t-e)/As,e=>e.getUTCHours());qD.range;const Wg=rr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ga)/Gs,e=>e.getDate()-1);Wg.range;const fS=rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gs,e=>e.getUTCDate()-1);fS.range;const OY=rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Gs,e=>Math.floor(e/Gs));OY.range;function Eu(e){return rr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ga)/VD)}const hS=Eu(0),vw=Eu(1),n8e=Eu(2),r8e=Eu(3),sf=Eu(4),o8e=Eu(5),a8e=Eu(6);hS.range;vw.range;n8e.range;r8e.range;sf.range;o8e.range;a8e.range;function Cu(e){return rr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/VD)}const pS=Cu(0),yw=Cu(1),i8e=Cu(2),s8e=Cu(3),lf=Cu(4),l8e=Cu(5),c8e=Cu(6);pS.range;yw.range;i8e.range;s8e.range;lf.range;l8e.range;c8e.range;const $D=rr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());$D.range;const KD=rr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());KD.range;const Zs=rr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Zs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Zs.range;const qs=rr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());qs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:rr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});qs.range;function PY(e,t,n,r,o,a){const i=[[Gc,1,Ds],[Gc,5,5*Ds],[Gc,15,15*Ds],[Gc,30,30*Ds],[a,1,ga],[a,5,5*ga],[a,15,15*ga],[a,30,30*ga],[o,1,As],[o,3,3*As],[o,6,6*As],[o,12,12*As],[r,1,Gs],[r,2,2*Gs],[n,1,VD],[t,1,sR],[t,3,3*sR],[e,1,qx]];function s(u,f,h){const p=f<u;p&&([u,f]=[f,u]);const m=h&&typeof h.range=="function"?h:l(u,f,h),w=m?m.range(u,+f+1):[];return p?w.reverse():w}function l(u,f,h){const p=Math.abs(f-u)/h,m=OD(([,,y])=>y).right(i,p);if(m===i.length)return e.every(Jk(u/qx,f/qx,h));if(m===0)return gw.every(Math.max(Jk(u,f,h),1));const[w,b]=i[p/i[m-1][2]<i[m][2]/p?m-1:m];return w.every(b)}return[s,l]}const[u8e,d8e]=PY(qs,KD,pS,OY,qD,GD),[f8e,h8e]=PY(Zs,$D,hS,Wg,ZD,WD);function $x(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Kx(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function p8e(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,u=op(o),f=ap(o),h=op(a),p=ap(a),m=op(i),w=ap(i),b=op(s),y=ap(s),S=op(l),x=ap(l),E={a:ne,A:Q,b:te,B:G,c:null,d:hR,e:hR,f:F8e,g:Z8e,G:$8e,H:j8e,I:L8e,j:R8e,L:jY,m:H8e,M:B8e,p:X,q:ee,Q:gR,s:vR,S:_8e,u:Y8e,U:z8e,V:U8e,w:V8e,W:W8e,x:null,X:null,y:G8e,Y:q8e,Z:K8e,"%":mR},C={a:ie,A:fe,b:he,B:we,c:null,d:pR,e:pR,f:eHe,g:uHe,G:fHe,H:J8e,I:X8e,j:Q8e,L:RY,m:tHe,M:nHe,p:Ne,q:Ae,Q:gR,s:vR,S:rHe,u:oHe,U:aHe,V:iHe,w:sHe,W:lHe,x:null,X:null,y:cHe,Y:dHe,Z:hHe,"%":mR},M={a:B,A:Y,b:H,B:Z,c:W,d:dR,e:dR,f:A8e,g:uR,G:cR,H:fR,I:fR,j:E8e,L:D8e,m:k8e,M:C8e,p:R,q:I8e,Q:O8e,s:P8e,S:M8e,u:b8e,U:w8e,V:S8e,w:y8e,W:T8e,x:$,X:V,y:uR,Y:cR,Z:x8e,"%":N8e};E.x=k(n,E),E.X=k(r,E),E.c=k(t,E),C.x=k(n,C),C.X=k(r,C),C.c=k(t,C);function k(Te,Fe){return function(We){var ke=[],Ie=-1,ce=0,Pe=Te.length,Oe,Ve,tt;for(We instanceof Date||(We=new Date(+We));++Ie<Pe;)Te.charCodeAt(Ie)===37&&(ke.push(Te.slice(ce,Ie)),(Ve=lR[Oe=Te.charAt(++Ie)])!=null?Oe=Te.charAt(++Ie):Ve=Oe==="e"?" ":"0",(tt=Fe[Oe])&&(Oe=tt(We,Ve)),ke.push(Oe),ce=Ie+1);return ke.push(Te.slice(ce,Ie)),ke.join("")}}function O(Te,Fe){return function(We){var ke=rp(1900,void 0,1),Ie=F(ke,Te,We+="",0),ce,Pe;if(Ie!=We.length)return null;if("Q"in ke)return new Date(ke.Q);if("s"in ke)return new Date(ke.s*1e3+("L"in ke?ke.L:0));if(Fe&&!("Z"in ke)&&(ke.Z=0),"p"in ke&&(ke.H=ke.H%12+ke.p*12),ke.m===void 0&&(ke.m="q"in ke?ke.q:0),"V"in ke){if(ke.V<1||ke.V>53)return null;"w"in ke||(ke.w=1),"Z"in ke?(ce=Kx(rp(ke.y,0,1)),Pe=ce.getUTCDay(),ce=Pe>4||Pe===0?yw.ceil(ce):yw(ce),ce=fS.offset(ce,(ke.V-1)*7),ke.y=ce.getUTCFullYear(),ke.m=ce.getUTCMonth(),ke.d=ce.getUTCDate()+(ke.w+6)%7):(ce=$x(rp(ke.y,0,1)),Pe=ce.getDay(),ce=Pe>4||Pe===0?vw.ceil(ce):vw(ce),ce=Wg.offset(ce,(ke.V-1)*7),ke.y=ce.getFullYear(),ke.m=ce.getMonth(),ke.d=ce.getDate()+(ke.w+6)%7)}else("W"in ke||"U"in ke)&&("w"in ke||(ke.w="u"in ke?ke.u%7:"W"in ke?1:0),Pe="Z"in ke?Kx(rp(ke.y,0,1)).getUTCDay():$x(rp(ke.y,0,1)).getDay(),ke.m=0,ke.d="W"in ke?(ke.w+6)%7+ke.W*7-(Pe+5)%7:ke.w+ke.U*7-(Pe+6)%7);return"Z"in ke?(ke.H+=ke.Z/100|0,ke.M+=ke.Z%100,Kx(ke)):$x(ke)}}function F(Te,Fe,We,ke){for(var Ie=0,ce=Fe.length,Pe=We.length,Oe,Ve;Ie<ce;){if(ke>=Pe)return-1;if(Oe=Fe.charCodeAt(Ie++),Oe===37){if(Oe=Fe.charAt(Ie++),Ve=M[Oe in lR?Fe.charAt(Ie++):Oe],!Ve||(ke=Ve(Te,We,ke))<0)return-1}else if(Oe!=We.charCodeAt(ke++))return-1}return ke}function R(Te,Fe,We){var ke=u.exec(Fe.slice(We));return ke?(Te.p=f.get(ke[0].toLowerCase()),We+ke[0].length):-1}function B(Te,Fe,We){var ke=m.exec(Fe.slice(We));return ke?(Te.w=w.get(ke[0].toLowerCase()),We+ke[0].length):-1}function Y(Te,Fe,We){var ke=h.exec(Fe.slice(We));return ke?(Te.w=p.get(ke[0].toLowerCase()),We+ke[0].length):-1}function H(Te,Fe,We){var ke=S.exec(Fe.slice(We));return ke?(Te.m=x.get(ke[0].toLowerCase()),We+ke[0].length):-1}function Z(Te,Fe,We){var ke=b.exec(Fe.slice(We));return ke?(Te.m=y.get(ke[0].toLowerCase()),We+ke[0].length):-1}function W(Te,Fe,We){return F(Te,t,Fe,We)}function $(Te,Fe,We){return F(Te,n,Fe,We)}function V(Te,Fe,We){return F(Te,r,Fe,We)}function ne(Te){return i[Te.getDay()]}function Q(Te){return a[Te.getDay()]}function te(Te){return l[Te.getMonth()]}function G(Te){return s[Te.getMonth()]}function X(Te){return o[+(Te.getHours()>=12)]}function ee(Te){return 1+~~(Te.getMonth()/3)}function ie(Te){return i[Te.getUTCDay()]}function fe(Te){return a[Te.getUTCDay()]}function he(Te){return l[Te.getUTCMonth()]}function we(Te){return s[Te.getUTCMonth()]}function Ne(Te){return o[+(Te.getUTCHours()>=12)]}function Ae(Te){return 1+~~(Te.getUTCMonth()/3)}return{format:function(Te){var Fe=k(Te+="",E);return Fe.toString=function(){return Te},Fe},parse:function(Te){var Fe=O(Te+="",!1);return Fe.toString=function(){return Te},Fe},utcFormat:function(Te){var Fe=k(Te+="",C);return Fe.toString=function(){return Te},Fe},utcParse:function(Te){var Fe=O(Te+="",!0);return Fe.toString=function(){return Te},Fe}}}var lR={"-":"",_:" ",0:"0"},pr=/^\s*\d+/,m8e=/^%/,g8e=/[\\^$*+?|[\]().{}]/g;function Vt(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a<n?new Array(n-a+1).join(t)+o:o)}function v8e(e){return e.replace(g8e,"\\$&")}function op(e){return new RegExp("^(?:"+e.map(v8e).join("|")+")","i")}function ap(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function y8e(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function b8e(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function w8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function S8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function T8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function cR(e,t,n){var r=pr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function uR(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function x8e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function I8e(e,t,n){var r=pr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function k8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function dR(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function E8e(e,t,n){var r=pr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function fR(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function C8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function M8e(e,t,n){var r=pr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function D8e(e,t,n){var r=pr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A8e(e,t,n){var r=pr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function N8e(e,t,n){var r=m8e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function O8e(e,t,n){var r=pr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function P8e(e,t,n){var r=pr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function hR(e,t){return Vt(e.getDate(),t,2)}function j8e(e,t){return Vt(e.getHours(),t,2)}function L8e(e,t){return Vt(e.getHours()%12||12,t,2)}function R8e(e,t){return Vt(1+Wg.count(Zs(e),e),t,3)}function jY(e,t){return Vt(e.getMilliseconds(),t,3)}function F8e(e,t){return jY(e,t)+"000"}function H8e(e,t){return Vt(e.getMonth()+1,t,2)}function B8e(e,t){return Vt(e.getMinutes(),t,2)}function _8e(e,t){return Vt(e.getSeconds(),t,2)}function Y8e(e){var t=e.getDay();return t===0?7:t}function z8e(e,t){return Vt(hS.count(Zs(e)-1,e),t,2)}function LY(e){var t=e.getDay();return t>=4||t===0?sf(e):sf.ceil(e)}function U8e(e,t){return e=LY(e),Vt(sf.count(Zs(e),e)+(Zs(e).getDay()===4),t,2)}function V8e(e){return e.getDay()}function W8e(e,t){return Vt(vw.count(Zs(e)-1,e),t,2)}function G8e(e,t){return Vt(e.getFullYear()%100,t,2)}function Z8e(e,t){return e=LY(e),Vt(e.getFullYear()%100,t,2)}function q8e(e,t){return Vt(e.getFullYear()%1e4,t,4)}function $8e(e,t){var n=e.getDay();return e=n>=4||n===0?sf(e):sf.ceil(e),Vt(e.getFullYear()%1e4,t,4)}function K8e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vt(t/60|0,"0",2)+Vt(t%60,"0",2)}function pR(e,t){return Vt(e.getUTCDate(),t,2)}function J8e(e,t){return Vt(e.getUTCHours(),t,2)}function X8e(e,t){return Vt(e.getUTCHours()%12||12,t,2)}function Q8e(e,t){return Vt(1+fS.count(qs(e),e),t,3)}function RY(e,t){return Vt(e.getUTCMilliseconds(),t,3)}function eHe(e,t){return RY(e,t)+"000"}function tHe(e,t){return Vt(e.getUTCMonth()+1,t,2)}function nHe(e,t){return Vt(e.getUTCMinutes(),t,2)}function rHe(e,t){return Vt(e.getUTCSeconds(),t,2)}function oHe(e){var t=e.getUTCDay();return t===0?7:t}function aHe(e,t){return Vt(pS.count(qs(e)-1,e),t,2)}function FY(e){var t=e.getUTCDay();return t>=4||t===0?lf(e):lf.ceil(e)}function iHe(e,t){return e=FY(e),Vt(lf.count(qs(e),e)+(qs(e).getUTCDay()===4),t,2)}function sHe(e){return e.getUTCDay()}function lHe(e,t){return Vt(yw.count(qs(e)-1,e),t,2)}function cHe(e,t){return Vt(e.getUTCFullYear()%100,t,2)}function uHe(e,t){return e=FY(e),Vt(e.getUTCFullYear()%100,t,2)}function dHe(e,t){return Vt(e.getUTCFullYear()%1e4,t,4)}function fHe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?lf(e):lf.ceil(e),Vt(e.getUTCFullYear()%1e4,t,4)}function hHe(){return"+0000"}function mR(){return"%"}function gR(e){return+e}function vR(e){return Math.floor(+e/1e3)}var vd,HY,BY;pHe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pHe(e){return vd=p8e(e),HY=vd.format,vd.parse,BY=vd.utcFormat,vd.utcParse,vd}function mHe(e){return new Date(e)}function gHe(e){return e instanceof Date?+e:+new Date(+e)}function JD(e,t,n,r,o,a,i,s,l,u){var f=FD(),h=f.invert,p=f.domain,m=u(".%L"),w=u(":%S"),b=u("%I:%M"),y=u("%I %p"),S=u("%a %d"),x=u("%b %d"),E=u("%B"),C=u("%Y");function M(k){return(l(k)<k?m:s(k)<k?w:i(k)<k?b:a(k)<k?y:r(k)<k?o(k)<k?S:x:n(k)<k?E:C)(k)}return f.invert=function(k){return new Date(h(k))},f.domain=function(k){return arguments.length?p(Array.from(k,gHe)):p().map(mHe)},f.ticks=function(k){var O=p();return e(O[0],O[O.length-1],k??10)},f.tickFormat=function(k,O){return O==null?M:u(O)},f.nice=function(k){var O=p();return(!k||typeof k.range!="function")&&(k=t(O[0],O[O.length-1],k??10)),k?p(kY(O,k)):f},f.copy=function(){return Vg(f,JD(e,t,n,r,o,a,i,s,l,u))},f}function vHe(){return Da.apply(JD(f8e,h8e,Zs,$D,hS,Wg,ZD,WD,Gc,HY).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function yHe(){return Da.apply(JD(u8e,d8e,qs,KD,pS,fS,qD,GD,Gc,BY).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function mS(){var e=0,t=1,n,r,o,a,i=to,s=!1,l;function u(h){return h==null||isNaN(h=+h)?l:i(o===0?.5:(h=(a(h)-n)*o,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([e,t]=h,n=a(e=+e),r=a(t=+t),o=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(i=h,u):i};function f(h){return function(p){var m,w;return arguments.length?([m,w]=p,i=h(m,w),u):[i(0),i(1)]}}return u.range=f(rh),u.rangeRound=f(RD),u.unknown=function(h){return arguments.length?(l=h,u):l},function(h){return a=h,n=h(e),r=h(t),o=n===r?0:1/(r-n),u}}function tc(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _Y(){var e=ec(mS()(to));return e.copy=function(){return tc(e,_Y())},ol.apply(e,arguments)}function YY(){var e=_D(mS()).domain([1,10]);return e.copy=function(){return tc(e,YY()).base(e.base())},ol.apply(e,arguments)}function zY(){var e=YD(mS());return e.copy=function(){return tc(e,zY()).constant(e.constant())},ol.apply(e,arguments)}function XD(){var e=zD(mS());return e.copy=function(){return tc(e,XD()).exponent(e.exponent())},ol.apply(e,arguments)}function bHe(){return XD.apply(null,arguments).exponent(.5)}function UY(){var e=[],t=to;function n(r){if(r!=null&&!isNaN(r=+r))return t((zg(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let o of r)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(Ul),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,o)=>t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,a)=>a6e(e,a/r))},n.copy=function(){return UY(t).domain(e)},ol.apply(n,arguments)}function gS(){var e=0,t=.5,n=1,r=1,o,a,i,s,l,u=to,f,h=!1,p;function m(b){return isNaN(b=+b)?p:(b=.5+((b=+f(b))-a)*(r*b<r*a?s:l),u(h?Math.max(0,Math.min(1,b)):b))}m.domain=function(b){return arguments.length?([e,t,n]=b,o=f(e=+e),a=f(t=+t),i=f(n=+n),s=o===a?0:.5/(a-o),l=a===i?0:.5/(i-a),r=a<o?-1:1,m):[e,t,n]},m.clamp=function(b){return arguments.length?(h=!!b,m):h},m.interpolator=function(b){return arguments.length?(u=b,m):u};function w(b){return function(y){var S,x,E;return arguments.length?([S,x,E]=y,u=N6e(b,[S,x,E]),m):[u(0),u(.5),u(1)]}}return m.range=w(rh),m.rangeRound=w(RD),m.unknown=function(b){return arguments.length?(p=b,m):p},function(b){return f=b,o=b(e),a=b(t),i=b(n),s=o===a?0:.5/(a-o),l=a===i?0:.5/(i-a),r=a<o?-1:1,m}}function VY(){var e=ec(gS()(to));return e.copy=function(){return tc(e,VY())},ol.apply(e,arguments)}function WY(){var e=_D(gS()).domain([.1,1,10]);return e.copy=function(){return tc(e,WY()).base(e.base())},ol.apply(e,arguments)}function GY(){var e=YD(gS());return e.copy=function(){return tc(e,GY()).constant(e.constant())},ol.apply(e,arguments)}function QD(){var e=zD(gS());return e.copy=function(){return tc(e,QD()).exponent(e.exponent())},ol.apply(e,arguments)}function wHe(){return QD.apply(null,arguments).exponent(.5)}const yR=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Sm,scaleDiverging:VY,scaleDivergingLog:WY,scaleDivergingPow:QD,scaleDivergingSqrt:wHe,scaleDivergingSymlog:GY,scaleIdentity:IY,scaleImplicit:Xk,scaleLinear:mw,scaleLog:EY,scaleOrdinal:PD,scalePoint:Lp,scalePow:UD,scaleQuantile:DY,scaleQuantize:AY,scaleRadial:MY,scaleSequential:_Y,scaleSequentialLog:YY,scaleSequentialPow:XD,scaleSequentialQuantile:UY,scaleSequentialSqrt:bHe,scaleSequentialSymlog:zY,scaleSqrt:e8e,scaleSymlog:CY,scaleThreshold:NY,scaleTime:vHe,scaleUtc:yHe,tickFormat:xY},Symbol.toStringTag,{value:"Module"}));var SHe=Hf;function THe(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],i=t(a);if(i!=null&&(s===void 0?i===i&&!SHe(i):n(i,s)))var s=i,l=a}return l}var ZY=THe;function xHe(e,t){return e>t}var IHe=xHe,kHe=ZY,EHe=IHe,CHe=Wf;function MHe(e){return e&&e.length?kHe(e,CHe,EHe):void 0}var DHe=MHe;const vS=Xe(DHe);function AHe(e,t){return e<t}var NHe=AHe,OHe=ZY,PHe=NHe,jHe=Wf;function LHe(e){return e&&e.length?OHe(e,jHe,PHe):void 0}var RHe=LHe;const yS=Xe(RHe);var FHe=b0,HHe=el,BHe=b8,_He=Gr;function YHe(e,t){var n=_He(e)?FHe:BHe;return n(e,HHe(t))}var zHe=YHe,UHe=KC,VHe=zHe;function WHe(e,t){return UHe(VHe(e,t),1)}var GHe=WHe;const ZHe=Xe(GHe);var oh=1e9,qHe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},tA,kn=!0,ka="[DecimalError] ",tu=ka+"Invalid argument: ",eA=ka+"Exponent out of range: ",ah=Math.floor,Bc=Math.pow,$He=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$o,sr=1e7,Sn=7,qY=9007199254740991,bw=ah(qY/Sn),et={};et.absoluteValue=et.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};et.comparedTo=et.cmp=function(e){var t,n,r,o,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,o=e.d.length,t=0,n=r<o?r:o;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===o?0:r>o^a.s<0?1:-1};et.decimalPlaces=et.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Sn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};et.dividedBy=et.div=function(e){return _s(this,new this.constructor(e))};et.dividedToIntegerBy=et.idiv=function(e){var t=this,n=t.constructor;return un(_s(t,new n(e),0,1),n.precision)};et.equals=et.eq=function(e){return!this.cmp(e)};et.exponent=function(){return Gn(this)};et.greaterThan=et.gt=function(e){return this.cmp(e)>0};et.greaterThanOrEqualTo=et.gte=function(e){return this.cmp(e)>=0};et.isInteger=et.isint=function(){return this.e>this.d.length-2};et.isNegative=et.isneg=function(){return this.s<0};et.isPositive=et.ispos=function(){return this.s>0};et.isZero=function(){return this.s===0};et.lessThan=et.lt=function(e){return this.cmp(e)<0};et.lessThanOrEqualTo=et.lte=function(e){return this.cmp(e)<1};et.logarithm=et.log=function(e){var t,n=this,r=n.constructor,o=r.precision,a=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq($o))throw Error(ka+"NaN");if(n.s<1)throw Error(ka+(n.s?"NaN":"-Infinity"));return n.eq($o)?new r(0):(kn=!1,t=_s(Em(n,a),Em(e,a),a),kn=!0,un(t,o))};et.minus=et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?JY(t,e):$Y(t,(e.s=-e.s,e))};et.modulo=et.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(ka+"NaN");return n.s?(kn=!1,t=_s(n,e,0,1).times(e),kn=!0,n.minus(t)):un(new r(n),o)};et.naturalExponential=et.exp=function(){return KY(this)};et.naturalLogarithm=et.ln=function(){return Em(this)};et.negated=et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};et.plus=et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$Y(t,e):JY(t,(e.s=-e.s,e))};et.precision=et.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tu+e);if(t=Gn(o)+1,r=o.d.length-1,n=r*Sn+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};et.squareRoot=et.sqrt=function(){var e,t,n,r,o,a,i,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(ka+"NaN")}for(e=Gn(s),kn=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Wi(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=ah((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=i=n+3;;)if(a=r,r=a.plus(_s(s,a,i+2)).times(.5),Wi(a.d).slice(0,i)===(t=Wi(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),o==i&&t=="4999"){if(un(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;i+=4}return kn=!0,un(r,n)};et.times=et.mul=function(e){var t,n,r,o,a,i,s,l,u,f=this,h=f.constructor,p=f.d,m=(e=new h(e)).d;if(!f.s||!e.s)return new h(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=m.length,l<u&&(a=p,p=m,m=a,i=l,l=u,u=i),a=[],i=l+u,r=i;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,o=l+r;o>r;)s=a[o]+m[r]*p[o-r-1]+t,a[o--]=s%sr|0,t=s/sr|0;a[o]=(a[o]+t)%sr|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,kn?un(e,h.precision):e};et.toDecimalPlaces=et.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(es(e,0,oh),t===void 0?t=r.rounding:es(t,0,8),un(n,e+Gn(n)+1,t))};et.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=pu(r,!0):(es(e,0,oh),t===void 0?t=o.rounding:es(t,0,8),r=un(new o(r),e+1,t),n=pu(r,!0,e+1)),n};et.toFixed=function(e,t){var n,r,o=this,a=o.constructor;return e===void 0?pu(o):(es(e,0,oh),t===void 0?t=a.rounding:es(t,0,8),r=un(new a(o),e+Gn(o)+1,t),n=pu(r.abs(),!1,e+Gn(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};et.toInteger=et.toint=function(){var e=this,t=e.constructor;return un(new t(e),Gn(e)+1,t.rounding)};et.toNumber=function(){return+this};et.toPower=et.pow=function(e){var t,n,r,o,a,i,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l($o);if(s=new l(s),!s.s){if(e.s<1)throw Error(ka+"Infinity");return s}if(s.eq($o))return s;if(r=l.precision,e.eq($o))return un(s,r);if(t=e.e,n=e.d.length-1,i=t>=n,a=s.s,i){if((n=f<0?-f:f)<=qY){for(o=new l($o),t=Math.ceil(r/Sn+4),kn=!1;n%2&&(o=o.times(s),wR(o.d,t)),n=ah(n/2),n!==0;)s=s.times(s),wR(s.d,t);return kn=!0,e.s<0?new l($o).div(o):un(o,r)}}else if(a<0)throw Error(ka+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,kn=!1,o=e.times(Em(s,r+u)),kn=!0,o=KY(o),o.s=a,o};et.toPrecision=function(e,t){var n,r,o=this,a=o.constructor;return e===void 0?(n=Gn(o),r=pu(o,n<=a.toExpNeg||n>=a.toExpPos)):(es(e,1,oh),t===void 0?t=a.rounding:es(t,0,8),o=un(new a(o),e,t),n=Gn(o),r=pu(o,e<=n||n<=a.toExpNeg,e)),r};et.toSignificantDigits=et.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(es(e,1,oh),t===void 0?t=r.rounding:es(t,0,8)),un(new r(n),e,t)};et.toString=et.valueOf=et.val=et.toJSON=et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Gn(e),n=e.constructor;return pu(e,t<=n.toExpNeg||t>=n.toExpPos)};function $Y(e,t){var n,r,o,a,i,s,l,u,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),kn?un(t,h):t;if(l=e.d,u=t.d,i=e.e,o=t.e,l=l.slice(),a=i-o,a){for(a<0?(r=l,a=-a,s=u.length):(r=u,o=i,s=l.length),i=Math.ceil(h/Sn),s=i>s?i+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=u.length,s-a<0&&(a=s,r=u,u=l,l=r),n=0;a;)n=(l[--a]=l[a]+u[a]+n)/sr|0,l[a]%=sr;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,kn?un(t,h):t}function es(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tu+e)}function Wi(e){var t,n,r,o=e.length-1,a="",i=e[0];if(o>0){for(a+=i,t=1;t<o;t++)r=e[t]+"",n=Sn-r.length,n&&(a+=jl(n)),a+=r;i=e[t],r=i+"",n=Sn-r.length,n&&(a+=jl(n))}else if(i===0)return"0";for(;i%10===0;)i/=10;return a+i}var _s=function(){function e(r,o){var a,i=0,s=r.length;for(r=r.slice();s--;)a=r[s]*o+i,r[s]=a%sr|0,i=a/sr|0;return i&&r.unshift(i),r}function t(r,o,a,i){var s,l;if(a!=i)l=a>i?1:-1;else for(s=l=0;s<a;s++)if(r[s]!=o[s]){l=r[s]>o[s]?1:-1;break}return l}function n(r,o,a){for(var i=0;a--;)r[a]-=i,i=r[a]<o[a]?1:0,r[a]=i*sr+r[a]-o[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,o,a,i){var s,l,u,f,h,p,m,w,b,y,S,x,E,C,M,k,O,F,R=r.constructor,B=r.s==o.s?1:-1,Y=r.d,H=o.d;if(!r.s)return new R(r);if(!o.s)throw Error(ka+"Division by zero");for(l=r.e-o.e,O=H.length,M=Y.length,m=new R(B),w=m.d=[],u=0;H[u]==(Y[u]||0);)++u;if(H[u]>(Y[u]||0)&&--l,a==null?x=a=R.precision:i?x=a+(Gn(r)-Gn(o))+1:x=a,x<0)return new R(0);if(x=x/Sn+2|0,u=0,O==1)for(f=0,H=H[0],x++;(u<M||f)&&x--;u++)E=f*sr+(Y[u]||0),w[u]=E/H|0,f=E%H|0;else{for(f=sr/(H[0]+1)|0,f>1&&(H=e(H,f),Y=e(Y,f),O=H.length,M=Y.length),C=O,b=Y.slice(0,O),y=b.length;y<O;)b[y++]=0;F=H.slice(),F.unshift(0),k=H[0],H[1]>=sr/2&&++k;do f=0,s=t(H,b,O,y),s<0?(S=b[0],O!=y&&(S=S*sr+(b[1]||0)),f=S/k|0,f>1?(f>=sr&&(f=sr-1),h=e(H,f),p=h.length,y=b.length,s=t(h,b,p,y),s==1&&(f--,n(h,O<p?F:H,p))):(f==0&&(s=f=1),h=H.slice()),p=h.length,p<y&&h.unshift(0),n(b,h,y),s==-1&&(y=b.length,s=t(H,b,O,y),s<1&&(f++,n(b,O<y?F:H,y))),y=b.length):s===0&&(f++,b=[0]),w[u++]=f,s&&b[0]?b[y++]=Y[C]||0:(b=[Y[C]],y=1);while((C++<M||b[0]!==void 0)&&x--)}return w[0]||w.shift(),m.e=l,un(m,i?a+Gn(m)+1:a)}}();function KY(e,t){var n,r,o,a,i,s,l=0,u=0,f=e.constructor,h=f.precision;if(Gn(e)>16)throw Error(eA+Gn(e));if(!e.s)return new f($o);for(kn=!1,s=h,i=new f(.03125);e.abs().gte(.1);)e=e.times(i),u+=5;for(r=Math.log(Bc(2,u))/Math.LN10*2+5|0,s+=r,n=o=a=new f($o),f.precision=s;;){if(o=un(o.times(e),s),n=n.times(++l),i=a.plus(_s(o,n,s)),Wi(i.d).slice(0,s)===Wi(a.d).slice(0,s)){for(;u--;)a=un(a.times(a),s);return f.precision=h,t==null?(kn=!0,un(a,h)):a}a=i}}function Gn(e){for(var t=e.e*Sn,n=e.d[0];n>=10;n/=10)t++;return t}function Jx(e,t,n){if(t>e.LN10.sd())throw kn=!0,n&&(e.precision=n),Error(ka+"LN10 precision limit exceeded");return un(new e(e.LN10),t)}function jl(e){for(var t="";e--;)t+="0";return t}function Em(e,t){var n,r,o,a,i,s,l,u,f,h=1,p=10,m=e,w=m.d,b=m.constructor,y=b.precision;if(m.s<1)throw Error(ka+(m.s?"NaN":"-Infinity"));if(m.eq($o))return new b(0);if(t==null?(kn=!1,u=y):u=t,m.eq(10))return t==null&&(kn=!0),Jx(b,u);if(u+=p,b.precision=u,n=Wi(w),r=n.charAt(0),a=Gn(m),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Wi(m.d),r=n.charAt(0),h++;a=Gn(m),r>1?(m=new b("0."+n),a++):m=new b(r+"."+n.slice(1))}else return l=Jx(b,u+2,y).times(a+""),m=Em(new b(r+"."+n.slice(1)),u-p).plus(l),b.precision=y,t==null?(kn=!0,un(m,y)):m;for(s=i=m=_s(m.minus($o),m.plus($o),u),f=un(m.times(m),u),o=3;;){if(i=un(i.times(f),u),l=s.plus(_s(i,new b(o),u)),Wi(l.d).slice(0,u)===Wi(s.d).slice(0,u))return s=s.times(2),a!==0&&(s=s.plus(Jx(b,u+2,y).times(a+""))),s=_s(s,new b(h),u),b.precision=y,t==null?(kn=!0,un(s,y)):s;s=l,o+=2}}function bR(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=ah(n/Sn),e.d=[],r=(n+1)%Sn,n<0&&(r+=Sn),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=Sn;r<o;)e.d.push(+t.slice(r,r+=Sn));t=t.slice(r),r=Sn-t.length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),kn&&(e.e>bw||e.e<-bw))throw Error(eA+n)}else e.s=0,e.e=0,e.d=[0];return e}function un(e,t,n){var r,o,a,i,s,l,u,f,h=e.d;for(i=1,a=h[0];a>=10;a/=10)i++;if(r=t-i,r<0)r+=Sn,o=t,u=h[f=0];else{if(f=Math.ceil((r+1)/Sn),a=h.length,f>=a)return e;for(u=a=h[f],i=1;a>=10;a/=10)i++;r%=Sn,o=r-Sn+i}if(n!==void 0&&(a=Bc(10,i-o-1),s=u/a%10|0,l=t<0||h[f+1]!==void 0||u%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?u/Bc(10,i-o):0:h[f-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return l?(a=Gn(e),h.length=1,t=t-a-1,h[0]=Bc(10,(Sn-t%Sn)%Sn),e.e=ah(-t/Sn)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=f,a=1,f--):(h.length=f+1,a=Bc(10,Sn-r),h[f]=o>0?(u/Bc(10,i-o)%Bc(10,o)|0)*a:0),l)for(;;)if(f==0){(h[0]+=a)==sr&&(h[0]=1,++e.e);break}else{if(h[f]+=a,h[f]!=sr)break;h[f--]=0,a=1}for(r=h.length;h[--r]===0;)h.pop();if(kn&&(e.e>bw||e.e<-bw))throw Error(eA+Gn(e));return e}function JY(e,t){var n,r,o,a,i,s,l,u,f,h,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),kn?un(t,m):t;if(l=e.d,h=t.d,r=t.e,u=e.e,l=l.slice(),i=u-r,i){for(f=i<0,f?(n=l,i=-i,s=h.length):(n=h,r=u,s=l.length),o=Math.max(Math.ceil(m/Sn),s)+2,i>o&&(i=o,n.length=1),n.reverse(),o=i;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=h.length,f=o<s,f&&(s=o),o=0;o<s;o++)if(l[o]!=h[o]){f=l[o]<h[o];break}i=0}for(f&&(n=l,l=h,h=n,t.s=-t.s),s=l.length,o=h.length-s;o>0;--o)l[s++]=0;for(o=h.length;o>i;){if(l[--o]<h[o]){for(a=o;a&&l[--a]===0;)l[a]=sr-1;--l[a],l[o]+=sr}l[o]-=h[o]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,kn?un(t,m):t):new p(0)}function pu(e,t,n){var r,o=Gn(e),a=Wi(e.d),i=a.length;return t?(n&&(r=n-i)>0?a=a.charAt(0)+"."+a.slice(1)+jl(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(o<0?"e":"e+")+o):o<0?(a="0."+jl(-o-1)+a,n&&(r=n-i)>0&&(a+=jl(r))):o>=i?(a+=jl(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+jl(r))):((r=o+1)<i&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-i)>0&&(o+1===i&&(a+="."),a+=jl(r))),e.s<0?"-"+a:a}function wR(e,t){if(e.length>t)return e.length=t,!0}function XY(e){var t,n,r;function o(a){var i=this;if(!(i instanceof o))return new o(a);if(i.constructor=o,a instanceof o){i.s=a.s,i.e=a.e,i.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(tu+a);if(a>0)i.s=1;else if(a<0)a=-a,i.s=-1;else{i.s=0,i.e=0,i.d=[0];return}if(a===~~a&&a<1e7){i.e=0,i.d=[a];return}return bR(i,a.toString())}else if(typeof a!="string")throw Error(tu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),i.s=-1):i.s=1,$He.test(a))bR(i,a);else throw Error(tu+a)}if(o.prototype=et,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=XY,o.config=o.set=KHe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return o.config(e),o}function KHe(e){if(!e||typeof e!="object")throw Error(ka+"Object expected");var t,n,r,o=["precision",1,oh,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if((r=e[n=o[t]])!==void 0)if(ah(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(tu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tu+n+": "+r);return this}var tA=XY(qHe);$o=new tA(1);const rn=tA;function JHe(e){return t7e(e)||e7e(e)||QHe(e)||XHe()}function XHe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QHe(e,t){if(e){if(typeof e=="string")return nE(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 nE(e,t)}}function e7e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function t7e(e){if(Array.isArray(e))return nE(e)}function nE(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 n7e=function(t){return t},QY={},ez=function(t){return t===QY},SR=function(t){return function n(){return arguments.length===0||arguments.length===1&&ez(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},r7e=function e(t,n){return t===1?n:SR(function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var i=o.filter(function(s){return s!==QY}).length;return i>=t?n.apply(void 0,o):e(t-i,SR(function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var f=o.map(function(h){return ez(h)?l.shift():h});return n.apply(void 0,JHe(f).concat(l))}))})},bS=function(t){return r7e(t.length,t)},rE=function(t,n){for(var r=[],o=t;o<n;++o)r[o-t]=o;return r},o7e=bS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),a7e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return n7e;var o=n.reverse(),a=o[0],i=o.slice(1);return function(){return i.reduce(function(s,l){return l(s)},a.apply(void 0,arguments))}},oE=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},tz=function(t){var n=null,r=null;return function(){for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n&&a.every(function(s,l){return s===n[l]})||(n=a,r=t.apply(void 0,a)),r}};function i7e(e){var t;return e===0?t=1:t=Math.floor(new rn(e).abs().log(10).toNumber())+1,t}function s7e(e,t,n){for(var r=new rn(e),o=0,a=[];r.lt(t)&&o<1e5;)a.push(r.toNumber()),r=r.add(n),o++;return a}var l7e=bS(function(e,t,n){var r=+e,o=+t;return r+n*(o-r)}),c7e=bS(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),u7e=bS(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const wS={rangeStep:s7e,getDigitCount:i7e,interpolateNumber:l7e,uninterpolateNumber:c7e,uninterpolateTruncation:u7e};function aE(e){return h7e(e)||f7e(e)||nz(e)||d7e()}function d7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f7e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function h7e(e){if(Array.isArray(e))return iE(e)}function Cm(e,t){return g7e(e)||m7e(e,t)||nz(e,t)||p7e()}function p7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nz(e,t){if(e){if(typeof e=="string")return iE(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 iE(e,t)}}function iE(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 m7e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function g7e(e){if(Array.isArray(e))return e}function rz(e){var t=Cm(e,2),n=t[0],r=t[1],o=n,a=r;return n>r&&(o=r,a=n),[o,a]}function oz(e,t,n){if(e.lte(0))return new rn(0);var r=wS.getDigitCount(e.toNumber()),o=new rn(10).pow(r),a=e.div(o),i=r!==1?.05:.1,s=new rn(Math.ceil(a.div(i).toNumber())).add(n).mul(i),l=s.mul(o);return t?l:new rn(Math.ceil(l))}function v7e(e,t,n){var r=1,o=new rn(e);if(!o.isint()&&n){var a=Math.abs(e);a<1?(r=new rn(10).pow(wS.getDigitCount(e)-1),o=new rn(Math.floor(o.div(r).toNumber())).mul(r)):a>1&&(o=new rn(Math.floor(e)))}else e===0?o=new rn(Math.floor((t-1)/2)):n||(o=new rn(Math.floor(e)));var i=Math.floor((t-1)/2),s=a7e(o7e(function(l){return o.add(new rn(l-i).mul(r)).toNumber()}),rE);return s(0,t)}function az(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new rn(0),tickMin:new rn(0),tickMax:new rn(0)};var a=oz(new rn(t).sub(e).div(n-1),r,o),i;e<=0&&t>=0?i=new rn(0):(i=new rn(e).add(t).div(2),i=i.sub(new rn(i).mod(a)));var s=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new rn(t).sub(i).div(a).toNumber()),u=s+l+1;return u>n?az(e,t,n,r,o+1):(u<n&&(l=t>0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:a,tickMin:i.sub(new rn(s).mul(a)),tickMax:i.add(new rn(l).mul(a))})}function y7e(e){var t=Cm(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(o,2),s=rz([n,r]),l=Cm(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var h=f===1/0?[u].concat(aE(rE(0,o-1).map(function(){return 1/0}))):[].concat(aE(rE(0,o-1).map(function(){return-1/0})),[f]);return n>r?oE(h):h}if(u===f)return v7e(u,o,a);var p=az(u,f,i,a),m=p.step,w=p.tickMin,b=p.tickMax,y=wS.rangeStep(w,b.add(new rn(.1).mul(m)),m);return n>r?oE(y):y}function b7e(e,t){var n=Cm(e,2),r=n[0],o=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=rz([r,o]),s=Cm(i,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,o];if(l===u)return[l];var f=Math.max(t,2),h=oz(new rn(u).sub(l).div(f-1),a,0),p=[].concat(aE(wS.rangeStep(new rn(l),new rn(u).sub(new rn(.99).mul(h)),h)),[u]);return r>o?oE(p):p}var w7e=tz(y7e),S7e=tz(b7e),T7e="Invariant failed";function mu(e,t){throw new Error(T7e)}var x7e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function cf(e){"@babel/helpers - typeof";return cf=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},cf(e)}function ww(){return ww=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},ww.apply(this,arguments)}function I7e(e,t){return M7e(e)||C7e(e,t)||E7e(e,t)||k7e()}function k7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E7e(e,t){if(e){if(typeof e=="string")return TR(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 TR(e,t)}}function TR(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 C7e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function M7e(e){if(Array.isArray(e))return e}function D7e(e,t){if(e==null)return{};var n=A7e(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A7e(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 N7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O7e(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,lz(r.key),r)}}function P7e(e,t,n){return t&&O7e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function j7e(e,t,n){return t=Sw(t),L7e(e,iz()?Reflect.construct(t,n||[],Sw(e).constructor):t.apply(e,n))}function L7e(e,t){if(t&&(cf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R7e(e)}function R7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iz=function(){return!!e})()}function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sw(e)}function F7e(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&&sE(e,t)}function sE(e,t){return sE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},sE(e,t)}function sz(e,t,n){return t=lz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lz(e){var t=H7e(e,"string");return cf(t)=="symbol"?t:t+""}function H7e(e,t){if(cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gg=function(e){function t(){return N7e(this,t),j7e(this,t,arguments)}return F7e(t,e),P7e(t,[{key:"render",value:function(){var r=this.props,o=r.offset,a=r.layout,i=r.width,s=r.dataKey,l=r.data,u=r.dataPointFormatter,f=r.xAxis,h=r.yAxis,p=D7e(r,x7e),m=Rt(p,!1);this.props.direction==="x"&&f.type!=="number"&&mu();var w=l.map(function(b){var y=u(b,s),S=y.x,x=y.y,E=y.value,C=y.errorVal;if(!C)return null;var M=[],k,O;if(Array.isArray(C)){var F=I7e(C,2);k=F[0],O=F[1]}else k=O=C;if(a==="vertical"){var R=f.scale,B=x+o,Y=B+i,H=B-i,Z=R(E-k),W=R(E+O);M.push({x1:W,y1:Y,x2:W,y2:H}),M.push({x1:Z,y1:B,x2:W,y2:B}),M.push({x1:Z,y1:Y,x2:Z,y2:H})}else if(a==="horizontal"){var $=h.scale,V=S+o,ne=V-i,Q=V+i,te=$(E-k),G=$(E+O);M.push({x1:ne,y1:G,x2:Q,y2:G}),M.push({x1:V,y1:te,x2:V,y2:G}),M.push({x1:ne,y1:te,x2:Q,y2:te})}return _.createElement(_n,ww({className:"recharts-errorBar",key:"bar-".concat(M.map(function(X){return"".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))},m),M.map(function(X){return _.createElement("line",ww({},X,{key:"line-".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))}))});return _.createElement(_n,{className:"recharts-errorBars"},w)}}])}(_.Component);sz(Gg,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});sz(Gg,"displayName","ErrorBar");function Mm(e){"@babel/helpers - typeof";return Mm=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},Mm(e)}function xR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Lc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xR(Object(n),!0).forEach(function(r){B7e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B7e(e,t,n){return t=_7e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _7e(e){var t=Y7e(e,"string");return Mm(t)=="symbol"?t:t+""}function Y7e(e,t){if(Mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cz=function(t){var n=t.children,r=t.formattedGraphicalItems,o=t.legendWidth,a=t.legendContent,i=Go(n,jd);if(!i)return null;var s=jd.defaultProps,l=s!==void 0?Lc(Lc({},s),i.props):{},u;return i.props&&i.props.payload?u=i.props&&i.props.payload:a==="children"?u=(r||[]).reduce(function(f,h){var p=h.item,m=h.props,w=m.sectors||m.data||[];return f.concat(w.map(function(b){return{type:i.props.iconType||p.props.legendType,value:b.name,color:b.fill,payload:b}}))},[]):u=(r||[]).map(function(f){var h=f.item,p=h.type.defaultProps,m=p!==void 0?Lc(Lc({},p),h.props):{},w=m.dataKey,b=m.name,y=m.legendType,S=m.hide;return{inactive:S,dataKey:w,type:l.iconType||y||"square",color:nA(h),value:b||w,payload:m}}),Lc(Lc(Lc({},l),jd.getWithHeight(i,o)),{},{payload:u,item:i})};function Dm(e){"@babel/helpers - typeof";return Dm=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},Dm(e)}function IR(e){return W7e(e)||V7e(e)||U7e(e)||z7e()}function z7e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U7e(e,t){if(e){if(typeof e=="string")return lE(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 lE(e,t)}}function V7e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function W7e(e){if(Array.isArray(e))return lE(e)}function lE(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 kR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(n),!0).forEach(function(r){Rd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rd(e,t,n){return t=G7e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7e(e){var t=Z7e(e,"string");return Dm(t)=="symbol"?t:t+""}function Z7e(e,t){if(Dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qo(e,t,n){return jt(e)||jt(t)?n:Qn(t)?ba(e,t,n):Mt(t)?t(e):n}function Rp(e,t,n,r){var o=ZHe(e,function(s){return Qo(s,t)});if(n==="number"){var a=o.filter(function(s){return Ke(s)||parseFloat(s)});return a.length?[yS(a),vS(a)]:[1/0,-1/0]}var i=r?o.filter(function(s){return!jt(s)}):o;return i.map(function(s){return Qn(s)||s instanceof Date?s:""})}var q7e=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,u=0;u<s;u++){var f=u>0?o[u-1].coordinate:o[s-1].coordinate,h=o[u].coordinate,p=u>=s-1?o[0].coordinate:o[u+1].coordinate,m=void 0;if(ti(h-f)!==ti(p-h)){var w=[];if(ti(p-h)===ti(l[1]-l[0])){m=p;var b=h+l[1]-l[0];w[0]=Math.min(b,(b+f)/2),w[1]=Math.max(b,(b+f)/2)}else{m=f;var y=p+l[1]-l[0];w[0]=Math.min(h,(y+h)/2),w[1]=Math.max(h,(y+h)/2)}var S=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(t>S[0]&&t<=S[1]||t>=w[0]&&t<=w[1]){i=o[u].index;break}}else{var x=Math.min(f,p),E=Math.max(f,p);if(t>(x+h)/2&&t<=(E+h)/2){i=o[u].index;break}}}else for(var C=0;C<s;C++)if(C===0&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<s-1&&t>(r[C].coordinate+r[C-1].coordinate)/2&&t<=(r[C].coordinate+r[C+1].coordinate)/2||C===s-1&&t>(r[C].coordinate+r[C-1].coordinate)/2){i=r[C].index;break}return i},nA=function(t){var n,r=t,o=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ln(Ln({},t.type.defaultProps),t.props):t.props,i=a.stroke,s=a.fill,l;switch(o){case"Line":l=i;break;case"Area":case"Radar":l=i&&i!=="none"?i:s;break;default:l=s;break}return l},$7e=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,a=o===void 0?{}:o;if(!a)return{};for(var i={},s=Object.keys(a),l=0,u=s.length;l<u;l++)for(var f=a[s[l]].stackGroups,h=Object.keys(f),p=0,m=h.length;p<m;p++){var w=f[h[p]],b=w.items,y=w.cateAxisId,S=b.filter(function(O){return Hs(O.type).indexOf("Bar")>=0});if(S&&S.length){var x=S[0].type.defaultProps,E=x!==void 0?Ln(Ln({},x),S[0].props):S[0].props,C=E.barSize,M=E[y];i[M]||(i[M]=[]);var k=jt(C)?n:C;i[M].push({item:S[0],stackList:S.slice(1),barSize:jt(k)?void 0:hu(k,r,0)})}}return i},K7e=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,a=t.sizeList,i=a===void 0?[]:a,s=t.maxBarSize,l=i.length;if(l<1)return null;var u=hu(n,o,0,!0),f,h=[];if(i[0].barSize===+i[0].barSize){var p=!1,m=o/l,w=i.reduce(function(C,M){return C+M.barSize||0},0);w+=(l-1)*u,w>=o&&(w-=(l-1)*u,u=0),w>=o&&m>0&&(p=!0,m*=.9,w=l*m);var b=(o-w)/2>>0,y={offset:b-u,size:0};f=i.reduce(function(C,M){var k={item:M.item,position:{offset:y.offset+y.size+u,size:p?m:M.barSize}},O=[].concat(IR(C),[k]);return y=O[O.length-1].position,M.stackList&&M.stackList.length&&M.stackList.forEach(function(F){O.push({item:F,position:y})}),O},h)}else{var S=hu(r,o,0,!0);o-2*S-(l-1)*u<=0&&(u=0);var x=(o-2*S-(l-1)*u)/l;x>1&&(x>>=0);var E=s===+s?Math.min(x,s):x;f=i.reduce(function(C,M,k){var O=[].concat(IR(C),[{item:M.item,position:{offset:S+(x+u)*k+(x-E)/2,size:E}}]);return M.stackList&&M.stackList.length&&M.stackList.forEach(function(F){O.push({item:F,position:O[O.length-1].position})}),O},h)}return f},J7e=function(t,n,r,o){var a=r.children,i=r.width,s=r.margin,l=i-(s.left||0)-(s.right||0),u=cz({children:a,legendWidth:l});if(u){var f=o||{},h=f.width,p=f.height,m=u.align,w=u.verticalAlign,b=u.layout;if((b==="vertical"||b==="horizontal"&&w==="middle")&&m!=="center"&&Ke(t[m]))return Ln(Ln({},t),{},Rd({},m,t[m]+(h||0)));if((b==="horizontal"||b==="vertical"&&m==="center")&&w!=="middle"&&Ke(t[w]))return Ln(Ln({},t),{},Rd({},w,t[w]+(p||0)))}return t},X7e=function(t,n,r){return jt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},uz=function(t,n,r,o,a){var i=n.props.children,s=wa(i,Gg).filter(function(u){return X7e(o,a,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var h=Qo(f,r);if(jt(h))return u;var p=Array.isArray(h)?[yS(h),vS(h)]:[h,h],m=l.reduce(function(w,b){var y=Qo(f,b,0),S=p[0]-Math.abs(Array.isArray(y)?y[0]:y),x=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(S,w[0]),Math.max(x,w[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Q7e=function(t,n,r,o,a){var i=n.map(function(s){return uz(t,s,r,a,o)}).filter(function(s){return!jt(s)});return i&&i.length?i.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},dz=function(t,n,r,o,a){var i=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&uz(t,l,u,o)||Rp(t,u,r,a)});if(r==="number")return i.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return i.reduce(function(l,u){for(var f=0,h=u.length;f<h;f++)s[u[f]]||(s[u[f]]=!0,l.push(u[f]));return l},[])},fz=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},hz=function(t,n,r,o){if(o)return t.map(function(l){return l.coordinate});var a,i,s=t.map(function(l){return l.coordinate===n&&(a=!0),l.coordinate===r&&(i=!0),l.coordinate});return a||s.push(n),i||s.push(r),s},Ns=function(t,n,r){if(!t)return null;var o=t.scale,a=t.duplicateDomain,i=t.type,s=t.range,l=t.realScaleType==="scaleBand"?o.bandwidth()/2:2,u=(n||r)&&i==="category"&&o.bandwidth?o.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&s?.length>=2?ti(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(h){var p=a?a.indexOf(h):h;return{coordinate:o(p)+u,value:h,offset:u}});return f.filter(function(h){return!_g(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,p){return{coordinate:o(h)+u,value:h,index:p,offset:u}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(h){return{coordinate:o(h)+u,value:h,offset:u}}):o.domain().map(function(h,p){return{coordinate:o(h)+u,value:a?a[h]:h,index:p,offset:u}})},Xx=new WeakMap,My=function(t,n){if(typeof n!="function")return t;Xx.has(t)||Xx.set(t,new WeakMap);var r=Xx.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},eBe=function(t,n,r){var o=t.scale,a=t.type,i=t.layout,s=t.axisType;if(o==="auto")return i==="radial"&&s==="radiusAxis"?{scale:Sm(),realScaleType:"band"}:i==="radial"&&s==="angleAxis"?{scale:mw(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Lp(),realScaleType:"point"}:a==="category"?{scale:Sm(),realScaleType:"band"}:{scale:mw(),realScaleType:"linear"};if(Bg(o)){var l="scale".concat(iS(o));return{scale:(yR[l]||Lp)(),realScaleType:yR[l]?l:"point"}}return Mt(o)?{scale:o}:{scale:Lp(),realScaleType:"point"}},ER=1e-4,tBe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),a=Math.min(o[0],o[1])-ER,i=Math.max(o[0],o[1])+ER,s=t(n[0]),l=t(n[r-1]);(s<a||s>i||l<a||l>i)&&t.domain([n[0],n[r-1]])}},nBe=function(t,n){if(!t)return null;for(var r=0,o=t.length;r<o;r++)if(t[r].item===n)return t[r].position;return null},rBe=function(t,n){if(!n||n.length!==2||!Ke(n[0])||!Ke(n[1]))return t;var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!Ke(t[0])||t[0]<r)&&(a[0]=r),(!Ke(t[1])||t[1]>o)&&(a[1]=o),a[0]>o&&(a[0]=o),a[1]<r&&(a[1]=r),a},oBe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var a=0,i=0,s=0;s<n;++s){var l=_g(t[s][r][1])?t[s][r][0]:t[s][r][1];l>=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1])}},aBe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r<o;++r)for(var a=0,i=0;i<n;++i){var s=_g(t[i][r][1])?t[i][r][0]:t[i][r][1];s>=0?(t[i][r][0]=a,t[i][r][1]=a+s,a=t[i][r][1]):(t[i][r][0]=0,t[i][r][1]=0)}},iBe={sign:oBe,expand:XRe,none:ef,silhouette:QRe,wiggle:e5e,positive:aBe},sBe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),a=iBe[r],i=JRe().keys(o).value(function(s,l){return+Qo(s,l,0)}).order(Hk).offset(a);return i(t)},lBe=function(t,n,r,o,a,i){if(!t)return null;var s=i?n.reverse():n,l={},u=s.reduce(function(h,p){var m,w=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Ln(Ln({},p.type.defaultProps),p.props):p.props,b=w.stackId,y=w.hide;if(y)return h;var S=w[r],x=h[S]||{hasStack:!1,stackGroups:{}};if(Qn(b)){var E=x.stackGroups[b]||{numericAxisId:r,cateAxisId:o,items:[]};E.items.push(p),x.hasStack=!0,x.stackGroups[b]=E}else x.stackGroups[Yg("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[p]};return Ln(Ln({},h),{},Rd({},S,x))},l),f={};return Object.keys(u).reduce(function(h,p){var m=u[p];if(m.hasStack){var w={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(b,y){var S=m.stackGroups[y];return Ln(Ln({},b),{},Rd({},y,{numericAxisId:r,cateAxisId:o,items:S.items,stackedData:sBe(t,S.items,a)}))},w)}return Ln(Ln({},h),{},Rd({},p,m))},f)},cBe=function(t,n){var r=n.realScaleType,o=n.type,a=n.tickCount,i=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&o==="number"&&i&&(i[0]==="auto"||i[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=w7e(u,a,s);return t.domain([yS(f),vS(f)]),{niceTicks:f}}if(a&&o==="number"){var h=t.domain(),p=S7e(h,a,s);return{niceTicks:p}}return null};function CR(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,a=e.index,i=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jt(o[t.dataKey])){var s=$b(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=Qo(o,jt(i)?t.dataKey:i);return jt(l)?null:t.scale(l)}var MR=function(t){var n=t.axis,r=t.ticks,o=t.offset,a=t.bandSize,i=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Qo(i,n.dataKey,n.domain[s]);return jt(l)?null:n.scale(l)-a/2+o},uBe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return o<=0&&a>=0?0:a<0?a:o}return r[0]},dBe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ln(Ln({},t.type.defaultProps),t.props):t.props,a=o.stackId;if(Qn(a)){var i=n[a];if(i){var s=i.items.indexOf(t);return s>=0?i.stackedData[s]:null}}return null},fBe=function(t){return t.reduce(function(n,r){return[yS(r.concat([n[0]]).filter(Ke)),vS(r.concat([n[1]]).filter(Ke))]},[1/0,-1/0])},pz=function(t,n,r){return Object.keys(t).reduce(function(o,a){var i=t[a],s=i.stackedData,l=s.reduce(function(u,f){var h=fBe(f.slice(n,r+1));return[Math.min(u[0],h[0]),Math.max(u[1],h[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},DR=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,AR=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cE=function(t,n,r){if(Mt(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(Ke(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(DR.test(t[0])){var a=+DR.exec(t[0])[1];o[0]=n[0]-a}else Mt(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(Ke(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(AR.test(t[1])){var i=+AR.exec(t[1])[1];o[1]=n[1]+i}else Mt(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},Tw=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var a=T0(n,function(h){return h.coordinate}),i=1/0,s=1,l=a.length;s<l;s++){var u=a[s],f=a[s-1];i=Math.min((u.coordinate||0)-(f.coordinate||0),i)}return i===1/0?0:i}return r?void 0:0},NR=function(t,n,r){return!t||!t.length||vg(t,ba(r,"type.defaultProps.domain"))?n:t},mz=function(t,n){var r=t.type.defaultProps?Ln(Ln({},t.type.defaultProps),t.props):t.props,o=r.dataKey,a=r.name,i=r.unit,s=r.formatter,l=r.tooltipType,u=r.chartType,f=r.hide;return Ln(Ln({},Rt(t,!1)),{},{dataKey:o,unit:i,formatter:s,name:a||o,color:nA(t),value:Qo(n,o),type:l,payload:n,chartType:u,hide:f})};function Am(e){"@babel/helpers - typeof";return Am=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},Am(e)}function OR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function PR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OR(Object(n),!0).forEach(function(r){hBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hBe(e,t,n){return t=pBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pBe(e){var t=mBe(e,"string");return Am(t)=="symbol"?t:t+""}function mBe(e,t){if(Am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xw=Math.PI/180,gBe=function(t){return t*180/Math.PI},kr=function(t,n,r,o){return{x:t+Math.cos(-xw*o)*r,y:n+Math.sin(-xw*o)*r}},vBe=function(t,n){var r=t.x,o=t.y,a=n.x,i=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(o-i,2))},yBe=function(t,n){var r=t.x,o=t.y,a=n.cx,i=n.cy,s=vBe({x:r,y:o},{x:a,y:i});if(s<=0)return{radius:s};var l=(r-a)/s,u=Math.acos(l);return o>i&&(u=2*Math.PI-u),{radius:s,angle:gBe(u),angleInRadian:u}},bBe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),a=Math.floor(r/360),i=Math.min(o,a);return{startAngle:n-i*360,endAngle:r-i*360}},wBe=function(t,n){var r=n.startAngle,o=n.endAngle,a=Math.floor(r/360),i=Math.floor(o/360),s=Math.min(a,i);return t+s*360},jR=function(t,n){var r=t.x,o=t.y,a=yBe({x:r,y:o},n),i=a.radius,s=a.angle,l=n.innerRadius,u=n.outerRadius;if(i<l||i>u)return!1;if(i===0)return!0;var f=bBe(n),h=f.startAngle,p=f.endAngle,m=s,w;if(h<=p){for(;m>p;)m-=360;for(;m<h;)m+=360;w=m>=h&&m<=p}else{for(;m>h;)m-=360;for(;m<p;)m+=360;w=m>=p&&m<=h}return w?PR(PR({},n),{},{radius:i,angle:wBe(m,n)}):null};function Nm(e){"@babel/helpers - typeof";return Nm=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},Nm(e)}var SBe=["offset"];function TBe(e){return EBe(e)||kBe(e)||IBe(e)||xBe()}function xBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IBe(e,t){if(e){if(typeof e=="string")return uE(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 uE(e,t)}}function kBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EBe(e){if(Array.isArray(e))return uE(e)}function uE(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 CBe(e,t){if(e==null)return{};var n=MBe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MBe(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 LR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LR(Object(n),!0).forEach(function(r){DBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DBe(e,t,n){return t=ABe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ABe(e){var t=NBe(e,"string");return Nm(t)=="symbol"?t:t+""}function NBe(e,t){if(Nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Om(){return Om=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},Om.apply(this,arguments)}var OBe=function(t){var n=t.value,r=t.formatter,o=jt(t.children)?n:t.children;return Mt(r)?r(o):o},PBe=function(t,n){var r=ti(n-t),o=Math.min(Math.abs(n-t),360);return r*o},jBe=function(t,n,r){var o=t.position,a=t.viewBox,i=t.offset,s=t.className,l=a,u=l.cx,f=l.cy,h=l.innerRadius,p=l.outerRadius,m=l.startAngle,w=l.endAngle,b=l.clockWise,y=(h+p)/2,S=PBe(m,w),x=S>=0?1:-1,E,C;o==="insideStart"?(E=m+x*i,C=b):o==="insideEnd"?(E=w-x*i,C=!b):o==="end"&&(E=w+x*i,C=b),C=S<=0?C:!C;var M=kr(u,f,y,E),k=kr(u,f,y,E+(C?1:-1)*359),O="M".concat(M.x,",").concat(M.y,`
A`).concat(y,",").concat(y,",0,1,").concat(C?0:1,`,
`).concat(k.x,",").concat(k.y),F=jt(t.id)?Yg("recharts-radial-line-"):t.id;return _.createElement("text",Om({},r,{dominantBaseline:"central",className:Ut("recharts-radial-bar-label",s)}),_.createElement("defs",null,_.createElement("path",{id:F,d:O})),_.createElement("textPath",{xlinkHref:"#".concat(F)},n))},LBe=function(t){var n=t.viewBox,r=t.offset,o=t.position,a=n,i=a.cx,s=a.cy,l=a.innerRadius,u=a.outerRadius,f=a.startAngle,h=a.endAngle,p=(f+h)/2;if(o==="outside"){var m=kr(i,s,u+r,p),w=m.x,b=m.y;return{x:w,y:b,textAnchor:w>=i?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,S=kr(i,s,y,p),x=S.x,E=S.y;return{x,y:E,textAnchor:"middle",verticalAnchor:"middle"}},RBe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,a=t.position,i=n,s=i.x,l=i.y,u=i.width,f=i.height,h=f>=0?1:-1,p=h*o,m=h>0?"end":"start",w=h>0?"start":"end",b=u>=0?1:-1,y=b*o,S=b>0?"end":"start",x=b>0?"start":"end";if(a==="top"){var E={x:s+u/2,y:l-h*o,textAnchor:"middle",verticalAnchor:m};return Jn(Jn({},E),r?{height:Math.max(l-r.y,0),width:u}:{})}if(a==="bottom"){var C={x:s+u/2,y:l+f+p,textAnchor:"middle",verticalAnchor:w};return Jn(Jn({},C),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(a==="left"){var M={x:s-y,y:l+f/2,textAnchor:S,verticalAnchor:"middle"};return Jn(Jn({},M),r?{width:Math.max(M.x-r.x,0),height:f}:{})}if(a==="right"){var k={x:s+u+y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return Jn(Jn({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:f}:{})}var O=r?{width:u,height:f}:{};return a==="insideLeft"?Jn({x:s+y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},O):a==="insideRight"?Jn({x:s+u-y,y:l+f/2,textAnchor:S,verticalAnchor:"middle"},O):a==="insideTop"?Jn({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:w},O):a==="insideBottom"?Jn({x:s+u/2,y:l+f-p,textAnchor:"middle",verticalAnchor:m},O):a==="insideTopLeft"?Jn({x:s+y,y:l+p,textAnchor:x,verticalAnchor:w},O):a==="insideTopRight"?Jn({x:s+u-y,y:l+p,textAnchor:S,verticalAnchor:w},O):a==="insideBottomLeft"?Jn({x:s+y,y:l+f-p,textAnchor:x,verticalAnchor:m},O):a==="insideBottomRight"?Jn({x:s+u-y,y:l+f-p,textAnchor:S,verticalAnchor:m},O):Lf(a)&&(Ke(a.x)||Vc(a.x))&&(Ke(a.y)||Vc(a.y))?Jn({x:s+hu(a.x,u),y:l+hu(a.y,f),textAnchor:"end",verticalAnchor:"end"},O):Jn({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},FBe=function(t){return"cx"in t&&Ke(t.cx)};function Vr(e){var t=e.offset,n=t===void 0?5:t,r=CBe(e,SBe),o=Jn({offset:n},r),a=o.viewBox,i=o.position,s=o.value,l=o.children,u=o.content,f=o.className,h=f===void 0?"":f,p=o.textBreakAll;if(!a||jt(s)&&jt(l)&&!D.isValidElement(u)&&!Mt(u))return null;if(D.isValidElement(u))return D.cloneElement(u,o);var m;if(Mt(u)){if(m=D.createElement(u,o),D.isValidElement(m))return m}else m=OBe(o);var w=FBe(a),b=Rt(o,!0);if(w&&(i==="insideStart"||i==="insideEnd"||i==="end"))return jBe(o,m,b);var y=w?LBe(o):RBe(o);return _.createElement(lw,Om({className:Ut("recharts-label",h)},b,y,{breakAll:p}),m)}Vr.displayName="Label";var gz=function(t){var n=t.cx,r=t.cy,o=t.angle,a=t.startAngle,i=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,h=t.x,p=t.y,m=t.top,w=t.left,b=t.width,y=t.height,S=t.clockWise,x=t.labelViewBox;if(x)return x;if(Ke(b)&&Ke(y)){if(Ke(h)&&Ke(p))return{x:h,y:p,width:b,height:y};if(Ke(m)&&Ke(w))return{x:m,y:w,width:b,height:y}}return Ke(h)&&Ke(p)?{x:h,y:p,width:0,height:0}:Ke(n)&&Ke(r)?{cx:n,cy:r,startAngle:a||o||0,endAngle:i||o||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:S}:t.viewBox?t.viewBox:{}},HBe=function(t,n){return t?t===!0?_.createElement(Vr,{key:"label-implicit",viewBox:n}):Qn(t)?_.createElement(Vr,{key:"label-implicit",viewBox:n,value:t}):D.isValidElement(t)?t.type===Vr?D.cloneElement(t,{key:"label-implicit",viewBox:n}):_.createElement(Vr,{key:"label-implicit",content:t,viewBox:n}):Mt(t)?_.createElement(Vr,{key:"label-implicit",content:t,viewBox:n}):Lf(t)?_.createElement(Vr,Om({viewBox:n},t,{key:"label-implicit"})):null:null},BBe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,a=gz(t),i=wa(o,Vr).map(function(l,u){return D.cloneElement(l,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return i;var s=HBe(t.label,n||a);return[s].concat(TBe(i))};Vr.parseViewBox=gz;Vr.renderCallByParent=BBe;function Pm(e){"@babel/helpers - typeof";return Pm=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},Pm(e)}var _Be=["valueAccessor"],YBe=["data","dataKey","clockWise","id","textBreakAll"];function zBe(e){return GBe(e)||WBe(e)||VBe(e)||UBe()}function UBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VBe(e,t){if(e){if(typeof e=="string")return dE(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 dE(e,t)}}function WBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GBe(e){if(Array.isArray(e))return dE(e)}function dE(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 Iw(){return Iw=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},Iw.apply(this,arguments)}function RR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function FR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RR(Object(n),!0).forEach(function(r){ZBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZBe(e,t,n){return t=qBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qBe(e){var t=$Be(e,"string");return Pm(t)=="symbol"?t:t+""}function $Be(e,t){if(Pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HR(e,t){if(e==null)return{};var n=KBe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KBe(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 JBe=function(t){return Array.isArray(t.value)?xpe(t.value):t.value};function Vl(e){var t=e.valueAccessor,n=t===void 0?JBe:t,r=HR(e,_Be),o=r.data,a=r.dataKey,i=r.clockWise,s=r.id,l=r.textBreakAll,u=HR(r,YBe);return!o||!o.length?null:_.createElement(_n,{className:"recharts-label-list"},o.map(function(f,h){var p=jt(a)?n(f,h):Qo(f&&f.payload,a),m=jt(s)?{}:{id:"".concat(s,"-").concat(h)};return _.createElement(Vr,Iw({},Rt(f,!0),u,m,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:Vr.parseViewBox(jt(i)?f:FR(FR({},f),{},{clockWise:i})),key:"label-".concat(h),index:h}))}))}Vl.displayName="LabelList";function XBe(e,t){return e?e===!0?_.createElement(Vl,{key:"labelList-implicit",data:t}):_.isValidElement(e)||Mt(e)?_.createElement(Vl,{key:"labelList-implicit",data:t,content:e}):Lf(e)?_.createElement(Vl,Iw({data:t},e,{key:"labelList-implicit"})):null:null}function QBe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=wa(r,Vl).map(function(i,s){return D.cloneElement(i,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var a=XBe(e.label,t);return[a].concat(zBe(o))}Vl.renderCallByParent=QBe;function jm(e){"@babel/helpers - typeof";return jm=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},jm(e)}function fE(){return fE=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},fE.apply(this,arguments)}function BR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _R(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BR(Object(n),!0).forEach(function(r){e_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e_e(e,t,n){return t=t_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t_e(e){var t=n_e(e,"string");return jm(t)=="symbol"?t:t+""}function n_e(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r_e=function(t,n){var r=ti(n-t),o=Math.min(Math.abs(n-t),359.999);return r*o},Dy=function(t){var n=t.cx,r=t.cy,o=t.radius,a=t.angle,i=t.sign,s=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,f=l*(s?1:-1)+o,h=Math.asin(l/f)/xw,p=u?a:a+i*h,m=kr(n,r,f,p),w=kr(n,r,o,p),b=u?a-i*h:a,y=kr(n,r,f*Math.cos(h*xw),b);return{center:m,circleTangency:w,lineTangency:y,theta:h}},vz=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,a=t.outerRadius,i=t.startAngle,s=t.endAngle,l=r_e(i,s),u=i+l,f=kr(n,r,a,i),h=kr(n,r,a,u),p="M ".concat(f.x,",").concat(f.y,`
A `).concat(a,",").concat(a,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(i>u),`,
`).concat(h.x,",").concat(h.y,`
`);if(o>0){var m=kr(n,r,o,i),w=kr(n,r,o,u);p+="L ".concat(w.x,",").concat(w.y,`
A `).concat(o,",").concat(o,`,0,
`).concat(+(Math.abs(l)>180),",").concat(+(i<=u),`,
`).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},o_e=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,a=t.outerRadius,i=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,h=ti(f-u),p=Dy({cx:n,cy:r,radius:a,angle:u,sign:h,cornerRadius:i,cornerIsExternal:l}),m=p.circleTangency,w=p.lineTangency,b=p.theta,y=Dy({cx:n,cy:r,radius:a,angle:f,sign:-h,cornerRadius:i,cornerIsExternal:l}),S=y.circleTangency,x=y.lineTangency,E=y.theta,C=l?Math.abs(u-f):Math.abs(u-f)-b-E;if(C<0)return s?"M ".concat(w.x,",").concat(w.y,`
a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0
a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0
`):vz({cx:n,cy:r,innerRadius:o,outerRadius:a,startAngle:u,endAngle:f});var M="M ".concat(w.x,",").concat(w.y,`
A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(m.x,",").concat(m.y,`
A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(x.x,",").concat(x.y,`
`);if(o>0){var k=Dy({cx:n,cy:r,radius:o,angle:u,sign:h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),O=k.circleTangency,F=k.lineTangency,R=k.theta,B=Dy({cx:n,cy:r,radius:o,angle:f,sign:-h,isExternal:!0,cornerRadius:i,cornerIsExternal:l}),Y=B.circleTangency,H=B.lineTangency,Z=B.theta,W=l?Math.abs(u-f):Math.abs(u-f)-R-Z;if(W<0&&i===0)return"".concat(M,"L").concat(n,",").concat(r,"Z");M+="L".concat(H.x,",").concat(H.y,`
A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(Y.x,",").concat(Y.y,`
A`).concat(o,",").concat(o,",0,").concat(+(W>180),",").concat(+(h>0),",").concat(O.x,",").concat(O.y,`
A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(F.x,",").concat(F.y,"Z")}else M+="L".concat(n,",").concat(r,"Z");return M},a_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},yz=function(t){var n=_R(_R({},a_e),t),r=n.cx,o=n.cy,a=n.innerRadius,i=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,h=n.endAngle,p=n.className;if(i<a||f===h)return null;var m=Ut("recharts-sector",p),w=i-a,b=hu(s,w,0,!0),y;return b>0&&Math.abs(f-h)<360?y=o_e({cx:r,cy:o,innerRadius:a,outerRadius:i,cornerRadius:Math.min(b,w/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:h}):y=vz({cx:r,cy:o,innerRadius:a,outerRadius:i,startAngle:f,endAngle:h}),_.createElement("path",fE({},Rt(n,!0),{className:m,d:y,role:"img"}))};function Lm(e){"@babel/helpers - typeof";return Lm=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},Lm(e)}function hE(){return hE=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},hE.apply(this,arguments)}function YR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function zR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YR(Object(n),!0).forEach(function(r){i_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i_e(e,t,n){return t=s_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s_e(e){var t=l_e(e,"string");return Lm(t)=="symbol"?t:t+""}function l_e(e,t){if(Lm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UR={curveBasisClosed:_Re,curveBasisOpen:YRe,curveBasis:BRe,curveBumpX:kRe,curveBumpY:ERe,curveLinearClosed:zRe,curveLinear:lS,curveMonotoneX:URe,curveMonotoneY:VRe,curveNatural:WRe,curveStep:GRe,curveStepAfter:qRe,curveStepBefore:ZRe},Ay=function(t){return t.x===+t.x&&t.y===+t.y},ip=function(t){return t.x},sp=function(t){return t.y},c_e=function(t,n){if(Mt(t))return t;var r="curve".concat(iS(t));return(r==="curveMonotone"||r==="curveBump")&&n?UR["".concat(r).concat(n==="vertical"?"Y":"X")]:UR[r]||lS},u_e=function(t){var n=t.type,r=n===void 0?"linear":n,o=t.points,a=o===void 0?[]:o,i=t.baseLine,s=t.layout,l=t.connectNulls,u=l===void 0?!1:l,f=c_e(r,s),h=u?a.filter(function(b){return Ay(b)}):a,p;if(Array.isArray(i)){var m=u?i.filter(function(b){return Ay(b)}):i,w=h.map(function(b,y){return zR(zR({},b),{},{base:m[y]})});return s==="vertical"?p=Sy().y(sp).x1(ip).x0(function(b){return b.base.x}):p=Sy().x(ip).y1(sp).y0(function(b){return b.base.y}),p.defined(Ay).curve(f),p(w)}return s==="vertical"&&Ke(i)?p=Sy().y(sp).x1(ip).x0(i):Ke(i)?p=Sy().x(ip).y1(sp).y0(i):p=Y_().x(ip).y(sp),p.defined(Ay).curve(f),p(h)},pE=function(t){var n=t.className,r=t.points,o=t.path,a=t.pathRef;if((!r||!r.length)&&!o)return null;var i=r&&r.length?u_e(t):o;return _.createElement("path",hE({},Rt(t,!1),Kb(t),{className:Ut("recharts-curve",n),d:i,ref:a}))},d_e=Object.getOwnPropertyNames,f_e=Object.getOwnPropertySymbols,h_e=Object.prototype.hasOwnProperty;function VR(e,t){return function(r,o,a){return e(r,o,a)&&t(r,o,a)}}function Ny(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var a=o.cache,i=a.get(n),s=a.get(r);if(i&&s)return i===r&&s===n;a.set(n,r),a.set(r,n);var l=e(n,r,o);return a.delete(n),a.delete(r),l}}function WR(e){return d_e(e).concat(f_e(e))}var bz=Object.hasOwn||function(e,t){return h_e.call(e,t)};function Mu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var wz="_owner",GR=Object.getOwnPropertyDescriptor,ZR=Object.keys;function p_e(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 m_e(e,t){return Mu(e.getTime(),t.getTime())}function g_e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function v_e(e,t){return e===t}function qR(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),a=e.entries(),i,s,l=0;(i=a.next())&&!i.done;){for(var u=t.entries(),f=!1,h=0;(s=u.next())&&!s.done;){if(o[h]){h++;continue}var p=i.value,m=s.value;if(n.equals(p[0],m[0],l,h,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){f=o[h]=!0;break}h++}if(!f)return!1;l++}return!0}var y_e=Mu;function b_e(e,t,n){var r=ZR(e),o=r.length;if(ZR(t).length!==o)return!1;for(var a;o-- >0;)if(a=r[o],a===wz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!bz(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))return!1;return!0}function lp(e,t,n){var r=WR(e),o=r.length;if(WR(t).length!==o)return!1;for(var a,i,s;o-- >0;)if(a=r[o],a===wz&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!bz(t,a)||!n.equals(e[a],t[a],a,a,e,t,n)||(i=GR(e,a),s=GR(t,a),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function w_e(e,t){return Mu(e.valueOf(),t.valueOf())}function S_e(e,t){return e.source===t.source&&e.flags===t.flags}function $R(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),a=e.values(),i,s;(i=a.next())&&!i.done;){for(var l=t.values(),u=!1,f=0;(s=l.next())&&!s.done;){if(!o[f]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){u=o[f]=!0;break}f++}if(!u)return!1}return!0}function T_e(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 x_e(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}var I_e="[object Arguments]",k_e="[object Boolean]",E_e="[object Date]",C_e="[object Error]",M_e="[object Map]",D_e="[object Number]",A_e="[object Object]",N_e="[object RegExp]",O_e="[object Set]",P_e="[object String]",j_e="[object URL]",L_e=Array.isArray,KR=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,JR=Object.assign,R_e=Object.prototype.toString.call.bind(Object.prototype.toString);function F_e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,a=e.areMapsEqual,i=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,h=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(w,b,y){if(w===b)return!0;if(w==null||b==null)return!1;var S=typeof w;if(S!==typeof b)return!1;if(S!=="object")return S==="number"?i(w,b,y):S==="function"?o(w,b,y):!1;var x=w.constructor;if(x!==b.constructor)return!1;if(x===Object)return s(w,b,y);if(L_e(w))return t(w,b,y);if(KR!=null&&KR(w))return h(w,b,y);if(x===Date)return n(w,b,y);if(x===RegExp)return u(w,b,y);if(x===Map)return a(w,b,y);if(x===Set)return f(w,b,y);var E=R_e(w);return E===E_e?n(w,b,y):E===N_e?u(w,b,y):E===M_e?a(w,b,y):E===O_e?f(w,b,y):E===A_e?typeof w.then!="function"&&typeof b.then!="function"&&s(w,b,y):E===j_e?p(w,b,y):E===C_e?r(w,b,y):E===I_e?s(w,b,y):E===k_e||E===D_e||E===P_e?l(w,b,y):!1}}function H_e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?lp:p_e,areDatesEqual:m_e,areErrorsEqual:g_e,areFunctionsEqual:v_e,areMapsEqual:r?VR(qR,lp):qR,areNumbersEqual:y_e,areObjectsEqual:r?lp:b_e,arePrimitiveWrappersEqual:w_e,areRegExpsEqual:S_e,areSetsEqual:r?VR($R,lp):$R,areTypedArraysEqual:r?lp:T_e,areUrlsEqual:x_e};if(n&&(o=JR({},o,n(o))),t){var a=Ny(o.areArraysEqual),i=Ny(o.areMapsEqual),s=Ny(o.areObjectsEqual),l=Ny(o.areSetsEqual);o=JR({},o,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return o}function B_e(e){return function(t,n,r,o,a,i,s){return e(t,n,s)}}function __e(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,a=e.strict;if(r)return function(l,u){var f=r(),h=f.cache,p=h===void 0?t?new WeakMap:void 0:h,m=f.meta;return n(l,u,{cache:p,equals:o,meta:m,strict:a})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:o,meta:void 0,strict:a})};var i={cache:void 0,equals:o,meta:void 0,strict:a};return function(l,u){return n(l,u,i)}}var Y_e=nc();nc({strict:!0});nc({circular:!0});nc({circular:!0,strict:!0});nc({createInternalComparator:function(){return Mu}});nc({strict:!0,createInternalComparator:function(){return Mu}});nc({circular:!0,createInternalComparator:function(){return Mu}});nc({circular:!0,createInternalComparator:function(){return Mu},strict:!0});function nc(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,a=e.strict,i=a===void 0?!1:a,s=H_e(e),l=F_e(s),u=r?r(l):B_e(l);return __e({circular:n,comparator:l,createState:o,equals:u,strict:i})}function z_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function XR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(a){n<0&&(n=a),a-n>t?(e(a),n=-1):z_e(o)};requestAnimationFrame(r)}function mE(e){"@babel/helpers - typeof";return mE=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},mE(e)}function U_e(e){return Z_e(e)||G_e(e)||W_e(e)||V_e()}function V_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W_e(e,t){if(e){if(typeof e=="string")return QR(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 QR(e,t)}}function QR(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 G_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z_e(e){if(Array.isArray(e))return e}function q_e(){var e={},t=function(){return null},n=!1,r=function o(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var i=a,s=U_e(i),l=s[0],u=s.slice(1);if(typeof l=="number"){XR(o.bind(null,u),l);return}o(l),XR(o.bind(null,u));return}mE(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 Rm(e){"@babel/helpers - typeof";return Rm=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},Rm(e)}function e5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function t5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(n),!0).forEach(function(r){Sz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sz(e,t,n){return t=$_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $_e(e){var t=K_e(e,"string");return Rm(t)==="symbol"?t:String(t)}function K_e(e,t){if(Rm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var J_e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,o){return r.filter(function(a){return o.includes(a)})})},X_e=function(t){return t},Q_e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Fp=function(t,n){return Object.keys(n).reduce(function(r,o){return t5(t5({},r),{},Sz({},o,t(o,n[o])))},{})},n5=function(t,n,r){return t.map(function(o){return"".concat(Q_e(o)," ").concat(n,"ms ").concat(r)}).join(",")};function eYe(e,t){return rYe(e)||nYe(e,t)||Tz(e,t)||tYe()}function tYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function rYe(e){if(Array.isArray(e))return e}function oYe(e){return sYe(e)||iYe(e)||Tz(e)||aYe()}function aYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tz(e,t){if(e){if(typeof e=="string")return gE(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 gE(e,t)}}function iYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sYe(e){if(Array.isArray(e))return gE(e)}function gE(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 kw=1e-4,xz=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Iz=function(t,n){return t.map(function(r,o){return r*Math.pow(n,o)}).reduce(function(r,o){return r+o})},r5=function(t,n){return function(r){var o=xz(t,n);return Iz(o,r)}},lYe=function(t,n){return function(r){var o=xz(t,n),a=[].concat(oYe(o.map(function(i,s){return i*s}).slice(1)),[0]);return Iz(a,r)}},o5=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],a=n[1],i=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":o=0,a=0,i=1,s=1;break;case"ease":o=.25,a=.1,i=.25,s=1;break;case"ease-in":o=.42,a=0,i=1,s=1;break;case"ease-out":o=.42,a=0,i=.58,s=1;break;case"ease-in-out":o=0,a=0,i=.58,s=1;break;default:var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),f=eYe(u,4);o=f[0],a=f[1],i=f[2],s=f[3]}}var h=r5(o,i),p=r5(a,s),m=lYe(o,i),w=function(S){return S>1?1:S<0?0:S},b=function(S){for(var x=S>1?1:S,E=x,C=0;C<8;++C){var M=h(E)-x,k=m(E);if(Math.abs(M-x)<kw||k<kw)return p(E);E=w(E-M/k)}return p(E)};return b.isStepper=!1,b},cYe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,a=o===void 0?8:o,i=t.dt,s=i===void 0?17:i,l=function(f,h,p){var m=-(f-h)*r,w=p*a,b=p+(m-w)*s/1e3,y=p*s/1e3+f;return Math.abs(y-h)<kw&&Math.abs(b)<kw?[h,0]:[y,b]};return l.isStepper=!0,l.dt=s,l},uYe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(typeof o=="string")switch(o){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return o5(o);case"spring":return cYe();default:if(o.split("(")[0]==="cubic-bezier")return o5(o)}return typeof o=="function"?o:null};function Fm(e){"@babel/helpers - typeof";return Fm=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},Fm(e)}function a5(e){return hYe(e)||fYe(e)||kz(e)||dYe()}function dYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hYe(e){if(Array.isArray(e))return yE(e)}function i5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(n),!0).forEach(function(r){vE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vE(e,t,n){return t=pYe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pYe(e){var t=mYe(e,"string");return Fm(t)==="symbol"?t:String(t)}function mYe(e,t){if(Fm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gYe(e,t){return bYe(e)||yYe(e,t)||kz(e,t)||vYe()}function vYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kz(e,t){if(e){if(typeof e=="string")return yE(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 yE(e,t)}}function yE(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 yYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function bYe(e){if(Array.isArray(e))return e}var Ew=function(t,n,r){return t+(n-t)*r},bE=function(t){var n=t.from,r=t.to;return n!==r},wYe=function e(t,n,r){var o=Fp(function(a,i){if(bE(i)){var s=t(i.from,i.to,i.velocity),l=gYe(s,2),u=l[0],f=l[1];return Tr(Tr({},i),{},{from:u,velocity:f})}return i},n);return r<1?Fp(function(a,i){return bE(i)?Tr(Tr({},i),{},{velocity:Ew(i.velocity,o[a].velocity,r),from:Ew(i.from,o[a].from,r)}):i},n):e(t,o,r-1)};const SYe=function(e,t,n,r,o){var a=J_e(e,t),i=a.reduce(function(y,S){return Tr(Tr({},y),{},vE({},S,[e[S],t[S]]))},{}),s=a.reduce(function(y,S){return Tr(Tr({},y),{},vE({},S,{from:e[S],velocity:0,to:t[S]}))},{}),l=-1,u,f,h=function(){return null},p=function(){return Fp(function(S,x){return x.from},s)},m=function(){return!Object.values(s).filter(bE).length},w=function(S){u||(u=S);var x=S-u,E=x/n.dt;s=wYe(n,s,E),o(Tr(Tr(Tr({},e),t),p())),u=S,m()||(l=requestAnimationFrame(h))},b=function(S){f||(f=S);var x=(S-f)/r,E=Fp(function(M,k){return Ew.apply(void 0,a5(k).concat([n(x)]))},i);if(o(Tr(Tr(Tr({},e),t),E)),x<1)l=requestAnimationFrame(h);else{var C=Fp(function(M,k){return Ew.apply(void 0,a5(k).concat([n(1)]))},i);o(Tr(Tr(Tr({},e),t),C))}};return h=n.isStepper?w:b,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(l)}}};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)}var TYe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function xYe(e,t){if(e==null)return{};var n=IYe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IYe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Qx(e){return MYe(e)||CYe(e)||EYe(e)||kYe()}function kYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EYe(e,t){if(e){if(typeof e=="string")return wE(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 wE(e,t)}}function CYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MYe(e){if(Array.isArray(e))return wE(e)}function wE(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 s5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s5(Object(n),!0).forEach(function(r){yp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yp(e,t,n){return t=Ez(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AYe(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,Ez(r.key),r)}}function NYe(e,t,n){return t&&AYe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ez(e){var t=OYe(e,"string");return uf(t)==="symbol"?t:String(t)}function OYe(e,t){if(uf(e)!=="object"||e===null)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)}function PYe(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&&SE(e,t)}function SE(e,t){return SE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},SE(e,t)}function jYe(e){var t=LYe();return function(){var r=Cw(e),o;if(t){var a=Cw(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return TE(this,o)}}function TE(e,t){if(t&&(uf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xE(e)}function xE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LYe(){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 Cw(e){return Cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cw(e)}var $s=function(e){PYe(n,e);var t=jYe(n);function n(r,o){var a;DYe(this,n),a=t.call(this,r,o);var i=a.props,s=i.isActive,l=i.attributeName,u=i.from,f=i.to,h=i.steps,p=i.children,m=i.duration;if(a.handleStyleChange=a.handleStyleChange.bind(xE(a)),a.changeStyle=a.changeStyle.bind(xE(a)),!s||m<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:f}),TE(a);if(h&&h.length)a.state={style:h[0].style};else if(u){if(typeof p=="function")return a.state={style:u},TE(a);a.state={style:l?yp({},l,u):u}}else a.state={style:{}};return a}return NYe(n,[{key:"componentDidMount",value:function(){var o=this.props,a=o.isActive,i=o.canBegin;this.mounted=!0,!(!a||!i)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var a=this.props,i=a.isActive,s=a.canBegin,l=a.attributeName,u=a.shouldReAnimate,f=a.to,h=a.from,p=this.state.style;if(s){if(!i){var m={style:l?yp({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(m);return}if(!(Y_e(o.to,f)&&o.canBegin&&o.isActive)){var w=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=w||u?h:o.to;if(this.state&&p){var y={style:l?yp({},l,b):b};(l&&p[l]!==b||!l&&p!==b)&&this.setState(y)}this.runAnimation(Va(Va({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var a=this,i=o.from,s=o.to,l=o.duration,u=o.easing,f=o.begin,h=o.onAnimationEnd,p=o.onAnimationStart,m=SYe(i,s,uYe(u),l,this.changeStyle),w=function(){a.stopJSAnimation=m()};this.manager.start([p,f,w,l,h])}},{key:"runStepAnimation",value:function(o){var a=this,i=o.steps,s=o.begin,l=o.onAnimationStart,u=i[0],f=u.style,h=u.duration,p=h===void 0?0:h,m=function(b,y,S){if(S===0)return b;var x=y.duration,E=y.easing,C=E===void 0?"ease":E,M=y.style,k=y.properties,O=y.onAnimationEnd,F=S>0?i[S-1]:y,R=k||Object.keys(M);if(typeof C=="function"||C==="spring")return[].concat(Qx(b),[a.runJSAnimation.bind(a,{from:F.style,to:M,duration:x,easing:C}),x]);var B=n5(R,x,C),Y=Va(Va(Va({},F.style),M),{},{transition:B});return[].concat(Qx(b),[Y,x,O]).filter(X_e)};return this.manager.start([l].concat(Qx(i.reduce(m,[f,Math.max(p,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=q_e());var a=o.begin,i=o.duration,s=o.attributeName,l=o.to,u=o.easing,f=o.onAnimationStart,h=o.onAnimationEnd,p=o.steps,m=o.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(o);return}if(p.length>1){this.runStepAnimation(o);return}var b=s?yp({},s,l):l,y=n5(Object.keys(b),i,u);w.start([f,a,Va(Va({},b),{},{transition:y}),i,h])}},{key:"render",value:function(){var o=this.props,a=o.children;o.begin;var i=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=xYe(o,TYe),u=D.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!s||u===0||i<=0)return a;var h=function(m){var w=m.props,b=w.style,y=b===void 0?{}:b,S=w.className,x=D.cloneElement(m,Va(Va({},l),{},{style:Va(Va({},y),f),className:S}));return x};return u===1?h(D.Children.only(a)):_.createElement("div",null,D.Children.map(a,function(p){return h(p)}))}}]),n}(D.PureComponent);$s.displayName="Animate";$s.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};$s.propTypes={from:de.oneOfType([de.object,de.string]),to:de.oneOfType([de.object,de.string]),attributeName:de.string,duration:de.number,begin:de.number,easing:de.oneOfType([de.string,de.func]),steps:de.arrayOf(de.shape({duration:de.number.isRequired,style:de.object.isRequired,easing:de.oneOfType([de.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),de.func]),properties:de.arrayOf("string"),onAnimationEnd:de.func})),children:de.oneOfType([de.node,de.func]),isActive:de.bool,canBegin:de.bool,onAnimationEnd:de.func,shouldReAnimate:de.bool,onAnimationStart:de.func,onAnimationReStart:de.func};function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}function Mw(){return Mw=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},Mw.apply(this,arguments)}function RYe(e,t){return _Ye(e)||BYe(e,t)||HYe(e,t)||FYe()}function FYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HYe(e,t){if(e){if(typeof e=="string")return l5(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 l5(e,t)}}function l5(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 BYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function _Ye(e){if(Array.isArray(e))return e}function c5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function u5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c5(Object(n),!0).forEach(function(r){YYe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YYe(e,t,n){return t=zYe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zYe(e){var t=UYe(e,"string");return Hm(t)=="symbol"?t:t+""}function UYe(e,t){if(Hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d5=function(t,n,r,o,a){var i=Math.min(Math.abs(r)/2,Math.abs(o)/2),s=o>=0?1:-1,l=r>=0?1:-1,u=o>=0&&r>=0||o<0&&r<0?1:0,f;if(i>0&&a instanceof Array){for(var h=[0,0,0,0],p=0,m=4;p<m;p++)h[p]=a[p]>i?i:a[p];f="M".concat(t,",").concat(n+s*h[0]),h[0]>0&&(f+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(u,",").concat(t+l*h[0],",").concat(n)),f+="L ".concat(t+r-l*h[1],",").concat(n),h[1]>0&&(f+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(u,`,
`).concat(t+r,",").concat(n+s*h[1])),f+="L ".concat(t+r,",").concat(n+o-s*h[2]),h[2]>0&&(f+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(u,`,
`).concat(t+r-l*h[2],",").concat(n+o)),f+="L ".concat(t+l*h[3],",").concat(n+o),h[3]>0&&(f+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(u,`,
`).concat(t,",").concat(n+o-s*h[3])),f+="Z"}else if(i>0&&a===+a&&a>0){var w=Math.min(i,a);f="M ".concat(t,",").concat(n+s*w,`
A `).concat(w,",").concat(w,",0,0,").concat(u,",").concat(t+l*w,",").concat(n,`
L `).concat(t+r-l*w,",").concat(n,`
A `).concat(w,",").concat(w,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*w,`
L `).concat(t+r,",").concat(n+o-s*w,`
A `).concat(w,",").concat(w,",0,0,").concat(u,",").concat(t+r-l*w,",").concat(n+o,`
L `).concat(t+l*w,",").concat(n+o,`
A `).concat(w,",").concat(w,",0,0,").concat(u,",").concat(t,",").concat(n+o-s*w," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return f},VYe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,a=n.x,i=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(a,a+s),f=Math.max(a,a+s),h=Math.min(i,i+l),p=Math.max(i,i+l);return r>=u&&r<=f&&o>=h&&o<=p}return!1},WYe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rA=function(t){var n=u5(u5({},WYe),t),r=D.useRef(),o=D.useState(-1),a=RYe(o,2),i=a[0],s=a[1];D.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&s(C)}catch{}},[]);var l=n.x,u=n.y,f=n.width,h=n.height,p=n.radius,m=n.className,w=n.animationEasing,b=n.animationDuration,y=n.animationBegin,S=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||h!==+h||f===0||h===0)return null;var E=Ut("recharts-rectangle",m);return x?_.createElement($s,{canBegin:i>0,from:{width:f,height:h,x:l,y:u},to:{width:f,height:h,x:l,y:u},duration:b,animationEasing:w,isActive:x},function(C){var M=C.width,k=C.height,O=C.x,F=C.y;return _.createElement($s,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:b,isActive:S,easing:w},_.createElement("path",Mw({},Rt(n,!0),{className:E,d:d5(O,F,M,k,p),ref:r})))}):_.createElement("path",Mw({},Rt(n,!0),{className:E,d:d5(l,u,f,h,p)}))};function IE(){return IE=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},IE.apply(this,arguments)}var oA=function(t){var n=t.cx,r=t.cy,o=t.r,a=t.className,i=Ut("recharts-dot",a);return n===+n&&r===+r&&o===+o?_.createElement("circle",IE({},Rt(t,!1),Kb(t),{className:i,cx:n,cy:r,r:o})):null};function Bm(e){"@babel/helpers - typeof";return Bm=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},Bm(e)}var GYe=["x","y","top","left","width","height","className"];function kE(){return kE=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},kE.apply(this,arguments)}function f5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ZYe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f5(Object(n),!0).forEach(function(r){qYe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qYe(e,t,n){return t=$Ye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Ye(e){var t=KYe(e,"string");return Bm(t)=="symbol"?t:t+""}function KYe(e,t){if(Bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JYe(e,t){if(e==null)return{};var n=XYe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XYe(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 QYe=function(t,n,r,o,a,i){return"M".concat(t,",").concat(a,"v").concat(o,"M").concat(i,",").concat(n,"h").concat(r)},eze=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,a=o===void 0?0:o,i=t.top,s=i===void 0?0:i,l=t.left,u=l===void 0?0:l,f=t.width,h=f===void 0?0:f,p=t.height,m=p===void 0?0:p,w=t.className,b=JYe(t,GYe),y=ZYe({x:r,y:a,top:s,left:u,width:h,height:m},b);return!Ke(r)||!Ke(a)||!Ke(h)||!Ke(m)||!Ke(s)||!Ke(u)?null:_.createElement("path",kE({},Rt(y,!0),{className:Ut("recharts-cross",w),d:QYe(r,a,h,m,s,u)}))},tze=Qs,nze=si,rze="[object Boolean]";function oze(e){return e===!0||e===!1||nze(e)&&tze(e)==rze}var aze=oze;const ize=Xe(aze);function _m(e){"@babel/helpers - typeof";return _m=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},_m(e)}function Dw(){return Dw=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},Dw.apply(this,arguments)}function sze(e,t){return dze(e)||uze(e,t)||cze(e,t)||lze()}function lze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cze(e,t){if(e){if(typeof e=="string")return h5(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 h5(e,t)}}function h5(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 uze(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function dze(e){if(Array.isArray(e))return e}function p5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function m5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p5(Object(n),!0).forEach(function(r){fze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fze(e,t,n){return t=hze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hze(e){var t=pze(e,"string");return _m(t)=="symbol"?t:t+""}function pze(e,t){if(_m(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_m(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g5=function(t,n,r,o,a){var i=r-o,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-i/2,",").concat(n+a),s+="L ".concat(t+r-i/2-o,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},mze={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},gze=function(t){var n=m5(m5({},mze),t),r=D.useRef(),o=D.useState(-1),a=sze(o,2),i=a[0],s=a[1];D.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&s(E)}catch{}},[]);var l=n.x,u=n.y,f=n.upperWidth,h=n.lowerWidth,p=n.height,m=n.className,w=n.animationEasing,b=n.animationDuration,y=n.animationBegin,S=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||h!==+h||p!==+p||f===0&&h===0||p===0)return null;var x=Ut("recharts-trapezoid",m);return S?_.createElement($s,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:f,lowerWidth:h,height:p,x:l,y:u},duration:b,animationEasing:w,isActive:S},function(E){var C=E.upperWidth,M=E.lowerWidth,k=E.height,O=E.x,F=E.y;return _.createElement($s,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:b,easing:w},_.createElement("path",Dw({},Rt(n,!0),{className:x,d:g5(O,F,C,M,k),ref:r})))}):_.createElement("g",null,_.createElement("path",Dw({},Rt(n,!0),{className:x,d:g5(l,u,f,h,p)})))},vze=["option","shapeType","propTransformer","activeClassName","isActive"];function Ym(e){"@babel/helpers - typeof";return Ym=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},Ym(e)}function yze(e,t){if(e==null)return{};var n=bze(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bze(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 v5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Aw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v5(Object(n),!0).forEach(function(r){wze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wze(e,t,n){return t=Sze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sze(e){var t=Tze(e,"string");return Ym(t)=="symbol"?t:t+""}function Tze(e,t){if(Ym(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xze(e,t){return Aw(Aw({},t),e)}function Ize(e,t){return e==="symbols"}function y5(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return _.createElement(rA,n);case"trapezoid":return _.createElement(gze,n);case"sector":return _.createElement(yz,n);case"symbols":if(Ize(t))return _.createElement(DD,n);break;default:return null}}function kze(e){return D.isValidElement(e)?e.props:e}function Eze(e){var t=e.option,n=e.shapeType,r=e.propTransformer,o=r===void 0?xze:r,a=e.activeClassName,i=a===void 0?"recharts-active-shape":a,s=e.isActive,l=yze(e,vze),u;if(D.isValidElement(t))u=D.cloneElement(t,Aw(Aw({},l),kze(t)));else if(Mt(t))u=t(l);else if(Upe(t)&&!ize(t)){var f=o(t,l);u=_.createElement(y5,{shapeType:n,elementProps:f})}else{var h=l;u=_.createElement(y5,{shapeType:n,elementProps:h})}return s?_.createElement(_n,{className:i},u):u}function SS(e,t){return t!=null&&"trapezoids"in e.props}function TS(e,t){return t!=null&&"sectors"in e.props}function zm(e,t){return t!=null&&"points"in e.props}function Cze(e,t){var n,r,o=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 o&&a}function Mze(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Dze(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function Aze(e,t){var n;return SS(e,t)?n=Cze:TS(e,t)?n=Mze:zm(e,t)&&(n=Dze),n}function Nze(e,t){var n;return SS(e,t)?n="trapezoids":TS(e,t)?n="sectors":zm(e,t)&&(n="points"),n}function Oze(e,t){if(SS(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(TS(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 zm(e,t)?t.payload:{}}function Pze(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=Nze(n,t),a=Oze(n,t),i=r.filter(function(l,u){var f=vg(a,l),h=n.props[o].filter(function(w){var b=Aze(n,t);return b(w,t)}),p=n.props[o].indexOf(h[h.length-1]),m=u===p;return f&&m}),s=r.indexOf(i[i.length-1]);return s}function Um(e){"@babel/helpers - typeof";return Um=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},Um(e)}function b5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function w5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b5(Object(n),!0).forEach(function(r){Cz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cz(e,t,n){return t=jze(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jze(e){var t=Lze(e,"string");return Um(t)=="symbol"?t:t+""}function Lze(e,t){if(Um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rze=["Webkit","Moz","O","ms"],Fze=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),o=Rze.reduce(function(a,i){return w5(w5({},a),{},Cz({},i+r,n))},{});return o[t]=n,o};function df(e){"@babel/helpers - typeof";return df=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},df(e)}function Nw(){return Nw=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},Nw.apply(this,arguments)}function S5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function eI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S5(Object(n),!0).forEach(function(r){Uo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T5(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,Dz(r.key),r)}}function Bze(e,t,n){return t&&T5(e.prototype,t),n&&T5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _ze(e,t,n){return t=Ow(t),Yze(e,Mz()?Reflect.construct(t,n||[],Ow(e).constructor):t.apply(e,n))}function Yze(e,t){if(t&&(df(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zze(e)}function zze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mz=function(){return!!e})()}function Ow(e){return Ow=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ow(e)}function Uze(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&&EE(e,t)}function EE(e,t){return EE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},EE(e,t)}function Uo(e,t,n){return t=Dz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dz(e){var t=Vze(e,"string");return df(t)=="symbol"?t:t+""}function Vze(e,t){if(df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wze=function(t){var n=t.data,r=t.startIndex,o=t.endIndex,a=t.x,i=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,u=Lp().domain(im(0,l)).range([a,a+i-s]),f=u.domain().map(function(h){return u(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(o),scale:u,scaleValues:f}},x5=function(t){return t.changedTouches&&!!t.changedTouches.length},ff=function(e){function t(n){var r;return Hze(this,t),r=_ze(this,t,[n]),Uo(r,"handleDrag",function(o){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(o):r.state.isSlideMoving&&r.handleSlideDrag(o)}),Uo(r,"handleTouchMove",function(o){o.changedTouches!=null&&o.changedTouches.length>0&&r.handleDrag(o.changedTouches[0])}),Uo(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,a=o.endIndex,i=o.onDragEnd,s=o.startIndex;i?.({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Uo(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Uo(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Uo(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Uo(r,"handleSlideDragStart",function(o){var a=x5(o)?o.changedTouches[0]:o;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 Uze(t,e),Bze(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,a=r.endX,i=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,h=Math.min(o,a),p=Math.max(o,a),m=t.getIndexInRange(i,h),w=t.getIndexInRange(i,p);return{startIndex:m-m%l,endIndex:w===f?f:w-w%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,a=o.data,i=o.tickFormatter,s=o.dataKey,l=Qo(a[r],s,r);return Mt(i)?i(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 o=this.state,a=o.slideMoveStartX,i=o.startX,s=o.endX,l=this.props,u=l.x,f=l.width,h=l.travellerWidth,p=l.startIndex,m=l.endIndex,w=l.onChange,b=r.pageX-a;b>0?b=Math.min(b,u+f-h-s,u+f-h-i):b<0&&(b=Math.max(b,u-i,u-s));var y=this.getIndex({startX:i+b,endX:s+b});(y.startIndex!==p||y.endIndex!==m)&&w&&w(y),this.setState({startX:i+b,endX:s+b,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var a=x5(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,a=o.brushMoveStartX,i=o.movingTravellerId,s=o.endX,l=o.startX,u=this.state[i],f=this.props,h=f.x,p=f.width,m=f.travellerWidth,w=f.onChange,b=f.gap,y=f.data,S={startX:this.state.startX,endX:this.state.endX},x=r.pageX-a;x>0?x=Math.min(x,h+p-m-u):x<0&&(x=Math.max(x,h-u)),S[i]=u+x;var E=this.getIndex(S),C=E.startIndex,M=E.endIndex,k=function(){var F=y.length-1;return i==="startX"&&(s>l?C%b===0:M%b===0)||s<l&&M===F||i==="endX"&&(s>l?M%b===0:C%b===0)||s>l&&M===F};this.setState(Uo(Uo({},i,u+x),"brushMoveStartX",r.pageX),function(){w&&k()&&w(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var a=this,i=this.state,s=i.scaleValues,l=i.startX,u=i.endX,f=this.state[o],h=s.indexOf(f);if(h!==-1){var p=h+r;if(!(p===-1||p>=s.length)){var m=s[p];o==="startX"&&m>=u||o==="endX"&&m<=l||this.setState(Uo({},o,m),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,a=r.y,i=r.width,s=r.height,l=r.fill,u=r.stroke;return _.createElement("rect",{stroke:u,fill:l,x:o,y:a,width:i,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,a=r.y,i=r.width,s=r.height,l=r.data,u=r.children,f=r.padding,h=D.Children.only(u);return h?_.cloneElement(h,{x:o,y:a,width:i,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var a,i,s=this,l=this.props,u=l.y,f=l.travellerWidth,h=l.height,p=l.traveller,m=l.ariaLabel,w=l.data,b=l.startIndex,y=l.endIndex,S=Math.max(r,this.props.x),x=eI(eI({},Rt(this.props,!1)),{},{x:S,y:u,width:f,height:h}),E=m||"Min value: ".concat((a=w[b])===null||a===void 0?void 0:a.name,", Max value: ").concat((i=w[y])===null||i===void 0?void 0:i.name);return _.createElement(_n,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(M){["ArrowLeft","ArrowRight"].includes(M.key)&&(M.preventDefault(),M.stopPropagation(),s.handleTravellerMoveKeyboard(M.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,x))}},{key:"renderSlide",value:function(r,o){var a=this.props,i=a.y,s=a.height,l=a.stroke,u=a.travellerWidth,f=Math.min(r,o)+u,h=Math.max(Math.abs(o-r)-u,0);return _.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:f,y:i,width:h,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,a=r.endIndex,i=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,f=this.state,h=f.startX,p=f.endX,m=5,w={pointerEvents:"none",fill:u};return _.createElement(_n,{className:"recharts-brush-texts"},_.createElement(lw,Nw({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,p)-m,y:i+s/2},w),this.getTextOfTick(o)),_.createElement(lw,Nw({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,p)+l+m,y:i+s/2},w),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,o=r.data,a=r.className,i=r.children,s=r.x,l=r.y,u=r.width,f=r.height,h=r.alwaysShowText,p=this.state,m=p.startX,w=p.endX,b=p.isTextActive,y=p.isSlideMoving,S=p.isTravellerMoving,x=p.isTravellerFocused;if(!o||!o.length||!Ke(s)||!Ke(l)||!Ke(u)||!Ke(f)||u<=0||f<=0)return null;var E=Ut("recharts-brush",a),C=_.Children.count(i)===1,M=Fze("userSelect","none");return _.createElement(_n,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:M},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(m,w),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(w,"endX"),(b||y||S||x||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,a=r.y,i=r.width,s=r.height,l=r.stroke,u=Math.floor(a+s/2)-1;return _.createElement(_.Fragment,null,_.createElement("rect",{x:o,y:a,width:i,height:s,fill:l,stroke:"none"}),_.createElement("line",{x1:o+1,y1:u,x2:o+i-1,y2:u,fill:"none",stroke:"#fff"}),_.createElement("line",{x1:o+1,y1:u+2,x2:o+i-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var a;return _.isValidElement(r)?a=_.cloneElement(r,o):Mt(r)?a=r(o):a=t.renderDefaultTraveller(o),a}},{key:"getDerivedStateFromProps",value:function(r,o){var a=r.data,i=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,f=r.startIndex,h=r.endIndex;if(a!==o.prevData||u!==o.prevUpdateId)return eI({prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:i},a&&a.length?Wze({data:a,width:i,x:s,travellerWidth:l,startIndex:f,endIndex:h}):{scale:null,scaleValues:null});if(o.scale&&(i!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+i-l]);var p=o.scale.domain().map(function(m){return o.scale(m)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:i,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,o){for(var a=r.length,i=0,s=a-1;s-i>1;){var l=Math.floor((i+s)/2);r[l]>o?s=l:i=l}return o>=r[s]?s:i}}])}(D.PureComponent);Uo(ff,"displayName","Brush");Uo(ff,"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 Gze=XC;function Zze(e,t){var n;return Gze(e,function(r,o,a){return n=t(r,o,a),!n}),!!n}var qze=Zze,$ze=q6,Kze=el,Jze=qze,Xze=Gr,Qze=Ff;function eUe(e,t,n){var r=Xze(e)?$ze:Jze;return n&&Qze(e,t,n)&&(t=void 0),r(e,Kze(t))}var tUe=eUe;const nUe=Xe(tUe);var Ki=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n};function rUe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var oUe=rUe,aUe=XC;function iUe(e,t){var n=!0;return aUe(e,function(r,o,a){return n=!!t(r,o,a),n}),n}var sUe=iUe,lUe=oUe,cUe=sUe,uUe=el,dUe=Gr,fUe=Ff;function hUe(e,t,n){var r=dUe(e)?lUe:cUe;return n&&fUe(e,t,n)&&(t=void 0),r(e,uUe(t))}var pUe=hUe;const Az=Xe(pUe);var mUe=["x","y"];function Vm(e){"@babel/helpers - typeof";return Vm=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},Vm(e)}function CE(){return CE=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},CE.apply(this,arguments)}function I5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function cp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I5(Object(n),!0).forEach(function(r){gUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gUe(e,t,n){return t=vUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vUe(e){var t=yUe(e,"string");return Vm(t)=="symbol"?t:t+""}function yUe(e,t){if(Vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bUe(e,t){if(e==null)return{};var n=wUe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wUe(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 SUe(e,t){var n=e.x,r=e.y,o=bUe(e,mUe),a="".concat(n),i=parseInt(a,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||o.height),f=parseInt(u,10),h="".concat(t.width||o.width),p=parseInt(h,10);return cp(cp(cp(cp(cp({},t),o),i?{x:i}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function k5(e){return _.createElement(Eze,CE({shapeType:"rectangle",propTransformer:SUe,activeClassName:"recharts-active-bar"},e))}var TUe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var a=typeof r=="number";return a?t(r,o):(a||mu(),n)}},xUe=["value","background"],Nz;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 IUe(e,t){if(e==null)return{};var n=kUe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kUe(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 Pw(){return Pw=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},Pw.apply(this,arguments)}function E5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(n),!0).forEach(function(r){Bl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C5(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,Pz(r.key),r)}}function CUe(e,t,n){return t&&C5(e.prototype,t),n&&C5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function MUe(e,t,n){return t=jw(t),DUe(e,Oz()?Reflect.construct(t,n||[],jw(e).constructor):t.apply(e,n))}function DUe(e,t){if(t&&(hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AUe(e)}function AUe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Oz=function(){return!!e})()}function jw(e){return jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jw(e)}function NUe(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&&ME(e,t)}function ME(e,t){return ME=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},ME(e,t)}function Bl(e,t,n){return t=Pz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pz(e){var t=OUe(e,"string");return hf(t)=="symbol"?t:t+""}function OUe(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 String(e)}var Ji=function(e){function t(){var n;EUe(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=MUe(this,t,[].concat(o)),Bl(n,"state",{isAnimationFinished:!1}),Bl(n,"id",Yg("recharts-bar-")),Bl(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),i&&i()}),Bl(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),i&&i()}),n}return NUe(t,e),CUe(t,[{key:"renderRectanglesStatically",value:function(r){var o=this,a=this.props,i=a.shape,s=a.dataKey,l=a.activeIndex,u=a.activeBar,f=Rt(this.props,!1);return r&&r.map(function(h,p){var m=p===l,w=m?u:i,b=Vn(Vn(Vn({},f),h),{},{isActive:m,option:w,index:p,dataKey:s,onAnimationStart:o.handleAnimationStart,onAnimationEnd:o.handleAnimationEnd});return _.createElement(_n,Pw({className:"recharts-bar-rectangle"},Jb(o.props,h,p),{key:"rectangle-".concat(h?.x,"-").concat(h?.y,"-").concat(h?.value)}),_.createElement(k5,b))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,o=this.props,a=o.data,i=o.layout,s=o.isAnimationActive,l=o.animationBegin,u=o.animationDuration,f=o.animationEasing,h=o.animationId,p=this.state.prevData;return _.createElement($s,{begin:l,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var w=m.t,b=a.map(function(y,S){var x=p&&p[S];if(x){var E=Ja(x.x,y.x),C=Ja(x.y,y.y),M=Ja(x.width,y.width),k=Ja(x.height,y.height);return Vn(Vn({},y),{},{x:E(w),y:C(w),width:M(w),height:k(w)})}if(i==="horizontal"){var O=Ja(0,y.height),F=O(w);return Vn(Vn({},y),{},{y:y.y+y.height-F,height:F})}var R=Ja(0,y.width),B=R(w);return Vn(Vn({},y),{},{width:B})});return _.createElement(_n,null,r.renderRectanglesStatically(b))})}},{key:"renderRectangles",value:function(){var r=this.props,o=r.data,a=r.isAnimationActive,i=this.state.prevData;return a&&o&&o.length&&(!i||!vg(i,o))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(o)}},{key:"renderBackground",value:function(){var r=this,o=this.props,a=o.data,i=o.dataKey,s=o.activeIndex,l=Rt(this.props.background,!1);return a.map(function(u,f){u.value;var h=u.background,p=IUe(u,xUe);if(!h)return null;var m=Vn(Vn(Vn(Vn(Vn({},p),{},{fill:"#eee"},h),l),Jb(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:i,index:f,className:"recharts-bar-background-rectangle"});return _.createElement(k5,Pw({key:"background-bar-".concat(f),option:r.props.background,isActive:f===s},m))})}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.data,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,h=wa(f,Gg);if(!h)return null;var p=u==="vertical"?i[0].height/2:i[0].width/2,m=function(y,S){var x=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:x,errorVal:Qo(y,S)}},w={clipPath:r?"url(#clipPath-".concat(o,")"):null};return _.createElement(_n,w,h.map(function(b){return _.cloneElement(b,{key:"error-bar-".concat(o,"-").concat(b.props.dataKey),data:i,xAxis:s,yAxis:l,layout:u,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,o=r.hide,a=r.data,i=r.className,s=r.xAxis,l=r.yAxis,u=r.left,f=r.top,h=r.width,p=r.height,m=r.isAnimationActive,w=r.background,b=r.id;if(o||!a||!a.length)return null;var y=this.state.isAnimationFinished,S=Ut("recharts-bar",i),x=s&&s.allowDataOverflow,E=l&&l.allowDataOverflow,C=x||E,M=jt(b)?this.id:b;return _.createElement(_n,{className:S},x||E?_.createElement("defs",null,_.createElement("clipPath",{id:"clipPath-".concat(M)},_.createElement("rect",{x:x?u:u-h/2,y:E?f:f-p/2,width:x?h:h*2,height:E?p:p*2}))):null,_.createElement(_n,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(M,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,M),(!m||y)&&Vl.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:o.curData}:r.data!==o.curData?{curData:r.data}:null}}])}(D.PureComponent);Nz=Ji;Bl(Ji,"displayName","Bar");Bl(Ji,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!nh.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Bl(Ji,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,a=e.xAxis,i=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,h=e.displayedData,p=e.offset,m=nBe(r,n);if(!m)return null;var w=t.layout,b=n.type.defaultProps,y=b!==void 0?Vn(Vn({},b),n.props):n.props,S=y.dataKey,x=y.children,E=y.minPointSize,C=w==="horizontal"?i:a,M=u?C.scale.domain():null,k=uBe({numericAxis:C}),O=wa(x,cY),F=h.map(function(R,B){var Y,H,Z,W,$,V;u?Y=rBe(u[f+B],M):(Y=Qo(R,S),Array.isArray(Y)||(Y=[k,Y]));var ne=TUe(E,Nz.defaultProps.minPointSize)(Y[1],B);if(w==="horizontal"){var Q,te=[i.scale(Y[0]),i.scale(Y[1])],G=te[0],X=te[1];H=MR({axis:a,ticks:s,bandSize:o,offset:m.offset,entry:R,index:B}),Z=(Q=X??G)!==null&&Q!==void 0?Q:void 0,W=m.size;var ee=G-X;if($=Number.isNaN(ee)?0:ee,V={x:H,y:i.y,width:W,height:i.height},Math.abs(ne)>0&&Math.abs($)<Math.abs(ne)){var ie=ti($||ne)*(Math.abs(ne)-Math.abs($));Z-=ie,$+=ie}}else{var fe=[a.scale(Y[0]),a.scale(Y[1])],he=fe[0],we=fe[1];if(H=he,Z=MR({axis:i,ticks:l,bandSize:o,offset:m.offset,entry:R,index:B}),W=we-he,$=m.size,V={x:a.x,y:Z,width:a.width,height:$},Math.abs(ne)>0&&Math.abs(W)<Math.abs(ne)){var Ne=ti(W||ne)*(Math.abs(ne)-Math.abs(W));W+=Ne}}return Vn(Vn(Vn({},R),{},{x:H,y:Z,width:W,height:$,value:u?Y:Y[1],payload:R,background:V},O&&O[B]&&O[B].props),{},{tooltipPayload:[mz(n,R)],tooltipPosition:{x:H+W/2,y:Z+$/2}})});return Vn({data:F,layout:w},p)});function Wm(e){"@babel/helpers - typeof";return Wm=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},Wm(e)}function PUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M5(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,jz(r.key),r)}}function jUe(e,t,n){return t&&M5(e.prototype,t),n&&M5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function D5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D5(Object(n),!0).forEach(function(r){xS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xS(e,t,n){return t=jz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jz(e){var t=LUe(e,"string");return Wm(t)=="symbol"?t:t+""}function LUe(e,t){if(Wm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lz=function(t,n,r,o,a){var i=t.width,s=t.height,l=t.layout,u=t.children,f=Object.keys(n),h={left:r.left,leftMirror:r.left,right:i-r.right,rightMirror:i-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},p=!!Go(u,Ji);return f.reduce(function(m,w){var b=n[w],y=b.orientation,S=b.domain,x=b.padding,E=x===void 0?{}:x,C=b.mirror,M=b.reversed,k="".concat(y).concat(C?"Mirror":""),O,F,R,B,Y;if(b.type==="number"&&(b.padding==="gap"||b.padding==="no-gap")){var H=S[1]-S[0],Z=1/0,W=b.categoricalDomain.sort();if(W.forEach(function(fe,he){he>0&&(Z=Math.min((fe||0)-(W[he-1]||0),Z))}),Number.isFinite(Z)){var $=Z/H,V=b.layout==="vertical"?r.height:r.width;if(b.padding==="gap"&&(O=$*V/2),b.padding==="no-gap"){var ne=hu(t.barCategoryGap,$*V),Q=$*V/2;O=Q-ne-(Q-ne)/V*ne}}}o==="xAxis"?F=[r.left+(E.left||0)+(O||0),r.left+r.width-(E.right||0)-(O||0)]:o==="yAxis"?F=l==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(O||0),r.top+r.height-(E.bottom||0)-(O||0)]:F=b.range,M&&(F=[F[1],F[0]]);var te=eBe(b,a,p),G=te.scale,X=te.realScaleType;G.domain(S).range(F),tBe(G);var ee=cBe(G,Za(Za({},b),{},{realScaleType:X}));o==="xAxis"?(Y=y==="top"&&!C||y==="bottom"&&C,R=r.left,B=h[k]-Y*b.height):o==="yAxis"&&(Y=y==="left"&&!C||y==="right"&&C,R=h[k]-Y*b.width,B=r.top);var ie=Za(Za(Za({},b),ee),{},{realScaleType:X,x:R,y:B,scale:G,width:o==="xAxis"?r.width:b.width,height:o==="yAxis"?r.height:b.height});return ie.bandSize=Tw(ie,ee),!b.hide&&o==="xAxis"?h[k]+=(Y?-1:1)*ie.height:b.hide||(h[k]+=(Y?-1:1)*ie.width),Za(Za({},m),{},xS({},w,ie))},{})},Rz=function(t,n){var r=t.x,o=t.y,a=n.x,i=n.y;return{x:Math.min(r,a),y:Math.min(o,i),width:Math.abs(a-r),height:Math.abs(i-o)}},RUe=function(t){var n=t.x1,r=t.y1,o=t.x2,a=t.y2;return Rz({x:n,y:r},{x:o,y:a})},Fz=function(){function e(t){PUe(this,e),this.scale=t}return jUe(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]:{},o=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+i;case"end":var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s;default:return this.scale(n)}if(o){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(),o=r[0],a=r[r.length-1];return o<=a?n>=o&&n<=a:n>=a&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();xS(Fz,"EPS",1e-4);var aA=function(t){var n=Object.keys(t).reduce(function(r,o){return Za(Za({},r),{},xS({},o,Fz.create(t[o])))},{});return Za(Za({},n),{},{apply:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.bandAware,s=a.position;return F8(o,function(l,u){return n[u].apply(l,{bandAware:i,position:s})})},isInRange:function(o){return Az(o,function(a,i){return n[i].isInRange(a)})}})};function FUe(e){return(e%180+180)%180}var HUe=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=FUe(o),i=a*Math.PI/180,s=Math.atan(r/n),l=i>s&&i<Math.PI-s?r/Math.sin(i):n/Math.cos(i);return Math.abs(l)},BUe=el,_Ue=Rf,YUe=Uf;function zUe(e){return function(t,n,r){var o=Object(t);if(!_Ue(t)){var a=BUe(n);t=YUe(t),n=function(s){return a(o[s],s,o)}}var i=e(t,n,r);return i>-1?o[a?t[i]:i]:void 0}}var UUe=zUe,VUe=UUe,WUe=g8,GUe=VUe(WUe),ZUe=GUe;const qUe=Xe(ZUe);var $Ue=gle(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("")}),iA=D.createContext(void 0),sA=D.createContext(void 0),Hz=D.createContext(void 0),Bz=D.createContext({}),_z=D.createContext(void 0),Yz=D.createContext(0),zz=D.createContext(0),A5=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,a=n.offset,i=t.clipPathId,s=t.children,l=t.width,u=t.height,f=$Ue(a);return _.createElement(iA.Provider,{value:r},_.createElement(sA.Provider,{value:o},_.createElement(Bz.Provider,{value:a},_.createElement(Hz.Provider,{value:f},_.createElement(_z.Provider,{value:i},_.createElement(Yz.Provider,{value:u},_.createElement(zz.Provider,{value:l},s)))))))},KUe=function(){return D.useContext(_z)},Uz=function(t){var n=D.useContext(iA);n==null&&mu();var r=n[t];return r==null&&mu(),r},JUe=function(){var t=D.useContext(iA);return Ll(t)},XUe=function(){var t=D.useContext(sA),n=qUe(t,function(r){return Az(r.domain,Number.isFinite)});return n||Ll(t)},Vz=function(t){var n=D.useContext(sA);n==null&&mu();var r=n[t];return r==null&&mu(),r},QUe=function(){var t=D.useContext(Hz);return t},eVe=function(){return D.useContext(Bz)},lA=function(){return D.useContext(zz)},cA=function(){return D.useContext(Yz)};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 tVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nVe(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,Gz(r.key),r)}}function rVe(e,t,n){return t&&nVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oVe(e,t,n){return t=Lw(t),aVe(e,Wz()?Reflect.construct(t,n||[],Lw(e).constructor):t.apply(e,n))}function aVe(e,t){if(t&&(pf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iVe(e)}function iVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wz=function(){return!!e})()}function Lw(e){return Lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lw(e)}function sVe(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&&DE(e,t)}function DE(e,t){return DE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},DE(e,t)}function N5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function O5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N5(Object(n),!0).forEach(function(r){uA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uA(e,t,n){return t=Gz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gz(e){var t=lVe(e,"string");return pf(t)=="symbol"?t:t+""}function lVe(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 String(e)}function cVe(e,t){return hVe(e)||fVe(e,t)||dVe(e,t)||uVe()}function uVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dVe(e,t){if(e){if(typeof e=="string")return P5(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 P5(e,t)}}function P5(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 fVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function hVe(e){if(Array.isArray(e))return e}function AE(){return AE=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},AE.apply(this,arguments)}var pVe=function(t,n){var r;return _.isValidElement(t)?r=_.cloneElement(t,n):Mt(t)?r=t(n):r=_.createElement("line",AE({},n,{className:"recharts-reference-line-line"})),r},mVe=function(t,n,r,o,a,i,s,l,u){var f=a.x,h=a.y,p=a.width,m=a.height;if(r){var w=u.y,b=t.y.apply(w,{position:i});if(Ki(u,"discard")&&!t.y.isInRange(b))return null;var y=[{x:f+p,y:b},{x:f,y:b}];return l==="left"?y.reverse():y}if(n){var S=u.x,x=t.x.apply(S,{position:i});if(Ki(u,"discard")&&!t.x.isInRange(x))return null;var E=[{x,y:h+m},{x,y:h}];return s==="top"?E.reverse():E}if(o){var C=u.segment,M=C.map(function(k){return t.apply(k,{position:i})});return Ki(u,"discard")&&nUe(M,function(k){return!t.isInRange(k)})?null:M}return null};function gVe(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,a=e.yAxisId,i=e.shape,s=e.className,l=e.alwaysShow,u=KUe(),f=Uz(o),h=Vz(a),p=QUe();if(!u||!p)return null;Bs(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=aA({x:f.scale,y:h.scale}),w=Qn(t),b=Qn(n),y=r&&r.length===2,S=mVe(m,w,b,y,p,e.position,f.orientation,h.orientation,e);if(!S)return null;var x=cVe(S,2),E=x[0],C=E.x,M=E.y,k=x[1],O=k.x,F=k.y,R=Ki(e,"hidden")?"url(#".concat(u,")"):void 0,B=O5(O5({clipPath:R},Rt(e,!0)),{},{x1:C,y1:M,x2:O,y2:F});return _.createElement(_n,{className:Ut("recharts-reference-line",s)},pVe(i,B),Vr.renderCallByParent(e,RUe({x1:C,y1:M,x2:O,y2:F})))}var dA=function(e){function t(){return tVe(this,t),oVe(this,t,arguments)}return sVe(t,e),rVe(t,[{key:"render",value:function(){return _.createElement(gVe,this.props)}}])}(_.Component);uA(dA,"displayName","ReferenceLine");uA(dA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function NE(){return NE=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},NE.apply(this,arguments)}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)}function j5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function L5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j5(Object(n),!0).forEach(function(r){IS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yVe(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,qz(r.key),r)}}function bVe(e,t,n){return t&&yVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wVe(e,t,n){return t=Rw(t),SVe(e,Zz()?Reflect.construct(t,n||[],Rw(e).constructor):t.apply(e,n))}function SVe(e,t){if(t&&(mf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TVe(e)}function TVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zz=function(){return!!e})()}function Rw(e){return Rw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rw(e)}function xVe(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&&OE(e,t)}function OE(e,t){return OE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},OE(e,t)}function IS(e,t,n){return t=qz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qz(e){var t=IVe(e,"string");return mf(t)=="symbol"?t:t+""}function IVe(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 String(e)}var kVe=function(t){var n=t.x,r=t.y,o=t.xAxis,a=t.yAxis,i=aA({x:o.scale,y:a.scale}),s=i.apply({x:n,y:r},{bandAware:!0});return Ki(t,"discard")&&!i.isInRange(s)?null:s},kS=function(e){function t(){return vVe(this,t),wVe(this,t,arguments)}return xVe(t,e),bVe(t,[{key:"render",value:function(){var r=this.props,o=r.x,a=r.y,i=r.r,s=r.alwaysShow,l=r.clipPathId,u=Qn(o),f=Qn(a);if(Bs(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var h=kVe(this.props);if(!h)return null;var p=h.x,m=h.y,w=this.props,b=w.shape,y=w.className,S=Ki(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=L5(L5({clipPath:S},Rt(this.props,!0)),{},{cx:p,cy:m});return _.createElement(_n,{className:Ut("recharts-reference-dot",y)},t.renderDot(b,x),Vr.renderCallByParent(this.props,{x:p-i,y:m-i,width:2*i,height:2*i}))}}])}(_.Component);IS(kS,"displayName","ReferenceDot");IS(kS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});IS(kS,"renderDot",function(e,t){var n;return _.isValidElement(e)?n=_.cloneElement(e,t):Mt(e)?n=e(t):n=_.createElement(oA,NE({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function PE(){return PE=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},PE.apply(this,arguments)}function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function R5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R5(Object(n),!0).forEach(function(r){ES(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CVe(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,Kz(r.key),r)}}function MVe(e,t,n){return t&&CVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DVe(e,t,n){return t=Fw(t),AVe(e,$z()?Reflect.construct(t,n||[],Fw(e).constructor):t.apply(e,n))}function AVe(e,t){if(t&&(gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NVe(e)}function NVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($z=function(){return!!e})()}function Fw(e){return Fw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fw(e)}function OVe(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&&jE(e,t)}function jE(e,t){return jE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},jE(e,t)}function ES(e,t,n){return t=Kz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kz(e){var t=PVe(e,"string");return gf(t)=="symbol"?t:t+""}function PVe(e,t){if(gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jVe=function(t,n,r,o,a){var i=a.x1,s=a.x2,l=a.y1,u=a.y2,f=a.xAxis,h=a.yAxis;if(!f||!h)return null;var p=aA({x:f.scale,y:h.scale}),m={x:t?p.x.apply(i,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},w={x:n?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:o?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Ki(a,"discard")&&(!p.isInRange(m)||!p.isInRange(w))?null:Rz(m,w)},CS=function(e){function t(){return EVe(this,t),DVe(this,t,arguments)}return OVe(t,e),MVe(t,[{key:"render",value:function(){var r=this.props,o=r.x1,a=r.x2,i=r.y1,s=r.y2,l=r.className,u=r.alwaysShow,f=r.clipPathId;Bs(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Qn(o),p=Qn(a),m=Qn(i),w=Qn(s),b=this.props.shape;if(!h&&!p&&!m&&!w&&!b)return null;var y=jVe(h,p,m,w,this.props);if(!y&&!b)return null;var S=Ki(this.props,"hidden")?"url(#".concat(f,")"):void 0;return _.createElement(_n,{className:Ut("recharts-reference-area",l)},t.renderRect(b,F5(F5({clipPath:S},Rt(this.props,!0)),y)),Vr.renderCallByParent(this.props,y))}}])}(_.Component);ES(CS,"displayName","ReferenceArea");ES(CS,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ES(CS,"renderRect",function(e,t){var n;return _.isValidElement(e)?n=_.cloneElement(e,t):Mt(e)?n=e(t):n=_.createElement(rA,PE({},t,{className:"recharts-reference-area-rect"})),n});function Jz(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function LVe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return HUe(r,n)}function RVe(e,t,n){var r=n==="width",o=e.x,a=e.y,i=e.width,s=e.height;return t===1?{start:r?o:a,end:r?o+i:a+s}:{start:r?o+i:a+s,end:r?o:a}}function Hw(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-o)<=0}function FVe(e,t){return Jz(e,t+1)}function HVe(e,t,n,r,o){for(var a=(r||[]).slice(),i=t.start,s=t.end,l=0,u=1,f=i,h=function(){var w=r?.[l];if(w===void 0)return{v:Jz(r,u)};var b=l,y,S=function(){return y===void 0&&(y=n(w,b)),y},x=w.coordinate,E=l===0||Hw(e,x,S,f,s);E||(l=0,f=i,u+=1),E&&(f=x+e*(S()/2+o),l+=u)},p;u<=a.length;)if(p=h(),p)return p.v;return[]}function Gm(e){"@babel/helpers - typeof";return Gm=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},Gm(e)}function H5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(n),!0).forEach(function(r){BVe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BVe(e,t,n){return t=_Ve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ve(e){var t=YVe(e,"string");return Gm(t)=="symbol"?t:t+""}function YVe(e,t){if(Gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zVe(e,t,n,r,o){for(var a=(r||[]).slice(),i=a.length,s=t.start,l=t.end,u=function(p){var m=a[p],w,b=function(){return w===void 0&&(w=n(m,p)),w};if(p===i-1){var y=e*(m.coordinate+e*b()/2-l);a[p]=m=Ur(Ur({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else a[p]=m=Ur(Ur({},m),{},{tickCoord:m.coordinate});var S=Hw(e,m.tickCoord,b,s,l);S&&(l=m.tickCoord-e*(b()/2+o),a[p]=Ur(Ur({},m),{},{isShow:!0}))},f=i-1;f>=0;f--)u(f);return a}function UVe(e,t,n,r,o,a){var i=(r||[]).slice(),s=i.length,l=t.start,u=t.end;if(a){var f=r[s-1],h=n(f,s-1),p=e*(f.coordinate+e*h/2-u);i[s-1]=f=Ur(Ur({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var m=Hw(e,f.tickCoord,function(){return h},l,u);m&&(u=f.tickCoord-e*(h/2+o),i[s-1]=Ur(Ur({},f),{},{isShow:!0}))}for(var w=a?s-1:s,b=function(x){var E=i[x],C,M=function(){return C===void 0&&(C=n(E,x)),C};if(x===0){var k=e*(E.coordinate-e*M()/2-l);i[x]=E=Ur(Ur({},E),{},{tickCoord:k<0?E.coordinate-k*e:E.coordinate})}else i[x]=E=Ur(Ur({},E),{},{tickCoord:E.coordinate});var O=Hw(e,E.tickCoord,M,l,u);O&&(l=E.tickCoord+e*(M()/2+o),i[x]=Ur(Ur({},E),{},{isShow:!0}))},y=0;y<w;y++)b(y);return i}function fA(e,t,n){var r=e.tick,o=e.ticks,a=e.viewBox,i=e.minTickGap,s=e.orientation,l=e.interval,u=e.tickFormatter,f=e.unit,h=e.angle;if(!o||!o.length||!r)return[];if(Ke(l)||nh.isSsr)return FVe(o,typeof l=="number"&&Ke(l)?l:0);var p=[],m=s==="top"||s==="bottom"?"width":"height",w=f&&m==="width"?jp(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},b=function(E,C){var M=Mt(u)?u(E.value,C):E.value;return m==="width"?LVe(jp(M,{fontSize:t,letterSpacing:n}),w,h):jp(M,{fontSize:t,letterSpacing:n})[m]},y=o.length>=2?ti(o[1].coordinate-o[0].coordinate):1,S=RVe(a,y,m);return l==="equidistantPreserveStart"?HVe(y,S,b,o,i):(l==="preserveStart"||l==="preserveStartEnd"?p=UVe(y,S,b,o,i,l==="preserveStartEnd"):p=zVe(y,S,b,o,i),p.filter(function(x){return x.isShow}))}var VVe=["viewBox"],WVe=["viewBox"],GVe=["ticks"];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 Md(){return Md=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},Md.apply(this,arguments)}function B5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B5(Object(n),!0).forEach(function(r){hA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tI(e,t){if(e==null)return{};var n=ZVe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZVe(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 qVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _5(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,Qz(r.key),r)}}function $Ve(e,t,n){return t&&_5(e.prototype,t),n&&_5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function KVe(e,t,n){return t=Bw(t),JVe(e,Xz()?Reflect.construct(t,n||[],Bw(e).constructor):t.apply(e,n))}function JVe(e,t){if(t&&(vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XVe(e)}function XVe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xz=function(){return!!e})()}function Bw(e){return Bw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bw(e)}function QVe(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&&LE(e,t)}function LE(e,t){return LE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},LE(e,t)}function hA(e,t,n){return t=Qz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qz(e){var t=eWe(e,"string");return vf(t)=="symbol"?t:t+""}function eWe(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 String(e)}var ih=function(e){function t(n){var r;return qVe(this,t),r=KVe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return QVe(t,e),$Ve(t,[{key:"shouldComponentUpdate",value:function(r,o){var a=r.viewBox,i=tI(r,VVe),s=this.props,l=s.viewBox,u=tI(s,WVe);return!Pd(a,l)||!Pd(i,u)||!Pd(o,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var o=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];o&&this.setState({fontSize:window.getComputedStyle(o).fontSize,letterSpacing:window.getComputedStyle(o).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var o=this.props,a=o.x,i=o.y,s=o.width,l=o.height,u=o.orientation,f=o.tickSize,h=o.mirror,p=o.tickMargin,m,w,b,y,S,x,E=h?-1:1,C=r.tickSize||f,M=Ke(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=w=r.coordinate,y=i+ +!h*l,b=y-E*C,x=b-E*p,S=M;break;case"left":b=y=r.coordinate,w=a+ +!h*s,m=w-E*C,S=m-E*p,x=M;break;case"right":b=y=r.coordinate,w=a+ +h*s,m=w+E*C,S=m+E*p,x=M;break;default:m=w=r.coordinate,y=i+ +h*l,b=y+E*C,x=b+E*p,S=M;break}return{line:{x1:m,y1:b,x2:w,y2:y},tick:{x:S,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,o=r.orientation,a=r.mirror,i;switch(o){case"left":i=a?"start":"end";break;case"right":i=a?"end":"start";break;default:i="middle";break}return i}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,o=r.orientation,a=r.mirror,i="end";switch(o){case"left":case"right":i="middle";break;case"top":i=a?"start":"end";break;default:i=a?"end":"start";break}return i}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.x,a=r.y,i=r.width,s=r.height,l=r.orientation,u=r.mirror,f=r.axisLine,h=Qr(Qr(Qr({},Rt(this.props,!1)),Rt(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!u||l==="bottom"&&u);h=Qr(Qr({},h),{},{x1:o,y1:a+p*s,x2:o+i,y2:a+p*s})}else{var m=+(l==="left"&&!u||l==="right"&&u);h=Qr(Qr({},h),{},{x1:o+m*i,y1:a,x2:o+m*i,y2:a+s})}return _.createElement("line",Md({},h,{className:Ut("recharts-cartesian-axis-line",ba(f,"className"))}))}},{key:"renderTicks",value:function(r,o,a){var i=this,s=this.props,l=s.tickLine,u=s.stroke,f=s.tick,h=s.tickFormatter,p=s.unit,m=fA(Qr(Qr({},this.props),{},{ticks:r}),o,a),w=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),y=Rt(this.props,!1),S=Rt(f,!1),x=Qr(Qr({},y),{},{fill:"none"},Rt(l,!1)),E=m.map(function(C,M){var k=i.getTickLineCoord(C),O=k.line,F=k.tick,R=Qr(Qr(Qr(Qr({textAnchor:w,verticalAnchor:b},y),{},{stroke:"none",fill:u},S),F),{},{index:M,payload:C,visibleTicksCount:m.length,tickFormatter:h});return _.createElement(_n,Md({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},Jb(i.props,C,M)),l&&_.createElement("line",Md({},x,O,{className:Ut("recharts-cartesian-axis-tick-line",ba(l,"className"))})),f&&t.renderTickItem(f,R,"".concat(Mt(h)?h(C.value,M):C.value).concat(p||"")))});return _.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,o=this.props,a=o.axisLine,i=o.width,s=o.height,l=o.ticksGenerator,u=o.className,f=o.hide;if(f)return null;var h=this.props,p=h.ticks,m=tI(h,GVe),w=p;return Mt(l)&&(w=p&&p.length>0?l(this.props):l(m)),i<=0||s<=0||!w||!w.length?null:_.createElement(_n,{className:Ut("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Vr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,a){var i;return _.isValidElement(r)?i=_.cloneElement(r,o):Mt(r)?i=r(o):i=_.createElement(lw,Md({},o,{className:"recharts-cartesian-axis-tick-value"}),a),i}}])}(D.Component);hA(ih,"displayName","CartesianAxis");hA(ih,"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 tWe=["x1","y1","x2","y2","key"],nWe=["offset"];function gu(e){"@babel/helpers - typeof";return gu=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},gu(e)}function Y5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y5(Object(n),!0).forEach(function(r){rWe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rWe(e,t,n){return t=oWe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oWe(e){var t=aWe(e,"string");return gu(t)=="symbol"?t:t+""}function aWe(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zc(){return Zc=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},Zc.apply(this,arguments)}function z5(e,t){if(e==null)return{};var n=iWe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iWe(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 sWe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,a=t.y,i=t.width,s=t.height,l=t.ry;return _.createElement("rect",{x:o,y:a,ry:l,width:i,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function eU(e,t){var n;if(_.isValidElement(e))n=_.cloneElement(e,t);else if(Mt(e))n=e(t);else{var r=t.x1,o=t.y1,a=t.x2,i=t.y2,s=t.key,l=z5(t,tWe),u=Rt(l,!1);u.offset;var f=z5(u,nWe);n=_.createElement("line",Zc({},f,{x1:r,y1:o,x2:a,y2:i,fill:"none",key:s}))}return n}function lWe(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,a=e.horizontalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(s,l){var u=Wr(Wr({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return eU(o,u)});return _.createElement("g",{className:"recharts-cartesian-grid-horizontal"},i)}function cWe(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,a=e.verticalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(s,l){var u=Wr(Wr({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return eU(o,u)});return _.createElement("g",{className:"recharts-cartesian-grid-vertical"},i)}function uWe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,a=e.width,i=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==f[0]&&f.unshift(0);var h=f.map(function(p,m){var w=!f[m+1],b=w?o+i-p:f[m+1]-p;if(b<=0)return null;var y=m%t.length;return _.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:b,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function dWe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,a=e.x,i=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+a-a)}).sort(function(p,m){return p-m});a!==f[0]&&f.unshift(0);var h=f.map(function(p,m){var w=!f[m+1],b=w?a+s-p:f[m+1]-p;if(b<=0)return null;var y=m%r.length;return _.createElement("rect",{key:"react-".concat(m),x:p,y:i,width:b,height:l,stroke:"none",fill:r[y],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return _.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var fWe=function(t,n){var r=t.xAxis,o=t.width,a=t.height,i=t.offset;return hz(fA(Wr(Wr(Wr({},ih.defaultProps),r),{},{ticks:Ns(r,!0),viewBox:{x:0,y:0,width:o,height:a}})),i.left,i.left+i.width,n)},hWe=function(t,n){var r=t.yAxis,o=t.width,a=t.height,i=t.offset;return hz(fA(Wr(Wr(Wr({},ih.defaultProps),r),{},{ticks:Ns(r,!0),viewBox:{x:0,y:0,width:o,height:a}})),i.top,i.top+i.height,n)},yd={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Dd(e){var t,n,r,o,a,i,s=lA(),l=cA(),u=eVe(),f=Wr(Wr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:yd.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:yd.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:yd.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:yd.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:yd.vertical,verticalFill:(i=e.verticalFill)!==null&&i!==void 0?i:yd.verticalFill,x:Ke(e.x)?e.x:u.left,y:Ke(e.y)?e.y:u.top,width:Ke(e.width)?e.width:u.width,height:Ke(e.height)?e.height:u.height}),h=f.x,p=f.y,m=f.width,w=f.height,b=f.syncWithTicks,y=f.horizontalValues,S=f.verticalValues,x=JUe(),E=XUe();if(!Ke(m)||m<=0||!Ke(w)||w<=0||!Ke(h)||h!==+h||!Ke(p)||p!==+p)return null;var C=f.verticalCoordinatesGenerator||fWe,M=f.horizontalCoordinatesGenerator||hWe,k=f.horizontalPoints,O=f.verticalPoints;if((!k||!k.length)&&Mt(M)){var F=y&&y.length,R=M({yAxis:E?Wr(Wr({},E),{},{ticks:F?y:E.ticks}):void 0,width:s,height:l,offset:u},F?!0:b);Bs(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(gu(R),"]")),Array.isArray(R)&&(k=R)}if((!O||!O.length)&&Mt(C)){var B=S&&S.length,Y=C({xAxis:x?Wr(Wr({},x),{},{ticks:B?S:x.ticks}):void 0,width:s,height:l,offset:u},B?!0:b);Bs(Array.isArray(Y),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(gu(Y),"]")),Array.isArray(Y)&&(O=Y)}return _.createElement("g",{className:"recharts-cartesian-grid"},_.createElement(sWe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),_.createElement(lWe,Zc({},f,{offset:u,horizontalPoints:k,xAxis:x,yAxis:E})),_.createElement(cWe,Zc({},f,{offset:u,verticalPoints:O,xAxis:x,yAxis:E})),_.createElement(uWe,Zc({},f,{horizontalPoints:k})),_.createElement(dWe,Zc({},f,{verticalPoints:O})))}Dd.displayName="CartesianGrid";var pWe=["type","layout","connectNulls","ref"],mWe=["key"];function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}function U5(e,t){if(e==null)return{};var n=gWe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gWe(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 Hp(){return Hp=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},Hp.apply(this,arguments)}function V5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5(Object(n),!0).forEach(function(r){qa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bd(e){return wWe(e)||bWe(e)||yWe(e)||vWe()}function vWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yWe(e,t){if(e){if(typeof e=="string")return RE(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 RE(e,t)}}function bWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wWe(e){if(Array.isArray(e))return RE(e)}function RE(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 SWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W5(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,nU(r.key),r)}}function TWe(e,t,n){return t&&W5(e.prototype,t),n&&W5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xWe(e,t,n){return t=_w(t),IWe(e,tU()?Reflect.construct(t,n||[],_w(e).constructor):t.apply(e,n))}function IWe(e,t){if(t&&(yf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kWe(e)}function kWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tU=function(){return!!e})()}function _w(e){return _w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_w(e)}function EWe(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&&FE(e,t)}function FE(e,t){return FE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},FE(e,t)}function qa(e,t,n){return t=nU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nU(e){var t=CWe(e,"string");return yf(t)=="symbol"?t:t+""}function CWe(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Zg=function(e){function t(){var n;SWe(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return n=xWe(this,t,[].concat(o)),qa(n,"state",{isAnimationFinished:!0,totalLength:0}),qa(n,"generateSimpleStrokeDasharray",function(i,s){return"".concat(s,"px ").concat(i-s,"px")}),qa(n,"getStrokeDasharray",function(i,s,l){var u=l.reduce(function(S,x){return S+x});if(!u)return n.generateSimpleStrokeDasharray(s,i);for(var f=Math.floor(i/u),h=i%u,p=s-i,m=[],w=0,b=0;w<l.length;b+=l[w],++w)if(b+l[w]>h){m=[].concat(bd(l.slice(0,w)),[h-b]);break}var y=m.length%2===0?[0,p]:[p];return[].concat(bd(t.repeat(l,f)),bd(m),y).map(function(S){return"".concat(S,"px")}).join(", ")}),qa(n,"id",Yg("recharts-line-")),qa(n,"pathRef",function(i){n.mainCurve=i}),qa(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),qa(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return EWe(t,e),TWe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,s=a.xAxis,l=a.yAxis,u=a.layout,f=a.children,h=wa(f,Gg);if(!h)return null;var p=function(b,y){return{x:b.x,y:b.y,value:b.value,errorVal:Qo(b.payload,y)}},m={clipPath:r?"url(#clipPath-".concat(o,")"):null};return _.createElement(_n,m,h.map(function(w){return _.cloneElement(w,{key:"bar-".concat(w.props.dataKey),data:i,xAxis:s,yAxis:l,layout:u,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,o,a){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,h=Rt(this.props,!1),p=Rt(l,!0),m=u.map(function(b,y){var S=Yo(Yo(Yo({key:"dot-".concat(y),r:3},h),p),{},{value:b.value,dataKey:f,cx:b.x,cy:b.y,index:y,payload:b.payload});return t.renderDotItem(l,S)}),w={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(a,")"):null};return _.createElement(_n,Hp({className:"recharts-line-dots",key:"dots"},w),m)}},{key:"renderCurveStatically",value:function(r,o,a,i){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var h=U5(s,pWe),p=Yo(Yo(Yo({},Rt(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(a,")"):null,points:r},i),{},{type:l,layout:u,connectNulls:f});return _.createElement(pE,Hp({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var a=this,i=this.props,s=i.points,l=i.strokeDasharray,u=i.isAnimationActive,f=i.animationBegin,h=i.animationDuration,p=i.animationEasing,m=i.animationId,w=i.animateNewValues,b=i.width,y=i.height,S=this.state,x=S.prevPoints,E=S.totalLength;return _.createElement($s,{begin:f,duration:h,isActive:u,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var M=C.t;if(x){var k=x.length/s.length,O=s.map(function(H,Z){var W=Math.floor(Z*k);if(x[W]){var $=x[W],V=Ja($.x,H.x),ne=Ja($.y,H.y);return Yo(Yo({},H),{},{x:V(M),y:ne(M)})}if(w){var Q=Ja(b*2,H.x),te=Ja(y/2,H.y);return Yo(Yo({},H),{},{x:Q(M),y:te(M)})}return Yo(Yo({},H),{},{x:H.x,y:H.y})});return a.renderCurveStatically(O,r,o)}var F=Ja(0,E),R=F(M),B;if(l){var Y="".concat(l).split(/[,\s]+/gim).map(function(H){return parseFloat(H)});B=a.getStrokeDasharray(R,E,Y)}else B=a.generateSimpleStrokeDasharray(E,R);return a.renderCurveStatically(s,r,o,{strokeDasharray:B})})}},{key:"renderCurve",value:function(r,o){var a=this.props,i=a.points,s=a.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&i&&i.length&&(!u&&f>0||!vg(u,i))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(i,r,o)}},{key:"render",value:function(){var r,o=this.props,a=o.hide,i=o.dot,s=o.points,l=o.className,u=o.xAxis,f=o.yAxis,h=o.top,p=o.left,m=o.width,w=o.height,b=o.isAnimationActive,y=o.id;if(a||!s||!s.length)return null;var S=this.state.isAnimationFinished,x=s.length===1,E=Ut("recharts-line",l),C=u&&u.allowDataOverflow,M=f&&f.allowDataOverflow,k=C||M,O=jt(y)?this.id:y,F=(r=Rt(i,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},R=F.r,B=R===void 0?3:R,Y=F.strokeWidth,H=Y===void 0?2:Y,Z=ILe(i)?i:{},W=Z.clipDot,$=W===void 0?!0:W,V=B*2+H;return _.createElement(_n,{className:E},C||M?_.createElement("defs",null,_.createElement("clipPath",{id:"clipPath-".concat(O)},_.createElement("rect",{x:C?p:p-m/2,y:M?h:h-w/2,width:C?m:m*2,height:M?w:w*2})),!$&&_.createElement("clipPath",{id:"clipPath-dots-".concat(O)},_.createElement("rect",{x:p-V/2,y:h-V/2,width:m+V,height:w+V}))):null,!x&&this.renderCurve(k,O),this.renderErrorBar(k,O),(x||i)&&this.renderDots(k,$,O),(!b||S)&&Vl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var a=r.length%2!==0?[].concat(bd(r),[0]):r,i=[],s=0;s<o;++s)i=[].concat(bd(i),bd(a));return i}},{key:"renderDotItem",value:function(r,o){var a;if(_.isValidElement(r))a=_.cloneElement(r,o);else if(Mt(r))a=r(o);else{var i=o.key,s=U5(o,mWe),l=Ut("recharts-line-dot",typeof r!="boolean"?r.className:"");a=_.createElement(oA,Hp({key:i},s,{className:l}))}return a}}])}(D.PureComponent);qa(Zg,"displayName","Line");qa(Zg,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!nh.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});qa(Zg,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,i=e.dataKey,s=e.bandSize,l=e.displayedData,u=e.offset,f=t.layout,h=l.map(function(p,m){var w=Qo(p,i);return f==="horizontal"?{x:CR({axis:n,ticks:o,bandSize:s,entry:p,index:m}),y:jt(w)?null:r.scale(w),value:w,payload:p}:{x:jt(w)?null:n.scale(w),y:CR({axis:r,ticks:a,bandSize:s,entry:p,index:m}),value:w,payload:p}});return Yo({points:h,layout:f},u)});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 MWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DWe(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,aU(r.key),r)}}function AWe(e,t,n){return t&&DWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NWe(e,t,n){return t=Yw(t),OWe(e,rU()?Reflect.construct(t,n||[],Yw(e).constructor):t.apply(e,n))}function OWe(e,t){if(t&&(bf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PWe(e)}function PWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rU=function(){return!!e})()}function Yw(e){return Yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yw(e)}function jWe(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&&HE(e,t)}function HE(e,t){return HE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},HE(e,t)}function oU(e,t,n){return t=aU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aU(e){var t=LWe(e,"string");return bf(t)=="symbol"?t:t+""}function LWe(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 String(e)}function BE(){return BE=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},BE.apply(this,arguments)}function RWe(e){var t=e.xAxisId,n=lA(),r=cA(),o=Uz(t);return o==null?null:_.createElement(ih,BE({},o,{className:Ut("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(i){return Ns(i,!0)}}))}var Os=function(e){function t(){return MWe(this,t),NWe(this,t,arguments)}return jWe(t,e),AWe(t,[{key:"render",value:function(){return _.createElement(RWe,this.props)}}])}(_.Component);oU(Os,"displayName","XAxis");oU(Os,"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 wf(e){"@babel/helpers - typeof";return wf=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},wf(e)}function FWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HWe(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,lU(r.key),r)}}function BWe(e,t,n){return t&&HWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _We(e,t,n){return t=zw(t),YWe(e,iU()?Reflect.construct(t,n||[],zw(e).constructor):t.apply(e,n))}function YWe(e,t){if(t&&(wf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zWe(e)}function zWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iU=function(){return!!e})()}function zw(e){return zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zw(e)}function UWe(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&&_E(e,t)}function _E(e,t){return _E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},_E(e,t)}function sU(e,t,n){return t=lU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lU(e){var t=VWe(e,"string");return wf(t)=="symbol"?t:t+""}function VWe(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function YE(){return YE=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},YE.apply(this,arguments)}var WWe=function(t){var n=t.yAxisId,r=lA(),o=cA(),a=Vz(n);return a==null?null:_.createElement(ih,YE({},a,{className:Ut("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:o},ticksGenerator:function(s){return Ns(s,!0)}}))},Ps=function(e){function t(){return FWe(this,t),_We(this,t,arguments)}return UWe(t,e),BWe(t,[{key:"render",value:function(){return _.createElement(WWe,this.props)}}])}(_.Component);sU(Ps,"displayName","YAxis");sU(Ps,"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 G5(e){return $We(e)||qWe(e)||ZWe(e)||GWe()}function GWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZWe(e,t){if(e){if(typeof e=="string")return zE(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 zE(e,t)}}function qWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $We(e){if(Array.isArray(e))return zE(e)}function zE(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 UE=function(t,n,r,o,a){var i=wa(t,dA),s=wa(t,kS),l=[].concat(G5(i),G5(s)),u=wa(t,CS),f="".concat(o,"Id"),h=o[0],p=n;if(l.length&&(p=l.reduce(function(b,y){if(y.props[f]===r&&Ki(y.props,"extendDomain")&&Ke(y.props[h])){var S=y.props[h];return[Math.min(b[0],S),Math.max(b[1],S)]}return b},p)),u.length){var m="".concat(h,"1"),w="".concat(h,"2");p=u.reduce(function(b,y){if(y.props[f]===r&&Ki(y.props,"extendDomain")&&Ke(y.props[m])&&Ke(y.props[w])){var S=y.props[m],x=y.props[w];return[Math.min(b[0],S,x),Math.max(b[1],S,x)]}return b},p)}return a&&a.length&&(p=a.reduce(function(b,y){return Ke(y)?[Math.min(b[0],y),Math.max(b[1],y)]:b},p)),p},cU={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(l,u,f){this.fn=l,this.context=u,this.once=f||!1}function a(l,u,f,h,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new o(f,h||l,p),w=n?n+u:u;return l._events[w]?l._events[w].fn?l._events[w]=[l._events[w],m]:l._events[w].push(m):(l._events[w]=m,l._eventsCount++),l}function i(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,h;if(this._eventsCount===0)return u;for(h in f=this._events)t.call(f,h)&&u.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=n?n+u:u,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,m=h.length,w=new Array(m);p<m;p++)w[p]=h[p].fn;return w},s.prototype.listenerCount=function(u){var f=n?n+u:u,h=this._events[f];return h?h.fn?1:h.length:0},s.prototype.emit=function(u,f,h,p,m,w){var b=n?n+u:u;if(!this._events[b])return!1;var y=this._events[b],S=arguments.length,x,E;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),S){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,h),!0;case 4:return y.fn.call(y.context,f,h,p),!0;case 5:return y.fn.call(y.context,f,h,p,m),!0;case 6:return y.fn.call(y.context,f,h,p,m,w),!0}for(E=1,x=new Array(S-1);E<S;E++)x[E-1]=arguments[E];y.fn.apply(y.context,x)}else{var C=y.length,M;for(E=0;E<C;E++)switch(y[E].once&&this.removeListener(u,y[E].fn,void 0,!0),S){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,f);break;case 3:y[E].fn.call(y[E].context,f,h);break;case 4:y[E].fn.call(y[E].context,f,h,p);break;default:if(!x)for(M=1,x=new Array(S-1);M<S;M++)x[M-1]=arguments[M];y[E].fn.apply(y[E].context,x)}}return!0},s.prototype.on=function(u,f,h){return a(this,u,f,h,!1)},s.prototype.once=function(u,f,h){return a(this,u,f,h,!0)},s.prototype.removeListener=function(u,f,h,p){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return i(this,m),this;var w=this._events[m];if(w.fn)w.fn===f&&(!p||w.once)&&(!h||w.context===h)&&i(this,m);else{for(var b=0,y=[],S=w.length;b<S;b++)(w[b].fn!==f||p&&!w[b].once||h&&w[b].context!==h)&&y.push(w[b]);y.length?this._events[m]=y.length===1?y[0]:y:i(this,m)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&i(this,f)):(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})(cU);var KWe=cU.exports;const JWe=Xe(KWe);var nI=new JWe,rI="recharts.syncMouseEvents";function Zm(e){"@babel/helpers - typeof";return Zm=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},Zm(e)}function XWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QWe(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,uU(r.key),r)}}function eGe(e,t,n){return t&&QWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oI(e,t,n){return t=uU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(e){var t=tGe(e,"string");return Zm(t)=="symbol"?t:t+""}function tGe(e,t){if(Zm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nGe=function(){function e(){XWe(this,e),oI(this,"activeIndex",0),oI(this,"coordinateList",[]),oI(this,"layout","horizontal")}return eGe(e,[{key:"setDetails",value:function(n){var r,o=n.coordinateList,a=o===void 0?null:o,i=n.container,s=i===void 0?null:i,l=n.layout,u=l===void 0?null:l,f=n.offset,h=f===void 0?null:f,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=h??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 o=this.container.getBoundingClientRect(),a=o.x,i=o.y,s=o.height,l=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=a+l+u,p=i+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:h,pageY:p})}}}])}();function rGe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],o=e?.[1];if(r&&o&&Ke(r)&&Ke(o))return!0}return!1}function oGe(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function dU(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,a=e.endAngle,i=kr(t,n,r,o),s=kr(t,n,r,a);return{points:[i,s],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function aGe(e,t,n){var r,o,a,i;if(e==="horizontal")r=t.x,a=r,o=n.top,i=n.top+n.height;else if(e==="vertical")o=t.y,i=o,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,u=t.innerRadius,f=t.outerRadius,h=t.angle,p=kr(s,l,u,h),m=kr(s,l,f,h);r=p.x,o=p.y,a=m.x,i=m.y}else return dU(t);return[{x:r,y:o},{x:a,y:i}]}function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}function Z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z5(Object(n),!0).forEach(function(r){iGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iGe(e,t,n){return t=sGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sGe(e){var t=lGe(e,"string");return qm(t)=="symbol"?t:t+""}function lGe(e,t){if(qm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cGe(e){var t,n,r=e.element,o=e.tooltipEventType,a=e.isActive,i=e.activeCoordinate,s=e.activePayload,l=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,h=e.layout,p=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||!i||p!=="ScatterChart"&&o!=="axis")return null;var w,b=pE;if(p==="ScatterChart")w=i,b=eze;else if(p==="BarChart")w=oGe(h,i,l,f),b=rA;else if(h==="radial"){var y=dU(i),S=y.cx,x=y.cy,E=y.radius,C=y.startAngle,M=y.endAngle;w={cx:S,cy:x,startAngle:C,endAngle:M,innerRadius:E,outerRadius:E},b=yz}else w={points:aGe(h,i,l)},b=pE;var k=Oy(Oy(Oy(Oy({stroke:"#ccc",pointerEvents:"none"},l),w),Rt(m,!1)),{},{payload:s,payloadIndex:u,className:Ut("recharts-tooltip-cursor",m.className)});return D.isValidElement(m)?D.cloneElement(m,k):D.createElement(b,k)}var uGe=["item"],dGe=["children","className","width","height","style","compact","title","desc"];function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}function Ad(){return Ad=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},Ad.apply(this,arguments)}function q5(e,t){return pGe(e)||hGe(e,t)||hU(e,t)||fGe()}function fGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hGe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,u=!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(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return s}}function pGe(e){if(Array.isArray(e))return e}function $5(e,t){if(e==null)return{};var n=mGe(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mGe(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 gGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vGe(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,pU(r.key),r)}}function yGe(e,t,n){return t&&vGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bGe(e,t,n){return t=Uw(t),wGe(e,fU()?Reflect.construct(t,n||[],Uw(e).constructor):t.apply(e,n))}function wGe(e,t){if(t&&(Sf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SGe(e)}function SGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fU=function(){return!!e})()}function Uw(e){return Uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uw(e)}function TGe(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&&VE(e,t)}function VE(e,t){return VE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},VE(e,t)}function Tf(e){return kGe(e)||IGe(e)||hU(e)||xGe()}function xGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hU(e,t){if(e){if(typeof e=="string")return WE(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 WE(e,t)}}function IGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kGe(e){if(Array.isArray(e))return WE(e)}function WE(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 K5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K5(Object(n),!0).forEach(function(r){pt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pt(e,t,n){return t=pU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pU(e){var t=EGe(e,"string");return Sf(t)=="symbol"?t:t+""}function EGe(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CGe={xAxis:["bottom","top"],yAxis:["left","right"]},MGe={width:"100%",height:"100%"},mU={x:0,y:0};function Py(e){return e}var DGe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},AGe=function(t,n,r,o){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:a.coordinate};if(t==="centric"){var i=a.coordinate,s=o.radius;return Ee(Ee(Ee({},o),kr(o.cx,o.cy,s,i)),{},{angle:i,radius:s})}var l=a.coordinate,u=o.angle;return Ee(Ee(Ee({},o),kr(o.cx,o.cy,l,u)),{},{angle:u,radius:l})}return mU},MS=function(t,n){var r=n.graphicalItems,o=n.dataStartIndex,a=n.dataEndIndex,i=(r??[]).reduce(function(s,l){var u=l.props.data;return u&&u.length?[].concat(Tf(s),Tf(u)):s},[]);return i.length>0?i:t&&t.length&&Ke(o)&&Ke(a)?t.slice(o,a+1):[]};function gU(e){return e==="number"?[0,"auto"]:void 0}var GE=function(t,n,r,o){var a=t.graphicalItems,i=t.tooltipAxis,s=MS(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,u){var f,h=(f=u.props.data)!==null&&f!==void 0?f:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(i.dataKey&&!i.allowDuplicatedCategory){var m=h===void 0?s:h;p=$b(m,i.dataKey,o)}else p=h&&h[r]||s[r];return p?[].concat(Tf(l),[mz(u,p)]):l},[])},J5=function(t,n,r,o){var a=o||{x:t.chartX,y:t.chartY},i=DGe(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=q7e(i,s,u,l);if(f>=0&&u){var h=u[f]&&u[f].value,p=GE(t,n,f,h),m=AGe(r,s,f,a);return{activeTooltipIndex:f,activeLabel:h,activePayload:p,activeCoordinate:m}}return null},NGe=function(t,n){var r=n.axes,o=n.graphicalItems,a=n.axisType,i=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,h=t.children,p=t.stackOffset,m=fz(f,a);return r.reduce(function(w,b){var y,S=b.type.defaultProps!==void 0?Ee(Ee({},b.type.defaultProps),b.props):b.props,x=S.type,E=S.dataKey,C=S.allowDataOverflow,M=S.allowDuplicatedCategory,k=S.scale,O=S.ticks,F=S.includeHidden,R=S[i];if(w[R])return w;var B=MS(t.data,{graphicalItems:o.filter(function(ee){var ie,fe=i in ee.props?ee.props[i]:(ie=ee.type.defaultProps)===null||ie===void 0?void 0:ie[i];return fe===R}),dataStartIndex:l,dataEndIndex:u}),Y=B.length,H,Z,W;rGe(S.domain,C,x)&&(H=cE(S.domain,null,C),m&&(x==="number"||k!=="auto")&&(W=Rp(B,E,"category")));var $=gU(x);if(!H||H.length===0){var V,ne=(V=S.domain)!==null&&V!==void 0?V:$;if(E){if(H=Rp(B,E,x),x==="category"&&m){var Q=mLe(H);M&&Q?(Z=H,H=im(0,Y)):M||(H=NR(ne,H,b).reduce(function(ee,ie){return ee.indexOf(ie)>=0?ee:[].concat(Tf(ee),[ie])},[]))}else if(x==="category")M?H=H.filter(function(ee){return ee!==""&&!jt(ee)}):H=NR(ne,H,b).reduce(function(ee,ie){return ee.indexOf(ie)>=0||ie===""||jt(ie)?ee:[].concat(Tf(ee),[ie])},[]);else if(x==="number"){var te=Q7e(B,o.filter(function(ee){var ie,fe,he=i in ee.props?ee.props[i]:(ie=ee.type.defaultProps)===null||ie===void 0?void 0:ie[i],we="hide"in ee.props?ee.props.hide:(fe=ee.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return he===R&&(F||!we)}),E,a,f);te&&(H=te)}m&&(x==="number"||k!=="auto")&&(W=Rp(B,E,"category"))}else m?H=im(0,Y):s&&s[R]&&s[R].hasStack&&x==="number"?H=p==="expand"?[0,1]:pz(s[R].stackGroups,l,u):H=dz(B,o.filter(function(ee){var ie=i in ee.props?ee.props[i]:ee.type.defaultProps[i],fe="hide"in ee.props?ee.props.hide:ee.type.defaultProps.hide;return ie===R&&(F||!fe)}),x,f,!0);if(x==="number")H=UE(h,H,R,a,O),ne&&(H=cE(ne,H,C));else if(x==="category"&&ne){var G=ne,X=H.every(function(ee){return G.indexOf(ee)>=0});X&&(H=G)}}return Ee(Ee({},w),{},pt({},R,Ee(Ee({},S),{},{axisType:a,domain:H,categoricalDomain:W,duplicateDomain:Z,originalDomain:(y=S.domain)!==null&&y!==void 0?y:$,isCategorical:m,layout:f})))},{})},OGe=function(t,n){var r=n.graphicalItems,o=n.Axis,a=n.axisType,i=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,h=t.children,p=MS(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=p.length,w=fz(f,a),b=-1;return r.reduce(function(y,S){var x=S.type.defaultProps!==void 0?Ee(Ee({},S.type.defaultProps),S.props):S.props,E=x[i],C=gU("number");if(!y[E]){b++;var M;return w?M=im(0,m):s&&s[E]&&s[E].hasStack?(M=pz(s[E].stackGroups,l,u),M=UE(h,M,E,a)):(M=cE(C,dz(p,r.filter(function(k){var O,F,R=i in k.props?k.props[i]:(O=k.type.defaultProps)===null||O===void 0?void 0:O[i],B="hide"in k.props?k.props.hide:(F=k.type.defaultProps)===null||F===void 0?void 0:F.hide;return R===E&&!B}),"number",f),o.defaultProps.allowDataOverflow),M=UE(h,M,E,a)),Ee(Ee({},y),{},pt({},E,Ee(Ee({axisType:a},o.defaultProps),{},{hide:!0,orientation:ba(CGe,"".concat(a,".").concat(b%2),null),domain:M,originalDomain:C,isCategorical:w,layout:f})))}return y},{})},PGe=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,a=n.AxisComp,i=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,h="".concat(o,"Id"),p=wa(f,a),m={};return p&&p.length?m=NGe(t,{axes:p,graphicalItems:i,axisType:o,axisIdKey:h,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):i&&i.length&&(m=OGe(t,{Axis:a,graphicalItems:i,axisType:o,axisIdKey:h,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},jGe=function(t){var n=Ll(t),r=Ns(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:T0(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Tw(n,r)}},X5=function(t){var n=t.children,r=t.defaultShowTooltip,o=Go(n,ff),a=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(a=o.props.startIndex),o.props.endIndex>=0&&(i=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!r}},LGe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Hs(n&&n.type);return r&&r.indexOf("Bar")>=0})},Q5=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"}},RGe=function(t,n){var r=t.props,o=t.graphicalItems,a=t.xAxisMap,i=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,h=r.children,p=r.margin||{},m=Go(h,ff),w=Go(h,jd),b=Object.keys(l).reduce(function(M,k){var O=l[k],F=O.orientation;return!O.mirror&&!O.hide?Ee(Ee({},M),{},pt({},F,M[F]+O.width)):M},{left:p.left||0,right:p.right||0}),y=Object.keys(i).reduce(function(M,k){var O=i[k],F=O.orientation;return!O.mirror&&!O.hide?Ee(Ee({},M),{},pt({},F,ba(M,"".concat(F))+O.height)):M},{top:p.top||0,bottom:p.bottom||0}),S=Ee(Ee({},y),b),x=S.bottom;m&&(S.bottom+=m.props.height||ff.defaultProps.height),w&&n&&(S=J7e(S,o,r,n));var E=u-S.left-S.right,C=f-S.top-S.bottom;return Ee(Ee({brushBottom:x},S),{},{width:Math.max(E,0),height:Math.max(C,0)})},FGe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},vU=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,i=t.validateTooltipEventTypes,s=i===void 0?["axis"]:i,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,h=t.defaultProps,p=function(S,x){var E=x.graphicalItems,C=x.stackGroups,M=x.offset,k=x.updateId,O=x.dataStartIndex,F=x.dataEndIndex,R=S.barSize,B=S.layout,Y=S.barGap,H=S.barCategoryGap,Z=S.maxBarSize,W=Q5(B),$=W.numericAxisName,V=W.cateAxisName,ne=LGe(E),Q=[];return E.forEach(function(te,G){var X=MS(S.data,{graphicalItems:[te],dataStartIndex:O,dataEndIndex:F}),ee=te.type.defaultProps!==void 0?Ee(Ee({},te.type.defaultProps),te.props):te.props,ie=ee.dataKey,fe=ee.maxBarSize,he=ee["".concat($,"Id")],we=ee["".concat(V,"Id")],Ne={},Ae=l.reduce(function(wt,Ot){var Wt=x["".concat(Ot.axisType,"Map")],an=ee["".concat(Ot.axisType,"Id")];Wt&&Wt[an]||Ot.axisType==="zAxis"||mu();var mn=Wt[an];return Ee(Ee({},wt),{},pt(pt({},Ot.axisType,mn),"".concat(Ot.axisType,"Ticks"),Ns(mn)))},Ne),Te=Ae[V],Fe=Ae["".concat(V,"Ticks")],We=C&&C[he]&&C[he].hasStack&&dBe(te,C[he].stackGroups),ke=Hs(te.type).indexOf("Bar")>=0,Ie=Tw(Te,Fe),ce=[],Pe=ne&&$7e({barSize:R,stackGroups:C,totalSize:FGe(Ae,V)});if(ke){var Oe,Ve,tt=jt(fe)?Z:fe,ot=(Oe=(Ve=Tw(Te,Fe,!0))!==null&&Ve!==void 0?Ve:tt)!==null&&Oe!==void 0?Oe:0;ce=K7e({barGap:Y,barCategoryGap:H,bandSize:ot!==Ie?ot:Ie,sizeList:Pe[we],maxBarSize:tt}),ot!==Ie&&(ce=ce.map(function(wt){return Ee(Ee({},wt),{},{position:Ee(Ee({},wt.position),{},{offset:wt.position.offset-ot/2})})}))}var st=te&&te.type&&te.type.getComposedData;st&&Q.push({props:Ee(Ee({},st(Ee(Ee({},Ae),{},{displayedData:X,props:S,dataKey:ie,item:te,bandSize:Ie,barPosition:ce,offset:M,stackedData:We,layout:B,dataStartIndex:O,dataEndIndex:F}))),{},pt(pt(pt({key:te.key||"item-".concat(G)},$,Ae[$]),V,Ae[V]),"animationId",k)),childIndex:CLe(te,S.children),item:te})}),Q},m=function(S,x){var E=S.props,C=S.dataStartIndex,M=S.dataEndIndex,k=S.updateId;if(!X4({props:E}))return null;var O=E.children,F=E.layout,R=E.stackOffset,B=E.data,Y=E.reverseStackOrder,H=Q5(F),Z=H.numericAxisName,W=H.cateAxisName,$=wa(O,r),V=lBe(B,$,"".concat(Z,"Id"),"".concat(W,"Id"),R,Y),ne=l.reduce(function(ee,ie){var fe="".concat(ie.axisType,"Map");return Ee(Ee({},ee),{},pt({},fe,PGe(E,Ee(Ee({},ie),{},{graphicalItems:$,stackGroups:ie.axisType===Z&&V,dataStartIndex:C,dataEndIndex:M}))))},{}),Q=RGe(Ee(Ee({},ne),{},{props:E,graphicalItems:$}),x?.legendBBox);Object.keys(ne).forEach(function(ee){ne[ee]=f(E,ne[ee],Q,ee.replace("Map",""),n)});var te=ne["".concat(W,"Map")],G=jGe(te),X=p(E,Ee(Ee({},ne),{},{dataStartIndex:C,dataEndIndex:M,updateId:k,graphicalItems:$,stackGroups:V,offset:Q}));return Ee(Ee({formattedGraphicalItems:X,graphicalItems:$,offset:Q,stackGroups:V},G),ne)},w=function(y){function S(x){var E,C,M;return gGe(this,S),M=bGe(this,S,[x]),pt(M,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pt(M,"accessibilityManager",new nGe),pt(M,"handleLegendBBoxUpdate",function(k){if(k){var O=M.state,F=O.dataStartIndex,R=O.dataEndIndex,B=O.updateId;M.setState(Ee({legendBBox:k},m({props:M.props,dataStartIndex:F,dataEndIndex:R,updateId:B},Ee(Ee({},M.state),{},{legendBBox:k}))))}}),pt(M,"handleReceiveSyncEvent",function(k,O,F){if(M.props.syncId===k){if(F===M.eventEmitterSymbol&&typeof M.props.syncMethod!="function")return;M.applySyncEvent(O)}}),pt(M,"handleBrushChange",function(k){var O=k.startIndex,F=k.endIndex;if(O!==M.state.dataStartIndex||F!==M.state.dataEndIndex){var R=M.state.updateId;M.setState(function(){return Ee({dataStartIndex:O,dataEndIndex:F},m({props:M.props,dataStartIndex:O,dataEndIndex:F,updateId:R},M.state))}),M.triggerSyncEvent({dataStartIndex:O,dataEndIndex:F})}}),pt(M,"handleMouseEnter",function(k){var O=M.getMouseInfo(k);if(O){var F=Ee(Ee({},O),{},{isTooltipActive:!0});M.setState(F),M.triggerSyncEvent(F);var R=M.props.onMouseEnter;Mt(R)&&R(F,k)}}),pt(M,"triggeredAfterMouseMove",function(k){var O=M.getMouseInfo(k),F=O?Ee(Ee({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};M.setState(F),M.triggerSyncEvent(F);var R=M.props.onMouseMove;Mt(R)&&R(F,k)}),pt(M,"handleItemMouseEnter",function(k){M.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),pt(M,"handleItemMouseLeave",function(){M.setState(function(){return{isTooltipActive:!1}})}),pt(M,"handleMouseMove",function(k){k.persist(),M.throttleTriggeredAfterMouseMove(k)}),pt(M,"handleMouseLeave",function(k){M.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};M.setState(O),M.triggerSyncEvent(O);var F=M.props.onMouseLeave;Mt(F)&&F(O,k)}),pt(M,"handleOuterEvent",function(k){var O=ELe(k),F=ba(M.props,"".concat(O));if(O&&Mt(F)){var R,B;/.*touch.*/i.test(O)?B=M.getMouseInfo(k.changedTouches[0]):B=M.getMouseInfo(k),F((R=B)!==null&&R!==void 0?R:{},k)}}),pt(M,"handleClick",function(k){var O=M.getMouseInfo(k);if(O){var F=Ee(Ee({},O),{},{isTooltipActive:!0});M.setState(F),M.triggerSyncEvent(F);var R=M.props.onClick;Mt(R)&&R(F,k)}}),pt(M,"handleMouseDown",function(k){var O=M.props.onMouseDown;if(Mt(O)){var F=M.getMouseInfo(k);O(F,k)}}),pt(M,"handleMouseUp",function(k){var O=M.props.onMouseUp;if(Mt(O)){var F=M.getMouseInfo(k);O(F,k)}}),pt(M,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&M.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),pt(M,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&M.handleMouseDown(k.changedTouches[0])}),pt(M,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&M.handleMouseUp(k.changedTouches[0])}),pt(M,"handleDoubleClick",function(k){var O=M.props.onDoubleClick;if(Mt(O)){var F=M.getMouseInfo(k);O(F,k)}}),pt(M,"handleContextMenu",function(k){var O=M.props.onContextMenu;if(Mt(O)){var F=M.getMouseInfo(k);O(F,k)}}),pt(M,"triggerSyncEvent",function(k){M.props.syncId!==void 0&&nI.emit(rI,M.props.syncId,k,M.eventEmitterSymbol)}),pt(M,"applySyncEvent",function(k){var O=M.props,F=O.layout,R=O.syncMethod,B=M.state.updateId,Y=k.dataStartIndex,H=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)M.setState(Ee({dataStartIndex:Y,dataEndIndex:H},m({props:M.props,dataStartIndex:Y,dataEndIndex:H,updateId:B},M.state)));else if(k.activeTooltipIndex!==void 0){var Z=k.chartX,W=k.chartY,$=k.activeTooltipIndex,V=M.state,ne=V.offset,Q=V.tooltipTicks;if(!ne)return;if(typeof R=="function")$=R(Q,k);else if(R==="value"){$=-1;for(var te=0;te<Q.length;te++)if(Q[te].value===k.activeLabel){$=te;break}}var G=Ee(Ee({},ne),{},{x:ne.left,y:ne.top}),X=Math.min(Z,G.x+G.width),ee=Math.min(W,G.y+G.height),ie=Q[$]&&Q[$].value,fe=GE(M.state,M.props.data,$),he=Q[$]?{x:F==="horizontal"?Q[$].coordinate:X,y:F==="horizontal"?ee:Q[$].coordinate}:mU;M.setState(Ee(Ee({},k),{},{activeLabel:ie,activeCoordinate:he,activePayload:fe,activeTooltipIndex:$}))}else M.setState(k)}),pt(M,"renderCursor",function(k){var O,F=M.state,R=F.isTooltipActive,B=F.activeCoordinate,Y=F.activePayload,H=F.offset,Z=F.activeTooltipIndex,W=F.tooltipAxisBandSize,$=M.getTooltipEventType(),V=(O=k.props.active)!==null&&O!==void 0?O:R,ne=M.props.layout,Q=k.key||"_recharts-cursor";return _.createElement(cGe,{key:Q,activeCoordinate:B,activePayload:Y,activeTooltipIndex:Z,chartName:n,element:k,isActive:V,layout:ne,offset:H,tooltipAxisBandSize:W,tooltipEventType:$})}),pt(M,"renderPolarAxis",function(k,O,F){var R=ba(k,"type.axisType"),B=ba(M.state,"".concat(R,"Map")),Y=k.type.defaultProps,H=Y!==void 0?Ee(Ee({},Y),k.props):k.props,Z=B&&B[H["".concat(R,"Id")]];return D.cloneElement(k,Ee(Ee({},Z),{},{className:Ut(R,Z.className),key:k.key||"".concat(O,"-").concat(F),ticks:Ns(Z,!0)}))}),pt(M,"renderPolarGrid",function(k){var O=k.props,F=O.radialLines,R=O.polarAngles,B=O.polarRadius,Y=M.state,H=Y.radiusAxisMap,Z=Y.angleAxisMap,W=Ll(H),$=Ll(Z),V=$.cx,ne=$.cy,Q=$.innerRadius,te=$.outerRadius;return D.cloneElement(k,{polarAngles:Array.isArray(R)?R:Ns($,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(B)?B:Ns(W,!0).map(function(G){return G.coordinate}),cx:V,cy:ne,innerRadius:Q,outerRadius:te,key:k.key||"polar-grid",radialLines:F})}),pt(M,"renderLegend",function(){var k=M.state.formattedGraphicalItems,O=M.props,F=O.children,R=O.width,B=O.height,Y=M.props.margin||{},H=R-(Y.left||0)-(Y.right||0),Z=cz({children:F,formattedGraphicalItems:k,legendWidth:H,legendContent:u});if(!Z)return null;var W=Z.item,$=$5(Z,uGe);return D.cloneElement(W,Ee(Ee({},$),{},{chartWidth:R,chartHeight:B,margin:Y,onBBoxUpdate:M.handleLegendBBoxUpdate}))}),pt(M,"renderTooltip",function(){var k,O=M.props,F=O.children,R=O.accessibilityLayer,B=Go(F,Fi);if(!B)return null;var Y=M.state,H=Y.isTooltipActive,Z=Y.activeCoordinate,W=Y.activePayload,$=Y.activeLabel,V=Y.offset,ne=(k=B.props.active)!==null&&k!==void 0?k:H;return D.cloneElement(B,{viewBox:Ee(Ee({},V),{},{x:V.left,y:V.top}),active:ne,label:$,payload:ne?W:[],coordinate:Z,accessibilityLayer:R})}),pt(M,"renderBrush",function(k){var O=M.props,F=O.margin,R=O.data,B=M.state,Y=B.offset,H=B.dataStartIndex,Z=B.dataEndIndex,W=B.updateId;return D.cloneElement(k,{key:k.key||"_recharts-brush",onChange:My(M.handleBrushChange,k.props.onChange),data:R,x:Ke(k.props.x)?k.props.x:Y.left,y:Ke(k.props.y)?k.props.y:Y.top+Y.height+Y.brushBottom-(F.bottom||0),width:Ke(k.props.width)?k.props.width:Y.width,startIndex:H,endIndex:Z,updateId:"brush-".concat(W)})}),pt(M,"renderReferenceElement",function(k,O,F){if(!k)return null;var R=M,B=R.clipPathId,Y=M.state,H=Y.xAxisMap,Z=Y.yAxisMap,W=Y.offset,$=k.type.defaultProps||{},V=k.props,ne=V.xAxisId,Q=ne===void 0?$.xAxisId:ne,te=V.yAxisId,G=te===void 0?$.yAxisId:te;return D.cloneElement(k,{key:k.key||"".concat(O,"-").concat(F),xAxis:H[Q],yAxis:Z[G],viewBox:{x:W.left,y:W.top,width:W.width,height:W.height},clipPathId:B})}),pt(M,"renderActivePoints",function(k){var O=k.item,F=k.activePoint,R=k.basePoint,B=k.childIndex,Y=k.isRange,H=[],Z=O.props.key,W=O.item.type.defaultProps!==void 0?Ee(Ee({},O.item.type.defaultProps),O.item.props):O.item.props,$=W.activeDot,V=W.dataKey,ne=Ee(Ee({index:B,dataKey:V,cx:F.x,cy:F.y,r:4,fill:nA(O.item),strokeWidth:2,stroke:"#fff",payload:F.payload,value:F.value},Rt($,!1)),Kb($));return H.push(S.renderActiveDot($,ne,"".concat(Z,"-activePoint-").concat(B))),R?H.push(S.renderActiveDot($,Ee(Ee({},ne),{},{cx:R.x,cy:R.y}),"".concat(Z,"-basePoint-").concat(B))):Y&&H.push(null),H}),pt(M,"renderGraphicChild",function(k,O,F){var R=M.filterFormatItem(k,O,F);if(!R)return null;var B=M.getTooltipEventType(),Y=M.state,H=Y.isTooltipActive,Z=Y.tooltipAxis,W=Y.activeTooltipIndex,$=Y.activeLabel,V=M.props.children,ne=Go(V,Fi),Q=R.props,te=Q.points,G=Q.isRange,X=Q.baseLine,ee=R.item.type.defaultProps!==void 0?Ee(Ee({},R.item.type.defaultProps),R.item.props):R.item.props,ie=ee.activeDot,fe=ee.hide,he=ee.activeBar,we=ee.activeShape,Ne=!!(!fe&&H&&ne&&(ie||he||we)),Ae={};B!=="axis"&&ne&&ne.props.trigger==="click"?Ae={onClick:My(M.handleItemMouseEnter,k.props.onClick)}:B!=="axis"&&(Ae={onMouseLeave:My(M.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:My(M.handleItemMouseEnter,k.props.onMouseEnter)});var Te=D.cloneElement(k,Ee(Ee({},R.props),Ae));function Fe(Ot){return typeof Z.dataKey=="function"?Z.dataKey(Ot.payload):null}if(Ne)if(W>=0){var We,ke;if(Z.dataKey&&!Z.allowDuplicatedCategory){var Ie=typeof Z.dataKey=="function"?Fe:"payload.".concat(Z.dataKey.toString());We=$b(te,Ie,$),ke=G&&X&&$b(X,Ie,$)}else We=te?.[W],ke=G&&X&&X[W];if(we||he){var ce=k.props.activeIndex!==void 0?k.props.activeIndex:W;return[D.cloneElement(k,Ee(Ee(Ee({},R.props),Ae),{},{activeIndex:ce})),null,null]}if(!jt(We))return[Te].concat(Tf(M.renderActivePoints({item:R,activePoint:We,basePoint:ke,childIndex:W,isRange:G})))}else{var Pe,Oe=(Pe=M.getItemByXY(M.state.activeCoordinate))!==null&&Pe!==void 0?Pe:{graphicalItem:Te},Ve=Oe.graphicalItem,tt=Ve.item,ot=tt===void 0?k:tt,st=Ve.childIndex,wt=Ee(Ee(Ee({},R.props),Ae),{},{activeIndex:st});return[D.cloneElement(ot,wt),null,null]}return G?[Te,null,null]:[Te,null]}),pt(M,"renderCustomized",function(k,O,F){return D.cloneElement(k,Ee(Ee({key:"recharts-customized-".concat(F)},M.props),M.state))}),pt(M,"renderMap",{CartesianGrid:{handler:Py,once:!0},ReferenceArea:{handler:M.renderReferenceElement},ReferenceLine:{handler:Py},ReferenceDot:{handler:M.renderReferenceElement},XAxis:{handler:Py},YAxis:{handler:Py},Brush:{handler:M.renderBrush,once:!0},Bar:{handler:M.renderGraphicChild},Line:{handler:M.renderGraphicChild},Area:{handler:M.renderGraphicChild},Radar:{handler:M.renderGraphicChild},RadialBar:{handler:M.renderGraphicChild},Scatter:{handler:M.renderGraphicChild},Pie:{handler:M.renderGraphicChild},Funnel:{handler:M.renderGraphicChild},Tooltip:{handler:M.renderCursor,once:!0},PolarGrid:{handler:M.renderPolarGrid,once:!0},PolarAngleAxis:{handler:M.renderPolarAxis},PolarRadiusAxis:{handler:M.renderPolarAxis},Customized:{handler:M.renderCustomized}}),M.clipPathId="".concat((E=x.id)!==null&&E!==void 0?E:Yg("recharts"),"-clip"),M.throttleTriggeredAfterMouseMove=lY(M.triggeredAfterMouseMove,(C=x.throttleDelay)!==null&&C!==void 0?C:1e3/60),M.state={},M}return TGe(S,y),yGe(S,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,M=E.data,k=E.height,O=E.layout,F=Go(C,Fi);if(F){var R=F.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var B=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,Y=GE(this.state,M,R,B),H=this.state.tooltipTicks[R].coordinate,Z=(this.state.offset.top+k)/2,W=O==="horizontal",$=W?{x:H,y:Z}:{y:H,x:Z},V=this.state.formattedGraphicalItems.find(function(Q){var te=Q.item;return te.type.name==="Scatter"});V&&($=Ee(Ee({},$),V.props.points[R].tooltipPosition),Y=V.props.points[R].tooltipPayload);var ne={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:B,activePayload:Y,activeCoordinate:$};this.setState(ne),this.renderCursor(F),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var M,k;this.accessibilityManager.setDetails({offset:{left:(M=this.props.margin.left)!==null&&M!==void 0?M:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(E){Dk([Go(E.children,Fi)],[Go(this.props.children,Fi)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Go(this.props.children,Fi);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return s.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,M=C.getBoundingClientRect(),k=xFe(M),O={chartX:Math.round(E.pageX-k.left),chartY:Math.round(E.pageY-k.top)},F=M.width/C.offsetWidth||1,R=this.inRange(O.chartX,O.chartY,F);if(!R)return null;var B=this.state,Y=B.xAxisMap,H=B.yAxisMap,Z=this.getTooltipEventType();if(Z!=="axis"&&Y&&H){var W=Ll(Y).scale,$=Ll(H).scale,V=W&&W.invert?W.invert(O.chartX):null,ne=$&&$.invert?$.invert(O.chartY):null;return Ee(Ee({},O),{},{xValue:V,yValue:ne})}var Q=J5(this.state,this.props.data,this.props.layout,R);return Q?Ee(Ee({},O),Q):null}},{key:"inRange",value:function(E,C){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,O=E/M,F=C/M;if(k==="horizontal"||k==="vertical"){var R=this.state.offset,B=O>=R.left&&O<=R.left+R.width&&F>=R.top&&F<=R.top+R.height;return B?{x:O,y:F}:null}var Y=this.state,H=Y.angleAxisMap,Z=Y.radiusAxisMap;if(H&&Z){var W=Ll(H);return jR({x:O,y:F},W)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),M=Go(E,Fi),k={};M&&C==="axis"&&(M.props.trigger==="click"?k={onClick:this.handleClick}:k={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 O=Kb(this.props,this.handleOuterEvent);return Ee(Ee({},O),k)}},{key:"addListener",value:function(){nI.on(rI,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nI.removeListener(rI,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,M){for(var k=this.state.formattedGraphicalItems,O=0,F=k.length;O<F;O++){var R=k[O];if(R.item===E||R.props.key===E.key||C===Hs(R.item.type)&&M===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,C=this.state.offset,M=C.left,k=C.top,O=C.height,F=C.width;return _.createElement("defs",null,_.createElement("clipPath",{id:E},_.createElement("rect",{x:M,y:k,height:O,width:F})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(C,M){var k=q5(M,2),O=k[0],F=k[1];return Ee(Ee({},C),{},pt({},O,F.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(C,M){var k=q5(M,2),O=k[0],F=k[1];return Ee(Ee({},C),{},pt({},O,F.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[E])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(E){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[E])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(E){var C=this.state,M=C.formattedGraphicalItems,k=C.activeItem;if(M&&M.length)for(var O=0,F=M.length;O<F;O++){var R=M[O],B=R.props,Y=R.item,H=Y.type.defaultProps!==void 0?Ee(Ee({},Y.type.defaultProps),Y.props):Y.props,Z=Hs(Y.type);if(Z==="Bar"){var W=(B.data||[]).find(function(Q){return VYe(E,Q)});if(W)return{graphicalItem:R,payload:W}}else if(Z==="RadialBar"){var $=(B.data||[]).find(function(Q){return jR(E,Q)});if($)return{graphicalItem:R,payload:$}}else if(SS(R,k)||TS(R,k)||zm(R,k)){var V=Pze({graphicalItem:R,activeTooltipItem:k,itemData:H.data}),ne=H.activeIndex===void 0?V:H.activeIndex;return{graphicalItem:Ee(Ee({},R),{},{childIndex:ne}),payload:zm(R,k)?H.data[V]:R.props.data[V]}}}return null}},{key:"render",value:function(){var E=this;if(!X4(this))return null;var C=this.props,M=C.children,k=C.className,O=C.width,F=C.height,R=C.style,B=C.compact,Y=C.title,H=C.desc,Z=$5(C,dGe),W=Rt(Z,!1);if(B)return _.createElement(A5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement(Nk,Ad({},W,{width:O,height:F,title:Y,desc:H}),this.renderClipPath(),eL(M,this.renderMap)));if(this.props.accessibilityLayer){var $,V;W.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,W.role=(V=this.props.role)!==null&&V!==void 0?V:"application",W.onKeyDown=function(Q){E.accessibilityManager.keyboardEvent(Q)},W.onFocus=function(){E.accessibilityManager.focus()}}var ne=this.parseEventsOfWrapper();return _.createElement(A5,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},_.createElement("div",Ad({className:Ut("recharts-wrapper",k),style:Ee({position:"relative",cursor:"default",width:O,height:F},R)},ne,{ref:function(te){E.container=te}}),_.createElement(Nk,Ad({},W,{width:O,height:F,title:Y,desc:H,style:MGe}),this.renderClipPath(),eL(M,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(D.Component);pt(w,"displayName",n),pt(w,"defaultProps",Ee({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),pt(w,"getDerivedStateFromProps",function(y,S){var x=y.dataKey,E=y.data,C=y.children,M=y.width,k=y.height,O=y.layout,F=y.stackOffset,R=y.margin,B=S.dataStartIndex,Y=S.dataEndIndex;if(S.updateId===void 0){var H=X5(y);return Ee(Ee(Ee({},H),{},{updateId:0},m(Ee(Ee({props:y},H),{},{updateId:0}),S)),{},{prevDataKey:x,prevData:E,prevWidth:M,prevHeight:k,prevLayout:O,prevStackOffset:F,prevMargin:R,prevChildren:C})}if(x!==S.prevDataKey||E!==S.prevData||M!==S.prevWidth||k!==S.prevHeight||O!==S.prevLayout||F!==S.prevStackOffset||!Pd(R,S.prevMargin)){var Z=X5(y),W={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},$=Ee(Ee({},J5(S,E,O)),{},{updateId:S.updateId+1}),V=Ee(Ee(Ee({},Z),W),$);return Ee(Ee(Ee({},V),m(Ee({props:y},V),S)),{},{prevDataKey:x,prevData:E,prevWidth:M,prevHeight:k,prevLayout:O,prevStackOffset:F,prevMargin:R,prevChildren:C})}if(!Dk(C,S.prevChildren)){var ne,Q,te,G,X=Go(C,ff),ee=X&&(ne=(Q=X.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&ne!==void 0?ne:B,ie=X&&(te=(G=X.props)===null||G===void 0?void 0:G.endIndex)!==null&&te!==void 0?te:Y,fe=ee!==B||ie!==Y,he=!jt(E),we=he&&!fe?S.updateId:S.updateId+1;return Ee(Ee({updateId:we},m(Ee(Ee({props:y},S),{},{updateId:we,dataStartIndex:ee,dataEndIndex:ie}),S)),{},{prevChildren:C,dataStartIndex:ee,dataEndIndex:ie})}return null}),pt(w,"renderActiveDot",function(y,S,x){var E;return D.isValidElement(y)?E=D.cloneElement(y,S):Mt(y)?E=y(S):E=_.createElement(oA,S),_.createElement(_n,{className:"recharts-active-dot",key:x},E)});var b=D.forwardRef(function(S,x){return _.createElement(w,Ad({},S,{ref:x}))});return b.displayName=w.displayName,b},HGe=vU({chartName:"LineChart",GraphicalChild:Zg,axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:Ps}],formatAxisMap:Lz}),ib=vU({chartName:"BarChart",GraphicalChild:Ji,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Os},{axisType:"yAxis",AxisComp:Ps}],formatAxisMap:Lz});const pA="-",BGe=e=>{const t=YGe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(pA);return s[0]===""&&s.length!==1&&s.shift(),yU(s,t)||_Ge(i)},getConflictingClassGroupIds:(i,s)=>{const l=n[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},yU=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?yU(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(pA);return t.validators.find(({validator:i})=>i(a))?.classGroupId},e9=/^\[(.+)\]$/,_Ge=e=>{if(e9.test(e)){const t=e9.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},YGe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return UGe(Object.entries(e.classGroups),n).forEach(([a,i])=>{ZE(i,r,a,t)}),r},ZE=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:t9(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(zGe(o)){ZE(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{ZE(i,t9(t,a),n,r)})})},t9=(e,t)=>{let n=e;return t.split(pA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zGe=e=>e.isThemeGetter,UGe=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,VGe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},bU="!",WGe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const l=[];let u=0,f=0,h;for(let y=0;y<s.length;y++){let S=s[y];if(u===0){if(S===o&&(r||s.slice(y,y+a)===t)){l.push(s.slice(f,y)),f=y+a;continue}if(S==="/"){h=y;continue}}S==="["?u++:S==="]"&&u--}const p=l.length===0?s:s.substring(f),m=p.startsWith(bU),w=m?p.substring(1):p,b=h&&h>f?h-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:w,maybePostfixModifierPosition:b}};return n?s=>n({className:s,parseClassName:i}):i},GGe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},ZGe=e=>({cache:VGe(e.cacheSize),parseClassName:WGe(e),...BGe(e)}),qGe=/\s+/,$Ge=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(qGe);let s="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:f,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let w=!!m,b=r(w?p.substring(0,m):p);if(!b){if(!w){s=u+(s.length>0?" "+s:s);continue}if(b=r(p),!b){s=u+(s.length>0?" "+s:s);continue}w=!1}const y=GGe(f).join(":"),S=h?y+bU:y,x=S+b;if(a.includes(x))continue;a.push(x);const E=o(b,w);for(let C=0;C<E.length;++C){const M=E[C];a.push(S+M)}s=u+(s.length>0?" "+s:s)}return s};function KGe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=wU(t))&&(r&&(r+=" "),r+=n);return r}const wU=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wU(e[r]))&&(n&&(n+=" "),n+=t);return n};function JGe(e,...t){let n,r,o,a=i;function i(l){const u=t.reduce((f,h)=>h(f),e());return n=ZGe(u),r=n.cache.get,o=n.cache.set,a=s,s(l)}function s(l){const u=r(l);if(u)return u;const f=$Ge(l,n);return o(l,f),f}return function(){return a(KGe.apply(null,arguments))}}const yn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},SU=/^\[(?:([a-z-]+):)?(.+)\]$/i,XGe=/^\d+\/\d+$/,QGe=new Set(["px","full","screen"]),eZe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tZe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nZe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rZe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oZe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>Fd(e)||QGe.has(e)||XGe.test(e),Nl=e=>sh(e,"length",fZe),Fd=e=>!!e&&!Number.isNaN(Number(e)),aI=e=>sh(e,"number",Fd),up=e=>!!e&&Number.isInteger(Number(e)),aZe=e=>e.endsWith("%")&&Fd(e.slice(0,-1)),kt=e=>SU.test(e),Ol=e=>eZe.test(e),iZe=new Set(["length","size","percentage"]),sZe=e=>sh(e,iZe,TU),lZe=e=>sh(e,"position",TU),cZe=new Set(["image","url"]),uZe=e=>sh(e,cZe,pZe),dZe=e=>sh(e,"",hZe),dp=()=>!0,sh=(e,t,n)=>{const r=SU.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},fZe=e=>tZe.test(e)&&!nZe.test(e),TU=()=>!1,hZe=e=>rZe.test(e),pZe=e=>oZe.test(e),mZe=()=>{const e=yn("colors"),t=yn("spacing"),n=yn("blur"),r=yn("brightness"),o=yn("borderColor"),a=yn("borderRadius"),i=yn("borderSpacing"),s=yn("borderWidth"),l=yn("contrast"),u=yn("grayscale"),f=yn("hueRotate"),h=yn("invert"),p=yn("gap"),m=yn("gradientColorStops"),w=yn("gradientColorStopPositions"),b=yn("inset"),y=yn("margin"),S=yn("opacity"),x=yn("padding"),E=yn("saturate"),C=yn("scale"),M=yn("sepia"),k=yn("skew"),O=yn("space"),F=yn("translate"),R=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",kt,t],H=()=>[kt,t],Z=()=>["",xs,Nl],W=()=>["auto",Fd,kt],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",kt],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Fd,kt];return{cacheSize:500,separator:":",theme:{colors:[dp],spacing:[xs,Nl],blur:["none","",Ol,kt],brightness:X(),borderColor:[e],borderRadius:["none","","full",Ol,kt],borderSpacing:H(),borderWidth:Z(),contrast:X(),grayscale:te(),hueRotate:X(),invert:te(),gap:H(),gradientColorStops:[e],gradientColorStopPositions:[aZe,Nl],inset:Y(),margin:Y(),opacity:X(),padding:H(),saturate:X(),scale:X(),sepia:te(),skew:X(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",kt]}],container:["container"],columns:[{columns:[Ol]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),kt]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",up,kt]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",kt]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",up,kt]}],"grid-cols":[{"grid-cols":[dp]}],"col-start-end":[{col:["auto",{span:["full",up,kt]},kt]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[dp]}],"row-start-end":[{row:["auto",{span:[up,kt]},kt]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",kt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",kt]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",kt,t]}],"min-w":[{"min-w":[kt,t,"min","max","fit"]}],"max-w":[{"max-w":[kt,t,"none","full","min","max","fit","prose",{screen:[Ol]},Ol]}],h:[{h:[kt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[kt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[kt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[kt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ol,Nl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",aI]}],"font-family":[{font:[dp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",kt]}],"line-clamp":[{"line-clamp":["none",Fd,aI]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xs,kt]}],"list-image":[{"list-image":["none",kt]}],"list-style-type":[{list:["none","disc","decimal",kt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xs,Nl]}],"underline-offset":[{"underline-offset":["auto",xs,kt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",kt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),lZe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",sZe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uZe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[xs,kt]}],"outline-w":[{outline:[xs,Nl]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[xs,Nl]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ol,dZe]}],"shadow-color":[{shadow:[dp]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ne(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ne()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ol,kt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[E]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",kt]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",kt]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",kt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[up,kt]}],"translate-x":[{"translate-x":[F]}],"translate-y":[{"translate-y":[F]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",kt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",kt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",kt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xs,Nl,aI]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},gZe=JGe(mZe);function qo(...e){return gZe(qt(e))}function bp({className:e,...t}){return g.jsx("div",{"data-slot":"card",className:qo("th:bg-card th:text-card-foreground th:flex th:flex-col th:gap-6 th:rounded-xl th:border th:border-border th:py-6 th:shadow-sm",e),...t})}function wp({className:e,...t}){return g.jsx("div",{"data-slot":"card-header",className:qo("th:@container/card-header th:grid th:auto-rows-min th:grid-rows-[auto_auto] th:items-start th:gap-1.5 th:px-6 has-[data-slot=card-action]:th:grid-cols-[1fr_auto] [.border-b]:th:pb-6",e),...t})}function Sp({className:e,...t}){return g.jsx("div",{"data-slot":"card-title",className:qo("th:leading-none th:font-semibold",e),...t})}function Tp({className:e,...t}){return g.jsx("div",{"data-slot":"card-description",className:qo("th:text-muted-foreground th:text-sm",e),...t})}function xp({className:e,...t}){return g.jsx("div",{"data-slot":"card-content",className:qo("th:px-6",e),...t})}function vZe({className:e,...t}){return g.jsx("div",{"data-slot":"card-footer",className:qo("th:flex th:items-center th:px-6 [.border-t]:th:pt-6",e),...t})}const yZe={light:"",dark:".dark"},xU=D.createContext(null);function bZe(){const e=D.useContext(xU);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function Ip({id:e,className:t,children:n,config:r,...o}){const a=D.useId(),i=`chart-${e||a.replace(/:/g,"")}`;return g.jsx(xU.Provider,{value:{config:r},children:g.jsxs("div",{"data-slot":"chart","data-chart":i,className:qo("[&_.recharts-cartesian-axis-tick_text]:th:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke=#ccc]]:th:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:th:stroke-border [&_.recharts-polar-grid_[stroke=#ccc]]:th:stroke-border [&_.recharts-radial-bar-background-sector]:th:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:th:fill-muted [&_.recharts-reference-line_[stroke=#ccc]]:th:stroke-border th:flex th:aspect-video th:justify-center th:text-xs [&_.recharts-dot[stroke=#fff]]:th:stroke-transparent [&_.recharts-layer]:th:outline-hidden [&_.recharts-sector]:th:outline-hidden [&_.recharts-sector[stroke=#fff]]:th:stroke-transparent [&_.recharts-surface]:th:outline-hidden",t),...o,children:[g.jsx(wZe,{id:i,config:r}),g.jsx(gFe,{children:n})]})})}const wZe=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?g.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(yZe).map(([r,o])=>`
${o} [data-chart=${e}] {
${n.map(([a,i])=>{const s=i.theme?.[r]||i.color;return s?` --color-${a}: ${s};`:null}).join(`
`)}
}
`).join(`
`)}}):null},kp=Fi;function jy({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:h,labelKey:p}){const{config:m}=bZe(),w=D.useMemo(()=>{if(o||!t?.length)return null;const[y]=t,S=`${p||y?.dataKey||y?.name||"value"}`,x=n9(m,y,S),E=!p&&typeof i=="string"?m[i]?.label||i:x?.label;return s?g.jsx("div",{className:qo("th:font-medium",l),children:s(E,t)}):E?g.jsx("div",{className:qo("th:font-medium",l),children:E}):null},[i,s,t,o,l,m,p]);if(!e||!t?.length)return null;const b=t.length===1&&r!=="dot";return g.jsxs("div",{className:qo("th:border-border/50 th:bg-background th:grid th:min-w-[8rem] th:items-start th:gap-1.5 th:rounded-lg th:border th:px-2.5 th:py-1.5 th:text-xs th:shadow-xl",n),children:[b?null:w,g.jsx("div",{className:"th:grid th:gap-1.5",children:t.map((y,S)=>{const x=`${h||y.name||y.dataKey||"value"}`,E=n9(m,y,x),C=f||y.payload.fill||y.color;return g.jsx("div",{className:qo("[&>svg]:th:text-muted-foreground th:flex th:w-full th:flex-wrap th:items-stretch th:gap-2 [&>svg]:th:h-2.5 [&>svg]:th:w-2.5",r==="dot"&&"th:items-center"),children:u&&y?.value!==void 0&&y.name?u(y.value,y.name,y,S,y.payload):g.jsxs(g.Fragment,{children:[E?.icon?g.jsx(E.icon,{}):!a&&g.jsx("div",{className:qo("th:shrink-0 th:rounded-[2px] th:border-(--color-border) th: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":b&&r==="dashed"}),style:{"--color-bg":C,"--color-border":C}}),g.jsxs("div",{className:qo("th:flex th:flex-1 th:justify-between th:leading-none",b?"th:items-end":"th:items-center"),children:[g.jsxs("div",{className:"th:grid th:gap-1.5",children:[b?w:null,g.jsx("span",{className:"th:text-muted-foreground",children:E?.label||y.name})]}),y.value&&g.jsx("span",{className:"th:text-foreground th:font-mono th:font-medium th:tabular-nums",children:y.value.toLocaleString()})]})]})},y.dataKey)})})]})}function n9(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 o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}const SZe={item:{label:"Item",color:"var(--chart-3)"}};function TZe({memos:e}){const[t,n]=D.useState([]);D.useEffect(()=>{const o=[{period:"00:00-03:00",count:0},{period:"03:00-06:00",count:0},{period:"06:00-09:00",count:0},{period:"09:00-12:00",count:0},{period:"12:00-15:00",count:0},{period:"15:00-18:00",count:0},{period:"18:00-21:00",count:0},{period:"21:00-24:00",count:0}];e.forEach(a=>{const i=new Date(a.createdAt).getHours();i<3?o[0].count++:i<6?o[1].count++:i<9?o[2].count++:i<12?o[3].count++:i<15?o[4].count++:i<18?o[5].count++:i<21?o[6].count++:o[7].count++}),n(o)},[e]);const r=D.useMemo(()=>{if(t.length===0)return[0,0];const o=Math.max(...t.map(a=>a.count));return[0,Math.ceil(o)]},[t]);return g.jsx("div",{className:"twp",children:g.jsxs(bp,{className:"th:w-full th:h-full th:flex th:flex-col th:rounded th:mb-4",children:[g.jsx(wp,{className:"th:flex th:flex-row th:flex-wrap th:gap-2 th:py-2 sm:th:gap-0 th:justify-between th:border-border th:border-b",children:g.jsxs("div",{className:"th:flex th:flex-col th:gap-1",children:[g.jsx(Sp,{children:I("Time Distribution")}),g.jsx(Tp,{children:I("When do you write thinos")})]})}),g.jsx(xp,{className:"th:w-full th:h-full th:my-4 th:h-96",children:g.jsx(Ip,{config:SZe,className:"th:aspect-auto th:h-full th:w-full",children:g.jsxs(ib,{data:t,margin:{top:20,right:10,left:0,bottom:10},children:[g.jsx(Dd,{strokeDasharray:"3 3"}),g.jsx(Os,{dataKey:"period",tickLine:!1,tickMargin:10,axisLine:!1}),g.jsx(Ps,{domain:r,allowDecimals:!1}),g.jsx(kp,{content:g.jsx(xZe,{})}),g.jsx(Ji,{dataKey:"count",fill:"var(--chart-2)",radius:[4,4,0,0]})]})})})]})})}const xZe=({active:e,payload:t})=>{if(e&&t&&t.length){const n=t[0].payload;return g.jsxs("div",{className:"th:p-2 th:border th:border-border th:bg-secondary th:rounded th:shadow",children:[g.jsx("p",{className:"th:font-bold",children:n.period}),g.jsxs("p",{children:[n.count," thinos"]})]})}return null},IZe=async e=>{const t=e.querySelectorAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await ya(n.getAttribute("path")||A.normalizePath(n?.parentElement?.getAttribute("src")||""));n.src=r}else{const r=await ya(n.src);n.src=r}},kZe=D.forwardRef((e,t)=>{const{currentDate:n,setCurrentDateStamp:r,showTimeDistributionChart:o}=e,[a,i]=D.useState(!1),s=je.getDateStampByDate(je.getDateString(n)),l=D.useRef(null);D.useEffect(()=>{l.current&&A.setIcon(l.current,"more-horizontal")},[l.current]);const u=f=>{r(f)};return D.useImperativeHandle(t,()=>({closeDatePicker:()=>{i(!1)}})),g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"date-card-container",children:[g.jsxs("div",{className:"date-container-details",children:[g.jsxs("div",{className:"details-text",children:[A.moment(s,"x").format("dddd"),g.jsx("div",{className:"date-text",children:A.moment(s,"x").format("MMM")+A.moment(s,"x").format("DD")})]}),g.jsx("div",{className:"details-logo-text",children:I("Daily Memos")})]}),g.jsxs("div",{className:"date-container-info",children:[g.jsxs("div",{className:"date-container-info-text",children:["Week ",g.jsx("div",{className:"week-text",children:A.moment(s,"x").format("ww")}),"of ",g.jsx("div",{className:"year-text",children:A.moment(s,"x").format("YYYY")})]}),g.jsx("div",{ref:l,onClick:f=>{const h=new A.Menu;h.addItem(p=>{p.setTitle(I("Show Time Distribution")),p.setIcon("chart-bar"),p.onClick(()=>{o()})}),h.addItem(p=>{p.setTitle(I(a?"Hide date picker":"Show date picker")),p.setIcon("calendar"),p.onClick(()=>{i(!a)})}),h.showAtMouseEvent(f.nativeEvent)}})]})]}),g.jsx(a0,{className:`date-picker ${a?"":"thino-hidden"}`,datestamp:s,handleDateStampChange:u})]})}),EZe=({thino:e})=>{const t=D.useCallback(()=>{Qa(e)},[]);return g.jsxs("div",{className:"daily-thino-wrapper",children:[g.jsx("div",{className:"time-wrapper",onClick:t,children:g.jsx("span",{className:"normal-text",children:A.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm")})}),g.jsx("div",{className:"daily-thino-container",children:g.jsx(no,{memo:e})})]})},CZe=()=>{const{locationState:{query:e},memoState:{memos:t},dailyNotesState:{settings:n,app:r,plugin:o}}=D.useContext(it),a=Ql(),[i,s]=D.useState([]),[l,u]=D.useState(je.getDateStampByDate(je.getDateString(A.moment().format("YYYY-MM-DD HH:mm:ss")))),[f,h]=D.useState(!1),p=D.useRef(),m=D.useRef(null),w=_.useRef(null),b=D.useRef(null),[y,S]=D.useState(!1);D.useEffect(()=>{e.duration&&e.duration.from&&e.duration.to&&u(e.duration.from)},[e.duration]),D.useEffect(()=>{b.current&&(A.setIcon&&b&&!y&&A.setIcon(b.current,"share"),A.setIcon&&b&&y&&A.setIcon(b.current,"chrome"))},[b.current,y]),D.useEffect(()=>{_l({memos:t,query:e,filterOptions:{filterDoneTasks:!1},plugin:o}).then(C=>{const M=C.filter(k=>je.getTimeStampByDate(k.createdAt)>=l&&je.getTimeStampByDate(k.createdAt)<l+Do).filter(k=>k.deletedAt==="").sort((k,O)=>je.getTimeStampByDate(k.createdAt)-je.getTimeStampByDate(O.createdAt));s(M.slice(0,40)),a.setFinish()})},[t,l,w.current,e]);const x=async()=>{p.current&&p?.current?.closeDatePicker(),S(!0),document.body.toggleClass("thino-share-page",!0),setTimeout(async()=>{if(!m.current){S(!1);return}await IZe(m.current),l0(m.current,{pixelRatio:window.devicePixelRatio*2}).then(C=>{if(n?.AutoSaveWhenOnMobile&&A.Platform.isMobile){const M=C.split("base64,")[1];Xw(M,"image/png").arrayBuffer().then(async O=>{let F;const R="png",B=Xs();for(const Y in B)if(B[Y]instanceof A.TFile){F=B[Y];break}F!==void 0&&await r.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${A.moment().format("YYYYMMDDHHmmss")}`,R,F),O)})}document.body.toggleClass("thino-share-page",!1),Wd({imgUrl:C}),S(!1)}).catch(()=>{document.body.toggleClass("thino-share-page",!1),S(!1)})},0)},E=g.jsxs("div",{className:"header-right-section",children:[g.jsxs("div",{className:"btns-container",children:[g.jsx("span",{ref:C=>{A.setIcon&&C&&A.setIcon(C,"chevron-left")},className:"btn btn-text",onClick:()=>u(C=>C-Do)}),g.jsx("span",{ref:C=>{A.setIcon&&C&&A.setIcon(C,"chevron-right")},className:"btn btn-text",onClick:()=>u(C=>C+Do)}),g.jsx("span",{ref:b,className:qt("btn btn-text share-btn",y?"generating":""),onClick:x})]}),g.jsx(vD,{}),g.jsx(ig,{})]});return g.jsxs("div",{className:"daily-thinos-list-wrapper",ref:w,children:[g.jsx(Fs,{rightContent:E}),g.jsx(Hg,{thinosCount:i.length,thinos:i}),g.jsx("div",{className:"daily-thinos-view-wrapper thino-stat",children:g.jsxs("div",{ref:m,className:"daily-thinos-view-container",children:[g.jsx(kZe,{ref:p,currentDate:new Date(l),setCurrentDateStamp:u,showTimeDistributionChart:()=>h(!f)}),f&&g.jsx(TZe,{memos:i}),g.jsx(xD,{isLoading:a.isLoading,isEmpty:i.length===0,emptyMessage:I("Noooop!")}),!a.isLoading&&i.length>0&&g.jsx("div",{className:"daily-thinos-list-container",children:i.map(C=>g.jsx(EZe,{thino:C},`${C.id}-${C.updatedAt}`))})]})})]})};var Yt=(e=>(e[e.New=0]="New",e[e.Learning=1]="Learning",e[e.Review=2]="Review",e[e.Relearning=3]="Relearning",e))(Yt||{}),Be=(e=>(e[e.Manual=0]="Manual",e[e.Again=1]="Again",e[e.Hard=2]="Hard",e[e.Good=3]="Good",e[e.Easy=4]="Easy",e))(Be||{});class Dt{static card(t){return{...t,state:Dt.state(t.state),due:Dt.time(t.due),last_review:t.last_review?Dt.time(t.last_review):void 0}}static rating(t){if(typeof t=="string"){const n=t.charAt(0).toUpperCase(),r=t.slice(1).toLowerCase(),o=Be[`${n}${r}`];if(o===void 0)throw new Error(`Invalid rating:[${t}]`);return o}else if(typeof t=="number")return t;throw new Error(`Invalid rating:[${t}]`)}static state(t){if(typeof t=="string"){const n=t.charAt(0).toUpperCase(),r=t.slice(1).toLowerCase(),o=Yt[`${n}${r}`];if(o===void 0)throw new Error(`Invalid state:[${t}]`);return o}else if(typeof t=="number")return t;throw new Error(`Invalid state:[${t}]`)}static time(t){if(typeof t=="object"&&t instanceof Date)return t;if(typeof t=="string"){const n=Date.parse(t);if(isNaN(n))throw new Error(`Invalid date:[${t}]`);return new Date(n)}else if(typeof t=="number")return new Date(t);throw new Error(`Invalid date:[${t}]`)}static review_log(t){return{...t,due:Dt.time(t.due),rating:Dt.rating(t.rating),state:Dt.state(t.state),review:Dt.time(t.review)}}}const MZe=.9,DZe=36500,AZe=[.40255,1.18385,3.173,15.69105,7.1949,.5345,1.4604,.0046,1.54575,.1192,1.01925,1.9395,.11,.29605,2.2698,.2315,2.9898,.51655,.6621],NZe=!1,OZe=!0,qE=e=>{let t=AZe;return e?.w&&(e.w.length===19?t=e?.w:e.w.length===17&&(t=e?.w.concat([0,0]),t[4]=+(t[5]*2+t[4]).toFixed(8),t[5]=+(Math.log(t[5]*3+1)/3).toFixed(8),t[6]=+(t[6]+.5).toFixed(8),console.debug("[FSRS V5]auto fill w to 19 length"))),{request_retention:e?.request_retention||MZe,maximum_interval:e?.maximum_interval||DZe,w:t,enable_fuzz:e?.enable_fuzz??NZe,enable_short_term:e?.enable_short_term??OZe}};function Vw(e,t){const n={due:e?Dt.time(e):new Date,stability:0,difficulty:0,elapsed_days:0,scheduled_days:0,reps:0,lapses:0,state:Yt.New,last_review:void 0};return t&&typeof t=="function"?t(n):n}Date.prototype.scheduler=function(e,t){return PZe(this,e,t)},Date.prototype.diff=function(e,t){return jZe(this,e,t)},Date.prototype.format=function(){return LZe(this)},Date.prototype.dueFormat=function(e,t,n){return RZe(this,e,t,n)};function PZe(e,t,n){return new Date(n?vu(e).getTime()+t*24*60*60*1e3:vu(e).getTime()+t*60*1e3)}function jZe(e,t,n){if(!e||!t)throw new Error("Invalid date");const r=vu(e).getTime()-vu(t).getTime();let o=0;switch(n){case"days":o=Math.floor(r/(24*60*60*1e3));break;case"minutes":o=Math.floor(r/(60*1e3));break}return o}function LZe(e){const t=vu(e),n=t.getFullYear(),r=t.getMonth()+1,o=t.getDate(),a=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return`${n}-${fp(r)}-${fp(o)} ${fp(a)}:${fp(i)}:${fp(s)}`}function fp(e){return e<10?`0${e}`:`${e}`}const iI=[60,60,24,31,12],sI=["second","min","hour","day","month","year"];function RZe(e,t,n,r=sI){e=vu(e),t=vu(t),r.length!==sI.length&&(r=sI);let o=e.getTime()-t.getTime(),a;for(o/=1e3,a=0;a<iI.length&&!(o<iI[a]);a++)o/=iI[a];return`${Math.floor(o)}${n?r[a]:""}`}function vu(e){return Dt.time(e)}const FZe=[Be.Again,Be.Hard,Be.Good,Be.Easy],HZe=[{start:2.5,end:7,factor:.15},{start:7,end:20,factor:.1},{start:20,end:1/0,factor:.05}];function BZe(e,t,n){let r=1;for(const i of HZe)r+=i.factor*Math.max(Math.min(e,i.end)-i.start,0);e=Math.min(e,n);let o=Math.max(2,Math.round(e-r));const a=Math.min(Math.round(e+r),n);return e>t&&(o=Math.max(o,t+1)),o=Math.min(o,a),{min_ivl:o,max_ivl:a}}function lI(e,t,n){return Math.min(Math.max(e,t),n)}class _Ze{c;s0;s1;s2;constructor(t){const n=YZe();this.c=1,this.s0=n(" "),this.s1=n(" "),this.s2=n(" "),t==null&&(t=+new Date),this.s0-=n(t),this.s0<0&&(this.s0+=1),this.s1-=n(t),this.s1<0&&(this.s1+=1),this.s2-=n(t),this.s2<0&&(this.s2+=1)}next(){const t=2091639*this.s0+this.c*23283064365386963e-26;return this.s0=this.s1,this.s1=this.s2,this.s2=t-(this.c=t|0),this.s2}set state(t){this.c=t.c,this.s0=t.s0,this.s1=t.s1,this.s2=t.s2}get state(){return{c:this.c,s0:this.s0,s1:this.s1,s2:this.s2}}}function YZe(){let e=4022871197;return function(t){t=String(t);for(let n=0;n<t.length;n++){e+=t.charCodeAt(n);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function zZe(e){const t=new _Ze(e),n=()=>t.next();return n.int32=()=>t.next()*4294967296|0,n.double=()=>n()+(n()*2097152|0)*11102230246251565e-32,n.state=()=>t.state,n.importState=r=>(t.state=r,n),n}const r9=-.5,o9=19/81;class UZe{param;intervalModifier;_seed;constructor(t){this.param=new Proxy(qE(t),this.params_handler_proxy()),this.intervalModifier=this.calculate_interval_modifier(this.param.request_retention)}get interval_modifier(){return this.intervalModifier}set seed(t){this._seed=t}calculate_interval_modifier(t){if(t<=0||t>1)throw new Error("Requested retention rate should be in the range (0,1]");return+((Math.pow(t,1/r9)-1)/o9).toFixed(8)}get parameters(){return this.param}set parameters(t){this.update_parameters(t)}params_handler_proxy(){const t=this;return{set:function(n,r,o){return r==="request_retention"&&Number.isFinite(o)&&(t.intervalModifier=t.calculate_interval_modifier(Number(o))),Reflect.set(n,r,o),!0}}}update_parameters(t){const n=qE(t);for(const r in n)if(r in this.param){const o=r;this.param[o]=n[o]}}init_stability(t){return Math.max(this.param.w[t-1],.1)}init_difficulty(t){return this.constrain_difficulty(this.param.w[4]-Math.exp((t-1)*this.param.w[5])+1)}apply_fuzz(t,n){if(!this.param.enable_fuzz||t<2.5)return Math.round(t);const r=zZe(this._seed)(),{min_ivl:o,max_ivl:a}=BZe(t,n,this.param.maximum_interval);return Math.floor(r*(a-o+1)+o)}next_interval(t,n){const r=Math.min(Math.max(1,Math.round(t*this.intervalModifier)),this.param.maximum_interval);return this.apply_fuzz(r,n)}linear_damping(t,n){return+(t*(10-n)/9).toFixed(8)}next_difficulty(t,n){const r=-this.param.w[6]*(n-3),o=t+this.linear_damping(r,t);return this.constrain_difficulty(this.mean_reversion(this.init_difficulty(Be.Easy),o))}constrain_difficulty(t){return Math.min(Math.max(+t.toFixed(8),1),10)}mean_reversion(t,n){return+(this.param.w[7]*t+(1-this.param.w[7])*n).toFixed(8)}next_recall_stability(t,n,r,o){const a=Be.Hard===o?this.param.w[15]:1,i=Be.Easy===o?this.param.w[16]:1;return+lI(n*(1+Math.exp(this.param.w[8])*(11-t)*Math.pow(n,-this.param.w[9])*(Math.exp((1-r)*this.param.w[10])-1)*a*i),.01,36500).toFixed(8)}next_forget_stability(t,n,r){return+lI(this.param.w[11]*Math.pow(t,-this.param.w[12])*(Math.pow(n+1,this.param.w[13])-1)*Math.exp((1-r)*this.param.w[14]),.01,36500).toFixed(8)}next_short_term_stability(t,n){return+lI(t*Math.exp(this.param.w[17]*(n-3+this.param.w[18])),.01,36500).toFixed(8)}forgetting_curve(t,n){return+Math.pow(1+o9*t/n,r9).toFixed(8)}}function IU(){const e=this.review_time.getTime(),t=this.current.reps,n=this.current.difficulty*this.current.stability;return`${e}_${t}_${n}`}var $E=(e=>(e.SCHEDULER="Scheduler",e.SEED="Seed",e))($E||{});class kU{last;current;review_time;next=new Map;algorithm;initSeedStrategy;constructor(t,n,r,o={seed:IU}){this.algorithm=r,this.initSeedStrategy=o.seed.bind(this),this.last=Dt.card(t),this.current=Dt.card(t),this.review_time=Dt.time(n),this.init()}init(){const{state:t,last_review:n}=this.current;let r=0;t!==Yt.New&&n&&(r=this.review_time.diff(n,"days")),this.current.last_review=this.review_time,this.current.elapsed_days=r,this.current.reps+=1,this.algorithm.seed=this.initSeedStrategy()}preview(){return{[Be.Again]:this.review(Be.Again),[Be.Hard]:this.review(Be.Hard),[Be.Good]:this.review(Be.Good),[Be.Easy]:this.review(Be.Easy),[Symbol.iterator]:this.previewIterator.bind(this)}}*previewIterator(){for(const t of FZe)yield this.review(t)}review(t){const{state:n}=this.last;let r;switch(n){case Yt.New:r=this.newState(t);break;case Yt.Learning:case Yt.Relearning:r=this.learningState(t);break;case Yt.Review:r=this.reviewState(t);break}if(r)return r;throw new Error("Invalid grade")}buildLog(t){const{last_review:n,due:r,elapsed_days:o}=this.last;return{rating:t,state:this.current.state,due:n||r,stability:this.current.stability,difficulty:this.current.difficulty,elapsed_days:this.current.elapsed_days,last_elapsed_days:o,scheduled_days:this.current.scheduled_days,review:this.review_time}}}class a9 extends kU{newState(t){const n=this.next.get(t);if(n)return n;const r=Dt.card(this.current);switch(r.difficulty=this.algorithm.init_difficulty(t),r.stability=this.algorithm.init_stability(t),t){case Be.Again:r.scheduled_days=0,r.due=this.review_time.scheduler(1),r.state=Yt.Learning;break;case Be.Hard:r.scheduled_days=0,r.due=this.review_time.scheduler(5),r.state=Yt.Learning;break;case Be.Good:r.scheduled_days=0,r.due=this.review_time.scheduler(10),r.state=Yt.Learning;break;case Be.Easy:{const a=this.algorithm.next_interval(r.stability,this.current.elapsed_days);r.scheduled_days=a,r.due=this.review_time.scheduler(a,!0),r.state=Yt.Review;break}default:throw new Error("Invalid grade")}const o={card:r,log:this.buildLog(t)};return this.next.set(t,o),o}learningState(t){const n=this.next.get(t);if(n)return n;const{state:r,difficulty:o,stability:a}=this.last,i=Dt.card(this.current),s=this.current.elapsed_days;switch(i.difficulty=this.algorithm.next_difficulty(o,t),i.stability=this.algorithm.next_short_term_stability(a,t),t){case Be.Again:i.scheduled_days=0,i.due=this.review_time.scheduler(5,!1),i.state=r;break;case Be.Hard:i.scheduled_days=0,i.due=this.review_time.scheduler(10),i.state=r;break;case Be.Good:{const u=this.algorithm.next_interval(i.stability,s);i.scheduled_days=u,i.due=this.review_time.scheduler(u,!0),i.state=Yt.Review;break}case Be.Easy:{const u=this.algorithm.next_short_term_stability(a,Be.Good),f=this.algorithm.next_interval(u,s),h=Math.max(this.algorithm.next_interval(i.stability,s),f+1);i.scheduled_days=h,i.due=this.review_time.scheduler(h,!0),i.state=Yt.Review;break}default:throw new Error("Invalid grade")}const l={card:i,log:this.buildLog(t)};return this.next.set(t,l),l}reviewState(t){const n=this.next.get(t);if(n)return n;const r=this.current.elapsed_days,{difficulty:o,stability:a}=this.last,i=this.algorithm.forgetting_curve(r,a),s=Dt.card(this.current),l=Dt.card(this.current),u=Dt.card(this.current),f=Dt.card(this.current);this.next_ds(s,l,u,f,o,a,i),this.next_interval(s,l,u,f,r),this.next_state(s,l,u,f),s.lapses+=1;const h={card:s,log:this.buildLog(Be.Again)},p={card:l,log:super.buildLog(Be.Hard)},m={card:u,log:super.buildLog(Be.Good)},w={card:f,log:super.buildLog(Be.Easy)};return this.next.set(Be.Again,h),this.next.set(Be.Hard,p),this.next.set(Be.Good,m),this.next.set(Be.Easy,w),this.next.get(t)}next_ds(t,n,r,o,a,i,s){t.difficulty=this.algorithm.next_difficulty(a,Be.Again);const l=i/Math.exp(this.algorithm.parameters.w[17]*this.algorithm.parameters.w[18]);t.stability=Math.min(+l.toFixed(8),this.algorithm.next_forget_stability(a,i,s)),n.difficulty=this.algorithm.next_difficulty(a,Be.Hard),n.stability=this.algorithm.next_recall_stability(a,i,s,Be.Hard),r.difficulty=this.algorithm.next_difficulty(a,Be.Good),r.stability=this.algorithm.next_recall_stability(a,i,s,Be.Good),o.difficulty=this.algorithm.next_difficulty(a,Be.Easy),o.stability=this.algorithm.next_recall_stability(a,i,s,Be.Easy)}next_interval(t,n,r,o,a){let i,s;i=this.algorithm.next_interval(n.stability,a),s=this.algorithm.next_interval(r.stability,a),i=Math.min(i,s),s=Math.max(s,i+1);const l=Math.max(this.algorithm.next_interval(o.stability,a),s+1);t.scheduled_days=0,t.due=this.review_time.scheduler(5),n.scheduled_days=i,n.due=this.review_time.scheduler(i,!0),r.scheduled_days=s,r.due=this.review_time.scheduler(s,!0),o.scheduled_days=l,o.due=this.review_time.scheduler(l,!0)}next_state(t,n,r,o){t.state=Yt.Relearning,n.state=Yt.Review,r.state=Yt.Review,o.state=Yt.Review}}class i9 extends kU{newState(t){const n=this.next.get(t);if(n)return n;this.current.scheduled_days=0,this.current.elapsed_days=0;const r=Dt.card(this.current),o=Dt.card(this.current),a=Dt.card(this.current),i=Dt.card(this.current);return this.init_ds(r,o,a,i),this.next_interval(r,o,a,i,0),this.next_state(r,o,a,i),this.update_next(r,o,a,i),this.next.get(t)}init_ds(t,n,r,o){t.difficulty=this.algorithm.init_difficulty(Be.Again),t.stability=this.algorithm.init_stability(Be.Again),n.difficulty=this.algorithm.init_difficulty(Be.Hard),n.stability=this.algorithm.init_stability(Be.Hard),r.difficulty=this.algorithm.init_difficulty(Be.Good),r.stability=this.algorithm.init_stability(Be.Good),o.difficulty=this.algorithm.init_difficulty(Be.Easy),o.stability=this.algorithm.init_stability(Be.Easy)}learningState(t){return this.reviewState(t)}reviewState(t){const n=this.next.get(t);if(n)return n;const r=this.current.elapsed_days,{difficulty:o,stability:a}=this.last,i=this.algorithm.forgetting_curve(r,a),s=Dt.card(this.current),l=Dt.card(this.current),u=Dt.card(this.current),f=Dt.card(this.current);return this.next_ds(s,l,u,f,o,a,i),this.next_interval(s,l,u,f,r),this.next_state(s,l,u,f),s.lapses+=1,this.update_next(s,l,u,f),this.next.get(t)}next_ds(t,n,r,o,a,i,s){t.difficulty=this.algorithm.next_difficulty(a,Be.Again),t.stability=Math.min(i,this.algorithm.next_forget_stability(a,i,s)),n.difficulty=this.algorithm.next_difficulty(a,Be.Hard),n.stability=this.algorithm.next_recall_stability(a,i,s,Be.Hard),r.difficulty=this.algorithm.next_difficulty(a,Be.Good),r.stability=this.algorithm.next_recall_stability(a,i,s,Be.Good),o.difficulty=this.algorithm.next_difficulty(a,Be.Easy),o.stability=this.algorithm.next_recall_stability(a,i,s,Be.Easy)}next_interval(t,n,r,o,a){let i,s,l,u;i=this.algorithm.next_interval(t.stability,a),s=this.algorithm.next_interval(n.stability,a),l=this.algorithm.next_interval(r.stability,a),u=this.algorithm.next_interval(o.stability,a),i=Math.min(i,s),s=Math.max(s,i+1),l=Math.max(l,s+1),u=Math.max(u,l+1),t.scheduled_days=i,t.due=this.review_time.scheduler(i,!0),n.scheduled_days=s,n.due=this.review_time.scheduler(s,!0),r.scheduled_days=l,r.due=this.review_time.scheduler(l,!0),o.scheduled_days=u,o.due=this.review_time.scheduler(u,!0)}next_state(t,n,r,o){t.state=Yt.Review,n.state=Yt.Review,r.state=Yt.Review,o.state=Yt.Review}update_next(t,n,r,o){const a={card:t,log:this.buildLog(Be.Again)},i={card:n,log:super.buildLog(Be.Hard)},s={card:r,log:super.buildLog(Be.Good)},l={card:o,log:super.buildLog(Be.Easy)};this.next.set(Be.Again,a),this.next.set(Be.Hard,i),this.next.set(Be.Good,s),this.next.set(Be.Easy,l)}}class VZe{fsrs;constructor(t){this.fsrs=t}replay(t,n,r){return this.fsrs.next(t,n,r)}handleManualRating(t,n,r,o,a,i,s){if(typeof n>"u")throw new Error("reschedule: state is required for manual rating");let l,u;if(n===Yt.New)l={rating:Be.Manual,state:n,due:s??r,stability:t.stability,difficulty:t.difficulty,elapsed_days:o,last_elapsed_days:t.elapsed_days,scheduled_days:t.scheduled_days,review:r},u=Vw(r),u.last_review=r;else{if(typeof s>"u")throw new Error("reschedule: due is required for manual rating");const f=s.diff(r,"days");l={rating:Be.Manual,state:t.state,due:t.last_review||t.due,stability:t.stability,difficulty:t.difficulty,elapsed_days:o,last_elapsed_days:t.elapsed_days,scheduled_days:t.scheduled_days,review:r},u={...t,state:n,due:s,last_review:r,stability:a||t.stability,difficulty:i||t.difficulty,elapsed_days:o,scheduled_days:f,reps:t.reps+1}}return{card:u,log:l}}reschedule(t,n){const r=[];let o=Vw(t.due);for(const a of n){let i;if(a.review=Dt.time(a.review),a.rating===Be.Manual){let s=0;o.state!==Yt.New&&o.last_review&&(s=a.review.diff(o.last_review,"days")),i=this.handleManualRating(o,a.state,a.review,s,a.stability,a.difficulty,a.due?Dt.time(a.due):void 0)}else i=this.replay(o,a.review,a.rating);r.push(i),o=i.card}return r}calculateManualRecord(t,n,r,o){if(!r)return null;const{card:a,log:i}=r,s=Dt.card(t);return s.due.getTime()===a.due.getTime()?null:(s.scheduled_days=a.due.diff(s.due,"days"),this.handleManualRating(s,a.state,Dt.time(n),i.elapsed_days,o?a.stability:void 0,o?a.difficulty:void 0,a.due))}}class WZe extends UZe{strategyHandler=new Map;Scheduler;constructor(t){super(t);const{enable_short_term:n}=this.parameters;this.Scheduler=n?a9:i9}params_handler_proxy(){const t=this;return{set:function(n,r,o){return r==="request_retention"&&Number.isFinite(o)?t.intervalModifier=t.calculate_interval_modifier(Number(o)):r==="enable_short_term"&&(t.Scheduler=o===!0?a9:i9),Reflect.set(n,r,o),!0}}}useStrategy(t,n){return this.strategyHandler.set(t,n),this}clearStrategy(t){return t?this.strategyHandler.delete(t):this.strategyHandler.clear(),this}getScheduler(t,n){const r=this.strategyHandler.get($E.SEED),o=this.strategyHandler.get($E.SCHEDULER)||this.Scheduler,a=r||IU;return new o(t,n,this,{seed:a})}repeat(t,n,r){const o=this.getScheduler(t,n).preview();return r&&typeof r=="function"?r(o):o}next(t,n,r,o){const a=this.getScheduler(t,n),i=Dt.rating(r);if(i===Be.Manual)throw new Error("Cannot review a manual rating");const s=a.review(i);return o&&typeof o=="function"?o(s):s}get_retrievability(t,n,r=!0){const o=Dt.card(t);n=n?Dt.time(n):new Date;const a=o.state!==Yt.New?Math.max(n.diff(o.last_review,"days"),0):0,i=o.state!==Yt.New?this.forgetting_curve(a,+o.stability.toFixed(8)):0;return r?`${(i*100).toFixed(2)}%`:i}rollback(t,n,r){const o=Dt.card(t),a=Dt.review_log(n);if(a.rating===Be.Manual)throw new Error("Cannot rollback a manual rating");let i,s,l;switch(a.state){case Yt.New:i=a.due,s=void 0,l=0;break;case Yt.Learning:case Yt.Relearning:case Yt.Review:i=a.review,s=a.due,l=o.lapses-(a.rating===Be.Again&&a.state===Yt.Review?1:0);break}const u={...o,due:i,stability:a.stability,difficulty:a.difficulty,elapsed_days:a.last_elapsed_days,scheduled_days:a.scheduled_days,reps:Math.max(0,o.reps-1),lapses:Math.max(0,l),state:a.state,last_review:s};return r&&typeof r=="function"?r(u):u}forget(t,n,r=!1,o){const a=Dt.card(t);n=Dt.time(n);const i=a.state===Yt.New?0:n.diff(a.last_review,"days"),s={rating:Be.Manual,state:a.state,due:a.due,stability:a.stability,difficulty:a.difficulty,elapsed_days:0,last_elapsed_days:a.elapsed_days,scheduled_days:i,review:n},l={card:{...a,due:n,stability:0,difficulty:0,elapsed_days:0,scheduled_days:0,reps:r?0:a.reps,lapses:r?0:a.lapses,state:Yt.New,last_review:a.last_review},log:s};return o&&typeof o=="function"?o(l):l}reschedule(t,n=[],r={}){const{recordLogHandler:o,reviewsOrderBy:a,skipManual:i=!0,now:s=new Date,update_memory_state:l=!1}=r;a&&typeof a=="function"&&n.sort(a),i&&(n=n.filter(w=>w.rating!==Be.Manual));const u=new VZe(this),f=u.reschedule(r.first_card||Vw(),n),h=f.length,p=Dt.card(t),m=u.calculateManualRecord(p,s,h?f[h-1]:void 0,l);return o&&typeof o=="function"?{collections:f.map(o),reschedule_item:m?o(m):null}:{collections:f,reschedule_item:m}}}const GZe=new WZe(qE({maximum_interval:36500,request_retention:.9,enable_fuzz:!0,enable_short_term:!0,w:[.40255,1.18385,3.173,15.69105,7.1949,.5345,1.4604,.0046,1.54575,.1192,1.01925,1.9395,.11,.29605,2.2698,.2315,2.9898,.51655,.6621]})),ZZe=()=>({totalReviews:0,hardCount:0,goodCount:0,easyCount:0,againCount:0,lastReviewDate:Date.now(),reviewHistory:[]}),EU=e=>({...Vw(),memoId:e}),qZe=e=>GZe.repeat(e,new Date),$Ze=(e,t)=>{const n=qZe(e);let r;switch(t){case Be.Again:r=n[Be.Again].card;break;case Be.Hard:r=n[Be.Hard].card;break;case Be.Good:r=n[Be.Good].card;break;case Be.Easy:r=n[Be.Easy].card;break;default:throw new Error("Invalid rating")}return{...r,memoId:e.memoId}},lr=o0("memos-review-db","review-store"),KZe=async()=>{await Ls("historical_stats",lr)||await Ys("historical_stats",{totalReviews:0,againCount:0,hardCount:0,goodCount:0,easyCount:0,reviewHistory:[]},lr)},KE=async()=>await Ls("historical_stats",lr)||{totalReviews:0,againCount:0,hardCount:0,goodCount:0,easyCount:0,reviewHistory:[]},JZe=async e=>{const t=await KE();switch(t.totalReviews++,e){case Be.Again:t.againCount++;break;case Be.Hard:t.hardCount++;break;case Be.Good:t.goodCount++;break;case Be.Easy:t.easyCount++;break}t.reviewHistory.push({date:Date.now(),rating:e}),await Ys("historical_stats",t,lr)},XZe=async()=>{try{await Ys("test-key","test-value",lr),await Ls("test-key",lr),await PF("test-key",lr),await KZe();const e=new Date().toISOString().split("T")[0],t=await Ls("dailyLimit",lr);if(!t||t.date!==e){const r=(await jF(lr)).filter(i=>i?.startsWith("review_")),a=(await Promise.all(r.map(async i=>{const s=await Ls(i,lr);if(!s)return!1;const l=Date.now();return s.card?.due&&s.card.due.getTime()<=l}))).filter(Boolean).length;await Ys("dailyLimit",{date:e,reviewed:0,totalCards:a},lr)}return!0}catch(e){return console.error("Error initializing database:",e),!1}};let cI=!1;const DS=async()=>(cI||(cI=await XZe()),cI),JE=async()=>{if(!await DS())return{date:new Date().toISOString().split("T")[0],reviewed:0,totalCards:0};try{const e=new Date().toISOString().split("T")[0],t=await Ls("dailyLimit",lr),r=(await jF(lr)).filter(a=>a?.startsWith("review_")),o=new Set(r).size;if(!t||t.date!==e){const a={date:e,reviewed:0,totalCards:o};return await Ys("dailyLimit",a,lr),a}if(t.totalCards!==o){const a={...t,totalCards:o};return await Ys("dailyLimit",a,lr),a}return t}catch(e){return console.error("Error getting daily limit:",e),{date:new Date().toISOString().split("T")[0],reviewed:0,totalCards:0}}},QZe=async()=>{if(await DS())try{const e=await JE();e.reviewed+=1,await Ys("dailyLimit",e,lr)}catch(e){console.error("Error updating daily limit:",e)}},CU=async e=>{if(await DS())try{const t=`review_${e}`,n=await Ls(t,lr);if(n&&"sm2Data"in n&&!n.card){const r={memoId:e,card:EU(e),stats:{totalReviews:n.stats.totalReviews,hardCount:n.stats.hardCount||0,goodCount:n.stats.goodCount||0,easyCount:n.stats.easyCount||0,againCount:0,lastReviewDate:n.stats.lastReviewDate,reviewHistory:n.stats.reviewHistory.map(o=>({date:o.date,rating:MU(o.quality)}))},sm2Data:n.sm2Data};return await mA(e,r),r}return n}catch(t){console.error("Error getting review data:",t);return}},mA=async(e,t)=>{if(await DS())try{const n=`review_${e}`;await Ys(n,t,lr)}catch(n){console.error("Error setting review data:",n)}},eqe=async e=>{const t={memoId:e,card:EU(e),stats:ZZe()};return await mA(e,t),t},MU=e=>{switch(e){case 1:return Be.Again;case 2:return Be.Hard;case 3:case 4:return Be.Good;case 5:return Be.Easy;default:return Be.Good}},tqe=async(e,t)=>{try{let n=await CU(e);n||(n=await eqe(e));const r=MU(t),o=$Ze(n.card,r),a={...n.stats,totalReviews:n.stats.totalReviews+1,lastReviewDate:Date.now(),reviewHistory:[...n.stats.reviewHistory,{date:Date.now(),rating:r}]};switch(r){case Be.Again:a.againCount++;break;case Be.Hard:a.hardCount++;break;case Be.Good:a.goodCount++;break;case Be.Easy:a.easyCount++;break}const i={...n,card:o,stats:a};return await mA(e,i),await QZe(),await JZe(r),i}catch(n){throw console.error("Error updating review:",n),n}},nqe=()=>{const{dailyNotesState:{app:e,plugin:t},memoState:{memos:n},globalState:{isMobileView:r}}=D.useContext(it),o=Ql(),[a,i]=D.useState(0),[s,l]=D.useState([]),[u,f]=D.useState(!1),[h,p]=D.useState(!1),[m,w]=D.useState({total:0,reviewed:0,remaining:0,againCount:0,hardCount:0,goodCount:0,easyCount:0,dailyLimit:100,dailyReviewed:0}),[b]=D.useState(new Map),[y,S]=D.useState({totalReviews:0,againCount:0,hardCount:0,goodCount:0,easyCount:0,reviewHistory:[]});D.useEffect(()=>{(async()=>{try{const k=await JE();if(k.totalCards>=100){l([]),w($=>({...$,dailyReviewed:k.reviewed,remaining:0,total:k.totalCards})),f(!1),o.setFinish();return}const O=n.filter($=>$.rowStatus!=="ARCHIVED"&&!($.deletedAt!==""&&$.deletedAt)),F=[];let R=0,B=0,Y=0,H=0;const Z=Date.now();b.clear();for(const $ of O)try{const V=await CU($.id);V&&b.set($.id,V),(!V||V.card?.due&&V.card.due.getTime()<=Z||V.sm2Data?.dueDate&&V.sm2Data.dueDate<=Z)&&(F.push($),V?.stats&&(R+=V.stats.againCount||0,B+=V.stats.hardCount||0,Y+=V.stats.goodCount||0,H+=V.stats.easyCount||0))}catch(V){console.error("Error fetching review data for memo:",$.id,V);continue}F.sort(($,V)=>{const ne=b.get($.id),Q=b.get(V.id),te=ne?.card?.due?.getTime()||ne?.sm2Data?.dueDate||0,G=Q?.card?.due?.getTime()||Q?.sm2Data?.dueDate||0;return te-G});const W=Math.min(F.length,100-k.reviewed);l(F.slice(0,W)),w({total:k.totalCards,reviewed:0,remaining:W,againCount:R,hardCount:B,goodCount:Y,easyCount:H,dailyLimit:100,dailyReviewed:k.reviewed})}catch(k){console.error("Error in fetchReviewableMemos:",k)}finally{o.setFinish()}})()},[n]),D.useEffect(()=>{t.addCommand({id:"clear-review-data",name:I("Clear all review data"),callback:async()=>{try{const M=o0("memos-review-db","review-store");await zK(M),w({total:0,reviewed:0,remaining:0,againCount:0,hardCount:0,goodCount:0,easyCount:0,dailyLimit:100,dailyReviewed:0}),l([]),f(!1),i(0),b.clear()}catch(M){console.error("Error clearing review data:",M)}}})},[]),D.useEffect(()=>{(async()=>{const k=await KE();S(k)})()},[]),D.useCallback(()=>{Ge.setShowSiderbarInMobileView(!0)},[]);const x=async M=>{const k=s[a];if(!k)return;const O=await tqe(k.id,M),F=await JE(),R=await KE();S(R);const B=s.filter((Y,H)=>H!==a);if(M===1||M===2){const Y=B.findIndex(H=>(b.get(H.id)?.card.due.getTime()||0)>O.card.due.getTime());Y===-1?B.push(k):B.splice(Y,0,k)}l(B),w(Y=>({...Y,reviewed:Y.reviewed+1,remaining:B.length,dailyReviewed:Y.dailyReviewed+1,total:F.totalCards,...M===1?{againCount:Y.againCount+1}:M===2?{hardCount:Y.hardCount+1}:M===3||M===4?{goodCount:Y.goodCount+1}:{easyCount:Y.easyCount+1}})),B.length>0?a>=B.length&&i(0):f(!1)},E=()=>{s.length>0&&(f(!0),i(0))},C=s[a];return g.jsxs("div",{className:"daily-review-wrapper",children:[g.jsx(Fs,{showSidebar:r,rightContent:g.jsx("div",{className:"header-right-section",children:g.jsx("button",{className:"show-stats-btn",onClick:()=>p(!h),children:I(h?"Hide stats":"Show stats")})})}),h&&g.jsxs("div",{className:"review-stats-banner",children:[g.jsxs("div",{className:"stats-wrapper",children:[g.jsxs("div",{className:"stats-item",children:[g.jsxs("span",{className:"label",children:[I("Daily Progress"),":"]}),g.jsx("span",{className:"value",children:m.dailyReviewed})]}),g.jsxs("div",{className:"stats-item",children:[g.jsxs("span",{className:"label",children:[I("Today Remaining"),":"]}),g.jsx("span",{className:"value",children:m.remaining})]}),g.jsxs("div",{className:"stats-item",children:[g.jsxs("span",{className:"label",children:[I("Today Total"),":"]}),g.jsx("span",{className:"value",children:m.total})]})]}),g.jsx("div",{className:"stats-breakdown-wrapper",children:g.jsx("div",{className:"stats-breakdown",children:g.jsxs("div",{className:"historical-stats",children:[g.jsx("h4",{children:I("Historical Statistics")}),g.jsxs("span",{className:"total",children:[I("Total Reviews"),": ",y.totalReviews]}),g.jsxs("span",{className:"again",children:[I("Again"),": ",y.againCount]}),g.jsxs("span",{className:"hard",children:[I("Hard"),": ",y.hardCount]}),g.jsxs("span",{className:"good",children:[I("Good"),": ",y.goodCount]}),g.jsxs("span",{className:"easy",children:[I("Easy"),": ",y.easyCount]})]})})})]}),g.jsx("div",{className:"review-container",children:o.isLoading?g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:I("Fetching data...")})}):s.length===0?g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:I("Today, you have reviewed all your thinos!")})}):u?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"review-card",children:[g.jsx(no,{memo:C}),g.jsxs("div",{className:"review-buttons",children:[g.jsx("button",{className:"again",onClick:()=>x(1),children:I("Again")}),g.jsx("button",{className:"hard",onClick:()=>x(2),children:I("Hard")}),g.jsx("button",{className:"good",onClick:()=>x(3),children:I("Good")}),g.jsx("button",{className:"easy",onClick:()=>x(5),children:I("Easy")})]})]}),s.length>3?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"review-card stacked-card left-stacked"}),g.jsx("div",{className:"review-card stacked-card right-stacked"})]}):s.length===2?g.jsx("div",{className:"review-card stacked-card left-stacked"}):null]}):g.jsx("div",{className:"review-stats",children:g.jsxs("div",{className:"stats-content",children:[g.jsxs("span",{children:[I("Thinos to review"),": ",m.remaining]}),g.jsx("button",{className:"start-review-btn",onClick:E,children:I("Start Review")})]})})})]})},rqe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),DU=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var oqe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const aqe=D.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>D.createElement("svg",{ref:l,...oqe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:DU("lucide",o),...s},[...i.map(([u,f])=>D.createElement(u,f)),...Array.isArray(a)?a:[a]])),iqe=(e,t)=>{const n=D.forwardRef(({className:r,...o},a)=>D.createElement(aqe,{ref:a,iconNode:t,className:DU(`lucide-${rqe(e)}`,r),...o}));return n.displayName=`${e}`,n},sqe=iqe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),Ly={daily:{label:"Daily",color:"var(--chart-1)"},time:{label:"Time",color:"var(--chart-2)"},length:{label:"Length",color:"var(--chart-3)"},journal:{label:"Journal",color:"var(--chart-4)"}},lqe=()=>{const{memoState:{tags:e,tagsNum:t,memos:n},globalState:{isMobileView:r},dailyNotesState:{plugin:o}}=D.useContext(it),a=Ql(),[i,s]=D.useState([]),[l,u]=D.useState([]),[f,h]=D.useState([]),[p,m]=D.useState([]),[w,b]=D.useState([]),[y,S]=D.useState([]),[x,E]=D.useState("30days"),[C,M]=D.useState([]);D.useEffect(()=>{if(!n||n.length===0)return;(async()=>{a.setLoading();try{const R=await o.thinoWorkerManager.calculateStats(n);s(R.dailyData),u(R.monthlyData),h(R.yearlyData),m(R.hourlyData),b(R.timeDistData),S(R.lengthData),M(Object.entries(t).map(([B,Y])=>({tag:B,count:Y})).sort((B,Y)=>Y.count-B.count).slice(0,10))}catch(R){console.error("Error loading stats:",R)}finally{a.setFinish()}})()},[n]);const k=D.useMemo(()=>{switch(x){case"day":return p;case"month":return l;case"year":return f;default:return i}},[x,p,l,f,i]);D.useCallback(()=>{Ge.setShowSiderbarInMobileView(!0)},[]);const O=D.useCallback(F=>{const R=new A.Menu;R.addItem(B=>{B.setTitle(I("Hourly distribution")).setChecked(x==="day").onClick(()=>E("day"))}),R.addItem(B=>{B.setTitle(I("Month")).setChecked(x==="month").onClick(()=>E("month"))}),R.addItem(B=>{B.setTitle(I("30 Days")).setChecked(x==="30days").onClick(()=>E("30days"))}),R.addItem(B=>{B.setTitle(I("Year")).setChecked(x==="year").onClick(()=>E("year"))}),R.showAtMouseEvent(F.nativeEvent)},[I,x]);return g.jsxs("div",{className:"thino-stat",children:[g.jsx(Fs,{showSidebar:r,title:I("Statistics")}),a.isLoading?g.jsx("div",{className:"tip-text-container",children:g.jsx("span",{className:"tip-text",children:I("Fetching data...")})}):g.jsxs("div",{className:"twp stats-container th:grid th:grid-cols-1 th:md:grid-cols-2 th:gap-4 th:overflow-y-auto th:max-h-[calc(100vh-240px)]",children:[g.jsxs(bp,{className:"stat-card th:w-full th:h-fit th:bg-background th:border th:border-border/50 th:rounded-lg th:shadow-sm",children:[g.jsx(wp,{children:g.jsxs("div",{className:"th:flex th:justify-between th:items-center",children:[g.jsxs("div",{children:[g.jsx(Sp,{children:I("Thino Count")}),g.jsxs(Tp,{children:[x==="day"&&I("Hourly distribution"),x==="month"&&I("Current month"),x==="30days"&&I("Last 30 days"),x==="year"&&I("Monthly distribution")]})]}),g.jsx("div",{className:"th:flex th:gap-2",children:g.jsx("button",{className:`th:px-2 th:py-1 th:text-sm th:rounded ${x==="day"?"!th:bg-secondary th:text-secondary-foreground":"th:bg-muted"}`,onClick:F=>O(F),children:"Switch view"})})]})}),g.jsx(xp,{children:g.jsx(Ip,{config:Ly,children:g.jsxs(HGe,{data:k,children:[g.jsx(Dd,{strokeDasharray:"3 3"}),g.jsx(Os,{dataKey:x==="day"?"hour":"date",tickLine:!1,tickMargin:10,axisLine:!1}),g.jsx(Ps,{}),g.jsx(kp,{content:g.jsx(jy,{})}),g.jsx(Zg,{type:"monotone",dataKey:"count",stroke:"var(--color-daily)",strokeWidth:2,dot:!1})]})})}),g.jsx(vZe,{children:g.jsxs("div",{className:"total-count th:flex th:items-center th:justify-center th:text-sm th:text-muted-foreground",children:[I("Total"),": ",n.length," ",I("thinos"),g.jsx(sqe,{className:"trend-icon th:h-4 th:w-4"})]})})]}),g.jsxs(bp,{className:"stat-card th:w-full th:h-fit th:bg-background th:border th:border-border/50 th:rounded-lg th:shadow-sm",children:[g.jsxs(wp,{children:[g.jsx(Sp,{children:I("Time Distribution")}),g.jsx(Tp,{children:I("When do you write thinos")})]}),g.jsx(xp,{children:g.jsx(Ip,{config:Ly,children:g.jsxs(ib,{data:w,children:[g.jsx(Dd,{strokeDasharray:"3 3"}),g.jsx(Os,{dataKey:"period",tickLine:!1,tickMargin:10,axisLine:!1}),g.jsx(Ps,{}),g.jsx(kp,{content:g.jsx(jy,{})}),g.jsx(Ji,{dataKey:"count",fill:"var(--color-time)",radius:[4,4,0,0]})]})})})]}),g.jsxs(bp,{className:"stat-card th:w-full th:h-fit th:bg-background th:border th:border-border/50 th:rounded-lg th:shadow-sm",children:[g.jsxs(wp,{children:[g.jsx(Sp,{children:I("Content Length")}),g.jsx(Tp,{children:I("Distribution of thino lengths")})]}),g.jsx(xp,{children:g.jsx(Ip,{config:Ly,children:g.jsxs(ib,{data:y,children:[g.jsx(Dd,{strokeDasharray:"3 3"}),g.jsx(Os,{dataKey:"range",tickLine:!1,tickMargin:10,axisLine:!1}),g.jsx(Ps,{}),g.jsx(kp,{content:g.jsx(jy,{})}),g.jsx(Ji,{dataKey:"count",fill:"var(--color-length)",radius:[4,4,0,0]})]})})})]}),g.jsxs(bp,{className:"stat-card th:w-full th:h-fit th:bg-background th:border th:border-border/50 th:rounded-lg th:shadow-sm",children:[g.jsxs(wp,{children:[g.jsx(Sp,{children:I("Popular Tags")}),g.jsx(Tp,{children:I("Top 10 most used tags")})]}),g.jsx(xp,{children:g.jsx(Ip,{config:Ly,children:g.jsxs(ib,{data:C,children:[g.jsx(Dd,{strokeDasharray:"3 3"}),g.jsx(Os,{dataKey:"tag",tickLine:!1,tickMargin:10,axisLine:!1}),g.jsx(Ps,{}),g.jsx(kp,{content:g.jsx(jy,{})}),g.jsx(Ji,{dataKey:"count",fill:"var(--color-journal)",radius:[4,4,0,0]})]})})})]})]})]})},uI=[{name:"All",value:null,color:"transparent",border:!0},{name:"Red",value:"red",color:"#ef4444"},{name:"Orange",value:"orange",color:"#f97316"},{name:"Yellow",value:"yellow",color:"#eab308"},{name:"Green",value:"green",color:"#22c55e"},{name:"Blue",value:"blue",color:"#3b82f6"},{name:"Purple",value:"purple",color:"#a855f7"},{name:"Pink",value:"pink",color:"#ec4899"},{name:"Brown",value:"brown",color:"#a3a3a3"},{name:"Gray",value:"gray",color:"#6b7280"},{name:"Black",value:"black",color:"#1f2937"},{name:"White",value:"white",color:"#f9fafb"}],cqe=e=>new Promise(t=>{const n=document.createElement("canvas"),r=n.getContext("2d");if(!r){t("gray");return}const o=50;n.width=o,n.height=o,r.drawImage(e,0,0,o,o);try{const i=r.getImageData(0,0,o,o).data,s={};for(let f=0;f<i.length;f+=4){const h=i[f],p=i[f+1],m=i[f+2];if(i[f+3]<128)continue;const b=uqe(h,p,m);s[b]=(s[b]||0)+1}let l=0,u="gray";for(const[f,h]of Object.entries(s))h>l&&(l=h,u=f);t(u)}catch(a){console.warn("Failed to extract color from image:",a),t("gray")}}),uqe=(e,t,n)=>{const r=(e*299+t*587+n*114)/1e3;if(r<50)return"black";if(r>200&&Math.abs(e-t)<30&&Math.abs(t-n)<30&&Math.abs(e-n)<30)return"white";if(Math.abs(e-t)<30&&Math.abs(t-n)<30&&Math.abs(e-n)<30)return"gray";const o=Math.max(e,t,n),a=Math.min(e,t,n);return o-a<50?"gray":e===o?t>n?t-n>50?"yellow":"orange":n-t>50?"purple":"red":t===o?e>n?"yellow":n-e>50?"blue":"green":e>t&&e-t>50?"purple":"blue"},dI=({onColorSelect:e,selectedColor:t})=>{const[n,r]=D.useState(!1),o=D.useRef(null);D.useEffect(()=>{const i=s=>{o.current&&!o.current.contains(s.target)&&r(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);const a=uI.find(i=>i.value===t)||uI[0];return g.jsxs("div",{className:"color-picker-container",ref:o,children:[g.jsxs("button",{className:"color-picker-trigger",onClick:()=>r(!n),"aria-label":"Select color filter",children:[g.jsxs("div",{className:"color-picker-preview",children:[g.jsx("div",{className:"color-preview-swatch",style:{backgroundColor:a.color,border:a.border?"2px solid var(--text-muted)":"none"}}),g.jsx("span",{className:"color-picker-label",children:a.name})]}),g.jsx("svg",{className:`color-picker-arrow ${n?"open":""}`,width:"12",height:"12",viewBox:"0 0 12 12",children:g.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})})]}),n&&g.jsx("div",{className:"color-picker-dropdown",children:uI.map(i=>g.jsxs("button",{className:`color-picker-option ${t===i.value?"selected":""}`,onClick:()=>{e(i.value),r(!1)},children:[g.jsx("div",{className:"color-option-swatch",style:{backgroundColor:i.color,border:i.border?"2px solid var(--text-muted)":"none"}}),g.jsx("span",{className:"color-option-label",children:i.name})]},i.value||"all"))})]})},s9=/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i,dqe=({link:e,type:t,imagePath:n,altText:r,onColorExtracted:o})=>{const{app:a}=D.useContext(it).dailyNotesState,[i,s]=D.useState(null),[l,u]=D.useState(null),[f,h]=D.useState(!0);D.useEffect(()=>{if(!a||!e){u("App context or image link is missing."),h(!1);return}let w=!0;return h(!0),u(null),s(null),(async()=>{try{let y=null;if(e.startsWith("http://")||e.startsWith("https://"))y=e;else{const S=n||"/";let x=a.metadataCache.getFirstLinkpathDest(e,S);if(x instanceof A.TFile&&s9.test(x.path))y=a.vault.getResourcePath(x);else{const E=A.normalizePath(e),C=a.vault.getAbstractFileByPath(E);if(C instanceof A.TFile&&s9.test(C.path))y=a.vault.getResourcePath(C);else if(w){let M=`Could not resolve ${t} link: "${e}"`;n&&(M+=` (context: "${n}")`),x?M+=` - resolved to "${x.path}" but it's not a valid image.`:C&&(M+=` - resolved to "${C.path}" but it's not a valid image.`),u(M)}}}if(y&&w)s(y);else if(!y&&w&&!l){let S=`Image source for "${e}" (type: ${t}) could not be determined.`;n&&(S+=` Relative to "${n}"`),u(S)}}catch(y){console.error(`Error resolving image path for link "${e}" (type: ${t}, source: ${n||"N/A"}):`,y),w&&u(`Failed to resolve image "${e}": ${y.message}`)}finally{w&&h(!1)}})(),()=>{w=!1}},[a,e,t,n]);const p=()=>{Wd(n?{imgUrl:i,filepath:n}:{imgUrl:i})};if(f)return g.jsx("div",{className:"image-loading-placeholder",children:"Loading..."});if(l)return g.jsxs("div",{className:"image-error-placeholder",children:["Error: ",l]});const m=w=>{const b=w.currentTarget;o&&b.complete&&cqe(b).then(y=>{o(y)}).catch(y=>{console.warn("Failed to extract color:",y)})};return i?g.jsx("img",{src:i,alt:r||e,onClick:p,onLoad:m,onError:()=>{l||u(`Failed to load image from src: ${i||e}`)},loading:"lazy"}):g.jsx("div",{className:"image-error-placeholder",children:"Image not available"})},l9=20,fqe=10,hqe=()=>{const{dailyNotesState:{app:e},globalState:{isMobileView:t}}=D.useContext(it),[n,r]=D.useState([]),[o,a]=D.useState([]),[i,s]=D.useState(l9),[l,u]=D.useState(!0),[f,h]=D.useState(null),[p,m]=D.useState(null),[w,b]=D.useState([]);D.useEffect(()=>{(async()=>{if(!e){u(!1);return}u(!0);try{const M=await le.fetchAllMemos(),k=new Map;let O=0;for(const R of M)if(R.content){let B;const Y=new RegExp(pG);for(;(B=Y.exec(R.content))!==null;){const V=B[1],ne=B[5];if(V){const Q=`wiki-${R.path}-${V}`;k.has(Q)||k.set(Q,{link:V,type:"wiki",thinoId:R.id,memoPath:R.path,altText:ne||V,key:`img-${O++}`})}}let H;const Z=new RegExp(mG);for(;(H=Z.exec(R.content))!==null;){const V=H[4],ne=H[2];if(V&&!V.startsWith("http")&&/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i.test(V)){const Q=`md-${V}`;k.has(Q)||k.set(Q,{link:V,type:"markdown",thinoId:R.id,memoPath:R.path,altText:ne||V,key:`img-${O++}`})}}let W;const $=new RegExp(hG);for(;(W=$.exec(R.content))!==null;){const V=`http-${W[0]}`;k.has(V)||k.set(V,{link:W[0],type:"markdown",thinoId:R.id,memoPath:R.path,altText:W[0],key:`img-${O++}`})}}const F=Array.from(k.values());r(F)}catch(M){console.error("Failed to fetch image references for gallery:",M)}finally{u(!1)}})()},[e]),D.useEffect(()=>{if(p===null)b(n);else{const C=n.filter(M=>M.dominantColor===p);b(C)}},[p,n]),D.useEffect(()=>{w.length>0?a(w.slice(0,i)):a([])},[i,w]),D.useEffect(()=>{const C=document.querySelector(".content-wrapper");C?h(C):(console.warn("'.content-wrapper' not found, falling back to window for scroll events. For optimal performance, ensure '.content-wrapper' exists or pass a ref to the scrollable element."),h(document.documentElement))},[e]);const y=D.useCallback(()=>{if(!f||l||i>=w.length)return;f.scrollTop+f.clientHeight>=f.scrollHeight-300&&s(M=>Math.min(M+fqe,w.length))},[l,w,i,f]);D.useEffect(()=>{if(!f)return;const C=f===document.documentElement?window:f;return C.addEventListener("scroll",y),()=>C.removeEventListener("scroll",y)},[y,f]);const S=D.useCallback((C,M)=>{r(k=>k.map(O=>O.key===C?{...O,dominantColor:M}:O))},[]),x=D.useCallback(C=>{m(C),s(l9)},[]);if(l)return g.jsxs("div",{className:"gallery-wrapper",children:[g.jsx(Fs,{showSidebar:t,children:g.jsx("div",{className:"gallery-header",children:g.jsx(dI,{onColorSelect:x,selectedColor:p})})}),g.jsx("div",{className:"loading-indicator",children:"Loading images..."})]});if(o.length===0&&p===null)return g.jsx("div",{className:"empty-gallery-message",children:"Try add a image to thino"});if(o.length===0&&p!==null)return g.jsxs("div",{className:"gallery-wrapper",children:[g.jsx(Fs,{showSidebar:t,children:g.jsx("div",{className:"gallery-header",children:g.jsx(dI,{onColorSelect:x,selectedColor:p})})}),g.jsx("div",{className:"empty-gallery-message",children:"No images found with the selected color"})]});const E={default:3,1100:2,700:1};return g.jsxs("div",{className:"gallery-wrapper",children:[g.jsx(Fs,{showSidebar:t,children:g.jsxs("div",{className:"gallery-header",children:[g.jsx(dI,{onColorSelect:x,selectedColor:p}),g.jsx("div",{className:"gallery-stats",children:p?g.jsxs("span",{className:"gallery-stats-text",children:["Showing ",o.length," of ",w.length," ",p," images"]}):g.jsxs("span",{className:"gallery-stats-text",children:["Showing ",o.length," of ",n.length," images"]})})]})}),g.jsx($p,{breakpointCols:E,className:"gallery-masonry-grid",columnClassName:"gallery-masonry-grid_column",children:o.map(C=>g.jsx("div",{className:"gallery-image-item",children:g.jsx(dqe,{link:C.link,type:C.type,imagePath:C.memoPath,altText:C.altText,onColorExtracted:M=>S(C.key,M)})},C.key))})]})},pqe={"/recycle":g.jsx(G4e,{}),"/setting":g.jsx(q4e,{}),"/archive":g.jsx(o4e,{}),"/review":g.jsx($4e,{}),"/stat":g.jsx(lqe,{}),"/daily-review":g.jsx(nqe,{}),"/daily":g.jsx(CZe,{}),"/gallery":g.jsx(hqe,{}),"*":g.jsx(l4e,{})},AU=e=>t=>{for(const n of Object.keys(e))if(n===t)return e[n];return e["*"]},mqe=AU(V4e),gqe=AU(pqe);function vqe({app:e}){const{locationState:{pathname:t},dailyNotesState:{settings:n}}=D.useContext(it);return D.useEffect(()=>{le.fetchAllMemos()},[]),!Yp()&&!e.plugins.getPlugin("periodic-notes")&&n?.EnabledLocationList.find(r=>r.value==="DAILY")&&new A.Notice(I("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!Yp()&&n?.EnabledLocationList.find(r=>r.value==="DAILY")&&!bG()&&new A.Notice(I("Your daily note folder is not set correctly, please check your settings")),g.jsx(Ea,{store:Se,context:it,children:mqe(t)})}function yqe(e){const t=e.view.canvas,n=Ze.getState().settings.EnabledLocationList.find(i=>i.value==="CANVAS");if(!t||!e.view.file.path.endsWith(".thino.canvas")||t.thinoBtn||!n)return;const r=t.wrapperEl.createDiv({cls:"thino-canvas-menu-btn"}),o=ag(r);o.render(g.jsx(_.StrictMode,{children:g.jsx(Ea,{store:Se,context:it,children:g.jsx(bqe,{leaf:e})})})),t.thinoBtn=o,Ze.getState().view.appendRoot({root:o,canvas:t})}function bqe({leaf:e}){const{memoState:{memos:t},locationState:{query:n},dailyNotesState:{plugin:r}}=D.useContext(it),o=_.useRef(null),a=_.useRef(null),[i,s]=_.useState(!1),[l,u]=_.useState([]),[f,h]=_.useState([]),{tag:p,duration:m,type:w,text:b,filter:y}=n,S=St.getQueryById(y),x=!!(p||m&&m.from<m.to||w||b||S);return D.useEffect(()=>{a.current&&A.setIcon(a.current,"eraser")},[a.current]),D.useEffect(()=>{o.current&&A.setIcon(o.current,"Memos")},[o.current]),D.useEffect(()=>{const E=e.view.file.path,C=t.filter(M=>M.sourceType==="CANVAS"&&M.path===E);u(C)},[t,i]),D.useEffect(()=>{if(l.length!==0){if(!n||!x){h(l);return}_l({memos:l,query:n,filterOptions:{filterDoneTasks:!1},plugin:r}).then(E=>{h(E)})}},[n,l]),D.useEffect(()=>{if(!n||!x&&f.length===0)return;const E=new Set(f.map(M=>M.id)),C=Array.from(e.view.canvas.nodes.values());C.forEach(M=>{M.nodeEl.toggleVisibility(!0),e.view.canvas.getEdgesForNode(M).forEach(k=>{k.lineGroupEl?.toggleClass("thino-hidden",!1),k.lineStartGroupEl?.toggleClass("thino-hidden",!1),k.lineEndGroupEl?.toggleClass("thino-hidden",!1)})}),C.filter(M=>!E.has(M.id)).forEach(M=>{M.nodeEl.toggleVisibility(!1),e.view.canvas.getEdgesForNode(M).forEach(k=>{k.lineGroupEl?.toggleClass("thino-hidden",!0),k.lineStartGroupEl?.toggleClass("thino-hidden",!0),k.lineEndGroupEl?.toggleClass("thino-hidden",!0)})})},[f]),g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:o,className:"btn-container",onClick:()=>s(!i)}),i&&g.jsxs("div",{className:"thino-canvas-menu",children:[g.jsxs("div",{className:"thino-canvas-filter-group",children:[g.jsx(vD,{}),g.jsx(ig,{}),x&&g.jsx("div",{ref:a,className:"clear-query",onClick:()=>{Ye.clearQuery()}})]}),g.jsx(qp,{initThinos:f})]})]})}function Ep(e,t){const n=Object.keys(t).map(r=>wqe(e,r,t[r]));return n.length===1?n[0]:function(){n.forEach(r=>r())}}function wqe(e,t,n){const r=e[t],o=e.hasOwnProperty(t);let a=n(r);return r&&Object.setPrototypeOf(a,r),Object.setPrototypeOf(i,a),e[t]=i,s;function i(...l){return a===r&&e[t]===i&&s(),a.apply(this,l)}function s(){e[t]===i&&(o?e[t]=r:delete e[t]),a!==r&&(a=r,Object.setPrototypeOf(i,r||Function))}}const Yr="thino_view";class Sqe{static[Symbol.hasInstance](t){return t instanceof A.TFile}path="/fake-file-that-generated-for-thino.png";basename="fake-file-that-generated-for-thino";extension="png";deleted=!1;name="fake-file-that-generated-for-thino.png";parent=null;stat;vault=null;constructor(){}setPath(t){}getNewPathAfterRename(t){}getShortName(){}cache(t){}updateCacheLimit(){}}class Hd extends A.ItemView{scope=new A.Scope(this.app.scope);root;mobileHeaderRoot;plugin;memosComponent;rootList=[];editor=null;navigation=!1;file=this.app.vault.getMarkdownFiles()[0]||new Sqe;constructor(t,n){super(t),this.plugin=n,this.registerScope()}getDisplayText(){return"Thino"}getIcon(){return"Memos"}getViewType(){return Yr}getMode(){return"source"}canToggleBacklinks(){return!1}registerScope(){const{scope:t}=this;t.register(["Mod"],"Enter",()=>{}),t.register([],"i",n=>{const r=n.target;r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.hasClass("cm-line")||r.hasClass("cm-content")||(n.preventDefault(),this.plugin.app.workspace.trigger("focus-on-textarea"))}),t.register(["Mod"],"f",n=>{const r=n.target;r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.hasClass("cm-line")||r.hasClass("cm-content")||(n.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),t.register([],"o",n=>{const r=n.target;r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.hasClass("cm-line")||r.hasClass("cm-content")||(n.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),t.register([],"Escape",()=>{this.plugin.app.vault.config?.vimMode===!0||setTimeout(()=>{this.plugin.app.workspace.trigger("blur-on-memos")},20)})}handleUpdateInstance=t=>{this.editor=t.editor};async onFileDeleted(t){const n=xd(t,"day"),r=t.path.contains(".thino")&&t.path.contains(".canvas"),o=t.path.contains(".thino")&&t.path.contains(".md"),a=this.plugin.settings?.MemoOtherSaveLocation.MemoDefaultMultiFilePath||"Thino",i=(t.parent?.path||t.path)?.contains(a?.trim());(n||r&&this.plugin.settings.EnabledLocationList.find(u=>u.value==="CANVAS"))&&(await le.removeMemosInFile(t),le.updateTagsState()),i&&this.plugin.settings.EnabledLocationList.find(u=>u.value==="MULTI")&&(await le.removeMemosInFile(t,a),le.updateTagsState()),o&&this.plugin.settings.EnabledLocationList.find(u=>u.value==="FILE")&&(await le.removeMemosInFile(t),le.updateTagsState());const s=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForMultiTypeFiles),l=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForFileTypeFiles);!i&&s&&(await le.updateMemosInFile(t,a),le.updateTagsState()),!o&&l&&(await le.updateMemosInFile(t),le.updateTagsState())}async onFileModified(t){if(Ge.getState().changedByMemos){Ge.setChangedByMemos(!1);return}const n=xd(t,"day"),r=t.path.contains(".thino")&&t.path.contains(".canvas"),o=t.path.contains(".thino")&&t.path.contains(".md"),a=this.plugin.settings?.MemoOtherSaveLocation.MemoDefaultMultiFilePath||"Thino",i=t.parent.path.contains(a?.trim()),s=le.getState().preparingUpdateMemo&&le.getState().preparingUpdateMemo.length>0;if((n||r&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="CANVAS"))&&!s){await le.updateMemosInFile(t),le.updateTagsState();return}i&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="MULTI")&&(await le.updateMemosInFile(t,a),le.updateTagsState()),o&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="FILE")&&(await le.updateMemosInFile(t),le.updateTagsState());const l=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForMultiTypeFiles),u=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForFileTypeFiles);!i&&l&&(await le.updateMemosInFile(t,a),le.updateTagsState()),!o&&u&&(await le.updateMemosInFile(t),le.updateTagsState())}async onFileCreated(t){if(this.app.workspace.layoutReady&&this.root){const n=xd(t,"day"),r=t.path.contains(".thino")&&t.path.contains(".canvas"),o=t.path.contains(".thino")&&t.path.contains(".md"),a=this.plugin.settings?.MemoOtherSaveLocation.MemoDefaultMultiFilePath||"Thino",i=t.parent.path.contains(a?.trim()),s=le.getState().preparingUpdateMemo&&le.getState().preparingUpdateMemo.length>0;if(n&&!s){await Ze.updateDailyNotes(t,!1),await le.updateMemosInFile(t),le.updateTagsState();return}if(r&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="CANVAS")){await le.updateMemosInFile(t),le.updateTagsState();return}i&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="MULTI")&&(await le.updateMemosInFile(t,a),le.updateTagsState()),o&&this.plugin.settings.EnabledLocationList.find(f=>f.value==="FILE")&&(await le.updateMemosInFile(t),le.updateTagsState());const l=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForMultiTypeFiles),u=A.getAllTags(this.app.metadataCache.getFileCache(t))?.contains(this.plugin.settings.TagForFileTypeFiles);!i&&l&&(await le.updateMemosInFile(t,a),le.updateTagsState()),!o&&u&&(await le.updateMemosInFile(t),le.updateTagsState())}}async onFileRenamed(t,n){t instanceof A.TFile&&(await le.removeThinosByPath(n),await this.onFileCreated(t))}async onResize(){super.onResize();const t=this.leaf;if(t&&t.height!==0){if(t.view.containerEl.toggleClass("tiny-view",t.width<600),t.view.containerEl.toggleClass("waterfall-small-group",t.width<1300),t.width>1100){t.view.containerEl.classList.toggle("mobile-view",!1),Ge.setIsMobileView(t.width<=1100);return}if(this.plugin.settings?.ShowLeftSideBar&&!A.Platform.isMobile)return;t.view.containerEl.classList.toggle("mobile-view",!0),Ge.setIsMobileView(t.width<=1100)}}appendToHeader(){if(this.plugin.settings.useMobileViewDefaultHeader){this.containerEl.toggleClass("using-default-header",!0);return}const t=this.leaf.view.titleContainerEl;t&&(this.mobileHeaderRoot=Sa.createRoot(t),this.mobileHeaderRoot.render(g.jsx(_.StrictMode,{children:g.jsx(Ea,{store:Se,context:it,children:g.jsx(ab,{})})})))}appendRoot({root:t,canvas:n}){this.rootList.push({root:t,canvas:n})}updateCacheDebounced=A.debounce(async t=>{this.app.vault.getFileByPath(t.path)&&await le.updateMemosInFile(t)},1e3);registerPatchWorkspaceLeaf(){const t=this;this.register(Ep(A.Workspace.prototype,{getActiveViewOfType:n=>function(r){const o=n.call(this,r);if(!o&&r?.VIEW_TYPE==="markdown"){const a=this.activeLeaf;if(a?.view instanceof Hd)return a.view}return o},setActiveLeaf:n=>function(r,o){if(qK(r)&&(n.call(this,r,o),r.activeTime=17e11),n.call(this,r,o),r.view instanceof Hd){const a=Ge.getState().instanceList.get(r.id);if(!a)return;t.app.workspace.activeEditor=a.owner,r.view.editor=a.editor}},getActiveFile:n=>function(){const r=n.call(this);return this.activeLeaf?.view instanceof Hd&&t.file||r}}))}debounceTemplateExecution=A.debounce(async()=>{this.app.workspace.trigger("templater:all-templates-executed")},1e3);async registerEventList(){await this.onResize(),this.onFileCreated=this.onFileCreated.bind(this),this.onFileDeleted=this.onFileDeleted.bind(this),this.onFileModified=this.onFileModified.bind(this),this.registerEvent(this.app.vault.on("create",this.onFileCreated)),this.registerEvent(this.app.vault.on("delete",this.onFileDeleted)),this.registerEvent(this.app.vault.on("modify",A.debounce(this.onFileModified,2e3,!0))),this.registerEvent(this.app.vault.on("rename",this.onFileRenamed.bind(this))),this.registerEvent(this.app.workspace.on("active-leaf-change",t=>{t?.view?.getViewType()==="canvas"&&yqe(t)})),this.registerEvent(this.app.metadataCache.on("changed",(t,n,r)=>{if(le.getState().preparingUpdateMemo&&le.getState().preparingUpdateMemo.length>0){this.debounceTemplateExecution();return}if(!le.initialized)return;xd(t,"day")&&this.updateCacheDebounced(t)})),this.registerEvent(this.app.workspace.on("templater:all-templates-executed",async()=>{await le.finishWaitingForTemplaterThinos()}))}async onOpen(){this.navigation=this.plugin.settings.navigation,A.Platform.isTablet&&document.body.toggleClass("is-tablet",!0),A.Platform.isMobile&&!A.Platform.isTablet&&this.appendToHeader(),await this.registerEventList(),this.registerPatchWorkspaceLeaf();try{this.root=Sa.createRoot(A.Platform.isDesktop?this.containerEl:this.contentEl),Ze.setView(this),this.root.render(g.jsx(_.StrictMode,{children:g.jsx(vqe,{app:this.plugin.app})}))}catch(t){console.error(t)}}onunload(){super.onunload(),this.root.unmount(),this.mobileHeaderRoot?.unmount(),this.rootList.forEach(t=>{t?.root?.unmount(),t?.canvas?.thinoBtn&&(t.canvas.thinoBtn=void 0),t?.canvas?.wrapperEl.find(".thino-canvas-menu-btn")&&t.canvas.wrapperEl.find(".thino-canvas-menu-btn").detach()})}}class Tqe extends A.EditorSuggest{root;editor;cursor;plugin;memos=[];constructor(t,n){super(t),this.plugin=n,this.memos=le.getState().memos.filter(r=>!r.deletedAt&&r.rowStatus!=="ARCHIVED")}checkInMemosView(t){const n=t.containerEl;return n&&n.parentElement?.parentElement?.classList.contains("common-editor-inputer")||!1}fuzzySearchItemsOptimized(t,n){const r=A.prepareFuzzySearch(t);return n.map(o=>{const a=r(o.content);return a?{item:o,match:a}:null}).filter(Boolean)}onTrigger(t,n){if(!this.checkInMemosView(n))return null;const o=n.getLine(t.line).slice(0,t.ch);if(o.lastIndexOf("~")===-1)return null;const a=o.slice(o.lastIndexOf("~")+1,t.ch);if(o[o.lastIndexOf("~")-1]!==" "&&o.lastIndexOf("~")!==0)return null;const i=a.trim();return this.memos=le.getState().memos.filter(s=>!s.deletedAt&&s.rowStatus!=="ARCHIVED"),{start:{line:t.line,ch:t.ch-i.length},end:t,query:i}}getSuggestions(t){return t.query?this.fuzzySearchItemsOptimized(t.query,this.memos).sort((r,o)=>o.match.score-r.match.score).map(r=>r.item).map(r=>({time:r.createdAt,id:r.id,content:r.content})):this.memos.map(r=>({time:r.createdAt,id:r.id,content:r.content}))}renderSuggestion(t,n){n.toggleClass("thino-suggestion",!0),n.createEl("div",{cls:"thino-suggestion-time",text:t.time}),n.createEl("div",{cls:"thino-suggestion-container"}).createEl("div",{cls:"thino-suggestion-content",text:t.content})}async addBlockRefToMemo(t,n){await Zo(t,{id:t.id,hasId:n})}selectSuggestion(t){const n=le.getMemoById(t.id);if(!n){this.context.editor.replaceRange("MARK: [@THINO]("+t.id+")",{line:this.context.end.line,ch:this.context.start.ch-1},this.context.end);return}n.sourceType==="DAILY"&&n.path?(this.context.editor.replaceRange("MARK: [@THINO]("+t.id+")",{line:this.context.end.line,ch:this.context.start.ch-1},this.context.end),this.handleDailyNoteMemo(n,t)):this.context.editor.replaceRange("MARK: [@THINO]("+t.id+")",{line:this.context.end.line,ch:this.context.start.ch-1},this.context.end)}async handleDailyNoteMemo(t,n){if(!t.path)return;const r=this.app,o=r.vault.getAbstractFileByPath(t.path);if(!(o instanceof A.TFile))return;let a=t.hasId;a||(a=je.randomId(6),await this.addBlockRefToMemo(t,a));const i=this.context.editor,s=i.getLine(this.context.end.line),l=`MARK: [@THINO](${n.id})`;if(s.includes(l)){const u=s.indexOf(l),f=r.fileManager.generateMarkdownLink(o,"","#^"+a,n.id);i.replaceRange(`MARK: ${f}`,{line:this.context.end.line,ch:u},{line:this.context.end.line,ch:u+l.length})}}}class xqe extends A.EditorSuggest{root;editor;cursor;plugin;constructor(t,n){super(t),this.plugin=n,this.suggestEl.toggleClass("thino-date-selector",!0)}checkInMemosView(t){const n=t.containerEl;return n&&n.parentElement?.parentElement?.classList.contains("common-editor-inputer")||!1}onTrigger(t,n){const o=n.getLine(t.line)[t.ch-1];return this.checkInMemosView(n)&&o==="@"?(this.cursor=t,this.editor=n,A.Platform.isMobile?(new o6(this.app,"text",a=>{this.selectSuggestion(parseInt(a),new MouseEvent("click"))}).open(),null):{start:{line:t.line,ch:t.ch-1},end:t,query:""}):null}getSuggestions(){return[parseInt(A.moment().startOf("day").format("x"))]}renderSuggestion(t,n){n.empty(),this.root=Sa.createRoot(n),this.root.render(g.jsx(_.StrictMode,{children:g.jsx(a0,{className:"editor-date-picker",datestamp:t,handleDateStampChange:this.selectSuggestion.bind(this)})}))}selectSuggestion(t,n){if(n instanceof KeyboardEvent||n instanceof PointerEvent&&!n.target.closest(".day-item"))return;this.app.workspace.getLeavesOfType("thino_view")[0]?.view?.contentEl.find(".action-btn.list-or-task.list")?.click();let o="",a="";switch(this.plugin.settings.InsertDateFormat){case"Dataview":o="[due:: ",a="]";break;case"Tasks":o="📅 ";break}this.editor.replaceRange(o+A.moment(t).format("YYYY-MM-DD")+a,{line:this.cursor.line,ch:this.cursor.ch-1},this.cursor),this.root?.unmount(),this.close()}}const c9={Memos:'<svg t="1641348507339" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2120" width="100" height="100"><path d="M126.692653 478.099639l-90.757281 0c-19.019408 0-34.437336 15.423923-34.437336 34.417356 0 18.992434 15.416929 34.477297 34.437336 34.477297l90.757281 0c19.013414 0 34.42335-15.484863 34.42335-34.477297C161.116003 493.523561 145.706067 478.099639 126.692653 478.099639zM244.662333 243.526943c13.742566-13.110184 14.310011-34.948836 1.185841-48.706388l-62.644762-65.668806c-13.128167-13.762547-34.974811-14.229091-48.717377-1.118906s-14.261059 34.911872-1.132893 48.674419l62.644762 65.668806C209.123074 256.13262 230.919767 256.637127 244.662333 243.526943zM543.066631 957.422083l-60.603757 0c-18.654764 0-33.794964 15.147193-33.794964 33.862898 0 18.661757 15.1402 32.71502 33.794964 32.71502l60.603757 0c18.654764 0 33.794964-14.053262 33.794964-32.71502C576.861595 972.568277 561.721395 957.422083 543.066631 957.422083zM988.076617 479.050709l-90.757281 0c-19.019408 0-34.437336 15.423923-34.437336 34.417356s15.416929 34.477297 34.437336 34.477297l90.757281 0c19.013414 0 34.42335-15.484863 34.42335-34.477297S1007.09003 479.050709 988.076617 479.050709zM512.268737 192.765564c-172.737143 0-312.75527 150.079292-312.75527 322.746503 0 125.630192 74.080583 233.957298 180.936128 283.703669l0 84.51838c0 16.762614 15.410935 31.35435 34.42335 31.35435 0.598415 0 1.193833-0.014985 1.785255-0.042958 0.618395 0.026974 1.239788 0.042958 1.867175 0.042958l187.479731 0c5.905227 0 11.455802-1.220807 16.288078-3.477601 12.231044-4.657447 20.795671-15.383962 20.795671-27.87575l0-84.052835c107.391021-49.534578 181.935151-158.147405 181.935151-284.168214C825.024007 342.843857 684.997888 192.765564 512.268737 192.765564zM574.863548 742.713968l0 80.17063c0 3.159911-0.221783 5.976158-0.642372 8.496694l0 19.092336-124.910895 0 0-17.71768c-0.423586-2.856208-0.642372-6.123015-0.642372-9.870351l0-80.443363c-99.204024-27.75387-171.970892-118.821847-171.970892-226.930167 0-130.094827 105.4689-245.507007 235.571719-245.507007s235.563727 115.41218 235.563727 245.507007C747.832465 623.984031 674.578074 715.293772 574.863548 742.713968zM895.407204 129.328576c-13.429872-13.429872-35.233558-13.439862-48.677416 0.004995l-64.174267 64.175266c-13.448853 13.448853-13.443858 35.257534-0.013986 48.687406 13.429872 13.429872 35.281511 13.477825 48.730364 0.028972l64.175266-64.175266C908.889025 164.605092 908.837076 142.758448 895.407204 129.328576zM511.796199 159.617967c18.992434 0 34.417356-15.410935 34.417356-34.42335l0-90.757281c0-19.019408-15.423923-34.437336-34.417356-34.437336-18.992434 0-34.477297 15.416929-34.477297 34.437336l0 90.757281C477.317903 144.208031 492.802766 159.617967 511.796199 159.617967z" fill="currentColor" p-id="2121"></path></svg>'};function Iqe(){Object.keys(c9).forEach(e=>{A.addIcon(e,c9[e])})}const lh=typeof Buffer=="function",u9=typeof TextDecoder=="function"?new TextDecoder:void 0,d9=typeof TextEncoder=="function"?new TextEncoder:void 0,kqe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Cp=Array.prototype.slice.call(kqe),Ry=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(Cp),Eqe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xr=String.fromCharCode.bind(String),f9=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Cqe=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),NU=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Mqe=e=>{let t,n,r,o,a="";const i=e.length%3;for(let s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,a+=Cp[t>>18&63]+Cp[t>>12&63]+Cp[t>>6&63]+Cp[t&63]}return i?a.slice(0,i-3)+"===".substring(i):a},OU=typeof btoa=="function"?e=>btoa(e):lh?e=>Buffer.from(e,"binary").toString("base64"):Mqe,Dqe=lh?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,o=e.length;r<o;r+=4096)n.push(xr.apply(null,e.subarray(r,r+4096)));return OU(n.join(""))},Aqe=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?xr(192|t>>>6)+xr(128|t&63):xr(224|t>>>12&15)+xr(128|t>>>6&63)+xr(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return xr(240|t>>>18&7)+xr(128|t>>>12&63)+xr(128|t>>>6&63)+xr(128|t&63)}},Nqe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Oqe=e=>e.replace(Nqe,Aqe),h9=lh?e=>Buffer.from(e,"utf8").toString("base64"):d9?e=>Dqe(d9.encode(e)):e=>OU(Oqe(e)),Mp=(e,t=!1)=>t?Cqe(h9(e)):h9(e),Pqe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jqe=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return xr((n>>>10)+55296)+xr((n&1023)+56320);case 3:return xr((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xr((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Lqe=e=>e.replace(Pqe,jqe),Rqe=e=>{if(e=e.replace(/\s+/g,""),!Eqe.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,o;for(let a=0;a<e.length;)t=Ry[e.charAt(a++)]<<18|Ry[e.charAt(a++)]<<12|(r=Ry[e.charAt(a++)])<<6|(o=Ry[e.charAt(a++)]),n+=r===64?xr(t>>16&255):o===64?xr(t>>16&255,t>>8&255):xr(t>>16&255,t>>8&255,t&255);return n},PU=typeof atob=="function"?e=>atob(NU(e)):lh?e=>Buffer.from(e,"base64").toString("binary"):Rqe,Fqe=lh?e=>f9(Buffer.from(e,"base64")):e=>f9(PU(e).split("").map(t=>t.charCodeAt(0))),Hqe=lh?e=>Buffer.from(e,"base64").toString("utf8"):u9?e=>u9.decode(Fqe(e)):e=>Lqe(PU(e)),Bqe=e=>NU(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),p9=e=>Hqe(Bqe(e));class _qe extends A.Modal{plugin;settingTab;LocationList;target="";insertTarget="";verified;constructor(t,n,r,o,a){super(t),this.verified=a,this.app=t,this.settingTab=n,this.plugin=r,this.LocationList=o,this.target=o.target!=="ProcessEntriesBelow"?r.settings.MemoOtherSaveLocation[o.target]:r.settings[o.target],this.insertTarget=r.settings.InsertAfter}updateValue=A.debounce(t=>{this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"?this.target=t.trim()===""?"basic":t.trim():this.target=t.trim()===""&&this.LocationList.value==="MULTI"?"Memos":t.trim()},400,!0);onOpen(){this.display()}debounceDisplay=A.debounce(()=>this.display(),400,!0);async display(){const{contentEl:t}=this;this.contentEl.empty(),t.parentElement?.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(I("Save type for Thino")+` [${I(this.LocationList.value)}]`),(this.LocationList.value==="FILE"||this.LocationList.value==="CANVAS")&&t.createDiv("modal-desc",s=>{s.setText(I('You can set folder name with file name like "folder/file"'))}),this.LocationList.value==="MULTI"&&t.createDiv("modal-desc",s=>{s.setText(I('You can set folder name like "folder1/folder2/folder3" to create sub-folder'))}),this.LocationList.value==="DAILY"&&t.createDiv("modal-desc",s=>{s.setText(I('You can set target heading like "# Heading" to control data location'))});const n=t.createDiv("modal-setting"),r=this.LocationList.value==="DAILY"?I("Process Memos below"):this.LocationList.value==="MULTI"?I("Set the folder name"):I("Set the filename");if(this.LocationList.value==="DAILY"&&(new De(n,this.settingTab).setName(I("Set thino insert place")).setDesc(I("Set where to insert thino content")).addDropdown(async s=>{s.addOption("end",I("End of the diary")),s.addOption("custom",I("Custom location")),s.setValue(this.plugin.settings.InsertType).onChange(async l=>{this.plugin.settings.InsertType=l,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.InsertType==="custom"&&await this.addDailySettings(n),new De(n,this.settingTab).setName(I("Set process target")).setDesc(I("You can set whole diary or only part of it")).addDropdown(async s=>{s.addOption("custom",I("Custom")),s.addOption("whole",I("Whole diary")),s.setValue(this.plugin.settings.ProcessContentTarget).onChange(async l=>{this.plugin.settings.ProcessContentTarget=l,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})})),this.LocationList.value!=="DAILY"||this.plugin.settings.ProcessContentTarget!=="whole"){const s=new De(n,this.settingTab).setName(r).addText(l=>l.setPlaceholder(this.LocationList.value==="DAILY"?I("# Heading"):I("Set the filename for current location file")).setValue(this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"?this.target.replace(/\.thino\.(canvas|md)/g,""):this.target).onChange(async u=>{const f=this.LocationList.value==="CANVAS"?".thino.canvas":this.LocationList.value==="FILE"?".thino.md":"";this.updateValue(u.replace(/\.thino\.(canvas|md)/g,"")+f)}));this.LocationList.value==="DAILY"&&s.setDesc(I("If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.")),this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"&&s.controlEl.createEl("span",{text:`${this.LocationList.value==="FILE"?".thino.md":".thino.canvas"}`})}this.LocationList.value==="MULTI"&&new De(n,this.settingTab).setName(I("Set file name after create thino")).setDesc(I("You can set file name after create thino. A input box will show when you create thino.")).addToggle(s=>{s.setValue(this.plugin.settings.SetFileNameAfterCreate).onChange(async l=>{this.plugin.settings.SetFileNameAfterCreate=l,this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="FILE"&&new De(n,this.settingTab).setName(I("Set tag for file type file")).setDesc(I("When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.")).addText(s=>{new Zp(s.inputEl,l=>{this.plugin.settings.TagForFileTypeFiles=l.trim(),this.settingTab.debounceApplySettingsUpdate()}),s.setPlaceholder(I("Please input the tag")).setValue(this.plugin.settings.TagForFileTypeFiles).onChange(async l=>{this.plugin.settings.TagForFileTypeFiles=l.trim(),this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="MULTI"&&(new De(n,this.settingTab).setName(I("Set tag for multi type file")).setDesc(I("When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.")).addText(s=>{new Zp(s.inputEl,l=>{this.plugin.settings.TagForMultiTypeFiles=l.trim(),this.settingTab.debounceApplySettingsUpdate()}),s.setPlaceholder(I("Please input the tag")).setValue(this.plugin.settings.TagForMultiTypeFiles).onChange(async l=>{this.plugin.settings.TagForMultiTypeFiles=l.trim(),this.settingTab.debounceApplySettingsUpdate()})}),new De(n,this.settingTab).setName(I("Ignore folders for multi type")).setDesc(I("Set folders to ignore when using multi type. Separate multiple folders with comma (,).")).addText(s=>{s.setPlaceholder(I("folder1,folder2/subfolder")).setValue(this.plugin.settings.IgnoreFolderForMultiType.join(",")).onChange(async l=>{this.plugin.settings.IgnoreFolderForMultiType=l.split(",").map(u=>u.trim()).filter(u=>u!==""),this.settingTab.debounceApplySettingsUpdate()})}));const o=t.createDiv("button-group"),a=o.createEl("button",{text:I("Cancel")}),i=o.createEl("button",{text:I("Save")});i.onclick=async()=>{if(!this.verified&&this.LocationList.value!=="DAILY"){this.close(),It();return}this.LocationList.target!=="ProcessEntriesBelow"?this.plugin.settings.MemoOtherSaveLocation[this.LocationList.target]=this.target:this.plugin.settings[this.LocationList.target]=this.target,this.LocationList.value==="MULTI"&&je.checkDailyInMulti(this.plugin.settings),this.LocationList.target==="ProcessEntriesBelow"&&(this.plugin.settings.InsertAfter=this.insertTarget),this.settingTab.applySettingsUpdate(),setTimeout(()=>{le.updateTypeMemos(this.LocationList.value)},1e3),this.close()},a.onclick=async()=>{this.close()}}async addDailySettings(t){const n=Ze.getState().verifyState,r=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),o=A.Platform.isDesktop?await pn():r.identifier||r.uuid,a=n&&n?.appId===o,i=(this.plugin.settings?.DifferentInsertTarget?`[${I("List")}] `:"")+I("Insert after heading");new De(t,this.settingTab).setName(i).setDesc(I("If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")).addText(s=>s.setPlaceholder(I("# Heading")).setValue(this.insertTarget).onChange(async l=>{this.insertTarget=l})),this.plugin.settings?.DifferentInsertTarget&&new De(t,this.settingTab).setName((this.plugin.settings?.DifferentInsertTarget?`[${I("Task")}] `:"")+I("Insert after heading")).setDesc(I("Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")).addText(s=>{s.setPlaceholder(I("# Heading")).setValue(this.plugin.settings.InsertAfterForTask).onChange(async l=>{this.plugin.settings.InsertAfterForTask=l,this.settingTab.applySettingsUpdate()})}),new De(t,this.settingTab).setName(I("Different insert target for different type")).setDesc(I("Toggle this to set different insert target for different type of thino, like task or list type of thino")).addToggle(s=>s.setValue(this.plugin.settings.DifferentInsertTarget).onChange(async l=>{if(!a){It();return}this.plugin.settings.DifferentInsertTarget=l,this.settingTab.applySettingsUpdate(),this.debounceDisplay()}))}onClose(){const{contentEl:t}=this;t.empty()}}const fI=A.Platform.isDesktop&&require("os");class XE{plugin;secretKey;constructor(t){this.plugin=t,this.secretKey=this.generateSecretKey()}async getDeviceId(){let t="";if(A.Platform.isDesktop)t=await pn();else{const n=await window.Capacitor?.Plugins.Device.getId();t=n.identifier||n.uuid}return t}async getSystemInfo(){const t=await this.getDeviceId();let n;if(fI)n=JSON.stringify({hostname:fI.hostname(),platform:fI.platform(),machineid:t});else{const r=await window.Capacitor?.Plugins.Device.getInfo(),o=r?.model,a=r?.platform;n=JSON.stringify({hostname:o||("mobile"+A.Platform.isMobile?Math.random().toString(36).substring(7):""),platform:a||"mobile",machineid:t})}return Mp(n)}generateSecretKey(){const t=this.plugin.manifest.version;return Mp(`thino-api-secret-${t}`)}generateSignature(t,n){const r=`${t}-${n}-${this.secretKey}`;let o=0;for(let a=0;a<r.length;a++){const i=r.charCodeAt(a);o=(o<<5)-o+i,o&=o}return Mp(Math.abs(o).toString(36))}async generateToken(t=1){try{const n=await this.getDeviceId(),r=Date.now(),o=await this.getSystemInfo(),a=this.generateSignature(o,r),i={appId:n,timestamp:r,signature:a,version:this.plugin.manifest.version,expiryHours:t};return Mp(JSON.stringify(i))}catch(n){throw console.error("Failed to generate token:",n),new Error("Token generation failed")}}async validateToken(t){try{if(!t)return!1;const n=JSON.parse(p9(t)),r=await this.getDeviceId();if(n.appId!==r)return console.warn("Token validation failed: Invalid app ID"),!1;const a=Date.now()-n.timestamp,i=(n.expiryHours||1)*60*60*1e3;if(a>i)return console.warn("Token validation failed: Token expired"),!1;if(n.version!==this.plugin.manifest.version)return console.warn("Token validation failed: Version mismatch"),!1;const s=await this.getSystemInfo(),l=this.generateSignature(s,n.timestamp);return n.signature!==l?(console.warn("Token validation failed: Invalid signature"),!1):!0}catch(n){return console.error("Token validation error:",n),!1}}async isUserVerified(){try{const t=await this.getDeviceId();return!!this.plugin.settings.tokenForVerify[t]}catch(t){return console.error("User verification check failed:",t),!1}}async getTokenInfo(t){try{return JSON.parse(p9(t))}catch(n){return console.error("Failed to parse token info:",n),null}}async generateAuthHeader(t=1){return`Bearer ${await this.generateToken(t)}`}extractTokenFromHeader(t){return!t||!t.startsWith("Bearer ")?null:t.substring(7)}}const hI=A.Platform.isDesktop&&require("os"),jU=async()=>{let e="";if(A.Platform.isDesktop)e=await pn();else{const r=await window.Capacitor?.Plugins.Device.getId();e=r.identifier||r.uuid}let t;if(hI)t=JSON.stringify({hostname:hI.hostname(),platform:hI.platform(),machineid:e});else{const r=await window.Capacitor?.Plugins.Device.getInfo(),o=r?.model,a=r?.platform;t=JSON.stringify({hostname:o||("mobile"+A.Platform.isMobile?Math.random().toString(36).substring(7):""),platform:a||"mobile",machineid:e})}return Mp(t)},Yqe=async()=>{let e="";if(A.Platform.isDesktop)e=await pn();else{const t=await window.Capacitor?.Plugins.Device.getId();e=t.identifier||t.uuid}return e},zqe={General:"chef-hat",Thino:"Memos",Interface:"brush",Share:"share-2",Advanced:"cog",About:"info",Blank:"home",Editor:"edit",Tasks:"check-square",Pro:"diamond"},Uqe=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"},{value:"CANVAS",target:"MemoDefaultCanvasPath"},{value:"MULTI",target:"MemoDefaultMultiFilePath"},{value:"FILE",target:"MemoDefaultSingleFilePath"}],zo={FirstLoaded:!0,StartDate:"Sunday",InsertAfter:"",UserName:"THINO 😉",ProcessEntriesBelow:"",Language:"en",SaveMemoButtonLabel:"NOTE",SaveMemoButtonIcon:"",ShareFooterStart:"{ThinoNum} Thino {UsedDay} Day",ShareFooterEnd:"✍️ by {UserName}",DefaultPrefix:"List",DefaultTimePrefix:"HH:mm",UseDailyOrPeriodic:"Daily",InsertDateFormat:"Tasks",DefaultEditorLocation:"Top",UseButtonToShowEditor:!1,FocusOnEditor:!0,OpenDailyMemosWithMemos:!0,HideDoneTasks:!1,ShowTaskLabel:!0,AppendDateWhenTaskDone:!1,MobileAndDesktop:"All",OpenMemosAutomatically:!1,ShowScrollbar:!1,ShowTime:!0,ShowDate:!0,AddBlankLineWhenDate:!1,AutoSaveWhenOnMobile:!1,DeleteFileName:"delete",QueryFileName:"query",UseVaultTags:!1,SetCustomBackgroundImage:!1,SetCustomMemoFooter:!1,DefaultLightBackgroundImage:"",DefaultDarkBackgroundImage:"",DefaultLightBackgroundImageForClean:"",DefaultDarkBackgroundImageForClean:"",DefaultMemoComposition:"{TIME} {CONTENT}",CommentOnMemos:!1,CommentsInOriginalNotes:!1,FetchMemosMark:"#memo",FetchMemosFromNote:!1,ShowCommentOnMemos:!1,ShowLeftSideBar:!1,MemoListView:"list",MemoSaveLocation:"DAILY",MemoOtherSaveLocation:{MemoDefaultCanvasPath:"basic.thino.canvas",MemoDefaultMultiFilePath:"Thino",MemoDefaultSingleFilePath:"basic.thino.md"},MemoDailyTarget:5,HeatmapColorScheme:"default",EnabledHttpApi:!1,HttpApiIpType:"127.0.0.1",HttpApiPort:"43999",AutoDownloadImage:!1,EditorType:"obsidian",EnabledLocationList:[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"}],DeleteThinoDirectly:!1,CaptureKey:{EnableCaptureKey:!1,OpenThinoGlobally:"CommandOrControl+Shift+T",ShowNearMouse:!1},startSync:!1,tokenForVerify:{},saveThinoType:"FILE",showDayMark:!1,dayMarkRange:"day",navigation:!1,password:"",needVerify:!1,addTagAutomatically:!1,addTagPosition:"End",addTagWithNewline:!1,chatViewStyle:"default",MomentsBackgroundImage:"https://images.pexels.com/photos/531767/pexels-photo-531767.jpeg",MomentsIcon:"https://images.pexels.com/photos/256514/pexels-photo-256514.jpeg",MomentsQuote:"Share your thino with the world",DefaultThemeForThino:"modern",LastUpdatedVersion:"0.0.0",ShareToThinoWithText:!1,ShareToThinoWithTextAppend:"",ShareToThinoWithTextPrepend:"",ShareToThinoWithTextNewline:"none",hidePinnedGroup:!1,DifferentInsertTarget:!1,InsertAfterForTask:"",ProcessContentTarget:"custom",InsertType:"custom",ShareAppendType:"preset",SharePrependType:"preset",SetFileNameAfterCreate:!1,TagForFileTypeFiles:"thino/file",TagForMultiTypeFiles:"thino/multi",MinHeightForShare:"200px",ThinoMaxHeight:0,ThinoCollapsedHeight:100,OptimizeForCallout:!0,AppendOrPrependTextViaServer:!1,AppendViaServer:"",PrependViaServer:"",WithNewLineViaServer:"none",SupportSelectOtherView:!1,WaitTemplaterToFinishParse:!1,NavbarButton:!1,AlwaysShowStatusText:!1,FilterByMetadata:!1,ShowSourcePath:!1,ShowUpdateMessage:!0,SyncManually:!1,MemoFixedPrefix:"",MemoFixedSuffix:"",UseMemoFixedStrings:!1,enableWordCount:!1,maxWordCount:0,enableReferenceLinksGroup:!1,doubleClickBehavior:"edit-thino",useMobileViewDefaultHeader:!1,IgnoreFolderForMultiType:[],UseBlockLinkWhenDragging:!1,ShowScrollToTopButton:!0,ZoomImageWhenViewing:!1,ViewArchiveInRandomReview:!1,DraggingBehavior:"block-link"};function Vqe({plugin:e}){const{dailyNotesState:{verifyState:t}}=D.useContext(it),[n,r]=D.useState(!1),[o,a]=D.useState(!1),[i,s]=D.useState(""),[l,u]=D.useState("");D.useEffect(()=>{Yqe().then(p=>{u(p)})},[]);const f=async()=>{const p=i,m=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),w=A.Platform.isDesktop?await pn():m.identifier||m.uuid;p&&(e.settingTab.updateSettings("tokenForVerify",{...e.settings.tokenForVerify,[w]:p}),e.verify().then(b=>{b&&(r(!0),Ge.setRefresh(!0),setTimeout(()=>{e.settingTab.display()},200),e.registerToolbarCheck()),new A.Notice(I(b?"Verify successfully":"Failed to verify"))}).catch(b=>{new A.Notice(I("Failed to verify"))}))},h=async p=>{s(p)};return g.jsx("div",{className:"thino-verify-component",children:t?g.jsxs("div",{className:"thino-verify-content verified",children:[g.jsx("div",{className:"thino-verified-text",children:I("You have verified your account. Congrats!")}),g.jsx("div",{className:"thino-description-link",children:g.jsxs("p",{children:[I("If you have any questions, please contact us."),g.jsx("span",{className:"thino-url",onClick:()=>{const p=localStorage.getItem("language");p&&(p==="zh"||p==="zh-TW")?window.open("https://pkmer.cn","_blank"):window.open("https://thino.pkmer.net/en/","_blank")},children:"@ PKMer"})]})})]}):g.jsxs("div",{className:"thino-verify-content",children:[g.jsxs("div",{className:"thino-description-link",children:[I("You can buy a license from")+"->",g.jsxs("span",{className:"thino-url",onClick:()=>{const p=localStorage.getItem("language");p&&(p==="zh"||p==="zh-TW")?window.open("https://pkmer.cn/products/thino","_blank"):window.open("https://thino.pkmer.net/en/#price","_blank")},children:[" ","PKMer"]})]}),g.jsx("textarea",{className:"thino-verify-textarea",value:i,onChange:p=>h(p.target.value),placeholder:I("Input activation code here")}),g.jsxs("div",{className:"thino-button-container",children:[g.jsxs("div",{className:"thino-button-group",children:[!i&&g.jsxs(g.Fragment,{children:[g.jsx("button",{onClick:async()=>{try{const p=await jU();await navigator.clipboard.writeText(p),a(!0)}catch(p){console.error(p),new A.Notice("Failed to copy id");return}new A.Notice(I("Copied to clipboard Successfully"))},children:I("Copy Thino id")}),g.jsx("button",{onClick:()=>{if(!o){new A.Notice(I("Please copy Thino id first"));return}const p=localStorage.getItem("language");p&&(p==="zh"||p==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&getCode","_blank"):window.open("https://pkmer.net/en/userprofile/#tab-21&getCode","_blank"),r(!0)},children:I("Get activation code")})]}),i&&g.jsx("button",{onClick:async()=>{await f()},children:I("Verify")})]}),n?g.jsx("p",{children:I("After you verify your account, please refresh this page.")}):""]}),g.jsxs("div",{className:"thino-description-link",children:[I("If you have any questions, please contact us."),g.jsx("span",{className:"thino-url",onClick:()=>{const p=localStorage.getItem("language");p&&(p==="zh"||p==="zh-TW")?window.open("https://pkmer.cn","_blank"):window.open("https://thino.pkmer.net/en/","_blank")},children:"@ PKMer"})]})]})})}class Wqe extends A.PluginSettingTab{plugin;applyDebounceTimer=0;tabContent=new Map;selectedTab="Blank";search;searchSettingInfo=new Map;searchZeroState;navigateEl;settingsEl;passwordMatched=!1;root;constructor(t,n){super(t,n),this.plugin=n}updateSettings(t,n){this.plugin.settings={...this.plugin.settings,[t]:n},this.applySettingsUpdate()}debounceApplySettingsUpdate=A.debounce(async()=>{await this.plugin.saveSettings()},100,!0);debounceDisplay=A.debounce(async()=>{await this.display()},300,!0);applySettingsUpdate(){this.debounceApplySettingsUpdate(),le.updateTagsState()}async hide(){this.root?.unmount(),this.passwordMatched=!1}async display(){await this.plugin.loadSettings(),this.root&&this.root?.unmount(),this.containerEl.empty(),this.containerEl.toggleClass("memos-settings",!0),A.Platform.isMobile&&this.containerEl.toggleClass("memos-mobile",!0),this.settingsEl?.setAttribute("data-tab-id",this.selectedTab),this.generateSettingsTitle(),this.addTabHeader(),this.searchAndUpdateTabList()}generateSettingsTitle(){new A.Setting(this.containerEl).setName("Thino").setDesc(I("Quick capture tool that allows you to create and manage your ideas, tasks, and more.")).setHeading().addButton(t=>{t.buttonEl.addClass("setting-home-nav-button"),t.setIcon("home"),t.setTooltip("Back to home"),t.onClick(()=>{this.triggerTabChange(null,"Blank")})}).addSearch(t=>{this.search=t,t.setPlaceholder(I("Search all settings")),t.inputEl.oninput=()=>{if(t.inputEl.value===""){this.triggerTabChange(null,"Blank"),this.navigateEl.toggleClass("memos-setting-searching",!1),this.containerEl.toggleClass("setting-searching",!1);return}for(const n of this.tabContent){const r=n[1];r.navButton.removeClass("memos-navigation-item-selected"),r.content.show(),r.heading.show();const o=t.getValue();this.selectedTab==""&&o.trim()!=""&&this.searchSettings(o.toLowerCase()),this.selectedTab=""}this.navigateEl.toggleClass("memos-setting-searching",!0),this.containerEl.toggleClass("setting-searching",!0)},t.onChange(n=>{if(n===""){this.triggerTabChange(null,"Blank"),this.navigateEl.toggleClass("memos-setting-searching",!1),this.containerEl.toggleClass("setting-searching",!1);return}this.searchSettings(n.toLowerCase())})})}addTabHeader(){const t=this.containerEl.createEl("nav",{cls:"memos-setting-header"});this.navigateEl=t.createDiv("memos-setting-tab-group"),this.settingsEl=this.containerEl.createEl("div",{cls:"memos-setting-content",attr:{"data-tab-id":this.selectedTab}}),this.updateOldData(),this.createTabAndContent("General",this.navigateEl,this.settingsEl,(n,r)=>this.generateGeneralSettings(r,n)),this.createTabAndContent("Thino",this.navigateEl,this.settingsEl,(n,r)=>this.generateMemosSettings(r,n)),this.createTabAndContent("Interface",this.navigateEl,this.settingsEl,(n,r)=>this.generateThemeSettings(r,n)),this.createTabAndContent("Editor",this.navigateEl,this.settingsEl,(n,r)=>this.generateEditorSettings(r,n)),this.createTabAndContent("Tasks",this.navigateEl,this.settingsEl,(n,r)=>this.generateTasksSettings(r,n)),this.createTabAndContent("Share",this.navigateEl,this.settingsEl,(n,r)=>this.generateShareSettings(r,n)),this.createTabAndContent("Pro",this.navigateEl,this.settingsEl,(n,r)=>this.customProSettings(r,n)),this.createTabAndContent("Advanced",this.navigateEl,this.settingsEl,(n,r)=>this.generateAdvancedSettings(r,n)),this.createTabAndContent("About",this.navigateEl,this.settingsEl,(n,r)=>this.generateAboutSettings(r,n)),this.createSearchZeroState(this.settingsEl)}searchAndUpdateTabList(){this.checkVerified().then(t=>{t&&this.navEl.toggleClass("thino-pro-activated",!0)})}updateOldData(){this.plugin.settings.UserName.startsWith("MEMO ")&&(this.plugin.settings.UserName="THINO 😉"),this.plugin.settings.ShareFooterStart.contains("{Memo")&&(this.plugin.settings.ShareFooterStart=this.plugin.settings.ShareFooterStart.replace("{MemosNum}","{ThinoNum}").replace("memos","thino")),this.applySettingsUpdate()}triggerTabChange(t,n){if(n==="Blank"){this.selectedTab=n;for(const a of this.tabContent){const i=a[1];i.content.hide(),i.heading.hide()}this.settingsEl?.setAttribute("data-tab-id","Blank"),this.navigateEl.querySelector(".memos-navigation-item-selected")?.toggleClass("memos-navigation-item-selected",!1),this.searchZeroState.hide();return}if(this.selectedTab==n)return;this.settingsEl?.setAttribute("data-tab-id",n);const r=this.navigateEl.querySelector(".memos-navigation-item-selected");if(r&&r.toggleClass("memos-navigation-item-selected",!1),t.toggleClass("memos-navigation-item-selected",!0),(this.tabContent.get(n)?.content).show(),this.selectedTab!=""&&this.selectedTab!=="Blank")(this.tabContent.get(r?.getAttribute("data-tab-id"))?.content).hide();else{this.searchZeroState.hide();for(const a of this.searchSettingInfo)for(const i of a[1])i.containerEl.show();for(const a of this.tabContent){const i=a[1];i.heading.hide(),n!==a[0]&&i.content.hide()}}this.selectedTab=n}async createTabAndContent(t,n,r,o){const a=this.selectedTab===t,i=n.createEl("div",{cls:"memos-navigation-item",attr:{"data-tab-id":t}}),s=await this.checkVerified();A.setIcon(i.createEl("div",{cls:"memos-navigation-item-icon"}),zqe[t]),i.createSpan({text:I(t)},f=>{t==="About"&&f.createEl("span",{cls:["thino-pro-text",s?"thino-pro-activated":""],text:s?` & ${I("Activated Pro")} 💎`:` & ${I("Activate Pro")}`})}),i.onclick=()=>{this.triggerTabChange(i,t)};const l=r.createDiv("memos-tab-settings"),u=l.createEl("h2",{cls:"memos-setting-heading",text:t+" Settings"});u.hide(),l.id=t.toLowerCase().replace(" ","-"),a?i.addClass("memos-navigation-item-selected"):l.hide(),o&&o(l,t),this.tabContent.set(t,{content:l,heading:u,navButton:i})}searchSettings(t){const n=new Set,r=(o,a)=>{o.show(),n.has(a)||n.add(a)};for(const o of this.searchSettingInfo){const a=o[0],i=o[1];for(const s of i)if(t.trim()===""||s.alias?.includes(t)||s.description.includes(t)||s.name.includes(t))r(s.containerEl,a);else if(s.options&&s.options.length>0)for(const l of s.options){if(l.description.toLowerCase().includes(t)||l.name.toLowerCase().includes(t)){r(s.containerEl,a);break}else if(l.options){for(const u of l.options)if(u.description.toLowerCase().includes(t)||u.value.toLowerCase().includes(t)){r(s.containerEl,a);break}}s.containerEl.hide()}else s.containerEl.hide()}for(const o of this.tabContent)n.has(o[0])?o[1].heading.show():o[1].heading.hide();n.size===0?this.searchZeroState.show():this.searchZeroState.hide()}addSettingToMasterSettingsList(t,n,r="",o="",a=[],i=""){const s={containerEl:n,name:r.toLowerCase(),description:o.toLowerCase(),options:a,alias:i};this.searchSettingInfo.has(t)?this.searchSettingInfo.get(t)?.push(s):this.searchSettingInfo.set(t,[s])}createSearchZeroState(t){this.searchZeroState=t.createDiv(),this.searchZeroState.hide(),this.searchZeroState.createEl(A.Platform.isMobile?"h3":"h2",{text:"No settings match search"}).style.textAlign="center"}async checkVerified(){const t=Ze.getState().verifyState,n=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),r=A.Platform.isDesktop?await pn():n.identifier||n.uuid;return t&&t?.appId===r}generateProSettings(t,n){new De(n,this).setClass("thino-pro-setting").setHeading().setName("🏆 "+I("Pro verification status")).setTab(t);const r=document.createDocumentFragment(),o=r.createEl("div",{cls:"thino-activation"}),a=new De(n,this).setName(I("Activate Pro Version")).setClass("thino-pro-setting").setDesc(r).setTab(t);a.settingEl.toggleClass("thino-activation-setting",!0),a.nameEl.toggleClass("thino-activation-title",!0),this.root=Sa.createRoot(o),this.root.render(g.jsx(Ea,{store:Se,context:it,children:g.jsx(Vqe,{plugin:this.plugin})}));let i=!1;new De(n,this).setName(I("Deactivate")).setClass("thino-pro-setting").setTab(t).addButton(s=>{s.setWarning().setButtonText(I("Remove")).onClick(async()=>{if(!i){s.setButtonText(I("Confirm?")),i=!0;return}i=!1;const l=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),u=A.Platform.isDesktop?await pn():l.identifier||l.uuid;this.plugin.settings.tokenForVerify[u]&&(delete this.plugin.settings.tokenForVerify[u],await this.plugin.saveSettings(),new A.Notice(I("Remove successfully"))),await this.plugin.verify(),Ge.setRefresh(!0),setTimeout(()=>{this.display()},20)})})}generateGeneralSettings(t,n){this.customHeading(t,n)}async generateThemeSettings(t,n){const r=await this.checkVerified();await this.customNameAndTheme(t,n,r)}async generateEditorSettings(t,n){this.customEditorSettings(t,n)}async generateTasksSettings(t,n){this.customTasksSettings(t,n)}async generateMemosSettings(t,n){const r=Ze.getState().verifyState,o=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),a=A.Platform.isDesktop?await pn():o.identifier||o.uuid,i=r&&r?.appId===a;this.addMemoSettings(t,n),this.customFileNameSettings(t,n,i),this.addViewArchiveInRandomReviewSettings(t,n)}async generateShareSettings(t,n){const r=Ze.getState().verifyState,o=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),a=A.Platform.isDesktop?await pn():o.identifier||o.uuid,i=r&&r?.appId===a;new De(n,this).setHeading().setTab(t).setName("📄 "+I("Copy filtered results")),this.copyMemosSettings(t,n),new De(n,this).setHeading().setTab(t).setName("🖼 "+I("Share image")),this.shareMemosSettings(t,n),A.Platform.isMobile&&this.shareToThinosSettings(t,n,i)}async generateAdvancedSettings(t,n){this.addAutoOpenMemosSettings(t,n),this.setPasswordSettings(t,n),this.addDoubleClickBehaviorSettings(t,n),this.addDraggingBehaviorSettings(t,n),this.saveDataSettings(t,n),this.fetchDataSettings(t,n),this.navigationSettings(t,n),this.optimizeForCalloutSettings(t,n),this.clearConfigSettings(t,n)}async generateAboutSettings(t,n){new De(n,this).setTab(t).setName(I("About")+" Thino").setHeading(),new De(n,this).setTab(t).setName(I("Version")).setDesc(`Thino v${this.plugin.manifest.version}`),new De(n,this).setTab(t).setName(I("Documentation")).setDesc(I("View the documentation for this plugin")).addButton(r=>{r.setButtonText(I("Open Documentation")).onClick(()=>{window.open("https://github.com/quorafind/obsidian-thino/")})}),new De(n,this).setTab(t).setName(I("Change log")).setDesc(I("View the change log for this plugin")).addButton(r=>{r.setButtonText(I("Open change log")).onClick(()=>{new RS(this.app,this.plugin.manifest.version).open()})}),this.addUpdateMessageSettings(t,n),this.generateProSettings(t,n)}async customProSettings(t,n){const r=await this.checkVerified();this.addThinoProSettings(t,n,r)}addDoubleClickBehaviorSettings(t,n){new De(n,this).setName(I("Double click behavior")).setDesc(I("Set the behavior when double click on a thino.")).setTab(t).addDropdown(async r=>{r.addOption("open-thino",I("Open thino")),r.addOption("edit-thino",I("Edit thino")),r.addOption("go-to-source",I("Go to source")),r.addOption("do-nothing",I("Do nothing")),r.setValue(this.plugin.settings.doubleClickBehavior).onChange(async o=>{this.plugin.settings.doubleClickBehavior=o,this.applySettingsUpdate()})})}addDraggingBehaviorSettings(t,n){new De(n,this).setName(I("Dragging behavior")).setDesc(I("Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.")).setTab(t).addDropdown(async r=>{r.addOption("block-link",I("Block link")),r.addOption("text",I("Text")),r.setValue(this.plugin.settings.DraggingBehavior).onChange(async o=>{this.plugin.settings.DraggingBehavior=o,this.applySettingsUpdate()})})}addUseMobileViewDefaultHeaderSettings(t,n){new De(n,this).setName(I("Use default header in mobile view")).setDesc(I("Use default header in mobile view of thino rather than custom header.")).setTab(t).addToggle(r=>{r.setValue(this.plugin.settings.useMobileViewDefaultHeader).onChange(async o=>{this.plugin.settings.useMobileViewDefaultHeader=o,this.applySettingsUpdate()})})}async customNameAndTheme(t,n,r){new De(n,this).setName(I("Theme for Thino")).setDesc(I("Set the theme for Thino")).setTab(t).addDropdown(async a=>{a.addOption("modern","Modern"),a.addOption("classic","Classic"),a.setValue(this.plugin.settings.DefaultThemeForThino).onChange(async i=>{this.plugin.settings.DefaultThemeForThino=i,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setHeading().setName("🎨 "+I("Interface Details"));let o;new De(n,this).setName(I("Heatmap Color Scheme")).setDesc(I("Set different color scheme for heatmap.")).setTab(t).addDropdown(async a=>{o=a,o.addOption("default",I("Default")),o.addOption("gray",I("Gray")),o.addOption("grass",I("Grass")),o.addOption("flame",I("Flame")),o.addOption("olive",I("Olive")),o.addOption("ice",I("Ice")),o.addOption("magenta",I("Magenta")),o.setValue(this.plugin.settings.HeatmapColorScheme).onChange(async i=>{this.plugin.settings.HeatmapColorScheme=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Save Memo button label")).setDesc(I("The text shown on the save Memo button in the UI. 'NOTEIT' by default.")).setTab(t).addText(a=>a.setPlaceholder(zo.SaveMemoButtonLabel).setValue(this.plugin.settings.SaveMemoButtonLabel).onChange(async i=>{this.plugin.settings.SaveMemoButtonLabel=i,this.applySettingsUpdate()})),!A.Platform.isMobile&&new De(n,this).setName(I("Always Show Leaf Sidebar on PC")).setDesc(I("Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.")).setTab(t).addToggle(a=>a.setValue(this.plugin.settings.ShowLeftSideBar).onChange(async i=>{this.plugin.settings.ShowLeftSideBar=i,this.applySettingsUpdate()})),this.addUseMobileViewDefaultHeaderSettings(t,n),this.addRememberImageSettings(t,n),this.addScrollToTopSettings(t,n),new De(n,this).setName(I("Max height for collapse")).setDesc(I("The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)")).setTab(t).addText(a=>a.setPlaceholder(zo.ThinoMaxHeight.toString()).setValue(this.plugin.settings.ThinoMaxHeight.toString()).onChange(async i=>{if(Number(i)<80&&Number(i)!==0){new A.Notice(I("The value should be greater than")+"80");return}this.plugin.settings.ThinoMaxHeight=Number(i),this.debounceApplySettingsUpdate()})),new De(n,this).setName(I("Thino height when collapsed")).setDesc(I("The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)")).setTab(t).addText(a=>a.setPlaceholder(zo.ThinoCollapsedHeight.toString()).setValue(this.plugin.settings.ThinoCollapsedHeight.toString()).onChange(async i=>{if(Number(i)<40&&Number(i)!==0){new A.Notice(I("The value should be greater than")+"40");return}this.plugin.settings.ThinoCollapsedHeight=Number(i),this.debounceApplySettingsUpdate()})),await this.getEditorLocation(n,t)}customEditorSettings(t,n){new De(n,this).setHeading().setTab(t).setName("📝 "+I("Editor")),new De(n,this).setName(I("Use Tags In Vault")).setDesc(I("Use tags in vault rather than only in Memos. False by default.")).setTab(t).addToggle(o=>o.setValue(this.plugin.settings.UseVaultTags).onChange(async a=>{this.plugin.settings.UseVaultTags=a,this.applySettingsUpdate()}));let r;new De(n,this).setName(I("Default insert date format")).setDesc(I("Set the default date format when insert date by @, 'Tasks' by default.")).setTab(t).addDropdown(async o=>{r=o,r.addOption("Tasks","Tasks"),r.addOption("Dataview","Dataview"),r.setValue(this.plugin.settings.InsertDateFormat).onChange(async a=>{this.plugin.settings.InsertDateFormat=a,this.applySettingsUpdate()})}),new De(n,this).setName(I("Focus on editor when open")).setDesc(I("Focus on editor when open. True by default.")).setTab(t).addToggle(o=>{o.setValue(this.plugin.settings.FocusOnEditor).onChange(async a=>{this.plugin.settings.FocusOnEditor=a,this.applySettingsUpdate()})}),new De(n,this).setName(I("Default Editor Mode")).setDesc(I("Live-Preview Mode OR Source Mode.")).setTab(t).addDropdown(async o=>{r=o,r.addOption("obsidian",I("Live-preview")),r.addOption("memos",I("Source")),r.setValue(this.plugin.settings.EditorType).onChange(async a=>{this.plugin.settings.EditorType=a,this.applySettingsUpdate()})})}customTasksSettings(t,n){this.addTaskRelatedSettings(t,n)}addThinoDailyMarkSettings(t,n,r){let o;new De(n,this).setName(I("Show day mark in thino list")).setDesc(I("Show day mark on the top of daily range thino. False by default.")).setTab(t).addToggle(a=>a.setValue(this.plugin.settings.showDayMark).onChange(async i=>{if(!r){It();return}this.plugin.settings.showDayMark=i,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.showDayMark&&(new De(n,this).setName(I("Day mark range")).setDesc(I("Set the range of day mark. Day by default.")).setTab(t).addDropdown(async a=>{o=a,o.addOption("day","day"),o.addOption("week","week"),o.addOption("month","month"),o.addOption("quarter","quarter"),o.addOption("year","year"),o.setValue(this.plugin.settings.dayMarkRange).onChange(async i=>{this.plugin.settings.dayMarkRange=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Hide pinned group")).setDesc(I("Hide pinned group in thino list. False by default.")).setTab(t).addToggle(a=>a.setValue(this.plugin.settings.hidePinnedGroup).onChange(async i=>{if(!r){It();return}this.plugin.settings.hidePinnedGroup=i,this.applySettingsUpdate()})))}addThinoMomentsSettings(t,n,r){new De(n,this).setTab(t).setName(I("Background image for moments view")).setDesc(I("Set the background image for moments view")).addText(o=>{new Fc(o.inputEl),o.setPlaceholder("URL").setValue(this.plugin.settings.MomentsBackgroundImage).onChange(async a=>{r&&(this.plugin.settings.MomentsBackgroundImage=a,this.applySettingsUpdate())})})}async getEditorLocation(t,n){let r;A.Platform.isMobile&&(new De(t,this).setName(I("Default editor position on mobile")).setDesc(I("Set the default editor position on Mobile, 'Top' by default.")).setTab(n).addDropdown(async o=>{r=o,r.addOption("Top",I("Top")),r.addOption("Bottom",I("Bottom")),r.setValue(this.plugin.settings.DefaultEditorLocation).onChange(async a=>{this.plugin.settings.DefaultEditorLocation=a,this.applySettingsUpdate(),setTimeout(()=>{this.display()},200)})}),this.plugin.settings.DefaultEditorLocation!=="Top"&&new De(t,this).setName(I("Use button to show editor on mobile")).setDesc(I("Set a float button to call editor on mobile. Only when editor located at the bottom works.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.UseButtonToShowEditor).onChange(async a=>{this.plugin.settings.UseButtonToShowEditor=a,this.applySettingsUpdate()})))}customHeading(t,n){new De(n,this).setHeading().setName("👤 "+I("User info")).setTab(t),new De(n,this).setName(I("User name")).setDesc(I("Set your user name here. 'Memos 😏' By default")).setTab(t).addText(s=>s.setPlaceholder(zo.UserName).setValue(this.plugin.settings.UserName).onChange(async l=>{this.plugin.settings.UserName=l,this.applySettingsUpdate()})),new De(n,this).setTab(t).setName(I("User icon")).setDesc(I("Set user icon for thino. You can input http/https link or file path in vault.")).addText(s=>{new Fc(s.inputEl),s.setPlaceholder("URL").setValue(this.plugin.settings.MomentsIcon).onChange(async l=>{this.plugin.settings.MomentsIcon=l,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setName(I("User quote")).setDesc(I("Set user quote for thino")).addText(s=>s.setPlaceholder("Input anything here").setValue(this.plugin.settings.MomentsQuote).onChange(async l=>{this.plugin.settings.MomentsQuote=l,this.applySettingsUpdate()}));let r=!1;const o=document.createDocumentFragment();o.createEl("span",{text:I("Connect to PKMer Sync, you can check it in ")});const a=localStorage.getItem("language");let i;a&&a==="zh"?i="https://pkmer.cn/products/UserProfile/#tab-21&activateSync":i="https://thino.pkmer.net/en/",o.createEl("a",{text:I("PKMer Sync"),attr:{href:i}}),(a==="zh"||a==="zh-TW")&&new De(n,this).setHeading().setName("☁ "+I("Sync service")).setTab(t),(a==="zh"||a==="zh-TW")&&new De(n,this).setName(I("Sync Thino via PKMer")).setDesc(o).setTab(t).addButton(s=>{const l=this.plugin.app?.loadLocalStorage("tokenForSync");s.setButtonText(I(l?"Unlink":"Link")).onClick(async()=>{if(!l){const u=localStorage.getItem("language");u&&(u==="zh"||u==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&activateSync","_blank"):window.open("https://thino.pkmer.net/en/","_blank");return}if(!r){s.setButtonText(I("Confirm?")),r=!0;return}r=!1,l&&(this.plugin.app?.saveLocalStorage("tokenForSync",""),new A.Notice(I("Remove successfully"))),Ge.setRefresh(!0),setTimeout(()=>{this.display()},20)})}),(a==="zh"||a==="zh-TW")&&this.showSyncStatus(n,t)}showSyncStatus(t,n){this.plugin.app?.loadLocalStorage("tokenForSync")&&(new De(t,this).setName(I("Save thino type when sync local")).setDesc(I("Set the default save thino type when sync local, FILE by default.")).setTab(n).addDropdown(async o=>{o.addOption("DAILY",I("DAILY")),o.addOption("FILE",I("FILE")),o.setValue(this.plugin.settings.saveThinoType).onChange(async a=>{this.plugin.settings.saveThinoType=a,this.applySettingsUpdate()})}),new De(t,this).setName(I("Sync Status")).setDesc(I("Start or stop sync")).setTab(n).addButton(o=>{o.setButtonText(this.plugin.settings.startSync?I("Stop"):I("Start")).onClick(async()=>{this.plugin.settings.startSync=!this.plugin.settings.startSync,await this.plugin.saveSettings(),Ge.setRefresh(!0),new A.Notice(this.plugin.settings.startSync?I("Start sync successfully"):I("Stop sync successfully")),setTimeout(()=>{this.display()},200)})}),new De(t,this).setName(I("Sync manually")).setTab(n).addToggle(o=>{o.setValue(this.plugin.settings.SyncManually).onChange(async a=>{this.plugin.settings.SyncManually=a,this.applySettingsUpdate()})}))}addMemoSettings(t,n){let r;new De(n,this).setHeading().setTab(t).setName("📅 "+I("Daily notes")),new De(n,this).setName(I("Default prefix when save thino")).setDesc(I("Set the default prefix when create memo, 'List' by default.")).setTab(t).addDropdown(async o=>{r=o,r.addOption("List",I("List")),r.addOption("Task",I("Task")),r.setValue(this.plugin.settings.DefaultPrefix).onChange(async a=>{this.plugin.settings.DefaultPrefix=a,this.applySettingsUpdate()})}),this.plugin.settings.EnabledLocationList.some(o=>o.value==="DAILY")&&new De(n,this).setName(I("Default time prefix for thino in daily notes")).setDesc(I("Set default time prefix for thino in daily notes.")).setTab(t).addDropdown(async o=>{r=o,r.addOption("HH:mm","HH:mm"),r.addOption("HH:mm:ss","HH:mm:ss"),r.setValue(this.plugin.settings.DefaultTimePrefix).onChange(async a=>{this.plugin.settings.DefaultTimePrefix=a,this.applySettingsUpdate()})}),new De(n,this).setHeading().setTab(t).setName("🔗 "+I("Fixed strings for thinos")),new De(n,this).setName(I("Use fixed strings for thinos")).setDesc(I("Enable to add fixed strings at the beginning or end of thinos.")).setTab(t).addToggle(o=>o.setValue(this.plugin.settings.UseMemoFixedStrings).onChange(async a=>{this.plugin.settings.UseMemoFixedStrings=a,this.applySettingsUpdate(),setTimeout(()=>{this.display()},200)})),this.plugin.settings.UseMemoFixedStrings&&(new De(n,this).setName(I("Fixed prefix for thinos")).setDesc(I("Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.")).setTab(t).addText(o=>o.setValue(this.plugin.settings.MemoFixedPrefix).onChange(async a=>{this.plugin.settings.MemoFixedPrefix=a,this.applySettingsUpdate()})),new De(n,this).setName(I("Fixed suffix for thinos")).setDesc(I("Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.")).setTab(t).addText(o=>o.setValue(this.plugin.settings.MemoFixedSuffix).onChange(async a=>{this.plugin.settings.MemoFixedSuffix=a,this.applySettingsUpdate()})))}addThinoProSettings(t,n,r){new De(n,this).setHeading().setTab(t).setName("💎 Thino"),new De(n,this).setName(I("Default save type")).setDesc(I('Set the default save type for thino. "DAILY" by default')).setTab(t).addDropdown(async a=>{for(const i of this.plugin.settings.EnabledLocationList)a.addOption(i.value,I(i.value));a.setValue(this.plugin.settings.MemoSaveLocation||this.plugin.settings.EnabledLocationList[0].value).onChange(async i=>{if(!r){It();return}this.plugin.settings.MemoSaveLocation=i,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setName(I("Support filter by metadata from file")).setDesc(I("When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.")).addToggle(a=>{a.setValue(this.plugin.settings.FilterByMetadata).onChange(async i=>{if(!r){It();return}this.plugin.settings.FilterByMetadata=i,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setName(I("Show source near timestamp in thino")).setDesc(I("When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.")).addToggle(a=>{a.setValue(this.plugin.settings.ShowSourcePath).onChange(async i=>{if(!r){It();return}this.plugin.settings.ShowSourcePath=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Add tag automatically")).setDesc(I("Add tag to the end or beginning of the thino content when creating a thino and filtering tags")).setTab(t).addToggle(a=>a.setValue(this.plugin.settings.addTagAutomatically).onChange(async i=>{if(!r){It();return}this.plugin.settings.addTagAutomatically=i,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.addTagAutomatically&&(new De(n,this).setName(I("Add tag position")).setDesc(I("Set the position of the tag when adding tag automatically")).setTab(t).addDropdown(async a=>{a.addOption("End",I("End")),a.addOption("Beginning",I("Beginning")),a.setValue(this.plugin.settings.addTagPosition).onChange(async i=>{this.plugin.settings.addTagPosition=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Add tag with new line")).setDesc(I("Add tag with new line when adding tag automatically")).setTab(t).addToggle(a=>a.setValue(this.plugin.settings.addTagWithNewline).onChange(async i=>{this.plugin.settings.addTagWithNewline=i,this.applySettingsUpdate()}))),new De(n,this).setHeading().setTab(t).setName("💎 "+I("Interface")),new De(n,this).setName(I("Reference links group")).setDesc(I("Enable reference links group in thino.")).setTab(t).addToggle(a=>{a.setValue(this.plugin.settings.enableReferenceLinksGroup).onChange(async i=>{if(!r){It();return}this.plugin.settings.enableReferenceLinksGroup=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Word count feature")).setTab(t).setDesc(I("Enable real-time word count display in the editor")).addToggle(a=>{a.setValue(this.plugin.settings.enableWordCount).onChange(async i=>{if(!r){It();return}this.plugin.settings.enableWordCount=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Maximum word count")).setTab(t).setDesc(I("Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.")).setDisabled(!r||!this.plugin.settings.enableWordCount).addText(a=>{a.inputEl.type="number",a.setValue(this.plugin.settings.maxWordCount.toString()).onChange(async i=>{const s=parseInt(i);!isNaN(s)&&s>=0&&(this.plugin.settings.maxWordCount=s,this.applySettingsUpdate())})}),new De(n,this).setTab(t).setName(I("Always show status text")).addToggle(a=>a.setValue(this.plugin.settings.AlwaysShowStatusText).onChange(async i=>{this.plugin.settings.AlwaysShowStatusText=i,document.body.toggleClass("thino-show-status",i),this.applySettingsUpdate()})),A.Platform.isMobile&&new De(n,this).setName(I("Quick add button on mobile navbar")).setTab(t).addToggle(a=>{a.setValue(this.plugin.settings.NavbarButton).onChange(async i=>{if(!r){It();return}this.plugin.settings.NavbarButton=i,this.applySettingsUpdate()})}),this.addThinoDailyMarkSettings(t,n,r);let o;new De(n,this).setName(I("Chat view style")).setDesc(I("Set the style of chat view")).setTab(t).addDropdown(async a=>{o=a,o.addOption("default","Default"),o.addOption("fluent","Fluent"),o.addOption("inline","Inline"),o.setValue(this.plugin.settings.chatViewStyle).onChange(async i=>{if(!r){It();return}this.plugin.settings.chatViewStyle=i,this.applySettingsUpdate()})}),new De(n,this).setName(I("Can select other views when leaf width is not enough")).setDesc(I("This option will allow you use other views when leaf width is not enough. False by default.")).setTab(t).addToggle(a=>{a.setValue(this.plugin.settings.SupportSelectOtherView).onChange(async i=>{if(!r){It();return}this.plugin.settings.SupportSelectOtherView=i,this.applySettingsUpdate()})}),this.addThinoMomentsSettings(t,n,r),new De(n,this).setHeading().setTab(t).setName("💎 "+I("Advanced")),this.setGlobalSettings(t,n,r)}shareToThinosSettings(t,n,r){new De(n,this).setHeading().setTab(t).setName("💎 "+I("Pro features")),new De(n,this).setTab(t).setName(I("Append/prepend text when share to Thino")).addToggle(o=>{o.setValue(this.plugin.settings.ShareToThinoWithText).onChange(async a=>{if(!r){It();return}this.plugin.settings.ShareToThinoWithText=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareToThinoWithText&&(new De(n,this).setTab(t).setName(I("Prepend Text Action")).addDropdown(o=>{o.addOption("none",I("None")),o.addOption("preset",I("Preset")),o.addOption("input",I("Input")),o.addOption("selectTags",I("Select Tags")),o.setValue(this.plugin.settings.SharePrependType).onChange(async a=>{this.plugin.settings.SharePrependType=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.SharePrependType==="preset"&&new De(n,this).setTab(t).setName(I("Prepend text when share to Thino")).addText(o=>{o.setPlaceholder(I("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextPrepend).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextPrepend=a,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setName(I("Append Text Action")).addDropdown(o=>{o.addOption("none",I("None")),o.addOption("preset",I("Preset")),o.addOption("input",I("Input")),o.addOption("selectTags",I("Select Tags")),o.setValue(this.plugin.settings.ShareAppendType).onChange(async a=>{this.plugin.settings.ShareAppendType=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareAppendType==="preset"&&new De(n,this).setTab(t).setName(I("Append text when share to Thino")).addText(o=>{o.setPlaceholder(I("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextAppend).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextAppend=a,this.applySettingsUpdate()})}),new De(n,this).setTab(t).setName(I("Add newline when append/prepend text")).addDropdown(async o=>{o.addOption("prepend",I("Prepend")),o.addOption("append",I("Append")),o.addOption("both",I("Both")),o.addOption("none",I("None")),o.setValue(this.plugin.settings.ShareToThinoWithTextNewline).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextNewline=a,this.applySettingsUpdate()})}))}copyMemosSettings(t,n){new De(n,this).setTab(t).setName(I("Show Time When Copy Results")).setDesc(I("Show time when you copy results, like 12:00. Copy time by default.")).addToggle(r=>r.setValue(this.plugin.settings.ShowTime).onChange(async o=>{this.plugin.settings.ShowTime=o,this.applySettingsUpdate()})),new De(n,this).setTab(t).setName(I("Show Date When Copy Results")).setDesc(I("Show date when you copy results, like [[2022-01-01]]. Copy date by default.")).addToggle(r=>r.setValue(this.plugin.settings.ShowDate).onChange(async o=>{this.plugin.settings.ShowDate=o,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.ShowDate&&new De(n,this).setTab(t).setName(I("Add Blank Line Between Different Date")).setDesc(I("Add blank line when copy result with date. No blank line by default.")).addToggle(r=>r.setValue(this.plugin.settings.AddBlankLineWhenDate).onChange(async o=>{this.plugin.settings.AddBlankLineWhenDate=o,this.applySettingsUpdate()}))}shareMemosSettings(t,n){new De(n,this).setTab(t).setName(I("Custom height for Thino content")).setDesc(I("Set custom height for Thino content. Like 200px or 20rem")).addText(r=>r.setPlaceholder(I("Input height")).setValue(this.plugin.settings.MinHeightForShare).onChange(async o=>{this.plugin.settings.MinHeightForShare=o,this.debounceApplySettingsUpdate()})),this.customMemoFooter(t,n),new De(n,this).setName(I("Custom Background Image")).setDesc(I("Set custom background image.")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.SetCustomBackgroundImage).onChange(async o=>{this.plugin.settings.SetCustomBackgroundImage=o,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomBackgroundImage&&(new De(n,this).setName(I("Background Image in Light Theme")+` [${I("Modern")}]`).setDesc(I('Set background image in light theme. Set something like "Daily/one.png"')).setTab(t).addText(r=>{new Fc(r.inputEl),r.setPlaceholder(zo.DefaultLightBackgroundImage).setValue(this.plugin.settings.DefaultLightBackgroundImage).onChange(async o=>{this.plugin.settings.DefaultLightBackgroundImage=o,this.applySettingsUpdate()})}),new De(n,this).setName(I("Background Image in Dark Theme")+` [${I("Modern")}]`).setDesc(I('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(t).addText(r=>{new Fc(r.inputEl),r.setPlaceholder(zo.DefaultDarkBackgroundImage).setValue(this.plugin.settings.DefaultDarkBackgroundImage).onChange(async o=>{this.plugin.settings.DefaultDarkBackgroundImage=o,this.applySettingsUpdate()})}),new De(n,this).setName(I("Background Image in Light Theme")+` [${I("Clean")}]`).setDesc(I('Set background image in light theme. Set something like "Daily/one.png"')).setTab(t).addText(r=>{new Fc(r.inputEl),r.setPlaceholder(zo.DefaultLightBackgroundImageForClean).setValue(this.plugin.settings.DefaultLightBackgroundImageForClean).onChange(async o=>{this.plugin.settings.DefaultLightBackgroundImageForClean=o,this.applySettingsUpdate()})}),new De(n,this).setName(I("Background Image in Dark Theme")+` [${I("Clean")}]`).setDesc(I('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(t).addText(r=>{new Fc(r.inputEl),r.setPlaceholder(zo.DefaultDarkBackgroundImageForClean).setValue(this.plugin.settings.DefaultDarkBackgroundImageForClean).onChange(async o=>{this.plugin.settings.DefaultDarkBackgroundImageForClean=o,this.applySettingsUpdate()})}))}customMemoFooter(t,n){new De(n,this).setName(I("Custom Memo Footer")).setDesc(I("Set custom memo footer.")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.SetCustomMemoFooter).onChange(async o=>{this.plugin.settings.SetCustomMemoFooter=o,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomMemoFooter&&new De(n,this).setName(I("Share Memos Image Footer Start")).setDesc(I("Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default")).setTab(t).addText(r=>r.setPlaceholder(zo.ShareFooterStart).setValue(this.plugin.settings.ShareFooterStart).onChange(async o=>{this.plugin.settings.ShareFooterStart=o,this.applySettingsUpdate()}))}saveDataSettings(t,n){new De(n,this).setName(I("Delete Thino Directly")).setDesc(I("When delete thino directly, it will not be moved to trash. False by default.")).setTab(t).addToggle(r=>{r.setValue(this.plugin.settings.DeleteThinoDirectly).onChange(async o=>{this.plugin.settings.DeleteThinoDirectly=o,this.applySettingsUpdate()})})}async initHttpServer(t,n){const r=Ze.getState().verifyState,o=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),a=A.Platform.isDesktop?await pn():o.identifier||o.uuid,i=r&&r?.appId===a;new De(t,this).setName(I("Enable Local Http Server")).setTab(n).setDisabled(!i).addToggle(s=>s.setValue(this.plugin.settings.EnabledHttpApi).onChange(async l=>{if(!i){It();return}this.plugin.settings.EnabledHttpApi=l,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.settings.EnabledHttpApi?this.plugin.initServer():this.plugin.stopServer(),this.display()},100)})),this.plugin.settings.EnabledHttpApi&&(new De(t,this).setName("API Token Management").setDesc("Generate and manage API tokens for external applications").setTab(n).addButton(s=>{s.setButtonText("Generate Token").setTooltip("Generate a new API token for external access").onClick(async()=>{if(!i){It();return}new Gqe(this.app,this.plugin,async u=>{try{const f=new XE(this.plugin);if(!await f.isUserVerified()){new A.Notice("Pro license required to generate API token");return}const p=await f.generateToken(u),m=await f.generateAuthHeader(u),w=u*3600;new Zqe(this.app,p,m,w,u).open()}catch(f){console.error("Token generation error:",f),new A.Notice("Failed to generate token: "+f.message)}}).open()})}).addButton(s=>{s.setButtonText("Test API").setTooltip("Test API connection").onClick(async()=>{if(!i){It();return}try{const l=new XE(this.plugin);if(!await l.isUserVerified()){new A.Notice("Pro license required for API access");return}const f=await l.generateAuthHeader(1),h=await fetch(`http://${this.plugin.settings.HttpApiIpType}:${this.plugin.settings.HttpApiPort}/list?count=1`,{headers:{Authorization:f}});if(h.ok){const p=await h.json();new A.Notice("API test successful! Found "+(p.thinos?.length||0)+" thinos.")}else throw new Error(`API test failed: ${h.status}`)}catch(l){console.error("API test error:",l),new A.Notice("API test failed: "+l.message)}})}).addButton(s=>{s.setButtonText("API Documentation").setTooltip("View API documentation and examples").onClick(async()=>{new qqe(this.app,this.plugin).open()})}),new De(t,this).setName(I("Get thino capture extension")).setDesc(I("You can capture idea/text from chrome now.")).setTab(n).addButton(s=>{s.setButtonText("GitHub").onClick(()=>{window.open("https://github.com/quorafind/thino-capture-releases","_blank")})}).addButton(s=>{s.setButtonText("Chrome Web Store").onClick(()=>{window.open("https://chromewebstore.google.com/detail/thino-capture/oppagjehiimpjpjmgbfmanlnbpbcecff","_blank")})}),new De(t,this).setName(I("Memos Http Server Port")).setDesc(I("Set memos http server port to listen. '43999' by default")).setTab(n).addText(s=>s.setPlaceholder(zo.HttpApiPort).setValue(this.plugin.settings.HttpApiPort).onChange(async l=>{if(!i){It();return}this.plugin.settings.HttpApiPort=l,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})),new De(t,this).setName(I("Auto Download Image")).setDesc(I("Auto download image when save to thino. 'false' by default")).setTab(n).setDisabled(!i).addToggle(s=>{s.setValue(this.plugin.settings.AutoDownloadImage).onChange(async l=>{if(!i){It();return}this.plugin.settings.AutoDownloadImage=l,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}),new De(t,this).setName(I("Thino Http IP Type")).setDesc(I("Set Thino http server ip to listen. 'localhost' by default")).setTab(n).addDropdown(s=>{s.addOption("localhost","localhost"),s.addOption("127.0.0.1","127.0.0.1"),s.setValue(this.plugin.settings.HttpApiIpType).onChange(async l=>{if(!r||r?.appId!==a){It();return}this.plugin.settings.HttpApiIpType=l,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}),this.appendOrPrependTextSettings(n,t,i))}appendOrPrependTextSettings(t,n,r){new De(n,this).setTab(t).setName(I("Append/prepend text when share to Thino")).addToggle(o=>{o.setValue(this.plugin.settings.AppendOrPrependTextViaServer).onChange(async a=>{if(!r){It();return}this.plugin.settings.AppendOrPrependTextViaServer=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.AppendOrPrependTextViaServer&&(new De(n,this).setName(I("Prepend Text")).setTab(t).addText(o=>{o.setPlaceholder(I("Input anything here")).setValue(this.plugin.settings.PrependViaServer).onChange(async a=>{this.plugin.settings.PrependViaServer=a,this.applySettingsUpdate()})}),new De(n,this).setName(I("Append Text")).setTab(t).addText(o=>{o.setPlaceholder(I("Input anything here")).setValue(this.plugin.settings.AppendViaServer).onChange(async a=>{this.plugin.settings.AppendViaServer=a,this.applySettingsUpdate()})}),new De(n,this).setName(I("Add newline when append/prepend text")).addDropdown(async o=>{o.addOption("prepend",I("Prepend")),o.addOption("append",I("Append")),o.addOption("both",I("Both")),o.addOption("none",I("None")),o.setValue(this.plugin.settings.WithNewLineViaServer).onChange(async a=>{this.plugin.settings.WithNewLineViaServer=a,this.applySettingsUpdate()})}))}fetchDataSettings(t,n){let r;new De(n,this).setName(I("Use which plugin's default configuration")).setDesc(I("Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.")).setTab(t).addDropdown(async o=>{r=o,r.addOption("Daily",I("Daily")),r.addOption("Periodic","Periodic").setDisabled(!this.app.plugins.getPlugin("periodic-notes")),r.setValue(this.plugin.settings.UseDailyOrPeriodic).onChange(async a=>{this.plugin.settings.UseDailyOrPeriodic=a,this.applySettingsUpdate()})}).addExtraButton(o=>{o.setIcon("settings").onClick(()=>{if(this.plugin.settings.UseDailyOrPeriodic==="Daily"){if(!this.app.internalPlugins.plugins["daily-notes"]||!this.app.internalPlugins.plugins["daily-notes"].enabled){new A.Notice("Daily Notes plugin is not installed");return}this.app.setting.open(),this.app.setting.openTabById("daily-notes")}else{if(!this.app.plugins.getPlugin("periodic-notes")||!this.app.plugins.getPlugin("periodic-notes")._loaded){new A.Notice("Periodic Notes plugin is not installed");return}this.app.setting.open(),this.app.setting.openTabById("periodic-notes")}})})}navigationSettings(t,n){new De(n,this).setName(I("Open link directly in Thino view")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.navigation).onChange(async o=>{this.plugin.settings.navigation=o,this.applySettingsUpdate()}))}optimizeForCalloutSettings(t,n){new De(n,this).setName(I("Optimize for Callout")).setDesc(I("Won't render content contains more than 3 callouts automatically. True by default")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.OptimizeForCallout).onChange(async o=>{this.plugin.settings.OptimizeForCallout=o,this.applySettingsUpdate()}))}addUpdateMessageSettings(t,n){new De(n,this).setName(I("Show release notes")).setDesc(I("Show release notes when Thino is updated. True by default")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.ShowUpdateMessage).onChange(async o=>{this.plugin.settings.ShowUpdateMessage=o,this.applySettingsUpdate()}))}clearConfigSettings(t,n){new De(n,this).setName(I("Reset all Thino settings")).setDesc(I("Reset Thino settings to default settings.")).setTab(t).addButton(r=>{r.setWarning().setButtonText(I("Reset settings")).onClick(async()=>{new Ka(this.app,I("Reset all Thino settings"),async()=>{this.plugin.settings={...zo,tokenForVerify:this.plugin.settings.tokenForVerify,password:this.plugin.settings.password,needVerify:this.plugin.settings.needVerify},this.debounceApplySettingsUpdate(),await le.fetchAllMemos(),le.updateTagsState(),this.plugin.app?.saveLocalStorage("tokenForSync",""),Ge.setRefresh(!0),Ge.setMemoListView("list"),new A.Notice(I("All settings have been reset to default.")),this.debounceDisplay()}).open()})})}addAutoOpenMemosSettings(t,n){new De(n,this).setName(I("Open Memos when obsidian opens")).setDesc(I("When enable this, Memos will open when Obsidian opens. False by default.")).setTab(t).addDropdown(r=>{r.addOption("Desktop","Desktop"),r.addOption("Mobile","Mobile"),r.addOption("All","All"),r.setValue(this.plugin.settings.MobileAndDesktop).onChange(async o=>{this.plugin.settings.MobileAndDesktop=o,this.applySettingsUpdate()})}).addToggle(r=>r.setValue(this.plugin.settings.OpenMemosAutomatically).onChange(async o=>{this.plugin.settings.OpenMemosAutomatically=o,this.applySettingsUpdate()}))}setPasswordSettings(t,n){new De(n,this).setName(I("Need password to unlock Thino")).setTab(t).addToggle(r=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(r.toggleEl.onclick=o=>{this.passwordMatched||(o.preventDefault(),new m9(this.app,this,this.plugin,a=>{r.setDisabled(!a),this.passwordMatched=a,this.debounceDisplay()}).open(),new A.Notice(I("Please input your password to change password settings")))}),r.setDisabled(this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched).setValue(this.plugin.settings.needVerify).onChange(async o=>{this.plugin.settings.needVerify=o,o&&(this.passwordMatched=!1),this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.needVerify&&new De(n,this).setName(I("Password to lock Thino")).setTab(t).addText(r=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(r.inputEl.onclick=o=>{this.passwordMatched||(o.preventDefault(),new m9(this.app,this,this.plugin,a=>{r.inputEl.readOnly=!a,this.passwordMatched=a,this.debounceDisplay()}).open(),new A.Notice(I("Please input your password to change password settings")))}),r.inputEl.readOnly=this.plugin.settings.password&&this.plugin.settings.needVerify&&!this.passwordMatched,r.inputEl.oncopy=()=>!1,r.inputEl.type="password",r.setValue(this.plugin.settings.password).onChange(async o=>{this.plugin.settings.password=o,this.applySettingsUpdate()})})}setGlobalSettings(t,n,r){this.initHttpServer(n,t),new De(n,this).setName(I("Enable opening thino globally")).setDesc(I("Enable opening thino globally. False by default.")).setTab(t).addToggle(o=>o.setValue(this.plugin.settings.CaptureKey.EnableCaptureKey).onChange(async a=>{if(!r){It();return}this.plugin.settings.CaptureKey.EnableCaptureKey=a,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.CaptureKey.EnableCaptureKey&&(new De(n,this).setName(I("Key for opening thino globally")).setDesc(I("Set key for opening thino globally. CTRL + SHIFT + T by default.")).setTab(t).addText(o=>o.setPlaceholder(zo.CaptureKey.OpenThinoGlobally).setValue(this.plugin.settings.CaptureKey.OpenThinoGlobally).onChange(async a=>{if(!r){It();return}this.plugin.settings.CaptureKey.OpenThinoGlobally=a,this.applySettingsUpdate()})),new De(n,this).setName(I("Show thino near mouse")).setTab(t).addToggle(o=>o.setValue(this.plugin.settings.CaptureKey.ShowNearMouse).onChange(async a=>{if(!r){It();return}this.plugin.settings.CaptureKey.ShowNearMouse=a,this.applySettingsUpdate()})))}checkInList(t){return this.plugin.settings.EnabledLocationList.find(n=>n.value===t)!==void 0}customFileNameSettings(t,n,r){const o=document.createDocumentFragment(),a=o.createEl("div",{cls:"memo-save-location-desc"});for(const s of Uqe){const l=a.createEl("div",{cls:`memo-save-location-desc-item ${s.value}`}),u=l.createEl("span",{cls:"memo-save-location-desc-item-icon"});A.setIcon(u,zp.find(w=>w.title===s.value)?.icon||""),l.createEl("span",{cls:"memo-save-location-desc-item-desc",text:`${I(s.value)}`});const f=l.createEl("span",{cls:"memo-save-location-desc-item-toggle"}),h=l.createEl("span",{cls:"memo-save-location-desc-item-setting"});s.value!=="DAILY"&&l.createEl("span",{cls:["memo-save-location-desc-item-pro","user-pro-badge"],text:"PRO"}),new A.ToggleComponent(f).setValue(this.checkInList(s.value)).onChange(async w=>{if(!r){It();return}w?(await le.updateTypeMemos(s.value),this.plugin.settings.EnabledLocationList=[...this.plugin.settings.EnabledLocationList,s]):(await le.removeTypeMemos(s.value),this.plugin.settings.EnabledLocationList=this.plugin.settings.EnabledLocationList.filter(b=>b.value!==s.value)),this.plugin.settings.EnabledLocationList.length===1&&(this.plugin.settings.MemoSaveLocation=s.value),this.applySettingsUpdate(),setTimeout(()=>{this.display()},500)}).setDisabled(this.plugin.settings.EnabledLocationList.length===1&&this.checkInList(s.value)),new A.ExtraButtonComponent(h).setIcon("settings").onClick(()=>{new _qe(this.app,this,this.plugin,s,r).open()})}const i=new De(n,this).setName(I("Save type for Thino")).setDesc(o).setTab(t);i.settingEl.toggleClass("memo-save-location-setting",!0),i.nameEl.toggleClass("memo-save-location-title",!0)}addScrollToTopSettings(t,n){new De(n,this).setName(I("Show scroll to top button")).setDesc(I("Show scroll to top button. True by default")).setTab(t).addToggle(r=>{r.setValue(this.plugin.settings.ShowScrollToTopButton).onChange(async o=>{this.plugin.settings.ShowScrollToTopButton=o,this.applySettingsUpdate()})})}addRememberImageSettings(t,n){new De(n,this).setName(I("Zoom image by default")).setDesc(I("Zoom image by default when viewing image.")).setTab(t).addToggle(r=>{r.setValue(this.plugin.settings.ZoomImageWhenViewing).onChange(async o=>{this.plugin.settings.ZoomImageWhenViewing=o,this.applySettingsUpdate()})})}addViewArchiveInRandomReviewSettings(t,n){new De(n,this).setName(I("View archive in random review")).setDesc(I("View archived thinos in random review. True by default")).setTab(t).addToggle(r=>{r.setValue(this.plugin.settings.ViewArchiveInRandomReview).onChange(async o=>{this.plugin.settings.ViewArchiveInRandomReview=o,this.applySettingsUpdate()})})}addTaskRelatedSettings(t,n){new De(n,this).setHeading().setName("📃 "+I("Task Management")).setTab(t),new De(n,this).setName(I("Show Tasks Label")).setDesc(I("Show tasks label near the time text. False by default")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.ShowTaskLabel).onChange(async o=>{this.plugin.settings.ShowTaskLabel=o,this.applySettingsUpdate()})),new De(n,this).setName(I("Append completed date when task done in thino")).setDesc(I("Append completed date when task done in thino. False by default")).setTab(t).addToggle(r=>r.setValue(this.plugin.settings.AppendDateWhenTaskDone).onChange(async o=>{this.plugin.settings.AppendDateWhenTaskDone=o,this.applySettingsUpdate()}))}}class Gqe extends A.Modal{plugin;onGenerate;constructor(t,n,r){super(t),this.plugin=n,this.onGenerate=r}onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("token-generation-modal"),this.titleEl.setText("Generate API Token"),t.createDiv("modal-desc",m=>{m.setText("Choose the expiration time for your API token. Longer expiration times are less secure but more convenient.")});const n=t.createDiv("token-form-container"),r=n.createDiv("expiry-section");r.createEl("h3",{text:"Token Expiration Time:"});const o=[{value:1,label:"1 Hour (Recommended)"},{value:6,label:"6 Hours"},{value:12,label:"12 Hours"},{value:24,label:"1 Day"},{value:24*3,label:"3 Days"},{value:24*7,label:"1 Week"},{value:24*30,label:"30 Days (Maximum)"}];let a=1;const i=r.createDiv("radio-container");o.forEach(m=>{const w=i.createDiv("radio-item"),b=w.createEl("input",{type:"radio",attr:{name:"expiry",value:m.value.toString()}});m.value===1&&(b.checked=!0),b.addEventListener("change",()=>{b.checked&&(a=m.value)}),w.createEl("label",{text:m.label}).addEventListener("click",()=>{b.checked=!0,a=m.value})});const s=n.createDiv("custom-section");s.createEl("h4",{text:"Or enter custom hours (1-720):"});const l=s.createEl("input",{type:"number",attr:{min:"1",max:"720",placeholder:"Custom hours..."}});l.addEventListener("input",()=>{const m=parseInt(l.value);m>=1&&m<=720&&(a=m,i.querySelectorAll('input[type="radio"]').forEach(w=>{w.checked=!1}))}),n.createDiv("warning-section").createEl("p",{text:"⚠️ Security Note: Longer expiration times increase security risk. Only use extended periods if necessary.",cls:"security-warning"});const f=t.createDiv("button-group"),h=f.createEl("button",{text:"Cancel"});h.onclick=()=>this.close();const p=f.createEl("button",{text:"Generate Token",cls:"mod-cta"});p.onclick=()=>{this.onGenerate(a),this.close()}}onClose(){const{contentEl:t}=this;t.empty()}}class Zqe extends A.Modal{token;authHeader;expiresIn;expiryHours;constructor(t,n,r,o,a){super(t),this.token=n,this.authHeader=r,this.expiresIn=o,this.expiryHours=a}onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("token-display-modal"),this.titleEl.setText("API Token Generated"),t.createDiv("modal-desc",b=>{b.setText("Your API token has been generated successfully. Copy and save it securely as it will expire in 1 hour.")});const n=t.createDiv("token-container"),r=n.createDiv("token-section");r.createEl("h3",{text:"Token:"});const o=r.createEl("textarea",{cls:"token-display",attr:{readonly:"true",rows:"3"}});o.value=this.token;const a=n.createDiv("token-section");a.createEl("h3",{text:"Authorization Header:"});const i=a.createEl("textarea",{cls:"token-display",attr:{readonly:"true",rows:"2"}});i.value=this.authHeader;const s=n.createDiv("token-section");s.createEl("h3",{text:"Usage Example:"});const l=s.createEl("textarea",{cls:"token-display",attr:{readonly:"true",rows:"4"}});l.value=`curl -X POST http://127.0.0.1:43999/create \\
-H "Authorization: ${this.authHeader}" \\
-H "Content-Type: application/json" \\
-d '{"text": "Hello from API", "type": "DAILY"}'`;const u=t.createDiv("expiry-info"),f=this.expiryHours>=24?`⏰ This token will expire in ${Math.floor(this.expiryHours/24)} day(s).`:`⏰ This token will expire in ${this.expiryHours} hour(s).`;u.createEl("p",{text:f,cls:"expiry-warning"});const h=t.createDiv("button-group"),p=h.createEl("button",{text:"Copy Token"});p.onclick=async()=>{await navigator.clipboard.writeText(this.token),new A.Notice("Token copied to clipboard")};const m=h.createEl("button",{text:"Copy Auth Header"});m.onclick=async()=>{await navigator.clipboard.writeText(this.authHeader),new A.Notice("Authorization header copied to clipboard")};const w=h.createEl("button",{text:"Close"});w.onclick=()=>this.close()}onClose(){const{contentEl:t}=this;t.empty()}}class m9 extends A.Modal{constructor(t,n,r,o){super(t),this.cb=o,this.app=t,this.settingTab=n,this.plugin=r}plugin;settingTab;onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(I("Password for Thino")),t.createDiv("modal-desc",s=>{s.setText(I("Please input your password to change password settings"))});const n=t.createDiv("modal-setting"),r=new De(n,this.settingTab).setName(I("Password")).addText(s=>{s.setPlaceholder(I("Please input your password")).inputEl.type="password"}),o=t.createDiv("button-group"),a=o.createEl("button",{text:I("Cancel")}),i=o.createEl("button",{cls:"thino-password-confirm-btn",text:I("Confirm?").replace(/(\?|?)/g,"")});i.onclick=async()=>{r.controlEl.querySelector("input").value===this.plugin.settings.password?(this.cb?.(!0),this.close()):new A.Notice(I("Password is incorrect"))},a.onclick=async()=>{this.close()}}onClose(){const{contentEl:t}=this;t.empty()}}class qqe extends A.Modal{plugin;constructor(t,n){super(t),this.plugin=n}onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("api-documentation-modal"),this.titleEl.setText("Thino API Documentation");const n=t.createDiv("api-doc-container"),r=n.createDiv("api-section");r.createEl("h2",{text:"Overview"}),r.createEl("p",{text:"The Thino HTTP API allows you to interact with your thinos programmatically. All endpoints require authentication using a Bearer token."});const o=r.createDiv("server-info");o.createEl("strong",{text:"Server Address: "}),o.createSpan({text:`http://${this.plugin.settings.HttpApiIpType}:${this.plugin.settings.HttpApiPort}`});const a=n.createDiv("api-section");a.createEl("h2",{text:"Authentication"}),a.createEl("p",{text:'All API requests require a Bearer token in the Authorization header. Generate a token using the "Generate Token" button above.'});const i=a.createDiv("code-example");i.createEl("h4",{text:"Authorization Header Format:"}),i.createEl("pre").createEl("code",{text:"Authorization: Bearer <your-token-here>"});const l=n.createDiv("api-section");l.createEl("h2",{text:"API Endpoints"}),this.createEndpointSection(l,{title:"Create Thino",method:"POST",endpoint:"/create",description:"Create a new thino with text content and optional images",parameters:[{name:"text",type:"string",required:!0,description:"The content of the thino"},{name:"isList",type:"boolean",required:!1,description:"Whether to format as list item (default: false)"},{name:"type",type:"string",required:!1,description:"Save location type (DAILY, CANVAS, MULTI, FILE)"},{name:"imageList",type:"array",required:!1,description:"Array of base64 encoded images"},{name:"sourceLink",type:"string",required:!1,description:"Source URL to append to the thino"}],examples:{curl:this.generateCurlExample("POST","/create",{text:"This is my new thino",isList:!1,type:"DAILY"}),python:this.generatePythonExample("POST","/create",{text:"This is my new thino",isList:!1,type:"DAILY"}),nodejs:this.generateNodeExample("POST","/create",{text:"This is my new thino",isList:!1,type:"DAILY"})}}),this.createEndpointSection(l,{title:"Search Thinos",method:"GET",endpoint:"/search",description:"Search for thinos containing specific keywords",parameters:[{name:"keyword",type:"string",required:!0,description:"Search keyword"}],examples:{curl:this.generateCurlExample("GET","/search?keyword=meeting"),python:this.generatePythonExample("GET","/search?keyword=meeting"),nodejs:this.generateNodeExample("GET","/search?keyword=meeting")}}),this.createEndpointSection(l,{title:"List Thinos",method:"GET",endpoint:"/list",description:"Get a list of recent thinos",parameters:[{name:"count",type:"number",required:!1,description:"Number of thinos to return (1-100, default: 10)"}],examples:{curl:this.generateCurlExample("GET","/list?count=20"),python:this.generatePythonExample("GET","/list?count=20"),nodejs:this.generateNodeExample("GET","/list?count=20")}}),this.createEndpointSection(l,{title:"Get Settings Info",method:"GET",endpoint:"/info",description:"Get current plugin settings information",parameters:[{name:"getSettings",type:"boolean",required:!0,description:"Must be true to retrieve settings"}],examples:{curl:this.generateCurlExample("GET","/info?getSettings=true"),python:this.generatePythonExample("GET","/info?getSettings=true"),nodejs:this.generateNodeExample("GET","/info?getSettings=true")}});const u=n.createDiv("api-section");u.createEl("h2",{text:"Response Format"}),u.createEl("p",{text:"All API responses return JSON in the following format:"});const f=u.createDiv("code-example"),h=f.createDiv();h.createEl("h4",{text:"Success Response:"}),h.createEl("pre").createEl("code",{text:JSON.stringify({status:"success",data:"..."},null,2)});const m=f.createDiv();m.createEl("h4",{text:"Error Response:"}),m.createEl("pre").createEl("code",{text:JSON.stringify({status:"error",message:"Error description"},null,2)});const b=n.createDiv("api-section");b.createEl("h2",{text:"Common Error Codes"});const y=b.createEl("ul");y.createEl("li",{text:"401 Unauthorized - Missing or invalid token"}),y.createEl("li",{text:"403 Forbidden - Pro license required"}),y.createEl("li",{text:"404 Not Found - Endpoint not found"}),y.createEl("li",{text:"405 Method Not Allowed - Wrong HTTP method"}),y.createEl("li",{text:"413 Request Too Large - Request body too large"}),y.createEl("li",{text:"429 Too Many Requests - Rate limit exceeded"});const x=t.createDiv("button-group").createEl("button",{text:"Close"});x.onclick=()=>this.close()}createEndpointSection(t,n){const r=t.createDiv("endpoint-section"),o=r.createDiv("endpoint-header");if(o.createEl("h3",{text:n.title}),o.createEl("span",{cls:`method-badge method-${n.method.toLowerCase()}`,text:n.method}),o.createEl("code",{cls:"endpoint-path",text:n.endpoint}),r.createEl("p",{text:n.description}),n.parameters.length>0){r.createEl("h4",{text:"Parameters:"});const x=r.createEl("table",{cls:"param-table"}),E=x.createEl("tr");E.createEl("th",{text:"Name"}),E.createEl("th",{text:"Type"}),E.createEl("th",{text:"Required"}),E.createEl("th",{text:"Description"}),n.parameters.forEach(C=>{const M=x.createEl("tr");M.createEl("td",{text:C.name}),M.createEl("td",{text:C.type}),M.createEl("td",{text:C.required?"Yes":"No"}),M.createEl("td",{text:C.description})})}r.createEl("h4",{text:"Examples:"});const a=r.createDiv("example-tabs"),i=a.createDiv("tab-buttons"),s=i.createEl("button",{text:"cURL",cls:"tab-btn active"}),l=i.createEl("button",{text:"Python",cls:"tab-btn"}),u=i.createEl("button",{text:"Node.js",cls:"tab-btn"}),f=a.createDiv("tab-contents"),h=f.createDiv("tab-content active");h.createEl("pre").createEl("code",{text:n.examples.curl}),this.addCopyButton(h,n.examples.curl);const m=f.createDiv("tab-content");m.createEl("pre").createEl("code",{text:n.examples.python}),this.addCopyButton(m,n.examples.python);const b=f.createDiv("tab-content");b.createEl("pre").createEl("code",{text:n.examples.nodejs}),this.addCopyButton(b,n.examples.nodejs);const S=(x,E)=>{i.querySelectorAll(".tab-btn").forEach(C=>C.removeClass("active")),f.querySelectorAll(".tab-content").forEach(C=>C.removeClass("active")),x.addClass("active"),E.addClass("active")};s.onclick=()=>S(s,h),l.onclick=()=>S(l,m),u.onclick=()=>S(u,b)}addCopyButton(t,n){const r=t.createEl("button",{text:"Copy",cls:"copy-btn"});r.onclick=async()=>{await navigator.clipboard.writeText(n),r.setText("Copied!"),setTimeout(()=>r.setText("Copy"),2e3)}}generateCurlExample(t,n,r){const o=`http://${this.plugin.settings.HttpApiIpType}:${this.plugin.settings.HttpApiPort}`;let a=`curl -X ${t} ${o}${n} \\
-H "Authorization: Bearer <your-token>"`;return r&&t!=="GET"&&(a+=` \\
-H "Content-Type: application/json" \\
-d '${JSON.stringify(r,null,2)}'`),a}generatePythonExample(t,n,r){let a=`import requests
import json
url = "${`http://${this.plugin.settings.HttpApiIpType}:${this.plugin.settings.HttpApiPort}`}${n}"
headers = {
"Authorization": "Bearer <your-token>"`;return r&&t!=="GET"&&(a+=`,
"Content-Type": "application/json"`),a+=`
}`,r&&t!=="GET"?a+=`
data = ${JSON.stringify(r,null,4)}
response = requests.${t.toLowerCase()}(url, headers=headers, json=data)`:a+=`
response = requests.${t.toLowerCase()}(url, headers=headers)`,a+=`
print(response.json())`,a}generateNodeExample(t,n,r){let a=`const fetch = require('node-fetch');
const url = '${`http://${this.plugin.settings.HttpApiIpType}:${this.plugin.settings.HttpApiPort}`}${n}';
const options = {
method: '${t}',
headers: {
'Authorization': 'Bearer <your-token>'`;return r&&t!=="GET"&&(a+=`,
'Content-Type': 'application/json'`),a+=`
}`,r&&t!=="GET"&&(a+=`,
body: JSON.stringify(${JSON.stringify(r,null,8)})`),a+=`
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));`,a}onClose(){const{contentEl:t}=this;t.empty()}}function AS(e){return e.split("-")[0]}function LU(e){return e.split("-")[1]}function gA(e){return["top","bottom"].includes(AS(e))?"x":"y"}function RU(e){return e==="y"?"height":"width"}function g9(e){let{reference:t,floating:n,placement:r}=e;const o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2;let i;switch(AS(r)){case"top":i={x:o,y:t.y-n.height};break;case"bottom":i={x:o,y:t.y+t.height};break;case"right":i={x:t.x+t.width,y:a};break;case"left":i={x:t.x-n.width,y:a};break;default:i={x:t.x,y:t.y}}const s=gA(r),l=RU(s);switch(LU(r)){case"start":i[s]=i[s]-(t[l]/2-n[l]/2);break;case"end":i[s]=i[s]+(t[l]/2-n[l]/2);break}return i}const $qe=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n;let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:u}=g9({...s,placement:r}),f=r,h={};for(let p=0;p<a.length;p++){const{name:m,fn:w}=a[p],{x:b,y,data:S,reset:x}=await w({x:l,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:s,platform:i,elements:{reference:e,floating:t}});if(l=b??l,u=y??u,h={...h,[m]:S??{}},x){typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(s=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:l,y:u}=g9({...s,placement:f})),p=-1;continue}}return{x:l,y:u,placement:f,strategy:o,middlewareData:h}};function Kqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jqe(e){return typeof e!="number"?Kqe(e):{top:e,right:e,bottom:e,left:e}}function QE(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function eC(e,t){t===void 0&&(t={});const{x:n,y:r,platform:o,rects:a,elements:i,strategy:s}=e,{boundary:l="clippingParents",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=t,m=Jqe(p),b=i[h?f==="floating"?"reference":"floating":f],y=await o.getClippingClientRect({element:await o.isElement(b)?b:b.contextElement||await o.getDocumentElement({element:i.floating}),boundary:l,rootBoundary:u}),S=QE(await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?{...a.floating,x:n,y:r}:a.reference,offsetParent:await o.getOffsetParent({element:i.floating}),strategy:s}));return{top:y.top-S.top+m.top,bottom:S.bottom-y.bottom+m.bottom,left:y.left-S.left+m.left,right:S.right-y.right+m.right}}const Xqe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ww(e){return e.replace(/left|right|bottom|top/g,t=>Xqe[t])}function Qqe(e,t){const n=LU(e)==="start",r=gA(e),o=RU(r);let a=r==="x"?n?"right":"left":n?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Ww(a)),{main:a,cross:Ww(a)}}const e$e={start:"end",end:"start"};function v9(e){return e.replace(/start|end/g,t=>e$e[t])}function t$e(e){const t=Ww(e);return[v9(e),t,v9(t)]}const n$e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s}=t;if((n=a.flip)!=null&&n.skip)return{};const{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",flipAlignment:p=!0,...m}=e,w=AS(o),y=f||(w===s||!p?[Ww(s)]:t$e(s)),S=[s,...y],x=await eC(t,m),E=[];let C=((r=a.flip)==null?void 0:r.overflows)||[];if(l&&E.push(x[w]),u){const{main:F,cross:R}=Qqe(o,i);E.push(x[F],x[R])}if(C=[...C,{placement:o,overflows:E}],!E.every(F=>F<=0)){var M,k;const F=((M=(k=a.flip)==null?void 0:k.index)!=null?M:0)+1,R=S[F];if(R)return{data:{index:F,overflows:C},reset:{placement:R}};let B="bottom";switch(h){case"bestFit":{var O;const Y=(O=C.slice().sort((H,Z)=>H.overflows.filter(W=>W>0).reduce((W,$)=>W+$,0)-Z.overflows.filter(W=>W>0).reduce((W,$)=>W+$,0))[0])==null?void 0:O.placement;Y&&(B=Y);break}case"initialPlacement":B=s;break}return{data:{skip:!0},reset:{placement:B}}}return{}}}};function r$e(e){let{placement:t,rects:n,value:r}=e;const o=AS(t),a=["left","top"].includes(o)?-1:1,i=typeof r=="function"?r({...n,placement:t}):r,{mainAxis:s,crossAxis:l}=typeof i=="number"?{mainAxis:i,crossAxis:0}:{mainAxis:0,crossAxis:0,...i};return gA(o)==="x"?{x:l,y:s*a}:{x:s*a,y:l}}const o$e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:r,placement:o,rects:a}=t,i=r$e({placement:o,rects:a,value:e});return{x:n+i.x,y:r+i.y,data:i}}}};function vA(e){return e?.toString()==="[object Window]"}function rc(e){if(e==null)return window;if(!vA(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function NS(e){return rc(e).getComputedStyle(e)}function Ks(e){return vA(e)?"":e?(e.nodeName||"").toLowerCase():""}function Js(e){return e instanceof rc(e).HTMLElement}function Gw(e){return e instanceof rc(e).Element}function a$e(e){return e instanceof rc(e).Node}function FU(e){const t=rc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function OS(e){const{overflow:t,overflowX:n,overflowY:r}=NS(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function i$e(e){return["table","td","th"].includes(Ks(e))}function HU(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=NS(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}const y9=Math.min,Bp=Math.max,Zw=Math.round;function xf(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let r=1,o=1;return t&&Js(e)&&(r=e.offsetWidth>0&&Zw(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Zw(n.height)/e.offsetHeight||1),{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function oc(e){return((a$e(e)?e.ownerDocument:e.document)||window.document).documentElement}function PS(e){return vA(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function BU(e){return xf(oc(e)).left+PS(e).scrollLeft}function s$e(e){const t=xf(e);return Zw(t.width)!==e.offsetWidth||Zw(t.height)!==e.offsetHeight}function l$e(e,t,n){const r=Js(t),o=oc(t),a=xf(e,r&&s$e(t));let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Ks(t)!=="body"||OS(o))&&(i=PS(t)),Js(t)){const l=xf(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=BU(o));return{x:a.left+i.scrollLeft-s.x,y:a.top+i.scrollTop-s.y,width:a.width,height:a.height}}function jS(e){return Ks(e)==="html"?e:e.assignedSlot||e.parentNode||(FU(e)?e.host:null)||oc(e)}function b9(e){return!Js(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function c$e(e){let t=jS(e);for(;Js(t)&&!["html","body"].includes(Ks(t));){if(HU(t))return t;t=t.parentNode}return null}function tC(e){const t=rc(e);let n=b9(e);for(;n&&i$e(n)&&getComputedStyle(n).position==="static";)n=b9(n);return n&&(Ks(n)==="html"||Ks(n)==="body"&&getComputedStyle(n).position==="static"&&!HU(n))?t:n||c$e(e)||t}function w9(e){return{width:e.offsetWidth,height:e.offsetHeight}}function u$e(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Js(n),a=oc(n);if(n===a)return t;let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&r!=="fixed")&&((Ks(n)!=="body"||OS(a))&&(i=PS(n)),Js(n))){const l=xf(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+s.x,y:t.y-i.scrollTop+s.y}}function d$e(e){const t=rc(e),n=oc(e),r=t.visualViewport;let o=n.clientWidth,a=n.clientHeight,i=0,s=0;return r&&(o=r.width,a=r.height,Math.abs(t.innerWidth/r.scale-r.width)<.01&&(i=r.offsetLeft,s=r.offsetTop)),{width:o,height:a,x:i,y:s}}function f$e(e){var t;const n=oc(e),r=PS(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=Bp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Bp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+BU(e);const l=-r.scrollTop;return NS(o||n).direction==="rtl"&&(s+=Bp(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}function _U(e){return["html","body","#document"].includes(Ks(e))?e.ownerDocument.body:Js(e)&&OS(e)?e:_U(jS(e))}function YU(e,t){var n;t===void 0&&(t=[]);const r=_U(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=rc(r),i=o?[a].concat(a.visualViewport||[],OS(r)?r:[]):r,s=t.concat(i);return o?s:s.concat(YU(jS(i)))}function h$e(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&FU(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function p$e(e){const t=xf(e),n=t.top+e.clientTop,r=t.left+e.clientLeft;return{top:n,left:r,x:r,y:n,right:r+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function S9(e,t){return t==="viewport"?QE(d$e(e)):Gw(t)?p$e(t):QE(f$e(oc(e)))}function m$e(e){const t=YU(jS(e)),r=["absolute","fixed"].includes(NS(e).position)&&Js(e)?tC(e):e;return Gw(r)?t.filter(o=>Gw(o)&&h$e(o,r)&&Ks(o)!=="body"):[]}function g$e(e){let{element:t,boundary:n,rootBoundary:r}=e;const a=[...n==="clippingParents"?m$e(t):[].concat(n),r],i=a[0],s=a.reduce((l,u)=>{const f=S9(t,u);return l.top=Bp(f.top,l.top),l.right=y9(f.right,l.right),l.bottom=y9(f.bottom,l.bottom),l.left=Bp(f.left,l.left),l},S9(t,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}const v$e={getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:l$e(t,tC(n),r),floating:{...w9(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>u$e(e),getOffsetParent:e=>{let{element:t}=e;return tC(t)},isElement:e=>Gw(e),getDocumentElement:e=>{let{element:t}=e;return oc(t)},getClippingClientRect:e=>g$e(e),getDimensions:e=>{let{element:t}=e;return w9(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},y$e=(e,t,n)=>$qe(e,t,{platform:v$e,...n});var b$e=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;o--!==0;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const w$e=Xe(b$e),pI=_p.Facet.define({combine:e=>({defaultPlacement:e.find(t=>t.defaultPlacement)?.defaultPlacement||"top",padding:e.find(t=>t.padding)?.padding||8})}),zU=e=>e.split("-")[0],S$e=e=>e==="x"?"y":"x",T$e=e=>["top","bottom"].includes(zU(e))?"x":"y",hp=(e,t,n)=>Math.max(e,Math.min(t,n)),x$e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r],o)=>[n,t(r,n,o)])),I$e=e=>e===void 0?e:typeof e=="number"?-e:x$e(e,t=>t!==void 0?-t:t),k$e=(e={})=>({name:"shift",fn:async t=>{const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s=({x:y,y:S})=>({x:y,y:S}),editorMenu:l,...u}=e,f={x:n,y:r},h=await eC(t,u),p=T$e(zU(o)),m=S$e(p);let w=f[p],b=f[m];if(a){const y=p==="y"?"top":"left",S=p==="y"?"bottom":"right",x=w+h[y],E=w-h[S];if(l){const C=await eC(t,{...u,boundary:l.dom,padding:I$e(u.padding)});if((m==="y"?["top","bottom"]:["left","right"]).every(k=>C[k]<=0)){const k=t.rects.floating.width,O=w+C[y]-k,F=w-C[S]+k,R=Math.abs(h[y]-C[y]),B=Math.abs(h[S]-C[S]);R>=k||B<R?w=hp(x,w,O):w=hp(F,w,E)}else w=hp(x,w,E)}else w=hp(x,w,E)}if(i){const y=m==="y"?"top":"left",S=m==="y"?"bottom":"right",x=b+h[y],E=b-h[S];b=hp(x,b,E)}return s({...t,[p]:w,[m]:b})}}),E$e="thino-mini-toolbar",C$e=(e=0,t=0)=>({width:0,height:0,top:t,left:e,bottom:t,right:e,x:e,y:t}),M$e=(e,t)=>{if(!e)return null;const n=Math.min(e.left,t?.left??e.left),r=Math.max(e.right,t?.right??e.right),o=Math.max(e.bottom,t?.bottom??e.bottom)-Math.min(e.top,t?.top??e.top),a=Math.min(e.top,t?.top??e.top),i=a+o,s={left:n,right:r,top:a,bottom:i,width:0,height:o,x:a,y:n};return t&&(s.width=Math.abs(r-n)),s},D$e=C$e();class A$e{constructor(t){this.view=t,this.containerEl=this.view.dom.parentElement,this.defaultPlacement=this.view.state.facet(pI).defaultPlacement,this.tooltipInfo=t.state.facet(nC),this.virtualEl={rect:D$e,getBoundingClientRect(){return this.rect}},this.maybeMeasure(),this.editorMenu={currMenu:null,evtRef:t.state.field(A.editorInfoField)},this.isThinoView=this.checkThinoView()}containerEl;virtualEl;toolbar=null;isThinoView;get workspace(){return this.view.state.field(A.editorInfoField).app.workspace}tooltipInfo;inView=!0;defaultPlacement;editorMenu;checkThinoView(){return this.view.state.field(A.editorInfoField)?this.view.state.field(A.editorInfoField)&&this.view.state.field(A.editorInfoField)?.getViewType?.()==="thino_view":!1}shouldRemoveToolbar(t){return!((t??this.tooltipInfo)?.end||this.editorMenu.currMenu)}onEditorMenuOpen(t){this.editorMenu.currMenu||(this.editorMenu.currMenu=t,this.cachedRefRect?this.computePosition(this.cachedRefRect):this.maybeMeasure(),!A.Platform.isMacOS&&this.tooltipInfo&&(this.createToolbar(),this.maybeMeasure()))}onEditorMenuClose(t){this.editorMenu.currMenu===t&&(this.editorMenu.currMenu=null),!A.Platform.isMacOS&&this.toolbar&&this.shouldRemoveToolbar()&&this.removeToolbar()}createToolbar(t){const n=t??this.tooltipInfo;if(!n)return;this.removeToolbar();const r=n.create(this.containerEl),o=this.view.state.field(A.editorInfoField);if(!o||!o?.editor)return;const a=o.editor.offsetToPos(n.start),i=n.end?o.editor.offsetToPos(n.end):a;this.workspace.trigger(E$e,r,{from:a,to:i},o.editor,o),this.toolbar=r}removeToolbar(){this.toolbar&&(this.toolbar.hide(),this.toolbar=null)}update(t){if(!this.isThinoView)return;const n=t.state.facet(nC),r=n!==this.tooltipInfo&&!w$e(n,this.tooltipInfo);r&&(this.tooltipInfo=n,this.shouldRemoveToolbar()?this.removeToolbar():n&&!this.toolbar&&this.createToolbar(n));const o=r||t.geometryChanged,a=t.state.facet(pI);a.defaultPlacement!=this.defaultPlacement&&(a.defaultPlacement=this.defaultPlacement),o&&this.maybeMeasure()}destroy(){this.editorMenu.currMenu=null,this.removeToolbar(),this.toolbar=null,this.view.state.field(A.editorInfoField).app.workspace.offref(this.editorMenu.evtRef)}cachedRefRect=null;readFromDOM=()=>{if(this.tooltipInfo){const{start:t}=this.tooltipInfo;let{end:n}=this.tooltipInfo;n&&t===n&&(n=void 0);const r=this.view.coordsAtPos(t);let o=n?this.view.coordsAtPos(n):null;if(r&&o&&r.top!==o.top){const i=this.view.contentDOM.getBoundingClientRect();o={left:i.right,right:i.right,top:r.top,bottom:r.bottom}}const a=M$e(r,o);a&&(this.cachedRefRect=a,this.computePosition(a))}};async computePosition(t){if(!this.toolbar)return;this.virtualEl.rect=t;const{padding:n}=this.view.state.facet(pI),{x:r,y:o}=await y$e(this.virtualEl,this.toolbar.dom,{placement:this.defaultPlacement,middleware:[o$e({mainAxis:5}),n$e({padding:n,boundary:this.view.scrollDOM}),k$e({padding:n,boundary:this.view.scrollDOM,editorMenu:this.editorMenu.currMenu})]});Object.assign(this.toolbar.dom.style,{top:"0",left:"0",transform:`translate(${Math.round(r)}px,${Math.round(o)}px)`})}maybeMeasure(){this.view.inView&&this.toolbar&&this.view.requestMeasure({read:this.readFromDOM}),this.inView!=this.view.inView&&(this.inView=this.view.inView,this.inView||this.removeToolbar())}}const N$e=_i.ViewPlugin.fromClass(A$e,{eventHandlers:{scroll(){this.maybeMeasure()}}}),nC=_p.Facet.define({enables:[N$e],combine:e=>e.filter(t=>t!=null).first()??null}),O$e=e=>{const t=F$e(e);t&&window.navigator.clipboard.writeText(t?.getSelection())},P$e=e=>{e.commands.executeCommandById("editor:toggle-bold",e)},j$e=e=>{e.commands.executeCommandById("editor:toggle-strikethrough",e)},L$e=e=>{e.commands.executeCommandById("editor:toggle-highlight",e)},R$e=e=>{e.commands.executeCommandById("editor:toggle-italics",e)},F$e=e=>{const{editor:t}=e.field(A.editorInfoField);return t},T9=(e,t)=>{const n=e.selection.ranges[0];if(!n)return null;const{anchor:r,head:o,empty:a}=n,[i,s]=[r,o].sort();return{start:i,end:a?void 0:s,create:u=>new Y$e(u).addSmallButton(h=>h.setClass("clickable-icon").setIcon("copy").onClick(()=>O$e(e))).addSmallButton(h=>h.setClass("clickable-icon").setIcon("bold").onClick(()=>P$e(t))).addSmallButton(h=>h.setClass("clickable-icon").setIcon("italic").onClick(()=>R$e(t))).addSmallButton(h=>h.setClass("clickable-icon").setIcon("strikethrough").onClick(()=>j$e(t))).addSmallButton(h=>h.setClass("clickable-icon").setIcon("highlighter").onClick(()=>L$e(t)))}},H$e=e=>_p.StateField.define({create:t=>T9(t,e),update:(t,n)=>!n.docChanged&&!n.selection?t:T9(n.state,e),provide:t=>nC.from(t)}),B$e=e=>[H$e(e)];class _$e extends A.BaseComponent{button;disabled=!1;dropdownOptions=[];menu;menuOpened=!1;constructor(t){super(),this.button=new A.ButtonComponent(t)}setDisabled(t){return this.button.setDisabled(t),this.disabled=t,this}setIcon(t){return this.button.setIcon(t),this}setClass(t){return this.button.setClass(t),this}setDropdownText(t){const n=this.button.buttonEl.createDiv("mini-toolbar-text"),r=this.button.buttonEl.createDiv("mini-toolbar-icon-with-text");A.setIcon(r,"chevron-down");const o=t.doc.lineAt(t.selection.ranges[0].from)?.from,a=a1.syntaxTree(t).resolveInner(o+1),i=a.type.prop(a1.tokenClassNodeProp);return n.setText(this.detectFormat(i,a)||"Text"),this}setDropdownIcon(){const t=this.button.buttonEl.createDiv("mini-toolbar-highlight-icon"),n=this.button.buttonEl.createDiv("mini-toolbar-icon-with-icon");return A.setIcon(t,"highlighter"),A.setIcon(n,"chevron-down"),this}detectFormat(t,n){if(!t)return"Text";if(t.includes("strong"))return"Bold";if(t.includes("em"))return"Italic";if(t.includes("strikethrough"))return"Strike";if(t.contains("hmd-codeblock"))return"CodeBlock";if(t.contains("hmd-inline-code"))return"Code";if(t.contains("formatting-header")){const r=t.match(/header-\d{1,}/);if(r)return"Heading "+r[0].slice(-1)}if(t.contains("formatting-list")||t.contains("hmd-list-indent")){if(n?.parent&&n.parent?.type.prop(a1.lineClassNodeProp)?.contains("HyperMD-task-line"))return"To-do list";if(t.contains("formatting-list-ol"))return"Numbered list";if(t.contains("formatting-list-ul"))return"Bulleted list"}}setTooltip(t){return this.button.setTooltip(t),this}setOptionsList(t){return this.dropdownOptions=t,this}onClick(t){return this.dropdownOptions.length>0?(this.button.onClick(n=>this.showEditMenu(n)),this):(this.button.onClick(t),this)}showEditMenu(t){if(this.menuOpened=!this.menuOpened,!this.menuOpened)return;this.menu=new A.Menu,this.menu.onHide(()=>{this.menuOpened=!1});const n=t.currentTarget,r=t.currentTarget?.getBoundingClientRect(),o={x:r.left-6,y:r.bottom+6};for(let a=0;a<this.dropdownOptions?.length;a++)this.menu.addItem(i=>{i.setIcon("zap").setTitle(this.dropdownOptions[a]).onClick(()=>{})});this.menu.setParentElement(n).showAtPosition(o)}then(t){return t(this),this}}class Y$e extends A.Component{dom;smallBtnContainer;constructor(t){super();const n=t?.closest(".memo-editor-wrapper");this.dom=n.createDiv({cls:"cm-mini-toolbar"},r=>r.style.position="absolute"),this.smallBtnContainer=this.dom}addSmallButton(t){return t(new _$e(this.smallBtnContainer)),this}unloading=!1;hide(){return this.unload(),this.unloading?this:(this.unloading=!0,this.dom.detach(),this.unloading=!1,this)}}const z$e=_i.Decoration.line({attributes:{"data-ph":I("What do you think now...")},class:"thino-editor-placeholder"}),U$e=_p.StateField.define({create(){return _i.Decoration.none},update(e,t){const n=t.state.field(A.editorInfoField);if(!n||n.getViewType&&n.getViewType()!=="thino_view")return e;const r=new _p.RangeSetBuilder,o=t.state.doc.toString(),a=t.state.doc.lineAt(0);return o?.length==0&&r.add(a.from,a.from,z$e),r.finish()},provide:e=>_i.EditorView.decorations.from(e)});function UU(e){return`userId:${e}`}function V$e(e,t){return`expiryDate:${t}:${e}`}function W$e(e){try{if(!e?.appId)return"";const t=UU(e.appId);return Xn.get([t])[t]||""}catch(t){return console.error(t),""}}function G$e(e,t){try{if(!t?.appId)return;const n=UU(t.appId);return Xn.set({[n]:e}),{userId:e,key:n}}catch(n){console.error(n)}}function Z$e(e,t){try{if(!t?.appId)return;const n=V$e(W$e(t),t.appId);Xn.set({[n]:e})}catch(n){console.error(n)}}const q$e=require("http"),$$e=require("url");class K$e{worker=null;server=null;isServerRunning=!1;plugin;settings;messageHandlers=new Map;tokenManager;constructor(t,n){this.plugin=t,this.settings=n,this.tokenManager=new XE(t)}async initializeWorker(){if(!this.worker)try{this.createSecureServer()}catch(t){throw console.error("Failed to initialize worker:",t),t}}createSecureServer(){this.server=q$e.createServer(async(t,n)=>{n.setHeader("Access-Control-Allow-Origin","*"),n.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),n.setHeader("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept, Authorization, Cache-Control, Pragma"),n.setHeader("Access-Control-Allow-Credentials","false"),n.setHeader("Access-Control-Max-Age","86400"),n.setHeader("X-Content-Type-Options","nosniff"),n.setHeader("X-Frame-Options","DENY"),n.setHeader("X-XSS-Protection","1; mode=block"),n.setHeader("Strict-Transport-Security","max-age=31536000; includeSubDomains");try{await this.handleRequest(t,n)}catch(r){console.error("Request handling error:",r),this.sendErrorResponse(n,500,"Internal server error")}}),this.server.on("error",t=>{console.error("Server error:",t),new A.Notice("Thino - Server error: "+t.message)}),this.server.on("clientError",(t,n)=>{console.error("Client error:",t),n.end(`HTTP/1.1 400 Bad Request\r
\r
`)})}async handleRequest(t,n){if(!t.url){this.sendErrorResponse(n,400,"Invalid request");return}const r=$$e.parse(t.url,!0),o=r.pathname;if(t.method==="OPTIONS"){n.statusCode=200,n.setHeader("Content-Length","0"),n.end();return}const i=t.headers.authorization;if(!i){this.sendErrorResponse(n,401,"Missing authorization header");return}const s=this.tokenManager.extractTokenFromHeader(i);if(!s){this.sendErrorResponse(n,401,"Invalid authorization format");return}if(!await this.tokenManager.validateToken(s)){this.sendErrorResponse(n,401,"Invalid or expired token");return}if(!await this.tokenManager.isUserVerified()){this.sendErrorResponse(n,403,"Pro license required");return}const f=t.socket.remoteAddress||"unknown";if(!this.checkRateLimit(f)){this.sendErrorResponse(n,429,"Too many requests");return}try{switch(o){case"/create":await this.handleCreateRequest(t,n);break;case"/search":await this.handleSearchRequest(t,n,r.query);break;case"/list":await this.handleListRequest(t,n,r.query);break;case"/info":await this.handleInfoRequest(t,n,r.query);break;default:this.sendErrorResponse(n,404,"Not found");break}}catch(h){console.error("Route handling error:",h),this.sendErrorResponse(n,500,"Internal server error")}}async handleCreateRequest(t,n){if(t.method!=="POST"){this.sendErrorResponse(n,405,"Method not allowed");return}let r="",o=0;const a=10*1024*1024;t.on("data",i=>{if(o+=i.length,o>a){this.sendErrorResponse(n,413,"Request too large");return}r+=i.toString()}),t.on("end",async()=>{try{const i=this.validateAndSanitizeInput(JSON.parse(r)),s=await this.processCreateRequest(i);n.statusCode=200,n.setHeader("Content-Type","application/json"),n.end(JSON.stringify(s))}catch(i){console.error("Create request error:",i),this.sendErrorResponse(n,400,"Invalid request data")}}),t.on("error",i=>{console.error("Request stream error:",i),this.sendErrorResponse(n,400,"Request error")})}async handleSearchRequest(t,n,r){if(t.method!=="GET"){this.sendErrorResponse(n,405,"Method not allowed");return}const o=this.sanitizeInput(r.keyword);if(!o){this.sendErrorResponse(n,400,"Invalid keyword");return}try{const a=le.getThinoViaKeyword(o);n.statusCode=200,n.setHeader("Content-Type","application/json"),n.end(JSON.stringify({status:"success",thinos:a}))}catch(a){console.error("Search error:",a),this.sendErrorResponse(n,500,"Search failed")}}async handleListRequest(t,n,r){if(t.method!=="GET"){this.sendErrorResponse(n,405,"Method not allowed");return}const o=r.count,a=Math.min(Math.max(parseInt(o)||10,1),100);try{const i=le.getState().memos.slice(0,a);n.statusCode=200,n.setHeader("Content-Type","application/json"),n.end(JSON.stringify({status:"success",thinos:i}))}catch(i){console.error("List error:",i),this.sendErrorResponse(n,500,"List failed")}}async handleInfoRequest(t,n,r){if(t.method!=="GET"){this.sendErrorResponse(n,405,"Method not allowed");return}if(!r.getSettings){this.sendErrorResponse(n,400,"Missing getSettings parameter");return}try{const o=Ze.getState().settings;n.statusCode=200,n.setHeader("Content-Type","application/json"),n.end(JSON.stringify({status:"success",infoSettings:o}))}catch(o){console.error("Info error:",o),this.sendErrorResponse(n,500,"Info retrieval failed")}}validateAndSanitizeInput(t){if(!t||typeof t!="object")throw new Error("Invalid request data");return{text:this.sanitizeInput(t.text||""),isList:!!t.isList,type:this.sanitizeInput(t.type||""),imageList:Array.isArray(t.imageList)?t.imageList.slice(0,10):[],sourceLink:this.sanitizeInput(t.sourceLink||"")}}sanitizeInput(t){return typeof t!="string"?"":t.replace(/[<>]/g,"").replace(/javascript:/gi,"").replace(/data:/gi,"").substring(0,1e4)}async processCreateRequest(t){const{text:n,isList:r,type:o,imageList:a,sourceLink:i}=t;if(!n)return{status:"success",thino:null,link:null};let s=n;if(/<[a-zA-Z][^>]*>/g.test(n)&&(s=A.htmlToMarkdown(n)),i)try{const h=decodeURIComponent(i);s=`${s} [source](<${h}>)`}catch(h){console.warn("Failed to decode source link:",h)}this.settings.AutoDownloadImage&&a.length>0&&(s=await this.processImages(s,a)),this.plugin.settings?.AppendOrPrependTextViaServer&&(s=this.formatText(s));const u=o||this.settings.MemoSaveLocation,f=await le.createThino({content:s,isList:r,type:u});return f&&(le.pushMemo(f),Ye.clearQuery()),{status:"success",thino:f,link:f?`obsidian://thino?openId=${f.id}`:null}}async processImages(t,n){try{const r=t.match(Kw)||[],o=[];for(const i of r.slice(0,5))try{const s=await je.grabImageFromUrl(i);if(s.size===0)continue;const l=new File([s],"image.png",{type:"image/png"}),u=await this.handleUploadFile(l);u&&o.push({oldUrl:i,newUrl:u})}catch(s){console.error("Error processing image URL:",s)}o.forEach(i=>{t=t.replace(i.oldUrl,i.newUrl)});const a=[];for(const i of n.slice(0,5))try{if(typeof i=="string"&&i.startsWith("data:image/")){const s=this.base64ImageToBlob(i),l=new File([s],"image.png",{type:"image/png"}),u=await this.handleUploadFile(l);u&&a.push(u)}}catch(s){console.error("Error processing base64 image:",s)}a.length>0&&(t+=`
`+a.join(`
`))}catch(r){console.error("Error processing images:",r)}return t}base64ImageToBlob(t){const n=t.indexOf(";base64,");if(n===-1)throw new Error("Invalid base64 image format");const r=t.substring(5,n),o=t.substr(n+8);if(!/^[A-Za-z0-9+/]*={0,2}$/.test(o))throw new Error("Invalid base64 characters");const a=atob(o),i=new ArrayBuffer(a.length),s=new Uint8Array(i);for(let l=0;l<a.length;l++)s[l]=a.charCodeAt(l);return new Blob([i],{type:r})}async handleUploadFile(t){const{type:n}=t;if(!n.startsWith("image"))return null;try{return`${await dC.upload(t)}`}catch(r){return console.error("Upload error:",r),new A.Notice(r),null}}formatText(t){const n=this.settings;return`${n?.PrependViaServer||""}${n?.WithNewLineViaServer==="prepend"||n?.WithNewLineViaServer==="both"?`
`:""}${t}${n?.WithNewLineViaServer==="append"||n?.WithNewLineViaServer==="both"?`
`:""}${n?.AppendViaServer||""}`}sendErrorResponse(t,n,r){t.statusCode=n,t.setHeader("Content-Type","application/json"),t.setHeader("Access-Control-Allow-Origin","*"),t.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),t.setHeader("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept, Authorization, Cache-Control, Pragma"),t.end(JSON.stringify({status:"error",message:r}))}rateLimitMap=new Map;checkRateLimit(t){const n=Date.now(),r=6e4,o=100,a=this.rateLimitMap.get(t);return!a||n>a.resetTime?(this.rateLimitMap.set(t,{count:1,resetTime:n+r}),!0):a.count>=o?!1:(a.count++,!0)}async listen(t,n){try{await this.initializeWorker(),this.server.listen({port:parseInt(n),host:t},()=>{this.isServerRunning=!0,new A.Notice(`${I("Thino - Started HTTP server on port")} ${n}`)})}catch(r){throw console.error("Failed to start server:",r),new A.Notice(I("Thino - Failed to start HTTP server, please check the port is available.")),r}}close(){this.server&&this.isServerRunning&&this.server.close(()=>{this.isServerRunning=!1,new A.Notice(I("Thino - Terminated HTTP server"))}),this.worker&&(this.worker.terminate(),this.worker=null)}isRunning(){return this.isServerRunning}}function J$e(e,t){const n=new K$e(e,t);return{listen(r,o){n.listen(r,o)},close(){n.close()}}}const{clipboard:zr}=A.Platform.isDesktop?require("electron"):"";class X$e{eventListeners;constructor(){this.eventListeners={}}on(t,n){this.eventListeners[t]=this.eventListeners[t]||[],this.eventListeners[t].push(n)}once(t,n){n.$emitOnce=!0,this.on(t,n)}removeListener(t,n){if(this.eventListeners[t]){const r=this.eventListeners[t].findIndex(o=>o===n);r>=0&&this.eventListeners[t].splice(r,1)}}removeAllListeners(t){this.eventListeners[t]&&(this.eventListeners[t].length=0)}emit(t,...n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r.call(this,...n),r.$emitOnce&&this.removeListener(t,r)})}}const wd=new X$e;let pp=null,x9=zr?.readText(),I9=zr?.readImage();zr&&(zr.on=(e,t)=>(wd.on(e,t),zr),zr.once=(e,t)=>(wd.once(e,t),zr),zr.off=(e,t)=>(t?wd.removeListener(e,t):wd.removeAllListeners(e),zr),zr.startWatching=()=>(pp||(pp=setInterval(()=>{Q$e(x9,x9=zr?.readText())&&wd.emit("text-changed"),eKe(I9,I9=zr?.readImage())&&wd.emit("image-changed")},500)),zr),zr.stopWatching=()=>(pp&&clearInterval(pp),pp=null,zr));function Q$e(e,t){return t&&e!==t}function eKe(e,t){return!t.isEmpty()&&e.toDataURL()!==t.toDataURL()}const mI=require("electron")?.remote,k9=require("electron")?.remote?.screen;class tKe{constructor(t,n){this.app=t,this.plugin=n,this.isRegisted=!1,this.leaf=null,this.clipboard=zr}isRegisted;leaf;clipboard;isScreenTop=!1;currentSplitWindow;intervalNum;allowsCopy=!1;plugin;actionEl=null;async onload(){A.Platform.isDesktop&&(this.initGlobalCopyEvents(),await this.registerAllShortcuts(),this.registerEvents())}registerEvents(){this.plugin.registerEvent(this.app.workspace.on("quit",()=>{mI.globalShortcut.unregister(this.plugin.settings.CaptureKey.OpenThinoGlobally)}))}initGlobalCopyEvents(){this.plugin.addCommand({id:"init-global-copy-events",name:I("Global copy"),callback:()=>{this.allowsCopy=!this.allowsCopy,!this.allowsCopy&&this.clipboard.stopWatching(),this.allowsCopy&&this.clipboard.startWatching(),this.leaf&&this.allowsCopy&&(this.actionEl=this.leaf.view.addAction("clipboard-x","Stop global copying",()=>{this.allowsCopy=!1,this.clipboard.stopWatching(),this.actionEl?.remove()}))}})}onunload(){this.isRegisted&&(mI.globalShortcut.unregister(this.plugin.settings.CaptureKey.OpenThinoGlobally),this.clipboard.off("text-changed"),this.clipboard.off("image-changed"),this.clipboard.stopWatching(),this.leaf&&this.leaf.detach())}getCurrentLeaf(){return this.leaf?this.app.workspace.getLeavesOfType("thino_view").length>0&&!!this.app.workspace.getLeafById(this.leaf.id)?!0:(this.leaf?.detach(),this.currentSplitWindow.close(),this.currentSplitWindow=null,this.leaf=null,this.isScreenTop=!1,!1):!1}async registerAllShortcuts(){mI?.globalShortcut?.register(this.plugin.settings.CaptureKey.OpenThinoGlobally,()=>{this.getCurrentLeaf()?this.showThinoView():this.openThinoView()}),this.isRegisted=!0}showThinoView(){const t=k9.getCursorScreenPoint(),n=this.leaf?.parent?.parent?.win?.electronWindow;if(n){if(n.setAlwaysOnTop(!this.isScreenTop,"screen"),this.leaf.setPinned(!this.isScreenTop),this.leaf.view.containerEl.toggleClass("thino-float-window",!0),n.isMinimized()&&n.restore(),n.focus(),this.plugin.settings.CaptureKey.ShowNearMouse){const{width:r,height:o}=n.getBounds();n.setBounds({x:t.x,y:t.y,width:r,height:o})}if(this.app.workspace.trigger("focus-on-textarea"),this.isScreenTop){this.isScreenTop=!1,setTimeout(()=>{n.setAlwaysOnTop(!1,"screen")},200);return}this.isScreenTop=!0}}openThinoView(){this.leaf=this.app.workspace.openPopoutLeaf({size:{width:400,height:400}});const t=this.leaf;this.leaf.view.containerEl.toggleClass("thino-float-window",!0),this.leaf.setViewState({type:"thino_view"}),setTimeout(()=>{t.view.containerEl.classList.toggle("mobile-view",!0)},0),this.currentSplitWindow=this.leaf?.parent?.parent;const n=this.leaf?.parent?.parent?.win.electronWindow;if(!n)return;n.setAlwaysOnTop(!this.isScreenTop,"screen"),this.leaf.setPinned(!this.isScreenTop),this.isScreenTop=!0;const r=this.app,o=a=>{const i=k9.getCursorScreenPoint(),s=t?.parent?.parent?.win?.electronWindow;if(s){if(s.isMinimized()&&s.restore(),!this.isScreenTop&&this.plugin.settings.CaptureKey.ShowNearMouse){const{width:l,height:u}=s.getBounds();s.setBounds({x:i.x,y:i.y-200,width:l,height:u})}s.setAlwaysOnTop(!0,"screen"),r.workspace.trigger("focus-on-textarea"),r.workspace.trigger("send-to-thino",a,t)}};this.clipboard.on("text-changed",()=>{const a=this.clipboard.readText();o(a)}).on("image-changed",()=>{const a=this.clipboard.readImage();o(a)})}}class E9 extends A.EditorSuggest{root;editor;cursor;plugin;tags;type="customTag";HASHTAG_REGEX=/(^|\s)#[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]*$/g;constructor(t,n){super(t),this.plugin=n}checkSettings(){return this.plugin.settings.UseVaultTags}checkInMemosView(t){const n=t.containerEl;return n&&n.parentElement?.parentElement?.classList.contains("common-editor-inputer")||!1}fuzzySearchItemsOptimized(t,n){const r=A.prepareFuzzySearch(t);return n.map(a=>{const i=r(a);return i?{item:a,match:i}:null}).filter(Boolean)}onTrigger(t,n){if(!this.checkInMemosView(n)||this.checkSettings())return null;this.tags=le.getState().tags,this.cursor=t,this.editor=n;const r=t.line,o=n.getLine(r),a=o.substr(0,t.ch);if(a.match(this.HASHTAG_REGEX)&&o.substr(t.ch,1)!=="#"){const i=a.lastIndexOf("#"),s=a.substr(i+1);return{start:{line:r,ch:i},end:{line:r,ch:t.ch},query:s}}return null}getSuggestions(t){return this.fuzzySearchItemsOptimized(t.query,this.tags).map(n=>n.item).sort((n,r)=>n.localeCompare(r))||[]}renderSuggestion(t,n){n.setText(t)}selectSuggestion(t){if(this.context){const n=this.context.editor,r=this.context.start,o=this.context.end;n.transaction({changes:[{from:r,to:o,text:"#"+t+" "}]}),setTimeout(function(){return n.focus()})}this.close()}}const yA=crypto,VU=e=>e instanceof CryptoKey,Fy=new TextEncoder,bA=new TextDecoder;function nKe(...e){const t=e.reduce((o,{length:a})=>o+a,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}const rKe=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},gI=e=>{let t=e;t instanceof Uint8Array&&(t=bA.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return rKe(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class wA extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(t){super(t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class LS extends wA{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class Sr extends wA{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class oKe extends wA{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Is(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Hy(e,t){return e.name===t}function vI(e){return parseInt(e.name.slice(4),10)}function aKe(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function iKe(e,t){if(t.length&&!t.some(n=>e.usages.includes(n))){let n="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();n+=`one of ${t.join(", ")}, or ${r}.`}else t.length===2?n+=`one of ${t[0]} or ${t[1]}.`:n+=`${t[0]}.`;throw new TypeError(n)}}function sKe(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!Hy(e.algorithm,"HMAC"))throw Is("HMAC");const r=parseInt(t.slice(2),10);if(vI(e.algorithm.hash)!==r)throw Is(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Hy(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Is("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(vI(e.algorithm.hash)!==r)throw Is(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Hy(e.algorithm,"RSA-PSS"))throw Is("RSA-PSS");const r=parseInt(t.slice(2),10);if(vI(e.algorithm.hash)!==r)throw Is(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw Is("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!Hy(e.algorithm,"ECDSA"))throw Is("ECDSA");const r=aKe(t);if(e.algorithm.namedCurve!==r)throw Is(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}iKe(e,n)}function WU(e,t,...n){if(n.length>2){const r=n.pop();e+=`one of type ${n.join(", ")}, or ${r}.`}else n.length===2?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const C9=(e,...t)=>WU("Key must be ",e,...t);function GU(e,t,...n){return WU(`Key for the ${e} algorithm must be `,t,...n)}const ZU=e=>VU(e),nu=["CryptoKey"],lKe=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(const r of t){const o=Object.keys(r);if(!n||n.size===0){n=new Set(o);continue}for(const a of o){if(n.has(a))return!1;n.add(a)}}return!0};function cKe(e){return typeof e=="object"&&e!==null}function M9(e){if(!cKe(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}const uKe=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if(typeof n!="number"||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},Pl=(e,t,n=0)=>{n===0&&(t.unshift(t.length),t.unshift(6));const r=e.indexOf(t[0],n);if(r===-1)return!1;const o=e.subarray(r,r+t.length);return o.length!==t.length?!1:o.every((a,i)=>a===t[i])||Pl(e,t,r+1)},D9=e=>{switch(!0){case Pl(e,[42,134,72,206,61,3,1,7]):return"P-256";case Pl(e,[43,129,4,0,34]):return"P-384";case Pl(e,[43,129,4,0,35]):return"P-521";case Pl(e,[43,101,110]):return"X25519";case Pl(e,[43,101,111]):return"X448";case Pl(e,[43,101,112]):return"Ed25519";case Pl(e,[43,101,113]):return"Ed448";default:throw new LS("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},dKe=async(e,t,n,r,o)=>{let a,i;const s=new Uint8Array(atob(n.replace(e,"")).split("").map(l=>l.charCodeAt(0)));switch(r){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:`SHA-${r.slice(-3)}`},i=["verify"];break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${r.slice(-3)}`},i=["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:`SHA-${parseInt(r.slice(-3),10)||1}`},i=["encrypt","wrapKey"];break;case"ES256":a={name:"ECDSA",namedCurve:"P-256"},i=["verify"];break;case"ES384":a={name:"ECDSA",namedCurve:"P-384"},i=["verify"];break;case"ES512":a={name:"ECDSA",namedCurve:"P-521"},i=["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const l=D9(s);a=l.startsWith("P-")?{name:"ECDH",namedCurve:l}:{name:l},i=[];break}case"EdDSA":a={name:D9(s)},i=["verify"];break;default:throw new LS('Invalid or unsupported "alg" (Algorithm) value')}return yA.subtle.importKey(t,s,a,!1,i)},fKe=(e,t,n)=>dKe(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t);async function hKe(e,t,n){if(e.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return fKe(e,t)}const pKe=(e,t)=>{if(!(t instanceof Uint8Array)){if(!ZU(t))throw new TypeError(GU(e,t,...nu,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${nu.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},mKe=(e,t,n)=>{if(!ZU(t))throw new TypeError(GU(e,t,...nu));if(t.type==="secret")throw new TypeError(`${nu.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if(t.algorithm&&n==="verify"&&t.type==="private")throw new TypeError(`${nu.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);t.algorithm},gKe=(e,t,n)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?pKe(e,t):mKe(e,t,n)};function vKe(e,t,n,r,o){if(o.crit!==void 0&&r.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||r.crit===void 0)return new Set;if(!Array.isArray(r.crit)||r.crit.length===0||r.crit.some(i=>typeof i!="string"||i.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=t;for(const i of r.crit){if(!a.has(i))throw new LS(`Extension Header Parameter "${i}" is not recognized`);if(o[i]===void 0)throw new e(`Extension Header Parameter "${i}" is missing`);if(a.get(i)&&r[i]===void 0)throw new e(`Extension Header Parameter "${i}" MUST be integrity protected`)}return new Set(r.crit)}function yKe(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new LS(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function bKe(e,t,n){if(VU(t))return sKe(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(C9(t,...nu));return yA.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(C9(t,...nu,"Uint8Array"))}const wKe=async(e,t,n,r)=>{const o=await bKe(e,t,"verify");uKe(e,o);const a=yKe(e,o.algorithm);try{return await yA.subtle.verify(a,o,n,r)}catch{return!1}};async function SKe(e,t,n){if(!M9(e))throw new Sr("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new Sr('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new Sr("JWS Protected Header incorrect type");if(e.payload===void 0)throw new Sr("JWS Payload missing");if(typeof e.signature!="string")throw new Sr("JWS Signature missing or incorrect type");if(e.header!==void 0&&!M9(e.header))throw new Sr("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const w=gI(e.protected);r=JSON.parse(bA.decode(w))}catch{throw new Sr("JWS Protected Header is invalid")}if(!lKe(r,e.header))throw new Sr("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header},a=vKe(Sr,new Map([["b64",!0]]),n?.crit,r,o);let i=!0;if(a.has("b64")&&(i=r.b64,typeof i!="boolean"))throw new Sr('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=o;if(typeof s!="string"||!s)throw new Sr('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(i){if(typeof e.payload!="string")throw new Sr("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new Sr("JWS Payload must be a string or an Uint8Array instance");let l=!1;typeof t=="function"&&(t=await t(r,e),l=!0),gKe(s,t,"verify");const u=nKe(Fy.encode(e.protected??""),Fy.encode("."),typeof e.payload=="string"?Fy.encode(e.payload):e.payload);let f;try{f=gI(e.signature)}catch{throw new Sr("Failed to base64url decode the signature")}if(!await wKe(s,t,f,u))throw new oKe;let p;if(i)try{p=gI(e.payload)}catch{throw new Sr("Failed to base64url decode the payload")}else typeof e.payload=="string"?p=Fy.encode(e.payload):p=e.payload;const m={payload:p};return e.protected!==void 0&&(m.protectedHeader=r),e.header!==void 0&&(m.unprotectedHeader=e.header),l?{...m,key:t}:m}async function TKe(e,t,n){if(e instanceof Uint8Array&&(e=bA.decode(e)),typeof e!="string")throw new Sr("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:a,length:i}=e.split(".");if(i!==3)throw new Sr("Invalid Compact JWS");const s=await SKe({payload:o,protected:r,signature:a},t,n),l={payload:s.payload,protectedHeader:s.protectedHeader};return typeof t=="function"?{...l,key:s.key}:l}const xKe={webId:"globe-2",pinned:"pin",archived:"archive",visibility:"eye",deleted:"trash"};class IKe extends _i.WidgetType{constructor(t,n,r,o,a){super(),this.view=t,this.plugin=n,this.target=r,this.type=o,this.to=a}error=!1;eq(t){return this.target===t.target}toDOM(){const t=createSpan();return t.toggleClass("thino-inline-widget",!0),A.setIcon(t,xKe[this.type]||"help-circle"),A.setTooltip&&A.setTooltip(t,this.target),t}}function kKe(e){class t{view;match=new _i.MatchDecorator({regexp:/\[(webId|pinned|archived|visibility|deleted)::([^\]]+)\]/g,decorate:(o,a,i,s,l)=>{this.shouldRender(l,a,i)&&o(a,i,_i.Decoration.replace({widget:new IKe(l,e,s[0],s[1],i)}))}});decorations=_i.Decoration.none;constructor(o){this.view=o,this.updateDecorations(o)}update(o){this.updateDecorations(o.view,o)}destroy(){this.decorations=_i.Decoration.none}updateDecorations(o,a){!a||this.decorations.size===0?this.decorations=this.match.createDeco(o):this.decorations=this.match.updateDeco(a,this.decorations)}isLivePreview(o){return o.field(A.editorLivePreviewField)}shouldRender(o,a,i){return!o.state.selection.ranges.some(l=>l.from<=a?l.to>=a:l.from<=i)&&this.isLivePreview(o.state)}}const n={decorations:r=>r.decorations.update({filter:(o,a,i)=>{const s=i.spec.widget;return s&&s.error?!1:o===a||!r.view.state.selection.ranges.filter(l=>{const u=l.from,f=l.to;return u<=o?f>=o:u<=a}).length}})};return _i.ViewPlugin.fromClass(t,n)}const EKe=e=>e.ctrlKey!==void 0||e.metaKey!==void 0||e.shiftKey!==void 0||e.altKey!==void 0,By=()=>{new A.Notice(I("Open Memos Successfully"))},_y=[{id:"open-thino-in-left-sidebar",shortName:I("Left sidebar"),name:I("Open thino in left sidebar"),icon:"arrow-left",location:"left",cb:By,modKeys:"shift"},{id:"open-thino-in-right-sidebar",shortName:I("Right sidebar"),name:I("Open thino in right sidebar"),icon:"arrow-right",location:"right",cb:By,modKeys:["ctrl","meta"]},{id:"open-thino-in-float",shortName:I("Float window"),name:I("Open thino in float window"),icon:"layout",location:"float",cb:By,modKeys:"alt"},{id:"open-thino-in-center",shortName:I("Center window"),name:I("Open thino in center window"),icon:"tv-2",location:"center",cb:By,modKeys:void 0}];function A9(e,t,n){return new Promise((r,o)=>{let a="",i="";const s=l=>new Promise((u,f)=>{const h=t.ShareToThinoWithTextNewline===l||t.ShareToThinoWithTextNewline==="both"?`
`:" ";switch(t[l==="prepend"?"SharePrependType":"ShareAppendType"]){case"none":u();break;case"preset":t.ShareToThinoWithText&&(l==="prepend"?a=t.ShareToThinoWithTextPrepend+h:i=h+t.ShareToThinoWithTextAppend),u();break;case"input":{const p="Thino "+I(l==="prepend"?"Prepend text":"Append text");new qU(e,p,m=>{l==="prepend"?a=m.trim()+(m.trim()?h:""):i=(m.trim()?h:"")+m,u()}).open();break}case"selectTags":new IX(e,p=>{const m=p.length>0?p.map(w=>"#"+w).join(" "):"";l==="prepend"?a=m.trim()+(m.trim()?h:""):i=(m.trim()?h:"")+m.trim(),u()}).open();break;default:f(new Error("Invalid configuration type."))}});Promise.all([s("append"),s("prepend")]).then(()=>n(a,i)).then(()=>r()).catch(o)})}const CKe=e=>{const t=e.embedRegistry;if(!t)return!1;const n=t.embedByExtension.md,r=n({app:e,containerEl:createDiv()},null,null);return r.editable=!0,r.set(""),r.showEditor(),Object.getPrototypeOf(Object.getPrototypeOf(r.editMode)).constructor};async function SA(e){try{const t=e.app.internalPlugins.plugins["daily-notes"];let n;n={settings:{...e.settings,tokenForVerify:"***"},plugins:Object.keys(e.app.plugins.plugins),manifest:e.manifest,platform:A.Platform.resourcePathPrefix},t&&(n={...n,dailyNotePluginInfo:{options:t.instance.options}}),await navigator.clipboard.writeText(`\`\`\`json
${JSON.stringify(n,null,2)}
\`\`\``),new A.Notice(I("Debug info copied to clipboard"))}catch(t){console.error(t)}}class MKe extends A.Plugin{settings;settingTab;thinoWorkerManager;triggerBySelf=!1;updatedID="";debounceTimer=0;apiHttpServer=null;captureService=null;loaded=!1;MarkdownEditor;async onload(){this.MarkdownEditor=CKe(this.app),Ze.setPlugin(this),await this.loadSettings(),Iqe(),this.registerRibbon(),await this.verify();try{this.settings.ShowUpdateMessage&&await this.checkVersionAndShowChangeLog()}catch(t){console.error(t)}this.settingTab=new Wqe(this.app,this),this.addSettingTab(this.settingTab),this.initApp(),this.initEditor(),this.initURIHandler(),this.registerMobileEvent(),this.registerCommands(),this.registerCanvasNodeMemos(),this.registerHoverEvent(),this.registerLinkOpen(),this.registerCodeBlocks(),A.Platform.isMobile&&this.registerMobileNavbar(),this.updateLayoutSettings(),this.registerEditorContextMenu(),this.registerEditorSuggest(new xqe(this.app,this)),this.registerEditorExtension([U$e]),this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this)),this.registerView(Yr,t=>new Hd(t,this)),this.thinoWorkerManager=new MF(this.app,this),this.addChild(this.thinoWorkerManager)}async loadSettings(){this.settings=Object.assign({},zo,await this.loadData()),Ze.setSettings(this.settings)}async saveSettings(){await this.saveData(this.settings),Ze.setSettings(this.settings)}onunload(){this.app.workspace.detachLeavesOfType(Yr),le.clearMemos(),Se.dispatch({type:"CLEAR_MEMOS",payload:null}),Se.dispatch({type:"CLEAR_FILES",payload:null}),Se.dispatch({type:"CLEAR_VIEW",payload:null});const t=document.body.find(".dialog-wrapper");if(t&&t.parentElement?.detach(),this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null),this.captureService&&this.captureService.onunload(),A.Platform.isMobile){const n=this.app.mobileNavbar;n&&n.showThinoBtnEl&&this.settings?.NavbarButton&&(n.showThinoBtnEl.detach(),n.showThinoBtnEl=null)}new A.Notice(I("Close Memos Successfully"))}initEditor(){this.register(Ep(A.MetadataCache.prototype,{getFileCache:n=>function(r){return!r?.path&&!r?null:n.call(this,r)}})),(n=>{const r=n.app.embedRegistry.embedByExtension.md({app:n.app,containerEl:document.createElement("div")},null,"");r.editable=!0,r.showEditor();const o=Object.getPrototypeOf(Object.getPrototypeOf(r.editMode)),a=Ep(o.constructor.prototype,{triggerClickableToken:i=>async function(...s){if(s[0].type==="internal-link"){if(this.editorEl.closest(".memo-editor-wrapper")){const l=le.getMemoById(s[0].text??"");if(l){Qa(l);return}return i.apply(this,s)}return i.apply(this,s)}return i.apply(this,s)}});this.register(a),r.unload()})(this)}initApp(){Ze.setApp(this.app)}initURIHandler(){this.registerObsidianProtocolHandler("thino",async t=>{if(!t)return;if(t.openSettings&&(this.app.setting.open(),this.app.setting.openTabById(this.manifest.id||"obsidian-memos")),t.userid)try{const a=t.userid;G$e(a,this.app),Z$e(A.moment().add(30,"days").valueOf(),this.app),Ge.setRefresh(!0)}catch(a){console.error(a),new A.Notice(I("Failed to verify"))}if(t.token)try{const a=t.token;this.app?.saveLocalStorage("tokenForSync",a),setTimeout(()=>{this.app.setting.open(),this.app.setting.openTabById(this.manifest.id||"obsidian-memos"),this.settingTab.display()},200),new A.Notice(I("Saved sync token successfully"))}catch(a){console.error(a),new A.Notice(I("Failed to save"))}if(t.copyToken){this.app.setting.open(),this.app.setting.openTabById(this.manifest.id??"obsidian-memos");const a=await jU();await navigator.clipboard.writeText(a),new A.Notice(I("Copied app id successfully"))}const n=Ze.getState()?.verifyState,r=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),o=A.Platform.isDesktop?await pn():r?.identifier||r?.uuid;if(!(!n||n?.appId!==o)){if(t.content){const a=t.type,i=decodeURI(t.content)!==t.content?decodeURI(t.content):t.content,s=t.task,l=await le.createThino({content:i,type:a,isList:!!s});if(!l)return;le.pushMemo(l),Ye.clearQuery()}t.openId&&await le.openThinoByID(t.openId)}})}initGlobalManifest(){Ge.setPluginManifest(this.manifest)}stopServer(){this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null)}async stopEnableList(){const t=Ze.getState()?.verifyState,n=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),r=A.Platform.isDesktop?await pn():n?.identifier||n?.uuid;if(!t||t?.appId!==r){this.settings.EnabledLocationList=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"}],this.settingTab.debounceApplySettingsUpdate();return}}async initServer(){if(A.Platform.isMobile||!this.settings.EnabledHttpApi)return;const t=Ze.getState()?.verifyState,n=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),r=A.Platform.isDesktop?await pn():n?.identifier||n?.uuid;!t||t?.appId!==r||(this.apiHttpServer=J$e(this,this.settings),this.initServerPort())}initServerPort(){this.apiHttpServer&&this.settings.EnabledHttpApi&&this.apiHttpServer.listen(this.settings.HttpApiIpType,this.settings.HttpApiPort)}async initCaptureService(){if(A.Platform.isMobile||!this.settings.CaptureKey.EnableCaptureKey)return;const t=Ze.getState()?.verifyState,n=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),r=A.Platform.isDesktop?await pn():n?.identifier||n?.uuid;!t||t?.appId!==r||(this.captureService=new tKe(this.app,this),await this.captureService.onload())}registerMobileEvent(){A.Platform.isMobile&&(this.registerEvent(this.app.workspace.on("receive-text-menu",(t,n)=>{t.addItem(r=>{r.setSection("options").setIcon("popup-open").setTitle(I("Insert as Memo")).onClick(async()=>{let o=n;try{await A9(this.app,this.settings,async(a,i)=>{o=a+o+i;const s=await le.createThino({content:o,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});le.pushMemo(s)})}catch(a){console.error("Configuration failed:",a);return}})})})),this.registerEvent(this.app.workspace.on("receive-files-menu",(t,n)=>{t.addItem(r=>{r.setIcon("popup-open").setTitle(I("Insert file as memo content")).onClick(async()=>{let a=n.map(i=>this.app.fileManager.generateMarkdownLink(i,i.path)).join(`
`);try{await A9(this.app,this.settings,async(i,s)=>{a=i+a+s;const l=await le.createThino({content:a,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});le.pushMemo(l)})}catch(i){console.error("Configuration failed:",i);return}})})})))}registerCommands(){_y.forEach(t=>{this.addCommand({id:t.id,name:t.name,callback:()=>this.openMemos(t.location,t.cb),hotkeys:[]})}),["Modern","Clean","Minimal","Gradient"].forEach(t=>{this.addCommand({id:`share-thino-via-${t.toLowerCase()}`,name:I("Share thino")+` [${I(t)}]`,editorCallback:(n,r)=>{const o=n.getSelection();if(o.length===0)return;const a={id:`temp-${Date.now()}`,content:o,createdAt:A.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:A.moment().format("YYYY-MM-DD HH:mm:ss"),deletedAt:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",thinoType:"JOURNAL",hasId:"",linkId:[],resourceList:[],creatorName:"thino",sourceType:"DAILY",path:r.file.path,fileInfo:{tags:[],frontmatter:{}}};Yc(a,t.toLowerCase(),r)}})}),this.addCommand({id:"focus-mode",name:"Focus mode",callback:()=>{const t=document.body.hasClass("thino-focus");document.body.toggleClass("thino-focus",!t)}}),this.addCommand({id:"hide-side-bar",name:I("Toggle sidebar visibility"),callback:()=>{const t=Ge.getState().isMobileView,n=document.body.hasClass("thino-hide-side-bar");document.body.toggleClass("thino-hide-side-bar",t?!1:!n)}}),this.addCommand({id:"hide-tags",name:I("Toggle tags visibility"),callback:()=>{const t=document.body.hasClass("thino-hide-tags");document.body.toggleClass("thino-hide-tags",!t)}}),this.addCommand({id:"hide-query-list",name:I("Toggle query list visibility"),callback:()=>{const t=document.body.hasClass("thino-hide-query-list");document.body.toggleClass("thino-hide-query-list",!t)}}),this.addCommand({id:"insert-task",name:I("Insert task"),checkCallback:t=>{const n=this.app.plugins.getPlugin("obsidian-tasks-plugin"),r=this.app.workspace.getLeavesOfType("thino_view").first();if(n&&r)return t||this.app.plugins.plugins["obsidian-tasks-plugin"].apiV1.createTaskLineModal().then(a=>{const i=this.app.workspace.activeEditor;i&&i.editor?.insertText(a)}),!0}}),this.addCommand({id:"show-thino-editor",name:I("Show thino editor"),checkCallback:t=>{if(le.initialized&&Ze.initialized){if(!t){if(!Ze.getState().view){new A.Notice(I("Please open thino first"));return}new DI(this.app).open()}return!0}}}),this.addCommand({id:"lock-thino",name:I("Lock thino"),checkCallback:t=>{if(this.app.workspace.getActiveViewOfType(Hd)&&this.settings.needVerify)return t||Ge.setLocked(!0),!0}}),this.addCommand({id:"copy-debug-info",name:I("Copy debug info"),callback:async()=>{await SA(this)}}),this.addCommand({id:"insert-editor",name:I("Insert editor"),checkCallback:t=>{const n=this.app.workspace.getActiveViewOfType(A.MarkdownView);if(n&&n?.getViewType()==="markdown")return t||n.editor.replaceSelection("\n```thino\n{\n editor: false\n}\n```\n"),!0}}),this.addCommand({id:"toggle-minimal-thino",name:I("Toggle minimal mode"),callback:()=>{const t=document.body.hasClass("minimal-thino");document.body.toggleClass("minimal-thino",!t)}}),this.addCommand({id:"focus-on-thino-editor",name:I("Focus on thino editor"),callback:()=>this.focusOnEditor(),hotkeys:[]}),this.addCommand({id:"reinit-thino-sync",name:I("ReSync web thinos to local"),callback:()=>{c4e(this.app)}}),this.addCommand({id:"init-thino-sync",name:I("Sync local thinos to web"),callback:async()=>{if(!this.app?.loadLocalStorage("tokenForSync")){new A.Notice(I("Please input token first"));return}if(!this.settings.startSync){new A.Notice(I("Please enable sync first"));return}try{await le.initSync()}catch(n){console.error(n),new A.Notice(I("Init Failed"))}}}),this.addCommand({id:"show-daily-thino",name:I("Show daily thino"),callback:()=>this.openDailyMemo(),hotkeys:[]}),this.addCommand({id:"focus-on-search-bar",name:I("Focus on search bar"),callback:()=>this.searchIt(),hotkeys:[]}),this.addCommand({id:"show-thino-in-popover",name:I("Show-thino in popover(Hover editor)"),callback:()=>this.showInPopover(),hotkeys:[]})}async onLayoutReady(){await this.stopEnableList(),await this.initServer(),this.initGlobalManifest(),await this.initMemos(),this.autoOpenMemos(),this.registerThinoWidget(),await this.registerToolbarCheck(),await this.initCaptureService();const t=this.app.workspace.editorSuggest.suggests.findIndex(n=>n.type==="customTag");t!==-1?(this.app.workspace.editorSuggest.suggests.splice(t,1),this.app.workspace.editorSuggest.suggests.unshift(new E9(this.app,this))):this.app.workspace.editorSuggest.suggests.unshift(new E9(this.app,this))}async initMemos(){try{await this.initDailyNotes()}catch(t){console.error(t)}Ze.getState(),le.getState(),await le.fetchAllMemos()}async initDailyNotes(){this.settings.EnabledLocationList.find(t=>t.value==="DAILY")&&await Ze.fechLocalDailyNotes()}registerCanvasNodeMemos(){if(!A.requireApiVersion("1.2.0")||!this.settings.EnabledLocationList.find(o=>o.value==="CANVAS"))return;const t=o=>{clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{setTimeout(async()=>{const a=o.canvas.getData(),i=a.nodes.find(s=>s.id===o.id);if(i&&(n(i),o.canvas.setData(a),le.getMemoById(o.id))){const l=await le.updateMemo(o.id,i.text,i.thinoType);le.editMemo(l)}o.canvas.requestSave(!0)},0)},800)},n=o=>{o.createdAt||(o.createdAt=A.moment().format("YYYY-MM-DD HH:mm:ss")),o.updatedAt=A.moment().format("YYYY-MM-DD HH:mm:ss"),o.deletedAt=o.deletedAt?o.deletedAt:"",o.pinned=o.pinned?o.pinned:!1,o.visibility=o.visibility?o.visibility:"PUBLIC",o.rowStatus=o.rowStatus?o.rowStatus:"NORMAL",o.thinoType=o.thinoType?o.thinoType:"JOURNAL",o.hasId=o.hasId?o.hasId:"",o.linkId=o.linkId?o.linkId:"",o.resourceList=[]},r=()=>{const o=this.app.workspace.getLeavesOfType("canvas").first()?.view;if(!o||!o?.canvas)return!1;const i=(this.app.workspace.getLeavesOfType("canvas").first()?.view).canvas.nodes.values(),l=Array.from(i).filter(h=>h.text!==void 0);if(!l||l.length===0)return!1;const u=l[0].child;if(!u)return!1;const f=Ep(u.constructor.prototype,{save:h=>function(...p){h.call(this,...p),this.node.isEditing&&t(this.node)}});return this.register(f),!0};this.app.workspace.onLayoutReady(()=>{if(!r()){const o=this.app.workspace.on("layout-change",()=>{r()&&this.app.workspace.offref(o)});this.registerEvent(o)}})}registerLinkOpen(){Ep(A.Workspace.prototype,{openLinkText:t=>async function(...n){const r=le.getState().memos;if(r.find(o=>o.id===n[0]||o.id===n[1])){const o=r.find(a=>a.id===n[0]||a.id===n[1]);if(o){Qa(o);return}}await t.call(this,...n)}})}registerHoverEvent(){this.registerHoverLinkSource("thino",{defaultMod:!0,display:"Thino"})}registerCodeBlocks(){this.registerMarkdownCodeBlockProcessor("thino",async(t,n)=>{if(t){if(!this.app.workspace.getLeavesOfType("thino_view")?.length){n.toggleClass(["thino-editor-codeblock","view-error"],!0),PQ(n,this);return}if(t){const r=A.parseYaml(t);LQ(n,r)}}})}registerMobileNavbar(){if(!this.settings?.NavbarButton)return;const t=this.app.mobileNavbar;if(!t||t.showThinoBtnEl)return;const r=t.containerEl.find(".mobile-navbar-actions").createEl("div",{cls:"mobile-navbar-action mod-tappable"});new A.ExtraButtonComponent(r).setIcon("Memos").onClick(()=>{document.body.find(".thino-editor-modal")||new DI(this.app).open()}),t.showThinoBtnEl=r}updateLayoutSettings(){document.body.toggleClass("thino-show-status",!!this.settings.AlwaysShowStatusText)}registerEditorContextMenu(){this.registerEvent(this.app.workspace.on("editor-menu",(t,n,r)=>{const o=n.getSelection();if(o.length===0)return;const a={id:`temp-${Date.now()}`,content:o,createdAt:A.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:A.moment().format("YYYY-MM-DD HH:mm:ss"),deletedAt:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",thinoType:"JOURNAL",hasId:"",linkId:[],resourceList:[],creatorName:"thino",sourceType:"DAILY",path:r.file.path,fileInfo:{tags:[],frontmatter:{}}},i=(s,l)=>{s.addItem(u=>{u.setSection("selection").setTitle(l+I("Modern")).setIcon("palette").onClick(async()=>{Yc(a,"modern",r)})}).addItem(u=>{u.setSection("selection").setTitle(l+I("Clean")).setIcon("palette").onClick(async()=>{Yc(a,"clean",r)})}).addItem(u=>{u.setSection("selection").setTitle(l+I("Minimal")).setIcon("palette").onClick(async()=>{Yc(a,"minimal",r)})}).addItem(u=>{u.setSection("selection").setTitle(I("Gradient")).setIcon("palette").onClick(async()=>{Yc(a,"gradient",r)})})};A.Platform.isDesktop&&t.addItem(s=>{const l=s.setIcon("Memos").setSection("selection").setTitle(I("Thino share")).setSubmenu();i(l,"")}),A.Platform.isMobile&&i(t,I("Thino share")+" ")}))}registerRibbon(){this.addRibbonIcon("Memos",I("ribbonIconTitle"),async t=>{if(t.button===2){t.preventDefault();const n=new A.Menu;_y.forEach(r=>{n.addItem(o=>{o.setTitle(r.shortName).setIcon(r.icon).onClick(async()=>{await this.openMemos(r.location,r.cb)})})}),n.showAtMouseEvent(t);return}for(let n=0;n<_y.length;n++){const r=_y[n];if(!r.modKeys){await this.openMemos(r.location,r.cb);break}if(!EKe(t))continue;const o=a=>t[`${a}Key`];if(typeof r.modKeys=="string"&&o(r.modKeys)||Array.isArray(r.modKeys)&&r.modKeys.some(o)){await this.openMemos(r.location,r.cb);break}}})}registerThinoWidget(){this.registerEditorExtension([kKe(this)])}async registerToolbarCheck(){if(this.loaded)return;const t=Ze.getState()?.verifyState,n=!A.Platform.isDesktop&&await window.Capacitor?.Plugins.Device?.getId(),r=A.Platform.isDesktop?await pn():n?.identifier||n?.uuid;!t||t?.appId!==r||(this.registerEditorExtension([B$e(this.app)]),this.registerEditorSuggest(new Tqe(this.app,this)),this.loaded=!0)}async verify(){let t="";if(A.Platform.isDesktop)t=await pn();else{const r=await window.Capacitor.Plugins.Device?.getId();if(!r)return;t=r?.identifier||r?.uuid}async function n(r){if(!r)return Ze.setVerifyState(null),!1;const i=await hKe(`-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr+i4MLzI40gGFHl7gdRH
UL1mH0NcWEs1/IBYDDbc9ALbvUGwDaUcVIKke+b+F4T7qISexyGd5qV0s1vNYeCk
iCTq4w3+CFDurIFYAgQYTcV6K5pL8Bpb79FEclsTnAcKgiuzKBxPZ1djKxbgnmFj
+PE+EcmX+JJK9hG1O8X+YFJoPJWl225eCoysONickiI7Ndwu9YLR8pIUb1VMyJSy
cMR87z466Nc5Hx2QhwyuiiQYL3Ru4WkNF3AVWgqeOlhBDybFFwDaV7OOMTiYtH46
3iKx6azEVS8W/gYfrW+hKp2VziPPw3oxouP/wCes/4qRlXkwyjSwtfLtpE4Rsa4+
swIDAQAB
-----END PUBLIC KEY-----`,"RS256");try{const{payload:s}=await TKe(r,i),l=JSON.parse(new TextDecoder().decode(s));return!l||l.iss!=="pkmer"||l.type!=="thino"||l.appId!==t?!1:(Ze.setVerifyState(l),!0)}catch(s){console.error(s)}}return await n(this.settings.tokenForVerify[t])}async checkVersionAndShowChangeLog(){const t=this.manifest.version,n=this.settings.LastUpdatedVersion;t!==n&&(this.settings.LastUpdatedVersion=t,await this.saveSettings(),this.showChangeLog())}showChangeLog(){new RS(this.app,this.manifest.version).open()}autoOpenMemos(){this.app.workspace.getLeavesOfType(Yr).length>0||this.settings.MobileAndDesktop==="Mobile"&&A.Platform.isDesktop||this.settings.MobileAndDesktop==="Desktop"&&A.Platform.isMobile||this.settings.OpenMemosAutomatically&&this.openMemos()}async openDailyMemo(){if(this.app.workspace.getLeavesOfType(Yr).length>0){Ye.setPathname("/daily");return}await this.openMemos(),Ye.setPathname("/daily")}async openMemos(t="center",n){const r=this.app.workspace;if(r.getLeavesOfType(Yr).length>0){const i=r.getLeavesOfType(Yr)[0];return r.setActiveLeaf(i),r.revealLeaf(i),i}r.detachLeavesOfType(Yr);let o;switch(t){case"left":o=r.getLeftLeaf(!1);break;case"right":o=r.getRightLeaf(!1);break;case"float":o=r.getLeaf("window");break;default:o=r.getLeaf(!0);break}if(o)return await o.setViewState({type:Yr}),r.revealLeaf(o),o;const a=o.view.containerEl.querySelector("textarea");return a?(a.focus(),o):(n?.(),o)}async searchIt(){const t=this.app.workspace,n=t.getLeavesOfType(Yr);if(!(n.length>0)){const o=await this.openMemos();setTimeout(()=>{o.view.containerEl.find(".search-bar-inputer .text-input").focus(),this.app.workspace.trigger("focus-on-searchbar")},300);return}const r=n[0];t.revealLeaf(r),setTimeout(()=>{r.view.containerEl.find(".search-bar-inputer .text-input").focus(),this.app.workspace.trigger("focus-on-searchbar")},300)}async focusOnEditor(){if(!(this.app.workspace.getLeavesOfType(Yr).length>0)){await this.openMemos();return}this.app.workspace.trigger("focus-on-textarea")}changeStatus(){const t=this.app.workspace,n=t.getLeavesOfType(Yr);if(!(n.length>0)){new A.Notice(I("Please Open Memos First"));return}const r=n[0];t.setActiveLeaf(r),r.view.containerEl.querySelector(".list-or-task").click()}async showInPopover(){const t=this.app.workspace;if(t.detachLeavesOfType(Yr),!this.app.plugins.getPlugin("obsidian-hover-editor")){new A.Notice(I("Please install obsidian-hover-editor plugin first"));return}const r=await this.app.plugins.getPlugin("obsidian-hover-editor")?.spawnPopover();r&&(await r.setViewState({type:Yr}),t.revealLeaf(r),r.view.containerEl.classList.add("mobile-view"),this.settings?.FocusOnEditor&&r.view.containerEl.querySelector("textarea")!==void 0&&r.view.containerEl.querySelector("textarea")?.focus())}}class RS extends A.Modal{constructor(t,n){super(t),this.version=n}component;async onOpen(){const{contentEl:t}=this;this.containerEl.toggleClass("thino-changelog-modal",!0),t.createEl("h2",{text:I("Thino update info"),cls:"thino-changelog-title"}).createDiv({cls:"thino-changelog-version",text:`${this.version}`});try{t.createEl("h3",{text:I("Latest version")});const r=t.createDiv("current-change-log");t.createEl("hr"),t.createEl("h3",{text:I("Previous version")});const o=t.createDiv("prev-change-log"),i=await A.requestUrl("https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md");this.component=new A.Component;const[s,l]=this.getLatestVersionContent(i.text);let u=s,f=l;try{const h=localStorage.getItem("language"),p=h&&(h==="zh"||h==="zh-TW");u=p?s.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):s,f=p?l.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):l}catch(h){console.error(h)}await A.MarkdownRenderer.render(this.app,u,r,"",this.component),await A.MarkdownRenderer.render(this.app,f,o,"",this.component)}catch(r){console.error(r),t.createEl("p",{text:I("Failed to load changelog")}),t.createEl("a",{text:I("View online"),attr:{href:"https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md",target:"_blank"}})}}getLatestVersionContent(t){const n=/^# .+/gm,r=[...t.matchAll(n)];if(r.length===0)return[t,""];const o=r[0].index||0;let a=t.length;r.length>1&&(a=r[1].index||t.length);const i=t.substring(o,a).trim(),s=t.substring(a).trim();return[i,s]}onClose(){const{contentEl:t}=this;t.empty(),this.component?.unload()}}class qU extends A.Modal{constructor(t,n,r){super(t),this.title=n,this.callback=r}inputEl;callback;onOpen(){const{contentEl:t}=this;this.setTitle(this.title),this.containerEl.toggleClass(["thino-input-dialog","thino-bulk-action-dialog","tag-actions"],!0),this.inputEl=t.createEl("input",{attr:{type:"text"}}),this.inputEl.focus(),new A.Setting(t).addButton(n=>{n.setButtonText(I("OK")).onClick(()=>{this.close()})})}onClose(){this.contentEl.empty(),this.callback(this.inputEl.value)}}exports.ChangeLogModal=RS;exports.InputModal=qU;exports.default=MKe;exports.getCurrentDebugInfo=SA;
/* nosourcemap */