You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

269 lines
1.4 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";var N7=Object.defineProperty;var A7=(e,t,n)=>t in e?N7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var De=(e,t,n)=>(A7(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("obsidian"),hS=require("@codemirror/language"),Vg=require("@codemirror/state"),Vl=require("@codemirror/view");function F7(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(r,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var FN={exports:{}},fg={},ON={exports:{}},mn={},wx;function O7(){if(wx)return mn;wx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function y(K){return K===null||typeof K!="object"?null:(K=g&&K[g]||K["@@iterator"],typeof K=="function"?K:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function I(K,ae,Se){this.props=K,this.context=ae,this.refs=S,this.updater=Se||w}I.prototype.isReactComponent={},I.prototype.setState=function(K,ae){if(typeof K!="object"&&typeof K!="function"&&K!=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,K,ae,"setState")},I.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function M(){}M.prototype=I.prototype;function N(K,ae,Se){this.props=K,this.context=ae,this.refs=S,this.updater=Se||w}var _=N.prototype=new M;_.constructor=N,T(_,I.prototype),_.isPureReactComponent=!0;var k=Array.isArray,R=Object.prototype.hasOwnProperty,L={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function U(K,ae,Se){var je,Re={},Fe=null,Be=null;if(ae!=null)for(je in ae.ref!==void 0&&(Be=ae.ref),ae.key!==void 0&&(Fe=""+ae.key),ae)R.call(ae,je)&&!H.hasOwnProperty(je)&&(Re[je]=ae[je]);var Qe=arguments.length-2;if(Qe===1)Re.children=Se;else if(1<Qe){for(var Ze=Array(Qe),st=0;st<Qe;st++)Ze[st]=arguments[st+2];Re.children=Ze}if(K&&K.defaultProps)for(je in Qe=K.defaultProps,Qe)Re[je]===void 0&&(Re[je]=Qe[je]);return{$$typeof:e,type:K,key:Fe,ref:Be,props:Re,_owner:L.current}}function z(K,ae){return{$$typeof:e,type:K.type,key:ae,ref:K.ref,props:K.props,_owner:K._owner}}function $(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function X(K){var ae={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(Se){return ae[Se]})}var Q=/\/+/g;function se(K,ae){return typeof K=="object"&&K!==null&&K.key!=null?X(""+K.key):ae.toString(36)}function ue(K,ae,Se,je,Re){var Fe=typeof K;(Fe==="undefined"||Fe==="boolean")&&(K=null);var Be=!1;if(K===null)Be=!0;else switch(Fe){case"string":case"number":Be=!0;break;case"object":switch(K.$$typeof){case e:case t:Be=!0}}if(Be)return Be=K,Re=Re(Be),K=je===""?"."+se(Be,0):je,k(Re)?(Se="",K!=null&&(Se=K.replace(Q,"$&/")+"/"),ue(Re,ae,Se,"",function(st){return st})):Re!=null&&($(Re)&&(Re=z(Re,Se+(!Re.key||Be&&Be.key===Re.key?"":(""+Re.key).replace(Q,"$&/")+"/")+K)),ae.push(Re)),1;if(Be=0,je=je===""?".":je+":",k(K))for(var Qe=0;Qe<K.length;Qe++){Fe=K[Qe];var Ze=je+se(Fe,Qe);Be+=ue(Fe,ae,Se,Ze,Re)}else if(Ze=y(K),typeof Ze=="function")for(K=Ze.call(K),Qe=0;!(Fe=K.next()).done;)Fe=Fe.value,Ze=je+se(Fe,Qe++),Be+=ue(Fe,ae,Se,Ze,Re);else if(Fe==="object")throw ae=String(K),Error("Objects are not valid as a React child (found: "+(ae==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":ae)+"). If you meant to render a collection of children, use an array instead.");return Be}function fe(K,ae,Se){if(K==null)return K;var je=[],Re=0;return ue(K,je,"","",function(Fe){return ae.call(Se,Fe,Re++)}),je}function Z(K){if(K._status===-1){var ae=K._result;ae=ae(),ae.then(function(Se){(K._status===0||K._status===-1)&&(K._status=1,K._result=Se)},function(Se){(K._status===0||K._status===-1)&&(K._status=2,K._result=Se)}),K._status===-1&&(K._status=0,K._result=ae)}if(K._status===1)return K._result.default;throw K._result}var pe={current:null},ie={transition:null},de={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:ie,ReactCurrentOwner:L};return mn.Children={map:fe,forEach:function(K,ae,Se){fe(K,function(){ae.apply(this,arguments)},Se)},count:function(K){var ae=0;return fe(K,function(){ae++}),ae},toArray:function(K){return fe(K,function(ae){return ae})||[]},only:function(K){if(!$(K))throw Error("React.Children.only expected to receive a single React element child.");return K}},mn.Component=I,mn.Fragment=n,mn.Profiler=a,mn.PureComponent=N,mn.StrictMode=r,mn.Suspense=c,mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=de,mn.cloneElement=function(K,ae,Se){if(K==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var je=T({},K.props),Re=K.key,Fe=K.ref,Be=K._owner;if(ae!=null){if(ae.ref!==void 0&&(Fe=ae.ref,Be=L.current),ae.key!==void 0&&(Re=""+ae.key),K.type&&K.type.defaultProps)var Qe=K.type.defaultProps;for(Ze in ae)R.call(ae,Ze)&&!H.hasOwnProperty(Ze)&&(je[Ze]=ae[Ze]===void 0&&Qe!==void 0?Qe[Ze]:ae[Ze])}var Ze=arguments.length-2;if(Ze===1)je.children=Se;else if(1<Ze){Qe=Array(Ze);for(var st=0;st<Ze;st++)Qe[st]=arguments[st+2];je.children=Qe}return{$$typeof:e,type:K.type,key:Re,ref:Fe,props:je,_owner:Be}},mn.createContext=function(K){return K={$$typeof:i,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},K.Provider={$$typeof:o,_context:K},K.Consumer=K},mn.createElement=U,mn.createFactory=function(K){var ae=U.bind(null,K);return ae.type=K,ae},mn.createRef=function(){return{current:null}},mn.forwardRef=function(K){return{$$typeof:l,render:K}},mn.isValidElement=$,mn.lazy=function(K){return{$$typeof:p,_payload:{_status:-1,_result:K},_init:Z}},mn.memo=function(K,ae){return{$$typeof:f,type:K,compare:ae===void 0?null:ae}},mn.startTransition=function(K){var ae=ie.transition;ie.transition={};try{K()}finally{ie.transition=ae}},mn.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},mn.useCallback=function(K,ae){return pe.current.useCallback(K,ae)},mn.useContext=function(K){return pe.current.useContext(K)},mn.useDebugValue=function(){},mn.useDeferredValue=function(K){return pe.current.useDeferredValue(K)},mn.useEffect=function(K,ae){return pe.current.useEffect(K,ae)},mn.useId=function(){return pe.current.useId()},mn.useImperativeHandle=function(K,ae,Se){return pe.current.useImperativeHandle(K,ae,Se)},mn.useInsertionEffect=function(K,ae){return pe.current.useInsertionEffect(K,ae)},mn.useLayoutEffect=function(K,ae){return pe.current.useLayoutEffect(K,ae)},mn.useMemo=function(K,ae){return pe.current.useMemo(K,ae)},mn.useReducer=function(K,ae,Se){return pe.current.useReducer(K,ae,Se)},mn.useRef=function(K){return pe.current.useRef(K)},mn.useState=function(K){return pe.current.useState(K)},mn.useSyncExternalStore=function(K,ae,Se){return pe.current.useSyncExternalStore(K,ae,Se)},mn.useTransition=function(){return pe.current.useTransition()},mn.version="18.2.0",mn}ON.exports=O7();var P=ON.exports;const ne=qt(P),P7=F7({__proto__:null,default:ne},[P]);var bx;function j7(){if(bx)return fg;bx=1;var e=P,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(l,c,f){var p,g={},y=null,w=null;f!==void 0&&(y=""+f),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(w=c.ref);for(p in c)r.call(c,p)&&!o.hasOwnProperty(p)&&(g[p]=c[p]);if(l&&l.defaultProps)for(p in c=l.defaultProps,c)g[p]===void 0&&(g[p]=c[p]);return{$$typeof:t,type:l,key:y,ref:w,props:g,_owner:a.current}}return fg.Fragment=n,fg.jsx=i,fg.jsxs=i,fg}FN.exports=j7();var v=FN.exports;const is=e=>{const{children:t,store:n,context:r}=e,[a,o]=P.useState(n.getState());return P.useEffect(()=>{const i=n.subscribe(l=>{o(l)});return()=>{i()}},[]),v.jsx(r.Provider,{value:a,children:t})};function L7(e){const t=Object.keys(e),n={};for(const r of t)typeof e[r]=="function"&&(n[r]=e[r]);return(r={},a)=>{let o=!1;const i={};for(const l of t){const c=r[l],f=n[l](c,a);i[l]=f,o=o||f!==c}return o?i:r}}function R7(e,t){const n=[];let r=e;return{dispatch:l=>{const c=t(r,l),f=r;r=c;for(const p of n)p(r,f)},getState:()=>r,subscribe:l=>{let c=!0;return n.push(l),()=>{if(!c)return;const f=n.indexOf(l);n.splice(f,1),c=!1}}}}function _7(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 B7={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 H7(e,t){switch(t.type){case"RELOAD":return PN;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_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 PN={pathname:"/",hash:"",query:{tag:"",duration:null,type:"",text:"",filter:""}};var gn={};Object.defineProperty(gn,"__esModule",{value:!0});var Tr=C;const tT="YYYY-MM-DD",nT="gggg-[W]ww",jN="YYYY-MM",LN="YYYY-[Q]Q",RN="YYYY";function yv(e){var n,r;const t=window.app.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n[e])==null?void 0:r.enabled)}function wv(){var e,t,n,r;try{const{internalPlugins:a,plugins:o}=window.app;if(yv("daily")){const{format:f,folder:p,template:g}=((t=(e=o.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.daily)||{};return{format:f||tT,folder:(p==null?void 0:p.trim())||"",template:(g==null?void 0:g.trim())||""}}const{folder:i,format:l,template:c}=((r=(n=a.getPluginById("daily-notes"))==null?void 0:n.instance)==null?void 0:r.options)||{};return{format:l||tT,folder:(i==null?void 0:i.trim())||"",template:(c==null?void 0:c.trim())||""}}catch{}}function bv(){var e,t,n,r,a,o,i;try{const l=window.app.plugins,c=(e=l.getPlugin("calendar"))==null?void 0:e.options,f=(n=(t=l.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.weekly;if(yv("weekly"))return{format:f.format||nT,folder:((r=f.folder)==null?void 0:r.trim())||"",template:((a=f.template)==null?void 0:a.trim())||""};const p=c||{};return{format:p.weeklyNoteFormat||nT,folder:((o=p.weeklyNoteFolder)==null?void 0:o.trim())||"",template:((i=p.weeklyNoteTemplate)==null?void 0:i.trim())||""}}catch{}}function Sv(){var t,n,r,a;const e=window.app.plugins;try{const o=yv("monthly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.monthly)||{};return{format:o.format||jN,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function Dv(){var t,n,r,a;const e=window.app.plugins;try{const o=yv("quarterly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.quarterly)||{};return{format:o.format||LN,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function Tv(){var t,n,r,a;const e=window.app.plugins;try{const o=yv("yearly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.yearly)||{};return{format:o.format||RN,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function _N(...e){let t=[];for(let r=0,a=e.length;r<a;r++)t=t.concat(e[r].split("/"));const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r];!o||o==="."||n.push(o)}return t[0]===""&&n.unshift(""),n.join("/")}function Y7(e){let t=e.substring(e.lastIndexOf("/")+1);return t.lastIndexOf(".")!=-1&&(t=t.substring(0,t.lastIndexOf("."))),t}async function U7(e){const t=e.replace(/\\/g,"/").split("/");if(t.pop(),t.length){const n=_N(...t);window.app.vault.getAbstractFileByPath(n)||await window.app.vault.createFolder(n)}}async function Iv(e,t){t.endsWith(".md")||(t+=".md");const n=Tr.normalizePath(_N(e,t));return await U7(n),n}async function Np(e){const{metadataCache:t,vault:n}=window.app,r=Tr.normalizePath(e);if(r==="/")return Promise.resolve(["",null]);try{const a=t.getFirstLinkpathDest(r,""),o=await n.cachedRead(a),i=window.app.foldManager.load(a);return[o,i]}catch(a){return console.error(`Failed to read the daily note template '${r}'`,a),new Tr.Notice("Failed to read the daily note template"),["",null]}}function Vs(e,t="day"){const n=e.clone().startOf(t).format();return`${t}-${n}`}function BN(e){return e.replace(/\[[^\]]*\]/g,"")}function z7(e,t){if(t==="week"){const n=BN(e);return/w{1,2}/i.test(n)&&(/M{1,4}/.test(n)||/D{1,4}/.test(n))}return!1}function Ap(e,t){return HN(e.basename,t)}function V7(e,t){return HN(Y7(e),t)}function HN(e,t){const r={day:wv,week:bv,month:Sv,quarter:Dv,year:Tv}[t]().format.split("/").pop(),a=window.moment(e,r,!0);if(!a.isValid())return null;if(z7(r,t)&&t==="week"){const o=BN(r);if(/w{1,2}/i.test(o))return window.moment(e,r.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return a}class W7 extends Error{}async function YN(e){const t=window.app,{vault:n}=t,r=window.moment,{template:a,format:o,folder:i}=wv(),[l,c]=await Np(a),f=e.format(o),p=await Iv(i,f);try{const g=await n.create(p,l.replace(/{{\s*date\s*}}/gi,f).replace(/{{\s*time\s*}}/gi,r().format("HH:mm")).replace(/{{\s*title\s*}}/gi,f).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(y,w,T,S,I,M)=>{const N=r(),_=e.clone().set({hour:N.get("hour"),minute:N.get("minute"),second:N.get("second")});return T&&_.add(parseInt(S,10),I),M?_.format(M.substring(1).trim()):_.format(o)}).replace(/{{\s*yesterday\s*}}/gi,e.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,e.clone().add(1,"d").format(o)));return t.foldManager.save(g,c),g}catch(g){console.error(`Failed to create file: '${p}'`,g),new Tr.Notice("Unable to create new file.")}}function $7(e,t){return t[Vs(e,"day")]??null}function Z7(){const{vault:e}=window.app,{folder:t}=wv(),n=e.getAbstractFileByPath(Tr.normalizePath(t));if(!n)throw new W7("Failed to find daily notes folder");const r={};return Tr.Vault.recurseChildren(n,a=>{if(a instanceof Tr.TFile){const o=Ap(a,"day");if(o){const i=Vs(o,"day");r[i]=a}}}),r}class q7 extends Error{}function G7(){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 J7(e){return G7().indexOf(e.toLowerCase())}async function UN(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=bv(),[o,i]=await Np(n),l=e.format(r),c=await Iv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,g,y,w,T,S)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),T),S?M.format(S.substring(1).trim()):M.format(r)}).replace(/{{\s*title\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(p,g,y)=>{const w=J7(g);return e.weekday(w).format(y.trim())}));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function K7(e,t){return t[Vs(e,"week")]??null}function Q7(){const e={};if(!VN())return e;const{vault:t}=window.app,{folder:n}=bv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new q7("Failed to find weekly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Ap(a,"week");if(o){const i=Vs(o,"week");e[i]=a}}}),e}class X7 extends Error{}async function zN(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Sv(),[o,i]=await Np(n),l=e.format(r),c=await Iv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,g,y,w,T,S)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),T),S?M.format(S.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function eL(e,t){return t[Vs(e,"month")]??null}function tL(){const e={};if(!WN())return e;const{vault:t}=window.app,{folder:n}=Sv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new X7("Failed to find monthly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Ap(a,"month");if(o){const i=Vs(o,"month");e[i]=a}}}),e}class nL extends Error{}async function rL(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Dv(),[o,i]=await Np(n),l=e.format(r),c=await Iv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,g,y,w,T,S)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),T),S?M.format(S.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function aL(e,t){return t[Vs(e,"quarter")]??null}function oL(){const e={};if(!$N())return e;const{vault:t}=window.app,{folder:n}=Dv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new nL("Failed to find quarterly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Ap(a,"quarter");if(o){const i=Vs(o,"quarter");e[i]=a}}}),e}class iL extends Error{}async function sL(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Tv(),[o,i]=await Np(n),l=e.format(r),c=await Iv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(p,g,y,w,T,S)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),T),S?M.format(S.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function lL(e,t){return t[Vs(e,"year")]??null}function uL(){const e={};if(!ZN())return e;const{vault:t}=window.app,{folder:n}=Tv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new iL("Failed to find yearly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Ap(a,"year");if(o){const i=Vs(o,"year");e[i]=a}}}),e}function cL(){var r,a;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&&((a=(r=n.settings)==null?void 0:r.daily)==null?void 0:a.enabled)}function VN(){var n,r;const{app:e}=window;if(e.plugins.getPlugin("calendar"))return!0;const t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.weekly)==null?void 0:r.enabled)}function WN(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.monthly)==null?void 0:r.enabled)}function $N(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.quarterly)==null?void 0:r.enabled)}function ZN(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.yearly)==null?void 0:r.enabled)}function dL(e){const t={day:wv,week:bv,month:Sv,quarter:Dv,year:Tv}[e];return t()}function fL(e,t){return{day:YN,month:zN,week:UN}[e](t)}gn.DEFAULT_DAILY_NOTE_FORMAT=tT;gn.DEFAULT_MONTHLY_NOTE_FORMAT=jN;gn.DEFAULT_QUARTERLY_NOTE_FORMAT=LN;gn.DEFAULT_WEEKLY_NOTE_FORMAT=nT;gn.DEFAULT_YEARLY_NOTE_FORMAT=RN;var Wg=gn.appHasDailyNotesPluginLoaded=cL;gn.appHasMonthlyNotesPluginLoaded=WN;gn.appHasQuarterlyNotesPluginLoaded=$N;gn.appHasWeeklyNotesPluginLoaded=VN;gn.appHasYearlyNotesPluginLoaded=ZN;var qN=gn.createDailyNote=YN;gn.createMonthlyNote=zN;gn.createPeriodicNote=fL;gn.createQuarterlyNote=rL;gn.createWeeklyNote=UN;gn.createYearlyNote=sL;var Zu=gn.getAllDailyNotes=Z7;gn.getAllMonthlyNotes=tL;gn.getAllQuarterlyNotes=oL;gn.getAllWeeklyNotes=Q7;gn.getAllYearlyNotes=uL;var ub=gn.getDailyNote=$7,qc=gn.getDailyNoteSettings=wv,up=gn.getDateFromFile=Ap;gn.getDateFromPath=V7;gn.getDateUID=Vs;gn.getMonthlyNote=eL;gn.getMonthlyNoteSettings=Sv;gn.getPeriodicNoteSettings=dL;gn.getQuarterlyNote=aL;gn.getQuarterlyNoteSettings=Dv;gn.getTemplateInfo=Np;gn.getWeeklyNote=K7;gn.getWeeklyNoteSettings=bv;gn.getYearlyNote=lL;gn.getYearlyNoteSettings=Tv;const hL={},pL={},mL={},gL={},GN={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","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",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 even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC 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","Return To Home Page":"Return Home","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","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."},vL={},yL={},wL={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"},bL={},SL={},DL={},TL={},IL={},EL={},xL={},CL={},ML={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"},kL={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"},NL={},AL={},FL={},OL={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:"归档","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:"选择","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":"展示任务标签","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 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:"字词","Return To Home Page":"返回首页","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":"默认分享样式","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 中捕获想法/文本。"},PL={},jL={ar:hL,cs:pL,da:mL,de:gL,en:GN,"en-gb":vL,es:yL,fr:wL,hi:bL,id:SL,it:DL,ja:TL,ko:IL,nl:EL,nn:xL,pl:CL,pt:ML,"pt-br":kL,ro:NL,ru:AL,tr:FL,"zh-cn":OL,"zh-tw":PL},Sx=jL[C.moment.locale()];function E(e){const t=Sx&&Sx[e]||GN[e];return t===null?t:t||e}const LL=/```([\s\S]*?)```/g,RL=/\*\*(.+?)\*\*/g,_L=/\*(.+?)\*/g,BL=/\[ \] /g,HL=/\[.{1}\] /g,YL=/^[*-]/g,UL=/(\d+)\. /g,Dx=/\[\[([^\]]+)\]\]/g,rT=/\[([^\]]+)\]\((([^\]]+).md)\)/g,zL=(e,t)=>{const n=e.replace(LL,"<pre lang=''>$1</pre>").replace(YL,"<span class='counter-block'>•</span>").replace(UL,"<span class='counter-block'>$1.</span>").replace(BL,"<span class='todo-block' data-type='todo'>⬜</span>").replace(HL,"<span class='todo-block' data-type='done'>✅</span>").replace(RL,"<strong>$1</strong>").replace(_L,"<em>$1</em>").replace(/&lt;br&gt;/g,"</p><p>").replace(/&amp;/g,"&");let r=n;if(t){if(Dx.test(n)){const a=n.match(Dx);for(let o=0;o<a.length;o++)if(!/(jpeg|jpg|gif|png|svg|bmp|wepg)/g.test(a[o])){const i=VL(a[o]);if(/\|/g.test(i)){const[l,c]=i.split("|"),f=pS(l,c);r=n.replace(a[o],f)}else{const f=pS(i,"");r=r.replace(a[o],f)}}}if(rT.test(n)){const a=n.match(rT);for(let o=0;o<a.length;o++)if(!/(jpeg|jpg|gif|png|svg|bmp|wepg)/g.test(a[o])){const i=$L(a[o]),l=WL(a[o]),c=pS(i,l);r=n.replace(a[o],c)}}}return r},pS=(e,t)=>{const{metadataCache:n}=Le.getState().dailyNotesState.app;return n.getFirstLinkpathDest(decodeURIComponent(e),"")instanceof C.TFile?t?`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link">${t}</a>`:`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link">${e}</a>`:t?`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link is-unresolved">${t}</a>`:`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link is-unresolved">${e}</a>`},VL=e=>{var t;return(t=/\[\[([^\]]+)\]\]/g.exec(e))==null?void 0:t[1]},WL=e=>{var t;return(t=rT.exec(e))==null?void 0:t[1]},$L=e=>{var t;return(t=/\[([^\]]+)\]\((([^\]]+).md)\)/g.exec(e))==null?void 0:t[3]},Tx=e=>{const t=document.createElement("div");return t.className="memo-content-text",t.innerHTML=e,t.innerText},ZL=e=>e.replace(/\n/g,"<br>"),qL=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},Ix="mobile-show-sidebar",JN=200,ei=3600*24*1e3,$r=/\s#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,Wa=/(<p>|<br>)#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,ua=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,Cf=/(\s||\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,GL=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,Mf=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,nd=/\[@(.+?)\]\((.+?)\)/g,JL=/[#*"\/\\<>:|\[\]\?]/gim,KL=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,$g=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var aT;(e=>{function t(){return parseInt(C.moment().format("x"))}e.getNowTimeStamp=t;function n(U){const z=/'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,$=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,X=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,Q=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${z}])+`,$,X].join("|"),"g");return(U.match(Q)||[]).length}e.getWordCount=n;function r(U){Wg()&&(U!=null&&U.EnabledLocationList.some(z=>z.value==="DAILY"))&&(U!=null&&U.EnabledLocationList.some(z=>z.value==="MULTI"))&&cb().contains(U==null?void 0:U.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new C.Notice(E("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 a(){const U=navigator.userAgent;let z="Unknown";return U.indexOf("Win")!=-1?z="Windows":U.indexOf("Mac")!=-1?z="MacOS":U.indexOf("Linux")!=-1&&(z="Linux"),z}e.getOSVersion=a;function o(U){return typeof U=="string"&&(U=U.replaceAll("-","/")),new Date(U).getTime()}e.getTimeStampByDate=o;function i(U){const z=new Date(o(U));return new Date(z.getFullYear(),z.getMonth(),z.getDate()).getTime()}e.getDateStampByDate=i;function l(U){const z=new Date(o(U)),$=z.getFullYear(),X=z.getMonth()+1,Q=z.getDate();return`${$}/${X}/${Q}`}e.getDateString=l;function c(U){const z=new Date(o(U)),$=z.getHours(),X=z.getMinutes(),Q=$<10?"0"+$:$,se=X<10?"0"+X:X;return`${Q}:${se}`}e.getTimeString=c;function f(U){const z=new Date(o(U)),$=z.getFullYear(),X=z.getMonth()+1,Q=z.getDate(),se=z.getHours(),ue=z.getMinutes(),fe=z.getSeconds(),Z=X<10?"0"+X:X,pe=Q<10?"0"+Q:Q,ie=se<10?"0"+se:se,de=ue<10?"0"+ue:ue,K=fe<10?"0"+fe:fe;return`${$}/${Z}/${pe} ${ie}:${de}:${K}`}e.getDateTimeString=f;function p(U){return Array.from(new Set(U))}e.dedupe=p;function g(U){const z=new Set,$=[];for(const X of U)z.has(X.id)||(z.add(X.id),$.push(X));return $}e.dedupeObjectWithId=g;function y(U,z){let $=null;return()=>{$&&clearTimeout($),$=setTimeout(U,z)}}e.debounce=y;function w(U,z,$=!1,X){let Q=null,se=!1;function ue(...fe){if(Q&&clearTimeout(Q),$&&!se){const Z=U.apply(this,fe);X&&typeof X=="function"&&X(Z),se=!0}else Q=setTimeout(()=>{const Z=U.apply(this,fe);X&&typeof X=="function"&&X(Z),se=!1,Q=null},z)}return ue.cancel=function(){Q&&clearTimeout(Q),Q=null,se=!1},ue}e.debouncePlus=w;function T(U,z){let $=!0;return()=>{if(!$)return!1;$=!1,setTimeout(()=>{U(),$=!0},z)}}e.throttle=T;function S(U){const z=[],$=Object.keys(U).sort();for(const X of $){const Q=U[X];Q&&(typeof Q=="object"?z.push(...S(Q).split("&")):z.push(`${X}=${Q}`))}return z.join("&")}e.transformObjectToParamsString=S;function I(U){const z={},$=U.split("&");for(const X of $){const[Q,se]=X.split("=");Q&&se&&(z[Q]=se)}return z}e.transformParamsStringToObject=I;function M(U){if(!U)return{};const z={},$=Object.keys(U).sort();for(const X of $){const Q=U[X];if(typeof Q=="object"){const se=M(JSON.parse(JSON.stringify(Q)));se&&Object.keys(se).length>0&&(z[X]=se)}else Q&&(z[X]=Q)}return z}e.filterObjectNullKeys=M;async function N(U){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(U)}catch(z){console.warn("Copy to clipboard failed.",z)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=N;function _(U){return new Promise(z=>{const $=new Image;$.onload=()=>{const{width:X,height:Q}=$;X>0&&Q>0?z({width:X,height:Q}):z({width:0,height:0})},$.onerror=()=>{z({width:0,height:0})},$.className="hidden",$.src=U,document.body.appendChild($),$.remove()})}e.getImageSize=_;async function k(U){var Q,se,ue,fe;let z;const X=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!X&&((fe=(ue=(se=(Q=window.app.plugins)==null?void 0:Q.getPlugin("periodic-notes"))==null?void 0:se.calendarSetManager)==null?void 0:ue.getActiveConfig("day"))!=null&&fe.enabled)?(z=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",U),z):(z=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(U)||await qN(U),z)}catch(Z){return console.error(Z),new C.Notice(E("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=k;function R(U){const z=[];let $=0;for(;$<U;$++)z.push((16*Math.random()|0).toString(16));return z.join("")}e.randomId=R;function L(U){return U.replace(/[\p{P}\p{Z}\p{S}]/gu,"").length}e.countWords=L;async function H(U){try{const z=await C.requestUrl(U),$=new Uint8Array(z.arrayBuffer);return new Blob([$],{type:"image/png"})}catch(z){return console.error("error in grabImageFromUrl",U,z),new Blob}}e.grabImageFromUrl=H})(aT||(aT={}));const ut=aT;function QL(){var o,i,l,c,f,p;let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=(l=(i=(o=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:o.calendarSetManager)==null?void 0:i.getActiveConfig("day"))==null?void 0:l.folder,a=(p=(f=(c=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:c.settings)==null?void 0:f.daily)==null?void 0:p.format;switch(r===void 0?n=a:n=r,(t==null?void 0:t.UseDailyOrPeriodic)||"Daily"){case"Daily":e=qc().format||"YYYY-MM-DD";break;case"Periodic":e=n||"YYYY-MM-DD";break;default:e=qc().format||"YYYY-MM-DD";break}return e===void 0&&new C.Notice(E("You didn't set format for daily notes in both periodic-notes and daily-notes plugins.")),e}function cb(){var o,i,l,c,f,p;let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=(l=(i=(o=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:o.calendarSetManager)==null?void 0:i.getActiveConfig("day"))==null?void 0:l.folder,a=(p=(f=(c=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:c.settings)==null?void 0:f.daily)==null?void 0:p.folder;switch(r===void 0?n=a:n=r,(t==null?void 0:t.UseDailyOrPeriodic)||"Daily"){case"Daily":e=qc().folder||"";break;case"Periodic":e=n||"";break;default:e=qc().folder||"";break}return e===void 0&&new C.Notice(E("You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.")),e}function XL(){const e=cb();return!(e!==void 0&&!app.vault.getFolderByPath(e))}function oT(e,t){var r;e=qL(e),e=ZL(e).split("<br>").map(a=>`<p>${a!==""?a:"<br>"}</p>`).join(""),e=zL(e,t),e=e.replace($r,"<span class='tag-span'>#$1</span>").replace(Wa,"<p><span class='tag-span'>#$2</span>").replace(Cf,"$1<a class='link' target='_blank' rel='noreferrer' href='$2'>$2</a>").replace(GL,"<a class='link' target='_blank' rel='noreferrer' href='$2'>$1</a>").replace(nd,"<span class='memo-link-text' data-value='$2'>$1</span>").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let a=0;a<n.children.length;a++){const o=n.children[a];if(o.tagName==="P"&&o.textContent===""&&((r=o.firstElementChild)==null?void 0:r.tagName)!=="BR"){o.remove(),a--;continue}}return n.innerHTML}const db=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r);for(let o=0;o<n.length;o++)a[o]=n.charCodeAt(o);return new Blob([r],{type:t})};function KN(e,t){return Object.keys(t).every(n=>typeof t[n]=="object"&&t[n]!==null&&typeof e[n]=="object"&&e[n]!==null?KN(e[n],t[n]):Object.prototype.hasOwnProperty.call(e,n)&&e[n]===t[n])}function eR(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((a,o)=>{const i=ut.getTimeStampByDate(a.createdAt),l=ut.getTimeStampByDate(o.createdAt);return i===l?o.id.localeCompare(a.id):ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.createdAt)}),r=ut.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=ut.dedupeObjectWithId(t.payload.commentMemos.sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.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=ut.dedupeObjectWithId([t.payload.memo,...e.memos].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.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(a=>a.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{...QN};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(a=>a.path!==t.payload.path),r=ut.dedupeObjectWithId([...t.payload.memos,...n].sort((a,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.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(a=>a.id===r.id)?{...r,...t.payload.filter(a=>a.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 QN={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function tR(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const nR={user:null};function rR(e,t){switch(t.type){case"SET_QUERIES":{const n=ut.dedupeObjectWithId(t.payload.queries.sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)).sort((r,a)=>ut.getTimeStampByDate(a.pinnedAt??0)-ut.getTimeStampByDate(r.pinnedAt??0)));return{...e,queries:n}}case"INSERT_QUERY":{const n=ut.dedupeObjectWithId([t.payload.query,...e.queries].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.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 aR={queries:[]};function oR(e,t){var n,r,a,o;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&&((r=(n=e.view)==null?void 0:n.leaf)==null?void 0:r.id)===((o=(a=t.payload.view)==null?void 0:a.leaf)==null?void 0:o.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 iR={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},Le=R7({globalState:B7,locationState:PN,memoState:QN,userState:nR,queryState:aR,dailyNotesState:iR},L7({globalState:_7,locationState:H7,memoState:eR,userState:tR,queryState:rR,dailyNotesState:oR})),Lt=P.createContext(Le.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 sR{constructor(){De(this,"initialized",!1)}getState(){return Le.getState().dailyNotesState}setApp(t){return Le.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return Le.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return Le.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return Le.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return Le.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,a=up(t,"day");return n?delete r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return Le.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=Zu();return Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const ft=new sR;var la;(e=>{function t(o){const i={};for(const l of o)try{const c=localStorage.getItem(l);if(c!==null){const f=JSON.parse(c);i[l]=f}}catch(c){console.error("Get storage failed in ",l,c)}return i}e.get=t;function n(o){for(const i in o)try{const l=JSON.stringify(o[i]);localStorage.setItem(i,l)}catch(l){console.error("Save storage failed in ",i,l)}}e.set=n;function r(o){for(const i of o)try{localStorage.removeItem(i)}catch(l){console.error("Remove storage failed in ",i,l)}}e.remove=r;function a(){var i;const o=document.createElement("iframe");o.style.display="none",document.body.appendChild(o),(i=o.contentWindow)==null||i.localStorage.setItem("t",Date.now().toString()),o.remove()}e.emitStorageChangedEvent=a})(la||(la={}));class lR{constructor(){De(this,"getState",()=>Le.getState().globalState);De(this,"setEditMemoId",t=>{Le.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})});De(this,"setRefresh",t=>{Le.dispatch({type:"SET_REFRESH",payload:{refresh:t}})});De(this,"setCommentMemoId",t=>{Le.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})});De(this,"setMarkMemoId",t=>{Le.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})});De(this,"setLoaded",t=>{Le.dispatch({type:"SET_LOADED",payload:{loaded:t}})});De(this,"setGlobalEditorShown",t=>{Le.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})});De(this,"setIsMobileView",t=>{Le.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})});De(this,"setChangedByMemos",t=>{Le.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})});De(this,"setShowSiderbarInMobileView",t=>{Le.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})});De(this,"setAppSetting",t=>{Le.dispatch({type:"SET_APP_SETTING",payload:t}),la.set(t)});De(this,"setMemoListView",t=>{Le.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})});De(this,"setInstance",(t,n)=>{Le.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})});De(this,"setLocked",t=>{Le.dispatch({type:"SET_LOCKED",payload:{locked:t}})});De(this,"setExitSteps",t=>{Le.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})});De(this,"setPluginManifest",t=>{Le.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})});const t=la.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)}}const dt=new lR;class uR{constructor(){De(this,"updateStateWithLocation",()=>{const{pathname:t,search:n,hash:r}=window.location,a=new URLSearchParams(n),o={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:""}};o.query.tag=a.get("tag")||"",o.query.type=a.get("type")??"",o.query.text=a.get("text")??"",o.query.filter=a.get("filter")??"";const i=parseInt(a.get("from")??"0"),l=parseInt(a.get("to")??"0");l>i&&l!==0&&(o.query.duration={from:i,to:l}),o.hash=r,o.pathname=this.getValidPathname(t),Le.dispatch({type:"SET_LOCATION",payload:o})});De(this,"getState",()=>Le.getState().locationState);De(this,"clearQuery",()=>{Le.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:""}})});De(this,"setQuery",t=>{Le.dispatch({type:"SET_QUERY",payload:t})});De(this,"reloadApp",()=>{Le.dispatch({type:"RELOAD"})});De(this,"setHash",t=>{Le.dispatch({type:"SET_HASH",payload:{hash:t}})});De(this,"setPathname",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"pushHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"replaceHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"setMemoTypeQuery",(t="")=>{Le.dispatch({type:"SET_TYPE",payload:{type:t}})});De(this,"setMemoFilter",t=>{Le.dispatch({type:"SET_QUERY_FILTER",payload:t})});De(this,"setTextQuery",t=>{Le.dispatch({type:"SET_TEXT",payload:{text:t}})});De(this,"setTimeQuery",t=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})});De(this,"setTagQuery",t=>{Le.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})});De(this,"setFromAndToQuery",(t,n)=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})});De(this,"getValidPathname",t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/");this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}}const ot=new uR,uf=e=>`${e.vault.configDir}/query.json`,XN=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},Fp=async e=>(await XN(e,uf(e))||await eA(e),JSON.parse(await e.vault.adapter.read(uf(e))).queries||[]),Ev=async(e,t)=>{await e.vault.adapter.write(uf(e),JSON.stringify({queries:t},null,2))},eA=async e=>{const t=dt.getState().manifest,n=e.plugins.getPlugin(t.id||"obsidian-memos").settings,r=e.metadataCache.getFirstLinkpathDest(n.QueryFileName,"");if(!r)await e.vault.adapter.write(uf(e),JSON.stringify({queries:[]},null,2));else{const o=(await e.vault.read(r)).split(`
`);o.length===0&&await e.vault.adapter.write(uf(e),JSON.stringify({queries:[]},null,2));const i=[];for(let l=0;l<o.length;l++){const c=l,f="Memos";let p="未命名";const g=o[l];let y=C.moment().format("YYYY/MM/DD HH:mm:ss"),w="[]";const T=g.match(/^\d{14,16}/);T&&(y=C.moment(T[0].slice(0,14),"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:ss"));const S=g.match(/\[\{(.+)\}\]/);S&&(w=S[0]);const I=g.match(/\s(.+)\s\[\{/);I&&(p=I[0].slice(1,-3)),i.push({id:c,pinnedAt:"",createdAt:y,updatedAt:y,title:p,querystring:w,userId:f})}await e.vault.adapter.write(uf(e),JSON.stringify({queries:i},null,2))}},cR=async()=>{const{app:e}=Le.getState().dailyNotesState;return await XN(e,uf(e))||await eA(e),await Fp(e)||[]},dR=(e,t)=>({createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:E("Temp Filter"),updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),fR=async(e,t)=>{const n=await Fp(Le.getState().dailyNotesState.app)||[],r={createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),id:C.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await Ev(Le.getState().dailyNotesState.app,n),r};var bw={exports:{}};bw.exports;(function(e,t){(function(){var n,r="4.17.21",a=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",g=1,y=2,w=4,T=1,S=2,I=1,M=2,N=4,_=8,k=16,R=32,L=64,H=128,U=256,z=512,$=30,X="...",Q=800,se=16,ue=1,fe=2,Z=3,pe=1/0,ie=9007199254740991,de=17976931348623157e292,K=NaN,ae=4294967295,Se=ae-1,je=ae>>>1,Re=[["ary",H],["bind",I],["bindKey",M],["curry",_],["curryRight",k],["flip",z],["partial",R],["partialRight",L],["rearg",U]],Fe="[object Arguments]",Be="[object Array]",Qe="[object AsyncFunction]",Ze="[object Boolean]",st="[object Date]",xt="[object DOMException]",tn="[object Error]",_e="[object Function]",Xe="[object GeneratorFunction]",tt="[object Map]",ht="[object Number]",St="[object Null]",Tt="[object Object]",Gt="[object Promise]",_t="[object Proxy]",Vt="[object RegExp]",Xt="[object Set]",dn="[object String]",en="[object Symbol]",Zn="[object Undefined]",kn="[object WeakMap]",Er="[object WeakSet]",pt="[object ArrayBuffer]",Mt="[object DataView]",Jt="[object Float32Array]",on="[object Float64Array]",ln="[object Int8Array]",vr="[object Int16Array]",fr="[object Int32Array]",ha="[object Uint8Array]",jr="[object Uint8ClampedArray]",nr="[object Uint16Array]",Lr="[object Uint32Array]",te=/\b__p \+= '';/g,me=/\b(__p \+=) '' \+/g,Ce=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ye=/&(?:amp|lt|gt|quot|#39);/g,He=/[&<>"']/g,Ke=RegExp(Ye.source),et=RegExp(He.source),kt=/<%-([\s\S]+?)%>/g,Yt=/<%([\s\S]+?)%>/g,On=/<%=([\s\S]+?)%>/g,vn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/,Jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,ta=RegExp(yr.source),Pi=/^\s+/,Nn=/\s/,Aa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fa=/\{\n\/\* \[wrapped with (.+)\] \*/,Zr=/,? & /,fo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Oa=/[()=,{}\[\]\/\s]/,ru=/\\(\\)?/g,si=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,li=/\w*$/,Xu=/^[-+]0x[0-9a-f]+$/i,au=/^0b[01]+$/i,us=/^\[object .+?Constructor\]$/,ji=/^0o[0-7]+$/i,cs=/^(?:0|[1-9]\d*)$/,ou=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ds=/($^)/,ec=/['\n\r\u2028\u2029\\]/g,An="\\ud800-\\udfff",na="\\u0300-\\u036f",Zs="\\ufe20-\\ufe2f",qs="\\u20d0-\\u20ff",ui=na+Zs+qs,iu="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",ho="\\xac\\xb1\\xd7\\xf7",Pa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fs="\\u2000-\\u206f",Rr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gs="A-Z\\xc0-\\xd6\\xd8-\\xde",Js="\\ufe0e\\ufe0f",Ks=ho+Pa+fs+Rr,po="[']",hs="["+An+"]",ci="["+Ks+"]",mo="["+ui+"]",A="\\d+",Y="["+iu+"]",J="["+Fo+"]",oe="[^"+An+Ks+A+iu+Fo+Gs+"]",Ne="\\ud83c[\\udffb-\\udfff]",Ie="(?:"+mo+"|"+Ne+")",Ue="[^"+An+"]",it="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Gs+"]",$t="\\u200d",Pn="(?:"+J+"|"+oe+")",Ga="(?:"+Ft+"|"+oe+")",ja="(?:"+po+"(?:d|ll|m|re|s|t|ve))?",ra="(?:"+po+"(?:D|LL|M|RE|S|T|VE))?",Oo=Ie+"?",La="["+Js+"]?",Ja="(?:"+$t+"(?:"+[Ue,it,ct].join("|")+")"+La+Oo+")*",pa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",go="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ra=La+Oo+Ja,Li="(?:"+[Y,it,ct].join("|")+")"+Ra,Ri="(?:"+[Ue+mo+"?",mo,it,ct,hs].join("|")+")",sm=RegExp(po,"g"),jf=RegExp(mo,"g"),ps=RegExp(Ne+"(?="+Ne+")|"+Ri+Ra,"g"),lm=RegExp([Ft+"?"+J+"+"+ja+"(?="+[ci,Ft,"$"].join("|")+")",Ga+"+"+ra+"(?="+[ci,Ft+Pn,"$"].join("|")+")",Ft+"?"+Pn+"+"+ja,Ft+"+"+ra,go,pa,A,Li].join("|"),"g"),Po=RegExp("["+$t+An+ui+Js+"]"),Qs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,su=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bn=-1,fn={};fn[Jt]=fn[on]=fn[ln]=fn[vr]=fn[fr]=fn[ha]=fn[jr]=fn[nr]=fn[Lr]=!0,fn[Fe]=fn[Be]=fn[pt]=fn[Ze]=fn[Mt]=fn[st]=fn[tn]=fn[_e]=fn[tt]=fn[ht]=fn[Tt]=fn[Vt]=fn[Xt]=fn[dn]=fn[kn]=!1;var hn={};hn[Fe]=hn[Be]=hn[pt]=hn[Mt]=hn[Ze]=hn[st]=hn[Jt]=hn[on]=hn[ln]=hn[vr]=hn[fr]=hn[tt]=hn[ht]=hn[Tt]=hn[Vt]=hn[Xt]=hn[dn]=hn[en]=hn[ha]=hn[jr]=hn[nr]=hn[Lr]=!0,hn[tn]=hn[_e]=hn[kn]=!1;var jo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"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",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},tc={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ms={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nc=parseFloat,Xs=parseInt,el=typeof dr=="object"&&dr&&dr.Object===Object&&dr,cd=typeof self=="object"&&self&&self.Object===Object&&self,zn=el||cd||Function("return this")(),tl=t&&!t.nodeType&&t,Lo=tl&&!0&&e&&!e.nodeType&&e,dd=Lo&&Lo.exports===tl,di=dd&&el.process,qr=function(){try{var we=Lo&&Lo.require&&Lo.require("util").types;return we||di&&di.binding&&di.binding("util")}catch{}}(),nl=qr&&qr.isArrayBuffer,Gr=qr&&qr.isDate,gs=qr&&qr.isMap,_i=qr&&qr.isRegExp,rl=qr&&qr.isSet,rc=qr&&qr.isTypedArray;function Cr(we,ze,Oe){switch(Oe.length){case 0:return we.call(ze);case 1:return we.call(ze,Oe[0]);case 2:return we.call(ze,Oe[0],Oe[1]);case 3:return we.call(ze,Oe[0],Oe[1],Oe[2])}return we.apply(ze,Oe)}function vs(we,ze,Oe,vt){for(var Qt=-1,Dn=we==null?0:we.length;++Qt<Dn;){var Mr=we[Qt];ze(vt,Mr,Oe(Mr),we)}return vt}function wr(we,ze){for(var Oe=-1,vt=we==null?0:we.length;++Oe<vt&&ze(we[Oe],Oe,we)!==!1;);return we}function lu(we,ze){for(var Oe=we==null?0:we.length;Oe--&&ze(we[Oe],Oe,we)!==!1;);return we}function ac(we,ze){for(var Oe=-1,vt=we==null?0:we.length;++Oe<vt;)if(!ze(we[Oe],Oe,we))return!1;return!0}function fi(we,ze){for(var Oe=-1,vt=we==null?0:we.length,Qt=0,Dn=[];++Oe<vt;){var Mr=we[Oe];ze(Mr,Oe,we)&&(Dn[Qt++]=Mr)}return Dn}function al(we,ze){var Oe=we==null?0:we.length;return!!Oe&&ys(we,ze,0)>-1}function aa(we,ze,Oe){for(var vt=-1,Qt=we==null?0:we.length;++vt<Qt;)if(Oe(ze,we[vt]))return!0;return!1}function jn(we,ze){for(var Oe=-1,vt=we==null?0:we.length,Qt=Array(vt);++Oe<vt;)Qt[Oe]=ze(we[Oe],Oe,we);return Qt}function Ro(we,ze){for(var Oe=-1,vt=ze.length,Qt=we.length;++Oe<vt;)we[Qt+Oe]=ze[Oe];return we}function fd(we,ze,Oe,vt){var Qt=-1,Dn=we==null?0:we.length;for(vt&&Dn&&(Oe=we[++Qt]);++Qt<Dn;)Oe=ze(Oe,we[Qt],Qt,we);return Oe}function Lf(we,ze,Oe,vt){var Qt=we==null?0:we.length;for(vt&&Qt&&(Oe=we[--Qt]);Qt--;)Oe=ze(Oe,we[Qt],Qt,we);return Oe}function ol(we,ze){for(var Oe=-1,vt=we==null?0:we.length;++Oe<vt;)if(ze(we[Oe],Oe,we))return!0;return!1}var Rf=F("length");function hd(we){return we.split("")}function oc(we){return we.match(fo)||[]}function uu(we,ze,Oe){var vt;return Oe(we,function(Qt,Dn,Mr){if(ze(Qt,Dn,Mr))return vt=Dn,!1}),vt}function cu(we,ze,Oe,vt){for(var Qt=we.length,Dn=Oe+(vt?1:-1);vt?Dn--:++Dn<Qt;)if(ze(we[Dn],Dn,we))return Dn;return-1}function ys(we,ze,Oe){return ze===ze?Bf(we,ze,Oe):cu(we,sc,Oe)}function ic(we,ze,Oe,vt){for(var Qt=Oe-1,Dn=we.length;++Qt<Dn;)if(vt(we[Qt],ze))return Qt;return-1}function sc(we){return we!==we}function pd(we,ze){var Oe=we==null?0:we.length;return Oe?Ae(we,ze)/Oe:K}function F(we){return function(ze){return ze==null?n:ze[we]}}function B(we){return function(ze){return we==null?n:we[ze]}}function q(we,ze,Oe,vt,Qt){return Qt(we,function(Dn,Mr,Yn){Oe=vt?(vt=!1,Dn):ze(Oe,Dn,Mr,Yn)}),Oe}function re(we,ze){var Oe=we.length;for(we.sort(ze);Oe--;)we[Oe]=we[Oe].value;return we}function Ae(we,ze){for(var Oe,vt=-1,Qt=we.length;++vt<Qt;){var Dn=ze(we[vt]);Dn!==n&&(Oe=Oe===n?Dn:Oe+Dn)}return Oe}function Ee(we,ze){for(var Oe=-1,vt=Array(we);++Oe<we;)vt[Oe]=ze(Oe);return vt}function Ve(we,ze){return jn(ze,function(Oe){return[Oe,we[Oe]]})}function at(we){return we&&we.slice(0,Hf(we)+1).replace(Pi,"")}function It(we){return function(ze){return we(ze)}}function Kt(we,ze){return jn(ze,function(Oe){return we[Oe]})}function Rt(we,ze){return we.has(ze)}function Hn(we,ze){for(var Oe=-1,vt=we.length;++Oe<vt&&ys(ze,we[Oe],0)>-1;);return Oe}function oa(we,ze){for(var Oe=we.length;Oe--&&ys(ze,we[Oe],0)>-1;);return Oe}function Ka(we,ze){for(var Oe=we.length,vt=0;Oe--;)we[Oe]===ze&&++vt;return vt}var Qa=B(jo),du=B(vo);function md(we){return"\\"+ms[we]}function Bi(we,ze){return we==null?n:we[ze]}function lc(we){return Po.test(we)}function M1(we){return Qs.test(we)}function k1(we){for(var ze,Oe=[];!(ze=we.next()).done;)Oe.push(ze.value);return Oe}function _f(we){var ze=-1,Oe=Array(we.size);return we.forEach(function(vt,Qt){Oe[++ze]=[Qt,vt]}),Oe}function um(we,ze){return function(Oe){return we(ze(Oe))}}function _o(we,ze){for(var Oe=-1,vt=we.length,Qt=0,Dn=[];++Oe<vt;){var Mr=we[Oe];(Mr===ze||Mr===p)&&(we[Oe]=p,Dn[Qt++]=Oe)}return Dn}function il(we){var ze=-1,Oe=Array(we.size);return we.forEach(function(vt){Oe[++ze]=vt}),Oe}function N1(we){var ze=-1,Oe=Array(we.size);return we.forEach(function(vt){Oe[++ze]=[vt,vt]}),Oe}function Bf(we,ze,Oe){for(var vt=Oe-1,Qt=we.length;++vt<Qt;)if(we[vt]===ze)return vt;return-1}function A1(we,ze,Oe){for(var vt=Oe+1;vt--;)if(we[vt]===ze)return vt;return vt}function fu(we){return lc(we)?hy(we):Rf(we)}function yo(we){return lc(we)?py(we):hd(we)}function Hf(we){for(var ze=we.length;ze--&&Nn.test(we.charAt(ze)););return ze}var fy=B(tc);function hy(we){for(var ze=ps.lastIndex=0;ps.test(we);)++ze;return ze}function py(we){return we.match(ps)||[]}function F1(we){return we.match(lm)||[]}var O1=function we(ze){ze=ze==null?zn:uc.defaults(zn.Object(),ze,uc.pick(zn,su));var Oe=ze.Array,vt=ze.Date,Qt=ze.Error,Dn=ze.Function,Mr=ze.Math,Yn=ze.Object,gd=ze.RegExp,P1=ze.String,Bo=ze.TypeError,ws=Oe.prototype,cm=Dn.prototype,Hi=Yn.prototype,cc=ze["__core-js_shared__"],vd=cm.toString,Tn=Hi.hasOwnProperty,dc=0,Yf=function(){var d=/[^.]+$/.exec(cc&&cc.keys&&cc.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),yd=Hi.toString,Uf=vd.call(Yn),my=zn._,gy=gd("^"+vd.call(Tn).replace(yr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wd=dd?ze.Buffer:n,bs=ze.Symbol,bd=ze.Uint8Array,dm=wd?wd.allocUnsafe:n,hi=um(Yn.getPrototypeOf,Yn),zf=Yn.create,Vf=Hi.propertyIsEnumerable,Wf=ws.splice,vy=bs?bs.isConcatSpreadable:n,Ss=bs?bs.iterator:n,hu=bs?bs.toStringTag:n,Sd=function(){try{var d=Cs(Yn,"defineProperty");return d({},"",{}),d}catch{}}(),yy=ze.clearTimeout!==zn.clearTimeout&&ze.clearTimeout,Kn=vt&&vt.now!==zn.Date.now&&vt.now,fm=ze.setTimeout!==zn.setTimeout&&ze.setTimeout,pu=Mr.ceil,sl=Mr.floor,$f=Yn.getOwnPropertySymbols,hm=wd?wd.isBuffer:n,fc=ze.isFinite,Zf=ws.join,hc=um(Yn.keys,Yn),kr=Mr.max,ma=Mr.min,j1=vt.now,wy=ze.parseInt,Dd=Mr.random,qf=ws.reverse,Td=Cs(ze,"DataView"),mu=Cs(ze,"Map"),Id=Cs(ze,"Promise"),ll=Cs(ze,"Set"),Ed=Cs(ze,"WeakMap"),pc=Cs(Yn,"create"),Gf=Ed&&new Ed,mc={},pm=Dl(Td),ul=Dl(mu),by=Dl(Id),gc=Dl(ll),Yi=Dl(Ed),cl=bs?bs.prototype:n,wo=cl?cl.valueOf:n,Jf=cl?cl.toString:n;function G(d){if(Ar(d)&&!an(d)&&!(d instanceof nn)){if(d instanceof ga)return d;if(Tn.call(d,"__wrapped__"))return Zm(d)}return new ga(d)}var vc=function(){function d(){}return function(h){if(!Sr(h))return{};if(zf)return zf(h);d.prototype=h;var D=new d;return d.prototype=n,D}}();function Ui(){}function ga(d,h){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}G.templateSettings={escape:kt,evaluate:Yt,interpolate:On,variable:"",imports:{_:G}},G.prototype=Ui.prototype,G.prototype.constructor=G,ga.prototype=vc(Ui.prototype),ga.prototype.constructor=ga;function nn(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function Kf(){var d=new nn(this.__wrapped__);return d.__actions__=Ha(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=Ha(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=Ha(this.__views__),d}function mm(){if(this.__filtered__){var d=new nn(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function yc(){var d=this.__wrapped__.value(),h=this.__dir__,D=an(d),j=h<0,V=D?d.length:0,ee=Vy(0,V,this.__views__),ce=ee.start,ve=ee.end,Te=ve-ce,We=j?ve:ce-1,$e=this.__iteratees__,Je=$e.length,mt=0,Nt=ma(Te,this.__takeCount__);if(!D||!j&&V==Te&&Nt==Te)return Cm(d,this.__actions__);var Ut=[];e:for(;Te--&&mt<Nt;){We+=h;for(var cn=-1,zt=d[We];++cn<Je;){var pn=$e[cn],bn=pn.iteratee,Ti=pn.type,xo=bn(zt);if(Ti==fe)zt=xo;else if(!xo){if(Ti==ue)continue e;break e}}Ut[mt++]=zt}return Ut}nn.prototype=vc(Ui.prototype),nn.prototype.constructor=nn;function Xa(d){var h=-1,D=d==null?0:d.length;for(this.clear();++h<D;){var j=d[h];this.set(j[0],j[1])}}function Qn(){this.__data__=pc?pc(null):{},this.size=0}function qn(d){var h=this.has(d)&&delete this.__data__[d];return this.size-=h?1:0,h}function dl(d){var h=this.__data__;if(pc){var D=h[d];return D===c?n:D}return Tn.call(h,d)?h[d]:n}function va(d){var h=this.__data__;return pc?h[d]!==n:Tn.call(h,d)}function eo(d,h){var D=this.__data__;return this.size+=this.has(d)?0:1,D[d]=pc&&h===n?c:h,this}Xa.prototype.clear=Qn,Xa.prototype.delete=qn,Xa.prototype.get=dl,Xa.prototype.has=va,Xa.prototype.set=eo;function _a(d){var h=-1,D=d==null?0:d.length;for(this.clear();++h<D;){var j=d[h];this.set(j[0],j[1])}}function wc(){this.__data__=[],this.size=0}function to(d){var h=this.__data__,D=wa(h,d);if(D<0)return!1;var j=h.length-1;return D==j?h.pop():Wf.call(h,D,1),--this.size,!0}function Qf(d){var h=this.__data__,D=wa(h,d);return D<0?n:h[D][1]}function Sy(d){return wa(this.__data__,d)>-1}function Dy(d,h){var D=this.__data__,j=wa(D,d);return j<0?(++this.size,D.push([d,h])):D[j][1]=h,this}_a.prototype.clear=wc,_a.prototype.delete=to,_a.prototype.get=Qf,_a.prototype.has=Sy,_a.prototype.set=Dy;function Ho(d){var h=-1,D=d==null?0:d.length;for(this.clear();++h<D;){var j=d[h];this.set(j[0],j[1])}}function Ty(){this.size=0,this.__data__={hash:new Xa,map:new(mu||_a),string:new Xa}}function Ds(d){var h=Eh(this,d).delete(d);return this.size-=h?1:0,h}function Xf(d){return Eh(this,d).get(d)}function gm(d){return Eh(this,d).has(d)}function Iy(d,h){var D=Eh(this,d),j=D.size;return D.set(d,h),this.size+=D.size==j?0:1,this}Ho.prototype.clear=Ty,Ho.prototype.delete=Ds,Ho.prototype.get=Xf,Ho.prototype.has=gm,Ho.prototype.set=Iy;function gu(d){var h=-1,D=d==null?0:d.length;for(this.__data__=new Ho;++h<D;)this.add(d[h])}function fl(d){return this.__data__.set(d,c),this}function bc(d){return this.__data__.has(d)}gu.prototype.add=gu.prototype.push=fl,gu.prototype.has=bc;function ya(d){var h=this.__data__=new _a(d);this.size=h.size}function eh(){this.__data__=new _a,this.size=0}function th(d){var h=this.__data__,D=h.delete(d);return this.size=h.size,D}function Yo(d){return this.__data__.get(d)}function Uo(d){return this.__data__.has(d)}function vu(d,h){var D=this.__data__;if(D instanceof _a){var j=D.__data__;if(!mu||j.length<a-1)return j.push([d,h]),this.size=++D.size,this;D=this.__data__=new Ho(j)}return D.set(d,h),this.size=D.size,this}ya.prototype.clear=eh,ya.prototype.delete=th,ya.prototype.get=Yo,ya.prototype.has=Uo,ya.prototype.set=vu;function zi(d,h){var D=an(d),j=!D&&Jd(d),V=!D&&!j&&Rc(d),ee=!D&&!j&&!V&&qh(d),ce=D||j||V||ee,ve=ce?Ee(d.length,P1):[],Te=ve.length;for(var We in d)(h||Tn.call(d,We))&&!(ce&&(We=="length"||V&&(We=="offset"||We=="parent")||ee&&(We=="buffer"||We=="byteLength"||We=="byteOffset")||Vo(We,Te)))&&ve.push(We);return ve}function Vi(d){var h=d.length;return h?d[Od(0,h-1)]:n}function yu(d,h){return To(Ha(d),Ts(h,0,d.length))}function Ey(d){return To(Ha(d))}function xd(d,h,D){(D!==n&&!Ns(d[h],D)||D===n&&!(h in d))&&Wi(d,h,D)}function wu(d,h,D){var j=d[h];(!(Tn.call(d,h)&&Ns(j,D))||D===n&&!(h in d))&&Wi(d,h,D)}function wa(d,h){for(var D=d.length;D--;)if(Ns(d[D][0],h))return D;return-1}function bo(d,h,D,j){return Zi(d,function(V,ee,ce){h(j,V,D(V),ce)}),j}function Xn(d,h){return d&&wi(h,xa(h),d)}function pi(d,h){return d&&wi(h,qo(h),d)}function Wi(d,h,D){h=="__proto__"&&Sd?Sd(d,h,{configurable:!0,enumerable:!0,value:D,writable:!0}):d[h]=D}function nh(d,h){for(var D=-1,j=h.length,V=Oe(j),ee=d==null;++D<j;)V[D]=ee?n:aS(d,h[D]);return V}function Ts(d,h,D){return d===d&&(D!==n&&(d=d<=D?d:D),h!==n&&(d=d>=h?d:h)),d}function no(d,h,D,j,V,ee){var ce,ve=h&g,Te=h&y,We=h&w;if(D&&(ce=V?D(d,j,V,ee):D(d)),ce!==n)return ce;if(!Sr(d))return d;var $e=an(d);if($e){if(ce=Wy(d),!ve)return Ha(d,ce)}else{var Je=Ta(d),mt=Je==_e||Je==Xe;if(Rc(d))return km(d,ve);if(Je==Tt||Je==Fe||mt&&!V){if(ce=Te||mt?{}:Ac(d),!ve)return Te?R1(d,pi(ce,d)):jy(d,Xn(ce,d))}else{if(!hn[Je])return V?d:{};ce=Ia(d,Je,ve)}}ee||(ee=new ya);var Nt=ee.get(d);if(Nt)return Nt;ee.set(d,ce),ax(d)?d.forEach(function(zt){ce.add(no(zt,h,D,zt,d,ee))}):nx(d)&&d.forEach(function(zt,pn){ce.set(pn,no(zt,h,D,pn,d,ee))});var Ut=We?Te?Hd:Ih:Te?qo:xa,cn=$e?n:Ut(d);return wr(cn||d,function(zt,pn){cn&&(pn=zt,zt=d[pn]),wu(ce,pn,no(zt,h,D,pn,d,ee))}),ce}function xy(d){var h=xa(d);return function(D){return Cd(D,d,h)}}function Cd(d,h,D){var j=D.length;if(d==null)return!j;for(d=Yn(d);j--;){var V=D[j],ee=h[V],ce=d[V];if(ce===n&&!(V in d)||!ee(ce))return!1}return!0}function vm(d,h,D){if(typeof d!="function")throw new Bo(i);return Oc(function(){d.apply(n,D)},h)}function $i(d,h,D,j){var V=-1,ee=al,ce=!0,ve=d.length,Te=[],We=h.length;if(!ve)return Te;D&&(h=jn(h,It(D))),j?(ee=aa,ce=!1):h.length>=a&&(ee=Rt,ce=!1,h=new gu(h));e:for(;++V<ve;){var $e=d[V],Je=D==null?$e:D($e);if($e=j||$e!==0?$e:0,ce&&Je===Je){for(var mt=We;mt--;)if(h[mt]===Je)continue e;Te.push($e)}else ee(h,Je,j)||Te.push($e)}return Te}var Zi=Ly(zo),Cy=Ly(hl,!0);function mi(d,h){var D=!0;return Zi(d,function(j,V,ee){return D=!!h(j,V,ee),D}),D}function bu(d,h,D){for(var j=-1,V=d.length;++j<V;){var ee=d[j],ce=h(ee);if(ce!=null&&(ve===n?ce===ce&&!Di(ce):D(ce,ve)))var ve=ce,Te=ee}return Te}function rh(d,h,D,j){var V=d.length;for(D=un(D),D<0&&(D=-D>V?0:V+D),j=j===n||j>V?V:un(j),j<0&&(j+=V),j=D>j?0:ix(j);D<j;)d[D++]=h;return d}function Su(d,h){var D=[];return Zi(d,function(j,V,ee){h(j,V,ee)&&D.push(j)}),D}function _r(d,h,D,j,V){var ee=-1,ce=d.length;for(D||(D=H1),V||(V=[]);++ee<ce;){var ve=d[ee];h>0&&D(ve)?h>1?_r(ve,h-1,D,j,V):Ro(V,ve):j||(V[V.length]=ve)}return V}var Md=Pm(),ah=Pm(!0);function zo(d,h){return d&&Md(d,h,xa)}function hl(d,h){return d&&ah(d,h,xa)}function Ba(d,h){return fi(h,function(D){return ku(d[D])})}function So(d,h){h=Is(h,d);for(var D=0,j=h.length;d!=null&&D<j;)d=d[bi(h[D++])];return D&&D==j?d:n}function oh(d,h,D){var j=h(d);return an(d)?j:Ro(j,D(d))}function ba(d){return d==null?d===n?Zn:St:hu&&hu in Yn(d)?zy(d):Gy(d)}function gi(d,h){return d>h}function pl(d,h){return d!=null&&Tn.call(d,h)}function ym(d,h){return d!=null&&h in Yn(d)}function My(d,h,D){return d>=ma(h,D)&&d<kr(h,D)}function vi(d,h,D){for(var j=D?aa:al,V=d[0].length,ee=d.length,ce=ee,ve=Oe(ee),Te=1/0,We=[];ce--;){var $e=d[ce];ce&&h&&($e=jn($e,It(h))),Te=ma($e.length,Te),ve[ce]=!D&&(h||V>=120&&$e.length>=120)?new gu(ce&&$e):n}$e=d[0];var Je=-1,mt=ve[0];e:for(;++Je<V&&We.length<Te;){var Nt=$e[Je],Ut=h?h(Nt):Nt;if(Nt=D||Nt!==0?Nt:0,!(mt?Rt(mt,Ut):j(We,Ut,D))){for(ce=ee;--ce;){var cn=ve[ce];if(!(cn?Rt(cn,Ut):j(d[ce],Ut,D)))continue e}mt&&mt.push(Ut),We.push(Nt)}}return We}function ml(d,h,D,j){return zo(d,function(V,ee,ce){h(j,D(V),ee,ce)}),j}function gl(d,h,D){h=Is(h,d),d=Mh(d,h);var j=d==null?d:d[bi(zr(h))];return j==null?n:Cr(j,d,D)}function wm(d){return Ar(d)&&ba(d)==Fe}function ih(d){return Ar(d)&&ba(d)==pt}function ky(d){return Ar(d)&&ba(d)==st}function Sc(d,h,D,j,V){return d===h?!0:d==null||h==null||!Ar(d)&&!Ar(h)?d!==d&&h!==h:bm(d,h,D,j,Sc,V)}function bm(d,h,D,j,V,ee){var ce=an(d),ve=an(h),Te=ce?Be:Ta(d),We=ve?Be:Ta(h);Te=Te==Fe?Tt:Te,We=We==Fe?Tt:We;var $e=Te==Tt,Je=We==Tt,mt=Te==We;if(mt&&Rc(d)){if(!Rc(h))return!1;ce=!0,$e=!1}if(mt&&!$e)return ee||(ee=new ya),ce||qh(d)?Th(d,h,D,j,V,ee):Uy(d,h,Te,D,j,V,ee);if(!(D&T)){var Nt=$e&&Tn.call(d,"__wrapped__"),Ut=Je&&Tn.call(h,"__wrapped__");if(Nt||Ut){var cn=Nt?d.value():d,zt=Ut?h.value():h;return ee||(ee=new ya),V(cn,zt,D,j,ee)}}return mt?(ee||(ee=new ya),Hm(d,h,D,j,V,ee)):!1}function sh(d){return Ar(d)&&Ta(d)==tt}function lh(d,h,D,j){var V=D.length,ee=V,ce=!j;if(d==null)return!ee;for(d=Yn(d);V--;){var ve=D[V];if(ce&&ve[2]?ve[1]!==d[ve[0]]:!(ve[0]in d))return!1}for(;++V<ee;){ve=D[V];var Te=ve[0],We=d[Te],$e=ve[1];if(ce&&ve[2]){if(We===n&&!(Te in d))return!1}else{var Je=new ya;if(j)var mt=j(We,$e,Te,d,h,Je);if(!(mt===n?Sc($e,We,T|S,j,Je):mt))return!1}}return!0}function Sm(d){if(!Sr(d)||Vm(d))return!1;var h=ku(d)?gy:us;return h.test(Dl(d))}function Ny(d){return Ar(d)&&ba(d)==Vt}function Dm(d){return Ar(d)&&Ta(d)==Xt}function kd(d){return Ar(d)&&d0(d.length)&&!!fn[ba(d)]}function Nd(d){return typeof d=="function"?d:d==null?Go:typeof d=="object"?an(d)?yi(d[0],d[1]):Dc(d):vx(d)}function uh(d){if(!zd(d))return hc(d);var h=[];for(var D in Yn(d))Tn.call(d,D)&&D!="constructor"&&h.push(D);return h}function Ay(d){if(!Sr(d))return qy(d);var h=zd(d),D=[];for(var j in d)j=="constructor"&&(h||!Tn.call(d,j))||D.push(j);return D}function vl(d,h){return d<h}function Tm(d,h){var D=-1,j=Zo(d)?Oe(d.length):[];return Zi(d,function(V,ee,ce){j[++D]=h(V,ee,ce)}),j}function Dc(d){var h=xh(d);return h.length==1&&h[0][2]?Vd(h[0][0],h[0][1]):function(D){return D===d||lh(D,d,h)}}function yi(d,h){return zm(d)&&Fc(h)?Vd(bi(d),h):function(D){var j=aS(D,d);return j===n&&j===h?oS(D,d):Sc(h,j,T|S)}}function yl(d,h,D,j,V){d!==h&&Md(h,function(ee,ce){if(V||(V=new ya),Sr(ee))Ad(d,h,ce,D,yl,j,V);else{var ve=j?j(Do(d,ce),ee,ce+"",d,h,V):n;ve===n&&(ve=ee),xd(d,ce,ve)}},qo)}function Ad(d,h,D,j,V,ee,ce){var ve=Do(d,D),Te=Do(h,D),We=ce.get(Te);if(We){xd(d,D,We);return}var $e=ee?ee(ve,Te,D+"",d,h,ce):n,Je=$e===n;if(Je){var mt=an(Te),Nt=!mt&&Rc(Te),Ut=!mt&&!Nt&&qh(Te);$e=Te,mt||Nt||Ut?an(ve)?$e=ve:Vr(ve)?$e=Ha(ve):Nt?(Je=!1,$e=km(Te,!0)):Ut?(Je=!1,$e=Am(Te,!0)):$e=[]:dg(Te)||Jd(Te)?($e=ve,Jd(ve)?$e=sx(ve):(!Sr(ve)||ku(ve))&&($e=Ac(Te))):Je=!1}Je&&(ce.set(Te,$e),V($e,Te,j,ee,ce),ce.delete(Te)),xd(d,D,$e)}function wl(d,h){var D=d.length;if(D)return h+=h<0?D:0,Vo(h,D)?d[h]:n}function ch(d,h,D){h.length?h=jn(h,function(ee){return an(ee)?function(ce){return So(ce,ee.length===1?ee[0]:ee)}:ee}):h=[Go];var j=-1;h=jn(h,It(Ot()));var V=Tm(d,function(ee,ce,ve){var Te=jn(h,function(We){return We(ee)});return{criteria:Te,index:++j,value:ee}});return re(V,function(ee,ce){return Py(ee,ce,D)})}function Tc(d,h){return Im(d,h,function(D,j){return oS(d,j)})}function Im(d,h,D){for(var j=-1,V=h.length,ee={};++j<V;){var ce=h[j],ve=So(d,ce);D(ve,ce)&&ir(ee,Is(ce,d),ve)}return ee}function Em(d){return function(h){return So(h,d)}}function er(d,h,D,j){var V=j?ic:ys,ee=-1,ce=h.length,ve=d;for(d===h&&(h=Ha(h)),D&&(ve=jn(d,It(D)));++ee<ce;)for(var Te=0,We=h[ee],$e=D?D(We):We;(Te=V(ve,$e,Te,j))>-1;)ve!==d&&Wf.call(ve,Te,1),Wf.call(d,Te,1);return d}function Fd(d,h){for(var D=d?h.length:0,j=D-1;D--;){var V=h[D];if(D==j||V!==ee){var ee=V;Vo(V)?Wf.call(d,V,1):Tu(d,V)}}return d}function Od(d,h){return d+sl(Dd()*(h-d+1))}function xm(d,h,D,j){for(var V=-1,ee=kr(pu((h-d)/(D||1)),0),ce=Oe(ee);ee--;)ce[j?ee:++V]=d,d+=D;return ce}function Ic(d,h){var D="";if(!d||h<1||h>ie)return D;do h%2&&(D+=d),h=sl(h/2),h&&(d+=d);while(h);return D}function rn(d,h){return kh(Ch(d,h,Go),d+"")}function Du(d){return Vi(Gh(d))}function or(d,h){var D=Gh(d);return To(D,Ts(h,0,D.length))}function ir(d,h,D,j){if(!Sr(d))return d;h=Is(h,d);for(var V=-1,ee=h.length,ce=ee-1,ve=d;ve!=null&&++V<ee;){var Te=bi(h[V]),We=D;if(Te==="__proto__"||Te==="constructor"||Te==="prototype")return d;if(V!=ce){var $e=ve[Te];We=j?j($e,Te,ve):n,We===n&&(We=Sr($e)?$e:Vo(h[V+1])?[]:{})}wu(ve,Te,We),ve=ve[Te]}return d}var Br=Gf?function(d,h){return Gf.set(d,h),d}:Go,dh=Sd?function(d,h){return Sd(d,"toString",{configurable:!0,enumerable:!1,value:sS(h),writable:!0})}:Go;function Pd(d){return To(Gh(d))}function Sa(d,h,D){var j=-1,V=d.length;h<0&&(h=-h>V?0:V+h),D=D>V?V:D,D<0&&(D+=V),V=h>D?0:D-h>>>0,h>>>=0;for(var ee=Oe(V);++j<V;)ee[j]=d[j+h];return ee}function L1(d,h){var D;return Zi(d,function(j,V,ee){return D=h(j,V,ee),!D}),!!D}function Hr(d,h,D){var j=0,V=d==null?j:d.length;if(typeof h=="number"&&h===h&&V<=je){for(;j<V;){var ee=j+V>>>1,ce=d[ee];ce!==null&&!Di(ce)&&(D?ce<=h:ce<h)?j=ee+1:V=ee}return V}return jd(d,h,Go,D)}function jd(d,h,D,j){var V=0,ee=d==null?0:d.length;if(ee===0)return 0;h=D(h);for(var ce=h!==h,ve=h===null,Te=Di(h),We=h===n;V<ee;){var $e=sl((V+ee)/2),Je=D(d[$e]),mt=Je!==n,Nt=Je===null,Ut=Je===Je,cn=Di(Je);if(ce)var zt=j||Ut;else We?zt=Ut&&(j||mt):ve?zt=Ut&&mt&&(j||!Nt):Te?zt=Ut&&mt&&!Nt&&(j||!cn):Nt||cn?zt=!1:zt=j?Je<=h:Je<h;zt?V=$e+1:ee=$e}return ma(ee,Se)}function fh(d,h){for(var D=-1,j=d.length,V=0,ee=[];++D<j;){var ce=d[D],ve=h?h(ce):ce;if(!D||!Ns(ve,Te)){var Te=ve;ee[V++]=ce===0?0:ce}}return ee}function hh(d){return typeof d=="number"?d:Di(d)?K:+d}function hr(d){if(typeof d=="string")return d;if(an(d))return jn(d,hr)+"";if(Di(d))return Jf?Jf.call(d):"";var h=d+"";return h=="0"&&1/d==-pe?"-0":h}function Yr(d,h,D){var j=-1,V=al,ee=d.length,ce=!0,ve=[],Te=ve;if(D)ce=!1,V=aa;else if(ee>=a){var We=h?null:Ya(d);if(We)return il(We);ce=!1,V=Rt,Te=new gu}else Te=h?[]:ve;e:for(;++j<ee;){var $e=d[j],Je=h?h($e):$e;if($e=D||$e!==0?$e:0,ce&&Je===Je){for(var mt=Te.length;mt--;)if(Te[mt]===Je)continue e;h&&Te.push(Je),ve.push($e)}else V(Te,Je,D)||(Te!==ve&&Te.push(Je),ve.push($e))}return ve}function Tu(d,h){return h=Is(h,d),d=Mh(d,h),d==null||delete d[bi(zr(h))]}function ph(d,h,D,j){return ir(d,h,D(So(d,h)),j)}function Ec(d,h,D,j){for(var V=d.length,ee=j?V:-1;(j?ee--:++ee<V)&&h(d[ee],ee,d););return D?Sa(d,j?0:ee,j?ee+1:V):Sa(d,j?ee+1:0,j?V:ee)}function Cm(d,h){var D=d;return D instanceof nn&&(D=D.value()),fd(h,function(j,V){return V.func.apply(V.thisArg,Ro([j],V.args))},D)}function mh(d,h,D){var j=d.length;if(j<2)return j?Yr(d[0]):[];for(var V=-1,ee=Oe(j);++V<j;)for(var ce=d[V],ve=-1;++ve<j;)ve!=V&&(ee[V]=$i(ee[V]||ce,d[ve],h,D));return Yr(_r(ee,1),h,D)}function Mm(d,h,D){for(var j=-1,V=d.length,ee=h.length,ce={};++j<V;){var ve=j<ee?h[j]:n;D(ce,d[j],ve)}return ce}function gh(d){return Vr(d)?d:[]}function vh(d){return typeof d=="function"?d:Go}function Is(d,h){return an(d)?d:zm(d,h)?[d]:Jy(Un(d))}var Fy=rn;function Es(d,h,D){var j=d.length;return D=D===n?j:D,!h&&D>=j?d:Sa(d,h,D)}var xc=yy||function(d){return zn.clearTimeout(d)};function km(d,h){if(h)return d.slice();var D=d.length,j=dm?dm(D):new d.constructor(D);return d.copy(j),j}function Cc(d){var h=new d.constructor(d.byteLength);return new bd(h).set(new bd(d)),h}function yh(d,h){var D=h?Cc(d.buffer):d.buffer;return new d.constructor(D,d.byteOffset,d.byteLength)}function Oy(d){var h=new d.constructor(d.source,li.exec(d));return h.lastIndex=d.lastIndex,h}function Nm(d){return wo?Yn(wo.call(d)):{}}function Am(d,h){var D=h?Cc(d.buffer):d.buffer;return new d.constructor(D,d.byteOffset,d.length)}function Fm(d,h){if(d!==h){var D=d!==n,j=d===null,V=d===d,ee=Di(d),ce=h!==n,ve=h===null,Te=h===h,We=Di(h);if(!ve&&!We&&!ee&&d>h||ee&&ce&&Te&&!ve&&!We||j&&ce&&Te||!D&&Te||!V)return 1;if(!j&&!ee&&!We&&d<h||We&&D&&V&&!j&&!ee||ve&&D&&V||!ce&&V||!Te)return-1}return 0}function Py(d,h,D){for(var j=-1,V=d.criteria,ee=h.criteria,ce=V.length,ve=D.length;++j<ce;){var Te=Fm(V[j],ee[j]);if(Te){if(j>=ve)return Te;var We=D[j];return Te*(We=="desc"?-1:1)}}return d.index-h.index}function Om(d,h,D,j){for(var V=-1,ee=d.length,ce=D.length,ve=-1,Te=h.length,We=kr(ee-ce,0),$e=Oe(Te+We),Je=!j;++ve<Te;)$e[ve]=h[ve];for(;++V<ce;)(Je||V<ee)&&($e[D[V]]=d[V]);for(;We--;)$e[ve++]=d[V++];return $e}function wh(d,h,D,j){for(var V=-1,ee=d.length,ce=-1,ve=D.length,Te=-1,We=h.length,$e=kr(ee-ve,0),Je=Oe($e+We),mt=!j;++V<$e;)Je[V]=d[V];for(var Nt=V;++Te<We;)Je[Nt+Te]=h[Te];for(;++ce<ve;)(mt||V<ee)&&(Je[Nt+D[ce]]=d[V++]);return Je}function Ha(d,h){var D=-1,j=d.length;for(h||(h=Oe(j));++D<j;)h[D]=d[D];return h}function wi(d,h,D,j){var V=!D;D||(D={});for(var ee=-1,ce=h.length;++ee<ce;){var ve=h[ee],Te=j?j(D[ve],d[ve],ve,D,d):n;Te===n&&(Te=d[ve]),V?Wi(D,ve,Te):wu(D,ve,Te)}return D}function jy(d,h){return wi(d,Nc(d),h)}function R1(d,h){return wi(d,Ji(d),h)}function Ld(d,h){return function(D,j){var V=an(D)?vs:bo,ee=h?h():{};return V(D,d,Ot(j,2),ee)}}function Mc(d){return rn(function(h,D){var j=-1,V=D.length,ee=V>1?D[V-1]:n,ce=V>2?D[2]:n;for(ee=d.length>3&&typeof ee=="function"?(V--,ee):n,ce&&Fn(D[0],D[1],ce)&&(ee=V<3?n:ee,V=1),h=Yn(h);++j<V;){var ve=D[j];ve&&d(h,ve,j,ee)}return h})}function Ly(d,h){return function(D,j){if(D==null)return D;if(!Zo(D))return d(D,j);for(var V=D.length,ee=h?V:-1,ce=Yn(D);(h?ee--:++ee<V)&&j(ce[ee],ee,ce)!==!1;);return D}}function Pm(d){return function(h,D,j){for(var V=-1,ee=Yn(h),ce=j(h),ve=ce.length;ve--;){var Te=ce[d?ve:++V];if(D(ee[Te],Te,ee)===!1)break}return h}}function Ry(d,h,D){var j=h&I,V=Rd(d);function ee(){var ce=this&&this!==zn&&this instanceof ee?V:d;return ce.apply(j?D:this,arguments)}return ee}function jm(d){return function(h){h=Un(h);var D=lc(h)?yo(h):n,j=D?D[0]:h.charAt(0),V=D?Es(D,1).join(""):h.slice(1);return j[d]()+V}}function xs(d){return function(h){return fd(mx(px(h).replace(sm,"")),d,"")}}function Rd(d){return function(){var h=arguments;switch(h.length){case 0:return new d;case 1:return new d(h[0]);case 2:return new d(h[0],h[1]);case 3:return new d(h[0],h[1],h[2]);case 4:return new d(h[0],h[1],h[2],h[3]);case 5:return new d(h[0],h[1],h[2],h[3],h[4]);case 6:return new d(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new d(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var D=vc(d.prototype),j=d.apply(D,h);return Sr(j)?j:D}}function _1(d,h,D){var j=Rd(d);function V(){for(var ee=arguments.length,ce=Oe(ee),ve=ee,Te=bl(V);ve--;)ce[ve]=arguments[ve];var We=ee<3&&ce[0]!==Te&&ce[ee-1]!==Te?[]:_o(ce,Te);if(ee-=We.length,ee<D)return Hy(d,h,kc,V.placeholder,n,ce,We,n,n,D-ee);var $e=this&&this!==zn&&this instanceof V?j:d;return Cr($e,this,ce)}return V}function _y(d){return function(h,D,j){var V=Yn(h);if(!Zo(h)){var ee=Ot(D,3);h=xa(h),D=function(ve){return ee(V[ve],ve,V)}}var ce=d(h,D,j);return ce>-1?V[ee?h[ce]:ce]:n}}function Iu(d){return Gi(function(h){var D=h.length,j=D,V=ga.prototype.thru;for(d&&h.reverse();j--;){var ee=h[j];if(typeof ee!="function")throw new Bo(i);if(V&&!ce&&Ud(ee)=="wrapper")var ce=new ga([],!0)}for(j=ce?j:D;++j<D;){ee=h[j];var ve=Ud(ee),Te=ve=="wrapper"?Yd(ee):n;Te&&Sl(Te[0])&&Te[1]==(H|_|R|U)&&!Te[4].length&&Te[9]==1?ce=ce[Ud(Te[0])].apply(ce,Te[3]):ce=ee.length==1&&Sl(ee)?ce[ve]():ce.thru(ee)}return function(){var We=arguments,$e=We[0];if(ce&&We.length==1&&an($e))return ce.plant($e).value();for(var Je=0,mt=D?h[Je].apply(this,We):$e;++Je<D;)mt=h[Je].call(this,mt);return mt}})}function kc(d,h,D,j,V,ee,ce,ve,Te,We){var $e=h&H,Je=h&I,mt=h&M,Nt=h&(_|k),Ut=h&z,cn=mt?n:Rd(d);function zt(){for(var pn=arguments.length,bn=Oe(pn),Ti=pn;Ti--;)bn[Ti]=arguments[Ti];if(Nt)var xo=bl(zt),Ii=Ka(bn,xo);if(j&&(bn=Om(bn,j,V,Nt)),ee&&(bn=wh(bn,ee,ce,Nt)),pn-=Ii,Nt&&pn<We){var Wr=_o(bn,xo);return Hy(d,h,kc,zt.placeholder,D,bn,Wr,ve,Te,We-pn)}var As=Je?D:this,Au=mt?As[d]:d;return pn=bn.length,ve?bn=ia(bn,ve):Ut&&pn>1&&bn.reverse(),$e&&Te<pn&&(bn.length=Te),this&&this!==zn&&this instanceof zt&&(Au=cn||Rd(Au)),Au.apply(As,bn)}return zt}function bh(d,h){return function(D,j){return ml(D,d,h(j),{})}}function Sh(d,h){return function(D,j){var V;if(D===n&&j===n)return h;if(D!==n&&(V=D),j!==n){if(V===n)return j;typeof D=="string"||typeof j=="string"?(D=hr(D),j=hr(j)):(D=hh(D),j=hh(j)),V=d(D,j)}return V}}function Dh(d){return Gi(function(h){return h=jn(h,It(Ot())),rn(function(D){var j=this;return d(h,function(V){return Cr(V,j,D)})})})}function _d(d,h){h=h===n?" ":hr(h);var D=h.length;if(D<2)return D?Ic(h,d):h;var j=Ic(h,pu(d/fu(h)));return lc(h)?Es(yo(j),0,d).join(""):j.slice(0,d)}function By(d,h,D,j){var V=h&I,ee=Rd(d);function ce(){for(var ve=-1,Te=arguments.length,We=-1,$e=j.length,Je=Oe($e+Te),mt=this&&this!==zn&&this instanceof ce?ee:d;++We<$e;)Je[We]=j[We];for(;Te--;)Je[We++]=arguments[++ve];return Cr(mt,V?D:this,Je)}return ce}function Lm(d){return function(h,D,j){return j&&typeof j!="number"&&Fn(h,D,j)&&(D=j=n),h=Nu(h),D===n?(D=h,h=0):D=Nu(D),j=j===n?h<D?1:-1:Nu(j),xm(h,D,j,d)}}function Bd(d){return function(h,D){return typeof h=="string"&&typeof D=="string"||(h=Ki(h),D=Ki(D)),d(h,D)}}function Hy(d,h,D,j,V,ee,ce,ve,Te,We){var $e=h&_,Je=$e?ce:n,mt=$e?n:ce,Nt=$e?ee:n,Ut=$e?n:ee;h|=$e?R:L,h&=~($e?L:R),h&N||(h&=~(I|M));var cn=[d,h,V,Nt,Je,Ut,mt,ve,Te,We],zt=D.apply(n,cn);return Sl(d)&&Ms(zt,cn),zt.placeholder=j,Wo(zt,d,h)}function Da(d){var h=Mr[d];return function(D,j){if(D=Ki(D),j=j==null?0:ma(un(j),292),j&&fc(D)){var V=(Un(D)+"e").split("e"),ee=h(V[0]+"e"+(+V[1]+j));return V=(Un(ee)+"e").split("e"),+(V[0]+"e"+(+V[1]-j))}return h(D)}}var Ya=ll&&1/il(new ll([,-0]))[1]==pe?function(d){return new ll(d)}:cS;function Rm(d){return function(h){var D=Ta(h);return D==tt?_f(h):D==Xt?N1(h):Ve(h,d(h))}}function qi(d,h,D,j,V,ee,ce,ve){var Te=h&M;if(!Te&&typeof d!="function")throw new Bo(i);var We=j?j.length:0;if(We||(h&=~(R|L),j=V=n),ce=ce===n?ce:kr(un(ce),0),ve=ve===n?ve:un(ve),We-=V?V.length:0,h&L){var $e=j,Je=V;j=V=n}var mt=Te?n:Yd(d),Nt=[d,h,D,j,V,$e,Je,ee,ce,ve];if(mt&&Zy(Nt,mt),d=Nt[0],h=Nt[1],D=Nt[2],j=Nt[3],V=Nt[4],ve=Nt[9]=Nt[9]===n?Te?0:d.length:kr(Nt[9]-We,0),!ve&&h&(_|k)&&(h&=~(_|k)),!h||h==I)var Ut=Ry(d,h,D);else h==_||h==k?Ut=_1(d,h,ve):(h==R||h==(I|R))&&!V.length?Ut=By(d,h,D,j):Ut=kc.apply(n,Nt);var cn=mt?Br:Ms;return Wo(cn(Ut,Nt),d,h)}function _m(d,h,D,j){return d===n||Ns(d,Hi[D])&&!Tn.call(j,D)?h:d}function Bm(d,h,D,j,V,ee){return Sr(d)&&Sr(h)&&(ee.set(h,d),yl(d,h,n,Bm,ee),ee.delete(h)),d}function Yy(d){return dg(d)?n:d}function Th(d,h,D,j,V,ee){var ce=D&T,ve=d.length,Te=h.length;if(ve!=Te&&!(ce&&Te>ve))return!1;var We=ee.get(d),$e=ee.get(h);if(We&&$e)return We==h&&$e==d;var Je=-1,mt=!0,Nt=D&S?new gu:n;for(ee.set(d,h),ee.set(h,d);++Je<ve;){var Ut=d[Je],cn=h[Je];if(j)var zt=ce?j(cn,Ut,Je,h,d,ee):j(Ut,cn,Je,d,h,ee);if(zt!==n){if(zt)continue;mt=!1;break}if(Nt){if(!ol(h,function(pn,bn){if(!Rt(Nt,bn)&&(Ut===pn||V(Ut,pn,D,j,ee)))return Nt.push(bn)})){mt=!1;break}}else if(!(Ut===cn||V(Ut,cn,D,j,ee))){mt=!1;break}}return ee.delete(d),ee.delete(h),mt}function Uy(d,h,D,j,V,ee,ce){switch(D){case Mt:if(d.byteLength!=h.byteLength||d.byteOffset!=h.byteOffset)return!1;d=d.buffer,h=h.buffer;case pt:return!(d.byteLength!=h.byteLength||!ee(new bd(d),new bd(h)));case Ze:case st:case ht:return Ns(+d,+h);case tn:return d.name==h.name&&d.message==h.message;case Vt:case dn:return d==h+"";case tt:var ve=_f;case Xt:var Te=j&T;if(ve||(ve=il),d.size!=h.size&&!Te)return!1;var We=ce.get(d);if(We)return We==h;j|=S,ce.set(d,h);var $e=Th(ve(d),ve(h),j,V,ee,ce);return ce.delete(d),$e;case en:if(wo)return wo.call(d)==wo.call(h)}return!1}function Hm(d,h,D,j,V,ee){var ce=D&T,ve=Ih(d),Te=ve.length,We=Ih(h),$e=We.length;if(Te!=$e&&!ce)return!1;for(var Je=Te;Je--;){var mt=ve[Je];if(!(ce?mt in h:Tn.call(h,mt)))return!1}var Nt=ee.get(d),Ut=ee.get(h);if(Nt&&Ut)return Nt==h&&Ut==d;var cn=!0;ee.set(d,h),ee.set(h,d);for(var zt=ce;++Je<Te;){mt=ve[Je];var pn=d[mt],bn=h[mt];if(j)var Ti=ce?j(bn,pn,mt,h,d,ee):j(pn,bn,mt,d,h,ee);if(!(Ti===n?pn===bn||V(pn,bn,D,j,ee):Ti)){cn=!1;break}zt||(zt=mt=="constructor")}if(cn&&!zt){var xo=d.constructor,Ii=h.constructor;xo!=Ii&&"constructor"in d&&"constructor"in h&&!(typeof xo=="function"&&xo instanceof xo&&typeof Ii=="function"&&Ii instanceof Ii)&&(cn=!1)}return ee.delete(d),ee.delete(h),cn}function Gi(d){return kh(Ch(d,n,Wd),d+"")}function Ih(d){return oh(d,xa,Nc)}function Hd(d){return oh(d,qo,Ji)}var Yd=Gf?function(d){return Gf.get(d)}:cS;function Ud(d){for(var h=d.name+"",D=mc[h],j=Tn.call(mc,h)?D.length:0;j--;){var V=D[j],ee=V.func;if(ee==null||ee==d)return V.name}return h}function bl(d){var h=Tn.call(G,"placeholder")?G:d;return h.placeholder}function Ot(){var d=G.iteratee||lS;return d=d===lS?Nd:d,arguments.length?d(arguments[0],arguments[1]):d}function Eh(d,h){var D=d.__data__;return wt(h)?D[typeof h=="string"?"string":"hash"]:D.map}function xh(d){for(var h=xa(d),D=h.length;D--;){var j=h[D],V=d[j];h[D]=[j,V,Fc(V)]}return h}function Cs(d,h){var D=Bi(d,h);return Sm(D)?D:n}function zy(d){var h=Tn.call(d,hu),D=d[hu];try{d[hu]=n;var j=!0}catch{}var V=yd.call(d);return j&&(h?d[hu]=D:delete d[hu]),V}var Nc=$f?function(d){return d==null?[]:(d=Yn(d),fi($f(d),function(h){return Vf.call(d,h)}))}:dS,Ji=$f?function(d){for(var h=[];d;)Ro(h,Nc(d)),d=hi(d);return h}:dS,Ta=ba;(Td&&Ta(new Td(new ArrayBuffer(1)))!=Mt||mu&&Ta(new mu)!=tt||Id&&Ta(Id.resolve())!=Gt||ll&&Ta(new ll)!=Xt||Ed&&Ta(new Ed)!=kn)&&(Ta=function(d){var h=ba(d),D=h==Tt?d.constructor:n,j=D?Dl(D):"";if(j)switch(j){case pm:return Mt;case ul:return tt;case by:return Gt;case gc:return Xt;case Yi:return kn}return h});function Vy(d,h,D){for(var j=-1,V=D.length;++j<V;){var ee=D[j],ce=ee.size;switch(ee.type){case"drop":d+=ce;break;case"dropRight":h-=ce;break;case"take":h=ma(h,d+ce);break;case"takeRight":d=kr(d,h-ce);break}}return{start:d,end:h}}function Ym(d){var h=d.match(Fa);return h?h[1].split(Zr):[]}function Um(d,h,D){h=Is(h,d);for(var j=-1,V=h.length,ee=!1;++j<V;){var ce=bi(h[j]);if(!(ee=d!=null&&D(d,ce)))break;d=d[ce]}return ee||++j!=V?ee:(V=d==null?0:d.length,!!V&&d0(V)&&Vo(ce,V)&&(an(d)||Jd(d)))}function Wy(d){var h=d.length,D=new d.constructor(h);return h&&typeof d[0]=="string"&&Tn.call(d,"index")&&(D.index=d.index,D.input=d.input),D}function Ac(d){return typeof d.constructor=="function"&&!zd(d)?vc(hi(d)):{}}function Ia(d,h,D){var j=d.constructor;switch(h){case pt:return Cc(d);case Ze:case st:return new j(+d);case Mt:return yh(d,D);case Jt:case on:case ln:case vr:case fr:case ha:case jr:case nr:case Lr:return Am(d,D);case tt:return new j;case ht:case dn:return new j(d);case Vt:return Oy(d);case Xt:return new j;case en:return Nm(d)}}function B1(d,h){var D=h.length;if(!D)return d;var j=D-1;return h[j]=(D>1?"& ":"")+h[j],h=h.join(D>2?", ":" "),d.replace(Aa,`{
/* [wrapped with `+h+`] */
`)}function H1(d){return an(d)||Jd(d)||!!(vy&&d&&d[vy])}function Vo(d,h){var D=typeof d;return h=h??ie,!!h&&(D=="number"||D!="symbol"&&cs.test(d))&&d>-1&&d%1==0&&d<h}function Fn(d,h,D){if(!Sr(D))return!1;var j=typeof h;return(j=="number"?Zo(D)&&Vo(h,D.length):j=="string"&&h in D)?Ns(D[h],d):!1}function zm(d,h){if(an(d))return!1;var D=typeof d;return D=="number"||D=="symbol"||D=="boolean"||d==null||Di(d)?!0:xr.test(d)||!vn.test(d)||h!=null&&d in Yn(h)}function wt(d){var h=typeof d;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?d!=="__proto__":d===null}function Sl(d){var h=Ud(d),D=G[h];if(typeof D!="function"||!(h in nn.prototype))return!1;if(d===D)return!0;var j=Yd(D);return!!j&&d===j[0]}function Vm(d){return!!Yf&&Yf in d}var $y=cc?ku:fS;function zd(d){var h=d&&d.constructor,D=typeof h=="function"&&h.prototype||Hi;return d===D}function Fc(d){return d===d&&!Sr(d)}function Vd(d,h){return function(D){return D==null?!1:D[d]===h&&(h!==n||d in Yn(D))}}function Wm(d){var h=ye(d,function(j){return D.size===f&&D.clear(),j}),D=h.cache;return h}function Zy(d,h){var D=d[1],j=h[1],V=D|j,ee=V<(I|M|H),ce=j==H&&D==_||j==H&&D==U&&d[7].length<=h[8]||j==(H|U)&&h[7].length<=h[8]&&D==_;if(!(ee||ce))return d;j&I&&(d[2]=h[2],V|=D&I?0:N);var ve=h[3];if(ve){var Te=d[3];d[3]=Te?Om(Te,ve,h[4]):ve,d[4]=Te?_o(d[3],p):h[4]}return ve=h[5],ve&&(Te=d[5],d[5]=Te?wh(Te,ve,h[6]):ve,d[6]=Te?_o(d[5],p):h[6]),ve=h[7],ve&&(d[7]=ve),j&H&&(d[8]=d[8]==null?h[8]:ma(d[8],h[8])),d[9]==null&&(d[9]=h[9]),d[0]=h[0],d[1]=V,d}function qy(d){var h=[];if(d!=null)for(var D in Yn(d))h.push(D);return h}function Gy(d){return yd.call(d)}function Ch(d,h,D){return h=kr(h===n?d.length-1:h,0),function(){for(var j=arguments,V=-1,ee=kr(j.length-h,0),ce=Oe(ee);++V<ee;)ce[V]=j[h+V];V=-1;for(var ve=Oe(h+1);++V<h;)ve[V]=j[V];return ve[h]=D(ce),Cr(d,this,ve)}}function Mh(d,h){return h.length<2?d:So(d,Sa(h,0,-1))}function ia(d,h){for(var D=d.length,j=ma(h.length,D),V=Ha(d);j--;){var ee=h[j];d[j]=Vo(ee,D)?V[ee]:n}return d}function Do(d,h){if(!(h==="constructor"&&typeof d[h]=="function")&&h!="__proto__")return d[h]}var Ms=$m(Br),Oc=fm||function(d,h){return zn.setTimeout(d,h)},kh=$m(dh);function Wo(d,h,D){var j=h+"";return kh(d,B1(j,Ky(Ym(j),D)))}function $m(d){var h=0,D=0;return function(){var j=j1(),V=se-(j-D);if(D=j,V>0){if(++h>=Q)return arguments[0]}else h=0;return d.apply(n,arguments)}}function To(d,h){var D=-1,j=d.length,V=j-1;for(h=h===n?j:h;++D<h;){var ee=Od(D,V),ce=d[ee];d[ee]=d[D],d[D]=ce}return d.length=h,d}var Jy=Wm(function(d){var h=[];return d.charCodeAt(0)===46&&h.push(""),d.replace(Jn,function(D,j,V,ee){h.push(V?ee.replace(ru,"$1"):j||D)}),h});function bi(d){if(typeof d=="string"||Di(d))return d;var h=d+"";return h=="0"&&1/d==-pe?"-0":h}function Dl(d){if(d!=null){try{return vd.call(d)}catch{}try{return d+""}catch{}}return""}function Ky(d,h){return wr(Re,function(D){var j="_."+D[0];h&D[1]&&!al(d,j)&&d.push(j)}),d.sort()}function Zm(d){if(d instanceof nn)return d.clone();var h=new ga(d.__wrapped__,d.__chain__);return h.__actions__=Ha(d.__actions__),h.__index__=d.__index__,h.__values__=d.__values__,h}function Y1(d,h,D){(D?Fn(d,h,D):h===n)?h=1:h=kr(un(h),0);var j=d==null?0:d.length;if(!j||h<1)return[];for(var V=0,ee=0,ce=Oe(pu(j/h));V<j;)ce[ee++]=Sa(d,V,V+=h);return ce}function Nh(d){for(var h=-1,D=d==null?0:d.length,j=0,V=[];++h<D;){var ee=d[h];ee&&(V[j++]=ee)}return V}function qm(){var d=arguments.length;if(!d)return[];for(var h=Oe(d-1),D=arguments[0],j=d;j--;)h[j-1]=arguments[j];return Ro(an(D)?Ha(D):[D],_r(h,1))}var $o=rn(function(d,h){return Vr(d)?$i(d,_r(h,1,Vr,!0)):[]}),wn=rn(function(d,h){var D=zr(h);return Vr(D)&&(D=n),Vr(d)?$i(d,_r(h,1,Vr,!0),Ot(D,2)):[]}),Jr=rn(function(d,h){var D=zr(h);return Vr(D)&&(D=n),Vr(d)?$i(d,_r(h,1,Vr,!0),n,D):[]});function Nr(d,h,D){var j=d==null?0:d.length;return j?(h=D||h===n?1:un(h),Sa(d,h<0?0:h,j)):[]}function sa(d,h,D){var j=d==null?0:d.length;return j?(h=D||h===n?1:un(h),h=j-h,Sa(d,0,h<0?0:h)):[]}function Io(d,h){return d&&d.length?Ec(d,Ot(h,3),!0,!0):[]}function Pc(d,h){return d&&d.length?Ec(d,Ot(h,3),!0):[]}function Ur(d,h,D,j){var V=d==null?0:d.length;return V?(D&&typeof D!="number"&&Fn(d,h,D)&&(D=0,j=V),rh(d,h,D,j)):[]}function jc(d,h,D){var j=d==null?0:d.length;if(!j)return-1;var V=D==null?0:un(D);return V<0&&(V=kr(j+V,0)),cu(d,Ot(h,3),V)}function Tl(d,h,D){var j=d==null?0:d.length;if(!j)return-1;var V=j-1;return D!==n&&(V=un(D),V=D<0?kr(j+V,0):ma(V,j-1)),cu(d,Ot(h,3),V,!0)}function Wd(d){var h=d==null?0:d.length;return h?_r(d,1):[]}function Gm(d){var h=d==null?0:d.length;return h?_r(d,pe):[]}function $d(d,h){var D=d==null?0:d.length;return D?(h=h===n?1:un(h),_r(d,h)):[]}function ro(d){for(var h=-1,D=d==null?0:d.length,j={};++h<D;){var V=d[h];j[V[0]]=V[1]}return j}function Ah(d){return d&&d.length?d[0]:n}function Lc(d,h,D){var j=d==null?0:d.length;if(!j)return-1;var V=D==null?0:un(D);return V<0&&(V=kr(j+V,0)),ys(d,h,V)}function ks(d){var h=d==null?0:d.length;return h?Sa(d,0,-1):[]}var Fh=rn(function(d){var h=jn(d,gh);return h.length&&h[0]===d[0]?vi(h):[]}),Jm=rn(function(d){var h=zr(d),D=jn(d,gh);return h===zr(D)?h=n:D.pop(),D.length&&D[0]===d[0]?vi(D,Ot(h,2)):[]}),Il=rn(function(d){var h=zr(d),D=jn(d,gh);return h=typeof h=="function"?h:n,h&&D.pop(),D.length&&D[0]===d[0]?vi(D,n,h):[]});function Oh(d,h){return d==null?"":Zf.call(d,h)}function zr(d){var h=d==null?0:d.length;return h?d[h-1]:n}function Ph(d,h,D){var j=d==null?0:d.length;if(!j)return-1;var V=j;return D!==n&&(V=un(D),V=V<0?kr(j+V,0):ma(V,j-1)),h===h?A1(d,h,V):cu(d,sc,V,!0)}function Zd(d,h){return d&&d.length?wl(d,un(h)):n}var Km=rn(qd);function qd(d,h){return d&&d.length&&h&&h.length?er(d,h):d}function jh(d,h,D){return d&&d.length&&h&&h.length?er(d,h,Ot(D,2)):d}function Ua(d,h,D){return d&&d.length&&h&&h.length?er(d,h,n,D):d}var El=Gi(function(d,h){var D=d==null?0:d.length,j=nh(d,h);return Fd(d,jn(h,function(V){return Vo(V,D)?+V:V}).sort(Fm)),j});function Si(d,h){var D=[];if(!(d&&d.length))return D;var j=-1,V=[],ee=d.length;for(h=Ot(h,3);++j<ee;){var ce=d[j];h(ce,j,d)&&(D.push(ce),V.push(j))}return Fd(d,V),D}function Ea(d){return d==null?d:qf.call(d)}function Qy(d,h,D){var j=d==null?0:d.length;return j?(D&&typeof D!="number"&&Fn(d,h,D)?(h=0,D=j):(h=h==null?0:un(h),D=D===n?j:un(D)),Sa(d,h,D)):[]}function Qm(d,h){return Hr(d,h)}function Xm(d,h,D){return jd(d,h,Ot(D,2))}function U1(d,h){var D=d==null?0:d.length;if(D){var j=Hr(d,h);if(j<D&&Ns(d[j],h))return j}return-1}function xl(d,h){return Hr(d,h,!0)}function Xy(d,h,D){return jd(d,h,Ot(D,2),!0)}function eg(d,h){var D=d==null?0:d.length;if(D){var j=Hr(d,h,!0)-1;if(Ns(d[j],h))return j}return-1}function Eu(d){return d&&d.length?fh(d):[]}function tg(d,h){return d&&d.length?fh(d,Ot(h,2)):[]}function xu(d){var h=d==null?0:d.length;return h?Sa(d,1,h):[]}function e0(d,h,D){return d&&d.length?(h=D||h===n?1:un(h),Sa(d,0,h<0?0:h)):[]}function t0(d,h,D){var j=d==null?0:d.length;return j?(h=D||h===n?1:un(h),h=j-h,Sa(d,h<0?0:h,j)):[]}function ng(d,h){return d&&d.length?Ec(d,Ot(h,3),!1,!0):[]}function Lh(d,h){return d&&d.length?Ec(d,Ot(h,3)):[]}var z1=rn(function(d){return Yr(_r(d,1,Vr,!0))}),V1=rn(function(d){var h=zr(d);return Vr(h)&&(h=n),Yr(_r(d,1,Vr,!0),Ot(h,2))}),n0=rn(function(d){var h=zr(d);return h=typeof h=="function"?h:n,Yr(_r(d,1,Vr,!0),n,h)});function r0(d){return d&&d.length?Yr(d):[]}function Cu(d,h){return d&&d.length?Yr(d,Ot(h,2)):[]}function W1(d,h){return h=typeof h=="function"?h:n,d&&d.length?Yr(d,n,h):[]}function Cl(d){if(!(d&&d.length))return[];var h=0;return d=fi(d,function(D){if(Vr(D))return h=kr(D.length,h),!0}),Ee(h,function(D){return jn(d,F(D))})}function rg(d,h){if(!(d&&d.length))return[];var D=Cl(d);return h==null?D:jn(D,function(j){return Cr(h,n,j)})}var pr=rn(function(d,h){return Vr(d)?$i(d,h):[]}),$1=rn(function(d){return mh(fi(d,Vr))}),a0=rn(function(d){var h=zr(d);return Vr(h)&&(h=n),mh(fi(d,Vr),Ot(h,2))}),Z1=rn(function(d){var h=zr(d);return h=typeof h=="function"?h:n,mh(fi(d,Vr),n,h)}),q1=rn(Cl);function o0(d,h){return Mm(d||[],h||[],wu)}function i0(d,h){return Mm(d||[],h||[],ir)}var G1=rn(function(d){var h=d.length,D=h>1?d[h-1]:n;return D=typeof D=="function"?(d.pop(),D):n,rg(d,D)});function Eo(d){var h=G(d);return h.__chain__=!0,h}function ag(d,h){return h(d),d}function Rh(d,h){return h(d)}var Ml=Gi(function(d){var h=d.length,D=h?d[0]:0,j=this.__wrapped__,V=function(ee){return nh(ee,d)};return h>1||this.__actions__.length||!(j instanceof nn)||!Vo(D)?this.thru(V):(j=j.slice(D,+D+(h?1:0)),j.__actions__.push({func:Rh,args:[V],thisArg:n}),new ga(j,this.__chain__).thru(function(ee){return h&&!ee.length&&ee.push(n),ee}))});function _h(){return Eo(this)}function Mu(){return new ga(this.value(),this.__chain__)}function Bh(){this.__values__===n&&(this.__values__=ox(this.value()));var d=this.__index__>=this.__values__.length,h=d?n:this.__values__[this.__index__++];return{done:d,value:h}}function og(){return this}function ig(d){for(var h,D=this;D instanceof Ui;){var j=Zm(D);j.__index__=0,j.__values__=n,h?V.__wrapped__=j:h=j;var V=j;D=D.__wrapped__}return V.__wrapped__=d,h}function J1(){var d=this.__wrapped__;if(d instanceof nn){var h=d;return this.__actions__.length&&(h=new nn(this)),h=h.reverse(),h.__actions__.push({func:Rh,args:[Ea],thisArg:n}),new ga(h,this.__chain__)}return this.thru(Ea)}function sg(){return Cm(this.__wrapped__,this.__actions__)}var K1=Ld(function(d,h,D){Tn.call(d,D)?++d[D]:Wi(d,D,1)});function s0(d,h,D){var j=an(d)?ac:mi;return D&&Fn(d,h,D)&&(h=n),j(d,Ot(h,3))}function l0(d,h){var D=an(d)?fi:Su;return D(d,Ot(h,3))}var Hh=_y(jc),Yh=_y(Tl);function u0(d,h){return _r(Wh(d,h),1)}function lg(d,h){return _r(Wh(d,h),pe)}function Q1(d,h,D){return D=D===n?1:un(D),_r(Wh(d,h),D)}function ug(d,h){var D=an(d)?wr:Zi;return D(d,Ot(h,3))}function Uh(d,h){var D=an(d)?lu:Cy;return D(d,Ot(h,3))}var zh=Ld(function(d,h,D){Tn.call(d,D)?d[D].push(h):Wi(d,D,[h])});function cg(d,h,D,j){d=Zo(d)?d:Gh(d),D=D&&!j?un(D):0;var V=d.length;return D<0&&(D=kr(V+D,0)),f0(d)?D<=V&&d.indexOf(h,D)>-1:!!V&&ys(d,h,D)>-1}var Vh=rn(function(d,h,D){var j=-1,V=typeof h=="function",ee=Zo(d)?Oe(d.length):[];return Zi(d,function(ce){ee[++j]=V?Cr(h,ce,D):gl(ce,h,D)}),ee}),c0=Ld(function(d,h,D){Wi(d,D,h)});function Wh(d,h){var D=an(d)?jn:Tm;return D(d,Ot(h,3))}function $h(d,h,D,j){return d==null?[]:(an(h)||(h=h==null?[]:[h]),D=j?n:D,an(D)||(D=D==null?[]:[D]),ch(d,h,D))}var X1=Ld(function(d,h,D){d[D?0:1].push(h)},function(){return[[],[]]});function Gd(d,h,D){var j=an(d)?fd:q,V=arguments.length<3;return j(d,Ot(h,4),D,V,Zi)}function eS(d,h,D){var j=an(d)?Lf:q,V=arguments.length<3;return j(d,Ot(h,4),D,V,Cy)}function Zh(d,h){var D=an(d)?fi:Su;return D(d,Me(Ot(h,3)))}function s(d){var h=an(d)?Vi:Du;return h(d)}function u(d,h,D){(D?Fn(d,h,D):h===n)?h=1:h=un(h);var j=an(d)?yu:or;return j(d,h)}function m(d){var h=an(d)?Ey:Pd;return h(d)}function b(d){if(d==null)return 0;if(Zo(d))return f0(d)?fu(d):d.length;var h=Ta(d);return h==tt||h==Xt?d.size:uh(d).length}function x(d,h,D){var j=an(d)?ol:L1;return D&&Fn(d,h,D)&&(h=n),j(d,Ot(h,3))}var O=rn(function(d,h){if(d==null)return[];var D=h.length;return D>1&&Fn(d,h[0],h[1])?h=[]:D>2&&Fn(h[0],h[1],h[2])&&(h=[h[0]]),ch(d,_r(h,1),[])}),W=Kn||function(){return zn.Date.now()};function le(d,h){if(typeof h!="function")throw new Bo(i);return d=un(d),function(){if(--d<1)return h.apply(this,arguments)}}function ge(d,h,D){return h=D?n:h,h=d&&h==null?d.length:h,qi(d,H,n,n,n,n,h)}function Pe(d,h){var D;if(typeof h!="function")throw new Bo(i);return d=un(d),function(){return--d>0&&(D=h.apply(this,arguments)),d<=1&&(h=n),D}}var Ge=rn(function(d,h,D){var j=I;if(D.length){var V=_o(D,bl(Ge));j|=R}return qi(d,j,h,D,V)}),nt=rn(function(d,h,D){var j=I|M;if(D.length){var V=_o(D,bl(nt));j|=R}return qi(h,j,d,D,V)});function qe(d,h,D){h=D?n:h;var j=qi(d,_,n,n,n,n,n,h);return j.placeholder=qe.placeholder,j}function yt(d,h,D){h=D?n:h;var j=qi(d,k,n,n,n,n,n,h);return j.placeholder=yt.placeholder,j}function Dt(d,h,D){var j,V,ee,ce,ve,Te,We=0,$e=!1,Je=!1,mt=!0;if(typeof d!="function")throw new Bo(i);h=Ki(h)||0,Sr(D)&&($e=!!D.leading,Je="maxWait"in D,ee=Je?kr(Ki(D.maxWait)||0,h):ee,mt="trailing"in D?!!D.trailing:mt);function Nt(Wr){var As=j,Au=V;return j=V=n,We=Wr,ce=d.apply(Au,As),ce}function Ut(Wr){return We=Wr,ve=Oc(pn,h),$e?Nt(Wr):ce}function cn(Wr){var As=Wr-Te,Au=Wr-We,yx=h-As;return Je?ma(yx,ee-Au):yx}function zt(Wr){var As=Wr-Te,Au=Wr-We;return Te===n||As>=h||As<0||Je&&Au>=ee}function pn(){var Wr=W();if(zt(Wr))return bn(Wr);ve=Oc(pn,cn(Wr))}function bn(Wr){return ve=n,mt&&j?Nt(Wr):(j=V=n,ce)}function Ti(){ve!==n&&xc(ve),We=0,j=Te=V=ve=n}function xo(){return ve===n?ce:bn(W())}function Ii(){var Wr=W(),As=zt(Wr);if(j=arguments,V=this,Te=Wr,As){if(ve===n)return Ut(Te);if(Je)return xc(ve),ve=Oc(pn,h),Nt(Te)}return ve===n&&(ve=Oc(pn,h)),ce}return Ii.cancel=Ti,Ii.flush=xo,Ii}var Et=rn(function(d,h){return vm(d,1,h)}),br=rn(function(d,h,D){return vm(d,Ki(h)||0,D)});function xe(d){return qi(d,z)}function ye(d,h){if(typeof d!="function"||h!=null&&typeof h!="function")throw new Bo(i);var D=function(){var j=arguments,V=h?h.apply(this,j):j[0],ee=D.cache;if(ee.has(V))return ee.get(V);var ce=d.apply(this,j);return D.cache=ee.set(V,ce)||ee,ce};return D.cache=new(ye.Cache||Ho),D}ye.Cache=Ho;function Me(d){if(typeof d!="function")throw new Bo(i);return function(){var h=arguments;switch(h.length){case 0:return!d.call(this);case 1:return!d.call(this,h[0]);case 2:return!d.call(this,h[0],h[1]);case 3:return!d.call(this,h[0],h[1],h[2])}return!d.apply(this,h)}}function lt(d){return Pe(2,d)}var Ct=Fy(function(d,h){h=h.length==1&&an(h[0])?jn(h[0],It(Ot())):jn(_r(h,1),It(Ot()));var D=h.length;return rn(function(j){for(var V=-1,ee=ma(j.length,D);++V<ee;)j[V]=h[V].call(this,j[V]);return Cr(d,this,j)})}),Pt=rn(function(d,h){var D=_o(h,bl(Pt));return qi(d,R,n,h,D)}),jt=rn(function(d,h){var D=_o(h,bl(jt));return qi(d,L,n,h,D)}),Wt=Gi(function(d,h){return qi(d,U,n,n,n,h)});function Kr(d,h){if(typeof d!="function")throw new Bo(i);return h=h===n?h:un(h),rn(d,h)}function In(d,h){if(typeof d!="function")throw new Bo(i);return h=h==null?0:kr(un(h),0),rn(function(D){var j=D[h],V=Es(D,0,h);return j&&Ro(V,j),Cr(d,this,V)})}function kl(d,h,D){var j=!0,V=!0;if(typeof d!="function")throw new Bo(i);return Sr(D)&&(j="leading"in D?!!D.leading:j,V="trailing"in D?!!D.trailing:V),Dt(d,h,{leading:j,maxWait:h,trailing:V})}function tS(d){return ge(d,1)}function lP(d,h){return Pt(vh(h),d)}function uP(){if(!arguments.length)return[];var d=arguments[0];return an(d)?d:[d]}function cP(d){return no(d,w)}function dP(d,h){return h=typeof h=="function"?h:n,no(d,w,h)}function fP(d){return no(d,g|w)}function hP(d,h){return h=typeof h=="function"?h:n,no(d,g|w,h)}function pP(d,h){return h==null||Cd(d,h,xa(h))}function Ns(d,h){return d===h||d!==d&&h!==h}var mP=Bd(gi),gP=Bd(function(d,h){return d>=h}),Jd=wm(function(){return arguments}())?wm:function(d){return Ar(d)&&Tn.call(d,"callee")&&!Vf.call(d,"callee")},an=Oe.isArray,vP=nl?It(nl):ih;function Zo(d){return d!=null&&d0(d.length)&&!ku(d)}function Vr(d){return Ar(d)&&Zo(d)}function yP(d){return d===!0||d===!1||Ar(d)&&ba(d)==Ze}var Rc=hm||fS,wP=Gr?It(Gr):ky;function bP(d){return Ar(d)&&d.nodeType===1&&!dg(d)}function SP(d){if(d==null)return!0;if(Zo(d)&&(an(d)||typeof d=="string"||typeof d.splice=="function"||Rc(d)||qh(d)||Jd(d)))return!d.length;var h=Ta(d);if(h==tt||h==Xt)return!d.size;if(zd(d))return!uh(d).length;for(var D in d)if(Tn.call(d,D))return!1;return!0}function DP(d,h){return Sc(d,h)}function TP(d,h,D){D=typeof D=="function"?D:n;var j=D?D(d,h):n;return j===n?Sc(d,h,n,D):!!j}function nS(d){if(!Ar(d))return!1;var h=ba(d);return h==tn||h==xt||typeof d.message=="string"&&typeof d.name=="string"&&!dg(d)}function IP(d){return typeof d=="number"&&fc(d)}function ku(d){if(!Sr(d))return!1;var h=ba(d);return h==_e||h==Xe||h==Qe||h==_t}function tx(d){return typeof d=="number"&&d==un(d)}function d0(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=ie}function Sr(d){var h=typeof d;return d!=null&&(h=="object"||h=="function")}function Ar(d){return d!=null&&typeof d=="object"}var nx=gs?It(gs):sh;function EP(d,h){return d===h||lh(d,h,xh(h))}function xP(d,h,D){return D=typeof D=="function"?D:n,lh(d,h,xh(h),D)}function CP(d){return rx(d)&&d!=+d}function MP(d){if($y(d))throw new Qt(o);return Sm(d)}function kP(d){return d===null}function NP(d){return d==null}function rx(d){return typeof d=="number"||Ar(d)&&ba(d)==ht}function dg(d){if(!Ar(d)||ba(d)!=Tt)return!1;var h=hi(d);if(h===null)return!0;var D=Tn.call(h,"constructor")&&h.constructor;return typeof D=="function"&&D instanceof D&&vd.call(D)==Uf}var rS=_i?It(_i):Ny;function AP(d){return tx(d)&&d>=-ie&&d<=ie}var ax=rl?It(rl):Dm;function f0(d){return typeof d=="string"||!an(d)&&Ar(d)&&ba(d)==dn}function Di(d){return typeof d=="symbol"||Ar(d)&&ba(d)==en}var qh=rc?It(rc):kd;function FP(d){return d===n}function OP(d){return Ar(d)&&Ta(d)==kn}function PP(d){return Ar(d)&&ba(d)==Er}var jP=Bd(vl),LP=Bd(function(d,h){return d<=h});function ox(d){if(!d)return[];if(Zo(d))return f0(d)?yo(d):Ha(d);if(Ss&&d[Ss])return k1(d[Ss]());var h=Ta(d),D=h==tt?_f:h==Xt?il:Gh;return D(d)}function Nu(d){if(!d)return d===0?d:0;if(d=Ki(d),d===pe||d===-pe){var h=d<0?-1:1;return h*de}return d===d?d:0}function un(d){var h=Nu(d),D=h%1;return h===h?D?h-D:h:0}function ix(d){return d?Ts(un(d),0,ae):0}function Ki(d){if(typeof d=="number")return d;if(Di(d))return K;if(Sr(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=Sr(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=at(d);var D=au.test(d);return D||ji.test(d)?Xs(d.slice(2),D?2:8):Xu.test(d)?K:+d}function sx(d){return wi(d,qo(d))}function RP(d){return d?Ts(un(d),-ie,ie):d===0?d:0}function Un(d){return d==null?"":hr(d)}var _P=Mc(function(d,h){if(zd(h)||Zo(h)){wi(h,xa(h),d);return}for(var D in h)Tn.call(h,D)&&wu(d,D,h[D])}),lx=Mc(function(d,h){wi(h,qo(h),d)}),h0=Mc(function(d,h,D,j){wi(h,qo(h),d,j)}),BP=Mc(function(d,h,D,j){wi(h,xa(h),d,j)}),HP=Gi(nh);function YP(d,h){var D=vc(d);return h==null?D:Xn(D,h)}var UP=rn(function(d,h){d=Yn(d);var D=-1,j=h.length,V=j>2?h[2]:n;for(V&&Fn(h[0],h[1],V)&&(j=1);++D<j;)for(var ee=h[D],ce=qo(ee),ve=-1,Te=ce.length;++ve<Te;){var We=ce[ve],$e=d[We];($e===n||Ns($e,Hi[We])&&!Tn.call(d,We))&&(d[We]=ee[We])}return d}),zP=rn(function(d){return d.push(n,Bm),Cr(ux,n,d)});function VP(d,h){return uu(d,Ot(h,3),zo)}function WP(d,h){return uu(d,Ot(h,3),hl)}function $P(d,h){return d==null?d:Md(d,Ot(h,3),qo)}function ZP(d,h){return d==null?d:ah(d,Ot(h,3),qo)}function qP(d,h){return d&&zo(d,Ot(h,3))}function GP(d,h){return d&&hl(d,Ot(h,3))}function JP(d){return d==null?[]:Ba(d,xa(d))}function KP(d){return d==null?[]:Ba(d,qo(d))}function aS(d,h,D){var j=d==null?n:So(d,h);return j===n?D:j}function QP(d,h){return d!=null&&Um(d,h,pl)}function oS(d,h){return d!=null&&Um(d,h,ym)}var XP=bh(function(d,h,D){h!=null&&typeof h.toString!="function"&&(h=yd.call(h)),d[h]=D},sS(Go)),ej=bh(function(d,h,D){h!=null&&typeof h.toString!="function"&&(h=yd.call(h)),Tn.call(d,h)?d[h].push(D):d[h]=[D]},Ot),tj=rn(gl);function xa(d){return Zo(d)?zi(d):uh(d)}function qo(d){return Zo(d)?zi(d,!0):Ay(d)}function nj(d,h){var D={};return h=Ot(h,3),zo(d,function(j,V,ee){Wi(D,h(j,V,ee),j)}),D}function rj(d,h){var D={};return h=Ot(h,3),zo(d,function(j,V,ee){Wi(D,V,h(j,V,ee))}),D}var aj=Mc(function(d,h,D){yl(d,h,D)}),ux=Mc(function(d,h,D,j){yl(d,h,D,j)}),oj=Gi(function(d,h){var D={};if(d==null)return D;var j=!1;h=jn(h,function(ee){return ee=Is(ee,d),j||(j=ee.length>1),ee}),wi(d,Hd(d),D),j&&(D=no(D,g|y|w,Yy));for(var V=h.length;V--;)Tu(D,h[V]);return D});function ij(d,h){return cx(d,Me(Ot(h)))}var sj=Gi(function(d,h){return d==null?{}:Tc(d,h)});function cx(d,h){if(d==null)return{};var D=jn(Hd(d),function(j){return[j]});return h=Ot(h),Im(d,D,function(j,V){return h(j,V[0])})}function lj(d,h,D){h=Is(h,d);var j=-1,V=h.length;for(V||(V=1,d=n);++j<V;){var ee=d==null?n:d[bi(h[j])];ee===n&&(j=V,ee=D),d=ku(ee)?ee.call(d):ee}return d}function uj(d,h,D){return d==null?d:ir(d,h,D)}function cj(d,h,D,j){return j=typeof j=="function"?j:n,d==null?d:ir(d,h,D,j)}var dx=Rm(xa),fx=Rm(qo);function dj(d,h,D){var j=an(d),V=j||Rc(d)||qh(d);if(h=Ot(h,4),D==null){var ee=d&&d.constructor;V?D=j?new ee:[]:Sr(d)?D=ku(ee)?vc(hi(d)):{}:D={}}return(V?wr:zo)(d,function(ce,ve,Te){return h(D,ce,ve,Te)}),D}function fj(d,h){return d==null?!0:Tu(d,h)}function hj(d,h,D){return d==null?d:ph(d,h,vh(D))}function pj(d,h,D,j){return j=typeof j=="function"?j:n,d==null?d:ph(d,h,vh(D),j)}function Gh(d){return d==null?[]:Kt(d,xa(d))}function mj(d){return d==null?[]:Kt(d,qo(d))}function gj(d,h,D){return D===n&&(D=h,h=n),D!==n&&(D=Ki(D),D=D===D?D:0),h!==n&&(h=Ki(h),h=h===h?h:0),Ts(Ki(d),h,D)}function vj(d,h,D){return h=Nu(h),D===n?(D=h,h=0):D=Nu(D),d=Ki(d),My(d,h,D)}function yj(d,h,D){if(D&&typeof D!="boolean"&&Fn(d,h,D)&&(h=D=n),D===n&&(typeof h=="boolean"?(D=h,h=n):typeof d=="boolean"&&(D=d,d=n)),d===n&&h===n?(d=0,h=1):(d=Nu(d),h===n?(h=d,d=0):h=Nu(h)),d>h){var j=d;d=h,h=j}if(D||d%1||h%1){var V=Dd();return ma(d+V*(h-d+nc("1e-"+((V+"").length-1))),h)}return Od(d,h)}var wj=xs(function(d,h,D){return h=h.toLowerCase(),d+(D?hx(h):h)});function hx(d){return iS(Un(d).toLowerCase())}function px(d){return d=Un(d),d&&d.replace(ou,Qa).replace(jf,"")}function bj(d,h,D){d=Un(d),h=hr(h);var j=d.length;D=D===n?j:Ts(un(D),0,j);var V=D;return D-=h.length,D>=0&&d.slice(D,V)==h}function Sj(d){return d=Un(d),d&&et.test(d)?d.replace(He,du):d}function Dj(d){return d=Un(d),d&&ta.test(d)?d.replace(yr,"\\$&"):d}var Tj=xs(function(d,h,D){return d+(D?"-":"")+h.toLowerCase()}),Ij=xs(function(d,h,D){return d+(D?" ":"")+h.toLowerCase()}),Ej=jm("toLowerCase");function xj(d,h,D){d=Un(d),h=un(h);var j=h?fu(d):0;if(!h||j>=h)return d;var V=(h-j)/2;return _d(sl(V),D)+d+_d(pu(V),D)}function Cj(d,h,D){d=Un(d),h=un(h);var j=h?fu(d):0;return h&&j<h?d+_d(h-j,D):d}function Mj(d,h,D){d=Un(d),h=un(h);var j=h?fu(d):0;return h&&j<h?_d(h-j,D)+d:d}function kj(d,h,D){return D||h==null?h=0:h&&(h=+h),wy(Un(d).replace(Pi,""),h||0)}function Nj(d,h,D){return(D?Fn(d,h,D):h===n)?h=1:h=un(h),Ic(Un(d),h)}function Aj(){var d=arguments,h=Un(d[0]);return d.length<3?h:h.replace(d[1],d[2])}var Fj=xs(function(d,h,D){return d+(D?"_":"")+h.toLowerCase()});function Oj(d,h,D){return D&&typeof D!="number"&&Fn(d,h,D)&&(h=D=n),D=D===n?ae:D>>>0,D?(d=Un(d),d&&(typeof h=="string"||h!=null&&!rS(h))&&(h=hr(h),!h&&lc(d))?Es(yo(d),0,D):d.split(h,D)):[]}var Pj=xs(function(d,h,D){return d+(D?" ":"")+iS(h)});function jj(d,h,D){return d=Un(d),D=D==null?0:Ts(un(D),0,d.length),h=hr(h),d.slice(D,D+h.length)==h}function Lj(d,h,D){var j=G.templateSettings;D&&Fn(d,h,D)&&(h=n),d=Un(d),h=h0({},h,j,_m);var V=h0({},h.imports,j.imports,_m),ee=xa(V),ce=Kt(V,ee),ve,Te,We=0,$e=h.interpolate||ds,Je="__p += '",mt=gd((h.escape||ds).source+"|"+$e.source+"|"+($e===On?si:ds).source+"|"+(h.evaluate||ds).source+"|$","g"),Nt="//# sourceURL="+(Tn.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bn+"]")+`
`;d.replace(mt,function(zt,pn,bn,Ti,xo,Ii){return bn||(bn=Ti),Je+=d.slice(We,Ii).replace(ec,md),pn&&(ve=!0,Je+=`' +
__e(`+pn+`) +
'`),xo&&(Te=!0,Je+=`';
`+xo+`;
__p += '`),bn&&(Je+=`' +
((__t = (`+bn+`)) == null ? '' : __t) +
'`),We=Ii+zt.length,zt}),Je+=`';
`;var Ut=Tn.call(h,"variable")&&h.variable;if(!Ut)Je=`with (obj) {
`+Je+`
}
`;else if(Oa.test(Ut))throw new Qt(l);Je=(Te?Je.replace(te,""):Je).replace(me,"$1").replace(Ce,"$1;"),Je="function("+(Ut||"obj")+`) {
`+(Ut?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Te?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Je+`return __p
}`;var cn=gx(function(){return Dn(ee,Nt+"return "+Je).apply(n,ce)});if(cn.source=Je,nS(cn))throw cn;return cn}function Rj(d){return Un(d).toLowerCase()}function _j(d){return Un(d).toUpperCase()}function Bj(d,h,D){if(d=Un(d),d&&(D||h===n))return at(d);if(!d||!(h=hr(h)))return d;var j=yo(d),V=yo(h),ee=Hn(j,V),ce=oa(j,V)+1;return Es(j,ee,ce).join("")}function Hj(d,h,D){if(d=Un(d),d&&(D||h===n))return d.slice(0,Hf(d)+1);if(!d||!(h=hr(h)))return d;var j=yo(d),V=oa(j,yo(h))+1;return Es(j,0,V).join("")}function Yj(d,h,D){if(d=Un(d),d&&(D||h===n))return d.replace(Pi,"");if(!d||!(h=hr(h)))return d;var j=yo(d),V=Hn(j,yo(h));return Es(j,V).join("")}function Uj(d,h){var D=$,j=X;if(Sr(h)){var V="separator"in h?h.separator:V;D="length"in h?un(h.length):D,j="omission"in h?hr(h.omission):j}d=Un(d);var ee=d.length;if(lc(d)){var ce=yo(d);ee=ce.length}if(D>=ee)return d;var ve=D-fu(j);if(ve<1)return j;var Te=ce?Es(ce,0,ve).join(""):d.slice(0,ve);if(V===n)return Te+j;if(ce&&(ve+=Te.length-ve),rS(V)){if(d.slice(ve).search(V)){var We,$e=Te;for(V.global||(V=gd(V.source,Un(li.exec(V))+"g")),V.lastIndex=0;We=V.exec($e);)var Je=We.index;Te=Te.slice(0,Je===n?ve:Je)}}else if(d.indexOf(hr(V),ve)!=ve){var mt=Te.lastIndexOf(V);mt>-1&&(Te=Te.slice(0,mt))}return Te+j}function zj(d){return d=Un(d),d&&Ke.test(d)?d.replace(Ye,fy):d}var Vj=xs(function(d,h,D){return d+(D?" ":"")+h.toUpperCase()}),iS=jm("toUpperCase");function mx(d,h,D){return d=Un(d),h=D?n:h,h===n?M1(d)?F1(d):oc(d):d.match(h)||[]}var gx=rn(function(d,h){try{return Cr(d,n,h)}catch(D){return nS(D)?D:new Qt(D)}}),Wj=Gi(function(d,h){return wr(h,function(D){D=bi(D),Wi(d,D,Ge(d[D],d))}),d});function $j(d){var h=d==null?0:d.length,D=Ot();return d=h?jn(d,function(j){if(typeof j[1]!="function")throw new Bo(i);return[D(j[0]),j[1]]}):[],rn(function(j){for(var V=-1;++V<h;){var ee=d[V];if(Cr(ee[0],this,j))return Cr(ee[1],this,j)}})}function Zj(d){return xy(no(d,g))}function sS(d){return function(){return d}}function qj(d,h){return d==null||d!==d?h:d}var Gj=Iu(),Jj=Iu(!0);function Go(d){return d}function lS(d){return Nd(typeof d=="function"?d:no(d,g))}function Kj(d){return Dc(no(d,g))}function Qj(d,h){return yi(d,no(h,g))}var Xj=rn(function(d,h){return function(D){return gl(D,d,h)}}),e7=rn(function(d,h){return function(D){return gl(d,D,h)}});function uS(d,h,D){var j=xa(h),V=Ba(h,j);D==null&&!(Sr(h)&&(V.length||!j.length))&&(D=h,h=d,d=this,V=Ba(h,xa(h)));var ee=!(Sr(D)&&"chain"in D)||!!D.chain,ce=ku(d);return wr(V,function(ve){var Te=h[ve];d[ve]=Te,ce&&(d.prototype[ve]=function(){var We=this.__chain__;if(ee||We){var $e=d(this.__wrapped__),Je=$e.__actions__=Ha(this.__actions__);return Je.push({func:Te,args:arguments,thisArg:d}),$e.__chain__=We,$e}return Te.apply(d,Ro([this.value()],arguments))})}),d}function t7(){return zn._===this&&(zn._=my),this}function cS(){}function n7(d){return d=un(d),rn(function(h){return wl(h,d)})}var r7=Dh(jn),a7=Dh(ac),o7=Dh(ol);function vx(d){return zm(d)?F(bi(d)):Em(d)}function i7(d){return function(h){return d==null?n:So(d,h)}}var s7=Lm(),l7=Lm(!0);function dS(){return[]}function fS(){return!1}function u7(){return{}}function c7(){return""}function d7(){return!0}function f7(d,h){if(d=un(d),d<1||d>ie)return[];var D=ae,j=ma(d,ae);h=Ot(h),d-=ae;for(var V=Ee(j,h);++D<d;)h(D);return V}function h7(d){return an(d)?jn(d,bi):Di(d)?[d]:Ha(Jy(Un(d)))}function p7(d){var h=++dc;return Un(d)+h}var m7=Sh(function(d,h){return d+h},0),g7=Da("ceil"),v7=Sh(function(d,h){return d/h},1),y7=Da("floor");function w7(d){return d&&d.length?bu(d,Go,gi):n}function b7(d,h){return d&&d.length?bu(d,Ot(h,2),gi):n}function S7(d){return pd(d,Go)}function D7(d,h){return pd(d,Ot(h,2))}function T7(d){return d&&d.length?bu(d,Go,vl):n}function I7(d,h){return d&&d.length?bu(d,Ot(h,2),vl):n}var E7=Sh(function(d,h){return d*h},1),x7=Da("round"),C7=Sh(function(d,h){return d-h},0);function M7(d){return d&&d.length?Ae(d,Go):0}function k7(d,h){return d&&d.length?Ae(d,Ot(h,2)):0}return G.after=le,G.ary=ge,G.assign=_P,G.assignIn=lx,G.assignInWith=h0,G.assignWith=BP,G.at=HP,G.before=Pe,G.bind=Ge,G.bindAll=Wj,G.bindKey=nt,G.castArray=uP,G.chain=Eo,G.chunk=Y1,G.compact=Nh,G.concat=qm,G.cond=$j,G.conforms=Zj,G.constant=sS,G.countBy=K1,G.create=YP,G.curry=qe,G.curryRight=yt,G.debounce=Dt,G.defaults=UP,G.defaultsDeep=zP,G.defer=Et,G.delay=br,G.difference=$o,G.differenceBy=wn,G.differenceWith=Jr,G.drop=Nr,G.dropRight=sa,G.dropRightWhile=Io,G.dropWhile=Pc,G.fill=Ur,G.filter=l0,G.flatMap=u0,G.flatMapDeep=lg,G.flatMapDepth=Q1,G.flatten=Wd,G.flattenDeep=Gm,G.flattenDepth=$d,G.flip=xe,G.flow=Gj,G.flowRight=Jj,G.fromPairs=ro,G.functions=JP,G.functionsIn=KP,G.groupBy=zh,G.initial=ks,G.intersection=Fh,G.intersectionBy=Jm,G.intersectionWith=Il,G.invert=XP,G.invertBy=ej,G.invokeMap=Vh,G.iteratee=lS,G.keyBy=c0,G.keys=xa,G.keysIn=qo,G.map=Wh,G.mapKeys=nj,G.mapValues=rj,G.matches=Kj,G.matchesProperty=Qj,G.memoize=ye,G.merge=aj,G.mergeWith=ux,G.method=Xj,G.methodOf=e7,G.mixin=uS,G.negate=Me,G.nthArg=n7,G.omit=oj,G.omitBy=ij,G.once=lt,G.orderBy=$h,G.over=r7,G.overArgs=Ct,G.overEvery=a7,G.overSome=o7,G.partial=Pt,G.partialRight=jt,G.partition=X1,G.pick=sj,G.pickBy=cx,G.property=vx,G.propertyOf=i7,G.pull=Km,G.pullAll=qd,G.pullAllBy=jh,G.pullAllWith=Ua,G.pullAt=El,G.range=s7,G.rangeRight=l7,G.rearg=Wt,G.reject=Zh,G.remove=Si,G.rest=Kr,G.reverse=Ea,G.sampleSize=u,G.set=uj,G.setWith=cj,G.shuffle=m,G.slice=Qy,G.sortBy=O,G.sortedUniq=Eu,G.sortedUniqBy=tg,G.split=Oj,G.spread=In,G.tail=xu,G.take=e0,G.takeRight=t0,G.takeRightWhile=ng,G.takeWhile=Lh,G.tap=ag,G.throttle=kl,G.thru=Rh,G.toArray=ox,G.toPairs=dx,G.toPairsIn=fx,G.toPath=h7,G.toPlainObject=sx,G.transform=dj,G.unary=tS,G.union=z1,G.unionBy=V1,G.unionWith=n0,G.uniq=r0,G.uniqBy=Cu,G.uniqWith=W1,G.unset=fj,G.unzip=Cl,G.unzipWith=rg,G.update=hj,G.updateWith=pj,G.values=Gh,G.valuesIn=mj,G.without=pr,G.words=mx,G.wrap=lP,G.xor=$1,G.xorBy=a0,G.xorWith=Z1,G.zip=q1,G.zipObject=o0,G.zipObjectDeep=i0,G.zipWith=G1,G.entries=dx,G.entriesIn=fx,G.extend=lx,G.extendWith=h0,uS(G,G),G.add=m7,G.attempt=gx,G.camelCase=wj,G.capitalize=hx,G.ceil=g7,G.clamp=gj,G.clone=cP,G.cloneDeep=fP,G.cloneDeepWith=hP,G.cloneWith=dP,G.conformsTo=pP,G.deburr=px,G.defaultTo=qj,G.divide=v7,G.endsWith=bj,G.eq=Ns,G.escape=Sj,G.escapeRegExp=Dj,G.every=s0,G.find=Hh,G.findIndex=jc,G.findKey=VP,G.findLast=Yh,G.findLastIndex=Tl,G.findLastKey=WP,G.floor=y7,G.forEach=ug,G.forEachRight=Uh,G.forIn=$P,G.forInRight=ZP,G.forOwn=qP,G.forOwnRight=GP,G.get=aS,G.gt=mP,G.gte=gP,G.has=QP,G.hasIn=oS,G.head=Ah,G.identity=Go,G.includes=cg,G.indexOf=Lc,G.inRange=vj,G.invoke=tj,G.isArguments=Jd,G.isArray=an,G.isArrayBuffer=vP,G.isArrayLike=Zo,G.isArrayLikeObject=Vr,G.isBoolean=yP,G.isBuffer=Rc,G.isDate=wP,G.isElement=bP,G.isEmpty=SP,G.isEqual=DP,G.isEqualWith=TP,G.isError=nS,G.isFinite=IP,G.isFunction=ku,G.isInteger=tx,G.isLength=d0,G.isMap=nx,G.isMatch=EP,G.isMatchWith=xP,G.isNaN=CP,G.isNative=MP,G.isNil=NP,G.isNull=kP,G.isNumber=rx,G.isObject=Sr,G.isObjectLike=Ar,G.isPlainObject=dg,G.isRegExp=rS,G.isSafeInteger=AP,G.isSet=ax,G.isString=f0,G.isSymbol=Di,G.isTypedArray=qh,G.isUndefined=FP,G.isWeakMap=OP,G.isWeakSet=PP,G.join=Oh,G.kebabCase=Tj,G.last=zr,G.lastIndexOf=Ph,G.lowerCase=Ij,G.lowerFirst=Ej,G.lt=jP,G.lte=LP,G.max=w7,G.maxBy=b7,G.mean=S7,G.meanBy=D7,G.min=T7,G.minBy=I7,G.stubArray=dS,G.stubFalse=fS,G.stubObject=u7,G.stubString=c7,G.stubTrue=d7,G.multiply=E7,G.nth=Zd,G.noConflict=t7,G.noop=cS,G.now=W,G.pad=xj,G.padEnd=Cj,G.padStart=Mj,G.parseInt=kj,G.random=yj,G.reduce=Gd,G.reduceRight=eS,G.repeat=Nj,G.replace=Aj,G.result=lj,G.round=x7,G.runInContext=we,G.sample=s,G.size=b,G.snakeCase=Fj,G.some=x,G.sortedIndex=Qm,G.sortedIndexBy=Xm,G.sortedIndexOf=U1,G.sortedLastIndex=xl,G.sortedLastIndexBy=Xy,G.sortedLastIndexOf=eg,G.startCase=Pj,G.startsWith=jj,G.subtract=C7,G.sum=M7,G.sumBy=k7,G.template=Lj,G.times=f7,G.toFinite=Nu,G.toInteger=un,G.toLength=ix,G.toLower=Rj,G.toNumber=Ki,G.toSafeInteger=RP,G.toString=Un,G.toUpper=_j,G.trim=Bj,G.trimEnd=Hj,G.trimStart=Yj,G.truncate=Uj,G.unescape=zj,G.uniqueId=p7,G.upperCase=Vj,G.upperFirst=iS,G.each=ug,G.eachRight=Uh,G.first=Ah,uS(G,function(){var d={};return zo(G,function(h,D){Tn.call(G.prototype,D)||(d[D]=h)}),d}(),{chain:!1}),G.VERSION=r,wr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){G[d].placeholder=G}),wr(["drop","take"],function(d,h){nn.prototype[d]=function(D){D=D===n?1:kr(un(D),0);var j=this.__filtered__&&!h?new nn(this):this.clone();return j.__filtered__?j.__takeCount__=ma(D,j.__takeCount__):j.__views__.push({size:ma(D,ae),type:d+(j.__dir__<0?"Right":"")}),j},nn.prototype[d+"Right"]=function(D){return this.reverse()[d](D).reverse()}}),wr(["filter","map","takeWhile"],function(d,h){var D=h+1,j=D==ue||D==Z;nn.prototype[d]=function(V){var ee=this.clone();return ee.__iteratees__.push({iteratee:Ot(V,3),type:D}),ee.__filtered__=ee.__filtered__||j,ee}}),wr(["head","last"],function(d,h){var D="take"+(h?"Right":"");nn.prototype[d]=function(){return this[D](1).value()[0]}}),wr(["initial","tail"],function(d,h){var D="drop"+(h?"":"Right");nn.prototype[d]=function(){return this.__filtered__?new nn(this):this[D](1)}}),nn.prototype.compact=function(){return this.filter(Go)},nn.prototype.find=function(d){return this.filter(d).head()},nn.prototype.findLast=function(d){return this.reverse().find(d)},nn.prototype.invokeMap=rn(function(d,h){return typeof d=="function"?new nn(this):this.map(function(D){return gl(D,d,h)})}),nn.prototype.reject=function(d){return this.filter(Me(Ot(d)))},nn.prototype.slice=function(d,h){d=un(d);var D=this;return D.__filtered__&&(d>0||h<0)?new nn(D):(d<0?D=D.takeRight(-d):d&&(D=D.drop(d)),h!==n&&(h=un(h),D=h<0?D.dropRight(-h):D.take(h-d)),D)},nn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},nn.prototype.toArray=function(){return this.take(ae)},zo(nn.prototype,function(d,h){var D=/^(?:filter|find|map|reject)|While$/.test(h),j=/^(?:head|last)$/.test(h),V=G[j?"take"+(h=="last"?"Right":""):h],ee=j||/^find/.test(h);V&&(G.prototype[h]=function(){var ce=this.__wrapped__,ve=j?[1]:arguments,Te=ce instanceof nn,We=ve[0],$e=Te||an(ce),Je=function(pn){var bn=V.apply(G,Ro([pn],ve));return j&&mt?bn[0]:bn};$e&&D&&typeof We=="function"&&We.length!=1&&(Te=$e=!1);var mt=this.__chain__,Nt=!!this.__actions__.length,Ut=ee&&!mt,cn=Te&&!Nt;if(!ee&&$e){ce=cn?ce:new nn(this);var zt=d.apply(ce,ve);return zt.__actions__.push({func:Rh,args:[Je],thisArg:n}),new ga(zt,mt)}return Ut&&cn?d.apply(this,ve):(zt=this.thru(Je),Ut?j?zt.value()[0]:zt.value():zt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(d){var h=ws[d],D=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",j=/^(?:pop|shift)$/.test(d);G.prototype[d]=function(){var V=arguments;if(j&&!this.__chain__){var ee=this.value();return h.apply(an(ee)?ee:[],V)}return this[D](function(ce){return h.apply(an(ce)?ce:[],V)})}}),zo(nn.prototype,function(d,h){var D=G[h];if(D){var j=D.name+"";Tn.call(mc,j)||(mc[j]=[]),mc[j].push({name:h,func:D})}}),mc[kc(n,M).name]=[{name:"wrapper",func:n}],nn.prototype.clone=Kf,nn.prototype.reverse=mm,nn.prototype.value=yc,G.prototype.at=Ml,G.prototype.chain=_h,G.prototype.commit=Mu,G.prototype.next=Bh,G.prototype.plant=ig,G.prototype.reverse=J1,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=sg,G.prototype.first=G.prototype.head,Ss&&(G.prototype[Ss]=og),G},uc=O1();Lo?((Lo.exports=uc)._=uc,tl._=uc):zn._=uc}).call(dr)})(bw,bw.exports);var fb=bw.exports;const Sw=qt(fb);function p0(e){const t=e.match(/^#+/);return t?t[0].length:0}function Ex(e,t){const n=e.split(`
`);let r="",a=[],o=!1,i=1;for(let l=0;l<n.length;l++){const c=n[l];if(c.startsWith("#")&&/^#{1,6}\s/g.test(c)){if(o&&p0(c)<=p0(t))break;r=c,r===t?(o=!0,i=l+1):o&&p0(c)>p0(t)?a.push(c):(o=!1,a=[])}else o&&a.push(c)}return t?fb.isEmpty(a)?{content:"",startLine:-1}:{content:a.join(`
`),startLine:i}:{content:e,startLine:0}}function D2(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function hR(e,t,n){var g;const r={},a=(y,w)=>{for(;y[w]!==void 0&&y[w]!==w;)w=y[w];return w},o=ft.getState().app,i=n.split(`
`),l=t+i.length-1,c=(g=o.metadataCache.getFileCache(e))==null?void 0:g.listItems,f={};if(!c)return[];c.forEach(y=>{var S,I;const w=y.position.start.line,T=y.position.end.line;if(w>=t&&T<=l){const M=w-t,N=T-t,_=i.slice(M,N+1),k=_.join(`
`);if(y.parent&&y.parent>0&&(r[y.position.start.line]=y.parent),y.parent&&f[y.parent]){if(w-y.parent===1){const L=(S=i[M])==null?void 0:S.match(/^(\s*)/);L&&(f[y.parent].indent=L[0])}const R=new RegExp("^"+f[y.parent].indent);f[y.parent].content+=`
`+k.split(`
`).map(L=>L==null?void 0:L.replace(R,"")).join(`
`)}else if(y.parent&&f[a(r,y.parent)]){const R=new RegExp("^"+f[a(r,y.parent)].indent);f[a(r,y.parent)].content+=`
`+k.split(`
`).map(L=>L==null?void 0:L.replace(R,"")).join(`
`)}else if(new RegExp(KL).test(k)){f[w]||(f[w]={content:"",blockId:"",indent:""});const R=_.length>1&&((I=_[1])==null?void 0:I.match(/^(\s*)/));R&&(f[w].indent=R[0]),f[w].content=k.split(`
`).map(L=>L==null?void 0:L.replace(f[w].indent,"")).join(`
`),f[w].blockId=y.id}}});const p=Object.keys(f).map(y=>({line:f[y].content,blockId:f[y].blockId||"",index:parseInt(y)}));return e.path.includes("2024-04-07"),p}async function pR(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new C.Notice(E("File not found for the given thino path, is creating a new file")),n=await t.vault.create(e,'{"nodes": [], "edges": []}'),dt.setChangedByMemos(!0)),n}async function mR(e,t){var a;let n;try{n=await t.vault.read(e)}catch(o){console.error(o),n=await t.vault.cachedRead(e)}const r=(a=t.metadataCache.getFileCache(e))==null?void 0:a.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function gR(e){const t=e.split(/\r?\n/),n=[];let r="",a=[],o=0;for(let i=0;i<t.length;i++){const l=t[i];l.startsWith("#")?(r&&n.push({header:r,content:a.join(`
`).trim(),pos:{start:o,end:i-1}}),r=l,a=[],o=i):a.push(l)}return r&&n.push({header:r,content:a.join(`
`).trim(),pos:{start:o,end:t.length-1}}),n}function vR(e){const t=e.split(/\r?\n/),n=[];let r=!1,a=[],o="";for(let i=0;i<t.length;i++){const l=t[i];l.startsWith("> [!thino]")?(r&&(n.push({metadata:o,content:a.join(`
`).trim()}),a=[]),r=!0,o=l.replace("> [!thino]","").trim()):r&&l.startsWith(">")?a.push(l.replace(/^> /,"")):r&&!l.startsWith(">")&&(r=!1,n.push({metadata:o,content:a.join(`
`).trim()}),a=[],o="")}return r&&n.push({metadata:o,content:a.join(`
`).trim()}),n}const yR=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 wR(e,t){if(!t)return 0;const{vault:n}=Le.getState().dailyNotesState.app,r=e==null?void 0:e.DefaultMemoComposition,a=e!=null&&e.ProcessEntriesBelow&&(e==null?void 0:e.ProcessContentTarget)!=="whole"?e==null?void 0:e.ProcessEntriesBelow:"",o=(e==null?void 0:e.ProcessContentTarget)!=="whole"?e!=null&&e.DifferentInsertTarget?e!=null&&e.InsertAfterForTask?e==null?void 0:e.InsertAfterForTask:"":a:"";let i;try{i=await n.read(t)}catch(T){console.error(T),i=await n.cachedRead(t)}let l;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?l="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\<time\\>)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):l="(-|\\*) (\\[(.{1})\\]\\s)?((\\<time\\>)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const c=new RegExp(l,"g"),f=(i.match(c)||[]).length,p=new RegExp(a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),g=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),y=(i.match(p)||[]).length,w=(i.match(g)||[]).length;return i=null,y||w?f:0}function xx(e,t,n,r,a){var c,f;const o=up(a,"day")||C.moment(a.stat.ctime);let i;const l=hR(a,n,t);for(const p of l){const g=TR(e.DefaultMemoComposition,p.line),y=IR(e.DefaultMemoComposition,p.line),w=ER(p.line);let T=bR(p.line);if(o.hours(parseInt(g)),o.minutes(parseInt(y)),w&&o.seconds(parseInt(w)),!w&&o.seconds(0),/^\s*[-*]\s(\[(.)\])\s/g.test(p.line)){const L=xR(p.line);T=SR(p.line),i=yR(L)}else i="JOURNAL";let S=T.trim().replaceAll(/<br>/g,`
`);const I=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(T),M=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(T),N=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(T),_=(c=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(T))==null?void 0:c[2],k=(f=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(T))==null?void 0:f[2],R=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(T)?"PUBLIC":"PRIVATE";a.path.includes("2024-04-07"),S=S.replace(/\s\[pinned::[^\]]+\]/g,"").replace(/\s\[visibility::[^\]]+\]/g,"").replace(/\s\[archived::[^\]]+\]/g,"").replace(/\s\[deleted::[^\]]+\]/g,"").replace(/\s\[webId::[^\]]+\]/g,""),p.blockId&&(S=S.replace("^"+(p==null?void 0:p.blockId),"")),r.push({id:o.format("YYYYMMDDHHmmss")+`${p.index}`,content:S.trim(),createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:i,hasId:p.blockId?p.blockId:"",linkId:"",path:a.path,deletedAt:N?C.moment(_,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:M?"ARCHIVED":"NORMAL",visibility:R,pinned:I,creatorName:"Memo",resourceList:[],sourceType:"DAILY",webId:k})}}function bR(e){return e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function SR(e){return DR(e)}const DR=e=>{var r;let t;return t="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)",(r=new RegExp(t,"").exec(e))==null?void 0:r[4]},TR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[6]},IR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[7]},ER=e=>{var r;const t="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\d{1,2})\\:(\\d{2})\\:(\\d{2})(.*)";return(r=new RegExp(t,"").exec(e))==null?void 0:r[7]},xR=e=>{var t;return(t=/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e))==null?void 0:t[2]},tA=()=>Wg()?!0:(new C.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);async function nA(e,t){if(!e)return t;const n=Le.getState().dailyNotesState.app||window.app,r=await mR(e,n);let a=C.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");await n.fileManager.processFrontMatter(e,o=>{if(o.id||(o.id=ut.randomId(16)),o.createdAt?a=C.moment(o.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?o.createdAt:a:o.createdAt=a,!r.trim())return t;const i=!!o.pinned,l=o.rowStatus&&o.rowStatus==="ARCHIVED",c=!!o.deletedAt,f=o.deletedAt?o.deletedAt:"",p=o.visibility?o.visibility:"PRIVATE",g=o.thinoType?o.thinoType:"JOURNAL",y=o.webId?o.webId:"",w=o.id?o.id:"",T=o.hasId?o.hasId:"",S=o.linkId?o.linkId:"",I=e.path,M="Memo",N="MULTI",_=[];return t.push({id:w,content:r,createdAt:a,updatedAt:a,deletedAt:c?C.moment(f,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:i,rowStatus:l?"ARCHIVED":"NORMAL",visibility:p,thinoType:g,hasId:T,linkId:S,path:I,creatorName:M,sourceType:N,resourceList:_,webId:y}),t})}async function iT(e,t){var w,T,S,I,M,N;if(!e)return t;const{vault:n}=Le.getState().dailyNotesState.app||window.app;let r;try{r=await n.read(e)}catch(_){console.error(_),r=await n.cachedRead(e)}if(!r)return;const a=C.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),o=C.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),i=e.path,l="Thino",c="FILE",f="",p="",g=[],y=await gR(r);for(const _ of y){const k=vR(_.content);for(const R of k){const L=R.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!L)continue;const H=(T=(w=R.metadata.match(/id::([^\]]*)/g))==null?void 0:w[0])==null?void 0:T.replace("id::","");if(!H)continue;const U=L?L[0]:a,z=L?L[0]:o,$=R.metadata.match(/webId::([^\]]*)/g)?(I=(S=R.metadata.match(/webId::([^\]]*)/g))==null?void 0:S[0])==null?void 0:I.replace("webId::",""):"",X=R.metadata.contains("[pinned::true]"),Q=R.metadata.contains("[archived::true]"),se=R.metadata.contains("[deleted::"),ue=(M=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(R.metadata))==null?void 0:M[2],fe=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(R.metadata)?"PUBLIC":"PRIVATE",Z=(N=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(R.metadata))==null?void 0:N[2];t.push({id:H,content:R.content,createdAt:U,updatedAt:z,deletedAt:se?C.moment(ue,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:X,rowStatus:Q?"ARCHIVED":"NORMAL",visibility:fe,thinoType:Z||"JOURNAL",hasId:f,linkId:p,path:i,creatorName:l,sourceType:c,resourceList:g,webId:$})}}return t}async function rA(e,t){if(!e)return[];const n=Le.getState().dailyNotesState.settings,{vault:r}=Le.getState().dailyNotesState.app||window.app;if(await wR(n,e)===0)return;let o;try{o=await r.read(e)}catch(g){console.error(g),o=await r.cachedRead(e)}const{content:i,startLine:l}=Ex(o,(n==null?void 0:n.ProcessContentTarget)==="whole"?"":n.ProcessEntriesBelow);let c="",f=0;if(n.DifferentInsertTarget&&(n==null?void 0:n.ProcessContentTarget)!=="whole"&&n.InsertAfterForTask&&!i.includes(n.InsertAfterForTask)){const{content:g,startLine:y}=Ex(o,n.InsertAfterForTask);c=g,f=y}const p=[];xx(n,i,l,p,e),n.DifferentInsertTarget&&c&&xx(n,c,f,p,e),p.length!==0&&t.push(...p.sort((g,y)=>g.createdAt>y.createdAt?-1:1))}async function aA(e,t){const n=Le.getState().dailyNotesState.app||app;if(!(e instanceof C.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),o=a==null?void 0:a.nodes;for(const i of o){if(i.type==="group"||i.createdAt===void 0||i.text.trim()==="")continue;const c=C.moment(i==null?void 0:i.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),f=C.moment(i==null?void 0:i.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),p=i!=null&&i.deletedAt?C.moment(i==null?void 0:i.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",g=!!(i!=null&&i.pinned),y=i!=null&&i.archived?"ARCHIVED":"NORMAL",w=i!=null&&i.visibility?i==null?void 0:i.visibility:"PRIVATE",T=i!=null&&i.thinoType?i==null?void 0:i.thinoType:"JOURNAL",S=i!=null&&i.text?i==null?void 0:i.text:"",I=i!=null&&i.id?i==null?void 0:i.id:"",M=i!=null&&i.hasId?i==null?void 0:i.hasId:"",N=i!=null&&i.linkId?i==null?void 0:i.linkId:"",_=e.path,k="Memo",R="CANVAS",L=[],H=i!=null&&i.webId?i==null?void 0:i.webId:void 0;t.push({id:I,content:S,createdAt:c,updatedAt:f,deletedAt:p,pinned:g,rowStatus:y,visibility:w,thinoType:T,hasId:M,linkId:N,path:_,creatorName:k,sourceType:R,resourceList:L,webId:H})}}async function Cx(e=[]){const t=[],n=[],r=Le.getState().dailyNotesState.app||app,{vault:a}=r,{settings:o}=Le.getState().dailyNotesState,i=r.loadLocalStorage("tokenForSync"),l=async(c,f)=>{for(const p of c)try{await f(p,t,o)}catch(g){console.error(g),new C.Notice(g)}};try{if(e.includes("CANVAS")){const c=CR(a);await l(c,aA)}}catch(c){console.error(c)}try{if(e.includes("MULTI")){const c=MR(a,r,o);await l(c,nA)}}catch(c){console.error(c)}try{if(e.includes("DAILY")){const c=await kR(a);await l(c,rA)}}catch(c){console.error(c)}try{if(e.includes("FILE")||i){const c=NR(a,r,o);await l(c,iT)}}catch(c){console.error(c)}return{memos:t,commentMemos:n}}function CR(e){return e.getAllLoadedFiles().filter(t=>t instanceof C.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function MR(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>{var l,c;return((l=i.parent)==null?void 0:l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim()))&&!((c=i.path)!=null&&c.endsWith("thino.md"))}),o=n.TagForMultiTypeFiles?r.filter(i=>{var l,c,f;return!((l=i.parent)!=null&&l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!((c=i.path)!=null&&c.endsWith("thino.md")))&&((f=C.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:f.contains("#"+n.TagForMultiTypeFiles.replace("#","")))}):[];return[...a,...o]}async function kR(e){const t=cb();t===void 0&&new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(C.normalizePath(t))||new C.Notice(E("Failed to find daily notes folder"));const r=Zu();return Object.values(r).filter(a=>a instanceof C.TFile&&a.extension==="md")}function NR(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>i.name.trim().includes("thino")),o=n.TagForFileTypeFiles?r.filter(i=>{var l;return!i.name.trim().includes("thino")&&((l=C.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:l.contains("#"+n.TagForFileTypeFiles.replace("#","")))}):[];return[...a,...o]}const AR=async(e,t,n)=>{const r=await Fp(Le.getState().dailyNotesState.app)||[],a=r.find(l=>l.id===e),o={...a,title:t,querystring:n},i=r.findIndex(l=>l.id===e);return r[i]=o,await Ev(Le.getState().dailyNotesState.app,r),[a]},FR="https://api.thino.pkmer.cn/test",Op=FR,OR="unknown",PR=/!\[(?<content>[^\]]+)\]\((?<link>[^)]+)\)/g;function jR(e){return e.substring(e.lastIndexOf(".")+1)}function LR(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${jR(e.id)}`,size:e.size.toString()}}function RR(e){const t=e==null?void 0:e.matchAll(PR);return t?Array.from(t).map(n=>{var r;return LR({url:(r=n.groups)==null?void 0:r.link,id:OR,size:0,mtime:""})}).filter(n=>n.type!="html"):[]}function xv(e){var t;return{id:e.id,createdAt:C.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:C.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:(t=e.ttime)!=null&&t.toString()?C.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:RR(e.content),creatorName:"thino",sourceType:(e==null?void 0:e.thinoType)||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime}}async function _R(e){const n={url:`${Op}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(o=>xv(o))}catch(a){console.error(`Error processing memo response: ${a}`)}}).catch(r=>(console.error(r),[]))}function Pp(){const e=Le.getState().dailyNotesState.app||app;return(e==null?void 0:e.loadLocalStorage("tokenForSync"))||""}async function T2(e){const t=`${Op}/thino/createThino`,n={content:e.content,thinoType:(e==null?void 0:e.thinoType)||"FILE",pinned:!1,rowStatus:"NORMAL",encrypted:!1},r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create memo: ${a.status}`);try{const o=a.json;return xv(o.payload)}catch(o){console.error(`Error processing memo creation response: ${o}`)}}).catch(a=>(console.error(a),null))}function BR(e){return{id:e.id,ctime:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:C.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?C.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",tags:[]}}async function HR(e){const t=`${Op}/thino/createThinosByData`,n=e.map(a=>BR(a)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create thinos: ${a.status}`);try{return a.json.payload.map(l=>xv(l))}catch(o){console.error(`Error processing thinos creation response: ${o}`)}}).catch(a=>(console.error(a),[]))}async function mS(e){const n={url:`${Op}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const a=r.json;return xv(a.payload)}catch(a){console.error(`Error processing memo update response: ${a}`)}}).catch(r=>(console.error(r),null))}async function Zg(e){const n={url:`${Op}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const a=r.json;return xv(a.payload)}catch(a){console.error(`Error processing memo recovery response: ${a}`)}}).catch(r=>(console.error(r),null))}async function I2(e){const n={url:`${Op}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${Pp()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function YR(e){return(e==null?void 0:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))||e}function UR(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 zR({content:e,isList:t,name:n}){const r=Le.getState().dailyNotesState.settings,a=C.moment(),o=ut.randomId(16),i=(r==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",l=n||`${a.format("YYYYMMDD")}-${o}`,c=`${i}/${l}.md`,f={id:o,content:e,deletedAt:"",path:c,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.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"},p=ft.getState().app||window.app,{vault:g,fileManager:y}=p,w=g.getAbstractFileByPath(i);(!w||!(w instanceof C.TFolder))&&(new C.Notice(E("Folder not found for the given thino path, is creating a new folder")),await g.createFolder(i)),dt.setChangedByMemos(!0);let T;const S=p.vault.getFileByPath(c);return S?T=await g.create(`${i}/${a.format("YYYYMMDD")}-${o}.md`,e):T=await g.create(c,e),await y.processFrontMatter(T,I=>{I.id=o,I.createdAt=a.format("YYYY/MM/DD HH:mm:ss"),I.updatedAt=a.format("YYYY/MM/DD HH:mm:ss"),I.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||S)&&(r!=null&&r.SetFileNameAfterCreate)&&p.fileManager.promptForFileRename(T),f}async function VR({content:e,isList:t}){const n=Le.getState().dailyNotesState.settings,r=C.moment(),a=ut.randomId(16),o=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",i={id:a,content:e,deletedAt:"",path:o,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"},l=ft.getState().app,{vault:c}=l;let f=c.getAbstractFileByPath(o);(!f||!(f instanceof C.TFile))&&(new C.Notice(E("File not found for the given thino path, is creating a new file")),f=await c.create(o,""));let p="";try{p=await c.read(f)||await c.cachedRead(f)}catch(M){console.error(M),new C.Notice(E("Failed to read current daily note, check if it exists."))}const g=p.indexOf(`# ${r.format("YYYY-MM-DD")}`);let y=p.indexOf(`
#`,g+1);y===-1&&(y=p.length);const w=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${a}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,T=e.replace(/\n/g,`
> `),S=`
${w}
> ${T}
`;let I;if(g===-1){const M=`# ${r.format("YYYY-MM-DD")}`;I=`${p.substring(0,y)}
${M}${S}
${p.substring(y)}`}else I=`${p.substring(0,y)}${S}${p.substring(y)}`;return setTimeout(async()=>{dt.setChangedByMemos(!0),await c.modify(f,I)},200),i}async function Mx(e){const t=Le.getState().dailyNotesState.settings,n=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,a=(t==null?void 0:t.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",o={id:r,content:e.content,deletedAt:e.deletedAt||"",path:a,createdAt:n.format("YYYY/MM/DD HH:mm:ss"),updatedAt:n.format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",hasId:"",linkId:"",pinned:e.pinned,visibility:"PUBLIC",rowStatus:e.rowStatus||"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",webId:e.id},i=ft.getState().app,{vault:l}=i;let c=l.getAbstractFileByPath(a);(!c||!(c instanceof C.TFile))&&(new C.Notice(E("File not found for the given thino path, is creating a new file")),c=await l.create(a,""));let f="";try{f=await l.read(c)||await l.cachedRead(c)}catch(I){console.error(I),new C.Notice(E("Failed to read current daily note, check if it exists."))}const p=f.indexOf(`# ${n.format("YYYY-MM-DD")}`);let g=f.indexOf(`
#`,p+1);g===-1&&(g=f.length);const y=`> [!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}]`:""} %%`,w=e.content.replace(/\n/g,`
> `),T=`
${y}
> ${w}
`;let S;if(p===-1){const I=`# ${n.format("YYYY-MM-DD")}`;S=`${f.substring(0,g)}
${I}${T}
${f.substring(g)}`}else S=`${f.substring(0,g)}${T}${f.substring(g)}`;return dt.setChangedByMemos(!0),await l.modify(c,S),o}async function WR({content:e,isList:t}){const n=Le.getState().dailyNotesState.settings,r=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultCanvasPath)||"basic.thino.canvas",a=C.moment(),o=ut.randomId(16),i={id:o,content:e,deletedAt:"",path:r,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.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"},l=ft.getState().app,{vault:c}=l,f=await pR(r,l);if(!f||!(f instanceof C.TFile)){new C.Notice(E("File not found for the given thino path, is creating a new file"));return}const p=await c.read(f),g=JSON.parse(p);if(g.nodes.find(I=>I.id===i.id))return;let w;g.nodes.length>0&&(w=[...g.nodes].reduce((I,M)=>{if(!I.createdAt)return M;const N=C.moment(I.createdAt,"YYYY/MM/DD HH:mm:ss"),_=C.moment(M.createdAt,"YYYY/MM/DD HH:mm:ss");return N.isAfter(_)?I:M}));const T=w?{x:w.x,y:w.y+100,width:w.width,height:w.height}:{x:0,y:0,width:200,height:100};g.nodes.push({...T,type:"text",id:o,text:e,deletedAt:"",createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[]}),dt.setChangedByMemos(!0);const S=JSON.stringify(g,null,2);return await c.modify(f,S),i}async function gS(e,t,n){var se;const{vault:r}=Le.getState().dailyNotesState.app||window.app,a=Le.getState().dailyNotesState.app||window.app,o=Le.getState().dailyNotesState.settings,i=a.vault.getConfig("useTab")===void 0||window.app.vault.getConfig("useTab")===!0,l=i?1:a.vault.getConfig("tabSize"),c=(i?" ":" ").repeat(l),f=e.split(`
`).join(`
`+c),p=n||C.moment(),{DifferentInsertTarget:g,InsertAfterForTask:y,InsertType:w}=o,T=p.format(o.DefaultTimePrefix||"HH:mm"),S=w==="end"?"":t?o.InsertAfter:g&&y||o.InsertAfter,I=a==null?void 0:a.loadLocalStorage("tokenForSync");let M="";try{e&&I&&o.startSync&&(M=(await T2({content:e,thinoType:"DAILY"})).id)}catch(ue){console.error(ue)}const N=t?"- ":"- [ ] ",_=o!=null&&o.DefaultMemoComposition?`${N}${(se=o==null?void 0:o.DefaultMemoComposition)==null?void 0:se.replace(/{TIME}/g,T).replace(/{CONTENT}/g,(f.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?`
`+c:"")+f)}${f.split(`
`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(f.split(`
`)[f.split(`
`).length-1])&&M?`
`+c:" "}${M?`[webId::${M}]`:""}`:`${N}${T} ${f.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?`
`+c:""}${f}${f.split(`
`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(f.split(`
`)[f.split(`
`).length-1])&&M?`
`+c:" "}${M?`[webId::${M}]`:""}`,k=Zu(),R=ub(p,k),L="fake"+ut.randomId(16);let H=!1;const U=a.plugins.getPlugin("templater-obsidian");let z;if(R?z=R:(U!=null&&U.templater&&(U!=null&&U.settings.trigger_on_file_creation)&&(be.setWaitingForTemplater({origin:e,date:p,isList:t,id:L,type:"local"}),H=!0),z=await ut.createDailyNoteCheck(p)),!z){new C.Notice(E("Failed to create daily note, check if it exists."));return}if(R||await ft.fechLocalDailyNotes(),U&&(U!=null&&U.templater)&&(U!=null&&U.settings.trigger_on_file_creation)&&H)return dt.setChangedByMemos(!0),{id:L,content:e,deletedAt:"",createdAt:p.format("YYYY/MM/DD HH:mm:ss"),updatedAt:p.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:z.path,hasId:"",linkId:"",webId:M,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY"};let $="";try{$=await r.read(z)||await r.cachedRead(z)}catch(ue){console.error(ue),new C.Notice(E("Failed to read current daily note, check if it exists."))}const X=await oA(S,_,$);await r.modify(z,X.content);const Q=X.posNum===-1?iA(X.content).length-(_.split(`
`).length-1)-1:X.posNum+1;return dt.setChangedByMemos(!0),{id:p.format("YYYYMMDDHHmm")+"00"+Q,content:e,deletedAt:"",createdAt:p.format("YYYY/MM/DD HH:mm:ss"),updatedAt:p.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:z.path,hasId:"",linkId:"",webId:M,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY"}}async function kx(e){const{vault:t}=Le.getState().dailyNotesState.app||window.app,n=Le.getState().dailyNotesState.app||window.app,{DefaultMemoComposition:r,InsertAfter:a,DefaultTimePrefix:o,DifferentInsertTarget:i,InsertAfterForTask:l,InsertType:c,WaitTemplaterToFinishParse:f}=Le.getState().dailyNotesState.settings;let p=(e.pinned?" [pinned::true]":"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.visibility==="PRIVATE"?' [visibility::"PRIVATE"]':"");if(e.id){const ue=" [webId::"+e.id+"]";p+=ue}const g=C.moment();if(e.deletedAt){const ue=" [deleted::"+g.format("YYYYMMDDHHmmss")+"]";p+=ue}const y=n.vault.getConfig("useTab")===void 0||n.vault.getConfig("useTab")===!0,w=y?1:n.vault.getConfig("tabSize"),T=(y?" ":" ").repeat(w),S=e.content.split(`
`).join(`
`+T),I=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),M=I.format(o||"HH:mm"),N=e.thinoType?"- [ ] ":"- ",_=r?`${N}${r==null?void 0:r.replace(/{TIME}/g,M).replace(/{CONTENT}/g,(S.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?`
`+T:"")+S)}${S.split(`
`).length>1&&/```/g.test(S.split(`
`)[S.split(`
`).length-1])&&p.trim()?`
`+T:" "}${p}`:`${N}${M} ${S.split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?`
`+T:""}${S}${S.split(`
`).length>1&&/```/g.test(S.split(`
`)[S.split(`
`).length-1])&&p.trim()?`
`+T:" "}${p}`,k=Zu(),R=ub(I,k),L="fake"+ut.randomId(16);let H=!1;const U=n.plugins.getPlugin("templater-obsidian");let z;if(R?z=R:(U!=null&&U.templater&&(U!=null&&U.settings.trigger_on_file_creation)&&(be.setWaitingForTemplater({origin:e.content,date:I,isList:e.thinoType&&e.thinoType==="JOURNAL",id:L,type:"web"}),H=!0),z=await ut.createDailyNoteCheck(I)),!z){new C.Notice(E("Failed to create daily note, check if it exists.")),new C.Notice(E("Your content has been copied to clipboard, and inserted into the editor. Please try it again")),await navigator.clipboard.writeText(e.content);const ue=n.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,ue);return}if(R||await ft.fechLocalDailyNotes(),U&&(U!=null&&U.templater)&&(U!=null&&U.settings.trigger_on_file_creation)&&H)return dt.setChangedByMemos(!0),{id:L,content:e.content,deletedAt:e.deletedAt??"",createdAt:I.format("YYYY/MM/DD HH:mm:ss"),updatedAt:I.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:z.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.webId||e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY"};let $="";try{$=await t.read(z)||await t.cachedRead(z)}catch(ue){console.error(ue),new C.Notice(E("Failed to read current daily note, check if it exists."))}const X=c==="end"?"":e.thinoType&&i&&l||a,Q=await oA(X,_,$);await t.modify(z,Q.content);const se=Q.posNum===-1?iA(Q.content).length-1:Q.posNum+1;return dt.setChangedByMemos(!0),{id:I.format("YYYYMMDDHHmm")+"00"+se,content:e.content,deletedAt:e.deletedAt??"",createdAt:I.format("YYYY/MM/DD HH:mm:ss"),updatedAt:I.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:z.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY"}}async function oA(e,t,n){const r=new RegExp(`(s*?)${await YR(e)}(s*?)`),a=UR(n),o=a.findIndex(f=>r.test(f)),i=(e==null?void 0:e.trim())===""?!0:o===-1;i&&console.error("unable to find insert after line in file.");const l=a.slice(o+1).findIndex(f=>/(^#+ |---|^\^[a-zA-Z0-9-]{2,}$)/.test(f)),c=l!==-1;if(c){let f;for(let p=l+o;p>o;p--)if(!/^[\s\n ]*$/.test(a[p])){f=p;break}return f||(f=o),await Nx(t,n,i?-1:f,c)}else return await Nx(t,n,a.length-1,c)}async function Nx(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t}
${e}`,posNum:-1};const a=t.split(`
`),o=a.slice(0,n+1).join(`
`),i=a.slice(n+1).join(`
`),l=i.trim().length>0;return{content:`${o}${!l&&!r||!o.endsWith(`
`)?`
`:""}${e}${(l||r?`
`:"")+i}`,posNum:n}}const iA=e=>e.split(/\r?\n/);async function $R(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof C.TFile)){new C.Notice(E("File not found for the given thino path"));return}await t.vault.delete(n)}async function ZR(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof C.TFile)){new C.Notice(E("File not found for the given thino path"));return}const a=(await t.vault.read(n)).split(`
`),o=a.findIndex(c=>c.includes(e.id));if(o===-1){new C.Notice(E("Thino not found"));return}const i=a.findIndex((c,f)=>f>o&&c.trim()==="");i===-1?a.splice(o,a.length-o):a.splice(o,i-o);const l=a.join(`
`);if(!l){new C.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),await t.vault.modify(n,l)}async function qR(e){const t=Le.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new C.Notice(E("File not found for the given thino path"));return}const r=await t.vault.read(n),a=JSON.parse(r),o=a.nodes,i=o.findIndex(p=>p.id===e.id);if(i===-1){new C.Notice(E("Thino not found"));return}o.splice(i,1);const l=a.edges;l.filter(p=>p.fromNode===e.id||p.toNode===e.id).forEach(p=>{const g=l.findIndex(y=>y.id===p.id);g!==-1&&l.splice(g,1)}),dt.setChangedByMemos(!0);const f=JSON.stringify(a,null,2);await t.vault.modify(n,f)}async function GR(e){tA()||new C.Notice(E("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}=Le.getState().dailyNotesState.app,r=e.path,a=t.getAbstractFileByPath(r);if(!a){new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings"));return}const o=await t.read(a),i=o.split(`
`),l=n.getFileCache(a),c=(l==null?void 0:l.listItems)||[],f=parseInt(e.id.slice(14));let p=f;function g(S,I){const M=[];for(const N in I)I[N]===S&&M.push(parseInt(N),...g(parseInt(N),I));return M}const y=D2(c),w=c.find(S=>S.position.start.line===f),T=g(f,y);if(T.length>0){const S=T.map(I=>{const M=c.find(N=>N.position.start.line===I);return M?M.position.end.line:-1});p=Math.max(...S,w.position.end.line)}else p=w.position.end.line;if(!o){new C.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),i.splice(f,p-f+1),await t.modify(a,i.join(`
`))}async function JR(){const{vault:e,metadataCache:t}=Le.getState().dailyNotesState.app,n=Le.getState().dailyNotesState.settings,a=cb()+"/"+n.DeleteFileName+".md",o=[],i=t.getFirstLinkpathDest("",a);if(i instanceof C.TFile){let l=await e.read(i),c=KR(l);if(c.length===0)return o;for(let f=0;f<c.length;f++){const p=c[f];if(/- /.test(p)){const y=QR(p).slice(0,13),w=C.moment(y,"YYYYMMDDHHmmss"),T=e_(c[f]),S=C.moment(T.slice(0,13),"YYYYMMDDHHmmss"),I=XR(c[f]);o.push({id:T,content:I,user_id:1,createdAt:w.format("YYYY/MM/DD HH:mm:SS"),updatedAt:w.format("YYYY/MM/DD HH:mm:SS"),deletedAt:S})}else continue}c=null,l=null}return o}const KR=e=>e.split(/\r?\n/),QR=e=>{var t;return(t=/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[1]},XR=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[2]},e_=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[4]};async function t_(e){const t=await Fp(Le.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await Ev(Le.getState().dailyNotesState.app,t)}const n_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Fp(t)||[],r=n.find(a=>a.id===e);if(r){const a=C.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=a,await Ev(t,n),a}else{new C.Notice(E("Query not found"));return}},r_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Fp(t)||[],r=n.find(a=>a.id===e);if(r){r.pinnedAt="",await Ev(t,n);return}else{new C.Notice(E("Query not found"));return}};function a_(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const a=r[1].trim(),o={};a.split(" ").forEach(l=>{const[c,f]=l.slice(1,-1).split("::");o[c]=f});for(const l of Object.keys(t))if(l!=="id"&&l!=="content"){if(l==="rowStatus"&&t.rowStatus==="ARCHIVED"){o.archived="true";continue}else if(l==="rowStatus"&&t.rowStatus==="NORMAL"){delete o.archived;continue}if(l==="deleted"&&t.deleted){const c=C.moment().format("YYYYMMDDHHmmss");o.deleted=c}else typeof t[l]=="boolean"?t[l]?o[l]="true":delete o[l]:t[l]&&(o[l]=t[l])}const i=Object.entries(o).map(([l,c])=>`[${l}::${c}]`).join(" ");return e.replace(n,`%% ${i} %%`)}async function js(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=n.getAbstractFileByPath(e.path);if(!a)return e;const o=C.moment();if(await r.processFrontMatter(a,i=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&dt.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?o.format("YYYY/MM/DD HH:mm:ss"):""),i.createdAt||(i.createdAt=o.format("YYYY/MM/DD HH:mm:ss")),i.updatedAt=o.format("YYYY/MM/DD HH:mm:ss")}),t.content){const i=await n.read(a);let l=i;const c=t.content.replace(/\$/g,"$$$$");l=i.replace(e.content,c),await n.modify(a,l)}return dt.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:C.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 jl(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=C.moment();let o="";try{o=await n.read(r)}catch(M){console.error(M),o=await n.cachedRead(r)}const i=o.split(/\r?\n/),l=i.findIndex(M=>M.includes(e.id)||e.webId&&M.includes(e.webId)),c=i[l];if(!c)return e;const f=a_(c,t);if(!c)return e;const p=f+`
`,g=i.findIndex((M,N)=>N>l&&M.trim()==="");let y="";g===-1&&(y=i.slice(l+1).join(`
`)),g!==-1&&(y=i.slice(l+1,g).join(`
`));let w=y;t!=null&&t.content&&(w=t.content.split(/\r?\n/).map(k=>"> "+k).join(`
`));const S=(p+w).split(/\r?\n/);i.splice(l,g?g-l:i.length-l,...S);const I=i.join(`
`);return await n.modify(r,I),dt.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:C.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 Ll(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=await n.read(r),o=JSON.parse(a),i=o.nodes.find(f=>f.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 l=C.moment();t.deleted!==void 0&&(i.deletedAt=t.deleted?l.format("YYYY/MM/DD HH:mm:ss"):""),i.updatedAt=l.format("YYYY/MM/DD HH:mm:ss");const c=JSON.stringify(o,null,2);return await n.modify(r,c),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:C.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?l.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Rl(e,t){var se;tA()||new C.Notice(E("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}=Le.getState().dailyNotesState.app,a=Le.getState().dailyNotesState.app,{settings:o}=Le.getState().dailyNotesState,i=e.id.toString().slice(0,14),l=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(i,"YYYYMMDDHHmmss"))?C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):C.moment(i,"YYYYMMDDHHmmss"),c=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(l,"day"),f=e.path,p=n.getAbstractFileByPath(f)||n.getAbstractFileByPath(e.path);if(!p)return new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")),e;const y=(await n.read(p)).split(`
`),w=r.getFileCache(p),T=(w==null?void 0:w.listItems)||[];if(T.length===0)return new C.Notice(E("Thino not found")),e;const S=parseInt(e.id.slice(14));let I=S;function M(ue,fe){const Z=[];for(const pe in fe)fe[pe]===ue&&Z.push(parseInt(pe),...M(parseInt(pe),fe));return Z}const N=D2(T),_=T.find(ue=>ue.position.start.line===S);if(!_)return new C.Notice(E("Thino not found")),e;const k=M(S,N);if(k.length>0){const ue=k.map(fe=>{const Z=T.find(pe=>pe.position.start.line===fe);return Z?Z.position.end.line:-1});I=Math.max(...ue,_.position.end.line)}else I=_.position.end.line;const R=y.slice(S,I+1);let L=R.join(`
`);const H=c?C.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);if(!L)return new C.Notice(E("Thino not found")),e;const U=a.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,z=U?1:a.vault.getConfig("tabSize"),$=(U?" ":" ").repeat(z);let X=H;if(o.DefaultTimePrefix!=="HH:mm"&&(X=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(o.DefaultTimePrefix)),t.content){const ue=e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",fe=(e.pinned?" [pinned::true]":"")+(e.deletedAt?` [deleted::${e.deletedAt}]`:"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.webId?" [webId::"+e.webId+"]":""),Z=t.content.trim().split(`
`)[t.content.trim().split(`
`).length-1].trim(),pe=e.hasId&&t.content.trim().split(`
`).length>1&&new RegExp(/(-|\*|\d{1,2}\.)\s/g).test(Z)?" ^"+e.hasId:" ";L=`${ue}${X}${pe}${t.content.trim().split(`
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(t.content)?`
`+$:""}${t.content.trim().split(`
`).join(`
`+$)}${/((-|\*|\d\.|>)\s|```)/g.test(t.content.split(`
`)[t.content.split(`
`).length-1])?`
`+$:" "}${fe.trim()}`}if(t.thinoType){const ue=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";L=L.replace(/^((- \[.\] )|((-|\*) ))/,ue)}if(t.rowStatus){const ue=t.rowStatus==="ARCHIVED"?"[archived::"+(t.rowStatus==="ARCHIVED"?"true":"false")+"]":"";L=L.includes("[archived::")?L.replace(/\[archived::(true|false)\]/,ue):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue}if(t.visibility){const ue='[visibility::"'+t.visibility+'"]';L=L.includes("[visibility::")?L.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/g,ue):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue}if(t.pinned!==void 0){const ue=t.pinned?"[pinned::"+(t.pinned?"true":"false")+"]":"";L=L.includes("[pinned::")?L.replace(/\[pinned::(true|false)\]/,t.pinned===!1?"":ue):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue}if(t.webId!==void 0){const ue="[webId::"+t.webId+"]";L=L.includes("[webId::")?L.replace(/\[webId::([^\]]+)\]/,t.webId===""?"":ue):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue}const Q=C.moment();if(t.deleted!==void 0){const ue="[deleted::"+Q.format("YYYYMMDDHHmmss")+"]";t.deleted?(L=L.replace(/\[deleted::([^\]]+)\]/,""),L=L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue):t.deleted===!1&&(L=L.replace(/\[deleted::([^\]]+)\]/,""))}if(e.hasId&&((se=t.content)==null?void 0:se.split(`
`).length)===1){const ue=" ^"+e.hasId;L=L.trim().replace(/\s\^([0-9a-zA-Z-]+)($|\n)/g,"")+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(`
`)[L.split(`
`).length-1])?`
`+$:" "}`+ue}return L!==R.join(`
`)?(y.splice(S,I-_.position.start.line+1,L.trim()),await n.modify(p,y.join(`
`)),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:C.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?Q.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}):e}async function o_(e,t,n){var M;const{vault:r,metadataCache:a}=Le.getState().dailyNotesState.app||window.app,o=r.getFileByPath(e);if(!o)return;const i=((M=a.getFileCache(o))==null?void 0:M.listItems)||[],l=D2(i),c=[],f=r.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,p=f?1:r.getConfig("tabSize"),g=(f?" ":" ").repeat(p);function y(N,_){const k=[];for(const R in _)_[R]===N&&k.push(parseInt(R),...y(parseInt(R),_));return k}const w=C.moment(),T=t.map(N=>{const _=i.find(H=>H.position.start.line===parseInt(N.id.slice(14))),R=y(parseInt(N.id.slice(14)),l).map(H=>{const U=i.find(z=>z.position.start.line===H);return U?U.position.end.line:-1}),L=Math.max(...R,_.position.end.line);return{id:N.id,start:_.position.start.line,end:L}}),I=(await r.read(o)).split(`
`);return T.forEach(N=>{const k=I.slice(N.start,N.end+1).join(`
`),L=k.split(`
`)[k.split(`
`).length-1].trim();let H=k;if(n==="delete"){const U="[deleted::"+w.format("YYYYMMDDHHmmss")+"]";H=H.replace(/\[deleted::([^\]]+)\]/,""),H=k+`${k.split(`
`).length>1&&/```/g.test(L)?`
`+g:" "}`+U}if(n==="restoreFromDelete"&&(H=H.replace(/ ?\[deleted::([^\]]+)\]/,"")),n==="archive"){const U="[archived::true]";H=H.includes("[archived::")?H.replace(/\[archived::(true|false)\]/,U):H+`${H.split(`
`).length>1&&/```/g.test(L)?`
`+g:" "}`+U}n==="restoreFromArchive"&&(H=H.replace(/ ?\[archived::(true|false)\]/,"")),n==="deleteForever"?I.splice(N.start,N.end-N.start+1):I.splice(N.start,N.end-N.start+1,H),c.push({...t.find(U=>U.id===N.id),deletedAt:n==="delete"?w.format("YYYY/MM/DD HH:mm:ss"):"",rowStatus:n==="archive"?"ARCHIVED":"NORMAL"})}),await r.modify(o,I.join(`
`)),dt.setChangedByMemos(!0),c}const i_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return Ll(e,{id:e.id,pinned:!0});case"DAILY":return Rl(e,{id:e.id,pinned:!0});case"MULTI":return js(e,{id:e.id,pinned:!0});case"FILE":return jl(e,{id:e.id,pinned:!0})}},s_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return Ll(e,{id:e.id,pinned:!1});case"DAILY":return Rl(e,{id:e.id,pinned:!1});case"MULTI":return js(e,{id:e.id,pinned:!1});case"FILE":return jl(e,{id:e.id,pinned:!1})}};var sT;(e=>{async function t(S){return await Cx(S)}e.getMyMemos=t;async function n(S){return await Cx([S])}e.updateSpecificTypeMemo=n;function r(){return JR()}e.getMyDeletedMemos=r;function a(S){const I=be.getMemoById(S);if(I)switch(I==null?void 0:I.sourceType){case"DAILY":return Rl(I,{id:I.id,deleted:!1});case"CANVAS":return Ll(I,{id:I.id,deleted:!1});case"MULTI":return js(I,{id:I.id,deleted:!1});case"FILE":return jl(I,{id:I.id,deleted:!1})}}e.restoreMemo=a;function o(S){return ZR(S)}e.deleteMemoInSingleFile=o;function i(S){return $R(S)}e.deleteMemoInMultiFiles=i;function l(S){return GR(S)}e.deleteMemoInDailyNote=l;function c(S){return qR(S)}e.deleteMemoInCanvas=c;function f(){return cR()}e.getMyQueries=f;async function p(S,I){return await fR(S,I)}e.createQuery=p;function g(S,I,M){return AR(S,I,M)}e.updateQuery=g;function y(S){return t_(S)}e.deleteQueryById=y;function w(S){return n_(S)}e.pinQuery=w;function T(S){return r_(S)}e.unpinQuery=T})(sT||(sT={}));const Ko=sT;var qu={};Object.defineProperty(qu,"__esModule",{value:!0});class kf extends Error{}class l_ extends kf{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class u_ extends kf{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class c_ extends kf{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Ng extends kf{}class sA extends kf{constructor(t){super(`Invalid unit ${t}`)}}class Xi extends kf{}class _c extends kf{constructor(){super("Zone is an abstract class")}}const gt="numeric",Us="short",Mi="long",Dw={year:gt,month:gt,day:gt},lA={year:gt,month:Us,day:gt},d_={year:gt,month:Us,day:gt,weekday:Us},uA={year:gt,month:Mi,day:gt},cA={year:gt,month:Mi,day:gt,weekday:Mi},dA={hour:gt,minute:gt},fA={hour:gt,minute:gt,second:gt},hA={hour:gt,minute:gt,second:gt,timeZoneName:Us},pA={hour:gt,minute:gt,second:gt,timeZoneName:Mi},mA={hour:gt,minute:gt,hourCycle:"h23"},gA={hour:gt,minute:gt,second:gt,hourCycle:"h23"},vA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Us},yA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Mi},wA={year:gt,month:gt,day:gt,hour:gt,minute:gt},bA={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},SA={year:gt,month:Us,day:gt,hour:gt,minute:gt},DA={year:gt,month:Us,day:gt,hour:gt,minute:gt,second:gt},f_={year:gt,month:Us,day:gt,weekday:Us,hour:gt,minute:gt},TA={year:gt,month:Mi,day:gt,hour:gt,minute:gt,timeZoneName:Us},IA={year:gt,month:Mi,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:Us},EA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,timeZoneName:Mi},xA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,second:gt,timeZoneName:Mi};class Cv{get type(){throw new _c}get name(){throw new _c}get ianaName(){return this.name}get isUniversal(){throw new _c}offsetName(t,n){throw new _c}formatOffset(t,n){throw new _c}offset(t){throw new _c}equals(t){throw new _c}get isValid(){throw new _c}}let vS=null;class hb extends Cv{static get instance(){return vS===null&&(vS=new hb),vS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return MA(t,n,r)}formatOffset(t,n){return Rg(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Q0={};function h_(e){return Q0[e]||(Q0[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Q0[e]}const p_={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function m_(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,a,o,i,l,c,f,p]=r;return[i,a,o,l,c,f,p]}function g_(e,t){const n=e.formatToParts(t),r=[];for(let a=0;a<n.length;a++){const{type:o,value:i}=n[a],l=p_[o];o==="era"?r[l]=i:xn(l)||(r[l]=parseInt(i,10))}return r}let m0={};class Hu extends Cv{static create(t){return m0[t]||(m0[t]=new Hu(t)),m0[t]}static resetCache(){m0={},Q0={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Hu.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return MA(t,n,r,this.name)}formatOffset(t,n){return Rg(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=h_(this.name);let[a,o,i,l,c,f,p]=r.formatToParts?g_(r,n):m_(r,n);l==="BC"&&(a=-Math.abs(a)+1);const y=C2({year:a,month:o,day:i,hour:c===24?0:c,minute:f,second:p,millisecond:0});let w=+n;const T=w%1e3;return w-=T>=0?T:1e3+T,(y-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let Ax={};function v_(e,t={}){const n=JSON.stringify([e,t]);let r=Ax[n];return r||(r=new Intl.ListFormat(e,t),Ax[n]=r),r}let lT={};function uT(e,t={}){const n=JSON.stringify([e,t]);let r=lT[n];return r||(r=new Intl.DateTimeFormat(e,t),lT[n]=r),r}let cT={};function y_(e,t={}){const n=JSON.stringify([e,t]);let r=cT[n];return r||(r=new Intl.NumberFormat(e,t),cT[n]=r),r}let dT={};function w_(e,t={}){const{base:n,...r}=t,a=JSON.stringify([e,r]);let o=dT[a];return o||(o=new Intl.RelativeTimeFormat(e,t),dT[a]=o),o}let Ag=null;function b_(){return Ag||(Ag=new Intl.DateTimeFormat().resolvedOptions().locale,Ag)}function S_(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,a;try{r=uT(e).resolvedOptions(),a=e}catch{const c=e.substring(0,n);r=uT(c).resolvedOptions(),a=c}const{numberingSystem:o,calendar:i}=r;return[a,o,i]}}function D_(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function T_(e){const t=[];for(let n=1;n<=12;n++){const r=At.utc(2016,n,1);t.push(e(r))}return t}function I_(e){const t=[];for(let n=1;n<=7;n++){const r=At.utc(2016,11,13+n);t.push(e(r))}return t}function g0(e,t,n,r,a){const o=e.listingMode(n);return o==="error"?null:o==="en"?r(t):a(t)}function E_(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class x_{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:a,floor:o,...i}=r;if(!n||Object.keys(i).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=y_(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):x2(t,3);return Xr(n,this.padTo)}}}class C_{constructor(t,n,r){this.opts=r;let a;if(t.zone.isUniversal){const i=-1*(t.offset/60),l=i>=0?`Etc/GMT+${i}`:`Etc/GMT${i}`;t.offset!==0&&Hu.create(l).valid?(a=l,this.dt=t):(a="UTC",r.timeZoneName?this.dt=t:this.dt=t.offset===0?t:At.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,a=t.zone.name);const o={...this.opts};o.timeZone=o.timeZone||a,this.dtf=uT(n,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class M_{constructor(t,n,r){this.opts={style:"long",...r},!n&&CA()&&(this.rtf=w_(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):W_(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class ur{static fromOpts(t){return ur.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,a=!1){const o=t||Qr.defaultLocale,i=o||(a?"en-US":b_()),l=n||Qr.defaultNumberingSystem,c=r||Qr.defaultOutputCalendar;return new ur(i,l,c,o)}static resetCache(){Ag=null,lT={},cT={},dT={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return ur.create(t,n,r)}constructor(t,n,r,a){const[o,i,l]=S_(t);this.locale=o,this.numberingSystem=n||i||null,this.outputCalendar=r||l||null,this.intl=D_(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=E_(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:ur.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,r=!0){return g0(this,t,r,AA,()=>{const a=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=T_(i=>this.extract(i,a,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1,r=!0){return g0(this,t,r,PA,()=>{const a=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=I_(i=>this.extract(i,a,"weekday"))),this.weekdaysCache[o][t]})}meridiems(t=!0){return g0(this,void 0,t,()=>jA,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[At.utc(2016,11,13,9),At.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return g0(this,t,n,LA,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[At.utc(-40,1,1),At.utc(2017,1,1)].map(a=>this.extract(a,r,"era"))),this.eraCache[t]})}extract(t,n,r){const a=this.dtFormatter(t,n),o=a.formatToParts(),i=o.find(l=>l.type.toLowerCase()===r);return i?i.value:null}numberFormatter(t={}){return new x_(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new C_(t,this.intl,n)}relFormatter(t={}){return new M_(this.intl,this.isEnglish(),t)}listFormatter(t={}){return v_(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let yS=null;class ko extends Cv{static get utcInstance(){return yS===null&&(yS=new ko(0)),yS}static instance(t){return t===0?ko.utcInstance:new ko(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ko(mb(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Rg(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Rg(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Rg(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class k_ extends Cv{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Zc(e,t){if(xn(e)||e===null)return t;if(e instanceof Cv)return e;if(N_(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?hb.instance:n==="utc"||n==="gmt"?ko.utcInstance:ko.parseSpecifier(n)||Hu.create(e)}else return cf(e)?ko.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new k_(e)}let Fx=()=>Date.now(),Ox="system",Px=null,jx=null,Lx=null,Rx=60,_x;class Qr{static get now(){return Fx}static set now(t){Fx=t}static set defaultZone(t){Ox=t}static get defaultZone(){return Zc(Ox,hb.instance)}static get defaultLocale(){return Px}static set defaultLocale(t){Px=t}static get defaultNumberingSystem(){return jx}static set defaultNumberingSystem(t){jx=t}static get defaultOutputCalendar(){return Lx}static set defaultOutputCalendar(t){Lx=t}static get twoDigitCutoffYear(){return Rx}static set twoDigitCutoffYear(t){Rx=t%100}static get throwOnInvalid(){return _x}static set throwOnInvalid(t){_x=t}static resetCaches(){ur.resetCache(),Hu.resetCache()}}function xn(e){return typeof e>"u"}function cf(e){return typeof e=="number"}function pb(e){return typeof e=="number"&&e%1===0}function N_(e){return typeof e=="string"}function A_(e){return Object.prototype.toString.call(e)==="[object Date]"}function CA(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function F_(e){return Array.isArray(e)?e:[e]}function Bx(e,t,n){if(e.length!==0)return e.reduce((r,a)=>{const o=[t(a),a];return r&&n(r[0],o[0])===r[0]?r:o},null)[1]}function O_(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function gp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _u(e,t,n){return pb(e)&&e>=t&&e<=n}function P_(e,t){return e-t*Math.floor(e/t)}function Xr(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function $c(e){if(!(xn(e)||e===null||e===""))return parseInt(e,10)}function Kd(e){if(!(xn(e)||e===null||e===""))return parseFloat(e)}function E2(e){if(!(xn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function x2(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Mv(e){return e%4===0&&(e%100!==0||e%400===0)}function Lg(e){return Mv(e)?366:365}function Tw(e,t){const n=P_(t-1,12)+1,r=e+(t-n)/12;return n===2?Mv(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function C2(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function Iw(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||r===3?53:52}function fT(e){return e>99?e:e>Qr.twoDigitCutoffYear?1900+e:2e3+e}function MA(e,t,n,r=null){const a=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const i={timeZoneName:t,...o},l=new Intl.DateTimeFormat(n,i).formatToParts(a).find(c=>c.type.toLowerCase()==="timezonename");return l?l.value:null}function mb(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,a=n<0||Object.is(n,-0)?-r:r;return n*60+a}function kA(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Xi(`Invalid unit value ${e}`);return t}function Ew(e,t){const n={};for(const r in e)if(gp(e,r)){const a=e[r];if(a==null)continue;n[t(r)]=kA(a)}return n}function Rg(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return`${a}${Xr(n,2)}:${Xr(r,2)}`;case"narrow":return`${a}${n}${r>0?`:${r}`:""}`;case"techie":return`${a}${Xr(n,2)}${Xr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function gb(e){return O_(e,["hour","minute","second","millisecond"])}const j_=["January","February","March","April","May","June","July","August","September","October","November","December"],NA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],L_=["J","F","M","A","M","J","J","A","S","O","N","D"];function AA(e){switch(e){case"narrow":return[...L_];case"short":return[...NA];case"long":return[...j_];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const FA=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],OA=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],R_=["M","T","W","T","F","S","S"];function PA(e){switch(e){case"narrow":return[...R_];case"short":return[...OA];case"long":return[...FA];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const jA=["AM","PM"],__=["Before Christ","Anno Domini"],B_=["BC","AD"],H_=["B","A"];function LA(e){switch(e){case"narrow":return[...H_];case"short":return[...B_];case"long":return[...__];default:return null}}function Y_(e){return jA[e.hour<12?0:1]}function U_(e,t){return PA(t)[e.weekday-1]}function z_(e,t){return AA(t)[e.month-1]}function V_(e,t){return LA(t)[e.year<0?0:1]}function W_(e,t,n="always",r=!1){const a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&o){const g=e==="days";switch(t){case 1:return g?"tomorrow":`next ${a[e][0]}`;case-1:return g?"yesterday":`last ${a[e][0]}`;case 0:return g?"today":`this ${a[e][0]}`}}const i=Object.is(t,-0)||t<0,l=Math.abs(t),c=l===1,f=a[e],p=r?c?f[1]:f[2]||f[1]:c?a[e][0]:e;return i?`${l} ${p} ago`:`in ${l} ${p}`}function Hx(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const $_={D:Dw,DD:lA,DDD:uA,DDDD:cA,t:dA,tt:fA,ttt:hA,tttt:pA,T:mA,TT:gA,TTT:vA,TTTT:yA,f:wA,ff:SA,fff:TA,ffff:EA,F:bA,FF:DA,FFF:IA,FFFF:xA};class uo{static create(t,n={}){return new uo(t,n)}static parseFormat(t){let n=null,r="",a=!1;const o=[];for(let i=0;i<t.length;i++){const l=t.charAt(i);l==="'"?(r.length>0&&o.push({literal:a,val:r}),n=null,r="",a=!a):a||l===n?r+=l:(r.length>0&&o.push({literal:!1,val:r}),r=l,n=l)}return r.length>0&&o.push({literal:a,val:r}),o}static macroTokenToFormatOpts(t){return $_[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Xr(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(w,T)=>this.loc.extract(t,w,T),i=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",l=()=>r?Y_(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(w,T)=>r?z_(t,w):o(T?{month:w}:{month:w,day:"numeric"},"month"),f=(w,T)=>r?U_(t,w):o(T?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),p=w=>{const T=uo.macroTokenToFormatOpts(w);return T?this.formatWithSystemDefault(t,T):w},g=w=>r?V_(t,w):o({era:w},"era"),y=w=>{switch(w){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return a?o({day:"numeric"},"day"):this.num(t.day);case"dd":return a?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return a?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return a?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return a?o({month:"numeric"},"month"):this.num(t.month);case"MM":return a?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return a?o({year:"numeric"},"year"):this.num(t.year);case"yy":return a?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return a?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return a?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return p(w)}};return Hx(uo.parseFormat(n),y)}formatDurationFromString(t,n){const r=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},a=c=>f=>{const p=r(f);return p?this.num(c.get(p),f.length):f},o=uo.parseFormat(n),i=o.reduce((c,{literal:f,val:p})=>f?c:c.concat(p),[]),l=t.shiftTo(...i.map(r).filter(c=>c));return Hx(o,a(l))}}class Bs{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const RA=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function jp(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function Lp(...e){return t=>e.reduce(([n,r,a],o)=>{const[i,l,c]=o(t,a);return[{...n,...i},l||r,c]},[{},null,1]).slice(0,2)}function Rp(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const a=n.exec(e);if(a)return r(a)}return[null,null]}function _A(...e){return(t,n)=>{const r={};let a;for(a=0;a<e.length;a++)r[e[a]]=$c(t[n+a]);return[r,null,n+a]}}const BA=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Z_=`(?:${BA.source}?(?:\\[(${RA.source})\\])?)?`,M2=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,HA=RegExp(`${M2.source}${Z_}`),k2=RegExp(`(?:T${HA.source})?`),q_=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,G_=/(\d{4})-?W(\d\d)(?:-?(\d))?/,J_=/(\d{4})-?(\d{3})/,K_=_A("weekYear","weekNumber","weekDay"),Q_=_A("year","ordinal"),X_=/(\d{4})-(\d\d)-(\d\d)/,YA=RegExp(`${M2.source} ?(?:${BA.source}|(${RA.source}))?`),eB=RegExp(`(?: ${YA.source})?`);function hp(e,t,n){const r=e[t];return xn(r)?n:$c(r)}function tB(e,t){return[{year:hp(e,t),month:hp(e,t+1,1),day:hp(e,t+2,1)},null,t+3]}function _p(e,t){return[{hours:hp(e,t,0),minutes:hp(e,t+1,0),seconds:hp(e,t+2,0),milliseconds:E2(e[t+3])},null,t+4]}function kv(e,t){const n=!e[t]&&!e[t+1],r=mb(e[t+1],e[t+2]),a=n?null:ko.instance(r);return[{},a,t+3]}function Nv(e,t){const n=e[t]?Hu.create(e[t]):null;return[{},n,t+1]}const nB=RegExp(`^T?${M2.source}$`),rB=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function aB(e){const[t,n,r,a,o,i,l,c,f]=e,p=t[0]==="-",g=c&&c[0]==="-",y=(w,T=!1)=>w!==void 0&&(T||w&&p)?-w:w;return[{years:y(Kd(n)),months:y(Kd(r)),weeks:y(Kd(a)),days:y(Kd(o)),hours:y(Kd(i)),minutes:y(Kd(l)),seconds:y(Kd(c),c==="-0"),milliseconds:y(E2(f),g)}]}const oB={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function N2(e,t,n,r,a,o,i){const l={year:t.length===2?fT($c(t)):$c(t),month:NA.indexOf(n)+1,day:$c(r),hour:$c(a),minute:$c(o)};return i&&(l.second=$c(i)),e&&(l.weekday=e.length>3?FA.indexOf(e)+1:OA.indexOf(e)+1),l}const iB=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function sB(e){const[,t,n,r,a,o,i,l,c,f,p,g]=e,y=N2(t,a,r,n,o,i,l);let w;return c?w=oB[c]:f?w=0:w=mb(p,g),[y,new ko(w)]}function lB(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const uB=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,cB=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,dB=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Yx(e){const[,t,n,r,a,o,i,l]=e;return[N2(t,a,r,n,o,i,l),ko.utcInstance]}function fB(e){const[,t,n,r,a,o,i,l]=e;return[N2(t,l,n,r,a,o,i),ko.utcInstance]}const hB=jp(q_,k2),pB=jp(G_,k2),mB=jp(J_,k2),gB=jp(HA),UA=Lp(tB,_p,kv,Nv),vB=Lp(K_,_p,kv,Nv),yB=Lp(Q_,_p,kv,Nv),wB=Lp(_p,kv,Nv);function bB(e){return Rp(e,[hB,UA],[pB,vB],[mB,yB],[gB,wB])}function SB(e){return Rp(lB(e),[iB,sB])}function DB(e){return Rp(e,[uB,Yx],[cB,Yx],[dB,fB])}function TB(e){return Rp(e,[rB,aB])}const IB=Lp(_p);function EB(e){return Rp(e,[nB,IB])}const xB=jp(X_,eB),CB=jp(YA),MB=Lp(_p,kv,Nv);function kB(e){return Rp(e,[xB,UA],[CB,MB])}const NB="Invalid Duration",zA={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},AB={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...zA},Qi=146097/400,Jh=146097/4800,FB={years:{quarters:4,months:12,weeks:Qi/7,days:Qi,hours:Qi*24,minutes:Qi*24*60,seconds:Qi*24*60*60,milliseconds:Qi*24*60*60*1e3},quarters:{months:3,weeks:Qi/28,days:Qi/4,hours:Qi*24/4,minutes:Qi*24*60/4,seconds:Qi*24*60*60/4,milliseconds:Qi*24*60*60*1e3/4},months:{weeks:Jh/7,days:Jh,hours:Jh*24,minutes:Jh*24*60,seconds:Jh*24*60*60,milliseconds:Jh*24*60*60*1e3},...zA},tf=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],OB=tf.slice(0).reverse();function Bc(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new bt(r)}function PB(e){return e<0?Math.floor(e):Math.ceil(e)}function VA(e,t,n,r,a){const o=e[a][n],i=t[n]/o,l=Math.sign(i)===Math.sign(r[a]),c=!l&&r[a]!==0&&Math.abs(i)<=1?PB(i):Math.trunc(i);r[a]+=c,t[n]-=c*o}function jB(e,t){OB.reduce((n,r)=>xn(t[r])?n:(n&&VA(e,t,n,t,r),r),null)}function LB(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class bt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?FB:AB;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ur.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return bt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Xi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new bt({values:Ew(t,bt.normalizeUnit),loc:ur.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(cf(t))return bt.fromMillis(t);if(bt.isDuration(t))return t;if(typeof t=="object")return bt.fromObject(t);throw new Xi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=TB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=EB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the Duration is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new c_(r);return new bt({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new sA(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?uo.create(this.loc,r).formatDurationFromString(this,t):NB}toHuman(t={}){const n=tf.map(r=>{const a=this.values[r];return xn(a)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(a)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=x2(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let a=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(a+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||r.milliseconds!==0)&&(a+=".SSS"));let o=r.toFormat(a);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t),r={};for(const a of tf)(gp(n.values,a)||gp(this.values,a))&&(r[a]=n.get(a)+this.get(a));return Bc(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=kA(t(this.values[r],r));return Bc(this,{values:n},!0)}get(t){return this[bt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Ew(t,bt.normalizeUnit)};return Bc(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:a}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:a,conversionAccuracy:r};return Bc(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return jB(this.matrix,t),Bc(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=LB(this.normalize().shiftToAll().toObject());return Bc(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(i=>bt.normalizeUnit(i));const n={},r={},a=this.toObject();let o;for(const i of tf)if(t.indexOf(i)>=0){o=i;let l=0;for(const f in r)l+=this.matrix[f][i]*r[f],r[f]=0;cf(a[i])&&(l+=a[i]);const c=Math.trunc(l);n[i]=c,r[i]=(l*1e3-c*1e3)/1e3;for(const f in a)tf.indexOf(f)>tf.indexOf(i)&&VA(this.matrix,a,f,n,i)}else cf(a[i])&&(r[i]=a[i]);for(const i in r)r[i]!==0&&(n[o]+=i===o?r[i]:r[i]/this.matrix[o][i]);return Bc(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Bc(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,a){return r===void 0||r===0?a===void 0||a===0:r===a}for(const r of tf)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Kh="Invalid Interval";function RB(e,t){return!e||!e.isValid?Or.invalid("missing or invalid start"):!t||!t.isValid?Or.invalid("missing or invalid end"):t<e?Or.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Or{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the Interval is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new u_(r);return new Or({invalid:r})}static fromDateTimes(t,n){const r=mg(t),a=mg(n),o=RB(r,a);return o??new Or({start:r,end:a})}static after(t,n){const r=bt.fromDurationLike(n),a=mg(t);return Or.fromDateTimes(a,a.plus(r))}static before(t,n){const r=bt.fromDurationLike(n),a=mg(t);return Or.fromDateTimes(a.minus(r),a)}static fromISO(t,n){const[r,a]=(t||"").split("/",2);if(r&&a){let o,i;try{o=At.fromISO(r,n),i=o.isValid}catch{i=!1}let l,c;try{l=At.fromISO(a,n),c=l.isValid}catch{c=!1}if(i&&c)return Or.fromDateTimes(o,l);if(i){const f=bt.fromISO(a,n);if(f.isValid)return Or.after(o,f)}else if(c){const f=bt.fromISO(r,n);if(f.isValid)return Or.before(l,f)}}return Or.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const n=this.start.startOf(t),r=this.end.startOf(t);return Math.floor(r.diff(n,t).get(t))+1}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Or.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(mg).filter(i=>this.contains(i)).sort(),r=[];let{s:a}=this,o=0;for(;a<this.e;){const i=n[o]||this.e,l=+i>+this.e?this.e:i;r.push(Or.fromDateTimes(a,l)),a=l,o+=1}return r}splitBy(t){const n=bt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,a=1,o;const i=[];for(;r<this.e;){const l=this.start.plus(n.mapUnits(c=>c*a));o=+l>+this.e?this.e:l,i.push(Or.fromDateTimes(r,o)),r=o,a+=1}return i}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Or.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Or.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((a,o)=>a.s-o.s).reduce(([a,o],i)=>o?o.overlaps(i)||o.abutsStart(i)?[a,o.union(i)]:[a.concat([o]),i]:[a,i],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const a=[],o=t.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),i=Array.prototype.concat(...o),l=i.sort((c,f)=>c.time-f.time);for(const c of l)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&a.push(Or.fromDateTimes(n,c.time)),n=null);return Or.merge(a)}difference(...t){return Or.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} ${this.e.toISO()})`:Kh}toLocaleString(t=Dw,n={}){return this.isValid?uo.create(this.s.loc.clone(n),t).formatInterval(this):Kh}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Kh}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Kh}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Kh}toFormat(t,{separator:n=" "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Kh}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):bt.invalid(this.invalidReason)}mapEndpoints(t){return Or.fromDateTimes(t(this.s),t(this.e))}}class v0{static hasDST(t=Qr.defaultZone){const n=At.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Hu.isValidZone(t)}static normalizeZone(t){return Zc(t,Qr.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ur.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ur.create(n,null,"gregory").eras(t)}static features(){return{relative:CA()}}}function Ux(e,t){const n=a=>a.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bt.fromMillis(r).as("days"))}function _B(e,t,n){const r=[["years",(c,f)=>f.year-c.year],["quarters",(c,f)=>f.quarter-c.quarter+(f.year-c.year)*4],["months",(c,f)=>f.month-c.month+(f.year-c.year)*12],["weeks",(c,f)=>{const p=Ux(c,f);return(p-p%7)/7}],["days",Ux]],a={},o=e;let i,l;for(const[c,f]of r)n.indexOf(c)>=0&&(i=c,a[c]=f(e,t),l=o.plus(a),l>t?(a[c]--,e=o.plus(a)):e=l);return[e,a,l,i]}function BB(e,t,n,r){let[a,o,i,l]=_B(e,t,n);const c=t-a,f=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);f.length===0&&(i<t&&(i=a.plus({[l]:1})),i!==a&&(o[l]=(o[l]||0)+c/(i-a)));const p=bt.fromObject(o,r);return f.length>0?bt.fromMillis(c,r).shiftTo(...f).plus(p):p}const A2={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},zx={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},HB=A2.hanidec.replace(/[\[|\]]/g,"").split("");function YB(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(A2.hanidec)!==-1)t+=HB.indexOf(e[n]);else for(const a in zx){const[o,i]=zx[a];r>=o&&r<=i&&(t+=r-o)}}return parseInt(t,10)}else return t}function Fs({numberingSystem:e},t=""){return new RegExp(`${A2[e||"latn"]}${t}`)}const UB="missing Intl.DateTimeFormat.formatToParts support";function Ln(e,t=n=>n){return{regex:e,deser:([n])=>t(YB(n))}}const zB=" ",WA=`[ ${zB}]`,$A=new RegExp(WA,"g");function VB(e){return e.replace(/\./g,"\\.?").replace($A,WA)}function Vx(e){return e.replace(/\./g,"").replace($A," ").toLowerCase()}function Os(e,t){return e===null?null:{regex:RegExp(e.map(VB).join("|")),deser:([n])=>e.findIndex(r=>Vx(n)===Vx(r))+t}}function Wx(e,t){return{regex:e,deser:([,n,r])=>mb(n,r),groups:t}}function wS(e){return{regex:e,deser:([t])=>t}}function WB(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function $B(e,t){const n=Fs(t),r=Fs(t,"{2}"),a=Fs(t,"{3}"),o=Fs(t,"{4}"),i=Fs(t,"{6}"),l=Fs(t,"{1,2}"),c=Fs(t,"{1,3}"),f=Fs(t,"{1,6}"),p=Fs(t,"{1,9}"),g=Fs(t,"{2,4}"),y=Fs(t,"{4,6}"),w=I=>({regex:RegExp(WB(I.val)),deser:([M])=>M,literal:!0}),S=(I=>{if(e.literal)return w(I);switch(I.val){case"G":return Os(t.eras("short",!1),0);case"GG":return Os(t.eras("long",!1),0);case"y":return Ln(f);case"yy":return Ln(g,fT);case"yyyy":return Ln(o);case"yyyyy":return Ln(y);case"yyyyyy":return Ln(i);case"M":return Ln(l);case"MM":return Ln(r);case"MMM":return Os(t.months("short",!0,!1),1);case"MMMM":return Os(t.months("long",!0,!1),1);case"L":return Ln(l);case"LL":return Ln(r);case"LLL":return Os(t.months("short",!1,!1),1);case"LLLL":return Os(t.months("long",!1,!1),1);case"d":return Ln(l);case"dd":return Ln(r);case"o":return Ln(c);case"ooo":return Ln(a);case"HH":return Ln(r);case"H":return Ln(l);case"hh":return Ln(r);case"h":return Ln(l);case"mm":return Ln(r);case"m":return Ln(l);case"q":return Ln(l);case"qq":return Ln(r);case"s":return Ln(l);case"ss":return Ln(r);case"S":return Ln(c);case"SSS":return Ln(a);case"u":return wS(p);case"uu":return wS(l);case"uuu":return Ln(n);case"a":return Os(t.meridiems(),0);case"kkkk":return Ln(o);case"kk":return Ln(g,fT);case"W":return Ln(l);case"WW":return Ln(r);case"E":case"c":return Ln(n);case"EEE":return Os(t.weekdays("short",!1,!1),1);case"EEEE":return Os(t.weekdays("long",!1,!1),1);case"ccc":return Os(t.weekdays("short",!0,!1),1);case"cccc":return Os(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Wx(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return Wx(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return wS(/[a-z_+-/]{1,256}?/i);default:return w(I)}})(e)||{invalidReason:UB};return S.token=e,S}const ZB={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function qB(e,t){const{type:n,value:r}=e;if(n==="literal")return{literal:!0,val:r};const a=t[n];let o=ZB[n];if(typeof o=="object"&&(o=o[a]),o)return{literal:!1,val:o}}function GB(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function JB(e,t,n){const r=e.match(t);if(r){const a={};let o=1;for(const i in n)if(gp(n,i)){const l=n[i],c=l.groups?l.groups+1:1;!l.literal&&l.token&&(a[l.token.val[0]]=l.deser(r.slice(o,o+c))),o+=c}return[r,a]}else return[r,{}]}function KB(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return xn(e.z)||(n=Hu.create(e.z)),xn(e.Z)||(n||(n=new ko(e.Z)),r=e.Z),xn(e.q)||(e.M=(e.q-1)*3+1),xn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),xn(e.u)||(e.S=E2(e.u)),[Object.keys(e).reduce((o,i)=>{const l=t(i);return l&&(o[l]=e[i]),o},{}),n,r]}let bS=null;function QB(){return bS||(bS=At.fromMillis(1555555555555)),bS}function XB(e,t){if(e.literal)return e;const n=uo.macroTokenToFormatOpts(e.val),r=GA(n,t);return r==null||r.includes(void 0)?e:r}function ZA(e,t){return Array.prototype.concat(...e.map(n=>XB(n,t)))}function qA(e,t,n){const r=ZA(uo.parseFormat(n),e),a=r.map(i=>$B(i,e)),o=a.find(i=>i.invalidReason);if(o)return{input:t,tokens:r,invalidReason:o.invalidReason};{const[i,l]=GB(a),c=RegExp(i,"i"),[f,p]=JB(t,c,l),[g,y,w]=p?KB(p):[null,null,void 0];if(gp(p,"a")&&gp(p,"H"))throw new Ng("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:c,rawMatches:f,matches:p,result:g,zone:y,specificOffset:w}}}function eH(e,t,n){const{result:r,zone:a,specificOffset:o,invalidReason:i}=qA(e,t,n);return[r,a,o,i]}function GA(e,t){return e?uo.create(t,e).formatDateTimeParts(QB()).map(a=>qB(a,e)):null}const JA=[0,31,59,90,120,151,181,212,243,273,304,334],KA=[0,31,60,91,121,152,182,213,244,274,305,335];function es(e,t){return new Bs("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function QA(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const a=r.getUTCDay();return a===0?7:a}function XA(e,t,n){return n+(Mv(e)?KA:JA)[t-1]}function e6(e,t){const n=Mv(e)?KA:JA,r=n.findIndex(o=>o<t),a=t-n[r];return{month:r+1,day:a}}function hT(e){const{year:t,month:n,day:r}=e,a=XA(t,n,r),o=QA(t,n,r);let i=Math.floor((a-o+10)/7),l;return i<1?(l=t-1,i=Iw(l)):i>Iw(t)?(l=t+1,i=1):l=t,{weekYear:l,weekNumber:i,weekday:o,...gb(e)}}function $x(e){const{weekYear:t,weekNumber:n,weekday:r}=e,a=QA(t,1,4),o=Lg(t);let i=n*7+r-a-3,l;i<1?(l=t-1,i+=Lg(l)):i>o?(l=t+1,i-=Lg(t)):l=t;const{month:c,day:f}=e6(l,i);return{year:l,month:c,day:f,...gb(e)}}function SS(e){const{year:t,month:n,day:r}=e,a=XA(t,n,r);return{year:t,ordinal:a,...gb(e)}}function Zx(e){const{year:t,ordinal:n}=e,{month:r,day:a}=e6(t,n);return{year:t,month:r,day:a,...gb(e)}}function tH(e){const t=pb(e.weekYear),n=_u(e.weekNumber,1,Iw(e.weekYear)),r=_u(e.weekday,1,7);return t?n?r?!1:es("weekday",e.weekday):es("week",e.week):es("weekYear",e.weekYear)}function nH(e){const t=pb(e.year),n=_u(e.ordinal,1,Lg(e.year));return t?n?!1:es("ordinal",e.ordinal):es("year",e.year)}function t6(e){const t=pb(e.year),n=_u(e.month,1,12),r=_u(e.day,1,Tw(e.year,e.month));return t?n?r?!1:es("day",e.day):es("month",e.month):es("year",e.year)}function n6(e){const{hour:t,minute:n,second:r,millisecond:a}=e,o=_u(t,0,23)||t===24&&n===0&&r===0&&a===0,i=_u(n,0,59),l=_u(r,0,59),c=_u(a,0,999);return o?i?l?c?!1:es("millisecond",a):es("second",r):es("minute",n):es("hour",t)}const DS="Invalid DateTime",qx=864e13;function y0(e){return new Bs("unsupported zone",`the zone "${e.name}" is not supported`)}function TS(e){return e.weekData===null&&(e.weekData=hT(e.c)),e.weekData}function hg(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new At({...n,...t,old:n})}function r6(e,t,n){let r=e-t*60*1e3;const a=n.offset(r);if(t===a)return[r,t];r-=(a-t)*60*1e3;const o=n.offset(r);return a===o?[r,a]:[e-Math.min(a,o)*60*1e3,Math.max(a,o)]}function Gx(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function X0(e,t,n){return r6(C2(e),t,n)}function Jx(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:r,month:a,day:Math.min(e.c.day,Tw(r,a))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},i=bt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=C2(o);let[c,f]=r6(l,n,e.zone);return i!==0&&(c+=i,f=e.zone.offset(c)),{ts:c,o:f}}function pg(e,t,n,r,a,o){const{setZone:i,zone:l}=n;if(e&&Object.keys(e).length!==0){const c=t||l,f=At.fromObject(e,{...n,zone:c,specificOffset:o});return i?f:f.setZone(l)}else return At.invalid(new Bs("unparsable",`the input "${a}" can't be parsed as ${r}`))}function w0(e,t,n=!0){return e.isValid?uo.create(ur.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function IS(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Xr(e.c.year,n?6:4),t?(r+="-",r+=Xr(e.c.month),r+="-",r+=Xr(e.c.day)):(r+=Xr(e.c.month),r+=Xr(e.c.day)),r}function Kx(e,t,n,r,a,o){let i=Xr(e.c.hour);return t?(i+=":",i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=":")):i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=Xr(e.c.second),(e.c.millisecond!==0||!r)&&(i+=".",i+=Xr(e.c.millisecond,3))),a&&(e.isOffsetFixed&&e.offset===0&&!o?i+="Z":e.o<0?(i+="-",i+=Xr(Math.trunc(-e.o/60)),i+=":",i+=Xr(Math.trunc(-e.o%60))):(i+="+",i+=Xr(Math.trunc(e.o/60)),i+=":",i+=Xr(Math.trunc(e.o%60)))),o&&(i+="["+e.zone.ianaName+"]"),i}const a6={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rH={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},aH={ordinal:1,hour:0,minute:0,second:0,millisecond:0},o6=["year","month","day","hour","minute","second","millisecond"],oH=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],iH=["year","ordinal","hour","minute","second","millisecond"];function Qx(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new sA(e);return t}function Xx(e,t){const n=Zc(t.zone,Qr.defaultZone),r=ur.fromObject(t),a=Qr.now();let o,i;if(xn(e.year))o=a;else{for(const f of o6)xn(e[f])&&(e[f]=a6[f]);const l=t6(e)||n6(e);if(l)return At.invalid(l);const c=n.offset(a);[o,i]=X0(e,c,n)}return new At({ts:o,zone:n,loc:r,o:i})}function eC(e,t,n){const r=xn(n.round)?!0:n.round,a=(i,l)=>(i=x2(i,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(i,l)),o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return a(o(n.unit),n.unit);for(const i of n.units){const l=o(i);if(Math.abs(l)>=1)return a(l,i)}return a(e>t?-0:0,n.units[n.units.length-1])}function tC(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class At{constructor(t){const n=t.zone||Qr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Bs("invalid input"):null)||(n.isValid?null:y0(n));this.ts=xn(t.ts)?Qr.now():t.ts;let a=null,o=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[a,o]=[t.old.c,t.old.o];else{const l=n.offset(this.ts);a=Gx(this.ts,l),r=Number.isNaN(a.year)?new Bs("invalid input"):null,a=r?null:a,o=r?null:l}this._zone=n,this.loc=t.loc||ur.create(),this.invalid=r,this.weekData=null,this.c=a,this.o=o,this.isLuxonDateTime=!0}static now(){return new At({})}static local(){const[t,n]=tC(arguments),[r,a,o,i,l,c,f]=n;return Xx({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static utc(){const[t,n]=tC(arguments),[r,a,o,i,l,c,f]=n;return t.zone=ko.utcInstance,Xx({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static fromJSDate(t,n={}){const r=A_(t)?t.valueOf():NaN;if(Number.isNaN(r))return At.invalid("invalid input");const a=Zc(n.zone,Qr.defaultZone);return a.isValid?new At({ts:r,zone:a,loc:ur.fromObject(n)}):At.invalid(y0(a))}static fromMillis(t,n={}){if(cf(t))return t<-qx||t>qx?At.invalid("Timestamp out of range"):new At({ts:t,zone:Zc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(cf(t))return new At({ts:t*1e3,zone:Zc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Zc(n.zone,Qr.defaultZone);if(!r.isValid)return At.invalid(y0(r));const a=Qr.now(),o=xn(n.specificOffset)?r.offset(a):n.specificOffset,i=Ew(t,Qx),l=!xn(i.ordinal),c=!xn(i.year),f=!xn(i.month)||!xn(i.day),p=c||f,g=i.weekYear||i.weekNumber,y=ur.fromObject(n);if((p||l)&&g)throw new Ng("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&l)throw new Ng("Can't mix ordinal dates with month/day");const w=g||i.weekday&&!p;let T,S,I=Gx(a,o);w?(T=oH,S=rH,I=hT(I)):l?(T=iH,S=aH,I=SS(I)):(T=o6,S=a6);let M=!1;for(const U of T){const z=i[U];xn(z)?M?i[U]=S[U]:i[U]=I[U]:M=!0}const N=w?tH(i):l?nH(i):t6(i),_=N||n6(i);if(_)return At.invalid(_);const k=w?$x(i):l?Zx(i):i,[R,L]=X0(k,o,r),H=new At({ts:R,zone:r,o:L,loc:y});return i.weekday&&p&&t.weekday!==H.weekday?At.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${H.toISO()}`):H}static fromISO(t,n={}){const[r,a]=bB(t);return pg(r,a,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,a]=SB(t);return pg(r,a,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,a]=DB(t);return pg(r,a,n,"HTTP",n)}static fromFormat(t,n,r={}){if(xn(t)||xn(n))throw new Xi("fromFormat requires an input string and a format");const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0}),[l,c,f,p]=eH(i,t,n);return p?At.invalid(p):pg(l,c,r,`format ${n}`,t,f)}static fromString(t,n,r={}){return At.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,a]=kB(t);return pg(r,a,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the DateTime is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new l_(r);return new At({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=GA(t,ur.fromObject(n));return r?r.map(a=>a?a.val:null).join(""):null}static expandFormat(t,n={}){return ZA(uo.parseFormat(t),ur.fromObject(n)).map(a=>a.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?TS(this).weekYear:NaN}get weekNumber(){return this.isValid?TS(this).weekNumber:NaN}get weekday(){return this.isValid?TS(this).weekday:NaN}get ordinal(){return this.isValid?SS(this.c).ordinal:NaN}get monthShort(){return this.isValid?v0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?v0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?v0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?v0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Mv(this.year)}get daysInMonth(){return Tw(this.year,this.month)}get daysInYear(){return this.isValid?Lg(this.year):NaN}get weeksInWeekYear(){return this.isValid?Iw(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:a}=uo.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:a}}toUTC(t=0,n={}){return this.setZone(ko.instance(t),n)}toLocal(){return this.setZone(Qr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Zc(t,Qr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let a=this.ts;if(n||r){const o=t.offset(this.ts),i=this.toObject();[a]=X0(i,o,t)}return hg(this,{ts:a,zone:t})}else return At.invalid(y0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const a=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return hg(this,{loc:a})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Ew(t,Qx),r=!xn(n.weekYear)||!xn(n.weekNumber)||!xn(n.weekday),a=!xn(n.ordinal),o=!xn(n.year),i=!xn(n.month)||!xn(n.day),l=o||i,c=n.weekYear||n.weekNumber;if((l||a)&&c)throw new Ng("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&a)throw new Ng("Can't mix ordinal dates with month/day");let f;r?f=$x({...hT(this.c),...n}):xn(n.ordinal)?(f={...this.toObject(),...n},xn(n.day)&&(f.day=Math.min(Tw(f.year,f.month),f.day))):f=Zx({...SS(this.c),...n});const[p,g]=X0(f,this.o,this.zone);return hg(this,{ts:p,o:g})}plus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t);return hg(this,Jx(this,n))}minus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t).negate();return hg(this,Jx(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=bt.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?uo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):DS}toLocaleString(t=Dw,n={}){return this.isValid?uo.create(this.loc.clone(n),t).formatDateTime(this):DS}toLocaleParts(t={}){return this.isValid?uo.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:a=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const i=t==="extended";let l=IS(this,i);return l+="T",l+=Kx(this,i,n,r,a,o),l}toISODate({format:t="extended"}={}){return this.isValid?IS(this,t==="extended"):null}toISOWeekDate(){return w0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:a=!1,extendedZone:o=!1,format:i="extended"}={}){return this.isValid?(a?"T":"")+Kx(this,i==="extended",n,t,r,o):null}toRFC2822(){return w0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return w0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?IS(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let a="HH:mm:ss.SSS";return(n||t)&&(r&&(a+=" "),n?a+="z":t&&(a+="ZZ")),w0(this,a,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():DS}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return bt.invalid("created by diffing an invalid DateTime");const a={locale:this.locale,numberingSystem:this.numberingSystem,...r},o=F_(n).map(bt.normalizeUnit),i=t.valueOf()>this.valueOf(),l=i?this:t,c=i?t:this,f=BB(l,c,o,a);return i?f.negate():f}diffNow(t="milliseconds",n={}){return this.diff(At.now(),t,n)}until(t){return this.isValid?Or.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n)<=r&&r<=a.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||At.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let a=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(a=t.unit,o=void 0),eC(n,this.plus(r),{...t,numeric:"always",units:a,unit:o})}toRelativeCalendar(t={}){return this.isValid?eC(t.base||At.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(At.isDateTime))throw new Xi("min requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(At.isDateTime))throw new Xi("max requires all arguments be DateTimes");return Bx(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0});return qA(i,t,n)}static fromStringExplain(t,n,r={}){return At.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Dw}static get DATE_MED(){return lA}static get DATE_MED_WITH_WEEKDAY(){return d_}static get DATE_FULL(){return uA}static get DATE_HUGE(){return cA}static get TIME_SIMPLE(){return dA}static get TIME_WITH_SECONDS(){return fA}static get TIME_WITH_SHORT_OFFSET(){return hA}static get TIME_WITH_LONG_OFFSET(){return pA}static get TIME_24_SIMPLE(){return mA}static get TIME_24_WITH_SECONDS(){return gA}static get TIME_24_WITH_SHORT_OFFSET(){return vA}static get TIME_24_WITH_LONG_OFFSET(){return yA}static get DATETIME_SHORT(){return wA}static get DATETIME_SHORT_WITH_SECONDS(){return bA}static get DATETIME_MED(){return SA}static get DATETIME_MED_WITH_SECONDS(){return DA}static get DATETIME_MED_WITH_WEEKDAY(){return f_}static get DATETIME_FULL(){return TA}static get DATETIME_FULL_WITH_SECONDS(){return IA}static get DATETIME_HUGE(){return EA}static get DATETIME_HUGE_WITH_SECONDS(){return xA}}function mg(e){if(At.isDateTime(e))return e;if(e&&e.valueOf&&cf(e.valueOf()))return At.fromJSDate(e);if(e&&typeof e=="object")return At.fromObject(e);throw new Xi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const F2={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},sH={allowHtml:!0};({...F2,...sH});class O2{constructor(t){this.value=t,this.successful=!0}map(t){return new O2(t(this.value))}flatMap(t){return t(this.value)}mapErr(t){return this}bimap(t,n){return this.map(t)}orElse(t){return this.value}cast(){return this}orElseThrow(t){return this.value}}class P2{constructor(t){this.error=t,this.successful=!1}map(t){return this}flatMap(t){return this}mapErr(t){return new P2(t(this.error))}bimap(t,n){return this.mapErr(n)}orElse(t){return t}cast(){return this}orElseThrow(t){throw t?new Error(t(this.error)):new Error(""+this.error)}}var xw;(function(e){function t(o){return new O2(o)}e.success=t;function n(o){return new P2(o)}e.failure=n;function r(o,i,l){return o.successful?i.successful?l(o.value,i.value):n(i.error):n(o.error)}e.flatMap2=r;function a(o,i,l){return r(o,i,(c,f)=>t(l(c,f)))}e.map2=a})(xw||(xw={}));var lH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},he={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:lH,function(){return function(n){var r={};function a(o){if(r[o])return r[o].exports;var i=r[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=n,a.c=r,a.d=function(o,i,l){a.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:l})},a.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},a.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(i,"a",i),i},a.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},a.p="",a(a.s=0)}([function(n,r,a){function o(te){if(!(this instanceof o))return new o(te);this._=te}var i=o.prototype;function l(te,me){for(var Ce=0;Ce<te;Ce++)me(Ce)}function c(te,me,Ce){return function(Ye,He){l(He.length,function(Ke){Ye(He[Ke],Ke,He)})}(function(Ye,He,Ke){me=te(me,Ye,He,Ke)},Ce),me}function f(te,me){return c(function(Ce,Ye,He,Ke){return Ce.concat([te(Ye,He,Ke)])},[],me)}function p(te,me){var Ce={v:0,buf:me};return l(te,function(){var Ye;Ce={v:Ce.v<<1|(Ye=Ce.buf,Ye[0]>>7),buf:function(He){var Ke=c(function(et,kt,Yt,On){return et.concat(Yt===On.length-1?Buffer.from([kt,0]).readUInt16BE(0):On.readUInt16BE(Yt))},[],He);return Buffer.from(f(function(et){return(et<<1&65535)>>8},Ke))}(Ce.buf)}}),Ce}function g(){return typeof Buffer<"u"}function y(){if(!g())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function w(te){y();var me=c(function(Ke,et){return Ke+et},0,te);if(me%8!=0)throw new Error("The bits ["+te.join(", ")+"] add up to "+me+" which is not an even number of bytes; the total should be divisible by 8");var Ce,Ye=me/8,He=(Ce=function(Ke){return Ke>48},c(function(Ke,et){return Ke||(Ce(et)?et:Ke)},null,te));if(He)throw new Error(He+" bit range requested exceeds 48 bit (6 byte) Number max.");return new o(function(Ke,et){var kt=Ye+et;return kt>Ke.length?U(et,Ye.toString()+" bytes"):H(kt,c(function(Yt,On){var vn=p(On,Yt.buf);return{coll:Yt.coll.concat(vn.v),buf:vn.buf}},{coll:[],buf:Ke.slice(et,kt)},te).coll)})}function T(te,me){return new o(function(Ce,Ye){return y(),Ye+me>Ce.length?U(Ye,me+" bytes for "+te):H(Ye+me,Ce.slice(Ye,Ye+me))})}function S(te,me){if(typeof(Ce=me)!="number"||Math.floor(Ce)!==Ce||me<0||me>6)throw new Error(te+" requires integer length in range [0, 6].");var Ce}function I(te){return S("uintBE",te),T("uintBE("+te+")",te).map(function(me){return me.readUIntBE(0,te)})}function M(te){return S("uintLE",te),T("uintLE("+te+")",te).map(function(me){return me.readUIntLE(0,te)})}function N(te){return S("intBE",te),T("intBE("+te+")",te).map(function(me){return me.readIntBE(0,te)})}function _(te){return S("intLE",te),T("intLE("+te+")",te).map(function(me){return me.readIntLE(0,te)})}function k(te){return te instanceof o}function R(te){return{}.toString.call(te)==="[object Array]"}function L(te){return g()&&Buffer.isBuffer(te)}function H(te,me){return{status:!0,index:te,value:me,furthest:-1,expected:[]}}function U(te,me){return R(me)||(me=[me]),{status:!1,index:-1,value:null,furthest:te,expected:me}}function z(te,me){if(!me||te.furthest>me.furthest)return te;var Ce=te.furthest===me.furthest?function(Ye,He){if(function(){if(o._supportsSet!==void 0)return o._supportsSet;var yr=typeof Set<"u";return o._supportsSet=yr,yr}()&&Array.from){for(var Ke=new Set(Ye),et=0;et<He.length;et++)Ke.add(He[et]);var kt=Array.from(Ke);return kt.sort(),kt}for(var Yt={},On=0;On<Ye.length;On++)Yt[Ye[On]]=!0;for(var vn=0;vn<He.length;vn++)Yt[He[vn]]=!0;var xr=[];for(var Jn in Yt)({}).hasOwnProperty.call(Yt,Jn)&&xr.push(Jn);return xr.sort(),xr}(te.expected,me.expected):me.expected;return{status:te.status,index:te.index,value:te.value,furthest:me.furthest,expected:Ce}}var $={};function X(te,me){if(L(te))return{offset:me,line:-1,column:-1};te in $||($[te]={});for(var Ce=$[te],Ye=0,He=0,Ke=0,et=me;et>=0;){if(et in Ce){Ye=Ce[et].line,Ke===0&&(Ke=Ce[et].lineStart);break}(te.charAt(et)===`
`||te.charAt(et)==="\r"&&te.charAt(et+1)!==`
`)&&(He++,Ke===0&&(Ke=et+1)),et--}var kt=Ye+He,Yt=me-Ke;return Ce[me]={line:kt,lineStart:Ke},{offset:me,line:kt+1,column:Yt+1}}function Q(te){if(!k(te))throw new Error("not a parser: "+te)}function se(te,me){return typeof te=="string"?te.charAt(me):te[me]}function ue(te){if(typeof te!="number")throw new Error("not a number: "+te)}function fe(te){if(typeof te!="function")throw new Error("not a function: "+te)}function Z(te){if(typeof te!="string")throw new Error("not a string: "+te)}var pe=2,ie=3,de=8,K=5*de,ae=4*de,Se=" ";function je(te,me){return new Array(me+1).join(te)}function Re(te,me,Ce){var Ye=me-te.length;return Ye<=0?te:je(Ce,Ye)+te}function Fe(te,me,Ce,Ye){return{from:te-me>0?te-me:0,to:te+Ce>Ye?Ye:te+Ce}}function Be(te,me){var Ce,Ye,He,Ke,et,kt=me.index,Yt=kt.offset,On=1;if(Yt===te.length)return"Got the end of the input";if(L(te)){var vn=Yt-Yt%de,xr=Yt-vn,Jn=Fe(vn,K,ae+de,te.length),yr=f(function(Nn){return f(function(Aa){return Re(Aa.toString(16),2,"0")},Nn)},function(Nn,Aa){var Fa=Nn.length,Zr=[],fo=0;if(Fa<=Aa)return[Nn.slice()];for(var Oa=0;Oa<Fa;Oa++)Zr[fo]||Zr.push([]),Zr[fo].push(Nn[Oa]),(Oa+1)%Aa==0&&fo++;return Zr}(te.slice(Jn.from,Jn.to).toJSON().data,de));Ke=function(Nn){return Nn.from===0&&Nn.to===1?{from:Nn.from,to:Nn.to}:{from:Nn.from/de,to:Math.floor(Nn.to/de)}}(Jn),Ye=vn/de,Ce=3*xr,xr>=4&&(Ce+=1),On=2,He=f(function(Nn){return Nn.length<=4?Nn.join(" "):Nn.slice(0,4).join(" ")+" "+Nn.slice(4).join(" ")},yr),(et=(8*(Ke.to>0?Ke.to-1:Ke.to)).toString(16).length)<2&&(et=2)}else{var ta=te.split(/\r\n|[\n\r\u2028\u2029]/);Ce=kt.column-1,Ye=kt.line-1,Ke=Fe(Ye,pe,ie,ta.length),He=ta.slice(Ke.from,Ke.to),et=Ke.to.toString().length}var Pi=Ye-Ke.from;return L(te)&&(et=(8*(Ke.to>0?Ke.to-1:Ke.to)).toString(16).length)<2&&(et=2),c(function(Nn,Aa,Fa){var Zr,fo=Fa===Pi,Oa=fo?"> ":Se;return Zr=L(te)?Re((8*(Ke.from+Fa)).toString(16),et,"0"):Re((Ke.from+Fa+1).toString(),et," "),[].concat(Nn,[Oa+Zr+" | "+Aa],fo?[Se+je(" ",et)+" | "+Re("",Ce," ")+je("^",On)]:[])},[],He).join(`
`)}function Qe(te,me){return[`
`,"-- PARSING FAILED "+je("-",50),`
`,Be(te,me),`
`,(Ce=me.expected,Ce.length===1?`Expected:
`+Ce[0]:`Expected one of the following:
`+Ce.join(", ")),`
`].join("");var Ce}function Ze(te){return te.flags!==void 0?te.flags:[te.global?"g":"",te.ignoreCase?"i":"",te.multiline?"m":"",te.unicode?"u":"",te.sticky?"y":""].join("")}function st(){for(var te=[].slice.call(arguments),me=te.length,Ce=0;Ce<me;Ce+=1)Q(te[Ce]);return o(function(Ye,He){for(var Ke,et=new Array(me),kt=0;kt<me;kt+=1){if(!(Ke=z(te[kt]._(Ye,He),Ke)).status)return Ke;et[kt]=Ke.value,He=Ke.index}return z(H(He,et),Ke)})}function xt(){var te=[].slice.call(arguments);if(te.length===0)throw new Error("seqMap needs at least one argument");var me=te.pop();return fe(me),st.apply(null,te).map(function(Ce){return me.apply(null,Ce)})}function tn(){var te=[].slice.call(arguments),me=te.length;if(me===0)return Tt("zero alternates");for(var Ce=0;Ce<me;Ce+=1)Q(te[Ce]);return o(function(Ye,He){for(var Ke,et=0;et<te.length;et+=1)if((Ke=z(te[et]._(Ye,He),Ke)).status)return Ke;return Ke})}function _e(te,me){return Xe(te,me).or(St([]))}function Xe(te,me){return Q(te),Q(me),xt(te,me.then(te).many(),function(Ce,Ye){return[Ce].concat(Ye)})}function tt(te){Z(te);var me="'"+te+"'";return o(function(Ce,Ye){var He=Ye+te.length,Ke=Ce.slice(Ye,He);return Ke===te?H(He,Ke):U(Ye,me)})}function ht(te,me){(function(He){if(!(He instanceof RegExp))throw new Error("not a regexp: "+He);for(var Ke=Ze(He),et=0;et<Ke.length;et++){var kt=Ke.charAt(et);if(kt!=="i"&&kt!=="m"&&kt!=="u"&&kt!=="s")throw new Error('unsupported regexp flag "'+kt+'": '+He)}})(te),arguments.length>=2?ue(me):me=0;var Ce=function(He){return RegExp("^(?:"+He.source+")",Ze(He))}(te),Ye=""+te;return o(function(He,Ke){var et=Ce.exec(He.slice(Ke));if(et){if(0<=me&&me<=et.length){var kt=et[0],Yt=et[me];return H(Ke+kt.length,Yt)}return U(Ke,"valid match group (0 to "+et.length+") in "+Ye)}return U(Ke,Ye)})}function St(te){return o(function(me,Ce){return H(Ce,te)})}function Tt(te){return o(function(me,Ce){return U(Ce,te)})}function Gt(te){if(k(te))return o(function(me,Ce){var Ye=te._(me,Ce);return Ye.index=Ce,Ye.value="",Ye});if(typeof te=="string")return Gt(tt(te));if(te instanceof RegExp)return Gt(ht(te));throw new Error("not a string, regexp, or parser: "+te)}function _t(te){return Q(te),o(function(me,Ce){var Ye=te._(me,Ce),He=me.slice(Ce,Ye.index);return Ye.status?U(Ce,'not "'+He+'"'):H(Ce,null)})}function Vt(te){return fe(te),o(function(me,Ce){var Ye=se(me,Ce);return Ce<me.length&&te(Ye)?H(Ce+1,Ye):U(Ce,"a character/byte matching "+te)})}function Xt(te,me){arguments.length<2&&(me=te,te=void 0);var Ce=o(function(Ye,He){return Ce._=me()._,Ce._(Ye,He)});return te?Ce.desc(te):Ce}function dn(){return Tt("fantasy-land/empty")}i.parse=function(te){if(typeof te!="string"&&!L(te))throw new Error(".parse must be called with a string or Buffer as its argument");var me,Ce=this.skip(Er)._(te,0);return me=Ce.status?{status:!0,value:Ce.value}:{status:!1,index:X(te,Ce.furthest),expected:Ce.expected},delete $[te],me},i.tryParse=function(te){var me=this.parse(te);if(me.status)return me.value;var Ce=Qe(te,me),Ye=new Error(Ce);throw Ye.type="ParsimmonError",Ye.result=me,Ye},i.assert=function(te,me){return this.chain(function(Ce){return te(Ce)?St(Ce):Tt(me)})},i.or=function(te){return tn(this,te)},i.trim=function(te){return this.wrap(te,te)},i.wrap=function(te,me){return xt(te,this,me,function(Ce,Ye){return Ye})},i.thru=function(te){return te(this)},i.then=function(te){return Q(te),st(this,te).map(function(me){return me[1]})},i.many=function(){var te=this;return o(function(me,Ce){for(var Ye=[],He=void 0;;){if(!(He=z(te._(me,Ce),He)).status)return z(H(Ce,Ye),He);if(Ce===He.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");Ce=He.index,Ye.push(He.value)}})},i.tieWith=function(te){return Z(te),this.map(function(me){if(function(He){if(!R(He))throw new Error("not an array: "+He)}(me),me.length){Z(me[0]);for(var Ce=me[0],Ye=1;Ye<me.length;Ye++)Z(me[Ye]),Ce+=te+me[Ye];return Ce}return""})},i.tie=function(){return this.tieWith("")},i.times=function(te,me){var Ce=this;return arguments.length<2&&(me=te),ue(te),ue(me),o(function(Ye,He){for(var Ke=[],et=void 0,kt=void 0,Yt=0;Yt<te;Yt+=1){if(kt=z(et=Ce._(Ye,He),kt),!et.status)return kt;He=et.index,Ke.push(et.value)}for(;Yt<me&&(kt=z(et=Ce._(Ye,He),kt),et.status);Yt+=1)He=et.index,Ke.push(et.value);return z(H(He,Ke),kt)})},i.result=function(te){return this.map(function(){return te})},i.atMost=function(te){return this.times(0,te)},i.atLeast=function(te){return xt(this.times(te),this.many(),function(me,Ce){return me.concat(Ce)})},i.map=function(te){fe(te);var me=this;return o(function(Ce,Ye){var He=me._(Ce,Ye);return He.status?z(H(He.index,te(He.value)),He):He})},i.contramap=function(te){fe(te);var me=this;return o(function(Ce,Ye){var He=me.parse(te(Ce.slice(Ye)));return He.status?H(Ye+Ce.length,He.value):He})},i.promap=function(te,me){return fe(te),fe(me),this.contramap(te).map(me)},i.skip=function(te){return st(this,te).map(function(me){return me[0]})},i.mark=function(){return xt(en,this,en,function(te,me,Ce){return{start:te,value:me,end:Ce}})},i.node=function(te){return xt(en,this,en,function(me,Ce,Ye){return{name:te,value:Ce,start:me,end:Ye}})},i.sepBy=function(te){return _e(this,te)},i.sepBy1=function(te){return Xe(this,te)},i.lookahead=function(te){return this.skip(Gt(te))},i.notFollowedBy=function(te){return this.skip(_t(te))},i.desc=function(te){R(te)||(te=[te]);var me=this;return o(function(Ce,Ye){var He=me._(Ce,Ye);return He.status||(He.expected=te),He})},i.fallback=function(te){return this.or(St(te))},i.ap=function(te){return xt(te,this,function(me,Ce){return me(Ce)})},i.chain=function(te){var me=this;return o(function(Ce,Ye){var He=me._(Ce,Ye);return He.status?z(te(He.value)._(Ce,He.index),He):He})},i.concat=i.or,i.empty=dn,i.of=St,i["fantasy-land/ap"]=i.ap,i["fantasy-land/chain"]=i.chain,i["fantasy-land/concat"]=i.concat,i["fantasy-land/empty"]=i.empty,i["fantasy-land/of"]=i.of,i["fantasy-land/map"]=i.map;var en=o(function(te,me){return H(me,X(te,me))}),Zn=o(function(te,me){return me>=te.length?U(me,"any character/byte"):H(me+1,se(te,me))}),kn=o(function(te,me){return H(te.length,te.slice(me))}),Er=o(function(te,me){return me<te.length?U(me,"EOF"):H(me,null)}),pt=ht(/[0-9]/).desc("a digit"),Mt=ht(/[0-9]*/).desc("optional digits"),Jt=ht(/[a-z]/i).desc("a letter"),on=ht(/[a-z]*/i).desc("optional letters"),ln=ht(/\s*/).desc("optional whitespace"),vr=ht(/\s+/).desc("whitespace"),fr=tt("\r"),ha=tt(`
`),jr=tt(`\r
`),nr=tn(jr,ha,fr).desc("newline"),Lr=tn(nr,Er);o.all=kn,o.alt=tn,o.any=Zn,o.cr=fr,o.createLanguage=function(te){var me={};for(var Ce in te)({}).hasOwnProperty.call(te,Ce)&&function(Ye){me[Ye]=Xt(function(){return te[Ye](me)})}(Ce);return me},o.crlf=jr,o.custom=function(te){return o(te(H,U))},o.digit=pt,o.digits=Mt,o.empty=dn,o.end=Lr,o.eof=Er,o.fail=Tt,o.formatError=Qe,o.index=en,o.isParser=k,o.lazy=Xt,o.letter=Jt,o.letters=on,o.lf=ha,o.lookahead=Gt,o.makeFailure=U,o.makeSuccess=H,o.newline=nr,o.noneOf=function(te){return Vt(function(me){return te.indexOf(me)<0}).desc("none of '"+te+"'")},o.notFollowedBy=_t,o.of=St,o.oneOf=function(te){for(var me=te.split(""),Ce=0;Ce<me.length;Ce++)me[Ce]="'"+me[Ce]+"'";return Vt(function(Ye){return te.indexOf(Ye)>=0}).desc(me)},o.optWhitespace=ln,o.Parser=o,o.range=function(te,me){return Vt(function(Ce){return te<=Ce&&Ce<=me}).desc(te+"-"+me)},o.regex=ht,o.regexp=ht,o.sepBy=_e,o.sepBy1=Xe,o.seq=st,o.seqMap=xt,o.seqObj=function(){for(var te,me={},Ce=0,Ye=(te=arguments,Array.prototype.slice.call(te)),He=Ye.length,Ke=0;Ke<He;Ke+=1){var et=Ye[Ke];if(!k(et)){if(R(et)&&et.length===2&&typeof et[0]=="string"&&k(et[1])){var kt=et[0];if(Object.prototype.hasOwnProperty.call(me,kt))throw new Error("seqObj: duplicate key "+kt);me[kt]=!0,Ce++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(Ce===0)throw new Error("seqObj expects at least one named parser, found zero");return o(function(Yt,On){for(var vn,xr={},Jn=0;Jn<He;Jn+=1){var yr,ta;if(R(Ye[Jn])?(yr=Ye[Jn][0],ta=Ye[Jn][1]):(yr=null,ta=Ye[Jn]),!(vn=z(ta._(Yt,On),vn)).status)return vn;yr&&(xr[yr]=vn.value),On=vn.index}return z(H(On,xr),vn)})},o.string=tt,o.succeed=St,o.takeWhile=function(te){return fe(te),o(function(me,Ce){for(var Ye=Ce;Ye<me.length&&te(se(me,Ye));)Ye++;return H(Ye,me.slice(Ce,Ye))})},o.test=Vt,o.whitespace=vr,o["fantasy-land/empty"]=dn,o["fantasy-land/of"]=St,o.Binary={bitSeq:w,bitSeqObj:function(te){y();var me={},Ce=0,Ye=f(function(Ke){if(R(Ke)){var et=Ke;if(et.length!==2)throw new Error("["+et.join(", ")+"] should be length 2, got length "+et.length);if(Z(et[0]),ue(et[1]),Object.prototype.hasOwnProperty.call(me,et[0]))throw new Error("duplicate key in bitSeqObj: "+et[0]);return me[et[0]]=!0,Ce++,et}return ue(Ke),[null,Ke]},te);if(Ce<1)throw new Error("bitSeqObj expects at least one named pair, got ["+te.join(", ")+"]");var He=f(function(Ke){return Ke[0]},Ye);return w(f(function(Ke){return Ke[1]},Ye)).map(function(Ke){return c(function(et,kt){return kt[0]!==null&&(et[kt[0]]=kt[1]),et},{},f(function(et,kt){return[et,Ke[kt]]},He))})},byte:function(te){if(y(),ue(te),te>255)throw new Error("Value specified to byte constructor ("+te+"=0x"+te.toString(16)+") is larger in value than a single byte.");var me=(te>15?"0x":"0x0")+te.toString(16);return o(function(Ce,Ye){var He=se(Ce,Ye);return He===te?H(Ye+1,He):U(Ye,me)})},buffer:function(te){return T("buffer",te).map(function(me){return Buffer.from(me)})},encodedString:function(te,me){return T("string",me).map(function(Ce){return Ce.toString(te)})},uintBE:I,uint8BE:I(1),uint16BE:I(2),uint32BE:I(4),uintLE:M,uint8LE:M(1),uint16LE:M(2),uint32LE:M(4),intBE:N,int8BE:N(1),int16BE:N(2),int32BE:N(4),intLE:_,int8LE:_(1),int16LE:_(2),int32LE:_(4),floatBE:T("floatBE",4).map(function(te){return te.readFloatBE(0)}),floatLE:T("floatLE",4).map(function(te){return te.readFloatLE(0)}),doubleBE:T("doubleBE",8).map(function(te){return te.readDoubleBE(0)}),doubleLE:T("doubleLE",8).map(function(te){return te.readDoubleLE(0)})},n.exports=o}])})})(he);var j2=()=>/(?:[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDD-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF6](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC2\uDED0-\uDED9\uDEE0-\uDEE7]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?))/g;function i6(e){return e==null?e:e.shiftToAll().normalize()}function nC(e){return e.includes("/")&&(e=e.substring(e.lastIndexOf("/")+1)),e.endsWith(".md")&&(e=e.substring(0,e.length-3)),e}he.exports.alt(he.exports.regex(new RegExp(j2(),"")),he.exports.regex(/[0-9\p{Letter}_-]+/u).map(e=>e.toLocaleLowerCase()),he.exports.whitespace.map(e=>"-"),he.exports.any.map(e=>"")).many().map(e=>e.join(""));const uH=he.exports.alt(he.exports.regex(new RegExp(j2(),"")),he.exports.regex(/[0-9\p{Letter}_-]+/u),he.exports.whitespace.map(e=>" "),he.exports.any.map(e=>" ")).many().map(e=>e.join("").split(/\s+/).join(" ").trim());function cH(e){return uH.tryParse(e)}function dH(e){return e=i6(e),e=bt.fromObject(Object.fromEntries(Object.entries(e.toObject()).filter(([,t])=>t>0))),e.toHuman()}var qg;(function(e){function t(k,R=F2,L=!1){let H=n(k);if(!H)return R.renderNullAs;switch(H.type){case"null":return R.renderNullAs;case"string":return H.value;case"number":case"boolean":return""+H.value;case"html":return H.value.outerHTML;case"widget":return H.value.markdown();case"link":return H.value.markdown();case"function":return"<function>";case"array":let U="";return L&&(U+="["),U+=H.value.map(z=>t(z,R,!0)).join(", "),L&&(U+="]"),U;case"object":return"{ "+Object.entries(H.value).map(z=>z[0]+": "+t(z[1],R,!0)).join(", ")+" }";case"date":return H.value.second==0&&H.value.hour==0&&H.value.minute==0?H.value.toFormat(R.defaultDateFormat):H.value.toFormat(R.defaultDateTimeFormat);case"duration":return dH(H.value)}}e.toString=t;function n(k){return y(k)?{type:"null",value:k}:f(k)?{type:"number",value:k}:c(k)?{type:"string",value:k}:T(k)?{type:"boolean",value:k}:g(k)?{type:"duration",value:k}:p(k)?{type:"date",value:k}:I(k)?{type:"widget",value:k}:w(k)?{type:"array",value:k}:S(k)?{type:"link",value:k}:_(k)?{type:"function",value:k}:M(k)?{type:"html",value:k}:N(k)?{type:"object",value:k}:void 0}e.wrapValue=n;function r(k,R){if(N(k)){let L={};for(let[H,U]of Object.entries(k))L[H]=r(U,R);return L}else if(w(k)){let L=[];for(let H of k)L.push(r(H,R));return L}else return R(k)}e.mapLeaves=r;function a(k,R,L){var H,U;if(k===void 0&&(k=null),R===void 0&&(R=null),k===null&&R===null)return 0;if(k===null)return-1;if(R===null)return 1;let z=n(k),$=n(R);if(z===void 0&&$===void 0)return 0;if(z===void 0)return-1;if($===void 0)return 1;if(z.type!=$.type)return z.type.localeCompare($.type);if(z.value===$.value)return 0;switch(z.type){case"string":return z.value.localeCompare($.value);case"number":return z.value<$.value?-1:z.value==$.value?0:1;case"null":return 0;case"boolean":return z.value==$.value?0:z.value?1:-1;case"link":let X=z.value,Q=$.value,se=L??(je=>je),ue=se(X.path).localeCompare(se(Q.path));if(ue!=0)return ue;let fe=X.type.localeCompare(Q.type);return fe!=0?fe:X.subpath&&!Q.subpath?1:!X.subpath&&Q.subpath?-1:!X.subpath&&!Q.subpath?0:((H=X.subpath)!==null&&H!==void 0?H:"").localeCompare((U=Q.subpath)!==null&&U!==void 0?U:"");case"date":return z.value<$.value?-1:z.value.equals($.value)?0:1;case"duration":return z.value<$.value?-1:z.value.equals($.value)?0:1;case"array":let Z=z.value,pe=$.value;for(let je=0;je<Math.min(Z.length,pe.length);je++){let Re=a(Z[je],pe[je]);if(Re!=0)return Re}return Z.length-pe.length;case"object":let ie=z.value,de=$.value,K=Array.from(Object.keys(ie)),ae=Array.from(Object.keys(de));K.sort(),ae.sort();let Se=a(K,ae);if(Se!=0)return Se;for(let je of K){let Re=a(ie[je],de[je]);if(Re!=0)return Re}return 0;case"widget":case"html":case"function":return 0}}e.compareValue=a;function o(k){var R;return(R=n(k))===null||R===void 0?void 0:R.type}e.typeOf=o;function i(k){let R=n(k);if(!R)return!1;switch(R.type){case"number":return R.value!=0;case"string":return R.value.length>0;case"boolean":return R.value;case"link":return!!R.value.path;case"date":return R.value.toMillis()!=0;case"duration":return R.value.as("seconds")!=0;case"object":return Object.keys(R.value).length>0;case"array":return R.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}e.isTruthy=i;function l(k){if(k==null)return k;if(e.isArray(k))return[].concat(k.map(R=>l(R)));if(e.isObject(k)){let R={};for(let[L,H]of Object.entries(k))R[L]=l(H);return R}else return k}e.deepCopy=l;function c(k){return typeof k=="string"}e.isString=c;function f(k){return typeof k=="number"}e.isNumber=f;function p(k){return k instanceof At}e.isDate=p;function g(k){return k instanceof bt}e.isDuration=g;function y(k){return k==null}e.isNull=y;function w(k){return Array.isArray(k)}e.isArray=w;function T(k){return typeof k=="boolean"}e.isBoolean=T;function S(k){return k instanceof so}e.isLink=S;function I(k){return k instanceof L2}e.isWidget=I;function M(k){return typeof HTMLElement<"u"?k instanceof HTMLElement:!1}e.isHtml=M;function N(k){return typeof k=="object"&&!M(k)&&!I(k)&&!w(k)&&!g(k)&&!p(k)&&!S(k)&&k!==void 0&&!y(k)}e.isObject=N;function _(k){return typeof k=="function"}e.isFunction=_})(qg||(qg={}));var rC;(function(e){function t(a){return qg.isObject(a)&&Object.keys(a).length==2&&"key"in a&&"rows"in a}e.isElementGroup=t;function n(a){for(let o of a)if(!t(o))return!1;return!0}e.isGrouping=n;function r(a){if(n(a)){let o=0;for(let i of a)o+=r(i.rows);return o}else return a.length}e.count=r})(rC||(rC={}));class so{constructor(t){Object.assign(this,t)}static file(t,n=!1,r){return new so({path:t,embed:n,display:r,subpath:void 0,type:"file"})}static infer(t,n=!1,r){if(t.includes("#^")){let a=t.split("#^");return so.block(a[0],a[1],n,r)}else if(t.includes("#")){let a=t.split("#");return so.header(a[0],a[1],n,r)}else return so.file(t,n,r)}static header(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:cH(n),type:"header"})}static block(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:n,type:"block"})}static fromObject(t){return new so(t)}equals(t){return t==null||t==null?!1:this.path==t.path&&this.type==t.type&&this.subpath==t.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(t){return new so(Object.assign({},this,{path:t}))}withDisplay(t){return new so(Object.assign({},this,{display:t}))}withHeader(t){return so.header(this.path,t,this.embed,this.display)}toFile(){return so.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let t=new so(this);return t.embed=!0,t}}fromEmbed(){if(this.embed){let t=new so(this);return t.embed=!1,t}else return this}markdown(){let t=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?t+="|"+this.display:(t+="|"+nC(this.path),(this.type=="header"||this.type=="block")&&(t+=" > "+this.subpath)),t+="]]",t}obsidianLink(){var t,n;const r=this.path.replace("|","\\|");return this.type=="header"?r+"#"+((t=this.subpath)===null||t===void 0?void 0:t.replace("|","\\|")):this.type=="block"?r+"#^"+((n=this.subpath)===null||n===void 0?void 0:n.replace("|","\\|")):r}fileName(){return nC(this.path).replace(".md","")}}class L2{constructor(t){this.$widget=t}}class fH extends L2{constructor(t,n){super("dataview:list-pair"),this.key=t,this.value=n}markdown(){return`${qg.toString(this.key)}: ${qg.toString(this.value)}`}}class hH extends L2{constructor(t,n){super("dataview:external-link"),this.url=t,this.display=n}markdown(){var t;return`[${(t=this.display)!==null&&t!==void 0?t:this.url}](${this.url})`}}var aC;(function(e){function t(i,l){return new fH(i,l)}e.listPair=t;function n(i,l){return new hH(i,l)}e.externalLink=n;function r(i){return i.$widget==="dataview:list-pair"}e.isListPair=r;function a(i){return i.$widget==="dataview:external-link"}e.isExternalLink=a;function o(i){return r(i)||a(i)}e.isBuiltin=o})(aC||(aC={}));var Fr;(function(e){function t(y){return{type:"variable",name:y}}e.variable=t;function n(y){return{type:"literal",value:y}}e.literal=n;function r(y,w,T){return{type:"binaryop",left:y,op:w,right:T}}e.binaryOp=r;function a(y,w){return{type:"index",object:y,index:w}}e.index=a;function o(y){let w=y.split("."),T=e.variable(w[0]);for(let S=1;S<w.length;S++)T=e.index(T,e.literal(w[S]));return T}e.indexVariable=o;function i(y,w){return{type:"lambda",arguments:y,value:w}}e.lambda=i;function l(y,w){return{type:"function",func:y,arguments:w}}e.func=l;function c(y){return{type:"list",values:y}}e.list=c;function f(y){return{type:"object",values:y}}e.object=f;function p(y){return{type:"negated",child:y}}e.negate=p;function g(y){return y=="<="||y=="<"||y==">"||y==">="||y=="!="||y=="="}e.isCompareOp=g,e.NULL=e.literal(null)})(Fr||(Fr={}));var _l;(function(e){function t(p){return{type:"tag",tag:p}}e.tag=t;function n(p){return{type:"csv",path:p}}e.csv=n;function r(p){return{type:"folder",folder:p}}e.folder=r;function a(p,g){return{type:"link",file:p,direction:g?"incoming":"outgoing"}}e.link=a;function o(p,g,y){return{type:"binaryop",left:p,op:g,right:y}}e.binaryOp=o;function i(p,g){return{type:"binaryop",left:p,op:"&",right:g}}e.and=i;function l(p,g){return{type:"binaryop",left:p,op:"|",right:g}}e.or=l;function c(p){return{type:"negate",child:p}}e.negate=c;function f(){return{type:"empty"}}e.empty=f})(_l||(_l={}));const oC=new RegExp(j2(),""),pT={year:bt.fromObject({years:1}),years:bt.fromObject({years:1}),yr:bt.fromObject({years:1}),yrs:bt.fromObject({years:1}),month:bt.fromObject({months:1}),months:bt.fromObject({months:1}),mo:bt.fromObject({months:1}),mos:bt.fromObject({months:1}),week:bt.fromObject({weeks:1}),weeks:bt.fromObject({weeks:1}),wk:bt.fromObject({weeks:1}),wks:bt.fromObject({weeks:1}),w:bt.fromObject({weeks:1}),day:bt.fromObject({days:1}),days:bt.fromObject({days:1}),d:bt.fromObject({days:1}),hour:bt.fromObject({hours:1}),hours:bt.fromObject({hours:1}),hr:bt.fromObject({hours:1}),hrs:bt.fromObject({hours:1}),h:bt.fromObject({hours:1}),minute:bt.fromObject({minutes:1}),minutes:bt.fromObject({minutes:1}),min:bt.fromObject({minutes:1}),mins:bt.fromObject({minutes:1}),m:bt.fromObject({minutes:1}),second:bt.fromObject({seconds:1}),seconds:bt.fromObject({seconds:1}),sec:bt.fromObject({seconds:1}),secs:bt.fromObject({seconds:1}),s:bt.fromObject({seconds:1})},mT={now:()=>At.local(),today:()=>At.local().startOf("day"),yesterday:()=>At.local().startOf("day").minus(bt.fromObject({days:1})),tomorrow:()=>At.local().startOf("day").plus(bt.fromObject({days:1})),sow:()=>At.local().startOf("week"),"start-of-week":()=>At.local().startOf("week"),eow:()=>At.local().endOf("week"),"end-of-week":()=>At.local().endOf("week"),soy:()=>At.local().startOf("year"),"start-of-year":()=>At.local().startOf("year"),eoy:()=>At.local().endOf("year"),"end-of-year":()=>At.local().endOf("year"),som:()=>At.local().startOf("month"),"start-of-month":()=>At.local().startOf("month"),eom:()=>At.local().endOf("month"),"end-of-month":()=>At.local().endOf("month")},gT=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function pH(e){let t=-1;for(;(t=e.indexOf("|",t+1))>=0;)if(!(t>0&&e[t-1]=="\\"))return[e.substring(0,t).replace(/\\\|/g,"|"),e.substring(t+1)];return[e.replace(/\\\|/g,"|"),void 0]}function mH(e){let[t,n]=pH(e);return so.infer(t,!1,n)}function gg(e,t,n){return he.exports.seqMap(e,he.exports.seq(he.exports.optWhitespace,t,he.exports.optWhitespace,e).many(),(r,a)=>{if(a.length==0)return r;let o=n(r,a[0][1],a[0][3]);for(let i=1;i<a.length;i++)o=n(o,a[i][1],a[i][3]);return o})}function gH(e,...t){return he.exports.custom((n,r)=>(a,o)=>{let i=e._(a,o);if(!i.status)return i;for(let l of t){let c=l(i.value)._(a,i.index);if(!c.status)return i;i=c}return i})}const Ps=he.exports.createLanguage({number:e=>he.exports.regexp(/-?[0-9]+(\.[0-9]+)?/).map(t=>Number.parseFloat(t)).desc("number"),string:e=>he.exports.string('"').then(he.exports.alt(e.escapeCharacter,he.exports.noneOf('"\\')).atLeast(0).map(t=>t.join(""))).skip(he.exports.string('"')).desc("string"),escapeCharacter:e=>he.exports.string("\\").then(he.exports.any).map(t=>t==='"'?'"':t==="\\"?"\\":"\\"+t),bool:e=>he.exports.regexp(/true|false|True|False/).map(t=>t.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:e=>he.exports.seqMap(he.exports.string("#"),he.exports.alt(he.exports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(t,n)=>t+n.join("")).desc("tag ('#hello/stuff')"),identifier:e=>he.exports.seqMap(he.exports.alt(he.exports.regexp(new RegExp("\\p{Letter}","u")),he.exports.regexp(oC).desc("text")),he.exports.alt(he.exports.regexp(/[0-9\p{Letter}_-]/u),he.exports.regexp(oC).desc("text")).many(),(t,n)=>t+n.join("")).desc("variable identifier"),link:e=>he.exports.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(t=>mH(t)).desc("file link"),embedLink:e=>he.exports.seqMap(he.exports.string("!").atMost(1),e.link,(t,n)=>(t.length>0&&(n.embed=!0),n)).desc("file link"),binaryPlusMinus:e=>he.exports.regexp(/\+|-/).map(t=>t).desc("'+' or '-'"),binaryMulDiv:e=>he.exports.regexp(/\*|\/|%/).map(t=>t).desc("'*' or '/' or '%'"),binaryCompareOp:e=>he.exports.regexp(/>=|<=|!=|>|<|=/).map(t=>t).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:e=>he.exports.regexp(/and|or|&|\|/i).map(t=>t.toLowerCase()=="and"?"&":t.toLowerCase()=="or"?"|":t).desc("'and' or 'or'"),rootDate:e=>he.exports.seqMap(he.exports.regexp(/\d{4}/),he.exports.string("-"),he.exports.regexp(/\d{2}/),(t,n,r)=>At.fromObject({year:Number.parseInt(t),month:Number.parseInt(r)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:e=>he.exports.alt(...Object.keys(mT).sort((t,n)=>n.length-t.length).map(he.exports.string)),date:e=>gH(e.rootDate,t=>he.exports.seqMap(he.exports.string("-"),he.exports.regexp(/\d{2}/),(n,r)=>t.set({day:Number.parseInt(r)})),t=>he.exports.seqMap(he.exports.string("T"),he.exports.regexp(/\d{2}/),(n,r)=>t.set({hour:Number.parseInt(r)})),t=>he.exports.seqMap(he.exports.string(":"),he.exports.regexp(/\d{2}/),(n,r)=>t.set({minute:Number.parseInt(r)})),t=>he.exports.seqMap(he.exports.string(":"),he.exports.regexp(/\d{2}/),(n,r)=>t.set({second:Number.parseInt(r)})),t=>he.exports.alt(he.exports.seqMap(he.exports.string("."),he.exports.regexp(/\d{3}/),(n,r)=>t.set({millisecond:Number.parseInt(r)})),he.exports.succeed(t)),t=>he.exports.alt(he.exports.seqMap(he.exports.string("+").or(he.exports.string("-")),he.exports.regexp(/\d{1,2}(:\d{2})?/),(n,r)=>t.setZone("UTC"+n+r,{keepLocalTime:!0})),he.exports.seqMap(he.exports.string("Z"),()=>t.setZone("utc",{keepLocalTime:!0})),he.exports.seqMap(he.exports.string("["),he.exports.regexp(/[0-9A-Za-z+-\/]+/u),he.exports.string("]"),(n,r,a)=>t.setZone(r,{keepLocalTime:!0})))).assert(t=>t.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:e=>he.exports.alt(e.dateShorthand.map(t=>mT[t]()),e.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:e=>he.exports.alt(...Object.keys(pT).sort((t,n)=>n.length-t.length).map(he.exports.string)),duration:e=>he.exports.seqMap(e.number,he.exports.optWhitespace,e.durationType,(t,n,r)=>pT[r].mapUnits(a=>a*t)).sepBy1(he.exports.string(",").trim(he.exports.optWhitespace).or(he.exports.optWhitespace)).map(t=>t.reduce((n,r)=>n.plus(r))).desc("duration like 4hr2min"),rawNull:e=>he.exports.string("null"),tagSource:e=>e.tag.map(t=>_l.tag(t)),csvSource:e=>he.exports.seqMap(he.exports.string("csv(").skip(he.exports.optWhitespace),e.string,he.exports.string(")"),(t,n,r)=>_l.csv(n)),linkIncomingSource:e=>e.link.map(t=>_l.link(t.path,!0)),linkOutgoingSource:e=>he.exports.seqMap(he.exports.string("outgoing(").skip(he.exports.optWhitespace),e.link,he.exports.string(")"),(t,n,r)=>_l.link(n.path,!1)),folderSource:e=>e.string.map(t=>_l.folder(t)),parensSource:e=>he.exports.seqMap(he.exports.string("("),he.exports.optWhitespace,e.source,he.exports.optWhitespace,he.exports.string(")"),(t,n,r,a,o)=>r),negateSource:e=>he.exports.seqMap(he.exports.alt(he.exports.string("-"),he.exports.string("!")),e.atomSource,(t,n)=>_l.negate(n)),atomSource:e=>he.exports.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>gg(e.atomSource,e.binaryBooleanOp.map(t=>t),_l.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain(t=>gT.includes(t.toUpperCase())?he.exports.fail("Variable fields cannot be a keyword ("+gT.join(" or ")+")"):he.exports.succeed(Fr.variable(t))).desc("variable"),numberField:e=>e.number.map(t=>Fr.literal(t)).desc("number"),stringField:e=>e.string.map(t=>Fr.literal(t)).desc("string"),boolField:e=>e.bool.map(t=>Fr.literal(t)).desc("boolean"),dateField:e=>he.exports.seqMap(he.exports.string("date("),he.exports.optWhitespace,e.datePlus,he.exports.optWhitespace,he.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("date"),durationField:e=>he.exports.seqMap(he.exports.string("dur("),he.exports.optWhitespace,e.duration,he.exports.optWhitespace,he.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("duration"),nullField:e=>e.rawNull.map(t=>Fr.NULL),linkField:e=>e.link.map(t=>Fr.literal(t)),listField:e=>e.field.sepBy(he.exports.string(",").trim(he.exports.optWhitespace)).wrap(he.exports.string("[").skip(he.exports.optWhitespace),he.exports.optWhitespace.then(he.exports.string("]"))).map(t=>Fr.list(t)).desc("list ('[1, 2, 3]')"),objectField:e=>he.exports.seqMap(e.identifier.or(e.string),he.exports.string(":").trim(he.exports.optWhitespace),e.field,(t,n,r)=>({name:t,value:r})).sepBy(he.exports.string(",").trim(he.exports.optWhitespace)).wrap(he.exports.string("{").skip(he.exports.optWhitespace),he.exports.optWhitespace.then(he.exports.string("}"))).map(t=>{let n={};for(let r of t)n[r.name]=r.value;return Fr.object(n)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:e=>he.exports.alt(e.date,e.duration.map(t=>i6(t)),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(he.exports.string(",").trim(he.exports.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>he.exports.alt(he.exports.seqMap(e.atomInlineField,he.exports.string(",").trim(he.exports.optWhitespace),e.inlineFieldList,(t,n,r)=>[t].concat(r)),e.atomInlineField),atomField:e=>he.exports.alt(e.embedLink.map(t=>Fr.literal(t)),e.negatedField,e.linkField,e.listField,e.objectField,e.lambdaField,e.parensField,e.boolField,e.numberField,e.stringField,e.dateField,e.durationField,e.nullField,e.variableField),indexField:e=>he.exports.seqMap(e.atomField,he.exports.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),(t,n)=>{let r=t;for(let a of n)switch(a.type){case"dot":r=Fr.index(r,Fr.literal(a.field));break;case"index":r=Fr.index(r,a.field);break;case"function":r=Fr.func(r,a.fields);break}return r}),negatedField:e=>he.exports.seqMap(he.exports.string("!"),e.indexField,(t,n)=>Fr.negate(n)).desc("negated field"),parensField:e=>he.exports.seqMap(he.exports.string("("),he.exports.optWhitespace,e.field,he.exports.optWhitespace,he.exports.string(")"),(t,n,r,a,o)=>r),lambdaField:e=>he.exports.seqMap(e.identifier.sepBy(he.exports.string(",").trim(he.exports.optWhitespace)).wrap(he.exports.string("(").trim(he.exports.optWhitespace),he.exports.string(")").trim(he.exports.optWhitespace)),he.exports.string("=>").trim(he.exports.optWhitespace),e.field,(t,n,r)=>({type:"lambda",arguments:t,value:r})),dotPostfix:e=>he.exports.seqMap(he.exports.string("."),e.identifier,(t,n)=>({type:"dot",field:n})),indexPostfix:e=>he.exports.seqMap(he.exports.string("["),he.exports.optWhitespace,e.field,he.exports.optWhitespace,he.exports.string("]"),(t,n,r,a,o)=>({type:"index",field:r})),functionPostfix:e=>he.exports.seqMap(he.exports.string("("),he.exports.optWhitespace,e.field.sepBy(he.exports.string(",").trim(he.exports.optWhitespace)),he.exports.optWhitespace,he.exports.string(")"),(t,n,r,a,o)=>({type:"function",fields:r})),binaryMulDivField:e=>gg(e.indexField,e.binaryMulDiv,Fr.binaryOp),binaryPlusMinusField:e=>gg(e.binaryMulDivField,e.binaryPlusMinus,Fr.binaryOp),binaryCompareField:e=>gg(e.binaryPlusMinusField,e.binaryCompareOp,Fr.binaryOp),binaryBooleanField:e=>gg(e.binaryCompareField,e.binaryBooleanOp,Fr.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});function vH(e){try{return xw.success(Ps.field.tryParse(e))}catch(t){return xw.failure(""+t)}}var Cw;(function(e){function t(r,a){return{name:r,field:a}}e.named=t;function n(r,a){return{field:r,direction:a}}e.sortBy=n})(Cw||(Cw={}));function yH(e){return he.exports.custom((t,n)=>(r,a)=>{let o=e._(r,a);return o.status?Object.assign({},o,{value:[o.value,r.substring(a,o.index)]}):o})}function wH(e){return e.split(/[\r\n]+/).map(t=>t.trim()).join("")}const bH=he.exports.createLanguage({queryType:e=>he.exports.alt(he.exports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(t=>t.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:e=>he.exports.seqMap(Ps.field.skip(he.exports.whitespace),he.exports.regexp(/AS/i).skip(he.exports.whitespace),Ps.identifier.or(Ps.string),(t,n,r)=>Cw.named(r,t)),namedField:e=>he.exports.alt(e.explicitNamedField,yH(Ps.field).map(([t,n])=>Cw.named(wH(n),t))),sortField:e=>he.exports.seqMap(Ps.field.skip(he.exports.optWhitespace),he.exports.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,n)=>{let r=n.length==0?"ascending":n[0].toLowerCase();return r=="desc"&&(r="descending"),r=="asc"&&(r="ascending"),{field:t,direction:r}}),headerClause:e=>e.queryType.skip(he.exports.whitespace).chain(t=>{switch(t){case"table":return he.exports.seqMap(he.exports.regexp(/WITHOUT\s+ID/i).skip(he.exports.optWhitespace).atMost(1),he.exports.sepBy(e.namedField,he.exports.string(",").trim(he.exports.optWhitespace)),(n,r)=>({type:"table",fields:r,showId:n.length==0}));case"list":return he.exports.seqMap(he.exports.regexp(/WITHOUT\s+ID/i).skip(he.exports.optWhitespace).atMost(1),Ps.field.atMost(1),(n,r)=>({type:"list",format:r.length==1?r[0]:void 0,showId:n.length==0}));case"task":return he.exports.succeed({type:"task"});case"calendar":return he.exports.seqMap(e.namedField,n=>({type:"calendar",showId:!0,field:n}));default:return he.exports.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>he.exports.seqMap(he.exports.regexp(/FROM/i),he.exports.whitespace,Ps.source,(t,n,r)=>r),whereClause:e=>he.exports.seqMap(he.exports.regexp(/WHERE/i),he.exports.whitespace,Ps.field,(t,n,r)=>({type:"where",clause:r})).desc("WHERE <expression>"),sortByClause:e=>he.exports.seqMap(he.exports.regexp(/SORT/i),he.exports.whitespace,e.sortField.sepBy1(he.exports.string(",").trim(he.exports.optWhitespace)),(t,n,r)=>({type:"sort",fields:r})).desc("SORT field [ASC/DESC]"),limitClause:e=>he.exports.seqMap(he.exports.regexp(/LIMIT/i),he.exports.whitespace,Ps.field,(t,n,r)=>({type:"limit",amount:r})).desc("LIMIT <value>"),flattenClause:e=>he.exports.seqMap(he.exports.regexp(/FLATTEN/i).skip(he.exports.whitespace),e.namedField,(t,n)=>({type:"flatten",field:n})).desc("FLATTEN <value> [AS <name>]"),groupByClause:e=>he.exports.seqMap(he.exports.regexp(/GROUP BY/i).skip(he.exports.whitespace),e.namedField,(t,n)=>({type:"group",field:n})).desc("GROUP BY <value> [AS <name>]"),clause:e=>he.exports.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>he.exports.seqMap(e.headerClause.trim(he.exports.optWhitespace),e.fromClause.trim(he.exports.optWhitespace).atMost(1),e.clause.trim(he.exports.optWhitespace).many(),(t,n,r)=>({header:t,source:n.length==0?_l.folder(""):n[0],operations:r,settings:F2}))}),SH=e=>{var t;return e?(t=e.plugins.plugins.dataview)===null||t===void 0?void 0:t.api:window.DataviewAPI},DH=e=>e.plugins.enabledPlugins.has("dataview");qu.DATE_SHORTHANDS=mT;qu.DURATION_TYPES=pT;qu.EXPRESSION=Ps;qu.KEYWORDS=gT;qu.QUERY_LANGUAGE=bH;var TH=qu.getAPI=SH;qu.isPluginEnabled=DH;qu.parseField=vH;async function IH(e,t,n,r,a){var I,M;const{vault:o,metadataCache:i}=Le.getState().dailyNotesState.app===void 0?app:Le.getState().dailyNotesState.app,l=Le.getState().dailyNotesState.settings,c=e.replace(/\n/g,"<br>");if(n===void 0)return;const f=i.getFirstLinkpathDest("",n),p=C.moment(),g=p.format("YYYYMMDDHHmmss"),y=r.slice(14),w=" ",T=g+" "+c.trim(),S=w+"- "+g+" "+c.trim();if(f){let N;if(l!=null&&l.CommentOnMemos&&(l!=null&&l.CommentsInOriginalNotes)){const L=TH();if(L!==void 0)try{N=(M=(I=L.page(f.path))==null?void 0:I.file.lists.values)==null?void 0:M.filter(H=>H.line===parseInt(y))}catch(H){console.error(H)}}const _=await o.read(f);let k=0;N[0].children.values.length>0?k=N[0].children.values[N[0].children.values.length-1].line:k=N[0].line;const R=await EH(S,_,k);if(await o.modify(f,R.content),t)return{id:g+(k+1),content:T,deletedAt:"",createdAt:p.format("YYYY/MM/DD HH:mm:ss"),updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:f.path,hasId:"",linkId:a}}}async function EH(e,t,n){if(n===-1)return{content:`${t}
${e}`,posNum:-1};const r=t.split(`
`),a=r.slice(0,n+1).join(`
`),o=r.slice(n+1).join(`
`);return/^\s*$/g.test(r[n+1])?{content:`${a}
${e}
${o}`,posNum:n}:{content:`${a}
${e}
${o}`,posNum:n}}function xH(e,t,n){var a;const r=t.workspace.getLeavesOfType("markdown");for(const o of r){const i=o.view;if(((a=i==null?void 0:i.file)==null?void 0:a.path)===e){t.workspace.revealLeaf(o);try{return o.view.setEphemeralState({line:n}),!0}catch(l){return console.error(l),!1}}}return!1}const R2=async e=>{var o;const t=ft.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const i of n){const l=i.view;if(((o=l==null?void 0:l.file)==null?void 0:o.path)===e){t.workspace.revealLeaf(i);return}}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new C.Notice(E("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},_2=async(e,t)=>{const{app:n}=ft.getState(),r=parseInt(e.slice(14));if(xH(t,n,r))return;const a=n.metadataCache.getFirstLinkpathDest("",t);if(!C.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(a,{eState:{line:r}});else{let o=n.workspace.activeLeaf;o===null&&(o=n.workspace.getLeaf(!0)),await o.openFile(a,{eState:{line:r}})}},B2=async(e,t)=>{var f,p,g;const n=ft.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new C.Notice(E("File not found for the given thino path"));return}let a="";try{a=await n.vault.read(r)}catch(y){console.error(y),a=await n.vault.cachedRead(r)}const i=a.split(/\r?\n/).findIndex(y=>y.contains(e)),l=n.workspace.getLeavesOfType("markdown");for(const y of l){const w=y.view;if(((f=w==null?void 0:w.file)==null?void 0:f.path)===r.path){n.workspace.revealLeaf(y);try{(p=y.view.editor)==null||p.setCursor({line:i,ch:1});return}catch(T){console.error(T)}}}const c=n.workspace.getLeaf(!0);await c.openFile(r,{eState:{line:i}});try{(g=c.view.editor)==null||g.setCursor({line:i,ch:1})}catch(y){console.error(y)}},H2=async(e,t)=>{var l;const n=ft.getState().app,r=(c,f)=>{var g;const p=(g=Array.from(c.nodes.values()))==null?void 0:g.find(y=>y.id===f);return p?(c.selectOnly(p),c.zoomToSelection(),!0):!1},a=n.workspace.getLeavesOfType("canvas");for(const c of a){const f=c.view;if(((l=f==null?void 0:f.file)==null?void 0:l.path)===t&&(n.workspace.revealLeaf(c),r(f.canvas,e)))return}const o=n.metadataCache.getFirstLinkpathDest("",t);if(!o){new C.Notice(E("File not found for the given thino path"));return}const i=n.workspace.getLeaf(!0);await i.openFile(o),setTimeout(()=>{var c;r((c=i.view)==null?void 0:c.canvas,e)},10)};class CH{constructor(){De(this,"initialized",!1)}getState(){return Le.getState().memoState}async fetchAllMemos(){const t=ft.getState().settings;ut.checkDailyInMulti(t);const n=await Ko.getMyMemos(t.EnabledLocationList.map(o=>o.value)),r=[...n.memos],a=[...n.commentMemos];return Le.dispatch({type:"SET_MEMOS",payload:{memos:r}}),Le.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:a}}),this.initialized||(this.initialized=!0,dt.setLoaded(!0)),r}async updateTypeMemos(t){const n=await Ko.updateSpecificTypeMemo(t),r=this.getState().memos.filter(a=>a.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await Ko.getMyDeletedMemos();return t.sort((n,r)=>ut.getTimeStampByDate(r.deletedAt)-ut.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){Le.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){Le.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),a=n.type==="local"?await gS(n.origin,n.isList,n.date):await kx(r);await this.replaceOldThinoWithNewThino(n.id,a),Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:n.id}})}}async replaceOldThinoWithNewThino(t,n){this.getMemoById(t)&&Le.dispatch({type:"REPLACE_MEMO_BY_ID",payload:{id:t,memo:n}})}async updateMemoById(t,n,r){const a=this.getMemoByWebId(t);if(!a)return;let o=null;const i=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType||"JOURNAL"};if(!KN({...a,deleted:!!n.deletedAt},{...i,webId:n.id}))return a;switch(a.sourceType){case"DAILY":o=await Rl(a,{id:a.id,webId:n.id,...i});break;case"CANVAS":o=await Ll(a,{id:a.id,webId:n.id,...i});break;case"MULTI":o=await js(a,{id:a.id,webId:n.id,...i});break;case"FILE":o=await jl(a,{id:a.id,webId:n.id,...i});break}if(!o)return a;Le.dispatch({type:"EDIT_MEMO",payload:o})}async archiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await Rl(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"CANVAS":a=await Ll(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"FILE":a=await jl(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async dealWithDailyThinoBulk(t,n,r){const a=await o_(t,n,r);return r==="deleteForever"?await this.deleteThinosWithIdBulk(a.map(o=>o.id)):this.editMemoBulk(a),a}async deleteThinosWithIdBulk(t){for(const n of t)Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:n}})}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Rl(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await Ll(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await jl(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){Le.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{originalId:t}})}async removePrepareUpdateThino(){Le.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await Rl(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"CANVAS":a=await Ll(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"FILE":a=await jl(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Rl(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await Ll(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await jl(t,{id:t.id,rowStatus:"NORMAL"});break}return Le.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 Rl(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await Ll(n,{id:n.id,deleted:!0});break;case"MULTI":r=await js(n,{id:n.id,deleted:!0});break;case"FILE":r=await jl(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await Ko.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await Ko.deleteMemoInDailyNote(r);break;case"CANVAS":await Ko.deleteMemoInCanvas(r);break;case"MULTI":await Ko.deleteMemoInMultiFiles(r);break;case"FILE":await Ko.deleteMemoInSingleFile(r);break}Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(l){console.error(l),new C.Notice(E("Failed to delete memo"))}if(n&&n==="local")return;const a=ft.getState().settings,o=ft.getState().app;!(o!=null&&o.loadLocalStorage("tokenForSync"))||!a.startSync||r.webId&&await I2(r.webId)}async removeMemosInFile(t,n){var a,o;const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if(t.path.contains("thino.canvas")){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if((a=t==null?void 0:t.parent)!=null&&a.path.contains(n)||!(t!=null&&t.parent)&&!((o=t==null?void 0:t.parent)!=null&&o.path)){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());l.length>0&&r.push(...l)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await iT(t,r);const i=r.map(l=>l.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:i}})}catch(i){console.error(i)}}async removeThinosByPath(t){const r=this.getState().memos.filter(a=>a.path===t).map(a=>a.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],a=async()=>{var o;if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await rA(t,r);return}else if(t.path.contains("thino.canvas")){await aA(t,r);return}else if((o=t==null?void 0:t.parent)!=null&&o.path.contains(n)&&!t.path.endsWith(".thino.md")){await nA(t,r);return}else if(t.path.endsWith(".thino.md")){console.error(t),await iT(t,r);return}};try{await a(),Le.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}})}catch(o){console.error(o)}}async updateMemoProperty(t){const n=ut.randomId(16),r=await js(t,{id:n});Le.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t){const n=t.webId;Le.dispatch({type:"EDIT_MEMO",payload:t});const r=ft.getState().settings,a=ft.getState().app;if(!(!(a!=null&&a.loadLocalStorage("tokenForSync"))||!r.startSync))try{t&&n&&mS({id:n,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?C.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE"})}catch(i){console.error(i)}}editMemoBulk(t){for(const n of t)this.editMemo(n);this.updateTagsState()}editCommentMemo(t){Le.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(a=>a.content.toLowerCase().includes(t==null?void 0:t.toLowerCase()))}updateTagsState(){const{memos:t}=this.getState(),n=new Set,r={};for(const a of t){const o=a.content.replace(/<[^>]*>/g,"").replace(/\`\`\`(.*)?\n[\s\S]*?\n\`\`\`/gm,"").replace(/\`([^\`].*?)\`/g,"");if(a.deletedAt!==""&&a.deletedAt)continue;[...Array.from(o.match($r)||[]),...Array.from(o.match(ua)||[]),...Array.from(o.match(Wa)||[])].forEach(l=>{const c=l.replace($r,"$1").replace(ua,"$1").replace(Wa,"$2").trim();/^\d+$/.test(c)||(n.add(c),r[c]=(r[c]||0)+1)})}Le.dispatch({type:"SET_TAGS",payload:{tags:Array.from(n),tagsNum:r}})}clearMemos(){Le.dispatch({type:"SET_MEMOS",payload:{memos:[]}})}async getLinkedMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes(t))}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 zR({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await VR({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&(n!=null&&n.some(o=>o.id===t.localId)))return await this.updateMemoById(t.localId,t,!0),null;if(n!=null&&n.some(o=>o.id===t.id)||n!=null&&n.some(o=>o.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const a=ft.getState().settings;switch(a&&(a!=null&&a.saveThinoType)&&(r=a.saveThinoType!=="FILE"?a.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await Mx(t);case"DAILY":return await kx(t);default:return await Mx(t)}}async initSync(){const n=this.getState().memos.filter(a=>!a.webId),r=await HR(n);for(const a of r)await this.createOrPatchThinoFromWeb(a)}async createMemoCanvas({text:t,isList:n}){return await WR({content:t,isList:n})}async createMemoDaily(t,n){return await gS(t,n)}setWaitingForTemplater({origin:t,date:n,isList:r,id:a,type:o}){Le.dispatch({type:"SET_WAITING_FOR_TEMPLATER",payload:{origin:t,date:n,isList:r,id:a,type:o}})}async pinMemoById(t){const n=this.getMemoById(t),r=await i_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await mS({id:r.webId,pinned:!0});this.editMemo(l)}}catch(a){console.error(a)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await s_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await mS({id:r.webId,pinned:!1});this.editMemo(l)}}catch(a){console.error(a)}}async createCommentMemo(t,n,r,a,o){return await IH(t,n,r,a,o)}async importMemos(t,n,r){return await gS(t,n,r)}async createThino({content:t,isList:n,type:r,name:a}){let o=null;switch(r.toLowerCase()){case"canvas":o=await be.createMemoCanvas({text:t,isList:n});break;case"multi":o=await be.createMemoMultiFile({content:t,isList:n,name:a});break;case"daily":o=await be.createMemoDaily(t,n);break;case"file":o=await be.createMemoSingleFile({content:t,isList:n});break;default:o=await be.createMemoDaily(t,n);break}const i=ft.getState().settings,l=ft.getState().app,c=l==null?void 0:l.loadLocalStorage("tokenForSync");return o&&c&&i.startSync&&r!=="DAILY"&&setTimeout(async()=>{try{const f=await T2({content:t,thinoType:"FILE"});await this.updateMemoById(o.id,f,!0)}catch(f){console.error(f)}},200),o}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await _2(n.id,n.path);break;case"CANVAS":await H2(n.id,n.path);break;case"MULTI":await R2(n.path);break;case"FILE":await B2(n.id,n.path);break}}async updateMemo(t,n,r){const a=this.getMemoById(t);if(a){let o=null;switch(a.sourceType){case"DAILY":o=await Rl(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"CANVAS":o=await Ll(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"MULTI":o=await js(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"FILE":o=await jl(a,{id:a.id,content:n,thinoType:r||a.thinoType})}if(o)return o}return a}}const be=new CH;class MH{getState(){return Le.getState().queryState}async getMyAllQueries(){const t=ot.getState().query.filter,n=this.getQueryById(t),r=await Ko.getMyQueries();return Le.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){Le.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){Le.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await Ko.deleteQueryById(t),Le.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await Ko.createQuery(t,n)}createTempQuery(t,n){return dR(t,n)}async updateQuery(t,n,r){return await Ko.updateQuery(t,n,r)}async pinQuery(t){await Ko.pinQuery(t)}async unpinQuery(t){await Ko.unpinQuery(t)}}const sn=new MH;class kH{async upload(t){const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=await t.arrayBuffer(),o=NH(t.type),i=Zu(),l=C.moment(),c=ub(l,i);let f;if(c)c instanceof C.TFile&&(f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,o,c),a));else{const p=await qN(l);f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,o,p),a)}return r.generateMarkdownLink(f,f.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const a=Array.from(r.getElementsByClassName("memo"));for(const o of a){const i=o.getElementsByClassName("content")[0],l=C.htmlToMarkdown(i.innerHTML),c=await be.importMemos(l,!0,C.moment(o.getElementsByClassName("time")[0].innerHTML));be.pushMemo(c)}}}const NH=e=>{var t;return(t=/^image\/(.+)$/.exec(e))==null?void 0:t[1]},Y2=new kH;var rs={},s6={exports:{}},Jo={},ES={exports:{}},xS={},iC;function AH(){return iC||(iC=1,function(e){function t(ie,de){var K=ie.length;ie.push(de);e:for(;0<K;){var ae=K-1>>>1,Se=ie[ae];if(0<a(Se,de))ie[ae]=de,ie[K]=Se,K=ae;else break e}}function n(ie){return ie.length===0?null:ie[0]}function r(ie){if(ie.length===0)return null;var de=ie[0],K=ie.pop();if(K!==de){ie[0]=K;e:for(var ae=0,Se=ie.length,je=Se>>>1;ae<je;){var Re=2*(ae+1)-1,Fe=ie[Re],Be=Re+1,Qe=ie[Be];if(0>a(Fe,K))Be<Se&&0>a(Qe,Fe)?(ie[ae]=Qe,ie[Be]=K,ae=Be):(ie[ae]=Fe,ie[Re]=K,ae=Re);else if(Be<Se&&0>a(Qe,K))ie[ae]=Qe,ie[Be]=K,ae=Be;else break e}}return de}function a(ie,de){var K=ie.sortIndex-de.sortIndex;return K!==0?K:ie.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],f=[],p=1,g=null,y=3,w=!1,T=!1,S=!1,I=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(ie){for(var de=n(f);de!==null;){if(de.callback===null)r(f);else if(de.startTime<=ie)r(f),de.sortIndex=de.expirationTime,t(c,de);else break;de=n(f)}}function k(ie){if(S=!1,_(ie),!T)if(n(c)!==null)T=!0,Z(R);else{var de=n(f);de!==null&&pe(k,de.startTime-ie)}}function R(ie,de){T=!1,S&&(S=!1,M(U),U=-1),w=!0;var K=y;try{for(_(de),g=n(c);g!==null&&(!(g.expirationTime>de)||ie&&!X());){var ae=g.callback;if(typeof ae=="function"){g.callback=null,y=g.priorityLevel;var Se=ae(g.expirationTime<=de);de=e.unstable_now(),typeof Se=="function"?g.callback=Se:g===n(c)&&r(c),_(de)}else r(c);g=n(c)}if(g!==null)var je=!0;else{var Re=n(f);Re!==null&&pe(k,Re.startTime-de),je=!1}return je}finally{g=null,y=K,w=!1}}var L=!1,H=null,U=-1,z=5,$=-1;function X(){return!(e.unstable_now()-$<z)}function Q(){if(H!==null){var ie=e.unstable_now();$=ie;var de=!0;try{de=H(!0,ie)}finally{de?se():(L=!1,H=null)}}else L=!1}var se;if(typeof N=="function")se=function(){N(Q)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,fe=ue.port2;ue.port1.onmessage=Q,se=function(){fe.postMessage(null)}}else se=function(){I(Q,0)};function Z(ie){H=ie,L||(L=!0,se())}function pe(ie,de){U=I(function(){ie(e.unstable_now())},de)}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(ie){ie.callback=null},e.unstable_continueExecution=function(){T||w||(T=!0,Z(R))},e.unstable_forceFrameRate=function(ie){0>ie||125<ie?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<ie?Math.floor(1e3/ie):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(ie){switch(y){case 1:case 2:case 3:var de=3;break;default:de=y}var K=y;y=de;try{return ie()}finally{y=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ie,de){switch(ie){case 1:case 2:case 3:case 4:case 5:break;default:ie=3}var K=y;y=ie;try{return de()}finally{y=K}},e.unstable_scheduleCallback=function(ie,de,K){var ae=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?ae+K:ae):K=ae,ie){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=K+Se,ie={id:p++,callback:de,priorityLevel:ie,startTime:K,expirationTime:Se,sortIndex:-1},K>ae?(ie.sortIndex=K,t(f,ie),n(c)===null&&ie===n(f)&&(S?(M(U),U=-1):S=!0,pe(k,K-ae))):(ie.sortIndex=Se,t(c,ie),T||w||(T=!0,Z(R))),ie},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(ie){var de=y;return function(){var K=y;y=de;try{return ie.apply(this,arguments)}finally{y=K}}}}(xS)),xS}var sC;function FH(){return sC||(sC=1,ES.exports=AH()),ES.exports}var lC;function OH(){if(lC)return Jo;lC=1;var e=P,t=FH();function n(s){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m<arguments.length;m++)u+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function o(s,u){i(s,u),i(s+"Capture",u)}function i(s,u){for(a[s]=u,s=0;s<u.length;s++)r.add(u[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},g={};function y(s){return c.call(g,s)?!0:c.call(p,s)?!1:f.test(s)?g[s]=!0:(p[s]=!0,!1)}function w(s,u,m,b){if(m!==null&&m.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return b?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function T(s,u,m,b){if(u===null||typeof u>"u"||w(s,u,m,b))return!0;if(b)return!1;if(m!==null)switch(m.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function S(s,u,m,b,x,O,W){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=b,this.attributeNamespace=x,this.mustUseProperty=m,this.propertyName=s,this.type=u,this.sanitizeURL=O,this.removeEmptyString=W}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){I[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var u=s[0];I[u]=new S(u,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){I[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){I[s]=new S(s,2,!1,s,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(s){I[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){I[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){I[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){I[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){I[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function N(s){return s[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(s){var u=s.replace(M,N);I[u]=new S(u,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var u=s.replace(M,N);I[u]=new S(u,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var u=s.replace(M,N);I[u]=new S(u,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){I[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),I.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){I[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function _(s,u,m,b){var x=I.hasOwnProperty(u)?I[u]:null;(x!==null?x.type!==0:b||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(T(u,m,x,b)&&(m=null),b||x===null?y(u)&&(m===null?s.removeAttribute(u):s.setAttribute(u,""+m)):x.mustUseProperty?s[x.propertyName]=m===null?x.type===3?!1:"":m:(u=x.attributeName,b=x.attributeNamespace,m===null?s.removeAttribute(u):(x=x.type,m=x===3||x===4&&m===!0?"":""+m,b?s.setAttributeNS(b,u,m):s.setAttribute(u,m))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),L=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),X=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),fe=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),ie=Symbol.iterator;function de(s){return s===null||typeof s!="object"?null:(s=ie&&s[ie]||s["@@iterator"],typeof s=="function"?s:null)}var K=Object.assign,ae;function Se(s){if(ae===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ae=u&&u[1]||""}return`
`+ae+s}var je=!1;function Re(s,u){if(!s||je)return"";je=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Pe){var b=Pe}Reflect.construct(s,[],u)}else{try{u.call()}catch(Pe){b=Pe}s.call(u.prototype)}else{try{throw Error()}catch(Pe){b=Pe}s()}}catch(Pe){if(Pe&&b&&typeof Pe.stack=="string"){for(var x=Pe.stack.split(`
`),O=b.stack.split(`
`),W=x.length-1,le=O.length-1;1<=W&&0<=le&&x[W]!==O[le];)le--;for(;1<=W&&0<=le;W--,le--)if(x[W]!==O[le]){if(W!==1||le!==1)do if(W--,le--,0>le||x[W]!==O[le]){var ge=`
`+x[W].replace(" at new "," at ");return s.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",s.displayName)),ge}while(1<=W&&0<=le);break}}}finally{je=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?Se(s):""}function Fe(s){switch(s.tag){case 5:return Se(s.type);case 16:return Se("Lazy");case 13:return Se("Suspense");case 19:return Se("SuspenseList");case 0:case 2:case 15:return s=Re(s.type,!1),s;case 11:return s=Re(s.type.render,!1),s;case 1:return s=Re(s.type,!0),s;default:return""}}function Be(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case H:return"Fragment";case L:return"Portal";case z:return"Profiler";case U:return"StrictMode";case se:return"Suspense";case ue:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case X:return(s.displayName||"Context")+".Consumer";case $:return(s._context.displayName||"Context")+".Provider";case Q:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case fe:return u=s.displayName||null,u!==null?u:Be(s.type)||"Memo";case Z:u=s._payload,s=s._init;try{return Be(s(u))}catch{}}return null}function Qe(s){var u=s.type;switch(s.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=u.render,s=s.displayName||s.name||"",u.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(u);case 8:return u===U?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Ze(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function st(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function xt(s){var u=st(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),b=""+s[u];if(!s.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,O=m.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return x.call(this)},set:function(W){b=""+W,O.call(this,W)}}),Object.defineProperty(s,u,{enumerable:m.enumerable}),{getValue:function(){return b},setValue:function(W){b=""+W},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function tn(s){s._valueTracker||(s._valueTracker=xt(s))}function _e(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var m=u.getValue(),b="";return s&&(b=st(s)?s.checked?"true":"false":s.value),s=b,s!==m?(u.setValue(s),!0):!1}function Xe(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function tt(s,u){var m=u.checked;return K({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function ht(s,u){var m=u.defaultValue==null?"":u.defaultValue,b=u.checked!=null?u.checked:u.defaultChecked;m=Ze(u.value!=null?u.value:m),s._wrapperState={initialChecked:b,initialValue:m,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function St(s,u){u=u.checked,u!=null&&_(s,"checked",u,!1)}function Tt(s,u){St(s,u);var m=Ze(u.value),b=u.type;if(m!=null)b==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(b==="submit"||b==="reset"){s.removeAttribute("value");return}u.hasOwnProperty("value")?_t(s,u.type,m):u.hasOwnProperty("defaultValue")&&_t(s,u.type,Ze(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(s.defaultChecked=!!u.defaultChecked)}function Gt(s,u,m){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var b=u.type;if(!(b!=="submit"&&b!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+s._wrapperState.initialValue,m||u===s.value||(s.value=u),s.defaultValue=u}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function _t(s,u,m){(u!=="number"||Xe(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var Vt=Array.isArray;function Xt(s,u,m,b){if(s=s.options,u){u={};for(var x=0;x<m.length;x++)u["$"+m[x]]=!0;for(m=0;m<s.length;m++)x=u.hasOwnProperty("$"+s[m].value),s[m].selected!==x&&(s[m].selected=x),x&&b&&(s[m].defaultSelected=!0)}else{for(m=""+Ze(m),u=null,x=0;x<s.length;x++){if(s[x].value===m){s[x].selected=!0,b&&(s[x].defaultSelected=!0);return}u!==null||s[x].disabled||(u=s[x])}u!==null&&(u.selected=!0)}}function dn(s,u){if(u.dangerouslySetInnerHTML!=null)throw Error(n(91));return K({},u,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function en(s,u){var m=u.value;if(m==null){if(m=u.children,u=u.defaultValue,m!=null){if(u!=null)throw Error(n(92));if(Vt(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),m=u}s._wrapperState={initialValue:Ze(m)}}function Zn(s,u){var m=Ze(u.value),b=Ze(u.defaultValue);m!=null&&(m=""+m,m!==s.value&&(s.value=m),u.defaultValue==null&&s.defaultValue!==m&&(s.defaultValue=m)),b!=null&&(s.defaultValue=""+b)}function kn(s){var u=s.textContent;u===s._wrapperState.initialValue&&u!==""&&u!==null&&(s.value=u)}function Er(s){switch(s){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 pt(s,u){return s==null||s==="http://www.w3.org/1999/xhtml"?Er(u):s==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Mt,Jt=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,m,b,x){MSApp.execUnsafeLocalFunction(function(){return s(u,m,b,x)})}:s}(function(s,u){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=u;else{for(Mt=Mt||document.createElement("div"),Mt.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=Mt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}});function on(s,u){if(u){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=u;return}}s.textContent=u}var ln={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},vr=["Webkit","ms","Moz","O"];Object.keys(ln).forEach(function(s){vr.forEach(function(u){u=u+s.charAt(0).toUpperCase()+s.substring(1),ln[u]=ln[s]})});function fr(s,u,m){return u==null||typeof u=="boolean"||u===""?"":m||typeof u!="number"||u===0||ln.hasOwnProperty(s)&&ln[s]?(""+u).trim():u+"px"}function ha(s,u){s=s.style;for(var m in u)if(u.hasOwnProperty(m)){var b=m.indexOf("--")===0,x=fr(m,u[m],b);m==="float"&&(m="cssFloat"),b?s.setProperty(m,x):s[m]=x}}var jr=K({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 nr(s,u){if(u){if(jr[s]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function Lr(s,u){if(s.indexOf("-")===-1)return typeof u.is=="string";switch(s){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 te=null;function me(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ce=null,Ye=null,He=null;function Ke(s){if(s=ga(s)){if(typeof Ce!="function")throw Error(n(280));var u=s.stateNode;u&&(u=Kf(u),Ce(s.stateNode,s.type,u))}}function et(s){Ye?He?He.push(s):He=[s]:Ye=s}function kt(){if(Ye){var s=Ye,u=He;if(He=Ye=null,Ke(s),u)for(s=0;s<u.length;s++)Ke(u[s])}}function Yt(s,u){return s(u)}function On(){}var vn=!1;function xr(s,u,m){if(vn)return s(u,m);vn=!0;try{return Yt(s,u,m)}finally{vn=!1,(Ye!==null||He!==null)&&(On(),kt())}}function Jn(s,u){var m=s.stateNode;if(m===null)return null;var b=Kf(m);if(b===null)return null;m=b[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(s=s.type,b=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!b;break e;default:s=!1}if(s)return null;if(m&&typeof m!="function")throw Error(n(231,u,typeof m));return m}var yr=!1;if(l)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){yr=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{yr=!1}function Pi(s,u,m,b,x,O,W,le,ge){var Pe=Array.prototype.slice.call(arguments,3);try{u.apply(m,Pe)}catch(Ge){this.onError(Ge)}}var Nn=!1,Aa=null,Fa=!1,Zr=null,fo={onError:function(s){Nn=!0,Aa=s}};function Oa(s,u,m,b,x,O,W,le,ge){Nn=!1,Aa=null,Pi.apply(fo,arguments)}function ru(s,u,m,b,x,O,W,le,ge){if(Oa.apply(this,arguments),Nn){if(Nn){var Pe=Aa;Nn=!1,Aa=null}else throw Error(n(198));Fa||(Fa=!0,Zr=Pe)}}function si(s){var u=s,m=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,u.flags&4098&&(m=u.return),s=u.return;while(s)}return u.tag===3?m:null}function li(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function Xu(s){if(si(s)!==s)throw Error(n(188))}function au(s){var u=s.alternate;if(!u){if(u=si(s),u===null)throw Error(n(188));return u!==s?null:s}for(var m=s,b=u;;){var x=m.return;if(x===null)break;var O=x.alternate;if(O===null){if(b=x.return,b!==null){m=b;continue}break}if(x.child===O.child){for(O=x.child;O;){if(O===m)return Xu(x),s;if(O===b)return Xu(x),u;O=O.sibling}throw Error(n(188))}if(m.return!==b.return)m=x,b=O;else{for(var W=!1,le=x.child;le;){if(le===m){W=!0,m=x,b=O;break}if(le===b){W=!0,b=x,m=O;break}le=le.sibling}if(!W){for(le=O.child;le;){if(le===m){W=!0,m=O,b=x;break}if(le===b){W=!0,b=O,m=x;break}le=le.sibling}if(!W)throw Error(n(189))}}if(m.alternate!==b)throw Error(n(190))}if(m.tag!==3)throw Error(n(188));return m.stateNode.current===m?s:u}function us(s){return s=au(s),s!==null?ji(s):null}function ji(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var u=ji(s);if(u!==null)return u;s=s.sibling}return null}var cs=t.unstable_scheduleCallback,ou=t.unstable_cancelCallback,ds=t.unstable_shouldYield,ec=t.unstable_requestPaint,An=t.unstable_now,na=t.unstable_getCurrentPriorityLevel,Zs=t.unstable_ImmediatePriority,qs=t.unstable_UserBlockingPriority,ui=t.unstable_NormalPriority,iu=t.unstable_LowPriority,Fo=t.unstable_IdlePriority,ho=null,Pa=null;function fs(s){if(Pa&&typeof Pa.onCommitFiberRoot=="function")try{Pa.onCommitFiberRoot(ho,s,void 0,(s.current.flags&128)===128)}catch{}}var Rr=Math.clz32?Math.clz32:Ks,Gs=Math.log,Js=Math.LN2;function Ks(s){return s>>>=0,s===0?32:31-(Gs(s)/Js|0)|0}var po=64,hs=4194304;function ci(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function mo(s,u){var m=s.pendingLanes;if(m===0)return 0;var b=0,x=s.suspendedLanes,O=s.pingedLanes,W=m&268435455;if(W!==0){var le=W&~x;le!==0?b=ci(le):(O&=W,O!==0&&(b=ci(O)))}else W=m&~x,W!==0?b=ci(W):O!==0&&(b=ci(O));if(b===0)return 0;if(u!==0&&u!==b&&!(u&x)&&(x=b&-b,O=u&-u,x>=O||x===16&&(O&4194240)!==0))return u;if(b&4&&(b|=m&16),u=s.entangledLanes,u!==0)for(s=s.entanglements,u&=b;0<u;)m=31-Rr(u),x=1<<m,b|=s[m],u&=~x;return b}function A(s,u){switch(s){case 1:case 2:case 4:return u+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 u+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 Y(s,u){for(var m=s.suspendedLanes,b=s.pingedLanes,x=s.expirationTimes,O=s.pendingLanes;0<O;){var W=31-Rr(O),le=1<<W,ge=x[W];ge===-1?(!(le&m)||le&b)&&(x[W]=A(le,u)):ge<=u&&(s.expiredLanes|=le),O&=~le}}function J(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function oe(){var s=po;return po<<=1,!(po&4194240)&&(po=64),s}function Ne(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function Ie(s,u,m){s.pendingLanes|=u,u!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,u=31-Rr(u),s[u]=m}function Ue(s,u){var m=s.pendingLanes&~u;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=u,s.mutableReadLanes&=u,s.entangledLanes&=u,u=s.entanglements;var b=s.eventTimes;for(s=s.expirationTimes;0<m;){var x=31-Rr(m),O=1<<x;u[x]=0,b[x]=-1,s[x]=-1,m&=~O}}function it(s,u){var m=s.entangledLanes|=u;for(s=s.entanglements;m;){var b=31-Rr(m),x=1<<b;x&u|s[b]&u&&(s[b]|=u),m&=~x}}var ct=0;function Ft(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var $t,Pn,Ga,ja,ra,Oo=!1,La=[],Ja=null,pa=null,go=null,Ra=new Map,Li=new Map,Ri=[],sm="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 jf(s,u){switch(s){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":go=null;break;case"pointerover":case"pointerout":Ra.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Li.delete(u.pointerId)}}function ps(s,u,m,b,x,O){return s===null||s.nativeEvent!==O?(s={blockedOn:u,domEventName:m,eventSystemFlags:b,nativeEvent:O,targetContainers:[x]},u!==null&&(u=ga(u),u!==null&&Pn(u)),s):(s.eventSystemFlags|=b,u=s.targetContainers,x!==null&&u.indexOf(x)===-1&&u.push(x),s)}function lm(s,u,m,b,x){switch(u){case"focusin":return Ja=ps(Ja,s,u,m,b,x),!0;case"dragenter":return pa=ps(pa,s,u,m,b,x),!0;case"mouseover":return go=ps(go,s,u,m,b,x),!0;case"pointerover":var O=x.pointerId;return Ra.set(O,ps(Ra.get(O)||null,s,u,m,b,x)),!0;case"gotpointercapture":return O=x.pointerId,Li.set(O,ps(Li.get(O)||null,s,u,m,b,x)),!0}return!1}function Po(s){var u=Ui(s.target);if(u!==null){var m=si(u);if(m!==null){if(u=m.tag,u===13){if(u=li(m),u!==null){s.blockedOn=u,ra(s.priority,function(){Ga(m)});return}}else if(u===3&&m.stateNode.current.memoizedState.isDehydrated){s.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Qs(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var m=el(s.domEventName,s.eventSystemFlags,u[0],s.nativeEvent);if(m===null){m=s.nativeEvent;var b=new m.constructor(m.type,m);te=b,m.target.dispatchEvent(b),te=null}else return u=ga(m),u!==null&&Pn(u),s.blockedOn=m,!1;u.shift()}return!0}function su(s,u,m){Qs(s)&&m.delete(u)}function Bn(){Oo=!1,Ja!==null&&Qs(Ja)&&(Ja=null),pa!==null&&Qs(pa)&&(pa=null),go!==null&&Qs(go)&&(go=null),Ra.forEach(su),Li.forEach(su)}function fn(s,u){s.blockedOn===u&&(s.blockedOn=null,Oo||(Oo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bn)))}function hn(s){function u(x){return fn(x,s)}if(0<La.length){fn(La[0],s);for(var m=1;m<La.length;m++){var b=La[m];b.blockedOn===s&&(b.blockedOn=null)}}for(Ja!==null&&fn(Ja,s),pa!==null&&fn(pa,s),go!==null&&fn(go,s),Ra.forEach(u),Li.forEach(u),m=0;m<Ri.length;m++)b=Ri[m],b.blockedOn===s&&(b.blockedOn=null);for(;0<Ri.length&&(m=Ri[0],m.blockedOn===null);)Po(m),m.blockedOn===null&&Ri.shift()}var jo=k.ReactCurrentBatchConfig,vo=!0;function tc(s,u,m,b){var x=ct,O=jo.transition;jo.transition=null;try{ct=1,nc(s,u,m,b)}finally{ct=x,jo.transition=O}}function ms(s,u,m,b){var x=ct,O=jo.transition;jo.transition=null;try{ct=4,nc(s,u,m,b)}finally{ct=x,jo.transition=O}}function nc(s,u,m,b){if(vo){var x=el(s,u,m,b);if(x===null)hm(s,u,b,Xs,m),jf(s,b);else if(lm(x,s,u,m,b))b.stopPropagation();else if(jf(s,b),u&4&&-1<sm.indexOf(s)){for(;x!==null;){var O=ga(x);if(O!==null&&$t(O),O=el(s,u,m,b),O===null&&hm(s,u,b,Xs,m),O===x)break;x=O}x!==null&&b.stopPropagation()}else hm(s,u,b,null,m)}}var Xs=null;function el(s,u,m,b){if(Xs=null,s=me(b),s=Ui(s),s!==null)if(u=si(s),u===null)s=null;else if(m=u.tag,m===13){if(s=li(u),s!==null)return s;s=null}else if(m===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null);return Xs=s,null}function cd(s){switch(s){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(na()){case Zs:return 1;case qs:return 4;case ui:case iu:return 16;case Fo:return 536870912;default:return 16}default:return 16}}var zn=null,tl=null,Lo=null;function dd(){if(Lo)return Lo;var s,u=tl,m=u.length,b,x="value"in zn?zn.value:zn.textContent,O=x.length;for(s=0;s<m&&u[s]===x[s];s++);var W=m-s;for(b=1;b<=W&&u[m-b]===x[O-b];b++);return Lo=x.slice(s,1<b?1-b:void 0)}function di(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function qr(){return!0}function nl(){return!1}function Gr(s){function u(m,b,x,O,W){this._reactName=m,this._targetInst=x,this.type=b,this.nativeEvent=O,this.target=W,this.currentTarget=null;for(var le in s)s.hasOwnProperty(le)&&(m=s[le],this[le]=m?m(O):O[le]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?qr:nl,this.isPropagationStopped=nl,this}return K(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=qr)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=qr)},persist:function(){},isPersistent:qr}),u}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_i=Gr(gs),rl=K({},gs,{view:0,detail:0}),rc=Gr(rl),Cr,vs,wr,lu=K({},rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==wr&&(wr&&s.type==="mousemove"?(Cr=s.screenX-wr.screenX,vs=s.screenY-wr.screenY):vs=Cr=0,wr=s),Cr)},movementY:function(s){return"movementY"in s?s.movementY:vs}}),ac=Gr(lu),fi=K({},lu,{dataTransfer:0}),al=Gr(fi),aa=K({},rl,{relatedTarget:0}),jn=Gr(aa),Ro=K({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),fd=Gr(Ro),Lf=K({},gs,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),ol=Gr(Lf),Rf=K({},gs,{data:0}),hd=Gr(Rf),oc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uu={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"},cu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ys(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=cu[s])?!!u[s]:!1}function ic(){return ys}var sc=K({},rl,{key:function(s){if(s.key){var u=oc[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=di(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?uu[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(s){return s.type==="keypress"?di(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?di(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),pd=Gr(sc),F=K({},lu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),B=Gr(F),q=K({},rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),re=Gr(q),Ae=K({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ee=Gr(Ae),Ve=K({},lu,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),at=Gr(Ve),It=[9,13,27,32],Kt=l&&"CompositionEvent"in window,Rt=null;l&&"documentMode"in document&&(Rt=document.documentMode);var Hn=l&&"TextEvent"in window&&!Rt,oa=l&&(!Kt||Rt&&8<Rt&&11>=Rt),Ka=" ",Qa=!1;function du(s,u){switch(s){case"keyup":return It.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function md(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Bi=!1;function lc(s,u){switch(s){case"compositionend":return md(u);case"keypress":return u.which!==32?null:(Qa=!0,Ka);case"textInput":return s=u.data,s===Ka&&Qa?null:s;default:return null}}function M1(s,u){if(Bi)return s==="compositionend"||!Kt&&du(s,u)?(s=dd(),Lo=tl=zn=null,Bi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return oa&&u.locale!=="ko"?null:u.data;default:return null}}var k1={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 _f(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!k1[s.type]:u==="textarea"}function um(s,u,m,b){et(b),u=Zf(u,"onChange"),0<u.length&&(m=new _i("onChange","change",null,m,b),s.push({event:m,listeners:u}))}var _o=null,il=null;function N1(s){yy(s,0)}function Bf(s){var u=nn(s);if(_e(u))return s}function A1(s,u){if(s==="change")return u}var fu=!1;if(l){var yo;if(l){var Hf="oninput"in document;if(!Hf){var fy=document.createElement("div");fy.setAttribute("oninput","return;"),Hf=typeof fy.oninput=="function"}yo=Hf}else yo=!1;fu=yo&&(!document.documentMode||9<document.documentMode)}function hy(){_o&&(_o.detachEvent("onpropertychange",py),il=_o=null)}function py(s){if(s.propertyName==="value"&&Bf(il)){var u=[];um(u,il,s,me(s)),xr(N1,u)}}function F1(s,u,m){s==="focusin"?(hy(),_o=u,il=m,_o.attachEvent("onpropertychange",py)):s==="focusout"&&hy()}function O1(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Bf(il)}function uc(s,u){if(s==="click")return Bf(u)}function we(s,u){if(s==="input"||s==="change")return Bf(u)}function ze(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Oe=typeof Object.is=="function"?Object.is:ze;function vt(s,u){if(Oe(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var m=Object.keys(s),b=Object.keys(u);if(m.length!==b.length)return!1;for(b=0;b<m.length;b++){var x=m[b];if(!c.call(u,x)||!Oe(s[x],u[x]))return!1}return!0}function Qt(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Dn(s,u){var m=Qt(s);s=0;for(var b;m;){if(m.nodeType===3){if(b=s+m.textContent.length,s<=u&&b>=u)return{node:m,offset:u-s};s=b}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Qt(m)}}function Mr(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?Mr(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function Yn(){for(var s=window,u=Xe();u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=Xe(s.document)}return u}function gd(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}function P1(s){var u=Yn(),m=s.focusedElem,b=s.selectionRange;if(u!==m&&m&&m.ownerDocument&&Mr(m.ownerDocument.documentElement,m)){if(b!==null&&gd(m)){if(u=b.start,s=b.end,s===void 0&&(s=u),"selectionStart"in m)m.selectionStart=u,m.selectionEnd=Math.min(s,m.value.length);else if(s=(u=m.ownerDocument||document)&&u.defaultView||window,s.getSelection){s=s.getSelection();var x=m.textContent.length,O=Math.min(b.start,x);b=b.end===void 0?O:Math.min(b.end,x),!s.extend&&O>b&&(x=b,b=O,O=x),x=Dn(m,O);var W=Dn(m,b);x&&W&&(s.rangeCount!==1||s.anchorNode!==x.node||s.anchorOffset!==x.offset||s.focusNode!==W.node||s.focusOffset!==W.offset)&&(u=u.createRange(),u.setStart(x.node,x.offset),s.removeAllRanges(),O>b?(s.addRange(u),s.extend(W.node,W.offset)):(u.setEnd(W.node,W.offset),s.addRange(u)))}}for(u=[],s=m;s=s.parentNode;)s.nodeType===1&&u.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<u.length;m++)s=u[m],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Bo=l&&"documentMode"in document&&11>=document.documentMode,ws=null,cm=null,Hi=null,cc=!1;function vd(s,u,m){var b=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;cc||ws==null||ws!==Xe(b)||(b=ws,"selectionStart"in b&&gd(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Hi&&vt(Hi,b)||(Hi=b,b=Zf(cm,"onSelect"),0<b.length&&(u=new _i("onSelect","select",null,u,m),s.push({event:u,listeners:b}),u.target=ws)))}function Tn(s,u){var m={};return m[s.toLowerCase()]=u.toLowerCase(),m["Webkit"+s]="webkit"+u,m["Moz"+s]="moz"+u,m}var dc={animationend:Tn("Animation","AnimationEnd"),animationiteration:Tn("Animation","AnimationIteration"),animationstart:Tn("Animation","AnimationStart"),transitionend:Tn("Transition","TransitionEnd")},Yf={},yd={};l&&(yd=document.createElement("div").style,"AnimationEvent"in window||(delete dc.animationend.animation,delete dc.animationiteration.animation,delete dc.animationstart.animation),"TransitionEvent"in window||delete dc.transitionend.transition);function Uf(s){if(Yf[s])return Yf[s];if(!dc[s])return s;var u=dc[s],m;for(m in u)if(u.hasOwnProperty(m)&&m in yd)return Yf[s]=u[m];return s}var my=Uf("animationend"),gy=Uf("animationiteration"),wd=Uf("animationstart"),bs=Uf("transitionend"),bd=new Map,dm="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 hi(s,u){bd.set(s,u),o(u,[s])}for(var zf=0;zf<dm.length;zf++){var Vf=dm[zf],Wf=Vf.toLowerCase(),vy=Vf[0].toUpperCase()+Vf.slice(1);hi(Wf,"on"+vy)}hi(my,"onAnimationEnd"),hi(gy,"onAnimationIteration"),hi(wd,"onAnimationStart"),hi("dblclick","onDoubleClick"),hi("focusin","onFocus"),hi("focusout","onBlur"),hi(bs,"onTransitionEnd"),i("onMouseEnter",["mouseout","mouseover"]),i("onMouseLeave",["mouseout","mouseover"]),i("onPointerEnter",["pointerout","pointerover"]),i("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ss="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(" "),hu=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ss));function Sd(s,u,m){var b=s.type||"unknown-event";s.currentTarget=m,ru(b,u,void 0,s),s.currentTarget=null}function yy(s,u){u=(u&4)!==0;for(var m=0;m<s.length;m++){var b=s[m],x=b.event;b=b.listeners;e:{var O=void 0;if(u)for(var W=b.length-1;0<=W;W--){var le=b[W],ge=le.instance,Pe=le.currentTarget;if(le=le.listener,ge!==O&&x.isPropagationStopped())break e;Sd(x,le,Pe),O=ge}else for(W=0;W<b.length;W++){if(le=b[W],ge=le.instance,Pe=le.currentTarget,le=le.listener,ge!==O&&x.isPropagationStopped())break e;Sd(x,le,Pe),O=ge}}}if(Fa)throw s=Zr,Fa=!1,Zr=null,s}function Kn(s,u){var m=u[Jf];m===void 0&&(m=u[Jf]=new Set);var b=s+"__bubble";m.has(b)||($f(u,s,2,!1),m.add(b))}function fm(s,u,m){var b=0;u&&(b|=4),$f(m,s,b,u)}var pu="_reactListening"+Math.random().toString(36).slice(2);function sl(s){if(!s[pu]){s[pu]=!0,r.forEach(function(m){m!=="selectionchange"&&(hu.has(m)||fm(m,!1,s),fm(m,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[pu]||(u[pu]=!0,fm("selectionchange",!1,u))}}function $f(s,u,m,b){switch(cd(u)){case 1:var x=tc;break;case 4:x=ms;break;default:x=nc}m=x.bind(null,u,m,s),x=void 0,!yr||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(x=!0),b?x!==void 0?s.addEventListener(u,m,{capture:!0,passive:x}):s.addEventListener(u,m,!0):x!==void 0?s.addEventListener(u,m,{passive:x}):s.addEventListener(u,m,!1)}function hm(s,u,m,b,x){var O=b;if(!(u&1)&&!(u&2)&&b!==null)e:for(;;){if(b===null)return;var W=b.tag;if(W===3||W===4){var le=b.stateNode.containerInfo;if(le===x||le.nodeType===8&&le.parentNode===x)break;if(W===4)for(W=b.return;W!==null;){var ge=W.tag;if((ge===3||ge===4)&&(ge=W.stateNode.containerInfo,ge===x||ge.nodeType===8&&ge.parentNode===x))return;W=W.return}for(;le!==null;){if(W=Ui(le),W===null)return;if(ge=W.tag,ge===5||ge===6){b=O=W;continue e}le=le.parentNode}}b=b.return}xr(function(){var Pe=O,Ge=me(m),nt=[];e:{var qe=bd.get(s);if(qe!==void 0){var yt=_i,Dt=s;switch(s){case"keypress":if(di(m)===0)break e;case"keydown":case"keyup":yt=pd;break;case"focusin":Dt="focus",yt=jn;break;case"focusout":Dt="blur",yt=jn;break;case"beforeblur":case"afterblur":yt=jn;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":yt=ac;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":yt=al;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":yt=re;break;case my:case gy:case wd:yt=fd;break;case bs:yt=Ee;break;case"scroll":yt=rc;break;case"wheel":yt=at;break;case"copy":case"cut":case"paste":yt=ol;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":yt=B}var Et=(u&4)!==0,br=!Et&&s==="scroll",xe=Et?qe!==null?qe+"Capture":null:qe;Et=[];for(var ye=Pe,Me;ye!==null;){Me=ye;var lt=Me.stateNode;if(Me.tag===5&&lt!==null&&(Me=lt,xe!==null&&(lt=Jn(ye,xe),lt!=null&&Et.push(fc(ye,lt,Me)))),br)break;ye=ye.return}0<Et.length&&(qe=new yt(qe,Dt,null,m,Ge),nt.push({event:qe,listeners:Et}))}}if(!(u&7)){e:{if(qe=s==="mouseover"||s==="pointerover",yt=s==="mouseout"||s==="pointerout",qe&&m!==te&&(Dt=m.relatedTarget||m.fromElement)&&(Ui(Dt)||Dt[wo]))break e;if((yt||qe)&&(qe=Ge.window===Ge?Ge:(qe=Ge.ownerDocument)?qe.defaultView||qe.parentWindow:window,yt?(Dt=m.relatedTarget||m.toElement,yt=Pe,Dt=Dt?Ui(Dt):null,Dt!==null&&(br=si(Dt),Dt!==br||Dt.tag!==5&&Dt.tag!==6)&&(Dt=null)):(yt=null,Dt=Pe),yt!==Dt)){if(Et=ac,lt="onMouseLeave",xe="onMouseEnter",ye="mouse",(s==="pointerout"||s==="pointerover")&&(Et=B,lt="onPointerLeave",xe="onPointerEnter",ye="pointer"),br=yt==null?qe:nn(yt),Me=Dt==null?qe:nn(Dt),qe=new Et(lt,ye+"leave",yt,m,Ge),qe.target=br,qe.relatedTarget=Me,lt=null,Ui(Ge)===Pe&&(Et=new Et(xe,ye+"enter",Dt,m,Ge),Et.target=Me,Et.relatedTarget=br,lt=Et),br=lt,yt&&Dt)t:{for(Et=yt,xe=Dt,ye=0,Me=Et;Me;Me=hc(Me))ye++;for(Me=0,lt=xe;lt;lt=hc(lt))Me++;for(;0<ye-Me;)Et=hc(Et),ye--;for(;0<Me-ye;)xe=hc(xe),Me--;for(;ye--;){if(Et===xe||xe!==null&&Et===xe.alternate)break t;Et=hc(Et),xe=hc(xe)}Et=null}else Et=null;yt!==null&&kr(nt,qe,yt,Et,!1),Dt!==null&&br!==null&&kr(nt,br,Dt,Et,!0)}}e:{if(qe=Pe?nn(Pe):window,yt=qe.nodeName&&qe.nodeName.toLowerCase(),yt==="select"||yt==="input"&&qe.type==="file")var Ct=A1;else if(_f(qe))if(fu)Ct=we;else{Ct=O1;var Pt=F1}else(yt=qe.nodeName)&&yt.toLowerCase()==="input"&&(qe.type==="checkbox"||qe.type==="radio")&&(Ct=uc);if(Ct&&(Ct=Ct(s,Pe))){um(nt,Ct,m,Ge);break e}Pt&&Pt(s,qe,Pe),s==="focusout"&&(Pt=qe._wrapperState)&&Pt.controlled&&qe.type==="number"&&_t(qe,"number",qe.value)}switch(Pt=Pe?nn(Pe):window,s){case"focusin":(_f(Pt)||Pt.contentEditable==="true")&&(ws=Pt,cm=Pe,Hi=null);break;case"focusout":Hi=cm=ws=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,vd(nt,m,Ge);break;case"selectionchange":if(Bo)break;case"keydown":case"keyup":vd(nt,m,Ge)}var jt;if(Kt)e:{switch(s){case"compositionstart":var Wt="onCompositionStart";break e;case"compositionend":Wt="onCompositionEnd";break e;case"compositionupdate":Wt="onCompositionUpdate";break e}Wt=void 0}else Bi?du(s,m)&&(Wt="onCompositionEnd"):s==="keydown"&&m.keyCode===229&&(Wt="onCompositionStart");Wt&&(oa&&m.locale!=="ko"&&(Bi||Wt!=="onCompositionStart"?Wt==="onCompositionEnd"&&Bi&&(jt=dd()):(zn=Ge,tl="value"in zn?zn.value:zn.textContent,Bi=!0)),Pt=Zf(Pe,Wt),0<Pt.length&&(Wt=new hd(Wt,s,null,m,Ge),nt.push({event:Wt,listeners:Pt}),jt?Wt.data=jt:(jt=md(m),jt!==null&&(Wt.data=jt)))),(jt=Hn?lc(s,m):M1(s,m))&&(Pe=Zf(Pe,"onBeforeInput"),0<Pe.length&&(Ge=new hd("onBeforeInput","beforeinput",null,m,Ge),nt.push({event:Ge,listeners:Pe}),Ge.data=jt))}yy(nt,u)})}function fc(s,u,m){return{instance:s,listener:u,currentTarget:m}}function Zf(s,u){for(var m=u+"Capture",b=[];s!==null;){var x=s,O=x.stateNode;x.tag===5&&O!==null&&(x=O,O=Jn(s,m),O!=null&&b.unshift(fc(s,O,x)),O=Jn(s,u),O!=null&&b.push(fc(s,O,x))),s=s.return}return b}function hc(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function kr(s,u,m,b,x){for(var O=u._reactName,W=[];m!==null&&m!==b;){var le=m,ge=le.alternate,Pe=le.stateNode;if(ge!==null&&ge===b)break;le.tag===5&&Pe!==null&&(le=Pe,x?(ge=Jn(m,O),ge!=null&&W.unshift(fc(m,ge,le))):x||(ge=Jn(m,O),ge!=null&&W.push(fc(m,ge,le)))),m=m.return}W.length!==0&&s.push({event:u,listeners:W})}var ma=/\r\n?/g,j1=/\u0000|\uFFFD/g;function wy(s){return(typeof s=="string"?s:""+s).replace(ma,`
`).replace(j1,"")}function Dd(s,u,m){if(u=wy(u),wy(s)!==u&&m)throw Error(n(425))}function qf(){}var Td=null,mu=null;function Id(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var ll=typeof setTimeout=="function"?setTimeout:void 0,Ed=typeof clearTimeout=="function"?clearTimeout:void 0,pc=typeof Promise=="function"?Promise:void 0,Gf=typeof queueMicrotask=="function"?queueMicrotask:typeof pc<"u"?function(s){return pc.resolve(null).then(s).catch(mc)}:ll;function mc(s){setTimeout(function(){throw s})}function pm(s,u){var m=u,b=0;do{var x=m.nextSibling;if(s.removeChild(m),x&&x.nodeType===8)if(m=x.data,m==="/$"){if(b===0){s.removeChild(x),hn(u);return}b--}else m!=="$"&&m!=="$?"&&m!=="$!"||b++;m=x}while(m);hn(u)}function ul(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return s}function by(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var m=s.data;if(m==="$"||m==="$!"||m==="$?"){if(u===0)return s;u--}else m==="/$"&&u++}s=s.previousSibling}return null}var gc=Math.random().toString(36).slice(2),Yi="__reactFiber$"+gc,cl="__reactProps$"+gc,wo="__reactContainer$"+gc,Jf="__reactEvents$"+gc,G="__reactListeners$"+gc,vc="__reactHandles$"+gc;function Ui(s){var u=s[Yi];if(u)return u;for(var m=s.parentNode;m;){if(u=m[wo]||m[Yi]){if(m=u.alternate,u.child!==null||m!==null&&m.child!==null)for(s=by(s);s!==null;){if(m=s[Yi])return m;s=by(s)}return u}s=m,m=s.parentNode}return null}function ga(s){return s=s[Yi]||s[wo],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function nn(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Kf(s){return s[cl]||null}var mm=[],yc=-1;function Xa(s){return{current:s}}function Qn(s){0>yc||(s.current=mm[yc],mm[yc]=null,yc--)}function qn(s,u){yc++,mm[yc]=s.current,s.current=u}var dl={},va=Xa(dl),eo=Xa(!1),_a=dl;function wc(s,u){var m=s.type.contextTypes;if(!m)return dl;var b=s.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===u)return b.__reactInternalMemoizedMaskedChildContext;var x={},O;for(O in m)x[O]=u[O];return b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=x),x}function to(s){return s=s.childContextTypes,s!=null}function Qf(){Qn(eo),Qn(va)}function Sy(s,u,m){if(va.current!==dl)throw Error(n(168));qn(va,u),qn(eo,m)}function Dy(s,u,m){var b=s.stateNode;if(u=u.childContextTypes,typeof b.getChildContext!="function")return m;b=b.getChildContext();for(var x in b)if(!(x in u))throw Error(n(108,Qe(s)||"Unknown",x));return K({},m,b)}function Ho(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||dl,_a=va.current,qn(va,s),qn(eo,eo.current),!0}function Ty(s,u,m){var b=s.stateNode;if(!b)throw Error(n(169));m?(s=Dy(s,u,_a),b.__reactInternalMemoizedMergedChildContext=s,Qn(eo),Qn(va),qn(va,s)):Qn(eo),qn(eo,m)}var Ds=null,Xf=!1,gm=!1;function Iy(s){Ds===null?Ds=[s]:Ds.push(s)}function gu(s){Xf=!0,Iy(s)}function fl(){if(!gm&&Ds!==null){gm=!0;var s=0,u=ct;try{var m=Ds;for(ct=1;s<m.length;s++){var b=m[s];do b=b(!0);while(b!==null)}Ds=null,Xf=!1}catch(x){throw Ds!==null&&(Ds=Ds.slice(s+1)),cs(Zs,fl),x}finally{ct=u,gm=!1}}return null}var bc=[],ya=0,eh=null,th=0,Yo=[],Uo=0,vu=null,zi=1,Vi="";function yu(s,u){bc[ya++]=th,bc[ya++]=eh,eh=s,th=u}function Ey(s,u,m){Yo[Uo++]=zi,Yo[Uo++]=Vi,Yo[Uo++]=vu,vu=s;var b=zi;s=Vi;var x=32-Rr(b)-1;b&=~(1<<x),m+=1;var O=32-Rr(u)+x;if(30<O){var W=x-x%5;O=(b&(1<<W)-1).toString(32),b>>=W,x-=W,zi=1<<32-Rr(u)+x|m<<x|b,Vi=O+s}else zi=1<<O|m<<x|b,Vi=s}function xd(s){s.return!==null&&(yu(s,1),Ey(s,1,0))}function wu(s){for(;s===eh;)eh=bc[--ya],bc[ya]=null,th=bc[--ya],bc[ya]=null;for(;s===vu;)vu=Yo[--Uo],Yo[Uo]=null,Vi=Yo[--Uo],Yo[Uo]=null,zi=Yo[--Uo],Yo[Uo]=null}var wa=null,bo=null,Xn=!1,pi=null;function Wi(s,u){var m=Eo(5,null,null,0);m.elementType="DELETED",m.stateNode=u,m.return=s,u=s.deletions,u===null?(s.deletions=[m],s.flags|=16):u.push(m)}function nh(s,u){switch(s.tag){case 5:var m=s.type;return u=u.nodeType!==1||m.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(s.stateNode=u,wa=s,bo=ul(u.firstChild),!0):!1;case 6:return u=s.pendingProps===""||u.nodeType!==3?null:u,u!==null?(s.stateNode=u,wa=s,bo=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(m=vu!==null?{id:zi,overflow:Vi}:null,s.memoizedState={dehydrated:u,treeContext:m,retryLane:1073741824},m=Eo(18,null,null,0),m.stateNode=u,m.return=s,s.child=m,wa=s,bo=null,!0):!1;default:return!1}}function Ts(s){return(s.mode&1)!==0&&(s.flags&128)===0}function no(s){if(Xn){var u=bo;if(u){var m=u;if(!nh(s,u)){if(Ts(s))throw Error(n(418));u=ul(m.nextSibling);var b=wa;u&&nh(s,u)?Wi(b,m):(s.flags=s.flags&-4097|2,Xn=!1,wa=s)}}else{if(Ts(s))throw Error(n(418));s.flags=s.flags&-4097|2,Xn=!1,wa=s}}}function xy(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;wa=s}function Cd(s){if(s!==wa)return!1;if(!Xn)return xy(s),Xn=!0,!1;var u;if((u=s.tag!==3)&&!(u=s.tag!==5)&&(u=s.type,u=u!=="head"&&u!=="body"&&!Id(s.type,s.memoizedProps)),u&&(u=bo)){if(Ts(s))throw vm(),Error(n(418));for(;u;)Wi(s,u),u=ul(u.nextSibling)}if(xy(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,u=0;s;){if(s.nodeType===8){var m=s.data;if(m==="/$"){if(u===0){bo=ul(s.nextSibling);break e}u--}else m!=="$"&&m!=="$!"&&m!=="$?"||u++}s=s.nextSibling}bo=null}}else bo=wa?ul(s.stateNode.nextSibling):null;return!0}function vm(){for(var s=bo;s;)s=ul(s.nextSibling)}function $i(){bo=wa=null,Xn=!1}function Zi(s){pi===null?pi=[s]:pi.push(s)}var Cy=k.ReactCurrentBatchConfig;function mi(s,u){if(s&&s.defaultProps){u=K({},u),s=s.defaultProps;for(var m in s)u[m]===void 0&&(u[m]=s[m]);return u}return u}var bu=Xa(null),rh=null,Su=null,_r=null;function Md(){_r=Su=rh=null}function ah(s){var u=bu.current;Qn(bu),s._currentValue=u}function zo(s,u,m){for(;s!==null;){var b=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,b!==null&&(b.childLanes|=u)):b!==null&&(b.childLanes&u)!==u&&(b.childLanes|=u),s===m)break;s=s.return}}function hl(s,u){rh=s,_r=Su=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&u&&(Da=!0),s.firstContext=null)}function Ba(s){var u=s._currentValue;if(_r!==s)if(s={context:s,memoizedValue:u,next:null},Su===null){if(rh===null)throw Error(n(308));Su=s,rh.dependencies={lanes:0,firstContext:s}}else Su=Su.next=s;return u}var So=null;function oh(s){So===null?So=[s]:So.push(s)}function ba(s,u,m,b){var x=u.interleaved;return x===null?(m.next=m,oh(u)):(m.next=x.next,x.next=m),u.interleaved=m,gi(s,b)}function gi(s,u){s.lanes|=u;var m=s.alternate;for(m!==null&&(m.lanes|=u),m=s,s=s.return;s!==null;)s.childLanes|=u,m=s.alternate,m!==null&&(m.childLanes|=u),m=s,s=s.return;return m.tag===3?m.stateNode:null}var pl=!1;function ym(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function My(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function vi(s,u){return{eventTime:s,lane:u,tag:0,payload:null,callback:null,next:null}}function ml(s,u,m){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,wn&2){var x=b.pending;return x===null?u.next=u:(u.next=x.next,x.next=u),b.pending=u,gi(s,m)}return x=b.interleaved,x===null?(u.next=u,oh(b)):(u.next=x.next,x.next=u),b.interleaved=u,gi(s,m)}function gl(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194240)!==0)){var b=u.lanes;b&=s.pendingLanes,m|=b,u.lanes=m,it(s,m)}}function wm(s,u){var m=s.updateQueue,b=s.alternate;if(b!==null&&(b=b.updateQueue,m===b)){var x=null,O=null;if(m=m.firstBaseUpdate,m!==null){do{var W={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};O===null?x=O=W:O=O.next=W,m=m.next}while(m!==null);O===null?x=O=u:O=O.next=u}else x=O=u;m={baseState:b.baseState,firstBaseUpdate:x,lastBaseUpdate:O,shared:b.shared,effects:b.effects},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}function ih(s,u,m,b){var x=s.updateQueue;pl=!1;var O=x.firstBaseUpdate,W=x.lastBaseUpdate,le=x.shared.pending;if(le!==null){x.shared.pending=null;var ge=le,Pe=ge.next;ge.next=null,W===null?O=Pe:W.next=Pe,W=ge;var Ge=s.alternate;Ge!==null&&(Ge=Ge.updateQueue,le=Ge.lastBaseUpdate,le!==W&&(le===null?Ge.firstBaseUpdate=Pe:le.next=Pe,Ge.lastBaseUpdate=ge))}if(O!==null){var nt=x.baseState;W=0,Ge=Pe=ge=null,le=O;do{var qe=le.lane,yt=le.eventTime;if((b&qe)===qe){Ge!==null&&(Ge=Ge.next={eventTime:yt,lane:0,tag:le.tag,payload:le.payload,callback:le.callback,next:null});e:{var Dt=s,Et=le;switch(qe=u,yt=m,Et.tag){case 1:if(Dt=Et.payload,typeof Dt=="function"){nt=Dt.call(yt,nt,qe);break e}nt=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=Et.payload,qe=typeof Dt=="function"?Dt.call(yt,nt,qe):Dt,qe==null)break e;nt=K({},nt,qe);break e;case 2:pl=!0}}le.callback!==null&&le.lane!==0&&(s.flags|=64,qe=x.effects,qe===null?x.effects=[le]:qe.push(le))}else yt={eventTime:yt,lane:qe,tag:le.tag,payload:le.payload,callback:le.callback,next:null},Ge===null?(Pe=Ge=yt,ge=nt):Ge=Ge.next=yt,W|=qe;if(le=le.next,le===null){if(le=x.shared.pending,le===null)break;qe=le,le=qe.next,qe.next=null,x.lastBaseUpdate=qe,x.shared.pending=null}}while(!0);if(Ge===null&&(ge=nt),x.baseState=ge,x.firstBaseUpdate=Pe,x.lastBaseUpdate=Ge,u=x.shared.interleaved,u!==null){x=u;do W|=x.lane,x=x.next;while(x!==u)}else O===null&&(x.shared.lanes=0);Tl|=W,s.lanes=W,s.memoizedState=nt}}function ky(s,u,m){if(s=u.effects,u.effects=null,s!==null)for(u=0;u<s.length;u++){var b=s[u],x=b.callback;if(x!==null){if(b.callback=null,b=m,typeof x!="function")throw Error(n(191,x));x.call(b)}}}var Sc=new e.Component().refs;function bm(s,u,m,b){u=s.memoizedState,m=m(b,u),m=m==null?u:K({},u,m),s.memoizedState=m,s.lanes===0&&(s.updateQueue.baseState=m)}var sh={isMounted:function(s){return(s=s._reactInternals)?si(s)===s:!1},enqueueSetState:function(s,u,m){s=s._reactInternals;var b=Ua(),x=El(s),O=vi(b,x);O.payload=u,m!=null&&(O.callback=m),u=ml(s,O,x),u!==null&&(Si(u,s,x,b),gl(u,s,x))},enqueueReplaceState:function(s,u,m){s=s._reactInternals;var b=Ua(),x=El(s),O=vi(b,x);O.tag=1,O.payload=u,m!=null&&(O.callback=m),u=ml(s,O,x),u!==null&&(Si(u,s,x,b),gl(u,s,x))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var m=Ua(),b=El(s),x=vi(m,b);x.tag=2,u!=null&&(x.callback=u),u=ml(s,x,b),u!==null&&(Si(u,s,b,m),gl(u,s,b))}};function lh(s,u,m,b,x,O,W){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(b,O,W):u.prototype&&u.prototype.isPureReactComponent?!vt(m,b)||!vt(x,O):!0}function Sm(s,u,m){var b=!1,x=dl,O=u.contextType;return typeof O=="object"&&O!==null?O=Ba(O):(x=to(u)?_a:va.current,b=u.contextTypes,O=(b=b!=null)?wc(s,x):dl),u=new u(m,O),s.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=sh,s.stateNode=u,u._reactInternals=s,b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=x,s.__reactInternalMemoizedMaskedChildContext=O),u}function Ny(s,u,m,b){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(m,b),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(m,b),u.state!==s&&sh.enqueueReplaceState(u,u.state,null)}function Dm(s,u,m,b){var x=s.stateNode;x.props=m,x.state=s.memoizedState,x.refs=Sc,ym(s);var O=u.contextType;typeof O=="object"&&O!==null?x.context=Ba(O):(O=to(u)?_a:va.current,x.context=wc(s,O)),x.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&(bm(s,u,O,m),x.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(u=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),u!==x.state&&sh.enqueueReplaceState(x,x.state,null),ih(s,m,x,b),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308)}function kd(s,u,m){if(s=m.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(n(309));var b=m.stateNode}if(!b)throw Error(n(147,s));var x=b,O=""+s;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===O?u.ref:(u=function(W){var le=x.refs;le===Sc&&(le=x.refs={}),W===null?delete le[O]:le[O]=W},u._stringRef=O,u)}if(typeof s!="string")throw Error(n(284));if(!m._owner)throw Error(n(290,s))}return s}function Nd(s,u){throw s=Object.prototype.toString.call(u),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s))}function uh(s){var u=s._init;return u(s._payload)}function Ay(s){function u(xe,ye){if(s){var Me=xe.deletions;Me===null?(xe.deletions=[ye],xe.flags|=16):Me.push(ye)}}function m(xe,ye){if(!s)return null;for(;ye!==null;)u(xe,ye),ye=ye.sibling;return null}function b(xe,ye){for(xe=new Map;ye!==null;)ye.key!==null?xe.set(ye.key,ye):xe.set(ye.index,ye),ye=ye.sibling;return xe}function x(xe,ye){return xe=Ml(xe,ye),xe.index=0,xe.sibling=null,xe}function O(xe,ye,Me){return xe.index=Me,s?(Me=xe.alternate,Me!==null?(Me=Me.index,Me<ye?(xe.flags|=2,ye):Me):(xe.flags|=2,ye)):(xe.flags|=1048576,ye)}function W(xe){return s&&xe.alternate===null&&(xe.flags|=2),xe}function le(xe,ye,Me,lt){return ye===null||ye.tag!==6?(ye=og(Me,xe.mode,lt),ye.return=xe,ye):(ye=x(ye,Me),ye.return=xe,ye)}function ge(xe,ye,Me,lt){var Ct=Me.type;return Ct===H?Ge(xe,ye,Me.props.children,lt,Me.key):ye!==null&&(ye.elementType===Ct||typeof Ct=="object"&&Ct!==null&&Ct.$$typeof===Z&&uh(Ct)===ye.type)?(lt=x(ye,Me.props),lt.ref=kd(xe,ye,Me),lt.return=xe,lt):(lt=_h(Me.type,Me.key,Me.props,null,xe.mode,lt),lt.ref=kd(xe,ye,Me),lt.return=xe,lt)}function Pe(xe,ye,Me,lt){return ye===null||ye.tag!==4||ye.stateNode.containerInfo!==Me.containerInfo||ye.stateNode.implementation!==Me.implementation?(ye=ig(Me,xe.mode,lt),ye.return=xe,ye):(ye=x(ye,Me.children||[]),ye.return=xe,ye)}function Ge(xe,ye,Me,lt,Ct){return ye===null||ye.tag!==7?(ye=Mu(Me,xe.mode,lt,Ct),ye.return=xe,ye):(ye=x(ye,Me),ye.return=xe,ye)}function nt(xe,ye,Me){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return ye=og(""+ye,xe.mode,Me),ye.return=xe,ye;if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case R:return Me=_h(ye.type,ye.key,ye.props,null,xe.mode,Me),Me.ref=kd(xe,null,ye),Me.return=xe,Me;case L:return ye=ig(ye,xe.mode,Me),ye.return=xe,ye;case Z:var lt=ye._init;return nt(xe,lt(ye._payload),Me)}if(Vt(ye)||de(ye))return ye=Mu(ye,xe.mode,Me,null),ye.return=xe,ye;Nd(xe,ye)}return null}function qe(xe,ye,Me,lt){var Ct=ye!==null?ye.key:null;if(typeof Me=="string"&&Me!==""||typeof Me=="number")return Ct!==null?null:le(xe,ye,""+Me,lt);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case R:return Me.key===Ct?ge(xe,ye,Me,lt):null;case L:return Me.key===Ct?Pe(xe,ye,Me,lt):null;case Z:return Ct=Me._init,qe(xe,ye,Ct(Me._payload),lt)}if(Vt(Me)||de(Me))return Ct!==null?null:Ge(xe,ye,Me,lt,null);Nd(xe,Me)}return null}function yt(xe,ye,Me,lt,Ct){if(typeof lt=="string"&&lt!==""||typeof lt=="number")return xe=xe.get(Me)||null,le(ye,xe,""+lt,Ct);if(typeof lt=="object"&&lt!==null){switch(lt.$$typeof){case R:return xe=xe.get(lt.key===null?Me:lt.key)||null,ge(ye,xe,lt,Ct);case L:return xe=xe.get(lt.key===null?Me:lt.key)||null,Pe(ye,xe,lt,Ct);case Z:var Pt=lt._init;return yt(xe,ye,Me,Pt(lt._payload),Ct)}if(Vt(lt)||de(lt))return xe=xe.get(Me)||null,Ge(ye,xe,lt,Ct,null);Nd(ye,lt)}return null}function Dt(xe,ye,Me,lt){for(var Ct=null,Pt=null,jt=ye,Wt=ye=0,Kr=null;jt!==null&&Wt<Me.length;Wt++){jt.index>Wt?(Kr=jt,jt=null):Kr=jt.sibling;var In=qe(xe,jt,Me[Wt],lt);if(In===null){jt===null&&(jt=Kr);break}s&&jt&&In.alternate===null&&u(xe,jt),ye=O(In,ye,Wt),Pt===null?Ct=In:Pt.sibling=In,Pt=In,jt=Kr}if(Wt===Me.length)return m(xe,jt),Xn&&yu(xe,Wt),Ct;if(jt===null){for(;Wt<Me.length;Wt++)jt=nt(xe,Me[Wt],lt),jt!==null&&(ye=O(jt,ye,Wt),Pt===null?Ct=jt:Pt.sibling=jt,Pt=jt);return Xn&&yu(xe,Wt),Ct}for(jt=b(xe,jt);Wt<Me.length;Wt++)Kr=yt(jt,xe,Wt,Me[Wt],lt),Kr!==null&&(s&&Kr.alternate!==null&&jt.delete(Kr.key===null?Wt:Kr.key),ye=O(Kr,ye,Wt),Pt===null?Ct=Kr:Pt.sibling=Kr,Pt=Kr);return s&&jt.forEach(function(kl){return u(xe,kl)}),Xn&&yu(xe,Wt),Ct}function Et(xe,ye,Me,lt){var Ct=de(Me);if(typeof Ct!="function")throw Error(n(150));if(Me=Ct.call(Me),Me==null)throw Error(n(151));for(var Pt=Ct=null,jt=ye,Wt=ye=0,Kr=null,In=Me.next();jt!==null&&!In.done;Wt++,In=Me.next()){jt.index>Wt?(Kr=jt,jt=null):Kr=jt.sibling;var kl=qe(xe,jt,In.value,lt);if(kl===null){jt===null&&(jt=Kr);break}s&&jt&&kl.alternate===null&&u(xe,jt),ye=O(kl,ye,Wt),Pt===null?Ct=kl:Pt.sibling=kl,Pt=kl,jt=Kr}if(In.done)return m(xe,jt),Xn&&yu(xe,Wt),Ct;if(jt===null){for(;!In.done;Wt++,In=Me.next())In=nt(xe,In.value,lt),In!==null&&(ye=O(In,ye,Wt),Pt===null?Ct=In:Pt.sibling=In,Pt=In);return Xn&&yu(xe,Wt),Ct}for(jt=b(xe,jt);!In.done;Wt++,In=Me.next())In=yt(jt,xe,Wt,In.value,lt),In!==null&&(s&&In.alternate!==null&&jt.delete(In.key===null?Wt:In.key),ye=O(In,ye,Wt),Pt===null?Ct=In:Pt.sibling=In,Pt=In);return s&&jt.forEach(function(tS){return u(xe,tS)}),Xn&&yu(xe,Wt),Ct}function br(xe,ye,Me,lt){if(typeof Me=="object"&&Me!==null&&Me.type===H&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case R:e:{for(var Ct=Me.key,Pt=ye;Pt!==null;){if(Pt.key===Ct){if(Ct=Me.type,Ct===H){if(Pt.tag===7){m(xe,Pt.sibling),ye=x(Pt,Me.props.children),ye.return=xe,xe=ye;break e}}else if(Pt.elementType===Ct||typeof Ct=="object"&&Ct!==null&&Ct.$$typeof===Z&&uh(Ct)===Pt.type){m(xe,Pt.sibling),ye=x(Pt,Me.props),ye.ref=kd(xe,Pt,Me),ye.return=xe,xe=ye;break e}m(xe,Pt);break}else u(xe,Pt);Pt=Pt.sibling}Me.type===H?(ye=Mu(Me.props.children,xe.mode,lt,Me.key),ye.return=xe,xe=ye):(lt=_h(Me.type,Me.key,Me.props,null,xe.mode,lt),lt.ref=kd(xe,ye,Me),lt.return=xe,xe=lt)}return W(xe);case L:e:{for(Pt=Me.key;ye!==null;){if(ye.key===Pt)if(ye.tag===4&&ye.stateNode.containerInfo===Me.containerInfo&&ye.stateNode.implementation===Me.implementation){m(xe,ye.sibling),ye=x(ye,Me.children||[]),ye.return=xe,xe=ye;break e}else{m(xe,ye);break}else u(xe,ye);ye=ye.sibling}ye=ig(Me,xe.mode,lt),ye.return=xe,xe=ye}return W(xe);case Z:return Pt=Me._init,br(xe,ye,Pt(Me._payload),lt)}if(Vt(Me))return Dt(xe,ye,Me,lt);if(de(Me))return Et(xe,ye,Me,lt);Nd(xe,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,ye!==null&&ye.tag===6?(m(xe,ye.sibling),ye=x(ye,Me),ye.return=xe,xe=ye):(m(xe,ye),ye=og(Me,xe.mode,lt),ye.return=xe,xe=ye),W(xe)):m(xe,ye)}return br}var vl=Ay(!0),Tm=Ay(!1),Dc={},yi=Xa(Dc),yl=Xa(Dc),Ad=Xa(Dc);function wl(s){if(s===Dc)throw Error(n(174));return s}function ch(s,u){switch(qn(Ad,u),qn(yl,s),qn(yi,Dc),s=u.nodeType,s){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:pt(null,"");break;default:s=s===8?u.parentNode:u,u=s.namespaceURI||null,s=s.tagName,u=pt(u,s)}Qn(yi),qn(yi,u)}function Tc(){Qn(yi),Qn(yl),Qn(Ad)}function Im(s){wl(Ad.current);var u=wl(yi.current),m=pt(u,s.type);u!==m&&(qn(yl,s),qn(yi,m))}function Em(s){yl.current===s&&(Qn(yi),Qn(yl))}var er=Xa(0);function Fd(s){for(var u=s;u!==null;){if(u.tag===13){var m=u.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Od=[];function xm(){for(var s=0;s<Od.length;s++)Od[s]._workInProgressVersionPrimary=null;Od.length=0}var Ic=k.ReactCurrentDispatcher,rn=k.ReactCurrentBatchConfig,Du=0,or=null,ir=null,Br=null,dh=!1,Pd=!1,Sa=0,L1=0;function Hr(){throw Error(n(321))}function jd(s,u){if(u===null)return!1;for(var m=0;m<u.length&&m<s.length;m++)if(!Oe(s[m],u[m]))return!1;return!0}function fh(s,u,m,b,x,O){if(Du=O,or=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Ic.current=s===null||s.memoizedState===null?Rd:_1,s=m(b,x),Pd){O=0;do{if(Pd=!1,Sa=0,25<=O)throw Error(n(301));O+=1,Br=ir=null,u.updateQueue=null,Ic.current=_y,s=m(b,x)}while(Pd)}if(Ic.current=xs,u=ir!==null&&ir.next!==null,Du=0,Br=ir=or=null,dh=!1,u)throw Error(n(300));return s}function hh(){var s=Sa!==0;return Sa=0,s}function hr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Br===null?or.memoizedState=Br=s:Br=Br.next=s,Br}function Yr(){if(ir===null){var s=or.alternate;s=s!==null?s.memoizedState:null}else s=ir.next;var u=Br===null?or.memoizedState:Br.next;if(u!==null)Br=u,ir=s;else{if(s===null)throw Error(n(310));ir=s,s={memoizedState:ir.memoizedState,baseState:ir.baseState,baseQueue:ir.baseQueue,queue:ir.queue,next:null},Br===null?or.memoizedState=Br=s:Br=Br.next=s}return Br}function Tu(s,u){return typeof u=="function"?u(s):u}function ph(s){var u=Yr(),m=u.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=s;var b=ir,x=b.baseQueue,O=m.pending;if(O!==null){if(x!==null){var W=x.next;x.next=O.next,O.next=W}b.baseQueue=x=O,m.pending=null}if(x!==null){O=x.next,b=b.baseState;var le=W=null,ge=null,Pe=O;do{var Ge=Pe.lane;if((Du&Ge)===Ge)ge!==null&&(ge=ge.next={lane:0,action:Pe.action,hasEagerState:Pe.hasEagerState,eagerState:Pe.eagerState,next:null}),b=Pe.hasEagerState?Pe.eagerState:s(b,Pe.action);else{var nt={lane:Ge,action:Pe.action,hasEagerState:Pe.hasEagerState,eagerState:Pe.eagerState,next:null};ge===null?(le=ge=nt,W=b):ge=ge.next=nt,or.lanes|=Ge,Tl|=Ge}Pe=Pe.next}while(Pe!==null&&Pe!==O);ge===null?W=b:ge.next=le,Oe(b,u.memoizedState)||(Da=!0),u.memoizedState=b,u.baseState=W,u.baseQueue=ge,m.lastRenderedState=b}if(s=m.interleaved,s!==null){x=s;do O=x.lane,or.lanes|=O,Tl|=O,x=x.next;while(x!==s)}else x===null&&(m.lanes=0);return[u.memoizedState,m.dispatch]}function Ec(s){var u=Yr(),m=u.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=s;var b=m.dispatch,x=m.pending,O=u.memoizedState;if(x!==null){m.pending=null;var W=x=x.next;do O=s(O,W.action),W=W.next;while(W!==x);Oe(O,u.memoizedState)||(Da=!0),u.memoizedState=O,u.baseQueue===null&&(u.baseState=O),m.lastRenderedState=O}return[O,b]}function Cm(){}function mh(s,u){var m=or,b=Yr(),x=u(),O=!Oe(b.memoizedState,x);if(O&&(b.memoizedState=x,Da=!0),b=b.queue,Nm(vh.bind(null,m,b,s),[s]),b.getSnapshot!==u||O||Br!==null&&Br.memoizedState.tag&1){if(m.flags|=2048,xc(9,gh.bind(null,m,b,x,u),void 0,null),Jr===null)throw Error(n(349));Du&30||Mm(m,u,x)}return x}function Mm(s,u,m){s.flags|=16384,s={getSnapshot:u,value:m},u=or.updateQueue,u===null?(u={lastEffect:null,stores:null},or.updateQueue=u,u.stores=[s]):(m=u.stores,m===null?u.stores=[s]:m.push(s))}function gh(s,u,m,b){u.value=m,u.getSnapshot=b,Is(u)&&Fy(s)}function vh(s,u,m){return m(function(){Is(u)&&Fy(s)})}function Is(s){var u=s.getSnapshot;s=s.value;try{var m=u();return!Oe(s,m)}catch{return!0}}function Fy(s){var u=gi(s,1);u!==null&&Si(u,s,1,-1)}function Es(s){var u=hr();return typeof s=="function"&&(s=s()),u.memoizedState=u.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tu,lastRenderedState:s},u.queue=s,s=s.dispatch=Ly.bind(null,or,s),[u.memoizedState,s]}function xc(s,u,m,b){return s={tag:s,create:u,destroy:m,deps:b,next:null},u=or.updateQueue,u===null?(u={lastEffect:null,stores:null},or.updateQueue=u,u.lastEffect=s.next=s):(m=u.lastEffect,m===null?u.lastEffect=s.next=s:(b=m.next,m.next=s,s.next=b,u.lastEffect=s)),s}function km(){return Yr().memoizedState}function Cc(s,u,m,b){var x=hr();or.flags|=s,x.memoizedState=xc(1|u,m,void 0,b===void 0?null:b)}function yh(s,u,m,b){var x=Yr();b=b===void 0?null:b;var O=void 0;if(ir!==null){var W=ir.memoizedState;if(O=W.destroy,b!==null&&jd(b,W.deps)){x.memoizedState=xc(u,m,O,b);return}}or.flags|=s,x.memoizedState=xc(1|u,m,O,b)}function Oy(s,u){return Cc(8390656,8,s,u)}function Nm(s,u){return yh(2048,8,s,u)}function Am(s,u){return yh(4,2,s,u)}function Fm(s,u){return yh(4,4,s,u)}function Py(s,u){if(typeof u=="function")return s=s(),u(s),function(){u(null)};if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function Om(s,u,m){return m=m!=null?m.concat([s]):null,yh(4,4,Py.bind(null,u,s),m)}function wh(){}function Ha(s,u){var m=Yr();u=u===void 0?null:u;var b=m.memoizedState;return b!==null&&u!==null&&jd(u,b[1])?b[0]:(m.memoizedState=[s,u],s)}function wi(s,u){var m=Yr();u=u===void 0?null:u;var b=m.memoizedState;return b!==null&&u!==null&&jd(u,b[1])?b[0]:(s=s(),m.memoizedState=[s,u],s)}function jy(s,u,m){return Du&21?(Oe(m,u)||(m=oe(),or.lanes|=m,Tl|=m,s.baseState=!0),u):(s.baseState&&(s.baseState=!1,Da=!0),s.memoizedState=m)}function R1(s,u){var m=ct;ct=m!==0&&4>m?m:4,s(!0);var b=rn.transition;rn.transition={};try{s(!1),u()}finally{ct=m,rn.transition=b}}function Ld(){return Yr().memoizedState}function Mc(s,u,m){var b=El(s);if(m={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null},Pm(s))Ry(u,m);else if(m=ba(s,u,m,b),m!==null){var x=Ua();Si(m,s,b,x),jm(m,u,b)}}function Ly(s,u,m){var b=El(s),x={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null};if(Pm(s))Ry(u,x);else{var O=s.alternate;if(s.lanes===0&&(O===null||O.lanes===0)&&(O=u.lastRenderedReducer,O!==null))try{var W=u.lastRenderedState,le=O(W,m);if(x.hasEagerState=!0,x.eagerState=le,Oe(le,W)){var ge=u.interleaved;ge===null?(x.next=x,oh(u)):(x.next=ge.next,ge.next=x),u.interleaved=x;return}}catch{}m=ba(s,u,x,b),m!==null&&(x=Ua(),Si(m,s,b,x),jm(m,u,b))}}function Pm(s){var u=s.alternate;return s===or||u!==null&&u===or}function Ry(s,u){Pd=dh=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function jm(s,u,m){if(m&4194240){var b=u.lanes;b&=s.pendingLanes,m|=b,u.lanes=m,it(s,m)}}var xs={readContext:Ba,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useInsertionEffect:Hr,useLayoutEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useMutableSource:Hr,useSyncExternalStore:Hr,useId:Hr,unstable_isNewReconciler:!1},Rd={readContext:Ba,useCallback:function(s,u){return hr().memoizedState=[s,u===void 0?null:u],s},useContext:Ba,useEffect:Oy,useImperativeHandle:function(s,u,m){return m=m!=null?m.concat([s]):null,Cc(4194308,4,Py.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Cc(4194308,4,s,u)},useInsertionEffect:function(s,u){return Cc(4,2,s,u)},useMemo:function(s,u){var m=hr();return u=u===void 0?null:u,s=s(),m.memoizedState=[s,u],s},useReducer:function(s,u,m){var b=hr();return u=m!==void 0?m(u):u,b.memoizedState=b.baseState=u,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:u},b.queue=s,s=s.dispatch=Mc.bind(null,or,s),[b.memoizedState,s]},useRef:function(s){var u=hr();return s={current:s},u.memoizedState=s},useState:Es,useDebugValue:wh,useDeferredValue:function(s){return hr().memoizedState=s},useTransition:function(){var s=Es(!1),u=s[0];return s=R1.bind(null,s[1]),hr().memoizedState=s,[u,s]},useMutableSource:function(){},useSyncExternalStore:function(s,u,m){var b=or,x=hr();if(Xn){if(m===void 0)throw Error(n(407));m=m()}else{if(m=u(),Jr===null)throw Error(n(349));Du&30||Mm(b,u,m)}x.memoizedState=m;var O={value:m,getSnapshot:u};return x.queue=O,Oy(vh.bind(null,b,O,s),[s]),b.flags|=2048,xc(9,gh.bind(null,b,O,m,u),void 0,null),m},useId:function(){var s=hr(),u=Jr.identifierPrefix;if(Xn){var m=Vi,b=zi;m=(b&~(1<<32-Rr(b)-1)).toString(32)+m,u=":"+u+"R"+m,m=Sa++,0<m&&(u+="H"+m.toString(32)),u+=":"}else m=L1++,u=":"+u+"r"+m.toString(32)+":";return s.memoizedState=u},unstable_isNewReconciler:!1},_1={readContext:Ba,useCallback:Ha,useContext:Ba,useEffect:Nm,useImperativeHandle:Om,useInsertionEffect:Am,useLayoutEffect:Fm,useMemo:wi,useReducer:ph,useRef:km,useState:function(){return ph(Tu)},useDebugValue:wh,useDeferredValue:function(s){var u=Yr();return jy(u,ir.memoizedState,s)},useTransition:function(){var s=ph(Tu)[0],u=Yr().memoizedState;return[s,u]},useMutableSource:Cm,useSyncExternalStore:mh,useId:Ld,unstable_isNewReconciler:!1},_y={readContext:Ba,useCallback:Ha,useContext:Ba,useEffect:Nm,useImperativeHandle:Om,useInsertionEffect:Am,useLayoutEffect:Fm,useMemo:wi,useReducer:Ec,useRef:km,useState:function(){return Ec(Tu)},useDebugValue:wh,useDeferredValue:function(s){var u=Yr();return ir===null?u.memoizedState=s:jy(u,ir.memoizedState,s)},useTransition:function(){var s=Ec(Tu)[0],u=Yr().memoizedState;return[s,u]},useMutableSource:Cm,useSyncExternalStore:mh,useId:Ld,unstable_isNewReconciler:!1};function Iu(s,u){try{var m="",b=u;do m+=Fe(b),b=b.return;while(b);var x=m}catch(O){x=`
Error generating stack: `+O.message+`
`+O.stack}return{value:s,source:u,stack:x,digest:null}}function kc(s,u,m){return{value:s,source:null,stack:m??null,digest:u??null}}function bh(s,u){try{console.error(u.value)}catch(m){setTimeout(function(){throw m})}}var Sh=typeof WeakMap=="function"?WeakMap:Map;function Dh(s,u,m){m=vi(-1,m),m.tag=3,m.payload={element:null};var b=u.value;return m.callback=function(){Fh||(Fh=!0,Jm=b),bh(s,u)},m}function _d(s,u,m){m=vi(-1,m),m.tag=3;var b=s.type.getDerivedStateFromError;if(typeof b=="function"){var x=u.value;m.payload=function(){return b(x)},m.callback=function(){bh(s,u)}}var O=s.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(m.callback=function(){bh(s,u),typeof b!="function"&&(Il===null?Il=new Set([this]):Il.add(this));var W=u.stack;this.componentDidCatch(u.value,{componentStack:W!==null?W:""})}),m}function By(s,u,m){var b=s.pingCache;if(b===null){b=s.pingCache=new Sh;var x=new Set;b.set(u,x)}else x=b.get(u),x===void 0&&(x=new Set,b.set(u,x));x.has(m)||(x.add(m),s=$1.bind(null,s,u,m),u.then(s,s))}function Lm(s){do{var u;if((u=s.tag===13)&&(u=s.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return s;s=s.return}while(s!==null);return null}function Bd(s,u,m,b,x){return s.mode&1?(s.flags|=65536,s.lanes=x,s):(s===u?s.flags|=65536:(s.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(u=vi(-1,1),u.tag=2,ml(m,u,1))),m.lanes|=1),s)}var Hy=k.ReactCurrentOwner,Da=!1;function Ya(s,u,m,b){u.child=s===null?Tm(u,null,m,b):vl(u,s.child,m,b)}function Rm(s,u,m,b,x){m=m.render;var O=u.ref;return hl(u,x),b=fh(s,u,m,b,O,x),m=hh(),s!==null&&!Da?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~x,Ji(s,u,x)):(Xn&&m&&xd(u),u.flags|=1,Ya(s,u,b,x),u.child)}function qi(s,u,m,b,x){if(s===null){var O=m.type;return typeof O=="function"&&!ag(O)&&O.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(u.tag=15,u.type=O,_m(s,u,O,b,x)):(s=_h(m.type,null,b,u,u.mode,x),s.ref=u.ref,s.return=u,u.child=s)}if(O=s.child,!(s.lanes&x)){var W=O.memoizedProps;if(m=m.compare,m=m!==null?m:vt,m(W,b)&&s.ref===u.ref)return Ji(s,u,x)}return u.flags|=1,s=Ml(O,b),s.ref=u.ref,s.return=u,u.child=s}function _m(s,u,m,b,x){if(s!==null){var O=s.memoizedProps;if(vt(O,b)&&s.ref===u.ref)if(Da=!1,u.pendingProps=b=O,(s.lanes&x)!==0)s.flags&131072&&(Da=!0);else return u.lanes=s.lanes,Ji(s,u,x)}return Th(s,u,m,b,x)}function Bm(s,u,m){var b=u.pendingProps,x=b.children,O=s!==null?s.memoizedState:null;if(b.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},qn(Pc,Io),Io|=m;else{if(!(m&1073741824))return s=O!==null?O.baseLanes|m:m,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:s,cachePool:null,transitions:null},u.updateQueue=null,qn(Pc,Io),Io|=s,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=O!==null?O.baseLanes:m,qn(Pc,Io),Io|=b}else O!==null?(b=O.baseLanes|m,u.memoizedState=null):b=m,qn(Pc,Io),Io|=b;return Ya(s,u,x,m),u.child}function Yy(s,u){var m=u.ref;(s===null&&m!==null||s!==null&&s.ref!==m)&&(u.flags|=512,u.flags|=2097152)}function Th(s,u,m,b,x){var O=to(m)?_a:va.current;return O=wc(u,O),hl(u,x),m=fh(s,u,m,b,O,x),b=hh(),s!==null&&!Da?(u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~x,Ji(s,u,x)):(Xn&&b&&xd(u),u.flags|=1,Ya(s,u,m,x),u.child)}function Uy(s,u,m,b,x){if(to(m)){var O=!0;Ho(u)}else O=!1;if(hl(u,x),u.stateNode===null)Nc(s,u),Sm(u,m,b),Dm(u,m,b,x),b=!0;else if(s===null){var W=u.stateNode,le=u.memoizedProps;W.props=le;var ge=W.context,Pe=m.contextType;typeof Pe=="object"&&Pe!==null?Pe=Ba(Pe):(Pe=to(m)?_a:va.current,Pe=wc(u,Pe));var Ge=m.getDerivedStateFromProps,nt=typeof Ge=="function"||typeof W.getSnapshotBeforeUpdate=="function";nt||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(le!==b||ge!==Pe)&&Ny(u,W,b,Pe),pl=!1;var qe=u.memoizedState;W.state=qe,ih(u,b,W,x),ge=u.memoizedState,le!==b||qe!==ge||eo.current||pl?(typeof Ge=="function"&&(bm(u,m,Ge,b),ge=u.memoizedState),(le=pl||lh(u,m,le,b,qe,ge,Pe))?(nt||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(u.flags|=4194308)):(typeof W.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=b,u.memoizedState=ge),W.props=b,W.state=ge,W.context=Pe,b=le):(typeof W.componentDidMount=="function"&&(u.flags|=4194308),b=!1)}else{W=u.stateNode,My(s,u),le=u.memoizedProps,Pe=u.type===u.elementType?le:mi(u.type,le),W.props=Pe,nt=u.pendingProps,qe=W.context,ge=m.contextType,typeof ge=="object"&&ge!==null?ge=Ba(ge):(ge=to(m)?_a:va.current,ge=wc(u,ge));var yt=m.getDerivedStateFromProps;(Ge=typeof yt=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(le!==nt||qe!==ge)&&Ny(u,W,b,ge),pl=!1,qe=u.memoizedState,W.state=qe,ih(u,b,W,x);var Dt=u.memoizedState;le!==nt||qe!==Dt||eo.current||pl?(typeof yt=="function"&&(bm(u,m,yt,b),Dt=u.memoizedState),(Pe=pl||lh(u,m,Pe,b,qe,Dt,ge)||!1)?(Ge||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(b,Dt,ge),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(b,Dt,ge)),typeof W.componentDidUpdate=="function"&&(u.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof W.componentDidUpdate!="function"||le===s.memoizedProps&&qe===s.memoizedState||(u.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||le===s.memoizedProps&&qe===s.memoizedState||(u.flags|=1024),u.memoizedProps=b,u.memoizedState=Dt),W.props=b,W.state=Dt,W.context=ge,b=Pe):(typeof W.componentDidUpdate!="function"||le===s.memoizedProps&&qe===s.memoizedState||(u.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||le===s.memoizedProps&&qe===s.memoizedState||(u.flags|=1024),b=!1)}return Hm(s,u,m,b,O,x)}function Hm(s,u,m,b,x,O){Yy(s,u);var W=(u.flags&128)!==0;if(!b&&!W)return x&&Ty(u,m,!1),Ji(s,u,O);b=u.stateNode,Hy.current=u;var le=W&&typeof m.getDerivedStateFromError!="function"?null:b.render();return u.flags|=1,s!==null&&W?(u.child=vl(u,s.child,null,O),u.child=vl(u,null,le,O)):Ya(s,u,le,O),u.memoizedState=b.state,x&&Ty(u,m,!0),u.child}function Gi(s){var u=s.stateNode;u.pendingContext?Sy(s,u.pendingContext,u.pendingContext!==u.context):u.context&&Sy(s,u.context,!1),ch(s,u.containerInfo)}function Ih(s,u,m,b,x){return $i(),Zi(x),u.flags|=256,Ya(s,u,m,b),u.child}var Hd={dehydrated:null,treeContext:null,retryLane:0};function Yd(s){return{baseLanes:s,cachePool:null,transitions:null}}function Ud(s,u,m){var b=u.pendingProps,x=er.current,O=!1,W=(u.flags&128)!==0,le;if((le=W)||(le=s!==null&&s.memoizedState===null?!1:(x&2)!==0),le?(O=!0,u.flags&=-129):(s===null||s.memoizedState!==null)&&(x|=1),qn(er,x&1),s===null)return no(u),s=u.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(u.mode&1?s.data==="$!"?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(W=b.children,s=b.fallback,O?(b=u.mode,O=u.child,W={mode:"hidden",children:W},!(b&1)&&O!==null?(O.childLanes=0,O.pendingProps=W):O=Bh(W,b,0,null),s=Mu(s,b,m,null),O.return=u,s.return=u,O.sibling=s,u.child=O,u.child.memoizedState=Yd(m),u.memoizedState=Hd,s):bl(u,W));if(x=s.memoizedState,x!==null&&(le=x.dehydrated,le!==null))return Eh(s,u,W,b,le,x,m);if(O){O=b.fallback,W=u.mode,x=s.child,le=x.sibling;var ge={mode:"hidden",children:b.children};return!(W&1)&&u.child!==x?(b=u.child,b.childLanes=0,b.pendingProps=ge,u.deletions=null):(b=Ml(x,ge),b.subtreeFlags=x.subtreeFlags&14680064),le!==null?O=Ml(le,O):(O=Mu(O,W,m,null),O.flags|=2),O.return=u,b.return=u,b.sibling=O,u.child=b,b=O,O=u.child,W=s.child.memoizedState,W=W===null?Yd(m):{baseLanes:W.baseLanes|m,cachePool:null,transitions:W.transitions},O.memoizedState=W,O.childLanes=s.childLanes&~m,u.memoizedState=Hd,b}return O=s.child,s=O.sibling,b=Ml(O,{mode:"visible",children:b.children}),!(u.mode&1)&&(b.lanes=m),b.return=u,b.sibling=null,s!==null&&(m=u.deletions,m===null?(u.deletions=[s],u.flags|=16):m.push(s)),u.child=b,u.memoizedState=null,b}function bl(s,u){return u=Bh({mode:"visible",children:u},s.mode,0,null),u.return=s,s.child=u}function Ot(s,u,m,b){return b!==null&&Zi(b),vl(u,s.child,null,m),s=bl(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function Eh(s,u,m,b,x,O,W){if(m)return u.flags&256?(u.flags&=-257,b=kc(Error(n(422))),Ot(s,u,W,b)):u.memoizedState!==null?(u.child=s.child,u.flags|=128,null):(O=b.fallback,x=u.mode,b=Bh({mode:"visible",children:b.children},x,0,null),O=Mu(O,x,W,null),O.flags|=2,b.return=u,O.return=u,b.sibling=O,u.child=b,u.mode&1&&vl(u,s.child,null,W),u.child.memoizedState=Yd(W),u.memoizedState=Hd,O);if(!(u.mode&1))return Ot(s,u,W,null);if(x.data==="$!"){if(b=x.nextSibling&&x.nextSibling.dataset,b)var le=b.dgst;return b=le,O=Error(n(419)),b=kc(O,b,void 0),Ot(s,u,W,b)}if(le=(W&s.childLanes)!==0,Da||le){if(b=Jr,b!==null){switch(W&-W){case 4:x=2;break;case 16:x=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:x=32;break;case 536870912:x=268435456;break;default:x=0}x=x&(b.suspendedLanes|W)?0:x,x!==0&&x!==O.retryLane&&(O.retryLane=x,gi(s,x),Si(b,s,x,-1))}return ng(),b=kc(Error(n(421))),Ot(s,u,W,b)}return x.data==="$?"?(u.flags|=128,u.child=s.child,u=Z1.bind(null,s),x._reactRetry=u,null):(s=O.treeContext,bo=ul(x.nextSibling),wa=u,Xn=!0,pi=null,s!==null&&(Yo[Uo++]=zi,Yo[Uo++]=Vi,Yo[Uo++]=vu,zi=s.id,Vi=s.overflow,vu=u),u=bl(u,b.children),u.flags|=4096,u)}function xh(s,u,m){s.lanes|=u;var b=s.alternate;b!==null&&(b.lanes|=u),zo(s.return,u,m)}function Cs(s,u,m,b,x){var O=s.memoizedState;O===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:b,tail:m,tailMode:x}:(O.isBackwards=u,O.rendering=null,O.renderingStartTime=0,O.last=b,O.tail=m,O.tailMode=x)}function zy(s,u,m){var b=u.pendingProps,x=b.revealOrder,O=b.tail;if(Ya(s,u,b.children,m),b=er.current,b&2)b=b&1|2,u.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&xh(s,m,u);else if(s.tag===19)xh(s,m,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}b&=1}if(qn(er,b),!(u.mode&1))u.memoizedState=null;else switch(x){case"forwards":for(m=u.child,x=null;m!==null;)s=m.alternate,s!==null&&Fd(s)===null&&(x=m),m=m.sibling;m=x,m===null?(x=u.child,u.child=null):(x=m.sibling,m.sibling=null),Cs(u,!1,x,m,O);break;case"backwards":for(m=null,x=u.child,u.child=null;x!==null;){if(s=x.alternate,s!==null&&Fd(s)===null){u.child=x;break}s=x.sibling,x.sibling=m,m=x,x=s}Cs(u,!0,m,null,O);break;case"together":Cs(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Nc(s,u){!(u.mode&1)&&s!==null&&(s.alternate=null,u.alternate=null,u.flags|=2)}function Ji(s,u,m){if(s!==null&&(u.dependencies=s.dependencies),Tl|=u.lanes,!(m&u.childLanes))return null;if(s!==null&&u.child!==s.child)throw Error(n(153));if(u.child!==null){for(s=u.child,m=Ml(s,s.pendingProps),u.child=m,m.return=u;s.sibling!==null;)s=s.sibling,m=m.sibling=Ml(s,s.pendingProps),m.return=u;m.sibling=null}return u.child}function Ta(s,u,m){switch(u.tag){case 3:Gi(u),$i();break;case 5:Im(u);break;case 1:to(u.type)&&Ho(u);break;case 4:ch(u,u.stateNode.containerInfo);break;case 10:var b=u.type._context,x=u.memoizedProps.value;qn(bu,b._currentValue),b._currentValue=x;break;case 13:if(b=u.memoizedState,b!==null)return b.dehydrated!==null?(qn(er,er.current&1),u.flags|=128,null):m&u.child.childLanes?Ud(s,u,m):(qn(er,er.current&1),s=Ji(s,u,m),s!==null?s.sibling:null);qn(er,er.current&1);break;case 19:if(b=(m&u.childLanes)!==0,s.flags&128){if(b)return zy(s,u,m);u.flags|=128}if(x=u.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),qn(er,er.current),b)break;return null;case 22:case 23:return u.lanes=0,Bm(s,u,m)}return Ji(s,u,m)}var Vy,Ym,Um,Wy;Vy=function(s,u){for(var m=u.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===u)break;for(;m.sibling===null;){if(m.return===null||m.return===u)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Ym=function(){},Um=function(s,u,m,b){var x=s.memoizedProps;if(x!==b){s=u.stateNode,wl(yi.current);var O=null;switch(m){case"input":x=tt(s,x),b=tt(s,b),O=[];break;case"select":x=K({},x,{value:void 0}),b=K({},b,{value:void 0}),O=[];break;case"textarea":x=dn(s,x),b=dn(s,b),O=[];break;default:typeof x.onClick!="function"&&typeof b.onClick=="function"&&(s.onclick=qf)}nr(m,b);var W;m=null;for(Pe in x)if(!b.hasOwnProperty(Pe)&&x.hasOwnProperty(Pe)&&x[Pe]!=null)if(Pe==="style"){var le=x[Pe];for(W in le)le.hasOwnProperty(W)&&(m||(m={}),m[W]="")}else Pe!=="dangerouslySetInnerHTML"&&Pe!=="children"&&Pe!=="suppressContentEditableWarning"&&Pe!=="suppressHydrationWarning"&&Pe!=="autoFocus"&&(a.hasOwnProperty(Pe)?O||(O=[]):(O=O||[]).push(Pe,null));for(Pe in b){var ge=b[Pe];if(le=x!=null?x[Pe]:void 0,b.hasOwnProperty(Pe)&&ge!==le&&(ge!=null||le!=null))if(Pe==="style")if(le){for(W in le)!le.hasOwnProperty(W)||ge&&ge.hasOwnProperty(W)||(m||(m={}),m[W]="");for(W in ge)ge.hasOwnProperty(W)&&le[W]!==ge[W]&&(m||(m={}),m[W]=ge[W])}else m||(O||(O=[]),O.push(Pe,m)),m=ge;else Pe==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,le=le?le.__html:void 0,ge!=null&&le!==ge&&(O=O||[]).push(Pe,ge)):Pe==="children"?typeof ge!="string"&&typeof ge!="number"||(O=O||[]).push(Pe,""+ge):Pe!=="suppressContentEditableWarning"&&Pe!=="suppressHydrationWarning"&&(a.hasOwnProperty(Pe)?(ge!=null&&Pe==="onScroll"&&Kn("scroll",s),O||le===ge||(O=[])):(O=O||[]).push(Pe,ge))}m&&(O=O||[]).push("style",m);var Pe=O;(u.updateQueue=Pe)&&(u.flags|=4)}},Wy=function(s,u,m,b){m!==b&&(u.flags|=4)};function Ac(s,u){if(!Xn)switch(s.tailMode){case"hidden":u=s.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s.tail=null:m.sibling=null;break;case"collapsed":m=s.tail;for(var b=null;m!==null;)m.alternate!==null&&(b=m),m=m.sibling;b===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:b.sibling=null}}function Ia(s){var u=s.alternate!==null&&s.alternate.child===s.child,m=0,b=0;if(u)for(var x=s.child;x!==null;)m|=x.lanes|x.childLanes,b|=x.subtreeFlags&14680064,b|=x.flags&14680064,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)m|=x.lanes|x.childLanes,b|=x.subtreeFlags,b|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=b,s.childLanes=m,u}function B1(s,u,m){var b=u.pendingProps;switch(wu(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ia(u),null;case 1:return to(u.type)&&Qf(),Ia(u),null;case 3:return b=u.stateNode,Tc(),Qn(eo),Qn(va),xm(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(s===null||s.child===null)&&(Cd(u)?u.flags|=4:s===null||s.memoizedState.isDehydrated&&!(u.flags&256)||(u.flags|=1024,pi!==null&&(Xm(pi),pi=null))),Ym(s,u),Ia(u),null;case 5:Em(u);var x=wl(Ad.current);if(m=u.type,s!==null&&u.stateNode!=null)Um(s,u,m,b,x),s.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!b){if(u.stateNode===null)throw Error(n(166));return Ia(u),null}if(s=wl(yi.current),Cd(u)){b=u.stateNode,m=u.type;var O=u.memoizedProps;switch(b[Yi]=u,b[cl]=O,s=(u.mode&1)!==0,m){case"dialog":Kn("cancel",b),Kn("close",b);break;case"iframe":case"object":case"embed":Kn("load",b);break;case"video":case"audio":for(x=0;x<Ss.length;x++)Kn(Ss[x],b);break;case"source":Kn("error",b);break;case"img":case"image":case"link":Kn("error",b),Kn("load",b);break;case"details":Kn("toggle",b);break;case"input":ht(b,O),Kn("invalid",b);break;case"select":b._wrapperState={wasMultiple:!!O.multiple},Kn("invalid",b);break;case"textarea":en(b,O),Kn("invalid",b)}nr(m,O),x=null;for(var W in O)if(O.hasOwnProperty(W)){var le=O[W];W==="children"?typeof le=="string"?b.textContent!==le&&(O.suppressHydrationWarning!==!0&&Dd(b.textContent,le,s),x=["children",le]):typeof le=="number"&&b.textContent!==""+le&&(O.suppressHydrationWarning!==!0&&Dd(b.textContent,le,s),x=["children",""+le]):a.hasOwnProperty(W)&&le!=null&&W==="onScroll"&&Kn("scroll",b)}switch(m){case"input":tn(b),Gt(b,O,!0);break;case"textarea":tn(b),kn(b);break;case"select":case"option":break;default:typeof O.onClick=="function"&&(b.onclick=qf)}b=x,u.updateQueue=b,b!==null&&(u.flags|=4)}else{W=x.nodeType===9?x:x.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Er(m)),s==="http://www.w3.org/1999/xhtml"?m==="script"?(s=W.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof b.is=="string"?s=W.createElement(m,{is:b.is}):(s=W.createElement(m),m==="select"&&(W=s,b.multiple?W.multiple=!0:b.size&&(W.size=b.size))):s=W.createElementNS(s,m),s[Yi]=u,s[cl]=b,Vy(s,u,!1,!1),u.stateNode=s;e:{switch(W=Lr(m,b),m){case"dialog":Kn("cancel",s),Kn("close",s),x=b;break;case"iframe":case"object":case"embed":Kn("load",s),x=b;break;case"video":case"audio":for(x=0;x<Ss.length;x++)Kn(Ss[x],s);x=b;break;case"source":Kn("error",s),x=b;break;case"img":case"image":case"link":Kn("error",s),Kn("load",s),x=b;break;case"details":Kn("toggle",s),x=b;break;case"input":ht(s,b),x=tt(s,b),Kn("invalid",s);break;case"option":x=b;break;case"select":s._wrapperState={wasMultiple:!!b.multiple},x=K({},b,{value:void 0}),Kn("invalid",s);break;case"textarea":en(s,b),x=dn(s,b),Kn("invalid",s);break;default:x=b}nr(m,x),le=x;for(O in le)if(le.hasOwnProperty(O)){var ge=le[O];O==="style"?ha(s,ge):O==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,ge!=null&&Jt(s,ge)):O==="children"?typeof ge=="string"?(m!=="textarea"||ge!=="")&&on(s,ge):typeof ge=="number"&&on(s,""+ge):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(a.hasOwnProperty(O)?ge!=null&&O==="onScroll"&&Kn("scroll",s):ge!=null&&_(s,O,ge,W))}switch(m){case"input":tn(s),Gt(s,b,!1);break;case"textarea":tn(s),kn(s);break;case"option":b.value!=null&&s.setAttribute("value",""+Ze(b.value));break;case"select":s.multiple=!!b.multiple,O=b.value,O!=null?Xt(s,!!b.multiple,O,!1):b.defaultValue!=null&&Xt(s,!!b.multiple,b.defaultValue,!0);break;default:typeof x.onClick=="function"&&(s.onclick=qf)}switch(m){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}}b&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Ia(u),null;case 6:if(s&&u.stateNode!=null)Wy(s,u,s.memoizedProps,b);else{if(typeof b!="string"&&u.stateNode===null)throw Error(n(166));if(m=wl(Ad.current),wl(yi.current),Cd(u)){if(b=u.stateNode,m=u.memoizedProps,b[Yi]=u,(O=b.nodeValue!==m)&&(s=wa,s!==null))switch(s.tag){case 3:Dd(b.nodeValue,m,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Dd(b.nodeValue,m,(s.mode&1)!==0)}O&&(u.flags|=4)}else b=(m.nodeType===9?m:m.ownerDocument).createTextNode(b),b[Yi]=u,u.stateNode=b}return Ia(u),null;case 13:if(Qn(er),b=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Xn&&bo!==null&&u.mode&1&&!(u.flags&128))vm(),$i(),u.flags|=98560,O=!1;else if(O=Cd(u),b!==null&&b.dehydrated!==null){if(s===null){if(!O)throw Error(n(318));if(O=u.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(n(317));O[Yi]=u}else $i(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Ia(u),O=!1}else pi!==null&&(Xm(pi),pi=null),O=!0;if(!O)return u.flags&65536?u:null}return u.flags&128?(u.lanes=m,u):(b=b!==null,b!==(s!==null&&s.memoizedState!==null)&&b&&(u.child.flags|=8192,u.mode&1&&(s===null||er.current&1?Ur===0&&(Ur=3):ng())),u.updateQueue!==null&&(u.flags|=4),Ia(u),null);case 4:return Tc(),Ym(s,u),s===null&&sl(u.stateNode.containerInfo),Ia(u),null;case 10:return ah(u.type._context),Ia(u),null;case 17:return to(u.type)&&Qf(),Ia(u),null;case 19:if(Qn(er),O=u.memoizedState,O===null)return Ia(u),null;if(b=(u.flags&128)!==0,W=O.rendering,W===null)if(b)Ac(O,!1);else{if(Ur!==0||s!==null&&s.flags&128)for(s=u.child;s!==null;){if(W=Fd(s),W!==null){for(u.flags|=128,Ac(O,!1),b=W.updateQueue,b!==null&&(u.updateQueue=b,u.flags|=4),u.subtreeFlags=0,b=m,m=u.child;m!==null;)O=m,s=b,O.flags&=14680066,W=O.alternate,W===null?(O.childLanes=0,O.lanes=s,O.child=null,O.subtreeFlags=0,O.memoizedProps=null,O.memoizedState=null,O.updateQueue=null,O.dependencies=null,O.stateNode=null):(O.childLanes=W.childLanes,O.lanes=W.lanes,O.child=W.child,O.subtreeFlags=0,O.deletions=null,O.memoizedProps=W.memoizedProps,O.memoizedState=W.memoizedState,O.updateQueue=W.updateQueue,O.type=W.type,s=W.dependencies,O.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),m=m.sibling;return qn(er,er.current&1|2),u.child}s=s.sibling}O.tail!==null&&An()>Lc&&(u.flags|=128,b=!0,Ac(O,!1),u.lanes=4194304)}else{if(!b)if(s=Fd(W),s!==null){if(u.flags|=128,b=!0,m=s.updateQueue,m!==null&&(u.updateQueue=m,u.flags|=4),Ac(O,!0),O.tail===null&&O.tailMode==="hidden"&&!W.alternate&&!Xn)return Ia(u),null}else 2*An()-O.renderingStartTime>Lc&&m!==1073741824&&(u.flags|=128,b=!0,Ac(O,!1),u.lanes=4194304);O.isBackwards?(W.sibling=u.child,u.child=W):(m=O.last,m!==null?m.sibling=W:u.child=W,O.last=W)}return O.tail!==null?(u=O.tail,O.rendering=u,O.tail=u.sibling,O.renderingStartTime=An(),u.sibling=null,m=er.current,qn(er,b?m&1|2:m&1),u):(Ia(u),null);case 22:case 23:return tg(),b=u.memoizedState!==null,s!==null&&s.memoizedState!==null!==b&&(u.flags|=8192),b&&u.mode&1?Io&1073741824&&(Ia(u),u.subtreeFlags&6&&(u.flags|=8192)):Ia(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function H1(s,u){switch(wu(u),u.tag){case 1:return to(u.type)&&Qf(),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Tc(),Qn(eo),Qn(va),xm(),s=u.flags,s&65536&&!(s&128)?(u.flags=s&-65537|128,u):null;case 5:return Em(u),null;case 13:if(Qn(er),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(n(340));$i()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return Qn(er),null;case 4:return Tc(),null;case 10:return ah(u.type._context),null;case 22:case 23:return tg(),null;case 24:return null;default:return null}}var Vo=!1,Fn=!1,zm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Sl(s,u){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(b){pr(s,u,b)}else m.current=null}function Vm(s,u,m){try{m()}catch(b){pr(s,u,b)}}var $y=!1;function zd(s,u){if(Td=vo,s=Yn(),gd(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var b=m.getSelection&&m.getSelection();if(b&&b.rangeCount!==0){m=b.anchorNode;var x=b.anchorOffset,O=b.focusNode;b=b.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var W=0,le=-1,ge=-1,Pe=0,Ge=0,nt=s,qe=null;t:for(;;){for(var yt;nt!==m||x!==0&&nt.nodeType!==3||(le=W+x),nt!==O||b!==0&&nt.nodeType!==3||(ge=W+b),nt.nodeType===3&&(W+=nt.nodeValue.length),(yt=nt.firstChild)!==null;)qe=nt,nt=yt;for(;;){if(nt===s)break t;if(qe===m&&++Pe===x&&(le=W),qe===O&&++Ge===b&&(ge=W),(yt=nt.nextSibling)!==null)break;nt=qe,qe=nt.parentNode}nt=yt}m=le===-1||ge===-1?null:{start:le,end:ge}}else m=null}m=m||{start:0,end:0}}else m=null;for(mu={focusedElem:s,selectionRange:m},vo=!1,wt=u;wt!==null;)if(u=wt,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,wt=s;else for(;wt!==null;){u=wt;try{var Dt=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var Et=Dt.memoizedProps,br=Dt.memoizedState,xe=u.stateNode,ye=xe.getSnapshotBeforeUpdate(u.elementType===u.type?Et:mi(u.type,Et),br);xe.__reactInternalSnapshotBeforeUpdate=ye}break;case 3:var Me=u.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(lt){pr(u,u.return,lt)}if(s=u.sibling,s!==null){s.return=u.return,wt=s;break}wt=u.return}return Dt=$y,$y=!1,Dt}function Fc(s,u,m){var b=u.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var x=b=b.next;do{if((x.tag&s)===s){var O=x.destroy;x.destroy=void 0,O!==void 0&&Vm(u,m,O)}x=x.next}while(x!==b)}}function Vd(s,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&s)===s){var b=m.create;m.destroy=b()}m=m.next}while(m!==u)}}function Wm(s){var u=s.ref;if(u!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof u=="function"?u(s):u.current=s}}function Zy(s){var u=s.alternate;u!==null&&(s.alternate=null,Zy(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&(delete u[Yi],delete u[cl],delete u[Jf],delete u[G],delete u[vc])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function qy(s){return s.tag===5||s.tag===3||s.tag===4}function Gy(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||qy(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ch(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.nodeType===8?m.parentNode.insertBefore(s,u):m.insertBefore(s,u):(m.nodeType===8?(u=m.parentNode,u.insertBefore(s,m)):(u=m,u.appendChild(s)),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=qf));else if(b!==4&&(s=s.child,s!==null))for(Ch(s,u,m),s=s.sibling;s!==null;)Ch(s,u,m),s=s.sibling}function Mh(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(b!==4&&(s=s.child,s!==null))for(Mh(s,u,m),s=s.sibling;s!==null;)Mh(s,u,m),s=s.sibling}var ia=null,Do=!1;function Ms(s,u,m){for(m=m.child;m!==null;)Oc(s,u,m),m=m.sibling}function Oc(s,u,m){if(Pa&&typeof Pa.onCommitFiberUnmount=="function")try{Pa.onCommitFiberUnmount(ho,m)}catch{}switch(m.tag){case 5:Fn||Sl(m,u);case 6:var b=ia,x=Do;ia=null,Ms(s,u,m),ia=b,Do=x,ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):ia.removeChild(m.stateNode));break;case 18:ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?pm(s.parentNode,m):s.nodeType===1&&pm(s,m),hn(s)):pm(ia,m.stateNode));break;case 4:b=ia,x=Do,ia=m.stateNode.containerInfo,Do=!0,Ms(s,u,m),ia=b,Do=x;break;case 0:case 11:case 14:case 15:if(!Fn&&(b=m.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){x=b=b.next;do{var O=x,W=O.destroy;O=O.tag,W!==void 0&&(O&2||O&4)&&Vm(m,u,W),x=x.next}while(x!==b)}Ms(s,u,m);break;case 1:if(!Fn&&(Sl(m,u),b=m.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=m.memoizedProps,b.state=m.memoizedState,b.componentWillUnmount()}catch(le){pr(m,u,le)}Ms(s,u,m);break;case 21:Ms(s,u,m);break;case 22:m.mode&1?(Fn=(b=Fn)||m.memoizedState!==null,Ms(s,u,m),Fn=b):Ms(s,u,m);break;default:Ms(s,u,m)}}function kh(s){var u=s.updateQueue;if(u!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new zm),u.forEach(function(b){var x=q1.bind(null,s,b);m.has(b)||(m.add(b),b.then(x,x))})}}function Wo(s,u){var m=u.deletions;if(m!==null)for(var b=0;b<m.length;b++){var x=m[b];try{var O=s,W=u,le=W;e:for(;le!==null;){switch(le.tag){case 5:ia=le.stateNode,Do=!1;break e;case 3:ia=le.stateNode.containerInfo,Do=!0;break e;case 4:ia=le.stateNode.containerInfo,Do=!0;break e}le=le.return}if(ia===null)throw Error(n(160));Oc(O,W,x),ia=null,Do=!1;var ge=x.alternate;ge!==null&&(ge.return=null),x.return=null}catch(Pe){pr(x,u,Pe)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)$m(u,s),u=u.sibling}function $m(s,u){var m=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Wo(u,s),To(s),b&4){try{Fc(3,s,s.return),Vd(3,s)}catch(Et){pr(s,s.return,Et)}try{Fc(5,s,s.return)}catch(Et){pr(s,s.return,Et)}}break;case 1:Wo(u,s),To(s),b&512&&m!==null&&Sl(m,m.return);break;case 5:if(Wo(u,s),To(s),b&512&&m!==null&&Sl(m,m.return),s.flags&32){var x=s.stateNode;try{on(x,"")}catch(Et){pr(s,s.return,Et)}}if(b&4&&(x=s.stateNode,x!=null)){var O=s.memoizedProps,W=m!==null?m.memoizedProps:O,le=s.type,ge=s.updateQueue;if(s.updateQueue=null,ge!==null)try{le==="input"&&O.type==="radio"&&O.name!=null&&St(x,O),Lr(le,W);var Pe=Lr(le,O);for(W=0;W<ge.length;W+=2){var Ge=ge[W],nt=ge[W+1];Ge==="style"?ha(x,nt):Ge==="dangerouslySetInnerHTML"?Jt(x,nt):Ge==="children"?on(x,nt):_(x,Ge,nt,Pe)}switch(le){case"input":Tt(x,O);break;case"textarea":Zn(x,O);break;case"select":var qe=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!O.multiple;var yt=O.value;yt!=null?Xt(x,!!O.multiple,yt,!1):qe!==!!O.multiple&&(O.defaultValue!=null?Xt(x,!!O.multiple,O.defaultValue,!0):Xt(x,!!O.multiple,O.multiple?[]:"",!1))}x[cl]=O}catch(Et){pr(s,s.return,Et)}}break;case 6:if(Wo(u,s),To(s),b&4){if(s.stateNode===null)throw Error(n(162));x=s.stateNode,O=s.memoizedProps;try{x.nodeValue=O}catch(Et){pr(s,s.return,Et)}}break;case 3:if(Wo(u,s),To(s),b&4&&m!==null&&m.memoizedState.isDehydrated)try{hn(u.containerInfo)}catch(Et){pr(s,s.return,Et)}break;case 4:Wo(u,s),To(s);break;case 13:Wo(u,s),To(s),x=s.child,x.flags&8192&&(O=x.memoizedState!==null,x.stateNode.isHidden=O,!O||x.alternate!==null&&x.alternate.memoizedState!==null||(Ah=An())),b&4&&kh(s);break;case 22:if(Ge=m!==null&&m.memoizedState!==null,s.mode&1?(Fn=(Pe=Fn)||Ge,Wo(u,s),Fn=Pe):Wo(u,s),To(s),b&8192){if(Pe=s.memoizedState!==null,(s.stateNode.isHidden=Pe)&&!Ge&&s.mode&1)for(wt=s,Ge=s.child;Ge!==null;){for(nt=wt=Ge;wt!==null;){switch(qe=wt,yt=qe.child,qe.tag){case 0:case 11:case 14:case 15:Fc(4,qe,qe.return);break;case 1:Sl(qe,qe.return);var Dt=qe.stateNode;if(typeof Dt.componentWillUnmount=="function"){b=qe,m=qe.return;try{u=b,Dt.props=u.memoizedProps,Dt.state=u.memoizedState,Dt.componentWillUnmount()}catch(Et){pr(b,m,Et)}}break;case 5:Sl(qe,qe.return);break;case 22:if(qe.memoizedState!==null){Ky(nt);continue}}yt!==null?(yt.return=qe,wt=yt):Ky(nt)}Ge=Ge.sibling}e:for(Ge=null,nt=s;;){if(nt.tag===5){if(Ge===null){Ge=nt;try{x=nt.stateNode,Pe?(O=x.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none"):(le=nt.stateNode,ge=nt.memoizedProps.style,W=ge!=null&&ge.hasOwnProperty("display")?ge.display:null,le.style.display=fr("display",W))}catch(Et){pr(s,s.return,Et)}}}else if(nt.tag===6){if(Ge===null)try{nt.stateNode.nodeValue=Pe?"":nt.memoizedProps}catch(Et){pr(s,s.return,Et)}}else if((nt.tag!==22&&nt.tag!==23||nt.memoizedState===null||nt===s)&&nt.child!==null){nt.child.return=nt,nt=nt.child;continue}if(nt===s)break e;for(;nt.sibling===null;){if(nt.return===null||nt.return===s)break e;Ge===nt&&(Ge=null),nt=nt.return}Ge===nt&&(Ge=null),nt.sibling.return=nt.return,nt=nt.sibling}}break;case 19:Wo(u,s),To(s),b&4&&kh(s);break;case 21:break;default:Wo(u,s),To(s)}}function To(s){var u=s.flags;if(u&2){try{e:{for(var m=s.return;m!==null;){if(qy(m)){var b=m;break e}m=m.return}throw Error(n(160))}switch(b.tag){case 5:var x=b.stateNode;b.flags&32&&(on(x,""),b.flags&=-33);var O=Gy(s);Mh(s,O,x);break;case 3:case 4:var W=b.stateNode.containerInfo,le=Gy(s);Ch(s,le,W);break;default:throw Error(n(161))}}catch(ge){pr(s,s.return,ge)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function Jy(s,u,m){wt=s,bi(s)}function bi(s,u,m){for(var b=(s.mode&1)!==0;wt!==null;){var x=wt,O=x.child;if(x.tag===22&&b){var W=x.memoizedState!==null||Vo;if(!W){var le=x.alternate,ge=le!==null&&le.memoizedState!==null||Fn;le=Vo;var Pe=Fn;if(Vo=W,(Fn=ge)&&!Pe)for(wt=x;wt!==null;)W=wt,ge=W.child,W.tag===22&&W.memoizedState!==null?Zm(x):ge!==null?(ge.return=W,wt=ge):Zm(x);for(;O!==null;)wt=O,bi(O),O=O.sibling;wt=x,Vo=le,Fn=Pe}Dl(s)}else x.subtreeFlags&8772&&O!==null?(O.return=x,wt=O):Dl(s)}}function Dl(s){for(;wt!==null;){var u=wt;if(u.flags&8772){var m=u.alternate;try{if(u.flags&8772)switch(u.tag){case 0:case 11:case 15:Fn||Vd(5,u);break;case 1:var b=u.stateNode;if(u.flags&4&&!Fn)if(m===null)b.componentDidMount();else{var x=u.elementType===u.type?m.memoizedProps:mi(u.type,m.memoizedProps);b.componentDidUpdate(x,m.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var O=u.updateQueue;O!==null&&ky(u,O,b);break;case 3:var W=u.updateQueue;if(W!==null){if(m=null,u.child!==null)switch(u.child.tag){case 5:m=u.child.stateNode;break;case 1:m=u.child.stateNode}ky(u,W,m)}break;case 5:var le=u.stateNode;if(m===null&&u.flags&4){m=le;var ge=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":ge.autoFocus&&m.focus();break;case"img":ge.src&&(m.src=ge.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var Pe=u.alternate;if(Pe!==null){var Ge=Pe.memoizedState;if(Ge!==null){var nt=Ge.dehydrated;nt!==null&&hn(nt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Fn||u.flags&512&&Wm(u)}catch(qe){pr(u,u.return,qe)}}if(u===s){wt=null;break}if(m=u.sibling,m!==null){m.return=u.return,wt=m;break}wt=u.return}}function Ky(s){for(;wt!==null;){var u=wt;if(u===s){wt=null;break}var m=u.sibling;if(m!==null){m.return=u.return,wt=m;break}wt=u.return}}function Zm(s){for(;wt!==null;){var u=wt;try{switch(u.tag){case 0:case 11:case 15:var m=u.return;try{Vd(4,u)}catch(ge){pr(u,m,ge)}break;case 1:var b=u.stateNode;if(typeof b.componentDidMount=="function"){var x=u.return;try{b.componentDidMount()}catch(ge){pr(u,x,ge)}}var O=u.return;try{Wm(u)}catch(ge){pr(u,O,ge)}break;case 5:var W=u.return;try{Wm(u)}catch(ge){pr(u,W,ge)}}}catch(ge){pr(u,u.return,ge)}if(u===s){wt=null;break}var le=u.sibling;if(le!==null){le.return=u.return,wt=le;break}wt=u.return}}var Y1=Math.ceil,Nh=k.ReactCurrentDispatcher,qm=k.ReactCurrentOwner,$o=k.ReactCurrentBatchConfig,wn=0,Jr=null,Nr=null,sa=0,Io=0,Pc=Xa(0),Ur=0,jc=null,Tl=0,Wd=0,Gm=0,$d=null,ro=null,Ah=0,Lc=1/0,ks=null,Fh=!1,Jm=null,Il=null,Oh=!1,zr=null,Ph=0,Zd=0,Km=null,qd=-1,jh=0;function Ua(){return wn&6?An():qd!==-1?qd:qd=An()}function El(s){return s.mode&1?wn&2&&sa!==0?sa&-sa:Cy.transition!==null?(jh===0&&(jh=oe()),jh):(s=ct,s!==0||(s=window.event,s=s===void 0?16:cd(s.type)),s):1}function Si(s,u,m,b){if(50<Zd)throw Zd=0,Km=null,Error(n(185));Ie(s,m,b),(!(wn&2)||s!==Jr)&&(s===Jr&&(!(wn&2)&&(Wd|=m),Ur===4&&xl(s,sa)),Ea(s,b),m===1&&wn===0&&!(u.mode&1)&&(Lc=An()+500,Xf&&fl()))}function Ea(s,u){var m=s.callbackNode;Y(s,u);var b=mo(s,s===Jr?sa:0);if(b===0)m!==null&&ou(m),s.callbackNode=null,s.callbackPriority=0;else if(u=b&-b,s.callbackPriority!==u){if(m!=null&&ou(m),u===1)s.tag===0?gu(Xy.bind(null,s)):Iy(Xy.bind(null,s)),Gf(function(){!(wn&6)&&fl()}),m=null;else{switch(Ft(b)){case 1:m=Zs;break;case 4:m=qs;break;case 16:m=ui;break;case 536870912:m=Fo;break;default:m=ui}m=i0(m,Qy.bind(null,s))}s.callbackPriority=u,s.callbackNode=m}}function Qy(s,u){if(qd=-1,jh=0,wn&6)throw Error(n(327));var m=s.callbackNode;if(Cl()&&s.callbackNode!==m)return null;var b=mo(s,s===Jr?sa:0);if(b===0)return null;if(b&30||b&s.expiredLanes||u)u=Lh(s,b);else{u=b;var x=wn;wn|=2;var O=t0();(Jr!==s||sa!==u)&&(ks=null,Lc=An()+500,xu(s,u));do try{V1();break}catch(le){e0(s,le)}while(!0);Md(),Nh.current=O,wn=x,Nr!==null?u=0:(Jr=null,sa=0,u=Ur)}if(u!==0){if(u===2&&(x=J(s),x!==0&&(b=x,u=Qm(s,x))),u===1)throw m=jc,xu(s,0),xl(s,b),Ea(s,An()),m;if(u===6)xl(s,b);else{if(x=s.current.alternate,!(b&30)&&!U1(x)&&(u=Lh(s,b),u===2&&(O=J(s),O!==0&&(b=O,u=Qm(s,O))),u===1))throw m=jc,xu(s,0),xl(s,b),Ea(s,An()),m;switch(s.finishedWork=x,s.finishedLanes=b,u){case 0:case 1:throw Error(n(345));case 2:Cu(s,ro,ks);break;case 3:if(xl(s,b),(b&130023424)===b&&(u=Ah+500-An(),10<u)){if(mo(s,0)!==0)break;if(x=s.suspendedLanes,(x&b)!==b){Ua(),s.pingedLanes|=s.suspendedLanes&x;break}s.timeoutHandle=ll(Cu.bind(null,s,ro,ks),u);break}Cu(s,ro,ks);break;case 4:if(xl(s,b),(b&4194240)===b)break;for(u=s.eventTimes,x=-1;0<b;){var W=31-Rr(b);O=1<<W,W=u[W],W>x&&(x=W),b&=~O}if(b=x,b=An()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*Y1(b/1960))-b,10<b){s.timeoutHandle=ll(Cu.bind(null,s,ro,ks),b);break}Cu(s,ro,ks);break;case 5:Cu(s,ro,ks);break;default:throw Error(n(329))}}}return Ea(s,An()),s.callbackNode===m?Qy.bind(null,s):null}function Qm(s,u){var m=$d;return s.current.memoizedState.isDehydrated&&(xu(s,u).flags|=256),s=Lh(s,u),s!==2&&(u=ro,ro=m,u!==null&&Xm(u)),s}function Xm(s){ro===null?ro=s:ro.push.apply(ro,s)}function U1(s){for(var u=s;;){if(u.flags&16384){var m=u.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var b=0;b<m.length;b++){var x=m[b],O=x.getSnapshot;x=x.value;try{if(!Oe(O(),x))return!1}catch{return!1}}}if(m=u.child,u.subtreeFlags&16384&&m!==null)m.return=u,u=m;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function xl(s,u){for(u&=~Gm,u&=~Wd,s.suspendedLanes|=u,s.pingedLanes&=~u,s=s.expirationTimes;0<u;){var m=31-Rr(u),b=1<<m;s[m]=-1,u&=~b}}function Xy(s){if(wn&6)throw Error(n(327));Cl();var u=mo(s,0);if(!(u&1))return Ea(s,An()),null;var m=Lh(s,u);if(s.tag!==0&&m===2){var b=J(s);b!==0&&(u=b,m=Qm(s,b))}if(m===1)throw m=jc,xu(s,0),xl(s,u),Ea(s,An()),m;if(m===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=u,Cu(s,ro,ks),Ea(s,An()),null}function eg(s,u){var m=wn;wn|=1;try{return s(u)}finally{wn=m,wn===0&&(Lc=An()+500,Xf&&fl())}}function Eu(s){zr!==null&&zr.tag===0&&!(wn&6)&&Cl();var u=wn;wn|=1;var m=$o.transition,b=ct;try{if($o.transition=null,ct=1,s)return s()}finally{ct=b,$o.transition=m,wn=u,!(wn&6)&&fl()}}function tg(){Io=Pc.current,Qn(Pc)}function xu(s,u){s.finishedWork=null,s.finishedLanes=0;var m=s.timeoutHandle;if(m!==-1&&(s.timeoutHandle=-1,Ed(m)),Nr!==null)for(m=Nr.return;m!==null;){var b=m;switch(wu(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&Qf();break;case 3:Tc(),Qn(eo),Qn(va),xm();break;case 5:Em(b);break;case 4:Tc();break;case 13:Qn(er);break;case 19:Qn(er);break;case 10:ah(b.type._context);break;case 22:case 23:tg()}m=m.return}if(Jr=s,Nr=s=Ml(s.current,null),sa=Io=u,Ur=0,jc=null,Gm=Wd=Tl=0,ro=$d=null,So!==null){for(u=0;u<So.length;u++)if(m=So[u],b=m.interleaved,b!==null){m.interleaved=null;var x=b.next,O=m.pending;if(O!==null){var W=O.next;O.next=x,b.next=W}m.pending=b}So=null}return s}function e0(s,u){do{var m=Nr;try{if(Md(),Ic.current=xs,dh){for(var b=or.memoizedState;b!==null;){var x=b.queue;x!==null&&(x.pending=null),b=b.next}dh=!1}if(Du=0,Br=ir=or=null,Pd=!1,Sa=0,qm.current=null,m===null||m.return===null){Ur=1,jc=u,Nr=null;break}e:{var O=s,W=m.return,le=m,ge=u;if(u=sa,le.flags|=32768,ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Pe=ge,Ge=le,nt=Ge.tag;if(!(Ge.mode&1)&&(nt===0||nt===11||nt===15)){var qe=Ge.alternate;qe?(Ge.updateQueue=qe.updateQueue,Ge.memoizedState=qe.memoizedState,Ge.lanes=qe.lanes):(Ge.updateQueue=null,Ge.memoizedState=null)}var yt=Lm(W);if(yt!==null){yt.flags&=-257,Bd(yt,W,le,O,u),yt.mode&1&&By(O,Pe,u),u=yt,ge=Pe;var Dt=u.updateQueue;if(Dt===null){var Et=new Set;Et.add(ge),u.updateQueue=Et}else Dt.add(ge);break e}else{if(!(u&1)){By(O,Pe,u),ng();break e}ge=Error(n(426))}}else if(Xn&&le.mode&1){var br=Lm(W);if(br!==null){!(br.flags&65536)&&(br.flags|=256),Bd(br,W,le,O,u),Zi(Iu(ge,le));break e}}O=ge=Iu(ge,le),Ur!==4&&(Ur=2),$d===null?$d=[O]:$d.push(O),O=W;do{switch(O.tag){case 3:O.flags|=65536,u&=-u,O.lanes|=u;var xe=Dh(O,ge,u);wm(O,xe);break e;case 1:le=ge;var ye=O.type,Me=O.stateNode;if(!(O.flags&128)&&(typeof ye.getDerivedStateFromError=="function"||Me!==null&&typeof Me.componentDidCatch=="function"&&(Il===null||!Il.has(Me)))){O.flags|=65536,u&=-u,O.lanes|=u;var lt=_d(O,le,u);wm(O,lt);break e}}O=O.return}while(O!==null)}r0(m)}catch(Ct){u=Ct,Nr===m&&m!==null&&(Nr=m=m.return);continue}break}while(!0)}function t0(){var s=Nh.current;return Nh.current=xs,s===null?xs:s}function ng(){(Ur===0||Ur===3||Ur===2)&&(Ur=4),Jr===null||!(Tl&268435455)&&!(Wd&268435455)||xl(Jr,sa)}function Lh(s,u){var m=wn;wn|=2;var b=t0();(Jr!==s||sa!==u)&&(ks=null,xu(s,u));do try{z1();break}catch(x){e0(s,x)}while(!0);if(Md(),wn=m,Nh.current=b,Nr!==null)throw Error(n(261));return Jr=null,sa=0,Ur}function z1(){for(;Nr!==null;)n0(Nr)}function V1(){for(;Nr!==null&&!ds();)n0(Nr)}function n0(s){var u=o0(s.alternate,s,Io);s.memoizedProps=s.pendingProps,u===null?r0(s):Nr=u,qm.current=null}function r0(s){var u=s;do{var m=u.alternate;if(s=u.return,u.flags&32768){if(m=H1(m,u),m!==null){m.flags&=32767,Nr=m;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Ur=6,Nr=null;return}}else if(m=B1(m,u,Io),m!==null){Nr=m;return}if(u=u.sibling,u!==null){Nr=u;return}Nr=u=s}while(u!==null);Ur===0&&(Ur=5)}function Cu(s,u,m){var b=ct,x=$o.transition;try{$o.transition=null,ct=1,W1(s,u,m,b)}finally{$o.transition=x,ct=b}return null}function W1(s,u,m,b){do Cl();while(zr!==null);if(wn&6)throw Error(n(327));m=s.finishedWork;var x=s.finishedLanes;if(m===null)return null;if(s.finishedWork=null,s.finishedLanes=0,m===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var O=m.lanes|m.childLanes;if(Ue(s,O),s===Jr&&(Nr=Jr=null,sa=0),!(m.subtreeFlags&2064)&&!(m.flags&2064)||Oh||(Oh=!0,i0(ui,function(){return Cl(),null})),O=(m.flags&15990)!==0,m.subtreeFlags&15990||O){O=$o.transition,$o.transition=null;var W=ct;ct=1;var le=wn;wn|=4,qm.current=null,zd(s,m),$m(m,s),P1(mu),vo=!!Td,mu=Td=null,s.current=m,Jy(m),ec(),wn=le,ct=W,$o.transition=O}else s.current=m;if(Oh&&(Oh=!1,zr=s,Ph=x),O=s.pendingLanes,O===0&&(Il=null),fs(m.stateNode),Ea(s,An()),u!==null)for(b=s.onRecoverableError,m=0;m<u.length;m++)x=u[m],b(x.value,{componentStack:x.stack,digest:x.digest});if(Fh)throw Fh=!1,s=Jm,Jm=null,s;return Ph&1&&s.tag!==0&&Cl(),O=s.pendingLanes,O&1?s===Km?Zd++:(Zd=0,Km=s):Zd=0,fl(),null}function Cl(){if(zr!==null){var s=Ft(Ph),u=$o.transition,m=ct;try{if($o.transition=null,ct=16>s?16:s,zr===null)var b=!1;else{if(s=zr,zr=null,Ph=0,wn&6)throw Error(n(331));var x=wn;for(wn|=4,wt=s.current;wt!==null;){var O=wt,W=O.child;if(wt.flags&16){var le=O.deletions;if(le!==null){for(var ge=0;ge<le.length;ge++){var Pe=le[ge];for(wt=Pe;wt!==null;){var Ge=wt;switch(Ge.tag){case 0:case 11:case 15:Fc(8,Ge,O)}var nt=Ge.child;if(nt!==null)nt.return=Ge,wt=nt;else for(;wt!==null;){Ge=wt;var qe=Ge.sibling,yt=Ge.return;if(Zy(Ge),Ge===Pe){wt=null;break}if(qe!==null){qe.return=yt,wt=qe;break}wt=yt}}}var Dt=O.alternate;if(Dt!==null){var Et=Dt.child;if(Et!==null){Dt.child=null;do{var br=Et.sibling;Et.sibling=null,Et=br}while(Et!==null)}}wt=O}}if(O.subtreeFlags&2064&&W!==null)W.return=O,wt=W;else e:for(;wt!==null;){if(O=wt,O.flags&2048)switch(O.tag){case 0:case 11:case 15:Fc(9,O,O.return)}var xe=O.sibling;if(xe!==null){xe.return=O.return,wt=xe;break e}wt=O.return}}var ye=s.current;for(wt=ye;wt!==null;){W=wt;var Me=W.child;if(W.subtreeFlags&2064&&Me!==null)Me.return=W,wt=Me;else e:for(W=ye;wt!==null;){if(le=wt,le.flags&2048)try{switch(le.tag){case 0:case 11:case 15:Vd(9,le)}}catch(Ct){pr(le,le.return,Ct)}if(le===W){wt=null;break e}var lt=le.sibling;if(lt!==null){lt.return=le.return,wt=lt;break e}wt=le.return}}if(wn=x,fl(),Pa&&typeof Pa.onPostCommitFiberRoot=="function")try{Pa.onPostCommitFiberRoot(ho,s)}catch{}b=!0}return b}finally{ct=m,$o.transition=u}}return!1}function rg(s,u,m){u=Iu(m,u),u=Dh(s,u,1),s=ml(s,u,1),u=Ua(),s!==null&&(Ie(s,1,u),Ea(s,u))}function pr(s,u,m){if(s.tag===3)rg(s,s,m);else for(;u!==null;){if(u.tag===3){rg(u,s,m);break}else if(u.tag===1){var b=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(Il===null||!Il.has(b))){s=Iu(m,s),s=_d(u,s,1),u=ml(u,s,1),s=Ua(),u!==null&&(Ie(u,1,s),Ea(u,s));break}}u=u.return}}function $1(s,u,m){var b=s.pingCache;b!==null&&b.delete(u),u=Ua(),s.pingedLanes|=s.suspendedLanes&m,Jr===s&&(sa&m)===m&&(Ur===4||Ur===3&&(sa&130023424)===sa&&500>An()-Ah?xu(s,0):Gm|=m),Ea(s,u)}function a0(s,u){u===0&&(s.mode&1?(u=hs,hs<<=1,!(hs&130023424)&&(hs=4194304)):u=1);var m=Ua();s=gi(s,u),s!==null&&(Ie(s,u,m),Ea(s,m))}function Z1(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),a0(s,m)}function q1(s,u){var m=0;switch(s.tag){case 13:var b=s.stateNode,x=s.memoizedState;x!==null&&(m=x.retryLane);break;case 19:b=s.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(u),a0(s,m)}var o0;o0=function(s,u,m){if(s!==null)if(s.memoizedProps!==u.pendingProps||eo.current)Da=!0;else{if(!(s.lanes&m)&&!(u.flags&128))return Da=!1,Ta(s,u,m);Da=!!(s.flags&131072)}else Da=!1,Xn&&u.flags&1048576&&Ey(u,th,u.index);switch(u.lanes=0,u.tag){case 2:var b=u.type;Nc(s,u),s=u.pendingProps;var x=wc(u,va.current);hl(u,m),x=fh(null,u,b,s,x,m);var O=hh();return u.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,to(b)?(O=!0,Ho(u)):O=!1,u.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,ym(u),x.updater=sh,u.stateNode=x,x._reactInternals=u,Dm(u,b,s,m),u=Hm(null,u,b,!0,O,m)):(u.tag=0,Xn&&O&&xd(u),Ya(null,u,x,m),u=u.child),u;case 16:b=u.elementType;e:{switch(Nc(s,u),s=u.pendingProps,x=b._init,b=x(b._payload),u.type=b,x=u.tag=Rh(b),s=mi(b,s),x){case 0:u=Th(null,u,b,s,m);break e;case 1:u=Uy(null,u,b,s,m);break e;case 11:u=Rm(null,u,b,s,m);break e;case 14:u=qi(null,u,b,mi(b.type,s),m);break e}throw Error(n(306,b,""))}return u;case 0:return b=u.type,x=u.pendingProps,x=u.elementType===b?x:mi(b,x),Th(s,u,b,x,m);case 1:return b=u.type,x=u.pendingProps,x=u.elementType===b?x:mi(b,x),Uy(s,u,b,x,m);case 3:e:{if(Gi(u),s===null)throw Error(n(387));b=u.pendingProps,O=u.memoizedState,x=O.element,My(s,u),ih(u,b,null,m);var W=u.memoizedState;if(b=W.element,O.isDehydrated)if(O={element:b,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},u.updateQueue.baseState=O,u.memoizedState=O,u.flags&256){x=Iu(Error(n(423)),u),u=Ih(s,u,b,m,x);break e}else if(b!==x){x=Iu(Error(n(424)),u),u=Ih(s,u,b,m,x);break e}else for(bo=ul(u.stateNode.containerInfo.firstChild),wa=u,Xn=!0,pi=null,m=Tm(u,null,b,m),u.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if($i(),b===x){u=Ji(s,u,m);break e}Ya(s,u,b,m)}u=u.child}return u;case 5:return Im(u),s===null&&no(u),b=u.type,x=u.pendingProps,O=s!==null?s.memoizedProps:null,W=x.children,Id(b,x)?W=null:O!==null&&Id(b,O)&&(u.flags|=32),Yy(s,u),Ya(s,u,W,m),u.child;case 6:return s===null&&no(u),null;case 13:return Ud(s,u,m);case 4:return ch(u,u.stateNode.containerInfo),b=u.pendingProps,s===null?u.child=vl(u,null,b,m):Ya(s,u,b,m),u.child;case 11:return b=u.type,x=u.pendingProps,x=u.elementType===b?x:mi(b,x),Rm(s,u,b,x,m);case 7:return Ya(s,u,u.pendingProps,m),u.child;case 8:return Ya(s,u,u.pendingProps.children,m),u.child;case 12:return Ya(s,u,u.pendingProps.children,m),u.child;case 10:e:{if(b=u.type._context,x=u.pendingProps,O=u.memoizedProps,W=x.value,qn(bu,b._currentValue),b._currentValue=W,O!==null)if(Oe(O.value,W)){if(O.children===x.children&&!eo.current){u=Ji(s,u,m);break e}}else for(O=u.child,O!==null&&(O.return=u);O!==null;){var le=O.dependencies;if(le!==null){W=O.child;for(var ge=le.firstContext;ge!==null;){if(ge.context===b){if(O.tag===1){ge=vi(-1,m&-m),ge.tag=2;var Pe=O.updateQueue;if(Pe!==null){Pe=Pe.shared;var Ge=Pe.pending;Ge===null?ge.next=ge:(ge.next=Ge.next,Ge.next=ge),Pe.pending=ge}}O.lanes|=m,ge=O.alternate,ge!==null&&(ge.lanes|=m),zo(O.return,m,u),le.lanes|=m;break}ge=ge.next}}else if(O.tag===10)W=O.type===u.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(n(341));W.lanes|=m,le=W.alternate,le!==null&&(le.lanes|=m),zo(W,m,u),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===u){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Ya(s,u,x.children,m),u=u.child}return u;case 9:return x=u.type,b=u.pendingProps.children,hl(u,m),x=Ba(x),b=b(x),u.flags|=1,Ya(s,u,b,m),u.child;case 14:return b=u.type,x=mi(b,u.pendingProps),x=mi(b.type,x),qi(s,u,b,x,m);case 15:return _m(s,u,u.type,u.pendingProps,m);case 17:return b=u.type,x=u.pendingProps,x=u.elementType===b?x:mi(b,x),Nc(s,u),u.tag=1,to(b)?(s=!0,Ho(u)):s=!1,hl(u,m),Sm(u,b,x),Dm(u,b,x,m),Hm(null,u,b,!0,s,m);case 19:return zy(s,u,m);case 22:return Bm(s,u,m)}throw Error(n(156,u.tag))};function i0(s,u){return cs(s,u)}function G1(s,u,m,b){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Eo(s,u,m,b){return new G1(s,u,m,b)}function ag(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Rh(s){if(typeof s=="function")return ag(s)?1:0;if(s!=null){if(s=s.$$typeof,s===Q)return 11;if(s===fe)return 14}return 2}function Ml(s,u){var m=s.alternate;return m===null?(m=Eo(s.tag,u,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=u,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,u=s.dependencies,m.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function _h(s,u,m,b,x,O){var W=2;if(b=s,typeof s=="function")ag(s)&&(W=1);else if(typeof s=="string")W=5;else e:switch(s){case H:return Mu(m.children,x,O,u);case U:W=8,x|=8;break;case z:return s=Eo(12,m,u,x|2),s.elementType=z,s.lanes=O,s;case se:return s=Eo(13,m,u,x),s.elementType=se,s.lanes=O,s;case ue:return s=Eo(19,m,u,x),s.elementType=ue,s.lanes=O,s;case pe:return Bh(m,x,O,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case $:W=10;break e;case X:W=9;break e;case Q:W=11;break e;case fe:W=14;break e;case Z:W=16,b=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return u=Eo(W,m,u,x),u.elementType=s,u.type=b,u.lanes=O,u}function Mu(s,u,m,b){return s=Eo(7,s,b,u),s.lanes=m,s}function Bh(s,u,m,b){return s=Eo(22,s,b,u),s.elementType=pe,s.lanes=m,s.stateNode={isHidden:!1},s}function og(s,u,m){return s=Eo(6,s,null,u),s.lanes=m,s}function ig(s,u,m){return u=Eo(4,s.children!==null?s.children:[],s.key,u),u.lanes=m,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function J1(s,u,m,b,x){this.tag=u,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ne(0),this.expirationTimes=Ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.identifierPrefix=b,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function sg(s,u,m,b,x,O,W,le,ge){return s=new J1(s,u,m,le,ge),u===1?(u=1,O===!0&&(u|=8)):u=0,O=Eo(3,null,null,u),s.current=O,O.stateNode=s,O.memoizedState={element:b,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},ym(O),s}function K1(s,u,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:b==null?null:""+b,children:s,containerInfo:u,implementation:m}}function s0(s){if(!s)return dl;s=s._reactInternals;e:{if(si(s)!==s||s.tag!==1)throw Error(n(170));var u=s;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(to(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(n(171))}if(s.tag===1){var m=s.type;if(to(m))return Dy(s,m,u)}return u}function l0(s,u,m,b,x,O,W,le,ge){return s=sg(m,b,!0,s,x,O,W,le,ge),s.context=s0(null),m=s.current,b=Ua(),x=El(m),O=vi(b,x),O.callback=u??null,ml(m,O,x),s.current.lanes=x,Ie(s,x,b),Ea(s,b),s}function Hh(s,u,m,b){var x=u.current,O=Ua(),W=El(x);return m=s0(m),u.context===null?u.context=m:u.pendingContext=m,u=vi(O,W),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=ml(x,u,W),s!==null&&(Si(s,x,W,O),gl(s,x,W)),W}function Yh(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function u0(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var m=s.retryLane;s.retryLane=m!==0&&m<u?m:u}}function lg(s,u){u0(s,u),(s=s.alternate)&&u0(s,u)}function Q1(){return null}var ug=typeof reportError=="function"?reportError:function(s){console.error(s)};function Uh(s){this._internalRoot=s}zh.prototype.render=Uh.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(n(409));Hh(s,u,null,null)},zh.prototype.unmount=Uh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;Eu(function(){Hh(null,s,null,null)}),u[wo]=null}};function zh(s){this._internalRoot=s}zh.prototype.unstable_scheduleHydration=function(s){if(s){var u=ja();s={blockedOn:null,target:s,priority:u};for(var m=0;m<Ri.length&&u!==0&&u<Ri[m].priority;m++);Ri.splice(m,0,s),m===0&&Po(s)}};function cg(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Vh(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function c0(){}function Wh(s,u,m,b,x){if(x){if(typeof b=="function"){var O=b;b=function(){var Pe=Yh(W);O.call(Pe)}}var W=l0(u,b,s,0,null,!1,!1,"",c0);return s._reactRootContainer=W,s[wo]=W.current,sl(s.nodeType===8?s.parentNode:s),Eu(),W}for(;x=s.lastChild;)s.removeChild(x);if(typeof b=="function"){var le=b;b=function(){var Pe=Yh(ge);le.call(Pe)}}var ge=sg(s,0,!1,null,null,!1,!1,"",c0);return s._reactRootContainer=ge,s[wo]=ge.current,sl(s.nodeType===8?s.parentNode:s),Eu(function(){Hh(u,ge,m,b)}),ge}function $h(s,u,m,b,x){var O=m._reactRootContainer;if(O){var W=O;if(typeof x=="function"){var le=x;x=function(){var ge=Yh(W);le.call(ge)}}Hh(u,W,s,x)}else W=Wh(m,u,s,x,b);return Yh(W)}$t=function(s){switch(s.tag){case 3:var u=s.stateNode;if(u.current.memoizedState.isDehydrated){var m=ci(u.pendingLanes);m!==0&&(it(u,m|1),Ea(u,An()),!(wn&6)&&(Lc=An()+500,fl()))}break;case 13:Eu(function(){var b=gi(s,1);if(b!==null){var x=Ua();Si(b,s,1,x)}}),lg(s,1)}},Pn=function(s){if(s.tag===13){var u=gi(s,134217728);if(u!==null){var m=Ua();Si(u,s,134217728,m)}lg(s,134217728)}},Ga=function(s){if(s.tag===13){var u=El(s),m=gi(s,u);if(m!==null){var b=Ua();Si(m,s,u,b)}lg(s,u)}},ja=function(){return ct},ra=function(s,u){var m=ct;try{return ct=s,u()}finally{ct=m}},Ce=function(s,u,m){switch(u){case"input":if(Tt(s,m),u=m.name,m.type==="radio"&&u!=null){for(m=s;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<m.length;u++){var b=m[u];if(b!==s&&b.form===s.form){var x=Kf(b);if(!x)throw Error(n(90));_e(b),Tt(b,x)}}}break;case"textarea":Zn(s,m);break;case"select":u=m.value,u!=null&&Xt(s,!!m.multiple,u,!1)}},Yt=eg,On=Eu;var X1={usingClientEntryPoint:!1,Events:[ga,nn,Kf,et,kt,eg]},Gd={findFiberByHostInstance:Ui,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},eS={bundleType:Gd.bundleType,version:Gd.version,rendererPackageName:Gd.rendererPackageName,rendererConfig:Gd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=us(s),s===null?null:s.stateNode},findFiberByHostInstance:Gd.findFiberByHostInstance||Q1,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 Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{ho=Zh.inject(eS),Pa=Zh}catch{}}return Jo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X1,Jo.createPortal=function(s,u){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cg(u))throw Error(n(200));return K1(s,u,null,m)},Jo.createRoot=function(s,u){if(!cg(s))throw Error(n(299));var m=!1,b="",x=ug;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),u=sg(s,1,!1,null,null,m,!1,b,x),s[wo]=u.current,sl(s.nodeType===8?s.parentNode:s),new Uh(u)},Jo.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=us(u),s=s===null?null:s.stateNode,s},Jo.flushSync=function(s){return Eu(s)},Jo.hydrate=function(s,u,m){if(!Vh(u))throw Error(n(200));return $h(null,s,u,!0,m)},Jo.hydrateRoot=function(s,u,m){if(!cg(s))throw Error(n(405));var b=m!=null&&m.hydratedSources||null,x=!1,O="",W=ug;if(m!=null&&(m.unstable_strictMode===!0&&(x=!0),m.identifierPrefix!==void 0&&(O=m.identifierPrefix),m.onRecoverableError!==void 0&&(W=m.onRecoverableError)),u=l0(u,null,s,1,m??null,x,!1,O,W),s[wo]=u.current,sl(s),b)for(s=0;s<b.length;s++)m=b[s],x=m._getVersion,x=x(m._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[m,x]:u.mutableSourceEagerHydrationData.push(m,x);return new zh(u)},Jo.render=function(s,u,m){if(!Vh(u))throw Error(n(200));return $h(null,s,u,!1,m)},Jo.unmountComponentAtNode=function(s){if(!Vh(s))throw Error(n(40));return s._reactRootContainer?(Eu(function(){$h(null,null,s,!1,function(){s._reactRootContainer=null,s[wo]=null})}),!0):!1},Jo.unstable_batchedUpdates=eg,Jo.unstable_renderSubtreeIntoContainer=function(s,u,m,b){if(!Vh(m))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return $h(s,u,m,!1,b)},Jo.version="18.2.0-next-9e3b772b8-20220608",Jo}function l6(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l6)}catch(e){console.error(e)}}l6();s6.exports=OH();var U2=s6.exports;const z2=qt(U2);var Av,u6=U2;Av=rs.createRoot=u6.createRoot;rs.hydrateRoot=u6.hydrateRoot;const PH=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:a}=e,o=()=>{r&&a()},i=l=>{(l.key==="Escape"||(l.ctrlKey||l.metaKey)&&l.key.toLowerCase()==="w")&&a()};return v.jsx("div",{className:`dialog-wrapper ${n}`,onClick:o,onKeyDown:l=>i(l),children:v.jsx("div",{className:"dialog-container",onClick:l=>l.stopPropagation(),children:t})})};function vb(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{var c;(c=r.firstElementChild)==null||c.classList.add("showup")},0);const a={destroy:()=>{var c,f;(c=r.firstElementChild)==null||c.classList.remove("showup"),(f=r.firstElementChild)==null||f.classList.add("showoff"),setTimeout(()=>{r.detach(),l.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(g=>{g.detach()})},JN)}},o={...n,destroy:a.destroy};let i=v.jsx(PH,{destroy:a.destroy,clickSpaceDestroy:!0,...e,children:v.jsx(t,{...o})});i=v.jsx(is,{store:Le,context:Lt,children:i});const l=rs.createRoot(r);return l.render(i),a}class jH extends C.Modal{constructor(n,r,a){super(n);De(this,"plugin");this.version=a,this.plugin=r}onOpen(){super.onOpen(),this.titleEl.setText(E("Submit issue")),new C.Setting(this.contentEl).setName(E("Current version")+": "+this.version),new C.Setting(this.contentEl).setName(E("Bug report")).setDesc(E("Click the button to copy debug info and open the issue page")).addButton(n=>{n.setButtonText(E("Copy and go")).onClick(async()=>{await XE(this.plugin),new C.Notice(E("Debug info copied")),setTimeout(()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose"),this.close()},100)})}),new C.Setting(this.contentEl).setName(E("Feature request")).setDesc(E("Submit your feature request to the issue page")).addButton(n=>{n.setButtonText(E("Go")).onClick(async()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose"),this.close()})})}}function c6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=c6(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ar(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=c6(e))&&(r&&(r+=" "),r+=t);return r}const LH=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]},RH=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 uC(e,t,n){const r=P.useRef(),a=P.useRef();P.useEffect(()=>{const i=t-e,l=c=>{a.current||(a.current=c);const f=c-a.current;if(f<1e3){const p=f/1e3;n(e+i*p),r.current=requestAnimationFrame(l)}else n(t)};return r.current=requestAnimationFrame(l),()=>cancelAnimationFrame(r.current)},[t,n,e])}const V2=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:a,app:o}}=P.useContext(Lt),[i,l]=P.useState(0),[c,f]=P.useState(0),[p,g]=P.useState(0),[y,w]=P.useState(null),[T,S]=P.useState(!1),I=ne.useRef(null),[M,N]=P.useState(0),[_,k]=P.useState(0),[R,L]=P.useState(0),[H,U]=P.useState(""),[z,$]=P.useState(""),[X,Q]=P.useState(!1),[se,ue]=P.useState(null);P.useEffect(()=>{if(e==="banner")return;const ie=t.filter(de=>!de.deletedAt&&de.rowStatus!=="ARCHIVED");L(ie.filter(de=>{var K;return(K=de.thinoType)==null?void 0:K.startsWith("TASK")}).length),U(LH(t)),$(RH(t))},[t]),P.useLayoutEffect(()=>{if(!o)return;const{tags:ie,memos:de,days:K}=_H(o);g(ie),l(de),f(K)},[o]),uC(M,i,N),uC(_,c,k),P.useEffect(()=>{!a||!o||(S(i>9999||p>999||c>999),BH({tags:p,memos:i,days:c},o))},[i,p,c]),P.useEffect(()=>{be.initialized&&t&&r==="/"&&(g(n.length),l(t.filter(ie=>!(ie.deletedAt!==""&&ie.deletedAt)).length),w(t.length>0?t[t.length-1]:null))},[n,t,r]),P.useEffect(()=>{if(!be.initialized)return;if(!y){f(0);return}if(!I.current||!(y!=null&&y.createdAt))return;C.requireApiVersion("1.4.4")&&C.setTooltip(I.current,E("Started from")+" "+ut.getDateTimeString((y==null?void 0:y.createdAt)??""));const ie=Math.ceil((Date.now()-ut.getTimeStampByDate(y==null?void 0:y.createdAt))/1e3/3600/24);f(t?ie:0)},[y]);const fe=(ie,de)=>{if(X&&de===se){ot.setMemoFilter(""),Q(!1);return}const K=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([ie]));sn.pushQuery(K),ot.setMemoFilter(K.id),Q(!0),ue(de)},Z=()=>{fe({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},pe=()=>{fe({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")};return v.jsx("div",{className:ar("status-text-container",T?"text-overflow":"",e),children:e==="banner"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"amount-text",children:Math.round(M)}),v.jsx("span",{className:"type-text",children:"THINO"})]}),v.jsxs("div",{className:"status-text tags-text",children:[v.jsx("span",{className:"amount-text",children:p}),v.jsx("span",{className:"type-text",children:E("TAG")})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),ot.setPathname("/daily")},children:[v.jsx("span",{className:"amount-text",children:Math.round(_)??0}),v.jsx("span",{className:"type-text",children:E("DAY")})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"status-sidebar-header title-text",children:v.jsx("span",{className:"normal-text",children:E("Thino status")})}),v.jsxs("div",{className:"status-sidebar-wrapper",children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"type-text",children:E("Thino amount")}),v.jsx("span",{className:"amount-text",children:Math.round(M)})]}),v.jsxs("div",{className:"status-text memos-text",onClick:Z,children:[v.jsx("span",{className:"type-text",children:E("Task amount")}),v.jsx("span",{className:"amount-text",children:Math.round(R)??0})]}),v.jsxs("div",{className:"status-text tags-text",onClick:pe,children:[v.jsx("span",{className:"type-text",children:E("Used tags")}),v.jsx("span",{className:"amount-text",children:p})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),ot.setPathname("/daily")},children:[v.jsx("span",{className:"type-text",children:E("Used days")}),v.jsx("span",{className:"amount-text",children:Math.round(_)??0})]}),v.jsxs("div",{className:"status-text most-active-day-text",onClick:()=>{const ie=C.moment(H,"YYYY/MM/DD").startOf("day").valueOf(),de=C.moment(H,"YYYY/MM/DD").endOf("day").valueOf();ot.setFromAndToQuery(ie,de)},children:[v.jsx("span",{className:"type-text",children:E("Most active day")}),v.jsx("span",{className:"amount-text",children:H})]}),v.jsxs("div",{className:"status-text most-active-hour-text",children:[v.jsx("span",{className:"type-text",children:E("Most active hour")}),v.jsx("span",{className:"amount-text",children:z})]})]})]})})};function d6(e){return`userBannerCache:${e}`}function _H(e){try{const t=d6(e==null?void 0:e.appId),n=la.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 BH({tags:e,memos:t,days:n},r){try{const a={tags:e,memos:t,days:n},o=d6(r==null?void 0:r.appId);la.set({[o]:JSON.stringify(a)})}catch(a){console.error(a)}}const HH=[{text:E("AND"),value:"AND"},{text:E("OR"),value:"OR"}],Vc={TAG:{value:"TAG",text:E("TAG"),operators:[{text:E("INCLUDE"),value:"CONTAIN"},{text:E("EXCLUDE"),value:"NOT_CONTAIN"}]},TYPE:{value:"TYPE",text:E("TYPE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"CONNECTED",text:E("LINKED")},{value:"NOT_TAGGED",text:E("NO TAGS")},{value:"LINKED",text:E("HAS LINKS")},{value:"IMAGED",text:E("HAS IMAGES")}]},TEXT:{value:"TEXT",text:E("TEXT"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},DATE:{value:"DATE",text:E("DATE"),operators:[{value:"NOT_CONTAIN",text:E("BEFORE")},{value:"CONTAIN",text:E("AFTER")}]},LIST:{value:"LIST",text:E("LIST"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"TODO",text:E("TODO")},{value:"DONE",text:E("DONE")},{value:"LIST",text:E("JOURNAL")},{value:"OTHER",text:E("OTHER")}]},SOURCE:{value:"SOURCE",text:E("SOURCE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"DAILY",text:E("DAILY")},{value:"MULTI",text:E("MULTI")},{value:"FILE",text:E("FILE")},{value:"CANVAS",text:E("CANVAS")}]}},vT=Vc.TYPE.values,YH=e=>{for(const t of vT)if(t.value===e)return t.text;return""},cC=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),Bp=(e,t)=>{let n=!0;for(const r of t){const{relation:a}=r,o=UH(e,r);a==="OR"?n=n||o:n=n&&o}return n},UH=(e,t)=>{const{type:n,value:{operator:r,value:a}}=t;if(a==="")return!0;let o=!0;if(n==="TAG"){let i=!0;const l=new Set;for(const c of Array.from(e.content.match($r)||[])){const p=c.replace($r,"$1").trim().split("/");let g="";for(const y of p)g+=y,l.add(g),g+="/"}for(const c of Array.from(e.content.match(ua)||[])){const p=c.replace(ua,"$1").trim().split("/");let g="";for(const y of p)g+=y,l.add(g),g+="/"}l.has(a)||(i=!1),r==="NOT_CONTAIN"&&(i=!i),o=i}else if(n==="TYPE"){let i=!1;(a==="NOT_TAGGED"&&e.content.match($r)===null&&e.content.match(Wa)===null||a==="LINKED"&&e.content.match(Cf)!==null||a==="IMAGED"&&e.content.match(Mf)!==null||a==="CONNECTED"&&e.content.match(nd)!==null)&&(i=!0),r==="IS_NOT"&&(i=!i),o=i}else if(n==="TEXT"){let i=e.content.toLowerCase().includes(a.toLowerCase());r==="NOT_CONTAIN"&&(i=!i),o=i}else if(n==="LIST"){let l=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER").contains(a);r==="IS_NOT"&&(l=!l),o=l}else if(n==="SOURCE"){let i=e.sourceType===a;r==="IS_NOT"&&(i=!i),o=i}else if(n==="DATE"){const i=C.moment(a,"YYYY-MM-DD").isValid();let l,c;if(i)l=C.moment(a,"YYYY-MM-DD"),c=l.isBefore(C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),"day");else{const p=(app.plugins.enabledPlugins.has("nldates-obsidian")&&app.plugins.getPlugin("nldates-obsidian")).parseDate(a);p.date!==null&&(c=p.moment.isBefore(C.moment(e.createdAt),"day"))}r==="NOT_CONTAIN"&&(c=!c),o=c}return o=e.linkId===""?o:!1,o};function Jl(e){const[t,n]=P.useState(()=>!!e),r=P.useCallback(a=>{n(typeof a=="boolean"?a:o=>!o)},[]);return[t,r]}const Fv=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=P.useContext(Lt),r=ne.useRef(null),a=ne.useRef(null),[o,i]=Jl(!1);P.useEffect(()=>{!r||!t||!e||(t.registerEvent(e.workspace.on("blur-on-memos",()=>{var g;(g=r.current)==null||g.blur()})),t.registerEvent(e.workspace.on("focus-on-searchBar",()=>{var g;(g=r.current)==null||g.focus()})))},[r,e,t]),P.useEffect(()=>{a&&C.setIcon(a.current,"search")},[a]);const l=g=>{const{type:y}=ot.getState().query;g===y&&(g=""),ot.setMemoTypeQuery(g)},c=g=>{const y=g.currentTarget.value;if(!y.contains(" -time: ")){ot.setTextQuery(y);return}const w=y.split(" -time: ")[1],T=w.length>10?w.match(/\d{4}-\d{2}-\d{2}/g):null;if(T==null){ot.setTextQuery(y.split(" -time: ")[0]);return}if(T.length===1){const S=C.moment(T[0]);ot.setTimeQuery({from:S.startOf("day").valueOf(),to:S.endOf("day").valueOf()})}else if(T.length===2){const S=C.moment(T[0]),I=C.moment(T[1]);ot.setTimeQuery({from:S.startOf("day").valueOf(),to:I.endOf("day").valueOf()})}ot.setTextQuery(y.split(" -time: ")[0])},f=()=>{i(!0)},p=()=>{i(!1)};return v.jsxs("div",{className:"search-bar-container",children:[v.jsxs("div",{className:"search-bar-inputer",children:[v.jsx("span",{ref:a,className:"btn icon-img"}),v.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:f,onMouseOut:p,placeholder:o?E("Type here"):"",onChange:c})]}),v.jsx("div",{className:"quickly-action-wrapper",children:v.jsxs("div",{className:"quickly-action-container",children:[v.jsx("span",{className:"title-text",children:E("Quick filter")}),v.jsxs("div",{className:"section-container types-container",children:[v.jsxs("span",{className:"section-text",children:[E("TYPE"),":"]}),v.jsx("div",{className:"values-container",children:vT.map((g,y)=>v.jsxs("div",{children:[v.jsx("span",{className:`type-item ${n===g.value?"selected":""}`,onClick:()=>{l(g.value)},children:g.text}),y+1<vT.length?v.jsx("span",{className:"split-text",children:"/"}):null]},g.value))})]})]})})]})},zH=e=>{const{children:t,when:n}=e;return n?v.jsx(v.Fragment,{children:t}):null},ts=zH;function Sn(){const e=document.createDocumentFragment();e.createEl("div",{cls:"thino-info"}).createEl("div",{text:E("This is a pro feature, please upgrade to pro version to use it.")});const r=e.createEl("div",{cls:"thino-link"}).createEl("div",{text:E("You can get pro version from: ")}),a=localStorage.getItem("language");let o="https://pkmer.cn/products/UserProfile/";a&&a==="zh"?o="https://pkmer.cn/products/thino/":o="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:o}}),new C.Notice(e,5e3)}const{exec:VH,execSync:x3e}=C.Platform.isDesktop&&require("child_process"),{createHash:WH}=C.Platform.isDesktop&&require("crypto"),$H={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},ZH=C.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${$H[qH()]}\\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 qH(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function GH(e){return WH("sha256").update(e).digest("hex")}function JH(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 cr(e=!1){return new Promise((t,n)=>{VH(ZH[process.platform],{},(r,a)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const o=JH(a.toString());return t(e?o:GH(o))})})}const dC={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome"},KH=e=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:a},globalState:{manifest:o,isMobileView:i}}=P.useContext(Lt),l=P.useRef(null),c=P.useRef(null),[f,p]=P.useState((window.app||t).loadLocalStorage("thinoListView")),[g,y]=P.useState(null);P.useEffect(()=>{if(!o||!t)return;const T=t==null?void 0:t.plugins.getPlugin(o.id);y(T),p(T==null?void 0:T.settings.MemoListView),dt.setMemoListView(T==null?void 0:T.settings.MemoListView)},[o,t]),P.useEffect(()=>{if(!t||!n||!g||!g.settings)return;const T=()=>{var I,M;if(n.leaf.height===0)return;const S=(I=g==null?void 0:g.settings)==null?void 0:I.MemoListView;(M=g==null?void 0:g.settings)!=null&&M.SupportSelectOtherView||S==="chat"||S==="moments"||(n.leaf.width>950?(p(S),dt.setMemoListView(S)):n.leaf.width<=950&&(dt.setMemoListView("list"),p("list")))};T(),c.current||(c.current=t.workspace.on("resize",T),n.registerEvent(c.current))},[t,n,g]),P.useEffect(()=>{l&&(C.setIcon(l.current,dC[f||"list"]),dt.setMemoListView(f),C.requireApiVersion("1.4.4")&&C.setTooltip(l.current,E("Switch view")))},[f]);const w=async T=>{var k;const S=!C.Platform.isDesktop&&await((k=window.Capacitor)==null?void 0:k.Plugins.Device.getId()),I=C.Platform.isDesktop?await cr():S.identifier||S.uuid;if(!r||(r==null?void 0:r.appId)!==I){Sn();return}const M=async R=>{dt.setMemoListView(R),g&&(g.settings.MemoListView=R,await g.saveSettings()),p(R)},N=[{view:"list",title:E("List")},{view:"chat",title:E("Chat")},{view:"moments",title:E("Moments")}];(!i||a!=null&&a.SupportSelectOtherView)&&N.push({view:"waterfall",title:E("Waterfall")},{view:"calendar",title:E("Calendar")},{view:"table",title:E("Table")});const _=new C.Menu;N.forEach(({view:R,title:L})=>{_.addItem(H=>{H.setChecked(f===R).setIcon(dC[R]).setTitle(L).onClick(()=>{f!==R&&M(R)})})}),_.showAtMouseEvent(T.nativeEvent)};return v.jsx("div",{className:`memos-view-switcher-wrapper ${e.className?e.className:""} pro`,ref:l,onClick:w})},QH=()=>{const e=P.useRef(null);return P.useEffect(()=>{e&&(C.setIcon(e.current,"calendar-check"),C.setTooltip&&C.setTooltip(e.current,E("Daily Memos")))},[e]),v.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{ot.setPathname("/daily")}})},CS=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),fC={initialValue:"",interval:300};class XH{constructor(t,n=fC){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,a)=>{this.actions=[...r],this.currentIndex=a<this.actions.length?a:this.actions.length-1,this.dispatchChange()},this.resetState=()=>{this.actions=[CS()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const a=r;a.key==="z"&&!a.shiftKey&&(a.metaKey||a.ctrlKey)?(r.preventDefault(),this.runUndo()):(a.key==="z"&&a.shiftKey&&(a.metaKey||a.ctrlKey)||a.key==="y"&&(a.metaKey||a.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const a=r,o=this.actions[this.currentIndex];this.pushNewAction({type:a.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-o.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 a=this.actions[this.currentIndex];a&&a.type===r.type&&r.timestamp-a.timestamp<this.config.interval?this.actions[this.currentIndex]=Object.assign(Object.assign({},a),{value:r.value,selectionEnd:r.selectionEnd,timestamp:r.timestamp}):(this.config.maxSize&&this.currentIndex>=this.config.maxSize?(this.actions.shift(),this.actions[0]=CS()):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({},fC),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=[CS()],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 eY(){const[,e]=P.useState(!1);return P.useCallback(()=>{e(n=>!n)},[])}var f6={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 a(o,i,l){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var c=l&&l.debug||!1;if(c){var f=document.querySelector("#input-textarea-caret-position-mirror-div");f&&f.parentNode.removeChild(f)}var p=document.createElement("div");p.id="input-textarea-caret-position-mirror-div",document.body.appendChild(p);var g=p.style,y=window.getComputedStyle?getComputedStyle(o):o.currentStyle;g.whiteSpace="pre-wrap",o.nodeName!=="INPUT"&&(g.wordWrap="break-word"),g.position="absolute",c||(g.visibility="hidden"),t.forEach(function(S){g[S]=y[S]}),r?o.scrollHeight>parseInt(y.height)&&(g.overflowY="scroll"):g.overflow="hidden",p.textContent=o.value.substring(0,i),o.nodeName==="INPUT"&&(p.textContent=p.textContent.replace(/\s/g," "));var w=document.createElement("span");w.textContent=o.value.substring(i)||".",p.appendChild(w);var T={top:w.offsetTop+parseInt(y.borderTopWidth),left:w.offsetLeft+parseInt(y.borderLeftWidth)};return c?w.style.backgroundColor="#aaa":document.body.removeChild(p),T}e.exports=a})()})(f6);var tY=f6.exports;const nY=qt(tY);var h6=dr.CustomEvent;function rY(){try{var e=new h6("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var aY=rY()?h6: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 oY=qt(aY);function iY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sY(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(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){iY(e,a,n[a])})}return e}function Ov(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hC(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 yb(e,t,n){return t&&hC(e.prototype,t),n&&hC(e,n),e}function pp(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pp=function(n){return typeof n}:pp=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pp(e)}function ew(e){return typeof Symbol=="function"&&pp(Symbol.iterator)==="symbol"?ew=function(n){return pp(n)}:ew=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":pp(n)},ew(e)}function lY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wb(e,t){return t&&(ew(t)==="object"||typeof t=="function")?t:lY(e)}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function yT(e,t){return yT=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},yT(e,t)}function bb(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&&yT(e,t)}function uY(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 cY(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function dY(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function fY(e){return uY(e)||cY(e)||dY()}var Ci={ESC:27,UP:38,DOWN:40,LEFT:37,RIGHT:39,ENTER:13,TAB:9},hY=function e(){var t=this;Ov(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 a=n;return typeof a!="object"&&(a=[a]),t.listeners[t.index]={keyCode:a,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(a){var o=a.keyCode,i=a.fn;o.includes(r)&&(n.stopPropagation(),n.preventDefault(),i(n))})}}},lf=new hY,pY=function(e){bb(t,e);function t(){var n,r;Ov(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=wb(this,(n=vp(t)).call.apply(n,[this].concat(o))),r.selectItem=function(){var l=r.props,c=l.item,f=l.onSelectHandler;f(c)},r}return yb(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,a=this.props,o=a.component,i=a.style,l=a.onClickHandler,c=a.item,f=a.selected,p=a.className,g=a.innerRef;return ne.createElement("li",{className:"rta__item ".concat(f===!0?"rta__item--selected":""," ").concat(p||""),style:i},ne.createElement("div",{className:"rta__entity ".concat(f===!0?"rta__entity--selected":""),role:"button",tabIndex:0,onClick:l,onFocus:this.selectItem,onMouseEnter:this.selectItem,onTouchStart:function(){r.clicked=!0,r.selectItem()},onTouchEnd:function(w){w.preventDefault(),r.clicked&&l(w)},onTouchMove:function(){r.clicked=!1},onTouchCancel:function(){r.clicked=!1},ref:g},ne.createElement(o,{selected:f,entity:c})))}}]),t}(ne.Component),mY=function(e){bb(t,e);function t(){var n,r;Ov(this,t);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=wb(this,(n=vp(t)).call.apply(n,[this].concat(o))),r.state={selectedItem:null},r.cachedIdOfItems=new Map,r.onPressEnter=function(l){typeof l<"u"&&l.preventDefault();var c=r.props.values;r.modifyText(c[r.getPositionInList()])},r.getPositionInList=function(){var l=r.props.values,c=r.state.selectedItem;return c?l.findIndex(function(f){return r.getId(f)===r.getId(c)}):0},r.getId=function(l){if(r.cachedIdOfItems.has(l))return r.cachedIdOfItems.get(l);var c=r.props.getTextToReplace(l),f=function(){if(c){if(c.key)return c.key;if(typeof l=="string"||!l.key)return c.text}if(!l.key)throw new Error("Item ".concat(JSON.stringify(l),' has to have defined "key" property'));return l.key},p=f();return r.cachedIdOfItems.set(l,p),p},r.listeners=[],r.itemsRef={},r.modifyText=function(l){if(l){var c=r.props.onSelect;c(l)}},r.selectItem=function(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=r.props.onItemHighlighted;r.state.selectedItem!==l&&r.setState({selectedItem:l},function(){f(l),c&&r.props.dropdownScroll(r.itemsRef[r.getId(l)])})},r.scroll=function(l){l.preventDefault();var c=r.props.values,f=l.keyCode||l.which,p=r.getPositionInList(),g;switch(f){case Ci.DOWN:g=p+1;break;case Ci.UP:g=p-1;break;default:g=p;break}g=(g%c.length+c.length)%c.length,r.selectItem(c[g],[Ci.DOWN,Ci.UP].includes(f))},r.isSelected=function(l){var c=r.state.selectedItem;return c?r.getId(c)===r.getId(l):!1},r}return yb(t,[{key:"componentDidMount",value:function(){this.listeners.push(lf.add([Ci.DOWN,Ci.UP],this.scroll),lf.add([Ci.ENTER,Ci.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var a=this,o=r.values,i=this.props.values,l=o.map(function(f){return a.getId(f)}).join(""),c=i.map(function(f){return a.getId(f)}).join("");l!==c&&i&&i[0]&&this.selectItem(i[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),lf.remove(r)}},{key:"render",value:function(){var r=this,a=this.props,o=a.values,i=a.component,l=a.style,c=a.itemClassName,f=a.className,p=a.itemStyle;return ne.createElement("ul",{className:"rta__list ".concat(f||""),style:l},o.map(function(g){return ne.createElement(pY,{key:r.getId(g),innerRef:function(w){r.itemsRef[r.getId(g)]=w},selected:r.isSelected(g),item:g,className:c,style:p,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:i})}))}}]),t}(ne.Component);function gY(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,a=t.offsetTop,o=e.scrollTop;a<o+r&&o<a||(e.scrollTop=a)}var pC="next",Hc={X:{LEFT:"rta__autocomplete--left",RIGHT:"rta__autocomplete--right"},Y:{TOP:"rta__autocomplete--top",BOTTOM:"rta__autocomplete--bottom"}},mC=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`))},vY=[".","^","$","*","+","-","?","(",")","[","]","{","}","\\","|"],b0=function(t){return fY(t).map(function(n){return vY.includes(n)?"\\".concat(n):n}).join("")},yY=function(e){bb(t,e);function t(){return Ov(this,t),wb(this,vp(t).apply(this,arguments))}return yb(t,[{key:"componentDidMount",value:function(){var r=this.props.boundariesElement;if(typeof r=="string"){var a=document.querySelector(r);if(!a)throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");this.containerElem=a}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,a,o=this.props.top||0,i=this.props.left||0,l=[],c=[],f=0,p=0,g=this.containerElem.getBoundingClientRect(),y=this.ref.getBoundingClientRect(),w=this.props.textareaRef.getBoundingClientRect(),T=window.getComputedStyle(this.ref),S=parseInt(T.getPropertyValue("margin-top"),10),I=parseInt(T.getPropertyValue("margin-bottom"),10),M=parseInt(T.getPropertyValue("margin-left"),10),N=parseInt(T.getPropertyValue("margin-right"),10),_=S+I+w.top+o+y.height,k=M+N+w.left+i+y.width;k>g.right&&w.left+i>y.width?(p=i-y.width,l.push(Hc.X.LEFT),c.push(Hc.X.RIGHT)):(p=i,l.push(Hc.X.RIGHT),c.push(Hc.X.LEFT)),_>g.bottom&&w.top+o>y.height?(f=o-y.height,l.push(Hc.Y.TOP),c.push(Hc.Y.BOTTOM)):(f=o,l.push(Hc.Y.BOTTOM),c.push(Hc.Y.TOP)),this.props.renderToBody&&(f+=w.top,p+=w.left),this.ref.style.top="".concat(f,"px"),this.ref.style.left="".concat(p,"px"),(r=this.ref.classList).remove.apply(r,c),(a=this.ref.classList).add.apply(a,l)}},{key:"render",value:function(){var r=this,a=this.props,o=a.style,i=a.className,l=a.innerRef,c=a.children,f=a.renderToBody,p=document.body,g=ne.createElement("div",{ref:function(w){r.ref=w,l(w)},className:"rta__autocomplete ".concat(i||""),style:o},c);return f&&p!==null?z2.createPortal(g,p):g}}]),t}(ne.Component),p6=function(e){bb(t,e);function t(n){var r;Ov(this,t),r=wb(this,vp(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=lf.add(Ci.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(lf.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 c=r.textareaRef,f=c.selectionStart,p=c.selectionEnd;return f===p?null:r.state.value.substr(f,p-f)},r.setCaretPosition=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(c,c))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var c=r.textareaRef.selectionEnd;return c},r._handleCaretChange=function(c){var f=function(){var y=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?y:0};if(c.type==="keydown"){var p=c.keyCode||c.which;switch(p){case Ci.UP:case Ci.DOWN:r._isAutocompleteOpen()||f();break;case Ci.LEFT:case Ci.RIGHT:f();break}return}f()},r._onSelect=function(c){var f=r.state,p=f.selectionEnd,g=f.currentTrigger,y=f.value,w=r.props.onItemSelected;if(g){var T=r._getTextToReplace(g);if(!T){r._closeAutocomplete();return}var S=T(c);if(!S){r._closeAutocomplete();return}w&&w({currentTrigger:g,item:c});var I=function($,X,Q){switch($){case"start":return Q;case"next":case"end":return Q+X.length;default:if(!Number.isInteger($))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return $}},M=y.slice(0,p),N=b0(g),_=M.length-M.lastIndexOf(g),k=M.search(new RegExp("(?!".concat(N,")$")))-_,R=S.caretPosition==="next"?"".concat(S.text," "):S.text,L=I(S.caretPosition,R,k),H=M.substring(0,k)+R,U=y.replace(M,H);r.setState({value:U,dataLoading:!1},function(){var z=r.tokenRegExpEnding.exec(R),$=z?z[0].length:1;r.lastTrigger=L&&L-$,r.textareaRef.value=U,r.textareaRef.selectionEnd=L,r._changeHandler();var X=r.textareaRef.scrollTop;r.setCaretPosition(L),window.chrome&&(r.textareaRef.scrollTop=X)})}},r._getTextToReplace=function(c){var f=r.props.trigger[c];if(!c||!f)return null;var p=f.output;return function(g){if(typeof g=="object"&&(!p||typeof p!="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(p){var y=p(g,c);if(y===void 0||typeof y=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}.
Got "`.concat(String(y),'". Check the implementation for trigger "').concat(c,`"
See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for more information.
`));if(y===null)return null;if(typeof y=="string")return{text:y,caretPosition:pC};if(!y.text&&typeof y.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(c,`"
`));if(!y.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(c,`"
`));return y}if(typeof g!="string")throw new Error(`Output item should be string
`);return{text:"".concat(c).concat(g).concat(c),caretPosition:pC}}},r._getCurrentTriggerSettings=function(){var c=r.state.currentTrigger;return c?r.props.trigger[c]:null},r._getValuesFromProvider=function(){var c=r.state,f=c.currentTrigger,p=c.actualToken,g=r._getCurrentTriggerSettings();if(!(!f||!g)){var y=g.dataProvider,w=g.component;if(typeof y!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var T=y(p);T instanceof Promise||(T=Promise.resolve(T)),T.then(function(S){if(!Array.isArray(S))throw new Error("Trigger provider has to provide an array!");if(typeof w!="function")throw new Error("Component should be defined!");if(f===r.state.currentTrigger){if(!S.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:S,component:w})}}).catch(function(S){return mC(S.message)})}},r._getSuggestions=function(){var c=r.state,f=c.currentTrigger,p=c.data;return!f||!p||p&&!p.length?null:p},r._createRegExp=function(){var c=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(c).sort(function(f,p){return f<p?1:f>p?-1:0}).map(function(f){return b0(f)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(c).sort(function(f,p){return f<p?1:f>p?-1:0}).map(function(f){return b0(f)}).join("|"),")$"))},r._closeAutocomplete=function(){var c=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){c&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var c=sY({},r.props),f=["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 p in c)f.includes(p)&&delete c[p];return c},r._changeHandler=function(c){var f=r.props,p=f.trigger,g=f.onChange,y=f.minChar,w=f.onCaretPositionChange,T=f.movePopupAsYouType,S=r.state,I=S.top,M=S.left,N=c;N||(N=new oY("change",{bubbles:!0}),r.textareaRef.dispatchEvent(N));var _=N.target||r.textareaRef,k=_.selectionEnd,R=_.value;if(r.lastValueBubbledEvent=R,g&&N&&(N.persist&&N.persist(),g(new Proxy(N,{get:function(K,ae,Se){return ae==="target"?_:Reflect.get(K,ae,Se)}}))),w){var L=r.getCaretPosition();w(L)}r.setState({value:R});var H=function(){var K=nY(_,k),ae=K.top,Se=K.left;r.setState({top:ae-r.textareaRef.scrollTop||0,left:Se})},U=function(K){r.lastTrigger=k-K,r._closeAutocomplete(),H()};if(k<=r.lastTrigger){var z=R.slice(0,k),$=r.tokenRegExp.exec(z);U($?$[0].length:0)}var X=R.slice(r.lastTrigger,k),Q=r.tokenRegExp.exec(X),se=Q&&Q[0],ue=Q&&Q[1]||null,fe=ue?ue.length-1:0,Z=r.tokenRegExpEnding.exec(X);if(Z?U(Z[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!se||se.length<=y+fe)&&(r.state.currentTrigger&&!p[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(ue&&p[ue].afterWhitespace&&!/\s/.test(R[k-se.length-1])&&R[k-se.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&p[r.state.currentTrigger].allowWhitespace){if(Q=new RegExp("".concat(b0(r.state.currentTrigger),".*$")).exec(R.slice(0,k)),se=Q&&Q[0],!se){r._closeAutocomplete();return}ue=Object.keys(p).find(function(de){return de.slice(0,fe+1)===se.slice(0,fe+1)})||null}var pe=se.slice(1);if(ue){(T||I===null&&M===null||r.state.currentTrigger!==ue)&&H(),r.escListenerInit();var ie=r._getTextToReplace(ue);r.setState({selectionEnd:k,currentTrigger:ue,textToReplace:ie,actualToken:pe},function(){try{r._getValuesFromProvider()}catch(de){mC(de.message)}})}},r._selectHandler=function(c){var f=r.props,p=f.onCaretPositionChange,g=f.onSelect;if(p){var y=r.getCaretPosition();p(y)}g&&(c.persist(),g(c))},r._shouldStayOpen=function(c){var f=c.relatedTarget;return f===null&&(f=document.activeElement),!!(r.dropdownRef&&f instanceof Node&&r.dropdownRef.contains(f))},r._onClick=function(c){var f=r.props.onClick;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onBlur=function(c){var f=r.props.onBlur;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(c){var f=r.props.onItemHighlighted,p=r.state.currentTrigger;if(f)if(typeof f=="function")f({currentTrigger:p,item:c});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(c){var f=r.props.scrollToItem;if(f){if(f===!0){gY(r.dropdownRef,c);return}if(typeof f!="function"||f.length!==2)throw new Error("`scrollToItem` has to be boolean (true for default implementation) or function with two parameters: container, item.");f(r.dropdownRef,c)}},r._isAutocompleteOpen=function(){var c=r.state,f=c.dataLoading,p=c.currentTrigger,g=r._getSuggestions();return!!((f||g)&&p)},r._textareaRef=function(c){r.props.innerRef&&r.props.innerRef(c),r.textareaRef=c},r.lastTrigger=0,r.escListener=null;var a=r.props,o=a.loadingComponent,i=a.trigger,l=a.value;if(l&&(r.state.value=l),r._createRegExp(),!o)throw new Error("RTA: loadingComponent is not defined");if(!i)throw new Error("RTA: trigger is not defined");return r}return yb(t,[{key:"componentDidMount",value:function(){lf.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 a=r.trigger,o=r.value,i=this.props,l=i.trigger,c=i.value;Object.keys(l).join("")!==Object.keys(a).join("")&&this._createRegExp(),o!==c&&this.lastValueBubbledEvent!==c&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),lf.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,a=this.props,o=a.loadingComponent,i=a.style,l=a.className,c=a.listStyle,f=a.itemStyle,p=a.boundariesElement,g=a.movePopupAsYouType,y=a.listClassName,w=a.itemClassName,T=a.dropdownClassName,S=a.dropdownStyle,I=a.containerStyle,M=a.containerClassName,N=a.loaderStyle,_=a.loaderClassName,k=a.textAreaComponent,R=a.renderToBody,L=this.state,H=L.left,U=L.top,z=L.dataLoading,$=L.component,X=L.value,Q=L.textToReplace,se=this._isAutocompleteOpen(),ue=this._getSuggestions(),fe={},Z;return k.component?(Z=k.component,fe[k.ref]=this._textareaRef):(Z=k,fe.ref=this._textareaRef),ne.createElement("div",{className:"rta ".concat(z===!0?"rta--loading":""," ").concat(M||""),style:I},ne.createElement(Z,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(l||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:X,style:i},fe)),se&&ne.createElement(yY,{innerRef:function(ie){r.dropdownRef=ie},top:U,left:H,style:S,className:T,movePopupAsYouType:g,boundariesElement:p,textareaRef:this.textareaRef,renderToBody:R},ue&&$&&Q&&ne.createElement(mY,{values:ue,component:$,style:c,className:y,itemClassName:w,itemStyle:f,getTextToReplace:Q,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),z&&ne.createElement("div",{className:"rta__loader ".concat(ue!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(_||""),style:N},ne.createElement(o,{data:ue}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var a=r.value;return a==null?null:{value:a}}}]),t}(ne.Component);p6.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const wY=()=>{const{app:e}=ft.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},bY=e=>{let t=[];const n=ft.getState().settings;if(n&&(n!=null&&n.UseVaultTags))t=wY();else{const{tags:o}=be.getState();t=o}const r=e.toLowerCase(),a=[];return t.forEach(o=>{o&&o.toLowerCase().contains(r)&&a.push({name:o,char:o})}),a},SY=e=>{const{app:t}=ft.getState(),n=t.vault.getAllLoadedFiles(),r=[];let a;return n.forEach(o=>{e==="["?a="":e.contains("[")&&(a=e.slice(1));const i=a.toLowerCase();o instanceof C.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(o.extension)&&o.path.toLowerCase().contains(i)&&r.push({name:o.basename,char:o.name,file:o})}),r};var MS=P,DY=function(e){return typeof e=="function"},TY=function(e){var t=MS.useState(e),n=t[0],r=t[1],a=MS.useRef(n),o=MS.useCallback(function(i){a.current=DY(i)?i(a.current):i,r(a.current)},[]);return[n,o,a]},IY=TY;const Co=qt(IY);function EY(e){return e.containerEl.matches(".memos-list-view")}function kS(){}function xY(e){return{app:e.app,showSearch:kS,toggleMode:kS,onMarkdownScroll:kS,getMode:()=>"source",getViewType:()=>"thino_view",id:e.leaf.id,scroll:0,editMode:null,get file(){return e.file},get path(){return e.file.path}}}const CY=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,editor:a,view:o,dailyNotes:i}}=P.useContext(Lt),[l,c]=P.useState(null),[f,p]=P.useState(!1),[g,y]=P.useState(""),[w,T]=P.useState(null),S=P.useRef(C.debounce((U,z,$)=>{kY(U,z,$)},100)),I=P.useRef();P.useEffect(()=>{var U;if(!w){if(!i&&!(n&&window.app)){const z=(U=n||window.app)==null?void 0:U.vault.getMarkdownFiles();T(z[0]);return}for(const z in i)if(i[z]instanceof C.TFile){T(i[z]);break}}},[i]),P.useEffect(()=>{if(!o.plugin.MarkdownEditor||typeof o.plugin.MarkdownEditor!="function"||!e)return;class U extends o.plugin.MarkdownEditor{updateBottomPadding(){}onUpdate(ue,fe){super.onUpdate(ue,fe),N&&N(o,this.get())}}const z=xY(o),$=o.plugin.addChild(new U(n,e,z));$&&!t&&dt.setInstance(`${o.leaf.id}`,$),z.editMode=$,$.owner.editor=$.editor;const X=MY(n,t?"modal":"view");$.set&&$.set(X||"",!0),n.workspace.trigger("thino-editor-created",e,$.editor);const Q=$.cm;return I.current=Q,p(!0),c($),()=>{p(!1),l==null||l.destroy(),o.plugin.removeChild($),I.current=null}},[e]),P.useEffect(()=>{!l||!n||S.current(g,n,t?"modal":"view")},[g,n]);const M=()=>{l&&l.toggleSource()},N=C.debounce((U,z)=>_(U,z),500,!0),_=(U,z)=>{U&&y(z)};return{instance:l,value:g,set:U=>{try{l&&((l==null?void 0:l.editor).replaceSelection(U),y(U))}catch(z){console.error(z)}},get:()=>l?l.get():"",append:(U,z)=>{if(!l||z&&z!==l.owner.id)return;const X=(l.get()||"")+U;(l==null?void 0:l.editor).replaceSelection(U),y(X)},clear:()=>{l&&(l.clear(),y(""))},toggleSource:M}};function m6(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function MY(e,t){try{const n=m6(e==null?void 0:e.appId,t);return la.get([n])[n]||""}catch(n){return console.error(n),""}}function kY(e,t,n){try{const r=m6(t==null?void 0:t.appId,n);la.set({[r]:e})}catch(r){console.error(r)}}function NY(e,t){return{line:e.line,ch:e.ch+t}}const gC=({entity:{name:e,char:t,file:n}})=>v.jsx("div",{children:`${t}`}),AY=({data:e})=>v.jsx("div",{children:"Loading"});let Nl;const FY=P.forwardRef((e,t)=>{var Re;const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:a},dailyNotesState:{settings:o,app:i}}=P.useContext(Lt),{SaveMemoButtonLabel:l,SaveMemoButtonIcon:c}=o,{className:f,inputerType:p,initialContent:g,placeholder:y,showConfirmBtn:w,showCancelBtn:T,onConfirmBtnClick:S,onCancelBtnClick:I,onContentChange:M}=e,N=P.useRef(null),_=P.useRef(null),k=P.useRef(null),R=eY(),{instance:L,value:H,set:U,get:z,append:$,clear:X,toggleSource:Q}=CY(_.current,e.modal),[,se,ue]=Co(0),[fe,Z]=Co(!1);P.useEffect(()=>{var Fe,Be;if(o&&o.FocusOnEditor)switch(p){case"minimal":case"memos":(Fe=N.current)==null||Fe.focus();break;case"obsidian":L&&((Be=L.editor)==null||Be.focus())}},[o,L]),P.useEffect(()=>{if(!i)return;const Fe=i.workspace.getLeavesOfType(lo);let Be,Qe;Fe.length>0?(Qe=Fe[0].view.containerEl,Be=Qe.offsetHeight):(Qe=document,Be=window.outerHeight),se(Be)},[i]),P.useEffect(()=>{!N.current||p==="obsidian"||g&&(N.current.value=g,R())},[]),P.useEffect(()=>{var Fe;if(p!=="obsidian")if(n){if(!N.current)return;const{tinyUndoActionsCache:Be,tinyUndoIndexCache:Qe}=la.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return k.current=new XH(N.current,{interval:5e3,initialActions:Be,initialIndex:Qe}),k.current.subscribe((Ze,st)=>{la.set({tinyUndoActionsCache:Ze,tinyUndoIndexCache:st})}),()=>{var Ze;(Ze=k.current)==null||Ze.destroy()}}else(Fe=k.current)==null||Fe.destroy(),k.current=null,la.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),P.useEffect(()=>{N.current&&(N.current.style.height="auto",N.current.style.height=(N.current.scrollHeight??0)+"px")},[(Re=N.current)==null?void 0:Re.value]),P.useImperativeHandle(t,()=>({element:N.current,blur:()=>{var Fe,Be;switch(p){case"minimal":case"memos":(Fe=N.current)==null||Fe.blur();break;case"obsidian":L&&((Be=L.editor)==null||Be.blur())}},focus:Fe=>{var Be,Qe,Ze,st,xt;switch(p){case"minimal":case"memos":(Be=N.current)==null||Be.focus();break;case"obsidian":if(L){if(Fe&&Fe!==((st=(Ze=(Qe=L==null?void 0:L.owner)==null?void 0:Qe.view)==null?void 0:Ze.leaf)==null?void 0:st.id))return;(xt=L.editor)==null||xt.focus()}}},insertTag:Fe=>{var Be,Qe,Ze;switch(p){case"minimal":case"memos":{if(!N.current)return;const st=N.current.value;N.current.value=st.slice(0,N.current.selectionStart)+"# "+st.slice(N.current.selectionStart),M(N.current.value),R();break}case"obsidian":if(Fe&&Fe!==((Ze=(Qe=(Be=L==null?void 0:L.owner)==null?void 0:Be.view)==null?void 0:Qe.leaf)==null?void 0:Ze.id))return;if(L){const st=L.editor,xt=st.getCursor("from");st.replaceRange("#",xt),st.setSelection(NY(xt,1))}break}},insertText:(Fe,Be)=>{switch(p){case"minimal":case"memos":{if(!N.current)return;const Qe=N.current.value;N.current.value=Qe.slice(0,N.current.selectionStart)+Fe+Qe.slice(N.current.selectionStart),M(N.current.value),R()}break;case"obsidian":L&&$(Fe,Be);break}},setContent:Fe=>{switch(p){case"minimal":case"memos":N.current&&(N.current.value=Fe,M(N.current.value),R());break;case"obsidian":L&&U(Fe);break}},getContent:()=>{switch(p){case"minimal":case"memos":return N.current?N.current.value:"";case"obsidian":return z()}},toggleSource:()=>{switch(p){case"minimal":case"memos":break;case"obsidian":Q();break}},clear:()=>{switch(p){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),R());break;case"obsidian":X();break}}}),[L,p]);const pe=Fe=>{if(!N.current)return;const{fileManager:Be}=Le.getState().dailyNotesState.app;if(Fe.currentTrigger==="#"){const Qe=N.current.value;let Ze;Nl!=null?Ze=Nl.length:Ze=0;let st=N.current.selectionStart;for(let xt=0;xt<Qe.length;xt++)/\s/g.test(Qe[st])||st++;N.current.value=Qe.slice(0,N.current.selectionStart-Ze)+Fe.item.char+Qe.slice(st),M(N.current.value),R()}else if(Fe.currentTrigger==="[["){const Qe=Be.generateMarkdownLink(Fe.item.file,Fe.item.file.path,"",""),Ze=N.current.value;let st;Nl!=null?Qe.contains("[[")||Fe.item.file.extension!=="md"?st=Nl.length+1:st=Nl.length+2:st=2;let xt=N.current.selectionStart;for(let tn=0;tn<Ze.length;tn++)/\s/g.test(Ze[xt])||xt++;N.current.value=Ze.slice(0,N.current.selectionStart-st)+Qe+Ze.slice(xt),M(N.current.value),R()}},ie=P.useCallback(()=>{var Fe;M(((Fe=N.current)==null?void 0:Fe.value)||""),R()},[]),de=()=>{var Fe;switch(p){case"minimal":case"memos":if(!N.current)return;N.current.value=ae(),S(N.current.value),N.current.value="",R(),(Fe=k.current)==null||Fe.resetState();break;case"obsidian":S(z()),X(),R();break}},K=P.useCallback(()=>{switch(p){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),R());break;case"obsidian":X();break}I()},[p,L,N]),ae=()=>la.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",Se=()=>{if(N.current)return N.current.value=ae(),N.current.value},je=Fe=>{switch(Fe){case"memos":return v.jsx(p6,{className:`common-editor-inputer scroll ${fe?" editing":""}`,loadingComponent:AY,placeholder:y,movePopupAsYouType:!0,value:Se(),innerRef:Be=>{N.current=Be},onFocus:()=>{Z(!0)},onBlur:()=>{Z(!1)},onInput:ie,style:{maxHeight:`${ue.current>400?ue.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:pe,scrollToItem:!0,trigger:{"#":{dataProvider:Be=>(Nl=Be,bY(Be).map(({name:Qe,char:Ze})=>({name:Qe,char:Ze}))),component:gC,afterWhitespace:!0,output:Be=>Be.char},"[[":{dataProvider:Be=>(Nl=Be,SY(Be).slice(0,10).map(({name:Qe,char:Ze,file:st})=>({name:Qe,char:Ze,file:st}))),component:gC,afterWhitespace:!0,output:Be=>Be.char}}});case"minimal":return v.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:y,ref:N,onInput:ie});case"obsidian":return v.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",onClick:()=>{var Be;(Be=L==null?void 0:L.editor)==null||Be.focus()},ref:_});default:return v.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:_})}};return v.jsxs("div",{className:"common-editor-wrapper "+f,children:[je(p),v.jsxs("div",{className:"common-tools-wrapper",children:[v.jsx("div",{className:"common-tools-container",children:v.jsx(ts,{when:e.tools!==void 0,children:e.tools})}),v.jsxs("div",{className:"btns-container",children:[v.jsx(ts,{when:T,children:v.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&K()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&K()},children:ot.getState().pathname==="/"&&a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":E("CANCEL EDIT")})}),v.jsx(ts,{when:w,children:v.jsxs("button",{title:"Ctrl/Cmd + Enter to save thino",className:"action-btn confirm-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&de()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&de()},children:[a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":l,v.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),OY=typeof window<"u"?P.useLayoutEffect:P.useEffect;function PY(e,t,n,r){const a=P.useRef(t);OY(()=>{a.current=t},[t]),P.useEffect(()=>{const o=(n==null?void 0:n.current)||window;if(!(o&&o.addEventListener))return;const i=l=>{a.current(l)};return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[e,n,r])}function Pv(e,t,n="mousedown"){PY(n,r=>{const a=r.target;if(!a||!a.isConnected||a.closest(".suggestion-container")||a.closest(".menu"))return;(Array.isArray(e)?e.every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(r)})}const g6=e=>{const{year:t,handleYearChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState(t),l=P.useRef(null),c=P.useRef(null),[f,p]=ne.useState(!1),g=ne.useRef(null);Pv(g,()=>{p(!1)}),P.useEffect(()=>{l.current&&C.setIcon(l.current,"chevron-left"),c.current&&C.setIcon(c.current,"chevron-right")},[l,c,f]),P.useEffect(()=>{w(o)},[t]);const w=T=>{const S=parseInt(T),I=S-S%10,M=[];for(let N=0;N<10;N++)M.push(`${I+N}`);a(M)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn year-btn",onClick:()=>{p(!f)},children:[v.jsx("span",{children:t}),v.jsx("span",{children:E("year")})]}),f&&v.jsxs("div",{ref:g,className:"year-picker-wrapper",children:[v.jsxs("div",{className:"year-picker-header",children:[v.jsxs("div",{className:"year-picker-header-title",children:[o," "+(E("year")||"")]}),v.jsxs("div",{className:"year-picker-header-btns",children:[v.jsx("span",{className:"btn",ref:l,onClick:()=>{const T=parseInt(o)-10;i(T.toString()),w(T.toString())}}),v.jsx("span",{className:"btn",ref:c,onClick:()=>{const T=parseInt(o)+10;i(T.toString()),w(T.toString())}})]})]}),v.jsx("div",{className:"year-picker-body",children:v.jsx("div",{className:"year-picker-body-list",children:r.map(T=>v.jsx("div",{className:`year-picker-body-item ${T===o?"selected":""}`,onClick:()=>{i(T),n(T),p(!1)},children:T},T))})})]})]})},v6=e=>{const{month:t,handleMonthChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState((parseInt(t)+1).toString()),[l,c]=ne.useState(!1),f=ne.useRef(null);Pv(f,()=>{c(!1)}),P.useEffect(()=>{g()},[t]);const g=()=>{const y=[];for(let w=1;w<=12;w++)y.push(`${w}`);a(y)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn month-btn",onClick:()=>{c(!l)},children:[v.jsxs("span",{children:[E("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),v.jsx("span",{children:E("month")||""})]}),l&&v.jsxs("div",{ref:f,className:"month-picker-wrapper",children:[v.jsxs("div",{className:"month-picker-header",children:[v.jsxs("div",{className:"month-picker-header-title",children:[o," "+(E("month")||"")]}),v.jsx("div",{className:"month-picker-header-btns"})]}),v.jsx("div",{className:"month-picker-body",children:v.jsx("div",{className:"month-picker-body-list",children:r.map(y=>v.jsx("div",{className:`month-picker-body-item ${y===o?"selected":""}`,onClick:()=>{i(y),n(y),c(!1)},children:y},y))})})]})]})},Sb=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[a,o]=P.useState(vg(n)),[i,l]=P.useState(n);P.useEffect(()=>{o(vg(n))},[n]);const c=new Date(a),f=c.getDay(),p=[];for(let T=0;T<f;T++)p.push({date:0,datestamp:c.getTime()-ei*(7-T)});const g=jY(a);for(let T=1;T<=g;T++)p.push({date:T,datestamp:c.getTime()+ei*(T-1)});const y=(T,S)=>{r(S,T.nativeEvent),l(S)},w=T=>{const S=c.getFullYear(),I=c.getMonth()+1;let M=0;I===1&&T===-1?M=new Date(`${S-1}/12/1`).getTime():I===12&&T===1?M=new Date(`${S+1}/1/1`).getTime():M=new Date(`${S}/${I+T}/1`).getTime(),o(vg(M))};return v.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:T=>{T&&C.setIcon(T,"chevron-left")},className:"btn btn-text",onClick:()=>w(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(g6,{year:c.getFullYear().toString(),handleYearChange:T=>{o(vg(new Date(`${T}/${c.getMonth()+1}/1`).getTime()))}}),v.jsx(v6,{month:c.getMonth().toString(),handleMonthChange:T=>{o(vg(new Date(`${c.getFullYear()}/${parseInt(T)}/1`).getTime()))}})]}),v.jsx("span",{ref:T=>{T&&C.setIcon(T,"chevron-right")},className:"btn btn-text",onClick:()=>w(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(T=>v.jsx("span",{className:"day-item",children:T},T))}),v.jsx("div",{className:"date-picker-day-content",children:p.map(T=>T.date===0?v.jsx("span",{className:"day-item null",children:""},T.datestamp):v.jsx("span",{className:`day-item ${T.datestamp===n?"current":""} ${T.datestamp===i?"selected":""}`,onClick:S=>y(S,T.datestamp),children:v.jsx("span",{className:"day-item-text",children:T.date})},T.datestamp))})]})]})};function jY(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())/ei}function vg(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var vC=function(t){return t.reduce(function(n,r){var a=r[0],o=r[1];return n[a]=o,n},{})},yC=typeof window<"u"&&window.document&&window.document.createElement?P.useLayoutEffect:P.useEffect,ti="top",as="bottom",os="right",ni="left",W2="auto",jv=[ti,as,os,ni],yp="start",Gg="end",LY="clippingParents",y6="viewport",yg="popper",RY="reference",wC=jv.reduce(function(e,t){return e.concat([t+"-"+yp,t+"-"+Gg])},[]),$2=[].concat(jv,[W2]).reduce(function(e,t){return e.concat([t,t+"-"+yp,t+"-"+Gg])},[]),_Y="beforeRead",BY="read",HY="afterRead",YY="beforeMain",UY="main",zY="afterMain",VY="beforeWrite",WY="write",$Y="afterWrite",ZY=[_Y,BY,HY,YY,UY,zY,VY,WY,$Y];function Kl(e){return e?(e.nodeName||"").toLowerCase():null}function Ni(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function vf(e){var t=Ni(e).Element;return e instanceof t||e instanceof Element}function ns(e){var t=Ni(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Z2(e){if(typeof ShadowRoot>"u")return!1;var t=Ni(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qY(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},o=t.elements[n];!ns(o)||!Kl(o)||(Object.assign(o.style,r),Object.keys(a).forEach(function(i){var l=a[i];l===!1?o.removeAttribute(i):o.setAttribute(i,l===!0?"":l)}))})}function GY(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 a=t.elements[r],o=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,f){return c[f]="",c},{});!ns(a)||!Kl(a)||(Object.assign(a.style,l),Object.keys(o).forEach(function(c){a.removeAttribute(c)}))})}}const JY={name:"applyStyles",enabled:!0,phase:"write",fn:qY,effect:GY,requires:["computeStyles"]};function Zl(e){return e.split("-")[0]}var df=Math.max,Mw=Math.min,wp=Math.round;function wT(){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 w6(){return!/^((?!chrome|android).)*safari/i.test(wT())}function bp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,o=1;t&&ns(e)&&(a=e.offsetWidth>0&&wp(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&wp(r.height)/e.offsetHeight||1);var i=vf(e)?Ni(e):window,l=i.visualViewport,c=!w6()&&n,f=(r.left+(c&&l?l.offsetLeft:0))/a,p=(r.top+(c&&l?l.offsetTop:0))/o,g=r.width/a,y=r.height/o;return{width:g,height:y,top:p,right:f+g,bottom:p+y,left:f,x:f,y:p}}function q2(e){var t=bp(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 b6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Z2(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yu(e){return Ni(e).getComputedStyle(e)}function KY(e){return["table","td","th"].indexOf(Kl(e))>=0}function rd(e){return((vf(e)?e.ownerDocument:e.document)||window.document).documentElement}function Db(e){return Kl(e)==="html"?e:e.assignedSlot||e.parentNode||(Z2(e)?e.host:null)||rd(e)}function bC(e){return!ns(e)||Yu(e).position==="fixed"?null:e.offsetParent}function QY(e){var t=/firefox/i.test(wT()),n=/Trident/i.test(wT());if(n&&ns(e)){var r=Yu(e);if(r.position==="fixed")return null}var a=Db(e);for(Z2(a)&&(a=a.host);ns(a)&&["html","body"].indexOf(Kl(a))<0;){var o=Yu(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function Lv(e){for(var t=Ni(e),n=bC(e);n&&KY(n)&&Yu(n).position==="static";)n=bC(n);return n&&(Kl(n)==="html"||Kl(n)==="body"&&Yu(n).position==="static")?t:n||QY(e)||t}function G2(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _g(e,t,n){return df(e,Mw(t,n))}function XY(e,t,n){var r=_g(e,t,n);return r>n?n:r}function S6(){return{top:0,right:0,bottom:0,left:0}}function D6(e){return Object.assign({},S6(),e)}function T6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var eU=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,D6(typeof t!="number"?t:T6(t,jv))};function tU(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Zl(n.placement),c=G2(l),f=[ni,os].indexOf(l)>=0,p=f?"height":"width";if(!(!o||!i)){var g=eU(a.padding,n),y=q2(o),w=c==="y"?ti:ni,T=c==="y"?as:os,S=n.rects.reference[p]+n.rects.reference[c]-i[c]-n.rects.popper[p],I=i[c]-n.rects.reference[c],M=Lv(o),N=M?c==="y"?M.clientHeight||0:M.clientWidth||0:0,_=S/2-I/2,k=g[w],R=N-y[p]-g[T],L=N/2-y[p]/2+_,H=_g(k,L,R),U=c;n.modifiersData[r]=(t={},t[U]=H,t.centerOffset=H-L,t)}}function nU(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||b6(t.elements.popper,a)&&(t.elements.arrow=a))}const I6={name:"arrow",enabled:!0,phase:"main",fn:tU,effect:nU,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sp(e){return e.split("-")[1]}var rU={top:"auto",right:"auto",bottom:"auto",left:"auto"};function aU(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:wp(n*a)/a||0,y:wp(r*a)/a||0}}function SC(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,g=e.isFixed,y=i.x,w=y===void 0?0:y,T=i.y,S=T===void 0?0:T,I=typeof p=="function"?p({x:w,y:S}):{x:w,y:S};w=I.x,S=I.y;var M=i.hasOwnProperty("x"),N=i.hasOwnProperty("y"),_=ni,k=ti,R=window;if(f){var L=Lv(n),H="clientHeight",U="clientWidth";if(L===Ni(n)&&(L=rd(n),Yu(L).position!=="static"&&l==="absolute"&&(H="scrollHeight",U="scrollWidth")),a===ti||(a===ni||a===os)&&o===Gg){k=as;var z=g&&L===R&&R.visualViewport?R.visualViewport.height:L[H];S-=z-r.height,S*=c?1:-1}if(a===ni||(a===ti||a===as)&&o===Gg){_=os;var $=g&&L===R&&R.visualViewport?R.visualViewport.width:L[U];w-=$-r.width,w*=c?1:-1}}var X=Object.assign({position:l},f&&rU),Q=p===!0?aU({x:w,y:S},Ni(n)):{x:w,y:S};if(w=Q.x,S=Q.y,c){var se;return Object.assign({},X,(se={},se[k]=N?"0":"",se[_]=M?"0":"",se.transform=(R.devicePixelRatio||1)<=1?"translate("+w+"px, "+S+"px)":"translate3d("+w+"px, "+S+"px, 0)",se))}return Object.assign({},X,(t={},t[k]=N?S+"px":"",t[_]=M?w+"px":"",t.transform="",t))}function oU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,o=n.adaptive,i=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,f={placement:Zl(t.placement),variation:Sp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,SC(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,SC(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const E6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:oU,data:{}};var S0={passive:!0};function iU(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=a===void 0?!0:a,i=r.resize,l=i===void 0?!0:i,c=Ni(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&f.forEach(function(p){p.addEventListener("scroll",n.update,S0)}),l&&c.addEventListener("resize",n.update,S0),function(){o&&f.forEach(function(p){p.removeEventListener("scroll",n.update,S0)}),l&&c.removeEventListener("resize",n.update,S0)}}const x6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:iU,data:{}};var sU={left:"right",right:"left",bottom:"top",top:"bottom"};function tw(e){return e.replace(/left|right|bottom|top/g,function(t){return sU[t]})}var lU={start:"end",end:"start"};function DC(e){return e.replace(/start|end/g,function(t){return lU[t]})}function J2(e){var t=Ni(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K2(e){return bp(rd(e)).left+J2(e).scrollLeft}function uU(e,t){var n=Ni(e),r=rd(e),a=n.visualViewport,o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;var f=w6();(f||!f&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:l+K2(e),y:c}}function cU(e){var t,n=rd(e),r=J2(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=df(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=df(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+K2(e),c=-r.scrollTop;return Yu(a||n).direction==="rtl"&&(l+=df(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:c}}function Q2(e){var t=Yu(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function C6(e){return["html","body","#document"].indexOf(Kl(e))>=0?e.ownerDocument.body:ns(e)&&Q2(e)?e:C6(Db(e))}function Bg(e,t){var n;t===void 0&&(t=[]);var r=C6(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ni(r),i=a?[o].concat(o.visualViewport||[],Q2(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(Bg(Db(i)))}function bT(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function dU(e,t){var n=bp(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 TC(e,t,n){return t===y6?bT(uU(e,n)):vf(t)?dU(t,n):bT(cU(rd(e)))}function fU(e){var t=Bg(Db(e)),n=["absolute","fixed"].indexOf(Yu(e).position)>=0,r=n&&ns(e)?Lv(e):e;return vf(r)?t.filter(function(a){return vf(a)&&b6(a,r)&&Kl(a)!=="body"}):[]}function hU(e,t,n,r){var a=t==="clippingParents"?fU(e):[].concat(t),o=[].concat(a,[n]),i=o[0],l=o.reduce(function(c,f){var p=TC(e,f,r);return c.top=df(p.top,c.top),c.right=Mw(p.right,c.right),c.bottom=Mw(p.bottom,c.bottom),c.left=df(p.left,c.left),c},TC(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function M6(e){var t=e.reference,n=e.element,r=e.placement,a=r?Zl(r):null,o=r?Sp(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(a){case ti:c={x:i,y:t.y-n.height};break;case as:c={x:i,y:t.y+t.height};break;case os:c={x:t.x+t.width,y:l};break;case ni:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var f=a?G2(a):null;if(f!=null){var p=f==="y"?"height":"width";switch(o){case yp:c[f]=c[f]-(t[p]/2-n[p]/2);break;case Gg:c[f]=c[f]+(t[p]/2-n[p]/2);break}}return c}function Jg(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,o=n.strategy,i=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?LY:l,f=n.rootBoundary,p=f===void 0?y6:f,g=n.elementContext,y=g===void 0?yg:g,w=n.altBoundary,T=w===void 0?!1:w,S=n.padding,I=S===void 0?0:S,M=D6(typeof I!="number"?I:T6(I,jv)),N=y===yg?RY:yg,_=e.rects.popper,k=e.elements[T?N:y],R=hU(vf(k)?k:k.contextElement||rd(e.elements.popper),c,p,i),L=bp(e.elements.reference),H=M6({reference:L,element:_,strategy:"absolute",placement:a}),U=bT(Object.assign({},_,H)),z=y===yg?U:L,$={top:R.top-z.top+M.top,bottom:z.bottom-R.bottom+M.bottom,left:R.left-z.left+M.left,right:z.right-R.right+M.right},X=e.modifiersData.offset;if(y===yg&&X){var Q=X[a];Object.keys($).forEach(function(se){var ue=[os,as].indexOf(se)>=0?1:-1,fe=[ti,as].indexOf(se)>=0?"y":"x";$[se]+=Q[fe]*ue})}return $}function pU(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,f=c===void 0?$2:c,p=Sp(r),g=p?l?wC:wC.filter(function(T){return Sp(T)===p}):jv,y=g.filter(function(T){return f.indexOf(T)>=0});y.length===0&&(y=g);var w=y.reduce(function(T,S){return T[S]=Jg(e,{placement:S,boundary:a,rootBoundary:o,padding:i})[Zl(S)],T},{});return Object.keys(w).sort(function(T,S){return w[T]-w[S]})}function mU(e){if(Zl(e)===W2)return[];var t=tw(e);return[DC(e),t,DC(t)]}function gU(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,f=n.padding,p=n.boundary,g=n.rootBoundary,y=n.altBoundary,w=n.flipVariations,T=w===void 0?!0:w,S=n.allowedAutoPlacements,I=t.options.placement,M=Zl(I),N=M===I,_=c||(N||!T?[tw(I)]:mU(I)),k=[I].concat(_).reduce(function(Re,Fe){return Re.concat(Zl(Fe)===W2?pU(t,{placement:Fe,boundary:p,rootBoundary:g,padding:f,flipVariations:T,allowedAutoPlacements:S}):Fe)},[]),R=t.rects.reference,L=t.rects.popper,H=new Map,U=!0,z=k[0],$=0;$<k.length;$++){var X=k[$],Q=Zl(X),se=Sp(X)===yp,ue=[ti,as].indexOf(Q)>=0,fe=ue?"width":"height",Z=Jg(t,{placement:X,boundary:p,rootBoundary:g,altBoundary:y,padding:f}),pe=ue?se?os:ni:se?as:ti;R[fe]>L[fe]&&(pe=tw(pe));var ie=tw(pe),de=[];if(o&&de.push(Z[Q]<=0),l&&de.push(Z[pe]<=0,Z[ie]<=0),de.every(function(Re){return Re})){z=X,U=!1;break}H.set(X,de)}if(U)for(var K=T?3:1,ae=function(Fe){var Be=k.find(function(Qe){var Ze=H.get(Qe);if(Ze)return Ze.slice(0,Fe).every(function(st){return st})});if(Be)return z=Be,"break"},Se=K;Se>0;Se--){var je=ae(Se);if(je==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const k6={name:"flip",enabled:!0,phase:"main",fn:gU,requiresIfExists:["offset"],data:{_skip:!1}};function IC(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 EC(e){return[ti,os,as,ni].some(function(t){return e[t]>=0})}function vU(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=Jg(t,{elementContext:"reference"}),l=Jg(t,{altBoundary:!0}),c=IC(i,r),f=IC(l,a,o),p=EC(c),g=EC(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":g})}const N6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:vU};function yU(e,t,n){var r=Zl(e),a=[ni,ti].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=o[0],l=o[1];return i=i||0,l=(l||0)*a,[ni,os].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function wU(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=a===void 0?[0,0]:a,i=$2.reduce(function(p,g){return p[g]=yU(g,t.rects,o),p},{}),l=i[t.placement],c=l.x,f=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=i}const A6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wU};function bU(e){var t=e.state,n=e.name;t.modifiersData[n]=M6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const F6={name:"popperOffsets",enabled:!0,phase:"read",fn:bU,data:{}};function SU(e){return e==="x"?"y":"x"}function DU(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,f=n.rootBoundary,p=n.altBoundary,g=n.padding,y=n.tether,w=y===void 0?!0:y,T=n.tetherOffset,S=T===void 0?0:T,I=Jg(t,{boundary:c,rootBoundary:f,padding:g,altBoundary:p}),M=Zl(t.placement),N=Sp(t.placement),_=!N,k=G2(M),R=SU(k),L=t.modifiersData.popperOffsets,H=t.rects.reference,U=t.rects.popper,z=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,$=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),X=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Q={x:0,y:0};if(L){if(o){var se,ue=k==="y"?ti:ni,fe=k==="y"?as:os,Z=k==="y"?"height":"width",pe=L[k],ie=pe+I[ue],de=pe-I[fe],K=w?-U[Z]/2:0,ae=N===yp?H[Z]:U[Z],Se=N===yp?-U[Z]:-H[Z],je=t.elements.arrow,Re=w&&je?q2(je):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:S6(),Be=Fe[ue],Qe=Fe[fe],Ze=_g(0,H[Z],Re[Z]),st=_?H[Z]/2-K-Ze-Be-$.mainAxis:ae-Ze-Be-$.mainAxis,xt=_?-H[Z]/2+K+Ze+Qe+$.mainAxis:Se+Ze+Qe+$.mainAxis,tn=t.elements.arrow&&Lv(t.elements.arrow),_e=tn?k==="y"?tn.clientTop||0:tn.clientLeft||0:0,Xe=(se=X==null?void 0:X[k])!=null?se:0,tt=pe+st-Xe-_e,ht=pe+xt-Xe,St=_g(w?Mw(ie,tt):ie,pe,w?df(de,ht):de);L[k]=St,Q[k]=St-pe}if(l){var Tt,Gt=k==="x"?ti:ni,_t=k==="x"?as:os,Vt=L[R],Xt=R==="y"?"height":"width",dn=Vt+I[Gt],en=Vt-I[_t],Zn=[ti,ni].indexOf(M)!==-1,kn=(Tt=X==null?void 0:X[R])!=null?Tt:0,Er=Zn?dn:Vt-H[Xt]-U[Xt]-kn+$.altAxis,pt=Zn?Vt+H[Xt]+U[Xt]-kn-$.altAxis:en,Mt=w&&Zn?XY(Er,Vt,pt):_g(w?Er:dn,Vt,w?pt:en);L[R]=Mt,Q[R]=Mt-Vt}t.modifiersData[r]=Q}}const O6={name:"preventOverflow",enabled:!0,phase:"main",fn:DU,requiresIfExists:["offset"]};function TU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function IU(e){return e===Ni(e)||!ns(e)?J2(e):TU(e)}function EU(e){var t=e.getBoundingClientRect(),n=wp(t.width)/e.offsetWidth||1,r=wp(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xU(e,t,n){n===void 0&&(n=!1);var r=ns(t),a=ns(t)&&EU(t),o=rd(t),i=bp(e,a,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Kl(t)!=="body"||Q2(o))&&(l=IU(t)),ns(t)?(c=bp(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=K2(o))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function CU(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function a(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&a(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||a(o)}),r}function MU(e){var t=CU(e);return ZY.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function kU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function NU(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var xC={placement:"bottom",modifiers:[],strategy:"absolute"};function CC(){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 P6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,a=t.defaultOptions,o=a===void 0?xC:a;return function(l,c,f){f===void 0&&(f=o);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},xC,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},g=[],y=!1,w={state:p,setOptions:function(M){var N=typeof M=="function"?M(p.options):M;S(),p.options=Object.assign({},o,p.options,N),p.scrollParents={reference:vf(l)?Bg(l):l.contextElement?Bg(l.contextElement):[],popper:Bg(c)};var _=MU(NU([].concat(r,p.options.modifiers)));return p.orderedModifiers=_.filter(function(k){return k.enabled}),T(),w.update()},forceUpdate:function(){if(!y){var M=p.elements,N=M.reference,_=M.popper;if(CC(N,_)){p.rects={reference:xU(N,Lv(_),p.options.strategy==="fixed"),popper:q2(_)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function($){return p.modifiersData[$.name]=Object.assign({},$.data)});for(var k=0;k<p.orderedModifiers.length;k++){if(p.reset===!0){p.reset=!1,k=-1;continue}var R=p.orderedModifiers[k],L=R.fn,H=R.options,U=H===void 0?{}:H,z=R.name;typeof L=="function"&&(p=L({state:p,options:U,name:z,instance:w})||p)}}}},update:kU(function(){return new Promise(function(I){w.forceUpdate(),I(p)})}),destroy:function(){S(),y=!0}};if(!CC(l,c))return w;w.setOptions(f).then(function(I){!y&&f.onFirstUpdate&&f.onFirstUpdate(I)});function T(){p.orderedModifiers.forEach(function(I){var M=I.name,N=I.options,_=N===void 0?{}:N,k=I.effect;if(typeof k=="function"){var R=k({state:p,name:M,instance:w,options:_}),L=function(){};g.push(R||L)}})}function S(){g.forEach(function(I){return I()}),g=[]}return w}}var AU=[x6,F6,E6,JY,A6,k6,O6,I6,N6],j6=P6({defaultModifiers:AU}),FU=typeof Element<"u",OU=typeof Map=="function",PU=typeof Set=="function",jU=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function nw(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,a;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!nw(e[r],t[r]))return!1;return!0}var o;if(OU&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!nw(r.value[1],t.get(r.value[0])))return!1;return!0}if(PU&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(jU&&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(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;if(FU&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((a[r]==="_owner"||a[r]==="__v"||a[r]==="__o")&&e.$$typeof)&&!nw(e[a[r]],t[a[r]]))return!1;return!0}return e!==e&&t!==t}var LU=function(t,n){try{return nw(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 RU=qt(LU);var _U=[],Tb=function(t,n,r){r===void 0&&(r={});var a=P.useRef(null),o={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||_U},i=P.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=i[0],c=i[1],f=P.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(w){var T=w.state,S=Object.keys(T.elements);U2.flushSync(function(){c({styles:vC(S.map(function(I){return[I,T.styles[I]||{}]})),attributes:vC(S.map(function(I){return[I,T.attributes[I]]}))})})},requires:["computeStyles"]}},[]),p=P.useMemo(function(){var y={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[f,{name:"applyStyles",enabled:!1}])};return RU(a.current,y)?a.current||y:(a.current=y,y)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,f]),g=P.useRef();return yC(function(){g.current&&g.current.setOptions(p)},[p]),yC(function(){if(!(t==null||n==null)){var y=r.createPopper||j6,w=y(t,n,p);return g.current=w,function(){w.destroy(),g.current=null}}},[t,n,r.createPopper]),{state:g.current?g.current.state:null,styles:l.styles,attributes:l.attributes,update:g.current?g.current.update:null,forceUpdate:g.current?g.current.forceUpdate:null}},BU=function(){},HU=BU;const YU=qt(HU),UU=(e,t)=>({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),zU=e=>{const n=P.useRef(null),[r,a]=P.useState(null),[o,i]=P.useState(0);let l,c;const f=()=>{if(C.Platform.isMobile){l="right-end",c=["bottom"];return}const g=window.innerWidth-o>280*1.2,y=window.innerWidth-o<280,w=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){g?(l="right-end",c=["left-end"]):y&&w?(l="left-end",c=["right-end"]):(l="bottom",c=["bottom"]);return}g?(l="top-end",c=["top-start"]):y&&o>280?(l="top-start",c=["top-end"]):(l="top",c=["top"])};P.useEffect(()=>{e&&f()},[o,e==null?void 0:e.DefaultEditorLocation]);const p=Tb(n.current,r,UU(l,c));return{setPosX:i,popperRef:n,setPopperElement:a,popper:p}},VU=()=>{const e=new Set,t=ot.getState().query.filter,n=ot.getState().query.tag,r=sn.getQueryById(t||"");if(r&&r.querystring){const a=JSON.parse(r.querystring);if(Array.isArray(a))for(const o of a)o.type==="TAG"&&o.value&&o.value.operator==="CONTAIN"&&e.add(o.value.value)}return n&&e.add(n),Array.from(e)},WU=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:a,selectionEnd:o}=e,i=document.createElement("div"),l=window.getComputedStyle(e);for(const S of l)i.style.setProperty(S,l.getPropertyValue(S));i.style.position="fixed",i.style.visibility="hidden",i.style.whiteSpace="pre-wrap";const f=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;i.textContent=f.substring(0,o||0),e.tagName==="TEXTAREA"&&(i.style.height="auto");const p=document.createElement("span");p.textContent=f.substring(o||0)||".",i.appendChild(p),document.body.appendChild(i);const{offsetLeft:g,offsetTop:y,offsetHeight:w,offsetWidth:T}=p;return document.body.removeChild(i),{x:t+g,y:n+y,h:r+w,w:a+T}},ff=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:a,dailyNotesState:{app:o,settings:i,view:l,verifyState:c}}=P.useContext(Lt),[f,p]=Jl(!0),g=P.useRef(f),[y,w]=Co(!0),T=P.useRef(null),S=P.useRef(null),I=P.useRef(a),[M,N]=Co(!1),[_,k]=Co(!1),{setPosX:R,popperRef:L,setPopperElement:H,popper:U}=zU(i),[z]=Co(parseInt(C.moment().format("x"))),$=P.useRef(null),[X,Q]=Co((i==null?void 0:i.EnabledLocationList.length)===1?i==null?void 0:i.EnabledLocationList[0].value:(i==null?void 0:i.MemoSaveLocation)||"DAILY"),se=P.useRef(i.MemoSaveLocation||"DAILY");P.useEffect(()=>{g.current=f},[f]),P.useEffect(()=>{!S.current||!o||!l||(l.registerEvent(o.workspace.on("focus-on-textarea",_e=>{var Xe;(Xe=S.current)==null||Xe.focus(_e==null?void 0:_e.id)})),l.registerEvent(o.workspace.on("blur-on-memos",()=>{var _e;(_e=S.current)==null||_e.blur()})),l.registerEvent(o.workspace.on("send-to-thino",async(_e,Xe)=>{var tt,ht;if(typeof _e=="string")(tt=S.current)==null||tt.insertText(_e+`
`,Xe.id);else{const St=_e.toPNG(),Tt=new Blob([St],{type:"image/png"}),Gt=new File([Tt],"image.png",{type:"image/png",lastModified:Date.now()});if(!Gt)return;const _t=await de(Gt);_t&&((ht=S.current)==null||ht.insertText(_t+`
`,Xe.id))}})))},[S,l,o]),P.useEffect(()=>{i&&p(i.DefaultPrefix==="List")},[i==null?void 0:i.DefaultPrefix]),P.useEffect(()=>{if(i){if(i.EnabledLocationList.length===1){Q(i.EnabledLocationList[0].value);return}Q(i.MemoSaveLocation||"DAILY")}},[i==null?void 0:i.MemoSaveLocation,i==null?void 0:i.EnabledLocationList]),P.useEffect(()=>{var tt;if(!i||!$.current)return;const _e=(tt=$g.find(ht=>ht.title===X))==null?void 0:tt.icon;C.setIcon($.current,_e),C.requireApiVersion("1.4.4")&&C.setTooltip($.current,E("Thino Save To: ")+X),se.current=X;const Xe=a.manifest;if(Xe){const ht=o==null?void 0:o.plugins.getPlugin(Xe.id);if(ht){if(ht.settings.MemoSaveLocation===X)return;ht.settings.MemoSaveLocation=X,ht.saveSettings()}}},[X,y]),P.useEffect(()=>{S.current&&i.MemoSaveLocation&&Q(i.MemoSaveLocation)},[$,i]),P.useEffect(()=>{if(!S.current||!i||C.Platform.isDesktop||a.globalEditorShown)return;const _e=i.UseButtonToShowEditor&&i.DefaultEditorLocation==="Bottom";if(C.Platform.isDesktop){w(!0);return}if(t&&t==="inline"){w(!0);return}if(w(C.Platform.isMobile&&!_e),!_e||a.memoListView==="chat")return;const Xe=document.body.find(".memolist-scrollview");Xe&&(Xe.onscroll=()=>{if(a.globalEditorShown)return;if(!a.memoListView&&dt.getState().memoListView==="chat"){Xe.onscroll=null;return}const tt=S.current.getContent();C.Platform.isMobile&&_e&&!tt&&w(!1)})},[a.globalEditorShown,t,S]);const ue=()=>{k(!1)};P.useEffect(()=>{var _e,Xe,tt,ht,St,Tt,Gt,_t,Vt;if(o&&(a.markMemoId||(_e=a.editMemoId)!=null&&_e.trim()&&a.editMemoId!==I.current.editMemoId)){const Xt=o.workspace.getLeavesOfType("thino_view");Xt.length>0&&o.workspace.revealLeaf(Xt[0])}if(a.markMemoId){const Xt=`${E("MARK")}: [@THINO](${a.markMemoId})`;(Xe=S.current)==null||Xe.insertText(Xt),(tt=S.current)==null||tt.focus(),dt.setMarkMemoId("");return}if((ht=a.editMemoId)!=null&&ht.trim()&&a.editMemoId!==I.current.editMemoId){const Xt=be.getMemoById(a.editMemoId);if(Xt)switch(p(Xt.thinoType==="JOURNAL"),i.EditorType){case"memos":(St=S.current)==null||St.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Tt=S.current)==null||Tt.focus();break;case"obsidian":(Gt=S.current)==null||Gt.clear(),(_t=S.current)==null||_t.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Vt=S.current)==null||Vt.focus();break}}I.current=a},[a.markMemoId,a.editMemoId]),P.useEffect(()=>{var _e,Xe,tt;!S.current||M||i.EditorType==="memos"&&((_e=S.current)==null||_e.element.addEventListener("paste",fe),(Xe=S.current)==null||Xe.element.addEventListener("drop",Z),(tt=S.current)==null||tt.element.addEventListener("click",pe),N(!0))},[S.current]);const fe=async _e=>{var Xe;if(_e.clipboardData&&_e.clipboardData.files.length>0){_e.preventDefault();const tt=_e.clipboardData.files;for(const ht of tt){const St=await de(ht);St&&((Xe=S.current)==null||Xe.insertText(St))}}},Z=async _e=>{var Xe;if(_e.dataTransfer&&_e.dataTransfer.files.length>0){_e.preventDefault();const tt=_e.dataTransfer.files;for(const ht of tt){const St=await de(ht);St&&((Xe=S.current)==null||Xe.insertText(St))}}},pe=()=>{var _e;Se(((_e=S.current)==null?void 0:_e.element.value)||"")},ie=async(_e,Xe)=>{var St,Tt,Gt;const tt=_e.ctrlKey||_e.metaKey,ht=_e.altKey;if(_e.key==="Escape"&&a.globalEditorShown&&(dt.setGlobalEditorShown(!1),_e.preventDefault()),tt&&_e.key==="Enter"){_e.preventDefault(),_e.stopPropagation(),Xe?(await K((Tt=S.current)==null?void 0:Tt.getContent()),(Gt=S.current)==null||Gt.clear()):await K((St=S.current)==null?void 0:St.element.value);return}if(ht)for(let _t=0;_t<i.EnabledLocationList.length;_t++)_e.key===(_t+1).toString()&&Q(i.EnabledLocationList[_t].value);setTimeout(()=>{var _t;Xe||Se(((_t=S.current)==null?void 0:_t.element.value)||"")})},de=P.useCallback(async _e=>{const{type:Xe}=_e;if(Xe.startsWith("image"))try{return`${await Y2.upload(_e)}`}catch(tt){new C.Notice(tt)}},[]),K=async _e=>{if(!_e||_e.trim()===""){new C.Notice(E("Content cannot be empty"));return}const Xe=ft.getState().settings,tt=Xe==null?void 0:Xe.addTagAutomatically,ht=Xe==null?void 0:Xe.addTagWithNewline,St=Xe==null?void 0:Xe.addTagPosition,Gt=(VU()||[]).filter(dn=>!_e.includes(`#${dn}`)),_t=async(dn,en)=>{en=en.replaceAll("&nbsp;"," "),D0("");try{if(!dn){let kn;switch(se.current){case"CANVAS":kn=await be.createMemoCanvas({text:en,isList:g.current});break;case"MULTI":kn=await be.createMemoMultiFile({content:en,isList:g.current});break;case"DAILY":kn=await be.createMemoDaily(en,g.current);break;case"FILE":kn=await be.createMemoSingleFile({content:en,isList:g.current});break}if(!kn)return;be.pushMemo(kn),(!tt||Gt.length===0)&&ot.clearQuery();const Er=o||ft.getState().app,pt=Er==null?void 0:Er.loadLocalStorage("tokenForSync");kn&&pt&&i.startSync&&setTimeout(async()=>{try{if(se.current!=="DAILY"){const Mt=await T2({content:en,thinoType:"FILE"});await be.updateMemoById(kn.id,Mt,!0)}}catch(Mt){console.error(Mt)}},200);return}const Zn=be.getMemoById(dn);if(Zn&&(Zn.content!==en||Zn.thinoType!==(g.current?"JOURNAL":"TASK-TODO"))){const kn=await be.updateMemo(Zn.id,en,g.current?"JOURNAL":Zn.thinoType.startsWith("TASK")?Zn.thinoType:"TASK-TODO");kn.updatedAt=ut.getDateTimeString(Date.now()),be.editMemo(kn)}dt.setEditMemoId("")}catch(Zn){new C.Notice(Zn.message)}};n&&n();const{editMemoId:Vt}=dt.getState(),Xt=Gt&&Gt.length>0&&tt&&!Vt?St==="Beginning"?`${Gt.map(dn=>`#${dn}`).join(" ")} ${ht?`
`:""}${_e}`:`${_e} ${ht?`
`:""}${Gt.map(dn=>`#${dn}`).join(" ")}`:_e;await _t(Vt,Xt),D0("")},ae=P.useCallback(()=>{var _e;dt.setEditMemoId(""),(_e=S.current)==null||_e.setContent(""),D0("")},[]),Se=P.useCallback(_e=>{if(D0(_e??""),!S.current)return;const Xe=S.current.getContent(),tt=S.current.element.selectionStart,ht=Xe.slice(0,tt),St=Xe.slice(tt);(ht.endsWith("@")||ht.endsWith("📆"))&&St.startsWith(" ")||(ht.endsWith("@")||ht.endsWith("📆"))&&St===""?(Ze(),k(!0)):k(!1),setTimeout(()=>{var Tt;(Tt=S.current)==null||Tt.focus()})},[i.EditorType]),je=_e=>{if(!S.current||!i)return;_e&&(ue(),p(!1));const Xe=S.current.getContent(),tt=S.current.element.selectionStart,ht=Xe.slice(0,tt),St=Xe.slice(tt),Tt=C.moment(_e);if(ht.endsWith("@"))switch(i.InsertDateFormat){case"Dataview":S.current.element.value=Xe.slice(0,S.current.element.selectionStart-1)+"[due:: "+Tt.format("YYYY-MM-DD")+"]"+St,S.current.element.setSelectionRange(tt+17,tt+17),S.current.focus(),Se(S.current.element.value);break;case"Tasks":S.current.element.value=Xe.slice(0,S.current.element.selectionStart-1)+"📅 "+Tt.format("YYYY-MM-DD")+St,S.current.element.setSelectionRange(tt+11,tt+11),S.current.focus(),Se(S.current.element.value)}else{S.current.element.value=ht+Tt.format("YYYY-MM-DD")+St,S.current.element.setSelectionRange(tt+10,tt+10),S.current.focus(),Se(S.current.element.value);return}},Re=()=>{S.current&&p()},Fe=async()=>{var tt;const _e=!C.Platform.isDesktop&&await((tt=window.Capacitor)==null?void 0:tt.Plugins.Device.getId()),Xe=C.Platform.isDesktop?await cr():_e.identifier||_e.uuid;return!c||(c==null?void 0:c.appId)!==Xe?(Sn(),!1):!0},Be=async _e=>{if(!await Fe())return;const Xe=new C.Menu;i.EnabledLocationList.forEach(Tt=>{Xe.addItem(Gt=>{var _t;Gt.setTitle(E(Tt.value)).setIcon(((_t=$g.find(Vt=>Vt.title===Tt.value))==null?void 0:_t.icon)??"file").setChecked(X===Tt.value).onClick(()=>{Q(Tt.value)})})});let tt=_e.target,ht=null;for(;!tt.hasClass("location-wrapper")&&(ht=tt.parentElement,ht);)tt=ht;const St=tt.getBoundingClientRect();setTimeout(()=>{Xe.showAtPosition({x:St.x,y:St.bottom,width:St.width,left:!1,overlap:!0})},200)},Qe=P.useCallback(()=>{var _e,Xe;if(!(!S.current&&i.EditorType==="memos"))switch(i.EditorType){case"obsidian":(_e=S.current)==null||_e.focus(),(Xe=S.current)==null||Xe.insertTag();break;case"memos":{const tt=S.current.getContent(),ht=S.current.element.selectionStart,St=tt.slice(0,ht),Tt=tt.slice(ht);let Gt=St+"# "+Tt,_t=St.length+1;St.endsWith("#")&&Tt.startsWith(" ")&&(Gt=St.slice(0,St.length-1)+Tt.slice(1),_t=St.length-1),S.current.element.value=Gt,S.current.element.setSelectionRange(_t,_t),S.current.focus();const Vt=new Event("input",{bubbles:!0,cancelable:!0});S.current.element.dispatchEvent(Vt),Se(S.current.element.value)}}},[o]),Ze=P.useCallback(()=>{if(!S.current||!L.current||!i||!o)return;const tt=o.workspace.getLeavesOfType(lo)[0].view.containerEl,ht=280,St=tt.clientWidth,{x:Tt,y:Gt}=WU(S.current.element);let _t,Vt;C.Platform.isMobile?(window.innerWidth-Tt>ht?_t=(Tt+ht+16>St,Tt+18):window.innerWidth-Tt<ht?_t=(Tt+ht+16>St,Tt+34):_t=S.current.element.clientWidth/2,i.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?Vt=Gt+4:i.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?Vt=Gt+19:i.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&(Vt=Gt+36)):(_t=(Tt+ht+16>St,Tt+18),Vt=Gt+34),R(Tt),L.current.style.left=`${_t}px`,L.current.style.top=`${Vt}px`},[i,o]),st=P.useCallback(()=>{const _e=document.createElement("input");document.body.appendChild(_e),_e.type="file",_e.multiple=!1,_e.accept="image/png, image/gif, image/jpeg",_e.onchange=async()=>{var ht;if(!_e.files||_e.files.length===0)return;const Xe=_e.files[0],tt=await de(Xe);tt&&((ht=S.current)==null||ht.insertText(tt)),document.body.removeChild(_e)},_e.click()},[]),xt=!!a.editMemoId,tn=P.useMemo(()=>({className:"memo-editor",inputerType:i.EditorType||"obsidian",modal:r,initialContent:$U(),placeholder:E("What do you think now..."),showConfirmBtn:!0,showCancelBtn:xt,showTools:!0,onConfirmBtnClick:K,onCancelBtnClick:ae,onContentChange:Se}),[xt,i.EditorType]);return v.jsxs(v.Fragment,{children:[!a.globalEditorShown&&t==="block"&&v.jsx("div",{ref:_e=>{T.current=_e,_e&&C.setIcon&&C.setIcon(_e,"plus-circle")},className:`memo-show-editor-button ${y?"hidden":""}`,onClick:()=>{var _e;(_e=T.current.firstElementChild)==null||_e.toggleClass("rotate-hidden",!0),setTimeout(()=>{w(!0),T.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{var Xe;(Xe=S.current)==null||Xe.focus()},600)}}),v.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${xt?"edit-ing":""} ${a.globalEditorShown?"fullscreen-editor":""} ${y?"":"hidden"}`,onKeyDownCapture:_e=>ie(_e,!0),children:[v.jsx("span",{className:`tip-text ${xt?"":"hidden"}`,children:"Modifying..."}),v.jsx(FY,{ref:S,...tn,tools:v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:_e=>{_e&&C.setIcon(_e,"hash")},className:"btn action-btn add-tag",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Qe()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Qe()}}),v.jsx("span",{ref:_e=>{_e&&C.setIcon(_e,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&st()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&st()}}),v.jsx("span",{ref:_e=>{_e&&C.setIcon(_e,f?"layout-list":"check-square")},className:ar("btn action-btn list-or-task",f?"list":"task"),onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Re()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Re()}}),v.jsx("div",{ref:_e=>{_e&&(C.setIcon&&C.setIcon(_e,a.globalEditorShown?"shrink":"expand"),C.setTooltip&&C.setTooltip(_e,a.globalEditorShown?E("Exit fullscreen mode"):E("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await Fe()&&(w(!0),dt.setGlobalEditorShown(!a.globalEditorShown))}}),v.jsx("div",{className:"action-btn split-line pro"}),v.jsx("div",{className:"action-btn location-wrapper pro",onClick:async _e=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&await Be(_e)},onPointerDown:async _e=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&await Be(_e)},children:v.jsx("div",{ref:$,className:"action-btn file-location-btn"})})]})}),v.jsx("div",{ref:L,className:"date-picker",children:_&&v.jsx("div",{tabIndex:-1,style:U.styles.popper,...U.attributes.popper,ref:H,role:"dialog",children:v.jsx(Sb,{className:`editor-date-picker ${_?"":"hidden"}`,datestamp:z,handleDateStampChange:je})})})]})]})};function $U(){return la.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function D0(e){la.set({thinoEditorContentCache:e})}const ZU=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(a=>{if(a.date==C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return a.have.push(n),!0})||t.push({date:C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},qU=e=>be.getState().commentMemos.filter(t=>t.linkId===e.hasId).sort((t,n)=>ut.getTimeStampByDate(t.createdAt)-ut.getTimeStampByDate(n.createdAt)).map(t=>({...t,createdAtStr:ut.getDateTimeString(t.createdAt),dateStr:ut.getDateString(t.createdAt)})),GU=e=>{const t=ft.getState().settings,n=QL(),r=t!=null&&t.ShowDate?" ":"",a="YYYY/MM/DD HH:mm:ss",o=/comment:(.*)$/g,i=/^\d{14}/g,l=(g,y,w)=>{const T=C.moment(g.createdAt,a).format("HH:mm");return w?w.replace(/{TIME}/g,T).replace(/{CONTENT}/g,y):`${T} ${y}`},c=g=>{const y=g.match(/TASK-(.*)?/g);return y?y[1]:""},f=g=>g==="TASK-TODO"?"- [ ] ":g==="TASK-DONE"?"- [x] ":g.match(/TASK-(.*)?/g)?`- [${c(g)}] `:"- ",p=g=>g.reduce((y,w)=>{const T=w.sourceType!=="MULTI"?`${w.content}`:`[[${w.path}]]`,S=t!=null&&t.ShowTime?l(w,T,t==null?void 0:t.DefaultMemoComposition):T,I=`${f(w.thinoType)}${S}`;let M="";return t.CommentOnMemos&&w.hasId!==void 0&&w.hasId!==""&&(M=qU(w).reduce((_,k)=>{const R=f(k.thinoType),L=k.content.replace(o,"").replace(i,""),H=t!=null&&t.ShowDate?`${R}[[${C.moment(k.createdAt).format(n)}]] ${C.moment(k.createdAt).format("HH:mm")} ${L}`:`${R}${L}`;return _+r+" "+H+`
`},"")),y+r+I.replace(/ \^\S{6}/g,"")+`
`+M},"");return e.reduce((g,y)=>{const w=t!=null&&t.ShowDate?`- [[${C.moment(y.date,"YYYY-MM-DD").format(n)}]]
`:"",T=p(y.have),S=t!=null&&t.ShowDate&&(t!=null&&t.AddBlankLineWhenDate)&&!(t!=null&&t.CommentOnMemos)?`
`:"";return g+w+T+S},"").replace(/<br>/g,`
`)},JU=[{label:E("Today"),value:C.moment().format("YYYY-MM-DD")},{label:E("Yesterday"),value:C.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:E("Last 7 days"),value:C.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:E("Last 30 days"),value:C.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:E("Last 90 days"),value:C.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:E("Last 180 days"),value:C.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:E("Last 365 days"),value:C.moment().subtract(365,"days").format("YYYY-MM-DD")}],L6=e=>{const{handleValueChange:t,setShownStatus:n}=e;return v.jsxs(v.Fragment,{children:[e.type==="icon"&&v.jsx("div",{className:"quick-date-btn-group",children:JU.map((r,a)=>v.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},a))}),v.jsx(Sb,{className:"calendar-date-picker",datestamp:(e==null?void 0:e.defaultValue)||C.moment().startOf("day").valueOf(),handleDateStampChange:(r,a)=>{t(e.type==="icon"?C.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},kw=e=>{const{handleValueChange:t}=e,[n,r]=ne.useState(!1),a=ne.useRef(null),o=ne.useRef(null),i=Tb(o.current,a.current,{placement:"bottom-start"});return Pv(a,()=>{r(!1)}),v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:c=>{o.current=c,c&&e.type==="icon"&&C.setIcon(c,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!C.Platform.isMobile&&r(!n),!C.Platform.isMobile&&(i!=null&&i.update)&&(i==null||i.update()),C.Platform.isMobile&&new R6(ft.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:C.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),v.jsx("div",{className:`menu-btns-popup ${n?"":"hidden"}`,ref:a,style:i.styles.popper,children:v.jsx(L6,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class R6 extends C.Modal{constructor(n,r,a){super(n);De(this,"root");De(this,"type");De(this,"handleValueChange");this.type=r,this.handleValueChange=a}onOpen(){const{contentEl:n}=this;this.root=Av(n),this.root.render(v.jsx(L6,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:r=>{!r&&this.close()}}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const KU=(e,t)=>(e%t+t)%t;class QU{constructor(t,n,r){De(this,"owner");De(this,"values");De(this,"suggestions");De(this,"selectedItem");De(this,"containerEl");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",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",a=>{if(!a.isComposing)return this.useSelectedItem(a),!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 a=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,a),n.push(a)}),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=KU(t,this.suggestions.length),a=this.suggestions[this.selectedItem],o=this.suggestions[r];a==null||a.removeClass("is-selected"),o==null||o.addClass("is-selected"),this.selectedItem=r,n&&o.scrollIntoView(!1)}}class _6{constructor(t,n){De(this,"inputEl");De(this,"popper");De(this,"scope");De(this,"suggestEl");De(this,"suggest");De(this,"cb");this.inputEl=t,this.scope=new C.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new QU(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",a=>{a.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=j6(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:a})=>{const o=`${r.rects.reference.width}px`;r.styles.popper.width!==o&&(r.styles.popper.width=o,a.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 XU=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let Kg=class extends _6{fuzzySearchItemsOptimized(t,n){const r=C.prepareFuzzySearch(t);return n.map(a=>{const o=r(a);return o?{item:a,match:o,score:o.score}:null}).sort((a,o)=>(o==null?void 0:o.score)-(a==null?void 0:a.score)).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=ft.getState(),a=t.toLocaleLowerCase(),o=n.UseVaultTags?XU(r):be.getState().tags;return this.fuzzySearchItemsOptimized(a,o).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 ez=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp($r).exec(n.content),a=new RegExp(ua).exec(n.content);if(r)for(let o=1;o<r.length;o++)t.add(r[o]);if(a)for(let o=1;o<a.length;o++)t.add(a[o])}),Array.from(t)};class tz extends C.Modal{constructor(n,r){super(n);De(this,"root");De(this,"cb");De(this,"tags",[]);this.cb=r}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=rs.createRoot(this.contentEl),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(nz,{closeDialog:this.closeDialog.bind(this)})}))}closeDialog(n){this.tags=n,this.close()}onClose(){var n;this.cb(this.tags),super.onClose(),(n=this.root)==null||n.unmount()}}const nz=({closeDialog:e})=>{const[t,n]=ne.useState([]),r=ne.useRef(null),a=ne.useRef(null);P.useEffect(()=>{if(a.current){if(r.current){r.current.updateCb(o);return}r.current=new Kg(a.current,o)}},[a.current,t]);const o=l=>{if(!l)return;const c=new Set(t);c.add(l),n(Array.from(c)),r.current.clearInput()},i=()=>{e(t)};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Select")}),v.jsxs("div",{className:"tag-operation-content",children:[v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(l=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(c=>c!==l))},children:l},l))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:a,onKeyDown:l=>{l.key==="Enter"&&o(a.current.value)}})}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:i,children:E("Save")})]})]})]})},rz=({app:e,thinos:t,closeDialog:n})=>{const[r,a]=ne.useState([]),[o,i]=ne.useState([]),[l,c]=ne.useState([]),f=ne.useRef(null),p=ne.useRef(null),g=ne.useRef(null),y=ne.useRef("End"),w=ne.useRef(!1),T=ne.useRef(null);P.useEffect(()=>{t&&t.length&&a(ez(t))},[t]),P.useEffect(()=>{!g.current||!p.current||(new C.Setting(p.current).setName(E("Add tag position")).addDropdown(N=>{N.addOption("End",E("End")),N.addOption("Beginning",E("Beginning")),N.setValue("End").onChange(async _=>{y.current=_})}),new C.Setting(g.current).setName(E("Add tag with new line")).addToggle(N=>{N.setValue(!1).onChange(async _=>{w.current=_})}))},[]);const S=N=>{if(!N)return;const _=new Set(o);_.add(N),i(Array.from(_)),f.current.clearInput()};P.useEffect(()=>{if(T.current){if(f.current){f.current.updateCb(S);return}f.current=new Kg(T.current,S)}},[T.current,o]);const I=()=>{n(),M({remove:l,add:o,targetThinos:t})},M=async({remove:N,add:_,targetThinos:k})=>{const R=w.current||!1,L=[];for(const H of k){let U=H.content;for(const z of N)U=U.replace(new RegExp(`#${z}`,"g"),"");if(U=U.trim(),_.length>0&&(U=y.current==="Beginning"?`${_.map(z=>`#${z}`).join(" ")} ${R?`
`:""}${U}`:`${U} ${R?`
`:""}${_.map(z=>`#${z}`).join(" ")}`),H&&H.content!==U){const z=await be.updateMemo(H.id,U==null?void 0:U.trim());L.push(z)}}L.length>0&&be.editMemoBulk(L),L.length>0&&ot.clearQuery()};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Edit")}),v.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[v.jsx("div",{className:"name",children:E("Exist Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove exist tag")})]}),v.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(N=>v.jsx("div",{className:ar("tag-operation-content-tag",l.includes(N)&&"tag-operation-content-tag-removed"),onClick:()=>{l.includes(N)||c([...l,N]),l.includes(N)&&c(l.filter(_=>_!==N)),o.includes(N)&&i(o.filter(_=>_!==N))},children:N},N))})]}),v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:o.map(N=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{i(o.filter(_=>_!==N))},children:N},N))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:T,onKeyDown:N=>{N.key==="Enter"&&S(T.current.value)}})}),v.jsxs("div",{className:"tag-operation-settings",children:[v.jsx("div",{ref:p}),v.jsx("div",{ref:g})]}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:n,children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:I,children:E("Save")})]})]})]})},ST=new Map,yf=async(e,t=!0)=>{const{vault:n,metadataCache:r}=ft.getState().app;if(t&&ST.has(e))return Promise.resolve(ST.get(e));if(e.contains("data:image"))return e;let a;const o=await n.adapter.exists(C.normalizePath(e));let i="";try{if(!o&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let l;if(e.startsWith("app://")){const c=C.normalizePath(decodeURIComponent(e).replace(C.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(C.normalizePath(app==null?void 0:app.vault.adapter.basePath),""));i=C.normalizePath(decodeURIComponent(c))}else{if(l=r.getFirstLinkpathDest(e,""),!l){new C.Notice(E("File not exist"));return}i=l.path}}else i=e}catch(l){console.error(l)}if(i){if(/(http|https)/g.test(i))if(i.startsWith("http://localhost")){let l=i;l=l.replace("http://localhost/_capacitor_file_",""),l=decodeURIComponent(l).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),l=C.normalizePath(decodeURIComponent(l));const c=await n.adapter.readBinary(l),f=new Uint8Array(c);a=new Blob([f],{type:"image/png"})}else try{const l=await C.requestUrl(e),c=new Uint8Array(l.arrayBuffer);a=new Blob([c],{type:"image/png"})}catch{}else if(i){const l=await n.adapter.readBinary(i),c=new Uint8Array(l);a=new Blob([c],{type:"image/png"})}return a?await az(a,e):""}},az=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const a=r.result;ST.set(t,a),n(a)},r.readAsDataURL(e)}),Fg=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==null?void 0:app.vault.adapter.basePath,""),t=C.normalizePath(decodeURIComponent(t))),await yf(t)):void 0},oz=async e=>{var n;return e.getAttribute("src")?(n=e==null?void 0:e.src)!=null&&n.startsWith("http://localhost")?await yf(e.getAttribute("path")||C.normalizePath(e==null?void 0:e.parentElement.getAttribute("src"))):await yf(e.getAttribute("src")):void 0},Zt=mz(),Nw=gz(),B6=vz(),H6=yz(),Qd={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},yn={toSvg:Y6,toPng:lz,toJpeg:uz,toBlob:cz,toPixelData:sz,toCanvas:dz,impl:{fontFaces:B6,images:H6,util:Zt,inliner:Nw,urlCache:[],options:{}}},X2=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,rw=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,iz=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function Y6(e,t){yn.impl.util.getWindow(e),t=t||{},fz(t);let n=[];return Promise.resolve(e).then(r).then(function(c){return U6(c,t,null)}).then(hz).then(pz).then(i).then(l).then(a).then(o);function r(c){if(c.nodeType===X2)return c;const f=c,p=c.parentNode,g=document.createElement("span");return p.replaceChild(g,f),g.append(c),n.push({parent:p,child:f,wrapper:g}),g}function a(c){for(;n.length>0;){const f=n.pop();f.parent.replaceChild(f.child,f.wrapper)}return c}function o(c){return yn.impl.urlCache=[],Iz(),c}function i(c){t.bgcolor&&(c.style.backgroundColor=t.bgcolor),t.width&&(c.style.width=`${t.width}px`),t.height&&(c.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(p){c.style[p]=t.style[p]});let f=null;return typeof t.onclone=="function"&&(f=t.onclone(c)),Promise.resolve(f).then(function(){return c})}function l(c){let f=t.width||Zt.width(c),p=t.height||Zt.height(c);return Promise.resolve(c).then(function(g){return g.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(g)}).then(Zt.escapeXhtml).then(function(g){const y=(Zt.isDimensionMissing(f)?' width="100%"':` width="${f}"`)+(Zt.isDimensionMissing(p)?' height="100%"':` height="${p}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(Zt.isDimensionMissing(f)?"":` width="${f}"`)+(Zt.isDimensionMissing(p)?"":` height="${p}"`)}><foreignObject${y}>${g}</foreignObject></svg>`}).then(function(g){return`data:image/svg+xml;charset=utf-8,${g}`})}}function sz(e,t){return Rv(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,Zt.width(e),Zt.height(e)).data})}function lz(e,t){return Rv(e,t).then(function(n){return n.toDataURL()})}function uz(e,t){return Rv(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function cz(e,t){return Rv(e,t).then(Zt.canvasToBlob)}function dz(e,t){return Rv(e,t)}function fz(e){typeof e.copyDefaultStyles>"u"?yn.impl.options.copyDefaultStyles=Qd.copyDefaultStyles:yn.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?yn.impl.options.imagePlaceholder=Qd.imagePlaceholder:yn.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?yn.impl.options.cacheBust=Qd.cacheBust:yn.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?yn.impl.options.corsImg=Qd.corsImg:yn.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?yn.impl.options.useCredentials=Qd.useCredentials:yn.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?yn.impl.options.httpTimeout=Qd.httpTimeout:yn.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?yn.impl.options.styleCaching=Qd.styleCaching:yn.impl.options.styleCaching=e.styleCaching,yn.impl.options.requestUrl=e.requestUrl,yn.impl.options.type=e.type||"image/png"}function Rv(e,t){return t=t||{},Y6(e,t).then(Zt.makeImage).then(function(r){const a=typeof t.scale!="number"?1:t.scale,o=n(e,a),i=o.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(a,a),i.drawImage(r,0,0)),o});function n(r,a){let o=t.width||Zt.width(r),i=t.height||Zt.height(r);Zt.isDimensionMissing(o)&&(o=Zt.isDimensionMissing(i)?300:i*2),Zt.isDimensionMissing(i)&&(i=o/2);const l=document.createElement("canvas");if(l.width=o*a,l.height=i*a,t.bgcolor){const c=l.getContext("2d");c.fillStyle=t.bgcolor,c.fillRect(0,0,l.width,l.height)}return l}}let xi=null;function U6(e,t,n,r){const a=t.filter;if(e===xi||Zt.isHTMLScriptElement(e)||Zt.isHTMLStyleElement(e)||Zt.isHTMLLinkElement(e)||n!==null&&a&&!a(e))return Promise.resolve();return Promise.resolve(e).then(o).then(function(f){return l(f,i(e))}).then(function(f){return c(f,e)});function o(f){return Zt.isHTMLCanvasElement(f)?Zt.makeImage(f.toDataURL()):f.cloneNode(!1)}function i(f){return Zt.isElementHostForOpenShadowRoot(f)?f.shadowRoot:f}function l(f,p){const g=T(p);let y=Promise.resolve();if(g.length!==0){const S=rw(w(p));Zt.asArray(g).forEach(function(I){y=y.then(function(){return U6(I,t,S).then(function(M){M&&f.appendChild(M)})})})}return y.then(function(){return f});function w(S){return Zt.isShadowRoot(S)?S.host:S}function T(S){return Zt.isShadowSlotElement(S)?S.assignedNodes():S.childNodes}}function c(f,p){if(!Zt.isElement(f)||Zt.isShadowSlotElement(p))return Promise.resolve(f);return Promise.resolve().then(g).then(y).then(w).then(T).then(function(){return f});function g(){I(p,f);function S(M,N){N.font=M.font,N.fontFamily=M.fontFamily,N.fontFeatureSettings=M.fontFeatureSettings,N.fontKerning=M.fontKerning,N.fontSize=M.fontSize,N.fontStretch=M.fontStretch,N.fontStyle=M.fontStyle,N.fontVariant=M.fontVariant,N.fontVariantCaps=M.fontVariantCaps,N.fontVariantEastAsian=M.fontVariantEastAsian,N.fontVariantLigatures=M.fontVariantLigatures,N.fontVariantNumeric=M.fontVariantNumeric,N.fontVariationSettings=M.fontVariationSettings,N.fontWeight=M.fontWeight}function I(M,N){const _=rw(M);_.cssText?(N.style.cssText=_.cssText,S(_,N.style)):(bz(t,M,_,n,N),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(k=>N.style.removeProperty(k)),["left","right","top","bottom"].forEach(k=>{N.style.getPropertyValue(k)&&N.style.setProperty(k,"0px")})))}}function y(){const S=Zt.uid();[":before",":after"].forEach(function(M){I(M)});function I(M){const N=rw(p,M),_=N.getPropertyValue("content");if(_===""||_==="none")return;const k=f.getAttribute("class")||"";f.setAttribute("class",`${k} ${S}`);const R=document.createElement("style");R.appendChild(L()),f.appendChild(R);function L(){const H=`.${S}:${M}`,U=N.cssText?z():$();return document.createTextNode(`${H}{${U}}`);function z(){return`${N.cssText} content: ${_};`}function $(){return`${Zt.asArray(N).map(Q).join("; ")};`;function Q(se){const ue=N.getPropertyValue(se),fe=N.getPropertyPriority(se)?" !important":"";return`${se}: ${ue}${fe}`}}}}}function w(){Zt.isHTMLTextAreaElement(p)&&(f.innerHTML=p.value),Zt.isHTMLInputElement(p)&&f.setAttribute("value",p.value)}function T(){Zt.isSVGElement(f)&&(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),Zt.isSVGRectElement(f)&&["width","height"].forEach(function(S){const I=f.getAttribute(S);I&&f.style.setProperty(S,I)}))}}}function hz(e){return B6.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function pz(e){return H6.inlineAll(e).then(function(){return e})}function mz(){let e=0;return{escape:z,isDataUrl:M,canvasToBlob:k,resolveUrl:R,getAndEncode:U,uid:L,delay:$,asArray:X,escapeXhtml:Q,makeImage:H,width:se,height:ue,getWindow:t,isElement:o,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:a,isHTMLElement:l,isHTMLCanvasElement:i,isHTMLInputElement:f,isHTMLImageElement:c,isHTMLLinkElement:p,isHTMLScriptElement:g,isHTMLStyleElement:y,isHTMLTextAreaElement:w,isShadowSlotElement:T,isSVGElement:S,isSVGRectElement:I,isDimensionMissing:N};function t(Z){const pe=Z?Z.ownerDocument:void 0;return(pe?pe.defaultView:void 0)||global||window}function n(Z){return o(Z)&&Z.shadowRoot!==null}function r(Z){return Z instanceof t(Z).ShadowRoot}function a(Z){return Z!==null&&Object.prototype.hasOwnProperty.call(Z,"getRootNode")&&r(Z.getRootNode())}function o(Z){return Z instanceof t(Z).Element}function i(Z){return Z instanceof t(Z).HTMLCanvasElement}function l(Z){return Z instanceof t(Z).HTMLElement}function c(Z){return Z instanceof t(Z).HTMLImageElement}function f(Z){return Z instanceof t(Z).HTMLInputElement}function p(Z){return Z instanceof t(Z).HTMLLinkElement}function g(Z){return Z instanceof t(Z).HTMLScriptElement}function y(Z){return Z instanceof t(Z).HTMLStyleElement}function w(Z){return Z instanceof t(Z).HTMLTextAreaElement}function T(Z){return a(Z)&&Z instanceof t(Z).HTMLSlotElement}function S(Z){return Z instanceof t(Z).SVGElement}function I(Z){return Z instanceof t(Z).SVGRectElement}function M(Z){return Z.search(/^(data:)/)!==-1}function N(Z){return isNaN(Z)||Z<=0}function _(Z){return new Promise(function(pe){const ie=iz(Z.toDataURL().split(",")[1]),de=ie.length,K=new Uint8Array(de);for(let ae=0;ae<de;ae++)K[ae]=ie.charCodeAt(ae);pe(new Blob([K],{type:yn.impl.options.type}))})}function k(Z){return Z.toBlob?new Promise(function(pe){Z.toBlob(pe)}):_(Z)}function R(Z,pe){const ie=document.implementation.createHTMLDocument(),de=ie.createElement("base");ie.head.appendChild(de);const K=ie.createElement("a");return ie.body.appendChild(K),de.href=pe,K.href=Z,K.href}function L(){return`u${Z()}${e++}`;function Z(){return`0000${(Math.random()*Math.pow(36,4)<<0).toString(36)}`.slice(-4)}}function H(Z){return Z==="data:,"?Promise.resolve():new Promise(function(pe,ie){const de=new Image;yn.impl.options.useCredentials&&(de.crossOrigin="use-credentials"),de.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){pe(de)}):pe(de)},de.onerror=ie,de.src=Z})}function U(Z){let pe=yn.impl.urlCache.find(function(ie){return ie.url===Z});return pe||(pe={url:Z,promise:null},yn.impl.urlCache.push(pe)),pe.promise===null&&(yn.impl.options.cacheBust&&(Z+=(/\?/.test(Z)?"&":"?")+new Date().getTime()),yn.impl.options.requestUrl&&/^http/.test(Z)?pe.promise=yn.impl.options.requestUrl({url:Z,method:"GET"}).then(ie=>new Promise(de=>{const K=new FileReader;K.onload=function(ae){de(ae.target.result)},K.readAsDataURL(new Blob([ie.arrayBuffer],{type:ie.headers["content-type"]}))})).catch(ie=>(console.error("cannot fetch resource: "+Z+", error: "+ie),"")):pe.promise=new Promise(function(ie){const de=yn.impl.options.httpTimeout,K=new XMLHttpRequest;if(K.onreadystatechange=Se,K.ontimeout=je,K.responseType="blob",K.timeout=de,yn.impl.options.useCredentials&&(K.withCredentials=!0),yn.impl.options.corsImg&&Z.indexOf("http")===0&&Z.indexOf(window.location.origin)===-1){const Be=(yn.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";K.open(Be,(yn.impl.options.corsImg.url||"").replace("#{cors}",Z),!0);let Qe=!1;const Ze=yn.impl.options.corsImg.headers||{};Object.keys(Ze).forEach(function(xt){Ze[xt].indexOf("application/json")!==-1&&(Qe=!0),K.setRequestHeader(xt,Ze[xt])});const st=Re(yn.impl.options.corsImg.data||"");Object.keys(st).forEach(function(xt){typeof st[xt]=="string"&&(st[xt]=st[xt].replace("#{cors}",Z))}),K.send(Qe?JSON.stringify(st):st)}else K.open("GET",Z,!0),K.send();let ae;if(yn.impl.options.imagePlaceholder){const Be=yn.impl.options.imagePlaceholder.split(/,/);Be&&Be[1]&&(ae=Be[1])}function Se(){if(K.readyState!==4)return;if(K.status>=300){ae?ie(ae):Fe(`cannot fetch resource: ${Z}, status: ${K.status}`);return}const Be=new FileReader;Be.onloadend=function(){ie(Be.result)},Be.readAsDataURL(K.response)}function je(){ae?ie(ae):Fe(`timeout of ${de}ms occured while fetching resource: ${Z}`)}function Re(Be){try{return JSON.parse(JSON.stringify(Be))}catch{Fe("corsImg.data is missing or invalid");return}}function Fe(Be){console.error(Be),ie("")}})),pe.promise}function z(Z){return Z.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function $(Z){return function(pe){return new Promise(function(ie){setTimeout(function(){ie(pe)},Z)})}}function X(Z){const pe=[],ie=Z.length;for(let de=0;de<ie;de++)pe.push(Z[de]);return pe}function Q(Z){return Z.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")}function se(Z){const pe=fe(Z,"width");if(!isNaN(pe))return pe;const ie=fe(Z,"border-left-width"),de=fe(Z,"border-right-width");return Z.scrollWidth+ie+de}function ue(Z){const pe=fe(Z,"height");if(!isNaN(pe))return pe;const ie=fe(Z,"border-top-width"),de=fe(Z,"border-bottom-width");return Z.scrollHeight+ie+de}function fe(Z,pe){if(Z.nodeType===X2){let ie=rw(Z).getPropertyValue(pe);if(ie.slice(-2)==="px")return ie=ie.slice(0,-2),parseFloat(ie)}return NaN}}function gz(){const e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:a,shouldProcess:t,impl:{readUrls:n,inline:r}};function t(o){return o.search(e)!==-1}function n(o){const i=[];let l;for(;(l=e.exec(o))!==null;)i.push(l[1]);return i.filter(function(c){return!Zt.isDataUrl(c)})}function r(o,i,l,c){return Promise.resolve(i).then(function(p){return l?Zt.resolveUrl(p,l):p}).then(c||Zt.getAndEncode).then(function(p){return o.replace(f(i),`$1${p}$3`)});function f(p){return new RegExp(`(url\\(['"]?)(${Zt.escape(p)})(['"]?\\))`,"g")}}function a(o,i,l){if(c())return Promise.resolve(o);return Promise.resolve(o).then(n).then(function(f){let p=Promise.resolve(o);return f.forEach(function(g){p=p.then(function(y){return r(y,g,i,l)})}),p});function c(){return!t(o)}}}function vz(){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(Zt.asArray(document.styleSheets)).then(r).then(n).then(function(o){return o.map(a)});function n(o){return o.filter(function(i){return i.type===CSSRule.FONT_FACE_RULE}).filter(function(i){return Nw.shouldProcess(i.style.getPropertyValue("src"))})}function r(o){const i=[];return o.forEach(function(l){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(l),"cssRules"))try{Zt.asArray(l.cssRules||[]).forEach(i.push.bind(i))}catch(c){console.error(`domtoimage: Error while reading CSS rules from ${l.href}`,c.toString())}}),i}function a(o){return{resolve:function(){const l=(o.parentStyleSheet||{}).href;return Nw.inlineAll(o.cssText,l)},src:function(){return o.style.getPropertyValue("src")}}}}}function yz(){return{inlineAll:t,impl:{newImage:e}};function e(n){return{inline:r};function r(a){return Zt.isDataUrl(n.src)?Promise.resolve():Promise.resolve(n.src).then(a||Zt.getAndEncode).then(function(o){return new Promise(function(i){n.onload=i,n.onerror=i,n.src=o})})}}function t(n){if(!Zt.isElement(n))return Promise.resolve(n);return r(n).then(function(){return Zt.isHTMLImageElement(n)?e(n).inline():Promise.all(Zt.asArray(n.childNodes).map(function(a){return t(a)}))});function r(a){const i=["background","background-image"].map(function(l){const c=a.style.getPropertyValue(l),f=a.style.getPropertyPriority(l);return c?Nw.inlineAll(c).then(function(p){a.style.setProperty(l,p,f)}):Promise.resolve()});return Promise.all(i).then(function(){return a})}}}function wz(e,t,n,r){const a=["background-clip"].indexOf(t)>=0;r?(e.setProperty(t,n,r),a&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),a&&e.setProperty(`-webkit-${t}`,n))}function bz(e,t,n,r,a){const o=yn.impl.options.copyDefaultStyles?Dz(e,t):{},i=a.style;Zt.asArray(n).forEach(function(l){const c=n.getPropertyValue(l),f=o[l],p=r?r.getPropertyValue(l):void 0;if(c!==f||r&&c!==p){const g=n.getPropertyPriority(l);wz(i,l,c,g)}})}let T0=null,aw={};const Sz=["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 Dz(e,t){const n=l(t),r=c(n);if(aw[r])return aw[r];const a=Tz(),o=f(a.document,n),i=p(a,o);return g(o),aw[r]=i,i;function l(y){const w=[];do{if(y.nodeType===X2){const T=y.tagName;if(w.push(T),Sz.includes(T))break}y=y.parentNode}while(y);return w}function c(y){return e.styleCaching==="relaxed"?y.filter((w,T,S)=>T===0||T===S.length-1).join(">"):y.join(">")}function f(y,w){let T=y.body;do{const S=w.pop(),I=y.createElement(S);T.appendChild(I),T=I}while(w.length>0);return T.textContent="",T}function p(y,w){const T={},S=y.getComputedStyle(w);return Zt.asArray(S).forEach(function(I){T[I]=I==="width"||I==="height"?"auto":S.getPropertyValue(I)}),T}function g(y){do{const w=y.parentElement;w!==null&&w.removeChild(y),y=w}while(y&&y.tagName!=="BODY")}}function Tz(){if(xi)return xi.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`<!DOCTYPE ${r(t.name)} ${r(t.publicId)} ${r(t.systemId)}`.trim()+">":"";return xi=document.createElement("iframe"),xi.id="domtoimage-sandbox-"+Zt.uid(),xi.className="domtoimage-thino",xi.style.visibility="hidden",xi.style.position="fixed",document.body.appendChild(xi),a(xi,n,e,"domtoimage-sandbox");function r(o){if(o){const i=document.createElement("div");return i.innerText=o,i.innerHTML}else return""}function a(o,i,l,c){try{return o.contentWindow.document.write(`${i}<html><head><meta charset='${l}'><title>${c}</title></head><body></body></html>`),o.contentWindow}catch{}const f=document.createElement("meta");f.setAttribute("charset",l);try{const p=document.implementation.createHTMLDocument(c);p.head.appendChild(f);const g=i+p.documentElement.outerHTML;return o.setAttribute("srcdoc",g),o.contentWindow}catch{}return o.contentDocument.head.appendChild(f),o.contentDocument.title=c,o.contentWindow}}function Iz(){xi&&(document.body.removeChild(xi),xi=null),T0&&clearTimeout(T0),T0=setTimeout(()=>{T0=null,aw={}},20*1e3)}async function Ez(e,t,n){return await yn.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:t?2:1,requestUrl:C.requestUrl,type:n})}const Ib=async(e,t)=>(await Ez(e,!0,"image/jpeg")).toDataURL(),MC=async e=>{e.startsWith("http")&&(e=await yf(e));const t=e.split("base64,")[1],n=db(t,"image/png");await z6(n),new C.Notice(E("Send to clipboard successfully"))},xz=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const l=e.metadataCache.getFirstLinkpathDest(t,"");if(!l){new C.Notice(E("File not exist"));return}r=l.path}const a=await e.vault.adapter.readBinary(r),o=new Uint8Array(a),i=new Blob([o],{type:"image/png"});await z6(i)},z6=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},kC=1.1,NC=300,AC=20,Cz=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:a})=>{const o=P.useRef(null),[i,l]=P.useState(-1),c=Le.getState().dailyNotesState.app,[f,p]=P.useState(a),[g,y]=P.useState(t),w={close:P.useRef(null),previous:P.useRef(null),next:P.useRef(null),decrease:P.useRef(null),increase:P.useRef(null),zoom:P.useRef(null),copy:P.useRef(null)};P.useEffect(()=>{!n&&!t||(C.setIcon(w.close.current,"x"),w.previous.current&&C.setIcon(w.previous.current,"arrow-left"),w.next.current&&C.setIcon(w.next.current,"arrow-right"),C.setIcon(w.decrease.current,"zoom-out"),C.setIcon(w.increase.current,"zoom-in"),C.setIcon(w.zoom.current,"circle"),C.setIcon(w.copy.current,"clipboard"))},[w]),P.useEffect(()=>{ut.getImageSize(g).then(({width:L})=>{l(L!==0?40:0)})},[g]);const T=()=>{let L=f-1;L<0&&(L=r.length-1),p(L),y(r[L].src)},S=()=>{let L=f+1;L>=r.length&&(L=0),p(L),y(r[L].src)},I=()=>{e()},M=()=>{i>30&&l(i-10)},N=()=>{l(i+10)},_=L=>{L.target!==o.current&&L.target===o.current.parentElement&&I()},k=L=>{if(L.ctrlKey){L.preventDefault();const H=o.current,U=L.nativeEvent.offsetX,z=L.nativeEvent.offsetY,$=U/H.clientWidth,X=z/H.clientHeight;let Q;L.deltaY>0?Q=i/kC:Q=i*kC,Q>NC?Q=NC:Q<AC&&(Q=AC);const se=i;l(Q);const ue=L.currentTarget;ue.scrollLeft+=(Q-se)*$,ue.scrollTop+=(Q-se)*X}else L.deltaX!==0&&(L.currentTarget.scrollLeft+=L.deltaX)},R=async()=>{if(g&&!n)await MC(t);else if(n){const H=r[f].parentElement.getAttribute("src");if(!H){await MC(g);return}await xz(c,H)}};return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.close,className:"btn close-btn",onClick:I}),v.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:_,onWheel:k,children:[v.jsx("img",{className:i<=0?"hidden":"",ref:o,height:i+"%",src:g}),v.jsx("span",{className:"loading-text "+(i===-1?"":"hidden"),children:E("Image is loading...")}),v.jsx("span",{className:"loading-text "+(i===0?"":"hidden"),children:E("😟 Cannot load image, image link maybe broken")})]}),v.jsxs("div",{className:"action-btns-container",children:[r&&(r==null?void 0:r.length)>1&&v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.previous,className:"btn",onClick:T}),v.jsx("button",{ref:w.next,className:"btn",onClick:S})]}),v.jsx("button",{ref:w.decrease,className:"btn",onClick:M}),v.jsx("button",{ref:w.increase,className:"btn",onClick:N}),v.jsx("button",{ref:w.zoom,className:"btn",onClick:()=>l(80)}),v.jsx("button",{ref:w.copy,className:"btn",onClick:R})]})]})};function Eb({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){vb({className:"preview-image-dialog"},Cz,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}var Mz=class extends Error{constructor(e){super(`react-collapsed: ${e}`)}},Aw=(...e)=>(e[0],`${e[1]}`,void 0);function V6(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function kz(e,t,n){const[r,a]=P.useState(t),o=P.useRef(typeof e<"u"),i=o.current?e:r,l=V6(n),c=P.useCallback(f=>{const g=typeof f=="function"?f(i):f;o.current||a(g),l==null||l(g)},[l,i]);return P.useEffect(()=>{Aw(!(o.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."),Aw(!(!o.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,c]}var Nz="(prefers-reduced-motion: reduce)";function Az(){const[e,t]=P.useState(!1);return P.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(Nz);t(n.matches);const r=a=>{t(a.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 Fz=P7.useId||(()=>{});function Oz(){return Fz()??""}var Pz=typeof window<"u"?P.useLayoutEffect:P.useEffect,NS=!1,jz=0,FC=()=>++jz;function Lz(e){const t=e||(NS?FC():null),[n,r]=P.useState(t);return Pz(()=>{n===null&&r(FC())},[]),P.useEffect(()=>{NS===!1&&(NS=!0)},[]),n!=null?String(n):void 0}function Rz(e){const t=Oz(),n=Lz(e);return typeof e=="string"?e:typeof t=="string"?t:n}function _z(e,t){const n=performance.now(),r={};function a(){r.id=requestAnimationFrame(o=>{o-n>t?e():a()})}return a(),r}function OC(e){e.id&&cancelAnimationFrame(e.id)}function PC(e){return e!=null&&e.current?e.current.scrollHeight:(Aw(!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 Bz(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Hz(e,t){if(e!=null)if(typeof e=="function")e(t);else try{e.current=t}catch{throw new Mz(`Cannot assign value "${t}" to ref "${e}"`)}}function jC(...e){return e.every(t=>t==null)?null:t=>{e.forEach(n=>{Hz(n,t)})}}function Yz(e){let t=n=>{};t=n=>{if(!(n!=null&&n.current))return;const{paddingTop:r,paddingBottom:a}=window.getComputedStyle(n.current);Aw(!(r&&r!=="0px"||a&&a!=="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>`)},P.useEffect(()=>{t(e)},[e])}var Uz=typeof window>"u"?P.useEffect:P.useLayoutEffect;function zz({duration:e,easing:t="cubic-bezier(0.4, 0, 0.2, 1)",onTransitionStateChange:n=()=>{},isExpanded:r,defaultExpanded:a=!1,hasDisabledAnimation:o,id:i,...l}={}){const c=V6(n),f=Rz(i?`${i}`:void 0),[p,g]=kz(r,a),y=P.useRef(p),[w,T]=P.useState(!1),S=Az(),I=o??S,M=P.useRef(),N=P.useRef(),_=P.useRef(null),[k,R]=P.useState(null);Yz(_);const L=`${l.collapsedHeight||0}px`;function H(U){if(!_.current)return;const z=_.current;for(const $ in U){const X=U[$];X?z.style[$]=X:z.style.removeProperty($)}}return Uz(()=>{if(!_.current||p===y.current)return;y.current=p;function z(Q){return I?0:e??Bz(Q)}const $=Q=>`height ${z(Q)}ms ${t}`,X=Q=>{function se(){p?(H({height:"",overflow:"",transition:"",display:""}),c("expandEnd")):(H({transition:""}),c("collapseEnd")),T(!1)}N.current&&OC(N.current),N.current=_z(se,Q)};return T(!0),p?M.current=requestAnimationFrame(()=>{c("expandStart"),H({display:"block",overflow:"hidden",height:L}),M.current=requestAnimationFrame(()=>{c("expanding");const Q=PC(_);X(z(Q)),_.current&&(_.current.style.transition=$(Q),_.current.style.height=`${Q}px`)})}):M.current=requestAnimationFrame(()=>{c("collapseStart");const Q=PC(_);X(z(Q)),H({transition:$(Q),height:`${Q}px`}),M.current=requestAnimationFrame(()=>{c("collapsing"),H({height:L,overflow:"hidden"})})}),()=>{M.current&&cancelAnimationFrame(M.current),N.current&&OC(N.current)}},[p,L,I,e,t,c]),{isExpanded:p,setExpanded:g,getToggleProps(U){const{disabled:z,onClick:$,refKey:X,...Q}={refKey:"ref",onClick(){},disabled:!1,...U},se=k?k.tagName==="BUTTON":void 0,ue=U==null?void 0:U[X||"ref"],fe={id:`react-collapsed-toggle-${f}`,"aria-controls":`react-collapsed-panel-${f}`,"aria-expanded":p,onClick(ie){z||($==null||$(ie),g(de=>!de))},[X||"ref"]:jC(ue,R)},Z={type:"button",disabled:z?!0:void 0},pe={"aria-disabled":z?!0:void 0,role:"button",tabIndex:z?-1:0};return se===!1?{...fe,...pe,...Q}:se===!0?{...fe,...Z,...Q}:{...fe,...Z,...pe,...Q}},getCollapseProps(U){const{style:z,refKey:$}={refKey:"ref",style:{},...U},X=U==null?void 0:U[$||"ref"];return{id:`react-collapsed-panel-${f}`,"aria-hidden":!p,"aria-labelledby":`react-collapsed-toggle-${f}`,role:"region",...U,[$||"ref"]:jC(_,X),style:{boxSizing:"border-box",...!w&&!p?{display:L==="0px"?"none":"block",height:L,overflow:"hidden"}:{},...z}}}}}const Vz=e=>{const{dailyNotesState:{app:t,view:n,settings:r},globalState:{memoListView:a}}=P.useContext(Lt),{getCollapseProps:o,getToggleProps:i,isExpanded:l,setExpanded:c}=zz({defaultExpanded:!0,collapsedHeight:(r==null?void 0:r.ThinoCollapsedHeight)??100}),{memo:f,handleMemoContentClick:p,handleMemoDoubleClick:g}=e,y=ne.useRef(null),[w,T]=ne.useState(""),S=ne.useRef(w),I=ne.useRef(0),[M,N]=ne.useState(!1),[_,k]=ne.useState(!1),R=C.debounce((H,U,z)=>{for(const $ of H){const{height:X}=$.contentRect,Q=(U==null?void 0:U.ThinoMaxHeight)||340,se=X>Q;N(se),c(!se),z.disconnect()}},500);P.useEffect(()=>{var H;if(f.content!==S.current){if(r!=null&&r.OptimizeForCallout&&f.content.split("> [!").length>3&&f.content.split(`
`).length>10&&!_){const U=y.current.createEl("button");U.setText(E("Render content")),U.onclick=async()=>{k(!0),await L()};const z=y.current.createEl("textarea");z.setText(f.content),z.disabled=!0,(H=y.current)==null||H.toggleClass(["raw-content"],!0),c(!0),N(!1);return}L()}},[f.content]),P.useEffect(()=>{_&&I.current!==(r==null?void 0:r.ThinoMaxHeight)&&(y!=null&&y.current.hasChildNodes()&&k(!1),L())},[r==null?void 0:r.ThinoMaxHeight]),P.useEffect(()=>{if(!_)return;const H=y.current;if(!H)return;if(!(r!=null&&r.ThinoMaxHeight)){c(!0),N(!1);return}const U=new ResizeObserver(z=>{R(z,r,U)});return U.observe(H),()=>U.disconnect()},[_]);const L=async()=>{var H,U;y.current&&n&&t&&f.content!==S.current&&(y.current.empty(),await C.MarkdownRenderer.render(t,f.content,y.current,f.path,n),S.current=f.content,(H=y.current)==null||H.toggleClass(["markdown-rendered"],!0),(U=y.current)==null||U.toggleClass(["raw-content"],!1),k&&k(!0),I.current=(r==null?void 0:r.ThinoMaxHeight)||340)};return v.jsxs(v.Fragment,{children:[M&&a==="moments"&&v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")}),!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g})]}),v.jsx("div",{...o({style:{margin:0}}),ref:y,className:"memo-content-text",onClick:H=>p(H,f),onDoubleClick:g,onContextMenu:H=>{H.preventDefault()}}),M&&a!=="moments"&&v.jsxs(v.Fragment,{children:[!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g}),v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")})]})]})},W6=P.memo(Vz,(e,t)=>e.memo.content===t.memo.content),Wz=e=>{const[t,n]=P.useState({...e.memo,createdAtStr:ut.getDateTimeString(e.memo.createdAt)}),[r,a]=P.useState([]),[o,i]=P.useState([]);P.useEffect(()=>{(async()=>{try{const g=[],y=[...t.content.matchAll(nd)];for(const T of y)if(T&&T.length===3){const S=T[2],I=be.getMemoById(S);I&&g.push({...I,createdAtStr:ut.getDateTimeString(I.createdAt),dateStr:ut.getDateString(I.createdAt)})}a([...g]);const w=await be.getLinkedMemos(t.id);i(w.sort((T,S)=>ut.getTimeStampByDate(S.createdAt)-ut.getTimeStampByDate(T.createdAt)).map(T=>({...T,createdAtStr:ut.getDateTimeString(T.createdAt),dateStr:ut.getDateString(T.createdAt)})))}catch(g){console.error(g)}})()},[t.id]);const l=P.useCallback(async p=>{var y;const g=p.target;if(g.className==="memo-link-text"){const w=(y=g.dataset)==null?void 0:y.value,T=be.getMemoById(w??"");if(T){const S={...T,createdAtStr:ut.getDateTimeString(T.createdAt)};a([]),i([]),n(S)}else new C.Notice(E("Thino not found")),g.classList.remove("memo-link-text")}},[]),c=P.useCallback(p=>{a([]),i([]),n({...p,createdAtStr:ut.getDateTimeString(p.createdAt)})},[t.id]),f=P.useCallback(()=>{e.destroy(),dt.setEditMemoId(t.id)},[t.id]);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"memo-card-container",children:[v.jsxs("div",{className:"header-container",children:[v.jsx("span",{className:"time-text",children:t.createdAtStr}),v.jsxs("div",{className:"btns-container",children:[v.jsx("button",{ref:p=>{p&&C.setIcon(p,"edit")},className:"btn edit-btn",onClick:f}),v.jsx("button",{ref:p=>{p&&C.setIcon(p,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),v.jsx("div",{className:"memo-container",children:v.jsx("div",{className:"memo-content-text",children:v.jsx(W6,{memo:t,handleMemoContentClick:l,handleMemoDoubleClick:()=>{}})})}),v.jsx("div",{className:"layer-container"})]}),r.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[E("LINKED")," ",r.length," THINO"," "]}),r.map(p=>{const g=Tx(oT(p.content)).replaceAll(`
`," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(p),children:[v.jsxs("span",{className:"time-text",children:[p.dateStr," "]}),g]},p.id)})]}):null,o.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[o.length," THINO ",E("LINK TO THE")," THINO"]}),o.map(p=>{const g=Tx(oT(p.content)).replaceAll(`
`," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(p),children:[v.jsxs("span",{className:"time-text",children:[p.dateStr," "]}),g]},p.id)})]}):null]})};function Hp(e){vb({className:"memo-card-dialog"},Wz,{memo:e})}function $z({mouseEnterDelayMS:e=0,mouseLeaveDelayMS:t=0}={}){const[n,r]=P.useState(!1);let a,o;return[n,{onMouseEnter:()=>{clearTimeout(o),a=window.setTimeout(()=>r(!0),e)},onMouseLeave:()=>{clearTimeout(a),o=window.setTimeout(()=>r(!1),t)}}]}const Zz=e=>{const{memo:t,handlePinMemoClick:n,handleFixMemoClick:r,handleSourceMemoClick:a,handleShowMemoStoryDialog:o,handleCopyMemoClick:i,handleEditMemoClick:l,handleGenMemoImageBtnClick:c,handleMarkMemoClick:f,handleArchiveMemo:p,handleDeleteMemoClick:g,handleSplitMemoClick:y}=e,w=Le.getState().dailyNotesState.settings,T=w.EnabledLocationList.find(z=>z.value==="MULTI"),[S,I]=Jl(!1),M=P.useRef(null),N={pinRef:P.useRef(null),fixRef:P.useRef(null),typeRef:P.useRef(null),moreRef:P.useRef(null)},[_,k]=$z({mouseEnterDelayMS:500}),R=P.useRef();P.useEffect(()=>{if(!N.typeRef)return;const z=$g.find($=>$.title===t.sourceType);C.setIcon(N.typeRef.current,z.icon),C.requireApiVersion("1.4.4")&&C.setTooltip(N.typeRef.current,t.path),N.fixRef&&(C.setIcon(N.fixRef.current,"shield-alert"),C.requireApiVersion("1.4.4")&&C.setTooltip(N.fixRef.current,"Update Thino property"))},[N.typeRef]),P.useEffect(()=>{N.pinRef&&(t.pinned?(C.setIcon(N.pinRef.current,"pin-off"),C.requireApiVersion("1.4.4")&&C.setTooltip(N.pinRef.current,E("UNPIN"))):(C.setIcon(N.pinRef.current,"pin"),C.requireApiVersion("1.4.4")&&C.setTooltip(N.pinRef.current,E("PIN"))))},[N.pinRef,t.pinned]);const L=C.debounce(()=>{var z;if(_&&N.moreRef.current){if(R.current&&R.current._loaded||(z=R.current)!=null&&z.useNativeMenu||document.body.find(".more-action-btns-wrapper"))return;const $=H(),X=N.moreRef.current.getBoundingClientRect();$.showAtPosition({x:X.left,y:X.bottom})}},200);P.useEffect(()=>{L()},[_]);const H=()=>{var $;const z=new C.Menu;return z.dom.toggleClass(["more-action-btns-wrapper"],!0),z.useNativeMenu?(z.setNoIcon(),z.addItem(X=>{X.setTitle(E("COPY")).onClick(i)}),z.addItem(X=>{X.setTitle(E("EDIT")).onClick(l)}),z.addItem(X=>{X.setTitle(E("SHARE")).onClick(c)})):z.addItem(X=>{const Q=X.dom;X.dom.empty(),X.dom.toggleClass(["more-action-btn-group","more-action-menu-item"],!0);const se=Q.createEl("span");new C.ExtraButtonComponent(se).setIcon("copy"),se.toggleClass(["menu-item-icon","more-action-item-icon"],!0),se.onclick=Z=>{Z.stopPropagation(),Z.preventDefault(),i(),z.close()};const ue=Q.createEl("span");ue.toggleClass(["menu-item-icon","more-action-item-icon"],!0),ue.onclick=Z=>{Z.stopPropagation(),Z.preventDefault(),l(),z.close()},new C.ExtraButtonComponent(ue).setIcon("pencil");const fe=Q.createEl("span");fe.toggleClass(["menu-item-icon","more-action-item-icon"],!0),fe.onclick=Z=>{Z.stopPropagation(),Z.preventDefault(),c(),z.close()},new C.ExtraButtonComponent(fe).setIcon("share-2")}),z.addSeparator(),z.addItem(X=>{X.setIcon("book-open").setTitle(E("READ")).onClick(o)}),z.addItem(X=>{X.setIcon("bookmark").setTitle(E("MARK")).onClick(f)}),(($=/(^|\n)#{1,6}\s/g.exec(t.content))==null?void 0:$.length)>1&&T&&z.addItem(X=>{X.setIcon("separator-horizontal").setTitle(E("SPLIT")).onClick(y)}),z.addItem(X=>{X.setIcon("home").setTitle(E("SOURCE")).onClick(()=>a(t))}),z.addSeparator(),z.addItem(X=>{X.setWarning(!0).setIcon("archive").setTitle(E("ARCHIVE").toUpperCase()).onClick(()=>p(t))}),z.addItem(X=>{X.setWarning(!0).setIcon("trash").setTitle(w.DeleteThinoDirectly?E("DELETE"):E("TRASH BOX").toUpperCase().toUpperCase()).onClick(Q=>{if(z.useNativeMenu)g(Q),z.close();else if(Q.stopPropagation(),Q.preventDefault(),!S){I(!0),X.setTitle(E("CONFIRM")).onClick(se=>{g(se),z.close()});return}})}),z.addSeparator(),z.addItem(X=>{X.setDisabled(!0).setTitle(ut.getWordCount(t.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${E("words")}`)}),z.onHide(()=>{I(!1)}),R.current=z,z},U=z=>{H().showAtMouseEvent(z.nativeEvent)};return v.jsx("div",{ref:M,className:"memo-top-right-wrapper",children:v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N.fixRef,className:`btn ${t.sourceType!=="MULTI"||t.id!==""?"hidden":""} fix-memo-btn`,onClick:()=>r(t)}),v.jsx("span",{ref:N.typeRef,className:`btn ${t.sourceType==="DAILY"?"hidden":""} source-type-btn`,onClick:()=>a(t)}),v.jsx("span",{ref:N.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:n}),v.jsx("span",{...k,ref:z=>{N.moreRef.current=z,z&&C.setIcon(z,"more-horizontal")},onClick:U,className:"btn more-action-btn"})]})})},qz=e=>{var o;const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:a}=e;return v.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,v.jsx("span",{title:t.createdAt,className:"time-text",onClick:r,children:t.createdAt}),v.jsx("div",{className:`btn memo-type-img ${a!=null&&a.ShowTaskLabel?"":"hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&v.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":(o=t.thinoType)==null?void 0:o.slice(5)})})]})};class Gz extends C.SuggestModal{constructor(t,n){super(t),this.thino=n}sanitisedFileName(t){const n=JL;return t.replace(n,"").trim().slice(0,255)}ensureUniqueFileNames(t){const n=[];return t.map(a=>{const o=this.sanitisedFileName(a[0]),i=n.filter(l=>l==o);return n.push(o),i.length>=1?`${o}${i.length+1}`:o})}contentSplitByHeading(t,n){const r=t.split(`
`),a=new Array(n).join("#")+" ",o=new Array(n+1).join("#")+" ",i=[];let l=[];return r.forEach((c,f)=>{c.startsWith(o)?(l.length>0&&(i.push(l),l=[]),l.push(c)):l.length>0&&!c.startsWith(a)?l.push(c):l.length>0&&(i.push(l),l=[]),f===r.length-1&&l.length>0&&i.push(l)}),i}onChooseSuggestion(t,n){this.selectSuggestion(t,n)}renderSuggestion(t,n){n.setText(t.title)}getSuggestions(){return[{id:"splitByHeading1",title:E("Split by Heading 1")},{id:"splitByHeading2",title:E("Split by Heading 2")},{id:"splitByHeading3",title:E("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 C.Notice("No headings found"),this.close();return}const a=this.ensureUniqueFileNames(r);for(const l of r){const c=r.indexOf(l),f=await be.createThino({content:l.join(`
`),name:a[c],type:"MULTI",isList:!0});be.pushMemo(f)}let o=this.thino.content;r.forEach((l,c)=>{o=o.replace(l.join(`
`),`[[${a[c]}]]`)});const i=await be.updateMemo(this.thino.id,o);i&&be.editMemo(i),this.close()}}const Jz=async(e,t,n)=>{const r=n.getAttribute("href"),a=n.className;if(a.contains("tag"))Kz(n.innerText.slice(1));else if(a.contains("internal-link")){const o=n.getAttribute("data-href"),i=be.getMemoById(o??"");i?Hp(i):await e.workspace.openLinkText(o,o,!C.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},Kz=e=>{const t=ot.getState().query.tag;ot.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},Qz=(e,t)=>{const n=t==null?void 0:t.getAttribute("src"),r=t==null?void 0:t.parentElement.getAttribute("src"),a=[...(e==null?void 0:e.querySelectorAll("img"))||[]],o=a.indexOf(t);Eb({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:a,currentIndex:o})},Xz=e=>{var r;const t=(r=e.dataset)==null?void 0:r.value,n=be.getMemoById(t??"");n?Hp(n):(new C.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},eV=async(e,t,n,r)=>{var l;const a=e!=null&&e.AppendDateWhenTaskDone?" ✅ "+C.moment().format("YYYY-MM-DD"):"",o=((l=r.parentElement.dataset)==null?void 0:l.task)==="x"?"DONE":"TODO",i=[...(n==null?void 0:n.querySelectorAll("li.task-list-item"))||[]];for(const c of i)if(c===r||c===r.closest("li.task-list-item")){const f=i.indexOf(c),p=t.content.split(/\n/),g=[];for(let M=0;M<p.length;M++)/^\s*(-|\*|\d+\.)\s\[.\]\s/.test(p[M])&&g.push(M);const y=g[f],w=p[y],T=w.match(/^\s*(-|\*|\d+\.)\s\[.\]\s/)[0];let S=w.replace(/^\s*(-|\*|\d+\.)\s\[.\]\s/,T.replace(/\[.\]/,o==="TODO"?"[x]":"[ ]"))+(o==="TODO"?a:"");e.AppendDateWhenTaskDone&&o!=="TODO"&&(S=S.replace(/ ✅ \d{4}-\d{2}-\d{2}/g,"")),p[y]=S;const I=p.join(`
`).trim();if(t&&t.content!==I){const M=await be.updateMemo(t.id,I);be.editMemo(M)}}},tV=e=>{const{globalState:{editMemoId:t},dailyNotesState:{app:n,view:r,settings:a,verifyState:o},locationState:{pathname:i}}=P.useContext(Lt),{memo:l,type:c="inline"}=e,f=P.useRef(null),p=P.useRef(null),[g,y]=P.useState(!1);P.useEffect(()=>{g&&setTimeout(()=>{dt.setEditMemoId(l.id)},100)},[g]),P.useEffect(()=>{(i==="/review"||i==="/daily")&&t!==l.id&&g&&y(!1)},[t]);const w=Z=>{if(Z.ctrlKey||Z.metaKey){const pe=C.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss");ot.setFromAndToQuery(pe.startOf("day").valueOf(),pe.endOf("day").valueOf());return}Hp(l)},T=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"){const Z=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");Z&&Z.trigger("click")}dt.setMarkMemoId(l.id)},S=async()=>{var ie;const Z=!C.Platform.isDesktop&&await((ie=window.Capacitor)==null?void 0:ie.Plugins.Device.getId()),pe=C.Platform.isDesktop?await cr():Z.identifier||Z.uuid;if(!o||(o==null?void 0:o.appId)!==pe){Sn();return}l.pinned?await be.unpinMemoById(l.id):await be.pinMemoById(l.id)},I=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"&&C.Platform.isMobile){const Z=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");Z&&Z.trigger("click")}(i==="/review"||i==="/daily")&&y(!0),i!=="/review"&&i!=="/daily"&&dt.setEditMemoId(l.id)},M=async Z=>{Z.sourceType==="MULTI"&&Z.id.trim()===""&&await be.updateMemoProperty(Z)},N=async Z=>{await be.openThinoByID(Z.id)},_=async Z=>{try{const pe=await be.archiveMemo(Z);pe&&be.editMemo(pe)}catch(pe){console.error(pe),new C.Notice(pe.message)}},k=async()=>{try{if(a.DeleteThinoDirectly)await be.deleteMemoById(l.id);else{const Z=await be.hideMemoById(l.id);Z&&be.editMemo(Z)}}catch(Z){new C.Notice(Z.message)}dt.getState().editMemoId===l.id&&dt.setEditMemoId("")},R=()=>{if(p.current&&!p.current.confirmStatus){p.current&&p.current.toggleConfirm(!1);return}},L=()=>{of(l)},H=async()=>{const Z=await be.updateMemo(l.id,l.content,l.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");Z&&be.editMemo(Z)},U=async()=>{navigator.clipboard.writeText(l.content).then(()=>{new C.Notice(E("COPY SUCCEED"))}).catch(()=>{new C.Notice(E("COPY FAILED"))})},z=async()=>{new Gz(n,l).open()},$=Z=>{Z&&Z.target.tagName!=="INPUT"&&I()},X=async(Z,pe)=>{Z.preventDefault(),Z.stopPropagation();const ie=Z.target;if(Z.ctrlKey||Z.metaKey){await N(pe);return}if(ie.tagName==="A"){await Jz(n,r,ie);return}if(ie.tagName==="IMG"){Qz(f.current,ie);return}if(ie.tagName==="A"&&ie.getAttribute("href")){const de=ie.getAttribute("href");window.open(de,"_blank");return}if(ie.className==="memo-link-text"){Xz(ie);return}if(ie.tagName==="INPUT"&&ie.hasClass("task-list-item-checkbox")){await eV(a,pe,f.current,ie);return}},Q=Z=>{const pe=new C.Menu;pe.dom.toggleClass("memo-context-menu",!0);const ie=window.getSelection();(ie==null?void 0:ie.toString().length)>0&&pe.addItem(de=>{de.setIcon("copy").setTitle(E("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(ie.toString()).then(()=>{new C.Notice(E("COPY SUCCEED"))}).catch(()=>{new C.Notice(E("COPY FAILED"))})})}).addSeparator(),pe.addItem(de=>{de.setIcon("copy").setTitle(E("Copy thino").toLocaleUpperCase()).onClick(async()=>{await U(),pe.close()})}).addItem(de=>{de.setIcon("book-open").setTitle(E("READ")).onClick(w)}).addItem(de=>{de.setIcon(l.pinned?"pin-off":"pin").setTitle(l.pinned?E("UNPIN"):E("PIN")).onClick(S)}).addItem(de=>{de.setIcon("bookmark").setTitle(E("MARK")).onClick(T)}).addItem(de=>{de.setIcon("share-2").setTitle(E("SHARE")).onClick(L)}).addItem(de=>{de.setIcon("pencil").setTitle(E("EDIT")).onClick(I)}).addItem(de=>{de.setIcon("home").setTitle(E("SOURCE")).onClick(()=>N(l))}).addSeparator().addItem(de=>{de.setIcon("archive").setTitle(E("ARCHIVE").toLocaleUpperCase()).onClick(()=>_(l))}).addItem(de=>{de.setIcon("trash").setTitle(E("DELETE")).onClick(async()=>{await k()})}),pe.showAtMouseEvent(Z.nativeEvent)},se=P.useMemo(()=>({memo:l,handlePinMemoClick:S,handleFixMemoClick:M,handleSourceMemoClick:N,handleArchiveMemo:_,handleDeleteMemoClick:k,handleGenMemoImageBtnClick:L,handleMarkMemoClick:T,handleEditMemoClick:I,handleCopyMemoClick:U,handleShowMemoStoryDialog:w,handleSplitMemoClick:z}),[l]),ue=P.useMemo(()=>({memo:l,handleMemoTypeToggle:H,handleShowMemoStoryDialog:w,settings:a}),[l,a]),fe=P.useMemo(()=>v.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:Z=>{Z.shiftKey&&(Z.stopPropagation(),n.workspace.trigger("hover-link",{event:Z,source:"thino",hoverParent:r.containerEl,targetEl:f.current,linktext:l.path,sourcePath:l.path,state:{scroll:l.sourceType==="DAILY"?parseInt(l.id.slice(14)):0}}))},onContextMenu:Q,children:[g&&v.jsx(ff,{editorType:"inline"}),!g&&v.jsxs(v.Fragment,{children:[c==="inline"&&v.jsxs("div",{className:"memo-top-wrapper",draggable:!0,onDragStart:Z=>{Z.target.classList.add("dragging"),Z.dataTransfer.setDragImage(f.current,0,0),Z.dataTransfer.setData("text/plain",l.content)},onDragEnd:Z=>{Z.target.classList.remove("dragging")},children:[v.jsx(qz,{...ue}),v.jsx(Zz,{...se})]}),v.jsx(W6,{memo:l,handleMemoContentClick:X,handleMemoDoubleClick:$})]})]}),[l,g]);return v.jsx(v.Fragment,{children:fe})},ai=P.memo(tV,(e,t)=>Sw.isEqual(e.memo,t.memo));class rt extends C.Setting{constructor(n,r){super(n);De(this,"settingTab");De(this,"name","");De(this,"desc","");this.settingTab=r}setName(n){return super.setName(n),this.name=n,this}setDesc(n){return super.setDesc(n),this.desc=n,this}setTab(n){const r=typeof this.name=="string"?this.name:this.name.textContent||"",a=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(n,this.settingEl,r,a),this}}class nV extends C.Modal{constructor(n,r,a,o,i){super(n);De(this,"plugin");De(this,"settingTab");De(this,"target",5);De(this,"cb");this.app=n,this.settingTab=r,this.plugin=a,this.target=o,this.cb=i}onOpen(){var l;const{contentEl:n}=this;(l=n.parentElement)==null||l.classList.add("memo-save-location-modal"),n.createEl("h3",{text:E("Thino Daily Target")});const r=n.createDiv("modal-setting");new rt(r,this.settingTab).setName(E("Target Thino Count")).addSlider(c=>{c.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async f=>{this.target=f})});const a=n.createDiv("button-group"),o=a.createEl("button",{text:E("Cancel")}),i=a.createEl("button",{text:E("Save")});i.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:n}=this;n.empty()}}const rV=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:a,settings:o},globalState:{manifest:i}}=P.useContext(Lt),[l,c]=P.useState(),[f,p]=P.useState(5),[g,y]=P.useState(0),[w,T]=P.useState(0),[S,I]=P.useState(o.HeatmapColorScheme||"default"),M=P.useRef(null),N=P.useRef(null);P.useEffect(()=>{o.HeatmapColorScheme&&I(o.HeatmapColorScheme)},[o.HeatmapColorScheme]),P.useEffect(()=>{let k,R=5;i&&a&&(k=a==null?void 0:a.plugins.getPlugin(i.id),R=k==null?void 0:k.settings.MemoDailyTarget,c(k)),p(R)},[i,a]),P.useEffect(()=>{const k=e.find(H=>H.timestamp===t),R=k?k.count:0;T(R);const L=Math.min(100,R/f*100);y(L)},[e,f]),P.useEffect(()=>{C.requireApiVersion("1.4.4")&&(C.setTooltip(N.current,g.toFixed(2)+"%"),C.setTooltip(M.current,E("Set daily target")+` (${w}/${f})`))},[g,w]),P.useEffect(()=>{M.current&&(M.current.hasChildNodes()||C.setIcon(M.current,"crosshair"),C.requireApiVersion("1.4.4")&&C.setTooltip(N.current,g+"%"))},[M,f]);const _=P.useCallback(()=>{if(!l)return;new nV(a,l==null?void 0:l.settingTab,l,f,R=>{p(R)}).open()},[l,f]);return v.jsx(v.Fragment,{children:v.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${S}`,children:[v.jsx("div",{ref:N,className:"daily-progress-bar",children:v.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${g}%`}})}),v.jsx("div",{ref:M,className:"daily-progress-target",onClick:_}),v.jsx("div",{ref:k=>{k&&C.setIcon(k,n==="basic"?"layout-grid":"calendar"),k&&C.setTooltip&&C.setTooltip(k,E("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},aV=(e,t)=>{const n=[],r=Math.floor((e-t)/ei);for(let a=0;a<=r;a++)n.push({timestamp:t+ei*a,count:0,list:0});return n},oV=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:a,handleDateItemClick:o,handleMonthChange:i,dailyStat:l}=e,c=C.moment().startOf("day").valueOf(),[f,p]=P.useState(Qh(r)),[g,y]=P.useState(null),[w,T]=P.useState(e.dailyStat);P.useEffect(()=>{p(Qh(r));const k=aV(sV(r),Qh(r)),R=e.thinos.filter(L=>!L.deletedAt&&L.rowStatus!=="ARCHIVED");for(const L of R){const U=C.moment(L.createdAt,"YYYY/MM/DD HH:mm:ss").startOf("day").diff(C.moment(f).startOf("day"),"days");U>=0&&U<k.length&&(k[U].count+=1,L.thinoType==="JOURNAL"&&(k[U].list+=1))}T(k)},[r,e.thinos]);const S=new Date(f),I=S.getDay(),M=[];for(let k=0;k<I;k++)M.push({date:0,datestamp:S.getTime()-ei*(7-k)});const N=iV(f);for(let k=1;k<=N;k++)M.push({date:k,datestamp:S.getTime()+ei*(k-1)});const _=k=>{const R=S.getFullYear(),L=S.getMonth()+1;let H=0;L===1&&k===-1?H=new Date(`${R-1}/12/1`).getTime():L===12&&k===1?H=new Date(`${R+1}/1/1`).getTime():H=new Date(`${R}/${L+k}/1`).getTime(),p(Qh(H)),i&&i(H)};return v.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:k=>{k&&C.setIcon(k,"chevron-left")},className:"btn btn-text",onClick:()=>_(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(g6,{year:S.getFullYear().toString(),handleYearChange:k=>{p(Qh(new Date(`${k}/${S.getMonth()+1}/1`).getTime()))}}),v.jsx(v6,{month:S.getMonth().toString(),handleMonthChange:k=>{p(Qh(new Date(`${S.getFullYear()}/${parseInt(k)}/1`).getTime()))}})]}),v.jsx("span",{ref:k=>{k&&C.setIcon(k,"chevron-right")},className:"btn btn-text",onClick:()=>_(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(k=>v.jsx("span",{className:"day-item",children:k},k))}),v.jsx("div",{className:"date-picker-day-content",children:M.map(k=>{if(k.date===0)return v.jsx("span",{className:"day-item null",children:""},k.datestamp);const R=w.find(U=>U.timestamp===k.datestamp)||{count:0,timestamp:k.datestamp,list:0},L=R.count-R.list,H=R.list;return v.jsxs("span",{className:`day-item ${k.datestamp===c?"current":""} ${k.datestamp===g?"selected":""} ${AS(R.count)}`,onClick:U=>{a(r,U.nativeEvent),y(k.datestamp===g?null:k.datestamp),o&&o(U,R)},onMouseOver:U=>{if(!R||!R.count)return;const z=new C.HoverPopover(n,U.currentTarget,100);$6(z,{d:k,list:H,task:L})},children:[v.jsx("span",{className:"day-item-text",children:k.date}),v.jsx(v.Fragment,{children:R&&R.count!==0&&v.jsxs("span",{className:"day-item-dots",children:[L>0&&v.jsx("div",{className:`day-item-dot thino-task-dot ${AS(L)}`}),H>0&&v.jsx("div",{className:`day-item-dot thino-list-dot ${AS(H)}`})]})})]},k.datestamp)})})]})]})};function $6(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const a=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});a.createDiv({cls:"thino-date-item",text:`${C.moment(t.datestamp).format("YYYY-MM-DD")}`});const o=a.createDiv({cls:"thino-task-item"});o.createSpan({cls:"thino-task-item-title-text",text:`${E("Task")}: `}),o.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const i=a.createDiv({cls:"thino-list-item"});i.createSpan({cls:"thino-list-item-title-text",text:`${E("List")}: `}),i.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function iV(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())/ei}function Qh(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function sV(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()-ei}function AS(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 LC={width:12,height:7},RC=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:t+ei*r,count:0,list:0});return n},Qg=({initThinos:e,basicType:t})=>{const n=parseInt(C.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(C.moment().startOf("day").format("x")),a=new Array(6-new Date(n).getDay()).fill(0),o=LC.width*LC.height,i=parseInt(C.moment().startOf("day").subtract(o,"days").format("x")),l=C.moment().startOf("day").subtract(o,"days"),{memoState:{memos:c},dailyNotesState:{view:f,app:p,settings:g,verifyState:y}}=P.useContext(Lt),[w,T]=Co(t||uV(p||window.app)||"heatmap"),[S,I]=Co(C.moment().startOf("day").valueOf()),[M,N]=Co(g.HeatmapColorScheme||"default"),[_,k]=Co(RC(o,i)),[R,L]=Co(null),[H,U,z]=Co(""),$=P.useRef(null);P.useEffect(()=>{const fe=RC(o,i),Z=(e||c).filter(pe=>!pe.deletedAt&&pe.rowStatus!=="ARCHIVED");for(const pe of Z){const de=C.moment(pe.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(l,"days");de>=0&&de<fe.length&&(fe[de].count+=1,pe.thinoType==="JOURNAL"&&(fe[de].list+=1))}k([...fe])},[c,e]),P.useEffect(()=>{g.HeatmapColorScheme&&N(g.HeatmapColorScheme)},[g.HeatmapColorScheme]);const X=P.useCallback((fe,Z)=>{if(!Z||!Z.count)return;const pe=Z.count-Z.list,ie=Z.list,de={date:Z.timestamp,datestamp:Z.timestamp},K=new C.HoverPopover(f,fe.currentTarget,100);$6(K,{d:de,list:ie,task:pe})},[]),Q=()=>{T(w==="heatmap"?"basic":"heatmap"),lV(p,w==="heatmap"?"basic":"heatmap"),I(C.moment().startOf("day").valueOf())},se=P.useCallback(async(fe,Z)=>{if(Z.count===0)return;const pe=ot.getState().query.duration,ie=pe==null?void 0:pe.from,de=pe==null?void 0:pe.to,K=C.moment(ie).diff(de,"day")==0;if(ie===Z.timestamp&&K)ot.setFromAndToQuery(0,0),L(null),U(null);else if(ie!==Z.timestamp&&ie>0&&fe.shiftKey){const ae=C.moment(Z.timestamp).endOf("day").diff(de,"day");ie===0&&fe.shiftKey?U("from"):ae<0&&K&&U("to"),C.moment(ie).isBefore(Z.timestamp)?z.current==="to"?ae<0?ot.setFromAndToQuery(Z.timestamp,de):(ot.setFromAndToQuery(parseInt(C.moment(de).startOf("day").format("x")),parseInt(C.moment(Z.timestamp).endOf("day").format("x"))),U("from")):z.current==="from"&&(ae<0,ot.setFromAndToQuery(ie,parseInt(C.moment(Z.timestamp).endOf("day").format("x")))):z.current==="to"?ot.setFromAndToQuery(Z.timestamp,de):z.current==="from"&&(ot.setFromAndToQuery(Z.timestamp,parseInt(C.moment(ie).endOf("day").format("x"))),U("to"))}else if(ie===0&&fe.shiftKey)ot.setFromAndToQuery(Z.timestamp,parseInt(C.moment().endOf("day").format("x")));else if(Z.count>0&&(fe.ctrlKey||fe.metaKey)){const{app:ae,dailyNotes:Se}=ft.getState(),je=ub(C.moment(Z.timestamp),Se);if(!C.Platform.isMobile)await ae.workspace.getLeaf(!0).openFile(je);else{let Re=ae.workspace.activeLeaf;Re===null&&(Re=ae.workspace.getLeaf(!0)),Re.openFile(je)}}else Z.count>0&&!fe.shiftKey&&!fe.ctrlKey&&!fe.metaKey&&(["/","/recycle"].includes(ot.getState().pathname)||ot.setPathname("/"),ot.setFromAndToQuery(Z.timestamp,ut.getTimeStampByDate(C.moment(Z.timestamp+ei).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),L(Z))},[]),ue=P.useMemo(()=>v.jsx(oV,{className:`heatmap-${M}`,view:f,datestamp:S,dailyStat:_,thinos:e||c,handleMonthChange:fe=>{I(fe)},handleDateStampChange:fe=>{},handleDateItemClick:(fe,Z)=>se(fe,Z)}),[JSON.stringify(_),e,c,f,S,M]);return v.jsxs(v.Fragment,{children:[w==="basic"&&ue,w==="heatmap"&&v.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${M}`,ref:$,children:[v.jsxs("div",{className:"day-tip-text-container",children:[v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[0]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[2]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[4]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[6]})]}),v.jsxs("div",{className:"usage-heat-map",children:[_.slice(_.length-84+a.length,_.length).map((fe,Z)=>{const pe=fe.count,ie=pe<=0?"":pe<=1?"stat-day-L1-bg":pe<=2?"stat-day-L2-bg":pe<=4?"stat-day-L3-bg":"stat-day-L4-bg";return v.jsx("span",{"data-timestamp":fe.timestamp,"data-count":fe.count,"data-list-count":fe.list,"data-task-count":fe.count-fe.list,className:`stat-container ${ie} ${R===fe?"current":""} ${r===fe.timestamp?"today":""}`,onMouseOver:de=>X(de,fe),onClick:de=>se(de,fe)},Z)}),a.map((fe,Z)=>v.jsx("span",{className:"stat-container null"},Z))]})]}),!t&&v.jsx(rV,{allStat:_,todayTimeStamp:r,calendarType:w,handleCalendarTypeChange:Q})]})};function lV(e,t){try{e==null||e.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function uV(e){try{return(e==null?void 0:e.loadLocalStorage("calendarType"))||"heatmap"}catch(t){return console.error(t),"heatmap"}}const Z6=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=P.useContext(Lt),[r,a]=P.useState([]),o=ne.useRef(null);return P.useEffect(()=>{if(e==="daily"){if(t){const l=n.filter(c=>C.moment(c.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));a(l);return}const i=n.filter(l=>C.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(),"day"));a(i)}else if(e==="latest"){const i=n.filter(f=>!f.deletedAt&&f.rowStatus!=="ARCHIVED"),l=i.filter(f=>f.pinned),c=i.filter(f=>!f.pinned).slice(0,5);a([...l,...c])}},[n]),P.useEffect(()=>{o.current&&(o.current.scrollTop=0)},[n]),r.length>0?v.jsx("div",{ref:o,className:"thino-list-container",children:r.map(i=>v.jsx(ai,{memo:i}))}):v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})})},cV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(dV,{plugin:t})})}))},dV=({plugin:e})=>v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-error-code-block",children:E("Please open thino first")}),v.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:E("Open thino in center window")})]}),fV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(hV,{yaml:t})})}))},hV=({yaml:e})=>{const t=Object.keys(e).filter(a=>e[a]),n=e.daily?e.daily:"",r=a=>{switch(a){case"editor":return _C;case"heatmap":return mV;case"calendar":return gV;case"daily":return yV;case"list":return wV;case"status":return vV;default:return _C}};return v.jsx(v.Fragment,{children:t.map(a=>v.jsx("div",{"data-embed-type":a,className:ar("thino-embed-container",a==="editor"?"thino-editor-modal":""),children:a==="daily"?r(a)(n):r(a)()}))})};function _C(){return v.jsx(ff,{editorType:"inline",modal:!0})}function pV(e,t,n){try{const r=rs.createRoot(e);return r.render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(ff,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function mV(){return v.jsx(Qg,{basicType:"heatmap"})}function gV(){return v.jsx(Qg,{basicType:"basic"})}function vV(){return v.jsx(V2,{statusType:"banner"})}function yV(e){return v.jsx(Z6,{type:"daily",timestamp:e})}function wV(){return v.jsx(Z6,{type:"latest"})}class q6 extends C.Modal{constructor(n){super(n);De(this,"root")}getViewType(){return"thino_view"}onOpen(){const{contentEl:n,modalEl:r}=this;try{this.root=pV(n,this.close.bind(this),this),r.toggleClass("thino-editor-modal",!0),setTimeout(()=>{var a;(a=n.querySelector("textarea"))==null||a.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(a){console.error(a)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function bV(e,t){if(e==null)return{};var n=SV(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SV(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Fw(){return Fw=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},Fw.apply(this,arguments)}function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BC(Object(n),!0).forEach(function(r){DV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const TV={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},FS=2;class Ow extends ne.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)||FS,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)||FS});let r=1/0,a=n.default||FS;for(let o in n){const i=parseInt(o);i>0&&t<=i&&i<r&&(r=i,a=n[o])}a=Math.max(1,parseInt(a)||1),this.state.columnCount!==a&&this.setState({columnCount:a})}itemsInColumns(){const t=this.state.columnCount,n=new Array(t),r=ne.Children.toArray(this.props.children);for(let a=0;a<r.length;a++){const o=a%t;n[o]||(n[o]=[]),n[o].push(r[a])}return n}renderColumns(){const{column:t,columnAttrs:n={},columnClassName:r}=this.props,a=this.itemsInColumns(),o=`${100/a.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 l=wg(wg(wg({},t),n),{},{style:wg(wg({},n.style),{},{width:o}),className:i});return a.map((c,f)=>ne.createElement("div",Fw({},l,{key:f}),c))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:a,columnAttrs:o,column:i,className:l}=t,c=bV(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let f=l;return typeof l!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof l>"u"&&(f="my-masonry-grid")),ne.createElement("div",Fw({},c,{className:f}),this.renderColumns())}}Ow.defaultProps=TV;const DT=e=>{P.useContext(Lt);const t=Le.getState().dailyNotesState.settings,{thinos:n,dayMark:r,dayMarkRange:a="day",thinoWrapper:o}=e,[i,l]=ne.useState(!(t!=null&&t.hidePinnedGroup&&r==="PINNED")),c=ne.useRef(null);P.useEffect(()=>{c&&C.setTooltip&&C.setTooltip(c.current,E("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[c]);const f=p=>{if(C.Keymap.isModifier(p.nativeEvent,"Mod")){const g={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},y=C.moment(r,g[a]);ot.setFromAndToQuery(y.startOf(a).valueOf(),y.endOf(a).valueOf());return}l(!i)};return v.jsx(v.Fragment,{children:e.type==="list"?v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"} PINNED`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),i&&n.map((p,g)=>o?v.jsx("div",{children:o({thino:p})},`${p.id}-${C.moment(p.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:p},`${p.id}-${C.moment(p.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"}`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),v.jsx(Ow,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:i&&n.map((p,g)=>o?v.jsx("div",{children:o({thino:p})},`${p.id}-${C.moment(p.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:p},`${p.id}-${C.moment(p.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))})]})})};function Uu(e){"@babel/helpers - typeof";return Uu=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},Uu(e)}function IV(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G6(e){var t=IV(e,"string");return Uu(t)=="symbol"?t:String(t)}function af(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 HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?HC(Object(n),!0).forEach(function(r){af(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xb(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ql(e,t){if(e==null)return{};var n=xb(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YC(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 ka(e,t,n){return t&&YC(e.prototype,t),n&&YC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pw(e){return Pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pw(e)}function J6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J6=function(){return!!e})()}function K6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EV(e,t){if(t&&(Uu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K6(e)}function No(e,t,n){return t=Pw(t),EV(e,J6()?Reflect.construct(t,n||[],Pw(e).constructor):t.apply(e,n))}function jw(e,t){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},jw(e,t)}function Ao(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&&jw(e,t)}function Q6(e){if(Array.isArray(e))return e}function xV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,i,l=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(p){f=!0,a=p}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(f)throw a}}return l}}function TT(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 eI(e,t){if(e){if(typeof e=="string")return TT(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 TT(e,t)}}function X6(){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 ju(e,t){return Q6(e)||xV(e,t)||eI(e,t)||X6()}function Pr(){return Pr=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},Pr.apply(this,arguments)}var CV=function(e,t,n,r,a,o,i,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,a,o,i,l],p=0;c=new Error(t.replace(/%s/g,function(){return f[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},MV=CV;const Xg=qt(MV);var kV=function(){};function NV(e,t){var n={};return Object.keys(e).forEach(function(r){n[ow(r)]=kV}),n}function UC(e,t){return e[t]!==void 0}function ow(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function AV(e){return!!e&&(typeof e!="function"||e.prototype&&e.prototype.isReactComponent)}function FV(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,jw(e,t)}function e8(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function t8(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function n8(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}}e8.__suppressDeprecationWarning=!0;t8.__suppressDeprecationWarning=!0;n8.__suppressDeprecationWarning=!0;function OV(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,a=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"?a="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(a="UNSAFE_componentWillUpdate"),n!==null||r!==null||a!==null){var o=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.
`+o+" uses "+i+" but also contains the following legacy lifecycles:"+(n!==null?`
`+n:"")+(r!==null?`
`+r:"")+(a!==null?`
`+a:"")+`
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=e8,t.componentWillReceiveProps=t8),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=n8;var l=t.componentDidUpdate;t.componentDidUpdate=function(f,p,g){var y=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:g;l.call(this,f,p,y)}}return e}var PV="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function r8(e,t,n){n===void 0&&(n=[]);var r=e.displayName||e.name||"Component",a=AV(e),o=Object.keys(t),i=o.map(ow);a||!n.length||Xg(!1);var l=function(f){FV(p,f);function p(){for(var y,w=arguments.length,T=new Array(w),S=0;S<w;S++)T[S]=arguments[S];y=f.call.apply(f,[this].concat(T))||this,y.handlers=Object.create(null),o.forEach(function(M){var N=t[M],_=function(R){if(y.props[N]){var L;y._notifying=!0;for(var H=arguments.length,U=new Array(H>1?H-1:0),z=1;z<H;z++)U[z-1]=arguments[z];(L=y.props)[N].apply(L,[R].concat(U)),y._notifying=!1}y.unmounted||y.setState(function($){var X,Q=$.values;return{values:Pr(Object.create(null),Q,(X={},X[M]=R,X))}})};y.handlers[N]=_}),n.length&&(y.attachRef=function(M){y.inner=M});var I=Object.create(null);return o.forEach(function(M){I[M]=y.props[ow(M)]}),y.state={values:I,prevProps:{}},y}var g=p.prototype;return g.shouldComponentUpdate=function(){return!this._notifying},p.getDerivedStateFromProps=function(w,T){var S=T.values,I=T.prevProps,M={values:Pr(Object.create(null),S),prevProps:{}};return o.forEach(function(N){M.prevProps[N]=w[N],!UC(w,N)&&UC(I,N)&&(M.values[N]=w[ow(N)])}),M},g.componentWillUnmount=function(){this.unmounted=!0},g.render=function(){var w=this,T=this.props,S=T.innerRef,I=xb(T,["innerRef"]);i.forEach(function(N){delete I[N]});var M={};return o.forEach(function(N){var _=w.props[N];M[N]=_!==void 0?_:w.state.values[N]}),ne.createElement(e,Pr({},I,M,this.handlers,{ref:S||this.attachRef}))},p}(ne.Component);OV(l),l.displayName="Uncontrolled("+r+")",l.propTypes=Pr({innerRef:function(){}},NV(t)),n.forEach(function(f){l.prototype[f]=function(){var g;return(g=this.inner)[f].apply(g,arguments)}});var c=l;return ne.forwardRef&&(c=ne.forwardRef(function(f,p){return ne.createElement(l,Pr({},f,{innerRef:p,__source:{fileName:PV,lineNumber:128},__self:this}))}),c.propTypes=l.propTypes),c.ControlledComponent=e,c.deferControlTo=function(f,p,g){return p===void 0&&(p={}),r8(f,Pr({},t,p),g)},c}function a8(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=a8(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ca(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=a8(e))&&(r&&(r+=" "),r+=t);return r}var o8={exports:{}},OS,zC;function jV(){if(zC)return OS;zC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return OS=e,OS}var PS,VC;function LV(){if(VC)return PS;VC=1;var e=jV();function t(){}function n(){}return n.resetWarningCache=t,PS=function(){function r(i,l,c,f,p,g){if(g!==e){var y=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 y.name="Invariant Violation",y}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},PS}o8.exports=LV()();var RV=o8.exports;const ke=qt(RV);var Lw="milliseconds",ev="seconds",tv="minutes",nv="hours",wf="day",Dp="week",rv="month",bf="year",Sf="decade",Df="century",i8={milliseconds:1,seconds:1e3,minutes:60*1e3,hours:60*60*1e3,day:24*60*60*1e3,week:7*24*60*60*1e3},_V={month:1,year:12,decade:10*12,century:100*12};function BV(e){return[31,HV(e),31,30,31,30,31,31,30,31,30,31]}function HV(e){return e%4===0&&e%100!==0||e%400===0?29:28}function zs(e,t,n){switch(e=new Date(e),n){case Lw:case ev:case tv:case nv:case wf:case Dp:return YV(e,t*i8[n]);case rv:case bf:case Sf:case Df:return UV(e,t*_V[n])}throw new TypeError('Invalid units: "'+n+'"')}function YV(e,t){var n=new Date(+e+t);return zV(e,n)}function UV(e,t){var n=e.getFullYear(),r=e.getMonth(),a=e.getDate(),o=n*12+r+t,i=Math.trunc(o/12),l=o%12,c=Math.min(a,BV(i)[l]),f=new Date(e);return f.setFullYear(i),f.setDate(1),f.setMonth(l),f.setDate(c),f}function zV(e,t){var n=e.getTimezoneOffset(),r=t.getTimezoneOffset(),a=r-n;return new Date(+t+a*i8.minutes)}function av(e,t,n){return zs(e,-t,n)}function $a(e,t,n){switch(e=new Date(e),t){case Df:case Sf:case bf:e=_w(e,0);case rv:e=d8(e,1);case Dp:case wf:e=sv(e,0);case nv:e=Tp(e,0);case tv:e=iv(e,0);case ev:e=ov(e,0)}return t===Sf&&(e=av(e,Tf(e)%10,"year")),t===Df&&(e=av(e,Tf(e)%100,"year")),t===Dp&&(e=f8(e,0,n)),e}function Rw(e,t,n){switch(e=new Date(e),e=$a(e,t,n),t){case Df:case Sf:case bf:case rv:case Dp:e=zs(e,1,t),e=av(e,1,wf),e.setHours(23,59,59,999);break;case wf:e.setHours(23,59,59,999);break;case nv:case tv:case ev:e=zs(e,1,t),e=av(e,1,Lw)}return e}var _v=Up(function(e,t){return e===t}),tI=Up(function(e,t){return e!==t}),Cb=Up(function(e,t){return e>t}),Bv=Up(function(e,t){return e>=t}),nI=Up(function(e,t){return e<t}),Yp=Up(function(e,t){return e<=t});function s8(){return new Date(Math.min.apply(Math,arguments))}function l8(){return new Date(Math.max.apply(Math,arguments))}function u8(e,t,n,r){return r=r||"day",(!t||Bv(e,t,r))&&(!n||Yp(e,n,r))}var ov=ad("Milliseconds"),iv=ad("Seconds"),Tp=ad("Minutes"),sv=ad("Hours"),c8=ad("Day"),d8=ad("Date"),_w=ad("Month"),Tf=ad("FullYear");function VV(e,t){return t===void 0?Tf($a(e,Sf)):zs(e,t+10,bf)}function WV(e,t){return t===void 0?Tf($a(e,Df)):zs(e,t+100,bf)}function f8(e,t,n){var r=(c8(e)+7-(n||0))%7;return t===void 0?r:zs(e,t-r,wf)}function $V(e,t,n,r){var a,o,i;switch(n){case Lw:case ev:case tv:case nv:case wf:case Dp:a=t.getTime()-e.getTime();break;case rv:case bf:case Sf:case Df:a=(Tf(t)-Tf(e))*12+_w(t)-_w(e);break;default:throw new TypeError('Invalid units: "'+n+'"')}switch(n){case Lw:o=1;break;case ev:o=1e3;break;case tv:o=1e3*60;break;case nv:o=1e3*60*60;break;case wf:o=1e3*60*60*24;break;case Dp:o=1e3*60*60*24*7;break;case rv:o=1;break;case bf:o=12;break;case Sf:o=120;break;case Df:o=1200;break;default:throw new TypeError('Invalid units: "'+n+'"')}return i=a/o,r?i:Math.round(i)}function ad(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 a=new Date(n);return a["set"+e](r),t&&a["get"+e]()!=r&&(e==="Hours"||r>=t&&a.getHours()-n.getHours()<Math.floor(r/t))&&a["set"+e](r+t),a}}function Up(e){return function(t,n,r){return e(+$a(t,r),+$a(n,r))}}const WC=Object.freeze(Object.defineProperty({__proto__:null,add:zs,century:WV,date:d8,day:c8,decade:VV,diff:$V,endOf:Rw,eq:_v,gt:Cb,gte:Bv,hours:sv,inRange:u8,lt:nI,lte:Yp,max:l8,milliseconds:ov,min:s8,minutes:Tp,month:_w,neq:tI,seconds:iv,startOf:$a,subtract:av,weekday:f8,year:Tf},Symbol.toStringTag,{value:"Module"}));function ZV(e){if(Array.isArray(e))return TT(e)}function h8(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qV(){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 iw(e){return ZV(e)||h8(e)||eI(e)||qV()}function GV(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o}var p8=GV;function JV(e,t){return e===t||e!==e&&t!==t}var Hv=JV,KV=typeof dr=="object"&&dr&&dr.Object===Object&&dr,m8=KV,QV=m8,XV=typeof self=="object"&&self&&self.Object===Object&&self,eW=QV||XV||Function("return this")(),Xl=eW,tW=Xl,nW=tW.Symbol,zp=nW,$C=zp,g8=Object.prototype,rW=g8.hasOwnProperty,aW=g8.toString,bg=$C?$C.toStringTag:void 0;function oW(e){var t=rW.call(e,bg),n=e[bg];try{e[bg]=void 0;var r=!0}catch{}var a=aW.call(e);return r&&(t?e[bg]=n:delete e[bg]),a}var iW=oW,sW=Object.prototype,lW=sW.toString;function uW(e){return lW.call(e)}var cW=uW,ZC=zp,dW=iW,fW=cW,hW="[object Null]",pW="[object Undefined]",qC=ZC?ZC.toStringTag:void 0;function mW(e){return e==null?e===void 0?pW:hW:qC&&qC in Object(e)?dW(e):fW(e)}var Vp=mW;function gW(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Gu=gW,vW=Vp,yW=Gu,wW="[object AsyncFunction]",bW="[object Function]",SW="[object GeneratorFunction]",DW="[object Proxy]";function TW(e){if(!yW(e))return!1;var t=vW(e);return t==bW||t==SW||t==wW||t==DW}var rI=TW,IW=9007199254740991;function EW(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=IW}var aI=EW,xW=rI,CW=aI;function MW(e){return e!=null&&CW(e.length)&&!xW(e)}var Yv=MW,kW=9007199254740991,NW=/^(?:0|[1-9]\d*)$/;function AW(e,t){var n=typeof e;return t=t??kW,!!t&&(n=="number"||n!="symbol"&&NW.test(e))&&e>-1&&e%1==0&&e<t}var oI=AW,FW=Hv,OW=Yv,PW=oI,jW=Gu;function LW(e,t,n){if(!jW(n))return!1;var r=typeof t;return(r=="number"?OW(n)&&PW(t,n.length):r=="string"&&t in n)?FW(n[t],e):!1}var Mb=LW,RW=/\s/;function _W(e){for(var t=e.length;t--&&RW.test(e.charAt(t)););return t}var BW=_W,HW=BW,YW=/^\s+/;function UW(e){return e&&e.slice(0,HW(e)+1).replace(YW,"")}var zW=UW;function VW(e){return e!=null&&typeof e=="object"}var od=VW,WW=Vp,$W=od,ZW="[object Symbol]";function qW(e){return typeof e=="symbol"||$W(e)&&WW(e)==ZW}var Uv=qW,GW=zW,GC=Gu,JW=Uv,JC=NaN,KW=/^[-+]0x[0-9a-f]+$/i,QW=/^0b[01]+$/i,XW=/^0o[0-7]+$/i,e$=parseInt;function t$(e){if(typeof e=="number")return e;if(JW(e))return JC;if(GC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=GC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=GW(e);var n=QW.test(e);return n||XW.test(e)?e$(e.slice(2),n?2:8):KW.test(e)?JC:+e}var n$=t$,r$=n$,KC=1/0,a$=17976931348623157e292;function o$(e){if(!e)return e===0?e:0;if(e=r$(e),e===KC||e===-KC){var t=e<0?-1:1;return t*a$}return e===e?e:0}var v8=o$,i$=v8;function s$(e){var t=i$(e),n=t%1;return t===t?n?t-n:t:0}var y8=s$,l$=p8,u$=Mb,c$=y8,d$=Math.ceil,f$=Math.max;function h$(e,t,n){(n?u$(e,t,n):t===void 0)?t=1:t=f$(c$(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var a=0,o=0,i=Array(d$(r/t));a<r;)i[o++]=l$(e,a,a+=t);return i}var p$=h$;const m$=qt(p$);function zv(e){return e&&e.ownerDocument||document}function g$(e){var t=zv(e);return t&&t.defaultView||window}function v$(e,t){return g$(e).getComputedStyle(e,t)}var y$=/([A-Z])/g;function w$(e){return e.replace(y$,"-$1").toLowerCase()}var b$=/^ms-/;function I0(e){return w$(e).replace(b$,"-ms-")}var S$=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function D$(e){return!!(e&&S$.test(e))}function sp(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(I0(t))||v$(e).getPropertyValue(I0(t));Object.keys(t).forEach(function(a){var o=t[a];!o&&o!==0?e.style.removeProperty(I0(a)):D$(a)?r+=a+"("+o+") ":n+=I0(a)+": "+o+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}function lv(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function T$(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function iI(e){return"window"in e&&e.window===e?e:T$(e)&&e.defaultView||!1}function w8(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function n(r,a){var o=iI(r);if(a===void 0)return o?o[e]:r[t];o?o.scrollTo(o[e],a):r[t]=a}return n}const b8=w8("pageXOffset"),S8=w8("pageYOffset");function hf(e){var t=zv(e),n={top:0,left:0,height:0,width:0},r=t&&t.documentElement;return!r||!lv(r,e)||(e.getBoundingClientRect!==void 0&&(n=e.getBoundingClientRect()),n={top:n.top+S8(r)-(r.clientTop||0),left:n.left+b8(r)-(r.clientLeft||0),width:n.width,height:n.height}),n}var I$=function(t){return!!t&&"offsetParent"in t};function E$(e){for(var t=zv(e),n=e&&e.offsetParent;I$(n)&&n.nodeName!=="HTML"&&sp(n,"position")==="static";)n=n.offsetParent;return n||t.documentElement}var x$=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function D8(e,t){var n={top:0,left:0},r;if(sp(e,"position")==="fixed")r=e.getBoundingClientRect();else{var a=t||E$(e);r=hf(e),x$(a)!=="html"&&(n=hf(a));var o=String(sp(a,"borderTopWidth")||0);n.top+=parseInt(o,10)-S8(a)||0;var i=String(sp(a,"borderLeftWidth")||0);n.left+=parseInt(i,10)-b8(a)||0}var l=String(sp(e,"marginTop")||0),c=String(sp(e,"marginLeft")||0);return Pr({},r,{top:r.top-n.top-(parseInt(l,10)||0),left:r.left-n.left-(parseInt(c,10)||0)})}const sI=!!(typeof window<"u"&&window.document&&window.document.createElement);var QC=new Date().getTime();function C$(e){var t=new Date().getTime(),n=Math.max(0,16-(t-QC)),r=setTimeout(e,n);return QC=t,r}var M$=["","webkit","moz","o","ms"],IT="clearTimeout",ET=C$,XC=function(t,n){return t+(t?n[0].toUpperCase()+n.substr(1):n)+"AnimationFrame"};sI&&M$.some(function(e){var t=XC(e,"request");return t in window&&(IT=XC(e,"cancel"),ET=function(r){return window[t](r)}),!!ET});var eM=function(t){typeof window[IT]=="function"&&window[IT](t)},T8=ET,jS;function k$(e,t){if(!jS){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;jS=function(o,i){return r.call(o,i)}}return jS(e,t)}var N$=Function.prototype.bind.call(Function.prototype.call,[].slice);function A$(e,t){return N$(e.querySelectorAll(t))}var xT=!1,CT=!1;try{var LS={get passive(){return xT=!0},get once(){return CT=xT=!0}};sI&&(window.addEventListener("test",LS,LS),window.removeEventListener("test",LS,!0))}catch{}function F$(e,t,n,r){if(r&&typeof r!="boolean"&&!CT){var a=r.once,o=r.capture,i=n;!CT&&a&&(i=n.__once||function l(c){this.removeEventListener(t,l,o),n.call(this,c)},n.__once=i),e.addEventListener(t,i,xT?r:o)}e.addEventListener(t,n,r)}function O$(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e},[e]),t}function tM(e){const t=O$(e);return P.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function nM(){return P.useState(null)}function P$(){const e=P.useRef(!0),t=P.useRef(()=>e.current);return P.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function j$(e){const t=P$();return[e[0],P.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var L$=P6({defaultModifiers:[N6,F6,E6,x6,A6,k6,O6,I6]}),rM=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},R$={name:"applyStyles",enabled:!1},_$={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var n=t.state;return function(){var r=n.elements,a=r.reference,o=r.popper;if("removeAttribute"in a){var i=(a.getAttribute("aria-describedby")||"").split(",").filter(function(l){return l.trim()!==o.id});i.length?a.setAttribute("aria-describedby",i.join(",")):a.removeAttribute("aria-describedby")}}},fn:function(t){var n,r=t.state,a=r.elements,o=a.popper,i=a.reference,l=(n=o.getAttribute("role"))==null?void 0:n.toLowerCase();if(o.id&&l==="tooltip"&&"setAttribute"in i){var c=i.getAttribute("aria-describedby");if(c&&c.split(",").indexOf(o.id)!==-1)return;i.setAttribute("aria-describedby",c?c+","+o.id:o.id)}}},B$=[];function H$(e,t,n){var r=n===void 0?{}:n,a=r.enabled,o=a===void 0?!0:a,i=r.placement,l=i===void 0?"bottom":i,c=r.strategy,f=c===void 0?"absolute":c,p=r.modifiers,g=p===void 0?B$:p,y=xb(r,["enabled","placement","strategy","modifiers"]),w=P.useRef(),T=P.useCallback(function(){var k;(k=w.current)==null||k.update()},[]),S=P.useCallback(function(){var k;(k=w.current)==null||k.forceUpdate()},[]),I=j$(P.useState({placement:l,update:T,forceUpdate:S,attributes:{},styles:{popper:rM(f),arrow:{}}})),M=I[0],N=I[1],_=P.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(R){var L=R.state,H={},U={};Object.keys(L.elements).forEach(function(z){H[z]=L.styles[z],U[z]=L.attributes[z]}),N({state:L,styles:H,attributes:U,update:T,forceUpdate:S,placement:L.placement})}}},[T,S,N]);return P.useEffect(function(){!w.current||!o||w.current.setOptions({placement:l,strategy:f,modifiers:[].concat(g,[_,R$])})},[f,l,_,o]),P.useEffect(function(){if(!(!o||e==null||t==null))return w.current=L$(e,t,Pr({},y,{placement:l,strategy:f,modifiers:[].concat(g,[_$,_])})),function(){w.current!=null&&(w.current.destroy(),w.current=void 0,N(function(k){return Pr({},k,{attributes:{},styles:{popper:rM(f)}})}))}},[o,e,t]),M}function Y$(e,t,n,r){var a=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,a),n.__once&&e.removeEventListener(t,n.__once,a)}function Og(e,t,n,r){return F$(e,t,n,r),function(){Y$(e,t,n,r)}}function U$(e){return e&&"setState"in e?z2.findDOMNode(e):e??null}const z$=function(e){return zv(U$(e))};var V$=27,aM=function(){};function W$(e){return e.button===0}function $$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var oM=function(t){return t&&("current"in t?t.current:t)};function Z$(e,t,n){var r=n===void 0?{}:n,a=r.disabled,o=r.clickTrigger,i=o===void 0?"click":o,l=P.useRef(!1),c=t||aM,f=P.useCallback(function(y){var w,T=oM(e);YU(!!T,"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"),l.current=!T||$$(y)||!W$(y)||!!lv(T,(w=y.composedPath==null?void 0:y.composedPath()[0])!=null?w:y.target)},[e]),p=tM(function(y){l.current||c(y)}),g=tM(function(y){y.keyCode===V$&&c(y)});P.useEffect(function(){if(!(a||e==null)){var y=window.event,w=z$(oM(e)),T=Og(w,i,f,!0),S=Og(w,i,function(N){if(N===y){y=void 0;return}p(N)}),I=Og(w,"keyup",function(N){if(N===y){y=void 0;return}g(N)}),M=[];return"ontouchstart"in w.documentElement&&(M=[].slice.call(w.body.children).map(function(N){return Og(N,"mousemove",aM)})),function(){T(),S(),I(),M.forEach(function(N){return N()})}}},[e,a,i,f,p,g])}function q$(e){var t={};return Array.isArray(e)?(e==null||e.forEach(function(n){t[n.name]=n}),t):e||t}function G$(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function J$(e){var t,n,r,a,o=e.enabled,i=e.enableEvents,l=e.placement,c=e.flip,f=e.offset,p=e.fixed,g=e.containerPadding,y=e.arrowElement,w=e.popperConfig,T=w===void 0?{}:w,S=q$(T.modifiers);return Pr({},T,{placement:l,enabled:o,strategy:p?"fixed":T.strategy,modifiers:G$(Pr({},S,{eventListeners:{enabled:i},preventOverflow:Pr({},S.preventOverflow,{options:g?Pr({padding:g},(t=S.preventOverflow)==null?void 0:t.options):(n=S.preventOverflow)==null?void 0:n.options}),offset:{options:Pr({offset:f},(r=S.offset)==null?void 0:r.options)},arrow:Pr({},S.arrow,{enabled:!!y,options:Pr({},(a=S.arrow)==null?void 0:a.options,{element:y})}),flip:Pr({enabled:!!c},S.flip)}))})}function K$(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Q$(e,t){e.classList?e.classList.add(t):K$(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function iM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function X$(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=iM(e.className,t):e.setAttribute("class",iM(e.className&&e.className.baseVal||"",t))}var E0;function I8(e){if((!E0&&E0!==0||e)&&sI){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),E0=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return E0}var RS=function(t){var n;return typeof document>"u"?null:t==null?zv().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(n=t)!=null&&n.nodeType&&t||null)};function sM(e,t){var n=P.useState(function(){return RS(e)}),r=n[0],a=n[1];if(!r){var o=RS(e);o&&a(o)}return P.useEffect(function(){t&&r&&t(r)},[t,r]),P.useEffect(function(){var i=RS(e);i!==r&&a(i)},[e,r]),r}const lM=e=>!e||typeof e=="function"?e:t=>{e.current=t};function eZ(e,t){const n=lM(e),r=lM(t);return a=>{n&&n(a),r&&r(a)}}function tZ(e,t){return P.useMemo(()=>eZ(e,t),[e,t])}var lI=ne.forwardRef(function(e,t){var n=e.flip,r=e.offset,a=e.placement,o=e.containerPadding,i=o===void 0?5:o,l=e.popperConfig,c=l===void 0?{}:l,f=e.transition,p=nM(),g=p[0],y=p[1],w=nM(),T=w[0],S=w[1],I=tZ(y,t),M=sM(e.container),N=sM(e.target),_=P.useState(!e.show),k=_[0],R=_[1],L=H$(N,g,J$({placement:a,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:T,popperConfig:c})),H=L.styles,U=L.attributes,z=xb(L,["styles","attributes"]);e.show?k&&R(!1):!e.transition&&!k&&R(!0);var $=function(){R(!0),e.onExited&&e.onExited.apply(e,arguments)},X=e.show||f&&!k;if(Z$(g,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!X)return null;var Q=e.children(Pr({},z,{show:!!e.show,props:Pr({},U.popper,{style:H.popper,ref:I}),arrowProps:Pr({},U.arrow,{style:H.arrow,ref:S})}));if(f){var se=e.onExit,ue=e.onExiting,fe=e.onEnter,Z=e.onEntering,pe=e.onEntered;Q=ne.createElement(f,{in:e.show,appear:!0,onExit:se,onExiting:ue,onExited:$,onEnter:fe,onEntering:Z,onEntered:pe},Q)}return M?z2.createPortal(Q,M):null});lI.displayName="Overlay";lI.propTypes={show:ke.bool,placement:ke.oneOf($2),target:ke.any,container:ke.any,flip:ke.bool,children:ke.func.isRequired,containerPadding:ke.number,popperConfig:ke.object,rootClose:ke.bool,rootCloseEvent:ke.oneOf(["click","mousedown"]),rootCloseDisabled:ke.bool,onHide:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];if(t.rootClose){var o;return(o=ke.func).isRequired.apply(o,[t].concat(r))}return ke.func.apply(ke,[t].concat(r))},transition:ke.elementType,onEnter:ke.func,onEntering:ke.func,onEntered:ke.func,onExit:ke.func,onExiting:ke.func,onExited:ke.func};const nZ=lI;function rZ(){this.__data__=[],this.size=0}var aZ=rZ,oZ=Hv;function iZ(e,t){for(var n=e.length;n--;)if(oZ(e[n][0],t))return n;return-1}var kb=iZ,sZ=kb,lZ=Array.prototype,uZ=lZ.splice;function cZ(e){var t=this.__data__,n=sZ(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():uZ.call(t,n,1),--this.size,!0}var dZ=cZ,fZ=kb;function hZ(e){var t=this.__data__,n=fZ(t,e);return n<0?void 0:t[n][1]}var pZ=hZ,mZ=kb;function gZ(e){return mZ(this.__data__,e)>-1}var vZ=gZ,yZ=kb;function wZ(e,t){var n=this.__data__,r=yZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var bZ=wZ,SZ=aZ,DZ=dZ,TZ=pZ,IZ=vZ,EZ=bZ;function Wp(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])}}Wp.prototype.clear=SZ;Wp.prototype.delete=DZ;Wp.prototype.get=TZ;Wp.prototype.has=IZ;Wp.prototype.set=EZ;var Nb=Wp,xZ=Nb;function CZ(){this.__data__=new xZ,this.size=0}var MZ=CZ;function kZ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var NZ=kZ;function AZ(e){return this.__data__.get(e)}var FZ=AZ;function OZ(e){return this.__data__.has(e)}var PZ=OZ,jZ=Xl,LZ=jZ["__core-js_shared__"],RZ=LZ,_S=RZ,uM=function(){var e=/[^.]+$/.exec(_S&&_S.keys&&_S.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _Z(e){return!!uM&&uM in e}var BZ=_Z,HZ=Function.prototype,YZ=HZ.toString;function UZ(e){if(e!=null){try{return YZ.call(e)}catch{}try{return e+""}catch{}}return""}var E8=UZ,zZ=rI,VZ=BZ,WZ=Gu,$Z=E8,ZZ=/[\\^$.*+?()[\]{}|]/g,qZ=/^\[object .+?Constructor\]$/,GZ=Function.prototype,JZ=Object.prototype,KZ=GZ.toString,QZ=JZ.hasOwnProperty,XZ=RegExp("^"+KZ.call(QZ).replace(ZZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eq(e){if(!WZ(e)||VZ(e))return!1;var t=zZ(e)?XZ:qZ;return t.test($Z(e))}var tq=eq;function nq(e,t){return e==null?void 0:e[t]}var rq=nq,aq=tq,oq=rq;function iq(e,t){var n=oq(e,t);return aq(n)?n:void 0}var Nf=iq,sq=Nf,lq=Xl,uq=sq(lq,"Map"),uI=uq,cq=Nf,dq=cq(Object,"create"),Ab=dq,cM=Ab;function fq(){this.__data__=cM?cM(null):{},this.size=0}var hq=fq;function pq(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mq=pq,gq=Ab,vq="__lodash_hash_undefined__",yq=Object.prototype,wq=yq.hasOwnProperty;function bq(e){var t=this.__data__;if(gq){var n=t[e];return n===vq?void 0:n}return wq.call(t,e)?t[e]:void 0}var Sq=bq,Dq=Ab,Tq=Object.prototype,Iq=Tq.hasOwnProperty;function Eq(e){var t=this.__data__;return Dq?t[e]!==void 0:Iq.call(t,e)}var xq=Eq,Cq=Ab,Mq="__lodash_hash_undefined__";function kq(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Cq&&t===void 0?Mq:t,this}var Nq=kq,Aq=hq,Fq=mq,Oq=Sq,Pq=xq,jq=Nq;function $p(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])}}$p.prototype.clear=Aq;$p.prototype.delete=Fq;$p.prototype.get=Oq;$p.prototype.has=Pq;$p.prototype.set=jq;var Lq=$p,dM=Lq,Rq=Nb,_q=uI;function Bq(){this.size=0,this.__data__={hash:new dM,map:new(_q||Rq),string:new dM}}var Hq=Bq;function Yq(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Uq=Yq,zq=Uq;function Vq(e,t){var n=e.__data__;return zq(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fb=Vq,Wq=Fb;function $q(e){var t=Wq(this,e).delete(e);return this.size-=t?1:0,t}var Zq=$q,qq=Fb;function Gq(e){return qq(this,e).get(e)}var Jq=Gq,Kq=Fb;function Qq(e){return Kq(this,e).has(e)}var Xq=Qq,eG=Fb;function tG(e,t){var n=eG(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var nG=tG,rG=Hq,aG=Zq,oG=Jq,iG=Xq,sG=nG;function Zp(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])}}Zp.prototype.clear=rG;Zp.prototype.delete=aG;Zp.prototype.get=oG;Zp.prototype.has=iG;Zp.prototype.set=sG;var cI=Zp,lG=Nb,uG=uI,cG=cI,dG=200;function fG(e,t){var n=this.__data__;if(n instanceof lG){var r=n.__data__;if(!uG||r.length<dG-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new cG(r)}return n.set(e,t),this.size=n.size,this}var hG=fG,pG=Nb,mG=MZ,gG=NZ,vG=FZ,yG=PZ,wG=hG;function qp(e){var t=this.__data__=new pG(e);this.size=t.size}qp.prototype.clear=mG;qp.prototype.delete=gG;qp.prototype.get=vG;qp.prototype.has=yG;qp.prototype.set=wG;var dI=qp,bG="__lodash_hash_undefined__";function SG(e){return this.__data__.set(e,bG),this}var DG=SG;function TG(e){return this.__data__.has(e)}var IG=TG,EG=cI,xG=DG,CG=IG;function Bw(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new EG;++t<n;)this.add(e[t])}Bw.prototype.add=Bw.prototype.push=xG;Bw.prototype.has=CG;var MG=Bw;function kG(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 NG=kG;function AG(e,t){return e.has(t)}var FG=AG,OG=MG,PG=NG,jG=FG,LG=1,RG=2;function _G(e,t,n,r,a,o){var i=n&LG,l=e.length,c=t.length;if(l!=c&&!(i&&c>l))return!1;var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var g=-1,y=!0,w=n&RG?new OG:void 0;for(o.set(e,t),o.set(t,e);++g<l;){var T=e[g],S=t[g];if(r)var I=i?r(S,T,g,t,e,o):r(T,S,g,e,t,o);if(I!==void 0){if(I)continue;y=!1;break}if(w){if(!PG(t,function(M,N){if(!jG(w,N)&&(T===M||a(T,M,n,r,o)))return w.push(N)})){y=!1;break}}else if(!(T===S||a(T,S,n,r,o))){y=!1;break}}return o.delete(e),o.delete(t),y}var x8=_G,BG=Xl,HG=BG.Uint8Array,C8=HG;function YG(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var UG=YG;function zG(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var VG=zG,fM=zp,hM=C8,WG=Hv,$G=x8,ZG=UG,qG=VG,GG=1,JG=2,KG="[object Boolean]",QG="[object Date]",XG="[object Error]",eJ="[object Map]",tJ="[object Number]",nJ="[object RegExp]",rJ="[object Set]",aJ="[object String]",oJ="[object Symbol]",iJ="[object ArrayBuffer]",sJ="[object DataView]",pM=fM?fM.prototype:void 0,BS=pM?pM.valueOf:void 0;function lJ(e,t,n,r,a,o,i){switch(n){case sJ:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iJ:return!(e.byteLength!=t.byteLength||!o(new hM(e),new hM(t)));case KG:case QG:case tJ:return WG(+e,+t);case XG:return e.name==t.name&&e.message==t.message;case nJ:case aJ:return e==t+"";case eJ:var l=ZG;case rJ:var c=r&GG;if(l||(l=qG),e.size!=t.size&&!c)return!1;var f=i.get(e);if(f)return f==t;r|=JG,i.set(e,t);var p=$G(l(e),l(t),r,a,o,i);return i.delete(e),p;case oJ:if(BS)return BS.call(e)==BS.call(t)}return!1}var uJ=lJ;function cJ(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var fI=cJ,dJ=Array.isArray,ss=dJ,fJ=fI,hJ=ss;function pJ(e,t,n){var r=t(e);return hJ(e)?r:fJ(r,n(e))}var M8=pJ;function mJ(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}var gJ=mJ;function vJ(){return[]}var k8=vJ,yJ=gJ,wJ=k8,bJ=Object.prototype,SJ=bJ.propertyIsEnumerable,mM=Object.getOwnPropertySymbols,DJ=mM?function(e){return e==null?[]:(e=Object(e),yJ(mM(e),function(t){return SJ.call(e,t)}))}:wJ,hI=DJ;function TJ(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var IJ=TJ,EJ=Vp,xJ=od,CJ="[object Arguments]";function MJ(e){return xJ(e)&&EJ(e)==CJ}var kJ=MJ,gM=kJ,NJ=od,N8=Object.prototype,AJ=N8.hasOwnProperty,FJ=N8.propertyIsEnumerable,OJ=gM(function(){return arguments}())?gM:function(e){return NJ(e)&&AJ.call(e,"callee")&&!FJ.call(e,"callee")},pI=OJ,Hw={exports:{}};function PJ(){return!1}var jJ=PJ;Hw.exports;(function(e,t){var n=Xl,r=jJ,a=t&&!t.nodeType&&t,o=a&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===a,l=i?n.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||r;e.exports=f})(Hw,Hw.exports);var Ob=Hw.exports,LJ=Vp,RJ=aI,_J=od,BJ="[object Arguments]",HJ="[object Array]",YJ="[object Boolean]",UJ="[object Date]",zJ="[object Error]",VJ="[object Function]",WJ="[object Map]",$J="[object Number]",ZJ="[object Object]",qJ="[object RegExp]",GJ="[object Set]",JJ="[object String]",KJ="[object WeakMap]",QJ="[object ArrayBuffer]",XJ="[object DataView]",eK="[object Float32Array]",tK="[object Float64Array]",nK="[object Int8Array]",rK="[object Int16Array]",aK="[object Int32Array]",oK="[object Uint8Array]",iK="[object Uint8ClampedArray]",sK="[object Uint16Array]",lK="[object Uint32Array]",sr={};sr[eK]=sr[tK]=sr[nK]=sr[rK]=sr[aK]=sr[oK]=sr[iK]=sr[sK]=sr[lK]=!0;sr[BJ]=sr[HJ]=sr[QJ]=sr[YJ]=sr[XJ]=sr[UJ]=sr[zJ]=sr[VJ]=sr[WJ]=sr[$J]=sr[ZJ]=sr[qJ]=sr[GJ]=sr[JJ]=sr[KJ]=!1;function uK(e){return _J(e)&&RJ(e.length)&&!!sr[LJ(e)]}var cK=uK;function dK(e){return function(t){return e(t)}}var Pb=dK,Yw={exports:{}};Yw.exports;(function(e,t){var n=m8,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,i=o&&n.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}}();e.exports=l})(Yw,Yw.exports);var mI=Yw.exports,fK=cK,hK=Pb,vM=mI,yM=vM&&vM.isTypedArray,pK=yM?hK(yM):fK,gI=pK,mK=IJ,gK=pI,vK=ss,yK=Ob,wK=oI,bK=gI,SK=Object.prototype,DK=SK.hasOwnProperty;function TK(e,t){var n=vK(e),r=!n&&gK(e),a=!n&&!r&&yK(e),o=!n&&!r&&!a&&bK(e),i=n||r||a||o,l=i?mK(e.length,String):[],c=l.length;for(var f in e)(t||DK.call(e,f))&&!(i&&(f=="length"||a&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||wK(f,c)))&&l.push(f);return l}var A8=TK,IK=Object.prototype;function EK(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||IK;return e===n}var vI=EK;function xK(e,t){return function(n){return e(t(n))}}var F8=xK,CK=F8,MK=CK(Object.keys,Object),kK=MK,NK=vI,AK=kK,FK=Object.prototype,OK=FK.hasOwnProperty;function PK(e){if(!NK(e))return AK(e);var t=[];for(var n in Object(e))OK.call(e,n)&&n!="constructor"&&t.push(n);return t}var jK=PK,LK=A8,RK=jK,_K=Yv;function BK(e){return _K(e)?LK(e):RK(e)}var Vv=BK,HK=M8,YK=hI,UK=Vv;function zK(e){return HK(e,UK,YK)}var O8=zK,wM=O8,VK=1,WK=Object.prototype,$K=WK.hasOwnProperty;function ZK(e,t,n,r,a,o){var i=n&VK,l=wM(e),c=l.length,f=wM(t),p=f.length;if(c!=p&&!i)return!1;for(var g=c;g--;){var y=l[g];if(!(i?y in t:$K.call(t,y)))return!1}var w=o.get(e),T=o.get(t);if(w&&T)return w==t&&T==e;var S=!0;o.set(e,t),o.set(t,e);for(var I=i;++g<c;){y=l[g];var M=e[y],N=t[y];if(r)var _=i?r(N,M,y,t,e,o):r(M,N,y,e,t,o);if(!(_===void 0?M===N||a(M,N,n,r,o):_)){S=!1;break}I||(I=y=="constructor")}if(S&&!I){var k=e.constructor,R=t.constructor;k!=R&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof R=="function"&&R instanceof R)&&(S=!1)}return o.delete(e),o.delete(t),S}var qK=ZK,GK=Nf,JK=Xl,KK=GK(JK,"DataView"),QK=KK,XK=Nf,eQ=Xl,tQ=XK(eQ,"Promise"),nQ=tQ,rQ=Nf,aQ=Xl,oQ=rQ(aQ,"Set"),iQ=oQ,sQ=Nf,lQ=Xl,uQ=sQ(lQ,"WeakMap"),cQ=uQ,MT=QK,kT=uI,NT=nQ,AT=iQ,FT=cQ,P8=Vp,Gp=E8,bM="[object Map]",dQ="[object Object]",SM="[object Promise]",DM="[object Set]",TM="[object WeakMap]",IM="[object DataView]",fQ=Gp(MT),hQ=Gp(kT),pQ=Gp(NT),mQ=Gp(AT),gQ=Gp(FT),nf=P8;(MT&&nf(new MT(new ArrayBuffer(1)))!=IM||kT&&nf(new kT)!=bM||NT&&nf(NT.resolve())!=SM||AT&&nf(new AT)!=DM||FT&&nf(new FT)!=TM)&&(nf=function(e){var t=P8(e),n=t==dQ?e.constructor:void 0,r=n?Gp(n):"";if(r)switch(r){case fQ:return IM;case hQ:return bM;case pQ:return SM;case mQ:return DM;case gQ:return TM}return t});var jb=nf,HS=dI,vQ=x8,yQ=uJ,wQ=qK,EM=jb,xM=ss,CM=Ob,bQ=gI,SQ=1,MM="[object Arguments]",kM="[object Array]",x0="[object Object]",DQ=Object.prototype,NM=DQ.hasOwnProperty;function TQ(e,t,n,r,a,o){var i=xM(e),l=xM(t),c=i?kM:EM(e),f=l?kM:EM(t);c=c==MM?x0:c,f=f==MM?x0:f;var p=c==x0,g=f==x0,y=c==f;if(y&&CM(e)){if(!CM(t))return!1;i=!0,p=!1}if(y&&!p)return o||(o=new HS),i||bQ(e)?vQ(e,t,n,r,a,o):yQ(e,t,c,n,r,a,o);if(!(n&SQ)){var w=p&&NM.call(e,"__wrapped__"),T=g&&NM.call(t,"__wrapped__");if(w||T){var S=w?e.value():e,I=T?t.value():t;return o||(o=new HS),a(S,I,n,r,o)}}return y?(o||(o=new HS),wQ(e,t,n,r,a,o)):!1}var IQ=TQ,EQ=IQ,AM=od;function j8(e,t,n,r,a){return e===t?!0:e==null||t==null||!AM(e)&&!AM(t)?e!==e&&t!==t:EQ(e,t,n,r,j8,a)}var yI=j8,xQ=yI;function CQ(e,t){return xQ(e,t)}var MQ=CQ;const kQ=qt(MQ);function YS(e,t){var n=iI(e);return n?n.innerHeight:t?e.clientHeight:hf(e).height}function L8(e,t,n){e.closest&&!n&&e.closest(t);var r=e;do{if(k$(r,t))return r;r=r.parentElement}while(r&&r!==n&&r.nodeType===document.ELEMENT_NODE);return null}function NQ(e,t,n,r){for(var a=e.length,o=n+(r?1:-1);r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}var AQ=NQ,FQ=dI,OQ=yI,PQ=1,jQ=2;function LQ(e,t,n,r){var a=n.length,o=a,i=!r;if(e==null)return!o;for(e=Object(e);a--;){var l=n[a];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<o;){l=n[a];var c=l[0],f=e[c],p=l[1];if(i&&l[2]){if(f===void 0&&!(c in e))return!1}else{var g=new FQ;if(r)var y=r(f,p,c,e,t,g);if(!(y===void 0?OQ(p,f,PQ|jQ,r,g):y))return!1}}return!0}var RQ=LQ,_Q=Gu;function BQ(e){return e===e&&!_Q(e)}var R8=BQ,HQ=R8,YQ=Vv;function UQ(e){for(var t=YQ(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,HQ(a)]}return t}var zQ=UQ;function VQ(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var _8=VQ,WQ=RQ,$Q=zQ,ZQ=_8;function qQ(e){var t=$Q(e);return t.length==1&&t[0][2]?ZQ(t[0][0],t[0][1]):function(n){return n===e||WQ(n,e,t)}}var GQ=qQ,JQ=ss,KQ=Uv,QQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XQ=/^\w*$/;function eX(e,t){if(JQ(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||KQ(e)?!0:XQ.test(e)||!QQ.test(e)||t!=null&&e in Object(t)}var wI=eX,B8=cI,tX="Expected a function";function bI(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(tX);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(bI.Cache||B8),n}bI.Cache=B8;var nX=bI,rX=nX,aX=500;function oX(e){var t=rX(e,function(r){return n.size===aX&&n.clear(),r}),n=t.cache;return t}var iX=oX,sX=iX,lX=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uX=/\\(\\)?/g,cX=sX(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(lX,function(n,r,a,o){t.push(a?o.replace(uX,"$1"):r||n)}),t}),dX=cX;function fX(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var SI=fX,FM=zp,hX=SI,pX=ss,mX=Uv,gX=1/0,OM=FM?FM.prototype:void 0,PM=OM?OM.toString:void 0;function H8(e){if(typeof e=="string")return e;if(pX(e))return hX(e,H8)+"";if(mX(e))return PM?PM.call(e):"";var t=e+"";return t=="0"&&1/e==-gX?"-0":t}var vX=H8,yX=vX;function wX(e){return e==null?"":yX(e)}var bX=wX,SX=ss,DX=wI,TX=dX,IX=bX;function EX(e,t){return SX(e)?e:DX(e,t)?[e]:TX(IX(e))}var Lb=EX,xX=Uv,CX=1/0;function MX(e){if(typeof e=="string"||xX(e))return e;var t=e+"";return t=="0"&&1/e==-CX?"-0":t}var Wv=MX,kX=Lb,NX=Wv;function AX(e,t){t=kX(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[NX(t[n++])];return n&&n==r?e:void 0}var Rb=AX,FX=Rb;function OX(e,t,n){var r=e==null?void 0:FX(e,t);return r===void 0?n:r}var PX=OX;function jX(e,t){return e!=null&&t in Object(e)}var LX=jX,RX=Lb,_X=pI,BX=ss,HX=oI,YX=aI,UX=Wv;function zX(e,t,n){t=RX(t,e);for(var r=-1,a=t.length,o=!1;++r<a;){var i=UX(t[r]);if(!(o=e!=null&&n(e,i)))break;e=e[i]}return o||++r!=a?o:(a=e==null?0:e.length,!!a&&YX(a)&&HX(i,a)&&(BX(e)||_X(e)))}var VX=zX,WX=LX,$X=VX;function ZX(e,t){return e!=null&&$X(e,t,WX)}var qX=ZX,GX=yI,JX=PX,KX=qX,QX=wI,XX=R8,eee=_8,tee=Wv,nee=1,ree=2;function aee(e,t){return QX(e)&&XX(t)?eee(tee(e),t):function(n){var r=JX(n,e);return r===void 0&&r===t?KX(n,e):GX(t,r,nee|ree)}}var oee=aee;function iee(e){return e}var _b=iee;function see(e){return function(t){return t==null?void 0:t[e]}}var lee=see,uee=Rb;function cee(e){return function(t){return uee(t,e)}}var dee=cee,fee=lee,hee=dee,pee=wI,mee=Wv;function gee(e){return pee(e)?fee(mee(e)):hee(e)}var vee=gee,yee=GQ,wee=oee,bee=_b,See=ss,Dee=vee;function Tee(e){return typeof e=="function"?e:e==null?bee:typeof e=="object"?See(e)?wee(e[0],e[1]):yee(e):Dee(e)}var Bb=Tee,Iee=AQ,Eee=Bb,xee=y8,Cee=Math.max;function Mee(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:xee(n);return a<0&&(a=Cee(r+a,0)),Iee(e,Eee(t),a)}var kee=Mee;const Nee=qt(kee);var Aee=Math.ceil,Fee=Math.max;function Oee(e,t,n,r){for(var a=-1,o=Fee(Aee((t-e)/(n||1)),0),i=Array(o);o--;)i[r?o:++a]=e,e+=n;return i}var Pee=Oee,jee=Pee,Lee=Mb,US=v8;function Ree(e){return function(t,n,r){return r&&typeof r!="number"&&Lee(t,n,r)&&(n=r=void 0),t=US(t),n===void 0?(n=t,t=0):n=US(n),r=r===void 0?t<n?1:-1:US(r),jee(t,n,r,e)}}var _ee=Ree,Bee=_ee,Hee=Bee(),Yee=Hee;const Uee=qt(Yee);var jM=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function zee(e,t){return!!(e===t||jM(e)&&jM(t))}function Vee(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!zee(e[n],t[n]))return!1;return!0}function Y8(e,t){t===void 0&&(t=Vee);var n=null;function r(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];if(n&&n.lastThis===this&&t(a,n.lastArgs))return n.lastResult;var i=e.apply(this,a);return n={lastResult:i,lastArgs:a,lastThis:this},i}return r.clear=function(){n=null},r}var LM=zp,Wee=pI,$ee=ss,RM=LM?LM.isConcatSpreadable:void 0;function Zee(e){return $ee(e)||Wee(e)||!!(RM&&e&&e[RM])}var qee=Zee,Gee=fI,Jee=qee;function U8(e,t,n,r,a){var o=-1,i=e.length;for(n||(n=Jee),a||(a=[]);++o<i;){var l=e[o];t>0&&n(l)?t>1?U8(l,t-1,n,r,a):Gee(a,l):r||(a[a.length]=l)}return a}var z8=U8;function Kee(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),l=i.length;l--;){var c=i[e?l:++a];if(n(o[c],c,o)===!1)break}return t}}var Qee=Kee,Xee=Qee,ete=Xee(),tte=ete,nte=tte,rte=Vv;function ate(e,t){return e&&nte(e,t,rte)}var DI=ate,ote=Yv;function ite(e,t){return function(n,r){if(n==null)return n;if(!ote(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++o<a)&&r(i[o],o,i)!==!1;);return n}}var ste=ite,lte=DI,ute=ste,cte=ute(lte),dte=cte,fte=dte,hte=Yv;function pte(e,t){var n=-1,r=hte(e)?Array(e.length):[];return fte(e,function(a,o,i){r[++n]=t(a,o,i)}),r}var mte=pte;function gte(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var vte=gte,_M=Uv;function yte(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,o=_M(e),i=t!==void 0,l=t===null,c=t===t,f=_M(t);if(!l&&!f&&!o&&e>t||o&&i&&c&&!l&&!f||r&&i&&c||!n&&c||!a)return 1;if(!r&&!o&&!f&&e<t||f&&n&&a&&!r&&!o||l&&n&&a||!i&&a||!c)return-1}return 0}var wte=yte,bte=wte;function Ste(e,t,n){for(var r=-1,a=e.criteria,o=t.criteria,i=a.length,l=n.length;++r<i;){var c=bte(a[r],o[r]);if(c){if(r>=l)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var Dte=Ste,zS=SI,Tte=Rb,Ite=Bb,Ete=mte,xte=vte,Cte=Pb,Mte=Dte,kte=_b,Nte=ss;function Ate(e,t,n){t.length?t=zS(t,function(o){return Nte(o)?function(i){return Tte(i,o.length===1?o[0]:o)}:o}):t=[kte];var r=-1;t=zS(t,Cte(Ite));var a=Ete(e,function(o,i,l){var c=zS(t,function(f){return f(o)});return{criteria:c,index:++r,value:o}});return xte(a,function(o,i){return Mte(o,i,n)})}var Fte=Ate;function Ote(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 Pte=Ote,jte=Pte,BM=Math.max;function Lte(e,t,n){return t=BM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=BM(r.length-t,0),i=Array(o);++a<o;)i[a]=r[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=r[a];return l[t]=n(i),jte(e,this,l)}}var V8=Lte;function Rte(e){return function(){return e}}var _te=Rte,Bte=Nf,Hte=function(){try{var e=Bte(Object,"defineProperty");return e({},"",{}),e}catch{}}(),W8=Hte,Yte=_te,HM=W8,Ute=_b,zte=HM?function(e,t){return HM(e,"toString",{configurable:!0,enumerable:!1,value:Yte(t),writable:!0})}:Ute,Vte=zte,Wte=800,$te=16,Zte=Date.now;function qte(e){var t=0,n=0;return function(){var r=Zte(),a=$te-(r-n);if(n=r,a>0){if(++t>=Wte)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Gte=qte,Jte=Vte,Kte=Gte,Qte=Kte(Jte),$8=Qte,Xte=_b,ene=V8,tne=$8;function nne(e,t){return tne(ene(e,t,Xte),e+"")}var Z8=nne,rne=z8,ane=Fte,one=Z8,YM=Mb,ine=one(function(e,t){if(e==null)return[];var n=t.length;return n>1&&YM(e,t[0],t[1])?t=[]:n>2&&YM(t[0],t[1],t[2])&&(t=[t[0]]),ane(e,rne(t,1),[])}),sne=ine;const lne=qt(sne);function OT(e,t){var n=iI(e);return n?n.innerWidth:t?e.clientWidth:hf(e).width}function q8(e){return Q6(e)||h8(e)||eI(e)||X6()}function une(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var G8=une,UM=W8;function cne(e,t,n){t=="__proto__"&&UM?UM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var TI=cne,dne=TI,fne=Hv,hne=Object.prototype,pne=hne.hasOwnProperty;function mne(e,t,n){var r=e[t];(!(pne.call(e,t)&&fne(r,n))||n===void 0&&!(t in e))&&dne(e,t,n)}var J8=mne,gne=J8,vne=TI;function yne(e,t,n,r){var a=!n;n||(n={});for(var o=-1,i=t.length;++o<i;){var l=t[o],c=r?r(n[l],e[l],l,n,e):void 0;c===void 0&&(c=e[l]),a?vne(n,l,c):gne(n,l,c)}return n}var $v=yne,wne=$v,bne=Vv;function Sne(e,t){return e&&wne(t,bne(t),e)}var Dne=Sne;function Tne(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Ine=Tne,Ene=Gu,xne=vI,Cne=Ine,Mne=Object.prototype,kne=Mne.hasOwnProperty;function Nne(e){if(!Ene(e))return Cne(e);var t=xne(e),n=[];for(var r in e)r=="constructor"&&(t||!kne.call(e,r))||n.push(r);return n}var Ane=Nne,Fne=A8,One=Ane,Pne=Yv;function jne(e){return Pne(e)?Fne(e,!0):One(e)}var Hb=jne,Lne=$v,Rne=Hb;function _ne(e,t){return e&&Lne(t,Rne(t),e)}var Bne=_ne,Uw={exports:{}};Uw.exports;(function(e,t){var n=Xl,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,i=o?n.Buffer:void 0,l=i?i.allocUnsafe:void 0;function c(f,p){if(p)return f.slice();var g=f.length,y=l?l(g):new f.constructor(g);return f.copy(y),y}e.exports=c})(Uw,Uw.exports);var Hne=Uw.exports;function Yne(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Une=Yne,zne=$v,Vne=hI;function Wne(e,t){return zne(e,Vne(e),t)}var $ne=Wne,Zne=F8,qne=Zne(Object.getPrototypeOf,Object),Yb=qne,Gne=fI,Jne=Yb,Kne=hI,Qne=k8,Xne=Object.getOwnPropertySymbols,ere=Xne?function(e){for(var t=[];e;)Gne(t,Kne(e)),e=Jne(e);return t}:Qne,K8=ere,tre=$v,nre=K8;function rre(e,t){return tre(e,nre(e),t)}var are=rre,ore=M8,ire=K8,sre=Hb;function lre(e){return ore(e,sre,ire)}var Q8=lre,ure=Object.prototype,cre=ure.hasOwnProperty;function dre(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&cre.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var fre=dre,zM=C8;function hre(e){var t=new e.constructor(e.byteLength);return new zM(t).set(new zM(e)),t}var II=hre,pre=II;function mre(e,t){var n=t?pre(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var gre=mre,vre=/\w*$/;function yre(e){var t=new e.constructor(e.source,vre.exec(e));return t.lastIndex=e.lastIndex,t}var wre=yre,VM=zp,WM=VM?VM.prototype:void 0,$M=WM?WM.valueOf:void 0;function bre(e){return $M?Object($M.call(e)):{}}var Sre=bre,Dre=II;function Tre(e,t){var n=t?Dre(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ire=Tre,Ere=II,xre=gre,Cre=wre,Mre=Sre,kre=Ire,Nre="[object Boolean]",Are="[object Date]",Fre="[object Map]",Ore="[object Number]",Pre="[object RegExp]",jre="[object Set]",Lre="[object String]",Rre="[object Symbol]",_re="[object ArrayBuffer]",Bre="[object DataView]",Hre="[object Float32Array]",Yre="[object Float64Array]",Ure="[object Int8Array]",zre="[object Int16Array]",Vre="[object Int32Array]",Wre="[object Uint8Array]",$re="[object Uint8ClampedArray]",Zre="[object Uint16Array]",qre="[object Uint32Array]";function Gre(e,t,n){var r=e.constructor;switch(t){case _re:return Ere(e);case Nre:case Are:return new r(+e);case Bre:return xre(e,n);case Hre:case Yre:case Ure:case zre:case Vre:case Wre:case $re:case Zre:case qre:return kre(e,n);case Fre:return new r;case Ore:case Lre:return new r(e);case Pre:return Cre(e);case jre:return new r;case Rre:return Mre(e)}}var Jre=Gre,Kre=Gu,ZM=Object.create,Qre=function(){function e(){}return function(t){if(!Kre(t))return{};if(ZM)return ZM(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),X8=Qre,Xre=X8,eae=Yb,tae=vI;function nae(e){return typeof e.constructor=="function"&&!tae(e)?Xre(eae(e)):{}}var rae=nae,aae=jb,oae=od,iae="[object Map]";function sae(e){return oae(e)&&aae(e)==iae}var lae=sae,uae=lae,cae=Pb,qM=mI,GM=qM&&qM.isMap,dae=GM?cae(GM):uae,fae=dae,hae=jb,pae=od,mae="[object Set]";function gae(e){return pae(e)&&hae(e)==mae}var vae=gae,yae=vae,wae=Pb,JM=mI,KM=JM&&JM.isSet,bae=KM?wae(KM):yae,Sae=bae,Dae=dI,Tae=G8,Iae=J8,Eae=Dne,xae=Bne,Cae=Hne,Mae=Une,kae=$ne,Nae=are,Aae=O8,Fae=Q8,Oae=jb,Pae=fre,jae=Jre,Lae=rae,Rae=ss,_ae=Ob,Bae=fae,Hae=Gu,Yae=Sae,Uae=Vv,zae=Hb,Vae=1,Wae=2,$ae=4,e9="[object Arguments]",Zae="[object Array]",qae="[object Boolean]",Gae="[object Date]",Jae="[object Error]",t9="[object Function]",Kae="[object GeneratorFunction]",Qae="[object Map]",Xae="[object Number]",n9="[object Object]",eoe="[object RegExp]",toe="[object Set]",noe="[object String]",roe="[object Symbol]",aoe="[object WeakMap]",ooe="[object ArrayBuffer]",ioe="[object DataView]",soe="[object Float32Array]",loe="[object Float64Array]",uoe="[object Int8Array]",coe="[object Int16Array]",doe="[object Int32Array]",foe="[object Uint8Array]",hoe="[object Uint8ClampedArray]",poe="[object Uint16Array]",moe="[object Uint32Array]",rr={};rr[e9]=rr[Zae]=rr[ooe]=rr[ioe]=rr[qae]=rr[Gae]=rr[soe]=rr[loe]=rr[uoe]=rr[coe]=rr[doe]=rr[Qae]=rr[Xae]=rr[n9]=rr[eoe]=rr[toe]=rr[noe]=rr[roe]=rr[foe]=rr[hoe]=rr[poe]=rr[moe]=!0;rr[Jae]=rr[t9]=rr[aoe]=!1;function sw(e,t,n,r,a,o){var i,l=t&Vae,c=t&Wae,f=t&$ae;if(n&&(i=a?n(e,r,a,o):n(e)),i!==void 0)return i;if(!Hae(e))return e;var p=Rae(e);if(p){if(i=Pae(e),!l)return Mae(e,i)}else{var g=Oae(e),y=g==t9||g==Kae;if(_ae(e))return Cae(e,l);if(g==n9||g==e9||y&&!a){if(i=c||y?{}:Lae(e),!l)return c?Nae(e,xae(i,e)):kae(e,Eae(i,e))}else{if(!rr[g])return a?e:{};i=jae(e,g,l)}}o||(o=new Dae);var w=o.get(e);if(w)return w;o.set(e,i),Yae(e)?e.forEach(function(I){i.add(sw(I,t,n,I,e,o))}):Bae(e)&&e.forEach(function(I,M){i.set(M,sw(I,t,n,M,e,o))});var T=f?c?Fae:Aae:c?zae:Uae,S=p?void 0:T(e);return Tae(S||e,function(I,M){S&&(M=I,I=e[M]),Iae(i,M,sw(I,t,n,M,e,o))}),i}var goe=sw;function voe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var yoe=voe,woe=Rb,boe=p8;function Soe(e,t){return t.length<2?e:woe(e,boe(t,0,-1))}var Doe=Soe,Toe=Lb,Ioe=yoe,Eoe=Doe,xoe=Wv;function Coe(e,t){return t=Toe(t,e),e=Eoe(e,t),e==null||delete e[xoe(Ioe(t))]}var Moe=Coe,koe=Vp,Noe=Yb,Aoe=od,Foe="[object Object]",Ooe=Function.prototype,Poe=Object.prototype,r9=Ooe.toString,joe=Poe.hasOwnProperty,Loe=r9.call(Object);function Roe(e){if(!Aoe(e)||koe(e)!=Foe)return!1;var t=Noe(e);if(t===null)return!0;var n=joe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&r9.call(n)==Loe}var _oe=Roe,Boe=_oe;function Hoe(e){return Boe(e)?void 0:e}var Yoe=Hoe,Uoe=z8;function zoe(e){var t=e==null?0:e.length;return t?Uoe(e,1):[]}var Voe=zoe,Woe=Voe,$oe=V8,Zoe=$8;function qoe(e){return Zoe($oe(e,void 0,Woe),e+"")}var Goe=qoe,Joe=SI,Koe=goe,Qoe=Moe,Xoe=Lb,eie=$v,tie=Yoe,nie=Goe,rie=Q8,aie=1,oie=2,iie=4,sie=nie(function(e,t){var n={};if(e==null)return n;var r=!1;t=Joe(t,function(o){return o=Xoe(o,e),r||(r=o.length>1),o}),eie(e,rie(e),n),r&&(n=Koe(n,aie|oie|iie,tie));for(var a=t.length;a--;)Qoe(n,t[a]);return n}),lie=sie;const uie=qt(lie);var cie=Z8,die=Hv,fie=Mb,hie=Hb,a9=Object.prototype,pie=a9.hasOwnProperty,mie=cie(function(e,t){e=Object(e);var n=-1,r=t.length,a=r>2?t[2]:void 0;for(a&&fie(t[0],t[1],a)&&(r=1);++n<r;)for(var o=t[n],i=hie(o),l=-1,c=i.length;++l<c;){var f=i[l],p=e[f];(p===void 0||die(p,a9[f])&&!pie.call(e,f))&&(e[f]=o[f])}return e}),gie=mie;const vie=qt(gie);var yie=G8,wie=X8,bie=DI,Sie=Bb,Die=Yb,Tie=ss,Iie=Ob,Eie=rI,xie=Gu,Cie=gI;function Mie(e,t,n){var r=Tie(e),a=r||Iie(e)||Cie(e);if(t=Sie(t),n==null){var o=e&&e.constructor;a?n=r?new o:[]:xie(e)?n=Eie(o)?wie(Die(e)):{}:n={}}return(a?yie:bie)(e,function(i,l,c){return t(n,i,l,c)}),n}var kie=Mie;const Nie=qt(kie);var Aie=TI,Fie=DI,Oie=Bb;function Pie(e,t){var n={};return t=Oie(t),Fie(e,function(r,a,o){Aie(n,a,t(r,a,o))}),n}var jie=Pie;const Lie=qt(jie);var Rie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){return function(n,r,a){r.prototype.isBetween=function(o,i,l,c){var f=a(o),p=a(i),g=(c=c||"()")[0]==="(",y=c[1]===")";return(g?this.isAfter(f,l):!this.isBefore(f,l))&&(y?this.isBefore(p,l):!this.isAfter(p,l))||(g?this.isBefore(f,l):!this.isAfter(f,l))&&(y?this.isAfter(p,l):!this.isBefore(p,l))}}})})(Rie);var _ie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){return function(n,r){r.prototype.isSameOrAfter=function(a,o){return this.isSame(a,o)||this.isAfter(a,o)}}})})(_ie);var Bie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){return function(n,r){r.prototype.isSameOrBefore=function(a,o){return this.isSame(a,o)||this.isBefore(a,o)}}})})(Bie);var Hie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){return function(n,r,a){var o=r.prototype,i=function(g){return g&&(g.indexOf?g:g.s)},l=function(g,y,w,T,S){var I=g.name?g:g.$locale(),M=i(I[y]),N=i(I[w]),_=M||N.map(function(R){return R.slice(0,T)});if(!S)return _;var k=I.weekStart;return _.map(function(R,L){return _[(L+(k||0))%7]})},c=function(){return a.Ls[a.locale()]},f=function(g,y){return g.formats[y]||function(w){return w.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(T,S,I){return S||I.slice(1)})}(g.formats[y.toUpperCase()])},p=function(){var g=this;return{months:function(y){return y?y.format("MMMM"):l(g,"months")},monthsShort:function(y){return y?y.format("MMM"):l(g,"monthsShort","months",3)},firstDayOfWeek:function(){return g.$locale().weekStart||0},weekdays:function(y){return y?y.format("dddd"):l(g,"weekdays")},weekdaysMin:function(y){return y?y.format("dd"):l(g,"weekdaysMin","weekdays",2)},weekdaysShort:function(y){return y?y.format("ddd"):l(g,"weekdaysShort","weekdays",3)},longDateFormat:function(y){return f(g.$locale(),y)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return p.bind(this)()},a.localeData=function(){var g=c();return{firstDayOfWeek:function(){return g.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(y){return f(g,y)},meridiem:g.meridiem,ordinal:g.ordinal}},a.months=function(){return l(c(),"months")},a.monthsShort=function(){return l(c(),"monthsShort","months",3)},a.weekdays=function(g){return l(c(),"weekdays",null,null,g)},a.weekdaysShort=function(g){return l(c(),"weekdaysShort","weekdays",3,g)},a.weekdaysMin=function(g){return l(c(),"weekdaysMin","weekdays",2,g)}}})})(Hie);var Yie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,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,a,o){var i=a.prototype,l=i.format;o.en.formats=n,i.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var f=this.$locale().formats,p=function(g,y){return g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,T,S){var I=S&&S.toUpperCase();return T||y[S]||n[S]||y[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,N,_){return N||_.slice(1)})})}(c,f===void 0?{}:f);return l.call(this,p)}}})})(Yie);var Uie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){return function(n,r,a){var o=function(i,l){if(!l||!l.length||l.length===1&&!l[0]||l.length===1&&Array.isArray(l[0])&&!l[0].length)return null;var c;l.length===1&&l[0].length>0&&(l=l[0]),c=(l=l.filter(function(p){return p}))[0];for(var f=1;f<l.length;f+=1)l[f].isValid()&&!l[f][i](c)||(c=l[f]);return c};a.max=function(){var i=[].slice.call(arguments,0);return o("isAfter",i)},a.min=function(){var i=[].slice.call(arguments,0);return o("isBefore",i)}}})})(Uie);var zie={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(dr,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(o,i,l){var c=i.prototype;l.utc=function(S){var I={date:S,utc:!0,args:arguments};return new i(I)},c.utc=function(S){var I=l(this.toDate(),{locale:this.$L,utc:!0});return S?I.add(this.utcOffset(),n):I},c.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var f=c.parse;c.parse=function(S){S.utc&&(this.$u=!0),this.$utils().u(S.$offset)||(this.$offset=S.$offset),f.call(this,S)};var p=c.init;c.init=function(){if(this.$u){var S=this.$d;this.$y=S.getUTCFullYear(),this.$M=S.getUTCMonth(),this.$D=S.getUTCDate(),this.$W=S.getUTCDay(),this.$H=S.getUTCHours(),this.$m=S.getUTCMinutes(),this.$s=S.getUTCSeconds(),this.$ms=S.getUTCMilliseconds()}else p.call(this)};var g=c.utcOffset;c.utcOffset=function(S,I){var M=this.$utils().u;if(M(S))return this.$u?0:M(this.$offset)?g.call(this):this.$offset;if(typeof S=="string"&&(S=function(R){R===void 0&&(R="");var L=R.match(r);if(!L)return null;var H=(""+L[0]).match(a)||["-",0,0],U=H[0],z=60*+H[1]+ +H[2];return z===0?0:U==="+"?z:-z}(S),S===null))return this;var N=Math.abs(S)<=16?60*S:S,_=this;if(I)return _.$offset=N,_.$u=S===0,_;if(S!==0){var k=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(_=this.local().add(N+k,n)).$offset=N,_.$x.$localOffset=k}else _=this.utc();return _};var y=c.format;c.format=function(S){var I=S||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,I)},c.valueOf=function(){var S=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*S},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var w=c.toDate;c.toDate=function(S){return S==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var T=c.diff;c.diff=function(S,I,M){if(S&&this.$u===S.$u)return T.call(this,S,I,M);var N=this.local(),_=l(S).local();return T.call(N,_,I,M)}}})})(zie);function Pu(e){return e.children}var ri={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},Mo={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"},QM=Object.keys(Mo).map(function(e){return Mo[e]});ke.oneOfType([ke.string,ke.func]);ke.any;ke.func;ke.oneOfType([ke.arrayOf(ke.oneOf(QM)),ke.objectOf(function(e,t){var n=QM.indexOf(t)!==-1&&typeof e[t]=="boolean";if(n)return null;for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];return ke.elementType.apply(ke,[e,t].concat(a))})]);ke.oneOfType([ke.oneOf(["overlap","no-overlap"]),ke.func]);function gr(e,t){e&&e.apply(null,[].concat(t))}var XM={seconds:1e3,minutes:1e3*60,hours:1e3*60*60,day:1e3*60*60*24};function o9(e,t){var n=$a(e,"month");return $a(n,"week",t.startOfWeek())}function i9(e,t){var n=Rw(e,"month");return Rw(n,"week",t.startOfWeek())}function Vie(e,t){for(var n=o9(e,t),r=i9(e,t),a=[];Yp(n,r,"day");)a.push(n),n=zs(n,1,"day");return a}function Wie(e,t){var n=$a(e,t);return _v(n,e)?n:zs(n,1,t)}function $ie(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",r=e,a=[];Yp(r,t,n);)a.push(r),r=zs(r,1,n);return a}function Zie(e,t){return t==null&&e==null?null:(t==null&&(t=new Date),e==null&&(e=new Date),e=$a(e,"day"),e=sv(e,sv(t)),e=Tp(e,Tp(t)),e=iv(e,iv(t)),ov(e,ov(t)))}function e3(e){return sv(e)===0&&Tp(e)===0&&iv(e)===0&&ov(e)===0}function qie(e,t,n,r){return n==="day"&&(n="date"),Math.abs(WC[n](e,void 0,r)-WC[n](t,void 0,r))}function EI(e,t,n){return!n||n==="milliseconds"?Math.abs(+e-+t):Math.round(Math.abs(+$a(e,n)/XM[n]-+$a(t,n)/XM[n]))}var Gie=ke.oneOfType([ke.string,ke.func]);function Jie(e,t,n,r,a){var o=typeof r=="function"?r(n,a,e):t.call(e,n,r,a);return Xg(o==null||typeof o=="string","`localizer format(..)` must return a string, null, or undefined"),o}function Kie(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function xI(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function Qie(e,t){return EI(e,t,"minutes")+xI(e,t)}function Xie(e){var t=$a(e,"day");return EI(t,e,"minutes")+xI(t,e)}function ese(e,t){return nI(e,t,"day")}function tse(e,t,n){var r=_v(e,t,"minutes");return r?Bv(t,n,"minutes"):Cb(t,n,"minutes")}function PT(e,t){return qie(e,t,"day")}function nse(e){var t=e.evtA,n=t.start,r=t.end,a=t.allDay,o=e.evtB,i=o.start,l=o.end,c=o.allDay,f=+$a(n,"day")-+$a(i,"day"),p=PT(n,r),g=PT(i,l);return f||g-p||!!c-!!a||+n-+i||+r-+l}function rse(e){var t=e.event,n=t.start,r=t.end,a=e.range,o=a.start,i=a.end,l=$a(n,"day"),c=Yp(l,i,"day"),f=tI(l,r,"minutes"),p=f?Cb(r,o,"minutes"):Bv(r,o,"minutes");return c&&p}function ase(e,t){return _v(e,t,"day")}function ose(e,t){return e3(e)&&e3(t)}var ise=ka(function e(t){var n=this;Ma(this,e),Xg(typeof t.format=="function","date localizer `format(..)` must be a function"),Xg(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||Gie,this.formats=t.formats,this.format=function(){for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return Jie.apply(void 0,[n,t.format].concat(a))},this.startOfWeek=t.firstOfWeek,this.merge=t.merge||Zie,this.inRange=t.inRange||u8,this.lt=t.lt||nI,this.lte=t.lte||Yp,this.gt=t.gt||Cb,this.gte=t.gte||Bv,this.eq=t.eq||_v,this.neq=t.neq||tI,this.startOf=t.startOf||$a,this.endOf=t.endOf||Rw,this.add=t.add||zs,this.range=t.range||$ie,this.diff=t.diff||EI,this.ceil=t.ceil||Wie,this.min=t.min||s8,this.max=t.max||l8,this.minutes=t.minutes||Tp,this.daySpan=t.daySpan||PT,this.firstVisibleDay=t.firstVisibleDay||o9,this.lastVisibleDay=t.lastVisibleDay||i9,this.visibleDays=t.visibleDays||Vie,this.getSlotDate=t.getSlotDate||Kie,this.getTimezoneOffset=t.getTimezoneOffset||function(r){return r.getTimezoneOffset()},this.getDstOffset=t.getDstOffset||xI,this.getTotalMin=t.getTotalMin||Qie,this.getMinutesFromMidnight=t.getMinutesFromMidnight||Xie,this.continuesPrior=t.continuesPrior||ese,this.continuesAfter=t.continuesAfter||tse,this.sortEvents=t.sortEvents||nse,this.inEventRange=t.inEventRange||rse,this.isSameDate=t.isSameDate||ase,this.startAndEndAreDateOnly=t.startAndEndAreDateOnly||ose,this.segmentOffset=t.browserTZOffset?t.browserTZOffset():0});function sse(e,t,n,r){var a=tr(tr({},e.formats),n);return tr(tr({},e),{},{messages:r,startOfWeek:function(){return e.startOfWeek(t)},format:function(i,l){return e.format(i,a[l]||l,t)}})}var lse={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 use(e){return tr(tr({},lse),e)}function cse(e){var t=e.ref,n=e.callback;P.useEffect(function(){var r=function(o){t.current&&!t.current.contains(o.target)&&n()};return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[t,n])}var dse=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],s9=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.style,o=r.className,i=r.event,l=r.selected,c=r.isAllDay,f=r.onSelect,p=r.onDoubleClick,g=r.onKeyPress,y=r.localizer,w=r.continuesPrior,T=r.continuesAfter,S=r.accessors,I=r.getters,M=r.children,N=r.components,_=N.event,k=N.eventWrapper,R=r.slotStart,L=r.slotEnd,H=Ql(r,dse);delete H.resizable;var U=S.title(i),z=S.tooltip(i),$=S.end(i),X=S.start(i),Q=S.allDay(i),se=c||Q||y.diff(X,y.ceil($,"day"),"day")>1,ue=I.eventProp(i,X,$,l),fe=ne.createElement("div",{className:"rbc-event-content",title:z||void 0},_?ne.createElement(_,{event:i,continuesPrior:w,continuesAfter:T,title:U,isAllDay:Q,localizer:y,slotStart:R,slotEnd:L}):U);return ne.createElement(k,Object.assign({},this.props,{type:"date"}),ne.createElement("div",Object.assign({},H,{style:tr(tr({},ue.style),a),className:ca("rbc-event",o,ue.className,{"rbc-selected":l,"rbc-event-allday":se,"rbc-event-continues-prior":w,"rbc-event-continues-after":T}),onClick:function(pe){return f&&f(i,pe)},onDoubleClick:function(pe){return p&&p(i,pe)},onKeyDown:function(pe){return g&&g(i,pe)}}),typeof M=="function"?M(fe):fe))}}]),t}(ne.Component);function Ub(e,t){return!e||t==null?!1:kQ(e,t)}function l9(e,t){var n=e.right-e.left,r=n/t;return r}function u9(e,t,n,r){var a=l9(e,r);return n?r-1-Math.floor((t-e.left)/a):Math.floor((t-e.left)/a)}function fse(e,t){var n=t.x,r=t.y;return r>=e.top&&r<=e.bottom&&n>=e.left&&n<=e.right}function hse(e,t,n,r,a){var o=-1,i=-1,l=r-1,c=l9(t,r),f=u9(t,n.x,a,r),p=t.top<n.y&&t.bottom>n.y,g=t.top<e.y&&t.bottom>e.y,y=e.y>t.bottom,w=t.top>e.y,T=n.top<t.top&&n.bottom>t.bottom;return T&&(o=0,i=l),p&&(w?(o=0,i=f):y&&(o=f,i=l)),g&&(o=i=a?l-Math.floor((e.x-t.left)/c):Math.floor((e.x-t.left)/c),p?f<o?o=f:i=f:e.y<n.y?i=l:o=0),{startIdx:o,endIdx:i}}function pse(e){var t=e.target,n=e.offset,r=e.container,a=e.box,o=hf(t),i=o.top,l=o.left,c=o.width,f=o.height,p=hf(r),g=p.top,y=p.left,w=p.width,T=p.height,S=hf(a),I=S.width,M=S.height,N=g+T,_=y+w,k=i+M,R=l+I,L=n.x,H=n.y,U=k>N?i-M-H:i+H+f,z=R>_?l+L-I+c:l+L;return{topOffset:U,leftOffset:z}}function mse(e){var t=e.containerRef,n=e.accessors,r=e.getters,a=e.selected,o=e.components,i=e.localizer,l=e.position,c=e.show,f=e.events,p=e.slotStart,g=e.slotEnd,y=e.onSelect,w=e.onDoubleClick,T=e.onKeyPress,S=e.handleDragStart,I=e.popperRef,M=e.target,N=e.offset;cse({ref:I,callback:c}),P.useLayoutEffect(function(){var R=pse({target:M,offset:N,container:t.current,box:I.current}),L=R.topOffset,H=R.leftOffset;I.current.style.top="".concat(L,"px"),I.current.style.left="".concat(H,"px")},[N.x,N.y,M]);var _=l.width,k={minWidth:_+_/2};return ne.createElement("div",{style:k,className:"rbc-overlay",ref:I},ne.createElement("div",{className:"rbc-overlay-header"},i.format(p,"dayHeaderFormat")),f.map(function(R,L){return ne.createElement(s9,{key:L,type:"popup",localizer:i,event:R,getters:r,onSelect:y,accessors:n,components:o,onDoubleClick:w,onKeyPress:T,continuesPrior:i.lt(n.end(R),p,"day"),continuesAfter:i.gte(n.start(R),g,"day"),slotStart:p,slotEnd:g,selected:Ub(R,a),draggable:!0,onDragStart:function(){return S(R)},onDragEnd:function(){return c()}})}))}var c9=ne.forwardRef(function(e,t){return ne.createElement(mse,Object.assign({},e,{popperRef:t}))});c9.propTypes={accessors:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,components:ke.object.isRequired,localizer:ke.object.isRequired,position:ke.object.isRequired,show:ke.func.isRequired,events:ke.array.isRequired,slotStart:ke.instanceOf(Date).isRequired,slotEnd:ke.instanceOf(Date),onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func,handleDragStart:ke.func,style:ke.object,offset:ke.shape({x:ke.number,y:ke.number})};function gse(e){var t=e.containerRef,n=e.popupOffset,r=n===void 0?5:n,a=e.overlay,o=e.accessors,i=e.localizer,l=e.components,c=e.getters,f=e.selected,p=e.handleSelectEvent,g=e.handleDoubleClickEvent,y=e.handleKeyPressEvent,w=e.handleDragStart,T=e.onHide,S=e.overlayDisplay,I=P.useRef(null);if(!a.position)return null;var M=r;isNaN(r)||(M={x:r,y:r});var N=a.position,_=a.events,k=a.date,R=a.end;return ne.createElement(nZ,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:T,target:a.target},function(L){var H=L.props;return ne.createElement(c9,Object.assign({},H,{containerRef:t,ref:I,target:a.target,offset:M,accessors:o,getters:c,selected:f,components:l,localizer:i,position:N,show:S,events:_,slotStart:k,slotEnd:R,onSelect:p,onDoubleClick:g,onKeyPress:y,handleDragStart:w}))})}var CI=ne.forwardRef(function(e,t){return ne.createElement(gse,Object.assign({},e,{containerRef:t}))});CI.propTypes={popupOffset:ke.oneOfType([ke.number,ke.shape({x:ke.number,y:ke.number})]),overlay:ke.shape({position:ke.object,events:ke.array,date:ke.instanceOf(Date),end:ke.instanceOf(Date)}),accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,handleSelectEvent:ke.func,handleDoubleClickEvent:ke.func,handleKeyPressEvent:ke.func,handleDragStart:ke.func,onHide:ke.func,overlayDisplay:ke.func};function ao(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return Og(n,e,t,{passive:!1})}function vse(e,t,n){return!e||lv(e,document.elementFromPoint(t,n))}function yse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return L8(a,".rbc-event",e)}function wse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return L8(a,".rbc-show-more",e)}function zw(e,t){return!!yse(e,t)}function bse(e,t){return!!wse(e,t)}function Xh(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 t3=5,Sse=250,d9=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,a=r===void 0?!1:r,o=n.longPressThreshold,i=o===void 0?250:o,l=n.validContainers,c=l===void 0?[]:l;Ma(this,e),this.isDetached=!1,this.container=t,this.globalMouse=!t||a,this.longPressThreshold=i,this.validContainers=c,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=ao("touchmove",function(){},window),this._removeKeyDownListener=ao("keydown",this._keyListener),this._removeKeyUpListener=ao("keyup",this._keyListener),this._removeDropFromOutsideListener=ao("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=ao("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return ka(e,[{key:"on",value:function(n,r){var a=this._listeners[n]||(this._listeners[n]=[]);return a.push(r),{remove:function(){var i=a.indexOf(r);i!==-1&&a.splice(i,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];var i,l=this._listeners[n]||[];return l.forEach(function(c){i===void 0&&(i=c.apply(void 0,a))}),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:n3(r,If(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 a=this,o=null,i=null,l=null,c=function(y){o=setTimeout(function(){p(),n(y)},a.longPressThreshold),i=ao("touchmove",function(){return p()}),l=ao("touchend",function(){return p()})},f=ao("touchstart",c),p=function(){o&&clearTimeout(o),i&&i(),l&&l(),o=null,i=null,l=null};return r&&c(r),function(){p(),f()}}},{key:"_addInitialEventListener",value:function(){var n=this,r=ao("mousedown",function(o){n._removeInitialEventListener(),n._handleInitialEvent(o),n._removeInitialEventListener=ao("mousedown",n._handleInitialEvent)}),a=ao("touchstart",function(o){n._removeInitialEventListener(),n._removeInitialEventListener=n._addLongPressListener(n._handleInitialEvent,o)});this._removeInitialEventListener=function(){r(),a()}}},{key:"_dropFromOutsideListener",value:function(n){var r=Xh(n),a=r.pageX,o=r.pageY,i=r.clientX,l=r.clientY;this.emit("dropFromOutside",{x:a,y:o,clientX:i,clientY:l}),n.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(n){var r=Xh(n),a=r.pageX,o=r.pageY,i=r.clientX,l=r.clientY;this.emit("dragOverFromOutside",{x:a,y:o,clientX:i,clientY:l}),n.preventDefault()}},{key:"_handleInitialEvent",value:function(n){if(!this.isDetached){var r=Xh(n),a=r.clientX,o=r.clientY,i=r.pageX,l=r.pageY,c=this.container(),f,p;if(!(n.which===3||n.button===2||!vse(c,a,o))){if(!this.globalMouse&&c&&!lv(c,n.target)){var g=Dse(0),y=g.top,w=g.left,T=g.bottom,S=g.right;if(p=If(c),f=n3({top:p.top-y,left:p.left-w,bottom:p.bottom+T,right:p.right+S},{top:l,left:i}),!f)return}var I=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(n.type),x:i,y:l,clientX:a,clientY:o});if(I!==!1)switch(n.type){case"mousedown":this._removeEndListener=ao("mouseup",this._handleTerminatingEvent),this._onEscListener=ao("keydown",this._handleTerminatingEvent),this._removeMoveListener=ao("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(n),this._removeEndListener=ao("touchend",this._handleTerminatingEvent),this._removeMoveListener=ao("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(n){var r=n.target,a=this.validContainers;return!a||!a.length||!r?!0:a.some(function(o){return!!r.closest(o)})}},{key:"_handleTerminatingEvent",value:function(n){var r=Xh(n),a=r.pageX,o=r.pageY;if(this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),!!this._initialEventData){var i=!this.container||lv(this.container(),n.target),l=this._isWithinValidContainer(n),c=this._selectRect,f=this.isClick(a,o);return this._initialEventData=null,n.key==="Escape"||!l?this.emit("reset"):f&&i?this._handleClickEvent(n):f?this.emit("reset"):this.emit("select",c)}}},{key:"_handleClickEvent",value:function(n){var r=Xh(n),a=r.pageX,o=r.pageY,i=r.clientX,l=r.clientY,c=new Date().getTime();return this._lastClickData&&c-this._lastClickData.timestamp<Sse?(this._lastClickData=null,this.emit("doubleClick",{x:a,y:o,clientX:i,clientY:l})):(this._lastClickData={timestamp:c},this.emit("click",{x:a,y:o,clientX:i,clientY:l}))}},{key:"_handleMoveEvent",value:function(n){if(!(this._initialEventData===null||this.isDetached)){var r=this._initialEventData,a=r.x,o=r.y,i=Xh(n),l=i.pageX,c=i.pageY,f=Math.abs(a-l),p=Math.abs(o-c),g=Math.min(l,a),y=Math.min(c,o),w=this.selecting;this.isClick(l,c)&&!w&&!(f||p)||(this.selecting=!0,this._selectRect={top:y,left:g,x:l,y:c,right:g+f,bottom:y+p},w||this.emit("selectStart",this._initialEventData),this.isClick(l,c)||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 a=this._initialEventData,o=a.x,i=a.y,l=a.isTouch;return!l&&Math.abs(n-o)<=t3&&Math.abs(r-i)<=t3}}]),e}();function Dse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return Uu(e)!=="object"&&(e={top:e,left:e,right:e,bottom:e}),e}function n3(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=If(e),a=r.top,o=r.left,i=r.right,l=i===void 0?o:i,c=r.bottom,f=c===void 0?a:c,p=If(t),g=p.top,y=p.left,w=p.right,T=w===void 0?y:w,S=p.bottom,I=S===void 0?g:S;return!(f-n<g||a+n>I||l-n<y||o+n>T)}function If(e){if(!e.getBoundingClientRect)return e;var t=e.getBoundingClientRect(),n=t.left+r3("left"),r=t.top+r3("top");return{top:r,left:n,right:(e.offsetWidth||0)+n,bottom:(e.offsetHeight||0)+r}}function r3(e){if(e==="left")return window.pageXOffset||document.body.scrollLeft||0;if(e==="top")return window.pageYOffset||document.body.scrollTop||0}var Tse=function(e){Ao(t,e);function t(n,r){var a;return Ma(this,t),a=No(this,t,[n,r]),a.state={selecting:!1},a.containerRef=P.createRef(),a}return ka(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,a=r.range,o=r.getNow,i=r.getters,l=r.date,c=r.components.dateCellWrapper,f=r.localizer,p=this.state,g=p.selecting,y=p.startIdx,w=p.endIdx,T=o();return ne.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},a.map(function(S,I){var M=g&&I>=y&&I<=w,N=i.dayProp(S),_=N.className,k=N.style;return ne.createElement(c,{key:I,value:S,range:a},ne.createElement("div",{style:k,className:ca("rbc-day-bg",_,M&&"rbc-selected-cell",f.isSameDate(S,T)&&"rbc-today",l&&f.neq(l,S,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,a=this.containerRef.current,o=this._selector=new d9(this.props.container,{longPressThreshold:this.props.longPressThreshold}),i=function(c,f){if(!zw(a,c)&&!bse(a,c)){var p=If(a),g=r.props,y=g.range,w=g.rtl;if(fse(p,c)){var T=u9(p,c.x,w,y.length);r._selectSlot({startIdx:T,endIdx:T,action:f,box:c})}}r._initial={},r.setState({selecting:!1})};o.on("selecting",function(l){var c=r.props,f=c.range,p=c.rtl,g=-1,y=-1;if(r.state.selecting||(gr(r.props.onSelectStart,[l]),r._initial={x:l.x,y:l.y}),o.isSelected(a)){var w=If(a),T=hse(r._initial,w,l,f.length,p);g=T.startIdx,y=T.endIdx}r.setState({selecting:!0,startIdx:g,endIdx:y})}),o.on("beforeSelect",function(l){if(r.props.selectable==="ignoreEvents")return!zw(r.containerRef.current,l)}),o.on("click",function(l){return i(l,"click")}),o.on("doubleClick",function(l){return i(l,"doubleClick")}),o.on("select",function(l){r._selectSlot(tr(tr({},r.state),{},{action:"select",bounds:l})),r._initial={},r.setState({selecting:!1}),gr(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var a=r.endIdx,o=r.startIdx,i=r.action,l=r.bounds,c=r.box;a!==-1&&o!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:o,end:a,action:i,bounds:l,box:c,resourceId:this.props.resourceId})}}]),t}(ne.Component),Wl={propTypes:{slotMetrics:ke.object.isRequired,selected:ke.object,isAllDay:ke.bool,accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,n){var r=t.selected;t.isAllDay;var a=t.accessors,o=t.getters,i=t.onSelect,l=t.onDoubleClick,c=t.onKeyPress,f=t.localizer,p=t.slotMetrics,g=t.components,y=t.resizable,w=p.continuesPrior(n),T=p.continuesAfter(n);return ne.createElement(s9,{event:n,getters:o,localizer:f,accessors:a,components:g,onSelect:i,onDoubleClick:l,onKeyPress:c,continuesPrior:w,continuesAfter:T,slotStart:p.first,slotEnd:p.last,selected:Ub(n,r),resizable:y})},renderSpan:function(t,n,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",o=Math.abs(n)/t*100+"%";return ne.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:o,flexBasis:o,maxWidth:o}},a)}},f9=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.segments,i=a.slotMetrics.slots,l=a.className,c=1;return ne.createElement("div",{className:ca(l,"rbc-row")},o.reduce(function(f,p,g){var y=p.event,w=p.left,T=p.right,S=p.span,I="_lvl_"+g,M=w-c,N=Wl.renderEvent(r.props,y);return M&&f.push(Wl.renderSpan(i,M,"".concat(I,"_gap"))),f.push(Wl.renderSpan(i,S,I,N)),c=T+1,f},[]))}}]),t}(ne.Component);f9.defaultProps=tr({},Wl.defaultProps);function h9(e){var t=e.dateRange,n=e.unit,r=n===void 0?"day":n,a=e.localizer;return{first:t[0],last:a.add(t[t.length-1],1,r)}}function Ise(e,t,n,r){var a=h9({dateRange:t,localizer:r}),o=a.first,i=a.last,l=r.diff(o,i,"day"),c=r.max(r.startOf(n.start(e),"day"),o),f=r.min(r.ceil(n.end(e),"day"),i),p=Nee(t,function(y){return r.isSameDate(y,c)}),g=r.diff(c,f,"day");return g=Math.min(g,l),g=Math.max(g-r.segmentOffset,1),{event:e,span:g,left:p+1,right:Math.max(p+g,1)}}function p9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,a,o=[],i=[];for(n=0;n<e.length;n++){for(a=e[n],r=0;r<o.length&&Ese(a,o[r]);r++);r>=t?i.push(a):(o[r]||(o[r]=[])).push(a)}for(n=0;n<o.length;n++)o[n].sort(function(l,c){return l.left-c.left});return{levels:o,extra:i}}function uv(e,t,n,r,a){var o={start:r.start(e),end:r.end(e)},i={start:t,end:n};return a.inEventRange({event:o,range:i})}function Ese(e,t){return t.some(function(n){return n.left<=e.right&&n.right>=e.left})}function xse(e,t,n){var r=iw(e),a=[],o=[];r.forEach(function(c){var f=t.start(c),p=t.end(c);n.daySpan(f,p)>1?a.push(c):o.push(c)});var i=a.sort(function(c,f){return jT(c,f,t,n)}),l=o.sort(function(c,f){return jT(c,f,t,n)});return[].concat(iw(i),iw(l))}function jT(e,t,n,r){var a={start:n.start(e),end:n.end(e),allDay:n.allDay(e)},o={start:n.start(t),end:n.end(t),allDay:n.allDay(t)};return r.sortEvents({evtA:a,evtB:o})}var m9=function(t,n){return t.left<=n&&t.right>=n},a3=function(t,n){return t.filter(function(r){return m9(r,n)}).map(function(r){return r.event})},g9=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){for(var r=this.props,a=r.segments,o=r.slotMetrics.slots,i=p9(a).levels[0],l=1,c=1,f=[];l<=o;){var p="_lvl_"+l,g=i.filter(function(N){return m9(N,l)})[0]||{},y=g.event,w=g.left,T=g.right,S=g.span;if(!y){l++;continue}var I=Math.max(0,w-c);if(this.canRenderSlotEvent(w,S)){var M=Wl.renderEvent(this.props,y);I&&f.push(Wl.renderSpan(o,I,p+"_gap")),f.push(Wl.renderSpan(o,S,p,M)),c=l=T+1}else I&&f.push(Wl.renderSpan(o,I,p+"_gap")),f.push(Wl.renderSpan(o,1,p,this.renderShowMore(a,l))),c=l+=1}return ne.createElement("div",{className:"rbc-row"},f)}},{key:"canRenderSlotEvent",value:function(r,a){var o=this.props.segments;return Uee(r,r+a).every(function(i){var l=a3(o,i).length;return l===1})}},{key:"renderShowMore",value:function(r,a){var o=this,i=this.props,l=i.localizer,c=i.slotMetrics,f=c.getEventsForSlot(a),p=a3(r,a),g=p.length;return g?ne.createElement("button",{type:"button",key:"sm_"+a,className:ca("rbc-button-link","rbc-show-more"),onClick:function(w){return o.showMore(a,w)}},l.messages.showMore(g,p,f)):!1}},{key:"showMore",value:function(r,a){a.preventDefault(),a.stopPropagation(),this.props.onShowMore(r,a.target)}}]),t}(ne.Component);g9.defaultProps=tr({},Wl.defaultProps);var Cse=function(t){var n=t.children;return ne.createElement("div",{className:"rbc-row-content-scroll-container"},n)},Mse=function(t,n){return t.left<=n&&t.right>=n},kse=function(t,n){return t[0].range===n[0].range&&t[0].events===n[0].events};function v9(){return Y8(function(e){for(var t=e.range,n=e.events,r=e.maxRows,a=e.minRows,o=e.accessors,i=e.localizer,l=h9({dateRange:t,localizer:i}),c=l.first,f=l.last,p=n.map(function(S){return Ise(S,t,o,i)}),g=p9(p,Math.max(r-1,1)),y=g.levels,w=g.extra,T=w.length>0?a-1:a;y.length<T;)y.push([]);return{first:c,last:f,levels:y,extra:w,range:t,slots:t.length,clone:function(I){var M=v9();return M(tr(tr({},e),I))},getDateForSlot:function(I){return t[I]},getSlotForDate:function(I){return t.find(function(M){return i.isSameDate(M,I)})},getEventsForSlot:function(I){return p.filter(function(M){return Mse(M,I)}).map(function(M){return M.event})},continuesPrior:function(I){return i.continuesPrior(o.start(I),c)},continuesAfter:function(I){var M=o.start(I),N=o.end(I);return i.continuesAfter(M,N,f)}}},kse)}var Vw=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.handleSelectSlot=function(i){var l=n.props,c=l.range,f=l.onSelectSlot;f(c.slice(i.start,i.end+1),i)},n.handleShowMore=function(i,l){var c=n.props,f=c.range,p=c.onShowMore,g=n.slotMetrics(n.props),y=A$(n.containerRef.current,".rbc-row-bg")[0],w;y&&(w=y.children[i-1]);var T=g.getEventsForSlot(i);p(T,f[i-1],w,i,l)},n.getContainer=function(){var i=n.props.container;return i?i():n.containerRef.current},n.renderHeadingCell=function(i,l){var c=n.props,f=c.renderHeader,p=c.getNow,g=c.localizer;return f({date:i,key:"header_".concat(l),className:ca("rbc-date-cell",g.isSameDate(i,p())&&"rbc-now")})},n.renderDummy=function(){var i=n.props,l=i.className,c=i.range,f=i.renderHeader,p=i.showAllEvents;return ne.createElement("div",{className:l,ref:n.containerRef},ne.createElement("div",{className:ca("rbc-row-content",p&&"rbc-row-content-scrollable")},f&&ne.createElement("div",{className:"rbc-row",ref:n.headingRowRef},c.map(n.renderHeadingCell)),ne.createElement("div",{className:"rbc-row",ref:n.eventRowRef},ne.createElement("div",{className:"rbc-row-segment"},ne.createElement("div",{className:"rbc-event"},ne.createElement("div",{className:"rbc-event-content"}," "))))))},n.containerRef=P.createRef(),n.headingRowRef=P.createRef(),n.eventRowRef=P.createRef(),n.slotMetrics=v9(),n}return ka(t,[{key:"getRowLimit",value:function(){var r,a=YS(this.eventRowRef.current),o=(r=this.headingRowRef)!==null&&r!==void 0&&r.current?YS(this.headingRowRef.current):0,i=YS(this.containerRef.current)-o;return Math.max(Math.floor(i/a),1)}},{key:"render",value:function(){var r=this.props,a=r.date,o=r.rtl,i=r.range,l=r.className,c=r.selected,f=r.selectable,p=r.renderForMeasure,g=r.accessors,y=r.getters,w=r.components,T=r.getNow,S=r.renderHeader,I=r.onSelect,M=r.localizer,N=r.onSelectStart,_=r.onSelectEnd,k=r.onDoubleClick,R=r.onKeyPress,L=r.resourceId,H=r.longPressThreshold,U=r.isAllDay,z=r.resizable,$=r.showAllEvents;if(p)return this.renderDummy();var X=this.slotMetrics(this.props),Q=X.levels,se=X.extra,ue=$?Cse:Pu,fe=w.weekWrapper,Z={selected:c,accessors:g,getters:y,localizer:M,components:w,onSelect:I,onDoubleClick:k,onKeyPress:R,resourceId:L,slotMetrics:X,resizable:z};return ne.createElement("div",{className:l,role:"rowgroup",ref:this.containerRef},ne.createElement(Tse,{localizer:M,date:a,getNow:T,rtl:o,range:i,selectable:f,container:this.getContainer,getters:y,onSelectStart:N,onSelectEnd:_,onSelectSlot:this.handleSelectSlot,components:w,longPressThreshold:H,resourceId:L}),ne.createElement("div",{className:ca("rbc-row-content",$&&"rbc-row-content-scrollable"),role:"row"},S&&ne.createElement("div",{className:"rbc-row ",ref:this.headingRowRef},i.map(this.renderHeadingCell)),ne.createElement(ue,null,ne.createElement(fe,Object.assign({isAllDay:U},Z,{rtl:this.props.rtl}),Q.map(function(pe,ie){return ne.createElement(f9,Object.assign({key:ie,segments:pe},Z))}),!!se.length&&ne.createElement(g9,Object.assign({segments:se,onShowMore:this.handleShowMore},Z))))))}}]),t}(ne.Component);Vw.defaultProps={minRows:0,maxRows:1/0};var y9=function(t){var n=t.label;return ne.createElement("span",{role:"columnheader","aria-sort":"none"},n)},Nse=function(t){var n=t.label,r=t.drilldownView,a=t.onDrillDown;return r?ne.createElement("button",{type:"button",className:"rbc-button-link",onClick:a,role:"cell"},n):ne.createElement("span",null,n)},Ase=["date","className"],Fse=function(t,n,r,a,o){return t.filter(function(i){return uv(i,n,r,a,o)})},zb=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.getContainer=function(){return n.containerRef.current},n.renderWeek=function(i,l){var c=n.props,f=c.events,p=c.components,g=c.selectable,y=c.getNow,w=c.selected,T=c.date,S=c.localizer,I=c.longPressThreshold,M=c.accessors,N=c.getters,_=c.showAllEvents,k=n.state,R=k.needLimitMeasure,L=k.rowLimit,H=Fse(iw(f),i[0],i[i.length-1],M,S),U=xse(H,M,S);return ne.createElement(Vw,{key:l,ref:l===0?n.slotRowRef:void 0,container:n.getContainer,className:"rbc-month-row",getNow:y,date:T,range:i,events:U,maxRows:_?1/0:L,selected:w,selectable:g,components:p,accessors:M,getters:N,localizer:S,renderHeader:n.readerDateHeading,renderForMeasure:R,onShowMore:n.handleShowMore,onSelect:n.handleSelectEvent,onDoubleClick:n.handleDoubleClickEvent,onKeyPress:n.handleKeyPressEvent,onSelectSlot:n.handleSelectSlot,longPressThreshold:I,rtl:n.props.rtl,resizable:n.props.resizable,showAllEvents:_})},n.readerDateHeading=function(i){var l=i.date,c=i.className,f=Ql(i,Ase),p=n.props,g=p.date,y=p.getDrilldownView,w=p.localizer,T=w.neq(l,g,"month"),S=w.isSameDate(l,g),I=y(l),M=w.format(l,"dateFormat"),N=n.props.components.dateHeader||Nse;return ne.createElement("div",Object.assign({},f,{className:ca(c,T&&"rbc-off-range",S&&"rbc-current"),role:"cell"}),ne.createElement(N,{label:M,date:l,drilldownView:I,isOffRange:T,onDrillDown:function(k){return n.handleHeadingClick(l,I,k)}}))},n.handleSelectSlot=function(i,l){n._pendingSelection=n._pendingSelection.concat(i),clearTimeout(n._selectTimer),n._selectTimer=setTimeout(function(){return n.selectDates(l)})},n.handleHeadingClick=function(i,l,c){c.preventDefault(),n.clearSelection(),gr(n.props.onDrillDown,[i,l])},n.handleSelectEvent=function(){n.clearSelection();for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onSelectEvent,l)},n.handleDoubleClickEvent=function(){n.clearSelection();for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onDoubleClickEvent,l)},n.handleKeyPressEvent=function(){n.clearSelection();for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onKeyPressEvent,l)},n.handleShowMore=function(i,l,c,f,p){var g=n.props,y=g.popup,w=g.onDrillDown,T=g.onShowMore,S=g.getDrilldownView,I=g.doShowMoreDrillDown;if(n.clearSelection(),y){var M=D8(c,n.containerRef.current);n.setState({overlay:{date:l,events:i,position:M,target:p}})}else I&&gr(w,[l,S(l)||Mo.DAY]);gr(T,[i,l,f])},n.overlayDisplay=function(){n.setState({overlay:null})},n.state={rowLimit:5,needLimitMeasure:!0,date:null},n.containerRef=P.createRef(),n.slotRowRef=P.createRef(),n._bgRows=[],n._pendingSelection=[],n}return ka(t,[{key:"componentDidMount",value:function(){var r=this,a;this.state.needLimitMeasure&&this.measureRowLimit(this.props),window.addEventListener("resize",this._resizeListener=function(){a||T8(function(){a=!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,a=r.date,o=r.localizer,i=r.className,l=o.visibleDays(a,o),c=m$(l,7);return this._weekCount=c.length,ne.createElement("div",{className:ca("rbc-month-view",i),role:"table","aria-label":"Month View",ref:this.containerRef},ne.createElement("div",{className:"rbc-row rbc-month-header",role:"row"},this.renderHeaders(c[0])),c.map(this.renderWeek),this.props.popup&&this.renderOverlay())}},{key:"renderHeaders",value:function(r){var a=this.props,o=a.localizer,i=a.components,l=r[0],c=r[r.length-1],f=i.header||y9;return o.range(l,c,"day").map(function(p,g){return ne.createElement("div",{key:"header_"+g,className:"rbc-header"},ne.createElement(f,{date:p,localizer:o,label:o.format(p,"weekdayFormat")}))})}},{key:"renderOverlay",value:function(){var r,a,o=this,i=(r=(a=this.state)===null||a===void 0?void 0:a.overlay)!==null&&r!==void 0?r:{},l=this.props,c=l.accessors,f=l.localizer,p=l.components,g=l.getters,y=l.selected,w=l.popupOffset,T=l.handleDragStart,S=function(){return o.setState({overlay:null})};return ne.createElement(CI,{overlay:i,accessors:c,localizer:f,components:p,getters:g,selected:y,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:T,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:S})}},{key:"measureRowLimit",value:function(){this.setState({needLimitMeasure:!1,rowLimit:this.slotRowRef.current.getRowLimit()})}},{key:"selectDates",value:function(r){var a=this._pendingSelection.slice();this._pendingSelection=[],a.sort(function(l,c){return+l-+c});var o=new Date(a[0]),i=new Date(a[a.length-1]);i.setDate(a[a.length-1].getDate()+1),gr(this.props.onSelectSlot,{slots:a,start:o,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,a){var o=r.date,i=r.localizer;return{date:o,needLimitMeasure:i.neq(o,a.date,"month")}}}]),t}(ne.Component);zb.range=function(e,t){var n=t.localizer,r=n.firstVisibleDay(e,n),a=n.lastVisibleDay(e,n);return{start:r,end:a}};zb.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"month");case ri.NEXT:return r.add(e,1,"month");default:return e}};zb.title=function(e,t){var n=t.localizer;return n.format(e,"monthHeaderFormat")};var o3=function(t){var n=t.min,r=t.max,a=t.step,o=t.slots,i=t.localizer;return"".concat(+i.startOf(n,"minutes"))+"".concat(+i.startOf(r,"minutes"))+"".concat(a,"-").concat(o)};function MI(e){for(var t=e.min,n=e.max,r=e.step,a=e.timeslots,o=e.localizer,i=o3({start:t,end:n,step:r,timeslots:a,localizer:o}),l=1+o.getTotalMin(t,n),c=o.getMinutesFromMidnight(t),f=Math.ceil((l-1)/(r*a)),p=f*a,g=new Array(f),y=new Array(p),w=0;w<f;w++){g[w]=new Array(a);for(var T=0;T<a;T++){var S=w*a+T,I=S*r;y[S]=g[w][T]=o.getSlotDate(t,c,I)}}var M=y.length*r;y.push(o.getSlotDate(t,c,M));function N(_){var k=o.diff(t,_,"minutes")+o.getDstOffset(t,_);return Math.min(k,l)}return{groups:g,update:function(k){return o3(k)!==i?MI(k):this},dateIsInGroup:function(k,R){var L=g[R+1];return o.inRange(k,g[R][0],L?L[0]:n,"minutes")},nextSlot:function(k){var R=y[Math.min(y.indexOf(k)+1,y.length-1)];return R===k&&(R=o.add(k,r,"minutes")),R},closestSlotToPosition:function(k){var R=Math.min(y.length-1,Math.max(0,Math.floor(k*p)));return y[R]},closestSlotFromPoint:function(k,R){var L=Math.abs(R.top-R.bottom);return this.closestSlotToPosition((k.y-R.top)/L)},closestSlotFromDate:function(k){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(o.lt(k,t,"minutes"))return y[0];if(o.gt(k,n,"minutes"))return y[y.length-1];var L=o.diff(t,k,"minutes");return y[(L-L%r)/r+R]},startsBeforeDay:function(k){return o.lt(k,t,"day")},startsAfterDay:function(k){return o.gt(k,n,"day")},startsBefore:function(k){return o.lt(o.merge(t,k),t,"minutes")},startsAfter:function(k){return o.gt(o.merge(n,k),n,"minutes")},getRange:function(k,R,L,H){L||(k=o.min(n,o.max(t,k))),H||(R=o.min(n,o.max(t,R)));var U=N(k),z=N(R),$=z>r*p&&!o.eq(n,R)?(U-r)/(r*p)*100:U/(r*p)*100;return{top:$,height:z/(r*p)*100-$,start:N(k),startDate:k,end:N(R),endDate:R}},getCurrentTimePosition:function(k){var R=N(k),L=R/(r*p)*100;return L}}}var Ose=function(){function e(t,n){var r=n.accessors,a=n.slotMetrics;Ma(this,e);var o=a.getRange(r.start(t),r.end(t)),i=o.start,l=o.startDate,c=o.end,f=o.endDate,p=o.top,g=o.height;this.start=i,this.end=c,this.startMs=+l,this.endMs=+f,this.top=p,this.height=g,this.data=t}return ka(e,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(a,o){return Math.max(a,o.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 a=this.row.leaves,o=a.indexOf(this);return o===a.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,a=n.xOffset,o=n._width,i=r.indexOf(this)+1;return a+i*o}}]),e}();function Pse(e,t,n){return Math.abs(t.start-e.start)<n||t.start>e.start&&t.start<e.end}function jse(e){for(var t=lne(e,["startMs",function(l){return-l.endMs}]),n=[];t.length>0;){var r=t.shift();n.push(r);for(var a=0;a<t.length;a++){var o=t[a];if(!(r.endMs>o.startMs)){if(a>0){var i=t.splice(a,1)[0];n.push(i)}break}}}return n}function w9(e){for(var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=t.map(function(p){return new Ose(p,{slotMetrics:r,accessors:a})}),i=jse(o),l=[],c=function(){var g=i[f],y=l.find(function(S){return S.end>g.start||Math.abs(g.start-S.start)<n});if(!y)return g.rows=[],l.push(g),1;g.container=y;for(var w=null,T=y.rows.length-1;!w&&T>=0;T--)Pse(y.rows[T],g,n)&&(w=y.rows[T]);w?(w.leaves.push(g),g.row=w):(g.leaves=[],y.rows.push(g))},f=0;f<i.length;f++)c();return i.map(function(p){return{event:p.data,style:{top:p.top,height:p.height,width:p.width,xOffset:Math.max(0,p.xOffset)}}})}function b9(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 a=b9(e.friends[r],t,n);t=t>a?t:a}return t}function Lse(e){var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=w9({events:t,minimumStartDifference:n,slotMetrics:r,accessors:a});o.sort(function(fe,Z){return fe=fe.style,Z=Z.style,fe.top!==Z.top?fe.top>Z.top?1:-1:fe.height!==Z.height?fe.top+fe.height<Z.top+Z.height?1:-1:0});for(var i=0;i<o.length;++i)o[i].friends=[],delete o[i].style.left,delete o[i].style.left,delete o[i].idx,delete o[i].size;for(var l=0;l<o.length-1;++l)for(var c=o[l],f=c.style.top,p=c.style.top+c.style.height,g=l+1;g<o.length;++g){var y=o[g],w=y.style.top,T=y.style.top+y.style.height;(w>=f&&T<=p||T>f&&T<=p||w>=f&&w<p)&&(c.friends.push(y),y.friends.push(c))}for(var S=0;S<o.length;++S){for(var I=o[S],M=[],N=0;N<100;++N)M.push(1);for(var _=0;_<I.friends.length;++_)I.friends[_].idx!==void 0&&(M[I.friends[_].idx]=0);I.idx=M.indexOf(1)}for(var k=0;k<o.length;++k){var R=0;if(!o[k].size){var L=[],H=b9(o[k],0,L);R=100/(H+1),o[k].size=R;for(var U=0;U<L.length;++U)L[U].size=R}}for(var z=0;z<o.length;++z){var $=o[z];$.style.left=$.idx*$.size;for(var X=0,Q=0;Q<$.friends.length;++Q){var se=$.friends[Q].idx;X=X>se?X:se}X<=$.idx&&($.size=100-$.idx*$.size);var ue=$.idx===0?0:3;$.style.width="calc(".concat($.size,"% - ").concat(ue,"px)"),$.style.height="calc(".concat($.style.height,"% - 2px)"),$.style.xOffset="calc(".concat($.style.left,"% + ").concat(ue,"px)")}return o}var i3={overlap:w9,"no-overlap":Lse};function Rse(e){return!!(e&&e.constructor&&e.call&&e.apply)}function _se(e){e.events,e.minimumStartDifference,e.slotMetrics,e.accessors;var t=e.dayLayoutAlgorithm,n=t;return t in i3&&(n=i3[t]),Rse(n)?n.apply(this,arguments):[]}var S9=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.renderSlot,o=r.resource,i=r.group,l=r.getters,c=r.components,f=c===void 0?{}:c,p=f.timeSlotWrapper,g=p===void 0?Pu:p,y=l?l.slotGroupProp(i):{};return ne.createElement("div",Object.assign({className:"rbc-timeslot-group"},y),i.map(function(w,T){var S=l?l.slotProp(w,o):{};return ne.createElement(g,{key:T,value:w,resource:o},ne.createElement("div",Object.assign({},S,{className:ca("rbc-time-slot",S.className)}),a&&a(w,T)))}))}}]),t}(P.Component);function C0(e){return typeof e=="string"?e:e+"%"}function Bse(e){var t=e.style,n=e.className,r=e.event,a=e.accessors,o=e.rtl,i=e.selected,l=e.label,c=e.continuesPrior,f=e.continuesAfter,p=e.getters,g=e.onClick,y=e.onDoubleClick,w=e.isBackgroundEvent,T=e.onKeyPress,S=e.components,I=S.event,M=S.eventWrapper,N=a.title(r),_=a.tooltip(r),k=a.end(r),R=a.start(r),L=p.eventProp(r,R,k,i),H=[ne.createElement("div",{key:"1",className:"rbc-event-label"},l),ne.createElement("div",{key:"2",className:"rbc-event-content"},I?ne.createElement(I,{event:r,title:N}):N)],U=t.height,z=t.top,$=t.width,X=t.xOffset,Q=tr(tr({},L.style),{},af({top:C0(z),height:C0(U),width:C0($)},o?"right":"left",C0(X)));return ne.createElement(M,Object.assign({type:"time"},e),ne.createElement("div",{role:"button",tabIndex:0,onClick:g,onDoubleClick:y,style:Q,onKeyDown:T,title:_?(typeof l=="string"?l+": ":"")+_:void 0,className:ca(w?"rbc-background-event":"rbc-event",n,L.className,{"rbc-selected":i,"rbc-event-continues-earlier":c,"rbc-event-continues-later":f})},H))}var Hse=function(t){var n=t.children,r=t.className,a=t.style,o=t.innerRef;return ne.createElement("div",{className:r,style:a,ref:o},n)},Yse=ne.forwardRef(function(e,t){return ne.createElement(Hse,Object.assign({},e,{innerRef:t}))}),Use=["dayProp"],zse=["eventContainerWrapper"],D9=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.state={selecting:!1,timeIndicatorPosition:null},n.intervalTriggered=!1,n.renderEvents=function(i){var l=i.events,c=i.isBackgroundEvent,f=n.props,p=f.rtl,g=f.selected,y=f.accessors,w=f.localizer,T=f.getters,S=f.components,I=f.step,M=f.timeslots,N=f.dayLayoutAlgorithm,_=f.resizable,k=K6(n),R=k.slotMetrics,L=w.messages,H=_se({events:l,accessors:y,slotMetrics:R,minimumStartDifference:Math.ceil(I*M/2),dayLayoutAlgorithm:N});return H.map(function(U,z){var $=U.event,X=U.style,Q=y.end($),se=y.start($),ue="eventTimeRangeFormat",fe,Z=R.startsBeforeDay(se),pe=R.startsAfterDay(Q);Z?ue="eventTimeRangeEndFormat":pe&&(ue="eventTimeRangeStartFormat"),Z&&pe?fe=L.allDay:fe=w.format({start:se,end:Q},ue);var ie=Z||R.startsBefore(se),de=pe||R.startsAfter(Q);return ne.createElement(Bse,{style:X,event:$,label:fe,key:"evt_"+z,getters:T,rtl:p,components:S,continuesPrior:ie,continuesAfter:de,accessors:y,resource:n.props.resource,selected:Ub($,g),onClick:function(ae){return n._select(tr(tr(tr({},$),n.props.resource&&{sourceResource:n.props.resource}),c&&{isBackgroundEvent:!0}),ae)},onDoubleClick:function(ae){return n._doubleClick($,ae)},isBackgroundEvent:c,onKeyPress:function(ae){return n._keyPress($,ae)},resizable:_})})},n._selectable=function(){var i=n.containerRef.current,l=n.props,c=l.longPressThreshold,f=l.localizer,p=n._selector=new d9(function(){return i},{longPressThreshold:c}),g=function(S){var I=n.props.onSelecting,M=n.state||{},N=y(S),_=N.startDate,k=N.endDate;I&&(f.eq(M.startDate,_,"minutes")&&f.eq(M.endDate,k,"minutes")||I({start:_,end:k,resourceId:n.props.resource})===!1)||(n.state.start!==N.start||n.state.end!==N.end||n.state.selecting!==N.selecting)&&n.setState(N)},y=function(S){var I=n.slotMetrics.closestSlotFromPoint(S,If(i));n.state.selecting||(n._initialSlot=I);var M=n._initialSlot;f.lte(M,I)?I=n.slotMetrics.nextSlot(I):f.gt(M,I)&&(M=n.slotMetrics.nextSlot(M));var N=n.slotMetrics.getRange(f.min(M,I),f.max(M,I));return tr(tr({},N),{},{selecting:!0,top:"".concat(N.top,"%"),height:"".concat(N.height,"%")})},w=function(S,I){if(!zw(n.containerRef.current,S)){var M=y(S),N=M.startDate,_=M.endDate;n._selectSlot({startDate:N,endDate:_,action:I,box:S})}n.setState({selecting:!1})};p.on("selecting",g),p.on("selectStart",g),p.on("beforeSelect",function(T){if(n.props.selectable==="ignoreEvents")return!zw(n.containerRef.current,T)}),p.on("click",function(T){return w(T,"click")}),p.on("doubleClick",function(T){return w(T,"doubleClick")}),p.on("select",function(T){n.state.selecting&&(n._selectSlot(tr(tr({},n.state),{},{action:"select",bounds:T})),n.setState({selecting:!1}))}),p.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 l=i.startDate,c=i.endDate,f=i.action,p=i.bounds,g=i.box,y=l,w=[];n.props.localizer.lte(y,c);)w.push(y),y=new Date(+y+n.props.step*60*1e3);gr(n.props.onSelectSlot,{slots:w,start:l,end:c,resourceId:n.props.resource,action:f,bounds:p,box:g})},n._select=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onSelectEvent,l)},n._doubleClick=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onDoubleClickEvent,l)},n._keyPress=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onKeyPressEvent,l)},n.slotMetrics=MI(n.props),n.containerRef=P.createRef(),n}return ka(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,a){this.props.selectable&&!r.selectable&&this._selectable(),!this.props.selectable&&r.selectable&&this._teardownSelectable(),this.slotMetrics=this.slotMetrics.update(this.props);var o=this.props,i=o.getNow,l=o.isNow,c=o.localizer,f=o.date,p=o.min,g=o.max,y=c.neq(r.getNow(),i(),"minutes");if(r.isNow!==l||y){if(this.clearTimeIndicatorInterval(),l){var w=!y&&c.eq(r.date,f,"minutes")&&a.timeIndicatorPosition===this.state.timeIndicatorPosition;this.setTimeIndicatorPositionUpdateInterval(w)}}else l&&(c.neq(r.min,p,"minutes")||c.neq(r.max,g,"minutes"))&&this.positionTimeIndicator()}},{key:"setTimeIndicatorPositionUpdateInterval",value:function(){var r=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!a&&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,a=r.min,o=r.max,i=r.getNow,l=i();if(l>=a&&l<=o){var c=this.slotMetrics.getCurrentTimePosition(l);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:c})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,a=r.date,o=r.max,i=r.rtl,l=r.isNow,c=r.resource,f=r.accessors,p=r.localizer,g=r.getters,y=g.dayProp,w=Ql(g,Use),T=r.components,S=T.eventContainerWrapper,I=Ql(T,zse),M=this.slotMetrics,N=this.state,_=N.selecting,k=N.top,R=N.height,L=N.startDate,H=N.endDate,U={start:L,end:H},z=y(o),$=z.className,X=z.style,Q=I.dayColumnWrapper||Yse;return ne.createElement(Q,{ref:this.containerRef,date:a,style:X,className:ca($,"rbc-day-slot","rbc-time-column",l&&"rbc-now",l&&"rbc-today",_&&"rbc-slot-selecting"),slotMetrics:M},M.groups.map(function(se,ue){return ne.createElement(S9,{key:ue,group:se,resource:c,getters:w,components:I})}),ne.createElement(S,{localizer:p,resource:c,accessors:f,getters:w,components:I,slotMetrics:M},ne.createElement("div",{className:ca("rbc-events-container",i&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),_&&ne.createElement("div",{className:"rbc-slot-selection",style:{top:k,height:R}},ne.createElement("span",null,p.format(U,"selectRangeFormat"))),l&&this.intervalTriggered&&ne.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),t}(ne.Component);D9.defaultProps={dragThroughEvents:!0,timeslots:2};function Vse(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 Wse=function(t){var n=t.min,r=t.max,a=t.timeslots,o=t.step,i=t.localizer,l=t.getNow,c=t.resource,f=t.components,p=t.getters,g=t.gutterRef,y=f.timeGutterWrapper,w=P.useMemo(function(){return Vse({min:n,max:r,localizer:i})},[n==null?void 0:n.toISOString(),r==null?void 0:r.toISOString(),i]),T=w.start,S=w.end,I=P.useState(MI({min:T,max:S,timeslots:a,step:o,localizer:i})),M=ju(I,2),N=M[0],_=M[1];P.useEffect(function(){N&&_(N.update({min:T,max:S,timeslots:a,step:o,localizer:i}))},[T==null?void 0:T.toISOString(),S==null?void 0:S.toISOString(),a,o]);var k=P.useCallback(function(R,L){if(L)return null;var H=N.dateIsInGroup(l(),L);return ne.createElement("span",{className:ca("rbc-label",H&&"rbc-now")},i.format(R,"timeGutterFormat"))},[N,i,l]);return ne.createElement(y,{slotMetrics:N},ne.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:g},N.groups.map(function(R,L){return ne.createElement(S9,{key:L,group:R,resource:c,components:f,renderSlot:k,getters:p})})))},$se=ne.forwardRef(function(e,t){return ne.createElement(Wse,Object.assign({gutterRef:t},e))}),Zse=function(t){var n=t.label;return ne.createElement(ne.Fragment,null,n)},qse=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.handleHeaderClick=function(i,l,c){c.preventDefault(),gr(n.props.onDrillDown,[i,l])},n.renderRow=function(i){var l=n.props,c=l.events,f=l.rtl,p=l.selectable,g=l.getNow,y=l.range,w=l.getters,T=l.localizer,S=l.accessors,I=l.components,M=l.resizable,N=S.resourceId(i),_=i?c.filter(function(k){return S.resource(k)===N}):c;return ne.createElement(Vw,{isAllDay:!0,rtl:f,getNow:g,minRows:2,maxRows:n.props.allDayMaxRows+1,range:y,events:_,resourceId:N,className:"rbc-allday-cell",selectable:p,selected:n.props.selected,components:I,accessors:S,getters:w,localizer:T,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:M})},n}return ka(t,[{key:"renderHeaderCells",value:function(r){var a=this,o=this.props,i=o.localizer,l=o.getDrilldownView,c=o.getNow,f=o.getters.dayProp,p=o.components.header,g=p===void 0?y9:p,y=c();return r.map(function(w,T){var S=l(w),I=i.format(w,"dayFormat"),M=f(w),N=M.className,_=M.style,k=ne.createElement(g,{date:w,label:I,localizer:i});return ne.createElement("div",{key:T,style:_,className:ca("rbc-header",N,i.isSameDate(w,y)&&"rbc-today")},S?ne.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(L){return a.handleHeaderClick(w,S,L)}},k):ne.createElement("span",null,k))})}},{key:"render",value:function(){var r=this,a=this.props,o=a.width,i=a.rtl,l=a.resources,c=a.range,f=a.events,p=a.getNow,g=a.accessors,y=a.selectable,w=a.components,T=a.getters,S=a.scrollRef,I=a.localizer,M=a.isOverflowing,N=a.components,_=N.timeGutterHeader,k=N.resourceHeader,R=k===void 0?Zse:k,L=a.resizable,H={};M&&(H[i?"marginLeft":"marginRight"]="".concat(I8()-1,"px"));var U=l.groupEvents(f);return ne.createElement("div",{style:H,ref:S,className:ca("rbc-time-header",M&&"rbc-overflowing")},ne.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:o,minWidth:o,maxWidth:o}},_&&ne.createElement(_,null)),l.map(function(z,$){var X=ju(z,2),Q=X[0],se=X[1];return ne.createElement("div",{className:"rbc-time-header-content",key:Q||$},se&&ne.createElement("div",{className:"rbc-row rbc-row-resource",key:"resource_".concat($)},ne.createElement("div",{className:"rbc-header"},ne.createElement(R,{index:$,label:g.resourceTitle(se),resource:se}))),ne.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(c.length<=1?" rbc-time-header-cell-single-day":"")},r.renderHeaderCells(c)),ne.createElement(Vw,{isAllDay:!0,rtl:i,getNow:p,minRows:2,maxRows:r.props.allDayMaxRows+1,range:c,events:U.get(Q)||[],resourceId:se&&Q,className:"rbc-allday-cell",selectable:y,selected:r.props.selected,components:w,accessors:g,getters:T,localizer:I,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:L}))}))}}]),t}(ne.Component),VS={};function Gse(e,t){return{map:function(r){return e?e.map(function(a,o){return r([t.resourceId(a),a],o)}):[r([VS,null],0)]},groupEvents:function(r){var a=new Map;return e?(r.forEach(function(o){var i=t.resource(o)||VS;if(Array.isArray(i))i.forEach(function(c){var f=a.get(c)||[];f.push(o),a.set(c,f)});else{var l=a.get(i)||[];l.push(o),a.set(i,l)}}),a):(a.set(VS,r),a)}}}var Jp=function(e){Ao(t,e);function t(n){var r;return Ma(this,t),r=No(this,t,[n]),r.handleScroll=function(a){r.scrollRef.current&&(r.scrollRef.current.scrollLeft=a.target.scrollLeft)},r.handleResize=function(){eM(r.rafHandle),r.rafHandle=T8(r.checkOverflow)},r.handleKeyPressEvent=function(){r.clearSelection();for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];gr(r.props.onKeyPressEvent,o)},r.handleSelectEvent=function(){r.clearSelection();for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];gr(r.props.onSelectEvent,o)},r.handleDoubleClickEvent=function(){r.clearSelection();for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];gr(r.props.onDoubleClickEvent,o)},r.handleShowMore=function(a,o,i,l,c){var f=r.props,p=f.popup,g=f.onDrillDown,y=f.onShowMore,w=f.getDrilldownView,T=f.doShowMoreDrillDown;if(r.clearSelection(),p){var S=D8(i,r.containerRef.current);r.setState({overlay:{date:o,events:a,position:tr(tr({},S),{},{width:"200px"}),target:c}})}else T&&gr(g,[o,w(o)||Mo.DAY]);gr(y,[a,o,l])},r.handleSelectAllDaySlot=function(a,o){var i=r.props.onSelectSlot,l=new Date(a[0]),c=new Date(a[a.length-1]);c.setDate(a[a.length-1].getDate()+1),gr(i,{slots:a,start:l,end:c,action:o.action,resourceId:o.resourceId})},r.overlayDisplay=function(){r.setState({overlay:null})},r.checkOverflow=function(){if(!r._updatingOverflow){var a=r.contentRef.current;if(a!=null&&a.scrollHeight){var o=a.scrollHeight>a.clientHeight;r.state.isOverflowing!==o&&(r._updatingOverflow=!0,r.setState({isOverflowing:o},function(){r._updatingOverflow=!1}))}}},r.memoizedResources=Y8(function(a,o){return Gse(a,o)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=ne.createRef(),r.contentRef=ne.createRef(),r.containerRef=ne.createRef(),r._scrollRatio=null,r.gutterRef=P.createRef(),r}return ka(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),eM(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,a,o,i){var l=this,c=this.props,f=c.min,p=c.max,g=c.components,y=c.accessors,w=c.localizer,T=c.dayLayoutAlgorithm,S=this.memoizedResources(this.props.resources,y),I=S.groupEvents(a),M=S.groupEvents(o);return S.map(function(N,_){var k=ju(N,2),R=k[0],L=k[1];return r.map(function(H,U){var z=(I.get(R)||[]).filter(function(X){return w.inRange(H,y.start(X),y.end(X),"day")}),$=(M.get(R)||[]).filter(function(X){return w.inRange(H,y.start(X),y.end(X),"day")});return ne.createElement(D9,Object.assign({},l.props,{localizer:w,min:w.merge(H,f),max:w.merge(H,p),resource:L&&R,components:g,isNow:w.isSameDate(H,i),key:_+"-"+U,date:H,events:z,backgroundEvents:$,dayLayoutAlgorithm:T}))})})}},{key:"render",value:function(){var r,a=this.props,o=a.events,i=a.backgroundEvents,l=a.range,c=a.width,f=a.rtl,p=a.selected,g=a.getNow,y=a.resources,w=a.components,T=a.accessors,S=a.getters,I=a.localizer,M=a.min,N=a.max,_=a.showMultiDayTimes,k=a.longPressThreshold,R=a.resizable;c=c||this.state.gutterWidth;var L=l[0],H=l[l.length-1];this.slots=l.length;var U=[],z=[],$=[];return o.forEach(function(X){if(uv(X,L,H,T,I)){var Q=T.start(X),se=T.end(X);T.allDay(X)||I.startAndEndAreDateOnly(Q,se)||!_&&!I.isSameDate(Q,se)?U.push(X):z.push(X)}}),i.forEach(function(X){uv(X,L,H,T,I)&&$.push(X)}),U.sort(function(X,Q){return jT(X,Q,T,I)}),ne.createElement("div",{className:ca("rbc-time-view",y&&"rbc-time-view-resources"),ref:this.containerRef},ne.createElement(qse,{range:l,events:U,width:c,rtl:f,getNow:g,localizer:I,selected:p,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(y,T),selectable:this.props.selectable,accessors:T,getters:S,components:w,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:k,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:R}),this.props.popup&&this.renderOverlay(),ne.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},ne.createElement($se,{date:L,ref:this.gutterRef,localizer:I,min:I.merge(L,M),max:I.merge(L,N),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:w,className:"rbc-time-gutter",getters:S}),this.renderEvents(l,z,$,g())))}},{key:"renderOverlay",value:function(){var r,a,o=this,i=(r=(a=this.state)===null||a===void 0?void 0:a.overlay)!==null&&r!==void 0?r:{},l=this.props,c=l.accessors,f=l.localizer,p=l.components,g=l.getters,y=l.selected,w=l.popupOffset,T=l.handleDragStart,S=function(){return o.setState({overlay:null})};return ne.createElement(CI,{overlay:i,accessors:c,localizer:f,components:p,getters:g,selected:y,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:T,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:S})}},{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 a,o=(a=r.gutterRef)!==null&&a!==void 0&&a.current?OT(r.gutterRef.current):void 0;o&&r.state.gutterWidth!==o&&r.setState({gutterWidth:o})})}},{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,a=r.min,o=r.max,i=r.scrollToTime,l=r.localizer,c=l.diff(l.merge(i,a),i,"milliseconds"),f=l.diff(a,o,"milliseconds");this._scrollRatio=c/f}}]),t}(P.Component);Jp.defaultProps={step:30,timeslots:2};var Jse=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Vb=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,p=r.scrollToTime,g=p===void 0?o.startOf(new Date,"day"):p,y=r.enableAutoScroll,w=y===void 0?!0:y,T=Ql(r,Jse),S=t.range(a,{localizer:o});return ne.createElement(Jp,Object.assign({},T,{range:S,eventOffset:10,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Vb.range=function(e,t){var n=t.localizer;return[n.startOf(e,"day")]};Vb.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"day");case ri.NEXT:return r.add(e,1,"day");default:return e}};Vb.title=function(e,t){var n=t.localizer;return n.format(e,"dayHeaderFormat")};var Kse=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Qc=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,p=r.scrollToTime,g=p===void 0?o.startOf(new Date,"day"):p,y=r.enableAutoScroll,w=y===void 0?!0:y,T=Ql(r,Kse),S=t.range(a,this.props);return ne.createElement(Jp,Object.assign({},T,{range:S,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Qc.defaultProps=Jp.defaultProps;Qc.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"week");case ri.NEXT:return r.add(e,1,"week");default:return e}};Qc.range=function(e,t){var n=t.localizer,r=n.startOfWeek(),a=n.startOf(e,"week",r),o=n.endOf(e,"week",r);return n.range(a,o)};Qc.title=function(e,t){var n=t.localizer,r=Qc.range(e,{localizer:n}),a=q8(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};var Qse=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function kI(e,t){return Qc.range(e,t).filter(function(n){return[6,0].indexOf(n.getDay())===-1})}var Zv=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,p=r.scrollToTime,g=p===void 0?o.startOf(new Date,"day"):p,y=r.enableAutoScroll,w=y===void 0?!0:y,T=Ql(r,Qse),S=kI(a,this.props);return ne.createElement(Jp,Object.assign({},T,{range:S,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Zv.defaultProps=Jp.defaultProps;Zv.range=kI;Zv.navigate=Qc.navigate;Zv.title=function(e,t){var n=t.localizer,r=kI(e,{localizer:n}),a=q8(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};function Xc(e){var t=e.accessors,n=e.components,r=e.date,a=e.events,o=e.getters,i=e.length,l=e.localizer,c=e.onDoubleClickEvent,f=e.onSelectEvent,p=e.selected,g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),T=P.useRef(null),S=P.useRef(null);P.useEffect(function(){N()});var I=function(H,U,z){var $=n.event,X=n.date;return U=U.filter(function(Q){return uv(Q,l.startOf(H,"day"),l.endOf(H,"day"),t,l)}),U.map(function(Q,se){var ue=t.title(Q),fe=t.end(Q),Z=t.start(Q),pe=o.eventProp(Q,Z,fe,Ub(Q,p)),ie=se===0&&l.format(H,"agendaDateFormat"),de=se===0?ne.createElement("td",{rowSpan:U.length,className:"rbc-agenda-date-cell"},X?ne.createElement(X,{day:H,label:ie}):ie):!1;return ne.createElement("tr",{key:z+"_"+se,className:pe.className,style:pe.style},de,ne.createElement("td",{className:"rbc-agenda-time-cell"},M(H,Q)),ne.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(ae){return f&&f(Q,ae)},onDoubleClick:function(ae){return c&&c(Q,ae)}},$?ne.createElement($,{event:Q,title:ue}):ue))},[])},M=function(H,U){var z="",$=n.time,X=l.messages.allDay,Q=t.end(U),se=t.start(U);return t.allDay(U)||(l.eq(se,Q)?X=l.format(se,"agendaTimeFormat"):l.isSameDate(se,Q)?X=l.format({start:se,end:Q},"agendaTimeRangeFormat"):l.isSameDate(H,se)?X=l.format(se,"agendaTimeFormat"):l.isSameDate(H,Q)&&(X=l.format(Q,"agendaTimeFormat"))),l.gt(H,se,"day")&&(z="rbc-continues-prior"),l.lt(H,Q,"day")&&(z+=" rbc-continues-after"),ne.createElement("span",{className:z.trim()},$?ne.createElement($,{event:U,day:H,label:X}):X)},N=function(){if(S.current){var H=g.current,U=S.current.firstChild;if(U){var z=T.current.scrollHeight>T.current.clientHeight,$=[],X=$;$=[OT(U.children[0]),OT(U.children[1])],(X[0]!==$[0]||X[1]!==$[1])&&(y.current.style.width=$[0]+"px",w.current.style.width=$[1]+"px"),z?(Q$(H,"rbc-header-overflowing"),H.style.marginRight=I8()+"px"):X$(H,"rbc-header-overflowing")}}},_=l.messages,k=l.add(r,i,"day"),R=l.range(r,k,"day");return a=a.filter(function(L){return uv(L,l.startOf(r,"day"),l.endOf(k,"day"),t,l)}),a.sort(function(L,H){return+t.start(L)-+t.start(H)}),ne.createElement("div",{className:"rbc-agenda-view"},a.length!==0?ne.createElement(ne.Fragment,null,ne.createElement("table",{ref:g,className:"rbc-agenda-table"},ne.createElement("thead",null,ne.createElement("tr",null,ne.createElement("th",{className:"rbc-header",ref:y},_.date),ne.createElement("th",{className:"rbc-header",ref:w},_.time),ne.createElement("th",{className:"rbc-header"},_.event)))),ne.createElement("div",{className:"rbc-agenda-content",ref:T},ne.createElement("table",{className:"rbc-agenda-table"},ne.createElement("tbody",{ref:S},R.map(function(L,H){return I(L,a,H)}))))):ne.createElement("span",{className:"rbc-agenda-empty"},_.noEventsInRange))}Xc.defaultProps={length:30};Xc.range=function(e,t){var n=t.length,r=n===void 0?Xc.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return{start:e,end:o}};Xc.navigate=function(e,t,n){var r=n.length,a=r===void 0?Xc.defaultProps.length:r,o=n.localizer;switch(t){case ri.PREVIOUS:return o.add(e,-a,"day");case ri.NEXT:return o.add(e,a,"day");default:return e}};Xc.title=function(e,t){var n=t.length,r=n===void 0?Xc.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return a.format({start:e,end:o},"agendaHeaderFormat")};var lw=af(af(af(af(af({},Mo.MONTH,zb),Mo.WEEK,Qc),Mo.WORK_WEEK,Zv),Mo.DAY,Vb),Mo.AGENDA,Xc),Xse=["action","date","today"];function ele(e,t){var n=t.action,r=t.date,a=t.today,o=Ql(t,Xse);switch(e=typeof e=="string"?lw[e]:e,n){case ri.TODAY:r=a||new Date;break;case ri.DATE:break;default:Xg(e&&typeof e.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=e.navigate(r,n,o)}return r}var tle=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.navigate=function(i){n.props.onNavigate(i)},n.view=function(i){n.props.onView(i)},n}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.localizer.messages,o=r.label;return ne.createElement("div",{className:"rbc-toolbar"},ne.createElement("span",{className:"rbc-btn-group"},ne.createElement("button",{type:"button",onClick:this.navigate.bind(null,ri.TODAY)},a.today),ne.createElement("button",{type:"button",onClick:this.navigate.bind(null,ri.PREVIOUS)},a.previous),ne.createElement("button",{type:"button",onClick:this.navigate.bind(null,ri.NEXT)},a.next)),ne.createElement("span",{className:"rbc-toolbar-label"},o),ne.createElement("span",{className:"rbc-btn-group"},this.viewNamesGroup(a)))}},{key:"viewNamesGroup",value:function(r){var a=this,o=this.props.views,i=this.props.view;if(o.length>1)return o.map(function(l){return ne.createElement("button",{type:"button",key:l,className:ca({"rbc-active":i===l}),onClick:a.view.bind(null,l)},r[l])})}}]),t}(ne.Component);function nle(e,t){var n=null;return typeof t=="function"?n=t(e):typeof t=="string"&&Uu(e)==="object"&&e!=null&&t in e&&(n=e[t]),n}var Yc=function(t){return function(n){return nle(n,t)}},rle=["view","date","getNow","onNavigate"],ale=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function T9(e){if(Array.isArray(e))return e;for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var a=ju(r[n],2),o=a[0],i=a[1];i&&t.push(o)}return t}function ole(e,t){var n=t.views,r=T9(n);return r.indexOf(e)!==-1}var I9=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=No(this,t,[].concat(a)),n.getViews=function(){var i=n.props.views;return Array.isArray(i)?Nie(i,function(l,c){return l[c]=lw[c]},{}):Uu(i)==="object"?Lie(i,function(l,c){return l===!0?lw[c]:l}):lw},n.getView=function(){var i=n.getViews();return i[n.props.view]},n.getDrilldownView=function(i){var l=n.props,c=l.view,f=l.drilldownView,p=l.getDrilldownView;return p?p(i,c,Object.keys(n.getViews())):f},n.handleRangeChange=function(i,l,c){var f=n.props,p=f.onRangeChange,g=f.localizer;p&&l.range&&p(l.range(i,{localizer:g}),c)},n.handleNavigate=function(i,l){var c=n.props,f=c.view,p=c.date,g=c.getNow,y=c.onNavigate,w=Ql(c,rle),T=n.getView(),S=g();p=ele(T,tr(tr({},w),{},{action:i,date:l||p||S,today:S})),y(p,f,i),n.handleRangeChange(p,T)},n.handleViewChange=function(i){i!==n.props.view&&ole(i,n.props)&&n.props.onView(i);var l=n.getViews();n.handleRangeChange(n.props.date||n.props.getNow(),l[i],i)},n.handleSelectEvent=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onSelectEvent,l)},n.handleDoubleClickEvent=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onDoubleClickEvent,l)},n.handleKeyPressEvent=function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];gr(n.props.onKeyPressEvent,l)},n.handleSelectSlot=function(i){gr(n.props.onSelectSlot,i)},n.handleDrillDown=function(i,l){var c=n.props.onDrillDown;if(c){c(i,l,n.drilldownView);return}l&&n.handleViewChange(l),n.handleNavigate(ri.DATE,i)},n.state={context:t.getContext(n.props)},n}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.view,o=r.toolbar,i=r.events,l=r.backgroundEvents,c=r.style,f=r.className,p=r.elementProps,g=r.date,y=r.getNow,w=r.length,T=r.showMultiDayTimes,S=r.onShowMore,I=r.doShowMoreDrillDown;r.components,r.formats,r.messages,r.culture;var M=Ql(r,ale);g=g||y();var N=this.getView(),_=this.state.context,k=_.accessors,R=_.components,L=_.getters,H=_.localizer,U=_.viewNames,z=R.toolbar||tle,$=N.title(g,{localizer:H,length:w});return ne.createElement("div",Object.assign({},p,{className:ca(f,"rbc-calendar",M.rtl&&"rbc-rtl"),style:c}),o&&ne.createElement(z,{date:g,view:a,views:U,label:$,onView:this.handleViewChange,onNavigate:this.handleNavigate,localizer:H}),ne.createElement(N,Object.assign({},M,{events:i,backgroundEvents:l,date:g,getNow:y,length:w,localizer:H,getters:L,components:R,accessors:k,showMultiDayTimes:T,getDrilldownView:this.getDrilldownView,onNavigate:this.handleNavigate,onDrillDown:this.handleDrillDown,onSelectEvent:this.handleSelectEvent,onDoubleClickEvent:this.handleDoubleClickEvent,onKeyPressEvent:this.handleKeyPressEvent,onSelectSlot:this.handleSelectSlot,onShowMore:S,doShowMoreDrillDown:I})))}}],[{key:"getDerivedStateFromProps",value:function(r){return{context:t.getContext(r)}}},{key:"getContext",value:function(r){var a=r.startAccessor,o=r.endAccessor,i=r.allDayAccessor,l=r.tooltipAccessor,c=r.titleAccessor,f=r.resourceAccessor,p=r.resourceIdAccessor,g=r.resourceTitleAccessor,y=r.eventPropGetter,w=r.backgroundEventPropGetter,T=r.slotPropGetter,S=r.slotGroupPropGetter,I=r.dayPropGetter,M=r.view,N=r.views,_=r.localizer,k=r.culture,R=r.messages,L=R===void 0?{}:R,H=r.components,U=H===void 0?{}:H,z=r.formats,$=z===void 0?{}:z,X=T9(N),Q=use(L);return{viewNames:X,localizer:sse(_,k,$,Q),getters:{eventProp:function(){return y&&y.apply(void 0,arguments)||{}},backgroundEventProp:function(){return w&&w.apply(void 0,arguments)||{}},slotProp:function(){return T&&T.apply(void 0,arguments)||{}},slotGroupProp:function(){return S&&S.apply(void 0,arguments)||{}},dayProp:function(){return I&&I.apply(void 0,arguments)||{}}},components:vie(U[M]||{},uie(U,X),{eventWrapper:Pu,backgroundEventWrapper:Pu,eventContainerWrapper:Pu,dateCellWrapper:Pu,weekWrapper:Pu,timeSlotWrapper:Pu,timeGutterWrapper:Pu}),accessors:{start:Yc(a),end:Yc(o),allDay:Yc(i),tooltip:Yc(l),title:Yc(c),resource:Yc(f),resourceId:Yc(p),resourceTitle:Yc(g)}}}}]),t}(ne.Component);I9.defaultProps={events:[],backgroundEvents:[],elementProps:{},popup:!1,toolbar:!0,view:Mo.MONTH,views:[Mo.MONTH,Mo.WEEK,Mo.DAY,Mo.AGENDA],step:30,length:30,allDayMaxRows:1/0,doShowMoreDrillDown:!0,drilldownView:Mo.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 ile=r8(I9,{view:"onView",date:"onNavigate",selected:"onSelectEvent"}),sle=function(t,n,r){var a=t.start,o=t.end;return r.format(a,"MMMM DD",n)+" "+r.format(o,r.eq(a,o,"month")?"DD":"MMMM DD",n)},lle=function(t,n,r){var a=t.start,o=t.end;return r.format(a,"L",n)+" "+r.format(o,"L",n)},WS=function(t,n,r){var a=t.start,o=t.end;return r.format(a,"LT",n)+" "+r.format(o,"LT",n)},ule=function(t,n,r){var a=t.start;return r.format(a,"LT",n)+" "},cle=function(t,n,r){var a=t.end;return" "+r.format(a,"LT",n)},dle={dateFormat:"DD",dayFormat:"DD ddd",weekdayFormat:"ddd",selectRangeFormat:WS,eventTimeRangeFormat:WS,eventTimeRangeStartFormat:ule,eventTimeRangeEndFormat:cle,timeGutterFormat:"LT",monthHeaderFormat:"MMMM YYYY",dayHeaderFormat:"dddd MMM DD",dayRangeHeaderFormat:sle,agendaHeaderFormat:lle,agendaDateFormat:"ddd MMM DD",agendaTimeFormat:"LT",agendaTimeRangeFormat:WS};function Uc(e){var t=e&&e.toLowerCase();return t==="FullYear"?t="year":t||(t=void 0),t}function fle(e){var t=function(Se,je){return je?Se.locale(je):Se};function n(ae){return e(ae).toDate().getTimezoneOffset()}function r(ae,Se){var je,Re,Fe=e(ae).local(),Be=e(Se).local();if(!e.tz)return Fe.toDate().getTimezoneOffset()-Be.toDate().getTimezoneOffset();var Qe=(je=Fe==null||(Re=Fe._z)===null||Re===void 0?void 0:Re.name)!==null&&je!==void 0?je:e.tz.guess(),Ze=e.tz.zone(Qe).utcOffset(+Fe),st=e.tz.zone(Qe).utcOffset(+Be);return Ze-st}function a(ae){var Se=e(ae).startOf("day");return r(Se,ae)}function o(ae,Se,je){var Re=Uc(je),Fe=Re?e(ae).startOf(Re):e(ae),Be=Re?e(Se).startOf(Re):e(Se);return[Fe,Be,Re]}function i(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Se=arguments.length>1?arguments[1]:void 0,je=Uc(Se);return je?e(ae).startOf(je).toDate():e(ae).toDate()}function l(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,Se=arguments.length>1?arguments[1]:void 0,je=Uc(Se);return je?e(ae).endOf(je).toDate():e(ae).toDate()}function c(ae,Se,je){var Re=o(ae,Se,je),Fe=ju(Re,3),Be=Fe[0],Qe=Fe[1],Ze=Fe[2];return Be.isSame(Qe,Ze)}function f(ae,Se,je){return!c(ae,Se,je)}function p(ae,Se,je){var Re=o(ae,Se,je),Fe=ju(Re,3),Be=Fe[0],Qe=Fe[1],Ze=Fe[2];return Be.isAfter(Qe,Ze)}function g(ae,Se,je){var Re=o(ae,Se,je),Fe=ju(Re,3),Be=Fe[0],Qe=Fe[1],Ze=Fe[2];return Be.isBefore(Qe,Ze)}function y(ae,Se,je){var Re=o(ae,Se,je),Fe=ju(Re,3),Be=Fe[0],Qe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Qe,Ze)}function w(ae,Se,je){var Re=o(ae,Se,je),Fe=ju(Re,3),Be=Fe[0],Qe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Qe,Ze)}function T(ae,Se,je){var Re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",Fe=Uc(Re),Be=e(ae),Qe=e(Se),Ze=e(je);return Be.isBetween(Qe,Ze,Fe,"[]")}function S(ae,Se){var je=e(ae),Re=e(Se),Fe=e.min(je,Re);return Fe.toDate()}function I(ae,Se){var je=e(ae),Re=e(Se),Fe=e.max(je,Re);return Fe.toDate()}function M(ae,Se){if(!ae&&!Se)return null;var je=e(Se).format("HH:mm:ss"),Re=e(ae).startOf("day").format("MM/DD/YYYY");return e("".concat(Re," ").concat(je),"MM/DD/YYYY HH:mm:ss").toDate()}function N(ae,Se,je){var Re=Uc(je);return e(ae).add(Se,Re).toDate()}function _(ae,Se){for(var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=Uc(je),Fe=e(ae).toDate(),Be=[];w(Fe,Se);)Be.push(Fe),Fe=N(Fe,1,Re);return Be}function k(ae,Se){var je=Uc(Se),Re=i(ae,je);return c(Re,ae)?Re:N(Re,1,je)}function R(ae,Se){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=Uc(je),Fe=e(ae),Be=e(Se);return Be.diff(Fe,Re)}function L(ae){var Se=e(ae);return Se.minutes()}function H(ae){var Se=ae?e.localeData(ae):e.localeData();return Se?Se.firstDayOfWeek():0}function U(ae){return e(ae).startOf("month").startOf("week").toDate()}function z(ae){return e(ae).endOf("month").endOf("week").toDate()}function $(ae){for(var Se=U(ae),je=z(ae),Re=[];w(Se,je);)Re.push(Se),Se=N(Se,1,"d");return Re}function X(ae,Se,je){return e(ae).startOf("day").minute(Se+je).toDate()}function Q(ae,Se){return R(ae,Se,"minutes")}function se(ae){var Se=e(ae).startOf("day"),je=e(ae);return je.diff(Se,"minutes")+a(ae)}function ue(ae,Se){var je=e(ae),Re=e(Se);return je.isBefore(Re,"day")}function fe(ae,Se,je){var Re=e(Se),Fe=e(je);return Re.isSameOrAfter(Fe,"minutes")}function Z(ae,Se){var je=e(ae),Re=e(Se),Fe=e.duration(Re.diff(je));return Fe.days()}function pe(ae){var Se=ae.evtA,je=Se.start,Re=Se.end,Fe=Se.allDay,Be=ae.evtB,Qe=Be.start,Ze=Be.end,st=Be.allDay,xt=+i(je,"day")-+i(Qe,"day"),tn=Z(je,Re),_e=Z(Qe,Ze);return xt||_e-tn||!!st-!!Fe||+je-+Qe||+Re-+Ze}function ie(ae){var Se=ae.event,je=Se.start,Re=Se.end,Fe=ae.range,Be=Fe.start,Qe=Fe.end,Ze=e(je).startOf("day"),st=e(Re),xt=e(Be),tn=e(Qe),_e=Ze.isSameOrBefore(tn,"day"),Xe=!Ze.isSame(st,"minutes"),tt=Xe?st.isAfter(xt,"minutes"):st.isSameOrAfter(xt,"minutes");return _e&&tt}function de(ae,Se){var je=e(ae),Re=e(Se);return je.isSame(Re,"day")}function K(){var ae=new Date,Se=/-/.test(ae.toString())?"-":"",je=ae.getTimezoneOffset(),Re=Number("".concat(Se).concat(Math.abs(je))),Fe=e().utcOffset();return Fe>Re?1:0}return new ise({formats:dle,firstOfWeek:H,firstVisibleDay:U,lastVisibleDay:z,visibleDays:$,format:function(Se,je,Re){return t(e(Se),Re).format(je)},lt:g,lte:w,gt:p,gte:y,eq:c,neq:f,merge:M,inRange:T,startOf:i,endOf:l,range:_,add:N,diff:R,ceil:k,min:S,max:I,minutes:L,getSlotDate:X,getTimezoneOffset:n,getDstOffset:r,getTotalMin:Q,getMinutesFromMidnight:se,continuesPrior:ue,continuesAfter:fe,sortEvents:pe,inEventRange:ie,isSameDate:de,daySpan:Z,browserTZOffset:K})}function s3(e,t,n,r,a){const o={start:r.start(e),end:r.end(e)},i={start:t,end:n};return a.inEventRange({event:o,range:i})}function hle(e,t){return!e||t==null?!1:fb.isEqual(e,t)}const cp={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"};function zu({accessors:e,components:t,date:n,events:r,getters:a,length:o,localizer:i,onDoubleClickEvent:l,onSelectEvent:c,selected:f}){P.useRef(null);const p=P.useRef(null),g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[T,S]=P.useState(!1),[I,M]=P.useState(!1),N=($,X,Q)=>{const{event:se,date:ue}=t;return X=X.filter(fe=>s3(fe,i.startOf($,"day"),i.endOf($,"day"),e,i)),X.map((fe,Z)=>{const pe=e.title(fe),ie=e.end(fe),de=e.start(fe),K=a.eventProp(fe,de,ie,hle(fe,f)),ae=Z===0&&i.format($,"agendaDateFormat"),Se=Z===0?v.jsx("td",{rowSpan:X.length,className:"rbc-agenda-date-cell",children:ue?v.jsx(ue,{day:$,label:ae}):ae}):!1;return v.jsxs("tr",{className:K.className,style:K.style,children:[Se,v.jsx("td",{className:"rbc-agenda-time-cell",children:_($,fe)}),v.jsx("td",{className:"rbc-agenda-event-cell",onClick:je=>c&&c(fe,je),onDoubleClick:je=>l&&l(fe,je),children:se?v.jsx(se,{event:fe,title:pe}):pe})]},Q+"_"+Z)},[])},_=($,X)=>{const Q=t.time;let se="",ue=i.messages.allDay;const fe=e.end(X),Z=e.start(X);return e.allDay(X)||(i.eq(Z,fe)?ue=i.format(Z,"agendaTimeFormat"):i.isSameDate(Z,fe)?ue=i.format({start:Z,end:fe},"agendaTimeRangeFormat"):i.isSameDate($,Z)?ue=i.format(Z,"agendaTimeFormat"):i.isSameDate($,fe)&&(ue=i.format(fe,"agendaTimeFormat"))),i.gt($,Z,"day")&&(se="rbc-continues-prior"),i.lt($,fe,"day")&&(se+=" rbc-continues-after"),v.jsx("span",{className:se.trim(),children:Q?v.jsx(Q,{event:X,day:$,label:ue}):ue})},{messages:k}=i,R=i.add(n,-o/2,"day"),L=i.add(n,o/2,"day"),H=i.range(R,L,"day");T&&H.reverse(),r=r.filter($=>s3($,i.startOf(R,"day"),i.endOf(L,"day"),e,i)),r.sort(($,X)=>+e.start($)-+e.start(X)),I&&r.reverse();const U=P.useCallback(()=>setTimeout(()=>{w.current&&Ib(w.current,{backgroundColor:"#ffffff",pixelRatio:window.devicePixelRatio*2}).then($=>{new C.Notice(E("Image is generating..."));const X=ft.getState().settings.AutoSaveWhenOnMobile,Q=ft.getState().app.vault;if(X&&C.Platform.isMobile){const se=$.split("base64,")[1];db(se,"image/png").arrayBuffer().then(async fe=>{let Z;const pe="png",ie=Zu();for(const de in ie)if(ie[de]instanceof C.TFile){Z=ie[de];break}Z!==void 0&&await Q.createBinary(await Q.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,pe,Z),fe)})}Eb({imgUrl:$})}).catch($=>{console.error($)})},0),[w.current,H]),z=P.useCallback($=>{const X=new C.Menu;X.addItem(Q=>{Q.setIcon("share-2").setTitle(E("Share")).onClick(()=>{U()})}),X.showAtMouseEvent($.nativeEvent)},[w.current,H,U]);return v.jsx("div",{className:"rbc-agenda-view",children:r.length!==0?v.jsx(ne.Fragment,{children:v.jsxs("table",{ref:w,className:"rbc-agenda-table",children:[v.jsx("thead",{onContextMenu:z,children:v.jsxs("tr",{children:[v.jsx("th",{className:"rbc-header",ref:p,onClick:()=>{S(!T)},children:k.date+(T?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",ref:g,onClick:()=>{M(!I)},children:k.time+(I?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",children:k.event})]})}),v.jsx("tbody",{ref:y,children:H.map(($,X)=>N($,r,X))})]})}):v.jsx("span",{className:"rbc-agenda-empty",children:k.noEventsInRange})})}zu.propTypes={accessors:ke.object.isRequired,components:ke.object.isRequired,date:ke.instanceOf(Date),events:ke.array,getters:ke.object.isRequired,length:ke.number.isRequired,localizer:ke.object.isRequired,onSelectEvent:ke.func,onDoubleClickEvent:ke.func,selected:ke.object};zu.defaultProps={length:30};zu.range=(e,{length:t=zu.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return{customStart:r,customEnd:a}};zu.navigate=(e,t,{length:n=zu.defaultProps.length,localizer:r})=>{switch(t){case cp.PREVIOUS:return r.add(e,-n,"day");case cp.NEXT:return r.add(e,n,"day");default:return e}};zu.title=(e,{length:t=zu.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return n.format({start:r,end:a},"agendaHeaderFormat")};function ple(e,t){e.hoverEl.toggleClass("thino-hover-popover",!0);const n=Av(e.hoverEl);return n.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(ai,{memo:t})})),n}function mle({event:e}){const t=e.resource,n=t.content.split(`
`)[0].slice(0,20),r=ne.useRef(null),a=ne.useRef(null),o=ne.useRef(null);P.useEffect(()=>{if(a.current)return C.setIcon(a.current,"calendar"),()=>{r.current&&(r.current=null)}},[r]);const i=P.useCallback(c=>{o.current&&(o.current.unmount(),o.current=null),o.current=c},[]),l=P.useCallback(c=>{if(!r.current||!C.Keymap.isModifier(c.nativeEvent,"Mod"))return;const f=new C.HoverPopover(ft.getState().view,r.current,100),p=ple(f,t);i(p)},[r.current]);return v.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:l,children:[v.jsx(gle,{event:e}),v.jsx("span",{children:n})]})}const gle=({event:e})=>{const t=ne.useRef(null),n=e.resource;P.useEffect(()=>{t.current&&C.setIcon(t.current,n.thinoType==="JOURNAL"?"calendar":n.thinoType==="TASK-TODO"?"square":"check-square")},[n==null?void 0:n.thinoType,t]);const r=P.useCallback(async a=>{a.stopPropagation(),a.preventDefault(),await(async()=>{const i=await be.updateMemo(n.id,n.content,n.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");i&&be.editMemo(i)})()},[n==null?void 0:n.thinoType,n==null?void 0:n.id,n==null?void 0:n.content]);return v.jsx(v.Fragment,{children:v.jsxs("span",{className:"rbc-event-icon-group",children:[v.jsx("span",{className:"rbc-event-icon",ref:t,onClick:r}),v.jsx("span",{className:ar("rbc-event-time","hidden"),children:v.jsx("span",{className:"rbc-event-time-text",children:C.moment(e.start).format("HH:mm")})})]})})};function E9({views:e,view:t,messages:n,onView:r}){return e.map(a=>v.jsx("button",{type:"button",className:ar({"rbc-active":t===a}),onClick:()=>r(a),children:n[a]},a))}E9.propTypes={messages:ke.object,onView:ke.func,view:ke.string,views:ke.array};function x9({date:e,label:t,localizer:{messages:n},onNavigate:r,onView:a,view:o,views:i}){const l={previous:P.useRef(null),today:P.useRef(null),next:P.useRef(null)};P.useEffect(()=>{l&&(C.setIcon(l.previous.current,"chevron-left"),C.setIcon(l.today.current,"dot"),C.setIcon(l.next.current,"chevron-right"))},[l]);const c=P.useMemo(()=>v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:l.previous,type:"button",onClick:()=>r(cp.PREVIOUS),"aria-label":n.previous,children:"<"}),v.jsx("button",{ref:l.today,type:"button",onClick:()=>r(cp.TODAY),"aria-label":n.today,children:"•"}),v.jsx("button",{ref:l.next,type:"button",onClick:()=>r(cp.NEXT),"aria-label":n.next,children:">"})]}),[n]);return v.jsxs("div",{className:"rbc-toolbar",children:[v.jsx("span",{className:ar("rbc-btn-group","thino-view-custom-toolbar"),children:c}),v.jsx("span",{className:"rbc-toolbar-label",children:v.jsx(kw,{type:"text",handleValueChange:f=>{r(cp.DATE,C.moment(f,"YYYY-MM-DD").format("YYYY-MM-DDTHH:mm:ssZ"))},defaultText:t+(o==="week"?C.moment(e.valueOf(),"x").format(" [W]WW"):""),defaultValue:C.moment(e.valueOf(),"x").valueOf()})}),v.jsx("span",{className:"rbc-btn-group",children:v.jsx(E9,{view:o,views:i,messages:n,onView:a})})]})}x9.propTypes={date:ke.instanceOf(Date),label:ke.string,localizer:ke.object,messages:ke.object,onNavigate:ke.func,onView:ke.func,view:ke.string,views:ke.array};function vle({event:e,children:t,showPopup:n,callRender:r,...a}){const o=P.useRef(null),i=P.useRef(null),l=P.useCallback(c=>{if(!c.isTrusted){r();return}i.current=c.nativeEvent.target,i.current&&(i.current.hasClass("rbc-event")||(i.current=i.current.closest(".rbc-event")),o.current!==null?(window.clearTimeout(o.current),o.current=null):o.current=window.setTimeout(()=>{n(e,i.current),o.current=null},250))},[e,n]);return v.jsx(v.Fragment,{children:v.jsx("div",{className:"rbc-event-wrapper","aria-describedby":"thino",onClick:l,children:t})})}const yle=fle(C.moment),wle=({event:e})=>{const t=e.resource;return v.jsx(v.Fragment,{children:v.jsx(ai,{memo:t})})},ble=e=>{var Q;const{thinos:t}=e,[n,r]=ne.useState([]),[a,o]=ne.useState((app==null?void 0:app.loadLocalStorage("thino-calendar-view"))||"month"),[i,l]=ne.useState(null),c=ne.useRef(null),f=ne.useRef(null),[p,g]=ne.useState(!1),y=P.useRef(null),[w,T]=P.useState(new Date);P.useEffect(()=>()=>{c.current&&(c.current=null),f.current&&(f.current=null),y.current&&(y.current=null)},[]),P.useEffect(()=>{const se=t.map(ue=>{const fe=C.moment(ue.createdAt,"YYYY/MM/DD HH:mm:ss"),Z=fe.clone().add(1,"minute");return{title:ue.content,start:new Date(fe.format("YYYY-MM-DDTHH:mm:ss")),end:new Date(Z.format("YYYY-MM-DDTHH:mm:ss")),resource:ue}});r(se)},[t]),P.useEffect(()=>{app==null||app.saveLocalStorage("thino-calendar-view",a)},[a]),P.useEffect(()=>{i&&p&&l(t.find(se=>se.id===i.id))},[t,i,p]),P.useEffect(()=>{i&&y.current.update()},[i]),y.current=Tb(c.current,f.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}]});const S=P.useCallback(()=>{y.current.update(),y.current.update()},[]),I=P.useCallback((se,ue)=>{l(null),k(),y.current.state.elements.reference=ue,l(se.resource),R()},[]),M=P.useCallback(()=>{k(),l(null)},[]),N=P.useCallback((se,ue,fe)=>{var Z;if(_(se),ue==="week"||ue==="day"){const pe=c.current.find(".rbc-event-wrapper");if(c.current.closest(".memolist-wrapper"),pe){(Z=pe.children[0])==null||Z.click();return}else{setTimeout(()=>{var de,K;const ie=c.current.find(".rbc-event-wrapper");(K=(de=ie==null?void 0:ie.children)==null?void 0:de[0])==null||K.click()},0);return}}},[]),_=P.useCallback(se=>{T(se)},[T]);Pv(f,M);const k=P.useCallback(()=>{g(!1)},[g]),R=P.useCallback(()=>{y.current.update(),g(!0)},[g]),L=P.useCallback(se=>{const ue=se.resource;dt.setEditMemoId(ue.id)},[]),H=P.useCallback(se=>{o(se)},[o]),{components:U,views:z,messages:$}=P.useMemo(()=>({components:{toolbar:x9,eventWrapper:se=>v.jsx(vle,{...se,callRender:S,showPopup:I}),agenda:{event:wle},event:mle},views:{month:!0,agenda:zu,week:!0,day:!0},messages:{month:E("Month"),day:E("Day"),next:E("Next"),previous:E("Previous"),today:E("Today"),agenda:E("Agenda"),week:E("Week"),yesterday:E("Yesterday"),tomorrow:E("Tomorrow"),noEventsInRange:E("No thinos in range"),date:E("date"),time:E("time"),event:E("event")}}),[]),X=P.useMemo(()=>({timeGutterFormat:(se,ue,fe)=>fe.format(se,"HH:mm",ue),agendaTimeRangeFormat:({start:se,end:ue},fe,Z)=>Z.format(se,"HH:mm",fe)+" — "+Z.format(ue,"HH:mm",fe),agendaHeaderFormat:({start:se,end:ue},fe,Z)=>Z.format(se,"YYYY-MM-DD")+" — "+Z.format(ue,"YYYY-MM-DD")}),[]);return v.jsxs("div",{ref:c,className:"calendar-view",children:[v.jsx(ile,{date:w,messages:$,components:U,localizer:yle,events:n,views:z,onView:H,onDoubleClickEvent:L,onNavigate:N,formats:X,defaultView:a,tooltipAccessor:null,startAccessor:"start",endAccessor:"end"}),v.jsx("div",{ref:f,style:(Q=y.current)==null?void 0:Q.styles.popper,className:ar("thino-popup-container",p?"":"hidden"),children:i&&v.jsx(ai,{memo:i})})]})};function Gc(e,t){return typeof e=="function"?e(t):e}function Ai(e,t){return n=>{t.setState(r=>({...r,[e]:Gc(n,r[e])}))}}function Ww(e){return e instanceof Function}function Sle(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Dle(e,t){const n=[],r=a=>{a.forEach(o=>{n.push(o);const i=t(o);i!=null&&i.length&&r(i)})};return r(e),n}function Bt(e,t,n){let r=[],a;return o=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(o);if(!(l.length!==r.length||l.some((p,g)=>r[g]!==p)))return a;r=l;let f;if(n.key&&n.debug&&(f=Date.now()),a=t(...l),n==null||n.onChange==null||n.onChange(a),n.key&&n.debug&&n!=null&&n.debug()){const p=Math.round((Date.now()-i)*100)/100,y=Math.round((Date.now()-f)*100)/100/16,w=(T,S)=>{for(T=String(T);T.length<S;)T=" "+T;return T}}return a}}function Ht(e,t,n,r){return{debug:()=>{var a;return(a=e==null?void 0:e.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function Tle(e,t,n,r){var a,o;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let f=(a=(o=l.id)!=null?o:c?c.replace(".","_"):void 0)!=null?a:typeof l.header=="string"?l.header:void 0,p;if(l.accessorFn?p=l.accessorFn:c&&(c.includes(".")?p=y=>{let w=y;for(const S of c.split(".")){var T;w=(T=w)==null?void 0:T[S]}return w}:p=y=>y[l.accessorKey]),!f)throw new Error;let g={id:`${String(f)}`,accessorFn:p,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:Bt(()=>[!0],()=>{var y;return[g,...(y=g.columns)==null?void 0:y.flatMap(w=>w.getFlatColumns())]},Ht(e.options,"debugColumns")),getLeafColumns:Bt(()=>[e._getOrderColumnsFn()],y=>{var w;if((w=g.columns)!=null&&w.length){let T=g.columns.flatMap(S=>S.getLeafColumns());return y(T)}return[g]},Ht(e.options,"debugColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(g,e);return g}const oo="debugHeaders";function l3(e,t,n){var r;let o={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=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(o),i},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(o,e)}),o}const Ile={createTable:e=>{e.getHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>{var o,i;const l=(o=r==null?void 0:r.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?o:[],c=(i=a==null?void 0:a.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?i:[],f=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(a!=null&&a.includes(g.id)));return M0(t,[...l,...f,...c],e)},Ht(e.options,oo)),e.getCenterHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(a!=null&&a.includes(o.id))),M0(t,n,e,"center")),Ht(e.options,oo)),e.getLeftHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return M0(t,o,e,"left")},Ht(e.options,oo)),e.getRightHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return M0(t,o,e,"right")},Ht(e.options,oo)),e.getFooterGroups=Bt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getLeftFooterGroups=Bt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getCenterFooterGroups=Bt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getRightFooterGroups=Bt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getFlatHeaders=Bt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getLeftFlatHeaders=Bt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterFlatHeaders=Bt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getRightFlatHeaders=Bt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterLeafHeaders=Bt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeftLeafHeaders=Bt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getRightLeafHeaders=Bt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeafHeaders=Bt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var a,o,i,l,c,f;return[...(a=(o=t[0])==null?void 0:o.headers)!=null?a:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(f=r[0])==null?void 0:f.headers)!=null?c:[]].map(p=>p.getLeafHeaders()).flat()},Ht(e.options,oo))}};function M0(e,t,n,r){var a,o;let i=0;const l=function(y,w){w===void 0&&(w=1),i=Math.max(i,w),y.filter(T=>T.getIsVisible()).forEach(T=>{var S;(S=T.columns)!=null&&S.length&&l(T.columns,w+1)},0)};l(e);let c=[];const f=(y,w)=>{const T={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},S=[];y.forEach(I=>{const M=[...S].reverse()[0],N=I.column.depth===T.depth;let _,k=!1;if(N&&I.column.parent?_=I.column.parent:(_=I.column,k=!0),M&&(M==null?void 0:M.column)===_)M.subHeaders.push(I);else{const R=l3(n,_,{id:[r,w,_.id,I==null?void 0:I.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${S.filter(L=>L.column===_).length}`:void 0,depth:w,index:S.length});R.subHeaders.push(I),S.push(R)}T.headers.push(I),I.headerGroup=T}),c.push(T),w>0&&f(S,w-1)},p=t.map((y,w)=>l3(n,y,{depth:i,index:w}));f(p,i-1),c.reverse();const g=y=>y.filter(T=>T.column.getIsVisible()).map(T=>{let S=0,I=0,M=[0];T.subHeaders&&T.subHeaders.length?(M=[],g(T.subHeaders).forEach(_=>{let{colSpan:k,rowSpan:R}=_;S+=k,M.push(R)})):S=1;const N=Math.min(...M);return I+=N,T.colSpan=S,T.rowSpan=I,{colSpan:S,rowSpan:I}});return g((a=(o=c[0])==null?void 0:o.headers)!=null?a:[]),c}const k0={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},$S=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ele={getDefaultColumnDef:()=>k0,getInitialState:e=>({columnSizing:{},columnSizingInfo:$S(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ai("columnSizing",e),onColumnSizingInfoChange:Ai("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,a;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:k0.minSize,(r=o??e.columnDef.size)!=null?r:k0.size),(a=e.columnDef.maxSize)!=null?a:k0.maxSize)},e.getStart=Bt(n=>[n,Hg(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.getAfter=Bt(n=>[n,Hg(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...a}=n;return a})},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=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var o;n+=(o=a.column.getSize())!=null?o: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),a=r==null?void 0:r.getCanResize();return o=>{if(!r||!a||(o.persist==null||o.persist(),ZS(o)&&o.touches&&o.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(M=>[M.column.id,M.column.getSize()]):[[r.id,r.getSize()]],c=ZS(o)?Math.round(o.touches[0].clientX):o.clientX,f={},p=(M,N)=>{typeof N=="number"&&(t.setColumnSizingInfo(_=>{var k,R;const L=t.options.columnResizeDirection==="rtl"?-1:1,H=(N-((k=_==null?void 0:_.startOffset)!=null?k:0))*L,U=Math.max(H/((R=_==null?void 0:_.startSize)!=null?R:0),-.999999);return _.columnSizingStart.forEach(z=>{let[$,X]=z;f[$]=Math.round(Math.max(X+X*U,0)*100)/100}),{..._,deltaOffset:H,deltaPercentage:U}}),(t.options.columnResizeMode==="onChange"||M==="end")&&t.setColumnSizing(_=>({..._,...f})))},g=M=>p("move",M),y=M=>{p("end",M),t.setColumnSizingInfo(N=>({...N,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=n||typeof document<"u"?document:null,T={moveHandler:M=>g(M.clientX),upHandler:M=>{w==null||w.removeEventListener("mousemove",T.moveHandler),w==null||w.removeEventListener("mouseup",T.upHandler),y(M.clientX)}},S={moveHandler:M=>(M.cancelable&&(M.preventDefault(),M.stopPropagation()),g(M.touches[0].clientX),!1),upHandler:M=>{var N;w==null||w.removeEventListener("touchmove",S.moveHandler),w==null||w.removeEventListener("touchend",S.upHandler),M.cancelable&&(M.preventDefault(),M.stopPropagation()),y((N=M.touches[0])==null?void 0:N.clientX)}},I=xle()?{passive:!1}:!1;ZS(o)?(w==null||w.addEventListener("touchmove",S.moveHandler,I),w==null||w.addEventListener("touchend",S.upHandler,I)):(w==null||w.addEventListener("mousemove",T.moveHandler,I),w==null||w.addEventListener("mouseup",T.upHandler,I)),t.setColumnSizingInfo(M=>({...M,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,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?$S():(n=e.initialState.columnSizingInfo)!=null?n:$S())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}};let N0=null;function xle(){if(typeof N0=="boolean")return N0;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 N0=e,N0}function ZS(e){return e.type==="touchstart"}const Cle={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ai("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a: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 a,o;e.setExpanded(r?{}:(a=(o=e.initialState)==null?void 0:o.expanded)!=null?a:{})},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(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const i=o.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 a;const o=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(a=n)!=null?a:!o,!o&&n)return{...i,[e.id]:!0};if(o&&!n){const{[e.id]:l,...c}=i;return c}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!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,a;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.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()}}}},C9=(e,t,n)=>{var r;const a=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(a))};C9.autoRemove=e=>Ys(e);const M9=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};M9.autoRemove=e=>Ys(e);const k9=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};k9.autoRemove=e=>Ys(e);const N9=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};N9.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const A9=(e,t,n)=>!n.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});A9.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const F9=(e,t,n)=>n.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});F9.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const O9=(e,t,n)=>e.getValue(t)===n;O9.autoRemove=e=>Ys(e);const P9=(e,t,n)=>e.getValue(t)==n;P9.autoRemove=e=>Ys(e);const NI=(e,t,n)=>{let[r,a]=n;const o=e.getValue(t);return o>=r&&o<=a};NI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(a)?1/0:a;if(o>i){const l=o;o=i,i=l}return[o,i]};NI.autoRemove=e=>Ys(e)||Ys(e[0])&&Ys(e[1]);const Fu={includesString:C9,includesStringSensitive:M9,equalsString:k9,arrIncludes:N9,arrIncludesAll:A9,arrIncludesSome:F9,equals:O9,weakEquals:P9,inNumberRange:NI};function Ys(e){return e==null||e===""}const Mle={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ai("columnFilters",e),onGlobalFilterChange:Ai("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==null?void 0:n.getValue(e.id);return typeof r=="string"?Fu.includesString:typeof r=="number"?Fu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Fu.equals:Array.isArray(r)?Fu.arrIncludes:Fu.weakEquals},e.getFilterFn=()=>{var n,r;return Ww(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:Fu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,a;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,a,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!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(a=>a.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const a=e.getFilterFn(),o=r==null?void 0:r.find(p=>p.id===e.id),i=Gc(n,o?o.value:void 0);if(u3(a,i,e)){var l;return(l=r==null?void 0:r.filter(p=>p.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(o){var f;return(f=r==null?void 0:r.map(p=>p.id===e.id?c:p))!=null?f:[]}return r!=null&&r.length?[...r,c]:[c]})},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=()=>Fu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Ww(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Fu[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=a=>{var o;return(o=Gc(t,a))==null?void 0:o.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(u3(c,i.value,l))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 u3(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const kle=(e,t,n)=>n.reduce((r,a)=>{const o=a.getValue(e);return r+(typeof o=="number"?o:0)},0),Nle=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Ale=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},Fle=(e,t,n)=>{let r,a;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r===void 0?i>=i&&(r=a=i):(r>i&&(r=i),a<i&&(a=i)))}),[r,a]},Ole=(e,t)=>{let n=0,r=0;if(t.forEach(a=>{let o=a.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},Ple=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Sle(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),a=n.sort((o,i)=>o-i);return n.length%2!==0?a[r]:(a[r-1]+a[r])/2},jle=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Lle=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Rle=(e,t)=>t.length,qS={sum:kle,min:Nle,max:Ale,extent:Fle,mean:Ole,median:Ple,unique:jle,uniqueCount:Lle,count:Rle},_le={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:Ai("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,a,o;return(n=(r=(a=(o=e.columnDef.enableGrouping)!=null?o:!0)!=null?a: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==null?void 0:n.getValue(e.id);if(typeof r=="number")return qS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return qS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Ww(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:qS[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 a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=n.subRows)!=null&&a.length)}}};function Ble(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(i=>i.id===o)).filter(Boolean),...r]}const Hle={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ai("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Bt(n=>[Hg(t,n)],n=>n.findIndex(r=>r.id===e.id),Ht(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Hg(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const a=Hg(t,n);return((r=a[a.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=Bt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>a=>{let o=[];if(!(t!=null&&t.length))o=a;else{const i=[...t],l=[...a];for(;l.length&&i.length;){const c=i.shift(),f=l.findIndex(p=>p.id===c);f>-1&&o.push(l.splice(f,1)[0])}o=[...o,...l]}return Ble(o,n,r)},Ht(e.options,"debugTable"))}},LT=0,RT=10,GS=()=>({pageIndex:LT,pageSize:RT}),Yle={getInitialState:e=>({...e,pagination:{...GS(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ai("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const a=o=>Gc(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?GS():(a=e.initialState.pagination)!=null?a:GS())},e.setPageIndex=r=>{e.setPagination(a=>{let o=Gc(r,a.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,i)),{...a,pageIndex:o}})},e.resetPageIndex=r=>{var a,o;e.setPageIndex(r?LT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?a:LT)},e.resetPageSize=r=>{var a,o;e.setPageSize(r?RT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?a:RT)},e.setPageSize=r=>{e.setPagination(a=>{const o=Math.max(1,Gc(r,a.pageSize)),i=a.pageSize*a.pageIndex,l=Math.floor(i/o);return{...a,pageIndex:l,pageSize:o}})},e.setPageCount=r=>e.setPagination(a=>{var o;let i=Gc(r,(o=e.options.pageCount)!=null?o:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...a,pageCount:i}}),e.getPageOptions=Bt(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((o,i)=>i)),a},Ht(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:r<a-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}}},JS=()=>({left:[],right:[]}),KS=()=>({top:[],bottom:[]}),Ule={getInitialState:e=>({columnPinning:JS(),rowPinning:KS(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ai("columnPinning",e),onRowPinningChange:Ai("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var o,i;if(n==="right"){var l,c;return{left:((l=a==null?void 0:a.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((c=a==null?void 0:a.right)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var f,p;return{left:[...((f=a==null?void 0:a.left)!=null?f:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((p=a==null?void 0:a.right)!=null?p:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((o=a==null?void 0:a.left)!=null?o:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=a==null?void 0:a.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,o,i;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((o=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:a}=t.getState().columnPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();return a?(n=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,a)=>{const o=r?e.getLeafRows().map(c=>{let{id:f}=c;return f}):[],i=a?e.getParentRows().map(c=>{let{id:f}=c;return f}):[],l=new Set([...i,e.id,...o]);t.setRowPinning(c=>{var f,p;if(n==="bottom"){var g,y;return{top:((g=c==null?void 0:c.top)!=null?g:[]).filter(S=>!(l!=null&&l.has(S))),bottom:[...((y=c==null?void 0:c.bottom)!=null?y:[]).filter(S=>!(l!=null&&l.has(S))),...Array.from(l)]}}if(n==="top"){var w,T;return{top:[...((w=c==null?void 0:c.top)!=null?w:[]).filter(S=>!(l!=null&&l.has(S))),...Array.from(l)],bottom:((T=c==null?void 0:c.bottom)!=null?T:[]).filter(S=>!(l!=null&&l.has(S)))}}return{top:((f=c==null?void 0:c.top)!=null?f:[]).filter(S=>!(l!=null&&l.has(S))),bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(S=>!(l!=null&&l.has(S)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(n=r??a)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:a}=t.getState().rowPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();if(!a)return-1;const o=(n=t._getPinnedRows(a))==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,a)=>{const o=[...r??[],...a??[]];return n.filter(i=>!o.includes(i.column.id))},Ht(t.options,"debugRows")),e.getLeftVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ht(t.options,"debugRows")),e.getRightVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ht(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?JS():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:JS())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var a,o;return!!((a=r.left)!=null&&a.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getRightLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getCenterLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const a=[...n??[],...r??[]];return t.filter(o=>!a.includes(o.id))},Ht(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?KS():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:KS())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var a,o;return!!((a=r.top)!=null&&a.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Bt(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},Ht(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Bt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const a=new Set([...n??[],...r??[]]);return t.filter(o=>!a.has(o.id))},Ht(e.options,"debugRows"))}},zle={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ai("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},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):a.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...n};return e.getRowModel().rows.forEach(o=>{_T(a,o.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?QS(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getFilteredSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?QS(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getGroupedSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?QS(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(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(a=>a.getCanSelect()&&!n[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(a=>!n[a.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 a=e.getIsSelected();t.setRowSelection(o=>{var i;if(n=typeof n<"u"?n:!a,e.getCanSelect()&&a===n)return o;const l={...o};return _T(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return AI(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return BT(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return BT(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 a;n&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},_T=(e,t,n,r,a)=>{var o;const i=a.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=i.subRows)!=null&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>_T(e,l.id,n,r,a))};function QS(e,t){const n=e.getState().rowSelection,r=[],a={},o=function(i,l){return i.map(c=>{var f;const p=AI(c,n);if(p&&(r.push(c),a[c.id]=c),(f=c.subRows)!=null&&f.length&&(c={...c,subRows:o(c.subRows)}),p)return c}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:a}}function AI(e,t){var n;return(n=t[e.id])!=null?n:!1}function BT(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,o=!1;return e.subRows.forEach(i=>{if(!(o&&!a)&&(i.getCanSelect()&&(AI(i,t)?o=!0:a=!1),i.subRows&&i.subRows.length)){const l=BT(i,t);l==="all"?o=!0:(l==="some"&&(o=!0),a=!1)}}),a?"all":o?"some":!1}const HT=/([0-9]+)/gm,Vle=(e,t,n)=>j9(ed(e.getValue(n)).toLowerCase(),ed(t.getValue(n)).toLowerCase()),Wle=(e,t,n)=>j9(ed(e.getValue(n)),ed(t.getValue(n))),$le=(e,t,n)=>FI(ed(e.getValue(n)).toLowerCase(),ed(t.getValue(n)).toLowerCase()),Zle=(e,t,n)=>FI(ed(e.getValue(n)),ed(t.getValue(n))),qle=(e,t,n)=>{const r=e.getValue(n),a=t.getValue(n);return r>a?1:r<a?-1:0},Gle=(e,t,n)=>FI(e.getValue(n),t.getValue(n));function FI(e,t){return e===t?0:e>t?1:-1}function ed(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function j9(e,t){const n=e.split(HT).filter(Boolean),r=t.split(HT).filter(Boolean);for(;n.length&&r.length;){const a=n.shift(),o=r.shift(),i=parseInt(a,10),l=parseInt(o,10),c=[i,l].sort();if(isNaN(c[0])){if(a>o)return 1;if(o>a)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const lp={alphanumeric:Vle,alphanumericCaseSensitive:Wle,text:$le,textCaseSensitive:Zle,datetime:qle,basic:Gle},Jle={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ai("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const a of n){const o=a==null?void 0:a.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return lp.datetime;if(typeof o=="string"&&(r=!0,o.split(HT).length>1))return lp.alphanumeric}return r?lp.text:lp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Ww(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:lp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const a=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(w=>w.id===e.id),c=i==null?void 0:i.findIndex(w=>w.id===e.id);let f=[],p,g=o?n:a==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?p="toggle":p="add":i!=null&&i.length&&c!==i.length-1?p="replace":l?p="toggle":p="replace",p==="toggle"&&(o||a||(p="remove")),p==="add"){var y;f=[...i,{id:e.id,desc:g}],f.splice(0,f.length-((y=t.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else p==="toggle"?f=i.map(w=>w.id===e.id?{...w,desc:g}:w):p==="remove"?f=i.filter(w=>w.id!==e.id):f=[{id:e.id,desc:g}];return f})},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,a;const o=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(a=t.options.enableMultiRemove)!=null)||a)?!1:i==="desc"?"asc":"desc":o},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(a=>a.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(a=>a.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())}},Kle={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ai("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 a=e.columns;return(n=a.length?a.some(o=>o.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=Bt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ht(t.options,"debugRows")),e.getVisibleCells=Bt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,a)=>[...n,...r,...a],Ht(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Bt(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ht(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((a,o)=>({...a,[o.id]:n||!(o.getCanHide!=null&&o.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 Hg(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const c3=[Ile,Kle,Hle,Ule,Mle,Jle,_le,Cle,Yle,zle,Ele];function Qle(e){var t;e.debugAll||e.debugTable;let n={_features:c3};const r=n._features.reduce((p,g)=>Object.assign(p,g.getDefaultOptions==null?void 0:g.getDefaultOptions(n)),{}),a=p=>n.options.mergeOptions?n.options.mergeOptions(r,p):{...r,...p};let i={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(p=>{var g;i=(g=p.getInitialState==null?void 0:p.getInitialState(i))!=null?g:i});const l=[];let c=!1;const f={_features:c3,options:{...r,...e},initialState:i,_queue:p=>{l.push(p),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{n.setState(n.initialState)},setOptions:p=>{const g=Gc(p,n.options);n.options=a(g)},getState:()=>n.options.state,setState:p=>{n.options.onStateChange==null||n.options.onStateChange(p)},_getRowId:(p,g,y)=>{var w;return(w=n.options.getRowId==null?void 0:n.options.getRowId(p,g,y))!=null?w:`${y?[y.id,g].join("."):g}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(p,g)=>{let y=(g?n.getPrePaginationRowModel():n.getRowModel()).rowsById[p];if(!y&&(y=n.getCoreRowModel().rowsById[p],!y))throw new Error;return y},_getDefaultColumnDef:Bt(()=>[n.options.defaultColumn],p=>{var g;return p=(g=p)!=null?g:{},{header:y=>{const w=y.header.column.columnDef;return w.accessorKey?w.accessorKey:w.accessorFn?w.id:null},cell:y=>{var w,T;return(w=(T=y.renderValue())==null||T.toString==null?void 0:T.toString())!=null?w:null},...n._features.reduce((y,w)=>Object.assign(y,w.getDefaultColumnDef==null?void 0:w.getDefaultColumnDef()),{}),...p}},Ht(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:Bt(()=>[n._getColumnDefs()],p=>{const g=function(y,w,T){return T===void 0&&(T=0),y.map(S=>{const I=Tle(n,S,T,w),M=S;return I.columns=M.columns?g(M.columns,I,T+1):[],I})};return g(p)},Ht(e,"debugColumns")),getAllFlatColumns:Bt(()=>[n.getAllColumns()],p=>p.flatMap(g=>g.getFlatColumns()),Ht(e,"debugColumns")),_getAllFlatColumnsById:Bt(()=>[n.getAllFlatColumns()],p=>p.reduce((g,y)=>(g[y.id]=y,g),{}),Ht(e,"debugColumns")),getAllLeafColumns:Bt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(p,g)=>{let y=p.flatMap(w=>w.getLeafColumns());return g(y)},Ht(e,"debugColumns")),getColumn:p=>n._getAllFlatColumnsById()[p]};Object.assign(n,f);for(let p=0;p<n._features.length;p++){const g=n._features[p];g==null||g.createTable==null||g.createTable(n)}return n}function Xle(e,t,n,r){const a=()=>{var i;return(i=o.getValue())!=null?i:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:a,getContext:Bt(()=>[e,n,t,o],(i,l,c,f)=>({table:i,column:l,row:c,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Ht(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(o,n,t,e)},{}),o}const OI=(e,t,n,r,a,o,i)=>{let l={id:t,index:r,original:n,depth:a,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return l._valuesCache[c]=f.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=f.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var f;return(f=l.getValue(c))!=null?f:e.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>Dle(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],f=l;for(;;){const p=f.getParentRow();if(!p)break;c.push(p),f=p}return c.reverse()},getAllCells:Bt(()=>[e.getAllLeafColumns()],c=>c.map(f=>Xle(e,l,f,f.id)),Ht(e.options,"debugRows")),_getAllCellsByColumnId:Bt(()=>[l.getAllCells()],c=>c.reduce((f,p)=>(f[p.column.id]=p,f),{}),Ht(e.options,"debugRows"))};for(let c=0;c<e._features.length;c++){const f=e._features[c];f==null||f.createRow==null||f.createRow(l,e)}return l};function eue(){return e=>Bt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(a,o,i){o===void 0&&(o=0);const l=[];for(let f=0;f<a.length;f++){const p=OI(e,e._getRowId(a[f],f,i),a[f],f,o,void 0,i==null?void 0:i.id);if(n.flatRows.push(p),n.rowsById[p.id]=p,l.push(p),e.options.getSubRows){var c;p.originalSubRows=e.options.getSubRows(a[f],f),(c=p.originalSubRows)!=null&&c.length&&(p.subRows=r(p.originalSubRows,o+1,p))}}return l};return n.rows=r(t),n},Ht(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function L9(e,t,n){return n.options.filterFromLeafRows?tue(e,t,n):nue(e,t,n)}function tue(e,t,n){var r;const a=[],o={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,f){f===void 0&&(f=0);const p=[];for(let y=0;y<c.length;y++){var g;let w=c[y];const T=OI(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);if(T.columnFilters=w.columnFilters,(g=w.subRows)!=null&&g.length&&f<i){if(T.subRows=l(w.subRows,f+1),w=T,t(w)&&!T.subRows.length){p.push(w),o[w.id]=w,a.push(w);continue}if(t(w)||T.subRows.length){p.push(w),o[w.id]=w,a.push(w);continue}}else w=T,t(w)&&(p.push(w),o[w.id]=w,a.push(w))}return p};return{rows:l(e),flatRows:a,rowsById:o}}function nue(e,t,n){var r;const a=[],o={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,f){f===void 0&&(f=0);const p=[];for(let y=0;y<c.length;y++){let w=c[y];if(t(w)){var g;if((g=w.subRows)!=null&&g.length&&f<i){const S=OI(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);S.subRows=l(w.subRows,f+1),w=S}p.push(w),a.push(w),o[w.id]=w}}return p};return{rows:l(e),flatRows:a,rowsById:o}}function rue(){return e=>Bt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let y=0;y<t.flatRows.length;y++)t.flatRows[y].columnFilters={},t.flatRows[y].columnFiltersMeta={};return t}const a=[],o=[];(n??[]).forEach(y=>{var w;const T=e.getColumn(y.id);if(!T)return;const S=T.getFilterFn();S&&a.push({id:y.id,filterFn:S,resolvedValue:(w=S.resolveFilterValue==null?void 0:S.resolveFilterValue(y.value))!=null?w:y.value})});const i=n.map(y=>y.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(y=>y.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(y=>{var w;o.push({id:y.id,filterFn:l,resolvedValue:(w=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?w:r})}));let f,p;for(let y=0;y<t.flatRows.length;y++){const w=t.flatRows[y];if(w.columnFilters={},a.length)for(let T=0;T<a.length;T++){f=a[T];const S=f.id;w.columnFilters[S]=f.filterFn(w,S,f.resolvedValue,I=>{w.columnFiltersMeta[S]=I})}if(o.length){for(let T=0;T<o.length;T++){p=o[T];const S=p.id;if(p.filterFn(w,S,p.resolvedValue,I=>{w.columnFiltersMeta[S]=I})){w.columnFilters.__global__=!0;break}}w.columnFilters.__global__!==!0&&(w.columnFilters.__global__=!1)}}const g=y=>{for(let w=0;w<i.length;w++)if(y.columnFilters[i[w]]===!1)return!1;return!0};return L9(t.rows,g,e)},Ht(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function aue(){return(e,t)=>Bt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,a)=>{if(!n.rows.length||!(r!=null&&r.length)&&!a)return n;const o=[...r.map(l=>l.id).filter(l=>l!==t),a?"__global__":void 0].filter(Boolean),i=l=>{for(let c=0;c<o.length;c++)if(l.columnFilters[o[c]]===!1)return!1;return!0};return L9(n.rows,i,e)},Ht(e.options,"debugTable"))}function oue(){return(e,t)=>Bt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;o<n.flatRows.length;o++){const i=n.flatRows[o].getUniqueValues(t);for(let l=0;l<i.length;l++){const c=i[l];if(r.has(c)){var a;r.set(c,((a=r.get(c))!=null?a:0)+1)}else r.set(c,1)}}return r},Ht(e.options,"debugTable"))}function iue(){return(e,t)=>Bt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{var r;if(!n)return;const a=(r=n.flatRows[0])==null?void 0:r.getUniqueValues(t);if(typeof a>"u")return;let o=[a,a];for(let i=0;i<n.flatRows.length;i++){const l=n.flatRows[i].getUniqueValues(t);for(let c=0;c<l.length;c++){const f=l[c];f<o[0]?o[0]=f:f>o[1]&&(o[1]=f)}}return o},Ht(e.options,"debugTable"))}function sue(){return e=>Bt(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,a=[],o=r.filter(c=>{var f;return(f=e.getColumn(c.id))==null?void 0:f.getCanSort()}),i={};o.forEach(c=>{const f=e.getColumn(c.id);f&&(i[c.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const l=c=>{const f=c.map(p=>({...p}));return f.sort((p,g)=>{for(let w=0;w<o.length;w+=1){var y;const T=o[w],S=i[T.id],I=(y=T==null?void 0:T.desc)!=null?y:!1;let M=0;if(S.sortUndefined){const N=p.getValue(T.id),_=g.getValue(T.id),k=N===void 0,R=_===void 0;(k||R)&&(M=k&&R?0:k?S.sortUndefined:-S.sortUndefined)}if(M===0&&(M=S.sortingFn(p,g,T.id)),M!==0)return I&&(M*=-1),S.invertSorting&&(M*=-1),M}return p.index-g.index}),f.forEach(p=>{var g;a.push(p),(g=p.subRows)!=null&&g.length&&(p.subRows=l(p.subRows))}),f};return{rows:l(n.rows),flatRows:a,rowsById:n.rowsById}},Ht(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function lue(e){const t=[],n=r=>{var a;t.push(r),(a=r.subRows)!=null&&a.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function uue(e){return t=>Bt(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:a,pageIndex:o}=n;let{rows:i,flatRows:l,rowsById:c}=r;const f=a*o,p=f+a;i=i.slice(f,p);let g;t.options.paginateExpandedRows?g={rows:i,flatRows:l,rowsById:c}:g=lue({rows:i,flatRows:l,rowsById:c}),g.flatRows=[];const y=w=>{g.flatRows.push(w),w.subRows.length&&w.subRows.forEach(y)};return g.rows.forEach(y),g},Ht(t.options,"debugTable"))}function d3(e,t){return e?cue(e)?P.createElement(e,t):e:null}function cue(e){return due(e)||typeof e=="function"||fue(e)}function due(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function fue(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function hue(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=P.useState(()=>({current:Qle(t)})),[r,a]=P.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:i=>{a(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const R9={À:"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"},pue=Object.keys(R9).join("|"),mue=new RegExp(pue,"g");function gue(e){return e.replace(mue,t=>R9[t])}const Qo={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function vue(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Qo.MATCHES,!n.accessors){const i=f3(e,t,n);return{rankedValue:e,rank:i,accessorIndex:-1,accessorThreshold:n.threshold,passed:i>=n.threshold}}const a=Due(e,n.accessors),o={rankedValue:e,rank:Qo.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let i=0;i<a.length;i++){const l=a[i];let c=f3(l.itemValue,t,n);const{minRanking:f,maxRanking:p,threshold:g=n.threshold}=l.attributes;c<f&&c>=Qo.MATCHES?c=f:c>p&&(c=p),c=Math.min(c,p),c>=g&&c>o.rank&&(o.rank=c,o.passed=!0,o.accessorIndex=i,o.accessorThreshold=g,o.rankedValue=l.itemValue)}return o}function f3(e,t,n){return e=h3(e,n),t=h3(t,n),t.length>e.length?Qo.NO_MATCH:e===t?Qo.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Qo.EQUAL:e.startsWith(t)?Qo.STARTS_WITH:e.includes(` ${t}`)?Qo.WORD_STARTS_WITH:e.includes(t)?Qo.CONTAINS:t.length===1?Qo.NO_MATCH:yue(e).includes(t)?Qo.ACRONYM:wue(e,t))}function yue(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(o=>{t+=o.substr(0,1)})}),t}function wue(e,t){let n=0,r=0;function a(c,f,p){for(let g=p,y=f.length;g<y;g++)if(f[g]===c)return n+=1,g+1;return-1}function o(c){const f=1/c,p=n/t.length;return Qo.MATCHES+p*f}const i=a(t[0],e,0);if(i<0)return Qo.NO_MATCH;r=i;for(let c=1,f=t.length;c<f;c++){const p=t[c];if(r=a(p,e,r),!(r>-1))return Qo.NO_MATCH}const l=r-i;return o(l)}function bue(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}function h3(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=gue(e)),e}function Sue(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 Due(e,t){const n=[];for(let r=0,a=t.length;r<a;r++){const o=t[r],i=Tue(o),l=Sue(e,o);for(let c=0,f=l.length;c<f;c++)n.push({itemValue:l[c],attributes:i})}return n}const p3={maxRanking:1/0,minRanking:-1/0};function Tue(e){return typeof e=="function"?p3:{...p3,...e}}const Iue=({thino:e})=>{const t=P.useRef(null);P.useEffect(()=>(t.current&&C.setIcon(t.current,"pin"),()=>{t.current&&(t.current=null)}),[t]);const n=P.useCallback(async()=>{e.pinned?await be.unpinMemoById(e.id):await be.pinMemoById(e.id)},[e]);return v.jsx("span",{ref:t,className:ar("pinned-status",e.pinned?"pinned":"not-pinned"),onClick:n})},Eue=({thino:e})=>{var r;const t=P.useRef(null);P.useEffect(()=>(t.current&&C.setIcon(t.current,e.thinoType==="JOURNAL"?"calendar":"check-square"),()=>{t.current&&(t.current=null)}),[t,e==null?void 0:e.thinoType]);const n=P.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const a=await be.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");a&&be.editMemo(a)},[e]);return v.jsx(v.Fragment,{children:e.thinoType!=="JOURNAL"?v.jsx("input",{className:ar("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":(r=e.thinoType)==null?void 0:r.slice(5),onClick:n}):v.jsx("span",{ref:t,className:"thino-type-status"})})},xue=({id:e,path:t})=>{const n=P.useRef(null);P.useEffect(()=>(n.current&&C.setIcon(n.current,"link"),()=>{n.current&&(n.current=null)}),[]);const r=P.useCallback(()=>{!e||!t||be.openThinoByID(e)},[e,t]);return v.jsxs("span",{className:"source-thino",onClick:r,children:[v.jsx("span",{children:t}),v.jsx("span",{ref:n,className:"source-thino-icon"})]})},Cue=({id:e,sourceType:t})=>{const n=P.useRef(null);P.useEffect(()=>{var a;return n.current&&C.setIcon(n.current,((a=$g.find(o=>o.title===t))==null?void 0:a.icon)||"list"),()=>{n.current&&(n.current=null)}},[]);const r=P.useCallback(async()=>{e&&await be.openThinoByID(e)},[e]);return v.jsx("span",{ref:n,className:"source-type-icon",onClick:r})},m3=(e,t,n,r)=>{const a=vue(e.getValue(t),n);return r({itemRank:a}),a.passed},g3=(e,t,n)=>{var a,o;let r=0;return e.columnFiltersMeta[n]&&(r=bue((a=e.columnFiltersMeta[n])==null?void 0:a.itemRank,(o=t.columnFiltersMeta[n])==null?void 0:o.itemRank)),r===0?lp.alphanumeric(e,t,n):r};function Mue({thinos:e}){var p;ne.useReducer(()=>({}),{})[1];const[t,n]=ne.useState([]),[r,a]=ne.useState(""),o=ne.useMemo(()=>[{header:E("Basic Info"),footer:g=>g.column.id,columns:[{accessorKey:"createdAt",header:()=>v.jsx("span",{className:"create-at-header-cell",children:E("Created At")}),cell:g=>g.getValue(),footer:g=>g.column.id,enableColumnFilter:!1},{accessorFn:g=>g.content,id:"content",header:()=>v.jsx("span",{className:"thino-header-cell",children:E("Thino")}),cell:g=>v.jsx(ai,{memo:g.row.original,type:"table"}),footer:g=>g.column.id,filterFn:"fuzzy",sortingFn:g3},{accessorFn:g=>g.thinoType,id:"thinoType",cell:g=>v.jsx(Eue,{thino:g.row.original}),header:()=>v.jsx("span",{children:E("Thino Type")}),footer:g=>g.column.id},{accessorFn:g=>g.sourceType,id:"sourceType",cell:g=>v.jsx(Cue,{id:g.row.original.id,sourceType:g.getValue()}),header:()=>v.jsx("span",{children:E("Source Type")}),footer:g=>g.column.id}]},{header:E("Additional Info"),footer:g=>g.column.id,columns:[{accessorKey:"pinned",header:()=>v.jsx("span",{children:E("Pinned Status")}),cell:g=>v.jsx(Iue,{thino:g.row.original}),footer:g=>g.column.id,filterFn:"fuzzy",sortingFn:g3},{accessorKey:"rowStatus",header:()=>v.jsx("span",{children:E("Row status")}),cell:g=>v.jsx("span",{children:g.getValue()==="NORMAL"?"":g.getValue()}),footer:g=>g.column.id},{accessorKey:"path",header:()=>E("Path"),cell:g=>v.jsx(xue,{id:g.row.original.id,path:g.getValue()}),footer:g=>g.column.id}]}],[]),[i,l]=ne.useState(()=>e),c=()=>l(g=>e);P.useEffect(()=>{c()},[e]);const f=hue({data:i,columns:o,filterFns:{fuzzy:m3},initialState:{pagination:{pageSize:20}},state:{columnFilters:t,globalFilter:r},onColumnFiltersChange:n,onGlobalFilterChange:a,globalFilterFn:m3,getCoreRowModel:eue(),getFilteredRowModel:rue(),getSortedRowModel:sue(),getPaginationRowModel:uue(),getFacetedRowModel:aue(),getFacetedUniqueValues:oue(),getFacetedMinMaxValues:iue(),debugTable:!1,debugHeaders:!1,debugColumns:!1});return ne.useEffect(()=>{var g,y;((g=f.getState().columnFilters[0])==null?void 0:g.id)==="createdAt"&&((y=f.getState().sorting[0])==null?void 0:y.id)!=="createdAt"&&f.setSorting([{id:"createdAt",desc:!1}])},[(p=f.getState().columnFilters[0])==null?void 0:p.id]),v.jsxs("div",{className:"table-view",children:[v.jsx("div",{children:v.jsx(uw,{value:r||"",onChange:g=>a(String(g)),className:"table-search-bar",placeholder:E("Search all columns...")})}),v.jsxs("table",{className:"thino-table",children:[v.jsx("thead",{children:f.getHeaderGroups().map(g=>v.jsx("tr",{children:g.headers.map(y=>v.jsx("th",{colSpan:y.colSpan,children:y.isPlaceholder?null:v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:ar(y.column.getCanSort()?"filter-header":"","table-header",y.column.id==="content"?"content-header":""),onClick:y.column.getToggleSortingHandler(),children:[d3(y.column.columnDef.header,y.getContext()),{asc:" 🔼",desc:" 🔽"}[y.column.getIsSorted()]??null]}),y.column.getCanFilter()?v.jsx(Nue,{column:y.column,table:f}):null]})},y.id))},g.id))}),v.jsx("tbody",{children:f.getRowModel().rows.map(g=>v.jsx("tr",{className:ar(g.getValue("pinned")?"pinned":""),children:g.getVisibleCells().map(y=>v.jsx("td",{children:d3(y.column.columnDef.cell,y.getContext())},y.id))},g.id))})]}),v.jsxs("div",{className:"table-nav-bar",children:[v.jsx("button",{className:"prev-start-btn",onClick:()=>f.setPageIndex(0),disabled:!f.getCanPreviousPage(),children:"<<"}),v.jsx("button",{className:"prev-btn",onClick:()=>f.previousPage(),disabled:!f.getCanPreviousPage(),children:"<"}),v.jsx("button",{className:"next-btn",onClick:()=>f.nextPage(),disabled:!f.getCanNextPage(),children:">"}),v.jsx("button",{className:"next-end-btn",onClick:()=>f.setPageIndex(f.getPageCount()-1),disabled:!f.getCanNextPage(),children:">>"}),v.jsxs("span",{className:"table-page-info",children:[v.jsx("div",{children:E("Page")}),v.jsxs("strong",{children:[f.getState().pagination.pageIndex+1," of ",f.getPageCount()]})]}),v.jsxs("span",{className:"table-page-jump",children:["| ",E("Go to page"),":",v.jsx("input",{type:"number",defaultValue:f.getState().pagination.pageIndex+1,onChange:g=>{const y=g.target.value?Number(g.target.value)-1:0;f.setPageIndex(y)},className:"jump-inputer"})]}),v.jsx("select",{value:f.getState().pagination.pageSize,onChange:g=>{f.setPageSize(Number(g.target.value))},children:[10,20,30,40,50].map(g=>v.jsxs("option",{value:g,children:[E("Show")," ",g," ",E("rows")]},g))})]})]})}const kue=e=>e==="sourceType"?["ALL"]:["ALL","ALL-TASK"];function Nue({column:e,table:t}){var o,i,l,c,f,p,g,y,w;const n=(o=t.getPreFilteredRowModel().flatRows[0])==null?void 0:o.getValue(e.id),r=e.getFilterValue(),a=ne.useMemo(()=>typeof n=="number"?[]:Array.from(e.getFacetedUniqueValues().keys()).sort(),[e.getFacetedUniqueValues()]);return typeof n=="number"?v.jsx("div",{children:v.jsxs("div",{className:"filter-input-group",children:[v.jsx(uw,{type:"number",min:Number(((i=e.getFacetedMinMaxValues())==null?void 0:i[0])??""),max:Number(((l=e.getFacetedMinMaxValues())==null?void 0:l[1])??""),value:(r==null?void 0:r[0])??"",onChange:T=>e.setFilterValue(S=>[T,S==null?void 0:S[1]]),placeholder:`Min ${(c=e.getFacetedMinMaxValues())!=null&&c[0]?`(${(f=e.getFacetedMinMaxValues())==null?void 0:f[0]})`:""}`,className:"filter-input-short"}),v.jsx(uw,{type:"number",min:Number(((p=e.getFacetedMinMaxValues())==null?void 0:p[0])??""),max:Number(((g=e.getFacetedMinMaxValues())==null?void 0:g[1])??""),value:(r==null?void 0:r[1])??"",onChange:T=>e.setFilterValue(S=>[S==null?void 0:S[0],T]),placeholder:`Max ${(y=e.getFacetedMinMaxValues())!=null&&y[1]?`(${(w=e.getFacetedMinMaxValues())==null?void 0:w[1]})`:""}`,className:"filter-input-short"})]})}):v.jsx(v.Fragment,{children:a.length>1?v.jsxs(v.Fragment,{children:[e.id!=="path"&&e.id!=="content"&&e.id!=="thinoType"&&e.id!=="sourceType"&&v.jsx("datalist",{id:e.id+"list",children:a.slice(0,5e3).map(T=>v.jsx("option",{value:T},T))}),e.id==="thinoType"||e.id==="sourceType"?v.jsx("select",{id:e.id,onChange:T=>e.setFilterValue(T.target.value==="ALL"?"":T.target.value==="ALL-TASK"?"TASK":T.target.value),children:[...kue(e.id),...a].map(T=>v.jsx("option",{value:T,children:E(T)||T},T))}):"",e.id!=="thinoType"&&e.id!=="sourceType"?v.jsx(uw,{type:"text",value:r??"",onChange:T=>e.setFilterValue(T),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,className:"filter-input-long",list:e.id+"list"}):""]}):""})}function uw({value:e,onChange:t,debounce:n=500,...r}){const[a,o]=ne.useState(e);return ne.useEffect(()=>{o(e)},[e]),ne.useEffect(()=>{const i=setTimeout(()=>{t(a)},n);return()=>clearTimeout(i)},[a]),v.jsx("input",{...r,value:a,onChange:i=>o(i.target.value)})}function Aue(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var a=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");a.setAttribute("name",e),a.setAttribute("content",t),r.head.appendChild(a)}}catch{}}function Fue(){Aue("react-scroll-to-bottom:version","4.2.0")}var Sg=function(e){return e&&e.Math===Math&&e},Za=Sg(typeof globalThis=="object"&&globalThis)||Sg(typeof window=="object"&&window)||Sg(typeof self=="object"&&self)||Sg(typeof dr=="object"&&dr)||Sg(typeof dr=="object"&&dr)||function(){return this}()||Function("return this")(),da=function(e){try{return!!e()}catch{return!0}},Oue=da,Wb=!Oue(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Pue=Wb,_9=Function.prototype,v3=_9.apply,y3=_9.call,PI=typeof Reflect=="object"&&Reflect.apply||(Pue?y3.bind(v3):function(){return y3.apply(v3,arguments)}),B9=Wb,H9=Function.prototype,YT=H9.call,jue=B9&&H9.bind.bind(YT,YT),fa=B9?jue:function(e){return function(){return YT.apply(e,arguments)}},Y9=fa,Lue=Y9({}.toString),Rue=Y9("".slice),Kp=function(e){return Rue(Lue(e),8,-1)},_ue=Kp,Bue=fa,jI=function(e){if(_ue(e)==="Function")return Bue(e)},XS=typeof document=="object"&&document.all,co=typeof XS>"u"&&XS!==void 0?function(e){return typeof e=="function"||e===XS}:function(e){return typeof e=="function"},qv={},Hue=da,ii=!Hue(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Yue=Wb,A0=Function.prototype.call,eu=Yue?A0.bind(A0):function(){return A0.apply(A0,arguments)},LI={},U9={}.propertyIsEnumerable,z9=Object.getOwnPropertyDescriptor,Uue=z9&&!U9.call({1:2},1);LI.f=Uue?function(t){var n=z9(this,t);return!!n&&n.enumerable}:U9;var Gv=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},zue=fa,Vue=da,Wue=Kp,eD=Object,$ue=zue("".split),V9=Vue(function(){return!eD("z").propertyIsEnumerable(0)})?function(e){return Wue(e)==="String"?$ue(e,""):eD(e)}:eD,RI=function(e){return e==null},Zue=RI,que=TypeError,_I=function(e){if(Zue(e))throw new que("Can't call method on "+e);return e},Gue=V9,Jue=_I,tu=function(e){return Gue(Jue(e))},Kue=co,Ju=function(e){return typeof e=="object"?e!==null:Kue(e)},qa={},tD=qa,nD=Za,Que=co,w3=function(e){return Que(e)?e:void 0},nu=function(e,t){return arguments.length<2?w3(tD[e])||w3(nD[e]):tD[e]&&tD[e][t]||nD[e]&&nD[e][t]},Xue=fa,Ku=Xue({}.isPrototypeOf),W9=typeof navigator<"u"&&String(navigator.userAgent)||"",$9=Za,rD=W9,b3=$9.process,S3=$9.Deno,D3=b3&&b3.versions||S3&&S3.version,T3=D3&&D3.v8,Rs,$w;T3&&(Rs=T3.split("."),$w=Rs[0]>0&&Rs[0]<4?1:+(Rs[0]+Rs[1]));!$w&&rD&&(Rs=rD.match(/Edge\/(\d+)/),(!Rs||Rs[1]>=74)&&(Rs=rD.match(/Chrome\/(\d+)/),Rs&&($w=+Rs[1])));var BI=$w,I3=BI,ece=da,tce=Za,nce=tce.String,Qp=!!Object.getOwnPropertySymbols&&!ece(function(){var e=Symbol("symbol detection");return!nce(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&I3&&I3<41}),rce=Qp,Z9=rce&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ace=nu,oce=co,ice=Ku,sce=Z9,lce=Object,Jv=sce?function(e){return typeof e=="symbol"}:function(e){var t=ace("Symbol");return oce(t)&&ice(t.prototype,lce(e))},uce=String,$b=function(e){try{return uce(e)}catch{return"Object"}},cce=co,dce=$b,fce=TypeError,HI=function(e){if(cce(e))return e;throw new fce(dce(e)+" is not a function")},hce=HI,pce=RI,YI=function(e,t){var n=e[t];return pce(n)?void 0:hce(n)},aD=eu,oD=co,iD=Ju,mce=TypeError,gce=function(e,t){var n,r;if(t==="string"&&oD(n=e.toString)&&!iD(r=aD(n,e))||oD(n=e.valueOf)&&!iD(r=aD(n,e))||t!=="string"&&oD(n=e.toString)&&!iD(r=aD(n,e)))return r;throw new mce("Can't convert object to primitive value")},q9={exports:{}},E3=Za,vce=Object.defineProperty,yce=function(e,t){try{vce(E3,e,{value:t,configurable:!0,writable:!0})}catch{E3[e]=t}return t},wce=Za,bce=yce,x3="__core-js_shared__",C3=q9.exports=wce[x3]||bce(x3,{});(C3.versions||(C3.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 UI=q9.exports,M3=UI,Xp=function(e,t){return M3[e]||(M3[e]=t||{})},Sce=_I,Dce=Object,Qu=function(e){return Dce(Sce(e))},Tce=fa,Ice=Qu,Ece=Tce({}.hasOwnProperty),Fi=Object.hasOwn||function(t,n){return Ece(Ice(t),n)},xce=fa,Cce=0,Mce=Math.random(),kce=xce(1 .toString),zI=function(e){return"Symbol("+(e===void 0?"":e)+")_"+kce(++Cce+Mce,36)},Nce=Za,Ace=Xp,k3=Fi,Fce=zI,Oce=Qp,Pce=Z9,dp=Nce.Symbol,sD=Ace("wks"),jce=Pce?dp.for||dp:dp&&dp.withoutSetter||Fce,Na=function(e){return k3(sD,e)||(sD[e]=Oce&&k3(dp,e)?dp[e]:jce("Symbol."+e)),sD[e]},Lce=eu,N3=Ju,A3=Jv,Rce=YI,_ce=gce,Bce=Na,Hce=TypeError,Yce=Bce("toPrimitive"),Uce=function(e,t){if(!N3(e)||A3(e))return e;var n=Rce(e,Yce),r;if(n){if(t===void 0&&(t="default"),r=Lce(n,e,t),!N3(r)||A3(r))return r;throw new Hce("Can't convert object to primitive value")}return t===void 0&&(t="number"),_ce(e,t)},zce=Uce,Vce=Jv,VI=function(e){var t=zce(e,"string");return Vce(t)?t:t+""},Wce=Za,F3=Ju,UT=Wce.document,$ce=F3(UT)&&F3(UT.createElement),G9=function(e){return $ce?UT.createElement(e):{}},Zce=ii,qce=da,Gce=G9,J9=!Zce&&!qce(function(){return Object.defineProperty(Gce("div"),"a",{get:function(){return 7}}).a!==7}),Jce=ii,Kce=eu,Qce=LI,Xce=Gv,ede=tu,tde=VI,nde=Fi,rde=J9,O3=Object.getOwnPropertyDescriptor;qv.f=Jce?O3:function(t,n){if(t=ede(t),n=tde(n),rde)try{return O3(t,n)}catch{}if(nde(t,n))return Xce(!Kce(Qce.f,t,n),t[n])};var ade=da,ode=co,ide=/#|\.prototype\./,Kv=function(e,t){var n=lde[sde(e)];return n===cde?!0:n===ude?!1:ode(t)?ade(t):!!t},sde=Kv.normalize=function(e){return String(e).replace(ide,".").toLowerCase()},lde=Kv.data={},ude=Kv.NATIVE="N",cde=Kv.POLYFILL="P",dde=Kv,P3=jI,fde=HI,hde=Wb,pde=P3(P3.bind),WI=function(e,t){return fde(e),t===void 0?e:hde?pde(e,t):function(){return e.apply(t,arguments)}},Ws={},mde=ii,gde=da,K9=mde&&gde(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),vde=Ju,yde=String,wde=TypeError,id=function(e){if(vde(e))return e;throw new wde(yde(e)+" is not an object")},bde=ii,Sde=J9,Dde=K9,F0=id,j3=VI,Tde=TypeError,lD=Object.defineProperty,Ide=Object.getOwnPropertyDescriptor,uD="enumerable",cD="configurable",dD="writable";Ws.f=bde?Dde?function(t,n,r){if(F0(t),n=j3(n),F0(r),typeof t=="function"&&n==="prototype"&&"value"in r&&dD in r&&!r[dD]){var a=Ide(t,n);a&&a[dD]&&(t[n]=r.value,r={configurable:cD in r?r[cD]:a[cD],enumerable:uD in r?r[uD]:a[uD],writable:!1})}return lD(t,n,r)}:lD:function(t,n,r){if(F0(t),n=j3(n),F0(r),Sde)try{return lD(t,n,r)}catch{}if("get"in r||"set"in r)throw new Tde("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var Ede=ii,xde=Ws,Cde=Gv,Zb=Ede?function(e,t,n){return xde.f(e,t,Cde(1,n))}:function(e,t,n){return e[t]=n,e},Dg=Za,Mde=PI,kde=jI,Nde=co,Ade=qv.f,Fde=dde,ep=qa,Ode=WI,tp=Zb,L3=Fi,Pde=function(e){var t=function(n,r,a){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,a)}return Mde(e,this,arguments)};return t.prototype=e.prototype,t},Gn=function(e,t){var n=e.target,r=e.global,a=e.stat,o=e.proto,i=r?Dg:a?Dg[n]:Dg[n]&&Dg[n].prototype,l=r?ep:ep[n]||tp(ep,n,{})[n],c=l.prototype,f,p,g,y,w,T,S,I,M;for(y in t)f=Fde(r?y:n+(a?".":"#")+y,e.forced),p=!f&&i&&L3(i,y),T=l[y],p&&(e.dontCallGetSet?(M=Ade(i,y),S=M&&M.value):S=i[y]),w=p&&S?S:t[y],!(!f&&!o&&typeof T==typeof w)&&(e.bind&&p?I=Ode(w,Dg):e.wrap&&p?I=Pde(w):o&&Nde(w)?I=kde(w):I=w,(e.sham||w&&w.sham||T&&T.sham)&&tp(I,"sham",!0),tp(l,y,I),o&&(g=n+"Prototype",L3(ep,g)||tp(ep,g,{}),tp(ep[g],y,w),e.real&&c&&(f||!c[y])&&tp(c,y,w)))},jde=Kp,em=Array.isArray||function(t){return jde(t)==="Array"},Lde=Gn,Rde=em;Lde({target:"Array",stat:!0},{isArray:Rde});var _de=qa,Bde=_de.Array.isArray,Hde=Bde,Q9=Hde,Yde=Q9,Ude=Yde,zde=Ude,Vde=zde,Wde=Vde;const X9=qt(Wde);function $de(e){if(X9(e))return e}var Zde=Math.ceil,qde=Math.floor,Gde=Math.trunc||function(t){var n=+t;return(n>0?qde:Zde)(n)},Jde=Gde,qb=function(e){var t=+e;return t!==t||t===0?0:Jde(t)},Kde=qb,Qde=Math.min,Xde=function(e){var t=Kde(e);return t>0?Qde(t,9007199254740991):0},efe=Xde,Af=function(e){return efe(e.length)},tfe=TypeError,nfe=9007199254740991,$I=function(e){if(e>nfe)throw tfe("Maximum allowed index exceeded");return e},rfe=ii,afe=Ws,ofe=Gv,Qv=function(e,t,n){rfe?afe.f(e,t,ofe(0,n)):e[t]=n},ife=Na,sfe=ife("toStringTag"),e5={};e5[sfe]="z";var ZI=String(e5)==="[object z]",lfe=ZI,ufe=co,cw=Kp,cfe=Na,dfe=cfe("toStringTag"),ffe=Object,hfe=cw(function(){return arguments}())==="Arguments",pfe=function(e,t){try{return e[t]}catch{}},Xv=lfe?cw:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=pfe(t=ffe(e),dfe))=="string"?n:hfe?cw(t):(r=cw(t))==="Object"&&ufe(t.callee)?"Arguments":r},mfe=fa,gfe=co,zT=UI,vfe=mfe(Function.toString);gfe(zT.inspectSource)||(zT.inspectSource=function(e){return vfe(e)});var yfe=zT.inspectSource,wfe=fa,bfe=da,t5=co,Sfe=Xv,Dfe=nu,Tfe=yfe,n5=function(){},r5=Dfe("Reflect","construct"),qI=/^\s*(?:class|function)\b/,Ife=wfe(qI.exec),Efe=!qI.test(n5),Tg=function(t){if(!t5(t))return!1;try{return r5(n5,[],t),!0}catch{return!1}},a5=function(t){if(!t5(t))return!1;switch(Sfe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Efe||!!Ife(qI,Tfe(t))}catch{return!0}};a5.sham=!0;var GI=!r5||bfe(function(){var e;return Tg(Tg.call)||!Tg(Object)||!Tg(function(){e=!0})||e})?a5:Tg,R3=em,xfe=GI,Cfe=Ju,Mfe=Na,kfe=Mfe("species"),_3=Array,Nfe=function(e){var t;return R3(e)&&(t=e.constructor,xfe(t)&&(t===_3||R3(t.prototype))?t=void 0:Cfe(t)&&(t=t[kfe],t===null&&(t=void 0))),t===void 0?_3:t},Afe=Nfe,JI=function(e,t){return new(Afe(e))(t===0?0:t)},Ffe=da,Ofe=Na,Pfe=BI,jfe=Ofe("species"),Gb=function(e){return Pfe>=51||!Ffe(function(){var t=[],n=t.constructor={};return n[jfe]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Lfe=Gn,Rfe=da,_fe=em,Bfe=Ju,Hfe=Qu,Yfe=Af,B3=$I,H3=Qv,Ufe=JI,zfe=Gb,Vfe=Na,Wfe=BI,o5=Vfe("isConcatSpreadable"),$fe=Wfe>=51||!Rfe(function(){var e=[];return e[o5]=!1,e.concat()[0]!==e}),Zfe=function(e){if(!Bfe(e))return!1;var t=e[o5];return t!==void 0?!!t:_fe(e)},qfe=!$fe||!zfe("concat");Lfe({target:"Array",proto:!0,arity:1,forced:qfe},{concat:function(t){var n=Hfe(this),r=Ufe(n,0),a=0,o,i,l,c,f;for(o=-1,l=arguments.length;o<l;o++)if(f=o===-1?n:arguments[o],Zfe(f))for(c=Yfe(f),B3(a+c),i=0;i<c;i++,a++)i in f&&H3(r,a,f[i]);else B3(a+1),H3(r,a++,f);return r.length=a,r}});var Gfe=Xv,Jfe=String,ey=function(e){if(Gfe(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Jfe(e)},Jb={},Kfe=qb,Qfe=Math.max,Xfe=Math.min,KI=function(e,t){var n=Kfe(e);return n<0?Qfe(n+t,0):Xfe(n,t)},ehe=tu,the=KI,nhe=Af,Y3=function(e){return function(t,n,r){var a=ehe(t),o=nhe(a);if(o===0)return!e&&-1;var i=the(r,o),l;if(e&&n!==n){for(;o>i;)if(l=a[i++],l!==l)return!0}else for(;o>i;i++)if((e||i in a)&&a[i]===n)return e||i||0;return!e&&-1}},i5={includes:Y3(!0),indexOf:Y3(!1)},Kb={},rhe=fa,fD=Fi,ahe=tu,ohe=i5.indexOf,ihe=Kb,U3=rhe([].push),s5=function(e,t){var n=ahe(e),r=0,a=[],o;for(o in n)!fD(ihe,o)&&fD(n,o)&&U3(a,o);for(;t.length>r;)fD(n,o=t[r++])&&(~ohe(a,o)||U3(a,o));return a},QI=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],she=s5,lhe=QI,XI=Object.keys||function(t){return she(t,lhe)},uhe=ii,che=K9,dhe=Ws,fhe=id,hhe=tu,phe=XI;Jb.f=uhe&&!che?Object.defineProperties:function(t,n){fhe(t);for(var r=hhe(n),a=phe(n),o=a.length,i=0,l;o>i;)dhe.f(t,l=a[i++],r[l]);return t};var mhe=nu,ghe=mhe("document","documentElement"),vhe=Xp,yhe=zI,z3=vhe("keys"),Qb=function(e){return z3[e]||(z3[e]=yhe(e))},whe=id,bhe=Jb,V3=QI,She=Kb,Dhe=ghe,The=G9,Ihe=Qb,W3=">",$3="<",VT="prototype",WT="script",l5=Ihe("IE_PROTO"),hD=function(){},u5=function(e){return $3+WT+W3+e+$3+"/"+WT+W3},Z3=function(e){e.write(u5("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ehe=function(){var e=The("iframe"),t="java"+WT+":",n;return e.style.display="none",Dhe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(u5("document.F=Object")),n.close(),n.F},O0,dw=function(){try{O0=new ActiveXObject("htmlfile")}catch{}dw=typeof document<"u"?document.domain&&O0?Z3(O0):Ehe():Z3(O0);for(var e=V3.length;e--;)delete dw[VT][V3[e]];return dw()};She[l5]=!0;var eE=Object.create||function(t,n){var r;return t!==null?(hD[VT]=whe(t),r=new hD,hD[VT]=null,r[l5]=t):r=dw(),n===void 0?r:bhe.f(r,n)},Xb={},xhe=s5,Che=QI,Mhe=Che.concat("length","prototype");Xb.f=Object.getOwnPropertyNames||function(t){return xhe(t,Mhe)};var c5={},khe=fa,e1=khe([].slice),Nhe=Kp,Ahe=tu,d5=Xb.f,Fhe=e1,f5=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ohe=function(e){try{return d5(e)}catch{return Fhe(f5)}};c5.f=function(t){return f5&&Nhe(t)==="Window"?Ohe(t):d5(Ahe(t))};var t1={};t1.f=Object.getOwnPropertySymbols;var Phe=Zb,n1=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Phe(e,t,n),e},jhe=Ws,Lhe=function(e,t,n){return jhe.f(e,t,n)},ty={},Rhe=Na;ty.f=Rhe;var q3=qa,_he=Fi,Bhe=ty,Hhe=Ws.f,Ir=function(e){var t=q3.Symbol||(q3.Symbol={});_he(t,e)||Hhe(t,e,{value:Bhe.f(e)})},Yhe=eu,Uhe=nu,zhe=Na,Vhe=n1,h5=function(){var e=Uhe("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=zhe("toPrimitive");t&&!t[r]&&Vhe(t,r,function(a){return Yhe(n,this)},{arity:1})},Whe=ZI,$he=Xv,Zhe=Whe?{}.toString:function(){return"[object "+$he(this)+"]"},qhe=ZI,Ghe=Ws.f,Jhe=Zb,Khe=Fi,Qhe=Zhe,Xhe=Na,G3=Xhe("toStringTag"),tm=function(e,t,n,r){var a=n?e:e&&e.prototype;a&&(Khe(a,G3)||Ghe(a,G3,{configurable:!0,value:t}),r&&!qhe&&Jhe(a,"toString",Qhe))},epe=Za,tpe=co,J3=epe.WeakMap,npe=tpe(J3)&&/native code/.test(String(J3)),rpe=npe,p5=Za,ape=Ju,ope=Zb,pD=Fi,mD=UI,ipe=Qb,spe=Kb,K3="Object already initialized",$T=p5.TypeError,lpe=p5.WeakMap,Zw,cv,qw,upe=function(e){return qw(e)?cv(e):Zw(e,{})},cpe=function(e){return function(t){var n;if(!ape(t)||(n=cv(t)).type!==e)throw new $T("Incompatible receiver, "+e+" required");return n}};if(rpe||mD.state){var Al=mD.state||(mD.state=new lpe);Al.get=Al.get,Al.has=Al.has,Al.set=Al.set,Zw=function(e,t){if(Al.has(e))throw new $T(K3);return t.facade=e,Al.set(e,t),t},cv=function(e){return Al.get(e)||{}},qw=function(e){return Al.has(e)}}else{var np=ipe("state");spe[np]=!0,Zw=function(e,t){if(pD(e,np))throw new $T(K3);return t.facade=e,ope(e,np,t),t},cv=function(e){return pD(e,np)?e[np]:{}},qw=function(e){return pD(e,np)}}var tE={set:Zw,get:cv,has:qw,enforce:upe,getterFor:cpe},dpe=WI,fpe=fa,hpe=V9,ppe=Qu,mpe=Af,gpe=JI,Q3=fpe([].push),zc=function(e){var t=e===1,n=e===2,r=e===3,a=e===4,o=e===6,i=e===7,l=e===5||o;return function(c,f,p,g){for(var y=ppe(c),w=hpe(y),T=mpe(w),S=dpe(f,p),I=0,M=g||gpe,N=t?M(c,T):n||i?M(c,0):void 0,_,k;T>I;I++)if((l||I in w)&&(_=w[I],k=S(_,I,y),e))if(t)N[I]=k;else if(k)switch(e){case 3:return!0;case 5:return _;case 6:return I;case 2:Q3(N,_)}else switch(e){case 4:return!1;case 7:Q3(N,_)}return o?-1:r||a?a:N}},nE={forEach:zc(0),map:zc(1),filter:zc(2),some:zc(3),every:zc(4),find:zc(5),findIndex:zc(6),filterReject:zc(7)},r1=Gn,ny=Za,rE=eu,vpe=fa,Ip=ii,Ep=Qp,ype=da,Ca=Fi,wpe=Ku,ZT=id,a1=tu,aE=VI,bpe=ey,qT=Gv,xp=eE,m5=XI,Spe=Xb,g5=c5,Dpe=t1,v5=qv,y5=Ws,Tpe=Jb,w5=LI,X3=n1,Ipe=Lhe,oE=Xp,Epe=Qb,b5=Kb,ek=zI,xpe=Na,Cpe=ty,Mpe=Ir,kpe=h5,Npe=tm,S5=tE,o1=nE.forEach,Xo=Epe("hidden"),i1="Symbol",dv="prototype",Ape=S5.set,tk=S5.getterFor(i1),Hs=Object[dv],pf=ny.Symbol,Pg=pf&&pf[dv],Fpe=ny.RangeError,Ope=ny.TypeError,gD=ny.QObject,D5=v5.f,mf=y5.f,T5=g5.f,Ppe=w5.f,I5=vpe([].push),Vu=oE("symbols"),ry=oE("op-symbols"),jpe=oE("wks"),GT=!gD||!gD[dv]||!gD[dv].findChild,E5=function(e,t,n){var r=D5(Hs,t);r&&delete Hs[t],mf(e,t,n),r&&e!==Hs&&mf(Hs,t,r)},JT=Ip&&ype(function(){return xp(mf({},"a",{get:function(){return mf(this,"a",{value:7}).a}})).a!==7})?E5:mf,vD=function(e,t){var n=Vu[e]=xp(Pg);return Ape(n,{type:i1,tag:e,description:t}),Ip||(n.description=t),n},s1=function(t,n,r){t===Hs&&s1(ry,n,r),ZT(t);var a=aE(n);return ZT(r),Ca(Vu,a)?(r.enumerable?(Ca(t,Xo)&&t[Xo][a]&&(t[Xo][a]=!1),r=xp(r,{enumerable:qT(0,!1)})):(Ca(t,Xo)||mf(t,Xo,qT(1,xp(null))),t[Xo][a]=!0),JT(t,a,r)):mf(t,a,r)},iE=function(t,n){ZT(t);var r=a1(n),a=m5(r).concat(k5(r));return o1(a,function(o){(!Ip||rE(x5,r,o))&&s1(t,o,r[o])}),t},Lpe=function(t,n){return n===void 0?xp(t):iE(xp(t),n)},x5=function(t){var n=aE(t),r=rE(Ppe,this,n);return this===Hs&&Ca(Vu,n)&&!Ca(ry,n)?!1:r||!Ca(this,n)||!Ca(Vu,n)||Ca(this,Xo)&&this[Xo][n]?r:!0},C5=function(t,n){var r=a1(t),a=aE(n);if(!(r===Hs&&Ca(Vu,a)&&!Ca(ry,a))){var o=D5(r,a);return o&&Ca(Vu,a)&&!(Ca(r,Xo)&&r[Xo][a])&&(o.enumerable=!0),o}},M5=function(t){var n=T5(a1(t)),r=[];return o1(n,function(a){!Ca(Vu,a)&&!Ca(b5,a)&&I5(r,a)}),r},k5=function(e){var t=e===Hs,n=T5(t?ry:a1(e)),r=[];return o1(n,function(a){Ca(Vu,a)&&(!t||Ca(Hs,a))&&I5(r,Vu[a])}),r};Ep||(pf=function(){if(wpe(Pg,this))throw new Ope("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:bpe(arguments[0]),n=ek(t),r=function(a){var o=this===void 0?ny:this;o===Hs&&rE(r,ry,a),Ca(o,Xo)&&Ca(o[Xo],n)&&(o[Xo][n]=!1);var i=qT(1,a);try{JT(o,n,i)}catch(l){if(!(l instanceof Fpe))throw l;E5(o,n,i)}};return Ip&&GT&&JT(Hs,n,{configurable:!0,set:r}),vD(n,t)},Pg=pf[dv],X3(Pg,"toString",function(){return tk(this).tag}),X3(pf,"withoutSetter",function(e){return vD(ek(e),e)}),w5.f=x5,y5.f=s1,Tpe.f=iE,v5.f=C5,Spe.f=g5.f=M5,Dpe.f=k5,Cpe.f=function(e){return vD(xpe(e),e)},Ip&&Ipe(Pg,"description",{configurable:!0,get:function(){return tk(this).description}}));r1({global:!0,constructor:!0,wrap:!0,forced:!Ep,sham:!Ep},{Symbol:pf});o1(m5(jpe),function(e){Mpe(e)});r1({target:i1,stat:!0,forced:!Ep},{useSetter:function(){GT=!0},useSimple:function(){GT=!1}});r1({target:"Object",stat:!0,forced:!Ep,sham:!Ip},{create:Lpe,defineProperty:s1,defineProperties:iE,getOwnPropertyDescriptor:C5});r1({target:"Object",stat:!0,forced:!Ep},{getOwnPropertyNames:M5});kpe();Npe(pf,i1);b5[Xo]=!0;var Rpe=Qp,N5=Rpe&&!!Symbol.for&&!!Symbol.keyFor,_pe=Gn,Bpe=nu,Hpe=Fi,Ype=ey,A5=Xp,Upe=N5,yD=A5("string-to-symbol-registry"),zpe=A5("symbol-to-string-registry");_pe({target:"Symbol",stat:!0,forced:!Upe},{for:function(e){var t=Ype(e);if(Hpe(yD,t))return yD[t];var n=Bpe("Symbol")(t);return yD[t]=n,zpe[n]=t,n}});var Vpe=Gn,Wpe=Fi,$pe=Jv,Zpe=$b,qpe=Xp,Gpe=N5,nk=qpe("symbol-to-string-registry");Vpe({target:"Symbol",stat:!0,forced:!Gpe},{keyFor:function(t){if(!$pe(t))throw new TypeError(Zpe(t)+" is not a symbol");if(Wpe(nk,t))return nk[t]}});var Jpe=fa,rk=em,Kpe=co,ak=Kp,Qpe=ey,ok=Jpe([].push),Xpe=function(e){if(Kpe(e))return e;if(rk(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];typeof a=="string"?ok(n,a):(typeof a=="number"||ak(a)==="Number"||ak(a)==="String")&&ok(n,Qpe(a))}var o=n.length,i=!0;return function(l,c){if(i)return i=!1,c;if(rk(this))return c;for(var f=0;f<o;f++)if(n[f]===l)return c}}},eme=Gn,F5=nu,O5=PI,tme=eu,ay=fa,P5=da,ik=co,sk=Jv,j5=e1,nme=Xpe,rme=Qp,ame=String,Jc=F5("JSON","stringify"),P0=ay(/./.exec),lk=ay("".charAt),ome=ay("".charCodeAt),ime=ay("".replace),sme=ay(1 .toString),lme=/[\uD800-\uDFFF]/g,uk=/^[\uD800-\uDBFF]$/,ck=/^[\uDC00-\uDFFF]$/,dk=!rme||P5(function(){var e=F5("Symbol")("stringify detection");return Jc([e])!=="[null]"||Jc({a:e})!=="{}"||Jc(Object(e))!=="{}"}),fk=P5(function(){return Jc("\uDF06\uD834")!=='"\\udf06\\ud834"'||Jc("\uDEAD")!=='"\\udead"'}),ume=function(e,t){var n=j5(arguments),r=nme(t);if(!(!ik(r)&&(e===void 0||sk(e))))return n[1]=function(a,o){if(ik(r)&&(o=tme(r,this,ame(a),o)),!sk(o))return o},O5(Jc,null,n)},cme=function(e,t,n){var r=lk(n,t-1),a=lk(n,t+1);return P0(uk,e)&&!P0(ck,a)||P0(ck,e)&&!P0(uk,r)?"\\u"+sme(ome(e,0),16):e};Jc&&eme({target:"JSON",stat:!0,arity:3,forced:dk||fk},{stringify:function(t,n,r){var a=j5(arguments),o=O5(dk?ume:Jc,null,a);return fk&&typeof o=="string"?ime(o,lme,cme):o}});var dme=Gn,fme=Qp,hme=da,L5=t1,pme=Qu,mme=!fme||hme(function(){L5.f(1)});dme({target:"Object",stat:!0,forced:mme},{getOwnPropertySymbols:function(t){var n=L5.f;return n?n(pme(t)):[]}});var gme=Ir;gme("asyncIterator");var vme=Ir;vme("hasInstance");var yme=Ir;yme("isConcatSpreadable");var wme=Ir;wme("iterator");var bme=Ir;bme("match");var Sme=Ir;Sme("matchAll");var Dme=Ir;Dme("replace");var Tme=Ir;Tme("search");var Ime=Ir;Ime("species");var Eme=Ir;Eme("split");var xme=Ir,Cme=h5;xme("toPrimitive");Cme();var Mme=nu,kme=Ir,Nme=tm;kme("toStringTag");Nme(Mme("Symbol"),"Symbol");var Ame=Ir;Ame("unscopables");var Fme=Za,Ome=tm;Ome(Fme.JSON,"JSON",!0);var Pme=qa,jme=Pme.Symbol,nm={},KT=ii,Lme=Fi,R5=Function.prototype,Rme=KT&&Object.getOwnPropertyDescriptor,sE=Lme(R5,"name"),_me=sE&&(function(){}).name==="something",Bme=sE&&(!KT||KT&&Rme(R5,"name").configurable),Hme={EXISTS:sE,PROPER:_me,CONFIGURABLE:Bme},Yme=da,Ume=!Yme(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zme=Fi,Vme=co,Wme=Qu,$me=Qb,Zme=Ume,hk=$me("IE_PROTO"),QT=Object,qme=QT.prototype,_5=Zme?QT.getPrototypeOf:function(e){var t=Wme(e);if(zme(t,hk))return t[hk];var n=t.constructor;return Vme(n)&&t instanceof n?n.prototype:t instanceof QT?qme:null},Gme=da,Jme=co,Kme=Ju,Qme=eE,pk=_5,Xme=n1,ege=Na,XT=ege("iterator"),B5=!1,Bu,wD,bD;[].keys&&(bD=[].keys(),"next"in bD?(wD=pk(pk(bD)),wD!==Object.prototype&&(Bu=wD)):B5=!0);var tge=!Kme(Bu)||Gme(function(){var e={};return Bu[XT].call(e)!==e});tge?Bu={}:Bu=Qme(Bu);Jme(Bu[XT])||Xme(Bu,XT,function(){return this});var H5={IteratorPrototype:Bu,BUGGY_SAFARI_ITERATORS:B5},nge=H5.IteratorPrototype,rge=eE,age=Gv,oge=tm,ige=nm,sge=function(){return this},lge=function(e,t,n,r){var a=t+" Iterator";return e.prototype=rge(nge,{next:age(+!r,n)}),oge(e,a,!1,!0),ige[a]=sge,e},uge=Gn,cge=eu,Y5=Hme,dge=lge,fge=_5,hge=tm,mk=n1,pge=Na,gk=nm,U5=H5,mge=Y5.PROPER;Y5.CONFIGURABLE;U5.IteratorPrototype;var j0=U5.BUGGY_SAFARI_ITERATORS,SD=pge("iterator"),vk="keys",L0="values",yk="entries",gge=function(){return this},z5=function(e,t,n,r,a,o,i){dge(n,t,r);var l=function(M){if(M===a&&y)return y;if(!j0&&M&&M in p)return p[M];switch(M){case vk:return function(){return new n(this,M)};case L0:return function(){return new n(this,M)};case yk:return function(){return new n(this,M)}}return function(){return new n(this)}},c=t+" Iterator",f=!1,p=e.prototype,g=p[SD]||p["@@iterator"]||a&&p[a],y=!j0&&g||l(a),w=t==="Array"&&p.entries||g,T,S,I;if(w&&(T=fge(w.call(new e)),T!==Object.prototype&&T.next&&(hge(T,c,!0,!0),gk[c]=gge)),mge&&a===L0&&g&&g.name!==L0&&(f=!0,y=function(){return cge(g,this)}),a)if(S={values:l(L0),keys:o?y:l(vk),entries:l(yk)},i)for(I in S)(j0||f||!(I in p))&&mk(p,I,S[I]);else uge({target:t,proto:!0,forced:j0||f},S);return i&&p[SD]!==y&&mk(p,SD,y,{name:a}),gk[t]=y,S},V5=function(e,t){return{value:e,done:t}},vge=tu,wk=nm,W5=tE;Ws.f;var yge=z5,R0=V5,$5="Array Iterator",wge=W5.set,bge=W5.getterFor($5);yge(Array,"Array",function(e,t){wge(this,{type:$5,target:vge(e),index:0,kind:t})},function(){var e=bge(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,R0(void 0,!0);switch(e.kind){case"keys":return R0(n,!1);case"values":return R0(t[n],!1)}return R0([n,t[n]],!1)},"values");wk.Arguments=wk.Array;var Sge={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},Dge=Sge,Tge=Za,Ige=tm,bk=nm;for(var DD in Dge)Ige(Tge[DD],DD),bk[DD]=bk.Array;var Ege=jme,xge=Ege,Cge=Na,Mge=Ws.f,Sk=Cge("metadata"),Dk=Function.prototype;Dk[Sk]===void 0&&Mge(Dk,Sk,{value:null});var kge=Ir;kge("asyncDispose");var Nge=Ir;Nge("dispose");var Age=Ir;Age("metadata");var Fge=xge,Oge=Fge,Pge=nu,jge=fa,lE=Pge("Symbol"),Lge=lE.keyFor,Rge=jge(lE.prototype.valueOf),Z5=lE.isRegisteredSymbol||function(t){try{return Lge(Rge(t))!==void 0}catch{return!1}},_ge=Gn,Bge=Z5;_ge({target:"Symbol",stat:!0},{isRegisteredSymbol:Bge});var Hge=Xp,q5=nu,Yge=fa,Uge=Jv,zge=Na,Gw=q5("Symbol"),Tk=Gw.isWellKnownSymbol,G5=q5("Object","getOwnPropertyNames"),Vge=Yge(Gw.prototype.valueOf),Ik=Hge("wks");for(var TD=0,Ek=G5(Gw),Wge=Ek.length;TD<Wge;TD++)try{var xk=Ek[TD];Uge(Gw[xk])&&zge(xk)}catch{}var J5=function(t){if(Tk&&Tk(t))return!0;try{for(var n=Vge(t),r=0,a=G5(Ik),o=a.length;r<o;r++)if(Ik[a[r]]==n)return!0}catch{}return!1},$ge=Gn,Zge=J5;$ge({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Zge});var qge=Ir;qge("customMatcher");var Gge=Ir;Gge("observable");var Jge=Gn,Kge=Z5;Jge({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Kge});var Qge=Gn,Xge=J5;Qge({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Xge});var eve=Ir;eve("matcher");var tve=Ir;tve("metadataKey");var nve=Ir;nve("patternMatch");var rve=Ir;rve("replaceAll");var ave=Oge,ove=ave,ive=ove;const fp=qt(ive);var uE=fa,sve=qb,lve=ey,uve=_I,cve=uE("".charAt),Ck=uE("".charCodeAt),dve=uE("".slice),Mk=function(e){return function(t,n){var r=lve(uve(t)),a=sve(n),o=r.length,i,l;return a<0||a>=o?e?"":void 0:(i=Ck(r,a),i<55296||i>56319||a+1===o||(l=Ck(r,a+1))<56320||l>57343?e?cve(r,a):i:e?dve(r,a,a+2):(i-55296<<10)+(l-56320)+65536)}},fve={codeAt:Mk(!1),charAt:Mk(!0)},hve=fve.charAt,pve=ey,K5=tE,mve=z5,kk=V5,Q5="String Iterator",gve=K5.set,vve=K5.getterFor(Q5);mve(String,"String",function(e){gve(this,{type:Q5,string:pve(e),index:0})},function(){var t=vve(this),n=t.string,r=t.index,a;return r>=n.length?kk(void 0,!0):(a=hve(n,r),t.index+=a.length,kk(a,!1))});var yve=Xv,Nk=YI,wve=RI,bve=nm,Sve=Na,Dve=Sve("iterator"),cE=function(e){if(!wve(e))return Nk(e,Dve)||Nk(e,"@@iterator")||bve[yve(e)]},Tve=cE,Ive=Tve,Eve=Ive,xve=Eve,Cve=xve,Mve=Cve,kve=Mve,Nve=kve,Ave=Nve;const X5=qt(Ave);var Fve=ii,Ove=em,Pve=TypeError,jve=Object.getOwnPropertyDescriptor,Lve=Fve&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),eF=Lve?function(e,t){if(Ove(e)&&!jve(e,"length").writable)throw new Pve("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Rve=Gn,_ve=Qu,Bve=Af,Hve=eF,Yve=$I,Uve=da,zve=Uve(function(){return[].push.call({length:4294967296},1)!==4294967297}),Vve=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Wve=zve||!Vve();Rve({target:"Array",proto:!0,arity:1,forced:Wve},{push:function(t){var n=_ve(this),r=Bve(n),a=arguments.length;Yve(r+a);for(var o=0;o<a;o++)n[r]=arguments[o],r++;return Hve(n,r),r}});var $ve=Za,Zve=qa,Ff=function(e,t){var n=Zve[e+"Prototype"],r=n&&n[t];if(r)return r;var a=$ve[e],o=a&&a.prototype;return o&&o[t]},qve=Ff,Gve=qve("Array","push"),Jve=Ku,Kve=Gve,ID=Array.prototype,Qve=function(e){var t=e.push;return e===ID||Jve(ID,e)&&t===ID.push?Kve:t},Xve=Qve,eye=Xve,tye=eye,nye=tye,rye=nye,aye=rye,oye=aye;const iye=qt(oye);function sye(e,t){var n=e==null?null:typeof fp<"u"&&X5(e)||e["@@iterator"];if(n!=null){var r,a,o,i,l=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(iye(l).call(l,r.value),l.length!==t);c=!0);}catch(p){f=!0,a=p}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(f)throw a}}return l}}var lye=Gn,Ak=em,uye=GI,cye=Ju,Fk=KI,dye=Af,fye=tu,hye=Qv,pye=Na,mye=Gb,gye=e1,vye=mye("slice"),yye=pye("species"),ED=Array,wye=Math.max;lye({target:"Array",proto:!0,forced:!vye},{slice:function(t,n){var r=fye(this),a=dye(r),o=Fk(t,a),i=Fk(n===void 0?a:n,a),l,c,f;if(Ak(r)&&(l=r.constructor,uye(l)&&(l===ED||Ak(l.prototype))?l=void 0:cye(l)&&(l=l[yye],l===null&&(l=void 0)),l===ED||l===void 0))return gye(r,o,i);for(c=new(l===void 0?ED:l)(wye(i-o,0)),f=0;o<i;o++,f++)o in r&&hye(c,f,r[o]);return c.length=f,c}});var bye=Ff,Sye=bye("Array","slice"),Dye=Ku,Tye=Sye,xD=Array.prototype,Iye=function(e){var t=e.slice;return e===xD||Dye(xD,e)&&t===xD.slice?Tye:t},Eye=Iye,xye=Eye,Cye=xye,Mye=Cye,kye=Mye,Nye=kye,Aye=Nye;const Fye=qt(Aye);var Oye=eu,Ok=id,Pye=YI,jye=function(e,t,n){var r,a;Ok(e);try{if(r=Pye(e,"return"),!r){if(t==="throw")throw n;return n}r=Oye(r,e)}catch(o){a=!0,r=o}if(t==="throw")throw n;if(a)throw r;return Ok(r),n},Lye=id,Rye=jye,_ye=function(e,t,n,r){try{return r?t(Lye(n)[0],n[1]):t(n)}catch(a){Rye(e,"throw",a)}},Bye=Na,Hye=nm,Yye=Bye("iterator"),Uye=Array.prototype,zye=function(e){return e!==void 0&&(Hye.Array===e||Uye[Yye]===e)},Vye=eu,Wye=HI,$ye=id,Zye=$b,qye=cE,Gye=TypeError,Jye=function(e,t){var n=arguments.length<2?qye(e):t;if(Wye(n))return $ye(Vye(n,e));throw new Gye(Zye(e)+" is not iterable")},Kye=WI,Qye=eu,Xye=Qu,e0e=_ye,t0e=zye,n0e=GI,r0e=Af,Pk=Qv,a0e=Jye,o0e=cE,jk=Array,i0e=function(t){var n=Xye(t),r=n0e(this),a=arguments.length,o=a>1?arguments[1]:void 0,i=o!==void 0;i&&(o=Kye(o,a>2?arguments[2]:void 0));var l=o0e(n),c=0,f,p,g,y,w,T;if(l&&!(this===jk&&t0e(l)))for(p=r?new this:[],y=a0e(n,l),w=y.next;!(g=Qye(w,y)).done;c++)T=i?e0e(y,o,[g.value,c],!0):g.value,Pk(p,c,T);else for(f=r0e(n),p=r?new this(f):jk(f);f>c;c++)T=i?o(n[c],c):n[c],Pk(p,c,T);return p.length=c,p},s0e=Na,tF=s0e("iterator"),nF=!1;try{var l0e=0,Lk={next:function(){return{done:!!l0e++}},return:function(){nF=!0}};Lk[tF]=function(){return this},Array.from(Lk,function(){throw 2})}catch{}var u0e=function(e,t){try{if(!t&&!nF)return!1}catch{return!1}var n=!1;try{var r={};r[tF]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},c0e=Gn,d0e=i0e,f0e=u0e,h0e=!f0e(function(e){Array.from(e)});c0e({target:"Array",stat:!0,forced:h0e},{from:d0e});var p0e=qa,m0e=p0e.Array.from,g0e=m0e,v0e=g0e,y0e=v0e,w0e=y0e,b0e=w0e,S0e=b0e,D0e=S0e;const rF=qt(D0e);function e2(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 aF(e,t){var n;if(e){if(typeof e=="string")return e2(e,t);var r=Fye(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return rF(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e2(e,t)}}function T0e(){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 Bl(e,t){return $de(e)||sye(e,t)||aF(e,t)||T0e()}var oF={exports:{}};(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var i=typeof o;if(i==="string"||i==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(i==="object")if(o.toString===Object.prototype.toString)for(var c in o)t.call(o,c)&&o[c]&&r.push(c);else r.push(o.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(oF);var I0e=oF.exports;const dE=qt(I0e);var iF={exports:{}},CD,Rk;function E0e(){if(Rk)return CD;Rk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return CD=e,CD}var MD,_k;function x0e(){if(_k)return MD;_k=1;var e=E0e();function t(){}function n(){}return n.resetWarningCache=t,MD=function(){function r(i,l,c,f,p,g){if(g!==e){var y=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 y.name="Invariant Violation",y}}r.isRequired=r;function a(){return r}var o={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},MD}iF.exports=x0e()();var C0e=iF.exports;const Mn=qt(C0e);var fE=ne.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});fE.displayName="ScrollToBottomFunctionContext";function l1(){return P.useContext(fE)}function M0e(){var e=l1(),t=e.scrollToEnd;return t}var hE=ne.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});hE.displayName="ScrollToBottomState1Context";var pE=ne.createContext({animating:!1,animatingToEnd:!1,sticky:!0});pE.displayName="ScrollToBottomState2Context";var mE=ne.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});mE.displayName="ScrollToBottomStateContext";var Bk=[mE,hE,pE];function k0e(e){return P.useContext(Bk[e]||Bk[0])}function N0e(){var e=k0e(2),t=e.sticky;return[t]}var u1=ne.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});u1.displayName="ScrollToBottomInternalContext";function A0e(){return P.useContext(u1)}function gE(){var e=A0e(),t=e.styleToClassName;return t}var F0e={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)"}},vE=function(t){var n=t.children,r=t.className,a=N0e(),o=Bl(a,1),i=o[0],l=gE()(F0e),c=M0e();return!i&&ne.createElement("button",{className:dE(l,(r||"")+""),onClick:c,type:"button"},n)};vE.defaultProps={children:void 0,className:""};vE.propTypes={children:Mn.any,className:Mn.string};var sF={exports:{}},O0e=Gn,P0e=ii,Hk=Ws.f;O0e({target:"Object",stat:!0,forced:Object.defineProperty!==Hk,sham:!P0e},{defineProperty:Hk});var j0e=qa,lF=j0e.Object,L0e=sF.exports=function(t,n,r){return lF.defineProperty(t,n,r)};lF.defineProperty.sham&&(L0e.sham=!0);var R0e=sF.exports,_0e=R0e,uF=_0e,B0e=uF,H0e=B0e,Y0e=H0e,U0e=Y0e,z0e=U0e;const V0e=qt(z0e);var W0e=ty,$0e=W0e.f("iterator"),Z0e=$0e,q0e=Z0e,G0e=q0e,J0e=G0e,K0e=J0e,Q0e=K0e,X0e=Q0e;const ewe=qt(X0e);function fv(e){"@babel/helpers - typeof";return fv=typeof fp=="function"&&typeof ewe=="symbol"?function(t){return typeof t}:function(t){return t&&typeof fp=="function"&&t.constructor===fp&&t!==fp.prototype?"symbol":typeof t},fv(e)}var twe=ty,nwe=twe.f("toPrimitive"),rwe=nwe,awe=rwe,owe=awe,iwe=owe,swe=iwe,lwe=swe,uwe=lwe;const cwe=qt(uwe);function dwe(e,t){if(fv(e)!="object"||!e)return e;var n=e[cwe];if(n!==void 0){var r=n.call(e,t||"default");if(fv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fwe(e){var t=dwe(e,"string");return fv(t)=="symbol"?t:t+""}function hwe(e,t,n){return t=fwe(t),t in e?V0e(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pwe(e){if(X9(e))return e2(e)}function mwe(e){if(typeof fp<"u"&&X5(e)!=null||e["@@iterator"]!=null)return rF(e)}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 En(e){return pwe(e)||mwe(e)||aF(e)||gwe()}var _0=function(e){return e&&e.Math==Math&&e},Oi=_0(typeof globalThis=="object"&&globalThis)||_0(typeof window=="object"&&window)||_0(typeof self=="object"&&self)||_0(typeof dr=="object"&&dr)||function(){return this}()||Function("return this")(),yE={},$s=function(e){try{return!!e()}catch{return!0}},vwe=$s,Of=!vwe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),cF={},dF={}.propertyIsEnumerable,fF=Object.getOwnPropertyDescriptor,ywe=fF&&!dF.call({1:2},1);cF.f=ywe?function(t){var n=fF(this,t);return!!n&&n.enumerable}:dF;var hF=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},wwe={}.toString,wE=function(e){return wwe.call(e).slice(8,-1)},bwe=$s,Swe=wE,Dwe="".split,Twe=bwe(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return Swe(e)=="String"?Dwe.call(e,""):Object(e)}:Object,c1=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},Iwe=Twe,Ewe=c1,bE=function(e){return Iwe(Ewe(e))},ls=function(e){return typeof e=="function"},xwe=ls,oy=function(e){return typeof e=="object"?e!==null:xwe(e)},kD=Oi,Cwe=ls,Mwe=function(e){return Cwe(e)?e:void 0},d1=function(e,t){return arguments.length<2?Mwe(kD[e]):kD[e]&&kD[e][t]},kwe=d1,Nwe=kwe("navigator","userAgent")||"",pF=Oi,ND=Nwe,Yk=pF.process,Uk=pF.Deno,zk=Yk&&Yk.versions||Uk&&Uk.version,Vk=zk&&zk.v8,Fl,Jw;Vk?(Fl=Vk.split("."),Jw=Fl[0]<4?1:Fl[0]+Fl[1]):ND&&(Fl=ND.match(/Edge\/(\d+)/),(!Fl||Fl[1]>=74)&&(Fl=ND.match(/Chrome\/(\d+)/),Fl&&(Jw=Fl[1])));var Awe=Jw&&+Jw,Wk=Awe,Fwe=$s,mF=!!Object.getOwnPropertySymbols&&!Fwe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Wk&&Wk<41}),Owe=mF,gF=Owe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Pwe=ls,jwe=d1,Lwe=gF,vF=Lwe?function(e){return typeof e=="symbol"}:function(e){var t=jwe("Symbol");return Pwe(t)&&Object(e)instanceof t},Rwe=function(e){try{return String(e)}catch{return"Object"}},_we=ls,Bwe=Rwe,Hwe=function(e){if(_we(e))return e;throw TypeError(Bwe(e)+" is not a function")},Ywe=Hwe,yF=function(e,t){var n=e[t];return n==null?void 0:Ywe(n)},AD=ls,FD=oy,Uwe=function(e,t){var n,r;if(t==="string"&&AD(n=e.toString)&&!FD(r=n.call(e))||AD(n=e.valueOf)&&!FD(r=n.call(e))||t!=="string"&&AD(n=e.toString)&&!FD(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},wF={exports:{}},$k=Oi,SE=function(e,t){try{Object.defineProperty($k,e,{value:t,configurable:!0,writable:!0})}catch{$k[e]=t}return t},zwe=Oi,Vwe=SE,Zk="__core-js_shared__",Wwe=zwe[Zk]||Vwe(Zk,{}),DE=Wwe,qk=DE;(wF.exports=function(e,t){return qk[e]||(qk[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var TE=wF.exports,$we=c1,bF=function(e){return Object($we(e))},Zwe=bF,qwe={}.hasOwnProperty,Pf=Object.hasOwn||function(t,n){return qwe.call(Zwe(t),n)},Gwe=0,Jwe=Math.random(),SF=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Gwe+Jwe).toString(36)},Kwe=Oi,Qwe=TE,Gk=Pf,Xwe=SF,Jk=mF,ebe=gF,Ig=Qwe("wks"),Yg=Kwe.Symbol,tbe=ebe?Yg:Yg&&Yg.withoutSetter||Xwe,iy=function(e){return(!Gk(Ig,e)||!(Jk||typeof Ig[e]=="string"))&&(Jk&&Gk(Yg,e)?Ig[e]=Yg[e]:Ig[e]=tbe("Symbol."+e)),Ig[e]},Kk=oy,Qk=vF,nbe=yF,rbe=Uwe,abe=iy,obe=abe("toPrimitive"),ibe=function(e,t){if(!Kk(e)||Qk(e))return e;var n=nbe(e,obe),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!Kk(r)||Qk(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),rbe(e,t)},sbe=ibe,lbe=vF,DF=function(e){var t=sbe(e,"string");return lbe(t)?t:String(t)},ube=Oi,Xk=oy,t2=ube.document,cbe=Xk(t2)&&Xk(t2.createElement),TF=function(e){return cbe?t2.createElement(e):{}},dbe=Of,fbe=$s,hbe=TF,IF=!dbe&&!fbe(function(){return Object.defineProperty(hbe("div"),"a",{get:function(){return 7}}).a!=7}),pbe=Of,mbe=cF,gbe=hF,vbe=bE,ybe=DF,wbe=Pf,bbe=IF,e4=Object.getOwnPropertyDescriptor;yE.f=pbe?e4:function(t,n){if(t=vbe(t),n=ybe(n),bbe)try{return e4(t,n)}catch{}if(wbe(t,n))return gbe(!mbe.f.call(t,n),t[n])};var sy={},Sbe=oy,sd=function(e){if(Sbe(e))return e;throw TypeError(String(e)+" is not an object")},Dbe=Of,Tbe=IF,t4=sd,Ibe=DF,n4=Object.defineProperty;sy.f=Dbe?n4:function(t,n,r){if(t4(t),n=Ibe(n),t4(r),Tbe)try{return n4(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 Ebe=Of,xbe=sy,Cbe=hF,f1=Ebe?function(e,t,n){return xbe.f(e,t,Cbe(1,n))}:function(e,t,n){return e[t]=n,e},EF={exports:{}},Mbe=ls,n2=DE,kbe=Function.toString;Mbe(n2.inspectSource)||(n2.inspectSource=function(e){return kbe.call(e)});var xF=n2.inspectSource,Nbe=Oi,Abe=ls,Fbe=xF,r4=Nbe.WeakMap,Obe=Abe(r4)&&/native code/.test(Fbe(r4)),Pbe=TE,jbe=SF,a4=Pbe("keys"),CF=function(e){return a4[e]||(a4[e]=jbe(e))},IE={},Lbe=Obe,Rbe=Oi,_be=oy,Bbe=f1,OD=Pf,PD=DE,Hbe=CF,Ybe=IE,o4="Object already initialized",Ube=Rbe.WeakMap,Kw,hv,Qw,zbe=function(e){return Qw(e)?hv(e):Kw(e,{})},Vbe=function(e){return function(t){var n;if(!_be(t)||(n=hv(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(Lbe||PD.state){var Xd=PD.state||(PD.state=new Ube),Wbe=Xd.get,i4=Xd.has,$be=Xd.set;Kw=function(e,t){if(i4.call(Xd,e))throw new TypeError(o4);return t.facade=e,$be.call(Xd,e,t),t},hv=function(e){return Wbe.call(Xd,e)||{}},Qw=function(e){return i4.call(Xd,e)}}else{var rp=Hbe("state");Ybe[rp]=!0,Kw=function(e,t){if(OD(e,rp))throw new TypeError(o4);return t.facade=e,Bbe(e,rp,t),t},hv=function(e){return OD(e,rp)?e[rp]:{}},Qw=function(e){return OD(e,rp)}}var MF={set:Kw,get:hv,has:Qw,enforce:zbe,getterFor:Vbe},r2=Of,Zbe=Pf,kF=Function.prototype,qbe=r2&&Object.getOwnPropertyDescriptor,EE=Zbe(kF,"name"),Gbe=EE&&(function(){}).name==="something",Jbe=EE&&(!r2||r2&&qbe(kF,"name").configurable),xE={EXISTS:EE,PROPER:Gbe,CONFIGURABLE:Jbe},Kbe=Oi,s4=ls,Qbe=Pf,l4=f1,Xbe=SE,e1e=xF,NF=MF,t1e=xE.CONFIGURABLE,n1e=NF.get,r1e=NF.enforce,a1e=String(String).split("String");(EF.exports=function(e,t,n,r){var a=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,i=r?!!r.noTargetGet:!1,l=r&&r.name!==void 0?r.name:t,c;if(s4(n)&&(String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Qbe(n,"name")||t1e&&n.name!==l)&&l4(n,"name",l),c=r1e(n),c.source||(c.source=a1e.join(typeof l=="string"?l:""))),e===Kbe){o?e[t]=n:Xbe(t,n);return}else a?!i&&e[t]&&(o=!0):delete e[t];o?e[t]=n:l4(e,t,n)})(Function.prototype,"toString",function(){return s4(this)&&n1e(this).source||e1e(this)});var ly=EF.exports,AF={},o1e=Math.ceil,i1e=Math.floor,h1=function(e){var t=+e;return t!==t||t===0?0:(t>0?i1e:o1e)(t)},s1e=h1,l1e=Math.max,u1e=Math.min,c1e=function(e,t){var n=s1e(e);return n<0?l1e(n+t,0):u1e(n,t)},d1e=h1,f1e=Math.min,FF=function(e){return e>0?f1e(d1e(e),9007199254740991):0},h1e=FF,p1e=function(e){return h1e(e.length)},m1e=bE,g1e=c1e,v1e=p1e,u4=function(e){return function(t,n,r){var a=m1e(t),o=v1e(a),i=g1e(r,o),l;if(e&&n!=n){for(;o>i;)if(l=a[i++],l!=l)return!0}else for(;o>i;i++)if((e||i in a)&&a[i]===n)return e||i||0;return!e&&-1}},y1e={includes:u4(!0),indexOf:u4(!1)},jD=Pf,w1e=bE,b1e=y1e.indexOf,S1e=IE,OF=function(e,t){var n=w1e(e),r=0,a=[],o;for(o in n)!jD(S1e,o)&&jD(n,o)&&a.push(o);for(;t.length>r;)jD(n,o=t[r++])&&(~b1e(a,o)||a.push(o));return a},CE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],D1e=OF,T1e=CE,I1e=T1e.concat("length","prototype");AF.f=Object.getOwnPropertyNames||function(t){return D1e(t,I1e)};var PF={};PF.f=Object.getOwnPropertySymbols;var E1e=d1,x1e=AF,C1e=PF,M1e=sd,k1e=E1e("Reflect","ownKeys")||function(t){var n=x1e.f(M1e(t)),r=C1e.f;return r?n.concat(r(t)):n},N1e=Pf,A1e=k1e,F1e=yE,O1e=sy,P1e=function(e,t){for(var n=A1e(t),r=O1e.f,a=F1e.f,o=0;o<n.length;o++){var i=n[o];N1e(e,i)||r(e,i,a(t,i))}},j1e=$s,L1e=ls,R1e=/#|\.prototype\./,uy=function(e,t){var n=B1e[_1e(e)];return n==Y1e?!0:n==H1e?!1:L1e(t)?j1e(t):!!t},_1e=uy.normalize=function(e){return String(e).replace(R1e,".").toLowerCase()},B1e=uy.data={},H1e=uy.NATIVE="N",Y1e=uy.POLYFILL="P",U1e=uy,LD=Oi,z1e=yE.f,V1e=f1,W1e=ly,$1e=SE,Z1e=P1e,q1e=U1e,G1e=function(e,t){var n=e.target,r=e.global,a=e.stat,o,i,l,c,f,p;if(r?i=LD:a?i=LD[n]||$1e(n,{}):i=(LD[n]||{}).prototype,i)for(l in t){if(f=t[l],e.noTargetGet?(p=z1e(i,l),c=p&&p.value):c=i[l],o=q1e(r?l:n+(a?".":"#")+l,e.forced),!o&&c!==void 0){if(typeof f==typeof c)continue;Z1e(f,c)}(e.sham||c&&c.sham)&&V1e(f,"sham",!0),W1e(i,l,f,e)}},J1e=iy,K1e=J1e("toStringTag"),jF={};jF[K1e]="z";var ME=String(jF)==="[object z]",Q1e=ME,X1e=ls,fw=wE,eSe=iy,tSe=eSe("toStringTag"),nSe=fw(function(){return arguments}())=="Arguments",rSe=function(e,t){try{return e[t]}catch{}},LF=Q1e?fw:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=rSe(t=Object(e),tSe))=="string"?n:nSe?fw(t):(r=fw(t))=="Object"&&X1e(t.callee)?"Arguments":r},aSe=LF,p1=function(e){if(aSe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},oSe=sd,RF=function(){var e=oSe(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},kE={},_F=$s,iSe=Oi,BF=iSe.RegExp;kE.UNSUPPORTED_Y=_F(function(){var e=BF("a","y");return e.lastIndex=2,e.exec("abcd")!=null});kE.BROKEN_CARET=_F(function(){var e=BF("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var sSe=OF,lSe=CE,uSe=Object.keys||function(t){return sSe(t,lSe)},cSe=Of,dSe=sy,fSe=sd,hSe=uSe,pSe=cSe?Object.defineProperties:function(t,n){fSe(t);for(var r=hSe(n),a=r.length,o=0,i;a>o;)dSe.f(t,i=r[o++],n[i]);return t},mSe=d1,gSe=mSe("document","documentElement"),vSe=sd,ySe=pSe,c4=CE,wSe=IE,bSe=gSe,SSe=TF,DSe=CF,d4=">",f4="<",a2="prototype",o2="script",HF=DSe("IE_PROTO"),RD=function(){},YF=function(e){return f4+o2+d4+e+f4+"/"+o2+d4},h4=function(e){e.write(YF("")),e.close();var t=e.parentWindow.Object;return e=null,t},TSe=function(){var e=SSe("iframe"),t="java"+o2+":",n;return e.style.display="none",bSe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(YF("document.F=Object")),n.close(),n.F},B0,hw=function(){try{B0=new ActiveXObject("htmlfile")}catch{}hw=typeof document<"u"?document.domain&&B0?h4(B0):TSe():h4(B0);for(var e=c4.length;e--;)delete hw[a2][c4[e]];return hw()};wSe[HF]=!0;var ISe=Object.create||function(t,n){var r;return t!==null?(RD[a2]=vSe(t),r=new RD,RD[a2]=null,r[HF]=t):r=hw(),n===void 0?r:ySe(r,n)},ESe=$s,xSe=Oi,CSe=xSe.RegExp,MSe=ESe(function(){var e=CSe(".","s");return!(e.dotAll&&e.exec(`
`)&&e.flags==="s")}),kSe=$s,NSe=Oi,ASe=NSe.RegExp,FSe=kSe(function(){var e=ASe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),OSe=p1,PSe=RF,p4=kE,jSe=TE,LSe=ISe,RSe=MF.get,_Se=MSe,BSe=FSe,Xw=RegExp.prototype.exec,HSe=jSe("native-string-replace",String.prototype.replace),i2=Xw,s2=function(){var e=/a/,t=/b*/g;return Xw.call(e,"a"),Xw.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),UF=p4.UNSUPPORTED_Y||p4.BROKEN_CARET,l2=/()??/.exec("")[1]!==void 0,YSe=s2||l2||UF||_Se||BSe;YSe&&(i2=function(t){var n=this,r=RSe(n),a=OSe(t),o=r.raw,i,l,c,f,p,g,y;if(o)return o.lastIndex=n.lastIndex,i=i2.call(o,a),n.lastIndex=o.lastIndex,i;var w=r.groups,T=UF&&n.sticky,S=PSe.call(n),I=n.source,M=0,N=a;if(T&&(S=S.replace("y",""),S.indexOf("g")===-1&&(S+="g"),N=a.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&a.charAt(n.lastIndex-1)!==`
`)&&(I="(?: "+I+")",N=" "+N,M++),l=new RegExp("^(?:"+I+")",S)),l2&&(l=new RegExp("^"+I+"$(?!\\s)",S)),s2&&(c=n.lastIndex),f=Xw.call(T?l:n,N),T?f?(f.input=f.input.slice(M),f[0]=f[0].slice(M),f.index=n.lastIndex,n.lastIndex+=f[0].length):n.lastIndex=0:s2&&f&&(n.lastIndex=n.global?f.index+f[0].length:c),l2&&f&&f.length>1&&HSe.call(f[0],l,function(){for(p=1;p<arguments.length-2;p++)arguments[p]===void 0&&(f[p]=void 0)}),f&&w)for(f.groups=g=LSe(null),p=0;p<w.length;p++)y=w[p],g[y[0]]=f[y[1]];return f});var NE=i2,USe=G1e,m4=NE;USe({target:"RegExp",proto:!0,forced:/./.exec!==m4},{exec:m4});var g4=ly,zSe=NE,v4=$s,zF=iy,VSe=f1,WSe=zF("species"),_D=RegExp.prototype,$Se=function(e,t,n,r){var a=zF(e),o=!v4(function(){var f={};return f[a]=function(){return 7},""[e](f)!=7}),i=o&&!v4(function(){var f=!1,p=/a/;return e==="split"&&(p={},p.constructor={},p.constructor[WSe]=function(){return p},p.flags="",p[a]=/./[a]),p.exec=function(){return f=!0,null},p[a](""),!f});if(!o||!i||n){var l=/./[a],c=t(a,""[e],function(f,p,g,y,w){var T=p.exec;return T===zSe||T===_D.exec?o&&!w?{done:!0,value:l.call(p,g,y)}:{done:!0,value:f.call(g,p,y)}:{done:!1}});g4(String.prototype,e,c[0]),g4(_D,a,c[1])}r&&VSe(_D[a],"sham",!0)},ZSe=h1,qSe=p1,GSe=c1,y4=function(e){return function(t,n){var r=qSe(GSe(t)),a=ZSe(n),o=r.length,i,l;return a<0||a>=o?e?"":void 0:(i=r.charCodeAt(a),i<55296||i>56319||a+1===o||(l=r.charCodeAt(a+1))<56320||l>57343?e?r.charAt(a):i:e?r.slice(a,a+2):(i-55296<<10)+(l-56320)+65536)}},JSe={codeAt:y4(!1),charAt:y4(!0)},KSe=JSe.charAt,QSe=function(e,t,n){return t+(n?KSe(e,t).length:1)},XSe=bF,eDe=Math.floor,tDe="".replace,nDe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,rDe=/\$([$&'`]|\d{1,2})/g,aDe=function(e,t,n,r,a,o){var i=n+e.length,l=r.length,c=rDe;return a!==void 0&&(a=XSe(a),c=nDe),tDe.call(o,c,function(f,p){var g;switch(p.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(i);case"<":g=a[p.slice(1,-1)];break;default:var y=+p;if(y===0)return f;if(y>l){var w=eDe(y/10);return w===0?f:w<=l?r[w-1]===void 0?p.charAt(1):r[w-1]+p.charAt(1):f}g=r[y-1]}return g===void 0?"":g})},oDe=sd,iDe=ls,sDe=wE,lDe=NE,uDe=function(e,t){var n=e.exec;if(iDe(n)){var r=n.call(e,t);return r!==null&&oDe(r),r}if(sDe(e)==="RegExp")return lDe.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},cDe=$Se,dDe=$s,fDe=sd,hDe=ls,pDe=h1,mDe=FF,ap=p1,gDe=c1,vDe=QSe,yDe=yF,wDe=aDe,bDe=uDe,SDe=iy,u2=SDe("replace"),DDe=Math.max,TDe=Math.min,IDe=function(e){return e===void 0?e:String(e)},EDe=function(){return"a".replace(/./,"$0")==="$0"}(),w4=function(){return/./[u2]?/./[u2]("a","$0")==="":!1}(),xDe=!dDe(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});cDe("replace",function(e,t,n){var r=w4?"$":"$0";return[function(o,i){var l=gDe(this),c=o==null?void 0:yDe(o,u2);return c?c.call(o,l,i):t.call(ap(l),o,i)},function(a,o){var i=fDe(this),l=ap(a);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var c=n(t,i,l,o);if(c.done)return c.value}var f=hDe(o);f||(o=ap(o));var p=i.global;if(p){var g=i.unicode;i.lastIndex=0}for(var y=[];;){var w=bDe(i,l);if(w===null||(y.push(w),!p))break;var T=ap(w[0]);T===""&&(i.lastIndex=vDe(l,mDe(i.lastIndex),g))}for(var S="",I=0,M=0;M<y.length;M++){w=y[M];for(var N=ap(w[0]),_=DDe(TDe(pDe(w.index),l.length),0),k=[],R=1;R<w.length;R++)k.push(IDe(w[R]));var L=w.groups;if(f){var H=[N].concat(k,_,l);L!==void 0&&H.push(L);var U=ap(o.apply(void 0,H))}else U=wDe(N,l,_,k,L,o);_>=I&&(S+=l.slice(I,_)+U,I=_+N.length)}return S+l.slice(I)}]},!xDe||!EDe||w4);var CDe=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",MDe=TypeError,kDe=function(e,t){if(e<t)throw new MDe("Not enough arguments");return e},VF=Za,NDe=PI,ADe=co,FDe=CDe,ODe=W9,PDe=e1,jDe=kDe,LDe=VF.Function,RDe=/MSIE .\./.test(ODe)||FDe&&function(){var e=VF.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),WF=function(e,t){var n=t?2:1;return RDe?function(r,a){var o=jDe(arguments.length,1)>n,i=ADe(r)?r:LDe(r),l=o?PDe(arguments,n):[],c=o?function(){NDe(i,this,l)}:i;return t?e(c,a):e(c)}:e},_De=Gn,$F=Za,BDe=WF,b4=BDe($F.setInterval,!0);_De({global:!0,bind:!0,forced:$F.setInterval!==b4},{setInterval:b4});var HDe=Gn,ZF=Za,YDe=WF,S4=YDe(ZF.setTimeout,!0);HDe({global:!0,bind:!0,forced:ZF.setTimeout!==S4},{setTimeout:S4});var UDe=qa,zDe=UDe.setInterval,VDe=zDe;const WDe=qt(VDe);var $De=da,qF=function(e,t){var n=[][e];return!!n&&$De(function(){n.call(null,t||function(){return 1},1)})},ZDe=Gn,qDe=jI,GDe=i5.indexOf,JDe=qF,c2=qDe([].indexOf),GF=!!c2&&1/c2([1],1,-0)<0,KDe=GF||!JDe("indexOf");ZDe({target:"Array",proto:!0,forced:KDe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return GF?c2(this,t,n)||0:GDe(this,t,n)}});var QDe=Ff,XDe=QDe("Array","indexOf"),eTe=Ku,tTe=XDe,BD=Array.prototype,nTe=function(e){var t=e.indexOf;return e===BD||eTe(BD,e)&&t===BD.indexOf?tTe:t},rTe=nTe,aTe=rTe,oTe=aTe;const iTe=qt(oTe);var D4=$b,sTe=TypeError,lTe=function(e,t){if(!delete e[t])throw new sTe("Cannot delete property "+D4(t)+" of "+D4(e))},uTe=Gn,cTe=Qu,dTe=KI,fTe=qb,hTe=Af,pTe=eF,mTe=$I,gTe=JI,vTe=Qv,HD=lTe,yTe=Gb,wTe=yTe("splice"),bTe=Math.max,STe=Math.min;uTe({target:"Array",proto:!0,forced:!wTe},{splice:function(t,n){var r=cTe(this),a=hTe(r),o=dTe(t,a),i=arguments.length,l,c,f,p,g,y;for(i===0?l=c=0:i===1?(l=0,c=a-o):(l=i-2,c=STe(bTe(fTe(n),0),a-o)),mTe(a+l-c),f=gTe(r,c),p=0;p<c;p++)g=o+p,g in r&&vTe(f,p,r[g]);if(f.length=c,l<c){for(p=o;p<a-c;p++)g=p+c,y=p+l,g in r?r[y]=r[g]:HD(r,y);for(p=a;p>a-c+l;p--)HD(r,p-1)}else if(l>c)for(p=a-c;p>o;p--)g=p+c-1,y=p+l-1,g in r?r[y]=r[g]:HD(r,y);for(p=0;p<l;p++)r[p+o]=arguments[p+2];return pTe(r,a-c+l),f}});var DTe=Ff,TTe=DTe("Array","splice"),ITe=Ku,ETe=TTe,YD=Array.prototype,xTe=function(e){var t=e.splice;return e===YD||ITe(YD,e)&&t===YD.splice?ETe:t},CTe=xTe,MTe=CTe,kTe=MTe;const NTe=qt(kTe);var ATe=Ff,FTe=ATe("Array","concat"),OTe=Ku,PTe=FTe,UD=Array.prototype,jTe=function(e){var t=e.concat;return e===UD||OTe(UD,e)&&t===UD.concat?PTe:t},LTe=jTe,RTe=LTe,_Te=RTe;const Dr=qt(_Te);var BTe=Gn,HTe=fa,JF=Date,YTe=HTe(JF.prototype.getTime);BTe({target:"Date",stat:!0},{now:function(){return YTe(new JF)}});var UTe=qa,zTe=UTe.Date.now,VTe=zTe,WTe=VTe,$Te=WTe;const Kc=qt($Te);var ZTe=nE.forEach,qTe=qF,GTe=qTe("forEach"),JTe=GTe?[].forEach:function(t){return ZTe(this,t,arguments.length>1?arguments[1]:void 0)},KTe=Gn,T4=JTe;KTe({target:"Array",proto:!0,forced:[].forEach!==T4},{forEach:T4});var QTe=Ff,XTe=QTe("Array","forEach"),e2e=XTe,t2e=e2e,n2e=Xv,r2e=Fi,a2e=Ku,o2e=t2e,zD=Array.prototype,i2e={DOMTokenList:!0,NodeList:!0},s2e=function(e){var t=e.forEach;return e===zD||a2e(zD,e)&&t===zD.forEach||r2e(i2e,n2e(e))?o2e:t},l2e=s2e;const eb=qt(l2e);var u2e=Gn,c2e=Qu,KF=XI,d2e=da,f2e=d2e(function(){KF(1)});u2e({target:"Object",stat:!0,forced:f2e},{keys:function(t){return KF(c2e(t))}});var h2e=qa,p2e=h2e.Object.keys,m2e=p2e,g2e=m2e,v2e=g2e;const y2e=qt(v2e);var w2e=qa,b2e=w2e.Object.getOwnPropertySymbols,S2e=b2e,D2e=S2e,T2e=D2e;const I4=qt(T2e);var I2e=Gn,E2e=nE.filter,x2e=Gb,C2e=x2e("filter");I2e({target:"Array",proto:!0,forced:!C2e},{filter:function(t){return E2e(this,t,arguments.length>1?arguments[1]:void 0)}});var M2e=Ff,k2e=M2e("Array","filter"),N2e=Ku,A2e=k2e,VD=Array.prototype,F2e=function(e){var t=e.filter;return e===VD||N2e(VD,e)&&t===VD.filter?A2e:t},O2e=F2e,P2e=O2e,j2e=P2e;const L2e=qt(j2e);var QF={exports:{}},R2e=Gn,_2e=da,B2e=tu,XF=qv.f,eO=ii,H2e=!eO||_2e(function(){XF(1)});R2e({target:"Object",stat:!0,forced:H2e,sham:!eO},{getOwnPropertyDescriptor:function(t,n){return XF(B2e(t),n)}});var Y2e=qa,tO=Y2e.Object,U2e=QF.exports=function(t,n){return tO.getOwnPropertyDescriptor(t,n)};tO.getOwnPropertyDescriptor.sham&&(U2e.sham=!0);var z2e=QF.exports,V2e=z2e,W2e=V2e,$2e=W2e;const nO=qt($2e);var Z2e=nu,q2e=fa,G2e=Xb,J2e=t1,K2e=id,Q2e=q2e([].concat),X2e=Z2e("Reflect","ownKeys")||function(t){var n=G2e.f(K2e(t)),r=J2e.f;return r?Q2e(n,r(t)):n},eIe=Gn,tIe=ii,nIe=X2e,rIe=tu,aIe=qv,oIe=Qv;eIe({target:"Object",stat:!0,sham:!tIe},{getOwnPropertyDescriptors:function(t){for(var n=rIe(t),r=aIe.f,a=nIe(n),o={},i=0,l,c;a.length>i;)c=r(n,l=a[i++]),c!==void 0&&oIe(o,l,c);return o}});var iIe=qa,sIe=iIe.Object.getOwnPropertyDescriptors,lIe=sIe,uIe=lIe,cIe=uIe;const E4=qt(cIe);var rO={exports:{}},dIe=Gn,fIe=ii,x4=Jb.f;dIe({target:"Object",stat:!0,forced:Object.defineProperties!==x4,sham:!fIe},{defineProperties:x4});var hIe=qa,aO=hIe.Object,pIe=rO.exports=function(t,n){return aO.defineProperties(t,n)};aO.defineProperties.sham&&(pIe.sham=!0);var mIe=rO.exports,gIe=mIe,vIe=gIe,yIe=vIe;const wIe=qt(yIe);var bIe=uF;const SIe=qt(bIe);function DIe(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 TIe(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 IIe=function(){function e(n){var r=this;this._insertTag=function(a){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,o),r.tags.push(a)},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(TIe(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var o=DIe(a);try{o.insertRule(r,o.cssRules.length)}catch{}}else a.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}(),io="-ms-",tb="-moz-",Rn="-webkit-",oO="comm",AE="rule",FE="decl",EIe="@import",iO="@keyframes",xIe="@layer",CIe=Math.abs,m1=String.fromCharCode,MIe=Object.assign;function kIe(e,t){return Va(e,0)^45?(((t<<2^Va(e,0))<<2^Va(e,1))<<2^Va(e,2))<<2^Va(e,3):0}function sO(e){return e.trim()}function NIe(e,t){return(e=t.exec(e))?e[0]:e}function _n(e,t,n){return e.replace(t,n)}function d2(e,t){return e.indexOf(t)}function Va(e,t){return e.charCodeAt(t)|0}function pv(e,t,n){return e.slice(t,n)}function Hl(e){return e.length}function OE(e){return e.length}function H0(e,t){return t.push(e),e}function AIe(e,t){return e.map(t).join("")}var g1=1,Cp=1,lO=0,oi=0,ea=0,rm="";function v1(e,t,n,r,a,o,i){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:g1,column:Cp,length:i,return:""}}function Eg(e,t){return MIe(v1("",null,null,"",null,null,0),e,{length:-e.length},t)}function FIe(){return ea}function OIe(){return ea=oi>0?Va(rm,--oi):0,Cp--,ea===10&&(Cp=1,g1--),ea}function ki(){return ea=oi<lO?Va(rm,oi++):0,Cp++,ea===10&&(Cp=1,g1++),ea}function ql(){return Va(rm,oi)}function pw(){return oi}function cy(e,t){return pv(rm,e,t)}function mv(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 uO(e){return g1=Cp=1,lO=Hl(rm=e),oi=0,[]}function cO(e){return rm="",e}function mw(e){return sO(cy(oi-1,f2(e===91?e+2:e===40?e+1:e)))}function PIe(e){for(;(ea=ql())&&ea<33;)ki();return mv(e)>2||mv(ea)>3?"":" "}function jIe(e,t){for(;--t&&ki()&&!(ea<48||ea>102||ea>57&&ea<65||ea>70&&ea<97););return cy(e,pw()+(t<6&&ql()==32&&ki()==32))}function f2(e){for(;ki();)switch(ea){case e:return oi;case 34:case 39:e!==34&&e!==39&&f2(ea);break;case 40:e===41&&f2(e);break;case 92:ki();break}return oi}function LIe(e,t){for(;ki()&&e+ea!==57;)if(e+ea===84&&ql()===47)break;return"/*"+cy(t,oi-1)+"*"+m1(e===47?e:ki())}function RIe(e){for(;!mv(ql());)ki();return cy(e,oi)}function _Ie(e){return cO(gw("",null,null,null,[""],e=uO(e),0,[0],e))}function gw(e,t,n,r,a,o,i,l,c){for(var f=0,p=0,g=i,y=0,w=0,T=0,S=1,I=1,M=1,N=0,_="",k=a,R=o,L=r,H=_;I;)switch(T=N,N=ki()){case 40:if(T!=108&&Va(H,g-1)==58){d2(H+=_n(mw(N),"&","&\f"),"&\f")!=-1&&(M=-1);break}case 34:case 39:case 91:H+=mw(N);break;case 9:case 10:case 13:case 32:H+=PIe(T);break;case 92:H+=jIe(pw()-1,7);continue;case 47:switch(ql()){case 42:case 47:H0(BIe(LIe(ki(),pw()),t,n),c);break;default:H+="/"}break;case 123*S:l[f++]=Hl(H)*M;case 125*S:case 59:case 0:switch(N){case 0:case 125:I=0;case 59+p:M==-1&&(H=_n(H,/\f/g,"")),w>0&&Hl(H)-g&&H0(w>32?M4(H+";",r,n,g-1):M4(_n(H," ","")+";",r,n,g-2),c);break;case 59:H+=";";default:if(H0(L=C4(H,t,n,f,p,a,l,_,k=[],R=[],g),o),N===123)if(p===0)gw(H,t,L,L,k,o,g,l,R);else switch(y===99&&Va(H,3)===110?100:y){case 100:case 108:case 109:case 115:gw(e,L,L,r&&H0(C4(e,L,L,0,0,a,l,_,a,k=[],g),R),a,R,g,l,r?k:R);break;default:gw(H,L,L,L,[""],R,0,l,R)}}f=p=w=0,S=M=1,_=H="",g=i;break;case 58:g=1+Hl(H),w=T;default:if(S<1){if(N==123)--S;else if(N==125&&S++==0&&OIe()==125)continue}switch(H+=m1(N),N*S){case 38:M=p>0?1:(H+="\f",-1);break;case 44:l[f++]=(Hl(H)-1)*M,M=1;break;case 64:ql()===45&&(H+=mw(ki())),y=ql(),p=g=Hl(_=H+=RIe(pw())),N++;break;case 45:T===45&&Hl(H)==2&&(S=0)}}return o}function C4(e,t,n,r,a,o,i,l,c,f,p){for(var g=a-1,y=a===0?o:[""],w=OE(y),T=0,S=0,I=0;T<r;++T)for(var M=0,N=pv(e,g+1,g=CIe(S=i[T])),_=e;M<w;++M)(_=sO(S>0?y[M]+" "+N:_n(N,/&\f/g,y[M])))&&(c[I++]=_);return v1(e,t,n,a===0?AE:l,c,f,p)}function BIe(e,t,n){return v1(e,t,n,oO,m1(FIe()),pv(e,2,-2),0)}function M4(e,t,n,r){return v1(e,t,n,FE,pv(e,0,r),pv(e,r+1,-1),r)}function mp(e,t){for(var n="",r=OE(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function HIe(e,t,n,r){switch(e.type){case xIe:if(e.children.length)break;case EIe:case FE:return e.return=e.return||e.value;case oO:return"";case iO:return e.return=e.value+"{"+mp(e.children,r)+"}";case AE:e.value=e.props.join(",")}return Hl(n=mp(e.children,r))?e.return=e.value+"{"+n+"}":""}function YIe(e){var t=OE(e);return function(n,r,a,o){for(var i="",l=0;l<t;l++)i+=e[l](n,r,a,o)||"";return i}}function UIe(e){return function(t){t.root||(t=t.return)&&e(t)}}function zIe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var VIe=function(t,n,r){for(var a=0,o=0;a=o,o=ql(),a===38&&o===12&&(n[r]=1),!mv(o);)ki();return cy(t,oi)},WIe=function(t,n){var r=-1,a=44;do switch(mv(a)){case 0:a===38&&ql()===12&&(n[r]=1),t[r]+=VIe(oi-1,n,r);break;case 2:t[r]+=mw(a);break;case 4:if(a===44){t[++r]=ql()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=m1(a)}while(a=ki());return t},$Ie=function(t,n){return cO(WIe(uO(t),n))},k4=new WeakMap,ZIe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=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&&!k4.get(r))&&!a){k4.set(t,!0);for(var o=[],i=$Ie(n,o),l=r.props,c=0,f=0;c<i.length;c++)for(var p=0;p<l.length;p++,f++)t.props[f]=o[c]?i[c].replace(/&\f/g,l[p]):l[p]+" "+i[c]}}},qIe=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function dO(e,t){switch(kIe(e,t)){case 5103:return Rn+"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 Rn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Rn+e+tb+e+io+e+e;case 6828:case 4268:return Rn+e+io+e+e;case 6165:return Rn+e+io+"flex-"+e+e;case 5187:return Rn+e+_n(e,/(\w+).+(:[^]+)/,Rn+"box-$1$2"+io+"flex-$1$2")+e;case 5443:return Rn+e+io+"flex-item-"+_n(e,/flex-|-self/,"")+e;case 4675:return Rn+e+io+"flex-line-pack"+_n(e,/align-content|flex-|-self/,"")+e;case 5548:return Rn+e+io+_n(e,"shrink","negative")+e;case 5292:return Rn+e+io+_n(e,"basis","preferred-size")+e;case 6060:return Rn+"box-"+_n(e,"-grow","")+Rn+e+io+_n(e,"grow","positive")+e;case 4554:return Rn+_n(e,/([^-])(transform)/g,"$1"+Rn+"$2")+e;case 6187:return _n(_n(_n(e,/(zoom-|grab)/,Rn+"$1"),/(image-set)/,Rn+"$1"),e,"")+e;case 5495:case 3959:return _n(e,/(image-set\([^]*)/,Rn+"$1$`$1");case 4968:return _n(_n(e,/(.+:)(flex-)?(.*)/,Rn+"box-pack:$3"+io+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Rn+e+e;case 4095:case 3583:case 4068:case 2532:return _n(e,/(.+)-inline(.+)/,Rn+"$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(Hl(e)-1-t>6)switch(Va(e,t+1)){case 109:if(Va(e,t+4)!==45)break;case 102:return _n(e,/(.+:)(.+)-([^]+)/,"$1"+Rn+"$2-$3$1"+tb+(Va(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~d2(e,"stretch")?dO(_n(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Va(e,t+1)!==115)break;case 6444:switch(Va(e,Hl(e)-3-(~d2(e,"!important")&&10))){case 107:return _n(e,":",":"+Rn)+e;case 101:return _n(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Rn+(Va(e,14)===45?"inline-":"")+"box$3$1"+Rn+"$2$3$1"+io+"$2box$3")+e}break;case 5936:switch(Va(e,t+11)){case 114:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Rn+e+io+e+e}return e}var GIe=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case FE:t.return=dO(t.value,t.length);break;case iO:return mp([Eg(t,{value:_n(t.value,"@","@"+Rn)})],a);case AE:if(t.length)return AIe(t.props,function(o){switch(NIe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mp([Eg(t,{props:[_n(o,/:(read-\w+)/,":"+tb+"$1")]})],a);case"::placeholder":return mp([Eg(t,{props:[_n(o,/:(plac\w+)/,":"+Rn+"input-$1")]}),Eg(t,{props:[_n(o,/:(plac\w+)/,":"+tb+"$1")]}),Eg(t,{props:[_n(o,/:(plac\w+)/,io+"input-$1")]})],a)}return""})}},JIe=[GIe],KIe=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(S){var I=S.getAttribute("data-emotion");I.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var a=t.stylisPlugins||JIe,o={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var I=S.getAttribute("data-emotion").split(" "),M=1;M<I.length;M++)o[I[M]]=!0;l.push(S)});var c,f=[ZIe,qIe],p,g=[HIe,UIe(function(S){p.insert(S)})],y=YIe(f.concat(a,g)),w=function(I){return mp(_Ie(I),y)};c=function(I,M,N,_){p=N,w(I?I+"{"+M.styles+"}":M.styles),_&&(T.inserted[M.name]=!0)};var T={key:n,sheet:new IIe({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return T.sheet.hydrate(l),T};function QIe(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=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(a){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 XIe={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},eEe=/[A-Z]|^ms/g,tEe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fO=function(t){return t.charCodeAt(1)===45},N4=function(t){return t!=null&&typeof t!="boolean"},WD=zIe(function(e){return fO(e)?e:e.replace(eEe,"-$&").toLowerCase()}),A4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(tEe,function(r,a,o){return Yl={name:a,styles:o,next:Yl},a})}return XIe[t]!==1&&!fO(t)&&typeof n=="number"&&n!==0?n+"px":n};function gv(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 Yl={name:n.name,styles:n.styles,next:Yl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Yl={name:r.name,styles:r.styles,next:Yl},r=r.next;var a=n.styles+";";return a}return nEe(e,t,n);case"function":if(e!==void 0){var o=Yl,i=n(e);return Yl=o,gv(e,t,i)}break}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function nEe(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=gv(e,t,n[a])+";";else for(var o in n){var i=n[o];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=o+"{"+t[i]+"}":N4(i)&&(r+=WD(o)+":"+A4(o,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)N4(i[l])&&(r+=WD(o)+":"+A4(o,i[l])+";");else{var c=gv(e,t,i);switch(o){case"animation":case"animationName":r+=WD(o)+":"+c+";";break;default:r+=o+"{"+c+"}"}}}return r}var F4=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Yl,$D=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var a=!0,o="";Yl=void 0;var i=t[0];i==null||i.raw===void 0?(a=!1,o+=gv(r,n,i)):o+=i[0];for(var l=1;l<t.length;l++)o+=gv(r,n,t[l]),a&&(o+=i[l]);F4.lastIndex=0;for(var c="",f;(f=F4.exec(o))!==null;)c+="-"+f[1];var p=QIe(o)+c;return{name:p,styles:o,next:Yl}},rEe=!0;function hO(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):r+=a+" "}),r}var aEe=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||rEe===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},oEe=function(t,n,r){aEe(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+a:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function O4(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function P4(e,t,n){var r=[],a=hO(e,r,n);return r.length<2?n:a+t(r)}var iEe=function(t){var n=KIe(t);n.sheet.speedy=function(l){this.isSpeedy=l},n.compat=!0;var r=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var g=$D(f,n.registered,void 0);return oEe(n,g,!1),n.key+"-"+g.name},a=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var g=$D(f,n.registered),y="animation-"+g.name;return O4(n,{name:g.name,styles:"@keyframes "+y+"{"+g.styles+"}"}),y},o=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var g=$D(f,n.registered);O4(n,g)},i=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];return P4(n.registered,r,sEe(f))};return{css:r,cx:i,injectGlobal:o,keyframes:a,hydrate:function(c){c.forEach(function(f){n.inserted[f]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hO.bind(null,n.registered),merge:P4.bind(null,n.registered,r)}},sEe=function e(t){for(var n="",r=0;r<t.length;r++){var a=t[r];if(a!=null){var o=void 0;switch(typeof a){case"boolean":break;case"object":if(Array.isArray(a))o=e(a);else{o="";for(var i in a)a[i]&&i&&(o&&(o+=" "),o+=i)}break;default:o=a}o&&(n&&(n+=" "),n+=o)}}return n},lEe=ly,PE=Date.prototype,j4="Invalid Date",pO="toString",uEe=PE[pO],cEe=PE.getTime;String(new Date(NaN))!=j4&&lEe(PE,pO,function(){var t=cEe.call(this);return t===t?uEe.call(this):j4});var dEe=ME,fEe=LF,hEe=dEe?{}.toString:function(){return"[object "+fEe(this)+"]"},pEe=ME,mEe=ly,gEe=hEe;pEe||mEe(Object.prototype,"toString",gEe,{unsafe:!0});var vEe=xE.PROPER,yEe=ly,wEe=sd,L4=p1,bEe=$s,SEe=RF,jE="toString",mO=RegExp.prototype,gO=mO[jE],DEe=bEe(function(){return gO.call({source:"a",flags:"b"})!="/a/b"}),TEe=vEe&&gO.name!=jE;(DEe||TEe)&&yEe(RegExp.prototype,jE,function(){var t=wEe(this),n=L4(t.source),r=t.flags,a=L4(r===void 0&&t instanceof RegExp&&!("flags"in mO)?SEe.call(t):r);return"/"+n+"/"+a},{unsafe:!0});var R4=typeof window<"u"?window:self,IEe=R4.crypto||R4.msCrypto,EEe=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}}(IEe);const xEe=qt(EEe);function CEe(){return xEe().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var MEe=Q9;const _4=qt(MEe);function Vn(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 B4(e,t){for(var n,r,a=arguments.length,o=new Array(a>2?a-2:0),i=2;i<a;i++)o[i-2]=arguments[i];return Dr(n=[Dr(r="%c".concat(e,"%c ")).call(r,t)]).call(n,En(Vn("green","white")),o)}function kEe(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 a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];if(o.length){var l=o,c=Bl(l,1),f=c[0];typeof f=="function"&&(o=f());var p=_4(o[0])?o:[o],g=p.length===1;eb(p).call(p,function(y,w){if(g){var T,S;(T=console).log.apply(T,En(B4.apply(void 0,Dr(S=[e]).call(S,En(y)))))}else if(w){var I;(I=console).log.apply(I,En(_4(y)?y:[y]))}else{var M,N;(M=console).groupCollapsed.apply(M,En(B4.apply(void 0,Dr(N=[e]).call(N,En(y)))))}}),g||console.groupEnd()}}:function(){return 0}}var NEe=Of,AEe=xE.EXISTS,FEe=sy.f,vO=Function.prototype,OEe=vO.toString,PEe=/^\s*function ([^ (]*)/,jEe="name";NEe&&!AEe&&FEe(vO,jEe,{configurable:!0,get:function(){try{return OEe.call(this).match(PEe)[1]}catch{return""}}});var LEe=qa,REe=LEe.setTimeout,_Ee=REe;const BEe=qt(_Ee);function HEe(e,t){if(!t)return e;var n=0,r=null;return function(){for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];var l=Kc();l-n>t?(e.apply(void 0,o),n=l):(clearTimeout(r),r=BEe(function(){e.apply(void 0,o),n=Kc()},Math.max(0,t-l+n)))}}var yO=function(t){var n=t.debounce,r=t.name,a=t.onEvent,o=t.target,i=P.useRef();i.current=a;var l=P.useMemo(function(){return HEe(function(f){var p=i.current;p&&p(f)},n)},[n,i]),c=P.useCallback(function(f){f.timeStampLow=Kc(),l(f)},[l]);return P.useLayoutEffect(function(){return o.addEventListener(r,c,{passive:!0}),c({target:o,type:r}),function(){return o.removeEventListener(r,c)}},[r,c,o]),!1};yO.defaultProps={debounce:200};var YEe=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},UEe=Gn,zEe=YEe;UEe({target:"Math",stat:!0},{sign:zEe});var VEe=qa,WEe=VEe.Math.sign,$Ee=WEe,ZEe=$Ee,qEe=ZEe;const GEe=qt(qEe);function JEe(e,t){var n=GEe(t-e),r=Math.sqrt(Math.abs(t-e)),a=e+r*n;return n>0?Math.min(t,a):Math.max(t,a)}function KEe(e,t,n,r){for(var a=e,o=0;o<r;o++)a=n(a,t);return a}var wO=function(t){var n=t.name,r=t.onEnd,a=t.target,o=t.value,i=P.useRef(),l=P.useCallback(function(f,p,g,y){var w=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Kc();(g==="100%"||typeof g=="number")&&(cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){if(a){var T=g==="100%"?a.scrollHeight-a.offsetHeight:g,S=KEe(p,T,JEe,(Kc()-w)/5);Math.abs(T-S)<1.5&&(S=T),a[f]=S,T===S?r&&r(!0):l(f,p,g,y+1,w)}}))},[i,r,a]),c=P.useCallback(function(){cancelAnimationFrame(i.current),r&&r(!1)},[r]);return P.useLayoutEffect(function(){return l(n,a[n],o,1),a?(a.addEventListener("pointerdown",c,{passive:!0}),a.addEventListener("wheel",c,{passive:!0}),function(){a.removeEventListener("pointerdown",c),a.removeEventListener("wheel",c),cancelAnimationFrame(i.current)}):function(){return cancelAnimationFrame(i.current)}},[l,i,c,n,a,o]),!1};wO.propTypes={name:Mn.string.isRequired,onEnd:Mn.func,target:Mn.any.isRequired,value:Mn.oneOfType([Mn.number,Mn.oneOf(["100%"])]).isRequired};function ZD(e){var t=P.useState(e),n=Bl(t,2),r=n[0],a=n[1],o=P.useRef(),i=P.useCallback(function(l){typeof l=="function"?i(function(c){return l=l(c),o.current=l,l}):(o.current=l,i(l))},[o]);return o.current=r,[r,a,o]}function H4(e,t){var n=y2e(e);if(I4){var r=I4(e);t&&(r=L2e(r).call(r,function(a){return nO(e,a).enumerable})),n.push.apply(n,r)}return n}function Y4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;eb(r=H4(Object(n),!0)).call(r,function(o){hwe(e,o,n[o])})}else if(E4)wIe(e,E4(n));else{var a;eb(a=H4(Object(n))).call(a,function(o){SIe(e,o,nO(n,o))})}}return e}var QEe=function(){return 1/0},U4=17,XEe="bottom",Ls="top",z4=1,exe=34,V4={};function txe(e,t){return e(),WDe(e,t)}function W4(e){var t=e.mode,n=e.target,r=n.offsetHeight,a=n.scrollHeight,o=n.scrollTop,i=a-o-r<z4,l=o<z4,c=t===Ls?l:i,f=t!==Ls?l:i;return{atBottom:i,atEnd:c,atStart:f,atTop:l}}function xg(e,t){return e===(t===Ls?0:"100%")}var LE=function(t){var n=t.checkInterval,r=t.children,a=t.debounce,o=t.debug,i=t.initialScrollBehavior,l=t.mode,c=t.nonce,f=t.scroller,p=P.useMemo(function(){return kEe("<ScrollToBottom>",{force:o})},[o]);l=l===Ls?Ls:XEe;var g=P.useRef(0),y=P.useRef(i),w=ZD(l===Ls?0:"100%"),T=Bl(w,3),S=T[0],I=T[1],M=T[2],N=ZD(null),_=Bl(N,3),k=_[0],R=_[1],L=_[2],H=P.useRef(0),U=P.useRef(0),z=P.useRef(0),$=P.useState(!0),X=Bl($,2),Q=X[0],se=X[1],ue=P.useState(!0),fe=Bl(ue,2),Z=fe[0],pe=fe[1],ie=P.useState(!0),de=Bl(ie,2),K=de[0],ae=de[1],Se=P.useState(!1),je=Bl(Se,2),Re=je[0],Fe=je[1],Be=ZD(!0),Qe=Bl(Be,3),Ze=Qe[0],st=Qe[1],xt=Qe[2],tn=P.useRef([]),_e=P.useCallback(function(pt){var Mt=L.current;return tn.current.push(pt),Mt&&pt({scrollTop:Mt.scrollTop}),function(){var Jt=tn.current,on=iTe(Jt).call(Jt,pt);~on&&NTe(Jt).call(Jt,on,1)}},[tn,L]),Xe=P.useCallback(function(){var pt=M.current;p(function(){var Mt;return Dr(Mt=["%cSpineTo%c: %conEnd%c is fired."]).call(Mt,En(Vn("magenta")),En(Vn("orange")),[{animateTo:pt}])}),g.current=Kc(),xg(pt,l)||st(!1),I(null)},[M,p,g,l,I,st]),tt=P.useCallback(function(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Jt=Mt.behavior,on=L.current;if(typeof pt!="number"&&pt!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');p(function(){var ln;return[Dr(ln=["%cscrollTo%c: Will scroll to %c".concat(typeof pt=="number"?pt+"px":pt.replace(/%/g,"%%"),"%c")]).call(ln,En(Vn("lime","")),En(Vn("purple"))),{behavior:Jt,nextAnimateTo:pt,target:on}]}),Jt==="auto"?(Xe(),on&&(on.scrollTop=pt==="100%"?on.scrollHeight-on.offsetHeight:pt)):(Jt!=="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.'),I(pt)),xg(pt,l)&&(p(function(){var ln;return[Dr(ln=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ln,En(Vn("lime","")),En(Vn("purple"))),[{mode:l,nextAnimateTo:pt}]]}),st(!0))},[p,Xe,l,I,st,L]),ht=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;p(function(){var Jt;return Dr(Jt=["%cscrollToBottom%c: Called"]).call(Jt,En(Vn("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.'),tt("100%",{behavior:Mt||"smooth"})},[p,tt]),St=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;p(function(){var Jt;return Dr(Jt=["%cscrollToTop%c: Called"]).call(Jt,En(Vn("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.'),tt(0,{behavior:Mt||"smooth"})},[p,tt]),Tt=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;p(function(){var on;return Dr(on=["%cscrollToEnd%c: Called"]).call(on,En(Vn("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 Jt={behavior:Mt||"smooth"};l===Ls?St(Jt):ht(Jt)},[p,l,ht,St]),Gt=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;p(function(){var on;return Dr(on=["%cscrollToStart%c: Called"]).call(on,En(Vn("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 Jt={behavior:Mt||"smooth"};l===Ls?ht(Jt):St(Jt)},[p,l,ht,St]),_t=P.useCallback(function(){var pt=L.current;if(pt){if(y.current==="auto"){p(function(){var Lr;return Dr(Lr=["%ctarget changed%c: Initial scroll"]).call(Lr,En(Vn("blue")))}),pt.scrollTop=l===Ls?0:pt.scrollHeight-pt.offsetHeight,y.current=!1;return}var Mt=H.current,Jt=pt.offsetHeight,on=pt.scrollHeight,ln=pt.scrollTop,vr=l===Ls?0:Math.max(0,on-Jt-ln),fr=Math.max(0,Mt-ln),ha=f({maxValue:vr,minValue:fr,offsetHeight:Jt,scrollHeight:on,scrollTop:ln}),jr=Math.max(0,Math.min(vr,ha)),nr;l===Ls||jr!==vr?nr=ln+jr:nr="100%",p(function(){var Lr,te,me;return[Dr(Lr=[Dr(te=Dr(me="%cscrollToSticky%c: Will animate from %c".concat(Mt,"px%c to %c")).call(me,typeof nr=="number"?nr+"px":nr.replace(/%/g,"%%"),"%c (%c")).call(te,(nr==="100%"?vr:nr)+Mt,"px%c)")]).call(Lr,En(Vn("orange")),En(Vn("purple")),En(Vn("purple")),En(Vn("purple"))),{animateFrom:Mt,maxValue:vr,minValue:fr,nextAnimateTo:nr,nextValue:jr,offsetHeight:Jt,rawNextValue:ha,scrollHeight:on,scrollTop:ln}]}),tt(nr,{behavior:"smooth"})}},[H,p,l,f,tt,L]),Vt=P.useCallback(function(pt){var Mt,Jt=pt.timeStampLow,on=M.current,ln=L.current,vr=on!==null;if(!(Jt<=g.current||!ln)){var fr=W4({mode:l,target:ln}),ha=fr.atBottom,jr=fr.atEnd,nr=fr.atStart,Lr=fr.atTop;se(ha),pe(jr),Fe(nr),ae(Lr);var te=ln.offsetHeight,me=ln.scrollHeight,Ce=U.current,Ye=z.current,He=te!==Ce,Ke=me!==Ye;if(He&&(U.current=te),Ke&&(z.current=me),!He&&!Ke){var et=vr&&xg(on,l)||jr;xt.current!==et&&(p(function(){var Yt,On,vn,xr;return[Dr(Yt=["%conScroll%c: %csetSticky%c(%c".concat(et,"%c)")]).call(Yt,En(Vn("red")),En(Vn("red")),En(Vn("purple"))),Dr(On=[Dr(vn=Dr(xr="(animating = %c".concat(vr,"%c && isEnd = %c")).call(xr,xg(on,l),"%c) || atEnd = %c")).call(vn,jr,"%c")]).call(On,En(Vn("purple")),En(Vn("purple")),En(Vn("purple")),[{animating:vr,animateTo:on,atEnd:jr,mode:l,offsetHeight:ln.offsetHeight,scrollHeight:ln.scrollHeight,sticky:xt.current,nextSticky:et}])]}),st(et))}else xt.current&&(p(function(){var Yt;return[Dr(Yt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(Yt,En(Vn("red")),En(Vn("orange")),[{offsetHeightChanged:He,scrollHeightChanged:Ke}]),{nextOffsetHeight:te,prevOffsetHeight:Ce,nextScrollHeight:me,prevScrollHeight:Ye}]}),_t());var kt=ln.scrollTop;eb(Mt=tn.current).call(Mt,function(Yt){return Yt({scrollTop:kt})})}},[M,p,g,l,U,z,tn,_t,se,pe,Fe,ae,st,xt,L]);P.useEffect(function(){if(k){var pt=!1,Mt=txe(function(){var Jt=L.current,on=M.current!==null;xt.current?W4({mode:l,target:Jt}).atEnd?pt=!1:pt?Kc()-pt>exe&&(on||(H.current=Jt.scrollTop,p(function(){var ln;return Dr(ln=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ln,En(Vn("navy")),En(Vn("orange")))}),_t()),pt=!1):pt=Kc():Jt.scrollHeight<=Jt.offsetHeight&&!xt.current&&(p(function(){var ln;return[Dr(ln=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ln,En(Vn("navy")),En(Vn("purple"))),[{offsetHeight:Jt.offsetHeight,scrollHeight:Jt.scrollHeight,sticky:xt.current}]]}),st(!0))},Math.max(U4,n)||U4);return function(){return clearInterval(Mt)}}},[M,n,p,l,_t,st,xt,k,L]);var Xt=P.useMemo(function(){var pt=V4[c]||(V4[c]=iEe({key:"react-scroll-to-bottom--css-"+CEe(),nonce:c}));return function(Mt){return pt.css(Mt)+""}},[c]),dn=P.useMemo(function(){return{observeScrollPosition:_e,setTarget:R,styleToClassName:Xt}},[_e,R,Xt]),en=P.useMemo(function(){return{atBottom:Q,atEnd:Z,atStart:Re,atTop:K,mode:l}},[Q,Z,Re,K,l]),Zn=P.useMemo(function(){var pt=S!==null;return{animating:pt,animatingToEnd:pt&&xg(S,l),sticky:Ze}},[S,l,Ze]),kn=P.useMemo(function(){return Y4(Y4({},en),Zn)},[en,Zn]),Er=P.useMemo(function(){return{scrollTo:tt,scrollToBottom:ht,scrollToEnd:Tt,scrollToStart:Gt,scrollToTop:St}},[tt,ht,Tt,Gt,St]);return P.useEffect(function(){if(k){var pt=function(){z.current=k.scrollHeight};return k.addEventListener("focus",pt,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",pt)}}},[k]),p(function(){var pt;return[Dr(pt=["%cRender%c: Render"]).call(pt,En(Vn("cyan",""))),{animateTo:S,animating:S!==null,sticky:Ze,target:k}]}),ne.createElement(u1.Provider,{value:dn},ne.createElement(fE.Provider,{value:Er},ne.createElement(mE.Provider,{value:kn},ne.createElement(hE.Provider,{value:en},ne.createElement(pE.Provider,{value:Zn},r,k&&ne.createElement(yO,{debounce:a,name:"scroll",onEvent:Vt,target:k}),k&&S!==null&&ne.createElement(wO,{name:"scrollTop",onEnd:Xe,target:k,value:S}))))))};LE.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:QEe};LE.propTypes={checkInterval:Mn.number,children:Mn.any,debounce:Mn.number,debug:Mn.bool,initialScrollBehavior:Mn.oneOf(["auto","smooth"]),mode:Mn.oneOf(["bottom","top"]),nonce:Mn.string,scroller:Mn.func};var nxe={height:"100%",overflowY:"auto",width:"100%"},RE=function(t){var n=t.children,r=t.className,a=P.useContext(u1),o=a.setTarget,i=gE()(nxe);return ne.createElement("div",{className:dE(i,(r||"")+""),ref:o},n)};RE.defaultProps={children:void 0,className:void 0};RE.propTypes={children:Mn.any,className:Mn.string};var rxe={position:"relative"},_E=function(t){var n=t.children,r=t.className,a=t.followButtonClassName,o=t.scrollViewClassName,i=gE()(rxe);return ne.createElement("div",{className:dE(i,(r||"")+"")},ne.createElement(RE,{className:(o||"")+""},n),ne.createElement(vE,{className:(a||"")+""}))};_E.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0};_E.propTypes={children:Mn.any,className:Mn.string,followButtonClassName:Mn.string,scrollViewClassName:Mn.string};var BE=function(t){var n=t.checkInterval,r=t.children,a=t.className,o=t.debounce,i=t.debug,l=t.followButtonClassName,c=t.initialScrollBehavior,f=t.mode,p=t.nonce,g=t.scroller,y=t.scrollViewClassName;return ne.createElement(LE,{checkInterval:n,debounce:o,debug:i,initialScrollBehavior:c,mode:f,nonce:p,scroller:g},ne.createElement(_E,{className:a,followButtonClassName:l,scrollViewClassName:y},r))};BE.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};BE.propTypes={checkInterval:Mn.number,children:Mn.any,className:Mn.string,debounce:Mn.number,debug:Mn.bool,followButtonClassName:Mn.string,initialScrollBehavior:Mn.oneOf(["auto","smooth"]),mode:Mn.oneOf(["bottom","top"]),nonce:Mn.string,scroller:Mn.func,scrollViewClassName:Mn.string};function axe(){var e=l1(),t=e.scrollToBottom;return t}function oxe(){var e=l1(),t=e.scrollToStart;return t}function ixe(){var e=l1(),t=e.scrollToTop;return t}Fue();const sxe=e=>{const{locationState:{query:t},globalState:{memoListView:n,manifest:r},dailyNotesState:{app:a,settings:o}}=P.useContext(Lt),{thinos:i}=e,[l,c]=ne.useState(vv(i,"day")),f=ne.useRef(null),p=axe(),g=P.useRef([]);P.useRef(0),P.useEffect(()=>{const T=vv(i,"day");Sw.isEqual(T,l)||c(T)},[i]),P.useEffect(()=>{var N,_;if(Sw.isEqual(g.current,i))return;const T=i.filter(k=>k.pinned),S=i.filter(k=>!k.pinned),I=g.current.filter(k=>k.pinned)[0],M=g.current.filter(k=>!k.pinned)[0];(I&&I.id!==((N=T[0])==null?void 0:N.id)||M&&M.id!==((_=S[0])==null?void 0:_.id))&&p()},[i]),P.useEffect(()=>{f.current&&p()},[t]);const y=P.useCallback(()=>{a.setting.open(),a.setting.openTabById(r.id||"obsidian-memos")},[a]),w=P.useMemo(()=>v.jsx(v.Fragment,{children:Object.keys(l).map((T,S)=>v.jsx(v.Fragment,{children:v.jsx(lxe,{thinos:l[T],dayMark:T,handleOpenSettings:y},T+S)}))}),[l]);return v.jsx("div",{ref:f,className:ar("chat-view",`${o==null?void 0:o.chatViewStyle}-style`),children:w})},lxe=({thinos:e,dayMark:t,handleOpenSettings:n})=>{const{dailyNotesState:{settings:r,app:a}}=P.useContext(Lt),[o,i]=ne.useState(!0),l=ne.useRef(null),[c,f]=ne.useState(r==null?void 0:r.MomentsIcon);P.useEffect(()=>{if(!(r!=null&&r.MomentsIcon)||!a)return;const w=a.vault.adapter.getResourcePath(C.normalizePath(r.MomentsIcon));w&&!(r!=null&&r.MomentsIcon.startsWith("http"))?f(w):f(r==null?void 0:r.MomentsIcon)},[r==null?void 0:r.MomentsIcon]);const p=w=>{if(C.Keymap.isModifier(w.nativeEvent,"Mod")){const T=C.moment(t,"YYYY-MM-DD");ot.setFromAndToQuery(T.startOf("day").valueOf(),T.endOf("day").valueOf());return}i(!o),l.current.scrollIntoView(!0)},g=w=>{Hp(w)},y=P.useMemo(()=>e.map((w,T)=>v.jsxs("div",{className:"thino-bubble right",children:[v.jsx(uxe,{icon:c,handleOpenSettings:n}),v.jsx("div",{className:"wrap",children:v.jsx(cxe,{thino:w,handleClickTimeStamp:g},`${w.id}-${C.moment(w.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${T}`)})]},w.id+T)),[e,c]);return v.jsxs(v.Fragment,{children:[o&&y,v.jsx("div",{className:`thino-chat-day-mark day-mark ${o?"":"folded"}`,onClick:p,children:v.jsx("div",{className:"day-mark-bubble",children:(t==="PINNED"?t+" 📌":t)+(o?"":"...")})})]})},uxe=({icon:e,handleOpenSettings:t})=>v.jsx("div",{ref:n=>{if(e){n==null||n.empty();return}e||n&&C.setIcon(n,"Memos")},className:"icon-img",style:{backgroundImage:`url("${e}")`}}),cxe=({thino:e,handleClickTimeStamp:t})=>{const n=P.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const o=await be.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");o&&be.editMemo(o)},[e]),r=P.useMemo(()=>v.jsxs("div",{className:"content",children:[v.jsx("div",{className:"time-stamp","data-date":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),v.jsx(ai,{memo:e})]}),[e.content]),a=P.useMemo(()=>{var o;return v.jsxs("div",{className:"content task",children:[v.jsx("div",{className:"task-inputer",children:v.jsx("input",{className:ar("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":(o=e.thinoType)==null?void 0:o.slice(5),onClick:n})}),v.jsx("div",{className:"time-stamp","data-date":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),v.jsx(ai,{memo:e})]})},[e.content,e.thinoType]);return e.thinoType==="JOURNAL"?r:a},dxe=3e3;function fxe({statusRef:e,isComplete:t,handleFetchMoreClick:n,cachedMemos:r}){P.useEffect(()=>{const a=e.current;if(!a)return;const o=fb.throttle(async()=>{await n()},dxe,{trailing:!1}),i=new IntersectionObserver(([l])=>{l.isIntersecting&&!t&&o()});return i.observe(a),()=>{i.unobserve(a),o.cancel()}},[t,e,n]),P.useEffect(()=>{r.length<40&&!t&&n()},[r.length,t,n])}function vv(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(a=>{const o=a.pinned?"PINNED":C.moment(a.createdAt,"YYYY/MM/DD HH:mm:ss").format(r[t]);n[o]||(n[o]=[]),n[o].push(a)}),n}function bO(e){return e.slice().sort((t,n)=>t.pinned!==n.pinned?t.pinned?-1:1:C.moment(t.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss"))?-1:1)}function hxe(e,t){if(e.length===0)return t;const n=new Map(t.map(i=>[i.id,i])),r=[],a=e.reduce((i,l)=>{if(n.has(l.id)){const c=n.get(l.id);Sw.isEqual(l,c)?i.push(l):i.push({...c}),n.delete(l.id)}return i},[]);n.forEach(i=>r.push(i));const o=a.concat(r);return bO(o)}function Y0(e){const{tag:t,duration:n,type:r,text:a,filter:o}=e,i=sn.getQueryById(o);return!(!!(t||n&&n.from<n.to||r||a||i)||i)}function pxe(e){return[$r,ua,Wa].reduce((n,r)=>((e.match(r)||[]).forEach(a=>{const i=a.replace(r,"$1").trim().split("/");let l="";i.forEach(c=>{l+=c,n.add(l),l+="/"})}),n),new Set)}const mxe=({tempMemos:e,query:t,HideDoneTasks:n})=>{const r=e.filter(y=>y.rowStatus!=="ARCHIVED"&&!y.deletedAt),{tag:a,duration:o,type:i,text:l,filter:c}=t,f=sn.getQueryById(c),p=l.toLowerCase();return!!(a||o&&o.from<o.to||i||l||f!=null&&f.id)?r.filter(y=>{if(y.content.contains("comment:")||n&&y.thinoType==="TASK-DONE")return!1;if(f){const w=JSON.parse(f.querystring);if(Array.isArray(w)&&!Bp(y,w))return!1}if(a&&!pxe(y.content).has(a)||o&&o.from!==0&&o.to!==0&&(ut.getTimeStampByDate(y.createdAt)<o.from||ut.getTimeStampByDate(y.createdAt)>o.to))return!1;if(i)switch(i){case"NOT_TAGGED":if(y.content.match($r)||y.content.match(Wa)||y.content.match(ua))return!1;break;case"LINKED":if(!y.content.match(Cf))return!1;break;case"IMAGED":if(!y.content.match(Mf))return!1;break;case"CONNECTED":if(!y.content.match(nd))return!1;break}return!!y.content.toLowerCase().includes(p)}):r},gxe=({updateThinos:e,listView:t})=>{const{locationState:{query:n},memoState:{memos:r},dailyNotesState:{app:a,settings:o}}=P.useContext(Lt),i=ixe(),l=oxe(),[c,f]=P.useState(!1),[p,g]=P.useState(!1),[y,w,T]=Co([]),[S,I]=P.useState([]),[M,N]=P.useState({}),[_,k]=P.useState((a==null?void 0:a.loadLocalStorage("showDayMark"))||!1),[R,L]=P.useState((a==null?void 0:a.loadLocalStorage("dayMarkRange"))||"day"),[H,U,z]=Co([]),$=P.useRef(null),X=P.useRef(null),Q=P.useRef(null),se=P.useRef(!1);P.useEffect(()=>{l(),w(H.slice(0,y.length>20?Math.min(y.length,20):20))},[t]),P.useEffect(()=>()=>{X.current&&(X.current=null),Q.current&&(Q.current=null)},[]),P.useLayoutEffect(()=>{if(r.length!==0&&se.current===!0)return;const ie=vxe(a||window.app);!ie||ie.length===0||(U(ie),I(ie),k((a==null?void 0:a.loadLocalStorage("showDayMark"))||!1),a!=null&&a.loadLocalStorage("showDayMark")&&N(vv(ie,(a==null?void 0:a.loadLocalStorage("dayMarkRange"))||"day")))},[]),P.useEffect(()=>{if(r.length===0&&!be.initialized)return;f(!1);const ie=bO(r),de=mxe({tempMemos:ie,query:n,HideDoneTasks:(o==null?void 0:o.HideDoneTasks)||!1});return se.current=!0,e&&e(de),U(de),()=>{se.current=!1}},[r,n,o==null?void 0:o.HideDoneTasks]),P.useEffect(()=>{const de=H.slice(0,y.length>20?Math.min(y.length,20):20);w(K=>hxe(K,de))},[H]),P.useEffect(()=>{var ie;y.length<20&&((ie=Q.current)==null||ie.click())},[H]),P.useEffect(()=>{(Y0(n)&&y.length<H.length||y.length<H.length&&!Y0(n))&&g(!1),(Y0(n)&&y.length===r.length&&r.length>0||!Y0(n)&&y.length===H.length&&H.length>0)&&g(!0),yxe(y||[],a),I(y),a==null||a.saveLocalStorage("showDayMark",o==null?void 0:o.showDayMark),a==null||a.saveLocalStorage("dayMarkRange",o==null?void 0:o.dayMarkRange),k((o==null?void 0:o.showDayMark)||!1),L((o==null?void 0:o.dayMarkRange)||"day"),o!=null&&o.showDayMark&&N(vv(y,(o==null?void 0:o.dayMarkRange)||"day"))},[y,o==null?void 0:o.showDayMark,o==null?void 0:o.dayMarkRange]),P.useEffect(()=>{i()},[n]);const ue=async()=>{try{if(z.current.length>T.current.length){f(!0);const ie=Math.min(T.current.length+20,z.current.length)-T.current.length,de=z.current.slice(T.current.length,T.current.length+ie);w(K=>[...K,...de]),f(!1),g(de.length<20)}}catch(ie){console.error(ie),new C.Notice(ie.response.data.message)}};fxe({statusRef:X,isComplete:p,handleFetchMoreClick:ue,cachedMemos:y});const fe=P.useMemo(()=>v.jsx("div",{ref:X,className:ar("status-text-container",t==="calendar"||t==="table"?"hidden":""),children:v.jsx("p",{className:"status-text",children:c?E("Fetching data..."):p?H.length===0?E("Noooop!"):E("All Data is Loaded 🎉"):v.jsx(v.Fragment,{children:v.jsx("span",{ref:Q,className:"cursor-pointer hover:text-green-600",onClick:ue,children:E("fetch more")})})})}),[t,ue,H,c,p,X]),Z=ie=>{switch(ie){case"list":return v.jsx(Ow,{breakpointCols:1,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:_?v.jsx(v.Fragment,{children:Object.keys(M).sort((de,K)=>K-de).map(de=>v.jsx(DT,{type:"list",thinos:M[de],dayMark:de,dayMarkRange:R},de))}):S.map((de,K)=>v.jsx(ai,{memo:de},`${de.id}-${K}`))});case"waterfall":return v.jsx(v.Fragment,{children:_&&Object.keys(M).length>0?Object.keys(M).map(de=>v.jsx(DT,{type:"waterfall",thinos:M[de],dayMark:de,dayMarkRange:R},de)):v.jsx(Ow,{breakpointCols:3,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:S.map((de,K)=>v.jsx(ai,{memo:de},`${de.id}-${K}`))})});case"chat":return v.jsx(sxe,{thinos:S});case"calendar":return v.jsx(ble,{thinos:H});case"table":return v.jsx(Mue,{thinos:H});case"moments":return v.jsx(bxe,{thinos:S})}},pe=ie=>{switch(ie){case"top":return t==="chat"&&fe;case"bottom":return t!=="chat"&&fe}};return v.jsxs(BE,{className:`memolist-wrapper ${p?"completed":""} `,mode:t==="chat"?"bottom":"top",initialScrollBehavior:"auto",checkInterval:30,followButtonClassName:ar("scroll-to-bottom-button",t==="chat"?"to-bottom":"to-top"),scrollViewClassName:"memolist-scrollview",children:[pe("top"),v.jsx("div",{ref:$,className:"memolist-container",children:Z(t)}),pe("bottom")]})};function SO(e){return`memosListCache:${e}`}function vxe(e){var t;try{const n=SO(e==null?void 0:e.appId),r=la.get([n])[n];return r?((t=JSON.parse(r))==null?void 0:t.memos)||[]:[]}catch(n){return console.error(n),[]}}function yxe(e,t){try{if(!e)return;const n=e==null?void 0:e.slice(0,100),r=SO(t==null?void 0:t.appId);la.set({[r]:JSON.stringify({memos:n})})}catch(n){console.error(n)}}const wxe=({userIcon:e})=>v.jsx("div",{className:"moments-view-user-icon",ref:t=>{if(e){t==null||t.empty();return}e||t&&C.setIcon(t,"Memos")},style:{backgroundImage:`url("${e}")`}}),h2="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=",vw="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=",bxe=e=>{const{globalState:{memoListView:t,markMemoId:n,manifest:r,editMemoId:a},dailyNotesState:{app:o,settings:i}}=P.useContext(Lt),{thinos:l}=e,c=ne.useRef(null),f=ne.useRef(null),[p,g]=ne.useState(!1),[y,w]=P.useState({}),[T,S]=P.useState((o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day"),[I,M]=ne.useState(i==null?void 0:i.MomentsIcon);P.useEffect(()=>{if(!(i!=null&&i.MomentsIcon)||!o)return;const _=o.vault.adapter.getResourcePath(C.normalizePath(i.MomentsIcon));_&&!(i!=null&&i.MomentsIcon.startsWith("http"))?M(_):M(i==null?void 0:i.MomentsIcon)},[i==null?void 0:i.MomentsIcon,o]),P.useEffect(()=>{i!=null&&i.showDayMark&&w(vv(l,(o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day"))},[l]),P.useEffect(()=>{c.current.closest(".workspace-window")&&g(!0)},[c.current]),P.useEffect(()=>{n&&g(!0)},[n]),P.useEffect(()=>{a?(g(!0),setTimeout(()=>{o.workspace.trigger("focus-on-textarea")},200)):g(!1)},[a]),P.useEffect(()=>{f.current&&(!p&&C.setIcon(f.current,"camera"),p&&C.setIcon(f.current,"camera-off"))},[f.current,p]);const N=P.useCallback(()=>{o.setting.open(),o.setting.openTabById(r.id||"obsidian-memos")},[o]);return v.jsxs("div",{ref:c,className:ar("moments-view",p?"show-editor":""),children:[v.jsxs("div",{className:"moments-view-background-wrapper",children:[v.jsx(Sxe,{}),v.jsx("div",{ref:f,className:"moments-show-editor-btn",onClick:()=>{a&&p||((p||a)&&g(!p),!p&&!a&&new q6(o).open())}}),v.jsxs("div",{className:"moments-view-background-overlay",children:[v.jsxs("div",{className:"moments-view-user-info",children:[v.jsx("div",{className:"moments-view-user-name",children:i==null?void 0:i.UserName}),v.jsx(wxe,{userIcon:I})]}),v.jsx("div",{className:"moments-view-user-idea",children:i.MomentsQuote||" "})]})]}),i!=null&&i.showDayMark?y&&Object.keys(y).length>0&&Object.keys(y).map((_,k)=>v.jsx(DT,{type:"list",thinos:y[_],dayMark:_,dayMarkRange:T,thinoWrapper:R=>v.jsx($4,{thino:R.thino,handleOpenSettings:N},R.thino.createdAt+k)},_)):l.map((_,k)=>v.jsx($4,{thino:_,handleOpenSettings:N},_.createdAt+k))]})},Sxe=()=>{const{dailyNotesState:{app:e,view:t,settings:n}}=P.useContext(Lt),[r,a]=P.useState((n==null?void 0:n.MomentsBackgroundImage)||vw);return P.useEffect(()=>{if(!(n!=null&&n.MomentsBackgroundImage)||!e){a(document.body.hasClass("theme-dark")?h2:vw);return}const o=e.vault.adapter.getResourcePath(C.normalizePath(n.MomentsBackgroundImage));o&&!(n!=null&&n.MomentsBackgroundImage.startsWith("http"))?a(o):a(n==null?void 0:n.MomentsBackgroundImage)},[n==null?void 0:n.MomentsBackgroundImage,e]),P.useEffect(()=>{t&&t.registerEvent(t.app.workspace.on("css-change",()=>{a(document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?h2:!document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?vw:n==null?void 0:n.MomentsBackgroundImage)}))},[t]),v.jsx("div",{className:"moments-view-background",style:{backgroundImage:`url("${r}")`}})},Dxe=e=>{const{icon:t}=e,n=P.useCallback(()=>{app.setting.open(),app.setting.openTabById(manifest.id||"obsidian-memos")},[]);return v.jsx("div",{className:"thino-moment-icon",ref:r=>{if(t){r==null||r.empty();return}t||r&&C.setIcon(r,"Memos")},style:{backgroundImage:`url("${t}")`},onClick:n})},$4=e=>{const{dailyNotesState:{settings:t,app:n}}=P.useContext(Lt),r=P.useRef(null),a=P.useRef(null),{thino:o}=e,[i,l]=P.useState("");return P.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n)return;const c=n.vault.adapter.getResourcePath(C.normalizePath(t.MomentsIcon));c&&!(t!=null&&t.MomentsIcon.startsWith("http"))?l(c):l(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),P.useEffect(()=>{r.current&&C.setIcon(r.current,"more-horizontal")},[r.current]),v.jsxs("div",{className:"thino-moment-wrapper",children:[v.jsx(Dxe,{icon:i}),v.jsxs("div",{ref:a,className:"thino-moment-container",children:[v.jsx("div",{className:"thino-moment-user-name",children:t==null?void 0:t.UserName}),v.jsx("div",{className:"thino-moment-user-content",children:v.jsx(ai,{memo:o})})]})]})},Txe='<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>',Ixe='<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>',Z4=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r);for(let o=0;o<n.length;o++)a[o]=n.charCodeAt(o);return new Blob([r],{type:t})},q4=async e=>{const{vault:t}=ft.getState().app,n=await t.adapter.readBinary(e),r=new Uint8Array(n),a=new Blob([r],{type:"image/png"});return new Promise(o=>{const i=new FileReader;i.onloadend=()=>{const l=i.result;o(l)},i.readAsDataURL(a)})},Exe=async e=>{var n,r;const t=e.find(".thino-user-icon");if(!(t&&!/(http|app|base64)/.test((n=t==null?void 0:t.style)==null?void 0:n.backgroundImage))&&t&&(r=t==null?void 0:t.style)!=null&&r.backgroundImage){const a=await Fg(t);t.style.backgroundImage=`url("${a}")`}},HE=async e=>{const t=e.findAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await yf(n.getAttribute("path")||C.normalizePath(n==null?void 0:n.parentElement.getAttribute("src")));n.src=r}else{const r=await oz(n);n.src=r}},xxe=async e=>{const{app:t,settings:n}=ft.getState();let r,a;const o=document.body.hasClass("theme-light"),i=o?e==="modern"?n==null?void 0:n.DefaultLightBackgroundImage:n==null?void 0:n.DefaultLightBackgroundImageForClean:e==="modern"?n==null?void 0:n.DefaultDarkBackgroundImage:n==null?void 0:n.DefaultDarkBackgroundImageForClean,l=await t.vault.adapter.exists(i)&&/\.(png|svg|jpg|jpeg)/g.test(i),c=i==null?void 0:i.startsWith("http");switch(e){case"clean":l||c?(a=i,r=c?await yf(i):await q4(a)):r=o?vw:h2;break;case"minimal":break;case"modern":default:l||c?(a=i,r=c?await yf(i):await q4(a)):r="data:image/svg+xml;base64,"+btoa(o?Txe:Ixe);break}switch(e){case"modern":{const f=document.querySelector(".dialog-wrapper .memo-background .property-image");f.style.backgroundImage="url('"+r+"')";break}case"clean":{const f=document.querySelector(".dialog-wrapper .memo-container.clean .memo-background .property-image");f&&(f.style.backgroundImage="url('"+r+"')");break}case"minimal":break;default:{const f=document.querySelector(".dialog-wrapper .memo-background .property-image");f.style.backgroundImage="url('"+r+"')"}}return r},Cxe=e=>{const{memo:t,destroy:n}=e,{memos:r}=Le.getState().memoState,{view:a,app:o,settings:i}=Le.getState().dailyNotesState,l={...t,createdAtStr:ut.getDateTimeString(t.createdAt)},[c,f]=P.useState(!1),[p,g]=P.useState(l.content),[y,w]=P.useState(!1),T=P.useRef(null),S=P.useRef(null),I=P.useRef(null),[M,N]=P.useState(e.style||(o||window.app).loadLocalStorage("memoShareDialogStyle")||"clean"),[_,k]=P.useState(""),R=P.useRef(null),L=P.useRef(null),[H,U]=ne.useState(i==null?void 0:i.MomentsIcon);P.useEffect(()=>{if(!(i!=null&&i.MomentsIcon)||!o)return;const pe=o.vault.adapter.getResourcePath(C.normalizePath(i.MomentsIcon));pe&&!(i!=null&&i.MomentsIcon.startsWith("http"))?U(pe):U(i==null?void 0:i.MomentsIcon)},[i==null?void 0:i.MomentsIcon,o]);let z,$;r.length&&(z=r.length>0?r[r.length-1]:null,z?$=r?Math.ceil((Date.now()-ut.getTimeStampByDate(z==null?void 0:z.createdAt))/1e3/3600/24)+1:0:$=0),i==null||i.ShareFooterEnd.replace("{UserName}",i==null?void 0:i.UserName);const X=i==null?void 0:i.ShareFooterStart.replace("{ThinoNum}",r.length.toString()).replace("{UsedDay}",$.toString());P.useEffect(()=>{!T.current||!S.current||(C.setIcon(T.current,"copy"),C.setIcon(S.current,"x"))},[T,S]),P.useEffect(()=>{I.current&&C.setIcon(I.current,"file-down")},[I]),P.useEffect(()=>{C.setIcon(T.current,y?"loader":"copy"),T.current.disabled=y,T.current.toggleClass("copying",y)},[y]),P.useEffect(()=>{if(!L.current||!a&&!e.view||c)return;g(t.content),L.current.hasChildNodes()&&L.current.empty();async function pe(){var ie;(ie=L.current)==null||ie.toggleClass(["markdown-rendered"],!0),await C.MarkdownRenderer.render(o,t.content+`
`,L.current,t.path,a||e.view)}pe(),setTimeout(async()=>{await Q()},JN)},[R,L,l,M]);const Q=async()=>{R.current&&(await Exe(R.current),await HE(R.current),xxe(M).then(pe=>{pe&&setTimeout(()=>{Ib(R.current,{pixelRatio:window.devicePixelRatio*2}).then(ie=>{k(ie),f(!0)}).catch(()=>{})},600)}))},se=()=>{n()},ue=P.useCallback(pe=>{w(pe)},[y]),fe=async()=>{const{vault:pe}=Le.getState().dailyNotesState.app,ie=R.current.querySelector(".memo-shortcut-img");if(!ie)return;const de=ie==null?void 0:ie.getAttribute("src").split("base64,")[1],K=Z4(de,"image/png");let ae;K.arrayBuffer().then(async Se=>{const je="png",Re=Zu();for(const Fe in Re)if(Re[Fe]instanceof C.TFile){ae=Re[Fe];break}if(ae!==void 0){const Fe=await pe.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,je,ae);await pe.createBinary(Fe,Se),new C.Notice(E("Save image successfully"))}})},Z=async()=>{ue(!0);const pe=R.current.querySelector(".memo-shortcut-img");if(!pe)return;const ie=pe==null?void 0:pe.getAttribute("src").split("base64,")[1],de=Z4(ie,"image/png");if(!de){new C.Notice(E("Copy to clipboard failed"));return}const K=new ClipboardItem({"image/png":de});window.navigator.clipboard.write([K]).then(()=>{setTimeout(()=>{ue(!1)},500)}),new C.Notice(E("Copy to clipboard successfully"))};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:ar("dialog-header-container"),children:[v.jsxs("p",{className:"title-text",children:[v.jsx("span",{className:"icon-text",children:"🥰"}),E("Share Memo Image")]}),v.jsxs("div",{className:"btn-group",children:[C.Platform.isMobile&&v.jsx("button",{ref:I,className:"btn download-btn",onClick:fe}),v.jsx("button",{ref:T,className:"btn copy-btn",onClick:Z}),v.jsx("button",{ref:S,className:"btn close-btn",onClick:se})]})]}),v.jsxs("div",{className:ar("dialog-content-container",M),children:[v.jsx("div",{className:`tip-words-container ${_?"finish":"loading"}`,children:v.jsx("p",{className:"tip-text",children:E(_?"↗Click the button to save":"Image is generating...")})}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default sharing style")}),v.jsx("div",{className:"setting-item-description",children:E("Set the default style for sharing thino, 'Modern' by default.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:M,onChange:async pe=>{pe.currentTarget.value!==M&&(f(!1),k(""),N(pe.currentTarget.value),(o||window.app).saveLocalStorage("memoShareDialogStyle",pe.currentTarget.value),await Q())},children:[v.jsx("option",{value:"modern",children:E("Modern")}),v.jsx("option",{value:"clean",children:E("Clean")}),v.jsx("option",{value:"minimal",children:E("Minimal")}),v.jsx("option",{value:"gradient",children:E("Gradient")})]})})]}),v.jsxs("div",{className:ar("memo-container",M),ref:R,children:[v.jsx(ts,{when:_!=="",children:v.jsx("img",{className:"memo-shortcut-img",onClick:Z,src:_})}),v.jsxs("div",{className:"memo-background",children:[v.jsx("div",{className:"property-image",style:{backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}}),v.jsx("span",{className:"background-container"}),v.jsxs("div",{className:"thino-user-header",children:[v.jsx("div",{className:"thino-user-icon",ref:pe=>{if(i!=null&&i.MomentsIcon){pe==null||pe.empty();return}i!=null&&i.MomentsIcon||pe&&C.setIcon(pe,"Memos")},style:{backgroundImage:`url("${H}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsx("div",{className:"thino-user-name",children:i==null?void 0:i.UserName}),(i==null?void 0:i.MomentsQuote)&&v.jsx("div",{className:"thino-user-quote",children:i==null?void 0:i.MomentsQuote})]})]}),v.jsx("div",{ref:L,className:"memo-content-text",style:{minHeight:i.MinHeightForShare||"200px"}}),v.jsx("div",{className:"thino-time-footer",children:l.createdAt}),v.jsxs("div",{className:"watermark-container",children:[v.jsxs("span",{className:"normal-text footer-start",children:[v.jsx("div",{className:"property-social-icons"}),v.jsx("span",{className:"name-text",children:X})]}),v.jsx("span",{className:"normal-text footer-end",children:v.jsx("span",{className:"name-text",children:"THINO"})})]})]})]})]})]})};function of(e,t,n){vb({className:"share-memo-image-dialog"},Cxe,{memo:e,style:t,view:n})}function am(e=!0){const[t,n]=P.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 Mxe=e=>{const{dailyNotesState:{app:t,settings:n,view:r}}=P.useContext(Lt),{memo:a,handleUnarchivedMemoAction:o}=e,i=ne.useRef(null),l=ne.useRef(null),[c,f]=ne.useState(""),p={...a,createdAtStr:ut.getDateTimeString(a.createdAt),deletedAtStr:ut.getDateTimeString(a.deletedAt||a.createdAt)},[g,y]=Jl(!1),w={restore:P.useRef(null),delete:P.useRef(null),source:P.useRef(null)};P.useEffect(()=>{l&&(C.setIcon(w.restore.current,"archive-restore"),C.setIcon(w.delete.current,"trash"),C.setIcon(w.source.current,"home"))},[l]),P.useEffect(()=>{if(!i.current||!l.current||i.current.hasChildNodes()&&a.content===c||!r)return;f(a.content),i.current.hasChildNodes()&&i.current.empty();async function N(){var k,R;(k=i.current)==null||k.toggleClass(["markdown-rendered"],!0),await C.MarkdownRenderer.render(t,a.content+`
`,i.current,a.path,r);const _=(R=i.current)==null?void 0:R.querySelectorAll(".internal-link");_==null||_.forEach(L=>{const H=L,U=H.getAttribute("data-href");if(!U)return;t.metadataCache.getFirstLinkpathDest(U,a.path)||L.classList.add("is-unresolved"),H.addEventListener("mouseover",$=>{$.stopPropagation(),t.workspace.trigger("hover-link",{event:$,source:"thino",hoverParent:r.containerEl,targetEl:H,linktext:U,sourcePath:H.href})})})}N()},[a.content,l]);const T=async()=>{switch(p.sourceType){case"DAILY":await _2(p.id,p.path);break;case"CANVAS":await H2(p.id,p.path);break;case"MULTI":await R2(p.path);break;case"FILE":await B2(p.id,p.path);break}},S=async()=>{if(g)try{if(n.DeleteThinoDirectly)await be.deleteMemoById(p.id);else{const N=await be.hideMemoById(p.id);N&&be.editMemo(N)}}catch(N){new C.Notice(N.message)}else y()},I=async()=>{try{const N=await be.unarchiveMemo(p);N&&be.editMemo(N),o(p.id),new C.Notice(E("RESTORE SUCCEED"))}catch(N){new C.Notice(N.message)}},M=()=>{g&&y(!1)};return v.jsxs("div",{ref:l,className:`memo-wrapper ${"memos-"+p.id}`,onMouseLeave:M,children:[v.jsxs("div",{className:"memo-top-wrapper",children:[v.jsxs("span",{className:"time-text",children:[E("ARCHIVED AT")," ",p.updatedAt]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N=>{N&&C.setIcon(N,"more-horizontal")},className:"btn more-action-btn"}),v.jsx("div",{className:"more-action-btns-wrapper",children:v.jsxs("div",{className:"more-action-btns-container",children:[v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:w.restore,className:"more-action-item-icon"}),v.jsx("span",{className:"btn restore-btn",onClick:I,children:E("RESTORE")})]}),v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:w.source,className:"more-action-item-icon"}),v.jsx("span",{className:"btn",onClick:T,children:E("SOURCE")})]}),v.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[v.jsx("span",{ref:w.delete,className:"more-action-item-icon"}),v.jsx("span",{className:`btn delete-btn ${g?"final-confirm":""}`,onClick:S,children:E(g?"CONFIRM":"DELETE")})]})]})})]})]}),v.jsx("div",{ref:i,className:"memo-content-text"})]})},Lu=e=>{var n;const t=new Map;for(const r of e){const a=r.path;t.has(a)||t.set(a,[]),(n=t.get(a))==null||n.push(r)}return Array.from(t).map(([r,a])=>({path:r,thinos:a}))},kxe=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:a,type:o,text:i,filter:l}=t,c=sn.getQueryById(l);return!!(r||a&&a.from<a.to||o||i||c)||c||n?e.filter(p=>{let g=!0;if(p.thinoType!==void 0&&n&&p.thinoType==="TASK-DONE"&&(g=!1),p.content.contains("comment:")&&(g=!1),c){const y=JSON.parse(c.querystring);Array.isArray(y)&&(g=Bp(p,y))}if(r){const y=new Set;for(const w of Array.from(p.content.match($r)||[])){const S=w.replace($r,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(ua)||[])){const S=w.replace(ua,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(Wa)||[])){const S=w.replace(Wa,"$2").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}y.has(r)||(g=!1)}return a&&a.from<a.to&&(ut.getTimeStampByDate(p.createdAt)<a.from||ut.getTimeStampByDate(p.createdAt)>a.to)&&(g=!1),o&&(o==="NOT_TAGGED"&&(p.content.match($r)!==null||p.content.match(Wa)!==null||p.content.match(ua)!==null)||o==="LINKED"&&p.content.match(Cf)===null||o==="IMAGED"&&p.content.match(Mf)===null||o==="CONNECTED"&&p.content.match(nd)===null)&&(g=!1),i&&!p.content.toLowerCase().includes(i.toLowerCase())&&(g=!1),g}):e.filter(p=>!p.content.contains("comment:"))},Nxe=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n}}=P.useContext(Lt),r=am(),[a,o]=P.useState([]),i=ne.useRef(null),l=ne.useRef(null);P.useEffect(()=>{l.current&&C.setIcon(l.current,"more-horizontal")},[l]),P.useEffect(()=>{const T=kxe({memos:n.filter(S=>S.rowStatus==="ARCHIVED"&&S.deletedAt===""),query:e,HideDoneTasks:!1});o(T),r.setFinish()},[n,i.current,e]);const c=P.useCallback(T=>{o(S=>S.filter(I=>I.id!==T))},[]),f=P.useCallback(T=>{o(S=>S.filter(I=>I.id!==T))},[]),p=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),g=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await Ul()){Sn();return}const T=[...a];try{const S=T.filter(_=>_.sourceType==="DAILY"),I=T.filter(_=>_.sourceType!=="DAILY"),M=await be.unarchiveThinoBulk(I);for(const _ of M)_&&be.editMemo(_);const N=Lu(S);for(const{path:_,thinos:k}of N)await be.dealWithDailyThinoBulk(_,k,"restoreFromArchive");new C.Notice(E("RESTORE SUCCEED")),ot.clearQuery()}catch(S){console.error("error",S),new C.Notice(S.message)}},y=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await Ul()){Sn();return}const T=[...a],S=ft.getState().settings.DeleteThinoDirectly;try{const I=T.filter(_=>_.sourceType==="DAILY"),M=T.filter(_=>_.sourceType!=="DAILY");for(const _ of M)if(S)await be.deleteMemoById(_.id);else{const k=await be.hideMemoById(_.id);k&&be.editMemo(k)}const N=Lu(I);for(const{path:_,thinos:k}of N)await be.dealWithDailyThinoBulk(_,k,S?"deleteForever":"delete");ot.clearQuery()}catch(I){console.error("error",I),new C.Notice(I.message)}},w=T=>{const S=new C.Menu;S.addItem(I=>{I.setTitle(E("Bulk restore")).setIcon("archive").onClick(async()=>{new _s(app,E("RESTORE"),async M=>{M==="confirm"&&await g()}).open()})}).addItem(I=>{I.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(app,E("DELETE"),async M=>{M==="confirm"&&await y()}).open()})}),S.showAtMouseEvent(T.nativeEvent)};return v.jsxs("div",{className:"memo-trash-wrapper",ref:i,children:[v.jsxs("div",{className:"section-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:T=>{T&&C.setIcon(T,"menu")},className:"btn action-btn clickable-icon",onClick:p})}),v.jsxs("span",{className:"go-home-btn",onClick:()=>{ot.clearQuery(),ot.setPathname("/")},children:["🏠 ",E("Return To Home Page")]}),v.jsx("span",{ref:l,className:"menu-popup-btn",onClick:w})]}),v.jsx(Fv,{})]}),v.jsx(dy,{thinosCount:a.length,thinos:a}),r.isLoading?v.jsx("div",{className:"tip-text-container",children:v.jsx("p",{className:"tip-text",children:E("Fetching data...")})}):a.length===0?v.jsx("div",{className:"tip-text-container",children:v.jsx("p",{className:"tip-text",children:E("Here is No Memos.")})}):v.jsx("div",{className:"deleted-memos-container",children:a.map(T=>v.jsx(Mxe,{memo:T,handleUnarchivedMemoAction:f,handleDeletedMemoAction:c},`${T.id}-${T.updatedAt}`))})]})},Ul=async()=>{var r;const{verifyState:e}=ft.getState(),t=!C.Platform.isDesktop&&await((r=window.Capacitor)==null?void 0:r.Plugins.Device.getId()),n=C.Platform.isDesktop?await cr():t.identifier||t.uuid;return e&&(e==null?void 0:e.appId)===n},Axe=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"),a=e.find(".moments-view-background");for(const o of n){const i=await Fg(o);o.style.backgroundImage=`url(${i})`}if(r){const o=await Fg(r);r.style.backgroundImage=`url(${o})`}if(a){const o=await Fg(a);a.style.backgroundImage=`url(${o})`}}else if(t==="chat"){const n=e.querySelectorAll(".icon-img");for(const r of n){const a=await Fg(r);r.style.backgroundImage=`url(${a})`}}}};class _s extends C.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+" "+E("Confirm?")),this.contentEl.createEl("button",{cls:"mod-warning",text:E("Confirm?").replace(/\?|/,"")}).onclick=()=>{this.cb("confirm"),this.close()},this.contentEl.createEl("button",{text:E("Cancel")}).onclick=()=>{this.cb("cancel"),this.close()}}onClose(){super.onClose()}}class Fxe extends C.Modal{constructor(n,r){super(n);De(this,"root");this.thinos=r}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=rs.createRoot(this.contentEl),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(rz,{app:this.app,closeDialog:this.close.bind(this),thinos:this.thinos})}))}onClose(){var n;super.onClose(),(n=this.root)==null||n.unmount()}}const dy=({thinosCount:e,thinos:t})=>{const{globalState:{memoListView:n},locationState:{query:r,pathname:a},dailyNotesState:{settings:o,app:i}}=P.useContext(Lt),{tag:l,duration:c,type:f,text:p,filter:g}=r,y=sn.getQueryById(g),w=!!(l||c&&c.from<c.to||f||p||y),T=P.useRef(null);P.useEffect(()=>{T&&C.setIcon(T.current,"more-horizontal")},[T]);const S=async()=>{if(!((t==null?void 0:t.length)>0))return;const U=ZU(t),z=GU(U);await ut.copyTextToClipboard(z),new C.Notice(E("Copied to clipboard Successfully"))},I=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await Ul()){Sn();return}const U=[...t],z=o.DeleteThinoDirectly;try{const $=U.filter(se=>se.sourceType==="DAILY"),X=U.filter(se=>se.sourceType!=="DAILY");for(const se of X)if(z)await be.deleteMemoById(se.id);else{const ue=await be.hideMemoById(se.id);ue&&be.editMemo(ue)}const Q=Lu($);for(const{path:se,thinos:ue}of Q)await be.dealWithDailyThinoBulk(se,ue,z?"deleteForever":"delete");be.updateTagsState(),ot.clearQuery()}catch($){console.error("error",$),new C.Notice($.message)}},M=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await Ul()){Sn();return}const U=[...t],z=ft.getState().settings.startSync,$=ft.getState().app,X=$==null?void 0:$.loadLocalStorage("tokenForSync");try{const Q=U.filter(fe=>fe.sourceType==="DAILY"),se=U.filter(fe=>fe.sourceType!=="DAILY");for(const fe of se)await be.deleteMemoById(fe.id);const ue=Lu(Q);for(const{path:fe,thinos:Z}of ue){const pe=await be.dealWithDailyThinoBulk(fe,Z,"deleteForever");if(!(!X||!z))for(const ie of pe)ie&&ie.webId&&await I2(ie.webId)}be.updateTagsState(),ot.clearQuery(),new C.Notice(E("DELETE SUCCEED"))}catch(Q){console.error("error",Q),new C.Notice(Q.message)}},N=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await Ul()){Sn();return}const U=[...t];try{const z=U.filter(se=>se.sourceType==="DAILY"),$=U.filter(se=>se.sourceType!=="DAILY"),X=await be.unarchiveThinoBulk($);for(const se of X)se&&be.editMemo(se);const Q=Lu(z);for(const{path:se,thinos:ue}of Q)await be.dealWithDailyThinoBulk(se,ue,"restoreFromArchive");new C.Notice(E("RESTORE SUCCEED")),be.updateTagsState(),ot.clearQuery()}catch(z){console.error("error",z),new C.Notice(z.message)}},_=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await Ul()){Sn();return}const U=[...t],z=ft.getState().settings.startSync,$=ft.getState().app,X=$==null?void 0:$.loadLocalStorage("tokenForSync");try{const Q=U.filter(fe=>fe.sourceType==="DAILY"),se=U.filter(fe=>fe.sourceType!=="DAILY");for(const fe of se){const Z=await be.restoreMemoById(fe.id);Z&&Z.webId&&X&&z&&await Zg(Z.webId),Z&&be.editMemo(Z)}const ue=Lu(Q);for(const{path:fe,thinos:Z}of ue){const pe=await be.dealWithDailyThinoBulk(fe,Z,"restoreFromDelete");for(const ie of pe)ie&&ie.webId&&X&&z&&await Zg(ie.webId),ie&&be.editMemo(ie)}be.updateTagsState(),ot.clearQuery(),new C.Notice(E("RESTORE SUCCEED"))}catch(Q){new C.Notice(Q.message)}},k=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await Ul()){Sn();return}const U=[...t];try{const z=U.filter(se=>se.sourceType==="DAILY"),$=U.filter(se=>se.sourceType!=="DAILY"),X=await be.archiveThinoBulk($);for(const se of X)se&&be.editMemo(se);const Q=Lu(z);for(const{path:se,thinos:ue}of Q)await be.dealWithDailyThinoBulk(se,ue,"archive");be.updateTagsState(),ot.clearQuery()}catch(z){console.error("error",z),new C.Notice(z.message)}},R=async()=>{if((t==null?void 0:t.length)>0){if(!await Ul()){Sn();return}new Fxe(i,t).open()}},L=async U=>{document.body.toggleClass("thino-share-page",!0),setTimeout(async()=>{if(new C.Notice(E("Image is generating...")),!U){new C.Notice(E("No content to generate."));return}await Axe(U,n),await HE(U);let z;document.body.hasClass("theme-dark")?z="#232323":z="#eaeaea",Ib(U,{backgroundColor:z,pixelRatio:window.devicePixelRatio*2}).then($=>{if(o!=null&&o.AutoSaveWhenOnMobile&&C.Platform.isMobile){const X=$.split("base64,")[1];db(X,"image/png").arrayBuffer().then(async se=>{let ue;const fe="png",Z=Zu();for(const pe in Z)if(Z[pe]instanceof C.TFile){ue=Z[pe];break}ue!==void 0&&await i.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,fe,ue),se)})}document.body.toggleClass("thino-share-page",!1),Eb({imgUrl:$}),new C.Notice(E("Image generated successfully.")),U.hasClass("share-image")?U.toggleClass("share-image",!1):U.closest(".share-image").toggleClass("share-image",!1)}).catch($=>{document.body.toggleClass("thino-share-page",!1),console.error($)})},0)},H=U=>{const z=new C.Menu;switch(z.addItem($=>{$.setTitle(E("Copy filtered thinos")).setIcon("copy").onClick(async()=>{await S()})}),z.addItem($=>{$.setTitle(E("Share filtered thinos as image")).setIcon("image").onClick(async()=>{const X=document.querySelector(".memolist-container");X.toggleClass("share-image",!0);try{if(n==="calendar"){if(X.find(".rbc-agenda-table")){const Q=X.find(".rbc-agenda-table");await L(Q)}if(X.find(".rbc-month-view")){const Q=X.find(".rbc-month-view");await L(Q)}}else if(n==="table"){if(X.find(".thino-table")){const Q=X.find(".thino-table");await L(Q)}}else await L(X)}catch(Q){console.error(Q),new C.Notice(E("Failed to generate image.")),X.toggleClass("share-image",!1)}})}),z.addItem($=>{$.setTitle(E("Merge thinos in to thino share image")).setIcon("image").onClick(async()=>{let X="";t.forEach((se,ue)=>{X+=`> [!thino] ${se.createdAt}
${se.content.split(`
`).map(fe=>fe.trim()?`> ${fe}
`:`>
`)}
`+(ue===t.length-1?`
`:`
------
`)});const Q={createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),content:X.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:[]};of(Q,"clean")})}),z.addSeparator(),a){case"/":z.addItem($=>{$.setTitle(E("Bulk tag operation")).setIcon("hash").onClick(async()=>{await R()})}).addItem($=>{$.setTitle(E("Bulk archive")).setIcon("archive").onClick(async()=>{new _s(i,E("ARCHIVE"),async X=>{X==="confirm"&&await k()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async X=>{X==="confirm"&&await I()}).open()})});break;case"/archive":z.addItem($=>{$.setTitle(E("Bulk restore")).setIcon("archive").onClick(async()=>{new _s(i,E("RESTORE"),async X=>{X==="confirm"&&await N()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async X=>{X==="confirm"&&await I()}).open()})});break;case"/recycle":z.addItem($=>{$.setTitle(E("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new _s(i,E("RESTORE"),async X=>{X==="confirm"&&await _()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async X=>{X==="confirm"&&await M()}).open()})});break}z.showAtMouseEvent(U.nativeEvent)};return v.jsxs("div",{className:`filter-query-container ${w?"":"hidden"}`,children:[v.jsxs("div",{className:"filter-query",children:[v.jsx("span",{className:"tip-text",children:E("FILTER")}),v.jsxs("div",{"data-filter-type":"query",className:"filter-item-container "+(y?"":"hidden"),onClick:()=>{ot.setMemoFilter("")},children:[v.jsx("span",{className:"icon-text",children:"🔖"})," ",y==null?void 0:y.title]}),v.jsxs("div",{"data-filter-type":"tag",className:"filter-item-container "+(l?"":"hidden"),onClick:()=>{ot.setTagQuery("")},children:[v.jsx("span",{className:"icon-text",children:"🏷️"})," ",l]}),v.jsxs("div",{"data-filter-type":"type",className:"filter-item-container "+(f?"":"hidden"),onClick:()=>{ot.setMemoTypeQuery("")},children:[v.jsx("span",{className:"icon-text",children:"📦"})," ",YH(f)]}),c&&c.from<c.to&&v.jsxs("div",{"data-filter-type":"date",className:"filter-item-container",children:[v.jsxs("div",{className:"day-picker-component-group",children:[v.jsx("span",{className:"icon-text",children:"🗓️"})," ",v.jsx(kw,{type:"text",startOrEnd:"start",defaultValue:C.moment(c.from,"x").valueOf(),handleValueChange:U=>{const z=C.moment(c.to,"x"),$=C.moment(U,"x"),X=$.isAfter(z)||$.isSame(z);ot.setFromAndToQuery(X?z.startOf("day").valueOf():C.moment(U,"x").startOf("day").valueOf(),c.to)}}),v.jsx("span",{children:E("to")}),v.jsx(kw,{type:"text",startOrEnd:"end",defaultValue:C.moment(c.to,"x").add(1,"days").valueOf(),handleValueChange:U=>{const z=C.moment(c.from,"x"),$=C.moment(U,"x"),X=$.isBefore(z)||$.isSame(z),Q=C.moment(U,"x").endOf("day").valueOf();ot.setFromAndToQuery(c.from,X?z.endOf("day").valueOf():Q)}})]}),v.jsx("div",{ref:U=>U&&C.setIcon(U,"x"),className:"btn close-btn",onClick:()=>{ot.setFromAndToQuery(0,0)}})]}),v.jsxs("div",{className:"filter-item-container "+(p?"":"hidden"),onClick:()=>{ot.setTextQuery("")},children:[v.jsx("span",{className:"icon-text",children:"🔍"})," ",p]})]}),v.jsxs("div",{className:"thino-filter-items",children:[e&&v.jsx("div",{className:"thinos-count",children:`${e?`${e} Thinos `:""}`}),v.jsx("div",{ref:T,className:"btn memo-action-menu",onClick:H})]})]})},sf=async e=>{const{app:t,settings:n}=ft.getState();if(!n.startSync||!(t!=null&&t.loadLocalStorage("tokenForSync")))return;const r=await _R(e);if(!r||r.length===0)return;r.sort((i,l)=>C.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(C.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss"))?1:-1);const a=r.filter(i=>!i.deleted),o=r.filter(i=>i.deleted);for(let i=0;i<a.length;i++){const l=a[i],c=await be.createOrPatchThinoFromWeb(l);c&&be.pushMemo(c)}for(let i=0;i<o.length;i++){const l=o[i],c=be.getMemoByWebId(l.id);c&&await be.deleteMemoById(c.id,"local")}be.updateTagsState(),jxe(t)};function Oxe(){const{settings:e,app:t,view:n}=ft.getState(),{globalState:{loaded:r,memoListView:a}}=P.useContext(Lt),o=C.Platform.isMobile&&e.DefaultEditorLocation==="Bottom",i=ne.useRef(null),[l,c]=ne.useState([]),[f,p]=ne.useState((window.app||t).loadLocalStorage("thinoListView"));P.useEffect(()=>{a===f||!a||(p(a),t&&(t==null||t.saveLocalStorage("thinoListView",a)))},[a]),P.useEffect(()=>{if(!t||!r||!n||!(t==null?void 0:t.loadLocalStorage("tokenForSync"))||!e.startSync)return;i.current=window.setInterval(async()=>{const T=p2(t);await sf(T)},3e4),n.registerInterval(i.current);const w=p2(t);return sf(w),()=>{i.current&&window.clearInterval(i.current)}},[n,t,r,e.startSync]);const g=[v.jsx(dy,{thinosCount:l.length,thinos:l},"filter"),v.jsx(gxe,{listView:f,updateThinos:y=>{c(y)}},"list")];return v.jsx(v.Fragment,{children:a==="chat"?v.jsx(v.Fragment,{children:[v.jsx(yw,{syncThino:sf},"header"),...g.reverse(),v.jsx(ff,{className:"mod-editor-bottom",editorType:"inline"},"editor")]}):v.jsx(v.Fragment,{children:o?[v.jsx(yw,{syncThino:sf},"header"),...g,v.jsx(ff,{className:"mod-editor-bottom",editorType:"block"},"editor")]:[v.jsx(yw,{syncThino:sf},"header"),v.jsx(ff,{editorType:"block"},"editor"),...g]})})}function Pxe(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",C.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")))}catch(t){console.error(t)}}function p2(e){try{const t=(e==null?void 0:e.loadLocalStorage)&&(e==null?void 0:e.loadLocalStorage("thinoLastUpdated"));return t||C.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")}catch(t){return console.error(t),C.moment().format("x")}}function jxe(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",C.moment().format("x")))}catch(t){console.error(t)}}const Lxe={text:E("SELECT"),value:""},Rxe=e=>{const{className:t,dataSource:n,handleValueChanged:r,value:a}=e,[o,i]=Jl(!1),l=P.useRef(null);let c=Lxe;for(const g of n)if(g.value===a){c=g;break}P.useEffect(()=>{if(o){const g=y=>{var w;(w=l.current)!=null&&w.contains(y.target)||i(!1)};window.addEventListener("click",g,{capture:!0,once:!0})}},[o]);const f=g=>{r&&r(g.value),i(!1)},p=g=>{g.stopPropagation(),i()};return v.jsxs("div",{className:`selector-wrapper ${t||""}`,ref:l,children:[v.jsxs("div",{className:`current-value-container ${o?"active":""}`,onClick:p,children:[v.jsx("span",{className:"value-text",children:c.text}),v.jsx("span",{ref:g=>{g&&C.setIcon(g,"chevron-right")},className:"btn arrow-text"})]}),v.jsx("div",{className:`items-wrapper ${o?"":"hidden"}`,children:n.map(g=>v.jsx("div",{className:`item-container ${g.value===a?"selected":""}`,onClick:()=>{f(g)},children:g.text},g.value))})]})},op=P.memo(Rxe),YE=e=>{const{destroy:t,queryId:n,type:r="dialog"}=e,[a,o]=P.useState(""),[i,l]=P.useState(r!=="dialog"?[cC()]:[]),c=am(!1),[f,p]=P.useState(!1),[g,y]=Jl(!1),w=be.getState().memos.filter(L=>!(L.deletedAt!==""&&L.deletedAt)).filter(L=>Bp(L,i)).length;P.useEffect(()=>{T()},[n]);const T=()=>{const L=sn.getQueryById(n??"");if(L){o(L.title);const H=JSON.parse(L.querystring);return Array.isArray(H)&&l(H),L}},S=L=>{const H=L.target.value;o(H)},I=async()=>{if(!a)return new C.Notice(E("TITLE CANNOT BE NULL!")),null;if(i.length===0)return new C.Notice(E("FILTER CANNOT BE NULL!")),null;if(i.length===1&&i[i.length-1].value.value==="")return new C.Notice(E("Please finish the last filter setting first")),null;let L;try{n&&!n.startsWith("Filter [Temp] ")?(L=await sn.updateQuery(n,a,JSON.stringify(i)),sn.editQuery(L),await sn.getMyAllQueries()):(L=await sn.createQuery(a,JSON.stringify(i)),sn.pushQuery(L),await sn.getMyAllQueries())}catch(H){new C.Notice(H.message)}return L},M=async()=>{switch(r){case"modal":case"inline":if(i.length===0){new C.Notice(E("FILTER CANNOT BE NULL!"));return}if(i.length===1&&i[i.length-1].value.value===""){new C.Notice(E("Please finish the last filter setting first"));return}try{const L=sn.getQueryById(n??"");if(L&&JSON.stringify(i)===L.querystring){ot.setMemoFilter(L.id),t();return}const H=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));sn.pushQuery(H),ot.setMemoFilter(H.id)}catch(L){new C.Notice(L.message)}t();break;case"dialog":try{if(!await I())return}catch(L){console.error(L),new C.Notice(L.message)}t();break}},N=()=>{if(i.length===0){new C.Notice(E("FILTER CANNOT BE NULL!"));return}if(f){ot.setMemoFilter(""),p(!1);return}const L=sn.getQueryById(n??"");if(L&&JSON.stringify(i)===L.querystring){ot.setMemoFilter(L.id);return}const H=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));sn.pushQuery(H),ot.setMemoFilter(H.id),e.setPreview&&e.setPreview(H.id),p(!0)},_=()=>{if(i.length>0&&i[i.length-1].value.value===""){new C.Notice(E("Please finish the last filter setting first"));return}l([...i,cC()])},k=P.useCallback((L,H)=>{l(U=>{const z=[...U];return z[L]=H,z})},[]),R=P.useCallback(L=>{l(H=>H.filter((z,$)=>$!==L))},[]);return v.jsxs(v.Fragment,{children:[r==="dialog"&&v.jsxs("div",{className:"dialog-header-container",children:[v.jsxs("span",{className:"title-text",children:[v.jsx("span",{className:"icon-text",children:"🔖"}),E(n?"EDIT QUERY":"CREATE QUERY")]}),v.jsx("button",{ref:L=>{L&&C.setIcon(L,"x")},className:"btn close-btn",onClick:t})]}),v.jsxs("div",{className:"dialog-content-container",children:[(r==="dialog"||g)&&v.jsxs("div",{className:"form-item-container input-form-container",children:[v.jsx("span",{className:"normal-text",children:E("TITLE")}),v.jsx("input",{className:"title-input",type:"text",value:a,onChange:S})]}),v.jsxs("div",{className:"form-item-container filter-form-container",children:[v.jsx("span",{className:"normal-text",children:E("FILTER")}),v.jsxs("div",{className:"filters-wrapper",children:[i.map((L,H)=>v.jsx(Bxe,{index:H,filter:L,handleFilterChange:k,handleFilterRemove:R},H)),v.jsx("div",{className:"create-filter-btn",onClick:_,children:E("ADD FILTER TERMS")})]})]})]}),v.jsx("div",{className:"dialog-footer-container",children:v.jsxs("div",{className:"btns-container",children:[(r==="inline"||r==="modal")&&v.jsx("button",{className:`btn ${g?"mod-cta":"save-btn"}`,onClick:async()=>{if(!g)y();else{const L=await I();y(!1),t(),L&&ot.setMemoFilter(L.id)}},children:E(g?"Set and save":"Save")}),v.jsxs("div",{className:"btns-group-container",children:[v.jsxs("span",{className:`tip-text ${i.length===0&&"hidden"}`,children:[E("MATCH")," Thino ",v.jsx("strong",{children:w})," ",E("TIMES")]}),v.jsx(v.Fragment,{children:r==="inline"&&v.jsx("button",{className:"btn mod-cta",onClick:N,children:E("Preview")})}),v.jsx("button",{className:`btn save-btn ${c.isLoading?"requesting":""}`,onClick:M,children:E(r==="inline"||r==="modal"?"Filter":n?"EDIT":"Save")})]})]})})]})},_xe=e=>{const{index:t,filter:n,handleFilterChange:r,handleFilterRemove:a}=e,{type:o}=n,i=P.useRef(null),l=P.useRef(null),c=P.useRef(n),f=P.useRef(o);P.useEffect(()=>{c.current=e.filter},[n]),P.useEffect(()=>{if(i.current)return o==="TAG"&&!l.current&&(f.current=o,l.current=new Kg(i.current,w)),()=>{l.current&&(l.current.destroy(),l.current=null)}},[i,o]);const p=P.useCallback(I=>{["AND","OR"].includes(I)&&r(t,{...n,relation:I})},[n]),g=P.useCallback(async I=>{var M;if(n.type!==I){const{verifyState:N}=ft.getState(),_=!C.Platform.isDesktop&&await((M=window.Capacitor)==null?void 0:M.Plugins.Device.getId()),k=C.Platform.isDesktop?await cr():_.identifier||_.uuid,R=N&&(N==null?void 0:N.appId)===k;if(I==="SOURCE"&&!R){Sn();return}const L=Object.values(Vc[I].operators);r(t,{...n,type:I,value:{operator:L[0].value,value:""}})}},[n]),y=P.useCallback(I=>{r(t,{...n,value:{...n.value,operator:I}})},[n]),w=P.useCallback(I=>{r(t,{...c.current,value:{...c.current.value,value:I}})},[n]),T=()=>{a(t)},S={TYPE:v.jsx(op,{className:"value-selector",dataSource:Vc.TYPE.values,value:n.value.value,handleValueChanged:w}),LIST:v.jsx(op,{className:"value-selector",dataSource:Vc.LIST.values,value:n.value.value,handleValueChanged:w}),SOURCE:v.jsx(op,{className:"value-selector",dataSource:Vc.SOURCE.values,value:n.value.value,handleValueChanged:w}),TAG:v.jsx("input",{type:"text",id:Math.random().toString(36).substring(7),className:"value-inputer",ref:i,value:n.value.value,onChange:I=>{w(I.target.value)}}),TEXT:v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}}),DATE:v.jsxs("div",{className:"date-inputer",children:[v.jsx(kw,{type:"icon",handleValueChange:w}),v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}})]})};return v.jsxs("div",{className:"memo-filter-input-wrapper",children:[t>0&&v.jsx(op,{className:"relation-selector",dataSource:HH,value:n.relation,handleValueChanged:p}),v.jsx(op,{className:"type-selector",dataSource:Object.values(Vc),value:n.type,handleValueChanged:g}),v.jsxs(v.Fragment,{children:[Object.keys(Vc).includes(o)&&v.jsx(op,{className:"operator-selector",dataSource:Object.values(Vc[o].operators),value:n.value.operator,handleValueChanged:y}),S[o]]}),v.jsx("div",{ref:I=>{I&&C.setIcon(I,"x")},className:"btn remove-btn",onClick:T})]})},Bxe=P.memo(_xe);function m2(e){vb({className:"create-query-dialog"},YE,{queryId:e})}const UE=e=>{var w,T;const{dailyNotesState:{app:t,verifyState:n},locationState:{query:r}}=P.useContext(Lt),a=ne.useRef(null),[o,i]=ne.useState(!1),l=ne.useRef(null),[c,f]=ne.useState(""),p=Tb(a.current,l.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}}]});P.useEffect(()=>{o&&p.update&&(p==null||p.update())},[o]),P.useEffect(()=>{a&&C.setIcon(a.current,"filter")},[a]);const g=async()=>{var M;const S=!C.Platform.isDesktop&&await((M=window.Capacitor)==null?void 0:M.Plugins.Device.getId()),I=C.Platform.isDesktop?await cr():S.identifier||S.uuid;return!n||(n==null?void 0:n.appId)!==I?(Sn(),!1):!0};return Pv(l,()=>{i(!1),c&&ot.getState().query.filter===c&&ot.setMemoFilter("")}),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-inline-filter-wrapper pro",ref:a,onClick:async()=>{await g()&&(C.Platform.isDesktop?(i(!o),await(p==null?void 0:p.update())):new Hxe(ft.getState().app,r.filter,I=>{f(I)}).open())}}),v.jsx("div",{ref:l,className:`thino-inline-filter-container ${o?"":"hidden"}`,style:p.styles.popper,children:o&&v.jsx(YE,{type:"inline",queryId:(w=r.filter)!=null&&w.startsWith("Filter [Temp] ")&&!((T=r.filter)!=null&&T.includes("Filter [Temp]"))?"":r.filter,destroy:()=>{i(!1)},setPreview:S=>{f(S)}})})]})};class Hxe extends C.Modal{constructor(n,r,a){super(n);De(this,"root");De(this,"setPreview");this.filter=r,this.setPreview=a}onOpen(){var r,a;const{contentEl:n}=this;this.root=Av(n),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx("div",{className:"thino-inline-filter-container",children:v.jsx(YE,{type:"modal",queryId:(r=this.filter)!=null&&r.startsWith("Filter [Temp] ")&&!((a=this.filter)!=null&&a.includes("Filter [Temp]"))?"":this.filter,destroy:()=>{this.close()},setPreview:o=>{this.setPreview(o)}})})}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const DO=()=>{const{dailyNotesState:{app:e},globalState:{isMobileView:t,showSiderbarInMobileView:n}}=P.useContext(Lt),[r]=P.useState(ne.createRef());P.useEffect(()=>{if(!r.current)return;const o=r.current;C.setIcon(o,"refresh-cw")},[r.current]);const a=P.useCallback(async()=>{if(!(t&&n)){if(sf){const o=p2(e);await sf(o)}await be.fetchAllMemos()}},[]);return v.jsx("span",{className:"refresh-icon",ref:r,onClick:()=>{a(),r&&r.current.firstElementChild.toggleClass("rotate-hidden",!0),setTimeout(()=>{r&&r.current.firstElementChild.toggleClass("rotate-hidden",!1)},1e3)}})},yw=()=>{const{locationState:{query:{filter:e}},globalState:{isMobileView:t},queryState:{queries:n}}=P.useContext(Lt),[r,a]=P.useState("THINO");P.useEffect(()=>{const i=sn.getQueryById(e);a(i?i.title:"THINO")},[e,n]);const o=P.useCallback(i=>{i.stopPropagation(),dt.setShowSiderbarInMobileView(!0)},[]);return v.jsxs("div",{className:"section-header-container memos-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:i=>{i&&C.setIcon(i,"menu")},className:"btn action-btn clickable-icon",onClick:o})}),v.jsx("span",{className:"normal-text",children:r}),v.jsx(DO,{})]}),v.jsxs("div",{className:"memos-header-search-section",children:[v.jsx(QH,{}),v.jsx(KH,{}),v.jsx(UE,{}),v.jsx(Fv,{})]})]})},Yxe=()=>{const{dailyNotesState:{settings:e,plugin:t,app:n,verifyState:r},globalState:{manifest:a,showSiderbarInMobileView:o,isMobileView:i}}=P.useContext(Lt),[l,c]=P.useState("Memos");P.useState(!1);const[f,p]=P.useState("");P.useEffect(()=>{if(!(e!=null&&e.MomentsIcon)||!n)return;const k=n.vault.adapter.getResourcePath(C.normalizePath(e.MomentsIcon));k&&!(e!=null&&e.MomentsIcon.startsWith("http"))?p(k):p(e==null?void 0:e.MomentsIcon)},[e==null?void 0:e.MomentsIcon,n]),P.useEffect(()=>{e&&c(e.UserName)},[e]);const g=P.useCallback(()=>{ot.pushHistory("/"),ot.clearQuery()},[]),y=()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},w=()=>{if(e!=null&&e.needVerify){dt.setLocked(!0);return}else new C.Notice(E("You have not set a password or enable this feature yet")),n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},T=()=>{new ex(n,a.version).open()},S=()=>{dt.setShowSiderbarInMobileView(!1),t.settingTab.updateSettings("FirstLoaded",!0)},I=()=>{new jH(n,t,a.version).open()},M=P.useCallback(async k=>{const{type:R}=k;if(R.startsWith("text"))try{return`${await Y2.parseHtml(k)}`}catch(L){new C.Notice(L)}},[]),N=P.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 R=k.files[0];await M(R),document.body.removeChild(k)},k.click()},[]),_=k=>{const R=new C.Menu;R.addItem(L=>{L.setIcon("user").setTitle(E("Settings")).onClick(y)}),e!=null&&e.needVerify&&R.addItem(L=>{L.setIcon("lock").setTitle(E("Lock")).onClick(w)}),R.addItem(L=>{L.setIcon("import").setTitle(E("Import")).onClick(N)}),R.addSeparator(),R.addItem(L=>{L.setIcon("file-text").setTitle(E("ChangeLog")).onClick(T)}),R.addItem(L=>{L.setIcon("settings").setTitle(E("Setting guide")).onClick(S)}),R.addItem(L=>{L.setIcon("alert-circle").setTitle(E("Submit issue")).onClick(I)}),R.showAtMouseEvent(k.nativeEvent)};return v.jsxs("div",{className:"user-banner-container",children:[v.jsxs("div",{className:"userinfo-header-container",children:[v.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:[v.jsx("div",{ref:k=>{if(f){k==null||k.empty();return}f||k&&C.setIcon(k,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${f}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsxs("span",{className:"username-container",children:[v.jsx("span",{"aria-label":l==="MEMO 😉"?"THINO 😉":l||"THINO",className:"username-text",onClick:g,children:l==="MEMO 😉"?"THINO 😉":l||"THINO"}),v.jsx("span",{className:`user-pro-badge ${r?"activated":""}`,onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:"PRO"})]}),(e==null?void 0:e.MomentsQuote)&&v.jsx("span",{className:"thino-user-quote",children:e==null?void 0:e.MomentsQuote})]})]}),v.jsxs("span",{className:"btn-group",children:[(e==null?void 0:e.DefaultThemeForThino)==="modern"&&!i&&v.jsx(DO,{}),v.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&C.setIcon(k,"more-horizontal")},className:"btn action-btn menu-popup-btn",onClick:_}),o&&v.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&C.setIcon(k,"x")},className:"btn action-btn",onClick:()=>{dt.setShowSiderbarInMobileView(!1)}})]})]}),v.jsx(V2,{statusType:"banner"})]})},G4=()=>{const{queryState:{queries:e},dailyNotesState:{app:t},locationState:{query:{filter:n}}}=P.useContext(Lt),r=am(),[a,o]=P.useState([]);return P.useEffect(()=>{const i=e.filter(l=>{var c,f;return!((c=l.id)!=null&&c.toString().startsWith("Filter [Temp]"))&&!((f=l.id)!=null&&f.toString().includes("Filter [Temp]"))}).sort((l,c)=>{if(c.pinnedAt&&!l.pinnedAt)return 1;if(l.pinnedAt&&!c.pinnedAt)return-1;const f=ut.getTimeStampByDate(l.pinnedAt||l.createdAt);return ut.getTimeStampByDate(c.pinnedAt||c.createdAt)-f});o(i)},[e]),P.useEffect(()=>{sn.getMyAllQueries().catch(()=>{}).finally(()=>{r.setFinish()})},[t]),v.jsxs("div",{className:"queries-wrapper",children:[v.jsxs("span",{className:"title-text",children:[v.jsx("span",{className:"normal-text",children:E("QUERY")}),v.jsx("span",{ref:i=>{i&&C.setIcon(i,"plus")},className:"btn create-query-btn",onClick:()=>m2()})]}),v.jsx(ts,{when:r.isSucceed&&a.length===0,children:v.jsx("div",{className:"create-query-btn-container",children:v.jsx("span",{className:"btn",onClick:()=>m2(),children:E("CREATE FILTER")})})}),v.jsx("div",{className:"queries-container",children:a.map(i=>v.jsx(Uxe,{query:i,isActive:i.id===n},`${i.id}-${C.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}`))})]})},Uxe=e=>{const{query:t,isActive:n}=e,[r,a]=Jl(!1),[o,i]=Jl(!1),l=()=>{ot.setMemoFilter(n?"":t.id)},c=S=>{S.stopPropagation(),a()},f=()=>{a(!1)},p=async S=>{if(S.stopPropagation(),o)try{await sn.deleteQuery(t.id)}catch(I){new C.Notice(I.message)}else i()},g=S=>{S.stopPropagation(),m2(t.id)},y=async S=>{S.stopPropagation();try{t.pinnedAt?await sn.unpinQuery(t.id):await sn.pinQuery(t.id),sn.editQuery({...t,pinnedAt:t.pinnedAt?"":ut.getDateTimeString(Date.now())})}catch(I){console.error(I)}},w=()=>{i(!1)},T=P.useMemo(()=>v.jsxs("div",{className:"action-btns-container",children:[v.jsxs("span",{className:"btn",onClick:y,children:[v.jsx("span",{ref:S=>{S&&C.setIcon(S,t.pinnedAt?"pin-off":"pin")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:t.pinnedAt?E("UNPIN"):E("PIN")})]}),v.jsxs("span",{className:"btn",onClick:g,children:[v.jsx("span",{ref:S=>{S&&!S.hasChildNodes()&&C.setIcon(S,"edit")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:E("EDIT")})]}),v.jsxs("span",{className:`btn delete-btn ${o?"final-confirm":""}`,onClick:p,onMouseLeave:w,children:[v.jsx("span",{ref:S=>{S&&!S.hasChildNodes()&&C.setIcon(S,"trash-2")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:E(o?"CONFIRM":"DELETE")})]})]}),[t.pinnedAt,o]);return v.jsx(v.Fragment,{children:v.jsxs("div",{className:`query-item-container ${n?"active":""}`,onClick:l,children:[v.jsxs("div",{className:"query-text-container",children:[v.jsx("span",{ref:S=>{S&&!S.hasChildNodes()&&C.setIcon(S,"filter")},className:"icon-text"}),v.jsxs("span",{className:"query-text",children:[t.title,t.pinnedAt&&" 📌"]})]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:S=>{S&&!S.hasChildNodes()&&C.setIcon(S,"more-horizontal")},className:"btn action-btn toggle-btn",onClick:c}),v.jsx("div",{className:`action-btns-wrapper ${r?"":"hidden"}`,onMouseLeave:f,children:T})]})]})})},J4=()=>{var y,w;const{locationState:{query:{tag:e,filter:t}},dailyNotesState:{app:n},memoState:{tags:r,tagsNum:a,memos:o}}=P.useContext(Lt),i=t&&((y=t==null?void 0:t.toString())==null?void 0:y.startsWith("Filter [Temp] "))&&sn.getQueryById(t),[l,c]=P.useState([]),[f,p]=P.useState(((w=n||app)==null?void 0:w.loadLocalStorage("thino-tag-sort-order"))||"alphabetical");P.useEffect(()=>{var S;const T=(S=n||app)==null?void 0:S.loadLocalStorage("thino-temp-tags");c(T||[])},[]),P.useEffect(()=>{be.updateTagsState()},[o]),P.useEffect(()=>{const T=Array.from(r).sort(),S={subTags:[]};for(const I of T){const M=I.split("/");let N=S,_="";for(let k=0;k<M.length;k++){const R=M[k];_+=k===0?R:"/"+R;let L=N.subTags.find(H=>H.text===_);if(L||(L={key:R,text:_,count:a[_]||0,subTags:[],parent:N},N.subTags.push(L)),k===M.length-1){let H=L.parent;for(;H;)H.count||(H.count=0),H.count+=a[_]||0,H=H.parent}N=L}}c(S.subTags)},[r]),P.useEffect(()=>{var T;be.initialized&&((T=n||app)==null||T.saveLocalStorage("thino-temp-tags",l))},[l]);const g=T=>{T.stopPropagation();const S=new C.Menu;for(const I of["alphabetical","alphabeticalReverse","byCount","byCountReverse"])S.addItem(M=>{M.setTitle(E(I)).onClick(()=>{p(I),n==null||n.saveLocalStorage("thino-tag-sort-order",I)}).setChecked(f===I)}),I==="alphabeticalReverse"&&S.addSeparator();S.showAtMouseEvent(T.nativeEvent)};return v.jsxs("div",{className:"tags-wrapper",children:[v.jsxs("div",{className:"tags-header title-text",children:[v.jsx("span",{className:"normal-text",children:E("Frequently Used Tags")}),v.jsx("span",{ref:T=>{T&&C.setIcon(T,"arrow-down-narrow-wide")},className:"tags-sort-btn",onClick:g})]}),v.jsxs("div",{className:"tags-container",children:[l.sort(zxe(f)).map((T,S)=>v.jsx(TO,{tag:T,tagQuery:e,filterQuery:i},T.text+"-"+S)),v.jsx(ts,{when:l.length<5&&be.initialized,children:v.jsxs("span",{className:"tag-tip-container",children:[E("Input")," ",v.jsxs("span",{className:"code-text",children:[E("#Tag")," "]}),E("to create tag"),"..."]})})]})]})},TO=e=>{const{tag:t,tagQuery:n,filterQuery:r}=e,a=n===t.text||r&&JSON.parse(r.querystring).find(p=>p.type==="TAG"&&p.value.value===t.text),o=t.subTags.length>0,[i,l]=Jl(!1),c=async p=>{var g;if(p.ctrlKey||p.metaKey){const{verifyState:y}=ft.getState(),w=!C.Platform.isDesktop&&await((g=window.Capacitor)==null?void 0:g.Plugins.Device.getId()),T=C.Platform.isDesktop?await cr():w.identifier||w.uuid;if(!(y&&(y==null?void 0:y.appId)===T)){Sn();return}const I=ot.getState().query.filter;if(I&&(I!=null&&I.startsWith("Filter [Temp] "))){const N=sn.getQueryById(I).querystring,_=JSON.parse(N);let k;if(_.some(R=>R.type==="TAG"&&R.value.value===t.text)){if(k=_.filter(L=>L.value.value!==t.text),k.length===0){ot.setMemoFilter("");return}const R=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...k[0],relation:"AND"},...k.slice(1)]));sn.pushQuery(R),ot.setMemoFilter(R.id)}else{k=[..._,{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}];const R=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(k));sn.pushQuery(R),ot.setMemoFilter(R.id)}}else if(n){ot.setTagQuery("");const M=sn.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"}]));sn.pushQuery(M),ot.setMemoFilter(M.id)}else if(!n){const M=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"AND"}]));sn.pushQuery(M),ot.setMemoFilter(M.id)}ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(ot.getState().pathname)||ot.setPathname("/");return}if(a){if(ot.setTagQuery(""),r){const w=JSON.parse(r.querystring).filter(S=>S.value.value!==t.text);if(w.length===0){ot.setMemoFilter("");return}const T=sn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...w[0],relation:"AND"},...w.slice(1)]));sn.pushQuery(T),ot.setMemoFilter(T.id)}}else await ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(ot.getState().pathname)||ot.setPathname("/"),ot.setTagQuery(t.text)},f=p=>{p.stopPropagation(),l()};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`tag-item-container ${a?"active":""}`,onClick:c,children:[v.jsxs("div",{className:"tag-text-container",children:[v.jsx("span",{ref:p=>{p&&C.setIcon(p,"hash")},className:"btn tag-btn"}),v.jsx("span",{className:"tag-text",children:t.key})]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{className:"tag-count",children:t.count}),o?v.jsx("span",{ref:p=>{p&&C.setIcon(p,"chevron-right")},className:`btn action-btn toggle-btn ${i?"shown":""}`,onClick:f}):null]})]}),o?v.jsx("div",{className:`subtags-container ${i?"":"hidden"}`,children:t.subTags.map((p,g)=>v.jsx(TO,{tag:p,tagQuery:n},p.text+"-"+g))}):null]})},K4=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base",numeric:!0}).compare,qD={alphabetical:(e,t)=>K4(e.text,t.text),alphabeticalReverse:(e,t)=>-K4(e.text,t.text),byCount:(e,t)=>t.count-e.count,byCountReverse:(e,t)=>e.count-t.count},zxe=(e="byCount")=>qD.hasOwnProperty(e)?qD[e]:qD.alphabetical,Q4=()=>{const{dailyNotesState:{app:e,settings:t,verifyState:n}}=P.useContext(Lt),r=[{name:E("Random Review"),path:"/review",iconID:"star"},{name:E("ARCHIVE"),path:"/archive",iconID:"archive"},{name:E("Recycle bin"),path:"/recycle",iconID:"recycle"}],a=P.useRef([]);return P.useEffect(()=>{a.current.forEach((o,i)=>{o&&C.setIcon(o,r[i].iconID)})},[t,a]),v.jsx(v.Fragment,{children:v.jsx("div",{className:"path-entry-wrapper",children:r.map((o,i)=>v.jsx(v.Fragment,{children:v.jsxs("div",{className:`path-entry-container ${ot.getState().pathname===o.path?"active":""} ${t.DeleteThinoDirectly&&o.path==="/recycle"?"hidden":""} ${o.path==="/review"&&"pro"}`,onClick:async()=>{var f;const l=!C.Platform.isDesktop&&await((f=window.Capacitor)==null?void 0:f.Plugins.Device.getId()),c=C.Platform.isDesktop?await cr():l.identifier||l.uuid;if(!n&&(n==null?void 0:n.appId)!==c&&o.path==="/review"){Sn();return}if(ot.setPathname(o.path),o.path==="/review"&&ot.getState().pathname==="/review"){e.workspace.trigger("refresh-review-memos");return}ot.clearQuery()},children:[v.jsx("span",{ref:l=>a.current[i]=l,className:"path-entry-icon"}),v.jsx("span",{className:"path-entry-text",children:o.name})]},i)}))})})},X4=e=>{const{dailyNotesState:{settings:t},locationState:n,globalState:{isMobileView:r,showSiderbarInMobileView:a}}=P.useContext(Lt),o=P.useRef(null),i=P.useMemo(()=>l=>{var f,p,g;const c=dt.getState().showSiderbarInMobileView;if(!c){window.removeEventListener("click",i,{capture:!0});return}(f=o.current)!=null&&f.contains(l.target)||(g=(p=o.current)==null?void 0:p.parentNode)!=null&&g.contains(l.target)&&(c&&l.stopPropagation(),dt.setShowSiderbarInMobileView(!1),window.removeEventListener("click",i,{capture:!0}))},[]);return P.useEffect(()=>{dt.setShowSiderbarInMobileView(!1)},[n]),P.useEffect(()=>{a?document.body.classList.add(Ix):document.body.classList.remove(Ix)},[a]),P.useEffect(()=>{r&&a&&window.addEventListener("click",i,{capture:!0})},[r,a]),v.jsxs("aside",{className:ar("memos-sidebar-wrapper",e.className),ref:o,children:[e.children,v.jsx(Yxe,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?v.jsx(Qg,{}):null:v.jsx(Qg,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="left"?v.jsxs(v.Fragment,{children:[v.jsx(Q4,{}),v.jsx(G4,{}),v.jsx(V2,{statusType:"sidebar"})]}):null:v.jsxs(v.Fragment,{children:[v.jsx(Q4,{}),v.jsx(G4,{})]}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?v.jsx(v.Fragment,{children:v.jsx(J4,{})}):null:v.jsx(v.Fragment,{children:v.jsx(J4,{})})]})},Vxe=()=>{const{dailyNotesState:{settings:e}}=P.useContext(Lt),[t,n]=ne.useState(""),r=a=>{n(a.target.value)};return v.jsx("div",{className:"locked-screen-wrapper",children:v.jsxs("div",{className:"locked-screen-content",children:[v.jsx("div",{className:"locked-screen-header",children:v.jsx("div",{className:"locked-screen-header-title",children:E("Locked")})}),v.jsx("div",{className:"locked-screen-body",children:v.jsxs("div",{className:"locked-screen-body-content",children:[v.jsxs("div",{className:"locked-screen-body-content-text",children:[v.jsx("div",{className:"locked-screen-body-content-text-title",children:E("Thino is locked")}),v.jsx("div",{className:"locked-screen-body-content-text-desc",children:E("Please unlock Thino by input password")})]}),v.jsxs("div",{className:"locked-screen-body-content-inputer",children:[v.jsx("input",{onKeyDown:a=>{a.key==="Enter"&&((e==null?void 0:e.password)===t?dt.setLocked(!1):new C.Notice(E("Password is incorrect")))},onChange:r,value:t,type:"password",className:"locked-screen-body-content-input"}),v.jsx("button",{className:"locked-screen-body-content-btn",onClick:()=>{(e==null?void 0:e.password)===t?dt.setLocked(!1):new C.Notice(E("Password is incorrect"))},children:E("Unlock")})]})]})})]})})};class rf extends _6{fuzzySearchItemsOptimized(t,n){const r=C.prepareFuzzySearch(t);return n.map(a=>{const o=r(a.path);return o?{item:a,match:o,score:o.score}:null}).sort((a,o)=>(o==null?void 0:o.score)-(a==null?void 0:a.score)).filter(Boolean)}getSuggestions(t){const r=app.vault.getFiles().filter(o=>["png","jpg","jpeg","gif"].includes(o.extension)),a=t.toLowerCase();return this.fuzzySearchItemsOptimized(a,r).map(o=>o.item)}renderSuggestion(t,n){var o;const r=t.basename,a=((o=t.parent)==null?void 0:o.path)||"";n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:r}),n.createSpan({cls:"suggestion-path",text:a})}selectSuggestion(t){this.inputEl.value=t.path,this.inputEl.trigger("input"),this.close()}}const Wxe=e=>{const{dailyNotesState:{settings:t,app:n,plugin:r},globalState:{manifest:a}}=P.useContext(Lt),[o,i]=ne.useState(0),[l,c]=ne.useState(""),f=ne.useRef(null),p=ne.useRef(null),[g,y]=ne.useState({enabled:!1,path:"",format:""});P.useEffect(()=>{if(o===2&&(t!=null&&t.EnabledLocationList.find(I=>I.value==="DAILY")))if(!Wg())y({enabled:!1,path:"",format:""});else{const I=qc().folder,M=qc().format;y({enabled:!0,path:I,format:M})}},[o]),P.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n){c("");return}const I=n.vault.adapter.getResourcePath(C.normalizePath(t.MomentsIcon));I&&!(t!=null&&t.MomentsIcon.startsWith("http"))?c(I):c(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),P.useEffect(()=>{p&&(p.current=null)},[o]),P.useEffect(()=>{f.current&&(p.current||(p.current=new rf(f.current)))},[f.current]);const w=(I,M)=>{let N=r;N||(N=n.plugins.getPlugin("obsidian-memos")),N.settingTab.updateSettings(I,M)},T=P.useMemo(()=>{switch(o){case 0:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Get started with Thino")}),v.jsx("p",{children:E("Set up your user info for Thino.")})]});case 1:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Set theme for Thino")}),v.jsx("p",{children:E("Choose a theme for Thino.")})]});case 2:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Go with daily note plugin")}),v.jsx("p",{children:E("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 v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Set preferences for using Thino")}),v.jsx("p",{children:E("Adjust settings that influence your user experience with Thino.")})]});case 4:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Congrats! All settings done")}),v.jsx("p",{children:E("Go and enjoy Thino")})]})}},[o]),S=()=>{switch(o){case 0:return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-user-preview-wrapper",children:v.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:[v.jsx("div",{ref:I=>{if(t!=null&&t.MomentsIcon){I==null||I.empty();return}t!=null&&t.MomentsIcon||I&&C.setIcon(I,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${l}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsx("span",{className:"username-container",children:v.jsx("span",{"aria-label":(t==null?void 0:t.UserName)==="MEMO 😉"?"THINO 😉":(t==null?void 0:t.UserName)||"THINO",className:"username-text",children:(t==null?void 0:t.UserName)==="MEMO 😉"?"THINO 😉":(t==null?void 0:t.UserName)||"THINO"})}),(t==null?void 0:t.MomentsQuote)&&v.jsx("span",{className:"thino-user-quote",children:t==null?void 0:t.MomentsQuote})]})]})}),v.jsxs("div",{className:"thino-user-info-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User name")}),v.jsx("div",{className:"setting-item-description",children:E("Set your user name here. 'Memos 😏' By default")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"Thino 😏",defaultValue:t==null?void 0:t.UserName,onInput:I=>w("UserName",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User quote")}),v.jsx("div",{className:"setting-item-description",children:E("Set user quote for thino")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"Share thino with the world",defaultValue:t==null?void 0:t.MomentsQuote,onInput:I=>w("MomentsQuote",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User icon")}),v.jsx("div",{className:"setting-item-description",children:E("Set user icon for thino. You can input http/https link or file path in vault.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",ref:f,placeholder:"Input url or file path",defaultValue:t==null?void 0:t.MomentsIcon,onInput:I=>w("MomentsIcon",I.currentTarget.value)})})]})]})]});case 1:return v.jsx(v.Fragment,{children:v.jsxs("div",{className:ar("theme-selector-group","selected"),children:[v.jsxs("div",{className:ar("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="modern"?"selected":""),onClick:()=>w("DefaultThemeForThino","modern"),children:[v.jsxs("div",{className:"theme-selector-header-component",children:[v.jsx("div",{className:"theme-selector-header",children:E("Modern")}),v.jsx("div",{className:"theme-selector-description",children:E("A modern theme for Thino with a three-column layout and some unique features.")})]}),v.jsxs("div",{className:"theme-selector-content",children:[v.jsx("div",{className:"left-column column-component"}),v.jsx("div",{className:"center-column column-component"}),v.jsx("div",{className:"right-column column-component"})]}),v.jsx("div",{className:"theme-selector-footer",children:v.jsx("button",{className:"mod-cta",disabled:(t==null?void 0:t.DefaultThemeForThino)==="modern",onClick:()=>w("DefaultThemeForThino","modern"),children:(t==null?void 0:t.DefaultThemeForThino)==="modern"?E("Selected"):E("Select")})})]}),v.jsxs("div",{className:ar("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="classic"?"selected":""),onClick:()=>w("DefaultThemeForThino","classic"),children:[v.jsxs("div",{className:"theme-selector-header-component",children:[v.jsx("div",{className:"theme-selector-header",children:E("Classic")}),v.jsx("div",{className:"theme-selector-description",children:E("A classic theme for Thino with a two-column layout")})]}),v.jsxs("div",{className:"theme-selector-content",children:[v.jsx("div",{className:"left-column column-component"}),v.jsx("div",{className:"center-column column-component"})]}),v.jsx("div",{className:"theme-selector-footer",children:v.jsx("button",{className:"mod-cta",disabled:(t==null?void 0:t.DefaultThemeForThino)==="classic",onClick:()=>w("DefaultThemeForThino","classic"),children:(t==null?void 0:t.DefaultThemeForThino)==="classic"?E("Selected"):E("Select")})})]})]})});case 2:return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"daily-note-plugin-status",children:[v.jsxs("div",{className:"daily-note-plugin-status-header",children:[v.jsx("div",{className:"plugin-status-header",children:E("Daily note plugin")}),v.jsx("div",{className:"plugin-status-description",children:E("Enable daily note plugin")})]}),v.jsx("div",{className:"daily-note-plugin-status-content",children:g.enabled&&v.jsx(v.Fragment,{children:v.jsxs("div",{className:"daily-note-format",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Daily note name format")}),v.jsx("div",{className:"setting-item-description",children:E("Set daily note name format")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.format,onInput:I=>{y({...g,format:I.currentTarget.value.trim()});try{const M=n.internalPlugins.getPluginById("daily-notes");M.instance.options={...M.instance.options,format:I.currentTarget.value.trim()},M.saveData({...M.instance.options,format:I.currentTarget.value.trim()})}catch(M){console.error(M)}}})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Daily notes folder")}),v.jsx("div",{className:"setting-item-description",children:E("Set daily notes folder")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.path,onInput:I=>{y({...g,path:I.currentTarget.value.trim()});try{const M=n.internalPlugins.getPluginById("daily-notes");M.instance.options={...M.instance.options,folder:I.currentTarget.value.trim()},M.saveData({...M.instance.options,folder:I.currentTarget.value.trim()})}catch(M){console.error(M)}}})})]})]})})}),v.jsxs("div",{className:"daily-note-plugin-status-footer",children:[!g.enabled&&v.jsx("div",{className:"notice-click",children:E("Click to enable =>")}),v.jsx("button",{className:"mod-cta",disabled:g.enabled,onClick:()=>{if(!g.enabled){n.internalPlugins.getPluginById("daily-notes").enable();const I=qc().folder,M=qc().format;y({enabled:!0,format:M,path:I})}},children:g.enabled?E("Enabled"):E("Enable")})]})]}),v.jsxs("div",{className:"thino-daily-settings-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default time prefix")}),v.jsx("div",{className:"setting-item-description",children:E("Set default time prefix for thino in daily notes.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultTimePrefix,onChange:I=>w("DefaultTimePrefix",I.currentTarget.value),children:[v.jsx("option",{value:"HH:mm",children:"HH:mm"}),v.jsx("option",{value:"HH:mm:ss",children:"HH:mm:ss"})]})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Set thino insert place")}),v.jsx("div",{className:"setting-item-description",children:E("Set where to insert thino content")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.InsertType,onChange:I=>w("InsertType",I.currentTarget.value),children:[v.jsx("option",{value:"end",children:E("End of the diary")}),v.jsx("option",{value:"custom",children:E("Custom location")})]})})]}),(t==null?void 0:t.InsertType)==="custom"&&v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Insert after heading")}),v.jsx("div",{className:"setting-item-description",children:E("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.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.InsertAfter,onInput:I=>w("InsertAfter",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Set process target")}),v.jsx("div",{className:"setting-item-description",children:E("You can set whole diary or only part of it")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.ProcessContentTarget,onChange:I=>w("ProcessContentTarget",I.currentTarget.value),children:[v.jsx("option",{value:"custom",children:E("Custom")}),v.jsx("option",{value:"whole",children:E("Whole diary")})]})})]}),(t==null?void 0:t.ProcessContentTarget)==="custom"&&v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Process Memos below")}),v.jsx("div",{className:"setting-item-description",children:E("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.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.ProcessEntriesBelow,onInput:I=>w("ProcessEntriesBelow",I.currentTarget.value)})})]})]})]});case 3:return v.jsx(v.Fragment,{children:v.jsxs("div",{className:"thino-custom-settings-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default prefix when save thino")}),v.jsx("div",{className:"setting-item-description",children:E("Set the default prefix when create memo, 'List' by default.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultPrefix,onChange:I=>w("DefaultPrefix",I.currentTarget.value),children:[v.jsx("option",{value:"List",children:E("List")}),v.jsx("option",{value:"Task",children:E("Task")})]})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Use Tags In Vault")}),v.jsx("div",{className:"setting-item-description",children:E("Use tags in vault rather than only in Memos. False by default.")})]}),v.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new C.ToggleComponent(I).setValue((t==null?void 0:t.UseVaultTags)===void 0?!1:t==null?void 0:t.UseVaultTags).onChange(M=>{w("UseVaultTags",M)}))}})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Delete Thino Directly")}),v.jsx("div",{className:"setting-item-description",children:E("When delete thino directly, it will not be moved to trash. False by default.")})]}),v.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new C.ToggleComponent(I).setValue((t==null?void 0:t.DeleteThinoDirectly)===void 0?!1:t==null?void 0:t.DeleteThinoDirectly).onChange(M=>{w("DeleteThinoDirectly",M)}))}})]})]})});case 4:return v.jsx(v.Fragment,{children:v.jsxs("div",{className:"thino-congrats",children:[v.jsxs("div",{className:"final-congrats-text",children:[v.jsx("p",{className:"ready-use",children:E("Thino is ready to use. ")}),v.jsx("p",{className:"start-to-use",children:E("You can start using Thino now. If you want to know more about Thino Pro, click the button below.")})]}),v.jsxs("div",{className:"next-btns-group",children:[v.jsx("button",{onClick:()=>{const I=localStorage.getItem("language");I&&(I==="zh"||I==="zh-TW")?window.open("https://pkmer.cn/products/thino"):window.open("https://thino.pkmer.net/en/#price")},children:E("About Thino Pro")}),v.jsx("button",{className:"mod-cta",onClick:()=>{w("FirstLoaded",!1),dt.getState().isMobileView?(setTimeout(()=>{dt.setShowSiderbarInMobileView(!0)},500),setTimeout(()=>{dt.setExitSteps(!0)},1e3)):setTimeout(()=>{dt.setExitSteps(!0)},800)},children:E("Start Thino")})]})]})})}};return v.jsx(v.Fragment,{children:v.jsx("div",{className:"onboarding-view-container",children:v.jsx("div",{className:"onboarding-view-wrapper",children:v.jsxs("div",{"data-onboarding-step":o,className:"onboarding-view-content",children:[v.jsxs("div",{className:"onboarding-step-count",children:[o+1,"/5"]}),v.jsxs("div",{className:"onboarding-view-details",children:[v.jsxs("div",{className:"details-content",children:[v.jsx("div",{className:"onboarding-header-group",children:T}),v.jsx(v.Fragment,{children:v.jsx("div",{className:"onboarding-form",children:S()})})]}),v.jsxs("div",{className:"details-footer",children:[v.jsx("div",{className:"skip-btn",children:o!==4&&v.jsx("button",{onClick:()=>{w("FirstLoaded",!1)},children:E("Skip and start Thino")})}),v.jsxs("div",{className:"navigate-btns-group",children:[o!==0&&v.jsx("button",{onClick:()=>i(o-1),children:E("Back to previous step")}),o!==4&&v.jsx("button",{className:"mod-cta",onClick:()=>i(o+1),children:E("Next step")}),o===4&&v.jsx("button",{className:"details-settings-btn",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:E("Details settings")})]})]})]})]})})})})};function nb(e){return nb=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},nb(e)}function Wn(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(f){try{c(r.next(f))}catch(p){o(p)}}function l(f){try{c(r.throw(f))}catch(p){o(p)}}function c(f){var p;f.done?a(f.value):(p=f.value,p instanceof n?p:new n(function(g){g(p)})).then(i,l)}c((r=r.apply(e,t||[])).next())})}function $n(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(f){return function(p){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,p[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&p[0]?r.return:p[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,p[1])).done)return a;switch(r=0,a&&(p=[2&p[0],a.value]),p[0]){case 0:case 1:a=p;break;case 4:return i.label++,{value:p[1],done:!1};case 5:i.label++,r=p[1],p=[0];continue;case 7:p=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!((a=a.length>0&&a[a.length-1])||p[0]!==6&&p[0]!==2)){i=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){i.label=p[1];break}if(p[0]===6&&i.label<a[1]){i.label=a[1],a=p;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(p);break}a[2]&&i.ops.pop(),i.trys.pop();continue}p=t.call(e,i)}catch(g){p=[6,g],r=0}finally{n=a=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([c,f])}}}function eN(e,t,n){var r,a=((r={})[e]=t,r.path="/",r.expires=void 0,r);if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),a.expires=o.toUTCString()}var i=[];for(var l in a)i.push("".concat(l,"=").concat(a[l]));return document.cookie=i.join("; "),IO(e)}function IO(e){return(t={},document.cookie.split(";").forEach(function(n){var r=n.split("="),a=r[0],o=r[1];t[a.trim()]=o}),t)[e];var t}function $xe(e,t){t?eN(e._options.dontShowAgainCookie,"true",e._options.dontShowAgainCookieDays):eN(e._options.dontShowAgainCookie,"",-1)}var U0,g2=(U0={},function(e,t){return t===void 0&&(t="introjs-stamp"),U0[t]=U0[t]||0,e[t]===void 0&&(e[t]=U0[t]++),e[t]}),Gl=new(function(){function e(){this.events_key="introjs_event"}return e.prototype._id=function(t,n,r){return t+g2(n)+(r?"_".concat(g2(r)):"")},e.prototype.on=function(t,n,r,a,o){var i=this._id(n,r,a),l=function(c){return r(a||t,c||window.event)};"addEventListener"in t?t.addEventListener(n,l,o):"attachEvent"in t&&t.attachEvent("on".concat(n),l),t[this.events_key]=t[this.events_key]||{},t[this.events_key][i]=l},e.prototype.off=function(t,n,r,a,o){var i=this._id(n,r,a),l=t[this.events_key]&&t[this.events_key][i];l&&("removeEventListener"in t?t.removeEventListener(n,l,o):"detachEvent"in t&&t.detachEvent("on".concat(n),l),t[this.events_key][i]=null)},e}()),lr=function(e){return typeof e=="function"};function $l(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,a=t.split(" ");r<a.length;r++){var o=a[r];e.classList.add(o)}else e.className.match(t)||(e.className+=" ".concat(t))}function zE(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 tN(e,t){if(e){var n=function(r){var a=window.getComputedStyle(r),o=a.position==="absolute",i=/(auto|scroll)/;if(a.position==="fixed")return document.body;for(var l=r;l=l.parentElement;)if(a=window.getComputedStyle(l),(!o||a.position!=="static")&&i.test(a.overflow+a.overflowY+a.overflowX))return l;return document.body}(t);n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop)}}function VE(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function nN(e,t,n,r,a){var o;if(t!=="off"&&e&&(o=t==="tooltip"?a.getBoundingClientRect():r.getBoundingClientRect(),!function(l){var c=l.getBoundingClientRect();return c.top>=0&&c.left>=0&&c.bottom+80<=window.innerHeight&&c.right<=window.innerWidth}(r))){var i=VE().height;o.bottom-(o.bottom-o.top)<0||r.clientHeight>i?window.scrollBy(0,o.top-(i/2-o.height/2)-n):window.scrollBy(0,o.top-(i/2-o.height/2)+n)}}function Ug(e){e.setAttribute("role","button"),e.tabIndex=0}function y1(e){var t=e.parentElement;return!(!t||t.nodeName==="HTML")&&(zE(e,"position")==="fixed"||y1(t))}function Mp(e,t){var n=document.body,r=document.documentElement,a=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),c=zE(t,"position"),f={width:i.width,height:i.height};return t.tagName.toLowerCase()!=="body"&&c==="relative"||c==="sticky"?Object.assign(f,{top:i.top-l.top,left:i.left-l.left}):y1(e)?Object.assign(f,{top:i.top,left:i.left}):Object.assign(f,{top:i.top+a,left:i.left+o})}function WE(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 td(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 Ru(e,t,n){if(n&&t){var r=Mp(t.element,e._targetElement),a=e._options.helperElementPadding;t.element instanceof Element&&y1(t.element)?$l(n,"introjs-fixedTooltip"):WE(n,"introjs-fixedTooltip"),t.position==="floating"&&(a=0),td(n,{width:"".concat(r.width+a,"px"),height:"".concat(r.height+a,"px"),top:"".concat(r.top-a/2,"px"),left:"".concat(r.left-a/2,"px")})}}function z0(e,t,n,r,a){return e.left+t+n.width>r.width?(a.style.left="".concat(r.width-n.width-e.left,"px"),!1):(a.style.left="".concat(t,"px"),!0)}function V0(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 Ol(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function Zxe(e,t,n,r){var a=e.slice(),o=VE(),i=Mp(n).height+10,l=Mp(n).width+20,c=t.getBoundingClientRect(),f="floating";if(c.bottom+i>o.height&&Ol(a,"bottom"),c.top-i<0&&Ol(a,"top"),c.right+l>o.width&&Ol(a,"right"),c.left-l<0&&Ol(a,"left"),r&&(r=r.split("-")[0]),a.length&&(f=a[0],a.includes(r)&&(f=r)),f==="top"||f==="bottom"){var p=void 0,g=[];f==="top"?(p="top-middle-aligned",g=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(p="bottom-middle-aligned",g=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),f=function(y,w,T,S){var I=w/2,M=Math.min(T,window.screen.width);return M-y<w&&(Ol(S,"top-left-aligned"),Ol(S,"bottom-left-aligned")),(y<I||M-y<I)&&(Ol(S,"top-middle-aligned"),Ol(S,"bottom-middle-aligned")),y<w&&(Ol(S,"top-right-aligned"),Ol(S,"bottom-right-aligned")),S.length?S[0]:null}(c.left,l,o.width,g)||p}return f}function rb(e,t,n,r,a){if(a===void 0&&(a=!1),t){var o,i,l,c,f="";n.style.top="",n.style.right="",n.style.bottom="",n.style.left="",n.style.marginLeft="",n.style.marginTop="",r.style.display="inherit",f=typeof t.tooltipClass=="string"?t.tooltipClass:e._options.tooltipClass,n.className=["introjs-tooltip",f].filter(Boolean).join(" "),n.setAttribute("role","dialog"),(c=t.position)!=="floating"&&e._options.autoPosition&&(c=Zxe(e._options.positionPrecedence,t.element,n,c)),i=Mp(t.element),o=Mp(n),l=VE(),$l(n,"introjs-".concat(c));var p=i.width/2-o.width/2;switch(c){case"top-right-aligned":r.className="introjs-arrow bottom-right";var g=0;V0(i,g,o,n),n.style.bottom="".concat(i.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",a&&(p+=5),V0(i,p,o,n)&&(n.style.right="",z0(i,p,o,l,n)),n.style.bottom="".concat(i.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",z0(i,a?0:15,o,l,n),n.style.bottom="".concat(i.height+20,"px");break;case"right":n.style.left="".concat(i.width+20,"px"),i.top+o.height>l.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(o.height-i.height-20,"px")):r.className="introjs-arrow left";break;case"left":a||e._options.showStepNumbers!==!0||(n.style.top="15px"),i.top+o.height>l.height?(n.style.top="-".concat(o.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(o.width/2,"px"),n.style.marginTop="-".concat(o.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",V0(i,g=0,o,n),n.style.top="".concat(i.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",a&&(p+=5),V0(i,p,o,n)&&(n.style.right="",z0(i,p,o,l,n)),n.style.top="".concat(i.height+20,"px");break;default:r.className="introjs-arrow top",z0(i,0,o,l,n),n.style.top="".concat(i.height+20,"px")}}}function EO(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e<t.length;e++)WE(t[e],/introjs-[a-zA-Z]+/g)}function Cn(e,t){var n=document.createElement(e);t=t||{};var r=/^(?:role|data-|aria-)/;for(var a in t){var o=t[a];a==="style"&&typeof o!="function"?td(n,o):typeof o=="string"&&a.match(r)?n.setAttribute(a,o):n[a]=o}return n}function rN(e,t,n){if(n===void 0&&(n=!1),n){var r=t.style.opacity||"1";td(t,{opacity:"0"}),window.setTimeout(function(){td(t,{opacity:r})},10)}e.appendChild(t)}function xO(e,t){return(e+1)/t*100}function CO(e,t){var n=Cn("div",{className:"introjs-bullets"});e._options.showBullets===!1&&(n.style.display="none");var r=Cn("ul");r.setAttribute("role","tablist");for(var a=function(){var f=this.getAttribute("data-step-number");f!=null&&e.goToStep(parseInt(f,10))},o=0;o<e._introItems.length;o++){var i=e._introItems[o].step,l=Cn("li"),c=Cn("a");l.setAttribute("role","presentation"),c.setAttribute("role","tab"),c.onclick=a,o===t.step-1&&(c.className="active"),Ug(c),c.innerHTML="&nbsp;",c.setAttribute("data-step-number",i.toString()),l.appendChild(c),r.appendChild(l)}return n.appendChild(r),n}function MO(e,t,n){var r=e.querySelector(".introjs-progress .introjs-progressbar");if(r){var a=xO(t,n);r.style.cssText="width:".concat(a,"%;"),r.setAttribute("aria-valuenow",a.toString())}}function kO(e,t){return Wn(this,void 0,void 0,function(){var n,r,a,o,i,l,c,f,p,g,y,w,T,S,I,M,N,_,k,R,L,H,U,z,$=this;return $n(this,function(X){switch(X.label){case 0:return lr(e._introChangeCallback)?[4,e._introChangeCallback.call(e,t.element)]:[3,2];case 1:X.sent(),X.label=2;case 2:return n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),a="introjs-helperLayer",typeof t.highlightClass=="string"&&(a+=" ".concat(t.highlightClass)),typeof e._options.highlightClass=="string"&&(a+=" ".concat(e._options.highlightClass)),n!==null&&r!==null?(c=r.querySelector(".introjs-helperNumberLayer"),f=r.querySelector(".introjs-tooltiptext"),p=r.querySelector(".introjs-tooltip-title"),g=r.querySelector(".introjs-arrow"),y=r.querySelector(".introjs-tooltip"),l=r.querySelector(".introjs-skipbutton"),i=r.querySelector(".introjs-prevbutton"),o=r.querySelector(".introjs-nextbutton"),n.className=a,y.style.opacity="0",y.style.display="none",tN(e._options.scrollToElement,t.element),Ru(e,t,n),Ru(e,t,r),EO(),e._lastShowElementTimer&&window.clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=window.setTimeout(function(){c!==null&&(c.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length)),f.innerHTML=t.intro||"",p.innerHTML=t.title||"",y.style.display="block",rb(e,t,y,g),function(Q,se,ue){if(Q){var fe=se.querySelector(".introjs-bullets li > a.active"),Z=se.querySelector('.introjs-bullets li > a[data-step-number="'.concat(ue.step,'"]'));fe&&Z&&(fe.className="",Z.className="active")}}(e._options.showBullets,r,t),MO(r,e._currentStep,e._introItems.length),y.style.opacity="1",(o!=null&&/introjs-donebutton/gi.test(o.className)||o!=null)&&o.focus(),nN(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,f)},350)):(w=Cn("div",{className:a}),T=Cn("div",{className:"introjs-tooltipReferenceLayer"}),S=Cn("div",{className:"introjs-arrow"}),I=Cn("div",{className:"introjs-tooltip"}),M=Cn("div",{className:"introjs-tooltiptext"}),N=Cn("div",{className:"introjs-tooltip-header"}),_=Cn("h1",{className:"introjs-tooltip-title"}),k=Cn("div"),td(w,{"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")}),tN(e._options.scrollToElement,t.element),Ru(e,t,w),Ru(e,t,T),rN(e._targetElement,w,!0),rN(e._targetElement,T),M.innerHTML=t.intro,_.innerHTML=t.title,k.className="introjs-tooltipbuttons",e._options.showButtons===!1&&(k.style.display="none"),N.appendChild(_),I.appendChild(N),I.appendChild(M),e._options.dontShowAgain&&(R=Cn("div",{className:"introjs-dontShowAgain"}),(L=Cn("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(Q){e.setDontShowAgain(Q.target.checked)},(H=Cn("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,R.appendChild(L),R.appendChild(H),I.appendChild(R)),I.appendChild(CO(e,t)),I.appendChild(function(Q){var se=Cn("div");se.className="introjs-progress",Q._options.showProgress===!1&&(se.style.display="none");var ue=Cn("div",{className:"introjs-progressbar"});Q._options.progressBarAdditionalClass&&(ue.className+=" "+Q._options.progressBarAdditionalClass);var fe=xO(Q._currentStep,Q._introItems.length);return ue.setAttribute("role","progress"),ue.setAttribute("aria-valuemin","0"),ue.setAttribute("aria-valuemax","100"),ue.setAttribute("aria-valuenow",fe.toString()),ue.style.cssText="width:".concat(fe,"%;"),se.appendChild(ue),se}(e)),U=Cn("div"),e._options.showStepNumbers===!0&&(U.className="introjs-helperNumberLayer",U.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),I.appendChild(U)),I.appendChild(S),T.appendChild(I),(o=Cn("a")).onclick=function(){return Wn($,void 0,void 0,function(){return $n(this,function(Q){switch(Q.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,Ef(e)];case 1:return Q.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(o.className)?lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:Q.sent(),Q.label=4;case 4:return[4,xf(e,e._targetElement)];case 5:Q.sent(),Q.label=6;case 6:return[2]}})})},Ug(o),o.innerHTML=e._options.nextLabel,(i=Cn("a")).onclick=function(){return Wn($,void 0,void 0,function(){return $n(this,function(Q){switch(Q.label){case 0:return e._currentStep>0?[4,ab(e)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return[2]}})})},Ug(i),i.innerHTML=e._options.prevLabel,Ug(l=Cn("a",{className:"introjs-skipbutton"})),l.innerHTML=e._options.skipLabel,l.onclick=function(){return Wn($,void 0,void 0,function(){return $n(this,function(Q){switch(Q.label){case 0:return e._introItems.length-1===e._currentStep&&lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return lr(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[4,xf(e,e._targetElement)];case 5:return Q.sent(),[2]}})})},N.appendChild(l),e._introItems.length>1&&k.appendChild(i),k.appendChild(o),I.appendChild(k),rb(e,t,I,S),nN(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,I)),(z=e._targetElement.querySelector(".introjs-disableInteraction"))&&z.parentNode&&z.parentNode.removeChild(z),t.disableInteraction&&function(Q,se){var ue=document.querySelector(".introjs-disableInteraction");ue===null&&(ue=Cn("div",{className:"introjs-disableInteraction"}),Q._targetElement.appendChild(ue)),Ru(Q,se,ue)}(e,t),e._currentStep===0&&e._introItems.length>1?(o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton"),o.innerHTML=e._options.nextLabel),e._options.hidePrev===!0?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),o!=null&&$l(o,"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?(o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),i!=null&&$l(i,"introjs-fullbutton")):o!=null&&(e._options.nextToDone===!0?(o.innerHTML=e._options.doneLabel,$l(o,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):o.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton")),o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton"),o.innerHTML=e._options.nextLabel)),i!=null&&i.setAttribute("role","button"),o!=null&&o.setAttribute("role","button"),l!=null&&l.setAttribute("role","button"),o!=null&&o.focus(),function(Q){$l(Q,"introjs-showElement");var se=zE(Q,"position");se!=="absolute"&&se!=="relative"&&se!=="sticky"&&se!=="fixed"&&$l(Q,"introjs-relativePosition")}(t.element),lr(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:X.sent(),X.label=4;case 4:return[2]}})})}function qxe(e,t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,e._introItems===void 0?[3,2]:[4,Ef(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Gxe(e,t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,e._introItems===void 0?[3,2]:[4,Ef(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Ef(e){return Wn(this,void 0,void 0,function(){var t,n,r;return $n(this,function(a){switch(a.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,lr(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,n&&n.element,e._currentStep,e._direction)]:[3,2];case 1:r=a.sent(),a.label=2;case 2:return r===!1?(--e._currentStep,[2,!1]):e._introItems.length<=e._currentStep?lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"end")]:[3,4]:[3,6];case 3:a.sent(),a.label=4;case 4:return[4,xf(e,e._targetElement)];case 5:return a.sent(),[2,!1];case 6:return[4,kO(e,n)];case 7:return a.sent(),[2,!0]}})})}function ab(e){return Wn(this,void 0,void 0,function(){var t,n;return $n(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,lr(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,kO(e,t)];case 3:return r.sent(),[2,!0]}})})}function NO(e,t){return Wn(this,void 0,void 0,function(){var n,r;return $n(this,function(a){switch(a.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,xf(e,e._targetElement)];case 1:return a.sent(),[3,16];case 2:return n!=="ArrowLeft"&&n!==37?[3,4]:[4,ab(e)];case 3:return a.sent(),[3,16];case 4:return n!=="ArrowRight"&&n!==39?[3,6]:[4,Ef(e)];case 5:return a.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,ab(e)]:[3,8];case 7:return a.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?e._introItems.length-1===e._currentStep&&lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,10]:[3,12];case 9:a.sent(),a.label=10;case 10:return[4,xf(e,e._targetElement)];case 11:return a.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,Ef(e)];case 14:a.sent(),a.label=15;case 15:t.preventDefault?t.preventDefault():t.returnValue=!1,a.label=16;case 16:return[2]}})})}function $E(e){if(e===null||nb(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]=$E(e[n]);return t}function om(e){var t=document.querySelector(".introjs-hints");return t?Array.from(t.querySelectorAll(e)):[]}function ZE(e,t){return Wn(this,void 0,void 0,function(){var n;return $n(this,function(r){switch(r.label){case 0:return n=om('.introjs-hint[data-step="'.concat(t,'"]'))[0],w1(),n&&$l(n,"introjs-hidehint"),lr(e._hintCloseCallback)?[4,e._hintCloseCallback.call(e,t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}function Jxe(e){return Wn(this,void 0,void 0,function(){var t,n,r,a,o;return $n(this,function(i){switch(i.label){case 0:t=om(".introjs-hint"),n=0,r=t,i.label=1;case 1:return n<r.length?(a=r[n],(o=a.getAttribute("data-step"))?[4,ZE(e,parseInt(o,10))]:[3,3]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})})}function Kxe(e){return Wn(this,void 0,void 0,function(){var t,n,r,a,o;return $n(this,function(i){switch(i.label){case 0:if(!(t=om(".introjs-hint"))||!t.length)return[3,1];for(n=0,r=t;n<r.length;n++)a=r[n],(o=a.getAttribute("data-step"))&&AO(parseInt(o,10));return[3,3];case 1:return[4,PO(e,e._targetElement)];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function AO(e){var t=om('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&WE(t,/introjs-hidehint/g)}function aN(e){var t=om('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&t.parentNode&&t.parentNode.removeChild(t)}function Qxe(e){return Wn(this,void 0,void 0,function(){var t,n,r,a,o,i,l;return $n(this,function(c){switch(c.label){case 0:for((t=document.querySelector(".introjs-hints"))===null&&(t=Cn("div",{className:"introjs-hints"})),n=function(y){return function(w){var T=w||window.event;T&&T.stopPropagation&&T.stopPropagation(),T&&T.cancelBubble!==null&&(T.cancelBubble=!0),OO(e,y)}},r=0;r<e._hintItems.length;r++){if(a=e._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];Ug(o=Cn("a",{className:"introjs-hint"})),o.onclick=n(r),a.hintAnimation||$l(o,"introjs-hint-no-anim"),y1(a.element)&&$l(o,"introjs-fixedhint"),i=Cn("div",{className:"introjs-hint-dot"}),l=Cn("div",{className:"introjs-hint-pulse"}),o.appendChild(i),o.appendChild(l),o.setAttribute("data-step",r.toString()),a.hintTargetElement=a.element,a.element=o,FO(a.hintPosition,o,a.hintTargetElement),t.appendChild(o)}return document.body.appendChild(t),lr(e._hintsAddedCallback)?[4,e._hintsAddedCallback.call(e)]:[3,2];case 1:c.sent(),c.label=2;case 2:return e._options.hintAutoRefreshInterval>=0&&(e._hintsAutoRefreshFunction=(f=function(){return b1(e)},p=e._options.hintAutoRefreshInterval,function(){for(var y=[],w=0;w<arguments.length;w++)y[w]=arguments[w];window.clearTimeout(g),g=window.setTimeout(function(){f(y)},p)}),Gl.on(window,"scroll",e._hintsAutoRefreshFunction,e,!0)),[2]}var f,p,g})})}function FO(e,t,n){if(n!==void 0){var r=Mp(n),a=20,o=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-a,"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-o,"px");break;case"bottom-right":t.style.left="".concat(r.left+r.width-a,"px"),t.style.top="".concat(r.top+r.height-o,"px");break;case"middle-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+(r.height-o)/2,"px");break;case"middle-right":t.style.left="".concat(r.left+r.width-a,"px"),t.style.top="".concat(r.top+(r.height-o)/2,"px");break;case"middle-middle":t.style.left="".concat(r.left+(r.width-a)/2,"px"),t.style.top="".concat(r.top+(r.height-o)/2,"px");break;case"bottom-middle":t.style.left="".concat(r.left+(r.width-a)/2,"px"),t.style.top="".concat(r.top+r.height-o,"px");break;case"top-middle":t.style.left="".concat(r.left+(r.width-a)/2,"px"),t.style.top="".concat(r.top,"px")}}}function OO(e,t){return Wn(this,void 0,void 0,function(){var n,r,a,o,i,l,c,f,p,g,y;return $n(this,function(w){switch(w.label){case 0:return n=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),r=e._hintItems[t],lr(e._hintClickCallback)?[4,e._hintClickCallback.call(e,n,r,t)]:[3,2];case 1:w.sent(),w.label=2;case 2:return(a=w1())!==void 0&&parseInt(a,10)===t||(o=Cn("div",{className:"introjs-tooltip"}),i=Cn("div"),l=Cn("div"),c=Cn("div"),o.onclick=function(T){T.stopPropagation?T.stopPropagation():T.cancelBubble=!0},i.className="introjs-tooltiptext",(f=Cn("p")).innerHTML=r.hint||"",i.appendChild(f),e._options.hintShowButton&&((p=Cn("a")).className=e._options.buttonClass,p.setAttribute("role","button"),p.innerHTML=e._options.hintButtonLabel,p.onclick=function(){return ZE(e,t)},i.appendChild(p)),l.className="introjs-arrow",o.appendChild(l),o.appendChild(i),g=n.getAttribute("data-step")||"",e._currentStep=parseInt(g,10),y=e._hintItems[e._currentStep],c.className="introjs-tooltipReferenceLayer introjs-hintReference",c.setAttribute("data-step",g),Ru(e,y,c),c.appendChild(o),document.body.appendChild(c),rb(e,y,o,l,!0)),[2]}})})}function w1(){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 PO(e,t){return Wn(this,void 0,void 0,function(){var n,r,a,o,i,l,c,f,p,g;return $n(this,function(y){switch(y.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++)a=r[n],typeof(o=$E(a)).element=="string"&&(o.element=document.querySelector(o.element)),o.hintPosition=o.hintPosition||e._options.hintPosition,o.hintAnimation=o.hintAnimation||e._options.hintAnimation,o.element!==null&&e._hintItems.push(o);else{if(!(i=Array.from(t.querySelectorAll("*[data-hint]")))||!i.length)return[2,!1];for(l=0,c=i;l<c.length;l++)f=c[l],p=f.getAttribute("data-hint-animation"),g=e._options.hintAnimation,p&&(g=p==="true"),e._hintItems.push({element:f,hint:f.getAttribute("data-hint")||"",hintPosition:f.getAttribute("data-hint-position")||e._options.hintPosition,hintAnimation:g,tooltipClass:f.getAttribute("data-tooltip-class")||void 0,position:f.getAttribute("data-position")||e._options.tooltipPosition})}return[4,Qxe(e)];case 1:return y.sent(),Gl.on(document,"click",w1,e,!1),Gl.on(window,"resize",b1,e,!0),[2,!0]}})})}function b1(e){for(var t=0,n=e._hintItems;t<n.length;t++){var r=n[t],a=r.hintTargetElement;FO(r.hintPosition,r.element,a)}}function jO(e,t){var n=Array.from(t.querySelectorAll("*[data-intro]")),r=[];if(e._options.steps&&e._options.steps.length)for(var a=0,o=e._options.steps;a<o.length;a++){var i=$E(y=o[a]);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 l=document.querySelector(".introjsFloatingElement");l===null&&(l=Cn("div",{className:"introjsFloatingElement"}),document.body.appendChild(l)),i.element=l,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 c=void 0;if(n.length<1)return[];for(var f=0,p=n;f<p.length;f++){var g=p[f];if((!e._options.group||g.getAttribute("data-intro-group")===e._options.group)&&g.style.display!=="none"){var y=parseInt(g.getAttribute("data-step")||"",10);c=e._options.disableInteraction,g.hasAttribute("data-disable-interaction")&&(c=!!g.getAttribute("data-disable-interaction")),y>0&&(r[y-1]={step:y,element:g,title:g.getAttribute("data-title")||"",intro:g.getAttribute("data-intro")||"",tooltipClass:g.getAttribute("data-tooltip-class")||void 0,highlightClass:g.getAttribute("data-highlight-class")||void 0,position:g.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:g.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:c})}}for(var w=0,T=0,S=n;T<S.length;T++)if(g=S[T],(!e._options.group||g.getAttribute("data-intro-group")===e._options.group)&&g.getAttribute("data-step")===null){for(;r[w]!==void 0;)w++;c=g.hasAttribute("data-disable-interaction")?!!g.getAttribute("data-disable-interaction"):e._options.disableInteraction,r[w]={element:g,title:g.getAttribute("data-title")||"",intro:g.getAttribute("data-intro")||"",step:w+1,tooltipClass:g.getAttribute("data-tooltip-class")||void 0,highlightClass:g.getAttribute("data-highlight-class")||void 0,position:g.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:g.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:c}}}for(var I=[],M=0;M<r.length;M++)r[M]&&I.push(r[M]);return(r=I).sort(function(N,_){return N.step-_.step}),r}function LO(e,t){var n=e._currentStep;if(n!=null&&n!=-1){var r=e._introItems[n],a=document.querySelector(".introjs-tooltipReferenceLayer"),o=document.querySelector(".introjs-helperLayer"),i=document.querySelector(".introjs-disableInteraction");Ru(e,r,o),Ru(e,r,a),Ru(e,r,i),t&&(e._introItems=jO(e,e._targetElement),function(f,p){if(f._options.showBullets){var g=document.querySelector(".introjs-bullets");g&&g.parentNode&&g.parentNode.replaceChild(CO(f,p),g)}}(e,r),MO(a,n,e._introItems.length));var l=document.querySelector(".introjs-arrow"),c=document.querySelector(".introjs-tooltip");return c&&l&&rb(e,e._introItems[n],c,l),b1(e),e}}function RO(e){LO(e)}function Cg(e,t){if(t===void 0&&(t=!1),e&&e.parentElement){var n=e.parentElement;t?(td(e,{opacity:"0"}),window.setTimeout(function(){try{n.removeChild(e)}catch{}},500)):n.removeChild(e)}}function xf(e,t,n){return n===void 0&&(n=!1),Wn(this,void 0,void 0,function(){var r,a,o,i;return $n(this,function(l){switch(l.label){case 0:return r=!0,e._introBeforeExitCallback===void 0?[3,2]:[4,e._introBeforeExitCallback.call(e,t)];case 1:r=l.sent(),l.label=2;case 2:if(!n&&r===!1)return[2];if((a=Array.from(t.querySelectorAll(".introjs-overlay")))&&a.length)for(o=0,i=a;o<i.length;o++)Cg(i[o]);return Cg(t.querySelector(".introjs-helperLayer"),!0),Cg(t.querySelector(".introjs-tooltipReferenceLayer")),Cg(t.querySelector(".introjs-disableInteraction")),Cg(document.querySelector(".introjsFloatingElement")),EO(),Gl.off(window,"keydown",NO,e,!0),Gl.off(window,"resize",RO,e,!0),lr(e._introExitCallback)?[4,e._introExitCallback.call(e)]:[3,4];case 3:l.sent(),l.label=4;case 4:return e._currentStep=-1,[2]}})})}function Xxe(e,t){return Wn(this,void 0,void 0,function(){var n;return $n(this,function(r){switch(r.label){case 0:return e.isActive()?lr(e._introStartCallback)?[4,e._introStartCallback.call(e,t)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return(n=jO(e,t)).length===0?[2,!1]:(e._introItems=n,function(a,o){var i=this,l=Cn("div",{className:"introjs-overlay"});td(l,{top:0,bottom:0,left:0,right:0,position:"fixed"}),o.appendChild(l),a._options.exitOnOverlayClick===!0&&(td(l,{cursor:"pointer"}),l.onclick=function(){return Wn(i,void 0,void 0,function(){return $n(this,function(c){switch(c.label){case 0:return[4,xf(a,o)];case 1:return c.sent(),[2]}})})})}(e,t),[4,Ef(e)]);case 3:r.sent(),t.addEventListener,e._options.keyboardNavigation&&Gl.on(window,"keydown",NO,e,!0),Gl.on(window,"resize",RO,e,!0),r.label=4;case 4:return[2,!1]}})})}function oN(e,t,n){return e[t]=n,e}var GD=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=IO(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=oN(this._options,t,n),this},e.prototype.setOptions=function(t){return this._options=function(n,r){for(var a=0,o=Object.entries(r);a<o.length;a++){var i=o[a];n=oN(n,i[0],i[1])}return n}(this._options,t),this},e.prototype.start=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,Xxe(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.goToStep=function(t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return[4,qxe(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 Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return[4,Gxe(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.nextStep=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,Ef(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.previousStep=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,ab(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.currentStep=function(){return this._currentStep},e.prototype.exit=function(t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return[4,xf(this,this._targetElement,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.refresh=function(t){return LO(this,t),this},e.prototype.setDontShowAgain=function(t){return $xe(this,t),this},e.prototype.onbeforechange=function(t){if(!lr(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},e.prototype.onchange=function(t){if(!lr(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},e.prototype.onafterchange=function(t){if(!lr(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},e.prototype.oncomplete=function(t){if(!lr(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},e.prototype.onhintsadded=function(t){if(!lr(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},e.prototype.onhintclick=function(t){if(!lr(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},e.prototype.onhintclose=function(t){if(!lr(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},e.prototype.onstart=function(t){if(!lr(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this},e.prototype.onexit=function(t){if(!lr(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},e.prototype.onskip=function(t){if(!lr(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},e.prototype.onbeforeexit=function(t){if(!lr(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},e.prototype.addHints=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,PO(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.hideHint=function(t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return[4,ZE(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.hideHints=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,Jxe(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.showHint=function(t){return AO(t),this},e.prototype.showHints=function(){return Wn(this,void 0,void 0,function(){return $n(this,function(t){switch(t.label){case 0:return[4,Kxe(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.removeHints=function(){return function(t){for(var n=0,r=om(".introjs-hint");n<r.length;n++){var a=r[n].getAttribute("data-step");a&&aN(parseInt(a,10))}Gl.off(document,"click",w1,t,!1),Gl.off(window,"resize",b1,t,!0),t._hintsAutoRefreshFunction&&Gl.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0)}(this),this},e.prototype.removeHint=function(t){return aN(t),this},e.prototype.showHintDialog=function(t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return[4,OO(this,t)];case 1:return n.sent(),[2,this]}})})},e}(),ob=function e(t){var n;if(nb(t)==="object")n=new GD(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 GD(r)}else n=new GD(document.body);return e.instances[g2(n,"introjs-instance")]=n,n};ob.version="7.2.0",ob.instances={};var ef={},iN;function eCe(){if(iN)return ef;iN=1;var e=P;function t(A){for(var Y="https://reactjs.org/docs/error-decoder.html?invariant="+A,J=1;J<arguments.length;J++)Y+="&args[]="+encodeURIComponent(arguments[J]);return"Minified React error #"+A+"; visit "+Y+" 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]*$/,a={},o={};function i(A){return n.call(o,A)?!0:n.call(a,A)?!1:r.test(A)?o[A]=!0:(a[A]=!0,!1)}function l(A,Y,J,oe,Ne,Ie,Ue){this.acceptsBooleans=Y===2||Y===3||Y===4,this.attributeName=oe,this.attributeNamespace=Ne,this.mustUseProperty=J,this.propertyName=A,this.type=Y,this.sanitizeURL=Ie,this.removeEmptyString=Ue}var c={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(A){c[A]=new l(A,0,!1,A,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(A){var Y=A[0];c[Y]=new l(Y,1,!1,A[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(A){c[A]=new l(A,2,!1,A.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(A){c[A]=new l(A,2,!1,A,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(A){c[A]=new l(A,3,!1,A.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(A){c[A]=new l(A,3,!0,A,null,!1,!1)}),["capture","download"].forEach(function(A){c[A]=new l(A,4,!1,A,null,!1,!1)}),["cols","rows","size","span"].forEach(function(A){c[A]=new l(A,6,!1,A,null,!1,!1)}),["rowSpan","start"].forEach(function(A){c[A]=new l(A,5,!1,A.toLowerCase(),null,!1,!1)});var f=/[\-:]([a-z])/g;function p(A){return A[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(A){var Y=A.replace(f,p);c[Y]=new l(Y,1,!1,A,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(A){var Y=A.replace(f,p);c[Y]=new l(Y,1,!1,A,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(A){var Y=A.replace(f,p);c[Y]=new l(Y,1,!1,A,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(A){c[A]=new l(A,1,!1,A.toLowerCase(),null,!1,!1)}),c.xlinkHref=new l("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(A){c[A]=new l(A,1,!1,A.toLowerCase(),null,!0,!0)});var g={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},y=["Webkit","ms","Moz","O"];Object.keys(g).forEach(function(A){y.forEach(function(Y){Y=Y+A.charAt(0).toUpperCase()+A.substring(1),g[Y]=g[A]})});var w=/["'&<>]/;function T(A){if(typeof A=="boolean"||typeof A=="number")return""+A;A=""+A;var Y=w.exec(A);if(Y){var J="",oe,Ne=0;for(oe=Y.index;oe<A.length;oe++){switch(A.charCodeAt(oe)){case 34:Y="&quot;";break;case 38:Y="&amp;";break;case 39:Y="&#x27;";break;case 60:Y="&lt;";break;case 62:Y="&gt;";break;default:continue}Ne!==oe&&(J+=A.substring(Ne,oe)),Ne=oe+1,J+=Y}A=Ne!==oe?J+A.substring(Ne,oe):J}return A}var S=/([A-Z])/g,I=/^ms-/,M=Array.isArray;function N(A,Y){return{insertionMode:A,selectedValue:Y}}function _(A,Y,J){switch(Y){case"select":return N(1,J.value!=null?J.value:J.defaultValue);case"svg":return N(2,null);case"math":return N(3,null);case"foreignObject":return N(1,null);case"table":return N(4,null);case"thead":case"tbody":case"tfoot":return N(5,null);case"colgroup":return N(7,null);case"tr":return N(6,null)}return 4<=A.insertionMode||A.insertionMode===0?N(1,null):A}var k=new Map;function R(A,Y,J){if(typeof J!="object")throw Error(t(62));Y=!0;for(var oe in J)if(n.call(J,oe)){var Ne=J[oe];if(Ne!=null&&typeof Ne!="boolean"&&Ne!==""){if(oe.indexOf("--")===0){var Ie=T(oe);Ne=T((""+Ne).trim())}else{Ie=oe;var Ue=k.get(Ie);Ue!==void 0||(Ue=T(Ie.replace(S,"-$1").toLowerCase().replace(I,"-ms-")),k.set(Ie,Ue)),Ie=Ue,Ne=typeof Ne=="number"?Ne===0||n.call(g,oe)?""+Ne:Ne+"px":T((""+Ne).trim())}Y?(Y=!1,A.push(' style="',Ie,":",Ne)):A.push(";",Ie,":",Ne)}}Y||A.push('"')}function L(A,Y,J,oe){switch(J){case"style":R(A,Y,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(Y=c.hasOwnProperty(J)?c[J]:null,Y!==null){switch(typeof oe){case"function":case"symbol":return;case"boolean":if(!Y.acceptsBooleans)return}switch(J=Y.attributeName,Y.type){case 3:oe&&A.push(" ",J,'=""');break;case 4:oe===!0?A.push(" ",J,'=""'):oe!==!1&&A.push(" ",J,'="',T(oe),'"');break;case 5:isNaN(oe)||A.push(" ",J,'="',T(oe),'"');break;case 6:!isNaN(oe)&&1<=oe&&A.push(" ",J,'="',T(oe),'"');break;default:Y.sanitizeURL&&(oe=""+oe),A.push(" ",J,'="',T(oe),'"')}}else if(i(J)){switch(typeof oe){case"function":case"symbol":return;case"boolean":if(Y=J.toLowerCase().slice(0,5),Y!=="data-"&&Y!=="aria-")return}A.push(" ",J,'="',T(oe),'"')}}}function H(A,Y,J){if(Y!=null){if(J!=null)throw Error(t(60));if(typeof Y!="object"||!("__html"in Y))throw Error(t(61));Y=Y.__html,Y!=null&&A.push(""+Y)}}function U(A){var Y="";return e.Children.forEach(A,function(J){J!=null&&(Y+=J)}),Y}function z(A,Y,J,oe){A.push(Q(J));var Ne=J=null,Ie;for(Ie in Y)if(n.call(Y,Ie)){var Ue=Y[Ie];if(Ue!=null)switch(Ie){case"children":J=Ue;break;case"dangerouslySetInnerHTML":Ne=Ue;break;default:L(A,oe,Ie,Ue)}}return A.push(">"),H(A,Ne,J),typeof J=="string"?(A.push(T(J)),null):J}var $=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,X=new Map;function Q(A){var Y=X.get(A);if(Y===void 0){if(!$.test(A))throw Error(t(65,A));Y="<"+A,X.set(A,Y)}return Y}function se(A,Y,J,oe,Ne){switch(Y){case"select":A.push(Q("select"));var Ie=null,Ue=null;for($t in J)if(n.call(J,$t)){var it=J[$t];if(it!=null)switch($t){case"children":Ie=it;break;case"dangerouslySetInnerHTML":Ue=it;break;case"defaultValue":case"value":break;default:L(A,oe,$t,it)}}return A.push(">"),H(A,Ue,Ie),Ie;case"option":Ue=Ne.selectedValue,A.push(Q("option"));var ct=it=null,Ft=null,$t=null;for(Ie in J)if(n.call(J,Ie)){var Pn=J[Ie];if(Pn!=null)switch(Ie){case"children":it=Pn;break;case"selected":Ft=Pn;break;case"dangerouslySetInnerHTML":$t=Pn;break;case"value":ct=Pn;default:L(A,oe,Ie,Pn)}}if(Ue!=null)if(J=ct!==null?""+ct:U(it),M(Ue)){for(oe=0;oe<Ue.length;oe++)if(""+Ue[oe]===J){A.push(' selected=""');break}}else""+Ue===J&&A.push(' selected=""');else Ft&&A.push(' selected=""');return A.push(">"),H(A,$t,it),it;case"textarea":A.push(Q("textarea")),$t=Ue=Ie=null;for(it in J)if(n.call(J,it)&&(ct=J[it],ct!=null))switch(it){case"children":$t=ct;break;case"value":Ie=ct;break;case"defaultValue":Ue=ct;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:L(A,oe,it,ct)}if(Ie===null&&Ue!==null&&(Ie=Ue),A.push(">"),$t!=null){if(Ie!=null)throw Error(t(92));if(M($t)&&1<$t.length)throw Error(t(93));Ie=""+$t}return typeof Ie=="string"&&Ie[0]===`
`&&A.push(`
`),Ie!==null&&A.push(T(""+Ie)),null;case"input":A.push(Q("input")),ct=$t=it=Ie=null;for(Ue in J)if(n.call(J,Ue)&&(Ft=J[Ue],Ft!=null))switch(Ue){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":ct=Ft;break;case"defaultValue":it=Ft;break;case"checked":$t=Ft;break;case"value":Ie=Ft;break;default:L(A,oe,Ue,Ft)}return $t!==null?L(A,oe,"checked",$t):ct!==null&&L(A,oe,"checked",ct),Ie!==null?L(A,oe,"value",Ie):it!==null&&L(A,oe,"value",it),A.push("/>"),null;case"menuitem":A.push(Q("menuitem"));for(var Ga in J)if(n.call(J,Ga)&&(Ie=J[Ga],Ie!=null))switch(Ga){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:L(A,oe,Ga,Ie)}return A.push(">"),null;case"title":A.push(Q("title")),Ie=null;for(Pn in J)if(n.call(J,Pn)&&(Ue=J[Pn],Ue!=null))switch(Pn){case"children":Ie=Ue;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:L(A,oe,Pn,Ue)}return A.push(">"),Ie;case"listing":case"pre":A.push(Q(Y)),Ue=Ie=null;for(ct in J)if(n.call(J,ct)&&(it=J[ct],it!=null))switch(ct){case"children":Ie=it;break;case"dangerouslySetInnerHTML":Ue=it;break;default:L(A,oe,ct,it)}if(A.push(">"),Ue!=null){if(Ie!=null)throw Error(t(60));if(typeof Ue!="object"||!("__html"in Ue))throw Error(t(61));J=Ue.__html,J!=null&&(typeof J=="string"&&0<J.length&&J[0]===`
`?A.push(`
`,J):A.push(""+J))}return typeof Ie=="string"&&Ie[0]===`
`&&A.push(`
`),Ie;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":A.push(Q(Y));for(var ja in J)if(n.call(J,ja)&&(Ie=J[ja],Ie!=null))switch(ja){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,Y));default:L(A,oe,ja,Ie)}return A.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 z(A,J,Y,oe);case"html":return Ne.insertionMode===0&&A.push("<!DOCTYPE html>"),z(A,J,Y,oe);default:if(Y.indexOf("-")===-1&&typeof J.is!="string")return z(A,J,Y,oe);A.push(Q(Y)),Ue=Ie=null;for(Ft in J)if(n.call(J,Ft)&&(it=J[Ft],it!=null))switch(Ft){case"children":Ie=it;break;case"dangerouslySetInnerHTML":Ue=it;break;case"style":R(A,oe,it);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:i(Ft)&&typeof it!="function"&&typeof it!="symbol"&&A.push(" ",Ft,'="',T(it),'"')}return A.push(">"),H(A,Ue,Ie),Ie}}function ue(A,Y,J){if(A.push('<!--$?--><template id="'),J===null)throw Error(t(395));return A.push(J),A.push('"></template>')}function fe(A,Y,J,oe){switch(J.insertionMode){case 0:case 1:return A.push('<div hidden id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 2:return A.push('<svg aria-hidden="true" style="display:none" id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 3:return A.push('<math aria-hidden="true" style="display:none" id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 4:return A.push('<table hidden id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 5:return A.push('<table hidden><tbody id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 6:return A.push('<table hidden><tr id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');case 7:return A.push('<table hidden><colgroup id="'),A.push(Y.segmentPrefix),Y=oe.toString(16),A.push(Y),A.push('">');default:throw Error(t(397))}}function Z(A,Y){switch(Y.insertionMode){case 0:case 1:return A.push("</div>");case 2:return A.push("</svg>");case 3:return A.push("</math>");case 4:return A.push("</table>");case 5:return A.push("</tbody></table>");case 6:return A.push("</tr></table>");case 7:return A.push("</colgroup></table>");default:throw Error(t(397))}}var pe=/[<\u2028\u2029]/g;function ie(A){return JSON.stringify(A).replace(pe,function(Y){switch(Y){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 de(A,Y){return Y=Y===void 0?"":Y,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:Y+"P:",segmentPrefix:Y+"S:",boundaryPrefix:Y+"B:",idPrefix:Y,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:A}}function K(A,Y,J,oe){return J.generateStaticMarkup?(A.push(T(Y)),!1):(Y===""?A=oe:(oe&&A.push("<!-- -->"),A.push(T(Y)),A=!0),A)}var ae=Object.assign,Se=Symbol.for("react.element"),je=Symbol.for("react.portal"),Re=Symbol.for("react.fragment"),Fe=Symbol.for("react.strict_mode"),Be=Symbol.for("react.profiler"),Qe=Symbol.for("react.provider"),Ze=Symbol.for("react.context"),st=Symbol.for("react.forward_ref"),xt=Symbol.for("react.suspense"),tn=Symbol.for("react.suspense_list"),_e=Symbol.for("react.memo"),Xe=Symbol.for("react.lazy"),tt=Symbol.for("react.scope"),ht=Symbol.for("react.debug_trace_mode"),St=Symbol.for("react.legacy_hidden"),Tt=Symbol.for("react.default_value"),Gt=Symbol.iterator;function _t(A){if(A==null)return null;if(typeof A=="function")return A.displayName||A.name||null;if(typeof A=="string")return A;switch(A){case Re:return"Fragment";case je:return"Portal";case Be:return"Profiler";case Fe:return"StrictMode";case xt:return"Suspense";case tn:return"SuspenseList"}if(typeof A=="object")switch(A.$$typeof){case Ze:return(A.displayName||"Context")+".Consumer";case Qe:return(A._context.displayName||"Context")+".Provider";case st:var Y=A.render;return A=A.displayName,A||(A=Y.displayName||Y.name||"",A=A!==""?"ForwardRef("+A+")":"ForwardRef"),A;case _e:return Y=A.displayName||null,Y!==null?Y:_t(A.type)||"Memo";case Xe:Y=A._payload,A=A._init;try{return _t(A(Y))}catch{}}return null}var Vt={};function Xt(A,Y){if(A=A.contextTypes,!A)return Vt;var J={},oe;for(oe in A)J[oe]=Y[oe];return J}var dn=null;function en(A,Y){if(A!==Y){A.context._currentValue2=A.parentValue,A=A.parent;var J=Y.parent;if(A===null){if(J!==null)throw Error(t(401))}else{if(J===null)throw Error(t(401));en(A,J)}Y.context._currentValue2=Y.value}}function Zn(A){A.context._currentValue2=A.parentValue,A=A.parent,A!==null&&Zn(A)}function kn(A){var Y=A.parent;Y!==null&&kn(Y),A.context._currentValue2=A.value}function Er(A,Y){if(A.context._currentValue2=A.parentValue,A=A.parent,A===null)throw Error(t(402));A.depth===Y.depth?en(A,Y):Er(A,Y)}function pt(A,Y){var J=Y.parent;if(J===null)throw Error(t(402));A.depth===J.depth?en(A,J):pt(A,J),Y.context._currentValue2=Y.value}function Mt(A){var Y=dn;Y!==A&&(Y===null?kn(A):A===null?Zn(Y):Y.depth===A.depth?en(Y,A):Y.depth>A.depth?Er(Y,A):pt(Y,A),dn=A)}var Jt={isMounted:function(){return!1},enqueueSetState:function(A,Y){A=A._reactInternals,A.queue!==null&&A.queue.push(Y)},enqueueReplaceState:function(A,Y){A=A._reactInternals,A.replace=!0,A.queue=[Y]},enqueueForceUpdate:function(){}};function on(A,Y,J,oe){var Ne=A.state!==void 0?A.state:null;A.updater=Jt,A.props=J,A.state=Ne;var Ie={queue:[],replace:!1};A._reactInternals=Ie;var Ue=Y.contextType;if(A.context=typeof Ue=="object"&&Ue!==null?Ue._currentValue2:oe,Ue=Y.getDerivedStateFromProps,typeof Ue=="function"&&(Ue=Ue(J,Ne),Ne=Ue==null?Ne:ae({},Ne,Ue),A.state=Ne),typeof Y.getDerivedStateFromProps!="function"&&typeof A.getSnapshotBeforeUpdate!="function"&&(typeof A.UNSAFE_componentWillMount=="function"||typeof A.componentWillMount=="function"))if(Y=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),Y!==A.state&&Jt.enqueueReplaceState(A,A.state,null),Ie.queue!==null&&0<Ie.queue.length)if(Y=Ie.queue,Ue=Ie.replace,Ie.queue=null,Ie.replace=!1,Ue&&Y.length===1)A.state=Y[0];else{for(Ie=Ue?Y[0]:A.state,Ne=!0,Ue=Ue?1:0;Ue<Y.length;Ue++){var it=Y[Ue];it=typeof it=="function"?it.call(A,Ie,J,oe):it,it!=null&&(Ne?(Ne=!1,Ie=ae({},Ie,it)):ae(Ie,it))}A.state=Ie}else Ie.queue=null}var ln={id:1,overflow:""};function vr(A,Y,J){var oe=A.id;A=A.overflow;var Ne=32-fr(oe)-1;oe&=~(1<<Ne),J+=1;var Ie=32-fr(Y)+Ne;if(30<Ie){var Ue=Ne-Ne%5;return Ie=(oe&(1<<Ue)-1).toString(32),oe>>=Ue,Ne-=Ue,{id:1<<32-fr(Y)+Ne|J<<Ne|oe,overflow:Ie+A}}return{id:1<<Ie|J<<Ne|oe,overflow:A}}var fr=Math.clz32?Math.clz32:nr,ha=Math.log,jr=Math.LN2;function nr(A){return A>>>=0,A===0?32:31-(ha(A)/jr|0)|0}function Lr(A,Y){return A===Y&&(A!==0||1/A===1/Y)||A!==A&&Y!==Y}var te=typeof Object.is=="function"?Object.is:Lr,me=null,Ce=null,Ye=null,He=null,Ke=!1,et=!1,kt=0,Yt=null,On=0;function vn(){if(me===null)throw Error(t(321));return me}function xr(){if(0<On)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Jn(){return He===null?Ye===null?(Ke=!1,Ye=He=xr()):(Ke=!0,He=Ye):He.next===null?(Ke=!1,He=He.next=xr()):(Ke=!0,He=He.next),He}function yr(){Ce=me=null,et=!1,Ye=null,On=0,He=Yt=null}function ta(A,Y){return typeof Y=="function"?Y(A):Y}function Pi(A,Y,J){if(me=vn(),He=Jn(),Ke){var oe=He.queue;if(Y=oe.dispatch,Yt!==null&&(J=Yt.get(oe),J!==void 0)){Yt.delete(oe),oe=He.memoizedState;do oe=A(oe,J.action),J=J.next;while(J!==null);return He.memoizedState=oe,[oe,Y]}return[He.memoizedState,Y]}return A=A===ta?typeof Y=="function"?Y():Y:J!==void 0?J(Y):Y,He.memoizedState=A,A=He.queue={last:null,dispatch:null},A=A.dispatch=Aa.bind(null,me,A),[He.memoizedState,A]}function Nn(A,Y){if(me=vn(),He=Jn(),Y=Y===void 0?null:Y,He!==null){var J=He.memoizedState;if(J!==null&&Y!==null){var oe=J[1];e:if(oe===null)oe=!1;else{for(var Ne=0;Ne<oe.length&&Ne<Y.length;Ne++)if(!te(Y[Ne],oe[Ne])){oe=!1;break e}oe=!0}if(oe)return J[0]}}return A=A(),He.memoizedState=[A,Y],A}function Aa(A,Y,J){if(25<=On)throw Error(t(301));if(A===me)if(et=!0,A={action:J,next:null},Yt===null&&(Yt=new Map),J=Yt.get(Y),J===void 0)Yt.set(Y,A);else{for(Y=J;Y.next!==null;)Y=Y.next;Y.next=A}}function Fa(){throw Error(t(394))}function Zr(){}var fo={readContext:function(A){return A._currentValue2},useContext:function(A){return vn(),A._currentValue2},useMemo:Nn,useReducer:Pi,useRef:function(A){me=vn(),He=Jn();var Y=He.memoizedState;return Y===null?(A={current:A},He.memoizedState=A):Y},useState:function(A){return Pi(ta,A)},useInsertionEffect:Zr,useLayoutEffect:function(){},useCallback:function(A,Y){return Nn(function(){return A},Y)},useImperativeHandle:Zr,useEffect:Zr,useDebugValue:Zr,useDeferredValue:function(A){return vn(),A},useTransition:function(){return vn(),[!1,Fa]},useId:function(){var A=Ce.treeContext,Y=A.overflow;A=A.id,A=(A&~(1<<32-fr(A)-1)).toString(32)+Y;var J=Oa;if(J===null)throw Error(t(404));return Y=kt++,A=":"+J.idPrefix+"R"+A,0<Y&&(A+="H"+Y.toString(32)),A+":"},useMutableSource:function(A,Y){return vn(),Y(A._source)},useSyncExternalStore:function(A,Y,J){if(J===void 0)throw Error(t(407));return J()}},Oa=null,ru=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function si(A){return console.error(A),null}function li(){}function Xu(A,Y,J,oe,Ne,Ie,Ue,it,ct){var Ft=[],$t=new Set;return Y={destination:null,responseState:Y,progressiveChunkSize:oe===void 0?12800:oe,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:$t,pingedTasks:Ft,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Ne===void 0?si:Ne,onAllReady:Ie===void 0?li:Ie,onShellReady:Ue===void 0?li:Ue,onShellError:it===void 0?li:it,onFatalError:ct===void 0?li:ct},J=us(Y,0,null,J,!1,!1),J.parentFlushed=!0,A=au(Y,A,null,J,$t,Vt,null,ln),Ft.push(A),Y}function au(A,Y,J,oe,Ne,Ie,Ue,it){A.allPendingTasks++,J===null?A.pendingRootTasks++:J.pendingTasks++;var ct={node:Y,ping:function(){var Ft=A.pingedTasks;Ft.push(ct),Ft.length===1&&Pa(A)},blockedBoundary:J,blockedSegment:oe,abortSet:Ne,legacyContext:Ie,context:Ue,treeContext:it};return Ne.add(ct),ct}function us(A,Y,J,oe,Ne,Ie){return{status:0,id:-1,index:Y,parentFlushed:!1,chunks:[],children:[],formatContext:oe,boundary:J,lastPushedText:Ne,textEmbedded:Ie}}function ji(A,Y){if(A=A.onError(Y),A!=null&&typeof A!="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 A+'" instead');return A}function cs(A,Y){var J=A.onShellError;J(Y),J=A.onFatalError,J(Y),A.destination!==null?(A.status=2,A.destination.destroy(Y)):(A.status=1,A.fatalError=Y)}function ou(A,Y,J,oe,Ne){for(me={},Ce=Y,kt=0,A=J(oe,Ne);et;)et=!1,kt=0,On+=1,He=null,A=J(oe,Ne);return yr(),A}function ds(A,Y,J,oe){var Ne=J.render(),Ie=oe.childContextTypes;if(Ie!=null){var Ue=Y.legacyContext;if(typeof J.getChildContext!="function")oe=Ue;else{J=J.getChildContext();for(var it in J)if(!(it in Ie))throw Error(t(108,_t(oe)||"Unknown",it));oe=ae({},Ue,J)}Y.legacyContext=oe,na(A,Y,Ne),Y.legacyContext=Ue}else na(A,Y,Ne)}function ec(A,Y){if(A&&A.defaultProps){Y=ae({},Y),A=A.defaultProps;for(var J in A)Y[J]===void 0&&(Y[J]=A[J]);return Y}return Y}function An(A,Y,J,oe,Ne){if(typeof J=="function")if(J.prototype&&J.prototype.isReactComponent){Ne=Xt(J,Y.legacyContext);var Ie=J.contextType;Ie=new J(oe,typeof Ie=="object"&&Ie!==null?Ie._currentValue2:Ne),on(Ie,J,oe,Ne),ds(A,Y,Ie,J)}else{Ie=Xt(J,Y.legacyContext),Ne=ou(A,Y,J,oe,Ie);var Ue=kt!==0;if(typeof Ne=="object"&&Ne!==null&&typeof Ne.render=="function"&&Ne.$$typeof===void 0)on(Ne,J,oe,Ie),ds(A,Y,Ne,J);else if(Ue){oe=Y.treeContext,Y.treeContext=vr(oe,1,0);try{na(A,Y,Ne)}finally{Y.treeContext=oe}}else na(A,Y,Ne)}else if(typeof J=="string"){switch(Ne=Y.blockedSegment,Ie=se(Ne.chunks,J,oe,A.responseState,Ne.formatContext),Ne.lastPushedText=!1,Ue=Ne.formatContext,Ne.formatContext=_(Ue,J,oe),qs(A,Y,Ie),Ne.formatContext=Ue,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:Ne.chunks.push("</",J,">")}Ne.lastPushedText=!1}else{switch(J){case St:case ht:case Fe:case Be:case Re:na(A,Y,oe.children);return;case tn:na(A,Y,oe.children);return;case tt:throw Error(t(343));case xt:e:{J=Y.blockedBoundary,Ne=Y.blockedSegment,Ie=oe.fallback,oe=oe.children,Ue=new Set;var it={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Ue,errorDigest:null},ct=us(A,Ne.chunks.length,it,Ne.formatContext,!1,!1);Ne.children.push(ct),Ne.lastPushedText=!1;var Ft=us(A,0,null,Ne.formatContext,!1,!1);Ft.parentFlushed=!0,Y.blockedBoundary=it,Y.blockedSegment=Ft;try{if(qs(A,Y,oe),A.responseState.generateStaticMarkup||Ft.lastPushedText&&Ft.textEmbedded&&Ft.chunks.push("<!-- -->"),Ft.status=1,Fo(it,Ft),it.pendingTasks===0)break e}catch($t){Ft.status=4,it.forceClientRender=!0,it.errorDigest=ji(A,$t)}finally{Y.blockedBoundary=J,Y.blockedSegment=Ne}Y=au(A,Ie,J,ct,Ue,Y.legacyContext,Y.context,Y.treeContext),A.pingedTasks.push(Y)}return}if(typeof J=="object"&&J!==null)switch(J.$$typeof){case st:if(oe=ou(A,Y,J.render,oe,Ne),kt!==0){J=Y.treeContext,Y.treeContext=vr(J,1,0);try{na(A,Y,oe)}finally{Y.treeContext=J}}else na(A,Y,oe);return;case _e:J=J.type,oe=ec(J,oe),An(A,Y,J,oe,Ne);return;case Qe:if(Ne=oe.children,J=J._context,oe=oe.value,Ie=J._currentValue2,J._currentValue2=oe,Ue=dn,dn=oe={parent:Ue,depth:Ue===null?0:Ue.depth+1,context:J,parentValue:Ie,value:oe},Y.context=oe,na(A,Y,Ne),A=dn,A===null)throw Error(t(403));oe=A.parentValue,A.context._currentValue2=oe===Tt?A.context._defaultValue:oe,A=dn=A.parent,Y.context=A;return;case Ze:oe=oe.children,oe=oe(J._currentValue2),na(A,Y,oe);return;case Xe:Ne=J._init,J=Ne(J._payload),oe=ec(J,oe),An(A,Y,J,oe,void 0);return}throw Error(t(130,J==null?J:typeof J,""))}}function na(A,Y,J){if(Y.node=J,typeof J=="object"&&J!==null){switch(J.$$typeof){case Se:An(A,Y,J.type,J.props,J.ref);return;case je:throw Error(t(257));case Xe:var oe=J._init;J=oe(J._payload),na(A,Y,J);return}if(M(J)){Zs(A,Y,J);return}if(J===null||typeof J!="object"?oe=null:(oe=Gt&&J[Gt]||J["@@iterator"],oe=typeof oe=="function"?oe:null),oe&&(oe=oe.call(J))){if(J=oe.next(),!J.done){var Ne=[];do Ne.push(J.value),J=oe.next();while(!J.done);Zs(A,Y,Ne)}return}throw A=Object.prototype.toString.call(J),Error(t(31,A==="[object Object]"?"object with keys {"+Object.keys(J).join(", ")+"}":A))}typeof J=="string"?(oe=Y.blockedSegment,oe.lastPushedText=K(Y.blockedSegment.chunks,J,A.responseState,oe.lastPushedText)):typeof J=="number"&&(oe=Y.blockedSegment,oe.lastPushedText=K(Y.blockedSegment.chunks,""+J,A.responseState,oe.lastPushedText))}function Zs(A,Y,J){for(var oe=J.length,Ne=0;Ne<oe;Ne++){var Ie=Y.treeContext;Y.treeContext=vr(Ie,oe,Ne);try{qs(A,Y,J[Ne])}finally{Y.treeContext=Ie}}}function qs(A,Y,J){var oe=Y.blockedSegment.formatContext,Ne=Y.legacyContext,Ie=Y.context;try{return na(A,Y,J)}catch(ct){if(yr(),typeof ct=="object"&&ct!==null&&typeof ct.then=="function"){J=ct;var Ue=Y.blockedSegment,it=us(A,Ue.chunks.length,null,Ue.formatContext,Ue.lastPushedText,!0);Ue.children.push(it),Ue.lastPushedText=!1,A=au(A,Y.node,Y.blockedBoundary,it,Y.abortSet,Y.legacyContext,Y.context,Y.treeContext).ping,J.then(A,A),Y.blockedSegment.formatContext=oe,Y.legacyContext=Ne,Y.context=Ie,Mt(Ie)}else throw Y.blockedSegment.formatContext=oe,Y.legacyContext=Ne,Y.context=Ie,Mt(Ie),ct}}function ui(A){var Y=A.blockedBoundary;A=A.blockedSegment,A.status=3,ho(this,Y,A)}function iu(A,Y,J){var oe=A.blockedBoundary;A.blockedSegment.status=3,oe===null?(Y.allPendingTasks--,Y.status!==2&&(Y.status=2,Y.destination!==null&&Y.destination.push(null))):(oe.pendingTasks--,oe.forceClientRender||(oe.forceClientRender=!0,A=J===void 0?Error(t(432)):J,oe.errorDigest=Y.onError(A),oe.parentFlushed&&Y.clientRenderedBoundaries.push(oe)),oe.fallbackAbortableTasks.forEach(function(Ne){return iu(Ne,Y,J)}),oe.fallbackAbortableTasks.clear(),Y.allPendingTasks--,Y.allPendingTasks===0&&(oe=Y.onAllReady,oe()))}function Fo(A,Y){if(Y.chunks.length===0&&Y.children.length===1&&Y.children[0].boundary===null){var J=Y.children[0];J.id=Y.id,J.parentFlushed=!0,J.status===1&&Fo(A,J)}else A.completedSegments.push(Y)}function ho(A,Y,J){if(Y===null){if(J.parentFlushed){if(A.completedRootSegment!==null)throw Error(t(389));A.completedRootSegment=J}A.pendingRootTasks--,A.pendingRootTasks===0&&(A.onShellError=li,Y=A.onShellReady,Y())}else Y.pendingTasks--,Y.forceClientRender||(Y.pendingTasks===0?(J.parentFlushed&&J.status===1&&Fo(Y,J),Y.parentFlushed&&A.completedBoundaries.push(Y),Y.fallbackAbortableTasks.forEach(ui,A),Y.fallbackAbortableTasks.clear()):J.parentFlushed&&J.status===1&&(Fo(Y,J),Y.completedSegments.length===1&&Y.parentFlushed&&A.partialBoundaries.push(Y)));A.allPendingTasks--,A.allPendingTasks===0&&(A=A.onAllReady,A())}function Pa(A){if(A.status!==2){var Y=dn,J=ru.current;ru.current=fo;var oe=Oa;Oa=A.responseState;try{var Ne=A.pingedTasks,Ie;for(Ie=0;Ie<Ne.length;Ie++){var Ue=Ne[Ie],it=A,ct=Ue.blockedSegment;if(ct.status===0){Mt(Ue.context);try{na(it,Ue,Ue.node),it.responseState.generateStaticMarkup||ct.lastPushedText&&ct.textEmbedded&&ct.chunks.push("<!-- -->"),Ue.abortSet.delete(Ue),ct.status=1,ho(it,Ue.blockedBoundary,ct)}catch(ra){if(yr(),typeof ra=="object"&&ra!==null&&typeof ra.then=="function"){var Ft=Ue.ping;ra.then(Ft,Ft)}else{Ue.abortSet.delete(Ue),ct.status=4;var $t=Ue.blockedBoundary,Pn=ra,Ga=ji(it,Pn);if($t===null?cs(it,Pn):($t.pendingTasks--,$t.forceClientRender||($t.forceClientRender=!0,$t.errorDigest=Ga,$t.parentFlushed&&it.clientRenderedBoundaries.push($t))),it.allPendingTasks--,it.allPendingTasks===0){var ja=it.onAllReady;ja()}}}}}Ne.splice(0,Ie),A.destination!==null&&po(A,A.destination)}catch(ra){ji(A,ra),cs(A,ra)}finally{Oa=oe,ru.current=J,J===fo&&Mt(Y)}}}function fs(A,Y,J){switch(J.parentFlushed=!0,J.status){case 0:var oe=J.id=A.nextSegmentId++;return J.lastPushedText=!1,J.textEmbedded=!1,A=A.responseState,Y.push('<template id="'),Y.push(A.placeholderPrefix),A=oe.toString(16),Y.push(A),Y.push('"></template>');case 1:J.status=2;var Ne=!0;oe=J.chunks;var Ie=0;J=J.children;for(var Ue=0;Ue<J.length;Ue++){for(Ne=J[Ue];Ie<Ne.index;Ie++)Y.push(oe[Ie]);Ne=Rr(A,Y,Ne)}for(;Ie<oe.length-1;Ie++)Y.push(oe[Ie]);return Ie<oe.length&&(Ne=Y.push(oe[Ie])),Ne;default:throw Error(t(390))}}function Rr(A,Y,J){var oe=J.boundary;if(oe===null)return fs(A,Y,J);if(oe.parentFlushed=!0,oe.forceClientRender)return A.responseState.generateStaticMarkup||(oe=oe.errorDigest,Y.push("<!--$!-->"),Y.push("<template"),oe&&(Y.push(' data-dgst="'),oe=T(oe),Y.push(oe),Y.push('"')),Y.push("></template>")),fs(A,Y,J),A=A.responseState.generateStaticMarkup?!0:Y.push("<!--/$-->"),A;if(0<oe.pendingTasks){oe.rootSegmentID=A.nextSegmentId++,0<oe.completedSegments.length&&A.partialBoundaries.push(oe);var Ne=A.responseState,Ie=Ne.nextSuspenseID++;return Ne=Ne.boundaryPrefix+Ie.toString(16),oe=oe.id=Ne,ue(Y,A.responseState,oe),fs(A,Y,J),Y.push("<!--/$-->")}if(oe.byteSize>A.progressiveChunkSize)return oe.rootSegmentID=A.nextSegmentId++,A.completedBoundaries.push(oe),ue(Y,A.responseState,oe.id),fs(A,Y,J),Y.push("<!--/$-->");if(A.responseState.generateStaticMarkup||Y.push("<!--$-->"),J=oe.completedSegments,J.length!==1)throw Error(t(391));return Rr(A,Y,J[0]),A=A.responseState.generateStaticMarkup?!0:Y.push("<!--/$-->"),A}function Gs(A,Y,J){return fe(Y,A.responseState,J.formatContext,J.id),Rr(A,Y,J),Z(Y,J.formatContext)}function Js(A,Y,J){for(var oe=J.completedSegments,Ne=0;Ne<oe.length;Ne++)Ks(A,Y,J,oe[Ne]);if(oe.length=0,A=A.responseState,oe=J.id,J=J.rootSegmentID,Y.push(A.startInlineScript),A.sentCompleteBoundaryFunction?Y.push('$RC("'):(A.sentCompleteBoundaryFunction=!0,Y.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),Y.push(oe),Y.push('","'),Y.push(A.segmentPrefix),Y.push(J),Y.push('")<\/script>')}function Ks(A,Y,J,oe){if(oe.status===2)return!0;var Ne=oe.id;if(Ne===-1){if((oe.id=J.rootSegmentID)===-1)throw Error(t(392));return Gs(A,Y,oe)}return Gs(A,Y,oe),A=A.responseState,Y.push(A.startInlineScript),A.sentCompleteSegmentFunction?Y.push('$RS("'):(A.sentCompleteSegmentFunction=!0,Y.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("')),Y.push(A.segmentPrefix),Ne=Ne.toString(16),Y.push(Ne),Y.push('","'),Y.push(A.placeholderPrefix),Y.push(Ne),Y.push('")<\/script>')}function po(A,Y){try{var J=A.completedRootSegment;if(J!==null&&A.pendingRootTasks===0){Rr(A,Y,J),A.completedRootSegment=null;var oe=A.responseState.bootstrapChunks;for(J=0;J<oe.length-1;J++)Y.push(oe[J]);J<oe.length&&Y.push(oe[J])}var Ne=A.clientRenderedBoundaries,Ie;for(Ie=0;Ie<Ne.length;Ie++){var Ue=Ne[Ie];oe=Y;var it=A.responseState,ct=Ue.id,Ft=Ue.errorDigest,$t=Ue.errorMessage,Pn=Ue.errorComponentStack;if(oe.push(it.startInlineScript),it.sentClientRenderFunction?oe.push('$RX("'):(it.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("')),ct===null)throw Error(t(395));if(oe.push(ct),oe.push('"'),Ft||$t||Pn){oe.push(",");var Ga=ie(Ft||"");oe.push(Ga)}if($t||Pn){oe.push(",");var ja=ie($t||"");oe.push(ja)}if(Pn){oe.push(",");var ra=ie(Pn);oe.push(ra)}if(!oe.push(")<\/script>")){A.destination=null,Ie++,Ne.splice(0,Ie);return}}Ne.splice(0,Ie);var Oo=A.completedBoundaries;for(Ie=0;Ie<Oo.length;Ie++)if(!Js(A,Y,Oo[Ie])){A.destination=null,Ie++,Oo.splice(0,Ie);return}Oo.splice(0,Ie);var La=A.partialBoundaries;for(Ie=0;Ie<La.length;Ie++){var Ja=La[Ie];e:{Ne=A,Ue=Y;var pa=Ja.completedSegments;for(it=0;it<pa.length;it++)if(!Ks(Ne,Ue,Ja,pa[it])){it++,pa.splice(0,it);var go=!1;break e}pa.splice(0,it),go=!0}if(!go){A.destination=null,Ie++,La.splice(0,Ie);return}}La.splice(0,Ie);var Ra=A.completedBoundaries;for(Ie=0;Ie<Ra.length;Ie++)if(!Js(A,Y,Ra[Ie])){A.destination=null,Ie++,Ra.splice(0,Ie);return}Ra.splice(0,Ie)}finally{A.allPendingTasks===0&&A.pingedTasks.length===0&&A.clientRenderedBoundaries.length===0&&A.completedBoundaries.length===0&&Y.push(null)}}function hs(A,Y){try{var J=A.abortableTasks;J.forEach(function(oe){return iu(oe,A,Y)}),J.clear(),A.destination!==null&&po(A,A.destination)}catch(oe){ji(A,oe),cs(A,oe)}}function ci(){}function mo(A,Y,J,oe){var Ne=!1,Ie=null,Ue="",it={push:function(Ft){return Ft!==null&&(Ue+=Ft),!0},destroy:function(Ft){Ne=!0,Ie=Ft}},ct=!1;if(A=Xu(A,de(J,Y?Y.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ci,void 0,function(){ct=!0},void 0,void 0),Pa(A),hs(A,oe),A.status===1)A.status=2,it.destroy(A.fatalError);else if(A.status!==2&&A.destination===null){A.destination=it;try{po(A,it)}catch(Ft){ji(A,Ft),cs(A,Ft)}}if(Ne)throw Ie;if(!ct)throw Error(t(426));return Ue}return ef.renderToNodeStream=function(){throw Error(t(207))},ef.renderToStaticMarkup=function(A,Y){return mo(A,Y,!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')},ef.renderToStaticNodeStream=function(){throw Error(t(208))},ef.renderToString=function(A,Y){return mo(A,Y,!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')},ef.version="18.2.0",ef}var W0={},sN;function tCe(){if(sN)return W0;sN=1;var e=P;function t(F){for(var B="https://reactjs.org/docs/error-decoder.html?invariant="+F,q=1;q<arguments.length;q++)B+="&args[]="+encodeURIComponent(arguments[q]);return"Minified React error #"+F+"; visit "+B+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,r=0;function a(F,B){if(B.length!==0)if(512<B.length)0<r&&(F.enqueue(new Uint8Array(n.buffer,0,r)),n=new Uint8Array(512),r=0),F.enqueue(B);else{var q=n.length-r;q<B.length&&(q===0?F.enqueue(n):(n.set(B.subarray(0,q),r),F.enqueue(n),B=B.subarray(q)),n=new Uint8Array(512),r=0),n.set(B,r),r+=B.length}}function o(F,B){return a(F,B),!0}function i(F){n&&0<r&&(F.enqueue(new Uint8Array(n.buffer,0,r)),n=null,r=0)}var l=new TextEncoder;function c(F){return l.encode(F)}function f(F){return l.encode(F)}function p(F,B){typeof F.error=="function"?F.error(B):F.close()}var g=Object.prototype.hasOwnProperty,y=/^[: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]*$/,w={},T={};function S(F){return g.call(T,F)?!0:g.call(w,F)?!1:y.test(F)?T[F]=!0:(w[F]=!0,!1)}function I(F,B,q,re,Ae,Ee,Ve){this.acceptsBooleans=B===2||B===3||B===4,this.attributeName=re,this.attributeNamespace=Ae,this.mustUseProperty=q,this.propertyName=F,this.type=B,this.sanitizeURL=Ee,this.removeEmptyString=Ve}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(F){M[F]=new I(F,0,!1,F,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(F){var B=F[0];M[B]=new I(B,1,!1,F[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(F){M[F]=new I(F,2,!1,F.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(F){M[F]=new I(F,2,!1,F,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(F){M[F]=new I(F,3,!1,F.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(F){M[F]=new I(F,3,!0,F,null,!1,!1)}),["capture","download"].forEach(function(F){M[F]=new I(F,4,!1,F,null,!1,!1)}),["cols","rows","size","span"].forEach(function(F){M[F]=new I(F,6,!1,F,null,!1,!1)}),["rowSpan","start"].forEach(function(F){M[F]=new I(F,5,!1,F.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function _(F){return F[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(F){var B=F.replace(N,_);M[B]=new I(B,1,!1,F,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(F){var B=F.replace(N,_);M[B]=new I(B,1,!1,F,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(F){var B=F.replace(N,_);M[B]=new I(B,1,!1,F,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(F){M[F]=new I(F,1,!1,F.toLowerCase(),null,!1,!1)}),M.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(F){M[F]=new I(F,1,!1,F.toLowerCase(),null,!0,!0)});var k={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},R=["Webkit","ms","Moz","O"];Object.keys(k).forEach(function(F){R.forEach(function(B){B=B+F.charAt(0).toUpperCase()+F.substring(1),k[B]=k[F]})});var L=/["'&<>]/;function H(F){if(typeof F=="boolean"||typeof F=="number")return""+F;F=""+F;var B=L.exec(F);if(B){var q="",re,Ae=0;for(re=B.index;re<F.length;re++){switch(F.charCodeAt(re)){case 34:B="&quot;";break;case 38:B="&amp;";break;case 39:B="&#x27;";break;case 60:B="&lt;";break;case 62:B="&gt;";break;default:continue}Ae!==re&&(q+=F.substring(Ae,re)),Ae=re+1,q+=B}F=Ae!==re?q+F.substring(Ae,re):q}return F}var U=/([A-Z])/g,z=/^ms-/,$=Array.isArray,X=f("<script>"),Q=f("<\/script>"),se=f('<script src="'),ue=f('<script type="module" src="'),fe=f('" async=""><\/script>'),Z=/(<\/|<)(s)(cript)/gi;function pe(F,B,q,re){return B+(q==="s"?"\\u0073":"\\u0053")+re}function ie(F,B,q,re,Ae){F=F===void 0?"":F,B=B===void 0?X:f('<script nonce="'+H(B)+'">');var Ee=[];if(q!==void 0&&Ee.push(B,c((""+q).replace(Z,pe)),Q),re!==void 0)for(q=0;q<re.length;q++)Ee.push(se,c(H(re[q])),fe);if(Ae!==void 0)for(re=0;re<Ae.length;re++)Ee.push(ue,c(H(Ae[re])),fe);return{bootstrapChunks:Ee,startInlineScript:B,placeholderPrefix:f(F+"P:"),segmentPrefix:f(F+"S:"),boundaryPrefix:F+"B:",idPrefix:F,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function de(F,B){return{insertionMode:F,selectedValue:B}}function K(F){return de(F==="http://www.w3.org/2000/svg"?2:F==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function ae(F,B,q){switch(B){case"select":return de(1,q.value!=null?q.value:q.defaultValue);case"svg":return de(2,null);case"math":return de(3,null);case"foreignObject":return de(1,null);case"table":return de(4,null);case"thead":case"tbody":case"tfoot":return de(5,null);case"colgroup":return de(7,null);case"tr":return de(6,null)}return 4<=F.insertionMode||F.insertionMode===0?de(1,null):F}var Se=f("<!-- -->");function je(F,B,q,re){return B===""?re:(re&&F.push(Se),F.push(c(H(B))),!0)}var Re=new Map,Fe=f(' style="'),Be=f(":"),Qe=f(";");function Ze(F,B,q){if(typeof q!="object")throw Error(t(62));B=!0;for(var re in q)if(g.call(q,re)){var Ae=q[re];if(Ae!=null&&typeof Ae!="boolean"&&Ae!==""){if(re.indexOf("--")===0){var Ee=c(H(re));Ae=c(H((""+Ae).trim()))}else{Ee=re;var Ve=Re.get(Ee);Ve!==void 0||(Ve=f(H(Ee.replace(U,"-$1").toLowerCase().replace(z,"-ms-"))),Re.set(Ee,Ve)),Ee=Ve,Ae=typeof Ae=="number"?Ae===0||g.call(k,re)?c(""+Ae):c(Ae+"px"):c(H((""+Ae).trim()))}B?(B=!1,F.push(Fe,Ee,Be,Ae)):F.push(Qe,Ee,Be,Ae)}}B||F.push(tn)}var st=f(" "),xt=f('="'),tn=f('"'),_e=f('=""');function Xe(F,B,q,re){switch(q){case"style":Ze(F,B,re);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<q.length)||q[0]!=="o"&&q[0]!=="O"||q[1]!=="n"&&q[1]!=="N"){if(B=M.hasOwnProperty(q)?M[q]:null,B!==null){switch(typeof re){case"function":case"symbol":return;case"boolean":if(!B.acceptsBooleans)return}switch(q=c(B.attributeName),B.type){case 3:re&&F.push(st,q,_e);break;case 4:re===!0?F.push(st,q,_e):re!==!1&&F.push(st,q,xt,c(H(re)),tn);break;case 5:isNaN(re)||F.push(st,q,xt,c(H(re)),tn);break;case 6:!isNaN(re)&&1<=re&&F.push(st,q,xt,c(H(re)),tn);break;default:B.sanitizeURL&&(re=""+re),F.push(st,q,xt,c(H(re)),tn)}}else if(S(q)){switch(typeof re){case"function":case"symbol":return;case"boolean":if(B=q.toLowerCase().slice(0,5),B!=="data-"&&B!=="aria-")return}F.push(st,c(q),xt,c(H(re)),tn)}}}var tt=f(">"),ht=f("/>");function St(F,B,q){if(B!=null){if(q!=null)throw Error(t(60));if(typeof B!="object"||!("__html"in B))throw Error(t(61));B=B.__html,B!=null&&F.push(c(""+B))}}function Tt(F){var B="";return e.Children.forEach(F,function(q){q!=null&&(B+=q)}),B}var Gt=f(' selected=""');function _t(F,B,q,re){F.push(en(q));var Ae=q=null,Ee;for(Ee in B)if(g.call(B,Ee)){var Ve=B[Ee];if(Ve!=null)switch(Ee){case"children":q=Ve;break;case"dangerouslySetInnerHTML":Ae=Ve;break;default:Xe(F,re,Ee,Ve)}}return F.push(tt),St(F,Ae,q),typeof q=="string"?(F.push(c(H(q))),null):q}var Vt=f(`
`),Xt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,dn=new Map;function en(F){var B=dn.get(F);if(B===void 0){if(!Xt.test(F))throw Error(t(65,F));B=f("<"+F),dn.set(F,B)}return B}var Zn=f("<!DOCTYPE html>");function kn(F,B,q,re,Ae){switch(B){case"select":F.push(en("select"));var Ee=null,Ve=null;for(Rt in q)if(g.call(q,Rt)){var at=q[Rt];if(at!=null)switch(Rt){case"children":Ee=at;break;case"dangerouslySetInnerHTML":Ve=at;break;case"defaultValue":case"value":break;default:Xe(F,re,Rt,at)}}return F.push(tt),St(F,Ve,Ee),Ee;case"option":Ve=Ae.selectedValue,F.push(en("option"));var It=at=null,Kt=null,Rt=null;for(Ee in q)if(g.call(q,Ee)){var Hn=q[Ee];if(Hn!=null)switch(Ee){case"children":at=Hn;break;case"selected":Kt=Hn;break;case"dangerouslySetInnerHTML":Rt=Hn;break;case"value":It=Hn;default:Xe(F,re,Ee,Hn)}}if(Ve!=null)if(q=It!==null?""+It:Tt(at),$(Ve)){for(re=0;re<Ve.length;re++)if(""+Ve[re]===q){F.push(Gt);break}}else""+Ve===q&&F.push(Gt);else Kt&&F.push(Gt);return F.push(tt),St(F,Rt,at),at;case"textarea":F.push(en("textarea")),Rt=Ve=Ee=null;for(at in q)if(g.call(q,at)&&(It=q[at],It!=null))switch(at){case"children":Rt=It;break;case"value":Ee=It;break;case"defaultValue":Ve=It;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:Xe(F,re,at,It)}if(Ee===null&&Ve!==null&&(Ee=Ve),F.push(tt),Rt!=null){if(Ee!=null)throw Error(t(92));if($(Rt)&&1<Rt.length)throw Error(t(93));Ee=""+Rt}return typeof Ee=="string"&&Ee[0]===`
`&&F.push(Vt),Ee!==null&&F.push(c(H(""+Ee))),null;case"input":F.push(en("input")),It=Rt=at=Ee=null;for(Ve in q)if(g.call(q,Ve)&&(Kt=q[Ve],Kt!=null))switch(Ve){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":It=Kt;break;case"defaultValue":at=Kt;break;case"checked":Rt=Kt;break;case"value":Ee=Kt;break;default:Xe(F,re,Ve,Kt)}return Rt!==null?Xe(F,re,"checked",Rt):It!==null&&Xe(F,re,"checked",It),Ee!==null?Xe(F,re,"value",Ee):at!==null&&Xe(F,re,"value",at),F.push(ht),null;case"menuitem":F.push(en("menuitem"));for(var oa in q)if(g.call(q,oa)&&(Ee=q[oa],Ee!=null))switch(oa){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:Xe(F,re,oa,Ee)}return F.push(tt),null;case"title":F.push(en("title")),Ee=null;for(Hn in q)if(g.call(q,Hn)&&(Ve=q[Hn],Ve!=null))switch(Hn){case"children":Ee=Ve;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:Xe(F,re,Hn,Ve)}return F.push(tt),Ee;case"listing":case"pre":F.push(en(B)),Ve=Ee=null;for(It in q)if(g.call(q,It)&&(at=q[It],at!=null))switch(It){case"children":Ee=at;break;case"dangerouslySetInnerHTML":Ve=at;break;default:Xe(F,re,It,at)}if(F.push(tt),Ve!=null){if(Ee!=null)throw Error(t(60));if(typeof Ve!="object"||!("__html"in Ve))throw Error(t(61));q=Ve.__html,q!=null&&(typeof q=="string"&&0<q.length&&q[0]===`
`?F.push(Vt,c(q)):F.push(c(""+q)))}return typeof Ee=="string"&&Ee[0]===`
`&&F.push(Vt),Ee;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":F.push(en(B));for(var Ka in q)if(g.call(q,Ka)&&(Ee=q[Ka],Ee!=null))switch(Ka){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,B));default:Xe(F,re,Ka,Ee)}return F.push(ht),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 _t(F,q,B,re);case"html":return Ae.insertionMode===0&&F.push(Zn),_t(F,q,B,re);default:if(B.indexOf("-")===-1&&typeof q.is!="string")return _t(F,q,B,re);F.push(en(B)),Ve=Ee=null;for(Kt in q)if(g.call(q,Kt)&&(at=q[Kt],at!=null))switch(Kt){case"children":Ee=at;break;case"dangerouslySetInnerHTML":Ve=at;break;case"style":Ze(F,re,at);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:S(Kt)&&typeof at!="function"&&typeof at!="symbol"&&F.push(st,c(Kt),xt,c(H(at)),tn)}return F.push(tt),St(F,Ve,Ee),Ee}}var Er=f("</"),pt=f(">"),Mt=f('<template id="'),Jt=f('"></template>'),on=f("<!--$-->"),ln=f('<!--$?--><template id="'),vr=f('"></template>'),fr=f("<!--$!-->"),ha=f("<!--/$-->"),jr=f("<template"),nr=f('"'),Lr=f(' data-dgst="');f(' data-msg="'),f(' data-stck="');var te=f("></template>");function me(F,B,q){if(a(F,ln),q===null)throw Error(t(395));return a(F,q),o(F,vr)}var Ce=f('<div hidden id="'),Ye=f('">'),He=f("</div>"),Ke=f('<svg aria-hidden="true" style="display:none" id="'),et=f('">'),kt=f("</svg>"),Yt=f('<math aria-hidden="true" style="display:none" id="'),On=f('">'),vn=f("</math>"),xr=f('<table hidden id="'),Jn=f('">'),yr=f("</table>"),ta=f('<table hidden><tbody id="'),Pi=f('">'),Nn=f("</tbody></table>"),Aa=f('<table hidden><tr id="'),Fa=f('">'),Zr=f("</tr></table>"),fo=f('<table hidden><colgroup id="'),Oa=f('">'),ru=f("</colgroup></table>");function si(F,B,q,re){switch(q.insertionMode){case 0:case 1:return a(F,Ce),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,Ye);case 2:return a(F,Ke),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,et);case 3:return a(F,Yt),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,On);case 4:return a(F,xr),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,Jn);case 5:return a(F,ta),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,Pi);case 6:return a(F,Aa),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,Fa);case 7:return a(F,fo),a(F,B.segmentPrefix),a(F,c(re.toString(16))),o(F,Oa);default:throw Error(t(397))}}function li(F,B){switch(B.insertionMode){case 0:case 1:return o(F,He);case 2:return o(F,kt);case 3:return o(F,vn);case 4:return o(F,yr);case 5:return o(F,Nn);case 6:return o(F,Zr);case 7:return o(F,ru);default:throw Error(t(397))}}var Xu=f('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("'),au=f('$RS("'),us=f('","'),ji=f('")<\/script>'),cs=f('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("'),ou=f('$RC("'),ds=f('","'),ec=f('")<\/script>'),An=f('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("'),na=f('$RX("'),Zs=f('"'),qs=f(")<\/script>"),ui=f(","),iu=/[<\u2028\u2029]/g;function Fo(F){return JSON.stringify(F).replace(iu,function(B){switch(B){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 ho=Object.assign,Pa=Symbol.for("react.element"),fs=Symbol.for("react.portal"),Rr=Symbol.for("react.fragment"),Gs=Symbol.for("react.strict_mode"),Js=Symbol.for("react.profiler"),Ks=Symbol.for("react.provider"),po=Symbol.for("react.context"),hs=Symbol.for("react.forward_ref"),ci=Symbol.for("react.suspense"),mo=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),J=Symbol.for("react.scope"),oe=Symbol.for("react.debug_trace_mode"),Ne=Symbol.for("react.legacy_hidden"),Ie=Symbol.for("react.default_value"),Ue=Symbol.iterator;function it(F){if(F==null)return null;if(typeof F=="function")return F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case Rr:return"Fragment";case fs:return"Portal";case Js:return"Profiler";case Gs:return"StrictMode";case ci:return"Suspense";case mo:return"SuspenseList"}if(typeof F=="object")switch(F.$$typeof){case po:return(F.displayName||"Context")+".Consumer";case Ks:return(F._context.displayName||"Context")+".Provider";case hs:var B=F.render;return F=F.displayName,F||(F=B.displayName||B.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case A:return B=F.displayName||null,B!==null?B:it(F.type)||"Memo";case Y:B=F._payload,F=F._init;try{return it(F(B))}catch{}}return null}var ct={};function Ft(F,B){if(F=F.contextTypes,!F)return ct;var q={},re;for(re in F)q[re]=B[re];return q}var $t=null;function Pn(F,B){if(F!==B){F.context._currentValue=F.parentValue,F=F.parent;var q=B.parent;if(F===null){if(q!==null)throw Error(t(401))}else{if(q===null)throw Error(t(401));Pn(F,q)}B.context._currentValue=B.value}}function Ga(F){F.context._currentValue=F.parentValue,F=F.parent,F!==null&&Ga(F)}function ja(F){var B=F.parent;B!==null&&ja(B),F.context._currentValue=F.value}function ra(F,B){if(F.context._currentValue=F.parentValue,F=F.parent,F===null)throw Error(t(402));F.depth===B.depth?Pn(F,B):ra(F,B)}function Oo(F,B){var q=B.parent;if(q===null)throw Error(t(402));F.depth===q.depth?Pn(F,q):Oo(F,q),B.context._currentValue=B.value}function La(F){var B=$t;B!==F&&(B===null?ja(F):F===null?Ga(B):B.depth===F.depth?Pn(B,F):B.depth>F.depth?ra(B,F):Oo(B,F),$t=F)}var Ja={isMounted:function(){return!1},enqueueSetState:function(F,B){F=F._reactInternals,F.queue!==null&&F.queue.push(B)},enqueueReplaceState:function(F,B){F=F._reactInternals,F.replace=!0,F.queue=[B]},enqueueForceUpdate:function(){}};function pa(F,B,q,re){var Ae=F.state!==void 0?F.state:null;F.updater=Ja,F.props=q,F.state=Ae;var Ee={queue:[],replace:!1};F._reactInternals=Ee;var Ve=B.contextType;if(F.context=typeof Ve=="object"&&Ve!==null?Ve._currentValue:re,Ve=B.getDerivedStateFromProps,typeof Ve=="function"&&(Ve=Ve(q,Ae),Ae=Ve==null?Ae:ho({},Ae,Ve),F.state=Ae),typeof B.getDerivedStateFromProps!="function"&&typeof F.getSnapshotBeforeUpdate!="function"&&(typeof F.UNSAFE_componentWillMount=="function"||typeof F.componentWillMount=="function"))if(B=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),B!==F.state&&Ja.enqueueReplaceState(F,F.state,null),Ee.queue!==null&&0<Ee.queue.length)if(B=Ee.queue,Ve=Ee.replace,Ee.queue=null,Ee.replace=!1,Ve&&B.length===1)F.state=B[0];else{for(Ee=Ve?B[0]:F.state,Ae=!0,Ve=Ve?1:0;Ve<B.length;Ve++){var at=B[Ve];at=typeof at=="function"?at.call(F,Ee,q,re):at,at!=null&&(Ae?(Ae=!1,Ee=ho({},Ee,at)):ho(Ee,at))}F.state=Ee}else Ee.queue=null}var go={id:1,overflow:""};function Ra(F,B,q){var re=F.id;F=F.overflow;var Ae=32-Li(re)-1;re&=~(1<<Ae),q+=1;var Ee=32-Li(B)+Ae;if(30<Ee){var Ve=Ae-Ae%5;return Ee=(re&(1<<Ve)-1).toString(32),re>>=Ve,Ae-=Ve,{id:1<<32-Li(B)+Ae|q<<Ae|re,overflow:Ee+F}}return{id:1<<Ee|q<<Ae|re,overflow:F}}var Li=Math.clz32?Math.clz32:jf,Ri=Math.log,sm=Math.LN2;function jf(F){return F>>>=0,F===0?32:31-(Ri(F)/sm|0)|0}function ps(F,B){return F===B&&(F!==0||1/F===1/B)||F!==F&&B!==B}var lm=typeof Object.is=="function"?Object.is:ps,Po=null,Qs=null,su=null,Bn=null,fn=!1,hn=!1,jo=0,vo=null,tc=0;function ms(){if(Po===null)throw Error(t(321));return Po}function nc(){if(0<tc)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Xs(){return Bn===null?su===null?(fn=!1,su=Bn=nc()):(fn=!0,Bn=su):Bn.next===null?(fn=!1,Bn=Bn.next=nc()):(fn=!0,Bn=Bn.next),Bn}function el(){Qs=Po=null,hn=!1,su=null,tc=0,Bn=vo=null}function cd(F,B){return typeof B=="function"?B(F):B}function zn(F,B,q){if(Po=ms(),Bn=Xs(),fn){var re=Bn.queue;if(B=re.dispatch,vo!==null&&(q=vo.get(re),q!==void 0)){vo.delete(re),re=Bn.memoizedState;do re=F(re,q.action),q=q.next;while(q!==null);return Bn.memoizedState=re,[re,B]}return[Bn.memoizedState,B]}return F=F===cd?typeof B=="function"?B():B:q!==void 0?q(B):B,Bn.memoizedState=F,F=Bn.queue={last:null,dispatch:null},F=F.dispatch=Lo.bind(null,Po,F),[Bn.memoizedState,F]}function tl(F,B){if(Po=ms(),Bn=Xs(),B=B===void 0?null:B,Bn!==null){var q=Bn.memoizedState;if(q!==null&&B!==null){var re=q[1];e:if(re===null)re=!1;else{for(var Ae=0;Ae<re.length&&Ae<B.length;Ae++)if(!lm(B[Ae],re[Ae])){re=!1;break e}re=!0}if(re)return q[0]}}return F=F(),Bn.memoizedState=[F,B],F}function Lo(F,B,q){if(25<=tc)throw Error(t(301));if(F===Po)if(hn=!0,F={action:q,next:null},vo===null&&(vo=new Map),q=vo.get(B),q===void 0)vo.set(B,F);else{for(B=q;B.next!==null;)B=B.next;B.next=F}}function dd(){throw Error(t(394))}function di(){}var qr={readContext:function(F){return F._currentValue},useContext:function(F){return ms(),F._currentValue},useMemo:tl,useReducer:zn,useRef:function(F){Po=ms(),Bn=Xs();var B=Bn.memoizedState;return B===null?(F={current:F},Bn.memoizedState=F):B},useState:function(F){return zn(cd,F)},useInsertionEffect:di,useLayoutEffect:function(){},useCallback:function(F,B){return tl(function(){return F},B)},useImperativeHandle:di,useEffect:di,useDebugValue:di,useDeferredValue:function(F){return ms(),F},useTransition:function(){return ms(),[!1,dd]},useId:function(){var F=Qs.treeContext,B=F.overflow;F=F.id,F=(F&~(1<<32-Li(F)-1)).toString(32)+B;var q=nl;if(q===null)throw Error(t(404));return B=jo++,F=":"+q.idPrefix+"R"+F,0<B&&(F+="H"+B.toString(32)),F+":"},useMutableSource:function(F,B){return ms(),B(F._source)},useSyncExternalStore:function(F,B,q){if(q===void 0)throw Error(t(407));return q()}},nl=null,Gr=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function gs(F){return console.error(F),null}function _i(){}function rl(F,B,q,re,Ae,Ee,Ve,at,It){var Kt=[],Rt=new Set;return B={destination:null,responseState:B,progressiveChunkSize:re===void 0?12800:re,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Rt,pingedTasks:Kt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Ae===void 0?gs:Ae,onAllReady:Ee===void 0?_i:Ee,onShellReady:Ve===void 0?_i:Ve,onShellError:at===void 0?_i:at,onFatalError:It===void 0?_i:It},q=Cr(B,0,null,q,!1,!1),q.parentFlushed=!0,F=rc(B,F,null,q,Rt,ct,null,go),Kt.push(F),B}function rc(F,B,q,re,Ae,Ee,Ve,at){F.allPendingTasks++,q===null?F.pendingRootTasks++:q.pendingTasks++;var It={node:B,ping:function(){var Kt=F.pingedTasks;Kt.push(It),Kt.length===1&&hd(F)},blockedBoundary:q,blockedSegment:re,abortSet:Ae,legacyContext:Ee,context:Ve,treeContext:at};return Ae.add(It),It}function Cr(F,B,q,re,Ae,Ee){return{status:0,id:-1,index:B,parentFlushed:!1,chunks:[],children:[],formatContext:re,boundary:q,lastPushedText:Ae,textEmbedded:Ee}}function vs(F,B){if(F=F.onError(B),F!=null&&typeof F!="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 F+'" instead');return F}function wr(F,B){var q=F.onShellError;q(B),q=F.onFatalError,q(B),F.destination!==null?(F.status=2,p(F.destination,B)):(F.status=1,F.fatalError=B)}function lu(F,B,q,re,Ae){for(Po={},Qs=B,jo=0,F=q(re,Ae);hn;)hn=!1,jo=0,tc+=1,Bn=null,F=q(re,Ae);return el(),F}function ac(F,B,q,re){var Ae=q.render(),Ee=re.childContextTypes;if(Ee!=null){var Ve=B.legacyContext;if(typeof q.getChildContext!="function")re=Ve;else{q=q.getChildContext();for(var at in q)if(!(at in Ee))throw Error(t(108,it(re)||"Unknown",at));re=ho({},Ve,q)}B.legacyContext=re,aa(F,B,Ae),B.legacyContext=Ve}else aa(F,B,Ae)}function fi(F,B){if(F&&F.defaultProps){B=ho({},B),F=F.defaultProps;for(var q in F)B[q]===void 0&&(B[q]=F[q]);return B}return B}function al(F,B,q,re,Ae){if(typeof q=="function")if(q.prototype&&q.prototype.isReactComponent){Ae=Ft(q,B.legacyContext);var Ee=q.contextType;Ee=new q(re,typeof Ee=="object"&&Ee!==null?Ee._currentValue:Ae),pa(Ee,q,re,Ae),ac(F,B,Ee,q)}else{Ee=Ft(q,B.legacyContext),Ae=lu(F,B,q,re,Ee);var Ve=jo!==0;if(typeof Ae=="object"&&Ae!==null&&typeof Ae.render=="function"&&Ae.$$typeof===void 0)pa(Ae,q,re,Ee),ac(F,B,Ae,q);else if(Ve){re=B.treeContext,B.treeContext=Ra(re,1,0);try{aa(F,B,Ae)}finally{B.treeContext=re}}else aa(F,B,Ae)}else if(typeof q=="string"){switch(Ae=B.blockedSegment,Ee=kn(Ae.chunks,q,re,F.responseState,Ae.formatContext),Ae.lastPushedText=!1,Ve=Ae.formatContext,Ae.formatContext=ae(Ve,q,re),Ro(F,B,Ee),Ae.formatContext=Ve,q){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:Ae.chunks.push(Er,c(q),pt)}Ae.lastPushedText=!1}else{switch(q){case Ne:case oe:case Gs:case Js:case Rr:aa(F,B,re.children);return;case mo:aa(F,B,re.children);return;case J:throw Error(t(343));case ci:e:{q=B.blockedBoundary,Ae=B.blockedSegment,Ee=re.fallback,re=re.children,Ve=new Set;var at={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Ve,errorDigest:null},It=Cr(F,Ae.chunks.length,at,Ae.formatContext,!1,!1);Ae.children.push(It),Ae.lastPushedText=!1;var Kt=Cr(F,0,null,Ae.formatContext,!1,!1);Kt.parentFlushed=!0,B.blockedBoundary=at,B.blockedSegment=Kt;try{if(Ro(F,B,re),Kt.lastPushedText&&Kt.textEmbedded&&Kt.chunks.push(Se),Kt.status=1,ol(at,Kt),at.pendingTasks===0)break e}catch(Rt){Kt.status=4,at.forceClientRender=!0,at.errorDigest=vs(F,Rt)}finally{B.blockedBoundary=q,B.blockedSegment=Ae}B=rc(F,Ee,q,It,Ve,B.legacyContext,B.context,B.treeContext),F.pingedTasks.push(B)}return}if(typeof q=="object"&&q!==null)switch(q.$$typeof){case hs:if(re=lu(F,B,q.render,re,Ae),jo!==0){q=B.treeContext,B.treeContext=Ra(q,1,0);try{aa(F,B,re)}finally{B.treeContext=q}}else aa(F,B,re);return;case A:q=q.type,re=fi(q,re),al(F,B,q,re,Ae);return;case Ks:if(Ae=re.children,q=q._context,re=re.value,Ee=q._currentValue,q._currentValue=re,Ve=$t,$t=re={parent:Ve,depth:Ve===null?0:Ve.depth+1,context:q,parentValue:Ee,value:re},B.context=re,aa(F,B,Ae),F=$t,F===null)throw Error(t(403));re=F.parentValue,F.context._currentValue=re===Ie?F.context._defaultValue:re,F=$t=F.parent,B.context=F;return;case po:re=re.children,re=re(q._currentValue),aa(F,B,re);return;case Y:Ae=q._init,q=Ae(q._payload),re=fi(q,re),al(F,B,q,re,void 0);return}throw Error(t(130,q==null?q:typeof q,""))}}function aa(F,B,q){if(B.node=q,typeof q=="object"&&q!==null){switch(q.$$typeof){case Pa:al(F,B,q.type,q.props,q.ref);return;case fs:throw Error(t(257));case Y:var re=q._init;q=re(q._payload),aa(F,B,q);return}if($(q)){jn(F,B,q);return}if(q===null||typeof q!="object"?re=null:(re=Ue&&q[Ue]||q["@@iterator"],re=typeof re=="function"?re:null),re&&(re=re.call(q))){if(q=re.next(),!q.done){var Ae=[];do Ae.push(q.value),q=re.next();while(!q.done);jn(F,B,Ae)}return}throw F=Object.prototype.toString.call(q),Error(t(31,F==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":F))}typeof q=="string"?(re=B.blockedSegment,re.lastPushedText=je(B.blockedSegment.chunks,q,F.responseState,re.lastPushedText)):typeof q=="number"&&(re=B.blockedSegment,re.lastPushedText=je(B.blockedSegment.chunks,""+q,F.responseState,re.lastPushedText))}function jn(F,B,q){for(var re=q.length,Ae=0;Ae<re;Ae++){var Ee=B.treeContext;B.treeContext=Ra(Ee,re,Ae);try{Ro(F,B,q[Ae])}finally{B.treeContext=Ee}}}function Ro(F,B,q){var re=B.blockedSegment.formatContext,Ae=B.legacyContext,Ee=B.context;try{return aa(F,B,q)}catch(It){if(el(),typeof It=="object"&&It!==null&&typeof It.then=="function"){q=It;var Ve=B.blockedSegment,at=Cr(F,Ve.chunks.length,null,Ve.formatContext,Ve.lastPushedText,!0);Ve.children.push(at),Ve.lastPushedText=!1,F=rc(F,B.node,B.blockedBoundary,at,B.abortSet,B.legacyContext,B.context,B.treeContext).ping,q.then(F,F),B.blockedSegment.formatContext=re,B.legacyContext=Ae,B.context=Ee,La(Ee)}else throw B.blockedSegment.formatContext=re,B.legacyContext=Ae,B.context=Ee,La(Ee),It}}function fd(F){var B=F.blockedBoundary;F=F.blockedSegment,F.status=3,Rf(this,B,F)}function Lf(F,B,q){var re=F.blockedBoundary;F.blockedSegment.status=3,re===null?(B.allPendingTasks--,B.status!==2&&(B.status=2,B.destination!==null&&B.destination.close())):(re.pendingTasks--,re.forceClientRender||(re.forceClientRender=!0,F=q===void 0?Error(t(432)):q,re.errorDigest=B.onError(F),re.parentFlushed&&B.clientRenderedBoundaries.push(re)),re.fallbackAbortableTasks.forEach(function(Ae){return Lf(Ae,B,q)}),re.fallbackAbortableTasks.clear(),B.allPendingTasks--,B.allPendingTasks===0&&(re=B.onAllReady,re()))}function ol(F,B){if(B.chunks.length===0&&B.children.length===1&&B.children[0].boundary===null){var q=B.children[0];q.id=B.id,q.parentFlushed=!0,q.status===1&&ol(F,q)}else F.completedSegments.push(B)}function Rf(F,B,q){if(B===null){if(q.parentFlushed){if(F.completedRootSegment!==null)throw Error(t(389));F.completedRootSegment=q}F.pendingRootTasks--,F.pendingRootTasks===0&&(F.onShellError=_i,B=F.onShellReady,B())}else B.pendingTasks--,B.forceClientRender||(B.pendingTasks===0?(q.parentFlushed&&q.status===1&&ol(B,q),B.parentFlushed&&F.completedBoundaries.push(B),B.fallbackAbortableTasks.forEach(fd,F),B.fallbackAbortableTasks.clear()):q.parentFlushed&&q.status===1&&(ol(B,q),B.completedSegments.length===1&&B.parentFlushed&&F.partialBoundaries.push(B)));F.allPendingTasks--,F.allPendingTasks===0&&(F=F.onAllReady,F())}function hd(F){if(F.status!==2){var B=$t,q=Gr.current;Gr.current=qr;var re=nl;nl=F.responseState;try{var Ae=F.pingedTasks,Ee;for(Ee=0;Ee<Ae.length;Ee++){var Ve=Ae[Ee],at=F,It=Ve.blockedSegment;if(It.status===0){La(Ve.context);try{aa(at,Ve,Ve.node),It.lastPushedText&&It.textEmbedded&&It.chunks.push(Se),Ve.abortSet.delete(Ve),It.status=1,Rf(at,Ve.blockedBoundary,It)}catch(Qa){if(el(),typeof Qa=="object"&&Qa!==null&&typeof Qa.then=="function"){var Kt=Ve.ping;Qa.then(Kt,Kt)}else{Ve.abortSet.delete(Ve),It.status=4;var Rt=Ve.blockedBoundary,Hn=Qa,oa=vs(at,Hn);if(Rt===null?wr(at,Hn):(Rt.pendingTasks--,Rt.forceClientRender||(Rt.forceClientRender=!0,Rt.errorDigest=oa,Rt.parentFlushed&&at.clientRenderedBoundaries.push(Rt))),at.allPendingTasks--,at.allPendingTasks===0){var Ka=at.onAllReady;Ka()}}}}}Ae.splice(0,Ee),F.destination!==null&&sc(F,F.destination)}catch(Qa){vs(F,Qa),wr(F,Qa)}finally{nl=re,Gr.current=q,q===qr&&La(B)}}}function oc(F,B,q){switch(q.parentFlushed=!0,q.status){case 0:var re=q.id=F.nextSegmentId++;return q.lastPushedText=!1,q.textEmbedded=!1,F=F.responseState,a(B,Mt),a(B,F.placeholderPrefix),F=c(re.toString(16)),a(B,F),o(B,Jt);case 1:q.status=2;var Ae=!0;re=q.chunks;var Ee=0;q=q.children;for(var Ve=0;Ve<q.length;Ve++){for(Ae=q[Ve];Ee<Ae.index;Ee++)a(B,re[Ee]);Ae=uu(F,B,Ae)}for(;Ee<re.length-1;Ee++)a(B,re[Ee]);return Ee<re.length&&(Ae=o(B,re[Ee])),Ae;default:throw Error(t(390))}}function uu(F,B,q){var re=q.boundary;if(re===null)return oc(F,B,q);if(re.parentFlushed=!0,re.forceClientRender)re=re.errorDigest,o(B,fr),a(B,jr),re&&(a(B,Lr),a(B,c(H(re))),a(B,nr)),o(B,te),oc(F,B,q);else if(0<re.pendingTasks){re.rootSegmentID=F.nextSegmentId++,0<re.completedSegments.length&&F.partialBoundaries.push(re);var Ae=F.responseState,Ee=Ae.nextSuspenseID++;Ae=f(Ae.boundaryPrefix+Ee.toString(16)),re=re.id=Ae,me(B,F.responseState,re),oc(F,B,q)}else if(re.byteSize>F.progressiveChunkSize)re.rootSegmentID=F.nextSegmentId++,F.completedBoundaries.push(re),me(B,F.responseState,re.id),oc(F,B,q);else{if(o(B,on),q=re.completedSegments,q.length!==1)throw Error(t(391));uu(F,B,q[0])}return o(B,ha)}function cu(F,B,q){return si(B,F.responseState,q.formatContext,q.id),uu(F,B,q),li(B,q.formatContext)}function ys(F,B,q){for(var re=q.completedSegments,Ae=0;Ae<re.length;Ae++)ic(F,B,q,re[Ae]);if(re.length=0,F=F.responseState,re=q.id,q=q.rootSegmentID,a(B,F.startInlineScript),F.sentCompleteBoundaryFunction?a(B,ou):(F.sentCompleteBoundaryFunction=!0,a(B,cs)),re===null)throw Error(t(395));return q=c(q.toString(16)),a(B,re),a(B,ds),a(B,F.segmentPrefix),a(B,q),o(B,ec)}function ic(F,B,q,re){if(re.status===2)return!0;var Ae=re.id;if(Ae===-1){if((re.id=q.rootSegmentID)===-1)throw Error(t(392));return cu(F,B,re)}return cu(F,B,re),F=F.responseState,a(B,F.startInlineScript),F.sentCompleteSegmentFunction?a(B,au):(F.sentCompleteSegmentFunction=!0,a(B,Xu)),a(B,F.segmentPrefix),Ae=c(Ae.toString(16)),a(B,Ae),a(B,us),a(B,F.placeholderPrefix),a(B,Ae),o(B,ji)}function sc(F,B){n=new Uint8Array(512),r=0;try{var q=F.completedRootSegment;if(q!==null&&F.pendingRootTasks===0){uu(F,B,q),F.completedRootSegment=null;var re=F.responseState.bootstrapChunks;for(q=0;q<re.length-1;q++)a(B,re[q]);q<re.length&&o(B,re[q])}var Ae=F.clientRenderedBoundaries,Ee;for(Ee=0;Ee<Ae.length;Ee++){var Ve=Ae[Ee];re=B;var at=F.responseState,It=Ve.id,Kt=Ve.errorDigest,Rt=Ve.errorMessage,Hn=Ve.errorComponentStack;if(a(re,at.startInlineScript),at.sentClientRenderFunction?a(re,na):(at.sentClientRenderFunction=!0,a(re,An)),It===null)throw Error(t(395));a(re,It),a(re,Zs),(Kt||Rt||Hn)&&(a(re,ui),a(re,c(Fo(Kt||"")))),(Rt||Hn)&&(a(re,ui),a(re,c(Fo(Rt||"")))),Hn&&(a(re,ui),a(re,c(Fo(Hn)))),o(re,qs)}Ae.splice(0,Ee);var oa=F.completedBoundaries;for(Ee=0;Ee<oa.length;Ee++)ys(F,B,oa[Ee]);oa.splice(0,Ee),i(B),n=new Uint8Array(512),r=0;var Ka=F.partialBoundaries;for(Ee=0;Ee<Ka.length;Ee++){var Qa=Ka[Ee];e:{Ae=F,Ve=B;var du=Qa.completedSegments;for(at=0;at<du.length;at++)if(!ic(Ae,Ve,Qa,du[at])){at++,du.splice(0,at);var md=!1;break e}du.splice(0,at),md=!0}if(!md){F.destination=null,Ee++,Ka.splice(0,Ee);return}}Ka.splice(0,Ee);var Bi=F.completedBoundaries;for(Ee=0;Ee<Bi.length;Ee++)ys(F,B,Bi[Ee]);Bi.splice(0,Ee)}finally{i(B),F.allPendingTasks===0&&F.pingedTasks.length===0&&F.clientRenderedBoundaries.length===0&&F.completedBoundaries.length===0&&B.close()}}function pd(F,B){try{var q=F.abortableTasks;q.forEach(function(re){return Lf(re,F,B)}),q.clear(),F.destination!==null&&sc(F,F.destination)}catch(re){vs(F,re),wr(F,re)}}return W0.renderToReadableStream=function(F,B){return new Promise(function(q,re){var Ae,Ee,Ve=new Promise(function(Rt,Hn){Ee=Rt,Ae=Hn}),at=rl(F,ie(B?B.identifierPrefix:void 0,B?B.nonce:void 0,B?B.bootstrapScriptContent:void 0,B?B.bootstrapScripts:void 0,B?B.bootstrapModules:void 0),K(B?B.namespaceURI:void 0),B?B.progressiveChunkSize:void 0,B?B.onError:void 0,Ee,function(){var Rt=new ReadableStream({type:"bytes",pull:function(Hn){if(at.status===1)at.status=2,p(Hn,at.fatalError);else if(at.status!==2&&at.destination===null){at.destination=Hn;try{sc(at,Hn)}catch(oa){vs(at,oa),wr(at,oa)}}},cancel:function(){pd(at)}},{highWaterMark:0});Rt.allReady=Ve,q(Rt)},function(Rt){Ve.catch(function(){}),re(Rt)},Ae);if(B&&B.signal){var It=B.signal,Kt=function(){pd(at,It.reason),It.removeEventListener("abort",Kt)};It.addEventListener("abort",Kt)}hd(at)})},W0.version="18.2.0",W0}var im,_O;im=eCe();_O=tCe();im.version;im.renderToString;var nCe=im.renderToStaticMarkup;im.renderToNodeStream;im.renderToStaticNodeStream;_O.renderToReadableStream;const BO=ke.oneOf(["top","right","bottom","left","bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned","top-left-aligned","top-middle-aligned","top-right-aligned","auto"]),HO=ke.oneOf(["top-middle","top-left","top-right","bottom-left","bottom-right","bottom-middle","middle-left","middle-right","middle-middle"]),YO=ke.shape({nextLabel:ke.string,prevLabel:ke.string,skipLabel:ke.string,doneLabel:ke.string,hidePrev:ke.bool,hideNext:ke.bool,tooltipPosition:BO,tooltipClass:ke.string,highlightClass:ke.string,exitOnEsc:ke.bool,exitOnOverlayClick:ke.bool,showStepNumbers:ke.bool,keyboardNavigation:ke.bool,showButtons:ke.bool,showBullets:ke.bool,showProgress:ke.bool,scrollToElement:ke.bool,overlayOpacity:ke.number,scrollPadding:ke.number,positionPrecedence:ke.arrayOf(ke.string),disableInteraction:ke.bool,hintPosition:HO,hintButtonLabel:ke.string,hintAnimation:ke.bool}),UO={hidePrev:!0,hideNext:!0};function zO(){return typeof window>"u"}class v2 extends P.Component{constructor(n){super(n);De(this,"onExit",()=>{const{onExit:n}=this.props;this.isVisible=!1,n(this.introJs._currentStep)});De(this,"onBeforeExit",()=>{const{onBeforeExit:n}=this.props;return n?n(this.introJs._currentStep):!0});De(this,"onBeforeChange",n=>{if(!this.isVisible)return!0;const{onBeforeChange:r,onPreventChange:a}=this.props;if(r){const o=r(this.introJs._currentStep,n);return o===!1&&a&&setTimeout(()=>{a(this.introJs._currentStep)},0),o}return!0});De(this,"onAfterChange",n=>{if(!this.isVisible)return;const{onAfterChange:r}=this.props;r&&r(this.introJs._currentStep,n)});De(this,"onChange",n=>{if(!this.isVisible)return;const{onChange:r}=this.props;r&&r(this.introJs._currentStep,n)});De(this,"onComplete",()=>{const{onComplete:n}=this.props;n&&n()});De(this,"updateStepElement",n=>{const r=document.querySelector(this.introJs._options.steps[n].element);r&&(this.introJs._introItems[n].element=r,this.introJs._introItems[n].position=this.introJs._options.steps[n].position||"auto")});this.introJs=null,this.isConfigured=!1,this.isVisible=!1,this.installIntroJs()}componentDidMount(){this.props.enabled&&(this.configureIntroJs(),this.renderSteps())}componentDidUpdate(n){const{enabled:r,steps:a,options:o}=this.props;(!this.isConfigured||n.steps!==a||n.options!==o)&&(this.configureIntroJs(),this.renderSteps()),n.enabled!==r&&this.renderSteps()}componentWillUnmount(){this.introJs.exit()}installIntroJs(){zO()||(this.introJs=ob(),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:n,steps:r}=this.props,a=r.map(o=>P.isValidElement(o.intro)?{...o,intro:nCe(o.intro)}:o);this.introJs.setOptions({...n,steps:a}),this.isConfigured=!0}renderSteps(){const{enabled:n,initialStep:r,steps:a,onStart:o}=this.props;n&&a.length>0&&!this.isVisible?(this.introJs.start(),this.isVisible=!0,this.introJs.goToStepNumber(r+1),o&&o(this.introJs._currentStep)):!n&&this.isVisible&&(this.isVisible=!1,this.introJs.exit())}render(){return null}}De(v2,"propTypes",{enabled:ke.bool,initialStep:ke.number.isRequired,steps:ke.arrayOf(ke.shape({element:ke.oneOfType([ke.string,typeof Element>"u"?ke.any:ke.instanceOf(Element)]),intro:ke.node.isRequired,position:BO,tooltipClass:ke.string,highlightClass:ke.string})).isRequired,onStart:ke.func,onExit:ke.func.isRequired,onBeforeExit:ke.func,onBeforeChange:ke.func,onAfterChange:ke.func,onChange:ke.func,onPreventChange:ke.func,onComplete:ke.func,options:YO}),De(v2,"defaultProps",{enabled:!1,onStart:null,onBeforeExit:null,onBeforeChange:null,onAfterChange:null,onChange:null,onPreventChange:null,onComplete:null,options:UO});class lN extends P.Component{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:a}=this.props;(!this.isConfigured||t.hints!==r||t.options!==a)&&(this.configureIntroJs(),this.renderHints()),t.enabled!==n&&this.renderHints()}componentWillUnmount(){this.introJs.hideHints()}installIntroJs(){if(zO())return;this.introJs=ob();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}}De(lN,"propTypes",{enabled:ke.bool,hints:ke.arrayOf(ke.shape({element:ke.string.isRequired,hint:ke.string.isRequired,hintPosition:HO})).isRequired,onClick:ke.func,onClose:ke.func,options:YO}),De(lN,"defaultProps",{enabled:!1,onClick:null,onClose:null,options:UO});const rCe=[{element:".left-sidebar",intro:E("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:E("Click here and go to settings page.")},{element:".path-entry-wrapper",intro:E("Click here and go to different path.")},{element:".queries-wrapper",intro:E("Select or create query filter here.")},{element:".status-text-container.sidebar",intro:E("See the status of Thinos here.")+E("It is not available on small view")},{element:".heatmap-default",intro:E("See your time status of thinos here.")},{element:".tags-wrapper",intro:E("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:E("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:E("Edit or create your thino here.")},{element:".memolist-wrapper",intro:E("See your thinos here.")}],aCe=[{element:".memos-sidebar-wrapper.left-sidebar",intro:E("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:E("Click here and go to settings page.")},{element:".heatmap-default",intro:E("See your time status of thinos here.")},{element:".path-entry-wrapper",intro:E("Click here and go to different path.")},{element:".queries-wrapper",intro:E("Select or create query filter here.")},{element:".tags-wrapper",intro:E("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:E("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:E("Edit or create your thino here.")},{element:".memolist-wrapper",intro:E("See your thinos here.")}],oCe={nextLabel:E("Next"),prevLabel:E("Previous"),doneLabel:E("Done"),hideNext:!1};function iCe(){var y;const{dailyNotesState:{settings:e,verifyState:t},locationState:{pathname:n},globalState:{isMobileView:r,memoListView:a,globalEditorShown:o,locked:i,exited:l}}=P.useContext(Lt),c=P.useRef(null),f=P.useRef(null),p=e?e.FirstLoaded:(y=app.plugins.getPlugin("obsidian-memos").settings)==null?void 0:y.FirstLoaded;P.useEffect(()=>{if(!e.needVerify){dt.setLocked(!1);return}dt.setLocked(!0)},[e==null?void 0:e.needVerify]),P.useEffect(()=>{if(!f.current)return;(async()=>{var I;const T=!C.Platform.isDesktop&&await((I=window.Capacitor)==null?void 0:I.Plugins.Device.getId()),S=C.Platform.isDesktop?await cr():T.identifier||T.uuid;!t||(t==null?void 0:t.appId)!==S?f.current.toggleClass("hide-pro",!0):f.current.toggleClass("hide-pro",!1)})()},[t,f.current]);const g=()=>{dt.setExitSteps(!1)};return v.jsxs(v.Fragment,{children:[p&&v.jsx(Wxe,{}),v.jsx(v2,{ref:c,enabled:l,steps:(e==null?void 0:e.DefaultThemeForThino)==="modern"?rCe:aCe,initialStep:0,onExit:g,options:oCe,onBeforeChange:w=>{(r&&(e==null?void 0:e.DefaultThemeForThino)==="classic"&&w===6||r&&(e==null?void 0:e.DefaultThemeForThino)==="modern"&&w===7)&&dt.setShowSiderbarInMobileView(!1)}}),i&&!p&&v.jsx(Vxe,{}),!i&&!p&&o&&v.jsx(ff,{editorType:"block"}),!i&&!p&&!o&&v.jsx("section",{ref:f,id:"page-wrapper","data-path":n,className:ar(`memos-${n==="/"?a:"list"}-view`,(e==null?void 0:e.DefaultThemeForThino)==="modern"?"modern":"classic"),children:v.jsxs(v.Fragment,{children:[v.jsx(X4,{sidebarPosition:"left",className:"left-sidebar"}),v.jsx("main",{className:"content-wrapper",children:wCe(n)}),(e==null?void 0:e.DefaultThemeForThino)==="modern"&&!r?v.jsx(X4,{sidebarPosition:"right",className:"right-sidebar"}):null]})})]})}const sCe={"*":v.jsx(iCe,{})},lCe=e=>{const{memo:t,handleDeletedMemoAction:n}=e,{dailyNotesState:r}=P.useContext(Lt),a={...t,createdAtStr:ut.getDateTimeString(t.createdAt),deletedAtStr:ut.getDateTimeString(t.deletedAt||t.createdAt)},o=ne.useRef(null),i=ne.useRef(null),[l,c]=ne.useState(""),[f,p]=Jl(!1),g={restore:P.useRef(null),delete:P.useRef(null),source:P.useRef(null)};P.useEffect(()=>{i&&(C.setIcon(g.restore.current,"archive-restore"),C.setIcon(g.delete.current,"trash"),C.setIcon(g.source.current,"home"))},[i]),P.useEffect(()=>{if(!o.current||!i.current||o.current.hasChildNodes()&&t.content===l||!r.view)return;const I=r.view;c(t.content),o.current.hasChildNodes()&&o.current.empty();async function M(){var _;await C.MarkdownRenderer.render(r.app,t.content+`
`,o.current,t.path,I);const N=(_=o.current)==null?void 0:_.querySelectorAll(".internal-link");N==null||N.forEach(k=>{const R=k,L=R.getAttribute("data-href");if(!L)return;r.app.metadataCache.getFirstLinkpathDest(L,t.path)||k.classList.add("is-unresolved"),R.addEventListener("mouseover",U=>{U.stopPropagation(),r.app.workspace.trigger("hover-link",{event:U,source:"thino",hoverParent:I.containerEl,targetEl:R,linktext:L,sourcePath:R.href})})})}M()},[t.content,i]);const y=async()=>{if(f)try{await be.deleteMemoById(a.id),n(a.id)}catch(I){new C.Notice(I.message)}else p()},w=async()=>{switch(a.sourceType){case"DAILY":await _2(a.id,a.path);break;case"CANVAS":await H2(a.id,a.path);break;case"MULTI":await R2(a.path);break;case"FILE":await B2(a.id,a.path);break}},T=async()=>{try{const I=await be.restoreMemoById(a.id),M=r.app,N=M==null?void 0:M.loadLocalStorage("tokenForSync");I&&I.webId&&N&&r.settings.startSync&&await Zg(I.webId),I&&be.editMemo(I),n(a.id),new C.Notice(E("RESTORE SUCCEED"))}catch(I){new C.Notice(I.message)}},S=()=>{f&&p(!1)};return v.jsxs("div",{ref:i,className:`memo-wrapper ${"memos-"+a.id}`,onMouseLeave:S,children:[v.jsxs("div",{className:"memo-top-wrapper",children:[v.jsxs("span",{className:"time-text",children:[E("DELETE AT")," ",a.deletedAtStr]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:I=>{I&&C.setIcon(I,"more-horizontal")},className:"btn more-action-btn"}),v.jsx("div",{className:"more-action-btns-wrapper",children:v.jsxs("div",{className:"more-action-btns-container",children:[v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:g.restore,className:"more-action-item-icon"}),v.jsx("span",{className:"btn restore-btn",onClick:T,children:E("RESTORE")})]}),v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:g.source,className:"more-action-item-icon"}),v.jsx("span",{className:"btn",onClick:w,children:E("SOURCE")})]}),v.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[v.jsx("span",{ref:g.delete,className:"more-action-item-icon"}),v.jsx("span",{className:`btn delete-btn ${f?"final-confirm":""}`,onClick:y,children:E(f?"CONFIRM":"DELETE")})]})]})})]})]}),v.jsx("div",{ref:o,className:"memo-content-text",onContextMenu:I=>{I.preventDefault(),I.stopPropagation()}})]})},uCe=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:a,type:o,text:i,filter:l}=t,c=sn.getQueryById(l);return!!(r||a&&a.from<a.to||o||i||c)||c||n?e.filter(p=>{let g=!0;if(p.thinoType!==void 0&&n&&p.thinoType==="TASK-DONE"&&(g=!1),p.content.contains("comment:")&&(g=!1),c){const y=JSON.parse(c.querystring);Array.isArray(y)&&(g=Bp(p,y))}if(r){const y=new Set;for(const w of Array.from(p.content.match($r)||[])){const S=w.replace($r,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(ua)||[])){const S=w.replace(ua,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(Wa)||[])){const S=w.replace(Wa,"$2").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}y.has(r)||(g=!1)}return a&&a.from<a.to&&(ut.getTimeStampByDate(p.createdAt)<a.from||ut.getTimeStampByDate(p.createdAt)>a.to)&&(g=!1),o&&(o==="NOT_TAGGED"&&(p.content.match($r)!==null||p.content.match(Wa)!==null||p.content.match(ua)!==null)||o==="LINKED"&&p.content.match(Cf)===null||o==="IMAGED"&&p.content.match(Mf)===null||o==="CONNECTED"&&p.content.match(nd)===null)&&(g=!1),i&&!p.content.toLowerCase().includes(i.toLowerCase())&&(g=!1),g}):e.filter(p=>!p.content.contains("comment:"))},cCe=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n}}=P.useContext(Lt),r=am(),[a,o]=P.useState([]),i=ne.useRef(null),l=ne.useRef(null);P.useEffect(()=>{l.current&&C.setIcon(l.current,"more-horizontal")},[l]),P.useEffect(()=>{const w=uCe({memos:n.filter(T=>T.deletedAt!==""&&T.deletedAt),query:e,HideDoneTasks:!1});o(w),r.setFinish()},[n,i.current,e]);const c=P.useCallback(w=>{o(T=>T.filter(S=>S.id!==w))},[]),f=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),p=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await Ul()){Sn();return}const w=[...a],T=ft.getState().settings.startSync,S=ft.getState().app,I=S==null?void 0:S.loadLocalStorage("tokenForSync");try{const M=w.filter(k=>k.sourceType==="DAILY"),N=w.filter(k=>k.sourceType!=="DAILY");for(const k of N){const R=await be.restoreMemoById(k.id);R&&R.webId&&I&&T&&await Zg(R.webId),R&&be.editMemo(R)}const _=Lu(M);for(const{path:k,thinos:R}of _){const L=await be.dealWithDailyThinoBulk(k,R,"restoreFromDelete");for(const H of L)H&&H.webId&&I&&T&&await Zg(H.webId)}ot.clearQuery(),new C.Notice(E("RESTORE SUCCEED"))}catch(M){new C.Notice(M.message)}},g=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await Ul()){Sn();return}const w=[...a],T=ft.getState().settings,S=ft.getState().app,I=S==null?void 0:S.loadLocalStorage("tokenForSync");try{const M=w.filter(k=>k.sourceType==="DAILY"),N=w.filter(k=>k.sourceType!=="DAILY");for(const k of N)await be.deleteMemoById(k.id);const _=Lu(M);for(const{path:k,thinos:R}of _){const L=await be.dealWithDailyThinoBulk(k,R,"deleteForever");if(!(!I||!T.startSync))for(const H of L)H&&H.webId&&await I2(H.webId)}ot.clearQuery(),new C.Notice(E("DELETE SUCCEED"))}catch(M){console.error("error",M),new C.Notice(M.message)}},y=w=>{const T=new C.Menu;T.addItem(S=>{S.setTitle(E("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new _s(app,E("RESTORE"),async I=>{I==="confirm"&&await p()}).open()})}).addItem(S=>{S.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(app,E("DELETE"),async I=>{I==="confirm"&&await g()}).open()})}),T.showAtMouseEvent(w.nativeEvent)};return v.jsxs("div",{className:"memo-trash-wrapper",ref:i,children:[v.jsxs("div",{className:"section-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:w=>{w&&C.setIcon(w,"menu")},className:"btn action-btn clickable-icon",onClick:f})}),v.jsxs("span",{className:"go-home-btn",onClick:()=>{ot.clearQuery(),ot.setPathname("/")},children:["🏠 ",E("Return To Home Page")]}),v.jsx("span",{ref:l,className:"menu-popup-btn",onClick:y})]}),v.jsx(Fv,{})]}),v.jsx(dy,{thinosCount:a.length,thinos:a}),r.isLoading?v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Fetching data...")})}):a.length===0?v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})}):v.jsx("div",{className:"deleted-memos-container",children:a.map(w=>v.jsx(lCe,{memo:w,handleDeletedMemoAction:c},`${w.id}-${w.updatedAt}`))})]})},$0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%200%2024%2024'%20width='24px'%20fill='currentColor'%3e%3cpath%20d='M0%200h24v24H0V0z'%20fill='none'/%3e%3cpath%20d='M19%203H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h14c1.1%200%202-.9%202-2V5c0-1.1-.9-2-2-2zm0%2016H5V5h14v14zM17.99%209l-1.41-1.42-6.59%206.59-2.58-2.57-1.42%201.41%204%203.99z'/%3e%3c/svg%3e",Z0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='currentColor'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20d='M0%200h24v24H0V0z'/%3e%3cpath%20d='M19%205v14H5V5h14m0-2H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h14c1.1%200%202-.9%202-2V5c0-1.1-.9-2-2-2z'/%3e%3c/svg%3e",dCe=()=>{const{globalState:e}=P.useContext(Lt),{useTinyUndoHistoryCache:t,shouldHideImageUrl:n,shouldSplitMemoWord:r,shouldUseMarkdownParser:a}=e,o=`👋 你好呀欢迎使用memos!
* ✨ **开源项目**
* 😋 精美且细节的视觉样式;
* 📑 体验优良的交互逻辑;`,i=()=>{dt.setAppSetting({useTinyUndoHistoryCache:!t})},l=()=>{dt.setAppSetting({shouldSplitMemoWord:!r})},c=()=>{dt.setAppSetting({shouldHideImageUrl:!n})},f=()=>{dt.setAppSetting({shouldUseMarkdownParser:!a})},p=async()=>{const g=be.getState().memos.map(T=>({...T})),y=JSON.stringify(g),w=document.createElement("a");w.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(y)),w.setAttribute("download","data.json"),w.style.display="none",document.body.appendChild(w),w.click(),document.body.removeChild(w)};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"section-container preferences-section-container",children:[v.jsx("p",{className:"title-text",children:"Memo 显示相关"}),v.jsx("div",{className:"demo-content-container memo-content-text",dangerouslySetInnerHTML:{__html:oT(o)}}),v.jsxs("label",{className:"form-label checkbox-form-label",onClick:l,children:[v.jsx("span",{className:"normal-text",children:"中英文内容自动间隔"}),v.jsx("img",{className:"icon-img",src:r?$0:Z0})]}),v.jsxs("label",{className:"form-label checkbox-form-label",onClick:f,children:[v.jsx("span",{className:"normal-text",children:"部分 markdown 格式解析"}),v.jsx("img",{className:"icon-img",src:a?$0:Z0})]}),v.jsxs("label",{className:"form-label checkbox-form-label",onClick:c,children:[v.jsx("span",{className:"normal-text",children:"隐藏图片链接地址"}),v.jsx("img",{className:"icon-img",src:n?$0:Z0})]})]}),v.jsxs("div",{className:"section-container preferences-section-container",children:[v.jsx("p",{className:"title-text",children:"编辑器"}),v.jsxs("label",{className:"form-label checkbox-form-label",onClick:i,children:[v.jsxs("span",{className:"normal-text",children:["启用"," ",v.jsx("a",{target:"_blank",href:"https://github.com/boojack/tiny-undo",onClick:g=>g.stopPropagation(),rel:"noreferrer",children:"tiny-undo"})]}),v.jsx("img",{className:"icon-img",src:t?$0:Z0})]})]}),v.jsxs("div",{className:"section-container hidden",children:[v.jsx("p",{className:"title-text",children:"其他"}),v.jsx("div",{className:"btn-container",children:v.jsx("button",{className:"btn export-btn",onClick:p,children:"导出数据(JSON)"})})]})]})},fCe=()=>{const{globalState:{isMobileView:e}}=P.useContext(Lt);P.useEffect(()=>{be.fetchAllMemos()},[]);const t=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]);return v.jsxs("div",{className:"preference-wrapper",children:[v.jsx("div",{className:"section-header-container",children:v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:e,children:v.jsx("button",{className:"action-btn",onClick:t})}),v.jsx("span",{className:"normal-text",children:"账号与设置"})]})}),v.jsx("div",{className:"sections-wrapper",children:v.jsx(dCe,{})})]})},hCe=()=>{const{dailyNotesState:{app:e},locationState:{query:t},globalState:{isMobileView:n,changedByMemos:r},memoState:{memos:a}}=P.useContext(Lt),o=am(),[i,l]=P.useState([]),[c,f]=P.useState([]),p=ne.useRef(null),g=ne.useRef(null),[y,w]=P.useState(!1),[T,S]=P.useState([]),I=ne.useRef([]),M=P.useCallback(({memos:k,query:R,HideDoneTasks:L})=>{const{tag:H,duration:U,type:z,text:$,filter:X}=R,Q=sn.getQueryById(X);return!!(H||U&&U.from<U.to||z||$||Q)||Q||L?k.filter(ue=>{let fe=!0;if(ue.thinoType!==void 0&&L&&ue.thinoType==="TASK-DONE"&&(fe=!1),ue.content.contains("comment:")&&(fe=!1),Q){const Z=JSON.parse(Q.querystring);Array.isArray(Z)&&(fe=Bp(ue,Z))}if(H){const Z=new Set;for(const pe of Array.from(ue.content.match($r)||[])){const de=pe.replace($r,"$1").trim().split("/");let K="";for(const ae of de)K+=ae,Z.add(K),K+="/"}for(const pe of Array.from(ue.content.match(ua)||[])){const de=pe.replace(ua,"$1").trim().split("/");let K="";for(const ae of de)K+=ae,Z.add(K),K+="/"}for(const pe of Array.from(ue.content.match(Wa)||[])){const de=pe.replace(Wa,"$2").trim().split("/");let K="";for(const ae of de)K+=ae,Z.add(K),K+="/"}Z.has(H)||(fe=!1)}return U&&U.from<U.to&&(ut.getTimeStampByDate(ue.createdAt)<U.from||ut.getTimeStampByDate(ue.createdAt)>U.to)&&(fe=!1),z&&(z==="NOT_TAGGED"&&(ue.content.match($r)!==null||ue.content.match(ua)!==null)||z==="LINKED"&&ue.content.match(Cf)===null||z==="IMAGED"&&ue.content.match(Mf)===null||z==="CONNECTED"&&ue.content.match(nd)===null)&&(fe=!1),$&&!ue.content.toLowerCase().includes($.toLowerCase())&&(fe=!1),fe}):k},[]);P.useEffect(()=>{g.current&&(C.setIcon(g.current,"refresh-cw"),e.workspace.on("refresh-review-memos",_))},[g]),P.useEffect(()=>{if(!y)return;if(t){const L=[...M({memos:a,query:t,HideDoneTasks:!1})].sort(()=>Math.random()-Math.random()).slice(0,10);l(L),w(!1);return}const k=[...T].sort(()=>Math.random()-Math.random()).slice(0,10);l(k),w(!1)},[y]),P.useEffect(()=>{if(!(T.length>0))return;const k=[...T].sort(()=>Math.random()-Math.random()).slice(0,10);l(k),w(!1)},[T]),P.useEffect(()=>{p.current&&(S(M({memos:a,query:t,HideDoneTasks:!1}).filter(k=>k.rowStatus!=="ARCHIVED"&&!(k.deletedAt!==""&&k.deletedAt))),o.setFinish(),ot.clearQuery())},[a,p.current]),P.useEffect(()=>{if(r&&I.current.length>0){const k=T.filter(L=>I.current.includes(L.id)),R=I.current.map(L=>k.find(H=>H.id===L)).filter(L=>L!==void 0);f(R);return}I.current=i.map(k=>k.id),f(i)},[i]),P.useEffect(()=>{if(i.length===0)return;const k=M({memos:i,query:t,HideDoneTasks:!1});f(k)},[t]);const N=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),_=()=>{w(!0)};return v.jsxs("div",{className:"memo-review-wrapper",ref:p,children:[v.jsx("div",{className:"section-header-container",children:v.jsxs("div",{className:"title-wrapper",children:[v.jsxs("div",{className:"title-btns-left-wrapper",children:[v.jsx(ts,{when:n,children:v.jsx("button",{ref:k=>{k&&C.setIcon(k,"menu")},className:"btn action-btn clickable-icon",onClick:N})}),v.jsx("span",{ref:g,onClick:_,className:"refresh-icon"})]}),v.jsx("div",{className:"title-btns-right-wrapper",children:v.jsxs("span",{className:"go-home-btn",onClick:()=>{ot.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})})]})}),v.jsx(dy,{}),o.isLoading?v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Fetching data...")})}):a.length===0?v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})}):v.jsx("div",{className:"review-memos-container",children:c.map(k=>v.jsx(ai,{memo:k},`${k==null?void 0:k.id}-${k.createdAt}`))})]})},VO=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:a,type:o,text:i,filter:l}=t,c=sn.getQueryById(l);return!!(r||a&&a.from<a.to||o||i||c)||c||n?e.filter(p=>{let g=!0;if(p.thinoType!==void 0&&n&&p.thinoType==="TASK-DONE"&&(g=!1),p.content.contains("comment:")&&(g=!1),c){const y=JSON.parse(c.querystring);Array.isArray(y)&&(g=Bp(p,y))}if(r){const y=new Set;for(const w of Array.from(p.content.match($r)||[])){const S=w.replace($r,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(ua)||[])){const S=w.replace(ua,"$1").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}for(const w of Array.from(p.content.match(Wa)||[])){const S=w.replace(Wa,"$2").trim().split("/");let I="";for(const M of S)I+=M,y.add(I),I+="/"}y.has(r)||(g=!1)}return a&&a.from<a.to&&(ut.getTimeStampByDate(p.createdAt)<a.from||ut.getTimeStampByDate(p.createdAt)>a.to)&&(g=!1),o&&(o==="NOT_TAGGED"&&(p.content.match($r)!==null||p.content.match(Wa)!==null||p.content.match(ua)!==null)||o==="LINKED"&&p.content.match(Cf)===null||o==="IMAGED"&&p.content.match(Mf)===null||o==="CONNECTED"&&p.content.match(nd)===null)&&(g=!1),i&&!p.content.toLowerCase().includes(i.toLowerCase())&&(g=!1),g}):e.filter(p=>!p.content.contains("comment:"))},pCe=P.forwardRef((e,t)=>{const{currentDate:n,setCurrentDateStamp:r}=e,[a,o]=P.useState(!1),i=ut.getDateStampByDate(ut.getDateString(n)),l=P.useRef(null);P.useEffect(()=>{l.current&&(!a&&C.setIcon(l.current,"more-horizontal"),a&&C.setIcon(l.current,"x"))},[l.current,a]);const c=f=>{r(f)};return P.useImperativeHandle(t,()=>({closeDatePicker:()=>{o(!1)}})),v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"date-card-container",children:[v.jsxs("div",{className:"date-container-details",children:[v.jsxs("div",{className:"details-text",children:[C.moment(i,"x").format("dddd"),v.jsx("div",{className:"date-text",children:C.moment(i,"x").format("MMM")+C.moment(i,"x").format("DD")})]}),v.jsx("div",{className:"details-logo-text",children:E("Daily Memos")})]}),v.jsxs("div",{className:"date-container-info",children:[v.jsxs("div",{className:"date-container-info-text",children:["Week ",v.jsx("div",{className:"week-text",children:C.moment(i,"x").format("ww")}),"of ",v.jsx("div",{className:"year-text",children:C.moment(i,"x").format("YYYY")})]}),v.jsx("div",{ref:l,onClick:()=>o(!a)})]})]}),v.jsx(Sb,{className:`date-picker ${a?"":"hidden"}`,datestamp:i,handleDateStampChange:c})]})}),mCe=({thino:e})=>{const t=P.useCallback(()=>{Hp(e)},[]);return v.jsxs("div",{className:"daily-thino-wrapper",children:[v.jsx("div",{className:"time-wrapper",onClick:t,children:v.jsx("span",{className:"normal-text",children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm")})}),v.jsx("div",{className:"daily-thino-container",children:v.jsx(ai,{memo:e})})]})},gCe=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n},dailyNotesState:{settings:r,app:a}}=P.useContext(Lt),o=am(),[i,l]=P.useState([]),[c,f]=P.useState(ut.getDateStampByDate(ut.getDateString(C.moment().format("YYYY-MM-DD HH:mm:ss")))),p=P.useRef(),g=P.useRef(null),y=ne.useRef(null),w=P.useRef(null),[T,S]=P.useState(!1);P.useEffect(()=>{e.duration&&e.duration.from&&e.duration.to&&f(e.duration.from)},[e.duration]),P.useEffect(()=>{w.current&&(C.setIcon&&w&&!T&&C.setIcon(w.current,"share"),C.setIcon&&w&&T&&C.setIcon(w.current,"chrome"))},[w.current,T]),P.useEffect(()=>{const _=VO({memos:n,query:e,HideDoneTasks:!1}).filter(k=>ut.getTimeStampByDate(k.createdAt)>=c&&ut.getTimeStampByDate(k.createdAt)<c+ei).filter(k=>k.deletedAt==="").sort((k,R)=>ut.getTimeStampByDate(k.createdAt)-ut.getTimeStampByDate(R.createdAt));l(_.slice(0,40)),o.setFinish()},[n,c,y.current,e]);const I=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),M=async()=>{var N;p.current&&((N=p==null?void 0:p.current)==null||N.closeDatePicker()),S(!0),document.body.toggleClass("thino-share-page",!0),setTimeout(async()=>{if(!g.current){S(!1);return}await HE(g.current),Ib(g.current,{pixelRatio:window.devicePixelRatio*2}).then(_=>{if(r!=null&&r.AutoSaveWhenOnMobile&&C.Platform.isMobile){const k=_.split("base64,")[1];db(k,"image/png").arrayBuffer().then(async L=>{let H;const U="png",z=Zu();for(const $ in z)if(z[$]instanceof C.TFile){H=z[$];break}H!==void 0&&await a.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,U,H),L)})}document.body.toggleClass("thino-share-page",!1),Eb({imgUrl:_}),S(!1)}).catch(()=>{document.body.toggleClass("thino-share-page",!1),S(!1)})},0)};return v.jsxs("div",{className:"daily-thinos-list-wrapper",ref:y,children:[v.jsxs("div",{className:"section-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:N=>{N&&C.setIcon(N,"menu")},className:"btn action-btn clickable-icon",onClick:I})}),v.jsxs("span",{className:"go-home-btn",onClick:()=>{ot.clearQuery(),ot.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})]}),v.jsxs("div",{className:"header-right-section",children:[v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N=>{C.setIcon&&N&&C.setIcon(N,"chevron-left")},className:"btn btn-text",onClick:()=>f(N=>N-ei)}),v.jsx("span",{ref:N=>{C.setIcon&&N&&C.setIcon(N,"chevron-right")},className:"btn btn-text",onClick:()=>f(N=>N+ei)}),v.jsx("span",{ref:w,className:ar("btn btn-text share-btn",T?"generating":""),onClick:M})]}),v.jsx(UE,{}),v.jsx(Fv,{})]})]}),v.jsx(dy,{thinosCount:i.length,thinos:i}),v.jsx("div",{className:"daily-thinos-view-wrapper",children:v.jsxs("div",{ref:g,className:"daily-thinos-view-container",children:[v.jsx(pCe,{ref:p,currentDate:new Date(c),setCurrentDateStamp:f}),o.isLoading?v.jsx("div",{className:"tip-text-container",children:v.jsx("p",{className:"tip-text",children:E("Fetching data...")})}):i.length===0?v.jsx("div",{className:"tip-container",children:v.jsx("p",{className:"tip-text",children:E("Noooop!")})}):v.jsx("div",{className:"daily-thinos-list-container",children:i.map(N=>v.jsx(mCe,{thino:N},`${N.id}-${N.updatedAt}`))})]})})]})},vCe={"/recycle":v.jsx(cCe,{}),"/setting":v.jsx(fCe,{}),"/archive":v.jsx(Nxe,{}),"/review":v.jsx(hCe,{}),"/daily":v.jsx(gCe,{}),"*":v.jsx(Oxe,{})},WO=e=>t=>{for(const n of Object.keys(e))if(n===t)return e[n];return e["*"]},yCe=WO(sCe),wCe=WO(vCe);function bCe({app:e}){const{locationState:{pathname:t},dailyNotesState:{settings:n}}=P.useContext(Lt);return P.useEffect(()=>{be.fetchAllMemos()},[]),!Wg()&&!e.plugins.getPlugin("periodic-notes")&&(n!=null&&n.EnabledLocationList.find(r=>r.value==="DAILY"))&&new C.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!Wg()&&(n!=null&&n.EnabledLocationList.find(r=>r.value==="DAILY"))&&!XL()&&new C.Notice(E("Your daily note folder is not set correctly, please check your settings")),v.jsx(is,{store:Le,context:Lt,children:yCe(t)})}function SCe(e){const t=e.view.canvas,n=ft.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"}),a=Av(r);a.render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(DCe,{leaf:e})})})),t.thinoBtn=a,ft.getState().view.appendRoot({root:a,canvas:t})}function DCe({leaf:e}){const{memoState:{memos:t},locationState:{query:n}}=P.useContext(Lt),r=ne.useRef(null),a=ne.useRef(null),[o,i]=ne.useState(!1),[l,c]=ne.useState([]),[f,p]=ne.useState([]),{tag:g,duration:y,type:w,text:T,filter:S}=n,I=sn.getQueryById(S),M=!!(g||y&&y.from<y.to||w||T||I);return P.useEffect(()=>{a.current&&C.setIcon(a.current,"eraser")},[a.current]),P.useEffect(()=>{r.current&&C.setIcon(r.current,"Memos")},[r.current]),P.useEffect(()=>{const N=e.view.file.path,_=t.filter(k=>k.sourceType==="CANVAS"&&k.path===N);c(_)},[t,o]),P.useEffect(()=>{if(l.length===0)return;if(!n||!M){p(l);return}const N=VO({memos:l,query:n,HideDoneTasks:!1});p(N)},[n,l]),P.useEffect(()=>{if(!n||!M&&f.length===0)return;const N=new Set(f.map(k=>k.id)),_=Array.from(e.view.canvas.nodes.values());_.forEach(k=>{k.nodeEl.toggleVisibility(!0),e.view.canvas.getEdgesForNode(k).forEach(R=>{var L,H,U;(L=R.lineGroupEl)==null||L.toggleClass("hidden",!1),(H=R.lineStartGroupEl)==null||H.toggleClass("hidden",!1),(U=R.lineEndGroupEl)==null||U.toggleClass("hidden",!1)})}),_.filter(k=>!N.has(k.id)).forEach(k=>{k.nodeEl.toggleVisibility(!1),e.view.canvas.getEdgesForNode(k).forEach(R=>{var L,H,U;(L=R.lineGroupEl)==null||L.toggleClass("hidden",!0),(H=R.lineStartGroupEl)==null||H.toggleClass("hidden",!0),(U=R.lineEndGroupEl)==null||U.toggleClass("hidden",!0)})})},[f]),v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:r,className:"btn-container",onClick:()=>i(!o)}),o&&v.jsxs("div",{className:"thino-canvas-menu",children:[v.jsxs("div",{className:"thino-canvas-filter-group",children:[v.jsx(UE,{}),v.jsx(Fv,{}),M&&v.jsx("div",{ref:a,className:"clear-query",onClick:()=>{ot.clearQuery()}})]}),v.jsx(Qg,{initThinos:f})]})]})}function ww(e,t){const n=Object.keys(t).map(r=>TCe(e,r,t[r]));return n.length===1?n[0]:function(){n.forEach(r=>r())}}function TCe(e,t,n){const r=e[t],a=e.hasOwnProperty(t);let o=n(r);return r&&Object.setPrototypeOf(o,r),Object.setPrototypeOf(i,o),e[t]=i,l;function i(...c){return o===r&&e[t]===i&&l(),o.apply(this,c)}function l(){e[t]===i&&(a?e[t]=r:delete e[t]),o!==r&&(o=r,Object.setPrototypeOf(i,r||Function))}}const lo="thino_view";class ICe extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");this.plugin=r,this.suggestEl.toggleClass("thino-date-selector",!0)}checkInMemosView(n){var o;const r=n.containerEl;if(!r)return!1;const a=(o=r.parentElement)==null?void 0:o.parentElement;return(a==null?void 0:a.classList.contains("common-editor-inputer"))||!1}onTrigger(n,r){const o=r.getLine(n.line)[n.ch-1];return this.checkInMemosView(r)&&o==="@"?(this.cursor=n,this.editor=r,C.Platform.isMobile?(new R6(this.app,"text",i=>{this.selectSuggestion(parseInt(i),new MouseEvent("click"))}).open(),null):{start:{line:n.line,ch:n.ch-1},end:n,query:""}):null}getSuggestions(){return[parseInt(C.moment().startOf("day").format("x"))]}renderSuggestion(n,r){r.empty(),this.root=rs.createRoot(r),this.root.render(v.jsx(ne.StrictMode,{children:v.jsx(Sb,{className:"editor-date-picker",datestamp:n,handleDateStampChange:this.selectSuggestion.bind(this)})}))}selectSuggestion(n,r){var l,c,f;if(r instanceof KeyboardEvent||r instanceof PointerEvent&&!r.target.closest(".day-item"))return;const a=(l=this.app.workspace.getLeavesOfType("thino_view")[0])==null?void 0:l.view;(c=a==null?void 0:a.contentEl.find(".action-btn.list-or-task.list"))==null||c.click();let o="",i="";switch(this.plugin.settings.InsertDateFormat){case"Dataview":o="[due:: ",i="]";break;case"Tasks":o="📅 ";break}this.editor.replaceRange(o+C.moment(n).format("YYYY-MM-DD")+i,{line:this.cursor.line,ch:this.cursor.ch-1},this.cursor),(f=this.root)==null||f.unmount(),this.close()}}class ECe extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");De(this,"memos",[]);this.plugin=r,this.memos=be.getState().memos.filter(a=>!a.deletedAt&&a.rowStatus!=="ARCHIVED")}checkInMemosView(n){var o;const r=n.containerEl;if(!r)return!1;const a=(o=r.parentElement)==null?void 0:o.parentElement;return(a==null?void 0:a.classList.contains("common-editor-inputer"))||!1}fuzzySearchItemsOptimized(n,r){const a=C.prepareFuzzySearch(n);return r.map(o=>{const i=a(o.content);return i?{item:o,match:i}:null}).filter(Boolean)}onTrigger(n,r){if(!this.checkInMemosView(r))return null;const o=r.getLine(n.line).slice(0,n.ch);if(o.lastIndexOf("~")===-1)return null;const i=o.slice(o.lastIndexOf("~")+1,n.ch);if(o[o.lastIndexOf("~")-1]!==" "&&o.lastIndexOf("~")!==0)return null;const l=i.trim();return this.memos=be.getState().memos.filter(c=>!c.deletedAt&&c.rowStatus!=="ARCHIVED"),{start:{line:n.line,ch:n.ch-l.length},end:n,query:l}}getSuggestions(n){return n.query?this.fuzzySearchItemsOptimized(n.query,this.memos).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item).map(a=>({time:a.createdAt,id:a.id,content:a.content})):this.memos.map(a=>({time:a.createdAt,id:a.id,content:a.content}))}renderSuggestion(n,r){r.toggleClass("thino-suggestion",!0),r.createEl("div",{cls:"thino-suggestion-time",text:n.time}),r.createEl("div",{cls:"thino-suggestion-container"}).createEl("div",{cls:"thino-suggestion-content",text:n.content})}selectSuggestion(n){const r=n.id;this.context.editor.replaceRange("MARK: [@THINO]("+r+")",{line:this.context.end.line,ch:this.context.start.ch-1},this.context.end)}}class xCe{constructor(){De(this,"path","/fake-file-that-generated-for-thino.png");De(this,"basename","fake-file-that-generated-for-thino");De(this,"extension","png");De(this,"deleted",!1);De(this,"name","fake-file-that-generated-for-thino.png");De(this,"parent",null);De(this,"stat");De(this,"vault",null)}static[Symbol.hasInstance](t){return t instanceof C.TFile}setPath(t){}getNewPathAfterRename(t){}getShortName(){}cache(t){}updateCacheLimit(){}}class gf extends C.ItemView{constructor(n,r){super(n);De(this,"scope",new C.Scope(this.app.scope));De(this,"root");De(this,"mobileHeaderRoot");De(this,"plugin");De(this,"memosComponent");De(this,"rootList",[]);De(this,"editor",null);De(this,"navigation",!1);De(this,"file",this.app.vault.getMarkdownFiles()[0]||new xCe);De(this,"handleUpdateInstance",n=>{this.editor=n.editor});De(this,"updateCacheDebounced",C.debounce(async n=>{this.app.vault.getFileByPath(n.path)&&await be.updateMemosInFile(n)},1e3));De(this,"debounceTemplateExecution",C.debounce(async()=>{this.app.workspace.trigger("templater:all-templates-executed")},1e3));this.plugin=r,this.registerScope()}getDisplayText(){return"Thino"}getIcon(){return"Memos"}getViewType(){return lo}getMode(){return"source"}canToggleBacklinks(){return!1}registerScope(){const{scope:n}=this;n.register(["Mod"],"Enter",()=>{}),n.register([],"i",r=>{const a=r.target;a.tagName==="INPUT"||a.tagName==="TEXTAREA"||a.hasClass("cm-line")||a.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-textarea"))}),n.register(["Mod"],"f",r=>{const a=r.target;a.tagName==="INPUT"||a.tagName==="TEXTAREA"||a.hasClass("cm-line")||a.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),n.register([],"o",r=>{const a=r.target;a.tagName==="INPUT"||a.tagName==="TEXTAREA"||a.hasClass("cm-line")||a.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),n.register([],"Escape",()=>{setTimeout(()=>{this.plugin.app.workspace.trigger("blur-on-memos")},20)})}async onFileDeleted(n){var p,g,y,w,T;const r=up(n,"day"),a=n.path.contains(".thino")&&n.path.contains(".canvas"),o=n.path.contains(".thino")&&n.path.contains(".md"),i=((p=this.plugin.settings)==null?void 0:p.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",l=(y=((g=n.parent)==null?void 0:g.path)||n.path)==null?void 0:y.contains(i==null?void 0:i.trim());(r||a&&this.plugin.settings.EnabledLocationList.find(S=>S.value==="CANVAS"))&&(await be.removeMemosInFile(n),be.updateTagsState()),l&&this.plugin.settings.EnabledLocationList.find(S=>S.value==="MULTI")&&(await be.removeMemosInFile(n,i),be.updateTagsState()),o&&this.plugin.settings.EnabledLocationList.find(S=>S.value==="FILE")&&(await be.removeMemosInFile(n),be.updateTagsState());const c=(w=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:w.contains(this.plugin.settings.TagForMultiTypeFiles),f=(T=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:T.contains(this.plugin.settings.TagForFileTypeFiles);!l&&c&&(await be.updateMemosInFile(n,i),be.updateTagsState()),!o&&f&&(await be.updateMemosInFile(n),be.updateTagsState())}async onFileModified(n){var g,y,w;if(dt.getState().changedByMemos){dt.setChangedByMemos(!1);return}const r=up(n,"day"),a=n.path.contains(".thino")&&n.path.contains(".canvas"),o=n.path.contains(".thino")&&n.path.contains(".md"),i=((g=this.plugin.settings)==null?void 0:g.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",l=n.parent.path.contains(i==null?void 0:i.trim()),c=be.getState().preparingUpdateMemo&&be.getState().preparingUpdateMemo.length>0;if((r||a&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="CANVAS"))&&!c){await be.updateMemosInFile(n),be.updateTagsState();return}l&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="MULTI")&&(await be.updateMemosInFile(n,i),be.updateTagsState()),o&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="FILE")&&(await be.updateMemosInFile(n),be.updateTagsState());const f=(y=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:y.contains(this.plugin.settings.TagForMultiTypeFiles),p=(w=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:w.contains(this.plugin.settings.TagForFileTypeFiles);!l&&f&&(await be.updateMemosInFile(n,i),be.updateTagsState()),!o&&p&&(await be.updateMemosInFile(n),be.updateTagsState())}async onFileCreated(n){var r,a,o;if(this.app.workspace.layoutReady&&this.root){const i=up(n,"day"),l=n.path.contains(".thino")&&n.path.contains(".canvas"),c=n.path.contains(".thino")&&n.path.contains(".md"),f=((r=this.plugin.settings)==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",p=n.parent.path.contains(f==null?void 0:f.trim()),g=be.getState().preparingUpdateMemo&&be.getState().preparingUpdateMemo.length>0;if(i&&!g){await ft.updateDailyNotes(n,!1),await be.updateMemosInFile(n),be.updateTagsState();return}if(l&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="CANVAS")){await be.updateMemosInFile(n),be.updateTagsState();return}p&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="MULTI")&&(await be.updateMemosInFile(n,f),be.updateTagsState()),c&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="FILE")&&(await be.updateMemosInFile(n),be.updateTagsState());const y=(a=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:a.contains(this.plugin.settings.TagForMultiTypeFiles),w=(o=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:o.contains(this.plugin.settings.TagForFileTypeFiles);!p&&y&&(await be.updateMemosInFile(n,f),be.updateTagsState()),!c&&w&&(await be.updateMemosInFile(n),be.updateTagsState())}}async onFileRenamed(n,r){n instanceof C.TFile&&(await be.removeThinosByPath(r),await this.onFileCreated(n))}async onResize(){var r;super.onResize();const n=this.leaf;if(n&&n.height!==0){if(n.view.containerEl.toggleClass("tiny-view",n.width<600),n.view.containerEl.toggleClass("waterfall-small-group",n.width<1300),n.width>950){n.view.containerEl.classList.toggle("mobile-view",!1),dt.setIsMobileView(n.width<=950);return}if((r=this.plugin.settings)!=null&&r.ShowLeftSideBar&&!C.Platform.isMobile)return;n.view.containerEl.classList.toggle("mobile-view",!0),dt.setIsMobileView(n.width<=950)}}appendToHeader(){const n=this.leaf.view.titleContainerEl;n&&(this.mobileHeaderRoot=rs.createRoot(n),this.mobileHeaderRoot.render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(yw,{})})})))}appendRoot({root:n,canvas:r}){this.rootList.push({root:n,canvas:r})}registerPatchWorkspaceLeaf(){const n=this;this.register(ww(C.Workspace.prototype,{getActiveViewOfType:r=>function(a){const o=r.call(this,a);if(!o&&(a==null?void 0:a.VIEW_TYPE)==="markdown"){const i=this.activeLeaf;if(i.view instanceof gf)return i.view}return o},setActiveLeaf:r=>function(a,o){if(EY(a)&&(r.call(this,a,o),a.activeTime=17e11),r.call(this,a,o),a.view instanceof gf){const i=dt.getState().instanceList.get(a.id);if(!i)return;n.app.workspace.activeEditor=i.owner,a.view.editor=i.editor}},getActiveFile:r=>function(){var o;const a=r.call(this);return((o=this.activeLeaf)==null?void 0:o.view)instanceof gf&&n.file||a}}))}async onOpen(){this.navigation=this.plugin.settings.navigation,await this.onResize(),this.onFileCreated=this.onFileCreated.bind(this),this.onFileDeleted=this.onFileDeleted.bind(this),this.onFileModified=this.onFileModified.bind(this),C.Platform.isTablet&&document.body.toggleClass("is-tablet",!0),C.Platform.isMobile&&!C.Platform.isTablet&&this.appendToHeader(),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",C.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",n=>{n.view.getViewType()==="canvas"&&SCe(n)})),this.registerEvent(this.app.metadataCache.on("changed",(n,r,a)=>{if(be.getState().preparingUpdateMemo&&be.getState().preparingUpdateMemo.length>0){this.debounceTemplateExecution();return}if(!be.initialized)return;up(n,"day")&&this.updateCacheDebounced(n)})),this.registerEvent(this.app.workspace.on("templater:all-templates-executed",async()=>{await be.finishWaitingForTemplaterThinos()})),this.registerPatchWorkspaceLeaf();try{this.root=rs.createRoot(this.contentEl),ft.setView(this),this.root.render(v.jsx(ne.StrictMode,{children:v.jsx(bCe,{app:this.plugin.app})}))}catch(n){console.error(n)}}onunload(){var n;super.onunload(),this.root.unmount(),(n=this.mobileHeaderRoot)==null||n.unmount(),this.rootList.forEach(r=>{var a,o,i;(a=r==null?void 0:r.root)==null||a.unmount(),(o=r==null?void 0:r.canvas)!=null&&o.thinoBtn&&(r.canvas.thinoBtn=void 0),(i=r==null?void 0:r.canvas)!=null&&i.wrapperEl.find(".thino-canvas-menu-btn")&&r.canvas.wrapperEl.find(".thino-canvas-menu-btn").detach()})}}const uN={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 CCe(){Object.keys(uN).forEach(e=>{C.addIcon(e,uN[e])})}const qE=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const cN=typeof TextEncoder=="function"?new TextEncoder:void 0,MCe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",jg=Array.prototype.slice.call(MCe);(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(jg);const Pl=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const kCe=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),NCe=e=>{let t,n,r,a,o="";const i=e.length%3;for(let l=0;l<e.length;){if((n=e.charCodeAt(l++))>255||(r=e.charCodeAt(l++))>255||(a=e.charCodeAt(l++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|a,o+=jg[t>>18&63]+jg[t>>12&63]+jg[t>>6&63]+jg[t&63]}return i?o.slice(0,i-3)+"===".substring(i):o},$O=typeof btoa=="function"?e=>btoa(e):qE?e=>Buffer.from(e,"binary").toString("base64"):NCe,ACe=qE?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,a=e.length;r<a;r+=4096)n.push(Pl.apply(null,e.subarray(r,r+4096)));return $O(n.join(""))},FCe=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Pl(192|t>>>6)+Pl(128|t&63):Pl(224|t>>>12&15)+Pl(128|t>>>6&63)+Pl(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Pl(240|t>>>18&7)+Pl(128|t>>>12&63)+Pl(128|t>>>6&63)+Pl(128|t&63)}},OCe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,PCe=e=>e.replace(OCe,FCe),dN=qE?e=>Buffer.from(e,"utf8").toString("base64"):cN?e=>ACe(cN.encode(e)):e=>$O(PCe(e)),jCe=(e,t=!1)=>t?kCe(dN(e)):dN(e),JD=C.Platform.isDesktop&&require("os"),ZO=async()=>{var r,a;let e="";if(C.Platform.isDesktop)e=await cr();else{const o=await((r=window.Capacitor)==null?void 0:r.Plugins.Device.getId());e=o.identifier||o.uuid}let t;if(JD)t=JSON.stringify({hostname:JD.hostname(),platform:JD.platform(),machineid:e});else{const o=await((a=window.Capacitor)==null?void 0:a.Plugins.Device.getInfo()),i=o==null?void 0:o.model,l=o==null?void 0:o.platform;t=JSON.stringify({hostname:i||("mobile"+C.Platform.isMobile?Math.random().toString(36).substring(7):""),platform:l||"mobile",machineid:e})}return jCe(t)},LCe=async()=>{var t;let e="";if(C.Platform.isDesktop)e=await cr();else{const n=await((t=window.Capacitor)==null?void 0:t.Plugins.Device.getId());e=n.identifier||n.uuid}return e},RCe={General:"chef-hat",Thino:"Memos",Interface:"brush",Share:"share-2",Advanced:"cog"},_Ce=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"},{value:"CANVAS",target:"MemoDefaultCanvasPath"},{value:"MULTI",target:"MemoDefaultMultiFilePath"},{value:"FILE",target:"MemoDefaultSingleFilePath"}],Ei={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,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};function BCe({plugin:e}){const{dailyNotesState:{verifyState:t}}=P.useContext(Lt),[n,r]=P.useState(!1),[a,o]=P.useState(!1),[i,l]=P.useState(""),[c,f]=P.useState("");P.useEffect(()=>{LCe().then(y=>{f(y)})},[]);const p=async()=>{var S;const y=i,w=!C.Platform.isDesktop&&await((S=window.Capacitor)==null?void 0:S.Plugins.Device.getId()),T=C.Platform.isDesktop?await cr():w.identifier||w.uuid;y&&(e.settingTab.updateSettings("tokenForVerify",{...e.settings.tokenForVerify,[T]:y}),e.verify().then(I=>{I&&(r(!0),dt.setRefresh(!0),setTimeout(()=>{e.settingTab.display()},200),e.registerToolbarCheck()),new C.Notice(E(I?"Verify successfully":"Failed to verify"))}).catch(I=>{new C.Notice(E("Failed to verify"))}))},g=async y=>{l(y)};return v.jsx("div",{className:"thino-verify-component",children:t?v.jsxs("div",{className:"thino-verify-content verified",children:[v.jsx("div",{className:"thino-verified-text",children:E("You have verified your account. Congrats!")}),v.jsx("div",{className:"thino-description-link",children:v.jsxs("p",{children:[E("If you have any questions, please contact us."),v.jsx("span",{className:"thino-url",onClick:()=>{const y=localStorage.getItem("language");y&&(y==="zh"||y==="zh-TW")?window.open("https://pkmer.cn"):window.open("https://thino.pkmer.net/en/")},children:"@ PKMer"})]})})]}):v.jsxs("div",{className:"thino-verify-content",children:[v.jsxs("div",{className:"thino-description-link",children:[E("You can buy a license from")+"->",v.jsxs("span",{className:"thino-url",onClick:()=>{const y=localStorage.getItem("language");y&&(y==="zh"||y==="zh-TW")?window.open("https://pkmer.cn/products/thino"):window.open("https://thino.pkmer.net/en/#price")},children:[" ","PKMer"]})]}),v.jsx("textarea",{className:"thino-verify-textarea",value:i,onChange:y=>g(y.target.value),placeholder:E("Input activation code here")}),v.jsxs("div",{className:"thino-button-container",children:[v.jsxs("div",{className:"thino-button-group",children:[v.jsx("button",{onClick:async()=>{try{const y=await ZO();await navigator.clipboard.writeText(y),o(!0)}catch(y){console.error(y),new C.Notice("Failed to copy id");return}new C.Notice(E("Copied to clipboard Successfully"))},children:E("Copy Thino id")}),v.jsx("button",{onClick:()=>{if(!a){new C.Notice(E("Please copy Thino id first"));return}const y=localStorage.getItem("language");y&&(y==="zh"||y==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&getCode"):window.open("https://pkmer.net/en/userprofile/#tab-21&getCode"),r(!0)},children:E("Get activation code")}),i&&v.jsx(v.Fragment,{children:v.jsx("button",{onClick:async()=>{await p()},children:E("Verify")})})]}),n?v.jsx("p",{children:E("After you verify your account, please refresh this page.")}):""]}),v.jsxs("div",{className:"thino-description-link",children:[E("If you have any questions, please contact us."),v.jsx("span",{className:"thino-url",onClick:()=>{const y=localStorage.getItem("language");y&&(y==="zh"||y==="zh-TW")?window.open("https://pkmer.cn"):window.open("https://thino.pkmer.net/en/")},children:"@ PKMer"})]})]})})}class HCe extends C.PluginSettingTab{constructor(n,r){super(n,r);De(this,"plugin");De(this,"applyDebounceTimer",0);De(this,"tabContent",new Map);De(this,"selectedTab","General");De(this,"search");De(this,"searchSettingInfo",new Map);De(this,"searchZeroState");De(this,"navigateEl");De(this,"passwordMatched",!1);De(this,"root");De(this,"debounceApplySettingsUpdate",C.debounce(async()=>{await this.plugin.saveSettings()},100,!0));De(this,"debounceDisplay",C.debounce(async()=>{await this.display()},300,!0));this.plugin=r}updateSettings(n,r){this.plugin.settings={...this.plugin.settings,[n]:r},this.applySettingsUpdate()}applySettingsUpdate(){this.debounceApplySettingsUpdate(),be.updateTagsState()}async hide(){var n;(n=this.root)==null||n.unmount(),this.passwordMatched=!1}async display(){var n;await this.plugin.loadSettings(),this.root&&((n=this.root)==null||n.unmount()),this.containerEl.empty(),this.containerEl.toggleClass("memos-settings",!0),C.Platform.isMobile&&this.containerEl.toggleClass("memos-mobile",!0),this.generateSettingsTitle(),this.addTabHeader()}generateSettingsTitle(){const n=this.containerEl.createDiv("memos-setting-title");n.createEl("h2",{text:"Thino"}),this.generateSearchBar(n)}addTabHeader(){const n=this.containerEl.createEl("nav",{cls:"memos-setting-header"});this.navigateEl=n.createDiv("memos-setting-tab-group");const r=this.containerEl.createDiv("memos-setting-content");this.updateOldData(),this.createTabAndContent("General",this.navigateEl,r,(a,o)=>this.generateGeneralSettings(o,a)),this.createTabAndContent("Thino",this.navigateEl,r,(a,o)=>this.generateMemosSettings(o,a)),this.createTabAndContent("Interface",this.navigateEl,r,(a,o)=>this.generateThemeSettings(o,a)),this.createTabAndContent("Share",this.navigateEl,r,(a,o)=>this.generateShareSettings(o,a)),this.createTabAndContent("Advanced",this.navigateEl,r,(a,o)=>this.generateAdvancedSettings(o,a)),this.createSearchZeroState(r)}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()}generateSearchBar(n){const r=new C.Setting(n);r.settingEl.style.border="none",r.addSearch(a=>{this.search=a}),this.search.setPlaceholder(E("Search all settings")),this.search.inputEl.oninput=()=>{for(const a of this.tabContent){const o=a[1];o.navButton.removeClass("memos-navigation-item-selected"),o.content.show(),o.heading.show();const i=this.search.getValue();this.selectedTab==""&&i.trim()!=""&&this.searchSettings(i.toLowerCase()),this.selectedTab=""}this.navigateEl.addClass("memos-setting-searching")},this.search.inputEl.onblur=()=>{this.navigateEl.removeClass("memos-setting-searching")},this.search.onChange(a=>{var o;if(a===""){this.triggerTabChange((o=this.tabContent.get("General"))==null?void 0:o.navButton,"General");return}this.searchSettings(a.toLowerCase())})}triggerTabChange(n,r){if(this.selectedTab==r)return;n.toggleClass("memos-navigation-item-selected",!0);const a=this.tabContent.get(r);if((a==null?void 0:a.content).show(),this.selectedTab!=""){const o=this.tabContent.get(this.selectedTab);o==null||o.navButton.removeClass("memos-navigation-item-selected"),(o==null?void 0:o.content).hide()}else{this.searchZeroState.hide();for(const o of this.searchSettingInfo)for(const i of o[1])i.containerEl.show();for(const o of this.tabContent){const i=o[1];i.heading.hide(),r!==o[0]&&i.content.hide()}}this.selectedTab=r}createTabAndContent(n,r,a,o){const i=this.selectedTab===n,l=r.createDiv("memos-navigation-item");l.toggleClass("memos-desktop",!0),C.setIcon(l.createEl("div",{cls:"memos-navigation-item-icon"}),RCe[n]),l.createSpan({text:E(n)}),l.onclick=()=>{this.triggerTabChange(l,n)};const c=a.createDiv("memos-tab-settings"),f=c.createEl("h2",{cls:"memos-setting-heading",text:n+" Settings"});f.hide(),c.id=n.toLowerCase().replace(" ","-"),i?l.addClass("memos-navigation-item-selected"):c.hide(),o&&o(c,n),this.tabContent.set(n,{content:c,heading:f,navButton:l})}searchSettings(n){var o;const r=new Set,a=(i,l)=>{i.show(),r.has(l)||r.add(l)};for(const i of this.searchSettingInfo){const l=i[0],c=i[1];for(const f of c)if(n.trim()===""||(o=f.alias)!=null&&o.includes(n)||f.description.includes(n)||f.name.includes(n))a(f.containerEl,l);else if(f.options&&f.options.length>0)for(const p of f.options){if(p.description.toLowerCase().includes(n)||p.name.toLowerCase().includes(n)){a(f.containerEl,l);break}else if(p.options){for(const g of p.options)if(g.description.toLowerCase().includes(n)||g.value.toLowerCase().includes(n)){a(f.containerEl,l);break}}f.containerEl.hide()}else f.containerEl.hide()}for(const i of this.tabContent)r.has(i[0])?i[1].heading.show():i[1].heading.hide();r.size===0?this.searchZeroState.show():this.searchZeroState.hide()}addSettingToMasterSettingsList(n,r,a="",o="",i=[],l=""){var f;const c={containerEl:r,name:a.toLowerCase(),description:o.toLowerCase(),options:i,alias:l};this.searchSettingInfo.has(n)?(f=this.searchSettingInfo.get(n))==null||f.push(c):this.searchSettingInfo.set(n,[c])}createSearchZeroState(n){this.searchZeroState=n.createDiv(),this.searchZeroState.hide(),this.searchZeroState.createEl(C.Platform.isMobile?"h3":"h2",{text:"No settings match search"}).style.textAlign="center"}generateGeneralSettings(n,r){this.customHeading(n,r)}async generateThemeSettings(n,r){var c;const a=ft.getState().verifyState,o=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),i=C.Platform.isDesktop?await cr():o.identifier||o.uuid,l=a&&(a==null?void 0:a.appId)===i;await this.customNameAndTheme(n,r,l)}async generateMemosSettings(n,r){var c;const a=ft.getState().verifyState,o=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),i=C.Platform.isDesktop?await cr():o.identifier||o.uuid,l=a&&(a==null?void 0:a.appId)===i;this.setPasswordSettings(n,r),this.addMemoSettings(n,r),this.addTaskRelatedSettings(n,r),this.customFileNameSettings(n,r,l),this.addThinoProSettings(n,r,l)}async generateShareSettings(n,r){var c;const a=ft.getState().verifyState,o=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),i=C.Platform.isDesktop?await cr():o.identifier||o.uuid,l=a&&(a==null?void 0:a.appId)===i;new rt(r,this).setHeading().setTab(n).setName("📄 "+E("Copy filtered results")),this.copyMemosSettings(n,r),new rt(r,this).setHeading().setTab(n).setName("🖼 "+E("Share image")),this.shareMemosSettings(n,r),C.Platform.isMobile&&this.shareToThinosSettings(n,r,l)}async generateAdvancedSettings(n,r){var c;this.saveDataSettings(n,r),this.fetchDataSettings(n,r),this.navigationSettings(n,r),this.optimizeForCalloutSettings(n,r),this.clearConfigSettings(n,r);const a=ft.getState().verifyState,o=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),i=C.Platform.isDesktop?await cr():o.identifier||o.uuid,l=a&&(a==null?void 0:a.appId)===i;this.setGlobalSettings(n,r,l)}async customNameAndTheme(n,r,a){new rt(r,this).setName(E("Theme for Thino")).setDesc(E("Set the theme for Thino")).setTab(n).addDropdown(async i=>{i.addOption("modern","Modern"),i.addOption("classic","Classic"),i.setValue(this.plugin.settings.DefaultThemeForThino).onChange(async l=>{this.plugin.settings.DefaultThemeForThino=l,this.applySettingsUpdate()})}),new rt(r,this).setTab(n).setHeading().setName("🎨 "+E("Interface Details"));let o;new rt(r,this).setName(E("Heatmap Color Scheme")).setDesc(E("Set different color scheme for heatmap.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("default",E("Default")),o.addOption("gray",E("Gray")),o.addOption("grass",E("Grass")),o.addOption("flame",E("Flame")),o.addOption("olive",E("Olive")),o.addOption("ice",E("Ice")),o.addOption("magenta",E("Magenta")),o.setValue(this.plugin.settings.HeatmapColorScheme).onChange(async l=>{this.plugin.settings.HeatmapColorScheme=l,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Save Memo button label")).setDesc(E("The text shown on the save Memo button in the UI. 'NOTEIT' by default.")).setTab(n).addText(i=>i.setPlaceholder(Ei.SaveMemoButtonLabel).setValue(this.plugin.settings.SaveMemoButtonLabel).onChange(async l=>{this.plugin.settings.SaveMemoButtonLabel=l,this.applySettingsUpdate()})),C.Platform.isDesktop&&new rt(r,this).setName(E("Always Show Leaf Sidebar on PC")).setDesc(E("Show left sidebar on PC even when the leaf width is less than 875px. False by default.")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.ShowLeftSideBar).onChange(async l=>{this.plugin.settings.ShowLeftSideBar=l,this.applySettingsUpdate()})),new rt(r,this).setName(E("Max height for collapse")).setDesc(E("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(n).addText(i=>i.setPlaceholder(Ei.ThinoMaxHeight.toString()).setValue(this.plugin.settings.ThinoMaxHeight.toString()).onChange(async l=>{if(Number(l)<80&&Number(l)!==0){new C.Notice(E("The value should be greater than")+"80");return}this.plugin.settings.ThinoMaxHeight=Number(l),this.debounceApplySettingsUpdate()})),new rt(r,this).setName(E("Thino height when collapsed")).setDesc(E("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(n).addText(i=>i.setPlaceholder(Ei.ThinoCollapsedHeight.toString()).setValue(this.plugin.settings.ThinoCollapsedHeight.toString()).onChange(async l=>{if(Number(l)<40&&Number(l)!==0){new C.Notice(E("The value should be greater than")+"40");return}this.plugin.settings.ThinoCollapsedHeight=Number(l),this.debounceApplySettingsUpdate()})),await this.getEditorLocation(r,n),new rt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),this.addThinoDailyMarkSettings(n,r,a),new rt(r,this).setName(E("Chat view style")).setDesc(E("Set the style of chat view")).setTab(n).addDropdown(async i=>{o=i,o.addOption("default","Default"),o.addOption("fluent","Fluent"),o.addOption("inline","Inline"),o.setValue(this.plugin.settings.chatViewStyle).onChange(async l=>{if(!a){Sn();return}this.plugin.settings.chatViewStyle=l,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Can select other views when leaf width is not enough")).setDesc(E("This option will allow you use other views when leaf width is not enough. False by default.")).setTab(n).addToggle(i=>{i.setValue(this.plugin.settings.SupportSelectOtherView).onChange(async l=>{if(!a){Sn();return}this.plugin.settings.SupportSelectOtherView=l,this.applySettingsUpdate()})}),this.addThinoMomentsSettings(n,r,a)}addThinoDailyMarkSettings(n,r,a){let o;new rt(r,this).setName(E("Show day mark in thino list")).setDesc(E("Show day mark on the top of daily range thino. False by default.")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.showDayMark).onChange(async l=>{if(!a){Sn();return}this.plugin.settings.showDayMark=l,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.showDayMark&&(new rt(r,this).setName(E("Day mark range")).setDesc(E("Set the range of day mark. Day by default.")).setTab(n).addDropdown(async i=>{o=i,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 l=>{this.plugin.settings.dayMarkRange=l,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Hide pinned group")).setDesc(E("Hide pinned group in thino list. False by default.")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.hidePinnedGroup).onChange(async l=>{if(!a){Sn();return}this.plugin.settings.hidePinnedGroup=l,this.applySettingsUpdate()})))}addThinoMomentsSettings(n,r,a){new rt(r,this).setTab(n).setName(E("Background image for moments view")).setDesc(E("Set the background image for moments view")).addText(o=>{new rf(o.inputEl),o.setPlaceholder("URL").setValue(this.plugin.settings.MomentsBackgroundImage).onChange(async i=>{a&&(this.plugin.settings.MomentsBackgroundImage=i,this.applySettingsUpdate())})})}async getEditorLocation(n,r){let a;C.Platform.isMobile&&(new rt(n,this).setName(E("Default editor position on mobile")).setDesc(E("Set the default editor position on Mobile, 'Top' by default.")).setTab(r).addDropdown(async o=>{a=o,a.addOption("Top",E("Top")),a.addOption("Bottom",E("Bottom")),a.setValue(this.plugin.settings.DefaultEditorLocation).onChange(async i=>{this.plugin.settings.DefaultEditorLocation=i,this.applySettingsUpdate(),setTimeout(()=>{this.display()},200)})}),this.plugin.settings.DefaultEditorLocation!=="Top"&&new rt(n,this).setName(E("Use button to show editor on mobile")).setDesc(E("Set a float button to call editor on mobile. Only when editor located at the bottom works.")).setTab(r).addToggle(o=>o.setValue(this.plugin.settings.UseButtonToShowEditor).onChange(async i=>{this.plugin.settings.UseButtonToShowEditor=i,this.applySettingsUpdate()})))}customHeading(n,r){new rt(r,this).setHeading().setName("👤 "+E("User info")).setTab(n),new rt(r,this).setName(E("User name")).setDesc(E("Set your user name here. 'Memos 😏' By default")).setTab(n).addText(y=>y.setPlaceholder(Ei.UserName).setValue(this.plugin.settings.UserName).onChange(async w=>{this.plugin.settings.UserName=w,this.applySettingsUpdate()})),new rt(r,this).setTab(n).setName(E("User icon")).setDesc(E("Set user icon for thino. You can input http/https link or file path in vault.")).addText(y=>{new rf(y.inputEl),y.setPlaceholder("URL").setValue(this.plugin.settings.MomentsIcon).onChange(async w=>{this.plugin.settings.MomentsIcon=w,this.applySettingsUpdate()})}),new rt(r,this).setTab(n).setName(E("User quote")).setDesc(E("Set user quote for thino")).addText(y=>y.setPlaceholder("Input anything here").setValue(this.plugin.settings.MomentsQuote).onChange(async w=>{this.plugin.settings.MomentsQuote=w,this.applySettingsUpdate()}));let a=!1;const o=document.createDocumentFragment();o.createEl("span",{text:E("Connect to PKMer Sync, you can check it in ")});const i=localStorage.getItem("language");let l;i&&i==="zh"?l="https://pkmer.cn/products/UserProfile/#tab-21&activateSync":l="https://thino.pkmer.net/en/",o.createEl("a",{text:E("PKMer Sync"),attr:{href:l}}),new rt(r,this).setHeading().setName("🏆 "+E("Pro verification status")).setTab(n);const c=document.createDocumentFragment(),f=c.createEl("div",{cls:"thino-activation"}),p=new rt(r,this).setName(E("Activate Pro Version")).setDesc(c).setTab(n);p.settingEl.toggleClass("thino-activation-setting",!0),p.nameEl.toggleClass("thino-activation-title",!0),this.root=rs.createRoot(f),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(BCe,{plugin:this.plugin})}));let g=!1;new rt(r,this).setName(E("Deactivate")).setTab(n).addButton(y=>{y.setWarning().setButtonText(E("Remove")).onClick(async()=>{var S;if(!g){y.setButtonText(E("Confirm?")),g=!0;return}g=!1;const w=!C.Platform.isDesktop&&await((S=window.Capacitor)==null?void 0:S.Plugins.Device.getId()),T=C.Platform.isDesktop?await cr():w.identifier||w.uuid;this.plugin.settings.tokenForVerify[T]&&(delete this.plugin.settings.tokenForVerify[T],await this.plugin.saveSettings(),new C.Notice(E("Remove successfully"))),await this.plugin.verify(),dt.setRefresh(!0),setTimeout(()=>{this.display()},20)})}),(i==="zh"||i==="zh-TW")&&new rt(r,this).setHeading().setName("☁ "+E("Sync service")).setTab(n),(i==="zh"||i==="zh-TW")&&new rt(r,this).setName(E("Sync Thino via PKMer")).setDesc(o).setTab(n).addButton(y=>{var T;const w=(T=this.plugin.app)==null?void 0:T.loadLocalStorage("tokenForSync");y.setButtonText(E(w?"Unlink":"Link")).onClick(async()=>{var S;if(!w){const I=localStorage.getItem("language");I&&(I==="zh"||I==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&activateSync"):window.open("https://thino.pkmer.net/en/");return}if(!a){y.setButtonText(E("Confirm?")),a=!0;return}a=!1,w&&((S=this.plugin.app)==null||S.saveLocalStorage("tokenForSync",""),new C.Notice(E("Remove successfully"))),dt.setRefresh(!0),setTimeout(()=>{this.display()},20)})}),(i==="zh"||i==="zh-TW")&&this.showSyncStatus(r,n)}showSyncStatus(n,r){var o;(o=this.plugin.app)!=null&&o.loadLocalStorage("tokenForSync")&&(new rt(n,this).setName(E("Save thino type when sync local")).setDesc(E("Set the default save thino type when sync local, FILE by default.")).setTab(r).addDropdown(async i=>{i.addOption("DAILY",E("DAILY")),i.addOption("FILE",E("FILE")),i.setValue(this.plugin.settings.saveThinoType).onChange(async l=>{this.plugin.settings.saveThinoType=l,this.applySettingsUpdate()})}),new rt(n,this).setName(E("Sync Status")).setDesc(E("Start or stop sync")).setTab(r).addButton(i=>{i.setButtonText(this.plugin.settings.startSync?E("Stop"):E("Start")).onClick(async()=>{this.plugin.settings.startSync=!this.plugin.settings.startSync,await this.plugin.saveSettings(),dt.setRefresh(!0),new C.Notice(this.plugin.settings.startSync?E("Start sync successfully"):E("Stop sync successfully")),setTimeout(()=>{this.display()},200)})}))}addMemoSettings(n,r){new rt(r,this).setName(E("Open Memos when obsidian opens")).setDesc(E("When enable this, Memos will open when Obsidian opens. False by default.")).setTab(n).addDropdown(o=>{o.addOption("Desktop","Desktop"),o.addOption("Mobile","Mobile"),o.addOption("All","All"),o.setValue(this.plugin.settings.MobileAndDesktop).onChange(async i=>{this.plugin.settings.MobileAndDesktop=i,this.applySettingsUpdate()})}).addToggle(o=>o.setValue(this.plugin.settings.OpenMemosAutomatically).onChange(async i=>{this.plugin.settings.OpenMemosAutomatically=i,this.applySettingsUpdate()})),new rt(r,this).setHeading().setTab(n).setName("📝 "+E("Editor")),new rt(r,this).setName(E("Use Tags In Vault")).setDesc(E("Use tags in vault rather than only in Memos. False by default.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.UseVaultTags).onChange(async i=>{this.plugin.settings.UseVaultTags=i,this.applySettingsUpdate()}));let a;new rt(r,this).setName(E("Default insert date format")).setDesc(E("Set the default date format when insert date by @, 'Tasks' by default.")).setTab(n).addDropdown(async o=>{a=o,a.addOption("Tasks","Tasks"),a.addOption("Dataview","Dataview"),a.setValue(this.plugin.settings.InsertDateFormat).onChange(async i=>{this.plugin.settings.InsertDateFormat=i,this.applySettingsUpdate()})}),new rt(r,this).setHeading().setTab(n).setName("📅 "+E("Daily notes")),new rt(r,this).setName(E("Default prefix when save thino")).setDesc(E("Set the default prefix when create memo, 'List' by default.")).setTab(n).addDropdown(async o=>{a=o,a.addOption("List",E("List")),a.addOption("Task",E("Task")),a.setValue(this.plugin.settings.DefaultPrefix).onChange(async i=>{this.plugin.settings.DefaultPrefix=i,this.applySettingsUpdate()})}),this.plugin.settings.EnabledLocationList.some(o=>o.value==="DAILY")&&new rt(r,this).setName(E("Default time prefix for thino in daily notes")).setDesc(E("Set default time prefix for thino in daily notes.")).setTab(n).addDropdown(async o=>{a=o,a.addOption("HH:mm","HH:mm"),a.addOption("HH:mm:ss","HH:mm:ss"),a.setValue(this.plugin.settings.DefaultTimePrefix).onChange(async i=>{this.plugin.settings.DefaultTimePrefix=i,this.applySettingsUpdate()})})}addThinoProSettings(n,r,a){new rt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),new rt(r,this).setName(E("Default save type")).setDesc(E('Set the default save type for thino. "DAILY" by default')).setTab(n).addDropdown(async o=>{for(const i of this.plugin.settings.EnabledLocationList)o.addOption(i.value,E(i.value));o.setValue(this.plugin.settings.MemoSaveLocation||this.plugin.settings.EnabledLocationList[0].value).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.MemoSaveLocation=i,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Add tag automatically")).setDesc(E("Add tag to the end or beginning of the thino content when creating a thino and filtering tags")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.addTagAutomatically).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.addTagAutomatically=i,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.addTagAutomatically&&(new rt(r,this).setName(E("Add tag position")).setDesc(E("Set the position of the tag when adding tag automatically")).setTab(n).addDropdown(async o=>{o.addOption("End",E("End")),o.addOption("Beginning",E("Beginning")),o.setValue(this.plugin.settings.addTagPosition).onChange(async i=>{this.plugin.settings.addTagPosition=i,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Add tag with new line")).setDesc(E("Add tag with new line when adding tag automatically")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.addTagWithNewline).onChange(async i=>{this.plugin.settings.addTagWithNewline=i,this.applySettingsUpdate()})))}memosCommentSettings(n,r){new rt(r,this).setName(E("Allow Comments On Memos")).setDesc(E("You can comment on memos. False by default")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.CommentOnMemos).onChange(async o=>{this.plugin.settings.CommentOnMemos=o,this.applySettingsUpdate(),this.display()})),this.plugin.settings.CommentOnMemos&&(new rt(r,this).setName(E("Always Show Memo Comments")).setDesc(E("Always show memo comments on memos. False by default")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.ShowCommentOnMemos).onChange(async o=>{this.plugin.settings.ShowCommentOnMemos=o,this.applySettingsUpdate()})),new rt(r,this).setName(E("Comments In Original DailyNotes/Notes")).setDesc(E("You should install Dataview Plugin ver 0.5.9 or later to use this feature.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.CommentsInOriginalNotes).onChange(async o=>{this.plugin.settings.CommentsInOriginalNotes=o,this.applySettingsUpdate()})))}shareToThinosSettings(n,r,a){new rt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),new rt(r,this).setTab(n).setName(E("Append/prepend text when share to Thino")).addToggle(o=>{o.setValue(this.plugin.settings.ShareToThinoWithText).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.ShareToThinoWithText=i,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareToThinoWithText&&(new rt(r,this).setTab(n).setName(E("Prepend Text Action")).addDropdown(o=>{o.addOption("none",E("None")),o.addOption("preset",E("Preset")),o.addOption("input",E("Input")),o.addOption("selectTags",E("Select Tags")),o.setValue(this.plugin.settings.SharePrependType).onChange(async i=>{this.plugin.settings.SharePrependType=i,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.SharePrependType==="preset"&&new rt(r,this).setTab(n).setName(E("Prepend text when share to Thino")).addText(o=>{o.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextPrepend).onChange(async i=>{this.plugin.settings.ShareToThinoWithTextPrepend=i,this.applySettingsUpdate()})}),new rt(r,this).setTab(n).setName(E("Append Text Action")).addDropdown(o=>{o.addOption("none",E("None")),o.addOption("preset",E("Preset")),o.addOption("input",E("Input")),o.addOption("selectTags",E("Select Tags")),o.setValue(this.plugin.settings.ShareAppendType).onChange(async i=>{this.plugin.settings.ShareAppendType=i,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareAppendType==="preset"&&new rt(r,this).setTab(n).setName(E("Append text when share to Thino")).addText(o=>{o.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextAppend).onChange(async i=>{this.plugin.settings.ShareToThinoWithTextAppend=i,this.applySettingsUpdate()})}),new rt(r,this).setTab(n).setName(E("Add newline when append/prepend text")).addDropdown(async o=>{o.addOption("prepend",E("Prepend")),o.addOption("append",E("Append")),o.addOption("both",E("Both")),o.addOption("none",E("None")),o.setValue(this.plugin.settings.ShareToThinoWithTextNewline).onChange(async i=>{this.plugin.settings.ShareToThinoWithTextNewline=i,this.applySettingsUpdate()})}))}copyMemosSettings(n,r){new rt(r,this).setName(E("Show Time When Copy Results")).setDesc(E("Show time when you copy results, like 12:00. Copy time by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.ShowTime).onChange(async o=>{this.plugin.settings.ShowTime=o,this.applySettingsUpdate()})),new rt(r,this).setName(E("Show Date When Copy Results")).setDesc(E("Show date when you copy results, like [[2022-01-01]]. Copy date by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.ShowDate).onChange(async o=>{this.plugin.settings.ShowDate=o,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.ShowDate&&new rt(r,this).setName(E("Add Blank Line Between Different Date")).setDesc(E("Add blank line when copy result with date. No blank line by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.AddBlankLineWhenDate).onChange(async o=>{this.plugin.settings.AddBlankLineWhenDate=o,this.applySettingsUpdate()}))}shareMemosSettings(n,r){new rt(r,this).setName(E("Custom height for Thino content")).setDesc(E("Set custom height for Thino content. Like 200px or 20rem")).setTab(n).addText(a=>a.setPlaceholder(E("Input height")).setValue(this.plugin.settings.MinHeightForShare).onChange(async o=>{this.plugin.settings.MinHeightForShare=o,this.debounceApplySettingsUpdate()})),this.customMemoFooter(n,r),new rt(r,this).setName(E("Custom Background Image")).setDesc(E("Set custom background image.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.SetCustomBackgroundImage).onChange(async o=>{this.plugin.settings.SetCustomBackgroundImage=o,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomBackgroundImage&&(new rt(r,this).setName(E("Background Image in Light Theme")+` [${E("Modern")}]`).setDesc(E('Set background image in light theme. Set something like "Daily/one.png"')).setTab(n).addText(a=>{new rf(a.inputEl),a.setPlaceholder(Ei.DefaultLightBackgroundImage).setValue(this.plugin.settings.DefaultLightBackgroundImage).onChange(async o=>{this.plugin.settings.DefaultLightBackgroundImage=o,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Background Image in Dark Theme")+` [${E("Modern")}]`).setDesc(E('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(n).addText(a=>{new rf(a.inputEl),a.setPlaceholder(Ei.DefaultDarkBackgroundImage).setValue(this.plugin.settings.DefaultDarkBackgroundImage).onChange(async o=>{this.plugin.settings.DefaultDarkBackgroundImage=o,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Background Image in Light Theme")+` [${E("Clean")}]`).setDesc(E('Set background image in light theme. Set something like "Daily/one.png"')).setTab(n).addText(a=>{new rf(a.inputEl),a.setPlaceholder(Ei.DefaultLightBackgroundImageForClean).setValue(this.plugin.settings.DefaultLightBackgroundImageForClean).onChange(async o=>{this.plugin.settings.DefaultLightBackgroundImageForClean=o,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Background Image in Dark Theme")+` [${E("Clean")}]`).setDesc(E('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(n).addText(a=>{new rf(a.inputEl),a.setPlaceholder(Ei.DefaultDarkBackgroundImageForClean).setValue(this.plugin.settings.DefaultDarkBackgroundImageForClean).onChange(async o=>{this.plugin.settings.DefaultDarkBackgroundImageForClean=o,this.applySettingsUpdate()})}))}customMemoFooter(n,r){new rt(r,this).setName(E("Custom Memo Footer")).setDesc(E("Set custom memo footer.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.SetCustomMemoFooter).onChange(async o=>{this.plugin.settings.SetCustomMemoFooter=o,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomMemoFooter&&new rt(r,this).setName(E("Share Memos Image Footer Start")).setDesc(E("Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default")).setTab(n).addText(a=>a.setPlaceholder(Ei.ShareFooterStart).setValue(this.plugin.settings.ShareFooterStart).onChange(async o=>{this.plugin.settings.ShareFooterStart=o,this.applySettingsUpdate()}))}saveDataSettings(n,r){let a;new rt(r,this).setName(E("Default Editor Mode")).setDesc(E("Live-Preview Mode OR Source Mode.")).setTab(n).addDropdown(async o=>{a=o,a.addOption("obsidian",E("Live-preview")),a.addOption("memos",E("Source")),a.setValue(this.plugin.settings.EditorType).onChange(async i=>{this.plugin.settings.EditorType=i,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Delete Thino Directly")).setDesc(E("When delete thino directly, it will not be moved to trash. False by default.")).setTab(n).addToggle(o=>{o.setValue(this.plugin.settings.DeleteThinoDirectly).onChange(async i=>{this.plugin.settings.DeleteThinoDirectly=i,this.applySettingsUpdate()})})}async initHttpServer(n,r){var c;const a=ft.getState().verifyState,o=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),i=C.Platform.isDesktop?await cr():o.identifier||o.uuid,l=a&&(a==null?void 0:a.appId)===i;new rt(n,this).setName(E("Enable Local Http Server")).setTab(r).setDisabled(!l).addToggle(f=>f.setValue(this.plugin.settings.EnabledHttpApi).onChange(async p=>{if(!l){Sn();return}this.plugin.settings.EnabledHttpApi=p,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.settings.EnabledHttpApi?this.plugin.initServer():this.plugin.stopServer(),this.display()},100)})),this.plugin.settings.EnabledHttpApi&&(new rt(n,this).setName(E("Get thino capture extension")).setDesc(E("You can capture idea/text from chrome now.")).setTab(r).addButton(f=>{f.setButtonText("GitHub").onClick(()=>{window.open("https://github.com/quorafind/thino-capture-releases","_blank")})}).addButton(f=>{f.setButtonText("Chrome Web Store").onClick(()=>{window.open("https://chromewebstore.google.com/detail/thino-capture/oppagjehiimpjpjmgbfmanlnbpbcecff","_blank")})}),new rt(n,this).setName(E("Memos Http Server Port")).setDesc(E("Set memos http server port to listen. '43999' by default")).setTab(r).addText(f=>f.setPlaceholder(Ei.HttpApiPort).setValue(this.plugin.settings.HttpApiPort).onChange(async p=>{if(!l){Sn();return}this.plugin.settings.HttpApiPort=p,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})),new rt(n,this).setName(E("Auto Download Image")).setDesc(E("Auto download image when save to thino. 'false' by default")).setTab(r).setDisabled(!l).addToggle(f=>{f.setValue(this.plugin.settings.AutoDownloadImage).onChange(async p=>{if(!l){Sn();return}this.plugin.settings.AutoDownloadImage=p,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}),new rt(n,this).setName(E("Thino Http IP Type")).setDesc(E("Set Thino http server ip to listen. 'localhost' by default")).setTab(r).addDropdown(f=>{f.addOption("localhost","localhost"),f.addOption("127.0.0.1","127.0.0.1"),f.setValue(this.plugin.settings.HttpApiIpType).onChange(async p=>{if(!a||(a==null?void 0:a.appId)!==i){Sn();return}this.plugin.settings.HttpApiIpType=p,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}),this.appendOrPrependTextSettings(r,n,l))}appendOrPrependTextSettings(n,r,a){new rt(r,this).setTab(n).setName(E("Append/prepend text when share to Thino")).addToggle(o=>{o.setValue(this.plugin.settings.AppendOrPrependTextViaServer).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.AppendOrPrependTextViaServer=i,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.AppendOrPrependTextViaServer&&(new rt(r,this).setName(E("Prepend Text")).setTab(n).addText(o=>{o.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.PrependViaServer).onChange(async i=>{this.plugin.settings.PrependViaServer=i,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Append Text")).setTab(n).addText(o=>{o.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.AppendViaServer).onChange(async i=>{this.plugin.settings.AppendViaServer=i,this.applySettingsUpdate()})}),new rt(r,this).setName(E("Add newline when append/prepend text")).addDropdown(async o=>{o.addOption("prepend",E("Prepend")),o.addOption("append",E("Append")),o.addOption("both",E("Both")),o.addOption("none",E("None")),o.setValue(this.plugin.settings.WithNewLineViaServer).onChange(async i=>{this.plugin.settings.WithNewLineViaServer=i,this.applySettingsUpdate()})}))}fetchDataSettings(n,r){let a;new rt(r,this).setName(E("Use which plugin's default configuration")).setDesc(E("Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.")).setTab(n).addDropdown(async o=>{a=o,a.addOption("Daily",E("Daily")),a.addOption("Periodic","Periodic"),a.setValue(this.plugin.settings.UseDailyOrPeriodic).onChange(async i=>{this.plugin.settings.UseDailyOrPeriodic=i,this.applySettingsUpdate()})})}navigationSettings(n,r){new rt(r,this).setName(E("Open link directly in Thino view")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.navigation).onChange(async o=>{this.plugin.settings.navigation=o,this.applySettingsUpdate()}))}optimizeForCalloutSettings(n,r){new rt(r,this).setName(E("Optimize for Callout")).setDesc(E("Won't render content contains more than 3 callouts automatically. True by default")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.OptimizeForCallout).onChange(async o=>{this.plugin.settings.OptimizeForCallout=o,this.applySettingsUpdate()}))}clearConfigSettings(n,r){new rt(r,this).setName(E("Reset all Thino settings")).setDesc(E("Reset Thino settings to default settings.")).setTab(n).addButton(a=>{a.setWarning().setButtonText(E("Reset settings")).onClick(async()=>{new _s(this.app,E("Reset all Thino settings"),async()=>{var o;this.plugin.settings={...Ei,tokenForVerify:this.plugin.settings.tokenForVerify,password:this.plugin.settings.password,needVerify:this.plugin.settings.needVerify},this.debounceApplySettingsUpdate(),await be.fetchAllMemos(),be.updateTagsState(),(o=this.plugin.app)==null||o.saveLocalStorage("tokenForSync",""),dt.setRefresh(!0),dt.setMemoListView("list"),new C.Notice(E("All settings have been reset to default.")),this.debounceDisplay()}).open()})})}setPasswordSettings(n,r){new rt(r,this).setName(E("Need password to unlock Thino")).setTab(n).addToggle(a=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(a.toggleEl.onclick=o=>{this.passwordMatched||(o.preventDefault(),new fN(this.app,this,this.plugin,i=>{a.setDisabled(!i),this.passwordMatched=i,this.debounceDisplay()}).open(),new C.Notice(E("Please input your password to change password settings")))}),a.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 rt(r,this).setName(E("Password to lock Thino")).setTab(n).addText(a=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(a.inputEl.onclick=o=>{this.passwordMatched||(o.preventDefault(),new fN(this.app,this,this.plugin,i=>{a.inputEl.readOnly=!i,this.passwordMatched=i,this.debounceDisplay()}).open(),new C.Notice(E("Please input your password to change password settings")))}),a.inputEl.readOnly=this.plugin.settings.password&&this.plugin.settings.needVerify&&!this.passwordMatched,a.inputEl.oncopy=()=>!1,a.inputEl.type="password",a.setValue(this.plugin.settings.password).onChange(async o=>{this.plugin.settings.password=o,this.applySettingsUpdate()})})}setGlobalSettings(n,r,a){new rt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),this.initHttpServer(r,n),new rt(r,this).setName(E("Enable opening thino globally")).setDesc(E("Enable opening thino globally. False by default.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.CaptureKey.EnableCaptureKey).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.CaptureKey.EnableCaptureKey=i,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.CaptureKey.EnableCaptureKey&&(new rt(r,this).setName(E("Key for opening thino globally")).setDesc(E("Set key for opening thino globally. CTRL + SHIFT + T by default.")).setTab(n).addText(o=>o.setPlaceholder(Ei.CaptureKey.OpenThinoGlobally).setValue(this.plugin.settings.CaptureKey.OpenThinoGlobally).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.CaptureKey.OpenThinoGlobally=i,this.applySettingsUpdate()})),new rt(r,this).setName(E("Show thino near mouse")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.CaptureKey.ShowNearMouse).onChange(async i=>{if(!a){Sn();return}this.plugin.settings.CaptureKey.ShowNearMouse=i,this.applySettingsUpdate()})))}checkInList(n){return this.plugin.settings.EnabledLocationList.find(r=>r.value===n)!==void 0}customFileNameSettings(n,r,a){var c;const o=document.createDocumentFragment(),i=o.createEl("div",{cls:"memo-save-location-desc"});for(const f of _Ce){const p=i.createEl("div",{cls:`memo-save-location-desc-item ${f.value}`}),g=p.createEl("span",{cls:"memo-save-location-desc-item-icon"});C.setIcon(g,((c=$g.find(I=>I.title===f.value))==null?void 0:c.icon)||""),p.createEl("span",{cls:"memo-save-location-desc-item-desc",text:`${E(f.value)}`});const y=p.createEl("span",{cls:"memo-save-location-desc-item-toggle"}),w=p.createEl("span",{cls:"memo-save-location-desc-item-setting"});f.value!=="DAILY"&&p.createEl("span",{cls:["memo-save-location-desc-item-pro","user-pro-badge"],text:"PRO"}),new C.ToggleComponent(y).setValue(this.checkInList(f.value)).onChange(async I=>{if(!a){Sn();return}I?(await be.updateTypeMemos(f.value),this.plugin.settings.EnabledLocationList=[...this.plugin.settings.EnabledLocationList,f]):(await be.removeTypeMemos(f.value),this.plugin.settings.EnabledLocationList=this.plugin.settings.EnabledLocationList.filter(M=>M.value!==f.value)),this.plugin.settings.EnabledLocationList.length===1&&(this.plugin.settings.MemoSaveLocation=f.value),this.applySettingsUpdate(),setTimeout(()=>{this.display()},500)}).setDisabled(this.plugin.settings.EnabledLocationList.length===1&&this.checkInList(f.value)),new C.ExtraButtonComponent(w).setIcon("settings").onClick(()=>{new YCe(this.app,this,this.plugin,f,a).open()})}const l=new rt(r,this).setName(E("Save type for Thino")).setDesc(o).setTab(n);l.settingEl.toggleClass("memo-save-location-setting",!0),l.nameEl.toggleClass("memo-save-location-title",!0)}addTaskRelatedSettings(n,r){new rt(r,this).setHeading().setName("📃 "+E("Task Management")),new rt(r,this).setName(E("Show Tasks Label")).setDesc(E("Show tasks label near the time text. False by default")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.ShowTaskLabel).onChange(async o=>{this.plugin.settings.ShowTaskLabel=o,this.applySettingsUpdate()})),new rt(r,this).setName(E("Append completed date when task done in thino")).setDesc(E("Append completed date when task done in thino. False by default")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.AppendDateWhenTaskDone).onChange(async o=>{this.plugin.settings.AppendDateWhenTaskDone=o,this.applySettingsUpdate()}))}}class YCe extends C.Modal{constructor(n,r,a,o,i){super(n);De(this,"plugin");De(this,"settingTab");De(this,"LocationList");De(this,"target","");De(this,"insertTarget","");De(this,"verified");De(this,"updateValue",C.debounce(n=>{this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"?this.target=n.trim()===""?"basic":n.trim():this.target=n.trim()===""&&this.LocationList.value==="MULTI"?"Memos":n.trim()},400,!0));De(this,"debounceDisplay",C.debounce(()=>this.display(),400,!0));this.verified=i,this.app=n,this.settingTab=r,this.plugin=a,this.LocationList=o,this.target=o.target!=="ProcessEntriesBelow"?a.settings.MemoOtherSaveLocation[o.target]:a.settings[o.target],this.insertTarget=a.settings.InsertAfter}onOpen(){this.display()}async display(){var c;const{contentEl:n}=this;this.contentEl.empty(),(c=n.parentElement)==null||c.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(E("Save type for Thino")+` [${E(this.LocationList.value)}]`),(this.LocationList.value==="FILE"||this.LocationList.value==="CANVAS")&&n.createDiv("modal-desc",f=>{f.setText(E('You can set folder name with file name like "folder/file"'))}),this.LocationList.value==="MULTI"&&n.createDiv("modal-desc",f=>{f.setText(E('You can set folder name like "folder1/folder2/folder3" to create sub-folder'))}),this.LocationList.value==="DAILY"&&n.createDiv("modal-desc",f=>{f.setText(E('You can set target heading like "# Heading" to control data location'))});const r=n.createDiv("modal-setting"),a=this.LocationList.value==="DAILY"?E("Process Memos below"):this.LocationList.value==="MULTI"?E("Set the folder name"):E("Set the filename");if(this.LocationList.value==="DAILY"&&(new rt(r,this.settingTab).setName(E("Set thino insert place")).setDesc(E("Set where to insert thino content")).addDropdown(async f=>{f.addOption("end",E("End of the diary")),f.addOption("custom",E("Custom location")),f.setValue(this.plugin.settings.InsertType).onChange(async p=>{this.plugin.settings.InsertType=p,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.InsertType==="custom"&&await this.addDailySettings(r),new rt(r,this.settingTab).setName(E("Set process target")).setDesc(E("You can set whole diary or only part of it")).addDropdown(async f=>{f.addOption("custom",E("Custom")),f.addOption("whole",E("Whole diary")),f.setValue(this.plugin.settings.ProcessContentTarget).onChange(async p=>{this.plugin.settings.ProcessContentTarget=p,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})})),this.LocationList.value!=="DAILY"||this.plugin.settings.ProcessContentTarget!=="whole"){const f=new rt(r,this.settingTab).setName(a).addText(p=>p.setPlaceholder(this.LocationList.value==="DAILY"?E("# Heading"):E("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 g=>{const y=this.LocationList.value==="CANVAS"?".thino.canvas":this.LocationList.value==="FILE"?".thino.md":"";this.updateValue(g.replace(/\.thino\.(canvas|md)/g,"")+y)}));this.LocationList.value==="DAILY"&&f.setDesc(E("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"&&f.controlEl.createEl("span",{text:`${this.LocationList.value==="FILE"?".thino.md":".thino.canvas"}`})}this.LocationList.value==="MULTI"&&new rt(r,this.settingTab).setName(E("Set file name after create thino")).setDesc(E("You can set file name after create thino. A input box will show when you create thino.")).addToggle(f=>{f.setValue(this.plugin.settings.SetFileNameAfterCreate).onChange(async p=>{this.plugin.settings.SetFileNameAfterCreate=p,this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="FILE"&&new rt(r,this.settingTab).setName(E("Set tag for file type file")).setDesc(E("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(f=>{new Kg(f.inputEl,p=>{this.plugin.settings.TagForFileTypeFiles=p.trim(),this.settingTab.debounceApplySettingsUpdate()}),f.setPlaceholder(E("Please input the tag")).setValue(this.plugin.settings.TagForFileTypeFiles).onChange(async p=>{this.plugin.settings.TagForFileTypeFiles=p.trim(),this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="MULTI"&&new rt(r,this.settingTab).setName(E("Set tag for multi type file")).setDesc(E("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(f=>{new Kg(f.inputEl,p=>{this.plugin.settings.TagForMultiTypeFiles=p.trim(),this.settingTab.debounceApplySettingsUpdate()}),f.setPlaceholder(E("Please input the tag")).setValue(this.plugin.settings.TagForMultiTypeFiles).onChange(async p=>{this.plugin.settings.TagForMultiTypeFiles=p.trim(),this.settingTab.debounceApplySettingsUpdate()})});const o=n.createDiv("button-group"),i=o.createEl("button",{text:E("Cancel")}),l=o.createEl("button",{text:E("Save")});l.onclick=async()=>{if(!this.verified&&this.LocationList.value!=="DAILY"){this.close(),Sn();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"&&ut.checkDailyInMulti(this.plugin.settings),this.LocationList.target==="ProcessEntriesBelow"&&(this.plugin.settings.InsertAfter=this.insertTarget),this.settingTab.applySettingsUpdate(),setTimeout(()=>{be.updateTypeMemos(this.LocationList.value)},1e3),this.close()},i.onclick=async()=>{this.close()}}async addDailySettings(n){var c,f,p,g;const r=ft.getState().verifyState,a=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),o=C.Platform.isDesktop?await cr():a.identifier||a.uuid,i=r&&(r==null?void 0:r.appId)===o,l=((f=this.plugin.settings)!=null&&f.DifferentInsertTarget?`[${E("List")}] `:"")+E("Insert after heading");new rt(n,this.settingTab).setName(l).setDesc(E("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(y=>y.setPlaceholder(E("# Heading")).setValue(this.insertTarget).onChange(async w=>{this.insertTarget=w})),(p=this.plugin.settings)!=null&&p.DifferentInsertTarget&&new rt(n,this.settingTab).setName(((g=this.plugin.settings)!=null&&g.DifferentInsertTarget?`[${E("Task")}] `:"")+E("Insert after heading")).setDesc(E("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(y=>{y.setPlaceholder(E("# Heading")).setValue(this.plugin.settings.InsertAfterForTask).onChange(async w=>{this.plugin.settings.InsertAfterForTask=w,this.settingTab.applySettingsUpdate()})}),new rt(n,this.settingTab).setName(E("Different insert target for different type")).setDesc(E("Toggle this to set different insert target for different type of thino, like task or list type of thino")).addToggle(y=>y.setValue(this.plugin.settings.DifferentInsertTarget).onChange(async w=>{if(!i){Sn();return}this.plugin.settings.DifferentInsertTarget=w,this.settingTab.applySettingsUpdate(),this.debounceDisplay()}))}onClose(){const{contentEl:n}=this;n.empty()}}class fN extends C.Modal{constructor(n,r,a,o){super(n);De(this,"plugin");De(this,"settingTab");this.cb=o,this.app=n,this.settingTab=r,this.plugin=a}onOpen(){var c;const{contentEl:n}=this;(c=n.parentElement)==null||c.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(E("Password for Thino")),n.createDiv("modal-desc",f=>{f.setText(E("Please input your password to change password settings"))});const r=n.createDiv("modal-setting"),a=new rt(r,this.settingTab).setName(E("Password")).addText(f=>{f.setPlaceholder(E("Please input your password")).inputEl.type="password"}),o=n.createDiv("button-group"),i=o.createEl("button",{text:E("Cancel")}),l=o.createEl("button",{cls:"thino-password-confirm-btn",text:E("Confirm?").replace(/(\?|)/g,"")});l.onclick=async()=>{var f;a.controlEl.querySelector("input").value===this.plugin.settings.password?((f=this.cb)==null||f.call(this,!0),this.close()):new C.Notice(E("Password is incorrect"))},i.onclick=async()=>{this.close()}}onClose(){const{contentEl:n}=this;n.empty()}}function S1(e){return e.split("-")[0]}function qO(e){return e.split("-")[1]}function GE(e){return["top","bottom"].includes(S1(e))?"x":"y"}function GO(e){return e==="y"?"height":"width"}function hN(e){let{reference:t,floating:n,placement:r}=e;const a=t.x+t.width/2-n.width/2,o=t.y+t.height/2-n.height/2;let i;switch(S1(r)){case"top":i={x:a,y:t.y-n.height};break;case"bottom":i={x:a,y:t.y+t.height};break;case"right":i={x:t.x+t.width,y:o};break;case"left":i={x:t.x-n.width,y:o};break;default:i={x:t.x,y:t.y}}const l=GE(r),c=GO(l);switch(qO(r)){case"start":i[l]=i[l]-(t[c]/2-n[c]/2);break;case"end":i[l]=i[l]+(t[c]/2-n[c]/2);break}return i}const UCe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n;let l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:f}=hN({...l,placement:r}),p=r,g={};for(let y=0;y<o.length;y++){const{name:w,fn:T}=o[y],{x:S,y:I,data:M,reset:N}=await T({x:c,y:f,initialPlacement:r,placement:p,strategy:a,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});if(c=S??c,f=I??f,g={...g,[w]:M??{}},N){typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(l=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:c,y:f}=hN({...l,placement:p})),y=-1;continue}}return{x:c,y:f,placement:p,strategy:a,middlewareData:g}};function zCe(e){return{top:0,right:0,bottom:0,left:0,...e}}function VCe(e){return typeof e!="number"?zCe(e):{top:e,right:e,bottom:e,left:e}}function y2(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function w2(e,t){t===void 0&&(t={});const{x:n,y:r,platform:a,rects:o,elements:i,strategy:l}=e,{boundary:c="clippingParents",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=t,w=VCe(y),S=i[g?p==="floating"?"reference":"floating":p],I=await a.getClippingClientRect({element:await a.isElement(S)?S:S.contextElement||await a.getDocumentElement({element:i.floating}),boundary:c,rootBoundary:f}),M=y2(await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...o.floating,x:n,y:r}:o.reference,offsetParent:await a.getOffsetParent({element:i.floating}),strategy:l}));return{top:I.top-M.top+w.top,bottom:M.bottom-I.bottom+w.bottom,left:I.left-M.left+w.left,right:M.right-I.right+w.right}}const WCe={left:"right",right:"left",bottom:"top",top:"bottom"};function ib(e){return e.replace(/left|right|bottom|top/g,t=>WCe[t])}function $Ce(e,t){const n=qO(e)==="start",r=GE(e),a=GO(r);let o=r==="x"?n?"right":"left":n?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=ib(o)),{main:o,cross:ib(o)}}const ZCe={start:"end",end:"start"};function pN(e){return e.replace(/start|end/g,t=>ZCe[t])}function qCe(e){const t=ib(e);return[pN(e),t,pN(t)]}const GCe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:l}=t;if((n=o.flip)!=null&&n.skip)return{};const{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",flipAlignment:y=!0,...w}=e,T=S1(a),I=p||(T===l||!y?[ib(l)]:qCe(l)),M=[l,...I],N=await w2(t,w),_=[];let k=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&_.push(N[T]),f){const{main:U,cross:z}=$Ce(a,i);_.push(N[U],N[z])}if(k=[...k,{placement:a,overflows:_}],!_.every(U=>U<=0)){var R,L;const U=((R=(L=o.flip)==null?void 0:L.index)!=null?R:0)+1,z=M[U];if(z)return{data:{index:U,overflows:k},reset:{placement:z}};let $="bottom";switch(g){case"bestFit":{var H;const X=(H=k.slice().sort((Q,se)=>Q.overflows.filter(ue=>ue>0).reduce((ue,fe)=>ue+fe,0)-se.overflows.filter(ue=>ue>0).reduce((ue,fe)=>ue+fe,0))[0])==null?void 0:H.placement;X&&($=X);break}case"initialPlacement":$=l;break}return{data:{skip:!0},reset:{placement:$}}}return{}}}};function JCe(e){let{placement:t,rects:n,value:r}=e;const a=S1(t),o=["left","top"].includes(a)?-1:1,i=typeof r=="function"?r({...n,placement:t}):r,{mainAxis:l,crossAxis:c}=typeof i=="number"?{mainAxis:i,crossAxis:0}:{mainAxis:0,crossAxis:0,...i};return GE(a)==="x"?{x:c,y:l*o}:{x:l*o,y:c}}const KCe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:r,placement:a,rects:o}=t,i=JCe({placement:a,rects:o,value:e});return{x:n+i.x,y:r+i.y,data:i}}}};function JE(e){return(e==null?void 0:e.toString())==="[object Window]"}function ld(e){if(e==null)return window;if(!JE(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function D1(e){return ld(e).getComputedStyle(e)}function Wu(e){return JE(e)?"":e?(e.nodeName||"").toLowerCase():""}function $u(e){return e instanceof ld(e).HTMLElement}function sb(e){return e instanceof ld(e).Element}function QCe(e){return e instanceof ld(e).Node}function JO(e){const t=ld(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function T1(e){const{overflow:t,overflowX:n,overflowY:r}=D1(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function XCe(e){return["table","td","th"].includes(Wu(e))}function KO(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=D1(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 mN=Math.min,zg=Math.max,lb=Math.round;function kp(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let r=1,a=1;return t&&$u(e)&&(r=e.offsetWidth>0&&lb(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&lb(n.height)/e.offsetHeight||1),{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function ud(e){return((QCe(e)?e.ownerDocument:e.document)||window.document).documentElement}function I1(e){return JE(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function QO(e){return kp(ud(e)).left+I1(e).scrollLeft}function eMe(e){const t=kp(e);return lb(t.width)!==e.offsetWidth||lb(t.height)!==e.offsetHeight}function tMe(e,t,n){const r=$u(t),a=ud(t),o=kp(e,r&&eMe(t));let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&n!=="fixed")if((Wu(t)!=="body"||T1(a))&&(i=I1(t)),$u(t)){const c=kp(t,!0);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else a&&(l.x=QO(a));return{x:o.left+i.scrollLeft-l.x,y:o.top+i.scrollTop-l.y,width:o.width,height:o.height}}function E1(e){return Wu(e)==="html"?e:e.assignedSlot||e.parentNode||(JO(e)?e.host:null)||ud(e)}function gN(e){return!$u(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function nMe(e){let t=E1(e);for(;$u(t)&&!["html","body"].includes(Wu(t));){if(KO(t))return t;t=t.parentNode}return null}function b2(e){const t=ld(e);let n=gN(e);for(;n&&XCe(n)&&getComputedStyle(n).position==="static";)n=gN(n);return n&&(Wu(n)==="html"||Wu(n)==="body"&&getComputedStyle(n).position==="static"&&!KO(n))?t:n||nMe(e)||t}function vN(e){return{width:e.offsetWidth,height:e.offsetHeight}}function rMe(e){let{rect:t,offsetParent:n,strategy:r}=e;const a=$u(n),o=ud(n);if(n===o)return t;let i={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((a||!a&&r!=="fixed")&&((Wu(n)!=="body"||T1(o))&&(i=I1(n)),$u(n))){const c=kp(n,!0);l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+l.x,y:t.y-i.scrollTop+l.y}}function aMe(e){const t=ld(e),n=ud(e),r=t.visualViewport;let a=n.clientWidth,o=n.clientHeight,i=0,l=0;return r&&(a=r.width,o=r.height,Math.abs(t.innerWidth/r.scale-r.width)<.01&&(i=r.offsetLeft,l=r.offsetTop)),{width:a,height:o,x:i,y:l}}function oMe(e){var t;const n=ud(e),r=I1(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=zg(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=zg(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let l=-r.scrollLeft+QO(e);const c=-r.scrollTop;return D1(a||n).direction==="rtl"&&(l+=zg(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:c}}function XO(e){return["html","body","#document"].includes(Wu(e))?e.ownerDocument.body:$u(e)&&T1(e)?e:XO(E1(e))}function eP(e,t){var n;t===void 0&&(t=[]);const r=XO(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),o=ld(r),i=a?[o].concat(o.visualViewport||[],T1(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(eP(E1(i)))}function iMe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&JO(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function sMe(e){const t=kp(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 yN(e,t){return t==="viewport"?y2(aMe(e)):sb(t)?sMe(t):y2(oMe(ud(e)))}function lMe(e){const t=eP(E1(e)),r=["absolute","fixed"].includes(D1(e).position)&&$u(e)?b2(e):e;return sb(r)?t.filter(a=>sb(a)&&iMe(a,r)&&Wu(a)!=="body"):[]}function uMe(e){let{element:t,boundary:n,rootBoundary:r}=e;const o=[...n==="clippingParents"?lMe(t):[].concat(n),r],i=o[0],l=o.reduce((c,f)=>{const p=yN(t,f);return c.top=zg(p.top,c.top),c.right=mN(p.right,c.right),c.bottom=mN(p.bottom,c.bottom),c.left=zg(p.left,c.left),c},yN(t,i));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}const cMe={getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:tMe(t,b2(n),r),floating:{...vN(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>rMe(e),getOffsetParent:e=>{let{element:t}=e;return b2(t)},isElement:e=>sb(e),getDocumentElement:e=>{let{element:t}=e;return ud(t)},getClippingClientRect:e=>uMe(e),getDimensions:e=>{let{element:t}=e;return vN(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},dMe=(e,t,n)=>UCe(e,t,{platform:cMe,...n});var fMe=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,a,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))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(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;a--!==0;){var i=o[a];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n};const hMe=qt(fMe),KD=Vg.Facet.define({combine:e=>{var t,n;return{defaultPlacement:((t=e.find(r=>r.defaultPlacement))==null?void 0:t.defaultPlacement)||"top",padding:((n=e.find(r=>r.padding))==null?void 0:n.padding)||8}}}),tP=e=>e.split("-")[0],pMe=e=>e==="x"?"y":"x",mMe=e=>["top","bottom"].includes(tP(e))?"x":"y",Mg=(e,t,n)=>Math.max(e,Math.min(t,n)),gMe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r],a)=>[n,t(r,n,a)])),vMe=e=>e===void 0?e:typeof e=="number"?-e:gMe(e,t=>t!==void 0?-t:t),yMe=(e={})=>({name:"shift",fn:async t=>{const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l=({x:I,y:M})=>({x:I,y:M}),editorMenu:c,...f}=e,p={x:n,y:r},g=await w2(t,f),y=mMe(tP(a)),w=pMe(y);let T=p[y],S=p[w];if(o){const I=y==="y"?"top":"left",M=y==="y"?"bottom":"right",N=T+g[I],_=T-g[M];if(c){const k=await w2(t,{...f,boundary:c.dom,padding:vMe(f.padding)});if((w==="y"?["top","bottom"]:["left","right"]).every(L=>k[L]<=0)){const L=t.rects.floating.width,H=T+k[I]-L,U=T-k[M]+L,z=Math.abs(g[I]-k[I]),$=Math.abs(g[M]-k[M]);z>=L||$<z?T=Mg(N,T,H):T=Mg(U,T,_)}else T=Mg(N,T,_)}else T=Mg(N,T,_)}if(i){const I=w==="y"?"top":"left",M=w==="y"?"bottom":"right",N=S+g[I],_=S-g[M];S=Mg(N,S,_)}return l({...t,[y]:T,[w]:S})}}),wMe="thino-mini-toolbar",bMe=(e=0,t=0)=>({width:0,height:0,top:t,left:e,bottom:t,right:e,x:e,y:t}),SMe=(e,t)=>{if(!e)return null;const n=Math.min(e.left,(t==null?void 0:t.left)??e.left),r=Math.max(e.right,(t==null?void 0:t.right)??e.right),a=Math.max(e.bottom,(t==null?void 0:t.bottom)??e.bottom)-Math.min(e.top,(t==null?void 0:t.top)??e.top),o=Math.min(e.top,(t==null?void 0:t.top)??e.top),i=o+a,l={left:n,right:r,top:o,bottom:i,width:0,height:a,x:o,y:n};return t&&(l.width=Math.abs(r-n)),l},DMe=bMe();class TMe{constructor(t){De(this,"containerEl");De(this,"virtualEl");De(this,"toolbar",null);De(this,"isThinoView");De(this,"tooltipInfo");De(this,"inView",!0);De(this,"defaultPlacement");De(this,"editorMenu");De(this,"cachedRefRect",null);De(this,"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 a=n?this.view.coordsAtPos(n):null;if(r&&a&&r.top!==a.top){const i=this.view.contentDOM.getBoundingClientRect();a={left:i.right,right:i.right,top:r.top,bottom:r.bottom}}const o=SMe(r,a);o&&(this.cachedRefRect=o,this.computePosition(o))}});this.view=t,this.containerEl=this.view.dom.parentElement,this.defaultPlacement=this.view.state.facet(KD).defaultPlacement,this.tooltipInfo=t.state.facet(S2),this.virtualEl={rect:DMe,getBoundingClientRect(){return this.rect}},this.maybeMeasure(),this.editorMenu={currMenu:null,evtRef:t.state.field(C.editorInfoField)},this.isThinoView=this.checkThinoView()}get workspace(){return this.view.state.field(C.editorInfoField).app.workspace}checkThinoView(){return this.view.state.field(C.editorInfoField)&&this.view.state.field(C.editorInfoField).getViewType()==="thino_view"}shouldRemoveToolbar(t){const n=t??this.tooltipInfo;return!(n!=null&&n.end||this.editorMenu.currMenu)}onEditorMenuOpen(t){this.editorMenu.currMenu||(this.editorMenu.currMenu=t,this.cachedRefRect?this.computePosition(this.cachedRefRect):this.maybeMeasure(),!C.Platform.isMacOS&&this.tooltipInfo&&(this.createToolbar(),this.maybeMeasure()))}onEditorMenuClose(t){this.editorMenu.currMenu===t&&(this.editorMenu.currMenu=null),!C.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),a=this.view.state.field(C.editorInfoField);if(!a||!(a!=null&&a.editor))return;const o=a.editor.offsetToPos(n.start),i=n.end?a.editor.offsetToPos(n.end):o;this.workspace.trigger(wMe,r,{from:o,to:i},a.editor,a),this.toolbar=r}removeToolbar(){this.toolbar&&(this.toolbar.hide(),this.toolbar=null)}update(t){if(!this.isThinoView)return;const n=t.state.facet(S2),r=n!==this.tooltipInfo&&!hMe(n,this.tooltipInfo);r&&(this.tooltipInfo=n,this.shouldRemoveToolbar()?this.removeToolbar():n&&!this.toolbar&&this.createToolbar(n));const a=r||t.geometryChanged,o=t.state.facet(KD);o.defaultPlacement!=this.defaultPlacement&&(o.defaultPlacement=this.defaultPlacement),a&&this.maybeMeasure()}destroy(){this.editorMenu.currMenu=null,this.removeToolbar(),this.toolbar=null,this.view.state.field(C.editorInfoField).app.workspace.offref(this.editorMenu.evtRef)}async computePosition(t){if(!this.toolbar)return;this.virtualEl.rect=t;const{padding:n}=this.view.state.facet(KD),{x:r,y:a}=await dMe(this.virtualEl,this.toolbar.dom,{placement:this.defaultPlacement,middleware:[KCe({mainAxis:5}),GCe({padding:n,boundary:this.view.scrollDOM}),yMe({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(a)}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 IMe=Vl.ViewPlugin.fromClass(TMe,{eventHandlers:{scroll(){this.maybeMeasure()}}}),S2=Vg.Facet.define({enables:[IMe],combine:e=>e.filter(t=>t!=null).first()??null}),EMe=e=>{const t=NMe(e);t&&window.navigator.clipboard.writeText(t==null?void 0:t.getSelection())},xMe=e=>{e.commands.executeCommandById("editor:toggle-bold",e)},CMe=e=>{e.commands.executeCommandById("editor:toggle-strikethrough",e)},MMe=e=>{e.commands.executeCommandById("editor:toggle-highlight",e)},kMe=e=>{e.commands.executeCommandById("editor:toggle-italics",e)},NMe=e=>{const{editor:t}=e.field(C.editorInfoField);return t},wN=(e,t)=>{const n=e.selection.ranges[0];if(!n)return null;const{anchor:r,head:a,empty:o}=n,[i,l]=[r,a].sort();return{start:i,end:o?void 0:l,create:f=>new PMe(f).addSmallButton(g=>g.setClass("clickable-icon").setIcon("copy").onClick(()=>EMe(e))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("bold").onClick(()=>xMe(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("italic").onClick(()=>kMe(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("strikethrough").onClick(()=>CMe(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("highlighter").onClick(()=>MMe(t)))}},AMe=e=>Vg.StateField.define({create:t=>wN(t,e),update:(t,n)=>!n.docChanged&&!n.selection?t:wN(n.state,e),provide:t=>S2.from(t)}),FMe=e=>[AMe(e)];class OMe extends C.BaseComponent{constructor(n){super();De(this,"button");De(this,"disabled",!1);De(this,"dropdownOptions",[]);De(this,"menu");De(this,"menuOpened",!1);this.button=new C.ButtonComponent(n)}setDisabled(n){return this.button.setDisabled(n),this.disabled=n,this}setIcon(n){return this.button.setIcon(n),this}setClass(n){return this.button.setClass(n),this}setDropdownText(n){var c;const r=this.button.buttonEl.createDiv("mini-toolbar-text"),a=this.button.buttonEl.createDiv("mini-toolbar-icon-with-text");C.setIcon(a,"chevron-down");const o=(c=n.doc.lineAt(n.selection.ranges[0].from))==null?void 0:c.from,i=hS.syntaxTree(n).resolveInner(o+1),l=i.type.prop(hS.tokenClassNodeProp);return r.setText(this.detectFormat(l,i)||"Text"),this}setDropdownIcon(){const n=this.button.buttonEl.createDiv("mini-toolbar-highlight-icon"),r=this.button.buttonEl.createDiv("mini-toolbar-icon-with-icon");return C.setIcon(n,"highlighter"),C.setIcon(r,"chevron-down"),this}detectFormat(n,r){var a;if(!n)return"Text";if(n.includes("strong"))return"Bold";if(n.includes("em"))return"Italic";if(n.includes("strikethrough"))return"Strike";if(n.contains("hmd-codeblock"))return"CodeBlock";if(n.contains("hmd-inline-code"))return"Code";if(n.contains("formatting-header")){const o=n.match(/header-\d{1,}/);if(o)return"Heading "+o[0].slice(-1)}if(n.contains("formatting-list")||n.contains("hmd-list-indent")){if(r!=null&&r.parent){const o=(a=r.parent)==null?void 0:a.type.prop(hS.lineClassNodeProp);if(o!=null&&o.contains("HyperMD-task-line"))return"To-do list"}if(n.contains("formatting-list-ol"))return"Numbered list";if(n.contains("formatting-list-ul"))return"Bulleted list"}}setTooltip(n){return this.button.setTooltip(n),this}setOptionsList(n){return this.dropdownOptions=n,this}onClick(n){return this.dropdownOptions.length>0?(this.button.onClick(r=>this.showEditMenu(r)),this):(this.button.onClick(n),this)}showEditMenu(n){var i,l;if(this.menuOpened=!this.menuOpened,!this.menuOpened)return;this.menu=new C.Menu,this.menu.onHide(()=>{this.menuOpened=!1});const r=n.currentTarget,a=(i=n.currentTarget)==null?void 0:i.getBoundingClientRect(),o={x:a.left-6,y:a.bottom+6};for(let c=0;c<((l=this.dropdownOptions)==null?void 0:l.length);c++)this.menu.addItem(f=>{f.setIcon("zap").setTitle(this.dropdownOptions[c]).onClick(()=>{})});this.menu.setParentElement(r).showAtPosition(o)}then(n){return n(this),this}}class PMe extends C.Component{constructor(n){super();De(this,"dom");De(this,"smallBtnContainer");De(this,"unloading",!1);const r=n==null?void 0:n.closest(".memo-editor-wrapper");this.dom=r.createDiv({cls:"cm-mini-toolbar"},a=>a.style.position="absolute"),this.smallBtnContainer=this.dom}addSmallButton(n){return n(new OMe(this.smallBtnContainer)),this}hide(){return this.unload(),this.unloading?this:(this.unloading=!0,this.dom.detach(),this.unloading=!1,this)}}const jMe=Vl.Decoration.line({attributes:{"data-ph":E("What do you think now...")},class:"thino-editor-placeholder"}),LMe=Vg.StateField.define({create(){return Vl.Decoration.none},update(e,t){const n=t.state.field(C.editorInfoField);if(!(n!=null&&n.view)&&!((n==null?void 0:n.view)instanceof gf))return e;const r=new Vg.RangeSetBuilder,a=t.state.doc.toString(),o=t.state.doc.lineAt(0);return(a==null?void 0:a.length)==0&&r.add(o.from,o.from,jMe),r.finish()},provide:e=>Vl.EditorView.decorations.from(e)});function nP(e){return`userId:${e}`}function RMe(e,t){return`expiryDate:${t}:${e}`}function _Me(e){try{const t=nP(e==null?void 0:e.appId);return la.get([t])[t]||""}catch(t){return console.error(t),""}}function BMe(e,t){try{const n=nP(t==null?void 0:t.appId);return la.set({[n]:e}),{userId:e,key:n}}catch(n){console.error(n)}}function HMe(e,t){try{const n=RMe(_Me(t),t==null?void 0:t.appId);la.set({[n]:e})}catch(n){console.error(n)}}const YMe=ut.grabImageFromUrl,UMe=require("http"),zMe=require("url");function VMe(e){const t=e.indexOf(";base64,"),n=e.substring(5,t),r=e.substr(t+8),a=atob(r),o=new ArrayBuffer(a.length),i=new Uint8Array(o);for(let c=0;c<a.length;c++)i[c]=a.charCodeAt(c);return new Blob([o],{type:n})}const bN=async e=>{const{type:t}=e;if(t.startsWith("image"))try{return`${await Y2.upload(e)}`}catch(n){new C.Notice(n)}};function WMe(e,t){const n=UMe.createServer(async function(r,a){a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),a.setHeader("Access-Control-Allow-Headers","Access-Control-Allow-Headers, Origin, Authorization,Accept,x-client-id, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, hypothesis-client-version"),a.setHeader("Access-Control-Allow-Credentials","true");try{if(r.url){const o=zMe.parse(r.url,!0);switch(o.pathname){case"/create":{if(r.method!=="POST"){a.statusCode=404,a.end();break}let i="";r.on("data",l=>{i+=l}),r.on("end",async()=>{var _;const l=JSON.parse(i),{text:c,isList:f,type:p,imageList:g,sourceLink:y}=l;let w=c;if(!w){a.statusCode=200,a.setHeader("Content-Type","application/json"),a.end(JSON.stringify({status:"success",thino:null,link:null}));return}new RegExp(/<[a-z/][\s\S]*>/g).test(c)&&(w=C.htmlToMarkdown(c)),y&&(w+=` [source](<${decodeURIComponent(y)}>)`);let S=[];const I=[];if(t.AutoDownloadImage){const k=w.match(Mf)||[];if(k.length>0){for(const R of k)try{const L=await YMe(R);if(L.size===0)continue;const H=new File([L],"image.png",{type:"image/png"}),U=await bN(H);I.push({oldUrl:R,newUrl:U})}catch(L){console.error(L)}I.forEach(R=>{w=w.replace(R.oldUrl,R.newUrl)}),g&&g.length>0&&(S=await Promise.all(g.map(async R=>{const L=VMe(R);return new File([L],"image.png",{type:"image/png"})})));for(const R of S){const L=await bN(R);w+=`
${L}`}}}let M=p;M||(M=t.MemoSaveLocation),(_=e.settings)!=null&&_.AppendOrPrependTextViaServer&&(w=`${t==null?void 0:t.PrependViaServer}${(t==null?void 0:t.WithNewLineViaServer)==="prepend"||(t==null?void 0:t.WithNewLineViaServer)==="both"?`
`:""}${w}${(t==null?void 0:t.WithNewLineViaServer)==="append"||(t==null?void 0:t.WithNewLineViaServer)==="both"?`
`:""}${t==null?void 0:t.AppendViaServer}`);const N=await be.createThino({content:w,isList:f,type:M});N&&(be.pushMemo(N),ot.clearQuery()),a.statusCode=200,a.setHeader("Content-Type","application/json"),a.end(JSON.stringify({status:"success",thino:N,link:`obsidian://thino?openId=${N.id}`}))});break}case"/search":{if(r.method!=="GET"){a.statusCode=404,a.end();break}const i=o.query,{keyword:l}=i,c=be.getThinoViaKeyword(l);a.statusCode=200,a.setHeader("Content-Type","application/json");const f=JSON.stringify({status:"success",thinos:c});a.end(f);break}case"/list":{if(r.method!=="GET"){a.statusCode=404,a.end();break}const{count:i}=o.query,l=be.getState().memos.slice(0,parseInt(i));a.statusCode=200,a.setHeader("Content-Type","application/json"),a.end(JSON.stringify({status:"success",thinos:l}));break}case"/info":{if(r.method!=="GET"){a.statusCode=404,a.end();break}const{getSettings:i}=o.query;if(!i){a.statusCode=404,a.end();break}const l=ft.getState().settings;a.statusCode=200,a.setHeader("Content-Type","application/json");const c=JSON.stringify({status:"success",infoSettings:l});a.end(c);break}default:a.statusCode=404,a.end();break}}}catch(o){console.error(o),a.statusCode=500,a.end({status:"error",message:o.message})}});return{listen(r,a){try{n.listen({port:parseInt(a),host:r})}catch(o){console.error(o),new C.Notice(E("Thino - Failed to start HTTP server, please check the port is available."))}new C.Notice(`${E("Thino - Started HTTP server on port")} ${a}`)},close(){n.close(),new C.Notice(E("Thino - Terminated HTTP server"))}}}const{clipboard:mr}=C.Platform.isDesktop?require("electron"):"";class $Me{constructor(){De(this,"eventListeners");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(a=>a===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 ip=new $Me;let kg=null,SN=mr==null?void 0:mr.readText(),DN=mr==null?void 0:mr.readImage();mr&&(mr.on=(e,t)=>(ip.on(e,t),mr),mr.once=(e,t)=>(ip.once(e,t),mr),mr.off=(e,t)=>(t?ip.removeListener(e,t):ip.removeAllListeners(e),mr),mr.startWatching=()=>(kg||(kg=setInterval(()=>{ZMe(SN,SN=mr==null?void 0:mr.readText())&&ip.emit("text-changed"),qMe(DN,DN=mr==null?void 0:mr.readImage())&&ip.emit("image-changed")},500)),mr),mr.stopWatching=()=>(kg&&clearInterval(kg),kg=null,mr));function ZMe(e,t){return t&&e!==t}function qMe(e,t){return!t.isEmpty()&&e.toDataURL()!==t.toDataURL()}var kN;const QD=(kN=require("electron"))==null?void 0:kN.remote;var NN,AN;const TN=(AN=(NN=require("electron"))==null?void 0:NN.remote)==null?void 0:AN.screen;class GMe{constructor(t,n){De(this,"isRegisted");De(this,"leaf");De(this,"clipboard");De(this,"isScreenTop",!1);De(this,"currentSplitWindow");De(this,"intervalNum");De(this,"allowsCopy",!1);De(this,"plugin");De(this,"actionEl",null);this.app=t,this.plugin=n,this.isRegisted=!1,this.leaf=null,this.clipboard=mr}async onload(){C.Platform.isDesktop&&(this.initGlobalCopyEvents(),await this.registerAllShortcuts(),this.registerEvents())}registerEvents(){this.plugin.registerEvent(this.app.workspace.on("quit",()=>{QD.globalShortcut.unregister(this.plugin.settings.CaptureKey.OpenThinoGlobally)}))}initGlobalCopyEvents(){this.plugin.addCommand({id:"init-global-copy-events",name:E("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",()=>{var t;this.allowsCopy=!1,this.clipboard.stopWatching(),(t=this.actionEl)==null||t.remove()}))}})}onunload(){this.isRegisted&&(QD.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(){var n;return this.leaf?this.app.workspace.getLeavesOfType("thino_view").length>0&&!!this.app.workspace.getLeafById(this.leaf.id)?!0:((n=this.leaf)==null||n.detach(),this.currentSplitWindow.close(),this.currentSplitWindow=null,this.leaf=null,this.isScreenTop=!1,!1):!1}async registerAllShortcuts(){QD.globalShortcut.register(this.plugin.settings.CaptureKey.OpenThinoGlobally,()=>{this.getCurrentLeaf()?this.showThinoView():this.openThinoView()}),this.isRegisted=!0}showThinoView(){var r,a,o,i;const t=TN.getCursorScreenPoint(),n=(i=(o=(a=(r=this.leaf)==null?void 0:r.parent)==null?void 0:a.parent)==null?void 0:o.win)==null?void 0:i.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:l,height:c}=n.getBounds();n.setBounds({x:t.x,y:t.y,width:l,height:c})}if(this.app.workspace.trigger("focus-on-textarea"),this.isScreenTop){this.isScreenTop=!1,setTimeout(()=>{n.setAlwaysOnTop(!1,"screen")},200);return}this.isScreenTop=!0}}openThinoView(){var o,i,l,c,f;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=(i=(o=this.leaf)==null?void 0:o.parent)==null?void 0:i.parent;const n=(f=(c=(l=this.leaf)==null?void 0:l.parent)==null?void 0:c.parent)==null?void 0:f.win.electronWindow;if(!n)return;n.setAlwaysOnTop(!this.isScreenTop,"screen"),this.leaf.setPinned(!this.isScreenTop),this.isScreenTop=!0;const r=this.app,a=p=>{var w,T,S;const g=TN.getCursorScreenPoint(),y=(S=(T=(w=t==null?void 0:t.parent)==null?void 0:w.parent)==null?void 0:T.win)==null?void 0:S.electronWindow;if(y){if(y.isMinimized()&&y.restore(),!this.isScreenTop&&this.plugin.settings.CaptureKey.ShowNearMouse){const{width:I,height:M}=y.getBounds();y.setBounds({x:g.x,y:g.y-200,width:I,height:M})}y.setAlwaysOnTop(!0,"screen"),r.workspace.trigger("focus-on-textarea"),r.workspace.trigger("send-to-thino",p,t)}};this.clipboard.on("text-changed",()=>{const p=this.clipboard.readText();a(p)}).on("image-changed",()=>{const p=this.clipboard.readImage();a(p)})}}class IN extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");De(this,"tags");De(this,"type","customTag");De(this,"HASHTAG_REGEX",/(^|\s)#[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]*$/g);this.plugin=r}checkSettings(){return this.plugin.settings.UseVaultTags}checkInMemosView(n){var o;const r=n.containerEl;if(!r)return!1;const a=(o=r.parentElement)==null?void 0:o.parentElement;return(a==null?void 0:a.classList.contains("common-editor-inputer"))||!1}fuzzySearchItemsOptimized(n,r){const a=C.prepareFuzzySearch(n);return r.map(i=>{const l=a(i);return l?{item:i,match:l}:null}).filter(Boolean)}onTrigger(n,r){if(!this.checkInMemosView(r)||this.checkSettings())return null;this.tags=be.getState().tags,this.cursor=n,this.editor=r;const a=n.line,o=r.getLine(a),i=o.substr(0,n.ch);if(i.match(this.HASHTAG_REGEX)&&o.substr(n.ch,1)!=="#"){const l=i.lastIndexOf("#"),c=i.substr(l+1);return{start:{line:a,ch:l},end:{line:a,ch:n.ch},query:c}}return null}getSuggestions(n){return this.fuzzySearchItemsOptimized(n.query,this.tags).map(r=>r.item).sort((r,a)=>r.localeCompare(a))||[]}renderSuggestion(n,r){r.setText(n)}selectSuggestion(n){if(this.context){const r=this.context.editor,a=this.context.start,o=this.context.end;r.transaction({changes:[{from:a,to:o,text:"#"+n+" "}]}),setTimeout(function(){return r.focus()})}this.close()}}const KE=crypto,rP=e=>e instanceof CryptoKey,q0=new TextEncoder,QE=new TextDecoder;function JMe(...e){const t=e.reduce((a,{length:o})=>a+o,0),n=new Uint8Array(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n}const KMe=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},XD=e=>{let t=e;t instanceof Uint8Array&&(t=QE.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return KMe(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class x1 extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(t){var n;super(t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)==null||n.call(Error,this,this.constructor)}}class QMe extends x1{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class C1 extends x1{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class za extends x1{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class XMe extends x1{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 Ou(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function G0(e,t){return e.name===t}function eT(e){return parseInt(e.name.slice(4),10)}function e3e(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function t3e(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 n3e(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!G0(e.algorithm,"HMAC"))throw Ou("HMAC");const r=parseInt(t.slice(2),10);if(eT(e.algorithm.hash)!==r)throw Ou(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!G0(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Ou("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(eT(e.algorithm.hash)!==r)throw Ou(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!G0(e.algorithm,"RSA-PSS"))throw Ou("RSA-PSS");const r=parseInt(t.slice(2),10);if(eT(e.algorithm.hash)!==r)throw Ou(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw Ou("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!G0(e.algorithm,"ECDSA"))throw Ou("ECDSA");const r=e3e(t);if(e.algorithm.namedCurve!==r)throw Ou(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}t3e(e,n)}function aP(e,t,...n){var r;if(n.length>2){const a=n.pop();e+=`one of type ${n.join(", ")}, or ${a}.`}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&&(r=t.constructor)!=null&&r.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const EN=(e,...t)=>aP("Key must be ",e,...t);function oP(e,t,...n){return aP(`Key for the ${e} algorithm must be `,t,...n)}const iP=e=>rP(e),zl=["CryptoKey"],r3e=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(const r of t){const a=Object.keys(r);if(!n||n.size===0){n=new Set(a);continue}for(const o of a){if(n.has(o))return!1;n.add(o)}}return!0};function a3e(e){return typeof e=="object"&&e!==null}function xN(e){if(!a3e(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 o3e=(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`)}},Wc=(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 a=e.subarray(r,r+t.length);return a.length!==t.length?!1:a.every((o,i)=>o===t[i])||Wc(e,t,r+1)},CN=e=>{switch(!0){case Wc(e,[42,134,72,206,61,3,1,7]):return"P-256";case Wc(e,[43,129,4,0,34]):return"P-384";case Wc(e,[43,129,4,0,35]):return"P-521";case Wc(e,[43,101,110]):return"X25519";case Wc(e,[43,101,111]):return"X448";case Wc(e,[43,101,112]):return"Ed25519";case Wc(e,[43,101,113]):return"Ed448";default:throw new C1("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},i3e=async(e,t,n,r,a)=>{let o,i;const l=new Uint8Array(atob(n.replace(e,"")).split("").map(f=>f.charCodeAt(0))),c=t==="spki";switch(r){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${r.slice(-3)}`},i=c?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${r.slice(-3)}`},i=c?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(r.slice(-3),10)||1}`},i=c?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},i=c?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},i=c?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},i=c?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const f=CN(l);o=f.startsWith("P-")?{name:"ECDH",namedCurve:f}:{name:f},i=c?[]:["deriveBits"];break}case"EdDSA":o={name:CN(l)},i=c?["verify"]:["sign"];break;default:throw new C1('Invalid or unsupported "alg" (Algorithm) value')}return KE.subtle.importKey(t,l,o,(a==null?void 0:a.extractable)??!1,i)},s3e=(e,t,n)=>i3e(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,n);async function l3e(e,t,n){if(typeof e!="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return s3e(e,t,n)}const u3e=(e,t)=>{if(!(t instanceof Uint8Array)){if(!iP(t))throw new TypeError(oP(e,t,...zl,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${zl.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},c3e=(e,t,n)=>{if(!iP(t))throw new TypeError(oP(e,t,...zl));if(t.type==="secret")throw new TypeError(`${zl.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if(n==="sign"&&t.type==="public")throw new TypeError(`${zl.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if(n==="decrypt"&&t.type==="public")throw new TypeError(`${zl.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&n==="verify"&&t.type==="private")throw new TypeError(`${zl.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&n==="encrypt"&&t.type==="private")throw new TypeError(`${zl.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)},d3e=(e,t,n)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?u3e(e,t):c3e(e,t,n)};function f3e(e,t,n,r,a){if(a.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 o;n!==void 0?o=new Map([...Object.entries(n),...t.entries()]):o=t;for(const i of r.crit){if(!o.has(i))throw new C1(`Extension Header Parameter "${i}" is not recognized`);if(a[i]===void 0)throw new e(`Extension Header Parameter "${i}" is missing`);if(o.get(i)&&r[i]===void 0)throw new e(`Extension Header Parameter "${i}" MUST be integrity protected`)}return new Set(r.crit)}const h3e=(e,t)=>{if(t!==void 0&&(!Array.isArray(t)||t.some(n=>typeof n!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};function p3e(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 C1(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function m3e(e,t,n){if(rP(t))return n3e(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(EN(t,...zl));return KE.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(EN(t,...zl,"Uint8Array"))}const g3e=async(e,t,n,r)=>{const a=await m3e(e,t,"verify");o3e(e,a);const o=p3e(e,a.algorithm);try{return await KE.subtle.verify(o,a,n,r)}catch{return!1}};async function v3e(e,t,n){if(!xN(e))throw new za("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new za('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new za("JWS Protected Header incorrect type");if(e.payload===void 0)throw new za("JWS Payload missing");if(typeof e.signature!="string")throw new za("JWS Signature missing or incorrect type");if(e.header!==void 0&&!xN(e.header))throw new za("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const S=XD(e.protected);r=JSON.parse(QE.decode(S))}catch{throw new za("JWS Protected Header is invalid")}if(!r3e(r,e.header))throw new za("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const a={...r,...e.header},o=f3e(za,new Map([["b64",!0]]),n==null?void 0:n.crit,r,a);let i=!0;if(o.has("b64")&&(i=r.b64,typeof i!="boolean"))throw new za('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:l}=a;if(typeof l!="string"||!l)throw new za('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=n&&h3e("algorithms",n.algorithms);if(c&&!c.has(l))throw new QMe('"alg" (Algorithm) Header Parameter value not allowed');if(i){if(typeof e.payload!="string")throw new za("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new za("JWS Payload must be a string or an Uint8Array instance");let f=!1;typeof t=="function"&&(t=await t(r,e),f=!0),d3e(l,t,"verify");const p=JMe(q0.encode(e.protected??""),q0.encode("."),typeof e.payload=="string"?q0.encode(e.payload):e.payload);let g;try{g=XD(e.signature)}catch{throw new za("Failed to base64url decode the signature")}if(!await g3e(l,t,g,p))throw new XMe;let w;if(i)try{w=XD(e.payload)}catch{throw new za("Failed to base64url decode the payload")}else typeof e.payload=="string"?w=q0.encode(e.payload):w=e.payload;const T={payload:w};return e.protected!==void 0&&(T.protectedHeader=r),e.header!==void 0&&(T.unprotectedHeader=e.header),f?{...T,key:t}:T}async function y3e(e,t,n){if(e instanceof Uint8Array&&(e=QE.decode(e)),typeof e!="string")throw new za("Compact JWS must be a string or Uint8Array");const{0:r,1:a,2:o,length:i}=e.split(".");if(i!==3)throw new za("Invalid Compact JWS");const l=await v3e({payload:a,protected:r,signature:o},t,n),c={payload:l.payload,protectedHeader:l.protectedHeader};return typeof t=="function"?{...c,key:l.key}:c}const w3e={webId:"globe-2",pinned:"pin",archived:"archive",visibility:"eye",deleted:"trash"};class b3e extends Vl.WidgetType{constructor(n,r,a,o,i){super();De(this,"error",!1);this.view=n,this.plugin=r,this.target=a,this.type=o,this.to=i}eq(n){return this.target===n.target}toDOM(){const n=createSpan();return n.toggleClass("thino-inline-widget",!0),C.setIcon(n,w3e[this.type]||"help-circle"),C.setTooltip&&C.setTooltip(n,this.target),n}}function S3e(e){class t{constructor(a){De(this,"view");De(this,"match",new Vl.MatchDecorator({regexp:/\[(webId|pinned|archived|visibility|deleted)::([^\]]+)\]/g,decorate:(a,o,i,l,c)=>{this.shouldRender(c,o,i)&&a(o,i,Vl.Decoration.replace({widget:new b3e(c,e,l[0],l[1],i)}))}}));De(this,"decorations",Vl.Decoration.none);this.view=a,this.updateDecorations(a)}update(a){this.updateDecorations(a.view,a)}destroy(){this.decorations=Vl.Decoration.none}updateDecorations(a,o){!o||this.decorations.size===0?this.decorations=this.match.createDeco(a):this.decorations=this.match.updateDeco(o,this.decorations)}isLivePreview(a){return a.field(C.editorLivePreviewField)}shouldRender(a,o,i){return!a.state.selection.ranges.some(c=>c.from<=o?c.to>=o:c.from<=i)&&this.isLivePreview(a.state)}}const n={decorations:r=>r.decorations.update({filter:(a,o,i)=>{const l=i.spec.widget;return l&&l.error?!1:a===o||!r.view.state.selection.ranges.filter(c=>{const f=c.from,p=c.to;return f<=a?p>=a:f<=o}).length}})};return Vl.ViewPlugin.fromClass(t,n)}const D3e=e=>e.ctrlKey!==void 0||e.metaKey!==void 0||e.shiftKey!==void 0||e.altKey!==void 0,J0=()=>{new C.Notice(E("Open Memos Successfully"))},K0=[{id:"open-thino-in-left-sidebar",shortName:E("Left sidebar"),name:E("Open thino in left sidebar"),icon:"arrow-left",location:"left",cb:J0,modKeys:"shift"},{id:"open-thino-in-right-sidebar",shortName:E("Right sidebar"),name:E("Open thino in right sidebar"),icon:"arrow-right",location:"right",cb:J0,modKeys:["ctrl","meta"]},{id:"open-thino-in-float",shortName:E("Float window"),name:E("Open thino in float window"),icon:"layout",location:"float",cb:J0,modKeys:"alt"},{id:"open-thino-in-center",shortName:E("Center window"),name:E("Open thino in center window"),icon:"tv-2",location:"center",cb:J0,modKeys:void 0}];function MN(e,t,n){return new Promise((r,a)=>{let o="",i="";const l=c=>new Promise((f,p)=>{const g=t.ShareToThinoWithTextNewline===c||t.ShareToThinoWithTextNewline==="both"?`
`:" ";switch(t[c==="prepend"?"SharePrependType":"ShareAppendType"]){case"none":f();break;case"preset":t.ShareToThinoWithText&&(c==="prepend"?o=t.ShareToThinoWithTextPrepend+g:i=g+t.ShareToThinoWithTextAppend),f();break;case"input":{const y="Thino "+E(c==="prepend"?"Prepend text":"Append text");new sP(e,y,w=>{c==="prepend"?o=w.trim()+(w.trim()?g:""):i=(w.trim()?g:"")+w,f()}).open();break}case"selectTags":new tz(e,y=>{const w=y.length>0?y.map(T=>"#"+T).join(" "):"";c==="prepend"?o=w.trim()+(w.trim()?g:""):i=(w.trim()?g:"")+w.trim(),f()}).open();break;default:p(new Error("Invalid configuration type."))}});Promise.all([l("append"),l("prepend")]).then(()=>n(o,i)).then(()=>r()).catch(a)})}const T3e=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 XE(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:C.Platform.resourcePathPrefix},t&&(n={...n,dailyNotePluginInfo:{options:t.instance.options}}),await navigator.clipboard.writeText(`\`\`\`json
${JSON.stringify(n,null,2)}
\`\`\``),new C.Notice(E("Debug info copied to clipboard"))}catch(t){console.error(t)}}class I3e extends C.Plugin{constructor(){super(...arguments);De(this,"settings");De(this,"settingTab");De(this,"triggerBySelf",!1);De(this,"updatedID","");De(this,"debounceTimer",0);De(this,"apiHttpServer",null);De(this,"captureService",null);De(this,"loaded",!1);De(this,"MarkdownEditor")}async onload(){this.MarkdownEditor=T3e(this.app),await this.loadSettings(),CCe(),this.registerRibbon(),await this.verify();try{await this.checkVersionAndShowChangeLog()}catch(n){console.error(n)}this.settingTab=new HCe(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(),this.registerEditorContextMenu(),this.registerEditorSuggest(new ICe(this.app,this)),this.registerEditorExtension([LMe]),this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this)),this.registerView(lo,n=>new gf(n,this))}async loadSettings(){this.settings=Object.assign({},Ei,await this.loadData()),ft.setSettings(this.settings)}async saveSettings(){await this.saveData(this.settings),ft.setSettings(this.settings)}onunload(){var r;this.app.workspace.detachLeavesOfType(lo),be.clearMemos(),Le.dispatch({type:"CLEAR_MEMOS",payload:null}),Le.dispatch({type:"CLEAR_FILES",payload:null}),Le.dispatch({type:"CLEAR_VIEW",payload:null});const n=document.body.find(".dialog-wrapper");n&&((r=n.parentElement)==null||r.detach()),this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null),this.captureService&&this.captureService.onunload(),new C.Notice(E("Close Memos Successfully"))}initEditor(){this.register(ww(C.MetadataCache.prototype,{getFileCache:n=>function(r){return!(r!=null&&r.path)&&!r?null:n.call(this,r)}}))}initApp(){ft.setApp(this.app)}initURIHandler(){this.registerObsidianProtocolHandler("thino",async n=>{var i,l,c;if(!n)return;if(n.openSettings&&(this.app.setting.open(),this.app.setting.openTabById(this.manifest.id||"obsidian-memos")),n.userid)try{const f=n.userid;BMe(f,this.app),HMe(C.moment().add(30,"days").valueOf(),this.app),dt.setRefresh(!0)}catch(f){console.error(f),new C.Notice(E("Failed to verify"))}if(n.token)try{const f=n.token;(i=this.app)==null||i.saveLocalStorage("tokenForSync",f),setTimeout(()=>{this.app.setting.open(),this.app.setting.openTabById(this.manifest.id||"obsidian-memos"),this.settingTab.display()},200),new C.Notice(E("Saved sync token successfully"))}catch(f){console.error(f),new C.Notice(E("Failed to save"))}if(n.copyToken){this.app.setting.open(),this.app.setting.openTabById(this.manifest.id??"obsidian-memos");const f=await ZO();await navigator.clipboard.writeText(f),new C.Notice(E("Copied app id successfully"))}const r=(l=ft.getState())==null?void 0:l.verifyState,a=!C.Platform.isDesktop&&await((c=window.Capacitor)==null?void 0:c.Plugins.Device.getId()),o=C.Platform.isDesktop?await cr():a.identifier||a.uuid;if(!(!r||(r==null?void 0:r.appId)!==o)){if(n.content){const f=n.type,p=decodeURI(n.content)!==n.content?decodeURI(n.content):n.content,g=n.task,y=await be.createThino({content:p,type:f,isList:!!g});if(!y)return;be.pushMemo(y),ot.clearQuery()}n.openId&&await be.openThinoByID(n.openId)}})}initGlobalManifest(){dt.setPluginManifest(this.manifest)}stopServer(){this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null)}async stopEnableList(){var o,i;const n=(o=ft.getState())==null?void 0:o.verifyState,r=!C.Platform.isDesktop&&await((i=window.Capacitor)==null?void 0:i.Plugins.Device.getId()),a=C.Platform.isDesktop?await cr():r.identifier||r.uuid;if(!n||(n==null?void 0:n.appId)!==a){this.settings.EnabledLocationList=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"}],this.settingTab.debounceApplySettingsUpdate();return}}async initServer(){var o,i;if(C.Platform.isMobile||!this.settings.EnabledHttpApi)return;const n=(o=ft.getState())==null?void 0:o.verifyState,r=!C.Platform.isDesktop&&await((i=window.Capacitor)==null?void 0:i.Plugins.Device.getId()),a=C.Platform.isDesktop?await cr():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==a||(this.apiHttpServer=WMe(this,this.settings),this.initServerPort())}initServerPort(){this.apiHttpServer&&this.settings.EnabledHttpApi&&this.apiHttpServer.listen(this.settings.HttpApiIpType,this.settings.HttpApiPort)}async initCaptureService(){var o,i;if(C.Platform.isMobile||!this.settings.CaptureKey.EnableCaptureKey)return;const n=(o=ft.getState())==null?void 0:o.verifyState,r=!C.Platform.isDesktop&&await((i=window.Capacitor)==null?void 0:i.Plugins.Device.getId()),a=C.Platform.isDesktop?await cr():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==a||(this.captureService=new GMe(this.app,this),await this.captureService.onload())}registerMobileEvent(){C.Platform.isMobile&&(this.registerEvent(this.app.workspace.on("receive-text-menu",(n,r)=>{n.addItem(a=>{a.setSection("options").setIcon("popup-open").setTitle(E("Insert as Memo")).onClick(async()=>{let o=r;try{await MN(this.app,this.settings,async(i,l)=>{o=i+o+l;const c=await be.createThino({content:o,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});be.pushMemo(c)})}catch(i){console.error("Configuration failed:",i);return}})})})),this.registerEvent(this.app.workspace.on("receive-files-menu",(n,r)=>{n.addItem(a=>{a.setIcon("popup-open").setTitle(E("Insert file as memo content")).onClick(async()=>{let i=r.map(l=>this.app.fileManager.generateMarkdownLink(l,l.path)).join(`
`);try{await MN(this.app,this.settings,async(l,c)=>{i=l+i+c;const f=await be.createThino({content:i,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});be.pushMemo(f)})}catch(l){console.error("Configuration failed:",l);return}})})})))}registerCommands(){K0.forEach(n=>{this.addCommand({id:n.id,name:n.name,callback:()=>this.openMemos(n.location,n.cb),hotkeys:[]})}),["Modern","Clean","Minimal","Gradient"].forEach(n=>{this.addCommand({id:`share-thino-via-${n.toLowerCase()}`,name:E("Share thino")+` [${E(n)}]`,editorCallback:(r,a)=>{const o=r.getSelection();if(o.length===0)return;const i={id:`temp-${Date.now()}`,content:o,createdAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:C.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:a.file.path};of(i,n.toLowerCase(),a)}})}),this.addCommand({id:"focus-mode",name:"Focus mode",callback:()=>{const n=document.body.hasClass("thino-focus");document.body.toggleClass("thino-focus",!n)}}),this.addCommand({id:"hide-side-bar",name:E("Toggle sidebar visibility"),callback:()=>{const n=dt.getState().isMobileView,r=document.body.hasClass("thino-hide-side-bar");document.body.toggleClass("thino-hide-side-bar",n?!1:!r)}}),this.addCommand({id:"hide-tags",name:E("Toggle tags visibility"),callback:()=>{const n=document.body.hasClass("thino-hide-tags");document.body.toggleClass("thino-hide-tags",!n)}}),this.addCommand({id:"hide-query-list",name:E("Toggle query list visibility"),callback:()=>{const n=document.body.hasClass("thino-hide-query-list");document.body.toggleClass("thino-hide-query-list",!n)}}),this.addCommand({id:"insert-task",name:E("Insert task"),checkCallback:n=>{const r=this.app.plugins.getPlugin("obsidian-tasks-plugin"),a=this.app.workspace.getLeavesOfType("thino_view").first();if(r&&a)return n||this.app.plugins.plugins["obsidian-tasks-plugin"].apiV1.createTaskLineModal().then(i=>{var c;const l=this.app.workspace.activeEditor;l&&((c=l.editor)==null||c.insertText(i))}),!0}}),this.addCommand({id:"show-thino-editor",name:E("Show thino editor"),checkCallback:n=>{if(be.initialized&&ft.initialized){if(!n){if(!ft.getState().view){new C.Notice(E("Please open thino first"));return}new q6(this.app).open()}return!0}}}),this.addCommand({id:"lock-thino",name:E("Lock thino"),checkCallback:n=>{if(this.app.workspace.getActiveViewOfType(gf)&&this.settings.needVerify)return n||dt.setLocked(!0),!0}}),this.addCommand({id:"copy-debug-info",name:E("Copy debug info"),callback:async()=>{await XE(this)}}),this.addCommand({id:"insert-editor",name:E("Insert editor"),checkCallback:n=>{const r=this.app.workspace.getActiveViewOfType(C.MarkdownView);if(r&&r.getViewType()==="markdown")return n||r.editor.replaceSelection("\n```thino\n{\n editor: false\n}\n```\n"),!0}}),this.addCommand({id:"toggle-minimal-thino",name:E("Toggle minimal mode"),callback:()=>{const n=document.body.hasClass("minimal-thino");document.body.toggleClass("minimal-thino",!n)}}),this.addCommand({id:"focus-on-thino-editor",name:E("Focus on thino editor"),callback:()=>this.focusOnEditor(),hotkeys:[]}),this.addCommand({id:"reinit-thino-sync",name:E("ReSync web thinos to local"),callback:()=>{Pxe(this.app)}}),this.addCommand({id:"init-thino-sync",name:E("Sync local thinos to web"),callback:async()=>{var r;if(!((r=this.app)==null?void 0:r.loadLocalStorage("tokenForSync"))){new C.Notice(E("Please input token first"));return}if(!this.settings.startSync){new C.Notice(E("Please enable sync first"));return}try{await be.initSync()}catch(a){console.error(a),new C.Notice(E("Init Failed"))}}}),this.addCommand({id:"show-daily-thino",name:E("Show daily thino"),callback:()=>this.openDailyMemo(),hotkeys:[]}),this.addCommand({id:"focus-on-search-bar",name:E("Focus on search bar"),callback:()=>this.searchIt(),hotkeys:[]}),this.addCommand({id:"show-thino-in-popover",name:E("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(),ft.setPlugin(this);const n=this.app.workspace.editorSuggest.suggests.findIndex(r=>r.type==="customTag");n!==-1?(this.app.workspace.editorSuggest.suggests.splice(n,1),this.app.workspace.editorSuggest.suggests.unshift(new IN(this.app,this))):this.app.workspace.editorSuggest.suggests.unshift(new IN(this.app,this))}async initMemos(){try{await this.initDailyNotes()}catch(n){console.error(n)}ft.getState(),be.getState(),await be.fetchAllMemos()}async initDailyNotes(){this.settings.EnabledLocationList.find(n=>n.value==="DAILY")&&await ft.fechLocalDailyNotes()}registerCanvasNodeMemos(){if(!C.requireApiVersion("1.2.0")||!this.settings.EnabledLocationList.find(o=>o.value==="CANVAS"))return;const n=o=>{clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{setTimeout(async()=>{const i=o.canvas.getData(),l=i.nodes.find(c=>c.id===o.id);if(l&&(r(l),o.canvas.setData(i),be.getMemoById(o.id))){const f=await be.updateMemo(o.id,l.text,l.thinoType);be.editMemo(f)}o.canvas.requestSave(!0)},0)},800)},r=o=>{o.createdAt||(o.createdAt=C.moment().format("YYYY-MM-DD HH:mm:ss")),o.updatedAt=C.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=[]},a=()=>{var y,w;const o=(y=this.app.workspace.getLeavesOfType("canvas").first())==null?void 0:y.view;if(!o||!(o==null?void 0:o.canvas))return!1;const l=((w=this.app.workspace.getLeavesOfType("canvas").first())==null?void 0:w.view).canvas.nodes.values(),f=Array.from(l).filter(T=>T.text!==void 0);if(!f||f.length===0)return!1;const p=f[0].child;if(!p)return!1;const g=ww(p.constructor.prototype,{save:T=>function(...S){T.call(this,...S),this.node.isEditing&&n(this.node)}});return this.register(g),!0};this.app.workspace.onLayoutReady(()=>{if(!a()){const o=this.app.workspace.on("layout-change",()=>{a()&&this.app.workspace.offref(o)});this.registerEvent(o)}})}registerLinkOpen(){ww(C.Workspace.prototype,{openLinkText:n=>async function(...r){const a=be.getState().memos;if(a.find(o=>o.id===r[0]||o.id===r[1])){const o=a.find(i=>i.id===r[0]||i.id===r[1]);if(o){Hp(o);return}}await n.call(this,...r)}})}registerHoverEvent(){this.registerHoverLinkSource("thino",{defaultMod:!0,display:"Thino"})}registerCodeBlocks(){this.registerMarkdownCodeBlockProcessor("thino",async(n,r)=>{var a;if(n){if(!((a=this.app.workspace.getLeavesOfType("thino_view"))!=null&&a.length)){r.toggleClass(["thino-editor-codeblock","view-error"],!0),cV(r,this);return}if(n){const o=C.parseYaml(n);fV(r,o)}}})}registerEditorContextMenu(){this.registerEvent(this.app.workspace.on("editor-menu",(n,r,a)=>{const o=r.getSelection();if(o.length===0)return;const i={id:`temp-${Date.now()}`,content:o,createdAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:C.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:a.file.path},l=(c,f)=>{c.addItem(p=>{p.setSection("selection").setTitle(f+E("Modern")).setIcon("palette").onClick(async()=>{of(i,"modern",a)})}).addItem(p=>{p.setSection("selection").setTitle(f+E("Clean")).setIcon("palette").onClick(async()=>{of(i,"clean",a)})}).addItem(p=>{p.setSection("selection").setTitle(f+E("Minimal")).setIcon("palette").onClick(async()=>{of(i,"minimal",a)})}).addItem(p=>{p.setSection("selection").setTitle(E("Gradient")).setIcon("palette").onClick(async()=>{of(i,"gradient",a)})})};C.Platform.isDesktop&&n.addItem(c=>{const f=c.setIcon("Memos").setSection("selection").setTitle(E("Thino share")).setSubmenu();l(f,"")}),C.Platform.isMobile&&l(n,E("Thino share")+" ")}))}registerRibbon(){this.addRibbonIcon("Memos",E("ribbonIconTitle"),async n=>{if(n.button===2){n.preventDefault();const r=new C.Menu;K0.forEach(a=>{r.addItem(o=>{o.setTitle(a.shortName).setIcon(a.icon).onClick(async()=>{await this.openMemos(a.location,a.cb)})})}),r.showAtMouseEvent(n);return}for(let r=0;r<K0.length;r++){const a=K0[r];if(!a.modKeys){await this.openMemos(a.location,a.cb);break}if(!D3e(n))continue;const o=i=>n[`${i}Key`];if(typeof a.modKeys=="string"&&o(a.modKeys)||Array.isArray(a.modKeys)&&a.modKeys.some(o)){await this.openMemos(a.location,a.cb);break}}})}registerThinoWidget(){this.registerEditorExtension([S3e(this)])}async registerToolbarCheck(){var o,i;if(this.loaded)return;const n=(o=ft.getState())==null?void 0:o.verifyState,r=!C.Platform.isDesktop&&await((i=window.Capacitor)==null?void 0:i.Plugins.Device.getId()),a=C.Platform.isDesktop?await cr():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==a||(this.registerEditorExtension([FMe(this.app)]),this.registerEditorSuggest(new ECe(this.app,this)),this.loaded=!0)}async verify(){var a;let n="";if(C.Platform.isDesktop)n=await cr();else{const o=await((a=window.Capacitor.Plugins.Device)==null?void 0:a.getId());if(!o)return;n=o.identifier||o.uuid}async function r(o){if(!o)return ft.setVerifyState(null),!1;const c=await l3e(`-----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:f}=await y3e(o,c),p=JSON.parse(new TextDecoder().decode(f));return!p||p.iss!=="pkmer"||p.type!=="thino"||p.appId!==n?!1:(ft.setVerifyState(p),!0)}catch(f){console.error(f)}}return await r(this.settings.tokenForVerify[n])}async checkVersionAndShowChangeLog(){const n=this.manifest.version,r=this.settings.LastUpdatedVersion;n!==r&&(this.settings.LastUpdatedVersion=n,await this.saveSettings(),this.showChangeLog())}showChangeLog(){new ex(this.app,this.manifest.version).open()}autoOpenMemos(){this.app.workspace.getLeavesOfType(lo).length>0||this.settings.MobileAndDesktop==="Mobile"&&C.Platform.isDesktop||this.settings.MobileAndDesktop==="Desktop"&&C.Platform.isMobile||this.settings.OpenMemosAutomatically&&this.openMemos()}async openDailyMemo(){if(this.app.workspace.getLeavesOfType(lo).length>0){ot.setPathname("/daily");return}await this.openMemos(),ot.setPathname("/daily")}async openMemos(n="center",r){const a=this.app.workspace;if(a.getLeavesOfType(lo).length>0){const l=a.getLeavesOfType(lo)[0];a.setActiveLeaf(l),a.revealLeaf(l);return}a.detachLeavesOfType(lo);let o;switch(n){case"left":o=a.getLeftLeaf(!1);break;case"right":o=a.getRightLeaf(!1);break;case"float":o=a.getLeaf("window");break;default:o=a.getLeaf(!0);break}o&&(await o.setViewState({type:lo}),a.revealLeaf(o));const i=o.view.containerEl.querySelector("textarea");i&&i.focus(),r==null||r()}async searchIt(){const n=this.app.workspace,r=n.getLeavesOfType(lo);if(!(r.length>0)){await this.openMemos(),this.app.workspace.trigger("focus-on-searchbar");return}const a=r[0];n.revealLeaf(a),this.app.workspace.trigger("focus-on-searchbar")}async focusOnEditor(){if(!(this.app.workspace.getLeavesOfType(lo).length>0)){await this.openMemos();return}this.app.workspace.trigger("focus-on-textarea")}changeStatus(){const n=this.app.workspace,r=n.getLeavesOfType(lo);if(!(r.length>0)){new C.Notice(E("Please Open Memos First"));return}const a=r[0];n.setActiveLeaf(a),a.view.containerEl.querySelector(".list-or-task").click()}async showInPopover(){var o,i,l;const n=this.app.workspace;if(n.detachLeavesOfType(lo),!this.app.plugins.getPlugin("obsidian-hover-editor")){new C.Notice(E("Please install obsidian-hover-editor plugin first"));return}const a=await((o=this.app.plugins.getPlugin("obsidian-hover-editor"))==null?void 0:o.spawnPopover());a&&(await a.setViewState({type:lo}),n.revealLeaf(a),a.view.containerEl.classList.add("mobile-view"),(i=this.settings)!=null&&i.FocusOnEditor&&a.view.containerEl.querySelector("textarea")!==void 0&&((l=a.view.containerEl.querySelector("textarea"))==null||l.focus()))}}class ex extends C.Modal{constructor(n,r){super(n);De(this,"component");this.version=r}async onOpen(){const{contentEl:n}=this;this.containerEl.toggleClass("thino-changelog-modal",!0),n.createEl("h2",{text:E("Thino update info"),cls:"thino-changelog-title"}).createDiv({cls:"thino-changelog-version",text:`${this.version}`});try{n.createEl("h3",{text:E("Latest version")});const a=n.createDiv("current-change-log");n.createEl("hr"),n.createEl("h3",{text:E("Previous version")});const o=n.createDiv("prev-change-log"),l=await C.requestUrl("https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md");this.component=new C.Component;const[c,f]=this.getLatestVersionContent(l.text);let p=c,g=f;try{const y=localStorage.getItem("language"),w=y&&(y==="zh"||y==="zh-TW");p=w?c.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):c,g=w?f.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):f}catch(y){console.error(y)}await C.MarkdownRenderer.render(this.app,p,a,"",this.component),await C.MarkdownRenderer.render(this.app,g,o,"",this.component)}catch(a){console.error(a),n.createEl("p",{text:E("Failed to load changelog")}),n.createEl("a",{text:E("View online"),attr:{href:"https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md",target:"_blank"}})}}getLatestVersionContent(n){const r=/^# .+/gm,a=[...n.matchAll(r)];if(a.length===0)return[n,""];const o=a[0].index||0;let i=n.length;a.length>1&&(i=a[1].index||n.length);const l=n.substring(o,i).trim(),c=n.substring(i).trim();return[l,c]}onClose(){var r;const{contentEl:n}=this;n.empty(),(r=this.component)==null||r.unload()}}class sP extends C.Modal{constructor(n,r,a){super(n);De(this,"inputEl");De(this,"callback");this.title=r,this.callback=a}onOpen(){const{contentEl:n}=this;this.setTitle(this.title),this.containerEl.toggleClass(["thino-input-dialog","thino-bulk-action-dialog","tag-actions"],!0),this.inputEl=n.createEl("input",{attr:{type:"text"}}),this.inputEl.focus(),new C.Setting(n).addButton(r=>{r.setButtonText(E("OK")).onClick(()=>{this.close()})})}onClose(){this.contentEl.empty(),this.callback(this.inputEl.value)}}exports.ChangeLogModal=ex;exports.InputModal=sP;exports.default=I3e;exports.getCurrentDebugInfo=XE;