diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index d3f66fa..ce0cd9f 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -1,3 +1,5 @@ [ - "obsidian-git" + "obsidian-git", + "obsidian-tasks-plugin", + "pdf-plus" ] \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tasks-plugin/data.json b/.obsidian/plugins/obsidian-tasks-plugin/data.json new file mode 100644 index 0000000..1589704 --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/data.json @@ -0,0 +1,102 @@ +{ + "presets": { + "this_file": "path includes {{query.file.path}}", + "this_folder": "folder includes {{query.file.folder}}", + "this_folder_only": "filter by function task.file.folder === query.file.folder", + "this_root": "root includes {{query.file.root}}", + "hide_date_fields": "# Hide any values for all date fields\nhide due date\nhide scheduled date\nhide start date\nhide created date\nhide done date\nhide cancelled date", + "hide_non_date_fields": "# Hide all the non-date fields, but not tags\nhide id\nhide depends on\nhide recurrence rule\nhide on completion\nhide priority", + "hide_query_elements": "# Hide toolbar, postpone, edit and backlinks\nhide toolbar\nhide postpone button\nhide edit button\nhide backlinks", + "hide_everything": "# Hide everything except description and any tags\npreset hide_date_fields\npreset hide_non_date_fields\npreset hide_query_elements" + }, + "globalQuery": "", + "globalFilter": "", + "removeGlobalFilter": false, + "taskFormat": "tasksPluginEmoji", + "setCreatedDate": false, + "setDoneDate": true, + "setCancelledDate": true, + "autoSuggestInEditor": true, + "autoSuggestMinMatch": 0, + "autoSuggestMaxItems": 20, + "provideAccessKeys": true, + "useFilenameAsScheduledDate": false, + "filenameAsScheduledDateFormat": "", + "filenameAsDateFolders": [], + "recurrenceOnNextLine": false, + "removeScheduledDateOnRecurrence": false, + "searchResults": { + "taskCountLocation": "bottom" + }, + "statusSettings": { + "coreStatuses": [ + { + "symbol": " ", + "name": "Todo", + "nextStatusSymbol": "x", + "availableAsCommand": true, + "type": "TODO" + }, + { + "symbol": "x", + "name": "Done", + "nextStatusSymbol": " ", + "availableAsCommand": true, + "type": "DONE" + } + ], + "customStatuses": [ + { + "symbol": "/", + "name": "In Progress", + "nextStatusSymbol": "x", + "availableAsCommand": true, + "type": "IN_PROGRESS" + }, + { + "symbol": "-", + "name": "Cancelled", + "nextStatusSymbol": " ", + "availableAsCommand": true, + "type": "CANCELLED" + } + ] + }, + "isShownInEditModal": { + "priority": true, + "recurrence": true, + "due": true, + "scheduled": true, + "start": true, + "before_this": true, + "after_this": true, + "status": true, + "created": true, + "done": true, + "cancelled": true + }, + "features": { + "INTERNAL_TESTING_ENABLED_BY_DEFAULT": true + }, + "generalSettings": {}, + "headingOpened": { + "Core Statuses": true, + "Custom Statuses": true + }, + "debugSettings": { + "ignoreSortInstructions": false, + "showTaskHiddenData": false, + "recordTimings": false + }, + "loggingOptions": { + "minLevels": { + "": "info", + "tasks": "info", + "tasks.Cache": "info", + "tasks.Events": "info", + "tasks.File": "info", + "tasks.Query": "info", + "tasks.Task": "info" + } + } +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js new file mode 100644 index 0000000..c9271c1 --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -0,0 +1,522 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository +*/ + +/* +License obsidian-tasks: +MIT License + +Copyright (c) 2021 Clare Macrae, Ilyas Landikov and Martin Schenck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +/* +License rrule (included library): +rrule.js: Library for working with recurrence rules for calendar dates. +======================================================================= + +Copyright 2010, Jakub Roztocil and Lars Schöning + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of The author nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +./rrule.js and ./test/tests.js is based on python-dateutil. LICENCE: + +python-dateutil - Extensions to the standard Python datetime module. +==================================================================== + +Copyright (c) 2003-2011 - Gustavo Niemeyer +Copyright (c) 2012 - Tomi Pieviläinen + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +License chrono-node (included library): +The MIT License + +Copyright (c) 2014, Wanasit Tanakitrungruang +*/ + +/* +License flatpickr (included library): +The MIT License (MIT) + +Copyright (c) 2017 Gregory Petrosyan +*/ + +/* +License @floating-ui/dom (included library): + +MIT License + +Copyright (c) 2021 Floating UI contributors +*/ + +/* +License boon-js (included library): + +The MIT License (MIT) + +Copyright (c) 2020-present Jake Chorley +*/ + +/* +License eventemitter2 (included library): + +The MIT License (MIT) + +Copyright (c) 2016 Paolo Fragomeni and Contributors +*/ + +/* +License i18next (included library): + +The MIT License (MIT) + +Copyright (c) 2025 i18next +*/ + +/* +License mustache (included library): + +The MIT License + +Copyright (c) 2009 Chris Wanstrath (Ruby) +Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community +*/ + +/* +License mustache-validator (included library): + +MIT License + +Copyright (c) 2022 Elias Mangoro +*/ + +"use strict";var Vx=Object.create;var ao=Object.defineProperty,zx=Object.defineProperties,Qx=Object.getOwnPropertyDescriptor,Kx=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertyNames,ru=Object.getOwnPropertySymbols,Zx=Object.getPrototypeOf,Df=Object.prototype.hasOwnProperty,Cb=Object.prototype.propertyIsEnumerable;var Rb=(n,t,e)=>t in n?ao(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,U=(n,t)=>{for(var e in t||(t={}))Df.call(t,e)&&Rb(n,e,t[e]);if(ru)for(var e of ru(t))Cb.call(t,e)&&Rb(n,e,t[e]);return n},pe=(n,t)=>zx(n,Kx(t));var Ws=(n,t)=>{var e={};for(var r in n)Df.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&ru)for(var r of ru(n))t.indexOf(r)<0&&Cb.call(n,r)&&(e[r]=n[r]);return e};var K=(n,t)=>()=>(n&&(t=n(n=0)),t);var M=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Mb=(n,t)=>{for(var e in t)ao(n,e,{get:t[e],enumerable:!0})},Ab=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xx(t))!Df.call(n,i)&&i!==e&&ao(n,i,{get:()=>t[i],enumerable:!(r=Qx(t,i))||r.enumerable});return n};var $s=(n,t,e)=>(e=n!=null?Vx(Zx(n)):{},Ab(t||!n||!n.__esModule?ao(e,"default",{value:n,enumerable:!0}):e,n)),Pb=n=>Ab(ao({},"__esModule",{value:!0}),n);var A=(n,t,e)=>new Promise((r,i)=>{var s=l=>{try{o(e.next(l))}catch(u){i(u)}},a=l=>{try{o(e.throw(l))}catch(u){i(u)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(n,t)).next())});var ve,oo,Ib,Jx,eO,Nb,Fb,lo,Lb,tO,su,nO,Hb,js,rO,iO,xf,sO,aO,oO,Of,au,lO,Rf,Or,Bs,ou,Bb,Ub,lu,uu,qb,Yb,Cf,Wb,Ef,Mf,uO,Hs,Af,cO,Pf,$b,jb,iu,dO,cu,dt,AW,PW,IW,NW,FW,LW,UW,qW,YW,WW,$W,jW,HW,BW,Gb=K(()=>{ve=n=>typeof n=="string",oo=()=>{let n,t,e=new Promise((r,i)=>{n=r,t=i});return e.resolve=n,e.reject=t,e},Ib=n=>n==null?"":""+n,Jx=(n,t,e)=>{n.forEach(r=>{t[r]&&(e[r]=t[r])})},eO=/###/g,Nb=n=>n&&n.indexOf("###")>-1?n.replace(eO,"."):n,Fb=n=>!n||ve(n),lo=(n,t,e)=>{let r=ve(t)?t.split("."):t,i=0;for(;i{let{obj:r,k:i}=lo(n,t,Object);if(r!==void 0||t.length===1){r[i]=e;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=lo(n,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=lo(n,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=e},tO=(n,t,e,r)=>{let{obj:i,k:s}=lo(n,t,Object);i[s]=i[s]||[],i[s].push(e)},su=(n,t)=>{let{obj:e,k:r}=lo(n,t);if(e&&Object.prototype.hasOwnProperty.call(e,r))return e[r]},nO=(n,t,e)=>{let r=su(n,e);return r!==void 0?r:su(t,e)},Hb=(n,t,e)=>{for(let r in t)r!=="__proto__"&&r!=="constructor"&&(r in n?ve(n[r])||n[r]instanceof String||ve(t[r])||t[r]instanceof String?e&&(n[r]=t[r]):Hb(n[r],t[r],e):n[r]=t[r]);return n},js=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),rO={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},iO=n=>ve(n)?n.replace(/[&<>"'\/]/g,t=>rO[t]):n,xf=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let e=this.regExpMap.get(t);if(e!==void 0)return e;let r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}},sO=[" ",",","?","!",";"],aO=new xf(20),oO=(n,t,e)=>{t=t||"",e=e||"";let r=sO.filter(a=>t.indexOf(a)<0&&e.indexOf(a)<0);if(r.length===0)return!0;let i=aO.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`),s=!i.test(n);if(!s){let a=n.indexOf(e);a>0&&!i.test(n.substring(0,a))&&(s=!0)}return s},Of=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[t])return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;let r=t.split(e),i=n;for(let s=0;s-1&&ln==null?void 0:n.replace("_","-"),lO={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,t){var e,r;(r=(e=console==null?void 0:console[n])==null?void 0:e.apply)==null||r.call(e,console,t)}},Rf=class n{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||lO,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);let i=this.observers[r].get(e)||0;this.observers[r].set(e,i+1)}),this}off(t,e){if(this.observers[t]){if(!e){delete this.observers[t];return}this.observers[t].delete(e)}}emit(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i{let[o,l]=a;for(let u=0;u{let[o,l]=a;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,r){var u,c;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,o;t.indexOf(".")>-1?o=t.split("."):(o=[t,e],r&&(Array.isArray(r)?o.push(...r):ve(r)&&s?o.push(...r.split(s)):o.push(r)));let l=su(this.data,o);return!l&&!e&&!r&&t.indexOf(".")>-1&&(t=o[0],e=o[1],r=o.slice(2).join(".")),l||!a||!ve(r)?l:Of((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[e],r,s)}addResource(t,e,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=[t,e];r&&(o=o.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),Lb(this.data,o,i),s.silent||this.emit("added",t,e,r,i)}addResources(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let s in r)(ve(r[s])||Array.isArray(r[s]))&&this.addResource(t,e,s,r[s],{silent:!0});i.silent||this.emit("added",t,e,r)}addResourceBundle(t,e,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[t,e];t.indexOf(".")>-1&&(o=t.split("."),i=r,r=e,e=o[1]),this.addNamespaces(e);let l=su(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Hb(l,r,s):l=U(U({},l),r),Lb(this.data,o,l),a.silent||this.emit("added",t,e,r)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==void 0}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(i=>e[i]&&Object.keys(e[i]).length>0)}toJSON(){return this.data}},Bb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,t,e,r,i){return n.forEach(s=>{var a,o;t=(o=(a=this.processors[s])==null?void 0:a.process(t,e,r,i))!=null?o:t}),t}},Ub={},lu=class n extends Bs{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Jx(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Or.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;let r=this.resolve(t,e);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,e){let r=e.nsSeparator!==void 0?e.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");let i=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,s=e.ns||this.options.defaultNS||[],a=r&&t.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!oO(t,r,i);if(a&&!o){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ve(s)?[s]:s};let u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:ve(s)?[s]:s}}translate(t,e,r){if(typeof e!="object"&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),typeof e=="object"&&(e=U({},e)),e||(e={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);let i=e.returnDetails!==void 0?e.returnDetails:this.options.returnDetails,s=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(t[t.length-1],e),l=o[o.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(c){let Y=e.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${Y}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:`${l}${Y}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:a}let d=this.resolve(t,e),f=d==null?void 0:d.res,p=(d==null?void 0:d.usedKey)||a,h=(d==null?void 0:d.exactUsedKey)||a,b=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],E=e.joinArrays!==void 0?e.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,x=!ve(f)&&typeof f!="boolean"&&typeof f!="number";if(C&&f&&x&&v.indexOf(b)<0&&!(ve(E)&&Array.isArray(f))){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,pe(U({},e),{ns:o})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=Y,d.usedParams=this.getUsedParamsDetails(e),d):Y}if(s){let Y=Array.isArray(f),X=Y?[]:{},V=Y?h:p;for(let j in f)if(Object.prototype.hasOwnProperty.call(f,j)){let ee=`${V}${s}${j}`;X[j]=this.translate(ee,pe(U({},e),{joinArrays:!1,ns:o})),X[j]===ee&&(X[j]=f[j])}f=X}}else if(C&&ve(E)&&Array.isArray(f))f=f.join(E),f&&(f=this.extendTranslation(f,t,e,r));else{let Y=!1,X=!1,V=e.count!==void 0&&!ve(e.count),j=n.hasDefaultValue(e),ee=V?this.pluralResolver.getSuffix(u,e.count,e):"",Ae=e.ordinal&&V?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",Pe=V&&!e.ordinal&&e.count===0,Q=Pe&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${ee}`]||e[`defaultValue${Ae}`]||e.defaultValue;!this.isValidLookup(f)&&j&&(Y=!0,f=Q),this.isValidLookup(f)||(X=!0,f=a);let P=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:f,te=j&&Q!==f&&this.options.updateMissing;if(X||Y||te){if(this.logger.log(te?"updateKey":"missingKey",u,l,a,te?Q:f),s){let T=this.resolve(a,pe(U({},e),{keySeparator:!1}));T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[],se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let T=0;T{var R;let w=j&&k!==f?k:P;this.options.missingKeyHandler?this.options.missingKeyHandler(T,l,_,w,te,e):(R=this.backendConnector)!=null&&R.saveMissing&&this.backendConnector.saveMissing(T,l,_,w,te,e),this.emit("missingKey",T,l,_,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&V?H.forEach(T=>{let _=this.pluralResolver.getSuffixes(T,e);Pe&&e[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(k=>{m([T],a+k,e[`defaultValue${k}`]||Q)})}):m(H,a,Q))}f=this.extendTranslation(f,t,e,d,r),X&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(X||Y)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,Y?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(e),d):f}extendTranslation(t,e,r,i,s){var u,c;var a=this;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),r),r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(pe(U({},r),{interpolation:U(U({},this.options.interpolation),r.interpolation)}));let d=ve(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(d){let h=t.match(this.interpolator.nestingRegexp);f=h&&h.length}let p=r.replace&&!ve(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p=U(U({},this.options.interpolation.defaultVariables),p)),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),d){let h=t.match(this.interpolator.nestingRegexp),b=h&&h.length;f1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,a,o;return ve(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;let u=this.extractFromKey(l,e),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let f=e.count!==void 0&&!ve(e.count),p=f&&!e.ordinal&&e.count===0,h=e.context!==void 0&&(ve(e.context)||typeof e.context=="number")&&e.context!=="",b=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);d.forEach(v=>{var E,C;this.isValidLookup(r)||(o=v,!Ub[`${b[0]}-${v}`]&&((E=this.utils)!=null&&E.hasLoadedNamespace)&&!((C=this.utils)!=null&&C.hasLoadedNamespace(o))&&(Ub[`${b[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${b.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(x=>{var V;if(this.isValidLookup(r))return;a=x;let Y=[c];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(Y,c,x,v,e);else{let j;f&&(j=this.pluralResolver.getSuffix(x,e.count,e));let ee=`${this.options.pluralSeparator}zero`,Ae=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(Y.push(c+j),e.ordinal&&j.indexOf(Ae)===0&&Y.push(c+j.replace(Ae,this.options.pluralSeparator)),p&&Y.push(c+ee)),h){let Pe=`${c}${this.options.contextSeparator}${e.context}`;Y.push(Pe),f&&(Y.push(Pe+j),e.ordinal&&j.indexOf(Ae)===0&&Y.push(Pe+j.replace(Ae,this.options.pluralSeparator)),p&&Y.push(Pe+ee))}}let X;for(;X=Y.pop();)this.isValidLookup(r)||(s=X,r=this.getResource(x,v,X,e))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,r){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,e,r,i):this.resourceStore.getResource(t,e,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ve(t.replace),i=r?t.replace:t;if(r&&typeof t.count!="undefined"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i=U(U({},this.options.interpolation.defaultVariables),i)),!r){i=U({},i);for(let s of e)delete i[s]}return i}static hasDefaultValue(t){let e="defaultValue";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e===r.substring(0,e.length)&&t[r]!==void 0)return!0;return!1}},uu=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Or.create("languageUtils")}getScriptPartFromCode(t){if(t=au(t),!t||t.indexOf("-")<0)return null;let e=t.split("-");return e.length===2||(e.pop(),e[e.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){if(t=au(t),!t||t.indexOf("-")<0)return t;let e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(ve(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(r){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(r=>{if(e)return;let i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(e=i)}),!e&&this.options.supportedLngs&&t.forEach(r=>{if(e)return;let i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if(typeof t=="function"&&(t=t(e)),ve(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t[this.getLanguagePartFromCode(e)]),r||(r=t.default),r||[]}toResolveHierarchy(t,e){let r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return ve(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):ve(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}},qb={zero:0,one:1,two:2,few:3,many:4,other:5},Yb={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Cf=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Or.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=au(t==="dev"?"en":t),i=e.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Yb;if(!t.match(/-|_/))return Yb;let l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,e)}return this.pluralRulesCache[s]=a,a}needsPlural(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${e}${i}`)}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>qb[i]-qb[s]).map(i=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,r))}},Wb=function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=nO(n,t,e);return!s&&i&&ve(e)&&(s=Of(n,e,r),s===void 0&&(s=Of(t,e,r))),s},Ef=n=>n.replace(/\$/g,"$$$$"),Mf=class{constructor(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Or.create("interpolator"),this.options=t,this.format=((e=t==null?void 0:t.interpolation)==null?void 0:e.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});let{escape:e,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:h,nestingSuffixEscaped:b,nestingOptionsSeparator:v,maxReplaces:E,alwaysFormat:C}=t.interpolation;this.escape=e!==void 0?e:iO,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?js(s):a||"{{",this.suffix=o?js(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?js(f):p||js("$t("),this.nestingSuffix=h?js(h):b||js(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=E||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(e,r)=>(e==null?void 0:e.source)===r?(e.lastIndex=0,e):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,r,i){var p;let s,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){let C=Wb(e,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,pe(U(U({},i),e),{interpolationkey:h})):C}let b=h.split(this.formatSeparator),v=b.shift().trim(),E=b.join(this.formatSeparator).trim();return this.format(Wb(e,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,pe(U(U({},i),e),{interpolationkey:v}))};this.resetRegExp();let c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Ef(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Ef(this.escape(h)):Ef(h)}].forEach(h=>{for(o=0;s=h.regex.exec(t);){let b=s[1].trim();if(a=u(b),a===void 0)if(typeof c=="function"){let E=c(t,s,i);a=ve(E)?E:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),a="";else!ve(a)&&!this.useRawValueToEscape&&(a=Ib(a));let v=h.safeValue(a);if(t=t.replace(s[0],v),d?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=s[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a,o=(l,u)=>{var b;let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let d=l.split(new RegExp(`${c}[ ]*{`)),f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);let p=f.match(/'/g),h=f.match(/"/g);(((b=p==null?void 0:p.length)!=null?b:0)%2===0&&!h||h.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a=U(U({},u),a))}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a=U({},r),a=a.replace&&!ve(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){let c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(s=e(o.call(this,i[1].trim(),a),a),s&&i[0]===t&&!ve(s))return s;ve(s)||(s=Ib(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,d)=>this.format(c,d,r.lng,pe(U({},r),{interpolationkey:i[1].trim()})),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}},uO=n=>{let t=n.toLowerCase().trim(),e={};if(n.indexOf("(")>-1){let r=n.split("(");t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?e.currency||(e.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?e.range||(e.range=i.trim()):i.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();e[c]||(e[c]=u),u==="false"&&(e[c]=!1),u==="true"&&(e[c]=!0),isNaN(u)||(e[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:e}},Hs=n=>{let t={};return(e,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s=pe(U({},s),{[i.interpolationkey]:void 0}));let a=r+JSON.stringify(s),o=t[a];return o||(o=n(au(r),i),t[a]=o),o(e)}},Af=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Or.create("formatter"),this.options=t,this.formats={number:Hs((e,r)=>{let i=new Intl.NumberFormat(e,U({},r));return s=>i.format(s)}),currency:Hs((e,r)=>{let i=new Intl.NumberFormat(e,pe(U({},r),{style:"currency"}));return s=>i.format(s)}),datetime:Hs((e,r)=>{let i=new Intl.DateTimeFormat(e,U({},r));return s=>i.format(s)}),relativetime:Hs((e,r)=>{let i=new Intl.RelativeTimeFormat(e,U({},r));return s=>i.format(s,r.range||"day")}),list:Hs((e,r)=>{let i=new Intl.ListFormat(e,U({},r));return s=>i.format(s)})},this.init(t)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=Hs(e)}format(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=e.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){let o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{var d;let{formatName:u,formatOptions:c}=uO(l);if(this.formats[u]){let f=o;try{let p=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},h=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[u](o,h,U(U(U({},c),i),p))}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},t)}},cO=(n,t)=>{n.pending[t]!==void 0&&(delete n.pending[t],n.pendingCount--)},Pf=class extends Bs{constructor(t,e,r){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Or.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(t,e,r,i){let s={},a={},o={},l={};return t.forEach(u=>{let c=!0;e.forEach(d=>{let f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,e,r){let i=t.split("|"),s=i[0],a=i[1];e&&this.emit("failedLoading",s,a,e),!e&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&r&&(this.state[t]=0);let o={};this.queue.forEach(l=>{tO(l.loaded,[s],a),cO(l,t),e&&l.errors.push(e),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});let c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;let o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i{this.read.call(this,t,e,r,i+1,s*2,a)},s);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{let u=l(t,e);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(t,e,o)}prepareLoading(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ve(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ve(e)&&(e=[e]);let s=this.queueLoad(t,e,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,e,r){this.prepareLoading(t,e,{},r)}reload(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}loadOne(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${e}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${e}loaded namespace ${s} for language ${i}`,o),this.loaded(t,a,o)})}saveMissing(t,e,r,i,s){var l,u,c,d,f;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(e))){this.logger.warn(`did not save key "${r}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){let p=pe(U({},a),{isUpdate:s}),h=this.backend.create.bind(this.backend);if(h.length<6)try{let b;h.length===5?b=h(t,e,r,i,p):b=h(t,e,r,i),b&&typeof b.then=="function"?b.then(v=>o(null,v)).catch(o):o(null,b)}catch(b){o(b)}else h(t,e,r,i,o,p)}!t||!t[0]||this.store.addResource(t[0],e,r,i)}}},$b=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let t={};if(typeof n[1]=="object"&&(t=n[1]),ve(n[1])&&(t.defaultValue=n[1]),ve(n[2])&&(t.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){let e=n[3]||n[2];Object.keys(e).forEach(r=>{t[r]=e[r]})}return t},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),jb=n=>{var t,e;return ve(n.ns)&&(n.ns=[n.ns]),ve(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ve(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((e=(t=n.supportedLngs)==null?void 0:t.indexOf)==null?void 0:e.call(t,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},iu=()=>{},dO=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{typeof n[e]=="function"&&(n[e]=n[e].bind(n))})},cu=class n extends Bs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(super(),this.options=jb(t),this.services={},this.logger=Or,this.modules={external:[]},dO(this),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(ve(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));let i=$b();this.options=U(U(U({},i),this.options),jb(e)),this.options.interpolation=U(U({},i.interpolation),this.options.interpolation),e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);let s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Or.init(s(this.modules.logger),this.options):Or.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Af;let d=new uu(this.options);this.store=new ou(this.options.resources,this.options);let f=this.services;f.logger=Or,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Cf(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Mf(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Pf(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var h=arguments.length,b=new Array(h>1?h-1:0),v=1;v1?h-1:0),v=1;v{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=iu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});let l=oo(),u=()=>{let c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(t){var s,a;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iu,i=ve(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();let o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,e,r){let i=oo();return typeof t=="function"&&(r=t,t=void 0),typeof e=="function"&&(r=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),r||(r=iu),this.services.backendConnector.reload(t,e,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Bb.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,e){var r=this;this.isLanguageChangingTo=t;let i=oo();this.emit("languageChanging",t);let s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),e&&e(l,function(){return r.t(...arguments)})},o=l=>{var c,d;!t&&!l&&this.services.languageDetector&&(l=[]);let u=ve(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,e,r){var i=this;let s=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${h}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(p,l)};return ve(t)?s.lng=t:s.lngs=t,s.ns=e,s.keyPrefix=r,s}t(){var i;for(var t=arguments.length,e=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=e.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;let a=(o,l)=>{let u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(e.precheck){let o=e.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}loadNamespaces(t,e){let r=oo();return this.options.ns?(ve(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),e&&e(i)}),r):(e&&e(),Promise.resolve())}loadLanguages(t,e){let r=oo();ve(t)&&(t=[t]);let i=this.options.preload||[],s=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),e&&e(a)}),r):(e&&e(),Promise.resolve())}dir(t){var i,s;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";let e=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new uu($b());return e.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new n(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iu,r=t.forkResourceStore;r&&delete t.forkResourceStore;let i=pe(U(U({},this.options),t),{isClone:!0}),s=new n(i);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services=U({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){let o=Object.keys(this.store.data).reduce((l,u)=>(l[u]=U({},this.store.data[u]),Object.keys(l[u]).reduce((c,d)=>(c[d]=U({},l[u][d]),c),{})),{});s.store=new ou(o,i),s.services.resourceStore=s.store}return s.translator=new lu(s.services,i),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c{zb={main:{loadingPlugin:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u044B\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u041A\u0430\u043B\u0456 \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u0434\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B, \u0442\u0430\u043A \u0448\u0442\u043E \u0432\u044B \u0437\u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u044B\u0446\u044C \u0433\u0430\u0440\u0430\u0447\u0443\u044E \u043A\u043B\u0430\u0432\u0456\u0448\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0446\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u044F\u0435 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439.",name:"\u0414\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B"},editNextStatusSymbol:{description:"\u041F\u0440\u044B \u043D\u0430\u0446\u0456\u0441\u043A\u0443 \u0433\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B, \u044F\u043A\u0456 \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u044B \u0434\u0430\u043B\u0435\u0439.",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusName:{description:"\u0413\u044D\u0442\u0430 \u0437\u0440\u0430\u0437\u0443\u043C\u0435\u043B\u0430\u0435 \u0456\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusSymbol:{description:"\u0413\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B \u043F\u0430\u043C\u0456\u0436 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u043C\u0456 \u0434\u0443\u0436\u043A\u0430\u043C\u0456. (\u042F\u0433\u043E \u043C\u043E\u0436\u043D\u0430 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0434\u043B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u0430 \u043D\u0435 \u0434\u043B\u044F \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E.)",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusType:{description:"\u041A\u0456\u0440\u0443\u0439\u0446\u0435 \u0442\u044B\u043C, \u044F\u043A \u0441\u0442\u0430\u0442\u0443\u0441 \u043F\u0430\u0432\u043E\u0434\u0437\u0456\u0446\u044C \u0441\u044F\u0431\u0435 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0456.",name:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},fixErrorsBeforeSaving:"\u0412\u044B\u043F\u0440\u0430\u045E\u0446\u0435 \u043F\u0430\u043C\u044B\u043B\u043A\u0456 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0445\u0430\u0432\u0430\u043D\u043D\u0435\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u0413\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0431\u044B\u045E \u0441\u0442\u0432\u043E\u0440\u0430\u043D\u044B \u043F\u043B\u0430\u0433\u0456\u043D\u0430\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0456\u044F {{version}}) \u0434\u043B\u044F \u0432\u0456\u0437\u0443\u0430\u043B\u0456\u0437\u0430\u0446\u044B\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0437\u0430\u0434\u0430\u0447 \u0443 \u0433\u044D\u0442\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B.",deleteFileAnyTime:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0443 \u043B\u044E\u0431\u044B \u043C\u043E\u043C\u0430\u043D\u0442.",title:"\u041F\u0440\u0430 \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B",updateReport:{line1:"\u041A\u0430\u043B\u0456 \u0432\u044B \u0437\u043C\u044F\u043D\u044F\u0435\u0446\u0435 \u043D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 Tasks, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0442\u0440\u044B\u043C\u0430\u0446\u044C \u0430\u0431\u043D\u043E\u045E\u043B\u0435\u043D\u044B \u0441\u043F\u0440\u0430\u0432\u0430\u0437\u0434\u0430\u0447\u0443:",line2:"\u041F\u0435\u0440\u0430\u0439\u0448\u043E\u045E\u0448\u044B \u045E `\u041D\u0430\u043B\u0430\u0434\u044B` -> `Tasks`.",line3:"\u041D\u0430\u0446\u0456\u0441\u043D\u0443\u045E\u0448\u044B \u043D\u0430 `\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443",problems:"\u041F\u0440\u0430\u0431\u043B\u0435\u043C\u044B (\u043A\u0430\u043B\u0456 \u0451\u0441\u0446\u044C)",statusName:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusType:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443"},loadedSettings:{settingsActuallyUsed:"\u0413\u044D\u0442\u0430 \u043D\u0430\u043B\u0430\u0434\u044B, \u044F\u043A\u0456\u044F \u0441\u0430\u043F\u0440\u0430\u045E\u0434\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u044E\u0446\u0446\u0430 Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443.",title:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u043D\u044B\u044F \u043D\u0430\u043B\u0430\u0434\u044B"},messages:{cannotFindNextStatus:"\u041D\u0435\u0447\u0430\u043A\u0430\u043D\u0430\u044F \u043F\u0430\u043C\u044B\u043B\u043A\u0430 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0456\u043A\u0430\u0442 \u0441\u0456\u043C\u0432\u0430\u043B\u0430 '{{symbol}}': \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",emptySymbol:"\u041F\u0443\u0441\u0442\u044B \u0441\u0456\u043C\u0432\u0430\u043B: \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",nextSymbolUnknown:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u0441\u0456\u043C\u0432\u0430\u043B {{symbol}} \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B: \u0441\u0442\u0432\u0430\u0440\u044B\u0446\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u0441\u0456\u043C\u0432\u0430\u043B\u0430\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0456\u043D\u0444\u0430\u0440\u043C\u0430\u0446\u044B\u0456, \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B \u0442\u044B\u043F \u0434\u043B\u044F \u0441\u0456\u043C\u0432\u0430\u043B\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 {{symbol}} - {{type}}: \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0435\u0440\u0430\u0433\u043B\u0435\u0434\u0437\u0435\u0446\u044C \u0433\u044D\u0442\u044B \u0442\u044B\u043F.",wrongTypeAfterDone:{line1:"\u041F\u0430\u0441\u043B\u044F \u0433\u044D\u0442\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 `DONE` \u0456\u0434\u0437\u0435 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0430\u0431\u043E `IN_PROGRESS`.",line2:"\u041F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0434\u043B\u044F \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u044F \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B \u044F\u043D\u0430 \u0437\u0430\u043C\u0435\u0441\u0442 \u0433\u044D\u0442\u0430\u0433\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0440\u0430\u0432\u0430\u0434\u0436\u0430\u0446\u0446\u0430 `TODO` \u0430\u0431\u043E `IN_PROGRESS`, \u043A\u0430\u0431 \u0433\u0430\u0440\u0430\u043D\u0442\u0430\u0432\u0430\u0446\u044C, \u0448\u0442\u043E \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0435 \u0444\u0456\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430`.",line3:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 [Recurring Tasks and Custom Statuses]({{helpURL}})."}},sampleTasks:{line1:"\u0412\u043E\u0441\u044C \u043F\u0430 \u0430\u0434\u043D\u044B\u043C \u043F\u0440\u044B\u043A\u043B\u0430\u0434\u0437\u0435 \u0440\u0430\u0434\u043A\u0430 \u0437\u0430\u0434\u0430\u0447\u044B \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0433\u0430 \u0441\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u044F\u043A\u0456\u044F \u0444\u0430\u043A\u0442\u044B\u0447\u043D\u0430 \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u044E\u0446\u0446\u0430 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0456, \u043A\u0430\u0431 \u0432\u044B \u043C\u0430\u0433\u043B\u0456 \u043F\u0430\u044D\u043A\u0441\u043F\u0435\u0440\u044B\u043C\u0435\u043D\u0442\u0430\u0432\u0430\u0446\u044C.",line2:"\u0421\u0456\u043C\u0432\u0430\u043B\u044B \u0456 \u043D\u0430\u0437\u0432\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0443 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F\u0445 \u0437\u0430\u0434\u0430\u0447 \u0431\u044B\u043B\u0456 \u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B\u043C\u0456 \u043D\u0430 \u043C\u043E\u043C\u0430\u043D\u0442 \u0441\u0442\u0432\u0430\u0440\u044D\u043D\u043D\u044F \u0433\u044D\u0442\u0430\u0433\u0430 \u0444\u0430\u0439\u043B\u0430.",line3:"\u041A\u0430\u043B\u0456 \u0432\u044B \u0437\u043C\u044F\u043D\u0456\u043B\u0456 \u043F\u0440\u044B\u043A\u043B\u0430\u0434\u044B \u0437\u0430\u0434\u0430\u0447 \u0437 \u043C\u043E\u043C\u0430\u043D\u0442\u0443 \u0456\u0445 \u0441\u0442\u0432\u0430\u0440\u044D\u043D\u043D\u044F, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u045E\u0431\u0430\u0447\u044B\u0446\u044C \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u044B\u044F \u0442\u044B\u043F\u044B \u0456 \u043D\u0430\u0437\u0432\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0443 \u0437\u0430\u0433\u0430\u043B\u043E\u045E\u043A\u0430\u0445 \u0433\u0440\u0443\u043F \u0443 \u043F\u043E\u0448\u0443\u043A\u0443 \u0437\u0430\u0434\u0430\u0447 \u043D\u0456\u0436\u044D\u0439.",tip:{line1:"\u041F\u0430\u0440\u0430\u0434\u0430: \u041A\u0430\u043B\u0456 \u045E\u0441\u0435 \u0432\u0430\u0448\u044B \u0441\u0446\u044F\u0436\u043A\u0456 \u0432\u044B\u0433\u043B\u044F\u0434\u0430\u044E\u0446\u044C \u0430\u0434\u043D\u043E\u043B\u044C\u043A\u0430\u0432\u0430...",line2:"\u041A\u0430\u043B\u0456 \u045E\u0441\u0435 \u0441\u0446\u044F\u0436\u043A\u0456 \u0432\u044B\u0433\u043B\u044F\u0434\u0430\u044E\u0446\u044C \u0430\u0434\u043D\u043E\u043B\u044C\u043A\u0430\u0432\u0430 \u045E \u0420\u044D\u0436\u044B\u043C\u0435 \u0447\u044B\u0442\u0430\u043D\u043D\u044F \u0430\u0431\u043E Live Preview, \u0433\u043B\u044F\u0434\u0437\u0456\u0446\u0435 [\u0421\u0442\u044B\u043B\u0456\u0437\u0430\u0432\u0430\u0446\u044C \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B]({{url}}), \u043A\u0430\u0431 \u0434\u0430\u0432\u0435\u0434\u0430\u0446\u0446\u0430, \u044F\u043A \u0432\u044B\u0431\u0440\u0430\u0446\u044C \u0442\u044D\u043C\u0443 \u0430\u0431\u043E CSS-\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0434\u043B\u044F \u0441\u0442\u044B\u043B\u0456\u0437\u0430\u0446\u044B\u0456 \u0432\u0430\u0448\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E."},title:"\u041F\u0440\u044B\u043A\u043B\u0430\u0434\u044B \u0437\u0430\u0434\u0430\u0447"},searchSampleTasks:{line1:"\u0413\u044D\u0442\u044B \u043F\u043E\u0448\u0443\u043A \u0437\u0430\u0434\u0430\u0447 \u043F\u0430\u043A\u0430\u0437\u0432\u0430\u0435 \u045E\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u044B \u045E \u0433\u044D\u0442\u044B\u043C \u0444\u0430\u0439\u043B\u0435, \u0437\u0433\u0440\u0443\u043F\u0430\u0432\u0430\u043D\u044B\u044F \u043F\u0430 \u0442\u044B\u043F\u0435 \u0456 \u043D\u0430\u0437\u0432\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.",title:"\u041F\u043E\u0448\u0443\u043A \u043F\u0430 \u043F\u0440\u044B\u043A\u043B\u0430\u0434\u0430\u0445 \u0437\u0430\u0434\u0430\u0447"},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443.",line2:"\u041A\u0430\u043B\u0456 \u045E \u0456\u043C\u0451\u043D\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0451\u0441\u0446\u044C \u044F\u043A\u0456\u044F-\u043D\u0435\u0431\u0443\u0434\u0437\u044C \u0441\u0456\u043C\u0432\u0430\u043B\u044B \u0444\u0430\u0440\u043C\u0430\u0442\u0430\u0432\u0430\u043D\u043D\u044F Markdown, \u0442\u0430\u043A\u0456\u044F \u044F\u043A '*' \u0430\u0431\u043E '_',",line3:"Obsidian \u043C\u043E\u0436\u0430 \u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443 \u0442\u043E\u043B\u044C\u043A\u0456 \u045E \u0440\u044D\u0436\u044B\u043C\u0435 \u0447\u044B\u0442\u0430\u043D\u043D\u044F."},theseAreStatusValues:"\u0413\u044D\u0442\u0430 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0430\u0445 Core \u0456 Custom statuses.",title:"\u041D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443"}}},settings:{autoSuggest:{heading:"\u0410\u045E\u0442\u0430\u043F\u0430\u0434\u043A\u0430\u0437\u043A\u0430",maxSuggestions:{description:"\u041A\u043E\u043B\u044C\u043A\u0456 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C \u043F\u0430\u043A\u0430\u0437\u0430\u043D\u0430 \u043F\u0440\u044B \u0437'\u044F\u045E\u043B\u0435\u043D\u043D\u0456 \u043C\u0435\u043D\u044E \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E (\u0443\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u044B \u043E\u043F\u0446\u044B\u044E \xAB\u23CE\xBB).",name:"\u041C\u0430\u043A\u0441\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u043E\u043B\u044C\u043A\u0430\u0441\u0446\u044C \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u0434\u043B\u044F \u043F\u0430\u043A\u0430\u0437\u0443"},minLength:{description:"\u041A\u0430\u043B\u0456 \u0432\u044B\u0448\u044D\u0439 \u0437\u0430 0, \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u044F \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0442\u0430\u0434\u044B, \u043A\u0430\u043B\u0456 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0435\u0446\u0446\u0430 \u043F\u0430\u0447\u0430\u0442\u0430\u043A \u043B\u044E\u0431\u043E\u0433\u0430 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u0430\u0433\u0430 \u043A\u043B\u044E\u0447\u0430\u0432\u043E\u0433\u0430 \u0441\u043B\u043E\u0432\u0430.",name:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u0430\u045E\u0436\u044B\u043D\u044F \u0441\u0443\u043F\u0430\u0434\u0437\u0435\u043D\u043D\u044F \u0434\u043B\u044F \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u0439 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u044B"},toggle:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0430\u0434\u043A\u0440\u044B\u0435 \u0456\u043D\u0442\u044D\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0440\u044B \u045E\u0432\u043E\u0434\u0437\u0435 \u0442\u044D\u043A\u0441\u0442\u0443 \u045E\u043D\u0443\u0442\u0440\u044B \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u0430\u0439 \u043B\u0456\u043D\u0456\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0410\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u043C\u0435\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"}},changeRequiresRestart:"\u041F\u0410\u0422\u0420\u0410\u0411\u0423\u0415 \u041F\u0415\u0420\u0410\u0417\u0410\u041F\u0423\u0421\u041A\u0423.",dates:{cancelledDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u274C YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0430\u0434\u043C\u0435\u043D\u044B \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},createdDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0430\u0434 \u0456\u043D\u0448\u044B\u043C\u0456 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0434\u0430\u0442\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0432\u0430\u0440\u0430\u0435\u0446\u0446\u0430 \u0437 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439 \xAB\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u0430\u0431\u043E \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0430\u0431\u043E \u043F\u0440\u044B \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u0456 \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0441\u0442\u0432\u0430\u0440\u044D\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0434\u0430\u0434\u0430\u0434\u0437\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},doneDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2705 YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},heading:"\u0414\u0430\u0442\u044B"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u044B \u0437 \u0456\u043C\u0451\u043D\u0430\u045E \u0444\u0430\u0439\u043B\u0430\u045E",scheduledDate:{extraFormat:{description:{line1:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B, \u044F\u043A\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0432\u0430\u0446\u044C \u043F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B.",line2:"\u0414\u0430\u0432\u0435\u0434\u043A\u0430 \u043F\u0430 \u0441\u0456\u043D\u0442\u0430\u043A\u0441\u0456\u0441\u0435"},name:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B",placeholder:"\u043F\u0440\u044B\u043A\u043B\u0430\u0434: MMM DD YYYY"},folders:{description:"\u041F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435 \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F \u0434\u0430\u0442\u044B \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u0430\u045E\u0441\u044E\u043B\u044C, \u0430\u0431\u043E \u045E\u0432\u044F\u0434\u0437\u0456\u0446\u0435 \u0441\u043F\u0456\u0441 \u0442\u044D\u0447\u0430\u043A, \u043F\u0430\u0434\u0437\u0435\u043B\u0435\u043D\u044B\u0445 \u043A\u043E\u0441\u043A\u0430\u043C\u0456.",name:"\u0422\u044D\u0447\u043A\u0456 \u0437 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u043C\u0456 \u0434\u0430\u0442\u0430\u043C\u0456 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456"},toggle:{description:{line1:"\u042D\u043A\u0430\u043D\u043E\u043C\u0446\u0435 \u0447\u0430\u0441, \u0443\u0432\u043E\u0434\u0437\u044F\u0447\u044B \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F (\u23F3) \u0434\u0430\u0442\u044B.",line2:"\u041A\u0430\u043B\u0456 \u0433\u044D\u0442\u0430\u044F \u043E\u043F\u0446\u044B\u044F \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u043B\u044E\u0431\u044B\u043C \u0437\u0430\u0434\u0430\u0447\u0430\u043C \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u0430 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456, \u0432\u044B\u043D\u044F\u0442\u0430\u044F \u0437 \u0456\u0445 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430.",line3:"\u041F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0430\u0441\u0442\u0430\u045E\u043B\u044F\u0446\u044C \u0444\u0430\u0440\u043C\u0430\u0442\u044B \u0434\u0430\u0442\u044B YYYY-MM-DD \u0456 YYYYMMDD.",line4:"\u0417\u0430\u0434\u0430\u0447\u044B \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u043D\u0435 \u043C\u0430\u044E\u0446\u044C \u043D\u0456\u0432\u043E\u0434\u043D\u0430\u0439 \u0437 \u0434\u0430\u0442: Due (\u{1F4C5} ), Scheduled (\u23F3) \u0456 Start (\u{1F6EB})."},name:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B"}}},dialogs:{accessKeys:{description:"\u041A\u0430\u043B\u0456 \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 (\u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u044F \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u0456) \u0434\u043B\u044F \u0440\u043E\u0437\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0456\u0440\u0430\u0432\u0430\u043D\u043D\u044F \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0432\u044B\u0445 \u0432\u043E\u043A\u043D\u0430\u0445 \u043A\u0430\u043D\u0444\u043B\u0456\u043A\u0442\u0443\u044E\u0446\u044C \u0437 \u0441\u0456\u0441\u0442\u044D\u043C\u043D\u044B\u043C\u0456 \u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u043C\u0456 \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0430\u0431\u043E \u0444\u0443\u043D\u043A\u0446\u044B\u044F\u043C\u0456 \u0434\u0430\u043F\u0430\u043C\u043E\u0436\u043D\u0430\u0439 \u0442\u044D\u0445\u043D\u0430\u043B\u043E\u0433\u0456\u0456, \u044F\u043A\u0456\u044F \u0432\u0430\u0436\u043D\u044B\u044F \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0434\u043A\u043B\u044E\u0447\u044B\u0446\u044C \u0456\u0445 \u0442\u0443\u0442.",name:"\u0417\u0430\u0431\u044F\u0441\u043F\u0435\u0447\u044B\u0446\u044C \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0445"},heading:"\u0414\u044B\u044F\u043B\u043E\u0433\u0456"},format:{description:{line1:"\u0424\u0430\u0440\u043C\u0430\u0442, \u044F\u043A\u0456 Tasks \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0435 \u0434\u043B\u044F \u0447\u044B\u0442\u0430\u043D\u043D\u044F \u0456 \u0437\u0430\u043F\u0456\u0441\u0443 \u0437\u0430\u0434\u0430\u0447.",line2:"\u0412\u0430\u0436\u043D\u0430: Tasks \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u0442\u043E\u043B\u044C\u043A\u0456 \u0430\u0434\u0437\u0456\u043D \u0444\u0430\u0440\u043C\u0430\u0442 \u0430\u0434\u043D\u0430\u0447\u0430\u0441\u043E\u0432\u0430. \u0412\u044B\u0431\u0430\u0440 Dataview \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 \u0441\u043F\u044B\u043D\u0456\u0446\u044C \u0447\u044B\u0442\u0430\u043D\u043D\u0435 Tasks \u0441\u0432\u0430\u0456\u0445 \u0443\u043B\u0430\u0441\u043D\u044B\u0445 \u0437\u043D\u0430\u043A\u0430\u045E \u044D\u043C\u043E\u0434\u0437\u0456."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u0430\u0440\u043C\u0430\u0442 \u044D\u043C\u043E\u0434\u0437\u0456 Tasks"},name:"\u0424\u0430\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"},globalFilter:{filter:{description:{line1:"\u0420\u044D\u043A\u0430\u043C\u0435\u043D\u0434\u0443\u0435\u0446\u0446\u0430: \u043F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 \u0443\u0441\u0435 \u043F\u0443\u043D\u043A\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E \u0432\u0430\u0448\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B \u0431\u044B\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0456, \u044F\u043A\u0456\u043C\u0456 \u043A\u0456\u0440\u0443\u0435 \u0433\u044D\u0442\u044B \u043F\u043B\u0430\u0433\u0456\u043D.",line2:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0439\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440, \u043A\u0430\u043B\u0456 \u0432\u044B \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 Tasks \u0434\u0437\u0435\u0439\u043D\u0456\u0447\u0430\u045E \u0442\u043E\u043B\u044C\u043A\u0456 \u043D\u0430 \u043F\u0430\u0434\u043C\u043D\u043E\u0441\u0442\u0432\u0430 \u0432\u0430\u0448\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \xAB- [ ]\xBB, \u0442\u0430\u043A\u0456\u043C \u0447\u044B\u043D\u0430\u043C, \u043A\u0430\u0431 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E\u043A\u043B\u044E\u0447\u0430\u045E \u0443 \u0441\u0432\u0430\u0451 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u0435 \u0432\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u044B \u0440\u0430\u0434\u043E\u043A, \u043A\u0430\u0431 \u043B\u0456\u0447\u044B\u0446\u0446\u0430 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",line3:"\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434, \u043A\u0430\u043B\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044E\u0435\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u043D\u0430 #task, \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0430\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443, \u043F\u0430\u0437\u043D\u0430\u0447\u0430\u043D\u044B\u044F #task.",line4:"\u0406\u043D\u0448\u044B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0437\u0430\u0441\u0442\u0430\u043D\u0443\u0446\u0446\u0430 \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B\u043C\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0456 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0456 \u043D\u0435 \u0431\u0443\u0434\u0443\u0446\u044C \u0437'\u044F\u045E\u043B\u044F\u0446\u0446\u0430 \u045E \u0437\u0430\u043F\u044B\u0442\u0430\u0445, \u0456 \u0434\u043B\u044F \u0456\u0445 \u043D\u0435 \u0431\u0443\u0434\u0437\u0435 \u045E\u0441\u0442\u0430\u043D\u043E\u045E\u043B\u0435\u043D\u0430 \u0434\u0430\u0442\u0430 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F."},name:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434 #task \u0430\u0431\u043E TODO"},heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0440\u0430\u0434\u043E\u043A, \u044F\u043A\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044F\u0432\u0430\u043B\u0456 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u0430\u0433\u0430 \u0444\u0456\u043B\u044C\u0442\u0440\u0430, \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u044B \u043F\u0440\u044B \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0412\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F"}},globalQuery:{heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0437\u0430\u043F\u044B\u0442",query:{description:"\u0417\u0430\u043F\u044B\u0442, \u044F\u043A\u0456 \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u045E\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u043F\u0430\u0447\u0430\u0442\u043A\u0443 \u043A\u043E\u0436\u043D\u0430\u0433\u0430 \u0431\u043B\u043E\u043A\u0430 Tasks \u0443 \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B. \u041A\u0430\u0440\u044B\u0441\u043D\u044B \u0434\u043B\u044F \u0434\u0430\u0434\u0430\u043D\u043D\u044F \u0444\u0456\u043B\u044C\u0442\u0440\u0430\u045E \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u0430\u0431\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u045E \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u044B\u044F \u0437\u0430\u0434\u0430\u0447\u044B",nextLine:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0437\u0440\u043E\u0431\u0456\u0446\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437\u0430\u0434\u0430\u0447\u044B \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439 \u0437\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0443\u044E \u0437\u0430\u0434\u0430\u0447\u0443. \u0423 \u0430\u0434\u0432\u0430\u0440\u043E\u0442\u043D\u044B\u043C \u0432\u044B\u043F\u0430\u0434\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u0432\u0456\u0446\u0446\u0430 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u045E\u043B\u044F\u0435\u0446\u0446\u0430 \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 \u0434\u0430\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u044B\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u044D\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u044D\u043C\u0430 Aura",borderTheme:"\u0422\u044D\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u0430\u0434\u0430\u0446\u044C {{numberOfStatuses}} \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"}},ebullientworksTheme:"\u0422\u044D\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u044D\u043C\u0430 ITS \u0456 \u0441\u0446\u044F\u0436\u043A\u0456 SlRvb",lytModeTheme:"\u0422\u044D\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u0456 \u0446\u0451\u043C\u043D\u044B \u0440\u044D\u0436\u044B\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u044D\u043C\u0430",thingsTheme:"\u0422\u044D\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u043D\u043E\u0432\u044B \u0444\u0430\u0439\u043B \u0443 \u043A\u0430\u0440\u0430\u043D\u0451\u0432\u0430\u0439 \u0442\u044D\u0447\u0446\u044B \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u0430, \u044F\u043A\u0456 \u0437\u043C\u044F\u0448\u0447\u0430\u0435 \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443 Mermaid \u0437 \u0431\u044F\u0433\u0443\u0447\u044B\u043C\u0456 \u043D\u0430\u043B\u0430\u0434\u0430\u043C\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0413\u044D\u0442\u0430 \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u044F\u043A\u0456\u044F Tasks \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u0430, \u0431\u0435\u0437 \u043F\u0430\u0442\u0440\u044D\u0431\u044B \u045E \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u043C CSS-\u0441\u0442\u044B\u043B\u0456 \u0430\u0431\u043E \u0442\u044D\u043C\u0430\u0442\u044B\u0437\u0430\u0446\u044B\u0456.",line2:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0456 \u0434\u0430\u0434\u0430\u0432\u0430\u0446\u044C \u0441\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u044B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0435 \u043D\u0456\u0436\u044D\u0439."},heading:"\u0410\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u0443\u0441\u0435 \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B\u044F \u0442\u044B\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E"},addNewStatus:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u043D\u043E\u0432\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u044B"},resetCustomStatuses:{name:"\u0421\u043A\u0456\u043D\u0443\u0446\u044C \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0442\u044B\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0434\u0430 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u044F\u045E \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456"}},description:{line1:"\u0421\u043F\u0430\u0447\u0430\u0442\u043A\u0443 \u0432\u044B \u043F\u0430\u0432\u0456\u043D\u043D\u044B \u0432\u044B\u0431\u0440\u0430\u0446\u044C \u0456 \u045E\u0441\u0442\u0430\u043B\u044F\u0432\u0430\u0446\u044C CSS Snippet \u0430\u0431\u043E Theme, \u043A\u0430\u0431 \u0441\u0442\u044B\u043B\u0456\u0437\u0430\u0432\u0430\u0446\u044C \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0446\u044F\u0436\u043A\u0456.",line2:"\u0417\u0430\u0442\u044B\u043C \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0439\u0446\u0435 \u043A\u043D\u043E\u043F\u043A\u0456 \u043D\u0456\u0436\u044D\u0439, \u043A\u0430\u0431 \u043D\u0430\u043B\u0430\u0434\u0437\u0456\u0446\u044C \u0441\u0432\u0430\u0435 \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u045E \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u0456 \u0437 \u0432\u044B\u0431\u0440\u0430\u043D\u044B\u043C\u0456 CSS-\u0441\u0446\u044F\u0436\u043A\u0430\u043C\u0456.",line3:"\u0417\u0430\u045E\u0432\u0430\u0433\u0430 \u041B\u044E\u0431\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0437 \u0442\u044B\u043C \u0436\u0430 \u0441\u0456\u043C\u0432\u0430\u043B\u0430\u043C, \u0448\u0442\u043E \u0456 \u045E \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u0456\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u0431\u0443\u0434\u0443\u0446\u044C \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B\u044F. \u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0430\u0446\u0432\u0435\u0440\u0434\u0437\u0456\u0446\u044C \u0444\u0430\u043A\u0442\u044B\u0447\u043D\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u0437\u0430\u043F\u0443\u0441\u0446\u0456\u045E\u0448\u044B \u043A\u0430\u043C\u0430\u043D\u0434\u0443 \xAB\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u0430\u0431\u043E \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0456 \u043F\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u045E\u0448\u044B \u043D\u0430 \u0432\u044B\u043F\u0430\u0434\u0430\u043B\u044C\u043D\u044B \u0441\u043F\u0456\u0441 \u0421\u0442\u0430\u0442\u0443\u0441.",line4:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 \u0434\u0430\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u044B\u044E, \u043A\u0430\u0431 \u043F\u0430\u0447\u0430\u0446\u044C!"},heading:"\u041A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B \u0437\u0430\u0434\u0430\u0447"}}}});var Kb,Qb=K(()=>{Kb={main:{loadingPlugin:"Lade Plugin: {{name}} v{{version}}",unloadingPlugin:"Entlade Plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"WennBei Aktivierung k\xF6nnen Sie diesen Status als Befehl nutzen und ihm eine Tastenkombination zuordnen, um den Status umzuschalten.",name:"Verf\xFCgbar als Befehl"},editNextStatusSymbol:{description:"Bei Klick verwenden Sie dies als das n\xE4chstverwendete Symbol.",name:"Symbol f\xFCr n\xE4chsten Status"},editStatusName:{description:"Der Anzeigename des Aufgabenstatus.",name:"Name des Aufgabenstatus"},editStatusSymbol:{description:"Das Zeichen zwischen den eckigen Klammern. (Sie k\xF6nnen es nur f\xFCr benutzerdefinierte Status bearbeiten, nicht f\xFCr Kernstatus.)",name:"Symbol des Aufgabenstatus"},editStatusType:{description:"Kontrollieren Sie, wie der Status beim Suchen und Umschalten funktioniert.",name:"Typ des Aufgabenstatus"},fixErrorsBeforeSaving:"Fehler vor dem Speichern beheben."}},reports:{statusRegistry:{about:{createdBy:"Ich habe diese Datei mit dem Obsidian Tasks-Plugin (Version {{version}}) erstellt, um die Aufgabenstatus in diesem Vault zu visualisieren.",deleteFileAnyTime:"Sie k\xF6nnen diese Datei jederzeit l\xF6schen.",title:"\xDCber diese Datei",updateReport:{line1:"Wenn Sie die Tasks-Status-Einstellungen \xE4ndern, erhalten Sie einen aktualisierten Bericht, indem Sie:",line2:"Zu `Einstellungen` -> `Tasks` gehen.",line3:"Auf `\xDCberpr\xFCfen und Status kontrollieren` klicken."}},columnHeadings:{nextStatusSymbol:"N\xE4chstes Status-Symbol",problems:"Probleme (falls vorhanden)",statusName:"Statusname",statusSymbol:"Statussymbol",statusType:"Statustyp"},loadedSettings:{settingsActuallyUsed:"Dies sind die aktuellen Einstellungen, die Tasks verwendet.",switchToLivePreview:"Wechseln Sie zur Live-Vorschau oder zum Lesemodus, um das Diagramm zu sehen.",title:"Geladene Einstellungen"},messages:{cannotFindNextStatus:"Ich konnte den n\xE4chsten Status nicht finden.",duplicateSymbol:"Doppeltes Symbol '{{symbol}}': Plugin ignoriert diesen Status.",emptySymbol:"Leeres Symbol: Plugin ignoriert diesen Status.",nextSymbolUnknown:"N\xE4chstes Symbol {{symbol}} ist unbekannt: Erstellen Sie einen Status mit dem Symbol {{symbol}}.",notConventionalType:"Zur Information: Der \xFCbliche Typ f\xFCr das Status-Symbol {{symbol}} ist {{type}}. \xDCberpr\xFCfen Sie diesen Typ gegebenenfalls.",wrongTypeAfterDone:{line1:"Nach diesem `ERLEDIGT`-Status folgt {{nextType}}, nicht `TODO` oder `IN_PROGRESS`.",line2:"Wenn Sie diesen Status verwenden, um eine wiederkehrende Aufgabe abzuschlie\xDFen, folgt darauf `TODO` oder `IN_PROGRESS`, um sicherzustellen, dass die n\xE4chste Aufgabe dem `nicht erledigt`-Filter entspricht.",line3:"Siehe [Wiederkehrende Aufgaben und benutzerdefinierte Status]({{helpURL}})."}},sampleTasks:{line1:"Hier ist eine Beispiel-Aufgabenzeile f\xFCr jeden von Tasks tats\xE4chlich genutzten Status, mit der Sie experimentieren k\xF6nnen.",line2:"Zu dem Zeitpunkt, zu dem ich diese Datei erstellt habe, waren die Status-Symbole und Namen in den Aufgabentexten korrekt.",line3:"Wenn Sie die Beispielaufgaben ge\xE4ndert haben, sehen Sie die aktuellen Statustypen und Namen in den Gruppen\xFCberschriften in der Tasks-Suche unten.",tip:{line1:"Tipp: Wenn alle Ihre Kontrollk\xE4stchen gleich aussehen...",line2:"Wenn Ihre Kontrollk\xE4stchen im Lesemodus oder in der Live-Vorschau gleich aussehen, informieren Sie sich unter [Benutzerdefinierte Statusstile]({{url}}), wie Sie ein Theme oder ein CSS-Snippet ausw\xE4hlen k\xF6nnen, um Ihre Status zu formatieren."},title:"Beispielaufgaben"},searchSampleTasks:{line1:"Diese Tasks-Suche zeigt alle Aufgaben in dieser Datei an, gruppiert nach ihrem Statustyp und Statusnamen.",title:"Suche in den Beispielaufgaben"},statusSettings:{comment:{line1:"Wechseln Sie zur Live-Vorschau oder zum Lesemodus, um die Tabelle zu sehen.",line2:"Wenn in Statusnamen Markdown-Formatierungszeichen wie '*' oder '_' enthalten sind,",line3:"stellt Obsidian die Tabelle m\xF6glicherweise nur im Lesemodus korrekt dar."},theseAreStatusValues:"Diese Statuswerte finden Sie in den Abschnitten Kern- und Benutzerdefinierte Status.",title:"Status-Einstellungen"}}},settings:{autoSuggest:{heading:"Autosuggest",maxSuggestions:{description:'Wie viele Vorschl\xE4ge m\xF6chten Sie anzeigen, wenn ein Autosuggest-Men\xFC aufgeht (einschlie\xDFlich der "\u23CE"-Option).',name:"Maximale Anzahl von Autosuggest-Vorschl\xE4gen anzeigen"},minLength:{description:"Wenn gr\xF6\xDFer als 0, l\xF6st Autosuggest nur aus, wenn Sie den Beginn eines unterst\xFCtzten Schl\xFCsselwortes erkennen.",name:"Minimale \xDCbereinstimmungsl\xE4nge f\xFCr Autosuggest"},toggle:{description:"Durch Aktivierung \xF6ffnet sich ein intelligentes Vorschlagsmen\xFC, w\xE4hrend Sie innerhalb einer erkannten Aufgabenzeile tippen.",name:"Aufgabentext automatisch vorschlagen"}},changeRequiresRestart:"NEUSTART ERFORDERLICH.",dates:{cancelledDate:{description:"Wenn aktiviert, f\xFCge beim Umschalten auf 'abgebrochen' automatisch ein Datum \u274C YYYY-MM-DD am Ende hinzu.",name:"Abbruch-Datum bei jeder abgebrochenen Aufgabe festlegen"},createdDate:{description:"F\xFCge bei Aktivierung beim Erstellen einer Aufgabe mit 'Erstellen oder Bearbeiten einer Aufgabe' oder beim Abschluss einer wiederkehrenden Aufgabe ein Datum \u2795 YYYY-MM-DD vor anderen Datumswerten hinzu.",name:"Erstellungsdatum bei jeder hinzugef\xFCgten Aufgabe festlegen"},doneDate:{description:"Bei Aktivierung wird beim Umschalten auf 'erledigt' automatisch ein Datum \u2705 YYYY-MM-DD am Ende hinzugef\xFCgt.",name:"Erledigungsdatum bei jeder abgeschlossenen Aufgabe festlegen"},heading:"Daten"},datesFromFileNames:{heading:"Daten aus Dateinamen",scheduledDate:{extraFormat:{description:{line1:"Ein zus\xE4tzliches Datumsformat, das das Tasks-Plugin beim Verwenden des Dateinamens als geplantes Datum f\xFCr undatierte Aufgaben erkennt.",line2:"Syntax-Referenz"},name:"Zus\xE4tzliches Datumsformat f\xFCr Dateinamen als geplantes Datum f\xFCr undatierte Aufgaben",placeholder:"Beispiel: MMM DD YYYY"},folders:{description:"Lassen Sie dieses Feld leer, wenn Sie standardm\xE4\xDFige geplante Datumsangaben \xFCberall verwenden wollen, oder geben Sie eine durch Kommas getrennte Liste von Ordnern ein.",name:"Ordner mit standardm\xE4\xDFigen geplanten Datumsangaben"},toggle:{description:{line1:"Sparen Sie Zeit beim Eingeben geplanter (\u23F3) Daten.",line2:"Bei Aktivierung erhalten alle undatierten Aufgaben ein geplantes Datum, das aus ihrem Dateinamen extrahiert wird.",line3:"Standardm\xE4\xDFig erkennt das Tasks-Plugin sowohl YYYY-MM-DD als auch YYYYMMDD Datumsformate.",line4:"Undatierte Aufgaben haben weder ein F\xE4lligkeitsdatum (\u{1F4C5} ), geplantes (\u23F3) noch Start-(\u{1F6EB})datum."},name:"Dateinamen als geplantes Datum f\xFCr undatierte Aufgaben verwenden"}}},dialogs:{accessKeys:{description:"Wenn die Zugriffsschl\xFCssel (Tastenkombinationen) f\xFCr verschiedene Steuerelemente in Dialogfeldern in Konflikt mit System-Tastenkombinationen oder wichtigen assistiven Funktionen stehen, deaktivieren Sie sie hier.",name:"Zugriffsschl\xFCssel in Dialogen bereitstellen"},heading:"Dialoge"},format:{description:{line1:"Das Format, das Tasks zum Lesen und Schreiben von Aufgaben verwendet.",line2:"Wichtig: Tasks unterst\xFCtzt gleichzeitig nur ein Format. Wenn Sie Dataview ausw\xE4hlen, hindert dies Tasks daran, seine eigenen Emoji-Anzeiger zu verwenden."},displayName:{dataview:"Dataview",tasksEmojiFormat:"Tasks Emoji Format"},name:"Aufgabenformat"},globalFilter:{filter:{description:{line1:"Empfehlung: Lassen Sie dieses Feld leer, damit das Plugin alle Kontrollk\xE4stchen in Ihrem Tresor als Aufgaben verwalten kann.",line2:'Verwenden Sie einen globalen Filter, wenn Tasks nur auf einen Teil Ihrer "- [ ]" Kontrollk\xE4stchenitems wirken soll. Sorgen Sie daf\xFCr, dass ein Kontrollk\xE4stchenitem die angegebene Zeichenfolge in seiner Beschreibung enth\xE4lt, um als Aufgabe betrachtet zu werden.',line3:"Setzen Sie den globalen Filter z. B. auf #task, verwaltet Tasks nur die mit #task gekennzeichneten Kontrollk\xE4stchenitems.",line4:"Andere Kontrollk\xE4stchenitems bleiben normale Kontrollk\xE4stchen und erscheinen nicht in Abfragen und erhalten kein Erledigungsdatum."},name:"Globaler Filter",placeholder:"z.B. #task oder TODO"},heading:"Globaler Aufgabenfilter",removeFilter:{description:"Aktiviert entfernt die Zeichenfolge, die Sie als globalen Filter gesetzt haben, aus der Aufgabenbeschreibung, wenn die Aufgabe angezeigt wird.",name:"Globalen Filter aus Beschreibung entfernen"}},globalQuery:{heading:"Globale Abfrage",query:{description:"F\xFCgen Sie automatisch eine Abfrage am Anfang jedes Tasks-Blocks im Tresor hinzu. N\xFCtzlich f\xFCr Standardfilter oder Layout-Optionen.",placeholder:`Zum Beispiel... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"Wiederkehrende Aufgaben",nextLine:{description:"Aktivieren Sie dies, damit das n\xE4chste Auftreten einer Aufgabe in der Zeile unterhalb der abgeschlossenen Aufgabe erscheint. Ansonsten erscheint es vor der abgeschlossenen Aufgabe.",name:"N\xE4chste Wiederholung erscheint in Zeile darunter"},removeScheduledDate:{description:{line1:"Aktiviert, damit das n\xE4chste Auftreten einer Aufgabe keinen geplanten (\u23F3) Termin hat, wenn mindestens Start-(\u{1F6EB}) oder F\xE4lligkeitsdaten (\u{1F4C5}) vorhanden sind.",line2:"Dies gilt, wenn Sie m\xF6chten, dass Start- und F\xE4lligkeitsdaten beim n\xE4chsten Auftreten beibehalten werden, aber das geplante Datum sp\xE4ter festgelegt wird, sobald Sie planen, daran zu arbeiten."},name:"Geplantes Datum bei Wiederholung entfernen"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"Vgl. die Dokumentation",statuses:{collections:{anuppuccinTheme:"AnuPpuccin Theme",auraTheme:"Aura Theme",borderTheme:"Border Theme",buttons:{addCollection:{name:"{{themeName}}: F\xFCge {{numberOfStatuses}} unterst\xFCtzte Status hinzu"}},ebullientworksTheme:"Ebullientworks Theme",itsThemeAndSlrvbCheckboxes:"ITS Theme & SlRvb Kontrollk\xE4stchen",lytModeTheme:"LYT Mode Theme (nur Dunkelmodus)",minimalTheme:"Minimal Theme",thingsTheme:"Things Theme"},coreStatuses:{buttons:{checkStatuses:{name:"\xDCberpr\xFCfen und einsehen Sie Ihre Status-Eintr\xE4ge",tooltip:"Erstellen Sie eine neue Datei im Hauptverzeichnis des Tresors, die ein Mermaid-Diagramm der aktuellen Statuseinstellungen enth\xE4lt."}},description:{line1:"Diese Kern-Status unterst\xFCtzt Tasks nativ ohne benutzerdefiniertes CSS-Styling oder Themes.",line2:"Hinzuf\xFCgen und Bearbeiten Ihrer eigenen benutzerdefinierten Status k\xF6nnen Sie im unteren Abschnitt."},heading:"Kern-Status"},customStatuses:{buttons:{addAllUnknown:{name:"Alle unbekannten Statustypen hinzuf\xFCgen"},addNewStatus:{name:"Neuen Aufgabenstatus hinzuf\xFCgen"},resetCustomStatuses:{name:"Benutzerdefinierte Statustypen auf Standard zur\xFCcksetzen"}},description:{line1:"Zuerst w\xE4hlen und installieren Sie ein CSS-Snippet oder Theme, um benutzerdefinierte Kontrollk\xE4stchen zu formatieren.",line2:"Verwenden Sie dann die untenstehenden Schaltfl\xE4chen, um Ihre benutzerdefinierten Status zu erstellen, sodass sie mit Ihren ausgew\xE4hlten CSS-Kontrollk\xE4stchen \xFCbereinstimmen.",line3:"Hinweis: Status mit dem gleichen Symbol wie ein fr\xFCherer Status ignorieren wir. Best\xE4tigen Sie die tats\xE4chlich geladenen Status, indem Sie den 'Aufgabe erstellen oder bearbeiten'-Befehl ausf\xFChren und das Status-Dropdown anschauen.",line4:"Nutzen Sie die Dokumentation, um loszulegen!"},heading:"Benutzerdefinierte Status"},heading:"Aufgabenstatus"}}}});var Zb,Xb=K(()=>{Zb={main:{loadingPlugin:"Loading plugin: {{name}} v{{version}}",unloadingPlugin:"Unloading plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.",name:"Available as command"},editNextStatusSymbol:{description:"When clicked on this is the symbol that should be used next.",name:"Task Next Status Symbol"},editStatusName:{description:"This is the friendly name of the task status.",name:"Task Status Name"},editStatusSymbol:{description:"This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)",name:"Task Status Symbol"},editStatusType:{description:"Control how the status behaves for searching and toggling.",name:"Task Status Type"},fixErrorsBeforeSaving:"Fix errors before saving."}},reports:{statusRegistry:{about:{createdBy:"This file was created by the Obsidian Tasks plugin (version {{version}}) to help visualise the task statuses in this vault.",deleteFileAnyTime:"You can delete this file any time.",title:"About this file",updateReport:{line1:"If you change the Tasks status settings, you can get an updated report by:",line2:"Going to `Settings` -> `Tasks`.",line3:"Clicking on `Review and check your Statuses`."}},columnHeadings:{nextStatusSymbol:"Next Status Symbol",problems:"Problems (if any)",statusName:"Status Name",statusSymbol:"Status Symbol",statusType:"Status Type"},loadedSettings:{settingsActuallyUsed:"These are the settings actually used by Tasks.",switchToLivePreview:"Switch to Live Preview or Reading Mode to see the diagram.",title:"Loaded Settings"},messages:{cannotFindNextStatus:"Unexpected failure to find the next status.",duplicateSymbol:"Duplicate symbol '{{symbol}}': this status will be ignored.",emptySymbol:"Empty symbol: this status will be ignored.",nextSymbolUnknown:"Next symbol {{symbol}} is unknown: create a status with symbol {{symbol}}.",notConventionalType:"For information, the conventional type for status symbol {{symbol}} is {{type}}: you may wish to review this type.",wrongTypeAfterDone:{line1:"This `DONE` status is followed by {{nextType}}, not `TODO` or `IN_PROGRESS`.",line2:"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",line3:"See [Recurring Tasks and Custom Statuses]({{helpURL}})."}},sampleTasks:{line1:"Here is one example task line for each of the statuses actually used by tasks, for you to experiment with.",line2:"The status symbols and names in the task descriptions were correct when this file was created.",line3:"If you have modified the sample tasks since they were created, you can see the current status types and names in the group headings in the Tasks search below.",tip:{line1:"Tip: If all your checkboxes look the same...",line2:"If all the checkboxes look the same in Reading Mode or Live Preview, see [Style custom statuses]({{url}}) for how to select a theme or CSS snippet to style your statuses."},title:"Sample Tasks"},searchSampleTasks:{line1:"This Tasks search shows all the tasks in this file, grouped by their status type and status name.",title:"Search the Sample Tasks"},statusSettings:{comment:{line1:"Switch to Live Preview or Reading Mode to see the table.",line2:"If there are any Markdown formatting characters in status names, such as '*' or '_',",line3:"Obsidian may only render the table correctly in Reading Mode."},theseAreStatusValues:"These are the status values in the Core and Custom statuses sections.",title:"Status Settings"}}},settings:{autoSuggest:{heading:"Auto-suggest",maxSuggestions:{description:'How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).',name:"Maximum number of auto-suggestions to show"},minLength:{description:"If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.",name:"Minimum match length for auto-suggest"},toggle:{description:"Enabling this will open an intelligent suggest menu while typing inside a recognized task line.",name:"Auto-suggest task content"}},changeRequiresRestart:"REQUIRES RESTART.",dates:{cancelledDate:{description:"Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.",name:"Set cancelled date on every cancelled task"},createdDate:{description:"Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.",name:"Set created date on every added task"},doneDate:{description:"Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.",name:"Set done date on every completed task"},heading:"Dates"},datesFromFileNames:{heading:"Dates from file names",scheduledDate:{extraFormat:{description:{line1:"An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.",line2:"Syntax Reference"},name:"Additional filename date format as Scheduled date for undated tasks",placeholder:"example: MMM DD YYYY"},folders:{description:"Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.",name:"Folders with default Scheduled dates"},toggle:{description:{line1:"Save time entering Scheduled (\u23F3) dates.",line2:"If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.",line3:"By default, Tasks plugin will match both YYYY-MM-DD and YYYYMMDD date formats.",line4:"Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates."},name:"Use filename as Scheduled date for undated tasks"}}},dialogs:{accessKeys:{description:"If the access keys (keyboard shortcuts) for various controls in dialog boxes conflict with system keyboard shortcuts or assistive technology functionality that is important for you, you may want to deactivate them here.",name:"Provide access keys in dialogs"},heading:"Dialogs"},format:{description:{line1:"The format that Tasks uses to read and write tasks.",line2:"Important: Tasks currently only supports one format at a time. Selecting Dataview will currently stop Tasks reading its own emoji signifiers."},displayName:{dataview:"Dataview",tasksEmojiFormat:"Tasks Emoji Format"},name:"Task Format"},globalFilter:{filter:{description:{line1:"Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.",line2:'Use a global filter if you want Tasks to only act on a subset of your "- [ ]" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.',line3:"For example, if you set the global filter to #task, the Tasks plugin will only handle checklist items tagged with #task.",line4:"Other checklist items will remain normal checklist items and not appear in queries or get a done date set."},name:"Global filter",placeholder:"e.g. #task or TODO"},heading:"Global task filter",removeFilter:{description:"Enabling this removes the string that you set as global filter from the task description when displaying a task.",name:"Remove global filter from description"}},globalQuery:{heading:"Global Query",query:{description:"A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.",placeholder:`For example... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:"Add new preset"},line1:"You can define named instructions here, that you can re-use in multiple queries. A preset called '{{name}}' can be used in Tasks queries with either '{{instruction1}}' or '{{instruction2}}'.",line2:"Any open Tasks queries are reloaded automatically when presets are edited.",name:"Presets"},recurringTasks:{heading:"Recurring tasks",nextLine:{description:"Enabling this will make the next recurrence of a task appear on the line below the completed task. Otherwise the next recurrence will appear before the completed one.",name:"Next recurrence appears on the line below"},removeScheduledDate:{description:{line1:"Enabling this will make the next recurrence of a task have no Scheduled (\u23F3) date, when at least one of Start (\u{1F6EB}) or Due (\u{1F4C5}) dates is present.",line2:"This is for when you want the Start and Due dates to carry forward to the next recurrence, but you will set the Scheduled date in future, once you plan to work on it."},name:"Remove scheduled date on recurrence"}},searches:{heading:"Searches",enableCustomSearches:{description:{line1:"Enables '{{filterByFunction}}', '{{sortByFunction}}', and '{{groupByFunction}}', which execute JavaScript in Tasks queries.",line2:"Malicious JavaScript in a Tasks query or Markdown file could run inside Obsidian and access or modify your vault contents, local files, or other system resources.",line3:"Only enable this if you trust the current and future contents of this vault, including files you may later download, copy, or sync from other people.",line4:"This setting is stored on this device only; enable it separately on each device where you use this vault."},name:"Enable custom searches"}},searchResults:{heading:"Search results",taskCountLocation:{description:"Choose whether the task count is shown at the top or bottom of query results.",name:"Task count location",options:{bottom:"Bottom",top:"Top"}}},seeTheDocumentation:"See the documentation",statuses:{collections:{anuppuccinTheme:"AnuPpuccin Theme",auraTheme:"Aura Theme",borderTheme:"Border Theme",buttons:{addCollection:{name:"{{themeName}}: Add {{numberOfStatuses}} supported Statuses"}},ebullientworksTheme:"Ebullientworks Theme",itsThemeAndSlrvbCheckboxes:"ITS Theme & SlRvb Checkboxes",lytModeTheme:"LYT Mode Theme (Dark mode only)",minimalTheme:"Minimal Theme",thingsTheme:"Things Theme"},coreStatuses:{buttons:{checkStatuses:{name:"Review and check your Statuses",tooltip:"Create a new file in the root of the vault, containing a Mermaid diagram of the current status settings."}},description:{line1:"These are the core statuses that Tasks supports natively, with no need for custom CSS styling or theming.",line2:"You can add edit and add your own custom statuses in the section below."},heading:"Core Statuses"},customStatuses:{buttons:{addAllUnknown:{name:"Add All Unknown Status Types"},addNewStatus:{name:"Add New Task Status"},resetCustomStatuses:{name:"Reset Custom Status Types to Defaults"}},description:{line1:"You should first select and install a CSS Snippet or Theme to style custom checkboxes.",line2:"Then, use the buttons below to set up your custom statuses, to match your chosen CSS checkboxes.",line3:"Note Any statuses with the same symbol as any earlier statuses will be ignored. You can confirm the actually loaded statuses by running the 'Create or edit task' command and looking at the Status drop-down.",line4:"See the documentation to get started!"},heading:"Custom Statuses"},heading:"Task Statuses"}}}});var eT,Jb=K(()=>{eT={main:{loadingPlugin:"\uD50C\uB7EC\uADF8\uC778 \uB85C\uB4DC \uC911: {{name}} v{{version}}",unloadingPlugin:"\uD50C\uB7EC\uADF8\uC778 \uC5B8\uB85C\uB4DC \uC911: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC774 \uC0C1\uD0DC\uB97C \uBA85\uB839\uC5B4(command)\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC5B4 \uB2E8\uCD95\uD0A4\uB97C \uC9C0\uC815\uD558\uACE0 \uC0C1\uD0DC\uB97C \uC804\uD658\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",name:"\uBA85\uB839\uC5B4\uB85C \uC0AC\uC6A9"},editNextStatusSymbol:{description:"\uD074\uB9AD \uC2DC \uB2E4\uC74C\uC5D0 \uC0AC\uC6A9\uD560 \uAE30\uD638\uC785\uB2C8\uB2E4.",name:"\uB2E4\uC74C \uC0C1\uD0DC \uAE30\uD638"},editStatusName:{description:"\uC791\uC5C5 \uC0C1\uD0DC\uB97C \uC54C\uC544\uBCF4\uAE30 \uC27D\uAC8C \uD45C\uD604\uD558\uB294 \uC774\uB984\uC785\uB2C8\uB2E4.",name:"\uC0C1\uD0DC \uC774\uB984"},editStatusSymbol:{description:"\uB300\uAD04\uD638 '[]' \uC0AC\uC774\uC5D0 \uB4E4\uC5B4\uAC00\uB294 \uBB38\uC790\uC785\uB2C8\uB2E4. (\uCF54\uC5B4 \uC0C1\uD0DC\uAC00 \uC544\uB2CC \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB9CC \uD3B8\uC9D1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.)",name:"\uC0C1\uD0DC \uAE30\uD638"},editStatusType:{description:"\uAC80\uC0C9 \uBC0F \uC0C1\uD0DC \uC804\uD658 \uC2DC \uC5B4\uB5BB\uAC8C \uB3D9\uC791\uD560\uC9C0 \uC81C\uC5B4\uD569\uB2C8\uB2E4.",name:"\uC0C1\uD0DC \uC720\uD615"},fixErrorsBeforeSaving:"\uC800\uC7A5\uD558\uAE30 \uC804\uC5D0 \uC624\uB958\uB97C \uC218\uC815\uD558\uC138\uC694."}},reports:{statusRegistry:{about:{createdBy:"\uC774 \uD30C\uC77C\uC740 \uC774 \uBCF4\uAD00\uC18C(vault)\uC758 \uC791\uC5C5 \uC0C1\uD0DC\uB97C \uC2DC\uAC01\uD654\uD558\uB294 \uB370 \uB3C4\uC6C0\uC744 \uC8FC\uAE30 \uC704\uD574 Obsidian Tasks \uD50C\uB7EC\uADF8\uC778(\uBC84\uC804 {{version}})\uC774 \uC0DD\uC131\uD588\uC2B5\uB2C8\uB2E4.",deleteFileAnyTime:"\uC774 \uD30C\uC77C\uC740 \uC5B8\uC81C\uB4E0\uC9C0 \uC0AD\uC81C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",title:"\uC774 \uD30C\uC77C\uC5D0 \uB300\uD558\uC5EC",updateReport:{line1:"Tasks \uC0C1\uD0DC \uC124\uC815\uC744 \uBCC0\uACBD\uD588\uB2E4\uBA74, \uB2E4\uC74C \uBC29\uBC95\uC73C\uB85C \uBCF4\uACE0\uC11C\uB97C \uC5C5\uB370\uC774\uD2B8\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4:",line2:"`\uC124\uC815(Settings)` \u2192 `Tasks`\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",line3:"`\uC0C1\uD0DC \uAC80\uD1A0 \uBC0F \uD655\uC778(Review and check your Statuses)`\uC744 \uD074\uB9AD\uD569\uB2C8\uB2E4."}},columnHeadings:{nextStatusSymbol:"\uB2E4\uC74C \uC0C1\uD0DC \uAE30\uD638",problems:"\uBB38\uC81C\uC810 (\uC788\uB294 \uACBD\uC6B0)",statusName:"\uC0C1\uD0DC \uC774\uB984",statusSymbol:"\uC0C1\uD0DC \uAE30\uD638",statusType:"\uC0C1\uD0DC \uC720\uD615"},loadedSettings:{settingsActuallyUsed:"Tasks\uC5D0\uC11C \uC2E4\uC81C\uB85C \uC0AC\uC6A9 \uC911\uC778 \uC124\uC815\uC785\uB2C8\uB2E4.",switchToLivePreview:"\uB2E4\uC774\uC5B4\uADF8\uB7A8\uC744 \uBCF4\uB824\uBA74 \uC2E4\uC2DC\uAC04 \uBBF8\uB9AC\uBCF4\uAE30(Live Preview) \uB610\uB294 \uC77D\uAE30 \uBAA8\uB4DC(Reading Mode)\uB85C \uC804\uD658\uD558\uC138\uC694.",title:"\uB85C\uB4DC\uB41C \uC124\uC815"},messages:{cannotFindNextStatus:"\uB2E4\uC74C \uC0C1\uD0DC\uB97C \uCC3E\uB294 \uC911 \uC608\uAE30\uCE58 \uC54A\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.",duplicateSymbol:"\uC911\uBCF5\uB41C \uAE30\uD638 '{{symbol}}': \uC774 \uC0C1\uD0DC\uB294 \uBB34\uC2DC\uB429\uB2C8\uB2E4.",emptySymbol:"\uAE30\uD638\uAC00 \uBE44\uC5B4\uC788\uC74C: \uC774 \uC0C1\uD0DC\uB294 \uBB34\uC2DC\uB429\uB2C8\uB2E4.",nextSymbolUnknown:"\uC54C \uC218 \uC5C6\uB294 \uB2E4\uC74C \uAE30\uD638 {{symbol}}: \uAE30\uD638\uAC00 {{symbol}}\uC778 \uC0C1\uD0DC\uB97C \uC0DD\uC131\uD558\uC138\uC694.",notConventionalType:"\uCC38\uACE0: \uC0C1\uD0DC \uAE30\uD638 {{symbol}}\uC758 \uC77C\uBC18\uC801\uC778 \uC720\uD615\uC740 {{type}}\uC785\uB2C8\uB2E4. \uC774 \uC720\uD615\uC744 \uB2E4\uC2DC \uD655\uC778\uD574 \uBCF4\uC138\uC694.",wrongTypeAfterDone:{line1:"\uC774 `DONE` \uC0C1\uD0DC \uB2E4\uC74C\uC5D0\uB294 `TODO` \uB610\uB294 `IN_PROGRESS`\uAC00 \uC544\uB2CC {{nextType}}\uC774(\uAC00) \uC635\uB2C8\uB2E4.",line2:"\uBC18\uBCF5 \uC791\uC5C5\uC744 \uC644\uB8CC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB420 \uACBD\uC6B0, \uB2E4\uC74C \uC791\uC5C5\uC774 `not done` \uD544\uD130\uC640 \uC77C\uCE58\uD558\uB3C4\uB85D \uB300\uC2E0 `TODO` \uB610\uB294 `IN_PROGRESS`\uAC00 \uC774\uC5B4\uC9D1\uB2C8\uB2E4.",line3:"[\uBC18\uBCF5 \uC791\uC5C5\uACFC \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC(Recurring Tasks and Custom Statuses)]({{helpURL}}) \uBB38\uC11C\uB97C \uCC38\uACE0\uD558\uC138\uC694."}},sampleTasks:{line1:"\uD604\uC7AC \uC0AC\uC6A9 \uC911\uC778 \uAC01 \uC0C1\uD0DC\uC5D0 \uB300\uD55C \uC608\uC2DC \uC791\uC5C5\uC785\uB2C8\uB2E4. \uC790\uC720\uB86D\uAC8C \uD14C\uC2A4\uD2B8\uD574 \uBCF4\uC138\uC694.",line2:"\uC774 \uD30C\uC77C\uC774 \uC0DD\uC131\uB420 \uB2F9\uC2DC, \uC791\uC5C5 \uC124\uBA85\uC5D0 \uD3EC\uD568\uB41C \uC0C1\uD0DC \uAE30\uD638\uC640 \uC774\uB984\uC740 \uC815\uD655\uD588\uC2B5\uB2C8\uB2E4.",line3:"\uC0DD\uC131 \uD6C4 \uC608\uC2DC \uC791\uC5C5\uC744 \uC218\uC815\uD588\uB2E4\uBA74, \uC544\uB798 Tasks \uAC80\uC0C9\uC758 \uADF8\uB8F9 \uC81C\uBAA9\uC5D0\uC11C \uD604\uC7AC \uC0C1\uD0DC \uC720\uD615\uACFC \uC774\uB984\uC744 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",tip:{line1:"\uD301: \uBAA8\uB4E0 \uCCB4\uD06C\uBC15\uC2A4\uAC00 \uB611\uAC19\uC774 \uBCF4\uC778\uB2E4\uBA74\u2026",line2:"\uC77D\uAE30 \uBAA8\uB4DC(Reading Mode) \uB610\uB294 \uC2E4\uC2DC\uAC04 \uBBF8\uB9AC\uBCF4\uAE30(Live Preview)\uC5D0\uC11C \uBAA8\uB4E0 \uCCB4\uD06C\uBC15\uC2A4\uAC00 \uB3D9\uC77C\uD558\uAC8C \uBCF4\uC778\uB2E4\uBA74, [\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC \uC2A4\uD0C0\uC77C\uB9C1(Style custom statuses)]({{url}}) \uBB38\uC11C\uB97C \uCC38\uACE0\uD558\uC5EC \uC0C1\uD0DC\uC5D0 \uC2A4\uD0C0\uC77C\uC744 \uC801\uC6A9\uD560 \uD14C\uB9C8\uB098 CSS \uC2A4\uB2C8\uD3AB\uC744 \uC120\uD0DD\uD558\uC138\uC694."},title:"\uC608\uC2DC \uC791\uC5C5"},searchSampleTasks:{line1:"\uC774 Tasks \uAC80\uC0C9\uC740 \uC774 \uD30C\uC77C\uC758 \uBAA8\uB4E0 \uC791\uC5C5\uC744 \uC0C1\uD0DC \uC720\uD615\uACFC \uC774\uB984\uBCC4\uB85C \uADF8\uB8F9\uD654\uD558\uC5EC \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",title:"\uC608\uC2DC \uC791\uC5C5 \uAC80\uC0C9"},statusSettings:{comment:{line1:"\uD45C\uB97C \uBCF4\uB824\uBA74 \uC2E4\uC2DC\uAC04 \uBBF8\uB9AC\uBCF4\uAE30 \uB610\uB294 \uC77D\uAE30 \uBAA8\uB4DC\uB85C \uC804\uD658\uD558\uC138\uC694.",line2:"\uC0C1\uD0DC \uC774\uB984\uC5D0 '*'\uB098 '_'\uC640 \uAC19\uC740 \uB9C8\uD06C\uB2E4\uC6B4(Markdown) \uC11C\uC2DD \uBB38\uC790\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0,",line3:"Obsidian\uC740 \uC77D\uAE30 \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uD45C\uB97C \uC62C\uBC14\uB974\uAC8C \uB80C\uB354\uB9C1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},theseAreStatusValues:"\uCF54\uC5B4(Core) \uBC0F \uC0AC\uC6A9\uC790 \uC815\uC758(Custom) \uC0C1\uD0DC \uC139\uC158\uC758 \uC0C1\uD0DC \uAC12\uC785\uB2C8\uB2E4.",title:"\uC0C1\uD0DC \uC124\uC815"}}},settings:{autoSuggest:{heading:"\uC790\uB3D9 \uC81C\uC548",maxSuggestions:{description:"\uC790\uB3D9 \uC81C\uC548 \uBA54\uB274\uAC00 \uB098\uD0C0\uB0A0 \uB54C \uD45C\uC2DC\uD560 \uC81C\uC548\uC758 \uAC1C\uC218\uC785\uB2C8\uB2E4 ('\u23CE' \uC635\uC158 \uD3EC\uD568).",name:"\uC790\uB3D9 \uC81C\uC548 \uCD5C\uB300 \uD45C\uC2DC \uAC1C\uC218"},minLength:{description:"0\uBCF4\uB2E4 \uD070 \uAC12\uC774\uBA74, \uC9C0\uC6D0\uB418\uB294 \uD0A4\uC6CC\uB4DC\uC758 \uC2DC\uC791 \uBD80\uBD84\uC774 \uC778\uC2DD\uB420 \uB54C\uB9CC \uC790\uB3D9 \uC81C\uC548\uC774 \uC2E4\uD589\uB429\uB2C8\uB2E4.",name:"\uC790\uB3D9 \uC81C\uC548 \uCD5C\uC18C \uC77C\uCE58 \uAE38\uC774"},toggle:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC778\uC2DD\uB41C \uC791\uC5C5 \uC904\uC5D0\uC11C \uC785\uB825\uD558\uB294 \uB3D9\uC548 \uC9C0\uB2A5\uD615 \uC81C\uC548 \uBA54\uB274\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.",name:"\uC791\uC5C5 \uB0B4\uC6A9 \uC790\uB3D9 \uC81C\uC548"}},changeRequiresRestart:"\uC7AC\uC2DC\uC791\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.",dates:{cancelledDate:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC791\uC5C5\uC744 '\uCDE8\uC18C'\uB85C \uC804\uD658\uD560 \uB54C \uB9C8\uC9C0\uB9C9\uC5D0 \u274C YYYY-MM-DD \uD0C0\uC784\uC2A4\uD0EC\uD504\uAC00 \uCD94\uAC00\uB429\uB2C8\uB2E4.",name:"\uBAA8\uB4E0 \uCDE8\uC18C\uB41C \uC791\uC5C5\uC5D0 \uCDE8\uC18C \uB0A0\uC9DC \uC124\uC815"},createdDate:{description:"\uD65C\uC131\uD654\uD558\uBA74 '\uC791\uC5C5 \uC0DD\uC131/\uD3B8\uC9D1'\uC73C\uB85C \uC791\uC5C5\uC744 \uB9CC\uB4E4\uAC70\uB098 \uBC18\uBCF5 \uC791\uC5C5\uC744 \uC644\uB8CC\uD560 \uB54C, \uB2E4\uB978 \uB0A0\uC9DC \uAC12 \uC55E\uC5D0 \u2795 YYYY-MM-DD \uD0C0\uC784\uC2A4\uD0EC\uD504\uAC00 \uCD94\uAC00\uB429\uB2C8\uB2E4.",name:"\uBAA8\uB4E0 \uCD94\uAC00\uB41C \uC791\uC5C5\uC5D0 \uC0DD\uC131 \uB0A0\uC9DC \uC124\uC815"},doneDate:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC791\uC5C5\uC744 '\uC644\uB8CC'\uB85C \uC804\uD658\uD560 \uB54C \uB9C8\uC9C0\uB9C9\uC5D0 \u2705 YYYY-MM-DD \uD0C0\uC784\uC2A4\uD0EC\uD504\uAC00 \uCD94\uAC00\uB429\uB2C8\uB2E4.",name:"\uBAA8\uB4E0 \uC644\uB8CC\uB41C \uC791\uC5C5\uC5D0 \uC644\uB8CC \uB0A0\uC9DC \uC124\uC815"},heading:"\uB0A0\uC9DC"},datesFromFileNames:{heading:"\uD30C\uC77C\uBA85\uC5D0\uC11C \uB0A0\uC9DC \uC0AC\uC6A9",scheduledDate:{extraFormat:{description:{line1:"\uB0A0\uC9DC \uC5C6\uB294 \uC791\uC5C5\uC5D0 \uD30C\uC77C\uBA85\uC744 \uC608\uC815\uC77C(Scheduled)\uB85C \uC0AC\uC6A9\uD560 \uB54C Tasks\uAC00 \uC778\uC2DD\uD560 \uCD94\uAC00 \uB0A0\uC9DC \uD615\uC2DD\uC785\uB2C8\uB2E4.",line2:"\uAD6C\uBB38 \uCC38\uC870(Syntax Reference)"},name:"\uB0A0\uC9DC \uC5C6\uB294 \uC791\uC5C5\uC758 \uC608\uC815\uC77C\uB85C \uC0AC\uC6A9\uD560 \uCD94\uAC00 \uD30C\uC77C\uBA85 \uB0A0\uC9DC \uD615\uC2DD",placeholder:"\uC608: MMM DD YYYY"},folders:{description:"\uBAA8\uB4E0 \uACF3\uC5D0\uC11C \uAE30\uBCF8 \uC608\uC815\uC77C\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \uBE44\uC6CC \uB450\uACE0, \uD2B9\uC815 \uD3F4\uB354\uB9CC \uC9C0\uC815\uD558\uB824\uBA74 \uC27C\uD45C\uB85C \uAD6C\uBD84\uB41C \uD3F4\uB354 \uBAA9\uB85D\uC744 \uC785\uB825\uD558\uC138\uC694.",name:"\uAE30\uBCF8 \uC608\uC815\uC77C\uC744 \uC0AC\uC6A9\uD560 \uD3F4\uB354"},toggle:{description:{line1:"\uC608\uC815\uC77C(Scheduled, \u23F3) \uC785\uB825 \uC2DC\uAC04\uC744 \uC808\uC57D\uD558\uC138\uC694.",line2:"\uC774 \uC635\uC158\uC744 \uD65C\uC131\uD654\uD558\uBA74 \uB0A0\uC9DC \uC5C6\uB294 \uBAA8\uB4E0 \uC791\uC5C5\uC5D0 \uD30C\uC77C\uBA85\uC5D0\uC11C \uCD94\uCD9C\uD55C \uAE30\uBCF8 \uC608\uC815\uC77C\uC774 \uC124\uC815\uB429\uB2C8\uB2E4.",line3:"\uAE30\uBCF8\uC801\uC73C\uB85C Tasks\uB294 YYYY-MM-DD\uC640 YYYYMMDD \uB0A0\uC9DC \uD615\uC2DD\uC744 \uBAA8\uB450 \uC778\uC2DD\uD569\uB2C8\uB2E4.",line4:"\uB0A0\uC9DC \uC5C6\uB294 \uC791\uC5C5\uC740 \uB9C8\uAC10\uC77C(Due, \u{1F4C5}), \uC608\uC815\uC77C(Scheduled, \u23F3), \uC2DC\uC791\uC77C(Start, \u{1F6EB})\uC774 \uBAA8\uB450 \uC5C6\uB294 \uC791\uC5C5\uC744 \uC758\uBBF8\uD569\uB2C8\uB2E4."},name:"\uB0A0\uC9DC \uC5C6\uB294 \uC791\uC5C5\uC5D0 \uD30C\uC77C\uBA85\uC744 \uC608\uC815\uC77C\uB85C \uC0AC\uC6A9"}}},dialogs:{accessKeys:{description:"\uB300\uD654\uC0C1\uC790\uC758 \uB2E8\uCD95\uD0A4(\uC811\uADFC \uD0A4)\uAC00 \uC2DC\uC2A4\uD15C \uB2E8\uCD95\uD0A4\uB098 \uBCF4\uC870 \uAE30\uC220 \uAE30\uB2A5\uACFC \uCDA9\uB3CC\uD55C\uB2E4\uBA74, \uC5EC\uAE30\uC11C \uBE44\uD65C\uC131\uD654\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",name:"\uB300\uD654\uC0C1\uC790\uC5D0\uC11C \uC811\uADFC \uD0A4 \uC81C\uACF5"},heading:"\uB300\uD654\uC0C1\uC790"},format:{description:{line1:"Tasks\uAC00 \uC791\uC5C5\uC744 \uC77D\uACE0 \uC4F0\uB294 \uB370 \uC0AC\uC6A9\uD560 \uD615\uC2DD\uC785\uB2C8\uB2E4.",line2:"\uC911\uC694: \uD604\uC7AC Tasks\uB294 \uD55C \uBC88\uC5D0 \uD558\uB098\uC758 \uD615\uC2DD\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4. Dataview\uB97C \uC120\uD0DD\uD558\uBA74 Tasks\uC758 \uC774\uBAA8\uC9C0 \uD45C\uC2DD\uC744 \uC77D\uC9C0 \uBABB\uD569\uB2C8\uB2E4."},displayName:{dataview:"Dataview",tasksEmojiFormat:"Tasks \uC774\uBAA8\uC9C0 \uD615\uC2DD"},name:"\uC791\uC5C5 \uD615\uC2DD"},globalFilter:{filter:{description:{line1:"\uAD8C\uC7A5: \uBCF4\uAD00\uC18C\uC758 \uBAA8\uB4E0 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8 \uD56D\uBAA9\uC744 \uC791\uC5C5\uC73C\uB85C \uAD00\uB9AC\uD558\uB824\uBA74 \uBE44\uC6CC \uB450\uC138\uC694.",line2:'\uC77C\uBD80 "- [ ]" \uCCB4\uD06C\uB9AC\uC2A4\uD2B8\uB9CC Tasks\uAC00 \uCC98\uB9AC\uD558\uB3C4\uB85D \uD558\uB824\uBA74 \uC804\uC5ED \uD544\uD130\uB97C \uC0AC\uC6A9\uD558\uC138\uC694. \uC9C0\uC815\uD55C \uBB38\uC790\uC5F4\uC774 \uC124\uBA85\uC5D0 \uD3EC\uD568\uB41C \uD56D\uBAA9\uB9CC \uC791\uC5C5\uC73C\uB85C \uAC04\uC8FC\uB429\uB2C8\uB2E4.',line3:"\uC608: \uC804\uC5ED \uD544\uD130\uB97C #task\uB85C \uC124\uC815\uD558\uBA74 Tasks\uB294 #task\uAC00 \uD0DC\uADF8\uB41C \uD56D\uBAA9\uB9CC \uCC98\uB9AC\uD569\uB2C8\uB2E4.",line4:"\uADF8 \uC678 \uD56D\uBAA9\uC740 \uC77C\uBC18 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8\uB85C \uC720\uC9C0\uB418\uBA70, \uCFFC\uB9AC\uC5D0 \uD45C\uC2DC\uB418\uC9C0 \uC54A\uACE0 \uC644\uB8CC \uB0A0\uC9DC\uB3C4 \uC124\uC815\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},name:"\uC804\uC5ED \uD544\uD130",placeholder:"\uC608: #task \uB610\uB294 TODO"},heading:"\uC804\uC5ED \uC791\uC5C5 \uD544\uD130",removeFilter:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC791\uC5C5 \uD45C\uC2DC \uC2DC \uC124\uBA85\uC5D0\uC11C \uC804\uC5ED \uD544\uD130 \uBB38\uC790\uC5F4\uC744 \uC81C\uAC70\uD569\uB2C8\uB2E4.",name:"\uC124\uBA85\uC5D0\uC11C \uC804\uC5ED \uD544\uD130 \uC81C\uAC70"}},globalQuery:{heading:"\uC804\uC5ED \uCFFC\uB9AC",query:{description:"\uBCF4\uAD00\uC18C\uC758 \uBAA8\uB4E0 Tasks \uBE14\uB85D \uC2DC\uC791\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD3EC\uD568\uB418\uB294 \uCFFC\uB9AC\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uD544\uD130\uB098 \uB808\uC774\uC544\uC6C3 \uC635\uC158\uC744 \uCD94\uAC00\uD560 \uB54C \uC720\uC6A9\uD569\uB2C8\uB2E4.",placeholder:`\uC608\uC2DC... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:"\uC0C8 \uD504\uB9AC\uC14B \uCD94\uAC00"},line1:"\uC5EC\uAE30\uC11C \uC774\uB984 \uC788\uB294 \uC9C0\uCE68\uC744 \uC815\uC758\uD574 \uC5EC\uB7EC \uCFFC\uB9AC\uC5D0\uC11C \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. '{{name}}' \uD504\uB9AC\uC14B\uC740 Tasks \uCFFC\uB9AC\uC5D0\uC11C '{{instruction1}}' \uB610\uB294 '{{instruction2}}'\uB85C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",line2:"\uD504\uB9AC\uC14B\uC744 \uC218\uC815\uD558\uBA74 \uC5F4\uB824 \uC788\uB294 \uBAA8\uB4E0 Tasks \uCFFC\uB9AC\uAC00 \uC790\uB3D9\uC73C\uB85C \uC0C8\uB85C\uACE0\uCE68\uB429\uB2C8\uB2E4.",name:"\uD504\uB9AC\uC14B"},recurringTasks:{heading:"\uBC18\uBCF5 \uC791\uC5C5",nextLine:{description:"\uD65C\uC131\uD654\uD558\uBA74 \uC644\uB8CC\uB41C \uC791\uC5C5\uC758 \uBC14\uB85C \uC544\uB798 \uC904\uC5D0 \uB2E4\uC74C \uBC18\uBCF5\uC774 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. \uBE44\uD65C\uC131\uD654 \uC2DC \uB2E4\uC74C \uBC18\uBCF5\uC740 \uC644\uB8CC\uB41C \uC791\uC5C5 \uC55E\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",name:"\uB2E4\uC74C \uBC18\uBCF5\uC744 \uC544\uB798 \uC904\uC5D0 \uD45C\uC2DC"},removeScheduledDate:{description:{line1:"\uD65C\uC131\uD654\uD558\uBA74 \uC2DC\uC791\uC77C(\u{1F6EB})\uB610\uB294 \uB9C8\uAC10\uC77C(\u{1F4C5}) \uC911 \uD558\uB098\uB77C\uB3C4 \uC788\uC744 \uB54C, \uB2E4\uC74C \uBC18\uBCF5 \uC791\uC5C5\uC5D0\uB294 \uC608\uC815\uC77C(\u23F3)\uC744 \uC124\uC815\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",line2:"\uC2DC\uC791\uC77C\uACFC \uB9C8\uAC10\uC77C\uC740 \uB2E4\uC74C \uBC18\uBCF5\uC73C\uB85C \uB118\uAE30\uB418, \uC608\uC815\uC77C\uC740 \uCD94\uD6C4 \uC791\uC5C5 \uACC4\uD68D \uC2DC\uC810\uC5D0 \uC124\uC815\uD558\uB824\uB294 \uACBD\uC6B0\uC5D0 \uC720\uC6A9\uD569\uB2C8\uB2E4."},name:"\uBC18\uBCF5 \uC2DC \uC608\uC815\uC77C \uC81C\uAC70"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"\uBB38\uC11C \uBCF4\uAE30",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \uD14C\uB9C8",auraTheme:"Aura \uD14C\uB9C8",borderTheme:"Border \uD14C\uB9C8",buttons:{addCollection:{name:"{{themeName}}: \uC9C0\uC6D0\uB418\uB294 \uC0C1\uD0DC {{numberOfStatuses}}\uAC1C \uCD94\uAC00"}},ebullientworksTheme:"Ebullientworks \uD14C\uB9C8",itsThemeAndSlrvbCheckboxes:"ITS \uD14C\uB9C8 & SlRvb \uCCB4\uD06C\uBC15\uC2A4",lytModeTheme:"LYT Mode \uD14C\uB9C8 (\uB2E4\uD06C \uBAA8\uB4DC \uC804\uC6A9)",minimalTheme:"Minimal \uD14C\uB9C8",thingsTheme:"Things \uD14C\uB9C8"},coreStatuses:{buttons:{checkStatuses:{name:"\uC0C1\uD0DC \uAC80\uD1A0 \uBC0F \uD655\uC778",tooltip:"\uBCF4\uAD00\uC18C \uB8E8\uD2B8\uC5D0 \uD604\uC7AC \uC0C1\uD0DC \uC124\uC815\uC758 Mermaid \uB2E4\uC774\uC5B4\uADF8\uB7A8\uC744 \uD3EC\uD568\uD55C \uC0C8 \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4."}},description:{line1:"\uC774\uAC83\uB4E4\uC740 \uC0AC\uC6A9\uC790 \uC815\uC758 CSS\uB098 \uD14C\uB9C8 \uC5C6\uC774\uB3C4 Tasks\uAC00 \uC790\uCCB4\uC801\uC73C\uB85C \uC9C0\uC6D0\uD558\uB294 \uCF54\uC5B4 \uC0C1\uD0DC\uC785\uB2C8\uB2E4.",line2:"\uC544\uB798 \uC139\uC158\uC5D0\uC11C \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uC9C1\uC811 \uD3B8\uC9D1\uD558\uACE0 \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},heading:"\uCF54\uC5B4 \uC0C1\uD0DC"},customStatuses:{buttons:{addAllUnknown:{name:"\uC54C \uC218 \uC5C6\uB294 \uBAA8\uB4E0 \uC0C1\uD0DC \uC720\uD615 \uCD94\uAC00"},addNewStatus:{name:"\uC0C8 \uC791\uC5C5 \uC0C1\uD0DC \uCD94\uAC00"},resetCustomStatuses:{name:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uAE30\uBCF8\uAC12\uC73C\uB85C \uC7AC\uC124\uC815"}},description:{line1:"\uBA3C\uC800 CSS \uC2A4\uB2C8\uD3AB \uB610\uB294 \uD14C\uB9C8\uB97C \uC124\uCE58\uD558\uC5EC \uC0AC\uC6A9\uC790 \uC815\uC758 \uCCB4\uD06C\uBC15\uC2A4\uC5D0 \uC2A4\uD0C0\uC77C\uC744 \uC801\uC6A9\uD558\uC138\uC694.",line2:"\uADF8 \uB2E4\uC74C, \uC544\uB798 \uBC84\uD2BC\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC120\uD0DD\uD55C \uCCB4\uD06C\uBC15\uC2A4 \uC2A4\uD0C0\uC77C\uC5D0 \uB9DE\uCDB0 \uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC\uB97C \uC124\uC815\uD558\uC138\uC694.",line3:"\uCC38\uACE0: \uC774\uC804\uC5D0 \uC815\uC758\uB41C \uC0C1\uD0DC\uC640 \uAE30\uD638\uAC00 \uB3D9\uC77C\uD55C \uC0C1\uD0DC\uB294 \uBB34\uC2DC\uB429\uB2C8\uB2E4. '\uC791\uC5C5 \uC0DD\uC131/\uD3B8\uC9D1' \uBA85\uB839\uC5B4\uC758 \uC0C1\uD0DC \uB4DC\uB86D\uB2E4\uC6B4 \uBA54\uB274\uC5D0\uC11C \uC2E4\uC81C\uB85C \uB85C\uB4DC\uB41C \uC0C1\uD0DC\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",line4:"\uC2DC\uC791\uD558\uB824\uBA74 \uBB38\uC11C\uB97C \uCC38\uACE0\uD558\uC138\uC694!"},heading:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C1\uD0DC"},heading:"\uC791\uC5C5 \uC0C1\uD0DC"}}}});var nT,tT=K(()=>{nT={main:{loadingPlugin:"Carregando plugin: {{name}} v{{version}}",unloadingPlugin:"Descarregando plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"Se ativado, este status estar\xE1 dispon\xEDvel como um comando para que voc\xEA possa atribuir uma tecla de atalho e alternar o status usando-a.",name:"Dispon\xEDvel como comando"},editNextStatusSymbol:{description:"Quando clicado, este \xE9 o s\xEDmbolo que deve ser usado a seguir.",name:"Pr\xF3ximo S\xEDmbolo de Status da Tarefa"},editStatusName:{description:"Este \xE9 o nome amig\xE1vel do status da tarefa.",name:"Nome do Status da Tarefa"},editStatusSymbol:{description:"Este \xE9 o caractere entre os colchetes. (S\xF3 pode ser editado para status Personalizados, e n\xE3o para status Principais).",name:"S\xEDmbolo do Status da Tarefa"},editStatusType:{description:"Controla como o status se comporta em rela\xE7\xE3o a pesquisas e altern\xE2ncia.",name:"Tipo de Status da Tarefa"},fixErrorsBeforeSaving:"Corrija os erros antes de salvar."}},reports:{statusRegistry:{about:{createdBy:"Este arquivo foi criado pelo plugin Obsidian Tasks (vers\xE3o {{version}}) para ajudar a visualizar os status das tarefas neste cofre (vault).",deleteFileAnyTime:"Voc\xEA pode excluir este arquivo a qualquer momento.",title:"Sobre este arquivo",updateReport:{line1:"Se voc\xEA alterar as configura\xE7\xF5es de status do Tasks, poder\xE1 obter um relat\xF3rio atualizado:",line2:"Indo em `Configura\xE7\xF5es` -> `Tasks`.",line3:"Clicando em `Revisar e verificar seus Status`."}},columnHeadings:{nextStatusSymbol:"Pr\xF3ximo S\xEDmbolo de Status",problems:"Problemas (se houver)",statusName:"Nome do Status",statusSymbol:"S\xEDmbolo do Status",statusType:"Tipo de Status"},loadedSettings:{settingsActuallyUsed:"Estas s\xE3o as configura\xE7\xF5es que est\xE3o sendo realmente usadas pelo Tasks.",switchToLivePreview:"Mude para a Visualiza\xE7\xE3o Din\xE2mica (Live Preview) ou Modo de Leitura para ver o diagrama.",title:"Configura\xE7\xF5es Carregadas"},messages:{cannotFindNextStatus:"Falha inesperada ao encontrar o pr\xF3ximo status.",duplicateSymbol:"S\xEDmbolo duplicado '{{symbol}}': este status ser\xE1 ignorado.",emptySymbol:"S\xEDmbolo vazio: este status ser\xE1 ignorado.",nextSymbolUnknown:"O pr\xF3ximo s\xEDmbolo {{symbol}} \xE9 desconhecido: crie um status com o s\xEDmbolo {{symbol}}.",notConventionalType:"Para informa\xE7\xE3o, o tipo convencional para o s\xEDmbolo de status {{symbol}} \xE9 {{type}}: voc\xEA pode querer revisar este tipo.",wrongTypeAfterDone:{line1:"Este status `DONE` \xE9 seguido por {{nextType}}, n\xE3o `TODO` ou `IN_PROGRESS`.",line2:"Se for usado para concluir uma tarefa recorrente, ele ser\xE1 seguido por `TODO` ou `IN_PROGRESS`, para garantir que a pr\xF3xima tarefa corresponda ao filtro `not done`.",line3:"Consulte [Tarefas Recorrentes e Status Personalizados]({{helpURL}})."}},sampleTasks:{line1:"Aqui est\xE1 um exemplo de linha de tarefa para cada um dos status realmente usados pelo Tasks, para voc\xEA testar.",line2:"Os s\xEDmbolos e nomes de status nas descri\xE7\xF5es das tarefas estavam corretos quando este arquivo foi criado.",line3:"Se voc\xEA modificou as tarefas de exemplo desde que foram criadas, pode ver os tipos e nomes de status atuais nos cabe\xE7alhos de grupo na pesquisa do Tasks abaixo.",tip:{line1:"Dica: Se todas as suas caixas de sele\xE7\xE3o parecerem iguais...",line2:"Se todas as caixas de sele\xE7\xE3o (checkboxes) parecerem iguais no Modo de Leitura ou Visualiza\xE7\xE3o Din\xE2mica, consulte [Estilizar status personalizados]({{url}}) para saber como selecionar um tema ou snippet CSS para estilizar seus status."},title:"Tarefas de Exemplo"},searchSampleTasks:{line1:"Esta pesquisa do Tasks mostra todas as tarefas neste arquivo, agrupadas por tipo de status e nome do status.",title:"Pesquisar Tarefas de Exemplo"},statusSettings:{comment:{line1:"Mude para a Visualiza\xE7\xE3o Din\xE2mica (Live Preview) ou Modo de Leitura para ver a tabela.",line2:"Se houver algum caractere de formata\xE7\xE3o Markdown nos nomes de status, como '*' ou '_',",line3:"O Obsidian poder\xE1 renderizar a tabela corretamente apenas no Modo de Leitura."},theseAreStatusValues:"Estes s\xE3o os valores de status nas se\xE7\xF5es de status Principais e Personalizados.",title:"Configura\xE7\xF5es de Status"}}},settings:{autoSuggest:{heading:"Autocompletar",maxSuggestions:{description:'Quantas sugest\xF5es devem ser mostradas quando o menu de autocompletar aparecer (incluindo a op\xE7\xE3o "\u23CE").',name:"N\xFAmero m\xE1ximo de sugest\xF5es autom\xE1ticas para exibir"},minLength:{description:"Se for maior que 0, o autocompletar ser\xE1 acionado apenas quando o in\xEDcio de qualquer palavra-chave suportada for reconhecido.",name:"Tamanho m\xEDnimo de correspond\xEAncia para o autocompletar"},toggle:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o abrir\xE1 um menu de sugest\xE3o inteligente ao digitar dentro de uma linha de tarefa reconhecida.",name:"Autocompletar o conte\xFAdo da tarefa"}},changeRequiresRestart:"REQUER REINICIALIZA\xC7\xC3O.",dates:{cancelledDate:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o adicionar\xE1 um carimbo de data/hora \u274C YYYY-MM-DD no final quando uma tarefa for alternada para cancelada.",name:"Definir data de cancelamento em todas as tarefas canceladas"},createdDate:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o adicionar\xE1 um carimbo de data/hora \u2795 YYYY-MM-DD antes de outros valores de data, quando uma tarefa for criada com 'Criar ou editar tarefa', ou ao concluir uma tarefa recorrente.",name:"Definir data de cria\xE7\xE3o em cada tarefa adicionada"},doneDate:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o adicionar\xE1 um carimbo de data/hora \u2705 YYYY-MM-DD no final quando uma tarefa for alternada para conclu\xEDda.",name:"Definir data de conclus\xE3o em todas as tarefas conclu\xEDdas"},heading:"Datas"},datesFromFileNames:{heading:"Datas baseadas nos nomes dos arquivos",scheduledDate:{extraFormat:{description:{line1:"Um formato de data adicional que o plugin Tasks reconhecer\xE1 ao usar o nome do arquivo como a data Agendada para tarefas sem data.",line2:"Refer\xEAncia de Sintaxe"},name:"Formato adicional de data do nome do arquivo como data Agendada para tarefas sem data",placeholder:"exemplo: MMM DD YYYY"},folders:{description:"Deixe em branco se quiser usar as datas Agendadas padr\xE3o em todos os lugares, ou insira uma lista de pastas separada por v\xEDrgulas.",name:"Pastas com datas Agendadas padr\xE3o"},toggle:{description:{line1:"Economize tempo inserindo datas Agendadas (\u23F3).",line2:"Se esta op\xE7\xE3o for ativada, as tarefas sem data receber\xE3o uma data Agendada padr\xE3o extra\xEDda do nome do seu arquivo.",line3:"Por padr\xE3o, o plugin Tasks reconhecer\xE1 os formatos de data YYYY-MM-DD e YYYYMMDD.",line4:"Tarefas sem data n\xE3o possuem datas de Vencimento (\u{1F4C5}), Agendamento (\u23F3) e In\xEDcio (\u{1F6EB})."},name:"Usar nome do arquivo como data Agendada para tarefas sem data"}}},dialogs:{accessKeys:{description:"Se as teclas de acesso (atalhos de teclado) de v\xE1rios controles nas caixas de di\xE1logo entrarem em conflito com os atalhos de teclado do sistema ou com recursos de tecnologia assistiva importantes para voc\xEA, \xE9 poss\xEDvel desativ\xE1-los aqui.",name:"Fornecer teclas de acesso nas caixas de di\xE1logo"},heading:"Di\xE1logos"},format:{description:{line1:"O formato que o Tasks usa para ler e escrever tarefas.",line2:"Importante: Atualmente o Tasks suporta apenas um formato por vez. Selecionar o Dataview far\xE1 com que o Tasks pare de ler seus pr\xF3prios indicadores de emoji."},displayName:{dataview:"Dataview",tasksEmojiFormat:"Formato de Emoji do Tasks"},name:"Formato da Tarefa"},globalFilter:{filter:{description:{line1:"Recomendado: Deixe vazio se voc\xEA quiser que todos os itens de checklist no seu cofre (vault) sejam tarefas gerenciadas por este plugin.",line2:'Use um filtro global se quiser que o Tasks atue apenas sobre um subconjunto de seus itens de checklist "- [ ]", de forma que um item de checklist precise incluir a string especificada na sua descri\xE7\xE3o para ser considerado uma tarefa.',line3:"Por exemplo, se voc\xEA definir o filtro global como #task, o plugin Tasks s\xF3 manipular\xE1 os itens de checklist com a tag #task.",line4:"Outros itens continuar\xE3o sendo itens normais de checklist e n\xE3o aparecer\xE3o nas consultas nem receber\xE3o data de conclus\xE3o."},name:"Filtro global",placeholder:"ex. #task ou TODO"},heading:"Filtro global de tarefas",removeFilter:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o remover\xE1 a string que voc\xEA definiu como filtro global da descri\xE7\xE3o da tarefa ao exibi-la.",name:"Remover filtro global da descri\xE7\xE3o"}},globalQuery:{heading:"Consulta Global",query:{description:"Uma consulta que \xE9 inclu\xEDda automaticamente no in\xEDcio de cada bloco do Tasks no cofre. \xDAtil para adicionar filtros padr\xE3o ou op\xE7\xF5es de layout.",placeholder:`Por exemplo... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:"Adicionar nova predefini\xE7\xE3o"},line1:"Voc\xEA pode definir instru\xE7\xF5es nomeadas aqui, que podem ser reutilizadas em v\xE1rias consultas. Uma predefini\xE7\xE3o chamada '{{name}}' pode ser usada em consultas do Tasks com '{{instruction1}}' ou '{{instruction2}}'.",line2:"Quaisquer consultas do Tasks abertas s\xE3o recarregadas automaticamente quando as predefini\xE7\xF5es s\xE3o editadas.",name:"Predefini\xE7\xF5es (Presets)"},recurringTasks:{heading:"Tarefas recorrentes",nextLine:{description:"A ativa\xE7\xE3o desta op\xE7\xE3o far\xE1 com que a pr\xF3xima recorr\xEAncia de uma tarefa apare\xE7a na linha logo abaixo da tarefa conclu\xEDda. Caso contr\xE1rio, a pr\xF3xima recorr\xEAncia aparecer\xE1 antes da conclu\xEDda.",name:"A pr\xF3xima recorr\xEAncia aparece na linha de baixo"},removeScheduledDate:{description:{line1:"A ativa\xE7\xE3o desta op\xE7\xE3o far\xE1 com que a pr\xF3xima recorr\xEAncia de uma tarefa n\xE3o tenha data Agendada (\u23F3), quando pelo menos uma das datas de In\xEDcio (\u{1F6EB}) ou Vencimento (\u{1F4C5}) estiver presente.",line2:"Isto \xE9 \xFAtil para quando voc\xEA deseja que as datas de In\xEDcio e Vencimento sejam mantidas na pr\xF3xima recorr\xEAncia, mas pretende definir a data Agendada no futuro, quando for planejar trabalhar nela."},name:"Remover data agendada na recorr\xEAncia"}},searchResults:{heading:"Resultados da pesquisa",taskCountLocation:{description:"Escolha se a contagem de tarefas deve ser mostrada na parte superior ou inferior dos resultados da consulta.",name:"Localiza\xE7\xE3o da contagem de tarefas",options:{bottom:"Inferior",top:"Superior"}}},seeTheDocumentation:"Veja a documenta\xE7\xE3o",statuses:{collections:{anuppuccinTheme:"Tema AnuPpuccin",auraTheme:"Tema Aura",borderTheme:"Tema Border",buttons:{addCollection:{name:"{{themeName}}: Adicionar {{numberOfStatuses}} Status suportados"}},ebullientworksTheme:"Tema Ebullientworks",itsThemeAndSlrvbCheckboxes:"Tema ITS e Checkboxes SlRvb",lytModeTheme:"Tema LYT Mode (Somente modo escuro)",minimalTheme:"Tema Minimal",thingsTheme:"Tema Things"},coreStatuses:{buttons:{checkStatuses:{name:"Revisar e verificar seus Status",tooltip:"Criar um novo arquivo na raiz do cofre, contendo um diagrama Mermaid das configura\xE7\xF5es atuais de status."}},description:{line1:"Estes s\xE3o os status principais que o Tasks suporta nativamente, sem a necessidade de estilos CSS personalizados ou temas.",line2:"Voc\xEA pode adicionar e editar seus pr\xF3prios status personalizados na se\xE7\xE3o abaixo."},heading:"Status Principais"},customStatuses:{buttons:{addAllUnknown:{name:"Adicionar Todos os Tipos de Status Desconhecidos"},addNewStatus:{name:"Adicionar Novo Status de Tarefa"},resetCustomStatuses:{name:"Redefinir Tipos de Status Personalizados para os Padr\xF5es"}},description:{line1:"Primeiro, voc\xEA deve selecionar e instalar um Snippet CSS ou Tema para estilizar as caixas de sele\xE7\xE3o personalizadas.",line2:"Em seguida, use os bot\xF5es abaixo para configurar seus status personalizados, para que correspondam \xE0s caixas de sele\xE7\xE3o CSS escolhidas.",line3:"Nota: Qualquer status com o mesmo s\xEDmbolo de um status anterior ser\xE1 ignorado. Voc\xEA pode confirmar os status que foram realmente carregados executando o comando 'Criar ou editar tarefa' e olhando a lista suspensa de Status.",line4:"Veja a documenta\xE7\xE3o para come\xE7ar!"},heading:"Status Personalizados"},heading:"Status das Tarefas"}}}});var iT,rT=K(()=>{iT={main:{loadingPlugin:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0438\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u044B\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0438\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u0415\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u044D\u0442\u043E\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u0433\u043E\u0440\u044F\u0447\u0443\u044E \u043A\u043B\u0430\u0432\u0438\u0448\u0443 \u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0441 \u0435\u0435 \u043F\u043E\u043C\u043E\u0449\u044C\u044E.",name:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430"},editNextStatusSymbol:{description:"\u041F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u044D\u0442\u043E \u0441\u0438\u043C\u0432\u043E\u043B, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u043C.",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438"},editStatusName:{description:"\u042D\u0442\u043E \u043F\u043E\u043D\u044F\u0442\u043D\u043E\u0435 \u0438\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438.",name:"\u0418\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438"},editStatusSymbol:{description:"\u042D\u0442\u043E \u0441\u0438\u043C\u0432\u043E\u043B \u043C\u0435\u0436\u0434\u0443 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u043C\u0438 \u0441\u043A\u043E\u0431\u043A\u0430\u043C\u0438. (\u0415\u0433\u043E \u043C\u043E\u0436\u043D\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432, \u043D\u043E \u043D\u0435 \u0434\u043B\u044F \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0445.)",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438"},editStatusType:{description:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438.",name:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438"},fixErrorsBeforeSaving:"\u0418\u0441\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u043E\u0448\u0438\u0431\u043A\u0438 \u043F\u0435\u0440\u0435\u0434 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u042D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u0431\u044B\u043B \u0441\u043E\u0437\u0434\u0430\u043D \u043F\u043B\u0430\u0433\u0438\u043D\u043E\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0438\u044F {{version}}), \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043C\u043E\u0447\u044C \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0437\u0430\u0434\u0430\u0447 \u0432 \u044D\u0442\u043E\u043C \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435.",deleteFileAnyTime:"\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u0432 \u043B\u044E\u0431\u043E\u0435 \u0432\u0440\u0435\u043C\u044F.",title:"\u041E\u0431 \u044D\u0442\u043E\u043C \u0444\u0430\u0439\u043B\u0435",updateReport:{line1:"\u0415\u0441\u043B\u0438 \u0432\u044B \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 Tasks, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u043E\u0442\u0447\u0435\u0442, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F:",line2:"\u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 `Settings` -> `Tasks`.",line3:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043D\u0430 `Review and check your Statuses`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0430",problems:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B (\u0435\u0441\u043B\u0438 \u0435\u0441\u0442\u044C)",statusName:"\u0418\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430",statusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0430",statusType:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0430"},loadedSettings:{settingsActuallyUsed:"\u042D\u0442\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442\u0441\u044F Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u0441\u044C \u0432 \u0440\u0435\u0436\u0438\u043C Live Preview \u0438\u043B\u0438 Reading Mode, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0443.",title:"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438"},messages:{cannotFindNextStatus:"\u041D\u0435\u043E\u0436\u0438\u0434\u0430\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0430.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0438\u0440\u0443\u044E\u0449\u0438\u0439\u0441\u044F \u0441\u0438\u043C\u0432\u043E\u043B '{{symbol}}': \u044D\u0442\u043E\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435\u0442 \u043F\u0440\u043E\u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u043D.",emptySymbol:"\u041F\u0443\u0441\u0442\u043E\u0439 \u0441\u0438\u043C\u0432\u043E\u043B: \u044D\u0442\u043E\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435\u0442 \u043F\u0440\u043E\u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u043D.",nextSymbolUnknown:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B {{symbol}} \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D: \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u0441 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438, \u043E\u0431\u044B\u0447\u043D\u044B\u0439 \u0442\u0438\u043F \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 {{symbol}} - {{type}}: \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043E\u0442\u0435\u0442\u044C \u043F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u044D\u0442\u043E\u0442 \u0442\u0438\u043F.",wrongTypeAfterDone:{line1:"\u0417\u0430 \u044D\u0442\u0438\u043C \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u043C `DONE` \u0441\u043B\u0435\u0434\u0443\u0435\u0442 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0438\u043B\u0438 `IN_PROGRESS`.",line2:"\u0415\u0441\u043B\u0438 \u043E\u043D \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0435\u0439\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0438, \u0442\u043E \u0432\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0437\u0430 \u043D\u0438\u043C \u0431\u0443\u0434\u0435\u0442 \u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u044C `TODO` \u0438\u043B\u0438 `IN_PROGRESS`, \u0447\u0442\u043E\u0431\u044B \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u043B\u0430 \u0444\u0438\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`.",line3:"\u0421\u043C. [Recurring Tasks and Custom Statuses]({{helpURL}})."}},sampleTasks:{line1:"\u0412\u043E\u0442 \u043F\u043E \u043E\u0434\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0435-\u043F\u0440\u0438\u043C\u0435\u0440\u0443 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u043E\u0433\u043E \u043F\u043B\u0430\u0433\u0438\u043D\u043E\u043C, \u0447\u0442\u043E\u0431\u044B \u0432\u044B \u043C\u043E\u0433\u043B\u0438 \u043F\u043E\u044D\u043A\u0441\u043F\u0435\u0440\u0438\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C.",line2:"\u0421\u0438\u043C\u0432\u043E\u043B\u044B \u0438 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u0432 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F\u0445 \u0437\u0430\u0434\u0430\u0447 \u0431\u044B\u043B\u0438 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B \u043D\u0430 \u043C\u043E\u043C\u0435\u043D\u0442 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u044D\u0442\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430.",line3:"\u0415\u0441\u043B\u0438 \u0432\u044B \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438 \u043F\u0440\u0438\u043C\u0435\u0440\u044B \u0437\u0430\u0434\u0430\u0447 \u0441 \u043C\u043E\u043C\u0435\u043D\u0442\u0430 \u0438\u0445 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0438\u0435 \u0442\u0438\u043F\u044B \u0438 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u0432 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430\u0445 \u0433\u0440\u0443\u043F\u043F \u0432 \u043F\u043E\u0438\u0441\u043A\u0435 Tasks \u043D\u0438\u0436\u0435.",tip:{line1:"\u041F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0430: \u0415\u0441\u043B\u0438 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u044B \u0432\u044B\u0433\u043B\u044F\u0434\u044F\u0442 \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E...",line2:"\u0415\u0441\u043B\u0438 \u0432\u0441\u0435 \u0447\u0435\u043A\u0431\u043E\u043A\u0441\u044B \u0432\u044B\u0433\u043B\u044F\u0434\u044F\u0442 \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0447\u0442\u0435\u043D\u0438\u044F (Reading Mode) \u0438\u043B\u0438 \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 (Live Preview), \u0441\u043C. [\u0421\u0442\u0438\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432]({{url}}), \u0447\u0442\u043E\u0431\u044B \u0443\u0437\u043D\u0430\u0442\u044C, \u043A\u0430\u043A \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0442\u0435\u043C\u0443 \u0438\u043B\u0438 CSS-\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 (snippet) \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432."},title:"\u041F\u0440\u0438\u043C\u0435\u0440\u044B \u0417\u0430\u0434\u0430\u0447"},searchSampleTasks:{line1:"\u042D\u0442\u043E\u0442 \u043F\u043E\u0438\u0441\u043A Tasks \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u044D\u0442\u043E\u043C \u0444\u0430\u0439\u043B\u0435, \u0441\u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u043F\u043E \u0442\u0438\u043F\u0443 \u0438 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E \u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430.",title:"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043F\u0440\u0438\u043C\u0435\u0440\u0430\u043C \u0437\u0430\u0434\u0430\u0447"},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u0441\u044C \u0432 \u0440\u0435\u0436\u0438\u043C Live Preview \u0438\u043B\u0438 Reading Mode, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443.",line2:"\u0415\u0441\u043B\u0438 \u0432 \u0438\u043C\u0435\u043D\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u0435\u0441\u0442\u044C \u043A\u0430\u043A\u0438\u0435-\u043B\u0438\u0431\u043E \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F Markdown, \u0442\u0430\u043A\u0438\u0435 \u043A\u0430\u043A '*' \u0438\u043B\u0438 '_',",line3:"Obsidian \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 Reading Mode."},theseAreStatusValues:"\u042D\u0442\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0430\u0445 Core \u0438 Custom \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432.",title:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"}}},settings:{autoSuggest:{heading:"\u0410\u0432\u0442\u043E\u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438",maxSuggestions:{description:'\u0421\u043A\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u043F\u043E\u044F\u0432\u043B\u0435\u043D\u0438\u0438 \u043C\u0435\u043D\u044E \u0430\u0432\u0442\u043E\u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A (\u0432\u043A\u043B\u044E\u0447\u0430\u044F \u043E\u043F\u0446\u0438\u044E "\u23CE").',name:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0445 \u0430\u0432\u0442\u043E\u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A"},minLength:{description:"\u0415\u0441\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 0, \u0430\u0432\u0442\u043E\u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0433\u0434\u0430, \u043A\u043E\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E \u043D\u0430\u0447\u0430\u043B\u043E \u043B\u044E\u0431\u043E\u0433\u043E \u0438\u0437 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u043A\u043B\u044E\u0447\u0435\u0432\u044B\u0445 \u0441\u043B\u043E\u0432.",name:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A"},toggle:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u043E\u0442\u043A\u0440\u043E\u0435\u0442 \u0438\u043D\u0442\u0435\u043B\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432\u043D\u0443\u0442\u0440\u0438 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.",name:"\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043F\u0440\u0435\u0434\u043B\u0430\u0433\u0430\u0442\u044C \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0437\u0430\u0434\u0430\u0447\u0438"}},changeRequiresRestart:"\u041D\u0415\u041E\u0411\u0425\u041E\u0414\u0418\u041C\u0410 \u041F\u0415\u0420\u0415\u0417\u0410\u0413\u0420\u0423\u0417\u041A\u0410.",dates:{cancelledDate:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u0442 \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u274C YYYY-MM-DD \u0432 \u043A\u043E\u043D\u0446\u0435, \u043A\u043E\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0435\u0442\u0441\u044F \u0432 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u0443\u044E.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0434\u0430\u0442\u0443 \u043E\u0442\u043C\u0435\u043D\u044B \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0439 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438"},createdDate:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u0442 \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0435\u0434 \u0434\u0440\u0443\u0433\u0438\u043C\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F\u043C\u0438 \u0434\u0430\u0442\u044B, \u043A\u043E\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u043E\u0437\u0434\u0430\u0435\u0442\u0441\u044F \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E 'Create or edit task' \u0438\u043B\u0438 \u043F\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0435\u0439\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0438.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0434\u0430\u0442\u0443 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0439 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438"},doneDate:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u0442 \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u2705 YYYY-MM-DD \u0432 \u043A\u043E\u043D\u0446\u0435, \u043A\u043E\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0435\u0442\u0441\u044F \u0432 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u0443\u044E.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0434\u0430\u0442\u0443 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u043A\u0430\u0436\u0434\u043E\u0439 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438"},heading:"\u0414\u0430\u0442\u044B"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u044B \u0438\u0437 \u0438\u043C\u0435\u043D \u0444\u0430\u0439\u043B\u043E\u0432",scheduledDate:{extraFormat:{description:{line1:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043F\u043B\u0430\u0433\u0438\u043D Tasks \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0438 \u0438\u043C\u0435\u043D\u0438 \u0444\u0430\u0439\u043B\u0430 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B.",line2:"\u0421\u043F\u0440\u0430\u0432\u043A\u0430 \u043F\u043E \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0443"},name:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B \u0438\u0437 \u0438\u043C\u0435\u043D\u0438 \u0444\u0430\u0439\u043B\u0430 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B",placeholder:"\u043F\u0440\u0438\u043C\u0435\u0440: MMM DD YYYY"},folders:{description:"\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u0435\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0434\u0430\u0442\u044B \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0432\u0435\u0437\u0434\u0435, \u0438\u043B\u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0430\u043F\u043E\u043A \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043F\u044F\u0442\u0443\u044E.",name:"\u041F\u0430\u043F\u043A\u0438 \u0441 \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C\u0438 \u0434\u0430\u0442\u0430\u043C\u0438 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"},toggle:{description:{line1:"\u042D\u043A\u043E\u043D\u043E\u043C\u044C\u0442\u0435 \u0432\u0440\u0435\u043C\u044F \u043D\u0430 \u0432\u0432\u043E\u0434\u0435 \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 (\u23F3) \u0434\u0430\u0442.",line2:"\u0415\u0441\u043B\u0438 \u044D\u0442\u0430 \u043E\u043F\u0446\u0438\u044F \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430, \u0442\u043E \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u0430\u044F \u0434\u0430\u0442\u0430, \u0438\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u043D\u0430\u044F \u0438\u0437 \u0438\u043C\u0435\u043D\u0438 \u0444\u0430\u0439\u043B\u0430.",line3:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u043B\u0430\u0433\u0438\u043D Tasks \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0444\u043E\u0440\u043C\u0430\u0442\u044B \u0434\u0430\u0442 YYYY-MM-DD \u0438 YYYYMMDD.",line4:"\u0417\u0430\u0434\u0430\u0447\u0438 \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B \u043D\u0435 \u0438\u043C\u0435\u044E\u0442 \u0434\u0430\u0442 Due (\u{1F4C5} ), Scheduled (\u23F3) \u0438 Start (\u{1F6EB})."},name:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0438\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u043A\u0430\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u0443\u044E \u0434\u0430\u0442\u0443 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0434\u0430\u0442\u044B"}}},dialogs:{accessKeys:{description:"\u0415\u0441\u043B\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 (\u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448) \u0434\u043B\u044F \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0432 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0445 \u043E\u043A\u043D\u0430\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0443\u044E\u0442 \u0441 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u043C\u0438 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F\u043C\u0438 \u043A\u043B\u0430\u0432\u0438\u0448 \u0438\u043B\u0438 \u0444\u0443\u043D\u043A\u0446\u0438\u044F\u043C\u0438 \u0432\u0441\u043F\u043E\u043C\u043E\u0433\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438\u0439, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0432\u0430\u0436\u043D\u044B \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0445 \u0437\u0434\u0435\u0441\u044C.",name:"\u041F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u0432 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0445 \u043E\u043A\u043D\u0430\u0445"},heading:"\u0414\u0438\u0430\u043B\u043E\u0433\u0438"},format:{description:{line1:"\u0424\u043E\u0440\u043C\u0430\u0442, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 Tasks \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F \u0438 \u0437\u0430\u043F\u0438\u0441\u0438 \u0437\u0430\u0434\u0430\u0447.",line2:"\u0412\u0430\u0436\u043D\u043E: Tasks \u0432 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0434\u0438\u043D \u0444\u043E\u0440\u043C\u0430\u0442 \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E. \u0412\u044B\u0431\u043E\u0440 Dataview \u0432 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u043F\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043A \u0442\u043E\u043C\u0443, \u0447\u0442\u043E Tasks \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043D\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u044D\u043C\u043E\u0434\u0437\u0438."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u044D\u043C\u043E\u0434\u0437\u0438 Tasks"},name:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447"},globalFilter:{filter:{description:{line1:"\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F: \u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u0435\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0432\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0441\u043F\u0438\u0441\u043A\u0430 \u0432 \u0432\u0430\u0448\u0435\u043C \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435 \u0431\u044B\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0438, \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u044B\u043C\u0438 \u044D\u0442\u0438\u043C \u043F\u043B\u0430\u0433\u0438\u043D\u043E\u043C.",line2:'\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440, \u0435\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B Tasks \u0434\u0435\u0439\u0441\u0442\u0432\u043E\u0432\u0430\u043B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u043F\u043E\u0434\u043C\u043D\u043E\u0436\u0435\u0441\u0442\u0432\u043E \u0432\u0430\u0448\u0438\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430 "- [ ]", \u0442\u0430\u043A \u0447\u0442\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0441\u043F\u0438\u0441\u043A\u0430 \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u0432 \u0441\u0432\u043E\u0435\u043C \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0438, \u0447\u0442\u043E\u0431\u044B \u0441\u0447\u0438\u0442\u0430\u0442\u044C\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0435\u0439.',line3:"\u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0435\u0441\u043B\u0438 \u0432\u044B \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440 \u043D\u0430 #task, \u043F\u043B\u0430\u0433\u0438\u043D Tasks \u0431\u0443\u0434\u0435\u0442 \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0441\u043F\u0438\u0441\u043A\u0430, \u043F\u043E\u043C\u0435\u0447\u0435\u043D\u043D\u044B\u0435 \u0442\u0435\u0433\u043E\u043C #task.",line4:"\u0414\u0440\u0443\u0433\u0438\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0441\u043F\u0438\u0441\u043A\u0430 \u043E\u0441\u0442\u0430\u043D\u0443\u0442\u0441\u044F \u043E\u0431\u044B\u0447\u043D\u044B\u043C\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0441\u043F\u0438\u0441\u043A\u0430 \u0438 \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0432 \u0437\u0430\u043F\u0440\u043E\u0441\u0430\u0445 \u0438\u043B\u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u0443\u044E \u0434\u0430\u0442\u0443 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F."},name:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, #task \u0438\u043B\u0438 TODO"},heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u0443\u0434\u0430\u043B\u044F\u0435\u0442 \u0441\u0442\u0440\u043E\u043A\u0443, \u043A\u043E\u0442\u043E\u0440\u0443\u044E \u0432\u044B \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0438 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0430, \u0438\u0437 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u0437\u0430\u0434\u0430\u0447\u0438 \u043F\u0440\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.",name:"\u0423\u0434\u0430\u043B\u044F\u0442\u044C \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440 \u0438\u0437 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F"}},globalQuery:{heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441",query:{description:"\u0417\u0430\u043F\u0440\u043E\u0441, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0432\u043A\u043B\u044E\u0447\u0430\u0435\u0442\u0441\u044F \u0432 \u043D\u0430\u0447\u0430\u043B\u043E \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0430 Tasks \u0432 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0435. \u041F\u043E\u043B\u0435\u0437\u043D\u043E \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0438\u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0435\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0438",nextLine:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u043F\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043A \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412 \u043F\u0440\u043E\u0442\u0438\u0432\u043D\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439.",name:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C {{numberOfStatuses}} \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0438 \u0444\u043B\u0430\u0436\u043A\u0438 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u043E \u0442\u0435\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u0422\u0435\u043C\u0430 Minimal",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B \u0432 \u043A\u043E\u0440\u043D\u0435 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 Mermaid \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0443 \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432."}},description:{line1:"\u042D\u0442\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 Tasks \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E, \u0431\u0435\u0437 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 CSS \u0441\u0442\u0438\u043B\u0435\u0439 \u0438\u043B\u0438 \u0442\u0435\u043C.",line2:"\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \u043D\u0438\u0436\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u0442\u0438\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"},addNewStatus:{name:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438"},resetCustomStatuses:{name:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0442\u0438\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u043A \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F\u043C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"}},description:{line1:"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C CSS \u0441\u043D\u0438\u043F\u043F\u0435\u0442 \u0438\u043B\u0438 \u0442\u0435\u043C\u0443 \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0444\u043B\u0430\u0436\u043A\u043E\u0432.",line2:"\u0417\u0430\u0442\u0435\u043C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \u043D\u0438\u0436\u0435, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441\u0432\u043E\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438 CSS \u0444\u043B\u0430\u0436\u043A\u0430\u043C\u0438.",line3:"\u041F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0435. \u041B\u044E\u0431\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0441 \u0442\u0435\u043C \u0436\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C, \u0447\u0442\u043E \u0438 \u0443 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432, \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0432 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 '\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0438\u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443' \u0438 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0432 \u043D\u0430 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432.",line4:"\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0447\u0430\u0442\u044C!"},heading:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B \u0437\u0430\u0434\u0430\u0447"}}}});var aT,sT=K(()=>{aT={main:{loadingPlugin:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u0438\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u042F\u043A\u0449\u043E \u0432\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043E, \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u044F\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430, \u0449\u043E\u0431 \u0432\u0438 \u043C\u043E\u0433\u043B\u0438 \u043F\u0440\u0438\u0437\u043D\u0430\u0447\u0438\u0442\u0438 \u0433\u0430\u0440\u044F\u0447\u0443 \u043A\u043B\u0430\u0432\u0456\u0448\u0443 \u0442\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430 \u0457\u0457 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E.",name:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u044F\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430"},editNextStatusSymbol:{description:"\u0421\u0438\u043C\u0432\u043E\u043B, \u044F\u043A\u0438\u0439 \u043C\u0430\u0454 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u043C \u043F\u0440\u0438 \u043D\u0430\u0442\u0438\u0441\u043A\u0430\u043D\u043D\u0456.",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusName:{description:"\u0426\u0435 \u0437\u0440\u043E\u0437\u0443\u043C\u0456\u043B\u0430 \u043D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u041D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusSymbol:{description:"\u0426\u0435 \u0441\u0438\u043C\u0432\u043E\u043B \u043C\u0456\u0436 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u0438\u043C\u0438 \u0434\u0443\u0436\u043A\u0430\u043C\u0438. (\u0419\u043E\u0433\u043E \u043C\u043E\u0436\u043D\u0430 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043B\u0438\u0448\u0435 \u0434\u043B\u044F \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432, \u0430 \u043D\u0435 \u0434\u043B\u044F \u043E\u0441\u043D\u043E\u0432\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432.)",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusType:{description:"\u041A\u0435\u0440\u0443\u0439\u0442\u0435 \u0442\u0438\u043C, \u044F\u043A \u0441\u0442\u0430\u0442\u0443\u0441 \u043F\u043E\u0432\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u043F\u0456\u0434 \u0447\u0430\u0441 \u043F\u043E\u0448\u0443\u043A\u0443 \u0442\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u043D\u043D\u044F.",name:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},fixErrorsBeforeSaving:"\u0412\u0438\u043F\u0440\u0430\u0432\u0442\u0435 \u043F\u043E\u043C\u0438\u043B\u043A\u0438 \u043F\u0435\u0440\u0435\u0434 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043D\u043D\u044F\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u0426\u0435\u0439 \u0444\u0430\u0439\u043B \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043E \u043F\u043B\u0430\u0433\u0456\u043D\u043E\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0456\u044F {{version}}), \u0449\u043E\u0431 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u0442\u0438 \u0432\u0456\u0437\u0443\u0430\u043B\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u0434\u0430\u0447 \u0443 \u0446\u044C\u043E\u043C\u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456.",deleteFileAnyTime:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0446\u0435\u0439 \u0444\u0430\u0439\u043B \u0443 \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0439 \u0447\u0430\u0441.",title:"\u041F\u0440\u043E \u0446\u0435\u0439 \u0444\u0430\u0439\u043B",updateReport:{line1:"\u042F\u043A\u0449\u043E \u0432\u0438 \u0437\u043C\u0456\u043D\u0438\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 Tasks, \u0432\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043E\u0442\u0440\u0438\u043C\u0430\u0442\u0438 \u043E\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u0437\u0432\u0456\u0442, \u0432\u0438\u043A\u043E\u043D\u0430\u0432\u0448\u0438 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0456 \u0434\u0456\u0457:",line2:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0434\u043E `\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F` -> `Tasks`.",line3:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C `\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443",problems:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u0438 (\u044F\u043A\u0449\u043E \u0454)",statusName:"\u041D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusType:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443"},loadedSettings:{settingsActuallyUsed:"\u0426\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F, \u044F\u043A\u0456 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u044E\u0442\u044C\u0441\u044F Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0443 \u0440\u0435\u0436\u0438\u043C Live Preview \u0430\u0431\u043E \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u043D\u043D\u044F, \u0449\u043E\u0431 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443.",title:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F"},messages:{cannotFindNextStatus:"\u041D\u0435\u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u0430 \u043F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043F\u043E\u0448\u0443\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0456\u043A\u0430\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u0443 '{{symbol}}': \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E.",emptySymbol:"\u041F\u043E\u0440\u043E\u0436\u043D\u0456\u0439 \u0441\u0438\u043C\u0432\u043E\u043B: \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E.",nextSymbolUnknown:"\u041D\u0435\u0432\u0456\u0434\u043E\u043C\u0438\u0439 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B {{symbol}}: \u0441\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0456\u0437 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0456\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u0457, \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u0439 \u0442\u0438\u043F \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0443 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 {{symbol}} - {{type}}: \u043C\u043E\u0436\u043B\u0438\u0432\u043E, \u0432\u0438 \u0437\u0430\u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0446\u0435\u0439 \u0442\u0438\u043F.",wrongTypeAfterDone:{line1:"\u0417\u0430 \u0446\u0438\u043C \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u043C `DONE` \u0439\u0434\u0435 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0430\u0431\u043E `IN_PROGRESS`.",line2:"\u042F\u043A\u0449\u043E \u0439\u043E\u0433\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456, \u0437\u0430\u043C\u0456\u0441\u0442\u044C \u0446\u044C\u043E\u0433\u043E \u0437\u0430 \u043D\u0438\u043C \u0431\u0443\u0434\u0435 \u0441\u043B\u0456\u0434\u0443\u0432\u0430\u0442\u0438 `TODO` \u0430\u0431\u043E `IN_PROGRESS`, \u0449\u043E\u0431 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u043B\u0430 \u0444\u0456\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043E`.",line3:"\u0414\u0438\u0432. [\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456 \u0442\u0430 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438]({{helpURL}})."}},sampleTasks:{line1:"\u041E\u0441\u044C \u043F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u0443 \u0440\u044F\u0434\u043A\u0430 \u0437\u0430\u0432\u0434\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443, \u044F\u043A\u0438\u0439 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454\u0442\u044C\u0441\u044F \u0443 \u0437\u0430\u0432\u0434\u0430\u043D\u043D\u044F\u0445, \u0449\u043E\u0431 \u0432\u0438 \u043C\u043E\u0433\u043B\u0438 \u043F\u043E\u0435\u043A\u0441\u043F\u0435\u0440\u0438\u043C\u0435\u043D\u0442\u0443\u0432\u0430\u0442\u0438.",line2:"\u0421\u0438\u043C\u0432\u043E\u043B\u0438 \u0442\u0430 \u043D\u0430\u0437\u0432\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0432 \u043E\u043F\u0438\u0441\u0430\u0445 \u0437\u0430\u0432\u0434\u0430\u043D\u044C \u0431\u0443\u043B\u0438 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u043C\u0438 \u043D\u0430 \u043C\u043E\u043C\u0435\u043D\u0442 \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0443.",line3:"\u042F\u043A\u0449\u043E \u0432\u0438 \u0437\u043C\u0456\u043D\u0438\u043B\u0438 \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u0438 \u0437\u0430\u0432\u0434\u0430\u043D\u044C \u0437 \u043C\u043E\u043C\u0435\u043D\u0442\u0443 \u0457\u0445 \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F, \u0432\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u043F\u043E\u0442\u043E\u0447\u043D\u0456 \u0442\u0438\u043F\u0438 \u0442\u0430 \u043D\u0430\u0437\u0432\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0443 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430\u0445 \u0433\u0440\u0443\u043F \u0443 \u043F\u043E\u0448\u0443\u043A\u0443 Tasks \u043D\u0438\u0436\u0447\u0435.",tip:{line1:"\u041F\u043E\u0440\u0430\u0434\u0430: \u042F\u043A\u0449\u043E \u0432\u0441\u0456 \u0432\u0430\u0448\u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 \u0432\u0438\u0433\u043B\u044F\u0434\u0430\u044E\u0442\u044C \u043E\u0434\u043D\u0430\u043A\u043E\u0432\u043E...",line2:"\u042F\u043A\u0449\u043E \u0432\u0441\u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 \u0432\u0438\u0433\u043B\u044F\u0434\u0430\u044E\u0442\u044C \u043E\u0434\u043D\u0430\u043A\u043E\u0432\u043E \u0432 \u0440\u0435\u0436\u0438\u043C\u0456 \u0447\u0438\u0442\u0430\u043D\u043D\u044F \u0447\u0438 \u0456\u043D\u0442\u0435\u0440\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u0434\u0443 (Live Preview), \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u044C\u0442\u0435 [\u0421\u0442\u0438\u043B\u0456\u0437\u0430\u0446\u0456\u044F \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432]({{url}}), \u0449\u043E\u0431 \u0434\u0456\u0437\u043D\u0430\u0442\u0438\u0441\u044F, \u044F\u043A \u0432\u0438\u0431\u0440\u0430\u0442\u0438 \u0442\u0435\u043C\u0443 \u0447\u0438 CSS-\u0441\u043D\u0456\u043F\u0435\u0442 \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0456\u0437\u0430\u0446\u0456\u0457 \u0432\u0430\u0448\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432."},title:"\u041F\u0440\u0438\u043A\u043B\u0430\u0434\u0438 \u0437\u0430\u0432\u0434\u0430\u043D\u044C"},searchSampleTasks:{line1:"\u0426\u0435\u0439 \u043F\u043E\u0448\u0443\u043A Tasks \u043F\u043E\u043A\u0430\u0437\u0443\u0454 \u0432\u0441\u0456 \u0437\u0430\u0432\u0434\u0430\u043D\u043D\u044F \u0432 \u0446\u044C\u043E\u043C\u0443 \u0444\u0430\u0439\u043B\u0456, \u0437\u0433\u0440\u0443\u043F\u043E\u0432\u0430\u043D\u0456 \u0437\u0430 \u0442\u0438\u043F\u043E\u043C \u0442\u0430 \u043D\u0430\u0437\u0432\u043E\u044E \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",title:"\u041F\u043E\u0448\u0443\u043A \u0443 \u043F\u0440\u0438\u043A\u043B\u0430\u0434\u0430\u0445 \u0437\u0430\u0432\u0434\u0430\u043D\u044C"},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0443 \u0440\u0435\u0436\u0438\u043C Live Preview \u0430\u0431\u043E \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u043D\u043D\u044F, \u0449\u043E\u0431 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044E.",line2:"\u042F\u043A\u0449\u043E \u0432 \u043D\u0430\u0437\u0432\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0454 \u0441\u0438\u043C\u0432\u043E\u043B\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0443\u0432\u0430\u043D\u043D\u044F Markdown, \u043D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434 '*' \u0430\u0431\u043E '_',",line3:"Obsidian \u043C\u043E\u0436\u0435 \u043A\u043E\u0440\u0435\u043A\u0442\u043D\u043E \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044E \u043B\u0438\u0448\u0435 \u0432 \u0440\u0435\u0436\u0438\u043C\u0456 \u0447\u0438\u0442\u0430\u043D\u043D\u044F."},theseAreStatusValues:"\u0426\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0443 \u0440\u043E\u0437\u0434\u0456\u043B\u0430\u0445 \u043E\u0441\u043D\u043E\u0432\u043D\u0438\u0445 \u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432.",title:"\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}}},settings:{autoSuggest:{heading:"\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F",maxSuggestions:{description:'\u0421\u043A\u0456\u043B\u044C\u043A\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u043C\u0430\u0454 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u0441\u044F, \u043A\u043E\u043B\u0438 \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043C\u0435\u043D\u044E \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F (\u0432\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u0438 \u043E\u043F\u0446\u0456\u044E "\u23CE").',name:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430 \u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u0434\u043B\u044F \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},minLength:{description:"\u042F\u043A\u0449\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0431\u0456\u043B\u044C\u0448\u0435 0, \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F \u0431\u0443\u0434\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u0438\u0441\u044F \u043B\u0438\u0448\u0435 \u0442\u043E\u0434\u0456, \u043A\u043E\u043B\u0438 \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0454\u0442\u044C\u0441\u044F \u043F\u043E\u0447\u0430\u0442\u043E\u043A \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0445 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u043A\u043B\u044E\u0447\u043E\u0432\u0438\u0445 \u0441\u043B\u0456\u0432.",name:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0434\u043E\u0432\u0436\u0438\u043D\u0430 \u0437\u0431\u0456\u0433\u0443 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F"},toggle:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u0456\u0434\u043A\u0440\u0438\u0454 \u0456\u043D\u0442\u0435\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0432\u0435\u0434\u0435\u043D\u043D\u044F \u0442\u0435\u043A\u0441\u0442\u0443 \u0432\u0441\u0435\u0440\u0435\u0434\u0438\u043D\u0456 \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u043E\u0433\u043E \u0440\u044F\u0434\u043A\u0430 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F \u0432\u043C\u0456\u0441\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"}},changeRequiresRestart:"\u041F\u041E\u0422\u0420\u0406\u0411\u0423\u0404 \u041F\u0415\u0420\u0415\u0417\u0410\u041F\u0423\u0421\u041A\u0423.",dates:{cancelledDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u274C YYYY-MM-DD \u0432 \u043A\u0456\u043D\u0446\u0456, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0454\u0442\u044C\u0441\u044F \u0432 \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0439 \u0441\u0442\u0430\u043D.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0441\u043A\u0430\u0441\u0443\u0432\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},createdDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0435\u0434 \u0456\u043D\u0448\u0438\u043C\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\u043C\u0438 \u0434\u0430\u0442, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0432\u043E\u0440\u044E\u0454\u0442\u044C\u0441\u044F \u0437\u0430 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E '\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0430\u0431\u043E \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0443' \u0430\u0431\u043E \u0448\u043B\u044F\u0445\u043E\u043C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0434\u043E\u0434\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},doneDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u2705 YYYY-MM-DD \u0432 \u043A\u0456\u043D\u0446\u0456, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0454\u0442\u044C\u0441\u044F \u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u0438\u0439 \u0441\u0442\u0430\u043D.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},heading:"\u0414\u0430\u0442\u0438"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u0438 \u0437 \u043D\u0430\u0437\u0432 \u0444\u0430\u0439\u043B\u0456\u0432",scheduledDate:{extraFormat:{description:{line1:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u0438\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u0438, \u044F\u043A\u0438\u0439 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0432\u0430\u0442\u0438\u043C\u0435 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u043D\u044F \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438.",line2:"\u0414\u043E\u0432\u0456\u0434\u043A\u0430 \u0437 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0443"},name:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u0438\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u0438 \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0430 \u0434\u0430\u0442\u0430 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438",placeholder:"\u043F\u0440\u0438\u043A\u043B\u0430\u0434: MMM DD YYYY"},folders:{description:"\u0417\u0430\u043B\u0438\u0448\u0442\u0435 \u043F\u043E\u0440\u043E\u0436\u043D\u0456\u043C, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0456 \u0434\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0432\u0441\u044E\u0434\u0438, \u0430\u0431\u043E \u0432\u0432\u0435\u0434\u0456\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0430\u043F\u043E\u043A, \u0440\u043E\u0437\u0434\u0456\u043B\u0435\u043D\u0438\u0445 \u043A\u043E\u043C\u0430\u043C\u0438.",name:"\u041F\u0430\u043F\u043A\u0438 \u0437 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0438\u043C\u0438 \u0434\u0430\u0442\u0430\u043C\u0438 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"},toggle:{description:{line1:"\u0417\u0430\u043E\u0449\u0430\u0434\u0436\u0443\u0439\u0442\u0435 \u0447\u0430\u0441 \u043D\u0430 \u0432\u0432\u0435\u0434\u0435\u043D\u043D\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0438\u0445 (\u23F3) \u0434\u0430\u0442.",line2:"\u042F\u043A\u0449\u043E \u0446\u0435\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0443\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043E, \u0443\u0441\u0456\u043C \u0437\u0430\u0434\u0430\u0447\u0430\u043C \u0431\u0435\u0437 \u0434\u0430\u0442\u0438 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0454\u043D\u043E \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C, \u0432\u0438\u0442\u044F\u0433\u043D\u0443\u0442\u0443 \u0437 \u0457\u0445 \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443.",line3:"\u0417\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0432\u0430\u0442\u0438\u043C\u0435 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 \u0434\u0430\u0442 YYYY-MM-DD \u0456 YYYYMMDD.",line4:"\u0417\u0430\u0434\u0430\u0447\u0456 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438 \u043D\u0435 \u043C\u0430\u044E\u0442\u044C \u0434\u0430\u0442 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F (\u{1F4C5}), \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E\u0457 (\u23F3) \u0442\u0430 \u043F\u043E\u0447\u0430\u0442\u043A\u0443 (\u{1F6EB})."},name:"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u043D\u0430\u0437\u0432\u0443 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438"}}},dialogs:{accessKeys:{description:"\u042F\u043A\u0449\u043E \u043A\u043B\u0430\u0432\u0456\u0448\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u0443 (\u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u0457 \u043A\u043B\u0430\u0432\u0456\u0448) \u0434\u043B\u044F \u0440\u0456\u0437\u043D\u0438\u0445 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u043A\u0435\u0440\u0443\u0432\u0430\u043D\u043D\u044F \u0432 \u0434\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0438\u0445 \u0432\u0456\u043A\u043D\u0430\u0445 \u043A\u043E\u043D\u0444\u043B\u0456\u043A\u0442\u0443\u044E\u0442\u044C \u0456\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u0438\u043C\u0438 \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044F\u043C\u0438 \u043A\u043B\u0430\u0432\u0456\u0448 \u0430\u0431\u043E \u0444\u0443\u043D\u043A\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456\u0441\u0442\u044E \u0434\u043E\u043F\u043E\u043C\u0456\u0436\u043D\u0438\u0445 \u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0456\u0439, \u044F\u043A\u0456 \u0432\u0430\u0436\u043B\u0438\u0432\u0456 \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0445 \u0442\u0443\u0442.",name:"\u041D\u0430\u0434\u0430\u0432\u0430\u0442\u0438 \u043A\u043B\u0430\u0432\u0456\u0448\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u0432 \u0434\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0438\u0445 \u0432\u0456\u043A\u043D\u0430\u0445"},heading:"\u0414\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0456 \u0432\u0456\u043A\u043D\u0430"},format:{description:{line1:"\u0424\u043E\u0440\u043C\u0430\u0442, \u044F\u043A\u0438\u0439 Tasks \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454 \u0434\u043B\u044F \u0447\u0438\u0442\u0430\u043D\u043D\u044F \u0442\u0430 \u0437\u0430\u043F\u0438\u0441\u0443 \u0437\u0430\u0434\u0430\u0447.",line2:"\u0412\u0430\u0436\u043B\u0438\u0432\u043E: Tasks \u0437\u0430\u0440\u0430\u0437 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043B\u0438\u0448\u0435 \u043E\u0434\u0438\u043D \u0444\u043E\u0440\u043C\u0430\u0442 \u0437\u0430 \u0440\u0430\u0437. \u0412\u0438\u0431\u0456\u0440 Dataview \u043D\u0430\u0440\u0430\u0437\u0456 \u0437\u0443\u043F\u0438\u043D\u0438\u0442\u044C \u0447\u0438\u0442\u0430\u043D\u043D\u044F Tasks \u0432\u043B\u0430\u0441\u043D\u0438\u0445 \u0437\u043D\u0430\u043A\u0456\u0432 \u0435\u043C\u043E\u0434\u0437\u0456."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0435\u043C\u043E\u0434\u0437\u0456 Tasks"},name:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447"},globalFilter:{filter:{description:{line1:"\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u043E\u0432\u0430\u043D\u043E: \u0417\u0430\u043B\u0438\u0448\u0442\u0435 \u043F\u043E\u0440\u043E\u0436\u043D\u0456\u043C, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435, \u0449\u043E\u0431 \u0443\u0441\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0443 \u0432\u0430\u0448\u043E\u043C\u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456 \u0431\u0443\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0438, \u044F\u043A\u0438\u043C\u0438 \u043A\u0435\u0440\u0443\u0454 \u0446\u0435\u0439 \u043F\u043B\u0430\u0433\u0456\u043D.",line2:'\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0439\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435, \u0449\u043E\u0431 Tasks \u0434\u0456\u044F\u043B\u0438 \u043B\u0438\u0448\u0435 \u043D\u0430 \u043F\u0456\u0434\u043C\u043D\u043E\u0436\u0438\u043D\u0443 \u0432\u0430\u0448\u0438\u0445 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 "- [ ]", \u0449\u043E\u0431 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0432\u043A\u043B\u044E\u0447\u0430\u0432 \u0432 \u043E\u043F\u0438\u0441\u0456 \u0432\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A, \u0449\u043E\u0431 \u0432\u0432\u0430\u0436\u0430\u0442\u0438\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0435\u044E.',line3:"\u041D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434, \u044F\u043A\u0449\u043E \u0432\u0438 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u043D\u0430 #task, \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u043E\u0431\u0440\u043E\u0431\u043B\u044F\u0442\u0438\u043C\u0435 \u043B\u0438\u0448\u0435 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432, \u043F\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0456 \u0442\u0435\u0433\u043E\u043C #task.",line4:"\u0406\u043D\u0448\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0437\u0430\u043B\u0438\u0448\u0430\u0442\u044C\u0441\u044F \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u043C\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0456 \u043D\u0435 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u043C\u0443\u0442\u044C\u0441\u044F \u0432 \u0437\u0430\u043F\u0438\u0442\u0430\u0445 \u0430\u0431\u043E \u043D\u0435 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u044E\u0432\u0430\u0442\u0438\u043C\u0443\u0442\u044C \u0434\u0430\u0442\u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F."},name:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440. #task \u0430\u0431\u043E TODO"},heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u0438\u0434\u0430\u043B\u044F\u0454 \u0440\u044F\u0434\u043E\u043A, \u044F\u043A\u0438\u0439 \u0432\u0438 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0438 \u044F\u043A \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440, \u0437 \u043E\u043F\u0438\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u0437 \u043E\u043F\u0438\u0441\u0443"}},globalQuery:{heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u043F\u0438\u0442",query:{description:"\u0417\u0430\u043F\u0438\u0442, \u044F\u043A\u0438\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u043D\u043E \u0432\u043A\u043B\u044E\u0447\u0430\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u043E\u0447\u0430\u0442\u043A\u0443 \u043A\u043E\u0436\u043D\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0443 Tasks \u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456. \u041A\u043E\u0440\u0438\u0441\u043D\u043E \u0434\u043B\u044F \u0434\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u0444\u0456\u043B\u044C\u0442\u0440\u0456\u0432 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0430\u0431\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0456\u0432 \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:""},line1:"",line2:"",name:""},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456",nextLine:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0437\u043C\u0443\u0441\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456. \u0406\u043D\u0430\u043A\u0448\u0435 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u044E.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0434\u0430\u0442\u0438 {{numberOfStatuses}} \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u043B\u0438\u0448\u0435 \u0442\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0442\u0435\u043C\u0430",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438",tooltip:"\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u043D\u043E\u0432\u0438\u0439 \u0444\u0430\u0439\u043B \u0443 \u043A\u043E\u0440\u0435\u043D\u0456 \u0441\u0445\u043E\u0432\u0438\u0449\u0430, \u0449\u043E \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443 Mermaid \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0445 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0426\u0435 \u043E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u044F\u043A\u0456 Tasks \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043D\u0430\u0442\u0438\u0432\u043D\u043E, \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0438 \u0432 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u043E\u043C\u0443 CSS-\u0441\u0442\u0438\u043B\u044E\u0432\u0430\u043D\u043D\u0456 \u0447\u0438 \u0442\u0435\u043C\u0430\u0445.",line2:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438, \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u043D\u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432 \u0440\u043E\u0437\u0434\u0456\u043B\u0456 \u043D\u0438\u0436\u0447\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u0432\u0441\u0456 \u043D\u0435\u0432\u0456\u0434\u043E\u043C\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"},addNewStatus:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0456"},resetCustomStatuses:{name:"\u0421\u043A\u0438\u043D\u0443\u0442\u0438 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0434\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u044C \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"}},description:{line1:"\u0421\u043F\u043E\u0447\u0430\u0442\u043A\u0443 \u0441\u043B\u0456\u0434 \u0432\u0438\u0431\u0440\u0430\u0442\u0438 \u0442\u0430 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 CSS-\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0430\u0431\u043E \u0442\u0435\u043C\u0443 \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0456\u0437\u0430\u0446\u0456\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line2:"\u041F\u043E\u0442\u0456\u043C \u0441\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0439\u0442\u0435\u0441\u044F \u043A\u043D\u043E\u043F\u043A\u0430\u043C\u0438 \u043D\u0438\u0436\u0447\u0435, \u0449\u043E\u0431 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0441\u0432\u043E\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u043E \u0434\u043E \u0432\u0438\u0431\u0440\u0430\u043D\u0438\u0445 CSS-\u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line3:"\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0430 \u0411\u0443\u0434\u044C-\u044F\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437 \u0442\u0438\u043C \u0441\u0430\u043C\u0438\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C, \u0449\u043E \u0439 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E. \u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0432\u0438\u043A\u043E\u043D\u0430\u0432\u0448\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \xAB\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0430\u0431\u043E \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0442\u0430 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0432\u0448\u0438 \u0441\u043F\u0430\u0434\u043D\u0435 \u043C\u0435\u043D\u044E \xAB\u0421\u0442\u0430\u0442\u0443\u0441\xBB.",line4:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u044C\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E, \u0449\u043E\u0431 \u0440\u043E\u0437\u043F\u043E\u0447\u0430\u0442\u0438!"},heading:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u0434\u0430\u0447"}}}});var lT,oT=K(()=>{lT={main:{loadingPlugin:"\u0110ang t\u1EA3i plugin: {{name}} v{{version}}",unloadingPlugin:"\u0110ang g\u1EE1 plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"N\u1EBFu b\u1EADt, tr\u1EA1ng th\xE1i n\xE0y s\u1EBD kh\u1EA3 d\u1EE5ng d\u01B0\u1EDBi d\u1EA1ng l\u1EC7nh \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 g\xE1n ph\xEDm t\u1EAFt v\xE0 chuy\u1EC3n \u0111\u1ED5i tr\u1EA1ng th\xE1i b\u1EB1ng l\u1EC7nh \u0111\xF3.",name:"Kh\u1EA3 d\u1EE5ng d\u01B0\u1EDBi d\u1EA1ng l\u1EC7nh"},editNextStatusSymbol:{description:"Khi k\xEDch v\xE0o \u0111\xE2y l\xE0 k\xFD hi\u1EC7u s\u1EBD \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng ti\u1EBFp theo.",name:"K\xFD hi\u1EC7u tr\u1EA1ng th\xE1i ti\u1EBFp theo"},editStatusName:{description:"\u0110\xE2y l\xE0 t\xEAn th\xE2n thi\u1EC7n c\u1EE7a tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5.",name:"T\xEAn tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5"},editStatusSymbol:{description:"\u0110\xE2y l\xE0 k\xFD t\u1EF1 n\u1EB1m gi\u1EEFa d\u1EA5u ngo\u1EB7c vu\xF4ng. (Ch\u1EC9 c\xF3 th\u1EC3 ch\u1EC9nh s\u1EEDa cho tr\u1EA1ng th\xE1i T\xF9y ch\u1EC9nh, kh\xF4ng ph\u1EA3i tr\u1EA1ng th\xE1i C\u1ED1t l\xF5i.)",name:"K\xFD hi\u1EC7u tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5"},editStatusType:{description:"Ki\u1EC3m so\xE1t c\xE1ch tr\u1EA1ng th\xE1i ho\u1EA1t \u0111\u1ED9ng khi t\xECm ki\u1EBFm v\xE0 chuy\u1EC3n tr\u1EA1ng th\xE1i.",name:"Lo\u1EA1i tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5"},fixErrorsBeforeSaving:"Vui l\xF2ng s\u1EEDa l\u1ED7i tr\u01B0\u1EDBc khi l\u01B0u."}},reports:{statusRegistry:{about:{createdBy:"File n\xE0y \u0111\u01B0\u1EE3c t\u1EA1o b\u1EDFi plugin Obsidian Tasks (phi\xEAn b\u1EA3n {{version}}) \u0111\u1EC3 gi\xFAp tr\u1EF1c quan h\xF3a c\xE1c tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5 trong vault n\xE0y.",deleteFileAnyTime:"B\u1EA1n c\xF3 th\u1EC3 x\xF3a file n\xE0y b\u1EA5t c\u1EE9 l\xFAc n\xE0o.",title:"V\u1EC1 file n\xE0y",updateReport:{line1:"N\u1EBFu b\u1EA1n thay \u0111\u1ED5i c\xE0i \u0111\u1EB7t tr\u1EA1ng th\xE1i Tasks, b\u1EA1n c\xF3 th\u1EC3 nh\u1EADn b\xE1o c\xE1o c\u1EADp nh\u1EADt b\u1EB1ng c\xE1ch:",line2:"V\xE0o `C\xE0i \u0111\u1EB7t` -> `Tasks`.",line3:"Nh\u1EA5p v\xE0o `Xem x\xE9t v\xE0 ki\u1EC3m tra Tr\u1EA1ng th\xE1i c\u1EE7a b\u1EA1n`."}},columnHeadings:{nextStatusSymbol:"K\xFD hi\u1EC7u tr\u1EA1ng th\xE1i ti\u1EBFp theo",problems:"V\u1EA5n \u0111\u1EC1 (n\u1EBFu c\xF3)",statusName:"T\xEAn tr\u1EA1ng th\xE1i",statusSymbol:"K\xFD hi\u1EC7u tr\u1EA1ng th\xE1i",statusType:"Lo\u1EA1i tr\u1EA1ng th\xE1i"},loadedSettings:{settingsActuallyUsed:"\u0110\xE2y l\xE0 c\xE1c c\xE0i \u0111\u1EB7t th\u1EF1c s\u1EF1 \u0111\u01B0\u1EE3c Tasks s\u1EED d\u1EE5ng.",switchToLivePreview:"Chuy\u1EC3n sang Xem tr\u01B0\u1EDBc tr\u1EF1c ti\u1EBFp ho\u1EB7c Ch\u1EBF \u0111\u1ED9 \u0111\u1ECDc \u0111\u1EC3 xem s\u01A1 \u0111\u1ED3.",title:"C\xE0i \u0111\u1EB7t \u0111\xE3 t\u1EA3i"},messages:{cannotFindNextStatus:"L\u1ED7i kh\xF4ng mong mu\u1ED1n khi t\xECm tr\u1EA1ng th\xE1i ti\u1EBFp theo.",duplicateSymbol:"K\xFD hi\u1EC7u tr\xF9ng l\u1EB7p '{{symbol}}': tr\u1EA1ng th\xE1i n\xE0y s\u1EBD b\u1ECB b\u1ECF qua.",emptySymbol:"K\xFD hi\u1EC7u tr\u1ED1ng: tr\u1EA1ng th\xE1i n\xE0y s\u1EBD b\u1ECB b\u1ECF qua.",nextSymbolUnknown:"K\xFD hi\u1EC7u ti\u1EBFp theo {{symbol}} kh\xF4ng x\xE1c \u0111\u1ECBnh: h\xE3y t\u1EA1o tr\u1EA1ng th\xE1i v\u1EDBi k\xFD hi\u1EC7u {{symbol}}.",notConventionalType:"\u0110\u1EC3 bi\u1EBFt th\xEAm th\xF4ng tin, lo\u1EA1i th\xF4ng th\u01B0\u1EDDng cho k\xFD hi\u1EC7u tr\u1EA1ng th\xE1i {{symbol}} l\xE0 {{type}}: b\u1EA1n c\xF3 th\u1EC3 mu\u1ED1n xem x\xE9t l\u1EA1i lo\u1EA1i n\xE0y.",wrongTypeAfterDone:{line1:"Tr\u1EA1ng th\xE1i `DONE` n\xE0y \u0111\u01B0\u1EE3c theo sau b\u1EDFi {{nextType}}, kh\xF4ng ph\u1EA3i `TODO` ho\u1EB7c `IN_PROGRESS`.",line2:"N\u1EBFu \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 ho\xE0n th\xE0nh nhi\u1EC7m v\u1EE5 \u0111\u1ECBnh k\u1EF3, n\xF3 s\u1EBD \u0111\u01B0\u1EE3c theo sau b\u1EDFi `TODO` ho\u1EB7c `IN_PROGRESS`, \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o nhi\u1EC7m v\u1EE5 ti\u1EBFp theo kh\u1EDBp v\u1EDBi b\u1ED9 l\u1ECDc `ch\u01B0a ho\xE0n th\xE0nh`.",line3:"Xem [Nhi\u1EC7m v\u1EE5 \u0111\u1ECBnh k\u1EF3 v\xE0 Tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh]({{helpURL}})."}},sampleTasks:{line1:"\u0110\xE2y l\xE0 m\u1ED9t v\xED d\u1EE5 d\xF2ng nhi\u1EC7m v\u1EE5 cho m\u1ED7i tr\u1EA1ng th\xE1i th\u1EF1c s\u1EF1 \u0111\u01B0\u1EE3c tasks s\u1EED d\u1EE5ng, \u0111\u1EC3 b\u1EA1n th\u1EED nghi\u1EC7m.",line2:"C\xE1c k\xFD hi\u1EC7u v\xE0 t\xEAn tr\u1EA1ng th\xE1i trong m\xF4 t\u1EA3 nhi\u1EC7m v\u1EE5 l\xE0 ch\xEDnh x\xE1c khi file n\xE0y \u0111\u01B0\u1EE3c t\u1EA1o.",line3:"N\u1EBFu b\u1EA1n \u0111\xE3 s\u1EEDa \u0111\u1ED5i c\xE1c nhi\u1EC7m v\u1EE5 m\u1EABu k\u1EC3 t\u1EEB khi ch\xFAng \u0111\u01B0\u1EE3c t\u1EA1o, b\u1EA1n c\xF3 th\u1EC3 xem c\xE1c lo\u1EA1i v\xE0 t\xEAn tr\u1EA1ng th\xE1i hi\u1EC7n t\u1EA1i trong ti\xEAu \u0111\u1EC1 nh\xF3m trong t\xECm ki\u1EBFm Tasks b\xEAn d\u01B0\u1EDBi.",tip:{line1:"M\u1EB9o: N\u1EBFu t\u1EA5t c\u1EA3 c\xE1c \xF4 \u0111\xE1nh d\u1EA5u c\u1EE7a b\u1EA1n tr\xF4ng gi\u1ED1ng nhau...",line2:"N\u1EBFu t\u1EA5t c\u1EA3 c\xE1c \xF4 \u0111\xE1nh d\u1EA5u tr\xF4ng gi\u1ED1ng nhau trong Ch\u1EBF \u0111\u1ED9 \u0111\u1ECDc ho\u1EB7c Xem tr\u01B0\u1EDBc tr\u1EF1c ti\u1EBFp, xem [T\u1EA1o ki\u1EC3u tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh]({{url}}) \u0111\u1EC3 bi\u1EBFt c\xE1ch ch\u1ECDn theme ho\u1EB7c CSS snippet \u0111\u1EC3 t\u1EA1o ki\u1EC3u cho tr\u1EA1ng th\xE1i c\u1EE7a b\u1EA1n."},title:"Nhi\u1EC7m v\u1EE5 m\u1EABu"},searchSampleTasks:{line1:"T\xECm ki\u1EBFm Tasks n\xE0y hi\u1EC3n th\u1ECB t\u1EA5t c\u1EA3 c\xE1c nhi\u1EC7m v\u1EE5 trong file n\xE0y, \u0111\u01B0\u1EE3c nh\xF3m theo lo\u1EA1i tr\u1EA1ng th\xE1i v\xE0 t\xEAn tr\u1EA1ng th\xE1i.",title:"T\xECm ki\u1EBFm nhi\u1EC7m v\u1EE5 m\u1EABu"},statusSettings:{comment:{line1:"Chuy\u1EC3n sang Xem tr\u01B0\u1EDBc tr\u1EF1c ti\u1EBFp ho\u1EB7c Ch\u1EBF \u0111\u1ED9 \u0111\u1ECDc \u0111\u1EC3 xem b\u1EA3ng.",line2:"N\u1EBFu c\xF3 b\u1EA5t k\u1EF3 k\xFD t\u1EF1 \u0111\u1ECBnh d\u1EA1ng Markdown n\xE0o trong t\xEAn tr\u1EA1ng th\xE1i, ch\u1EB3ng h\u1EA1n nh\u01B0 '*' ho\u1EB7c '_',",line3:"Obsidian c\xF3 th\u1EC3 ch\u1EC9 hi\u1EC3n th\u1ECB b\u1EA3ng ch\xEDnh x\xE1c trong Ch\u1EBF \u0111\u1ED9 \u0111\u1ECDc."},theseAreStatusValues:"\u0110\xE2y l\xE0 c\xE1c gi\xE1 tr\u1ECB tr\u1EA1ng th\xE1i trong ph\u1EA7n tr\u1EA1ng th\xE1i C\u1ED1t l\xF5i v\xE0 T\xF9y ch\u1EC9nh.",title:"C\xE0i \u0111\u1EB7t tr\u1EA1ng th\xE1i"}}},settings:{autoSuggest:{heading:"G\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng",maxSuggestions:{description:'S\u1ED1 l\u01B0\u1EE3ng g\u1EE3i \xFD s\u1EBD \u0111\u01B0\u1EE3c hi\u1EC3n th\u1ECB khi menu g\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng xu\u1EA5t hi\u1EC7n (bao g\u1ED3m t\xF9y ch\u1ECDn "\u23CE").',name:"S\u1ED1 l\u01B0\u1EE3ng g\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng t\u1ED1i \u0111a \u0111\u1EC3 hi\u1EC3n th\u1ECB"},minLength:{description:"N\u1EBFu cao h\u01A1n 0, g\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng s\u1EBD ch\u1EC9 \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t khi ph\u1EA7n \u0111\u1EA7u c\u1EE7a b\u1EA5t k\u1EF3 t\u1EEB kh\xF3a \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 n\xE0o \u0111\u01B0\u1EE3c nh\u1EADn ra.",name:"\u0110\u1ED9 d\xE0i kh\u1EDBp t\u1ED1i thi\u1EC3u cho g\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng"},toggle:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD m\u1EDF menu g\u1EE3i \xFD th\xF4ng minh khi g\xF5 b\xEAn trong d\xF2ng nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng.",name:"G\u1EE3i \xFD t\u1EF1 \u0111\u1ED9ng n\u1ED9i dung nhi\u1EC7m v\u1EE5"}},changeRequiresRestart:"Y\xCAU C\u1EA6U KH\u1EDEI \u0110\u1ED8NG L\u1EA0I.",dates:{cancelledDate:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD th\xEAm d\u1EA5u th\u1EDDi gian \u274C YYYY-MM-DD v\xE0o cu\u1ED1i khi nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c chuy\u1EC3n sang b\u1ECB h\u1EE7y.",name:"\u0110\u1EB7t ng\xE0y h\u1EE7y cho m\u1ECDi nhi\u1EC7m v\u1EE5 b\u1ECB h\u1EE7y"},createdDate:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD th\xEAm d\u1EA5u th\u1EDDi gian \u2795 YYYY-MM-DD tr\u01B0\u1EDBc c\xE1c gi\xE1 tr\u1ECB ng\xE0y kh\xE1c, khi nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c t\u1EA1o b\u1EB1ng 'T\u1EA1o ho\u1EB7c ch\u1EC9nh s\u1EEDa nhi\u1EC7m v\u1EE5', ho\u1EB7c b\u1EB1ng c\xE1ch ho\xE0n th\xE0nh nhi\u1EC7m v\u1EE5 \u0111\u1ECBnh k\u1EF3.",name:"\u0110\u1EB7t ng\xE0y t\u1EA1o cho m\u1ECDi nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c th\xEAm"},doneDate:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD th\xEAm d\u1EA5u th\u1EDDi gian \u2705 YYYY-MM-DD v\xE0o cu\u1ED1i khi nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c chuy\u1EC3n sang ho\xE0n th\xE0nh.",name:"\u0110\u1EB7t ng\xE0y ho\xE0n th\xE0nh cho m\u1ECDi nhi\u1EC7m v\u1EE5 \u0111\xE3 ho\xE0n th\xE0nh"},heading:"Ng\xE0y th\xE1ng"},datesFromFileNames:{heading:"Ng\xE0y t\u1EEB t\xEAn file",scheduledDate:{extraFormat:{description:{line1:"\u0110\u1ECBnh d\u1EA1ng ng\xE0y b\u1ED5 sung m\xE0 plugin Tasks s\u1EBD nh\u1EADn d\u1EA1ng khi s\u1EED d\u1EE5ng t\xEAn file l\xE0m ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch cho c\xE1c nhi\u1EC7m v\u1EE5 ch\u01B0a c\xF3 ng\xE0y.",line2:"Tham kh\u1EA3o c\xFA ph\xE1p"},name:"\u0110\u1ECBnh d\u1EA1ng ng\xE0y t\xEAn file b\u1ED5 sung l\xE0m ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch cho nhi\u1EC7m v\u1EE5 ch\u01B0a c\xF3 ng\xE0y",placeholder:"v\xED d\u1EE5: MMM DD YYYY"},folders:{description:"\u0110\u1EC3 tr\u1ED1ng n\u1EBFu b\u1EA1n mu\u1ED1n s\u1EED d\u1EE5ng ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch m\u1EB7c \u0111\u1ECBnh \u1EDF m\u1ECDi n\u01A1i, ho\u1EB7c nh\u1EADp danh s\xE1ch c\xE1c th\u01B0 m\u1EE5c \u0111\u01B0\u1EE3c ph\xE2n t\xE1ch b\u1EB1ng d\u1EA5u ph\u1EA9y.",name:"Th\u01B0 m\u1EE5c c\xF3 ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch m\u1EB7c \u0111\u1ECBnh"},toggle:{description:{line1:"Ti\u1EBFt ki\u1EC7m th\u1EDDi gian nh\u1EADp ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch (\u23F3).",line2:"N\u1EBFu t\xF9y ch\u1ECDn n\xE0y \u0111\u01B0\u1EE3c b\u1EADt, b\u1EA5t k\u1EF3 nhi\u1EC7m v\u1EE5 n\xE0o ch\u01B0a c\xF3 ng\xE0y s\u1EBD \u0111\u01B0\u1EE3c cung c\u1EA5p ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch m\u1EB7c \u0111\u1ECBnh \u0111\u01B0\u1EE3c tr\xEDch xu\u1EA5t t\u1EEB t\xEAn file c\u1EE7a ch\xFAng.",line3:"Theo m\u1EB7c \u0111\u1ECBnh, plugin Tasks s\u1EBD kh\u1EDBp c\u1EA3 \u0111\u1ECBnh d\u1EA1ng ng\xE0y YYYY-MM-DD v\xE0 YYYYMMDD.",line4:"Nhi\u1EC7m v\u1EE5 ch\u01B0a c\xF3 ng\xE0y kh\xF4ng c\xF3 b\u1EA5t k\u1EF3 ng\xE0y n\xE0o trong s\u1ED1 \u0110\u1EBFn h\u1EA1n (\u{1F4C5}), \u0110\xE3 l\xEAn l\u1ECBch (\u23F3) v\xE0 B\u1EAFt \u0111\u1EA7u (\u{1F6EB})."},name:"S\u1EED d\u1EE5ng t\xEAn file l\xE0m ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch cho nhi\u1EC7m v\u1EE5 ch\u01B0a c\xF3 ng\xE0y"}}},dialogs:{accessKeys:{description:"N\u1EBFu c\xE1c ph\xEDm truy c\u1EADp (ph\xEDm t\u1EAFt) cho c\xE1c \u0111i\u1EC1u khi\u1EC3n kh\xE1c nhau trong h\u1ED9p tho\u1EA1i xung \u0111\u1ED9t v\u1EDBi ph\xEDm t\u1EAFt h\u1EC7 th\u1ED1ng ho\u1EB7c ch\u1EE9c n\u0103ng c\xF4ng ngh\u1EC7 h\u1ED7 tr\u1EE3 quan tr\u1ECDng \u0111\u1ED1i v\u1EDBi b\u1EA1n, b\u1EA1n c\xF3 th\u1EC3 v\xF4 hi\u1EC7u h\xF3a ch\xFAng t\u1EA1i \u0111\xE2y.",name:"Cung c\u1EA5p ph\xEDm truy c\u1EADp trong h\u1ED9p tho\u1EA1i"},heading:"H\u1ED9p tho\u1EA1i"},format:{description:{line1:"\u0110\u1ECBnh d\u1EA1ng m\xE0 Tasks s\u1EED d\u1EE5ng \u0111\u1EC3 \u0111\u1ECDc v\xE0 vi\u1EBFt nhi\u1EC7m v\u1EE5.",line2:"Quan tr\u1ECDng: Tasks hi\u1EC7n ch\u1EC9 h\u1ED7 tr\u1EE3 m\u1ED9t \u0111\u1ECBnh d\u1EA1ng t\u1EA1i m\u1ED9t th\u1EDDi \u0111i\u1EC3m. Ch\u1ECDn Dataview hi\u1EC7n s\u1EBD ng\u1EEBng Tasks \u0111\u1ECDc c\xE1c k\xFD hi\u1EC7u emoji ri\xEAng c\u1EE7a n\xF3."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0110\u1ECBnh d\u1EA1ng Emoji c\u1EE7a Tasks"},name:"\u0110\u1ECBnh d\u1EA1ng nhi\u1EC7m v\u1EE5"},globalFilter:{filter:{description:{line1:"Khuy\u1EBFn ngh\u1ECB: \u0110\u1EC3 tr\u1ED1ng n\u1EBFu b\u1EA1n mu\u1ED1n t\u1EA5t c\u1EA3 c\xE1c m\u1EE5c danh s\xE1ch ki\u1EC3m tra trong vault c\u1EE7a b\u1EA1n l\xE0 nhi\u1EC7m v\u1EE5 \u0111\u01B0\u1EE3c qu\u1EA3n l\xFD b\u1EDFi plugin n\xE0y.",line2:'S\u1EED d\u1EE5ng b\u1ED9 l\u1ECDc to\xE0n c\u1EE5c n\u1EBFu b\u1EA1n mu\u1ED1n Tasks ch\u1EC9 ho\u1EA1t \u0111\u1ED9ng tr\xEAn m\u1ED9t t\u1EADp h\u1EE3p con c\xE1c m\u1EE5c danh s\xE1ch ki\u1EC3m tra "- [ ]" c\u1EE7a b\u1EA1n, \u0111\u1EC3 m\u1ED9t m\u1EE5c danh s\xE1ch ki\u1EC3m tra ph\u1EA3i bao g\u1ED3m chu\u1ED7i \u0111\u01B0\u1EE3c ch\u1EC9 \u0111\u1ECBnh trong m\xF4 t\u1EA3 c\u1EE7a n\xF3 \u0111\u1EC3 \u0111\u01B0\u1EE3c coi l\xE0 m\u1ED9t nhi\u1EC7m v\u1EE5.',line3:"V\xED d\u1EE5: n\u1EBFu b\u1EA1n \u0111\u1EB7t b\u1ED9 l\u1ECDc to\xE0n c\u1EE5c th\xE0nh #task, plugin Tasks s\u1EBD ch\u1EC9 x\u1EED l\xFD c\xE1c m\u1EE5c danh s\xE1ch ki\u1EC3m tra \u0111\u01B0\u1EE3c g\u1EAFn th\u1EBB #task.",line4:"C\xE1c m\u1EE5c danh s\xE1ch ki\u1EC3m tra kh\xE1c s\u1EBD v\u1EABn l\xE0 m\u1EE5c danh s\xE1ch ki\u1EC3m tra b\xECnh th\u01B0\u1EDDng v\xE0 kh\xF4ng xu\u1EA5t hi\u1EC7n trong truy v\u1EA5n ho\u1EB7c \u0111\u01B0\u1EE3c \u0111\u1EB7t ng\xE0y ho\xE0n th\xE0nh."},name:"B\u1ED9 l\u1ECDc to\xE0n c\u1EE5c",placeholder:"v\xED d\u1EE5: #task ho\u1EB7c TODO"},heading:"B\u1ED9 l\u1ECDc nhi\u1EC7m v\u1EE5 to\xE0n c\u1EE5c",removeFilter:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD x\xF3a chu\u1ED7i m\xE0 b\u1EA1n \u0111\u1EB7t l\xE0m b\u1ED9 l\u1ECDc to\xE0n c\u1EE5c kh\u1ECFi m\xF4 t\u1EA3 nhi\u1EC7m v\u1EE5 khi hi\u1EC3n th\u1ECB nhi\u1EC7m v\u1EE5.",name:"X\xF3a b\u1ED9 l\u1ECDc to\xE0n c\u1EE5c kh\u1ECFi m\xF4 t\u1EA3"}},globalQuery:{heading:"Truy v\u1EA5n to\xE0n c\u1EE5c",query:{description:"M\u1ED9t truy v\u1EA5n \u0111\u01B0\u1EE3c t\u1EF1 \u0111\u1ED9ng bao g\u1ED3m \u1EDF \u0111\u1EA7u m\u1ED7i kh\u1ED1i Tasks trong vault. H\u1EEFu \xEDch \u0111\u1EC3 th\xEAm b\u1ED9 l\u1ECDc m\u1EB7c \u0111\u1ECBnh ho\u1EB7c t\xF9y ch\u1ECDn b\u1ED1 c\u1EE5c.",placeholder:`V\xED d\u1EE5... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:"Th\xEAm preset m\u1EDBi"},line1:"B\u1EA1n c\xF3 th\u1EC3 \u0111\u1ECBnh ngh\u0129a c\xE1c h\u01B0\u1EDBng d\u1EABn \u0111\u01B0\u1EE3c \u0111\u1EB7t t\xEAn \u1EDF \u0111\xE2y, m\xE0 b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng l\u1EA1i trong nhi\u1EC1u truy v\u1EA5n. M\u1ED9t preset c\xF3 t\xEAn '{{name}}' c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng trong truy v\u1EA5n Tasks v\u1EDBi '{{instruction1}}' ho\u1EB7c '{{instruction2}}'.",line2:"B\u1EA5t k\u1EF3 truy v\u1EA5n Tasks n\xE0o \u0111ang m\u1EDF s\u1EBD \u0111\u01B0\u1EE3c t\u1EA3i l\u1EA1i t\u1EF1 \u0111\u1ED9ng khi c\xE1c preset \u0111\u01B0\u1EE3c ch\u1EC9nh s\u1EEDa.",name:"Preset"},recurringTasks:{heading:"Nhi\u1EC7m v\u1EE5 \u0111\u1ECBnh k\u1EF3",nextLine:{description:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD l\xE0m cho l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo c\u1EE7a nhi\u1EC7m v\u1EE5 xu\u1EA5t hi\u1EC7n tr\xEAn d\xF2ng b\xEAn d\u01B0\u1EDBi nhi\u1EC7m v\u1EE5 \u0111\xE3 ho\xE0n th\xE0nh. N\u1EBFu kh\xF4ng, l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo s\u1EBD xu\u1EA5t hi\u1EC7n tr\u01B0\u1EDBc l\u1EA7n \u0111\xE3 ho\xE0n th\xE0nh.",name:"L\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo xu\u1EA5t hi\u1EC7n tr\xEAn d\xF2ng b\xEAn d\u01B0\u1EDBi"},removeScheduledDate:{description:{line1:"B\u1EADt t\xEDnh n\u0103ng n\xE0y s\u1EBD l\xE0m cho l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo c\u1EE7a nhi\u1EC7m v\u1EE5 kh\xF4ng c\xF3 ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch (\u23F3), khi \xEDt nh\u1EA5t m\u1ED9t trong c\xE1c ng\xE0y B\u1EAFt \u0111\u1EA7u (\u{1F6EB}) ho\u1EB7c \u0110\u1EBFn h\u1EA1n (\u{1F4C5}) c\xF3 m\u1EB7t.",line2:"\u0110i\u1EC1u n\xE0y d\xE0nh cho khi b\u1EA1n mu\u1ED1n ng\xE0y B\u1EAFt \u0111\u1EA7u v\xE0 \u0110\u1EBFn h\u1EA1n \u0111\u01B0\u1EE3c chuy\u1EC3n ti\u1EBFp sang l\u1EA7n l\u1EB7p l\u1EA1i ti\u1EBFp theo, nh\u01B0ng b\u1EA1n s\u1EBD \u0111\u1EB7t ng\xE0y \u0110\xE3 l\xEAn l\u1ECBch trong t\u01B0\u01A1ng lai, m\u1ED9t khi b\u1EA1n d\u1EF1 \u0111\u1ECBnh l\xE0m vi\u1EC7c v\u1EDBi n\xF3."},name:"X\xF3a ng\xE0y \u0111\xE3 l\xEAn l\u1ECBch khi l\u1EB7p l\u1EA1i"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"Xem t\xE0i li\u1EC7u",statuses:{collections:{anuppuccinTheme:"Theme AnuPpuccin",auraTheme:"Theme Aura",borderTheme:"Theme Border",buttons:{addCollection:{name:"{{themeName}}: Th\xEAm {{numberOfStatuses}} Tr\u1EA1ng th\xE1i \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3"}},ebullientworksTheme:"Theme Ebullientworks",itsThemeAndSlrvbCheckboxes:"Theme ITS & SlRvb Checkboxes",lytModeTheme:"Theme LYT Mode (Ch\u1EC9 ch\u1EBF \u0111\u1ED9 t\u1ED1i)",minimalTheme:"Theme Minimal",thingsTheme:"Theme Things"},coreStatuses:{buttons:{checkStatuses:{name:"Xem x\xE9t v\xE0 ki\u1EC3m tra Tr\u1EA1ng th\xE1i c\u1EE7a b\u1EA1n",tooltip:"T\u1EA1o file m\u1EDBi trong th\u01B0 m\u1EE5c g\u1ED1c c\u1EE7a vault, ch\u1EE9a s\u01A1 \u0111\u1ED3 Mermaid c\u1EE7a c\xE1c c\xE0i \u0111\u1EB7t tr\u1EA1ng th\xE1i hi\u1EC7n t\u1EA1i."}},description:{line1:"\u0110\xE2y l\xE0 c\xE1c tr\u1EA1ng th\xE1i c\u1ED1t l\xF5i m\xE0 Tasks h\u1ED7 tr\u1EE3 nguy\xEAn b\u1EA3n, kh\xF4ng c\u1EA7n CSS t\xF9y ch\u1EC9nh ho\u1EB7c theme.",line2:"B\u1EA1n c\xF3 th\u1EC3 th\xEAm ch\u1EC9nh s\u1EEDa v\xE0 th\xEAm c\xE1c tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh c\u1EE7a ri\xEAng b\u1EA1n trong ph\u1EA7n b\xEAn d\u01B0\u1EDBi."},heading:"Tr\u1EA1ng th\xE1i c\u1ED1t l\xF5i"},customStatuses:{buttons:{addAllUnknown:{name:"Th\xEAm t\u1EA5t c\u1EA3 lo\u1EA1i tr\u1EA1ng th\xE1i kh\xF4ng x\xE1c \u0111\u1ECBnh"},addNewStatus:{name:"Th\xEAm tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5 m\u1EDBi"},resetCustomStatuses:{name:"\u0110\u1EB7t l\u1EA1i lo\u1EA1i tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh v\u1EC1 m\u1EB7c \u0111\u1ECBnh"}},description:{line1:"Tr\u01B0\u1EDBc ti\xEAn, b\u1EA1n n\xEAn ch\u1ECDn v\xE0 c\xE0i \u0111\u1EB7t CSS Snippet ho\u1EB7c Theme \u0111\u1EC3 t\u1EA1o ki\u1EC3u cho c\xE1c \xF4 \u0111\xE1nh d\u1EA5u t\xF9y ch\u1EC9nh.",line2:"Sau \u0111\xF3, s\u1EED d\u1EE5ng c\xE1c n\xFAt b\xEAn d\u01B0\u1EDBi \u0111\u1EC3 thi\u1EBFt l\u1EADp tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh c\u1EE7a b\u1EA1n, \u0111\u1EC3 kh\u1EDBp v\u1EDBi c\xE1c \xF4 \u0111\xE1nh d\u1EA5u CSS b\u1EA1n \u0111\xE3 ch\u1ECDn.",line3:"L\u01B0u \xFD B\u1EA5t k\u1EF3 tr\u1EA1ng th\xE1i n\xE0o c\xF3 c\xF9ng k\xFD hi\u1EC7u v\u1EDBi b\u1EA5t k\u1EF3 tr\u1EA1ng th\xE1i tr\u01B0\u1EDBc \u0111\xF3 n\xE0o s\u1EBD b\u1ECB b\u1ECF qua. B\u1EA1n c\xF3 th\u1EC3 x\xE1c nh\u1EADn c\xE1c tr\u1EA1ng th\xE1i th\u1EF1c s\u1EF1 \u0111\u01B0\u1EE3c t\u1EA3i b\u1EB1ng c\xE1ch ch\u1EA1y l\u1EC7nh 'T\u1EA1o ho\u1EB7c ch\u1EC9nh s\u1EEDa nhi\u1EC7m v\u1EE5' v\xE0 xem menu th\u1EA3 xu\u1ED1ng Tr\u1EA1ng th\xE1i.",line4:"Xem t\xE0i li\u1EC7u \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u!"},heading:"Tr\u1EA1ng th\xE1i t\xF9y ch\u1EC9nh"},heading:"Tr\u1EA1ng th\xE1i nhi\u1EC7m v\u1EE5"}}}});var cT,uT=K(()=>{cT={main:{loadingPlugin:"\u52A0\u8F7D\u63D2\u4EF6: {{name}} v{{version}}",unloadingPlugin:"\u5378\u8F7D\u63D2\u4EF6: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u5982\u679C\u542F\u7528\uFF0C\u6B64\u72B6\u6001\u5C06\u4F5C\u4E3A\u547D\u4EE4\u53EF\u7528,\u56E0\u6B64\u60A8\u53EF\u4EE5\u6307\u5B9A\u5FEB\u6377\u952E\u5E76\u4F7F\u7528\u5B83\u5207\u6362\u72B6\u6001\u3002",name:"\u53EF\u7528\u4F5C\u547D\u4EE4"},editNextStatusSymbol:{description:"\u5355\u51FB\u65F6\uFF0C\u8FD9\u662F\u4E0B\u4E00\u6B65\u5E94\u8BE5\u4F7F\u7528\u7684\u7B26\u53F7\u3002",name:"\u4EFB\u52A1\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7"},editStatusName:{description:"\u8FD9\u662F\u4EFB\u52A1\u72B6\u6001\u7684\u53CB\u597D\u540D\u79F0.",name:"\u4EFB\u52A1\u72B6\u6001\u540D\u79F0"},editStatusSymbol:{description:"\u8FD9\u662F\u65B9\u62EC\u53F7\u4E2D\u7684\u5B57\u7B26\u3002\uFF08\u4EC5\u53EF\u7F16\u8F91\u81EA\u5B9A\u4E49\u72B6\u6001,\u4E0D\u53EF\u7F16\u8F91\u6838\u5FC3\u72B6\u6001\u3002\uFF09",name:"\u4EFB\u52A1\u72B6\u6001\u7B26\u53F7"},editStatusType:{description:"\u63A7\u5236\u641C\u7D22\u548C\u5207\u6362\u72B6\u6001\u7684\u884C\u4E3A\u3002",name:"\u4EFB\u52A1\u72B6\u6001\u7C7B\u578B"},fixErrorsBeforeSaving:"\u5728\u4FDD\u5B58\u524D\u4FEE\u590D\u9519\u8BEF\u3002"}},reports:{statusRegistry:{about:{createdBy:"\u6B64\u6587\u4EF6\u7531 Obsidian tasks \u63D2\u4EF6(version {{version}})\u521B\u5EFA,\u4EE5\u5E2E\u52A9\u53EF\u89C6\u5316\u6B64\u4ED3\u5E93\u4E2D\u7684\u4EFB\u52A1\u72B6\u6001.",deleteFileAnyTime:"\u60A8\u53EF\u4EE5\u968F\u65F6\u5220\u9664\u6B64\u6587\u4EF6.",title:"\u5173\u4E8E\u6B64\u6587\u4EF6",updateReport:{line1:"\u5982\u679C\u66F4\u6539 Tasks \u72B6\u6001\u8BBE\u7F6E,\u5219\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u83B7\u53D6\u66F4\u65B0\u540E\u7684\u62A5\u544A:",line2:"\u524D\u5F80 `\u8BBE\u7F6E` -> `Tasks`\u3002",line3:"\u70B9\u51FB `\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001`\u3002"}},columnHeadings:{nextStatusSymbol:"\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7",problems:"\u95EE\u9898 (\u5982\u679C\u5B58\u5728)",statusName:"\u72B6\u6001\u540D\u79F0",statusSymbol:"\u72B6\u6001\u7B26\u53F7",statusType:"\u72B6\u6001\u7C7B\u578B"},loadedSettings:{settingsActuallyUsed:"\u8FD9\u4E9B\u662F Tasks \u5B9E\u9645\u4F7F\u7528\u7684\u8BBE\u7F6E.",switchToLivePreview:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u56FE\u8868.",title:"\u5DF2\u52A0\u8F7D\u8BBE\u7F6E"},messages:{cannotFindNextStatus:"\u672A\u80FD\u610F\u5916\u627E\u5230\u4E0B\u4E00\u4E2A\u72B6\u6001.",duplicateSymbol:"\u91CD\u590D\u7684\u7B26\u53F7 '{{symbol}}':\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",emptySymbol:"\u7A7A\u7B26\u53F7:\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",nextSymbolUnknown:"\u4E0B\u4E00\u4E2A\u7B26\u53F7 {{symbol}} \u672A\u77E5:\u8BF7\u521B\u5EFA\u7B26\u53F7\u4E3A {{symbol}} \u7684\u72B6\u6001.",notConventionalType:"\u4F9B\u53C2\u8003,\u72B6\u6001\u7B26\u53F7 {{symbol}} \u7684\u5E38\u89C4\u7C7B\u578B\u662F {{type}}:\u60A8\u53EF\u80FD\u5E0C\u671B\u67E5\u770B\u6B64\u7C7B\u578B.",wrongTypeAfterDone:{line1:"\u6B64`\u5B8C\u6210`\u72B6\u6001\u540E\u8DDF\u968F\u7684\u662F{{nextType}}\uFF0C\u800C\u4E0D\u662F`\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\u3002",line2:"\u5982\u679C\u7528\u4E8E\u5B8C\u6210\u4E00\u4E2A\u91CD\u590D\u4EFB\u52A1\uFF0C\u5B83\u540E\u9762\u4F1A\u8DDF\u7740\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\uFF0C\u4EE5\u786E\u4FDD\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u7B26\u5408\u201C\u672A\u5B8C\u6210\u201D\u7684\u7B5B\u9009\u6761\u4EF6\u3002",line3:"\u8BF7\u53C2\u9605[\u91CD\u590D\u4EFB\u52A1\u548C\u81EA\u5B9A\u4E49\u72B6\u6001]({{helpURL}})\u3002"}},sampleTasks:{line1:"\u8FD9\u91CC\u662F\u7528\u4E8E\u5B9E\u9645\u4EFB\u52A1\u4F7F\u7528\u7684\u5404\u79CD\u72B6\u6001\u7684\u793A\u4F8B\u4EFB\u52A1\u884C\uFF0C\u4F9B\u60A8\u8FDB\u884C\u5B9E\u9A8C\u3002",line2:"\u521B\u5EFA\u6B64\u6587\u4EF6\u65F6\uFF0C\u4EFB\u52A1\u63CF\u8FF0\u4E2D\u7684\u72B6\u6001\u7B26\u53F7\u548C\u540D\u79F0\u662F\u6B63\u786E\u7684\u3002",line3:"\u5982\u679C\u60A8\u81EA\u521B\u5EFA\u4EE5\u6765\u4FEE\u6539\u4E86\u6837\u4F8B\u4EFB\u52A1\uFF0C\u53EF\u4EE5\u5728\u4E0B\u65B9\u7684\u4EFB\u52A1\u641C\u7D22\u7684\u5206\u7EC4\u6807\u9898\u4E2D\u67E5\u770B\u5F53\u524D\u7684\u72B6\u6001\u7C7B\u578B\u548C\u540D\u79F0\u3002",tip:{line1:"\u63D0\u793A\uFF1A\u5982\u679C\u6240\u6709\u590D\u9009\u6846\u770B\u8D77\u6765\u90FD\u4E00\u6837...",line2:"\u5982\u679C\u5728\u9605\u8BFB\u6A21\u5F0F\u6216\u5B9E\u65F6\u9884\u89C8\u4E2D\u6240\u6709\u590D\u9009\u6846\u770B\u8D77\u6765\u90FD\u4E00\u6837\uFF0C\u8BF7\u53C2\u9605[\u81EA\u5B9A\u4E49\u72B6\u6001\u6837\u5F0F]({{url}})\uFF0C\u4E86\u89E3\u5982\u4F55\u9009\u62E9\u4E3B\u9898\u6216CSS\u7247\u6BB5\u6765\u4E3A\u60A8\u7684\u72B6\u6001\u8BBE\u7F6E\u6837\u5F0F\u3002"},title:"\u6837\u4F8B\u4EFB\u52A1"},searchSampleTasks:{line1:"\u6B64\u4EFB\u52A1\u641C\u7D22\u663E\u793A\u4E86\u6B64\u6587\u4EF6\u4E2D\u7684\u6240\u6709\u4EFB\u52A1\uFF0C\u6309\u5176\u72B6\u6001\u7C7B\u578B\u548C\u72B6\u6001\u540D\u79F0\u8FDB\u884C\u5206\u7EC4\u3002",title:"\u641C\u7D22\u6837\u4F8B\u4EFB\u52A1"},statusSettings:{comment:{line1:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u8868\u683C.",line2:"\u5982\u679C\u72B6\u6001\u540D\u79F0\u4E2D\u6709\u4EFB\u4F55Markdown\u683C\u5F0F\u5B57\u7B26,\u5982 '*' \u6216 '_',",line3:"\u9ED1\u66DC\u77F3\u53EA\u80FD\u5728\u9605\u8BFB\u6A21\u5F0F\u4E0B\u6B63\u786E\u6E32\u67D3\u8868\u683C."},theseAreStatusValues:"\u8FD9\u4E9B\u662F\u6838\u5FC3\u548C\u81EA\u5B9A\u4E49\u72B6\u6001\u90E8\u5206\u4E2D\u7684\u72B6\u6001\u503C.",title:"\u72B6\u6001\u8BBE\u7F6E"}}},settings:{autoSuggest:{heading:"\u81EA\u52A8\u5EFA\u8BAE",maxSuggestions:{description:'\u5F53\u81EA\u52A8\u5EFA\u8BAE\u83DC\u5355\u5F39\u51FA\u65F6\uFF0C\u5E94\u663E\u793A\u591A\u5C11\u6761\u5EFA\u8BAE (\u5305\u542B "\u23CE" \u9009\u9879)\u3002',name:"\u8981\u663E\u793A\u7684\u6700\u5927\u81EA\u52A8\u5EFA\u8BAE\u6570"},minLength:{description:"\u5982\u679C\u9AD8\u4E8E0\uFF0C\u5219\u53EA\u6709\u5728\u8BC6\u522B\u51FA\u4EFB\u4F55\u652F\u6301\u7684\u5173\u952E\u5B57\u7684\u5F00\u5934\u65F6\u624D\u4F1A\u89E6\u53D1\u81EA\u52A8\u5EFA\u8BAE\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u7684\u6700\u5C0F\u5339\u914D\u957F\u5EA6"},toggle:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u8BC6\u522B\u7684\u4EFB\u52A1\u884C\u5185\u8F93\u5165\u65F6\u6253\u5F00\u667A\u80FD\u5EFA\u8BAE\u83DC\u5355\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u4EFB\u52A1\u5185\u5BB9"}},changeRequiresRestart:"\u9700\u8981\u91CD\u542F\u3002",dates:{cancelledDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u8BBE\u7F6E\u4E3A\u53D6\u6D88\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u274C YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u53D6\u6D88\u7684\u4EFB\u52A1\u7684\u53D6\u6D88\u65E5\u671F"},createdDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u901A\u8FC7\u201CCreate or edit task\u201D\u547D\u4EE4\u6216\u5B8C\u6210\u91CD\u590D\u4EFB\u52A1\u65F6\uFF0C\u5728\u5176\u4ED6\u65E5\u671F\u503C\u4E4B\u524D\u6DFB\u52A0\u65F6\u95F4\u6233\u2795YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u6DFB\u52A0\u4EFB\u52A1\u7684\u521B\u5EFA\u65E5\u671F"},doneDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u88AB\u8BBE\u7F6E\u4E3A\u5B8C\u6210\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u2705 YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u5B8C\u6210\u65E5\u671F"},heading:"\u65E5\u671F"},datesFromFileNames:{heading:"\u4ECE\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u65E5\u671F",scheduledDate:{extraFormat:{description:{line1:"\u4EFB\u52A1\u63D2\u4EF6\u5728\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F\u65F6\uFF0C\u5C06\u8BC6\u522B\u7684\u9644\u52A0\u65E5\u671F\u683C\u5F0F\u3002",line2:"\u8BED\u6CD5\u53C2\u8003"},name:"\u4E3A\u65E0\u65E5\u671F\u4EFB\u52A1\u6DFB\u52A0\u6587\u4EF6\u540D\u65E5\u671F\u683C\u5F0F\u4F5C\u4E3A\u8BA1\u5212\u65E5\u671F",placeholder:"\u793A\u4F8B\uFF1AMMM DD YYYY"},folders:{description:"\u5982\u679C\u8981\u5728\u5168\u5C40\u4F7F\u7528\u9ED8\u8BA4\u7684\u8BA1\u5212\u65E5\u671F\uFF0C\u8BF7\u4FDD\u7559\u4E3A\u7A7A,\u6216\u8005\u8F93\u5165\u4EE5\u9017\u53F7\u5206\u9694\u7684\u6587\u4EF6\u5939\u5217\u8868\u3002",name:"\u5177\u6709\u9ED8\u8BA4\u8BA1\u5212\u65E5\u671F\u7684\u6587\u4EF6\u5939"},toggle:{description:{line1:"\u7528\u4E8E\u8282\u7701\u8F93\u5165\u8BA1\u5212\u65E5\u671F (\u23F3) \u7684\u65F6\u95F4\u3002",line2:"\u5982\u679C\u542F\u7528\u6B64\u9009\u9879\uFF0C\u5219\u4EFB\u4F55\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u90FD\u5C06\u88AB\u8D4B\u4E88\u4ECE\u5176\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u7684\u9ED8\u8BA4\u201C\u8BA1\u5212\u65E5\u671F\u201D\u3002",line3:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CTasks \u63D2\u4EF6\u5C06\u5339\u914D YYYY-MM-DD \u548C YYYYMMDD \u4E24\u79CD\u65E5\u671F\u683C\u5F0F\u3002",line4:"\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u6307\u6CA1\u6709\u622A\u6B62\u65E5\u671F (\u{1F4C5} ), \u8BA1\u5212\u65E5\u671F (\u23F3) \u548C\u5F00\u59CB\u65E5\u671F(\u{1F6EB}) \u7684\u4EFB\u52A1\u3002"},name:"\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F"}}},dialogs:{accessKeys:{description:"\u5982\u679C\u5BF9\u8BDD\u6846\u4E2D\u5404\u79CD\u63A7\u4EF6\u7684\u5FEB\u6377\u952E\u4E0E\u7CFB\u7EDF\u5FEB\u6377\u952E\u53D1\u751F\u51B2\u7A81\uFF0C\u60A8\u53EF\u4EE5\u5728\u8FD9\u91CC\u505C\u7528\u5B83\u4EEC\u3002",name:"\u5728\u5BF9\u8BDD\u6846\u4E2D\u4F7F\u7528\u5FEB\u6377\u952E"},heading:"\u5BF9\u8BDD\u6846"},format:{description:{line1:"Tasks \u7528\u4E8E\u8BFB\u53D6\u548C\u5199\u5165\u4EFB\u52A1\u7684\u683C\u5F0F.",line2:"\u91CD\u70B9: \u76EE\u524D Tasks \u53EA\u652F\u6301\u540C\u65F6\u4F7F\u7528\u4E00\u79CD\u683C\u5F0F\u3002\u9009\u62E9 dataview \u5C06 \u4F7F Tasks \u505C\u6B62\u8BFB\u53D6\u81EA\u6709\u7684\u8868\u60C5\u7B26\u53F7\u683C\u5F0F"},displayName:{dataview:"Dataview \u683C\u5F0F",tasksEmojiFormat:"Tasks \u8868\u60C5\u683C\u5F0F"},name:"\u4EFB\u52A1\u683C\u5F0F"},globalFilter:{filter:{description:{line1:"\u5EFA\u8BAE\uFF1A\u5982\u679C\u60A8\u5E0C\u671B\u4ED3\u5E93\u4E2D\u7684\u6240\u6709\u4EFB\u52A1\u5217\u8868\u9879\u90FD\u7531\u6B64\u63D2\u4EF6\u7BA1\u7406\uFF0C\u8BF7\u7559\u7A7A\u3002",line2:'\u5982\u679C\u60A8\u5E0C\u671B Tasks \u4EC5\u4F5C\u7528\u4E8E "- [ ]" \u4EFB\u52A1\u5217\u8868\u9879\u7684\u5B50\u96C6\uFF0C\u8BF7\u4F7F\u7528\u5168\u5C40\u7B5B\u9009\u5668,\u4EE5\u4FBF\u53EA\u6709\u5728\u5176\u63CF\u8FF0\u4E2D\u5305\u542B\u6307\u5B9A\u7684\u5B57\u7B26\u4E32\u7684\u4EFB\u52A1\u5217\u8868\u9879\u624D\u88AB\u89C6\u4E3A\u4EFB\u52A1\u3002',line3:"\u4F8B\u5982\uFF0C\u5982\u679C\u5C06\u5168\u5C40\u7B5B\u9009\u5668\u8BBE\u7F6E\u4E3A #task\uFF0C\u5219 Tasks \u63D2\u4EF6\u5C06\u4EC5\u5904\u7406\u6807\u8BB0\u4E3A #task \u7684\u4EFB\u52A1\u5217\u8868\u9879\u3002",line4:"\u5176\u4ED6\u4EFB\u52A1\u5217\u8868\u9879\u5C06\u4FDD\u6301\u6B63\u5E38,\u4E0D\u4F1A\u51FA\u73B0\u5728\u67E5\u8BE2\u4E2D\u6216\u8BBE\u7F6E\u5B8C\u6210\u65E5\u671F\u3002"},name:"\u5168\u5C40\u7B5B\u9009\u5668",placeholder:"\u4F8B\u5982:#task \u6216 TODO"},heading:"\u5168\u5C40\u4EFB\u52A1\u7B5B\u9009\u5668",removeFilter:{description:"\u542F\u7528\u6B64\u9009\u9879\u5C06\u5728\u663E\u793A\u4EFB\u52A1\u65F6\u4ECE\u4EFB\u52A1\u63CF\u8FF0\u4E2D\u5220\u9664\u8BBE\u7F6E\u4E3A\u5168\u5C40\u7B5B\u9009\u5668\u7684\u5B57\u7B26\u4E32.",name:"\u4ECE\u63CF\u8FF0\u4E2D\u5220\u9664\u5168\u5C40\u7B5B\u9009\u5668"}},globalQuery:{heading:"\u5168\u5C40\u67E5\u8BE2",query:{description:"\u81EA\u52A8\u5305\u542B\u5728\u5E93\u4E2D\u6BCF\u4E2A Tasks \u5757\u5F00\u5934\u7684\u67E5\u8BE2\u8BED\u53E5.\u7528\u4E8E\u6DFB\u52A0\u9ED8\u8BA4\u8FC7\u6EE4\u5668\u6216\u5E03\u5C40\u9009\u9879\u3002",placeholder:`\u4F8B\u5982... +path does not include _templates/ +limit 300 +show urgency`}},presets:{buttons:{addNewPreset:""},line1:"\u60A8\u53EF\u4EE5\u5728\u8FD9\u91CC\u5B9A\u4E49\u547D\u540D\u6307\u4EE4\uFF0C\u53EF\u4EE5\u5728\u591A\u4E2A\u67E5\u8BE2\u4E2D\u91CD\u590D\u4F7F\u7528\u3002\u4E00\u4E2A\u540D\u4E3A '{{name}}' \u7684\u9884\u8BBE\u53EF\u4EE5\u5728\u4EFB\u52A1\u67E5\u8BE2\u4E2D\u4F7F\u7528 '{{instruction1}}' \u6216 '{{instruction2}}'\u3002",line2:"\u4EFB\u4F55\u6253\u5F00\u7684\u4EFB\u52A1\u67E5\u8BE2\u5728\u9884\u8BBE\u88AB\u7F16\u8F91\u65F6\u90FD\u4F1A\u81EA\u52A8\u91CD\u65B0\u52A0\u8F7D\u3002",name:"\u9884\u8BBE"},recurringTasks:{heading:"\u91CD\u590D\u6027\u4EFB\u52A1",nextLine:{description:"\u542F\u7528\u6B64\u529F\u80FD\u540E\uFF0C\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u663E\u793A\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0B\u4E00\u884C\u3002\u82E5\u5173\u95ED\u6B64\u529F\u80FD\uFF0C\u5219\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u51FA\u73B0\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0A\u4E00\u884C\u3002",name:"\u628A\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u653E\u5728\u4E0B\u4E00\u884C"},removeScheduledDate:{description:{line1:"\u5F00\u542F\u6B64\u9009\u9879\u540E\uFF0C\u5F53\u4EFB\u52A1\u81F3\u5C11\u8BBE\u7F6E\u4E86\u5F00\u59CB\u65E5\u671F(\u{1F6EB})\u6216\u8BA1\u5212\u65E5\u671F(\u{1F4C5})\u4E2D\u7684\u4E00\u4E2A\u65F6\uFF0C\u8BE5\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5468\u671F\u5C06\u4E0D\u518D\u5305\u542B\u8BA1\u5212\u65E5\u671F(\u23F3)\u3002",line2:"\u6B64\u529F\u80FD\u9002\u7528\u4E8E\u4F60\u5E0C\u671B\u5C06\u5F00\u59CB\u548C\u622A\u6B62\u65E5\u671F\u5EF6\u7EED\u5230\u4E0B\u4E00\u4E2A\u5468\u671F\uFF0C\u4F46\u8BA1\u5212\u65E5\u671F\u6682\u4E0D\u8BBE\u7F6E\uFF0C\u7B49\u5B9E\u9645\u5F00\u59CB\u5904\u7406\u65F6\u518D\u786E\u5B9A\u7684\u60C5\u51B5\u3002"},name:"\u5728\u91CD\u590D\u6027\u4EFB\u52A1\u4E2D\u79FB\u9664\u8BA1\u5212\u65E5\u671F"}},searchResults:{heading:"",taskCountLocation:{description:"",name:"",options:{bottom:"",top:""}}},seeTheDocumentation:"\u53C2\u9605\u6587\u6863",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \u4E3B\u9898",auraTheme:"Aura \u4E3B\u9898",borderTheme:"Border \u4E3B\u9898",buttons:{addCollection:{name:"{{themeName}}: \u6DFB\u52A0 {{numberOfStatuses}} \u79CD\u652F\u6301\u72B6\u6001"}},ebullientworksTheme:"Ebullientworks \u4E3B\u9898",itsThemeAndSlrvbCheckboxes:"ITS \u4E3B\u9898\u548C SlRvb \u590D\u9009\u6846",lytModeTheme:"LYT Mode \u4E3B\u9898 (\u4EC5\u6DF1\u8272\u6A21\u5F0F)",minimalTheme:"Minimal \u4E3B\u9898",thingsTheme:"Things \u4E3B\u9898"},coreStatuses:{buttons:{checkStatuses:{name:"\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001",tooltip:"\u5728\u5E93\u7684\u6839\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6,\u5305\u542B\u5F53\u524D\u72B6\u6001\u8BBE\u7F6E\u7684 Mermaid \u56FE\u8868."}},description:{line1:"\u8FD9\u4E9B\u662F Tasks \u539F\u751F\u652F\u6301\u7684\u6838\u5FC3\u72B6\u6001\uFF0C\u4E0D\u9700\u8981\u81EA\u5B9A\u4E49CSS\u6837\u5F0F\u6216\u4E3B\u9898\u3002",line2:"\u60A8\u53EF\u4EE5\u5728\u4E0B\u9762\u7F16\u8F91\u548C\u6DFB\u52A0\u81EA\u5B9A\u4E49\u72B6\u6001\u3002"},heading:"\u6838\u5FC3\u72B6\u6001"},customStatuses:{buttons:{addAllUnknown:{name:"\u6DFB\u52A0\u6240\u6709\u672A\u77E5\u72B6\u6001\u7C7B\u578B"},addNewStatus:{name:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u72B6\u6001"},resetCustomStatuses:{name:"\u91CD\u7F6E\u81EA\u5B9A\u4E49\u72B6\u6001\u7C7B\u578B\u4E3A\u9ED8\u8BA4\u503C"}},description:{line1:"\u60A8\u5E94\u8BE5\u9996\u5148\u9009\u62E9\u5E76\u5B89\u88C5 CSS\u4EE3\u7801\u6BB5\u6216\u4E3B\u9898\u4EE5\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u590D\u9009\u6846\u7684\u6837\u5F0F",line2:"\u7136\u540E\uFF0C\u4F7F\u7528\u4E0B\u9762\u7684\u6309\u94AE\u8BBE\u7F6E\u60A8\u7684\u81EA\u5B9A\u4E49\u72B6\u6001,\u4EE5\u5339\u914D\u60A8\u9009\u62E9\u7684CSS\u590D\u9009\u6846.",line3:"\u6CE8\u610F\u4EFB\u4F55\u4E0E\u66F4\u65E9\u7684\u72B6\u6001\u5177\u6709\u76F8\u540C\u7B26\u53F7\u7684\u72B6\u6001\u90FD\u5C06\u88AB\u5FFD\u7565.\u60A8\u53EF\u4EE5\u901A\u8FC7\u8FD0\u884C\u201CCreate or edit task\u201D\u547D\u4EE4\u5E76\u67E5\u770B\u201CStatus\u201D\u4E0B\u62C9\u5217\u8868\u6765\u786E\u8BA4\u5B9E\u9645\u52A0\u8F7D\u7684\u72B6\u6001\u3002",line4:"\u53C2\u9605\u6587\u6863\uFF01"},heading:"\u81EA\u5B9A\u4E49\u72B6\u6001"},heading:"\u4EFB\u52A1\u72B6\u6001"}}}});var If,kO,dT,O,Di=K(()=>{"use strict";Gb();Vb();Qb();Xb();Jb();tT();rT();sT();oT();uT();If=!1,kO=()=>{let t=localStorage.getItem("language")||"en";return console.log(`Language in Obsidian settings: '${t}'; requesting Tasks in '${t}'.`),t},dT=()=>A(null,null,function*(){if(!If){yield dt.init({lng:kO(),fallbackLng:"en",returnEmptyString:!1,resources:{be:{translation:zb},de:{translation:Kb},en:{translation:Zb},ko:{translation:eT},"pt-BR":{translation:nT},ru:{translation:iT},uk:{translation:aT},vi:{translation:lT},zh:{translation:cT}},interpolation:{escapeValue:!1}}),If=!0;let n=dt.languages.find(t=>dt.hasResourceBundle(t,"translation"));console.log(`Using Tasks in: '${n}'; fallback chain: [${dt.languages.join(", ")}].`)}}),O=new Proxy(dt,{get(n,t){if(!If&&t==="t")throw new Error("i18n.t() called before initialization. Call initializeI18n() first.");return Reflect.get(n,t)}})});var pT,Gs,Ff=K(()=>{"use strict";pT=(n,t)=>null,Gs=class n{constructor(){this.getFirstLinkpathDestFn=pT}setGetFirstLinkpathDestFn(t){this.getFirstLinkpathDestFn=t}resetGetFirstLinkpathDestFn(){this.getFirstLinkpathDestFn=pT}getDestinationPath(t,e){var r;return(r=this.getFirstLinkpathDestFn(t,e))!=null?r:void 0}static getInstance(){return n.instance||(n.instance=new n),n.instance}}});var Vs,Lf=K(()=>{"use strict";Ff();Vs=class{constructor(t,e){this.rawLink=t,this.pathContainingLink=e}get originalMarkdown(){return this.rawLink.original}get markdown(){return this.destination.startsWith("#")?`[[${this.pathContainingLink}${this.destination}|${this.displayText}]]`:this.originalMarkdown}get destination(){return this.rawLink.link}get destinationPath(){var t;return(t=Gs.getInstance().getDestinationPath(this.rawLink,this.pathContainingLink))!=null?t:null}get displayText(){return this.rawLink.displayText}linksTo(t){if(typeof t=="string"){let e=/\.md$/,r=this.destination.replace(e,""),i=t.replace(e,"");return!!(i===r||r.endsWith(`/${i}`))}return this.destinationPath===t.path}}});var st,We,Xr=K(()=>{"use strict";st=class st{};st.dateFormat="YYYY-MM-DD",st.dateTimeFormat="YYYY-MM-DD HH:mm",st.indentationRegex=/^([\s\t>]*)/,st.listMarkerRegex=/([-*+]|[0-9]+[.)])/,st.checkboxRegex=/\[(.)\]/u,st.afterCheckboxRegex=/ *(.*)/u,st.taskRegex=new RegExp(st.indentationRegex.source+st.listMarkerRegex.source+" +"+st.checkboxRegex.source+st.afterCheckboxRegex.source,"u"),st.nonTaskRegex=new RegExp(st.indentationRegex.source+st.listMarkerRegex.source+"? *("+st.checkboxRegex.source+")?"+st.afterCheckboxRegex.source,"u"),st.listItemRegex=new RegExp(st.indentationRegex.source+st.listMarkerRegex.source),st.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,st.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,st.hashTagsFromEnd=new RegExp(st.hashTags.source+"$");We=st});var Ve=M(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.matchAnyPattern=Ei.extractTerms=Ei.repeatedTimeunitPattern=void 0;function EO(n,t){let e=t.replace(/\((?!\?)/g,"(?:");return`${n}${e}\\s{0,5}(?:,?\\s{0,5}${e}){0,10}`}Ei.repeatedTimeunitPattern=EO;function mT(n){let t;return n instanceof Array?t=[...n]:n instanceof Map?t=Array.from(n.keys()):t=Object.keys(n),t}Ei.extractTerms=mT;function xO(n){return`(?:${mT(n).sort((e,r)=>r.length-e.length).join("|").replace(/\./g,"\\.")})`}Ei.matchAnyPattern=xO});var je=M((Uf,qf)=>{(function(n,t){typeof Uf=="object"&&typeof qf!="undefined"?qf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=t()})(Uf,(function(){"use strict";var n=1e3,t=6e4,e=36e5,r="millisecond",i="second",s="minute",a="hour",o="day",l="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function(Q,B,P){var te=String(Q);return!te||te.length>=B?Q:""+Array(B+1-te.length).join(P)+Q},C={s:E,z:function(Q){var B=-Q.utcOffset(),P=Math.abs(B),te=Math.floor(P/60),H=P%60;return(B<=0?"+":"-")+E(te,2,"0")+":"+E(H,2,"0")},m:function Q(B,P){if(B.date(){"use strict";var OO=xi&&xi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xi,"__esModule",{value:!0});xi.findYearClosestToRef=xi.findMostLikelyADYear=void 0;var RO=OO(je());function CO(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}xi.findMostLikelyADYear=CO;function MO(n,t,e){let r=RO.default(n),i=r;i=i.month(e-1),i=i.date(t),i=i.year(r.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(r)){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.parseTimeUnits=Ee.TIME_UNITS_PATTERN=Ee.parseYear=Ee.YEAR_PATTERN=Ee.parseOrdinalNumberPattern=Ee.ORDINAL_NUMBER_PATTERN=Ee.parseNumberPattern=Ee.NUMBER_PATTERN=Ee.TIME_UNIT_DICTIONARY=Ee.ORDINAL_WORD_DICTIONARY=Ee.INTEGER_WORD_DICTIONARY=Ee.MONTH_DICTIONARY=Ee.FULL_MONTH_NAME_DICTIONARY=Ee.WEEKDAY_DICTIONARY=void 0;var pu=Ve(),AO=It();Ee.WEEKDAY_DICTIONARY={sunday:0,sun:0,"sun.":0,monday:1,mon:1,"mon.":1,tuesday:2,tue:2,"tue.":2,wednesday:3,wed:3,"wed.":3,thursday:4,thurs:4,"thurs.":4,thur:4,"thur.":4,thu:4,"thu.":4,friday:5,fri:5,"fri.":5,saturday:6,sat:6,"sat.":6};Ee.FULL_MONTH_NAME_DICTIONARY={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12};Ee.MONTH_DICTIONARY=Object.assign(Object.assign({},Ee.FULL_MONTH_NAME_DICTIONARY),{jan:1,"jan.":1,feb:2,"feb.":2,mar:3,"mar.":3,apr:4,"apr.":4,jun:6,"jun.":6,jul:7,"jul.":7,aug:8,"aug.":8,sep:9,"sep.":9,sept:9,"sept.":9,oct:10,"oct.":10,nov:11,"nov.":11,dec:12,"dec.":12});Ee.INTEGER_WORD_DICTIONARY={one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12};Ee.ORDINAL_WORD_DICTIONARY={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20,"twenty first":21,"twenty-first":21,"twenty second":22,"twenty-second":22,"twenty third":23,"twenty-third":23,"twenty fourth":24,"twenty-fourth":24,"twenty fifth":25,"twenty-fifth":25,"twenty sixth":26,"twenty-sixth":26,"twenty seventh":27,"twenty-seventh":27,"twenty eighth":28,"twenty-eighth":28,"twenty ninth":29,"twenty-ninth":29,thirtieth:30,"thirty first":31,"thirty-first":31};Ee.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconds:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",hour:"hour",hours:"hour",day:"d",days:"d",week:"week",weeks:"week",month:"month",months:"month",qtr:"quarter",quarter:"quarter",quarters:"quarter",y:"year",yr:"year",year:"year",years:"year"};Ee.NUMBER_PATTERN=`(?:${pu.matchAnyPattern(Ee.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s{0,2}an?)?|an?\\b(?:\\s{0,2}few)?|few|several|a?\\s{0,2}couple\\s{0,2}(?:of)?)`;function gT(n){let t=n.toLowerCase();return Ee.INTEGER_WORD_DICTIONARY[t]!==void 0?Ee.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Ee.parseNumberPattern=gT;Ee.ORDINAL_NUMBER_PATTERN=`(?:${pu.matchAnyPattern(Ee.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function PO(n){let t=n.toLowerCase();return Ee.ORDINAL_WORD_DICTIONARY[t]!==void 0?Ee.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}Ee.parseOrdinalNumberPattern=PO;Ee.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s{0,2}(?:BE|AD|BC|BCE|CE)|[1-2][0-9]{3}|[5-9][0-9])";function IO(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BCE?/i.test(n))return n=n.replace(/BCE?/i,""),-parseInt(n);if(/(AD|CE)/i.test(n))return n=n.replace(/(AD|CE)/i,""),parseInt(n);let t=parseInt(n);return AO.findMostLikelyADYear(t)}Ee.parseYear=IO;var yT=`(${Ee.NUMBER_PATTERN})\\s{0,3}(${pu.matchAnyPattern(Ee.TIME_UNIT_DICTIONARY)})`,hT=new RegExp(yT,"i");Ee.TIME_UNITS_PATTERN=pu.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",yT);function NO(n){let t={},e=n,r=hT.exec(e);for(;r;)FO(t,r),e=e.substring(r[0].length).trim(),r=hT.exec(e);return t}Ee.parseTimeUnits=NO;function FO(n,t){let e=gT(t[1]),r=Ee.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var bT=M((Yf,Wf)=>{(function(n,t){typeof Yf=="object"&&typeof Wf!="undefined"?Wf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=t()})(Yf,(function(){"use strict";var n="month",t="quarter";return function(e,r){var i=r.prototype;i.quarter=function(o){return this.$utils().u(o)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(o-1))};var s=i.add;i.add=function(o,l){return o=Number(o),this.$utils().p(l)===t?this.add(3*o,n):s.bind(this)(o,l)};var a=i.startOf;i.startOf=function(o,l){var u=this.$utils(),c=!!u.u(l)||l;if(u.p(o)===t){var d=this.quarter()-1;return c?this.month(3*d).startOf(n).startOf("day"):this.month(3*d+2).endOf(n).endOf("day")}return a.bind(this)(o,l)}}}))});var $n=M(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.implySimilarTime=Rr.assignSimilarTime=Rr.assignSimilarDate=Rr.assignTheNextDay=void 0;var TT=_t();function LO(n,t){t=t.add(1,"day"),vT(n,t),kT(n,t)}Rr.assignTheNextDay=LO;function vT(n,t){n.assign("day",t.date()),n.assign("month",t.month()+1),n.assign("year",t.year())}Rr.assignSimilarDate=vT;function UO(n,t){n.assign("hour",t.hour()),n.assign("minute",t.minute()),n.assign("second",t.second()),n.assign("millisecond",t.millisecond()),n.get("hour")<12?n.assign("meridiem",TT.Meridiem.AM):n.assign("meridiem",TT.Meridiem.PM)}Rr.assignSimilarTime=UO;function kT(n,t){n.imply("hour",t.hour()),n.imply("minute",t.minute()),n.imply("second",t.second()),n.imply("millisecond",t.millisecond())}Rr.implySimilarTime=kT});var _T=M(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.toTimezoneOffset=Ki.TIMEZONE_ABBR_MAP=void 0;Ki.TIMEZONE_ABBR_MAP={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function qO(n){var t;return n==null?null:typeof n=="number"?n:(t=Ki.TIMEZONE_ABBR_MAP[n])!==null&&t!==void 0?t:null}Ki.toTimezoneOffset=qO});var lt=M(Cr=>{"use strict";var wT=Cr&&Cr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.ParsingResult=Cr.ParsingComponents=Cr.ReferenceWithTimezone=void 0;var YO=wT(bT()),mu=wT(je()),$f=$n(),WO=_T();mu.default.extend(YO.default);var jf=class{constructor(t){var e;t=t!=null?t:new Date,t instanceof Date?this.instant=t:(this.instant=(e=t.instant)!==null&&e!==void 0?e:new Date,this.timezoneOffset=WO.toTimezoneOffset(t.timezone))}};Cr.ReferenceWithTimezone=jf;var hu=class n{constructor(t,e){if(this.reference=t,this.knownValues={},this.impliedValues={},e)for(let i in e)this.knownValues[i]=e[i];let r=mu.default(t.instant);this.imply("day",r.date()),this.imply("month",r.month()+1),this.imply("year",r.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(t){return t in this.knownValues?this.knownValues[t]:t in this.impliedValues?this.impliedValues[t]:null}isCertain(t){return t in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(t,e){return t in this.knownValues?this:(this.impliedValues[t]=e,this)}assign(t,e){return this.knownValues[t]=e,delete this.impliedValues[t],this}delete(t){delete this.knownValues[t],delete this.impliedValues[t]}clone(){let t=new n(this.reference);t.knownValues={},t.impliedValues={};for(let e in this.knownValues)t.knownValues[e]=this.knownValues[e];for(let e in this.impliedValues)t.impliedValues[e]=this.impliedValues[e];return t}isOnlyDate(){return!this.isCertain("hour")&&!this.isCertain("minute")&&!this.isCertain("second")}isOnlyTime(){return!this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyWeekdayComponent(){return this.isCertain("weekday")&&!this.isCertain("day")&&!this.isCertain("month")}isOnlyDayMonthComponent(){return this.isCertain("day")&&this.isCertain("month")&&!this.isCertain("year")}isValidDate(){let t=this.dateWithoutTimezoneAdjustment();return!(t.getFullYear()!==this.get("year")||t.getMonth()!==this.get("month")-1||t.getDate()!==this.get("day")||this.get("hour")!=null&&t.getHours()!=this.get("hour")||this.get("minute")!=null&&t.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return mu.default(this.date())}date(){let t=this.dateWithoutTimezoneAdjustment();return new Date(t.getTime()+this.getSystemTimezoneAdjustmentMinute(t)*6e4)}dateWithoutTimezoneAdjustment(){let t=new Date(this.get("year"),this.get("month")-1,this.get("day"),this.get("hour"),this.get("minute"),this.get("second"),this.get("millisecond"));return t.setFullYear(this.get("year")),t}getSystemTimezoneAdjustmentMinute(t){var e,r;(!t||t.getTime()<0)&&(t=new Date);let i=-t.getTimezoneOffset(),s=(r=(e=this.get("timezoneOffset"))!==null&&e!==void 0?e:this.reference.timezoneOffset)!==null&&r!==void 0?r:i;return i-s}static createRelativeFromReference(t,e){let r=mu.default(t.instant);for(let s in e)r=r.add(e[s],s);let i=new n(t);return e.hour||e.minute||e.second?($f.assignSimilarTime(i,r),$f.assignSimilarDate(i,r),t.timezoneOffset!==null&&i.assign("timezoneOffset",-t.instant.getTimezoneOffset())):($f.implySimilarTime(i,r),t.timezoneOffset!==null&&i.imply("timezoneOffset",-t.instant.getTimezoneOffset()),e.d?(i.assign("day",r.date()),i.assign("month",r.month()+1),i.assign("year",r.year())):(e.week&&i.imply("weekday",r.day()),i.imply("day",r.date()),e.month?(i.assign("month",r.month()+1),i.assign("year",r.year())):(i.imply("month",r.month()+1),e.year?i.assign("year",r.year()):i.imply("year",r.year())))),i}};Cr.ParsingComponents=hu;var Hf=class n{constructor(t,e,r,i,s){this.reference=t,this.refDate=t.instant,this.index=e,this.text=r,this.start=i||new hu(t),this.end=s}clone(){let t=new n(this.reference,this.index,this.text);return t.start=this.start?this.start.clone():null,t.end=this.end?this.end.clone():null,t}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};Cr.ParsingResult=Hf});var ie=M(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.AbstractParserWithWordBoundaryChecking=void 0;var Bf=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(t){let e=this.innerPattern(t);return e==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${e.source}`,e.flags),this.cachedInnerPattern=e,this.cachedPattern)}extract(t,e){var r;let i=(r=e[1])!==null&&r!==void 0?r:"";e.index=e.index+i.length,e[0]=e[0].substring(i.length);for(let s=2;s{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Vf=Nt(),$O=lt(),jO=ie(),HO=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Vf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),BO=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Vf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Gf=class extends jO.AbstractParserWithWordBoundaryChecking{innerPattern(t){return t.option.forwardDate?BO:HO}innerExtract(t,e){let r=Vf.parseTimeUnits(e[1]);return $O.ParsingComponents.createRelativeFromReference(t.reference,r)}};zf.default=Gf});var CT=M(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var GO=It(),OT=Nt(),RT=Nt(),yu=Nt(),VO=Ve(),zO=ie(),QO=new RegExp(`(?:on\\s{0,3})?(${yu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${yu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${VO.matchAnyPattern(OT.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${RT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),DT=1,ET=2,KO=3,xT=4,Qf=class extends zO.AbstractParserWithWordBoundaryChecking{innerPattern(){return QO}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=OT.MONTH_DICTIONARY[e[KO].toLowerCase()],s=yu.parseOrdinalNumberPattern(e[DT]);if(s>31)return e.index=e.index+e[DT].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[xT]){let a=RT.parseYear(e[xT]);r.start.assign("year",a)}else{let a=GO.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[ET]){let a=yu.parseOrdinalNumberPattern(e[ET]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Kf.default=Qf});var NT=M(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var XO=It(),PT=Nt(),bu=Nt(),IT=Nt(),ZO=Ve(),JO=ie(),eR=new RegExp(`(${ZO.matchAnyPattern(PT.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${bu.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${bu.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${IT.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),tR=1,nR=2,MT=3,AT=4,Xf=class extends JO.AbstractParserWithWordBoundaryChecking{innerPattern(){return eR}innerExtract(t,e){let r=PT.MONTH_DICTIONARY[e[tR].toLowerCase()],i=bu.parseOrdinalNumberPattern(e[nR]);if(i>31)return null;let s=t.createParsingComponents({day:i,month:r});if(e[AT]){let l=IT.parseYear(e[AT]);s.assign("year",l)}else{let l=XO.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[MT])return s;let a=bu.parseOrdinalNumberPattern(e[MT]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};Zf.default=Xf});var UT=M(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var Jf=Nt(),rR=It(),iR=Ve(),LT=Nt(),sR=ie(),aR=new RegExp(`((?:in)\\s*)?(${iR.matchAnyPattern(Jf.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${LT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),oR=1,lR=2,FT=3,ep=class extends sR.AbstractParserWithWordBoundaryChecking{innerPattern(){return aR}innerExtract(t,e){let r=e[lR].toLowerCase();if(e[0].length<=3&&!Jf.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index+(e[oR]||"").length,e.index+e[0].length);i.start.imply("day",1);let s=Jf.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[FT]){let a=LT.parseYear(e[FT]);i.start.assign("year",a)}else{let a=rR.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};tp.default=ep});var WT=M(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var YT=Nt(),uR=Ve(),cR=ie(),dR=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${uR.matchAnyPattern(YT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),fR=1,pR=2,qT=3,mR=4,np=class extends cR.AbstractParserWithWordBoundaryChecking{innerPattern(){return dR}innerExtract(t,e){let r=e[qT]?parseInt(e[qT]):YT.MONTH_DICTIONARY[e[pR].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[fR]);return{day:parseInt(e[mR]),month:r,year:i}}};rp.default=np});var $T=M(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var hR=ie(),gR=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),yR=1,bR=2,ip=class extends hR.AbstractParserWithWordBoundaryChecking{innerPattern(){return gR}innerExtract(t,e){let r=parseInt(e[bR]),i=parseInt(e[yR]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};sp.default=ip});var Xi=M(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.AbstractTimeExpressionParser=void 0;var un=_t();function TR(n,t,e,r){return new RegExp(`${n}${t}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,r)}function vR(n,t){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}var jT=2,zs=3,Tu=4,vu=5,uo=6,ap=class{constructor(t=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=t}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(t){return this.getPrimaryTimePatternThroughCache()}extract(t,e){let r=this.extractPrimaryTimeComponents(t,e);if(!r)return e.index+=e[0].length,null;let i=e.index+e[1].length,s=e[0].substring(e[1].length),a=t.createParsingResult(i,s,r);e.index+=e[0].length;let o=t.text.substring(e.index),u=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&u&&u[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!u||u[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(t,u,a),a.end&&(a.text+=u[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(t,e,r=!1){let i=t.createParsingComponents(),s=0,a=null,o=parseInt(e[jT]);if(o>100){if(this.strictMode||e[zs]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(e[zs]!=null){if(e[zs].length==1&&!e[uo])return null;s=parseInt(e[zs])}if(s>=60)return null;if(o>12&&(a=un.Meridiem.PM),e[uo]!=null){if(o>12)return null;let l=e[uo][0].toLowerCase();l=="a"&&(a=un.Meridiem.AM,o==12&&(o=0)),l=="p"&&(a=un.Meridiem.PM,o!=12&&(o+=12))}if(i.assign("hour",o),i.assign("minute",s),a!==null?i.assign("meridiem",a):o<12?i.imply("meridiem",un.Meridiem.AM):i.imply("meridiem",un.Meridiem.PM),e[vu]!=null){let l=parseInt(e[vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Tu]!=null){let l=parseInt(e[Tu]);if(l>=60)return null;i.assign("second",l)}return i}extractFollowingTimeComponents(t,e,r){let i=t.createParsingComponents();if(e[vu]!=null){let l=parseInt(e[vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Tu]!=null){let l=parseInt(e[Tu]);if(l>=60)return null;i.assign("second",l)}let s=parseInt(e[jT]),a=0,o=-1;if(e[zs]!=null?a=parseInt(e[zs]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=un.Meridiem.PM),e[uo]!=null){if(s>12)return null;let l=e[uo][0].toLowerCase();l=="a"&&(o=un.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),l=="p"&&(o=un.Meridiem.PM,s!=12&&(s+=12)),r.start.isCertain("meridiem")||(o==un.Meridiem.AM?(r.start.imply("meridiem",un.Meridiem.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",un.Meridiem.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>s?i.imply("meridiem",un.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",un.Meridiem.PM)):s>12?i.imply("meridiem",un.Meridiem.PM):s<=12&&i.imply("meridiem",un.Meridiem.AM),i.date().getTime()24)return null}return t}checkAndReturnWithFollowingPattern(t){if(t.text.match(/^\d+-\d+$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(e){if(this.strictMode)return null;let r=e[1],i=e[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(r);if(s>24||a>24)return null}return t}getPrimaryTimePatternThroughCache(){let t=this.primaryPrefix(),e=this.primarySuffix();return this.cachedPrimaryPrefix===t&&this.cachedPrimarySuffix===e?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=TR(this.primaryPatternLeftBoundary(),t,e,this.patternFlags()),this.cachedPrimaryPrefix=t,this.cachedPrimarySuffix=e,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let t=this.followingPhase(),e=this.followingSuffix();return this.cachedFollowingPhase===t&&this.cachedFollowingSuffix===e?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=vR(t,e),this.cachedFollowingPhase=t,this.cachedFollowingSuffix=e,this.cachedFollowingTimePatten)}};ku.AbstractTimeExpressionParser=ap});var HT=M(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var _u=_t(),kR=Xi(),op=class extends kR.AbstractTimeExpressionParser{constructor(t){super(t)}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|to|\\?)\\s*"}primaryPrefix(){return"(?:(?:at|from)\\s*)??"}primarySuffix(){return"(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("night")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",_u.Meridiem.PM)):i<6&&r.assign("meridiem",_u.Meridiem.AM)}if(e[0].endsWith("afternoon")){r.assign("meridiem",_u.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("morning")&&(r.assign("meridiem",_u.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};lp.default=op});var jn=M(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.addImpliedTimeUnits=Qs.reverseTimeUnits=void 0;function _R(n){let t={};for(let e in n)t[e]=-n[e];return t}Qs.reverseTimeUnits=_R;function wR(n,t){let e=n.clone(),r=n.dayjs();for(let i in t)r=r.add(t[i],i);return("day"in t||"d"in t||"week"in t||"month"in t||"year"in t)&&(e.imply("day",r.date()),e.imply("month",r.month()+1),e.imply("year",r.year())),("second"in t||"minute"in t||"hour"in t)&&(e.imply("second",r.second()),e.imply("minute",r.minute()),e.imply("hour",r.hour())),e}Qs.addImpliedTimeUnits=wR});var BT=M(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var cp=Nt(),SR=lt(),DR=ie(),ER=jn(),xR=new RegExp(`(${cp.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),OR=new RegExp(`(${cp.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),up=class extends DR.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?OR:xR}innerExtract(t,e){let r=cp.parseTimeUnits(e[1]),i=ER.reverseTimeUnits(r);return SR.ParsingComponents.createRelativeFromReference(t.reference,i)}};dp.default=up});var GT=M(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pp=Nt(),RR=lt(),CR=ie(),MR=new RegExp(`(${pp.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),AR=new RegExp("("+pp.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),PR=1,fp=class extends CR.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?AR:MR}innerExtract(t,e){let r=pp.parseTimeUnits(e[PR]);return RR.ParsingComponents.createRelativeFromReference(t.reference,r)}};mp.default=fp});var Xs=M(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.MergingRefiner=Ks.Filter=void 0;var hp=class{refine(t,e){return e.filter(r=>this.isValid(t,r))}};Ks.Filter=hp;var gp=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0],s=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${l} and ${u} into ${c}`)}),i=c}}return i!=null&&r.push(i),r}};Ks.MergingRefiner=gp});var Mr=M(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var IR=Xs(),yp=class extends IR.MergingRefiner{shouldMergeResults(t,e,r){return!e.end&&!r.end&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){if(!e.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(s=>{e.start.isCertain(s)||e.start.assign(s,r.start.get(s))}),e.start.getCertainComponents().forEach(s=>{r.start.isCertain(s)||r.start.assign(s,e.start.get(s))})),e.start.date().getTime()>r.start.date().getTime()){let s=e.start.dayjs(),a=r.start.dayjs();e.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),e.start.imply("day",s.date()),e.start.imply("month",s.month()+1),e.start.imply("year",s.year())):r.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())):[r,e]=[e,r]}let i=e.clone();return i.start=e.start,i.end=r.start,i.index=Math.min(e.index,r.index),e.index{"use strict";var NR=co&&co.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(co,"__esModule",{value:!0});var FR=NR(Mr()),Tp=class extends FR.default{patternBetween(){return/^\s*(to|-)\s*$/i}};co.default=Tp});var zT=M(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.mergeDateTimeComponent=Zs.mergeDateTimeResult=void 0;var LR=_t();function UR(n,t){let e=n.clone(),r=n.start,i=t.start;if(e.start=vp(r,i),n.end!=null||t.end!=null){let s=n.end==null?n.start:n.end,a=t.end==null?t.start:t.end,o=vp(s,a);n.end==null&&o.date().getTime(){"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var qR=Xs(),QT=zT(),kp=class extends qR.MergingRefiner{shouldMergeResults(t,e,r){return(e.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&e.start.isOnlyTime())&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){let i=e.start.isOnlyDate()?QT.mergeDateTimeResult(e,r):QT.mergeDateTimeResult(r,e);return i.index=e.index,i.text=e.text+t+r.text,i}};_p.default=kp});var KT=M(fo=>{"use strict";var YR=fo&&fo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fo,"__esModule",{value:!0});var WR=YR(Zr()),wp=class extends WR.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};fo.default=wp});var XT=M(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var $R=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),jR={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:60,CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:-300,FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:240,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:-480,PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360},Sp=class{constructor(t){this.timezone=Object.assign(Object.assign({},jR),t)}refine(t,e){var r;let i=(r=t.option.timezones)!==null&&r!==void 0?r:{};return e.forEach(s=>{var a,o;let l=t.text.substring(s.index+s.text.length),u=$R.exec(l);if(!u)return;let c=u[1].toUpperCase(),d=(o=(a=i[c])!==null&&a!==void 0?a:this.timezone[c])!==null&&o!==void 0?o:null;if(d===null)return;t.debug(()=>{console.log(`Extracting timezone: '${c}' into: ${d} for: ${s.start}`)});let f=s.start.get("timezoneOffset");f!==null&&d!=f&&(s.start.isCertain("timezoneOffset")||c!=u[1])||s.start.isOnlyDate()&&c!=u[1]||(s.text+=u[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),e}};Dp.default=Sp});var wu=M(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});var HR=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),BR=1,GR=2,VR=3,Ep=class{refine(t,e){return e.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let i=t.text.substring(r.index+r.text.length),s=HR.exec(i);if(!s)return;t.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${r}`)});let a=parseInt(s[GR]),o=parseInt(s[VR]||"0"),l=a*60+o;l>840||(s[BR]==="-"&&(l=-l),r.end!=null&&r.end.assign("timezoneOffset",l),r.start.assign("timezoneOffset",l),r.text+=s[0])}),e}};xp.default=Ep});var ZT=M(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var Op=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0];for(let s=1;si.text.length&&(i=a):(r.push(i),i=a)}return i!=null&&r.push(i),r}};Rp.default=Op});var JT=M(po=>{"use strict";var zR=po&&po.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(po,"__esModule",{value:!0});var QR=zR(je()),Cp=class{refine(t,e){return t.option.forwardDate&&e.forEach(function(r){let i=QR.default(t.refDate);if(r.start.isOnlyDayMonthComponent()&&i.isAfter(r.start.dayjs()))for(let s=0;s<3&&i.isAfter(r.start.dayjs());s++)r.start.imply("year",r.start.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.end})`)}));r.start.isOnlyWeekdayComponent()&&i.isAfter(r.start.dayjs())&&(i.day()>=r.start.get("weekday")?i=i.day(r.start.get("weekday")+7):i=i.day(r.start.get("weekday")),r.start.imply("day",i.date()),r.start.imply("month",i.month()+1),r.start.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(i.day()>r.end.get("weekday")?i=i.day(r.end.get("weekday")+7):i=i.day(r.end.get("weekday")),r.end.imply("day",i.date()),r.end.imply("month",i.month()+1),r.end.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.end})`)})))}),e}};po.default=Cp});var ev=M(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var KR=Xs(),Mp=class extends KR.Filter{constructor(t){super(),this.strictMode=t}isValid(t,e){return e.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${e.text}'`)}),!1):e.start.isValidDate()?e.end&&!e.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,e):!0:(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.start})`)}),!1)}isStrictModeValid(t,e){return e.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${e} (${e.end})`)}),!1):e.start.isOnlyTime()&&(!e.start.isCertain("hour")||!e.start.isCertain("minute"))?(t.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${e} (${e.end})`)}),!1):!0}};Ap.default=Mp});var Np=M(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var XR=ie(),ZR=new RegExp("([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(?:Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)","i"),JR=1,e0=2,t0=3,tv=4,n0=5,nv=6,rv=7,iv=8,sv=9,Pp=class extends XR.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZR}innerExtract(t,e){let r={};if(r.year=parseInt(e[JR]),r.month=parseInt(e[e0]),r.day=parseInt(e[t0]),e[tv]!=null)if(r.hour=parseInt(e[tv]),r.minute=parseInt(e[n0]),e[nv]!=null&&(r.second=parseInt(e[nv])),e[rv]!=null&&(r.millisecond=parseInt(e[rv])),e[iv]==null)r.timezoneOffset=0;else{let i=parseInt(e[iv]),s=0;e[sv]!=null&&(s=parseInt(e[sv]));let a=i*60;a<0?a-=s:a+=s,r.timezoneOffset=a}return r}};Ip.default=Pp});var av=M(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var r0=Xs(),Fp=class extends r0.MergingRefiner{mergeResults(t,e,r){let i=r.clone();return i.index=e.index,i.text=e.text+t+i.text,i.start.assign("weekday",e.start.get("weekday")),i.end&&i.end.assign("weekday",e.start.get("weekday")),i}shouldMergeResults(t,e,r){return e.start.isOnlyWeekdayComponent()&&!e.start.isCertain("hour")&&r.start.isCertain("day")&&t.match(/^,?\s*$/)!=null}};Lp.default=Fp});var Jr=M(Js=>{"use strict";var Zi=Js&&Js.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Js,"__esModule",{value:!0});Js.includeCommonConfiguration=void 0;var i0=Zi(XT()),s0=Zi(wu()),ov=Zi(ZT()),a0=Zi(JT()),o0=Zi(ev()),l0=Zi(Np()),u0=Zi(av());function c0(n,t=!1){return n.parsers.unshift(new l0.default),n.refiners.unshift(new u0.default),n.refiners.unshift(new i0.default),n.refiners.unshift(new s0.default),n.refiners.unshift(new ov.default),n.refiners.push(new ov.default),n.refiners.push(new a0.default),n.refiners.push(new o0.default(t)),n}Js.includeCommonConfiguration=c0});var ti=M(Ge=>{"use strict";var d0=Ge&&Ge.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.noon=Ge.morning=Ge.midnight=Ge.yesterdayEvening=Ge.evening=Ge.lastNight=Ge.tonight=Ge.theDayAfter=Ge.tomorrow=Ge.theDayBefore=Ge.yesterday=Ge.today=Ge.now=void 0;var Ar=lt(),ea=d0(je()),ei=$n(),mo=_t();function f0(n){let t=ea.default(n.instant),e=new Ar.ParsingComponents(n,{});return ei.assignSimilarDate(e,t),ei.assignSimilarTime(e,t),n.timezoneOffset!==null&&e.assign("timezoneOffset",t.utcOffset()),e}Ge.now=f0;function p0(n){let t=ea.default(n.instant),e=new Ar.ParsingComponents(n,{});return ei.assignSimilarDate(e,t),ei.implySimilarTime(e,t),e}Ge.today=p0;function m0(n){return lv(n,1)}Ge.yesterday=m0;function lv(n,t){return Up(n,-t)}Ge.theDayBefore=lv;function h0(n){return Up(n,1)}Ge.tomorrow=h0;function Up(n,t){let e=ea.default(n.instant),r=new Ar.ParsingComponents(n,{});return e=e.add(t,"day"),ei.assignSimilarDate(r,e),ei.implySimilarTime(r,e),r}Ge.theDayAfter=Up;function g0(n,t=22){let e=ea.default(n.instant),r=new Ar.ParsingComponents(n,{});return r.imply("hour",t),r.imply("meridiem",mo.Meridiem.PM),ei.assignSimilarDate(r,e),r}Ge.tonight=g0;function y0(n,t=0){let e=ea.default(n.instant),r=new Ar.ParsingComponents(n,{});return e.hour()<6&&(e=e.add(-1,"day")),ei.assignSimilarDate(r,e),r.imply("hour",t),r}Ge.lastNight=y0;function b0(n,t=20){let e=new Ar.ParsingComponents(n,{});return e.imply("meridiem",mo.Meridiem.PM),e.imply("hour",t),e}Ge.evening=b0;function T0(n,t=20){let e=ea.default(n.instant),r=new Ar.ParsingComponents(n,{});return e=e.add(-1,"day"),ei.assignSimilarDate(r,e),r.imply("hour",t),r.imply("meridiem",mo.Meridiem.PM),r}Ge.yesterdayEvening=T0;function v0(n){let t=new Ar.ParsingComponents(n,{});return t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t}Ge.midnight=v0;function k0(n,t=6){let e=new Ar.ParsingComponents(n,{});return e.imply("meridiem",mo.Meridiem.AM),e.imply("hour",t),e}Ge.morning=k0;function _0(n){let t=new Ar.ParsingComponents(n,{});return t.imply("meridiem",mo.Meridiem.AM),t.imply("hour",12),t}Ge.noon=_0});var uv=M(lr=>{"use strict";var w0=lr&&lr.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),S0=lr&&lr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),D0=lr&&lr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&w0(t,n,e);return S0(t,n),t},E0=lr&&lr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(lr,"__esModule",{value:!0});var x0=E0(je()),O0=ie(),R0=$n(),ho=D0(ti()),C0=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,qp=class extends O0.AbstractParserWithWordBoundaryChecking{innerPattern(t){return C0}innerExtract(t,e){let r=x0.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"now":return ho.now(t.reference);case"today":return ho.today(t.reference);case"yesterday":return ho.yesterday(t.reference);case"tomorrow":case"tmr":case"tmrw":return ho.tomorrow(t.reference);case"tonight":return ho.tonight(t.reference);default:i.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),R0.assignSimilarDate(s,r),s.imply("hour",0));break}return s}};lr.default=qp});var cv=M(go=>{"use strict";var M0=go&&go.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(go,"__esModule",{value:!0});var Su=_t(),A0=ie(),P0=M0(je()),I0=$n(),N0=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,Yp=class extends A0.AbstractParserWithWordBoundaryChecking{innerPattern(){return N0}innerExtract(t,e){let r=P0.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"afternoon":i.imply("meridiem",Su.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Su.Meridiem.PM),i.imply("hour",20);break;case"midnight":I0.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Su.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Su.Meridiem.AM),i.imply("hour",12);break}return i}};go.default=Yp});var Ji=M(Oi=>{"use strict";var F0=Oi&&Oi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.toDayJSClosestWeekday=Oi.toDayJSWeekday=void 0;var dv=F0(je());function L0(n,t,e){if(!e)return fv(n,t);let r=dv.default(n);switch(e){case"this":r=r.day(t);break;case"next":r=r.day(t+7);break;case"last":r=r.day(t-7);break}return r}Oi.toDayJSWeekday=L0;function fv(n,t){let e=dv.default(n),r=e.day();return Math.abs(t-7-r){"use strict";Object.defineProperty($p,"__esModule",{value:!0});var pv=Nt(),U0=Ve(),q0=ie(),Y0=Ji(),W0=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${U0.matchAnyPattern(pv.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),$0=1,j0=2,H0=3,Wp=class extends q0.AbstractParserWithWordBoundaryChecking{innerPattern(){return W0}innerExtract(t,e){let r=e[j0].toLowerCase(),i=pv.WEEKDAY_DICTIONARY[r],s=e[$0],a=e[H0],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="last"||o=="past"?l="last":o=="next"?l="next":o=="this"&&(l="this");let u=Y0.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};$p.default=Wp});var yv=M(yo=>{"use strict";var B0=yo&&yo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yo,"__esModule",{value:!0});var gv=Nt(),hv=lt(),G0=B0(je()),V0=ie(),z0=Ve(),Q0=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${z0.matchAnyPattern(gv.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),K0=1,X0=2,jp=class extends V0.AbstractParserWithWordBoundaryChecking{innerPattern(){return Q0}innerExtract(t,e){let r=e[K0].toLowerCase(),i=e[X0].toLowerCase(),s=gv.TIME_UNIT_DICTIONARY[i];if(r=="next"||r.startsWith("after")){let l={};return l[s]=1,hv.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="last"||r=="past"){let l={};return l[s]=-1,hv.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=G0.default(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};yo.default=jp});var ur=M(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.ParsingContext=na.Chrono=void 0;var ta=lt(),Z0=Bp(),Hp=class n{constructor(t){t=t||Z0.createCasualConfiguration(),this.parsers=[...t.parsers],this.refiners=[...t.refiners]}clone(){return new n({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(t,e,r){let i=this.parse(t,e,r);return i.length>0?i[0].start.date():null}parse(t,e,r){let i=new Du(t,e,r),s=[];return this.parsers.forEach(a=>{let o=n.executeParser(i,a);s=s.concat(o)}),s.sort((a,o)=>a.index-o.index),this.refiners.forEach(function(a){s=a.refine(i,s)}),s}static executeParser(t,e){let r=[],i=e.pattern(t),s=t.text,a=t.text,o=i.exec(a);for(;o;){let l=o.index+s.length-a.length;o.index=l;let u=e.extract(t,o);if(!u){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;u instanceof ta.ParsingResult?c=u:u instanceof ta.ParsingComponents?(c=t.createParsingResult(o.index,o[0]),c.start=u):c=t.createParsingResult(o.index,o[0],u),t.debug(()=>console.log(`${e.constructor.name} extracted result ${c}`)),r.push(c),a=s.substring(l+c.text.length),o=i.exec(a)}return r}};na.Chrono=Hp;var Du=class{constructor(t,e,r){this.text=t,this.reference=new ta.ReferenceWithTimezone(e),this.option=r!=null?r:{},this.refDate=this.reference.instant}createParsingComponents(t){return t instanceof ta.ParsingComponents?t:new ta.ParsingComponents(this.reference,t)}createParsingResult(t,e,r,i){let s=typeof e=="string"?e:this.text.substring(t,e),a=r?this.createParsingComponents(r):null,o=i?this.createParsingComponents(i):null;return new ta.ParsingResult(this.reference,t,s,a,o)}debug(t){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(t):this.option.debug.debug(t))}};na.ParsingContext=Du});var es=M(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var bv=It(),J0=new RegExp("([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)","i"),Eu=1,Tv=5,vv=2,kv=3,Gp=4,Vp=class{constructor(t){this.groupNumberMonth=t?kv:vv,this.groupNumberDay=t?vv:kv}pattern(){return J0}extract(t,e){if(e[Eu]=="/"||e[Tv]=="/"){e.index+=e[0].length;return}let r=e.index+e[Eu].length,i=e[0].substr(e[Eu].length,e[0].length-e[Eu].length-e[Tv].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!e[Gp]&&e[0].indexOf("/")<0)return;let s=t.createParsingResult(r,i),a=parseInt(e[this.groupNumberMonth]),o=parseInt(e[this.groupNumberDay]);if((a<1||a>12)&&a>12)if(o>=1&&o<=12&&a<=31)[o,a]=[a,o];else return null;if(o<1||o>31)return null;if(s.start.assign("day",o),s.start.assign("month",a),e[Gp]){let l=parseInt(e[Gp]),u=bv.findMostLikelyADYear(l);s.start.assign("year",u)}else{let l=bv.findYearClosestToRef(t.refDate,o,a);s.start.imply("year",l)}return s}};zp.default=Vp});var wv=M(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var _v=Nt(),eC=lt(),tC=ie(),nC=jn(),rC=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${_v.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Qp=class extends tC.AbstractParserWithWordBoundaryChecking{innerPattern(){return rC}innerExtract(t,e){let r=e[1].toLowerCase(),i=_v.parseTimeUnits(e[2]);switch(r){case"last":case"past":case"-":i=nC.reverseTimeUnits(i);break}return eC.ParsingComponents.createRelativeFromReference(t.reference,i)}};Kp.default=Qp});var Dv=M(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var iC=Xs(),Xp=lt(),sC=Nt(),aC=jn();function Sv(n){return n.text.match(/\s+(before|from)$/i)!=null}function oC(n){return n.text.match(/\s+(after|since)$/i)!=null}var Zp=class extends iC.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(t,e,r){return!t.match(this.patternBetween())||!Sv(e)&&!oC(e)?!1:!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(t,e,r){let i=sC.parseTimeUnits(e.text);Sv(e)&&(i=aC.reverseTimeUnits(i));let s=Xp.ParsingComponents.createRelativeFromReference(new Xp.ReferenceWithTimezone(r.start.date()),i);return new Xp.ParsingResult(r.reference,e.index,`${e.text}${t}${r.text}`,s)}};Jp.default=Zp});var Bp=M(mt=>{"use strict";var Dt=mt&&mt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(mt,"__esModule",{value:!0});mt.createConfiguration=mt.createCasualConfiguration=mt.parseDate=mt.parse=mt.GB=mt.strict=mt.casual=void 0;var lC=Dt(ST()),uC=Dt(CT()),cC=Dt(NT()),dC=Dt(UT()),fC=Dt(WT()),pC=Dt($T()),mC=Dt(HT()),hC=Dt(BT()),gC=Dt(GT()),yC=Dt(VT()),bC=Dt(KT()),TC=Jr(),vC=Dt(uv()),kC=Dt(cv()),_C=Dt(mv()),wC=Dt(yv()),em=ur(),SC=Dt(es()),DC=Dt(wv()),EC=Dt(Dv());mt.casual=new em.Chrono(Ev(!1));mt.strict=new em.Chrono(xu(!0,!1));mt.GB=new em.Chrono(xu(!1,!0));function xC(n,t,e){return mt.casual.parse(n,t,e)}mt.parse=xC;function OC(n,t,e){return mt.casual.parseDate(n,t,e)}mt.parseDate=OC;function Ev(n=!1){let t=xu(!1,n);return t.parsers.unshift(new vC.default),t.parsers.unshift(new kC.default),t.parsers.unshift(new dC.default),t.parsers.unshift(new wC.default),t.parsers.unshift(new DC.default),t}mt.createCasualConfiguration=Ev;function xu(n=!0,t=!1){return TC.includeCommonConfiguration({parsers:[new SC.default(t),new lC.default,new uC.default,new cC.default,new _C.default,new fC.default,new pC.default,new mC.default(n),new hC.default(n),new gC.default(n)],refiners:[new EC.default,new bC.default,new yC.default]},n)}mt.createConfiguration=xu});var xv=M(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var RC=Xi(),tm=class extends RC.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};nm.default=tm});var bo=M(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.parseTimeUnits=Qe.TIME_UNITS_PATTERN=Qe.parseYear=Qe.YEAR_PATTERN=Qe.parseNumberPattern=Qe.NUMBER_PATTERN=Qe.TIME_UNIT_DICTIONARY=Qe.INTEGER_WORD_DICTIONARY=Qe.MONTH_DICTIONARY=Qe.WEEKDAY_DICTIONARY=void 0;var rm=Ve(),CC=It();Qe.WEEKDAY_DICTIONARY={sonntag:0,so:0,montag:1,mo:1,dienstag:2,di:2,mittwoch:3,mi:3,donnerstag:4,do:4,freitag:5,fr:5,samstag:6,sa:6};Qe.MONTH_DICTIONARY={januar:1,j\u00E4nner:1,janner:1,jan:1,"jan.":1,februar:2,feber:2,feb:2,"feb.":2,m\u00E4rz:3,maerz:3,m\u00E4r:3,"m\xE4r.":3,mrz:3,"mrz.":3,april:4,apr:4,"apr.":4,mai:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,august:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,dezember:12,dez:12,"dez.":12};Qe.INTEGER_WORD_DICTIONARY={eins:1,eine:1,einem:1,einen:1,einer:1,zwei:2,drei:3,vier:4,f\u00FCnf:5,fuenf:5,sechs:6,sieben:7,acht:8,neun:9,zehn:10,elf:11,zw\u00F6lf:12,zwoelf:12};Qe.TIME_UNIT_DICTIONARY={sek:"second",sekunde:"second",sekunden:"second",min:"minute",minute:"minute",minuten:"minute",h:"hour",std:"hour",stunde:"hour",stunden:"hour",tag:"d",tage:"d",tagen:"d",woche:"week",wochen:"week",monat:"month",monate:"month",monaten:"month",monats:"month",quartal:"quarter",quartals:"quarter",quartale:"quarter",quartalen:"quarter",a:"year",j:"year",jr:"year",jahr:"year",jahre:"year",jahren:"year",jahres:"year"};Qe.NUMBER_PATTERN=`(?:${rm.matchAnyPattern(Qe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function Rv(n){let t=n.toLowerCase();return Qe.INTEGER_WORD_DICTIONARY[t]!==void 0?Qe.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Qe.parseNumberPattern=Rv;Qe.YEAR_PATTERN="(?:[0-9]{1,4}(?:\\s*[vn]\\.?\\s*(?:C(?:hr)?|(?:u\\.?|d\\.?(?:\\s*g\\.?)?)?\\s*Z)\\.?|\\s*(?:u\\.?|d\\.?(?:\\s*g\\.)?)\\s*Z\\.?)?)";function MC(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));if(/z/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let t=parseInt(n);return CC.findMostLikelyADYear(t)}Qe.parseYear=MC;var Cv=`(${Qe.NUMBER_PATTERN})\\s{0,5}(${rm.matchAnyPattern(Qe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Ov=new RegExp(Cv,"i");Qe.TIME_UNITS_PATTERN=rm.repeatedTimeunitPattern("",Cv);function AC(n){let t={},e=n,r=Ov.exec(e);for(;r;)PC(t,r),e=e.substring(r[0].length),r=Ov.exec(e);return t}Qe.parseTimeUnits=AC;function PC(n,t){let e=Rv(t[1]),r=Qe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var Av=M(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Mv=bo(),IC=Ve(),NC=ie(),FC=Ji(),LC=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${IC.matchAnyPattern(Mv.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),UC=1,qC=3,YC=2,im=class extends NC.AbstractParserWithWordBoundaryChecking{innerPattern(){return LC}innerExtract(t,e){let r=e[YC].toLowerCase(),i=Mv.WEEKDAY_DICTIONARY[r],s=e[UC],a=e[qC],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this");let u=FC.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};sm.default=im});var Fv=M(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Ri=_t(),WC=new RegExp("(^|\\s|T)(?:(?:um|von)\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),$C=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|bis(?:\\s+um)?|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s)?)?(?:\\s*Uhr)?(?:\\s*(morgens|vormittags|nachmittags|abends|nachts|am\\s+(?:Morgen|Vormittag|Nachmittag|Abend)|in\\s+der\\s+Nacht))?(?=\\W|$)","i"),jC=2,Pv=3,Iv=4,Nv=5,am=class n{pattern(t){return WC}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=$C.exec(i);return s&&(r.end=n.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[jC]),e[Pv]!=null&&(i=parseInt(e[Pv])),i>=60||r>24)return null;if(r>=12&&(s=Ri.Meridiem.PM),e[Nv]!=null){if(r>12)return null;let a=e[Nv].toLowerCase();a.match(/morgen|vormittag/)&&(s=Ri.Meridiem.AM,r==12&&(r=0)),a.match(/nachmittag|abend/)&&(s=Ri.Meridiem.PM,r!=12&&(r+=12)),a.match(/nacht/)&&(r==12?(s=Ri.Meridiem.AM,r=0):r<6?s=Ri.Meridiem.AM:(s=Ri.Meridiem.PM,r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",Ri.Meridiem.AM):t.imply("meridiem",Ri.Meridiem.PM),e[Iv]!=null){let a=parseInt(e[Iv]);if(a>=60)return null;t.assign("second",a)}return t}};om.default=am});var Lv=M(To=>{"use strict";var HC=To&&To.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(To,"__esModule",{value:!0});var BC=HC(Mr()),lm=class extends BC.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};To.default=lm});var Uv=M(vo=>{"use strict";var GC=vo&&vo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vo,"__esModule",{value:!0});var VC=GC(Zr()),um=class extends VC.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};vo.default=um});var dm=M(ko=>{"use strict";var zC=ko&&ko.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ko,"__esModule",{value:!0});var QC=zC(je()),ts=_t(),KC=ie(),XC=$n(),ZC=jn(),cm=class n extends KC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(t,e){let r=QC.default(t.refDate),i=e[2].toLowerCase(),s=t.createParsingComponents();return XC.implySimilarTime(s,r),n.extractTimeComponents(s,i)}static extractTimeComponents(t,e){switch(e){case"morgen":t.imply("hour",6),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"vormittag":t.imply("hour",9),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"mittag":case"mittags":t.imply("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break;case"nachmittag":t.imply("hour",15),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"abend":t.imply("hour",18),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"nacht":t.imply("hour",22),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.PM);break;case"mitternacht":t.get("hour")>1&&(t=ZC.addImpliedTimeUnits(t,{day:1})),t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ts.Meridiem.AM);break}return t}};ko.default=cm});var Wv=M(cr=>{"use strict";var JC=cr&&cr.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),eM=cr&&cr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),tM=cr&&cr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&JC(t,n,e);return eM(t,n),t},Yv=cr&&cr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(cr,"__esModule",{value:!0});var nM=Yv(je()),rM=ie(),ns=$n(),iM=Yv(dm()),qv=tM(ti()),sM=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),aM=1,oM=2,fm=class extends rM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return sM}innerExtract(t,e){let r=nM.default(t.refDate),i=(e[aM]||"").toLowerCase(),s=(e[oM]||"").toLowerCase(),a=t.createParsingComponents();switch(i){case"jetzt":a=qv.now(t.reference);break;case"heute":a=qv.today(t.reference);break;case"morgen":ns.assignTheNextDay(a,r);break;case"\xFCbermorgen":case"uebermorgen":r=r.add(1,"day"),ns.assignTheNextDay(a,r);break;case"gestern":r=r.add(-1,"day"),ns.assignSimilarDate(a,r),ns.implySimilarTime(a,r);break;case"vorgestern":r=r.add(-2,"day"),ns.assignSimilarDate(a,r),ns.implySimilarTime(a,r);break;default:i.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),ns.assignSimilarDate(a,r),a.imply("hour",0));break}return s&&(a=iM.default.extractTimeComponents(a,s)),a}};cr.default=fm});var Vv=M(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var lM=It(),Bv=bo(),Gv=bo(),uM=Ve(),cM=ie(),dM=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${uM.matchAnyPattern(Bv.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Gv.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),$v=1,jv=2,fM=3,Hv=4,pm=class extends cM.AbstractParserWithWordBoundaryChecking{innerPattern(){return dM}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Bv.MONTH_DICTIONARY[e[fM].toLowerCase()],s=parseInt(e[$v]);if(s>31)return e.index=e.index+e[$v].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[Hv]){let a=Gv.parseYear(e[Hv]);r.start.assign("year",a)}else{let a=lM.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[jv]){let a=parseInt(e[jv]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};mm.default=pm});var zv=M(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var Ou=bo(),pM=lt(),mM=ie(),hM=jn(),gM=Ve(),hm=class extends mM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:\\s*((?:n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?|vor|in)\\s*)?(${Ou.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${gM.matchAnyPattern(Ou.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(t,e){let r=e[2]?Ou.parseNumberPattern(e[2]):1,i=Ou.TIME_UNIT_DICTIONARY[e[4].toLowerCase()],s={};s[i]=r;let a=e[1]||e[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=hM.reverseTimeUnits(s)),pM.ParsingComponents.createRelativeFromReference(t.reference,s)}};gm.default=hm});var Xv=M(Et=>{"use strict";var dr=Et&&Et.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConfiguration=Et.createCasualConfiguration=Et.parseDate=Et.parse=Et.strict=Et.casual=void 0;var yM=Jr(),Qv=ur(),bM=dr(es()),TM=dr(Np()),vM=dr(xv()),kM=dr(Av()),_M=dr(Fv()),wM=dr(Lv()),SM=dr(Uv()),DM=dr(Wv()),EM=dr(dm()),xM=dr(Vv()),OM=dr(zv());Et.casual=new Qv.Chrono(Kv());Et.strict=new Qv.Chrono(ym(!0));function RM(n,t,e){return Et.casual.parse(n,t,e)}Et.parse=RM;function CM(n,t,e){return Et.casual.parseDate(n,t,e)}Et.parseDate=CM;function Kv(n=!0){let t=ym(!1,n);return t.parsers.unshift(new EM.default),t.parsers.unshift(new DM.default),t.parsers.unshift(new OM.default),t}Et.createCasualConfiguration=Kv;function ym(n=!0,t=!0){return yM.includeCommonConfiguration({parsers:[new TM.default,new bM.default(t),new vM.default,new _M.default,new xM.default,new kM.default],refiners:[new wM.default,new SM.default]},n)}Et.createConfiguration=ym});var Jv=M(fr=>{"use strict";var MM=fr&&fr.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),AM=fr&&fr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),PM=fr&&fr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&MM(t,n,e);return AM(t,n),t},IM=fr&&fr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fr,"__esModule",{value:!0});var NM=IM(je()),FM=_t(),LM=ie(),Zv=$n(),Ru=PM(ti()),bm=class extends LM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(t,e){let r=NM.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"maintenant":return Ru.now(t.reference);case"aujourd'hui":return Ru.today(t.reference);case"hier":return Ru.yesterday(t.reference);case"demain":return Ru.tomorrow(t.reference);default:i.match(/cette\s*nuit/)?(Zv.assignSimilarDate(s,r),s.imply("hour",22),s.imply("meridiem",FM.Meridiem.PM)):i.match(/la\s*veille/)&&(r=r.add(-1,"day"),Zv.assignSimilarDate(s,r),s.imply("hour",0))}return s}};fr.default=bm});var ek=M(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var _o=_t(),UM=ie(),Tm=class extends UM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(t,e){let r=e[2].toLowerCase(),i=t.createParsingComponents();switch(r){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",_o.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",_o.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",_o.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",_o.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",_o.Meridiem.AM);break}return i}};vm.default=Tm});var tk=M(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var qM=Xi(),km=class extends qM.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};_m.default=km});var nk=M(wo=>{"use strict";var YM=wo&&wo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wo,"__esModule",{value:!0});var WM=YM(Zr()),wm=class extends WM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};wo.default=wm});var rk=M(So=>{"use strict";var $M=So&&So.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(So,"__esModule",{value:!0});var jM=$M(Mr()),Sm=class extends jM.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};So.default=Sm});var Ci=M(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.parseTimeUnits=He.TIME_UNITS_PATTERN=He.parseYear=He.YEAR_PATTERN=He.parseOrdinalNumberPattern=He.ORDINAL_NUMBER_PATTERN=He.parseNumberPattern=He.NUMBER_PATTERN=He.TIME_UNIT_DICTIONARY=He.INTEGER_WORD_DICTIONARY=He.MONTH_DICTIONARY=He.WEEKDAY_DICTIONARY=void 0;var Dm=Ve();He.WEEKDAY_DICTIONARY={dimanche:0,dim:0,lundi:1,lun:1,mardi:2,mar:2,mercredi:3,mer:3,jeudi:4,jeu:4,vendredi:5,ven:5,samedi:6,sam:6};He.MONTH_DICTIONARY={janvier:1,jan:1,"jan.":1,f\u00E9vrier:2,f\u00E9v:2,"f\xE9v.":2,fevrier:2,fev:2,"fev.":2,mars:3,mar:3,"mar.":3,avril:4,avr:4,"avr.":4,mai:5,juin:6,jun:6,juillet:7,juil:7,jul:7,"jul.":7,ao\u00FBt:8,aout:8,septembre:9,sep:9,"sep.":9,sept:9,"sept.":9,octobre:10,oct:10,"oct.":10,novembre:11,nov:11,"nov.":11,d\u00E9cembre:12,decembre:12,dec:12,"dec.":12};He.INTEGER_WORD_DICTIONARY={un:1,deux:2,trois:3,quatre:4,cinq:5,six:6,sept:7,huit:8,neuf:9,dix:10,onze:11,douze:12,treize:13};He.TIME_UNIT_DICTIONARY={sec:"second",seconde:"second",secondes:"second",min:"minute",mins:"minute",minute:"minute",minutes:"minute",h:"hour",hr:"hour",hrs:"hour",heure:"hour",heures:"hour",jour:"d",jours:"d",semaine:"week",semaines:"week",mois:"month",trimestre:"quarter",trimestres:"quarter",ans:"year",ann\u00E9e:"year",ann\u00E9es:"year"};He.NUMBER_PATTERN=`(?:${Dm.matchAnyPattern(He.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function sk(n){let t=n.toLowerCase();return He.INTEGER_WORD_DICTIONARY[t]!==void 0?He.INTEGER_WORD_DICTIONARY[t]:t==="une"||t==="un"?1:t.match(/quelques?/)?3:t.match(/demi-?/)?.5:parseFloat(t)}He.parseNumberPattern=sk;He.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function HM(n){let t=n.toLowerCase();return t=t.replace(/(?:er)$/i,""),parseInt(t)}He.parseOrdinalNumberPattern=HM;He.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:AC|AD|p\\.\\s*C(?:hr?)?\\.\\s*n\\.)|[1-2][0-9]{3}|[5-9][0-9])";function BM(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}He.parseYear=BM;var ak=`(${He.NUMBER_PATTERN})\\s{0,5}(${Dm.matchAnyPattern(He.TIME_UNIT_DICTIONARY)})\\s{0,5}`,ik=new RegExp(ak,"i");He.TIME_UNITS_PATTERN=Dm.repeatedTimeunitPattern("",ak);function GM(n){let t={},e=n,r=ik.exec(e);for(;r;)VM(t,r),e=e.substring(r[0].length),r=ik.exec(e);return t}He.parseTimeUnits=GM;function VM(n,t){let e=sk(t[1]),r=He.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var lk=M(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var ok=Ci(),zM=Ve(),QM=ie(),KM=Ji(),XM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${zM.matchAnyPattern(ok.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),ZM=1,JM=2,Em=class extends QM.AbstractParserWithWordBoundaryChecking{innerPattern(){return XM}innerExtract(t,e){let r=e[ZM].toLowerCase(),i=ok.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[JM];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=KM.toDayJSWeekday(t.refDate,i,a);return t.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};xm.default=Em});var fk=M(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Do=_t(),eA=new RegExp("(^|\\s|T)(?:(?:[\xE0a])\\s*)?(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),tA=new RegExp("^\\s*(\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*(\\d{1,2})(?:h|:)?(?:(\\d{1,2})(?:m|:)?)?(?:(\\d{1,2})(?:s|:)?)?(?:\\s*(A\\.M\\.|P\\.M\\.|AM?|PM?))?(?=\\W|$)","i"),nA=2,uk=3,ck=4,dk=5,Om=class n{pattern(t){return eA}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=n.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=tA.exec(i);return s&&(r.end=n.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[nA]),e[uk]!=null&&(i=parseInt(e[uk])),i>=60||r>24)return null;if(r>=12&&(s=Do.Meridiem.PM),e[dk]!=null){if(r>12)return null;let a=e[dk][0].toLowerCase();a=="a"&&(s=Do.Meridiem.AM,r==12&&(r=0)),a=="p"&&(s=Do.Meridiem.PM,r!=12&&(r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",Do.Meridiem.AM):t.imply("meridiem",Do.Meridiem.PM),e[ck]!=null){let a=parseInt(e[ck]);if(a>=60)return null;t.assign("second",a)}return t}};Rm.default=Om});var bk=M(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var rA=It(),gk=Ci(),yk=Ci(),Cu=Ci(),iA=Ve(),sA=ie(),aA=new RegExp(`(?:on\\s*?)?(${Cu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${Cu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${iA.matchAnyPattern(gk.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${yk.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),pk=1,mk=2,oA=3,hk=4,Cm=class extends sA.AbstractParserWithWordBoundaryChecking{innerPattern(){return aA}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=gk.MONTH_DICTIONARY[e[oA].toLowerCase()],s=Cu.parseOrdinalNumberPattern(e[pk]);if(s>31)return e.index=e.index+e[pk].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[hk]){let a=yk.parseYear(e[hk]);r.start.assign("year",a)}else{let a=rA.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[mk]){let a=Cu.parseOrdinalNumberPattern(e[mk]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Mm.default=Cm});var vk=M(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var Tk=Ci(),lA=lt(),uA=ie(),cA=jn(),Am=class extends uA.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${Tk.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(t,e){let r=Tk.parseTimeUnits(e[1]),i=cA.reverseTimeUnits(r);return lA.ParsingComponents.createRelativeFromReference(t.reference,i)}};Pm.default=Am});var _k=M(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var kk=Ci(),dA=lt(),fA=ie(),Im=class extends fA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${kk.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(t,e){let r=kk.parseTimeUnits(e[1]);return dA.ParsingComponents.createRelativeFromReference(t.reference,r)}};Nm.default=Im});var wk=M(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var Mu=Ci(),pA=lt(),mA=ie(),hA=jn(),gA=Ve(),Fm=class extends mA.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${Mu.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${gA.matchAnyPattern(Mu.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(t,e){let r=e[1]?Mu.parseNumberPattern(e[1]):1,i=Mu.TIME_UNIT_DICTIONARY[e[3].toLowerCase()],s={};s[i]=r;let a=e[2]||e[4]||"";if(a=a.toLowerCase(),!!a)return(/derni[eè]re?s?/.test(a)||/pass[ée]e?s?/.test(a)||/pr[ée]c[ée]dents?/.test(a))&&(s=hA.reverseTimeUnits(s)),pA.ParsingComponents.createRelativeFromReference(t.reference,s)}};Lm.default=Fm});var Ek=M(xt=>{"use strict";var Hn=xt&&xt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xt,"__esModule",{value:!0});xt.createConfiguration=xt.createCasualConfiguration=xt.parseDate=xt.parse=xt.strict=xt.casual=void 0;var yA=Jr(),Sk=ur(),bA=Hn(Jv()),TA=Hn(ek()),vA=Hn(es()),kA=Hn(tk()),_A=Hn(nk()),wA=Hn(rk()),SA=Hn(lk()),DA=Hn(fk()),EA=Hn(bk()),xA=Hn(vk()),OA=Hn(_k()),RA=Hn(wk());xt.casual=new Sk.Chrono(Dk());xt.strict=new Sk.Chrono(Um(!0));function CA(n,t,e){return xt.casual.parse(n,t,e)}xt.parse=CA;function MA(n,t,e){return xt.casual.parseDate(n,t,e)}xt.parseDate=MA;function Dk(n=!0){let t=Um(!1,n);return t.parsers.unshift(new bA.default),t.parsers.unshift(new TA.default),t.parsers.unshift(new RA.default),t}xt.createCasualConfiguration=Dk;function Um(n=!0,t=!0){return yA.includeCommonConfiguration({parsers:[new vA.default(t),new EA.default,new kA.default,new DA.default,new xA.default,new OA.default,new SA.default],refiners:[new _A.default,new wA.default]},n)}xt.createConfiguration=Um});var xk=M(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.toHankaku=void 0;function AA(n){return String(n).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,PA)}Au.toHankaku=AA;function PA(n){return String.fromCharCode(n.charCodeAt(0)-65248)}});var Rk=M(Eo=>{"use strict";var IA=Eo&&Eo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Eo,"__esModule",{value:!0});var qm=xk(),NA=It(),FA=IA(je()),LA=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,Ok=1,UA=2,Ym=3,qA=4,YA=5,WA=6,Wm=class{pattern(){return LA}extract(t,e){let r=parseInt(qm.toHankaku(e[YA])),i=parseInt(qm.toHankaku(e[WA])),s=t.createParsingComponents({day:i,month:r});if(e[Ok]&&e[Ok].match("\u540C|\u4ECA|\u672C")){let a=FA.default(t.refDate);s.assign("year",a.year())}if(e[UA]){let a=e[qA],o=a=="\u5143"?1:parseInt(qm.toHankaku(a));e[Ym]=="\u4EE4\u548C"?o+=2018:e[Ym]=="\u5E73\u6210"?o+=1988:e[Ym]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=NA.findYearClosestToRef(t.refDate,i,r);s.imply("year",a)}return s}};Eo.default=Wm});var Ck=M(xo=>{"use strict";var $A=xo&&xo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xo,"__esModule",{value:!0});var jA=$A(Mr()),$m=class extends jA.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};xo.default=$m});var Ak=M(pr=>{"use strict";var HA=pr&&pr.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),BA=pr&&pr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),GA=pr&&pr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&HA(t,n,e);return BA(t,n),t},VA=pr&&pr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pr,"__esModule",{value:!0});var zA=VA(je()),Mk=_t(),jm=GA(ti()),QA=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,Hm=class{pattern(){return QA}extract(t,e){let r=e[0],i=zA.default(t.refDate),s=t.createParsingComponents();switch(r){case"\u6628\u65E5":return jm.yesterday(t.reference);case"\u660E\u65E5":return jm.tomorrow(t.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return jm.today(t.reference)}return r=="\u4ECA\u591C"||r=="\u4ECA\u5915"||r=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",Mk.Meridiem.PM)):r.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",Mk.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};pr.default=Hm});var Nk=M(Ot=>{"use strict";var Bm=Ot&&Ot.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createConfiguration=Ot.createCasualConfiguration=Ot.parseDate=Ot.parse=Ot.strict=Ot.casual=void 0;var KA=Bm(Rk()),XA=Bm(Ck()),ZA=Bm(Ak()),Pk=ur();Ot.casual=new Pk.Chrono(Ik());Ot.strict=new Pk.Chrono(Gm());function JA(n,t,e){return Ot.casual.parse(n,t,e)}Ot.parse=JA;function eP(n,t,e){return Ot.casual.parseDate(n,t,e)}Ot.parseDate=eP;function Ik(){let n=Gm();return n.parsers.unshift(new ZA.default),n}Ot.createCasualConfiguration=Ik;function Gm(){return{parsers:[new KA.default],refiners:[new XA.default]}}Ot.createConfiguration=Gm});var Pu=M(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.parseYear=Pr.YEAR_PATTERN=Pr.MONTH_DICTIONARY=Pr.WEEKDAY_DICTIONARY=void 0;Pr.WEEKDAY_DICTIONARY={domingo:0,dom:0,segunda:1,"segunda-feira":1,seg:1,ter\u00E7a:2,"ter\xE7a-feira":2,ter:2,quarta:3,"quarta-feira":3,qua:3,quinta:4,"quinta-feira":4,qui:4,sexta:5,"sexta-feira":5,sex:5,s\u00E1bado:6,sabado:6,sab:6};Pr.MONTH_DICTIONARY={janeiro:1,jan:1,"jan.":1,fevereiro:2,fev:2,"fev.":2,mar\u00E7o:3,mar:3,"mar.":3,abril:4,abr:4,"abr.":4,maio:5,mai:5,"mai.":5,junho:6,jun:6,"jun.":6,julho:7,jul:7,"jul.":7,agosto:8,ago:8,"ago.":8,setembro:9,set:9,"set.":9,outubro:10,out:10,"out.":10,novembro:11,nov:11,"nov.":11,dezembro:12,dez:12,"dez.":12};Pr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function tP(n){if(n.match(/^[0-9]{1,4}$/)){let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}Pr.parseYear=tP});var Lk=M(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Fk=Pu(),nP=Ve(),rP=ie(),iP=Ji(),sP=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${nP.matchAnyPattern(Fk.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),aP=1,oP=2,lP=3,Vm=class extends rP.AbstractParserWithWordBoundaryChecking{innerPattern(){return sP}innerExtract(t,e){let r=e[oP].toLowerCase(),i=Fk.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[aP],a=e[lP],o=s||a||"";o=o.toLowerCase();let l=null;o=="passado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this");let u=iP.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};zm.default=Vm});var Uk=M(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var uP=Xi(),Qm=class extends uP.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Km.default=Qm});var qk=M(Oo=>{"use strict";var cP=Oo&&Oo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Oo,"__esModule",{value:!0});var dP=cP(Zr()),Xm=class extends dP.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};Oo.default=Xm});var Yk=M(Ro=>{"use strict";var fP=Ro&&Ro.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ro,"__esModule",{value:!0});var pP=fP(Mr()),Zm=class extends pP.default{patternBetween(){return/^\s*(?:-)\s*$/i}};Ro.default=Zm});var Gk=M(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var mP=It(),Hk=Pu(),Bk=Pu(),hP=Ve(),gP=ie(),yP=new RegExp(`([0-9]{1,2})(?:\xBA|\xAA|\xB0)?(?:\\s*(?:desde|de|\\-|\\\u2013|ao?|\\s)\\s*([0-9]{1,2})(?:\xBA|\xAA|\xB0)?)?\\s*(?:de)?\\s*(?:-|/|\\s*(?:de|,)?\\s*)(${hP.matchAnyPattern(Hk.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Bk.YEAR_PATTERN}))?(?=\\W|$)`,"i"),Wk=1,$k=2,bP=3,jk=4,Jm=class extends gP.AbstractParserWithWordBoundaryChecking{innerPattern(){return yP}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Hk.MONTH_DICTIONARY[e[bP].toLowerCase()],s=parseInt(e[Wk]);if(s>31)return e.index=e.index+e[Wk].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[jk]){let a=Bk.parseYear(e[jk]);r.start.assign("year",a)}else{let a=mP.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[$k]){let a=parseInt(e[$k]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};eh.default=Jm});var Vk=M(ni=>{"use strict";var TP=ni&&ni.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),vP=ni&&ni.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),kP=ni&&ni.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&TP(t,n,e);return vP(t,n),t};Object.defineProperty(ni,"__esModule",{value:!0});var _P=ie(),Iu=kP(ti()),th=class extends _P.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"agora":return Iu.now(t.reference);case"hoje":return Iu.today(t.reference);case"amanha":case"amanh\xE3":return Iu.tomorrow(t.reference);case"ontem":return Iu.yesterday(t.reference)}return i}};ni.default=th});var zk=M(Co=>{"use strict";var wP=Co&&Co.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Co,"__esModule",{value:!0});var Nu=_t(),SP=ie(),DP=$n(),EP=wP(je()),nh=class extends SP.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(t,e){let r=EP.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":i.imply("meridiem",Nu.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",Nu.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",Nu.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":DP.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",Nu.Meridiem.AM),i.imply("hour",12);break}return i}};Co.default=nh});var Xk=M(Rt=>{"use strict";var Mi=Rt&&Rt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.createConfiguration=Rt.createCasualConfiguration=Rt.parseDate=Rt.parse=Rt.strict=Rt.casual=void 0;var xP=Jr(),Qk=ur(),OP=Mi(es()),RP=Mi(Lk()),CP=Mi(Uk()),MP=Mi(qk()),AP=Mi(Yk()),PP=Mi(Gk()),IP=Mi(Vk()),NP=Mi(zk());Rt.casual=new Qk.Chrono(Kk());Rt.strict=new Qk.Chrono(rh(!0));function FP(n,t,e){return Rt.casual.parse(n,t,e)}Rt.parse=FP;function LP(n,t,e){return Rt.casual.parseDate(n,t,e)}Rt.parseDate=LP;function Kk(n=!0){let t=rh(!1,n);return t.parsers.push(new IP.default),t.parsers.push(new NP.default),t}Rt.createCasualConfiguration=Kk;function rh(n=!0,t=!0){return xP.includeCommonConfiguration({parsers:[new OP.default(t),new RP.default,new CP.default,new PP.default],refiners:[new MP.default,new AP.default]},n)}Rt.createConfiguration=rh});var Zk=M(Mo=>{"use strict";var UP=Mo&&Mo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Mo,"__esModule",{value:!0});var qP=UP(Mr()),ih=class extends qP.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};Mo.default=ih});var Jk=M(Ao=>{"use strict";var YP=Ao&&Ao.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ao,"__esModule",{value:!0});var WP=YP(Zr()),sh=class extends WP.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};Ao.default=sh});var e_=M(ri=>{"use strict";var $P=ri&&ri.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),jP=ri&&ri.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),HP=ri&&ri.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&$P(t,n,e);return jP(t,n),t};Object.defineProperty(ri,"__esModule",{value:!0});var BP=ie(),Fu=HP(ti()),ah=class extends BP.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"nu":return Fu.now(t.reference);case"vandaag":return Fu.today(t.reference);case"morgen":case"morgend":return Fu.tomorrow(t.reference);case"gisteren":return Fu.yesterday(t.reference)}return i}};ri.default=ah});var t_=M(Po=>{"use strict";var GP=Po&&Po.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Po,"__esModule",{value:!0});var Lu=_t(),VP=ie(),zP=GP(je()),QP=$n(),KP=1,XP=2,oh=class extends VP.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(t,e){let r=zP.default(t.refDate),i=t.createParsingComponents();switch(e[KP]==="deze"&&(i.assign("day",t.refDate.getDate()),i.assign("month",t.refDate.getMonth()+1),i.assign("year",t.refDate.getFullYear())),e[XP].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",Lu.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",Lu.Meridiem.PM),i.imply("hour",20);break;case"middernacht":QP.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",Lu.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",Lu.Meridiem.AM),i.imply("hour",12);break}return i}};Po.default=oh});var Rn=M(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.parseTimeUnits=Ie.TIME_UNITS_PATTERN=Ie.parseYear=Ie.YEAR_PATTERN=Ie.parseOrdinalNumberPattern=Ie.ORDINAL_NUMBER_PATTERN=Ie.parseNumberPattern=Ie.NUMBER_PATTERN=Ie.TIME_UNIT_DICTIONARY=Ie.ORDINAL_WORD_DICTIONARY=Ie.INTEGER_WORD_DICTIONARY=Ie.MONTH_DICTIONARY=Ie.WEEKDAY_DICTIONARY=void 0;var Uu=Ve(),ZP=It();Ie.WEEKDAY_DICTIONARY={zondag:0,zon:0,"zon.":0,zo:0,"zo.":0,maandag:1,ma:1,"ma.":1,dinsdag:2,din:2,"din.":2,di:2,"di.":2,woensdag:3,woe:3,"woe.":3,wo:3,"wo.":3,donderdag:4,dond:4,"dond.":4,do:4,"do.":4,vrijdag:5,vrij:5,"vrij.":5,vr:5,"vr.":5,zaterdag:6,zat:6,"zat.":6,za:6,"za.":6};Ie.MONTH_DICTIONARY={januari:1,jan:1,"jan.":1,februari:2,feb:2,"feb.":2,maart:3,mar:3,"mar.":3,april:4,apr:4,"apr.":4,mei:5,juni:6,jun:6,"jun.":6,juli:7,jul:7,"jul.":7,augustus:8,aug:8,"aug.":8,september:9,sep:9,"sep.":9,sept:9,"sept.":9,oktober:10,okt:10,"okt.":10,november:11,nov:11,"nov.":11,december:12,dec:12,"dec.":12};Ie.INTEGER_WORD_DICTIONARY={een:1,twee:2,drie:3,vier:4,vijf:5,zes:6,zeven:7,acht:8,negen:9,tien:10,elf:11,twaalf:12};Ie.ORDINAL_WORD_DICTIONARY={eerste:1,tweede:2,derde:3,vierde:4,vijfde:5,zesde:6,zevende:7,achtste:8,negende:9,tiende:10,elfde:11,twaalfde:12,dertiende:13,veertiende:14,vijftiende:15,zestiende:16,zeventiende:17,achttiende:18,negentiende:19,twintigste:20,eenentwintigste:21,twee\u00EBntwintigste:22,drieentwintigste:23,vierentwintigste:24,vijfentwintigste:25,zesentwintigste:26,zevenentwintigste:27,achtentwintig:28,negenentwintig:29,dertigste:30,eenendertigste:31};Ie.TIME_UNIT_DICTIONARY={sec:"second",second:"second",seconden:"second",min:"minute",mins:"minute",minute:"minute",minuut:"minute",minuten:"minute",minuutje:"minute",h:"hour",hr:"hour",hrs:"hour",uur:"hour",u:"hour",uren:"hour",dag:"d",dagen:"d",week:"week",weken:"week",maand:"month",maanden:"month",jaar:"year",jr:"year",jaren:"year"};Ie.NUMBER_PATTERN=`(?:${Uu.matchAnyPattern(Ie.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function r_(n){let t=n.toLowerCase();return Ie.INTEGER_WORD_DICTIONARY[t]!==void 0?Ie.INTEGER_WORD_DICTIONARY[t]:t==="paar"?2:t==="half"||t.match(/halve?/)?.5:parseFloat(t.replace(",","."))}Ie.parseNumberPattern=r_;Ie.ORDINAL_NUMBER_PATTERN=`(?:${Uu.matchAnyPattern(Ie.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function JP(n){let t=n.toLowerCase();return Ie.ORDINAL_WORD_DICTIONARY[t]!==void 0?Ie.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:ste|de)$/i,""),parseInt(t))}Ie.parseOrdinalNumberPattern=JP;Ie.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function eI(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let t=parseInt(n);return ZP.findMostLikelyADYear(t)}Ie.parseYear=eI;var i_=`(${Ie.NUMBER_PATTERN})\\s{0,5}(${Uu.matchAnyPattern(Ie.TIME_UNIT_DICTIONARY)})\\s{0,5}`,n_=new RegExp(i_,"i");Ie.TIME_UNITS_PATTERN=Uu.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",i_);function tI(n){let t={},e=n,r=n_.exec(e);for(;r;)nI(t,r),e=e.substring(r[0].length),r=n_.exec(e);return t}Ie.parseTimeUnits=tI;function nI(n,t){let e=r_(t[1]),r=Ie.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var a_=M(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var s_=Rn(),rI=lt(),iI=ie(),lh=class extends iI.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+s_.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(t,e){let r=s_.parseTimeUnits(e[1]);return rI.ParsingComponents.createRelativeFromReference(t.reference,r)}};uh.default=lh});var l_=M(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var o_=Rn(),sI=Ve(),aI=ie(),oI=Ji(),lI=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${sI.matchAnyPattern(o_.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),uI=1,cI=2,dI=3,ch=class extends aI.AbstractParserWithWordBoundaryChecking{innerPattern(){return lI}innerExtract(t,e){let r=e[cI].toLowerCase(),i=o_.WEEKDAY_DICTIONARY[r],s=e[uI],a=e[dI],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this");let u=oI.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};dh.default=ch});var m_=M(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var fI=It(),f_=Rn(),qu=Rn(),p_=Rn(),pI=Ve(),mI=ie(),hI=new RegExp(`(?:on\\s*?)?(${qu.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${qu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+pI.matchAnyPattern(f_.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${p_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),gI=3,u_=1,c_=2,d_=4,fh=class extends mI.AbstractParserWithWordBoundaryChecking{innerPattern(){return hI}innerExtract(t,e){let r=f_.MONTH_DICTIONARY[e[gI].toLowerCase()],i=qu.parseOrdinalNumberPattern(e[u_]);if(i>31)return e.index=e.index+e[u_].length,null;let s=t.createParsingComponents({day:i,month:r});if(e[d_]){let l=p_.parseYear(e[d_]);s.assign("year",l)}else{let l=fI.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[c_])return s;let a=qu.parseOrdinalNumberPattern(e[c_]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};ph.default=fh});var b_=M(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var g_=Rn(),yI=It(),bI=Ve(),y_=Rn(),TI=ie(),vI=new RegExp(`(${bI.matchAnyPattern(g_.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${y_.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),kI=1,h_=2,mh=class extends TI.AbstractParserWithWordBoundaryChecking{innerPattern(){return vI}innerExtract(t,e){let r=t.createParsingComponents();r.imply("day",1);let i=e[kI],s=g_.MONTH_DICTIONARY[i.toLowerCase()];if(r.assign("month",s),e[h_]){let a=y_.parseYear(e[h_]);r.assign("year",a)}else{let a=yI.findYearClosestToRef(t.refDate,1,s);r.imply("year",a)}return r}};hh.default=mh});var T_=M(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var _I=ie(),wI=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),SI=1,DI=2,gh=class extends _I.AbstractParserWithWordBoundaryChecking{innerPattern(){return wI}innerExtract(t,e){let r=parseInt(e[DI]),i=parseInt(e[SI]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};yh.default=gh});var v_=M(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var EI=Xi(),bh=class extends EI.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};Th.default=bh});var w_=M(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var __=Rn(),xI=Ve(),OI=ie(),RI=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${xI.matchAnyPattern(__.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),CI=1,MI=2,k_=3,AI=4,vh=class extends OI.AbstractParserWithWordBoundaryChecking{innerPattern(){return RI}innerExtract(t,e){let r=e[k_]?parseInt(e[k_]):__.MONTH_DICTIONARY[e[MI].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[CI]);return{day:parseInt(e[AI]),month:r,year:i}}};kh.default=vh});var S_=M(Io=>{"use strict";var PI=Io&&Io.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Io,"__esModule",{value:!0});var II=ie(),Yu=_t(),_h=$n(),NI=PI(je()),FI=1,LI=2,wh=class extends II.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(t,e){let r=e[FI].toLowerCase(),i=e[LI].toLowerCase(),s=t.createParsingComponents(),a=NI.default(t.refDate);switch(r){case"gisteren":_h.assignSimilarDate(s,a.add(-1,"day"));break;case"van":_h.assignSimilarDate(s,a);break;case"morgen":_h.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",Yu.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",Yu.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",Yu.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",Yu.Meridiem.PM),s.imply("hour",20);break}return s}};Io.default=wh});var E_=M(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var D_=Rn(),UI=lt(),qI=ie(),YI=jn(),WI=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${D_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Sh=class extends qI.AbstractParserWithWordBoundaryChecking{innerPattern(){return WI}innerExtract(t,e){let r=e[1].toLowerCase(),i=D_.parseTimeUnits(e[2]);switch(r){case"vorige":case"afgelopen":case"-":i=YI.reverseTimeUnits(i);break}return UI.ParsingComponents.createRelativeFromReference(t.reference,i)}};Dh.default=Sh});var R_=M(No=>{"use strict";var $I=No&&No.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(No,"__esModule",{value:!0});var O_=Rn(),x_=lt(),jI=$I(je()),HI=ie(),BI=Ve(),GI=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${BI.matchAnyPattern(O_.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),VI=1,zI=2,Eh=class extends HI.AbstractParserWithWordBoundaryChecking{innerPattern(){return GI}innerExtract(t,e){let r=e[VI].toLowerCase(),i=e[zI].toLowerCase(),s=O_.TIME_UNIT_DICTIONARY[i];if(r=="volgend"||r=="volgende"||r=="komende"){let l={};return l[s]=1,x_.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="afgelopen"||r=="vorige"){let l={};return l[s]=-1,x_.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=jI.default(t.reference.instant);return i.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):i.match(/maand/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):i.match(/jaar/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};No.default=Eh});var C_=M(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Oh=Rn(),QI=lt(),KI=ie(),XI=jn(),ZI=new RegExp("("+Oh.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),JI=new RegExp("("+Oh.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),xh=class extends KI.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?JI:ZI}innerExtract(t,e){let r=Oh.parseTimeUnits(e[1]),i=XI.reverseTimeUnits(r);return QI.ParsingComponents.createRelativeFromReference(t.reference,i)}};Rh.default=xh});var M_=M(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var Mh=Rn(),eN=lt(),tN=ie(),nN=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),rN=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),iN=1,Ch=class extends tN.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?rN:nN}innerExtract(t,e){let r=Mh.parseTimeUnits(e[iN]);return eN.ParsingComponents.createRelativeFromReference(t.reference,r)}};Ah.default=Ch});var N_=M(Ct=>{"use strict";var Ft=Ct&&Ct.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.createConfiguration=Ct.createCasualConfiguration=Ct.parseDate=Ct.parse=Ct.strict=Ct.casual=void 0;var sN=Jr(),A_=ur(),aN=Ft(Zk()),oN=Ft(Jk()),lN=Ft(e_()),uN=Ft(t_()),cN=Ft(es()),dN=Ft(a_()),fN=Ft(l_()),pN=Ft(m_()),P_=Ft(b_()),mN=Ft(T_()),hN=Ft(v_()),gN=Ft(w_()),yN=Ft(S_()),bN=Ft(E_()),TN=Ft(R_()),vN=Ft(C_()),kN=Ft(M_());Ct.casual=new A_.Chrono(I_());Ct.strict=new A_.Chrono(Ph(!0));function _N(n,t,e){return Ct.casual.parse(n,t,e)}Ct.parse=_N;function wN(n,t,e){return Ct.casual.parseDate(n,t,e)}Ct.parseDate=wN;function I_(n=!0){let t=Ph(!1,n);return t.parsers.unshift(new lN.default),t.parsers.unshift(new uN.default),t.parsers.unshift(new yN.default),t.parsers.unshift(new P_.default),t.parsers.unshift(new TN.default),t.parsers.unshift(new bN.default),t}Ct.createCasualConfiguration=I_;function Ph(n=!0,t=!0){return sN.includeCommonConfiguration({parsers:[new cN.default(t),new dN.default,new pN.default,new P_.default,new fN.default,new gN.default,new mN.default,new hN.default(n),new vN.default(n),new kN.default(n)],refiners:[new oN.default,new aN.default]},n)}Ct.createConfiguration=Ph});var q_=M(Fo=>{"use strict";var SN=Fo&&Fo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Fo,"__esModule",{value:!0});var DN=SN(je()),EN=ie(),xN=1,F_=2,ON=3,L_=4,U_=5,RN=6,Ih=class extends EN.AbstractParserWithWordBoundaryChecking{innerPattern(t){return new RegExp("(\u800C\u5BB6|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=DN.default(t.refDate),a=s;if(e[xN])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(e[F_]){let o=e[F_],l=e[ON];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day")),l=="\u65E9"||l=="\u671D"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[L_]){let l=e[L_][0];l=="\u65E9"||l=="\u671D"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"||l=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}else if(e[U_]){let o=e[U_];o=="\u660E"||o=="\u807D"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u5F8C"?a=a.add(2,"day"):o=="\u5927\u5F8C"&&(a=a.add(3,"day"));let l=e[RN];if(l){let u=l[0];u=="\u65E9"||u=="\u671D"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"||u=="\u664F"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Fo.default=Ih});var ra=M(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.zhStringToYear=hn.zhStringToNumber=hn.WEEKDAY_OFFSET=hn.NUMBER=void 0;hn.NUMBER={\u96F6:0,\u4E00:1,\u4E8C:2,\u5169:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10,\u5EFF:20,\u5345:30};hn.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function CN(n){let t=0;for(let e=0;e{"use strict";var AN=Lo&&Lo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Lo,"__esModule",{value:!0});var PN=AN(je()),IN=ie(),rs=ra(),Nh=1,Y_=2,Fh=3,Lh=class extends IN.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(rs.NUMBER).join("")+"]{4}|["+Object.keys(rs.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(rs.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(rs.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(t,e){let r=PN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[Y_]);if(isNaN(s)&&(s=rs.zhStringToNumber(e[Y_])),i.start.assign("month",s),e[Fh]){let a=parseInt(e[Fh]);isNaN(a)&&(a=rs.zhStringToNumber(e[Fh])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[Nh]){let a=parseInt(e[Nh]);isNaN(a)&&(a=rs.zhStringToYear(e[Nh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};Lo.default=Lh});var j_=M(Uo=>{"use strict";var NN=Uo&&Uo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Uo,"__esModule",{value:!0});var FN=NN(je()),LN=ie(),$_=ra(),UN=new RegExp("(\\d+|["+Object.keys($_.NUMBER).join("")+"]+|\u534A|\u5E7E)(?:\\s*)(?:\u500B)?(\u79D2(?:\u9418)?|\u5206\u9418|\u5C0F\u6642|\u9418|\u65E5|\u5929|\u661F\u671F|\u79AE\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u904E)?\u5F8C|(?:\u4E4B)?\u5167)","i"),Uh=1,qN=2,qh=class extends LN.AbstractParserWithWordBoundaryChecking{innerPattern(){return UN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Uh]);if(isNaN(i)&&(i=$_.zhStringToNumber(e[Uh])),isNaN(i)){let l=e[Uh];if(l==="\u5E7E")i=3;else if(l==="\u534A")i=.5;else return null}let s=FN.default(t.refDate),o=e[qN][0];return o.match(/[日天星禮月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u79AE"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};Uo.default=qh});var B_=M(qo=>{"use strict";var YN=qo&&qo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(qo,"__esModule",{value:!0});var WN=YN(je()),$N=ie(),H_=ra(),jN=new RegExp("(?\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(H_.WEEKDAY_OFFSET).join("|")+")"),Yh=class extends $N.AbstractParserWithWordBoundaryChecking{innerPattern(){return jN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=H_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let l=WN.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c){"use strict";var HN=Yo&&Yo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yo,"__esModule",{value:!0});var BN=HN(je()),GN=ie(),Gn=ra(),VN=new RegExp("(?:\u7531|\u5F9E|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Gn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Gn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Gn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),zN=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u5F8C|\u5927\u5F8C|\u807D|\u6628|\u5C0B|\u7434)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348|\u665D)|\u671D(?:\u65E9)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348|\u665D)|\u664F(?:\u665D)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(Gn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Gn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Gn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),Wu=1,$u=2,ju=3,Hu=4,Bu=5,Gu=6,Bn=7,ia=8,Vu=9,Wh=class extends GN.AbstractParserWithWordBoundaryChecking{innerPattern(){return VN}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=BN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[Wu]){var a=e[Wu];a=="\u660E"||a=="\u807D"?r.hour()>1&&s.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?s.add(-1,"day"):a=="\u524D"?s.add(-2,"day"):a=="\u5927\u524D"?s.add(-3,"day"):a=="\u5F8C"?s.add(2,"day"):a=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(e[Hu]){var o=e[Hu];o=="\u660E"||o=="\u807D"?s.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?s.add(-1,"day"):o=="\u524D"?s.add(-2,"day"):o=="\u5927\u524D"?s.add(-3,"day"):o=="\u5F8C"?s.add(2,"day"):o=="\u5927\u5F8C"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let l=0,u=0,c=-1;if(e[ia]){var d=parseInt(e[ia]);if(isNaN(d)&&(d=Gn.zhStringToNumber(e[ia])),d>=60)return null;i.start.assign("second",d)}if(l=parseInt(e[Gu]),isNaN(l)&&(l=Gn.zhStringToNumber(e[Gu])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Gn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[Vu]){if(l>12)return null;var f=e[Vu][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=12))}else if(e[$u]){var p=e[$u],h=p[0];h=="\u671D"||h=="\u65E9"?(c=0,l==12&&(l=0)):h=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[ju]){var b=e[ju],v=b[0];v=="\u4E0A"||v=="\u671D"||v=="\u65E9"||v=="\u51CC"?(c=0,l==12&&(l=0)):(v=="\u4E0B"||v=="\u664F"||v=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[Bu]){var E=e[Bu],C=E[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(c=0,l==12&&(l=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(c=1,l!=12&&(l+=12))}if(i.start.assign("hour",l),i.start.assign("minute",u),c>=0?i.start.assign("meridiem",c):l<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=zN.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let x=s.clone();if(i.end=t.createParsingComponents(),e[Wu]){var a=e[Wu];a=="\u660E"||a=="\u807D"?r.hour()>1&&x.add(1,"day"):a=="\u6628"||a=="\u5C0B"||a=="\u7434"?x.add(-1,"day"):a=="\u524D"?x.add(-2,"day"):a=="\u5927\u524D"?x.add(-3,"day"):a=="\u5F8C"?x.add(2,"day"):a=="\u5927\u5F8C"&&x.add(3,"day"),i.end.assign("day",x.date()),i.end.assign("month",x.month()+1),i.end.assign("year",x.year())}else if(e[Hu]){var o=e[Hu];o=="\u660E"||o=="\u807D"?x.add(1,"day"):o=="\u6628"||o=="\u5C0B"||o=="\u7434"?x.add(-1,"day"):o=="\u524D"?x.add(-2,"day"):o=="\u5927\u524D"?x.add(-3,"day"):o=="\u5F8C"?x.add(2,"day"):o=="\u5927\u5F8C"&&x.add(3,"day"),i.end.assign("day",x.date()),i.end.assign("month",x.month()+1),i.end.assign("year",x.year())}else i.end.imply("day",x.date()),i.end.imply("month",x.month()+1),i.end.imply("year",x.year());if(l=0,u=0,c=-1,e[ia]){var d=parseInt(e[ia]);if(isNaN(d)&&(d=Gn.zhStringToNumber(e[ia])),d>=60)return null;i.end.assign("second",d)}if(l=parseInt(e[Gu]),isNaN(l)&&(l=Gn.zhStringToNumber(e[Gu])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Gn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[Vu]){if(l>12)return null;var f=e[Vu][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=12)),i.start.isCertain("meridiem")||(c==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(e[$u]){var p=e[$u],h=p[0];h=="\u671D"||h=="\u65E9"?(c=0,l==12&&(l=0)):h=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[ju]){var b=e[ju],v=b[0];v=="\u4E0A"||v=="\u671D"||v=="\u65E9"||v=="\u51CC"?(c=0,l==12&&(l=0)):(v=="\u4E0B"||v=="\u664F"||v=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[Bu]){var E=e[Bu],C=E[0];C=="\u4E0A"||C=="\u671D"||C=="\u65E9"||C=="\u51CC"?(c=0,l==12&&(l=0)):(C=="\u4E0B"||C=="\u664F"||C=="\u665A")&&(c=1,l!=12&&(l+=12))}return i.text=i.text+e[0],i.end.assign("hour",l),i.end.assign("minute",u),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>l?i.end.imply("meridiem",0):l>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var QN=Wo&&Wo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Wo,"__esModule",{value:!0});var KN=QN(je()),XN=ie(),V_=ra(),ZN=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?"+Object.keys(V_.WEEKDAY_OFFSET).join("|")+")"),$h=class extends XN.AbstractParserWithWordBoundaryChecking{innerPattern(){return ZN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=V_.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=KN.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l){"use strict";var JN=$o&&$o.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($o,"__esModule",{value:!0});var eF=JN(Mr()),jh=class extends eF.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};$o.default=jh});var K_=M(jo=>{"use strict";var tF=jo&&jo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(jo,"__esModule",{value:!0});var nF=tF(Zr()),Hh=class extends nF.default{patternBetween(){return/^\s*$/i}};jo.default=Hh});var X_=M(ht=>{"use strict";var ii=ht&&ht.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ht,"__esModule",{value:!0});ht.createConfiguration=ht.createCasualConfiguration=ht.parseDate=ht.parse=ht.strict=ht.casual=ht.hant=void 0;var Bh=ur(),rF=ii(wu()),iF=Jr(),sF=ii(q_()),aF=ii(W_()),oF=ii(j_()),lF=ii(B_()),uF=ii(G_()),cF=ii(z_()),dF=ii(Q_()),fF=ii(K_());ht.hant=new Bh.Chrono(Gh());ht.casual=new Bh.Chrono(Gh());ht.strict=new Bh.Chrono(Vh());function pF(n,t,e){return ht.casual.parse(n,t,e)}ht.parse=pF;function mF(n,t,e){return ht.casual.parseDate(n,t,e)}ht.parseDate=mF;function Gh(){let n=Vh();return n.parsers.unshift(new sF.default),n}ht.createCasualConfiguration=Gh;function Vh(){let n=iF.includeCommonConfiguration({parsers:[new aF.default,new lF.default,new cF.default,new uF.default,new oF.default],refiners:[new dF.default,new fF.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof rF.default)),n}ht.createConfiguration=Vh});var tw=M(Ho=>{"use strict";var hF=Ho&&Ho.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ho,"__esModule",{value:!0});var gF=hF(je()),yF=ie(),bF=1,Z_=2,TF=3,J_=4,ew=5,vF=6,zh=class extends yF.AbstractParserWithWordBoundaryChecking{innerPattern(t){return new RegExp("(\u73B0\u5728|\u7ACB(?:\u523B|\u5373)|\u5373\u523B)|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s|,|\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?","i")}innerExtract(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=gF.default(t.refDate),a=s;if(e[bF])i.start.imply("hour",s.hour()),i.start.imply("minute",s.minute()),i.start.imply("second",s.second()),i.start.imply("millisecond",s.millisecond());else if(e[Z_]){let o=e[Z_],l=e[TF];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day")),l=="\u65E9"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[J_]){let l=e[J_][0];l=="\u65E9"||l=="\u4E0A"?i.start.imply("hour",6):l=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):l=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):l=="\u591C"||l=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):l=="\u51CC"&&i.start.imply("hour",0)}else if(e[ew]){let o=e[ew];o=="\u660E"?s.hour()>1&&(a=a.add(1,"day")):o=="\u6628"?a=a.add(-1,"day"):o=="\u524D"?a=a.add(-2,"day"):o=="\u5927\u524D"?a=a.add(-3,"day"):o=="\u540E"?a=a.add(2,"day"):o=="\u5927\u540E"&&(a=a.add(3,"day"));let l=e[vF];if(l){let u=l[0];u=="\u65E9"||u=="\u4E0A"?i.start.imply("hour",6):u=="\u4E0B"?(i.start.imply("hour",15),i.start.imply("meridiem",1)):u=="\u4E2D"?(i.start.imply("hour",12),i.start.imply("meridiem",1)):u=="\u591C"||u=="\u665A"?(i.start.imply("hour",22),i.start.imply("meridiem",1)):u=="\u51CC"&&i.start.imply("hour",0)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ho.default=zh});var sa=M(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.zhStringToYear=gn.zhStringToNumber=gn.WEEKDAY_OFFSET=gn.NUMBER=void 0;gn.NUMBER={\u96F6:0,"\u3007":0,\u4E00:1,\u4E8C:2,\u4E24:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6,\u4E03:7,\u516B:8,\u4E5D:9,\u5341:10};gn.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function kF(n){let t=0;for(let e=0;e{"use strict";var wF=Bo&&Bo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Bo,"__esModule",{value:!0});var SF=wF(je()),DF=ie(),is=sa(),Qh=1,nw=2,Kh=3,Xh=class extends DF.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(is.NUMBER).join("")+"]{4}|["+Object.keys(is.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(is.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(is.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(t,e){let r=SF.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[nw]);if(isNaN(s)&&(s=is.zhStringToNumber(e[nw])),i.start.assign("month",s),e[Kh]){let a=parseInt(e[Kh]);isNaN(a)&&(a=is.zhStringToNumber(e[Kh])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[Qh]){let a=parseInt(e[Qh]);isNaN(a)&&(a=is.zhStringToYear(e[Qh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};Bo.default=Xh});var sw=M(Go=>{"use strict";var EF=Go&&Go.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Go,"__esModule",{value:!0});var xF=EF(je()),OF=ie(),iw=sa(),RF=new RegExp("(\\d+|["+Object.keys(iw.NUMBER).join("")+"]+|\u534A|\u51E0)(?:\\s*)(?:\u4E2A)?(\u79D2(?:\u949F)?|\u5206\u949F|\u5C0F\u65F6|\u949F|\u65E5|\u5929|\u661F\u671F|\u793C\u62DC|\u6708|\u5E74)(?:(?:\u4E4B|\u8FC7)?\u540E|(?:\u4E4B)?\u5185)","i"),Zh=1,CF=2,Jh=class extends OF.AbstractParserWithWordBoundaryChecking{innerPattern(){return RF}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Zh]);if(isNaN(i)&&(i=iw.zhStringToNumber(e[Zh])),isNaN(i)){let l=e[Zh];if(l==="\u51E0")i=3;else if(l==="\u534A")i=.5;else return null}let s=xF.default(t.refDate),o=e[CF][0];return o.match(/[日天星礼月年]/)?(o=="\u65E5"||o=="\u5929"?s=s.add(i,"d"):o=="\u661F"||o=="\u793C"?s=s.add(i*7,"d"):o=="\u6708"?s=s.add(i,"month"):o=="\u5E74"&&(s=s.add(i,"year")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};Go.default=Jh});var ow=M(Vo=>{"use strict";var MF=Vo&&Vo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vo,"__esModule",{value:!0});var AF=MF(je()),PF=ie(),aw=sa(),IF=new RegExp("(?\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(aw.WEEKDAY_OFFSET).join("|")+")"),eg=class extends PF.AbstractParserWithWordBoundaryChecking{innerPattern(){return IF}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=aw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let l=AF.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c){"use strict";var NF=zo&&zo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zo,"__esModule",{value:!0});var FF=NF(je()),LF=ie(),zn=sa(),UF=new RegExp("(?:\u4ECE|\u81EA)?(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),qF=new RegExp("(?:^\\s*(?:\u5230|\u81F3|\\-|\\\u2013|\\~|\\\u301C)\\s*)(?:(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(\u65E9|\u671D|\u665A)|(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668))|(\u4ECA|\u660E|\u524D|\u5927\u524D|\u540E|\u5927\u540E|\u6628)(?:\u65E5|\u5929)(?:[\\s,\uFF0C]*)(?:(\u4E0A(?:\u5348)|\u65E9(?:\u4E0A)|\u4E0B(?:\u5348)|\u665A(?:\u4E0A)|\u591C(?:\u665A)?|\u4E2D(?:\u5348)|\u51CC(?:\u6668)))?)?(?:[\\s,\uFF0C]*)(?:(\\d+|["+Object.keys(zn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(zn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(zn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),zu=1,Qu=2,Ku=3,Xu=4,Zu=5,Ju=6,Vn=7,aa=8,ec=9,tg=class extends LF.AbstractParserWithWordBoundaryChecking{innerPattern(){return UF}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=FF.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[zu]){let c=e[zu];c=="\u660E"?r.hour()>1&&s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else if(e[Xu]){let c=e[Xu];c=="\u660E"?s.add(1,"day"):c=="\u6628"?s.add(-1,"day"):c=="\u524D"?s.add(-2,"day"):c=="\u5927\u524D"?s.add(-3,"day"):c=="\u540E"?s.add(2,"day"):c=="\u5927\u540E"&&s.add(3,"day"),i.start.assign("day",s.date()),i.start.assign("month",s.month()+1),i.start.assign("year",s.year())}else i.start.imply("day",s.date()),i.start.imply("month",s.month()+1),i.start.imply("year",s.year());let a=0,o=0,l=-1;if(e[aa]){let c=parseInt(e[aa]);if(isNaN(c)&&(c=zn.zhStringToNumber(e[aa])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(e[Ju]),isNaN(a)&&(a=zn.zhStringToNumber(e[Ju])),e[Vn]?e[Vn]=="\u534A"?o=30:e[Vn]=="\u6B63"||e[Vn]=="\u6574"?o=0:(o=parseInt(e[Vn]),isNaN(o)&&(o=zn.zhStringToNumber(e[Vn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[ec]){if(a>12)return null;let c=e[ec][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12))}else if(e[Qu]){let d=e[Qu][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[Ku]){let d=e[Ku][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Zu]){let d=e[Zu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),l>=0?i.start.assign("meridiem",l):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=qF.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let u=s.clone();if(i.end=t.createParsingComponents(),e[zu]){let c=e[zu];c=="\u660E"?r.hour()>1&&u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else if(e[Xu]){let c=e[Xu];c=="\u660E"?u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else i.end.imply("day",u.date()),i.end.imply("month",u.month()+1),i.end.imply("year",u.year());if(a=0,o=0,l=-1,e[aa]){let c=parseInt(e[aa]);if(isNaN(c)&&(c=zn.zhStringToNumber(e[aa])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(e[Ju]),isNaN(a)&&(a=zn.zhStringToNumber(e[Ju])),e[Vn]?e[Vn]=="\u534A"?o=30:e[Vn]=="\u6B63"||e[Vn]=="\u6574"?o=0:(o=parseInt(e[Vn]),isNaN(o)&&(o=zn.zhStringToNumber(e[Vn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[ec]){if(a>12)return null;let c=e[ec][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(l==0?(i.start.imply("meridiem",0),i.start.get("hour")==12&&i.start.assign("hour",0)):(i.start.imply("meridiem",1),i.start.get("hour")!=12&&i.start.assign("hour",i.start.get("hour")+12)))}else if(e[Qu]){let d=e[Qu][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[Ku]){let d=e[Ku][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Zu]){let d=e[Zu][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}return i.text=i.text+e[0],i.end.assign("hour",a),i.end.assign("minute",o),l>=0?i.end.assign("meridiem",l):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>a?i.end.imply("meridiem",0):a>12&&i.end.imply("meridiem",1),i.end.date().getTime(){"use strict";var YF=Qo&&Qo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qo,"__esModule",{value:!0});var WF=YF(je()),$F=ie(),uw=sa(),jF=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?"+Object.keys(uw.WEEKDAY_OFFSET).join("|")+")"),ng=class extends $F.AbstractParserWithWordBoundaryChecking{innerPattern(){return jF}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=uw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=WF.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l){"use strict";var HF=Ko&&Ko.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ko,"__esModule",{value:!0});var BF=HF(Mr()),rg=class extends BF.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Ko.default=rg});var fw=M(Xo=>{"use strict";var GF=Xo&&Xo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Xo,"__esModule",{value:!0});var VF=GF(Zr()),ig=class extends VF.default{patternBetween(){return/^\s*$/i}};Xo.default=ig});var pw=M(gt=>{"use strict";var si=gt&>.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gt,"__esModule",{value:!0});gt.createConfiguration=gt.createCasualConfiguration=gt.parseDate=gt.parse=gt.strict=gt.casual=gt.hans=void 0;var sg=ur(),zF=si(wu()),QF=Jr(),KF=si(tw()),XF=si(rw()),ZF=si(sw()),JF=si(ow()),eL=si(lw()),tL=si(cw()),nL=si(dw()),rL=si(fw());gt.hans=new sg.Chrono(ag());gt.casual=new sg.Chrono(ag());gt.strict=new sg.Chrono(og());function iL(n,t,e){return gt.casual.parse(n,t,e)}gt.parse=iL;function sL(n,t,e){return gt.casual.parseDate(n,t,e)}gt.parseDate=sL;function ag(){let n=og();return n.parsers.unshift(new KF.default),n}gt.createCasualConfiguration=ag;function og(){let n=QF.includeCommonConfiguration({parsers:[new XF.default,new JF.default,new tL.default,new eL.default,new ZF.default],refiners:[new nL.default,new rL.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof zF.default)),n}gt.createConfiguration=og});var hw=M(Cn=>{"use strict";var mw=Cn&&Cn.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),aL=Cn&&Cn.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),oL=Cn&&Cn.__exportStar||function(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&mw(t,n,e)},lL=Cn&&Cn.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&mw(t,n,e);return aL(t,n),t};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.hans=void 0;oL(X_(),Cn);Cn.hans=lL(pw())});var yn=M(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.parseTimeUnits=_e.TIME_UNITS_PATTERN=_e.parseYear=_e.YEAR_PATTERN=_e.parseOrdinalNumberPattern=_e.ORDINAL_NUMBER_PATTERN=_e.parseNumberPattern=_e.NUMBER_PATTERN=_e.TIME_UNIT_DICTIONARY=_e.ORDINAL_WORD_DICTIONARY=_e.INTEGER_WORD_DICTIONARY=_e.MONTH_DICTIONARY=_e.FULL_MONTH_NAME_DICTIONARY=_e.WEEKDAY_DICTIONARY=_e.REGEX_PARTS=void 0;var tc=Ve(),uL=It();_e.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};_e.WEEKDAY_DICTIONARY={\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435:0,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u044F:0,\u0432\u0441\u043A:0,"\u0432\u0441\u043A.":0,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A:1,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A\u0430:1,\u043F\u043D:1,"\u043F\u043D.":1,\u0432\u0442\u043E\u0440\u043D\u0438\u043A:2,\u0432\u0442\u043E\u0440\u043D\u0438\u043A\u0430:2,\u0432\u0442:2,"\u0432\u0442.":2,\u0441\u0440\u0435\u0434\u0430:3,\u0441\u0440\u0435\u0434\u044B:3,\u0441\u0440\u0435\u0434\u0443:3,\u0441\u0440:3,"\u0441\u0440.":3,\u0447\u0435\u0442\u0432\u0435\u0440\u0433:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430:4,\u0447\u0442:4,"\u0447\u0442.":4,\u043F\u044F\u0442\u043D\u0438\u0446\u0430:5,\u043F\u044F\u0442\u043D\u0438\u0446\u0443:5,\u043F\u044F\u0442\u043D\u0438\u0446\u044B:5,\u043F\u0442:5,"\u043F\u0442.":5,\u0441\u0443\u0431\u0431\u043E\u0442\u0430:6,\u0441\u0443\u0431\u0431\u043E\u0442\u0443:6,\u0441\u0443\u0431\u0431\u043E\u0442\u044B:6,\u0441\u0431:6,"\u0441\u0431.":6};_e.FULL_MONTH_NAME_DICTIONARY={\u044F\u043D\u0432\u0430\u0440\u044C:1,\u044F\u043D\u0432\u0430\u0440\u044F:1,\u044F\u043D\u0432\u0430\u0440\u0435:1,\u0444\u0435\u0432\u0440\u044F\u043B\u044C:2,\u0444\u0435\u0432\u0440\u044F\u043B\u044F:2,\u0444\u0435\u0432\u0440\u044F\u043B\u0435:2,\u043C\u0430\u0440\u0442:3,\u043C\u0430\u0440\u0442\u0430:3,\u043C\u0430\u0440\u0442\u0435:3,\u0430\u043F\u0440\u0435\u043B\u044C:4,\u0430\u043F\u0440\u0435\u043B\u044F:4,\u0430\u043F\u0440\u0435\u043B\u0435:4,\u043C\u0430\u0439:5,\u043C\u0430\u044F:5,\u043C\u0430\u0435:5,\u0438\u044E\u043D\u044C:6,\u0438\u044E\u043D\u044F:6,\u0438\u044E\u043D\u0435:6,\u0438\u044E\u043B\u044C:7,\u0438\u044E\u043B\u044F:7,\u0438\u044E\u043B\u0435:7,\u0430\u0432\u0433\u0443\u0441\u0442:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0430:8,\u0430\u0432\u0433\u0443\u0441\u0442\u0435:8,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F:9,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u0435:9,\u043E\u043A\u0442\u044F\u0431\u0440\u044C:10,\u043E\u043A\u0442\u044F\u0431\u0440\u044F:10,\u043E\u043A\u0442\u044F\u0431\u0440\u0435:10,\u043D\u043E\u044F\u0431\u0440\u044C:11,\u043D\u043E\u044F\u0431\u0440\u044F:11,\u043D\u043E\u044F\u0431\u0440\u0435:11,\u0434\u0435\u043A\u0430\u0431\u0440\u044C:12,\u0434\u0435\u043A\u0430\u0431\u0440\u044F:12,\u0434\u0435\u043A\u0430\u0431\u0440\u0435:12};_e.MONTH_DICTIONARY=Object.assign(Object.assign({},_e.FULL_MONTH_NAME_DICTIONARY),{\u044F\u043D\u0432:1,"\u044F\u043D\u0432.":1,\u0444\u0435\u0432:2,"\u0444\u0435\u0432.":2,\u043C\u0430\u0440:3,"\u043C\u0430\u0440.":3,\u0430\u043F\u0440:4,"\u0430\u043F\u0440.":4,\u0430\u0432\u0433:8,"\u0430\u0432\u0433.":8,\u0441\u0435\u043D:9,"\u0441\u0435\u043D.":9,\u043E\u043A\u0442:10,"\u043E\u043A\u0442.":10,\u043D\u043E\u044F:11,"\u043D\u043E\u044F.":11,\u0434\u0435\u043A:12,"\u0434\u0435\u043A.":12});_e.INTEGER_WORD_DICTIONARY={\u043E\u0434\u0438\u043D:1,\u043E\u0434\u043D\u0430:1,\u043E\u0434\u043D\u043E\u0439:1,\u043E\u0434\u043D\u0443:1,\u0434\u0432\u0435:2,\u0434\u0432\u0430:2,\u0434\u0432\u0443\u0445:2,\u0442\u0440\u0438:3,\u0442\u0440\u0435\u0445:3,\u0442\u0440\u0451\u0445:3,\u0447\u0435\u0442\u044B\u0440\u0435:4,\u0447\u0435\u0442\u044B\u0440\u0435\u0445:4,\u0447\u0435\u0442\u044B\u0440\u0451\u0445:4,\u043F\u044F\u0442\u044C:5,\u043F\u044F\u0442\u0438:5,\u0448\u0435\u0441\u0442\u044C:6,\u0448\u0435\u0441\u0442\u0438:6,\u0441\u0435\u043C\u044C:7,\u0441\u0435\u043C\u0438:7,\u0432\u043E\u0441\u0435\u043C\u044C:8,\u0432\u043E\u0441\u0435\u043C\u044C\u043C\u0438:8,\u0434\u0435\u0432\u044F\u0442\u044C:9,\u0434\u0435\u0432\u044F\u0442\u0438:9,\u0434\u0435\u0441\u044F\u0442\u044C:10,\u0434\u0435\u0441\u044F\u0442\u0438:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u044C:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u0438:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u044C:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u0438:12};_e.ORDINAL_WORD_DICTIONARY={\u043F\u0435\u0440\u0432\u043E\u0435:1,\u043F\u0435\u0440\u0432\u043E\u0433\u043E:1,\u0432\u0442\u043E\u0440\u043E\u0435:2,\u0432\u0442\u043E\u0440\u043E\u0433\u043E:2,\u0442\u0440\u0435\u0442\u044C\u0435:3,\u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E:3,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435:4,\u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E:4,\u043F\u044F\u0442\u043E\u0435:5,\u043F\u044F\u0442\u043E\u0433\u043E:5,\u0448\u0435\u0441\u0442\u043E\u0435:6,\u0448\u0435\u0441\u0442\u043E\u0433\u043E:6,\u0441\u0435\u0434\u044C\u043C\u043E\u0435:7,\u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E:7,\u0432\u043E\u0441\u044C\u043C\u043E\u0435:8,\u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E:8,\u0434\u0435\u0432\u044F\u0442\u043E\u0435:9,\u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E:9,\u0434\u0435\u0441\u044F\u0442\u043E\u0435:10,\u0434\u0435\u0441\u044F\u0442\u043E\u0433\u043E:10,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:11,\u043E\u0434\u0438\u043D\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:11,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:12,\u0434\u0432\u0435\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:12,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:13,\u0442\u0440\u0438\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:13,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:14,\u0447\u0435\u0442\u044B\u0440\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:14,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:15,\u043F\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:15,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:16,\u0448\u0435\u0441\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:16,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:17,\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:17,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:18,\u0432\u043E\u0441\u0435\u043C\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:18,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0435:19,\u0434\u0435\u0432\u044F\u0442\u043D\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:19,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0435:20,\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u043E\u0433\u043E:20,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":21,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0435":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u0442\u043E\u0440\u043E\u0433\u043E":22,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0442\u0440\u0435\u0442\u044C\u0435\u0433\u043E":23,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0435":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043E\u0433\u043E":24,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0435":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u043F\u044F\u0442\u043E\u0433\u043E":25,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0435":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0448\u0435\u0441\u0442\u043E\u0433\u043E":26,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0435":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0441\u0435\u0434\u044C\u043C\u043E\u0433\u043E":27,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0435":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0432\u043E\u0441\u044C\u043C\u043E\u0433\u043E":28,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0435":29,"\u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044C \u0434\u0435\u0432\u044F\u0442\u043E\u0433\u043E":29,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0435:30,\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u043E\u0433\u043E:30,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435":31,"\u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0433\u043E":31};_e.TIME_UNIT_DICTIONARY={\u0441\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u044B:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u0443:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0430:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0438:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u0435\u043A:"second",\u0441\u0435\u043A\u0443\u043D\u0434\u043E\u0447\u043A\u0443:"second",\u043C\u0438\u043D:"minute",\u043C\u0438\u043D\u0443\u0442\u0430:"minute",\u043C\u0438\u043D\u0443\u0442:"minute",\u043C\u0438\u043D\u0443\u0442\u044B:"minute",\u043C\u0438\u043D\u0443\u0442\u0443:"minute",\u043C\u0438\u043D\u0443\u0442\u043E\u043A:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0438:"minute",\u043C\u0438\u043D\u0443\u0442\u043A\u0443:"minute",\u0447\u0430\u0441:"hour",\u0447\u0430\u0441\u043E\u0432:"hour",\u0447\u0430\u0441\u0430:"hour",\u0447\u0430\u0441\u0443:"hour",\u0447\u0430\u0441\u0438\u043A\u043E\u0432:"hour",\u0447\u0430\u0441\u0438\u043A\u0430:"hour",\u0447\u0430\u0441\u0438\u043A\u0435:"hour",\u0447\u0430\u0441\u0438\u043A:"hour",\u0434\u0435\u043D\u044C:"d",\u0434\u043D\u044F:"d",\u0434\u043D\u0435\u0439:"d",\u0441\u0443\u0442\u043E\u043A:"d",\u0441\u0443\u0442\u043A\u0438:"d",\u043D\u0435\u0434\u0435\u043B\u044F:"week",\u043D\u0435\u0434\u0435\u043B\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u044E:"week",\u043D\u0435\u0434\u0435\u043B\u044C:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0435:"week",\u043D\u0435\u0434\u0435\u043B\u044C\u043A\u0438:"week",\u043D\u0435\u0434\u0435\u043B\u0435\u043A:"week",\u043C\u0435\u0441\u044F\u0446:"month",\u043C\u0435\u0441\u044F\u0446\u0435:"month",\u043C\u0435\u0441\u044F\u0446\u0435\u0432:"month",\u043C\u0435\u0441\u044F\u0446\u0430:"month",\u043A\u0432\u0430\u0440\u0442\u0430\u043B:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u0435:"quarter",\u043A\u0432\u0430\u0440\u0442\u0430\u043B\u043E\u0432:"quarter",\u0433\u043E\u0434:"year",\u0433\u043E\u0434\u0430:"year",\u0433\u043E\u0434\u0443:"year",\u0433\u043E\u0434\u043E\u0432:"year",\u043B\u0435\u0442:"year",\u0433\u043E\u0434\u0438\u043A:"year",\u0433\u043E\u0434\u0438\u043A\u0430:"year",\u0433\u043E\u0434\u0438\u043A\u043E\u0432:"year"};_e.NUMBER_PATTERN=`(?:${tc.matchAnyPattern(_e.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|\u043F\u043E\u043B|\u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E|\u043F\u0430\u0440(?:\u044B|\u0443)|\\s{0,3})`;function yw(n){let t=n.toLowerCase();return _e.INTEGER_WORD_DICTIONARY[t]!==void 0?_e.INTEGER_WORD_DICTIONARY[t]:t.match(/несколько/)?3:t.match(/пол/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}_e.parseNumberPattern=yw;_e.ORDINAL_NUMBER_PATTERN=`(?:${tc.matchAnyPattern(_e.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function cL(n){let t=n.toLowerCase();return _e.ORDINAL_WORD_DICTIONARY[t]!==void 0?_e.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}_e.parseOrdinalNumberPattern=cL;var lg="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";_e.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${lg}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${lg}|[5-9][0-9]${lg})`;function dL(n){if(/(год|года|г|г.)/i.test(n)&&(n=n.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(n))return n=n.replace(/(до н.э.|до н. э.)/i,""),-parseInt(n);if(/(н. э.|н.э.)/i.test(n))return n=n.replace(/(н. э.|н.э.)/i,""),parseInt(n);let t=parseInt(n);return uL.findMostLikelyADYear(t)}_e.parseYear=dL;var bw=`(${_e.NUMBER_PATTERN})\\s{0,3}(${tc.matchAnyPattern(_e.TIME_UNIT_DICTIONARY)})`,gw=new RegExp(bw,"i");_e.TIME_UNITS_PATTERN=tc.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",bw);function fL(n){let t={},e=n,r=gw.exec(e);for(;r;)pL(t,r),e=e.substring(r[0].length).trim(),r=gw.exec(e);return t}_e.parseTimeUnits=fL;function pL(n,t){let e=yw(t[1]),r=_e.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var vw=M(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var Zo=yn(),mL=lt(),hL=ie(),Tw=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Zo.TIME_UNITS_PATTERN})${Zo.REGEX_PARTS.rightBoundary}`,gL=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${Tw}`,Zo.REGEX_PARTS.flags),yL=new RegExp(Tw,"i"),ug=class extends hL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Zo.REGEX_PARTS.leftBoundary}innerPattern(t){return t.option.forwardDate?yL:gL}innerExtract(t,e){let r=Zo.parseTimeUnits(e[1]);return mL.ParsingComponents.createRelativeFromReference(t.reference,r)}};cg.default=ug});var Dw=M(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});var bL=It(),Jo=yn(),Sw=yn(),nc=yn(),TL=Ve(),vL=ie(),kL=new RegExp(`(?:\u0441)?\\s*(${nc.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${nc.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${TL.matchAnyPattern(Jo.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${Sw.YEAR_PATTERN}(?![^\\s]\\d)))?${Jo.REGEX_PARTS.rightBoundary}`,Jo.REGEX_PARTS.flags),kw=1,_w=2,_L=3,ww=4,dg=class extends vL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Jo.REGEX_PARTS.leftBoundary}innerPattern(){return kL}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Jo.MONTH_DICTIONARY[e[_L].toLowerCase()],s=nc.parseOrdinalNumberPattern(e[kw]);if(s>31)return e.index=e.index+e[kw].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[ww]){let a=Sw.parseYear(e[ww]);r.start.assign("year",a)}else{let a=bL.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[_w]){let a=nc.parseOrdinalNumberPattern(e[_w]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};fg.default=dg});var Ow=M(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});var el=yn(),wL=It(),SL=Ve(),xw=yn(),DL=ie(),EL=new RegExp(`((?:\u0432)\\s*)?(${SL.matchAnyPattern(el.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${xw.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,el.REGEX_PARTS.flags),xL=2,Ew=3,pg=class extends DL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return el.REGEX_PARTS.leftBoundary}innerPattern(){return EL}innerExtract(t,e){let r=e[xL].toLowerCase();if(e[0].length<=3&&!el.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index,e.index+e[0].length);i.start.imply("day",1);let s=el.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[Ew]){let a=xw.parseYear(e[Ew]);i.start.assign("year",a)}else{let a=wL.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};mg.default=pg});var Cw=M(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});var rc=_t(),OL=Xi(),Rw=yn(),hg=class extends OL.AbstractTimeExpressionParser{constructor(t){super(t)}patternFlags(){return Rw.REGEX_PARTS.flags}primaryPatternLeftBoundary(){return"(^|\\s|T|(?:[^\\p{L}\\p{N}_]))"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|\u0434\u043E|\u0438|\u043F\u043E|\\?)\\s*"}primaryPrefix(){return"(?:(?:\u0432|\u0441)\\s*)??"}primarySuffix(){return`(?:\\s*(?:\u0443\u0442\u0440\u0430|\u0432\u0435\u0447\u0435\u0440\u0430|\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F))?(?!\\/)${Rw.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",rc.Meridiem.PM)):i<6&&r.assign("meridiem",rc.Meridiem.AM)}if(e[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){r.assign("meridiem",rc.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("\u0443\u0442\u0440\u0430")&&(r.assign("meridiem",rc.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};gg.default=hg});var Mw=M(bg=>{"use strict";Object.defineProperty(bg,"__esModule",{value:!0});var ic=yn(),RL=lt(),CL=ie(),ML=jn(),AL=new RegExp(`(${ic.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,ic.REGEX_PARTS.flags),yg=class extends CL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ic.REGEX_PARTS.leftBoundary}innerPattern(){return AL}innerExtract(t,e){let r=ic.parseTimeUnits(e[1]),i=ML.reverseTimeUnits(r);return RL.ParsingComponents.createRelativeFromReference(t.reference,i)}};bg.default=yg});var Aw=M(tl=>{"use strict";var PL=tl&&tl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(tl,"__esModule",{value:!0});var IL=PL(Mr()),Tg=class extends IL.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};tl.default=Tg});var Pw=M(nl=>{"use strict";var NL=nl&&nl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nl,"__esModule",{value:!0});var FL=NL(Zr()),vg=class extends FL.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};nl.default=vg});var Iw=M(ai=>{"use strict";var LL=ai&&ai.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),UL=ai&&ai.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),qL=ai&&ai.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&LL(t,n,e);return UL(t,n),t};Object.defineProperty(ai,"__esModule",{value:!0});var YL=ie(),rl=qL(ti()),kg=yn(),WL=new RegExp(`(?:\u0441|\u0441\u043E)?\\s*(\u0441\u0435\u0433\u043E\u0434\u043D\u044F|\u0432\u0447\u0435\u0440\u0430|\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430|\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430)${kg.REGEX_PARTS.rightBoundary}`,kg.REGEX_PARTS.flags),_g=class extends YL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return kg.REGEX_PARTS.leftBoundary}innerPattern(t){return WL}innerExtract(t,e){let r=e[1].toLowerCase(),i=t.createParsingComponents();switch(r){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return rl.today(t.reference);case"\u0432\u0447\u0435\u0440\u0430":return rl.yesterday(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return rl.tomorrow(t.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return rl.theDayAfter(t.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return rl.theDayBefore(t.reference,2)}return i}};ai.default=_g});var Nw=M(mr=>{"use strict";var $L=mr&&mr.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),jL=mr&&mr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),HL=mr&&mr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&$L(t,n,e);return jL(t,n),t},BL=mr&&mr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(mr,"__esModule",{value:!0});var GL=ie(),ss=HL(ti()),VL=$n(),zL=BL(je()),wg=yn(),QL=new RegExp(`(\u0441\u0435\u0439\u0447\u0430\u0441|\u043F\u0440\u043E\u0448\u043B\u044B\u043C\\s*\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u043F\u0440\u043E\u0448\u043B\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u0441\u0435\u0433\u043E\u0434\u043D\u044F\\s*\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u043E\u0439\\s*\u043D\u043E\u0447\u044C\u044E|\u043D\u043E\u0447\u044C\u044E|\u044D\u0442\u0438\u043C \u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u043E\u043C|\u0443\u0442\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u0434\u0435\u043D\u044C|\u0432\u0435\u0447\u0435\u0440\u043E\u043C|\u0432\u0435\u0447\u0435\u0440\u0430|\u0432\\s*\u043F\u043E\u043B\u043D\u043E\u0447\u044C)${wg.REGEX_PARTS.rightBoundary}`,wg.REGEX_PARTS.flags),Sg=class extends GL.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return wg.REGEX_PARTS.leftBoundary}innerPattern(){return QL}innerExtract(t,e){let r=zL.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return ss.now(t.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return ss.evening(t.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return ss.morning(t.reference);if(i.match(/в\s*полдень/))return ss.noon(t.reference);if(i.match(/прошлой\s*ночью/))return ss.lastNight(t.reference);if(i.match(/прошлым\s*вечером/))return ss.yesterdayEvening(t.reference);if(i.match(/следующей\s*ночью/)){let a=r.hour()<22?1:2;r=r.add(a,"day"),VL.assignSimilarDate(s,r),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?ss.midnight(t.reference):s}};mr.default=Sg});var Fw=M(Eg=>{"use strict";Object.defineProperty(Eg,"__esModule",{value:!0});var il=yn(),KL=Ve(),XL=ie(),ZL=Ji(),JL=new RegExp(`(?:(?:,|\\(|\uFF08)\\s*)?(?:\u0432\\s*?)?(?:(\u044D\u0442\u0443|\u044D\u0442\u043E\u0442|\u043F\u0440\u043E\u0448\u043B\u044B\u0439|\u043F\u0440\u043E\u0448\u043B\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E)\\s*)?(${KL.matchAnyPattern(il.WEEKDAY_DICTIONARY)})(?:\\s*(?:,|\\)|\uFF09))?(?:\\s*\u043D\u0430\\s*(\u044D\u0442\u043E\u0439|\u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439)\\s*\u043D\u0435\u0434\u0435\u043B\u0435)?${il.REGEX_PARTS.rightBoundary}`,il.REGEX_PARTS.flags),e2=1,t2=2,n2=3,Dg=class extends XL.AbstractParserWithWordBoundaryChecking{innerPattern(){return JL}patternLeftBoundary(){return il.REGEX_PARTS.leftBoundary}innerExtract(t,e){let r=e[t2].toLowerCase(),i=il.WEEKDAY_DICTIONARY[r],s=e[e2],a=e[n2],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="\u043F\u0440\u043E\u0448\u043B\u044B\u0439"||o=="\u043F\u0440\u043E\u0448\u043B\u0443\u044E"||o=="\u043F\u0440\u043E\u0448\u043B\u043E\u0439"?l="last":o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||o=="\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E"?l="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(l="this");let u=ZL.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Eg.default=Dg});var Uw=M(al=>{"use strict";var r2=al&&al.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(al,"__esModule",{value:!0});var sl=yn(),Lw=lt(),i2=r2(je()),s2=ie(),a2=Ve(),o2=new RegExp(`(\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C|\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439|\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439|\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C|\u043D\u0430 \u044D\u0442\u043E\u0439|\u0432 \u044D\u0442\u043E\u043C)\\s*(${a2.matchAnyPattern(sl.TIME_UNIT_DICTIONARY)})(?=\\s*)${sl.REGEX_PARTS.rightBoundary}`,sl.REGEX_PARTS.flags),l2=1,u2=2,xg=class extends s2.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return sl.REGEX_PARTS.leftBoundary}innerPattern(){return o2}innerExtract(t,e){let r=e[l2].toLowerCase(),i=e[u2].toLowerCase(),s=sl.TIME_UNIT_DICTIONARY[i];if(r=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||r=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let l={};return l[s]=1,Lw.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||r=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let l={};return l[s]=-1,Lw.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=i2.default(t.reference.instant);return s.match(/week/i)?(o=o.add(-o.get("d"),"d"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.imply("year",o.year())):s.match(/month/i)?(o=o.add(-o.date()+1,"d"),a.imply("day",o.date()),a.assign("year",o.year()),a.assign("month",o.month()+1)):s.match(/year/i)&&(o=o.add(-o.date()+1,"d"),o=o.add(-o.month(),"month"),a.imply("day",o.date()),a.imply("month",o.month()+1),a.assign("year",o.year())),a}};al.default=xg});var qw=M(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});var ol=yn(),c2=lt(),d2=ie(),f2=jn(),p2=new RegExp(`(\u044D\u0442\u0438|\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435|\u043F\u0440\u043E\u0448\u043B\u044B\u0435|\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435|\u043F\u043E\u0441\u043B\u0435|\u0447\u0435\u0440\u0435\u0437|\\+|-)\\s*(${ol.TIME_UNITS_PATTERN})${ol.REGEX_PARTS.rightBoundary}`,ol.REGEX_PARTS.flags),Og=class extends d2.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ol.REGEX_PARTS.leftBoundary}innerPattern(){return p2}innerExtract(t,e){let r=e[1].toLowerCase(),i=ol.parseTimeUnits(e[2]);switch(r){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=f2.reverseTimeUnits(i);break}return c2.ParsingComponents.createRelativeFromReference(t.reference,i)}};Rg.default=Og});var $w=M(Mt=>{"use strict";var Mn=Mt&&Mt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.createConfiguration=Mt.createCasualConfiguration=Mt.parseDate=Mt.parse=Mt.strict=Mt.casual=void 0;var m2=Mn(vw()),h2=Mn(Dw()),g2=Mn(Ow()),y2=Mn(Cw()),b2=Mn(Mw()),T2=Mn(Aw()),v2=Mn(Pw()),k2=Jr(),_2=Mn(Iw()),w2=Mn(Nw()),S2=Mn(Fw()),D2=Mn(Uw()),Yw=ur(),E2=Mn(es()),x2=Mn(qw());Mt.casual=new Yw.Chrono(Ww());Mt.strict=new Yw.Chrono(Cg(!0));function O2(n,t,e){return Mt.casual.parse(n,t,e)}Mt.parse=O2;function R2(n,t,e){return Mt.casual.parseDate(n,t,e)}Mt.parseDate=R2;function Ww(){let n=Cg(!1);return n.parsers.unshift(new _2.default),n.parsers.unshift(new w2.default),n.parsers.unshift(new g2.default),n.parsers.unshift(new D2.default),n.parsers.unshift(new x2.default),n}Mt.createCasualConfiguration=Ww;function Cg(n=!0){return k2.includeCommonConfiguration({parsers:[new E2.default(!0),new m2.default,new h2.default,new S2.default,new y2.default(n),new b2.default],refiners:[new v2.default,new T2.default]},n)}Mt.createConfiguration=Cg});var _t=M(Oe=>{"use strict";var C2=Oe&&Oe.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]})),M2=Oe&&Oe.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),Ai=Oe&&Oe.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&C2(t,n,e);return M2(t,n),t};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.parseDate=Oe.parse=Oe.casual=Oe.strict=Oe.ru=Oe.zh=Oe.nl=Oe.pt=Oe.ja=Oe.fr=Oe.de=Oe.Meridiem=Oe.Chrono=Oe.en=void 0;var Mg=Ai(Bp());Oe.en=Mg;var A2=ur();Object.defineProperty(Oe,"Chrono",{enumerable:!0,get:function(){return A2.Chrono}});var P2;(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(P2=Oe.Meridiem||(Oe.Meridiem={}));var I2=Ai(Xv());Oe.de=I2;var N2=Ai(Ek());Oe.fr=N2;var F2=Ai(Nk());Oe.ja=F2;var L2=Ai(Xk());Oe.pt=L2;var U2=Ai(N_());Oe.nl=U2;var q2=Ai(hw());Oe.zh=q2;var Y2=Ai($w());Oe.ru=Y2;Oe.strict=Mg.strict;Oe.casual=Mg.casual;function W2(n,t,e){return Oe.casual.parse(n,t,e)}Oe.parse=W2;function $2(n,t,e){return Oe.casual.parseDate(n,t,e)}Oe.parseDate=$2});var Qn,Ag=K(()=>{"use strict";Qn=class n{constructor(t,e){this.start=t,this.end=e,e.isBefore(t)&&(this.start=e,this.end=t),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(t){let e=t==="week"?"isoWeek":t;return new n(window.moment().startOf(e).startOf("day"),window.moment().endOf(e).startOf("day"))}static buildInvalid(){return new n(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(t){let e=window.moment.duration(1,t);this.start.subtract(e),this.end.subtract(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}moveToNext(t){let e=window.moment.duration(1,t);this.start.add(e),this.end.add(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}}});var sc,oi,Pg=K(()=>{"use strict";sc=$s(_t());Ag();oi=class n{static parseDate(t,e=!1){return window.moment(sc.parseDate(t,void 0,{forwardDate:e})).startOf("day")}static parseDateRange(t,e=!1){let r=[n.parseRelativeDateRange,n.parseNumberedDateRange,n.parseAbsoluteDateRange];for(let i of r){let s=i(t,e);if(s.isValid())return s}return Qn.buildInvalid()}static parseAbsoluteDateRange(t,e){let r=sc.parse(t,void 0,{forwardDate:e});if(r.length===0)return Qn.buildInvalid();let i=r[0].start,s=r[1]&&r[1].start?r[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new Qn(a,o)}static parseRelativeDateRange(t,e){let r=/(last|this|next) (week|month|quarter|year)/,i=t.match(r);if(i&&i.length===3){let s=i[1],a=i[2],o=Qn.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return Qn.buildInvalid()}static parseNumberedDateRange(t,e){let r=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of r){let o=t.match(i);if(o){let l=o[0].trim();return new Qn(window.moment(l,s).startOf(a),window.moment(l,s).endOf(a))}}return Qn.buildInvalid()}}});function ac(n){for(let[t,e]of Object.entries(j2))n=n.replace(RegExp(`\\b${t}\\s`,"i"),e);return n}var j2,Ig=K(()=>{"use strict";j2={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"}});function Kn(n,t){return n!==null&&t===null?-1:n===null&&t!==null?1:n!==null&&t!==null?n.isValid()&&!t.isValid()?1:!n.isValid()&&t.isValid()?-1:n.isAfter(t)?1:n.isBefore(t)?-1:0:0}function H2(n,t,e=void 0){if(!t)return`no ${n} date`;let r=Ng.parseDate(t,e,{forwardDate:e!=null});return r!==null?window.moment(r).format("YYYY-MM-DD"):`invalid ${n} date`}function jw(n,t,e){return H2(n,t,e?new Date:void 0)}function as(n,t){let e=null,r=Ng.parseDate(n,new Date,{forwardDate:t});return r!==null&&(e=window.moment(r)),e}var Ng,os=K(()=>{"use strict";Ng=$s(_t())});var li,oc=K(()=>{"use strict";os();yt();li=class n{constructor({startDate:t=null,scheduledDate:e=null,dueDate:r=null}){this.startDate=t!=null?t:null,this.scheduledDate=e!=null?e:null,this.dueDate=r!=null?r:null}get referenceDate(){return this.getReferenceDate()}getReferenceDate(){let t=this.getDatePriorityOrder();for(let e of t)if(e)return window.moment(e);return null}getDatePriorityOrder(){let{removeScheduledDateOnRecurrence:t}=J();return t?[this.dueDate,this.startDate,this.scheduledDate]:[this.dueDate,this.scheduledDate,this.startDate]}isIdenticalTo(t){return!(Kn(this.startDate,t.startDate)!==0||Kn(this.scheduledDate,t.scheduledDate)!==0||Kn(this.dueDate,t.dueDate)!==0)}next(t){if(this.referenceDate===null)return new n({startDate:null,scheduledDate:null,dueDate:null});let e=this.startDate!==null,r=this.dueDate!==null,i=e||r,{removeScheduledDateOnRecurrence:s}=J(),a=s&&i,o=this.nextOccurrenceDate(this.startDate,t),l=a?null:this.nextOccurrenceDate(this.scheduledDate,t),u=this.nextOccurrenceDate(this.dueDate,t);return new n({startDate:o,scheduledDate:l,dueDate:u})}nextOccurrenceDate(t,e){if(t===null)return null;let r=window.moment.duration(t.diff(this.referenceDate)),i=window.moment(e);return i.add(Math.round(r.asDays()),"days"),i}}});var ll,bt,ls=K(()=>{ll=["MO","TU","WE","TH","FR","SA","SU"],bt=(function(){function n(t,e){if(e===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return n.fromStr=function(t){return new n(ll.indexOf(t))},n.prototype.nth=function(t){return this.n===t?this:new n(this.weekday,t)},n.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},n.prototype.toString=function(){var t=ll[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n})()});function us(n,t,e){e===void 0&&(e=" ");var r=String(n);return t=t>>0,r.length>t?String(r):(t=t-r.length,t>e.length&&(e+=Fe(e,t/e.length)),e.slice(0,t)+String(r))}var rt,An,Fg,Lt,Xn,Fe,Hw,Bw,jt,lc,Pn,pt,qe,cn=K(()=>{ls();rt=function(n){return n!=null},An=function(n){return typeof n=="number"},Fg=function(n){return typeof n=="string"&&ll.includes(n)},Lt=Array.isArray,Xn=function(n,t){t===void 0&&(t=n),arguments.length===1&&(t=n,n=0);for(var e=[],r=n;r{cn();Ir=function(n,t,e,r,i,s){return r===void 0&&(r=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(n,t-1,e,r,i,s))},B2=[31,28,31,30,31,30,31,31,30,31,30,31],Vw=1e3*60*60*24,uc=9999,zw=Ir(1970,1,1),G2=[6,0,1,2,3,4,5],oa=function(n){return n%4===0&&n%100!==0||n%400===0},Lg=function(n){return n instanceof Date},cs=function(n){return Lg(n)&&!isNaN(n.getTime())},V2=function(n,t){var e=n.getTime(),r=t.getTime(),i=e-r;return Math.round(i/Vw)},ul=function(n){return V2(n,zw)},cc=function(n){return new Date(zw.getTime()+n*Vw)},z2=function(n){var t=n.getUTCMonth();return t===1&&oa(n.getUTCFullYear())?29:B2[t]},ui=function(n){return G2[n.getUTCDay()]},Ug=function(n,t){var e=Ir(n,t+1,1);return[ui(e),z2(e)]},dc=function(n,t){return t=t||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},fc=function(n){var t=new Date(n.getTime());return t},qg=function(n){for(var t=[],e=0;e{Q2=(function(){function n(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,t==="between"?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):t==="before"?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):t==="after"&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return n.prototype.accept=function(t){++this.total;var e=this.minDate&&tthis.maxDate;if(this.method==="between"){if(e)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return e?!0:(this.add(t),!1);return this.add(t)},n.prototype.add=function(t){return this._result.push(t),!0},n.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;default:return t.length?t[t.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n})(),di=Q2});function ua(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yg(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Kw(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})}function Z(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r{Yg=function(n,t){return Yg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Yg(n,t)};Ut=function(){return Ut=Object.assign||function(t){for(var e,r=1,i=arguments.length;r{Nr();pc();K2=(function(n){ua(t,n);function t(e,r,i){var s=n.call(this,e,r)||this;return s.iterator=i,s}return t.prototype.add=function(e){return this.iterator(e,this._result.length)?(this._result.push(e),!0):!1},t})(di),Wg=K2});var X2,ds,mc=K(()=>{X2={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},ds=X2});var Zw,Z2,J2,eU,Fr,Jw=K(()=>{mc();Zn();cn();Zw=function(n,t){return n.indexOf(t)!==-1},Z2=function(n){return n.toString()},J2=function(n,t,e){return"".concat(t," ").concat(e,", ").concat(n)},eU=(function(){function n(t,e,r,i){if(e===void 0&&(e=Z2),r===void 0&&(r=ds),i===void 0&&(i=J2),this.text=[],this.language=r||ds,this.gettext=e,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.origOptions,this.origOptions.bymonthday){var s=[].concat(this.options.bymonthday),a=[].concat(this.options.bynmonthday);s.sort(function(c,d){return c-d}),a.sort(function(c,d){return d-c}),this.bymonthday=s.concat(a),this.bymonthday.length||(this.bymonthday=null)}if(rt(this.origOptions.byweekday)){var o=Lt(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return!!c.n}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var u=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(t){var e=!0;if(!(t.options.freq in n.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var r in t.origOptions){if(Zw(["dtstart","tzid","wkst","freq"],r))return!0;if(!Zw(n.IMPLEMENTED[t.options.freq],r))return!1}return e},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[oe.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var e=this.options.until;this.add(this.dateFormatter(e.getUTCFullYear(),this.language.monthNames[e.getUTCMonth()],e.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},n.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},n.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},n.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},n.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},n.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},n.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,r=this.gettext;if(t===-1)return r("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:e=i+r("st");break;case 2:case 22:e=i+r("nd");break;case 3:case 23:e=i+r("rd");break;default:e=i+r("th")}return t<0?e+" "+r("last"):e},n.prototype.monthtext=function(t){return this.language.monthNames[t-1]},n.prototype.weekdaytext=function(t){var e=An(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},n.prototype.plural=function(t){return t%100!==1},n.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},n.prototype.list=function(t,e,r,i){var s=this;i===void 0&&(i=","),Lt(t)||(t=[t]);var a=function(l,u,c){for(var d="",f=0;f366)throw new Error("Nth out of range: "+f);return r.nextSymbol(),r.accept("last")?-f:f;default:return!1}}function c(){r.accept("on"),r.accept("the");var f=u();if(f)for(e.bymonthday=[f],r.nextSymbol();r.accept("comma");){if(f=u(),!f)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.bymonthday.push(f),r.nextSymbol()}}function d(){if(r.symbol==="until"){var f=Date.parse(r.text);if(!f)throw new Error("Cannot parse until date:"+r.text);e.until=new Date(f)}else r.accept("for")&&(e.count=parseInt(r.value[0],10),r.expect("number"))}}var tU,eS=K(()=>{mc();Zn();tU=(function(){function n(t){this.done=!0,this.rules=t}return n.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&this.symbol===null},n.prototype.nextSymbol=function(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;var r=void 0;t=null;for(var i in this.rules){r=this.rules[i];var s=r.exec(this.text);s&&(t===null||s[0].length>t[0].length)&&(t=s,e=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(e==="SKIP");return this.symbol=e,this.value=t,!0},n.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},n})()});function fl(n){return n{(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(Ce||(Ce={}))});var tS,ca,nS,rS,iS=K(()=>{Jw();eS();Zn();fi();mc();tS=function(n,t){return t===void 0&&(t=ds),new oe(dl(n,t)||void 0)},ca=["count","until","interval","byweekday","bymonthday","bymonth"];Fr.IMPLEMENTED=[];Fr.IMPLEMENTED[Ce.HOURLY]=ca;Fr.IMPLEMENTED[Ce.MINUTELY]=ca;Fr.IMPLEMENTED[Ce.DAILY]=["byhour"].concat(ca);Fr.IMPLEMENTED[Ce.WEEKLY]=ca;Fr.IMPLEMENTED[Ce.MONTHLY]=ca;Fr.IMPLEMENTED[Ce.YEARLY]=["byweekno","byyearday"].concat(ca);nS=function(n,t,e,r){return new Fr(n,t,e,r).toString()},rS=Fr.isFullyConvertible});var da,sS,hc=K(()=>{Nr();fi();cn();Ht();da=(function(){function n(t,e,r,i){this.hour=t,this.minute=e,this.second=r,this.millisecond=i||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},n})(),sS=(function(n){ua(t,n);function t(e,r,i,s,a,o,l){var u=n.call(this,s,a,o,l)||this;return u.year=e,u.month=r,u.day=i,u}return t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return ui(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var r=Math.floor(this.month/12),i=jt(this.month,12);this.month=i,this.year+=r,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+e*7:this.day+=-(this.getWeekday()-r)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,r,i){for(r&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=lc(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),Pn(i)||qe(i,this.hour))break}},t.prototype.addMinutes=function(e,r,i,s){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var a=lc(this.minute,60),o=a.div,l=a.mod;if(o&&(this.minute=l,this.addHours(o,!1,i)),(Pn(i)||qe(i,this.hour))&&(Pn(s)||qe(s,this.minute)))break}},t.prototype.addSeconds=function(e,r,i,s,a){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var o=lc(this.second,60),l=o.div,u=o.mod;if(l&&(this.second=u,this.addMinutes(l,!1,i,s)),(Pn(i)||qe(i,this.hour))&&(Pn(s)||qe(s,this.minute))&&(Pn(a)||qe(a,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=Ug(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,this.month===13&&(this.month=1,++this.year,this.year>uc))return;e=Ug(this.year,this.month-1)[1]}}},t.prototype.add=function(e,r){var i=e.freq,s=e.interval,a=e.wkst,o=e.byhour,l=e.byminute,u=e.bysecond;switch(i){case Ce.YEARLY:return this.addYears(s);case Ce.MONTHLY:return this.addMonths(s);case Ce.WEEKLY:return this.addWeekly(s,a);case Ce.DAILY:return this.addDaily(s);case Ce.HOURLY:return this.addHours(s,r,o);case Ce.MINUTELY:return this.addMinutes(s,r,o,l);case Ce.SECONDLY:return this.addSeconds(s,r,o,l,u)}},t})(da)});function $g(n){for(var t=[],e=Object.keys(n),r=0,i=e;r=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(t.byweekno||pt(t.byweekno)||pt(t.byyearday)||t.bymonthday||pt(t.bymonthday)||rt(t.byweekday)||rt(t.byeaster)))switch(t.freq){case oe.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case oe.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case oe.WEEKLY:t.byweekday=[ui(t.dtstart)];break}if(rt(t.bymonth)&&!Lt(t.bymonth)&&(t.bymonth=[t.bymonth]),rt(t.byyearday)&&!Lt(t.byyearday)&&An(t.byyearday)&&(t.byyearday=[t.byyearday]),!rt(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(Lt(t.bymonthday)){for(var i=[],s=[],e=0;e0?i.push(r):r<0&&s.push(r)}t.bymonthday=i,t.bynmonthday=s}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(rt(t.byweekno)&&!Lt(t.byweekno)&&(t.byweekno=[t.byweekno]),!rt(t.byweekday))t.bynweekday=null;else if(An(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Fg(t.byweekday))t.byweekday=[bt.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof bt)!t.byweekday.n||t.freq>oe.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],e=0;eoe.MONTHLY?a.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=pt(a)?a:null,t.bynweekday=pt(o)?o:null}return rt(t.byhour)?An(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq{Nr();fi();cn();Zn();Ht();ls();hc()});function hl(n){var t=n.split(` +`).map(nU).filter(function(e){return e!==null});return Ut(Ut({},t[0]),t[1])}function ml(n){var t={},e=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!e)return t;var r=e[1],i=e[2];return r&&(t.tzid=r),t.dtstart=cl(i),t}function nU(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var t=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!t)return uS(n);var e=t[1];switch(e.toUpperCase()){case"RRULE":case"EXRULE":return uS(n);case"DTSTART":return ml(n);default:throw new Error("Unsupported RFC prop ".concat(e," in ").concat(n))}}function uS(n){var t=n.replace(/^RRULE:/i,""),e=ml(t),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":e.freq=Ce[o.toUpperCase()];break;case"WKST":e.wkst=Jn[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=rU(o),u=a.toLowerCase();e[u]=l;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=iU(o);break;case"DTSTART":case"TZID":var c=ml(n);e.tzid=c.tzid,e.dtstart=c.dtstart;break;case"UNTIL":e.until=cl(o);break;case"BYEASTER":e.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),e}function rU(n){if(n.indexOf(",")!==-1){var t=n.split(",");return t.map(cS)}return cS(n)}function cS(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function iU(n){var t=n.split(",");return t.map(function(e){if(e.length===2)return Jn[e];var r=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!r||r.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var i=Number(r[1]),s=r[2],a=Jn[s].weekday;return new bt(a,i)})}var Hg=K(()=>{Nr();fi();ls();Ht();Zn()});var fs,gc=K(()=>{Ht();fs=(function(){function n(t,e){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var t=la(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:Qw(this.date,this.tzid)},n})()});function gl(n){for(var t=[],e="",r=Object.keys(n),i=Object.keys(pl),s=0;s{Zn();cn();ls();Ht();gc()});function aU(n,t){return Array.isArray(n)?!Array.isArray(t)||n.length!==t.length?!1:n.every(function(e,r){return e.getTime()===t[r].getTime()}):n instanceof Date?t instanceof Date&&n.getTime()===t.getTime():n===t}var dS,fS=K(()=>{pc();Ht();cn();dS=(function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(t,e,r){e&&(e=e instanceof Date?fc(e):qg(e)),t==="all"?this.all=e:(r._value=e,this[t].push(r))},n.prototype._cacheGet=function(t,e){var r=!1,i=e?Object.keys(e):[],s=function(c){for(var d=0;d{Nr();cn();pS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Fe(1,31),!0),Fe(2,28),!0),Fe(3,31),!0),Fe(4,30),!0),Fe(5,31),!0),Fe(6,30),!0),Fe(7,31),!0),Fe(8,31),!0),Fe(9,30),!0),Fe(10,31),!0),Fe(11,30),!0),Fe(12,31),!0),Fe(1,7),!0),mS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Fe(1,31),!0),Fe(2,29),!0),Fe(3,31),!0),Fe(4,30),!0),Fe(5,31),!0),Fe(6,30),!0),Fe(7,31),!0),Fe(8,31),!0),Fe(9,30),!0),Fe(10,31),!0),Fe(11,30),!0),Fe(12,31),!0),Fe(1,7),!0),oU=Xn(1,29),lU=Xn(1,30),Pi=Xn(1,31),Bt=Xn(1,32),hS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Bt,!0),lU,!0),Bt,!0),Pi,!0),Bt,!0),Pi,!0),Bt,!0),Bt,!0),Pi,!0),Bt,!0),Pi,!0),Bt,!0),Bt.slice(0,7),!0),gS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Bt,!0),oU,!0),Bt,!0),Pi,!0),Bt,!0),Pi,!0),Bt,!0),Bt,!0),Pi,!0),Bt,!0),Pi,!0),Bt,!0),Bt.slice(0,7),!0),uU=Xn(-28,0),cU=Xn(-29,0),Ii=Xn(-30,0),Gt=Xn(-31,0),yS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Gt,!0),cU,!0),Gt,!0),Ii,!0),Gt,!0),Ii,!0),Gt,!0),Gt,!0),Ii,!0),Gt,!0),Ii,!0),Gt,!0),Gt.slice(0,7),!0),bS=Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z(Z([],Gt,!0),uU,!0),Gt,!0),Ii,!0),Gt,!0),Ii,!0),Gt,!0),Gt,!0),Ii,!0),Gt,!0),Ii,!0),Gt,!0),Gt.slice(0,7),!0),TS=[0,31,60,91,121,152,182,213,244,274,305,335,366],vS=[0,31,59,90,120,151,181,212,243,273,304,334,365],Gg=(function(){for(var n=[],t=0;t<55;t++)n=n.concat(Xn(7));return n})()});function _S(n,t){var e=Ir(n,1,1),r=oa(n)?366:365,i=oa(n+1)?366:365,s=ul(e),a=ui(e),o=Ut(Ut({yearlen:r,nextyearlen:i,yearordinal:s,yearweekday:a},dU(n)),{wnomask:null});if(Pn(t.byweekno))return o;o.wnomask=Fe(0,r+7);var l,u,c=l=jt(7-a+t.wkst,7);c>=4?(c=0,u=o.yearlen+jt(a-t.wkst,7)):u=r-c;for(var d=Math.floor(u/7),f=jt(u,7),p=Math.floor(d+f/4),h=0;h0&&b<=p){var v=void 0;b>1?(v=c+(b-1)*7,c!==l&&(v-=7-l)):v=c;for(var E=0;E<7&&(o.wnomask[v]=1,v++,o.wdaymask[v]!==t.wkst);E++);}}if(qe(t.byweekno,1)){var v=c+p*7;if(c!==l&&(v-=7-l),v=4?(Y=0,V=X+jt(x-t.wkst,7)):V=r-c,C=Math.floor(52+jt(V,7)/4)}if(qe(t.byweekno,C))for(var v=0;v{Nr();Ht();cn();kS()});function SS(n,t,e,r,i,s){var a={lastyear:n,lastmonth:t,nwdaymask:[]},o=[];if(s.freq===oe.YEARLY)if(Pn(s.bymonth))o=[[0,e]];else for(var l=0;l{Zn();cn()});function ES(n,t){t===void 0&&(t=0);var e=n%19,r=Math.floor(n/100),i=n%100,s=Math.floor(r/4),a=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),u=Math.floor(19*e+r-s-l+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-u-d)%7,p=Math.floor((e+11*u+22*f)/451),h=Math.floor((u+f-7*p+114)/31),b=(u+f-7*p+114)%31+1,v=Date.UTC(n,h-1,b+t),E=Date.UTC(n,0,1);return[Math.ceil((v-E)/(1e3*60*60*24))]}var xS=K(()=>{});var fU,OS,RS=K(()=>{cn();fi();wS();DS();xS();hc();Ht();fU=(function(){function n(t){this.options=t}return n.prototype.rebuild=function(t,e){var r=this.options;if(t!==this.lastyear&&(this.yearinfo=_S(t,r)),pt(r.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=SS(t,e,s,a,o,r)}rt(r.byeaster)&&(this.eastermask=ES(t,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[Xn(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(t,e){for(var r=this.mrange[e-1],i=this.mrange[e],s=Fe(null,this.yearlen),a=r;a{Ht();cn()});function yc(n,t){var e=t.dtstart,r=t.freq,i=t.interval,s=t.until,a=t.bysetpos,o=t.count;if(o===0||i===0)return pi(n);var l=sS.fromDate(e),u=new OS(t);u.rebuild(l.year,l.month);for(var c=hU(u,l,t);;){var d=u.getdayset(r)(l.year,l.month,l.day),f=d[0],p=d[1],h=d[2],b=mU(f,p,h,u,t);if(pt(a))for(var v=CS(a,c,p,h,u,f),E=0;Es)return pi(n);if(C>=e){var x=AS(C,t);if(!n.accept(x)||o&&(--o,!o))return pi(n)}}else for(var E=p;Es)return pi(n);if(C>=e){var x=AS(C,t);if(!n.accept(x)||o&&(--o,!o))return pi(n)}}}if(t.interval===0||(l.add(t,b),l.year>uc))return pi(n);fl(r)||(c=u.gettimeset(r)(l.hour,l.minute,l.second,0)),u.rebuild(l.year,l.month)}}function pU(n,t,e){var r=e.bymonth,i=e.byweekno,s=e.byweekday,a=e.byeaster,o=e.bymonthday,l=e.bynmonthday,u=e.byyearday;return pt(r)&&!qe(r,n.mmask[t])||pt(i)&&!n.wnomask[t]||pt(s)&&!qe(s,n.wdaymask[t])||pt(n.nwdaymask)&&!n.nwdaymask[t]||a!==null&&!qe(n.eastermask,t)||(pt(o)||pt(l))&&!qe(o,n.mdaymask[t])&&!qe(l,n.nmdaymask[t])||pt(u)&&(t=n.yearlen&&!qe(u,t+1-n.yearlen)&&!qe(u,-n.nextyearlen+t-n.yearlen))}function AS(n,t){return new fs(n,t.tzid).rezonedDate()}function pi(n){return n.getValue()}function mU(n,t,e,r,i){for(var s=!1,a=t;a=oe.HOURLY&&pt(i)&&!qe(i,t.hour)||r>=oe.MINUTELY&&pt(s)&&!qe(s,t.minute)||r>=oe.SECONDLY&&pt(a)&&!qe(a,t.second)?[]:n.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}var Vg=K(()=>{fi();Ht();RS();Zn();jg();cn();gc();MS();hc()});var Jn,pl,lS,oe,Zn=K(()=>{Ht();pc();Xw();iS();fi();jg();Hg();Bg();fS();ls();Vg();Jn={MO:new bt(0),TU:new bt(1),WE:new bt(2),TH:new bt(3),FR:new bt(4),SA:new bt(5),SU:new bt(6)},pl={freq:Ce.YEARLY,dtstart:null,interval:1,wkst:Jn.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},lS=Object.keys(pl),oe=(function(){function n(t,e){t===void 0&&(t={}),e===void 0&&(e=!1),this._cache=e?null:new dS,this.origOptions=$g(t);var r=aS(t).parsedOptions;this.options=r}return n.parseText=function(t,e){return dl(t,e)},n.fromText=function(t,e){return tS(t,e)},n.fromString=function(t){return new n(n.parseString(t)||void 0)},n.prototype._iter=function(t){return yc(t,this.options)},n.prototype._cacheGet=function(t,e){return this._cache?this._cache._cacheGet(t,e):!1},n.prototype._cacheAdd=function(t,e,r){if(this._cache)return this._cache._cacheAdd(t,e,r)},n.prototype.all=function(t){if(t)return this._iter(new Wg("all",{},t));var e=this._cacheGet("all");return e===!1&&(e=this._iter(new di("all",{})),this._cacheAdd("all",e)),e},n.prototype.between=function(t,e,r,i){if(r===void 0&&(r=!1),!cs(t)||!cs(e))throw new Error("Invalid date passed in to RRule.between");var s={before:e,after:t,inc:r};if(i)return this._iter(new Wg("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new di("between",s)),this._cacheAdd("between",a,s)),a},n.prototype.before=function(t,e){if(e===void 0&&(e=!1),!cs(t))throw new Error("Invalid date passed in to RRule.before");var r={dt:t,inc:e},i=this._cacheGet("before",r);return i===!1&&(i=this._iter(new di("before",r)),this._cacheAdd("before",i,r)),i},n.prototype.after=function(t,e){if(e===void 0&&(e=!1),!cs(t))throw new Error("Invalid date passed in to RRule.after");var r={dt:t,inc:e},i=this._cacheGet("after",r);return i===!1&&(i=this._iter(new di("after",r)),this._cacheAdd("after",i,r)),i},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return gl(this.origOptions)},n.prototype.toText=function(t,e,r){return nS(this,t,e,r)},n.prototype.isFullyConvertibleToText=function(){return rS(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=Ce.YEARLY,n.MONTHLY=Ce.MONTHLY,n.WEEKLY=Ce.WEEKLY,n.DAILY=Ce.DAILY,n.HOURLY=Ce.HOURLY,n.MINUTELY=Ce.MINUTELY,n.SECONDLY=Ce.SECONDLY,n.MO=Jn.MO,n.TU=Jn.TU,n.WE=Jn.WE,n.TH=Jn.TH,n.FR=Jn.FR,n.SA=Jn.SA,n.SU=Jn.SU,n.parseString=hl,n.optionsToString=gl,n})()});function PS(n,t,e,r,i,s){var a={},o=n.accept;function l(f,p){e.forEach(function(h){h.between(f,p,!0).forEach(function(b){a[Number(b)]=!0})})}i.forEach(function(f){var p=new fs(f,s).rezonedDate();a[Number(p)]=!0}),n.accept=function(f){var p=Number(f);return isNaN(p)?o.call(this,f):!a[p]&&(l(new Date(p-1),new Date(p+1)),!a[p])?(a[p]=!0,o.call(this,f)):!0},n.method==="between"&&(l(n.args.after,n.args.before),n.accept=function(f){var p=Number(f);return a[p]?!0:(a[p]=!0,o.call(this,f))});for(var u=0;u{gc();Vg();Ht()});function gU(n,t){var e=[],r=[],i=[],s=[],a=ml(n),o=a.dtstart,l=a.tzid,u=kU(n,t.unfold);return u.forEach(function(c){var d;if(c){var f=vU(c),p=f.name,h=f.parms,b=f.value;switch(p.toUpperCase()){case"RRULE":if(h.length)throw new Error("unsupported RRULE parm: ".concat(h.join(",")));e.push(hl(c));break;case"RDATE":var v=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&d!==void 0?d:[],E=v[1];E&&!l&&(l=E),r=r.concat(FS(b,h));break;case"EXRULE":if(h.length)throw new Error("unsupported EXRULE parm: ".concat(h.join(",")));i.push(hl(b));break;case"EXDATE":s=s.concat(FS(b,h));break;case"DTSTART":break;default:throw new Error("unsupported property: "+p)}}}),{dtstart:o,tzid:l,rrulevals:e,rdatevals:r,exrulevals:i,exdatevals:s}}function yU(n,t){var e=gU(n,t),r=e.rrulevals,i=e.rdatevals,s=e.exrulevals,a=e.exdatevals,o=e.dtstart,l=e.tzid,u=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||i.length||s.length||a.length){var c=new Kg(u);return c.dtstart(o),c.tzid(l||void 0),r.forEach(function(f){c.rrule(new oe(zg(f,o,l),u))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new oe(zg(f,o,l),u))}),a.forEach(function(f){c.exdate(f)}),t.compatible&&t.dtstart&&c.rdate(o),c}var d=r[0]||{};return new oe(zg(d,d.dtstart||t.dtstart||o,d.tzid||t.tzid||l),u)}function bc(n,t){return t===void 0&&(t={}),yU(n,bU(t))}function zg(n,t,e){return Ut(Ut({},n),{dtstart:t,tzid:e})}function bU(n){var t=[],e=Object.keys(n),r=Object.keys(NS);if(e.forEach(function(i){qe(r,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return Ut(Ut({},NS),n)}function TU(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var t=Bw(n,":",1),e=t[0],r=t[1];return{name:e,value:r}}function vU(n){var t=TU(n),e=t.name,r=t.value,i=e.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}function kU(n,t){if(t===void 0&&(t=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!t)return n.split(/\s/);for(var e=n.split(` +`),r=0;r0&&i[0]===" "?(e[r-1]+=i.slice(1),e.splice(r,1)):r+=1:e.splice(r,1)}return e}function _U(n){n.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function FS(n,t){return _U(t),n.split(",").map(function(e){return cl(e)})}var NS,Qg=K(()=>{Nr();Zn();Xg();Ht();cn();Hg();NS={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function LS(n){var t=this;return function(e){if(e!==void 0&&(t["_".concat(n)]=e),t["_".concat(n)]!==void 0)return t["_".concat(n)];for(var r=0;r{Nr();Zn();Ht();cn();IS();Qg();Bg();Kg=(function(n){ua(t,n);function t(e){e===void 0&&(e=!1);var r=n.call(this,{},e)||this;return r.dtstart=LS.apply(r,["dtstart"]),r.tzid=LS.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return t.prototype._iter=function(e){return PS(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){US(e,this._rrule)},t.prototype.exrule=function(e){US(e,this._exrule)},t.prototype.rdate=function(e){qS(e,this._rdate)},t.prototype.exdate=function(e){qS(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return bc(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return bc(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(gl({dtstart:this._dtstart}))),this._rrule.forEach(function(r){e=e.concat(r.toString().split(` +`))}),this._exrule.forEach(function(r){e=e.concat(r.toString().split(` +`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&e.push(YS("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(YS("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(` +`)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(r){return e.rrule(r.clone())}),this._exrule.forEach(function(r){return e.exrule(r.clone())}),this._rdate.forEach(function(r){return e.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return e.exdate(new Date(r.getTime()))}),e},t})(oe)});var WS=K(()=>{Zn();Xg();Qg();fi();ls();Ht()});var mi,Tc=K(()=>{"use strict";WS();mi=class n{constructor({rrule:t,baseOnToday:e,occurrence:r}){this.rrule=t,this.baseOnToday=e,this.occurrence=r}static fromText({recurrenceRuleText:t,occurrence:e}){try{let r=t.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(r==null)return null;let i=r[1].trim(),s=r[2]!==void 0,a=oe.parseText(i);if(a!==null){let o=e.referenceDate;!s&&o!==null?a.dtstart=window.moment(o).startOf("day").utc(!0).toDate():a.dtstart=window.moment().startOf("day").utc(!0).toDate();let l=new oe(a);return new n({rrule:l,baseOnToday:s,occurrence:e})}}catch(r){r instanceof Error&&console.log(r.message)}return null}toText(){let t=this.rrule.toText();return this.baseOnToday&&(t+=" when done"),t}next(t=window.moment()){let e=this.nextReferenceDate(t);return e===null?null:this.occurrence.next(e)}identicalTo(t){return this.baseOnToday!==t.baseOnToday||!this.occurrence.isIdenticalTo(t.occurrence)?!1:this.toText()===t.toText()}nextReferenceDate(t){return this.baseOnToday?this.nextReferenceDateFromToday(t.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(t){let e=new oe(pe(U({},this.rrule.origOptions),{dtstart:t.startOf("day").utc(!0).toDate()}));return this.nextAfter(t.endOf("day"),e)}nextReferenceDateFromOriginalReferenceDate(){var e;let t=window.moment((e=this.occurrence.referenceDate)!=null?e:void 0).endOf("day");return this.nextAfter(t,this.rrule)}nextAfter(t,e){t.utc(!0);let r=window.moment.utc(e.after(t.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(r=n.nextAfterMonths(t,r,e,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(r=n.nextAfterYears(t,r,e,a[1])),n.addTimezone(r)}static nextAfterMonths(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));n.isSkippingTooManyMonths(t,e,s);)e=n.fromOneDayEarlier(t,r);return e}static isSkippingTooManyMonths(t,e,r){let i=e.month()-t.month(),s=e.year()-t.year();return i+=s*12,i>r}static nextAfterYears(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));n.isSkippingTooManyYears(t,e,s);)e=n.fromOneDayEarlier(t,r);return e}static isSkippingTooManyYears(t,e,r){return e.year()-t.year()>r}static fromOneDayEarlier(t,e){t.subtract(1,"days").endOf("day");let r=e.origOptions;return r.dtstart=t.startOf("day").toDate(),e=new oe(r),window.moment.utc(e.after(t.toDate()))}static addTimezone(t){return window.moment.utc(t).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}}});function $S(n,t,e){let r=new Map([["cancelled date","cancelledDate"],["created date","createdDate"],["depends on","dependsOn"],["done date","doneDate"],["due date","dueDate"],["id","id"],["on completion","onCompletion"],["priority","priority"],["recurrence rule","recurrenceRule"],["scheduled date","scheduledDate"],["start date","startDate"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n.setVisibility(s,e),!0;return t.startsWith("tags")?(n.setTagsVisibility(e),!0):!1}var yl,vc,Lr,ps=K(()=>{"use strict";yl=(p=>(p.Description="description",p.Id="id",p.DependsOn="dependsOn",p.Priority="priority",p.RecurrenceRule="recurrenceRule",p.OnCompletion="onCompletion",p.CreatedDate="createdDate",p.StartDate="startDate",p.ScheduledDate="scheduledDate",p.DueDate="dueDate",p.CancelledDate="cancelledDate",p.DoneDate="doneDate",p.BlockLink="blockLink",p))(yl||{}),vc=Object.values(yl),Lr=class{constructor(){this.visible={};this.tagsVisible=!0;vc.forEach(t=>{this.visible[t]=!0})}isShown(t){return this.visible[t]}areTagsShown(){return this.tagsVisible}hide(t){this.visible[t]=!1}setVisibility(t,e){this.visible[t]=e}setTagsVisibility(t){this.tagsVisible=t}get shownComponents(){return vc.filter(t=>this.visible[t])}get hiddenComponents(){return vc.filter(t=>!this.visible[t])}get toggleableComponents(){return vc.filter(t=>t!=="description"&&t!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(t=>{this.visible[t]=!this.visible[t]}),this.setTagsVisibility(!this.areTagsShown())}}});var Vt,Tt,In=K(()=>{"use strict";Vt=(o=>(o.TODO="TODO",o.DONE="DONE",o.IN_PROGRESS="IN_PROGRESS",o.ON_HOLD="ON_HOLD",o.CANCELLED="CANCELLED",o.NON_TASK="NON_TASK",o.EMPTY="EMPTY",o))(Vt||{}),Tt=class{constructor(t,e,r,i,s="TODO"){this.symbol=t,this.name=e,this.nextStatusSymbol=r,this.availableAsCommand=i,this.type=s}}});function jS(n){let t=n.trim().toLowerCase();return t==="delete"?"delete":t==="keep"?"keep":""}function wU(n,t){return n.filter(e=>e!==t)}function SU(n,t){let e=n.status,r=t.status,i=r.type===e.type;return r.type!=="DONE"||i}function HS(n,t){let e=t.length;if(n.onCompletion===""||n.onCompletion==="keep"||e===0)return t;let r=t[e-1];if(SU(n,r))return t;let s=n.onCompletion;return s==="delete"?wU(t,r):(console.log(`OnCompletion action ${s} not yet implemented.`),t)}var kc=K(()=>{"use strict";In()});var ms=K(()=>{"use strict"});function fa(n){return ma(n,"(\\d{4}-\\d{2}-\\d{2})")}function ma(n,t){let e=n+"\uFE0F?";return t!==""&&(e+=" *"+t),e+="$",new RegExp(e)}function _c(n,t,e){return e?n?" "+t:` ${t} ${e}`:""}function pa(n,t,e){return e?n?" "+t:` ${t} ${e.format(We.dateFormat)}`:""}function BS(){let n=[];return Object.values(bl.prioritySymbols).forEach(t=>{t.length>0&&n.push(t)}),Object.values(bl).forEach(t=>{typeof t=="string"&&n.push(t)}),n}var hs,Zg,bl,gs,vl=K(()=>{"use strict";ps();kc();oc();Tc();At();ms();Xr();hs=/[a-zA-Z0-9-_]+/,Zg=new RegExp(hs.source+"( *, *"+hs.source+" *)*");bl={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:ma("(\u{1F53A}|\u23EB|\u{1F53C}|\u{1F53D}|\u23EC)",""),startDateRegex:fa("\u{1F6EB}"),createdDateRegex:fa("\u2795"),scheduledDateRegex:fa("(?:\u23F3|\u231B)"),dueDateRegex:fa("(?:\u{1F4C5}|\u{1F4C6}|\u{1F5D3})"),doneDateRegex:fa("\u2705"),cancelledDateRegex:fa("\u274C"),recurrenceRegex:ma("\u{1F501}","([a-zA-Z0-9, !]+)"),onCompletionRegex:ma("\u{1F3C1}","([a-zA-Z]+)"),dependsOnRegex:ma("\u26D4","("+Zg.source+")"),idRegex:ma("\u{1F194}","("+hs.source+")")}};gs=class{constructor(t){this.symbols=t}serialize(t){let e=new Lr,r="",i=!1;for(let s of e.shownComponents)r+=this.componentToString(t,i,s);return r}componentToString(t,e,r){var b;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:l,cancelledDateSymbol:u,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:f,dependsOnSymbol:p,idSymbol:h}=this.symbols;switch(r){case"description":return t.description;case"priority":{let v="";return t.priority==="0"?v=" "+i.Highest:t.priority==="1"?v=" "+i.High:t.priority==="2"?v=" "+i.Medium:t.priority==="4"?v=" "+i.Low:t.priority==="5"&&(v=" "+i.Lowest),v}case"startDate":return pa(e,s,t.startDate);case"createdDate":return pa(e,a,t.createdDate);case"scheduledDate":return t.scheduledDateIsInferred?"":pa(e,o,t.scheduledDate);case"doneDate":return pa(e,l,t.doneDate);case"cancelledDate":return pa(e,u,t.cancelledDate);case"dueDate":return pa(e,f,t.dueDate);case"recurrenceRule":return t.recurrence?_c(e,c,t.recurrence.toText()):"";case"onCompletion":return t.onCompletion===""?"":_c(e,d,t.onCompletion);case"dependsOn":return t.dependsOn.length===0?"":_c(e,p,t.dependsOn.join(","));case"id":return _c(e,h,t.id);case"blockLink":return(b=t.blockLink)!=null?b:"";default:throw new Error(`Don't know how to render task component of type '${r}'`)}}parsePriority(t){let{prioritySymbols:e}=this.symbols;switch(t){case e.Lowest:return"5";case e.Low:return"4";case e.Medium:return"2";case e.High:return"1";case e.Highest:return"0";default:return"3"}}extractDateField(t,e,r){this.extractField(t,e,i=>{r(window.moment(i[1],We.dateFormat))})}extractField(t,e,r){let i=t.line.match(e);i!==null&&(r(i),t.line=t.line.replace(e,"").trim(),t.matched=!0)}deserialize(t){let{TaskFormatRegularExpressions:e}=this.symbols,r={line:t,matched:!1},i="3",s=null,a=null,o=null,l=null,u=null,c=null,d="",f=null,p="",h="",b=[],v="",E=20,C=0;do r.matched=!1,this.extractField(r,e.priorityRegex,x=>{i=this.parsePriority(x[1])}),this.extractDateField(r,e.doneDateRegex,x=>l=x),this.extractDateField(r,e.cancelledDateRegex,x=>u=x),this.extractDateField(r,e.dueDateRegex,x=>o=x),this.extractDateField(r,e.scheduledDateRegex,x=>a=x),this.extractDateField(r,e.startDateRegex,x=>s=x),this.extractDateField(r,e.createdDateRegex,x=>c=x),this.extractField(r,e.recurrenceRegex,x=>{d=x[1].trim()}),this.extractField(r,e.onCompletionRegex,x=>{p=jS(x[1])}),this.extractField(r,We.hashTagsFromEnd,x=>{let Y=x[0].trim();v=v.length>0?[Y,v].join(" "):Y}),this.extractField(r,e.idRegex,x=>{h=x[1].trim()}),this.extractField(r,e.dependsOnRegex,x=>{b=x[1].replace(/ /g,"").split(",").filter(Y=>Y!=="")}),C++;while(r.matched&&C<=E);return d.length>0&&(f=mi.fromText({recurrenceRuleText:d,occurrence:new li({startDate:s,scheduledDate:a,dueDate:o})})),v.length>0&&(r.line+=" "+v),{description:r.line,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:l,cancelledDate:u,recurrence:f,onCompletion:p,id:h,dependsOn:b,tags:ke.extractHashtags(r.line)}}}});function kl(n){let t="",e=!0;for(;e;)t=Math.random().toString(36).substring(2,8),n.includes(t)||(e=!1);return t}function wc(n,t){return n.id!==""?n:new ke(pe(U({},n),{id:kl(t)}))}function GS(n,t){let e=n;if(!n.dependsOn.includes(t.id)){let r=[...n.dependsOn,t.id];e=new ke(pe(U({},n),{dependsOn:r}))}return e}function VS(n,t){let e=n;if(n.dependsOn.includes(t.id)){let r=n.dependsOn.filter(i=>i!==t.id);e=new ke(pe(U({},n),{dependsOn:r}))}return e}var Sc=K(()=>{"use strict";At()});function Ni(n){return n.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var _l=K(()=>{"use strict"});var hi,Me,dn=K(()=>{"use strict";_l();hi=class hi{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return hi.instance||(hi.instance=new hi),hi.instance}get(){return this._globalFilter}set(t){this._globalFilter=t}reset(){this.set(hi.empty)}isEmpty(){return this.get()===hi.empty}equals(t){return this.get()===t}includedIn(t){let e=this.get();return t.includes(e)}prependTo(t){return this.get()+" "+t}removeAsWordFromDependingOnSettings(t){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(t):t}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(t){this._removeGlobalFilter=t}removeAsWordFrom(t){if(this.isEmpty())return t;let e=RegExp("(^|\\s)"+Ni(this.get())+"($|\\s)","ug");return t.search(e)>-1&&(t=t.replace(e,"$1$2").replace(" "," ").trim()),t}removeAsSubstringFrom(t){let e=this.get();return t.replace(e,"").trim()}};hi.empty="";Me=hi});function ys(n){return Me.getInstance().removeAsWordFrom(n.description)}function xU(n,t){if(n==="")return t;let e=(0,QS.prepareSimpleSearch)(n),r=-4;return t.map(a=>{let o=e(ys(a));return o&&o.score>r?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function Dc(n,t,e,r,i){let s=xU(n,t);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(e==null?void 0:e.description)&&a.taskLocation.path===(e==null?void 0:e.taskLocation.path)&&a.originalMarkdown===(e==null?void 0:e.originalMarkdown)||r!=null&&r.includes(a)||i!=null&&i.includes(a))),e&&s.sort((a,o)=>{let l=a.taskLocation.path===e.taskLocation.path,u=o.taskLocation.path===e.taskLocation.path;return l&&u?Math.abs(a.taskLocation.lineNumber-e.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-e.taskLocation.lineNumber):l?-1:u?1:0}),s.slice(0,EU)}var QS,EU,Jg=K(()=>{"use strict";QS=require("obsidian");dn();EU=20});function KS(n){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&n}function ty(n,t,e){let r=[n.startDateSymbol,n.scheduledDateSymbol,n.dueDateSymbol].join("|");return(i,s,a,o,l,u)=>{let c=[],{postfix:d,insertSkip:f}=RU(e,i,s),p={line:i,cursorPos:s,settings:a,dataviewMode:e,postfix:d,insertSkip:f};return c=c.concat(NU(r,t,p)),c=c.concat(FU(n.recurrenceSymbol,p)),KS(l)&&(c=c.concat(UU(n.idSymbol,o,p)),c=c.concat(qU(n.dependsOnSymbol,o,p,u))),c=c.concat(LU(n.onCompletionSymbol,t,p)),c=c.concat(CU(n,l,p)),c.length>0&&!c.some(h=>h.suggestionType==="match")&&(e||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` +`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function RU(n,t,e){let r=WU(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=n?r+" ":" ",s=n&&t.length>e&&t.charAt(e)===r?1:0;return{postfix:i,insertSkip:s}}function CU(n,t,e){let r=[],i=e.line;bs(r,i,n.dueDateSymbol,"due date"),bs(r,i,n.startDateSymbol,"start date"),bs(r,i,n.scheduledDateSymbol,"scheduled date"),MU(r,n,e),bs(r,i,n.recurrenceSymbol,"recurring (repeat)"),AU(r,n,e),KS(t)&&(bs(r,i,n.idSymbol,"id"),bs(r,i,n.dependsOnSymbol,"depends on id")),bs(r,i,n.onCompletionSymbol,"on completion");let s=PU(r,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?r:s}function bs(n,t,e,r){t.includes(e)||n.push({displayText:`${e} ${r}`,appendText:`${e} `})}function MU(n,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];n.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function AU(n,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=oi.parseDate("today",!0).format(We.dateFormat);n.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function PU(n,t){let e=ha(/([a-zA-Z'_-]*)/g,t),r=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=n.filter(a=>{var l;return((l=a.textToMatch)!=null?l:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;r.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return r}function XS(n,t){let e=`${t}`,r=`${n} ${t}`;return{displayText:e,appendText:r}}function IU(n,t){let r=`${oi.parseDate(t,!0).format(We.dateFormat)}`,i=`${t} (${r})`,s=`${n} ${r}`;return{displayText:i,appendText:s}}function NU(n,t,e){let r=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.length1?oi.parseDate(ac(o),!0):null;if(l!=null&&l.isValid()){let c=l.format(We.dateFormat);Ec(e,a,[c],XS,i)}let u=ny(r,o,t,!0);Ec(e,a,u,IU,i)}return i}function FU(n,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],r=[],i=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),s=ha(i,t);if(s&&s.length>=2){let o=s[1],l=s[2];if(l.length0){let f=(a=mi.fromText({recurrenceRuleText:l,occurrence:new li({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let p=`${o} ${f}`+t.postfix;if(r.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:p,insertAt:s.index,insertSkip:ry(s[0],t)}),s[0]==p)return[]}}let u=t.settings.autoSuggestMaxItems/2,c=ny(e,l,u,!1);c.length===0&&l.trim().length===0&&(c=e.slice(0,u)),Ec(t,s,c,(f,p)=>{let h=`${p}`,b=`${f} ${p}`;return{displayText:h,appendText:b}},r)}return r}function LU(n,t,e){let r=["delete","keep"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.lengtho.id));r.push({suggestionType:"match",displayText:"generate unique id",appendText:`${n} ${a}`+e.postfix,insertAt:s.index,insertSkip:ry(s[0],e)})}return r}function qU(n,t,e,r){let i=[],s=e.dataviewMode?Ni("()[]"):BS(),a=new RegExp(`(${n})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=ha(a,e);if(o&&o.length>=1){let l=o[2]||"",u=o[3],c=[];if(l){let d=l.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(u.length>=e.settings.autoSuggestMinMatch){let d=Dc(u.trim(),t,r,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${n}${l}`,insertAt:o.index,insertSkip:n.length+l.length+u.length,taskItDependsOn:f})}}return i}function ny(n,t,e,r){let s=n.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return r&&s.length===0&&(s=n.slice(0,e)),s}function Ec(n,t,e,r,i){let s=t[1];for(let a of e){let{displayText:o,appendText:l}=r(s,a);i.push({suggestionType:"match",displayText:o,appendText:l+n.postfix,insertAt:t.index,insertSkip:ry(t[0],n)})}}function ha(n,t){let e=t.line.matchAll(n),r=t.cursorPos;for(let i of e)if(i!=null&&i.index&&i.index[i,0])),r=Object.fromEntries(t.map(([i,s])=>[s,i]));for(let i of n)i in e?e[i]++:i in r&&(e[r[i]]=Math.max(0,e[r[i]]-1));return Object.values(e).some(i=>i>0)}function WU(n,t){if(t.length===0)return null;let e=Object.fromEntries(t.map(([s,a])=>[s,0])),r=Object.fromEntries(t.map(([s,a])=>[a,s])),i=[];for(let s=0;s=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==r[a]){i.splice(o,1);break}}e[r[a]]=Math.max(0,e[r[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function ZS(n,t){return(e,r,i,s,a)=>YU(e.slice(0,r),t)?n(e,r,i,s,a):[]}function JS(n,t,e){let r=Me.getInstance().includedIn(n),i=$U(e,t,r);return typeof i=="boolean"?i:r&&jU(n,t.ch)}function $U(n,t,e){var r,i;return(i=(r=n==null?void 0:n.editorComponent)==null?void 0:r.showTasksPluginAutoSuggest)==null?void 0:i.call(r,t,n,e)}function jU(n,t){if(n.length===0)return!1;let e=ke.extractTaskComponents(n);if(!e||e.status.type==="NON_TASK")return!1;let r=e.indentation+e.listMarker+" ["+e.status.symbol+"] ";return t>=r.length}function ry(n,t){return t.dataviewMode?n.length+t.insertSkip:n.length}var ey,OU,iy=K(()=>{"use strict";Pg();Ig();oc();Tc();vl();At();Sc();dn();Xr();Jg();_l();In();ey=5,OU=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=OU});var hr,wl=K(()=>{"use strict";ms();hr=class n{static priorityNameUsingNone(t){let e="ERROR";switch(t){case"1":e="High";break;case"0":e="Highest";break;case"2":e="Medium";break;case"3":e="None";break;case"4":e="Low";break;case"5":e="Lowest";break}return e}static priorityNameUsingNormal(t){return n.priorityNameUsingNone(t).replace("None","Normal")}static priorityValue(t){switch(t.toLowerCase()){case"lowest":return"5";case"low":return"4";case"medium":return"2";case"high":return"1";case"highest":return"0";default:return"3"}}}});function gr(n){let t=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,n,/ */,/[)\]]/,/(?: *,)?/,/$/].map(e=>e instanceof RegExp?e.source:e).join("");return new RegExp(t,n.flags)}var sy,xc,ay=K(()=>{"use strict";ps();wl();vl();sy={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:gr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:gr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:gr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:gr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:gr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:gr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:gr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:gr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:gr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:gr(new RegExp("dependsOn:: *("+Zg.source+")")),idRegex:gr(new RegExp("id:: *("+hs.source+")"))}},xc=class extends gs{constructor(){super(sy)}parsePriority(t){return hr.priorityValue(t)}componentToString(t,e,r){let i=super.componentToString(t,e,r),s=["blockLink","description"];return i!==""&&!s.includes(r)?` [${i.trim()}]`:i}}});var vt,xe,yr=K(()=>{"use strict";In();vt=class vt{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let t=this.type,e;switch(t){case"IN_PROGRESS":e="1";break;case"TODO":e="2";break;case"ON_HOLD":e="3";break;case"DONE":e="4";break;case"CANCELLED":e="5";break;case"NON_TASK":e="6";break;case"EMPTY":e="7";break}return`%%${e}%%${t}`}constructor(t){this.configuration=t}static getTypeForUnknownSymbol(t){switch(t){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";default:return"TODO"}}static getTypeFromStatusTypeString(t){return Vt[t]||"TODO"}static createUnknownStatus(t){return new vt(new Tt(t,"Unknown","x",!1,"TODO"))}static createFromImportedValue(t){let e=t[0],r=vt.getTypeFromStatusTypeString(t[3]);return new vt(new Tt(e,t[1],t[2],!1,r))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(t){let e=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let r of e)if(this[r]!==t[r])return!1;return!0}previewText(){let t="";return vt.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(t=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${t}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}};vt.DONE=new vt(new Tt("x","Done"," ",!0,"DONE")),vt.EMPTY=new vt(new Tt("","EMPTY","",!0,"EMPTY")),vt.TODO=new vt(new Tt(" ","Todo","x",!0,"TODO")),vt.CANCELLED=new vt(new Tt("-","Cancelled"," ",!0,"CANCELLED")),vt.IN_PROGRESS=new vt(new Tt("/","In Progress","x",!0,"IN_PROGRESS")),vt.ON_HOLD=new vt(new Tt("h","On Hold"," ",!0,"ON_HOLD")),vt.NON_TASK=new vt(new Tt("Q","Non-Task","A",!0,"NON_TASK"));xe=vt});var eD=K(()=>{"use strict";vl()});function HU(n){let t=n,e=!1,r=n.split(` +`);r.length>1&&(t=r[0],e=!0);let i=50;return t.length>i&&(t=t.slice(0,i),e=!0),e&&(t+="..."),t}function nD(n,t){let e=`Cannot find preset "${n}" in the Tasks settings`;if(Object.keys(t).length===0)e+=` +You can define the instruction(s) for "${n}" in the Tasks settings.`;else{let i=Math.max(...Object.keys(t).map(a=>a.length)),s=Object.entries(t).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>`${a.padEnd(i)}: ${HU(o)}`).join(` + `);e+=` +The following presets are defined in the Tasks settings: + ${s}`}return e}var tD,oy=K(()=>{"use strict";tD={this_file:"path includes {{query.file.path}}",this_folder:"folder includes {{query.file.folder}}",this_folder_only:"filter by function task.file.folder === query.file.folder",this_root:"root includes {{query.file.root}}",hide_date_fields:`# Hide any values for all date fields +hide due date +hide scheduled date +hide start date +hide created date +hide done date +hide cancelled date`,hide_non_date_fields:`# Hide all the non-date fields, but not tags +hide id +hide depends on +hide recurrence rule +hide on completion +hide priority`,hide_query_elements:`# Hide toolbar, postpone, edit and backlinks +hide toolbar +hide postpone button +hide edit button +hide backlinks`,hide_everything:`# Hide everything except description and any tags +preset hide_date_fields +preset hide_non_date_fields +preset hide_query_elements`}});var Oc,rD=K(()=>{"use strict";Oc=class{constructor(t=!1,e=!1,r=!1){this.ignoreSortInstructions=t,this.showTaskHiddenData=e,this.recordTimings=r}}});var ga,Rc=K(()=>{"use strict";ga={priority:!0,recurrence:!0,due:!0,scheduled:!0,start:!0,before_this:!0,after_this:!0,status:!0,created:!0,done:!0,cancelled:!0}});var wt,ya=K(()=>{"use strict";yr();wt=class n{constructor(){this.coreStatuses=[xe.TODO.configuration,xe.DONE.configuration],this.customStatuses=[xe.IN_PROGRESS.configuration,xe.CANCELLED.configuration]}static addStatus(t,e){t.push(e)}static replaceStatus(t,e,r){let i=this.findStatusIndex(e,t);return i<=-1?!1:(t.splice(i,1,r),!0)}static findStatusIndex(t,e){let r=new xe(t);return e.findIndex(i=>new xe(i).previewText()==r.previewText())}static deleteStatus(t,e){let r=this.findStatusIndex(e,t);return r<=-1?!1:(t.splice(r,1),!0)}static deleteAllCustomStatuses(t){t.customStatuses.splice(0)}static resetAllCustomStatuses(t){n.deleteAllCustomStatuses(t),new n().customStatuses.forEach(r=>{n.addStatus(t.customStatuses,r)})}static bulkAddStatusCollection(t,e){let r=[];return e.forEach(i=>{t.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?r.push(`The status ${i[1]} (${i[0]}) is already added.`):n.addStatus(t.customStatuses,xe.createFromImportedValue(i))}),r}static allStatuses(t){return t.coreStatuses.concat(t.customStatuses)}static applyToStatusRegistry(t,e){e.clearStatuses(),n.allStatuses(t).forEach(r=>{e.add(r)})}}});var sD,iD=K(()=>{sD=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}]});var Sl,aD=K(()=>{"use strict";iD();Sl=class n{constructor(t,e,r,i,s,a){this.internalName=t;this.index=e;this.description=r;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let t=[];return sD.forEach(e=>{t=[...t,new n(e.internalName,e.index,e.description,e.displayName,e.enabledByDefault,e.stable)]}),t}static get settingsFlags(){let t={};return n.values.forEach(e=>{t[e.internalName]=e.enabledByDefault}),t}static fromString(t){for(let e of n.values)if(t===e.internalName)return e;throw new RangeError(`Illegal argument passed to fromString(): ${t} does not correspond to any available Feature ${this.name}`)}}});function ly(n,t){for(let e in n)t[e]===void 0&&(t[e]=n[e])}function Dl(){return Nn[J().taskFormat]}function GU(n){let t=U({},n);return"includes"in t&&!("presets"in t)&&(t.presets=t.includes,delete t.includes),t}var Nn,uy,gi,J,it,Ts,oD,yt=K(()=>{"use strict";iy();vl();ay();In();yr();eD();ay();Di();oy();rD();Rc();ya();aD();Nn={tasksPluginEmoji:{getDisplayName:()=>O.t("settings.format.displayName.tasksEmojiFormat"),taskSerializer:new gs(bl),buildSuggestions:ty(bl,ey,!1)},dataview:{getDisplayName:()=>O.t("settings.format.displayName.dataview"),taskSerializer:new xc,buildSuggestions:ZS(ty(sy,ey,!0),[["(",")"],["[","]"]])}},uy={presets:tD,globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,removeScheduledDateOnRecurrence:!1,searchResults:{taskCountLocation:"bottom"},statusSettings:new wt,isShownInEditModal:ga,features:Sl.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new Oc,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},gi=U({},uy);J=()=>(ly(Sl.settingsFlags,gi.features),ly(uy.loggingOptions.minLevels,gi.loggingOptions.minLevels),ly(uy.debugSettings,gi.debugSettings),gi.statusSettings.customStatuses.forEach((n,t,e)=>{var i,s;let r=xe.getTypeFromStatusTypeString(n.type);e[t]=new Tt((i=n.symbol)!=null?i:" ",n.name,(s=n.nextStatusSymbol)!=null?s:"x",n.availableAsCommand,r)}),U({},gi)),it=n=>{let t=GU(n);return gi=U(U({},gi),t),J()},Ts=(n,t)=>(gi.generalSettings[n]=t,J()),oD=n=>{var t;return(t=gi.features[n])!=null?t:!1}});function Cc(n){let e={"<":"<",">":">","&":"&",'"':"""}[n];return e!==void 0?e:n}function lD(n){let t=[...n],e="";return t.forEach(r=>{e+=Cc(r)}),e}var uD=K(()=>{"use strict"});var Ze,br=K(()=>{"use strict";uD();yr();In();Ze=class n{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(t){this.clearStatuses(),t.forEach(e=>{this.add(e)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:t})=>t!==xe.EMPTY.symbol)}static getInstance(){return n.instance||(n.instance=new n),n.instance}add(t){this.hasSymbol(t.symbol)||(t instanceof xe?this._registeredStatuses.push(t):this._registeredStatuses.push(new xe(t)))}bySymbol(t){return this.hasSymbol(t)?this.getSymbol(t):xe.EMPTY}bySymbolOrCreate(t){return this.hasSymbol(t)?this.getSymbol(t):xe.createUnknownStatus(t)}byName(t){return this._registeredStatuses.filter(({name:e})=>e===t).length>0?this._registeredStatuses.filter(({name:e})=>e===t)[0]:xe.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(t){if(t.nextStatusSymbol!==""){let e=this.bySymbol(t.nextStatusSymbol);if(e!==null)return e}return xe.EMPTY}getNextStatusOrCreate(t){let e=this.getNextStatus(t);return e.type!=="EMPTY"?e:xe.createUnknownStatus(t.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(t){let e=this.getNextStatusOrCreate(t),r=this.getNextRecurrenceStatusOfType(e,"TODO");if(r)return r;let i=this.getNextRecurrenceStatusOfType(e,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(t,e){if(t.type===e)return t;let r=t;for(let i=0;i!this.hasSymbol(s.symbol)),r=new n,i=[];return e.forEach(s=>{if(r.hasSymbol(s.symbol))return;let a=n.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),r.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(t,e){let r=new Tt(t.symbol,e,t.nextStatusSymbol,t.availableAsCommand,t.type);return new xe(r)}getSymbol(t){return this._registeredStatuses.filter(({symbol:e})=>e===t)[0]}hasSymbol(t){return this._registeredStatuses.find(e=>e.symbol===t)!==void 0}addDefaultStatusTypes(){[xe.TODO,xe.IN_PROGRESS,xe.DONE,xe.CANCELLED].forEach(e=>{this.add(e)})}mermaidDiagram(t=!1){let e=this.registeredStatuses,r="mermaid",i=[],s=[];return e.forEach((a,o)=>{let l=this.getMermaidNodeLabel(a,t);i.push(`${o+1}${l}`);let u=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(e,u,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==u.symbol&&this.addEdgeIfNotToInternal(e,c,s,o,!0)}}),` +\`\`\`${r} +flowchart LR + +classDef TODO stroke:#f33,stroke-width:3px; +classDef DONE stroke:#0c0,stroke-width:3px; +classDef IN_PROGRESS stroke:#fa0,stroke-width:3px; +classDef CANCELLED stroke:#ddd,stroke-width:3px; +classDef NON_TASK stroke:#99e,stroke-width:3px; +classDef ON_HOLD stroke:#00f,stroke-width:3px; + +${i.join(` +`)} +${s.join(` +`)} + +linkStyle default stroke:gray +\`\`\` +`}addEdgeIfNotToInternal(t,e,r,i,s){let a=t.findIndex(u=>u.symbol===e.symbol),o=a!==-1,l=e.type!=="EMPTY";if(o&&l){let u;s?u='-. "\u{1F501}" .-> ':u=" --> ";let c=`${i+1}${u}${a+1}`;r.push(c)}}getMermaidNodeLabel(t,e){let r=lD(t.name),i=t.type;if(e){let s=Cc(t.symbol),a=Cc(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,l=`'${r}'`,u=`(${i})`;return`["${l}
${o}
${u}"]:::${i}`}else return`["${r}"]:::${i}`}}});var Ur,cD=K(()=>{"use strict";Ur=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}}});var dD,qt,Mc=K(()=>{"use strict";dD=require("obsidian");cD();Xr();qt=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date?this._date.clone():null}formatAsDate(t=""){return this.format(We.dateFormat,t)}formatAsDateAndTime(t=""){return this.format(We.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new Ur("Overdue",1):e.isSame(t,"day")?new Ur("Today",2):e.isValid()?new Ur("Future",3):new Ur("Invalid date",0):new Ur("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new Ur("",0);let e=this.fromNowOrder(t);return new Ur(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),r=t.isSameOrBefore(e,"second"),i=this.fromNowStartDateOfGroup(t,r,e);return Number((r?1:3)+i.format("YYYYMMDDHHmm"))}fromNowStartDateOfGroup(t,e,r){let i=t.clone().locale("en").fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?r.subtract(s,o):r.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new dD.Notice("Cannot postpone a null date");let r=window.moment().startOf("day");return this._date.isSameOrAfter(r,"day")?this._date.clone().add(e,t):r.add(e,t)}}});var mD=M((fD,pD)=>{(function(n){var t=Object.hasOwnProperty,e=Array.isArray?Array.isArray:function(T){return Object.prototype.toString.call(T)==="[object Array]"},r=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",l=o?setImmediate:setTimeout,u=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var T=Object.getOwnPropertyNames(m);return T.push.apply(T,Object.getOwnPropertySymbols(m)),T}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==n&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(m,T){var _="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(_+=" Event name: "+T+"."),typeof process!="undefined"&&process.emitWarning){var k=new Error(_);k.name="MaxListenersExceededWarning",k.emitter=this,k.count=m,process.emitWarning(k)}else console.error(_),console.trace&&console.trace()}var p=function(m,T,_){var k=arguments.length;switch(k){case 0:return[];case 1:return[m];case 2:return[m,T];case 3:return[m,T,_];default:for(var w=new Array(k);k--;)w[k]=arguments[k];return w}};function h(m,T){for(var _={},k,w=m.length,R=T?T.length:0,I=0;I0;)m=R[L],I.call(q,m,_[m]);this._listeners={},this._listenersCount=0,S()}}});function v(m,T,_,k){var w=Object.assign({},T);if(!m)return w;if(typeof m!="object")throw TypeError("options must be an object");var R=Object.keys(m),I=R.length,q,L,S;function $(ye){throw Error('Invalid "'+q+'" option value'+(ye?". Reason: "+ye:""))}for(var de=0;de0;)if(q===m[L])return R;I(T)}}var x=C(["function"]),Y=C(["object","function"]);function X(m,T,_){var k,w,R=0,I,q=new m(function(L,S,$){_=v(_,{timeout:0,overload:!1},{timeout:function(Te,we){return Te*=1,(typeof Te!="number"||Te<0||!Number.isFinite(Te))&&we("timeout must be a positive number"),Te}}),k=!_.overload&&typeof m.prototype.cancel=="function"&&typeof $=="function";function de(){w&&(w=null),R&&(clearTimeout(R),R=0)}var ye=function(Te){de(),L(Te)},fe=function(Te){de(),S(Te)};k?T(ye,fe,$):(w=[function(Te){fe(Te||Error("canceled"))}],T(ye,fe,function(Te){if(I)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Te!="function")throw TypeError("onCancel callback must be a function");w.push(Te)}),I=!0),_.timeout>0&&(R=setTimeout(function(){var Te=Error("timeout");Te.code="ETIMEDOUT",R=0,q.cancel(Te),S(Te)},_.timeout))});return k||(q.cancel=function(L){if(w){for(var S=w.length,$=1;$0;)fe=$t[q],fe!=="_listeners"&&(Pt=j(m,T,_[fe],k+1,w),Pt&&(ye?ye.push.apply(ye,Pt):ye=Pt));return ye}else if(F==="**"){for(nt=k+1===w||k+2===w&&Ue==="*",nt&&_._listeners&&(ye=j(m,T,_,w,w)),$t=u(_),q=$t.length;q-- >0;)fe=$t[q],fe!=="_listeners"&&(fe==="*"||fe==="**"?(_[fe]._listeners&&!nt&&(Pt=j(m,T,_[fe],w,w),Pt&&(ye?ye.push.apply(ye,Pt):ye=Pt)),Pt=j(m,T,_[fe],k,w)):fe===Ue?Pt=j(m,T,_[fe],k+2,w):Pt=j(m,T,_[fe],k,w),Pt&&(ye?ye.push.apply(ye,Pt):ye=Pt));return ye}else _[F]&&(ye=j(m,T,_[F],k+1,w));if(Te=_["*"],Te&&j(m,T,Te,k+1,w),we=_["**"],we)if(k0;)fe=$t[q],fe!=="_listeners"&&(fe===Ue?j(m,T,we[fe],k+2,w):fe===F?j(m,T,we[fe],k+1,w):(tt={},tt[fe]=we[fe],j(m,T,{"**":tt},k+1,w)));else we._listeners?j(m,T,we,w,w):we["*"]&&we["*"]._listeners&&j(m,T,we["*"],w,w);return ye}function ee(m,T,_){var k=0,w=0,R,I=this.delimiter,q=I.length,L;if(typeof m=="string")if((R=m.indexOf(I))!==-1){L=new Array(5);do L[k++]=m.slice(w,R),w=R+q;while((R=m.indexOf(I,w))!==-1);L[k++]=m.slice(w)}else L=[m],k=1;else L=m,k=m.length;if(k>1){for(R=0;R+10&&S._listeners.length>this._maxListeners&&(S._listeners.warned=!0,f.call(this,S._listeners.length,$))):S._listeners=T,!0;return!0}function Ae(m,T,_,k){for(var w=u(m),R=w.length,I,q,L,S=m._listeners,$;R-- >0;)q=w[R],I=m[q],q==="_listeners"?L=_:L=_?_.concat(q):[q],$=k||typeof q=="symbol",S&&T.push($?L:L.join(this.delimiter)),typeof I=="object"&&Ae.call(this,I,T,L,$);return T}function Pe(m){for(var T=u(m),_=T.length,k,w,R;_-- >0;)w=T[_],k=m[w],k&&(R=!0,w!=="_listeners"&&!Pe(k)&&delete m[w]);return R}function Q(m,T,_){this.emitter=m,this.event=T,this.listener=_}Q.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function B(m,T,_){if(_===!0)w=!0;else if(_===!1)k=!0;else{if(!_||typeof _!="object")throw TypeError("options should be an object or true");var k=_.async,w=_.promisify,R=_.nextTick,I=_.objectify}if(k||R||w){var q=T,L=T._origin||T;if(R&&!i)throw Error("process.nextTick is not supported");w===n&&(w=T.constructor.name==="AsyncFunction"),T=function(){var S=arguments,$=this,de=this.event;return w?R?Promise.resolve():new Promise(function(ye){l(ye)}).then(function(){return $.event=de,q.apply($,S)}):(R?process.nextTick:l)(function(){$.event=de,q.apply($,S)})},T._async=!0,T._origin=L}return[T,I?new Q(this,m,T):this]}function P(m){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,m)}P.EventEmitter2=P,P.prototype.listenTo=function(m,T,_){if(typeof m!="object")throw TypeError("target musts be an object");var k=this;_=v(_,{on:n,off:n,reducers:n},{on:x,off:x,reducers:Y});function w(R){if(typeof R!="object")throw TypeError("events must be an object");var I=_.reducers,q=V.call(k,m),L;q===-1?L=new b(k,m,_):L=k._observers[q];for(var S=u(R),$=S.length,de,ye=typeof I=="function",fe=0;fe<$;fe++)de=S[fe],L.subscribe(de,R[de]||de,ye?I:I&&I[de])}return e(T)?w(h(T)):w(typeof T=="string"?h(T.split(/\s+/)):T),this},P.prototype.stopListeningTo=function(m,T){var _=this._observers;if(!_)return!1;var k=_.length,w,R=!1;if(m&&typeof m!="object")throw TypeError("target should be an object");for(;k-- >0;)w=_[k],(!m||w._target===m)&&(w.unsubscribe(T),R=!0);return R},P.prototype.delimiter=".",P.prototype.setMaxListeners=function(m){m!==n&&(this._maxListeners=m,this._conf||(this._conf={}),this._conf.maxListeners=m)},P.prototype.getMaxListeners=function(){return this._maxListeners},P.prototype.event="",P.prototype.once=function(m,T,_){return this._once(m,T,!1,_)},P.prototype.prependOnceListener=function(m,T,_){return this._once(m,T,!0,_)},P.prototype._once=function(m,T,_,k){return this._many(m,1,T,_,k)},P.prototype.many=function(m,T,_,k){return this._many(m,T,_,!1,k)},P.prototype.prependMany=function(m,T,_,k){return this._many(m,T,_,!0,k)},P.prototype._many=function(m,T,_,k,w){var R=this;if(typeof _!="function")throw new Error("many only accepts instances of Function");function I(){return--T===0&&R.off(m,I),_.apply(this,arguments)}return I._origin=_,this._on(m,I,k,w)},P.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var m=arguments[0],T,_=this.wildcard,k,w,R,I,q;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(_&&(T=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(w=m.length,s){for(R=0;R3)for(k=new Array(L-1),I=1;I3)for(w=new Array(S-1),q=1;q0&&this._events[m].length>this._maxListeners&&(this._events[m].warned=!0,f.call(this,this._events[m].length,m))):this._events[m]=T,w)},P.prototype.off=function(m,T){if(typeof T!="function")throw new Error("removeListener only takes instances of Function");var _,k=[];if(this.wildcard){var w=typeof m=="string"?m.split(this.delimiter):m.slice();if(k=j.call(this,null,w,this.listenerTree,0),!k)return this}else{if(!this._events[m])return this;_=this._events[m],k.push({_listeners:_})}for(var R=0;R0){for(k=this._all,T=0,_=k.length;T<_;T++)if(m===k[T])return k.splice(T,1),this._removeListener&&this.emit("removeListenerAny",m),this}else{if(k=this._all,this._removeListener)for(T=0,_=k.length;T<_;T++)this.emit("removeListenerAny",k[T]);this._all=[]}return this},P.prototype.removeListener=P.prototype.off,P.prototype.removeAllListeners=function(m){if(m===n)return!this._events||c.call(this),this;if(this.wildcard){var T=j.call(this,null,m,this.listenerTree,0),_,k;if(!T)return this;for(k=0;k0;)k=T[_[R]],typeof k=="function"?w.push(k):w.push.apply(w,k);return w}else{if(this.wildcard){if(I=this.listenerTree,!I)return[];var q=[],L=typeof m=="string"?m.split(this.delimiter):m.slice();return j.call(this,q,L,I,0),q}return T?(k=T[m],k?typeof k=="function"?[k]:k:[]):[]}},P.prototype.eventNames=function(m){var T=this._events;return this.wildcard?Ae.call(this,this.listenerTree,[],null,m):T?u(T):[]},P.prototype.listenerCount=function(m){return this.listeners(m).length},P.prototype.hasListeners=function(m){if(this.wildcard){var T=[],_=typeof m=="string"?m.split(this.delimiter):m.slice();return j.call(this,T,_,this.listenerTree,0),T.length>0}var k=this._events,w=this._all;return!!(w&&w.length||k&&(m===n?u(k).length:k[m]))},P.prototype.listenersAny=function(){return this._all?this._all:[]},P.prototype.waitFor=function(m,T){var _=this,k=typeof T;return k==="number"?T={timeout:T}:k==="function"&&(T={filter:T}),T=v(T,{timeout:0,filter:n,handleError:!1,Promise,overload:!1},{filter:x,Promise:E}),X(T.Promise,function(w,R,I){function q(){var L=T.filter;if(!(L&&!L.apply(_,arguments)))if(_.off(m,q),T.handleError){var S=arguments[0];S?R(S):w(p.apply(null,arguments).slice(1))}else w(p.apply(null,arguments))}I(function(){_.off(m,q)}),_._on(m,q,!1)},{timeout:T.timeout,overload:T.overload})};function te(m,T,_){_=v(_,{Promise,timeout:0,overload:!1},{Promise:E});var k=_.Promise;return X(k,function(w,R,I){var q;if(typeof m.addEventListener=="function"){q=function(){w(p.apply(null,arguments))},I(function(){m.removeEventListener(T,q)}),m.addEventListener(T,q,{once:!0});return}var L=function(){S&&m.removeListener("error",S),w(p.apply(null,arguments))},S;T!=="error"&&(S=function($){m.removeListener(T,L),R($)},m.once("error",S)),I(function(){S&&m.removeListener("error",S),m.removeListener(T,L)}),m.once(T,L)},{timeout:_.timeout,overload:_.overload})}var H=P.prototype;if(Object.defineProperties(P,{defaultMaxListeners:{get:function(){return H._maxListeners},set:function(m){if(typeof m!="number"||m<0||Number.isNaN(m))throw TypeError("n must be a non-negative number");H._maxListeners=m},enumerable:!0},once:{value:te,writable:!0,configurable:!0}}),Object.defineProperties(H,{_maxListeners:{value:r,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return P});else if(typeof fD=="object")pD.exports=P;else{var se=new Function("","return this")();se.EventEmitter2=P}})()});function fy(n,t){let e=fn.getLogger("tasks");switch(n){case"trace":e.trace(t);break;case"debug":e.debug(t);break;case"info":e.info(t);break;case"warn":e.warn(t);break;case"error":e.error(t);break;default:break}}var VU,hD,cy,fn,dy,vs=K(()=>{"use strict";VU=require("obsidian"),hD=$s(mD()),cy=class extends hD.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=e=>e.reduce((r,i)=>r+i,0)/e.length}configure(e){return this.options=Object.assign({},this.options,e),this}getLogger(e){let r="none",i="";for(let s in this.options.minLevels)e.startsWith(s)&&s.length>=i.length&&(r=this.options.minLevels[s],i=s);return new dy(this,e,r)}onLogEntry(e){return this.on("log",e),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(e=>{let r=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${e.level}][${e.module}]`;switch(e.traceId&&(r+=`[${e.traceId}]`),r+=` ${e.message}`,e.objects===void 0&&(e.objects=""),e.level){case"trace":console.trace(r,e.objects);break;case"debug":console.debug(r,e.objects);break;case"info":console.info(r,e.objects);break;case"warn":console.warn(r,e.objects);break;case"error":console.error(r,e.objects);break;default:console.log(`{${e.level}} ${r}`,e.objects)}}),this.consoleLoggerRegistered=!0,this)}},fn=new cy,dy=class{constructor(t,e,r){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=t,this.module=e,this.minLevel=this.levelToInt(r)}levelToInt(t){return t.toLowerCase()in this.levels?this.levels[t.toLowerCase()]:99}log(t,e,r){if(this.levelToInt(t){n.debug(`${t} ==> ${i+1} : ${r.toFileLineString()}`)})}var py=K(()=>{"use strict"});var Yt,Fi=K(()=>{"use strict";yt();At();Yt=class{static fromPath(t){let{useFilenameAsScheduledDate:e,filenameAsDateFolders:r}=J();return!e||!this.matchesAnyFolder(r,t)?null:this.extractDateFromPath(t)}static matchesAnyFolder(t,e){return t.length===0?!0:t.some(r=>e.startsWith(r+"/"))}static extractDateFromPath(t){let e=Math.max(0,t.lastIndexOf("/")+1),r=t.lastIndexOf("."),i=t.substring(e,r),{filenameAsScheduledDateFormat:s}=J();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:t,scheduledDate:e,dueDate:r}){return t===null&&r===null&&e===null}static updateTaskPath(t,e,r){let i=t.scheduledDate,s=t.scheduledDateIsInferred;return r===null?s&&(s=!1,i=null):s?i=r:this.canApplyFallback(t)&&(i=r,s=!0),new ke(pe(U({},t),{taskLocation:e,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(t,e){let r=t.scheduledDateIsInferred?t.scheduledDate:null;return e.map(i=>(r!==null&&!r.isSame(i.scheduledDate,"day")&&(i=new ke(pe(U({},i),{scheduledDateIsInferred:!1}))),i))}}});var zt,Ic,gD=K(()=>{"use strict";ms();zt=class zt{static calculate(t){var r,i,s;let e=0;if((r=t.dueDate)!=null&&r.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(t.dueDate)/zt.milliSecondsPerDay),l;o>=7?l=1:o>=-14?l=(o+14)*.8/21+.2:l=.2,e+=l*zt.dueCoefficient}switch((i=t.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(t.scheduledDate)&&(e+=1*zt.scheduledCoefficient),(s=t.startDate)!=null&&s.isValid()&&window.moment().isBefore(t.startDate)&&(e+=1*zt.startedCoefficient),t.priority){case"0":e+=1.5*zt.priorityCoefficient;break;case"1":e+=1*zt.priorityCoefficient;break;case"2":e+=.65*zt.priorityCoefficient;break;case"3":e+=.325*zt.priorityCoefficient;break;case"5":e-=.3*zt.priorityCoefficient;break}return e}};zt.dueCoefficient=12,zt.scheduledCoefficient=5,zt.startedCoefficient=-3,zt.priorityCoefficient=6,zt.milliSecondsPerDay=1e3*60*60*24;Ic=zt});var yD={};Mb(yD,{Task:()=>ke,isBlocked:()=>zU});function zU(n,t){if(n.dependsOn.length===0||n.isDone)return!1;for(let e of n.dependsOn)if(t.find(i=>i.id===e&&!i.isDone))return!0;return!1}var ke,At=K(()=>{"use strict";yt();dn();br();os();Mc();In();wl();vs();py();Fi();Nc();gD();Xr();kc();ke=class n extends Li{constructor(e){let{status:r,description:i,taskLocation:s,indentation:a,listMarker:o,priority:l,createdDate:u,startDate:c,scheduledDate:d,dueDate:f,doneDate:p,cancelledDate:h,recurrence:b,onCompletion:v,dependsOn:E,id:C,blockLink:x,tags:Y,originalMarkdown:X,scheduledDateIsInferred:V,parent:j}=e;super({originalMarkdown:X,indentation:a,listMarker:o,statusCharacter:r.symbol,description:i,taskLocation:s,parent:j!=null?j:null});this._urgency=null;this.status=r,this.tags=Y,this.priority=l,this._createdDate=this.resolveDate(u,e._createdDate),this._startDate=this.resolveDate(c,e._startDate),this._scheduledDate=this.resolveDate(d,e._scheduledDate),this._dueDate=this.resolveDate(f,e._dueDate),this._doneDate=this.resolveDate(p,e._doneDate),this._cancelledDate=this.resolveDate(h,e._cancelledDate),this.recurrence=b,this.onCompletion=v,this.dependsOn=E,this.id=C,this.blockLink=x,this.scheduledDateIsInferred=V}resolveDate(e,r){return e!==void 0?e:r!=null?r:null}static fromLine({line:e,taskLocation:r,fallbackDate:i}){let s=n.extractTaskComponents(e);return s===null||!Me.getInstance().includedIn(s.body)?null:n.parseTaskSignifiers(e,r,i)}static parseTaskSignifiers(e,r,i){let s=n.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:a}=Dl(),o=a.deserialize(s.body),l=!1;return Yt.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,l=!0),o.tags=o.tags.map(u=>u.trim()),o.tags=o.tags.filter(u=>!Me.getInstance().equals(u)),new n(pe(U(U({},s),o),{taskLocation:r,originalMarkdown:e,scheduledDateIsInferred:l}))}static extractTaskComponents(e){let r=e.match(We.taskRegex);if(r===null)return null;let i=r[1],s=r[2],a=r[3],o=Ze.getInstance().bySymbolOrCreate(a),l=r[4].trim(),u=l.match(We.blockLinkRegex),c=u!==null?u[0]:"";return c!==""&&(l=l.replace(We.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:l,blockLink:c}}toString(){return Dl().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=fn.getLogger("tasks.Task"),r="toggle()";Ac(e,r,this);let i=Ze.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return Pc(e,r,s),s}handleNewStatus(e,r=window.moment()){if(e.identicalTo(this.status))return[this];let{setDoneDate:i}=J(),s=this.newDate(e,"DONE",this.doneDate,i,r),{setCancelledDate:a}=J(),o=this.newDate(e,"CANCELLED",this.cancelledDate,a,r),l=new n(pe(U({},this),{status:e,doneDate:s,cancelledDate:o})),u=!e.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(u||c||d)return[l];let p=this.recurrence.next(r);return p===null?[l]:[this.createNextOccurrence(e,p),l]}newDate(e,r,i,s,a){let o=null;return e.type===r&&(this.status.type!==r?s&&(o=a):o=i),o}createNextOccurrence(e,r){let{setCreatedDate:i}=J(),s=null;i&&(s=window.moment());let a=null,o=null,u=Ze.getInstance().getNextRecurrenceStatusOrCreate(e);return new n(pe(U(U({},this),r),{status:u,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e,r=window.moment()){fn.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let s=this.handleNewStatus(e,r);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(e){let r=HS(this,e),{recurrenceOnNextLine:i}=J();return i?r.reverse():r}get isTask(){return!0}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(e){if(this.dependsOn.length===0||this.isDone)return!1;for(let r of this.dependsOn)if(e.find(s=>s.id===r&&!s.isDone))return!0;return!1}isBlocking(e){return this.id===""||this.isDone?!1:e.some(r=>r.isDone?!1:r.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=hr.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(We.hashTags,"").trim()}get priorityName(){return hr.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=Ic.calculate(this)),this._urgency}get cancelledDate(){var e,r;return(r=(e=this._cancelledDate)==null?void 0:e.clone())!=null?r:null}get cancelled(){return new qt(this.cancelledDate)}get createdDate(){var e,r;return(r=(e=this._createdDate)==null?void 0:e.clone())!=null?r:null}get created(){return new qt(this.createdDate)}get doneDate(){var e,r;return(r=(e=this._doneDate)==null?void 0:e.clone())!=null?r:null}get done(){return new qt(this.doneDate)}get dueDate(){var e,r;return(r=(e=this._dueDate)==null?void 0:e.clone())!=null?r:null}get due(){return new qt(this.dueDate)}get scheduledDate(){var e,r;return(r=(e=this._scheduledDate)==null?void 0:e.clone())!=null?r:null}get scheduled(){return new qt(this.scheduledDate)}get startDate(){var e,r;return(r=(e=this._startDate)==null?void 0:e.clone())!=null?r:null}get start(){return new qt(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let e=this.happensDates,r=Array.from(e).sort(Kn);for(let i of r)if(i!=null&&i.isValid())return new qt(i);return new qt(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}getLinkText({isFilenameUnique:e}){let r;return e?r=this.filename:r="/"+this.path,r===null?null:(this.precedingHeader!==null&&this.precedingHeader!==r&&(r=r+" > "+this.precedingHeader),r)}identicalTo(e){var i,s;if(!super.identicalTo(e))return!1;let r=["priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of r)if(((i=this[a])==null?void 0:i.toString())!==((s=e[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;r=n.allDateFields();for(let a of r){let o=this[a],l=e[a];if(Kn(o,l)!==0)return!1}return this.recurrenceIdenticalTo(e)?this.file.rawFrontmatterIdenticalTo(e.file):!1}recurrenceIdenticalTo(e){let r=this.recurrence,i=e.recurrence;return!(r===null&&i!==null||r!==null&&i===null||r&&i&&!r.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var r,i;return(i=(r=e.match(We.hashTags))==null?void 0:r.map(s=>s.trim()))!=null?i:[]}}});var Li,Nc=K(()=>{"use strict";Xr();Lf();Li=class n{constructor({originalMarkdown:t,indentation:e,listMarker:r,statusCharacter:i,description:s,parent:a,taskLocation:o}){this.children=[];this.indentation=e,this.listMarker=r,this.statusCharacter=i,this.description=s,this.originalMarkdown=t,this.parent=a,a!==null&&a.children.push(this),this.taskLocation=o}static fromListItemLine(t,e,r){var a;let i=RegExp(We.nonTaskRegex).exec(t);if(!i)return null;let s=i[2];return s===void 0?null:new n({originalMarkdown:t,indentation:i[1],listMarker:s,statusCharacter:(a=i[4])!=null?a:null,description:i[5].trim(),taskLocation:r,parent:e})}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}findClosestParentTask(){let t=this.parent;for(;t!==null;){let{Task:e}=(At(),Pb(yD));if(t instanceof e)return t;t=t.parent}return null}get isTask(){return!1}identicalTo(t){var r,i;if(this.constructor.name!==t.constructor.name)return!1;let e=["description","statusCharacter","indentation","listMarker"];for(let s of e)if(((r=this[s])==null?void 0:r.toString())!==((i=t[s])==null?void 0:i.toString()))return!1;return this.taskLocation.identicalTo(t.taskLocation)?n.listsAreIdentical(this.children,t.children):!1}static listsAreIdentical(t,e){return t.length!==e.length?!1:t.every((r,i)=>r.identicalTo(e[i]))}get path(){return this.taskLocation.path}get file(){return this.taskLocation.tasksFile}get rawLinksInFileBody(){var t,e;return(e=(t=this.file.cachedMetadata)==null?void 0:t.links)!=null?e:[]}get outlinks(){return this.rawLinksInFileBody.filter(t=>t.position.start.line===this.lineNumber).map(t=>new Vs(t,this.file.path))}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}checkOrUncheck(){if(this.statusCharacter===null)return this;let t=this.statusCharacter===" "?"x":" ",e=this.originalMarkdown.replace(RegExp(We.checkboxRegex),`[${t}]`);return new n(pe(U({},this),{originalMarkdown:e,statusCharacter:t,parent:null}))}toFileLineString(){let t=this.statusCharacter?`[${this.statusCharacter}] `:"";return`${this.indentation}${this.listMarker} ${t}${this.description}`}}});var n1=M(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});var e1=Symbol("MustacheDataPath");function JE({target:n,propertyName:t}){return[...n[e1]||[],t]}function t1(n,t){return typeof n!="object"?n:new Proxy(n,{get(e,r){let i=e[r];if(i===void 0&&!(r in e)){let s=JE({target:e,propertyName:r});if(t!=null&&t.handleError)return t.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[e1]=JE({target:e,propertyName:r}),t1(i,t)):i}})}Vy.default=t1});var wr=M(_r=>{"use strict";_r.__esModule=!0;_r.Tokens=_r.StructuralCharacters=_r.Operators=void 0;var FY;(function(n){n.AND="AND",n.OR="OR",n.XOR="XOR",n.NOT="NOT"})(FY=_r.Operators||(_r.Operators={}));var LY;(function(n){n.OPEN_PARENTHESIS="(",n.CLOSE_PARENTHESIS=")"})(LY=_r.StructuralCharacters||(_r.StructuralCharacters={}));var UY;(function(n){n.IDENTIFIER="IDENTIFIER",n.OPERATOR="OPERATOR",n.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",n.EOF="EOF",n.COMMENT="COMMENT"})(UY=_r.Tokens||(_r.Tokens={}))});var Jy=M(Ya=>{"use strict";Ya.__esModule=!0;Ya.VALID_TOKENS=Ya.OPERATOR_PRECEDENCE=void 0;var ct=wr();Ya.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};Ya.VALID_TOKENS={identifierOnly:[{name:ct.Tokens.IDENTIFIER},{name:ct.Tokens.STRUCTURAL_CHARACTER,value:ct.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:ct.Tokens.IDENTIFIER},{name:ct.Tokens.STRUCTURAL_CHARACTER,value:ct.StructuralCharacters.OPEN_PARENTHESIS},{name:ct.Tokens.OPERATOR,value:ct.Operators.NOT}],binaryOperator:[{name:ct.Tokens.OPERATOR,value:ct.Operators.AND},{name:ct.Tokens.OPERATOR,value:ct.Operators.OR},{name:ct.Tokens.OPERATOR,value:ct.Operators.XOR}],binaryOperatorOrClose:[{name:ct.Tokens.OPERATOR,value:ct.Operators.AND},{name:ct.Tokens.OPERATOR,value:ct.Operators.OR},{name:ct.Tokens.OPERATOR,value:ct.Operators.XOR},{name:ct.Tokens.STRUCTURAL_CHARACTER,value:ct.StructuralCharacters.CLOSE_PARENTHESIS}]}});var eb=M(rn=>{"use strict";rn.__esModule=!0;rn.ESCAPE_CHARACTER=rn.EOL=rn.COMMENT_DELIMITER=rn.QUOTED_IDENTIFIER_DELIMITER=rn.SEPARATORS=rn.OPERATORS=rn.STRUCTURAL_CHARACTERS=void 0;var Wa=wr();rn.STRUCTURAL_CHARACTERS={"(":Wa.StructuralCharacters.OPEN_PARENTHESIS,")":Wa.StructuralCharacters.CLOSE_PARENTHESIS};rn.OPERATORS={AND:Wa.Operators.AND,OR:Wa.Operators.OR,XOR:Wa.Operators.XOR,NOT:Wa.Operators.NOT};rn.SEPARATORS=new Set([32,9,10,13].map(function(n){return String.fromCodePoint(n)}));rn.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);rn.COMMENT_DELIMITER=String.fromCodePoint(35);rn.EOL=String.fromCodePoint(10);rn.ESCAPE_CHARACTER=String.fromCodePoint(92)});var d1=M(sr=>{"use strict";var tb=sr&&sr.__assign||function(){return tb=Object.assign||function(n){for(var t,e=1,r=arguments.length;e{"use strict";gd.__esModule=!0;gd.lex=void 0;var $a=wr(),Yn=eb(),ja=d1(),$Y=function(n){for(var t=null,e=null,r=null,i=0;i{"use strict";var p1=Wn&&Wn.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r{"use strict";var Hr=Ba&&Ba.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r{"use strict";sn.__esModule=!0;sn.throwInvalidExpression=sn.isOperator=sn.isIdentifier=sn.notUtil=sn.xorUtil=sn.orUtil=sn.andUtil=void 0;var y1=wr(),QY=function(n,t){return n&&t};sn.andUtil=QY;var KY=function(n,t){return n||t};sn.orUtil=KY;var XY=function(n,t){return n!==t};sn.xorUtil=XY;var ZY=function(n){return!n};sn.notUtil=ZY;var JY=function(n){var t=n.name,e=n.value;return t===y1.Tokens.IDENTIFIER&&typeof e=="string"};sn.isIdentifier=JY;var eW=function(n){var t=n.name,e=n.value;return t===y1.Tokens.OPERATOR&&typeof e=="string"};sn.isOperator=eW;var tW=function(n){throw new TypeError("Invalid postfix expression: ".concat(n))};sn.throwInvalidExpression=tW});var b1=M(Td=>{"use strict";var $l;Td.__esModule=!0;Td.OPERATOR_MAP=void 0;var sb=wr(),ab=ib();Td.OPERATOR_MAP=($l={},$l[sb.Operators.AND]=ab.andUtil,$l[sb.Operators.OR]=ab.orUtil,$l[sb.Operators.XOR]=ab.xorUtil,$l)});var v1=M(ar=>{"use strict";var Ga=ar&&ar.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r{"use strict";var ob=Br&&Br.__createBinding||(Object.create?(function(n,t,e,r){r===void 0&&(r=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,r,i)}):(function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}));Br.__esModule=!0;Br.parse=Br.evaluate=Br.getEvaluator=void 0;var k1=v1();ob(Br,k1,"getEvaluator");ob(Br,k1,"evaluate");var oW=rb();ob(Br,oW,"parse")});var CW={};Mb(CW,{default:()=>bf});module.exports=Pb(CW);var Tf=require("obsidian");Di();var bD=require("obsidian"),Ta=require("obsidian");var h$=new Error("timeout while waiting for mutex to become available"),g$=new Error("mutex already locked"),_O=new Error("request for lock canceled"),wO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},Nf=class{constructor(t,e=_O){this._value=t,this._cancelError=e,this._queue=[],this._weightedWaiters=[]}acquire(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,i)=>{let s={resolve:r,reject:i,weight:t,priority:e},a=fT(this._queue,o=>e<=o.priority);a===-1&&t<=this._value?this._dispatchItem(s):this._queue.splice(a+1,0,s)})}runExclusive(t){return wO(this,arguments,void 0,function*(e,r=1,i=0){let[s,a]=yield this.acquire(r,i);try{return yield e(s)}finally{a()}})}waitForUnlock(t=1,e=0){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return this._couldLockImmediately(t,e)?Promise.resolve():new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),SO(this._weightedWaiters[t-1],{resolve:r,priority:e})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatchQueue()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatchQueue()}cancel(){this._queue.forEach(t=>t.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(t){let e=this._value;this._value-=t.weight,t.resolve([e,this._newReleaser(t.weight)])}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let t=this._value;t>0;t--){let e=this._weightedWaiters[t-1];e&&(e.forEach(r=>r.resolve()),this._weightedWaiters[t-1]=[])}else{let t=this._queue[0].priority;for(let e=this._value;e>0;e--){let r=this._weightedWaiters[e-1];if(!r)continue;let i=r.findIndex(s=>s.priority<=t);(i===-1?r:r.splice(0,i)).forEach((s=>s.resolve()))}}}_couldLockImmediately(t,e){return(this._queue.length===0||this._queue[0].priorityt.priority<=r.priority);n.splice(e+1,0,t)}function fT(n,t){for(let e=n.length-1;e>=0;e--)if(t(n[e]))return e;return-1}var DO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},du=class{constructor(t){this._semaphore=new Nf(1,t)}acquire(){return DO(this,arguments,void 0,function*(t=0){let[,e]=yield this._semaphore.acquire(1,t);return e})}runExclusive(t,e=0){return this._semaphore.runExclusive(()=>t(),1,e)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(t=0){return this._semaphore.waitForUnlock(1,t)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var fu=require("obsidian");Lf();var ft=class{constructor(t,e={}){this._frontmatter={tags:[]};this._tags=[];this._outlinksInProperties=[];this._outlinksInBody=[];var i,s;this._path=t,this._cachedMetadata=e;let r=e.frontmatter;if(r!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(r)),this._frontmatter.tags=(i=(0,fu.parseFrontMatterTags)(r))!=null?i:[]),this._outlinksInProperties=this.createLinks(this.cachedMetadata.frontmatterLinks),this._outlinksInBody=this.createLinks(this.cachedMetadata.links),Object.keys(e).length!==0){let a=(s=(0,fu.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}createLinks(t){var e;return(e=t==null?void 0:t.map(r=>new Vs(r,this.path)))!=null?e:[]}get path(){return this._path}get tags(){return this._tags}get outlinks(){return[...this.outlinksInProperties,...this.outlinksInBody]}get outlinksInProperties(){return this._outlinksInProperties}get outlinksInBody(){return this._outlinksInBody}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(t){let e=this.cachedMetadata.frontmatter,r=t.cachedMetadata.frontmatter;return e===r?!0:!e||!r?!1:JSON.stringify(e)===JSON.stringify(r)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(t){return t.replace(/\.md$/,"")}get root(){let t=this.path.replace(/\\/g,"/");t.charAt(0)==="/"&&(t=t.substring(1));let e=t.indexOf("/");return e==-1?"/":t.substring(0,e+1)}get folder(){let t=this.path,e=this.filename,r=t.substring(0,t.lastIndexOf(e));return r===""?"/":r}get filename(){let t=this.path.match(/([^/]+)$/);return t!==null?t[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return!1;let r=this.frontmatter[e];return!(r===null||r===void 0)}property(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return null;let r=this.frontmatter[e];return r===void 0?null:Array.isArray(r)?r.filter(i=>i!==null):r}findKeyInFrontmatter(t){let e=t.toLowerCase();return Object.keys(this.frontmatter).find(r=>r.toLowerCase()===e)}identicalTo(t){return this.path!==t.path?!1:this.rawFrontmatterIdenticalTo(t)}};Nc();At();Fi();yt();var ba=class{constructor(t){this.fetch=t;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};vs();yt();var ks=class{constructor(t){this.label=t,this.start()}start(){this.recordTimings()&&performance.mark(this.labelForStart())}finish(){this.recordTimings()&&(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let t=performance.getEntriesByName(this.label),e=t[t.length-1];e?console.log(this.label+":",e.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:t}=J();return t.recordTimings}};dn();At();Fi();Nc();var Qt=class n{constructor(t,e,r,i,s){this._tasksFile=t,this._lineNumber=e,this._sectionStart=r,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(t){return new n(t,0,0,0,null)}fromRenamedFile(t){return new n(t,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}allFieldsExceptTasksFileForTesting(){let r=U({},this),{_tasksFile:t}=r;return Ws(r,["_tasksFile"])}identicalTo(t){let e=["lineNumber","sectionStart","sectionIndex","precedingHeader"];for(let r of e)if(this[r]!==t[r])return!1;return this._tasksFile.identicalTo(t._tasksFile)}};var Fc=class{constructor(t,e,r,i,s,a){this.line2ListItem=new Map;this.tasks=[];this.filePath=t,this.fileContent=e,this.listItems=r,this.logger=i,this.fileCache=s,this.errorReporter=a,this.fileLines=this.fileContent.split(` +`),this.dateFromFileName=new ba(()=>Yt.fromPath(this.filePath))}parseFileContent(){if(this.listItems===void 0)return this.tasks;let t=new ft(this.filePath,this.fileCache),e=this.fileLines.length,r=null,i=0;for(let s of this.listItems){let a=s.position.start.line;if(a>=e)return this.logger.debug(`${this.filePath} Obsidian gave us a line number ${a} past the end of the file. ${e}.`),this.tasks;if((r===null||r.position.end.linethis.notifySubscribersNotDebounced(),100,!0);this.logger.debug("Creating Cache object"),this.metadataCache=t,this.metadataCacheEventReferences=[],this.vault=e,this.workspace=r,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new du,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.notifySubscribersDebounced()}notifySubscribersNotDebounced(){this.logger.debug("Cache.notifySubscribersNotDebounced()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>A(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",r=>{this.tasksMutex.runExclusive(()=>{this.indexFile(r)})});this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=J(),e=this.vault.on("create",s=>{s instanceof Ta.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(e);let r=this.vault.on("delete",s=>{s instanceof Ta.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(r);let i=this.vault.on("rename",(s,a)=>{s instanceof Ta.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),l=new ft(s.path,o!=null?o:void 0),u=new ba(()=>Yt.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(l);return t?Yt.updateTaskPath(c,d,u.value):new ke(pe(U({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(r=>{r({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t);let e=this.events.onReloadVault(()=>A(this,null,function*(){return yield this.loadVault()}));this.eventsEventReferences.push(e)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>A(this,null,function*(){let t=new ks(`Loading vault with global filter '${Me.getInstance().get()}'`);t.start(),this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(e=>this.indexFile(e))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),t.finish(),this.notifySubscribers()}))}indexFile(t){return A(this,null,function*(){let e=this.metadataCache.getFileCache(t);if(e==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let r=this.tasks.filter(a=>a.path===t.path),i=e.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(t);s=this.getTasksFromFileContent(a,i,e,t.path,this.reportTaskParsingErrorToUser,this.logger)}Li.listsAreIdentical(r,s)||(this.tasks=this.tasks.filter(a=>a.path!==t.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+t.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(t,e,r,i,s,a){return new Fc(i,t,e,a,r,s).parseFileContent()}reportTaskParsingErrorToUser(t,e,r,i){let s=`There was an error reading one of the tasks in this vault. +The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...' +Error: ${t} +File: ${e} +Line number: ${r.position.start.line} +Task line: ${i} + +Please create a bug report for this message at +https://github.com/obsidian-tasks-group/obsidian-tasks/issues/new/choose +to help us find and fix the underlying issue. + +Include: +- either a screenshot of the error popup, or copy the text from the console, if on a desktop machine. +- the output from running the Obsidian command 'Show debug info' + +The error popup will only be shown when Tasks is starting up, but if the error persists, +it will be shown in the console every time this file is edited during the Obsidian +session. +`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new Ta.Notice(s,1e4)}static getSection(t,e){if(e===void 0)return null;for(let r of e)if(r.position.start.line<=t&&r.position.end.line>=t)return r;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let r=null;for(let i of e){if(i.position.start.line>t)return r;r=i.heading}return r}};br();var Wy=require("obsidian");var BE=require("obsidian"),GE=require("obsidian");function Ye(){}function by(n){return n()}function TD(){return Object.create(null)}function St(n){n.forEach(by)}function Ui(n){return typeof n=="function"}function Xt(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}function vD(n){return Object.keys(n).length===0}function kD(n,...t){if(n==null)return Ye;let e=n.subscribe(...t);return e.unsubscribe?()=>e.unsubscribe():e}function qc(n,t,e){n.$$.on_destroy.push(kD(t,e))}var _D=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,hy=class n{constructor(t){this.options=t,this._listeners="WeakMap"in _D?new WeakMap:void 0}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return(t=this._observer)!==null&&t!==void 0?t:this._observer=new ResizeObserver(e=>{var r;for(let i of e)n.entries.set(i.target,i),(r=this._listeners.get(i.target))===null||r===void 0||r(i)})}};hy.entries="WeakMap"in _D?new WeakMap:void 0;var wD=!1;function QU(){wD=!0}function KU(){wD=!1}function G(n,t){n.appendChild(t)}function ce(n,t,e){n.insertBefore(t,e||null)}function le(n){n.parentNode&&n.parentNode.removeChild(n)}function yi(n,t){for(let e=0;en.removeEventListener(t,e,r)}function SD(n){return function(t){return t.preventDefault(),n.call(this,t)}}function W(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function DD(n){let t;return{p(...e){t=e,t.forEach(r=>n.push(r))},r(){t.forEach(e=>n.splice(n.indexOf(e),1))}}}function ZU(n){return Array.from(n.childNodes)}function bn(n,t){t=""+t,n.data!==t&&(n.data=t)}function Tn(n,t){n.value=t==null?"":t}function Ty(n,t,e){for(let r=0;r{a.source===r.contentWindow&&t()})):(r.src="about:blank",r.onload=()=>{s=Ne(r.contentWindow,"resize",t),t()}),G(n,r),()=>{(i||s&&r.contentWindow)&&s(),le(r)}}function bi(n,t,e){n.classList[e?"add":"remove"](t)}var wa=class{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,r=null){this.e||(this.is_svg?this.e=XU(e.nodeName):this.e=re(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(r)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;en.indexOf(r)===-1?t.push(r):e.push(r)),e.forEach(r=>r()),_a=t}var Uc=new Set,ws;function Fn(){ws={r:0,c:[],p:ws}}function Ln(){ws.r||St(ws.c),ws=ws.p}function ge(n,t){n&&n.i&&(Uc.delete(n),n.i(t))}function Le(n,t,e,r){if(n&&n.o){if(Uc.has(n))return;Uc.add(n),ws.c.push(()=>{Uc.delete(n),r&&(e&&n.d(1),r())}),n.o(t)}else r&&r()}var sq=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ez=new Set([...sq]);function Jt(n,t,e){let r=n.$$.props[t];r!==void 0&&(n.$$.bound[r]=e,e(n.$$.ctx[r]))}function er(n){n&&n.c()}function Un(n,t,e,r){let{fragment:i,after_update:s}=n.$$;i&&i.m(t,e),r||Ss(()=>{let a=n.$$.on_mount.map(by).filter(Ui);n.$$.on_destroy?n.$$.on_destroy.push(...a):St(a),n.$$.on_mount=[]}),s.forEach(Ss)}function vn(n,t){let e=n.$$;e.fragment!==null&&(iq(e.after_update),St(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function aq(n,t){n.$$.dirty[0]===-1&&(ka.push(n),nq(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<{let h=p.length?p[0]:f;return u.ctx&&i(u.ctx[d],u.ctx[d]=h)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](h),c&&aq(n,d)),f}):[],u.update(),c=!0,St(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){QU();let d=ZU(t.target);u.fragment&&u.fragment.l(d),d.forEach(le)}else u.fragment&&u.fragment.c();t.intro&&ge(n.$$.fragment),Un(n,t.target,t.anchor,t.customElement),KU(),OD()}El(l)}var oq;typeof HTMLElement=="function"&&(oq=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(by).filter(Ui);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(n,t,e){this[n]=e}disconnectedCallback(){St(this.$$.on_disconnect)}$destroy(){vn(this,1),this.$destroy=Ye}$on(n,t){if(!Ui(t))return Ye;let e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{let r=e.indexOf(t);r!==-1&&e.splice(r,1)}}$set(n){this.$$set&&!vD(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});var Kt=class{$destroy(){vn(this,1),this.$destroy=Ye}$on(t,e){if(!Ui(e))return Ye;let r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{let i=r.indexOf(e);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!vD(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};Nr();Rc();yt();var Sa=[];function RD(n,t=Ye){let e,r=new Set;function i(o){if(Xt(n,o)&&(n=o,e)){let l=!Sa.length;for(let u of r)u[1](),Sa.push(u,n);if(l){for(let u=0;u{r.delete(u),r.size===0&&e&&(e(),e=null)}}return{set:i,update:s,subscribe:a}}yt();var Ds=RD(J());Ds.subscribe(n=>{it(n)});Ig();os();function Da(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Wt(n,t){if(t===null)return Da(n);let e=n.toLowerCase().indexOf(t.toLowerCase());if(e===-1)return`${Da(n)} (${t.toLowerCase()})`;let r=n.substring(0,e);return r+='',e===0?r+=n.substring(e,e+1).toUpperCase():r+=n.substring(e,e+1),r+="",r+=n.substring(e+1),r=Da(r),r}function lq(n){let t,e,r,i;return{c(){t=re("code"),e=$e(n[4]),r=he(),i=new wa(!1),i.a=null,W(t,"class","tasks-modal-parsed-date")},m(s,a){ce(s,t,a),G(t,e),G(t,r),i.m(n[2],t)},p(s,a){a&16&&bn(e,s[4]),a&4&&i.p(s[2])},d(s){s&&le(t)}}}function uq(n){let t,e,r,i,s;return{c(){t=re("div"),e=$e(n[4]),r=re("input"),W(r,"class","tasks-modal-date-editor-picker"),W(r,"type","date"),W(r,"id","date-editor-picker"),W(r,"tabindex","-1"),W(t,"class","tasks-modal-parsed-date")},m(a,o){ce(a,t,o),G(t,e),G(t,r),Tn(r,n[6]),i||(s=[Ne(r,"input",n[10]),Ne(r,"input",n[7])],i=!0)},p(a,o){o&16&&bn(e,a[4]),o&64&&Tn(r,a[6])},d(a){a&&le(t),i=!1,St(s)}}}function cq(n){let t,e=Wt(n[3],n[5])+"",r,i,s,a,o,l;function u(f,p){return f[1]?uq:lq}let c=u(n,-1),d=c(n);return{c(){t=re("label"),r=he(),i=re("input"),s=he(),d.c(),a=qr(),W(t,"for",n[3]),W(i,"id",n[3]),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder",dq),W(i,"accesskey",n[5]),bi(i,"tasks-modal-error",!n[1])},m(f,p){ce(f,t,p),t.innerHTML=e,ce(f,r,p),ce(f,i,p),Tn(i,n[0]),ce(f,s,p),d.m(f,p),ce(f,a,p),o||(l=Ne(i,"input",n[9]),o=!0)},p(f,[p]){p&40&&e!==(e=Wt(f[3],f[5])+"")&&(t.innerHTML=e),p&8&&W(t,"for",f[3]),p&8&&W(i,"id",f[3]),p&32&&W(i,"accesskey",f[5]),p&1&&i.value!==f[0]&&Tn(i,f[0]),p&2&&bi(i,"tasks-modal-error",!f[1]),c===(c=u(f,p))&&d?d.p(f,p):(d.d(1),d=c(f),d&&(d.c(),d.m(a.parentNode,a)))},i:Ye,o:Ye,d(f){f&&le(t),f&&le(r),f&&le(i),f&&le(s),d.d(f),f&&le(a),o=!1,l()}}}var dq="Try 'Mon' or 'tm' then space";function fq(n,t,e){let{id:r}=t,{dateSymbol:i}=t,{date:s}=t,{isDateValid:a}=t,{forwardOnly:o}=t,{accesskey:l}=t,{parsedDate:u=""}=t,c="";function d(h){h.target!==null&&e(0,s=c)}function f(){s=this.value,e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}function p(){c=this.value,e(6,c),e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}return n.$$set=h=>{"id"in h&&e(3,r=h.id),"dateSymbol"in h&&e(4,i=h.dateSymbol),"date"in h&&e(0,s=h.date),"isDateValid"in h&&e(1,a=h.isDateValid),"forwardOnly"in h&&e(8,o=h.forwardOnly),"accesskey"in h&&e(5,l=h.accesskey),"parsedDate"in h&&e(2,u=h.parsedDate)},n.$$.update=()=>{n.$$.dirty&271&&(e(0,s=ac(s)),e(2,u=jw(r,s,o)),e(1,a=!u.includes("invalid")),a&&e(6,c=u))},[s,a,u,r,i,l,c,d,o,f,p]}var ky=class extends Kt{constructor(t){super(),kn(this,t,fq,cq,Xt,{id:3,dateSymbol:4,date:0,isDateValid:1,forwardOnly:8,accesskey:5,parsedDate:2})}},Es=ky;var xs=Math.min,_n=Math.max,Rl=Math.round;var Tr=n=>({x:n,y:n}),pq={left:"right",right:"left",bottom:"top",top:"bottom"};function _y(n,t,e){return _n(n,xs(t,e))}function Ea(n,t){return typeof n=="function"?n(t):n}function Ti(n){return n.split("-")[0]}function xa(n){return n.split("-")[1]}function wy(n){return n==="x"?"y":"x"}function Sy(n){return n==="y"?"height":"width"}function Yr(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Dy(n){return wy(Yr(n))}function AD(n,t,e){e===void 0&&(e=!1);let r=xa(n),i=Dy(n),s=Sy(i),a=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Ol(a)),[a,Ol(a)]}function PD(n){let t=Ol(n);return[Yc(n),t,Yc(t)]}function Yc(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var CD=["left","right"],MD=["right","left"],mq=["top","bottom"],hq=["bottom","top"];function gq(n,t,e){switch(n){case"top":case"bottom":return e?t?MD:CD:t?CD:MD;case"left":case"right":return t?mq:hq;default:return[]}}function ID(n,t,e,r){let i=xa(n),s=gq(Ti(n),e==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(Yc)))),s}function Ol(n){let t=Ti(n);return pq[t]+n.slice(t.length)}function yq(n){return U({top:0,right:0,bottom:0,left:0},n)}function ND(n){return typeof n!="number"?yq(n):{top:n,right:n,bottom:n,left:n}}function Os(n){let{x:t,y:e,width:r,height:i}=n;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function FD(n,t,e){let{reference:r,floating:i}=n,s=Yr(t),a=Dy(t),o=Sy(a),l=Ti(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2,p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(xa(t)){case"start":p[a]-=f*(e&&u?-1:1);break;case"end":p[a]+=f*(e&&u?-1:1);break}return p}function LD(n,t){return A(this,null,function*(){var e;t===void 0&&(t={});let{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ea(t,n),h=ND(p),v=o[f?d==="floating"?"reference":"floating":d],E=Os(yield s.getClippingRect({element:(e=yield s.isElement==null?void 0:s.isElement(v))==null||e?v:v.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),C=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),Y=(yield s.isElement==null?void 0:s.isElement(x))?(yield s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},X=Os(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:C,offsetParent:x,strategy:l}):C);return{top:(E.top-X.top+h.top)/Y.y,bottom:(X.bottom-E.bottom+h.bottom)/Y.y,left:(E.left-X.left+h.left)/Y.x,right:(X.right-E.right+h.right)/Y.x}})}var bq=50,UD=(n,t,e)=>A(null,null,function*(){let{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=e,o=a.detectOverflow?a:pe(U({},a),{detectOverflow:LD}),l=yield a.isRTL==null?void 0:a.isRTL(t),u=yield a.getElementRects({reference:n,floating:t,strategy:i}),{x:c,y:d}=FD(u,r,l),f=r,p=0,h={};for(let b=0;bse<=0)){var B,P;let se=(((B=a.flip)==null?void 0:B.index)||0)+1,m=ee[se];if(m&&(!(f==="alignment"?x!==Yr(m):!1)||Q.every(k=>Yr(k.placement)===x?k.overflows[0]>0:!0)))return{data:{index:se,overflows:Q},reset:{placement:m}};let T=(P=Q.filter(_=>_.overflows[0]<=0).sort((_,k)=>_.overflows[1]-k.overflows[1])[0])==null?void 0:P.placement;if(!T)switch(h){case"bestFit":{var te;let _=(te=Q.filter(k=>{if(j){let w=Yr(k.placement);return w===x||w==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(w=>w>0).reduce((w,R)=>w+R,0)]).sort((k,w)=>k[1]-w[1])[0])==null?void 0:te[0];_&&(T=_);break}case"initialPlacement":T=l;break}if(s!==T)return{reset:{placement:T}}}return{}})}}};var Tq=new Set(["left","top"]);function vq(n,t){return A(this,null,function*(){let{placement:e,platform:r,elements:i}=n,s=yield r.isRTL==null?void 0:r.isRTL(i.floating),a=Ti(e),o=xa(e),l=Yr(e)==="y",u=Tq.has(a)?-1:1,c=s&&l?-1:1,d=Ea(t,n),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof h=="number"&&(p=o==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}})}var YD=function(n){return n===void 0&&(n=0),{name:"offset",options:n,fn(e){return A(this,null,function*(){var r,i;let{x:s,y:a,placement:o,middlewareData:l}=e,u=yield vq(e,n);return o===((r=l.offset)==null?void 0:r.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:s+u.x,y:a+u.y,data:pe(U({},u),{placement:o})}})}}},WD=function(n){return n===void 0&&(n={}),{name:"shift",options:n,fn(e){return A(this,null,function*(){let{x:r,y:i,placement:s,platform:a}=e,C=Ea(n,e),{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:x=>{let{x:Y,y:X}=x;return{x:Y,y:X}}}}=C,c=Ws(C,["mainAxis","crossAxis","limiter"]),d={x:r,y:i},f=yield a.detectOverflow(e,c),p=Yr(Ti(s)),h=wy(p),b=d[h],v=d[p];if(o){let x=h==="y"?"top":"left",Y=h==="y"?"bottom":"right",X=b+f[x],V=b-f[Y];b=_y(X,b,V)}if(l){let x=p==="y"?"top":"left",Y=p==="y"?"bottom":"right",X=v+f[x],V=v-f[Y];v=_y(X,v,V)}let E=u.fn(pe(U({},e),{[h]:b,[p]:v}));return pe(U({},E),{data:{x:E.x-r,y:E.y-i,enabled:{[h]:o,[p]:l}}})})}}};var $D=function(n){return n===void 0&&(n={}),{name:"size",options:n,fn(e){return A(this,null,function*(){var r,i;let{placement:s,rects:a,platform:o,elements:l}=e,Q=Ea(n,e),{apply:u=()=>{}}=Q,c=Ws(Q,["apply"]),d=yield o.detectOverflow(e,c),f=Ti(s),p=xa(s),h=Yr(s)==="y",{width:b,height:v}=a.floating,E,C;f==="top"||f==="bottom"?(E=f,C=p===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(C=f,E=p==="end"?"top":"bottom");let x=v-d.top-d.bottom,Y=b-d.left-d.right,X=xs(v-d[E],x),V=xs(b-d[C],Y),j=!e.middlewareData.shift,ee=X,Ae=V;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(Ae=Y),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(ee=x),j&&!p){let B=_n(d.left,0),P=_n(d.right,0),te=_n(d.top,0),H=_n(d.bottom,0);h?Ae=b-2*(B!==0||P!==0?B+P:_n(d.left,d.right)):ee=v-2*(te!==0||H!==0?te+H:_n(d.top,d.bottom))}yield u(pe(U({},e),{availableWidth:Ae,availableHeight:ee}));let Pe=yield o.getDimensions(l.floating);return b!==Pe.width||v!==Pe.height?{reset:{rects:!0}}:{}})}}};function $c(){return typeof window!="undefined"}function Cs(n){return HD(n)?(n.nodeName||"").toLowerCase():"#document"}function wn(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(n){var t;return(t=(HD(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function HD(n){return $c()?n instanceof Node||n instanceof wn(n).Node:!1}function tr(n){return $c()?n instanceof Element||n instanceof wn(n).Element:!1}function $r(n){return $c()?n instanceof HTMLElement||n instanceof wn(n).HTMLElement:!1}function jD(n){return!$c()||typeof ShadowRoot=="undefined"?!1:n instanceof ShadowRoot||n instanceof wn(n).ShadowRoot}function Oa(n){let{overflow:t,overflowX:e,overflowY:r,display:i}=nr(n);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&i!=="inline"&&i!=="contents"}function BD(n){return/^(table|td|th)$/.test(Cs(n))}function Cl(n){try{if(n.matches(":popover-open"))return!0}catch(t){}try{return n.matches(":modal")}catch(t){return!1}}var kq=/transform|translate|scale|rotate|perspective|filter/,_q=/paint|layout|strict|content/,Rs=n=>!!n&&n!=="none",Ey;function jc(n){let t=tr(n)?nr(n):n;return Rs(t.transform)||Rs(t.translate)||Rs(t.scale)||Rs(t.rotate)||Rs(t.perspective)||!Hc()&&(Rs(t.backdropFilter)||Rs(t.filter))||kq.test(t.willChange||"")||_q.test(t.contain||"")}function GD(n){let t=vi(n);for(;$r(t)&&!Ms(t);){if(jc(t))return t;if(Cl(t))return null;t=vi(t)}return null}function Hc(){return Ey==null&&(Ey=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ey}function Ms(n){return/^(html|body|#document)$/.test(Cs(n))}function nr(n){return wn(n).getComputedStyle(n)}function Ml(n){return tr(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function vi(n){if(Cs(n)==="html")return n;let t=n.assignedSlot||n.parentNode||jD(n)&&n.host||Wr(n);return jD(t)?t.host:t}function VD(n){let t=vi(n);return Ms(t)?n.ownerDocument?n.ownerDocument.body:n.body:$r(t)&&Oa(t)?t:VD(t)}function Wc(n,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=VD(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),a=wn(i);if(s){let o=Bc(a);return t.concat(a,a.visualViewport||[],Oa(i)?i:[],o&&e?Wc(o):[])}else return t.concat(i,Wc(i,[],e))}function Bc(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function XD(n){let t=nr(n),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=$r(n),s=i?n.offsetWidth:e,a=i?n.offsetHeight:r,o=Rl(e)!==s||Rl(r)!==a;return o&&(e=s,r=a),{width:e,height:r,$:o}}function ZD(n){return tr(n)?n:n.contextElement}function Ra(n){let t=ZD(n);if(!$r(t))return Tr(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:s}=XD(t),a=(s?Rl(e.width):e.width)/r,o=(s?Rl(e.height):e.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var wq=Tr(0);function JD(n){let t=wn(n);return!Hc()||!t.visualViewport?wq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sq(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==wn(n)?!1:t}function Al(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=n.getBoundingClientRect(),s=ZD(n),a=Tr(1);t&&(r?tr(r)&&(a=Ra(r)):a=Ra(n));let o=Sq(s,e,r)?JD(s):Tr(0),l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let f=wn(s),p=r&&tr(r)?wn(r):r,h=f,b=Bc(h);for(;b&&r&&p!==h;){let v=Ra(b),E=b.getBoundingClientRect(),C=nr(b),x=E.left+(b.clientLeft+parseFloat(C.paddingLeft))*v.x,Y=E.top+(b.clientTop+parseFloat(C.paddingTop))*v.y;l*=v.x,u*=v.y,c*=v.x,d*=v.y,l+=x,u+=Y,h=wn(b),b=Bc(h)}}return Os({width:c,height:d,x:l,y:u})}function Gc(n,t){let e=Ml(n).scrollLeft;return t?t.left+e:Al(Wr(n)).left+e}function eE(n,t){let e=n.getBoundingClientRect(),r=e.left+t.scrollLeft-Gc(n,e),i=e.top+t.scrollTop;return{x:r,y:i}}function Dq(n){let{elements:t,rect:e,offsetParent:r,strategy:i}=n,s=i==="fixed",a=Wr(r),o=t?Cl(t.floating):!1;if(r===a||o&&s)return e;let l={scrollLeft:0,scrollTop:0},u=Tr(1),c=Tr(0),d=$r(r);if((d||!d&&!s)&&((Cs(r)!=="body"||Oa(a))&&(l=Ml(r)),d)){let p=Al(r);u=Ra(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=a&&!d&&!s?eE(a,l):Tr(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:e.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Eq(n){return Array.from(n.getClientRects())}function xq(n){let t=Wr(n),e=Ml(n),r=n.ownerDocument.body,i=_n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=_n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-e.scrollLeft+Gc(n),o=-e.scrollTop;return nr(r).direction==="rtl"&&(a+=_n(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}var zD=25;function Oq(n,t){let e=wn(n),r=Wr(n),i=e.visualViewport,s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;let c=Hc();(!c||c&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}let u=Gc(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-d.clientWidth-p);h<=zD&&(s-=h)}else u<=zD&&(s+=u);return{width:s,height:a,x:o,y:l}}function Rq(n,t){let e=Al(n,!0,t==="fixed"),r=e.top+n.clientTop,i=e.left+n.clientLeft,s=$r(n)?Ra(n):Tr(1),a=n.clientWidth*s.x,o=n.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function QD(n,t,e){let r;if(t==="viewport")r=Oq(n,e);else if(t==="document")r=xq(Wr(n));else if(tr(t))r=Rq(t,e);else{let i=JD(n);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Os(r)}function tE(n,t){let e=vi(n);return e===t||!tr(e)||Ms(e)?!1:nr(e).position==="fixed"||tE(e,t)}function Cq(n,t){let e=t.get(n);if(e)return e;let r=Wc(n,[],!1).filter(o=>tr(o)&&Cs(o)!=="body"),i=null,s=nr(n).position==="fixed",a=s?vi(n):n;for(;tr(a)&&!Ms(a);){let o=nr(a),l=jc(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Oa(a)&&!l&&tE(n,a))?r=r.filter(c=>c!==a):i=o,a=vi(a)}return t.set(n,r),r}function Mq(n){let{element:t,boundary:e,rootBoundary:r,strategy:i}=n,a=[...e==="clippingAncestors"?Cl(t)?[]:Cq(t,this._c):[].concat(e),r],o=QD(t,a[0],i),l=o.top,u=o.right,c=o.bottom,d=o.left;for(let f=1;f{let r=new Map,i=U({platform:Fq},e),s=pe(U({},i.platform),{_c:r});return UD(n,t,pe(U({},i),{platform:s}))};Jg();function sE(n,t,e){let r=n.slice();return r[6]=t[e],r}function aE(n,t,e){let r=n.slice();r[41]=t[e],r[44]=e;let i=r[18](r[41].taskLocation.path);return r[42]=i,r}function oE(n){let t,e,r,i=n[11],s=[];for(let a=0;a',d=he(),W(e,"class","task-dependency-name"),W(c,"type","button"),W(c,"class","task-dependency-delete"),W(t,"class","task-dependency")},m(v,E){ce(v,t,E),G(t,e),G(e,r),G(e,s),G(e,a),G(e,l),G(t,u),G(t,c),G(t,d),f||(p=[Ne(c,"click",h),Ne(t,"mouseenter",b)],f=!0)},p(v,E){n=v,E[0]&5&&i!==(i=n[6].status.symbol+"")&&bn(s,i),E[0]&5&&o!==(o=ys(n[6])+"")&&bn(l,o)},d(v){v&&le(t),f=!1,St(p)}}}function Lq(n){let t,e=Wt(n[3],n[4])+"",r,i,s,a,o,l,u,c,d,f=n[11]&&n[11].length!==0&&oE(n),p=n[0][n[2]].length!==0&&cE(n);return{c(){t=re("label"),r=he(),i=re("span"),s=re("input"),o=he(),f&&f.c(),l=he(),p&&p.c(),u=qr(),W(t,"for",n[2]),W(s,"accesskey",n[4]),W(s,"id",n[1]),W(s,"class","tasks-modal-dependency-input"),W(s,"type","text"),W(s,"placeholder",n[5]),Ss(()=>n[27].call(i))},m(h,b){ce(h,t,b),t.innerHTML=e,ce(h,r,b),ce(h,i,b),G(i,s),n[23](s),Tn(s,n[7]),a=xD(i,n[27].bind(i)),ce(h,o,b),f&&f.m(h,b),ce(h,l,b),p&&p.m(h,b),ce(h,u,b),c||(d=[Ne(s,"input",n[24]),Ne(s,"keydown",n[25]),Ne(s,"focus",n[17]),Ne(s,"blur",n[26])],c=!0)},p(h,b){b[0]&24&&e!==(e=Wt(h[3],h[4])+"")&&(t.innerHTML=e),b[0]&4&&W(t,"for",h[2]),b[0]&16&&W(s,"accesskey",h[4]),b[0]&2&&W(s,"id",h[1]),b[0]&32&&W(s,"placeholder",h[5]),b[0]&128&&s.value!==h[7]&&Tn(s,h[7]),h[11]&&h[11].length!==0?f?f.p(h,b):(f=oE(h),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null),h[0][h[2]].length!==0?p?p.p(h,b):(p=cE(h),p.c(),p.m(u.parentNode,u)):p&&(p.d(1),p=null)},i:Ye,o:Ye,d(h){h&&le(t),h&&le(r),h&&le(i),n[23](null),a(),h&&le(o),f&&f.d(h),h&&le(l),p&&p.d(h),h&&le(u),c=!1,St(d)}}}function Uq(n,t,e){let{task:r}=t,{editableTask:i}=t,{allTasks:s}=t,{_onDescriptionKeyDown:a}=t,{id:o}=t,{type:l}=t,{labelText:u}=t,{accesskey:c}=t,{placeholder:d="Type to search..."}=t,f="",p=null,h=0,b,v=!1,E=!1,C,x;function Y(S){e(0,i[l]=[...i[l],S],i),e(7,f=""),e(8,v=!1)}function X(S){e(0,i[l]=i[l].filter($=>$!==S),i)}function V(S){var $;if(p!==null){switch(S.key){case"ArrowUp":S.preventDefault(),h&&h>0?e(12,h-=1):e(12,h=p.length-1);break;case"ArrowDown":S.preventDefault(),h&&h{$.style.left=`${de}px`,$.style.top=`${ye}px`})}function Pe(S){return S===r.taskLocation.path?"":S}function Q(S){return ys(S)}function B(S,$){let de=S.createDiv();de.addClasses(["tooltip","pop-up"]),de.innerText=$,Cy(S,de,{placement:"top",middleware:[Oy(-18),Ry()]}).then(({x:ye,y:fe})=>{de.style.left=`${ye}px`,de.style.top=`${fe}px`}),S.addEventListener("mouseleave",()=>de.remove())}function P(S){ut[S?"unshift":"push"](()=>{C=S,e(9,C)})}function te(){f=this.value,e(7,f)}let H=S=>V(S),se=()=>e(8,v=!1);function m(){b=this.clientWidth,e(13,b)}let T=(S,$)=>B($.currentTarget,Q(S)),_=(S,$)=>B($.currentTarget,S),k=S=>Y(S),w=S=>e(12,h=S);function R(S){ut[S?"unshift":"push"](()=>{x=S,e(10,x)})}let I=()=>e(12,h=null),q=S=>X(S),L=(S,$)=>B($.currentTarget,Q(S));return n.$$set=S=>{"task"in S&&e(6,r=S.task),"editableTask"in S&&e(0,i=S.editableTask),"allTasks"in S&&e(21,s=S.allTasks),"_onDescriptionKeyDown"in S&&e(22,a=S._onDescriptionKeyDown),"id"in S&&e(1,o=S.id),"type"in S&&e(2,l=S.type),"labelText"in S&&e(3,u=S.labelText),"accesskey"in S&&e(4,c=S.accesskey),"placeholder"in S&&e(5,d=S.placeholder)},n.$$.update=()=>{n.$$.dirty[0]&1536&&Ae(C,x),n.$$.dirty[0]&384&&e(11,p=v?j(f):null)},[i,o,l,u,c,d,r,f,v,C,x,p,h,b,Y,X,V,ee,Pe,Q,B,s,a,P,te,H,se,m,T,_,k,w,R,I,q,L]}var My=class extends Kt{constructor(t){super(),kn(this,t,Uq,Lq,Xt,{task:6,editableTask:0,allTasks:21,_onDescriptionKeyDown:22,id:1,type:2,labelText:3,accesskey:4,placeholder:5},null,[-1,-1])}},Ay=My;dn();os();wl();var Il=require("obsidian");dn();vs();py();var Pl,Py,Iy,qq=["md"];function Qc(){return fn.getLogger("tasks.File")}var fE=({metadataCache:n,vault:t,workspace:e})=>{Pl=n,Py=t,Iy=e},qn=e=>A(null,[e],function*({originalTask:n,newTasks:t}){if(Py===void 0||Pl===void 0||Iy===void 0){Vc("Tasks: cannot use File before initializing it.");return}Array.isArray(t)||(t=[t]);let r=Qc(),i="replaceTaskWithTasks()";Ac(r,i,n),Pc(r,i,t),yield mE({originalTask:n,newTasks:t,vault:Py,metadataCache:Pl,workspace:Iy,previousTries:0})});function Vc(n){console.error(n),new Il.Notice(n,15e3)}function pE(n){console.warn(n),new Il.Notice(n,1e4)}function Yq(n){Qc().debug(n)}var qi=class extends Error{},zc=class extends Error{},mE=a=>A(null,[a],function*({originalTask:n,newTasks:t,vault:e,metadataCache:r,workspace:i,previousTries:s}){let o=Qc();o.debug(`tryRepetitive after ${s} previous tries`);let l=()=>A(null,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. + +The task line not updated is: +${n.originalMarkdown} + +In this markdown file: +"${n.taskLocation.path}" + +Note: further clicks on this checkbox will usually now be ignored until the file is opened (or certain, specific edits are made - it's complicated). + +Recommendations: + +1. Close all panes that have the above file open, and then re-open the file. + +2. Check for exactly identical copies of the task line, in this file, and see if you can make them different. +`;Vc(c);return}let u=Math.min(Math.pow(10,s),100);o.debug(`timeout = ${u}`),setTimeout(()=>A(null,null,function*(){yield mE({originalTask:n,newTasks:t,vault:e,metadataCache:r,workspace:i,previousTries:s+1})}),u)});try{let[u,c,d]=yield hE(n,e),f=[...d.slice(0,u),...t.map(p=>p.toFileLineString()),...d.slice(u+1)];yield e.modify(c,f.join(` +`))}catch(u){if(u instanceof qi){u.message&&pE(u.message),yield l();return}else if(u instanceof zc){yield l();return}else u instanceof Error&&Vc(u.message)}});function hE(n,t){return A(this,null,function*(){if(Pl===void 0)throw new qi;let e=t.getAbstractFileByPath(n.path);if(!(e instanceof Il.TFile))throw new qi(`Tasks: No file found for task ${n.description}. Retrying ...`);if(!qq.includes(e.extension))throw new Error(`Tasks: Does not support files with the ${e.extension} file extension.`);let r=Pl.getFileCache(e);if(r==null||r===null)throw new qi(`Tasks: No file cache found for file ${e.path}. Retrying ...`);let i=r.listItems;if(i===void 0||i.length===0)throw new qi(`Tasks: No list items found in file cache of ${e.path}. Retrying ...`);let a=(yield t.read(e)).split(` +`),o=Wq(n,a,i,Yq);if(o===void 0)throw new zc;return[o,e,a]})}function Ny(n,t){return A(this,null,function*(){try{let[e,r,i]=yield hE(n,t);return[e,r]}catch(e){e instanceof qi?e.message&&pE(e.message):e instanceof Error&&Vc(e.message)}})}function gE(n,t){return nc.id===l);u&&a.push(u)}let o=e.filter(l=>l.dependsOn.includes(t.id));return new n({addGlobalFilterOnSave:i,originalBlocking:o,description:r,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return A(this,null,function*(){let r=this.description.trim();this.addGlobalFilterOnSave&&(r=Me.getInstance().prependTo(r));let i=as(this.startDate,this.forwardOnly),s=as(this.scheduledDate,this.forwardOnly),a=as(this.dueDate,this.forwardOnly),o=as(this.cancelledDate,this.forwardOnly),l=as(this.createdDate,this.forwardOnly),u=as(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=mi.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new li({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let C of this.blockedBy){let x=yield Bq(C,e);f.push(x)}let p=t.id,h=[],b=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(p=kl(e.filter(C=>C.id!=="").map(C=>C.id))),h=this.originalBlocking.filter(C=>!this.blocking.includes(C)),b=this.blocking.filter(C=>!this.originalBlocking.includes(C)));let v=new ke(pe(U({},t),{description:r,status:t.status,priority:hr.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:u,createdDate:l,cancelledDate:o,dependsOn:f.map(C=>C.id),id:p}));for(let C of h){let x=VS(C,v);yield qn({originalTask:C,newTasks:x})}for(let C of b){let x=GS(C,v);yield qn({originalTask:C,newTasks:x})}let E=this.inferTodaysDate(this.status.type,u,o);return v.handleNewStatusWithRecurrenceInUsersOrder(this.status,E)})}inferTodaysDate(t,e,r){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&r!==null?r:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"not recurring",isRecurrenceValid:!0};let t=(e=mi.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new li({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"due, scheduled or start date required",isRecurrenceValid:!1}:{parsedRecurrence:"invalid recurrence rule",isRecurrenceValid:!1}}};function Bq(n,t){return A(this,null,function*(){if(n.id!=="")return n;let e=t.filter(i=>i.id!==""),r=wc(n,e.map(i=>i.id));return yield qn({originalTask:n,newTasks:r}),r})}yt();function yE(n,t,e){let r=n.slice();return r[7]=t[e].value,r[8]=t[e].label,r[9]=t[e].symbol,r[10]=t[e].accessKey,r[11]=t[e].accessKeyIndex,r}function Gq(n){let t,e=n[8]+"",r;return{c(){t=re("span"),r=$e(e)},m(i,s){ce(i,t,s),G(t,r)},p:Ye,d(i){i&&le(t)}}}function Vq(n){let t,e=n[8].substring(0,n[11])+"",r,i,s=n[8].substring(n[11],n[11]+1)+"",a,o,l=n[8].substring(n[11]+1)+"",u;return{c(){t=re("span"),r=$e(e),i=re("span"),a=$e(s),o=re("span"),u=$e(l),W(i,"class","accesskey")},m(c,d){ce(c,t,d),G(t,r),ce(c,i,d),G(i,a),ce(c,o,d),G(o,u)},p:Ye,d(c){c&&le(t),c&&le(i),c&&le(o)}}}function zq(n){let t,e=n[9]+"",r;return{c(){t=re("span"),r=$e(e)},m(i,s){ce(i,t,s),G(t,r)},p:Ye,d(i){i&&le(t)}}}function bE(n){let t,e,r,i,s,a,o,l,u=n[9]&&n[9].charCodeAt(0)>=256,c,d,f,p,h;function b(x,Y){return x[1]?Vq:Gq}let v=b(n,-1),E=v(n),C=u&&zq(n);return f=DD(n[5][0]),{c(){t=re("div"),e=re("input"),a=he(),o=re("label"),E.c(),l=he(),C&&C.c(),d=he(),W(e,"type","radio"),W(e,"id",r="priority-"+n[7]),e.__value=i=n[7],e.value=e.__value,W(e,"accesskey",s=n[2](n[10])),W(o,"for",c="priority-"+n[7]),W(t,"class","task-modal-priority-option-container"),f.p(e)},m(x,Y){ce(x,t,Y),G(t,e),e.checked=e.__value===n[0],G(t,a),G(t,o),E.m(o,null),G(o,l),C&&C.m(o,null),G(t,d),p||(h=Ne(e,"change",n[4]),p=!0)},p(x,Y){Y&4&&s!==(s=x[2](x[10]))&&W(e,"accesskey",s),Y&1&&(e.checked=e.__value===x[0]),v===(v=b(x,Y))&&E?E.p(x,Y):(E.d(1),E=v(x),E&&(E.c(),E.m(o,l))),u&&C.p(x,Y)},d(x){x&&le(t),E.d(),C&&C.d(),f.r(),p=!1,h()}}}function Qq(n){let t,e,r,i,s,a=n[3],o=[];for(let l=0;l{"priority"in c&&e(0,i=c.priority),"withAccessKeys"in c&&e(1,s=c.withAccessKeys)},n.$$.update=()=>{n.$$.dirty&2&&e(2,r=c=>s?c:null)},[i,s,r,o,u,l]}var Fy=class extends Kt{constructor(t){super(),kn(this,t,Kq,Qq,Xt,{priority:0,withAccessKeys:1})}},TE=Fy;yt();function Xq(n){let t,e=Wt("Recurs",n[2])+"",r,i,s,a,o,l,u,c,d;return{c(){t=re("label"),r=he(),i=re("input"),s=he(),a=re("code"),o=$e(n[4]),l=he(),u=new wa(!1),W(t,"for","recurrence"),W(i,"id","recurrence"),W(i,"type","text"),W(i,"class","tasks-modal-date-input"),W(i,"placeholder","Try 'every day when done'"),W(i,"accesskey",n[2]),bi(i,"tasks-modal-error",!n[1]),u.a=null,W(a,"class","tasks-modal-parsed-date")},m(f,p){ce(f,t,p),t.innerHTML=e,ce(f,r,p),ce(f,i,p),Tn(i,n[0].recurrenceRule),ce(f,s,p),ce(f,a,p),G(a,o),G(a,l),u.m(n[3],a),c||(d=Ne(i,"input",n[5]),c=!0)},p(f,[p]){p&4&&e!==(e=Wt("Recurs",f[2])+"")&&(t.innerHTML=e),p&4&&W(i,"accesskey",f[2]),p&1&&i.value!==f[0].recurrenceRule&&Tn(i,f[0].recurrenceRule),p&2&&bi(i,"tasks-modal-error",!f[1]),p&8&&u.p(f[3])},i:Ye,o:Ye,d(f){f&&le(t),f&&le(r),f&&le(i),f&&le(s),f&&le(a),c=!1,d()}}}function Zq(n,t,e){let{editableTask:r}=t,{isRecurrenceValid:i}=t,{accesskey:s}=t,a,{recurrenceSymbol:o}=Nn.tasksPluginEmoji.taskSerializer.symbols;function l(){r.recurrenceRule=this.value,e(0,r)}return n.$$set=u=>{"editableTask"in u&&e(0,r=u.editableTask),"isRecurrenceValid"in u&&e(1,i=u.isRecurrenceValid),"accesskey"in u&&e(2,s=u.accesskey)},n.$$.update=()=>{n.$$.dirty&1&&e(3,{parsedRecurrence:a,isRecurrenceValid:i}=r.parseAndValidateRecurrence(),a,(e(1,i),e(0,r)))},[r,i,s,a,o,l]}var Ly=class extends Kt{constructor(t){super(),kn(this,t,Zq,Xq,Xt,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},vE=Ly;function kE(n,t,e){let r=n.slice();return r[7]=t[e],r}function _E(n){let t,e=n[7].name+"",r,i,s=n[7].symbol+"",a,o,l;return{c(){t=re("option"),r=$e(e),i=$e(" ["),a=$e(s),o=$e("]"),t.__value=l=n[7].symbol,t.value=t.__value},m(u,c){ce(u,t,c),G(t,r),G(t,i),G(t,a),G(t,o)},p(u,c){c&1&&e!==(e=u[7].name+"")&&bn(r,e),c&1&&s!==(s=u[7].symbol+"")&&bn(a,s),c&1&&l!==(l=u[7].symbol)&&(t.__value=l,t.value=t.__value)},d(u){u&&le(t)}}}function Jq(n){let t,e=Wt("Status",n[1])+"",r,i,s,a,o=n[0],l=[];for(let u=0;un[6].call(i))},m(u,c){ce(u,t,c),t.innerHTML=e,ce(u,r,c),ce(u,i,c);for(let d=0;d{let c=s.find(f=>f.symbol===o);if(c)e(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=r.handleNewStatus(c).pop();d&&(e(4,i.doneDate=wE(i.doneDate,c.isCompleted(),d.done),i),e(4,i.cancelledDate=wE(i.cancelledDate,c.isCancelled(),d.cancelled),i))};function u(){o=ED(this),e(2,o),e(0,s)}return n.$$set=c=>{"task"in c&&e(5,r=c.task),"editableTask"in c&&e(4,i=c.editableTask),"statusOptions"in c&&e(0,s=c.statusOptions),"accesskey"in c&&e(1,a=c.accesskey)},[s,a,o,l,i,r,u]}var Uy=class extends Kt{constructor(t){super(),kn(this,t,eY,Jq,Xt,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},SE=Uy;function DE(n){let t,e,r,i,s,a;function o(u){n[32](u)}let l={withAccessKeys:n[11]};return n[3].priority!==void 0&&(l.priority=n[3].priority),e=new TE({props:l}),ut.push(()=>Jt(e,"priority",o)),{c(){t=re("section"),er(e.$$.fragment),i=he(),s=re("hr"),W(t,"class","tasks-modal-priority-section"),W(s,"id","line-after-priority")},m(u,c){ce(u,t,c),Un(e,t,null),ce(u,i,c),ce(u,s,c),a=!0},p(u,c){let d={};c[0]&2048&&(d.withAccessKeys=u[11]),!r&&c[0]&8&&(r=!0,d.priority=u[3].priority,Zt(()=>r=!1)),e.$set(d)},i(u){a||(ge(e.$$.fragment,u),a=!0)},o(u){Le(e.$$.fragment,u),a=!1},d(u){u&&le(t),vn(e),u&&le(i),u&&le(s)}}}function EE(n){let t,e,r;function i(a){n[33](a)}let s={editableTask:n[3],accesskey:n[16]("r")};return n[10]!==void 0&&(s.isRecurrenceValid=n[10]),t=new vE({props:s}),ut.push(()=>Jt(t,"isRecurrenceValid",i)),{c(){er(t.$$.fragment)},m(a,o){Un(t,a,o),r=!0},p(a,o){let l={};o[0]&8&&(l.editableTask=a[3]),o[0]&65536&&(l.accesskey=a[16]("r")),!e&&o[0]&1024&&(e=!0,l.isRecurrenceValid=a[10],Zt(()=>e=!1)),t.$set(l)},i(a){r||(ge(t.$$.fragment,a),r=!0)},o(a){Le(t.$$.fragment,a),r=!1},d(a){vn(t,a)}}}function xE(n){let t,e,r,i;function s(l){n[34](l)}function a(l){n[35](l)}let o={id:"due",dateSymbol:n[19],forwardOnly:n[3].forwardOnly,accesskey:n[16]("d")};return n[3].dueDate!==void 0&&(o.date=n[3].dueDate),n[7]!==void 0&&(o.isDateValid=n[7]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("d")),!e&&u[0]&8&&(e=!0,c.date=l[3].dueDate,Zt(()=>e=!1)),!r&&u[0]&128&&(r=!0,c.isDateValid=l[7],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function OE(n){let t,e,r,i;function s(l){n[36](l)}function a(l){n[37](l)}let o={id:"scheduled",dateSymbol:n[18],forwardOnly:n[3].forwardOnly,accesskey:n[16]("s")};return n[3].scheduledDate!==void 0&&(o.date=n[3].scheduledDate),n[8]!==void 0&&(o.isDateValid=n[8]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("s")),!e&&u[0]&8&&(e=!0,c.date=l[3].scheduledDate,Zt(()=>e=!1)),!r&&u[0]&256&&(r=!0,c.isDateValid=l[8],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function RE(n){let t,e,r,i;function s(l){n[38](l)}function a(l){n[39](l)}let o={id:"start",dateSymbol:n[17],forwardOnly:n[3].forwardOnly,accesskey:n[16]("a")};return n[3].startDate!==void 0&&(o.date=n[3].startDate),n[9]!==void 0&&(o.isDateValid=n[9]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("a")),!e&&u[0]&8&&(e=!0,c.date=l[3].startDate,Zt(()=>e=!1)),!r&&u[0]&512&&(r=!0,c.isDateValid=l[9],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function CE(n){let t,e,r=Wt("Only future dates:",n[16]("f"))+"",i,s,a,o,l;return{c(){t=re("div"),e=re("label"),i=he(),s=re("input"),W(e,"for","forwardOnly"),W(s,"id","forwardOnly"),W(s,"type","checkbox"),W(s,"class","task-list-item-checkbox tasks-modal-checkbox"),W(s,"accesskey",a=n[16]("f")),W(t,"class","future-dates-only"),W(t,"id","only-future-dates")},m(u,c){ce(u,t,c),G(t,e),e.innerHTML=r,G(t,i),G(t,s),s.checked=n[3].forwardOnly,o||(l=Ne(s,"change",n[40]),o=!0)},p(u,c){c[0]&65536&&r!==(r=Wt("Only future dates:",u[16]("f"))+"")&&(e.innerHTML=r),c[0]&65536&&a!==(a=u[16]("f"))&&W(s,"accesskey",a),c[0]&8&&(s.checked=u[3].forwardOnly)},d(u){u&&le(t),o=!1,l()}}}function ME(n){let t;return{c(){t=re("hr"),W(t,"id","line-after-happens-dates")},m(e,r){ce(e,t,r)},d(e){e&&le(t)}}}function tY(n){let t;return{c(){t=re("div"),t.innerHTML="Blocking and blocked by fields are disabled when vault tasks is empty"},m(e,r){ce(e,t,r)},p:Ye,i:Ye,o:Ye,d(e){e&&le(t)}}}function nY(n){let t,e,r,i=n[15].before_this&&AE(n),s=n[15].after_this&&PE(n);return{c(){i&&i.c(),t=he(),s&&s.c(),e=qr()},m(a,o){i&&i.m(a,o),ce(a,t,o),s&&s.m(a,o),ce(a,e,o),r=!0},p(a,o){a[15].before_this?i?(i.p(a,o),o[0]&32768&&ge(i,1)):(i=AE(a),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(Fn(),Le(i,1,1,()=>{i=null}),Ln()),a[15].after_this?s?(s.p(a,o),o[0]&32768&&ge(s,1)):(s=PE(a),s.c(),ge(s,1),s.m(e.parentNode,e)):s&&(Fn(),Le(s,1,1,()=>{s=null}),Ln())},i(a){r||(ge(i),ge(s),r=!0)},o(a){Le(i),Le(s),r=!1},d(a){i&&i.d(a),a&&le(t),s&&s.d(a),a&&le(e)}}}function AE(n){let t,e;return t=new Ay({props:{id:"before_this",type:"blockedBy",labelText:"Before this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[16]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),{c(){er(t.$$.fragment)},m(r,i){Un(t,r,i),e=!0},p(r,i){let s={};i[0]&1&&(s.task=r[0]),i[0]&8&&(s.editableTask=r[3]),i[0]&4&&(s.allTasks=r[2]),i[0]&65536&&(s.accesskey=r[16]("b")),t.$set(s)},i(r){e||(ge(t.$$.fragment,r),e=!0)},o(r){Le(t.$$.fragment,r),e=!1},d(r){vn(t,r)}}}function PE(n){let t,e;return t=new Ay({props:{id:"after_this",type:"blocking",labelText:"After this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[16]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){er(t.$$.fragment)},m(r,i){Un(t,r,i),e=!0},p(r,i){let s={};i[0]&1&&(s.task=r[0]),i[0]&8&&(s.editableTask=r[3]),i[0]&4&&(s.allTasks=r[2]),i[0]&65536&&(s.accesskey=r[16]("e")),t.$set(s)},i(r){e||(ge(t.$$.fragment,r),e=!0)},o(r){Le(t.$$.fragment,r),e=!1},d(r){vn(t,r)}}}function IE(n){let t;return{c(){t=re("hr"),W(t,"id","line-after-dependencies")},m(e,r){ce(e,t,r)},d(e){e&&le(t)}}}function NE(n){let t,e,r;function i(a){n[41](a)}let s={task:n[0],statusOptions:n[1],accesskey:n[16]("u")};return n[3]!==void 0&&(s.editableTask=n[3]),t=new SE({props:s}),ut.push(()=>Jt(t,"editableTask",i)),{c(){er(t.$$.fragment)},m(a,o){Un(t,a,o),r=!0},p(a,o){let l={};o[0]&1&&(l.task=a[0]),o[0]&2&&(l.statusOptions=a[1]),o[0]&65536&&(l.accesskey=a[16]("u")),!e&&o[0]&8&&(e=!0,l.editableTask=a[3],Zt(()=>e=!1)),t.$set(l)},i(a){r||(ge(t.$$.fragment,a),r=!0)},o(a){Le(t.$$.fragment,a),r=!1},d(a){vn(t,a)}}}function FE(n){let t,e,r,i;function s(l){n[42](l)}function a(l){n[43](l)}let o={id:"created",dateSymbol:n[21],forwardOnly:n[3].forwardOnly,accesskey:n[16]("c")};return n[3].createdDate!==void 0&&(o.date=n[3].createdDate),n[5]!==void 0&&(o.isDateValid=n[5]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("c")),!e&&u[0]&8&&(e=!0,c.date=l[3].createdDate,Zt(()=>e=!1)),!r&&u[0]&32&&(r=!0,c.isDateValid=l[5],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function LE(n){let t,e,r,i;function s(l){n[44](l)}function a(l){n[45](l)}let o={id:"done",dateSymbol:n[22],forwardOnly:n[3].forwardOnly,accesskey:n[16]("x")};return n[3].doneDate!==void 0&&(o.date=n[3].doneDate),n[6]!==void 0&&(o.isDateValid=n[6]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("x")),!e&&u[0]&8&&(e=!0,c.date=l[3].doneDate,Zt(()=>e=!1)),!r&&u[0]&64&&(r=!0,c.isDateValid=l[6],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function UE(n){let t,e,r,i;function s(l){n[46](l)}function a(l){n[47](l)}let o={id:"cancelled",dateSymbol:n[20],forwardOnly:n[3].forwardOnly,accesskey:n[16]("-")};return n[3].cancelledDate!==void 0&&(o.date=n[3].cancelledDate),n[4]!==void 0&&(o.isDateValid=n[4]),t=new Es({props:o}),ut.push(()=>Jt(t,"date",s)),ut.push(()=>Jt(t,"isDateValid",a)),{c(){er(t.$$.fragment)},m(l,u){Un(t,l,u),i=!0},p(l,u){let c={};u[0]&8&&(c.forwardOnly=l[3].forwardOnly),u[0]&65536&&(c.accesskey=l[16]("-")),!e&&u[0]&8&&(e=!0,c.date=l[3].cancelledDate,Zt(()=>e=!1)),!r&&u[0]&16&&(r=!0,c.isDateValid=l[4],Zt(()=>r=!1)),t.$set(c)},i(l){i||(ge(t.$$.fragment,l),i=!0)},o(l){Le(t.$$.fragment,l),i=!1},d(l){vn(t,l)}}}function rY(n){let t,e,r,i=Wt("Description",n[16]("t"))+"",s,a,o,l,u,c,d,f,p,h,b,v,E,C,x,Y,X,V,j,ee,Ae,Pe,Q,B,P,te,H,se,m,T,_,k=n[15].priority&&DE(n),w=n[15].recurrence&&EE(n),R=n[15].due&&xE(n),I=n[15].scheduled&&OE(n),q=n[15].start&&RE(n),L=(n[15].due||n[15].scheduled||n[15].start)&&CE(n),S=(n[15].due||n[15].scheduled||n[15].start)&&ME(n),$=[nY,tY],de=[];function ye(F,Ue){return F[2].length>0&&F[14]?0:1}C=ye(n,[-1,-1]),x=de[C]=$[C](n);let fe=(n[15].before_this||n[15].after_this)&&IE(n),Te=n[15].status&&NE(n),we=n[15].created&&FE(n),tt=n[15].done&&LE(n),nt=n[15].cancelled&&UE(n);return{c(){t=re("form"),e=re("section"),r=re("label"),s=he(),a=re("textarea"),l=he(),k&&k.c(),u=he(),c=re("section"),w&&w.c(),d=he(),R&&R.c(),f=he(),I&&I.c(),p=he(),q&&q.c(),h=he(),L&&L.c(),b=he(),S&&S.c(),v=he(),E=re("section"),x.c(),Y=he(),fe&&fe.c(),X=he(),V=re("section"),Te&&Te.c(),j=he(),we&&we.c(),ee=he(),tt&&tt.c(),Ae=he(),nt&&nt.c(),Pe=he(),Q=re("section"),B=re("button"),P=$e("Apply"),H=he(),se=re("button"),se.textContent="Cancel",W(r,"for","description"),W(a,"id","description"),W(a,"class","tasks-modal-description"),W(a,"placeholder","Take out the trash"),W(a,"accesskey",o=n[16]("t")),W(e,"class","tasks-modal-description-section"),W(c,"class","tasks-modal-dates-section"),W(E,"class","tasks-modal-dependencies-section"),W(V,"class","tasks-modal-dates-section"),B.disabled=te=!n[13],W(B,"type","submit"),W(B,"class","mod-cta"),W(se,"type","button"),W(Q,"class","tasks-modal-button-section"),W(t,"class","tasks-modal")},m(F,Ue){ce(F,t,Ue),G(t,e),G(e,r),r.innerHTML=i,G(e,s),G(e,a),Tn(a,n[3].description),n[31](a),G(t,l),k&&k.m(t,null),G(t,u),G(t,c),w&&w.m(c,null),G(c,d),R&&R.m(c,null),G(c,f),I&&I.m(c,null),G(c,p),q&&q.m(c,null),G(c,h),L&&L.m(c,null),G(t,b),S&&S.m(t,null),G(t,v),G(t,E),de[C].m(E,null),G(t,Y),fe&&fe.m(t,null),G(t,X),G(t,V),Te&&Te.m(V,null),G(V,j),we&&we.m(V,null),G(V,ee),tt&&tt.m(V,null),G(V,Ae),nt&&nt.m(V,null),G(t,Pe),G(t,Q),G(Q,B),G(B,P),G(Q,H),G(Q,se),m=!0,T||(_=[Ne(a,"input",n[30]),Ne(a,"keydown",n[24]),Ne(a,"paste",n[25]),Ne(a,"drop",n[25]),Ne(se,"click",n[23]),Ne(t,"submit",SD(n[26]))],T=!0)},p(F,Ue){(!m||Ue[0]&65536)&&i!==(i=Wt("Description",F[16]("t"))+"")&&(r.innerHTML=i),(!m||Ue[0]&65536&&o!==(o=F[16]("t")))&&W(a,"accesskey",o),Ue[0]&8&&Tn(a,F[3].description),F[15].priority?k?(k.p(F,Ue),Ue[0]&32768&&ge(k,1)):(k=DE(F),k.c(),ge(k,1),k.m(t,u)):k&&(Fn(),Le(k,1,1,()=>{k=null}),Ln()),F[15].recurrence?w?(w.p(F,Ue),Ue[0]&32768&&ge(w,1)):(w=EE(F),w.c(),ge(w,1),w.m(c,d)):w&&(Fn(),Le(w,1,1,()=>{w=null}),Ln()),F[15].due?R?(R.p(F,Ue),Ue[0]&32768&&ge(R,1)):(R=xE(F),R.c(),ge(R,1),R.m(c,f)):R&&(Fn(),Le(R,1,1,()=>{R=null}),Ln()),F[15].scheduled?I?(I.p(F,Ue),Ue[0]&32768&&ge(I,1)):(I=OE(F),I.c(),ge(I,1),I.m(c,p)):I&&(Fn(),Le(I,1,1,()=>{I=null}),Ln()),F[15].start?q?(q.p(F,Ue),Ue[0]&32768&&ge(q,1)):(q=RE(F),q.c(),ge(q,1),q.m(c,h)):q&&(Fn(),Le(q,1,1,()=>{q=null}),Ln()),F[15].due||F[15].scheduled||F[15].start?L?L.p(F,Ue):(L=CE(F),L.c(),L.m(c,null)):L&&(L.d(1),L=null),F[15].due||F[15].scheduled||F[15].start?S||(S=ME(F),S.c(),S.m(t,v)):S&&(S.d(1),S=null);let $t=C;C=ye(F,Ue),C===$t?de[C].p(F,Ue):(Fn(),Le(de[$t],1,1,()=>{de[$t]=null}),Ln(),x=de[C],x?x.p(F,Ue):(x=de[C]=$[C](F),x.c()),ge(x,1),x.m(E,null)),F[15].before_this||F[15].after_this?fe||(fe=IE(F),fe.c(),fe.m(t,X)):fe&&(fe.d(1),fe=null),F[15].status?Te?(Te.p(F,Ue),Ue[0]&32768&&ge(Te,1)):(Te=NE(F),Te.c(),ge(Te,1),Te.m(V,j)):Te&&(Fn(),Le(Te,1,1,()=>{Te=null}),Ln()),F[15].created?we?(we.p(F,Ue),Ue[0]&32768&&ge(we,1)):(we=FE(F),we.c(),ge(we,1),we.m(V,ee)):we&&(Fn(),Le(we,1,1,()=>{we=null}),Ln()),F[15].done?tt?(tt.p(F,Ue),Ue[0]&32768&&ge(tt,1)):(tt=LE(F),tt.c(),ge(tt,1),tt.m(V,Ae)):tt&&(Fn(),Le(tt,1,1,()=>{tt=null}),Ln()),F[15].cancelled?nt?(nt.p(F,Ue),Ue[0]&32768&&ge(nt,1)):(nt=UE(F),nt.c(),ge(nt,1),nt.m(V,null)):nt&&(Fn(),Le(nt,1,1,()=>{nt=null}),Ln()),(!m||Ue[0]&8192&&te!==(te=!F[13]))&&(B.disabled=te)},i(F){m||(ge(k),ge(w),ge(R),ge(I),ge(q),ge(x),ge(Te),ge(we),ge(tt),ge(nt),m=!0)},o(F){Le(k),Le(w),Le(R),Le(I),Le(q),Le(x),Le(Te),Le(we),Le(tt),Le(nt),m=!1},d(F){F&&le(t),n[31](null),k&&k.d(),w&&w.d(),R&&R.d(),I&&I.d(),q&&q.d(),L&&L.d(),S&&S.d(),de[C].d(),fe&&fe.d(),Te&&Te.d(),we&&we.d(),tt&&tt.d(),nt&&nt.d(),T=!1,St(_)}}}function iY(n,t,e){let r,i,s;qc(n,Ds,F=>e(29,s=F));let{task:a}=t,{onSubmit:o}=t,{statusOptions:l}=t,{allTasks:u}=t,{startDateSymbol:c,scheduledDateSymbol:d,dueDateSymbol:f,cancelledDateSymbol:p,createdDateSymbol:h,doneDateSymbol:b}=Nn.tasksPluginEmoji.taskSerializer.symbols,v,E=Kc.fromTask(a,u),C=!0,x=!0,Y=!0,X=!0,V=!0,j=!0,ee=!0,Ae=!0,Pe=!0,Q=!0,B=!1;vy(()=>{Ds.set(J());let{provideAccessKeys:F}=J();e(11,Pe=F),e(14,B=!0),setTimeout(()=>{v.focus()},10)});let P=()=>{o([])},te=F=>{F.key==="Enter"&&!F.isComposing&&(F.preventDefault(),Q&&se())},H=()=>{setTimeout(()=>{e(3,E.description=E.description.replace(/[\r\n]+/g," "),E)},0)},se=()=>Kw(void 0,void 0,void 0,function*(){let F=yield E.applyEdits(a,u);o(F)});function m(){E.description=this.value,e(3,E)}function T(F){ut[F?"unshift":"push"](()=>{v=F,e(12,v)})}function _(F){n.$$.not_equal(E.priority,F)&&(E.priority=F,e(3,E))}function k(F){Ae=F,e(10,Ae)}function w(F){n.$$.not_equal(E.dueDate,F)&&(E.dueDate=F,e(3,E))}function R(F){V=F,e(7,V)}function I(F){n.$$.not_equal(E.scheduledDate,F)&&(E.scheduledDate=F,e(3,E))}function q(F){j=F,e(8,j)}function L(F){n.$$.not_equal(E.startDate,F)&&(E.startDate=F,e(3,E))}function S(F){ee=F,e(9,ee)}function $(){E.forwardOnly=this.checked,e(3,E)}function de(F){E=F,e(3,E)}function ye(F){n.$$.not_equal(E.createdDate,F)&&(E.createdDate=F,e(3,E))}function fe(F){Y=F,e(5,Y)}function Te(F){n.$$.not_equal(E.doneDate,F)&&(E.doneDate=F,e(3,E))}function we(F){X=F,e(6,X)}function tt(F){n.$$.not_equal(E.cancelledDate,F)&&(E.cancelledDate=F,e(3,E))}function nt(F){x=F,e(4,x)}return n.$$set=F=>{"task"in F&&e(0,a=F.task),"onSubmit"in F&&e(27,o=F.onSubmit),"statusOptions"in F&&e(1,l=F.statusOptions),"allTasks"in F&&e(2,u=F.allTasks)},n.$$.update=()=>{n.$$.dirty[0]&2048&&e(16,r=F=>Pe?F:null),n.$$.dirty[0]&8&&e(28,C=E.description.trim()!==""),n.$$.dirty[0]&268437488&&e(13,Q=V&&Ae&&j&&ee&&C&&x&&Y&&X),n.$$.dirty[0]&536870912&&e(15,i=Object.assign(Object.assign({},ga),s.isShownInEditModal))},[a,l,u,E,x,Y,X,V,j,ee,Ae,Pe,v,Q,B,i,r,c,d,f,p,h,b,P,te,H,se,o,C,s,m,T,_,k,w,R,I,q,L,S,$,de,ye,fe,Te,we,tt,nt]}var qy=class extends Kt{constructor(t){super(),kn(this,t,iY,rY,Xt,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},qE=qy;br();yr();var HE=require("obsidian");Rc();function YE(n,t,e){let r=n.slice();return r[8]=t[e],r}function WE(n){let t;return{c(){t=re("hr")},m(e,r){ce(e,t,r)},d(e){e&&le(t)}}}function $E(n){let t,e,r,i,s,a,o=n[4](n[8])+"",l,u,c=n[5].includes(n[8]),d,f,p,h=c&&WE(n);return{c(){t=re("label"),e=re("input"),s=he(),a=re("span"),l=$e(o),u=he(),h&&h.c(),d=qr(),W(e,"type","checkbox"),e.checked=r=n[1][n[8]],W(e,"id",i=n[8])},m(b,v){ce(b,t,v),G(t,e),G(t,s),G(t,a),G(a,l),ce(b,u,v),h&&h.m(b,v),ce(b,d,v),f||(p=Ne(e,"change",function(){Ui(n[2](n[8]))&&n[2](n[8]).apply(this,arguments)}),f=!0)},p(b,v){n=b,v&2&&r!==(r=n[1][n[8]])&&(e.checked=r),v&2&&i!==(i=n[8])&&W(e,"id",i),v&2&&o!==(o=n[4](n[8])+"")&&bn(l,o),v&2&&(c=n[5].includes(n[8])),c?h||(h=WE(n),h.c(),h.m(d.parentNode,d)):h&&(h.d(1),h=null)},d(b){b&&le(t),b&&le(u),h&&h.d(b),b&&le(d),f=!1,p()}}}function sY(n){let t,e,r,i,s,a,o,l,u,c=Object.keys(n[1]),d=[];for(let f=0;fe(7,r=d));let{onSave:i}=t,{onClose:s}=t,a=Object.assign(Object.assign({},ga),r.isShownInEditModal),o=d=>f=>{e(1,a[d]=f.target.checked,a)},l=()=>{Ds.set(Object.assign(Object.assign({},r),{isShownInEditModal:a})),i()},u=d=>d.charAt(0).toUpperCase()+d.slice(1).replace("_"," "),c=["priority","start","after_this"];return n.$$set=d=>{"onSave"in d&&e(6,i=d.onSave),"onClose"in d&&e(0,s=d.onClose)},[s,a,o,l,u,c,i]}var Yy=class extends Kt{constructor(t){super(),kn(this,t,aY,sY,Xt,{onSave:6,onClose:0})}},jE=Yy;var Xc=class extends HE.Modal{constructor({app:t,onSave:e}){super(t),this.onSave=e}onOpen(){this.titleEl.setText("Hide unused fields"),this.modalEl.addClass("tasks-options-modal-container");let{contentEl:t}=this;this.contentEl.style.paddingBottom="0",new jE({target:t,props:{onSave:()=>{this.onSave(),this.close()},onClose:()=>{this.onClose(),this.close()}}})}onClose(){let{contentEl:t}=this;t.empty()}};var jr=class extends GE.Modal{constructor({app:t,task:e,onSaveSettings:r,onSubmit:i,onCancel:s,allTasks:a}){super(t),this.task=e,this.allTasks=a,this.onSaveSettings=r,this.onSubmit=o=>{o.length>0?i(o):s&&s(),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let t=document.createElement("button");t.addClasses(["modal-close-button","mod-raised","clickable-icon"]),t.addClass("modal-option-button"),(0,BE.setIcon)(t,"settings"),t.onclick=()=>{new Xc({app:this.app,onSave:()=>{this.onSaveSettings()}}).open()},this.modalEl.appendChild(t);let{contentEl:e}=this;this.contentEl.style.paddingBottom="0";let r=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new qE({target:e,props:{task:this.task,statusOptions:r,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let t=Ze.getInstance().registeredStatuses;return Ze.getInstance().bySymbol(this.task.status.symbol)===xe.EMPTY&&t.push(this.task.status),t}onClose(){let{contentEl:t}=this;t.empty()}};Fi();yr();kc();At();Fi();br();yt();dn();ms();Xr();function oY(){let{setCreatedDate:n}=J();return n?window.moment():null}function lY(n){let{setCreatedDate:t}=J();if(!t||n.createdDate!==null)return!1;let e=n.description==="",r=!Me.getInstance().isEmpty(),i=!Me.getInstance().includedIn(n.description);return e||r&&i}var Ca=({line:n,path:t})=>{var f,p;let e=ke.parseTaskSignifiers(n,Qt.fromUnknownPosition(new ft(t)),Yt.fromPath(t)),r=oY();if(e!==null)return lY(e)?new ke(pe(U({},e),{createdDate:r})):e;let i=n.match(We.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",n),new ke({status:xe.TODO,description:"",taskLocation:Qt.fromUnknownPosition(new ft(t)),indentation:"",listMarker:"-",priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(p=i[4])!=null?p:" ",l=Ze.getInstance().bySymbolOrCreate(o),u=i[5],c=n.match(We.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(u=u.replace(We.blockLinkRegex,"")),new ke({status:l,description:u,taskLocation:Qt.fromUnknownPosition(new ft(t)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var VE=(n,t,e,r,i,s)=>{var p;if(n)return e instanceof Wy.MarkdownView;if(!(e instanceof Wy.MarkdownView))return;let a=(p=e.file)==null?void 0:p.path;if(a===void 0)return;let l=t.getCursor().line,u=t.getLine(l),c=Ca({line:u,path:a}),d=h=>{let b=Yt.removeInferredStatusIfNeeded(c,h).map(v=>v.toFileLineString()).join(` +`);t.setLine(l,b)};new jr({app:r,task:c,onSaveSettings:s,onSubmit:d,allTasks:i}).open()};br();At();Xr();var $y=require("obsidian");var zE=(n,t)=>{let e={line:0,ch:n.ch},r=U(U({},e),t.moveTo),i=t.text.split(` +`)[r.line].length;return{line:n.line+r.line,ch:Math.min(r.ch,i)}},Zc=n=>{function t(e,r,i){var f;if(e)return i instanceof $y.MarkdownView;if(!(i instanceof $y.MarkdownView))return;let s=(f=i.file)==null?void 0:f.path;if(s===void 0)return;let a=r.getCursor(),o=a.line,l=r.getLine(o),u=n(l,s);if(u===void 0)return;let c=u.text.length>0,d=o>=r.lineCount()-1;if(c||d)r.setLine(o,u.text);else{let p={line:o,ch:0},h={line:o+1,ch:0};r.replaceRange("",p,h)}r.setCursor(zE(a,u))}return t};var jy=(n,t)=>{let e=ke.fromLine({line:n,taskLocation:Qt.fromUnknownPosition(new ft(t)),fallbackDate:null});if(e!==null){let r=e.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString()),i=r.length>0?r.length-1:0;return{text:r.join(` +`),moveTo:{line:i}}}else{let r=n.match(We.taskRegex);if(r!==null){let i=r[3],a=Ze.getInstance().bySymbol(i).nextStatusSymbol;return{text:n.replace(We.taskRegex,`$1$2 [${a}] $4`)}}else if(We.listItemRegex.test(n)){let i=n.replace(We.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=n.replace(We.indentationRegex,"$1- [ ] ");return{text:i,moveTo:{ch:i.length}}}}},QE=Zc(jy);var db=require("obsidian");yt();var Yi=class{constructor(){this.hideToolbar=!1;this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function KE(n,t,e){let r=new Map([["backlink","hideBacklinks"],["edit button","hideEditButton"],["postpone button","hidePostponeButton"],["task count","hideTaskCount"],["toolbar","hideToolbar"],["tree","hideTree"],["urgency","hideUrgency"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n[s]=e,!0;return!1}ps();function As(n,t){let e=`Error: ${n}. +The error message was: + `,r="";return t instanceof Error?r+=t:r+="Unknown error",`${e}"${r}"`}vs();var uY=Object.prototype.toString,Aa=Array.isArray||function(t){return uY.call(t)==="[object Array]"};function By(n){return typeof n=="function"}function cY(n){return Aa(n)?"array":typeof n}function Hy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function XE(n,t){return n!=null&&typeof n=="object"&&t in n}function dY(n,t){return n!=null&&typeof n!="object"&&n.hasOwnProperty&&n.hasOwnProperty(t)}var fY=RegExp.prototype.test;function pY(n,t){return fY.call(n,t)}var mY=/\S/;function hY(n){return!pY(mY,n)}var gY={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function yY(n){return String(n).replace(/[&<>"'`=\/]/g,function(e){return gY[e]})}var bY=/\s*/,TY=/\s+/,ZE=/\s*=/,vY=/\s*\}/,kY=/#|\^|\/|>|\{|&|=|!/;function _Y(n,t){if(!n)return[];var e=!1,r=[],i=[],s=[],a=!1,o=!1,l="",u=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,p;function h(ee){if(typeof ee=="string"&&(ee=ee.split(TY,2)),!Aa(ee)||ee.length!==2)throw new Error("Invalid tags: "+ee);d=new RegExp(Hy(ee[0])+"\\s*"),f=new RegExp("\\s*"+Hy(ee[1])),p=new RegExp("\\s*"+Hy("}"+ee[1]))}h(t||rr.tags);for(var b=new Fl(n),v,E,C,x,Y,X;!b.eos();){if(v=b.pos,C=b.scanUntil(d),C)for(var V=0,j=C.length;V"?Y=[E,C,v,b.pos,l,u,e]:Y=[E,C,v,b.pos],u++,i.push(Y),E==="#"||E==="^")r.push(Y);else if(E==="/"){if(X=r.pop(),!X)throw new Error('Unopened section "'+C+'" at '+v);if(X[1]!==C)throw new Error('Unclosed section "'+X[1]+'" at '+v)}else E==="name"||E==="{"||E==="&"?o=!0:E==="="&&h(C)}if(c(),X=r.pop(),X)throw new Error('Unclosed section "'+X[1]+'" at '+b.pos);return SY(wY(i))}function wY(n){for(var t=[],e,r,i=0,s=n.length;i0?r[r.length-1][4]:t;break;default:e.push(i)}return t}function Fl(n){this.string=n,this.tail=n,this.pos=0}Fl.prototype.eos=function(){return this.tail===""};Fl.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var r=e[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};Fl.prototype.scanUntil=function(t){var e=this.tail.search(t),r;switch(e){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=r.length,r};function Ma(n,t){this.view=n,this.cache={".":this.view},this.parent=t}Ma.prototype.push=function(t){return new Ma(t,this)};Ma.prototype.lookup=function(t){var e=this.cache,r;if(e.hasOwnProperty(t))r=e[t];else{for(var i=this,s,a,o,l=!1;i;){if(t.indexOf(".")>0)for(s=i.view,a=t.split("."),o=0;s!=null&&o"?u=this.renderPartial(o,e,r,s):l==="&"?u=this.unescapedValue(o,e):l==="name"?u=this.escapedValue(o,e,s):l==="text"&&(u=this.rawValue(o)),u!==void 0&&(a+=u);return a};pn.prototype.renderSection=function(t,e,r,i,s){var a=this,o="",l=e.lookup(t[1]);function u(f){return a.render(f,e,r,s)}if(l){if(Aa(l))for(var c=0,d=l.length;c0||!r)&&(s[a]=i+s[a]);return s.join(` +`)};pn.prototype.renderPartial=function(t,e,r,i){if(r){var s=this.getConfigTags(i),a=By(r)?r(t[1]):r[t[1]];if(a!=null){var o=t[6],l=t[5],u=t[4],c=a;l==0&&u&&(c=this.indentPartial(a,u,o));var d=this.parse(c,s);return this.renderTokens(d,e,r,c,i)}}};pn.prototype.unescapedValue=function(t,e){var r=e.lookup(t[1]);if(r!=null)return r};pn.prototype.escapedValue=function(t,e,r){var i=this.getConfigEscape(r)||rr.escape,s=e.lookup(t[1]);if(s!=null)return typeof s=="number"&&i===rr.escape?String(s):i(s)};pn.prototype.rawValue=function(t){return t[1]};pn.prototype.getConfigTags=function(t){return Aa(t)?t:t&&typeof t=="object"?t.tags:void 0};pn.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!Aa(t))return t.escape};var rr={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(n){Nl.templateCache=n},get templateCache(){return Nl.templateCache}},Nl=new pn;rr.clearCache=function(){return Nl.clearCache()};rr.parse=function(t,e){return Nl.parse(t,e)};rr.render=function(t,e,r,i){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+cY(t)+'" was given as the first argument for mustache#render(template, view, partials)');return Nl.render(t,e,r,i)};rr.escape=yY;rr.Scanner=Fl;rr.Context=Ma;rr.Writer=pn;var Gy=rr;var l1=$s(n1());var r1="enableJsInTasksQueries";var en=class n{constructor(t){this.storage=t;this.value=this.loadValue()}static initialise(t){return n.instance=new n(t),n.instance}static getInstance(){if(!n.instance)throw new Error("EnableJsInTasksQueries has not been initialised.");return n.instance}get(){return this.value}set(t){this.value=t,this.storage.save(r1,t)}loadValue(){let t=this.storage.load(r1);return typeof t=="boolean"?t:!1}};var Ps=class n{constructor(t){this.instruction=t}get queryComponent(){return this._queryComponent}set queryComponent(t){this._queryComponent=t}get error(){return this._error}set error(t){this._error=t}isValid(){return this._queryComponent!==void 0}static fromObject(t,e){let r=new n(t);return r._queryComponent=e,r}static fromError(t,e){let r=new n(t);return r._error=e,r}};var Ll=class Ll extends Error{constructor(){super(Ll.helpMessage),this.name="JsInTasksQueriesDisabledError"}static message(){return Ll.helpMessage}};Ll.helpMessage=`JavaScript is now disabled in Tasks queries by default. + This query uses JavaScript, for example via "filter by function", "sort by function", or "group by function". + JavaScript can run inside Obsidian and access or modify vault contents, local files, or other system resources. + Read the Tasks documentation page "JavaScript in Tasks Queries" before deciding whether to enable it: + https://publish.obsidian.md/tasks/Scripting/JavaScript+in+Tasks+Queries`;var vr=Ll;var Ul=class extends Ps{};function ql(n,t){if(!en.getInstance().get())throw new vr;try{let e=n.map(([s])=>s),r=t.includes("return")?t:`return ${t}`,i=t&&new Function(...e,r);return i instanceof Function?Ul.fromObject(t,i):Ul.fromError(t,`Problem parsing expression "${t}"`)}catch(e){return Ul.fromError(t,As(`Failed parsing expression "${t}"`,e))}}function Yl(n,t){if(!en.getInstance().get())throw new vr;let e=t.map(([r,i])=>i);return n(...e)}function zy(n,t,e){try{return Yl(n,t)}catch(r){return As(`Failed calculating expression "${e}"`,r)}}function a1(n,t){let e=n.trim(),r=t.query.file;switch(e){case"query.file.path":return kr(r.path);case"query.file.pathWithoutExtension":return kr(r.pathWithoutExtension);case"query.file.root":return kr(r.root);case"query.file.folder":return kr(r.folder);case"query.file.filename":return kr(r.filename);case"query.file.filenameWithoutExtension":return kr(r.filenameWithoutExtension);case"query.file.outlinksInProperties":return kr(r.outlinksInProperties);case"query.file.outlinksInBody":return kr(r.outlinksInBody);case"query.file.outlinks":return kr(r.outlinks)}let i=s1(e,i1("query.file.property"));if(i!==null)return kr(r.property(i));let s=s1(e,i1("query.file.hasProperty"));return s!==null?kr(r.hasProperty(s)):DY()}function kr(n){return{resolved:!0,value:n}}function DY(){return{resolved:!1}}function i1(n){let t=n.replace(/\./g,String.raw`\.`);return new RegExp(String.raw`^${t}\((['"])([^'"]*)\1\)$`)}function s1(n,t){var r;let e=new RegExp(t).exec(n);return(r=e==null?void 0:e[2])!=null?r:null}function Qy(n,t){Gy.escape=function(e){return e};try{let e=xY(n,t);return Gy.render(e,(0,l1.default)(t))}catch(e){let r="";throw e instanceof Error?r=`There was an error expanding one or more placeholders. + +The error message was: + ${e.message.replace(/ > /g,".").replace("Missing Mustache data property","Unknown property")}`:r="Unknown error expanding placeholders.",r+=` + +The problem is in: + ${n}`,new Error(r)}}var EY=new RegExp(["\\{\\{","(.*?)","\\}\\}"].join(""),"g");function xY(n,t){return n.replace(EY,(e,r)=>{if(OY(t)){let a=a1(r,t);if(a.resolved){let o=a.value;if(o===null&&o1(r),o!==void 0)return String(o)}}if(!en.getInstance().get()){if(RY(r))return e;throw new vr}let i=CY(t),s=ql(i,r);if(s.isValid()){let a=Yl(s.queryComponent,i);if(a===null&&o1(r),a!==void 0)return String(a)}return e})}function OY(n){var t;return((t=n==null?void 0:n.query)==null?void 0:t.file)!==void 0}function o1(n){throw new Error(`Invalid placeholder result 'null'. + Check for missing file property in this expression: + {{${n}}}`)}function RY(n){return/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/.test(n.trim())}function CY(n){return Object.entries(n)}yt();function Ky(n){return Xy(n,[])}function Xy(n,t){return{query:{file:n,allTasks:t,searchCache:{}},preset:U({},J().presets)}}oy();yt();var Pa=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainIgnoreGlobalQuery(t)),e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainLayout(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(r=>r!=="").join(` +`)}explainError(t){let e="";return e+=`Query has an error: +`,e+=t.error+` +`,e}explainIgnoreGlobalQuery(t){return t.ignoreGlobalQuery?this.indent(`ignore global query +`):""}explainFilters(t){return t.filters.length===0?this.indent(`No filters supplied. All tasks will match the query. +`):t.filters.map(e=>e.explainFilterIndented(this.indentation)).join(` +`)}explainGroups(t){return this.explainStatements(t.grouping.map(e=>e.statement))}explainSorters(t){return this.explainStatements(t.sorting.map(e=>e.statement))}explainLayout(t){return this.explainStatements(t.layoutStatements)}explainQueryLimits(t){function e(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let r=[];if(t.limit!==void 0){let i=e(t.limit)+`. +`;r.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied). +`;r.push(this.indent(i))}return r.join(` +`)}explainDebugSettings(){let t="",{debugSettings:e}=J();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. +`)),t}explainStatements(t){return t.length===0?"":t.map(e=>e.explainStatement(this.indentation)).join(` + +`)+` +`}indent(t){return this.indentation+t}};dn();var Je=class n{constructor(t,e=[],r=""){this.description=t,this.symbol=r,this.children=e}static booleanAnd(t){return this.combineOrCreateExplanation("All of",t,"AND")}static booleanOr(t){return this.combineOrCreateExplanation("At least one of",t,"OR")}static booleanNot(t){return new n("None of",t,"NOT")}static booleanXor(t){return new n("Exactly one of",t,"XOR")}asString(t=""){if(this.children.length==0)return t+this.description;let e=t;this.symbol===""?e+=this.description:(e+=this.symbol,this.children.length>1&&(e+=` (${this.description})`),e+=":");let r=t+" ";for(let i=0;ithis.matches(e))}};var Jc=class n extends Ia{constructor(t){super(),this.stringToFind=t}matches(t){return n.stringIncludesCaseInsensitive(t,this.stringToFind)}static stringIncludesCaseInsensitive(t,e){return t.toLocaleLowerCase().includes(e.toLocaleLowerCase())}explanation(t){return new Je(t)}};var Na=class n extends Ia{constructor(t){super(),this.regex=t}static validateAndConstruct(t){let e=/^\/(.+)\/([^/]*)$/,r=t.match(e);if(r!==null){let i=new RegExp(r[1],r[2]);return new n(i)}else return null}matches(t){return t.match(this.regex)!==null}static helpMessage(){return String.raw`See https://publish.obsidian.md/tasks/Queries/Regular+Expressions + +Regular expressions must look like this: + /pattern/ +or this: + /pattern/flags + +Where: +- pattern: The 'regular expression' pattern to search for. +- flags: Optional characters that modify the search. + i => make the search case-insensitive + u => add Unicode support + +Examples: /^Log/ + /^Log/i + /File Name\.md/ + /waiting|waits|waited/i + /\d\d:\d\d/ + +The following characters have special meaning in the pattern: +to find them literally, you must add a \ before them: + [\^$.|?*+() + +CAUTION! Regular expression (or 'regex') searching is a powerful +but advanced feature that requires thorough knowledge in order to +use successfully, and not miss intended search results. +`}explanation(t){let r=MY(t,"using regex: ",this.regexAsString());return new Je(r)}regexAsString(){let t=`'${this.regex.source}' with `;switch(this.regex.flags.length){case 0:t+="no flags";break;case 1:t+=`flag '${this.regex.flags}'`;break;default:t+=`flags '${this.regex.flags}'`;break}return t}};function MY(n,t,e){var o;let r=n.match(/\//);if(!r)return"Error explaining instruction. Could not find a slash character";let i=2,s=((o=r.index)!=null?o:i)-i;return`${t.padEnd(s)}${e}`}var mn=class{constructor(t,e){this._rawInstruction=t,this._anyContinuationLinesRemoved=e.trim(),this._anyPlaceholdersExpanded=this._anyContinuationLinesRemoved}recordExpandedPlaceholders(t){this._anyPlaceholdersExpanded=t}get rawInstruction(){return this._rawInstruction}get anyContinuationLinesRemoved(){return this._anyContinuationLinesRemoved}get anyPlaceholdersExpanded(){return this._anyPlaceholdersExpanded}explainStatement(t){function e(a,o){o!==a&&(s+=` => +${t}${o}`)}let r=this._rawInstruction.trim(),i=r.split(` +`).join(` +`+t),s=`${t}${i}`;return this._rawInstruction.includes(` +`)&&(s+=` +`+t),e(r,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var Wi=class n{constructor(t,e,r,i){this._statement=new mn(t,t),this.property=e,this.comparator=n.maybeReverse(i,r)}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}static maybeReverse(t,e){return t?n.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,r,i)=>t(e,r,i)*-1}};_l();var $i=class{constructor(t,e,r,i){this._statement=new mn(t,t),this.property=e,this.grouper=r,this.reverse=i}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}};var Ke=class n{canCreateFilterForLine(t){return n.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return Ni(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=n.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createSorter(r)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new Wi(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=n.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createGrouper(r)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new $i(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var tn=class{constructor(t,e,r){this._statement=new mn(t,t),this.explanation=r,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e} +`:`${e} => +${this.explanation.asString(t+" ")} +`}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new Je(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var De=class n{constructor(t){this.object=t}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(t){return new n(Ps.fromObject(t.instruction,t))}static fromError(t,e){return new n(Ps.fromError(t,e))}};var et=class extends Ke{createFilterOrErrorMessage(t){let e=Ke.getMatch(this.filterRegExp(),t);if(e===null)return De.fromError(t,`do not understand query filter (${this.fieldName()})`);let r=e[1].toLowerCase(),i=e[2],s=null;if(r.includes("include"))s=new Jc(i);else if(r.includes("regex")){try{s=Na.validateAndConstruct(i)}catch(l){let u=As("Parsing regular expression",l)+` + +${Na.helpMessage()}`;return De.fromError(t,u)}if(s===null)return De.fromError(t,`Invalid instruction: '${t}' + +${Na.helpMessage()}`)}if(s===null)return De.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=r.match(/not/)!==null,o=new tn(t,this.getFilter(s,a),s.explanation(t));return De.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return r=>{let i=t.matches(this.value(r));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Fa=class n extends et{fieldName(){return"description"}value(t){return Me.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=n.cleanDescription(t.description),i=n.cleanDescription(e.description);return r.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Me.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,r=t.match(e);if(r!==null){let i=r[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let r=t.match(e);return r!==null&&(t=r[1]+t.replace(e,"")),t}};Ag();Pg();os();var ed=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let r of e)if(t.includes(r))return this.unexpandedDateTextMessage(r);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted. + +Possible causes: +- The query is an a template file, and is not intended to be searched. +- A command such as "Replace templates in the active file" needs to be run. +- The core "Daily notes" plugin is in use, and the template contained + date calculations that it does not support. +- Some sample template text was accidentally pasted in to a tasks query, + instead of in to a template file. + +See: https://publish.obsidian.md/tasks/Advanced/Daily+Agenda#Instruction+contains+unexpanded+template+text +`}};var td=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?De.fromFilter(new tn(t,this._filter,new Je(t))):De.fromError(t,`do not understand filter: ${t}`)}};var Sn=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new td(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let r=e.createFilterOrErrorMessage(t);if(r.isValid())return r}return De.fromError(t,`do not understand filter: ${t}`)}};var nn=class n extends Ke{constructor(t=null){super(),t!==null?this.filterInstructions=t:(this.filterInstructions=new Sn,this.filterInstructions.add(`has ${this.fieldName()} date`,e=>this.date(e)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,e=>this.date(e)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,e=>{let r=this.date(e);return r!==null&&!r.isValid()}))}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}createFilterOrErrorMessage(t){var d;let e=this.checkForUnexpandedTemplateText(t);if(e)return De.fromError(t,e);let r=this.filterInstructions.createFilterOrErrorMessage(t);if(r.isValid())return r;let i=Ke.getMatch(this.filterRegExp(),t);if(i===null)return De.fromError(t,"do not understand query filter ("+this.fieldName()+" date)");let s=i[1],a=(d=i[2])==null?void 0:d.toLowerCase(),o=i[3],l=oi.parseDateRange(o);if(!l.isValid()){let f=oi.parseDate(s);f.isValid()&&(l=new Qn(f,f))}if(!l.isValid())return De.fromError(t,"do not understand "+this.fieldName()+" date");let u=this.buildFilterFunction(a,l),c=n.buildExplanation(this.fieldNameForExplanation(),a,this.filterResultIfFieldMissing(),l);return De.fromFilter(new tn(t,u,c))}buildFilterFunction(t,e){let r;switch(t){case"before":r=i=>i?i.isBefore(e.start):this.filterResultIfFieldMissing();break;case"after":r=i=>i?i.isAfter(e.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":r=i=>i?i.isSameOrBefore(e.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":r=i=>i?i.isSameOrAfter(e.start):this.filterResultIfFieldMissing();break;default:r=i=>i?i.isSameOrAfter(e.start)&&i.isSameOrBefore(e.end):this.filterResultIfFieldMissing()}return this.getFilter(r)}getFilter(t){return e=>t(this.date(e))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(t,e,r,i){let s=e,a="YYYY-MM-DD (dddd Do MMMM YYYY)",o;switch(e){case"before":case"on or after":o=i.start.format(a);break;case"after":case"on or before":o=i.end.format(a);break;case"in or before":s="on or before",o=i.end.format(a);break;case"in or after":s="on or after",o=i.start.format(a);break;default:if(!i.start.isSame(i.end)){let u=`${t} date is between:`,c=[new Je(`${i.start.format(a)} and`),new Je(`${i.end.format(a)} inclusive`)];return r&&c.push(new Je(`OR no ${t} date`)),new Je(u,c)}s="on",o=i.start.format(a);break}let l=`${t} date is ${s} ${o}`;return r&&(l+=` OR no ${t} date`),new Je(l)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(t,e)=>Kn(this.date(t),this.date(e))}supportsGrouping(){return!0}grouper(){return t=>{let e=this.date(t);return e===null?["No "+this.fieldName()+" date"]:e.isValid()?[e.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(t){return new ed().findUnexpandedDateText(t)}};var nd=class extends nn{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var rd=class extends nn{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var La=class extends nn{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var ir=class extends Ke{constructor(){super(...arguments);this._filters=new Sn}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var id=class extends ir{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};function sd(n,t){return[["task",n],["query",t?t.query:null]]}function u1(n,t,e){let r=sd(n,e||null),i=ql(r,t);return i.error?i.error:zy(i.queryComponent,r,t)}var Wl=class{constructor(t){this.line=t,this.functionOrError=ql(sd(null,null),t)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(t,e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return Yl(this.functionOrError.queryComponent,sd(t,e||null))}evaluateOrCatch(t,e){return this.isValid()?zy(this.functionOrError.queryComponent,sd(t,e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};os();function Zy(n){if(n===null)return"null";let t=typeof n;return t==="object"?n.constructor.name:t}var ad=class extends Ke{createFilterOrErrorMessage(t){if(!en.getInstance().get())return De.fromError(t,vr.helpMessage);let e=Ke.getMatch(this.filterRegExp(),t);if(e===null)return De.fromError(t,"Unable to parse line");let r=e[1],i=new Wl(r);return i.isValid()?De.fromFilter(new tn(t,AY(i),new Je(t))):De.fromError(t,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(t){let e=Ke.getMatch(this.sorterRegExp(),t);if(e===null)return null;if(!en.getInstance().get())throw new vr;let r=!!e[1],i=e[2],s=new Wl(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,l,u)=>{try{let c=u.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(l,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${t}'`),c}};return new Wi(t,this.fieldNameSingular(),a,r)}validateTaskSortKey(t){function e(r){throw new Error(`"${r}" is not a valid sort key`)}return t===void 0&&e("undefined"),Number.isNaN(t)&&e("NaN (Not a Number)"),Array.isArray(t)&&e("array"),t}compareTaskSortKeys(t,e){let r=Zy(t),i=Zy(e),s=this.compareTaskSortKeysIfOptionalMoment(t,e,r,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(t,e);if(a!==void 0)return a;if(r!==i)throw new Error(`Unable to compare two different sort key types '${r}' and '${i}' order`);if(r==="string")return t.localeCompare(e,void 0,{numeric:!0});if(r==="TasksDate")return Kn(t.moment,e.moment);if(r==="boolean")return Number(e)-Number(t);let o=Number(t)-Number(e);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${r}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(t,e,r,i){let s=r==="Moment",a=i==="Moment";if(s&&a||s&&e===null||a&&t===null)return Kn(t,e)}compareTaskSortKeysIfEitherIsNull(t,e){if(t===null&&e===null)return 0;if(t===null&&e!==null)return-1;if(t!==null&&e===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(t){let e=Ke.getMatch(this.grouperRegExp(),t);if(e===null)return null;if(!en.getInstance().get())throw new vr;let r=!!e[1],i=e[2];return new $i(t,"function",IY(i),r)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function AY(n){return(t,e)=>{let r=e.queryContext();return PY(n,t,r)}}function PY(n,t,e){let r=n.evaluate(t,e);if(typeof r=="boolean")return r;throw Error(`filtering function must return true or false. This returned "${r}".`)}function IY(n){return(t,e)=>{let r=e.queryContext();return NY(t,n,r)}}function NY(n,t,e){try{let r=u1(n,t,e);return Array.isArray(r)?r.map(s=>s.toString()):r===null?[]:typeof r=="number"&&!Number.isInteger(r)?[r.toFixed(5)]:[r.toString()]}catch(r){let i=`Error: Failed calculating expression "${t}". The error message was: `;return r instanceof Error?[i+r.message]:[i+"Unknown error"]}}var od=class extends et{fieldName(){return"heading"}value(t){return t.precedingHeader?t.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>t.precedingHeader===null||t.precedingHeader.length===0?["(No heading)"]:[t.precedingHeader]}};var Ua=class extends et{fieldName(){return"path"}value(t){return t.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>[et.escapeMarkdownCharacters(t.path.replace(".md",""))]}};ms();var ld=class ld extends Ke{createFilterOrErrorMessage(t){var r;let e=Ke.getMatch(this.filterRegExp(),t);if(e!==null){let i=e[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return De.fromError(t,"do not understand priority");let a=t,o;switch((r=e[3])==null?void 0:r.toLowerCase()){case"above":o=l=>l.priority.localeCompare(s)<0;break;case"below":o=l=>l.priority.localeCompare(s)>0;break;case"not":o=l=>l.priority!==s;break;default:o=l=>l.priority===s,a=`${this.fieldName()} is ${i}`}return De.fromFilter(new tn(t,o,new Je(a)))}else return De.fromError(t,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return ld.priorityRegexp}supportsSorting(){return!0}comparator(){return(t,e)=>t.priority.localeCompare(e.priority)}supportsGrouping(){return!0}grouper(){return t=>[t.priorityNameGroupText]}};ld.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var qa=ld;var ud=class extends nn{fieldName(){return"scheduled"}date(t){return t.scheduledDate}filterResultIfFieldMissing(){return!1}};var cd=class extends nn{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(t){return t.startDate}filterResultIfFieldMissing(){return!0}};var dd=class extends nn{constructor(){let t=new Sn;t.add("has happens date",e=>this.dates(e).some(r=>r!==null)),t.add("no happens date",e=>!this.dates(e).some(r=>r!==null)),super(t)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(t){return this.earliestDate(t)}dates(t){return t.happensDates}earliestDate(t){return t.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(t){return e=>this.dates(e).some(r=>t(r))}};var fd=class extends ir{constructor(){super(),this._filters.add("is recurring",t=>t.recurrence!==null),this._filters.add("is not recurring",t=>t.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(t,e)=>t.recurrence!==null&&e.recurrence===null?-1:t.recurrence===null&&e.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?["Recurring"]:["Not Recurring"]}};var pd=class n extends ir{constructor(){super(),this._filters.add("done",t=>t.isDone),this._filters.add("not done",t=>!t.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=n.oldStatusName(t),i=n.oldStatusName(e);return ri?-1:0}}static oldStatusName(t){return t.isDone?"Done":"Todo"}supportsGrouping(){return!0}grouper(){return t=>[n.oldStatusName(t)]}};var md=class extends et{fieldNamePlural(){return this.fieldNameSingular()+"s"}fieldName(){return`${this.fieldNameSingular()}/${this.fieldNamePlural()}`}fieldPattern(){return`${this.fieldNameSingular()}|${this.fieldNamePlural()}`}filterOperatorPattern(){return`${super.filterOperatorPattern()}|include|do not include`}value(t){return this.values(t).join(", ")}getFilter(t,e){return r=>{let i=t.matchesAnyOf(this.values(r));return e?!i:i}}createGrouper(t){return new $i(this.grouperInstruction(t),this.fieldNamePlural(),this.grouper(),t)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNamePlural()}`;return t&&(e+=" reverse"),e}};var hd=class n extends md{constructor(){super(),this.filterInstructions=new Sn,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,t=>this.values(t).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,t=>this.values(t).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,t=>this.values(t).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,t=>this.values(t).length===0)}createFilterOrErrorMessage(t){let e=this.filterInstructions.createFilterOrErrorMessage(t);return e.isValid()?e:super.createFilterOrErrorMessage(t)}canCreateFilterForLine(t){return this.filterInstructions.canCreateFilterForLine(t)?!0:super.canCreateFilterForLine(t)}fieldNameSingular(){return"tag"}values(t){return t.tags}supportsSorting(){return!0}createSorterFromLine(t){let e=t.match(this.sorterRegExp());if(e===null)return null;let r=!!e[1],i=isNaN(+e[2])?1:+e[2],s=n.makeCompareByTagComparator(i);return new Wi(t,this.fieldNameSingular(),s,r)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return n.makeCompareByTagComparator(1)}static makeCompareByTagComparator(t){return(e,r)=>{if(e.tags.length===0&&r.tags.length===0)return 0;if(e.tags.length===0)return 1;if(r.tags.length===0)return-1;let i=t-1;if(e.tags.length=t)return 1;if(r.tags.length=t)return-1;if(e.tags.lengtht.tags.length==0?["(No tags)"]:t.tags}};var w1=$s(_1()),Fs=$s(wr());_l();function ji(n){return new RegExp("["+Ni(n)+"]").source}var lb=[["(",")"],["[","]"],["{","}"],['"','"']],jl=class n{constructor(t,e,r){this.openFilterChars=t,this.closeFilterChars=e,this.openAndCloseFilterChars=r,this.openFilter=ji(this.openFilterChars),this.closeFilter=ji(this.closeFilterChars)}static allSupportedDelimiters(){let t="",e="",r="";for(let[i,s]of lb)t+=i,e+=s,r+=n.openAndClosing(i,s);return new n(t,e,r)}static fromInstructionLine(t){let e=t.trim(),i=/^[A-Z ]*\s*(.*)/.exec(e);if(i){let a=i[1],o=a[0],l=a.slice(-1);for(let[u,c]of lb)if(o===u&&l===c){let d=this.openAndClosing(u,c);return new n(u,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+lb.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(t,e){let r=t;return e!=t&&(r+=e),r}};var vd=class n{static preprocessExpression(t,e){let r=n.splitLine(t,e);return n.getFiltersAndSimplifiedLine(r,e)}static splitLine(t,e){let r=new RegExp("("+e.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+e.openFilter+")"),i=t.split(r),s=new RegExp("(NOT\\s*"+e.openFilter+")"),a=i.flatMap(u=>u.split(s)).filter(u=>u!==""),o=new RegExp("(^"+ji(e.openFilterChars+" ")+"*)"),l=new RegExp("("+ji(e.closeFilterChars+" ")+"*$)");return a.flatMap(u=>u.split(o)).flatMap(u=>u.split(l)).filter(u=>u!=="")}static getFiltersAndSimplifiedLine(t,e){let r="",i=1,s={};t.forEach(u=>{if(!n.isAFilter(u,e))r+=`${u}`;else{let c=`f${i}`;s[c]=u,r+=c,i++}});let a=new RegExp(`(${e.closeFilter})([A-Z])`,"g");r=r.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${e.openFilter})`,"g");r=r.replace(o,"$1 $2");let l=e.openFilterChars;if(l!='"'&&l!="("){let u=new RegExp(ji(l),"g");r=r.replace(u,"(");let c=e.closeFilterChars,d=new RegExp(ji(c),"g");r=r.replace(d,")")}return{simplifiedLine:r,filters:s}}static isAFilter(t,e){let r=new RegExp("^"+ji(" "+e.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+e.closeFilter+" *(AND|OR|XOR) *"+e.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+e.openFilter+"$"),a=new RegExp("^"+e.closeFilter+" *(AND|OR|XOR)$");return![r,i,s,a,/^(AND|OR|XOR|NOT)$/].some(l=>RegExp(l).exec(t))}};var kd=class extends Ke{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let e=jl.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+e.openFilter+".*|"+e.openFilter+".+"+e.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(e){return this.parseLine(e)}fieldName(){return"boolean query"}parseLine(e){if(e.length===0)return De.fromError(e,"empty line");let r;try{r=jl.fromInstructionLine(e)}catch(o){let l=o instanceof Error?o.message:"unknown error type";return De.fromError(e,this.helpMessageFromSimpleError(e,l))}let i=vd.preprocessExpression(e,r),s=i.simplifiedLine,a=i.filters;try{let o=(0,w1.parse)(s);for(let c of o)if(c.name===Fs.Tokens.IDENTIFIER&&c.value){let d=c.value.trim(),f=a[d];if(c.value=f,!(f in this.subFields)){let p=Hl(f);if(p===null)return this.helpMessage(e,`couldn't parse sub-expression '${f}'`,i);if(p.error)return this.helpMessage(e,`couldn't parse sub-expression '${f}': ${p.error}`,i);p.filter&&(this.subFields[f]=p.filter)}}else if(c.name===Fs.Tokens.OPERATOR){if(c.value==null)return this.helpMessage(e,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(e,`unknown boolean operator '${c.value}'`,i)}let l=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),u=this.constructExplanation(o);return De.fromFilter(new tn(e,l,u))}catch(o){let l=o instanceof Error?o.message:"unknown error type";return this.helpMessage(e,`malformed boolean query -- ${l} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(e,r,i){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of r)if(l.name===Fs.Tokens.IDENTIFIER){if(l.value==null)throw Error("null token value");let c=this.subFields[l.value.trim()].filterFunction(e,i);o.push(a(c))}else if(l.name===Fs.Tokens.OPERATOR)if(l.value==="NOT"){let u=s(o.pop());o.push(a(!u))}else if(l.value==="OR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u||c))}else if(l.value==="AND"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&c))}else if(l.value==="XOR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&!c||!u&&c))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(e){let r=[];for(let i of e)if(i.name===Fs.Tokens.IDENTIFIER)this.explainExpression(i,r);else if(i.name===Fs.Tokens.OPERATOR)this.explainOperator(i,r);else throw Error("Unsupported token type: "+i.name);return r[0]}explainExpression(e,r){if(e.value==null)throw Error("null token value");let i=this.subFields[e.value.trim()],s=this.simulateExplainFilter(i);r.push(s)}simulateExplainFilter(e){return e.simulateExplainFilter()}explainOperator(e,r){if(e.value==="NOT"){let i=r.pop();r.push(Je.booleanNot([i]))}else if(e.value==="OR"){let i=r.pop(),s=r.pop();r.push(Je.booleanOr([s,i]))}else if(e.value==="AND"){let i=r.pop(),s=r.pop();r.push(Je.booleanAnd([s,i]))}else if(e.value==="XOR"){let i=r.pop(),s=r.pop();r.push(Je.booleanXor([s,i]))}else throw Error("Unsupported operator: "+e.value)}helpMessage(e,r,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),l=`${this.helpMessageFromSimpleError(e,r)} + +The instruction was converted to the following simplified line: + ${i.simplifiedLine} + +Where the sub-expressions in the simplified line are: +${a} + +For help, see: + https://publish.obsidian.md/tasks/Queries/Combining+Filters +`;return De.fromError(e,l)}stringifySubExpressionsForErrorMessage(e){return Object.entries(e).map(([r,i])=>` '${r}': '${i}' + => ${this.stringifySubExpressionStatus(i)}`).join(` +`)}stringifySubExpressionStatus(e){let r=Hl(e);return r?r.error?`ERROR: + ${r.error.split(` +`).map(s=>s.trim()).join(` + `)}`:"OK":`ERROR: + do not understand query`}helpMessageFromSimpleError(e,r){return`Could not interpret the following instruction as a Boolean combination: + ${e} + +The error message is: + ${r}`}};var _d=class extends et{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var Va=class extends Ke{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return De.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var wd=class extends et{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};In();var za=class n extends Ke{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return Ke.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=Ke.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let r=e[1].toLowerCase(),i=e[2],s=Vt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(r){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return De.fromFilter(new tn(t,a,new Je(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(Vt).filter(i=>i!=="EMPTY").join(" "),r=`Invalid ${this.fieldNameSingular()} instruction: '${t}'. + Allowed options: 'is' and 'is not' (without quotes). + Allowed values: ${e} + Note: values are case-insensitive, + so 'in_progress' works too, for example. + Example: ${this.fieldNameSingular()} is not NON_TASK`;return De.fromError(t,r)}fieldName(){return"status.type"}value(t){return t.status.type}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=n.groupName(t),i=n.groupName(e);return r.localeCompare(i,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return t=>[n.groupName(t)]}static groupName(t){return t.status.typeGroupText}};var Sd=class extends et{fieldName(){return"recurrence"}value(t){return t.recurrence!==null?t.recurrence.toText():""}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?[t.recurrence.toText()]:["None"]}};var Dd=class extends et{fieldName(){return"folder"}value(t){return t.file.folder}supportsGrouping(){return!0}grouper(){return t=>[et.escapeMarkdownCharacters(this.value(t))]}};var Ed=class extends et{fieldName(){return"root"}value(t){return t.file.root}supportsGrouping(){return!0}grouper(){return t=>[et.escapeMarkdownCharacters(this.value(t))]}};var xd=class extends et{fieldName(){return"backlink"}value(t){let e=t.getLinkText({isFilenameUnique:!0});return e===null?"Unknown Location":e}createFilterOrErrorMessage(t){return De.fromError(t,"backlink field does not support filtering")}canCreateFilterForLine(t){return!1}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;if(e===null)return["Unknown Location"];let r=t.precedingHeader;return r===null?["[["+e+"]]"]:[`[[${e}#${r}|${e} > ${r}]]`]}}};var Od=class extends nn{fieldName(){return"cancelled"}date(t){return t.cancelledDate}filterResultIfFieldMissing(){return!1}};var Rd=class extends ir{constructor(){super(),this._filters.add("is blocking",(t,e)=>t.isBlocking(e.allTasks)),this._filters.add("is not blocking",(t,e)=>!t.isBlocking(e.allTasks)),this._filters.add("is blocked",(t,e)=>t.isBlocked(e.allTasks)),this._filters.add("is not blocked",(t,e)=>!t.isBlocked(e.allTasks))}fieldName(){return"blocking"}};var Cd=class extends et{constructor(){super();this.filterInstructions=new Sn;this.filterInstructions.add("has id",e=>e.id.length>0),this.filterInstructions.add("no id",e=>e.id.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:super.createFilterOrErrorMessage(e)}fieldName(){return"id"}value(e){return e.id}supportsSorting(){return!0}supportsGrouping(){return!0}};var Md=class extends Ke{constructor(){super();this.filterInstructions=new Sn;this.filterInstructions.add("has depends on",e=>e.dependsOn.length>0),this.filterInstructions.add("no depends on",e=>e.dependsOn.length===0)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:De.fromError(e,"Unknown instruction")}fieldName(){return"blocked by"}filterRegExp(){return null}};var Ad=class extends ir{fieldName(){return"random"}supportsSorting(){return!0}comparator(){return(t,e)=>this.sortKey(t)-this.sortKey(e)}sortKey(t){let e=i=>{let s=0,a=9;for(;s>>9},r=window.moment().format("Y-MM-DD");return e(r+" "+t.description)}};var ub=[()=>new wd,()=>new za,()=>new pd,()=>new fd,()=>new qa,()=>new dd,()=>new Od,()=>new nd,()=>new cd,()=>new ud,()=>new La,()=>new rd,()=>new Ua,()=>new Dd,()=>new Ed,()=>new xd,()=>new Fa,()=>new hd,()=>new od,()=>new id,()=>new _d,()=>new Va,()=>new Sd,()=>new ad,()=>new Cd,()=>new Md,()=>new Rd,()=>new Ad,()=>new kd];function Hl(n){for(let t of ub){let e=t();if(e.canCreateFilterForLine(n))return e.createFilterOrErrorMessage(n)}return null}function S1(n){let t=/^sort by /i;if(n.match(t)===null)return null;for(let e of ub){let i=e().createSorterFromLine(n);if(i)return i}return null}function D1(n){let t=/^group by /i;if(n.match(t)===null)return null;for(let e of ub){let i=e().createGrouperFromLine(n);if(i)return i}return null}var Pd=class{constructor(t,e,r){this.nestingLevel=t,this.displayName=e,this.property=r}};var Id=class{constructor(t,e){this.lastHeadingAtLevel=new Array;this.groupers=e;let i=t.keys().next().value.length;for(let s=0;se.set(o,a)),t.pop();return e}};var Fd=class extends Nd{},Ld=class{constructor(t,e,r){this.root=new Fd(e),this.buildGroupingTree(t,r)}buildGroupingTree(t,e){let r=[this.root];for(let i of t){let s=[];for(let a of r)for(let o of a.values){let l=i.grouper(o,e);l.length===0&&l.push("");for(let u of l){let c=a.children.get(u);c===void 0&&(c=new Fd([]),a.children.set(u,c),s.push(c)),c.values.push(o)}}r=s}}generateTaskTreeStorage(){return this.root.generateAllPaths()}};var Ud=class{constructor(t,e){this.groups=t,this.groupHeadings=[],this.tasks=e}setGroupHeadings(t){for(let e of t)this.groupHeadings.push(e)}applyTaskLimit(t){this.tasks=this.tasks.slice(0,t)}tasksAsStringOfLines(){let t="";for(let e of this.tasks)t+=e.toFileLineString()+` +`;return t}toString(){let t=` +`;for(let e of this.groupHeadings){let r="#".repeat(Math.min(4+e.nestingLevel,6));t+=`${r} ${e.displayName} + +`}return t+=this.tasksAsStringOfLines(),t}};var Ls=class{constructor(t,e,r){this._groups=new Array;this._totalTaskCount=0;this._totalTaskCount=e.length,this._groupers=t;let s=new Ld(t,e,r).generateTaskTreeStorage();this.addTaskGroups(s),this.sortTaskGroups(),this.setGroupsHeadings(s)}get groupers(){return this._groupers}get groups(){return this._groups}totalTasksCount(){return this._totalTaskCount}toString(){let t="";for(let e of this.groups)t+=e.toString();return t}addTaskGroups(t){for(let[e,r]of t){let i=new Ud(e,r);this.addTaskGroup(i)}}addTaskGroup(t){this._groups.push(t)}sortTaskGroups(){let t=(e,r)=>{let i=e.groups,s=r.groups;for(let a=0;a{e.applyTaskLimit(t)}),this.recalculateTotalTaskCount())}recalculateTotalTaskCount(){let t=[];this._groups.forEach(r=>{t=[...t,...r.tasks]});let e=[...new Set(t)];this._totalTaskCount=e.length}};var Us=class n{constructor(t,e){this.tasksFile=t,this.allTasks=[...e],this._queryContext=this.tasksFile?Xy(this.tasksFile,this.allTasks):void 0}static fromAllTasks(t){return new n(void 0,t)}get queryPath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}queryContext(){return this._queryContext}};function E1(n){return`task${n!==1?"s":""}`}var Bl=class n{constructor(t,e,r){this.totalTasksCountBeforeLimit=0;this._searchErrorMessage=void 0;this.taskGroups=t,this.totalTasksCountBeforeLimit=e,this._tasksFile=r}get searchErrorMessage(){return this._searchErrorMessage}set searchErrorMessage(t){this._searchErrorMessage=t}get totalTasksCount(){return this.taskGroups.totalTasksCount()}totalTasksCountDisplayText(){let t=this.totalTasksCount,e=this.totalTasksCountBeforeLimit;return t===e?`${t} ${E1(t)}`:`${t} of ${e} ${E1(e)}`}get groups(){return this.taskGroups.groups}static fromError(t){let e=new n(new Ls([],[],Us.fromAllTasks([])),0,void 0);return e._searchErrorMessage=t,e}asMarkdown(){let t="";return t+=this.taskGroups.groups.map(e=>this.toString(e)).join(""),t}toString(t){let e=` +`;for(let r of t.groupHeadings){let i="#".repeat(Math.min(4+r.nestingLevel,6));e+=`${i} ${r.displayName} + +`}return e+=this.tasksAsStringOfLines(t.tasks),e}tasksAsStringOfLines(t){let e="";for(let r of t)e+=this.toFileLineString(r)+` +`;return e}toFileLineString(t){return`- [${t.status.symbol}] ${t.toString()}`}applyFilter(t){if(this._searchErrorMessage)return n.fromError(this._searchErrorMessage);let e=this.taskGroups.groups.flatMap(a=>a.tasks),r=new Us(this._tasksFile,e),i=a=>t.filterFunction(a,r),s=[...new Set(e.filter(i))];return new n(new Ls(this.taskGroups.groupers,s,r),this.totalTasksCountBeforeLimit,this._tasksFile)}};function x1(n){return n.endsWith("\\")}function O1(n){return n.endsWith("\\\\")}function uW(n){return n.replace(/^[ \t]*/,"")}function cW(n){return n.replace(/[ \t]*\\$/,"")}function dW(n,t){let e=n;return t&&(e=uW(n)),O1(e)?e=e.slice(0,-1):x1(n)&&(e=cW(e)),e}function qd(n){let t=[],e=!1,r="",i="",s=n+` +`;for(let a of s.split(` +`)){let o=dW(a,e);e?(r+=` +`+a,i+=" "+o):(r=a,i=o),O1(a)?e=!1:e=x1(a),e||(i.trim()!==""&&t.push(new mn(r,i)),r="",i="")}return t}function R1(n){return qd(n).map(t=>t.anyContinuationLinesRemoved)}var Yd=class n{static by(t,e,r){let i=this.defaultSorters().map(a=>a.comparator),s=[];for(let a of t)s.push(a.comparator);return e.sort(n.makeCompositeComparator([...s,...i],r))}static defaultSorters(){return[new za().createNormalSorter(),new Va().createNormalSorter(),new La().createNormalSorter(),new qa().createNormalSorter(),new Ua().createNormalSorter()]}static makeCompositeComparator(t,e){return(r,i)=>{for(let s of t){let a=s(r,i,e);if(a!==0)return a}return 0}}};var C1=0,Sr=class n{constructor(t,e=void 0){this.statements=[];this._limit=void 0;this._taskGroupLimit=void 0;this._taskLayoutOptions=new Lr;this._queryLayoutOptions=new Yi;this.layoutStatements=[];this._filters=[];this._error=void 0;this._sorting=[];this._grouping=[];this._ignoreGlobalQuery=!1;this.hideOptionsRegexp=/^(hide|show) +(.*)/i;this.shortModeRegexp=/^short/i;this.fullModeRegexp=/^full/i;this.explainQueryRegexp=/^explain/i;this.ignoreGlobalQueryRegexp=/^ignore global query/i;this.logger=fn.getLogger("tasks.Query");this.limitRegexp=/^limit (groups )?(to )?(\d+)( tasks?)?/i;this.commentRegexp=/^#.*/;this.presetRegexp=/^preset +(.*)/i;this._queryId=this.generateQueryId(10),this.source=t,this.tasksFile=e;let r=qd(t);for(let i of r){let s=this.expandPlaceholders(i,e);if(this.error!==void 0)return;this.statements.push(...s)}for(let i of this.statements)try{if(this.parseLine(i),this.error!==void 0)return}catch(s){let a;s instanceof Error?a=s.message:a="Unknown error",this.setError(a,i);return}}removeIllegalGlobalQueryInstructions(){this._ignoreGlobalQuery=!1}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}get queryId(){return this._queryId}parseLine(t){let e=t.anyPlaceholdersExpanded;switch(!0){case this.presetRegexp.test(e):this.parsePreset(e,t);break;case this.shortModeRegexp.test(e):this._queryLayoutOptions.shortMode=!0,this.saveLayoutStatement(t);break;case this.fullModeRegexp.test(e):this._queryLayoutOptions.shortMode=!1,this.saveLayoutStatement(t);break;case this.explainQueryRegexp.test(e):this._queryLayoutOptions.explainQuery=!0;break;case this.ignoreGlobalQueryRegexp.test(e):this._ignoreGlobalQuery=!0;break;case this.limitRegexp.test(e):this.parseLimit(e);break;case this.parseSortBy(e,t):break;case this.parseGroupBy(e,t):break;case this.hideOptionsRegexp.test(e):this.parseHideOptions(t);break;case this.commentRegexp.test(e):break;case this.parseFilter(e,t):break;default:this.setError("do not understand query",t)}}formatQueryForLogging(){return` +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +${this.source} +<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +`}expandPlaceholders(t,e){let r=t.anyContinuationLinesRemoved;if(r.includes("{{")&&r.includes("}}")&&this.tasksFile===void 0)return this._error=`The query looks like it contains a placeholder, with "{{" and "}}" +but no file path has been supplied, so cannot expand placeholder values. +The query is: +${r}`,[t];if(this.commentRegexp.test(r))return[t];let s=r;if(e){let a=Ky(e),o="";try{let u=0;for(;s!==o&&u<10;)o=s,s=Qy(o,a),u++;s!==r&&(s=qd(s).map(c=>c.anyContinuationLinesRemoved).join(` +`))}catch(l){return l instanceof Error?this._error=l.message:this._error="Internal error. expandPlaceholders() threw something other than Error.",[t]}}return this.createStatementsFromExpandedPlaceholders(s,t)}createStatementsFromExpandedPlaceholders(t,e){let r=t.split(` +`).map(i=>i.trim()).filter(i=>i.length>0);return r.length===1?(e.recordExpandedPlaceholders(r[0]),[e]):r.map((i,s)=>{let a=`: statement ${s+1} after expansion of placeholder`,o=new mn(e.rawInstruction+a,e.anyContinuationLinesRemoved+a);return o.recordExpandedPlaceholders(i),o})}append(t){return this.source===""?t:t.source===""?this:new n(`${this.source} +${t.source}`,this.tasksFile)}explainQuery(){return new Pa().explainQuery(this)}get limit(){return this._limit}get taskGroupLimit(){return this._taskGroupLimit}get taskLayoutOptions(){return this._taskLayoutOptions}get queryLayoutOptions(){return this._queryLayoutOptions}get filters(){return this._filters}addFilter(t){this._filters.push(t)}get sorting(){return this._sorting}get grouping(){return this._grouping}get error(){return this._error}setError(t,e){this._error=n.generateErrorMessage(e,t)}static generateErrorMessage(t,e){return t.allLinesIdentical()?`${e} +Problem line: "${t.rawInstruction}"`:`${e} +Problem statement: +${t.explainStatement(" ")} +`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`[search] Executing query: ${this.formatQueryForLogging()}`);let e=new Us(this.tasksFile,t),r;try{this.filters.forEach(l=>{r=l.statement,t=t.filter(u=>l.filterFunction(u,e))}),r=void 0;let{debugSettings:i}=J(),s=i.ignoreSortInstructions?t:Yd.by(this.sorting,t,e),a=s.slice(0,this.limit),o=new Ls(this.grouping,a,e);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new Bl(o,s.length,this.tasksFile)}catch(i){let a=As("Search failed",i);return r&&(a=n.generateErrorMessage(r,a)),Bl.fromError(a)}}parseHideOptions(t){let e=t.anyPlaceholdersExpanded,r=e.match(this.hideOptionsRegexp);if(r===null)return;let i=r[1].toLowerCase()==="hide",s=r[2].toLowerCase();if(KE(this._queryLayoutOptions,s,i)){this.saveLayoutStatement(t);return}if($S(this._taskLayoutOptions,s,!i)){this.saveLayoutStatement(t);return}this.setError("do not understand hide/show option",new mn(e,e))}saveLayoutStatement(t){this.layoutStatements.push(t)}parseFilter(t,e){var i;let r=Hl(t);return r!=null?(r.filter?(r.filter.setStatement(e),this._filters.push(r.filter)):this.setError((i=r.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new mn(t,t));return}let r=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=r:this._limit=r}parseSortBy(t,e){let r=null;try{r=S1(t)}catch(i){let s=i instanceof Error?i.message:"Unknown error";return this.setError(s,e),!0}return r?(r.setStatement(e),this._sorting.push(r),!0):!1}parseGroupBy(t,e){let r;try{r=D1(t)}catch(i){let s=i instanceof Error?i.message:"Unknown error";return this.setError(s,e),!0}return r?(r.setStatement(e),this._grouping.push(r),!0):!1}parsePreset(t,e){let r=this.presetRegexp.exec(t);if(r){let i=r[1].trim(),{presets:s}=J(),a=s[i];if(!a){this.setError(nD(i,s),e);return}let o=R1(a);for(let l of o){let u=new mn(e.rawInstruction,e.anyContinuationLinesRemoved);if(u.recordExpandedPlaceholders(l),l.includes("{{")&&l.includes("}}")&&this.tasksFile){let c=Ky(this.tasksFile),d=Qy(l,c);u.recordExpandedPlaceholders(d)}this.parseLine(u)}}}generateQueryId(t){return C1+=1,C1.toString().padStart(t,"0")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}warn(t,e){this.logger.warnWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var cb=[{name:"TQ_show_toolbar",type:"checkbox",display:"toolbar",handler:"showAndHide"},{name:"TQ_explain",type:"checkbox",handler:"instruction",trueValue:"explain",falseValue:""},{name:"TQ_short_mode",type:"checkbox",handler:"instruction",trueValue:"short mode",falseValue:"full mode"},{name:"TQ_show_tree",type:"checkbox",display:"tree",handler:"showAndHide"},{name:"TQ_show_tags",type:"checkbox",display:"tags",handler:"showAndHide"},{name:"TQ_show_id",type:"checkbox",display:"id",handler:"showAndHide"},{name:"TQ_show_depends_on",type:"checkbox",display:"depends on",handler:"showAndHide"},{name:"TQ_show_priority",type:"checkbox",display:"priority",handler:"showAndHide"},{name:"TQ_show_recurrence_rule",type:"checkbox",display:"recurrence rule",handler:"showAndHide"},{name:"TQ_show_on_completion",type:"checkbox",display:"on completion",handler:"showAndHide"},{name:"TQ_show_created_date",type:"checkbox",display:"created date",handler:"showAndHide"},{name:"TQ_show_start_date",type:"checkbox",display:"start date",handler:"showAndHide"},{name:"TQ_show_scheduled_date",type:"checkbox",display:"scheduled date",handler:"showAndHide"},{name:"TQ_show_due_date",type:"checkbox",display:"due date",handler:"showAndHide"},{name:"TQ_show_cancelled_date",type:"checkbox",display:"cancelled date",handler:"showAndHide"},{name:"TQ_show_done_date",type:"checkbox",display:"done date",handler:"showAndHide"},{name:"TQ_show_urgency",type:"checkbox",display:"urgency",handler:"showAndHide"},{name:"TQ_show_backlink",type:"checkbox",display:"backlink",handler:"showAndHide"},{name:"TQ_show_edit_button",type:"checkbox",display:"edit button",handler:"showAndHide"},{name:"TQ_show_postpone_button",type:"checkbox",display:"postpone button",handler:"showAndHide"},{name:"TQ_show_task_count",type:"checkbox",display:"task count",handler:"showAndHide"},{name:"TQ_extra_instructions",type:"text",handler:"addValue"}],ki=class{source(t){return t?cb.map(r=>this.generateInstruction(t,r)).filter(r=>r!=="").join(` +`):""}generateInstruction(t,e){let r=t.hasProperty(e.name),i=t.property(e.name);switch(e.handler){case"instruction":return r&&(i?e.trueValue:e.falseValue)||"";case"showAndHide":return r&&(i?"show "+e.display:"hide "+e.display)||"";case"addValue":return r&&typeof i=="string"?i:""}}query(t){return new Sr(this.source(t),t)}allPropertyNames(){return cb.map(t=>t.name)}allPropertyNamesSorted(){return this.allPropertyNames().sort((t,e)=>t.localeCompare(e))}propertyType(t){var e,r;return(r=(e=cb.find(i=>i.name===t))==null?void 0:e.type)!=null?r:void 0}metaBindPluginWidgets(){return"\ntoolbar: `INPUT[toggle:TQ_show_toolbar]`\nshort mode: `INPUT[toggle:TQ_short_mode]`\ntree: `INPUT[toggle:TQ_show_tree]`\ntags: `INPUT[toggle:TQ_show_tags]`\nid: `INPUT[toggle:TQ_show_id]` depends on: `INPUT[toggle:TQ_show_depends_on]`\npriority: `INPUT[toggle:TQ_show_priority]`\nrecurrence rule: `INPUT[toggle:TQ_show_recurrence_rule]` on completion: `INPUT[toggle:TQ_show_on_completion]`\nstart date: `INPUT[toggle:TQ_show_start_date]` scheduled date: `INPUT[toggle:TQ_show_scheduled_date]` due date: `INPUT[toggle:TQ_show_due_date]`\ncreated date: `INPUT[toggle:TQ_show_created_date]` cancelled date: `INPUT[toggle:TQ_show_cancelled_date]` done date: `INPUT[toggle:TQ_show_done_date]`\nurgency: `INPUT[toggle:TQ_show_urgency]`\nbacklink: `INPUT[toggle:TQ_show_backlink]`\nedit button: `INPUT[toggle:TQ_show_edit_button]` postpone button: `INPUT[toggle:TQ_show_postpone_button]`\ntask count: `INPUT[toggle:TQ_show_task_count]`\nextra instructions: `INPUT[textArea:TQ_extra_instructions]`\nexplain: `INPUT[toggle:TQ_explain]`\n"}};function M1(n,t){return A(this,null,function*(){yield n.fileManager.processFrontMatter(t,e=>{let r=new ki().allPropertyNamesSorted(),i=!1;r.forEach(s=>{s in e||(e[s]=null,i=!0)}),i?new db.Notice("Properties updated successfully."):new db.Notice("All supported properties are already present.")})})}var A1=require("obsidian");At();yr();ya();var fb=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function Wd(n){let t=[],e=new wt().coreStatuses.map(r=>r.symbol);for(let r of[!0,!1])for(let i of n.registeredStatuses)e.includes(i.symbol)===r&&t.push(new fb(i));return t}var fW=(n,t,e)=>{let r=ke.fromLine({line:n,taskLocation:Qt.fromUnknownPosition(new ft(t)),fallbackDate:null});if(r!==null){let i=r.handleNewStatusWithRecurrenceInUsersOrder(e).map(a=>a.toFileLineString()),s=i.length>0?i.length-1:0;return{text:i.join(` +`),moveTo:{line:s}}}},pW=n=>(t,e)=>{let r=fW(t,e,n);return r===void 0&&new A1.Notice("Cannot set status: line is not a task or does not match global filter"),r};function P1(n){let t=Wd(n),e=[];for(let r of t){let i=r.newStatus,a={id:`set-status-symbol-to-${i.symbol===" "?"space":i.symbol}`,name:r.instructionDisplayName(),editorCheckCallback:Zc(pW(i))};e.push(a)}return e}var $d=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(r,i,s)=>VE(r,i,s,this.app,this.plugin.getTasks(),()=>A(this,null,function*(){return yield this.plugin.saveSettings()}))}),t.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:QE}),t.addCommand({id:"add-query-file-defaults-properties",name:"Add all Query File Defaults properties",icon:"settings",checkCallback:r=>{let i=this.app.workspace.getActiveFile();return!i||i.extension!=="md"?!1:(r||this.ensureQueryFileDefaultsFrontmatter(i).catch(console.error),!0)}});let e=P1(Ze.getInstance());for(let r of e)t.addCommand(r)}ensureQueryFileDefaultsFrontmatter(t){return A(this,null,function*(){let{app:e}=this;yield M1(e,t)})}};var Gr=class Gr{constructor(t=Gr.empty){this._source=t}static getInstance(){return Gr.instance||(Gr.instance=new Gr),Gr.instance}set(t){this._source=t}reset(){this._source=Gr.empty}query(t=void 0){let e=new Sr(this._source,t);return e.removeIllegalGlobalQueryInstructions(),e}hasInstructions(){return this._source.trim()!==Gr.empty}};Gr.empty="";var or=Gr;vs();var jd=class{constructor({obsidianEvents:t}){this.logger=fn.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}onReloadOpenSearchResults(t){return this.logger.debug("TasksEvents.onReloadOpenSearchResults()"),this.obsidianEvents.on("obsidian-tasks-plugin:reload-open-search-results",t)}triggerReloadOpenSearchResults(){this.logger.debug("TasksEvents.triggerReloadOpenSearchResults()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:reload-open-search-results")}onReloadVault(t){return this.logger.debug("TasksEvents.onReloadVault()"),this.obsidianEvents.on("obsidian-tasks-plugin:reload-vault",t)}triggerReloadVault(){this.logger.debug("TasksEvents.triggerReloadVault()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:reload-vault")}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var rx=require("obsidian");dn();ps();At();var nx=require("obsidian");dn();yt();At();Fi();Mc();function I1(n){for(let e of ke.allDateFields()){let r=n[e];if(r&&!r.isValid())return!1}let t=n.happensDates.some(e=>!!(e!=null&&e.isValid()));return!n.isDone&&t}function Qa(n){return n.dueDate?"dueDate":n.scheduledDate?"scheduledDate":n.startDate?"startDate":null}function pb(n,t,e,r){let i=n[t];return L1(i,n,t,e,r)}function N1(n,t,e,r){let i=window.moment();return L1(i,n,t,e,r)}function F1(n,t,e,r){return U1(n,t,null)}function L1(n,t,e,r,i){let s=new qt(n).postpone(r,i);return U1(t,e,s)}function U1(n,t,e){let r=Yt.removeInferredStatusIfNeeded(n,[new ke(pe(U({},n),{[t]:e}))])[0];return{postponedDate:e,postponedTask:r}}function q1(n,t){if(n){let e=n==null?void 0:n.format("DD MMM YYYY");return`Task's ${t} changed to ${e}`}else return`Task's ${t} removed`}function Y1(n,t,e){return`\u2139\uFE0F ${mb(n,t,e)} (right-click for more options)`}function mb(n,t,e){let r=Qa(n),i=n[r];return Ka(r,i,t,e)}function W1(n,t,e){let r=Qa(n),i=window.moment().startOf("day");return Ka(r,i,t,e)}function $1(n,t,e){let r=Qa(n);return hb(r,n)}function hb(n,t){return n==="scheduledDate"&&t.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${Hd(n)}`}function mW(n){return Da(n.replace("Date",""))}function Hd(n){return n.replace("Date"," date")}function Ka(n,t,e,r){let s=new qt(t).postpone(r,e).format("ddd Do MMM"),a=e!=1?Math.abs(e):"a";if(t.isSameOrBefore(window.moment(),"day")){let l=mW(n);return(e>=0?`${l} in ${a} ${r}, on ${s}`:`${l} ${a} ${r} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=Hd(n);return e>=0?`Postpone ${o} by ${a} ${r}, to ${s}`:`Backdate ${o} by ${a} ${r}, to ${s}`}ps();br();At();Xr();function j1(n){return["startDate","scheduledDate","dueDate"].includes(n)}At();Mc();var Xa=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return"---"}isCheckedForTask(t){return!1}};var Hi=class{constructor(t,e,r){this.newDate=e,this.dateFieldToEdit=t,this.displayName=r!=null?r:`Set Date: ${this.newDate.toDateString()}`}apply(t){return this.isCheckedForTask(t)?[t]:[new ke(pe(U({},t),{[this.dateFieldToEdit]:window.moment(this.newDate)}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){var e;return((e=t[this.dateFieldToEdit])==null?void 0:e.isSame(window.moment(this.newDate)))||!1}},Dr=class extends Hi{constructor(t,e,r,i){var l;let s=(l=e[t])!=null?l:window.moment(),a=Ka(t,s,r,i),o=new qt(window.moment(s)).postpone(i,r).toDate();super(t,o,a)}},Gl=class{constructor(t,e){this.dateFieldToEdit=t,this.displayName=hb(t,e)}apply(t){let e=this.dateFieldToEdit==="scheduledDate"&&t.scheduledDateIsInferred;return t[this.dateFieldToEdit]===null||e?[t]:[new ke(pe(U({},t),{[this.dateFieldToEdit]:null}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){return!1}};function H1(n,t){return G1(t,n,1)}function B1(n,t){return G1(t,n,-1)}function G1(n,t,e){let r=window.moment().startOf("day"),i=r.toDate(),s=new qt(r.clone());return[new Hi(t,i,Ka(t,r,0,"days")),new Hi(t,s.postpone("day",e).toDate(),Ka(t,r,e,"day")),new Xa,new Dr(t,n,e*2,"days"),new Dr(t,n,e*3,"days"),new Dr(t,n,e*4,"days"),new Dr(t,n,e*5,"days"),new Dr(t,n,e*6,"days"),new Xa,new Dr(t,n,e,"week"),new Dr(t,n,e*2,"weeks"),new Dr(t,n,e*3,"weeks"),new Dr(t,n,e,"month"),new Xa,new Gl(t,n)]}var V1=require("obsidian");function Vr(n,t){return A(this,null,function*(){yield qn({originalTask:n,newTasks:t})})}function Vl(n,t){n.preventDefault(),n.stopPropagation(),t.showAtPosition({x:n.clientX,y:n.clientY})}var Bi=class extends V1.Menu{constructor(t){super(),this.taskSaver=t}addItemsForInstructions(t,e){for(let r of t)this.addItemForInstruction(e,r)}addItemForInstruction(t,e){e.instructionDisplayName()==="---"?this.addSeparator():this.addItem(r=>this.getMenuItemCallback(t,r,e))}getMenuItemCallback(t,e,r){e.setTitle(r.instructionDisplayName()).setChecked(r.isCheckedForTask(t)).onClick(()=>A(this,null,function*(){let i=r.apply(t);(i.length!==1||!Object.is(i[0],t))&&(yield this.taskSaver(t,i))}))}};var Bd=class extends Bi{constructor(t,e,r=Vr){super(r);let i=j1(t)?H1(t,e):B1(t,e);this.addItemsForInstructions(i,e)}};var Gd=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Gi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console!="undefined"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var Vd={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},zd=Vd;var an=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},Dn=function(n){return n===!0?1:0};function gb(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var Qd=function(n){return n instanceof Array?n:[n]};function on(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function Be(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function zl(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function yb(n,t){if(t(n))return n;if(n.parentNode)return yb(n.parentNode,t)}function Ql(n,t){var e=Be("div","numInputWrapper"),r=Be("input","numInput "+n),i=Be("span","arrowUp"),s=Be("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(s),e}function En(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch(e){return n.target}}var bb=function(){},Kl=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},z1={D:bb,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*Dn(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:bb,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:bb,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},_i={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Za={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[Za.w(n,t,e)]},F:function(n,t,e){return Kl(Za.n(n,t,e)-1,!1,t)},G:function(n,t,e){return an(Za.h(n,t,e))},H:function(n){return an(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[Dn(n.getHours()>11)]},M:function(n,t){return Kl(n.getMonth(),!0,t)},S:function(n){return an(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return an(n.getFullYear(),4)},d:function(n){return an(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return an(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return an(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var Tb=function(n){var t=n.config,e=t===void 0?Gi:t,r=n.l10n,i=r===void 0?Vd:r,s=n.isMobile,a=s===void 0?!1:s;return function(o,l,u){var c=u||i;return e.formatDate!==void 0&&!a?e.formatDate(o,l,c):l.split("").map(function(d,f,p){return Za[d]&&p[f-1]!=="\\"?Za[d](o,c,e):d!=="\\"?d:""}).join("")}},Kd=function(n){var t=n.config,e=t===void 0?Gi:t,r=n.l10n,i=r===void 0?Vd:r;return function(s,a,o,l){if(!(s!==0&&!s)){var u=l||i,c,d=s;if(s instanceof Date)c=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)c=new Date(s);else if(typeof s=="string"){var f=a||(e||Gi).dateFormat,p=String(s).trim();if(p==="today")c=new Date,o=!0;else if(e&&e.parseDate)c=e.parseDate(s,f);else if(/Z$/.test(p)||/GMT$/.test(p))c=new Date(s);else{for(var h=void 0,b=[],v=0,E=0,C="";vMath.min(t,e)&&n=0?new Date:new Date(e.config.minDate.getTime()),D=Zd(e.config);y.setHours(D.hours,D.minutes,D.seconds,y.getMilliseconds()),e.selectedDates=[y],e.latestSelectedDateObj=y}g!==void 0&&g.type!=="blur"&&Lx(g);var N=e._input.value;d(),Kr(),e._input.value!==N&&e._debouncedChange()}function u(g,y){return g%12+12*Dn(y===e.l10n.amPM[1])}function c(g){switch(g%24){case 0:case 12:return 12;default:return g%12}}function d(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var g=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,y=(parseInt(e.minuteElement.value,10)||0)%60,D=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(g=u(g,e.amPM.textContent));var N=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&xn(e.latestSelectedDateObj,e.config.minDate,!0)===0,z=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&xn(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var ne=Xd(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),Se=Xd(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),ue=Xd(g,y,D);if(ue>Se&&ue=12)]),e.secondElement!==void 0&&(e.secondElement.value=an(D)))}function h(g){var y=En(g),D=parseInt(y.value)+(g.delta||0);(D/1e3>1||g.key==="Enter"&&!/[^\d]/.test(D.toString()))&&$(D)}function b(g,y,D,N){if(y instanceof Array)return y.forEach(function(z){return b(g,z,D,N)});if(g instanceof Array)return g.forEach(function(z){return b(z,y,D,N)});g.addEventListener(y,D,N),e._handlers.push({remove:function(){return g.removeEventListener(y,D,N)}})}function v(){ot("onChange")}function E(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(D){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+D+"]"),function(N){return b(N,"click",e[D])})}),e.isMobile){Px();return}var g=gb(tt,50);if(e._debouncedChange=gb(v,gW),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&b(e.daysContainer,"mouseover",function(D){e.config.mode==="range"&&we(En(D))}),b(e._input,"keydown",Te),e.calendarContainer!==void 0&&b(e.calendarContainer,"keydown",Te),!e.config.inline&&!e.config.static&&b(window,"resize",g),window.ontouchstart!==void 0?b(window.document,"touchstart",S):b(window.document,"mousedown",S),b(window.document,"focus",S,{capture:!0}),e.config.clickOpens===!0&&(b(e._input,"focus",e.open),b(e._input,"click",e.open)),e.daysContainer!==void 0&&(b(e.monthNav,"click",Fx),b(e.monthNav,["keyup","increment"],h),b(e.daysContainer,"click",Db)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var y=function(D){return En(D).select()};b(e.timeContainer,["increment"],l),b(e.timeContainer,"blur",l,{capture:!0}),b(e.timeContainer,"click",x),b([e.hourElement,e.minuteElement],["focus","click"],y),e.secondElement!==void 0&&b(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&b(e.amPM,"click",function(D){l(D)})}e.config.allowInput&&b(e._input,"blur",fe)}function C(g,y){var D=g!==void 0?e.parseDate(g):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate1),e.calendarContainer.appendChild(g);var z=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!z&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var ne=Be("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(ne,e.element),ne.appendChild(e.element),e.altInput&&ne.appendChild(e.altInput),ne.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function V(g,y,D,N){var z=de(y,!0),ne=Be("span",g,y.getDate().toString());return ne.dateObj=y,ne.$i=N,ne.setAttribute("aria-label",e.formatDate(y,e.config.ariaDateFormat)),g.indexOf("hidden")===-1&&xn(y,e.now)===0&&(e.todayDateElem=ne,ne.classList.add("today"),ne.setAttribute("aria-current","date")),z?(ne.tabIndex=-1,_f(y)&&(ne.classList.add("selected"),e.selectedDateElem=ne,e.config.mode==="range"&&(on(ne,"startRange",e.selectedDates[0]&&xn(y,e.selectedDates[0],!0)===0),on(ne,"endRange",e.selectedDates[1]&&xn(y,e.selectedDates[1],!0)===0),g==="nextMonthDay"&&ne.classList.add("inRange")))):ne.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Nx(y)&&!_f(y)&&ne.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&g!=="prevMonthDay"&&N%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend",""+e.config.getWeek(y)+""),ot("onDayCreate",ne),ne}function j(g){g.focus(),e.config.mode==="range"&&we(g)}function ee(g){for(var y=g>0?0:e.config.showMonths-1,D=g>0?e.config.showMonths:-1,N=y;N!=D;N+=g)for(var z=e.daysContainer.children[N],ne=g>0?0:z.children.length-1,Se=g>0?z.children.length:-1,ue=ne;ue!=Se;ue+=g){var Re=z.children[ue];if(Re.className.indexOf("hidden")===-1&&de(Re.dateObj))return Re}}function Ae(g,y){for(var D=g.className.indexOf("Month")===-1?g.dateObj.getMonth():e.currentMonth,N=y>0?e.config.showMonths:-1,z=y>0?1:-1,ne=D-e.currentMonth;ne!=N;ne+=z)for(var Se=e.daysContainer.children[ne],ue=D-e.currentMonth===ne?g.$i+y:y<0?Se.children.length-1:0,Re=Se.children.length,ae=ue;ae>=0&&ae0?Re:-1);ae+=z){var be=Se.children[ae];if(be.className.indexOf("hidden")===-1&&de(be.dateObj)&&Math.abs(g.$i-ae)>=Math.abs(y))return j(be)}e.changeMonth(z),Pe(ee(z),0)}function Pe(g,y){var D=s(),N=ye(D||document.body),z=g!==void 0?g:N?D:e.selectedDateElem!==void 0&&ye(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&ye(e.todayDateElem)?e.todayDateElem:ee(y>0?1:-1);z===void 0?e._input.focus():N?Ae(z,y):j(z)}function Q(g,y){for(var D=(new Date(g,y,1).getDay()-e.l10n.firstDayOfWeek+7)%7,N=e.utils.getDaysInMonth((y-1+12)%12,g),z=e.utils.getDaysInMonth(y,g),ne=window.document.createDocumentFragment(),Se=e.config.showMonths>1,ue=Se?"prevMonthDay hidden":"prevMonthDay",Re=Se?"nextMonthDay hidden":"nextMonthDay",ae=N+1-D,be=0;ae<=N;ae++,be++)ne.appendChild(V("flatpickr-day "+ue,new Date(g,y-1,ae),ae,be));for(ae=1;ae<=z;ae++,be++)ne.appendChild(V("flatpickr-day",new Date(g,y,ae),ae,be));for(var Xe=z+1;Xe<=42-D&&(e.config.showMonths===1||be%7!==0);Xe++,be++)ne.appendChild(V("flatpickr-day "+Re,new Date(g,y+1,Xe%z),Xe,be));var xr=Be("div","dayContainer");return xr.appendChild(ne),xr}function B(){if(e.daysContainer!==void 0){zl(e.daysContainer),e.weekNumbers&&zl(e.weekNumbers);for(var g=document.createDocumentFragment(),y=0;y1||e.config.monthSelectorType!=="dropdown")){var g=function(N){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&Ne.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var y=0;y<12;y++)if(g(y)){var D=Be("option","flatpickr-monthDropdown-month");D.value=new Date(e.currentYear,y).getMonth().toString(),D.textContent=Kl(y,e.config.shorthandCurrentMonth,e.l10n),D.tabIndex=-1,e.currentMonth===y&&(D.selected=!0),e.monthsDropdownContainer.appendChild(D)}}}function te(){var g=Be("div","flatpickr-month"),y=window.document.createDocumentFragment(),D;e.config.showMonths>1||e.config.monthSelectorType==="static"?D=Be("span","cur-month"):(e.monthsDropdownContainer=Be("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),b(e.monthsDropdownContainer,"change",function(Se){var ue=En(Se),Re=parseInt(ue.value,10);e.changeMonth(Re-e.currentMonth),ot("onMonthChange")}),P(),D=e.monthsDropdownContainer);var N=Ql("cur-year",{tabindex:"-1"}),z=N.getElementsByTagName("input")[0];z.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&z.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(z.setAttribute("max",e.config.maxDate.getFullYear().toString()),z.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var ne=Be("div","flatpickr-current-month");return ne.appendChild(D),ne.appendChild(N),y.appendChild(ne),g.appendChild(y),{container:g,yearElement:z,monthElement:D}}function H(){zl(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var g=e.config.showMonths;g--;){var y=te();e.yearElements.push(y.yearElement),e.monthElements.push(y.monthElement),e.monthNav.appendChild(y.container)}e.monthNav.appendChild(e.nextMonthNav)}function se(){return e.monthNav=Be("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Be("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Be("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,H(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(g){e.__hidePrevMonthArrow!==g&&(on(e.prevMonthNav,"flatpickr-disabled",g),e.__hidePrevMonthArrow=g)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(g){e.__hideNextMonthArrow!==g&&(on(e.nextMonthNav,"flatpickr-disabled",g),e.__hideNextMonthArrow=g)}}),e.currentYearElement=e.yearElements[0],nu(),e.monthNav}function m(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var g=Zd(e.config);e.timeContainer=Be("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var y=Be("span","flatpickr-time-separator",":"),D=Ql("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=D.getElementsByTagName("input")[0];var N=Ql("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=N.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=an(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?g.hours:c(g.hours)),e.minuteElement.value=an(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():g.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(D),e.timeContainer.appendChild(y),e.timeContainer.appendChild(N),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var z=Ql("flatpickr-second");e.secondElement=z.getElementsByTagName("input")[0],e.secondElement.value=an(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():g.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Be("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(z)}return e.config.time_24hr||(e.amPM=Be("span","flatpickr-am-pm",e.l10n.amPM[Dn((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function T(){e.weekdayContainer?zl(e.weekdayContainer):e.weekdayContainer=Be("div","flatpickr-weekdays");for(var g=e.config.showMonths;g--;){var y=Be("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(y)}return _(),e.weekdayContainer}function _(){if(e.weekdayContainer){var g=e.l10n.firstDayOfWeek,y=Z1(e.l10n.weekdays.shorthand);g>0&&g + `+y.join("")+` + + `}}function k(){e.calendarContainer.classList.add("hasWeeks");var g=Be("div","flatpickr-weekwrapper");g.appendChild(Be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var y=Be("div","flatpickr-weeks");return g.appendChild(y),{weekWrapper:g,weekNumbers:y}}function w(g,y){y===void 0&&(y=!0);var D=y?g:g-e.currentMonth;D<0&&e._hidePrevMonthArrow===!0||D>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=D,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,ot("onYearChange"),P()),B(),ot("onMonthChange"),nu())}function R(g,y){if(g===void 0&&(g=!0),y===void 0&&(y=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,y===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var D=Zd(e.config),N=D.hours,z=D.minutes,ne=D.seconds;p(N,z,ne)}e.redraw(),g&&ot("onChange")}function I(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),ot("onClose")}function q(){e.config!==void 0&&ot("onDestroy");for(var g=e._handlers.length;g--;)e._handlers[g].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var y=e.calendarContainer.parentNode;if(y.lastChild&&y.removeChild(y.lastChild),y.parentNode){for(;y.firstChild;)y.parentNode.insertBefore(y.firstChild,y);y.parentNode.removeChild(y)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(D){try{delete e[D]}catch(N){}})}function L(g){return e.calendarContainer.contains(g)}function S(g){if(e.isOpen&&!e.config.inline){var y=En(g),D=L(y),N=y===e.input||y===e.altInput||e.element.contains(y)||g.path&&g.path.indexOf&&(~g.path.indexOf(e.input)||~g.path.indexOf(e.altInput)),z=!N&&!D&&!L(g.relatedTarget),ne=!e.config.ignoredFocusElements.some(function(Se){return Se.contains(y)});z&&ne&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function $(g){if(!(!g||e.config.minDate&&ge.config.maxDate.getFullYear())){var y=g,D=e.currentYear!==y;e.currentYear=y||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),D&&(e.redraw(),ot("onYearChange"),P())}}function de(g,y){var D;y===void 0&&(y=!0);var N=e.parseDate(g,void 0,y);if(e.config.minDate&&N&&xn(N,e.config.minDate,y!==void 0?y:!e.minDateHasTime)<0||e.config.maxDate&&N&&xn(N,e.config.maxDate,y!==void 0?y:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(N===void 0)return!1;for(var z=!!e.config.enable,ne=(D=e.config.enable)!==null&&D!==void 0?D:e.config.disable,Se=0,ue=void 0;Se=ue.from.getTime()&&N.getTime()<=ue.to.getTime())return z}return!z}function ye(g){return e.daysContainer!==void 0?g.className.indexOf("hidden")===-1&&g.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(g):!1}function fe(g){var y=g.target===e._input,D=e._input.value.trimEnd()!==wf();y&&D&&!(g.relatedTarget&&L(g.relatedTarget))&&e.setDate(e._input.value,!0,g.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Te(g){var y=En(g),D=e.config.wrap?n.contains(y):y===e._input,N=e.config.allowInput,z=e.isOpen&&(!N||!D),ne=e.config.inline&&D&&!N;if(g.keyCode===13&&D){if(N)return e.setDate(e._input.value,!0,y===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),y.blur();e.open()}else if(L(y)||z||ne){var Se=!!e.timeContainer&&e.timeContainer.contains(y);switch(g.keyCode){case 13:Se?(g.preventDefault(),l(),vf()):Db(g);break;case 27:g.preventDefault(),vf();break;case 8:case 46:D&&!e.config.allowInput&&(g.preventDefault(),e.clear());break;case 37:case 39:if(!Se&&!D){g.preventDefault();var ue=s();if(e.daysContainer!==void 0&&(N===!1||ue&&ye(ue))){var Re=g.keyCode===39?1:-1;g.ctrlKey?(g.stopPropagation(),w(Re),Pe(ee(1),0)):Pe(void 0,Re)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:g.preventDefault();var ae=g.keyCode===40?1:-1;e.daysContainer&&y.$i!==void 0||y===e.input||y===e.altInput?g.ctrlKey?(g.stopPropagation(),$(e.currentYear-ae),Pe(ee(1),0)):Se||Pe(void 0,ae*7):y===e.currentYearElement?$(e.currentYear-ae):e.config.enableTime&&(!Se&&e.hourElement&&e.hourElement.focus(),l(g),e._debouncedChange());break;case 9:if(Se){var be=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(On){return On}),Xe=be.indexOf(y);if(Xe!==-1){var xr=be[Xe+(g.shiftKey?-1:1)];g.preventDefault(),(xr||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(y)&&g.shiftKey&&(g.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&y===e.amPM)switch(g.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),Kr();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),Kr();break}(D||L(y))&&ot("onKeyDown",g)}function we(g,y){if(y===void 0&&(y="flatpickr-day"),!(e.selectedDates.length!==1||g&&(!g.classList.contains(y)||g.classList.contains("flatpickr-disabled")))){for(var D=g?g.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),N=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),z=Math.min(D,e.selectedDates[0].getTime()),ne=Math.max(D,e.selectedDates[0].getTime()),Se=!1,ue=0,Re=0,ae=z;aez&&aeue)?ue=ae:ae>N&&(!Re||ae ."+y));be.forEach(function(Xe){var xr=Xe.dateObj,On=xr.getTime(),so=ue>0&&On0&&On>Re;if(so){Xe.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ys){Xe.classList.remove(Ys)});return}else if(Se&&!so)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ys){Xe.classList.remove(Ys)}),g!==void 0&&(g.classList.add(D<=e.selectedDates[0].getTime()?"startRange":"endRange"),ND&&On===N&&Xe.classList.add("endRange"),On>=ue&&(Re===0||On<=Re)&&Q1(On,N,D)&&Xe.classList.add("inRange"))})}}function tt(){e.isOpen&&!e.config.static&&!e.config.inline&&eu()}function nt(g,y){if(y===void 0&&(y=e._positionElement),e.isMobile===!0){if(g){g.preventDefault();var D=En(g);D&&D.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),ot("onOpen");return}else if(e._input.disabled||e.config.inline)return;var N=e.isOpen;e.isOpen=!0,N||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),ot("onOpen"),eu(y)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(g===void 0||!e.timeContainer.contains(g.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function F(g){return function(y){var D=e.config["_"+g+"Date"]=e.parseDate(y,e.config.dateFormat),N=e.config["_"+(g==="min"?"max":"min")+"Date"];D!==void 0&&(e[g==="min"?"minDateHasTime":"maxDateHasTime"]=D.getHours()>0||D.getMinutes()>0||D.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(z){return de(z)}),!e.selectedDates.length&&g==="min"&&f(D),Kr()),e.daysContainer&&(Sb(),D!==void 0?e.currentYearElement[g]=D.getFullYear().toString():e.currentYearElement.removeAttribute(g),e.currentYearElement.disabled=!!N&&D!==void 0&&N.getFullYear()===D.getFullYear())}}function Ue(){var g=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],y=ln(ln({},JSON.parse(JSON.stringify(n.dataset||{}))),t),D={};e.config.parseDate=y.parseDate,e.config.formatDate=y.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(be){e.config._enable=xb(be)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(be){e.config._disable=xb(be)}});var N=y.mode==="time";if(!y.dateFormat&&(y.enableTime||N)){var z=kt.defaultConfig.dateFormat||Gi.dateFormat;D.dateFormat=y.noCalendar||N?"H:i"+(y.enableSeconds?":S":""):z+" H:i"+(y.enableSeconds?":S":"")}if(y.altInput&&(y.enableTime||N)&&!y.altFormat){var ne=kt.defaultConfig.altFormat||Gi.altFormat;D.altFormat=y.noCalendar||N?"h:i"+(y.enableSeconds?":S K":" K"):ne+(" h:i"+(y.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:F("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:F("max")});var Se=function(be){return function(Xe){e.config[be==="min"?"_minTime":"_maxTime"]=e.parseDate(Xe,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:Se("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:Se("max")}),y.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,D,y);for(var ue=0;ue-1?e.config[ae]=Qd(Re[ae]).map(a).concat(e.config[ae]):typeof y[ae]=="undefined"&&(e.config[ae]=Re[ae])}y.altInputClass||(e.config.altInputClass=$t().className+" "+e.config.altInputClass),ot("onParseConfig")}function $t(){return e.config.wrap?n.querySelector("[data-input]"):n}function Pt(){typeof e.config.locale!="object"&&typeof kt.l10ns[e.config.locale]=="undefined"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=ln(ln({},kt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?kt.l10ns[e.config.locale]:void 0),_i.D="("+e.l10n.weekdays.shorthand.join("|")+")",_i.l="("+e.l10n.weekdays.longhand.join("|")+")",_i.M="("+e.l10n.months.shorthand.join("|")+")",_i.F="("+e.l10n.months.longhand.join("|")+")",_i.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var g=ln(ln({},t),JSON.parse(JSON.stringify(n.dataset||{})));g.time_24hr===void 0&&kt.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Tb(e),e.parseDate=Kd({config:e.config,l10n:e.l10n})}function eu(g){if(typeof e.config.position=="function")return void e.config.position(e,g);if(e.calendarContainer!==void 0){ot("onPreCalendarPosition");var y=g||e._positionElement,D=Array.prototype.reduce.call(e.calendarContainer.children,(function(Bx,Gx){return Bx+Gx.offsetHeight}),0),N=e.calendarContainer.offsetWidth,z=e.config.position.split(" "),ne=z[0],Se=z.length>1?z[1]:null,ue=y.getBoundingClientRect(),Re=window.innerHeight-ue.bottom,ae=ne==="above"||ne!=="below"&&ReD,be=window.pageYOffset+ue.top+(ae?-D-2:y.offsetHeight+2);if(on(e.calendarContainer,"arrowTop",!ae),on(e.calendarContainer,"arrowBottom",ae),!e.config.inline){var Xe=window.pageXOffset+ue.left,xr=!1,On=!1;Se==="center"?(Xe-=(N-ue.width)/2,xr=!0):Se==="right"&&(Xe-=N-ue.width,On=!0),on(e.calendarContainer,"arrowLeft",!xr&&!On),on(e.calendarContainer,"arrowCenter",xr),on(e.calendarContainer,"arrowRight",On);var so=window.document.body.offsetWidth-(window.pageXOffset+ue.right),Ys=Xe+N>window.document.body.offsetWidth,Ux=so+N>window.document.body.offsetWidth;if(on(e.calendarContainer,"rightMost",Ys),!e.config.static)if(e.calendarContainer.style.top=be+"px",!Ys)e.calendarContainer.style.left=Xe+"px",e.calendarContainer.style.right="auto";else if(!Ux)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=so+"px";else{var Sf=xx();if(Sf===void 0)return;var qx=window.document.body.offsetWidth,Yx=Math.max(0,qx/2-N/2),Wx=".flatpickr-calendar.centerMost:before",$x=".flatpickr-calendar.centerMost:after",jx=Sf.cssRules.length,Hx="{left:"+ue.left+"px;right:auto;}";on(e.calendarContainer,"rightMost",!1),on(e.calendarContainer,"centerMost",!0),Sf.insertRule(Wx+","+$x+Hx,jx),e.calendarContainer.style.left=Yx+"px",e.calendarContainer.style.right="auto"}}}}function xx(){for(var g=null,y=0;ye.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=N,e.config.mode==="single")e.selectedDates=[z];else if(e.config.mode==="multiple"){var Se=_f(z);Se?e.selectedDates.splice(parseInt(Se),1):e.selectedDates.push(z)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=z,e.selectedDates.push(z),xn(z,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(be,Xe){return be.getTime()-Xe.getTime()}));if(d(),ne){var ue=e.currentYear!==z.getFullYear();e.currentYear=z.getFullYear(),e.currentMonth=z.getMonth(),ue&&(ot("onYearChange"),P()),ot("onMonthChange")}if(nu(),B(),Kr(),!ne&&e.config.mode!=="range"&&e.config.showMonths===1?j(N):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Re=e.config.mode==="single"&&!e.config.enableTime,ae=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Re||ae)&&vf()}v()}}var tu={locale:[Pt,_],showMonths:[H,o,T],minDate:[C],maxDate:[C],positionElement:[Ob],clickOpens:[function(){e.config.clickOpens===!0?(b(e._input,"focus",e.open),b(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Rx(g,y){if(g!==null&&typeof g=="object"){Object.assign(e.config,g);for(var D in g)tu[D]!==void 0&&tu[D].forEach(function(N){return N()})}else e.config[g]=y,tu[g]!==void 0?tu[g].forEach(function(N){return N()}):Gd.indexOf(g)>-1&&(e.config[g]=Qd(y));e.redraw(),Kr(!0)}function Eb(g,y){var D=[];if(g instanceof Array)D=g.map(function(N){return e.parseDate(N,y)});else if(g instanceof Date||typeof g=="number")D=[e.parseDate(g,y)];else if(typeof g=="string")switch(e.config.mode){case"single":case"time":D=[e.parseDate(g,y)];break;case"multiple":D=g.split(e.config.conjunction).map(function(N){return e.parseDate(N,y)});break;case"range":D=g.split(e.l10n.rangeSeparator).map(function(N){return e.parseDate(N,y)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(g)));e.selectedDates=e.config.allowInvalidPreload?D:D.filter(function(N){return N instanceof Date&&de(N,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(N,z){return N.getTime()-z.getTime()})}function Cx(g,y,D){if(y===void 0&&(y=!1),D===void 0&&(D=e.config.dateFormat),g!==0&&!g||g instanceof Array&&g.length===0)return e.clear(y);Eb(g,D),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),C(void 0,y),f(),e.selectedDates.length===0&&e.clear(!1),Kr(y),y&&ot("onChange")}function xb(g){return g.slice().map(function(y){return typeof y=="string"||typeof y=="number"||y instanceof Date?e.parseDate(y,void 0,!0):y&&typeof y=="object"&&y.from&&y.to?{from:e.parseDate(y.from,void 0),to:e.parseDate(y.to,void 0)}:y}).filter(function(y){return y})}function Mx(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var g=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);g&&Eb(g,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Ax(){if(e.input=$t(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=Be(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Ob()}function Ob(){e._positionElement=e.config.positionElement||e._input}function Px(){var g=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=Be("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=g,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=g==="datetime-local"?"Y-m-d\\TH:i:S":g==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch(y){}b(e.mobileInput,"change",function(y){e.setDate(En(y).value,!1,e.mobileFormatStr),ot("onChange"),ot("onClose")})}function Ix(g){if(e.isOpen===!0)return e.close();e.open(g)}function ot(g,y){if(e.config!==void 0){var D=e.config[g];if(D!==void 0&&D.length>0)for(var N=0;D[N]&&N=0&&xn(g,e.selectedDates[1])<=0}function nu(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(g,y){var D=new Date(e.currentYear,e.currentMonth,1);D.setMonth(e.currentMonth+y),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[y].textContent=Kl(D.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=D.getMonth().toString(),g.value=D.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYeare.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function wf(g){var y=g||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(D){return e.formatDate(D,y)}).filter(function(D,N,z){return e.config.mode!=="range"||e.config.enableTime||z.indexOf(D)===N}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function Kr(g){g===void 0&&(g=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=wf(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=wf(e.config.altFormat)),g!==!1&&ot("onValueUpdate")}function Fx(g){var y=En(g),D=e.prevMonthNav.contains(y),N=e.nextMonthNav.contains(y);D||N?w(D?-1:1):e.yearElements.indexOf(y)>=0?y.select():y.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):y.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Lx(g){g.preventDefault();var y=g.type==="keydown",D=En(g),N=D;e.amPM!==void 0&&D===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Dn(e.amPM.textContent===e.l10n.amPM[0])]);var z=parseFloat(N.getAttribute("min")),ne=parseFloat(N.getAttribute("max")),Se=parseFloat(N.getAttribute("step")),ue=parseInt(N.value,10),Re=g.delta||(y?g.which===38?1:-1:0),ae=ue+Se*Re;if(typeof N.value!="undefined"&&N.value.length===2){var be=N===e.hourElement,Xe=N===e.minuteElement;aene&&(ae=N===e.hourElement?ae-ne-Dn(!e.amPM):z,Xe&&Y(void 0,1,e.hourElement)),e.amPM&&be&&(Se===1?ae+ue===23:Math.abs(ae-ue)>Se)&&(e.amPM.textContent=e.l10n.amPM[Dn(e.amPM.textContent===e.l10n.amPM[0])]),N.value=an(ae)}}return i(),e}function Ja(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;iA(null,null,function*(){if(l.length>0){let d=l[0],f=new Hi(e,d).apply(t);yield r(t,f)}c.destroy()}),onReady:(l,u,c)=>{let d=document.createElement("div");d.style.display="flex",d.style.justifyContent="space-between",d.style.marginTop="10px",ex(d,c,t,r,"Clear",()=>new Gl(e,t).apply(t)),ex(d,c,t,r,"Today",()=>{let p=new Date;return new Hi(e,p).apply(t)}),c.calendarContainer.appendChild(d)}}).open()}function ex(n,t,e,r,i,s){let a=document.createElement("button");a.type="button",a.textContent=i,a.classList.add("flatpickr-button"),a.addEventListener("click",()=>A(null,null,function*(){let o=s();yield r(e,o),t.destroy()})),n.appendChild(a)}var Jd=class extends Bi{constructor(t,e,r=Vr){super(r);let i=Wd(t);this.addItemsForInstructions(i,e)}};wl();var ef=class{constructor(){this.data=bW}addDataAttribute(t,e,r){this.data[r].addDataAttribute(t,e,r)}addClassName(t,e){let r=this.data[e].className;t.classList.add(r)}},no=class no{constructor(t,e,r){if(t==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=t,this.attributeName=e,this.attributeValueCalculator=r}addDataAttribute(t,e,r){if(this.attributeName===no.noAttributeName)return;let i=this.attributeValueCalculator(r,e);i!==""&&(t.dataset[this.attributeName]=i)}};no.noAttributeName="",no.noAttributeValueCalculator=()=>"",no.dateAttributeCalculator=(t,e)=>{function s(o){let u=window.moment().startOf("day").diff(o,"days");if(isNaN(u))return null;if(u===0)return"today";let c="";return u>0?c+="past-":u<0&&(c+="future-"),Math.abs(u)<=7?c+=Math.abs(u).toString()+"d":c+="far",c}let a=e[t];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};var Vi=no;function eo(n){return new Vi(n,Vi.noAttributeName,Vi.noAttributeValueCalculator)}function to(n,t){return new Vi(n,t,Vi.dateAttributeCalculator)}var bW={createdDate:to("task-created","taskCreated"),dueDate:to("task-due","taskDue"),startDate:to("task-start","taskStart"),scheduledDate:to("task-scheduled","taskScheduled"),doneDate:to("task-done","taskDone"),cancelledDate:to("task-cancelled","taskCancelled"),priority:new Vi("task-priority","taskPriority",(n,t)=>hr.priorityNameUsingNormal(t.priority).toLocaleLowerCase()),description:eo("task-description"),recurrenceRule:eo("task-recurring"),onCompletion:eo("task-onCompletion"),dependsOn:eo("task-dependsOn"),id:eo("task-id"),blockLink:eo("task-block-link")};function ze(n,t){let e=document.createElement(n);return t.appendChild(e),e}var zi=class n{static obsidianMarkdownRenderer(t,e,r,i,s){return A(this,null,function*(){s&&(yield nx.MarkdownRenderer.render(t,e,r,i,s))})}constructor({textRenderer:t=n.obsidianMarkdownRenderer,obsidianApp:e,obsidianComponent:r,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=t,this.obsidianApp=e,this.obsidianComponent=r,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(a){return A(this,arguments,function*({li:t,task:e,taskIndex:r,isTaskInQueryFile:i,isFilenameUnique:s}){t.classList.add("task-list-item","plugin-tasks-list-item");let o=ze("span",t);o.classList.add("tasks-list-text"),yield this.taskToHtml(e,o,t,i);let l=ze("input",t);l.classList.add("task-list-item-checkbox"),l.type="checkbox",e.status.symbol!==" "&&(l.checked=!0,t.classList.add("is-checked")),e.taskLocation.hasKnownPath&&(l.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),l.disabled=!0;let d=e.toggleWithRecurrenceInUsersOrder();qn({originalTask:e,newTasks:d})}),l.addEventListener("contextmenu",c=>{Vl(c,new Jd(Ze.getInstance(),e))}),l.setAttribute("title","Right-click for options")),t.prepend(l),t.setAttribute("data-task",e.status.symbol.trim()),t.setAttribute("data-line",r.toString()),t.setAttribute("data-task-status-name",e.status.name),t.setAttribute("data-task-status-type",e.status.type),l.setAttribute("data-line",r.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(e,o,s)})}taskToHtml(t,e,r,i){return A(this,null,function*(){let s=new ef,a=Nn.tasksPluginEmoji.taskSerializer;for(let o of this.taskLayoutOptions.shownComponents){let l=a.componentToString(t,this.queryLayoutOptions.shortMode,o);if(l){let u=ze("span",e),c=ze("span",u);if(yield this.renderComponentText(c,l,o,t,i),this.addInternalClasses(o,c),s.addClassName(u,o),s.addDataAttribute(u,t,o),s.addDataAttribute(r,t,o),ke.allDateFields().includes(o)){let d=o;u.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),tx(u,t,d,Vr)}),u.addEventListener("contextmenu",f=>{Vl(f,new Bd(d,t,Vr))}),u.setAttribute("title",`Click to edit ${Hd(d)}, Right-click for more options`)}}}for(let o of this.taskLayoutOptions.hiddenComponents)s.addDataAttribute(r,t,o);r.dataset.taskPriority===void 0&&s.addDataAttribute(r,t,"priority")})}renderComponentText(t,e,r,i,s){return A(this,null,function*(){if(r==="description")return yield this.renderDescription(i,t,s);t.textContent=e})}renderDescription(t,e,r){return A(this,null,function*(){let i=this.adjustRelativeLinksInDescription(t,r);i=Me.getInstance().removeAsWordFromDependingOnSettings(i);let{debugSettings:s}=J();s.showTaskHiddenData&&(i+=`
\u{1F41B} ${t.lineNumber} . ${t.sectionStart} . ${t.sectionIndex} . '${t.originalMarkdown}'
'${t.path}' > '${t.precedingHeader}'
`),yield this.textRenderer(this.obsidianApp,i,e,t.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,l=o.querySelector("p");if(l!==null){for(;l.firstChild;)o.insertBefore(l.firstChild,l);l.remove()}e.querySelectorAll("p").forEach(u=>{u.hasChildNodes()||u.remove()}),e.querySelectorAll(".footnotes").forEach(u=>{u.remove()})})}adjustRelativeLinksInDescription(t,e){if(e)return t.description;let r=t.file.cachedMetadata.links;if(!r)return t.description;let i=r.filter(a=>a.position.start.line===t.taskLocation.lineNumber&&t.description.includes(a.original)&&a.link.startsWith("#")),s=t.description;if(i.length!==0)for(let a of i){let o=`[[${t.path}${a.link}|${a.displayText}]]`;s=s.replace(a.original,o)}return s}addInternalClasses(t,e){function r(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(t==="description"){let i=e.getElementsByClassName("tag");for(let s=0;s{function d(b,v,E){v&&b.createDiv().setText(f({signifier:E,date:v}))}function f({signifier:b,date:v}){return`${b} ${v.format(We.dateFormat)} (${v.from(window.moment().startOf("day"))})`}let p=e.createDiv();p.addClasses(["tooltip","pop-up"]),t.recurrence&&p.createDiv().setText(`${i} ${t.recurrence.toText()}`),d(p,t.createdDate,a),d(p,t.startDate,s),d(p,t.scheduledDate,o),d(p,t.dueDate,l),d(p,t.cancelledDate,u),d(p,t.doneDate,c);let h=t.getLinkText({isFilenameUnique:r});h&&p.createDiv().setText(`\u{1F517} ${h}`),e.addEventListener("mouseleave",()=>{p.remove()})})}renderListItem(t,e,r){return A(this,null,function*(){var a,o;if(e.statusCharacter){let l=ze("input",t);l.classList.add("task-list-item-checkbox"),l.type="checkbox",l.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),l.disabled=!0;let c=e.checkOrUncheck();qn({originalTask:e,newTasks:c})}),e.statusCharacter!==" "&&(l.checked=!0,t.classList.add("is-checked")),t.classList.add("task-list-item"),t.setAttribute("data-task",e.statusCharacter.trim()),t.setAttribute("data-line",r.toString())}let i=ze("span",t);yield this.textRenderer(this.obsidianApp,e.description,i,(o=(a=e.findClosestParentTask())==null?void 0:a.path)!=null?o:"",this.obsidianComponent);let s=i.querySelector("p");if(s!==null){for(;s.firstChild;)i.insertBefore(s.firstChild,s);s.remove()}return t})}};var tf=class{constructor({plugin:t,app:e}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);this.app=e,t.registerMarkdownPostProcessor((r,i)=>{t.app.workspace.onLayoutReady(()=>{this.markdownPostProcessor(r,i)})})}_markdownPostProcessor(t,e){return A(this,null,function*(){var d;let r=new rx.MarkdownRenderChild(t);e.addChild(r);let i=t.findAll(".task-list-item").filter(f=>{var b;let p=(b=f.textContent)==null?void 0:b.split(` +`);if(p===void 0)return!1;let h=null;for(let v=0;vix.ViewPlugin.fromClass(vb),vb=class{constructor(t){this.view=t,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(t){let{target:e}=t;if(!e||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return!1;let r=e.closest("ul.plugin-tasks-query-result, div.callout-content");if(r){if(r.matches("div.callout-content")){let p=`obsidian-tasks-plugin warning: Tasks cannot add or remove completion dates or make the next copy of a recurring task for tasks written inside a callout when you click their checkboxes in Live Preview. +If you wanted Tasks to do these things, please undo your change, then either click the line of the task and use the "Toggle Task Done" command, or switch to Reading View to click the checkbox.`;console.warn(p),new sx.Notice(p,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(e),a=i.doc.lineAt(s),o=ke.fromLine({line:a.text,taskLocation:Qt.fromUnknownPosition(new ft("")),fallbackDate:null});if(o===null)return!1;t.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder(),u=l.map(p=>p.toFileLineString()).join(i.lineBreak),c=a.to;if(u===""){let p=a.number{e.checked=p},1)}return!0}};var wi=require("obsidian"),ux=require("obsidian");function ox(n,t,e,r=void 0){let i="";t.isEmpty()||(i+=`Only tasks containing the global filter '${t.get()}'. + +`);let s=new Pa(" ");function a(c,d){return`${c}: + +${s.explainQuery(d)}`}let o=new Sr(n,r),l=new ki().query(r);if(!(o.ignoreGlobalQuery||l.ignoreGlobalQuery)&&e.hasInstructions()){let c=e.query(r);i+=a("Explanation of the global query",c)+` +`}return l.source!==""&&(i+=a("Explanation of the Query File Defaults (from properties/frontmatter in the query's file)",l)+` +`),i+=a("Explanation of this Tasks code block query",o),i}function nf(n,t,e){let i=new ki().query(e).append(new Sr(n,e));return i.ignoreGlobalQuery?i:t.query(e).append(i)}Fi();var zr=require("obsidian");yt();function Xl(n,t,e){t&&n.push(TW(e))}function TW(n){return`tasks-layout-hide-${n}`}var rf=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Yi}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[r,i]of e)Xl(t,r,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};ps();var sf=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Lr}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{Xl(t,!this.taskLayoutOptions.isShown(e),e)}),Xl(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};var kb=require("obsidian");var Zl=class n extends Bi{constructor(t,e,r=Vr){super(r);let i=(u,c,d,f,p,h)=>{var C;let b=!1,v=Qa(e);if(v){let{postponedDate:x}=h(e,v,d,f);(C=e[v])!=null&&C.isSame(x,"day")&&(b=!0)}let E=p(e,f,d);c.setChecked(b).setTitle(E).onClick(()=>n.postponeOnClickCallback(u,e,f,d,h,r))},s=W1,a=N1;this.addItem(u=>i(t,u,"days",0,s,a)),this.addItem(u=>i(t,u,"day",1,s,a)),this.addSeparator();let o=mb,l=pb;o(e,1,"day")!==s(e,1,"day")&&this.addItem(u=>i(t,u,"day",1,o,l)),this.addItem(u=>i(t,u,"days",2,o,l)),this.addItem(u=>i(t,u,"days",3,o,l)),this.addItem(u=>i(t,u,"days",4,o,l)),this.addItem(u=>i(t,u,"days",5,o,l)),this.addItem(u=>i(t,u,"days",6,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"week",1,o,l)),this.addItem(u=>i(t,u,"weeks",2,o,l)),this.addItem(u=>i(t,u,"weeks",3,o,l)),this.addItem(u=>i(t,u,"month",1,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"days",2,$1,F1))}static postponeOnClickCallback(o,l,u,c){return A(this,arguments,function*(t,e,r,i,s=pb,a=Vr){var h;let d=Qa(e);if(d===null){let b="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new kb.Notice(b,1e4)}let{postponedDate:f,postponedTask:p}=s(e,d,i,r);(h=e[d])!=null&&h.isSame(f,"day")||(yield a(e,p),n.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,r){t.style.pointerEvents="none";let i=q1(r,e);new kb.Notice(i,2e3)}};dn();At();var ro=class{constructor(t,e,r){this.addedListItems=new Set;this.source=t,this.tasksFile=e,this.query=r}get filePath(){return this.tasksFile.path}renderQuery(t,e){return A(this,null,function*(){this.beginRender();let i=this.query.error;t==="Warm"&&i===void 0?yield this.renderQuerySearchResults(e):i?this.renderErrorMessage(i):this.renderLoadingMessage()})}renderQuerySearchResults(t){return A(this,null,function*(){if(this.explainQuery(),t.searchErrorMessage!==void 0){this.renderErrorMessage(t.searchErrorMessage);return}yield this.renderSearchResults(t)})}explainQuery(){if(this.query.queryLayoutOptions.explainQuery){let t=ox(this.source,Me.getInstance(),or.getInstance(),this.tasksFile);this.renderExplanation(t)}}renderSearchResults(t){return A(this,null,function*(){this.renderSearchResultsHeader(t),yield this.addAllTaskGroups(t.taskGroups);let e=t.totalTasksCount;this.query.debug(`[render] ${e} tasks displayed`),this.renderSearchResultsFooter(t)})}addAllTaskGroups(t){return A(this,null,function*(){for(let e of t.groups)yield this.addGroupHeadings(e.groupHeadings),this.addedListItems.clear(),yield this.addTaskList(e.tasks)})}addTaskList(t){return A(this,null,function*(){this.beginTaskList();try{this.query.queryLayoutOptions.hideTree?yield this.addFlatTaskList(t):yield this.addTreeTaskList(t)}finally{this.endTaskList()}})}addFlatTaskList(t){return A(this,null,function*(){for(let[e,r]of t.entries())r instanceof ke&&(this.beginListItem(),yield this.addTask(r,e))})}addTreeTaskList(t){return A(this,null,function*(){for(let[e,r]of t.entries())this.alreadyAdded(r)||this.willBeAddedLater(r,t)||(this.beginListItem(),r instanceof ke?yield this.addTask(r,e):yield this.addListItem(r,e),yield this.addChildren(r.children),this.addedListItems.add(r))})}willBeAddedLater(t,e){let r=t.findClosestParentTask();return r?!!(!this.addedListItems.has(r)&&e.includes(r)):!1}alreadyAdded(t){return this.addedListItems.has(t)}addChildren(t){return A(this,null,function*(){t.length>0&&(yield this.addTaskList(t))})}addGroupHeadings(t){return A(this,null,function*(){for(let e of t)yield this.addGroupHeading(e)})}};var af=class extends ro{constructor(e,r,i,s,a,o,l,u){super(o,l,u);this.content=document.createElement("div");this.ulElementStack=[];this.lastLIElement=document.createElement("li");this.renderMarkdown=e,this.obsidianComponent=r,this.obsidianApp=i,this.htmlQueryRendererParameters=a,this.taskLineRenderer=new zi({textRenderer:s,obsidianApp:i,obsidianComponent:r,taskLayoutOptions:u.taskLayoutOptions,queryLayoutOptions:u.queryLayoutOptions})}beginRender(){}renderSearchResultsHeader(e){J().searchResults.taskCountLocation==="top"&&this.addTaskCount(e)}renderSearchResultsFooter(e){J().searchResults.taskCountLocation!=="top"&&this.addTaskCount(e)}renderErrorMessage(e){let r=ze("div",this.content),i=ze("pre",r);i.textContent=`Tasks query: ${e}`}renderLoadingMessage(){this.content.textContent="Loading Tasks ..."}renderExplanation(e){let r=ze("pre",this.content);r.classList.add("plugin-tasks-query-explanation"),r.textContent=e}beginTaskList(){let r=this.ulElementStack.length===0?this.content:this.lastLIElement,i=ze("ul",r);i.classList.add("contains-task-list","plugin-tasks-query-result",...new sf(this.query.taskLayoutOptions).generateHiddenClasses(),...new rf(this.query.queryLayoutOptions).getHiddenClasses());let s=this.getGroupingAttribute();s&&s.length>0&&(i.dataset.taskGroupBy=s),this.ulElementStack.push(i)}endTaskList(){this.ulElementStack.pop()}beginListItem(){let e=this.currentULElement();this.lastLIElement=ze("li",e)}addListItem(e,r){return A(this,null,function*(){yield this.taskLineRenderer.renderListItem(this.lastLIElement,e,r)})}addTask(e,r){return A(this,null,function*(){let i=this.isFilenameUnique({task:e},this.htmlQueryRendererParameters.allMarkdownFiles()),s=this.lastLIElement;yield this.taskLineRenderer.renderTaskLine({li:s,task:e,taskIndex:r,isTaskInQueryFile:this.filePath===e.path,isFilenameUnique:i}),s.querySelectorAll("[data-footnote-id]").forEach(u=>u.remove());let o=ze("span",s);o.classList.add("task-extras"),this.query.queryLayoutOptions.hideUrgency||this.addUrgency(o,e);let l=this.query.queryLayoutOptions.shortMode;this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(o,e,l,i),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(o,e),!this.query.queryLayoutOptions.hidePostponeButton&&I1(e)&&this.addPostponeButton(o,e,l),this.currentULElement().appendChild(s)})}addEditButton(e,r){let i=ze("a",e);i.classList.add("tasks-edit"),i.title="Edit task",i.href="#",i.addEventListener("click",s=>this.htmlQueryRendererParameters.editTaskPencilClickHandler(s,r,this.htmlQueryRendererParameters.allTasks()))}addUrgency(e,r){let i=new Intl.NumberFormat().format(r.urgency),s=ze("span",e);s.textContent=i,s.classList.add("tasks-urgency")}addGroupHeading(e){return A(this,null,function*(){let r="h6";e.nestingLevel===0?r="h4":e.nestingLevel===1&&(r="h5");let i=ze(r,this.content);if(i.classList.add("tasks-group-heading"),this.obsidianComponent===null){i.textContent="For test purposes: "+e.displayName;return}yield this.renderMarkdown(this.obsidianApp,e.displayName,i,this.tasksFile.path,this.obsidianComponent)})}addBacklinks(e,r,i,s){var u;let a=ze("span",e);a.classList.add("tasks-backlink"),i||a.append(" (");let o=ze("a",a);o.rel="noopener",o.target="_blank",o.classList.add("internal-link"),i&&o.classList.add("internal-link-short-mode");let l;i?l=" \u{1F517}":l=(u=r.getLinkText({isFilenameUnique:s}))!=null?u:"",o.text=l,o.addEventListener("click",c=>A(this,null,function*(){yield this.htmlQueryRendererParameters.backlinksClickHandler(c,r)})),o.addEventListener("mousedown",c=>A(this,null,function*(){yield this.htmlQueryRendererParameters.backlinksMousedownHandler(c,r)})),i||a.append(")")}addPostponeButton(e,r,i){let o=Y1(r,1,"day"),l=ze("a",e);l.classList.add("tasks-postpone"),i&&l.classList.add("tasks-postpone-short-mode"),l.title=o,l.addEventListener("click",u=>{u.preventDefault(),u.stopPropagation(),Zl.postponeOnClickCallback(l,r,1,"day")}),l.addEventListener("contextmenu",u=>A(null,null,function*(){Vl(u,new Zl(l,r))}))}addTaskCount(e){if(!this.query.queryLayoutOptions.hideTaskCount){let r=ze("div",this.content);r.classList.add("task-count"),r.textContent=e.totalTasksCountDisplayText()}}isFilenameUnique({task:e},r){let i=e.path.match(/([^/]*)\..+$/i);if(i===null)return;let s=i[1];return r.filter(o=>{if(o.basename===s)return!0}).length<2}getGroupingAttribute(){let e=[];for(let r of this.query.grouping)e.push(r.property);return e.join(",")}currentULElement(){return this.ulElementStack[this.ulElementStack.length-1]}};var of=class extends ro{constructor(e,r,i){super(e,r,i);this.markdownLines=[];this.taskIndentationLevel=0}get markdown(){return this.markdownLines.join(` +`)}beginRender(){this.markdownLines.length=0,this.taskIndentationLevel=0}renderSearchResultsHeader(e){}renderSearchResultsFooter(e){}renderLoadingMessage(){}renderExplanation(e){e&&this.markdownLines.push(e)}renderErrorMessage(e){this.markdownLines.push(e)}beginTaskList(){this.taskIndentationLevel+=1}endTaskList(){this.taskIndentationLevel-=1,this.taskIndentationLevel===0&&this.addEmptyLine()}addEmptyLine(){this.markdownLines.push("")}beginListItem(){}addTask(e,r){return this.markdownLines.push(this.formatTask(e)),Promise.resolve()}formatTask(e){return`${this.listItemIndentation()}- [${e.status.symbol}] ${e.toString()}`}addListItem(e,r){return this.markdownLines.push(this.formatListItem(e)),Promise.resolve()}formatListItem(e){let r=e.statusCharacter?`[${e.statusCharacter}] `:"";return`${this.listItemIndentation()}- ${r}${e.description}`}listItemIndentation(){let e=Math.max(0,this.taskIndentationLevel-1);return" ".repeat(e)}addGroupHeading(e){let r="#".repeat(Math.min(4+e.nestingLevel,6));return this.markdownLines.push(`${r} ${e.displayName}`),this.addEmptyLine(),Promise.resolve()}};var lf=class{constructor(t,e,r,i,s,a,o,l){this._filterString="";this.source=e,this._tasksFile=r,this.queryResult=new Sr("").applyQueryToTasks([]),this.filteredQueryResult=this.queryResult,t==="block-language-tasks"?(this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks"):(this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks"),this.renderMarkdown=i,this.obsidianComponent=s,this.obsidianApp=a,this.textRenderer=o,this.htmlQueryRendererParameters=l}get filterString(){return this._filterString}makeQueryFromSourceAndTasksFile(){return nf(this.source,or.getInstance(),this.tasksFile)}get tasksFile(){return this._tasksFile}setTasksFile(t){this._tasksFile=t,this.rereadQueryFromFile()}rereadQueryFromFile(){this.query=this.makeQueryFromSourceAndTasksFile()}get filePath(){return this.tasksFile.path}render(t,e,r){return A(this,null,function*(){this.performSearch(e),this.addToolbar(r),yield this.renderQueryResult(t,this.filteredQueryResult,r)})}performSearch(t){let e=new ks(`Search: ${this.query.queryId} - ${this.filePath}`);e.start(),this.queryResult=this.query.applyQueryToTasks(t),this.filterResults(),e.finish()}renderQueryResult(t,e,r){return A(this,null,function*(){let i=new ks(`Render: ${this.query.queryId} - ${this.filePath}`);i.start();let s=new af(this.renderMarkdown,this.obsidianComponent,this.obsidianApp,this.textRenderer,this.htmlQueryRendererParameters,this.source,this.tasksFile,this.query);s.content=r,yield s.renderQuery(t,e),i.finish()})}addToolbar(t){if(this.query.queryLayoutOptions.hideToolbar)return;let e=ze("div",t);e.classList.add("plugin-tasks-toolbar"),this.addSearchBox(e,t),this.addCopyButton(e)}addSearchBox(t,e){let r=ze("label",t);(0,zr.setIcon)(r,"lucide-filter");let i=ze("input",r);i.value=this._filterString,i.placeholder="Filter by description...",(0,zr.setTooltip)(i,"Filter results");let s=()=>A(this,null,function*(){let a=i.value;yield this.applySearchBoxFilterAndRerender(a,e)});i.addEventListener("input",(0,zr.debounce)(s,500,!0))}applySearchBoxFilterAndRerender(t,e){return A(this,null,function*(){for(this._filterString=t,this.filterResults();e.firstElementChild!==e.lastElementChild;){let r=e.lastChild;if(r===null)break;r.remove()}yield this.renderQueryResult("Warm",this.filteredQueryResult,e)})}filterResults(){let{filter:t,error:e}=new Fa().createFilterOrErrorMessage("description includes "+this._filterString);if(e){this.filteredQueryResult=this.queryResult;return}this.filteredQueryResult=this.queryResult.applyFilter(t)}addCopyButton(t){let e=ze("button",t);(0,zr.setIcon)(e,"lucide-copy"),(0,zr.setTooltip)(e,"Copy results"),e.addEventListener("click",()=>A(this,null,function*(){let r=yield this.resultsAsMarkdown();yield navigator.clipboard.writeText(r),new zr.Notice("Results copied to clipboard")}))}resultsAsMarkdown(){return A(this,null,function*(){let t=new of(this.source,this.tasksFile,this.query);return yield t.renderQuery("Warm",this.filteredQueryResult),t.markdown})}};var uf=class{constructor({plugin:t,events:e}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=t.app,this.plugin=t,this.events=e,t.registerMarkdownCodeBlockProcessor("tasks",(r,i,s)=>{t.app.workspace.onLayoutReady(()=>{this.addQueryRenderChild(r,i,s)})})}_addQueryRenderChild(t,e,r){return A(this,null,function*(){let i=this.app,s=r.sourcePath,a=i.vault.getAbstractFileByPath(s),o=null;a&&a instanceof wi.TFile&&(o=i.metadataCache.getFileCache(a));let l=new ft(s,o!=null?o:{}),u=new _b({app:i,plugin:this.plugin,events:this.events,container:e,source:t,tasksFile:l});r.addChild(u),u.load()})}},_b=class extends wi.MarkdownRenderChild{constructor({app:e,plugin:r,events:i,container:s,source:a,tasksFile:o}){super(s);this.isCacheChangedSinceLastRedraw=!1;this.observer=null;this.isRendering=!1;this.app=e,this.plugin=r,this.events=i,this.queryResultsRenderer=new lf(this.containerEl.className,a,o,wi.MarkdownRenderer.render,this,this.app,zi.obsidianMarkdownRenderer,{allTasks:()=>this.plugin.getTasks(),allMarkdownFiles:()=>this.app.vault.getMarkdownFiles(),backlinksClickHandler:kW(this.app),backlinksMousedownHandler:_W(this.app),editTaskPencilClickHandler:vW(this.app,()=>A(this,null,function*(){return yield this.plugin.saveSettings()}))}),this.queryResultsRenderer.query.debug("[render] QueryRenderChild.constructor() entered"),this.debouncedRenderFn=(0,wi.debounce)(l=>this.render(l),300,!0)}onload(){this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onload() entered"),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadSearchResultsEventRef=this.events.onReloadOpenSearchResults(this.rereadQueryFromFile.bind(this)),this.reloadQueryAtMidnight(),this.registerEvent(this.app.metadataCache.on("changed",(e,r,i)=>{let s=e.path;s===this.queryResultsRenderer.filePath&&this.handleMetadataOrFilePathChange(s,i)})),this.registerEvent(this.app.vault.on("rename",(e,r)=>{if(r!==this.queryResultsRenderer.filePath)return;let i=null;e&&e instanceof wi.TFile&&(i=this.app.metadataCache.getFileCache(e)),this.handleMetadataOrFilePathChange(e.path,i)})),this.setupVisibilityObserver()}setupVisibilityObserver(){this.observer||(this.observer=new IntersectionObserver(([e])=>{this.containerEl.isShown()&&e.isIntersecting&&(this.queryResultsRenderer.query.debug(`[render][observer] Became visible, isCacheChangedSinceLastRedraw:${this.isCacheChangedSinceLastRedraw}`),this.isCacheChangedSinceLastRedraw&&(this.queryResultsRenderer.query.debug("[render][observer] ... updating search results"),this.render({tasks:this.plugin.getTasks(),state:this.plugin.getState()}).then().catch(r=>console.error(r))))}),this.observer.observe(this.containerEl))}handleMetadataOrFilePathChange(e,r){let i=this.queryResultsRenderer.tasksFile,s=new ft(e,r!=null?r:{}),a=i.path!==s.path,o=!i.rawFrontmatterIdenticalTo(s);(a||o)&&(this.queryResultsRenderer.setTasksFile(s),this.events.triggerRequestCacheUpdate(this.render.bind(this)))}onunload(){var e;this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onunload() entered"),this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.reloadSearchResultsEventRef!==void 0&&this.events.off(this.reloadSearchResultsEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout),this.debouncedRenderFn.cancel(),(e=this.observer)==null||e.disconnect(),this.observer=null}reloadQueryAtMidnight(){let e=new Date;e.setHours(24,0,0,0);let r=new Date,i=e.getTime()-r.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=nf(this.queryResultsRenderer.source,or.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}debouncedRender(e){this.debouncedRenderFn(e)}render(i){return A(this,arguments,function*({tasks:e,state:r}){this.isCacheChangedSinceLastRedraw=!0,requestAnimationFrame(()=>A(this,null,function*(){if(!this.isRendering){if(this.isRendering=!0,!this.containerEl.isConnected){this.queryResultsRenderer.query.debug("[render] Ignoring redraw request, as code block is not connected."),this.isRendering=!1;return}if(!this.containerEl.isShown()){this.queryResultsRenderer.query.debug("[render] Ignoring redraw request, as code block is not shown."),this.isRendering=!1;return}yield this.renderResults(r,e),this.isCacheChangedSinceLastRedraw=!1,this.isRendering=!1}}))})}renderResults(e,r){return A(this,null,function*(){var s;let i=ze("div",this.containerEl);yield this.queryResultsRenderer.render(e,r,i),(s=this.containerEl.firstChild)==null||s.replaceWith(i)})}rereadQueryFromFile(){this.queryResultsRenderer.rereadQueryFromFile(),this.isCacheChangedSinceLastRedraw=!0,this.debouncedRender({tasks:this.plugin.getTasks(),state:this.plugin.getState()})}};function vW(n,t){return function(r,i,s){r.preventDefault();let a=l=>A(null,null,function*(){yield qn({originalTask:i,newTasks:Yt.removeInferredStatusIfNeeded(i,l)})});new jr({app:n,task:i,onSaveSettings:t,onSubmit:a,allTasks:s}).open()}}function kW(n){return function(e,r){return A(this,null,function*(){let i=yield Ny(r,n.vault);if(i){let[s,a]=i,o=n.workspace.getLeaf(ux.Keymap.isModEvent(e));e.preventDefault(),yield o.openFile(a,{eState:{line:s}})}})}}function _W(n){return function(e,r){return A(this,null,function*(){if(e.button===1){e.preventDefault();let i=yield Ny(r,n.vault);if(i){let[s,a]=i;yield n.workspace.getLeaf("tab").openFile(a,{eState:{line:s}})}}})}}yt();var me=require("obsidian");In();br();yr();Di();ya();var cf=class{constructor(t){this._markdown="";this.columnNames=t,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let t="|",e="|";this.columnNames.forEach(r=>{t+=` ${r} |`,e+=" ----- |"}),this._markdown+=`${t} +`,this._markdown+=`${e} +`}addRow(t){let e=this.makeRowText(t);this._markdown+=`${e} +`}addRowIfNew(t){let e=this.makeRowText(t);this._markdown.includes(e)||(this._markdown+=`${e} +`)}makeRowText(t){let e="|";return t.forEach(r=>{e+=` ${r} |`}),e}};Di();dn();In();yr();br();function cx(n,t){return n.findIndex(e=>e.symbol===t)}function Si(n){return n===""?n:"`"+(n!==" "?n:"space")+"`"}function wW(n,t){let e=xe.getTypeForUnknownSymbol(n.symbol);if(n.type===e||e==="TODO"&&n.symbol!==" ")return;let r=Si(n.symbol),i=Si(e);t.push(O.t("reports.statusRegistry.messages.notConventionalType",{symbol:r,type:i}))}function SW(n,t,e){let r=t.nextStatusSymbol,i=cx(n,r);if(i===-1){let a=Si(r);e.push(O.t("reports.statusRegistry.messages.nextSymbolUnknown",{symbol:a}));return}if(t.type!=="DONE")return;let s=n[i];if(s){if(s.type!=="TODO"&&s.type!=="IN_PROGRESS"){let a="https://publish.obsidian.md/tasks/Getting+Started/Statuses/Recurring+Tasks+and+Custom+Statuses",o=Si(s.type),l=[O.t("reports.statusRegistry.messages.wrongTypeAfterDone.line1",{nextType:o}),O.t("reports.statusRegistry.messages.wrongTypeAfterDone.line2"),O.t("reports.statusRegistry.messages.wrongTypeAfterDone.line3",{helpURL:a})].join("
");e.push(l)}}else e.push(O.t("reports.statusRegistry.messages.cannotFindNextStatus"))}function DW(n,t,e){let r=[];if(t.symbol===xe.EMPTY.symbol)return r.push(O.t("reports.statusRegistry.messages.emptySymbol")),r;if(cx(n,t.symbol)!=e){let s=Si(t.symbol);return r.push(O.t("reports.statusRegistry.messages.duplicateSymbol",{symbol:s})),r}return wW(t,r),SW(n,t,r),r}function dx(n){let t=new cf([O.t("reports.statusRegistry.columnHeadings.statusSymbol"),O.t("reports.statusRegistry.columnHeadings.nextStatusSymbol"),O.t("reports.statusRegistry.columnHeadings.statusName"),O.t("reports.statusRegistry.columnHeadings.statusType"),O.t("reports.statusRegistry.columnHeadings.problems")]),e=wt.allStatuses(n);return e.forEach((r,i)=>{t.addRow([Si(r.symbol),Si(r.nextStatusSymbol),r.name,Si(r.type),DW(e,r,i).join("
")])}),t.markdown}function fx(n){let t=new Ze;return wt.applyToStatusRegistry(n,t),t.registeredStatuses.map((r,i)=>{let s=Me.getInstance(),a=s.isEmpty()?"":s.get()+" ",o=`Sample task ${i+1}`,l=`status symbol=${Si(r.symbol)}`,u=`status name='${r.name}'`;return`- [${r.symbol}] ${a}${o}: ${l} ${u}`})}function px(n,t,e,r){let s=dx(n),a=t.mermaidDiagram(!0),o=fx(n);return`# ${e} + +## ${O.t("reports.statusRegistry.about.title")} + +${O.t("reports.statusRegistry.about.createdBy",{version:r})} + +${O.t("reports.statusRegistry.about.updateReport.line1")} + +- ${O.t("reports.statusRegistry.about.updateReport.line2")} +- ${O.t("reports.statusRegistry.about.updateReport.line3")} + +${O.t("reports.statusRegistry.about.deleteFileAnyTime")} + +## ${O.t("reports.statusRegistry.statusSettings.title")} + + + +${O.t("reports.statusRegistry.statusSettings.theseAreStatusValues")} + +${s} +## ${O.t("reports.statusRegistry.loadedSettings.title")} + + + +${O.t("reports.statusRegistry.loadedSettings.settingsActuallyUsed")} +${a} + +## ${O.t("reports.statusRegistry.sampleTasks.title")} + +${O.t("reports.statusRegistry.sampleTasks.line1")} + +${O.t("reports.statusRegistry.sampleTasks.line2")} + +${O.t("reports.statusRegistry.sampleTasks.line3")} + +> [!Tip] ${O.t("reports.statusRegistry.sampleTasks.tip.line1")} +> ${O.t("reports.statusRegistry.sampleTasks.tip.line2",{url:"https://publish.obsidian.md/tasks/How+To/Style+custom+statuses"})} + +${o.join(` +`)} + +## ${O.t("reports.statusRegistry.searchSampleTasks.title")} + +${O.t("reports.statusRegistry.searchSampleTasks.line1")} + +\`\`\`tasks +path includes {{query.file.path}} +group by status.type +group by status.name +sort by function task.lineNumber +hide postpone button +short mode +\`\`\` +`}Di();function mx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function hx(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function gx(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function yx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function bx(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["<","Migrated","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function Tx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function vx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function kx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}yt();dn();ya();var Er=require("obsidian");In();In();yr();br();var df=class n{validate(t){let e=[];return e.push(...this.validateSymbol(t)),e.push(...this.validateName(t)),e.push(...this.validateNextSymbol(t)),e}validateStatusCollectionEntry(t){let[e,r,i,s]=t,a=[];if(a.push(...this.validateType(s)),e===i&&s!=="NON_TASK"&&a.push(`Status symbol '${e}' toggles to itself`),a.length>0)return a;let o=xe.createFromImportedValue(t).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(t){return n.validateOneSymbol(t.symbol,"Task Status Symbol")}validateNextSymbol(t){return n.validateOneSymbol(t.nextStatusSymbol,"Task Next Status Symbol")}validateName(t){let e=[];return t.name.length===0&&e.push("Task Status Name cannot be empty."),e}validateType(t){let e=Vt[t],r=[];return e||r.push(`Status Type "${t}" is not a valid type`),e=="EMPTY"&&r.push('Status Type "EMPTY" is not permitted in user data'),r}validateSymbolTypeConventions(t){let e=[],r=t.symbol,i=new Ze,s=r==="X"?"x":r,a=i.bySymbol(s);return a.type!=="EMPTY"&&(t.nextStatusSymbol!==a.nextStatusSymbol&&e.push(`Next Status Symbol for symbol '${r}': '${t.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),t.type!==a.type&&e.push(`Status Type for symbol '${r}': '${t.type}' is inconsistent with convention '${a.type}'`)),e}static validateOneSymbol(t,e){let r=[];return t.length===0&&r.push(`${e} cannot be empty.`),t.length>1&&r.push(`${e} ("${t}") must be a single character.`),r}};yr();Di();var qs=new df,ff=class n extends Er.Modal{constructor(e,r,i){super(e.app);this.plugin=e;this.saved=!1;this.error=!1;this.statusSymbol=r.symbol,this.statusName=r.name,this.statusNextSymbol=r.nextStatusSymbol,this.statusAvailableAsCommand=r.availableAsCommand,this.type=r.type,this.isCoreStatus=i}statusConfiguration(){return new Tt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return A(this,null,function*(){let{contentEl:e}=this;e.empty();let r=e.createDiv(),i;new Er.Setting(r).setName(O.t("modals.customStatusModal.editStatusSymbol.name")).setDesc(O.t("modals.customStatusModal.editStatusSymbol.description")).addText(u=>{i=u,u.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,n.setValid(u,qs.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(u=>{n.setValid(i,qs.validateSymbol(this.statusConfiguration()))});let s;new Er.Setting(r).setName(O.t("modals.customStatusModal.editStatusName.name")).setDesc(O.t("modals.customStatusModal.editStatusName.description")).addText(u=>{s=u,u.setValue(this.statusName).onChange(c=>{this.statusName=c,n.setValid(u,qs.validateName(this.statusConfiguration()))})}).then(u=>{n.setValid(s,qs.validateName(this.statusConfiguration()))});let a;new Er.Setting(r).setName(O.t("modals.customStatusModal.editNextStatusSymbol.name")).setDesc(O.t("modals.customStatusModal.editNextStatusSymbol.description")).addText(u=>{a=u,u.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,n.setValid(u,qs.validateNextSymbol(this.statusConfiguration()))})}).then(u=>{n.setValid(a,qs.validateNextSymbol(this.statusConfiguration()))}),new Er.Setting(r).setName(O.t("modals.customStatusModal.editStatusType.name")).setDesc(O.t("modals.customStatusModal.editStatusType.description")).addDropdown(u=>{["TODO","IN_PROGRESS","ON_HOLD","DONE","CANCELLED","NON_TASK"].forEach(d=>{u.addOption(d,d)}),u.setValue(this.type).onChange(d=>{this.type=xe.getTypeFromStatusTypeString(d)})}),xe.tasksPluginCanCreateCommandsForStatuses()&&new Er.Setting(r).setName(O.t("modals.customStatusModal.editAvailableAsCommand.name")).setDesc(O.t("modals.customStatusModal.editAvailableAsCommand.description")).addToggle(u=>{u.setValue(this.statusAvailableAsCommand).onChange(c=>A(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=e.createDiv(),l=new Er.Setting(o);l.addButton(u=>(u.setTooltip("Save").setIcon("checkmark").onClick(()=>A(this,null,function*(){let c=qs.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +`)+` + +`+O.t("modals.customStatusModal.fixErrorsBeforeSaving");new Er.Notice(d);return}this.saved=!0,this.close()})),u)),l.addExtraButton(u=>(u.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),u))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,r){r.length===0?n.removeValidationError(e):n.setValidationError(e)}};var wb=require("obsidian");function _x(n,t,e){if(t===e||!Object.prototype.hasOwnProperty.call(n,t))return U({},n);let r={};for(let[i,s]of Object.entries(n))i===t?r[e]=s:r[i]=s;return r}var Jl=class{constructor(t,e,r){this.originalName=t,this.isValid=e,this.errorMessage=r}},pf=class{validateRenames(t){let e={};for(let[r,i]of Object.entries(t)){let s={};for(let[a,o]of Object.entries(t))a!==r&&(s[o]="");e[r]=this.validateRename(s,"",i)}return e}validateRename(t,e,r){if(!r||r.trim()==="")return new Jl(e,!1,"Preset name cannot be empty or all whitespace");for(let i of Object.keys(t))if(i!==e&&i.trim()===r.trim())return new Jl(e,!1,"A preset with this name already exists");return new Jl(e,!0,null)}addPreset(t){let e=this.generateUniqueKey(t),r=U({},t);return r[e]="",{presets:r,newKey:e}}renamePreset(t,e,r){return!r||r.trim()===""||(r=r.trim(),this.wouldCreateDuplicateKey(t,e,r))?null:_x(t,e,r)}deletePreset(t,e){let r=U({},t);return delete r[e],r}updatePresetValue(t,e,r){let i=U({},t);return i[e]=r,i}wouldCreateDuplicateKey(t,e,r){let i=r.trim();if(e.trim()===i)return!1;for(let s of Object.keys(t))if(s!==e&&s.trim()===i)return!0;return!1}generateUniqueKey(t){let e="new_key",r=1;for(;Object.prototype.hasOwnProperty.call(t,`${e}_${r}`);)r++;return`${e}_${r}`}reorderPreset(t,e,r){let i=Object.keys(t),s=i.indexOf(e);if(s===-1||r<0||r>=i.length)return null;if(s===r)return U({},t);let a=[...i];a.splice(s,1),a.splice(r,0,e);let o={};for(let l of a)o[l]=t[l];return o}};Di();yt();var mf=class{constructor(t,e){this.presetsSettingsService=new pf;this.nameFields=new Map;this.plugin=t,this.events=e}renderPresetsSettings(t){let e=t.createDiv(),r=J(),i=()=>{e.empty(),this.nameFields.clear(),Object.entries(r.presets).forEach(([s,a])=>{this.renderPresetItem(e,r,s,a,i)})};i(),this.createAddNewPresetButton(t,r,i)}renderPresetItem(t,e,r,i,s){let a=t.createDiv({cls:"tasks-presets-wrapper"}),o=new wb.Setting(a);o.settingEl.addClass("tasks-presets-setting"),a.setAttribute("data-preset-key",r),o.addText(l=>{l.setPlaceholder("Name").setValue(r),l.inputEl.addClass("tasks-presets-key"),this.nameFields.set(r,{inputEl:l.inputEl,originalKey:r});let u=r;l.inputEl.addEventListener("input",d=>{u=d.target.value,this.validateAllInputs()});let c=()=>A(this,null,function*(){if(u&&u!==r){let d=this.presetsSettingsService.renamePreset(e.presets,r,u);d&&(yield this.savePresetsSettings(d,e,s))}});l.inputEl.addEventListener("blur",c),l.inputEl.addEventListener("keydown",d=>A(this,null,function*(){d.key==="Enter"&&(d.preventDefault(),l.inputEl.blur())}))}),o.addTextArea(l=>(l.inputEl.addClass("tasks-presets-value"),l.setPlaceholder("Query or filter text...").setValue(i),this.setupAutoResizingTextarea(l),l.onChange(u=>A(this,null,function*(){let c=this.presetsSettingsService.updatePresetValue(e.presets,r,u);yield this.savePresetsSettings(c,e,null)})))),o.addExtraButton(l=>{l.extraSettingsEl.addClass("tasks-presets-drag-handle"),l.setIcon("grip-vertical").setTooltip("Drag to reorder"),l.extraSettingsEl.style.cursor="grab",l.extraSettingsEl.addEventListener("mousedown",u=>{a.draggable=!0,l.extraSettingsEl.style.cursor="grabbing"}),l.extraSettingsEl.addEventListener("mouseup",u=>{l.extraSettingsEl.style.cursor="grab"})}),o.addExtraButton(l=>{l.extraSettingsEl.addClass("tasks-presets-delete-button"),l.setIcon("cross").setTooltip("Delete").onClick(()=>A(this,null,function*(){let u=this.presetsSettingsService.deletePreset(e.presets,r);yield this.savePresetsSettings(u,e,s)}))}),this.setupDragAndDrop(a,r,e,s),o.infoEl.remove()}setupDragAndDrop(t,e,r,i){t.addEventListener("dragstart",s=>{s.dataTransfer&&(s.dataTransfer.setData("text/plain",e),s.dataTransfer.effectAllowed="move"),t.addClass("tasks-presets-dragging")}),t.addEventListener("dragend",s=>{t.draggable=!1,t.removeClass("tasks-presets-dragging"),this.clearDropIndicators()}),t.addEventListener("dragover",s=>{s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="move"),this.showDropIndicator(t,s)}),t.addEventListener("dragleave",s=>{let a=t.getBoundingClientRect(),o=s.clientX,l=s.clientY;(oa.right||la.bottom)&&this.clearDropIndicator(t)}),t.addEventListener("drop",s=>A(this,null,function*(){var c;s.preventDefault();let a=(c=s.dataTransfer)==null?void 0:c.getData("text/plain");if(!a||a===e){this.clearDropIndicators();return}let o=this.calculateDropPosition(t,s),l=this.getTargetIndex(e,o),u=this.presetsSettingsService.reorderPreset(r.presets,a,l);u&&(yield this.savePresetsSettings(u,r,i)),this.clearDropIndicators()}))}getTargetIndex(t,e){let r=J(),s=Object.keys(r.presets).indexOf(t);return e==="above"?s:s+1}showDropIndicator(t,e){this.clearDropIndicators(),this.calculateDropPosition(t,e)==="above"?t.addClass("tasks-presets-drop-above"):t.addClass("tasks-presets-drop-below")}calculateDropPosition(t,e){let r=t.getBoundingClientRect(),i=r.top+r.height/2;return e.clientY{this.clearDropIndicator(e)})}clearDropIndicator(t){t.removeClass("tasks-presets-drop-above"),t.removeClass("tasks-presets-drop-below")}validateAllInputs(){let t={};this.nameFields.forEach(({inputEl:r,originalKey:i})=>{t[i]=r.value});let e=this.presetsSettingsService.validateRenames(t);this.nameFields.forEach(({inputEl:r,originalKey:i})=>{var a;let s=e[i];s&&!s.isValid?(r.addClass("has-error"),r.title=(a=s.errorMessage)!=null?a:""):(r.removeClass("has-error"),r.title="")})}setupAutoResizingTextarea(t){let e=()=>{t.inputEl.style.height="auto",t.inputEl.style.height=`${t.inputEl.scrollHeight}px`};e(),t.inputEl.addEventListener("input",e)}createAddNewPresetButton(t,e,r){new wb.Setting(t).addButton(i=>{i.setButtonText(O.t("settings.presets.buttons.addNewPreset")).setCta().onClick(()=>A(this,null,function*(){let{presets:s}=this.presetsSettingsService.addPreset(e.presets);yield this.savePresetsSettings(s,e,r)}))})}savePresetsSettings(t,e,r){return A(this,null,function*(){it({presets:t}),yield this.plugin.saveSettings(),e.presets=U({},t),r&&r(),this.events.triggerReloadOpenSearchResults()})}};var at=class at extends me.PluginSettingTab{constructor({plugin:e,events:r}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e,this.presetsSettingsUI=new mf(e,r),this.events=r}saveSettings(e){return A(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),new me.Setting(e).setName(O.t("settings.format.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.format.description.line1")}

${O.t("settings.format.description.line2")}

${O.t("settings.changeRequiresRestart")}

`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats"))).addDropdown(c=>{for(let d of Object.keys(Nn))c.addOption(d,Nn[d].getDisplayName());c.setValue(J().taskFormat).onChange(d=>A(this,null,function*(){it({taskFormat:d}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.globalFilter.heading")).setHeading();let r=null;new me.Setting(e).setName(O.t("settings.globalFilter.filter.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.globalFilter.filter.description.line1")}

${O.t("settings.globalFilter.filter.description.line2")}

${O.t("settings.globalFilter.filter.description.line3")}
${O.t("settings.globalFilter.filter.description.line4")}

`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Global+Filter"))).addText(c=>{c.setPlaceholder(O.t("settings.globalFilter.filter.placeholder")).setValue(Me.getInstance().get()).onChange((0,me.debounce)(d=>A(this,null,function*(){it({globalFilter:d}),Me.getInstance().set(d),yield this.plugin.saveSettings(),Qr(r,d.length>0),this.events.triggerReloadVault()}),500,!0))}),r=new me.Setting(e).setName(O.t("settings.globalFilter.removeFilter.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.globalFilter.removeFilter.description")}

${O.t("settings.changeRequiresRestart")}

`)).addToggle(c=>{let d=J();c.setValue(d.removeGlobalFilter).onChange(f=>A(this,null,function*(){it({removeGlobalFilter:f}),Me.getInstance().setRemoveGlobalFilter(f),yield this.plugin.saveSettings()}))}),Qr(r,J().globalFilter.length>0),new me.Setting(e).setName(O.t("settings.globalQuery.heading")).setHeading(),OW(new me.Setting(e).setDesc(at.createFragmentWithHTML(`

${O.t("settings.globalQuery.query.description")}

`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Queries/Global+Query"))).addTextArea(c=>{let d=J();c.inputEl.rows=4,c.setPlaceholder("# "+O.t("settings.globalQuery.query.placeholder")).setValue(d.globalQuery).onChange(f=>A(this,null,function*(){it({globalQuery:f}),or.getInstance().set(f),yield this.plugin.saveSettings(),this.events.triggerReloadOpenSearchResults()}))})),new me.Setting(e).setName(O.t("settings.searches.heading")).setHeading(),new me.Setting(e).setName(O.t("settings.searches.enableCustomSearches.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.searches.enableCustomSearches.description.line1",{filterByFunction:"filter by function",sortByFunction:"sort by function",groupByFunction:"group by function"})}

${O.t("settings.searches.enableCustomSearches.description.line2")}

${O.t("settings.searches.enableCustomSearches.description.line3")}

${O.t("settings.searches.enableCustomSearches.description.line4")}

`)).addToggle(c=>{c.setValue(en.getInstance().get()).onChange(d=>A(this,null,function*(){en.getInstance().set(d),this.events.triggerReloadOpenSearchResults()}))}),new me.Setting(e).setName(O.t("settings.searchResults.heading")).setHeading(),new me.Setting(e).setName(O.t("settings.searchResults.taskCountLocation.name")).setDesc(O.t("settings.searchResults.taskCountLocation.description")).addDropdown(c=>{c.addOption("top",O.t("settings.searchResults.taskCountLocation.options.top")),c.addOption("bottom",O.t("settings.searchResults.taskCountLocation.options.bottom")),c.setValue(J().searchResults.taskCountLocation).onChange(d=>A(this,null,function*(){it({searchResults:{taskCountLocation:d}}),yield this.plugin.saveSettings(),this.events.triggerReloadOpenSearchResults()}))}),new me.Setting(e).setName(O.t("settings.presets.name")).setHeading().setDesc(at.createFragmentWithHTML("

"+O.t("settings.presets.line1",{name:"name",instruction1:"preset name",instruction2:"{{preset.name}}"})+"

"+O.t("settings.presets.line2")+"

"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Queries/Presets"))),this.presetsSettingsUI.renderPresetsSettings(e),new me.Setting(e).setName(O.t("settings.statuses.heading")).setHeading();let{headingOpened:i}=J();[{text:O.t("settings.statuses.coreStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

"+O.t("settings.statuses.coreStatuses.description.line1")+"

"+O.t("settings.statuses.coreStatuses.description.line2")+"

"+O.t("settings.changeRequiresRestart")+"

"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:O.t("settings.statuses.customStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"

"+O.t("settings.statuses.customStatuses.description.line1")+"

"+O.t("settings.statuses.customStatuses.description.line2")+"

"+O.t("settings.statuses.customStatuses.description.line3")+"

"+O.t("settings.changeRequiresRestart")+`

${O.t("settings.statuses.customStatuses.description.line4")}

`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}].forEach(c=>{var p;let d=(p=i[c.text])!=null?p:!0,f=this.addOneSettingsBlock(e,c,i);f.open=d}),new me.Setting(e).setName(O.t("settings.dates.heading")).setHeading(),new me.Setting(e).setName(O.t("settings.dates.createdDate.name")).setDesc(at.createFragmentWithHTML(O.t("settings.dates.createdDate.description")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date"))).addToggle(c=>{let d=J();c.setValue(d.setCreatedDate).onChange(f=>A(this,null,function*(){it({setCreatedDate:f}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.dates.doneDate.name")).setDesc(at.createFragmentWithHTML(O.t("settings.dates.doneDate.description")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date"))).addToggle(c=>{let d=J();c.setValue(d.setDoneDate).onChange(f=>A(this,null,function*(){it({setDoneDate:f}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.dates.cancelledDate.name")).setDesc(at.createFragmentWithHTML(O.t("settings.dates.cancelledDate.description")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Cancelled+date"))).addToggle(c=>{let d=J();c.setValue(d.setCancelledDate).onChange(f=>A(this,null,function*(){it({setCancelledDate:f}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.datesFromFileNames.heading")).setHeading();let a=null,o=null;new me.Setting(e).setName(O.t("settings.datesFromFileNames.scheduledDate.toggle.name")).setDesc(at.createFragmentWithHTML(O.t("settings.datesFromFileNames.scheduledDate.toggle.description.line1")+"
"+O.t("settings.datesFromFileNames.scheduledDate.toggle.description.line2")+"
"+O.t("settings.datesFromFileNames.scheduledDate.toggle.description.line3")+"
"+O.t("settings.datesFromFileNames.scheduledDate.toggle.description.line4")+`

${O.t("settings.changeRequiresRestart")}

`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date"))).addToggle(c=>{let d=J();c.setValue(d.useFilenameAsScheduledDate).onChange(f=>A(this,null,function*(){it({useFilenameAsScheduledDate:f}),Qr(a,f),Qr(o,f),yield this.plugin.saveSettings()}))}),a=new me.Setting(e).setName(O.t("settings.datesFromFileNames.scheduledDate.extraFormat.name")).setDesc(at.createFragmentWithHTML(O.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line1")+`

${O.t("settings.changeRequiresRestart")}

${O.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line2")}

`)).addText(c=>{let d=J();c.setPlaceholder(O.t("settings.datesFromFileNames.scheduledDate.extraFormat.placeholder")).setValue(d.filenameAsScheduledDateFormat).onChange(f=>A(this,null,function*(){it({filenameAsScheduledDateFormat:f}),yield this.plugin.saveSettings()}))}),o=new me.Setting(e).setName(O.t("settings.datesFromFileNames.scheduledDate.folders.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.datesFromFileNames.scheduledDate.folders.description")}

${O.t("settings.changeRequiresRestart")}

`)).addText(c=>A(this,null,function*(){let d=J();yield this.plugin.saveSettings(),c.setValue(at.renderFolderArray(d.filenameAsDateFolders)).onChange(f=>A(this,null,function*(){let p=at.parseCommaSeparatedFolders(f);it({filenameAsDateFolders:p}),yield this.plugin.saveSettings()}))})),Qr(a,J().useFilenameAsScheduledDate),Qr(o,J().useFilenameAsScheduledDate),new me.Setting(e).setName(O.t("settings.recurringTasks.heading")).setHeading(),new me.Setting(e).setName(O.t("settings.recurringTasks.nextLine.name")).setDesc(at.createFragmentWithHTML(O.t("settings.recurringTasks.nextLine.description")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{recurrenceOnNextLine:d}=J();c.setValue(d).onChange(f=>A(this,null,function*(){it({recurrenceOnNextLine:f}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.recurringTasks.removeScheduledDate.name")).setDesc(at.createFragmentWithHTML(O.t("settings.recurringTasks.removeScheduledDate.description.line1")+"
"+O.t("settings.recurringTasks.removeScheduledDate.description.line2")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{removeScheduledDateOnRecurrence:d}=J();c.setValue(d).onChange(f=>A(this,null,function*(){it({removeScheduledDateOnRecurrence:f}),yield this.plugin.saveSettings()}))}),new me.Setting(e).setName(O.t("settings.autoSuggest.heading")).setHeading();let l=null,u=null;new me.Setting(e).setName(O.t("settings.autoSuggest.toggle.name")).setDesc(at.createFragmentWithHTML(O.t("settings.autoSuggest.toggle.description")+`

${O.t("settings.changeRequiresRestart")}

`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest"))).addToggle(c=>{let d=J();c.setValue(d.autoSuggestInEditor).onChange(f=>A(this,null,function*(){it({autoSuggestInEditor:f}),yield this.plugin.saveSettings(),Qr(l,f),Qr(u,f)}))}),l=new me.Setting(e).setName(O.t("settings.autoSuggest.minLength.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.autoSuggest.minLength.description")}

${O.t("settings.changeRequiresRestart")}

`)).addSlider(c=>{let d=J();c.setLimits(0,3,1).setValue(d.autoSuggestMinMatch).setDynamicTooltip().onChange(f=>A(this,null,function*(){it({autoSuggestMinMatch:f}),yield this.plugin.saveSettings()}))}),u=new me.Setting(e).setName(O.t("settings.autoSuggest.maxSuggestions.name")).setDesc(at.createFragmentWithHTML(`

${O.t("settings.autoSuggest.maxSuggestions.description")}

${O.t("settings.changeRequiresRestart")}

`)).addSlider(c=>{let d=J();c.setLimits(3,20,1).setValue(d.autoSuggestMaxItems).setDynamicTooltip().onChange(f=>A(this,null,function*(){it({autoSuggestMaxItems:f}),yield this.plugin.saveSettings()}))}),Qr(l,J().autoSuggestInEditor),Qr(u,J().autoSuggestInEditor),new me.Setting(e).setName(O.t("settings.dialogs.heading")).setHeading(),new me.Setting(e).setName(O.t("settings.dialogs.accessKeys.name")).setDesc(at.createFragmentWithHTML(O.t("settings.dialogs.accessKeys.description")+"
"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts"))).addToggle(c=>{let d=J();c.setValue(d.provideAccessKeys).onChange(f=>A(this,null,function*(){it({provideAccessKeys:f}),yield this.plugin.saveSettings()}))})}seeTheDocumentation(e){return`

${O.t("settings.seeTheDocumentation")}.

`}addOneSettingsBlock(e,r,i){let s=e.createEl("details",{cls:"tasks-nested-settings",attr:U({},r.open||i[r.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[r.text]=s.open,it({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");return new me.Setting(a).setHeading().setName(r.text),a.createDiv("collapser").createDiv("handle"),r.notice!==null&&r.notice.html!==null&&new me.Setting(s).setDesc(at.createFragmentWithHTML(r.notice.html)),r.settings.forEach(o=>{var l;if(!(o.featureFlag!==""&&!oD(o.featureFlag))&&(o.type==="checkbox"?new me.Setting(s).setName(o.name).setDesc(o.description).addToggle(u=>{let c=J();c.generalSettings[o.settingName]||Ts(o.settingName,o.initialValue),u.setValue(c.generalSettings[o.settingName]).onChange(d=>A(this,null,function*(){Ts(o.settingName,d),yield this.plugin.saveSettings()}))}):o.type==="text"?new me.Setting(s).setName(o.name).setDesc(o.description).addText(u=>{let c=J();c.generalSettings[o.settingName]||Ts(o.settingName,o.initialValue);let d=f=>A(this,null,function*(){Ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(c.generalSettings[o.settingName].toString()).onChange((0,me.debounce)(d,500,!0))}):o.type==="textarea"?new me.Setting(s).setName(o.name).setDesc(o.description).addTextArea(u=>{let c=J();c.generalSettings[o.settingName]||Ts(o.settingName,o.initialValue);let d=f=>A(this,null,function*(){Ts(o.settingName,f),yield this.plugin.saveSettings()});u.setPlaceholder(o.placeholder.toString()).setValue(c.generalSettings[o.settingName].toString()).onChange((0,me.debounce)(d,500,!0)),u.inputEl.rows=8,u.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let u=s.createEl("p",{cls:o.notice.class,text:(l=o.notice.text)!=null?l:""});o.notice.html!==null&&u.append((0,me.sanitizeHTMLToDom)(o.notice.html))}}),s}static parseCommaSeparatedFolders(e){return e.split(",").map(r=>r.trim()).map(r=>r.replace(/^\/|\/$/g,"")).filter(r=>r!=="")}static renderFolderArray(e){return e.join(",")}insertTaskCoreStatusSettings(e,r){let{statusSettings:i}=J();i.coreStatuses.forEach(a=>{wx(e,a,i.coreStatuses,i,r,r.plugin,!0)}),new me.Setting(e).addButton(a=>{let o=O.t("settings.statuses.coreStatuses.buttons.checkStatuses.name");a.setButtonText(o).setCta().onClick(()=>A(this,null,function*(){let u=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${u}.md`,d=this.plugin.manifest.version,f=Ze.getInstance(),p=px(i,f,o,d),h=yield this.app.vault.create(c,p);yield this.app.workspace.getLeaf(!0).openFile(h)})),a.setTooltip(O.t("settings.statuses.coreStatuses.buttons.checkStatuses.tooltip"))}).infoEl.remove()}insertCustomTaskStatusSettings(e,r){let{statusSettings:i}=J();i.customStatuses.forEach(u=>{wx(e,u,i.customStatuses,i,r,r.plugin,!1)}),e.createEl("div"),new me.Setting(e).addButton(u=>{u.setButtonText(O.t("settings.statuses.customStatuses.buttons.addNewStatus.name")).setCta().onClick(()=>A(null,null,function*(){wt.addStatus(i.customStatuses,new Tt("","","",!1,"TODO")),yield io(i,r)}))}).infoEl.remove();let a=[[O.t("settings.statuses.collections.anuppuccinTheme"),mx()],[O.t("settings.statuses.collections.auraTheme"),hx()],[O.t("settings.statuses.collections.borderTheme"),gx()],[O.t("settings.statuses.collections.ebullientworksTheme"),yx()],[O.t("settings.statuses.collections.itsThemeAndSlrvbCheckboxes"),bx()],[O.t("settings.statuses.collections.minimalTheme"),vx()],[O.t("settings.statuses.collections.thingsTheme"),kx()],[O.t("settings.statuses.collections.lytModeTheme"),Tx()]];for(let[u,c]of a)new me.Setting(e).addButton(f=>{let p=O.t("settings.statuses.collections.buttons.addCollection.name",{themeName:u,numberOfStatuses:c.length});f.setButtonText(p).onClick(()=>A(null,null,function*(){yield xW(c,i,r)}))}).infoEl.remove();new me.Setting(e).addButton(u=>{u.setButtonText(O.t("settings.statuses.customStatuses.buttons.addAllUnknown.name")).setCta().onClick(()=>A(this,null,function*(){let d=this.plugin.getTasks().map(p=>p.status),f=Ze.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(p=>{wt.addStatus(i.customStatuses,p)}),yield io(i,r))}))}).infoEl.remove(),new me.Setting(e).addButton(u=>{u.setButtonText(O.t("settings.statuses.customStatuses.buttons.resetCustomStatuses.name")).setWarning().onClick(()=>A(this,null,function*(){wt.resetAllCustomStatuses(i),yield io(i,r)}))}).infoEl.remove()}};at.createFragmentWithHTML=e=>(0,me.sanitizeHTMLToDom)(e);var hf=at;function wx(n,t,e,r,i,s,a){let o=n.createEl("pre");o.addClass("row-for-status"),o.textContent=new xe(t).previewText();let l=new me.Setting(n);l.infoEl.replaceWith(o),a||l.addExtraButton(u=>{u.setIcon("cross").setTooltip("Delete").onClick(()=>A(null,null,function*(){wt.deleteStatus(e,t)&&(yield io(r,i))}))}),l.addExtraButton(u=>{u.setIcon("pencil").setTooltip("Edit").onClick(()=>A(null,null,function*(){let c=new ff(s,t,a);c.onClose=()=>A(null,null,function*(){c.saved&&wt.replaceStatus(e,t,c.statusConfiguration())&&(yield io(r,i))}),c.open()}))}),l.infoEl.remove()}function xW(n,t,e){return A(this,null,function*(){wt.bulkAddStatusCollection(t,n).forEach(i=>{new me.Notice(i)}),yield io(t,e)})}function io(n,t){return A(this,null,function*(){it({statusSettings:n}),wt.applyToStatusRegistry(n,Ze.getInstance()),yield t.saveSettings(!0)})}function OW(n){let{settingEl:t,infoEl:e,controlEl:r}=n,i=r.querySelector("textarea");i!==null&&(t.style.display="block",e.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}function Qr(n,t){n?n.setVisibility(t):console.warn("Setting has not be initialised. Can update visibility of setting UI - in setSettingVisibility")}br();vs();var Qi=require("obsidian");Sc();yt();iy();function RW(n){console.error(n),new Qi.Notice(n+` + +This message has been written to the console. +`,1e4)}var gf=class extends Qi.EditorSuggest{constructor(t,e,r){super(t),this.settings=e,this.plugin=r,t.scope.register([],"Tab",()=>{var s;let i=(s=this.context)==null?void 0:s.editor;return i?(i.exec("indentMore"),!1):!0})}onTrigger(t,e,r){if(!this.settings.autoSuggestInEditor||r===void 0)return null;let i=e.getLine(t.line);return!JS(i,t,e)||this.grabSuggestions(e,r,i).length===0?null:{start:{line:t.line,ch:0},end:{line:t.line,ch:i.length},query:i}}getSuggestions(t){return t.file===void 0?[]:this.grabSuggestions(t.editor,t.file,t.query).map(r=>pe(U({},r),{context:t}))}grabSuggestions(t,e,r){var u,c,d;let i=t.getCursor(),s=this.plugin.getTasks(),a=s.find(f=>f.taskLocation.path==e.path&&f.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(t),l=this.canSaveEdits(o);return(d=(c=(u=Dl()).buildSuggestions)==null?void 0:c.call(u,r,i.ch,this.settings,s,l,a))!=null?d:[]}getMarkdownFileInfo(t){return t.cm.state.field(Qi.editorInfoField)}canSaveEdits(t){return t instanceof Qi.MarkdownView}renderSuggestion(t,e){e.setText(t.displayText)}selectSuggestion(t,e){return A(this,null,function*(){var l,u,c;let r=t.context.editor;if(t.suggestionType==="empty"){this.close();let d=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(u=(l=r==null?void 0:r.cm)==null?void 0:l.contentDOM)==null||u.dispatchEvent(d);return}if(t.taskItDependsOn!=null){let d=wc(t.taskItDependsOn,this.plugin.getTasks().map(f=>f.id));if(t.appendText+=` ${d.id}`,t.taskItDependsOn!==d)if(t.context.file.path==d.path){let f=t.taskItDependsOn.originalMarkdown,p={line:t.taskItDependsOn.lineNumber,ch:0},h={line:t.taskItDependsOn.lineNumber,ch:f.length},b=t.context.editor.getRange(p,h);if(b!==f){let v=`Error adding new ID, due to mismatched data in Tasks memory and the editor: +task line in memory: '${t.taskItDependsOn.originalMarkdown}' + +task line in editor: '${b}' + +file: '${d.path}' +`;RW(v);return}t.context.editor.replaceRange(d.toFileLineString(),p,h)}else qn({originalTask:t.taskItDependsOn,newTasks:d})}let i=t.context.editor.getCursor(),s={line:i.line,ch:(c=t.insertAt)!=null?c:i.ch},a=t.insertSkip?{line:i.line,ch:s.ch+t.insertSkip}:void 0;t.context.editor.replaceRange(t.appendText,s,a),t.context.editor.setCursor({line:i.line,ch:s.ch+t.appendText.length});let o=this.getMarkdownFileInfo(t.context.editor);this.canSaveEdits(o)&&(yield o.save())})}};ya();var Sx=(n,t,e)=>{let r,i=new Promise((u,c)=>{r=u}),s=u=>{let c=u.map(d=>d.toFileLineString()).join(` +`);r(c)},a=()=>{r("")},o=Ca({line:"",path:""});return new jr({app:n,task:o,onSaveSettings:e,onSubmit:s,onCancel:a,allTasks:t}).open(),i};function Dx(n,t,e,r){let i,s=new Promise((c,d)=>{i=c}),a=c=>{let d=c.map(f=>f.toFileLineString()).join(` +`);i(d)},o=()=>{i("")},l=Ca({line:t!=null?t:"",path:""});return new jr({app:n,task:l,onSaveSettings:r,onSubmit:a,onCancel:o,allTasks:e}).open(),s}var Ex=n=>{let t=n.app,e=()=>A(null,null,function*(){return yield n.saveSettings()});return{createTaskLineModal:()=>Sx(t,n.getTasks(),e),editTaskLineModal:r=>Dx(t,r,n.getTasks(),e),executeToggleTaskDoneCommand:(r,i)=>jy(r,i).text}};dn();Ff();var yf=class{constructor(t){this.app=t}load(t){return this.app.loadLocalStorage(t)}save(t,e){this.app.saveLocalStorage(t,e)}};var bf=class extends Tf.Plugin{get apiV1(){return Ex(this)}onload(){return A(this,null,function*(){yield dT(),fn.registerConsoleLogger(),fy("info",O.t("main.loadingPlugin",{name:this.manifest.name,version:this.manifest.version})),yield this.loadSettings(),en.initialise(new yf(this.app));let{loggingOptions:t}=J();fn.configure(t),Gs.getInstance().setGetFirstLinkpathDestFn((r,i)=>{let s=(0,Tf.getLinkpath)(r.link),a=this.app.metadataCache.getFirstLinkpathDest(s,i);return a?a.path:null});let e=new jd({obsidianEvents:this.app.workspace});this.addSettingTab(new hf({plugin:this,events:e})),fE({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses(),this.cache=new _s({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:e}),this.inlineRenderer=new tf({plugin:this,app:this.app}),this.queryRenderer=new uf({plugin:this,events:e}),this.setObsidianPropertiesTypes(),this.registerEditorExtension(ax()),this.registerEditorSuggest(new gf(this.app,J(),this)),new $d({plugin:this})})}loadTaskStatuses(){return A(this,null,function*(){let{statusSettings:t}=J();wt.applyToStatusRegistry(t,Ze.getInstance())})}onunload(){var t;fy("info",O.t("main.unloadingPlugin",{name:this.manifest.name,version:this.manifest.version})),(t=this.cache)==null||t.unload()}loadSettings(){return A(this,null,function*(){let t=yield this.loadData();it(t),t=J(),Me.getInstance().set(t.globalFilter),Me.getInstance().setRemoveGlobalFilter(t.removeGlobalFilter),or.getInstance().set(t.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return A(this,null,function*(){yield this.saveData(J())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}getState(){return this.cache===void 0?"Cold":this.cache.getState()}setObsidianPropertiesTypes(){var t;try{let e=this.app.metadataTypeManager,r=e.getAllProperties(),i=new ki;for(let s of i.allPropertyNamesSorted()){let a=i.propertyType(s);((t=r[s])==null?void 0:t.type)!==a&&e.setType(s,a)}}catch(e){console.error("setObsidianPropertiesTypes error",e)}}}; +/*! Bundled license information: + +eventemitter2/lib/eventemitter2.js: + (*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + *) + +mustache/mustache.mjs: + (*! + * mustache.js - Logic-less {{mustache}} templates with JavaScript + * http://github.com/janl/mustache.js + *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json new file mode 100644 index 0000000..b0c2a98 --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "obsidian-tasks-plugin", + "name": "Tasks", + "version": "8.0.0", + "minAppVersion": "1.8.7", + "description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.", + "helpUrl": "https://publish.obsidian.md/tasks/", + "author": "Clare Macrae and Ilyas Landikov (created by Martin Schenck)", + "authorUrl": "https://github.com/obsidian-tasks-group", + "fundingUrl": "https://github.com/sponsors/claremacrae", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/obsidian-tasks-plugin/styles.css b/.obsidian/plugins/obsidian-tasks-plugin/styles.css new file mode 100644 index 0000000..b6bac8a --- /dev/null +++ b/.obsidian/plugins/obsidian-tasks-plugin/styles.css @@ -0,0 +1 @@ +@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 #e6e6e6,-1px 0 #e6e6e6,0 1px #e6e6e6,0 -1px #e6e6e6,0 3px 13px #00000014}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:#000000e6;fill:#000000e6;height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:#000000e6;fill:#000000e6}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:#0000001a}.numInputWrapper span:active{background:#0003}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:#0000000d}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:#0000000d}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\fffd;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:#000000e6}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:#000000e6}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:#00000080;background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:#0000000d}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:#0000008a;line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px,0px,0px);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 #e6e6e6,5px 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:#3939394d;background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:#3939391a}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 #569ff7,5px 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:#3939394d;background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}:root{--tasks-details-icon: url("data:image/svg+xml;charset=utf-8,")}.plugin-tasks-query-explanation{--code-white-space: pre}.plugin-tasks-toolbar{display:flex;flex-direction:row;justify-content:space-between;gap:var(--size-4-1)}.plugin-tasks-toolbar label{display:flex;flex-direction:row;align-items:center}.plugin-tasks-toolbar label input{height:100%;padding-left:24px}.plugin-tasks-toolbar label svg{position:absolute;transform:translate(25%)}.tasks-count{color:var(--text-faint);padding-left:20px}.tooltip.pop-up{animation:pop-up-animation .2s forwards ease-in-out}@keyframes pop-up-animation{0%{opacity:0;transform:translateY(-100%) scale(1)}20%{opacity:.7;transform:translateY(-100%) scale(1.02)}40%{opacity:1;transform:translateY(-100%) scale(1.05)}to{opacity:1;transform:translateY(-100%) scale(1)}}.task-cancelled,.task-created,.task-done,.task-due,.task-scheduled,.task-start{cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.tasks-edit,.tasks-postpone{width:1em;height:1em;vertical-align:middle;margin-left:.33em;cursor:pointer;font-family:var(--font-interface);color:var(--text-accent);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}a.tasks-edit,a.tasks-postpone{text-decoration:none}.tasks-edit:after{content:"\1f4dd"}.tasks-postpone:after{content:"\23e9"}.tasks-urgency{font-size:var(--font-ui-smaller);font-family:var(--font-interface);padding:2px 6px;border-radius:var(--radius-s);color:var(--text-normal);background-color:var(--background-secondary);margin-left:.5em;line-height:1}.internal-link.internal-link-short-mode{text-decoration:none}.tasks-list-text{position:relative}.tasks-list-text .tooltip{position:absolute;top:0;left:0;white-space:nowrap}.task-list-item-checkbox{cursor:pointer}.tasks-layout-hide-tags .task-description a.tag,.task-list-item .task-block-link{display:none}.modal-option-button{inset-inline-end:var(--size-4-8)}.is-mobile .modal-option-button{inset-inline-end:var(--size-4-16)}.tasks-modal section+section{margin-top:6px}.tasks-modal hr{margin:6px 0}.tasks-modal .tasks-modal-error{border:1px solid red!important}.tasks-modal .accesskey{text-decoration:underline;text-underline-offset:1pt}.tasks-modal-description-section textarea{width:100%;min-height:calc(var(--input-height) * 2);resize:vertical;margin-top:8px}.tasks-modal-priority-section{display:grid;grid-template-columns:6em auto auto auto;grid-row-gap:.15em}.tasks-modal-priority-section>label{grid-row-start:1;grid-row-end:3}.tasks-modal-priority-section .task-modal-priority-option-container{white-space:nowrap}.tasks-modal-priority-section .task-modal-priority-option-container input+label{font-size:var(--font-ui-small);border-radius:var(--input-radius);padding:2px 3px}.tasks-modal-priority-section .task-modal-priority-option-container input{accent-color:var(--interactive-accent)}.tasks-modal-priority-section .task-modal-priority-option-container input:focus+label{box-shadow:0 0 0 2px var(--background-modifier-border-focus);border-color:var(--background-modifier-border-focus)}.tasks-modal-priority-section .task-modal-priority-option-container input:checked+label{font-weight:700}.tasks-modal-priority-section .task-modal-priority-option-container input:not(:checked)+label>span:nth-child(4){filter:grayscale(100%) opacity(60%)}.tasks-modal-dates-section{display:grid;grid-template-columns:6em 13em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dates-section label{grid-column:1}.tasks-modal-dates-section .tasks-modal-date-input{min-width:15em}.tasks-modal-dates-section .tasks-modal-date-editor-picker{margin-left:.5em}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:3;font-size:var(--font-ui-small)}.tasks-modal-dates-section .future-dates-only{grid-column-start:1;grid-column-end:3}.tasks-modal-dates-section .future-dates-only input{margin-left:.67em;top:2px}.tasks-modal-dates-section .status-editor-status-selector{grid-column:2}.tasks-modal-dependencies-section{display:grid;grid-template-columns:6em auto;column-gap:.5em;row-gap:5px;align-items:center}.tasks-modal-dependencies-section .tasks-modal-dependency-input{grid-column:2;width:100%}.tasks-modal-dependencies-section .results-dependency{grid-column:2}.tasks-modal-button-section{position:sticky;bottom:0;background-color:var(--modal-background);padding-bottom:16px;padding-top:16px;display:grid;grid-template-columns:3fr 1fr;column-gap:.5em}.tasks-modal-button-section button:disabled{pointer-events:none!important;opacity:.3!important}@media(max-width:649px){.tasks-modal-priority-section{grid-template-columns:6em auto auto}.tasks-modal-priority-section>label{grid-row:1/span 3}}@media(max-width:499px){.tasks-modal-priority-section{grid-template-columns:4em auto auto}.tasks-modal-dates-section{grid-template-columns:1fr;grid-auto-columns:auto}.tasks-modal-dates-section .tasks-modal-date-input{grid-column:1}.tasks-modal-dates-section .tasks-modal-parsed-date{grid-column:2}.tasks-modal-dates-section .status-editor-status-selector,.tasks-modal-dependencies-section label,.tasks-modal-dependencies-section .results-dependency{grid-column:1}}@media(max-width:399px){.tasks-modal-dates-section .status-editor-status-selector{grid-column:1}.tasks-modal-dates-section>.tasks-modal-parsed-date{grid-column:1}.tasks-modal-priority-section{grid-template-columns:4em auto}.tasks-modal-priority-section>label{grid-row:1/span 6}.tasks-modal-dependencies-section{grid-template-columns:1fr;grid-auto-columns:auto}}@media(max-width:259px){.tasks-modal-priority-section{grid-template-columns:1fr}.tasks-modal-priority-section>label{grid-row:1}}.task-dependencies-container{grid-column:2;display:flex;flex-wrap:wrap;gap:8px}.task-dependency{display:inline-flex;background-color:var(--interactive-normal);box-shadow:var(--input-shadow);border-radius:28px;padding:4px 4px 4px 8px}.task-dependency-name{font-size:var(--font-ui-small);max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-delete{padding:3px;cursor:pointer;height:inherit;box-shadow:none!important;border-radius:50%}.task-dependency-dropdown{list-style:none;position:absolute;top:0;left:0;padding:4px;margin:0;background-color:var(--background-primary);border:1px;border-radius:6px;border-color:var(--background-modifier-border);border-style:solid;z-index:99;max-height:170px;overflow-y:auto}.task-dependency-dropdown li{padding:5px;margin:2px;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between}.task-dependency-dropdown li .dependency-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-name-shared{width:60%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.task-dependency-dropdown li .dependency-path{width:40%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-style:italic;text-align:right;color:var(--italic-color)}.task-dependency-dropdown li.selected{background-color:var(--text-selection)}.tasks-options-modal-container{padding-bottom:0;width:fit-content}.tasks-options-modal-container .modal-title{margin-right:var(--size-4-6)}.is-mobile .tasks-options-modal-container .modal-title{margin-right:var(--size-4-12)}.tasks-options-modal{padding:0}.tasks-options-modal .tasks-options-modal-checkboxes{display:flex;flex-direction:column}.tasks-options-modal .tasks-options-modal-checkboxes label{padding:4px;border-radius:4px;display:flex;gap:8px}.tasks-options-modal .tasks-options-modal-checkboxes label input[type=checkbox]{margin:0}.tasks-options-modal .tasks-options-modal-checkboxes hr{margin:2px 0}.tasks-options-modal .tasks-options-modal-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:.5em;padding:16px 0}.tasks-settings-is-invalid{color:var(--text-error)!important;background-color:rgba(var(--background-modifier-error-rgb),.2)!important}.tasks-settings .additional{margin:6px 12px}.tasks-settings .additional>.setting-item{border-top:0;padding-top:9px}.tasks-settings details>summary{outline:none;display:block!important;list-style:none!important;list-style-type:none!important;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative}.tasks-settings details>summary::-webkit-details-marker,.tasks-settings details>summary::marker{display:none!important}.tasks-settings details>summary>.collapser{position:absolute;top:50%;right:8px;transform:translateY(-50%);content:""}.tasks-settings details>summary>.collapser>.handle{transform:rotate(0);transition:transform .25s;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-image:var(--tasks-details-icon);mask-image:var(--tasks-details-icon);width:20px;height:20px}.tasks-settings details[open]>summary>.collapser>.handle{transform:rotate(90deg)}.tasks-nested-settings .setting-item{border:0px;padding-bottom:0}.tasks-nested-settings{padding-bottom:18px}.tasks-nested-settings[open] .setting-item-heading,.tasks-nested-settings:not(details) .setting-item-heading{border-top:0px;border-bottom:1px solid var(--background-modifier-border)}.tasks-settings .row-for-status{margin-top:0;margin-bottom:0}.tasks-settings .tasks-presets-wrapper{width:100%;position:relative;transition:all .2s ease}.tasks-settings .tasks-presets-wrapper.tasks-presets-dragging{opacity:.5;transform:rotate(2deg)}.tasks-settings .tasks-presets-wrapper.tasks-presets-drop-above:before{content:"";position:absolute;top:-2px;left:0;right:0;height:4px;background-color:var(--interactive-accent);border-radius:2px;z-index:10}.tasks-settings .tasks-presets-wrapper.tasks-presets-drop-below:after{content:"";position:absolute;bottom:-2px;left:0;right:0;height:4px;background-color:var(--interactive-accent);border-radius:2px;z-index:10}.tasks-settings .tasks-presets-setting .tasks-presets-key{grid-area:key}.tasks-settings .tasks-presets-setting .tasks-presets-key.has-error{border-color:var(--text-error);border-width:2px}.tasks-settings .tasks-presets-setting .tasks-presets-value{grid-area:value;min-width:300px;min-height:3em;font-family:var(--font-monospace);resize:horizontal;overflow-x:auto;overflow-y:hidden;white-space:pre}.tasks-settings .tasks-presets-setting .tasks-presets-drag-handle{grid-area:drag;color:var(--text-muted)}.tasks-settings .tasks-presets-setting .tasks-presets-drag-handle:hover{color:var(--text-normal)}.tasks-settings .tasks-presets-setting .tasks-presets-delete-button{grid-area:delete}.tasks-settings .tasks-presets-setting .setting-item-control{justify-content:start;display:grid;grid-template-columns:200px 1fr auto auto;grid-template-areas:"key value drag delete";gap:4px;align-items:unset;border:1px solid var(--background-modifier-border)!important;padding:.5em!important;background-color:var(--background-secondary)!important;border-radius:4px!important}@container (max-width: 600px){.tasks-settings .tasks-presets-setting .setting-item-control{grid-template-columns:5fr 1fr 1fr;grid-template-areas:"key drag delete" "value value value"}.tasks-settings .tasks-presets-setting .setting-item-control .tasks-presets-key{width:100%}} diff --git a/.obsidian/plugins/pdf-plus/data.json b/.obsidian/plugins/pdf-plus/data.json new file mode 100644 index 0000000..0a60814 --- /dev/null +++ b/.obsidian/plugins/pdf-plus/data.json @@ -0,0 +1,326 @@ +{ + "displayTextFormats": [ + { + "name": "Title & page", + "template": "{{file.basename}}, p.{{pageLabel}}" + }, + { + "name": "Page", + "template": "p.{{pageLabel}}" + }, + { + "name": "Text", + "template": "{{text}}" + }, + { + "name": "Emoji", + "template": "📖" + }, + { + "name": "None", + "template": "" + } + ], + "defaultDisplayTextFormatIndex": 0, + "syncDisplayTextFormat": true, + "syncDefaultDisplayTextFormat": false, + "copyCommands": [ + { + "name": "Quote", + "template": "> ({{linkWithDisplay}})\n> {{text}}\n" + }, + { + "name": "Link", + "template": "{{linkWithDisplay}}" + }, + { + "name": "Embed", + "template": "!{{link}}" + }, + { + "name": "Callout", + "template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> {{text}}\n" + }, + { + "name": "Quote in callout", + "template": "> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}\n> > {{text}}\n> \n> " + } + ], + "useAnotherCopyTemplateWhenNoSelection": false, + "copyTemplateWhenNoSelection": "{{linkToPageWithDisplay}}", + "trimSelectionEmbed": false, + "embedMargin": 50, + "noSidebarInEmbed": true, + "noSpreadModeInEmbed": true, + "embedUnscrollable": false, + "singleTabForSinglePDF": true, + "highlightExistingTab": false, + "existingTabHighlightOpacity": 0.5, + "existingTabHighlightDuration": 0.75, + "paneTypeForFirstPDFLeaf": "left", + "openLinkNextToExistingPDFTab": true, + "openPDFWithDefaultApp": false, + "openPDFWithDefaultAppAndObsidian": true, + "focusObsidianAfterOpenPDFWithDefaultApp": true, + "syncWithDefaultApp": false, + "dontActivateAfterOpenPDF": true, + "dontActivateAfterOpenMD": true, + "highlightDuration": 0.75, + "noTextHighlightsInEmbed": false, + "noAnnotationHighlightsInEmbed": true, + "persistentTextHighlightsInEmbed": true, + "persistentAnnotationHighlightsInEmbed": false, + "highlightBacklinks": true, + "selectionBacklinkVisualizeStyle": "highlight", + "dblclickEmbedToOpenLink": true, + "highlightBacklinksPane": true, + "highlightOnHoverBacklinkPane": true, + "backlinkHoverColor": "", + "colors": { + "Yellow": "#ffd000", + "Red": "#ea5252", + "Note": "#086ddd", + "Important": "#bb61e5" + }, + "defaultColor": "", + "defaultColorPaletteItemIndex": 0, + "syncColorPaletteItem": true, + "syncDefaultColorPaletteItem": false, + "colorPaletteInToolbar": true, + "noColorButtonInColorPalette": true, + "colorPaletteInEmbedToolbar": false, + "quietColorPaletteTooltip": false, + "showStatusInToolbar": true, + "highlightColorSpecifiedOnly": false, + "doubleClickHighlightToOpenBacklink": true, + "hoverHighlightAction": "preview", + "paneTypeForFirstMDLeaf": "right", + "singleMDLeafInSidebar": true, + "alwaysUseSidebar": true, + "ignoreExistingMarkdownTabIn": [], + "defaultColorPaletteActionIndex": 4, + "syncColorPaletteAction": true, + "syncDefaultColorPaletteAction": false, + "proxyMDProperty": "PDF", + "hoverPDFLinkToOpen": false, + "ignoreHeightParamInPopoverPreview": true, + "filterBacklinksByPageDefault": true, + "showBacklinkToPage": true, + "enableHoverPDFInternalLink": true, + "recordPDFInternalLinkHistory": true, + "alwaysRecordHistory": true, + "renderMarkdownInStickyNote": false, + "enablePDFEdit": false, + "author": "", + "writeHighlightToFileOpacity": 0.2, + "defaultWriteFileToggle": false, + "syncWriteFileToggle": true, + "syncDefaultWriteFileToggle": false, + "enableAnnotationDeletion": true, + "warnEveryAnnotationDelete": false, + "warnBacklinkedAnnotationDelete": true, + "enableAnnotationContentEdit": true, + "enableEditEncryptedPDF": false, + "pdfLinkColor": "#04a802", + "pdfLinkBorder": false, + "replaceContextMenu": true, + "showContextMenuOnMouseUpIf": "Mod", + "contextMenuConfig": [ + { + "id": "action", + "visible": true + }, + { + "id": "selection", + "visible": true + }, + { + "id": "write-file", + "visible": true + }, + { + "id": "annotation", + "visible": true + }, + { + "id": "modify-annotation", + "visible": true + }, + { + "id": "link", + "visible": true + }, + { + "id": "text", + "visible": true + }, + { + "id": "search", + "visible": true + }, + { + "id": "speech", + "visible": true + }, + { + "id": "page", + "visible": true + }, + { + "id": "settings", + "visible": true + } + ], + "selectionProductMenuConfig": [ + "color", + "copy-format", + "display" + ], + "writeFileProductMenuConfig": [ + "color", + "copy-format", + "display" + ], + "annotationProductMenuConfig": [ + "copy-format", + "display" + ], + "updateColorPaletteStateFromContextMenu": true, + "mobileCopyAction": "pdf-plus", + "showContextMenuOnTablet": false, + "executeBuiltinCommandForOutline": true, + "executeBuiltinCommandForZoom": true, + "executeFontSizeAdjusterCommand": true, + "closeSidebarWithShowCommandIfExist": true, + "autoHidePDFSidebar": false, + "defaultSidebarView": 1, + "outlineDrag": true, + "outlineContextMenu": true, + "outlineLinkDisplayTextFormat": "{{file.basename}}, {{text}}", + "outlineLinkCopyFormat": "{{linkWithDisplay}}", + "recordHistoryOnOutlineClick": true, + "popoverPreviewOnOutlineHover": true, + "thumbnailDrag": true, + "thumbnailContextMenu": true, + "thumbnailLinkDisplayTextFormat": "{{file.basename}}, p.{{pageLabel}}", + "thumbnailLinkCopyFormat": "{{linkWithDisplay}}", + "recordHistoryOnThumbnailClick": true, + "popoverPreviewOnThumbnailHover": true, + "annotationPopupDrag": true, + "showAnnotationPopupOnHover": true, + "useCallout": true, + "calloutType": "PDF", + "calloutIcon": "highlighter", + "highlightBacklinksInEmbed": false, + "highlightBacklinksInHoverPopover": false, + "highlightBacklinksInCanvas": true, + "clickPDFInternalLinkWithModifierKey": true, + "clickOutlineItemWithModifierKey": true, + "clickThumbnailWithModifierKey": true, + "focusEditorAfterAutoPaste": true, + "clearSelectionAfterAutoPaste": true, + "respectCursorPositionWhenAutoPaste": true, + "blankLineAboveAppendedContent": true, + "autoCopy": false, + "autoFocus": false, + "autoPaste": false, + "autoFocusTarget": "last-active-and-open-then-last-paste", + "autoPasteTarget": "last-active-and-open-then-last-paste", + "openAutoFocusTargetIfNotOpened": true, + "howToOpenAutoFocusTargetIfNotOpened": "right", + "closeHoverEditorWhenLostFocus": true, + "closeSidebarWhenLostFocus": false, + "openAutoFocusTargetInEditingView": true, + "executeCommandWhenTargetNotIdentified": true, + "commandToExecuteWhenTargetNotIdentified": "switcher:open", + "autoPasteTargetDialogTimeoutSec": 20, + "autoCopyToggleRibbonIcon": true, + "autoCopyIconName": "highlighter", + "autoFocusToggleRibbonIcon": true, + "autoFocusIconName": "zap", + "autoPasteToggleRibbonIcon": true, + "autoPasteIconName": "clipboard-paste", + "viewSyncFollowPageNumber": true, + "viewSyncPageDebounceInterval": 0.3, + "openAfterExtractPages": true, + "howToOpenExtractedPDF": "tab", + "warnEveryPageDelete": false, + "warnBacklinkedPageDelete": true, + "extractPageInPlace": false, + "askExtractPageInPlace": true, + "pageLabelUpdateWhenInsertPage": "keep", + "pageLabelUpdateWhenDeletePage": "keep", + "pageLabelUpdateWhenExtractPage": "keep", + "askPageLabelUpdateWhenInsertPage": true, + "askPageLabelUpdateWhenDeletePage": true, + "askPageLabelUpdateWhenExtractPage": true, + "copyOutlineAsListFormat": "{{linkWithDisplay}}", + "copyOutlineAsListDisplayTextFormat": "{{text}}", + "copyOutlineAsHeadingsFormat": "{{text}}\n\n{{linkWithDisplay}}", + "copyOutlineAsHeadingsDisplayTextFormat": "p.{{pageLabel}}", + "copyOutlineAsHeadingsMinLevel": 2, + "newFileNameFormat": "", + "newFileTemplatePath": "", + "newPDFLocation": "current", + "newPDFFolderPath": "", + "rectEmbedStaticImage": false, + "rectImageFormat": "file", + "rectImageExtension": "webp", + "zoomToFitRect": false, + "rectFollowAdaptToTheme": true, + "rectEmbedResolution": 100, + "includeColorWhenCopyingRectLink": true, + "backlinkIconSize": 50, + "showBacklinkIconForSelection": false, + "showBacklinkIconForAnnotation": false, + "showBacklinkIconForOffset": true, + "showBacklinkIconForRect": false, + "showBoundingRectForBacklinkedAnnot": false, + "hideReplyAnnotation": false, + "hideStampAnnotation": false, + "searchLinkHighlightAll": "true", + "searchLinkCaseSensitive": "true", + "searchLinkMatchDiacritics": "default", + "searchLinkEntireWord": "false", + "dontFitWidthWhenOpenPDFLink": true, + "preserveCurrentLeftOffsetWhenOpenPDFLink": false, + "defaultZoomValue": "page-width", + "scrollModeOnLoad": 0, + "spreadModeOnLoad": 0, + "usePageUpAndPageDown": true, + "hoverableDropdownMenuInToolbar": true, + "zoomLevelInputBoxInToolbar": true, + "popoverPreviewOnExternalLinkHover": true, + "actionOnCitationHover": "pdf-plus-bib-popover", + "enableBibInEmbed": false, + "enableBibInHoverPopover": false, + "enableBibInCanvas": true, + "citationIdPatterns": "^cite.\n^bib\\d+$", + "copyAsSingleLine": true, + "removeWhitespaceBetweenCJChars": true, + "dummyFileFolderPath": "", + "externalURIPatterns": [ + ".*\\.pdf$", + "https://arxiv.org/pdf/.*" + ], + "modifierToDropExternalPDFToCreateDummy": [ + "Shift" + ], + "vim": false, + "vimrcPath": "", + "vimVisualMotion": true, + "vimScrollSize": 40, + "vimLargerScrollSizeWhenZoomIn": true, + "vimContinuousScrollSpeed": 1.2, + "vimSmoothScroll": true, + "vimHlsearch": true, + "vimIncsearch": true, + "enableVimInContextMenu": true, + "enableVimOutlineMode": true, + "vimSmoothOutlineMode": true, + "vimHintChars": "hjklasdfgyuiopqwertnmzxcvb", + "vimHintArgs": "all", + "PATH": "", + "autoCheckForUpdates": true, + "fixObsidianTextSelectionBug": true +} \ No newline at end of file diff --git a/.obsidian/plugins/pdf-plus/main.js b/.obsidian/plugins/pdf-plus/main.js new file mode 100644 index 0000000..fd332e9 --- /dev/null +++ b/.obsidian/plugins/pdf-plus/main.js @@ -0,0 +1,161 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var T1=Object.create;var Na=Object.defineProperty;var A1=Object.getOwnPropertyDescriptor;var I1=Object.getOwnPropertyNames;var B1=Object.getPrototypeOf,O1=Object.prototype.hasOwnProperty;var wm=n=>{throw TypeError(n)};var L1=(n,e,t)=>e in n?Na(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),vf=(n,e)=>{for(var t in e)Na(n,t,{get:e[t],enumerable:!0})},Fm=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I1(e))!O1.call(n,r)&&r!==t&&Na(n,r,{get:()=>e[r],enumerable:!(i=A1(e,r))||i.enumerable});return n};var Wi=(n,e,t)=>(t=n!=null?T1(B1(n)):{},Fm(e||!n||!n.__esModule?Na(t,"default",{value:n,enumerable:!0}):t,n)),M1=n=>Fm(Na({},"__esModule",{value:!0}),n);var wf=(n,e,t)=>L1(n,typeof e!="symbol"?e+"":e,t),Dm=(n,e,t)=>e.has(n)||wm("Cannot "+t);var qe=(n,e,t)=>(Dm(n,e,"read from private field"),t?t.call(n):e.get(n)),mn=(n,e,t)=>e.has(n)?wm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Lt=(n,e,t,i)=>(Dm(n,e,"write to private field"),i?i.call(n,t):e.set(n,t),t);var Ff=(n,e,t,i)=>({set _(r){Lt(n,e,r,t)},get _(){return qe(n,e,i)}});var bn=_(St=>{"use strict";var W1=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function K1(n,e){return Object.prototype.hasOwnProperty.call(n,e)}St.assign=function(n){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var i in t)K1(t,i)&&(n[i]=t[i])}}return n};St.shrinkBuf=function(n,e){return n.length===e?n:n.subarray?n.subarray(0,e):(n.length=e,n)};var G1={arraySet:function(n,e,t,i,r){if(e.subarray&&n.subarray){n.set(e.subarray(t,t+i),r);return}for(var o=0;o{"use strict";var Z1=bn(),Y1=4,Im=0,Bm=1,_1=2;function ms(n){for(var e=n.length;--e>=0;)n[e]=0}var J1=0,Vm=1,Q1=2,$1=3,eF=258,Yf=29,Ya=256,Ka=Ya+1+Yf,gs=30,_f=19,Hm=2*Ka+1,eo=15,jf=16,tF=7,Jf=256,zm=16,Um=17,qm=18,Xf=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],xd=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],iF=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],jm=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],nF=512,yn=new Array((Ka+2)*2);ms(yn);var Wa=new Array(gs*2);ms(Wa);var Ga=new Array(nF);ms(Ga);var Xa=new Array(eF-$1+1);ms(Xa);var Qf=new Array(Yf);ms(Qf);var bd=new Array(gs);ms(bd);function Wf(n,e,t,i,r){this.static_tree=n,this.extra_bits=e,this.extra_base=t,this.elems=i,this.max_length=r,this.has_stree=n&&n.length}var Wm,Km,Gm;function Kf(n,e){this.dyn_tree=n,this.max_code=0,this.stat_desc=e}function Xm(n){return n<256?Ga[n]:Ga[256+(n>>>7)]}function Za(n,e){n.pending_buf[n.pending++]=e&255,n.pending_buf[n.pending++]=e>>>8&255}function Rt(n,e,t){n.bi_valid>jf-t?(n.bi_buf|=e<>jf-n.bi_valid,n.bi_valid+=t-jf):(n.bi_buf|=e<>>=1,t<<=1;while(--e>0);return t>>>1}function rF(n){n.bi_valid===16?(Za(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):n.bi_valid>=8&&(n.pending_buf[n.pending++]=n.bi_buf&255,n.bi_buf>>=8,n.bi_valid-=8)}function oF(n,e){var t=e.dyn_tree,i=e.max_code,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,c=e.stat_desc.max_length,l,d,h,u,p,f,m=0;for(u=0;u<=eo;u++)n.bl_count[u]=0;for(t[n.heap[n.heap_max]*2+1]=0,l=n.heap_max+1;lc&&(u=c,m++),t[d*2+1]=u,!(d>i)&&(n.bl_count[u]++,p=0,d>=a&&(p=s[d-a]),f=t[d*2],n.opt_len+=f*(u+p),o&&(n.static_len+=f*(r[d*2+1]+p)));if(m!==0){do{for(u=c-1;n.bl_count[u]===0;)u--;n.bl_count[u]--,n.bl_count[u+1]+=2,n.bl_count[c]--,m-=2}while(m>0);for(u=c;u!==0;u--)for(d=n.bl_count[u];d!==0;)h=n.heap[--l],!(h>i)&&(t[h*2+1]!==u&&(n.opt_len+=(u-t[h*2+1])*t[h*2],t[h*2+1]=u),d--)}}function Ym(n,e,t){var i=new Array(eo+1),r=0,o,s;for(o=1;o<=eo;o++)i[o]=r=r+t[o-1]<<1;for(s=0;s<=e;s++){var a=n[s*2+1];a!==0&&(n[s*2]=Zm(i[a]++,a))}}function sF(){var n,e,t,i,r,o=new Array(eo+1);for(t=0,i=0;i>=7;i8?Za(n,n.bi_buf):n.bi_valid>0&&(n.pending_buf[n.pending++]=n.bi_buf),n.bi_buf=0,n.bi_valid=0}function aF(n,e,t,i){Jm(n),i&&(Za(n,t),Za(n,~t)),Z1.arraySet(n.pending_buf,n.window,e,t,n.pending),n.pending+=t}function Om(n,e,t,i){var r=e*2,o=t*2;return n[r]>1;s>=1;s--)Gf(n,t,s);l=o;do s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],Gf(n,t,1),a=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=a,t[l*2]=t[s*2]+t[a*2],n.depth[l]=(n.depth[s]>=n.depth[a]?n.depth[s]:n.depth[a])+1,t[s*2+1]=t[a*2+1]=l,n.heap[1]=l++,Gf(n,t,1);while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],oF(n,e),Ym(t,c,n.bl_count)}function Mm(n,e,t){var i,r=-1,o,s=e[1],a=0,c=7,l=4;for(s===0&&(c=138,l=3),e[(t+1)*2+1]=65535,i=0;i<=t;i++)o=s,s=e[(i+1)*2+1],!(++a=3&&n.bl_tree[jm[e]*2+1]===0;e--);return n.opt_len+=3*(e+1)+5+5+4,e}function cF(n,e,t,i){var r;for(Rt(n,e-257,5),Rt(n,t-1,5),Rt(n,i-4,4),r=0;r>>=1)if(e&1&&n.dyn_ltree[t*2]!==0)return Im;if(n.dyn_ltree[18]!==0||n.dyn_ltree[20]!==0||n.dyn_ltree[26]!==0)return Bm;for(t=32;t0?(n.strm.data_type===_1&&(n.strm.data_type=dF(n)),Zf(n,n.l_desc),Zf(n,n.d_desc),s=lF(n),r=n.opt_len+3+7>>>3,o=n.static_len+3+7>>>3,o<=r&&(r=o)):r=o=t+5,t+4<=r&&e!==-1?Qm(n,e,t,i):n.strategy===Y1||o===r?(Rt(n,(Vm<<1)+(i?1:0),3),Lm(n,yn,Wa)):(Rt(n,(Q1<<1)+(i?1:0),3),cF(n,n.l_desc.max_code+1,n.d_desc.max_code+1,s+1),Lm(n,n.dyn_ltree,n.dyn_dtree)),_m(n),i&&Jm(n)}function pF(n,e,t){return n.pending_buf[n.d_buf+n.last_lit*2]=e>>>8&255,n.pending_buf[n.d_buf+n.last_lit*2+1]=e&255,n.pending_buf[n.l_buf+n.last_lit]=t&255,n.last_lit++,e===0?n.dyn_ltree[t*2]++:(n.matches++,e--,n.dyn_ltree[(Xa[t]+Ya+1)*2]++,n.dyn_dtree[Xm(e)*2]++),n.last_lit===n.lit_bufsize-1}xs._tr_init=hF;xs._tr_stored_block=Qm;xs._tr_flush_block=fF;xs._tr_tally=pF;xs._tr_align=uF});var $f=_((ZC,ex)=>{"use strict";function gF(n,e,t,i){for(var r=n&65535|0,o=n>>>16&65535|0,s=0;t!==0;){s=t>2e3?2e3:t,t-=s;do r=r+e[i++]|0,o=o+r|0;while(--s);r%=65521,o%=65521}return r|o<<16|0}ex.exports=gF});var e0=_((YC,tx)=>{"use strict";function mF(){for(var n,e=[],t=0;t<256;t++){n=t;for(var i=0;i<8;i++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}return e}var xF=mF();function bF(n,e,t,i){var r=xF,o=i+t;n^=-1;for(var s=i;s>>8^r[(n^e[s])&255];return n^-1}tx.exports=bF});var yd=_((_C,ix)=>{"use strict";ix.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var hx=_(_i=>{"use strict";var Et=bn(),oi=$m(),sx=$f(),ar=e0(),yF=yd(),ro=0,vF=1,wF=3,ur=4,nx=5,Yi=0,rx=1,si=-2,FF=-3,t0=-5,DF=-1,PF=1,vd=2,kF=3,CF=4,SF=0,EF=2,Pd=8,TF=9,AF=15,IF=8,BF=29,OF=256,n0=OF+1+BF,LF=30,MF=19,NF=2*n0+1,RF=15,be=3,dr=258,Ii=dr+be+1,VF=32,kd=42,r0=69,wd=73,Fd=91,Dd=103,to=113,Ja=666,rt=1,Qa=2,io=3,vs=4,HF=3;function hr(n,e){return n.msg=yF[e],e}function ox(n){return(n<<1)-(n>4?9:0)}function cr(n){for(var e=n.length;--e>=0;)n[e]=0}function lr(n){var e=n.state,t=e.pending;t>n.avail_out&&(t=n.avail_out),t!==0&&(Et.arraySet(n.output,e.pending_buf,e.pending_out,t,n.next_out),n.next_out+=t,e.pending_out+=t,n.total_out+=t,n.avail_out-=t,e.pending-=t,e.pending===0&&(e.pending_out=0))}function mt(n,e){oi._tr_flush_block(n,n.block_start>=0?n.block_start:-1,n.strstart-n.block_start,e),n.block_start=n.strstart,lr(n.strm)}function Ce(n,e){n.pending_buf[n.pending++]=e}function _a(n,e){n.pending_buf[n.pending++]=e>>>8&255,n.pending_buf[n.pending++]=e&255}function zF(n,e,t,i){var r=n.avail_in;return r>i&&(r=i),r===0?0:(n.avail_in-=r,Et.arraySet(e,n.input,n.next_in,r,t),n.state.wrap===1?n.adler=sx(n.adler,e,r,t):n.state.wrap===2&&(n.adler=ar(n.adler,e,r,t)),n.next_in+=r,n.total_in+=r,r)}function ax(n,e){var t=n.max_chain_length,i=n.strstart,r,o,s=n.prev_length,a=n.nice_match,c=n.strstart>n.w_size-Ii?n.strstart-(n.w_size-Ii):0,l=n.window,d=n.w_mask,h=n.prev,u=n.strstart+dr,p=l[i+s-1],f=l[i+s];n.prev_length>=n.good_match&&(t>>=2),a>n.lookahead&&(a=n.lookahead);do if(r=e,!(l[r+s]!==f||l[r+s-1]!==p||l[r]!==l[i]||l[++r]!==l[i+1])){i+=2,r++;do;while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&is){if(n.match_start=e,s=o,o>=a)break;p=l[i+s-1],f=l[i+s]}}while((e=h[e&d])>c&&--t!==0);return s<=n.lookahead?s:n.lookahead}function no(n){var e=n.w_size,t,i,r,o,s;do{if(o=n.window_size-n.lookahead-n.strstart,n.strstart>=e+(e-Ii)){Et.arraySet(n.window,n.window,e,e,0),n.match_start-=e,n.strstart-=e,n.block_start-=e,i=n.hash_size,t=i;do r=n.head[--t],n.head[t]=r>=e?r-e:0;while(--i);i=e,t=i;do r=n.prev[--t],n.prev[t]=r>=e?r-e:0;while(--i);o+=e}if(n.strm.avail_in===0)break;if(i=zF(n.strm,n.window,n.strstart+n.lookahead,o),n.lookahead+=i,n.lookahead+n.insert>=be)for(s=n.strstart-n.insert,n.ins_h=n.window[s],n.ins_h=(n.ins_h<n.pending_buf_size-5&&(t=n.pending_buf_size-5);;){if(n.lookahead<=1){if(no(n),n.lookahead===0&&e===ro)return rt;if(n.lookahead===0)break}n.strstart+=n.lookahead,n.lookahead=0;var i=n.block_start+t;if((n.strstart===0||n.strstart>=i)&&(n.lookahead=n.strstart-i,n.strstart=i,mt(n,!1),n.strm.avail_out===0)||n.strstart-n.block_start>=n.w_size-Ii&&(mt(n,!1),n.strm.avail_out===0))return rt}return n.insert=0,e===ur?(mt(n,!0),n.strm.avail_out===0?io:vs):(n.strstart>n.block_start&&(mt(n,!1),n.strm.avail_out===0),rt)}function i0(n,e){for(var t,i;;){if(n.lookahead=be&&(n.ins_h=(n.ins_h<=be)if(i=oi._tr_tally(n,n.strstart-n.match_start,n.match_length-be),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=be){n.match_length--;do n.strstart++,n.ins_h=(n.ins_h<=be&&(n.ins_h=(n.ins_h<4096)&&(n.match_length=be-1)),n.prev_length>=be&&n.match_length<=n.prev_length){r=n.strstart+n.lookahead-be,i=oi._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-be),n.lookahead-=n.prev_length-1,n.prev_length-=2;do++n.strstart<=r&&(n.ins_h=(n.ins_h<=be&&n.strstart>0&&(r=n.strstart-1,i=s[r],i===s[++r]&&i===s[++r]&&i===s[++r])){o=n.strstart+dr;do;while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&rn.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=be?(t=oi._tr_tally(n,1,n.match_length-be),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(t=oi._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),t&&(mt(n,!1),n.strm.avail_out===0))return rt}return n.insert=0,e===ur?(mt(n,!0),n.strm.avail_out===0?io:vs):n.last_lit&&(mt(n,!1),n.strm.avail_out===0)?rt:Qa}function jF(n,e){for(var t;;){if(n.lookahead===0&&(no(n),n.lookahead===0)){if(e===ro)return rt;break}if(n.match_length=0,t=oi._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(mt(n,!1),n.strm.avail_out===0))return rt}return n.insert=0,e===ur?(mt(n,!0),n.strm.avail_out===0?io:vs):n.last_lit&&(mt(n,!1),n.strm.avail_out===0)?rt:Qa}function Zi(n,e,t,i,r){this.good_length=n,this.max_lazy=e,this.nice_length=t,this.max_chain=i,this.func=r}var ys;ys=[new Zi(0,0,0,0,UF),new Zi(4,4,8,4,i0),new Zi(4,5,16,8,i0),new Zi(4,6,32,32,i0),new Zi(4,4,16,16,bs),new Zi(8,16,32,32,bs),new Zi(8,16,128,128,bs),new Zi(8,32,128,256,bs),new Zi(32,128,258,1024,bs),new Zi(32,258,258,4096,bs)];function WF(n){n.window_size=2*n.w_size,cr(n.head),n.max_lazy_match=ys[n.level].max_lazy,n.good_match=ys[n.level].good_length,n.nice_match=ys[n.level].nice_length,n.max_chain_length=ys[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=be-1,n.match_available=0,n.ins_h=0}function KF(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pd,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Et.Buf16(NF*2),this.dyn_dtree=new Et.Buf16((2*LF+1)*2),this.bl_tree=new Et.Buf16((2*MF+1)*2),cr(this.dyn_ltree),cr(this.dyn_dtree),cr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Et.Buf16(RF+1),this.heap=new Et.Buf16(2*n0+1),cr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Et.Buf16(2*n0+1),cr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function lx(n){var e;return!n||!n.state?hr(n,si):(n.total_in=n.total_out=0,n.data_type=EF,e=n.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?kd:to,n.adler=e.wrap===2?0:1,e.last_flush=ro,oi._tr_init(e),Yi)}function cx(n){var e=lx(n);return e===Yi&&WF(n.state),e}function GF(n,e){return!n||!n.state||n.state.wrap!==2?si:(n.state.gzhead=e,Yi)}function dx(n,e,t,i,r,o){if(!n)return si;var s=1;if(e===DF&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),r<1||r>TF||t!==Pd||i<8||i>15||e<0||e>9||o<0||o>CF)return hr(n,si);i===8&&(i=9);var a=new KF;return n.state=a,a.strm=n,a.wrap=s,a.gzhead=null,a.w_bits=i,a.w_size=1<nx||e<0)return n?hr(n,si):si;if(i=n.state,!n.output||!n.input&&n.avail_in!==0||i.status===Ja&&e!==ur)return hr(n,n.avail_out===0?t0:si);if(i.strm=n,t=i.last_flush,i.last_flush=e,i.status===kd)if(i.wrap===2)n.adler=0,Ce(i,31),Ce(i,139),Ce(i,8),i.gzhead?(Ce(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Ce(i,i.gzhead.time&255),Ce(i,i.gzhead.time>>8&255),Ce(i,i.gzhead.time>>16&255),Ce(i,i.gzhead.time>>24&255),Ce(i,i.level===9?2:i.strategy>=vd||i.level<2?4:0),Ce(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Ce(i,i.gzhead.extra.length&255),Ce(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(n.adler=ar(n.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=r0):(Ce(i,0),Ce(i,0),Ce(i,0),Ce(i,0),Ce(i,0),Ce(i,i.level===9?2:i.strategy>=vd||i.level<2?4:0),Ce(i,HF),i.status=to);else{var s=Pd+(i.w_bits-8<<4)<<8,a=-1;i.strategy>=vd||i.level<2?a=0:i.level<6?a=1:i.level===6?a=2:a=3,s|=a<<6,i.strstart!==0&&(s|=VF),s+=31-s%31,i.status=to,_a(i,s),i.strstart!==0&&(_a(i,n.adler>>>16),_a(i,n.adler&65535)),n.adler=1}if(i.status===r0)if(i.gzhead.extra){for(r=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),lr(n),r=i.pending,i.pending===i.pending_buf_size));)Ce(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>r&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=wd)}else i.status=wd;if(i.status===wd)if(i.gzhead.name){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),lr(n),r=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindexr&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),o===0&&(i.gzindex=0,i.status=Fd)}else i.status=Fd;if(i.status===Fd)if(i.gzhead.comment){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),lr(n),r=i.pending,i.pending===i.pending_buf_size)){o=1;break}i.gzindexr&&(n.adler=ar(n.adler,i.pending_buf,i.pending-r,r)),o===0&&(i.status=Dd)}else i.status=Dd;if(i.status===Dd&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&lr(n),i.pending+2<=i.pending_buf_size&&(Ce(i,n.adler&255),Ce(i,n.adler>>8&255),n.adler=0,i.status=to)):i.status=to),i.pending!==0){if(lr(n),n.avail_out===0)return i.last_flush=-1,Yi}else if(n.avail_in===0&&ox(e)<=ox(t)&&e!==ur)return hr(n,t0);if(i.status===Ja&&n.avail_in!==0)return hr(n,t0);if(n.avail_in!==0||i.lookahead!==0||e!==ro&&i.status!==Ja){var c=i.strategy===vd?jF(i,e):i.strategy===kF?qF(i,e):ys[i.level].func(i,e);if((c===io||c===vs)&&(i.status=Ja),c===rt||c===io)return n.avail_out===0&&(i.last_flush=-1),Yi;if(c===Qa&&(e===vF?oi._tr_align(i):e!==nx&&(oi._tr_stored_block(i,0,0,!1),e===wF&&(cr(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),lr(n),n.avail_out===0))return i.last_flush=-1,Yi}return e!==ur?Yi:i.wrap<=0?rx:(i.wrap===2?(Ce(i,n.adler&255),Ce(i,n.adler>>8&255),Ce(i,n.adler>>16&255),Ce(i,n.adler>>24&255),Ce(i,n.total_in&255),Ce(i,n.total_in>>8&255),Ce(i,n.total_in>>16&255),Ce(i,n.total_in>>24&255)):(_a(i,n.adler>>>16),_a(i,n.adler&65535)),lr(n),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Yi:rx)}function YF(n){var e;return!n||!n.state?si:(e=n.state.status,e!==kd&&e!==r0&&e!==wd&&e!==Fd&&e!==Dd&&e!==to&&e!==Ja?hr(n,si):(n.state=null,e===to?hr(n,FF):Yi))}function _F(n,e){var t=e.length,i,r,o,s,a,c,l,d;if(!n||!n.state||(i=n.state,s=i.wrap,s===2||s===1&&i.status!==kd||i.lookahead))return si;for(s===1&&(n.adler=sx(n.adler,e,t,0)),i.wrap=0,t>=i.w_size&&(s===0&&(cr(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new Et.Buf8(i.w_size),Et.arraySet(d,e,t-i.w_size,i.w_size,0),e=d,t=i.w_size),a=n.avail_in,c=n.next_in,l=n.input,n.avail_in=t,n.next_in=0,n.input=e,no(i);i.lookahead>=be;){r=i.strstart,o=i.lookahead-(be-1);do i.ins_h=(i.ins_h<{"use strict";var Cd=bn(),ux=!0,fx=!0;try{String.fromCharCode.apply(null,[0])}catch(n){ux=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(n){fx=!1}var $a=new Cd.Buf8(256);for(vn=0;vn<256;vn++)$a[vn]=vn>=252?6:vn>=248?5:vn>=240?4:vn>=224?3:vn>=192?2:1;var vn;$a[254]=$a[254]=1;ws.string2buf=function(n){var e,t,i,r,o,s=n.length,a=0;for(r=0;r>>6,e[o++]=128|t&63):t<65536?(e[o++]=224|t>>>12,e[o++]=128|t>>>6&63,e[o++]=128|t&63):(e[o++]=240|t>>>18,e[o++]=128|t>>>12&63,e[o++]=128|t>>>6&63,e[o++]=128|t&63);return e};function px(n,e){if(e<65534&&(n.subarray&&fx||!n.subarray&&ux))return String.fromCharCode.apply(null,Cd.shrinkBuf(n,e));for(var t="",i=0;i4){a[i++]=65533,t+=o-1;continue}for(r&=o===2?31:o===3?15:7;o>1&&t1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return px(a,i)};ws.utf8border=function(n,e){var t;for(e=e||n.length,e>n.length&&(e=n.length),t=e-1;t>=0&&(n[t]&192)===128;)t--;return t<0||t===0?e:t+$a[n[t]]>e?t:e}});var s0=_(($C,gx)=>{"use strict";function JF(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}gx.exports=JF});var yx=_(il=>{"use strict";var el=hx(),tl=bn(),l0=o0(),c0=yd(),QF=s0(),bx=Object.prototype.toString,$F=0,a0=4,Fs=0,mx=1,xx=2,eD=-1,tD=0,iD=8;function oo(n){if(!(this instanceof oo))return new oo(n);this.options=tl.assign({level:eD,method:iD,chunkSize:16384,windowBits:15,memLevel:8,strategy:tD,to:""},n||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new QF,this.strm.avail_out=0;var t=el.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==Fs)throw new Error(c0[t]);if(e.header&&el.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(typeof e.dictionary=="string"?i=l0.string2buf(e.dictionary):bx.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,t=el.deflateSetDictionary(this.strm,i),t!==Fs)throw new Error(c0[t]);this._dict_set=!0}}oo.prototype.push=function(n,e){var t=this.strm,i=this.options.chunkSize,r,o;if(this.ended)return!1;o=e===~~e?e:e===!0?a0:$F,typeof n=="string"?t.input=l0.string2buf(n):bx.call(n)==="[object ArrayBuffer]"?t.input=new Uint8Array(n):t.input=n,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new tl.Buf8(i),t.next_out=0,t.avail_out=i),r=el.deflate(t,o),r!==mx&&r!==Fs)return this.onEnd(r),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(o===a0||o===xx))&&(this.options.to==="string"?this.onData(l0.buf2binstring(tl.shrinkBuf(t.output,t.next_out))):this.onData(tl.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&r!==mx);return o===a0?(r=el.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Fs):(o===xx&&(this.onEnd(Fs),t.avail_out=0),!0)};oo.prototype.onData=function(n){this.chunks.push(n)};oo.prototype.onEnd=function(n){n===Fs&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=tl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function d0(n,e){var t=new oo(e);if(t.push(n,!0),t.err)throw t.msg||c0[t.err];return t.result}function nD(n,e){return e=e||{},e.raw=!0,d0(n,e)}function rD(n,e){return e=e||{},e.gzip=!0,d0(n,e)}il.Deflate=oo;il.deflate=d0;il.deflateRaw=nD;il.gzip=rD});var wx=_((t2,vx)=>{"use strict";var Sd=30,oD=12;vx.exports=function(e,t){var i,r,o,s,a,c,l,d,h,u,p,f,m,x,g,b,w,y,F,D,C,k,E,B,S;i=e.state,r=e.next_in,B=e.input,o=r+(e.avail_in-5),s=e.next_out,S=e.output,a=s-(t-e.avail_out),c=s+(e.avail_out-257),l=i.dmax,d=i.wsize,h=i.whave,u=i.wnext,p=i.window,f=i.hold,m=i.bits,x=i.lencode,g=i.distcode,b=(1<>>24,f>>>=F,m-=F,F=y>>>16&255,F===0)S[s++]=y&65535;else if(F&16){D=y&65535,F&=15,F&&(m>>=F,m-=F),m<15&&(f+=B[r++]<>>24,f>>>=F,m-=F,F=y>>>16&255,F&16){if(C=y&65535,F&=15,ml){e.msg="invalid distance too far back",i.mode=Sd;break e}if(f>>>=F,m-=F,F=s-a,C>F){if(F=C-F,F>h&&i.sane){e.msg="invalid distance too far back",i.mode=Sd;break e}if(k=0,E=p,u===0){if(k+=d-F,F2;)S[s++]=E[k++],S[s++]=E[k++],S[s++]=E[k++],D-=3;D&&(S[s++]=E[k++],D>1&&(S[s++]=E[k++]))}else{k=s-C;do S[s++]=S[k++],S[s++]=S[k++],S[s++]=S[k++],D-=3;while(D>2);D&&(S[s++]=S[k++],D>1&&(S[s++]=S[k++]))}}else if((F&64)===0){y=g[(y&65535)+(f&(1<>3,r-=D,m-=D<<3,f&=(1<{"use strict";var Fx=bn(),Ds=15,Dx=852,Px=592,kx=0,h0=1,Cx=2,sD=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],aD=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],lD=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],cD=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Sx.exports=function(e,t,i,r,o,s,a,c){var l=c.bits,d=0,h=0,u=0,p=0,f=0,m=0,x=0,g=0,b=0,w=0,y,F,D,C,k,E=null,B=0,S,I=new Fx.Buf16(Ds+1),O=new Fx.Buf16(Ds+1),A=null,N=0,q,V,X;for(d=0;d<=Ds;d++)I[d]=0;for(h=0;h=1&&I[p]===0;p--);if(f>p&&(f=p),p===0)return o[s++]=1<<24|64<<16|0,o[s++]=1<<24|64<<16|0,c.bits=1,0;for(u=1;u0&&(e===kx||p!==1))return-1;for(O[1]=0,d=1;dDx||e===Cx&&b>Px)return 1;for(;;){q=d-x,a[h]S?(V=A[N+a[h]],X=E[B+a[h]]):(V=96,X=0),y=1<>x)+F]=q<<24|V<<16|X|0;while(F!==0);for(y=1<>=1;if(y!==0?(w&=y-1,w+=y):w=0,h++,--I[d]===0){if(d===p)break;d=t[i+a[h]]}if(d>f&&(w&C)!==D){for(x===0&&(x=f),k+=u,m=d-x,g=1<Dx||e===Cx&&b>Px)return 1;D=w&C,o[D]=f<<24|m<<16|k-s|0}}return w!==0&&(o[k+w]=d-x<<24|64<<16|0),c.bits=f,0}});var cb=_(Bi=>{"use strict";var Wt=bn(),x0=$f(),Ji=e0(),dD=wx(),nl=Ex(),hD=0,eb=1,tb=2,Tx=4,uD=5,Ed=6,so=0,fD=1,pD=2,ai=-2,ib=-3,b0=-4,gD=-5,Ax=8,nb=1,Ix=2,Bx=3,Ox=4,Lx=5,Mx=6,Nx=7,Rx=8,Vx=9,Hx=10,Id=11,wn=12,u0=13,zx=14,f0=15,Ux=16,qx=17,jx=18,Wx=19,Td=20,Ad=21,Kx=22,Gx=23,Xx=24,Zx=25,Yx=26,p0=27,_x=28,Jx=29,Ve=30,y0=31,mD=32,xD=852,bD=592,yD=15,vD=yD;function Qx(n){return(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24)}function wD(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Wt.Buf16(320),this.work=new Wt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function rb(n){var e;return!n||!n.state?ai:(e=n.state,n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=e.wrap&1),e.mode=nb,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Wt.Buf32(xD),e.distcode=e.distdyn=new Wt.Buf32(bD),e.sane=1,e.back=-1,so)}function ob(n){var e;return!n||!n.state?ai:(e=n.state,e.wsize=0,e.whave=0,e.wnext=0,rb(n))}function sb(n,e){var t,i;return!n||!n.state||(i=n.state,e<0?(t=0,e=-e):(t=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?ai:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,ob(n))}function ab(n,e){var t,i;return n?(i=new wD,n.state=i,i.window=null,t=sb(n,e),t!==so&&(n.state=null),t):ai}function FD(n){return ab(n,vD)}var $x=!0,g0,m0;function DD(n){if($x){var e;for(g0=new Wt.Buf32(512),m0=new Wt.Buf32(32),e=0;e<144;)n.lens[e++]=8;for(;e<256;)n.lens[e++]=9;for(;e<280;)n.lens[e++]=7;for(;e<288;)n.lens[e++]=8;for(nl(eb,n.lens,0,288,g0,0,n.work,{bits:9}),e=0;e<32;)n.lens[e++]=5;nl(tb,n.lens,0,32,m0,0,n.work,{bits:5}),$x=!1}n.lencode=g0,n.lenbits=9,n.distcode=m0,n.distbits=5}function lb(n,e,t,i){var r,o=n.state;return o.window===null&&(o.wsize=1<=o.wsize?(Wt.arraySet(o.window,e,t-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),Wt.arraySet(o.window,e,t-i,r,o.wnext),i-=r,i?(Wt.arraySet(o.window,e,t-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,t.check=Ji(t.check,E,2,0),l=0,d=0,t.mode=Ix;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((l&255)<<8)+(l>>8))%31){n.msg="incorrect header check",t.mode=Ve;break}if((l&15)!==Ax){n.msg="unknown compression method",t.mode=Ve;break}if(l>>>=4,d-=4,C=(l&15)+8,t.wbits===0)t.wbits=C;else if(C>t.wbits){n.msg="invalid window size",t.mode=Ve;break}t.dmax=1<>8&1),t.flags&512&&(E[0]=l&255,E[1]=l>>>8&255,t.check=Ji(t.check,E,2,0)),l=0,d=0,t.mode=Bx;case Bx:for(;d<32;){if(a===0)break e;a--,l+=i[o++]<>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,t.check=Ji(t.check,E,4,0)),l=0,d=0,t.mode=Ox;case Ox:for(;d<16;){if(a===0)break e;a--,l+=i[o++]<>8),t.flags&512&&(E[0]=l&255,E[1]=l>>>8&255,t.check=Ji(t.check,E,2,0)),l=0,d=0,t.mode=Lx;case Lx:if(t.flags&1024){for(;d<16;){if(a===0)break e;a--,l+=i[o++]<>>8&255,t.check=Ji(t.check,E,2,0)),l=0,d=0}else t.head&&(t.head.extra=null);t.mode=Mx;case Mx:if(t.flags&1024&&(p=t.length,p>a&&(p=a),p&&(t.head&&(C=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),Wt.arraySet(t.head.extra,i,o,p,C)),t.flags&512&&(t.check=Ji(t.check,i,p,o)),a-=p,o+=p,t.length-=p),t.length))break e;t.length=0,t.mode=Nx;case Nx:if(t.flags&2048){if(a===0)break e;p=0;do C=i[o+p++],t.head&&C&&t.length<65536&&(t.head.name+=String.fromCharCode(C));while(C&&p>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=wn;break;case Hx:for(;d<32;){if(a===0)break e;a--,l+=i[o++]<>>=d&7,d-=d&7,t.mode=p0;break}for(;d<3;){if(a===0)break e;a--,l+=i[o++]<>>=1,d-=1,l&3){case 0:t.mode=zx;break;case 1:if(DD(t),t.mode=Td,e===Ed){l>>>=2,d-=2;break e}break;case 2:t.mode=qx;break;case 3:n.msg="invalid block type",t.mode=Ve}l>>>=2,d-=2;break;case zx:for(l>>>=d&7,d-=d&7;d<32;){if(a===0)break e;a--,l+=i[o++]<>>16^65535)){n.msg="invalid stored block lengths",t.mode=Ve;break}if(t.length=l&65535,l=0,d=0,t.mode=f0,e===Ed)break e;case f0:t.mode=Ux;case Ux:if(p=t.length,p){if(p>a&&(p=a),p>c&&(p=c),p===0)break e;Wt.arraySet(r,i,o,p,s),a-=p,o+=p,c-=p,s+=p,t.length-=p;break}t.mode=wn;break;case qx:for(;d<14;){if(a===0)break e;a--,l+=i[o++]<>>=5,d-=5,t.ndist=(l&31)+1,l>>>=5,d-=5,t.ncode=(l&15)+4,l>>>=4,d-=4,t.nlen>286||t.ndist>30){n.msg="too many length or distance symbols",t.mode=Ve;break}t.have=0,t.mode=jx;case jx:for(;t.have>>=3,d-=3}for(;t.have<19;)t.lens[I[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,B={bits:t.lenbits},k=nl(hD,t.lens,0,19,t.lencode,0,t.work,B),t.lenbits=B.bits,k){n.msg="invalid code lengths set",t.mode=Ve;break}t.have=0,t.mode=Wx;case Wx:for(;t.have>>24,b=x>>>16&255,w=x&65535,!(g<=d);){if(a===0)break e;a--,l+=i[o++]<>>=g,d-=g,t.lens[t.have++]=w;else{if(w===16){for(S=g+2;d>>=g,d-=g,t.have===0){n.msg="invalid bit length repeat",t.mode=Ve;break}C=t.lens[t.have-1],p=3+(l&3),l>>>=2,d-=2}else if(w===17){for(S=g+3;d>>=g,d-=g,C=0,p=3+(l&7),l>>>=3,d-=3}else{for(S=g+7;d>>=g,d-=g,C=0,p=11+(l&127),l>>>=7,d-=7}if(t.have+p>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=Ve;break}for(;p--;)t.lens[t.have++]=C}}if(t.mode===Ve)break;if(t.lens[256]===0){n.msg="invalid code -- missing end-of-block",t.mode=Ve;break}if(t.lenbits=9,B={bits:t.lenbits},k=nl(eb,t.lens,0,t.nlen,t.lencode,0,t.work,B),t.lenbits=B.bits,k){n.msg="invalid literal/lengths set",t.mode=Ve;break}if(t.distbits=6,t.distcode=t.distdyn,B={bits:t.distbits},k=nl(tb,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,B),t.distbits=B.bits,k){n.msg="invalid distances set",t.mode=Ve;break}if(t.mode=Td,e===Ed)break e;case Td:t.mode=Ad;case Ad:if(a>=6&&c>=258){n.next_out=s,n.avail_out=c,n.next_in=o,n.avail_in=a,t.hold=l,t.bits=d,dD(n,u),s=n.next_out,r=n.output,c=n.avail_out,o=n.next_in,i=n.input,a=n.avail_in,l=t.hold,d=t.bits,t.mode===wn&&(t.back=-1);break}for(t.back=0;x=t.lencode[l&(1<>>24,b=x>>>16&255,w=x&65535,!(g<=d);){if(a===0)break e;a--,l+=i[o++]<>y)],g=x>>>24,b=x>>>16&255,w=x&65535,!(y+g<=d);){if(a===0)break e;a--,l+=i[o++]<>>=y,d-=y,t.back+=y}if(l>>>=g,d-=g,t.back+=g,t.length=w,b===0){t.mode=Yx;break}if(b&32){t.back=-1,t.mode=wn;break}if(b&64){n.msg="invalid literal/length code",t.mode=Ve;break}t.extra=b&15,t.mode=Kx;case Kx:if(t.extra){for(S=t.extra;d>>=t.extra,d-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Gx;case Gx:for(;x=t.distcode[l&(1<>>24,b=x>>>16&255,w=x&65535,!(g<=d);){if(a===0)break e;a--,l+=i[o++]<>y)],g=x>>>24,b=x>>>16&255,w=x&65535,!(y+g<=d);){if(a===0)break e;a--,l+=i[o++]<>>=y,d-=y,t.back+=y}if(l>>>=g,d-=g,t.back+=g,b&64){n.msg="invalid distance code",t.mode=Ve;break}t.offset=w,t.extra=b&15,t.mode=Xx;case Xx:if(t.extra){for(S=t.extra;d>>=t.extra,d-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=Ve;break}t.mode=Zx;case Zx:if(c===0)break e;if(p=u-c,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=Ve;break}p>t.wnext?(p-=t.wnext,f=t.wsize-p):f=t.wnext-p,p>t.length&&(p=t.length),m=t.window}else m=r,f=s-t.offset,p=t.length;p>c&&(p=c),c-=p,t.length-=p;do r[s++]=m[f++];while(--p);t.length===0&&(t.mode=Ad);break;case Yx:if(c===0)break e;r[s++]=t.length,c--,t.mode=Ad;break;case p0:if(t.wrap){for(;d<32;){if(a===0)break e;a--,l|=i[o++]<{"use strict";db.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var ub=_((o2,hb)=>{"use strict";function ED(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}hb.exports=ED});var pb=_(ol=>{"use strict";var Ps=cb(),rl=bn(),Bd=o0(),Xe=v0(),w0=yd(),TD=s0(),AD=ub(),fb=Object.prototype.toString;function ao(n){if(!(this instanceof ao))return new ao(n);this.options=rl.assign({chunkSize:16384,windowBits:0,to:""},n||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(n&&n.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new TD,this.strm.avail_out=0;var t=Ps.inflateInit2(this.strm,e.windowBits);if(t!==Xe.Z_OK)throw new Error(w0[t]);if(this.header=new AD,Ps.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Bd.string2buf(e.dictionary):fb.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=Ps.inflateSetDictionary(this.strm,e.dictionary),t!==Xe.Z_OK)))throw new Error(w0[t])}ao.prototype.push=function(n,e){var t=this.strm,i=this.options.chunkSize,r=this.options.dictionary,o,s,a,c,l,d=!1;if(this.ended)return!1;s=e===~~e?e:e===!0?Xe.Z_FINISH:Xe.Z_NO_FLUSH,typeof n=="string"?t.input=Bd.binstring2buf(n):fb.call(n)==="[object ArrayBuffer]"?t.input=new Uint8Array(n):t.input=n,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new rl.Buf8(i),t.next_out=0,t.avail_out=i),o=Ps.inflate(t,Xe.Z_NO_FLUSH),o===Xe.Z_NEED_DICT&&r&&(o=Ps.inflateSetDictionary(this.strm,r)),o===Xe.Z_BUF_ERROR&&d===!0&&(o=Xe.Z_OK,d=!1),o!==Xe.Z_STREAM_END&&o!==Xe.Z_OK)return this.onEnd(o),this.ended=!0,!1;t.next_out&&(t.avail_out===0||o===Xe.Z_STREAM_END||t.avail_in===0&&(s===Xe.Z_FINISH||s===Xe.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=Bd.utf8border(t.output,t.next_out),c=t.next_out-a,l=Bd.buf2string(t.output,a),t.next_out=c,t.avail_out=i-c,c&&rl.arraySet(t.output,t.output,a,c,0),this.onData(l)):this.onData(rl.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(d=!0)}while((t.avail_in>0||t.avail_out===0)&&o!==Xe.Z_STREAM_END);return o===Xe.Z_STREAM_END&&(s=Xe.Z_FINISH),s===Xe.Z_FINISH?(o=Ps.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Xe.Z_OK):(s===Xe.Z_SYNC_FLUSH&&(this.onEnd(Xe.Z_OK),t.avail_out=0),!0)};ao.prototype.onData=function(n){this.chunks.push(n)};ao.prototype.onEnd=function(n){n===Xe.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=rl.flattenChunks(this.chunks)),this.chunks=[],this.err=n,this.msg=this.strm.msg};function F0(n,e){var t=new ao(e);if(t.push(n,!0),t.err)throw t.msg||w0[t.err];return t.result}function ID(n,e){return e=e||{},e.raw=!0,F0(n,e)}ol.Inflate=ao;ol.inflate=F0;ol.inflateRaw=ID;ol.ungzip=F0});var sl=_((a2,mb)=>{"use strict";var BD=bn().assign,OD=yx(),LD=pb(),MD=v0(),gb={};BD(gb,OD,LD,MD);mb.exports=gb});var xe=_((Jd,py)=>{(function(n,e){typeof Jd=="object"?py.exports=Jd=e():typeof define=="function"&&define.amd?define([],e):n.CryptoJS=e()})(Jd,function(){var n=n||(function(e,t){var i;if(typeof window!="undefined"&&window.crypto&&(i=window.crypto),typeof self!="undefined"&&self.crypto&&(i=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window!="undefined"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global!="undefined"&&global.crypto&&(i=global.crypto),!i&&typeof require=="function")try{i=require("crypto")}catch(g){}var r=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch(g){}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch(g){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||(function(){function g(){}return function(b){var w;return g.prototype=b,w=new g,g.prototype=null,w}})(),s={},a=s.lib={},c=a.Base=(function(){return{extend:function(g){var b=o(this);return g&&b.mixIn(g),(!b.hasOwnProperty("init")||this.init===b.init)&&(b.init=function(){b.$super.init.apply(this,arguments)}),b.init.prototype=b,b.$super=this,b},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var b in g)g.hasOwnProperty(b)&&(this[b]=g[b]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),l=a.WordArray=c.extend({init:function(g,b){g=this.words=g||[],b!=t?this.sigBytes=b:this.sigBytes=g.length*4},toString:function(g){return(g||h).stringify(this)},concat:function(g){var b=this.words,w=g.words,y=this.sigBytes,F=g.sigBytes;if(this.clamp(),y%4)for(var D=0;D>>2]>>>24-D%4*8&255;b[y+D>>>2]|=C<<24-(y+D)%4*8}else for(var k=0;k>>2]=w[k>>>2];return this.sigBytes+=F,this},clamp:function(){var g=this.words,b=this.sigBytes;g[b>>>2]&=4294967295<<32-b%4*8,g.length=e.ceil(b/4)},clone:function(){var g=c.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var b=[],w=0;w>>2]>>>24-F%4*8&255;y.push((D>>>4).toString(16)),y.push((D&15).toString(16))}return y.join("")},parse:function(g){for(var b=g.length,w=[],y=0;y>>3]|=parseInt(g.substr(y,2),16)<<24-y%8*4;return new l.init(w,b/2)}},u=d.Latin1={stringify:function(g){for(var b=g.words,w=g.sigBytes,y=[],F=0;F>>2]>>>24-F%4*8&255;y.push(String.fromCharCode(D))}return y.join("")},parse:function(g){for(var b=g.length,w=[],y=0;y>>2]|=(g.charCodeAt(y)&255)<<24-y%4*8;return new l.init(w,b)}},p=d.Utf8={stringify:function(g){try{return decodeURIComponent(escape(u.stringify(g)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(g){return u.parse(unescape(encodeURIComponent(g)))}},f=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=p.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var b,w=this._data,y=w.words,F=w.sigBytes,D=this.blockSize,C=D*4,k=F/C;g?k=e.ceil(k):k=e.max((k|0)-this._minBufferSize,0);var E=k*D,B=e.min(E*4,F);if(E){for(var S=0;S{(function(n,e){typeof Qd=="object"?gy.exports=Qd=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(Qd,function(n){return(function(e){var t=n,i=t.lib,r=i.Base,o=i.WordArray,s=t.x64={},a=s.Word=r.extend({init:function(l,d){this.high=l,this.low=d}}),c=s.WordArray=r.extend({init:function(l,d){l=this.words=l||[],d!=e?this.sigBytes=d:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,d=l.length,h=[],u=0;u{(function(n,e){typeof $d=="object"?my.exports=$d=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})($d,function(n){return(function(){if(typeof ArrayBuffer=="function"){var e=n,t=e.lib,i=t.WordArray,r=i.init,o=i.init=function(s){if(s instanceof ArrayBuffer&&(s=new Uint8Array(s)),(s instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&s instanceof Uint8ClampedArray||s instanceof Int16Array||s instanceof Uint16Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Float32Array||s instanceof Float64Array)&&(s=new Uint8Array(s.buffer,s.byteOffset,s.byteLength)),s instanceof Uint8Array){for(var a=s.byteLength,c=[],l=0;l>>2]|=s[l]<<24-l%4*8;r.call(this,c,a)}else r.apply(this,arguments)};o.prototype=i}})(),n.lib.WordArray})});var yy=_((eh,by)=>{(function(n,e){typeof eh=="object"?by.exports=eh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(eh,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=e.enc,o=r.Utf16=r.Utf16BE={stringify:function(a){for(var c=a.words,l=a.sigBytes,d=[],h=0;h>>2]>>>16-h%4*8&65535;d.push(String.fromCharCode(u))}return d.join("")},parse:function(a){for(var c=a.length,l=[],d=0;d>>1]|=a.charCodeAt(d)<<16-d%2*16;return i.create(l,c*2)}};r.Utf16LE={stringify:function(a){for(var c=a.words,l=a.sigBytes,d=[],h=0;h>>2]>>>16-h%4*8&65535);d.push(String.fromCharCode(u))}return d.join("")},parse:function(a){for(var c=a.length,l=[],d=0;d>>1]|=s(a.charCodeAt(d)<<16-d%2*16);return i.create(l,c*2)}};function s(a){return a<<8&4278255360|a>>>8&16711935}})(),n.enc.Utf16})});var Cr=_((th,vy)=>{(function(n,e){typeof th=="object"?vy.exports=th=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(th,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var c=a.words,l=a.sigBytes,d=this._map;a.clamp();for(var h=[],u=0;u>>2]>>>24-u%4*8&255,f=c[u+1>>>2]>>>24-(u+1)%4*8&255,m=c[u+2>>>2]>>>24-(u+2)%4*8&255,x=p<<16|f<<8|m,g=0;g<4&&u+g*.75>>6*(3-g)&63));var b=d.charAt(64);if(b)for(;h.length%4;)h.push(b);return h.join("")},parse:function(a){var c=a.length,l=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h>>6-u%4*2,m=p|f;d[h>>>2]|=m<<24-h%4*8,h++}return i.create(d,h)}})(),n.enc.Base64})});var Fy=_((ih,wy)=>{(function(n,e){typeof ih=="object"?wy.exports=ih=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(ih,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=e.enc,o=r.Base64url={stringify:function(a,c){c===void 0&&(c=!0);var l=a.words,d=a.sigBytes,h=c?this._safe_map:this._map;a.clamp();for(var u=[],p=0;p>>2]>>>24-p%4*8&255,m=l[p+1>>>2]>>>24-(p+1)%4*8&255,x=l[p+2>>>2]>>>24-(p+2)%4*8&255,g=f<<16|m<<8|x,b=0;b<4&&p+b*.75>>6*(3-b)&63));var w=h.charAt(64);if(w)for(;u.length%4;)u.push(w);return u.join("")},parse:function(a,c){c===void 0&&(c=!0);var l=a.length,d=c?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var u=0;u>>6-u%4*2,m=p|f;d[h>>>2]|=m<<24-h%4*8,h++}return i.create(d,h)}})(),n.enc.Base64url})});var Sr=_((nh,Dy)=>{(function(n,e){typeof nh=="object"?Dy.exports=nh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(nh,function(n){return(function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,s=t.algo,a=[];(function(){for(var p=0;p<64;p++)a[p]=e.abs(e.sin(p+1))*4294967296|0})();var c=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,f){for(var m=0;m<16;m++){var x=f+m,g=p[x];p[x]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var b=this._hash.words,w=p[f+0],y=p[f+1],F=p[f+2],D=p[f+3],C=p[f+4],k=p[f+5],E=p[f+6],B=p[f+7],S=p[f+8],I=p[f+9],O=p[f+10],A=p[f+11],N=p[f+12],q=p[f+13],V=p[f+14],X=p[f+15],L=b[0],U=b[1],R=b[2],M=b[3];L=l(L,U,R,M,w,7,a[0]),M=l(M,L,U,R,y,12,a[1]),R=l(R,M,L,U,F,17,a[2]),U=l(U,R,M,L,D,22,a[3]),L=l(L,U,R,M,C,7,a[4]),M=l(M,L,U,R,k,12,a[5]),R=l(R,M,L,U,E,17,a[6]),U=l(U,R,M,L,B,22,a[7]),L=l(L,U,R,M,S,7,a[8]),M=l(M,L,U,R,I,12,a[9]),R=l(R,M,L,U,O,17,a[10]),U=l(U,R,M,L,A,22,a[11]),L=l(L,U,R,M,N,7,a[12]),M=l(M,L,U,R,q,12,a[13]),R=l(R,M,L,U,V,17,a[14]),U=l(U,R,M,L,X,22,a[15]),L=d(L,U,R,M,y,5,a[16]),M=d(M,L,U,R,E,9,a[17]),R=d(R,M,L,U,A,14,a[18]),U=d(U,R,M,L,w,20,a[19]),L=d(L,U,R,M,k,5,a[20]),M=d(M,L,U,R,O,9,a[21]),R=d(R,M,L,U,X,14,a[22]),U=d(U,R,M,L,C,20,a[23]),L=d(L,U,R,M,I,5,a[24]),M=d(M,L,U,R,V,9,a[25]),R=d(R,M,L,U,D,14,a[26]),U=d(U,R,M,L,S,20,a[27]),L=d(L,U,R,M,q,5,a[28]),M=d(M,L,U,R,F,9,a[29]),R=d(R,M,L,U,B,14,a[30]),U=d(U,R,M,L,N,20,a[31]),L=h(L,U,R,M,k,4,a[32]),M=h(M,L,U,R,S,11,a[33]),R=h(R,M,L,U,A,16,a[34]),U=h(U,R,M,L,V,23,a[35]),L=h(L,U,R,M,y,4,a[36]),M=h(M,L,U,R,C,11,a[37]),R=h(R,M,L,U,B,16,a[38]),U=h(U,R,M,L,O,23,a[39]),L=h(L,U,R,M,q,4,a[40]),M=h(M,L,U,R,w,11,a[41]),R=h(R,M,L,U,D,16,a[42]),U=h(U,R,M,L,E,23,a[43]),L=h(L,U,R,M,I,4,a[44]),M=h(M,L,U,R,N,11,a[45]),R=h(R,M,L,U,X,16,a[46]),U=h(U,R,M,L,F,23,a[47]),L=u(L,U,R,M,w,6,a[48]),M=u(M,L,U,R,B,10,a[49]),R=u(R,M,L,U,V,15,a[50]),U=u(U,R,M,L,k,21,a[51]),L=u(L,U,R,M,N,6,a[52]),M=u(M,L,U,R,D,10,a[53]),R=u(R,M,L,U,O,15,a[54]),U=u(U,R,M,L,y,21,a[55]),L=u(L,U,R,M,S,6,a[56]),M=u(M,L,U,R,X,10,a[57]),R=u(R,M,L,U,E,15,a[58]),U=u(U,R,M,L,q,21,a[59]),L=u(L,U,R,M,C,6,a[60]),M=u(M,L,U,R,A,10,a[61]),R=u(R,M,L,U,F,15,a[62]),U=u(U,R,M,L,I,21,a[63]),b[0]=b[0]+L|0,b[1]=b[1]+U|0,b[2]=b[2]+R|0,b[3]=b[3]+M|0},_doFinalize:function(){var p=this._data,f=p.words,m=this._nDataBytes*8,x=p.sigBytes*8;f[x>>>5]|=128<<24-x%32;var g=e.floor(m/4294967296),b=m;f[(x+64>>>9<<4)+15]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,f[(x+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,p.sigBytes=(f.length+1)*4,this._process();for(var w=this._hash,y=w.words,F=0;F<4;F++){var D=y[F];y[F]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return w},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function l(p,f,m,x,g,b,w){var y=p+(f&m|~f&x)+g+w;return(y<>>32-b)+f}function d(p,f,m,x,g,b,w){var y=p+(f&x|m&~x)+g+w;return(y<>>32-b)+f}function h(p,f,m,x,g,b,w){var y=p+(f^m^x)+g+w;return(y<>>32-b)+f}function u(p,f,m,x,g,b,w){var y=p+(m^(f|~x))+g+w;return(y<>>32-b)+f}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)})(Math),n.MD5})});var tp=_((rh,Py)=>{(function(n,e){typeof rh=="object"?Py.exports=rh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(rh,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=t.Hasher,o=e.algo,s=[],a=o.SHA1=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(c,l){for(var d=this._hash.words,h=d[0],u=d[1],p=d[2],f=d[3],m=d[4],x=0;x<80;x++){if(x<16)s[x]=c[l+x]|0;else{var g=s[x-3]^s[x-8]^s[x-14]^s[x-16];s[x]=g<<1|g>>>31}var b=(h<<5|h>>>27)+m+s[x];x<20?b+=(u&p|~u&f)+1518500249:x<40?b+=(u^p^f)+1859775393:x<60?b+=(u&p|u&f|p&f)-1894007588:b+=(u^p^f)-899497514,m=f,f=p,p=u<<30|u>>>2,u=h,h=b}d[0]=d[0]+h|0,d[1]=d[1]+u|0,d[2]=d[2]+p|0,d[3]=d[3]+f|0,d[4]=d[4]+m|0},_doFinalize:function(){var c=this._data,l=c.words,d=this._nDataBytes*8,h=c.sigBytes*8;return l[h>>>5]|=128<<24-h%32,l[(h+64>>>9<<4)+14]=Math.floor(d/4294967296),l[(h+64>>>9<<4)+15]=d,c.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var c=r.clone.call(this);return c._hash=this._hash.clone(),c}});e.SHA1=r._createHelper(a),e.HmacSHA1=r._createHmacHelper(a)})(),n.SHA1})});var sh=_((oh,ky)=>{(function(n,e){typeof oh=="object"?ky.exports=oh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(oh,function(n){return(function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,s=t.algo,a=[],c=[];(function(){function h(m){for(var x=e.sqrt(m),g=2;g<=x;g++)if(!(m%g))return!1;return!0}function u(m){return(m-(m|0))*4294967296|0}for(var p=2,f=0;f<64;)h(p)&&(f<8&&(a[f]=u(e.pow(p,1/2))),c[f]=u(e.pow(p,1/3)),f++),p++})();var l=[],d=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(h,u){for(var p=this._hash.words,f=p[0],m=p[1],x=p[2],g=p[3],b=p[4],w=p[5],y=p[6],F=p[7],D=0;D<64;D++){if(D<16)l[D]=h[u+D]|0;else{var C=l[D-15],k=(C<<25|C>>>7)^(C<<14|C>>>18)^C>>>3,E=l[D-2],B=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;l[D]=k+l[D-7]+B+l[D-16]}var S=b&w^~b&y,I=f&m^f&x^m&x,O=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),A=(b<<26|b>>>6)^(b<<21|b>>>11)^(b<<7|b>>>25),N=F+A+S+c[D]+l[D],q=O+I;F=y,y=w,w=b,b=g+N|0,g=x,x=m,m=f,f=N+q|0}p[0]=p[0]+f|0,p[1]=p[1]+m|0,p[2]=p[2]+x|0,p[3]=p[3]+g|0,p[4]=p[4]+b|0,p[5]=p[5]+w|0,p[6]=p[6]+y|0,p[7]=p[7]+F|0},_doFinalize:function(){var h=this._data,u=h.words,p=this._nDataBytes*8,f=h.sigBytes*8;return u[f>>>5]|=128<<24-f%32,u[(f+64>>>9<<4)+14]=e.floor(p/4294967296),u[(f+64>>>9<<4)+15]=p,h.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var h=o.clone.call(this);return h._hash=this._hash.clone(),h}});t.SHA256=o._createHelper(d),t.HmacSHA256=o._createHmacHelper(d)})(Math),n.SHA256})});var Sy=_((ah,Cy)=>{(function(n,e,t){typeof ah=="object"?Cy.exports=ah=e(xe(),sh()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(n.CryptoJS)})(ah,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=e.algo,o=r.SHA256,s=r.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=o._doFinalize.call(this);return a.sigBytes-=4,a}});e.SHA224=o._createHelper(s),e.HmacSHA224=o._createHmacHelper(s)})(),n.SHA224})});var ip=_((lh,Ey)=>{(function(n,e,t){typeof lh=="object"?Ey.exports=lh=e(xe(),ac()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(n.CryptoJS)})(lh,function(n){return(function(){var e=n,t=e.lib,i=t.Hasher,r=e.x64,o=r.Word,s=r.WordArray,a=e.algo;function c(){return o.create.apply(o,arguments)}var l=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],d=[];(function(){for(var u=0;u<80;u++)d[u]=c()})();var h=a.SHA512=i.extend({_doReset:function(){this._hash=new s.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(u,p){for(var f=this._hash.words,m=f[0],x=f[1],g=f[2],b=f[3],w=f[4],y=f[5],F=f[6],D=f[7],C=m.high,k=m.low,E=x.high,B=x.low,S=g.high,I=g.low,O=b.high,A=b.low,N=w.high,q=w.low,V=y.high,X=y.low,L=F.high,U=F.low,R=D.high,M=D.low,re=C,se=k,Te=E,he=B,dt=S,qt=I,ji=O,Ot=A,Fe=N,Ct=q,$n=V,Ia=X,dd=L,Ba=U,yf=R,Oa=M,Ti=0;Ti<80;Ti++){var ri,er,hd=d[Ti];if(Ti<16)er=hd.high=u[p+Ti*2]|0,ri=hd.low=u[p+Ti*2+1]|0;else{var cm=d[Ti-15],ls=cm.high,La=cm.low,m1=(ls>>>1|La<<31)^(ls>>>8|La<<24)^ls>>>7,dm=(La>>>1|ls<<31)^(La>>>8|ls<<24)^(La>>>7|ls<<25),hm=d[Ti-2],cs=hm.high,Ma=hm.low,x1=(cs>>>19|Ma<<13)^(cs<<3|Ma>>>29)^cs>>>6,um=(Ma>>>19|cs<<13)^(Ma<<3|cs>>>29)^(Ma>>>6|cs<<26),fm=d[Ti-7],b1=fm.high,y1=fm.low,pm=d[Ti-16],v1=pm.high,gm=pm.low;ri=dm+y1,er=m1+b1+(ri>>>0>>0?1:0),ri=ri+um,er=er+x1+(ri>>>0>>0?1:0),ri=ri+gm,er=er+v1+(ri>>>0>>0?1:0),hd.high=er,hd.low=ri}var w1=Fe&$n^~Fe&dd,mm=Ct&Ia^~Ct&Ba,F1=re&Te^re&dt^Te&dt,D1=se&he^se&qt^he&qt,P1=(re>>>28|se<<4)^(re<<30|se>>>2)^(re<<25|se>>>7),xm=(se>>>28|re<<4)^(se<<30|re>>>2)^(se<<25|re>>>7),k1=(Fe>>>14|Ct<<18)^(Fe>>>18|Ct<<14)^(Fe<<23|Ct>>>9),C1=(Ct>>>14|Fe<<18)^(Ct>>>18|Fe<<14)^(Ct<<23|Fe>>>9),bm=l[Ti],S1=bm.high,ym=bm.low,jt=Oa+C1,tr=yf+k1+(jt>>>0>>0?1:0),jt=jt+mm,tr=tr+w1+(jt>>>0>>0?1:0),jt=jt+ym,tr=tr+S1+(jt>>>0>>0?1:0),jt=jt+ri,tr=tr+er+(jt>>>0>>0?1:0),vm=xm+D1,E1=P1+F1+(vm>>>0>>0?1:0);yf=dd,Oa=Ba,dd=$n,Ba=Ia,$n=Fe,Ia=Ct,Ct=Ot+jt|0,Fe=ji+tr+(Ct>>>0>>0?1:0)|0,ji=dt,Ot=qt,dt=Te,qt=he,Te=re,he=se,se=jt+vm|0,re=tr+E1+(se>>>0>>0?1:0)|0}k=m.low=k+se,m.high=C+re+(k>>>0>>0?1:0),B=x.low=B+he,x.high=E+Te+(B>>>0>>0?1:0),I=g.low=I+qt,g.high=S+dt+(I>>>0>>0?1:0),A=b.low=A+Ot,b.high=O+ji+(A>>>0>>0?1:0),q=w.low=q+Ct,w.high=N+Fe+(q>>>0>>0?1:0),X=y.low=X+Ia,y.high=V+$n+(X>>>0>>0?1:0),U=F.low=U+Ba,F.high=L+dd+(U>>>0>>0?1:0),M=D.low=M+Oa,D.high=R+yf+(M>>>0>>0?1:0)},_doFinalize:function(){var u=this._data,p=u.words,f=this._nDataBytes*8,m=u.sigBytes*8;p[m>>>5]|=128<<24-m%32,p[(m+128>>>10<<5)+30]=Math.floor(f/4294967296),p[(m+128>>>10<<5)+31]=f,u.sigBytes=p.length*4,this._process();var x=this._hash.toX32();return x},clone:function(){var u=i.clone.call(this);return u._hash=this._hash.clone(),u},blockSize:1024/32});e.SHA512=i._createHelper(h),e.HmacSHA512=i._createHmacHelper(h)})(),n.SHA512})});var Ay=_((ch,Ty)=>{(function(n,e,t){typeof ch=="object"?Ty.exports=ch=e(xe(),ac(),ip()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(n.CryptoJS)})(ch,function(n){return(function(){var e=n,t=e.x64,i=t.Word,r=t.WordArray,o=e.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new r.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var c=s._doFinalize.call(this);return c.sigBytes-=16,c}});e.SHA384=s._createHelper(a),e.HmacSHA384=s._createHmacHelper(a)})(),n.SHA384})});var By=_((dh,Iy)=>{(function(n,e,t){typeof dh=="object"?Iy.exports=dh=e(xe(),ac()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(n.CryptoJS)})(dh,function(n){return(function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,s=t.x64,a=s.Word,c=t.algo,l=[],d=[],h=[];(function(){for(var f=1,m=0,x=0;x<24;x++){l[f+5*m]=(x+1)*(x+2)/2%64;var g=m%5,b=(2*f+3*m)%5;f=g,m=b}for(var f=0;f<5;f++)for(var m=0;m<5;m++)d[f+5*m]=m+(2*f+3*m)%5*5;for(var w=1,y=0;y<24;y++){for(var F=0,D=0,C=0;C<7;C++){if(w&1){var k=(1<>>24)&16711935|(w<<24|w>>>8)&4278255360,y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360;var F=x[b];F.high^=y,F.low^=w}for(var D=0;D<24;D++){for(var C=0;C<5;C++){for(var k=0,E=0,B=0;B<5;B++){var F=x[C+5*B];k^=F.high,E^=F.low}var S=u[C];S.high=k,S.low=E}for(var C=0;C<5;C++)for(var I=u[(C+4)%5],O=u[(C+1)%5],A=O.high,N=O.low,k=I.high^(A<<1|N>>>31),E=I.low^(N<<1|A>>>31),B=0;B<5;B++){var F=x[C+5*B];F.high^=k,F.low^=E}for(var q=1;q<25;q++){var k,E,F=x[q],V=F.high,X=F.low,L=l[q];L<32?(k=V<>>32-L,E=X<>>32-L):(k=X<>>64-L,E=V<>>64-L);var U=u[d[q]];U.high=k,U.low=E}var R=u[0],M=x[0];R.high=M.high,R.low=M.low;for(var C=0;C<5;C++)for(var B=0;B<5;B++){var q=C+5*B,F=x[q],re=u[q],se=u[(C+1)%5+5*B],Te=u[(C+2)%5+5*B];F.high=re.high^~se.high&Te.high,F.low=re.low^~se.low&Te.low}var F=x[0],he=h[D];F.high^=he.high,F.low^=he.low}},_doFinalize:function(){var f=this._data,m=f.words,x=this._nDataBytes*8,g=f.sigBytes*8,b=this.blockSize*32;m[g>>>5]|=1<<24-g%32,m[(e.ceil((g+1)/b)*b>>>5)-1]|=128,f.sigBytes=m.length*4,this._process();for(var w=this._state,y=this.cfg.outputLength/8,F=y/8,D=[],C=0;C>>24)&16711935|(E<<24|E>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,D.push(B),D.push(E)}return new r.init(D,y)},clone:function(){for(var f=o.clone.call(this),m=f._state=this._state.slice(0),x=0;x<25;x++)m[x]=m[x].clone();return f}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)})(Math),n.SHA3})});var Ly=_((hh,Oy)=>{(function(n,e){typeof hh=="object"?Oy.exports=hh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(hh,function(n){return(function(e){var t=n,i=t.lib,r=i.WordArray,o=i.Hasher,s=t.algo,a=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),p=s.RIPEMD160=o.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(y,F){for(var D=0;D<16;D++){var C=F+D,k=y[C];y[C]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}var E=this._hash.words,B=h.words,S=u.words,I=a.words,O=c.words,A=l.words,N=d.words,q,V,X,L,U,R,M,re,se,Te;R=q=E[0],M=V=E[1],re=X=E[2],se=L=E[3],Te=U=E[4];for(var he,D=0;D<80;D+=1)he=q+y[F+I[D]]|0,D<16?he+=f(V,X,L)+B[0]:D<32?he+=m(V,X,L)+B[1]:D<48?he+=x(V,X,L)+B[2]:D<64?he+=g(V,X,L)+B[3]:he+=b(V,X,L)+B[4],he=he|0,he=w(he,A[D]),he=he+U|0,q=U,U=L,L=w(X,10),X=V,V=he,he=R+y[F+O[D]]|0,D<16?he+=b(M,re,se)+S[0]:D<32?he+=g(M,re,se)+S[1]:D<48?he+=x(M,re,se)+S[2]:D<64?he+=m(M,re,se)+S[3]:he+=f(M,re,se)+S[4],he=he|0,he=w(he,N[D]),he=he+Te|0,R=Te,Te=se,se=w(re,10),re=M,M=he;he=E[1]+X+se|0,E[1]=E[2]+L+Te|0,E[2]=E[3]+U+R|0,E[3]=E[4]+q+M|0,E[4]=E[0]+V+re|0,E[0]=he},_doFinalize:function(){var y=this._data,F=y.words,D=this._nDataBytes*8,C=y.sigBytes*8;F[C>>>5]|=128<<24-C%32,F[(C+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,y.sigBytes=(F.length+1)*4,this._process();for(var k=this._hash,E=k.words,B=0;B<5;B++){var S=E[B];E[B]=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360}return k},clone:function(){var y=o.clone.call(this);return y._hash=this._hash.clone(),y}});function f(y,F,D){return y^F^D}function m(y,F,D){return y&F|~y&D}function x(y,F,D){return(y|~F)^D}function g(y,F,D){return y&D|F&~D}function b(y,F,D){return y^(F|~D)}function w(y,F){return y<>>32-F}t.RIPEMD160=o._createHelper(p),t.HmacRIPEMD160=o._createHmacHelper(p)})(Math),n.RIPEMD160})});var fh=_((uh,My)=>{(function(n,e){typeof uh=="object"?My.exports=uh=e(xe()):typeof define=="function"&&define.amd?define(["./core"],e):e(n.CryptoJS)})(uh,function(n){(function(){var e=n,t=e.lib,i=t.Base,r=e.enc,o=r.Utf8,s=e.algo,a=s.HMAC=i.extend({init:function(c,l){c=this._hasher=new c.init,typeof l=="string"&&(l=o.parse(l));var d=c.blockSize,h=d*4;l.sigBytes>h&&(l=c.finalize(l)),l.clamp();for(var u=this._oKey=l.clone(),p=this._iKey=l.clone(),f=u.words,m=p.words,x=0;x{(function(n,e,t){typeof ph=="object"?Ny.exports=ph=e(xe(),sh(),fh()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(n.CryptoJS)})(ph,function(n){return(function(){var e=n,t=e.lib,i=t.Base,r=t.WordArray,o=e.algo,s=o.SHA256,a=o.HMAC,c=o.PBKDF2=i.extend({cfg:i.extend({keySize:128/32,hasher:s,iterations:25e4}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,d){for(var h=this.cfg,u=a.create(h.hasher,l),p=r.create(),f=r.create([1]),m=p.words,x=f.words,g=h.keySize,b=h.iterations;m.length{(function(n,e,t){typeof gh=="object"?Vy.exports=gh=e(xe(),tp(),fh()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(n.CryptoJS)})(gh,function(n){return(function(){var e=n,t=e.lib,i=t.Base,r=t.WordArray,o=e.algo,s=o.MD5,a=o.EvpKDF=i.extend({cfg:i.extend({keySize:128/32,hasher:s,iterations:1}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,l){for(var d,h=this.cfg,u=h.hasher.create(),p=r.create(),f=p.words,m=h.keySize,x=h.iterations;f.length{(function(n,e,t){typeof mh=="object"?Hy.exports=mh=e(xe(),Mn()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(n.CryptoJS)})(mh,function(n){n.lib.Cipher||(function(e){var t=n,i=t.lib,r=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=t.enc,c=a.Utf8,l=a.Base64,d=t.algo,h=d.EvpKDF,u=i.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(S,I){return this.create(this._ENC_XFORM_MODE,S,I)},createDecryptor:function(S,I){return this.create(this._DEC_XFORM_MODE,S,I)},init:function(S,I,O){this.cfg=this.cfg.extend(O),this._xformMode=S,this._key=I,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(S){return this._append(S),this._process()},finalize:function(S){S&&this._append(S);var I=this._doFinalize();return I},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function S(I){return typeof I=="string"?B:C}return function(I){return{encrypt:function(O,A,N){return S(A).encrypt(I,O,A,N)},decrypt:function(O,A,N){return S(A).decrypt(I,O,A,N)}}}})()}),p=i.StreamCipher=u.extend({_doFinalize:function(){var S=this._process(!0);return S},blockSize:1}),f=t.mode={},m=i.BlockCipherMode=r.extend({createEncryptor:function(S,I){return this.Encryptor.create(S,I)},createDecryptor:function(S,I){return this.Decryptor.create(S,I)},init:function(S,I){this._cipher=S,this._iv=I}}),x=f.CBC=(function(){var S=m.extend();S.Encryptor=S.extend({processBlock:function(O,A){var N=this._cipher,q=N.blockSize;I.call(this,O,A,q),N.encryptBlock(O,A),this._prevBlock=O.slice(A,A+q)}}),S.Decryptor=S.extend({processBlock:function(O,A){var N=this._cipher,q=N.blockSize,V=O.slice(A,A+q);N.decryptBlock(O,A),I.call(this,O,A,q),this._prevBlock=V}});function I(O,A,N){var q,V=this._iv;V?(q=V,this._iv=e):q=this._prevBlock;for(var X=0;X>>2]&255;S.sigBytes-=I}},w=i.BlockCipher=u.extend({cfg:u.cfg.extend({mode:x,padding:b}),reset:function(){var S;u.reset.call(this);var I=this.cfg,O=I.iv,A=I.mode;this._xformMode==this._ENC_XFORM_MODE?S=A.createEncryptor:(S=A.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==S?this._mode.init(this,O&&O.words):(this._mode=S.call(A,this,O&&O.words),this._mode.__creator=S)},_doProcessBlock:function(S,I){this._mode.processBlock(S,I)},_doFinalize:function(){var S,I=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(I.pad(this._data,this.blockSize),S=this._process(!0)):(S=this._process(!0),I.unpad(S)),S},blockSize:128/32}),y=i.CipherParams=r.extend({init:function(S){this.mixIn(S)},toString:function(S){return(S||this.formatter).stringify(this)}}),F=t.format={},D=F.OpenSSL={stringify:function(S){var I,O=S.ciphertext,A=S.salt;return A?I=o.create([1398893684,1701076831]).concat(A).concat(O):I=O,I.toString(l)},parse:function(S){var I,O=l.parse(S),A=O.words;return A[0]==1398893684&&A[1]==1701076831&&(I=o.create(A.slice(2,4)),A.splice(0,4),O.sigBytes-=16),y.create({ciphertext:O,salt:I})}},C=i.SerializableCipher=r.extend({cfg:r.extend({format:D}),encrypt:function(S,I,O,A){A=this.cfg.extend(A);var N=S.createEncryptor(O,A),q=N.finalize(I),V=N.cfg;return y.create({ciphertext:q,key:O,iv:V.iv,algorithm:S,mode:V.mode,padding:V.padding,blockSize:S.blockSize,formatter:A.format})},decrypt:function(S,I,O,A){A=this.cfg.extend(A),I=this._parse(I,A.format);var N=S.createDecryptor(O,A).finalize(I.ciphertext);return N},_parse:function(S,I){return typeof S=="string"?I.parse(S,this):S}}),k=t.kdf={},E=k.OpenSSL={execute:function(S,I,O,A,N){if(A||(A=o.random(64/8)),N)var q=h.create({keySize:I+O,hasher:N}).compute(S,A);else var q=h.create({keySize:I+O}).compute(S,A);var V=o.create(q.words.slice(I),O*4);return q.sigBytes=I*4,y.create({key:q,iv:V,salt:A})}},B=i.PasswordBasedCipher=C.extend({cfg:C.cfg.extend({kdf:E}),encrypt:function(S,I,O,A){A=this.cfg.extend(A);var N=A.kdf.execute(O,S.keySize,S.ivSize,A.salt,A.hasher);A.iv=N.iv;var q=C.encrypt.call(this,S,I,N.key,A);return q.mixIn(N),q},decrypt:function(S,I,O,A){A=this.cfg.extend(A),I=this._parse(I,A.format);var N=A.kdf.execute(O,S.keySize,S.ivSize,I.salt,A.hasher);A.iv=N.iv;var q=C.decrypt.call(this,S,I,N.key,A);return q}})})()})});var Uy=_((xh,zy)=>{(function(n,e,t){typeof xh=="object"?zy.exports=xh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(xh,function(n){return n.mode.CFB=(function(){var e=n.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(i,r){var o=this._cipher,s=o.blockSize;t.call(this,i,r,s,o),this._prevBlock=i.slice(r,r+s)}}),e.Decryptor=e.extend({processBlock:function(i,r){var o=this._cipher,s=o.blockSize,a=i.slice(r,r+s);t.call(this,i,r,s,o),this._prevBlock=a}});function t(i,r,o,s){var a,c=this._iv;c?(a=c.slice(0),this._iv=void 0):a=this._prevBlock,s.encryptBlock(a,0);for(var l=0;l{(function(n,e,t){typeof bh=="object"?qy.exports=bh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(bh,function(n){return n.mode.CTR=(function(){var e=n.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(i,r){var o=this._cipher,s=o.blockSize,a=this._iv,c=this._counter;a&&(c=this._counter=a.slice(0),this._iv=void 0);var l=c.slice(0);o.encryptBlock(l,0),c[s-1]=c[s-1]+1|0;for(var d=0;d{(function(n,e,t){typeof yh=="object"?Wy.exports=yh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(yh,function(n){return n.mode.CTRGladman=(function(){var e=n.lib.BlockCipherMode.extend();function t(o){if((o>>24&255)===255){var s=o>>16&255,a=o>>8&255,c=o&255;s===255?(s=0,a===255?(a=0,c===255?c=0:++c):++a):++s,o=0,o+=s<<16,o+=a<<8,o+=c}else o+=1<<24;return o}function i(o){return(o[0]=t(o[0]))===0&&(o[1]=t(o[1])),o}var r=e.Encryptor=e.extend({processBlock:function(o,s){var a=this._cipher,c=a.blockSize,l=this._iv,d=this._counter;l&&(d=this._counter=l.slice(0),this._iv=void 0),i(d);var h=d.slice(0);a.encryptBlock(h,0);for(var u=0;u{(function(n,e,t){typeof vh=="object"?Gy.exports=vh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(vh,function(n){return n.mode.OFB=(function(){var e=n.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(i,r){var o=this._cipher,s=o.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),o.encryptBlock(c,0);for(var l=0;l{(function(n,e,t){typeof wh=="object"?Zy.exports=wh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(wh,function(n){return n.mode.ECB=(function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(t,i){this._cipher.encryptBlock(t,i)}}),e.Decryptor=e.extend({processBlock:function(t,i){this._cipher.decryptBlock(t,i)}}),e})(),n.mode.ECB})});var Jy=_((Fh,_y)=>{(function(n,e,t){typeof Fh=="object"?_y.exports=Fh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(Fh,function(n){return n.pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,r=t*4,o=r-i%r,s=i+o-1;e.clamp(),e.words[s>>>2]|=o<<24-s%4*8,e.sigBytes+=o},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},n.pad.Ansix923})});var $y=_((Dh,Qy)=>{(function(n,e,t){typeof Dh=="object"?Qy.exports=Dh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(Dh,function(n){return n.pad.Iso10126={pad:function(e,t){var i=t*4,r=i-e.sigBytes%i;e.concat(n.lib.WordArray.random(r-1)).concat(n.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},n.pad.Iso10126})});var tv=_((Ph,ev)=>{(function(n,e,t){typeof Ph=="object"?ev.exports=Ph=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(Ph,function(n){return n.pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971})});var nv=_((kh,iv)=>{(function(n,e,t){typeof kh=="object"?iv.exports=kh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(kh,function(n){return n.pad.ZeroPadding={pad:function(e,t){var i=t*4;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){for(var t=e.words,i=e.sigBytes-1,i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},n.pad.ZeroPadding})});var ov=_((Ch,rv)=>{(function(n,e,t){typeof Ch=="object"?rv.exports=Ch=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(Ch,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})});var av=_((Sh,sv)=>{(function(n,e,t){typeof Sh=="object"?sv.exports=Sh=e(xe(),ot()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(n.CryptoJS)})(Sh,function(n){return(function(e){var t=n,i=t.lib,r=i.CipherParams,o=t.enc,s=o.Hex,a=t.format,c=a.Hex={stringify:function(l){return l.ciphertext.toString(s)},parse:function(l){var d=s.parse(l);return r.create({ciphertext:d})}}})(),n.format.Hex})});var cv=_((Eh,lv)=>{(function(n,e,t){typeof Eh=="object"?lv.exports=Eh=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Eh,function(n){return(function(){var e=n,t=e.lib,i=t.BlockCipher,r=e.algo,o=[],s=[],a=[],c=[],l=[],d=[],h=[],u=[],p=[],f=[];(function(){for(var g=[],b=0;b<256;b++)b<128?g[b]=b<<1:g[b]=b<<1^283;for(var w=0,y=0,b=0;b<256;b++){var F=y^y<<1^y<<2^y<<3^y<<4;F=F>>>8^F&255^99,o[w]=F,s[F]=w;var D=g[w],C=g[D],k=g[C],E=g[F]*257^F*16843008;a[w]=E<<24|E>>>8,c[w]=E<<16|E>>>16,l[w]=E<<8|E>>>24,d[w]=E;var E=k*16843009^C*65537^D*257^w*16843008;h[F]=E<<24|E>>>8,u[F]=E<<16|E>>>16,p[F]=E<<8|E>>>24,f[F]=E,w?(w=D^g[g[g[k^D]]],y^=g[g[y]]):w=y=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],x=r.AES=i.extend({_doReset:function(){var g;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var b=this._keyPriorReset=this._key,w=b.words,y=b.sigBytes/4,F=this._nRounds=y+6,D=(F+1)*4,C=this._keySchedule=[],k=0;k6&&k%y==4&&(g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255]):(g=g<<8|g>>>24,g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255],g^=m[k/y|0]<<24),C[k]=C[k-y]^g);for(var E=this._invKeySchedule=[],B=0;B>>24]]^u[o[g>>>16&255]]^p[o[g>>>8&255]]^f[o[g&255]]}}},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._keySchedule,a,c,l,d,o)},decryptBlock:function(g,b){var w=g[b+1];g[b+1]=g[b+3],g[b+3]=w,this._doCryptBlock(g,b,this._invKeySchedule,h,u,p,f,s);var w=g[b+1];g[b+1]=g[b+3],g[b+3]=w},_doCryptBlock:function(g,b,w,y,F,D,C,k){for(var E=this._nRounds,B=g[b]^w[0],S=g[b+1]^w[1],I=g[b+2]^w[2],O=g[b+3]^w[3],A=4,N=1;N>>24]^F[S>>>16&255]^D[I>>>8&255]^C[O&255]^w[A++],V=y[S>>>24]^F[I>>>16&255]^D[O>>>8&255]^C[B&255]^w[A++],X=y[I>>>24]^F[O>>>16&255]^D[B>>>8&255]^C[S&255]^w[A++],L=y[O>>>24]^F[B>>>16&255]^D[S>>>8&255]^C[I&255]^w[A++];B=q,S=V,I=X,O=L}var q=(k[B>>>24]<<24|k[S>>>16&255]<<16|k[I>>>8&255]<<8|k[O&255])^w[A++],V=(k[S>>>24]<<24|k[I>>>16&255]<<16|k[O>>>8&255]<<8|k[B&255])^w[A++],X=(k[I>>>24]<<24|k[O>>>16&255]<<16|k[B>>>8&255]<<8|k[S&255])^w[A++],L=(k[O>>>24]<<24|k[B>>>16&255]<<16|k[S>>>8&255]<<8|k[I&255])^w[A++];g[b]=q,g[b+1]=V,g[b+2]=X,g[b+3]=L},keySize:256/32});e.AES=i._createHelper(x)})(),n.AES})});var hv=_((Th,dv)=>{(function(n,e,t){typeof Th=="object"?dv.exports=Th=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Th,function(n){return(function(){var e=n,t=e.lib,i=t.WordArray,r=t.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=r.extend({_doReset:function(){for(var m=this._key,x=m.words,g=[],b=0;b<56;b++){var w=s[b]-1;g[b]=x[w>>>5]>>>31-w%32&1}for(var y=this._subKeys=[],F=0;F<16;F++){for(var D=y[F]=[],C=c[F],b=0;b<24;b++)D[b/6|0]|=g[(a[b]-1+C)%28]<<31-b%6,D[4+(b/6|0)]|=g[28+(a[b+24]-1+C)%28]<<31-b%6;D[0]=D[0]<<1|D[0]>>>31;for(var b=1;b<7;b++)D[b]=D[b]>>>(b-1)*4+3;D[7]=D[7]<<5|D[7]>>>27}for(var k=this._invSubKeys=[],b=0;b<16;b++)k[b]=y[15-b]},encryptBlock:function(m,x){this._doCryptBlock(m,x,this._subKeys)},decryptBlock:function(m,x){this._doCryptBlock(m,x,this._invSubKeys)},_doCryptBlock:function(m,x,g){this._lBlock=m[x],this._rBlock=m[x+1],u.call(this,4,252645135),u.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),u.call(this,1,1431655765);for(var b=0;b<16;b++){for(var w=g[b],y=this._lBlock,F=this._rBlock,D=0,C=0;C<8;C++)D|=l[C][((F^w[C])&d[C])>>>0];this._lBlock=F,this._rBlock=y^D}var k=this._lBlock;this._lBlock=this._rBlock,this._rBlock=k,u.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),m[x]=this._lBlock,m[x+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function u(m,x){var g=(this._lBlock>>>m^this._rBlock)&x;this._rBlock^=g,this._lBlock^=g<>>m^this._lBlock)&x;this._lBlock^=g,this._rBlock^=g<192.");var g=x.slice(0,2),b=x.length<4?x.slice(0,2):x.slice(2,4),w=x.length<6?x.slice(0,2):x.slice(4,6);this._des1=h.createEncryptor(i.create(g)),this._des2=h.createEncryptor(i.create(b)),this._des3=h.createEncryptor(i.create(w))},encryptBlock:function(m,x){this._des1.encryptBlock(m,x),this._des2.decryptBlock(m,x),this._des3.encryptBlock(m,x)},decryptBlock:function(m,x){this._des3.decryptBlock(m,x),this._des2.encryptBlock(m,x),this._des1.decryptBlock(m,x)},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=r._createHelper(f)})(),n.TripleDES})});var fv=_((Ah,uv)=>{(function(n,e,t){typeof Ah=="object"?uv.exports=Ah=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Ah,function(n){return(function(){var e=n,t=e.lib,i=t.StreamCipher,r=e.algo,o=r.RC4=i.extend({_doReset:function(){for(var c=this._key,l=c.words,d=c.sigBytes,h=this._S=[],u=0;u<256;u++)h[u]=u;for(var u=0,p=0;u<256;u++){var f=u%d,m=l[f>>>2]>>>24-f%4*8&255;p=(p+h[u]+m)%256;var x=h[u];h[u]=h[p],h[p]=x}this._i=this._j=0},_doProcessBlock:function(c,l){c[l]^=s.call(this)},keySize:256/32,ivSize:0});function s(){for(var c=this._S,l=this._i,d=this._j,h=0,u=0;u<4;u++){l=(l+1)%256,d=(d+c[l])%256;var p=c[l];c[l]=c[d],c[d]=p,h|=c[(c[l]+c[d])%256]<<24-u*8}return this._i=l,this._j=d,h}e.RC4=i._createHelper(o);var a=r.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var c=this.cfg.drop;c>0;c--)s.call(this)}});e.RC4Drop=i._createHelper(a)})(),n.RC4})});var gv=_((Ih,pv)=>{(function(n,e,t){typeof Ih=="object"?pv.exports=Ih=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Ih,function(n){return(function(){var e=n,t=e.lib,i=t.StreamCipher,r=e.algo,o=[],s=[],a=[],c=r.Rabbit=i.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,u=0;u<4;u++)d[u]=(d[u]<<8|d[u]>>>24)&16711935|(d[u]<<24|d[u]>>>8)&4278255360;var p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],f=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var u=0;u<4;u++)l.call(this);for(var u=0;u<8;u++)f[u]^=p[u+4&7];if(h){var m=h.words,x=m[0],g=m[1],b=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,w=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,y=b>>>16|w&4294901760,F=w<<16|b&65535;f[0]^=b,f[1]^=y,f[2]^=w,f[3]^=F,f[4]^=b,f[5]^=y,f[6]^=w,f[7]^=F;for(var u=0;u<4;u++)l.call(this)}},_doProcessBlock:function(d,h){var u=this._X;l.call(this),o[0]=u[0]^u[5]>>>16^u[3]<<16,o[1]=u[2]^u[7]>>>16^u[5]<<16,o[2]=u[4]^u[1]>>>16^u[7]<<16,o[3]=u[6]^u[3]>>>16^u[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,d[h+p]^=o[p]},blockSize:128/32,ivSize:64/32});function l(){for(var d=this._X,h=this._C,u=0;u<8;u++)s[u]=h[u];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var u=0;u<8;u++){var p=d[u]+h[u],f=p&65535,m=p>>>16,x=((f*f>>>17)+f*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);a[u]=x^g}d[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,d[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,d[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,d[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,d[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,d[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,d[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,d[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=i._createHelper(c)})(),n.Rabbit})});var xv=_((Bh,mv)=>{(function(n,e,t){typeof Bh=="object"?mv.exports=Bh=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Bh,function(n){return(function(){var e=n,t=e.lib,i=t.StreamCipher,r=e.algo,o=[],s=[],a=[],c=r.RabbitLegacy=i.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,u=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],p=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var f=0;f<4;f++)l.call(this);for(var f=0;f<8;f++)p[f]^=u[f+4&7];if(h){var m=h.words,x=m[0],g=m[1],b=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,w=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,y=b>>>16|w&4294901760,F=w<<16|b&65535;p[0]^=b,p[1]^=y,p[2]^=w,p[3]^=F,p[4]^=b,p[5]^=y,p[6]^=w,p[7]^=F;for(var f=0;f<4;f++)l.call(this)}},_doProcessBlock:function(d,h){var u=this._X;l.call(this),o[0]=u[0]^u[5]>>>16^u[3]<<16,o[1]=u[2]^u[7]>>>16^u[5]<<16,o[2]=u[4]^u[1]>>>16^u[7]<<16,o[3]=u[6]^u[3]>>>16^u[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,d[h+p]^=o[p]},blockSize:128/32,ivSize:64/32});function l(){for(var d=this._X,h=this._C,u=0;u<8;u++)s[u]=h[u];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var u=0;u<8;u++){var p=d[u]+h[u],f=p&65535,m=p>>>16,x=((f*f>>>17)+f*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);a[u]=x^g}d[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,d[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,d[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,d[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,d[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,d[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,d[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,d[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=i._createHelper(c)})(),n.RabbitLegacy})});var yv=_((Oh,bv)=>{(function(n,e,t){typeof Oh=="object"?bv.exports=Oh=e(xe(),Cr(),Sr(),Mn(),ot()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(n.CryptoJS)})(Oh,function(n){return(function(){var e=n,t=e.lib,i=t.BlockCipher,r=e.algo;let o=16,s=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function l(f,m){let x=m>>24&255,g=m>>16&255,b=m>>8&255,w=m&255,y=f.sbox[0][x]+f.sbox[1][g];return y=y^f.sbox[2][b],y=y+f.sbox[3][w],y}function d(f,m,x){let g=m,b=x,w;for(let y=0;y1;--y)g=g^f.pbox[y],b=l(f,g)^b,w=g,g=b,b=w;return w=g,g=b,b=w,b=b^f.pbox[1],g=g^f.pbox[0],{left:g,right:b}}function u(f,m,x){for(let F=0;F<4;F++){f.sbox[F]=[];for(let D=0;D<256;D++)f.sbox[F][D]=a[F][D]}let g=0;for(let F=0;F=x&&(g=0);let b=0,w=0,y=0;for(let F=0;F{(function(n,e,t){typeof Lh=="object"?vv.exports=Lh=e(xe(),ac(),xy(),yy(),Cr(),Fy(),Sr(),tp(),sh(),Sy(),ip(),Ay(),By(),Ly(),fh(),Ry(),Mn(),ot(),Uy(),jy(),Ky(),Xy(),Yy(),Jy(),$y(),tv(),nv(),ov(),av(),cv(),hv(),fv(),gv(),xv(),yv()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):n.CryptoJS=e(n.CryptoJS)})(Lh,function(n){return n})});var bp=_((B6,Sv)=>{"use strict";Sv.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Tv=_((O6,Ev)=>{Ev.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var Bv=_((L6,Iv)=>{"use strict";var ZP=Tv(),YP=Array.prototype.concat,_P=Array.prototype.slice,Av=Iv.exports=function(e){for(var t=[],i=0,r=e.length;i{var xc=bp(),bc=Bv(),Ov=Object.hasOwnProperty,Lv=Object.create(null);for(Wh in xc)Ov.call(xc,Wh)&&(Lv[xc[Wh]]=Wh);var Wh,Gt=Mv.exports={to:{},get:{}};Gt.get=function(n){var e=n.substring(0,3).toLowerCase(),t,i;switch(e){case"hsl":t=Gt.get.hsl(n),i="hsl";break;case"hwb":t=Gt.get.hwb(n),i="hwb";break;default:t=Gt.get.rgb(n),i="rgb";break}return t?{model:i,value:t}:null};Gt.get.rgb=function(n){if(!n)return null;var e=/^#([a-f0-9]{3,4})$/i,t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,r=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,c,l;if(a=n.match(t)){for(l=a[2],a=a[1],c=0;c<3;c++){var d=c*2;s[c]=parseInt(a.slice(d,d+2),16)}l&&(s[3]=parseInt(l,16)/255)}else if(a=n.match(e)){for(a=a[1],l=a[3],c=0;c<3;c++)s[c]=parseInt(a[c]+a[c],16);l&&(s[3]=parseInt(l+l,16)/255)}else if(a=n.match(i)){for(c=0;c<3;c++)s[c]=parseInt(a[c+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=n.match(r)){for(c=0;c<3;c++)s[c]=Math.round(parseFloat(a[c+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=n.match(o))?a[1]==="transparent"?[0,0,0,0]:Ov.call(xc,a[1])?(s=xc[a[1]],s[3]=1,s):null:null;for(c=0;c<3;c++)s[c]=Ir(s[c],0,255);return s[3]=Ir(s[3],0,1),s};Gt.get.hsl=function(n){if(!n)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){var i=parseFloat(t[4]),r=(parseFloat(t[1])%360+360)%360,o=Ir(parseFloat(t[2]),0,100),s=Ir(parseFloat(t[3]),0,100),a=Ir(isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};Gt.get.hwb=function(n){if(!n)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=n.match(e);if(t){var i=parseFloat(t[4]),r=(parseFloat(t[1])%360+360)%360,o=Ir(parseFloat(t[2]),0,100),s=Ir(parseFloat(t[3]),0,100),a=Ir(isNaN(i)?1:i,0,1);return[r,o,s,a]}return null};Gt.to.hex=function(){var n=bc(arguments);return"#"+Kh(n[0])+Kh(n[1])+Kh(n[2])+(n[3]<1?Kh(Math.round(n[3]*255)):"")};Gt.to.rgb=function(){var n=bc(arguments);return n.length<4||n[3]===1?"rgb("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+")":"rgba("+Math.round(n[0])+", "+Math.round(n[1])+", "+Math.round(n[2])+", "+n[3]+")"};Gt.to.rgb.percent=function(){var n=bc(arguments),e=Math.round(n[0]/255*100),t=Math.round(n[1]/255*100),i=Math.round(n[2]/255*100);return n.length<4||n[3]===1?"rgb("+e+"%, "+t+"%, "+i+"%)":"rgba("+e+"%, "+t+"%, "+i+"%, "+n[3]+")"};Gt.to.hsl=function(){var n=bc(arguments);return n.length<4||n[3]===1?"hsl("+n[0]+", "+n[1]+"%, "+n[2]+"%)":"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+n[3]+")"};Gt.to.hwb=function(){var n=bc(arguments),e="";return n.length>=4&&n[3]!==1&&(e=", "+n[3]),"hwb("+n[0]+", "+n[1]+"%, "+n[2]+"%"+e+")"};Gt.to.keyword=function(n){return Lv[n.slice(0,3)]};function Ir(n,e,t){return Math.min(Math.max(e,n),t)}function Kh(n){var e=Math.round(n).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var yp=_((N6,Vv)=>{var yc=bp(),Rv={};for(let n of Object.keys(yc))Rv[yc[n]]=n;var ee={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Vv.exports=ee;for(let n of Object.keys(ee)){if(!("channels"in ee[n]))throw new Error("missing channels property: "+n);if(!("labels"in ee[n]))throw new Error("missing channel labels property: "+n);if(ee[n].labels.length!==ee[n].channels)throw new Error("channel and label counts mismatch: "+n);let{channels:e,labels:t}=ee[n];delete ee[n].channels,delete ee[n].labels,Object.defineProperty(ee[n],"channels",{value:e}),Object.defineProperty(ee[n],"labels",{value:t})}ee.rgb.hsl=function(n){let e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(e,t,i),o=Math.max(e,t,i),s=o-r,a,c;o===r?a=0:e===o?a=(t-i)/s:t===o?a=2+(i-e)/s:i===o&&(a=4+(e-t)/s),a=Math.min(a*60,360),a<0&&(a+=360);let l=(r+o)/2;return o===r?c=0:l<=.5?c=s/(o+r):c=s/(2-o-r),[a,c*100,l*100]};ee.rgb.hsv=function(n){let e,t,i,r,o,s=n[0]/255,a=n[1]/255,c=n[2]/255,l=Math.max(s,a,c),d=l-Math.min(s,a,c),h=function(u){return(l-u)/6/d+1/2};return d===0?(r=0,o=0):(o=d/l,e=h(s),t=h(a),i=h(c),s===l?r=i-t:a===l?r=1/3+e-i:c===l&&(r=2/3+t-e),r<0?r+=1:r>1&&(r-=1)),[r*360,o*100,l*100]};ee.rgb.hwb=function(n){let e=n[0],t=n[1],i=n[2],r=ee.rgb.hsl(n)[0],o=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[r,o*100,i*100]};ee.rgb.cmyk=function(n){let e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.min(1-e,1-t,1-i),o=(1-e-r)/(1-r)||0,s=(1-t-r)/(1-r)||0,a=(1-i-r)/(1-r)||0;return[o*100,s*100,a*100,r*100]};function JP(n,e){return(n[0]-e[0])**2+(n[1]-e[1])**2+(n[2]-e[2])**2}ee.rgb.keyword=function(n){let e=Rv[n];if(e)return e;let t=1/0,i;for(let r of Object.keys(yc)){let o=yc[r],s=JP(n,o);s.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let r=e*.4124+t*.3576+i*.1805,o=e*.2126+t*.7152+i*.0722,s=e*.0193+t*.1192+i*.9505;return[r*100,o*100,s*100]};ee.rgb.lab=function(n){let e=ee.rgb.xyz(n),t=e[0],i=e[1],r=e[2];t/=95.047,i/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;let o=116*i-16,s=500*(t-i),a=200*(i-r);return[o,s,a]};ee.hsl.rgb=function(n){let e=n[0]/360,t=n[1]/100,i=n[2]/100,r,o,s;if(t===0)return s=i*255,[s,s,s];i<.5?r=i*(1+t):r=i+t-i*t;let a=2*i-r,c=[0,0,0];for(let l=0;l<3;l++)o=e+1/3*-(l-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(r-a)*6*o:2*o<1?s=r:3*o<2?s=a+(r-a)*(2/3-o)*6:s=a,c[l]=s*255;return c};ee.hsl.hsv=function(n){let e=n[0],t=n[1]/100,i=n[2]/100,r=t,o=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,r*=o<=1?o:2-o;let s=(i+t)/2,a=i===0?2*r/(o+r):2*t/(i+t);return[e,a*100,s*100]};ee.hsv.rgb=function(n){let e=n[0]/60,t=n[1]/100,i=n[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-t),a=255*i*(1-t*o),c=255*i*(1-t*(1-o));switch(i*=255,r){case 0:return[i,c,s];case 1:return[a,i,s];case 2:return[s,i,c];case 3:return[s,a,i];case 4:return[c,s,i];case 5:return[i,s,a]}};ee.hsv.hsl=function(n){let e=n[0],t=n[1]/100,i=n[2]/100,r=Math.max(i,.01),o,s;s=(2-t)*i;let a=(2-t)*r;return o=t*r,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};ee.hwb.rgb=function(n){let e=n[0]/360,t=n[1]/100,i=n[2]/100,r=t+i,o;r>1&&(t/=r,i/=r);let s=Math.floor(6*e),a=1-i;o=6*e-s,(s&1)!==0&&(o=1-o);let c=t+o*(a-t),l,d,h;switch(s){default:case 6:case 0:l=a,d=c,h=t;break;case 1:l=c,d=a,h=t;break;case 2:l=t,d=a,h=c;break;case 3:l=t,d=c,h=a;break;case 4:l=c,d=t,h=a;break;case 5:l=a,d=t,h=c;break}return[l*255,d*255,h*255]};ee.cmyk.rgb=function(n){let e=n[0]/100,t=n[1]/100,i=n[2]/100,r=n[3]/100,o=1-Math.min(1,e*(1-r)+r),s=1-Math.min(1,t*(1-r)+r),a=1-Math.min(1,i*(1-r)+r);return[o*255,s*255,a*255]};ee.xyz.rgb=function(n){let e=n[0]/100,t=n[1]/100,i=n[2]/100,r,o,s;return r=e*3.2406+t*-1.5372+i*-.4986,o=e*-.9689+t*1.8758+i*.0415,s=e*.0557+t*-.204+i*1.057,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[r*255,o*255,s*255]};ee.xyz.lab=function(n){let e=n[0],t=n[1],i=n[2];e/=95.047,t/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let r=116*t-16,o=500*(e-t),s=200*(t-i);return[r,o,s]};ee.lab.xyz=function(n){let e=n[0],t=n[1],i=n[2],r,o,s;o=(e+16)/116,r=t/500+o,s=o-i/200;let a=o**3,c=r**3,l=s**3;return o=a>.008856?a:(o-16/116)/7.787,r=c>.008856?c:(r-16/116)/7.787,s=l>.008856?l:(s-16/116)/7.787,r*=95.047,o*=100,s*=108.883,[r,o,s]};ee.lab.lch=function(n){let e=n[0],t=n[1],i=n[2],r;r=Math.atan2(i,t)*360/2/Math.PI,r<0&&(r+=360);let s=Math.sqrt(t*t+i*i);return[e,s,r]};ee.lch.lab=function(n){let e=n[0],t=n[1],r=n[2]/360*2*Math.PI,o=t*Math.cos(r),s=t*Math.sin(r);return[e,o,s]};ee.rgb.ansi16=function(n,e=null){let[t,i,r]=n,o=e===null?ee.rgb.hsv(n)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(r/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return o===2&&(s+=60),s};ee.hsv.ansi16=function(n){return ee.rgb.ansi16(ee.hsv.rgb(n),n[2])};ee.rgb.ansi256=function(n){let e=n[0],t=n[1],i=n[2];return e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};ee.ansi16.rgb=function(n){let e=n%10;if(e===0||e===7)return n>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let t=(~~(n>50)+1)*.5,i=(e&1)*t*255,r=(e>>1&1)*t*255,o=(e>>2&1)*t*255;return[i,r,o]};ee.ansi256.rgb=function(n){if(n>=232){let o=(n-232)*10+8;return[o,o,o]}n-=16;let e,t=Math.floor(n/36)/5*255,i=Math.floor((e=n%36)/6)/5*255,r=e%6/5*255;return[t,i,r]};ee.rgb.hex=function(n){let t=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};ee.hex.rgb=function(n){let e=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(a=>a+a).join(""));let i=parseInt(t,16),r=i>>16&255,o=i>>8&255,s=i&255;return[r,o,s]};ee.rgb.hcg=function(n){let e=n[0]/255,t=n[1]/255,i=n[2]/255,r=Math.max(Math.max(e,t),i),o=Math.min(Math.min(e,t),i),s=r-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:r===e?c=(t-i)/s%6:r===t?c=2+(i-e)/s:c=4+(e-t)/s,c/=6,c%=1,[c*360,s*100,a*100]};ee.hsl.hcg=function(n){let e=n[1]/100,t=n[2]/100,i=t<.5?2*e*t:2*e*(1-t),r=0;return i<1&&(r=(t-.5*i)/(1-i)),[n[0],i*100,r*100]};ee.hsv.hcg=function(n){let e=n[1]/100,t=n[2]/100,i=e*t,r=0;return i<1&&(r=(t-i)/(1-i)),[n[0],i*100,r*100]};ee.hcg.rgb=function(n){let e=n[0]/360,t=n[1]/100,i=n[2]/100;if(t===0)return[i*255,i*255,i*255];let r=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return c=(1-t)*i,[(t*r[0]+c)*255,(t*r[1]+c)*255,(t*r[2]+c)*255]};ee.hcg.hsv=function(n){let e=n[1]/100,t=n[2]/100,i=e+t*(1-e),r=0;return i>0&&(r=e/i),[n[0],r*100,i*100]};ee.hcg.hsl=function(n){let e=n[1]/100,i=n[2]/100*(1-e)+.5*e,r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[n[0],r*100,i*100]};ee.hcg.hwb=function(n){let e=n[1]/100,t=n[2]/100,i=e+t*(1-e);return[n[0],(i-e)*100,(1-i)*100]};ee.hwb.hcg=function(n){let e=n[1]/100,i=1-n[2]/100,r=i-e,o=0;return r<1&&(o=(i-r)/(1-r)),[n[0],r*100,o*100]};ee.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]};ee.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]};ee.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]};ee.gray.hsl=function(n){return[0,0,n[0]]};ee.gray.hsv=ee.gray.hsl;ee.gray.hwb=function(n){return[0,100,n[0]]};ee.gray.cmyk=function(n){return[0,0,0,n[0]]};ee.gray.lab=function(n){return[n[0],0,0]};ee.gray.hex=function(n){let e=Math.round(n[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};ee.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]}});var zv=_((R6,Hv)=>{var Gh=yp();function QP(){let n={},e=Object.keys(Gh);for(let t=e.length,i=0;i{var vp=yp(),ik=zv(),Qs={},nk=Object.keys(vp);function rk(n){let e=function(...t){let i=t[0];return i==null?i:(i.length>1&&(t=i),n(t))};return"conversion"in n&&(e.conversion=n.conversion),e}function ok(n){let e=function(...t){let i=t[0];if(i==null)return i;i.length>1&&(t=i);let r=n(t);if(typeof r=="object")for(let o=r.length,s=0;s{Qs[n]={},Object.defineProperty(Qs[n],"channels",{value:vp[n].channels}),Object.defineProperty(Qs[n],"labels",{value:vp[n].labels});let e=ik(n);Object.keys(e).forEach(i=>{let r=e[i];Qs[n][i]=ok(r),Qs[n][i].raw=rk(r)})});Uv.exports=Qs});var Kv=_((H6,Wv)=>{var $s=Nv(),Xt=qv(),jv=["keyword","gray","hex"],wp={};for(let n of Object.keys(Xt))wp[[...Xt[n].labels].sort().join("")]=n;var Xh={};function ft(n,e){if(!(this instanceof ft))return new ft(n,e);if(e&&e in jv&&(e=null),e&&!(e in Xt))throw new Error("Unknown model: "+e);let t,i;if(n==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(n instanceof ft)this.model=n.model,this.color=[...n.color],this.valpha=n.valpha;else if(typeof n=="string"){let r=$s.get(n);if(r===null)throw new Error("Unable to parse color from string: "+n);this.model=r.model,i=Xt[this.model].channels,this.color=r.value.slice(0,i),this.valpha=typeof r.value[i]=="number"?r.value[i]:1}else if(n.length>0){this.model=e||"rgb",i=Xt[this.model].channels;let r=Array.prototype.slice.call(n,0,i);this.color=Fp(r,i),this.valpha=typeof n[i]=="number"?n[i]:1}else if(typeof n=="number")this.model="rgb",this.color=[n>>16&255,n>>8&255,n&255],this.valpha=1;else{this.valpha=1;let r=Object.keys(n);"alpha"in n&&(r.splice(r.indexOf("alpha"),1),this.valpha=typeof n.alpha=="number"?n.alpha:0);let o=r.sort().join("");if(!(o in wp))throw new Error("Unable to parse color from object: "+JSON.stringify(n));this.model=wp[o];let{labels:s}=Xt[this.model],a=[];for(t=0;t(n%360+360)%360),saturationl:je("hsl",1,st(100)),lightness:je("hsl",2,st(100)),saturationv:je("hsv",1,st(100)),value:je("hsv",2,st(100)),chroma:je("hcg",1,st(100)),gray:je("hcg",2,st(100)),white:je("hwb",1,st(100)),wblack:je("hwb",2,st(100)),cyan:je("cmyk",0,st(100)),magenta:je("cmyk",1,st(100)),yellow:je("cmyk",2,st(100)),black:je("cmyk",3,st(100)),x:je("xyz",0,st(95.047)),y:je("xyz",1,st(100)),z:je("xyz",2,st(108.833)),l:je("lab",0,st(100)),a:je("lab",1),b:je("lab",2),keyword(n){return n!==void 0?new ft(n):Xt[this.model].keyword(this.color)},hex(n){return n!==void 0?new ft(n):$s.to.hex(this.rgb().round().color)},hexa(n){if(n!==void 0)return new ft(n);let e=this.rgb().round().color,t=Math.round(this.valpha*255).toString(16).toUpperCase();return t.length===1&&(t="0"+t),$s.to.hex(e)+t},rgbNumber(){let n=this.rgb().color;return(n[0]&255)<<16|(n[1]&255)<<8|n[2]&255},luminosity(){let n=this.rgb().color,e=[];for(let[t,i]of n.entries()){let r=i/255;e[t]=r<=.04045?r/12.92:((r+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(n){let e=this.luminosity(),t=n.luminosity();return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)},level(n){let e=this.contrast(n);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let n=this.rgb().color;return(n[0]*2126+n[1]*7152+n[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let n=this.rgb();for(let e=0;e<3;e++)n.color[e]=255-n.color[e];return n},lighten(n){let e=this.hsl();return e.color[2]+=e.color[2]*n,e},darken(n){let e=this.hsl();return e.color[2]-=e.color[2]*n,e},saturate(n){let e=this.hsl();return e.color[1]+=e.color[1]*n,e},desaturate(n){let e=this.hsl();return e.color[1]-=e.color[1]*n,e},whiten(n){let e=this.hwb();return e.color[1]+=e.color[1]*n,e},blacken(n){let e=this.hwb();return e.color[2]+=e.color[2]*n,e},grayscale(){let n=this.rgb().color,e=n[0]*.3+n[1]*.59+n[2]*.11;return ft.rgb(e,e,e)},fade(n){return this.alpha(this.valpha-this.valpha*n)},opaquer(n){return this.alpha(this.valpha+this.valpha*n)},rotate(n){let e=this.hsl(),t=e.color[0];return t=(t+n)%360,t=t<0?360+t:t,e.color[0]=t,e},mix(n,e){if(!n||!n.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof n);let t=n.rgb(),i=this.rgb(),r=e===void 0?.5:e,o=2*r-1,s=t.alpha()-i.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,c=1-a;return ft.rgb(a*t.red()+c*i.red(),a*t.green()+c*i.green(),a*t.blue()+c*i.blue(),t.alpha()*r+i.alpha()*(1-r))}};for(let n of Object.keys(Xt)){if(jv.includes(n))continue;let{channels:e}=Xt[n];ft.prototype[n]=function(...t){return this.model===n?new ft(this):t.length>0?new ft(t,n):new ft([...lk(Xt[this.model][n].raw(this.color)),this.valpha],n)},ft[n]=function(...t){let i=t[0];return typeof i=="number"&&(i=Fp(t,e)),new ft(i,n)}}function sk(n,e){return Number(n.toFixed(e))}function ak(n){return function(e){return sk(e,n)}}function je(n,e,t){n=Array.isArray(n)?n:[n];for(let i of n)(Xh[i]||(Xh[i]=[]))[e]=t;return n=n[0],function(i){let r;return i!==void 0?(t&&(i=t(i)),r=this[n](),r.color[e]=i,r):(r=this[n]().color[e],t&&(r=t(r)),r)}}function st(n){return function(e){return Math.max(0,Math.min(n,e))}}function lk(n){return Array.isArray(n)?n:[n]}function Fp(n,e){for(let t=0;t{"use strict";Object.defineProperty(Jh,"__esModule",{value:!0});Jh.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g};Jh.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":"\xA0"," ":"\xA0","¡":"\xA1","¡":"\xA1","¢":"\xA2","¢":"\xA2","£":"\xA3","£":"\xA3","¤":"\xA4","¤":"\xA4","¥":"\xA5","¥":"\xA5","¦":"\xA6","¦":"\xA6","§":"\xA7","§":"\xA7","¨":"\xA8","¨":"\xA8","©":"\xA9","©":"\xA9","ª":"\xAA","ª":"\xAA","«":"\xAB","«":"\xAB","¬":"\xAC","¬":"\xAC","­":"\xAD","­":"\xAD","®":"\xAE","®":"\xAE","¯":"\xAF","¯":"\xAF","°":"\xB0","°":"\xB0","±":"\xB1","±":"\xB1","²":"\xB2","²":"\xB2","³":"\xB3","³":"\xB3","´":"\xB4","´":"\xB4","µ":"\xB5","µ":"\xB5","¶":"\xB6","¶":"\xB6","·":"\xB7","·":"\xB7","¸":"\xB8","¸":"\xB8","¹":"\xB9","¹":"\xB9","º":"\xBA","º":"\xBA","»":"\xBB","»":"\xBB","¼":"\xBC","¼":"\xBC","½":"\xBD","½":"\xBD","¾":"\xBE","¾":"\xBE","¿":"\xBF","¿":"\xBF","À":"\xC0","À":"\xC0","Á":"\xC1","Á":"\xC1","Â":"\xC2","Â":"\xC2","Ã":"\xC3","Ã":"\xC3","Ä":"\xC4","Ä":"\xC4","Å":"\xC5","Å":"\xC5","Æ":"\xC6","Æ":"\xC6","Ç":"\xC7","Ç":"\xC7","È":"\xC8","È":"\xC8","É":"\xC9","É":"\xC9","Ê":"\xCA","Ê":"\xCA","Ë":"\xCB","Ë":"\xCB","Ì":"\xCC","Ì":"\xCC","Í":"\xCD","Í":"\xCD","Î":"\xCE","Î":"\xCE","Ï":"\xCF","Ï":"\xCF","Ð":"\xD0","Ð":"\xD0","Ñ":"\xD1","Ñ":"\xD1","Ò":"\xD2","Ò":"\xD2","Ó":"\xD3","Ó":"\xD3","Ô":"\xD4","Ô":"\xD4","Õ":"\xD5","Õ":"\xD5","Ö":"\xD6","Ö":"\xD6","×":"\xD7","×":"\xD7","Ø":"\xD8","Ø":"\xD8","Ù":"\xD9","Ù":"\xD9","Ú":"\xDA","Ú":"\xDA","Û":"\xDB","Û":"\xDB","Ü":"\xDC","Ü":"\xDC","Ý":"\xDD","Ý":"\xDD","Þ":"\xDE","Þ":"\xDE","ß":"\xDF","ß":"\xDF","à":"\xE0","à":"\xE0","á":"\xE1","á":"\xE1","â":"\xE2","â":"\xE2","ã":"\xE3","ã":"\xE3","ä":"\xE4","ä":"\xE4","å":"\xE5","å":"\xE5","æ":"\xE6","æ":"\xE6","ç":"\xE7","ç":"\xE7","è":"\xE8","è":"\xE8","é":"\xE9","é":"\xE9","ê":"\xEA","ê":"\xEA","ë":"\xEB","ë":"\xEB","ì":"\xEC","ì":"\xEC","í":"\xED","í":"\xED","î":"\xEE","î":"\xEE","ï":"\xEF","ï":"\xEF","ð":"\xF0","ð":"\xF0","ñ":"\xF1","ñ":"\xF1","ò":"\xF2","ò":"\xF2","ó":"\xF3","ó":"\xF3","ô":"\xF4","ô":"\xF4","õ":"\xF5","õ":"\xF5","ö":"\xF6","ö":"\xF6","÷":"\xF7","÷":"\xF7","ø":"\xF8","ø":"\xF8","ù":"\xF9","ù":"\xF9","ú":"\xFA","ú":"\xFA","û":"\xFB","û":"\xFB","ü":"\xFC","ü":"\xFC","ý":"\xFD","ý":"\xFD","þ":"\xFE","þ":"\xFE","ÿ":"\xFF","ÿ":"\xFF",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"\u0152","œ":"\u0153","Š":"\u0160","š":"\u0161","Ÿ":"\u0178","ˆ":"\u02C6","˜":"\u02DC"," ":"\u2002"," ":"\u2003"," ":"\u2009","‌":"\u200C","‍":"\u200D","‎":"\u200E","‏":"\u200F","–":"\u2013","—":"\u2014","‘":"\u2018","’":"\u2019","‚":"\u201A","“":"\u201C","”":"\u201D","„":"\u201E","†":"\u2020","‡":"\u2021","‰":"\u2030","‹":"\u2039","›":"\u203A","€":"\u20AC","ƒ":"\u0192","Α":"\u0391","Β":"\u0392","Γ":"\u0393","Δ":"\u0394","Ε":"\u0395","Ζ":"\u0396","Η":"\u0397","Θ":"\u0398","Ι":"\u0399","Κ":"\u039A","Λ":"\u039B","Μ":"\u039C","Ν":"\u039D","Ξ":"\u039E","Ο":"\u039F","Π":"\u03A0","Ρ":"\u03A1","Σ":"\u03A3","Τ":"\u03A4","Υ":"\u03A5","Φ":"\u03A6","Χ":"\u03A7","Ψ":"\u03A8","Ω":"\u03A9","α":"\u03B1","β":"\u03B2","γ":"\u03B3","δ":"\u03B4","ε":"\u03B5","ζ":"\u03B6","η":"\u03B7","θ":"\u03B8","ι":"\u03B9","κ":"\u03BA","λ":"\u03BB","μ":"\u03BC","ν":"\u03BD","ξ":"\u03BE","ο":"\u03BF","π":"\u03C0","ρ":"\u03C1","ς":"\u03C2","σ":"\u03C3","τ":"\u03C4","υ":"\u03C5","φ":"\u03C6","χ":"\u03C7","ψ":"\u03C8","ω":"\u03C9","ϑ":"\u03D1","ϒ":"\u03D2","ϖ":"\u03D6","•":"\u2022","…":"\u2026","′":"\u2032","″":"\u2033","‾":"\u203E","⁄":"\u2044","℘":"\u2118","ℑ":"\u2111","ℜ":"\u211C","™":"\u2122","ℵ":"\u2135","←":"\u2190","↑":"\u2191","→":"\u2192","↓":"\u2193","↔":"\u2194","↵":"\u21B5","⇐":"\u21D0","⇑":"\u21D1","⇒":"\u21D2","⇓":"\u21D3","⇔":"\u21D4","∀":"\u2200","∂":"\u2202","∃":"\u2203","∅":"\u2205","∇":"\u2207","∈":"\u2208","∉":"\u2209","∋":"\u220B","∏":"\u220F","∑":"\u2211","−":"\u2212","∗":"\u2217","√":"\u221A","∝":"\u221D","∞":"\u221E","∠":"\u2220","∧":"\u2227","∨":"\u2228","∩":"\u2229","∪":"\u222A","∫":"\u222B","∴":"\u2234","∼":"\u223C","≅":"\u2245","≈":"\u2248","≠":"\u2260","≡":"\u2261","≤":"\u2264","≥":"\u2265","⊂":"\u2282","⊃":"\u2283","⊄":"\u2284","⊆":"\u2286","⊇":"\u2287","⊕":"\u2295","⊗":"\u2297","⊥":"\u22A5","⋅":"\u22C5","⌈":"\u2308","⌉":"\u2309","⌊":"\u230A","⌋":"\u230B","⟨":"\u2329","⟩":"\u232A","◊":"\u25CA","♠":"\u2660","♣":"\u2663","♥":"\u2665","♦":"\u2666"},characters:{"'":"'","\xA0":" ","\xA1":"¡","\xA2":"¢","\xA3":"£","\xA4":"¤","\xA5":"¥","\xA6":"¦","\xA7":"§","\xA8":"¨","\xA9":"©",\u00AA:"ª","\xAB":"«","\xAC":"¬","\xAD":"­","\xAE":"®","\xAF":"¯","\xB0":"°","\xB1":"±","\xB2":"²","\xB3":"³","\xB4":"´",\u00B5:"µ","\xB6":"¶","\xB7":"·","\xB8":"¸","\xB9":"¹",\u00BA:"º","\xBB":"»","\xBC":"¼","\xBD":"½","\xBE":"¾","\xBF":"¿",\u00C0:"À",\u00C1:"Á",\u00C2:"Â",\u00C3:"Ã",\u00C4:"Ä",\u00C5:"Å",\u00C6:"Æ",\u00C7:"Ç",\u00C8:"È",\u00C9:"É",\u00CA:"Ê",\u00CB:"Ë",\u00CC:"Ì",\u00CD:"Í",\u00CE:"Î",\u00CF:"Ï",\u00D0:"Ð",\u00D1:"Ñ",\u00D2:"Ò",\u00D3:"Ó",\u00D4:"Ô",\u00D5:"Õ",\u00D6:"Ö","\xD7":"×",\u00D8:"Ø",\u00D9:"Ù",\u00DA:"Ú",\u00DB:"Û",\u00DC:"Ü",\u00DD:"Ý",\u00DE:"Þ",\u00DF:"ß",\u00E0:"à",\u00E1:"á",\u00E2:"â",\u00E3:"ã",\u00E4:"ä",\u00E5:"å",\u00E6:"æ",\u00E7:"ç",\u00E8:"è",\u00E9:"é",\u00EA:"ê",\u00EB:"ë",\u00EC:"ì",\u00ED:"í",\u00EE:"î",\u00EF:"ï",\u00F0:"ð",\u00F1:"ñ",\u00F2:"ò",\u00F3:"ó",\u00F4:"ô",\u00F5:"õ",\u00F6:"ö","\xF7":"÷",\u00F8:"ø",\u00F9:"ù",\u00FA:"ú",\u00FB:"û",\u00FC:"ü",\u00FD:"ý",\u00FE:"þ",\u00FF:"ÿ",'"':""","&":"&","<":"<",">":">",\u0152:"Œ",\u0153:"œ",\u0160:"Š",\u0161:"š",\u0178:"Ÿ","\u02C6":"ˆ","\u02DC":"˜","\u2002":" ","\u2003":" ","\u2009":" ","\u200C":"‌","\u200D":"‍","\u200E":"‎","\u200F":"‏","\u2013":"–","\u2014":"—","\u2018":"‘","\u2019":"’","\u201A":"‚","\u201C":"“","\u201D":"”","\u201E":"„","\u2020":"†","\u2021":"‡","\u2030":"‰","\u2039":"‹","\u203A":"›","\u20AC":"€",\u0192:"ƒ",\u0391:"Α",\u0392:"Β",\u0393:"Γ",\u0394:"Δ",\u0395:"Ε",\u0396:"Ζ",\u0397:"Η",\u0398:"Θ",\u0399:"Ι",\u039A:"Κ",\u039B:"Λ",\u039C:"Μ",\u039D:"Ν",\u039E:"Ξ",\u039F:"Ο",\u03A0:"Π",\u03A1:"Ρ",\u03A3:"Σ",\u03A4:"Τ",\u03A5:"Υ",\u03A6:"Φ",\u03A7:"Χ",\u03A8:"Ψ",\u03A9:"Ω",\u03B1:"α",\u03B2:"β",\u03B3:"γ",\u03B4:"δ",\u03B5:"ε",\u03B6:"ζ",\u03B7:"η",\u03B8:"θ",\u03B9:"ι",\u03BA:"κ",\u03BB:"λ",\u03BC:"μ",\u03BD:"ν",\u03BE:"ξ",\u03BF:"ο",\u03C0:"π",\u03C1:"ρ",\u03C2:"ς",\u03C3:"σ",\u03C4:"τ",\u03C5:"υ",\u03C6:"φ",\u03C7:"χ",\u03C8:"ψ",\u03C9:"ω",\u03D1:"ϑ",\u03D2:"ϒ",\u03D6:"ϖ","\u2022":"•","\u2026":"…","\u2032":"′","\u2033":"″","\u203E":"‾","\u2044":"⁄","\u2118":"℘",\u2111:"ℑ",\u211C:"ℜ","\u2122":"™",\u2135:"ℵ","\u2190":"←","\u2191":"↑","\u2192":"→","\u2193":"↓","\u2194":"↔","\u21B5":"↵","\u21D0":"⇐","\u21D1":"⇑","\u21D2":"⇒","\u21D3":"⇓","\u21D4":"⇔","\u2200":"∀","\u2202":"∂","\u2203":"∃","\u2205":"∅","\u2207":"∇","\u2208":"∈","\u2209":"∉","\u220B":"∋","\u220F":"∏","\u2211":"∑","\u2212":"−","\u2217":"∗","\u221A":"√","\u221D":"∝","\u221E":"∞","\u2220":"∠","\u2227":"∧","\u2228":"∨","\u2229":"∩","\u222A":"∪","\u222B":"∫","\u2234":"∴","\u223C":"∼","\u2245":"≅","\u2248":"≈","\u2260":"≠","\u2261":"≡","\u2264":"≤","\u2265":"≥","\u2282":"⊂","\u2283":"⊃","\u2284":"⊄","\u2286":"⊆","\u2287":"⊇","\u2295":"⊕","\u2297":"⊗","\u22A5":"⊥","\u22C5":"⋅","\u2308":"⌈","\u2309":"⌉","\u230A":"⌊","\u230B":"⌋","\u2329":"⟨","\u232A":"⟩","\u25CA":"◊","\u2660":"♠","\u2663":"♣","\u2665":"♥","\u2666":"♦"}},html5:{entities:{"Æ":"\xC6","Æ":"\xC6","&":"&","&":"&","Á":"\xC1","Á":"\xC1","Ă":"\u0102","Â":"\xC2","Â":"\xC2","А":"\u0410","𝔄":"\u{1D504}","À":"\xC0","À":"\xC0","Α":"\u0391","Ā":"\u0100","⩓":"\u2A53","Ą":"\u0104","𝔸":"\u{1D538}","⁡":"\u2061","Å":"\xC5","Å":"\xC5","𝒜":"\u{1D49C}","≔":"\u2254","Ã":"\xC3","Ã":"\xC3","Ä":"\xC4","Ä":"\xC4","∖":"\u2216","⫧":"\u2AE7","⌆":"\u2306","Б":"\u0411","∵":"\u2235","ℬ":"\u212C","Β":"\u0392","𝔅":"\u{1D505}","𝔹":"\u{1D539}","˘":"\u02D8","ℬ":"\u212C","≎":"\u224E","Ч":"\u0427","©":"\xA9","©":"\xA9","Ć":"\u0106","⋒":"\u22D2","ⅅ":"\u2145","ℭ":"\u212D","Č":"\u010C","Ç":"\xC7","Ç":"\xC7","Ĉ":"\u0108","∰":"\u2230","Ċ":"\u010A","¸":"\xB8","·":"\xB7","ℭ":"\u212D","Χ":"\u03A7","⊙":"\u2299","⊖":"\u2296","⊕":"\u2295","⊗":"\u2297","∲":"\u2232","”":"\u201D","’":"\u2019","∷":"\u2237","⩴":"\u2A74","≡":"\u2261","∯":"\u222F","∮":"\u222E","ℂ":"\u2102","∐":"\u2210","∳":"\u2233","⨯":"\u2A2F","𝒞":"\u{1D49E}","⋓":"\u22D3","≍":"\u224D","ⅅ":"\u2145","⤑":"\u2911","Ђ":"\u0402","Ѕ":"\u0405","Џ":"\u040F","‡":"\u2021","↡":"\u21A1","⫤":"\u2AE4","Ď":"\u010E","Д":"\u0414","∇":"\u2207","Δ":"\u0394","𝔇":"\u{1D507}","´":"\xB4","˙":"\u02D9","˝":"\u02DD","`":"`","˜":"\u02DC","⋄":"\u22C4","ⅆ":"\u2146","𝔻":"\u{1D53B}","¨":"\xA8","⃜":"\u20DC","≐":"\u2250","∯":"\u222F","¨":"\xA8","⇓":"\u21D3","⇐":"\u21D0","⇔":"\u21D4","⫤":"\u2AE4","⟸":"\u27F8","⟺":"\u27FA","⟹":"\u27F9","⇒":"\u21D2","⊨":"\u22A8","⇑":"\u21D1","⇕":"\u21D5","∥":"\u2225","↓":"\u2193","⤓":"\u2913","⇵":"\u21F5","̑":"\u0311","⥐":"\u2950","⥞":"\u295E","↽":"\u21BD","⥖":"\u2956","⥟":"\u295F","⇁":"\u21C1","⥗":"\u2957","⊤":"\u22A4","↧":"\u21A7","⇓":"\u21D3","𝒟":"\u{1D49F}","Đ":"\u0110","Ŋ":"\u014A","Ð":"\xD0","Ð":"\xD0","É":"\xC9","É":"\xC9","Ě":"\u011A","Ê":"\xCA","Ê":"\xCA","Э":"\u042D","Ė":"\u0116","𝔈":"\u{1D508}","È":"\xC8","È":"\xC8","∈":"\u2208","Ē":"\u0112","◻":"\u25FB","▫":"\u25AB","Ę":"\u0118","𝔼":"\u{1D53C}","Ε":"\u0395","⩵":"\u2A75","≂":"\u2242","⇌":"\u21CC","ℰ":"\u2130","⩳":"\u2A73","Η":"\u0397","Ë":"\xCB","Ë":"\xCB","∃":"\u2203","ⅇ":"\u2147","Ф":"\u0424","𝔉":"\u{1D509}","◼":"\u25FC","▪":"\u25AA","𝔽":"\u{1D53D}","∀":"\u2200","ℱ":"\u2131","ℱ":"\u2131","Ѓ":"\u0403",">":">",">":">","Γ":"\u0393","Ϝ":"\u03DC","Ğ":"\u011E","Ģ":"\u0122","Ĝ":"\u011C","Г":"\u0413","Ġ":"\u0120","𝔊":"\u{1D50A}","⋙":"\u22D9","𝔾":"\u{1D53E}","≥":"\u2265","⋛":"\u22DB","≧":"\u2267","⪢":"\u2AA2","≷":"\u2277","⩾":"\u2A7E","≳":"\u2273","𝒢":"\u{1D4A2}","≫":"\u226B","Ъ":"\u042A","ˇ":"\u02C7","^":"^","Ĥ":"\u0124","ℌ":"\u210C","ℋ":"\u210B","ℍ":"\u210D","─":"\u2500","ℋ":"\u210B","Ħ":"\u0126","≎":"\u224E","≏":"\u224F","Е":"\u0415","IJ":"\u0132","Ё":"\u0401","Í":"\xCD","Í":"\xCD","Î":"\xCE","Î":"\xCE","И":"\u0418","İ":"\u0130","ℑ":"\u2111","Ì":"\xCC","Ì":"\xCC","ℑ":"\u2111","Ī":"\u012A","ⅈ":"\u2148","⇒":"\u21D2","∬":"\u222C","∫":"\u222B","⋂":"\u22C2","⁣":"\u2063","⁢":"\u2062","Į":"\u012E","𝕀":"\u{1D540}","Ι":"\u0399","ℐ":"\u2110","Ĩ":"\u0128","І":"\u0406","Ï":"\xCF","Ï":"\xCF","Ĵ":"\u0134","Й":"\u0419","𝔍":"\u{1D50D}","𝕁":"\u{1D541}","𝒥":"\u{1D4A5}","Ј":"\u0408","Є":"\u0404","Х":"\u0425","Ќ":"\u040C","Κ":"\u039A","Ķ":"\u0136","К":"\u041A","𝔎":"\u{1D50E}","𝕂":"\u{1D542}","𝒦":"\u{1D4A6}","Љ":"\u0409","<":"<","<":"<","Ĺ":"\u0139","Λ":"\u039B","⟪":"\u27EA","ℒ":"\u2112","↞":"\u219E","Ľ":"\u013D","Ļ":"\u013B","Л":"\u041B","⟨":"\u27E8","←":"\u2190","⇤":"\u21E4","⇆":"\u21C6","⌈":"\u2308","⟦":"\u27E6","⥡":"\u2961","⇃":"\u21C3","⥙":"\u2959","⌊":"\u230A","↔":"\u2194","⥎":"\u294E","⊣":"\u22A3","↤":"\u21A4","⥚":"\u295A","⊲":"\u22B2","⧏":"\u29CF","⊴":"\u22B4","⥑":"\u2951","⥠":"\u2960","↿":"\u21BF","⥘":"\u2958","↼":"\u21BC","⥒":"\u2952","⇐":"\u21D0","⇔":"\u21D4","⋚":"\u22DA","≦":"\u2266","≶":"\u2276","⪡":"\u2AA1","⩽":"\u2A7D","≲":"\u2272","𝔏":"\u{1D50F}","⋘":"\u22D8","⇚":"\u21DA","Ŀ":"\u013F","⟵":"\u27F5","⟷":"\u27F7","⟶":"\u27F6","⟸":"\u27F8","⟺":"\u27FA","⟹":"\u27F9","𝕃":"\u{1D543}","↙":"\u2199","↘":"\u2198","ℒ":"\u2112","↰":"\u21B0","Ł":"\u0141","≪":"\u226A","⤅":"\u2905","М":"\u041C"," ":"\u205F","ℳ":"\u2133","𝔐":"\u{1D510}","∓":"\u2213","𝕄":"\u{1D544}","ℳ":"\u2133","Μ":"\u039C","Њ":"\u040A","Ń":"\u0143","Ň":"\u0147","Ņ":"\u0145","Н":"\u041D","​":"\u200B","​":"\u200B","​":"\u200B","​":"\u200B","≫":"\u226B","≪":"\u226A"," ":` +`,"𝔑":"\u{1D511}","⁠":"\u2060"," ":"\xA0","ℕ":"\u2115","⫬":"\u2AEC","≢":"\u2262","≭":"\u226D","∦":"\u2226","∉":"\u2209","≠":"\u2260","≂̸":"\u2242\u0338","∄":"\u2204","≯":"\u226F","≱":"\u2271","≧̸":"\u2267\u0338","≫̸":"\u226B\u0338","≹":"\u2279","⩾̸":"\u2A7E\u0338","≵":"\u2275","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⋪":"\u22EA","⧏̸":"\u29CF\u0338","⋬":"\u22EC","≮":"\u226E","≰":"\u2270","≸":"\u2278","≪̸":"\u226A\u0338","⩽̸":"\u2A7D\u0338","≴":"\u2274","⪢̸":"\u2AA2\u0338","⪡̸":"\u2AA1\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⋠":"\u22E0","∌":"\u220C","⋫":"\u22EB","⧐̸":"\u29D0\u0338","⋭":"\u22ED","⊏̸":"\u228F\u0338","⋢":"\u22E2","⊐̸":"\u2290\u0338","⋣":"\u22E3","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⋡":"\u22E1","≿̸":"\u227F\u0338","⊃⃒":"\u2283\u20D2","⊉":"\u2289","≁":"\u2241","≄":"\u2244","≇":"\u2247","≉":"\u2249","∤":"\u2224","𝒩":"\u{1D4A9}","Ñ":"\xD1","Ñ":"\xD1","Ν":"\u039D","Œ":"\u0152","Ó":"\xD3","Ó":"\xD3","Ô":"\xD4","Ô":"\xD4","О":"\u041E","Ő":"\u0150","𝔒":"\u{1D512}","Ò":"\xD2","Ò":"\xD2","Ō":"\u014C","Ω":"\u03A9","Ο":"\u039F","𝕆":"\u{1D546}","“":"\u201C","‘":"\u2018","⩔":"\u2A54","𝒪":"\u{1D4AA}","Ø":"\xD8","Ø":"\xD8","Õ":"\xD5","Õ":"\xD5","⨷":"\u2A37","Ö":"\xD6","Ö":"\xD6","‾":"\u203E","⏞":"\u23DE","⎴":"\u23B4","⏜":"\u23DC","∂":"\u2202","П":"\u041F","𝔓":"\u{1D513}","Φ":"\u03A6","Π":"\u03A0","±":"\xB1","ℌ":"\u210C","ℙ":"\u2119","⪻":"\u2ABB","≺":"\u227A","⪯":"\u2AAF","≼":"\u227C","≾":"\u227E","″":"\u2033","∏":"\u220F","∷":"\u2237","∝":"\u221D","𝒫":"\u{1D4AB}","Ψ":"\u03A8",""":'"',""":'"',"𝔔":"\u{1D514}","ℚ":"\u211A","𝒬":"\u{1D4AC}","⤐":"\u2910","®":"\xAE","®":"\xAE","Ŕ":"\u0154","⟫":"\u27EB","↠":"\u21A0","⤖":"\u2916","Ř":"\u0158","Ŗ":"\u0156","Р":"\u0420","ℜ":"\u211C","∋":"\u220B","⇋":"\u21CB","⥯":"\u296F","ℜ":"\u211C","Ρ":"\u03A1","⟩":"\u27E9","→":"\u2192","⇥":"\u21E5","⇄":"\u21C4","⌉":"\u2309","⟧":"\u27E7","⥝":"\u295D","⇂":"\u21C2","⥕":"\u2955","⌋":"\u230B","⊢":"\u22A2","↦":"\u21A6","⥛":"\u295B","⊳":"\u22B3","⧐":"\u29D0","⊵":"\u22B5","⥏":"\u294F","⥜":"\u295C","↾":"\u21BE","⥔":"\u2954","⇀":"\u21C0","⥓":"\u2953","⇒":"\u21D2","ℝ":"\u211D","⥰":"\u2970","⇛":"\u21DB","ℛ":"\u211B","↱":"\u21B1","⧴":"\u29F4","Щ":"\u0429","Ш":"\u0428","Ь":"\u042C","Ś":"\u015A","⪼":"\u2ABC","Š":"\u0160","Ş":"\u015E","Ŝ":"\u015C","С":"\u0421","𝔖":"\u{1D516}","↓":"\u2193","←":"\u2190","→":"\u2192","↑":"\u2191","Σ":"\u03A3","∘":"\u2218","𝕊":"\u{1D54A}","√":"\u221A","□":"\u25A1","⊓":"\u2293","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊔":"\u2294","𝒮":"\u{1D4AE}","⋆":"\u22C6","⋐":"\u22D0","⋐":"\u22D0","⊆":"\u2286","≻":"\u227B","⪰":"\u2AB0","≽":"\u227D","≿":"\u227F","∋":"\u220B","∑":"\u2211","⋑":"\u22D1","⊃":"\u2283","⊇":"\u2287","⋑":"\u22D1","Þ":"\xDE","Þ":"\xDE","™":"\u2122","Ћ":"\u040B","Ц":"\u0426"," ":" ","Τ":"\u03A4","Ť":"\u0164","Ţ":"\u0162","Т":"\u0422","𝔗":"\u{1D517}","∴":"\u2234","Θ":"\u0398","  ":"\u205F\u200A"," ":"\u2009","∼":"\u223C","≃":"\u2243","≅":"\u2245","≈":"\u2248","𝕋":"\u{1D54B}","⃛":"\u20DB","𝒯":"\u{1D4AF}","Ŧ":"\u0166","Ú":"\xDA","Ú":"\xDA","↟":"\u219F","⥉":"\u2949","Ў":"\u040E","Ŭ":"\u016C","Û":"\xDB","Û":"\xDB","У":"\u0423","Ű":"\u0170","𝔘":"\u{1D518}","Ù":"\xD9","Ù":"\xD9","Ū":"\u016A","_":"_","⏟":"\u23DF","⎵":"\u23B5","⏝":"\u23DD","⋃":"\u22C3","⊎":"\u228E","Ų":"\u0172","𝕌":"\u{1D54C}","↑":"\u2191","⤒":"\u2912","⇅":"\u21C5","↕":"\u2195","⥮":"\u296E","⊥":"\u22A5","↥":"\u21A5","⇑":"\u21D1","⇕":"\u21D5","↖":"\u2196","↗":"\u2197","ϒ":"\u03D2","Υ":"\u03A5","Ů":"\u016E","𝒰":"\u{1D4B0}","Ũ":"\u0168","Ü":"\xDC","Ü":"\xDC","⊫":"\u22AB","⫫":"\u2AEB","В":"\u0412","⊩":"\u22A9","⫦":"\u2AE6","⋁":"\u22C1","‖":"\u2016","‖":"\u2016","∣":"\u2223","|":"|","❘":"\u2758","≀":"\u2240"," ":"\u200A","𝔙":"\u{1D519}","𝕍":"\u{1D54D}","𝒱":"\u{1D4B1}","⊪":"\u22AA","Ŵ":"\u0174","⋀":"\u22C0","𝔚":"\u{1D51A}","𝕎":"\u{1D54E}","𝒲":"\u{1D4B2}","𝔛":"\u{1D51B}","Ξ":"\u039E","𝕏":"\u{1D54F}","𝒳":"\u{1D4B3}","Я":"\u042F","Ї":"\u0407","Ю":"\u042E","Ý":"\xDD","Ý":"\xDD","Ŷ":"\u0176","Ы":"\u042B","𝔜":"\u{1D51C}","𝕐":"\u{1D550}","𝒴":"\u{1D4B4}","Ÿ":"\u0178","Ж":"\u0416","Ź":"\u0179","Ž":"\u017D","З":"\u0417","Ż":"\u017B","​":"\u200B","Ζ":"\u0396","ℨ":"\u2128","ℤ":"\u2124","𝒵":"\u{1D4B5}","á":"\xE1","á":"\xE1","ă":"\u0103","∾":"\u223E","∾̳":"\u223E\u0333","∿":"\u223F","â":"\xE2","â":"\xE2","´":"\xB4","´":"\xB4","а":"\u0430","æ":"\xE6","æ":"\xE6","⁡":"\u2061","𝔞":"\u{1D51E}","à":"\xE0","à":"\xE0","ℵ":"\u2135","ℵ":"\u2135","α":"\u03B1","ā":"\u0101","⨿":"\u2A3F","&":"&","&":"&","∧":"\u2227","⩕":"\u2A55","⩜":"\u2A5C","⩘":"\u2A58","⩚":"\u2A5A","∠":"\u2220","⦤":"\u29A4","∠":"\u2220","∡":"\u2221","⦨":"\u29A8","⦩":"\u29A9","⦪":"\u29AA","⦫":"\u29AB","⦬":"\u29AC","⦭":"\u29AD","⦮":"\u29AE","⦯":"\u29AF","∟":"\u221F","⊾":"\u22BE","⦝":"\u299D","∢":"\u2222","Å":"\xC5","⍼":"\u237C","ą":"\u0105","𝕒":"\u{1D552}","≈":"\u2248","⩰":"\u2A70","⩯":"\u2A6F","≊":"\u224A","≋":"\u224B","'":"'","≈":"\u2248","≊":"\u224A","å":"\xE5","å":"\xE5","𝒶":"\u{1D4B6}","*":"*","≈":"\u2248","≍":"\u224D","ã":"\xE3","ã":"\xE3","ä":"\xE4","ä":"\xE4","∳":"\u2233","⨑":"\u2A11","⫭":"\u2AED","≌":"\u224C","϶":"\u03F6","‵":"\u2035","∽":"\u223D","⋍":"\u22CD","⊽":"\u22BD","⌅":"\u2305","⌅":"\u2305","⎵":"\u23B5","⎶":"\u23B6","≌":"\u224C","б":"\u0431","„":"\u201E","∵":"\u2235","∵":"\u2235","⦰":"\u29B0","϶":"\u03F6","ℬ":"\u212C","β":"\u03B2","ℶ":"\u2136","≬":"\u226C","𝔟":"\u{1D51F}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","⨀":"\u2A00","⨁":"\u2A01","⨂":"\u2A02","⨆":"\u2A06","★":"\u2605","▽":"\u25BD","△":"\u25B3","⨄":"\u2A04","⋁":"\u22C1","⋀":"\u22C0","⤍":"\u290D","⧫":"\u29EB","▪":"\u25AA","▴":"\u25B4","▾":"\u25BE","◂":"\u25C2","▸":"\u25B8","␣":"\u2423","▒":"\u2592","░":"\u2591","▓":"\u2593","█":"\u2588","=⃥":"=\u20E5","≡⃥":"\u2261\u20E5","⌐":"\u2310","𝕓":"\u{1D553}","⊥":"\u22A5","⊥":"\u22A5","⋈":"\u22C8","╗":"\u2557","╔":"\u2554","╖":"\u2556","╓":"\u2553","═":"\u2550","╦":"\u2566","╩":"\u2569","╤":"\u2564","╧":"\u2567","╝":"\u255D","╚":"\u255A","╜":"\u255C","╙":"\u2559","║":"\u2551","╬":"\u256C","╣":"\u2563","╠":"\u2560","╫":"\u256B","╢":"\u2562","╟":"\u255F","⧉":"\u29C9","╕":"\u2555","╒":"\u2552","┐":"\u2510","┌":"\u250C","─":"\u2500","╥":"\u2565","╨":"\u2568","┬":"\u252C","┴":"\u2534","⊟":"\u229F","⊞":"\u229E","⊠":"\u22A0","╛":"\u255B","╘":"\u2558","┘":"\u2518","└":"\u2514","│":"\u2502","╪":"\u256A","╡":"\u2561","╞":"\u255E","┼":"\u253C","┤":"\u2524","├":"\u251C","‵":"\u2035","˘":"\u02D8","¦":"\xA6","¦":"\xA6","𝒷":"\u{1D4B7}","⁏":"\u204F","∽":"\u223D","⋍":"\u22CD","\":"\\","⧅":"\u29C5","⟈":"\u27C8","•":"\u2022","•":"\u2022","≎":"\u224E","⪮":"\u2AAE","≏":"\u224F","≏":"\u224F","ć":"\u0107","∩":"\u2229","⩄":"\u2A44","⩉":"\u2A49","⩋":"\u2A4B","⩇":"\u2A47","⩀":"\u2A40","∩︀":"\u2229\uFE00","⁁":"\u2041","ˇ":"\u02C7","⩍":"\u2A4D","č":"\u010D","ç":"\xE7","ç":"\xE7","ĉ":"\u0109","⩌":"\u2A4C","⩐":"\u2A50","ċ":"\u010B","¸":"\xB8","¸":"\xB8","⦲":"\u29B2","¢":"\xA2","¢":"\xA2","·":"\xB7","𝔠":"\u{1D520}","ч":"\u0447","✓":"\u2713","✓":"\u2713","χ":"\u03C7","○":"\u25CB","⧃":"\u29C3","ˆ":"\u02C6","≗":"\u2257","↺":"\u21BA","↻":"\u21BB","®":"\xAE","Ⓢ":"\u24C8","⊛":"\u229B","⊚":"\u229A","⊝":"\u229D","≗":"\u2257","⨐":"\u2A10","⫯":"\u2AEF","⧂":"\u29C2","♣":"\u2663","♣":"\u2663",":":":","≔":"\u2254","≔":"\u2254",",":",","@":"@","∁":"\u2201","∘":"\u2218","∁":"\u2201","ℂ":"\u2102","≅":"\u2245","⩭":"\u2A6D","∮":"\u222E","𝕔":"\u{1D554}","∐":"\u2210","©":"\xA9","©":"\xA9","℗":"\u2117","↵":"\u21B5","✗":"\u2717","𝒸":"\u{1D4B8}","⫏":"\u2ACF","⫑":"\u2AD1","⫐":"\u2AD0","⫒":"\u2AD2","⋯":"\u22EF","⤸":"\u2938","⤵":"\u2935","⋞":"\u22DE","⋟":"\u22DF","↶":"\u21B6","⤽":"\u293D","∪":"\u222A","⩈":"\u2A48","⩆":"\u2A46","⩊":"\u2A4A","⊍":"\u228D","⩅":"\u2A45","∪︀":"\u222A\uFE00","↷":"\u21B7","⤼":"\u293C","⋞":"\u22DE","⋟":"\u22DF","⋎":"\u22CE","⋏":"\u22CF","¤":"\xA4","¤":"\xA4","↶":"\u21B6","↷":"\u21B7","⋎":"\u22CE","⋏":"\u22CF","∲":"\u2232","∱":"\u2231","⌭":"\u232D","⇓":"\u21D3","⥥":"\u2965","†":"\u2020","ℸ":"\u2138","↓":"\u2193","‐":"\u2010","⊣":"\u22A3","⤏":"\u290F","˝":"\u02DD","ď":"\u010F","д":"\u0434","ⅆ":"\u2146","‡":"\u2021","⇊":"\u21CA","⩷":"\u2A77","°":"\xB0","°":"\xB0","δ":"\u03B4","⦱":"\u29B1","⥿":"\u297F","𝔡":"\u{1D521}","⇃":"\u21C3","⇂":"\u21C2","⋄":"\u22C4","⋄":"\u22C4","♦":"\u2666","♦":"\u2666","¨":"\xA8","ϝ":"\u03DD","⋲":"\u22F2","÷":"\xF7","÷":"\xF7","÷":"\xF7","⋇":"\u22C7","⋇":"\u22C7","ђ":"\u0452","⌞":"\u231E","⌍":"\u230D","$":"$","𝕕":"\u{1D555}","˙":"\u02D9","≐":"\u2250","≑":"\u2251","∸":"\u2238","∔":"\u2214","⊡":"\u22A1","⌆":"\u2306","↓":"\u2193","⇊":"\u21CA","⇃":"\u21C3","⇂":"\u21C2","⤐":"\u2910","⌟":"\u231F","⌌":"\u230C","𝒹":"\u{1D4B9}","ѕ":"\u0455","⧶":"\u29F6","đ":"\u0111","⋱":"\u22F1","▿":"\u25BF","▾":"\u25BE","⇵":"\u21F5","⥯":"\u296F","⦦":"\u29A6","џ":"\u045F","⟿":"\u27FF","⩷":"\u2A77","≑":"\u2251","é":"\xE9","é":"\xE9","⩮":"\u2A6E","ě":"\u011B","≖":"\u2256","ê":"\xEA","ê":"\xEA","≕":"\u2255","э":"\u044D","ė":"\u0117","ⅇ":"\u2147","≒":"\u2252","𝔢":"\u{1D522}","⪚":"\u2A9A","è":"\xE8","è":"\xE8","⪖":"\u2A96","⪘":"\u2A98","⪙":"\u2A99","⏧":"\u23E7","ℓ":"\u2113","⪕":"\u2A95","⪗":"\u2A97","ē":"\u0113","∅":"\u2205","∅":"\u2205","∅":"\u2205"," ":"\u2004"," ":"\u2005"," ":"\u2003","ŋ":"\u014B"," ":"\u2002","ę":"\u0119","𝕖":"\u{1D556}","⋕":"\u22D5","⧣":"\u29E3","⩱":"\u2A71","ε":"\u03B5","ε":"\u03B5","ϵ":"\u03F5","≖":"\u2256","≕":"\u2255","≂":"\u2242","⪖":"\u2A96","⪕":"\u2A95","=":"=","≟":"\u225F","≡":"\u2261","⩸":"\u2A78","⧥":"\u29E5","≓":"\u2253","⥱":"\u2971","ℯ":"\u212F","≐":"\u2250","≂":"\u2242","η":"\u03B7","ð":"\xF0","ð":"\xF0","ë":"\xEB","ë":"\xEB","€":"\u20AC","!":"!","∃":"\u2203","ℰ":"\u2130","ⅇ":"\u2147","≒":"\u2252","ф":"\u0444","♀":"\u2640","ffi":"\uFB03","ff":"\uFB00","ffl":"\uFB04","𝔣":"\u{1D523}","fi":"\uFB01","fj":"fj","♭":"\u266D","fl":"\uFB02","▱":"\u25B1","ƒ":"\u0192","𝕗":"\u{1D557}","∀":"\u2200","⋔":"\u22D4","⫙":"\u2AD9","⨍":"\u2A0D","½":"\xBD","½":"\xBD","⅓":"\u2153","¼":"\xBC","¼":"\xBC","⅕":"\u2155","⅙":"\u2159","⅛":"\u215B","⅔":"\u2154","⅖":"\u2156","¾":"\xBE","¾":"\xBE","⅗":"\u2157","⅜":"\u215C","⅘":"\u2158","⅚":"\u215A","⅝":"\u215D","⅞":"\u215E","⁄":"\u2044","⌢":"\u2322","𝒻":"\u{1D4BB}","≧":"\u2267","⪌":"\u2A8C","ǵ":"\u01F5","γ":"\u03B3","ϝ":"\u03DD","⪆":"\u2A86","ğ":"\u011F","ĝ":"\u011D","г":"\u0433","ġ":"\u0121","≥":"\u2265","⋛":"\u22DB","≥":"\u2265","≧":"\u2267","⩾":"\u2A7E","⩾":"\u2A7E","⪩":"\u2AA9","⪀":"\u2A80","⪂":"\u2A82","⪄":"\u2A84","⋛︀":"\u22DB\uFE00","⪔":"\u2A94","𝔤":"\u{1D524}","≫":"\u226B","⋙":"\u22D9","ℷ":"\u2137","ѓ":"\u0453","≷":"\u2277","⪒":"\u2A92","⪥":"\u2AA5","⪤":"\u2AA4","≩":"\u2269","⪊":"\u2A8A","⪊":"\u2A8A","⪈":"\u2A88","⪈":"\u2A88","≩":"\u2269","⋧":"\u22E7","𝕘":"\u{1D558}","`":"`","ℊ":"\u210A","≳":"\u2273","⪎":"\u2A8E","⪐":"\u2A90",">":">",">":">","⪧":"\u2AA7","⩺":"\u2A7A","⋗":"\u22D7","⦕":"\u2995","⩼":"\u2A7C","⪆":"\u2A86","⥸":"\u2978","⋗":"\u22D7","⋛":"\u22DB","⪌":"\u2A8C","≷":"\u2277","≳":"\u2273","≩︀":"\u2269\uFE00","≩︀":"\u2269\uFE00","⇔":"\u21D4"," ":"\u200A","½":"\xBD","ℋ":"\u210B","ъ":"\u044A","↔":"\u2194","⥈":"\u2948","↭":"\u21AD","ℏ":"\u210F","ĥ":"\u0125","♥":"\u2665","♥":"\u2665","…":"\u2026","⊹":"\u22B9","𝔥":"\u{1D525}","⤥":"\u2925","⤦":"\u2926","⇿":"\u21FF","∻":"\u223B","↩":"\u21A9","↪":"\u21AA","𝕙":"\u{1D559}","―":"\u2015","𝒽":"\u{1D4BD}","ℏ":"\u210F","ħ":"\u0127","⁃":"\u2043","‐":"\u2010","í":"\xED","í":"\xED","⁣":"\u2063","î":"\xEE","î":"\xEE","и":"\u0438","е":"\u0435","¡":"\xA1","¡":"\xA1","⇔":"\u21D4","𝔦":"\u{1D526}","ì":"\xEC","ì":"\xEC","ⅈ":"\u2148","⨌":"\u2A0C","∭":"\u222D","⧜":"\u29DC","℩":"\u2129","ij":"\u0133","ī":"\u012B","ℑ":"\u2111","ℐ":"\u2110","ℑ":"\u2111","ı":"\u0131","⊷":"\u22B7","Ƶ":"\u01B5","∈":"\u2208","℅":"\u2105","∞":"\u221E","⧝":"\u29DD","ı":"\u0131","∫":"\u222B","⊺":"\u22BA","ℤ":"\u2124","⊺":"\u22BA","⨗":"\u2A17","⨼":"\u2A3C","ё":"\u0451","į":"\u012F","𝕚":"\u{1D55A}","ι":"\u03B9","⨼":"\u2A3C","¿":"\xBF","¿":"\xBF","𝒾":"\u{1D4BE}","∈":"\u2208","⋹":"\u22F9","⋵":"\u22F5","⋴":"\u22F4","⋳":"\u22F3","∈":"\u2208","⁢":"\u2062","ĩ":"\u0129","і":"\u0456","ï":"\xEF","ï":"\xEF","ĵ":"\u0135","й":"\u0439","𝔧":"\u{1D527}","ȷ":"\u0237","𝕛":"\u{1D55B}","𝒿":"\u{1D4BF}","ј":"\u0458","є":"\u0454","κ":"\u03BA","ϰ":"\u03F0","ķ":"\u0137","к":"\u043A","𝔨":"\u{1D528}","ĸ":"\u0138","х":"\u0445","ќ":"\u045C","𝕜":"\u{1D55C}","𝓀":"\u{1D4C0}","⇚":"\u21DA","⇐":"\u21D0","⤛":"\u291B","⤎":"\u290E","≦":"\u2266","⪋":"\u2A8B","⥢":"\u2962","ĺ":"\u013A","⦴":"\u29B4","ℒ":"\u2112","λ":"\u03BB","⟨":"\u27E8","⦑":"\u2991","⟨":"\u27E8","⪅":"\u2A85","«":"\xAB","«":"\xAB","←":"\u2190","⇤":"\u21E4","⤟":"\u291F","⤝":"\u291D","↩":"\u21A9","↫":"\u21AB","⤹":"\u2939","⥳":"\u2973","↢":"\u21A2","⪫":"\u2AAB","⤙":"\u2919","⪭":"\u2AAD","⪭︀":"\u2AAD\uFE00","⤌":"\u290C","❲":"\u2772","{":"{","[":"[","⦋":"\u298B","⦏":"\u298F","⦍":"\u298D","ľ":"\u013E","ļ":"\u013C","⌈":"\u2308","{":"{","л":"\u043B","⤶":"\u2936","“":"\u201C","„":"\u201E","⥧":"\u2967","⥋":"\u294B","↲":"\u21B2","≤":"\u2264","←":"\u2190","↢":"\u21A2","↽":"\u21BD","↼":"\u21BC","⇇":"\u21C7","↔":"\u2194","⇆":"\u21C6","⇋":"\u21CB","↭":"\u21AD","⋋":"\u22CB","⋚":"\u22DA","≤":"\u2264","≦":"\u2266","⩽":"\u2A7D","⩽":"\u2A7D","⪨":"\u2AA8","⩿":"\u2A7F","⪁":"\u2A81","⪃":"\u2A83","⋚︀":"\u22DA\uFE00","⪓":"\u2A93","⪅":"\u2A85","⋖":"\u22D6","⋚":"\u22DA","⪋":"\u2A8B","≶":"\u2276","≲":"\u2272","⥼":"\u297C","⌊":"\u230A","𝔩":"\u{1D529}","≶":"\u2276","⪑":"\u2A91","↽":"\u21BD","↼":"\u21BC","⥪":"\u296A","▄":"\u2584","љ":"\u0459","≪":"\u226A","⇇":"\u21C7","⌞":"\u231E","⥫":"\u296B","◺":"\u25FA","ŀ":"\u0140","⎰":"\u23B0","⎰":"\u23B0","≨":"\u2268","⪉":"\u2A89","⪉":"\u2A89","⪇":"\u2A87","⪇":"\u2A87","≨":"\u2268","⋦":"\u22E6","⟬":"\u27EC","⇽":"\u21FD","⟦":"\u27E6","⟵":"\u27F5","⟷":"\u27F7","⟼":"\u27FC","⟶":"\u27F6","↫":"\u21AB","↬":"\u21AC","⦅":"\u2985","𝕝":"\u{1D55D}","⨭":"\u2A2D","⨴":"\u2A34","∗":"\u2217","_":"_","◊":"\u25CA","◊":"\u25CA","⧫":"\u29EB","(":"(","⦓":"\u2993","⇆":"\u21C6","⌟":"\u231F","⇋":"\u21CB","⥭":"\u296D","‎":"\u200E","⊿":"\u22BF","‹":"\u2039","𝓁":"\u{1D4C1}","↰":"\u21B0","≲":"\u2272","⪍":"\u2A8D","⪏":"\u2A8F","[":"[","‘":"\u2018","‚":"\u201A","ł":"\u0142","<":"<","<":"<","⪦":"\u2AA6","⩹":"\u2A79","⋖":"\u22D6","⋋":"\u22CB","⋉":"\u22C9","⥶":"\u2976","⩻":"\u2A7B","⦖":"\u2996","◃":"\u25C3","⊴":"\u22B4","◂":"\u25C2","⥊":"\u294A","⥦":"\u2966","≨︀":"\u2268\uFE00","≨︀":"\u2268\uFE00","∺":"\u223A","¯":"\xAF","¯":"\xAF","♂":"\u2642","✠":"\u2720","✠":"\u2720","↦":"\u21A6","↦":"\u21A6","↧":"\u21A7","↤":"\u21A4","↥":"\u21A5","▮":"\u25AE","⨩":"\u2A29","м":"\u043C","—":"\u2014","∡":"\u2221","𝔪":"\u{1D52A}","℧":"\u2127","µ":"\xB5","µ":"\xB5","∣":"\u2223","*":"*","⫰":"\u2AF0","·":"\xB7","·":"\xB7","−":"\u2212","⊟":"\u229F","∸":"\u2238","⨪":"\u2A2A","⫛":"\u2ADB","…":"\u2026","∓":"\u2213","⊧":"\u22A7","𝕞":"\u{1D55E}","∓":"\u2213","𝓂":"\u{1D4C2}","∾":"\u223E","μ":"\u03BC","⊸":"\u22B8","⊸":"\u22B8","⋙̸":"\u22D9\u0338","≫⃒":"\u226B\u20D2","≫̸":"\u226B\u0338","⇍":"\u21CD","⇎":"\u21CE","⋘̸":"\u22D8\u0338","≪⃒":"\u226A\u20D2","≪̸":"\u226A\u0338","⇏":"\u21CF","⊯":"\u22AF","⊮":"\u22AE","∇":"\u2207","ń":"\u0144","∠⃒":"\u2220\u20D2","≉":"\u2249","⩰̸":"\u2A70\u0338","≋̸":"\u224B\u0338","ʼn":"\u0149","≉":"\u2249","♮":"\u266E","♮":"\u266E","ℕ":"\u2115"," ":"\xA0"," ":"\xA0","≎̸":"\u224E\u0338","≏̸":"\u224F\u0338","⩃":"\u2A43","ň":"\u0148","ņ":"\u0146","≇":"\u2247","⩭̸":"\u2A6D\u0338","⩂":"\u2A42","н":"\u043D","–":"\u2013","≠":"\u2260","⇗":"\u21D7","⤤":"\u2924","↗":"\u2197","↗":"\u2197","≐̸":"\u2250\u0338","≢":"\u2262","⤨":"\u2928","≂̸":"\u2242\u0338","∄":"\u2204","∄":"\u2204","𝔫":"\u{1D52B}","≧̸":"\u2267\u0338","≱":"\u2271","≱":"\u2271","≧̸":"\u2267\u0338","⩾̸":"\u2A7E\u0338","⩾̸":"\u2A7E\u0338","≵":"\u2275","≯":"\u226F","≯":"\u226F","⇎":"\u21CE","↮":"\u21AE","⫲":"\u2AF2","∋":"\u220B","⋼":"\u22FC","⋺":"\u22FA","∋":"\u220B","њ":"\u045A","⇍":"\u21CD","≦̸":"\u2266\u0338","↚":"\u219A","‥":"\u2025","≰":"\u2270","↚":"\u219A","↮":"\u21AE","≰":"\u2270","≦̸":"\u2266\u0338","⩽̸":"\u2A7D\u0338","⩽̸":"\u2A7D\u0338","≮":"\u226E","≴":"\u2274","≮":"\u226E","⋪":"\u22EA","⋬":"\u22EC","∤":"\u2224","𝕟":"\u{1D55F}","¬":"\xAC","¬":"\xAC","∉":"\u2209","⋹̸":"\u22F9\u0338","⋵̸":"\u22F5\u0338","∉":"\u2209","⋷":"\u22F7","⋶":"\u22F6","∌":"\u220C","∌":"\u220C","⋾":"\u22FE","⋽":"\u22FD","∦":"\u2226","∦":"\u2226","⫽⃥":"\u2AFD\u20E5","∂̸":"\u2202\u0338","⨔":"\u2A14","⊀":"\u2280","⋠":"\u22E0","⪯̸":"\u2AAF\u0338","⊀":"\u2280","⪯̸":"\u2AAF\u0338","⇏":"\u21CF","↛":"\u219B","⤳̸":"\u2933\u0338","↝̸":"\u219D\u0338","↛":"\u219B","⋫":"\u22EB","⋭":"\u22ED","⊁":"\u2281","⋡":"\u22E1","⪰̸":"\u2AB0\u0338","𝓃":"\u{1D4C3}","∤":"\u2224","∦":"\u2226","≁":"\u2241","≄":"\u2244","≄":"\u2244","∤":"\u2224","∦":"\u2226","⋢":"\u22E2","⋣":"\u22E3","⊄":"\u2284","⫅̸":"\u2AC5\u0338","⊈":"\u2288","⊂⃒":"\u2282\u20D2","⊈":"\u2288","⫅̸":"\u2AC5\u0338","⊁":"\u2281","⪰̸":"\u2AB0\u0338","⊅":"\u2285","⫆̸":"\u2AC6\u0338","⊉":"\u2289","⊃⃒":"\u2283\u20D2","⊉":"\u2289","⫆̸":"\u2AC6\u0338","≹":"\u2279","ñ":"\xF1","ñ":"\xF1","≸":"\u2278","⋪":"\u22EA","⋬":"\u22EC","⋫":"\u22EB","⋭":"\u22ED","ν":"\u03BD","#":"#","№":"\u2116"," ":"\u2007","⊭":"\u22AD","⤄":"\u2904","≍⃒":"\u224D\u20D2","⊬":"\u22AC","≥⃒":"\u2265\u20D2",">⃒":">\u20D2","⧞":"\u29DE","⤂":"\u2902","≤⃒":"\u2264\u20D2","<⃒":"<\u20D2","⊴⃒":"\u22B4\u20D2","⤃":"\u2903","⊵⃒":"\u22B5\u20D2","∼⃒":"\u223C\u20D2","⇖":"\u21D6","⤣":"\u2923","↖":"\u2196","↖":"\u2196","⤧":"\u2927","Ⓢ":"\u24C8","ó":"\xF3","ó":"\xF3","⊛":"\u229B","⊚":"\u229A","ô":"\xF4","ô":"\xF4","о":"\u043E","⊝":"\u229D","ő":"\u0151","⨸":"\u2A38","⊙":"\u2299","⦼":"\u29BC","œ":"\u0153","⦿":"\u29BF","𝔬":"\u{1D52C}","˛":"\u02DB","ò":"\xF2","ò":"\xF2","⧁":"\u29C1","⦵":"\u29B5","Ω":"\u03A9","∮":"\u222E","↺":"\u21BA","⦾":"\u29BE","⦻":"\u29BB","‾":"\u203E","⧀":"\u29C0","ō":"\u014D","ω":"\u03C9","ο":"\u03BF","⦶":"\u29B6","⊖":"\u2296","𝕠":"\u{1D560}","⦷":"\u29B7","⦹":"\u29B9","⊕":"\u2295","∨":"\u2228","↻":"\u21BB","⩝":"\u2A5D","ℴ":"\u2134","ℴ":"\u2134","ª":"\xAA","ª":"\xAA","º":"\xBA","º":"\xBA","⊶":"\u22B6","⩖":"\u2A56","⩗":"\u2A57","⩛":"\u2A5B","ℴ":"\u2134","ø":"\xF8","ø":"\xF8","⊘":"\u2298","õ":"\xF5","õ":"\xF5","⊗":"\u2297","⨶":"\u2A36","ö":"\xF6","ö":"\xF6","⌽":"\u233D","∥":"\u2225","¶":"\xB6","¶":"\xB6","∥":"\u2225","⫳":"\u2AF3","⫽":"\u2AFD","∂":"\u2202","п":"\u043F","%":"%",".":".","‰":"\u2030","⊥":"\u22A5","‱":"\u2031","𝔭":"\u{1D52D}","φ":"\u03C6","ϕ":"\u03D5","ℳ":"\u2133","☎":"\u260E","π":"\u03C0","⋔":"\u22D4","ϖ":"\u03D6","ℏ":"\u210F","ℎ":"\u210E","ℏ":"\u210F","+":"+","⨣":"\u2A23","⊞":"\u229E","⨢":"\u2A22","∔":"\u2214","⨥":"\u2A25","⩲":"\u2A72","±":"\xB1","±":"\xB1","⨦":"\u2A26","⨧":"\u2A27","±":"\xB1","⨕":"\u2A15","𝕡":"\u{1D561}","£":"\xA3","£":"\xA3","≺":"\u227A","⪳":"\u2AB3","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","≺":"\u227A","⪷":"\u2AB7","≼":"\u227C","⪯":"\u2AAF","⪹":"\u2AB9","⪵":"\u2AB5","⋨":"\u22E8","≾":"\u227E","′":"\u2032","ℙ":"\u2119","⪵":"\u2AB5","⪹":"\u2AB9","⋨":"\u22E8","∏":"\u220F","⌮":"\u232E","⌒":"\u2312","⌓":"\u2313","∝":"\u221D","∝":"\u221D","≾":"\u227E","⊰":"\u22B0","𝓅":"\u{1D4C5}","ψ":"\u03C8"," ":"\u2008","𝔮":"\u{1D52E}","⨌":"\u2A0C","𝕢":"\u{1D562}","⁗":"\u2057","𝓆":"\u{1D4C6}","ℍ":"\u210D","⨖":"\u2A16","?":"?","≟":"\u225F",""":'"',""":'"',"⇛":"\u21DB","⇒":"\u21D2","⤜":"\u291C","⤏":"\u290F","⥤":"\u2964","∽̱":"\u223D\u0331","ŕ":"\u0155","√":"\u221A","⦳":"\u29B3","⟩":"\u27E9","⦒":"\u2992","⦥":"\u29A5","⟩":"\u27E9","»":"\xBB","»":"\xBB","→":"\u2192","⥵":"\u2975","⇥":"\u21E5","⤠":"\u2920","⤳":"\u2933","⤞":"\u291E","↪":"\u21AA","↬":"\u21AC","⥅":"\u2945","⥴":"\u2974","↣":"\u21A3","↝":"\u219D","⤚":"\u291A","∶":"\u2236","ℚ":"\u211A","⤍":"\u290D","❳":"\u2773","}":"}","]":"]","⦌":"\u298C","⦎":"\u298E","⦐":"\u2990","ř":"\u0159","ŗ":"\u0157","⌉":"\u2309","}":"}","р":"\u0440","⤷":"\u2937","⥩":"\u2969","”":"\u201D","”":"\u201D","↳":"\u21B3","ℜ":"\u211C","ℛ":"\u211B","ℜ":"\u211C","ℝ":"\u211D","▭":"\u25AD","®":"\xAE","®":"\xAE","⥽":"\u297D","⌋":"\u230B","𝔯":"\u{1D52F}","⇁":"\u21C1","⇀":"\u21C0","⥬":"\u296C","ρ":"\u03C1","ϱ":"\u03F1","→":"\u2192","↣":"\u21A3","⇁":"\u21C1","⇀":"\u21C0","⇄":"\u21C4","⇌":"\u21CC","⇉":"\u21C9","↝":"\u219D","⋌":"\u22CC","˚":"\u02DA","≓":"\u2253","⇄":"\u21C4","⇌":"\u21CC","‏":"\u200F","⎱":"\u23B1","⎱":"\u23B1","⫮":"\u2AEE","⟭":"\u27ED","⇾":"\u21FE","⟧":"\u27E7","⦆":"\u2986","𝕣":"\u{1D563}","⨮":"\u2A2E","⨵":"\u2A35",")":")","⦔":"\u2994","⨒":"\u2A12","⇉":"\u21C9","›":"\u203A","𝓇":"\u{1D4C7}","↱":"\u21B1","]":"]","’":"\u2019","’":"\u2019","⋌":"\u22CC","⋊":"\u22CA","▹":"\u25B9","⊵":"\u22B5","▸":"\u25B8","⧎":"\u29CE","⥨":"\u2968","℞":"\u211E","ś":"\u015B","‚":"\u201A","≻":"\u227B","⪴":"\u2AB4","⪸":"\u2AB8","š":"\u0161","≽":"\u227D","⪰":"\u2AB0","ş":"\u015F","ŝ":"\u015D","⪶":"\u2AB6","⪺":"\u2ABA","⋩":"\u22E9","⨓":"\u2A13","≿":"\u227F","с":"\u0441","⋅":"\u22C5","⊡":"\u22A1","⩦":"\u2A66","⇘":"\u21D8","⤥":"\u2925","↘":"\u2198","↘":"\u2198","§":"\xA7","§":"\xA7",";":";","⤩":"\u2929","∖":"\u2216","∖":"\u2216","✶":"\u2736","𝔰":"\u{1D530}","⌢":"\u2322","♯":"\u266F","щ":"\u0449","ш":"\u0448","∣":"\u2223","∥":"\u2225","­":"\xAD","­":"\xAD","σ":"\u03C3","ς":"\u03C2","ς":"\u03C2","∼":"\u223C","⩪":"\u2A6A","≃":"\u2243","≃":"\u2243","⪞":"\u2A9E","⪠":"\u2AA0","⪝":"\u2A9D","⪟":"\u2A9F","≆":"\u2246","⨤":"\u2A24","⥲":"\u2972","←":"\u2190","∖":"\u2216","⨳":"\u2A33","⧤":"\u29E4","∣":"\u2223","⌣":"\u2323","⪪":"\u2AAA","⪬":"\u2AAC","⪬︀":"\u2AAC\uFE00","ь":"\u044C","/":"/","⧄":"\u29C4","⌿":"\u233F","𝕤":"\u{1D564}","♠":"\u2660","♠":"\u2660","∥":"\u2225","⊓":"\u2293","⊓︀":"\u2293\uFE00","⊔":"\u2294","⊔︀":"\u2294\uFE00","⊏":"\u228F","⊑":"\u2291","⊏":"\u228F","⊑":"\u2291","⊐":"\u2290","⊒":"\u2292","⊐":"\u2290","⊒":"\u2292","□":"\u25A1","□":"\u25A1","▪":"\u25AA","▪":"\u25AA","→":"\u2192","𝓈":"\u{1D4C8}","∖":"\u2216","⌣":"\u2323","⋆":"\u22C6","☆":"\u2606","★":"\u2605","ϵ":"\u03F5","ϕ":"\u03D5","¯":"\xAF","⊂":"\u2282","⫅":"\u2AC5","⪽":"\u2ABD","⊆":"\u2286","⫃":"\u2AC3","⫁":"\u2AC1","⫋":"\u2ACB","⊊":"\u228A","⪿":"\u2ABF","⥹":"\u2979","⊂":"\u2282","⊆":"\u2286","⫅":"\u2AC5","⊊":"\u228A","⫋":"\u2ACB","⫇":"\u2AC7","⫕":"\u2AD5","⫓":"\u2AD3","≻":"\u227B","⪸":"\u2AB8","≽":"\u227D","⪰":"\u2AB0","⪺":"\u2ABA","⪶":"\u2AB6","⋩":"\u22E9","≿":"\u227F","∑":"\u2211","♪":"\u266A","¹":"\xB9","¹":"\xB9","²":"\xB2","²":"\xB2","³":"\xB3","³":"\xB3","⊃":"\u2283","⫆":"\u2AC6","⪾":"\u2ABE","⫘":"\u2AD8","⊇":"\u2287","⫄":"\u2AC4","⟉":"\u27C9","⫗":"\u2AD7","⥻":"\u297B","⫂":"\u2AC2","⫌":"\u2ACC","⊋":"\u228B","⫀":"\u2AC0","⊃":"\u2283","⊇":"\u2287","⫆":"\u2AC6","⊋":"\u228B","⫌":"\u2ACC","⫈":"\u2AC8","⫔":"\u2AD4","⫖":"\u2AD6","⇙":"\u21D9","⤦":"\u2926","↙":"\u2199","↙":"\u2199","⤪":"\u292A","ß":"\xDF","ß":"\xDF","⌖":"\u2316","τ":"\u03C4","⎴":"\u23B4","ť":"\u0165","ţ":"\u0163","т":"\u0442","⃛":"\u20DB","⌕":"\u2315","𝔱":"\u{1D531}","∴":"\u2234","∴":"\u2234","θ":"\u03B8","ϑ":"\u03D1","ϑ":"\u03D1","≈":"\u2248","∼":"\u223C"," ":"\u2009","≈":"\u2248","∼":"\u223C","þ":"\xFE","þ":"\xFE","˜":"\u02DC","×":"\xD7","×":"\xD7","⊠":"\u22A0","⨱":"\u2A31","⨰":"\u2A30","∭":"\u222D","⤨":"\u2928","⊤":"\u22A4","⌶":"\u2336","⫱":"\u2AF1","𝕥":"\u{1D565}","⫚":"\u2ADA","⤩":"\u2929","‴":"\u2034","™":"\u2122","▵":"\u25B5","▿":"\u25BF","◃":"\u25C3","⊴":"\u22B4","≜":"\u225C","▹":"\u25B9","⊵":"\u22B5","◬":"\u25EC","≜":"\u225C","⨺":"\u2A3A","⨹":"\u2A39","⧍":"\u29CD","⨻":"\u2A3B","⏢":"\u23E2","𝓉":"\u{1D4C9}","ц":"\u0446","ћ":"\u045B","ŧ":"\u0167","≬":"\u226C","↞":"\u219E","↠":"\u21A0","⇑":"\u21D1","⥣":"\u2963","ú":"\xFA","ú":"\xFA","↑":"\u2191","ў":"\u045E","ŭ":"\u016D","û":"\xFB","û":"\xFB","у":"\u0443","⇅":"\u21C5","ű":"\u0171","⥮":"\u296E","⥾":"\u297E","𝔲":"\u{1D532}","ù":"\xF9","ù":"\xF9","↿":"\u21BF","↾":"\u21BE","▀":"\u2580","⌜":"\u231C","⌜":"\u231C","⌏":"\u230F","◸":"\u25F8","ū":"\u016B","¨":"\xA8","¨":"\xA8","ų":"\u0173","𝕦":"\u{1D566}","↑":"\u2191","↕":"\u2195","↿":"\u21BF","↾":"\u21BE","⊎":"\u228E","υ":"\u03C5","ϒ":"\u03D2","υ":"\u03C5","⇈":"\u21C8","⌝":"\u231D","⌝":"\u231D","⌎":"\u230E","ů":"\u016F","◹":"\u25F9","𝓊":"\u{1D4CA}","⋰":"\u22F0","ũ":"\u0169","▵":"\u25B5","▴":"\u25B4","⇈":"\u21C8","ü":"\xFC","ü":"\xFC","⦧":"\u29A7","⇕":"\u21D5","⫨":"\u2AE8","⫩":"\u2AE9","⊨":"\u22A8","⦜":"\u299C","ϵ":"\u03F5","ϰ":"\u03F0","∅":"\u2205","ϕ":"\u03D5","ϖ":"\u03D6","∝":"\u221D","↕":"\u2195","ϱ":"\u03F1","ς":"\u03C2","⊊︀":"\u228A\uFE00","⫋︀":"\u2ACB\uFE00","⊋︀":"\u228B\uFE00","⫌︀":"\u2ACC\uFE00","ϑ":"\u03D1","⊲":"\u22B2","⊳":"\u22B3","в":"\u0432","⊢":"\u22A2","∨":"\u2228","⊻":"\u22BB","≚":"\u225A","⋮":"\u22EE","|":"|","|":"|","𝔳":"\u{1D533}","⊲":"\u22B2","⊂⃒":"\u2282\u20D2","⊃⃒":"\u2283\u20D2","𝕧":"\u{1D567}","∝":"\u221D","⊳":"\u22B3","𝓋":"\u{1D4CB}","⫋︀":"\u2ACB\uFE00","⊊︀":"\u228A\uFE00","⫌︀":"\u2ACC\uFE00","⊋︀":"\u228B\uFE00","⦚":"\u299A","ŵ":"\u0175","⩟":"\u2A5F","∧":"\u2227","≙":"\u2259","℘":"\u2118","𝔴":"\u{1D534}","𝕨":"\u{1D568}","℘":"\u2118","≀":"\u2240","≀":"\u2240","𝓌":"\u{1D4CC}","⋂":"\u22C2","◯":"\u25EF","⋃":"\u22C3","▽":"\u25BD","𝔵":"\u{1D535}","⟺":"\u27FA","⟷":"\u27F7","ξ":"\u03BE","⟸":"\u27F8","⟵":"\u27F5","⟼":"\u27FC","⋻":"\u22FB","⨀":"\u2A00","𝕩":"\u{1D569}","⨁":"\u2A01","⨂":"\u2A02","⟹":"\u27F9","⟶":"\u27F6","𝓍":"\u{1D4CD}","⨆":"\u2A06","⨄":"\u2A04","△":"\u25B3","⋁":"\u22C1","⋀":"\u22C0","ý":"\xFD","ý":"\xFD","я":"\u044F","ŷ":"\u0177","ы":"\u044B","¥":"\xA5","¥":"\xA5","𝔶":"\u{1D536}","ї":"\u0457","𝕪":"\u{1D56A}","𝓎":"\u{1D4CE}","ю":"\u044E","ÿ":"\xFF","ÿ":"\xFF","ź":"\u017A","ž":"\u017E","з":"\u0437","ż":"\u017C","ℨ":"\u2128","ζ":"\u03B6","𝔷":"\u{1D537}","ж":"\u0436","⇝":"\u21DD","𝕫":"\u{1D56B}","𝓏":"\u{1D4CF}","‍":"\u200D","‌":"\u200C"},characters:{\u00C6:"Æ","&":"&",\u00C1:"Á",\u0102:"Ă",\u00C2:"Â",\u0410:"А","\u{1D504}":"𝔄",\u00C0:"À",\u0391:"Α",\u0100:"Ā","\u2A53":"⩓",\u0104:"Ą","\u{1D538}":"𝔸","\u2061":"⁡",\u00C5:"Å","\u{1D49C}":"𝒜","\u2254":"≔",\u00C3:"Ã",\u00C4:"Ä","\u2216":"∖","\u2AE7":"⫧","\u2306":"⌆",\u0411:"Б","\u2235":"∵",\u212C:"ℬ",\u0392:"Β","\u{1D505}":"𝔅","\u{1D539}":"𝔹","\u02D8":"˘","\u224E":"≎",\u0427:"Ч","\xA9":"©",\u0106:"Ć","\u22D2":"⋒","\u2145":"ⅅ",\u212D:"ℭ",\u010C:"Č",\u00C7:"Ç",\u0108:"Ĉ","\u2230":"∰",\u010A:"Ċ","\xB8":"¸","\xB7":"·",\u03A7:"Χ","\u2299":"⊙","\u2296":"⊖","\u2295":"⊕","\u2297":"⊗","\u2232":"∲","\u201D":"”","\u2019":"’","\u2237":"∷","\u2A74":"⩴","\u2261":"≡","\u222F":"∯","\u222E":"∮",\u2102:"ℂ","\u2210":"∐","\u2233":"∳","\u2A2F":"⨯","\u{1D49E}":"𝒞","\u22D3":"⋓","\u224D":"≍","\u2911":"⤑",\u0402:"Ђ",\u0405:"Ѕ",\u040F:"Џ","\u2021":"‡","\u21A1":"↡","\u2AE4":"⫤",\u010E:"Ď",\u0414:"Д","\u2207":"∇",\u0394:"Δ","\u{1D507}":"𝔇","\xB4":"´","\u02D9":"˙","\u02DD":"˝","`":"`","\u02DC":"˜","\u22C4":"⋄","\u2146":"ⅆ","\u{1D53B}":"𝔻","\xA8":"¨","\u20DC":"⃜","\u2250":"≐","\u21D3":"⇓","\u21D0":"⇐","\u21D4":"⇔","\u27F8":"⟸","\u27FA":"⟺","\u27F9":"⟹","\u21D2":"⇒","\u22A8":"⊨","\u21D1":"⇑","\u21D5":"⇕","\u2225":"∥","\u2193":"↓","\u2913":"⤓","\u21F5":"⇵","\u0311":"̑","\u2950":"⥐","\u295E":"⥞","\u21BD":"↽","\u2956":"⥖","\u295F":"⥟","\u21C1":"⇁","\u2957":"⥗","\u22A4":"⊤","\u21A7":"↧","\u{1D49F}":"𝒟",\u0110:"Đ",\u014A:"Ŋ",\u00D0:"Ð",\u00C9:"É",\u011A:"Ě",\u00CA:"Ê",\u042D:"Э",\u0116:"Ė","\u{1D508}":"𝔈",\u00C8:"È","\u2208":"∈",\u0112:"Ē","\u25FB":"◻","\u25AB":"▫",\u0118:"Ę","\u{1D53C}":"𝔼",\u0395:"Ε","\u2A75":"⩵","\u2242":"≂","\u21CC":"⇌",\u2130:"ℰ","\u2A73":"⩳",\u0397:"Η",\u00CB:"Ë","\u2203":"∃","\u2147":"ⅇ",\u0424:"Ф","\u{1D509}":"𝔉","\u25FC":"◼","\u25AA":"▪","\u{1D53D}":"𝔽","\u2200":"∀",\u2131:"ℱ",\u0403:"Ѓ",">":">",\u0393:"Γ",\u03DC:"Ϝ",\u011E:"Ğ",\u0122:"Ģ",\u011C:"Ĝ",\u0413:"Г",\u0120:"Ġ","\u{1D50A}":"𝔊","\u22D9":"⋙","\u{1D53E}":"𝔾","\u2265":"≥","\u22DB":"⋛","\u2267":"≧","\u2AA2":"⪢","\u2277":"≷","\u2A7E":"⩾","\u2273":"≳","\u{1D4A2}":"𝒢","\u226B":"≫",\u042A:"Ъ","\u02C7":"ˇ","^":"^",\u0124:"Ĥ",\u210C:"ℌ",\u210B:"ℋ",\u210D:"ℍ","\u2500":"─",\u0126:"Ħ","\u224F":"≏",\u0415:"Е",\u0132:"IJ",\u0401:"Ё",\u00CD:"Í",\u00CE:"Î",\u0418:"И",\u0130:"İ",\u2111:"ℑ",\u00CC:"Ì",\u012A:"Ī","\u2148":"ⅈ","\u222C":"∬","\u222B":"∫","\u22C2":"⋂","\u2063":"⁣","\u2062":"⁢",\u012E:"Į","\u{1D540}":"𝕀",\u0399:"Ι",\u2110:"ℐ",\u0128:"Ĩ",\u0406:"І",\u00CF:"Ï",\u0134:"Ĵ",\u0419:"Й","\u{1D50D}":"𝔍","\u{1D541}":"𝕁","\u{1D4A5}":"𝒥",\u0408:"Ј",\u0404:"Є",\u0425:"Х",\u040C:"Ќ",\u039A:"Κ",\u0136:"Ķ",\u041A:"К","\u{1D50E}":"𝔎","\u{1D542}":"𝕂","\u{1D4A6}":"𝒦",\u0409:"Љ","<":"<",\u0139:"Ĺ",\u039B:"Λ","\u27EA":"⟪",\u2112:"ℒ","\u219E":"↞",\u013D:"Ľ",\u013B:"Ļ",\u041B:"Л","\u27E8":"⟨","\u2190":"←","\u21E4":"⇤","\u21C6":"⇆","\u2308":"⌈","\u27E6":"⟦","\u2961":"⥡","\u21C3":"⇃","\u2959":"⥙","\u230A":"⌊","\u2194":"↔","\u294E":"⥎","\u22A3":"⊣","\u21A4":"↤","\u295A":"⥚","\u22B2":"⊲","\u29CF":"⧏","\u22B4":"⊴","\u2951":"⥑","\u2960":"⥠","\u21BF":"↿","\u2958":"⥘","\u21BC":"↼","\u2952":"⥒","\u22DA":"⋚","\u2266":"≦","\u2276":"≶","\u2AA1":"⪡","\u2A7D":"⩽","\u2272":"≲","\u{1D50F}":"𝔏","\u22D8":"⋘","\u21DA":"⇚",\u013F:"Ŀ","\u27F5":"⟵","\u27F7":"⟷","\u27F6":"⟶","\u{1D543}":"𝕃","\u2199":"↙","\u2198":"↘","\u21B0":"↰",\u0141:"Ł","\u226A":"≪","\u2905":"⤅",\u041C:"М","\u205F":" ",\u2133:"ℳ","\u{1D510}":"𝔐","\u2213":"∓","\u{1D544}":"𝕄",\u039C:"Μ",\u040A:"Њ",\u0143:"Ń",\u0147:"Ň",\u0145:"Ņ",\u041D:"Н","\u200B":"​","\n":" ","\u{1D511}":"𝔑","\u2060":"⁠","\xA0":" ",\u2115:"ℕ","\u2AEC":"⫬","\u2262":"≢","\u226D":"≭","\u2226":"∦","\u2209":"∉","\u2260":"≠","\u2242\u0338":"≂̸","\u2204":"∄","\u226F":"≯","\u2271":"≱","\u2267\u0338":"≧̸","\u226B\u0338":"≫̸","\u2279":"≹","\u2A7E\u0338":"⩾̸","\u2275":"≵","\u224E\u0338":"≎̸","\u224F\u0338":"≏̸","\u22EA":"⋪","\u29CF\u0338":"⧏̸","\u22EC":"⋬","\u226E":"≮","\u2270":"≰","\u2278":"≸","\u226A\u0338":"≪̸","\u2A7D\u0338":"⩽̸","\u2274":"≴","\u2AA2\u0338":"⪢̸","\u2AA1\u0338":"⪡̸","\u2280":"⊀","\u2AAF\u0338":"⪯̸","\u22E0":"⋠","\u220C":"∌","\u22EB":"⋫","\u29D0\u0338":"⧐̸","\u22ED":"⋭","\u228F\u0338":"⊏̸","\u22E2":"⋢","\u2290\u0338":"⊐̸","\u22E3":"⋣","\u2282\u20D2":"⊂⃒","\u2288":"⊈","\u2281":"⊁","\u2AB0\u0338":"⪰̸","\u22E1":"⋡","\u227F\u0338":"≿̸","\u2283\u20D2":"⊃⃒","\u2289":"⊉","\u2241":"≁","\u2244":"≄","\u2247":"≇","\u2249":"≉","\u2224":"∤","\u{1D4A9}":"𝒩",\u00D1:"Ñ",\u039D:"Ν",\u0152:"Œ",\u00D3:"Ó",\u00D4:"Ô",\u041E:"О",\u0150:"Ő","\u{1D512}":"𝔒",\u00D2:"Ò",\u014C:"Ō",\u03A9:"Ω",\u039F:"Ο","\u{1D546}":"𝕆","\u201C":"“","\u2018":"‘","\u2A54":"⩔","\u{1D4AA}":"𝒪",\u00D8:"Ø",\u00D5:"Õ","\u2A37":"⨷",\u00D6:"Ö","\u203E":"‾","\u23DE":"⏞","\u23B4":"⎴","\u23DC":"⏜","\u2202":"∂",\u041F:"П","\u{1D513}":"𝔓",\u03A6:"Φ",\u03A0:"Π","\xB1":"±",\u2119:"ℙ","\u2ABB":"⪻","\u227A":"≺","\u2AAF":"⪯","\u227C":"≼","\u227E":"≾","\u2033":"″","\u220F":"∏","\u221D":"∝","\u{1D4AB}":"𝒫",\u03A8:"Ψ",'"':""","\u{1D514}":"𝔔",\u211A:"ℚ","\u{1D4AC}":"𝒬","\u2910":"⤐","\xAE":"®",\u0154:"Ŕ","\u27EB":"⟫","\u21A0":"↠","\u2916":"⤖",\u0158:"Ř",\u0156:"Ŗ",\u0420:"Р",\u211C:"ℜ","\u220B":"∋","\u21CB":"⇋","\u296F":"⥯",\u03A1:"Ρ","\u27E9":"⟩","\u2192":"→","\u21E5":"⇥","\u21C4":"⇄","\u2309":"⌉","\u27E7":"⟧","\u295D":"⥝","\u21C2":"⇂","\u2955":"⥕","\u230B":"⌋","\u22A2":"⊢","\u21A6":"↦","\u295B":"⥛","\u22B3":"⊳","\u29D0":"⧐","\u22B5":"⊵","\u294F":"⥏","\u295C":"⥜","\u21BE":"↾","\u2954":"⥔","\u21C0":"⇀","\u2953":"⥓",\u211D:"ℝ","\u2970":"⥰","\u21DB":"⇛",\u211B:"ℛ","\u21B1":"↱","\u29F4":"⧴",\u0429:"Щ",\u0428:"Ш",\u042C:"Ь",\u015A:"Ś","\u2ABC":"⪼",\u0160:"Š",\u015E:"Ş",\u015C:"Ŝ",\u0421:"С","\u{1D516}":"𝔖","\u2191":"↑",\u03A3:"Σ","\u2218":"∘","\u{1D54A}":"𝕊","\u221A":"√","\u25A1":"□","\u2293":"⊓","\u228F":"⊏","\u2291":"⊑","\u2290":"⊐","\u2292":"⊒","\u2294":"⊔","\u{1D4AE}":"𝒮","\u22C6":"⋆","\u22D0":"⋐","\u2286":"⊆","\u227B":"≻","\u2AB0":"⪰","\u227D":"≽","\u227F":"≿","\u2211":"∑","\u22D1":"⋑","\u2283":"⊃","\u2287":"⊇",\u00DE:"Þ","\u2122":"™",\u040B:"Ћ",\u0426:"Ц"," ":" ",\u03A4:"Τ",\u0164:"Ť",\u0162:"Ţ",\u0422:"Т","\u{1D517}":"𝔗","\u2234":"∴",\u0398:"Θ","\u205F\u200A":"  ","\u2009":" ","\u223C":"∼","\u2243":"≃","\u2245":"≅","\u2248":"≈","\u{1D54B}":"𝕋","\u20DB":"⃛","\u{1D4AF}":"𝒯",\u0166:"Ŧ",\u00DA:"Ú","\u219F":"↟","\u2949":"⥉",\u040E:"Ў",\u016C:"Ŭ",\u00DB:"Û",\u0423:"У",\u0170:"Ű","\u{1D518}":"𝔘",\u00D9:"Ù",\u016A:"Ū",_:"_","\u23DF":"⏟","\u23B5":"⎵","\u23DD":"⏝","\u22C3":"⋃","\u228E":"⊎",\u0172:"Ų","\u{1D54C}":"𝕌","\u2912":"⤒","\u21C5":"⇅","\u2195":"↕","\u296E":"⥮","\u22A5":"⊥","\u21A5":"↥","\u2196":"↖","\u2197":"↗",\u03D2:"ϒ",\u03A5:"Υ",\u016E:"Ů","\u{1D4B0}":"𝒰",\u0168:"Ũ",\u00DC:"Ü","\u22AB":"⊫","\u2AEB":"⫫",\u0412:"В","\u22A9":"⊩","\u2AE6":"⫦","\u22C1":"⋁","\u2016":"‖","\u2223":"∣","|":"|","\u2758":"❘","\u2240":"≀","\u200A":" ","\u{1D519}":"𝔙","\u{1D54D}":"𝕍","\u{1D4B1}":"𝒱","\u22AA":"⊪",\u0174:"Ŵ","\u22C0":"⋀","\u{1D51A}":"𝔚","\u{1D54E}":"𝕎","\u{1D4B2}":"𝒲","\u{1D51B}":"𝔛",\u039E:"Ξ","\u{1D54F}":"𝕏","\u{1D4B3}":"𝒳",\u042F:"Я",\u0407:"Ї",\u042E:"Ю",\u00DD:"Ý",\u0176:"Ŷ",\u042B:"Ы","\u{1D51C}":"𝔜","\u{1D550}":"𝕐","\u{1D4B4}":"𝒴",\u0178:"Ÿ",\u0416:"Ж",\u0179:"Ź",\u017D:"Ž",\u0417:"З",\u017B:"Ż",\u0396:"Ζ",\u2128:"ℨ",\u2124:"ℤ","\u{1D4B5}":"𝒵",\u00E1:"á",\u0103:"ă","\u223E":"∾","\u223E\u0333":"∾̳","\u223F":"∿",\u00E2:"â",\u0430:"а",\u00E6:"æ","\u{1D51E}":"𝔞",\u00E0:"à",\u2135:"ℵ",\u03B1:"α",\u0101:"ā","\u2A3F":"⨿","\u2227":"∧","\u2A55":"⩕","\u2A5C":"⩜","\u2A58":"⩘","\u2A5A":"⩚","\u2220":"∠","\u29A4":"⦤","\u2221":"∡","\u29A8":"⦨","\u29A9":"⦩","\u29AA":"⦪","\u29AB":"⦫","\u29AC":"⦬","\u29AD":"⦭","\u29AE":"⦮","\u29AF":"⦯","\u221F":"∟","\u22BE":"⊾","\u299D":"⦝","\u2222":"∢","\u237C":"⍼",\u0105:"ą","\u{1D552}":"𝕒","\u2A70":"⩰","\u2A6F":"⩯","\u224A":"≊","\u224B":"≋","'":"'",\u00E5:"å","\u{1D4B6}":"𝒶","*":"*",\u00E3:"ã",\u00E4:"ä","\u2A11":"⨑","\u2AED":"⫭","\u224C":"≌","\u03F6":"϶","\u2035":"‵","\u223D":"∽","\u22CD":"⋍","\u22BD":"⊽","\u2305":"⌅","\u23B6":"⎶",\u0431:"б","\u201E":"„","\u29B0":"⦰",\u03B2:"β",\u2136:"ℶ","\u226C":"≬","\u{1D51F}":"𝔟","\u25EF":"◯","\u2A00":"⨀","\u2A01":"⨁","\u2A02":"⨂","\u2A06":"⨆","\u2605":"★","\u25BD":"▽","\u25B3":"△","\u2A04":"⨄","\u290D":"⤍","\u29EB":"⧫","\u25B4":"▴","\u25BE":"▾","\u25C2":"◂","\u25B8":"▸","\u2423":"␣","\u2592":"▒","\u2591":"░","\u2593":"▓","\u2588":"█","=\u20E5":"=⃥","\u2261\u20E5":"≡⃥","\u2310":"⌐","\u{1D553}":"𝕓","\u22C8":"⋈","\u2557":"╗","\u2554":"╔","\u2556":"╖","\u2553":"╓","\u2550":"═","\u2566":"╦","\u2569":"╩","\u2564":"╤","\u2567":"╧","\u255D":"╝","\u255A":"╚","\u255C":"╜","\u2559":"╙","\u2551":"║","\u256C":"╬","\u2563":"╣","\u2560":"╠","\u256B":"╫","\u2562":"╢","\u255F":"╟","\u29C9":"⧉","\u2555":"╕","\u2552":"╒","\u2510":"┐","\u250C":"┌","\u2565":"╥","\u2568":"╨","\u252C":"┬","\u2534":"┴","\u229F":"⊟","\u229E":"⊞","\u22A0":"⊠","\u255B":"╛","\u2558":"╘","\u2518":"┘","\u2514":"└","\u2502":"│","\u256A":"╪","\u2561":"╡","\u255E":"╞","\u253C":"┼","\u2524":"┤","\u251C":"├","\xA6":"¦","\u{1D4B7}":"𝒷","\u204F":"⁏","\\":"\","\u29C5":"⧅","\u27C8":"⟈","\u2022":"•","\u2AAE":"⪮",\u0107:"ć","\u2229":"∩","\u2A44":"⩄","\u2A49":"⩉","\u2A4B":"⩋","\u2A47":"⩇","\u2A40":"⩀","\u2229\uFE00":"∩︀","\u2041":"⁁","\u2A4D":"⩍",\u010D:"č",\u00E7:"ç",\u0109:"ĉ","\u2A4C":"⩌","\u2A50":"⩐",\u010B:"ċ","\u29B2":"⦲","\xA2":"¢","\u{1D520}":"𝔠",\u0447:"ч","\u2713":"✓",\u03C7:"χ","\u25CB":"○","\u29C3":"⧃","\u02C6":"ˆ","\u2257":"≗","\u21BA":"↺","\u21BB":"↻","\u24C8":"Ⓢ","\u229B":"⊛","\u229A":"⊚","\u229D":"⊝","\u2A10":"⨐","\u2AEF":"⫯","\u29C2":"⧂","\u2663":"♣",":":":",",":",","@":"@","\u2201":"∁","\u2A6D":"⩭","\u{1D554}":"𝕔","\u2117":"℗","\u21B5":"↵","\u2717":"✗","\u{1D4B8}":"𝒸","\u2ACF":"⫏","\u2AD1":"⫑","\u2AD0":"⫐","\u2AD2":"⫒","\u22EF":"⋯","\u2938":"⤸","\u2935":"⤵","\u22DE":"⋞","\u22DF":"⋟","\u21B6":"↶","\u293D":"⤽","\u222A":"∪","\u2A48":"⩈","\u2A46":"⩆","\u2A4A":"⩊","\u228D":"⊍","\u2A45":"⩅","\u222A\uFE00":"∪︀","\u21B7":"↷","\u293C":"⤼","\u22CE":"⋎","\u22CF":"⋏","\xA4":"¤","\u2231":"∱","\u232D":"⌭","\u2965":"⥥","\u2020":"†",\u2138:"ℸ","\u2010":"‐","\u290F":"⤏",\u010F:"ď",\u0434:"д","\u21CA":"⇊","\u2A77":"⩷","\xB0":"°",\u03B4:"δ","\u29B1":"⦱","\u297F":"⥿","\u{1D521}":"𝔡","\u2666":"♦",\u03DD:"ϝ","\u22F2":"⋲","\xF7":"÷","\u22C7":"⋇",\u0452:"ђ","\u231E":"⌞","\u230D":"⌍",$:"$","\u{1D555}":"𝕕","\u2251":"≑","\u2238":"∸","\u2214":"∔","\u22A1":"⊡","\u231F":"⌟","\u230C":"⌌","\u{1D4B9}":"𝒹",\u0455:"ѕ","\u29F6":"⧶",\u0111:"đ","\u22F1":"⋱","\u25BF":"▿","\u29A6":"⦦",\u045F:"џ","\u27FF":"⟿",\u00E9:"é","\u2A6E":"⩮",\u011B:"ě","\u2256":"≖",\u00EA:"ê","\u2255":"≕",\u044D:"э",\u0117:"ė","\u2252":"≒","\u{1D522}":"𝔢","\u2A9A":"⪚",\u00E8:"è","\u2A96":"⪖","\u2A98":"⪘","\u2A99":"⪙","\u23E7":"⏧",\u2113:"ℓ","\u2A95":"⪕","\u2A97":"⪗",\u0113:"ē","\u2205":"∅","\u2004":" ","\u2005":" ","\u2003":" ",\u014B:"ŋ","\u2002":" ",\u0119:"ę","\u{1D556}":"𝕖","\u22D5":"⋕","\u29E3":"⧣","\u2A71":"⩱",\u03B5:"ε","\u03F5":"ϵ","=":"=","\u225F":"≟","\u2A78":"⩸","\u29E5":"⧥","\u2253":"≓","\u2971":"⥱",\u212F:"ℯ",\u03B7:"η",\u00F0:"ð",\u00EB:"ë","\u20AC":"€","!":"!",\u0444:"ф","\u2640":"♀",\uFB03:"ffi",\uFB00:"ff",\uFB04:"ffl","\u{1D523}":"𝔣",\uFB01:"fi",fj:"fj","\u266D":"♭",\uFB02:"fl","\u25B1":"▱",\u0192:"ƒ","\u{1D557}":"𝕗","\u22D4":"⋔","\u2AD9":"⫙","\u2A0D":"⨍","\xBD":"½","\u2153":"⅓","\xBC":"¼","\u2155":"⅕","\u2159":"⅙","\u215B":"⅛","\u2154":"⅔","\u2156":"⅖","\xBE":"¾","\u2157":"⅗","\u215C":"⅜","\u2158":"⅘","\u215A":"⅚","\u215D":"⅝","\u215E":"⅞","\u2044":"⁄","\u2322":"⌢","\u{1D4BB}":"𝒻","\u2A8C":"⪌",\u01F5:"ǵ",\u03B3:"γ","\u2A86":"⪆",\u011F:"ğ",\u011D:"ĝ",\u0433:"г",\u0121:"ġ","\u2AA9":"⪩","\u2A80":"⪀","\u2A82":"⪂","\u2A84":"⪄","\u22DB\uFE00":"⋛︀","\u2A94":"⪔","\u{1D524}":"𝔤",\u2137:"ℷ",\u0453:"ѓ","\u2A92":"⪒","\u2AA5":"⪥","\u2AA4":"⪤","\u2269":"≩","\u2A8A":"⪊","\u2A88":"⪈","\u22E7":"⋧","\u{1D558}":"𝕘",\u210A:"ℊ","\u2A8E":"⪎","\u2A90":"⪐","\u2AA7":"⪧","\u2A7A":"⩺","\u22D7":"⋗","\u2995":"⦕","\u2A7C":"⩼","\u2978":"⥸","\u2269\uFE00":"≩︀",\u044A:"ъ","\u2948":"⥈","\u21AD":"↭",\u210F:"ℏ",\u0125:"ĥ","\u2665":"♥","\u2026":"…","\u22B9":"⊹","\u{1D525}":"𝔥","\u2925":"⤥","\u2926":"⤦","\u21FF":"⇿","\u223B":"∻","\u21A9":"↩","\u21AA":"↪","\u{1D559}":"𝕙","\u2015":"―","\u{1D4BD}":"𝒽",\u0127:"ħ","\u2043":"⁃",\u00ED:"í",\u00EE:"î",\u0438:"и",\u0435:"е","\xA1":"¡","\u{1D526}":"𝔦",\u00EC:"ì","\u2A0C":"⨌","\u222D":"∭","\u29DC":"⧜","\u2129":"℩",\u0133:"ij",\u012B:"ī",\u0131:"ı","\u22B7":"⊷",\u01B5:"Ƶ","\u2105":"℅","\u221E":"∞","\u29DD":"⧝","\u22BA":"⊺","\u2A17":"⨗","\u2A3C":"⨼",\u0451:"ё",\u012F:"į","\u{1D55A}":"𝕚",\u03B9:"ι","\xBF":"¿","\u{1D4BE}":"𝒾","\u22F9":"⋹","\u22F5":"⋵","\u22F4":"⋴","\u22F3":"⋳",\u0129:"ĩ",\u0456:"і",\u00EF:"ï",\u0135:"ĵ",\u0439:"й","\u{1D527}":"𝔧","\u0237":"ȷ","\u{1D55B}":"𝕛","\u{1D4BF}":"𝒿",\u0458:"ј",\u0454:"є",\u03BA:"κ",\u03F0:"ϰ",\u0137:"ķ",\u043A:"к","\u{1D528}":"𝔨",\u0138:"ĸ",\u0445:"х",\u045C:"ќ","\u{1D55C}":"𝕜","\u{1D4C0}":"𝓀","\u291B":"⤛","\u290E":"⤎","\u2A8B":"⪋","\u2962":"⥢",\u013A:"ĺ","\u29B4":"⦴",\u03BB:"λ","\u2991":"⦑","\u2A85":"⪅","\xAB":"«","\u291F":"⤟","\u291D":"⤝","\u21AB":"↫","\u2939":"⤹","\u2973":"⥳","\u21A2":"↢","\u2AAB":"⪫","\u2919":"⤙","\u2AAD":"⪭","\u2AAD\uFE00":"⪭︀","\u290C":"⤌","\u2772":"❲","{":"{","[":"[","\u298B":"⦋","\u298F":"⦏","\u298D":"⦍",\u013E:"ľ",\u013C:"ļ",\u043B:"л","\u2936":"⤶","\u2967":"⥧","\u294B":"⥋","\u21B2":"↲","\u2264":"≤","\u21C7":"⇇","\u22CB":"⋋","\u2AA8":"⪨","\u2A7F":"⩿","\u2A81":"⪁","\u2A83":"⪃","\u22DA\uFE00":"⋚︀","\u2A93":"⪓","\u22D6":"⋖","\u297C":"⥼","\u{1D529}":"𝔩","\u2A91":"⪑","\u296A":"⥪","\u2584":"▄",\u0459:"љ","\u296B":"⥫","\u25FA":"◺",\u0140:"ŀ","\u23B0":"⎰","\u2268":"≨","\u2A89":"⪉","\u2A87":"⪇","\u22E6":"⋦","\u27EC":"⟬","\u21FD":"⇽","\u27FC":"⟼","\u21AC":"↬","\u2985":"⦅","\u{1D55D}":"𝕝","\u2A2D":"⨭","\u2A34":"⨴","\u2217":"∗","\u25CA":"◊","(":"(","\u2993":"⦓","\u296D":"⥭","\u200E":"‎","\u22BF":"⊿","\u2039":"‹","\u{1D4C1}":"𝓁","\u2A8D":"⪍","\u2A8F":"⪏","\u201A":"‚",\u0142:"ł","\u2AA6":"⪦","\u2A79":"⩹","\u22C9":"⋉","\u2976":"⥶","\u2A7B":"⩻","\u2996":"⦖","\u25C3":"◃","\u294A":"⥊","\u2966":"⥦","\u2268\uFE00":"≨︀","\u223A":"∺","\xAF":"¯","\u2642":"♂","\u2720":"✠","\u25AE":"▮","\u2A29":"⨩",\u043C:"м","\u2014":"—","\u{1D52A}":"𝔪","\u2127":"℧",\u00B5:"µ","\u2AF0":"⫰","\u2212":"−","\u2A2A":"⨪","\u2ADB":"⫛","\u22A7":"⊧","\u{1D55E}":"𝕞","\u{1D4C2}":"𝓂",\u03BC:"μ","\u22B8":"⊸","\u22D9\u0338":"⋙̸","\u226B\u20D2":"≫⃒","\u21CD":"⇍","\u21CE":"⇎","\u22D8\u0338":"⋘̸","\u226A\u20D2":"≪⃒","\u21CF":"⇏","\u22AF":"⊯","\u22AE":"⊮",\u0144:"ń","\u2220\u20D2":"∠⃒","\u2A70\u0338":"⩰̸","\u224B\u0338":"≋̸",\u0149:"ʼn","\u266E":"♮","\u2A43":"⩃",\u0148:"ň",\u0146:"ņ","\u2A6D\u0338":"⩭̸","\u2A42":"⩂",\u043D:"н","\u2013":"–","\u21D7":"⇗","\u2924":"⤤","\u2250\u0338":"≐̸","\u2928":"⤨","\u{1D52B}":"𝔫","\u21AE":"↮","\u2AF2":"⫲","\u22FC":"⋼","\u22FA":"⋺",\u045A:"њ","\u2266\u0338":"≦̸","\u219A":"↚","\u2025":"‥","\u{1D55F}":"𝕟","\xAC":"¬","\u22F9\u0338":"⋹̸","\u22F5\u0338":"⋵̸","\u22F7":"⋷","\u22F6":"⋶","\u22FE":"⋾","\u22FD":"⋽","\u2AFD\u20E5":"⫽⃥","\u2202\u0338":"∂̸","\u2A14":"⨔","\u219B":"↛","\u2933\u0338":"⤳̸","\u219D\u0338":"↝̸","\u{1D4C3}":"𝓃","\u2284":"⊄","\u2AC5\u0338":"⫅̸","\u2285":"⊅","\u2AC6\u0338":"⫆̸",\u00F1:"ñ",\u03BD:"ν","#":"#","\u2116":"№","\u2007":" ","\u22AD":"⊭","\u2904":"⤄","\u224D\u20D2":"≍⃒","\u22AC":"⊬","\u2265\u20D2":"≥⃒",">\u20D2":">⃒","\u29DE":"⧞","\u2902":"⤂","\u2264\u20D2":"≤⃒","<\u20D2":"<⃒","\u22B4\u20D2":"⊴⃒","\u2903":"⤃","\u22B5\u20D2":"⊵⃒","\u223C\u20D2":"∼⃒","\u21D6":"⇖","\u2923":"⤣","\u2927":"⤧",\u00F3:"ó",\u00F4:"ô",\u043E:"о",\u0151:"ő","\u2A38":"⨸","\u29BC":"⦼",\u0153:"œ","\u29BF":"⦿","\u{1D52C}":"𝔬","\u02DB":"˛",\u00F2:"ò","\u29C1":"⧁","\u29B5":"⦵","\u29BE":"⦾","\u29BB":"⦻","\u29C0":"⧀",\u014D:"ō",\u03C9:"ω",\u03BF:"ο","\u29B6":"⦶","\u{1D560}":"𝕠","\u29B7":"⦷","\u29B9":"⦹","\u2228":"∨","\u2A5D":"⩝",\u2134:"ℴ",\u00AA:"ª",\u00BA:"º","\u22B6":"⊶","\u2A56":"⩖","\u2A57":"⩗","\u2A5B":"⩛",\u00F8:"ø","\u2298":"⊘",\u00F5:"õ","\u2A36":"⨶",\u00F6:"ö","\u233D":"⌽","\xB6":"¶","\u2AF3":"⫳","\u2AFD":"⫽",\u043F:"п","%":"%",".":".","\u2030":"‰","\u2031":"‱","\u{1D52D}":"𝔭",\u03C6:"φ",\u03D5:"ϕ","\u260E":"☎",\u03C0:"π",\u03D6:"ϖ",\u210E:"ℎ","+":"+","\u2A23":"⨣","\u2A22":"⨢","\u2A25":"⨥","\u2A72":"⩲","\u2A26":"⨦","\u2A27":"⨧","\u2A15":"⨕","\u{1D561}":"𝕡","\xA3":"£","\u2AB3":"⪳","\u2AB7":"⪷","\u2AB9":"⪹","\u2AB5":"⪵","\u22E8":"⋨","\u2032":"′","\u232E":"⌮","\u2312":"⌒","\u2313":"⌓","\u22B0":"⊰","\u{1D4C5}":"𝓅",\u03C8:"ψ","\u2008":" ","\u{1D52E}":"𝔮","\u{1D562}":"𝕢","\u2057":"⁗","\u{1D4C6}":"𝓆","\u2A16":"⨖","?":"?","\u291C":"⤜","\u2964":"⥤","\u223D\u0331":"∽̱",\u0155:"ŕ","\u29B3":"⦳","\u2992":"⦒","\u29A5":"⦥","\xBB":"»","\u2975":"⥵","\u2920":"⤠","\u2933":"⤳","\u291E":"⤞","\u2945":"⥅","\u2974":"⥴","\u21A3":"↣","\u219D":"↝","\u291A":"⤚","\u2236":"∶","\u2773":"❳","}":"}","]":"]","\u298C":"⦌","\u298E":"⦎","\u2990":"⦐",\u0159:"ř",\u0157:"ŗ",\u0440:"р","\u2937":"⤷","\u2969":"⥩","\u21B3":"↳","\u25AD":"▭","\u297D":"⥽","\u{1D52F}":"𝔯","\u296C":"⥬",\u03C1:"ρ",\u03F1:"ϱ","\u21C9":"⇉","\u22CC":"⋌","\u02DA":"˚","\u200F":"‏","\u23B1":"⎱","\u2AEE":"⫮","\u27ED":"⟭","\u21FE":"⇾","\u2986":"⦆","\u{1D563}":"𝕣","\u2A2E":"⨮","\u2A35":"⨵",")":")","\u2994":"⦔","\u2A12":"⨒","\u203A":"›","\u{1D4C7}":"𝓇","\u22CA":"⋊","\u25B9":"▹","\u29CE":"⧎","\u2968":"⥨","\u211E":"℞",\u015B:"ś","\u2AB4":"⪴","\u2AB8":"⪸",\u0161:"š",\u015F:"ş",\u015D:"ŝ","\u2AB6":"⪶","\u2ABA":"⪺","\u22E9":"⋩","\u2A13":"⨓",\u0441:"с","\u22C5":"⋅","\u2A66":"⩦","\u21D8":"⇘","\xA7":"§",";":";","\u2929":"⤩","\u2736":"✶","\u{1D530}":"𝔰","\u266F":"♯",\u0449:"щ",\u0448:"ш","\xAD":"­",\u03C3:"σ",\u03C2:"ς","\u2A6A":"⩪","\u2A9E":"⪞","\u2AA0":"⪠","\u2A9D":"⪝","\u2A9F":"⪟","\u2246":"≆","\u2A24":"⨤","\u2972":"⥲","\u2A33":"⨳","\u29E4":"⧤","\u2323":"⌣","\u2AAA":"⪪","\u2AAC":"⪬","\u2AAC\uFE00":"⪬︀",\u044C:"ь","/":"/","\u29C4":"⧄","\u233F":"⌿","\u{1D564}":"𝕤","\u2660":"♠","\u2293\uFE00":"⊓︀","\u2294\uFE00":"⊔︀","\u{1D4C8}":"𝓈","\u2606":"☆","\u2282":"⊂","\u2AC5":"⫅","\u2ABD":"⪽","\u2AC3":"⫃","\u2AC1":"⫁","\u2ACB":"⫋","\u228A":"⊊","\u2ABF":"⪿","\u2979":"⥹","\u2AC7":"⫇","\u2AD5":"⫕","\u2AD3":"⫓","\u266A":"♪","\xB9":"¹","\xB2":"²","\xB3":"³","\u2AC6":"⫆","\u2ABE":"⪾","\u2AD8":"⫘","\u2AC4":"⫄","\u27C9":"⟉","\u2AD7":"⫗","\u297B":"⥻","\u2AC2":"⫂","\u2ACC":"⫌","\u228B":"⊋","\u2AC0":"⫀","\u2AC8":"⫈","\u2AD4":"⫔","\u2AD6":"⫖","\u21D9":"⇙","\u292A":"⤪",\u00DF:"ß","\u2316":"⌖",\u03C4:"τ",\u0165:"ť",\u0163:"ţ",\u0442:"т","\u2315":"⌕","\u{1D531}":"𝔱",\u03B8:"θ",\u03D1:"ϑ",\u00FE:"þ","\xD7":"×","\u2A31":"⨱","\u2A30":"⨰","\u2336":"⌶","\u2AF1":"⫱","\u{1D565}":"𝕥","\u2ADA":"⫚","\u2034":"‴","\u25B5":"▵","\u225C":"≜","\u25EC":"◬","\u2A3A":"⨺","\u2A39":"⨹","\u29CD":"⧍","\u2A3B":"⨻","\u23E2":"⏢","\u{1D4C9}":"𝓉",\u0446:"ц",\u045B:"ћ",\u0167:"ŧ","\u2963":"⥣",\u00FA:"ú",\u045E:"ў",\u016D:"ŭ",\u00FB:"û",\u0443:"у",\u0171:"ű","\u297E":"⥾","\u{1D532}":"𝔲",\u00F9:"ù","\u2580":"▀","\u231C":"⌜","\u230F":"⌏","\u25F8":"◸",\u016B:"ū",\u0173:"ų","\u{1D566}":"𝕦",\u03C5:"υ","\u21C8":"⇈","\u231D":"⌝","\u230E":"⌎",\u016F:"ů","\u25F9":"◹","\u{1D4CA}":"𝓊","\u22F0":"⋰",\u0169:"ũ",\u00FC:"ü","\u29A7":"⦧","\u2AE8":"⫨","\u2AE9":"⫩","\u299C":"⦜","\u228A\uFE00":"⊊︀","\u2ACB\uFE00":"⫋︀","\u228B\uFE00":"⊋︀","\u2ACC\uFE00":"⫌︀",\u0432:"в","\u22BB":"⊻","\u225A":"≚","\u22EE":"⋮","\u{1D533}":"𝔳","\u{1D567}":"𝕧","\u{1D4CB}":"𝓋","\u299A":"⦚",\u0175:"ŵ","\u2A5F":"⩟","\u2259":"≙","\u2118":"℘","\u{1D534}":"𝔴","\u{1D568}":"𝕨","\u{1D4CC}":"𝓌","\u{1D535}":"𝔵",\u03BE:"ξ","\u22FB":"⋻","\u{1D569}":"𝕩","\u{1D4CD}":"𝓍",\u00FD:"ý",\u044F:"я",\u0177:"ŷ",\u044B:"ы","\xA5":"¥","\u{1D536}":"𝔶",\u0457:"ї","\u{1D56A}":"𝕪","\u{1D4CE}":"𝓎",\u044E:"ю",\u00FF:"ÿ",\u017A:"ź",\u017E:"ž",\u0437:"з",\u017C:"ż",\u03B6:"ζ","\u{1D537}":"𝔷",\u0436:"ж","\u21DD":"⇝","\u{1D56B}":"𝕫","\u{1D4CF}":"𝓏","\u200D":"‍","\u200C":"‌"}}}});var Qv=_(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}});var $v=_(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.fromCodePoint=String.fromCodePoint||function(n){return String.fromCharCode(Math.floor((n-65536)/1024)+55296,(n-65536)%1024+56320)};ea.getCodePoint=String.prototype.codePointAt?function(n,e){return n.codePointAt(e)}:function(n,e){return(n.charCodeAt(e)-55296)*1024+n.charCodeAt(e+1)-56320+65536};ea.highSurrogateFrom=55296;ea.highSurrogateTo=56319});var ow=_(jo=>{"use strict";var ta=jo&&jo.__assign||function(){return ta=Object.assign||function(n){for(var e,t=1,i=arguments.length;t'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g},gk={mode:"specialChars",level:"all",numeric:"decimal"};function mk(n,e){var t=e===void 0?gk:e,i=t.mode,r=i===void 0?"specialChars":i,o=t.numeric,s=o===void 0?"decimal":o,a=t.level,c=a===void 0?"all":a;if(!n)return"";var l=pk[r],d=Sp[c].characters,h=s==="hexadecimal";return iw(n,l,(function(u){var p=d[u];if(!p){var f=u.length>1?tw.getCodePoint(u,0):u.charCodeAt(0);p=(h?"&#x"+f.toString(16):"&#"+f)+";"}return p}))}jo.encode=mk;var xk={scope:"body",level:"all"},kp=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,Cp=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,ew={xml:{strict:kp,attribute:Cp,body:Fc.bodyRegExps.xml},html4:{strict:kp,attribute:Cp,body:Fc.bodyRegExps.html4},html5:{strict:kp,attribute:Cp,body:Fc.bodyRegExps.html5}},bk=ta(ta({},ew),{all:ew.html5}),nw=String.fromCharCode,yk=nw(65533),vk={level:"all"};function rw(n,e,t,i){var r=n,o=n[n.length-1];if(t&&o==="=")r=n;else if(i&&o!==";")r=n;else{var s=e[n];if(s)r=s;else if(n[0]==="&"&&n[1]==="#"){var a=n[2],c=a=="x"||a=="X"?parseInt(n.substr(3),16):parseInt(n.substr(2));r=c>=1114111?yk:c>65535?tw.fromCodePoint(c):nw(fk.numericUnicodeMap[c]||c)}}return r}function wk(n,e){var t=(e===void 0?vk:e).level,i=t===void 0?"all":t;return n?rw(n,Sp[i].entities,!1,!1):""}jo.decodeEntity=wk;function Fk(n,e){var t=e===void 0?xk:e,i=t.level,r=i===void 0?"all":i,o=t.scope,s=o===void 0?r==="xml"?"strict":"body":o;if(!n)return"";var a=bk[r][s],c=Sp[r].entities,l=s==="attribute",d=s==="strict";return iw(n,a,(function(h){return rw(h,c,l,d)}))}jo.decode=Fk});var Ap=_(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.isBlock=pt.parse=pt.Matcher=pt.HTMLElement=pt.CommentNode=pt.TextNode=pt.AbstractNode=pt.NodeType=void 0;var ia=ow(),Ri=!1,At;(function(n){n[n.ELEMENT_NODE=1]="ELEMENT_NODE",n[n.TEXT_NODE=3]="TEXT_NODE",n[n.COMMENT_NODE=8]="COMMENT_NODE"})(At||(pt.NodeType=At={}));var Go=class{constructor(){this.childNodes=[]}get text(){return(0,ia.decode)(this.rawText)}remove(){return this.parentNode&&this.parentNode.removeChild(this),this}};pt.AbstractNode=Go;var Ko=class extends Go{constructor(e){super(),this.nodeType=At.TEXT_NODE,this.value=e}get rawText(){return this.value}get isWhitespace(){return/^(\s| )*$/.test(this.rawText)}toString(){return this.rawText}};pt.TextNode=Ko;var $h=class extends Go{constructor(e){super(),this.nodeType=At.COMMENT_NODE,this.value=e}get rawText(){return this.value}toString(){return``}};pt.CommentNode=$h;var Dk={div:!0,p:!0,li:!0,td:!0,section:!0,br:!0};function na(n){return n[n.length-1]}var ra=class n extends Go{constructor(e,t="",i=null){super(),this.tagName=e,this.rawAttrs=t,this.classNames=[],this.nodeType=At.ELEMENT_NODE,this.rawAttrs=t,this.parentNode=i,this.childNodes=[];let r={};for(let o;o=Pk.exec(t);)r[o[2]]=o[4]||o[5]||o[6];r.id&&(this.id=r.id),r.class&&(this.classNames=r.class.split(/\s+/))}removeChild(e){this.childNodes=this.childNodes.filter(t=>t!==e),e instanceof n&&(e.parentNode=null)}exchangeChild(e,t){let i=this.childNodes.findIndex(r=>r===e);i>=0&&(this.childNodes[i]=t,e instanceof n&&(e.parentNode=null))}get rawText(){let e="";for(let t=0;t0&&t.push(e=[]),r.childNodes.forEach(i),e.length>0&&t.push(e=[])):r.childNodes.forEach(i);else if(r.nodeType===At.TEXT_NODE)if(r.isWhitespace)e.prependWhitespace=!0;else{let o=r.text;e.prependWhitespace&&(o=" "+o,e.prependWhitespace=!1),e.push(o)}}return i(this),t.map(function(r){return r.join("").trim().replace(/\s{2,}/g," ")}).join(` +`).replace(/\s+$/,"")}get children(){return this.childNodes.filter(e=>e instanceof n)}toString(){let e=this.tagName;if(e){let t=/^(img|br|hr|area|base|input|doctype|link|meta)$/i.test(e),i=this.rawAttrs?" "+this.rawAttrs:"";return t?`<${e}${i} />`:`<${e}${i}>${this.innerHTML}`}else return this.innerHTML}get innerHTML(){return this.childNodes.map(e=>e.toString()).join("")}set innerHTML(e){let t=Tp(e);this.childNodes.forEach(i=>i.remove()),t.childNodes.forEach(i=>this.appendChild(i))}set_content(e){if(e instanceof Go)e=[e];else if(typeof e=="string"){let t=Tp(e);e=t.childNodes.length?t.childNodes:[new Ko(e)]}this.childNodes=e}get outerHTML(){return this.toString()}trimRight(e){for(let t=0;t-1&&(i.value=i.rawText.substr(0,r),this.childNodes.length=t+1)}}return this}get structure(){let e=[],t=0;function i(o){e.push(" ".repeat(t)+o)}function r(o){let s=o.id?"#"+o.id:"",a=o.classNames.length?"."+o.classNames.join("."):"";i(o.tagName+s+a),t++;for(let c=0;cthis.querySelectorAll(a.trim())).flat());return Array.from(s)}else return this.querySelectorAll(new Wo(e));let t=e,i=new Set,r=[];for(this.childNodes.forEach(o=>r.push(o));r.length>0;){let o=r.shift();o.nodeType===At.ELEMENT_NODE&&(t.advance(o)&&t.matched&&(i.add(o),t.rewind()),o.childNodes.forEach(s=>{r.push(s)}))}return Array.from(i)}querySelector(e){let t;e instanceof Wo?(t=e,t.reset()):t=new Wo(e);let i=[];for(let r=0;rr+(i[r]===""?"":'="'+(0,ia.encode)(i[r])+'"')).join(" ")}removeAttribute(e){this.setAttribute(e,void 0)}setAttributes(e){e.id?this.id=e.id:e.class&&(this.classNames=e.class.split(/\s+/)),this.attributes&&(Object.keys(this.attributes).forEach(t=>delete this.attributes[t]),Object.keys(e).forEach(t=>this.attributes[t]=e[t]+"")),this.rawAttributes&&(Object.keys(this.rawAttributes).forEach(t=>delete this.rawAttributes[t]),Object.keys(e).forEach(t=>this.rawAttributes[t]=(0,ia.encode)(e[t]+""))),this.rawAttrs=Object.keys(e).map(t=>t+(e[t]===""?"":'="'+(0,ia.encode)(e[t]+"")+'"')).join(" ")}};pt.HTMLElement=ra;var Qh={},Ep={f145:function(n,e,t,i,r){"use strict";if(e=e||"",t=t||[],i=i||"",r=r||"",n.id!=e.substr(1))return!1;for(let o=t,s=0;s{if(Qh[t])return Qh[t];let i=t.split("."),r=i[0],o=i.slice(1).sort(),s='"use strict";',a="f",c="",l="";if(r&&r!="*"){let h;if(r[0]=="#")s+="if (el.id != "+JSON.stringify(r.substr(1))+") return false;",a+="1";else if(h=r.match(/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/)){c=h[1];let u=h[2];if(u!=="="&&u!=="!=")throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");u==="="&&(u="=="),l=h[7]||h[8],s+=`let attrs = el.attributes;for (let key in attrs){const val = attrs[key]; if (key == "${c}" && val == "${l}"){return true;}} return false;`,a+="2"}else s+="if (el.tagName != "+JSON.stringify(r)+") return false;",a+="3"}o.length>0&&(s+="for (let cls = "+JSON.stringify(o)+", i = 0; i < cls.length; i++) if (el.classNames.indexOf(cls[i]) === -1) return false;",a+="4"),s+="return true;",a+="5";let d={func:Ep[a],tagName:r||"",classes:o||"",attr_key:c||"",value:l||""};return s=s||"",Qh[t]=d})}advance(e){return this.nextMatch)-->|<(\/?)([a-z][-.:0-9_a-z]*)((\s+[a-z][-.:0-9_a-z]*(\s*=\s*("[^"]*"|'([^']*')|([^\s\/>]+)))?)*)\s*(\/?)>/ig,Pk=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig,kk=/([a-z][-.:0-9_a-z]*)(\s*=\s*("([^"]*)"|'([^']*)'|(\S+)))?/ig,Ck={area:!0,base:!0,br:!0,col:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,source:!0},sw={li:{li:!0},p:{p:!0,div:!0},b:{div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0},h1:{h1:!0},h2:{h2:!0},h3:{h3:!0},h4:{h4:!0},h5:{h5:!0},h6:{h6:!0}},aw={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},Sk={script:!0,noscript:!0,style:!0,pre:!0};function Tp(n,e){let t=new ra(null),i=t,r=[t],o=0;e=e||{};let s;for(;s=Rn.exec(n);){if(Ri&&console.log("match",s[0]),o+s[0].length",c=n.indexOf(a,Rn.lastIndex);if(e[s[2]]){let l;c==-1?l=n.substr(Rn.lastIndex):l=n.substring(Rn.lastIndex,c),l.length>0&&(Ri&&console.log("add text node as child of",s[2]),i.appendChild(new Ko(l)))}c==-1?o=Rn.lastIndex=n.length+1:(o=Rn.lastIndex=c+a.length,s[1]="true")}if(s[1]||s[9]||Ck[s[2]])for(;;)if(i.tagName==s[2]){Ri&&console.log("met the end of",s[2]),r.pop(),i=na(r);break}else{if(aw[i.tagName]&&aw[i.tagName][s[2]]){Ri&&console.log("closing",i.tagName,"due to meeting",s[2]),r.pop(),i=na(r);continue}break}}for(o1;){let a=r.pop(),c=na(r);a.parentNode&&a.parentNode instanceof ra&&a.parentNode.parentNode&&(a.parentNode===c&&a.tagName===c.tagName?(Ri&&console.log(a.tagName,"is probably supposed to close",c.tagName),c.removeChild(a),a.childNodes.forEach(l=>{c.parentNode.appendChild(l)}),r.pop()):(Ri&&console.log("no close tag found for",a.tagName,". Removing"),c.removeChild(a),a.childNodes.forEach(l=>{c.appendChild(l)})))}return t}pt.parse=Tp;var Ek=["html","body","address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","header","hr","li","main","nav","noscript","ol","p","pre","section","tfoot","table","tbody","ul","video","th","td","tr","h1","h2","h3","h4","h5","h6"];function Tk(n){return n.nodeType===At.ELEMENT_NODE&&n.tagName&&Ek.includes(n.tagName.toLowerCase())}pt.isBlock=Tk});var LC={};vf(LC,{default:()=>bf});module.exports=M1(LC);var we=require("obsidian");var Qp={};vf(Qp,{AFRelationship:()=>Hs,AcroButtonFlags:()=>yt,AcroChoiceFlags:()=>me,AcroFieldFlags:()=>Kt,AcroTextFlags:()=>Ne,AnnotationFlags:()=>Ro,AppearanceCharacteristics:()=>Ms,BlendMode:()=>Re,Cache:()=>ht,CharCodes:()=>P,ColorTypes:()=>Tt,CombedTextLayoutError:()=>Oc,CorruptPageTreeError:()=>Es,CustomFontEmbedder:()=>Dr,CustomFontSubsetEmbedder:()=>Wd,Duplex:()=>Vs,EncryptedPDFError:()=>Xo,ExceededMaxLengthError:()=>Lc,FieldAlreadyExistsError:()=>la,FieldExistsAsNonTerminalError:()=>Hp,FileEmbedder:()=>Kd,FillRule:()=>sn,FontkitNotRegisteredError:()=>Sc,ForeignPageError:()=>Ec,ImageAlignment:()=>vi,IndexOutOfBoundsError:()=>kn,InvalidAcroFieldValueError:()=>Cn,InvalidFieldNamePartError:()=>Ic,InvalidMaxLengthError:()=>Mc,InvalidPDFDateStringError:()=>co,InvalidTargetIndexError:()=>Ss,JpegEmbedder:()=>Us,LineCapStyle:()=>fi,LineJoinStyle:()=>Vo,MethodNotImplementedError:()=>Ze,MissingCatalogError:()=>S0,MissingDAEntryError:()=>vl,MissingKeywordError:()=>Tl,MissingOnValueCheckError:()=>Vp,MissingPDFHeaderError:()=>El,MissingPageContentsEmbeddingError:()=>gl,MissingTfOperatorError:()=>wl,MultiSelectValueError:()=>yl,NextByteAssertionError:()=>Fl,NoSuchFieldError:()=>Ac,NonFullScreenPageMode:()=>So,NumberParsingError:()=>Ts,PDFAcroButton:()=>mr,PDFAcroCheckBox:()=>En,PDFAcroChoice:()=>Ns,PDFAcroComboBox:()=>Tn,PDFAcroField:()=>Ls,PDFAcroForm:()=>br,PDFAcroListBox:()=>Ln,PDFAcroNonTerminal:()=>An,PDFAcroPushButton:()=>Bn,PDFAcroRadioButton:()=>On,PDFAcroSignature:()=>xr,PDFAcroTerminal:()=>zt,PDFAcroText:()=>In,PDFAnnotation:()=>Vd,PDFArray:()=>Z,PDFArrayIsNotRectangleError:()=>bl,PDFBool:()=>Li,PDFButton:()=>ki,PDFCatalog:()=>yr,PDFCheckBox:()=>_t,PDFContentStream:()=>en,PDFContext:()=>po,PDFCrossRefSection:()=>mo,PDFCrossRefStream:()=>Ud,PDFDict:()=>W,PDFDocument:()=>We,PDFDropdown:()=>Fi,PDFEmbeddedPage:()=>Hi,PDFField:()=>at,PDFFlateStream:()=>fr,PDFFont:()=>Me,PDFForm:()=>Hn,PDFHeader:()=>$i,PDFHexString:()=>K,PDFImage:()=>yi,PDFInvalidObject:()=>Os,PDFInvalidObjectParsingError:()=>Pl,PDFJavaScript:()=>zn,PDFName:()=>v,PDFNull:()=>He,PDFNumber:()=>G,PDFObject:()=>Se,PDFObjectCopier:()=>Hl,PDFObjectParser:()=>Ks,PDFObjectParsingError:()=>Dl,PDFObjectStream:()=>Is,PDFObjectStreamParser:()=>Yd,PDFOperator:()=>le,PDFOperatorNames:()=>ce,PDFOptionList:()=>Di,PDFPage:()=>Oe,PDFPageEmbedder:()=>Ws,PDFPageLeaf:()=>et,PDFPageTree:()=>vr,PDFParser:()=>sc,PDFParsingError:()=>Oi,PDFRadioGroup:()=>Jt,PDFRawStream:()=>Mi,PDFRef:()=>Y,PDFSecurity:()=>Nh,PDFSignature:()=>zi,PDFStream:()=>Ee,PDFStreamParsingError:()=>kl,PDFStreamWriter:()=>qd,PDFString:()=>J,PDFSvg:()=>pi,PDFTextField:()=>Pi,PDFTrailer:()=>gr,PDFTrailerDict:()=>Nd,PDFWidgetAnnotation:()=>bo,PDFWriter:()=>Bs,PDFXRefStreamParser:()=>_d,PageEmbeddingMismatchedContextError:()=>xl,PageSizes:()=>Yo,ParseSpeeds:()=>Nc,PngEmbedder:()=>js,PrintScaling:()=>To,PrivateConstructorError:()=>Dn,ReadingDirection:()=>Eo,RemovePageFromEmptyDocumentError:()=>Tc,ReparseError:()=>Pn,RichTextFieldReadError:()=>Bc,RotationTypes:()=>Nn,StalledParserError:()=>Sl,StandardFontEmbedder:()=>Fr,StandardFontValues:()=>Rb,StandardFonts:()=>Zo,TextAlignment:()=>Ue,TextRenderingMode:()=>sp,UnbalancedParenthesisError:()=>Cl,UnexpectedFieldTypeError:()=>Vi,UnexpectedObjectTypeError:()=>Qi,UnrecognizedStreamTypeError:()=>ml,UnsupportedEncodingError:()=>pl,ViewerPreferences:()=>_l,addRandomSuffix:()=>R1,adjustDimsForRotation:()=>on,appendBezierCurve:()=>zo,appendQuadraticCurve:()=>Ys,arrayAsString:()=>xn,asNumber:()=>de,asPDFName:()=>Gs,asPDFNumber:()=>$,assertEachIs:()=>dl,assertInteger:()=>C0,assertIs:()=>T,assertIsOneOf:()=>li,assertIsOneOfOrUndefined:()=>xt,assertIsSubset:()=>k0,assertMultiple:()=>hl,assertOrUndefined:()=>H,assertPositive:()=>Fn,assertRange:()=>bt,assertRangeOrUndefined:()=>Vt,backtick:()=>$e,beginMarkedContent:()=>qh,beginText:()=>gc,breakTextIntoLines:()=>Tf,byAscendingId:()=>Bf,byteArrayToHexString:()=>Vf,bytesFor:()=>or,canBeConvertedToUint8Array:()=>Rf,charAtIndex:()=>pd,charFromCode:()=>Mt,charFromHexCode:()=>Cf,charSplit:()=>Ef,cleanText:()=>ir,clip:()=>cc,clipEvenOdd:()=>RP,closePath:()=>Ar,cmyk:()=>Yh,colorString:()=>Dp,colorToComponents:()=>_h,componentsToColor:()=>vt,concatTransformationMatrix:()=>an,copyStringIntoBuffer:()=>Ae,createPDFAcroField:()=>Hd,createPDFAcroFields:()=>Rs,createTypeErrorMsg:()=>jb,createValueErrorMsg:()=>zb,decodeFromBase64:()=>Df,decodeFromBase64DataUri:()=>kf,decodePDFRawStream:()=>Pr,defaultButtonAppearanceProvider:()=>jp,defaultCheckBoxAppearanceProvider:()=>Up,defaultDropdownAppearanceProvider:()=>Kp,defaultOptionListAppearanceProvider:()=>Gp,defaultRadioGroupAppearanceProvider:()=>qp,defaultTextFieldAppearanceProvider:()=>Wp,degrees:()=>te,degreesToRadians:()=>hi,drawButton:()=>nu,drawCheckBox:()=>sa,drawCheckMark:()=>hw,drawEllipse:()=>Pc,drawImage:()=>kc,drawLine:()=>Np,drawLinesOfText:()=>Lp,drawObject:()=>Js,drawOptionList:()=>Rp,drawPage:()=>Mp,drawRadioButton:()=>aa,drawRectangle:()=>Or,drawSvgPath:()=>Cc,drawText:()=>zk,drawTextField:()=>ou,drawTextLines:()=>ru,encodeToBase64:()=>Pf,endMarkedContent:()=>jh,endPath:()=>fc,endText:()=>mc,error:()=>sr,escapeRegExp:()=>Pm,escapedNewlineChars:()=>km,fill:()=>ap,fillAndStroke:()=>cp,fillEvenOdd:()=>lp,findLastMatch:()=>us,getType:()=>Ub,grayscale:()=>Zh,hasSurrogates:()=>Uf,hasUtf16BOM:()=>ja,highSurrogate:()=>gd,isArrayEqual:()=>fs,isNewlineChar:()=>Sf,isStandardFont:()=>Ld,isType:()=>qb,isWithinBMP:()=>zf,last:()=>Qr,layoutCombedText:()=>zp,layoutMultilineText:()=>su,layoutSinglelineText:()=>ca,lineSplit:()=>Va,lineTo:()=>Je,lowSurrogate:()=>md,mergeIntoTypedArray:()=>Af,mergeLines:()=>fd,mergeUint8Arrays:()=>If,moveText:()=>qP,moveTo:()=>Ni,newlineChars:()=>V1,nextLine:()=>dp,normalizeAppearance:()=>Yt,numberToString:()=>qf,padStart:()=>Nt,parseDate:()=>Ha,pdfDocEncodingDecode:()=>ul,pluckIndices:()=>Nf,popGraphicsState:()=>_e,pushGraphicsState:()=>Ye,radians:()=>NP,radiansToDegrees:()=>Pv,range:()=>Mf,rectangle:()=>kv,rectanglesAreEqual:()=>Cs,reduceRotation:()=>ui,restoreDashPattern:()=>HP,reverseArray:()=>nr,rgb:()=>pe,rotateAndSkewTextDegreesAndTranslate:()=>XP,rotateAndSkewTextRadiansAndTranslate:()=>_s,rotateDegrees:()=>Zs,rotateInPlace:()=>mi,rotateRadians:()=>Xs,rotateRectangle:()=>op,scale:()=>Er,setCharacterSpacing:()=>jP,setCharacterSqueeze:()=>KP,setDashPattern:()=>hc,setFillingCmykColor:()=>mp,setFillingColor:()=>ln,setFillingGrayscaleColor:()=>up,setFillingRgbColor:()=>pp,setFontAndSize:()=>Uo,setGraphicsState:()=>Tr,setLineCap:()=>zh,setLineHeight:()=>hp,setLineJoin:()=>zP,setLineWidth:()=>Ho,setStrokingCmykColor:()=>xp,setStrokingColor:()=>qo,setStrokingGrayscaleColor:()=>fp,setStrokingRgbColor:()=>gp,setTextMatrix:()=>Cv,setTextRenderingMode:()=>Uh,setTextRise:()=>GP,setWordSpacing:()=>WP,showText:()=>pc,singleQuote:()=>Hb,sizeInBytes:()=>ps,skewDegrees:()=>VP,skewRadians:()=>dc,sortedUniq:()=>Of,square:()=>UP,stringAsByteArray:()=>hs,stroke:()=>uc,sum:()=>Lf,toCharCode:()=>ae,toCodePoint:()=>ud,toDegrees:()=>rn,toHexString:()=>Gi,toHexStringOfMinLength:()=>Ki,toRadians:()=>ut,toUint8Array:()=>$r,translate:()=>Ut,typedArrayFor:()=>za,utf16Decode:()=>qa,utf16Encode:()=>Hf,utf8Encode:()=>U1,values:()=>ks,waitForTick:()=>Ai});var ds="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ra=new Uint8Array(256);for(let n=0;n{let e="",t=n.length;for(let i=0;i>2],e+=ds[(n[i]&3)<<4|n[i+1]>>4],e+=ds[(n[i+1]&15)<<2|n[i+2]>>6],e+=ds[n[i+2]&63];return t%3===2?e=e.substring(0,e.length-1)+"=":t%3===1&&(e=e.substring(0,e.length-2)+"=="),e},Df=n=>{let e=n.length*.75,t=n.length,i,r=0,o,s,a,c;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);let l=new Uint8Array(e);for(i=0;i>4,l[r++]=(s&15)<<4|a>>2,l[r++]=(a&3)<<6|c&63;return l},N1=/^(data)?:?([\w/+]+)?;?(charset=[\w-]+|base64)?.*,/i,kf=n=>{let e=n.trim(),i=e.substring(0,100).match(N1);if(!i)return Df(e);let[r]=i,o=e.substring(r.length);return Df(o)};var ae=n=>n.charCodeAt(0),ud=n=>n.codePointAt(0),Ki=(n,e)=>Nt(n.toString(16),e,"0").toUpperCase(),Gi=n=>Ki(n,2),Mt=n=>String.fromCharCode(n),Cf=n=>Mt(parseInt(n,16)),Nt=(n,e,t)=>{let i="";for(let r=0,o=e-n.length;r{let e=new Uint8Array(n.length);return Ae(n,e,0),e},Ae=(n,e,t)=>{let i=n.length;for(let r=0;r`${n}-${Math.floor(Math.random()*Math.pow(10,e))}`,Pm=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),ir=n=>n.replace(/\t|\u0085|\u2028|\u2029/g," ").replace(/[\b\v]/g,""),km=["\\n","\\f","\\r","\\u000B"],V1=[` +`,"\f","\r","\v"],Sf=n=>/^[\n\f\r\u000B]$/.test(n),Va=n=>n.split(/[\n\f\r\u000B]/),fd=n=>n.replace(/[\n\f\r\u000B]/g," "),pd=(n,e)=>{let t=n.charCodeAt(e),i,r=e+1,o=1;return t>=55296&&t<=56319&&n.length>r&&(i=n.charCodeAt(r),i>=56320&&i<=57343&&(o=2)),[n.slice(e,e+o),o]},Ef=n=>{let e=[];for(let t=0,i=n.length;t{let e=km.join("|"),t=["$"];for(let r=0,o=n.length;r{let r=H1(e),o=ir(n).match(r),s="",a=0,c=[],l=()=>{s!==""&&c.push(s),s="",a=0};for(let d=0,h=o.length;dt&&l(),s+=u,a+=p}}return l(),c},z1=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,Ha=n=>{let e=n.match(z1);if(!e)return;let[,t,i="01",r="01",o="00",s="00",a="00",c="Z",l="00",d="00"]=e,h=c==="Z"?"Z":`${c}${l}:${d}`;return new Date(`${t}-${i}-${r}T${o}:${s}:${a}${h}`)},us=(n,e)=>{var t;let i=0,r;for(;in[n.length-1],za=n=>{if(n instanceof Uint8Array)return n;let e=n.length,t=new Uint8Array(e);for(let i=0;i{let e=n.length,t=[];for(let s=0;s{let e=0;for(let r=0,o=n.length;r{let e="";for(let t=0,i=n.length;tn.id-e.id,Of=(n,e)=>{let t=[];for(let i=0,r=n.length;i{if(n.length!==e.length)return!1;for(let t=0,i=n.length;t{let e=n.length;for(let t=0,i=Math.floor(e/2);t{let e=0;for(let t=0,i=n.length;t{let t=new Array(e-n);for(let i=0,r=t.length;i{let t=new Array(e.length);for(let i=0,r=e.length;in instanceof Uint8Array||n instanceof ArrayBuffer||typeof n=="string",$r=n=>{if(typeof n=="string")return kf(n);if(n instanceof ArrayBuffer)return new Uint8Array(n);if(n instanceof Uint8Array)return n;throw new TypeError("`input` must be one of `string | ArrayBuffer | Uint8Array`")},Cm=[];for(let n=0;n<=255;++n)Cm[n]=n.toString(16).padStart(2,"0");var Vf=n=>{let e=new Array(n.length);for(let t=0;tnew Promise(n=>{setTimeout(()=>n(),0)});var U1=(n,e=!0)=>{let t=[];e&&t.push(239,187,191);for(let i=0,r=n.length;i>6&31|192,a=o&63|128;t.push(s,a),i+=1}else if(o<65536){let s=o>>12&15|224,a=o>>6&63|128,c=o&63|128;t.push(s,a,c),i+=1}else if(o<1114112){let s=o>>18&7|240,a=o>>12&63|128,c=o>>6&63|128,l=o>>0&63|128;t.push(s,a,c,l),i+=2}else throw new Error(`Invalid code point: 0x${Gi(o)}`)}return new Uint8Array(t)},Hf=(n,e=!0)=>{let t=[];e&&t.push(65279);for(let i=0,r=n.length;in>=0&&n<=65535,Uf=n=>n>=65536&&n<=1114111,gd=n=>Math.floor((n-65536)/1024)+55296,md=n=>(n-65536)%1024+56320,rr;(function(n){n.BigEndian="BigEndian",n.LittleEndian="LittleEndian"})(rr||(rr={}));var Ua="\uFFFD".codePointAt(0),qa=(n,e=!0)=>{if(n.length<=1)return String.fromCodePoint(Ua);let t=e?j1(n):rr.BigEndian,i=e?2:0,r=[];for(;n.length-i>=2;){let o=Em(n[i++],n[i++],t);if(q1(o))if(n.length-i<2)r.push(Ua);else{let s=Em(n[i++],n[i++],t);Sm(s)?r.push(o,s):r.push(Ua)}else Sm(o)?(i+=2,r.push(Ua)):r.push(o)}return in>=55296&&n<=56319,Sm=n=>n>=56320&&n<=57343,Em=(n,e,t)=>{if(t===rr.LittleEndian)return e<<8|n;if(t===rr.BigEndian)return n<<8|e;throw new Error(`Invalid byteOrder: ${t}`)},j1=n=>Tm(n)?rr.BigEndian:Am(n)?rr.LittleEndian:rr.BigEndian,Tm=n=>n[0]===254&&n[1]===255,Am=n=>n[0]===255&&n[1]===254,ja=n=>Tm(n)||Am(n);var qf=n=>{let e=String(n);if(Math.abs(n)<1){let t=parseInt(n.toString().split("e-")[1]);if(t){let i=n<0;i&&(n*=-1),n*=Math.pow(10,t-1),e="0."+new Array(t).join("0")+n.toString().substring(2),i&&(e="-"+e)}}else{let t=parseInt(n.toString().split("+")[1]);t>20&&(t-=20,n/=Math.pow(10,t),e=n.toString()+new Array(t+1).join("0"))}return e},ps=n=>Math.ceil(n.toString(2).length/8),or=n=>{let e=new Uint8Array(ps(n));for(let t=1;t<=e.length;t++)e[t-1]=n>>(e.length-t)*8;return e};var sr=n=>{throw new Error(n)};var bb=Wi(sl()),xb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ll=new Uint8Array(256);for(al=0;al>4,l[r++]=(s&15)<<4|a>>2,l[r++]=(a&3)<<6|c&63;return l},RD=function(n){for(var e="",t=0;tObject.keys(n).map(e=>n[e]),Rb=ks(lo),Ld=n=>Rb.includes(n),Cs=(n,e)=>n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height;var $e=n=>`\`${n}\``,Hb=n=>`'${n}'`,Vb=n=>{let e=typeof n;return e==="string"?Hb(n):e==="undefined"?$e(n):n},zb=(n,e,t)=>{let i=new Array(t.length);for(let o=0,s=t.length;o{Array.isArray(t)||(t=ks(t));for(let i=0,r=t.length;i{Array.isArray(t)||(t=ks(t)),li(n,e,t.concat(void 0))},k0=(n,e,t)=>{Array.isArray(t)||(t=ks(t));for(let i=0,r=n.length;in===null?"null":n===void 0?"undefined":typeof n=="string"?"string":isNaN(n)?"NaN":typeof n=="number"?"number":typeof n=="boolean"?"boolean":typeof n=="symbol"?"symbol":typeof n=="bigint"?"bigint":n.constructor&&n.constructor.name?n.constructor.name:n.name?n.name:n.constructor?String(n.constructor):String(n),qb=(n,e)=>e==="null"?n===null:e==="undefined"?n===void 0:e==="string"?typeof n=="string":e==="number"?typeof n=="number"&&!isNaN(n):e==="boolean"?typeof n=="boolean":e==="symbol"?typeof n=="symbol":e==="bigint"?typeof n=="bigint":e===Date?n instanceof Date:e===Array?n instanceof Array:e===Uint8Array?n instanceof Uint8Array:e===ArrayBuffer?n instanceof ArrayBuffer:e===Function?n instanceof Function:n instanceof e[0],jb=(n,e,t)=>{let i=new Array(t.length);for(let o=0,s=t.length;o{for(let i=0,r=t.length;i{T(n,e,t.concat("undefined"))},dl=(n,e,t)=>{for(let i=0,r=n.length;i{if(T(n,e,["number"]),T(t,"min",["number"]),T(i,"max",["number"]),i=Math.max(t,i),ni)throw new Error(`${$e(e)} must be at least ${t} and at most ${i}, but was actually ${n}`)},Vt=(n,e,t,i)=>{T(n,e,["number","undefined"]),typeof n=="number"&&bt(n,e,t,i)},hl=(n,e,t)=>{if(T(n,e,["number"]),n%t!==0)throw new Error(`${$e(e)} must be a multiple of ${t}, but was actually ${n}`)},C0=(n,e)=>{if(!Number.isInteger(n))throw new Error(`${$e(e)} must be an integer, but was actually ${n}`)},Fn=(n,e)=>{if(![1,0].includes(Math.sign(n)))throw new Error(`${$e(e)} must be a positive number or 0, but was actually ${n}`)};var ue=new Uint16Array(256);for(let n=0;n<256;n++)ue[n]=n;ue[22]=ae("");ue[24]=ae("\u02D8");ue[25]=ae("\u02C7");ue[26]=ae("\u02C6");ue[27]=ae("\u02D9");ue[28]=ae("\u02DD");ue[29]=ae("\u02DB");ue[30]=ae("\u02DA");ue[31]=ae("\u02DC");ue[127]=ae("\uFFFD");ue[128]=ae("\u2022");ue[129]=ae("\u2020");ue[130]=ae("\u2021");ue[131]=ae("\u2026");ue[132]=ae("\u2014");ue[133]=ae("\u2013");ue[134]=ae("\u0192");ue[135]=ae("\u2044");ue[136]=ae("\u2039");ue[137]=ae("\u203A");ue[138]=ae("\u2212");ue[139]=ae("\u2030");ue[140]=ae("\u201E");ue[141]=ae("\u201C");ue[142]=ae("\u201D");ue[143]=ae("\u2018");ue[144]=ae("\u2019");ue[145]=ae("\u201A");ue[146]=ae("\u2122");ue[147]=ae("\uFB01");ue[148]=ae("\uFB02");ue[149]=ae("\u0141");ue[150]=ae("\u0152");ue[151]=ae("\u0160");ue[152]=ae("\u0178");ue[153]=ae("\u017D");ue[154]=ae("\u0131");ue[155]=ae("\u0142");ue[156]=ae("\u0153");ue[157]=ae("\u0161");ue[158]=ae("\u017E");ue[159]=ae("\uFFFD");ue[160]=ae("\u20AC");ue[173]=ae("\uFFFD");var ul=n=>{let e=new Array(n.length);for(let t=0,i=n.length;tnew fl(n);var ht=fl;var Ze=class extends Error{constructor(e,t){let i=`Method ${e}.${t}() not implemented`;super(i)}},Dn=class extends Error{constructor(e){let t=`Cannot construct ${e} - it has a private constructor`;super(t)}},Qi=class extends Error{constructor(e,t){let i=s=>{var a,c;return(a=s==null?void 0:s.name)!==null&&a!==void 0?a:(c=s==null?void 0:s.constructor)===null||c===void 0?void 0:c.name},o=`Expected instance of ${(Array.isArray(e)?e.map(i):[i(e)]).join(" or ")}, but got instance of ${t&&i(t)}`;super(o)}},pl=class extends Error{constructor(e){let t=`${e} stream encoding not supported`;super(t)}},Pn=class extends Error{constructor(e,t){let i=`Cannot call ${e}.${t}() more than once`;super(i)}},S0=class extends Error{constructor(e){let t=`Missing catalog (ref=${e})`;super(t)}},gl=class extends Error{constructor(){super("Can't embed page with missing Contents")}},ml=class extends Error{constructor(e){var t,i,r;let s=`Unrecognized stream type: ${(r=(i=(t=e==null?void 0:e.contructor)===null||t===void 0?void 0:t.name)!==null&&i!==void 0?i:e==null?void 0:e.name)!==null&&r!==void 0?r:e}`;super(s)}},xl=class extends Error{constructor(){super("Found mismatched contexts while embedding pages. All pages in the array passed to `PDFDocument.embedPages()` must be from the same document.")}},bl=class extends Error{constructor(e){let t=`Attempted to convert PDFArray with ${e} elements to rectangle, but must have exactly 4 elements.`;super(t)}},co=class extends Error{constructor(e){let t=`Attempted to convert "${e}" to a date, but it does not match the PDF date string format.`;super(t)}},Ss=class extends Error{constructor(e,t){let i=`Invalid targetIndex specified: targetIndex=${e} must be less than Count=${t}`;super(i)}},Es=class extends Error{constructor(e,t){let i=`Failed to ${t} at targetIndex=${e} due to corrupt page tree: It is likely that one or more 'Count' entries are invalid`;super(i)}},kn=class extends Error{constructor(e,t,i){let r=`index should be at least ${t} and at most ${i}, but was actually ${e}`;super(r)}},Cn=class extends Error{constructor(){super("Attempted to set invalid field value")}},yl=class extends Error{constructor(){super("Attempted to select multiple values for single-select field")}},vl=class extends Error{constructor(e){let t=`No /DA (default appearance) entry found for field: ${e}`;super(t)}},wl=class extends Error{constructor(e){let t=`No Tf operator found for DA of field: ${e}`;super(t)}},Ts=class extends Error{constructor(e,t){let i=`Failed to parse number (line:${e.line} col:${e.column} offset=${e.offset}): "${t}"`;super(i)}},Oi=class extends Error{constructor(e,t){let i=`Failed to parse PDF document (line:${e.line} col:${e.column} offset=${e.offset}): ${t}`;super(i)}},Fl=class extends Oi{constructor(e,t,i){let r=`Expected next byte to be ${t} but it was actually ${i}`;super(e,r)}},Dl=class extends Oi{constructor(e,t){let i=`Failed to parse PDF object starting with the following byte: ${t}`;super(e,i)}},Pl=class extends Oi{constructor(e){super(e,"Failed to parse invalid PDF object")}},kl=class extends Oi{constructor(e){super(e,"Failed to parse PDF stream")}},Cl=class extends Oi{constructor(e){super(e,"Failed to parse PDF literal string due to unbalanced parenthesis")}},Sl=class extends Oi{constructor(e){super(e,"Parser stalled")}},El=class extends Oi{constructor(e){super(e,"No PDF header found")}},Tl=class extends Oi{constructor(e,t){let i=`Did not find expected keyword '${xn(t)}'`;super(e,i)}};var E0;(function(n){n[n.Null=0]="Null",n[n.Backspace=8]="Backspace",n[n.Tab=9]="Tab",n[n.Newline=10]="Newline",n[n.FormFeed=12]="FormFeed",n[n.CarriageReturn=13]="CarriageReturn",n[n.Space=32]="Space",n[n.ExclamationPoint=33]="ExclamationPoint",n[n.Hash=35]="Hash",n[n.Percent=37]="Percent",n[n.LeftParen=40]="LeftParen",n[n.RightParen=41]="RightParen",n[n.Plus=43]="Plus",n[n.Minus=45]="Minus",n[n.Dash=45]="Dash",n[n.Period=46]="Period",n[n.ForwardSlash=47]="ForwardSlash",n[n.Zero=48]="Zero",n[n.One=49]="One",n[n.Two=50]="Two",n[n.Three=51]="Three",n[n.Four=52]="Four",n[n.Five=53]="Five",n[n.Six=54]="Six",n[n.Seven=55]="Seven",n[n.Eight=56]="Eight",n[n.Nine=57]="Nine",n[n.LessThan=60]="LessThan",n[n.GreaterThan=62]="GreaterThan",n[n.A=65]="A",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.O=79]="O",n[n.P=80]="P",n[n.R=82]="R",n[n.LeftSquareBracket=91]="LeftSquareBracket",n[n.BackSlash=92]="BackSlash",n[n.RightSquareBracket=93]="RightSquareBracket",n[n.a=97]="a",n[n.b=98]="b",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.i=105]="i",n[n.j=106]="j",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.x=120]="x",n[n.LeftCurly=123]="LeftCurly",n[n.RightCurly=125]="RightCurly",n[n.Tilde=126]="Tilde"})(E0||(E0={}));var P=E0;var Yb=Wi(sl(),1);var Al=class{constructor(e,t){this.major=String(e),this.minor=String(t)}getVersionString(){return`${this.major}.${this.minor}`}toString(){let e=Mt(129);return`%PDF-${this.major}.${this.minor} +%${e}${e}${e}${e}`}sizeInBytes(){return 12+this.major.length+this.minor.length}copyBytesInto(e,t){let i=t;return e[t++]=P.Percent,e[t++]=P.P,e[t++]=P.D,e[t++]=P.F,e[t++]=P.Dash,t+=Ae(this.major,e,t),e[t++]=P.Period,t+=Ae(this.minor,e,t),e[t++]=P.Newline,e[t++]=P.Percent,e[t++]=129,e[t++]=129,e[t++]=129,e[t++]=129,t-i}};Al.forVersion=(n,e)=>new Al(n,e);var $i=Al;var T0=class{clone(e){throw new Ze(this.constructor.name,"clone")}toString(){throw new Ze(this.constructor.name,"toString")}sizeInBytes(){throw new Ze(this.constructor.name,"sizeInBytes")}copyBytesInto(e,t){throw new Ze(this.constructor.name,"copyBytesInto")}},Se=T0;var Il=class n extends Se{constructor(e){super(),this.numberValue=e,this.stringValue=qf(e)}asNumber(){return this.numberValue}value(){return this.numberValue}clone(){return n.of(this.numberValue)}toString(){return this.stringValue}sizeInBytes(){return this.stringValue.length}copyBytesInto(e,t){return Ae(this.stringValue,e,t),this.stringValue.length}};Il.of=n=>new Il(n);var G=Il;var Bl=class n extends Se{constructor(e){super(),this.array=[],this.context=e}size(){return this.array.length}push(e){this.array.push(e)}insert(e,t){this.array.splice(e,0,t)}indexOf(e){let t=this.array.indexOf(e);return t===-1?void 0:t}remove(e){this.array.splice(e,1)}set(e,t){this.array[e]=t}get(e){return this.array[e]}lookupMaybe(e,...t){return this.context.lookupMaybe(this.get(e),...t)}lookup(e,...t){return this.context.lookup(this.get(e),...t)}asRectangle(){if(this.size()!==4)throw new bl(this.size());let e=this.lookup(0,G).asNumber(),t=this.lookup(1,G).asNumber(),i=this.lookup(2,G).asNumber(),r=this.lookup(3,G).asNumber(),o=Math.min(e,i),s=Math.min(t,r),a=Math.abs(e-i),c=Math.abs(t-r);return{x:o,y:s,width:a,height:c}}asArray(){return this.array.slice()}clone(e){let t=n.withContext(e||this.context);for(let i=0,r=this.size();inew Bl(n);var Z=Bl;var A0={},ho=class extends Se{constructor(e,t){if(e!==A0)throw new Dn("PDFBool");super(),this.value=t}asBoolean(){return this.value}clone(){return this}toString(){return String(this.value)}sizeInBytes(){return this.value?4:5}copyBytesInto(e,t){return this.value?(e[t++]=P.t,e[t++]=P.r,e[t++]=P.u,e[t++]=P.e,4):(e[t++]=P.f,e[t++]=P.a,e[t++]=P.l,e[t++]=P.s,e[t++]=P.e,5)}};ho.True=new ho(A0,!0);ho.False=new ho(A0,!1);var Li=ho;var Ht=new Uint8Array(256);Ht[P.LeftParen]=1;Ht[P.RightParen]=1;Ht[P.LessThan]=1;Ht[P.GreaterThan]=1;Ht[P.LeftSquareBracket]=1;Ht[P.RightSquareBracket]=1;Ht[P.LeftCurly]=1;Ht[P.RightCurly]=1;Ht[P.ForwardSlash]=1;Ht[P.Percent]=1;var ci=new Uint8Array(256);ci[P.Null]=1;ci[P.Tab]=1;ci[P.Newline]=1;ci[P.FormFeed]=1;ci[P.CarriageReturn]=1;ci[P.Space]=1;var Md=new Uint8Array(256);for(let n=0,e=256;nn.replace(/#([\dABCDEF]{2})/g,(e,t)=>Cf(t)),iP=n=>n>=P.ExclamationPoint&&n<=P.Tilde&&!Md[n],Kb={},Wb=new Map,oe=class extends Se{constructor(e,t){if(e!==Kb)throw new Dn("PDFName");super();let i="/";for(let r=0,o=t.length;r{o!==void 0&&e.push(o),i=!1};for(let o=1,s=this.encodedName.length;o=P.Zero&&c<=P.Nine||c>=P.a&&c<=P.f||c>=P.A&&c<=P.F?(t+=a,(t.length===2||!(l>="0"&&l<="9"||l>="a"&&l<="f"||l>="A"&&l<="F"))&&(r(parseInt(t,16)),t="")):r(c):c===P.Hash?i=!0:r(c)}return new Uint8Array(e)}decodeText(){let e=this.asBytes();return String.fromCharCode(...Array.from(e))}asString(){return this.encodedName}value(){return this.encodedName}clone(){return this}toString(){return this.encodedName}sizeInBytes(){return this.encodedName.length}copyBytesInto(e,t){return Ae(this.encodedName,e,t),this.encodedName.length}};oe.of=n=>{let e=tP(n),t=Wb.get(e);return t||(t=new oe(Kb,e),Wb.set(e,t)),t};oe.Length=oe.of("Length");oe.FlateDecode=oe.of("FlateDecode");oe.Resources=oe.of("Resources");oe.Font=oe.of("Font");oe.XObject=oe.of("XObject");oe.ExtGState=oe.of("ExtGState");oe.Contents=oe.of("Contents");oe.Type=oe.of("Type");oe.Parent=oe.of("Parent");oe.MediaBox=oe.of("MediaBox");oe.Page=oe.of("Page");oe.Annots=oe.of("Annots");oe.TrimBox=oe.of("TrimBox");oe.ArtBox=oe.of("ArtBox");oe.BleedBox=oe.of("BleedBox");oe.CropBox=oe.of("CropBox");oe.Rotate=oe.of("Rotate");oe.Title=oe.of("Title");oe.Author=oe.of("Author");oe.Subject=oe.of("Subject");oe.Creator=oe.of("Creator");oe.Keywords=oe.of("Keywords");oe.Producer=oe.of("Producer");oe.CreationDate=oe.of("CreationDate");oe.ModDate=oe.of("ModDate");var v=oe;var I0=class extends Se{asNull(){return null}clone(){return this}toString(){return"null"}sizeInBytes(){return 4}copyBytesInto(e,t){return e[t++]=P.n,e[t++]=P.u,e[t++]=P.l,e[t++]=P.l,4}},He=new I0;var uo=class n extends Se{constructor(e,t){super(),this.suppressEncryption=!1,this.dict=e,this.context=t}keys(){return Array.from(this.dict.keys())}values(){return Array.from(this.dict.values())}entries(){return Array.from(this.dict.entries())}set(e,t){this.dict.set(e,t)}get(e,t=!1){let i=this.dict.get(e);if(!(i===He&&!t))return i}has(e){let t=this.dict.get(e);return t!==void 0&&t!==He}lookupMaybe(e,...t){let i=t.includes(He),r=this.context.lookupMaybe(this.get(e,i),...t);if(!(r===He&&!i))return r}lookup(e,...t){let i=t.includes(He),r=this.context.lookup(this.get(e,i),...t);if(!(r===He&&!i))return r}delete(e){return this.dict.delete(e)}asMap(){return new Map(this.dict)}uniqueKey(e=""){let t=this.keys(),i=v.of(this.context.addRandomSuffix(e,10));for(;t.includes(i);)i=v.of(this.context.addRandomSuffix(e,10));return i}clone(e){let t=n.withContext(e||this.context),i=this.entries();for(let r=0,o=i.length;rnew uo(new Map,n);uo.fromMapWithContext=(n,e)=>new uo(n,e);var W=uo;var Sn=class n extends Se{constructor(e){super(),this.value=e}asBytes(){let e=this.value+(this.value.length%2===1?"0":""),t=e.length,i=new Uint8Array(e.length/2),r=0,o=0;for(;r`}sizeInBytes(){return this.value.length+2}copyBytesInto(e,t){return e[t++]=P.LessThan,t+=Ae(this.value,e,t),e[t++]=P.GreaterThan,this.value.length+2}};Sn.of=n=>new Sn(n);Sn.fromText=n=>{let e=Hf(n),t="";for(let i=0,r=e.length;iSn.of(Vf(n));var K=Sn;var B0=class extends Se{constructor(e){super(),this.dict=e}clone(e){throw new Ze(this.constructor.name,"clone")}getContentsString(){throw new Ze(this.constructor.name,"getContentsString")}getContents(){throw new Ze(this.constructor.name,"getContents")}getContentsSize(){throw new Ze(this.constructor.name,"getContentsSize")}updateContents(e){throw new Ze(this.constructor.name,"updateContents")}updateDict(){let e=this.getContentsSize();this.dict.set(v.Length,G.of(e))}sizeInBytes(){return this.updateDict(),this.dict.sizeInBytes()+this.getContentsSize()+18}toString(){this.updateDict();let e=this.dict.toString();return e+=` +stream +`,e+=this.getContentsString(),e+=` +endstream`,e}copyBytesInto(e,t){this.updateDict();let i=t;t+=this.dict.copyBytesInto(e,t),e[t++]=P.Newline,e[t++]=P.s,e[t++]=P.t,e[t++]=P.r,e[t++]=P.e,e[t++]=P.a,e[t++]=P.m,e[t++]=P.Newline;let r=this.getContents();for(let o=0,s=r.length;onew Ol(n,e,t);var Mi=Ol;var Xb={},Gb=new Map,Ll=class extends Se{constructor(e,t,i){if(e!==Xb)throw new Dn("PDFRef");super(),this.objectNumber=t,this.generationNumber=i,this.tag=`${t} ${i} R`}clone(){return this}toString(){return this.tag}sizeInBytes(){return this.tag.length}copyBytesInto(e,t){return Ae(this.tag,e,t),this.tag.length}};Ll.of=(n,e=0)=>{let t=`${n} ${e} R`,i=Gb.get(t);return i||(i=new Ll(Xb,n,e),Gb.set(t,i)),i};var Y=Ll;var fo=class n extends Se{constructor(e){super(),this.value=e}asBytes(){let e=[],t="",i=!1,r=o=>{o!==void 0&&e.push(o),i=!1};for(let o=0,s=this.value.length;o=P.Zero&&c<=P.Seven?(t+=a,(t.length===3||!(l>="0"&&l<="7"))&&(r(parseInt(t,8)),t="")):r(c):c===P.BackSlash?i=!0:r(c)}return new Uint8Array(e)}decodeText(){let e=this.asBytes();return ja(e)?qa(e):ul(e)}decodeDate(){let e=this.decodeText(),t=Ha(e);if(!t)throw new co(e);return t}asString(){return this.value}clone(){return n.of(this.value)}toString(){return`(${this.value})`}sizeInBytes(){return this.value.length+2}copyBytesInto(e,t){return e[t++]=P.LeftParen,t+=Ae(this.value,e,t),e[t++]=P.RightParen,this.value.length+2}};fo.of=n=>new fo(n);fo.fromDate=n=>{let e=Nt(String(n.getUTCFullYear()),4,"0"),t=Nt(String(n.getUTCMonth()+1),2,"0"),i=Nt(String(n.getUTCDate()),2,"0"),r=Nt(String(n.getUTCHours()),2,"0"),o=Nt(String(n.getUTCMinutes()),2,"0"),s=Nt(String(n.getUTCSeconds()),2,"0");return new fo(`D:${e}${t}${i}${r}${o}${s}Z`)};var J=fo;var Ml=class n{constructor(e,t){this.name=e,this.args=t||[]}clone(e){let t=new Array(this.args.length);for(let i=0,r=t.length;inew Ml(n,e);var le=Ml;var O0;(function(n){n.NonStrokingColor="sc",n.NonStrokingColorN="scn",n.NonStrokingColorRgb="rg",n.NonStrokingColorGray="g",n.NonStrokingColorCmyk="k",n.NonStrokingColorspace="cs",n.StrokingColor="SC",n.StrokingColorN="SCN",n.StrokingColorRgb="RG",n.StrokingColorGray="G",n.StrokingColorCmyk="K",n.StrokingColorspace="CS",n.BeginMarkedContentSequence="BDC",n.BeginMarkedContent="BMC",n.EndMarkedContent="EMC",n.MarkedContentPointWithProps="DP",n.MarkedContentPoint="MP",n.DrawObject="Do",n.ConcatTransformationMatrix="cm",n.PopGraphicsState="Q",n.PushGraphicsState="q",n.SetFlatness="i",n.SetGraphicsStateParams="gs",n.SetLineCapStyle="J",n.SetLineDashPattern="d",n.SetLineJoinStyle="j",n.SetLineMiterLimit="M",n.SetLineWidth="w",n.SetTextMatrix="Tm",n.SetRenderingIntent="ri",n.AppendRectangle="re",n.BeginInlineImage="BI",n.BeginInlineImageData="ID",n.EndInlineImage="EI",n.ClipEvenOdd="W*",n.ClipNonZero="W",n.CloseAndStroke="s",n.CloseFillEvenOddAndStroke="b*",n.CloseFillNonZeroAndStroke="b",n.ClosePath="h",n.AppendBezierCurve="c",n.CurveToReplicateFinalPoint="y",n.CurveToReplicateInitialPoint="v",n.EndPath="n",n.FillEvenOddAndStroke="B*",n.FillEvenOdd="f*",n.FillNonZeroAndStroke="B",n.FillNonZero="f",n.LegacyFillNonZero="F",n.LineTo="l",n.MoveTo="m",n.ShadingFill="sh",n.StrokePath="S",n.BeginText="BT",n.EndText="ET",n.MoveText="Td",n.MoveTextSetLeading="TD",n.NextLine="T*",n.SetCharacterSpacing="Tc",n.SetFontAndSize="Tf",n.SetTextHorizontalScaling="Tz",n.SetTextLineHeight="TL",n.SetTextRenderingMode="Tr",n.SetTextRise="Ts",n.SetWordSpacing="Tw",n.ShowText="Tj",n.ShowTextAdjusted="TJ",n.ShowTextLine="'",n.ShowTextLineAndSpace='"',n.Type3D0="d0",n.Type3D1="d1",n.BeginCompatibilitySection="BX",n.EndCompatibilitySection="EX"})(O0||(O0={}));var ce=O0;var Zb=Wi(sl(),1);var L0=class extends Ee{constructor(e,t){super(e),this.computeContents=()=>{let i=this.getUnencodedContents();return this.encode?Zb.default.deflate(i):i},this.encode=t,t&&e.set(v.of("Filter"),v.of("FlateDecode")),this.contentsCache=ht.populatedBy(this.computeContents)}getContents(){return this.contentsCache.access()}getContentsSize(){return this.contentsCache.access().length}getUnencodedContents(){throw new Ze(this.constructor.name,"getUnencodedContents")}updateContents(e){this.contentsCache=ht.populatedBy(()=>e)}},fr=L0;var Nl=class n extends fr{constructor(e,t,i=!0){super(e,i),this.operators=t}push(...e){this.operators.push(...e)}clone(e){let t=new Array(this.operators.length);for(let o=0,s=this.operators.length;onew Nl(n,e,t);var en=Nl;var As=class{constructor(e){this.seed=e}nextInt(){let e=Math.sin(this.seed++)*1e4;return e-Math.floor(e)}};As.withSeed=n=>new As(n);var nP=([n],[e])=>n.objectNumber-e.objectNumber,Rl=class{constructor(){this.isDecrypted=!0,this.largestObjectNumber=0,this.header=$i.forVersion(1,7),this.trailerInfo={},this.indirectObjects=new Map,this.rng=As.withSeed(1)}assign(e,t){this.indirectObjects.set(e,t),e.objectNumber>this.largestObjectNumber&&(this.largestObjectNumber=e.objectNumber)}nextRef(){return this.largestObjectNumber+=1,Y.of(this.largestObjectNumber)}register(e){let t=this.nextRef();return this.assign(t,e),t}delete(e){return this.indirectObjects.delete(e)}lookupMaybe(e,...t){let i=t.includes(He),r=e instanceof Y?this.indirectObjects.get(e):e;if(!(!r||r===He&&!i)){for(let o=0,s=t.length;othis.getLiteral(c,s)):a}else{if(e instanceof Li)return e.asBoolean();if(e instanceof W){let a={},c=e.entries();for(let l=0,d=c.length;lnew Rl;var po=Rl;var pr=class n extends W{constructor(e,t,i=!0){super(e,t),this.normalized=!1,this.autoNormalizeCTM=i}clone(e){let t=n.fromMapWithContext(new Map,e||this.context,this.autoNormalizeCTM),i=this.entries();for(let r=0,o=i.length;r{t||(t=i.get(e))}),t}setParent(e){this.set(v.Parent,e)}addContentStream(e){let t=this.normalizedEntries().Contents||this.context.obj([]);this.set(v.Contents,t),t.push(e)}wrapContentStreams(e,t){let i=this.Contents();return i instanceof Z?(i.insert(0,e),i.push(t),!0):!1}addAnnot(e){let{Annots:t}=this.normalizedEntries();t.push(e)}removeAnnot(e){let{Annots:t}=this.normalizedEntries(),i=t.indexOf(e);i!==void 0&&t.remove(i)}setFontDictionary(e,t){let{Font:i}=this.normalizedEntries();i.set(e,t)}newFontDictionaryKey(e){let{Font:t}=this.normalizedEntries();return t.uniqueKey(e)}newFontDictionary(e,t){let i=this.newFontDictionaryKey(e);return this.setFontDictionary(i,t),i}setXObject(e,t){let{XObject:i}=this.normalizedEntries();i.set(e,t)}newXObjectKey(e){let{XObject:t}=this.normalizedEntries();return t.uniqueKey(e)}newXObject(e,t){let i=this.newXObjectKey(e);return this.setXObject(i,t),i}setExtGState(e,t){let{ExtGState:i}=this.normalizedEntries();i.set(e,t)}newExtGStateKey(e){let{ExtGState:t}=this.normalizedEntries();return t.uniqueKey(e)}newExtGState(e,t){let i=this.newExtGStateKey(e);return this.setExtGState(i,t),i}ascend(e){e(this);let t=this.Parent();t&&t.ascend(e)}normalize(){if(this.normalized)return;let{context:e}=this,t=this.get(v.Contents);this.context.lookup(t)instanceof Ee&&this.set(v.Contents,e.obj([t])),this.autoNormalizeCTM&&this.wrapContentStreams(this.context.getPushGraphicsStateContentStream(),this.context.getPopGraphicsStateContentStream());let r=this.getInheritableAttribute(v.Resources),o=e.lookupMaybe(r,W)||e.obj({});this.set(v.Resources,o);let s=o.lookupMaybe(v.Font,W)||e.obj({});o.set(v.Font,s);let a=o.lookupMaybe(v.XObject,W)||e.obj({});o.set(v.XObject,a);let c=o.lookupMaybe(v.ExtGState,W)||e.obj({});o.set(v.ExtGState,c);let l=this.Annots()||e.obj([]);this.set(v.Annots,l),this.normalized=!0}normalizedEntries(){this.normalize();let e=this.Annots(),t=this.Resources(),i=this.Contents();return{Annots:e,Resources:t,Contents:i,Font:t.lookup(v.Font,W),XObject:t.lookup(v.XObject,W),ExtGState:t.lookup(v.ExtGState,W)}}};pr.InheritableEntries=["Resources","MediaBox","CropBox","Rotate"];pr.withContextAndParent=(n,e)=>{let t=new Map;return t.set(v.Type,v.Page),t.set(v.Parent,e),t.set(v.Resources,n.obj({})),t.set(v.MediaBox,n.obj([0,0,612,792])),new pr(t,n,!1)};pr.fromMapWithContext=(n,e,t=!0)=>new pr(n,e,t);var et=pr;var Vl=class{constructor(e,t){this.traversedObjects=new Map,this.copy=i=>i instanceof et?this.copyPDFPage(i):i instanceof W?this.copyPDFDict(i):i instanceof Z?this.copyPDFArray(i):i instanceof Ee?this.copyPDFStream(i):i instanceof Y?this.copyPDFIndirectObject(i):i.clone(),this.copyPDFPage=i=>{let r=i.clone(),{InheritableEntries:o}=et;for(let s=0,a=o.length;s{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);let o=i.entries();for(let s=0,a=o.length;s{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);for(let o=0,s=i.size();o{if(this.traversedObjects.has(i))return this.traversedObjects.get(i);let r=i.clone(this.dest);this.traversedObjects.set(i,r);let o=i.dict.entries();for(let s=0,a=o.length;s{if(!this.traversedObjects.has(i)){let o=this.dest.nextRef();this.traversedObjects.set(i,o);let s=this.src.lookup(i);if(s){let a=this.copy(s);this.dest.assign(o,a)}}return this.traversedObjects.get(i)},this.src=e,this.dest=t}};Vl.for=(n,e)=>new Vl(n,e);var Hl=Vl;function _b(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r1?(this.subsections.push([e]),this.chunkIdx+=1,this.chunkLength=1):(t.push(e),this.chunkLength+=1)}};go.create=()=>new go({ref:Y.of(0,65535),offset:0,deleted:!0});go.createEmpty=()=>new go;var mo=go;var zl=class{constructor(e){this.lastXRefOffset=String(e)}toString(){return`startxref +${this.lastXRefOffset} +%%EOF`}sizeInBytes(){return 16+this.lastXRefOffset.length}copyBytesInto(e,t){let i=t;return e[t++]=P.s,e[t++]=P.t,e[t++]=P.a,e[t++]=P.r,e[t++]=P.t,e[t++]=P.x,e[t++]=P.r,e[t++]=P.e,e[t++]=P.f,e[t++]=P.Newline,t+=Ae(this.lastXRefOffset,e,t),e[t++]=P.Newline,e[t++]=P.Percent,e[t++]=P.Percent,e[t++]=P.E,e[t++]=P.O,e[t++]=P.F,t-i}};zl.forLastCrossRefSectionOffset=n=>new zl(n);var gr=zl;var Ul=class{constructor(e){this.dict=e}toString(){return`trailer +${this.dict.toString()}`}sizeInBytes(){return 8+this.dict.sizeInBytes()}copyBytesInto(e,t){let i=t;return e[t++]=P.t,e[t++]=P.r,e[t++]=P.a,e[t++]=P.i,e[t++]=P.l,e[t++]=P.e,e[t++]=P.r,e[t++]=P.Newline,t+=this.dict.copyBytesInto(e,t),t-i}};Ul.of=n=>new Ul(n);var Nd=Ul;var ql=class n extends fr{constructor(e,t,i=!0){super(e.obj({}),i),this.objects=t,this.offsets=this.computeObjectOffsets(),this.offsetsString=this.computeOffsetsString(),this.dict.set(v.of("Type"),v.of("ObjStm")),this.dict.set(v.of("N"),G.of(this.objects.length)),this.dict.set(v.of("First"),G.of(this.offsetsString.length))}getObjectsCount(){return this.objects.length}clone(e){return n.withContextAndObjects(e||this.dict.context,this.objects.slice(),this.encode)}getContentsString(){let e=this.offsetsString;for(let t=0,i=this.objects.length;tnew ql(n,e,t);var Is=ql;var jl=class{constructor(e,t){this.parsedObjects=0,this.shouldWaitForTick=i=>(this.parsedObjects+=i,this.parsedObjects%this.objectsPerTick===0),this.context=e,this.objectsPerTick=t}serializeToBuffer(){return Q(this,void 0,void 0,function*(){let{size:e,header:t,indirectObjects:i,xref:r,trailerDict:o,trailer:s}=yield this.computeBufferSize(),a=0,c=new Uint8Array(e);a+=t.copyBytesInto(c,a),c[a++]=P.Newline,c[a++]=P.Newline;for(let l=0,d=i.length;lnew jl(n,e);var Bs=jl;var Wl=class n extends Se{constructor(e){super(),this.data=e}clone(){return n.of(this.data.slice())}toString(){return`PDFInvalidObject(${this.data.length} bytes)`}sizeInBytes(){return this.data.length}copyBytesInto(e,t){let i=this.data.length;for(let r=0;rnew Wl(n);var Os=Wl;var rP=/\/([^\0\t\n\f\r ]+)[\0\t\n\f\r ]*(\d*\.\d+|\d+)?[\0\t\n\f\r ]+Tf/,M0=class n{constructor(e,t){this.dict=e,this.ref=t}T(){return this.dict.lookupMaybe(v.of("T"),J,K)}Ff(){let e=this.getInheritableAttribute(v.of("Ff"));return this.dict.context.lookupMaybe(e,G)}V(){let e=this.getInheritableAttribute(v.of("V"));return this.dict.context.lookup(e)}Kids(){return this.dict.lookupMaybe(v.of("Kids"),Z)}DA(){let e=this.dict.lookup(v.of("DA"));if(e instanceof J||e instanceof K)return e}setKids(e){this.dict.set(v.of("Kids"),this.dict.context.obj(e))}getParent(){let e=this.dict.get(v.of("Parent"));if(e instanceof Y){let t=this.dict.lookup(v.of("Parent"),W);return new n(t,e)}}setParent(e){e?this.dict.set(v.of("Parent"),e):this.dict.delete(v.of("Parent"))}getFullyQualifiedName(){let e=this.getParent();return e?`${e.getFullyQualifiedName()}.${this.getPartialName()}`:this.getPartialName()}getPartialName(){var e;return(e=this.T())===null||e===void 0?void 0:e.decodeText()}setPartialName(e){e?this.dict.set(v.of("T"),K.fromText(e)):this.dict.delete(v.of("T"))}setDefaultAppearance(e){this.dict.set(v.of("DA"),J.of(e))}getDefaultAppearance(){let e=this.DA();return e instanceof K?e.decodeText():e==null?void 0:e.asString()}setFontSize(e){var t;let i=(t=this.getFullyQualifiedName())!==null&&t!==void 0?t:"",r=this.getDefaultAppearance();if(!r)throw new vl(i);let o=us(r,rP);if(!o.match)throw new wl(i);let s=r.slice(0,o.pos-o.match[0].length),a=o.pos<=r.length?r.slice(o.pos):"",c=o.match[1],l=`${s} /${c} ${e} Tf ${a}`;this.setDefaultAppearance(l)}getFlags(){var e,t;return(t=(e=this.Ff())===null||e===void 0?void 0:e.asNumber())!==null&&t!==void 0?t:0}setFlags(e){this.dict.set(v.of("Ff"),G.of(e))}hasFlag(e){return(this.getFlags()&e)!==0}setFlag(e){let t=this.getFlags();this.setFlags(t|e)}clearFlag(e){let t=this.getFlags();this.setFlags(t&~e)}setFlagTo(e,t){t?this.setFlag(e):this.clearFlag(e)}getInheritableAttribute(e){let t;return this.ascend(i=>{t||(t=i.dict.get(e))}),t}ascend(e){e(this);let t=this.getParent();t&&t.ascend(e)}},Ls=M0;var Kl=class{constructor(e){this.dict=e}W(){let e=this.dict.lookup(v.of("W"));if(e instanceof G)return e}getWidth(){var e,t;return(t=(e=this.W())===null||e===void 0?void 0:e.asNumber())!==null&&t!==void 0?t:1}setWidth(e){let t=this.dict.context.obj(e);this.dict.set(v.of("W"),t)}};Kl.fromDict=n=>new Kl(n);var Rd=Kl;var Gl=class{constructor(e){this.dict=e}Rect(){return this.dict.lookup(v.of("Rect"),Z)}AP(){return this.dict.lookupMaybe(v.of("AP"),W)}F(){let e=this.dict.lookup(v.of("F"));return this.dict.context.lookupMaybe(e,G)}getRectangle(){var e;let t=this.Rect();return(e=t==null?void 0:t.asRectangle())!==null&&e!==void 0?e:{x:0,y:0,width:0,height:0}}setRectangle(e){let{x:t,y:i,width:r,height:o}=e,s=this.dict.context.obj([t,i,t+r,i+o]);this.dict.set(v.of("Rect"),s)}getAppearanceState(){let e=this.dict.lookup(v.of("AS"));if(e instanceof v)return e}setAppearanceState(e){this.dict.set(v.of("AS"),e)}setAppearances(e){this.dict.set(v.of("AP"),e)}ensureAP(){let e=this.AP();return e||(e=this.dict.context.obj({}),this.dict.set(v.of("AP"),e)),e}getNormalAppearance(){let t=this.ensureAP().get(v.of("N"));if(t instanceof Y||t instanceof W)return t;throw new Error(`Unexpected N type: ${t==null?void 0:t.constructor.name}`)}setNormalAppearance(e){this.ensureAP().set(v.of("N"),e)}setRolloverAppearance(e){this.ensureAP().set(v.of("R"),e)}setDownAppearance(e){this.ensureAP().set(v.of("D"),e)}removeRolloverAppearance(){let e=this.AP();e==null||e.delete(v.of("R"))}removeDownAppearance(){let e=this.AP();e==null||e.delete(v.of("D"))}getAppearances(){let e=this.AP();if(!e)return;let t=e.lookup(v.of("N"),W,Ee),i=e.lookupMaybe(v.of("R"),W,Ee),r=e.lookupMaybe(v.of("D"),W,Ee);return{normal:t,rollover:i,down:r}}getFlags(){var e,t;return(t=(e=this.F())===null||e===void 0?void 0:e.asNumber())!==null&&t!==void 0?t:0}setFlags(e){this.dict.set(v.of("F"),G.of(e))}hasFlag(e){return(this.getFlags()&e)!==0}setFlag(e){let t=this.getFlags();this.setFlags(t|e)}clearFlag(e){let t=this.getFlags();this.setFlags(t&~e)}setFlagTo(e,t){t?this.setFlag(e):this.clearFlag(e)}};Gl.fromDict=n=>new Gl(n);var Vd=Gl;var Xl=class{constructor(e){this.dict=e}R(){let e=this.dict.lookup(v.of("R"));if(e instanceof G)return e}BC(){let e=this.dict.lookup(v.of("BC"));if(e instanceof Z)return e}BG(){let e=this.dict.lookup(v.of("BG"));if(e instanceof Z)return e}CA(){let e=this.dict.lookup(v.of("CA"));if(e instanceof K||e instanceof J)return e}RC(){let e=this.dict.lookup(v.of("RC"));if(e instanceof K||e instanceof J)return e}AC(){let e=this.dict.lookup(v.of("AC"));if(e instanceof K||e instanceof J)return e}getRotation(){var e;return(e=this.R())===null||e===void 0?void 0:e.asNumber()}getBorderColor(){let e=this.BC();if(!e)return;let t=[];for(let i=0,r=e==null?void 0:e.size();inew Xl(n);var Ms=Xl;var xo=class extends Vd{MK(){let e=this.dict.lookup(v.of("MK"));if(e instanceof W)return e}BS(){let e=this.dict.lookup(v.of("BS"));if(e instanceof W)return e}DA(){let e=this.dict.lookup(v.of("DA"));if(e instanceof J||e instanceof K)return e}P(){let e=this.dict.get(v.of("P"));if(e instanceof Y)return e}setP(e){this.dict.set(v.of("P"),e)}setDefaultAppearance(e){this.dict.set(v.of("DA"),J.of(e))}getDefaultAppearance(){let e=this.DA();return e instanceof K?e.decodeText():e==null?void 0:e.asString()}getAppearanceCharacteristics(){let e=this.MK();if(e)return Ms.fromDict(e)}getOrCreateAppearanceCharacteristics(){let e=this.MK();if(e)return Ms.fromDict(e);let t=Ms.fromDict(this.dict.context.obj({}));return this.dict.set(v.of("MK"),t.dict),t}getBorderStyle(){let e=this.BS();if(e)return Rd.fromDict(e)}getOrCreateBorderStyle(){let e=this.BS();if(e)return Rd.fromDict(e);let t=Rd.fromDict(this.dict.context.obj({}));return this.dict.set(v.of("BS"),t.dict),t}getOnValue(){var e;let t=(e=this.getAppearances())===null||e===void 0?void 0:e.normal;if(t instanceof W){let i=t.keys();for(let r=0,o=i.length;rnew xo(n);xo.create=(n,e)=>{let t=n.obj({Type:"Annot",Subtype:"Widget",Rect:[0,0,0,0],Parent:e});return new xo(t)};var bo=xo;var Zl=class extends Ls{FT(){let e=this.getInheritableAttribute(v.of("FT"));return this.dict.context.lookup(e,v)}getWidgets(){let e=this.Kids();if(!e)return[bo.fromDict(this.dict)];let t=new Array(e.size());for(let i=0,r=e.size();it.size())throw new kn(e,0,t.size());t.remove(e)}else{if(e!==0)throw new kn(e,0,0);this.setKids([])}}normalizedEntries(){let e=this.Kids();return e||(e=this.dict.context.obj([this.ref]),this.dict.set(v.of("Kids"),e)),{Kids:e}}};Zl.fromDict=(n,e)=>new Zl(n,e);var zt=Zl;var N0=class extends zt{Opt(){return this.dict.lookupMaybe(v.of("Opt"),J,K,Z)}setOpt(e){this.dict.set(v.of("Opt"),this.dict.context.obj(e))}getExportValues(){let e=this.Opt();if(!e)return;if(e instanceof J||e instanceof K)return[e];let t=[];for(let i=0,r=e.size();it.size())throw new kn(e,0,t.size());t.remove(e)}}normalizeExportValues(){var e,t,i,r;let o=(e=this.getExportValues())!==null&&e!==void 0?e:[],s=[],a=this.getWidgets();for(let c=0,l=a.length;cnew yo(n,e);yo.create=n=>{let e=n.obj({FT:"Btn",Kids:[]}),t=n.register(e);return new yo(e,t)};var En=yo;var tt=n=>1<1){if(!this.hasFlag(me.MultiSelect))throw new yl;this.dict.set(v.of("V"),this.dict.context.obj(e))}this.updateSelectedIndices(e)}valuesAreValid(e){let t=this.getOptions();for(let i=0,r=e.length;io===(s.display||s.value).decodeText()))return!1}return!0}updateSelectedIndices(e){if(e.length>1){let t=new Array(e.length),i=this.getOptions();for(let r=0,o=e.length;rs===(a.display||a.value).decodeText())}this.dict.set(v.of("I"),this.dict.context.obj(t.sort()))}else this.dict.delete(v.of("I"))}getValues(){let e=this.V();if(e instanceof J||e instanceof K)return[e];if(e instanceof Z){let t=[];for(let i=0,r=e.size();i0){let s=o.lookup(0,J,K),a=o.lookupMaybe(1,J,K);t.push({value:s,display:a||s})}}return t}return[]}},Ns=R0;var vo=class extends Ns{};vo.fromDict=(n,e)=>new vo(n,e);vo.create=n=>{let e=n.obj({FT:"Ch",Ff:me.Combo,Kids:[]}),t=n.register(e);return new vo(e,t)};var Tn=vo;var wo=class extends Ls{addField(e){let{Kids:t}=this.normalizedEntries();t==null||t.push(e)}normalizedEntries(){let e=this.Kids();return e||(e=this.dict.context.obj([]),this.dict.set(v.of("Kids"),e)),{Kids:e}}};wo.fromDict=(n,e)=>new wo(n,e);wo.create=n=>{let e=n.obj({}),t=n.register(e);return new wo(e,t)};var An=wo;var Yl=class extends zt{};Yl.fromDict=(n,e)=>new Yl(n,e);var xr=Yl;var Fo=class extends zt{MaxLen(){let e=this.dict.lookup(v.of("MaxLen"));if(e instanceof G)return e}Q(){let e=this.dict.lookup(v.of("Q"));if(e instanceof G)return e}setMaxLength(e){this.dict.set(v.of("MaxLen"),G.of(e))}removeMaxLength(){this.dict.delete(v.of("MaxLen"))}getMaxLength(){var e;return(e=this.MaxLen())===null||e===void 0?void 0:e.asNumber()}setQuadding(e){this.dict.set(v.of("Q"),G.of(e))}getQuadding(){var e;return(e=this.Q())===null||e===void 0?void 0:e.asNumber()}setValue(e){this.dict.set(v.of("V"),e)}removeValue(){this.dict.delete(v.of("V"))}getValue(){let e=this.V();if(e instanceof J||e instanceof K)return e}};Fo.fromDict=(n,e)=>new Fo(n,e);Fo.create=n=>{let e=n.obj({FT:"Tx",Kids:[]}),t=n.register(e);return new Fo(e,t)};var In=Fo;var Do=class extends mr{};Do.fromDict=(n,e)=>new Do(n,e);Do.create=n=>{let e=n.obj({FT:"Btn",Ff:yt.PushButton,Kids:[]}),t=n.register(e);return new Do(e,t)};var Bn=Do;var Po=class extends mr{setValue(e){if(!this.getOnValues().includes(e)&&e!==v.of("Off"))throw new Cn;this.dict.set(v.of("V"),e);let i=this.getWidgets();for(let r=0,o=i.length;rnew Po(n,e);Po.create=n=>{let e=n.obj({FT:"Btn",Ff:yt.Radio,Kids:[]}),t=n.register(e);return new Po(e,t)};var On=Po;var ko=class extends Ns{};ko.fromDict=(n,e)=>new ko(n,e);ko.create=n=>{let e=n.obj({FT:"Ch",Kids:[]}),t=n.register(e);return new ko(e,t)};var Ln=ko;var Rs=n=>{if(!n)return[];let e=[];for(let t=0,i=n.size();toP(n)?An.fromDict(n,e):sP(n,e),oP=n=>{let e=n.lookup(v.of("Kids"));if(e instanceof Z)for(let t=0,i=e.size();t{let t=H0(n,v.of("FT")),i=n.context.lookup(t,v);return i===v.of("Btn")?aP(n,e):i===v.of("Ch")?lP(n,e):i===v.of("Tx")?In.fromDict(n,e):i===v.of("Sig")?xr.fromDict(n,e):zt.fromDict(n,e)},aP=(n,e)=>{var t;let i=H0(n,v.of("Ff")),r=n.context.lookupMaybe(i,G),o=(t=r==null?void 0:r.asNumber())!==null&&t!==void 0?t:0;return V0(o,yt.PushButton)?Bn.fromDict(n,e):V0(o,yt.Radio)?On.fromDict(n,e):En.fromDict(n,e)},lP=(n,e)=>{var t;let i=H0(n,v.of("Ff")),r=n.context.lookupMaybe(i,G),o=(t=r==null?void 0:r.asNumber())!==null&&t!==void 0?t:0;return V0(o,me.Combo)?Tn.fromDict(n,e):Ln.fromDict(n,e)},V0=(n,e)=>(n&e)!==0,H0=(n,e)=>{let t;return Jb(n,i=>{t||(t=i.get(e))}),t},Jb=(n,e)=>{e(n);let t=n.lookupMaybe(v.of("Parent"),W);t&&Jb(t,e)};var Co=class{constructor(e){this.dict=e}Fields(){let e=this.dict.lookup(v.of("Fields"));if(e instanceof Z)return e}getFields(){let{Fields:e}=this.normalizedEntries(),t=new Array(e.size());for(let i=0,r=e.size();i{if(i)for(let r=0,o=i.length;rnew Co(n);Co.create=n=>{let e=n.obj({Fields:[]});return new Co(e)};var br=Co;var zd=(n,e)=>{if(n!==void 0)return e[n]},So;(function(n){n.UseNone="UseNone",n.UseOutlines="UseOutlines",n.UseThumbs="UseThumbs",n.UseOC="UseOC"})(So||(So={}));var Eo;(function(n){n.L2R="L2R",n.R2L="R2L"})(Eo||(Eo={}));var To;(function(n){n.None="None",n.AppDefault="AppDefault"})(To||(To={}));var Vs;(function(n){n.Simplex="Simplex",n.DuplexFlipShortEdge="DuplexFlipShortEdge",n.DuplexFlipLongEdge="DuplexFlipLongEdge"})(Vs||(Vs={}));var Ao=class{constructor(e){this.dict=e}lookupBool(e){let t=this.dict.lookup(v.of(e));if(t instanceof Li)return t}lookupName(e){let t=this.dict.lookup(v.of(e));if(t instanceof v)return t}HideToolbar(){return this.lookupBool("HideToolbar")}HideMenubar(){return this.lookupBool("HideMenubar")}HideWindowUI(){return this.lookupBool("HideWindowUI")}FitWindow(){return this.lookupBool("FitWindow")}CenterWindow(){return this.lookupBool("CenterWindow")}DisplayDocTitle(){return this.lookupBool("DisplayDocTitle")}NonFullScreenPageMode(){return this.lookupName("NonFullScreenPageMode")}Direction(){return this.lookupName("Direction")}PrintScaling(){return this.lookupName("PrintScaling")}Duplex(){return this.lookupName("Duplex")}PickTrayByPDFSize(){return this.lookupBool("PickTrayByPDFSize")}PrintPageRange(){let e=this.dict.lookup(v.of("PrintPageRange"));if(e instanceof Z)return e}NumCopies(){let e=this.dict.lookup(v.of("NumCopies"));if(e instanceof G)return e}getHideToolbar(){var e,t;return(t=(e=this.HideToolbar())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getHideMenubar(){var e,t;return(t=(e=this.HideMenubar())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getHideWindowUI(){var e,t;return(t=(e=this.HideWindowUI())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getFitWindow(){var e,t;return(t=(e=this.FitWindow())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getCenterWindow(){var e,t;return(t=(e=this.CenterWindow())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getDisplayDocTitle(){var e,t;return(t=(e=this.DisplayDocTitle())===null||e===void 0?void 0:e.asBoolean())!==null&&t!==void 0?t:!1}getNonFullScreenPageMode(){var e,t;let i=(e=this.NonFullScreenPageMode())===null||e===void 0?void 0:e.decodeText();return(t=zd(i,So))!==null&&t!==void 0?t:So.UseNone}getReadingDirection(){var e,t;let i=(e=this.Direction())===null||e===void 0?void 0:e.decodeText();return(t=zd(i,Eo))!==null&&t!==void 0?t:Eo.L2R}getPrintScaling(){var e,t;let i=(e=this.PrintScaling())===null||e===void 0?void 0:e.decodeText();return(t=zd(i,To))!==null&&t!==void 0?t:To.AppDefault}getDuplex(){var e;let t=(e=this.Duplex())===null||e===void 0?void 0:e.decodeText();return zd(t,Vs)}getPickTrayByPDFSize(){var e;return(e=this.PickTrayByPDFSize())===null||e===void 0?void 0:e.asBoolean()}getPrintPageRange(){let e=this.PrintPageRange();if(!e)return[];let t=[];for(let i=0;inew Ao(n);Ao.create=n=>{let e=n.obj({});return new Ao(e)};var _l=Ao;var Io=class extends W{Pages(){return this.lookup(v.of("Pages"),W)}AcroForm(){return this.lookupMaybe(v.of("AcroForm"),W)}getAcroForm(){let e=this.AcroForm();if(e)return br.fromDict(e)}getOrCreateAcroForm(){let e=this.getAcroForm();if(!e){e=br.create(this.context);let t=this.context.register(e.dict);this.set(v.of("AcroForm"),t)}return e}ViewerPreferences(){return this.lookupMaybe(v.of("ViewerPreferences"),W)}getViewerPreferences(){let e=this.ViewerPreferences();if(e)return _l.fromDict(e)}getOrCreateViewerPreferences(){let e=this.getViewerPreferences();if(!e){e=_l.create(this.context);let t=this.context.register(e.dict);this.set(v.of("ViewerPreferences"),t)}return e}insertLeafNode(e,t){let i=this.get(v.of("Pages"));return this.Pages().insertLeafNode(e,t)||i}removeLeafNode(e){this.Pages().removeLeafNode(e)}};Io.withContextAndPages=(n,e)=>{let t=new Map;return t.set(v.of("Type"),v.of("Catalog")),t.set(v.of("Pages"),e),new Io(t,n)};Io.fromMapWithContext=(n,e)=>new Io(n,e);var yr=Io;var Bo=class n extends W{Parent(){return this.lookup(v.of("Parent"))}Kids(){return this.lookup(v.of("Kids"),Z)}Count(){return this.lookup(v.of("Count"),G)}pushTreeNode(e){this.Kids().push(e)}pushLeafNode(e){let t=this.Kids();this.insertLeafKid(t.size(),e)}insertLeafNode(e,t){let i=this.Kids(),r=this.Count().asNumber();if(t>r)throw new Ss(t,r);let o=t;for(let s=0,a=i.size();so)return l.insertLeafNode(e,o)||c;o-=l.Count().asNumber()}l instanceof et&&(o-=1)}if(o===0){this.insertLeafKid(i.size(),e);return}throw new Es(t,"insertLeafNode")}removeLeafNode(e,t=!0){let i=this.Kids(),r=this.Count().asNumber();if(e>=r)throw new Ss(e,r);let o=e;for(let s=0,a=i.size();so){l.removeLeafNode(o,t),t&&l.Kids().size()===0&&i.remove(s);return}else o-=l.Count().asNumber();if(l instanceof et)if(o===0){this.removeKid(s);return}else o-=1}throw new Es(e,"removeLeafNode")}ascend(e){e(this);let t=this.Parent();t&&t.ascend(e)}traverse(e){let t=this.Kids();for(let i=0,r=t.size();i{let o=r.Count().asNumber()+1;r.set(v.of("Count"),G.of(o))}),i.insert(e,t)}removeKid(e){let t=this.Kids();t.lookup(e)instanceof et&&this.ascend(r=>{let o=r.Count().asNumber()-1;r.set(v.of("Count"),G.of(o))}),t.remove(e)}};Bo.withContext=(n,e)=>{let t=new Map;return t.set(v.of("Type"),v.of("Pages")),t.set(v.of("Kids"),n.obj([])),t.set(v.of("Count"),n.obj(0)),e&&t.set(v.of("Parent"),e),new Bo(t,n)};Bo.fromMapWithContext=(n,e)=>new Bo(n,e);var vr=Bo;var wr;(function(n){n[n.Deleted=0]="Deleted",n[n.Uncompressed=1]="Uncompressed",n[n.Compressed=2]="Compressed"})(wr||(wr={}));var Oo=class n extends fr{constructor(e,t,i=!0){super(e,i),this.computeIndex=()=>{let r=[],o=0;for(let s=0,a=this.entries.length;s1&&(r.push(o),r.push(c.ref.objectNumber),o=0),o+=1}return r.push(o),r},this.computeEntryTuples=()=>{let r=new Array(this.entries.length);for(let o=0,s=this.entries.length;o{let r=this.entryTuplesCache.access(),o=[0,0,0];for(let s=0,a=r.length;so[0]&&(o[0]=h),u>o[1]&&(o[1]=u),p>o[2]&&(o[2]=p)}return o},this.entries=t||[],this.entryTuplesCache=ht.populatedBy(this.computeEntryTuples),this.maxByteWidthsCache=ht.populatedBy(this.computeMaxEntryByteWidths),this.indexCache=ht.populatedBy(this.computeIndex),e.set(v.of("Type"),v.of("XRef"))}addDeletedEntry(e,t){let i=wr.Deleted;this.entries.push({type:i,ref:e,nextFreeObjectNumber:t}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addUncompressedEntry(e,t){let i=wr.Uncompressed;this.entries.push({type:i,ref:e,offset:t}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addCompressedEntry(e,t,i){let r=wr.Compressed;this.entries.push({type:r,ref:e,objectStreamRef:t,index:i}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}clone(e){let{dict:t,entries:i,encode:r}=this;return n.of(t.clone(e),i.slice(),r)}getContentsString(){let e=this.entryTuplesCache.access(),t=this.maxByteWidthsCache.access(),i="";for(let r=0,o=e.length;r=0;u--)i+=(l[u]||0).toString(2);for(let u=t[1]-1;u>=0;u--)i+=(d[u]||0).toString(2);for(let u=t[2]-1;u>=0;u--)i+=(h[u]||0).toString(2)}return i}getUnencodedContents(){let e=this.entryTuplesCache.access(),t=this.maxByteWidthsCache.access(),i=new Uint8Array(this.getUnencodedContentsSize()),r=0;for(let o=0,s=e.length;o=0;p--)i[r++]=d[p]||0;for(let p=t[1]-1;p>=0;p--)i[r++]=h[p]||0;for(let p=t[2]-1;p>=0;p--)i[r++]=u[p]||0}return i}getUnencodedContentsSize(){let e=this.maxByteWidthsCache.access();return Lf(e)*this.entries.length}updateDict(){super.updateDict();let e=this.maxByteWidthsCache.access(),t=this.indexCache.access(),{context:i}=this.dict;this.dict.set(v.of("W"),i.obj(e)),this.dict.set(v.of("Index"),i.obj(t))}};Oo.create=(n,e=!0)=>{let t=new Oo(n,[],e);return t.addDeletedEntry(Y.of(0,65535),0),t};Oo.of=(n,e,t=!0)=>new Oo(n,e,t);var Ud=Oo;var Jl=class extends Bs{constructor(e,t,i,r){super(e,t),this.encodeStreams=i,this.objectsPerStream=r}computeBufferSize(){return Q(this,void 0,void 0,function*(){let e=this.context.largestObjectNumber+1,t=$i.forVersion(1,7),i=t.sizeInBytes()+2,r=Ud.create(this.createTrailerDict(),this.encodeStreams),o=[],s=[],a=[],c=this.context.security,l=this.context.enumerateIndirectObjects();for(let p=0,f=l.length;pnew Jl(n,e,t,i);var qd=Jl;var Ql=class{constructor(e,t){this.encoding=e===lo.ZapfDingbats?cl.ZapfDingbats:e===lo.Symbol?cl.Symbol:cl.WinAnsi,this.font=Mb.load(e),this.fontName=this.font.FontName,this.customName=t}encodeText(e){let t=this.encodeTextAsGlyphs(e),i=new Array(t.length);for(let r=0,o=t.length;rnew Ql(n,e);var Fr=Ql;var $b=(n,e)=>{let t=new Array(n.length);for(let i=0,r=n.length;i`/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo << + /Registry (Adobe) + /Ordering (UCS) + /Supplement 0 +>> def +/CMapName /Adobe-Identity-UCS def +/CMapType 2 def +1 begincodespacerange +<0000> +endcodespacerange +${n.length} beginbfchar +${n.map(([e,t])=>`${e} ${t}`).join(` +`)} +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end`,Qb=(...n)=>`<${n.join("")}>`,jd=n=>Ki(n,4),dP=n=>{if(zf(n))return jd(n);if(Uf(n)){let i=gd(n),r=md(n);return`${jd(i)}${jd(r)}`}let t=`0x${Gi(n)} is not a valid UTF-8 or UTF-16 codepoint.`;throw new Error(t)};var hP=n=>{let e=0,t=i=>{e|=1<{let e=n["OS/2"]?n["OS/2"].sFamilyClass:0;return hP({fixedPitch:n.post.isFixedPitch,serif:1<=e&&e<=7,symbolic:!0,script:e===10,italic:n.head.macStyle.italic})};var z0=class n{static for(e,t,i,r){return Q(this,void 0,void 0,function*(){let o=yield e.create(t);return new n(o,t,i,r)})}constructor(e,t,i,r){this.allGlyphsInFontSortedById=()=>{let o=new Array(this.font.characterSet.length);for(let s=0,a=o.length;ss.id)},this.font=e,this.scale=1e3/this.font.unitsPerEm,this.fontData=t,this.fontName=this.font.postscriptName||"Font",this.customName=i,this.fontFeatures=r,this.baseFontName="",this.glyphCache=ht.populatedBy(this.allGlyphsInFontSortedById)}encodeText(e){let{glyphs:t}=this.font.layout(e,this.fontFeatures),i=new Array(t.length);for(let r=0,o=t.length;rthis.glyphs),this.glyphIdMap=new Map}encodeText(e){let{glyphs:t}=this.font.layout(e,this.fontFeatures),i=new Array(t.length);for(let r=0,o=t.length;r{let i=[];this.subset.encodeStream().on("data",r=>i.push(r)).on("end",()=>e(If(i))).on("error",r=>t(r))})}},Wd=U0;var Hs;(function(n){n.Source="Source",n.Data="Data",n.Alternative="Alternative",n.Supplement="Supplement",n.EncryptedPayload="EncryptedPayload",n.FormData="EncryptedPayload",n.Schema="Schema",n.Unspecified="Unspecified"})(Hs||(Hs={}));var q0=class n{static for(e,t,i={}){return new n(e,t,i)}constructor(e,t,i={}){this.fileData=e,this.fileName=t,this.options=i}embedIntoContext(e,t){return Q(this,void 0,void 0,function*(){let{mimeType:i,description:r,creationDate:o,modificationDate:s,afRelationship:a}=this.options,c=e.flateStream(this.fileData,{Type:"EmbeddedFile",Subtype:i!=null?i:void 0,Params:{Size:this.fileData.length,CreationDate:o?J.fromDate(o):void 0,ModDate:s?J.fromDate(s):void 0}}),l=e.register(c),d=e.obj({Type:"Filespec",F:J.of(this.fileName),UF:K.fromText(this.fileName),EF:{F:l},Desc:r?K.fromText(r):void 0,AFRelationship:a!=null?a:void 0});return t?(e.assign(t,d),t):e.register(d)})}getFileData(){return this.fileData}},Kd=q0;var ty=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],zs;(function(n){n.DeviceGray="DeviceGray",n.DeviceRGB="DeviceRGB",n.DeviceCMYK="DeviceCMYK"})(zs||(zs={}));var uP={1:zs.DeviceGray,3:zs.DeviceRGB,4:zs.DeviceCMYK},j0=class n{static for(e){return Q(this,void 0,void 0,function*(){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.getUint16(0)!==65496)throw new Error("SOI not found in JPEG");let r=2,o;for(;r>3)]>>7-((f&7)<<0)&1,I=3*S;a[y]=F[I],a[y+1]=F[I+1],a[y+2]=F[I+2],a[y+3]=S>2)]>>6-((f&3)<<1)&3,I=3*S;a[y]=F[I],a[y+1]=F[I+1],a[y+2]=F[I+2],a[y+3]=S>1)]>>4-((f&1)<<2)&15,I=3*S;a[y]=F[I],a[y+1]=F[I+1],a[y+2]=F[I+2],a[y+3]=S>>3)]>>>7-(V&7)&1),X=A==g*255?0:255;c[q+V]=X<<24|A<<16|A<<8|A}else if(d==2)for(var V=0;V>>2)]>>>6-((V&3)<<1)&3),X=A==g*85?0:255;c[q+V]=X<<24|A<<16|A<<8|A}else if(d==4)for(var V=0;V>>1)]>>>4-((V&1)<<2)&15),X=A==g*17?0:255;c[q+V]=X<<24|A<<16|A<<8|A}else if(d==8)for(var V=0;V>>2<<3));r==0;){if(r=x(e,u,1),o=x(e,u+1,2),u+=3,o==0){(u&7)!=0&&(u+=8-(u&7));var k=(u>>>3)+4,E=e[k-4]|e[k-3]<<8;C&&(t=n.H.W(t,h+E)),t.set(new i(e.buffer,e.byteOffset+k,E),h),u=k+E<<3,h+=E;continue}if(C&&(t=n.H.W(t,h+(1<<17))),o==1&&(p=D.J,f=D.h,l=511,d=31),o==2){s=g(e,u,5)+257,a=g(e,u+5,5)+1,c=g(e,u+10,4)+4,u+=14;for(var B=u,S=1,I=0;I<38;I+=2)D.Q[I]=0,D.Q[I+1]=0;for(var I=0;IS&&(S=O)}u+=3*c,w(D.Q,S),y(D.Q,S,D.u),p=D.w,f=D.d,u=b(D.u,(1<>>4;if(!(V>>>8))t[h++]=V;else{if(V==256)break;var X=h+V-254;if(V>264){var L=D.q[V-257];X=h+(L>>>3)+g(e,u,L&7),u+=L&7}var U=f[F(e,u)&d];u+=U&15;var R=U>>>4,M=D.c[R],re=(M>>>4)+x(e,u,M&15);for(u+=M&15;h>>4;if(h<=15)s[l]=h,l++;else{var u=0,p=0;h==16?(p=3+a(r,o,2),o+=2,u=s[l-1]):h==17?(p=3+a(r,o,3),o+=3):h==18&&(p=11+a(r,o,7),o+=7);for(var f=l+p;l>>1;so&&(o=c),s++}for(;s>1,l=e[a+1],d=c<<4|l,h=t-l,u=e[a]<>>15-t;i[f]=d,u++}},n.H.l=function(e,t){for(var i=n.H.m.r,r=15-t,o=0;o>>r}},n.H.M=function(e,t,i){i=i<<(t&7);var r=t>>>3;e[r]|=i,e[r+1]|=i>>>8},n.H.I=function(e,t,i){i=i<<(t&7);var r=t>>>3;e[r]|=i,e[r+1]|=i>>>8,e[r+2]|=i>>>16},n.H.e=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)},n.H.i=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16|e[(t>>>3)+3]<<24)>>>(t&7)},n.H.m=(function(){var e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}})(),(function(){for(var e=n.H.m,t=32768,i=0;i>>1|(r&1431655765)<<1,r=(r&3435973836)>>>2|(r&858993459)<<2,r=(r&4042322160)>>>4|(r&252645135)<<4,r=(r&4278255360)>>>8|(r&16711935)<<8,e.r[i]=(r>>>16|r<<16)>>>17}function o(s,a,c){for(;a--!=0;)s.push(0,c)}for(var i=0;i<32;i++)e.q[i]=e.S[i]<<3|e.T[i],e.c[i]=e.p[i]<<4|e.z[i];o(e._,144,8),o(e._,112,9),o(e._,24,7),o(e._,8,8),n.H.n(e._,9),n.H.A(e._,9,e.J),n.H.l(e._,9),o(e.$,32,5),n.H.n(e.$,5),n.H.A(e.$,5,e.h),n.H.l(e.$,5),o(e.Q,19,0),o(e.C,286,0),o(e.D,30,0),o(e.v,320,0)})(),n.H.N})();j.decode._readInterlace=function(n,e){for(var t=e.width,i=e.height,r=j.decode._getBPP(e),o=r>>3,s=Math.ceil(t*r/8),a=new Uint8Array(i*s),c=0,l=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],h=[8,8,8,4,4,2,2],u=[8,8,4,4,2,2,1],p=0;p<7;){for(var f=h[p],m=u[p],x=0,g=0,b=l[p];b>3];E=E>>7-(k&7)&1,a[D*s+(C>>3)]|=E<<7-((C&7)<<0)}if(r==2){var E=n[k>>3];E=E>>6-(k&7)&3,a[D*s+(C>>2)]|=E<<6-((C&3)<<1)}if(r==4){var E=n[k>>3];E=E>>4-(k&7)&15,a[D*s+(C>>1)]|=E<<4-((C&1)<<2)}if(r>=8)for(var B=D*s+C*o,S=0;S>3)+S];k+=r,C+=m}F++,D+=f}x*g!=0&&(c+=g*(1+y)),p=p+1}return a};j.decode._getBPP=function(n){var e=[1,null,3,1,2,null,4][n.ctype];return e*n.depth};j.decode._filterZero=function(n,e,t,i,r){var o=j.decode._getBPP(e),s=Math.ceil(i*o/8),a=j.decode._paeth;o=Math.ceil(o/8);var c=0,l=1,d=n[t],h=0;if(d>1&&(n[t]=[0,0,1][d-2]),d==3)for(h=o;h>>1)&255;for(var u=0;u>>1);for(;h>>1)}else{for(;h>8&255,n[e+1]=t&255},readUint:function(n,e){return n[e]*(256*256*256)+(n[e+1]<<16|n[e+2]<<8|n[e+3])},writeUint:function(n,e,t){n[e]=t>>24&255,n[e+1]=t>>16&255,n[e+2]=t>>8&255,n[e+3]=t&255},readASCII:function(n,e,t){for(var i="",r=0;r=0&&a>=0?(h=p*e+f<<2,u=(a+p)*r+s+f<<2):(h=(-a+p)*e-s+f<<2,u=p*r+f<<2),c==0)i[u]=n[h],i[u+1]=n[h+1],i[u+2]=n[h+2],i[u+3]=n[h+3];else if(c==1){var m=n[h+3]*.00392156862745098,x=n[h]*m,g=n[h+1]*m,b=n[h+2]*m,w=i[u+3]*(1/255),y=i[u]*w,F=i[u+1]*w,D=i[u+2]*w,C=1-m,k=m+w*C,E=k==0?0:1/k;i[u+3]=255*k,i[u+0]=(x+y*C)*E,i[u+1]=(g+F*C)*E,i[u+2]=(b+D*C)*E}else if(c==2){var m=n[h+3],x=n[h],g=n[h+1],b=n[h+2],w=i[u+3],y=i[u],F=i[u+1],D=i[u+2];m==w&&x==y&&g==F&&b==D?(i[u]=0,i[u+1]=0,i[u+2]=0,i[u+3]=0):(i[u]=x,i[u+1]=g,i[u+2]=b,i[u+3]=m)}else if(c==3){var m=n[h+3],x=n[h],g=n[h+1],b=n[h+2],w=i[u+3],y=i[u],F=i[u+1],D=i[u+2];if(m==w&&x==y&&g==F&&b==D)continue;if(m<220&&w>20)return!1}return!0};j.encode=function(n,e,t,i,r,o,s){i==null&&(i=0),s==null&&(s=!1);var a=j.encode.compress(n,e,t,i,[!1,!1,!1,0,s]);return j.encode.compressPNG(a,-1),j.encode._main(a,e,t,r,o)};j.encodeLL=function(n,e,t,i,r,o,s,a){for(var c={ctype:0+(i==1?0:2)+(r==0?0:4),depth:o,frames:[]},l=Date.now(),d=(i+r)*o,h=d*e,u=0;u1,h=!1,u=33+(d?20:0);if(r.sRGB!=null&&(u+=13),r.pHYs!=null&&(u+=21),n.ctype==3){for(var p=n.plte.length,f=0;f>>24!=255&&(h=!0);u+=8+p*3+4+(h?8+p*1+4:0)}for(var m=0;m>>8&255,C=y>>>16&255;g[l+w+0]=F,g[l+w+1]=D,g[l+w+2]=C}if(l+=p*3,s(g,l,o(g,l-p*3-4,p*3+4)),l+=4,h){s(g,l,p),l+=4,c(g,l,"tRNS"),l+=4;for(var f=0;f>>24&255;l+=p,s(g,l,o(g,l-p-4,p+4)),l+=4}}for(var k=0,m=0;m>2,I>>2));for(var p=0;pN&&V==A[x-N])q[x]=q[x-N];else{var X=w[V];if(X==null&&(w[V]=X=y.length,y.push(V),y.length>=300))break;q[x]=X}}}var L=y.length;L<=256&&l==!1&&(L<=2?h=1:L<=4?h=2:L<=16?h=4:h=8,h=Math.max(h,c));for(var p=0;p>1)]|=qt[Ot+Fe]<<4-(Fe&1)*4;else if(h==2)for(var Fe=0;Fe>2)]|=qt[Ot+Fe]<<6-(Fe&3)*2;else if(h==1)for(var Fe=0;Fe>3)]|=qt[Ot+Fe]<<7-(Fe&7)*1}re=dt,d=3,he=1}else if(g==!1&&b.length==1){for(var dt=new Uint8Array(N*M*3),Ct=N*M,x=0;xC&&(C=B),Ek&&(k=E))}C==-1&&(F=D=C=k=0),r&&((F&1)==1&&F--,(D&1)==1&&D--);var I=(C-F+1)*(k-D+1);Ix&&(x=y),Fg&&(g=F))}x==-1&&(f=m=x=g=0),s&&((f&1)==1&&f--,(m&1)==1&&m--),o={x:f,y:m,width:x-f+1,height:g-m+1};var k=i[r];k.rect=o,k.blend=1,k.img=new Uint8Array(o.width*o.height*4),i[r-1].dispose==0?(j._copyTile(l,e,t,k.img,o.width,o.height,-o.x,-o.y,0),j.encode._prepareDiff(u,e,t,k.img,o)):j._copyTile(u,e,t,k.img,o.width,o.height,-o.x,-o.y,0)};j.encode._prepareDiff=function(n,e,t,i,r){j._copyTile(n,e,t,i,r.width,r.height,-r.x,-r.y,2)};j.encode._filterZero=function(n,e,t,i,r,o,s){var a=[],c=[0,1,2,3,4];o!=-1?c=[o]:(e*i>5e5||t==1)&&(c=[0]);var l;s&&(l={level:0});for(var d=s&&UZIP!=null?UZIP:iy.default,h=0;h>1)+256&255;if(o==4)for(var l=r;l>1)&255;for(var l=r;l>1)&255}if(o==4){for(var l=0;l>>1:t=t>>>1;n[e]=t}return n})(),update:function(n,e,t,i){for(var r=0;r>>8;return n},crc:function(n,e,t){return j.crc.update(4294967295,n,e,t)^4294967295}};j.quantize=function(n,e){for(var t=new Uint8Array(n),i=t.slice(0),r=new Uint32Array(i.buffer),o=j.quantize.getKDtree(i,e),s=o[0],a=o[1],c=j.quantize.planeDst,l=t,d=r,h=l.length,u=new Uint8Array(t.length>>2),p=0;p>2]=b.ind,d[p>>2]=b.est.rgba}return{abuf:i.buffer,inds:u,plte:a}};j.quantize.getKDtree=function(n,e,t){t==null&&(t=1e-4);var i=new Uint32Array(n.buffer),r={i0:0,i1:n.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=j.quantize.stats(n,r.i0,r.i1),r.est=j.quantize.estats(r.bst);for(var o=[r];o.lengths&&(s=o[c].est.L,a=c);if(s=d||l.i1<=d;if(h){l.est.L=0;continue}var u={i0:l.i0,i1:d,bst:null,est:null,tdst:0,left:null,right:null};u.bst=j.quantize.stats(n,u.i0,u.i1),u.est=j.quantize.estats(u.bst);var p={i0:d,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};p.bst={R:[],m:[],N:l.bst.N-u.bst.N};for(var c=0;c<16;c++)p.bst.R[c]=l.bst.R[c]-u.bst.R[c];for(var c=0;c<4;c++)p.bst.m[c]=l.bst.m[c]-u.bst.m[c];p.est=j.quantize.estats(p.bst),l.left=u,l.right=p,o[a]=u,o.push(p)}o.sort(function(f,m){return m.bst.N-f.bst.N});for(var c=0;c0&&(s=n.right,a=n.left);var c=j.quantize.getNearest(s,e,t,i,r);if(c.tdst<=o*o)return c;var l=j.quantize.getNearest(a,e,t,i,r);return l.tdsto;)i-=4;if(t>=i)break;var c=e[t>>2];e[t>>2]=e[i>>2],e[i>>2]=c,t+=4,i-=4}for(;s(n,t,r)>o;)t-=4;return t+4};j.quantize.vecDot=function(n,e,t){return n[e]*t[0]+n[e+1]*t[1]+n[e+2]*t[2]+n[e+3]*t[3]};j.quantize.stats=function(n,e,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=[0,0,0,0],o=t-e>>2,s=e;s>>0}};j.M4={multVec:function(n,e){return[n[0]*e[0]+n[1]*e[1]+n[2]*e[2]+n[3]*e[3],n[4]*e[0]+n[5]*e[1]+n[6]*e[2]+n[7]*e[3],n[8]*e[0]+n[9]*e[1]+n[10]*e[2]+n[11]*e[3],n[12]*e[0]+n[13]*e[1]+n[14]*e[2]+n[15]*e[3]]},dot:function(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]+n[3]*e[3]},sml:function(n,e){return[n*e[0],n*e[1],n*e[2],n*e[3]]}};j.encode.concatRGBA=function(n){for(var e=0,t=0;t{if(n===0)return Lo.Greyscale;if(n===2)return Lo.Truecolour;if(n===3)return Lo.IndexedColour;if(n===4)return Lo.GreyscaleWithAlpha;if(n===6)return Lo.TruecolourWithAlpha;throw new Error(`Unknown color type: ${n}`)},pP=n=>{let e=Math.floor(n.length/4),t=new Uint8Array(e*3),i=new Uint8Array(e*1),r=0,o=0,s=0;for(;r1)throw new Error("Animated PNGs are not supported");let r=new Uint8Array(i[0]),{rgbChannel:o,alphaChannel:s}=pP(r);this.rgbChannel=o,s.some(c=>c<255)&&(this.alphaChannel=s),this.type=fP(t.ctype),this.width=t.width,this.height=t.height,this.bitsPerComponent=8}};qs.load=n=>new qs(n);var K0=class n{static for(e){return Q(this,void 0,void 0,function*(){let t=qs.load(e);return new n(t)})}constructor(e){this.image=e,this.bitsPerComponent=e.bitsPerComponent,this.width=e.width,this.height=e.height,this.colorSpace="DeviceRGB"}embedIntoContext(e,t){return Q(this,void 0,void 0,function*(){let i=this.embedAlphaChannel(e),r=e.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:i});return t?(e.assign(t,r),t):e.register(r)})}embedAlphaChannel(e){if(!this.image.alphaChannel)return;let t=e.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return e.register(t)}},js=K0;var G0=class n{constructor(e,t,i){this.bytes=e,this.start=t||0,this.pos=this.start,this.end=t&&i?t+i:this.bytes.length}get length(){return this.end-this.start}get isEmpty(){return this.length===0}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getUint16(){let e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t}getInt32(){let e=this.getByte(),t=this.getByte(),i=this.getByte(),r=this.getByte();return(e<<24)+(t<<16)+(i<<8)+r}getBytes(e,t=!1){let i=this.bytes,r=this.pos,o=this.end;if(e){let s=r+e;s>o&&(s=o),this.pos=s;let a=i.subarray(r,s);return t?new Uint8ClampedArray(a):a}else{let s=i.subarray(r,o);return t?new Uint8ClampedArray(s):s}}peekByte(){let e=this.getByte();return this.pos--,e}peekBytes(e,t=!1){let i=this.getBytes(e,t);return this.pos-=i.length,i}skip(e){e||(e=1),this.pos+=e}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t){return new n(this.bytes,e,t)}decode(){return this.bytes}},Gd=G0;var gP=new Uint8Array(0),X0=class{constructor(e){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=gP,this.minBufferLength=512,e)for(;this.minBufferLengths&&(i=s)}else{for(;!this.eof;)this.readBlock();i=this.bufferLength}this.pos=i;let o=this.buffer.subarray(r,i);return t&&!(o instanceof Uint8ClampedArray)?new Uint8ClampedArray(o):o}peekByte(){let e=this.getByte();return this.pos--,e}peekBytes(e,t=!1){let i=this.getBytes(e,t);return this.pos-=i.length,i}skip(e){e||(e=1),this.pos+=e}reset(){this.pos=0}makeSubStream(e,t){let i=e+t;for(;this.bufferLength<=i&&!this.eof;)this.readBlock();return new Gd(this.buffer,e,t)}decode(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)}readBlock(){throw new Ze(this.constructor.name,"readBlock")}ensureBuffer(e){let t=this.buffer;if(e<=t.byteLength)return t;let i=this.minBufferLength;for(;in===32||n===9||n===13||n===10,Z0=class extends di{constructor(e,t){super(t),this.stream=e,this.input=new Uint8Array(5),t&&(t=.8*t)}readBlock(){let r=this.stream,o=r.getByte();for(;ny(o);)o=r.getByte();if(o===-1||o===126){this.eof=!0;return}let s=this.bufferLength,a,c;if(o===122){for(a=this.ensureBuffer(s+4),c=0;c<4;++c)a[s+c]=0;this.bufferLength+=4}else{let l=this.input;for(l[0]=o,c=1;c<5;++c){for(o=r.getByte();ny(o);)o=r.getByte();if(l[c]=o,o===-1||o===126)break}if(a=this.ensureBuffer(s+c-1),this.bufferLength+=c-1,c<5){for(;c<5;++c)l[c]=117;this.eof=!0}let d=0;for(c=0;c<5;++c)d=d*85+(l[c]-33);for(c=3;c>=0;--c)a[s+c]=d&255,d>>=8}}},ry=Z0;var Y0=class extends di{constructor(e,t){super(t),this.stream=e,this.firstDigit=-1,t&&(t=.5*t)}readBlock(){let t=this.stream.getBytes(8e3);if(!t.length){this.eof=!0;return}let i=t.length+1>>1,r=this.ensureBuffer(this.bufferLength+i),o=this.bufferLength,s=this.firstDigit;for(let a=0,c=t.length;a=48&&l<=57)d=l&15;else if(l>=65&&l<=70||l>=97&&l<=102)d=(l&15)+9;else if(l===62){this.eof=!0;break}else continue;s<0?s=d:(r[o++]=s<<4|d,s=-1)}s>=0&&this.eof&&(r[o++]=s<<4,s=-1),this.firstDigit=s,this.bufferLength=o}},oy=Y0;var sy=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mP=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),xP=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),bP=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],yP=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],_0=class extends di{constructor(e,t){super(t),this.stream=e;let i=e.getByte(),r=e.getByte();if(i===-1||r===-1)throw new Error(`Invalid header in flate stream: ${i}, ${r}`);if((i&15)!==8)throw new Error(`Unknown compression method in flate stream: ${i}, ${r}`);if(((i<<8)+r)%31!==0)throw new Error(`Bad FCHECK in flate stream: ${i}, ${r}`);if(r&32)throw new Error(`FDICT bit set in flate stream: ${i}, ${r}`);this.codeSize=0,this.codeBuf=0}readBlock(){let e,t,i=this.stream,r=this.getBits(3);if(r&1&&(this.eof=!0),r>>=1,r===0){let l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");let d=l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");if(d|=l<<8,(l=i.getByte())===-1)throw new Error("Bad block header in flate stream");let h=l;if((l=i.getByte())===-1)throw new Error("Bad block header in flate stream");if(h|=l<<8,h!==(~d&65535)&&(d!==0||h!==0))throw new Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;let u=this.bufferLength;e=this.ensureBuffer(u+d);let p=u+d;if(this.bufferLength=p,d===0)i.peekByte()===-1&&(this.eof=!0);else for(let f=u;f0;)x[p++]=w}o=this.generateHuffmanTable(x.subarray(0,l)),s=this.generateHuffmanTable(x.subarray(l,m))}else throw new Error("Unknown block type in flate stream");e=this.buffer;let a=e?e.length:0,c=this.bufferLength;for(;;){let l=this.getCode(o);if(l<256){c+1>=a&&(e=this.ensureBuffer(c+1),a=e.length),e[c++]=l;continue}if(l===256){this.bufferLength=c;return}l-=257,l=mP[l];let d=l>>16;d>0&&(d=this.getBits(d)),t=(l&65535)+d,l=this.getCode(s),l=xP[l],d=l>>16,d>0&&(d=this.getBits(d));let h=(l&65535)+d;c+t>=a&&(e=this.ensureBuffer(c+t),a=e.length);for(let u=0;u>e,this.codeSize=i-=e,o}getCode(e){let t=this.stream,i=e[0],r=e[1],o=this.codeSize,s=this.codeBuf,a;for(;o>16,d=c&65535;if(l<1||o>l,this.codeSize=o-l,d}generateHuffmanTable(e){let t=e.length,i=0,r;for(r=0;ri&&(i=e[r]);let o=1<>=1;for(r=h;r0;if(!y||y<256)m[0]=y,x=1;else if(y>=258)if(y=0;o--)m[o]=d[s],s=u[s];else m[x++]=m[0];else if(y===256){p=9,l=258,x=0;continue}else{this.eof=!0,delete this.lzwState;break}if(F&&(u[l]=f,h[l]=h[f]+1,d[l]=m[0],l++,p=l+c&l+c-1?p:Math.min(Math.log(l+c)/.6931471805599453+1,12)|0),f=y,g+=x,t>>t&(1<0){let o=this.stream.getBytes(r);t.set(o,i),i+=r}}else{r=257-r;let o=e[1];t=this.ensureBuffer(i+r+1);for(let s=0;s{if(e===v.of("FlateDecode"))return new ay(n);if(e===v.of("LZWDecode")){let i=1;if(t instanceof W){let r=t.lookup(v.of("EarlyChange"));r instanceof G&&(i=r.asNumber())}return new ly(n,void 0,i)}if(e===v.of("ASCII85Decode"))return new ry(n);if(e===v.of("ASCIIHexDecode"))return new oy(n);if(e===v.of("RunLengthDecode"))return new cy(n);throw new pl(e.asString())},Pr=({dict:n,contents:e,transform:t})=>{let i=new Gd(e);t&&(i=t.createStream(i,e.length));let r=n.lookup(v.of("Filter")),o=n.lookup(v.of("DecodeParms"));if(r instanceof v)i=dy(i,r,o);else if(r instanceof Z)for(let s=0,a=r.size();s{let e=n.MediaBox(),t=e.lookup(0,G).asNumber(),i=e.lookup(1,G).asNumber(),r=e.lookup(2,G).asNumber(),o=e.lookup(3,G).asNumber();return{left:Math.min(t,r),bottom:Math.min(i,o),right:Math.max(t,r),top:Math.max(i,o)}},wP=n=>[1,0,0,1,-n.left,-n.bottom],$0=class n{static for(e,t,i){return Q(this,void 0,void 0,function*(){return new n(e,t,i)})}constructor(e,t,i){this.page=e;let r=t!=null?t:vP(e);this.width=r.right-r.left,this.height=r.top-r.bottom,this.boundingBox=r,this.transformationMatrix=i!=null?i:wP(r)}embedIntoContext(e,t){return Q(this,void 0,void 0,function*(){let{Contents:i,Resources:r}=this.page.normalizedEntries();if(!i)throw new gl;let o=this.decodeContents(i),{left:s,bottom:a,right:c,top:l}=this.boundingBox,d=e.flateStream(o,{Type:"XObject",Subtype:"Form",FormType:1,BBox:[s,a,c,l],Matrix:this.transformationMatrix,Resources:r});return t?(e.assign(t,d),t):e.register(d)})}decodeContents(e){let t=Uint8Array.of(P.Newline),i=[];for(let r=0,o=e.size();rNumber.MAX_SAFE_INTEGER)if(this.capNumbers){let i=`Parsed number that is too large for some PDF readers: ${e}, using Number.MAX_SAFE_INTEGER instead.`;return console.warn(i),Number.MAX_SAFE_INTEGER}else{let i=`Parsed number that is too large for some PDF readers: ${e}, not capping.`;console.warn(i)}return t}skipWhitespace(){for(;!this.bytes.done()&&ci[this.bytes.peek()];)this.bytes.next()}skipLine(){for(;!this.bytes.done();){let e=this.bytes.peek();if(e===hy||e===uy)return;this.bytes.next()}}skipComment(){if(this.bytes.peek()!==P.Percent)return!1;for(;!this.bytes.done();){let e=this.bytes.peek();if(e===hy||e===uy)return!0;this.bytes.next()}return!0}skipWhitespaceAndComments(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()}matchKeyword(e){let t=this.bytes.offset();for(let i=0,r=e.length;i=this.length}offset(){return this.idx}slice(e,t){return this.bytes.slice(e,t)}position(){return{line:this.line,column:this.column,offset:this.idx}}};Mo.of=n=>new Mo(n);Mo.fromPDFRawStream=n=>Mo.of(Pr(n).decode());var kr=Mo;var{Space:FP,CarriageReturn:ec,Newline:tc}=P,ic=[P.s,P.t,P.r,P.e,P.a,P.m],Zd=[P.e,P.n,P.d,P.s,P.t,P.r,P.e,P.a,P.m],Ie={header:[P.Percent,P.P,P.D,P.F,P.Dash],eof:[P.Percent,P.Percent,P.E,P.O,P.F],obj:[P.o,P.b,P.j],endobj:[P.e,P.n,P.d,P.o,P.b,P.j],xref:[P.x,P.r,P.e,P.f],trailer:[P.t,P.r,P.a,P.i,P.l,P.e,P.r],startxref:[P.s,P.t,P.a,P.r,P.t,P.x,P.r,P.e,P.f],true:[P.t,P.r,P.u,P.e],false:[P.f,P.a,P.l,P.s,P.e],null:[P.n,P.u,P.l,P.l],stream:ic,streamEOF1:[...ic,FP,ec,tc],streamEOF2:[...ic,ec,tc],streamEOF3:[...ic,ec],streamEOF4:[...ic,tc],endstream:Zd,EOF1endstream:[ec,tc,...Zd],EOF2endstream:[ec,...Zd],EOF3endstream:[tc,...Zd]};var No=class extends fy{constructor(e,t,i=!1,r){super(e,i),this.context=t,this.cryptoFactory=r}parseObject(e){if(this.skipWhitespaceAndComments(),this.matchKeyword(Ie.true))return Li.True;if(this.matchKeyword(Ie.false))return Li.False;if(this.matchKeyword(Ie.null))return He;let t=this.bytes.peek();if(t===P.LessThan&&this.bytes.peekAhead(1)===P.LessThan)return this.parseDictOrStream(e);if(t===P.LessThan)return this.parseHexString(e);if(t===P.LeftParen)return this.parseString(e);if(t===P.ForwardSlash)return this.parseName();if(t===P.LeftSquareBracket)return this.parseArray(e);if($l[t])return this.parseNumberOrRef();throw new Dl(this.bytes.position(),t)}parseNumberOrRef(){let e=this.parseRawNumber();this.skipWhitespaceAndComments();let t=this.bytes.offset();if(it[this.bytes.peek()]){let i=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===P.R)return this.bytes.assertNext(P.R),Y.of(e,i)}return this.bytes.moveTo(t),G.of(e)}parseHexString(e){let t="";for(this.bytes.assertNext(P.LessThan);!this.bytes.done()&&this.bytes.peek()!==P.GreaterThan;)t+=Mt(this.bytes.next());return this.bytes.assertNext(P.GreaterThan),this.cryptoFactory&&e&&(t=this.cryptoFactory.createCipherTransform(e.objectNumber,e.generationNumber).decryptBytes(K.of(t).asBytes()).reduce((o,s)=>o+s.toString(16).padStart(2,"0"),"")),K.of(t)}parseString(e){let t=0,i=!1,r="";for(;!this.bytes.done();){let o=this.bytes.next();if(r+=Mt(o),i||(o===P.LeftParen&&(t+=1),o===P.RightParen&&(t-=1)),o===P.BackSlash?i=!i:i&&(i=!1),t===0){let s=r.substring(1,r.length-1);return this.cryptoFactory&&e&&(s=this.cryptoFactory.createCipherTransform(e.objectNumber,e.generationNumber).decryptString(s)),J.of(s)}}throw new Cl(this.bytes.position())}parseName(){this.bytes.assertNext(P.ForwardSlash);let e="";for(;!this.bytes.done();){let t=this.bytes.peek();if(ci[t]||Ht[t])break;e+=Mt(t),this.bytes.next()}return v.of(e)}parseArray(e){this.bytes.assertNext(P.LeftSquareBracket),this.skipWhitespaceAndComments();let t=Z.withContext(this.context);for(;this.bytes.peek()!==P.RightSquareBracket;){let i=this.parseObject(e);t.push(i),this.skipWhitespaceAndComments()}return this.bytes.assertNext(P.RightSquareBracket),t}parseDict(e){this.bytes.assertNext(P.LessThan),this.bytes.assertNext(P.LessThan),this.skipWhitespaceAndComments();let t=new Map;for(;!this.bytes.done()&&this.bytes.peek()!==P.GreaterThan&&this.bytes.peekAhead(1)!==P.GreaterThan;){let r=this.parseName(),o=this.parseObject(e);t.set(r,o),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(P.GreaterThan),this.bytes.assertNext(P.GreaterThan);let i=t.get(v.of("Type"));return i===v.of("Catalog")?yr.fromMapWithContext(t,this.context):i===v.of("Pages")?vr.fromMapWithContext(t,this.context):i===v.of("Page")?et.fromMapWithContext(t,this.context):W.fromMapWithContext(t,this.context)}parseDictOrStream(e){let t=this.bytes.position(),i=this.parseDict(e);if(this.skipWhitespaceAndComments(),!this.matchKeyword(Ie.streamEOF1)&&!this.matchKeyword(Ie.streamEOF2)&&!this.matchKeyword(Ie.streamEOF3)&&!this.matchKeyword(Ie.streamEOF4)&&!this.matchKeyword(Ie.stream))return i;let r=this.bytes.offset(),o,s=i.get(v.of("Length"));s instanceof G?(o=r+s.asNumber(),this.bytes.moveTo(o),this.skipWhitespaceAndComments(),this.matchKeyword(Ie.endstream)||(this.bytes.moveTo(r),o=this.findEndOfStreamFallback(t))):o=this.findEndOfStreamFallback(t);let a=this.bytes.slice(r,o);return this.cryptoFactory&&e&&(a=this.cryptoFactory.createCipherTransform(e.objectNumber,e.generationNumber).decryptBytes(a)),Mi.of(i,a)}findEndOfStreamFallback(e){let t=1,i=this.bytes.offset();for(;!this.bytes.done()&&(i=this.bytes.offset(),this.matchKeyword(Ie.stream)?t+=1:this.matchKeyword(Ie.EOF1endstream)||this.matchKeyword(Ie.EOF2endstream)||this.matchKeyword(Ie.EOF3endstream)||this.matchKeyword(Ie.endstream)?t-=1:this.bytes.next(),t!==0););if(t!==0)throw new kl(e);return i}};No.forBytes=(n,e,t)=>new No(kr.of(n),e,t);No.forByteStream=(n,e,t=!1)=>new No(n,e,t);var Ks=No;var nc=class extends Ks{constructor(e,t){super(kr.fromPDFRawStream(e),e.dict.context);let{dict:i}=e;this.alreadyParsed=!1,this.shouldWaitForTick=t||(()=>!1),this.firstOffset=i.lookup(v.of("First"),G).asNumber(),this.objectCount=i.lookup(v.of("N"),G).asNumber()}parseIntoContext(){return Q(this,void 0,void 0,function*(){if(this.alreadyParsed)throw new Pn("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0;let e=this.parseOffsetsAndObjectNumbers();for(let t=0,i=e.length;tnew nc(n,e);var Yd=nc;var rc=class{constructor(e){this.alreadyParsed=!1,this.dict=e.dict,this.bytes=kr.fromPDFRawStream(e),this.context=this.dict.context;let t=this.dict.lookup(v.of("Size"),G),i=this.dict.lookup(v.of("Index"));if(i instanceof Z){this.subsections=[];for(let o=0,s=i.size();onew rc(n);var _d=rc;var oc=class extends Ks{constructor(e,t=1/0,i=!1,r=!1,o=!1,s){super(kr.of(e),po.create(),o,s),this.alreadyParsed=!1,this.parsedObjects=0,this.shouldWaitForTick=()=>(this.parsedObjects+=1,this.parsedObjects%this.objectsPerTick===0),this.objectsPerTick=t,this.throwOnInvalidObject=i,this.warnOnInvalidObjects=r,this.context.isDecrypted=!!(s!=null&&s.encryptionKey)}parseDocument(){return Q(this,void 0,void 0,function*(){if(this.alreadyParsed)throw new Pn("PDFParser","parseDocument");this.alreadyParsed=!0,this.context.header=this.parseHeader();let e;for(;!this.bytes.done();){yield this.parseDocumentSection();let t=this.bytes.offset();if(t===e)throw new Sl(this.bytes.position());e=t}return this.maybeRecoverRoot(),this.context.lookup(Y.of(0))&&(console.warn("Removing parsed object: 0 0 R"),this.context.delete(Y.of(0))),this.context})}maybeRecoverRoot(){let e=i=>i instanceof W&&i.lookup(v.of("Type"))===v.of("Catalog"),t=this.context.lookup(this.context.trailerInfo.Root);if(!e(t)){let i=this.context.enumerateIndirectObjects();for(let r=0,o=i.length;r=P.Space&&t<=P.Tilde&&(this.matchKeyword(Ie.xref)||this.matchKeyword(Ie.trailer)||this.matchKeyword(Ie.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(e);break}this.bytes.next()}}skipBinaryHeaderComment(){this.skipWhitespaceAndComments();try{let e=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(e)}catch(e){this.bytes.next(),this.skipWhitespaceAndComments()}}};oc.forBytesWithOptions=(n,e,t,i,r,o)=>new oc(n,e,t,i,r,o);var sc=oc;var fe=Wi(wv(),1),rp=class n{static create(e,t){return new n(e,t)}constructor(e,t){if(!t.ownerPassword&&!t.userPassword)throw new Error("Either an owner password or a user password must be specified.");this.context=e,this.initialize(t)}initialize(e){this.id=DP();let t;switch(this.context.header.getVersionString()){case"1.4":case"1.5":t=2;break;case"1.6":case"1.7":t=4;break;case"1.7ext3":t=5;break;default:t=1;break}switch(t){case 1:case 2:case 4:this.encryption=this.initializeV1V2V4(t,e);break;case 5:this.encryption=this.initializeV5(e);break}}initializeV1V2V4(e,t){let i={Filter:"Standard"},r,o;switch(e){case 1:r=2,this.keyBits=40,o=PP(t.permissions);break;case 2:r=3,this.keyBits=128,o=np(t.permissions);break;case 4:r=4,this.keyBits=128,o=np(t.permissions);break;default:throw new Error(`Unsupported algorithm '${e}'.`)}let s=Mh(t.userPassword),a=t.ownerPassword?Mh(t.ownerPassword):s,c=SP(r,this.keyBits,s,a);this.encryptionKey=EP(r,this.keyBits,this.id,s,c,o);let l;return r===2?l=kP(this.encryptionKey):l=CP(this.id,this.encryptionKey),i.V=e,e>=2&&(i.Length=this.keyBits),e===4&&(i.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV2",Length:this.keyBits/8}},i.StmF="StdCF",i.StrF="StdCF"),i.R=r,i.O=tn(c),i.U=tn(l),i.P=o,i}initializeV5(e){let t={Filter:"Standard"};this.keyBits=256,this.encryptionKey=OP(lc);let i=Fv(e.userPassword),r=TP(i,lc),o=fe.default.lib.WordArray.create(r.words.slice(10,12),8),s=AP(i,o,this.encryptionKey),a=e.ownerPassword?Fv(e.ownerPassword):i,c=IP(a,r,lc),l=fe.default.lib.WordArray.create(c.words.slice(10,12),8),d=BP(a,l,r,this.encryptionKey),h=np(e.permissions),u=LP(h,this.encryptionKey,lc);return t.V=5,t.Length=this.keyBits,t.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV3",Length:this.keyBits/8}},t.StmF="StdCF",t.StrF="StdCF",t.R=5,t.O=tn(c),t.OE=tn(d),t.U=tn(r),t.UE=tn(s),t.P=h,t.Perms=tn(u),t}getEncryptFn(e,t){let i=this.encryption.V,r,o;if(i<5){if(r=this.encryptionKey.clone().concat(fe.default.lib.WordArray.create([(e&255)<<24|(e&65280)<<8|e>>8&65280|t&255,(t&65280)<<16],5)),i===1||i===2)return o=fe.default.MD5(r),o.sigBytes=Math.min(16,this.keyBits/8+5),c=>tn(fe.default.RC4.encrypt(fe.default.lib.WordArray.create(c),o).ciphertext);i===4&&(o=fe.default.MD5(r.concat(fe.default.lib.WordArray.create([1933667412],4))))}else if(i===5)o=this.encryptionKey;else throw new Error(`Unsupported algorithm '${i}'.`);let s=lc(16),a={mode:fe.default.mode.CBC,padding:fe.default.pad.Pkcs7,iv:s};return c=>tn(s.clone().concat(fe.default.AES.encrypt(fe.default.lib.WordArray.create(c),o,a).ciphertext))}encrypt(){let e=this.context.obj([this.id,this.id]);this.context.trailerInfo.ID=e;let t=this.context.obj(this.encryption);return this.context.trailerInfo.Encrypt=this.context.register(t),this}},DP=()=>tn(fe.default.MD5(Date.now().toString())),lc=n=>fe.default.lib.WordArray.random(n),PP=(n={})=>{let e=-64;return n.printing&&(e|=4),n.modifying&&(e|=8),n.copying&&(e|=16),n.annotating&&(e|=32),e},np=(n={})=>{let e=-3904;return(n.printing==="lowResolution"||n.printing)&&(e|=4),n.printing==="highResolution"&&(e|=2052),n.modifying&&(e|=8),n.copying&&(e|=16),n.annotating&&(e|=32),n.fillingForms&&(e|=256),n.contentAccessibility&&(e|=512),n.documentAssembly&&(e|=1024),e},kP=n=>fe.default.RC4.encrypt(Mh(),n).ciphertext,CP=(n,e)=>{let t=e.clone(),i=fe.default.MD5(Mh().concat(fe.default.lib.WordArray.create(n)));for(let r=0;r<20;r++){let o=Math.ceil(t.sigBytes/4);for(let s=0;s{let r=i,o=n>=3?51:1;for(let c=0;c=3?20:1;for(let c=0;c{let s=i.clone().concat(r).concat(fe.default.lib.WordArray.create([Dv(o)],4)).concat(fe.default.lib.WordArray.create(t)),a=n>=3?51:1;for(let c=0;c{let t=e(8),i=e(8);return fe.default.SHA256(n.clone().concat(t)).concat(t).concat(i)},AP=(n,e,t)=>{let i=fe.default.SHA256(n.clone().concat(e)),r={mode:fe.default.mode.CBC,padding:fe.default.pad.NoPadding,iv:fe.default.lib.WordArray.create(null,16)};return fe.default.AES.encrypt(t,i,r).ciphertext},IP=(n,e,t)=>{let i=t(8),r=t(8);return fe.default.SHA256(n.clone().concat(i).concat(e)).concat(i).concat(r)},BP=(n,e,t,i)=>{let r=fe.default.SHA256(n.clone().concat(e).concat(t)),o={mode:fe.default.mode.CBC,padding:fe.default.pad.NoPadding,iv:fe.default.lib.WordArray.create(null,16)};return fe.default.AES.encrypt(i,r,o).ciphertext},OP=n=>n(32),LP=(n,e,t)=>{let i=fe.default.lib.WordArray.create([Dv(n),4294967295,1415668834],12).concat(t(4)),r={mode:fe.default.mode.ECB,padding:fe.default.pad.NoPadding};return fe.default.AES.encrypt(i,e,r).ciphertext},Mh=(n="")=>{let e=new Uint8Array(32),t=n.length,i=0;for(;i255)throw new Error("Password contains one or more invalid characters.");e[i]=r,i++}for(;i<32;)e[i]=MP[i-t],i++;return fe.default.lib.WordArray.create(e)},Fv=(n="")=>{let e=Math.min(127,n.length),t=new Uint8Array(e);for(let i=0;i(n&255)<<24|(n&65280)<<8|n>>8&65280|n>>24&255,tn=n=>{let e=[];for(let t=0;t>8*(3-t%4)&255);return Uint8Array.from(e)},MP=[40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122],Nh=rp;var nn=n=>1<n instanceof v?n:v.of(n),$=n=>n instanceof G?n:G.of(n),de=n=>n instanceof G?n.asNumber():n;var Nn;(function(n){n.Degrees="degrees",n.Radians="radians"})(Nn||(Nn={}));var NP=n=>(T(n,"radianAngle",["number"]),{type:Nn.Radians,angle:n}),te=n=>(T(n,"degreeAngle",["number"]),{type:Nn.Degrees,angle:n}),hi=n=>n*Math.PI/180,Pv=n=>n*180/Math.PI,ut=n=>n.type===Nn.Radians?n.angle:n.type===Nn.Degrees?hi(n.angle):sr(`Invalid rotation: ${JSON.stringify(n)}`),rn=n=>n.type===Nn.Radians?Pv(n.angle):n.type===Nn.Degrees?n.angle:sr(`Invalid rotation: ${JSON.stringify(n)}`),ui=(n=0)=>{let e=n/90%4;return e===0?0:e===1?90:e===2?180:e===3?270:0},on=(n,e=0)=>{let t=ui(e);return t===90||t===270?{width:n.height,height:n.width}:{width:n.width,height:n.height}},op=(n,e=0,t=0)=>{let{x:i,y:r,width:o,height:s}=n,a=ui(t),c=e/2;return a===0?{x:i-c,y:r-c,width:o,height:s}:a===90?{x:i-s+c,y:r-c,width:s,height:o}:a===180?{x:i-o+c,y:r-s+c,width:o,height:s}:a===270?{x:i-c,y:r-o+c,width:s,height:o}:{x:i-c,y:r-c,width:o,height:s}};var cc=()=>le.of(ce.ClipNonZero),RP=()=>le.of(ce.ClipEvenOdd),{cos:Rh,sin:Vh,tan:Hh}=Math,an=(n,e,t,i,r,o)=>le.of(ce.ConcatTransformationMatrix,[$(n),$(e),$(t),$(i),$(r),$(o)]),Ut=(n,e)=>an(1,0,0,1,n,e),Er=(n,e)=>an(n,0,0,e,0,0),Xs=n=>an(Rh(de(n)),Vh(de(n)),-Vh(de(n)),Rh(de(n)),0,0),Zs=n=>Xs(hi(de(n))),dc=(n,e)=>an(1,Hh(de(n)),Hh(de(e)),1,0,0),VP=(n,e)=>dc(hi(de(n)),hi(de(e))),hc=(n,e)=>le.of(ce.SetLineDashPattern,[`[${n.map($).join(" ")}]`,$(e)]),HP=()=>hc([],0),fi;(function(n){n[n.Butt=0]="Butt",n[n.Round=1]="Round",n[n.Projecting=2]="Projecting"})(fi||(fi={}));var zh=n=>le.of(ce.SetLineCapStyle,[$(n)]),Vo;(function(n){n[n.Miter=0]="Miter",n[n.Round=1]="Round",n[n.Bevel=2]="Bevel"})(Vo||(Vo={}));var zP=n=>le.of(ce.SetLineJoinStyle,[$(n)]),Tr=n=>le.of(ce.SetGraphicsStateParams,[Gs(n)]),Ye=()=>le.of(ce.PushGraphicsState),_e=()=>le.of(ce.PopGraphicsState),Ho=n=>le.of(ce.SetLineWidth,[$(n)]),zo=(n,e,t,i,r,o)=>le.of(ce.AppendBezierCurve,[$(n),$(e),$(t),$(i),$(r),$(o)]),Ys=(n,e,t,i)=>le.of(ce.CurveToReplicateInitialPoint,[$(n),$(e),$(t),$(i)]),Ar=()=>le.of(ce.ClosePath),Ni=(n,e)=>le.of(ce.MoveTo,[$(n),$(e)]),Je=(n,e)=>le.of(ce.LineTo,[$(n),$(e)]),kv=(n,e,t,i)=>le.of(ce.AppendRectangle,[$(n),$(e),$(t),$(i)]),UP=(n,e,t)=>kv(n,e,t,t),uc=()=>le.of(ce.StrokePath),sn;(function(n){n.NonZero="f",n.EvenOdd="f*"})(sn||(sn={}));var ap=()=>le.of(ce.FillNonZero),lp=()=>le.of(ce.FillEvenOdd),cp=()=>le.of(ce.FillNonZeroAndStroke),fc=()=>le.of(ce.EndPath),dp=()=>le.of(ce.NextLine),qP=(n,e)=>le.of(ce.MoveText,[$(n),$(e)]),pc=n=>le.of(ce.ShowText,[n]),gc=()=>le.of(ce.BeginText),mc=()=>le.of(ce.EndText),Uo=(n,e)=>le.of(ce.SetFontAndSize,[Gs(n),$(e)]),jP=n=>le.of(ce.SetCharacterSpacing,[$(n)]),WP=n=>le.of(ce.SetWordSpacing,[$(n)]),KP=n=>le.of(ce.SetTextHorizontalScaling,[$(n)]),hp=n=>le.of(ce.SetTextLineHeight,[$(n)]),GP=n=>le.of(ce.SetTextRise,[$(n)]),sp;(function(n){n[n.Fill=0]="Fill",n[n.Outline=1]="Outline",n[n.FillAndOutline=2]="FillAndOutline",n[n.Invisible=3]="Invisible",n[n.FillAndClip=4]="FillAndClip",n[n.OutlineAndClip=5]="OutlineAndClip",n[n.FillAndOutlineAndClip=6]="FillAndOutlineAndClip",n[n.Clip=7]="Clip"})(sp||(sp={}));var Uh=n=>le.of(ce.SetTextRenderingMode,[$(n)]),Cv=(n,e,t,i,r,o)=>le.of(ce.SetTextMatrix,[$(n),$(e),$(t),$(i),$(r),$(o)]),_s=(n,e,t,i,r)=>Cv(Rh(de(n)),Vh(de(n))+Hh(de(e)),-Vh(de(n))+Hh(de(t)),Rh(de(n)),i,r),XP=(n,e,t,i,r)=>_s(hi(de(n)),hi(de(e)),hi(de(t)),i,r),Js=n=>le.of(ce.DrawObject,[Gs(n)]),up=n=>le.of(ce.NonStrokingColorGray,[$(n)]),fp=n=>le.of(ce.StrokingColorGray,[$(n)]),pp=(n,e,t)=>le.of(ce.NonStrokingColorRgb,[$(n),$(e),$(t)]),gp=(n,e,t)=>le.of(ce.StrokingColorRgb,[$(n),$(e),$(t)]),mp=(n,e,t,i)=>le.of(ce.NonStrokingColorCmyk,[$(n),$(e),$(t),$(i)]),xp=(n,e,t,i)=>le.of(ce.StrokingColorCmyk,[$(n),$(e),$(t),$(i)]),qh=n=>le.of(ce.BeginMarkedContent,[Gs(n)]),jh=()=>le.of(ce.EndMarkedContent);var Gv=Wi(Kv(),1),Tt;(function(n){n.Grayscale="Grayscale",n.RGB="RGB",n.CMYK="CMYK"})(Tt||(Tt={}));var Zh=n=>(bt(n,"gray",0,1),{type:Tt.Grayscale,gray:n}),pe=(n,e,t)=>(bt(n,"red",0,1),bt(e,"green",0,1),bt(t,"blue",0,1),{type:Tt.RGB,red:n,green:e,blue:t}),Yh=(n,e,t,i)=>(bt(n,"cyan",0,1),bt(e,"magenta",0,1),bt(t,"yellow",0,1),bt(i,"key",0,1),{type:Tt.CMYK,cyan:n,magenta:e,yellow:t,key:i}),Dp=n=>{T(n,"color",["string"]);let e=(0,Gv.default)(n).unitObject();return{rgb:pe(e.r,e.g,e.b),alpha:e.alpha}},ln=n=>n.type===Tt.Grayscale?up(n.gray):n.type===Tt.RGB?pp(n.red,n.green,n.blue):n.type===Tt.CMYK?mp(n.cyan,n.magenta,n.yellow,n.key):sr(`Invalid color: ${JSON.stringify(n)}`),qo=n=>n.type===Tt.Grayscale?fp(n.gray):n.type===Tt.RGB?gp(n.red,n.green,n.blue):n.type===Tt.CMYK?xp(n.cyan,n.magenta,n.yellow,n.key):sr(`Invalid color: ${JSON.stringify(n)}`),vt=(n,e=1)=>(n==null?void 0:n.length)===1?Zh(n[0]*e):(n==null?void 0:n.length)===3?pe(n[0]*e,n[1]*e,n[2]*e):(n==null?void 0:n.length)===4?Yh(n[0]*e,n[1]*e,n[2]*e,n[3]*e):void 0,_h=n=>n.type===Tt.Grayscale?[n.gray]:n.type===Tt.RGB?[n.red,n.green,n.blue]:n.type===Tt.CMYK?[n.cyan,n.magenta,n.yellow,n.key]:sr(`Invalid color: ${JSON.stringify(n)}`);var ie=0,ne=0,De=0,Pe=0,vc=0,wc=0,Xv=new Map([["A",7],["a",7],["C",6],["c",6],["H",1],["h",1],["L",2],["l",2],["M",2],["m",2],["Q",4],["q",4],["S",4],["s",4],["T",2],["t",2],["V",1],["v",1],["Z",0],["z",0]]),ck=n=>{let e,t=[],i=[],r="",o=!1,s=0;for(let a of n)if(Xv.has(a))s=Xv.get(a),e&&(r.length>0&&(i[i.length]=+r),t[t.length]={cmd:e,args:i},i=[],r="",o=!1),e=a;else if([" ",","].includes(a)||a==="-"&&r.length>0&&r[r.length-1]!=="e"||a==="."&&o){if(r.length===0)continue;i.length===s?(t[t.length]={cmd:e,args:i},i=[+r],e==="M"&&(e="L"),e==="m"&&(e="l")):i[i.length]=+r,o=a===".",r=["-","."].includes(a)?a:""}else r+=a,a==="."&&(o=!0);return r.length>0&&(i.length===s?(t[t.length]={cmd:e,args:i},i=[+r],e==="M"&&(e="L"),e==="m"&&(e="l")):i[i.length]=+r),t[t.length]={cmd:e,args:i},t},dk=n=>{ie=ne=De=Pe=vc=wc=0;let e=[];for(let t=0;t{let[i,r,o,s,a,c,l]=t,d=hk(c,l,i,r,s,a,o,n,e),h=[];for(let u of d){let p=uk(...u);h.push(zo(...p))}return h},hk=(n,e,t,i,r,o,s,a,c)=>{let l=s*(Math.PI/180),d=Math.sin(l),h=Math.cos(l);t=Math.abs(t),i=Math.abs(i),De=h*(a-n)*.5+d*(c-e)*.5,Pe=h*(c-e)*.5-d*(a-n)*.5;let u=De*De/(t*t)+Pe*Pe/(i*i);u>1&&(u=Math.sqrt(u),t*=u,i*=u);let p=h/t,f=d/t,m=-d/i,x=h/i,g=p*a+f*c,b=m*a+x*c,w=p*n+f*e,y=m*n+x*e,D=1/((w-g)*(w-g)+(y-b)*(y-b))-.25;D<0&&(D=0);let C=Math.sqrt(D);o===r&&(C=-C);let k=.5*(g+w)-C*(y-b),E=.5*(b+y)+C*(w-g),B=Math.atan2(b-E,g-k),I=Math.atan2(y-E,w-k)-B;I<0&&o===1?I+=2*Math.PI:I>0&&o===0&&(I-=2*Math.PI);let O=Math.ceil(Math.abs(I/(Math.PI*.5+.001))),A=[];for(let N=0;N{let c=a*r,l=-s*o,d=s*r,h=a*o,u=.5*(i-t),p=8/3*Math.sin(u*.5)*Math.sin(u*.5)/Math.sin(u),f=n+Math.cos(t)-p*Math.sin(t),m=e+Math.sin(t)+p*Math.cos(t),x=n+Math.cos(i),g=e+Math.sin(i),b=x+p*Math.sin(i),w=g-p*Math.cos(i);return[c*f+l*m,d*f+h*m,c*b+l*w,d*b+h*w,c*x+l*g,d*x+h*g]},_v=n=>dk(ck(n));var oa=Wi(Ap(),1);var pi=class{constructor(e,t={}){this.svg=e,this.images=t}};var Re;(function(n){n.Normal="Normal",n.Multiply="Multiply",n.Screen="Screen",n.Overlay="Overlay",n.Darken="Darken",n.Lighten="Lighten",n.ColorDodge="ColorDodge",n.ColorBurn="ColorBurn",n.HardLight="HardLight",n.SoftLight="SoftLight",n.Difference="Difference",n.Exclusion="Exclusion"})(Re||(Re={}));var Dc=[1,0,0,1,0,0];var Zt=([n,e,t,i,r,o],[s,a,c,l,d,h])=>[n*s+t*a,e*s+i*a,n*c+t*l,e*c+i*l,n*d+t*h+r,e*d+i*h+o],eu=([n,e,t,i,r,o],{x:s,y:a})=>({x:n*s+t*a+r,y:e*s+i*a+o}),gi=(n,e)=>{switch(n){case"scale":case"scaleX":case"scaleY":{let[t,i=t]=e;return[n==="scaleY"?1:t,0,0,n==="scaleX"?1:i,0,0]}case"translate":case"translateX":case"translateY":{let[t,i=t]=e;return[1,0,0,1,n==="translateY"?0:t,n==="translateX"?0:-i]}case"rotate":{let[t,i=0,r=0]=e,o=gi("translate",[i,r]),s=gi("translate",[-i,-r]),a=hi(-t),c=[Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0];return Zt(Zt(o,c),s)}case"skewY":case"skewX":{let t=hi(-e[0]),i=Math.tan(t);return[1,n==="skewY"?i:0,n==="skewX"?i:0,1,0,0]}case"matrix":{let[t,i,r,o,s,a]=e,c=gi("scale",[1,-1]);return Zt(Zt(c,[t,i,r,o,s,a]),c)}default:return Dc}},Vn=(n,e,t)=>Zt(n,gi(e,t)),Ak={butt:fi.Butt,round:fi.Round,square:fi.Projecting},Ik={evenodd:sn.EvenOdd,nonzero:sn.NonZero},Bk={bevel:Vo.Bevel,miter:Vo.Miter,round:Vo.Round},lw=(n,e)=>({text(t){let i=t.svgAttributes.textAnchor,r=t.svgAttributes.dominantBaseline,o=t.text.trim().replace(/\s/g," "),s=t.svgAttributes.fontSize||12,a=(f,m)=>{let x=f.fontFamily;if(!x)return;let g=f.fontWeight==="bold"||Number(f.fontWeight)>=700,b=f.fontStyle==="italic",w=(F,D,C)=>m[C+(F?"_bold":"")+(D?"_italic":"")],y=Object.keys(m).find(F=>F.startsWith(x));return w(g,b,x)||w(g,!1,x)||w(!1,b,x)||w(!1,!1,x)||(y?m[y]:void 0)},c=e.fonts&&a(t.svgAttributes,e.fonts),l=(c||n.getFont()[0]).widthOfTextAtSize(o,s),d=(c||n.getFont()[0]).heightAtSize(s),h=(c||n.getFont()[0]).heightAtSize(s,{descender:!1}),u=i==="middle"?l/2:i==="end"?l:0,p=0;switch(r){case"middle":case"central":p=h-d/2;break;case"mathematical":p=s*.6;break;case"hanging":p=h;break;case"text-before-edge":p=s;break;case"ideographic":case"text-after-edge":p=h-d;break;case"text-top":case"text-bottom":case"auto":case"use-script":case"no-change":case"reset-size":case"alphabetic":default:p=0;break}n.drawText(o,{x:-u,y:-p,font:c,size:s,color:t.svgAttributes.fill,opacity:t.svgAttributes.fillOpacity,matrix:t.svgAttributes.matrix,clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},line(t){n.drawLine({start:{x:t.svgAttributes.x1||0,y:-t.svgAttributes.y1||0},end:{x:t.svgAttributes.x2||0,y:-t.svgAttributes.y2||0},thickness:t.svgAttributes.strokeWidth,color:t.svgAttributes.stroke,opacity:t.svgAttributes.strokeOpacity,lineCap:t.svgAttributes.strokeLineCap,matrix:t.svgAttributes.matrix,clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},path(t){t.svgAttributes.d&&n.drawSvgPath(t.svgAttributes.d,{x:0,y:0,borderColor:t.svgAttributes.stroke,borderWidth:t.svgAttributes.strokeWidth,borderOpacity:t.svgAttributes.strokeOpacity,borderLineCap:t.svgAttributes.strokeLineCap,color:t.svgAttributes.fill,opacity:t.svgAttributes.fillOpacity,fillRule:t.svgAttributes.fillRule,matrix:Vn(t.svgAttributes.matrix,"scale",[1,-1]),clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},image(t){var i,r;let{src:o}=t.svgAttributes;if(!(o&&(!((i=e.images)===null||i===void 0)&&i[o])))return;let s=(r=e.images)===null||r===void 0?void 0:r[o],{x:a,y:c,width:l,height:d}=Ok(s.width,s.height,t.svgAttributes.width||s.width,t.svgAttributes.height||s.height,t.svgAttributes.preserveAspectRatio);n.drawImage(s,{x:a,y:-c-d,width:l,height:d,opacity:t.svgAttributes.fillOpacity,matrix:t.svgAttributes.matrix,clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},rect(t){!t.svgAttributes.fill&&!t.svgAttributes.stroke||n.drawRectangle({x:0,y:0,width:t.svgAttributes.width,height:t.svgAttributes.height,rx:t.svgAttributes.rx,ry:t.svgAttributes.ry,borderColor:t.svgAttributes.stroke,borderWidth:t.svgAttributes.strokeWidth,borderOpacity:t.svgAttributes.strokeOpacity,borderLineCap:t.svgAttributes.strokeLineCap,color:t.svgAttributes.fill,opacity:t.svgAttributes.fillOpacity,matrix:Vn(t.svgAttributes.matrix,"translateY",[t.svgAttributes.height]),clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},ellipse(t){n.drawEllipse({x:t.svgAttributes.cx||0,y:-(t.svgAttributes.cy||0),xScale:t.svgAttributes.rx,yScale:t.svgAttributes.ry,borderColor:t.svgAttributes.stroke,borderWidth:t.svgAttributes.strokeWidth,borderOpacity:t.svgAttributes.strokeOpacity,borderLineCap:t.svgAttributes.strokeLineCap,color:t.svgAttributes.fill,opacity:t.svgAttributes.fillOpacity,matrix:t.svgAttributes.matrix,clipSpaces:t.svgAttributes.clipSpaces,blendMode:t.svgAttributes.blendMode||e.blendMode})},circle(t){return lw(n,e).ellipse(t)}}),gt=(n,e,t,i)=>{let r=e[t]||n[t];return!r&&typeof i!="undefined"?i:r},cw=n=>{let e=/([^:\s]+)*\s*:\s*([^;]+)/g,t={},i=e.exec(n);for(;i!==null;)t[i[1]]=i[2],i=e.exec(n);return t},Ip=(n,e)=>{if(!n||n.length===0||["none","transparent"].includes(n))return;if(n==="currentColor")return e||Ip("#000000");let t=Dp(n);return{rgb:t.rgb,alpha:t.alpha?t.alpha+"":void 0}},Bp=(n,e,t)=>{var i,r,o,s;let a=n.attributes,c=cw(a.style),l=gt(a,c,"width",""),d=gt(a,c,"height",""),h=Ip(gt(a,c,"fill")),u=gt(a,c,"fill-opacity"),p=gt(a,c,"opacity"),f=Ip(gt(a,c,"stroke")),m=gt(a,c,"stroke-opacity"),x=gt(a,c,"stroke-linecap"),g=gt(a,c,"stroke-linejoin"),b=gt(a,c,"fill-rule"),w=gt(a,c,"stroke-width"),y=gt(a,c,"font-family"),F=gt(a,c,"font-style"),D=gt(a,c,"font-weight"),C=gt(a,c,"font-size"),k=gt(a,c,"mix-blend-mode"),E=wt(l,e.width),B=wt(d,e.height),S=wt(a.x,e.width),I=wt(a.y,e.height),O=wt(a.x1,e.width),A=wt(a.x2,e.width),N=wt(a.y1,e.height),q=wt(a.y2,e.height),V=wt(a.cx,e.width),X=wt(a.cy,e.height),L=wt(a.rx||a.r,e.width),U=wt(a.ry||a.r,e.height),R={fontFamily:y||e.fontFamily,fontStyle:F||e.fontStyle,fontWeight:D||e.fontWeight,fontSize:(i=wt(C))!==null&&i!==void 0?i:e.fontSize,fill:(h==null?void 0:h.rgb)||e.fill,fillOpacity:(r=wt(u||p||(h==null?void 0:h.alpha)))!==null&&r!==void 0?r:e.fillOpacity,fillRule:Ik[b]||e.fillRule,stroke:(f==null?void 0:f.rgb)||e.stroke,strokeWidth:(o=wt(w))!==null&&o!==void 0?o:e.strokeWidth,strokeOpacity:(s=wt(m||p||(f==null?void 0:f.alpha)))!==null&&s!==void 0?s:e.strokeOpacity,strokeLineCap:Ak[x]||e.strokeLineCap,strokeLineJoin:Bk[g]||e.strokeLineJoin,width:E||e.width,height:B||e.height,rotation:e.rotation,viewBox:n.tagName==="svg"&&n.attributes.viewBox?tu(n.attributes.viewBox):e.viewBox,blendMode:Rk(k)||e.blendMode},M={src:a.src||a.href||a["xlink:href"],textAnchor:a["text-anchor"],dominantBaseline:a["dominant-baseline"],preserveAspectRatio:a.preserveAspectRatio},re=a.transform||"";["translate","translateX","translateY","skewX","skewY","rotate","scale","scaleX","scaleY","matrix"].forEach(Te=>{a[Te]&&(re=a[Te]+" "+re)}),(S||I)&&(re=re+`translate(${S||0} ${I||0}) `);let se=t;if(re){let Te=/(\w+)\((.+?)\)/g,he=Te.exec(re);for(;he!==null;){let[,dt,qt]=he,ji=(qt||"").split(/\s*,\s*|\s+/).filter(Ot=>Ot.length>0).map(Ot=>parseFloat(Ot));se=Vn(se,dt,ji),he=Te.exec(re)}}if(M.x=S,M.y=I,(a.cx||a.cy)&&(M.cx=V,M.cy=X),(a.rx||a.ry||a.r)&&(M.rx=L,M.ry=U),(a.x1||a.y1)&&(M.x1=O,M.y1=N),(a.x2||a.y2)&&(M.x2=A,M.y2=q),(a.width||a.height)&&(M.width=E!=null?E:e.width,M.height=B!=null?B:e.height),a.d&&(se=Vn(se,"scale",[1,-1]),M.d=a.d),R.fontFamily){let Te=R.fontFamily.match(/^"(.*?)"|^'(.*?)'/);Te&&(R.fontFamily=Te[1]||Te[2])}return R.strokeWidth&&(M.strokeWidth=R.strokeWidth),{inherited:R,svgAttributes:M,tagName:n.tagName,matrix:se}},Ok=(n,e,t,i,r)=>{if(r==="none")return{x:0,y:0,width:t,height:i};let o=n/e,s=t/i,a=s>o?o*i:t,c=s>=o?i:t/o,l=t-a,d=i-c,[h,u]=(()=>{switch(r){case"xMinYMin":return[0,0];case"xMidYMin":return[l/2,0];case"xMaxYMin":return[l,d/2];case"xMinYMid":return[0,d];case"xMaxYMid":return[l,d/2];case"xMinYMax":return[0,d];case"xMidYMax":return[l/2,d];case"xMaxYMax":return[l,d];case"xMidYMid":default:return[l/2,d/2]}})();return{x:h,y:u,width:a,height:c}},Lk=(n,e,t,i,r,o="xMidYMid")=>{let[s,a="meet"]=o.split(" "),c=i/e,l=r/t,d=Vn(n,"scale",[c,l]);if(s==="none")return{clipBox:d,content:d};let h=a==="slice"?Math.max(c,l):Math.min(c,l),u=i-e*h,p=r-t*h,[f,m]=(()=>{switch(s){case"xMinYMin":return[0,0];case"xMidYMin":return[u/2,0];case"xMaxYMin":return[u,p/2];case"xMinYMid":return[0,p];case"xMaxYMid":return[u,p/2];case"xMinYMax":return[0,p];case"xMidYMax":return[u/2,p];case"xMaxYMax":return[u,p];case"xMidYMid":default:return[u/2,p/2]}})(),x=Vn(Vn(n,"translate",[f,m]),"scale",[h]);return{clipBox:d,content:x}},Op=(n,e,t,i)=>{if(n.nodeType===oa.NodeType.COMMENT_NODE)return[];if(n.nodeType===oa.NodeType.TEXT_NODE)return[];if(n.tagName==="g")return Nk(n,e,t,i);if(n.tagName==="svg")return Mk(n,e,t,i);{n.tagName==="polygon"&&(n.tagName="path",n.attributes.d=`M${n.attributes.points}Z`,delete n.attributes.points);let r=Bp(n,e,t),o=Object.assign(Object.assign(Object.assign({},r.inherited),r.svgAttributes),{matrix:r.matrix,clipSpaces:i});return Object.assign(n,{svgAttributes:o}),[n]}},Mk=(n,e,t,i)=>{var r,o;(r=n.attributes.width)!==null&&r!==void 0||n.setAttribute("width",e.viewBox.width+""),(o=n.attributes.height)!==null&&o!==void 0||n.setAttribute("height",e.viewBox.height+"");let s=Bp(n,e,t),a=[],c=n.attributes.viewBox?tu(n.attributes.viewBox):n.attributes.width&&n.attributes.height?tu(`0 0 ${n.attributes.width} ${n.attributes.height}`):e.viewBox,l=parseFloat(n.attributes.x)||0,d=parseFloat(n.attributes.y)||0,h=Vn(t,"translate",[l,d]),{clipBox:u,content:p}=Lk(h,c.width,c.height,parseFloat(n.attributes.width),parseFloat(n.attributes.height),n.attributes.preserveAspectRatio),f=eu(u,{x:0,y:0}),m=eu(u,{x:c.width,y:0}),x=eu(u,{x:c.width,y:-c.height}),g=eu(u,{x:0,y:-c.height}),b={topLeft:f,topRight:m,bottomRight:x,bottomLeft:g};return h=Vn(p,"translate",[-c.x,-c.y]),n.childNodes.forEach(w=>{let y=Op(w,Object.assign(Object.assign({},s.inherited),{viewBox:c}),h,[...i,b]);a.push(...y)}),a},Nk=(n,e,t,i)=>{let r=Bp(n,e,t),o=[];return n.childNodes.forEach(s=>{o.push(...Op(s,r.inherited,r.matrix,i))}),o},wt=(n,e=1)=>{if(!n)return;let t=parseFloat(n);if(!isNaN(t))return n.endsWith("%")?t*e/100:t},Rk=n=>{switch(n){case"normal":return Re.Normal;case"multiply":return Re.Multiply;case"screen":return Re.Screen;case"overlay":return Re.Overlay;case"darken":return Re.Darken;case"lighten":return Re.Lighten;case"color-dodge":return Re.ColorDodge;case"color-burn":return Re.ColorBurn;case"hard-light":return Re.HardLight;case"soft-light":return Re.SoftLight;case"difference":return Re.Difference;case"exclusion":return Re.Exclusion;default:return}},tu=n=>{if(!n)return;let[e=0,t=0,i=1,r=1]=(n||"").split(" ").map(o=>wt(o));return{x:e,y:t,width:i,height:r}},Vk=(n,{width:e,height:t,fontSize:i},r,o)=>{let s=(0,oa.parse)(n).firstChild;return e&&s.setAttribute("width",e+""),t&&s.setAttribute("height",t+""),i&&s.setAttribute("font-size",i+""),Op(s,Object.assign(Object.assign({},r),{viewBox:tu(s.attributes.viewBox||"0 0 1 1")}),o,[])},dw=(n,e,t)=>{let i=typeof e=="string"?new pi(e):e;if(!i.svg)return;let r=n.getSize(),o=(0,oa.parse)(i.svg).querySelector("svg");if(!o)return console.error("This is not an svg. Ignoring: "+i.svg);let s=o.attributes,a=cw(s.style),c=gt(s,a,"width",""),l=gt(s,a,"height",""),d=t.width!==void 0?t.width:parseFloat(c),h=t.height!==void 0?t.height:parseFloat(l);s.viewBox||o.setAttribute("viewBox",`0 0 ${c||d} ${l||h}`),(t.width||t.height)&&(d!==void 0&&(a.width=d+(isNaN(d)?"":"px")),h!==void 0&&(a.height=h+(isNaN(h)?"":"px")),o.setAttribute("style",Object.entries(a).map(([m,x])=>`${m}:${x};`).join("")));let u=[1,0,0,1,t.x||0,t.y||0],p=Vk(o.outerHTML,t,r,u),f=lw(n,Object.assign(Object.assign({},t),{images:i.images}));p.forEach(m=>{var x;(x=f[m.tagName])===null||x===void 0||x.call(f,m)})};var Hk=({topLeft:n,topRight:e,bottomRight:t,bottomLeft:i})=>[Ni(n.x,n.y),Je(e.x,e.y),Je(t.x,t.y),Je(i.x,i.y),Ar(),cc(),fc()],iu=n=>n.flatMap(Hk),zk=(n,e)=>[Ye(),e.graphicsState&&Tr(e.graphicsState),gc(),ln(e.color),Uo(e.font,e.size),e.strokeWidth&&Ho(e.strokeWidth),e.strokeColor&&qo(e.strokeColor),e.renderMode&&Uh(e.renderMode),_s(ut(e.rotate),ut(e.xSkew),ut(e.ySkew),e.x,e.y),pc(n),mc(),_e()].filter(Boolean),Lp=(n,e)=>{let t=[Ye(),e.graphicsState&&Tr(e.graphicsState),...e.clipSpaces?iu(e.clipSpaces):[],e.matrix&&an(...e.matrix),gc(),ln(e.color),Uo(e.font,e.size),hp(e.lineHeight),e.strokeWidth&&Ho(e.strokeWidth),e.strokeColor&&qo(e.strokeColor),e.renderMode&&Uh(e.renderMode),_s(ut(e.rotate),ut(e.xSkew),ut(e.ySkew),e.x,e.y)].filter(Boolean);for(let i=0,r=n.length;i[Ye(),e.graphicsState&&Tr(e.graphicsState),...e.clipSpaces?iu(e.clipSpaces):[],e.matrix&&an(...e.matrix),Ut(e.x,e.y),Xs(ut(e.rotate)),Er(e.width,e.height),dc(ut(e.xSkew),ut(e.ySkew)),Js(n),_e()].filter(Boolean),Mp=(n,e)=>[Ye(),e.graphicsState&&Tr(e.graphicsState),Ut(e.x,e.y),Xs(ut(e.rotate)),Er(e.xScale,e.yScale),dc(ut(e.xSkew),ut(e.ySkew)),Js(n),_e()].filter(Boolean),Np=n=>{var e,t;return[Ye(),n.graphicsState&&Tr(n.graphicsState),...n.clipSpaces?iu(n.clipSpaces):[],n.matrix&&an(...n.matrix),n.color&&qo(n.color),Ho(n.thickness),hc((e=n.dashArray)!==null&&e!==void 0?e:[],(t=n.dashPhase)!==null&&t!==void 0?t:0),Ni(n.start.x,n.start.y),n.lineCap&&zh(n.lineCap),Ni(n.start.x,n.start.y),Je(n.end.x,n.end.y),uc(),_e()].filter(Boolean)},Br=4*((Math.sqrt(2)-1)/3),Or=n=>{let{width:e,height:t,xSkew:i,ySkew:r,rotate:o,matrix:s}=n,a=typeof e=="number"?e:e.asNumber(),c=typeof t=="number"?t:t.asNumber(),l=typeof n.x=="number"?n.x:n.x.asNumber(),d=typeof n.y=="number"?n.y:n.y.asNumber(),h=Math.max(0,Math.min(n.rx||0,a/2)),u=Math.max(0,Math.min(n.ry||0,c/2)),p=h>0||u>0?[`M ${h},0`,`H ${a-h}`,`C ${a-h*(1-Br)},0 ${a},${u*(1-Br)} ${a},${u}`,`V ${c-u}`,`C ${a},${c-u*(1-Br)} ${a-h*(1-Br)},${c} ${a-h},${c}`,`H ${h}`,`C ${h*(1-Br)},${c} 0,${c-u*(1-Br)} 0,${c-u}`,`V ${u}`,`C 0,${u*(1-Br)} ${h*(1-Br)},0 ${h},0`,"Z"].join(" "):`M 0,0 H ${a} V ${c} H 0 Z`,f=Zt(s||Dc,gi("translate",[l,-d]));return o&&(f=Zt(f,gi("rotate",[-rn(o)]))),i&&(f=Zt(f,gi("skewX",[rn(i)]))),r&&(f=Zt(f,gi("skewY",[-rn(r)]))),f=Zt(f,gi("translateY",[-c])),Cc(p,Object.assign(Object.assign({},n),{x:0,y:0,rotate:te(0),scale:1,matrix:f}))},Pc=n=>{let e=de(n.xScale),t=de(n.yScale),i=de(n.x),r=de(n.y),o=4*((Math.sqrt(2)-1)/3),s=e*o,a=t*o,c=[`M 0,${t}`,`C ${s},${t} ${e},${a} ${e},0`,`C ${e},${-a} ${s},${-t} 0,${-t}`,`C ${-s},${-t} ${-e},${-a} ${-e},0`,`C ${-e},${a} ${-s},${t} 0,${t}`,"Z"].join(" "),l=Zt(n.matrix||Dc,gi("translate",[i,-r]));return n.rotate&&(l=Zt(l,gi("rotate",[-rn(n.rotate)]))),Cc(c,Object.assign(Object.assign({},n),{x:0,y:0,rotate:te(0),scale:1,matrix:l}))},Cc=(n,e)=>{var t,i,r;let o=Uk(e);return o?[Ye(),e.graphicsState&&Tr(e.graphicsState),...e.clipSpaces?iu(e.clipSpaces):[],e.matrix&&an(...e.matrix),Ut(e.x,e.y),Xs(ut((t=e.rotate)!==null&&t!==void 0?t:te(0))),e.scale?Er(e.scale,-e.scale):Er(1,-1),e.color&&ln(e.color),e.borderColor&&qo(e.borderColor),e.borderWidth&&Ho(e.borderWidth),e.borderLineCap&&zh(e.borderLineCap),hc((i=e.borderDashArray)!==null&&i!==void 0?i:[],(r=e.borderDashPhase)!==null&&r!==void 0?r:0),..._v(n),o(),_e()].filter(Boolean):[]},hw=n=>{let e=de(n.size),t=-1+.75,i=-1+.51,r=1-.525,o=1-.31,s=-1+.325,a=-((s-t)*(o-t))/(r-i)+i;return[Ye(),n.color&&qo(n.color),Ho(n.thickness),Ut(n.x,n.y),Ni(s*e,a*e),Je(t*e,i*e),Je(o*e,r*e),uc(),_e()].filter(Boolean)},mi=n=>n.rotation===0?[Ut(0,0),Zs(0)]:n.rotation===90?[Ut(n.width,0),Zs(90)]:n.rotation===180?[Ut(n.width,n.height),Zs(180)]:n.rotation===270?[Ut(0,n.height),Zs(270)]:[],sa=n=>{let e=Or({x:n.x,y:n.y,width:n.width,height:n.height,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:te(0),xSkew:te(0),ySkew:te(0)});if(!n.filled)return e;let t=de(n.width),i=de(n.height),r=Math.min(t,i)/2,o=hw({x:t/2,y:i/2,size:r,thickness:n.thickness,color:n.markColor});return[Ye(),...e,...o,_e()]},aa=n=>{let e=de(n.width),t=de(n.height),i=Math.min(e,t)/2,r=Pc({x:n.x,y:n.y,xScale:i,yScale:i,color:n.color,borderColor:n.borderColor,borderWidth:n.borderWidth});if(!n.filled)return r;let o=Pc({x:n.x,y:n.y,xScale:i*.45,yScale:i*.45,color:n.dotColor,borderColor:void 0,borderWidth:0});return[Ye(),...r,...o,_e()]},nu=n=>{let e=de(n.x),t=de(n.y),i=de(n.width),r=de(n.height),o=Or({x:e,y:t,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:te(0),xSkew:te(0),ySkew:te(0)}),s=ru(n.textLines,{color:n.textColor,font:n.font,size:n.fontSize,rotate:te(0),xSkew:te(0),ySkew:te(0)});return[Ye(),...o,...s,_e()]},ru=(n,e)=>{let t=[gc(),ln(e.color),Uo(e.font,e.size)];for(let i=0,r=n.length;i{let e=de(n.x),t=de(n.y),i=de(n.width),r=de(n.height),o=de(n.borderWidth),s=de(n.padding),a=e+o/2+s,c=t+o/2+s,l=i-(o/2+s)*2,d=r-(o/2+s)*2,h=[Ni(a,c),Je(a,c+d),Je(a+l,c+d),Je(a+l,c),Ar(),cc(),fc()],u=Or({x:e,y:t,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:te(0),xSkew:te(0),ySkew:te(0)}),p=ru(n.textLines,{color:n.textColor,font:n.font,size:n.fontSize,rotate:te(0),xSkew:te(0),ySkew:te(0)}),f=[qh("Tx"),Ye(),...p,_e(),jh()];return[Ye(),...u,...h,...f,_e()]},Rp=n=>{let e=de(n.x),t=de(n.y),i=de(n.width),r=de(n.height),o=de(n.lineHeight),s=de(n.borderWidth),a=de(n.padding),c=e+s/2+a,l=t+s/2+a,d=i-(s/2+a)*2,h=r-(s/2+a)*2,u=[Ni(c,l),Je(c,l+h),Je(c+d,l+h),Je(c+d,l),Ar(),cc(),fc()],p=Or({x:e,y:t,width:i,height:r,borderWidth:n.borderWidth,color:n.color,borderColor:n.borderColor,rotate:te(0),xSkew:te(0),ySkew:te(0)}),f=[];for(let g=0,b=n.selectedLines.length;g{if(n&&t&&e)return cp;if(n)return i===sn.EvenOdd?lp:ap;if(t&&e)return uc};var Xo=class extends Error{constructor(){super("Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.")}},Sc=class extends Error{constructor(){super("Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.")}},Ec=class extends Error{constructor(){super("A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.")}},Tc=class extends Error{constructor(){super("PDFDocument has no pages so `PDFDocument.removePage` cannot be called")}},Ac=class extends Error{constructor(e){let t=`PDFDocument has no form field with the name "${e}"`;super(t)}},Vi=class extends Error{constructor(e,t,i){var r,o;let s=t==null?void 0:t.name,a=(o=(r=i==null?void 0:i.constructor)===null||r===void 0?void 0:r.name)!==null&&o!==void 0?o:i,c=`Expected field "${e}" to be of type ${s}, but it is actually of type ${a}`;super(c)}},Vp=class extends Error{constructor(e){let t=`Failed to select check box due to missing onValue: "${e}"`;super(t)}},la=class extends Error{constructor(e){let t=`A field already exists with the specified name: "${e}"`;super(t)}},Ic=class extends Error{constructor(e){let t=`Field name contains invalid component: "${e}"`;super(t)}},Hp=class extends Error{constructor(e){let t=`A non-terminal field already exists with the specified name: "${e}"`;super(t)}},Bc=class extends Error{constructor(e){let t=`Reading rich text fields is not supported: Attempted to read rich text field: ${e}`;super(t)}},Oc=class extends Error{constructor(e,t){let i=`Failed to layout combed text as lineLength=${e} is greater than cellCount=${t}`;super(i)}},Lc=class extends Error{constructor(e,t,i){let r=`Attempted to set text with length=${e} for TextField with maxLength=${t} and name=${i}`;super(r)}},Mc=class extends Error{constructor(e,t,i){let r=`Attempted to set maxLength=${t}, which is less than ${e}, the length of this field's current value (name=${i})`;super(r)}};var Ue;(function(n){n[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"})(Ue||(Ue={}));var uw=4,fw=500,pw=(n,e,t,i=!1)=>{let r=uw;for(;rn.length)return r-1;let s=e.heightAtSize(r);if((s+s*.2)*o>Math.abs(t.height))return r-1;r+=1}return r},qk=(n,e,t,i)=>{let r=t.width/i,o=t.height,s=uw,a=Ef(n);for(;sr*.75)return s-1}if(e.heightAtSize(s,{descender:!1})>o)return s-1;s+=1}return s},jk=n=>{for(let e=n.length;e>0;e--)if(/\s/.test(n[e]))return e},Wk=(n,e,t,i)=>{var r;let o=n.length;for(;o>0;){let s=n.substring(0,o),a=t.encodeText(s),c=t.widthOfTextAtSize(s,i);if(c{let o=Va(ir(n));(t===void 0||t===0)&&(t=pw(o,i,r,!0));let s=i.heightAtSize(t),a=s+s*.2,c=[],l=r.x,d=r.y,h=r.x+r.width,u=r.y+r.height,p=r.y+r.height;for(let f=0,m=o.length;fh&&(h=F+w),p+s>u&&(u=p+s),c.push({text:g,encoded:b,width:w,height:s,x:F,y:p}),x=y==null?void 0:y.trim()}}return{fontSize:t,lineHeight:a,lines:c,bounds:{x:l,y:d,width:h-l,height:u-d}}},zp=(n,{fontSize:e,font:t,bounds:i,cellCount:r})=>{let o=fd(ir(n));if(o.length>r)throw new Oc(o.length,r);(e===void 0||e===0)&&(e=qk(o,t,i,r));let s=i.width/r,a=t.heightAtSize(e,{descender:!1}),c=i.y+(i.height/2-a/2),l=[],d=i.x,h=i.y,u=i.x+i.width,p=i.y+i.height,f=0,m=0;for(;fu&&(u=F+w),c+a>p&&(p=c+a),l.push({text:o,encoded:b,width:w,height:a,x:F,y:c}),f+=1,m+=g}return{fontSize:e,cells:l,bounds:{x:d,y:h,width:u-d,height:p-h}}},ca=(n,{alignment:e,fontSize:t,font:i,bounds:r})=>{let o=fd(ir(n));(t===void 0||t===0)&&(t=pw([o],i,r));let s=i.encodeText(o),a=i.widthOfTextAtSize(o,t),c=i.heightAtSize(t,{descender:!1}),l=e===Ue.Left?r.x:e===Ue.Center?r.x+r.width/2-a/2:e===Ue.Right?r.x+r.width-a:r.x,d=r.y+(r.height/2-c/2);return{fontSize:t,line:{text:o,encoded:s,width:a,height:c,x:l,y:d},bounds:{x:l,y:d,width:a,height:c}}};var Yt=n=>"normal"in n?n:{normal:n},Kk=/\/([^\0\t\n\f\r ]+)[\0\t\n\f\r ]+(\d*\.\d+|\d+)[\0\t\n\f\r ]+Tf/,Lr=n=>{var e,t;let i=(e=n.getDefaultAppearance())!==null&&e!==void 0?e:"",r=(t=us(i,Kk).match)!==null&&t!==void 0?t:[],o=Number(r[2]);return isFinite(o)?o:void 0},Gk=/(\d*\.\d+|\d+)[\0\t\n\f\r ]*(\d*\.\d+|\d+)?[\0\t\n\f\r ]*(\d*\.\d+|\d+)?[\0\t\n\f\r ]*(\d*\.\d+|\d+)?[\0\t\n\f\r ]+(g|rg|k)/,xi=n=>{var e;let t=(e=n.getDefaultAppearance())!==null&&e!==void 0?e:"",i=us(t,Gk).match,[,r,o,s,a,c]=i!=null?i:[];if(c==="g"&&r)return Zh(Number(r));if(c==="rg"&&r&&o&&s)return pe(Number(r),Number(o),Number(s));if(c==="k"&&r&&o&&s&&a)return Yh(Number(r),Number(o),Number(s),Number(a))},bi=(n,e,t,i=0)=>{var r;let o=[ln(e).toString(),Uo((r=t==null?void 0:t.name)!==null&&r!==void 0?r:"dummy__noop",i).toString()].join(` +`);n.setDefaultAppearance(o)},Up=(n,e)=>{var t,i,r;let o=xi(e),s=xi(n.acroField),a=e.getRectangle(),c=e.getAppearanceCharacteristics(),l=e.getBorderStyle(),d=(t=l==null?void 0:l.getWidth())!==null&&t!==void 0?t:0,h=ui(c==null?void 0:c.getRotation()),{width:u,height:p}=on(a,h),f=mi(Object.assign(Object.assign({},a),{rotation:h})),m=pe(0,0,0),x=(i=vt(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:m,g=vt(c==null?void 0:c.getBackgroundColor()),b=vt(c==null?void 0:c.getBackgroundColor(),.8),w=(r=o!=null?o:s)!==null&&r!==void 0?r:m;bi(o?e:n.acroField,w);let y={x:0+d/2,y:0+d/2,width:u-d,height:p-d,thickness:1.5,borderWidth:d,borderColor:x,markColor:w};return{normal:{on:[...f,...sa(Object.assign(Object.assign({},y),{color:g,filled:!0}))],off:[...f,...sa(Object.assign(Object.assign({},y),{color:g,filled:!1}))]},down:{on:[...f,...sa(Object.assign(Object.assign({},y),{color:b,filled:!0}))],off:[...f,...sa(Object.assign(Object.assign({},y),{color:b,filled:!1}))]}}},qp=(n,e)=>{var t,i,r;let o=xi(e),s=xi(n.acroField),a=e.getRectangle(),c=e.getAppearanceCharacteristics(),l=e.getBorderStyle(),d=(t=l==null?void 0:l.getWidth())!==null&&t!==void 0?t:0,h=ui(c==null?void 0:c.getRotation()),{width:u,height:p}=on(a,h),f=mi(Object.assign(Object.assign({},a),{rotation:h})),m=pe(0,0,0),x=(i=vt(c==null?void 0:c.getBorderColor()))!==null&&i!==void 0?i:m,g=vt(c==null?void 0:c.getBackgroundColor()),b=vt(c==null?void 0:c.getBackgroundColor(),.8),w=(r=o!=null?o:s)!==null&&r!==void 0?r:m;bi(o?e:n.acroField,w);let y={x:u/2,y:p/2,width:u-d,height:p-d,borderWidth:d,borderColor:x,dotColor:w};return{normal:{on:[...f,...aa(Object.assign(Object.assign({},y),{color:g,filled:!0}))],off:[...f,...aa(Object.assign(Object.assign({},y),{color:g,filled:!1}))]},down:{on:[...f,...aa(Object.assign(Object.assign({},y),{color:b,filled:!0}))],off:[...f,...aa(Object.assign(Object.assign({},y),{color:b,filled:!1}))]}}},jp=(n,e,t)=>{var i,r,o,s,a;let c=xi(e),l=xi(n.acroField),d=Lr(e),h=Lr(n.acroField),u=e.getRectangle(),p=e.getAppearanceCharacteristics(),f=e.getBorderStyle(),m=p==null?void 0:p.getCaptions(),x=(i=m==null?void 0:m.normal)!==null&&i!==void 0?i:"",g=(o=(r=m==null?void 0:m.down)!==null&&r!==void 0?r:x)!==null&&o!==void 0?o:"",b=(s=f==null?void 0:f.getWidth())!==null&&s!==void 0?s:0,w=ui(p==null?void 0:p.getRotation()),{width:y,height:F}=on(u,w),D=mi(Object.assign(Object.assign({},u),{rotation:w})),C=pe(0,0,0),k=vt(p==null?void 0:p.getBorderColor()),E=vt(p==null?void 0:p.getBackgroundColor()),B=vt(p==null?void 0:p.getBackgroundColor(),.8),S={x:b,y:b,width:y-b*2,height:F-b*2},I=ca(x,{alignment:Ue.Center,fontSize:d!=null?d:h,font:t,bounds:S}),O=ca(g,{alignment:Ue.Center,fontSize:d!=null?d:h,font:t,bounds:S}),A=Math.min(I.fontSize,O.fontSize),N=(a=c!=null?c:l)!==null&&a!==void 0?a:C;bi(c||d!==void 0?e:n.acroField,N,t,A);let q={x:0+b/2,y:0+b/2,width:y-b,height:F-b,borderWidth:b,borderColor:k,textColor:N,font:t.name,fontSize:A};return{normal:[...D,...nu(Object.assign(Object.assign({},q),{color:E,textLines:[I.line]}))],down:[...D,...nu(Object.assign(Object.assign({},q),{color:B,textLines:[O.line]}))]}},Wp=(n,e,t)=>{var i,r,o,s;let a=xi(e),c=xi(n.acroField),l=Lr(e),d=Lr(n.acroField),h=e.getRectangle(),u=e.getAppearanceCharacteristics(),p=e.getBorderStyle(),f=(i=n.getText())!==null&&i!==void 0?i:"",m=(r=p==null?void 0:p.getWidth())!==null&&r!==void 0?r:0,x=ui(u==null?void 0:u.getRotation()),{width:g,height:b}=on(h,x),w=mi(Object.assign(Object.assign({},h),{rotation:x})),y=pe(0,0,0),F=vt(u==null?void 0:u.getBorderColor()),D=vt(u==null?void 0:u.getBackgroundColor()),C,k,E=n.isCombed()?0:1,B={x:m+E,y:m+E,width:g-(m+E)*2,height:b-(m+E)*2};if(n.isMultiline()){let O=su(f,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:t,bounds:B});C=O.lines,k=O.fontSize}else if(n.isCombed()){let O=zp(f,{fontSize:l!=null?l:d,font:t,bounds:B,cellCount:(o=n.getMaxLength())!==null&&o!==void 0?o:0});C=O.cells,k=O.fontSize}else{let O=ca(f,{alignment:n.getAlignment(),fontSize:l!=null?l:d,font:t,bounds:B});C=[O.line],k=O.fontSize}let S=(s=a!=null?a:c)!==null&&s!==void 0?s:y;bi(a||l!==void 0?e:n.acroField,S,t,k);let I={x:0+m/2,y:0+m/2,width:g-m,height:b-m,borderWidth:m!=null?m:0,borderColor:F,textColor:S,font:t.name,fontSize:k,color:D,textLines:C,padding:E};return[...w,...ou(I)]},Kp=(n,e,t)=>{var i,r,o;let s=xi(e),a=xi(n.acroField),c=Lr(e),l=Lr(n.acroField),d=e.getRectangle(),h=e.getAppearanceCharacteristics(),u=e.getBorderStyle(),p=(i=n.getSelected()[0])!==null&&i!==void 0?i:"",f=(r=u==null?void 0:u.getWidth())!==null&&r!==void 0?r:0,m=ui(h==null?void 0:h.getRotation()),{width:x,height:g}=on(d,m),b=mi(Object.assign(Object.assign({},d),{rotation:m})),w=pe(0,0,0),y=vt(h==null?void 0:h.getBorderColor()),F=vt(h==null?void 0:h.getBackgroundColor()),D=1,C={x:f+D,y:f+D,width:x-(f+D)*2,height:g-(f+D)*2},{line:k,fontSize:E}=ca(p,{alignment:Ue.Left,fontSize:c!=null?c:l,font:t,bounds:C}),B=(o=s!=null?s:a)!==null&&o!==void 0?o:w;bi(s||c!==void 0?e:n.acroField,B,t,E);let S={x:0+f/2,y:0+f/2,width:x-f,height:g-f,borderWidth:f!=null?f:0,borderColor:y,textColor:B,font:t.name,fontSize:E,color:F,textLines:[k],padding:D};return[...b,...ou(S)]},Gp=(n,e,t)=>{var i,r;let o=xi(e),s=xi(n.acroField),a=Lr(e),c=Lr(n.acroField),l=e.getRectangle(),d=e.getAppearanceCharacteristics(),h=e.getBorderStyle(),u=(i=h==null?void 0:h.getWidth())!==null&&i!==void 0?i:0,p=ui(d==null?void 0:d.getRotation()),{width:f,height:m}=on(l,p),x=mi(Object.assign(Object.assign({},l),{rotation:p})),g=pe(0,0,0),b=vt(d==null?void 0:d.getBorderColor()),w=vt(d==null?void 0:d.getBackgroundColor()),y=n.getOptions(),F=n.getSelected();n.isSorted()&&y.sort();let D="";for(let N=0,q=y.length;Nnew Hi(n,e,t);var Me=class{constructor(e,t,i){this.modified=!0,T(e,"ref",[[Y,"PDFRef"]]),T(t,"doc",[[We,"PDFDocument"]]),T(i,"embedder",[[Dr,"CustomFontEmbedder"],[Fr,"StandardFontEmbedder"]]),this.ref=e,this.doc=t,this.name=i.fontName,this.embedder=i}encodeText(e){return T(e,"text",["string"]),this.modified=!0,this.embedder.encodeText(e)}widthOfTextAtSize(e,t){return T(e,"text",["string"]),T(t,"size",["number"]),this.embedder.widthOfTextAtSize(e,t)}heightAtSize(e,t){var i;return T(e,"size",["number"]),H(t==null?void 0:t.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(e,{descender:(i=t==null?void 0:t.descender)!==null&&i!==void 0?i:!0})}sizeAtHeight(e){return T(e,"height",["number"]),this.embedder.sizeOfFontAtHeight(e)}getCharacterSet(){return this.embedder instanceof Fr?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet}embed(){return Q(this,void 0,void 0,function*(){this.modified&&(yield this.embedder.embedIntoContext(this.doc.context,this.ref),this.modified=!1)})}};Me.of=(n,e,t)=>new Me(n,e,t);var yi=class{constructor(e,t,i){T(e,"ref",[[Y,"PDFRef"]]),T(t,"doc",[[We,"PDFDocument"]]),T(i,"embedder",[[Us,"JpegEmbedder"],[js,"PngEmbedder"]]),this.ref=e,this.doc=t,this.width=i.width,this.height=i.height,this.embedder=i}scale(e){return T(e,"factor",["number"]),{width:this.width*e,height:this.height*e}}scaleToFit(e,t){T(e,"width",["number"]),T(t,"height",["number"]);let i=e/this.width,r=t/this.height,o=Math.min(i,r);return this.scale(o)}size(){return this.scale(1)}embed(){return Q(this,void 0,void 0,function*(){if(this.embedder){if(!this.embedTask){let{doc:e,ref:t}=this;this.embedTask=this.embedder.embedIntoContext(e.context,t)}yield this.embedTask,this.embedder=void 0}})}};yi.of=(n,e,t)=>new yi(n,e,t);var vi;(function(n){n[n.Left=0]="Left",n[n.Center=1]="Center",n[n.Right=2]="Right"})(vi||(vi={}));var wi=n=>{H(n==null?void 0:n.x,"options.x",["number"]),H(n==null?void 0:n.y,"options.y",["number"]),H(n==null?void 0:n.width,"options.width",["number"]),H(n==null?void 0:n.height,"options.height",["number"]),H(n==null?void 0:n.textColor,"options.textColor",[[Object,"Color"]]),H(n==null?void 0:n.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),H(n==null?void 0:n.borderColor,"options.borderColor",[[Object,"Color"]]),H(n==null?void 0:n.borderWidth,"options.borderWidth",["number"]),H(n==null?void 0:n.rotate,"options.rotate",[[Object,"Rotation"]])},at=class{constructor(e,t,i){T(e,"acroField",[[zt,"PDFAcroTerminal"]]),T(t,"ref",[[Y,"PDFRef"]]),T(i,"doc",[[We,"PDFDocument"]]),this.acroField=e,this.ref=t,this.doc=i}getName(){var e;return(e=this.acroField.getFullyQualifiedName())!==null&&e!==void 0?e:""}isReadOnly(){return this.acroField.hasFlag(Kt.ReadOnly)}enableReadOnly(){this.acroField.setFlagTo(Kt.ReadOnly,!0)}disableReadOnly(){this.acroField.setFlagTo(Kt.ReadOnly,!1)}isRequired(){return this.acroField.hasFlag(Kt.Required)}enableRequired(){this.acroField.setFlagTo(Kt.Required,!0)}disableRequired(){this.acroField.setFlagTo(Kt.Required,!1)}isExported(){return!this.acroField.hasFlag(Kt.NoExport)}enableExporting(){this.acroField.setFlagTo(Kt.NoExport,!1)}disableExporting(){this.acroField.setFlagTo(Kt.NoExport,!0)}needsAppearancesUpdate(){throw new Ze(this.constructor.name,"needsAppearancesUpdate")}defaultUpdateAppearances(e){throw new Ze(this.constructor.name,"defaultUpdateAppearances")}markAsDirty(){this.doc.getForm().markFieldAsDirty(this.ref)}markAsClean(){this.doc.getForm().markFieldAsClean(this.ref)}isDirty(){return this.doc.getForm().fieldIsDirty(this.ref)}createWidget(e){var t;let i=e.textColor,r=e.backgroundColor,o=e.borderColor,s=e.borderWidth,a=rn(e.rotate),c=e.caption,l=e.x,d=e.y,h=e.width+s,u=e.height+s,p=!!e.hidden,f=e.page;hl(a,"degreesAngle",90);let m=bo.create(this.doc.context,this.ref),x=op({x:l,y:d,width:h,height:u},s,a);m.setRectangle(x),f&&m.setP(f);let g=m.getOrCreateAppearanceCharacteristics();r&&g.setBackgroundColor(_h(r)),g.setRotation(a),c&&g.setCaptions({normal:c}),o&&g.setBorderColor(_h(o));let b=m.getOrCreateBorderStyle();if(s!==void 0&&b.setWidth(s),m.setFlagTo(Ro.Print,!0),m.setFlagTo(Ro.Hidden,p),m.setFlagTo(Ro.Invisible,!1),i){let y=((t=this.acroField.getDefaultAppearance())!==null&&t!==void 0?t:"")+` +`+ln(i).toString();this.acroField.setDefaultAppearance(y)}return m}updateWidgetAppearanceWithFont(e,t,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(e,{normal:this.createAppearanceStream(e,i,t),rollover:r&&this.createAppearanceStream(e,r,t),down:o&&this.createAppearanceStream(e,o,t)})}updateOnOffWidgetAppearance(e,t,{normal:i,rollover:r,down:o}){this.updateWidgetAppearances(e,{normal:this.createAppearanceDict(e,i,t),rollover:r&&this.createAppearanceDict(e,r,t),down:o&&this.createAppearanceDict(e,o,t)})}updateWidgetAppearances(e,{normal:t,rollover:i,down:r}){e.setNormalAppearance(t),i?e.setRolloverAppearance(i):e.removeRolloverAppearance(),r?e.setDownAppearance(r):e.removeDownAppearance()}createAppearanceStream(e,t,i){let{context:r}=this.acroField.dict,{width:o,height:s}=e.getRectangle(),a=i&&{Font:{[i.name]:i.ref}},c=r.formXObject(t,{Resources:a,BBox:r.obj([0,0,o,s]),Matrix:r.obj([1,0,0,1,0,0])});return r.register(c)}createImageAppearanceStream(e,t,i){var r;let{context:o}=this.acroField.dict,s=e.getRectangle(),a=e.getAppearanceCharacteristics(),c=e.getBorderStyle(),l=(r=c==null?void 0:c.getWidth())!==null&&r!==void 0?r:0,d=ui(a==null?void 0:a.getRotation()),h=mi(Object.assign(Object.assign({},s),{rotation:d})),u=on(s,d),p=t.scaleToFit(u.width-l*2,u.height-l*2),f={x:l,y:l,width:p.width,height:p.height,rotate:te(0),xSkew:te(0),ySkew:te(0)};i===vi.Center?(f.x+=(u.width-l*2)/2-p.width/2,f.y+=(u.height-l*2)/2-p.height/2):i===vi.Right&&(f.x=u.width-l-p.width,f.y=u.height-l-p.height);let m=this.doc.context.addRandomSuffix("Image",10),x=[...h,...kc(m,f)],g={XObject:{[m]:t.ref}},b=o.formXObject(x,{Resources:g,BBox:o.obj([0,0,s.width,s.height]),Matrix:o.obj([1,0,0,1,0,0])});return o.register(b)}createAppearanceDict(e,t,i){let{context:r}=this.acroField.dict,o=this.createAppearanceStream(e,t.on),s=this.createAppearanceStream(e,t.off),a=r.obj({});return a.set(i,o),a.set(v.of("Off"),s),a}};var _t=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroCheckBox",[[En,"PDFAcroCheckBox"]]),this.acroField=e}check(){var e;let t=(e=this.acroField.getOnValue())!==null&&e!==void 0?e:v.of("Yes");this.markAsDirty(),this.acroField.setValue(t)}uncheck(){this.markAsDirty(),this.acroField.setValue(v.of("Off"))}isChecked(){let e=this.acroField.getOnValue();return!!e&&e===this.acroField.getValue()}addToPage(e,t){var i,r,o,s,a,c;T(e,"page",[[Oe,"PDFPage"]]),wi(t),t||(t={}),"textColor"in t||(t.textColor=pe(0,0,0)),"backgroundColor"in t||(t.backgroundColor=pe(1,1,1)),"borderColor"in t||(t.borderColor=pe(0,0,0)),"borderWidth"in t||(t.borderWidth=1);let l=this.createWidget({x:(i=t.x)!==null&&i!==void 0?i:0,y:(r=t.y)!==null&&r!==void 0?r:0,width:(o=t.width)!==null&&o!==void 0?o:50,height:(s=t.height)!==null&&s!==void 0?s:50,textColor:t.textColor,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:(a=t.borderWidth)!==null&&a!==void 0?a:0,rotate:(c=t.rotate)!==null&&c!==void 0?c:te(0),hidden:t.hidden,page:e.ref}),d=this.doc.context.register(l.dict);this.acroField.addWidget(d),l.setAppearanceState(v.of("Off")),this.updateWidgetAppearance(l,v.of("Yes")),e.node.addAnnot(d)}needsAppearancesUpdate(){var e;let t=this.acroField.getWidgets();for(let i=0,r=t.length;inew _t(n,e,t);var Fi=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroComboBox",[[Tn,"PDFAcroComboBox"]]),this.acroField=e}getOptions(){let e=this.acroField.getOptions(),t=new Array(e.length);for(let i=0,r=t.length;i!r.includes(a))&&this.enableEditing(),this.markAsDirty(),(i.length>1||i.length===1&&t)&&this.enableMultiselect();let s=new Array(i.length);for(let a=0,c=i.length;anew Fi(n,e,t);var Di=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroListBox",[[Ln,"PDFAcroListBox"]]),this.acroField=e}getOptions(){let e=this.acroField.getOptions(),t=new Array(e.length);for(let i=0,r=t.length;i1||i.length===1&&t)&&this.enableMultiselect();let o=new Array(i.length);for(let s=0,a=i.length;snew Di(n,e,t);var Jt=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroRadioButton",[[On,"PDFAcroRadioButton"]]),this.acroField=e}getOptions(){let e=this.acroField.getExportValues();if(e){let r=new Array(e.length);for(let o=0,s=e.length;onew Jt(n,e,t);var zi=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroSignature",[[xr,"PDFAcroSignature"]]),this.acroField=e}needsAppearancesUpdate(){return!1}};zi.of=(n,e,t)=>new zi(n,e,t);var Pi=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroText",[[In,"PDFAcroText"]]),this.acroField=e}getText(){let e=this.acroField.getValue();if(!e&&this.isRichFormatted())throw new Bc(this.getName());return e==null?void 0:e.decodeText()}setText(e){H(e,"text",["string"]);let t=this.getMaxLength();if(t!==void 0&&e&&e.length>t)throw new Lc(e.length,t,this.getName());this.markAsDirty(),this.disableRichFormatting(),e?this.acroField.setValue(K.fromText(e)):this.acroField.removeValue()}getAlignment(){let e=this.acroField.getQuadding();return e===0?Ue.Left:e===1?Ue.Center:e===2?Ue.Right:Ue.Left}setAlignment(e){li(e,"alignment",Ue),this.markAsDirty(),this.acroField.setQuadding(e)}getMaxLength(){return this.acroField.getMaxLength()}setMaxLength(e){if(Vt(e,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),e===void 0)this.acroField.removeMaxLength();else{let t=this.getText();if(t&&t.length>e)throw new Mc(t.length,e,this.getName());this.acroField.setMaxLength(e)}}removeMaxLength(){this.markAsDirty(),this.acroField.removeMaxLength()}setImage(e){let t=this.getAlignment(),i=t===Ue.Center?vi.Center:t===Ue.Right?vi.Right:vi.Left,r=this.acroField.getWidgets();for(let o=0,s=r.length;onew Pi(n,e,t);var Zo;(function(n){n.Courier="Courier",n.CourierBold="Courier-Bold",n.CourierOblique="Courier-Oblique",n.CourierBoldOblique="Courier-BoldOblique",n.Helvetica="Helvetica",n.HelveticaBold="Helvetica-Bold",n.HelveticaOblique="Helvetica-Oblique",n.HelveticaBoldOblique="Helvetica-BoldOblique",n.TimesRoman="Times-Roman",n.TimesRomanBold="Times-Bold",n.TimesRomanItalic="Times-Italic",n.TimesRomanBoldItalic="Times-BoldItalic",n.Symbol="Symbol",n.ZapfDingbats="ZapfDingbats"})(Zo||(Zo={}));var Hn=class{constructor(e,t){this.embedDefaultFont=()=>this.doc.embedStandardFont(Zo.Helvetica),T(e,"acroForm",[[br,"PDFAcroForm"]]),T(t,"doc",[[We,"PDFDocument"]]),this.acroForm=e,this.doc=t,this.dirtyFields=new Set,this.defaultFontCache=ht.populatedBy(this.embedDefaultFont)}hasXFA(){return this.acroForm.dict.has(v.of("XFA"))}deleteXFA(){this.acroForm.dict.delete(v.of("XFA"))}getFields(){let e=this.acroForm.getAllFields(),t=[];for(let i=0,r=e.length;is.node.removeAnnot(e.ref)),this.acroForm.removeField(e.acroField);let r=e.acroField.normalizedEntries().Kids,o=r.size();for(let s=0;sr.ref===t);if(i===void 0){let r=this.doc.context.getObjectRef(e.dict);if(r===void 0)throw new Error("Could not find PDFRef for PDFObject");if(i=this.doc.findPageForAnnotationRef(r),i===void 0)throw new Error(`Could not find page for PDFRef ${r}`)}return i}findWidgetAppearanceRef(e,t){var i;let r=t.getNormalAppearance();if((e instanceof _t||e instanceof Jt)&&(r instanceof Y&&(r=this.doc.context.lookup(r,W)),r instanceof W)){let o=e.acroField.getValue(),s=(i=r.get(o))!==null&&i!==void 0?i:r.get(v.of("Off"));s instanceof Y&&(r=s)}if(!(r instanceof Y)){let o=e.getName();throw new Error(`Failed to extract appearance ref for: ${o}`)}return r}findOrCreateNonTerminals(e){let t=[this.acroForm];for(let i=0,r=e.length;inew Hn(n,e);var Xk=(n,e,t)=>{if(n instanceof Bn)return ki.of(n,e,t);if(n instanceof En)return _t.of(n,e,t);if(n instanceof Tn)return Fi.of(n,e,t);if(n instanceof Ln)return Di.of(n,e,t);if(n instanceof In)return Pi.of(n,e,t);if(n instanceof On)return Jt.of(n,e,t);if(n instanceof xr)return zi.of(n,e,t)},da=n=>{if(n.length===0)throw new Error("PDF field names must not be empty strings");let e=n.split(".");for(let t=0,i=e.length;t{let o=n.normalizedEntries(),s=Rs("Kids"in o?o.Kids:o.Fields);for(let a=0,c=s.length;anew _o(n,e,t);var zn=class{constructor(e,t,i){this.alreadyEmbedded=!1,this.ref=e,this.doc=t,this.embedder=i}embed(){return Q(this,void 0,void 0,function*(){if(!this.alreadyEmbedded){let{catalog:e,context:t}=this.doc,i=yield this.embedder.embedIntoContext(this.doc.context,this.ref);e.has(v.of("Names"))||e.set(v.of("Names"),t.obj({}));let r=e.lookup(v.of("Names"),W);r.has(v.of("JavaScript"))||r.set(v.of("JavaScript"),t.obj({}));let o=r.lookup(v.of("JavaScript"),W);o.has(v.of("Names"))||o.set(v.of("Names"),t.obj([]));let s=o.lookup(v.of("Names"),Z);s.push(K.fromText(this.embedder.scriptName)),s.push(i),this.alreadyEmbedded=!0}})}};zn.of=(n,e,t)=>new zn(n,e,t);var Xp=class n{static for(e,t){return new n(e,t)}constructor(e,t){this.script=e,this.scriptName=t}embedIntoContext(e,t){return Q(this,void 0,void 0,function*(){let i=e.obj({Type:"Action",S:"JavaScript",JS:K.fromText(this.script)});return t?(e.assign(t,i),t):e.register(i)})}},gw=Xp;var mw=512,Zp=class extends di{constructor(e,t,i){super(i),this.stream=e,this.decrypt=t,this.nextChunk=null,this.initialized=!1}readBlock(){let e;if(this.initialized?e=this.nextChunk:(e=this.stream.getBytes(mw),this.initialized=!0),!e||e.length===0){this.eof=!0;return}this.nextChunk=this.stream.getBytes(mw);let t=this.nextChunk&&this.nextChunk.length>0,i=this.decrypt;e=i(e,!t);let r=this.bufferLength,o=r+e.length;this.ensureBuffer(o).set(e,r),this.bufferLength=o}},xw=Zp;var Un=class{constructor(e){this.a=0,this.b=0;let t=new Uint8Array(256),i=e.length;for(let r=0;r<256;++r)t[r]=r;for(let r=0,o=0;r<256;++r){let s=t[r];o=o+s+e[r%i]&255,t[r]=t[o],t[o]=s}this.s=t}encryptBlock(e){let t=this.a,i=this.b,r=this.s,o=e.length,s=new Uint8Array(o);for(let a=0;a>5&255,u[p++]=s>>13&255,u[p++]=s>>21&255,u[p++]=s>>>29&255,u[p++]=0,u[p++]=0,u[p++]=0;let x=new Int32Array(16);for(p=0;p>>32-E)|0,g=C}a=a+g|0,c=c+b|0,l=l+w|0,d=d+y|0}return new Uint8Array([a&255,a>>8&255,a>>16&255,a>>>24&255,c&255,c>>8&255,c>>16&255,c>>>24&255,l&255,l>>8&255,l>>16&255,l>>>24&255,d&255,d>>8&255,d>>16&255,d>>>24&255])}return i})(),z=class{constructor(e,t){this.high=e|0,this.low=t|0}and(e){this.high&=e.high,this.low&=e.low}xor(e){this.high^=e.high,this.low^=e.low}or(e){this.high|=e.high,this.low|=e.low}shiftRight(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}shiftLeft(e){e>=32?(this.high=this.low<>>32-e,this.low<<=e)}rotateRight(e){let t,i;e&32?(i=this.low,t=this.high):(t=this.low,i=this.high),e&=31,this.low=t>>>e|i<<32-e,this.high=i>>>e|t<<32-e}not(){this.high=~this.high,this.low=~this.low}add(e){let t=(this.low>>>0)+(e.low>>>0),i=(this.high>>>0)+(e.high>>>0);t>4294967295&&(i+=1),this.low=t|0,this.high=i|0}copyTo(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=this.high&255,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=this.low&255}assign(e){this.high=e.high,this.low=e.low}},fa=(function(){function e(d,h){return d>>>h|d<<32-h}function t(d,h,u){return d&h^~d&u}function i(d,h,u){return d&h^d&u^h&u}function r(d){return e(d,2)^e(d,13)^e(d,22)}function o(d){return e(d,6)^e(d,11)^e(d,25)}function s(d){return e(d,7)^e(d,18)^d>>>3}function a(d){return e(d,17)^e(d,19)^d>>>10}let c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function l(d,h,u){let p=1779033703,f=3144134277,m=1013904242,x=2773480762,g=1359893119,b=2600822924,w=528734635,y=1541459225,F=Math.ceil((u+9)/64)*64,D=new Uint8Array(F),C,k;for(C=0;C>>29&255,D[C++]=u>>21&255,D[C++]=u>>13&255,D[C++]=u>>5&255,D[C++]=u<<3&255;let B=new Uint32Array(64);for(C=0;C>24&255,p>>16&255,p>>8&255,p&255,f>>24&255,f>>16&255,f>>8&255,f&255,m>>24&255,m>>16&255,m>>8&255,m&255,x>>24&255,x>>16&255,x>>8&255,x&255,g>>24&255,g>>16&255,g>>8&255,g&255,b>>24&255,b>>16&255,b>>8&255,b&255,w>>24&255,w>>16&255,w>>8&255,w&255,y>>24&255,y>>16&255,y>>8&255,y&255])}return l})(),bw=(function(){function e(l,d,h,u,p){l.assign(d),l.and(h),p.assign(d),p.not(),p.and(u),l.xor(p)}function t(l,d,h,u,p){l.assign(d),l.and(h),p.assign(d),p.and(u),l.xor(p),p.assign(h),p.and(u),l.xor(p)}function i(l,d,h){l.assign(d),l.rotateRight(28),h.assign(d),h.rotateRight(34),l.xor(h),h.assign(d),h.rotateRight(39),l.xor(h)}function r(l,d,h){l.assign(d),l.rotateRight(14),h.assign(d),h.rotateRight(18),l.xor(h),h.assign(d),h.rotateRight(41),l.xor(h)}function o(l,d,h){l.assign(d),l.rotateRight(1),h.assign(d),h.rotateRight(8),l.xor(h),h.assign(d),h.shiftRight(7),l.xor(h)}function s(l,d,h){l.assign(d),l.rotateRight(19),h.assign(d),h.rotateRight(61),l.xor(h),h.assign(d),h.shiftRight(6),l.xor(h)}let a=[new z(1116352408,3609767458),new z(1899447441,602891725),new z(3049323471,3964484399),new z(3921009573,2173295548),new z(961987163,4081628472),new z(1508970993,3053834265),new z(2453635748,2937671579),new z(2870763221,3664609560),new z(3624381080,2734883394),new z(310598401,1164996542),new z(607225278,1323610764),new z(1426881987,3590304994),new z(1925078388,4068182383),new z(2162078206,991336113),new z(2614888103,633803317),new z(3248222580,3479774868),new z(3835390401,2666613458),new z(4022224774,944711139),new z(264347078,2341262773),new z(604807628,2007800933),new z(770255983,1495990901),new z(1249150122,1856431235),new z(1555081692,3175218132),new z(1996064986,2198950837),new z(2554220882,3999719339),new z(2821834349,766784016),new z(2952996808,2566594879),new z(3210313671,3203337956),new z(3336571891,1034457026),new z(3584528711,2466948901),new z(113926993,3758326383),new z(338241895,168717936),new z(666307205,1188179964),new z(773529912,1546045734),new z(1294757372,1522805485),new z(1396182291,2643833823),new z(1695183700,2343527390),new z(1986661051,1014477480),new z(2177026350,1206759142),new z(2456956037,344077627),new z(2730485921,1290863460),new z(2820302411,3158454273),new z(3259730800,3505952657),new z(3345764771,106217008),new z(3516065817,3606008344),new z(3600352804,1432725776),new z(4094571909,1467031594),new z(275423344,851169720),new z(430227734,3100823752),new z(506948616,1363258195),new z(659060556,3750685593),new z(883997877,3785050280),new z(958139571,3318307427),new z(1322822218,3812723403),new z(1537002063,2003034995),new z(1747873779,3602036899),new z(1955562222,1575990012),new z(2024104815,1125592928),new z(2227730452,2716904306),new z(2361852424,442776044),new z(2428436474,593698344),new z(2756734187,3733110249),new z(3204031479,2999351573),new z(3329325298,3815920427),new z(3391569614,3928383900),new z(3515267271,566280711),new z(3940187606,3454069534),new z(4118630271,4000239992),new z(116418474,1914138554),new z(174292421,2731055270),new z(289380356,3203993006),new z(460393269,320620315),new z(685471733,587496836),new z(852142971,1086792851),new z(1017036298,365543100),new z(1126000580,2618297676),new z(1288033470,3409855158),new z(1501505948,4234509866),new z(1607167915,987167468),new z(1816402316,1246189591)];function c(l,d,h,u=!1){let p,f,m,x,g,b,w,y;u?(p=new z(3418070365,3238371032),f=new z(1654270250,914150663),m=new z(2438529370,812702999),x=new z(355462360,4144912697),g=new z(1731405415,4290775857),b=new z(2394180231,1750603025),w=new z(3675008525,1694076839),y=new z(1203062813,3204075428)):(p=new z(1779033703,4089235720),f=new z(3144134277,2227873595),m=new z(1013904242,4271175723),x=new z(2773480762,1595750129),g=new z(1359893119,2917565137),b=new z(2600822924,725511199),w=new z(528734635,4215389547),y=new z(1541459225,327033209));let F=Math.ceil((h+17)/128)*128,D=new Uint8Array(F),C,k;for(C=0;C>>29&255,D[C++]=h>>21&255,D[C++]=h>>13&255,D[C++]=h>>5&255,D[C++]=h<<3&255;let B=new Array(80);for(C=0;C<80;C++)B[C]=new z(0,0);let S=new z(0,0),I=new z(0,0),O=new z(0,0),A=new z(0,0),N=new z(0,0),q=new z(0,0),V=new z(0,0),X=new z(0,0),L=new z(0,0),U=new z(0,0),R=new z(0,0),M=new z(0,0),re;for(C=0;C=1;--a){i=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=i,i=s[14],r=s[10],s[14]=s[6],s[10]=s[2],s[6]=i,s[2]=r,i=s[15],r=s[11],o=s[7],s[15]=s[3],s[11]=i,s[7]=r,s[3]=o;for(let c=0;c<16;++c)s[c]=this._inv_s[s[c]];for(let c=0,l=a*16;c<16;++c,++l)s[c]^=t[l];for(let c=0;c<16;c+=4){let l=this._mix[s[c]],d=this._mix[s[c+1]],h=this._mix[s[c+2]],u=this._mix[s[c+3]];i=l^d>>>8^d<<24^h>>>16^h<<16^u>>>24^u<<8,s[c]=i>>>24&255,s[c+1]=i>>16&255,s[c+2]=i>>8&255,s[c+3]=i&255}}i=s[13],s[13]=s[9],s[9]=s[5],s[5]=s[1],s[1]=i,i=s[14],r=s[10],s[14]=s[6],s[10]=s[2],s[6]=i,s[2]=r,i=s[15],r=s[11],o=s[7],s[15]=s[3],s[11]=i,s[7]=r,s[3]=o;for(let a=0;a<16;++a)s[a]=this._inv_s[s[a]],s[a]^=t[a];return s}_encrypt(e,t){let i=this._s,r,o,s,a=new Uint8Array(16);a.set(e);for(let c=0;c<16;++c)a[c]^=t[c];for(let c=1;c=p;--u)if(d[u]!==h){h=0;break}c-=h,s[s.length-1]=d.subarray(0,16-h)}}let l=new Uint8Array(c);for(let d=0,h=0,u=s.length;d=256&&(o=(o^27)&255));for(let u=0;u<4;++u)r[d]=s^=r[d-32],d++,r[d]=a^=r[d-32],d++,r[d]=c^=r[d-32],d++,r[d]=l^=r[d-32],d++}return r}},_p=class{checkOwnerPassword(e,t,i,r){let o=new Uint8Array(e.length+56);o.set(e,0),o.set(t,e.length),o.set(i,e.length+t.length);let s=fa(o,0,o.length);return fs(s,r)}checkUserPassword(e,t,i){let r=new Uint8Array(e.length+8);r.set(e,0),r.set(t,e.length);let o=fa(r,0,r.length);return fs(o,i)}getOwnerKey(e,t,i,r){let o=new Uint8Array(e.length+56);o.set(e,0),o.set(t,e.length),o.set(i,e.length+t.length);let s=fa(o,0,o.length);return new Jo(s).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(e,t,i){let r=new Uint8Array(e.length+8);r.set(e,0),r.set(t,e.length);let o=fa(r,0,r.length);return new Jo(o).decryptBlock(i,!1,new Uint8Array(16))}},Jp=class{calculatePDF20Hash(e,t,i){let r=fa(t,0,t.length).subarray(0,32),o=new Uint8Array([0]),s=0;for(;s<64||o[o.length-1]>s-32;){let a=e.length+r.length+i.length,c=new Uint8Array(a),l=0;c.set(e,l),l+=e.length,c.set(r,l),l+=r.length,c.set(i,l);let d=new Uint8Array(a*64);for(let p=0,f=0;p<64;p++,f+=a)d.set(c,f);o=new au(r.subarray(0,16)).encrypt(d,r.subarray(16,32));let u=o.slice(0,16).reduce((p,f)=>p+f,0)%3;u===0?r=fa(o,0,o.length):u===1?r=Zk(o,0,o.length):u===2&&(r=bw(o,0,o.length)),s++}return r.subarray(0,32)}hash(e,t,i){return this.calculatePDF20Hash(e,t,i)}checkOwnerPassword(e,t,i,r){let o=new Uint8Array(e.length+56);o.set(e,0),o.set(t,e.length),o.set(i,e.length+t.length);let s=this.calculatePDF20Hash(e,o,i);return fs(s,r)}checkUserPassword(e,t,i){let r=new Uint8Array(e.length+8);r.set(e,0),r.set(t,e.length);let o=this.calculatePDF20Hash(e,r,new Uint8Array);return fs(o,i)}getOwnerKey(e,t,i,r){let o=new Uint8Array(e.length+56);o.set(e,0),o.set(t,e.length),o.set(i,e.length+t.length);let s=this.calculatePDF20Hash(e,o,i);return new Jo(s).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(e,t,i){let r=new Uint8Array(e.length+8);r.set(e,0),r.set(t,e.length);let o=this.calculatePDF20Hash(e,r,new Uint8Array);return new Jo(o).decryptBlock(i,!1,new Uint8Array(16))}},lu=class{constructor(e,t){this.StringCipherConstructor=e,this.StreamCipherConstructor=t}createStream(e,t){let i=this.StreamCipherConstructor();return new xw(e,function(o,s){return i.decryptBlock(o,s)},t)}decryptString(e){let t=this.StringCipherConstructor(),i=hs(e);return i=t.decryptBlock(i,!0),xn(i)}decryptBytes(e){return this.StringCipherConstructor().decryptBlock(e,!0)}encryptString(e){let t=this.StringCipherConstructor();if(t instanceof Rc){let o=16-e.length%16;e+=String.fromCharCode(o).repeat(o);let s=new Uint8Array(16);if(typeof crypto!="undefined")crypto.getRandomValues(s);else for(let l=0;l<16;l++)s[l]=Math.floor(256*Math.random());let a=hs(e);a=t.encrypt(a,s);let c=new Uint8Array(16+a.length);return c.set(s),c.set(a,16),xn(c)}let i=hs(e);return i=t.encrypt(i),xn(i)}},cu=class{constructor(e,t,i){var r,o;this.defaultPasswordBytes=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),this.identityName=v.of("Identity");let s=e.get(v.of("Filter"));if(s.asString()!=="/Standard")throw new Error("unknown encryption method");this.filterName=s.asString(),this.dict=e;let a=e.get(v.of("V")).asNumber();if(!Number.isInteger(a)||a!==1&&a!==2&&a!==4&&a!==5)throw new Error("unsupported encryption algorithm");this.algorithm=a;let c=(r=e.get(v.of("Length")))===null||r===void 0?void 0:r.asNumber();if(!c)if(a<=3)c=40;else{let b=e.get(v.of("CF")),w=e.get(v.of("StmF"));if(b instanceof W&&w instanceof v){b.suppressEncryption=!0;let y=b.get(v.of(w.asString())),F=null;y&&(F=y.get(v.of("Length"))),c=F&&F.asNumber()||128,c<40&&(c<<=3)}}if(c===void 0||!Number.isInteger(c)||c<40||c%8!==0)throw new Error(`invalid key length: ${c}`);let l=e.get(v.of("O")).asBytes(),d=e.get(v.of("U")).asBytes(),h=l.subarray(0,32),u=d.subarray(0,32),p=e.get(v.of("P")).asNumber(),f=e.get(v.of("R")).asNumber(),m=(a===4||a===5)&&((o=e.get(v.of("EncryptMetadata")))===null||o===void 0?void 0:o.asBoolean())!==!1;this.encryptMetadata=m;let x;if(i){if(f===6)try{i=unescape(encodeURIComponent(i))}catch(b){console.warn("CipherTransformFactory: Unable to convert UTF8 encoded password.")}x=hs(i)}let g;if(a!==5)g=this.prepareKeyData(t,x,h,u,p,f,c,m);else{let b=l.subarray(32,40),w=l.subarray(40,48),y=d.subarray(0,48),F=d.subarray(32,40),D=d.subarray(40,48),C=e.get(v.of("OE")).asBytes(),k=e.get(v.of("UE")).asBytes(),E=e.get(v.of("Perms")).asBytes();g=this.createEncryptionKey20(f,x,h,b,w,y,u,F,D,C,k,E)}if(!g&&!i)throw new Error("NEEDS PASSWORD");if(!g&&i){let b=this.decodeUserPassword(x,h,f,c);g=this.prepareKeyData(t,b,h,u,p,f,c,m)}if(!g)throw new Error("Password incorrect");if(this.encryptionKey=g,a>=4){let b=e.get(v.of("CF"));b instanceof W&&(b.suppressEncryption=!0),this.cf=b,this.stmf=e.get(v.of("StmF"))||this.identityName,this.strf=e.get(v.of("StrF"))||this.identityName,this.eff=e.get(v.of("EFF"))||this.stmf}}createCipherTransform(e,t){if(this.algorithm===4||this.algorithm===5)return new lu(this.buildCipherConstructor(this.cf,this.strf,e,t,this.encryptionKey),this.buildCipherConstructor(this.cf,this.stmf,e,t,this.encryptionKey));let i=this.buildObjectKey(e,t,this.encryptionKey,!1),r=function(){return new Un(i)};return new lu(r,r)}createEncryptionKey20(e,t,i,r,o,s,a,c,l,d,h,u){if(t){let f=Math.min(127,t.length);t=t.subarray(0,f)}else t=new Uint8Array;let p;return e===6?p=new Jp:p=new _p,p.checkUserPassword(t,c,a)?p.getUserKey(t,l,h):t.length&&p.checkOwnerPassword(t,r,s,i)?p.getOwnerKey(t,o,s,d):null}prepareKeyData(e,t,i,r,o,s,a,c){let l=40+i.length+e.length,d=new Uint8Array(l),h=0,u,p;if(t)for(p=Math.min(32,t.length);h>8&255,d[h++]=o>>16&255,d[h++]=o>>>24&255,u=0,p=e.length;u=4&&!c&&(d[h++]=255,d[h++]=255,d[h++]=255,d[h++]=255);let f=ua(d,0,h),m=a>>3;if(s>=3)for(u=0;u<50;++u)f=ua(f,0,m);let x=f.subarray(0,m),g,b;if(s>=3){for(h=0;h<32;++h)d[h]=this.defaultPasswordBytes[h];for(u=0,p=e.length;u>3;if(i>=3)for(c=0;c<50;++c)l=ua(l,0,l.length);let h,u;if(i>=3){u=t;let p=new Uint8Array(d);for(c=19;c>=0;c--){for(let f=0;f>8&255,o[a++]=e>>16&255,o[a++]=t&255,o[a++]=t>>8&255,r&&(o[a++]=115,o[a++]=65,o[a++]=108,o[a++]=84),ua(o,0,a).subarray(0,Math.min(i.length+5,16))}buildCipherConstructor(e,t,i,r,o){if(!(t instanceof v))throw new Error("Invalid crypt filter name.");let s=e.get(v.of(t.asString().replace("/",""))),a;if(s!=null&&(a=s.get(v.of("CFM"))),!a||a.asString()==="/None")return function(){return new Yp};if(a.asString()==="/V2")return()=>new Un(this.buildObjectKey(i,r,o,!1));if(a.asString()==="/AESV2")return()=>new au(this.buildObjectKey(i,r,o,!0));if(a.asString()==="/AESV3")return()=>new Jo(o);throw new Error("Unknown crypto method")}};var We=class n{static load(e,t={}){return Q(this,void 0,void 0,function*(){let{ignoreEncryption:i=!1,parseSpeed:r=Nc.Slow,throwOnInvalidObject:o=!1,warnOnInvalidObjects:s=!1,updateMetadata:a=!0,capNumbers:c=!1,password:l}=t;T(e,"pdf",["string",Uint8Array,ArrayBuffer]),T(i,"ignoreEncryption",["boolean"]),T(r,"parseSpeed",["number"]),T(o,"throwOnInvalidObject",["boolean"]),T(s,"warnOnInvalidObjects",["boolean"]),T(l,"password",["string","undefined"]);let d=$r(e),h=yield sc.forBytesWithOptions(d,r,o,c).parseDocument();if(h.lookup(h.trailerInfo.Encrypt)&&l!==void 0){let u=h.lookup(h.trailerInfo.ID,Z),p=h.lookup(h.trailerInfo.Encrypt,W),f=yield sc.forBytesWithOptions(d,r,o,s,c,new cu(p,u.get(0).asBytes(),l)).parseDocument();return new n(f,!0,a)}else return new n(h,i,a)})}static create(e={}){return Q(this,void 0,void 0,function*(){let{updateMetadata:t=!0}=e,i=po.create(),r=vr.withContext(i),o=i.register(r),s=yr.withContextAndPages(i,o);return i.trailerInfo.Root=i.register(s),new n(i,!1,t)})}constructor(e,t,i){if(this.defaultWordBreaks=[" "],this.computePages=()=>{let r=[];return this.catalog.Pages().traverse((o,s)=>{if(o instanceof et){let a=this.pageMap.get(o);a||(a=Oe.of(o,s,this),this.pageMap.set(o,a)),r.push(a)}}),r},this.getOrCreateForm=()=>{let r=this.catalog.getOrCreateAcroForm();return Hn.of(r,this)},T(e,"context",[[po,"PDFContext"]]),T(t,"ignoreEncryption",["boolean"]),this.context=e,this.catalog=e.lookup(e.trailerInfo.Root),e.lookup(e.trailerInfo.Encrypt)&&e.isDecrypted&&delete e.trailerInfo.Encrypt,this.isEncrypted=!!e.lookup(e.trailerInfo.Encrypt),this.pageCache=ht.populatedBy(this.computePages),this.pageMap=new Map,this.formCache=ht.populatedBy(this.getOrCreateForm),this.fonts=[],this.images=[],this.embeddedPages=[],this.embeddedFiles=[],this.javaScripts=[],!t&&this.isEncrypted)throw new Xo;i&&this.updateInfoDict()}registerFontkit(e){this.fontkit=e}getForm(){let e=this.formCache.access();return e.hasXFA()&&(console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"),e.deleteXFA()),e}getTitle(){let e=this.getInfoDict().lookup(v.Title);if(e)return qn(e),e.decodeText()}getAuthor(){let e=this.getInfoDict().lookup(v.Author);if(e)return qn(e),e.decodeText()}getSubject(){let e=this.getInfoDict().lookup(v.Subject);if(e)return qn(e),e.decodeText()}getKeywords(){let e=this.getInfoDict().lookup(v.Keywords);if(e)return qn(e),e.decodeText()}getCreator(){let e=this.getInfoDict().lookup(v.Creator);if(e)return qn(e),e.decodeText()}getProducer(){let e=this.getInfoDict().lookup(v.Producer);if(e)return qn(e),e.decodeText()}getLanguage(){let e=this.catalog.get(v.of("Lang"));if(e)return qn(e),e.decodeText()}getCreationDate(){let e=this.getInfoDict().lookup(v.CreationDate);if(e)return qn(e),e.decodeDate()}getModificationDate(){let e=this.getInfoDict().lookup(v.ModDate);if(e)return qn(e),e.decodeDate()}setTitle(e,t){T(e,"title",["string"]);let i=v.of("Title");this.getInfoDict().set(i,K.fromText(e)),t!=null&&t.showInWindowTitleBar&&this.catalog.getOrCreateViewerPreferences().setDisplayDocTitle(!0)}setAuthor(e){T(e,"author",["string"]);let t=v.of("Author");this.getInfoDict().set(t,K.fromText(e))}setSubject(e){T(e,"author",["string"]);let t=v.of("Subject");this.getInfoDict().set(t,K.fromText(e))}setKeywords(e){T(e,"keywords",[Array]);let t=v.of("Keywords");this.getInfoDict().set(t,K.fromText(e.join(" ")))}setCreator(e){T(e,"creator",["string"]);let t=v.of("Creator");this.getInfoDict().set(t,K.fromText(e))}setProducer(e){T(e,"creator",["string"]);let t=v.of("Producer");this.getInfoDict().set(t,K.fromText(e))}setLanguage(e){T(e,"language",["string"]);let t=v.of("Lang");this.catalog.set(t,J.of(e))}setCreationDate(e){T(e,"creationDate",[[Date,"Date"]]);let t=v.of("CreationDate");this.getInfoDict().set(t,J.fromDate(e))}setModificationDate(e){T(e,"modificationDate",[[Date,"Date"]]);let t=v.of("ModDate");this.getInfoDict().set(t,J.fromDate(e))}getPageCount(){return this.pageCount===void 0&&(this.pageCount=this.getPages().length),this.pageCount}getPages(){return this.pageCache.access()}getPage(e){let t=this.getPages();return bt(e,"index",0,t.length-1),t[e]}getPageIndices(){return Mf(0,this.getPageCount())}removePage(e){let t=this.getPageCount();if(this.pageCount===0)throw new Tc;bt(e,"index",0,t-1),this.catalog.removeLeafNode(e),this.pageCount=t-1}addPage(e){return T(e,"page",["undefined",[Oe,"PDFPage"],Array]),this.insertPage(this.getPageCount(),e)}insertPage(e,t){let i=this.getPageCount();if(bt(e,"index",0,i),T(t,"page",["undefined",[Oe,"PDFPage"],Array]),!t||Array.isArray(t)){let o=Array.isArray(t)?t:Yo.A4;t=Oe.create(this),t.setSize(...o)}else if(t.doc!==this)throw new Ec;let r=this.catalog.insertLeafNode(t.ref,e);return t.node.setParent(r),this.pageMap.set(t.node,t),this.pageCache.invalidate(),this.pageCount=i+1,t}copyPages(e,t){return Q(this,void 0,void 0,function*(){T(e,"srcDoc",[[n,"PDFDocument"]]),T(t,"indices",[Array]),yield e.flush();let i=Hl.for(e.context,this.context),r=e.getPages(),o=t.map(s=>r[s]).map(s=>Q(this,void 0,void 0,function*(){return i.copy(s.node)})).map(s=>s.then(a=>Oe.of(a,this.context.register(a),this)));return Promise.all(o)})}copy(){return Q(this,void 0,void 0,function*(){let e=yield n.create(),t=yield e.copyPages(this,this.getPageIndices());for(let i=0,r=t.length;i{let r=i.lookup(v.of("EF"));if(!(r instanceof W))return[];let o=r.lookup(v.of("F"));if(!(o instanceof Ee))return[];let s=i.lookup(v.of("AFRelationship")),a=s instanceof v?s.toString().slice(1):s instanceof J?s.decodeText():void 0,c=o.dict,l=c.lookup(v.of("Subtype")),d=l instanceof v?l.toString().slice(1):l instanceof J?l.decodeText():void 0,h=c.lookup(v.of("Params"),W),u,p;if(h instanceof W){let x=h.lookup(v.of("CreationDate")),g=h.lookup(v.of("ModDate"));x instanceof J&&(u=x.decodeDate()),g instanceof J&&(p=g.decodeDate())}let f=i.lookup(v.of("Desc")),m;return f instanceof K&&(m=f.decodeText()),[{name:t.decodeText(),data:Pr(o).decode(),mimeType:d==null?void 0:d.replace(/#([0-9A-Fa-f]{2})/g,(x,g)=>String.fromCharCode(parseInt(g,16))),afRelationship:a,description:m,creationDate:u,modificationDate:p}]})}getUnsavedAttachments(){return this.embeddedFiles.map(t=>{let i=t.getEmbedder();return{name:i.fileName,data:i.getFileData(),description:i.options.description,mimeType:i.options.mimeType,afRelationship:i.options.afRelationship,creationDate:i.options.creationDate,modificationDate:i.options.modificationDate}})}getAttachments(){let e=this.getSavedAttachments(),t=this.getUnsavedAttachments();return[...e,...t]}embedFont(e,t={}){return Q(this,void 0,void 0,function*(){let{subset:i=!1,customName:r,features:o}=t;T(e,"font",["string",Uint8Array,ArrayBuffer]),T(i,"subset",["boolean"]);let s;if(Ld(e))s=Fr.for(e,r);else if(Rf(e)){let l=$r(e),d=this.assertFontkit();s=i?yield Wd.for(d,l,r,o):yield Dr.for(d,l,r,o)}else throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`");let a=this.context.nextRef(),c=Me.of(a,this,s);return this.fonts.push(c),c})}embedStandardFont(e,t){if(T(e,"font",["string"]),!Ld(e))throw new TypeError("`font` must be one of type `StandardFonts`");let i=Fr.for(e,t),r=this.context.nextRef(),o=Me.of(r,this,i);return this.fonts.push(o),o}embedJpg(e){return Q(this,void 0,void 0,function*(){T(e,"jpg",["string",Uint8Array,ArrayBuffer]);let t=$r(e),i=yield Us.for(t),r=this.context.nextRef(),o=yi.of(r,this,i);return this.images.push(o),o})}embedPng(e){return Q(this,void 0,void 0,function*(){T(e,"png",["string",Uint8Array,ArrayBuffer]);let t=$r(e),i=yield js.for(t),r=this.context.nextRef(),o=yi.of(r,this,i);return this.images.push(o),o})}embedSvg(e){return Q(this,void 0,void 0,function*(){if(!e)return new pi(e);let t=(0,du.parse)(e),i=s=>s.tagName==="image"?[s]:s.childNodes.map(a=>a.nodeType===du.NodeType.ELEMENT_NODE?i(a):[]).flat(),r=i(t),o={};return yield Promise.all(r.map(s=>Q(this,void 0,void 0,function*(){var a;let c=(a=s.attributes.href)!==null&&a!==void 0?a:s.attributes["xlink:href"];if(!c||o[c])return;let d=c.match(/\.png(\?|$)|^data:image\/png;base64/gim)?yield this.embedPng(c):yield this.embedJpg(c);o[c]=d}))),new pi(e,o)})}embedPdf(e,t=[0]){return Q(this,void 0,void 0,function*(){T(e,"pdf",["string",Uint8Array,ArrayBuffer,[n,"PDFDocument"]]),T(t,"indices",[Array]);let i=e instanceof n?e:yield n.load(e),r=Nf(i.getPages(),t);return this.embedPages(r)})}embedPage(e,t,i){return Q(this,void 0,void 0,function*(){T(e,"page",[[Oe,"PDFPage"]]);let[r]=yield this.embedPages([e],[t],[i]);return r})}embedPages(e,t=[],i=[]){return Q(this,void 0,void 0,function*(){if(e.length===0)return[];for(let a=0,c=e.length-1;aa:Hl.for(r,this.context).copy,s=new Array(e.length);for(let a=0,c=e.length;ah.widthOfTextAtSize(y,p),x=t.maxWidth===void 0?Va(ir(e)):Tf(e,f,t.maxWidth,m),g=new Array(x.length);for(let y=0,F=x.length;ynew Oe(n,e,t);Oe.create=n=>{T(n,"doc",[[We,"PDFDocument"]]);let e=Y.of(-1),t=et.withContextAndParent(n.context,e),i=n.context.register(t);return new Oe(t,i,n)};var ki=class extends at{constructor(e,t,i){super(e,t,i),T(e,"acroButton",[[Bn,"PDFAcroPushButton"]]),this.acroField=e}setImage(e,t=vi.Center){let i=this.acroField.getWidgets();for(let r=0,o=i.length;rnew ki(n,e,t);function nt(n,e){let t=Object.keys(e).map(i=>Yk(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}function Yk(n,e,t){let i=n[e],r=n.hasOwnProperty(e),o=r?i:function(){return Object.getPrototypeOf(n)[e].apply(this,arguments)},s=t(o);return i&&Object.setPrototypeOf(s,i),Object.setPrototypeOf(a,s),n[e]=a,c;function a(...l){return s===o&&n[e]===a&&c(),s.apply(this,l)}function c(){n[e]===a&&(r?n[e]=o:delete n[e]),s!==o&&(s=o,Object.setPrototypeOf(a,i||Function))}}var ye=require("obsidian");var hu=require("obsidian"),Ke=class extends hu.Modal{constructor(e){super(e.app),this.plugin=e,this.lib=e.lib,this.component=new hu.Component,this.contentEl.addClass("pdf-plus-modal")}onOpen(){this.component.load()}onClose(){this.contentEl.empty(),this.component.unload()}};var fn=require("obsidian");var Tg={};vf(Tg,{BidirectionalMultiValuedMap:()=>Uc,CommandSuggest:()=>zc,FuzzyFileSuggest:()=>Hc,FuzzyFolderSuggest:()=>Rr,FuzzyInputSuggest:()=>Nr,FuzzyMarkdownFileSuggest:()=>Vc,MODIFIERS:()=>gg,MultiValuedMap:()=>$t,MutationObservingChild:()=>Wc,areOverlapping:()=>Cg,areOverlappingStrictly:()=>Sg,binarySearch:()=>hn,binarySearchForRangeStartingWith:()=>kg,camelCaseToKebabCase:()=>hg,capitalize:()=>tC,cropCanvas:()=>ig,dispatchMouseEvent:()=>sg,doubleClick:()=>pu,encodeLinktext:()=>Vr,evalInContext:()=>Eg,findReferenceCache:()=>wg,focusObsidian:()=>Zc,formatAnnotationID:()=>Xc,genId:()=>ug,getAndroidWebViewVersion:()=>ww,getBorderRadius:()=>tg,getCJKRegexp:()=>Pw,getCharacterBoundingBoxes:()=>vw,getCharactersWithBoundingBoxesInPDFCoords:()=>pg,getDirectPDFObj:()=>lt,getEventCoords:()=>fu,getFirstTextNodeIn:()=>nC,getInstallerVersion:()=>bu,getModifierDictInPlatform:()=>mg,getModifierNameInPlatform:()=>Bt,getNodeAndOffsetOfTextPos:()=>Wn,getObsidianDebugInfo:()=>yg,getObsidianDefaultHighlightColorRGB:()=>_k,getOffsetInTextLayerNode:()=>mu,getPathSeparator:()=>rC,getStyleSettings:()=>vg,getSubpathWithoutHash:()=>Dg,getSystemInfo:()=>Fw,getTextLayerInfo:()=>Dt,getTextLayerNode:()=>gu,getWordAt:()=>iC,hexToRgb:()=>Mr,hookInternalLinkMouseEventHandlers:()=>Qo,hover:()=>Qk,isAncestorOf:()=>Pg,isCanvas:()=>ma,isEmbed:()=>es,isHexString:()=>cn,isHoverEditor:()=>Dw,isHoverPopover:()=>xa,isModifierName:()=>xg,isMouseEventExternal:()=>Ci,isNonEmbedLike:()=>Kn,isSelectionForward:()=>un,isTargetElement:()=>yw,isTargetHTMLElement:()=>It,isTargetNode:()=>qc,isTypable:()=>ng,isVersionNewerThan:()=>pa,isVersionOlderThan:()=>bg,kebabCaseToCamelCase:()=>eC,loadComponentAsync:()=>kw,matchModifiers:()=>ag,onModKeyPress:()=>og,paramsToSubpath:()=>Gc,parsePDFSubpath:()=>$o,pdfJsQuadPointsToArrayOfRects:()=>dg,range:()=>fg,registerCharacterKeymap:()=>oC,removeExtension:()=>Fg,repeat:()=>is,repeatable:()=>ba,rgbStringToObject:()=>eg,rgbToHex:()=>$p,rotateCanvas:()=>uu,selectDoubleClickedWord:()=>lg,selectTrippleClickedTextLayerNode:()=>cg,showChildElOnParentElHover:()=>jc,showMenuUnderParentEl:()=>jn,stringCompare:()=>ts,subpathToParams:()=>ga,swapSelectionAnchorAndFocus:()=>Kc,toPDFCoords:()=>xu,toSingleLine:()=>Yc,walkDescendantComponents:()=>yu});var Ft=require("obsidian");function cn(n){return n.length===7&&n.startsWith("#")}function Mr(n){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}function $p(n){let{r:e,g:t,b:i}=n;return"#"+(1<<24|e<<16|t<<8|i).toString(16).slice(1)}function eg(n){let[e,t,i]=n.split(",").map(r=>parseInt(r.trim()));return{r:e,g:t,b:i}}function _k(){let[n,e,t]=getComputedStyle(document.body).getPropertyValue("--text-highlight-bg-rgb").split(",").map(i=>parseInt(i.trim()));return{r:n,g:e,b:t}}function tg(){let n=getComputedStyle(document.body).getPropertyValue("--radius-s");if(n.endsWith("px")){let e=parseInt(n.slice(0,-2));if(!isNaN(e))return e}return 0}var Qt=require("obsidian"),Jk={blurOnSelect:!0,closeOnSelect:!0},Nr=class extends Qt.AbstractInputSuggest{constructor(e,t,i){super(e,t),this.inputEl=t,this.options=Object.assign(Jk,i)}getSuggestions(e){let t=(0,Qt.prepareFuzzySearch)(e.trim()),i=this.getItems(),r=[];for(let o of i){let s=t(this.getItemText(o));s&&r.push({match:s,item:o})}return(0,Qt.sortSearchResults)(r),r}renderSuggestion(e,t){(0,Qt.renderResults)(t,this.getItemText(e.item),e.match)}selectSuggestion(e,t){super.selectSuggestion(e,t),this.inputEl.value=this.getItemText(e.item),this.options.blurOnSelect&&this.inputEl.blur(),this.options.closeOnSelect&&this.close()}},Vc=class extends Nr{getItems(){return this.app.vault.getMarkdownFiles()}getItemText(e){return e.path}},Hc=class extends Nr{getItems(){return this.app.vault.getFiles()}getItemText(e){return e.path}},Rr=class extends Nr{getItems(){return this.app.vault.getAllLoadedFiles().filter(e=>e instanceof Qt.TFolder)}getItemText(e){return e.path}},zc=class extends Qt.AbstractInputSuggest{constructor(e,t){super(e.plugin.app,t),this.inputEl=t,this.plugin=e.plugin,this.tab=e}getSuggestions(e){let t=(0,Qt.prepareFuzzySearch)(e),i=Object.values(this.plugin.app.commands.commands),r=[];for(let o of i){let s=t(o.name);s&&r.push({match:s,command:o})}return(0,Qt.sortSearchResults)(r),r.map(({command:o})=>o)}renderSuggestion(e,t){t.setText(e.name)}selectSuggestion(e){this.inputEl.blur(),this.plugin.settings.commandToExecuteWhenTargetNotIdentified=e.id,this.inputEl.value=e.name,this.close(),this.plugin.saveSettings(),this.tab.redisplay()}};var $t=class{constructor(){this.map=new Map}addValue(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}get(e){var t;return(t=this.map.get(e))!=null?t:new Set}delete(e){this.map.delete(e)}deleteValue(e,t){let i=this.map.get(e);i&&(i.delete(t),i.size===0&&this.map.delete(e))}has(e){return this.map.has(e)&&this.map.get(e).size>0}[Symbol.iterator](){return this.map[Symbol.iterator]()}},Uc=class{constructor(){this.keyToValues=new Map;this.valueToKeys=new Map}addValue(e,t){this.keyToValues.has(e)||this.keyToValues.set(e,new Set),this.keyToValues.get(e).add(t),this.valueToKeys.has(t)||this.valueToKeys.set(t,new Set),this.valueToKeys.get(t).add(e)}get(e){var t;return(t=this.keyToValues.get(e))!=null?t:new Set}getKeys(e){var t;return(t=this.valueToKeys.get(e))!=null?t:new Set}delete(e){let t=this.keyToValues.get(e);if(t)for(let i of t){let r=this.valueToKeys.get(i);if(!r)throw new Error("Value has no keys");r.delete(e),r.size===0&&this.valueToKeys.delete(i)}this.keyToValues.delete(e)}deleteValue(e){let t=this.valueToKeys.get(e);if(t)for(let i of t){let r=this.keyToValues.get(i);if(!r)throw new Error("Key has no values");r.delete(e),r.size===0&&this.keyToValues.delete(i)}this.valueToKeys.delete(e)}has(e){return this.keyToValues.has(e)&&this.keyToValues.get(e).size>0}hasValue(e){return this.valueToKeys.has(e)&&this.valueToKeys.get(e).size>0}keys(){return this.keyToValues.keys()}values(){return this.valueToKeys.keys()}};function ig(n,e,t={width:e.width,height:e.height}){let i=createEl("canvas");return i.width=t.width,i.height=t.height,i.getContext("2d").drawImage(n,e.left,e.top,e.width,e.height,0,0,t.width,t.height),i}function uu(n,e){if(e=(e%360+360)%360,![0,90,180,270].includes(e))throw new Error("rotate must be 0, 90, 180, or 270");if(!e)return n;let t=createEl("canvas"),i=t.getContext("2d");return e===90||e===270?(t.width=n.height,t.height=n.width):(t.width=n.width,t.height=n.height),i.translate(t.width/2,t.height/2),i.rotate(e*Math.PI/180),i.drawImage(n,-n.width/2,-n.height/2),t}var dn=require("obsidian");function Qo(n,e,t){e.querySelectorAll("a.internal-link").forEach(i=>{i.addEventListener("click",r=>{r.preventDefault();let o=i.getAttribute("href");o&&n.workspace.openLinkText(o,t,dn.Keymap.isModEvent(r))}),i.addEventListener("mouseover",r=>{r.preventDefault();let o=i.getAttribute("href");o&&n.workspace.trigger("hover-link",{event:r,source:"preview",hoverParent:{hoverPopover:null},targetEl:r.currentTarget,linktext:o,sourcePath:t})})})}function Ci(n,e){return!n.relatedTarget||yw(n,n.relatedTarget)&&!e.contains(n.relatedTarget)}function ng(n){return n.nodeName==="INPUT"||n.instanceOf(HTMLElement)&&n.contentEditable==="true"}function fu(n){return n.instanceOf(MouseEvent)?{x:n.clientX,y:n.clientY}:{x:n.touches[0].clientX,y:n.touches[0].clientY}}function rg(n,e,t){let i=e[t];return n instanceof i}function qc(n,e){return!!e&&(e instanceof Node||rg(e,n.win,"Node"))}function yw(n,e){return!!e&&(e instanceof Element||rg(e,n.win,"Element"))}function It(n,e){return!!e&&(e instanceof HTMLElement||rg(e,n.win,"HTMLElement"))}function og(n,e,t){if(dn.Keymap.isModifier(n,"Mod")){t();return}let i=n.doc,r=!1,o=()=>{r=!0,i.removeEventListener("keydown",s),i.removeEventListener("mouseover",a),i.removeEventListener("mouseleave",c)},s=l=>{r||(i.body.contains(e)?dn.Keymap.isModifier(l,"Mod")&&(o(),t()):o())},a=l=>{r||qc(l,l.target)&&!e.contains(l.target)&&o()},c=l=>{r||l.target===i&&o()};i.addEventListener("keydown",s),i.addEventListener("mouseover",a),i.addEventListener("mouseleave",c)}function jc(n){let{parentEl:e,createChildEl:t,removeChildEl:i,component:r,timeout:o}=n,s=a=>{if(Ci(a,e)){let c=!0,l=!1,d=t(),h=new dn.Component;r==null||r.addChild(h),h.register(()=>d&&i(d)),h.load();let u=()=>setTimeout(()=>{!c&&!l&&h.unload()},o!=null?o:120),p=f=>{Ci(f,e)&&(c=!1,u())};h.registerDomEvent(e,"mouseout",p),d&&h.registerDomEvent(d,"mouseover",f=>{if(Ci(f,d)){l=!0;let m=x=>{Ci(x,d)&&(l=!1,u())};h.registerDomEvent(d,"mouseout",m)}})}};e.addEventListener("mouseover",s)}function sg(n,e,t){n.dispatchEvent(new MouseEvent(e,{bubbles:!0,...t}))}function pu(n,e){sg(n,"dblclick",e)}function Qk(n,e,t){t!=null||(t={}),e&&(t[dn.Platform.isMacOS?"metaKey":"ctrlKey"]=!0);let{x:i,y:r}=n.getBoundingClientRect();sg(n,"mouseover",{doc:n.doc,clientX:i,clientY:r,...t})}var $k=["Mod","Ctrl","Meta","Shift","Alt"];function ag(n,e){return $k.every(t=>e.includes(t)?dn.Keymap.isModifier(n,t):!dn.Keymap.isModifier(n,t))}function lg(n){let e=n.doc,t=e.getSelection();if(!t)return;let i=null;if(e.caretRangeFromPoint)i=e.caretRangeFromPoint(n.clientX,n.clientY);else if(e.caretPositionFromPoint){let r=e.caretPositionFromPoint(n.clientX,n.clientY);if(!r)return;i=e.createRange(),i.setStart(r.offsetNode,r.offset),i.collapse(!0)}i&&(t.removeAllRanges(),t.addRange(i),t.modify("move","backward","word"),t.modify("extend","forward","word"))}function cg(n){if(n.detail<3||!qc(n,n.target))return;let e=n.target.nodeName==="SPAN"?n.target:n.target.parentElement;if(!e||!e.instanceOf(HTMLSpanElement)||!e.hasClass("textLayerNode"))return;let t=n.win.getSelection();if(!t)return;let i=n.doc.createRange();i.selectNodeContents(e),t.removeAllRanges(),t.addRange(i)}function lt(n,e){let t=n.get(v.of(e));return t instanceof Y?n.context.lookup(t):t}function dg(n){let e=[];if(ArrayBuffer.isView(n)){if(n.length%8)return e;for(let t=0;t`-${e.toLowerCase()}`)}function eC(n){return n.replace(/(-\w)/g,e=>e[1].toUpperCase())}function tC(n){return n.charAt(0).toUpperCase()+n.slice(1)}function iC(n,e){if(e<0||e>=n.length)return"";let t=Math.max(0,n.slice(0,e+1).search(/(?<=[^\s.,][\s.,]+)[^\s.,]*$/));n=n.slice(t),t=Math.max(0,n.search(/[^\s.,]/)),n=n.slice(t);let i=n.search(/[\s.,]/);return i===-1?n:n.slice(0,i)}function ug(){let n=()=>((1+Math.random())*65536|0).toString(16).substring(1);return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function fg(n,e){return Array.from({length:e-n},(t,i)=>n+i)}function gu(n,e){if(!n.contains(e))return null;if(e.instanceOf(HTMLElement)&&e.hasClass("textLayerNode"))return e;let t=e;for(;t=t.parentNode;){if(t===n)return null;if(t.instanceOf(HTMLElement)&&t.hasClass("textLayerNode"))return t}return null}function mu(n,e,t){if(!n.contains(e))return null;let i=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),r,o=t;for(;(r=i.nextNode())&&e!==r;)o+=r.textContent.length;return o}function Wn(n,e){let t=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),i;for(;(i=t.nextNode())&&e>=i.textContent.length;)e-=i.textContent.length;return i?{node:i,offset:e}:null}function*vw(n){let e=n.doc.createNodeIterator(n,NodeFilter.SHOW_TEXT),t;for(;t=e.nextNode();)if(t.instanceOf(Text))for(let i=0;it.brand==="Android WebView");if(e)return e.version}let n=navigator.userAgent.match(/Chrome\/([\d]+)/);return n?n[1]:null}async function Fw(){if(window.electron){let r=require("os");return{"Obsidian version":window.electron.ipcRenderer.sendSync("version"),"Installer version":window.electron.remote.app.getVersion(),"Operating system":r.version()+" "+r.release()}}let n=await window.Capacitor.Plugins.App.getInfo(),e=await window.Capacitor.Plugins.Device.getInfo(),t={"Obsidian version":`${n.version} (${n.build})`,"API version":Ft.apiVersion,"Operating system":`${e.platform} ${e.osVersion} (${e.manufacturer} ${e.model})`},i=ww();return i&&(t["Android WebView version"]=i),t}async function yg(n){let e=n.customCss.theme,t=n.customCss.themes[e],i=n.customCss.snippets.filter(o=>n.customCss.enabledSnippets.has(o)).length,r=n.plugins.plugins;return{...await Fw(),"Use [[Wikilinks]]":n.vault.getConfig("useMarkdownLinks"),"Base color scheme":document.body.hasClass("theme-dark")?"dark":"light",'PDF "Adapt to theme"':!!n.loadLocalStorage("pdfjs-is-themed"),"Community theme":e?`${e} v${t.version}`:"none","Snippets enabled":i,"Plugins installed":Object.keys(n.plugins.manifests).length,"Plugins enabled":Object.values(r).map(o=>`${o.manifest.name} v${o.manifest.version}`)}}function vg(n){var i;let e=(i=n.plugins.plugins["obsidian-style-settings"])==null?void 0:i.settingsManager.settings;return e?Object.fromEntries(Object.entries(e).filter(([r])=>r.startsWith("pdf-plus@@"))):null}function wg(n,e,t){var i,r,o;return(o=(i=n.links)==null?void 0:i.find(s=>e<=s.position.start.offset&&s.position.end.offset<=t))!=null?o:(r=n.embeds)==null?void 0:r.find(s=>e<=s.position.start.offset&&s.position.end.offset<=t)}function Fg(n){let e=n.lastIndexOf(".");return e===-1||e===n.length-1||e===0?n:n.slice(0,e)}function Dg(n){let{subpath:e}=(0,Ft.parseLinktext)(n);return e.startsWith("#")&&(e=e.slice(1)),e}function ga(n){return n.startsWith("#")&&(n=n.slice(1)),new URLSearchParams(n)}function $o(n){let e=ga(n);if(!e.has("page"))return null;let t=+e.get("page");if(isNaN(t))return null;if(e.has("selection")){let i=e.get("selection").split(",").map(c=>parseInt(c.trim()));if(i.length!==4||i.some(c=>isNaN(c)))return null;let[r,o,s,a]=i;return{type:"selection",page:t,beginIndex:r,beginOffset:o,endIndex:s,endOffset:a}}if(e.has("annotation")){let i=e.get("annotation");return{type:"annotation",page:t,annotation:i}}return{type:"page",page:t}}function Gc(n){return"#"+Object.entries(n).filter(([e,t])=>e&&(t||t===0)).map(([e,t])=>`${e}=${t}`).join("&")}function Xc(n,e){return e===0?`${n}R`:`${n}R${e}`}var Wc=class extends Ft.Component{constructor(t,i,r){super();this.targetEl=t;this.callback=i;this.options=r;this.observer=new MutationObserver(i)}onload(){this.observer.observe(this.targetEl,this.options)}onunload(){this.observer.disconnect()}};function Kn(n){return!n.isEmbed&&!Dw(n)}function es(n){return n.isEmbed&&!ma(n)&&!xa(n)}function ma(n){var e;return!!((e=n.dom)!=null&&e.containerEl.hasClass("canvas-node-content"))}function xa(n){var e;return!!((e=n.dom)!=null&&e.containerEl.closest(".hover-popover"))}function Dw(n){var e;return!!((e=n.dom)!=null&&e.containerEl.closest(".hover-editor"))}function Zc(){activeWindow.open("obsidian://")}function Pg(n,e,t=!1){if(t&&n===e)return!0;let i=e.parent;for(;i;){if(i===n)return!0;i=i.parent}return!1}function Pw(n){n={japanese:!0,korean:!0,...n};let e="";return e+="\\u4e00-\\u9fff",e+="\\u3400-\\u4dbf",n.japanese&&(e+="\\u3040-\\u309F",e+="\\u30A0-\\u30FF",e+="\\uFF65-\\uFF9F",e+="\\u31F0-\\u31FF",e+="\\u3000-\\u303F"),n.korean&&(e+="\\u1100-\\u11FF",e+="\\uA960-\\uA97F",e+="\\uD7B0-\\uD7FF",e+="\\u3130-\\u318F",e+="\\uAC00-\\uD7AF"),new RegExp(`[${e}]`)}function Yc(n,e=!1){let t=Pw({korean:!1});return n=n.replace(/(.?)([\r\n]+)(.?)/g,(i,r,o,s)=>t.test(r)&&t.test(s)?r+s:r==="-"&&s.match(/[a-zA-Z]/)?s:s?r+" "+s:r),e&&(n=n.replace(new RegExp(`(${t.source}) (?=${t.source})`,"g"),"$1")),window.pdfjsViewer.removeNullCharacters(window.pdfjsLib.normalizeUnicode(n))}function Vr(n){return n.replace(/[\\\x00\x08\x0B\x0C\x0E-\x1F ]/g,e=>encodeURIComponent(e))}function oC(n,e,t){return n.register(null,e,(i,r)=>{if(r.key===e&&r.modifiers!==null&&["","Shift"].includes(r.modifiers))return t(i,r)})}function hn(n,e,t){var a,c,l,d;if(t&&t.findFirst&&t.findLast)throw Error("findFirst and findLast cannot be specified at the same time");let i=(a=t==null?void 0:t.findFirst)!=null?a:!1,r=(c=t==null?void 0:t.findLast)!=null?c:!1,o=(l=t==null?void 0:t.from)!=null?l:0,s=(d=t==null?void 0:t.to)!=null?d:n.length-1;if(o>s)return{found:!1,index:o};for(;;){let h=o+s+ +r>>1,u=n[h],p=e(u,h);if(p===0)if(i&&oh)o=h;else return{found:!0,index:h};else p>0?o=h+1:s=h-1;if(o>s)return{found:!1,index:h+ +(p>0)}}}function ts(n,e){return n===e?0:nts(e,t(a).slice(0,e.length)),{found:o,index:s}=hn(n,r,{findFirst:!0,...i});if(o){let{index:a}=hn(n,r,{findLast:!0,...i,from:s});return{from:s,to:a}}return null}function Cg(n,e){return n.from<=e.to&&n.to>=e.from}function Sg(n,e){return n.frome.from}function un(n){return n.anchorNode===n.focusNode?n.anchorOffsetis(n,e)}function Eg(n,e){return new Function(n.includes("await")?"(async () => {"+n+"})()":n).call(e)}function yu(n,e){if(e(n)!==!1)for(let i of n._children)yu(i,e)}async function kw(n){if(!n._loaded){n._loaded=!0,await n.onload();let e=n._children.map(kw);await Promise.all(e)}}var vu=class extends Ke{constructor(e,t,i,r){super(e),this.file=t,this.page=i,this.id=r}},Hr=class Hr extends vu{static isSubtypeSupported(e){return Hr.supportedSubtypes.includes(e)}static forSubtype(e,...t){return e==="Link"?Hr.forLinkAnnotation(...t):Hr.forTextMarkupAnnotation(...t)}static forTextMarkupAnnotation(...e){return new Hr({color:!1,opacity:!1,author:!1,contents:!0},...e)}static forLinkAnnotation(...e){return new Hr({color:!0,borderWidth:!0},...e)}constructor(e,...t){super(...t),this.allowNoValue=e,this.supportedKeys=Object.keys(e),this.oldValues={},this.newValues={},this.containerEl.addClass("pdf-plus-annotation-edit-modal"),this.buttonContainerEl=this.modalEl.createDiv(),this.scope.register(["Mod"],"Enter",()=>{this.onSaveButtonClick()})}async readOldValues(){let e=this.lib.highlight.writeFile.pdflib,t=await e.getAnnotation(this.file,this.page,this.id);if(!t)throw new Error(`${this.plugin.manifest.name}: Annotation not found.`);for(let i of this.supportedKeys)switch(i){case"color":this.oldValues.color=e.getColorFromAnnotation(t);break;case"opacity":this.oldValues.opacity=e.getOpacityFromAnnotation(t);break;case"borderWidth":this.oldValues.borderWidth=e.getBorderWidthFromAnnotation(t);break;case"author":this.oldValues.author=e.getAuthorFromAnnotation(t);break;case"contents":this.oldValues.contents=e.getContentsFromAnnotation(t);break}}async writeNewValues(){let e=this.lib.highlight.writeFile.pdflib,t=[];for(let i of this.supportedKeys)switch(i){case"color":if(this.newValues.color&&this.newValues.color!==this.oldValues.color){let r=this.newValues.color;t.push(o=>{e.setColorToAnnotation(o,r),this.lib.getLatestBacklinksForAnnotation(this.file,this.page,this.id).then(s=>{s.forEach(a=>this.lib.composer.linkUpdater.updateLinkColor(a.refCache,a.sourcePath,{type:"rgb",rgb:r},{linktext:!1}))})})}break;case"opacity":typeof this.newValues.opacity=="number"&&this.newValues.opacity!==this.oldValues.opacity&&t.push(r=>{e.setOpacityToAnnotation(r,this.newValues.opacity)});break;case"borderWidth":typeof this.newValues.borderWidth=="number"&&this.newValues.borderWidth!==this.oldValues.borderWidth&&t.push(r=>{e.setBorderWidthToAnnotation(r,this.newValues.borderWidth)});break;case"author":this.newValues.author&&this.newValues.author!==this.oldValues.author&&t.push(r=>{e.setAuthorToAnnotation(r,this.newValues.author)});break;case"contents":typeof this.newValues.contents=="string"&&this.newValues.contents!==this.oldValues.contents&&t.push(r=>{e.setContentsToAnnotation(r,this.newValues.contents)});break}t.length&&await e.processAnnotation(this.file,this.page,this.id,async i=>{t.forEach(r=>r(i))})}addColorSetting(){if(this.oldValues.color||this.allowNoValue.color){let e,t;new fn.Setting(this.contentEl).setName("Color").setDesc("You can choose a color from the color picker or select one from your custom named colors.").addColorPicker(i=>{var r;e=i,e.setValueRgb((r=this.oldValues.color)!=null?r:{r:0,g:0,b:0}).onChange(o=>{let s=Mr(o);s&&(this.newValues.color=s,t.setValue(o))})}).addDropdown(i=>{t=i,t.addOptions(Object.fromEntries(Object.entries(this.plugin.settings.colors).map(([r,o])=>[o,r]))).setValue(this.oldValues.color?$p(this.oldValues.color):"").onChange(r=>{let o=Mr(r);o&&(this.newValues.color=o,e.setValue(r))})})}}addOpacitySetting(){(this.oldValues.opacity||this.allowNoValue.opacity)&&new fn.Setting(this.contentEl).setName("Opacity").addSlider(e=>{var t;e.setLimits(0,1,.01).setValue((t=this.oldValues.opacity)!=null?t:1).setDynamicTooltip().onChange(i=>{this.newValues.opacity=i})})}addBorderWidthSetting(){(this.oldValues.borderWidth||this.allowNoValue.borderWidth)&&new fn.Setting(this.contentEl).setName("Draw border").addToggle(e=>{var t;e.setValue(!!((t=this.oldValues.borderWidth)==null||t)).onChange(i=>{this.newValues.borderWidth=i?1:0})})}addAuthorSetting(){(this.oldValues.author||this.allowNoValue.author)&&new fn.Setting(this.contentEl).setName("Annotation author").addText(e=>{var t;e.setValue((t=this.oldValues.author)!=null?t:"Author").onChange(i=>{this.newValues.author=i})})}initContentsSetting(){var e;if(this.textarea=null,this.editorEl=null,this.previewEl=null,this.plugin.settings.renderMarkdownInStickyNote){let t=(e=this.app.hotkeyManager.getHotkeys("markdown:toggle-preview"))!=null?e:this.app.hotkeyManager.getDefaultHotkeys("markdown:toggle-preview");if(t&&t.length){let i=t[0];this.scope.register(i.modifiers,i.key,()=>this.togglePreview())}}}addContentsSetting(){(this.oldValues.contents||this.allowNoValue.contents)&&new fn.Setting(this.contentEl).setName("Comment").then(e=>{this.previewEl=e.controlEl.createDiv("preview-container markdown-rendered"),this.plugin.settings.renderMarkdownInStickyNote?e.setDesc(`Press ${this.app.hotkeyManager.printHotkeyForCommand("markdown:toggle-preview")} to toggle preview.`):e.setDesc(createFragment(t=>{let i=createEl("a",{text:'"Render markdown in annotation popups when the annotation has text contents"'},r=>{r.onclick=o=>{let s=this.plugin.openSettingTab();s.scrollTo("renderMarkdownInStickyNote",{behavior:"smooth"}),s.updateHeaderElClassOnScroll(o)}});t.append("Tip: There is an option called "),t.append(i),t.append(".")}))}).addTextArea(e=>{var t;this.textarea=e,this.editorEl=e.inputEl,this.editorEl.addClass("editor-container"),e.inputEl.rows=5,e.inputEl.setCssStyles({width:"100%"}),e.setValue((t=this.oldValues.contents)!=null?t:"").onChange(i=>{this.newValues.contents=i})}),this.showEditor()}addButtons(){new fn.Setting(this.buttonContainerEl).addButton(e=>{e.setButtonText("Save").setCta().onClick(()=>{this.onSaveButtonClick()})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>this.close())}).setClass("no-border"),this.buttonContainerEl.createDiv({cls:"pdf-plus-annotation-edit-modal-save-instructions",text:`Press ${Bt("Mod")} + Enter to save.`})}onSaveButtonClick(){this.writeNewValues(),this.close()}async onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: edit annotation contents`),await this.readOldValues();for(let e of this.supportedKeys)switch(e){case"color":this.addColorSetting();break;case"opacity":this.addOpacitySetting();break;case"borderWidth":this.addBorderWidthSetting();break;case"author":this.addAuthorSetting();break;case"contents":this.initContentsSetting(),this.addContentsSetting();break}this.addButtons()}async showEditor(){var e,t;(e=this.editorEl)==null||e.show(),(t=this.previewEl)==null||t.hide()}async showPreview(){var e,t;this.editorEl&&this.previewEl&&(this.previewEl.setCssStyles({width:`${this.editorEl.clientWidth}px`,height:`${this.editorEl.clientHeight}px`}),this.previewEl.empty(),await fn.MarkdownRenderer.render(this.app,(t=(e=this.textarea)==null?void 0:e.getValue())!=null?t:"",this.previewEl,"",this.component),Qo(this.app,this.previewEl,this.file.path),this.editorEl.hide(),this.previewEl.show())}async togglePreview(){var e;return(e=this.editorEl)!=null&&e.isShown()?this.showPreview():this.showEditor()}};Hr.supportedSubtypes=["Highlight","Underline","Squiggly","StrikeOut","Link"];var zr=Hr,ya=class extends vu{onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: delete annotation`),this.contentEl.createEl("p",{text:"Are you sure you want to delete this annotation?"}),this.plugin.settings.warnEveryAnnotationDelete||this.contentEl.createEl("p",{cls:"mod-warning",text:"There are one or more links pointing to this annotation."}),new fn.Setting(this.contentEl).addButton(e=>{e.setButtonText("Delete").setWarning().onClick(()=>{this.deleteAnnotation(),this.close()})}).addButton(e=>{e.setButtonText("Cancel").onClick(()=>this.close())}).then(e=>e.setClass("no-border"))}openIfNeccessary(){return this.shouldOpen()?this.open():this.deleteAnnotation()}shouldOpen(){return this.plugin.settings.warnEveryAnnotationDelete||this.plugin.settings.warnBacklinkedAnnotationDelete&&this.lib.isBacklinked(this.file,{page:this.page,annotation:this.id})}deleteAnnotation(){this.lib.highlight.writeFile.deleteAnnotation(this.file,this.page,this.id)}};var va=require("obsidian");var _c,Ur,wu=class extends Ke{constructor(t,i,...r){super(...r);mn(this,_c);mn(this,Ur);this.file=t,this.page=i,Lt(this,_c,new Promise(o=>{Lt(this,Ur,o)}))}then(t){return qe(this,_c).then(i=>{i&&t()}),this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: delete page`),this.contentEl.createEl("p",{text:"Are you sure you want to delete this page?"}),this.plugin.settings.warnEveryAnnotationDelete||this.contentEl.createEl("p",{cls:"mod-warning",text:"There are one or more links pointing to this page."}),new va.Setting(this.contentEl).addButton(t=>{t.setButtonText("Delete").setWarning().onClick(()=>{qe(this,Ur).call(this,!0),this.close()})}).addButton(t=>{t.setButtonText("Cancel").onClick(()=>{qe(this,Ur).call(this,!1),this.close()})}).then(t=>t.setClass("no-border"))}onClose(){super.onClose(),qe(this,Ur).call(this,!1)}openIfNeccessary(){return this.shouldOpen()?(this.open(),this):(qe(this,Ur).call(this,!0),this)}shouldOpen(){return this.plugin.settings.warnEveryPageDelete||this.plugin.settings.warnBacklinkedPageDelete&&this.lib.isBacklinked(this.file,{page:this.page})}};_c=new WeakMap,Ur=new WeakMap;var Qc={keep:"Keep labels unchanged",update:"Update"},Jc,qr,Gn=class extends Ke{constructor(t,i,r,o,s){super(t);mn(this,Jc);mn(this,qr);this.askPageLabelUpdateMethod=i,this.defaultMethod=r,this.askInPlace=o,this.defaultInPlace=s,Lt(this,Jc,new Promise(a=>{Lt(this,qr,a)}))}ask(){return this.askPageLabelUpdateMethod||this.askInPlace?this.open():qe(this,qr).call(this,{pageLabelUpdateMethod:this.defaultMethod,inPlace:this.defaultInPlace}),this}then(t){qe(this,Jc).then(i=>{if(i){let{pageLabelUpdateMethod:r,inPlace:o}=i;t(r==="keep",o)}})}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: Page composer`);let t=this.defaultMethod,i=this.defaultInPlace;this.askPageLabelUpdateMethod&&new va.Setting(this.contentEl).setName("Update the page labels?").setDesc(createFragment(r=>{r.createEl("a",{text:"Learn more",href:"https://github.com/RyotaUshio/obsidian-pdf-plus/wiki/Page-labels"})})).addDropdown(r=>{r.addOptions(Qc).setValue(t).onChange(o=>{t=o})}),this.askInPlace&&new va.Setting(this.contentEl).setName("Remove pages from original file?").addToggle(r=>{r.setValue(i).onChange(o=>{i=o})}),new va.Setting(this.contentEl).addButton(r=>{r.setButtonText("Proceed").setCta().onClick(()=>{(t==="keep"||t==="update")&&qe(this,qr).call(this,{pageLabelUpdateMethod:t,inPlace:i}),this.close()}),setTimeout(()=>r.buttonEl.focus())}).addButton(r=>{r.setButtonText("Cancel").onClick(()=>{qe(this,qr).call(this,null),this.close()})})}onClose(){super.onClose(),qe(this,qr).call(this,null)}};Jc=new WeakMap,qr=new WeakMap;var Fu=class extends Ke{constructor(){super(...arguments);this.pageSize="A4";this.orientation="portrait";this.next=[]}askOptions(){return this.open(),this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: Create new PDF`),this.addSetting().setName("Page size").addDropdown(t=>{Object.keys(Yo).forEach(i=>t.addOption(i,i)),t.setValue(this.pageSize).onChange(i=>{Yo.hasOwnProperty(i)&&(this.pageSize=i)})}),this.addSetting().setName("Orientation").addDropdown(t=>{t.addOption("portrait","Portrait").addOption("landscape","Landscape").setValue(this.orientation).onChange(i=>{(i==="portrait"||i==="landscape")&&(this.orientation=i)})}),this.addSetting().addButton(t=>{t.setButtonText("Create").setCta().then(i=>{setTimeout(()=>i.buttonEl.focus())}).onClick(async()=>{this.close();let i=await this.createPDFDocument();this.next.forEach(r=>r(i))})}).addButton(t=>{t.setButtonText("Cancel").onClick(()=>{this.close()})})}addSetting(){return new va.Setting(this.contentEl)}then(t){return this.next.push(t),this}async createPDFDocument(){let t=await We.create(),[i,r]=Yo[this.pageSize],o=Math.max(i,r),s=Math.min(i,r),a=this.orientation==="portrait"?[s,o]:[o,s];return t.addPage(a),t}};var $c=require("obsidian"),jr=class extends Ke{constructor(t,i){super(t);this.next=[];this.submitted=!1;this.title=null;this.modalTitle=i,this.component.registerDomEvent(this.modalEl.doc,"keypress",r=>{r.key==="Enter"&&this.submitAndClose()})}presetTitle(t){return this.title=t,this}onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: ${this.modalTitle}`),new $c.Setting(this.contentEl).setName("Title").addText(t=>{this.title!==null&&(t.setValue(this.title),t.inputEl.select()),t.inputEl.size=30,t.inputEl.id="pdf-plus-outline-title-modal"}),new $c.Setting(this.contentEl).addButton(t=>{t.setButtonText("Add").setCta().onClick(()=>{this.submitAndClose()})}).addButton(t=>{t.setButtonText("Cancel").onClick(()=>{this.close()})})}ask(){return this.open(),this}then(t){return this.submitted&&this.title!==null?t({title:this.title}):this.next.push(t),this}submitAndClose(){let t=this.contentEl.querySelector("#pdf-plus-outline-title-modal");t instanceof HTMLInputElement&&(this.title=t.value,this.submitted=!0,this.close())}onClose(){this.submitted&&this.title!==null&&this.next.forEach(t=>t({title:this.title}))}},Du=class extends $c.FuzzySuggestModal{constructor(t,i){super(t.plugin.app);this.next=[];this.outlines=t,this.plugin=t.plugin,this.items=[],this.outlines.iter({enter:r=>{!i.isAncestorOf(r,!0)&&!r.is(i.parent)&&this.items.push(r)}}),this.setPlaceholder("Type an outline item title")}askDestination(){return this.open(),this}then(t){return this.next.push(t),this}getItems(){return this.items}getItemText(t){return t.name}onChooseItem(t){this.next.forEach(i=>i(t))}};var Cw=require("obsidian"),ei=require("obsidian");var Pu=class{constructor(e){this._rootDict=e}get root(){return this.createNode(this._rootDict)}get(e){return this.root.get(e)}iterLeaves(e){this.root.iterLeaves(e)}getLeaves(){return this.root.getLeaves()}iter(e){this.root.iter(e)}[Symbol.iterator](){return this.root[Symbol.iterator]()}keys(){return this.root.keys()}values(){return this.root.values()}limitLeafSize(e){this.root.limitLeafSize(e)}},wa=class extends Pu{createNode(e){return new Ag(e)}},Wr=class extends Pu{createNode(e){return new Ig(e)}},ku=class{constructor(e){this.dict=e}is(e){return this.dict===e.dict}isRoot(){return!this._dictHas("Limits")}isUniqueNode(){return this.isRoot()&&this._dictHas(this.leafKey)}isLeaf(){return this._dictHas("Limits")&&this._dictHas(this.leafKey)}isIntermediate(){return this._dictHas("Limits")&&this._dictHas("Kids")}get kids(){let e=this.dict.get(v.of("Kids"));return e instanceof Z?e.asArray().map(t=>{let i=this.dict.context.lookup(t);if(i instanceof W)return new this.constructor(i);throw new Error("Kid is not a PDFDict")}):null}get limits(){let e=this.dict.get(v.of("Limits"));if(!(e instanceof Z))return null;if(e.size()!==2)throw new Error("Limits array must have 2 elements");return e.asArray().map(t=>this._toStringOrNumber(t))}get(e){let t=this.getLeafFor(e);if(!t)return null;let i=t._getNamesOrNums();if(!i)throw new Error("Node has no names or nums despite not having kids");let r=0,o=(i.length>>1)-1;for(;r<=o;){let s=r+o>>1,a=i[s*2];if(a===e){let c=i[s*2+1];if(c instanceof Se)return c;throw new Error("Value is not a PDFObject")}a{if(e>=i.length)return{done:!0,value:[]};let o=i[e]._getNamesOrNums();if(!o)throw new Error("Leaf has no names or nums");let s=o[t],a=o[t+1];return t+=2,t>=o.length&&(e++,t=0),{done:!1,value:[s,a]}}}}keys(){return Array.from(this,([e])=>e)}values(){return Array.from(this,([,e])=>e)}size(){let e=0;return this.iterLeaves(t=>{let i=t._getNamesOrNums();if(!i)throw new Error("Leaf has no names or nums");e+=i.length>>1}),e}iterLeaves(e){let t=[this];for(;t.length;){let i=t.shift(),r=i.kids;r?t.push(...r):e(i)}}getLeaves(){let e=[];return this.iterLeaves(t=>e.push(t)),e}sortKids(){let e=this.kids;if(!e)return;e.sort((i,r)=>{let o=i.limits,s=r.limits;if(!o||!s)throw new Error("Kid has no limits");return o[0]s[0]?1:0});let t=Z.withContext(this.dict.context);for(let i of e)t.push(i.dict);this.dict.set(v.of("Kids"),t)}flatten(){if(this.isUniqueNode()||this.isLeaf())return;let e=Z.withContext(this.dict.context);for(let[t,i]of this)e.push(this._toPDFStringOrPDFNumber(t)),e.push(i);this.dict.set(v.of(this.leafKey),e),this.dict.delete(v.of("Kids"))}iter(e){var t,i,r;(t=e.enter)==null||t.call(e,this),(i=this.kids)==null||i.forEach(o=>o.iter(e)),(r=e.leave)==null||r.call(e,this)}limitLeafSize(e){let t=[],i=[],r=()=>{let o=this.dict.context.obj(t),s=t[0],a=t[t.length-2],c=this.dict.context.obj([s,a]),l=this.dict.context.obj({[this.leafKey]:o,Limits:c}),d=this.dict.context.register(l);i.push(d)};for(let[o,s]of this)t.push(o,s),t.length>>1>=e&&(r(),t.length=0);if(t.length&&r(),i.length===1)this.dict.set(v.of(this.leafKey),this.dict.context.obj(t)),this.dict.delete(v.of("Kids")),this.dict.delete(v.of("Limits"));else{let o=this.dict.context.obj(i);this.dict.set(v.of("Kids"),o)}}getLeafFor(e){if(this.isUniqueNode())return this;let t=this.limits;if(t&&(e{let s=o.limits;if(!s)throw new Error("Kid has no limits");return s[0]<=e&&e<=s[1]}),!i)return null;r=i.kids}return i}_dictHas(e){return this.dict.has(v.of(e))}_getNamesOrNums(){let e=this.dict.get(v.of(this.leafKey));return e instanceof Z?e.asArray().map((t,i)=>i%2?t:this._toStringOrNumber(t)):null}},Ag=class extends ku{get leafKey(){return"Names"}_toStringOrNumber(e){if(e instanceof J||e instanceof K)return e.decodeText();throw new Error("Key is not a PDFString or a PDFHexString")}_toPDFStringOrPDFNumber(e){return K.fromText(e)}get names(){return this._getNamesOrNums()}},Ig=class extends ku{get leafKey(){return"Nums"}_toStringOrNumber(e){if(e instanceof G)return e.asNumber();throw new Error("Key is not a PDFNumber")}_toPDFStringOrPDFNumber(e){return G.of(e)}get nums(){return this._getNamesOrNums()}};var Bg={D:"1, 2, 3, ...",R:"I, II, III, ...",r:"i, ii, iii, ...",A:"A, B, C, ...",a:"a, b, c, ..."};function Og(n){return Bg.hasOwnProperty(n)}var ed=class n{static fromPDFDict(e){let t=new n,i=e.get(v.of("St"));i instanceof G&&(t.start=i.asNumber());let r=e.get(v.of("S"));if(r instanceof v){let s=r.decodeText();Og(s)&&(t.style=s)}let o=e.get(v.of("P"));return(o instanceof J||o instanceof K)&&(t.prefix=o.decodeText()),t}},Ui=class n{constructor(e,t){this.doc=e;this.ranges=t;this.normalize()}normalize(){var e;if(this.ranges.length){this.ranges.sort((t,i)=>t.pageFrom-i.pageFrom),this.ranges[0].pageFrom=1;for(let t=this.ranges.length-1;t>=0;t--){let i=this.getStartOfRange(t),r=this.getEndOfRange(t);if(i>r){this.ranges.splice(t,1);continue}let o=this.ranges[t],s=this.ranges[t-1];if(s&&typeof o.dict.start=="number"&&o.dict.prefix===s.dict.prefix&&o.dict.style===s.dict.style&&o.pageFrom-s.pageFrom===o.dict.start-((e=s.dict.start)!=null?e:1)){this.ranges.splice(t,1);continue}}}return this}static fromDocument(e){let t=lt(e.catalog,"PageLabels");if(!(t instanceof W))return null;let i=new Wr(t),r=[];for(let[o,s]of i){let a=s instanceof Y?e.context.lookup(s):s;if(!(a instanceof W))return null;r.push({pageFrom:o+1,dict:ed.fromPDFDict(a)})}return new n(e,r)}setToDocument(e){e||(e=this.doc);let t=[];for(let{pageFrom:r,dict:o}of this.normalize().ranges){t.push(r-1);let s={};o.style!==void 0&&(s.S=o.style),o.prefix!==void 0&&(s.P=K.fromText(o.prefix)),o.start!==void 0&&(s.St=o.start),t.push(e.context.obj(s))}let i=e.context.obj({Nums:t});new Wr(i).limitLeafSize(64),e.catalog.set(v.of("PageLabels"),i)}static removeFromDocument(e){e.catalog.delete(v.of("PageLabels"))}static processDocument(e,t){let i=n.fromDocument(e);return i?(t(i),i.setToDocument(),!0):!1}static createEmpty(e){return new n(e,[{pageFrom:1,dict:new ed}])}removeRange(e){return this.ranges.splice(e,1),this.normalize(),this}divideRangeAtPage(e,t,i){var a;let r=this.getRangeIndexAtPage(e);if(r===-1)return this;if(e===this.getStartOfRange(r))return this;let o=this.ranges[r],s=new ed;return s.prefix=o.dict.prefix,s.style=o.dict.style,t&&(s.start=e-o.pageFrom+((a=o.dict.start)!=null?a:1)),i==null||i(s),this.ranges.splice(r+1,0,{pageFrom:e,dict:s}),this}shiftRangesAfterPage(e,t){for(let i of this.ranges)i.pageFrom>=e&&(i.pageFrom+=t);return this}getStartOfRange(e){return this.ranges[e].pageFrom}getEndOfRange(e){let t=this.ranges[e+1];return t?t.pageFrom-1:this.doc.getPageCount()}getRangeIndexAtPage(e){for(let t=0;t(this.doc=await t.lib.loadPdfLibDocument(i),this.pageLabels=Ui.fromDocument(this.doc),{doc:this.doc,pageLabels:this.pageLabels}))(),this.scope.register([],"Enter",()=>this.redisplay())}},Mg=class{constructor(e,t){this.dict=e;this.containerEl=t;this.addNumberingStyleSetting(),this.addStartSetting(),this.addPrefixSetting()}addSetting(){return new ei.Setting(this.containerEl)}addNumberingStyleSetting(){this.addSetting().setName("Numbering Style").addDropdown(e=>{var t;e.addOptions({...Bg,None:"None"}).setValue((t=this.dict.style)!=null?t:"None").onChange(i=>{Og(i)?this.dict.style=i:delete this.dict.style})})}addStartSetting(){this.addSetting().setName("Start counting from").addText(e=>{e.inputEl.type="number",this.dict.start!==void 0?e.setValue(""+this.dict.start):e.setPlaceholder("1"),e.onChange(t=>{let i=Number(t);Number.isInteger(i)?(e.inputEl.removeClass("error"),i>1?this.dict.start=i:delete this.dict.start):(delete this.dict.start,e.inputEl.addClass("error"))})})}addPrefixSetting(){return this.addSetting().setName("Prefix").addText(e=>{var t;e.setValue((t=this.dict.prefix)!=null?t:"").onChange(i=>{i?this.dict.prefix=i:delete this.dict.prefix})})}},Cu=class extends Lg{constructor(){super(...arguments);this.buttonSetting=null}async onOpen(){super.onOpen(),this.titleEl.setText(`${this.plugin.manifest.name}: edit page labels`),new ei.Setting(this.contentEl).then(t=>{ei.MarkdownRenderer.render(this.app,["Each page in a PDF document can be assigned a ***page label***, which can be different from the page index.",'For example, a book might have a preface numbered as "i", "ii", "iii", ... and the main content numbered as "1", "2", "3", ...'].join(" "),t.descEl,"",this.component)}).then(t=>this.contentEl.prepend(t.settingEl)),this.controlEl.createDiv({cls:"page-labels-loading",text:"Loading..."}),await this.docLoadingPromise,this.display(),this.addButtons()}redisplay(){this.display()}display(){let{pageLabels:t,doc:i}=this;if(!i)return;if(this.controlEl.empty(),t===null||t.rangeCount()===0){this.addHeading(this.controlEl,"No page labels found","lucide-info").setDesc("This PDF document does not have any page labels.").addButton(o=>{o.setButtonText("Create").setCta().onClick(()=>{this.pageLabels=Ui.createEmpty(i),this.redisplay(),this.updateButtonVisibility()})}).addButton(o=>{o.setButtonText("Cancel").onClick(()=>this.close())});return}let r=i.getPageCount();for(let o=0;o{h>a.pageFrom&&u.addExtraButton(p=>{p.setIcon("lucide-separator-horizontal").setTooltip("Divide this labeling range").onClick(()=>{t.divideRangeAtPage(a.pageFrom+1,!1),this.redisplay()})})}).addExtraButton(u=>{u.setIcon("lucide-x").setTooltip("Label the pages in this range continuing from the previous range").onClick(()=>{t.removeRange(o),this.redisplay()})}),new ei.Setting(s).setName("From").setDesc("The index of the first page in this range.").then(u=>u.controlEl.appendText("Page")).addText(u=>{u.inputEl.type="number",u.setValue(""+a.pageFrom).onChange(p=>{let f=Number(p);Number.isInteger(f)&&(c?c.pageFrom:1)this.redisplay(),{once:!0})}).then(u=>this.addPreviewButton(u,a.pageFrom)),new ei.Setting(s).setName("To").setDesc("The index of the last page in this range.").then(u=>u.controlEl.appendText("Page")).addText(u=>{u.inputEl.type="number",u.setValue(""+h).onChange(p=>{let f=Number(p);Number.isInteger(f)&&a.pageFrom<=f&&f<=(d?d.pageFrom-1:r-1)?(l.pageFrom=f+1,u.inputEl.removeClass("error")):u.inputEl.addClass("error")}).setDisabled(o===t.ranges.length-1).then(p=>{p.disabled&&(0,Cw.setTooltip)(p.inputEl,"The last range cannot be extended.")}),u.inputEl.addEventListener("blur",()=>this.redisplay(),{once:!0})}).then(u=>this.addPreviewButton(u,h)),new Mg(a.dict,s)}}addHeading(t,i,r){return new ei.Setting(t).setName(i).setHeading().then(o=>{let s=createDiv();o.settingEl.prepend(s),(0,ei.setIcon)(s,r)})}addPreviewButton(t,i){return t.addExtraButton(r=>{r.setIcon("lucide-message-square").setTooltip(`Hover${this.plugin.requireModKeyForLinkHover()?"+"+Bt("Mod").toLowerCase():""} to preview`).then(o=>{this.component.registerDomEvent(o.extraSettingsEl,"mouseover",s=>{this.app.workspace.trigger("hover-link",{event:s,source:"pdf-plus",linktext:this.file.path+`#page=${i}`,targetEl:o.extraSettingsEl,hoverParent:this.component})})})})}addButtons(){var t;return(t=this.buttonSetting)!=null?t:new ei.Setting(this.contentEl).addButton(i=>{i.setButtonText("Save").setCta().onClick(async()=>{this.pageLabels&&this.doc?(this.pageLabels.rangeCount()>0?this.pageLabels.setToDocument(this.doc):Ui.removeFromDocument(this.doc),await this.app.vault.modifyBinary(this.file,await this.doc.save())):new ei.Notice(`${this.plugin.manifest.name}: Something went wrong.`),this.close()})}).addButton(i=>{i.setButtonText("Cancel").onClick(()=>this.close())}).then(i=>{this.buttonSetting=i,this.updateButtonVisibility()})}updateButtonVisibility(){this.buttonSetting&&(this.pageLabels&&this.pageLabels.rangeCount()>0?this.buttonSetting.settingEl.show():this.buttonSetting.settingEl.hide())}};var Si=require("obsidian");var td=class td extends Ke{constructor(...t){super(...t);this.source=null;this.uris=[];this.folderPath=null;this.scope.register([],"Enter",()=>{var i;((i=activeDocument.activeElement)==null?void 0:i.tagName)==="INPUT"&&this.submit()})}onOpen(){super.onOpen();let t=this.plugin.loadLocalStorage(td.LOCAL_STORAGE_KEY);["file","web"].includes(t)&&(this.source=t),this.folderPath=this.lib.dummyFileManager.getFolderPathForDummyFiles(this.app.workspace.getActiveFile()),this.titleEl.setText(`${this.plugin.manifest.name}: Create dummy file for external PDF`),this.modalEl.createDiv("",i=>{new Si.Setting(i).setDesc(createFragment(r=>{let o=this.plugin.settings.modifierToDropExternalPDFToCreateDummy;r.appendText(`You can also use ${o.length?o.map(Bt).join("+")+" +":""} drag & drop to create dummy files. `),r.createEl("a",{text:"Learn more about dummy PDF files",href:"https://ryotaushio.github.io/obsidian-pdf-plus/external-pdf-files"})})),setTimeout(()=>{this.modalEl.insertBefore(i,this.contentEl)})}),this.display()}display(){Si.Platform.isDesktopApp?this.displayDesktop():this.displayMobile()}displayDesktop(){this.contentEl.empty(),this.addSourceLocationSetting(),this.addFolderSetting(),this.source==="file"?this.addLocalFileSetting():this.source==="web"&&this.addWebFileSetting(),this.source&&this.addButtons()}displayMobile(){this.source="web",this.contentEl.empty(),this.addFolderSetting(),this.addWebFileSetting(),this.addButtons()}addSetting(){return new Si.Setting(this.contentEl)}addSourceLocationSetting(){return this.addSetting().setName("Source location").setDesc("Where the external PDF is located.").addDropdown(t=>{var i;t.addOptions({file:"On this computer",web:"Web"}).setValue((i=this.source)!=null?i:"").onChange(r=>{this.source=r,this.display()}),t.selectEl.tabIndex=this.source?-1:0})}addFolderSetting(){return this.addSetting().setName("Folder to save the dummy files").setDesc(createFragment(t=>{t.appendText("You can specify the default folder in the "),t.createEl("a",{text:"settings",href:"obsidian://pdf-plus?setting=dummyFileFolderPath"}),t.appendText(".")})).addText(t=>{var i;t.inputEl.size=30,t.setValue((i=this.folderPath)!=null?i:""),new Rr(this.app,t.inputEl).onSelect(({item:r})=>{this.folderPath=r.path})})}addLocalFileSetting(){this.addSetting().setName("Absolute path to the PDF").setDesc('Type the path in the input box or click the "Browse" button to select the file.').addButton(t=>{t.setButtonText("Browse").setCta().onClick(()=>{var r;let i=(r=window.electron)==null?void 0:r.remote.dialog.showOpenDialogSync({properties:["openFile","multiSelections","dontAddToRecent"],filters:[{name:"PDF files",extensions:["pdf"]}]});i&&i.length>0&&(this.uris=i.map(o=>this.lib.dummyFileManager.absolutePathToFileUri(o)),this.display())})}).addExtraButton(t=>{t.setIcon("plus").setTooltip("Add another file").onClick(()=>{this.uris.push(""),this.display()})}),this.addUriListSetting()}addWebFileSetting(){this.addSetting().setName("URL of the PDF").setDesc('Must start with "https://" or "http://".').addExtraButton(t=>{t.setIcon("plus").setTooltip("Add another URL").onClick(()=>{this.uris.push(""),this.display()})}),this.addUriListSetting()}addUriListSetting(){this.uris.length||this.uris.push("");for(let t=0;ti.settingEl.addClass("no-border")).addText(i=>{i.inputEl.size=30,this.source==="file"?i.setValue(this.uris[t]?this.uris[t].replace(/^file:\/\//,""):"").onChange(r=>{this.uris[t]="file://"+r}):i.setValue(this.uris[t]||"").onChange(r=>{this.uris[t]=r}),t===this.uris.length-1&&setTimeout(()=>i.inputEl.focus())}).addExtraButton(i=>{i.setIcon("trash").setTooltip(`Remove this ${this.source==="file"?"file":"URL"}`).onClick(()=>{this.uris.splice(t,1),this.display()}),this.uris.length===1&&i.extraSettingsEl.hide()})}addButtons(){this.contentEl.createDiv("modal-button-container",t=>{t.createEl("button",{text:"Create",cls:"mod-cta"},i=>{i.addEventListener("click",()=>{this.submit()})}),t.createEl("button",{text:"Cancel"},i=>{i.addEventListener("click",()=>{this.close()})})})}submit(){if(this.uris=this.uris.filter(t=>t),!this.uris.length){new Si.Notice(`${this.plugin.manifest.name}: The external PDF location is not specified.`);return}if(!this.folderPath){new Si.Notice(`${this.plugin.manifest.name}: The folder to save the dummy files is not specified.`);return}this.plugin.saveLocalStorage(td.LOCAL_STORAGE_KEY,this.source),this.createDummyFiles(),this.close()}async createDummyFiles(){if(this.folderPath){this.folderPath=(0,Si.normalizePath)(this.folderPath);let t=await this.lib.dummyFileManager.createDummyFilesInFolder(this.folderPath,this.uris);new Si.Notice(`${this.plugin.manifest.name}: Dummy files created successfully.`);for(let i of t)i&&await this.app.workspace.getLeaf(!0).openFile(i)}else new Si.Notice(`${this.plugin.manifest.name}: Failed to create dummy files for the following URIs: ${this.uris.join(", ")}`)}};td.LOCAL_STORAGE_KEY="last-used-dummy-file-source";var Fa=td;var id=require("obsidian");var Ng="1.6.5",Da=class n extends Ke{static openIfNecessary(e){let t=bu();t&&bg(t,Ng)&&e.app.workspace.onLayoutReady(()=>{new n(e).open()})}onOpen(){super.onOpen();let e=this.plugin.manifest.name;this.setTitle(`${e}: Obsidian installer update is required`),this.contentEl.createEl("p",{text:`Your Obsidian installer (${bu()}) is outdated and is incompatible with the latest ${e}. Please download the latest installer from Obsidian's website and re-install the Obsidian app.`}),(0,id.requireApiVersion)(Ng)||this.contentEl.createEl("p",{text:`Also, in the very near future, Obsidian ${Ng} or later will be required for you to be able to keep receiving updates of ${e}.`}),this.contentEl.createDiv("modal-button-container",t=>{let i="https://obsidian.md/download";new id.ButtonComponent(t).setButtonText("Get installer from obsidian.md").setTooltip(i).setCta().onClick(()=>{window.open(i)});let r="https://help.obsidian.md/Getting+started/Update+Obsidian#Installer%20updates";new id.ButtonComponent(t).setButtonText('What is "installer update"? (help.obsidian.md)').setTooltip(r).onClick(()=>{window.open(r)})})}};var Le=require("obsidian");var Sw=require("obsidian");var Pa=class n{constructor(){this.tree=null;this.dict=null}static fromDocument(e){if(e.catalog.has(v.of("Dests"))){let i=lt(e.catalog,"Dests");if(i instanceof W){let r=new n;return r.dict=i,r}}let t=lt(e.catalog,"Names");if(t instanceof W){let i=lt(t,"Dests");if(i instanceof W){let r=new n;return r.tree=new wa(i),r}}return null}getExplicitDest(e){var i,r;let t=null;if(this.dict){let o=lt(this.dict,e);t=(i=o instanceof Y?this.dict.context.lookup(o):o)!=null?i:null}else if(this.tree){let o=this.tree.get(e);t=(r=o instanceof Y?this.tree._rootDict.context.lookup(o):o)!=null?r:null}if(t instanceof Z)return t;if(t instanceof W){let o=t.get(v.of("D"));if(o instanceof Z)return o}return null}};var Ge=class n{constructor(e,t){this.plugin=e,this.doc=t,this.namedDests=Pa.fromDocument(t)}static async fromDocument(e,t){return new n(t,e)}static async fromFile(e,t){let{lib:i}=t,r=await i.loadPdfLibDocument(e);return new n(t,r)}get lib(){return this.plugin.lib}get root(){let e=lt(this.doc.catalog,"Outlines");return e instanceof W?new Su(this,e):null}set root(e){if(e){let t=this.doc.context.getObjectRef(e.dict);t||(t=this.doc.context.register(e.dict)),this.doc.catalog.set(v.of("Outlines"),t);return}this.doc.catalog.delete(v.of("Outlines"))}ensureRoot(){if(!this.root){let e=this.doc.context.obj({Type:"Outlines"});this.doc.context.register(e),this.root=new Su(this,e)}return this.root}getLeaves(){let e=[],t=i=>{i.firstChild&&t(i.firstChild),i.nextSibling&&t(i.nextSibling),i.firstChild||e.push(i)};return this.root&&t(this.root),e}iter(e){let t=i=>{var r,o;(r=e.enter)==null||r.call(e,i),i.iterChildren(t),(o=e.leave)==null||o.call(e,i)};this.root&&t(this.root)}async iterAsync(e){let t=async i=>{var r,o;await((r=e.enter)==null?void 0:r.call(e,i)),await i.iterChildrenAsync(t),await((o=e.leave)==null?void 0:o.call(e,i))};this.root&&await t(this.root)}async prune(){await this.iterAsync({leave:async e=>{await e.destNotExistInDoc()&&(e.removeAndLiftUpChildren(),e.updateCountForAllAncestors())}})}stringify(){let e="";return this.iter({enter:t=>{t.isRoot()||(e=e+" ".repeat(t.depth-1)+"- "+t.title+` +`)}}),e}async findPDFjsOutlineTreeNode(e){let t=null;return await this.iterAsync({enter:async i=>{if(!(t||i.isRoot())&&e.item.title===i.title){let r=e.item.dest,o=i.getNormalizedDestination();if(typeof r=="string")typeof o=="string"&&r===o&&(t=i);else{let s=await e.getPageNumber();JSON.stringify(this.lib.normalizePDFJsDestArray(r,s))===JSON.stringify(o)&&(t=i)}}}}),t}static async processOutlineRoot(e,t,i){let{app:r}=i,o=await n.fromFile(t,i);e(o.ensureRoot());let s=await o.doc.save();await r.vault.modifyBinary(t,s)}static async findAndProcessOutlineItem(e,t,i,r){let{app:o}=r,s=await n.fromFile(i,r),a=await s.findPDFjsOutlineTreeNode(e);if(!a){new Sw.Notice(`${r.manifest.name}: Failed to process the outline item.`);return}t(a);let c=await s.doc.save();await o.vault.modifyBinary(i,c)}},Su=class n{constructor(e,t){this.outlines=e,this.dict=t}get doc(){return this.outlines.doc}get lib(){return this.outlines.plugin.lib}is(e){return e!==null&&this.dict===e.dict}_get(e){let t=lt(this.dict,e);return t instanceof W?new n(this.outlines,t):null}_setOrDelete(e,t){if(t){let i=this.doc.context.getObjectRef(t.dict);i||(i=this.doc.context.register(t.dict)),this.dict.set(v.of(e),i);return}this.dict.delete(v.of(e))}get firstChild(){return this._get("First")}set firstChild(e){if(e&&!this.is(e.parent))throw new Error(`Item "${e.name}" is not a child of this item "${this.name}"`);this._setOrDelete("First",e)}get lastChild(){return this._get("Last")}set lastChild(e){if(e&&!this.is(e.parent))throw new Error(`Item "${e.name}" is not a child of this item "${this.name}"`);this._setOrDelete("Last",e)}get nextSibling(){return this._get("Next")}set nextSibling(e){if(e&&!(e.parent&&e.parent.is(this.parent)))throw new Error(`Item "${e.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Next",e)}get prevSibling(){return this._get("Prev")}set prevSibling(e){if(e&&!(e.parent&&e.parent.is(this.parent)))throw new Error(`Item "${e.name}" is not a sibling of this item "${this.name}"`);this._setOrDelete("Prev",e)}get parent(){return this._get("Parent")}set parent(e){if(e&&this.isRoot())throw new Error("Cannot set parent of the root of outline");this._setOrDelete("Parent",e)}get count(){let e=lt(this.dict,"Count");return e instanceof G?e.asNumber():null}set count(e){if(e===null){this.dict.delete(v.of("Count"));return}this.dict.set(v.of("Count"),G.of(e))}get title(){if(this.isRoot())throw new Error("Root of outline does not have a title");let e=lt(this.dict,"Title");if(e instanceof J||e instanceof K)return e.decodeText();throw new Error("Title is not a string")}set title(e){if(this.isRoot())throw new Error("Cannot set title of the root of outline");this.dict.set(v.of("Title"),K.fromText(e))}get name(){if(this.isRoot())return"(Root)";let e=this.title;return this.iterAncestors(t=>{t.isRoot()||(e=`${t.title}/${e}`)}),e}get depth(){let e=0;return this.iterAncestors(()=>e++),e}isLeaf(){return!this.firstChild}isRoot(){return this.parent===null}createChild(e,t){let i;if(typeof t=="string")i=K.fromText(t);else{i=Z.withContext(this.doc.context),i.push(this.doc.getPage(t[0]).ref),i.push(v.of(t[1]));for(let s of t.slice(2))i.push(typeof s=="number"?G.of(s):He)}let r=this.doc.context.getObjectRef(this.dict);if(!r)throw new Error("Could not get ref for parent");let o={Title:K.fromText(e),Dest:i,Parent:r};if(this.lastChild){Object.assign(o,{Prev:this.doc.context.getObjectRef(this.lastChild.dict)});let s=new n(this.outlines,this.doc.context.obj(o));this.lastChild.nextSibling=s,this.lastChild=s}else{let s=new n(this.outlines,this.doc.context.obj(o));this.firstChild=s,this.lastChild=s}return this.lastChild}appendChild(e){if(e.isAncestorOf(this,!0))throw new Error("Cannot append an ancestor as a child");e.remove(),e.updateCountForAllAncestors(),e.parent=this,this.lastChild?(this.lastChild.nextSibling=e,e.prevSibling=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e,e.prevSibling=null),e.nextSibling=null,e.updateCountForAllAncestors()}remove(){return this.prevSibling&&(this.prevSibling.nextSibling=this.nextSibling),this.nextSibling&&(this.nextSibling.prevSibling=this.prevSibling),this.parent&&(this.is(this.parent.firstChild)&&(this.parent.firstChild=this.nextSibling),this.is(this.parent.lastChild)&&(this.parent.lastChild=this.prevSibling)),this}removeAndLiftUpChildren(){if(this.remove(),this.firstChild){if(!this.lastChild)throw new Error("Last child is not set despite having children");this.iterChildren(e=>{e.parent=this.parent}),this.prevSibling?(this.prevSibling.nextSibling=this.firstChild,this.firstChild.prevSibling=this.prevSibling):this.parent&&(this.parent.firstChild=this.firstChild,this.firstChild.prevSibling=null),this.nextSibling?(this.nextSibling.prevSibling=this.lastChild,this.lastChild.nextSibling=this.nextSibling):this.parent&&(this.parent.lastChild=this.lastChild,this.lastChild.nextSibling=null)}}iterChildren(e){let t=this.firstChild;for(;t;)e(t),t=t.nextSibling}async iterChildrenAsync(e){let t=this.firstChild;for(;t;)await e(t),t=t.nextSibling}iterAncestors(e,t=!1){t&&e(this);let i=this.parent;for(;i;)e(i),i=i.parent;return this}isAncestorOf(e,t=!1){let i=!1;return e.iterAncestors(r=>{this.is(r)&&(i=!0)},t),i}async sortChildren(){let e=[];await this.iterChildrenAsync(async r=>{let o=r.getExplicitDestination();if(o===null)return 0;let s=o[0],a=o[1]==="XYZ"?o[3]:o[1]==="FitBH"||o[1]==="FitH"?o[2]:void 0;e.push({child:r,page:s,top:a!=null?a:void 0})}),e.sort((r,o)=>{var s,a;return r.page-o.page||((s=r.top)!=null?s:0)-((a=o.top)!=null?a:0)});let t=null,i=e.first();i&&(i.child.prevSibling=null,this.firstChild=i.child);for(let{child:r}of e)t&&(t.nextSibling=r,r.prevSibling=t),t=r;t&&(t.nextSibling=null,this.lastChild=t)}async destNotExistInDoc(){var r,o,s;if(this.isRoot())return!1;let e=this.getDestination(),t=null;if(e instanceof J||e instanceof K){let a=e.decodeText();t=(o=(r=this.outlines.namedDests)==null?void 0:r.getExplicitDest(a))!=null?o:null}else e instanceof Z&&(t=e);if(!t)return!0;let i=t.get(0);if(i instanceof Y){let a=this.doc.context.lookup(i);if(a instanceof et)return!((s=a.Parent())!=null&&s.Kids().asArray().includes(i))}throw new Error("The first element of a destination array must be a refernece of a page leaf node.")}countVisibleDescendants(){let e=0;return this.iterChildren(()=>e++),this.iterChildren(t=>{typeof t.count=="number"&&t.count>0&&(e+=t.countVisibleDescendants())}),e}updateCount(e){let t=this.countVisibleDescendants();if(this.isRoot()&&!e)throw new Error("Cannot close the root outline");this.count=e?t:-t}updateCountForAllAncestors(e=!1){return this.iterAncestors(t=>t.updateCount(t.isRoot()),e)}getDestination(){let e=lt(this.dict,"Dest");if(e)return e;let t=lt(this.dict,"A");if(t instanceof W){let i=lt(t,"S");if(i instanceof v&&i.decodeText()==="GoTo"){let r=lt(t,"D");return r!=null?r:null}}return null}getNormalizedDestination(){let e=this.getDestination();return e instanceof J||e instanceof K?e.decodeText():e instanceof Z?this.lib.normalizePdfLibDestArray(e,this.doc):null}getExplicitDestination(){var t,i;let e=this.getNormalizedDestination();if(typeof e=="string"){let r=(i=(t=this.outlines.namedDests)==null?void 0:t.getExplicitDest(e))!=null?i:null;return r?this.lib.normalizePdfLibDestArray(r,this.doc):null}return e}};var Kr=require("obsidian");function Ew(n,e,t){let i=(r,o)=>{if(o>=e.length)return;t.clickableParentItem&&r.setUseNativeMenu(!1);let s=new Set(r.items);e[o](r);let a=r.items.filter(c=>!s.has(c));if(o!=e.length-1){for(let c of a)if(c instanceof Kr.MenuItem){let l=c.callback,d=c.setSubmenu();if(t.vim){Vg(d);let h=d.scope.keys.find(u=>u.key==="Escape"&&u.modifiers==="");h&&(d.scope.unregister(h),d.scope.register([],"Escape",n.hide.bind(n)))}i(d,o+1),t.clickableParentItem&&c.onClick(l)}}};i(n,0)}function Tw(n){let e=[],t=[],i=n;for(;i&&i.selected>=0;){t.push(i.selected);let r=i.items[i.selected];r instanceof Kr.MenuItem&&e.push(r),i=r instanceof Kr.MenuItem?r.submenu:null}return{items:e,indices:t}}function Rg(n,e){n.openSubmenu=function(t){return this.parentMenu&&this.closeSubmenu(),Kr.Menu.prototype.openSubmenu.call(this,t)},n.openSubmenuSoon=(0,Kr.debounce)(n.openSubmenu.bind(n),e!=null?e:250,!0)}function Vg(n){n.scope.register([],"j",n.onArrowDown.bind(n)),n.scope.register([],"k",n.onArrowUp.bind(n)),n.scope.register([],"h",n.onArrowLeft.bind(n)),n.scope.register([],"l",n.onArrowRight.bind(n))}var ge=require("obsidian");var qg=require("obsidian");var Iw=require("obsidian");var Pt=require("obsidian");var Aw=require("obsidian"),ke=class extends Aw.Component{constructor(e){super(),this.plugin=e}get app(){return this.plugin.app}get lib(){return this.plugin.lib}get settings(){return this.plugin.settings}};var Eu=class Eu extends ke{constructor(e,t){super(e),this.child=t,this.destIdToBibText=new Map,this.destIdToParsedBib=new Map,this.events=new Pt.Events,this.initialized=!1,this.init()}isEnabled(){let e=this.child.pdfViewer;return this.settings.actionOnCitationHover!=="none"&&(Kn(e)||this.settings.enableBibInCanvas&&ma(e)||this.settings.enableBibInHoverPopover&&xa(e)||this.settings.enableBibInEmbed&&es(e))}async init(){this.isEnabled()&&(await this.extractBibText(),await this.parseBibText()),this.initialized=!0}async extractBibText(){return new Promise(e=>{this.lib.onDocumentReady(this.child.pdfViewer,t=>{new Hg(this.plugin,t).onExtracted((i,r)=>{this.destIdToBibText.set(i,r),this.events.trigger("extracted",i,r)}).extract().then(e)})})}async parseBibText(){let e=Array.from(this.destIdToBibText.values()).join(` +`),t=await this.parseBibliographyText(e);if(t){let i=Array.from(this.destIdToBibText.keys());for(let r=0;r{let s=new Pt.HoverPopover(t,r,200);s.hoverEl.addClass("pdf-plus-bib-popover");let a=s.hoverEl.createDiv();s.addChild(new zg(this,e,a))};this.plugin.requireModKeyForLinkHover(Eu.HOVER_LINK_SOURCE_ID)?og(i,r,o):o()}getGoogleScholarSearchUrlFromDest(e){var r;let t="",i=this.destIdToParsedBib.get(e);if(i){let{author:o,title:s,year:a,"container-title":c}=i;s&&(t+=`${s[0]}`),o&&(t+=" "+o.map(l=>l.family).join(" ")),a&&(t+=` ${a}`),c&&(t+=` ${c[0]}`)}else t=(r=this.destIdToBibText.get(e))!=null?r:"";return t?`https://scholar.google.com/scholar?hl=en&as_sdt=0%2C5&q=${encodeURIComponent(t)}`:null}async parseBibliographyText(e){let{app:t,plugin:i,settings:r}=this,o=r.anystylePath;if(!o)return null;let s=i.getAnyStyleInputDir();if(Pt.Platform.isDesktopApp&&t.vault.adapter instanceof Pt.FileSystemAdapter&&s){let a=t.vault.adapter.getFullPath(s);await Pt.FileSystemAdapter.mkdir(a);let c=s+`/${ug()}.txt`,l=t.vault.adapter.getFullPath(c);await t.vault.adapter.write(c,e),this.register(()=>t.vault.adapter.remove(c));let{spawn:d}=require("child_process");return new Promise(h=>{let u=d(o,["parse",l]),p="";u.stdout.on("data",f=>{if(f){p+=f.toString();return}h(null)}),u.on("error",f=>{if("code"in f&&f.code==="ENOENT"){let m=`${i.manifest.name}: AnyStyle not found at the path "${o}".`;if(i.settings.anystylePath){let x=new Pt.Notice(m,8e3);x.noticeEl.appendText(" Click "),x.noticeEl.createEl("a",{text:"here"},g=>{g.addEventListener("click",()=>{i.openSettingTab().scrollTo("anystylePath")})}),x.noticeEl.appendText(" to update the path."),console.error(m)}else console.warn(m);return h(null)}}),u.on("close",f=>{var x;if(f)return h(null);let m=JSON.parse(p);if(Array.isArray(m)){for(let g of m)for(let b of(x=g.date)!=null?x:[]){let w=b.match(/\d{4}/);if(w){g.year=w[0];break}}h(m)}h(null)})})}return null}on(e,t,i){return this.events.on(e,t,i)}};Eu.HOVER_LINK_SOURCE_ID="pdf-plus-citation-link";var pn=Eu,Hg=class{constructor(e,t){this.plugin=e,this.doc=t,this.pageRefToTextContentItemsPromise={}}onExtracted(e){return this.onExtractedCallback=e,this}async extract(){let e=await this.doc.getDestinations(),t=[];for(let i in e)if(this.plugin.lib.isCitationId(i)){let r=e[i];t.push(this.extractBibTextForDest(r).then(o=>{var s;if(o){let a=o.text;(s=this.onExtractedCallback)==null||s.call(this,i,a)}}))}await Promise.all(t)}async getTextContentItemsFromPageRef(e){var i;let t=JSON.stringify(e);return(i=this.pageRefToTextContentItemsPromise[t])!=null?i:this.pageRefToTextContentItemsPromise[t]=(async()=>{let r=await this.doc.getPageIndex(e)+1;return(await(await this.doc.getPage(r)).getTextContent()).items})()}async extractBibTextForDest(e){let t=e[0],i=await this.getTextContentItemsFromPageRef(t),r=-1;if(e[1].name==="XYZ"){let d=e[2],h=e[3];if(d===null||h===null)return null;r=i.findIndex(u=>{if(!u.str)return!1;let p=u.transform[4],f=u.transform[5]+(u.height||u.transform[0])*.8;return d<=p&&f<=h})}else if(e[1].name==="FitBH"){let d=e[2];if(d===null)return null;r=i.findIndex(h=>h.str?h.transform[5]+(h.height||h.transform[0])*.8<=d:!1)}if(r===-1)return null;let o=i[r],s=o.transform[4],a=i[r].str,c=r+1,l=[o];for(;;){let d=i[c];if(!d||d.transform[4]<=s+Math.max(d.height,8)*.1)break;d.str.trimStart().startsWith(".")||d.str.trimStart().startsWith(",")?a=a.trimEnd()+d.str.trimStart():a+=` +`+d.str,l.push(d),c++}return a=a.trimStart().replace(/^\[\d+\]/,""),a=a.trimStart().replace(/^\(\d+\)/,""),a=a.trimStart().replace(/^\d+\./,""),{text:Yc(a),items:l}}},zg=class extends ke{constructor(e,t,i){super(e.plugin),this.bib=e,this.destId=t,this.containerEl=i,this.containerEl.addClass("pdf-plus-bib")}get child(){return this.bib.child}renderParsedBib(e){let{author:t,title:i,year:r,"container-title":o}=e;return t?(this.containerEl.createDiv("",s=>{s.createDiv("bib-title",a=>{var c;a.setText((c=i==null?void 0:i[0])!=null?c:"No title")}),s.createDiv("bib-author-year",a=>{let c=t.map(l=>{let d="";return l.given&&(d+=l.given),l.family&&(d+=" "+l.family),d}).filter(l=>l).join(", ");a.appendText(c),r&&a.appendText(` (${r})`)}),o&&s.createDiv("bib-container-title",a=>{a.setText(o[0])})}),!0):!1}async onload(){await this.render()}async render(){this.containerEl.empty();let e=!1,t=this.bib.destIdToParsedBib.get(this.destId);if(t&&(e=this.renderParsedBib(t)),!e){let i=this.bib.destIdToBibText.get(this.destId);i?(this.containerEl.createDiv({text:i}),Pt.Platform.isDesktopApp&&this.settings.anystylePath&&this.registerRenderOn("parsed")):this.bib.initialized?this.containerEl.createDiv({text:"No bibliography found"}):(this.containerEl.createDiv({text:"Loading..."}),this.registerRenderOn("extracted"))}this.containerEl.createDiv("button-container",i=>{new Pt.ButtonComponent(i).setButtonText("Google Scholar").onClick(()=>{let r=this.bib.getGoogleScholarSearchUrlFromDest(this.destId);if(!r){new Pt.Notice(`${this.plugin.manifest.name}: ${this.bib.initialized?"No bibliography found":"Still loading the bibliography information. Please try again later."}`);return}window.open(r)}),new Pt.ExtraButtonComponent(i).setIcon("lucide-settings").setTooltip("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("citation")})})}registerRenderOn(e){let t=this.bib.on(e,i=>{i===this.destId&&(this.render(),this.bib.events.offref(t))});this.registerEvent(t)}onunload(){this.containerEl.empty()}};var Tu=class{get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e,e&&(e.hoverEl.addClass("pdf-plus-pdf-link-like-popover"),this.onHoverPopoverSet(e))}onHoverPopoverSet(e){}constructor(e,t,i){this.plugin=e,this.app=e.app,this.lib=e.lib,this.child=t,this.targetEl=i,this.useModifierKey()&&this.registerClickToOpenInNewLeaf(),this.shouldShowHoverPopover()&&this.registerHover(),this.shouldRecordHistory()&&this.registerClickToRecordHistory()}get hoverLinkSourceId(){return this.constructor.HOVER_LINK_SOURCE_ID}get file(){return this.child.file}get sourcePath(){var e,t;return(t=(e=this.file)==null?void 0:e.path)!=null?t:""}registerClickToOpenInNewLeaf(){let{app:e,plugin:t,targetEl:i}=this;t.registerDomEvent(i,"click",async r=>{if(r.defaultPrevented)return;let o=Iw.Keymap.isModEvent(r);if(!o)return;r.preventDefault(),r.stopPropagation();let s=await this.getLinkText(r);s!==null&&e.workspace.openLinkText(s,this.sourcePath,o)},{capture:!0})}async customHover(e){return!1}registerHover(){let{app:e,plugin:t,targetEl:i}=this;t.registerDomEvent(i,"mouseover",async r=>{if(await this.customHover(r))return;let o=null;try{o=await this.getLinkText(r)}catch(s){if(s.name==="UnknownErrorException")return console.warn(`${this.plugin.manifest.name}: The destination was not found in this document.`);throw s}o!==null&&e.workspace.trigger("hover-link",{event:r,source:this.hoverLinkSourceId,hoverParent:this,targetEl:i,linktext:o,sourcePath:this.sourcePath})})}registerClickToRecordHistory(){let{plugin:e,targetEl:t}=this;e.registerDomEvent(t,"click",i=>{this.recordLeafHistory()},{capture:!0})}recordLeafHistory(){this.lib.workspace.iteratePDFViews(e=>{if(e.containerEl.contains(this.targetEl)){let t=e.leaf;t.recordHistory(t.getHistoryState())}})}},Au=class extends Tu{async getLinkText(e){var c,l,d;let{lib:t,child:i,targetEl:r}=this;if(!Ci(e,r))return null;let o=(c=i.pdfViewer.pdfViewer)==null?void 0:c.pdfDocument;if(!o)return null;let s=this.getDest(),a=null;return typeof s=="string"?a=await t.destIdToSubpath(s,o):a=await t.pdfJsDestArrayToSubpath(s,o),a===null?null:((d=(l=this.file)==null?void 0:l.path)!=null?d:"")+a}onHoverPopoverSet(e){let t=e.hoverEl,i=this.getDest();typeof i=="string"&&(t.dataset.dest=i)}},nd=class nd extends Au{constructor(e,t,i){super(e,t,i.container),this.linkAnnotationElement=i}static registerEvents(e,t,i){return i.data.subtype==="Link"?new nd(e,t,i):null}async getLinkText(e){var t,i;if(this.plugin.settings.actionOnCitationHover==="google-scholar-popover"&&this.lib.requirePluginNewerThan("surfing","0.9.5")){let r=this.getDest();if(this.lib.isCitationId(r)&&((t=this.child.pdfViewer.pdfViewer)==null?void 0:t.pdfDocument)){let s=(i=this.child.bib)==null?void 0:i.getGoogleScholarSearchUrlFromDest(r);if(s)return s}}return super.getLinkText(e)}getDest(){return this.linkAnnotationElement.data.dest}useModifierKey(){return this.plugin.settings.clickPDFInternalLinkWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.enableHoverPDFInternalLink}isCitationLink(){let e=this.getDest();return this.lib.isCitationId(e)}get hoverLinkSourceId(){return this.isCitationLink()?pn.HOVER_LINK_SOURCE_ID:nd.HOVER_LINK_SOURCE_ID}shouldRecordHistory(){return this.plugin.settings.recordPDFInternalLinkHistory&&!this.child.opts.isEmbed}async customHover(e){if(this.plugin.settings.actionOnCitationHover==="pdf-plus-bib-popover"&&this.child.bib&&this.child.bib.isEnabled()){let t=this.getDest();if(this.lib.isCitationId(t))return this.child.bib.spawnBibPopoverOnModKeyDown(t,this,e,this.targetEl),!0}return!1}onHoverPopoverSet(e){super.onHoverPopoverSet(e),e.hoverEl.addClass("pdf-plus-pdf-internal-link-popover")}};nd.HOVER_LINK_SOURCE_ID="pdf-plus-internal-link";var Xn=nd,Iu=class Iu extends Au{constructor(e,t,i){super(e,t,i.selfEl),this.item=i}static registerEvents(e,t,i){return new Iu(e,t,i)}getDest(){return this.item.item.dest}useModifierKey(){return this.plugin.settings.clickOutlineItemWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.popoverPreviewOnOutlineHover}shouldRecordHistory(){return this.plugin.settings.recordHistoryOnOutlineClick&&!this.child.opts.isEmbed}onHoverPopoverSet(e){super.onHoverPopoverSet(e),e.hoverEl.addClass("pdf-plus-outline-item-popover")}};Iu.HOVER_LINK_SOURCE_ID="pdf-plus-outline";var Zn=Iu,Bu=class Bu extends Tu{static registerEvents(e,t){return new Bu(e,t,t.pdfViewer.pdfThumbnailViewer.container)}async getLinkText(e){var r,o;let t=It(e,e.target)&&e.target.closest('.pdf-thumbnail-view > a[href^="#page="]');if(!t)return null;let i=t.getAttribute("href");return((o=(r=this.file)==null?void 0:r.path)!=null?o:"")+i}useModifierKey(){return this.plugin.settings.clickThumbnailWithModifierKey}shouldShowHoverPopover(){return this.plugin.settings.popoverPreviewOnThumbnailHover}shouldRecordHistory(){return this.plugin.settings.recordHistoryOnThumbnailClick&&!this.child.opts.isEmbed}onHoverPopoverSet(e){super.onHoverPopoverSet(e),e.hoverEl.addClass("pdf-plus-thumbnail-item-popover")}};Bu.HOVER_LINK_SOURCE_ID="pdf-plus-thumbnail";var Yn=Bu;var rd=class rd extends ke{constructor(e,t,i){super(e),this.child=t,this.annot=i}get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e}get hoverLinkSourceId(){return rd.HOVER_LINK_SOURCE_ID}onload(){this.settings.popoverPreviewOnExternalLinkHover&&this.app.plugins.enabledPlugins.has("surfing")&&this.registerDomEvent(this.annot.container,"mouseover",e=>{let t=this.annot.data.url;t&&(t.startsWith("http://")||t.startsWith("https://"))&&this.app.workspace.trigger("hover-link",{event:e,source:this.hoverLinkSourceId,hoverParent:this,targetEl:this.annot.container,linktext:t})})}static registerEvents(e,t,i){var r;return i.data.subtype==="Link"&&i.data.url?(r=t.component)==null?void 0:r.addChild(new rd(e,t,i)):null}};rd.HOVER_LINK_SOURCE_ID="pdf-plus-external-link";var Gr=rd;var aC={highlight:"Highlight",underline:"Underline"},lC={open:"Open backlink",preview:"Popover preview of backlink"},Ou={"":"Current tab",tab:"New tab",right:"Split right",left:"Split left",down:"Split down",up:"Split up",window:"New window","right-sidebar":"Right sidebar","left-sidebar":"Left sidebar"},Bw={"last-paste":"Last pasted .md","last-active":"Last active .md","last-active-and-open":"Last active & open .md","last-paste-then-last-active":"Last pasted .md if any, otherwise last active .md","last-paste-then-last-active-and-open":"Last pasted .md if any, otherwise last active & open .md","last-active-and-open-then-last-paste":"Last active & open .md if any, otherwise last pasted .md"},cC={root:"Vault folder",current:"Same folder as current file",folder:"In the folder specified below"},Ow={root:"Vault folder",current:"Same folder as current file",folder:"In the folder specified below",subfolder:"In subfolder under current folder",obsidian:"Same as Obsidian's attachment location"},dC=["png","jpg","webp","bmp"],Mw="green",Ug={none:"Same as other internal links","pdf-plus-bib-popover":"PDF++'s custom bibliography popover","google-scholar-popover":"Google Scholar popover"},hC={text:"Copy text",obsidian:"Obsidian default (copy as quote)","pdf-plus":"Run PDF++'s copy command"},Jn={displayTextFormats:[{name:"Title & page",template:"{{file.basename}}, p.{{pageLabel}}"},{name:"Page",template:"p.{{pageLabel}}"},{name:"Text",template:"{{text}}"},{name:"Emoji",template:"\u{1F4D6}"},{name:"None",template:""}],defaultDisplayTextFormatIndex:0,syncDisplayTextFormat:!0,syncDefaultDisplayTextFormat:!1,copyCommands:[{name:"Quote",template:`> ({{linkWithDisplay}}) +> {{text}} +`},{name:"Link",template:"{{linkWithDisplay}}"},{name:"Embed",template:"!{{link}}"},{name:"Callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}} +> {{text}} +`},{name:"Quote in callout",template:`> [!{{calloutType}}|{{color}}] {{linkWithDisplay}} +> > {{text}} +> +> `}],useAnotherCopyTemplateWhenNoSelection:!1,copyTemplateWhenNoSelection:"{{linkToPageWithDisplay}}",trimSelectionEmbed:!1,embedMargin:50,noSidebarInEmbed:!0,noSpreadModeInEmbed:!0,embedUnscrollable:!1,singleTabForSinglePDF:!0,highlightExistingTab:!1,existingTabHighlightOpacity:.5,existingTabHighlightDuration:.75,paneTypeForFirstPDFLeaf:"left",openLinkNextToExistingPDFTab:!0,openPDFWithDefaultApp:!1,openPDFWithDefaultAppAndObsidian:!0,focusObsidianAfterOpenPDFWithDefaultApp:!0,syncWithDefaultApp:!1,dontActivateAfterOpenPDF:!0,dontActivateAfterOpenMD:!0,highlightDuration:.75,noTextHighlightsInEmbed:!1,noAnnotationHighlightsInEmbed:!0,persistentTextHighlightsInEmbed:!0,persistentAnnotationHighlightsInEmbed:!1,highlightBacklinks:!0,selectionBacklinkVisualizeStyle:"highlight",dblclickEmbedToOpenLink:!0,highlightBacklinksPane:!0,highlightOnHoverBacklinkPane:!0,backlinkHoverColor:"",colors:{Yellow:"#ffd000",Red:"#ea5252",Note:"#086ddd",Important:"#bb61e5"},defaultColor:"",defaultColorPaletteItemIndex:0,syncColorPaletteItem:!0,syncDefaultColorPaletteItem:!1,colorPaletteInToolbar:!0,noColorButtonInColorPalette:!0,colorPaletteInEmbedToolbar:!1,quietColorPaletteTooltip:!1,showStatusInToolbar:!0,highlightColorSpecifiedOnly:!1,doubleClickHighlightToOpenBacklink:!0,hoverHighlightAction:"preview",paneTypeForFirstMDLeaf:"right",singleMDLeafInSidebar:!0,alwaysUseSidebar:!0,ignoreExistingMarkdownTabIn:[],defaultColorPaletteActionIndex:4,syncColorPaletteAction:!0,syncDefaultColorPaletteAction:!1,proxyMDProperty:"PDF",hoverPDFLinkToOpen:!1,ignoreHeightParamInPopoverPreview:!0,filterBacklinksByPageDefault:!0,showBacklinkToPage:!0,enableHoverPDFInternalLink:!0,recordPDFInternalLinkHistory:!0,alwaysRecordHistory:!0,renderMarkdownInStickyNote:!1,enablePDFEdit:!1,author:"",writeHighlightToFileOpacity:.2,defaultWriteFileToggle:!1,syncWriteFileToggle:!0,syncDefaultWriteFileToggle:!1,enableAnnotationDeletion:!0,warnEveryAnnotationDelete:!1,warnBacklinkedAnnotationDelete:!0,enableAnnotationContentEdit:!0,enableEditEncryptedPDF:!1,pdfLinkColor:"#04a802",pdfLinkBorder:!1,replaceContextMenu:!0,showContextMenuOnMouseUpIf:"Mod",contextMenuConfig:[{id:"action",visible:!0},{id:"selection",visible:!0},{id:"write-file",visible:!0},{id:"annotation",visible:!0},{id:"modify-annotation",visible:!0},{id:"link",visible:!0},{id:"text",visible:!0},{id:"search",visible:!0},{id:"speech",visible:!0},{id:"page",visible:!0},{id:"settings",visible:!0}],selectionProductMenuConfig:["color","copy-format","display"],writeFileProductMenuConfig:["color","copy-format","display"],annotationProductMenuConfig:["copy-format","display"],updateColorPaletteStateFromContextMenu:!0,mobileCopyAction:"pdf-plus",showContextMenuOnTablet:!1,executeBuiltinCommandForOutline:!0,executeBuiltinCommandForZoom:!0,executeFontSizeAdjusterCommand:!0,closeSidebarWithShowCommandIfExist:!0,autoHidePDFSidebar:!1,defaultSidebarView:1,outlineDrag:!0,outlineContextMenu:!0,outlineLinkDisplayTextFormat:"{{file.basename}}, {{text}}",outlineLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnOutlineClick:!0,popoverPreviewOnOutlineHover:!0,thumbnailDrag:!0,thumbnailContextMenu:!0,thumbnailLinkDisplayTextFormat:"{{file.basename}}, p.{{pageLabel}}",thumbnailLinkCopyFormat:"{{linkWithDisplay}}",recordHistoryOnThumbnailClick:!0,popoverPreviewOnThumbnailHover:!0,annotationPopupDrag:!0,showAnnotationPopupOnHover:!0,useCallout:!0,calloutType:"PDF",calloutIcon:"highlighter",highlightBacklinksInEmbed:!1,highlightBacklinksInHoverPopover:!1,highlightBacklinksInCanvas:!0,clickPDFInternalLinkWithModifierKey:!0,clickOutlineItemWithModifierKey:!0,clickThumbnailWithModifierKey:!0,focusEditorAfterAutoPaste:!0,clearSelectionAfterAutoPaste:!0,respectCursorPositionWhenAutoPaste:!0,blankLineAboveAppendedContent:!0,autoCopy:!1,autoFocus:!1,autoPaste:!1,autoFocusTarget:"last-active-and-open-then-last-paste",autoPasteTarget:"last-active-and-open-then-last-paste",openAutoFocusTargetIfNotOpened:!0,howToOpenAutoFocusTargetIfNotOpened:"right",closeHoverEditorWhenLostFocus:!0,closeSidebarWhenLostFocus:!1,openAutoFocusTargetInEditingView:!0,executeCommandWhenTargetNotIdentified:!0,commandToExecuteWhenTargetNotIdentified:"switcher:open",autoPasteTargetDialogTimeoutSec:20,autoCopyToggleRibbonIcon:!0,autoCopyIconName:"highlighter",autoFocusToggleRibbonIcon:!0,autoFocusIconName:"zap",autoPasteToggleRibbonIcon:!0,autoPasteIconName:"clipboard-paste",viewSyncFollowPageNumber:!0,viewSyncPageDebounceInterval:.3,openAfterExtractPages:!0,howToOpenExtractedPDF:"tab",warnEveryPageDelete:!1,warnBacklinkedPageDelete:!0,extractPageInPlace:!1,askExtractPageInPlace:!0,pageLabelUpdateWhenInsertPage:"keep",pageLabelUpdateWhenDeletePage:"keep",pageLabelUpdateWhenExtractPage:"keep",askPageLabelUpdateWhenInsertPage:!0,askPageLabelUpdateWhenDeletePage:!0,askPageLabelUpdateWhenExtractPage:!0,copyOutlineAsListFormat:"{{linkWithDisplay}}",copyOutlineAsListDisplayTextFormat:"{{text}}",copyOutlineAsHeadingsFormat:`{{text}} + +{{linkWithDisplay}}`,copyOutlineAsHeadingsDisplayTextFormat:"p.{{pageLabel}}",copyOutlineAsHeadingsMinLevel:2,newFileNameFormat:"",newFileTemplatePath:"",newPDFLocation:"current",newPDFFolderPath:"",rectEmbedStaticImage:!1,rectImageFormat:"file",rectImageExtension:"webp",zoomToFitRect:!1,rectFollowAdaptToTheme:!0,rectEmbedResolution:100,includeColorWhenCopyingRectLink:!0,backlinkIconSize:50,showBacklinkIconForSelection:!1,showBacklinkIconForAnnotation:!1,showBacklinkIconForOffset:!0,showBacklinkIconForRect:!1,showBoundingRectForBacklinkedAnnot:!1,hideReplyAnnotation:!1,hideStampAnnotation:!1,searchLinkHighlightAll:"true",searchLinkCaseSensitive:"true",searchLinkMatchDiacritics:"default",searchLinkEntireWord:"false",dontFitWidthWhenOpenPDFLink:!0,preserveCurrentLeftOffsetWhenOpenPDFLink:!1,defaultZoomValue:"page-width",scrollModeOnLoad:0,spreadModeOnLoad:0,usePageUpAndPageDown:!0,hoverableDropdownMenuInToolbar:!0,zoomLevelInputBoxInToolbar:!0,popoverPreviewOnExternalLinkHover:!0,actionOnCitationHover:"pdf-plus-bib-popover",anystylePath:"",enableBibInEmbed:!1,enableBibInHoverPopover:!1,enableBibInCanvas:!0,citationIdPatterns:`^cite. +^bib\\d+$`,copyAsSingleLine:!0,removeWhitespaceBetweenCJChars:!0,dummyFileFolderPath:"",externalURIPatterns:[".*\\.pdf$","https://arxiv.org/pdf/.*"],modifierToDropExternalPDFToCreateDummy:["Shift"],vim:!1,vimrcPath:"",vimVisualMotion:!0,vimScrollSize:40,vimLargerScrollSizeWhenZoomIn:!0,vimContinuousScrollSpeed:1.2,vimSmoothScroll:!0,vimHlsearch:!0,vimIncsearch:!0,enableVimInContextMenu:!0,enableVimOutlineMode:!0,vimSmoothOutlineMode:!0,vimHintChars:"hjklasdfgyuiopqwertnmzxcvb",vimHintArgs:"all",PATH:"",autoCheckForUpdates:!0,fixObsidianTextSelectionBug:!0};function uC(n){return Jn.hasOwnProperty(n)}var _n=Bt("Mod").toLowerCase(),Lu=class extends ge.PluginSettingTab{constructor(t){super(t.app,t);this.plugin=t;this.events=new ge.Events;this.component=new ge.Component,this.items={},this.headings=new Map,this.iconHeadings=new Map,this.headerEls=new Map,this.promises=[],this.containerEl.addClass("pdf-plus-settings"),this.headerContainerEl=this.containerEl.createDiv("header-container"),this.contentEl=this.containerEl.createDiv("content")}addSetting(t){let i=new ge.Setting(this.contentEl);return t&&(this.items[t]=i,this.component.registerDomEvent(i.settingEl,"contextmenu",r=>{r.preventDefault(),new qg.Menu().addItem(o=>{o.setTitle("Restore default value of this setting").setIcon("lucide-undo-2").onClick(async()=>{this.plugin.settings[t]=this.plugin.getDefaultSettings()[t],await this.plugin.saveSettings(),this.redisplay(),new ge.Notice(`${this.plugin.manifest.name}: Default setting restored. Note that some options require a restart to take effect.`,6e3)})}).addItem(o=>{o.setTitle("Copy link to this setting").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=${t}`)})}).showAtMouseEvent(r)})),i}addHeading(t,i,r,o){let s=this.addSetting().setName(t).setHeading().then(a=>{if(r){let c=a.settingEl.parentElement;c&&c.insertBefore(createDiv("spacer"),a.settingEl);let l=createDiv();a.settingEl.prepend(l),(0,ge.setIcon)(l,r),a.settingEl.addClass("pdf-plus-setting-heading")}});return this.headings.set(i,s),this.component.registerDomEvent(s.settingEl,"contextmenu",a=>{a.preventDefault(),new qg.Menu().addItem(c=>{c.setTitle("Copy link to this heading").setIcon("lucide-link").onClick(()=>{navigator.clipboard.writeText(`obsidian://pdf-plus?setting=heading:${i}`)})}).showAtMouseEvent(a)}),r&&this.headerContainerEl.createDiv("clickable-icon header",a=>{let c=a.createDiv();(0,ge.setIcon)(c,r);let l=a.createDiv("header-title");l.setText(t),(0,ge.setTooltip)(a,t),this.component.registerDomEvent(a,"click",d=>{var h;((h=s.settingEl.previousElementSibling)!=null?h:s.settingEl).scrollIntoView({behavior:"smooth"}),this.updateHeaderElClassOnScroll(d)}),o==null||o({headerEl:a,iconEl:c,titleEl:l}),this.iconHeadings.set(i,s),this.headerEls.set(i,a)}),s}updateHeaderElClass(){var r,o,s;let t=this.containerEl.getBoundingClientRect().height,i=Array.from(this.iconHeadings.entries());for(let a=0;a=t*.2+this.headerContainerEl.clientHeight,h=i[a][0];(s=this.headerEls.get(h))==null||s.toggleClass("is-active",d)}}updateHeaderElClassOnScroll(t){var o;let i=(o=t==null?void 0:t.win)!=null?o:activeWindow,r=i.setInterval(()=>this.updateHeaderElClass(),50);i.setTimeout(()=>i.clearInterval(r),1500)}scrollTo(t,i){let r=this.items[t];r&&this.scrollToSetting(r,i)}scrollToHeading(t,i){let r=this.headings.get(t);r&&this.scrollToSetting(r,i)}scrollToSetting(t,i){let r=t.settingEl;r&&this.containerEl.scrollTo({top:r.offsetTop-this.headerContainerEl.offsetHeight,...i})}openFromObsidianUrl(t){let i=t.setting;i.startsWith("heading:")?this.plugin.openSettingTab().scrollToHeading(i.slice(8)):uC(i)&&this.plugin.openSettingTab().scrollTo(i)}getVisibilityToggler(t,i){let r=()=>{i()?t.settingEl.show():t.settingEl.hide()};return r(),r}showConditionally(t,i){let r=Array.isArray(t)?t:[t],o=r.map(s=>this.getVisibilityToggler(s,i));return this.events.on("update",()=>o.forEach(s=>s())),r}addTextSetting(t,i,r){let o=this.addSetting(t).addText(s=>{s.setValue(this.plugin.settings[t]).setPlaceholder(i!=null?i:"").then(a=>{i&&(a.inputEl.size=Math.max(a.inputEl.size,a.inputEl.placeholder.length))}).onChange(async a=>{this.plugin.settings[t]=a,await this.plugin.saveSettings()}),r&&(this.component.registerDomEvent(s.inputEl,"blur",()=>{r(o)}),this.component.registerDomEvent(s.inputEl,"keypress",a=>{a.key==="Enter"&&r(o)}))});return o}addTextAreaSetting(t,i,r){return this.addSetting(t).addTextArea(o=>{o.setValue(this.plugin.settings[t]).setPlaceholder(i!=null?i:"").onChange(async s=>{this.plugin.settings[t]=s,await this.plugin.saveSettings()}),r&&this.component.registerDomEvent(o.inputEl,"blur",r)})}addNumberSetting(t){return this.addSetting(t).addText(i=>{i.setValue(""+this.plugin.settings[t]).setPlaceholder(""+Jn[t]).then(r=>r.inputEl.type="number").onChange(async r=>{this.plugin.settings[t]=r===""?Jn[t]:+r,await this.plugin.saveSettings()})})}addToggleSetting(t,i){return this.addSetting(t).addToggle(r=>{r.setValue(this.plugin.settings[t]).onChange(async o=>{this.plugin.settings[t]=o,await this.plugin.saveSettings(),i==null||i(o)})})}addColorPickerSetting(t,i){return this.addSetting(t).addColorPicker(r=>{r.setValue(this.plugin.settings[t]).onChange(async o=>{this.plugin.settings[t]=o,await this.plugin.saveSettings(),i==null||i(o)})})}addDropdownSetting(t,...i){let r=[],o=a=>a,s=a=>{};return Array.isArray(i[0])?(r=i[0],typeof i[1]=="function"&&(o=i[1]),typeof i[2]=="function"&&(s=i[2])):(r=Object.keys(i[0]),o=a=>i[0][a],typeof i[1]=="function"&&(s=i[1])),this.addSetting(t).addDropdown(a=>{var c;for(let l of r){let d=(c=o(l))!=null?c:l;a.addOption(l,d)}a.setValue(this.plugin.settings[t]).onChange(async l=>{this.plugin.settings[t]=l,await this.plugin.saveSettings(),s==null||s(l)})})}addIndexDropdownSetting(t,i,r,o){return this.addSetting(t).addDropdown(s=>{var l;for(let d of i){let h=(l=r==null?void 0:r(d))!=null?l:d;s.addOption(d,h)}let a=this.plugin.settings[t],c=i[a];s.setValue(c).onChange(async d=>{let h=i.indexOf(d);h!==-1&&(this.plugin.settings[t]=h,await this.plugin.saveSettings(),o==null||o(h))})})}addEnumDropdownSetting(t,i,r){return this.addSetting(t).addDropdown(o=>{for(let[s,a]of Object.entries(i))parseInt(s).toString()===s&&o.addOption(s,a);o.setValue(""+this.plugin.settings[t]).onChange(async s=>{this.plugin.settings[t]=+s,await this.plugin.saveSettings(),r==null||r(+s)})})}addSliderSetting(t,i,r,o){return this.addSetting(t).addSlider(s=>{s.setLimits(i,r,o).setValue(this.plugin.settings[t]).setDynamicTooltip().onChange(async a=>{this.plugin.settings[t]=a,await this.plugin.saveSettings()})})}addDesc(t){return this.addSetting().setDesc(t)}addFileLocationSetting(t,i,r,o){return[this.addDropdownSetting(t,cC,()=>this.redisplay()).then(i),this.addSetting().addText(s=>{s.setValue(this.plugin.settings[r]),s.inputEl.size=30,new Rr(this.app,s.inputEl).onSelect(({item:a})=>{this.plugin.settings[r]=a.path,this.plugin.saveSettings()})}).then(s=>{o(s),this.plugin.settings[t]!=="folder"&&s.settingEl.hide()})]}addAttachmentLocationSetting(t,i,r){let o,s,a,c=()=>{let f=o.getValue();u.settingEl.toggle(f==="folder"),p.settingEl.toggle(f==="subfolder")},l=()=>{let f=o.getValue();return f==="root"?"/":f==="folder"?s.getValue()||i:f==="current"?"./":f==="subfolder"?"./"+(a.getValue()||i):""},d=f=>{if(f===""){o.setValue("obsidian");return}if(f==="/"){o.setValue("root");return}if(f!=="."&&f!=="./"){if(f.startsWith("./")){let m=f.slice(2);o.setValue("subfolder"),a.setValue(m!==i?m:"");return}o.setValue("folder"),s.setValue(f!==i?f:"");return}o.setValue("current")},h=this.addSetting(t).addDropdown(f=>{f.onChange(async()=>{c(),this.plugin.settings[t]=l(),await this.plugin.saveSettings()}),f.addOptions(Ow),o=f}),u=this.addSetting().addText(f=>{f.setPlaceholder(i).onChange(async()=>{this.plugin.settings[t]=l(),await this.plugin.saveSettings()}),new Rr(this.app,f.inputEl).onSelect(()=>{setTimeout(async()=>{this.plugin.settings[t]=l(),await this.plugin.saveSettings()})}),s=f}),p=this.addSetting().addText(f=>{f.setPlaceholder(i).onChange(async()=>{this.plugin.settings[t]=l(),await this.plugin.saveSettings()}),a=f});r(h,u,p),d(this.plugin.settings[t]),c()}addFundingButton(){let t=i=>{let r=i.firstElementChild;(r==null?void 0:r.tagName)==="svg"&&(r.setAttribute("fill","var(--color-red)"),r.setAttribute("stroke","var(--color-red)"))};return this.addHeading("Support development","funding","lucide-heart",({iconEl:i})=>t(i)).setDesc(`If you find PDF++ helpful, please consider supporting the development to help me keep this plugin alive. + +If you prefer PayPal, please make donations via Ko-fi. Thank you!`).then(i=>{let r=i.infoEl,o=i.settingEl.firstElementChild;if(!o)return;let s=i.settingEl.createDiv();s.appendChild(o),s.appendChild(r),i.settingEl.prepend(s),i.settingEl.id="pdf-plus-funding",s.id="pdf-plus-funding-icon-info-container",o.id="pdf-plus-funding-icon",t(o)}).addButton(i=>{i.setButtonText("GitHub Sponsors").onClick(()=>{open("https://github.com/sponsors/RyotaUshio")})}).addButton(i=>{i.setButtonText("Buy Me a Coffee").onClick(()=>{open("https://www.buymeacoffee.com/ryotaushio")})}).addButton(i=>{i.setButtonText("Ko-fi").onClick(()=>{open("https://ko-fi.com/ryotaushio")})})}async renderMarkdown(t,i){this.promises.push(this._renderMarkdown(t,i)),i.addClass("markdown-rendered")}async _renderMarkdown(t,i){await ge.MarkdownRenderer.render(this.app,Array.isArray(t)?t.join(` +`):t,i,"",this.component),i.childNodes.length===1&&i.firstChild instanceof HTMLParagraphElement&&i.replaceChildren(...i.firstChild.childNodes)}addColorSetting(t){let i=this.plugin.settings.colors,[r,o]=Object.entries(i)[t],s=o;return this.addSetting().addText(a=>{a.setPlaceholder("Color name (case-insensitive)").then(c=>{c.inputEl.size=c.inputEl.placeholder.length,(0,ge.setTooltip)(c.inputEl,"Color name (case-insensitive)")}).setValue(r).onChange(async c=>{if(c in i){new ge.Notice("This color name is already used."),a.inputEl.addClass("error");return}a.inputEl.removeClass("error"),delete i[r];for(let l of["defaultColor","backlinkHoverColor"]){let d=this.items[l];if(d){let h=d.components[0].selectEl.querySelector(`:scope > option:nth-child(${t+2})`);h&&(h.value=c,h.textContent=c)}}this.plugin.settings.defaultColor===r&&(this.plugin.settings.defaultColor=c),r=c,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addColorPicker(a=>{a.setValue(o),a.onChange(async c=>{s=o,o=c,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle()})}).addExtraButton(a=>{a.setIcon("rotate-ccw").setTooltip("Return to previous color").onClick(async()=>{o=s,i[r]=o,await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})}).addExtraButton(a=>{a.setIcon("trash").setTooltip("Delete").onClick(async()=>{this.plugin.settings.defaultColor===r&&(this.plugin.settings.defaultColor=""),delete i[r],await this.plugin.saveSettings(),this.plugin.loadStyle(),this.redisplay()})})}addNameValuePairListSetting(t,i,r,o,s){let{getName:a,setName:c,getValue:l,setValue:d}=o,h=t[i],u=a(h),p=l(h);return this.addSetting().addText(f=>{f.setPlaceholder(s.name.placeholder).then(m=>{m.inputEl.size=s.name.formSize,(0,ge.setTooltip)(m.inputEl,s.name.placeholder)}).setValue(u).onChange(async m=>{if(t.some(g=>a(g)===m)){new ge.Notice(s.name.duplicateMessage),f.inputEl.addClass("error");return}f.inputEl.removeClass("error"),c(h,m);let x=this.items[r];if(x){let g=x.components[0].selectEl.querySelector(`:scope > option:nth-child(${i+1})`);g&&(g.value=m,g.textContent=m)}await this.plugin.saveSettings()})}).then(f=>{s.value.hasOwnProperty("formRows")?f.addTextArea(m=>{m.setPlaceholder(s.value.placeholder).then(x=>{x.inputEl.rows=s.value.formRows,x.inputEl.cols=s.value.formSize,(0,ge.setTooltip)(x.inputEl,s.value.placeholder)}).setValue(p).onChange(async x=>{d(h,x),await this.plugin.saveSettings()})}):f.addText(m=>{m.setPlaceholder(s.value.placeholder).then(x=>{x.inputEl.size=s.value.formSize,(0,ge.setTooltip)(x.inputEl,s.value.placeholder)}).setValue(p).onChange(async x=>{d(h,x),await this.plugin.saveSettings()})})}).addExtraButton(f=>{f.setIcon("trash").setTooltip("Delete").onClick(async()=>{if(t.length===1){new ge.Notice(s.delete.deleteLastMessage);return}t.splice(i,1),this.plugin.settings[r]>i?this.plugin.settings[r]--:this.plugin.settings[r]===i&&(this.plugin.settings[r]=0),await this.plugin.saveSettings(),this.redisplay()})}).setClass("no-border")}addNamedTemplatesSetting(t,i,r,o){return this.addNameValuePairListSetting(t,i,r,{getName:s=>s.name,setName:(s,a)=>{s.name=a},getValue:s=>s.template,setValue:(s,a)=>{s.template=a}},o)}addDisplayTextSetting(t){return this.addNamedTemplatesSetting(this.plugin.settings.displayTextFormats,t,"defaultDisplayTextFormatIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Display text format",formSize:50},delete:{deleteLastMessage:"You cannot delete the last display text format."}})}addCopyCommandSetting(t){return this.addNamedTemplatesSetting(this.plugin.settings.copyCommands,t,"defaultColorPaletteActionIndex",{name:{placeholder:"Format name",formSize:30,duplicateMessage:"This format name is already used."},value:{placeholder:"Copied text format",formSize:50,formRows:3},delete:{deleteLastMessage:"You cannot delete the last copy format."}})}addHotkeySettingButton(t,i){t.addButton(r=>{r.setButtonText("Open hotkeys settings").onClick(()=>{this.plugin.openHotkeySettingTab(i)})})}addPagePreviewSettingButton(t){return t.addButton(i=>{i.setButtonText("Open page preview settings").onClick(()=>{this.app.setting.openTabById("page-preview")})})}addRequireModKeyOnHoverSetting(t){let i=this.app.workspace.hoverLinkSources[t].display,r=this.plugin.requireModKeyForLinkHover(t);return this.addSetting().setName(`Require ${_n} key while hovering`).setDesc(`Currently ${r?"required":"not required"}. You can toggle this on and off in the core Page Preview plugin settings > ${i}.`).then(o=>this.addPagePreviewSettingButton(o))}addIconSetting(t,i){let r=a=>a.startsWith("lucide-")?a.slice(7):a,o=a=>a.startsWith("lucide-")?a:"lucide-"+a,s=a=>{var d;let c=(d=a.controlEl.querySelector(":scope>.icon-preview"))!=null?d:a.controlEl.createDiv("icon-preview");(0,ge.setIcon)(c,o(this.plugin.settings[t]));let l=a.components[0];(!i||this.plugin.settings[t])&&!c.childElementCount?(l.inputEl.addClass("error"),(0,ge.setTooltip)(l.inputEl,"No icon found")):(l.inputEl.removeClass("error"),(0,ge.setTooltip)(l.inputEl,""))};return this.addTextSetting(t,void 0,a=>{this.plugin.settings[t]=r(this.plugin.settings[t]),this.plugin.saveSettings(),s(a)}).then(a=>{this.renderMarkdown(["You can use any icon from [Lucide](https://lucide.dev/icons)."+(i?" Leave blank to remove icons.":"")],a.descEl)}).then(s)}addProductMenuSetting(t,i){let r=Jn[t],o={color:"Colors","copy-format":"Copy format",display:"Display text format"},s=this.plugin.settings[t],a=this.addHeading(i,t);a.addExtraButton(d=>{d.setTooltip("Reset").setIcon("rotate-ccw").onClick(()=>{s.length=0,s.push(...r),this.redisplay()})});let c=[],l=r.slice();for(let d=0;d0){if(!ge.Platform.isDesktopApp)return;let h=c[d-1].getValue();if(!h)return;l.remove(h)}this.addSetting().then(h=>{ge.Platform.isDesktopApp&&h.setName(d===0?"Top-level menu":d===1?"Submenu":"Subsubmenu")}).addDropdown(h=>{var p;for(let f of l)h.addOption(f,o[f]);d>0&&h.addOption("","None");let u=(p=s[d])!=null?p:"";u&&!l.includes(u)&&l[0]&&(s[d]=l[0],u=s[d]),h.setValue(u).onChange(f=>{if(f)s[d]=f;else for(;s.length>d;)s.pop();this.plugin.saveSettings(),this.redisplay()}),c.push(h)}).then(h=>{h.settingEl.addClasses(["no-border","small-padding"])})}return a}createLinkTo(t,i){return createEl("a","",r=>{r.onclick=o=>{this.scrollTo(t,{behavior:"smooth"}),this.updateHeaderElClassOnScroll(o)},activeWindow.setTimeout(()=>{let o=this.items[t];!i&&o&&(i='"'+o.nameEl.textContent+'"'),r.setText(i!=null?i:"")})})}createLinkToHeading(t,i){return createEl("a","",r=>{r.onclick=o=>{this.scrollToHeading(t,{behavior:"smooth"}),this.updateHeaderElClassOnScroll(o)},activeWindow.setTimeout(()=>{let o=this.headings.get(t);!i&&o&&(i='"'+o.nameEl.textContent+'"'),r.setText(i!=null?i:"")})})}redisplay(){let t=this.contentEl.scrollTop;this.display(),this.contentEl.scroll({top:t}),this.events.trigger("update")}async display(){var c,l;Da.openIfNecessary(this.plugin),this.plugin.checkDeprecatedSettings(),this.headerContainerEl.empty(),this.contentEl.empty(),this.promises=[],this.component.load(),activeWindow.setTimeout(()=>this.updateHeaderElClass());for(let d of["wheel","touchmove"])this.component.registerDomEvent(this.contentEl,d,(0,ge.debounce)(()=>this.updateHeaderElClass(),100),{passive:!0});this.contentEl.createDiv("top-note",async d=>{await this.renderMarkdown(["> [!TIP]","> - You can easily navigate through the settings by clicking the icons in the header above.","> - Some settings below require reopening tabs or reloading the plugin to take effect.","> - [Visit the docs](https://ryotaushio.github.io/obsidian-pdf-plus/)",'> - '],d);let h=document.getElementById("pdf-plus-funding-link-placeholder");h&&(h.textContent="Help me keep PDF++ alive!",h.onclick=u=>{this.scrollToHeading("funding",{behavior:"smooth"}),this.updateHeaderElClassOnScroll(u)})}),this.addHeading("Editing PDF files","edit","lucide-save").then(d=>{this.renderMarkdown(["By allowing PDF++ to modify PDF files directly, you can:","- Add, edit and delete highlights and links in PDF files.","- Add, insert, delete or extract PDF pages and auto-update links.","- Add, rename, move and delete outline items.","- Edit [page labels](https://ryotaushio.github.io/obsidian-pdf-plus/page-labels.html).","","[Learn more](https://ryotaushio.github.io/obsidian-pdf-plus/editing-pdfs.html)"],d.descEl)}),this.addToggleSetting("enablePDFEdit",()=>this.redisplay()).setName("Enable PDF editing").then(d=>{this.renderMarkdown(['PDF++ will not modify PDF files themselves unless you turn on this option. The author assumes no responsibility for any data corruption. Please make sure you have a backup of your files. Also note that PDF++ currently does not support editing encrypted PDFs.'],d.descEl)}),this.plugin.settings.enablePDFEdit&&this.addTextSetting("author","Your name",d=>{let h=d.components[0].inputEl;h.toggleClass("error",!h.value)}).setName("Annotation author").setDesc("It must contain at least one character in order to make annotations referenceable & editable within Obsidian.").then(d=>{let h=d.components[0].inputEl;h.toggleClass("error",!h.value)}),this.addHeading("Backlink highlighting","backlink-highlight","lucide-highlighter").setDesc('Annotate PDF files with highlights just by linking to text selection. You can easily copy links to selections using color palette in the toolbar. See the "Color palette" section for the details.').then(d=>d.settingEl.addClass("normal-margin-top")),this.addToggleSetting("highlightBacklinks").setName("Highlight backlinks in PDF viewer").setDesc("In the PDF viewer, any referenced text will be highlighted for easy identification."),this.addDesc("Try turning off the following options if you experience performance issues."),this.addToggleSetting("highlightBacklinksInEmbed").setName("Highlight backlinks in PDF embeds"),this.addToggleSetting("highlightBacklinksInCanvas").setName("Highlight backlinks in Canvas"),this.addToggleSetting("highlightBacklinksInHoverPopover").setName("Highlight backlinks in hover popover previews"),this.addDropdownSetting("selectionBacklinkVisualizeStyle",aC).setName("Highlight style").setDesc("How backlinks to a text selection should be visualized."),this.addDropdownSetting("hoverHighlightAction",lC,()=>this.redisplay()).setName("Action when hovering over highlighted text").setDesc(`Easily open backlinks or display a popover preview of it by pressing ${Bt("Mod").toLowerCase()} (by default) while hovering over a highlighted text in PDF viewer.`),this.addRequireModKeyOnHoverSetting("pdf-plus"),this.addToggleSetting("doubleClickHighlightToOpenBacklink").setName("Double click highlighted text to open the corresponding backlink"),this.addHeading("How backlinks are opened","open-backlink").setDesc("Customize how backlinks are opened when "+(this.plugin.settings.hoverHighlightAction==="open"?`${Bt("Mod").toLowerCase()}+hovering over or `:"")+"double-clicking highlighted text."),this.addDropdownSetting("paneTypeForFirstMDLeaf",Ou,()=>this.redisplay()).setName("How to open the markdown file when no markdown file is opened"),(this.plugin.settings.paneTypeForFirstMDLeaf==="left-sidebar"||this.plugin.settings.paneTypeForFirstMDLeaf==="right-sidebar")&&(this.addToggleSetting("alwaysUseSidebar").setName("Always use sidebar to open markdown files from highlighted text").setDesc(`If turned on, the ${this.plugin.settings.paneTypeForFirstMDLeaf==="left-sidebar"?"left":"right"} sidebar will be used whether there is existing markdown tabs or not.`),this.addToggleSetting("singleMDLeafInSidebar").setName("Don't open multiple panes in sidebar").setDesc("Turn this on if you want to open markdown files in a single pane in the sidebar.")),this.addSetting("ignoreExistingMarkdownTabIn").setName("Ignore existing markdown tabs in...").setDesc("If some notes are opened in the ignored splits, PDF++ will still open the backlink in the way specified in the previous setting. For example, you might want to ignore the left sidebar if you are pinning a certain note (e.g. daily note) in it.");let t={leftSplit:"Left sidebar",rightSplit:"Right sidebar",floatingSplit:"Popout windows"},i=this.plugin.settings.ignoreExistingMarkdownTabIn;for(let[d,h]of Object.entries(t)){let u=d;this.addSetting().addToggle(p=>{p.setValue(i.includes(u)).onChange(f=>{f?i.push(u):i.remove(u),this.plugin.saveSettings()})}).then(p=>{p.controlEl.prepend(createEl("span",{text:h})),p.settingEl.addClasses(["no-border","ignore-split-setting"])})}this.addToggleSetting("dontActivateAfterOpenMD").setName("Don't move focus to markdown view after opening a backlink").setDesc("This option will be ignored when you open a link in a tab in the same split as the current tab."),this.addHeading("Colors","color"),this.addSetting("colors").setName("Highlight colors").then(d=>this.renderMarkdown(['You can optionally highlight the selection with **a specified color** by appending "&color=``" to a link text, where `` is one of the colors that you register below. e.g `[[file.pdf#page=1&selection=4,0,5,20&color=red]].` ',"Color names are case-insensitive. ","",'You can ues the color palette in PDF toolbars to easily copy links with "&color=..." appended automatically. See the "Color palette" section for the details.',"",'You can also opt not to use this plugin-dependent notation and apply a single color (the "default highlight color" setting) to all highlights.',"","These colors are also available as CSS variables, e.g. `--pdf-plus-yellow-rgb`. You can use them for various CSS customizations. See [README](https://github.com/RyotaUshio/obsidian-pdf-plus?tab=readme-ov-file#css-customization) for the details."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new color").onClick(()=>{this.plugin.settings.colors[""]="#",this.redisplay()})});for(let d=0;dthis.redisplay()).setName("Highlight a backlink only if a color is specified").setDesc("By default, all backlinks are highlighted. If this option is enabled, a backlink will be highlighted only when a color is specified in the link text."),this.plugin.settings.highlightColorSpecifiedOnly||this.addDropdownSetting("defaultColor",["",...Object.keys(this.plugin.settings.colors)],d=>d||"Obsidian default",()=>this.plugin.loadStyle()).setName("Default highlight color").setDesc("If no color is specified in link text, this color will be used."),this.addHeading("Backlink indicator bounding rectangles","backlink-bounding-rect"),this.addToggleSetting("showBoundingRectForBacklinkedAnnot").setName("Show bounding rectangles for backlinked annotations").setDesc("Bounding rectangles will be shown for annotations with backlinks."),this.addHeading("Backlink indicator icons","backlink-icon").setDesc("Show icons for text selections, annotations, offsets and rectangular selections with backlinks."),this.addToggleSetting("showBacklinkIconForSelection").setName("Show icon for text selection with backlinks"),this.addToggleSetting("showBacklinkIconForAnnotation").setName("Show icon for annotation with backlinks"),this.addToggleSetting("showBacklinkIconForOffset").setName("Show icon for offset backlinks"),this.addToggleSetting("showBacklinkIconForRect").setName("Show icon for rectangular selection backlinks"),this.addSliderSetting("backlinkIconSize",10,100,5).setName("Icon size"),this.addHeading("Rectangular selection embeds","rect","lucide-box-select").then(d=>{this.renderMarkdown(["You can embed a specified rectangular area from a PDF page into your note. [Learn more](https://ryotaushio.github.io/obsidian-pdf-plus/embedding-rectangular-selections.html)"],d.descEl)}),this.addToggleSetting("rectEmbedStaticImage",()=>this.redisplay()).setName("Paste as image").setDesc("By default, rectangular selection embeds are re-rendered every time you open the markdown file, which can slow down the loading time. Turn on this option to replace them with static images and improve the performance."),this.plugin.settings.rectEmbedStaticImage&&(this.addDropdownSetting("rectImageFormat",{file:"Create & embed image file","data-url":"Embed as data URL"},()=>this.redisplay()).setName("How to embed the image").then(d=>this.renderMarkdown(['- "Create & embed image file": Create an image file and embed it in the markdown file. The image file will be saved in the folder you specify in the "Default location for new attachments" setting in the core Obsidian settings.',`- "Embed as data URL": Embed the image as a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) without creating a file. This option is useful when you don't want to mess up your attachment folder. It also helps you make your notes self-contained.`],d.descEl)),this.plugin.settings.rectImageFormat==="file"&&this.addDropdownSetting("rectImageExtension",dC).setName("Image file format")),this.addToggleSetting("rectFollowAdaptToTheme").setName('Follow "adapt to theme" setting').setDesc('If enabled, rectangular selection embeds will be inverted in color when the "Adapt to theme" setting is enabled in the PDF toolbar. This will help you reduce eye strain in dark mode.'),this.addSliderSetting("rectEmbedResolution",10,200,1).setName("Rendering resolution").setDesc("The higher the value, the better the rendering quality, but the longer time it takes to render. The default value is 100."),this.addToggleSetting("includeColorWhenCopyingRectLink").setName("Include the selected color's name when copying a link to a rectangular selection").setDesc("When enabled, the name of the color selected in the color palette will be included in the link text. As a result, the rectangular selection will be highlighted with the specified color in the PDF viewer."),this.addToggleSetting("zoomToFitRect").setName("Zoom to fit rectangular selection when opening link").setDesc(createFragment(d=>{d.appendText("When enabled, the PDF viewer will zoom to fit the rectangular selection when you open a link to it. Otherwise, the viewer will keep the current zoom level. "),d.appendText("Note: check out the "),d.appendChild(this.createLinkTo("dblclickEmbedToOpenLink")),d.appendText(" option as well.")})),this.addHeading("PDF++ callouts","callout","lucide-quote").then(d=>{this.renderMarkdown("Create [callouts](https://help.obsidian.md/Editing+and+formatting/Callouts) with the same color as the highlight color without any CSS snippet scripting.",d.descEl)}),this.addToggleSetting("useCallout").setName("Use PDF++ callouts").then(d=>{this.renderMarkdown(["You can also disable this option and choose to use your own custom [CSS snippets](https://help.obsidian.md/Extending+Obsidian/CSS+snippets). See our [README](https://github.com/RyotaUshio/obsidian-pdf-plus?tab=readme-ov-file#css-customization) for the details."],d.descEl)}),this.addTextSetting("calloutType",void 0,()=>this.redisplay()).setName("Callout type name").then(d=>{var p,f;let h=this.plugin.settings.calloutType,u=(f=(p=Object.keys(this.plugin.settings.colors).first())==null?void 0:p.toLowerCase())!=null?f:"yellow";this.renderMarkdown([`For example, if this is set to "${h}", use the following syntax to insert a callout with color "${u}":`,"","```markdown",`> [!${h}|${u}] Title`,"> Content","```","",'You can also use explicit RGB color values like "255, 208, 0" instead of color names.',"I recommend setting this as a custom color palette action in the setting below, like so:","","```markdown","> [!{{calloutType}}|{{color}}] {{linkWithDisplay}}","> {{text}}","```"],d.descEl)}),this.addIconSetting("calloutIcon",!0).setName("Callout icon"),this.addHeading("PDF toolbar","toolbar","lucide-palette"),this.addToggleSetting("hoverableDropdownMenuInToolbar").setName("Hoverable dropdown menus").setDesc("(Not supported on smartphones) When enabled, the dropdown menus (\u2304) in the PDF toolbar will be opened by hovering over the icon, and you don't need to click it."),this.addToggleSetting("zoomLevelInputBoxInToolbar").setName("Show zoom level box").setDesc("A input box will be added to the PDF toolbar, which indicated the current zoom level and allows you to set the zoom level by typing a number."),this.addHeading("Color palette","palette").setDesc('Clicking a color while selecting a range of text will copy a link to the selection with "&color=..." appended.'),this.addToggleSetting("colorPaletteInToolbar",()=>{this.redisplay(),this.plugin.loadStyle()}).setName("Show color palette in the toolbar").setDesc("A color palette will be added to the toolbar of the PDF viewer."),this.plugin.settings.colorPaletteInToolbar&&(this.addToggleSetting("noColorButtonInColorPalette",()=>this.plugin.loadStyle()).setName('Show "without specifying color" button in the color palette'),this.addToggleSetting("colorPaletteInEmbedToolbar",()=>this.plugin.loadStyle()).setName("Show color palette in PDF embeds as well"),this.addIndexDropdownSetting("defaultColorPaletteItemIndex",["",...Object.keys(this.plugin.settings.colors)],d=>d||"Don't specify").setName("Default color selected in color palette").setDesc("This color will be selected in the color palette in a newly opened PDF viewer."),this.addToggleSetting("syncColorPaletteItem",()=>this.redisplay()).setName("Share a single color among all color palettes").setDesc("If disabled, you can specify a different color for each color palette."),this.plugin.settings.syncColorPaletteItem&&this.addToggleSetting("syncDefaultColorPaletteItem").setName("Share the color with newly opened color palettes as well"),this.addToggleSetting("quietColorPaletteTooltip").setName("Quiet tooltips in color palette").setDesc(`When disabled${Jn.quietColorPaletteTooltip?"":" (default)"}, the tooltip will show the color name as well as the selected copy format and display text format. If enabled, only the color name will be shown.`)),this.addHeading("Viewer options","viewer-option","lucide-monitor"),this.addSetting("defaultZoomValue").setName("Default zoom level").setDesc("This option will be ignored in PDF embeds.").addDropdown(d=>{d.addOptions({"page-width":"Fit width","page-height":"Fit height","page-fit":"Fit page",custom:"Custom..."}).setValue(this.plugin.settings.defaultZoomValue.startsWith("page-")?this.plugin.settings.defaultZoomValue:"custom").onChange(async h=>{h==="custom"&&(h="100"),this.plugin.settings.defaultZoomValue=h,r(),await this.plugin.saveSettings()})});let r=this.getVisibilityToggler(this.addSetting().setName("Custom zoom level (%)").addSlider(d=>{d.setLimits(10,400,5).setDynamicTooltip().setValue(this.plugin.settings.defaultZoomValue.startsWith("page-")?100:parseInt(this.plugin.settings.defaultZoomValue)).onChange(async h=>{this.plugin.settings.defaultZoomValue=""+h,await this.plugin.saveSettings()})}),()=>!this.plugin.settings.defaultZoomValue.startsWith("page-"));this.addEnumDropdownSetting("scrollModeOnLoad",{0:"Vertical",1:"Horizontal",3:"In-page",2:"Wrapped"},()=>o()).setName("Default scroll mode");let o=this.getVisibilityToggler(this.addEnumDropdownSetting("spreadModeOnLoad",{0:"Single page",1:"Two page (odd)",2:"Two page (even)"}).setName("Default spread mode"),()=>this.plugin.settings.scrollModeOnLoad!==2);if(this.addToggleSetting("usePageUpAndPageDown").setName("Use PageUp/PageDown key to go to previous/next page").setDesc(createFragment(d=>{d.appendText("You need to reopen PDF viewers after changing this option. Note that you can achieve the same thing (and even more advanced stuff) using "),d.appendChild(this.createLinkToHeading("vim","Vim keybindings")),d.appendText(".")})),this.addHeading("Context menu in PDF viewer","context-menu","lucide-mouse-pointer-click").setDesc("(Desktop & tablet only) Customize the behavior of the context menu that pops up when you right-click in the PDF viewer. For mobile users, see also the next section."),this.addToggleSetting("replaceContextMenu",()=>this.redisplay()).setName("Replace the built-in context menu with PDF++'s custom menu"),!this.plugin.settings.replaceContextMenu)this.addSetting().setName("Display text format").setDesc('You can customize the display text format in the setting "Copied text foramt > Display text format" below.');else{this.addToggleSetting("showContextMenuOnTablet").setName("Show context menu on tablet devices as well").setDesc('By default, Obsidian does not show the context menu after text selection on mobile devices, including tablets (iPad, etc.). If you want to show the context menu on tablets, turn this option on. Even if this option is turned off, you copy select the OS-native "Copy" option to run the "'+this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)+'" command.');let d=mg();this.addDropdownSetting("showContextMenuOnMouseUpIf",{always:"Always",...Object.fromEntries(Object.entries(d).map(([h,u])=>[h,`${u} key is pressed`])),never:"Never"}).setName("Show the context menu right after selecting text when...").setDesc(createFragment(h=>{h.appendText("If "),h.appendChild(this.createLinkToHeading("auto-copy","auto-copy")),h.appendText(" is enabled, it will be prioritized and the context menu will not be shown.")}));{this.addHeading("Menu items","context-menu-items").setDesc("Customize which menu items to show.");let h={action:'Look up "(selection)"',selection:"Copy link to selection","write-file":`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle} to file`,annotation:"Copy link to annotation","modify-annotation":"Edit/delete annotation",link:"Copy PDF link / Search on Google Scholar / Paste copied PDF link to selection / Copy URL",text:"Copy selected text / Copy annotated text",search:"Copy link to search",speech:"Read aloud selected text",page:"Copy link to page",settings:"Customize menu..."},u=this.plugin.settings.contextMenuConfig,p=[];for(let f=0;f{g.setValue(m.visible).onChange(b=>{m.visible=b,this.plugin.saveSettings()})}).then(g=>{m.id==="action"?g.setDesc("Available only on macOS."):m.id==="write-file"||m.id==="modify-annotation"?g.setDesc(createFragment(b=>{b.appendText("Requires "),b.appendChild(this.createLinkTo("enablePDFEdit","PDF editing")),b.appendText(" to be enabled.")})):m.id==="link"?g.setDesc('"Search on Google Scholar": Available when right-clicking citation links in PDFs.'):m.id==="speech"?g.setDesc(createFragment(b=>{b.appendText("Requires the "),b.createEl("a",{text:"Text to Speech",href:"obsidian://show-plugin?id=obsidian-tts"}),b.appendText(" plugin to be enabled.")})):m.id==="page"&&g.setDesc("Available when right-clicking with no text selected.")}))}}this.addDesc("Customize nested menus."),this.addProductMenuSetting("selectionProductMenuConfig","Copy link to selection"),this.addProductMenuSetting("writeFileProductMenuConfig",`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle} to file`),this.addProductMenuSetting("annotationProductMenuConfig","Copy link to annotation"),this.addToggleSetting("updateColorPaletteStateFromContextMenu").setName("Update color palette from context menu").setDesc(`In the context menu, the items (color, copy format and display text format) set in the color palette are selected by default. If this option is enabled, selecting a menu item will also update the color palette state and hence the default-selected items in the context menu as well. Even if this option is enabled, you can prevent the color palette from being updated by holding down the ${Bt("Mod")} key while selecting the menu item.`)}this.addHeading("Copying on mobile","mobile-copy","lucide-smartphone"),this.addDropdownSetting("mobileCopyAction",hC).setName('Action triggered by selecting "Copy" option on mobile devices'),this.addHeading("Copying links via hotkeys","copy-hotkeys","lucide-keyboard"),this.addSetting().setName("Set up hotkeys for copying links").then(d=>{this.renderMarkdown(["PDF++ offers two commands for quickly copying links via hotkeys.","","1. **Copy link to selection or annotation:**"," Copies a link to the text selection or focused annotation in the PDF viewer, which is formatted according to the options specified in the PDF toolbar.",'
If the "Add highlights to file directly" toggle switch in the PDF toolbar is on, it first adds a highlight annotation directly to the PDF file, and then copies the link to the created annotation.',"2. **Copy link to current page view:** Copies a link, clicking which will open the PDF file at the current scroll position and zoom level.","",'After running this command, you can add the copied link to the PDF file itself: select a range of text, right-click, and then click "Paste copied link to selection".'],d.descEl)}).then(d=>this.addHotkeySettingButton(d,`${this.plugin.manifest.name}: Copy link`)),this.addSetting().setName("Further workflow enhancements").setDesc(createFragment(d=>{d.appendText("See the "),d.appendChild(this.createLinkToHeading("auto",'"Auto-copy / auto-focus / auto-paste"')),d.appendText(" section below.")})),this.addHeading("Other shortcut commands","other-hotkeys","lucide-layers-2"),this.addSetting().then(d=>{this.renderMarkdown(["PDF++ also offers the following commands for reducing mouse clicks on the PDF toolbar by assigning hotkeys to them.","","- **Show outline** / **show thumbnail**","- **Close PDF siderbar**","- **Zoom in** / **zoom out**","- **Fit width** / **fit height**","- **Go to page**: This command brings the cursor to the page number input field in the PDF toolbar. Enter a page number and press Enter to jump to the page.","- **Show copy format menu** / **show display text format menu**: By running thes commands via hotkeys and then using the arrow keys, you can quickly select a format from the menu without using the mouse.","- **Enable PDF edit** / **disable PDF edit**","- And more..."],d.descEl)}).then(d=>this.addHotkeySettingButton(d)),this.addToggleSetting("executeBuiltinCommandForOutline").setName(`Show outline: when the active file is not PDF, run the core Outline plugin's "Show outline" command`).setDesc("By turning this on, you can use the same hotkey to show the outline of a markdown file and a PDF file without key conflict."),this.addToggleSetting("closeSidebarWithShowCommandIfExist").setName("Show outline / show thumbnail: close the sidebar if it is already open").setDesc("Enabling this will allow you to use the same hotkey to close the sidebar if it is already open."),this.addToggleSetting("executeBuiltinCommandForZoom").setName('Zoom in / zoom out: when the active file is not PDF, run the built-in "Zoom in" / "Zoom out" command').setDesc("By turning this on, you can use the same hotkey to zoom in/out a PDF viewer or any other type of view without key conflict."),this.addToggleSetting("executeFontSizeAdjusterCommand").setName(`Zoom in / zoom out: when the active file is not PDF, run Font Size Adjuster's "Increment font size" / "Decrement font size" command`).then(d=>{this.renderMarkdown(["(Requires the [Font Size Adjuster](obsidian://show-plugin?id=font-size) plugin enabled) ",'If both of this option and the above option are enabled, this option will be prioritized. The built-in "Zoom in" / "Zoom out" command will be executed if Font Size Adjuster is not installed or disabled.'],d.descEl)}),this.addHeading("Copy templates","template","lucide-copy").setDesc("The template format that will be used when copying a link to a selection or an annotation in PDF viewer. "),this.addSetting().then(d=>this.renderMarkdown(["Each `{{...}}` will be evaluated as a JavaScript expression given the variables listed below.","","Available variables are:","","- `file` or `pdf`: The PDF file ([`TFile`](https://docs.obsidian.md/Reference/TypeScript+API/TFile)). Use `file.basename` for the file name without extension, `file.name` for the file name with extension, `file.path` for the full path relative to the vault root, etc.","- `page`: The page number (`Number`). The first page is always page 1.","- `pageLabel`: The page number displayed in the counter in the toolbar (`String`). This can be different from `page`.",` - **Tip**: You can modify page labels with PDF++'s "Edit page labels" command.`,"- `pageCount`: The total number of pages (`Number`).","- `text` or `selection`: The selected text (`String`). In the case of links to annotations written directly in the PDF file, this is the text covered by the annotation.",'- `comment`: In the case of links to annotations written directly in the PDF file, this is the comment associated with the annotation (`String`). Otherwise, it is an empty string `""`.',"- `folder`: The folder containing the PDF file ([`TFolder`](https://docs.obsidian.md/Reference/TypeScript+API/TFolder)). This is an alias for `file.parent`.","- `obsidian`: The Obsidian API. See the [official developer documentation](https://docs.obsidian.md/Home) and the type definition file [`obsidian.d.ts`](https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts) for the details.","- `dv`: Available if the [Dataview](obsidian://show-plugin?id=dataview) plugin is enabled. See Dataview's [official documentation](https://blacksmithgu.github.io/obsidian-dataview/api/code-reference/) for the details. You can use it almost the same as the `dv` variable available in `dataviewjs` code blocks, but there are some differences. For example, `dv.current()` is not available.","- `quickAddApi`: Available if the [QuickAdd](obsidian://show-plugin?id=quickadd) plugin is enabled. See QuickAdd's [official documentation](https://quickadd.obsidian.guide/docs/QuickAddAPI) for the details.","- `app`: The global Obsidian app object ([`App`](https://docs.obsidian.md/Reference/TypeScript+API/App)).","- and other global variables such as:",' - [`moment`](https://momentjs.com/docs/#/displaying/): For exampe, use `moment().format("YYYY-MM-DD")` to get the current date in the "YYYY-MM-DD" format.',"",`Additionally, you have access to the following variables when the PDF file has a corresponding markdown file specified via the "${this.plugin.settings.proxyMDProperty}" property(see the "Property to associate a markdown file to a PDF file" setting below): `,"","- `md`: The markdown file associated with the PDF file ([`TFile`](https://docs.obsidian.md/Reference/TypeScript+API/TFile)). If there is no such file, this is `null`.","- `properties`: The properties of `md` as an `Object` mapping each property name to the corresponding value. If `md` is `null` or the `md` has no properties, this is an empty object `{}`.",'\nThe following variables are deprecated and will be removed in the near future: `linkedFile`, `linkedFileProperties`. Remove them from your templates if you are using them.'],d.descEl)),this.addTextSetting("proxyMDProperty",void 0,()=>this.redisplay()).setName("Property to associate a markdown file to a PDF file").then(d=>{this.renderMarkdown(["Create a markdown file with this property to associate it with a PDF file. The PDF file is specified by a link, e.g. `[[file.pdf]]`.","It can be used to store properties/metadata that can be used when copying links.","",'[Dataview](obsidian://show-plugin?id=dataview)\'s inline field syntax such as `'+this.plugin.settings.proxyMDProperty+":: [[file.pdf]]` is supported for the time being, but it is deprecated and will likely not work in the future.","","Remarks:","- Make sure the associated markdown file can be uniquely identified. For example, if you have two markdown files `file1.md` and `file2.md` and both of their `"+this.plugin.settings.proxyMDProperty+"` properties point to the same PDF file, PDF++ cannot determine which markdown file is associated with `file.pdf`. However, PDF++ v1.0.0 or later will add support for this.","- If you are in Source Mode, be sure to enclose the link in double quotes."],d.descEl)}),this.addSetting("displayTextFormats").setName("Display text format").then(d=>this.renderMarkdown(["This format will be also used when copying a link to a selection or an annotation from the context menu."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new display text format").onClick(()=>{this.plugin.settings.displayTextFormats.push({name:"",template:""}),this.redisplay()})});for(let d=0;dd.name),void 0,()=>{this.plugin.loadStyle()}).setName("Default display text format"),this.addToggleSetting("syncDisplayTextFormat").setName("Share a single display text format among all PDF viewers").setDesc("If disabled, you can specify a different display text format for each PDF viewer from the dropdown menu in the PDF toolbar."),this.plugin.settings.syncDisplayTextFormat&&this.addToggleSetting("syncDefaultDisplayTextFormat").setName("Share the display text format with newly opened PDF viewers as well"),this.addSetting("copyCommands").setName("Custom copy formats").then(d=>this.renderMarkdown(["Customize the format to use when you copy a link by clicking a color palette item or running the commands while selecting a range of text in PDF viewer.","","In addition to the variables listed above, here you can use","","- `link`: The link without display text, e.g. `[[file.pdf#page=1&selection=0,1,2,3&color=red]]`,","- `linkWithDisplay`: The link with display text, e.g. `[[file.pdf#page=1&selection=0,1,2,3&color=red|file, page 1]]`,",'- `linktext`: The text content of the link without brackets and the display text, e.g. `file.pdf#page=1&selection=0,1,2,3&color=red`
(if the "Use \\[\\[Wikilinks\\]\\]" setting is turned off, `linktext` will be properly encoded for use in markdown links),',"- `display`: The display text formatted according to the above setting, e.g. `file, page 1`,","- `linkToPage`: The link to the page without display text, e.g. `[[file.pdf#page=1]]`,","- `linkToPageWithDisplay`: The link to the page with display text, e.g. `[[file.pdf#page=1|file, page 1]]`,",`- \`calloutType\`: The callout type you specify in the "Callout type name" setting above, in this case, "${this.plugin.settings.calloutType}", and`,"- `color` (or `colorName`): In the case of text selections, this is the name of the selected color in lowercase, e.g. `red`. If no color is specified, it will be an empty string. For text markup annotations (e.g. highlights and underlines), this is the RGB value of the color, e.g. `255,208,0`."],d.descEl)).addButton(d=>{d.setIcon("plus").setTooltip("Add a new copy command").onClick(()=>{this.plugin.settings.copyCommands.push({name:"",template:""}),this.redisplay()})});for(let d=0;dd.name),void 0,()=>{this.plugin.loadStyle()}).setName("Default action when clicking on color palette"),this.addToggleSetting("syncColorPaletteAction").setName("Share a single action among all PDF viewers").setDesc("If disabled, you can specify a different action for each PDF viewer from the dropdown menu in the PDF toolbar."),this.plugin.settings.syncColorPaletteAction&&this.addToggleSetting("syncDefaultColorPaletteAction").setName("Share the action with newly opened PDF viewers as well"),this.addToggleSetting("useAnotherCopyTemplateWhenNoSelection",()=>this.redisplay()).setName("Use another template when no text is selected").setDesc("For example, you can use this to copy a link to the page when there is no selection."),this.plugin.settings.useAnotherCopyTemplateWhenNoSelection&&this.addTextSetting("copyTemplateWhenNoSelection").setName("Link copy template used when no text is selected"),this.addHeading("Auto-copy / auto-focus / auto-paste","auto","lucide-zap").setDesc("Speed up the process of copying & pasting PDF links to your notes with some automation. Note that you can't activate both of auto-focus and auto-paste at the same time."),this.addHeading("Auto-copy","auto-copy").setDesc(`If enabled, the "Copy link to selection or annotation" command will be triggered automatically every time you select a range of text in a PDF viewer, meaning you don't even have to press a hotkey to copy a link.`),this.addToggleSetting("autoCopy",()=>this.plugin.autoCopyMode.toggle(this.plugin.settings.autoCopy)).setName("Enable").setDesc("You can also toggle auto-focus via an icon in the left ribbon menu if the next setting is enabled."),this.addToggleSetting("autoCopyToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-copy in the left ribbon menu").setDesc("You can also toggle this mode via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoCopyToggleRibbonIcon&&this.addIconSetting("autoCopyIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addHeading("Auto-focus","auto-focus").setDesc("If enabled, a markdown file will be focused automatically after copying a link to PDF text selection or annotation."),this.addSetting("autoFocus").setName("Enable").setDesc("Recommended if you prefer something less agressive than auto-paste. You can also toggle auto-focus via an icon in the left ribbon menu if the next setting is enabled.").addToggle(d=>{d.setValue(this.plugin.settings.autoFocus).onChange(h=>{this.plugin.toggleAutoFocus(h),this.redisplay()})}),this.addToggleSetting("autoFocusToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-focus in the left ribbon menu").setDesc("You can also toggle auto-focus via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoFocusToggleRibbonIcon&&this.addIconSetting("autoFocusIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addDropdownSetting("autoFocusTarget",Bw).setName("Target markdown file to focus on"),this.addHeading("Auto-paste","auto-paste").setDesc("If enabled, the copied link to PDF text selection or annotation will be automatically pasted into a markdown file right after copying."),this.addSetting("autoPaste").setName("Enable").setDesc("You can also toggle auto-paste via an icon in the left ribbon menu if the next setting is enabled.").addToggle(d=>{d.setValue(this.plugin.settings.autoPaste).onChange(h=>{this.plugin.toggleAutoPaste(h),this.redisplay()})}),this.addToggleSetting("autoPasteToggleRibbonIcon",()=>this.redisplay()).setName("Show an icon to toggle auto-paste in the left ribbon menu").setDesc("You can also toggle auto-paste via a command. Reload the plugin after changing this setting to take effect."),this.plugin.settings.autoPasteToggleRibbonIcon&&this.addIconSetting("autoPasteIconName",!1).setName("Icon name").then(d=>{d.descEl.appendText(" Reload the plugin after changing this setting to take effect.")}),this.addDropdownSetting("autoPasteTarget",Bw).setName("Target markdown file to paste links to"),this.addToggleSetting("focusEditorAfterAutoPaste",()=>this.events.trigger("update")).setName("Focus editor after auto-pasting").setDesc("If enabled, auto-paste will focus on the editor after pasting."),this.showConditionally(this.addToggleSetting("clearSelectionAfterAutoPaste").setName("Clear text selection after auto-pasting").setDesc("If enabled, the text selection in the PDF viewer will be automatically cleared after performing auto-pasting."),()=>!this.plugin.settings.focusEditorAfterAutoPaste),this.addToggleSetting("respectCursorPositionWhenAutoPaste",()=>this.events.trigger("update")).setName("Respect current cursor position").setDesc("When enabled, triggering auto-pasting will paste the copied text at the current cursor position if the target note is already opened. If disabled, the text will be always appended to the end of the note."),this.showConditionally(this.addToggleSetting("blankLineAboveAppendedContent").setName("Blank line above the appended content").setDesc("Because you disabled the option above, auto-pasted content will be added at the end of your note. Enable this option to make sure that you have a blank line between the existing content and the newly added content."),()=>!this.plugin.settings.respectCursorPositionWhenAutoPaste),this.addHeading("General","auto-general").setDesc("General settings that apply to both auto-focus and auto-paste."),this.addToggleSetting("openAutoFocusTargetIfNotOpened",()=>this.redisplay()).setName("Open target markdown file if not opened"),this.plugin.settings.openAutoFocusTargetIfNotOpened&&(this.addDropdownSetting("howToOpenAutoFocusTargetIfNotOpened",{...Ou,"hover-editor":"Hover Editor"},()=>this.redisplay()).setName("How to open target markdown file when not opened").then(d=>{this.renderMarkdown('The "Hover Editor" option is available if the [Hover Editor](obsidian://show-plugin?id=obsidian-hover-editor) plugin is enabled.',d.descEl),this.plugin.settings.howToOpenAutoFocusTargetIfNotOpened==="hover-editor"&&(this.app.plugins.plugins["obsidian-hover-editor"]||d.descEl.addClass("error"))}),this.showConditionally(this.addToggleSetting("closeHoverEditorWhenLostFocus").setName("Close Hover Editor when it loses focus").setDesc("This option will not affect the behavior of Hover Editor outside of PDF++."),()=>this.plugin.settings.howToOpenAutoFocusTargetIfNotOpened==="hover-editor"),this.addToggleSetting("closeSidebarWhenLostFocus").setName("Auto-hide sidebar when it loses focus after auto-pasting").setDesc("After auto-pasting into a markdown file opened in the left or right sidebar, the sidebar will be automatically collapsed once it loses focus."),this.addToggleSetting("openAutoFocusTargetInEditingView").setName("Always open in editing view").setDesc('This option can be useful especially when you set the previous option to "Hover Editor".')),this.addToggleSetting("executeCommandWhenTargetNotIdentified",()=>this.redisplay()).setName("Execute command when target file cannot be determined").setDesc("When PDF++ cannot determine which markdown file to focus on or paste to, it will execute the command specified in the next option to let you pick a target file.");let s=(l=(c=this.app.commands.findCommand(`${this.plugin.manifest.id}:create-new-note`))==null?void 0:c.name)!=null?l:"PDF++: Create new note for auto-focus or auto-paste";this.plugin.settings.executeCommandWhenTargetNotIdentified&&(this.addSetting("commandToExecuteWhenTargetNotIdentified").setName("Command to execute").then(d=>{var h,u,p,f,m,x;this.renderMarkdown(["Here's some examples of useful commands:","",`- ${(u=(h=this.app.commands.findCommand("file-explorer:new-file"))==null?void 0:h.name)!=null?u:"Create new note"}`,`- ${(f=(p=this.app.commands.findCommand("file-explorer:new-file-in-new-pane"))==null?void 0:p.name)!=null?f:"Create note to the right"}`,`- ${(x=(m=this.app.commands.findCommand("switcher:open"))==null?void 0:m.name)!=null?x:"Quick switcher: Open quick switcher"}`,"- [Omnisearch](obsidian://show-plugin?id=omnisearch): Vault search","- [Hover Editor](obsidian://show-plugin?id=obsidian-hover-editor): Open new Hover Editor",`- **${s}**: See below for the details.`],d.descEl)}).addText(d=>{let h=this.plugin.settings.commandToExecuteWhenTargetNotIdentified,u=this.app.commands.findCommand(h);u?d.setValue(u.name):(d.inputEl.addClass("error"),d.setPlaceholder("Command not found")),d.inputEl.size=30,new zc(this,d.inputEl)}),this.addSliderSetting("autoPasteTargetDialogTimeoutSec",1,60,1).setName("[Auto-paste] Maximum time to wait for the command to open the target file (sec)").setDesc("The link will be auto-pasted into the first markdown file that you open within this time frame after the command is executed. If you don't open any markdown file during this time, the auto-paste will not occur. This option is not related to auto-focus.")),this.addHeading(`The "${s}" command`,"create-new-note-command").setDesc('Creates a new note and opens it in a new pane specified in the "How to open target markdown file when not opened" option.'),this.addTextSetting("newFileNameFormat","Leave blank not to specify").setName("New note title format").then(async d=>{await this.renderMarkdown(['If this option is left blank or the active file is not a PDF, "Untitled \\*" will be used (if the language is set to English). You can use the following variables: `file`, `folder`, `app`, and other global variables such as `moment`.'],d.descEl),d.descEl.createSpan({text:"See "}),d.descEl.appendChild(this.createLinkToHeading("template","above")),d.descEl.createSpan({text:" for the details about these variables."})}),this.addTextSetting("newFileTemplatePath","Leave blank not to use a template").setName("Template file path").then(async d=>{await this.renderMarkdown(["You can leave this blank if you don't want to use a template.","You can use `file`, `folder`, `app`, and other global variables such as `moment`."],d.descEl),d.descEl.createSpan({text:"See "}),d.descEl.appendChild(this.createLinkToHeading("template","above")),d.descEl.createSpan({text:" for the details about these variables."}),await this.renderMarkdown(["You can also include [Templater](obsidian://show-plugin?id=templater-obsidian) syntaxes in the template.",'In that case, make sure the "Trigger templater on new file creation" option is enabled in the Templater settings.',"","Example:","```","---",`${this.plugin.settings.proxyMDProperty}: "[[{{ file.path }}|{{ file.basename }}]]"`,"---",'<%* const title = await tp.system.prompt("Type note tile") -%>',"<%* await tp.file.rename(title) %>","```"],d.descEl);let h=d.components[0].inputEl;new Vc(this.app,h).onSelect(({item:u})=>{this.plugin.settings.newFileTemplatePath=u.path,this.plugin.saveSettings()})}),this.addHeading("PDF Annotations","annot","lucide-message-square"),this.addToggleSetting("annotationPopupDrag").setName("Drag & drop annotation popup to insert a link to the annotation").setDesc("Note that turning on this option disables text selection in the annotation popup (e.g. modified date, author, etc)."),this.addToggleSetting("showAnnotationPopupOnHover").setName("If an annotation has a comment, show the annotation popup on hover").setDesc("This is the same behavior as the PDF viewers of some web browsers (e.g. Chrome/Firefox). You may have to reopen the PDF file after changing this option."),this.addToggleSetting("renderMarkdownInStickyNote").setName("Render markdown in annotation popups when the annotation has text contents"),this.plugin.settings.enablePDFEdit&&(this.addSliderSetting("writeHighlightToFileOpacity",0,1,.01).setName("Highlight opacity"),this.addToggleSetting("defaultWriteFileToggle").setName("Write highlight to file by default").setDesc("You can turn this on and off with the toggle button in the PDF viewer toolbar."),this.addToggleSetting("syncWriteFileToggle").setName("Share the same toggle state among all PDF viewers").setDesc("If disabled, you can specify whether to write highlights to files for each PDF viewer."),this.plugin.settings.syncWriteFileToggle&&this.addToggleSetting("syncDefaultWriteFileToggle").setName("Share the state with newly opened PDF viewers as well"),this.addToggleSetting("enableAnnotationContentEdit",()=>this.redisplay()).setName("Enable editing annotation contents").setDesc('If enabled, you can edit the text contents of annotations embedded in PDF files by clicking the "Edit" button in the annotation popup.'),this.addToggleSetting("enableAnnotationDeletion",()=>this.redisplay()).setName("Enable annotation deletion").setDesc('If enabled, you can delete annotations embedded in PDF files by clicking the "Delete" button in the annotation popup.'),this.plugin.settings.enableAnnotationDeletion&&(this.addToggleSetting("warnEveryAnnotationDelete",()=>this.redisplay()).setName("Always warn when deleting an annotation"),this.plugin.settings.warnEveryAnnotationDelete||this.addToggleSetting("warnBacklinkedAnnotationDelete").setName("Warn when deleting an annotation with backlinks"))),this.addHeading("PDF internal links","pdf-link","link").setDesc("Make it easier to work with internal links embedded in PDF files."),this.addToggleSetting("clickPDFInternalLinkWithModifierKey").then(d=>{this.renderMarkdown("Use [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open PDF internal links in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Xn.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${_n}.`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("enableHoverPDFInternalLink",()=>this.events.trigger("update")).setName(`Show a popover preview of PDF internal links by hover(+${_n})`),this.showConditionally(this.addRequireModKeyOnHoverSetting(Xn.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.enableHoverPDFInternalLink),this.addToggleSetting("recordPDFInternalLinkHistory").setName("Enable history navigation for PDF internal links").setDesc('When enabled, clicking the "navigate back" (left arrow) button will take you back to the page you were originally viewing before clicking on an internal link in the PDF file.'),this.addSetting().setName("Copy PDF link as Obsidian link").setDesc('(Requires custom context menu enabled) In the PDF viewer, right-click a PDF-embedded link and then click "Copy PDF link as Obsidian link". It will copy the PDF link as an Obsidian link that you can paste into markdown files. Clicking the pasted link will take you to the same destination as the original PDF link.'),this.addSetting().setName('"Copy link to current page view" command').setDesc("Running this command while viewing a PDF file will copy a link, clicking which will open the PDF file at the current scroll position and zoom level."),this.addSetting().setName("Paste copied link to a text selection in a PDF file").setDesc('(Requires custom context menu & PDF editing enabled) After copying a link by the above actions, you can "paste" it to a selection in PDF to create a PDF internal link. To do this, right-click the selection and click "Paste copied link to selection".'),this.plugin.settings.replaceContextMenu&&this.plugin.settings.enablePDFEdit&&(this.addToggleSetting("pdfLinkBorder",()=>this.redisplay()).setName("Draw borders around internal links").setDesc('Specify whether PDF internal links that you create by "Paste copied link to selection" should be surrounded by borders.'),this.plugin.settings.pdfLinkBorder&&this.addColorPickerSetting("pdfLinkColor").setName("Border color of internal links").setDesc('Specify the border color of PDF internal links that you create by "Paste copied link to selection".')),this.addHeading("Citations in PDF (experimental)","citation","lucide-graduation-cap").then(d=>{this.renderMarkdown(["Enjoy supercharged experiences of working with citations in PDF files, just like in [Google Scholar's PDF viewer](https://scholar.googleblog.com/2024/03/supercharge-your-pdf-reading-follow.html).","","The current implementation is based on some pretty primitive hand-crafted rules, and there is a lot of room for improvement. Code contribution is much appreciated!"],d.descEl)}),this.addDropdownSetting("actionOnCitationHover",Ug,()=>this.events.trigger("update")).setName(`Hover(+${_n}) on a citation link to show...`).then(d=>{this.renderMarkdown([`- **${Ug["pdf-plus-bib-popover"]}**: Recommended. It works without any additional stuff, but you can further boost the visibility by installing [AnyStyle](https://github.com/inukshuk/anystyle) (desktop only).`,`- **${Ug["google-scholar-popover"]}**: Requires [Surfing](obsidian://show-plugin?id=surfing) ver. 0.9.9 or higher enabled. Be careful not to exceed the rate limit of Google Scholar.`],d.descEl)}),this.showConditionally(this.addRequireModKeyOnHoverSetting(pn.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.actionOnCitationHover!=="none"),this.showConditionally(this.addSetting("anystylePath").setName("AnyStyle path").addText(d=>{d.setPlaceholder("anystyle").setValue(this.plugin.settings.anystylePath).onChange(h=>{this.plugin.settings.anystylePath=h,this.plugin.saveLocalStorage("anystylePath",h)})}).then(d=>{d.components[0].inputEl.size=35,this.renderMarkdown(["The path to the [AnyStyle](https://github.com/inukshuk/anystyle) executable. ","","PDF++ extracts the bibliography text from the PDF file for each citation link and uses AnyStyle to convert the extracted text into a structured metadata.","It works just fine without AnyStyle, but you can further boost the visibility by installing it and providing its path here.","","Note: This setting is saved in the [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) instead of `data.json` in the plugin folder."],d.descEl)}),()=>ge.Platform.isDesktopApp&&this.plugin.settings.actionOnCitationHover==="pdf-plus-bib-popover"),this.showConditionally(this.addTextAreaSetting("citationIdPatterns",void 0,()=>this.plugin.setCitationIdRegex()).setName("Citation ID patterns").setDesc("You don't need to care about this option in most use cases - just leave it to the default value. For advanced users: most internal links in PDF files use so-called destination names to specify the target location. This option allows you to specify the regular expressions (separated by line breaks) that determine whether a given internal link is a citation link based on the dsetination name."),()=>this.plugin.settings.actionOnCitationHover!=="none"),this.showConditionally([this.addDesc("Try turning off the following options if you experience performance issues."),this.addToggleSetting("enableBibInEmbed").setName("Enable bibliography extraction in PDF embeds"),this.addToggleSetting("enableBibInCanvas").setName("Enable bibliography extraction in Canvas"),this.addToggleSetting("enableBibInHoverPopover").setName("Enable bibliography extraction in hover popover previews")],()=>this.plugin.settings.actionOnCitationHover!=="none"),this.addHeading("External links in PDF","pdf-external-link","external-link").setDesc("Make it easier to work with external links embedded in PDF files."),this.addToggleSetting("popoverPreviewOnExternalLinkHover").setName(`Show a popover preview of external links by hover(+${_n})`).then(d=>{this.renderMarkdown(["Requires [Surfing](obsidian://show-plugin?id=surfing) ver. 0.9.9 or higher enabled."],d.descEl)}),this.showConditionally(this.addRequireModKeyOnHoverSetting(Gr.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnExternalLinkHover),this.addHeading("PDF sidebar","sidebar","sidebar-left").setDesc("General settings for the PDF sidebar. The options specific to the outline and thumbnails are located in the corresponding sections below."),this.addToggleSetting("autoHidePDFSidebar").setName("Click on PDF content to hide sidebar").setDesc("Requires reopening the tabs after changing this option."),this.addEnumDropdownSetting("defaultSidebarView",{1:"Thumbnails",2:"Outline"}).setName("Default sidebar view").setDesc("Reopen PDFs after changing this option."),this.addHeading("PDF outline (table of contents)","outline","lucide-list").setDesc('Power up the outline view of the built-in PDF viewer: add, rename, or delete items via the right-click menu and the "Add to outline" command, drag & drop items to insert a section link, and more.'),this.addToggleSetting("clickOutlineItemWithModifierKey").then(d=>{this.renderMarkdown("Click PDF outline with [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open target section in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Zn.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${_n}.`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("popoverPreviewOnOutlineHover",()=>this.events.trigger("update")).setName(`Show popover preview by hover(+${_n})`).setDesc("Reopen tabs or reload the app after changing this option."),this.showConditionally(this.addRequireModKeyOnHoverSetting(Zn.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnOutlineHover),this.addToggleSetting("recordHistoryOnOutlineClick").setName("Record to history when clicking an outline item").setDesc("Reopen tabs or reload the app after changing this option."),this.addToggleSetting("outlineContextMenu").setName("Replace the built-in context menu in the outline with a custom one").setDesc("This enables you to insert a section link with a custom format by right-clicking an item in the outline. Moreover, you will be able to add, rename, or delete outline items if PDF modification is enabled."),this.addToggleSetting("outlineDrag").setName("Drag & drop outline item to insert link to section").setDesc("Grab an item in the outline and drop it to a markdown file to insert a section link. Changing this option requires reopening the tabs or reloading the app."),(this.plugin.settings.outlineContextMenu||this.plugin.settings.outlineDrag)&&(this.addTextSetting("outlineLinkDisplayTextFormat").setName("Display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("outlineLinkCopyFormat").setName("Copy format").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30})),this.addHeading("Copy outline as markdown","outline-copy").setDesc('You can copy PDF outline as a markdown list or headings using the commands "Copy outline as markdown list" and "Copy outline as markdown headings".'),this.addTextSetting("copyOutlineAsListDisplayTextFormat").setName("List: display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("copyOutlineAsListFormat").setName("List: copy format").setDesc("You don't need to include leading hyphens in the template.").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30}),this.addTextSetting("copyOutlineAsHeadingsDisplayTextFormat").setName("Headings: display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("copyOutlineAsHeadingsFormat").setName("Headings: copy format").setDesc("You don't need to include leading hashes in the template.").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30}),this.addSliderSetting("copyOutlineAsHeadingsMinLevel",1,6,1).setName("Headings: minimum level").setDesc("The copied headings will start at this level."),this.addHeading("PDF thumbnails","thumbnail","lucide-gallery-thumbnails"),this.addToggleSetting("clickThumbnailWithModifierKey").then(d=>{this.renderMarkdown("Click PDF thumbnails with [modifier keys](https://help.obsidian.md/User+interface/Tabs#Open+a+link) to open target page in various ways",d.nameEl)}).then(d=>{this.plugin.requireModKeyForLinkHover(Yn.HOVER_LINK_SOURCE_ID)&&d.setDesc(`You may want to turn this off to avoid conflicts with hover+${_n}`),d.descEl.appendText("Reopen tabs or reload the app after changing this option.")}),this.addToggleSetting("popoverPreviewOnThumbnailHover",()=>this.events.trigger("update")).setName(`Show popover preview by hover(+${_n})`).setDesc("Reopen tabs or reload the app after changing this option."),this.showConditionally(this.addRequireModKeyOnHoverSetting(Yn.HOVER_LINK_SOURCE_ID),()=>this.plugin.settings.popoverPreviewOnThumbnailHover),this.addToggleSetting("recordHistoryOnThumbnailClick").setName("Record to history when clicking a thumbnail").setDesc("Reopen tabs or reload the app after changing this option."),this.addToggleSetting("thumbnailContextMenu").setName("Replace the built-in context menu in thumbnails with a custom one").setDesc("This enables you to copy a page link with a custom display text format specified in the PDF toolbar by right-clicking a thumbnail. Moreover, you will be able to insert, delete, extract pages if PDF modification is enabled."),this.addToggleSetting("thumbnailDrag").setName("Drag & drop PDF thumbnail to insert link to page").then(d=>{this.renderMarkdown(["Grab a thumbnail image and drop it to a markdown file to insert a page link. Changing this option requires reopening the tabs or reloading the app.","","Note: When disabled, drag-and-drop will cause the thumbnail image to be paste as a data url, which is seemingly Obsidian's bug."],d.descEl)}),(this.plugin.settings.thumbnailContextMenu||this.plugin.settings.thumbnailDrag)&&(this.addTextSetting("thumbnailLinkDisplayTextFormat").setName("Display text format").then(d=>{let h=d.components[0];h.inputEl.size=30}),this.addTextAreaSetting("thumbnailLinkCopyFormat").setName("Copy format").then(d=>{let h=d.components[0];h.inputEl.rows=3,h.inputEl.cols=30})),this.addHeading("PDF page composer (experimental)","composer","lucide-blocks").then(d=>{this.renderMarkdown(['Add, insert, delete or extract PDF pages via commands and **automatically update all the related links in the entire vault**. The "Editing PDF files directly" option has to be enabled to use these features.'],d.descEl)}),this.addToggleSetting("warnEveryPageDelete",()=>this.redisplay()).setName("Always warn when deleting a page"),this.plugin.settings.warnEveryPageDelete||this.addToggleSetting("warnBacklinkedPageDelete").setName("Warn when deleting a page with backlinks"),this.addToggleSetting("extractPageInPlace").setName("Remove the extracted pages from the original PDF by default"),this.addToggleSetting("askExtractPageInPlace").setName("Ask whether to remove the extracted pages from the original PDF before extracting"),this.addToggleSetting("openAfterExtractPages",()=>this.redisplay()).setName("Open extracted PDF file").setDesc('If enabled, the newly created PDF file will be opened after running the commands "Extract this page to a new file" or "Divide this PDF into two files at this page".'),this.plugin.settings.openAfterExtractPages&&this.addDropdownSetting("howToOpenExtractedPDF",Ou).setName("How to open"),this.addHeading("Page labels","page-label").then(d=>{this.renderMarkdown(["Each page in a PDF document can be assigned a ***page label***, which can be different from the page indices.",'For example, a book might have a preface numbered as "i", "ii", "iii", ... and the main content numbered as "1", "2", "3", ...',"","PDF++ allows you to choose whether page labels should be kept unchanged or updated when inserting/removing/extracting pages. [Learn more](https://github.com/RyotaUshio/obsidian-pdf-plus/wiki/Page-labels)","",'You can also modify page labels directly using the command "Edit page labels".'],d.descEl)}),this.addDropdownSetting("pageLabelUpdateWhenInsertPage",Qc).setName("Insert: default page label processing").setDesc('Applies to the commands "Insert page before/after this page".'),this.addToggleSetting("askPageLabelUpdateWhenInsertPage").setName("Insert: ask whether to update"),this.addDropdownSetting("pageLabelUpdateWhenDeletePage",Qc).setName("Delete: default page label processing").setDesc('Applies to the command "Delete this page".'),this.addToggleSetting("askPageLabelUpdateWhenDeletePage").setName("Delete: ask whether to update"),this.addDropdownSetting("pageLabelUpdateWhenExtractPage",Qc).setName("Extract: default page label processing").setDesc('Applies to the commands "Extract this page to a new file" and "Divide this PDF into two files at this page".'),this.addToggleSetting("askPageLabelUpdateWhenExtractPage").setName("Extract: ask whether to update"),this.addHeading("Opening links to PDF files","open-link","lucide-book-open"),this.addToggleSetting("alwaysRecordHistory").setName("Always record to history when opening PDF links").setDesc("By default, the history is recorded only when you open a link to a different PDF file. If enabled, the history will be recorded even when you open a link to the same PDF file as the current one, and you will be able to go back and forth the history by clicking the left/right arrow buttons even within a single PDF file."),this.addToggleSetting("singleTabForSinglePDF",()=>this.redisplay()).setName("Don't open a single PDF file in multiple tabs").then(d=>this.renderMarkdown('When opening a link to a PDF file without pressing any [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link), a new tab will not be opened if the same file has already been already opened in another tab. Useful for annotating PDFs using a side-by-side view ("Split right"), displaying a PDF in one side and a markdown file in another.',d.descEl)),this.plugin.settings.singleTabForSinglePDF&&(this.addToggleSetting("dontActivateAfterOpenPDF").setName("Don't move focus to PDF viewer after opening a PDF link").setDesc("This option will be ignored when you open a PDF link in a tab in the same split as the PDF viewer."),this.addToggleSetting("highlightExistingTab",()=>this.redisplay()).setName("When opening a link to an already opened PDF file, highlight the tab"),this.plugin.settings.highlightExistingTab&&(this.addSliderSetting("existingTabHighlightOpacity",0,1,.01).setName("Highlight opacity of an existing tab"),this.addSliderSetting("existingTabHighlightDuration",.1,10,.05).setName("Highlight duration of an existing tab (sec)")),this.addToggleSetting("dontFitWidthWhenOpenPDFLink",()=>this.events.trigger("update")).setName("Preserve the current zoom level when opening a link to an already opened PDF file").setDesc("When you open a link to a PDF file that's already opened, Obsidian's default behavior causes the zoom level to be reset to fit the width of the PDF file to the viewer. If enabled, the current zoom level will be preserved. This option will be ignored in PDF embeds."),this.showConditionally(this.addToggleSetting("preserveCurrentLeftOffsetWhenOpenPDFLink").setName("Preserve the current horizontal scroll position").setDesc("This option will be ignored in PDF embeds."),()=>this.plugin.settings.dontFitWidthWhenOpenPDFLink)),this.addDropdownSetting("paneTypeForFirstPDFLeaf",Ou).setName("How to open PDF links when there is no open PDF file").then(d=>{this.renderMarkdown("This option will be ignored when you press [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link) to explicitly specify how to open the link.",d.descEl)}),this.addToggleSetting("openLinkNextToExistingPDFTab").setName("Open PDF links next to an existing PDF tab").then(d=>this.renderMarkdown("If there is a PDF file opened in a tab, clicking a PDF link will first create a new tab next to it and then open the target PDF file in the created tab. This is especially useful when you are spliting the workspace vertically or horizontally and want PDF files to be always opened in one side. This option will be ignored when you press [modifier keys](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Open+a+link) to explicitly specify how to open the link.",d.descEl)),this.addToggleSetting("hoverPDFLinkToOpen").setName("Open PDF link instead of showing popover preview when target PDF is already opened").setDesc(`Press ${Bt("Mod").toLowerCase()} while hovering a PDF link to actually open it if the target PDF is already opened in another tab.`),this.addSetting().setName("Open PDF links with an external app").setDesc(createFragment(d=>{d.appendText("See the "),d.appendChild(this.createLinkToHeading("external-app")),d.appendText(" section for the details.")})),this.addSetting().setName("Clear highlights after a certain amount of time").addToggle(d=>{d.setValue(this.plugin.settings.highlightDuration>0).onChange(async h=>{this.plugin.settings.highlightDuration=h?this.plugin.settings.highlightDuration>0?this.plugin.settings.highlightDuration:1:0,await this.plugin.saveSettings(),this.redisplay()})}),this.plugin.settings.highlightDuration>0&&this.addSliderSetting("highlightDuration",.1,10,.05).setName("Highlight duration (sec)"),this.addToggleSetting("ignoreHeightParamInPopoverPreview").setName('Ignore "height" parameter in popover preview').setDesc('Obsidian lets you specify the height of a PDF embed by appending "&height=..." to a link, and this also applies to popover previews. Enable this option if you want to ignore the height parameter in popover previews.'),this.addHeading("Embedding PDF files","embed","picture-in-picture-2"),this.addToggleSetting("dblclickEmbedToOpenLink",()=>this.plugin.loadStyle()).setName("Double click PDF embeds to open links").setDesc("Double-clicking a PDF embed will open the embedded file."),this.addToggleSetting("trimSelectionEmbed",()=>this.redisplay()).setName("Trim selection/annotation embeds").then(d=>{this.renderMarkdown(['(Deprecated in favor of the rectangular selection embed feature introduced in PDF++ 0.36.0)',"When embedding a selection or an annotation from a PDF file, only the target selection/annotation and its surroundings are displayed rather than the entire page."],d.descEl)}),this.plugin.settings.trimSelectionEmbed&&this.addSliderSetting("embedMargin",0,200,1).setName("Selection/annotation embeds margin (px)"),this.addToggleSetting("noSidebarInEmbed").setName("Hide sidebar in PDF embeds or PDF popover previews by default"),this.addToggleSetting("noSpreadModeInEmbed").setName(`Don't display PDF embeds or PDF popover previews in "two page" layout`).setDesc('Regardless of the "two page" layout setting in existing PDF viewer, PDF embeds and PDF popover previews will be always displayed in "single page" layout. You can still turn it on for each embed by clicking the "two page" button in the toolbar, if shown.'),this.addToggleSetting("noTextHighlightsInEmbed").setName("Don't highlight text in text selection embeds"),this.addToggleSetting("noAnnotationHighlightsInEmbed").setName("Don't highlight annotations in annotation embeds"),this.addToggleSetting("persistentTextHighlightsInEmbed").setName("Don't clear highlights in text selection embeds"),this.addToggleSetting("persistentAnnotationHighlightsInEmbed").setName("Don't clear highlights in annotation embeds"),this.addToggleSetting("embedUnscrollable").setName("Make PDF embeds with a page specified unscrollable").setDesc("After changing this option, you need to reopen tabs or reload the app."),this.addHeading("Backlinks pane for PDF files","backlink-view","links-coming-in").then(d=>this.renderMarkdown("Improve the built-in [backlinks pane](https://help.obsidian.md/Plugins/Backlinks) for better PDF experience.",d.descEl)),this.addToggleSetting("filterBacklinksByPageDefault").setName("Filter backlinks by page by default").setDesc('You can toggle this on and off with the "Show only backlinks in the current page" button at the top right of the backlinks pane.'),this.addToggleSetting("showBacklinkToPage").setName("Show backlinks to the entire page").setDesc("If turned off, only backlinks to specific text selections, annotations or locations will be shown when filtering the backlinks page by page."),this.addToggleSetting("highlightBacklinksPane").setName("Hover sync (PDF viewer \u2192 Backlinks pane)").setDesc("Hovering your mouse over highlighted text or annotation will also highlight the corresponding item in the backlink pane."),this.addToggleSetting("highlightOnHoverBacklinkPane").setName("Hover sync (Backlinks pane \u2192 PDF viewer)").setDesc("In the backlinks pane, hover your mouse over an backlink item to highlight the corresponding text or annotation in the PDF viewer. This option requires reopening or switching tabs to take effect."),this.plugin.settings.highlightOnHoverBacklinkPane&&this.addDropdownSetting("backlinkHoverColor",["",...Object.keys(this.plugin.settings.colors)],d=>d||"PDF++ default",()=>this.plugin.loadStyle()).setName("Highlight color for hover sync (Backlinks pane \u2192 PDF viewer)").setDesc('To add a new color, click the "+" button in the "highlight colors" setting above.'),this.addHeading("Search from links","search-link","lucide-search").then(d=>{this.renderMarkdown(["You can trigger full-text search by opening a link to a PDF file with a search query appended, e.g. `[[file.pdf#search=keyword]]`."],d.descEl)}),this.addHeading("Search options","search-option").then(d=>{this.renderMarkdown(["The behavior of the search links can be customized globally by the following settings. ","Alternatively, you can specify the behavior for each link by including the following query parameters in the link text: ","","- `&case-sensitive=true` or `&case-sensitive=false`","- `&highlight-all=true` or `&highlight-all=false`","- `&match-diacritics=true` or `&match-diacritics=false`","- `&entire-word=true` or `&entire-word=false`"],d.descEl)});let a={true:"Yes",false:"No",default:"Follow default setting"};this.addDropdownSetting("searchLinkCaseSensitive",a).setName("Case sensitive search"),this.addDropdownSetting("searchLinkHighlightAll",a).setName("Highlight all search results"),this.addDropdownSetting("searchLinkMatchDiacritics",a).setName("Match diacritics"),this.addDropdownSetting("searchLinkEntireWord",a).setName("Match whole word"),this.addHeading("Integration with external apps (desktop-only)","external-app","lucide-share"),this.addToggleSetting("openPDFWithDefaultApp",()=>this.redisplay()).setName("Open PDF links with an external app").setDesc("Open PDF links with the OS-defined default application for PDF files."),this.plugin.settings.openPDFWithDefaultApp&&this.addToggleSetting("openPDFWithDefaultAppAndObsidian").setName("Open PDF links in Obsidian as well").setDesc("Open the same PDF file both in the default app and Obsidian at the same time."),this.addToggleSetting("syncWithDefaultApp").setName("Sync the external app with Obsidian").setDesc("When you focus on a PDF file in Obsidian, the external app will also focus on the same file."),this.addToggleSetting("focusObsidianAfterOpenPDFWithDefaultApp").setName("Focus Obsidian after opening a PDF file with an external app").setDesc("Otherwise, the focus will be moved to the external app."),this.addHeading("View Sync","view-sync","lucide-eye").then(d=>{this.renderMarkdown(["Integrate more seamlessly with the [View Sync](https://github.com/RyotaUshio/obsidian-view-sync) plugin."],d.descEl)}),this.addToggleSetting("viewSyncFollowPageNumber",()=>this.redisplay()).setName("Sync page number"),this.plugin.settings.viewSyncFollowPageNumber&&this.addSliderSetting("viewSyncPageDebounceInterval",.1,1,.05).setName("Minimum update interval of the View Sync file (sec)"),this.addHeading("Dummy PDFs for external files","dummy","lucide-file-symlink").then(d=>{this.renderMarkdown(["Using dummy PDF files, you can seamlessly integrate PDF files located outside your vault as if they were inside. Note that this is an experimental feature.","[Learn more](https://ryotaushio.github.io/obsidian-pdf-plus/external-pdf-files.html)"],d.descEl)}),this.addAttachmentLocationSetting("dummyFileFolderPath","Dummy PDFs",(d,h,u)=>{d.setName("Default location for new dummy PDF files").setDesc(`Where newly created dummy PDF files are placed. If set to "${Ow.obsidian}", dummy files will be saved in the folder specified in Obsidian settings > Files and links > Default location for new attachments.`),h.setName("Dummy file folder path").setDesc("Place newly created dummy PDF files in this folder."),u.setName("Subfolder name").setDesc('If your file is under "vault/folder", and you set subfolder name to "attachments", dummy PDF files will be saved to "vault/folder/attachments".')}),this.addSetting("modifierToDropExternalPDFToCreateDummy").setName("Modifier key to create a dummy PDF file on drag & drop").setDesc("After dragging an external PDF file, drop it on the editor while pressing this modifier key to create a dummy file and insert a link to it. You can drag a URL to a PDF file on the web from within your browser (link, URL bar, bookmark, etc.) or a PDF file on your desktop machine from your file manager ("+(ge.Platform.isMacOS?"Finder":"File Explorer")+" etc.). Note that on mobile, you might need to start pressing the modifier key before starting the drag operation.").addDropdown(d=>{let h=ge.Platform.isMacOS||ge.Platform.isIosApp?"Alt":"Ctrl";for(let u of[[],["Shift"],[h],[h,"Shift"]])d.addOption(u.join("+"),u.length?u.map(Bt).join("+"):"None");d.setValue(this.plugin.settings.modifierToDropExternalPDFToCreateDummy.join("+")).onChange(async u=>{this.plugin.settings.modifierToDropExternalPDFToCreateDummy=u.split("+"),await this.plugin.saveSettings()})}),this.addSetting("externalURIPatterns").setName("URI patterns for PDF files").setDesc("Specify the URI pattens for PDFs in regular expressions. When dragging and dropping a URI/URL from your browser to Obsidian's editor, it will be used to check if the destination file is a PDF file. If you need multiple patterns, separate them with a new line.").addTextArea(d=>{d.inputEl.rows=8,d.inputEl.cols=30,d.setValue(this.plugin.settings.externalURIPatterns.join(` +`)),this.component.registerDomEvent(d.inputEl,"focusout",async()=>{let h=d.inputEl.value;this.plugin.settings.externalURIPatterns=h.split(` +`).map(u=>u.trim()).filter(u=>u),await this.plugin.saveSettings()})}),this.addHeading("Vim keybindings","vim","vim").then(d=>this.renderMarkdown("Tracked at [this GitHub issue](https://github.com/RyotaUshio/obsidian-pdf-plus/issues/119).",d.descEl)),this.addSetting().then(d=>{this.renderMarkdown(['The default keybindings are as follows. You can customize them be creating a "vimrc" file and providing its path in the setting below.',"","- `j`/`k`/`h`/`l`: Scroll down/up/left/right","- `J`: Go to next page","- `K`: Go to previous page","- `gg`: Go to first page","- `G`: Go to last page","- `0`/`^`/`H`: Go to top of current page","- `$`/`L`: Go to bottom of current page","- ``/``: Scroll down/up as much as the viewer height (`C`=`Ctrl`)","- ``/``: Scroll down/up half as much as the viewer height","- `/`/`?`: Search forward/backward","- `n`/`N`: Go to next/previous match","- `gn`/`gN`: Select search result","- `+`/`zi`: Zoom in","- `-`/`zo`: Zoom out","- `=`/`z0`: Reset zoom","- `r`: Rotate pages clockwise","- `R`: Rotate pages counterclockwise","- `y`: Yank (copy) selected text",`- \`c\`: Run the "${this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)}" command`,"- `C`: Show context menu at text selection","- `o`: Swap the start and end of the selection","- `:`: Enter command-line mode (experimental)","- ``: Toggle outline (table of contents)","- ``: Toggle thumbnails (`S`=`Shift`)","- `f`: Enter hint mode by running `:hint` (experimental)","- ``: Go back to normal mode, abort search, etc","","Many of the commands above can be combined with counts. For example:","- `2j` scrolls down the page twice as much as `j`.","- `2J` advances two pages.","- `10G` takes you to page 10.","- `150=` sets the zoom level to 150%."],d.descEl)}),this.addToggleSetting("vim",()=>this.events.trigger("update")).setName("Enable").setDesc("Reopen the PDF viewers after changing this option."),this.showConditionally([this.addTextSetting("vimrcPath",void 0,()=>this.plugin.vimrc=null).setName("Vimrc file path (optional)").then(async d=>{await this.renderMarkdown(["Only the [Ex commands supported by PDF++](https://github.com/RyotaUshio/obsidian-pdf-plus/blob/main/src/vim/ex-commands.ts) are allowed.","","Example (not necessarily recommendations):","```",'" Use j/k, instead of J/K, to go to the next page',"map j J","map k K","",'" JavaScript commands','" - Hit Ctrl-h in Normal mode to show a message','nmap :js alert("Hello, world!")','" - Hit Ctrl-h in Visual mode to run a .js file',"vmap :jsfile filename.js","",'" Obsidian commands','" - Open the current PDF in the OS-default app by hitting d, e, and then f',"map def :obcommand open-with-default-app:open",'" - Go back and forth the history with Ctrl-o and Ctrl-i',"map :obcommand app:go-back","map :obcommand app:go-forward","```","","After changing the path or the file content, you need to reopen the PDF viewer. If the vimrc file is a hidden file or is under a hidden folder, you need to reload PDF++ or the app."],d.descEl);let h=d.components[0].inputEl;new Hc(this.app,h).onSelect(({item:u})=>{this.plugin.settings.vimrcPath=u.path,this.plugin.saveSettings()})}),this.addHeading("Visual mode","vim-visual"),this.addToggleSetting("vimVisualMotion").setName("Use motion keys to adjust text selection").then(d=>{this.renderMarkdown(["When some text is selected, you can modify the range of selection using the `j,` `k`, `h`, `l`, `w`, `e`, `b`, `0`, `^`, `$`, `H`, and `L` keys, similarly to Vim's visual mode (`H`/`L` are mapped to `^`/`$` by default). If disabled, you can use `j`/`k`/`h`/`l`/`0`/`^`/`$`/`H`/`L` keys to scroll the page regardless of text selection. Reload the viewer or the app after changing this option.","","Tips:","- You can use `o` to swap the start and end of the selection.","- As you know, `/` and `?` keys initiate search. Pressing `gn`/`gN` after the search will select the search result. You can also use search to extend the current selection to the search result.","","Note: On mobile, word-wise motions (`w`/`e`/`b`) might not work as expected around punctuations. Contributions to fix this are welcome!"],d.descEl)}),this.addHeading("Outline mode","vim-outline"),this.addToggleSetting("enableVimOutlineMode").setName("Enter outline mode when opening PDF outline view").then(d=>{this.renderMarkdown(["If enabled, you will enter the outline mode by opening the PDF outline view (from the icon in the toolbar or by ``), and you can use the following keybindings, similarly to [Zathura](https://pwmt.org/projects/zathura/)'s index mode.","","- `j`: Move down","- `k`: Move up","- `h`: Collapse & move to parent entry","- `l`: Expand entry & move to child entry","- `H`: Collapse all entries","- `L`: Expand all entries","- `/`: Open the selected entry (``=`Enter`)","- ``: Close sidebar and go back to normal mode","","If disabled, you can use j/k/h/l/H/L keys to scroll the page whether the outline view is opened or not. ","This option requires reload to take effect."],d.descEl)}),this.addToggleSetting("vimSmoothOutlineMode").setName("Smooth motion in outline mode"),this.addHeading("Command-line mode (experimental)","vim-command-line"),this.addSetting().then(d=>{this.renderMarkdown(['By pressing `:`, you can enter the command-line mode, where you can execute various commands called "Ex commands"',"","- You can always go back to normal mode by ``.","- For some commands, you can run `:help :` or `:h :` to see the help message.","- Use `` and `` to navigate through the suggestions (`S`=`Shift`).","- Use arrow down/up keys to go back and forth the command history.","- `` clears the command line, and `` deletes the last word (`C`=`Ctrl`).",'- `:` will take you to the -th page, where the page number always starts from 1. To go to the page with the page label (e.g. "i, ii, ..., x, 1, 2, ..."), use `:gotopage ` (or `:go `/`:goto ` in short).','- `:!` runs the shell command (not supported on mobile). By default, Obsidian does not know the value of the "PATH" environment variable, so you might need to explicitly provide it in the setting below (in the "Misc" section) to run some commands.'],d.descEl)}),this.addHeading("Hint mode (experimental)","vim-hint"),this.addSetting().then(d=>{this.renderMarkdown(["Hitting `f` will enter the hint mode, where you can perform certain actions on links, annotations, and backlink highlighting in the PDF page without using the mouse.",'For example, first press `f` to enter the hint mode, and if the link you want to open gets marked with "HK", then hit `h` and then `k` (without `Shift`) to open it.',"","This is inspired by [Tridactyl](https://github.com/tridactyl/tridactyl)'s hint mode.","","Also check out Style Settings > PDF++ > Vim keybindings > Hint mode."],d.descEl)}),this.addTextSetting("vimHintChars").setName("Characters to use in hint mode").setDesc(`They are used preferentially from left to right, so you might want to put the easier-to-reach keys first. This is the same as Tridactyl's "hintchars" option.`),this.addTextSetting("vimHintArgs").setName('Default arguments for the ":hint" Ex command').setDesc('Space-separated list of "link"/"annot"/"backlink" or "all". Run ":help :hint" for the details.'),this.addHeading("Context menu","vim-context-menu"),this.addToggleSetting("enableVimInContextMenu").setName("Enable Vim keys in PDF context menus").setDesc("If enabled, you can use j/k/h/l keys, instead of the arrow keys, to navigate through context menu items in the PDF viewer."),this.addHeading("Scrolling","vim-scroll"),this.addSliderSetting("vimScrollSize",5,500,5).setName("Scroll size (px) of the jkhl keys").setDesc("The size of scroll when one of the jkhl keys is pressed once."),this.addToggleSetting("vimLargerScrollSizeWhenZoomIn").setName("Increase scroll size when zoomed in"),this.addSliderSetting("vimContinuousScrollSpeed",.1,5,.1).setName("Speed of continuous scroll (px per ms)").setDesc("The speed of scroll when pressing and holding down the jkhl keys."),this.addToggleSetting("vimSmoothScroll").setName("Smooth scroll"),this.addHeading("Search","vim-search"),this.addToggleSetting("vimHlsearch").setName("hlsearch").setDesc("If enabled, all matches will be highlighted."),this.addToggleSetting("vimIncsearch").setName("incsearch").setDesc("Incremental search: while typing the search query, update the search results after every keystroke. If disabled, the results will be shown only after pressing Enter.")],()=>this.plugin.settings.vim),this.addHeading("Misc","misc","lucide-more-horizontal"),this.addToggleSetting("autoCheckForUpdates",()=>this.plugin.checkForUpdatesIfNeeded()).setName("Automatically check for updates").setDesc("If enabled, PDF++ will automatically check for updates every 24 hours and notify you if a new version is available."),this.addToggleSetting("fixObsidianTextSelectionBug").setName("Fix Obsidian 1.9's text selection bug").then(d=>{this.renderMarkdown(["As of June 10, 2025, Obsidian 1.9 has a bug related to PDF text selection that prevents Obsidian from recognizing text selection ranges properly (see [here](https://github.com/RyotaUshio/obsidian-pdf-plus/discussions/450) for more details). ","This option adds a experimental workaround to mitigate the issue."],d.descEl)}),this.addToggleSetting("showStatusInToolbar").setName("Show status in PDF toolbar").setDesc('For example, when you copy a link to a text selection in a PDF file, the status "Link copied" will be displayed in the PDF toolbar.'),this.addFileLocationSetting("newPDFLocation",d=>d.setName("Default location for new PDFs").setDesc('The "Create new PDF" command will create a new PDF file in the location specified here.'),"newPDFFolderPath",d=>d.setName("Folder to create new PDFs in").setDesc("Newly created PDFs will appear under this folder.")),this.addToggleSetting("hideReplyAnnotation").setName("Hide reply annotations").then(d=>{this.renderMarkdown(["Hide annotations that are replies to other annotations in the PDF viewer.","","This is a temporary fix for the issue that PDF.js (the library Obsidian's PDF viewer is based on) does not fulfill the PDF specification in that it renders reply annotations as if a standalone annotation."],d.descEl)}),this.addToggleSetting("hideStampAnnotation").setName("Disable popups for rubber stamp annotations").setDesc(`A rubber stamp annotation is a type of annotation that displays text or graphics intended to look like a rubber stamp. However, some applications, including iOS/iPadOS's "Markup", use this type of annotation also for handwriting. Often, all pieces of handwriting in a single page are grouped into a single rubber stamp annotation, which tends to be so large that it covers the entire page. In this case, annotation popups can be annoying, so you can disable them here.`),this.addToggleSetting("removeWhitespaceBetweenCJChars").setName("Remove half-width whitespace between two Chinese/Japanese characters when copying text").setDesc("Such whitespace can be introduced as a result of poor post-processing of OCR (optical character recognition). Enable this option to remove it when copying links to text selections."),this.addToggleSetting("copyAsSingleLine").setName("Override the default copy behavior in the PDF viewer").then(d=>{d.descEl.appendText('If enabled, whenever you copy text from the PDF viewer (using Ctrl/Cmd+C or via context menu), the text will go through the same pre-processing as the "'+this.plugin.lib.commands.stripCommandNamePrefix(this.plugin.lib.commands.getCommand("copy-link-to-selection").name)+'" command before written to the clipboard. The pre-processing includes transforming multi-line text into a single line by removing line breaks (if a word is split across lines, it will be concatenated), which is useful because it prevents the copied text from being split into multiple lines unnaturally. If the previous option is enabled, the whitespace removal will also be applied.'),d.descEl.appendText(' Also note that on mobile devices, the action performed by "Copy" depends on the '),d.descEl.appendChild(this.createLinkTo("mobileCopyAction")),d.descEl.appendText(" option.")}),ge.Platform.isDesktopApp&&this.addTextAreaSetting("PATH").then(d=>{let h=d.components[0];h instanceof ge.TextAreaComponent&&(h.inputEl.rows=8,h.inputEl.cols=30)}).setName('"PATH" environment variable').setDesc('Provide the "PATH" environment variable for PDF++ to run shell commands without the full paths specified. In MacOS and Linux, you can run "echo $PATH" in Terminal and then copy & paste the result here. Currently, it will be used only when you run ":!" in Vim mode.'),this.addHeading("Style settings","style-settings","lucide-settings-2").setDesc("You can find more options in Style Settings > PDF++.").addButton(d=>{d.setButtonText("Open style settings").onClick(()=>{let h=this.app.setting.pluginTabs.find(u=>u.id==="obsidian-style-settings");h?this.app.setting.openTab(h):open("obsidian://show-plugin?id=obsidian-style-settings")})}),this.addFundingButton(),await Promise.all(this.promises)}async hide(){this.plugin.settings.colors=Object.fromEntries(Object.entries(this.plugin.settings.colors).filter(([t,i])=>t&&cn(i))),this.plugin.settings.defaultColor&&!(this.plugin.settings.defaultColor in this.plugin.settings.colors)&&(this.plugin.settings.defaultColor=""),this.plugin.settings.backlinkHoverColor&&!(this.plugin.settings.backlinkHoverColor in this.plugin.settings.colors)&&(this.plugin.settings.backlinkHoverColor=""),this.plugin.settings.copyCommands=this.plugin.settings.copyCommands.filter(t=>t.name&&t.template),this.plugin.settings.displayTextFormats=this.plugin.settings.displayTextFormats.filter(t=>t.name),this.plugin.settings.enablePDFEdit&&!this.plugin.settings.author&&(this.plugin.settings.enablePDFEdit=!1,new ge.Notice(`${this.plugin.manifest.name}: Cannot enable writing highlights into PDF files because the "Annotation author" option is empty.`)),this.plugin.validateAutoFocusAndAutoPasteSettings(),await this.plugin.saveSettings(),this.plugin.loadStyle(),this.promises=[],this.component.unload()}};var Nw=async(n,e,t)=>{if(e.palette){if(Le.Platform.isDesktopApp){let i=window.electron;i&&t.isTrusted&&(t.stopPropagation(),t.stopImmediatePropagation(),await new Promise(r=>{let o=t.win.setTimeout(()=>r(null),1e3);i.ipcRenderer.once("context-menu",(s,a)=>{t.win.clearTimeout(o),r(a)}),i.ipcRenderer.send("context-menu")}))}t.defaultPrevented||await Wg(n,e,t)}};async function Wg(n,e,t){let i=await Nu.fromMouseEvent(n,e,t);e.clearEphemeralUI(),i.showAtMouseEvent(t),e.pdfViewer.isEmbed&&t.preventDefault()}async function Ru(n,e,t){if(!t||!t.focusNode||t.isCollapsed)return;let i=t.focusNode,r=t.focusOffset,o=i.doc,s=o.createRange();s.setStart(i,r),s.setEnd(i,r);let{x:a,y:c}=s.getBoundingClientRect(),l=new Nu(n,e);await l.addItems(),e.clearEphemeralUI(),n.shownMenus.forEach(d=>d.hide()),l.showAtPosition({x:a,y:c},o)}var Rw=(n,e,t)=>{var o;let{lib:i}=n,r=t.targetNode;if(r&&r.instanceOf(HTMLElement)&&r.hasClass("thumbnail")&&r.dataset.pageNumber!==void 0){let s=parseInt(r.dataset.pageNumber);if(Number.isNaN(s))return;let a=e.getMarkdownLink(`#page=${s}`,e.getPageLinkAlias(s)),l=(o=e.getPage(s).pageLabel)!=null?o:""+s,d=e.pdfViewer.pagesCount,h=""+s===l?`Copy link to page ${s}`:`Copy link to page ${l} (${s}/${d})`,u=new Le.Menu().addItem(p=>{p.setTitle(h).setIcon("lucide-copy").onClick(()=>{var m;((m=t.view)!=null?m:activeWindow).navigator.clipboard.writeText(a);let f=e.file;f&&(n.lastCopiedDestInfo={file:f,destArray:[s-1,"XYZ",null,null,null]})})});i.isEditable(e)&&u.addItem(p=>{p.setTitle("Insert page before this page").setIcon("lucide-plus").onClick(()=>{let f=e.file;if(!f){new Le.Notice(`${n.manifest.name}: Failed to insert the page.`);return}i.commands._insertPage(f,s,s)})}).addItem(p=>{p.setTitle("Insert page after this page").setIcon("lucide-plus").onClick(()=>{let f=e.file;if(!f){new Le.Notice(`${n.manifest.name}: Failed to insert the page.`);return}i.commands._insertPage(f,s+1,s)})}).addItem(p=>{p.setTitle("Delete page").setIcon("lucide-trash").onClick(()=>{let f=e.file;if(!f){new Le.Notice(`${n.manifest.name}: Failed to delete the page.`);return}i.commands._deletePage(f,s)})}).addItem(p=>{p.setTitle("Extract page to new file").setIcon("lucide-file-output").onClick(()=>{let f=e.file;if(!f){new Le.Notice(`${n.manifest.name}: Failed to extract the page.`);return}i.commands._extractPage(f,s)})}).addItem(p=>{p.setTitle("Divide document at this page").setIcon("lucide-split-square-vertical").onClick(()=>{let f=e.file;if(!f){new Le.Notice(`${n.manifest.name}: Failed to divide the document.`);return}i.commands._dividePDF(f,s)})}).addSeparator().addItem(p=>{p.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("thumbnail")})}),u.showAtMouseEvent(t)}},Vw=(n,e,t,i,r)=>{let{app:o,lib:s}=n;e.pdfViewer.isEmbed&&r.preventDefault();let a=s.toSingleLine(i.item.title),c=a?`Copy link to "${a.length<=40?a:a.slice(0,39).trim()+"\u2026"}"`:"Copy link to section",l=new Le.Menu().addItem(d=>{d.setTitle(c).setIcon("lucide-copy").onClick(async()=>{var p;let h=await s.copyLink.getTextToCopyForOutlineItem(e,t,i);((p=r.view)!=null?p:activeWindow).navigator.clipboard.writeText(h);let u=i.item.dest;if(typeof u=="string")n.lastCopiedDestInfo={file:t,destName:u};else{let f=await i.getPageNumber(),m=s.normalizePDFJsDestArray(u,f);n.lastCopiedDestInfo={file:t,destArray:m}}})});s.isEditable(e)&&l.addItem(d=>{d.setTitle("Add subitem").setIcon("lucide-plus").onClick(()=>{new jr(n,"Add subitem to outline").ask().then(async({title:h})=>{let u=s.getPDFViewFromChild(e);if(u){let p=u.getState(),f=s.viewStateToDestArray(p,!0);if(f){await Ge.findAndProcessOutlineItem(i,m=>{m.createChild(h,f).updateCountForAllAncestors(),m.sortChildren()},t,n);return}}new Le.Notice(`${n.manifest.name}: Failed to add the subitem.`)})})}).addItem(d=>{d.setTitle("Rename...").setIcon("lucide-pencil").onClick(()=>{new jr(n,"Rename outline item").presetTitle(i.item.title).ask().then(async({title:h})=>{await Ge.findAndProcessOutlineItem(i,u=>{u.title=h},t,n)})})}).addItem(d=>{d.setTitle("Move item to...").setIcon("lucide-folder-tree").onClick(async()=>{let h=await Ge.fromFile(t,n),u=await h.findPDFjsOutlineTreeNode(i);if(!u){new Le.Notice(`${n.manifest.name}: Failed to load the PDF document.`);return}new Du(h,u).askDestination().then(async p=>{p.appendChild(u),p.sortChildren();let f=await h.doc.save();await o.vault.modifyBinary(t,f)})})}).addItem(d=>{d.setTitle("Delete").setIcon("lucide-trash").onClick(async()=>{await Ge.findAndProcessOutlineItem(i,h=>{h.remove(),h.updateCountForAllAncestors()},t,n)})}).addItem(d=>{d.setTitle("Extract to new file").setIcon("lucide-file-output").onClick(async()=>{let{lib:h,settings:u}=n,p=await Ge.fromFile(t,n),f=await p.findPDFjsOutlineTreeNode(i);if(!f){new Le.Notice(`${n.manifest.name}: Failed to process the outline item.`);return}let{doc:m}=p,x=f.getExplicitDestination(),g=x?x[0]+1:null,b=null,w=f;for(;!w.nextSibling&&w.parent;)w=w.parent;let y=w.nextSibling;if(y){let D=y.getExplicitDestination();D&&(b=D[0]+1)}else b=m.getPageCount()+1;if(g===null||b===null){new Le.Notice(`${n.manifest.name}: Failed to fetch page numbers from the outline item.`);return}if(g>b){new Le.Notice(`${n.manifest.name}: The page numbers are invalid: the beginning of this section is page ${g}, whereas the next section starts at page ${b}.`);return}g===b&&(b=g+1);let F=h.getAvailablePathForCopy(t);new Gn(n,u.askPageLabelUpdateWhenExtractPage,u.pageLabelUpdateWhenExtractPage,u.askExtractPageInPlace,u.extractPageInPlace).ask().then((D,C)=>{h.composer.extractPages(t,{from:g,to:b-1},F,!1,D,C).then(async k=>{if(!k){new Le.Notice(`${n.manifest.name}: Failed to extract section from PDF.`);return}if(u.openAfterExtractPages){let E=h.workspace.getLeaf(u.howToOpenExtractedPDF);await E.openFile(k),await h.workspace.revealLeaf(E)}})})})}).addSeparator().addItem(d=>{d.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("outline")})}),l.showAtMouseEvent(r)},Hw=(n,e,t,i)=>{let{lib:r}=n;r.isEditable(e)&&new Le.Menu().addItem(o=>{o.setTitle("Add top-level item").setIcon("lucide-plus").onClick(()=>{new jr(n,"Add item to outline").ask().then(async({title:s})=>{let a=r.getPDFViewFromChild(e);if(a){let c=a.getState(),l=r.viewStateToDestArray(c,!0);if(l){await Ge.processOutlineRoot(d=>{d.createChild(s,l).updateCountForAllAncestors(),d.sortChildren()},t,n);return}}new Le.Notice(`${n.manifest.name}: Failed to add the item.`)})})}).showAtMouseEvent(i)},jg=class extends Le.Menu{constructor(e){super(),this.plugin=e}get app(){return this.plugin.app}get settings(){return this.plugin.settings}get lib(){return this.plugin.lib}},Nu=class n extends jg{constructor(e,t){super(e),this.child=t,this.currentSection=null,this.setUseNativeMenu(!1),this.addSections(Object.keys(Jn.contextMenuConfig)),e.settings.enableVimInContextMenu&&Vg(this)}static async fromMouseEvent(e,t,i){let r=new n(e,t);return await r.addItems(i),r}get win(){return this.child.containerEl.win}addItem(e){return this.currentSection?super.addItem(t=>{e(t),t.setSection(this.currentSection)}):super.addItem(e)}async addItems(e){var x,g;let{child:t,plugin:i,lib:r,app:o}=this,s=t.pdfViewer.pdfViewer,a=this.win.getSelection(),c=(x=r.copyLink.getPageAndTextRangeFromSelection(a))!=null?x:s?{page:s.currentPageNumber}:null;if(!c)return;let{page:l,selection:d}=c,h=r.toSingleLine((g=a==null?void 0:a.toString())!=null?g:""),u=b=>{var w;return(w=this.settings.contextMenuConfig.find(y=>y.id===b))==null?void 0:w.visible};Le.Platform.isMacOS&&Le.Platform.isDesktopApp&&this.win.electron&&h&&u("action")&&this.addItem(b=>b.setSection("action").setTitle(`Look up "${h.length<=25?h:h.slice(0,24).trim()+"\u2026"}"`).setIcon("lucide-library").onClick(()=>{this.win.electron.remote.getCurrentWebContents().showDefinitionForSelection()})),h&&h&&d&&t.palette&&(u("selection")&&od.create(this,t.palette).setSection("selection","Copy link to selection","lucide-copy").addItems(i.settings.selectionProductMenuConfig).onItemClick(({copyFormat:b,displayTextFormat:w,colorName:y})=>{r.copyLink.copyLinkToSelection(!1,{copyFormat:b,displayTextFormat:w},y!=null?y:void 0)}),r.isEditable(t)&&u("write-file")&&od.create(this,t.palette).setSection("write-file",`Add ${i.settings.selectionBacklinkVisualizeStyle} to file`,"lucide-edit").setShowNoColorButton(!1).addItems(i.settings.writeFileProductMenuConfig).onItemClick(({copyFormat:b,displayTextFormat:w,colorName:y})=>{r.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(!1,{copyFormat:b,displayTextFormat:w},y!=null?y:void 0)}));let p=t.getPage(l),f=e&&t.getAnnotationFromEvt(p,e),m=null;if(await(async()=>{var b;if(f){let{id:w}=r.getAnnotationInfoFromAnnotationElement(f);if(m=await t.getAnnotatedText(p,w),t.palette&&u("annotation")&&od.create(this,t.palette).setSection("annotation","Copy link to annotation","lucide-copy").addItems(i.settings.annotationProductMenuConfig).onItemClick(({copyFormat:y,displayTextFormat:F})=>{r.copyLink.copyLinkToAnnotation(t,!1,{copyFormat:y,displayTextFormat:F},l,w,!1,!0)}),r.isEditable(t)&&u("modify-annotation")){if(i.settings.enableAnnotationContentEdit&&zr.isSubtypeSupported(f.data.subtype)){let y=f.data.subtype;this.addItem(F=>F.setSection("modify-annotation").setTitle("Edit annotation").setIcon("lucide-pencil").onClick(()=>{t.file&&zr.forSubtype(y,i,t.file,l,w).open()}))}i.settings.enableAnnotationDeletion&&this.addItem(y=>y.setSection("modify-annotation").setTitle("Delete annotation").setIcon("lucide-trash").onClick(()=>{t.file&&new ya(i,t.file,l,w).openIfNeccessary()}))}if(f.data.subtype==="Link"&&u("link")){let y=(b=t.pdfViewer.pdfViewer)==null?void 0:b.pdfDocument;if("dest"in f.data&&typeof f.data.dest=="string"&&y&&t.file){let F=f.data.dest,D=t.file;this.addItem(C=>{C.setSection("link").setTitle("Copy PDF link").setIcon("lucide-copy").onClick(async()=>{let k=await r.destIdToSubpath(F,y);if(typeof k=="string"){let E=m;!E&&f.data.rect&&(E=t.getTextByRect(p,f.data.rect));let B=r.generateMarkdownLink(D,"",k,E!=null?E:void 0).slice(1);navigator.clipboard.writeText(B),i.lastCopiedDestInfo={file:D,destName:F}}})}),i.lib.isCitationId(F)&&this.addItem(C=>{C.setSection("link").setTitle("Search on Google Scholar").setIcon("lucide-search").onClick(()=>{var E;let k=(E=this.child.bib)==null?void 0:E.getGoogleScholarSearchUrlFromDest(F);if(typeof k!="string"){new Le.Notice(`${i.manifest.name}: Failed to find bibliographic information.`);return}window.open(k,"_blank")})})}if("url"in f.data&&typeof f.data.url=="string"){let F=f.data.url;this.currentSection="link",o.workspace.handleExternalLinkContextMenu(this,F),this.currentSection=null}}}})(),h&&d&&r.isEditable(t)&&i.lastCopiedDestInfo&&i.lastCopiedDestInfo.file===t.file&&u("link")){if("destArray"in i.lastCopiedDestInfo){let b=i.lastCopiedDestInfo.destArray;this.addItem(w=>w.setSection("link").setTitle("Paste copied PDF link to selection").setIcon("lucide-clipboard-paste").onClick(()=>{r.highlight.writeFile.addLinkAnnotationToSelection(b)}))}else if("destName"in i.lastCopiedDestInfo){let b=i.lastCopiedDestInfo.destName;this.addItem(w=>w.setSection("link").setTitle("Paste copied link to selection").setIcon("lucide-clipboard-paste").onClick(()=>{r.highlight.writeFile.addLinkAnnotationToSelection(b)}))}}h&&u("text")&&this.addItem(b=>b.setSection("text").setTitle("Copy selected text").setIcon("lucide-copy").onClick(()=>{var w;navigator.clipboard.writeText(this.plugin.settings.copyAsSingleLine?h:(w=a==null?void 0:a.toString())!=null?w:"")})),m&&u("text")&&this.addItem(b=>b.setSection("text").setTitle("Copy annotated text").setIcon("lucide-copy").onClick(()=>{navigator.clipboard.writeText(m)})),h&&d&&u("search")&&this.addItem(b=>{b.setSection("search").setTitle("Copy link to search").setIcon("lucide-search").onClick(()=>{r.copyLink.copyLinkToSearch(!1,t,l,h.trim())})}),r.speech.isEnabled()&&h&&u("speech")&&this.addItem(b=>{b.setSection("speech").setTitle("Read aloud selected text").setIcon("lucide-speech").onClick(()=>{r.speech.speak(h)})}),!this.items.length&&u("page")&&this.addItem(b=>{b.setSection("page").setTitle("Copy link to page").setIcon("lucide-copy").onClick(w=>{let y=t.getMarkdownLink(`#page=${l}`,t.getPageLinkAlias(l));w.win.navigator.clipboard.writeText(y);let F=t.file;F&&(i.lastCopiedDestInfo={file:F,destArray:[l-1,"XYZ",null,null,null]})})}),this.items.length&&u("settings")&&this.addItem(b=>{b.setSection("settings").setIcon("lucide-settings").setTitle("Customize menu...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("context-menu")})}),o.workspace.trigger("pdf-menu",this,{pageNumber:l,selection:h,annot:f})}},od=class n extends ke{constructor(t,i){super(i.plugin);this.clickItemCallback=null;this.itemToColorName=new Map;this.itemToCopyFormat=new Map;this.itemToDisplayTextFormat=new Map;this.rootMenu=t,this.palette=i,this.showNoColorButton=this.settings.noColorButtonInColorPalette}static create(t,i){return t.addChild(new n(t,i))}then(t){return t(this),this}setShowNoColorButton(t){return this.showNoColorButton=t,this}setSection(t,i,r){return this.section=t,this.sectionTitle=i,this.sectionIcon=r,this}addSectionTitle(){this.section&&this.sectionTitle&&this.rootMenu.addItem(t=>{t.setSection(this.section).setTitle(this.sectionTitle).setDisabled(!0),this.sectionIcon&&t.setIcon(this.sectionIcon)})}addItems(t){return this.addSectionTitle(),Le.Platform.isDesktopApp||(t=t.slice(0,1)),Ew(this.rootMenu,t.map(i=>{switch(i){case"color":return this.addColorItems.bind(this);case"copy-format":return this.addCopyFormatItems.bind(this);case"display":return this.addDisplayTextItems.bind(this)}}),{clickableParentItem:!0,vim:this.settings.enableVimInContextMenu}),this}addColorItems(t){let i=Object.keys(this.settings.colors),r=this.palette.getState().selectedColorName,o=r?i.map(s=>s.toLowerCase()).indexOf(r.toLowerCase()):-1;for(let s=this.showNoColorButton?-1:0;s{a.setTitle(s>=0?i[s]:"Don't specify color").onClick(l=>{this.finish({colorName:s>=0?i[s]:null},l)}),t!==this.rootMenu&&a.setChecked(s===o),this.section&&t===this.rootMenu&&a.setSection(this.section),this.itemToColorName.set(a,s>=0?i[s]:null);let c=s>=0?this.settings.colors[i[s]]:"transparent";a.dom.addClass("pdf-plus-color-menu-item"),a.titleEl.before(createDiv("pdf-plus-color-indicator",l=>{l.setCssStyles({backgroundColor:c})}))});Rg(t,100)}addNamedTemplateItems(t,i,r,o,s){for(let a=0;a{c.setTitle(i[a].name).onClick(l=>{s(i[a],l)}),t!==this.rootMenu&&c.setChecked(a===r),o.set(c,i[a].template),this.section&&t===this.rootMenu&&c.setSection(this.section)});Rg(t,100)}addDisplayTextItems(t){this.addNamedTemplateItems(t,this.settings.displayTextFormats,this.palette.getState().displayTextFormatIndex,this.itemToDisplayTextFormat,({template:i},r)=>this.finish({displayTextFormat:i},r))}addCopyFormatItems(t){this.addNamedTemplateItems(t,this.settings.copyCommands,this.palette.getState().actionIndex,this.itemToCopyFormat,({template:i},r)=>this.finish({copyFormat:i},r))}getOptionsFromColorPalette(){return{colorName:this.palette.getColorName(),copyFormat:this.palette.getCopyFormat(),displayTextFormat:this.palette.getDisplayTextFormat()}}getOptions(t){let i=this.getOptionsFromColorPalette();if(Le.Platform.isDesktopApp){let{items:r}=Tw(this.rootMenu);for(let o of r)this.itemToColorName.has(o)?i.colorName=this.itemToColorName.get(o):this.itemToCopyFormat.has(o)?i.copyFormat=this.itemToCopyFormat.get(o):this.itemToDisplayTextFormat.has(o)&&(i.displayTextFormat=this.itemToDisplayTextFormat.get(o))}return Object.assign(i,t),i}updateColorPaletteState(t){let i=t.colorName,r=this.settings.copyCommands.findIndex(({template:s})=>s===t.copyFormat),o=this.settings.displayTextFormats.findIndex(({template:s})=>s===t.displayTextFormat);this.palette.setState({selectedColorName:i,actionIndex:r,displayTextFormatIndex:o}),this.settings.syncColorPaletteItem&&this.settings.syncDefaultColorPaletteItem&&(this.settings.defaultColorPaletteItemIndex=i?Object.keys(this.settings.colors).indexOf(i)+1:0),this.settings.syncColorPaletteAction&&this.settings.syncDefaultColorPaletteAction&&(this.settings.defaultColorPaletteActionIndex=r),this.plugin.settings.syncDisplayTextFormat&&this.plugin.settings.syncDefaultDisplayTextFormat&&(this.plugin.settings.defaultDisplayTextFormatIndex=o),this.plugin.trigger("color-palette-state-change",{source:this.palette})}finish(t,i){var o;let r=this.getOptions(t);this.settings.updateColorPaletteStateFromContextMenu&&!Le.Keymap.isModifier(i,"Mod")&&this.updateColorPaletteState(r),(o=this.clickItemCallback)==null||o.call(this,r),this.rootMenu.hide()}onItemClick(t){this.clickItemCallback=t}},zw=(n,e,t)=>{var l;if(n.defaultPrevented||(l=activeWindow.getSelection())!=null&&l.toString())return;let{lib:i,settings:r,child:o}=e;if(t.page){let d=o.getPage(t.page);if(o.getAnnotationFromEvt(d,n))return}let s=t.getColor(),a=(s==null?void 0:s.type)==="name"?s.name:void 0,c=new Le.Menu().addSections(["copy","color","image"]);s&&c.addItem(d=>{d.setSection("color").setTitle("Unset color").setIcon("lucide-palette").onClick(()=>{i.composer.linkUpdater.updateLinkColor(t.refCache,t.sourcePath,null)})});for(let d of Object.keys(r.colors))d.toLowerCase()!==(a==null?void 0:a.toLowerCase())&&c.addItem(h=>{h.setSection("color").setTitle(`Change color to "${d}"`).setIcon("lucide-palette").onClick(()=>{i.composer.linkUpdater.updateLinkColor(t.refCache,t.sourcePath,{type:"name",name:d})})});if(t.page&&t.FitR){let d=o.getPage(t.page).pdfPage,{left:h,bottom:u,right:p,top:f}=t.FitR;c.addItem(m=>{m.setSection("image").setTitle("Copy as image").setIcon("lucide-image").onClick(()=>{let x=i.pdfPageToImageArrayBuffer(d,{type:"image/png",encoderOptions:1,cropRect:[h,u,p,f]}).then(g=>new Blob([g],{type:"image/png"}));navigator.clipboard.write([new ClipboardItem({"image/png":x})])})})}c.showAtMouseEvent(n),n.preventDefault()};var Kg=require("obsidian");var Uw=async(n,e,t,i)=>{let{app:r,lib:o}=n,s=[];for(let a of e.allItems)s.push((async()=>{let c=await o.copyLink.getTextToCopyForOutlineItemDynamic(t,i,a),l=o.toSingleLine(a.item.title),d=l?`${l.length<=40?l:l.slice(0,39).trim()+"\u2026"}`:"PDF section";r.dragManager.handleDrag(a.selfEl,h=>(r.dragManager.updateSource([a.selfEl],"is-being-dragged"),{source:"pdf-plus",type:"pdf-offset",icon:"lucide-heading",title:d,getText:c,item:a})),r.dragManager.handleDrop(a.selfEl,(h,u,p)=>{if(!o.isEditable(t)||!u||u.source!=="pdf-plus"||u.type!=="pdf-offset")return;let f=u.item;if(f&&!Pg(f,a,!0)&&f.parent!==a&&a.owner===f.owner)return p||(async()=>{let m=await Ge.fromFile(i,n),[x,g]=await Promise.all([m.findPDFjsOutlineTreeNode(a),m.findPDFjsOutlineTreeNode(f)]);if(!x||!g){new Kg.Notice(`${n.manifest.name}: Failed to move the outline item.`);return}x.appendChild(g),x.sortChildren();let b=await m.doc.save();await r.vault.modifyBinary(i,b)})(),{action:`Move into "${d}"`,dropEffect:"move",hoverEl:a.el,hoverClass:"is-being-dragged-over"}},!1)})());await Promise.all(s),r.dragManager.handleDrop(e.childrenEl,(a,c,l)=>{if(!o.isEditable(t)||!c||c.source!=="pdf-plus"||c.type!=="pdf-offset"||a.target!==a.currentTarget)return;let d=c.item;if(d&&d.parent&&e===d.owner)return l||(async()=>{let h=await Ge.fromFile(i,n),u=await(h==null?void 0:h.findPDFjsOutlineTreeNode(d));if(!u){new Kg.Notice(`${n.manifest.name}: Failed to move the outline item.`);return}let p=h.ensureRoot();p.appendChild(u),p.sortChildren();let f=await h.doc.save();await r.vault.modifyBinary(i,f)})(),{action:"Move to top level",dropEffect:"move",hoverEl:e.childrenEl,hoverClass:"is-being-dragged-over"}},!1)},qw=(n,e,t)=>{let{app:i,lib:r}=n;e.pdfViewer.pdfThumbnailViewer.container.querySelectorAll("div.thumbnail[data-page-number]").forEach(o=>{var h;let s=parseInt(o.dataset.pageNumber),c=(h=e.getPage(s).pageLabel)!=null?h:""+s,l=e.pdfViewer.pagesCount,d=""+s===c?`Page ${s}`:`Page ${c} (${s}/${l})`;i.dragManager.handleDrag(o,u=>(i.dragManager.updateSource([o],"is-being-dragged"),{source:"pdf-plus",type:"pdf-page",icon:"lucide-book-open",title:d,getText:p=>r.copyLink.getTextToCopy(e,n.settings.thumbnailLinkCopyFormat,n.settings.thumbnailLinkDisplayTextFormat,t,s,`#page=${s}`,"","",p)}))})},jw=(n,e,t,i,r,o)=>{let{app:s,lib:a}=n,c=t.getPage(r);t.getAnnotatedText(c,o).then(l=>{s.dragManager.handleDrag(e,d=>{s.dragManager.updateSource([e],"is-being-dragged");let h=a.getColorPaletteFromChild(t);if(!h)return null;let u=n.settings.copyCommands[h.actionIndex].template;return{source:"pdf-plus",type:"pdf-annotation",icon:"lucide-highlighter",title:"PDF annotation",getText:p=>a.copyLink.getTextToCopy(t,u,void 0,i,r,`#page=${r}&annotation=${o}`,l!=null?l:"","",p)}})})};var Hu=require("obsidian");var Xr=require("obsidian");var ka=class extends ke{constructor(e,t){super(e),this.file=t,this.events=new Xr.Events}onload(){this.init(),this.registerEvent(this.app.metadataCache.on("changed",(e,t,i)=>{this.update(e.path,i),this.trigger("update")})),this.registerEvent(this.app.metadataCache.on("deleted",e=>{this.deleteCachesForSourcePath(e.path),this.trigger("update")})),this.registerEvent(this.app.vault.on("rename",(e,t)=>{if(e instanceof Xr.TFile){this.deleteCachesForSourcePath(t);let i=this.app.metadataCache.getFileCache(e);i&&this.update(e.path,i),this.trigger("update")}}))}init(){this.pagesMap=new Map,this.sourcePaths=new $t,this.backlinks=new Set;let e=this.app.metadataCache.getBacklinksForFile(this.file);for(let t of e.keys()){let i=e.get(t);for(let r of i!=null?i:[])this.createCache(r,t)}}update(e,t){var r,o,s;this.deleteCachesForSourcePath(e);let i=[...(r=t.links)!=null?r:[],...(o=t.embeds)!=null?o:[],...(s=t.frontmatterLinks)!=null?s:[]];for(let a of i){let c=a.link;this.app.metadataCache.getFirstLinkpathDest((0,Xr.getLinkpath)(c),e)===this.file&&this.createCache(a,e)}}delete(e){this.backlinks.delete(e),this.sourcePaths.deleteValue(e.sourcePath,e),e.page&&this.getPageIndex(e.page).delete(e)}deleteCachesForSourcePath(e){let t=this.sourcePaths.get(e);for(let i of t)this.delete(i)}getPageIndex(e){return this.pagesMap.has(e)||this.pagesMap.set(e,new kt(this,e)),this.pagesMap.get(e)}createCache(e,t){let i=new Gg(this,e);this.backlinks.add(i),i.sourcePath=t;let{subpath:r}=(0,Xr.parseLinktext)(e.link),o=new URLSearchParams(r.startsWith("#")?r.slice(1):r);if(!o.has("page"))return i;let s=+o.get("page");if(!Number.isInteger(s))return i;if(i.page=s,o.has("selection")){let a=o.get("selection").split(",").map(c=>parseInt(c.trim()));if(a.length===4&&a.every(c=>!isNaN(c))){let[c,l,d,h]=a;i.selection={beginIndex:c,beginOffset:l,endIndex:d,endOffset:h}}}if(o.has("annotation")){let a=o.get("annotation");i.annotation={id:a}}if(o.has("offset")){let a=o.get("offset").split(",").map(h=>parseInt(h)),c=a[0],l=a[1],d=a[2];isNaN(d)?i.FitBH={top:l}:i.XYZ={left:c,top:l,zoom:d}}if(o.has("rect")){let a=o.get("rect").split(",").map(u=>parseFloat(u)),[c,l,d,h]=a;i.FitR={left:c,bottom:l,right:d,top:h}}if(o.has("color")){let a=o.get("color"),c=a.split(",").map(l=>parseInt(l));c.length===3&&c.every(l=>!isNaN(l))?i.setColor({rgb:{r:c[0],g:c[1],b:c[2]}}):i.setColor({name:a})}return i}on(e,t,i){return this.events.on(e,t,i)}trigger(e,...t){this.events.trigger(e,...t)}},kt=class n{constructor(e,t){this.sourcePaths=new $t;this.backlinks=new Set;this.selections=new $t;this.annotations=new $t;this.XYZs=new $t;this.FitBHs=new $t;this.FitRs=new $t;this.index=e,this.pageNumber=t}add(e){this.backlinks.add(e),this.sourcePaths.addValue(e.sourcePath,e),e.selection&&this.selections.addValue(n.selectionId(e.selection),e),e.annotation&&this.annotations.addValue(e.annotation.id,e),e.XYZ&&this.XYZs.addValue(n.XYZId(e.XYZ),e),e.FitBH&&this.FitBHs.addValue(n.FitBHId(e.FitBH),e),e.FitR&&this.FitRs.addValue(n.FitRId(e.FitR),e)}delete(e){this.backlinks.delete(e),this.sourcePaths.deleteValue(e.sourcePath,e),e.selection&&this.selections.deleteValue(n.selectionId(e.selection),e),e.annotation&&this.annotations.deleteValue(e.annotation.id,e),e.XYZ&&this.XYZs.deleteValue(n.XYZId(e.XYZ),e),e.FitBH&&this.FitBHs.deleteValue(n.FitBHId(e.FitBH),e),e.FitR&&this.FitRs.deleteValue(n.FitRId(e.FitR),e)}static selectionId(e){return`${e.beginIndex},${e.beginOffset},${e.endIndex},${e.endOffset}`}static selectionIdToParams(e){let[t,i,r,o]=e.split(",").map(s=>parseInt(s));return{beginIndex:t,beginOffset:i,endIndex:r,endOffset:o}}static XYZId(e){return`${e.left},${e.top},${e.zoom}`}static XYZIdToParams(e){let[t,i,r]=e.split(",").map(o=>parseFloat(o));return{left:t,top:i,zoom:r}}static FitBHId(e){return`${e.top}`}static FitBHIdToParams(e){return{top:parseFloat(e)}}static FitRId(e){return`${e.left},${e.bottom},${e.right},${e.top}`}static FitRIdToParams(e){let[t,i,r,o]=e.split(",").map(s=>parseFloat(s));return{left:t,bottom:i,right:r,top:o}}},Gg=class{constructor(e,t){this._sourcePath="";this._page=null;this._selection=null;this._annotation=null;this._XYZ=null;this._FitBH=null;this._FitR=null;this._color=null;this.index=e,this.refCache=t}getPageIndex(){return this.page?this.index.getPageIndex(this.page):null}get file(){return this.index.file}get sourcePath(){return this._sourcePath}set sourcePath(e){this._sourcePath=e,this.index.sourcePaths.addValue(e,this),this.page&&this.index.getPageIndex(this.page).sourcePaths.addValue(e,this)}get page(){return this._page}set page(e){this.page&&this.index.getPageIndex(this.page).delete(this),e&&this.index.getPageIndex(e).add(this),this._page=e}get selection(){return this._selection}set selection(e){let t=this.getPageIndex();t&&(this.selection&&(t==null||t.selections.deleteValue(kt.selectionId(this.selection),this)),e&&t.selections.addValue(kt.selectionId(e),this)),this._selection=e}get annotation(){return this._annotation}set annotation(e){let t=this.getPageIndex();t&&(this.annotation&&(t==null||t.annotations.deleteValue(this.annotation.id,this)),e&&t.annotations.addValue(e.id,this)),this._annotation=e}get XYZ(){return this._XYZ}set XYZ(e){let t=this.getPageIndex();t&&(this.XYZ&&(t==null||t.XYZs.deleteValue(kt.XYZId(this.XYZ),this)),e&&t.XYZs.addValue(kt.XYZId(e),this)),this._XYZ=e}get FitBH(){return this._FitBH}set FitBH(e){let t=this.getPageIndex();t&&(this.FitBH&&(t==null||t.FitBHs.deleteValue(kt.FitBHId(this.FitBH),this)),e&&t.FitBHs.addValue(kt.FitBHId(e),this)),this._FitBH=e}get FitR(){return this._FitR}set FitR(e){let t=this.getPageIndex();t&&(this.FitR&&(t==null||t.FitRs.deleteValue(kt.FitRId(this.FitR),this)),e&&t.FitRs.addValue(kt.FitRId(e),this)),this._FitR=e}setColor(e){"rgb"in e?this._color={type:"rgb",rgb:e.rgb}:this._color={type:"name",name:e.name}}getColor(){return this._color}};var Xg=class extends ke{constructor(e,t){super(e),this.file=t}get index(){var e;return(e=this._index)!=null?e:this._index=this.addChild(new ka(this.plugin,this.file))}processSelection(e,t,i){}processAnnotation(e,t,i){}processXYZ(e,t,i){}processFitBH(e,t,i){}processFitR(e,t,i){}},Zg=class extends ke{constructor(t){super(t.plugin);this.pagewiseCacheToDomsMap=new Map;this.pagewiseStatus=new Map;this.pagewiseOnClearDomCallbacksMap=new $t;this.visualizer=t}get file(){return this.visualizer.file}getCacheToDomsMap(t){let i=this.pagewiseCacheToDomsMap.get(t);return i||(i=new Uc,this.pagewiseCacheToDomsMap.set(t,i)),i}clearDomInPage(t){let i=this.getCacheToDomsMap(t);for(let r of i.values())r.closest(".pdf-plus-backlink-highlight-layer")&&r.remove();this.pagewiseOnClearDomCallbacksMap.get(t).forEach(r=>r()),this.pagewiseCacheToDomsMap.delete(t),this.updateStatus(t,{onPageReady:!1,onTextLayerReady:!1,onAnnotationLayerReady:!1})}clear(){for(let t of this.pagewiseCacheToDomsMap.keys())this.clearDomInPage(t)}getStatus(t){let i=this.pagewiseStatus.get(t);return i||(i={onPageReady:!1,onTextLayerReady:!1,onAnnotationLayerReady:!1},this.pagewiseStatus.set(t,i)),i}isPageProcessed(t){let i=this.getStatus(t);return i.onPageReady&&i.onTextLayerReady&&i.onAnnotationLayerReady}updateStatus(t,i){let r=this.getStatus(t);Object.assign(r,i)}postProcessPageIfReady(t){this.isPageProcessed(t)&&this.postProcessPage(t)}postProcessPage(t){let i=this.getCacheToDomsMap(t);for(let r of i.keys()){let o=r.getColor();for(let s of i.get(r))this.hookBacklinkOpeners(s,r),this.hookBacklinkViewEventHandlers(s,r),this.hookContextMenuHandler(s,r),this.hookClassAdderOnMouseOver(s,r),this.setHighlightColor(s,o)}}hookBacklinkOpeners(t,i){let r="position"in i.refCache?i.refCache.position:void 0,o=r==null?void 0:r.start.line,s={isTriggeredFromBacklinkVisualizer:!0};typeof o=="number"&&(s.scroll=o),this.registerDomEventForCache(i,t,"mouseover",a=>{this.app.workspace.trigger("hover-link",{event:a,source:"pdf-plus",hoverParent:this.visualizer,targetEl:t,linktext:i.sourcePath,sourcePath:this.file.path,state:s})}),this.registerDomEventForCache(i,t,"dblclick",a=>{if(this.plugin.settings.doubleClickHighlightToOpenBacklink){let c=Hu.Keymap.isModEvent(a);this.lib.workspace.openMarkdownLinkFromPDF(i.sourcePath,this.file.path,c,r?{pos:r}:void 0)}})}hookBacklinkViewEventHandlers(t,i){this.registerDomEventForCache(i,t,"mouseover",r=>{this.plugin.settings.highlightBacklinksPane&&this.lib.workspace.iterateBacklinkViews(o=>{if(this.file!==o.file||!o.containerEl.isShown()||!o.pdfManager)return;let s=o.pdfManager.findBacklinkItemEl(i);if(s){s.addClass("hovered-backlink");let a=c=>{Ci(c,s)&&(s.removeClass("hovered-backlink"),t.removeEventListener("mouseout",a))};t.addEventListener("mouseout",a)}})})}hookContextMenuHandler(t,i){this.registerDomEventForCache(i,t,"contextmenu",r=>{zw(r,this.visualizer,i)})}hookClassAdderOnMouseOver(t,i){let r=i.page;if(typeof r=="number"){let o="is-hovered";this.registerDomEventForCache(i,t,"mouseover",()=>{for(let a of this.getCacheToDomsMap(r).get(i))a.addClass(o);let s=()=>{for(let a of this.getCacheToDomsMap(r).get(i))a.removeClass(o);t.removeEventListener("mouseout",s)};t.addEventListener("mouseout",s)})}}setHighlightColor(t,i){if((i==null?void 0:i.type)==="name")t.dataset.highlightColor=i.name.toLowerCase();else if((i==null?void 0:i.type)==="rgb"){let{r,g:o,b:s}=i.rgb;t.setCssProps({"--pdf-plus-color":`rgb(${r}, ${o}, ${s})`,"--pdf-plus-backlink-icon-color":`rgb(${r}, ${o}, ${s})`,"--pdf-plus-rect-color":`rgb(${r}, ${o}, ${s})`})}}onClearDomInPage(t,i){this.pagewiseOnClearDomCallbacksMap.addValue(t,i)}registerDomEventForCache(t,i,r,o,s){this.registerDomEvent(i,r,o,s),t.page&&t.annotation&&this.onClearDomInPage(t.page,()=>{i.removeEventListener(r,o)})}},Yg=class extends ke{constructor(e){super(e.plugin),this.visualizer=e,this.pagewiseIdToRectsMap=new Map}get file(){return this.visualizer.file}get child(){return this.visualizer.child}onload(){this.registerEvent(this.app.vault.on("modify",e=>{e===this.file&&this.pagewiseIdToRectsMap.clear()}))}getIdToRectsMap(e){let t=this.pagewiseIdToRectsMap.get(e);return t||(t=new Map,this.pagewiseIdToRectsMap.set(e,t)),t}getRectsForSelection(e,t){var o;let i=this.getIdToRectsMap(e),r=(o=i.get(t))!=null?o:null;return r||(r=this.computeRectsForSelection(e,t),r?(i.set(t,r),r):null)}computeRectsForSelection(e,t){let i=this.child.getPage(e),{beginIndex:r,beginOffset:o,endIndex:s,endOffset:a}=kt.selectionIdToParams(t),c=i.textLayer;if(!c)return null;let l=Dt(c);return!l||!l.textDivs.length?null:this.lib.highlight.geometry.computeMergedHighlightRects(l,r,o,s,a)}},Vu=class n extends Xg{constructor(e,t,i){super(e,t),this.child=i}static create(e,t,i){return e.addChild(new n(e,t,i))}get hoverPopover(){return this.child.hoverPopover}set hoverPopover(e){this.child.hoverPopover=e,e==null||e.hoverEl.addClass("pdf-plus-backlink-popover")}onload(){this.shouldVisualizeBacklinks()&&(this.domManager=this.addChild(new Zg(this)),this.rectangleCache=this.addChild(new Yg(this)),this.visualize(),this.registerEvent(this.index.on("update",()=>{this.visualize()})))}shouldVisualizeBacklinks(){let e=this.child.pdfViewer;return this.settings.highlightBacklinks&&(Kn(e)||this.settings.highlightBacklinksInCanvas&&ma(e)||this.settings.highlightBacklinksInHoverPopover&&xa(e)||this.settings.highlightBacklinksInEmbed&&es(e))}visualize(){let e=this.child.pdfViewer;this.lib.onPageReady(e,this,t=>{this.domManager.clearDomInPage(t);let i=this.index.getPageIndex(t);for(let[r,o]of i.XYZs)this.processXYZ(t,r,o);for(let[r,o]of i.FitBHs)this.processFitBH(t,r,o);for(let[r,o]of i.FitRs)this.processFitR(t,r,o);this.domManager.updateStatus(t,{onPageReady:!0}),this.domManager.postProcessPageIfReady(t)}),this.lib.onTextLayerReady(e,this,t=>{let i=this.domManager.getStatus(t);if(!i.onPageReady||i.onTextLayerReady)return;let r=this.index.getPageIndex(t);for(let[o,s]of r.selections)this.processSelection(t,o,s);this.domManager.updateStatus(t,{onTextLayerReady:!0}),this.domManager.postProcessPageIfReady(t)}),this.lib.onAnnotationLayerReady(e,this,t=>{let i=this.domManager.getStatus(t);if(!i.onPageReady||i.onAnnotationLayerReady)return;let r=this.index.getPageIndex(t);for(let[o,s]of r.annotations)this.processAnnotation(t,o,s);this.domManager.updateStatus(t,{onAnnotationLayerReady:!0}),this.domManager.postProcessPageIfReady(t)})}processSelection(e,t,i){var d;if(this.settings.highlightColorSpecifiedOnly&&(i=new Set(Array.from(i).filter(h=>h.getColor())),!i.size))return;super.processSelection(e,t,i);let r=this.child.getPage(e),o=this.domManager.getCacheToDomsMap(e),s=r.textLayer;if(!s)return;let a=Dt(s);if(!a)return;let{textDivs:c}=a;if(!c||!c.length)return;let l=this.rectangleCache.getRectsForSelection(e,t);if(l){for(let{rect:h,indices:u}of l){let p=this.lib.highlight.viewer.placeRectInPage(h,r);p.addClasses(["pdf-plus-backlink","pdf-plus-backlink-selection"]);let f=c[u[0]];p.setCssStyles({fontSize:f.style.fontSize}),p.dataset.backlinkId=t;for(let m of i)o.addValue(m,p)}if(this.settings.showBacklinkIconForSelection){let h=(d=l.last())==null?void 0:d.rect;if(h){let u=this.showIcon(h[2],h[3],r);for(let p of i)o.addValue(p,u)}}}}processAnnotation(e,t,i){var u;super.processAnnotation(e,t,i);let r=this.child.getPage(e),o=(u=r.annotationLayer)==null?void 0:u.annotationLayer;if(!o)return;let s=o.getAnnotation(t);if(!s)return;s.container.addClasses(["pdf-plus-backlink","pdf-plus-backlink-annotation"]);let[,,a,c]=s.data.rect,l;this.settings.showBacklinkIconForAnnotation&&(l=this.showIcon(a,c,r));let d;this.settings.showBoundingRectForBacklinkedAnnot&&(d=this.lib.highlight.viewer.placeRectInPage(s.data.rect,r),d.addClass("pdf-plus-annotation-bounding-rect"));let h=this.domManager.getCacheToDomsMap(e);for(let p of i){h.addValue(p,s.container),l&&h.addValue(p,l),d&&h.addValue(p,d);let[f,m,x]=s.data.color;p.setColor({rgb:{r:f,g:m,b:x}})}}processXYZ(e,t,i){if(super.processXYZ(e,t,i),this.settings.showBacklinkIconForOffset){let r=this.child.getPage(e),{left:o,top:s}=kt.XYZIdToParams(t),a=this.showIcon(o,s,r,"left"),c=this.domManager.getCacheToDomsMap(e);for(let l of i)c.addValue(l,a)}}processFitBH(e,t,i){if(super.processFitBH(e,t,i),this.settings.showBacklinkIconForOffset){let r=this.child.getPage(e),{top:o}=kt.FitBHIdToParams(t),s=this.showIcon(0,o,r),a=this.domManager.getCacheToDomsMap(e);for(let c of i)a.addValue(c,s)}}processFitR(e,t,i){if(i=new Set(Array.from(i).filter(h=>!h.annotation)),!i.size)return;super.processFitR(e,t,i);let r=this.child.getPage(e),{left:o,bottom:s,right:a,top:c}=kt.FitRIdToParams(t),l=this.lib.highlight.viewer.placeRectInPage([o,s,a,c],r);l.addClasses(["pdf-plus-backlink","pdf-plus-backlink-fit-r"]);let d=this.domManager.getCacheToDomsMap(e);for(let h of i)d.addValue(h,l);if(this.settings.showBacklinkIconForRect){let h=this.showIcon(a,c,r);for(let u of i)d.addValue(u,h)}}showIcon(e,t,i,r="right"){var h;let o=Math.min(i.viewport.rawDims.pageWidth,i.viewport.rawDims.pageWidth)*this.settings.backlinkIconSize/2e3,s=[e,t-o,e+o,t],a=[e-o,t-o,e,t],c=r==="left"&&a[0]>=((h=i.viewport.rawDims.pageX)!=null?h:0)?a:s,l=this.lib.highlight.viewer.placeRectInPage(c,i);l.addClass("pdf-plus-backlink-icon"),(0,Hu.setIcon)(l,"links-coming-in");let d=l.querySelector("svg");return d==null||d.setAttribute("stroke","var(--pdf-plus-backlink-icon-color)"),l}};var Zr=require("obsidian");var ze=require("obsidian");var Ei=class Ei extends ke{constructor(e,t,i){super(e),this.child=t,this.toolbarLeftEl=i,this.spacerEl=null,this.paletteEl=null,this.itemEls=[],this.actionMenuEl=null,this.displayTextFormatMenuEl=null,this.writeFileButtonEl=null,this.cropButtonEl=null,this.statusContainerEl=null,this.statusEl=null,this.importButtonEl=null,this.selectedColorName=null,this.actionIndex=e.settings.defaultColorPaletteActionIndex,this.displayTextFormatIndex=e.settings.defaultDisplayTextFormatIndex,this.writeFile=this.lib.isEditable(this.child)&&e.settings.defaultWriteFileToggle}onload(){if(this.toolbarLeftEl.querySelectorAll("."+Ei.CLS).forEach(e=>{var t;(t=Ei.elInstanceMap.get(e))==null||t.unload()}),!(!this.plugin.settings.colorPaletteInEmbedToolbar&&this.toolbarLeftEl.closest(".pdf-embed"))){if(this.spacerEl=this.toolbarLeftEl.createDiv("pdf-toolbar-spacer"),this.paletteEl=this.toolbarLeftEl.createDiv(Ei.CLS),Ei.elInstanceMap.set(this.paletteEl,this),this.plugin.settings.colorPaletteInToolbar){this.addItem(this.paletteEl,null,"transparent");for(let[e,t]of Object.entries(this.plugin.settings.colors))this.addItem(this.paletteEl,e,t);this.setActiveItem([null,...Object.keys(this.plugin.settings.colors)][this.plugin.settings.defaultColorPaletteItemIndex])}this.actionMenuEl=this.addCopyActionDropdown(this.paletteEl),this.displayTextFormatMenuEl=this.addDisplayTextFormatDropdown(this.paletteEl),this.addCropButton(this.paletteEl),this.child.isFileExternal?this.addImportButton(this.paletteEl):this.addWriteFileToggle(this.paletteEl),this.statusContainerEl=this.paletteEl.createDiv("pdf-plus-color-palette-status-container"),this.statusEl=this.statusContainerEl.createSpan("pdf-plus-color-palette-status"),this.registerEvent(this.plugin.on("color-palette-state-change",({source:e})=>{e!==this&&this.syncTo(e)}))}}onunload(){var e;(e=this.spacerEl)==null||e.remove(),this.paletteEl&&(this.paletteEl.remove(),Ei.elInstanceMap.delete(this.paletteEl))}addItem(e,t,i){if(t&&!cn(i)||t===null&&!this.plugin.settings.noColorButtonInColorPalette)return;let r=e.createDiv({cls:[Ei.CLS+"-item","clickable-icon"],attr:t?{"data-highlight-color":t.toLowerCase()}:void 0});this.itemEls.push(r),r.createDiv(Ei.CLS+"-item-inner"),this.setTooltipToActionItem(r,t),r.addEventListener("pointerup",s=>this.onItemPointerUp(r,t,s));let o=!1;r.addEventListener("contextmenu",()=>{if(o)return;let s=new ze.Menu().addItem(a=>{a.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollTo("colors")})});s.onHide(()=>{o=!1}),jn(s,r),o=!0})}onItemPointerUp(e,t,i){let r=!e.hasClass("is-active");this.setActiveItem(t),this.plugin.settings.syncColorPaletteItem&&this.plugin.settings.syncDefaultColorPaletteItem&&(this.plugin.settings.defaultColorPaletteItemIndex=t?Object.keys(this.plugin.settings.colors).indexOf(t)+1:0),r&&this.plugin.trigger("color-palette-state-change",{source:this});let o=this.plugin.settings.copyCommands[this.actionIndex].template;this.writeFile?this.lib.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(!1,{copyFormat:o},t!=null?t:void 0):this.lib.copyLink.copyLinkToSelection(!1,{copyFormat:o},t!=null?t:void 0),i.preventDefault()}setActiveItem(e){this.selectedColorName=e?e.toLowerCase():null,this.itemEls.forEach(t=>{t.toggleClass("is-active",this.selectedColorName===t.dataset.highlightColor||this.selectedColorName===null&&t.dataset.highlightColor===void 0)})}addDropdown(e,t,i,r,o,s){return e.createDiv("clickable-icon",a=>{(0,ze.setIcon)(a,"lucide-chevron-down"),(0,ze.setTooltip)(a,r),a.dataset.checkedIndex=""+this[i];let c=!1;a.addEventListener("click",()=>{if(c)return;let l=new ze.Menu;for(let d=0;d{u.setTitle(h).setChecked(this[i]===d).onClick(()=>{let p=this[i]!==d;this.setCheckedIndex(i,d,a),o==null||o(),p&&this.plugin.trigger("color-palette-state-change",{source:this})})})}s==null||s(l),l.onHide(()=>{c=!1}),jn(l,a),c=!0})})}setCheckedIndex(e,t,i){this[e]=t,i.dataset.checkedIndex=""+t}setActionIndex(e){this.actionMenuEl&&this.setCheckedIndex("actionIndex",e,this.actionMenuEl),this.updateTooltips()}setDisplayTextFormatIndex(e){this.displayTextFormatMenuEl&&this.setCheckedIndex("displayTextFormatIndex",e,this.displayTextFormatMenuEl)}addCopyActionDropdown(e){let t="Link copy format";this.plugin.settings.colorPaletteInToolbar||(t=`${this.plugin.manifest.name}: link copy options (trigger via hotkeys)`);let i=this.addDropdown(e,this.plugin.settings.copyCommands.map(r=>r.name),"actionIndex",t,()=>{this.updateTooltips(),this.plugin.settings.syncColorPaletteAction&&this.plugin.settings.syncDefaultColorPaletteAction&&(this.plugin.settings.defaultColorPaletteActionIndex=this.actionIndex)},r=>{r.addItem(o=>{o.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{this.plugin.openSettingTab().scrollTo("copyCommands")})})});return i.addClass("pdf-plus-action-menu"),i}addDisplayTextFormatDropdown(e){let t=this.addDropdown(e,this.plugin.settings.displayTextFormats.map(i=>i.name),"displayTextFormatIndex","Display text format",()=>{this.plugin.settings.syncDisplayTextFormat&&this.plugin.settings.syncDefaultDisplayTextFormat&&(this.plugin.settings.defaultDisplayTextFormatIndex=this.displayTextFormatIndex)},i=>{i.addItem(r=>{r.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{this.plugin.openSettingTab().scrollTo("displayTextFormats")})})});return t.addClass("pdf-plus-display-text-format-menu"),t}addWriteFileToggle(e){this.removeWriteFileToggle(),this.writeFileButtonEl=e.createDiv("clickable-icon",t=>{(0,ze.setIcon)(t,"lucide-edit"),(0,ze.setTooltip)(t,`Add ${this.plugin.settings.selectionBacklinkVisualizeStyle}s to file directly`),t.toggleClass("is-disabled",!this.lib.isEditable(this.child));let i=!1;t.addEventListener("click",()=>{if(!this.lib.isEditable(this.child)){if(i)return;let r=new ze.Menu().addItem(o=>{o.setIcon("lucide-settings").setTitle("Enable PDF editing...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("edit")})});r.onHide(()=>{i=!1}),jn(r,t),i=!0;return}this.setWriteFile(!this.writeFile),this.plugin.settings.syncWriteFileToggle&&this.plugin.settings.syncDefaultWriteFileToggle&&(this.plugin.settings.defaultWriteFileToggle=this.writeFile),this.plugin.trigger("color-palette-state-change",{source:this})}),t.addEventListener("contextmenu",()=>{if(i)return;let r=new ze.Menu;this.lib.isEditable(this.child)&&r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("annot")})}),r.addItem(o=>{o.setIcon("lucide-settings").setTitle(this.lib.isEditable(this.child)?"Disable PDF editing...":"Enable PDF editing...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("edit")})}),r.onHide(()=>{i=!1}),jn(r,t),i=!0})}),this.cropButtonEl&&e.insertAfter(this.writeFileButtonEl,this.cropButtonEl),this.setWriteFile(this.writeFile)}removeWriteFileToggle(){var e;(e=this.writeFileButtonEl)==null||e.remove(),this.writeFileButtonEl=null}addImportButton(e){this.removeImportButton(),this.importButtonEl=e.createDiv("clickable-icon",t=>{(0,ze.setIcon)(t,"lucide-import"),(0,ze.setTooltip)(t,"Import external PDF into vault"),t.addEventListener("click",()=>{this.importFile()})}),this.cropButtonEl&&e.insertAfter(this.importButtonEl,this.cropButtonEl)}removeImportButton(){var e;(e=this.importButtonEl)==null||e.remove(),this.importButtonEl=null}async importFile(){let e=this.child.externalFileUrl,t=this.child.file;if(!e||!t)return;if(!ze.Platform.isDesktopApp&&e.startsWith(ze.Platform.resourcePathPrefix)){new ze.Notice(`${this.plugin.manifest.name}: Importing local PDFs outside the vault is supported only on the desktop app.`);return}let i=await fetch(e);if(i.ok){let r=await i.arrayBuffer();await this.app.vault.modifyBinary(t,r),this.removeImportButton(),this.paletteEl&&this.addWriteFileToggle(this.paletteEl),new ze.Notice(`${this.plugin.manifest.name}: Successfully imported the PDF file into the vault.`);return}new ze.Notice(`${this.plugin.manifest.name}: Import failed. Response status: ${i.status}`)}setWriteFile(e){var t;this.writeFile=e,(t=this.writeFileButtonEl)==null||t.toggleClass("is-active",e)}addCropButton(e){this.cropButtonEl=e.createDiv("clickable-icon pdf-plus-rect-select",t=>{(0,ze.setIcon)(t,"lucide-box-select"),(0,ze.setTooltip)(t,"Copy embed link to rectangular selection"),t.addEventListener("click",()=>{this.startRectangularSelection(!1)});let i=!1;t.addEventListener("contextmenu",()=>{if(i)return;let r=new ze.Menu().addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("rect")})});r.onHide(()=>{i=!1}),jn(r,t),i=!0})})}startRectangularSelection(e){var l;let t=this.cropButtonEl;if(!t)return;let i=this.child;if(!((l=i.pdfViewer.dom)!=null&&l.viewerEl))return;let r=i.pdfViewer.dom.viewerEl,o={left:0,top:0,width:0,height:0},s=d=>{if(!It(d,d.target))return;let h=d.target.closest("div.page[data-page-number]");if(!h)return;let u=h.dataset.pageNumber;if(!u)return;let p=i.getPage(+u),{x:f,y:m}=fu(d);o.left=f,o.top=m;let x=h.createDiv("pdf-plus-select-box"),g=h.getBoundingClientRect(),b=getComputedStyle(h),w=parseFloat(b.borderTopWidth),y=parseFloat(b.borderLeftWidth),F=parseFloat(b.paddingTop),D=parseFloat(b.paddingLeft);x.setCssStyles({left:o.left-(g.left+y+D)+"px",top:o.top-(g.top+w+F)+"px"});let C=B=>{let{x:S,y:I}=fu(B),O=h.getBoundingClientRect();o.width=S-o.left-(O.left-g.left),o.height=I-o.top-(O.top-g.top),x.setCssStyles({width:o.width+"px",height:o.height+"px"}),B.preventDefault(),B.stopImmediatePropagation()},k=B=>{B.preventDefault(),B.stopImmediatePropagation()},E=()=>{var N;if(h.removeEventListener("pointermove",C),h.removeEventListener("touchmove",k),h.removeEventListener("pointerup",E),h.removeChild(x),o.height<=0||o.width<=0)return;let B=o.left-(g.left+y+D),S=o.top-(g.top+w+F),I=B+o.width,O=S+o.height,A=window.pdfjsLib.Util.normalizeRect([...p.getPagePoint(B,O),...p.getPagePoint(I,S)]);this.lib.copyLink.copyEmbedLinkToRect(!1,i,p.id,A,this.plugin.settings.includeColorWhenCopyingRectLink&&(N=this.selectedColorName)!=null?N:void 0,e),c()};this.registerDomEvent(h,"pointermove",C),this.registerDomEvent(h,"touchmove",k),this.registerDomEvent(h,"pointerup",E)},a=d=>{d.key==="Escape"&&c()},c=()=>{var d;t.toggleClass("is-active",!t.hasClass("is-active")),r.toggleClass("pdf-plus-selecting",t.hasClass("is-active")),this.register(()=>r.removeClass("pdf-plus-selecting")),(d=activeWindow.getSelection())==null||d.empty(),t.hasClass("is-active")?(this.registerDomEvent(r,"pointerdown",s),this.registerDomEvent(r.doc,"keydown",a)):(r.removeEventListener("pointerdown",s),r.doc.removeEventListener("keydown",a))};c()}setStatus(e,t){this.plugin.settings.showStatusInToolbar&&this.statusEl&&(this.statusEl.setText(e),t>0&&setTimeout(()=>{var i;((i=this.statusEl)==null?void 0:i.getText())===e&&this.statusEl.setText("")},t))}setTooltipToActionItem(e,t){let i=e.querySelector(":scope > ."+Ei.CLS+"-item-inner"),r=this.plugin.settings.copyCommands[this.actionIndex].name,o=this.plugin.settings.quietColorPaletteTooltip,s=t!==null?o?t:`Copy link with format "${r}" & add ${t.toLowerCase()} ${this.plugin.settings.selectionBacklinkVisualizeStyle}`:o?"No color specified":`Copy link with "${r}" format without specifying color`;(0,ze.setTooltip)(i,s)}updateTooltips(){this.itemEls.forEach(e=>{var t;this.setTooltipToActionItem(e,(t=e.dataset.highlightColor)!=null?t:null)})}getState(){return{selectedColorName:this.selectedColorName,actionIndex:this.actionIndex,displayTextFormatIndex:this.displayTextFormatIndex,writeFile:this.writeFile}}setState(e){typeof e.selectedColorName=="string"&&this.setActiveItem(e.selectedColorName),typeof e.actionIndex=="number"&&this.setActionIndex(e.actionIndex),typeof e.displayTextFormatIndex=="number"&&this.setDisplayTextFormatIndex(e.displayTextFormatIndex),typeof e.writeFile=="boolean"&&this.setWriteFile(e.writeFile)}getColorName(){return this.getState().selectedColorName}getCopyFormat(){let e=this.getState();return this.plugin.settings.copyCommands[e.actionIndex].template}getDisplayTextFormat(){let e=this.getState();return this.plugin.settings.displayTextFormats[e.displayTextFormatIndex].template}syncTo(e){let t=e.getState();this.plugin.settings.syncColorPaletteItem||delete t.selectedColorName,this.plugin.settings.syncColorPaletteAction||delete t.actionIndex,this.plugin.settings.syncDisplayTextFormat||delete t.displayTextFormatIndex,this.plugin.settings.syncWriteFileToggle||delete t.writeFile,this.setState(t)}};Ei.CLS="pdf-plus-color-palette",Ei.elInstanceMap=new Map;var ti=Ei;var Ca=class extends ke{constructor(e,t,i){super(e),this.toolbar=t,this.child=i}onload(){this.addColorPalette(),this.replaceDisplayOptionsDropdown(),this.addZoomLevelInputEl(),this.makeDropdownInToolbarHoverable()}onunload(){}addColorPalette(){this.child.palette=this.addChild(new ti(this.plugin,this.child,this.toolbar.toolbarLeftEl))}makeDropdownInToolbarHoverable(){let{toolbar:e,plugin:t}=this;!t.settings.hoverableDropdownMenuInToolbar||Zr.Platform.isPhone||e.toolbarLeftEl.querySelectorAll("div.clickable-icon").forEach(i=>{let r=i.firstElementChild;if(r&&r.matches("svg.lucide-chevron-down")){let o=null;jc({parentEl:i,createChildEl:()=>{if(!i.hasClass("has-active-menu")){i.click();for(let s of t.shownMenus)if(s.parentEl===i)return o=s,s.dom}return o=null},removeChildEl:()=>{o&&(o.hide(),o=null)},component:this.child.component,timeout:200})}})}replaceDisplayOptionsDropdown(){let{app:e,toolbar:t,child:i}=this,r=t.zoomInEl.nextElementSibling;if(!(r!=null&&r.hasClass("clickable-icon")))return;let o=r.firstElementChild;if(!(o!=null&&o.matches("svg.lucide-chevron-down")))return;let s=t.pdfViewer.eventBus,a=t.pdfViewer.pdfViewer;!s||!a||t.zoomInEl.after(createDiv("clickable-icon",c=>{(0,Zr.setIcon)(c,"lucide-chevron-down"),(0,Zr.setTooltip)(c,"Display options");let l=!1;c.addEventListener("click",()=>{if(!l){let d=a.currentScaleValue,h=a.scrollMode,u=a.spreadMode,p=!!e.loadLocalStorage("pdfjs-is-themed"),f=new Zr.Menu().addSections(["zoom","scroll","spread","appearance","settings"]).addItem(m=>{m.setSection("zoom").setIcon("lucide-move-horizontal").setTitle("Fit width").setChecked(d==="page-width").onClick(()=>s.dispatch("scalechanged",{source:t,value:"page-width"}))}).addItem(m=>{m.setSection("zoom").setIcon("lucide-move-vertical").setTitle("Fit height").setChecked(d==="page-height").onClick(()=>s.dispatch("scalechanged",{source:t,value:"page-height"}))}).addItem(m=>{m.setSection("zoom").setIcon("lucide-move").setTitle("Fit page").setChecked(d==="page-fit").onClick(()=>s.dispatch("scalechanged",{source:t,value:"page-fit"}))}).addItem(m=>{m.setSection("scroll").setIcon("lucide-chevrons-up-down").setTitle("Vertical scroll").setChecked(h===0).onClick(()=>{s.dispatch("switchscrollmode",{source:t,mode:0})})}).addItem(m=>{m.setSection("scroll").setIcon("lucide-chevrons-left-right").setTitle("Hotizontal scroll").setChecked(h===1).onClick(()=>{s.dispatch("switchscrollmode",{source:t,mode:1})})}).addItem(m=>{m.setSection("scroll").setIcon("lucide-sticky-note").setTitle("In-page scroll").setChecked(h===3).onClick(()=>{s.dispatch("switchscrollmode",{source:t,mode:3})})}).addItem(m=>{m.setSection("scroll").setIcon("lucide-wrap-text").setTitle("Wrapped scroll").setChecked(h===2).onClick(()=>{s.dispatch("switchscrollmode",{source:t,mode:2})})}).addItem(m=>{m.setSection("spread").setIcon("lucide-rectangle-vertical").setTitle("Single page").setChecked(u===0).onClick(()=>{s.dispatch("switchspreadmode",{source:t,mode:0})})}).addItem(m=>{m.setSection("spread").setIcon("rectangle-vertical-double").setTitle("Two pages (odd)").setChecked(u===1).onClick(()=>{s.dispatch("switchspreadmode",{source:t,mode:1})})}).addItem(m=>{m.setSection("spread").setIcon("rectangle-vertical-double").setTitle("Two pages (even)").setChecked(u===2).onClick(()=>{s.dispatch("switchspreadmode",{source:t,mode:2})})}).addItem(m=>{m.setSection("appearance").setIcon("lucide-palette").setTitle("Adapt to theme").setChecked(p).onClick(()=>{e.saveLocalStorage("pdfjs-is-themed",p?null:"true"),i.onCSSChange(),this.plugin.trigger("adapt-to-theme-change",{adapt:!p})})}).addItem(m=>{m.setSection("settings").setIcon("lucide-settings").setTitle("Customize defaults...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("viewer-option")})});f.onHide(()=>{l=!1}),jn(f,c),l=!0}}),t.toolbarEl.doc.win.setTimeout(()=>{r.remove(),t.toolbarLeftEl.insertAfter(c,t.zoomInEl)})}))}addZoomLevelInputEl(){if(!this.settings.zoomLevelInputBoxInToolbar)return;let{toolbar:e}=this,t=e.pdfViewer.eventBus,i=e.pdfViewer.pdfViewer;if(!t||!i)return;let r=e.zoomOutEl.nextElementSibling;r!=null&&r.hasClass("pdf-toolbar-divider")&&(r.remove(),this.register(()=>e.zoomOutEl.after(createDiv("pdf-toolbar-divider"))),e.zoomOutEl.after(createEl("input","pdf-zoom-level-input",o=>{this.register(()=>o.remove()),o.type="number",o.addEventListener("click",()=>o.select()),o.addEventListener("change",()=>{let s=o.valueAsNumber/100,a=Math.min(Math.max(s,window.pdfjsViewer.MIN_SCALE),window.pdfjsViewer.MAX_SCALE);i.currentScale=a}),t.on("scalechanging",({scale:s})=>{o.value=Math.round(s*100)+""}),i.currentScale&&(o.value=Math.round(i.currentScale*100)+""),o.doc.win.setTimeout(()=>{o.after(createSpan({cls:"pdf-zoom-level-percent",text:"%"},s=>{this.register(()=>s.remove())}))})})))}};Ca.elInstanceMap=new Map;var _g=Wi(require("obsidian"));var ns=class extends ke{constructor(e,t){super(e),this.child=t}get file(){return this.child.file}get pdf(){return this.file}get folder(){var e,t;return(t=(e=this.file)==null?void 0:e.parent)!=null?t:null}get pdfViewer(){return this.child.pdfViewer}get dom(){return this.child.pdfViewer.dom}get doc(){return this.child.containerEl.doc}get obsidian(){return _g}get text(){var t;let e=(t=this.doc.getSelection())==null?void 0:t.toString();return e?this.lib.toSingleLine(e):""}get selection(){return this.text}get page(){var t,i,r,o;let e=this.doc.getSelection();return(o=(r=e&&((t=this.lib.copyLink.getPageAndTextRangeFromSelection(e))==null?void 0:t.page))!=null?r:(i=this.pdfViewer.pdfViewer)==null?void 0:i.currentPageNumber)!=null?o:null}get pageLabel(){let e=this.page;return e!==null?this.child.getPage(e).pageLabel:null}get pageCount(){var e,t;return(t=(e=this.pdfViewer.pdfViewer)==null?void 0:e.pagesCount)!=null?t:null}get color(){var e,t,i;return(i=(t=(e=this.child.palette)==null?void 0:e.getColorName())==null?void 0:t.toLowerCase())!=null?i:null}evaluateTemplate(e,t,i){if(!this.file||typeof this.page!="number")return"";let r=this.lib.copyLink.getPageAndTextRangeFromSelection(this.doc.getSelection());if(!r)return"";let{page:o,selection:s}=r;if(!s)return"";let a=Gc({page:o,selection:`${s.beginIndex},${s.beginOffset},${s.endIndex},${s.endOffset}`,color:i?i.toLowerCase():void 0});return this.lib.copyLink.getTextToCopy(this.child,e,t,this.file,this.page,a,this.text,i?i.toLowerCase():"")}writeFile(e,t,i){var r;return this.lib.write(_g.normalizePath(e),t,(r=i==null?void 0:i.existOk)!=null?r:!1)}async run(e){return Eg("const app=this.app;const api = this;"+e,this)}};var Ww=require("obsidian");var fC=n=>It(n,n.target)&&ng(n.target),zu=class n extends Ww.Scope{constructor(t){super(t);this.modeToKeymaps={};this.currentMode=null;this.currentKeys="";this.searchFrom=0;this.searchTo=-1;this.onEscapeCallbacks=[];this.escapeAliases=[];this.typableModes=[]}registerKeymaps(t,i){let r=(o,s)=>ts(o.keys,s.keys);for(let o of t){if(!this.modeToKeymaps.hasOwnProperty(o)){this.modeToKeymaps[o]=Object.entries(i).map(([s,a])=>({keys:s,func:a})).sort(r);continue}for(let s in i){let a=i[s],c={keys:s,func:a},l=this.modeToKeymaps[o],{found:d,index:h}=hn(l,u=>r(c,u));d?l[h]=c:l.splice(h,0,c)}}}unregisterAllKeymaps(t){for(let i of t)this.modeToKeymaps[i]&&(this.modeToKeymaps[i].length=0)}map(t,i){for(let r of t){let o=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,c=>{let{found:l,index:d}=hn(this.modeToKeymaps[r],h=>ts(a,h.keys));if(l){let h=this.modeToKeymaps[r][d].func;return h(c)}}]));this.registerKeymaps([r],o)}}noremap(t,i){for(let r of t)if(this.modeToKeymaps.hasOwnProperty(r))for(let o in i){let s=i[o],{found:a,index:c}=hn(this.modeToKeymaps[r],l=>ts(s,l.keys));if(a){let l=this.modeToKeymaps[r][c];this.registerKeymaps([r],{[o]:l.func})}}}unmap(t,i){for(let r of t)if(this.modeToKeymaps.hasOwnProperty(r))for(let o of i){let{found:s,index:a}=hn(this.modeToKeymaps[r],c=>ts(o,c.keys));s&&this.modeToKeymaps[r].splice(a,1)}}setMode(t){this.currentMode=t,this.reset()}clearKeys(){this.currentKeys=""}reset(){this.clearKeys(),this.searchFrom=0,this.searchTo=-1}onEscape(t){this.onEscapeCallbacks.push(t)}addEscapeAliases(...t){this.escapeAliases.push(...t)}setTypable(...t){this.typableModes.push(...t)}handleKey(t,i){let r=!0;(()=>{if(this.currentMode===null)return this.reset();if(this.typableModes.includes(this.currentMode)!==fC(t))return;let o=n.canonicalizeKey(i);if(o===null)return this.reset();if(o===""||this.escapeAliases.includes(o))return this.onEscapeCallbacks.forEach(h=>h(o==="")),this.reset();this.currentKeys+=o;let s=this.currentKeys.match(/^([1-9]\d*)?([\D0][\d\D]*)?/);if(!s)return this.reset();let a=s[1]?+s[1]:void 0,c=s[2];if(!c)return;let l=this.modeToKeymaps[this.currentMode];if(!l||l.length===0)return this.reset();let d=kg(l,c,h=>h.keys,{from:(l.length+this.searchFrom)%l.length,to:(l.length+this.searchTo)%l.length});if(!d)return this.reset();if(d.from===d.to){let h=l[d.from];if(h.keys===c){this.reset(),h.func(a),t.preventDefault(),r=!1;return}}this.searchFrom=d.from,this.searchTo=d.to})(),r&&this.parent&&this.parent.handleKey(t,i)}static canonicalizeKey(t){var r;if(t.modifiers===null||t.key===null)return null;let i=n.canonicalizeSpecialKey(t.key);switch(t.modifiers){case"":return i?`<${i}>`:t.key;case"Shift":return t.key.length===1&&t.key!==" "?t.key:``;case"Ctrl":return``;case"Alt":return``;case"Meta":return``;default:return null}}static canonicalizeSpecialKey(t){switch(t){case"<":return"lt";case"Backspace":return"BS";case"Tab":return"Tab";case"Enter":return"CR";case"Escape":return"Esc";case" ":return"Space";case"\\":return"Bslash";case"|":return"Bar";case"ArrowUp":return"Up";case"ArrowDown":return"Down";case"ArrowLeft":return"Left";case"ArrowRight":return"Right";default:return null}}};var Uu=class{constructor(e){this.lastScroll=0;this.lastScrollInterval=0;this.vim=e}get settings(){return this.vim.settings}get viewerContainerEl(){var e,t;return(t=(e=this.vim.obsidianViewer)==null?void 0:e.dom)==null?void 0:t.viewerContainerEl}getPageDiv(e=0){var i;let t=this.vim.pdfViewer;if(t)return(i=t._pages[t.currentPageNumber-1+e])==null?void 0:i.div}scrollTo(e,t){let i=this.viewerContainerEl;if(!i)return;let r=this.isFirstScrollInAWhile(),o=r?this.settings.vimScrollSize:this.settings.vimContinuousScrollSpeed*this.lastScrollInterval;this.vim.pdfViewer&&this.settings.vimLargerScrollSizeWhenZoomIn&&(o*=Math.max(1,this.vim.pdfViewer.currentScale)),t!=null||(t=1),o*=t;let a={behavior:this.settings.vimSmoothScroll&&r?"smooth":"instant"};switch(e){case"left":a.left=-o;break;case"right":a.left=o;break;case"up":a.top=-o;break;case"down":a.top=o;break}i.scrollBy(a)}isFirstScrollInAWhile(){let e=Date.now();return this.lastScrollInterval=e-this.lastScroll,this.lastScroll=e,this.lastScrollInterval>100}scrollToTop(){if(!this.viewerContainerEl)return;let e=this.getPageDiv();e&&this.viewerContainerEl.scrollTo({top:e.offsetTop,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollToBottom(){if(!this.viewerContainerEl)return;let e=this.getPageDiv();e&&this.viewerContainerEl.scrollTo({top:e.offsetTop+e.offsetHeight-this.viewerContainerEl.clientHeight,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollVerticallyByVisualPage(e){if(!this.viewerContainerEl)return;let t=this.viewerContainerEl.clientHeight;t*=e,this.viewerContainerEl.scrollBy({top:t,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}scrollHorizontallyByVisualPage(e){if(!this.viewerContainerEl)return;let t=this.viewerContainerEl.clientWidth;t*=e,this.viewerContainerEl.scrollBy({left:t,behavior:this.settings.vimSmoothScroll?"smooth":"instant"})}};var Gw=require("obsidian");var Kw=200,qu=class{constructor(e){this.isActive=!1;this.isForward=!0;this.vim=e}get settings(){return this.vim.settings}get lib(){return this.vim.lib}get incsearch(){return this.settings.vimIncsearch}get hlsearch(){return this.settings.vimHlsearch}get findBar(){var e;return(e=this.vim.obsidianViewer)==null?void 0:e.findBar}findNext(e=1,t=!0){if(this.isActive&&this.findBar){for(this.vim.visualMode.rememberSelection();e-- >0;)this.findBar.dispatchEvent("again",t?!this.isForward:this.isForward);this.restoreSelectionAndExtendToMatch()}}findPrevious(e){this.findNext(e,!1)}restoreSelectionAndExtendToMatch(){setTimeout(()=>{let e=this.vim.doc.getSelection();if((!e||e.isCollapsed)&&this.vim.visualMode.restorePreviousSelection(),e=this.vim.doc.getSelection(),e&&!e.isCollapsed){let t=this.getSelectedMatchEl();t&&this.vim.visualMode.extendSelectionToNode(t)}},Kw)}start(e){let t=this.findBar;if(!t)return;if(this.vim.visualMode.rememberSelection(),t.opened){t.searchComponent.inputEl.select();return}this.isActive=!0,this.isForward=e,t.searchSettings.highlightAll=this.hlsearch,this.lib.updateSearchSettingsUI(t);let i=t.searchComponent.changeCallback;this.incsearch?t.searchComponent.onChange((0,Gw.debounce)(()=>{t.dispatchEvent("again")},250,!0)):t.searchComponent.onChange(()=>{}),t.showSearch();let r=o=>{this.isActive&&(o.isComposing||o.key==="Enter"&&(It(o,o.target)&&o.target.blur(),o.stopPropagation(),this.incsearch?this.restoreSelectionAndExtendToMatch():this.findNext()))};t.searchComponent.inputEl.addEventListener("keypress",r,!0),this.lib.registerPDFEvent("findbarclose",t.eventBus,null,()=>{this.isActive=!1,t.searchComponent.inputEl.removeEventListener("keypress",r,!0),i&&t.searchComponent.onChange(i)})}findAndSelectNextMatch(e,t){this.findNext(e,t),setTimeout(()=>{let i=this.vim.doc.getSelection();if(!i)return;let r=this.getSelectedMatchEl();r&&(i.isCollapsed?i.selectAllChildren(r):this.vim.visualMode.extendSelectionToNode(r,1))},Kw+1)}getSelectedMatchEl(){var i,r;let e=(r=(i=this.vim.obsidianViewer)==null?void 0:i.dom)==null?void 0:r.viewerEl;return e?e.querySelector(".textLayer .textLayerNode > .highlight.selected"):null}};var gn=class extends ke{get vimScope(){return this.vim.vimScope}get doc(){return this.vim.doc}get viewer(){return this.vim.viewer}get obsidianViewer(){return this.vim.obsidianViewer}get pdfViewer(){return this.vim.pdfViewer}constructor(e){super(e.plugin),this.vim=e}};var ju=class extends gn{constructor(t){super(t);this.selectionChangedByVisualMotion=!1;this.previousSelection=null;this.defineKeymaps()}get structureParser(){return this.vim.structureParser}onload(){this.registerDomEvent(this.doc,"selectionchange",()=>{let t=this.doc.getSelection();switch(this.vim.vimScope.currentMode){case"visual":(!t||t.isCollapsed)&&(this.selectionChangedByVisualMotion||this.vim.vimScope.setMode("normal"));break;default:if(t&&!t.isCollapsed&&t.rangeCount>0){let i=t.getRangeAt(0);this.vim.viewer.containerEl.contains(i.commonAncestorContainer)&&this.vim.vimScope.setMode("visual")}}this.selectionChangedByVisualMotion=!1})}defineKeymaps(){let t=i=>r=>(i(r),this.selectionChangedByVisualMotion=!0);this.vimScope.registerKeymaps(["visual"],{...this.settings.vimVisualMotion?{j:t(i=>this.extendSelectionByLine(i!=null?i:1)),k:t(i=>this.extendSelectionByLine(-(i!=null?i:1))),h:t(i=>this.extendSelectionByChar(i!=null?i:1,!1)),l:t(i=>this.extendSelectionByChar(i!=null?i:1,!0)),w:t(i=>{let r=this.doc.getSelection();r&&(is(()=>{r.modify("extend","forward","word"),r.modify("extend","forward","word"),r.modify("extend","backward","word"),un(r)&&r.modify("extend","forward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!1))}),e:t(i=>{let r=this.doc.getSelection();r&&(is(()=>{un(r)||r.modify("extend","forward","character"),r.modify("extend","forward","word"),un(r)||r.modify("extend","backward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!1))}),b:t(i=>{let r=this.doc.getSelection();r&&(is(()=>{un(r)&&r.modify("extend","backward","character"),r.modify("extend","backward","word"),un(r)&&r.modify("extend","forward","character")},i),this.ensureSelectionHeadAtTextDiv(r,!0))}),0:t(()=>this.extendSelctionToLineBoundary(!1)),"^":t(()=>this.extendSelctionToLineBoundary(!1)),$:t(()=>this.extendSelctionToLineBoundary(!0))}:{},o:t(()=>{let i=this.doc.getSelection();i&&Kc(i)}),y:()=>{let i=this.doc.getSelection();if(i){let r=i.toString();r&&(this.settings.copyAsSingleLine&&(r=this.lib.toSingleLine(r)),navigator.clipboard.writeText(r)),i.empty()}},c:()=>{var i;this.lib.commands.copyLink(!1),(i=this.doc.getSelection())==null||i.empty()},C:()=>{let i=this.doc.getSelection();i&&setTimeout(()=>{this.viewer.then(r=>{Ru(this.plugin,r,i)})})}})}getTextDivContainingNode(t){let i=t.instanceOf(Element)?t:t.parentElement;if(!i)return null;let r=i.closest(".textLayerNode");return r||null}getTextDivAtSelectionHead(t){let{focusNode:i}=t;return i?this.getTextDivContainingNode(i):null}getSelectionPos(t,i){let r=i==="head",o=r?t.focusNode:t.anchorNode;if(!o)return null;let s=this.getTextDivContainingNode(o);if(!s||s.dataset.idx===void 0)return null;let a=+s.dataset.idx,c=(()=>{let d=r?t.focusOffset:t.anchorOffset,h=this.doc.createNodeIterator(s,NodeFilter.SHOW_ALL),u,p=0;for(;u=h.nextNode();){if(u===o)return p+=u.nodeType===Node.TEXT_NODE?d:Array.from(o.childNodes).slice(0,d).map(f=>f.textContent.length).reduce((f,m)=>f+m,0),p;u.nodeType===Node.TEXT_NODE&&(p+=u.textContent.length)}return p})();if(typeof c!="number")return null;un(t)===r&&c--;let l=d=>d.instanceOf(HTMLElement)&&d.hasClass("textLayerNode")&&!!d.textContent;if(c<0){let d=s.previousSibling;for(;d&&!l(d);)d=d.previousSibling;d&&l(d)&&d.dataset.idx!==void 0&&(a=+d.dataset.idx,c=d.textContent.length-1)}else if(s.textContent&&c>=s.textContent.length){let d=s.nextSibling;for(;d&&!l(d);)d=d.nextSibling;d&&l(d)&&d.dataset.idx!==void 0&&(a=+d.dataset.idx,c=0)}return{index:a-this.plugin.textDivFirstIdx,offset:c}}extendSelection(t){var l,d,h;let i=this.doc.getSelection();if(!i)return;let r=this.lib.getPageElFromSelection(i);if(!r||r.dataset.pageNumber===void 0)return;let o=+r.dataset.pageNumber,s=(l=this.structureParser)==null?void 0:l.getPageParser(o);if(!s)return;let a=this.getSelectionPos(i,"head");if(!a)return;let c=t({currentHeadPos:a,pageNumber:o,pageParser:s});if(c){let u=s.divs[c.index],p=c.offset;p<0&&(p+=(h=(d=u.textContent)==null?void 0:d.length)!=null?h:0);let f=Wn(u,p);if(!f)return;this.extendSelectionToNode(f.node,f.offset)}}extendSelectionToNode(t,i){let r=this.doc.getSelection();r&&(r.extend(t,i),un(r)&&r.modify("extend","forward","character"))}extendSelectionByLine(t){this.extendSelection(({currentHeadPos:i,pageParser:r})=>r.getLineShiftPosition(i,t))}extendSelctionToLineBoundary(t){this.extendSelection(({currentHeadPos:i,pageParser:r})=>{let o=r.getBoundIndicesOfLine(i.index,0);return o?t?{index:o.end,offset:-1}:{index:o.start,offset:0}:null})}extendSelectionByChar(t,i){let r=this.doc.getSelection();r&&(is(()=>r.modify("extend",i?"forward":"backward","character"),t),this.ensureSelectionHeadAtTextDiv(r,i))}selectMatch(){var i;let t=this.vim.search.getSelectedMatchEl();t&&((i=this.vim.doc.getSelection())==null||i.selectAllChildren(t))}ensureSelectionHeadAtTextDiv(t,i){let r=this.getTextDivAtSelectionHead(t);for(;!r;)t.modify("extend",i?"forward":"backward","character"),r=this.getTextDivAtSelectionHead(t)}setSelectionByPos(t,i){let r=this.doc.getSelection();if(!r)return;let o=c=>{var m;let{page:l,pos:d}=c,h=(m=this.vim.child)==null?void 0:m.getPage(l).textLayer;if(!h)return;let u=Dt(h);if(!u)return;let p=u.textDivs;if(!p||!p.length)return;let f=p[d.index];return Wn(f,d.offset)},s=o(t),a=o(i);if(s&&a){r.setBaseAndExtent(s.node,s.offset,a.node,a.offset);let c=un(r);c||Kc(r),r.modify("extend","forward","character"),c||Kc(r)}}rememberSelection(){var i,r;let t=this.doc.getSelection();if(t&&!t.isCollapsed&&t.anchorNode&&t.focusNode){let o=(i=this.lib.getPageElAssociatedWithNode(t.anchorNode))==null?void 0:i.dataset.pageNumber,s=(r=this.lib.getPageElAssociatedWithNode(t.focusNode))==null?void 0:r.dataset.pageNumber;if(o&&s){let a=this.getSelectionPos(t,"anchor"),c=this.getSelectionPos(t,"head");a&&c&&(this.previousSelection={anchor:{page:+o,pos:a},head:{page:+s,pos:c}})}}}restorePreviousSelection(){if(this.vim.doc.getSelection()&&this.vim.visualMode.previousSelection){let{anchor:i,head:r}=this.vim.visualMode.previousSelection;this.setSelectionByPos(i,r)}}forgetPreviousSelection(){this.previousSelection=null}};var Wu=class extends gn{constructor(e){super(e),this.defineKeymaps()}onload(){this.viewer.then(e=>{this.lib.registerPDFEvent("sidebarviewchanged",e.pdfViewer.eventBus,this,({view:t})=>{t===2?this.vim.enterOutlineMode():this.vim.enterNormalMode()}),this.lib.registerPDFEvent("outlineloaded",e.pdfViewer.eventBus,this,({source:t})=>{e.pdfViewer.pdfSidebar.active===2?this.vim.enterOutlineMode():this.vim.enterNormalMode()})})}defineKeymaps(){this.registerOutlineKeymaps({j:(e,t)=>this.navigateOutline(e,!0,t),k:(e,t)=>this.navigateOutline(e,!1,t),h:e=>{let t=e.highlighted;t&&t.parent&&(this.changeActiveItemTo(t.parent),this.collapse(t.parent))},l:e=>{let t=e.highlighted;if(t){this.expand(t);let i=t.children[0];i&&this.changeActiveItemTo(i)}},H:e=>{let t=e.highlighted;if(e.allItems.forEach(i=>{this.collapse(i)}),t){let i=t;for(;i.parent;)i=i.parent;this.changeActiveItemTo(i)}},L:e=>{e.allItems.forEach(t=>{this.expand(t)})},"":e=>{let t=e.highlighted;t&&t.selfEl.click()}}),this.vimScope.noremap(["outline"],{"":"","":"j","":"k","":"h","":"l","":"H","":"L"})}registerOutlineKeymaps(e){let t={};for(let i in e)t[i]=this.toVimCommand(e[i]);this.vimScope.registerKeymaps(["outline"],t)}toVimCommand(e){return t=>{var r;let i=(r=this.obsidianViewer)==null?void 0:r.pdfOutlineViewer;i&&e(i,t)}}changeActiveItemTo(e){var i;let t=e.owner;(i=t.highlighted)==null||i.setActive(!1),e.setActive(!0),t.highlighted=e,e.selfEl.scrollIntoView({block:"center",behavior:this.settings.vimSmoothOutlineMode?"smooth":"instant"})}collapse(e){e.setCollapsed(!0,this.settings.vimSmoothOutlineMode)}expand(e){e.setCollapsed(!1,this.settings.vimSmoothOutlineMode)}navigateOutline(e,t,i){let r=e.highlighted;if(r){let o=(()=>{i!=null||(i=1);let s=1/0,a=e.children.slice().reverse(),c=[];for(;a.length;){let l=a.pop();if(c.push(l),l===r&&(s=c.length-1+(t?i:-i)),c.length>s)return c[s];!l.children.length||l.collapsed||a.push(...l.children.slice().reverse())}})();o&&this.changeActiveItemTo(o)}}};var rs=require("obsidian");var Jw=require("obsidian");var Yw=require("obsidian");function*Zw(n,e){let t=pC(e),i=Math.max(0,Math.ceil((n-e.length)/(e.length-1)));yield*mC(t,i,n+i)}function*pC(n){for(let e=1;;e++)yield*xC(gC(n,e),t=>t.join(""))}function*gC(n,e){let t=n.length,i=new Array(e).fill(0),r=1;for(let o of Jg(Math.pow(t,e))){yield i.map(s=>n[s]);for(let s of Jg(i.length))Xw(r,Math.pow(t,i.length-1-s))===0&&(i[s]=Xw(i[s]+1,t));r++}}function*mC(n,e,t){let i=n[Symbol.iterator]();t===void 0&&(t=e,e=0);for(let r of Jg(e))if(i.next().done)return;for(let r=e;r section.linkAnnotation:has(> a)",1:".annotationLayer > section:not(.linkAnnotation)",2:".pdf-plus-backlink-highlight-layer > .pdf-plus-backlink"},Gu=class n extends gn{constructor(){super(...arguments);this.onExitCallbacks=[];this.targets=[]}setTarget(...t){this.targets=t}getTargetSelector(){return this.targets.map(t=>Ku[t]).join(",")}enter(){if(this.targets.length===0&&this.setTarget(0),this.pdfViewer){let t=this.pdfViewer.currentPageNumber;if(this.hintPage(t),this.targets.includes(2)){let i=this.vim.eventBus;if(i){let r=()=>this.hintPage(t);i.on("textlayerrendered",r),this.onExit(()=>i.off("textlayerrendered",r))}}}}exit(){this.vimScope.unregisterAllKeymaps(["hint"]),this.onExitCallbacks.forEach(t=>t())}onExit(t){this.onExitCallbacks.push(t)}hintPage(t){if(!this.pdfViewer)return;let i=this.pdfViewer.getPageView(t-1),r=i.div;if(!r)return;let o={},s="pdf-plus-vim-hint-mode",a="pdfPlusVimHint";r.addClass(s),this.onExit(()=>r.removeClass(s));let c=this.getTargetSelector(),l=r.querySelectorAll(c),d=l.length;if(d===0){new Yw.Notice(`${this.plugin.manifest.name} (Vim mode): No hintable element found on this page`),this.exit(),this.vim.enterNormalMode();return}let h=Zw(d,this.settings.vimHintChars),u=null,p=null;l.forEach(f=>{var x;if(n.isLink(f)){let g=f.querySelector(":scope > a");if(u&&u.href===g.href&&bC(u,g))return;u=g}else u=null;if(n.isBacklinkHighlight(f)){let g=(x=f.dataset.backlinkId)!=null?x:null;if(p&&g&&p===g)return;p=g}else p=null;let m=""+h.next().value;f.dataset[a]=m,this.onExit(()=>delete f.dataset[a]),o[m]=()=>{this.openHintableEl(f,i),this.exit(),this.vim.enterNormalMode()}}),this.vimScope.unregisterAllKeymaps(["hint"]),this.vimScope.registerKeymaps(["hint"],o)}openHintableEl(t,i){var r,o;if(n.isLink(t))t.querySelector(":scope > a").click();else if(n.isNonLinkAnnot(t)){pu(t);let s=t.dataset.annotationId,a=s&&((r=i==null?void 0:i.annotationLayer)==null?void 0:r.annotationLayer.getAnnotation(s));a&&((o=this.vim.child)==null||o.renderAnnotationPopup(a))}else n.isBacklinkHighlight(t)&&pu(t)}static isLink(t){return t.matches(Ku[0])}static isNonLinkAnnot(t){return t.matches(Ku[1])}static isBacklinkHighlight(t){return t.matches(Ku[2])}},bC=(n,e)=>{let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),r=Math.min(i.height,i.width)*.5,o=r*5;return Math.abs((i.top+i.bottom)/2-(t.top+t.bottom)/2)[{id:"nextpage",func:()=>{var e;return(e=n.pdfViewer)==null?void 0:e.nextPage()}},{id:"prevpage",func:()=>{var e;return(e=n.pdfViewer)==null?void 0:e.previousPage()}},{id:"0",description:":0 - Go to the first page (same as :1)",func:()=>n.pdfViewer&&(n.pdfViewer.currentPageNumber=1)},{id:"$",description:":$ - Go to the last page.",func:()=>n.pdfViewer&&(n.pdfViewer.currentPageNumber=n.pdfViewer.pagesCount)},{id:"gotopage",pattern:/^go(to(page)?)?$/,description:":go[to[page]] - Go to the specified page. If the PDF has page labels, the argument is treated as a page label. Otherwise, it is treated as a page number.",minNargs:1,func:async e=>{if(n.pdfViewer){let t=await n.pdfViewer.pdfDocument.getPageLabels();if(t){let i=t.indexOf(e);if(i!==-1){let r=i+1;n.pdfViewer.currentPageNumber=r;return}}n.pdfViewer.currentPageNumber=+e}}},{id:"pagetop",func:()=>n.scroll.scrollToTop()},{id:"pagebottom",func:()=>n.scroll.scrollToBottom()},{id:"searchforward",pattern:/^search(f(orward)?)?$/,func:()=>setTimeout(()=>n.search.start(!0))},{id:"searchbackward",pattern:/^searchb(ackward)?$/,func:()=>setTimeout(()=>n.search.start(!1))},{id:"findnext",func:()=>n.search.findNext()},{id:"findprev",func:()=>n.search.findPrevious()},{id:"zoom",description:":zoom - Set the zoom level to percent.",minNargs:1,func:e=>n.pdfViewer&&(n.pdfViewer.currentScale=.01*+e)},{id:"zoomin",func:()=>{var e;return(e=n.obsidianViewer)==null?void 0:e.zoomIn()}},{id:"zoomout",func:()=>{var e;return(e=n.obsidianViewer)==null?void 0:e.zoomOut()}},{id:"zoomreset",func:()=>{var e;return(e=n.obsidianViewer)==null?void 0:e.zoomReset()}},{id:"rotate",func:()=>{var e;return(e=n.obsidianViewer)==null?void 0:e.rotatePages(90)}},{id:"yank",pattern:/^y(ank)?$/,func:()=>{let e=n.doc.getSelection();if(e){let t=e.toString();t&&navigator.clipboard.writeText(t),n.enterNormalMode()}}},{id:"outline",pattern:/^(outline)|(toc)$/,description:":outline or :toc - Show the outline view.",func:()=>n.lib.commands.showOutline(!1)},{id:"thumbnail",pattern:/^thumb(nail)?$/,description:":thumb[nail] - Show the thumbnails view.",func:()=>n.lib.commands.showThumbnail(!1)},{id:"closesidebar",func:()=>n.lib.commands.closeSidebar(!1)},{id:"help",pattern:/^h(elp)?$/,func:e=>{if(e&&e.startsWith(":")){let t=e.slice(1).split(" ")[0],i=n.commandLineMode.findCommand(t);if(i&&i.description){Xu.renderAsModal(n.plugin,yC(i.description));return}}n.plugin.openSettingTab().scrollToHeading("vim")}},{id:"map",minNargs:2,func:(e,...t)=>n.map(["normal","visual","outline"],e,t.join(" ")),description:Yr("map",["normal","visual","outline"])},{id:"noremap",pattern:/^no(remap)$/,minNargs:2,func:(e,...t)=>n.noremap(["normal","visual","outline"],e,t.join(" ")),description:Yr("no[remap]",["normal","visual","outline"],!0)},{id:"nmap",pattern:/^nm(ap)?$/,minNargs:2,func:(e,...t)=>n.map(["normal"],e,t.join(" ")),description:Yr("nm[ap]",["normal"])},{id:"nnoremap",pattern:/^nn(oremap)?$/,minNargs:2,func:(e,...t)=>n.noremap(["normal","visual","outline"],e,t.join(" ")),description:Yr("nn[oremap]",["normal"],!0)},{id:"vmap",pattern:/^vm(ap)?$/,minNargs:2,func:(e,...t)=>n.map(["visual"],e,t.join(" ")),description:Yr("vm[ap]",["visual"])},{id:"vnoremap",pattern:/^vn(oremap)?$/,minNargs:2,func:(e,...t)=>n.noremap(["visual"],e,t.join(" ")),description:Yr("vn[oremap]",["visual"],!0)},{id:"omap",pattern:/^om(ap)?$/,minNargs:2,func:(e,...t)=>n.map(["outline"],e,t.join(" ")),description:Yr("om[ap]",["outline"])},{id:"onoremap",pattern:/^ono(remap)?$/,minNargs:2,func:(e,...t)=>n.noremap(["outline"],e,t.join(" ")),description:Yr("ono[remap]",["outline"],!0)},{id:"unmap",pattern:/^unm(ap)?$/,minNargs:1,func:e=>n.vimScope.unmap(["normal","visual","outline"],[e]),description:":unm[ap] - Unmap in all modes."},{id:"nunmap",pattern:/^nun(map)?$/,minNargs:1,func:e=>n.vimScope.unmap(["normal"],[e]),description:":nun[map] - Unmap in normal mode."},{id:"vunmap",pattern:/^vu(nmap)?$/,minNargs:1,func:e=>n.vimScope.unmap(["visual"],[e]),description:":vu[nmap] - Unmap in visual mode."},{id:"ounmap",pattern:/^ou(nmap)?$/,minNargs:1,func:e=>n.vimScope.unmap(["outline"],[e]),description:":ou[nmap] - Unmap in outline mode."},{id:"js",pattern:/^js(command)?$/,minNargs:1,func:(...e)=>n.evalUserScript(e.join(" ")),description:`:js[command] : Execute the given javascript in a context where "this" points to a "${ns.name}" object.`},{id:"jsfile",minNargs:1,func:async(...e)=>{var r,o;let t=(0,Jw.normalizePath)(e.join(" ")),i=await n.app.vault.adapter.read((o=(r=n.app.metadataCache.getFirstLinkpathDest(t,""))==null?void 0:r.path)!=null?o:t);return await n.evalUserScript(i)},description:`:jsfile - Execute the javascript code in the file at (relative to the vault root; can be just the filename if it's unique). It can be any plain text file with arbitrary file extension. The code will be evaluated in a context where "this" points to a "${ns.name}" object.`},{id:"obcommand",description:":obcommand - Execute the Obsidian command with the specified ID. Inspired by esm's awesome Vimrc Support plugin.",minNargs:1,func:e=>n.app.commands.executeCommandById(e)},{id:"hint",description:` + :hint [ ...] - Enter hint mode and show hint marks for the specified targets in the current page. Inspired by [Tridactyl](https://github.com/tridactyl/tridactyl)'s hint mode. + + If no target is specified, the default targets (configured in PDF++ settings) will be used. + The accepted targets are: + + - \`all\`: all of the followings + - \`link\`: internal & external links + - \`annot\`: (non-link) annotations written in the file + - \`backlink\`: backlink highlighting, i.e., highlights that is not written in the file itself + `,func:(...e)=>{e.length===0&&(e=n.settings.vimHintArgs.trim().split(/\s+/)),e.includes("all")&&(e=["link","annot","backlink"]),n.hintMode.setTarget(...e.map(t=>{switch(t){case"link":return 0;case"annot":return 1;case"backlink":return 2;default:throw Error(`Unknown hint target: ${t}`)}})),setTimeout(()=>n.enterHintMode())}}],yC=(n,e=12,t=!0)=>(n=n.replace(new RegExp(`^ {${e}}`,"gm"),"").replace(/^\s*/,""),t?n.replace(/([<>])/g,"\\$1"):n),Yr=(n,e,t=!1)=>`:${n} - Map to ${t?"non-recusively ":""}in ${e.length>1?e.slice(0,-1).join(", ")+" and "+e.at(-1)+" modes":e[0]+" mode"}. If is an ex-command, it must be start with ":".`;var Zu=class extends gn{constructor(t){super(t);this.history=[];this.historyIndex=0;this.isActive=!1;this.dom=this.vim.viewer.containerEl.createDiv("pdf-plus-vim-command",i=>{this.register(()=>i.remove()),i.appendText(":"),this.inputEl=i.createEl("input",{cls:"pdf-plus-vim-command-input"},r=>{r.placeholder="type a command or page number...",r.addEventListener("focusout",()=>{setTimeout(()=>{this.isActive&&this.vim.enterNormalMode()})}),r.addEventListener("keydown",o=>{if(!o.isComposing&&o.key==="Enter"){this.submitCommand();return}if(o.key==="Escape"||o.key==="Backspace"&&!r.value){this.vim.enterNormalMode(),o.preventDefault();return}if(o.key==="ArrowUp"||o.key==="ArrowDown"){o.preventDefault(),this.navigateHistory(o.key==="ArrowDown");return}})}),i.hide()}),this.vimScope.registerKeymaps(["command"],{"":()=>this.inputEl.value="","":()=>this.inputEl.value=this.inputEl.value.replace(/\S+\s*$/,"")}),this.excmds=Qw(this.vim),this.suggest=new Qg(this).onSelect(({item:{minNargs:i}})=>setTimeout(()=>{if(!i){this.submitCommand();return}this.inputEl.value+=" "})),this.settings.vimrcPath&&this.viewer.then(i=>{let r=i.pdfViewer.eventBus;r&&r.on("pagesloaded",()=>setTimeout(()=>{if(this.plugin.vimrc===null){let o=(0,rs.normalizePath)(this.settings.vimrcPath);this.app.vault.adapter.read(o).then(s=>this.runScript(this.plugin.vimrc=s))}else this.runScript(this.plugin.vimrc)},{once:!0}))})}async executeCommand(t,i={error:["notice","console.error"],history:!0}){if(i={error:[],history:!0,...i},i.history&&(this.history.push(t),this.history.length>100&&this.history.shift(),this.historyIndex=this.history.length),t.startsWith("!")){if(!rs.Platform.isDesktopApp){this.reportError(`${this.plugin.manifest.name} (Vim mode): Shell command is not supported on mobile`,i.error);return}let{exec:a}=require("child_process"),c=process.env;return this.settings.PATH&&(c.PATH=this.settings.PATH),new Promise((l,d)=>a(t.slice(1),{env:c},(h,u,p)=>{h&&d(h),u&&(alert(u),l(u)),p&&console.warn(p)}))}if(/^[1-9]\d*$/.test(t)){let a=+t;this.pdfViewer&&(this.pdfViewer.currentPageNumber=a);return}let[r,...o]=t.split(/\s+/),s=this.findCommand(r);if(s){if(s.minNargs&&o.lengthi.pattern&&i.pattern.test(t)||i.id===t)}submitCommand(){let t=this.inputEl.value.trim();if(t){this.history[this.historyIndex]===t&&this.history.splice(this.historyIndex,1);try{this.executeCommand(t)}catch(r){new rs.Notice(`${this.plugin.manifest.name} (Vim mode): Error occurred while executing the command : ${r}`),console.error(r)}}this.vim.enterNormalMode()}runScript(t){this.parseScript(t).forEach(r=>this.executeCommand(r,{error:["console.warn"],history:!1}))}parseScript(t){return t.split(/\r?\n/).filter(i=>i.trim()&&!i.trimStart().startsWith('"')).join(` +`).replace(/\\\n/g,"").split(` +`)}enter(){this.inputEl.value="",this.dom.show(),this.inputEl.focus(),this.isActive=!0}exit(){this.isActive=!1,this.inputEl.value="",this.dom.hide()}navigateHistory(t){let i=this.inputEl;if(this.historyIndexo.key==="Escape"&&o.modifiers==="");t&&this.scope.unregister(t);let i=this.scope.keys.find(o=>o.key==="ArrowDown"&&o.modifiers===""),r=this.scope.keys.find(o=>o.key==="ArrowUp"&&o.modifiers==="");i&&(this.scope.unregister(i),this.scope.register([],"Tab",i.func)),r&&(this.scope.unregister(r),this.scope.register(["Shift"],"Tab",r.func))}getItems(){return this.commandLineMode.excmds}getItemText(e){return e.id}};var Yu=class extends ke{constructor(t,i,r){super(t);this.pages=new Map;this.pdfViewer=i,this.file=r}onload(){this.registerEvent(this.app.vault.on("modify",t=>{t===this.file&&this.pages.clear()}))}getPageParser(t){let i=this.pages.get(t);if(!i){let r=this.pdfViewer.getPageView(t-1);if(r){let o=r.textLayer,s=o&&Dt(o);if(s){let{textContentItems:a,textDivs:c}=s;i=new $g(r,a,c),this.pages.set(t,i)}}}return i}},$g=class{constructor(e,t,i){this.lineStartIndices=null;this.pageView=e,this.items=t,this.divs=i}getBoundIndicesOfLine(e,t){var a;let i=this._getIndexWithinLineStartIndicesForLineContainingItem(e),r=(a=this.lineStartIndices[i+t])!=null?a:null;if(r===null)return null;let o=this.lineStartIndices[i+1+t],s=o===void 0?this.items.length-1:o-1;for(;s>r&&!this.items[s].str.length;)s--;return{start:r,end:s}}getLineShiftPosition(e,t){let i=this.getBoundIndicesOfLine(e.index,t);if(!i)return null;let r=this._getHorizontalRangeOfChar(e);if(!r)return null;let{start:o,end:s}=i,a=o;for(;a<=s;a++){let d=this.items[a],h=this._getHorizontalRangeOfItem(d);if(Cg(r,h))break}for(a>s&&(a=s);a>o&&!this.items[a].str.length;)a--;let c=this.items[a],l=0;for(;;){let d=this._getHorizontalRangeOfChar({index:a,offset:l});if(!d)return null;if(d.from>=r.from||d.to>=r.to)return{index:a,offset:l};if(l+1e-r);return t?i:i-1}parse(){let e=this._findIndexOfFirstNonEmptyItem();if(e===-1){this.lineStartIndices=[0];return}this.lineStartIndices=[e];let t=[this.items[e]];for(let i=e+1;ithis.isItemNonEmpty(e))}isItemNonEmpty(e){let t=this._getVerticalRangeOfItem(e);return t.froms.from)),o=Math.max(...i.map(s=>s.to));return{from:r,to:o}}_getHorizontalRangeOfItem(e){return{from:e.transform[4],to:e.transform[4]+e.width}}_getHorizontalRangeOfChar(e){let t=e.index,i=e.offset,r=this.items[t];if(r.chars&&r.chars.length>=r.str.length){let p=r.chars[i];return{from:p.r[0],to:p.r[2]}}let o=this.divs[t],s=Wn(o,i);if(!s)return null;let{node:a,offset:c}=s,l=o.doc.createRange();l.setStart(a,c),l.setEnd(a,c+1);let d=l.getBoundingClientRect(),[[h],[u]]=[...xu(this.pageView,[{x:d.left,y:d.bottom},{x:d.right,y:d.top}])];return{from:h,to:u}}};var _u=class n extends ke{constructor(t,i){super(t);this._structureParser=null;this.viewer=i,this.vimScope=new zu(this.viewer.scope),this.vimScope.registerKeymaps(["normal","visual","outline"],{":":()=>this.enterCommandMode(),"":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===2?r.close():r.switchView(2,!0)}},"":()=>{if(this.obsidianViewer){let r=this.obsidianViewer.pdfSidebar;r.isOpen&&r.active===1?r.close():r.switchView(1,!0)}},f:()=>this.commandLineMode.executeCommand("hint")}),this.vimScope.registerKeymaps(["normal","visual","outline"],{j:r=>this.scroll.scrollTo("down",r),k:r=>this.scroll.scrollTo("up",r),h:r=>this.scroll.scrollTo("left",r),l:r=>this.scroll.scrollTo("right",r),J:ba(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.nextPage()}),K:ba(()=>{var r;return(r=this.pdfViewer)==null?void 0:r.previousPage()}),gg:()=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=1),G:r=>this.pdfViewer&&(this.pdfViewer.currentPageNumber=r!=null?r:this.pdfViewer.pagesCount),0:()=>this.scroll.scrollToTop(),"^":()=>this.scroll.scrollToTop(),$:()=>this.scroll.scrollToBottom(),"":r=>this.scroll.scrollVerticallyByVisualPage(r!=null?r:1),"":r=>this.scroll.scrollVerticallyByVisualPage(-(r!=null?r:1)),"":r=>this.scroll.scrollVerticallyByVisualPage(.5*(r!=null?r:1)),"":r=>this.scroll.scrollVerticallyByVisualPage(-.5*(r!=null?r:1)),"/":()=>this.search.start(!0),"?":()=>this.search.start(!1),n:r=>this.search.findNext(r),N:r=>this.search.findPrevious(r),gn:r=>this.search.findAndSelectNextMatch((r!=null?r:1)-1),gN:r=>this.search.findAndSelectNextMatch((r!=null?r:1)-1,!1),"+":ba(()=>{var r;return(r=this.obsidianViewer)==null?void 0:r.zoomIn()}),"-":ba(()=>{var r;return(r=this.obsidianViewer)==null?void 0:r.zoomOut()}),"=":r=>{var o;if(typeof r=="number"&&this.pdfViewer){this.pdfViewer.currentScaleValue=""+.01*r;return}(o=this.obsidianViewer)==null||o.zoomReset()},r:r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.rotatePages(90*(r!=null?r:1))},R:r=>{var o;return(o=this.obsidianViewer)==null?void 0:o.rotatePages(-90*(r!=null?r:1))}}),this.vimScope.noremap(["normal","visual","outline"],{H:"^",L:"$",zi:"+",zo:"-",z0:"="}),this.vimScope.setMode("normal"),this.vimScope.setTypable("command"),this.vimScope.onEscape(r=>{var o,s,a;this.enterNormalMode(),(o=this.obsidianViewer)==null||o.pdfSidebar.close(),(a=(s=this.child)==null?void 0:s.hoverPopover)==null||a.hide(),r||this.viewer.then(c=>{c.clearEphemeralUI(),c.findBar.close()})}),this.vimScope.addEscapeAliases("",""),this.scroll=new Uu(this),this.search=new qu(this),this.visualMode=this.addChild(new ju(this)),this.commandLineMode=this.addChild(new Zu(this)),this.outlineMode=this.addChild(new Wu(this)),this.hintMode=this.addChild(new Gu(this))}get child(){return this.viewer.child}get obsidianViewer(){var t;return(t=this.viewer.child)==null?void 0:t.pdfViewer}get pdfViewer(){var t,i;return(i=(t=this.viewer.child)==null?void 0:t.pdfViewer)==null?void 0:i.pdfViewer}get eventBus(){var t;return(t=this.obsidianViewer)==null?void 0:t.eventBus}get file(){var t;return(t=this.viewer.child)==null?void 0:t.file}get structureParser(){var t;return!this._structureParser&&this.pdfViewer&&((t=this.viewer.child)!=null&&t.file)&&(this._structureParser=this.addChild(new Yu(this.plugin,this.pdfViewer,this.viewer.child.file))),this._structureParser}get doc(){return this.viewer.containerEl.doc}onload(){this.lib.workspace.iteratePDFViews(t=>{t.viewer===this.viewer&&(t.scope=this.vimScope)})}onunload(){this.lib.workspace.iteratePDFViews(t=>{t.viewer===this.viewer&&(t.scope=this.viewer.scope)})}static register(t,i){t.settings.vim&&(i.vim=t.addChild(i.addChild(new n(t,i))))}enterNormalMode(){var t;this.vimScope.setMode("normal"),(t=this.doc.getSelection())==null||t.empty(),this.commandLineMode.exit(),this.hintMode.exit(),this.visualMode.forgetPreviousSelection()}enterCommandMode(){this.vimScope.setMode("command"),this.commandLineMode.enter()}enterOutlineMode(){if(this.settings.enableVimOutlineMode&&this.obsidianViewer){this.vimScope.setMode("outline");let t=this.obsidianViewer.pdfOutlineViewer;if(!t.highlighted){let i=t.children[0];i.setActive(!0),t.highlighted=i}}}enterHintMode(){this.vimScope.setMode("hint"),this.hintMode.enter()}mapOrNoremap(t,i,r,o){r.startsWith(":")?this.vimScope.registerKeymaps(t,{[i]:()=>this.commandLineMode.executeCommand(r.slice(1))}):r===""?this.vimScope.registerKeymaps(t,{[i]:()=>{}}):this.vimScope[o?"noremap":"map"](t,{[i]:r})}map(t,i,r){this.mapOrNoremap(t,i,r,!1)}noremap(t,i,r){this.mapOrNoremap(t,i,r,!0)}async evalUserScript(t){return new Promise(i=>{this.viewer.then(async r=>{let o=this.addChild(new ns(this.plugin,r));i(await o.run(t))})})}};var Sa=async(n,e)=>n.patchStatus.pdfInternals?!0:new Promise(t=>{e.then(i=>n.patchStatus.pdfInternals?t(!0):(wC(n,e),!i.toolbar||(FC(n,i),!i.pdfViewer)?t(!1):(DC(n,i.pdfViewer),PC(n),n.patchStatus.pdfInternals=!0,n.classes.PDFViewerComponent=e.constructor,n.classes.PDFViewerChild=i.constructor,vC(n),t(!0))))});function vC(n){let{lib:e}=n;e.workspace.iteratePDFViews(t=>$w(t.viewer,t.file,n.subpathWhenPatched)),e.workspace.iteratePDFEmbeds(t=>$w(t.viewer,t.file,t.subpath))}var $w=(n,e,t)=>{n.unload();let i=n.scope.keys.find(r=>r.modifiers===""&&r.key==="Escape");i&&n.scope.unregister(i),n.load(),e&&n.loadFile(e,t)},wC=(n,e)=>{n.register(nt(e.constructor.prototype,{loadFile(t){return async function(i,r){let o=await t.call(this,i,r);return this.then(s=>{var a;(!this.visualizer||this.visualizer.file!==i)&&((a=this.visualizer)==null||a.unload(),this.visualizer=this.addChild(Vu.create(n,i,s)))}),o}},onload(t){return async function(){let i=await t.call(this);return n.settings.usePageUpAndPageDown&&(this.scope.register([],"PageUp",()=>{var r,o,s;return(s=(o=(r=this.child)==null?void 0:r.pdfViewer)==null?void 0:o.pdfViewer)==null||s.previousPage(),!1}),this.scope.register([],"PageDown",()=>{var r,o,s;return(s=(o=(r=this.child)==null?void 0:r.pdfViewer)==null?void 0:o.pdfViewer)==null||s.nextPage(),!1})),_u.register(n,this),i}}}))},FC=(n,e)=>{let{app:t,lib:i}=n;n.register(nt(e.constructor.prototype,{load(o){return async function(...s){var p,f,m;this.hoverPopover=null,this.isFileExternal=!1,this.externalFileUrl=null,this.palette=null,this.rectHighlight=null,this.bib=null,this.component||(this.component=n.addChild(new ye.Component)),this.component.load();let a=await o.call(this,...s),c=(f=(p=this.pdfViewer)==null?void 0:p.dom)==null?void 0:f.viewerContainerEl;if(c){let x=!1,g=F=>{x||(x=xg(n.settings.showContextMenuOnMouseUpIf)&&ye.Keymap.isModifier(F,n.settings.showContextMenuOnMouseUpIf))};this.component.registerDomEvent(c,"pointerdown",F=>{var D;i.highlight.viewer.clearRectHighlight(this),g(F),(D=this.component)==null||D.registerDomEvent(c,"pointerup",y)});let b=c.doc,w=F=>{var I;let D=b.getSelection();if(!D||D.rangeCount===0)return;let C=D.getRangeAt(0),{endContainer:k,endOffset:E}=C;if(D.anchorNode&&D.focusNode===k&&k.instanceOf(HTMLElement)&&k.hasClass("textLayer"))for(let O=E-1;O>=0;O--){let A=k.childNodes[O];if(A.instanceOf(HTMLElement)&&A.hasClass("textLayerNode")&&A.lastChild&&A.lastChild.nodeType===Node.TEXT_NODE){let N=D.anchorNode,q=D.anchorOffset,V=A.lastChild,X=V.textContent.length;(I=b.getSelection())==null||I.setBaseAndExtent(N,q,V,X);break}}let{startContainer:B,startOffset:S}=C;if(E===0&&k.instanceOf(HTMLElement)&&k.matches(".textLayerNode[data-idx]")){if(+k.dataset.idx>0)return;let A=n.lib.getPageElAssociatedWithNode(B),N=n.lib.getPageElAssociatedWithNode(k);if(!A||!N||A===N)return;let q=Array.from(A.querySelectorAll(".textLayerNode")).at(-1);if(q){let V=b.getSelection();if(!V)return;V.setBaseAndExtent(B,S,q,q.childNodes.length);return}}},y=F=>{var D;if(g(F),n.obsidianHasTextSelectionBug&&n.settings.fixObsidianTextSelectionBug&&w(F),n.settings.autoCopy){i.commands.copyLink(!1,!1);return}n.settings.replaceContextMenu&&(n.settings.showContextMenuOnMouseUpIf==="always"||x)&&(D=F.win.getSelection())!=null&&D.toString()&&F.win.setTimeout(()=>Wg(n,this,F),80),c.removeEventListener("pointerup",y),x=!1}}let l=()=>{var x,g;try{if(this.toolbar)n.domManager.addChild(new Ca(n,this.toolbar,this));else{let w=window.setInterval(()=>{this.toolbar&&(n.domManager.addChild(new Ca(n,this.toolbar,this)),window.clearInterval(w))},100);window.setTimeout(()=>{window.clearInterval(w)},1e3)}let b=(g=(x=this.pdfViewer)==null?void 0:x.dom)==null?void 0:g.viewerContainerEl;n.settings.autoHidePDFSidebar&&b&&(this.component||(this.component=n.addChild(new ye.Component)),this.component.registerDomEvent(b,"click",()=>{this.pdfViewer.pdfSidebar.switchView(0)}))}catch(b){new ye.Notice(`${n.manifest.name}: An error occurred while mounting the color palette to the toolbar.`),console.error(b)}};if(l(),n.on("update-dom",l),!ye.Platform.isMobile&&this.pdfViewer){let x=this.pdfViewer.eventBus;x&&x.on("textlayerrendered",({source:g})=>{var w;let b=(w=g==null?void 0:g.textLayer)==null?void 0:w.div;b&&b.addEventListener("copy",r)})}let d="1.7.0",h=(m=this.findBar)==null?void 0:m.findNextButtonEl,u=h.firstElementChild;return!(0,ye.requireApiVersion)(d)&&u&&u.matches("svg.lucide-arrow-up")&&(0,ye.setIcon)(h,"lucide-arrow-down"),a}},unload(o){return function(){var s;return(s=this.component)==null||s.unload(),o.call(this)}},onResize(o){return function(){let s=this.containerEl.querySelector(".pdf-container");return s&&n.pdfViewerChildren.set(s,this),o.call(this)}},loadFile(o){return async function(s,a){var d;if(this.unloaded||!this.pdfViewer)return;this.component||(this.component=n.addChild(new ye.Component));let c=!1;if(s.stat.size<300){let h=await i.getExternalPDFUrl(s);if(h){let u=t.vault.getResourcePath(s).replace(/\?\d+$/,"");this.pdfViewer.pdfPlusRedirect={from:u,to:h},await o.call(this,s,a),this.component.register(()=>URL.revokeObjectURL(h)),c=!0,this.isFileExternal=!0,this.externalFileUrl=h,this.palette&&this.palette.paletteEl&&(this.palette.removeWriteFileToggle(),this.palette.addImportButton(this.palette.paletteEl))}}c||(this.isFileExternal=!1,this.externalFileUrl=null,await o.call(this,s,a));let l=this.containerEl.querySelector(".pdf-container");l&&n.pdfViewerChildren.set(l,this),(d=this.bib)==null||d.unload(),this.bib=this.component.addChild(new pn(n,this)),i.registerPDFEvent("annotationlayerrendered",this.pdfViewer.eventBus,this.component,h=>{var p,f;let{source:u}=h;(f=(p=u.annotationLayer)==null?void 0:p.div)==null||f.querySelectorAll("section[data-annotation-id]").forEach(m=>{var b,w;let x=m.dataset.annotationId;if(!x)return;let g=(b=u.annotationLayer)==null?void 0:b.annotationLayer.getAnnotation(x);g&&g.container.dataset.pdfPlusIsAnnotationPostProcessed!=="true"&&(g.data.subtype==="Link"&&typeof g.container.dataset.internalLink=="string"?Xn.registerEvents(n,this,g):g.data.subtype==="Link"&&g.data.url&&Gr.registerEvents(n,this,g),(n.settings.hideReplyAnnotation&&g.data.inReplyTo&&g.data.replyType==="R"||g.data.subtype==="Stamp"&&n.settings.hideStampAnnotation)&&g.container.hide(),!ye.Platform.isPhone&&n.settings.showAnnotationPopupOnHover&&((w=g.data.contentsObj)!=null&&w.str)&&jc({parentEl:g.container,createChildEl:()=>(this.destroyAnnotationPopup(),this.renderAnnotationPopup(g),this.activeAnnotationPopupEl),removeChildEl:()=>{var y;((y=this.activeAnnotationPopupEl)==null?void 0:y.dataset.annotationId)===g.data.id&&this.destroyAnnotationPopup()},component:this.component}),g.container.dataset.pdfPlusIsAnnotationPostProcessed="true")})}),i.registerPDFEvent("outlineloaded",this.pdfViewer.eventBus,null,async h=>{let u=h.source;if(!n.patchStatus.pdfOutlineViewer){let f=e1(n,u);n.patchStatus.pdfOutlineViewer=f}if(!h.outlineCount)return;let p=this.file;p&&(n.settings.outlineDrag&&await Uw(n,u,this,p),u.allItems.forEach(f=>Zn.registerEvents(n,this,f)),n.settings.outlineContextMenu&&n.registerDomEvent(u.childrenEl,"contextmenu",f=>{f.target===f.currentTarget&&Hw(n,this,p,f)}))}),i.registerPDFEvent("thumbnailrendered",this.pdfViewer.eventBus,null,()=>{let h=this.file;h&&(n.settings.thumbnailDrag&&qw(n,this,h),Yn.registerEvents(n,this))}),n.settings.noSpreadModeInEmbed&&!Kn(this.pdfViewer)&&i.registerPDFEvent("pagerendered",this.pdfViewer.eventBus,null,()=>{this.pdfViewer.eventBus.dispatch("switchspreadmode",{mode:0})}),es(this.pdfViewer)&&i.registerPDFEvent("documentinit",this.pdfViewer.eventBus,null,()=>{this.pdfViewer.eventBus.dispatch("scalechanged",{source:this.toolbar,value:"page-width"})}),i.registerPDFEvent("sidebarviewchanged",this.pdfViewer.eventBus,null,h=>{let{source:u}=h;n.settings.noSidebarInEmbed&&!Kn(this.pdfViewer)&&u.close(),n.settings.defaultSidebarView===2&&u.haveOutline&&u.switchView(2)}),Kn(this.pdfViewer)&&i.registerPDFEvent("pagechanging",this.pdfViewer.eventBus,this.component,(0,ye.debounce)(({pageNumber:h})=>{if(n.settings.viewSyncFollowPageNumber){let u=i.workspace.getActivePDFView();if(u&&u.viewer.child===this){let p={state:{file:this.file.path,page:h}};t.workspace.trigger("view-sync:state-change",u,p)}}},n.settings.viewSyncPageDebounceInterval*1e3)),this.pdfViewer.dom&&this.component&&(this.component.registerDomEvent(this.pdfViewer.dom.viewerEl,"dblclick",lg),this.component.registerDomEvent(this.pdfViewer.dom.viewerEl,"click",cg))}},applySubpath(o){return function(s){let a=l=>{if(!l)return null;let d=parseInt(l);return Number.isNaN(d)?null:d},c=l=>{if(!l)return null;let d=parseFloat(l);return Number.isNaN(d)?null:d};if(s){s=s.startsWith("#")?s.substring(1):s;let l=this.pdfViewer,d=new URLSearchParams(s);if(d.has("search")&&this.findBar){let f=d.get("search"),m={};n.settings.searchLinkHighlightAll!=="default"&&(m.highlightAll=n.settings.searchLinkHighlightAll==="true"),n.settings.searchLinkCaseSensitive!=="default"&&(m.caseSensitive=n.settings.searchLinkCaseSensitive==="true"),n.settings.searchLinkMatchDiacritics!=="default"&&(m.matchDiacritics=n.settings.searchLinkMatchDiacritics==="true"),n.settings.searchLinkEntireWord!=="default"&&(m.entireWord=n.settings.searchLinkEntireWord==="true");let x=g=>{let b=hg(g);if(d.has(b)){let w=d.get(b);(w==="true"||w==="false")&&(m[g]=w==="true")}};x("highlightAll"),x("caseSensitive"),x("matchDiacritics"),x("entireWord"),setTimeout(()=>i.search(this.findBar,f,m));return}let{dest:h,highlight:u}=(f=>{var b,w,y;if(!d.has("page"))return{dest:f,highlight:null};let m=(b=a(d.get("page")))!=null?b:1,x=null;if(n.settings.zoomToFitRect&&d.has("rect")){let F=d.get("rect").split(",").map(c);F.length===4&&F.every(D=>D!==null)&&(x=[m-1,{name:"FitR"},...F])}if(!x)if(d.has("offset")){let F=d.get("offset").split(","),D=c(F[0]),C=c(F[1]),k=c(F[2]);x=k===null?[m-1,{name:"FitBH"},C]:[m-1,{name:"XYZ"},D,C,k]}else if(!this.opts.isEmbed&&n.settings.dontFitWidthWhenOpenPDFLink){let F=(w=this.pdfViewer)==null?void 0:w.pdfViewer,D=F==null?void 0:F._location;n.settings.preserveCurrentLeftOffsetWhenOpenPDFLink?x=[m-1,{name:"XYZ"},(y=D==null?void 0:D.left)!=null?y:null,null,null]:x=[m-1,{name:"XYZ"},null,null,null]}else x=[m-1,{name:"FitBH"},null];let g=null;if(d.has("annotation"))g={type:"annotation",page:m,id:d.get("annotation")};else if(d.has("selection")){let F=d.get("selection").split(",").map(a),[D,C,k,E]=F;D!==null&&C!==null&&k!==null&&E!==null&&(g={type:"text",page:m,range:[[D,C],[k,E]]})}else if(d.has("rect")){let F=d.get("rect").split(",").map(c);F.length===4&&F.every(D=>D!==null)&&(g={type:"rect",page:m,rect:F})}return{dest:JSON.stringify(x),highlight:g}})(s),p=l.pdfLoadingTask;p?p.promise.then(()=>l.applySubpath(h)):l.subpath=h,this.subpathHighlight=u}}},getMarkdownLink(o){return function(s,a,c){if(!this.file)return o.call(this,s,a,c);let l=i.generateMarkdownLink(this.file,"",s,a);return c?l:l.slice(1)}},...ye.apiVersion==="1.8.0"?{getTextSelectionRangeStr(){return function(o){let s=o.win.getSelection(),a=s&&s.rangeCount>0?s.getRangeAt(0):null,c=a&&i.copyLink.getTextSelectionRange(o,a);if(c){let{beginIndex:l,beginOffset:d,endIndex:h,endOffset:u}=c;return`${l},${d},${h},${u}`}return null}}}:{},getPageLinkAlias(o){return function(s){var a,c;if(this.file){let l=i.copyLink.getDisplayText(this,void 0,this.file,s,i.toSingleLine((c=(a=activeWindow.getSelection())==null?void 0:a.toString())!=null?c:""));if(l)return l}return o.call(this,s)}},highlightText(o){return function(s,a){var u,p,f;let l=this.getPage(s).textLayer,d=l&&Dt(l),h=null;if(d){let m=d.textDivs,x=a[0][0];if(h=m[x],n.settings.trimSelectionEmbed&&this.pdfViewer.isEmbed&&this.pdfViewer.dom&&!(n.settings.ignoreHeightParamInPopoverPreview&&((u=this.pdfViewer.dom.containerEl.parentElement)!=null&&u.matches(".hover-popover")))){let g=a[1][0],b=m[g];h&&b&&setTimeout(()=>{let w=this.pdfViewer.dom.viewerContainerEl.getBoundingClientRect(),y=h.getBoundingClientRect(),D=b.getBoundingClientRect().bottom-y.top+2*Math.abs(y.top-w.top);this.pdfViewer.setHeight(D)},100)}}n.settings.noTextHighlightsInEmbed&&this.pdfViewer.isEmbed&&!((f=(p=this.pdfViewer.dom)==null?void 0:p.containerEl.parentElement)!=null&&f.matches(".hover-popover"))||o.call(this,s,a),h&&window.pdfjsViewer.scrollIntoView(h,{top:-n.settings.embedMargin},!0),n.trigger("highlight",{type:"selection",source:"obsidian",pageNumber:s,child:this})}},highlightAnnotation(o){return function(s,a){var d,h,u;let c=()=>{var f;return this.annotationHighlight?this.annotationHighlight:(f=this.getPage(s).annotationLayer)==null?void 0:f.div.querySelector(`[data-annotation-id="${a}"]`)};n.settings.trimSelectionEmbed&&this.pdfViewer.isEmbed&&this.pdfViewer.dom&&!(n.settings.ignoreHeightParamInPopoverPreview&&((d=this.pdfViewer.dom.containerEl.parentElement)!=null&&d.matches(".hover-popover")))&&setTimeout(()=>{let p=c();if(p){let f=this.pdfViewer.dom.viewerContainerEl.getBoundingClientRect(),m=p.getBoundingClientRect(),x=m.bottom-m.top+2*Math.abs(m.top-f.top);this.pdfViewer.setHeight(x)}},100),n.settings.noAnnotationHighlightsInEmbed&&this.pdfViewer.isEmbed&&!((u=(h=this.pdfViewer.dom)==null?void 0:h.containerEl.parentElement)!=null&&u.matches(".hover-popover"))||o.call(this,s,a);let l=c();l&&activeWindow.setTimeout(()=>{window.pdfjsViewer.scrollIntoView(l,{top:-n.settings.embedMargin},!0)}),n.trigger("highlight",{type:"annotation",source:"obsidian",pageNumber:s,child:this})}},clearTextHighlight(o){return function(){var s,a;n.settings.persistentTextHighlightsInEmbed&&((a=(s=this.pdfViewer)==null?void 0:s.isEmbed)!=null?a:this.opts.isEmbed)||o.call(this)}},clearAnnotationHighlight(o){return function(){n.settings.persistentAnnotationHighlightsInEmbed&&this.pdfViewer.isEmbed||o.call(this)}},clearEphemeralUI(o){return function(){o.call(this),i.highlight.viewer.clearRectHighlight(this)}},renderAnnotationPopup(o){return function(s,...a){var u,p;if(s.data.subtype==="Link")return;let c=o.call(this,s,...a);n.lastAnnotationPopupChild=this;let{page:l,id:d}=i.getAnnotationInfoFromAnnotationElement(s);if(n.settings.renderMarkdownInStickyNote&&this.file){let f=(u=this.activeAnnotationPopupEl)==null?void 0:u.querySelector(".popupContent");f&&(f.textContent="",i.highlight.writeFile.getAnnotationContents(this.file,l,d).then(async m=>{var x,g;m&&(f.addClass("markdown-rendered"),this.component||(this.component=n.addChild(new ye.Component)),await ye.MarkdownRenderer.render(t,m,f,"",this.component),Qo(t,f,(g=(x=this.file)==null?void 0:x.path)!=null?g:""))}))}let h=f=>{f.createDiv("pdf-plus-annotation-icon-container",m=>{let x=f==null?void 0:f.querySelector(".clickable-icon:last-child");if(x&&(x.remove(),m.createDiv("clickable-icon pdf-plus-copy-annotation-link",g=>{(0,ye.setIcon)(g,"lucide-copy"),(0,ye.setTooltip)(g,"Copy link"),g.addEventListener("click",async()=>{let b=i.getColorPaletteAssociatedWithNode(f);if(!b)return;let w=n.settings.copyCommands[b.actionIndex].template;i.copyLink.copyLinkToAnnotation(this,!1,{copyFormat:w},l,d),(0,ye.setIcon)(g,"lucide-check")})})),i.isEditable(this)&&n.settings.enableAnnotationContentEdit&&zr.isSubtypeSupported(s.data.subtype)){let g=s.data.subtype;m.createDiv("clickable-icon pdf-plus-edit-annotation",b=>{(0,ye.setIcon)(b,"lucide-pencil"),(0,ye.setTooltip)(b,"Edit"),b.addEventListener("click",async()=>{this.file&&zr.forSubtype(g,n,this.file,l,d).open()})})}i.isEditable(e)&&n.settings.enableAnnotationDeletion&&m.createDiv("clickable-icon pdf-plus-delete-annotation",g=>{(0,ye.setIcon)(g,"lucide-trash"),(0,ye.setTooltip)(g,"Delete"),g.addEventListener("click",async()=>{this.file&&new ya(n,this.file,l,d).openIfNeccessary()})})}),f.addEventListener("contextmenu",m=>{new ye.Menu().addItem(x=>{x.setTitle("Customize...").setIcon("lucide-settings").onClick(()=>{n.openSettingTab().scrollToHeading("annot")})}).showAtMouseEvent(m),m.preventDefault()})};if(ye.Platform.isPhone){let f=new MutationObserver((m,x)=>{for(let g of m)for(let b of g.addedNodes)if(b.instanceOf(HTMLElement)&&b.matches("div.modal-container.pdf-annotation-modal")){let w=b.querySelector(".popupMeta");if(w){h(w),x.disconnect();return}}});activeWindow.setTimeout(()=>f.observe(activeDocument.body,{childList:!0})),activeWindow.setTimeout(()=>f.disconnect(),1e3)}else{let f=(p=this.activeAnnotationPopupEl)==null?void 0:p.querySelector(".popupMeta");f&&h(f)}if(n.settings.annotationPopupDrag&&this.activeAnnotationPopupEl&&this.file){let f=this.activeAnnotationPopupEl,m=this.file;jw(n,f,this,m,l,d),f.addClass("pdf-plus-draggable")}return c}},destroyAnnotationPopup(o){return function(){return n.lastAnnotationPopupChild=null,o.call(this)}},onContextMenu(o){return async function(s){if(!ye.Platform.isPhone&&!(ye.Platform.isTablet&&!n.settings.showContextMenuOnTablet)){if(!n.settings.replaceContextMenu)return await o.call(this,s);Nw(n,this,s)}}},onMobileCopy(o){return function(s,a){switch(n.settings.mobileCopyAction){case"text":r(s);return;case"pdf-plus":setTimeout(()=>i.commands.copyLink(!1));return;case"obsidian":return o.call(this,s,a)}}},onThumbnailContextMenu(o){return function(s){if(!n.settings.thumbnailContextMenu)return o.call(this,s);Rw(n,this,s)}},getTextByRect(o){return function(s,a){let c="",l=s.textLayer,d=l&&Dt(l);if(d){let{textContentItems:h,textDivs:u}=d,[p,f,m,x]=a;for(let g=0;g{var c;if(!n.settings.copyAsSingleLine)return;let s=o.clipboardData;if(!s)return;let a=(c=o.target.win.getSelection())==null?void 0:c.toString();a&&(a=i.toSingleLine(a),s.setData("text/plain",a))}},DC=(n,e)=>{let t=Object.getPrototypeOf(e);n.register(nt(t,{open(i){return async function(r){if(this.pdfPlusRedirect){let{from:o,to:s}=this.pdfPlusRedirect,a=r.url;typeof a=="string"&&a.startsWith(o)&&(r.url=s)}return delete this.pdfPlusRedirect,await i.call(this,r)}},load(i){return function(r,...o){let s=this.pdfPlusCallbacksOnDocumentLoaded;if(s)for(let a of s)a(r);return delete this.pdfPlusCallbacksOnDocumentLoaded,i.call(this,r,...o)}}}))},PC=n=>{n.register(nt(window.pdfjsViewer.AppOptions,{get(e){return function(...t){let i=t[0];return["defaultZoomValue","scrollModeOnLoad","spreadModeOnLoad"].includes(i)?n.settings[i]:e.apply(this,t)}}}))};var t1=n=>{if(n.patchStatus.pdfView&&n.patchStatus.pdfInternals)return!0;let e=n.lib,t=e.getPDFView();return t&&(n.patchStatus.pdfView||(n.register(nt(t.constructor.prototype,{getState(i){return function(){var c,l,d,h,u;let r=i.call(this),s=this.viewer.child,a=(c=s==null?void 0:s.pdfViewer)==null?void 0:c.pdfViewer;return a&&(r.page=(d=(l=a._location)==null?void 0:l.pageNumber)!=null?d:a.currentPageNumber,r.left=(h=a._location)==null?void 0:h.left,r.top=(u=a._location)==null?void 0:u.top,r.zoom=a.currentScale),r}},setState(i){return function(r,o){return n.settings.alwaysRecordHistory&&(o.history=!0),i.call(this,r,o).then(()=>{var l;let a=this.viewer.child,c=(l=a==null?void 0:a.pdfViewer)==null?void 0:l.pdfViewer;typeof r.page=="number"&&c&&e.applyPDFViewStateToViewer(c,r)})}},onLoadFile(i){return async function(r){let o=this,s=o.getState(),a=e.viewStateToSubpath(s);return o.viewer.loadFile(r,a!=null?a:void 0)}}})),n.patchStatus.pdfView=!0,n.classes.PDFView=t.constructor),n.patchStatus.pdfInternals||Sa(n,t.viewer)),!1};var i1=n=>{if(n.patchStatus.pdfInternals)return!0;let{lib:e}=n,t=e.getPDFEmbed();return t&&Sa(n,t.viewer),!1};var e1=(n,e)=>(n.register(nt(e.constructor.prototype,{onItemContextMenu(t){return async function(i,r){let o=this,s=o.viewer,a=s.file;if(!n.settings.outlineContextMenu||!a)return await t.call(o,i,r);Vw(n,s,a,i,r)}}})),!0);var Ea=require("obsidian");var n1=n=>{let e=n.app,t=n.lib;n.register(nt(Ea.Workspace.prototype,{openLinkText(i){return function(r,o,s,a){var c;if((n.settings.openPDFWithDefaultApp||n.settings.singleTabForSinglePDF||n.settings.openLinkNextToExistingPDFTab||n.settings.paneTypeForFirstPDFLeaf)&&!s){let{path:l}=(0,Ea.parseLinktext)(r),d=e.metadataCache.getFirstLinkpathDest(l,o);if(d&&d.extension==="pdf"){if(Ea.Platform.isDesktopApp&&n.settings.openPDFWithDefaultApp){if(n.settings.openPDFWithDefaultAppAndObsidian&&n.settings.syncWithDefaultApp)return;let h=e.openWithDefaultApp(d.path);if(n.settings.focusObsidianAfterOpenPDFWithDefaultApp&&Zc(),!n.settings.openPDFWithDefaultAppAndObsidian)return h}if(n.settings.singleTabForSinglePDF){let{exists:h,promise:u}=t.workspace.openPDFLinkTextInExistingLeafForTargetPDF(r,o,a,d);if(h)return u}if(n.settings.openLinkNextToExistingPDFTab||n.settings.paneTypeForFirstPDFLeaf){let h=(c=t.getPDFView())==null?void 0:c.leaf;if(h){if(n.settings.openLinkNextToExistingPDFTab&&h.parentSplit){let u=e.workspace.createLeafInParent(h.parentSplit,-1);return t.workspace.openPDFLinkTextInLeaf(u,r,o,a)}}else if(n.settings.paneTypeForFirstPDFLeaf){let u=t.workspace.getLeaf(n.settings.paneTypeForFirstPDFLeaf);return t.workspace.openPDFLinkTextInLeaf(u,r,o,a)}}}}return i.call(this,r,o,s,a)}}})),n.patchStatus.workspace=!0};var r1=require("obsidian");var o1=n=>{let e=n.app,t=n.lib,i=e.internalPlugins.plugins["page-preview"].instance;return n.register(nt(i,{onLinkHover(r){return function(o,s,a,c,l){let{path:d,subpath:h}=(0,r1.parseLinktext)(a),u=e.metadataCache.getFirstLinkpathDest(d,c);if((!c||c.endsWith(".pdf"))&&n.settings.hoverHighlightAction==="open"&&(l!=null&&l.isTriggeredFromBacklinkVisualizer)){t.workspace.openMarkdownLinkFromPDF(a,c,!1,{line:l.scroll});return}if((u==null?void 0:u.extension)==="pdf"&&c.endsWith(".md")){if(n.settings.hoverPDFLinkToOpen){let{exists:p}=t.workspace.openPDFLinkTextInExistingLeafForTargetPDF(a,c,void 0,u);if(p)return}if(n.settings.ignoreHeightParamInPopoverPreview&&h.contains("height=")){let p=new URLSearchParams(h.slice(1));a=d+"#"+Array.from(p.entries()).filter(([f])=>f!=="height").map(([f,m])=>`${f}=${m}`).join("&")}}r.call(this,o,s,a,c,l)}}})),n.patchStatus.pagePreview=!0,!0};var s1=require("obsidian");var Ju=class extends ke{constructor(t,i,r){super(t);this.navButtonEl=null;this.renderer=i,this.file=r,this.pageTracker=new em(t,i,r),this.isTrackingPage=t.settings.filterBacklinksByPageDefault}onload(){this.navButtonEl=this.renderer.headerDom.addNavButton("lucide-filter","Show only backlinks in the current page",()=>{this.isTrackingPage=!this.isTrackingPage,this.updatePageTracker()}),this.updatePageTracker(),this.registerDomEvent(this.renderer.backlinkDom.el,"mouseover",t=>{this.processBacklinkVisualizerDomForEvent(t,(i,r,o,s)=>{if(!this.settings.highlightOnHoverBacklinkPane||!Ci(t,i))return;for(let l of r)l.addClass("hovered-highlight");let a=null;if(o.page&&o.annotation){let l=o.page,d=o.annotation.id;s.then(h=>{var f;let u=h.getPage(l),p=(f=u.annotationLayer)==null?void 0:f.annotationLayer.getAnnotation(d);p&&(a=this.lib.highlight.viewer.placeRectInPage(p.data.rect,u),a.addClass("pdf-plus-annotation-bounding-rect"))})}if(o.page&&o.FitR){let l=o.page,{left:d,bottom:h,right:u,top:p}=o.FitR;s.then(f=>{let m=f.getPage(l);a=this.lib.highlight.viewer.placeRectInPage([d,h,u,p],m),a.addClass("rect-highlight")})}let c=l=>{if(Ci(l,i)){for(let d of r)d.removeClass("hovered-highlight");a&&a.remove(),i.removeEventListener("mouseout",c)}};i.addEventListener("mouseout",c)})})}onunload(){var t;(t=this.navButtonEl)==null||t.remove(),this.pageTracker.unload()}setParents(...t){return t.forEach(i=>i.addChild(this)),this.register(()=>t.forEach(i=>i.removeChild(this))),this}updatePageTracker(){this.navButtonEl.toggleClass("is-active",this.isTrackingPage),this.isTrackingPage?this.pageTracker.load():this.pageTracker.unload()}findBacklinkItemEl(t){var l,d;let{refCache:i,sourcePath:r}=t,o=this.renderer.backlinkDom,s=this.app.vault.getAbstractFileByPath(r);if(!(s instanceof s1.TFile))return null;let a=o.getResult(s);if(!a)return null;if(!!a.childrenEl.querySelector(".better-search-views-tree")){let h=this.app.metadataCache.getFileCache(s);if(!(h!=null&&h.sections)||!("position"in i))return null;let u=new Set;for(let[f,m]of a.result.content){let x=h.sections.find(g=>g.position.start.offset<=f&&m<=g.position.end.offset);if(x&&(u.add(x),f===i.position.start.offset&&i.position.end.offset===m))break}let p=u.size-1;return p===-1?null:(d=a==null?void 0:a.childrenEl.querySelectorAll(".search-result-file-match")[p])!=null?d:null}else{let h=a==null?void 0:a.vChildren.children;if(!h)return null;let u=h.find(p=>{if("position"in i)return p.start<=i.position.start.offset&&i.position.end.offset<=p.end;for(let f of p.matches)return"key"in f&&f.key===i.key;return!1});return(l=u==null?void 0:u.el)!=null?l:null}}processBacklinkVisualizerDomForEvent(t,i){let r=t.target;if(!It(t,r))return;let o=this.renderer.backlinkDom.vChildren.children.find(s=>s.el.contains(r));if(o){let s=o.file.path;this.lib.workspace.iteratePDFViewerComponents(a=>{if(a.visualizer){let c=a.visualizer.index.sourcePaths.get(s);for(let l of c){if(l.page===null)continue;let d=this.findBacklinkItemEl(l);if(d!=null&&d.contains(r)){let u=a.visualizer.domManager.getCacheToDomsMap(l.page).get(l);i(d,u,l,a)}}}})}}},em=class extends ke{constructor(t,i,r){super(t);this.renderer=i;this.file=r;this.matchCountObserver=new Wc(this.renderer.backlinkDom.el,()=>{if(this.updateBacklinkCountEl(o=>`${o} in this page`),this.renderer.collapseAll)for(let o of this.renderer.backlinkDom.el.querySelectorAll(".tree-item.search-result")){let s=o.querySelector(":scope>.tree-item-self.search-result-file-title>.collapse-icon");s?s.style.visibility==="hidden"&&o.remove():o.remove()}else for(let o of this.renderer.backlinkDom.el.querySelectorAll(".tree-item.search-result:not(:has( .search-result-file-match))"))o.hasClass("is-collapsed")||o.remove()},{childList:!0,subtree:!0})}async onload(){this.renderer.backlinkDom.filter=void 0;let t=this.lib.workspace.getExistingLeafForPDFFile(this.file);if(t){await this.lib.workspace.ensureViewLoaded(t);let i=t.view;this.lib.isPDFView(i)&&i.viewer.then(r=>{this.renderer.backlinkDom.filter=(o,s)=>r.pdfViewer&&r.pdfViewer.pdfViewer?this.filter(r.pdfViewer.pdfViewer.currentPageNumber,s):!0,this.updateBacklinkDom(),this.lib.registerPDFEvent("pagechanging",r.pdfViewer.eventBus,this,o=>{var a;let s=typeof o.pageNumber=="number"?o.pageNumber:(a=r.pdfViewer.pdfViewer)==null?void 0:a.currentPageNumber;s&&(this.renderer.backlinkDom.filter=(c,l)=>this.filter(s,l)),this.updateBacklinkDom()})})}this.addChild(this.matchCountObserver)}onunload(){this.renderer.backlinkDom.filter=void 0,this.updateBacklinkDom()}updateBacklinkDom(){this.renderer.recomputeBacklink(this.file)}updateBacklinkCountEl(t){var r;let i=Array.from(this.renderer.backlinkDom.el.querySelectorAll("div.search-result-file-title span.tree-item-flair")).map(o=>+o.getText()).reduce((o,s)=>o+s,0);(r=this.renderer.backlinkCountEl)==null||r.setText(t?t(i):`${i}`)}filter(t,i){let r=Dg(i.link),o=new URLSearchParams(r);return o.has("page")?!this.settings.showBacklinkToPage&&!o.has("selection")&&!o.has("annotation")&&!o.has("offset")&&!o.has("rect")?!1:+o.get("page")===t:!1}};var a1=n=>{var o;let{app:e,lib:t}=n,i=(o=e.workspace.getLeavesOfType("backlink").find(s=>t.isBacklinkView(s.view)))==null?void 0:o.view,r=i==null?void 0:i.backlink;return!i||!r?!1:(n.register(nt(Object.getPrototypeOf(i.constructor.prototype),{onLoadFile(s){return async function(a){await s.call(this,a),this.getViewType()==="backlink"&&a.extension==="pdf"&&(this.pdfManager=new Ju(n,this.backlink,a).setParents(n,this))}},onUnloadFile(s){return async function(a){let c=this;a.extension==="pdf"&&c.pdfManager&&c.pdfManager.unload(),await s.call(this,a)}}})),n.register(nt(r.backlinkDom.constructor.prototype,{addResult(s){return function(a,c,l,d){var u;let h=this;if(h.filter){let p=e.metadataCache.getFileCache(a);if(p){let f=[];for(let[x,g]of c.content){let b=wg(p,x,g);b&&h.filter(a,b)&&f.push([x,g])}c.content.length=0,c.content.push(...f);let m=[];for(let x of c.properties){let g=(u=p.frontmatterLinks)==null?void 0:u.find(b=>b.key===x.key);g&&h.filter(a,g)&&m.push(x)}c.properties.length=0,c.properties.push(...m)}}return s.call(this,a,c,l,d)}}})),t.workspace.iterateBacklinkViews(s=>{var a;((a=s.file)==null?void 0:a.extension)==="pdf"&&s.onLoadFile(s.file)}),n.patchStatus.backlink=!0,!0)};var Ta=require("obsidian");var l1=n=>{let e=n.app,t;return e.workspace.iterateAllLeaves(i=>{i.view instanceof Ta.MarkdownView&&(t=i.view.editMode.clipboardManager)}),t?(n.register(nt(t.constructor.prototype,{handleDragOver(i){return function(r){let o=e.dragManager.draggable;if(!o||o.source!=="pdf-plus")return i.call(this,r);(Ta.Platform.isMacOS?r.shiftKey:r.altKey)||(CC(r,"link"),e.dragManager.setAction("Insert link here"))}},handleDrop(i){return function(r){let o=e.dragManager.draggable;if(!o||o.source!=="pdf-plus")return i.call(this,r);if(this.info instanceof Ta.MarkdownView&&(Ta.Platform.isMacOS?r.shiftKey:r.altKey))return r.preventDefault(),this.info.handleDrop(r,o,!1),!0;let s=this.info.editor;if(!s)return!1;let a=o.getText(this.getPath()),c=s.cm.posAtCoords({x:r.clientX,y:r.clientY},!1),l=s.offsetToPos(c);return s.setCursor(l),typeof a=="string"?(s.replaceSelection(a),s.focus(),r.preventDefault(),!0):!1}}})),!0):!1},kC={none:[],copy:["copy"],copyLink:["copy","link"],copyMove:["copy","move"],link:["link"],linkMove:["link","move"],move:["move"],all:["copy","link","move"],uninitialized:[]};function CC(n,e){if(!n.dataTransfer||n.dataTransfer.effectAllowed==="none"||n.dataTransfer.effectAllowed==="uninitialized")return;if(e==="none")return n.dataTransfer.dropEffect=e;kC[n.dataTransfer.effectAllowed].contains(e)&&(n.dataTransfer.dropEffect=e)}var c1=require("obsidian");var d1=n=>{n.register(nt(c1.Menu.prototype,{showAtPosition(e){return function(...t){var i;return n.settings.hoverableDropdownMenuInToolbar&&((i=this.parentEl)!=null&&i.closest("div.pdf-toolbar"))&&this.setUseNativeMenu(!1),n.shownMenus.add(this),e.call(this,...t)}},hide(e){return function(...t){return n.shownMenus.delete(this),e.call(this,...t)}}}))};var ve=require("obsidian");var qi=require("obsidian");var Be=class{constructor(e){this.app=e.app,this.plugin=e}get lib(){return this.plugin.lib}get settings(){return this.plugin.settings}};var os=require("obsidian"),SC=Wi(require("obsidian")),sd=class{constructor(e,t){this.plugin=e;this.variables=t}setVariable(e,t){this.variables[e]=t}evalPart(e){let t=new Function(...Object.keys(this.variables),`return ${e};`)(...Object.values(this.variables));if(t===void 0)throw Error(`The expression "${e}" cannot be evaluated.`);return t}evalTemplate(e){return e.replace(/{{(.*?)}}/g,(t,i)=>this.evalPart(i))}},ad=class extends sd{constructor(e,t){var d,h,u,p,f,m;let{app:i}=e;"colorName"in t&&(t.color=t.colorName),super(e,{...t,app:i,obsidian:SC,pdf:t.file,folder:t.file.parent,selection:t.text}),this.app=i,this.lib=e.lib;let r=this.findMarkdownFileAssociatedToPDF(t.file),o=(h=r&&((d=i.metadataCache.getFileCache(r))==null?void 0:d.frontmatter))!=null?h:{};this.setVariable("md",r),this.setVariable("properties",o);let s=this.findLinkedFile(t.file),a=(p=s&&((u=i.metadataCache.getFileCache(s))==null?void 0:u.frontmatter))!=null?p:{};this.setVariable("linkedFile",s),this.setVariable("linkedFileProperties",a);let c=(f=i.plugins.plugins.dataview)==null?void 0:f.api,l=(m=i.plugins.plugins.quickadd)==null?void 0:m.api;c&&this.setVariable("dv",c),l&&this.setVariable("quickAddApi",l)}findMarkdownFileAssociatedToPDF(e){var o,s,a;let t=this.plugin.app,i=[],r=(o=t.plugins.plugins.dataview)==null?void 0:o.api;if(r)i=r.pages().where(l=>{var d;return r.array((d=l[this.plugin.settings.proxyMDProperty])!=null?d:[]).path.includes(e.path)}).map(l=>t.vault.getAbstractFileByPath(l.file.path)).filter(l=>l instanceof os.TFile);else{let c=t.metadataCache.getBacklinksForFile(e);for(let l of c.keys()){let d=t.metadataCache.getCache(l);if(d&&((s=d.frontmatterLinks)==null?void 0:s.some(u=>{if(u.key!==this.plugin.settings.proxyMDProperty&&!new RegExp(`${this.plugin.settings.proxyMDProperty}.\\d+`).test(u.key))return!1;let p=(0,os.getLinkpath)(u.link),f=t.metadataCache.getFirstLinkpathDest(p,l);return f&&f.path===e.path}))){let u=t.vault.getAbstractFileByPath(l);u instanceof os.TFile&&i.push(u)}}}if(i.length>1){let c=`Multiple markdown files are associated with this PDF file: +${i.map(l=>"- "+l.path).join(` +`)} +Aborting.`;throw Error(c)}return(a=i.first())!=null?a:null}findLinkedFile(e){let t=null,i=this.lib.workspace.getActiveGroupLeaves();if(i){for(let r of i)if(r.view instanceof os.FileView&&r.view.file&&r.view.file!==e){t=r.view.file;break}}return t}};var Qu=class extends Be{constructor(){super(...arguments);this.statusDurationMs=2e3}getPageAndTextRangeFromSelection(t){if(t=t!=null?t:activeWindow.getSelection(),!t)return null;let i=this.lib.getPageElFromSelection(t);if(!i||i.dataset.pageNumber===void 0)return null;let r=+i.dataset.pageNumber,o=t.rangeCount>0?t.getRangeAt(0):null;if(o){let s=this.getTextSelectionRange(i,o);if(s)return{page:r,selection:s}}return{page:r}}getTextSelectionRange(t,i){if(i&&!i.collapsed){let r=gu(t,i.startContainer),o=gu(t,i.endContainer);if(r&&o){let s=r.dataset.idx,a=o.dataset.idx,c=mu(r,i.startContainer,i.startOffset),l=mu(o,i.endContainer,i.endOffset);if(s!==void 0&&a!==void 0&&c!==null&&l!==null)return{beginIndex:+s-this.plugin.textDivFirstIdx,beginOffset:c,endIndex:+a-this.plugin.textDivFirstIdx,endOffset:l}}}return null}getTemplateVariables(t){var d,h,u;let i=activeWindow.getSelection();if(!i)return null;let r=this.lib.getPageElFromSelection(i);if(!r||r.dataset.pageNumber===void 0)return null;let o=this.lib.getPDFViewerChildAssociatedWithNode(r),s=o==null?void 0:o.file;if(!s)return null;let a=+r.dataset.pageNumber;i.toString()||(a=(h=(d=o.pdfViewer.pdfViewer)==null?void 0:d.currentPageNumber)!=null?h:a);let c=o.getTextSelectionRangeStr(r);if(!c)return null;let l=Gc({page:a,selection:c,...t});return{child:o,file:s,subpath:l,page:a,pageCount:o.pdfViewer.pagesCount,pageLabel:(u=o.getPage(a).pageLabel)!=null?u:""+a,text:this.lib.toSingleLine(i.toString())}}getLinkTemplateVariables(t,i,r,o,s,a,c,l){l=l!=null?l:"";let d=this.app.fileManager.generateMarkdownLink(r,l,o).slice(1),h=this.app.metadataCache.fileToLinktext(r,l)+o;this.app.vault.getConfig("useMarkdownLinks")&&(h=Vr(h));let u=this.getDisplayText(t,i,r,s,a,c),p=this.lib.generateMarkdownLink(r,l,o,u||void 0).slice(1),f=this.app.fileManager.generateMarkdownLink(r,l,`#page=${s}`).slice(1),m=this.lib.generateMarkdownLink(r,l,`#page=${s}`,u||void 0).slice(1);return{link:d,linktext:h,display:u,linkWithDisplay:p,linkToPage:f,linkToPageWithDisplay:m}}getDisplayText(t,i,r,o,s,a){var c;if(!i){let l=this.lib.getColorPaletteFromChild(t);l?i=this.settings.displayTextFormats[l.displayTextFormatIndex].template:i=this.settings.displayTextFormats[this.settings.defaultDisplayTextFormatIndex].template}try{return new ad(this.plugin,{file:r,page:o,pageCount:t.pdfViewer.pagesCount,pageLabel:(c=t.getPage(o).pageLabel)!=null?c:""+o,text:s,comment:a!=null?a:""}).evalTemplate(i).trim()}catch(l){console.error(l),new qi.Notice(`${this.plugin.manifest.name}: Display text format is invalid. Error: ${l.message}`,3e3)}}getTextToCopy(t,i,r,o,s,a,c,l,d,h){var m,x,g,b,w,y;let u=t.getPage(s);if(typeof h!="string"){let F=ga(a).get("annotation");h=typeof F=="string"&&((w=(b=(g=(x=(m=u==null?void 0:u.annotationLayer)==null?void 0:m.annotationLayer)==null?void 0:x.getAnnotation(F))==null?void 0:g.data)==null?void 0:b.contentsObj)==null?void 0:w.str),h=this.lib.toSingleLine(h||"")}return new ad(this.plugin,{file:o,page:s,pageLabel:(y=u.pageLabel)!=null?y:""+s,pageCount:t.pdfViewer.pagesCount,text:c,comment:h,colorName:l,calloutType:this.settings.calloutType,...this.lib.copyLink.getLinkTemplateVariables(t,r,o,a,s,c,h,d)}).evalTemplate(i)}async getTextToCopyForOutlineItem(t,i,r,o){return(await this.getTextToCopyForOutlineItemDynamic(t,i,r))(o)}async getTextToCopyForOutlineItemDynamic(t,i,r){let o=await r.getExplicitDestination(),s=await r.getPageNumber(),a=this.lib.normalizePDFJsDestArray(o,s),c=this.lib.destArrayToSubpath(a);return l=>this.getTextToCopy(t,this.settings.outlineLinkCopyFormat,this.settings.outlineLinkDisplayTextFormat,i,s,c,r.item.title,"",l)}getSelectionLinkInfo(){var s;let t=this.lib.getColorPaletteAssociatedWithSelection();if(!t)return null;let i=this.settings.copyCommands[t.actionIndex].template,r=(s=t.selectedColorName)!=null?s:void 0,o=t.writeFile;return{template:i,colorName:r,writeFile:o}}getAnnotationLinkInfo(){let t=this.plugin.lastAnnotationPopupChild;if(!t)return null;let i=t.activeAnnotationPopupEl;if(!i)return null;let r=i.querySelector(".popupMeta div.clickable-icon:has(svg.lucide-copy)");if(!r)return null;let o=this.lib.getColorPaletteAssociatedWithNode(r),s;o?s=this.settings.copyCommands[o.actionIndex].template:s=this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template;let a=this.lib.getAnnotationInfoFromPopupEl(i);if(!a)return null;let{page:c,id:l}=a;return{child:t,copyButtonEl:r,template:s,page:c,id:l}}copyLinkToSelection(t,i,r,o){let s=this.getTemplateVariables(r?{color:r.toLowerCase()}:{});if(s){let{child:a,file:c,subpath:l,page:d,text:h}=s;if(!h)if(this.settings.useAnotherCopyTemplateWhenNoSelection)i.copyFormat=this.settings.copyTemplateWhenNoSelection;else return!1;return t||(async()=>{var m;let u=this.getTextToCopy(a,i.copyFormat,i.displayTextFormat,c,d,l,h,(m=r==null?void 0:r.toLowerCase())!=null?m:"");await navigator.clipboard.writeText(u),this.onCopyFinish(u);let p=this.lib.getColorPaletteFromChild(a);p==null||p.setStatus("Link copied",this.statusDurationMs),this.autoFocusOrAutoPaste(u,o,p!=null?p:void 0);let f=$o(l);if(f&&"beginIndex"in f){let x=a.getPage(d).textLayer;if(x){let g=Dt(x);if(g){let{textContentItems:b}=g,w=b[f.beginIndex];if(w){let y=w.transform[4],F=w.transform[5]+w.height;typeof y=="number"&&typeof F=="number"&&(this.plugin.lastCopiedDestInfo={file:c,destArray:[d-1,"XYZ",y,F,null]})}}}}})(),!0}return!1}copyLinkToAnnotation(t,i,r,o,s,a,c){let l=t.file;if(!l)return!1;if(!i){let d=t.getPage(o);t.getAnnotatedText(d,s).then(async h=>{var y,F,D,C;let u=(C=(D=(F=(y=d.annotationLayer)==null?void 0:y.annotationLayer)==null?void 0:F.getAnnotation(s))==null?void 0:D.data)!=null?C:(await d.pdfPage.getAnnotations()).find(k=>k.id===s),p=u!=null&&u.color?`${u.color[0]}, ${u.color[1]}, ${u.color[2]}`:"",f=`#page=${o}&annotation=${s}`;if(u.subtype==="Square"){let k=u.rect;f+=`&rect=${k[0]},${k[1]},${k[2]},${k[3]}`}let m=this.getTextToCopy(t,r.copyFormat,r.displayTextFormat,l,o,f,h!=null?h:"",p);await navigator.clipboard.writeText(m),this.onCopyFinish(m);let x=this.lib.getColorPaletteFromChild(t);c&&(x==null||x.setStatus("Link copied",this.statusDurationMs)),this.autoFocusOrAutoPaste(m,a,x!=null?x:void 0);let g=u==null?void 0:u.rect,b=g==null?void 0:g[0],w=g==null?void 0:g[3];typeof b=="number"&&typeof w=="number"&&(this.plugin.lastCopiedDestInfo={file:l,destArray:[o-1,"XYZ",b,w,null]})})}return!0}copyLinkToAnnotationWithGivenTextAndFile(t,i,r,o,s,a,c,l,d){return o||(async()=>{let h=this.getTextToCopy(r,s.copyFormat,s.displayTextFormat,i,a,`#page=${a}&annotation=${c}`,t,l);await navigator.clipboard.writeText(h),this.onCopyFinish(h);let u=this.lib.getColorPaletteFromChild(r);u==null||u.setStatus("Link copied",this.statusDurationMs),this.autoFocusOrAutoPaste(h,d,u!=null?u:void 0)})(),!0}writeHighlightAnnotationToSelectionIntoFileAndCopyLink(t,i,r,o){let s=activeWindow.getSelection();if(!s)return!1;let a=this.lib.toSingleLine(s.toString());if(!a)return!1;if(!t){let c=this.lib.getColorPaletteAssociatedWithSelection();c==null||c.setStatus("Writing highlight annotation into file...",1e4),this.lib.highlight.writeFile.addTextMarkupAnnotationToSelection(this.settings.selectionBacklinkVisualizeStyle==="highlight"?"Highlight":"Underline",r).then(l=>{if(!l)return;let{child:d,file:h,page:u,annotationID:p,rects:f}=l;!p||!h||setTimeout(()=>{let m=this.lib.getColorPaletteFromChild(d);m==null||m.setStatus("Link copied",this.statusDurationMs);let{r:x,g,b}=this.plugin.domManager.getRgb(r);if(this.copyLinkToAnnotationWithGivenTextAndFile(a,h,d,!1,i,u,p,`${x}, ${g}, ${b}`,o),f){let w=Math.min(...f.map(F=>F[0])),y=Math.max(...f.map(F=>F[3]));typeof w=="number"&&typeof y=="number"&&(this.plugin.lastCopiedDestInfo={file:h,destArray:[u-1,"XYZ",w,y,null]})}},300)})}return!0}copyEmbedLinkToRect(t,i,r,o,s,a,c){if(a||(a=this.settings.autoPaste),!i.file)return!1;let l=i.file,d=this.lib.getColorPaletteFromChild(i);if(o.some(h=>isNaN(h)))return d==null||d.setStatus("Invalid selection",this.statusDurationMs),!1;if(!t){let h=this.getDisplayText(i,void 0,l,r,""),u=`#page=${r}&rect=${o.map(f=>Math.round(f)).join(",")}`;s&&(u+=`&color=${s}`);let p=this.lib.generateMarkdownLink(l,c!=null?c:"",u,h);(async()=>{let f=p,m=i.getPage(r).pdfPage,x=this.settings.rectImageExtension;if(!this.settings.rectEmbedStaticImage)await navigator.clipboard.writeText(f),this.onCopyFinish(f);else if(this.settings.rectImageFormat==="file"){let g=await this.app.fileManager.getAvailablePathForAttachment(l.basename+"."+x,"");f=(!this.app.vault.getConfig("useMarkdownLinks")?`![[${g}]]`:`![](${Vr(g)})`)+` + +`+p.slice(1),await navigator.clipboard.writeText(f);let y=async()=>{(i.containerEl.win!==window||m.destroyed)&&(m=await(await this.lib.loadPDFDocument(l)).getPage(r));let F=await this.lib.pdfPageToImageArrayBuffer(m,{type:`image/${x}`,cropRect:o,renderParams:this.lib.getOptionalRenderParameters()});return await this.app.vault.createBinary(g,F)};a?(await y(),this.onCopyFinish(f)):this.onCopyFinish(f,y)}else f=`![](${await this.lib.pdfPageToImageDataUrl(m,{type:`image/${x}`,cropRect:o})})`+` + +`+p.slice(1),await navigator.clipboard.writeText(f),this.onCopyFinish(f);this.plugin.lastCopiedDestInfo={file:l,destArray:[r-1,"FitR",...o]},d==null||d.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(f,a,d!=null?d:void 0)})()}return!0}copyLinkToSearch(t,i,r,o,s,a){if(!i.file)return!1;let c=i.file,l=this.lib.getColorPaletteFromChild(i);if(!t){let d=this.lib.copyLink.getDisplayText(i,void 0,c,r,o),h=this.lib.generateMarkdownLink(c,"",`#search=${o}`,d).slice(1);(async()=>(await navigator.clipboard.writeText(h),this.onCopyFinish(h),l==null||l.setStatus("Link copied",this.statusDurationMs),await this.autoFocusOrAutoPaste(h,s,l!=null?l:void 0)))()}return!0}makeCanvasTextNodeFromSelection(t,i,r,o){var a;let s=this.getTemplateVariables(o?{color:o.toLowerCase()}:{});if(s){let{child:c,file:l,subpath:d,page:h,text:u}=s;if(!u)return!1;if(!t){let p=this.getTextToCopy(c,r,void 0,l,h,d,u,(a=o==null?void 0:o.toLowerCase())!=null?a:"");i.createTextNode({pos:i.posCenter(),position:"center",text:p})}return!0}return!1}makeCanvasTextNodeFromAnnotation(t,i,r,o,s,a){let c=r.file;if(!c)return!1;if(!t){let l=r.getPage(s);r.getAnnotatedText(l,a).then(d=>{let h=this.getTextToCopy(r,o,void 0,c,s,`#page=${s}&annotation=${a}`,d!=null?d:"","");i.createTextNode({pos:i.posCenter(),position:"center",text:h})})}return!0}async autoPaste(t){let i=this.getAutoFocusOrAutoPasteTarget(this.settings.autoPasteTarget);if(i)return await this.pasteTextToFile(t,i),!0;if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let r=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!r)return new qi.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let o=!1;return new Promise(s=>{let a=this.app.workspace.on("file-open",async l=>{l&&l.extension==="md"&&(this.app.workspace.offref(a),await this.pasteTextToFile(t,l,!0),this.plugin.lastPasteFile=l,s(!0))}),c=this.lib.workspace.hoverEditor;this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",l=>{l&&c.isHoverEditorLeaf(l)&&c.postProcessHoverEditorLeaf(l)}),this.app.commands.executeCommandById(r.id),activeWindow.setTimeout(()=>{if(!o){let{noticeEl:l}=new qi.Notice(`${this.plugin.manifest.name}: Could not find the auto-paste target markdown file within ${this.settings.autoPasteTargetDialogTimeoutSec} seconds.`);l.appendText(" Click "),l.createEl("a",{text:"here"},d=>{d.addEventListener("click",()=>{this.plugin.openSettingTab().scrollTo("autoPasteTargetDialogTimeoutSec")})}),l.appendText(" to change the timeout duration."),this.app.workspace.offref(a),s(!1)}},this.settings.autoPasteTargetDialogTimeoutSec*1e3)}).then(s=>(o=!0,s))}async autoFocus(){let t=this.getAutoFocusOrAutoPasteTarget(this.settings.autoFocusTarget);if(t){let{leaf:o,isExistingLeaf:s}=await this.prepareMarkdownLeafForPaste(t);return o&&o.view instanceof qi.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:!0,goEnd:!s}),!0}if(!this.settings.executeCommandWhenTargetNotIdentified)return!1;let i=this.app.commands.findCommand(this.settings.commandToExecuteWhenTargetNotIdentified);if(!i)return new qi.Notice(`${this.plugin.manifest.name}: Command "${this.settings.commandToExecuteWhenTargetNotIdentified}" was not found. Please update the "Command to execute when pasting a link for the first time with auto-focus or auto-paste" setting.`),!1;let r=this.lib.workspace.hoverEditor;return this.plugin.registerOneTimeEvent(this.app.workspace,"active-leaf-change",o=>{o&&r.isHoverEditorLeaf(o)&&r.postProcessHoverEditorLeaf(o)}),this.app.commands.executeCommandById(i.id)}getAutoFocusOrAutoPasteTarget(t){let i=this.plugin.lastActiveMarkdownFile,r=this.plugin.lastPasteFile,o=!!(i&&this.lib.workspace.isMarkdownFileOpened(i)),s=null;return t==="last-paste"?s=r:t==="last-active"?s=i:t==="last-active-and-open"?o&&(s=i):t==="last-paste-then-last-active"?s=r!=null?r:i:t==="last-paste-then-last-active-and-open"?r?s=r:o&&(s=i):t==="last-active-and-open-then-last-paste"&&(o?s=i:r&&(s=r)),s&&s.extension==="md"?s:null}async prepareMarkdownLeafForPaste(t){let i=this.lib.workspace.getExistingLeafForMarkdownFile(t),r=!!i;if(!i&&this.settings.openAutoFocusTargetIfNotOpened){let o=this.settings.howToOpenAutoFocusTargetIfNotOpened;if(o==="hover-editor"){let s=await this.lib.workspace.hoverEditor.createNewHoverEditorLeaf({hoverPopover:null},null,t.path,"");s&&(i=s)}else i=this.lib.workspace.getLeaf(o),await i.openFile(t,{active:!1});if(i&&this.settings.openAutoFocusTargetInEditingView){await this.lib.workspace.ensureViewLoaded(i);let s=i.view;s instanceof qi.MarkdownView&&(await s.setState({mode:"source"},{history:!1}),s.setEphemeralState({focus:!1}))}}return i&&(await this.lib.workspace.ensureViewLoaded(i),this.lib.workspace.hoverEditor.postProcessHoverEditorLeaf(i),this.settings.closeSidebarWhenLostFocus&&this.lib.workspace.registerHideSidebar(i)),{leaf:i,isExistingLeaf:r}}async pasteTextToFile(t,i,r=!1){let{leaf:o,isExistingLeaf:s}=await this.prepareMarkdownLeafForPaste(i);if(!r&&o&&s&&o.view instanceof qi.MarkdownView&&o.view.getMode()==="source"){let a=o.view,c=a.editor;if(this.settings.respectCursorPositionWhenAutoPaste)c.replaceSelection(t);else{let l=c.getValue();l=l.trimEnd(),l&&(l+=this.settings.blankLineAboveAppendedContent?` + +`:` +`),l+=t,c.setValue(l)}a.save(),await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!this.settings.respectCursorPositionWhenAutoPaste})}else await this.app.vault.process(i,a=>(a=a.trimEnd(),a&&(a+=this.settings.blankLineAboveAppendedContent?` + +`:` +`),a+=t,a)),o&&activeWindow.setTimeout(async()=>{o.view instanceof qi.MarkdownView&&await this.updateAndRevealCursorInEditor(o.view,{focus:this.settings.focusEditorAfterAutoPaste,goEnd:!0})})}async updateAndRevealCursorInEditor(t,i){let{focus:r,goEnd:o}=i,s=t.editor;r&&(o&&s.exec("goEnd"),await this.lib.workspace.revealLeaf(t.leaf),this.app.workspace.setActiveLeaf(t.leaf),s.focus());let a=s.coordsAtPos(s.getCursor(),!0);if(a){let c=s.getScrollInfo();if(a.topc.top+c.clientHeight){let l={from:s.getCursor("from"),to:s.getCursor("to")};s.scrollIntoView(l,!0)}}}watchPaste(t,i){this.plugin.registerOneTimeEvent(this.app.workspace,"editor-paste",(r,o,s)=>{var d;if(((d=s.file)==null?void 0:d.extension)!=="md"||!r.clipboardData)return;let c=r.clipboardData.getData("text/plain").replace(/\r\n/g,` +`),l=t.replace(/\r\n/g,` +`);c===l&&(this.plugin.lastPasteFile=s.file,i==null||i()),s instanceof qi.MarkdownView&&setTimeout(()=>s.save())})}onCopyFinish(t,i){this.watchPaste(t,i),this.plugin.lastCopiedDestInfo=null}async autoFocusOrAutoPaste(t,i,r){if(i||this.settings.autoPaste)if(await this.autoPaste(t)){if(r==null||r.setStatus("Link copied & pasted",this.statusDurationMs),!this.settings.focusEditorAfterAutoPaste&&this.settings.clearSelectionAfterAutoPaste){let s=activeWindow.getSelection();s&&this.lib.copyLink.getPageAndTextRangeFromSelection(s)&&s.empty()}}else r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs);else this.settings.autoFocus&&(await this.autoFocus()||r==null||r.setStatus("Link copied but paste target not identified",this.statusDurationMs))}};var $u=class extends Be{computeMergedHighlightRects(e,t,i,r,o){let{textContentItems:s,textDivs:a}=e,c=[],l=null,d=[];o===0&&(r--,o=s[r].str.length);for(let h=t;h<=r;h++){let u=s[h],p=a[h];if(!u.str)continue;let f=this.computeHighlightRectForItem(u,p,h,t,i,r,o);f&&(l?this.areRectanglesMergeable(l,f)?(l=this.mergeRectangles(l,f),d.push(h)):(c.push({rect:l,indices:d}),l=f,d=[h]):(l=f,d=[h]))}return l&&c.push({rect:l,indices:d}),c}computeHighlightRectForItem(e,t,i,r,o,s,a){return e.chars&&e.chars.length>=e.str.length?this.computeHighlightRectForItemFromChars(e,i,r,o,s,a):this.computeHighlightRectForItemFromTextLayer(e,t,i,r,o,s,a)}computeHighlightRectForItemFromChars(e,t,i,r,o,s){let a=e.chars.slice(e.chars.findIndex(u=>u.c===e.str.charAt(0)),e.chars.findLastIndex(u=>u.c===e.str.charAt(e.str.length-1))+1),c=t===i?r:0,l=(t===o?Math.min(s,a.length):a.length)-1;if(c>a.length-1||l<0)return null;let d=a[c],h=a[l];return[Math.min(d.r[0],h.r[0]),Math.min(d.r[1],h.r[1]),Math.max(d.r[2],h.r[2]),Math.max(d.r[3],h.r[3])]}computeHighlightRectForItemFromTextLayer(e,t,i,r,o,s,a){let c=e.transform[4],l=e.transform[5],d=e.transform[4]+e.width,h=e.transform[5]+e.height,u=t.doc.createRange();if(i===r){let m=Wn(t,o);m?u.setStart(m.node,m.offset):u.setStartBefore(t)}else u.setStartBefore(t);if(i===s){let m=Wn(t,a);m?u.setEnd(m.node,m.offset):u.setEndAfter(t)}else u.setEndAfter(t);let p=u.getBoundingClientRect(),f=t.getBoundingClientRect();return[c+(p.left-f.left)/f.width*e.width,l+(p.bottom-f.bottom)/f.height*e.height,d-(f.right-p.right)/f.width*e.width,h-(f.top-p.top)/f.height*e.height]}areRectanglesMergeable(e,t){return this.areRectanglesMergeableHorizontally(e,t)||this.areRectanglesMergeableVertically(e,t)}areRectanglesMergeableHorizontally(e,t){let[i,r,o,s]=e,[a,c,l,d]=t,h=(r+s)/2,u=(c+d)/2,p=Math.abs(s-r),f=Math.abs(d-c),m=Math.max(p,f)*.5;return Math.abs(h-u).85&&f/u>.85}mergeRectangles(...e){let t=e.map(s=>s[0]),i=e.map(s=>s[1]),r=e.map(s=>s[2]),o=e.map(s=>s[3]);return[Math.min(...t),Math.min(...i),Math.max(...r),Math.max(...o)]}rectsToQuadPoints(e){return e.flatMap(([t,i,r,o])=>[t,o,r,o,t,i,r,i])}};var ef=require("obsidian");var tf=class extends Be{getPDFPlusBacklinkHighlightLayer(e){var i;let t=e.div;return(i=t.querySelector("div.pdf-plus-backlink-highlight-layer"))!=null?i:t.createDiv("pdf-plus-backlink-highlight-layer",r=>{window.pdfjsLib.setLayerDimensions(r,e.viewport)})}placeRectInPage(e,t){let i=t.pdfPage.view,r=i[0],o=i[1],s=i[2]-i[0],a=i[3]-i[1],c=window.pdfjsLib.Util.normalizeRect([e[0],i[3]-e[1]+i[1],e[2],i[3]-e[3]+i[1]]),d=this.getPDFPlusBacklinkHighlightLayer(t).createDiv("pdf-plus-backlink");return d.setCssStyles({left:`${100*(c[0]-r)/s}%`,top:`${100*(c[1]-o)/a}%`,width:`${100*(c[2]-c[0])/s}%`,height:`${100*(c[3]-c[1])/a}%`}),d}highlightSubpath(e,t){var i,r,o;if(((i=e.subpathHighlight)==null?void 0:i.type)==="text"){let s=new ef.Component;s.load(),this.lib.onTextLayerReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="text")return;let{page:c,range:l}=e.subpathHighlight;c===a&&(e.highlightText(c,l),t>0&&setTimeout(()=>{e.clearTextHighlight()},t*1e3),s.unload())})}else if(((r=e.subpathHighlight)==null?void 0:r.type)==="annotation"){let s=new ef.Component;s.load(),this.lib.onAnnotationLayerReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="annotation")return;let{page:c,id:l}=e.subpathHighlight;c===a&&(e.highlightAnnotation(c,l),t>0&&setTimeout(()=>e.clearAnnotationHighlight(),t*1e3),s.unload())})}else if(((o=e.subpathHighlight)==null?void 0:o.type)==="rect"){let s=new ef.Component;s.load(),this.lib.onPageReady(e.pdfViewer,s,a=>{var d;if(((d=e.subpathHighlight)==null?void 0:d.type)!=="rect")return;let{page:c,rect:l}=e.subpathHighlight;c===a&&(this.highlightRect(e,c,l),t>0&&setTimeout(()=>{this.clearRectHighlight(e)},t*1e3),s.unload())})}}highlightRect(e,t,i){if(this.clearRectHighlight(e),1<=t&&t<=e.pdfViewer.pagesCount){let r=e.getPage(t);r!=null&&r.div.dataset.loaded&&(e.rectHighlight=this.placeRectInPage(i,r),e.rectHighlight.addClass("rect-highlight"),this.settings.zoomToFitRect||activeWindow.setTimeout(()=>{window.pdfjsViewer.scrollIntoView(e.rectHighlight,{top:-this.settings.embedMargin})}))}}clearRectHighlight(e){e.rectHighlight&&(e.rectHighlight.detach(),e.rectHighlight=null)}};var h1=require("obsidian");var nf=class extends Be{async addTextMarkupAnnotation(e,t,i,r,o,s){if(!this.plugin.settings.author)throw new Error(`${this.plugin.manifest.name}: The author name is not set. Please set it in the plugin settings.`);return await this.process(e,a=>{let c=a.getPage(t-1),{r:l,g:d,b:h}=this.plugin.domManager.getRgb(o),u=tg(),p=this.lib.highlight.geometry,f=this.addAnnotation(c,{Subtype:r,Rect:p.mergeRectangles(...i),QuadPoints:p.rectsToQuadPoints(i),Contents:K.fromText(s!=null?s:""),M:J.fromDate(new Date),T:K.fromText(this.plugin.settings.author),CA:r==="Highlight"?this.plugin.settings.writeHighlightToFileOpacity:1,Border:r==="Highlight"?[u,u,0]:void 0,C:[l/255,d/255,h/255]});return Xc(f.objectNumber,f.generationNumber)})}async addHighlightAnnotation(e,t,i,r,o){return await this.addTextMarkupAnnotation(e,t,i,"Highlight",r,o)}async addLinkAnnotation(e,t,i,r,o,s){return await this.process(e,a=>{let c=a.getPage(t-1),l=Mr(this.plugin.settings.pdfLinkColor),{r:d,g:h,b:u}=l!=null?l:{r:0,g:0,b:0},p=this.lib.highlight.geometry,f;typeof r=="string"?f=J.of(r):f=[a.getPage(r[0]).ref,r[1],...r.slice(2).map(b=>typeof b=="number"?G.of(b):He)];let m=this.addAnnotation(c,{Subtype:"Link",Rect:p.mergeRectangles(...i),QuadPoints:p.rectsToQuadPoints(i),Dest:f,M:J.fromDate(new Date),Border:[0,0,this.plugin.settings.pdfLinkBorder?1:0],C:[d/255,h/255,u/255]});return Xc(m.objectNumber,m.generationNumber)})}async process(e,t){let i=await this.lib.loadPdfLibDocument(e),r=await t(i);return await this.app.vault.modifyBinary(e,await i.save()),r}async read(e,t){let i=await this.lib.loadPdfLibDocument(e);return await t(i)}addAnnotation(e,t){let i=e.doc.context,r=i.register(i.obj({Type:"Annot",...t}));return e.node.addAnnot(r),r}async deleteAnnotation(e,t,i){await this.process(e,r=>{let o=r.getPage(t-1),s=this.findAnnotationRef(o,i);s&&o.node.removeAnnot(s)})}async getAnnotationContents(e,t,i){let r=await this.getAnnotation(e,t,i);if(r){let o=this.getContentsFromAnnotation(r);return o!=null?o:null}return null}async setAnnotationContents(e,t,i,r){await this.processAnnotation(e,t,i,o=>{this.setContentsToAnnotation(o,r)})}async getAnnotationColor(e,t,i){var o;let r=await this.getAnnotation(e,t,i);return r&&(o=this.getColorFromAnnotation(r))!=null?o:null}async setAnnotationColor(e,t,i,r){await this.processAnnotation(e,t,i,async o=>{this.setColorToAnnotation(o,r)})}async getAnnotationOpacity(e,t,i){var o;let r=await this.getAnnotation(e,t,i);return r&&(o=this.getOpacityFromAnnotation(r))!=null?o:null}async setAnnotationOpacity(e,t,i,r){await this.processAnnotation(e,t,i,async o=>{this.setOpacityToAnnotation(o,r)})}findAnnotationRef(e,t){var i;return(i=e.node.Annots())==null?void 0:i.asArray().find(r=>r instanceof Y&&Xc(r.objectNumber,r.generationNumber)===t)}async getAnnotation(e,t,i){return await this.read(e,r=>{let o=r.getPage(t-1),s=this.findAnnotationRef(o,i);return s?o.node.context.lookup(s,W):null})}async processAnnotation(e,t,i,r){return await this.process(e,async o=>{let s=o.getPage(t-1),a=this.findAnnotationRef(s,i);if(a){let c=s.node.context.lookup(a,W);await r(c)}})}getColorFromAnnotation(e){if(!e.get(v.of("AP"))){let i=e.get(v.of("C"));if(i instanceof Z){let r=i.asArray();if(r.length===3){let[o,s,a]=r.map(c=>{if(c instanceof G)return Math.round(c.asNumber()*255);throw new Error(`${this.plugin.manifest.name}: Invalid color`)});return{r:o,g:s,b:a}}}}}setColorToAnnotation(e,t){let i=e.get(v.of("C"));i instanceof Z&&(i.set(0,G.of(t.r/255)),i.set(1,G.of(t.g/255)),i.set(2,G.of(t.b/255)))}getContentsFromAnnotation(e){let t=e.get(v.of("Contents"));if(t instanceof J||t instanceof K)return t.decodeText()}setContentsToAnnotation(e,t){e.set(v.of("Contents"),K.fromText(t))}getOpacityFromAnnotation(e){if(!e.get(v.of("AP"))){let i=e.get(v.of("CA"));if(i instanceof G)return i.asNumber()}}setOpacityToAnnotation(e,t){e.set(v.of("CA"),G.of(t))}getAuthorFromAnnotation(e){let t=e.get(v.of("T"));if(t instanceof J||t instanceof K)return t.decodeText()}setAuthorToAnnotation(e,t){e.set(v.of("T"),K.fromText(t))}getBorderWidthFromAnnotation(e){let t=e.get(v.of("Border"));if(t instanceof Z){let i=t.asArray()[2];if(i instanceof G)return i.asNumber()}}setBorderWidthToAnnotation(e,t){let i=e.get(v.of("Border"));i instanceof Z&&i.set(2,G.of(t))}};var rf=class extends Be{constructor(e){super(e),this.pdflib=new nf(e)}getPdfIo(){return this.pdflib}async addTextMarkupAnnotationToSelection(e,t){return this.addAnnotationToSelection(async(i,r,o)=>await this.getPdfIo().addTextMarkupAnnotation(i,r,o,e,t))}async addLinkAnnotationToSelection(e){return this.addAnnotationToSelection(async(t,i,r)=>await this.getPdfIo().addLinkAnnotation(t,i,r,e))}async addAnnotationToSelection(e){let t=activeWindow.getSelection();if(!t)return null;let i=this.lib.copyLink.getPageAndTextRangeFromSelection(t);if(!i||!i.selection)return null;let{page:r,selection:{beginIndex:o,beginOffset:s,endIndex:a,endOffset:c}}=i,l=this.lib.getPDFViewerChildFromSelection(t);return l?{child:l,file:l.file,page:r,...await this.addAnnotationToTextRange(e,l,r,o,s,a,c)}:null}async addAnnotationToTextRange(e,t,i,r,o,s,a){if(t.file&&1<=i&&i<=t.pdfViewer.pagesCount){let c=t.getPage(i);if(c!=null&&c.textLayer&&c.div.dataset.loaded){let l=Dt(c.textLayer);if(l){let h=this.lib.highlight.geometry.computeMergedHighlightRects(l,r,o,s,a).map(({rect:p})=>p),u;try{u=await e(t.file,i,h)}catch(p){new h1.Notice(`${this.plugin.manifest.name}: An error occurred while attemping to add an annotation.`),console.error(p)}return{annotationID:u,rects:h}}}}}async deleteAnnotation(e,t,i){await this.getPdfIo().deleteAnnotation(e,t,i)}async getAnnotationContents(e,t,i){return await this.getPdfIo().getAnnotationContents(e,t,i)}async setAnnotationContents(e,t,i,r){return await this.getPdfIo().setAnnotationContents(e,t,i,r)}};var of=class extends Be{async getAnnotatedTextsInDocument(e){let t=new Map;for(let i=1;i<=e.numPages;i++){let r=await e.getPage(i),o=await this.getAnnotatedTextsInPage(r);t.set(i,o)}return t}async getAnnotatedTextsInPage(e){var o;let[{items:t},i]=await Promise.all([e.getTextContent({includeChars:!0}),e.getAnnotations()]),r=[];for(let s of i){if(!["Highlight","Underline","Squiggly","StrikeOut"].includes(s.subtype))continue;let c=dg(s.quadPoints);if(!c.length)continue;let l=c.map(u=>this.getTextByRect(t,u)),d=s.color?{r:s.color[0],g:s.color[1],b:s.color[2]}:null,h=(o=s.contentsObj)==null?void 0:o.str;r.push({id:s.id,textRanges:l,rgb:d,comment:h,left:c[0][0],top:c[0][3]})}return new Map(r.sort((s,a)=>{if(s.textRanges.length&&a.textRanges.length){let c=s.textRanges[0].from,l=a.textRanges[0].from;return c.index-l.index||c.offset-l.offset}return a.top-s.top||s.left-a.left}).map(s=>{let a=s.textRanges.map(c=>c.text).join(` +`);return a=this.lib.toSingleLine(a),[s.id,{text:a,rgb:s.rgb,comment:s.comment}]}))}getTextByRect(e,t){let[i,r,o,s]=t,a="",c={index:-1,offset:-1},l={index:-1,offset:-1};for(let d=0;d{let i=t.view;this.lib.isPDFView(i)&&e(i)})}iterateBacklinkViews(e){this.app.workspace.getLeavesOfType("backlink").forEach(t=>e(t.view))}iterateCanvasViews(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;this.lib.isCanvasView(i)&&e(i)})}iteratePDFEmbeds(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;i instanceof Qe.MarkdownView?this.lib.getAllPDFEmbedsInMarkdownView(i).forEach(e):this.lib.isCanvasView(i)?this.lib.getAllPDFEmbedsInCanvasView(i).forEach(e):this.lib.isExcalidrawView(i)&&this.lib.getAllPDFEmbedsInExcalidrawView(i).forEach(e)})}iteratePDFViewerComponents(e){this.app.workspace.iterateAllLeaves(t=>{let i=t.view;this.lib.isPDFView(i)?e(i.viewer,i.file):i instanceof Qe.MarkdownView?this.lib.getAllPDFEmbedsInMarkdownView(i).forEach(r=>e(r.viewer,r.file)):this.lib.isCanvasView(i)?this.lib.getAllPDFEmbedsInCanvasView(i).forEach(r=>e(r.viewer,r.file)):this.lib.isExcalidrawView(i)&&this.lib.getAllPDFEmbedsInExcalidrawView(i).forEach(r=>e(r.viewer,r.file))})}iteratePDFViewerChild(e){this.iteratePDFViewerComponents(t=>{t.then(i=>e(i))})}getActivePDFView(){var t;if(this.plugin.classes.PDFView)return this.app.workspace.getActiveViewOfType(this.plugin.classes.PDFView);let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isPDFView(e)?e:null}getActiveCanvasView(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isCanvasView(e)?e:null}getActiveExcalidrawView(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.view;return e&&this.lib.isExcalidrawView(e)?e:null}getExistingLeafForPDFFile(e){return this.getExistingLeafForFile(e)}getActiveGroupLeaves(){var t;let e=(t=this.app.workspace.activeLeaf)==null?void 0:t.group;return e?this.app.workspace.getGroupLeaves(e):null}async openMarkdownLinkFromPDF(e,t,i,r){var a;let o;i?o=this.app.workspace.getLeaf(i):u1(this.settings.paneTypeForFirstMDLeaf)&&this.settings.alwaysUseSidebar?o=this.getMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):o=this.getMarkdownLeafForLinkFromPDF(e,t);let s={};if(r){if("pos"in r){let{pos:c}=r;s.eState={line:c.start.line,startLoc:c.start,endLoc:c.end}}else{let{line:c}=r;s.eState={line:c}}s.eState.scroll=s.eState.line,s.eState.focus=!this.settings.dontActivateAfterOpenMD}o.parentSplit instanceof Qe.WorkspaceTabs&&o.parentSplit===((a=this.app.workspace.activeLeaf)==null?void 0:a.parentSplit)||(s.active=!this.plugin.settings.dontActivateAfterOpenMD),await o.openLinkText(e,t,s),await this.revealLeaf(o)}getMarkdownLeafInSidebar(e){var t;return this.settings.singleMDLeafInSidebar?(t=this.lib.workspace.getExistingMarkdownLeafInSidebar(e))!=null?t:this.lib.workspace.getNewLeafInSidebar(e):this.lib.workspace.getNewLeafInSidebar(e)}getMarkdownLeafForLinkFromPDF(e,t){var a;let{path:i}=(0,Qe.parseLinktext)(e),r=this.app.metadataCache.getFirstLinkpathDest(i,t),o,s;return this.app.workspace.iterateAllLeaves(c=>{if(o)return;let l=!0;if(c.view.getViewType()==="markdown"){let d=c.getRoot();for(let h of this.settings.ignoreExistingMarkdownTabIn)if(d===this.app.workspace[h])return;c.parentSplit instanceof Qe.WorkspaceTabs&&c.parentSplit.children.some(u=>{if(u instanceof Qe.WorkspaceLeaf&&u.view.getViewType()==="pdf")return this.getFilePathFromView(u.view)===t})&&(l=!1),l&&(s=c.parentSplit),r&&this.getFilePathFromView(c.view)===r.path&&(o=c)}}),o||(u1(this.settings.paneTypeForFirstMDLeaf)&&this.settings.singleMDLeafInSidebar&&s&&this.isInSidebar(s)?o=(a=this.getExistingMarkdownLeafInSidebar(this.settings.paneTypeForFirstMDLeaf))!=null?a:this.lib.workspace.getNewLeafInSidebar(this.settings.paneTypeForFirstMDLeaf):o=s?this.app.workspace.createLeafInParent(s,-1):this.getLeaf(this.plugin.settings.paneTypeForFirstMDLeaf)),o}isInSidebar(e){let t=e.getRoot();return t===this.app.workspace.rightSplit||t===this.app.workspace.leftSplit}getLeaf(e){return e===""&&(e=!1),typeof e=="boolean"||EC(e)?this.app.workspace.getLeaf(e):TC(e)?this.getLeafBySplit(e):this.getLeafInSidebar(e)}getLeafBySplit(e){let t=this.app.workspace.getMostRecentLeaf();if(t){if(["right","left"].contains(e))return this.app.workspace.createLeafBySplit(t,"vertical",e==="left");if(["down","up"].contains(e))return this.app.workspace.createLeafBySplit(t,"horizontal",e==="up")}return this.app.workspace.createLeafInParent(this.app.workspace.rootSplit,0)}getLeafInSidebar(e){return this.getNewLeafInSidebar(e)}getExistingMarkdownLeafInSidebar(e){let t,i=e==="right-sidebar"?this.app.workspace.rightSplit:this.app.workspace.leftSplit;return this.app.workspace.iterateAllLeaves(r=>{t||r.getRoot()!==i||r.view.getViewType()==="markdown"&&(t=r)}),t!=null?t:null}getNewLeafInSidebar(e){let t=e==="right-sidebar"?this.app.workspace.getRightLeaf(!1):this.app.workspace.getLeftLeaf(!1);if(!t)throw new Error("No sidebar leaf found");return t}async revealLeaf(e){if((0,Qe.requireApiVersion)("1.5.11")){await this.app.workspace.revealLeaf(e);return}if(!Qe.Platform.isDesktopApp){this.app.workspace.revealLeaf(e);return}let t=e.getRoot();t instanceof Qe.WorkspaceSidedock&&t.collapsed&&t.toggle();let i=e.parent;i instanceof Qe.WorkspaceTabs&&i.selectTab(e),e.getContainer().focus()}openPDFLinkTextInLeaf(e,t,i,r){let{subpath:o}=(0,Qe.parseLinktext)(t);return this.plugin.patchStatus.pdfInternals||(this.plugin.subpathWhenPatched=o),e.openLinkText(t,i,r).then(async()=>{await this.revealLeaf(e);let s=e.view;this.lib.isPDFView(s)&&s.viewer.then(a=>{let c=this.plugin.settings.highlightDuration;this.lib.highlight.viewer.highlightSubpath(a,c)})})}openPDFLinkTextInExistingLeafForTargetPDF(e,t,i,r){var a,c;if(!r){let{path:l}=(0,Qe.parseLinktext)(e);r=(a=this.app.metadataCache.getFirstLinkpathDest(l,t))!=null?a:void 0}if(!r)return{exists:!1,promise:Promise.resolve()};let o=this.getExistingLeafForPDFFile(r);return o?(o.parentSplit instanceof Qe.WorkspaceTabs&&o.parentSplit===((c=this.app.workspace.activeLeaf)==null?void 0:c.parentSplit)||(i=i!=null?i:{},i.active=!this.settings.dontActivateAfterOpenPDF),o.isVisible()&&this.settings.highlightExistingTab&&(o.containerEl.addClass("pdf-plus-link-opened","is-highlighted"),setTimeout(()=>o.containerEl.removeClass("pdf-plus-link-opened","is-highlighted"),this.settings.existingTabHighlightDuration*1e3)),{exists:!0,promise:this.openPDFLinkTextInLeaf(o,e,t,i)}):{exists:!1,promise:Promise.resolve()}}getExistingLeafForFile(e){let t=this.app.viewRegistry.getTypeByExtension(e.extension);if(!t)return null;let i=null;return this.app.workspace.iterateAllLeaves(r=>{i||r.view.getViewType()===t&&this.getFilePathFromView(r.view)===e.path&&(i=r)}),i}getExistingLeafForMarkdownFile(e){return this.getExistingLeafForFile(e)}isMarkdownFileOpened(e){return!!this.getExistingLeafForMarkdownFile(e)}registerHideSidebar(e){let t=e.getRoot();if(t===this.app.workspace.leftSplit||t===this.app.workspace.rightSplit){let i=t,r=this.app.workspace.on("active-leaf-change",o=>{o&&o.getRoot()!==i&&(i.collapse(),this.app.workspace.offref(r))})}}getFilePathFromView(e){let t=e.getState().file;return typeof t=="string"?t:null}async ensureViewLoaded(e){(0,Qe.requireApiVersion)("1.7.2")&&await e.loadIfDeferred()}},tm=class extends Be{get hoverEditorPlugin(){var e;return(e=this.app.plugins.plugins["obsidian-hover-editor"])!=null?e:null}get waitTime(){var e;return(e=this.hoverEditorPlugin)==null?void 0:e.settings.triggerDelay}isHoverEditorLeaf(e){return e.containerEl.closest(".popover.hover-popover.hover-editor")!==null}async createNewHoverEditorLeaf(e,t,i,r,o){return this.hoverEditorPlugin?new Promise(s=>{var c;let a=this.app.workspace.on("active-leaf-change",l=>{l&&this.isHoverEditorLeaf(l)&&(this.app.workspace.offref(a),s(l))});this.app.workspace.trigger("link-hover",e,t,i,r,o),window.setTimeout(()=>{this.app.workspace.offref(a),s(null)},((c=this.waitTime)!=null?c:300)+300)}):null}iterateHoverEditorLeaves(e){this.app.workspace.iterateAllLeaves(t=>{this.isHoverEditorLeaf(t)&&e(t)})}getHoverEditorForLeaf(e){var t,i;return(i=(t=this.hoverEditorPlugin)==null?void 0:t.activePopovers.find(r=>r.hoverEl.contains(e.containerEl)))!=null?i:null}postProcessHoverEditorLeaf(e){if(this.isHoverEditorLeaf(e)){let t=this.getHoverEditorForLeaf(e);if(t&&(t.hoverEl.hasClass("is-minimized")&&t.toggleMinimized(),this.settings.closeHoverEditorWhenLostFocus)){let i=this.app.workspace.on("active-leaf-change",r=>{r!==e&&(t.hide(),this.app.workspace.offref(i))})}}}};var ct=require("obsidian");var ld=require("obsidian");var lf=class extends Ke{onOpen(){var e;super.onOpen(),this.containerEl.addClass("pdf-plus-restore-default-modal"),this.titleEl.setText(`${this.plugin.manifest.name}: Restore default settings`),this.contentEl.createEl("p",{text:`This operation will overwrite your PDF++ config file (${((e=this.plugin.manifest.dir)!=null?e:this.app.vault.configDir+"/plugins/"+this.plugin.manifest.id)+"/data.json"}). You may want to back up the file before proceeding.`}),this.contentEl.createDiv("modal-button-container",t=>{new ld.ButtonComponent(t).setButtonText("I understand, restore default settings").setWarning().onClick(async()=>{await this.plugin.restoreDefaultSettings(),this.close(),new ld.Notice(`${this.plugin.manifest.name}: Default setting restored. Note that some options require a restart to take effect.`,6e3)}),new ld.ButtonComponent(t).setButtonText("Cancel").onClick(()=>{this.close()})}),setTimeout(()=>{let t=this.containerEl.doc.activeElement;t&&t.instanceOf(HTMLButtonElement)&&this.containerEl.contains(t)&&t.blur()})}};var _r=require("obsidian");var AC=(n,e,t)=>{let i=n.key.path,r=Array.isArray(n.value)?n.value:[n.value];r=r.filter(l=>l&&l.hasOwnProperty("path")&&l.hasOwnProperty("subpath"));let o=e.metadataCache.getCache(i);if(!o)return!1;let s=o.frontmatterLinks,a=s?s.filter(l=>l.key===t||l.key.startsWith(t+".")).length:0;return r.length-a>0},im=(n,e)=>{let t=n.app,i=async()=>{let r=await IC(n);e(r)};t.workspace.onLayoutReady(()=>{let r=t.plugins.plugins.dataview;if(r)if(r.index.initialized)i();else{let o=t.metadataCache.on("dataview:index-ready",()=>{i(),t.metadataCache.offref(o)});n.registerEvent(o)}})},IC=async n=>{let e=n.app,t=e.plugins.plugins.dataview;if(!t)return[];let i=t.api,r=n.settings.proxyMDProperty;try{let o=await i.query(`LIST ${r} WHERE ${r}`);return o.successful?o.value.values.filter(a=>AC(a,e,r)).map(a=>{let c=a.key.path;return e.vault.getFileByPath(c)}).filter(a=>a!==null):[]}catch(o){return console.error(n.manifest.name+": error while checking dataview inline fields"),console.error(o),[]}},Aa=class n extends Ke{constructor(e,t){super(e),this.filesWithInlineFields=t}static async open(e,t=!1){im(e,i=>{t&&i.length===0||new n(e,i).open()})}onOpen(){super.onOpen(),this.containerEl.setCssProps({"--layer-modal":"calc(var(--layer-popover) - 1)"});let e=this.plugin.settings.proxyMDProperty;this.setTitle(`${this.plugin.manifest.name}: About the "${e}" Dataview inline fields`),this.renderContent(),this.renderButtons()}renderContent(){let e=this.plugin.settings.proxyMDProperty;this.contentEl.createEl("p",{text:createFragment(i=>i.append("For the ",createEl("a",{text:'"Property to associate a markdown file to a PDF file"'},r=>{r.onclick=()=>{this.plugin.openSettingTab().scrollTo("proxyMDProperty")},(0,_r.setTooltip)(r,"Open in PDF++ settings",{placement:"top"})})," setting, ",createEl("a",{text:"Dataview",href:"obsidian://show-plugin?id=dataview"}),"'s inline field syntax such as ",createEl("code",{text:`${e}:: [[file.pdf]]`})," is supported for the time being, but ",createSpan({text:"it is deprecated and will likely not work in the future"},r=>r.setCssStyles({color:"var(--text-warning)"})),"."))}),this.contentEl.createEl("hr",{},i=>i.setCssStyles({margin:"1rem 0"}));let t=this.filesWithInlineFields;if(t.length===0){this.contentEl.createEl("p",{text:`No "${e}" inline fields detected. You're good to go!`});return}this.contentEl.createEl("p",{text:createFragment(i=>i.append(t.length>=2?"The following files seem to have ":"The following file seems to have ",`"${e}" inline fields.`,createEl("br"),"Please consider moving these inline fields to the ",createEl("a",{text:"properties (YAML frontmatter)",href:"https://help.obsidian.md/properties",cls:"external-link"},r=>{(0,_r.setTooltip)(r,"https://help.obsidian.md/properties",{placement:"top"})})," instead."))}),this.contentEl.createDiv({},i=>{i.setCssStyles({maxHeight:"200px",overflow:"auto",border:"1px solid var(--background-modifier-border)",borderRadius:"5px",backgroundColor:"var(--background-secondary)",margin:"var(--size-2-2)"}),i.createEl("ul",{},r=>{t.forEach(o=>{r.createEl("li",{},s=>{s.createEl("a",{text:this.app.metadataCache.fileToLinktext(o,""),cls:"internal-link",attr:{href:o.path,"data-href":o.path}})})}),Qo(this.app,r,"")})}),t.length>0?this.contentEl.createEl("p",{text:`To display this modal again, run the "${this.plugin.lib.commands.getCommand("open-dataview-inline-fields-modal").name}" command.`}):this.plugin.requiresDataviewInlineFieldsMigration=!1}renderButtons(){let e=this.filesWithInlineFields;this.contentEl.createDiv("modal-button-container",t=>{e.length>0&&new _r.ButtonComponent(t).setButtonText(e.length>=2?"Copy links as markdown":"Copy link as markdown").setCta().onClick(async()=>{let i=e.length>=2?e.map(r=>"- "+this.app.fileManager.generateMarkdownLink(r,"")).join(` +`):this.app.fileManager.generateMarkdownLink(e[0],"");await navigator.clipboard.writeText(i),new _r.Notice(`${this.plugin.manifest.name}: Copied!`)}),new _r.ButtonComponent(t).setButtonText("Close").onClick(()=>{this.close()})})}};var cf=class extends Be{constructor(...e){super(...e);let t=[{id:"copy-link-to-selection",name:"Copy link to selection or annotation",checkCallback:i=>this.copyLink(i,!1)},{id:"rectangular-selection",name:"Start rectangular selection",checkCallback:i=>this.copyEmbedLinkToRectangularSelection(i,!1)},{id:"context-menu",name:"Show context menu at selection",checkCallback:i=>this.showContextMenu(i)},{id:"extract-annotation-and-copy-links",name:"Extract & copy annotations in this PDF",checkCallback:i=>this.extractHighlightedText(i)},{id:"copy-link-to-page-view",name:"Copy link to current page view",checkCallback:i=>this.copyLinkToPageView(i)},{id:"outline",name:"Show outline",checkCallback:i=>this.showOutline(i)},{id:"thumbnail",name:"Show thumbnail",checkCallback:i=>this.showThumbnail(i)},{id:"close-sidebar",name:"Close PDF sidebar",checkCallback:i=>this.closeSidebar(i)},{id:"toggle-sidebar",name:"Toggle PDF sidebar",checkCallback:i=>this.toggleSidebar(i)},{id:"fit-width",name:"Fit width",checkCallback:i=>this.setScaleValue(i,"page-width")},{id:"fit-height",name:"Fit height",checkCallback:i=>this.setScaleValue(i,"page-height")},{id:"zoom-in",name:"Zoom in",checkCallback:i=>this.zoom(i,!0)},{id:"zoom-out",name:"Zoom out",checkCallback:i=>this.zoom(i,!1)},{id:"adapt-to-theme",name:"Adapt to theme",checkCallback:i=>this.toggleAdaptToTheme(i,!0)},{id:"not-adapt-to-theme",name:"Don't adapt to theme",checkCallback:i=>this.toggleAdaptToTheme(i,!1)},{id:"toggle-adapt-to-theme",name:'Toggle "adapt to theme"',checkCallback:i=>this.toggleAdaptToTheme(i)},{id:"go-to-page",name:"Go to page",checkCallback:i=>this.focusAndSelectPageNumberEl(i)},{id:"copy-format-menu",name:"Show copy format menu",checkCallback:i=>this.showCopyFormatMenu(i)},{id:"display-text-format-menu",name:"Show display text format menu",checkCallback:i=>this.showDisplayTextFormatMenu(i)},{id:"enable-pdf-edit",name:"Enable PDF edit",checkCallback:i=>this.setWriteFile(i,!0)},{id:"disable-pdf-edit",name:"Disable PDF edit",checkCallback:i=>this.setWriteFile(i,!1)},{id:"toggle-auto-focus",name:"Toggle auto-focus",callback:()=>this.toggleAutoFocus()},{id:"toggle-auto-paste",name:"Toggle auto-paste",callback:()=>this.toggleAutoPaste()},{id:"toggle-auto-copy",name:"Toggle auto-copy",callback:()=>this.plugin.autoCopyMode.toggle()},{id:"add-page",name:"Add new page at the end",checkCallback:i=>this.addPage(i)},{id:"insert-page-before",name:"Insert page before this page",checkCallback:i=>this.insertPage(i,!0)},{id:"insert-page-after",name:"Insert page after this page",checkCallback:i=>this.insertPage(i,!1)},{id:"delete-page",name:"Delete this page",checkCallback:i=>this.deletePage(i)},{id:"extract-this-page",name:"Extract this page to a new file",checkCallback:i=>this.extractThisPage(i)},{id:"divide",name:"Divide this PDF into two files at this page",checkCallback:i=>this.dividePDF(i)},{id:"edit-page-labels",name:"Edit page labels",checkCallback:i=>this.editPageLabels(i)},{id:"copy-outline-as-list",name:"Copy PDF outline as markdown list",checkCallback:i=>this.copyOutline(i,"list")},{id:"copy-outline-as-headings",name:"Copy PDF outline as markdown headings",checkCallback:i=>this.copyOutline(i,"heading")},{id:"add-outline-item",name:"Add to outline (bookmark)",checkCallback:i=>this.addOutlineItem(i)},{id:"create-new-note",name:"Create new note for auto-focus or auto-paste",callback:()=>this.createNewNote()},{id:"copy-debug-info",name:"Copy debug info",callback:()=>this.copyDebugInfo()},{id:"load-debug-info",name:"Load debug info",checkCallback:i=>this.loadDebugInfo(i)},{id:"create-pdf",name:"Create new PDF",callback:()=>this.createPDF()},{id:"import",name:"Import this PDF into vault",checkCallback:i=>this.importExternalFileIntoVault(i)},{id:"open-external",name:"Open this PDF in the original location",checkCallback:i=>this.openExternalSource(i)},{id:"create-dummy",name:"Create dummy file for external PDF",callback:()=>this.createDummyForExternalPDF()},{id:"restore-default",name:"Restore default settings",callback:()=>new lf(this.plugin).open()},{id:"open-dataview-inline-fields-modal",name:"Check Dataview inline fields",checkCallback:i=>this.plugin.requiresDataviewInlineFieldsMigration?(i||Aa.open(this.plugin),!0):!1}];this.commands={};for(let i of t)this.commands[i.id]=i}registerCommands(){Object.values(this.commands).forEach(e=>{this.plugin.addCommand(this.plugin.obsidianHasFocusBug?this.restorePDFLeafFocus(e):e)})}restorePDFLeafFocus(e){let t=e.checkCallback;if(!t)return e;let i=null;return{...e,checkCallback:r=>{var o,s;return r?(i=(s=(o=this.lib.workspace.getActivePDFView())==null?void 0:o.leaf)!=null?s:null,t(r)):(i&&i!==this.app.workspace.activeLeaf&&(this.app.workspace.setActiveLeaf(i,{focus:!0}),i=null),t(r))}}}getCommand(e){return e.startsWith(this.plugin.manifest.id+":")&&(e=e.slice(this.plugin.manifest.id.length+1)),this.commands[e]}listCommands(){return Object.values(this.commands)}listCommandNames(){return Object.values(this.commands).map(e=>this.stripCommandNamePrefix(e.name))}stripCommandNamePrefix(e){return e.startsWith(this.plugin.manifest.name+": ")?e.slice(this.plugin.manifest.name.length+2):e}copyLink(e,t=!1){return!this.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,t)&&!this.copyLinkToAnnotation(e,t)?this.copyLinkToSelection(e,t):!0}createCanvasCard(e){return this.createCanvasCardFromAnnotation(e)?!0:this.createCanvasCardFromSelection(e)}copyLinkToSelection(e,t=!1){let i=this.lib.copyLink.getSelectionLinkInfo();if(!i)return!1;let{template:r,colorName:o}=i;return this.lib.copyLink.copyLinkToSelection(e,{copyFormat:r},o,t)}copyLinkToAnnotation(e,t=!1){let i=this.lib.copyLink.getAnnotationLinkInfo();if(!i)return!1;let{child:r,copyButtonEl:o,template:s,page:a,id:c}=i,l=this.lib.copyLink.copyLinkToAnnotation(r,e,{copyFormat:s},a,c,t);return!e&&l&&(0,ct.setIcon)(o,"lucide-check"),l}writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,t=!1){var s;let i=this.lib.getColorPaletteAssociatedWithSelection();if(!i||!i.writeFile)return!1;let r=this.settings.copyCommands[i.actionIndex].template,o=(s=i.selectedColorName)!=null?s:void 0;return this.lib.copyLink.writeHighlightAnnotationToSelectionIntoFileAndCopyLink(e,{copyFormat:r},o,t)}copyEmbedLinkToRectangularSelection(e,t){let i=this.lib.getColorPalette();return!i||!i.cropButtonEl?!1:(e||i.startRectangularSelection(t),!0)}createCanvasCardFromSelection(e){var s;let t=(s=this.lib.workspace.getActiveCanvasView())==null?void 0:s.canvas;if(!t)return!1;let i=this.lib.copyLink.getSelectionLinkInfo();if(!i)return!1;let{template:r,colorName:o}=i;return this.lib.copyLink.makeCanvasTextNodeFromSelection(e,t,r,o)}createCanvasCardFromAnnotation(e){var l;let t=(l=this.lib.workspace.getActiveCanvasView())==null?void 0:l.canvas;if(!t)return!1;let i=this.lib.copyLink.getAnnotationLinkInfo();if(!i)return!1;let{child:r,template:o,page:s,id:a}=i;return this.lib.copyLink.makeCanvasTextNodeFromAnnotation(e,t,r,o,s,a)}copyLinkToPageView(e){var r,o,s,a,c;let t=this.lib.getPDFView(!0);if(!t||!t.file)return!1;let i=t.getState();if(typeof i.left!="number"||typeof i.top!="number")return!1;if(!e){let l=`#page=${i.page}`,d;((o=(r=t.viewer.child)==null?void 0:r.pdfViewer.pdfViewer)==null?void 0:o.currentScaleValue)==="page-width"?(l+=`&offset=,${i.top},`,d=[i.page-1,"FitBH",i.top]):(l+=`&offset=${i.left},${i.top},${(s=i.zoom)!=null?s:0}`,d=[i.page-1,"XYZ",i.left,i.top,(a=i.zoom)!=null?a:0]);let u=(c=t.viewer.child)==null?void 0:c.getPageLinkAlias(i.page),p=this.lib.generateMarkdownLink(t.file,"",l,u).slice(1);navigator.clipboard.writeText(p),new ct.Notice(`${this.plugin.manifest.name}: Link copied to clipboard`),this.plugin.lastCopiedDestInfo={file:t.file,destArray:d}}return!0}showOutline(e){var r;let t=this.lib.getObsidianViewer(!0);if(!t)return!1;let i=(r=t.dom)==null?void 0:r.containerEl;if(!t.isEmbed||i&&i.contains(i.doc.activeElement)){let o=t==null?void 0:t.pdfSidebar;if(o)return o.haveOutline?o.isOpen&&o.active===2?this.settings.closeSidebarWithShowCommandIfExist?(e||o.close(),!0):!1:(e||o.switchView(2,!0),!0):!1}return this.settings.executeBuiltinCommandForOutline&&this.app.internalPlugins.plugins.outline.enabled?(e||this.app.commands.executeCommandById("outline:open"),!0):!1}showThumbnail(e){var i;let t=(i=this.lib.getObsidianViewer(!0))==null?void 0:i.pdfSidebar;return t?t.isOpen&&t.active===1?this.settings.closeSidebarWithShowCommandIfExist?(e||t.close(),!0):!1:(e||t.switchView(1,!0),!0):!1}closeSidebar(e){var i;let t=(i=this.lib.getObsidianViewer(!0))==null?void 0:i.pdfSidebar;return!t||!t.isOpen?!1:(e||t.close(),!0)}toggleSidebar(e){var i;let t=(i=this.lib.getObsidianViewer(!0))==null?void 0:i.pdfSidebar;return t?(e||(t.isOpen?t.close():t.open()),!0):!1}setScaleValue(e,t){let i=this.lib.getPDFViewer(!0);return i?(e||(i.currentScaleValue=t),!0):!1}zoom(e,t){var o;let i=this.lib.getObsidianViewer(!0);if(!i)return!1;let r=(o=i.dom)==null?void 0:o.containerEl;if((!i.isEmbed||r&&r.contains(r.doc.activeElement))&&i)return e||(t?i.zoomIn():i.zoomOut()),!0;if(this.settings.executeFontSizeAdjusterCommand){let s=t?"font-size:increment-font-size":"font-size:decrement-font-size";if(this.app.commands.findCommand(s))return e||this.app.commands.executeCommandById(s),!0}if(this.settings.executeBuiltinCommandForZoom){let s=t?"window:zoom-in":"window:zoom-out";return this.app.commands.findCommand(s)?(e||this.app.commands.executeCommandById(s),!0):!1}return!1}toggleAdaptToTheme(e,t){let i=this.lib.getPDFViewerChild(!0);if(!i)return!1;let r=!!this.app.loadLocalStorage("pdfjs-is-themed");return typeof t=="boolean"&&(t&&r||!t&&!r)?!1:(t=t!=null?t:!r,e||(this.app.saveLocalStorage("pdfjs-is-themed",t?"true":null),i.onCSSChange()),!0)}focusAndSelectPageNumberEl(e){let t=this.lib.getToolbar(!0);return t?(e||(t.pageInputEl.focus(),t.pageInputEl.select()),!0):!1}showCopyFormatMenu(e){let t=this.lib.getColorPalette();return!t||!t.actionMenuEl?!1:(e||t.actionMenuEl.click(),!0)}showDisplayTextFormatMenu(e){let t=this.lib.getColorPalette();return!t||!t.displayTextFormatMenuEl?!1:(e||t.displayTextFormatMenuEl.click(),!0)}setWriteFile(e,t){let i=this.lib.getColorPalette();return!i||!this.lib.isEditable(i.child)||i.writeFile===t?!1:(e||i.setWriteFile(t),!0)}toggleAutoFocus(){this.plugin.toggleAutoFocus()}toggleAutoPaste(){this.plugin.toggleAutoPaste()}addPage(e){let t=this.lib.getPDFViewerChild(!0);if(!t||!this.lib.isEditable(t))return!1;let i=t.file;return i?(e||this.lib.composer.addPage(i),!0):!1}insertPage(e,t){let i=this.lib.workspace.getActivePDFView();if(!i||!i.file)return!1;let r=i.file,o=i.viewer.child;if(!o||!this.lib.isEditable(o))return!1;let s=i.getState().page,a=s+(t?0:1);return e||this._insertPage(r,a,s),!0}_insertPage(e,t,i){new Gn(this.plugin,this.settings.askPageLabelUpdateWhenInsertPage,this.settings.pageLabelUpdateWhenInsertPage,!1,!1).ask().then(r=>{this.lib.composer.insertPage(e,t,i,r)})}deletePage(e){let t=this.lib.workspace.getActivePDFView();if(!t||!t.file)return!1;let i=t.file,r=t.viewer.child;if(!r||!this.lib.isEditable(r))return!1;let o=t.getState().page;return e||this._deletePage(i,o),!0}_deletePage(e,t){new wu(e,t,this.plugin).openIfNeccessary().then(()=>{new Gn(this.plugin,this.settings.askPageLabelUpdateWhenDeletePage,this.settings.pageLabelUpdateWhenDeletePage,!1,!1).ask().then(i=>{this.lib.composer.removePage(e,t,i)})})}extractThisPage(e){let t=this.lib.workspace.getActivePDFView();if(!t)return!1;let i=t.file;if(!i)return!1;let r=t.viewer.child;if(!r||!this.lib.isEditable(r))return!1;if(!e){let o=t.getState().page;this._extractPage(i,o)}return!0}_extractPage(e,t){let i=this.lib.getAvailablePathForCopy(e);new Gn(this.plugin,this.settings.askPageLabelUpdateWhenExtractPage,this.settings.pageLabelUpdateWhenExtractPage,this.settings.askExtractPageInPlace,this.settings.extractPageInPlace).ask().then((r,o)=>{this.lib.composer.extractPages(e,[t],i,!1,r,o).then(async s=>{if(!s){new ct.Notice(`${this.plugin.manifest.name}: Failed to extract page.`);return}if(this.settings.openAfterExtractPages){let a=this.lib.workspace.getLeaf(this.settings.howToOpenExtractedPDF);await a.openFile(s),await this.lib.workspace.revealLeaf(a)}})})}dividePDF(e){let t=this.lib.workspace.getActivePDFView();if(!t)return!1;let i=t.file;if(!i)return!1;let r=t.viewer.child;if(!r||!this.lib.isEditable(r))return!1;if(!e){let o=t.getState().page;this._dividePDF(i,o)}return!0}_dividePDF(e,t){let i=this.lib.getAvailablePathForCopy(e);new Gn(this.plugin,this.settings.askPageLabelUpdateWhenExtractPage,this.settings.pageLabelUpdateWhenExtractPage,this.settings.askExtractPageInPlace,this.settings.extractPageInPlace).ask().then((r,o)=>{this.lib.composer.extractPages(e,{from:t},i,!1,r,o).then(async s=>{if(!s){new ct.Notice(`${this.plugin.manifest.name}: Failed to divide PDF.`);return}if(this.settings.openAfterExtractPages){let a=this.lib.workspace.getLeaf(this.settings.howToOpenExtractedPDF);await a.openFile(s),await this.lib.workspace.revealLeaf(a)}})})}createPDF(){var s,a,c;let e=this.app.workspace.getActiveFile(),t=this.settings.newPDFLocation,i=t==="root"?"/":t=="current"?(a=(s=e==null?void 0:e.parent)==null?void 0:s.path)!=null?a:"":(0,ct.normalizePath)(this.settings.newPDFFolderPath),r=(c=this.app.vault.getAbstractFileByPath(i))!=null?c:this.app.vault.getRoot(),o=this.app.vault.getAvailablePath((0,ct.normalizePath)(r.path+"/Untitled"),"pdf");new Fu(this.plugin).askOptions().then(async l=>{let d=await this.app.vault.createBinary(o,await l.save());await this.app.workspace.getLeaf("tab").openFile(d)})}editPageLabels(e){let t=this.lib.workspace.getActivePDFView();if(!t||!t.viewer.child||!this.lib.isEditable(t.viewer.child))return!1;let i=t.file;return i?(e||new Cu(this.plugin,i).open(),!0):!1}copyOutline(e,t){let i=this.lib.getPDFViewerChild(!0),r=i==null?void 0:i.file;if(!i||!r||!i.pdfViewer.pdfSidebar.haveOutline)return!1;if(!e){let s=t==="list"?this.settings.copyOutlineAsListFormat:this.settings.copyOutlineAsHeadingsFormat,a=t==="list"?this.settings.copyOutlineAsListDisplayTextFormat:this.settings.copyOutlineAsHeadingsDisplayTextFormat,c=this.settings.copyOutlineAsHeadingsMinLevel;(async()=>{let l=await Ge.fromFile(r,this.plugin),d="",h=this.app.vault.getConfig("useTab"),u=this.app.vault.getConfig("tabSize"),p=h?" ":" ".repeat(u);await l.iterAsync({enter:async f=>{var m;if(!f.isRoot()){let x=null,g=f.getExplicitDestination();g&&(x=await this.lib.destArrayToSubpath(g));let b=x?(m=$o(x))==null?void 0:m.page:void 0,w=x&&b!==void 0?this.lib.copyLink.getTextToCopy(i,s,a,r,b,x,f.title,"",""):f.title;t==="list"?d+=`${p.repeat(f.depth-1)}- ${w} +`:t==="heading"&&(d+="#".repeat(f.depth+c-1)+` ${w} +`)}}}),navigator.clipboard.writeText(d),new ct.Notice(`${this.plugin.manifest.name}: Outline copied to clipboard.`)})()}return!0}addOutlineItem(e){let t=this.lib.workspace.getActivePDFView(),i=t==null?void 0:t.file,r=t==null?void 0:t.viewer.child;if(!t||!i||!r||!this.lib.isEditable(r))return!1;let o=t.getState(),s=this.lib.viewStateToDestArray(o,!0);return s?(e||new jr(this.plugin,"Add to outline").ask().then(async({title:a})=>{let c=await Ge.fromFile(i,this.plugin),l=c.doc;c.ensureRoot().createChild(a,s).updateCountForAllAncestors(),c.ensureRoot().sortChildren(),await this.app.vault.modifyBinary(i,await l.save())}),!0):!1}async createNewNote(){var d;let e=this.app.workspace.getActiveFile(),t=(d=e==null?void 0:e.path)!=null?d:"",i=this.app.fileManager.getNewFileParent(t),r="",o="";if(e&&e.extension==="pdf"){let h=new sd(this.plugin,{file:e,folder:e.parent,app:this.app}),u=this.settings.newFileNameFormat;u&&(r=h.evalTemplate(u));let p=this.settings.newFileTemplatePath;if(p){let f=this.app.vault.getAbstractFileByPath(p);f instanceof ct.TFile&&(o=await this.app.vault.read(f),o=h.evalTemplate(o))}}let s=await this.app.fileManager.createNewMarkdownFile(i,r,o||void 0),a=async()=>{let{leaf:h,isExistingLeaf:u}=await this.lib.copyLink.prepareMarkdownLeafForPaste(s);if(h){await this.lib.workspace.revealLeaf(h),this.app.workspace.setActiveLeaf(h);let p=h.view;if(p instanceof ct.MarkdownView){let f=p.editor;f.focus(),u||f.exec("goEnd")}}};if(this.settings.howToOpenAutoFocusTargetIfNotOpened!=="hover-editor"){await a();return}let l=this.app.metadataCache.on("resolve",async h=>{h===s&&(this.app.metadataCache.offref(l),setTimeout(()=>a(),100))})}extractHighlightedText(e){let t=this.lib.getPDFViewerChild();if(!t)return!1;let i=t.file;if(!i)return!1;if(!e){let r=this.lib.getColorPaletteFromChild(t),o=r?this.settings.copyCommands[r.actionIndex].template:this.settings.copyCommands[this.settings.defaultColorPaletteActionIndex].template,s="";(async()=>{var l;let a=(l=this.lib.getPDFDocument(!0))!=null?l:await this.lib.loadPDFDocument(i);(await this.lib.highlight.extract.getAnnotatedTextsInDocument(a)).forEach((d,h)=>{d.forEach(({text:u,rgb:p,comment:f},m)=>{s&&(s=s.trimEnd()+` + +`);let x=p?`${p.r},${p.g},${p.b}`:"";s+=this.lib.copyLink.getTextToCopy(t,o,void 0,i,h,`#page=${h}&annotation=${m}`,u,x,void 0,f)})}),s?(await navigator.clipboard.writeText(s),new ct.Notice(`${this.plugin.manifest.name}: Highlighted text copied to clipboard.`)):new ct.Notice(`${this.plugin.manifest.name}: No highlighted text found.`)})()}return!0}async copyDebugInfo(){let e=await yg(this.app),t=Object.assign({},this.settings,{author:"*".repeat(this.settings.author.length)}),i=vg(this.app),r=this.plugin.domManager.styleEl.textContent,o=`#### Obsidian debug info + +`;for(let[s,a]of Object.entries(e)){if(Array.isArray(a)){o+=`- ${s}: ${a.length} +`,a.forEach(c=>{o+=` - ${c} +`});continue}o+=`- ${s}: ${a} +`}o+=` +#### PDF++ debug info + +`,o+="```\n"+JSON.stringify({settings:t,styleSettings:i,styleSheet:r})+"\n```\n",await navigator.clipboard.writeText(o),new ct.Notice(`${this.plugin.manifest.name}: Debug info copied to clipboard.`)}loadDebugInfo(e){return this.plugin.isDebugMode?(e||(async()=>{try{let{settings:t,styleSettings:i,styleSheet:r}=JSON.parse(await navigator.clipboard.readText());new ct.Notice(`${this.plugin.manifest.name}: Debug info loaded from clipboard.`),console.debug("Loaded debug info:"),console.debug("- settings:",t),console.debug("- styleSettings:",i),console.debug("- styleSheet:",r),window.pdfPlusDebugInfo={settings:t,styleSettings:i,styleSheet:r},this.plugin.settings=t;let o=this.app.setting.pluginTabs.find(s=>s.id===this.plugin.manifest.id);o&&await o.hide()}catch(t){console.error(t),new ct.Notice(`${this.plugin.manifest.name}: Debug info not found in clipboard.`)}})(),!0):!1}importExternalFileIntoVault(e){let t=this.lib.getPDFViewerChild(!0);return!t||!t.isFileExternal||!t.palette?!1:(e||t.palette.importFile(),!0)}openExternalSource(e){let t=this.lib.getPDFViewerChild(!0),i=t==null?void 0:t.file;return!t||!t.isFileExternal||!i?!1:(e||(async()=>{let r=(await this.app.vault.read(i)).trim();window.open(r,"_blank")})(),!0)}createDummyForExternalPDF(){new Fa(this.plugin).open()}showContextMenu(e){let t=this.lib.getPDFViewerChild(!0);if(!t)return!1;let r=t.containerEl.doc.getSelection();return!r||!r.focusNode||r.isCollapsed?!1:(e||Ru(this.plugin,t,r),!0)}};var ii=require("obsidian");var df=class extends Be{constructor(...e){super(...e),this.fileOperator=new nm(this.plugin),this.linkUpdater=new rm(this.plugin)}isEnabled(){return this.settings.enablePDFEdit}async addPage(e){return await this.linkUpdater.updateLinks(()=>this.fileOperator.addPage(e),[e],(t,i)=>({}))}async insertPage(e,t,i,r){return await this.linkUpdater.updateLinks(()=>this.fileOperator.insertPage(e,t,i,r),[e],(o,s)=>({pageNumber:typeof s=="number"&&s>=t?s+1:s}))}async removePage(e,t,i){return await this.linkUpdater.updateLinks(()=>this.fileOperator.removePage(e,t,i),[e],(r,o)=>({pageNumber:typeof o=="number"&&o>t?o-1:o}))}async mergeFiles(e,t,i){let r=(await this.fileOperator.read(e)).getPageCount();return await this.linkUpdater.updateLinks(()=>this.fileOperator.mergeFiles(e,t,i),[e,t],(o,s)=>o===e?{}:{file:e,pageNumber:typeof s=="number"?s+r:s})}async extractPages(e,t,i,r,o,s){let a;return Array.isArray(t)?a=t:(t.from===void 0&&(t.from=1),t.to===void 0&&(t.to=(await this.fileOperator.read(e)).getPageCount()),a=fg(t.from,t.to+1)),await this.linkUpdater.updateLinks(()=>this.fileOperator.extractPages(e,a,i,r,o,s),[e],(c,l)=>{if(l===void 0)return{};if(a.includes(l))return{file:i,pageNumber:a.filter(d=>d<=l).length};if(s){let d=a.filter(h=>h0?{pageNumber:l-d}:{}}return{}})}},nm=class extends Be{constructor(...e){super(...e),this.pageLabelUpdater=new om(this.plugin)}async read(e){return await this.lib.loadPdfLibDocument(e)}async write(e,t,i){let r=await t.save(),o=this.app.vault.getAbstractFileByPath(e);if(o instanceof ii.TFile)return i||new ii.Notice(`${this.plugin.manifest.name}: File already exists: ${e}`),await this.app.vault.modifyBinary(o,r),o;if(o===null){let s=(0,ii.normalizePath)(e.split("/").slice(0,-1).join("/"));return s&&(this.app.vault.getAbstractFileByPath(s)||await this.app.vault.createFolder(s)),await this.app.vault.createBinary(e,r)}return null}async addPage(e){let t=await this.read(e),i=t.getPage(t.getPageCount()-1),{width:r,height:o}=i.getSize();return t.addPage([r,o]),await this.write(e.path,t,!0)}async insertPage(e,t,i,r){let o=await this.read(e);this.pageLabelUpdater.insertPage(o,t,r);let s=o.getPage(i-1),{width:a,height:c}=s.getSize();return o.insertPage(t-1,[a,c]),await this.write(e.path,o,!0)}async removePage(e,t,i){let r=await this.read(e);return this.pageLabelUpdater.removePage(r,t,i),r.removePage(t-1),await(await Ge.fromDocument(r,this.plugin)).prune(),await this.write(e.path,r,!0)}async mergeFiles(e,t,i){let[r,o]=await Promise.all([this.read(e),this.read(t)]);this.pageLabelUpdater.mergeFiles(r,o,i);let s=await r.copyPages(o,o.getPageIndices());for(let c of s)r.addPage(c);let a=await this.write(e.path,r,!0);return a===null?null:(await this.app.fileManager.trashFile(t),a)}async extractPages(e,t,i,r,o,s){if(t.length===0)throw new Error("No pages to extract");return s?await this.extractPagesInPlace(e,t,i,r,o):await this.extractPagesAsNewFile(e,t,i,r,o)}async extractPagesInPlace(e,t,i,r,o){let[s,a]=await Promise.all([this.read(e),this.read(e)]),c=[];for(let h=1;h<=s.getPageCount();h++)t.includes(h)||c.push(h);this.pageLabelUpdater.removePages(s,t,o),this.pageLabelUpdater.removePages(a,c,o);for(let h=s.getPageCount();h>=1;h--)t.includes(h)?s.removePage(h-1):a.removePage(h-1);await Promise.all([s,a].map(async h=>{await(await Ge.fromDocument(h,this.plugin)).prune()}));let[l,d]=await Promise.all([this.write(e.path,s,!0),this.write(i,a,r)]);return d}async extractPagesAsNewFile(e,t,i,r,o){let s=await this.read(e),a=[];for(let l=1;l<=s.getPageCount();l++)t.includes(l)||a.push(l);this.pageLabelUpdater.removePages(s,a,o);for(let l of a.sort((d,h)=>h-d))s.removePage(l-1);return await(await Ge.fromDocument(s,this.plugin)).prune(),await this.write(i,s,r)}},rm=class extends Be{async updateLinks(e,t,i){await this.lib.metadataCacheUpdatePromise;let r=new Map;for(let c of t){let l=this.app.metadataCache.getBacklinksForFile(c);for(let d of l.keys()){let h=l.get(d);for(let u of h!=null?h:[]){let p=this.getNewLinkText(u.link,d,c,i);if(typeof p!="string")continue;let f=this.getNewLink(u,p),m=u.position;r.has(d)||r.set(d,[]),r.get(d).push({position:m,newLink:f})}}}let o=await e();if(!o)return null;let s=[],a={files:0,links:0};for(let[c,l]of r){let d=this.app.vault.getAbstractFileByPath(c);d instanceof ii.TFile&&(l.sort((h,u)=>u.position.start.offset-h.position.start.offset),s.push(this.app.vault.process(d,h=>{for(let{position:u,newLink:p}of l)h=h.slice(0,u.start.offset)+p+h.slice(u.end.offset),a.links++;return h})),l.length>0&&a.files++)}return await Promise.all(s),a.links&&new ii.Notice(`${this.plugin.manifest.name}: Updated ${a.links} links in ${a.files} files.`),o}getNewLinkText(e,t,i,r){let{path:o,subpath:s}=(0,ii.parseLinktext)(e),a;s.startsWith("#")&&(s=s.slice(1));let c=new URLSearchParams(s),l=c.get("page");l!==null&&(a=+l);let{file:d,pageNumber:h}=r(i,a);if(d===void 0&&h===void 0)return;let u=o;if(d instanceof ii.TFile){let m=!this.app.vault.getConfig("useMarkdownLinks");u=this.app.metadataCache.fileToLinktext(d,t,m)}else typeof d=="string"&&(u=d);let p=s;if(typeof h=="number"){p="",c.set("page",""+h);for(let[m,x]of c)p+=`${m}=${x}&`;p.endsWith("&")&&(p=p.slice(0,-1))}return u+(p?"#"+p:"")}getNewDisplay(e){return e}getNewLink(e,t){let i=e.original,r=e.displayText,o=e.link,s=i.startsWith("!");s&&(i=i.slice(1));let a="";return i.startsWith("[[")&&i.endsWith("]]")?typeof r=="string"&&i===`[[${o}|${r}]]`?a=`[[${t}|${r}]]`:a=`[[${t}]]`:i.startsWith("[")&&i.endsWith(")")&&(a=`[${r!=null?r:""}](${Vr(t)})`),s&&(a="!"+a),a}async updateLinkColor(e,t,i,r){r=Object.assign({linktext:!0,callout:!0},r);let o=this.app.vault.getAbstractFileByPath(t);if(!(o instanceof ii.TFile))return;let s=e.link,{path:a,subpath:c}=(0,ii.parseLinktext)(s),l=new URLSearchParams(c.startsWith("#")?c.slice(1):c);i&&r.linktext?l.set("color",i.type==="name"?i.name.toLowerCase():`${i.rgb.r},${i.rgb.g},${i.rgb.b}`):l.delete("color");let d="";for(let[p,f]of l.entries())d+=d?`&${p}=${f}`:`#${p}=${f}`;let h=a+d,u=this.getNewLink(e,h);if("position"in e){let p=e.position;await this.app.vault.process(o,f=>{var m,x;if(f=f.slice(0,p.start.offset)+u+f.slice(p.end.offset),r.callout){let b=((x=(m=this.app.metadataCache.getFileCache(o))==null?void 0:m.sections)!=null?x:[]).find(w=>w.position.start.offset<=p.start.offset&&p.end.offset<=w.position.end.offset);if(b&&b.type==="callout"){let w=f.split(/\r?\n/),y=b.position.start.line,F=w[y],D=new RegExp(`> *\\[\\! *${this.settings.calloutType} *(\\|(.*?))?\\]`,"i");w[y]=F.replace(D,`> [!${this.settings.calloutType}${i?`|${i.type==="name"?i.name.toLowerCase():`${i.rgb.r},${i.rgb.g},${i.rgb.b}`}`:""}]`),f=w.join(` +`)}}return f})}else{let p=e.key;await this.app.fileManager.processFrontMatter(o,f=>{f[p]=u})}}},om=class extends Be{addPage(e){}insertPage(e,t,i){Ui.processDocument(e,r=>{if(i){r.divideRangeAtPage(t,!0).shiftRangesAfterPage(t,1).divideRangeAtPage(t,!1,o=>{delete o.prefix,delete o.style});return}r.shiftRangesAfterPage(t,1)})}removePage(e,t,i){this.removePages(e,[t],i)}removePages(e,t,i){Ui.processDocument(e,r=>{t.sort((o,s)=>s-o).forEach(o=>{this.removePageFromLabels(r,o,i)})})}removePageFromLabels(e,t,i){if(i){e.divideRangeAtPage(t+1,!0).shiftRangesAfterPage(t+1,-1);return}e.shiftRangesAfterPage(t+1,-1)}mergeFiles(e,t,i){}};var uf=require("obsidian");var sm=class{constructor(e){wf(this,"value");wf(this,"next");this.value=e}},ni,ss,as,cd=class{constructor(){mn(this,ni);mn(this,ss);mn(this,as);this.clear()}enqueue(e){let t=new sm(e);qe(this,ni)?(qe(this,ss).next=t,Lt(this,ss,t)):(Lt(this,ni,t),Lt(this,ss,t)),Ff(this,as)._++}dequeue(){let e=qe(this,ni);if(e)return Lt(this,ni,qe(this,ni).next),Ff(this,as)._--,e.value}peek(){if(qe(this,ni))return qe(this,ni).value}clear(){Lt(this,ni,void 0),Lt(this,ss,void 0),Lt(this,as,0)}get size(){return qe(this,as)}*[Symbol.iterator](){let e=qe(this,ni);for(;e;)yield e.value,e=e.next}*drain(){for(;qe(this,ni);)yield this.dequeue()}};ni=new WeakMap,ss=new WeakMap,as=new WeakMap;function am(n){f1(n);let e=new cd,t=0,i=()=>{t0&&(t++,e.dequeue()())},r=()=>{t--,i()},o=async(c,l,d)=>{let h=(async()=>c(...d))();l(h);try{await h}catch(u){}r()},s=(c,l,d)=>{new Promise(h=>{e.enqueue(h)}).then(o.bind(void 0,c,l,d)),tnew Promise(d=>{s(c,d,l)});return Object.defineProperties(a,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value(){e.clear()}},concurrency:{get:()=>n,set(c){f1(c),n=c,queueMicrotask(()=>{for(;t0;)i()})}},map:{async value(c,l){let d=c.map((h,u)=>this(l,h,u));return Promise.all(d)}}}),a}function f1(n){if(!((Number.isInteger(n)||n===Number.POSITIVE_INFINITY)&&n>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var hf=class hf extends uf.Component{constructor(t,i,r,o,s,a,c,l){super();this.plugin=t;this.ctx=i;this.file=r;this.subpath=o;this.pageNumber=s;this.rect=a;this.width=c;this.annotationId=l;this.app=i.app,this.containerEl=i.containerEl,this.rect=window.pdfjsLib.Util.normalizeRect(a),this.containerEl.addClass("pdf-cropped-embed"),c&&this.containerEl.setAttribute("width",""+c)}get lib(){return this.plugin.lib}onload(){super.onload(),this.shouldUpdateOnModify()&&this.registerEvent(this.app.vault.on("modify",t=>{t===this.file&&this.loadFile()})),this.plugin.settings.rectFollowAdaptToTheme&&(this.registerEvent(this.app.workspace.on("css-change",()=>{this.loadFile()})),this.registerEvent(this.plugin.on("adapt-to-theme-change",()=>{this.loadFile()})))}shouldUpdateOnModify(){return typeof this.annotationId=="string"}async loadFile(){let t=await hf.limit(this.computeDataUrl.bind(this));await new Promise((i,r)=>{this.containerEl.empty(),this.containerEl.createEl("img",{attr:{src:t}},o=>{o.addEventListener("load",()=>i()),o.addEventListener("error",c=>r(c));let s=this.containerEl.getAttribute("width"),a=this.containerEl.getAttribute("height");s&&o.setAttribute("width",s),a&&o.setAttribute("height",a)}),activeWindow.setTimeout(()=>r(),5e3)})}async computeDataUrl(){let t=await this.lib.loadPDFDocument(this.file),i=await t.getPage(this.pageNumber);if(this.annotationId){let s=(await i.getAnnotations()).find(a=>a.id===this.annotationId);s&&Array.isArray(s.rect)&&(this.rect=window.pdfjsLib.Util.normalizeRect(s.rect))}let r=await this.lib.pdfPageToImageDataUrl(i,{type:"image/png",cropRect:this.rect,renderParams:this.lib.getOptionalRenderParameters()});return await t.destroy(),r}};hf.limit=am(uf.Platform.isMobile?3:10);var Jr=hf;var ff=class extends Be{get ttsPlugin(){var e;return(e=this.app.plugins.plugins["obsidian-tts"])!=null?e:null}isEnabled(){return!!this.ttsPlugin}async speak(e){var t;await((t=this.ttsPlugin)==null?void 0:t.say(e))}};var Qn=require("obsidian");var pf=class extends Be{async createDummyFilesInFolder(e,t){if(!!!this.app.vault.getFolderByPath(e))try{await this.app.vault.createFolder(e)}catch(r){return console.error(`${this.plugin.manifest.name}: Failed to create folder "${e}" due to the following error: `,r),[]}return await Promise.all(t.map(async r=>{let o=r.split("/").pop().replace(/%20/g," ");Qn.Platform.isWin&&(o=o.replace(/\?/g," "));let s=(0,Qn.normalizePath)(e+"/"+o);s.endsWith(".pdf")&&(s=s.slice(0,-4));let a=this.app.vault.getAvailablePath(s,"pdf");try{return await this.app.vault.create(a,r)}catch(c){throw console.error(`${this.plugin.manifest.name}: Failed to create a dummy file "${a}" due to the following error: `,c),c}}))}async createDummyFilesFromObsidianUrl(e){let t=e["create-dummy"].replace(/^.*((https?)|(file):\/\/)/,"$1"),i=new Fa(this.plugin);if(i.source=t.startsWith("http")?"web":"file",i.uris=[t],"folder"in e){let r=e.folder;i.folderPath=(0,Qn.normalizePath)(r),await i.createDummyFiles();let o=this.lib.workspace.getActivePDFView();o&&o.setEphemeralState({rename:"all"});return}i.open()}async createDummyFilesOnEditorDrop(e,t,i){if(e.defaultPrevented||!ag(e,this.settings.modifierToDropExternalPDFToCreateDummy)||!e.dataTransfer)return;let r=this.getUrisFromDataTransfer(e.dataTransfer);if(r.length){e.preventDefault();let o=this.getFolderPathForDummyFiles(i.file),s=await this.createDummyFilesInFolder(o,r);new Qn.Notice(`${this.plugin.manifest.name}: Dummy files created successfully.`),s.forEach((a,c)=>{var d,h;let l=this.app.fileManager.generateMarkdownLink(a,(h=(d=i.file)==null?void 0:d.path)!=null?h:"");cr.type==="application/pdf"))return i.map(r=>{let o=window.electron.webUtils.getPathForFile(r);return this.absolutePathToFileUri(o)})}let t=e.getData("text/uri-list").split(`\r +`).filter(i=>!i.startsWith("#"));return t.length&&t.every(i=>this.isUriPdf(i))?t:[]}getFolderPathForDummyFiles(e){var i;let t=this.settings.dummyFileFolderPath||this.app.vault.getConfig("attachmentFolderPath");return t==="."||t.startsWith("./")?(0,Qn.normalizePath)(((i=e==null?void 0:e.parent)!=null?i:this.app.vault.getRoot()).path+"/"+t.slice(1)):(0,Qn.normalizePath)(t)}absolutePathToFileUri(e){return e=e.replace(/\\/g,"/").replace(/ /g,"%20"),"file://"+(e.startsWith("/")?"":"/")+e}isUriPdf(e){return this.settings.externalURIPatterns.map(t=>new RegExp(t)).some(t=>t.test(e))}};var gf=class{constructor(e){this.utils=Tg;this.PDFCroppedEmbed=Jr;this.PDFOutlines=Ge;this.NameTree=wa;this.NumberTree=Wr;this.PDFNamedDestinations=Pa;this.PDFPageLabels=Ui;this.app=e.app,this.plugin=e,this.commands=new cf(e),this.copyLink=new Qu(e),this.highlight=new sf(e),this.workspace=new af(e),this.composer=new df(e),this.dummyFileManager=new pf(e),this.speech=new ff(e)}registerPDFEvent(e,t,i,r){let o=async s=>{await r(s),i||t.off(e,o)};i==null||i.register(()=>t.off(e,o)),t.on(e,o)}onPageReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{i(s+1,o,!1)}),this.registerPDFEvent("pagerendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}onTextLayerReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{o.textLayer&&i(s+1,o,!1)}),this.registerPDFEvent("textlayerrendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}onAnnotationLayerReady(e,t,i){var r;(r=e.pdfViewer)==null||r._pages.forEach((o,s)=>{o.annotationLayer&&i(s+1,o,!1)}),this.registerPDFEvent("annotationlayerrendered",e.eventBus,t,o=>{i(o.pageNumber,o.source,!0)})}applyPDFViewStateToViewer(e,t){let i=()=>{typeof t.left=="number"&&typeof t.top=="number"&&typeof t.zoom=="number"?e.scrollPageIntoView({pageNumber:t.page,destArray:[t.page,{name:"XYZ"},t.left,t.top,t.zoom]}):e.currentPageNumber=t.page};e.pagesCount?i():this.registerPDFEvent("pagesloaded",e.eventBus,null,()=>i())}getPageElAssociatedWithNode(e){let t=e.instanceOf(HTMLElement)?e:e.parentElement;if(!t)return null;let i=t.closest(".page");return!i||!i.instanceOf(HTMLElement)?null:i}getPageElFromSelection(e){let t=e.rangeCount>0?e.getRangeAt(0):null;return t?this.getPageElAssociatedWithNode(t.startContainer):null}getPageElFromEvent(e){return qc(e,e.target)?this.getPageElAssociatedWithNode(e.target):null}getPageNumberFromEvent(e){let t=this.getPageElFromEvent(e),i=t==null?void 0:t.dataset.pageNumber;return i===void 0?null:+i}getToolbarAssociatedWithNode(e){let t=e.instanceOf(HTMLElement)?e:e.parentElement;if(!t)return null;let i=t.closest(".pdf-container"),r=i==null?void 0:i.previousElementSibling;return r&&r.hasClass("pdf-toolbar")?r:null}getToolbarAssociatedWithSelection(){let e=activeWindow.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0);return this.getToolbarAssociatedWithNode(t.startContainer)}return null}getColorPalette(){var t;let e=(t=this.getPDFViewerChild(!0))!=null?t:this.plugin.lastAnnotationPopupChild;return e?this.getColorPaletteFromChild(e):this.getColorPaletteAssociatedWithSelection()}getColorPaletteOptions(){let e=this.getColorPalette();if(e)return e.getState();let t=this.plugin.settings;return{selectedColorName:[null,...Object.keys(t.colors)][t.defaultColorPaletteItemIndex],actionIndex:t.defaultColorPaletteActionIndex,displayTextFormatIndex:t.defaultDisplayTextFormatIndex,writeFile:t.defaultWriteFileToggle}}getColorPaletteAssociatedWithNode(e){var r;let t=this.getToolbarAssociatedWithNode(e);if(!t)return null;let i=t.querySelector("."+ti.CLS);return i&&(r=ti.elInstanceMap.get(i))!=null?r:null}getColorPaletteAssociatedWithSelection(){let e=activeWindow.getSelection();if(e&&e.rangeCount>0){let t=e.getRangeAt(0);return this.getColorPaletteAssociatedWithNode(t.startContainer)}return null}getColorPaletteFromChild(e){var i;let t=(i=e.pdfViewer.dom)==null?void 0:i.viewerEl;return t?this.getColorPaletteAssociatedWithNode(t):null}getColorPaletteContainedIn(e){for(let[t,i]of ti.elInstanceMap)if(e.contains(t))return i;return null}getPDFViewerChildAssociatedWithNode(e){let t,i=e.instanceOf(HTMLElement)?e:e.parentElement;if(i){let r=i.closest(".pdf-container");r&&(t=this.plugin.pdfViewerChildren.get(r))}return t||this.workspace.iteratePDFViewerChild(r=>{!t&&r.containerEl.contains(e)&&(t=r)}),t!=null?t:null}getPDFViewerChildFromSelection(e){let t=e.rangeCount>0?e.getRangeAt(0):null;return t?this.getPDFViewerChildAssociatedWithNode(t.startContainer):null}async destIdToSubpath(e,t){let i=await t.getDestination(e);return i?this.pdfJsDestArrayToSubpath(i,t):null}async pdfJsDestArrayToSubpath(e,t){let i=await t.getPageIndex(e[0]);return this.destArrayToSubpath(this.normalizePDFJsDestArray(e,i+1))}normalizePDFJsDestArray(e,t){return[t-1,e[1].name,...e.slice(2)]}normalizePdfLibDestArray(e,t){let i=e.get(0);if(!(i instanceof Y))return null;let r=t.getPages().findIndex(s=>s.ref===i);if(r===-1)return null;let o=e.get(1);return o instanceof v?[r,o.decodeText(),...e.asArray().slice(2).map(s=>s instanceof G?s.asNumber():null)]:null}async ensureDestArray(e,t){if(typeof e=="string"){let i=await t.getDestination(e);if(!i)return null;e=this.normalizePDFJsDestArray(i,await t.getPageIndex(i[0])+1)}return e}async destToPageNumber(e,t){if(typeof e=="string"){let i=await t.getDestination(e);return i?await t.getPageIndex(i[0])+1:null}return e[0]+1}destArrayToSubpath(e){var a;let t=e[0],i="",r="",o="";return e[1]==="XYZ"?(typeof e[2]=="number"&&(r+=Math.round(e[2])),typeof e[3]=="number"&&(i+=Math.round(e[3])),o=""+Math.round(((a=e[4])!=null?a:0)*100)/100):e[1]==="FitBH"&&typeof e[2]=="number"&&(i+=e[2]),`#page=${t+1}&offset=${r},${i},${o}`}viewStateToSubpath(e,t=!1){var i;if(typeof e.left=="number"&&typeof e.top=="number"){let r=`#page=${e.page}`;return t?r+=`&offset=,${e.top},`:r+=`&offset=${e.left},${e.top},${(i=e.zoom)!=null?i:0}`,r}return null}viewStateToDestArray(e,t=!1){var i;return typeof e.left=="number"&&typeof e.top=="number"?t?[e.page-1,"FitBH",e.top]:[e.page-1,"XYZ",e.left,e.top,(i=e.zoom)!=null?i:0]:null}getPageLabelTree(e){let t=lt(e.catalog,"PageLabels");return t instanceof W?new Wr(t):null}getAnnotationInfoFromAnnotationElement(e){return{page:e.parent.page.pageNumber,id:e.data.id}}getAnnotationInfoFromPopupEl(e){if(!e.matches(".popupWrapper[data-annotation-id]"))return null;let t=e.closest("div.page");if(!t||t.dataset.pageNumber===void 0)return null;let i=+t.dataset.pageNumber,r=e.dataset.annotationId;return r===void 0?null:{page:i,id:r}}registerGlobalDomEvent(e,t,i,r){e.registerDomEvent(document,t,i,r),this.app.workspace.onLayoutReady(()=>{let o=new Set;this.app.workspace.iterateAllLeaves(s=>{let a=s.getContainer().win;a!==window&&o.add(a)}),o.forEach(s=>{e.registerDomEvent(s.document,t,i,r)}),e.registerEvent(this.app.workspace.on("window-open",(s,a)=>{e.registerDomEvent(a.document,t,i,r)}))})}generateMarkdownLink(e,t,i,r){let o=this.app,s=o.vault.getConfig("useMarkdownLinks"),a=!s,l=o.metadataCache.fileToLinktext(e,t,a)+(i||"");e.path===t&&i&&(l=i);let d;return s?d="[".concat(r||e.basename,"](").concat(Vr(l),")"):(r&&r.toLowerCase()===l.toLowerCase()&&(l=r,r=void 0),d=r?"[[".concat(l,"|").concat(r,"]]"):"[[".concat(l,"]]")),e.extension!=="md"?"!"+d:d}getBacklinkIndexForFile(e){return new ka(this.plugin,e)}async getLatestBacklinkIndexForFile(e){let t=this.getBacklinkIndexForFile(e);return await this.metadataCacheUpdatePromise,t.init(),t}async getLatestBacklinksForAnnotation(e,t,i){return(await this.getLatestBacklinkIndexForFile(e)).getPageIndex(t).annotations.get(i)}isBacklinked(e,t){if(t){let{page:c,selection:l,annotation:d}=t;if(isNaN(c)||c<1)throw new Error("Invalid page number");if(l&&(l.length!==4||l.some(h=>isNaN(h))))throw new Error("Invalid selection");if(l&&typeof d=="string")throw new Error("Selection and annotation cannot be used together")}let i=!t,r=t&&!t.selection&&!t.annotation,o=t&&!!t.selection,s=typeof(t==null?void 0:t.annotation)=="string",a=this.app.metadataCache.getBacklinksForFile(e);if(i)return a.count()>0;for(let c of a.keys()){let l=a.get(c);if(l)for(let d of l){let{subpath:h}=(0,ve.parseLinktext)(d.link),u=$o(h);if(u&&(r&&u.page===t.page||o&&"beginIndex"in u&&u.page===t.page&&u.beginIndex===t.selection[0]&&u.beginOffset===t.selection[1]&&u.endIndex===t.selection[2]&&u.endOffset===t.selection[3]||s&&"annotation"in u&&u.page===t.page&&u.annotation===t.annotation))return!0}}return!1}getPDFView(e=!1){let t=this.workspace.getActivePDFView();if(t)return t;if(!e){let i;if(this.app.workspace.iterateAllLeaves(r=>{this.isPDFView(r.view)&&(i=r.view)}),i)return i}return null}getPDFEmbedsInComponent(e,t){let i=[];return yu(e,r=>{if(t&&i.length)return!1;if(this.isPDFEmbed(r))return i.push(r),!1}),i}getPDFEmbedInMarkdownView(e){var t;return(t=this.getPDFEmbedsInComponent(e.currentMode,!0).first())!=null?t:null}getAllPDFEmbedsInMarkdownView(e){return this.getPDFEmbedsInComponent(e.currentMode,!1)}getPDFEmbedInCanvasView(e){let t=Array.from(e.canvas.nodes.values());for(let i of t)if("child"in i&&i.child instanceof ve.Component){let r=this.getPDFEmbedsInComponent(i.child,!0);if(r.length)return r[0]}return null}getAllPDFEmbedsInCanvasView(e){return Array.from(e.canvas.nodes.values()).flatMap(t=>"child"in t&&t.child instanceof ve.Component?this.getPDFEmbedsInComponent(t.child,!1):[])}getPDFEmbedInExcalidrawView(e){for(let t of e.embeddableLeafRefs.values()){let i=t.node;if(i&&"child"in i&&i.child instanceof ve.Component){let r=this.getPDFEmbedsInComponent(i.child,!0);if(r.length)return r[0]}}return null}getAllPDFEmbedsInExcalidrawView(e){return Array.from(e.embeddableLeafRefs.values()).flatMap(t=>{let i=t.node;return i?"child"in i&&i.child instanceof ve.Component?this.getPDFEmbedsInComponent(i.child,!1):[]:[]})}getPDFEmbedInActiveView(){let e=this.app.workspace.getActiveViewOfType(ve.MarkdownView);if(e){let r=this.getPDFEmbedInMarkdownView(e);if(r)return r}let t=this.workspace.getActiveCanvasView();if(t){let r=this.getPDFEmbedInCanvasView(t);if(r)return r}let i=this.workspace.getActiveExcalidrawView();if(i){let r=this.getPDFEmbedInExcalidrawView(i);if(r)return r}return null}getPDFEmbed(e=!1){let t=this.getPDFEmbedInActiveView();if(t)return t;if(!e){let i=null;if(this.app.workspace.iterateAllLeaves(r=>{if(i)return;let o=r.view;o instanceof ve.MarkdownView?i=this.getPDFEmbedInMarkdownView(o):this.isCanvasView(o)?i=this.getPDFEmbedInCanvasView(o):this.isExcalidrawView(o)&&(i=this.getPDFEmbedInExcalidrawView(o))}),i)return i}return null}getPDFViewerComponent(e=!1){var t,i;return(i=(t=this.getPDFView(e))!=null?t:this.getPDFEmbed())==null?void 0:i.viewer}getPDFViewerChild(e=!1){var t;return(t=this.getPDFViewerComponent(e))==null?void 0:t.child}getObsidianViewer(e=!1){var t;return(t=this.getPDFViewerChild(e))==null?void 0:t.pdfViewer}getPDFViewer(e=!1){var t;return(t=this.getObsidianViewer(e))==null?void 0:t.pdfViewer}getToolbar(e=!1){var t;return(t=this.getPDFViewerChild(e))==null?void 0:t.toolbar}getPage(e=!1){let t=this.getPDFViewer(e);return t?t.getPageView(t.currentPageNumber-1):null}getAnnotation(e){var t,i;return(i=(t=this.getPage(!0))==null?void 0:t.annotationLayer)==null?void 0:i.annotationLayer.getAnnotation(e)}getTextContentItems(){var t,i;let e=(t=this.getPage(!0))==null?void 0:t.textLayer;if(e)return(i=Dt(e))==null?void 0:i.textContentItems}getPDFDocument(e=!1){var t;return(t=this.getPDFViewer(e))==null?void 0:t.pdfDocument}getBacklinkVisualizer(e=!1){var t;return(t=this.getPDFViewerComponent(e))==null?void 0:t.visualizer}getBibliographyManager(e=!1){var t;return(t=this.getPDFViewerChild(e))==null?void 0:t.bib}getVim(e=!1){var t;return(t=this.getPDFViewerComponent(e))==null?void 0:t.vim}search(e,t,i,r){e.showSearch(),e.searchComponent.setValue(t),Object.assign(e.searchSettings,i),e.dispatchEvent("",r),this.updateSearchSettingsUI(e)}updateSearchSettingsUI(e){let t=e.settingsEl.querySelectorAll("div.checkbox-container"),i=t[0],r=t[1],o=t[2],s=e.searchComponent.containerEl.querySelector(".input-right-decorator.clickable-icon");i&&i.toggleClass("is-enabled",e.searchSettings.highlightAll),r&&r.toggleClass("is-enabled",e.searchSettings.matchDiacritics),o&&o.toggleClass("is-enabled",e.searchSettings.entireWord),s&&s.toggleClass("is-active",e.searchSettings.caseSensitive)}async getExternalPDFUrl(e){if(e.stat.size>300)return null;let t=(await this.app.vault.read(e)).trim();if(t.startsWith("https://")||t.startsWith("http://")){let i=await(0,ve.requestUrl)(t);if(i.status===200)return URL.createObjectURL(new Blob([i.arrayBuffer],{type:"application/pdf"}))}else if(t.startsWith("file:///"))return ve.Platform.resourcePathPrefix+t.substring(8);return null}async loadPDFDocument(e){let t=await this.getExternalPDFUrl(e);if(t)return await this.loadPDFDocumentFromArrayBufferOrUrl({url:t});let i=await this.app.vault.readBinary(e);return await this.loadPDFDocumentFromArrayBufferOrUrl({data:i})}async loadPDFDocumentFromArrayBuffer(e){return await this.loadPDFDocumentFromArrayBufferOrUrl({data:e})}async loadPDFDocumentFromArrayBufferOrUrl(e){return await window.pdfjsLib.getDocument({...e,cMapPacked:!0,cMapUrl:"/lib/pdfjs/cmaps/",standardFontDataUrl:"/lib/pdfjs/standard_fonts/"}).promise}async loadPdfLibDocument(e,t=!1){let i=await this.app.vault.readBinary(e);return await this.loadPdfLibDocumentFromArrayBuffer(i)}async loadPdfLibDocumentFromArrayBuffer(e,t=!1){try{return await We.load(e,{ignoreEncryption:t})}catch(i){throw i instanceof Xo&&new ve.Notice(`${this.plugin.manifest.name}: The PDF file is encrypted. This plugin currently does not support editing encrypted PDF files.`,8),i}}async getPdfLibDocument(e=!1){let t=this.getPDFDocument(e);if(t)return await this.loadPdfLibDocumentFromArrayBuffer(await t.getData())}async getPdfLibPage(e=!1){let t=this.getPDFViewer(e);if(!t)return;let i=t.currentPageNumber;if(i===void 0)return;let r=await this.loadPdfLibDocumentFromArrayBuffer(await t.pdfDocument.getData());if(r)return r.getPage(i-1)}async getPDFOutlines(){let e=await this.getPdfLibDocument();if(e)return new Ge(this.plugin,e)}getPDFViewFromChild(e){let t=null;return this.workspace.iteratePDFViews(i=>{i.viewer.child===e&&(t=i)}),t}isPDFView(e){return this.plugin.classes.PDFView?e instanceof this.plugin.classes.PDFView:e instanceof ve.EditableFileView&&e.getViewType()==="pdf"}isPDFEmbed(e){var t;return"loadFile"in e&&"file"in e&&"containerEl"in e&&e.file instanceof ve.TFile&&e.file.extension==="pdf"&&e.containerEl.instanceOf(HTMLElement)&&((t=e.containerEl)==null?void 0:t.matches(".pdf-embed"))&&e instanceof ve.Component&&!(e instanceof Jr)}isCanvasView(e){return e instanceof ve.TextFileView&&e.getViewType()==="canvas"&&"canvas"in e}isCanvasPDFNode(e){let t=e.getData();return t.type==="file"?t.file.endsWith(".pdf"):!1}isBacklinkView(e){return e instanceof ve.FileView&&e.getViewType()==="backlink"}isExcalidrawView(e){return e instanceof ve.TextFileView&&e.getViewType()==="excalidraw"}getAvailablePathForCopy(e){return this.app.vault.getAvailablePath(Fg(e.path),e.extension)}get metadataCacheUpdatePromise(){return new Promise(e=>this.app.metadataCache.onCleanCache(e))}async renderPDFPageToCanvas(e,t,i={}){var l;let r=createEl("canvas"),o=r.getContext("2d"),s=e.getViewport({scale:1}),a=(l=t!=null?t:window.devicePixelRatio)!=null?l:1;r.width=Math.floor(s.width*a),r.height=Math.floor(s.height*a),r.setCssStyles({width:Math.floor(s.width)+"px",height:Math.floor(s.height)+"px"});let c=[a,0,0,a,0,0];return await e.render({canvas:r,canvasContext:o,transform:c,viewport:s,...i}).promise,r}async pdfPageToImageDataUrl(e,t){let[i,r,o,s]=e.view,a=o-i,c=s-r,l=t==null?void 0:t.type,d=t==null?void 0:t.encoderOptions,h=t==null?void 0:t.resolution;typeof h!="number"&&(h=(ve.Platform.isDesktop?7:ve.Platform.isTablet?4:window.devicePixelRatio||1)*(this.plugin.settings.rectEmbedResolution/100));let u=t==null?void 0:t.cropRect,p=t==null?void 0:t.renderParams,f=await this.renderPDFPageToCanvas(e,h,p);if(!u)return f.toDataURL(l,d);let m=uu(f,360-e.rotate),x=m.width/a,g=m.height/c,b={left:(u[0]-i)*x,top:(r+c-u[3])*g,width:(u[2]-u[0])*x,height:(u[3]-u[1])*g};return uu(ig(m,b),e.rotate).toDataURL(l,d)}async pdfPageToImageArrayBuffer(e,t){var o;let r=(o=(await this.pdfPageToImageDataUrl(e,t)).match(/^data:image\/\w+;base64,(.*)/))==null?void 0:o[1];if(!r)throw new Error("Failed to convert data URL to base64");return(0,ve.base64ToArrayBuffer)(r)}getOptionalRenderParameters(){return this.plugin.settings.rectFollowAdaptToTheme&&this.app.loadLocalStorage("pdfjs-is-themed")?{background:document.body.getCssPropertyValue("--pdf-page-background"),invert:document.body.hasClass("theme-dark")}:{}}getSelectedText(e,t,i,r,o){if(t===r)return this.toSingleLine(e[t].str.slice(i,o));let s=[];s.push(e[t].str.slice(i));for(let a=t+1;at(i));return}e.pdfPlusCallbacksOnDocumentLoaded||(e.pdfPlusCallbacksOnDocumentLoaded=[]),e.pdfPlusCallbacksOnDocumentLoaded.push(t)}toSingleLine(e){return Yc(e,this.plugin.settings.removeWhitespaceBetweenCJChars)}async write(e,t,i){let r=this.app.vault.getAbstractFileByPath(e);if(r instanceof ve.TFile)return i||new ve.Notice(`${this.plugin.manifest.name}: File already exists: ${e}`),typeof t=="string"?await this.app.vault.modify(r,t):await this.app.vault.modifyBinary(r,t),r;if(r===null){let o=(0,ve.normalizePath)(e.split("/").slice(0,-1).join("/"));return o&&(this.app.vault.getAbstractFileByPath(o)||await this.app.vault.createFolder(o)),typeof t=="string"?await this.app.vault.create(e,t):await this.app.vault.createBinary(e,t)}return null}isCitationId(e){return typeof e=="string"&&this.plugin.citationIdRegex.test(e)}async checkForUpdates(e){var u,p;let{result:t,error:i}=await OC((0,ve.requestUrl)({url:"https://api.github.com/repos/ryotaushio/obsidian-pdf-plus/releases?per_page=10&page=1",headers:{accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"}}));if(i||t.status!==200)return i&&console.error(i),{success:!1,shouldUpdate:!1,detail:"Failed to connect to GitHub to check for updates."};let{result:r,error:o}=BC(()=>t.json);if(o)return console.error(o),{success:!1,shouldUpdate:!1,detail:"Failed to parse JSON releases from GitHub."};if(!Array.isArray(r)||r.length===0)return{success:!1,shouldUpdate:!1,detail:"No releases found on GitHub."};r.sort((f,m)=>new Date(m.published_at).getTime()-new Date(f.published_at).getTime());let s=(u=e==null?void 0:e.currentVersion)!=null?u:this.plugin.manifest.version,a=r.filter(f=>!f.prerelease&&!f.draft&&pa(f.tag_name,s));if(a.length===0)return{success:!0,shouldUpdate:!1,detail:"Already up-to-date."};if(a.some(f=>{let m=f.body.split(` +`)[0];return/^\s*\s*$/.test(m)}))return{success:!0,shouldUpdate:!0,detail:"There is a newer version that should be updated to immediately."};let l=a.last(),d=(new Date().getTime()-new Date(l.published_at).getTime())/(1e3*60*60),h=(p=e==null?void 0:e.minHoursSinceRelease)!=null?p:24;return d{t||this.toggle()}):null,this.iconEl&&this.registerDomEvent(this.iconEl,"contextmenu",i=>{if(t)return;let r=new p1.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.plugin.openSettingTab().scrollToHeading("auto-copy")})}),r.onHide(()=>{t=!1}),r.showAtMouseEvent(i),t=!0})}}toggle(e){e=e!=null?e:!this.settings.autoCopy,e?this.enable():this.disable()}enable(){this.settings.autoCopy=!0,this.plugin.saveSettings(),this.load()}disable(){this.settings.autoCopy=!1,this.plugin.saveSettings(),this.unload()}onload(){var e;(e=this.iconEl)==null||e.addClass("is-active")}onunload(){var e;(e=this.iconEl)==null||e.removeClass("is-active")}};var g1=require("obsidian");var xf=class extends ke{constructor(e){super(e),this.styleEl=e.registerEl(createEl("style",{attr:{id:"pdf-plus-style"}})),document.head.append(this.styleEl)}update(){this.unload(),this.plugin.removeChild(this),this.plugin.addChild(this)}registerEl(e){return this.register(()=>e.remove()),e}onload(){this.plugin.trigger("update-dom"),this.updateStyleEl(),this.updateClass("pdf-plus-click-embed-to-open-link",this.settings.dblclickEmbedToOpenLink),this.updateClass("pdf-plus-backlink-selection-highlight",this.settings.selectionBacklinkVisualizeStyle==="highlight"),this.updateClass("pdf-plus-backlink-selection-underline",this.settings.selectionBacklinkVisualizeStyle==="underline"),this.app.workspace.trigger("css-change")}updateClass(e,t){document.body.toggleClass(e,t),this.register(()=>document.body.removeClass(e))}updateStyleEl(){let e=this.plugin.settings;this.styleEl.textContent=Object.entries(e.colors).map(([r,o])=>cn(o)?[`.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight)[data-highlight-color="${r.toLowerCase()}"],`,`.pdf-embed[data-highlight-color="${r.toLowerCase()}"] .textLayer .mod-focused {`,` --pdf-plus-color: ${o};`,` --pdf-plus-backlink-icon-color: ${o};`,` --pdf-plus-rect-color: ${o};`,"}"].join(` +`):"").join(` +`);let t=e.colors[e.defaultColor];(!t||!cn(t))&&(t="rgb(var(--text-highlight-bg-rgb))"),this.styleEl.textContent+=[` +.pdf-plus-backlink-highlight-layer .pdf-plus-backlink:not(.hovered-highlight) {`,` --pdf-plus-color: ${t};`,` --pdf-plus-backlink-icon-color: ${t};`,` --pdf-plus-rect-color: ${t};`,"}"].join(` +`);let i=e.colors[e.backlinkHoverColor];(!i||!cn(i))&&(i=Mw),this.styleEl.textContent+=[` +.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.hovered-highlight {`,` --pdf-plus-color: ${i};`,` --pdf-plus-backlink-icon-color: ${i};`,` --pdf-plus-rect-color: ${i};`,"}"].join(` +`);for(let[r,o]of Object.entries(e.colors))cn(o)&&(this.styleEl.textContent+=[` +.${ti.CLS}-item[data-highlight-color="${r.toLowerCase()}"] > .${ti.CLS}-item-inner {`,` background-color: ${o};`,"}"].join(` +`));this.styleEl.textContent+=[` +.${ti.CLS}-item:not([data-highlight-color]) > .${ti.CLS}-item-inner {`," background-color: transparent;","}"].join(` +`),this.styleEl.textContent+=[` +.workspace-leaf.pdf-plus-link-opened.is-highlighted::before {`,` opacity: ${e.existingTabHighlightOpacity};`,"}"].join(` +`),this.setCSSColorVariables(),this.updateCalloutStyle()}updateCalloutStyle(){var i;if(!this.plugin.settings.useCallout)return;let e=this.plugin.settings.calloutType.toLowerCase();for(let r of Object.keys(this.plugin.settings.colors)){let o=(i=this.toCSSVariableName(r))!=null?i:"--pdf-plus-default-color-rgb";this.styleEl.textContent+=[` +.callout[data-callout="${e}"][data-callout-metadata="${r.toLowerCase()}"] {`,` --callout-color: var(${o});`," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(` +`)}this.styleEl.textContent+=[` +.callout[data-callout="${e}"] {`," --callout-color: var(--pdf-plus-default-color-rgb);"," background-color: rgba(var(--callout-color), var(--pdf-plus-highlight-opacity, 0.2))","}"].join(` +`);let t=this.plugin.settings.calloutIcon;t?this.styleEl.textContent+=[` +.callout[data-callout="${e}"] {`,` --callout-icon: lucide-${t};`,"}"].join(` +`):this.styleEl.textContent+=[` +.callout[data-callout="${e}"] .callout-icon {`," display: none;","}"].join(` +`)}registerCalloutRenderer(){let e=this.plugin.settings.calloutType.toLowerCase();this.plugin.registerMarkdownPostProcessor((t,i)=>{for(let r of t.querySelectorAll(`.callout[data-callout="${e}"][data-callout-metadata*=","]`))i.addChild(new lm(r))})}setCSSColorVariables(){let e=this.plugin.settings;for(let[i,r]of Object.entries(e.colors)){let o=this.toCSSVariableName(i),s=Mr(r);if(o!==null&&s!==null){let{r:a,g:c,b:l}=s;this.styleEl.textContent+=[` +body {`,` ${o}: ${a}, ${c}, ${l}`,"}"].join(` +`)}}let t=!1;if(e.defaultColor in e.colors){let i=this.toCSSVariableName(e.defaultColor);i!==null&&(this.styleEl.textContent+=[` +body {`,` --pdf-plus-default-color-rgb: var(${i})`,"}"].join(` +`),t=!0)}t||(this.styleEl.textContent+=[` +body {`," --pdf-plus-default-color-rgb: var(--text-highlight-bg-rgb)","}"].join(` +`))}toCSSVariableName(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-");return t=t.replace(/^-+|-+$/g,""),t?"--pdf-plus-"+t+"-rgb":null}getRgb(e){let t="--pdf-plus-default-color-rgb";if(e){let o=this.toCSSVariableName(e);o&&(t=o)}let i=getComputedStyle(document.body).getPropertyValue(t);return eg(i)}},lm=class extends g1.MarkdownRenderChild{onload(){let e=this.containerEl.dataset.calloutMetadata;if(e){let t=e.split(",").map(r=>parseInt(r));t.length===3&&t.every(r=>0<=r&&r<=255)&&this.containerEl.style.setProperty("--callout-color",t.join(", "))}}};var bf=class extends we.Plugin{constructor(){super(...arguments);this.lib=new gf(this);this.events=new we.Events;this.autoFocusToggleIconEl=null;this.autoPasteToggleIconEl=null;this.patchStatus={workspace:!1,pagePreview:!1,pdfView:!1,pdfInternals:!1,pdfOutlineViewer:!1,backlink:!1};this.classes={};this.lastPasteFile=null;this.lastActiveMarkdownFile=null;this.lastAnnotationPopupChild=null;this.lastCopiedDestInfo=null;this.vimrc=null;this.pdfViewerChildren=new Map;this.shownMenus=new Set;this.requiresDataviewInlineFieldsMigration=!1;this.isDebugMode=!1}async onload(){this.checkVersion(),this.addIcons(),await(0,we.loadPdfJs)(),await this.loadSettings(),await this.saveSettings(),this.domManager=this.addChild(new xf(this)),this.domManager.registerCalloutRenderer(),this.registerRibbonIcons(),this.patchObsidian(),this.registerPDFEmbedCreator(),this.registerHoverLinkSources(),this.registerCommands(),this.registerGlobalVariables(),this.registerEvents(),this.startTrackingActiveMarkdownFile(),this.registerObsidianProtocolHandler("pdf-plus",this.obsidianProtocolHandler.bind(this)),this.addSettingTab(this.settingTab=new Lu(this)),this.registerStyleSettings(),this.checkDeprecatedSettings(),this.checkDataviewInlineFields(),this.registerAutoCheckForUpdates()}async onunload(){await this.cleanUpResources()}async cleanUpResources(){await this.cleanUpAnystyleFiles()}async cleanUpAnystyleFiles(){let t=this.app.vault.adapter;if(we.Platform.isDesktopApp&&t instanceof we.FileSystemAdapter){let i=this.getAnyStyleInputDir();if(i)try{await t.rmdir(i,!0)}catch(r){if(r.code!=="ENOENT")throw r}}}checkVersion(){this.textDivFirstIdx=we.apiVersion==="1.8.0"?1:0,this.obsidianHasFocusBug=!(0,we.requireApiVersion)("1.9.0"),this.obsidianHasTextSelectionBug=(0,we.requireApiVersion)("1.9.0"),Da.openIfNecessary(this)}addIcons(){(0,we.addIcon)("vim",'VIM')}getDefaultSettings(){return structuredClone(Jn)}async restoreDefaultSettings(){this.settings=this.getDefaultSettings(),await this.saveSettings()}async loadSettings(){if(this.settings=Object.assign(this.getDefaultSettings(),await this.loadData()),this.setCitationIdRegex(),!this.settings.anystylePath){let t=this.loadLocalStorage("anystylePath");typeof t=="string"&&(this.settings.anystylePath=t)}(this.settings.defaultDisplayTextFormatIndex<0||this.settings.defaultDisplayTextFormatIndex>=this.settings.displayTextFormats.length)&&(this.settings.defaultDisplayTextFormatIndex=0),(this.settings.defaultColorPaletteActionIndex<0||this.settings.defaultColorPaletteActionIndex>=this.settings.copyCommands.length)&&(this.settings.defaultColorPaletteActionIndex=0),this.validateAutoFocusAndAutoPasteSettings();for(let[t,i]of Object.entries(this.settings.colors))this.settings.colors[t]=i.toLowerCase();this.settings.paneTypeForFirstMDLeaf==="split"&&(this.settings.paneTypeForFirstMDLeaf="right");for(let t of this.settings.copyCommands)t.hasOwnProperty("format")&&(t.template=t.format,delete t.format);if(this.settings.hasOwnProperty("aliasFormat")&&(this.settings.displayTextFormats.push({name:"Custom",template:this.settings.aliasFormat}),delete this.settings.aliasFormat),this.settings.hasOwnProperty("showCopyLinkToSearchInContextMenu")){let t=this.settings.contextMenuConfig.find(({id:i})=>i==="search");t&&t.visible&&(t.visible=this.settings.showCopyLinkToSearchInContextMenu),delete this.settings.showCopyLinkToSearchInContextMenu}this.settings.showContextMenuOnMouseUpIf==="mod"&&(this.settings.showContextMenuOnMouseUpIf="Mod"),this.settings.enableEditEncryptedPDF=!1,this.renameSetting("enalbeWriteHighlightToFile","enablePDFEdit"),this.renameSetting("selectToCopyToggleRibbonIcon","autoCopyToggleRibbonIcon"),this.renameCommand("pdf-plus:toggle-select-to-copy",`${this.manifest.id}:toggle-auto-copy`),this.renameSetting("removeWhitespaceBetweenCJKChars","removeWhitespaceBetweenCJChars"),this.loadContextMenuConfig()}renameSetting(t,i){this.settings.hasOwnProperty(t)&&(this.settings[i]=this.settings[t],delete this.settings[t])}renameCommand(t,i){let{hotkeyManager:r}=this.app,o=r.getHotkeys(t);o&&(r.removeHotkeys(t),r.setHotkeys(i,o))}loadContextMenuConfig(){let t=this.getDefaultSettings().contextMenuConfig,i=[];for(let r of t){let o=this.settings.contextMenuConfig.find(({id:s})=>s===r.id);i.push(o!=null?o:r)}this.settings.contextMenuConfig.length=0,this.settings.contextMenuConfig.push(...i)}validateAutoFocusAndAutoPasteSettings(){this.settings.autoFocus&&this.settings.autoPaste&&(this.settings.autoFocus=!1)}checkDeprecatedSettings(){if(document.querySelectorAll(".pdf-plus-deprecated-setting-notice").length>0)return;let t=(a,c)=>{let l=new we.Notice("",0).setMessage(createFragment(d=>{let h=createEl("a",{href:"obsidian://pdf-plus?setting="+a});d.append("PDF++: "),c(d,h)}));l.containerEl.addClass("pdf-plus-deprecated-setting-notice"),l.messageEl.setCssStyles({color:"var(--text-warning)"})};this.settings.trimSelectionEmbed&&t("trimSelectionEmbed",(a,c)=>{a.append("The option "),c.textContent="Trim selection/annotation embeds",a.append(c),a.append(" is deprecated and will be removed in the near future. It is recommended to disable it and use the rectangular selection tool instead.")});let i=(a,c)=>new RegExp(`\\b${c}\\b`).test(a),r=(a,c)=>{for(let l of a.matchAll(/{{(.*?)}}/g))if(i(l[1],c))return!0;return!1},o=a=>{let c=this.settings[a],l=!1;typeof c=="string"?l=r(c,"linkedFile")||r(c,"linkedFileProperties"):Array.isArray(c)&&(l=c.some(({template:d})=>r(d,"linkedFile")||r(d,"linkedFileProperties"))),l&&t(a,(d,h)=>{d.append("The template variables "),d.createEl("code",{text:"linkedFile"}),d.append(" and "),d.createEl("code",{text:"linkedFileProperties"}),d.append(" are deprecated and will be removed in the near future. Please "),h.textContent="remove them from your templates",d.append(h),d.append(".")})};["displayTextFormats","copyCommands","outlineLinkDisplayTextFormat","outlineLinkCopyFormat","thumbnailLinkDisplayTextFormat","thumbnailLinkCopyFormat","copyOutlineAsHeadingsDisplayTextFormat","copyOutlineAsListDisplayTextFormat","copyOutlineAsListFormat","copyOutlineAsHeadingsFormat"].forEach(o)}async checkDataviewInlineFields(){im(this,t=>{if(t.length===0){this.requiresDataviewInlineFieldsMigration=!1;return}this.requiresDataviewInlineFieldsMigration=!0;let i=new we.Notice(createFragment(r=>r.append(`PDF++: Please consider moving the "${this.settings.proxyMDProperty}" Dataview inline fields to the properties (YAML frontmatter).`,createEl("br"),"Click ",createEl("a",{text:"here"},o=>{o.onclick=()=>{new Aa(this,t).open()}})," for more details.")),0);i.containerEl.addClass("pdf-plus-deprecated-setting-notice"),i.messageEl.setCssStyles({color:"var(--text-warning)"})})}async saveSettings(){let t=Object.assign({},this.settings);this.saveLocalStorage("anystylePath",t.anystylePath),delete t.anystylePath,await this.saveData(t)}loadLocalStorage(t){return this.app.loadLocalStorage(this.manifest.id+"-"+t)}saveLocalStorage(t,i){this.app.saveLocalStorage(this.manifest.id+"-"+t,i)}setCitationIdRegex(){let t=this.settings.citationIdPatterns.split(/\r?\n/).filter(i=>i.trim());this.citationIdRegex=new RegExp(t.join("|"))}registerStyleSettings(){this.app.workspace.trigger("parse-style-settings"),this.register(()=>this.app.workspace.trigger("parse-style-settings"))}registerRibbonIcons(){if(this.autoCopyMode=new mf(this),this.autoCopyMode.toggle(this.settings.autoCopy),this.register(()=>this.autoCopyMode.unload()),this.settings.autoFocusToggleRibbonIcon){let t=!1;this.autoFocusToggleIconEl=this.addRibbonIcon(this.settings.autoFocusIconName,`${this.manifest.name}: Toggle auto-focus`,()=>{t||this.toggleAutoFocus()}),this.autoFocusToggleIconEl.toggleClass("is-active",this.settings.autoFocus),this.registerDomEvent(this.autoFocusToggleIconEl,"contextmenu",i=>{if(t)return;let r=new we.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.openSettingTab().scrollToHeading("auto-focus")})}),r.onHide(()=>{t=!1}),r.showAtMouseEvent(i),t=!0})}if(this.settings.autoPasteToggleRibbonIcon){let t=!1;this.autoPasteToggleIconEl=this.addRibbonIcon(this.settings.autoPasteIconName,`${this.manifest.name}: Toggle auto-paste`,()=>{t||this.toggleAutoPaste()}),this.autoPasteToggleIconEl.toggleClass("is-active",this.settings.autoPaste),this.registerDomEvent(this.autoPasteToggleIconEl,"contextmenu",i=>{if(t)return;let r=new we.Menu;r.addItem(o=>{o.setIcon("lucide-settings").setTitle("Customize...").onClick(()=>{this.openSettingTab().scrollToHeading("auto-paste")})}),r.onHide(()=>{t=!1}),r.showAtMouseEvent(i),t=!0})}}toggleAutoFocusRibbonIcon(t){let i=this.autoFocusToggleIconEl;i&&(t=t!=null?t:!i.hasClass("is-active"),i.toggleClass("is-active",t))}toggleAutoPasteRibbonIcon(t){let i=this.autoPasteToggleIconEl;i&&(t=t!=null?t:!i.hasClass("is-active"),i.toggleClass("is-active",t))}async toggleAutoFocus(t,i){t=t!=null?t:!this.settings.autoFocus,this.toggleAutoFocusRibbonIcon(t),this.settings.autoFocus=t,this.settings.autoFocus&&this.settings.autoPaste&&this.toggleAutoPaste(!1,!1),(i==null||i)&&await this.saveSettings()}async toggleAutoPaste(t,i){t=t!=null?t:!this.settings.autoPaste,this.toggleAutoPasteRibbonIcon(t),this.settings.autoPaste=t,this.settings.autoPaste&&this.settings.autoFocus&&this.toggleAutoFocus(!1,!1),(i==null||i)&&await this.saveSettings()}patchObsidian(){this.app.workspace.onLayoutReady(()=>{n1(this),o1(this),d1(this)}),this.tryPatchUntilSuccess(t1),this.tryPatchUntilSuccess(i1),this.tryPatchUntilSuccess(a1),this.tryPatchUntilSuccess(l1)}tryPatchUntilSuccess(t,i){this.app.workspace.onLayoutReady(()=>{if(!t(this)){let o=i==null?void 0:i(),s=this.app.workspace.on("layout-change",()=>{t(this)&&(this.app.workspace.offref(s),o==null||o.hide())});this.registerEvent(s)}})}registerEl(t){return this.register(()=>t.remove()),t}loadStyle(){this.domManager.update()}registerPDFEmbedCreator(){let t=this.app.embedRegistry.embedByExtension.pdf;this.register(()=>{this.app.embedRegistry.unregisterExtension("pdf"),this.app.embedRegistry.registerExtension("pdf",t)}),this.app.embedRegistry.unregisterExtension("pdf"),this.app.embedRegistry.registerExtension("pdf",(i,r,o)=>{var c;let s=ga(o),a=null;if(s.has("rect")&&s.has("page")){let l=parseInt(s.get("page")),d=s.get("rect").split(",").map(p=>parseFloat(p)),h=s.has("width")?parseFloat(s.get("width")):void 0,u=(c=s.get("annotation"))!=null?c:void 0;Number.isInteger(l)&&d.length===4&&(a=new Jr(this,i,r,o,l,d,h,u))}if(a||(a=t(i,r,o),this.classes.PDFEmbed||(this.classes.PDFEmbed=a.constructor),this.patchStatus.pdfInternals||Sa(this,a.viewer)),this.registerDomEvent(a.containerEl,"dblclick",l=>{if(this.settings.dblclickEmbedToOpenLink&&It(l,l.target)&&(l.target.closest(".pdf-embed[src] > .pdf-container")||l.target.closest(".pdf-cropped-embed"))){let d=r.path+o;this.app.workspace.openLinkText(d,"",we.Keymap.isModEvent(l)),l.preventDefault()}}),this.settings.embedUnscrollable)for(let l of["wheel","touchmove"])this.registerDomEvent(a.containerEl,l,d=>{It(d,d.target)&&d.target.closest('.pdf-embed[src*="#"] .pdf-viewer-container')&&d.preventDefault()},{passive:!1});return a instanceof Jr&&this.registerDomEvent(a.containerEl,"click",l=>{It(l,l.target)&&l.target.closest(".cm-editor")&&l.preventDefault()}),s.has("color")?a.containerEl.dataset.highlightColor=s.get("color").toLowerCase():this.settings.defaultColor&&(a.containerEl.dataset.highlightColor=this.settings.defaultColor.toLowerCase()),a})}registerGlobalVariable(t,i,r=!0){if(t in window){if(r)throw new Error(`${this.manifest.name}: Global variable "${t}" already exists.`);return}window[t]=i,this.register(()=>delete window[t])}registerGlobalVariables(){this.registerGlobalVariable("pdfPlus",this,!1),this.registerGlobalVariable("pdflib",Qp,!1)}registerEvents(){this.registerEvent(this.app.workspace.on("layout-change",()=>{for(let t of this.pdfViewerChildren.keys())t!=null&&t.isShown()||this.pdfViewerChildren.delete(t)})),we.Platform.isDesktopApp&&this.registerEvent(this.app.workspace.on("active-leaf-change",t=>{if(this.settings.syncWithDefaultApp&&t&&this.lib.isPDFView(t.view)){let i=t.view.file;i&&(this.app.openWithDefaultApp(i.path),this.settings.focusObsidianAfterOpenPDFWithDefaultApp&&Zc())}})),this.registerEvent(this.app.vault.on("delete",t=>{t instanceof we.TFile&&t===this.lastPasteFile&&(this.lastPasteFile=null)})),this.registerEvent(this.app.vault.on("rename",(t,i)=>{t instanceof we.TFile&&this.settings.newFileTemplatePath===i&&(this.settings.newFileTemplatePath=t.path,this.saveSettings())})),this.registerEvent(this.app.vault.on("delete",t=>{t instanceof we.TFile&&this.settings.newFileTemplatePath===t.path&&(this.settings.newFileTemplatePath="",this.saveSettings())})),this.registerEvent(this.app.vault.on("modify",async t=>{t instanceof we.TFile&&t.path===this.settings.vimrcPath&&(this.vimrc=await this.app.vault.read(t))})),this.registerEvent(this.app.workspace.on("quit",async()=>{await this.cleanUpResources()})),this.registerEvent(this.app.workspace.on("editor-drop",(t,i,r)=>this.lib.dummyFileManager.createDummyFilesOnEditorDrop(t,i,r)))}registerOneTimeEvent(t,...[i,r,o]){let s=t.on(i,(...a)=>{r.call(o,...a),t.offref(s)},o);this.registerEvent(s)}async checkForUpdatesIfNeeded(){if(!this.settings.autoCheckForUpdates)return;(await this.lib.checkForUpdates({minHoursSinceRelease:24})).shouldUpdate&&this.app.workspace.onLayoutReady(()=>{new we.Notice(createFragment(i=>{i.append("PDF++: There is a newer version available! ",createEl("a",{text:"Update now",href:"obsidian://show-plugin?id=pdf-plus"}))}))})}registerAutoCheckForUpdates(){this.checkForUpdatesIfNeeded(),this.registerInterval(window.setInterval(()=>this.checkForUpdatesIfNeeded(),1e3*60*60*24))}registerHoverLinkSources(){this.registerHoverLinkSource("pdf-plus",{defaultMod:!0,display:"PDF++: backlink highlights"}),this.registerHoverLinkSource(Xn.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: internal links in PDF (except for citations)"}),this.registerHoverLinkSource(pn.HOVER_LINK_SOURCE_ID,{defaultMod:!1,display:"PDF++: citation links in PDF"}),this.registerHoverLinkSource(Gr.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: external links in PDF"}),this.registerHoverLinkSource(Zn.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: outlines (bookmarks)"}),this.registerHoverLinkSource(Yn.HOVER_LINK_SOURCE_ID,{defaultMod:!0,display:"PDF++: thumbnails"})}registerCommands(){this.lib.commands.registerCommands()}startTrackingActiveMarkdownFile(){let{workspace:t,vault:i}=this.app;t.onLayoutReady(()=>{let r=t.getActiveFile();if(r&&r.extension==="md")this.lastActiveMarkdownFile=r;else{let o=t.recentFileTracker.getRecentFiles({showMarkdown:!0,showCanvas:!1,showNonImageAttachments:!1,showImages:!1,maxCount:1}).first();if(o){let s=i.getAbstractFileByPath(o);s instanceof we.TFile&&s.extension==="md"&&(this.lastActiveMarkdownFile=s)}}this.registerEvent(t.on("file-open",o=>{o instanceof we.TFile&&o.extension==="md"&&(this.lastActiveMarkdownFile=o)})),this.registerEvent(i.on("delete",o=>{o instanceof we.TFile&&o===this.lastActiveMarkdownFile&&(this.lastActiveMarkdownFile=null)}))})}obsidianProtocolHandler(t){if("create-dummy"in t)return this.lib.dummyFileManager.createDummyFilesFromObsidianUrl(t);if("setting"in t)return this.settingTab.openFromObsidianUrl(t)}on(t,i,r){return this.events.on(t,i,r)}off(t,i){this.events.off(t,i)}offref(t){this.events.offref(t)}trigger(t,...i){this.events.trigger(t,...i)}requireModKeyForLinkHover(t="pdf-plus"){var i,r,o;return(o=(r=this.app.internalPlugins.plugins["page-preview"].instance.overrides[t])!=null?r:(i=this.app.workspace.hoverLinkSources[t])==null?void 0:i.defaultMod)!=null?o:!1}openSettingTab(){return this.app.setting.open(),this.app.setting.activeTab!==this.settingTab&&this.app.setting.openTabById(this.manifest.id),this.settingTab}openHotkeySettingTab(t){this.app.setting.open();let i=this.app.setting.openTabById("hotkeys");return i.setQuery(t!=null?t:this.manifest.id),i}getAnyStyleInputDir(){let t=this.manifest.dir;return t?t+"/anystyle":null}}; +/*! Bundled license information: + +crypto-js/ripemd160.js: + (** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *) + +crypto-js/mode-ctr-gladman.js: + (** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/pdf-plus/manifest.json b/.obsidian/plugins/pdf-plus/manifest.json new file mode 100644 index 0000000..844d182 --- /dev/null +++ b/.obsidian/plugins/pdf-plus/manifest.json @@ -0,0 +1,15 @@ +{ + "id": "pdf-plus", + "name": "PDF++", + "version": "0.40.31", + "minAppVersion": "1.5.8", + "description": "The most Obsidian-native PDF annotation tool ever.", + "author": "Ryota Ushio", + "authorUrl": "https://github.com/RyotaUshio", + "fundingUrl": { + "GitHub Sponsor": "https://github.com/sponsors/RyotaUshio", + "Buy Me a Coffee": "https://www.buymeacoffee.com/ryotaushio", + "Ko-fi": "https://ko-fi.com/ryotaushio" + }, + "isDesktopOnly": false +} \ No newline at end of file diff --git a/.obsidian/plugins/pdf-plus/styles.css b/.obsidian/plugins/pdf-plus/styles.css new file mode 100644 index 0000000..6f726bd --- /dev/null +++ b/.obsidian/plugins/pdf-plus/styles.css @@ -0,0 +1,694 @@ +/* @settings + +name: PDF++ +id: pdf-plus +settings: + - + id: pdf-highlight + title: Highlights + type: heading + level: 2 + - + id: pdf-plus-highlight-opacity + title: Highlight opacity + type: variable-number-slider + min: 0 + max: 1 + step: 0.01 + default: 0.2 + - + id: pdf-plus-highlight-padding-vertical-em + title: Highlight padding (top & bottom) + description: Boldness of highlights (em) + type: variable-number-slider + min: 0 + max: 1 + step: 0.01 + default: 0.05 + format: em + - + id: pdf-plus-highlight-padding-horizontal-em + title: Highlight padding (left & right) + description: Boldness of highlights (em) + type: variable-number-slider + min: 0 + max: 1 + step: 0.01 + default: 0.05 + format: em + - + id: pdf-plus-highlight-border-radius + title: Highlight edge roundness + description: Radius of the highlight edge (em). 0 for sharp edges and 0.5 for rounded edges. + type: variable-number-slider + min: 0 + max: 0.5 + step: 0.01 + default: 0.1 + format: em + - + id: pdf-rect + title: Rectanglular selection + type: heading + level: 2 + - + id: pdf-plus-rect-highlight-opacity + title: Rectangle highlight opacity + type: variable-number-slider + min: 0 + max: 1 + step: 0.01 + default: 1 + - + id: pdf-plus-rect-highlight-border-width + title: Rectangle highlight border width (px) + type: variable-number-slider + min: 1 + max: 10 + step: 1 + default: 2 + format: px + - + id: hover-popover + title: Hover popovers + type: heading + level: 2 + - + id: pdf-plus-backlink-popover + title: Backlink popovers + description: Styles for popovers displayed when hovering over backlinked highlights or rectangular selections in PDF viewer + type: heading + level: 3 + - + id: pdf-plus-backlink-popover-width + title: Backlink popover width (px) + type: variable-number-slider + min: 100 + max: 1000 + step: 10 + default: 450 + format: px + - + id: pdf-plus-backlink-popover-height + title: Backlink popover height (px) + type: variable-number-slider + min: 100 + max: 1000 + step: 10 + default: 400 + format: px + - + id: pdf-plus-pdf-link-like-popover + title: PDF internal link popovers + description: Styles for popovers displayed when hovering over internal links, outline items or thumbnails in PDF viewer + type: heading + level: 3 + - + id: pdf-plus-pdf-link-like-popover-width + title: PDF internal link popover width (px) + type: variable-number-slider + min: 100 + max: 1000 + step: 10 + default: 450 + format: px + - + id: pdf-plus-pdf-link-like-popover-height + title: PDF internal link popover height (px) + type: variable-number-slider + min: 100 + max: 1000 + step: 10 + default: 400 + format: px + - + id: pdf-toolbar + title: PDF toolbars + type: heading + level: 2 + - + id: hide-pdf-embed-toolbar + title: Hide toolbar in PDF embeds with a page specified + type: class-toggle + default: true + - + id: hide-pdf-toolbar-in-hover-editor + title: Hide PDF toolbar in Hover Editor + type: class-toggle + default: true + - + id: pdf-sidebar + title: PDF sidebars + type: heading + level: 2 + - + id: pdf-plus-sidebar-width + title: Sidebar width (px) + type: variable-number-slider + min: 100 + max: 1000 + step: 10 + default: 140 + format: px + - + id: pdf-plus-vim + title: Vim keybindings + type: heading + level: 2 + - + id: pdf-plus-vim-hin + title: Hint mode + type: heading + level: 3 + - + id: pdf-plus-vim-hint-inverted + title: Inverted color scheme + type: class-toggle + default: false +*/ + +:root { + --pdf-plus-highlight-padding-default-em: 0.05em; +} + +.hide-pdf-embed-toolbar .pdf-embed[src*="#"] .pdf-toolbar, +.hide-pdf-embed-toolbar .popover.hover-popover.hover-editor .pdf-embed[src*="#"] .pdf-toolbar { + display: none; +} + +.hide-pdf-toolbar-in-hover-editor .popover.hover-popover.hover-editor .view-content>.pdf-toolbar { + display: none !important; +} + +/* When hovering over a highlighted text in PDF viewer, highlight the corresponding item in backlink pane */ +.backlink-pane .search-result-file-match.hovered-backlink, +.backlink-pane .search-result-file-matches:has(.better-search-views-tree) .better-search-views-file-match.hovered-backlink:not(:hover) { + background-color: var(--text-selection); +} + +.setting-item.no-border, +.pdf-plus-settings.vertical-tab-content .setting-item.no-border { + border-top: none; + + &.small-padding { + padding-top: 0; + } +} + +.setting-item-control input.error { + border-color: var(--background-modifier-error); +} + +.setting-item-description.error { + color: var(--background-modifier-error); +} + +.is-mobile, +.is-tablet { + .pdf-plus-color-palette .pdf-plus-color-palette-item-inner { + width: calc(var(--swatch-width) * 0.85); + height: calc(var(--swatch-width) * 0.85); + } +} + +.pdf-plus-color-palette { + user-select: none; + -webkit-user-select: none; + + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + + .pdf-plus-color-palette-item { + /* Avoid text selections to be cleared when tapping on a color palette item on the mobile app */ + /* https://github.com/RyotaUshio/obsidian-pdf-plus/issues/169 */ + user-select: none; + + .pdf-plus-color-palette-item-inner { + width: var(--swatch-width); + height: var(--swatch-width); + border-radius: 50%; + border: var(--input-border-width) solid var(--background-modifier-border); + } + } + + .pdf-plus-color-palette-status-container { + padding: var(--size-2-2) var(--size-2-3); + color: var(--text-muted); + font-size: var(--font-ui-small); + text-wrap: nowrap; + } +} + +.menu .menu-item.pdf-plus-color-menu-item { + padding-left: 0; + + .pdf-plus-color-indicator { + border-radius: 50%; + border-width: 0; + height: var(--size-4-3); + width: var(--size-4-3); + } +} + +.pdf-toolbar .clickable-icon.is-disabled { + background-color: inherit; + + &>svg { + color: var(--text-faint); + } +} + +/* .pdf-page-input, */ +.pdf-zoom-level-input { + width: 6ch; + text-align: right; + font-variant-numeric: tabular-nums; +} + +.pdf-zoom-level-percent { + white-space: nowrap; + margin-right: var(--size-4-1); + font-size: var(--font-ui-small); + font-variant-numeric: tabular-nums; +} + +.pdf-plus-settings.vertical-tab-content { + --pdf-plus-settings-header-height: var(--size-4-12); + + padding-top: 0; + padding-left: 0; + padding-right: 0; +} + +.pdf-plus-settings.vertical-tab-content .header-container { + position: sticky; + top: 0; + z-index: 10; + height: var(--pdf-plus-settings-header-height); + line-height: var(--pdf-plus-settings-header-height); + text-align: center; + background-color: var(--background-secondary); + border-bottom: 1px solid var(--divider-color); + padding: 0 var(--size-4-4); + + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; + + display: flex; + justify-content: space-between; + align-items: center; + + .header { + line-height: normal; + + .header-title { + display: none; + } + } +} + +.pdf-plus-settings.vertical-tab-content .content { + padding-top: var(--size-4-8); + padding-bottom: var(--size-4-16); + padding-left: var(--size-4-12); + padding-right: var(--size-4-12); +} + +.pdf-plus-settings.vertical-tab-content .spacer { + height: var(--pdf-plus-settings-header-height); +} + +.pdf-plus-settings.vertical-tab-content .top-note { + min-height: var(--pdf-plus-settings-header-height); + color: var(--text-muted); + font-size: var(--font-ui-smaller); +} + +.pdf-plus-settings .setting-item-description, +.pdf-plus-modal .setting-item-description { + &>p:first-child { + margin-top: 0; + } + + &>p:last-child { + margin-bottom: 0; + } +} + +.pdf-plus-settings .ignore-split-setting.setting-item { + padding-top: 0; +} + +.annotationLayer .popupContent { + &>p:first-child { + margin-top: 0; + } + + &>p:last-child { + margin-bottom: 0; + } +} + +.pdf-plus-backlink-highlight-layer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 2; + transform-origin: 0 0; + pointer-events: none; +} + +.pdf-plus-backlink-highlight-layer .pdf-plus-backlink { + position: absolute; + pointer-events: auto; +} + +.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection { + box-sizing: content-box; + cursor: text; +} + +.pdf-plus-backlink-highlight-layer .rect-highlight { + background-color: rgb(var(--text-highlight-bg-rgb)); + border-radius: var(--radius-m); + opacity: 0.2; +} + +body:not(.pdf-plus-backlink-selection-underline) .pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection { + background-color: rgb(from var(--pdf-plus-color) r g b / var(--pdf-plus-highlight-opacity, 0.2)); + padding: var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em)); + margin: calc(var(--pdf-plus-highlight-padding-vertical-em, var(--pdf-plus-highlight-padding-default-em)) * -1) calc(var(--pdf-plus-highlight-padding-horizontal-em, var(--pdf-plus-highlight-padding-default-em)) * -1); + border-radius: var(--pdf-plus-highlight-border-radius, 0.1em); +} + +body.pdf-plus-backlink-selection-underline { + .pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-selection { + padding: 0; + margin: 0; + opacity: 1.0; + border-radius: 0; + } + + .pdf-plus-backlink-highlight-layer[data-main-rotation="0"] .pdf-plus-backlink.pdf-plus-backlink-selection { + border-bottom: 0.1em solid var(--pdf-plus-color); + } + + .pdf-plus-backlink-highlight-layer[data-main-rotation="90"] .pdf-plus-backlink.pdf-plus-backlink-selection { + border-right: 0.1em solid var(--pdf-plus-color); + } + + .pdf-plus-backlink-highlight-layer[data-main-rotation="180"] .pdf-plus-backlink.pdf-plus-backlink-selection { + border-top: 0.1em solid var(--pdf-plus-color); + } + + .pdf-plus-backlink-highlight-layer[data-main-rotation="270"] .pdf-plus-backlink.pdf-plus-backlink-selection { + border-left: 0.1em solid var(--pdf-plus-color); + } +} + +.pdf-plus-backlink-highlight-layer .pdf-plus-backlink.pdf-plus-backlink-fit-r { + border: dashed rgb(from var(--pdf-plus-rect-color) r g b / var(--pdf-plus-rect-highlight-opacity, 1)) var(--pdf-plus-rect-highlight-border-width, 2px); +} + +.pdf-plus-backlink-icon { + position: absolute; + --icon-size: 100%; +} + +[data-main-rotation="90"] .pdf-plus-backlink-icon { + transform: rotate(270deg); +} + +[data-main-rotation="180"] .pdf-plus-backlink-icon { + transform: rotate(180deg); +} + +[data-main-rotation="270"] .pdf-plus-backlink-icon { + transform: rotate(90deg); +} + +.pdf-plus-annotation-edit-modal { + .desc { + margin-bottom: var(--size-4-4); + } + + .preview-container { + background: var(--background-modifier-form-field); + border: var(--input-border-width) solid var(--background-modifier-border); + border-radius: var(--input-radius); + padding: var(--size-4-1) var(--size-4-2); + text-align: left; + + &>p:first-child { + margin-top: 0; + } + + &>p:last-child { + margin-bottom: 0; + } + } + + /* Arrange two children of .setting-item, namely .setting-item-info and .setting-item-contrl, vertically */ + .setting-item:last-child:has(textarea) { + display: flex; + flex-direction: column; + justify-content: left; + align-items: flex-start; + + .setting-item-control { + width: 100%; + padding-top: var(--size-4-2); + } + } + + .pdf-plus-annotation-edit-modal-save-instructions { + color: var(--text-muted); + font-size: calc(var(--font-text-size) * 0.65); + text-align: end; + } +} + +.popupWrapper { + --pdf-popup-width: 310px; +} + +.pdf-plus-annotation-icon-container { + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + + margin-right: calc(var(--size-4-1) * -1); + margin-left: calc(var(--size-2-1) * -1); + + .clickable-icon { + margin-right: 0; + margin-left: 0; + } +} + +.pdf-plus-draggable .popup { + cursor: default; +} + +#pdf-plus-funding { + display: flex; + flex-direction: column; + justify-content: left; + align-items: flex-end; + + .setting-item-control { + padding-top: var(--size-4-4); + } +} + +#pdf-plus-funding-icon-info-container { + display: flex; + flex-direction: row; + /* justify-content: left; */ + align-items: center; +} + +#pdf-plus-funding-icon { + margin-right: var(--size-4-4); +} + +.page-label-range:first-of-type { + margin-top: var(--size-4-4); +} + +.page-label-range:not(:first-of-type) { + margin-top: var(--size-4-9); +} + +.pdf-plus-page-label-modal { + z-index: var(--he-popover-layer-inactive, var(--layer-popover)); + + .page-labels-loading { + color: var(--text-muted); + text-align: center; + margin: var(--size-4-4); + } +} + +.pdf-plus-restore-default-modal { + user-select: text; +} + +.pdf-content-container { + --sidebar-width: var(--pdf-plus-sidebar-width, 140px); +} + +body { + --container-pdf-cropped-width: var(--line-width); + --container-pdf-cropped-max-width: var(--max-width); +} + +.internal-embed.pdf-cropped-embed { + width: var(--container-pdf-cropped-width); + max-width: var(--container-pdf-cropped-max-width); + + img { + cursor: text !important; + max-width: 100%; + } +} + +.popover.hover-popover>.pdf-cropped-embed img { + max-height: 100%; + max-width: 100%; + height: auto; +} + +.pdf-plus-selecting * { + cursor: crosshair !important; + + .textLayer { + user-select: none; + } +} + +.pdf-container .pdf-plus-select-box { + position: absolute; + z-index: 1000; + border: dashed var(--background-modifier-border) 2px; + background-color: hsla(var(--interactive-accent-hsl), 0.15); +} + +/* From Obsidian's app.css (.annotationLayer .mod-focused / .annotationLayer .boundingRect)*/ +.pdf-plus-annotation-bounding-rect { + background-color: rgba(var(--text-highlight-bg-rgb), 0.1); + border-radius: var(--radius-s); + box-shadow: var(--shadow-s); + box-sizing: content-box; + margin: calc(var(--size-4-2) * -1); + border: var(--size-4-1) solid rgba(var(--text-highlight-bg-rgb), 0.8); + padding: var(--size-4-1); + z-index: 0; + /* Avoid preventing annotation click */ + position: absolute; + pointer-events: none; +} + +.popover.hover-popover.pdf-plus-backlink-popover { + --popover-width: var(--pdf-plus-backlink-popover-width, 450px); + --popover-height: var(--pdf-plus-backlink-popover-height, 400px); +} + +.popover.hover-popover.pdf-plus-pdf-link-like-popover { + --popover-pdf-width: var(--pdf-plus-pdf-link-like-popover-width, 450px); + --popover-pdf-height: var(--pdf-plus-pdf-link-like-popover-height, 400px); +} + +.popover.hover-popover.pdf-plus-bib-popover { + --popover-width: 400px; + --pdf-plus-bib-metadata-font-size: var(--font-ui-small); + + /* Workaround to prevent bib popovers from being covered by Hover Editor + when the bib popover is spawned from a hover editor + (https://github.com/RyotaUshio/obsidian-pdf-plus/issues/459). + Hover Editor decides z-index based on --layer-slides, so we need to set a higher z-index. */ + z-index: calc(var(--layer-slides) + 1); + + .pdf-plus-bib { + padding: var(--size-4-3); + font-size: var(--font-ui-medium); + + /* Make text inside citation hover selectable (https://github.com/RyotaUshio/obsidian-pdf-plus/issues/252) */ + -moz-user-select: text; + -webkit-user-select: text; + user-select: text; + + .bib-title { + font-weight: bold; + padding-bottom: var(--size-4-2); + } + + .bib-author-year { + color: var(--text-muted); + text-align: left; + font-size: var(--pdf-plus-bib-metadata-font-size); + } + + .bib-container-title { + color: var(--text-muted); + font-style: italic; + text-align: left; + font-size: var(--pdf-plus-bib-metadata-font-size); + } + + .button-container { + margin-top: 1em; + display: flex; + justify-content: space-between; + gap: var(--size-4-2); + flex-wrap: wrap; + } + } +} + +.pdf-plus-vim-command { + border-top: 1px solid var(--background-modifier-border); + /* height: var(--size-4-8); */ + font-family: monospace; + + input { + background: transparent; + border: none; + outline: none; + font-family: monospace; + white-space: pre; + width: 90%; + } +} + +.page.pdf-plus-vim-hint-mode [data-pdf-plus-vim-hint]::after { + content: attr(data-pdf-plus-vim-hint); + color: var(--pdf-plus-vim-hint-color); + text-transform: uppercase; + font-size: var(--font-ui-medium); + font-weight: bold; + background-color: var(--pdf-plus-vim-hint-background-color); + border: var(--size-2-1) solid hsl(var(--accent-h), var(--accent-s), var(--accent-l)); + border-radius: 10%; + padding: 0 var(--size-2-2); + position: relative; + left: 0; + top: 0; + z-index: 9999; +} + +body { + --pdf-plus-vim-hint-color: var(--text-normal); + --pdf-plus-vim-hint-background-color: var(--background-primary); +} + +body.pdf-plus-vim-hint-inverted { + --pdf-plus-vim-hint-color: var(--text-on-accent); + --pdf-plus-vim-hint-background-color: hsl(var(--accent-h), var(--accent-s), var(--accent-l)); +} diff --git a/.obsidian/plugins/tasks-calendar-wrapper/main.js b/.obsidian/plugins/tasks-calendar-wrapper/main.js new file mode 100644 index 0000000..b0fc78f --- /dev/null +++ b/.obsidian/plugins/tasks-calendar-wrapper/main.js @@ -0,0 +1,36911 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb2, mod) => function __require() { + return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/underscore/modules/_setup.js +var VERSION, root, ArrayProto, ObjProto, SymbolProto, push, slice, toString, hasOwnProperty, supportsArrayBuffer, supportsDataView, nativeIsArray, nativeKeys, nativeCreate, nativeIsView, _isNaN, _isFinite, hasEnumBug, nonEnumerableProps, MAX_ARRAY_INDEX; +var init_setup = __esm({ + "node_modules/underscore/modules/_setup.js"() { + VERSION = "1.13.6"; + root = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {}; + ArrayProto = Array.prototype; + ObjProto = Object.prototype; + SymbolProto = typeof Symbol !== "undefined" ? Symbol.prototype : null; + push = ArrayProto.push; + slice = ArrayProto.slice; + toString = ObjProto.toString; + hasOwnProperty = ObjProto.hasOwnProperty; + supportsArrayBuffer = typeof ArrayBuffer !== "undefined"; + supportsDataView = typeof DataView !== "undefined"; + nativeIsArray = Array.isArray; + nativeKeys = Object.keys; + nativeCreate = Object.create; + nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; + _isNaN = isNaN; + _isFinite = isFinite; + hasEnumBug = !{ toString: null }.propertyIsEnumerable("toString"); + nonEnumerableProps = [ + "valueOf", + "isPrototypeOf", + "toString", + "propertyIsEnumerable", + "hasOwnProperty", + "toLocaleString" + ]; + MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; + } +}); + +// node_modules/underscore/modules/restArguments.js +function restArguments(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0), rest2 = Array(length), index = 0; + for (; index < length; index++) { + rest2[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: + return func.call(this, rest2); + case 1: + return func.call(this, arguments[0], rest2); + case 2: + return func.call(this, arguments[0], arguments[1], rest2); + } + var args = Array(startIndex + 1); + for (index = 0; index < startIndex; index++) { + args[index] = arguments[index]; + } + args[startIndex] = rest2; + return func.apply(this, args); + }; +} +var init_restArguments = __esm({ + "node_modules/underscore/modules/restArguments.js"() { + } +}); + +// node_modules/underscore/modules/isObject.js +function isObject(obj) { + var type = typeof obj; + return type === "function" || type === "object" && !!obj; +} +var init_isObject = __esm({ + "node_modules/underscore/modules/isObject.js"() { + } +}); + +// node_modules/underscore/modules/isNull.js +function isNull(obj) { + return obj === null; +} +var init_isNull = __esm({ + "node_modules/underscore/modules/isNull.js"() { + } +}); + +// node_modules/underscore/modules/isUndefined.js +function isUndefined(obj) { + return obj === void 0; +} +var init_isUndefined = __esm({ + "node_modules/underscore/modules/isUndefined.js"() { + } +}); + +// node_modules/underscore/modules/isBoolean.js +function isBoolean(obj) { + return obj === true || obj === false || toString.call(obj) === "[object Boolean]"; +} +var init_isBoolean = __esm({ + "node_modules/underscore/modules/isBoolean.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/isElement.js +function isElement(obj) { + return !!(obj && obj.nodeType === 1); +} +var init_isElement = __esm({ + "node_modules/underscore/modules/isElement.js"() { + } +}); + +// node_modules/underscore/modules/_tagTester.js +function tagTester(name) { + var tag = "[object " + name + "]"; + return function(obj) { + return toString.call(obj) === tag; + }; +} +var init_tagTester = __esm({ + "node_modules/underscore/modules/_tagTester.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/isString.js +var isString_default; +var init_isString = __esm({ + "node_modules/underscore/modules/isString.js"() { + init_tagTester(); + isString_default = tagTester("String"); + } +}); + +// node_modules/underscore/modules/isNumber.js +var isNumber_default; +var init_isNumber = __esm({ + "node_modules/underscore/modules/isNumber.js"() { + init_tagTester(); + isNumber_default = tagTester("Number"); + } +}); + +// node_modules/underscore/modules/isDate.js +var isDate_default; +var init_isDate = __esm({ + "node_modules/underscore/modules/isDate.js"() { + init_tagTester(); + isDate_default = tagTester("Date"); + } +}); + +// node_modules/underscore/modules/isRegExp.js +var isRegExp_default; +var init_isRegExp = __esm({ + "node_modules/underscore/modules/isRegExp.js"() { + init_tagTester(); + isRegExp_default = tagTester("RegExp"); + } +}); + +// node_modules/underscore/modules/isError.js +var isError_default; +var init_isError = __esm({ + "node_modules/underscore/modules/isError.js"() { + init_tagTester(); + isError_default = tagTester("Error"); + } +}); + +// node_modules/underscore/modules/isSymbol.js +var isSymbol_default; +var init_isSymbol = __esm({ + "node_modules/underscore/modules/isSymbol.js"() { + init_tagTester(); + isSymbol_default = tagTester("Symbol"); + } +}); + +// node_modules/underscore/modules/isArrayBuffer.js +var isArrayBuffer_default; +var init_isArrayBuffer = __esm({ + "node_modules/underscore/modules/isArrayBuffer.js"() { + init_tagTester(); + isArrayBuffer_default = tagTester("ArrayBuffer"); + } +}); + +// node_modules/underscore/modules/isFunction.js +var isFunction, nodelist, isFunction_default; +var init_isFunction = __esm({ + "node_modules/underscore/modules/isFunction.js"() { + init_tagTester(); + init_setup(); + isFunction = tagTester("Function"); + nodelist = root.document && root.document.childNodes; + if (typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function") { + isFunction = function(obj) { + return typeof obj == "function" || false; + }; + } + isFunction_default = isFunction; + } +}); + +// node_modules/underscore/modules/_hasObjectTag.js +var hasObjectTag_default; +var init_hasObjectTag = __esm({ + "node_modules/underscore/modules/_hasObjectTag.js"() { + init_tagTester(); + hasObjectTag_default = tagTester("Object"); + } +}); + +// node_modules/underscore/modules/_stringTagBug.js +var hasStringTagBug, isIE11; +var init_stringTagBug = __esm({ + "node_modules/underscore/modules/_stringTagBug.js"() { + init_setup(); + init_hasObjectTag(); + hasStringTagBug = supportsDataView && hasObjectTag_default(new DataView(new ArrayBuffer(8))); + isIE11 = typeof Map !== "undefined" && hasObjectTag_default(/* @__PURE__ */ new Map()); + } +}); + +// node_modules/underscore/modules/isDataView.js +function ie10IsDataView(obj) { + return obj != null && isFunction_default(obj.getInt8) && isArrayBuffer_default(obj.buffer); +} +var isDataView, isDataView_default; +var init_isDataView = __esm({ + "node_modules/underscore/modules/isDataView.js"() { + init_tagTester(); + init_isFunction(); + init_isArrayBuffer(); + init_stringTagBug(); + isDataView = tagTester("DataView"); + isDataView_default = hasStringTagBug ? ie10IsDataView : isDataView; + } +}); + +// node_modules/underscore/modules/isArray.js +var isArray_default; +var init_isArray = __esm({ + "node_modules/underscore/modules/isArray.js"() { + init_setup(); + init_tagTester(); + isArray_default = nativeIsArray || tagTester("Array"); + } +}); + +// node_modules/underscore/modules/_has.js +function has(obj, key) { + return obj != null && hasOwnProperty.call(obj, key); +} +var init_has = __esm({ + "node_modules/underscore/modules/_has.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/isArguments.js +var isArguments, isArguments_default; +var init_isArguments = __esm({ + "node_modules/underscore/modules/isArguments.js"() { + init_tagTester(); + init_has(); + isArguments = tagTester("Arguments"); + (function() { + if (!isArguments(arguments)) { + isArguments = function(obj) { + return has(obj, "callee"); + }; + } + })(); + isArguments_default = isArguments; + } +}); + +// node_modules/underscore/modules/isFinite.js +function isFinite2(obj) { + return !isSymbol_default(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); +} +var init_isFinite = __esm({ + "node_modules/underscore/modules/isFinite.js"() { + init_setup(); + init_isSymbol(); + } +}); + +// node_modules/underscore/modules/isNaN.js +function isNaN2(obj) { + return isNumber_default(obj) && _isNaN(obj); +} +var init_isNaN = __esm({ + "node_modules/underscore/modules/isNaN.js"() { + init_setup(); + init_isNumber(); + } +}); + +// node_modules/underscore/modules/constant.js +function constant(value) { + return function() { + return value; + }; +} +var init_constant = __esm({ + "node_modules/underscore/modules/constant.js"() { + } +}); + +// node_modules/underscore/modules/_createSizePropertyCheck.js +function createSizePropertyCheck(getSizeProperty) { + return function(collection) { + var sizeProperty = getSizeProperty(collection); + return typeof sizeProperty == "number" && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; + }; +} +var init_createSizePropertyCheck = __esm({ + "node_modules/underscore/modules/_createSizePropertyCheck.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/_shallowProperty.js +function shallowProperty(key) { + return function(obj) { + return obj == null ? void 0 : obj[key]; + }; +} +var init_shallowProperty = __esm({ + "node_modules/underscore/modules/_shallowProperty.js"() { + } +}); + +// node_modules/underscore/modules/_getByteLength.js +var getByteLength_default; +var init_getByteLength = __esm({ + "node_modules/underscore/modules/_getByteLength.js"() { + init_shallowProperty(); + getByteLength_default = shallowProperty("byteLength"); + } +}); + +// node_modules/underscore/modules/_isBufferLike.js +var isBufferLike_default; +var init_isBufferLike = __esm({ + "node_modules/underscore/modules/_isBufferLike.js"() { + init_createSizePropertyCheck(); + init_getByteLength(); + isBufferLike_default = createSizePropertyCheck(getByteLength_default); + } +}); + +// node_modules/underscore/modules/isTypedArray.js +function isTypedArray(obj) { + return nativeIsView ? nativeIsView(obj) && !isDataView_default(obj) : isBufferLike_default(obj) && typedArrayPattern.test(toString.call(obj)); +} +var typedArrayPattern, isTypedArray_default; +var init_isTypedArray = __esm({ + "node_modules/underscore/modules/isTypedArray.js"() { + init_setup(); + init_isDataView(); + init_constant(); + init_isBufferLike(); + typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; + isTypedArray_default = supportsArrayBuffer ? isTypedArray : constant(false); + } +}); + +// node_modules/underscore/modules/_getLength.js +var getLength_default; +var init_getLength = __esm({ + "node_modules/underscore/modules/_getLength.js"() { + init_shallowProperty(); + getLength_default = shallowProperty("length"); + } +}); + +// node_modules/underscore/modules/_collectNonEnumProps.js +function emulatedSet(keys2) { + var hash = {}; + for (var l = keys2.length, i = 0; i < l; ++i) + hash[keys2[i]] = true; + return { + contains: function(key) { + return hash[key] === true; + }, + push: function(key) { + hash[key] = true; + return keys2.push(key); + } + }; +} +function collectNonEnumProps(obj, keys2) { + keys2 = emulatedSet(keys2); + var nonEnumIdx = nonEnumerableProps.length; + var constructor = obj.constructor; + var proto = isFunction_default(constructor) && constructor.prototype || ObjProto; + var prop = "constructor"; + if (has(obj, prop) && !keys2.contains(prop)) + keys2.push(prop); + while (nonEnumIdx--) { + prop = nonEnumerableProps[nonEnumIdx]; + if (prop in obj && obj[prop] !== proto[prop] && !keys2.contains(prop)) { + keys2.push(prop); + } + } +} +var init_collectNonEnumProps = __esm({ + "node_modules/underscore/modules/_collectNonEnumProps.js"() { + init_setup(); + init_isFunction(); + init_has(); + } +}); + +// node_modules/underscore/modules/keys.js +function keys(obj) { + if (!isObject(obj)) + return []; + if (nativeKeys) + return nativeKeys(obj); + var keys2 = []; + for (var key in obj) + if (has(obj, key)) + keys2.push(key); + if (hasEnumBug) + collectNonEnumProps(obj, keys2); + return keys2; +} +var init_keys = __esm({ + "node_modules/underscore/modules/keys.js"() { + init_isObject(); + init_setup(); + init_has(); + init_collectNonEnumProps(); + } +}); + +// node_modules/underscore/modules/isEmpty.js +function isEmpty(obj) { + if (obj == null) + return true; + var length = getLength_default(obj); + if (typeof length == "number" && (isArray_default(obj) || isString_default(obj) || isArguments_default(obj))) + return length === 0; + return getLength_default(keys(obj)) === 0; +} +var init_isEmpty = __esm({ + "node_modules/underscore/modules/isEmpty.js"() { + init_getLength(); + init_isArray(); + init_isString(); + init_isArguments(); + init_keys(); + } +}); + +// node_modules/underscore/modules/isMatch.js +function isMatch(object2, attrs) { + var _keys = keys(attrs), length = _keys.length; + if (object2 == null) + return !length; + var obj = Object(object2); + for (var i = 0; i < length; i++) { + var key = _keys[i]; + if (attrs[key] !== obj[key] || !(key in obj)) + return false; + } + return true; +} +var init_isMatch = __esm({ + "node_modules/underscore/modules/isMatch.js"() { + init_keys(); + } +}); + +// node_modules/underscore/modules/underscore.js +function _(obj) { + if (obj instanceof _) + return obj; + if (!(this instanceof _)) + return new _(obj); + this._wrapped = obj; +} +var init_underscore = __esm({ + "node_modules/underscore/modules/underscore.js"() { + init_setup(); + _.VERSION = VERSION; + _.prototype.value = function() { + return this._wrapped; + }; + _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; + _.prototype.toString = function() { + return String(this._wrapped); + }; + } +}); + +// node_modules/underscore/modules/_toBufferView.js +function toBufferView(bufferSource) { + return new Uint8Array( + bufferSource.buffer || bufferSource, + bufferSource.byteOffset || 0, + getByteLength_default(bufferSource) + ); +} +var init_toBufferView = __esm({ + "node_modules/underscore/modules/_toBufferView.js"() { + init_getByteLength(); + } +}); + +// node_modules/underscore/modules/isEqual.js +function eq(a, b, aStack, bStack) { + if (a === b) + return a !== 0 || 1 / a === 1 / b; + if (a == null || b == null) + return false; + if (a !== a) + return b !== b; + var type = typeof a; + if (type !== "function" && type !== "object" && typeof b != "object") + return false; + return deepEq(a, b, aStack, bStack); +} +function deepEq(a, b, aStack, bStack) { + if (a instanceof _) + a = a._wrapped; + if (b instanceof _) + b = b._wrapped; + var className = toString.call(a); + if (className !== toString.call(b)) + return false; + if (hasStringTagBug && className == "[object Object]" && isDataView_default(a)) { + if (!isDataView_default(b)) + return false; + className = tagDataView; + } + switch (className) { + case "[object RegExp]": + case "[object String]": + return "" + a === "" + b; + case "[object Number]": + if (+a !== +a) + return +b !== +b; + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case "[object Date]": + case "[object Boolean]": + return +a === +b; + case "[object Symbol]": + return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); + case "[object ArrayBuffer]": + case tagDataView: + return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); + } + var areArrays = className === "[object Array]"; + if (!areArrays && isTypedArray_default(a)) { + var byteLength = getByteLength_default(a); + if (byteLength !== getByteLength_default(b)) + return false; + if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) + return true; + areArrays = true; + } + if (!areArrays) { + if (typeof a != "object" || typeof b != "object") + return false; + var aCtor = a.constructor, bCtor = b.constructor; + if (aCtor !== bCtor && !(isFunction_default(aCtor) && aCtor instanceof aCtor && isFunction_default(bCtor) && bCtor instanceof bCtor) && ("constructor" in a && "constructor" in b)) { + return false; + } + } + aStack = aStack || []; + bStack = bStack || []; + var length = aStack.length; + while (length--) { + if (aStack[length] === a) + return bStack[length] === b; + } + aStack.push(a); + bStack.push(b); + if (areArrays) { + length = a.length; + if (length !== b.length) + return false; + while (length--) { + if (!eq(a[length], b[length], aStack, bStack)) + return false; + } + } else { + var _keys = keys(a), key; + length = _keys.length; + if (keys(b).length !== length) + return false; + while (length--) { + key = _keys[length]; + if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) + return false; + } + } + aStack.pop(); + bStack.pop(); + return true; +} +function isEqual(a, b) { + return eq(a, b); +} +var tagDataView; +var init_isEqual = __esm({ + "node_modules/underscore/modules/isEqual.js"() { + init_underscore(); + init_setup(); + init_getByteLength(); + init_isTypedArray(); + init_isFunction(); + init_stringTagBug(); + init_isDataView(); + init_keys(); + init_has(); + init_toBufferView(); + tagDataView = "[object DataView]"; + } +}); + +// node_modules/underscore/modules/allKeys.js +function allKeys(obj) { + if (!isObject(obj)) + return []; + var keys2 = []; + for (var key in obj) + keys2.push(key); + if (hasEnumBug) + collectNonEnumProps(obj, keys2); + return keys2; +} +var init_allKeys = __esm({ + "node_modules/underscore/modules/allKeys.js"() { + init_isObject(); + init_setup(); + init_collectNonEnumProps(); + } +}); + +// node_modules/underscore/modules/_methodFingerprint.js +function ie11fingerprint(methods) { + var length = getLength_default(methods); + return function(obj) { + if (obj == null) + return false; + var keys2 = allKeys(obj); + if (getLength_default(keys2)) + return false; + for (var i = 0; i < length; i++) { + if (!isFunction_default(obj[methods[i]])) + return false; + } + return methods !== weakMapMethods || !isFunction_default(obj[forEachName]); + }; +} +var forEachName, hasName, commonInit, mapTail, mapMethods, weakMapMethods, setMethods; +var init_methodFingerprint = __esm({ + "node_modules/underscore/modules/_methodFingerprint.js"() { + init_getLength(); + init_isFunction(); + init_allKeys(); + forEachName = "forEach"; + hasName = "has"; + commonInit = ["clear", "delete"]; + mapTail = ["get", hasName, "set"]; + mapMethods = commonInit.concat(forEachName, mapTail); + weakMapMethods = commonInit.concat(mapTail); + setMethods = ["add"].concat(commonInit, forEachName, hasName); + } +}); + +// node_modules/underscore/modules/isMap.js +var isMap_default; +var init_isMap = __esm({ + "node_modules/underscore/modules/isMap.js"() { + init_tagTester(); + init_stringTagBug(); + init_methodFingerprint(); + isMap_default = isIE11 ? ie11fingerprint(mapMethods) : tagTester("Map"); + } +}); + +// node_modules/underscore/modules/isWeakMap.js +var isWeakMap_default; +var init_isWeakMap = __esm({ + "node_modules/underscore/modules/isWeakMap.js"() { + init_tagTester(); + init_stringTagBug(); + init_methodFingerprint(); + isWeakMap_default = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester("WeakMap"); + } +}); + +// node_modules/underscore/modules/isSet.js +var isSet_default; +var init_isSet = __esm({ + "node_modules/underscore/modules/isSet.js"() { + init_tagTester(); + init_stringTagBug(); + init_methodFingerprint(); + isSet_default = isIE11 ? ie11fingerprint(setMethods) : tagTester("Set"); + } +}); + +// node_modules/underscore/modules/isWeakSet.js +var isWeakSet_default; +var init_isWeakSet = __esm({ + "node_modules/underscore/modules/isWeakSet.js"() { + init_tagTester(); + isWeakSet_default = tagTester("WeakSet"); + } +}); + +// node_modules/underscore/modules/values.js +function values(obj) { + var _keys = keys(obj); + var length = _keys.length; + var values2 = Array(length); + for (var i = 0; i < length; i++) { + values2[i] = obj[_keys[i]]; + } + return values2; +} +var init_values = __esm({ + "node_modules/underscore/modules/values.js"() { + init_keys(); + } +}); + +// node_modules/underscore/modules/pairs.js +function pairs(obj) { + var _keys = keys(obj); + var length = _keys.length; + var pairs2 = Array(length); + for (var i = 0; i < length; i++) { + pairs2[i] = [_keys[i], obj[_keys[i]]]; + } + return pairs2; +} +var init_pairs = __esm({ + "node_modules/underscore/modules/pairs.js"() { + init_keys(); + } +}); + +// node_modules/underscore/modules/invert.js +function invert(obj) { + var result2 = {}; + var _keys = keys(obj); + for (var i = 0, length = _keys.length; i < length; i++) { + result2[obj[_keys[i]]] = _keys[i]; + } + return result2; +} +var init_invert = __esm({ + "node_modules/underscore/modules/invert.js"() { + init_keys(); + } +}); + +// node_modules/underscore/modules/functions.js +function functions(obj) { + var names = []; + for (var key in obj) { + if (isFunction_default(obj[key])) + names.push(key); + } + return names.sort(); +} +var init_functions = __esm({ + "node_modules/underscore/modules/functions.js"() { + init_isFunction(); + } +}); + +// node_modules/underscore/modules/_createAssigner.js +function createAssigner(keysFunc, defaults) { + return function(obj) { + var length = arguments.length; + if (defaults) + obj = Object(obj); + if (length < 2 || obj == null) + return obj; + for (var index = 1; index < length; index++) { + var source = arguments[index], keys2 = keysFunc(source), l = keys2.length; + for (var i = 0; i < l; i++) { + var key = keys2[i]; + if (!defaults || obj[key] === void 0) + obj[key] = source[key]; + } + } + return obj; + }; +} +var init_createAssigner = __esm({ + "node_modules/underscore/modules/_createAssigner.js"() { + } +}); + +// node_modules/underscore/modules/extend.js +var extend_default; +var init_extend = __esm({ + "node_modules/underscore/modules/extend.js"() { + init_createAssigner(); + init_allKeys(); + extend_default = createAssigner(allKeys); + } +}); + +// node_modules/underscore/modules/extendOwn.js +var extendOwn_default; +var init_extendOwn = __esm({ + "node_modules/underscore/modules/extendOwn.js"() { + init_createAssigner(); + init_keys(); + extendOwn_default = createAssigner(keys); + } +}); + +// node_modules/underscore/modules/defaults.js +var defaults_default; +var init_defaults = __esm({ + "node_modules/underscore/modules/defaults.js"() { + init_createAssigner(); + init_allKeys(); + defaults_default = createAssigner(allKeys, true); + } +}); + +// node_modules/underscore/modules/_baseCreate.js +function ctor() { + return function() { + }; +} +function baseCreate(prototype) { + if (!isObject(prototype)) + return {}; + if (nativeCreate) + return nativeCreate(prototype); + var Ctor = ctor(); + Ctor.prototype = prototype; + var result2 = new Ctor(); + Ctor.prototype = null; + return result2; +} +var init_baseCreate = __esm({ + "node_modules/underscore/modules/_baseCreate.js"() { + init_isObject(); + init_setup(); + } +}); + +// node_modules/underscore/modules/create.js +function create(prototype, props) { + var result2 = baseCreate(prototype); + if (props) + extendOwn_default(result2, props); + return result2; +} +var init_create = __esm({ + "node_modules/underscore/modules/create.js"() { + init_baseCreate(); + init_extendOwn(); + } +}); + +// node_modules/underscore/modules/clone.js +function clone(obj) { + if (!isObject(obj)) + return obj; + return isArray_default(obj) ? obj.slice() : extend_default({}, obj); +} +var init_clone = __esm({ + "node_modules/underscore/modules/clone.js"() { + init_isObject(); + init_isArray(); + init_extend(); + } +}); + +// node_modules/underscore/modules/tap.js +function tap(obj, interceptor) { + interceptor(obj); + return obj; +} +var init_tap = __esm({ + "node_modules/underscore/modules/tap.js"() { + } +}); + +// node_modules/underscore/modules/toPath.js +function toPath(path) { + return isArray_default(path) ? path : [path]; +} +var init_toPath = __esm({ + "node_modules/underscore/modules/toPath.js"() { + init_underscore(); + init_isArray(); + _.toPath = toPath; + } +}); + +// node_modules/underscore/modules/_toPath.js +function toPath2(path) { + return _.toPath(path); +} +var init_toPath2 = __esm({ + "node_modules/underscore/modules/_toPath.js"() { + init_underscore(); + init_toPath(); + } +}); + +// node_modules/underscore/modules/_deepGet.js +function deepGet(obj, path) { + var length = path.length; + for (var i = 0; i < length; i++) { + if (obj == null) + return void 0; + obj = obj[path[i]]; + } + return length ? obj : void 0; +} +var init_deepGet = __esm({ + "node_modules/underscore/modules/_deepGet.js"() { + } +}); + +// node_modules/underscore/modules/get.js +function get(object2, path, defaultValue) { + var value = deepGet(object2, toPath2(path)); + return isUndefined(value) ? defaultValue : value; +} +var init_get = __esm({ + "node_modules/underscore/modules/get.js"() { + init_toPath2(); + init_deepGet(); + init_isUndefined(); + } +}); + +// node_modules/underscore/modules/has.js +function has2(obj, path) { + path = toPath2(path); + var length = path.length; + for (var i = 0; i < length; i++) { + var key = path[i]; + if (!has(obj, key)) + return false; + obj = obj[key]; + } + return !!length; +} +var init_has2 = __esm({ + "node_modules/underscore/modules/has.js"() { + init_has(); + init_toPath2(); + } +}); + +// node_modules/underscore/modules/identity.js +function identity(value) { + return value; +} +var init_identity = __esm({ + "node_modules/underscore/modules/identity.js"() { + } +}); + +// node_modules/underscore/modules/matcher.js +function matcher(attrs) { + attrs = extendOwn_default({}, attrs); + return function(obj) { + return isMatch(obj, attrs); + }; +} +var init_matcher = __esm({ + "node_modules/underscore/modules/matcher.js"() { + init_extendOwn(); + init_isMatch(); + } +}); + +// node_modules/underscore/modules/property.js +function property(path) { + path = toPath2(path); + return function(obj) { + return deepGet(obj, path); + }; +} +var init_property = __esm({ + "node_modules/underscore/modules/property.js"() { + init_deepGet(); + init_toPath2(); + } +}); + +// node_modules/underscore/modules/_optimizeCb.js +function optimizeCb(func, context, argCount) { + if (context === void 0) + return func; + switch (argCount == null ? 3 : argCount) { + case 1: + return function(value) { + return func.call(context, value); + }; + case 3: + return function(value, index, collection) { + return func.call(context, value, index, collection); + }; + case 4: + return function(accumulator, value, index, collection) { + return func.call(context, accumulator, value, index, collection); + }; + } + return function() { + return func.apply(context, arguments); + }; +} +var init_optimizeCb = __esm({ + "node_modules/underscore/modules/_optimizeCb.js"() { + } +}); + +// node_modules/underscore/modules/_baseIteratee.js +function baseIteratee(value, context, argCount) { + if (value == null) + return identity; + if (isFunction_default(value)) + return optimizeCb(value, context, argCount); + if (isObject(value) && !isArray_default(value)) + return matcher(value); + return property(value); +} +var init_baseIteratee = __esm({ + "node_modules/underscore/modules/_baseIteratee.js"() { + init_identity(); + init_isFunction(); + init_isObject(); + init_isArray(); + init_matcher(); + init_property(); + init_optimizeCb(); + } +}); + +// node_modules/underscore/modules/iteratee.js +function iteratee(value, context) { + return baseIteratee(value, context, Infinity); +} +var init_iteratee = __esm({ + "node_modules/underscore/modules/iteratee.js"() { + init_underscore(); + init_baseIteratee(); + _.iteratee = iteratee; + } +}); + +// node_modules/underscore/modules/_cb.js +function cb(value, context, argCount) { + if (_.iteratee !== iteratee) + return _.iteratee(value, context); + return baseIteratee(value, context, argCount); +} +var init_cb = __esm({ + "node_modules/underscore/modules/_cb.js"() { + init_underscore(); + init_baseIteratee(); + init_iteratee(); + } +}); + +// node_modules/underscore/modules/mapObject.js +function mapObject(obj, iteratee2, context) { + iteratee2 = cb(iteratee2, context); + var _keys = keys(obj), length = _keys.length, results = {}; + for (var index = 0; index < length; index++) { + var currentKey = _keys[index]; + results[currentKey] = iteratee2(obj[currentKey], currentKey, obj); + } + return results; +} +var init_mapObject = __esm({ + "node_modules/underscore/modules/mapObject.js"() { + init_cb(); + init_keys(); + } +}); + +// node_modules/underscore/modules/noop.js +function noop() { +} +var init_noop = __esm({ + "node_modules/underscore/modules/noop.js"() { + } +}); + +// node_modules/underscore/modules/propertyOf.js +function propertyOf(obj) { + if (obj == null) + return noop; + return function(path) { + return get(obj, path); + }; +} +var init_propertyOf = __esm({ + "node_modules/underscore/modules/propertyOf.js"() { + init_noop(); + init_get(); + } +}); + +// node_modules/underscore/modules/times.js +function times(n, iteratee2, context) { + var accum = Array(Math.max(0, n)); + iteratee2 = optimizeCb(iteratee2, context, 1); + for (var i = 0; i < n; i++) + accum[i] = iteratee2(i); + return accum; +} +var init_times = __esm({ + "node_modules/underscore/modules/times.js"() { + init_optimizeCb(); + } +}); + +// node_modules/underscore/modules/random.js +function random(min2, max2) { + if (max2 == null) { + max2 = min2; + min2 = 0; + } + return min2 + Math.floor(Math.random() * (max2 - min2 + 1)); +} +var init_random = __esm({ + "node_modules/underscore/modules/random.js"() { + } +}); + +// node_modules/underscore/modules/now.js +var now_default; +var init_now = __esm({ + "node_modules/underscore/modules/now.js"() { + now_default = Date.now || function() { + return new Date().getTime(); + }; + } +}); + +// node_modules/underscore/modules/_createEscaper.js +function createEscaper(map2) { + var escaper = function(match) { + return map2[match]; + }; + var source = "(?:" + keys(map2).join("|") + ")"; + var testRegexp = RegExp(source); + var replaceRegexp = RegExp(source, "g"); + return function(string) { + string = string == null ? "" : "" + string; + return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; + }; +} +var init_createEscaper = __esm({ + "node_modules/underscore/modules/_createEscaper.js"() { + init_keys(); + } +}); + +// node_modules/underscore/modules/_escapeMap.js +var escapeMap_default; +var init_escapeMap = __esm({ + "node_modules/underscore/modules/_escapeMap.js"() { + escapeMap_default = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "`": "`" + }; + } +}); + +// node_modules/underscore/modules/escape.js +var escape_default; +var init_escape = __esm({ + "node_modules/underscore/modules/escape.js"() { + init_createEscaper(); + init_escapeMap(); + escape_default = createEscaper(escapeMap_default); + } +}); + +// node_modules/underscore/modules/_unescapeMap.js +var unescapeMap_default; +var init_unescapeMap = __esm({ + "node_modules/underscore/modules/_unescapeMap.js"() { + init_invert(); + init_escapeMap(); + unescapeMap_default = invert(escapeMap_default); + } +}); + +// node_modules/underscore/modules/unescape.js +var unescape_default; +var init_unescape = __esm({ + "node_modules/underscore/modules/unescape.js"() { + init_createEscaper(); + init_unescapeMap(); + unescape_default = createEscaper(unescapeMap_default); + } +}); + +// node_modules/underscore/modules/templateSettings.js +var templateSettings_default; +var init_templateSettings = __esm({ + "node_modules/underscore/modules/templateSettings.js"() { + init_underscore(); + templateSettings_default = _.templateSettings = { + evaluate: /<%([\s\S]+?)%>/g, + interpolate: /<%=([\s\S]+?)%>/g, + escape: /<%-([\s\S]+?)%>/g + }; + } +}); + +// node_modules/underscore/modules/template.js +function escapeChar(match) { + return "\\" + escapes[match]; +} +function template(text, settings, oldSettings) { + if (!settings && oldSettings) + settings = oldSettings; + settings = defaults_default({}, settings, _.templateSettings); + var matcher2 = RegExp([ + (settings.escape || noMatch).source, + (settings.interpolate || noMatch).source, + (settings.evaluate || noMatch).source + ].join("|") + "|$", "g"); + var index = 0; + var source = "__p+='"; + text.replace(matcher2, function(match, escape, interpolate, evaluate, offset) { + source += text.slice(index, offset).replace(escapeRegExp, escapeChar); + index = offset + match.length; + if (escape) { + source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + } else if (interpolate) { + source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + } else if (evaluate) { + source += "';\n" + evaluate + "\n__p+='"; + } + return match; + }); + source += "';\n"; + var argument = settings.variable; + if (argument) { + if (!bareIdentifier.test(argument)) + throw new Error( + "variable is not a bare identifier: " + argument + ); + } else { + source = "with(obj||{}){\n" + source + "}\n"; + argument = "obj"; + } + source = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n"; + var render; + try { + render = new Function(argument, "_", source); + } catch (e) { + e.source = source; + throw e; + } + var template2 = function(data) { + return render.call(this, data, _); + }; + template2.source = "function(" + argument + "){\n" + source + "}"; + return template2; +} +var noMatch, escapes, escapeRegExp, bareIdentifier; +var init_template = __esm({ + "node_modules/underscore/modules/template.js"() { + init_defaults(); + init_underscore(); + init_templateSettings(); + noMatch = /(.)^/; + escapes = { + "'": "'", + "\\": "\\", + "\r": "r", + "\n": "n", + "\u2028": "u2028", + "\u2029": "u2029" + }; + escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; + bareIdentifier = /^\s*(\w|\$)+\s*$/; + } +}); + +// node_modules/underscore/modules/result.js +function result(obj, path, fallback) { + path = toPath2(path); + var length = path.length; + if (!length) { + return isFunction_default(fallback) ? fallback.call(obj) : fallback; + } + for (var i = 0; i < length; i++) { + var prop = obj == null ? void 0 : obj[path[i]]; + if (prop === void 0) { + prop = fallback; + i = length; + } + obj = isFunction_default(prop) ? prop.call(obj) : prop; + } + return obj; +} +var init_result = __esm({ + "node_modules/underscore/modules/result.js"() { + init_isFunction(); + init_toPath2(); + } +}); + +// node_modules/underscore/modules/uniqueId.js +function uniqueId(prefix) { + var id = ++idCounter + ""; + return prefix ? prefix + id : id; +} +var idCounter; +var init_uniqueId = __esm({ + "node_modules/underscore/modules/uniqueId.js"() { + idCounter = 0; + } +}); + +// node_modules/underscore/modules/chain.js +function chain(obj) { + var instance = _(obj); + instance._chain = true; + return instance; +} +var init_chain = __esm({ + "node_modules/underscore/modules/chain.js"() { + init_underscore(); + } +}); + +// node_modules/underscore/modules/_executeBound.js +function executeBound(sourceFunc, boundFunc, context, callingContext, args) { + if (!(callingContext instanceof boundFunc)) + return sourceFunc.apply(context, args); + var self2 = baseCreate(sourceFunc.prototype); + var result2 = sourceFunc.apply(self2, args); + if (isObject(result2)) + return result2; + return self2; +} +var init_executeBound = __esm({ + "node_modules/underscore/modules/_executeBound.js"() { + init_baseCreate(); + init_isObject(); + } +}); + +// node_modules/underscore/modules/partial.js +var partial, partial_default; +var init_partial = __esm({ + "node_modules/underscore/modules/partial.js"() { + init_restArguments(); + init_executeBound(); + init_underscore(); + partial = restArguments(function(func, boundArgs) { + var placeholder = partial.placeholder; + var bound = function() { + var position = 0, length = boundArgs.length; + var args = Array(length); + for (var i = 0; i < length; i++) { + args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; + } + while (position < arguments.length) + args.push(arguments[position++]); + return executeBound(func, bound, this, this, args); + }; + return bound; + }); + partial.placeholder = _; + partial_default = partial; + } +}); + +// node_modules/underscore/modules/bind.js +var bind_default; +var init_bind = __esm({ + "node_modules/underscore/modules/bind.js"() { + init_restArguments(); + init_isFunction(); + init_executeBound(); + bind_default = restArguments(function(func, context, args) { + if (!isFunction_default(func)) + throw new TypeError("Bind must be called on a function"); + var bound = restArguments(function(callArgs) { + return executeBound(func, bound, context, this, args.concat(callArgs)); + }); + return bound; + }); + } +}); + +// node_modules/underscore/modules/_isArrayLike.js +var isArrayLike_default; +var init_isArrayLike = __esm({ + "node_modules/underscore/modules/_isArrayLike.js"() { + init_createSizePropertyCheck(); + init_getLength(); + isArrayLike_default = createSizePropertyCheck(getLength_default); + } +}); + +// node_modules/underscore/modules/_flatten.js +function flatten(input, depth, strict, output) { + output = output || []; + if (!depth && depth !== 0) { + depth = Infinity; + } else if (depth <= 0) { + return output.concat(input); + } + var idx = output.length; + for (var i = 0, length = getLength_default(input); i < length; i++) { + var value = input[i]; + if (isArrayLike_default(value) && (isArray_default(value) || isArguments_default(value))) { + if (depth > 1) { + flatten(value, depth - 1, strict, output); + idx = output.length; + } else { + var j = 0, len = value.length; + while (j < len) + output[idx++] = value[j++]; + } + } else if (!strict) { + output[idx++] = value; + } + } + return output; +} +var init_flatten = __esm({ + "node_modules/underscore/modules/_flatten.js"() { + init_getLength(); + init_isArrayLike(); + init_isArray(); + init_isArguments(); + } +}); + +// node_modules/underscore/modules/bindAll.js +var bindAll_default; +var init_bindAll = __esm({ + "node_modules/underscore/modules/bindAll.js"() { + init_restArguments(); + init_flatten(); + init_bind(); + bindAll_default = restArguments(function(obj, keys2) { + keys2 = flatten(keys2, false, false); + var index = keys2.length; + if (index < 1) + throw new Error("bindAll must be passed function names"); + while (index--) { + var key = keys2[index]; + obj[key] = bind_default(obj[key], obj); + } + return obj; + }); + } +}); + +// node_modules/underscore/modules/memoize.js +function memoize(func, hasher) { + var memoize2 = function(key) { + var cache = memoize2.cache; + var address = "" + (hasher ? hasher.apply(this, arguments) : key); + if (!has(cache, address)) + cache[address] = func.apply(this, arguments); + return cache[address]; + }; + memoize2.cache = {}; + return memoize2; +} +var init_memoize = __esm({ + "node_modules/underscore/modules/memoize.js"() { + init_has(); + } +}); + +// node_modules/underscore/modules/delay.js +var delay_default; +var init_delay = __esm({ + "node_modules/underscore/modules/delay.js"() { + init_restArguments(); + delay_default = restArguments(function(func, wait, args) { + return setTimeout(function() { + return func.apply(null, args); + }, wait); + }); + } +}); + +// node_modules/underscore/modules/defer.js +var defer_default; +var init_defer = __esm({ + "node_modules/underscore/modules/defer.js"() { + init_partial(); + init_delay(); + init_underscore(); + defer_default = partial_default(delay_default, _, 1); + } +}); + +// node_modules/underscore/modules/throttle.js +function throttle(func, wait, options) { + var timeout, context, args, result2; + var previous = 0; + if (!options) + options = {}; + var later = function() { + previous = options.leading === false ? 0 : now_default(); + timeout = null; + result2 = func.apply(context, args); + if (!timeout) + context = args = null; + }; + var throttled = function() { + var _now = now_default(); + if (!previous && options.leading === false) + previous = _now; + var remaining = wait - (_now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = _now; + result2 = func.apply(context, args); + if (!timeout) + context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result2; + }; + throttled.cancel = function() { + clearTimeout(timeout); + previous = 0; + timeout = context = args = null; + }; + return throttled; +} +var init_throttle = __esm({ + "node_modules/underscore/modules/throttle.js"() { + init_now(); + } +}); + +// node_modules/underscore/modules/debounce.js +function debounce(func, wait, immediate) { + var timeout, previous, args, result2, context; + var later = function() { + var passed = now_default() - previous; + if (wait > passed) { + timeout = setTimeout(later, wait - passed); + } else { + timeout = null; + if (!immediate) + result2 = func.apply(context, args); + if (!timeout) + args = context = null; + } + }; + var debounced = restArguments(function(_args) { + context = this; + args = _args; + previous = now_default(); + if (!timeout) { + timeout = setTimeout(later, wait); + if (immediate) + result2 = func.apply(context, args); + } + return result2; + }); + debounced.cancel = function() { + clearTimeout(timeout); + timeout = args = context = null; + }; + return debounced; +} +var init_debounce = __esm({ + "node_modules/underscore/modules/debounce.js"() { + init_restArguments(); + init_now(); + } +}); + +// node_modules/underscore/modules/wrap.js +function wrap(func, wrapper) { + return partial_default(wrapper, func); +} +var init_wrap = __esm({ + "node_modules/underscore/modules/wrap.js"() { + init_partial(); + } +}); + +// node_modules/underscore/modules/negate.js +function negate(predicate) { + return function() { + return !predicate.apply(this, arguments); + }; +} +var init_negate = __esm({ + "node_modules/underscore/modules/negate.js"() { + } +}); + +// node_modules/underscore/modules/compose.js +function compose() { + var args = arguments; + var start = args.length - 1; + return function() { + var i = start; + var result2 = args[start].apply(this, arguments); + while (i--) + result2 = args[i].call(this, result2); + return result2; + }; +} +var init_compose = __esm({ + "node_modules/underscore/modules/compose.js"() { + } +}); + +// node_modules/underscore/modules/after.js +function after(times2, func) { + return function() { + if (--times2 < 1) { + return func.apply(this, arguments); + } + }; +} +var init_after = __esm({ + "node_modules/underscore/modules/after.js"() { + } +}); + +// node_modules/underscore/modules/before.js +function before(times2, func) { + var memo; + return function() { + if (--times2 > 0) { + memo = func.apply(this, arguments); + } + if (times2 <= 1) + func = null; + return memo; + }; +} +var init_before = __esm({ + "node_modules/underscore/modules/before.js"() { + } +}); + +// node_modules/underscore/modules/once.js +var once_default; +var init_once = __esm({ + "node_modules/underscore/modules/once.js"() { + init_partial(); + init_before(); + once_default = partial_default(before, 2); + } +}); + +// node_modules/underscore/modules/findKey.js +function findKey(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = keys(obj), key; + for (var i = 0, length = _keys.length; i < length; i++) { + key = _keys[i]; + if (predicate(obj[key], key, obj)) + return key; + } +} +var init_findKey = __esm({ + "node_modules/underscore/modules/findKey.js"() { + init_cb(); + init_keys(); + } +}); + +// node_modules/underscore/modules/_createPredicateIndexFinder.js +function createPredicateIndexFinder(dir) { + return function(array, predicate, context) { + predicate = cb(predicate, context); + var length = getLength_default(array); + var index = dir > 0 ? 0 : length - 1; + for (; index >= 0 && index < length; index += dir) { + if (predicate(array[index], index, array)) + return index; + } + return -1; + }; +} +var init_createPredicateIndexFinder = __esm({ + "node_modules/underscore/modules/_createPredicateIndexFinder.js"() { + init_cb(); + init_getLength(); + } +}); + +// node_modules/underscore/modules/findIndex.js +var findIndex_default; +var init_findIndex = __esm({ + "node_modules/underscore/modules/findIndex.js"() { + init_createPredicateIndexFinder(); + findIndex_default = createPredicateIndexFinder(1); + } +}); + +// node_modules/underscore/modules/findLastIndex.js +var findLastIndex_default; +var init_findLastIndex = __esm({ + "node_modules/underscore/modules/findLastIndex.js"() { + init_createPredicateIndexFinder(); + findLastIndex_default = createPredicateIndexFinder(-1); + } +}); + +// node_modules/underscore/modules/sortedIndex.js +function sortedIndex(array, obj, iteratee2, context) { + iteratee2 = cb(iteratee2, context, 1); + var value = iteratee2(obj); + var low = 0, high = getLength_default(array); + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (iteratee2(array[mid]) < value) + low = mid + 1; + else + high = mid; + } + return low; +} +var init_sortedIndex = __esm({ + "node_modules/underscore/modules/sortedIndex.js"() { + init_cb(); + init_getLength(); + } +}); + +// node_modules/underscore/modules/_createIndexFinder.js +function createIndexFinder(dir, predicateFind, sortedIndex2) { + return function(array, item, idx) { + var i = 0, length = getLength_default(array); + if (typeof idx == "number") { + if (dir > 0) { + i = idx >= 0 ? idx : Math.max(idx + length, i); + } else { + length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + } + } else if (sortedIndex2 && idx && length) { + idx = sortedIndex2(array, item); + return array[idx] === item ? idx : -1; + } + if (item !== item) { + idx = predicateFind(slice.call(array, i, length), isNaN2); + return idx >= 0 ? idx + i : -1; + } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { + if (array[idx] === item) + return idx; + } + return -1; + }; +} +var init_createIndexFinder = __esm({ + "node_modules/underscore/modules/_createIndexFinder.js"() { + init_getLength(); + init_setup(); + init_isNaN(); + } +}); + +// node_modules/underscore/modules/indexOf.js +var indexOf_default; +var init_indexOf = __esm({ + "node_modules/underscore/modules/indexOf.js"() { + init_sortedIndex(); + init_findIndex(); + init_createIndexFinder(); + indexOf_default = createIndexFinder(1, findIndex_default, sortedIndex); + } +}); + +// node_modules/underscore/modules/lastIndexOf.js +var lastIndexOf_default; +var init_lastIndexOf = __esm({ + "node_modules/underscore/modules/lastIndexOf.js"() { + init_findLastIndex(); + init_createIndexFinder(); + lastIndexOf_default = createIndexFinder(-1, findLastIndex_default); + } +}); + +// node_modules/underscore/modules/find.js +function find(obj, predicate, context) { + var keyFinder = isArrayLike_default(obj) ? findIndex_default : findKey; + var key = keyFinder(obj, predicate, context); + if (key !== void 0 && key !== -1) + return obj[key]; +} +var init_find = __esm({ + "node_modules/underscore/modules/find.js"() { + init_isArrayLike(); + init_findIndex(); + init_findKey(); + } +}); + +// node_modules/underscore/modules/findWhere.js +function findWhere(obj, attrs) { + return find(obj, matcher(attrs)); +} +var init_findWhere = __esm({ + "node_modules/underscore/modules/findWhere.js"() { + init_find(); + init_matcher(); + } +}); + +// node_modules/underscore/modules/each.js +function each(obj, iteratee2, context) { + iteratee2 = optimizeCb(iteratee2, context); + var i, length; + if (isArrayLike_default(obj)) { + for (i = 0, length = obj.length; i < length; i++) { + iteratee2(obj[i], i, obj); + } + } else { + var _keys = keys(obj); + for (i = 0, length = _keys.length; i < length; i++) { + iteratee2(obj[_keys[i]], _keys[i], obj); + } + } + return obj; +} +var init_each = __esm({ + "node_modules/underscore/modules/each.js"() { + init_optimizeCb(); + init_isArrayLike(); + init_keys(); + } +}); + +// node_modules/underscore/modules/map.js +function map(obj, iteratee2, context) { + iteratee2 = cb(iteratee2, context); + var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length, results = Array(length); + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + results[index] = iteratee2(obj[currentKey], currentKey, obj); + } + return results; +} +var init_map = __esm({ + "node_modules/underscore/modules/map.js"() { + init_cb(); + init_isArrayLike(); + init_keys(); + } +}); + +// node_modules/underscore/modules/_createReduce.js +function createReduce(dir) { + var reducer = function(obj, iteratee2, memo, initial2) { + var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length, index = dir > 0 ? 0 : length - 1; + if (!initial2) { + memo = obj[_keys ? _keys[index] : index]; + index += dir; + } + for (; index >= 0 && index < length; index += dir) { + var currentKey = _keys ? _keys[index] : index; + memo = iteratee2(memo, obj[currentKey], currentKey, obj); + } + return memo; + }; + return function(obj, iteratee2, memo, context) { + var initial2 = arguments.length >= 3; + return reducer(obj, optimizeCb(iteratee2, context, 4), memo, initial2); + }; +} +var init_createReduce = __esm({ + "node_modules/underscore/modules/_createReduce.js"() { + init_isArrayLike(); + init_keys(); + init_optimizeCb(); + } +}); + +// node_modules/underscore/modules/reduce.js +var reduce_default; +var init_reduce = __esm({ + "node_modules/underscore/modules/reduce.js"() { + init_createReduce(); + reduce_default = createReduce(1); + } +}); + +// node_modules/underscore/modules/reduceRight.js +var reduceRight_default; +var init_reduceRight = __esm({ + "node_modules/underscore/modules/reduceRight.js"() { + init_createReduce(); + reduceRight_default = createReduce(-1); + } +}); + +// node_modules/underscore/modules/filter.js +function filter(obj, predicate, context) { + var results = []; + predicate = cb(predicate, context); + each(obj, function(value, index, list) { + if (predicate(value, index, list)) + results.push(value); + }); + return results; +} +var init_filter = __esm({ + "node_modules/underscore/modules/filter.js"() { + init_cb(); + init_each(); + } +}); + +// node_modules/underscore/modules/reject.js +function reject(obj, predicate, context) { + return filter(obj, negate(cb(predicate)), context); +} +var init_reject = __esm({ + "node_modules/underscore/modules/reject.js"() { + init_filter(); + init_negate(); + init_cb(); + } +}); + +// node_modules/underscore/modules/every.js +function every(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (!predicate(obj[currentKey], currentKey, obj)) + return false; + } + return true; +} +var init_every = __esm({ + "node_modules/underscore/modules/every.js"() { + init_cb(); + init_isArrayLike(); + init_keys(); + } +}); + +// node_modules/underscore/modules/some.js +function some(obj, predicate, context) { + predicate = cb(predicate, context); + var _keys = !isArrayLike_default(obj) && keys(obj), length = (_keys || obj).length; + for (var index = 0; index < length; index++) { + var currentKey = _keys ? _keys[index] : index; + if (predicate(obj[currentKey], currentKey, obj)) + return true; + } + return false; +} +var init_some = __esm({ + "node_modules/underscore/modules/some.js"() { + init_cb(); + init_isArrayLike(); + init_keys(); + } +}); + +// node_modules/underscore/modules/contains.js +function contains(obj, item, fromIndex, guard) { + if (!isArrayLike_default(obj)) + obj = values(obj); + if (typeof fromIndex != "number" || guard) + fromIndex = 0; + return indexOf_default(obj, item, fromIndex) >= 0; +} +var init_contains = __esm({ + "node_modules/underscore/modules/contains.js"() { + init_isArrayLike(); + init_values(); + init_indexOf(); + } +}); + +// node_modules/underscore/modules/invoke.js +var invoke_default; +var init_invoke = __esm({ + "node_modules/underscore/modules/invoke.js"() { + init_restArguments(); + init_isFunction(); + init_map(); + init_deepGet(); + init_toPath2(); + invoke_default = restArguments(function(obj, path, args) { + var contextPath, func; + if (isFunction_default(path)) { + func = path; + } else { + path = toPath2(path); + contextPath = path.slice(0, -1); + path = path[path.length - 1]; + } + return map(obj, function(context) { + var method = func; + if (!method) { + if (contextPath && contextPath.length) { + context = deepGet(context, contextPath); + } + if (context == null) + return void 0; + method = context[path]; + } + return method == null ? method : method.apply(context, args); + }); + }); + } +}); + +// node_modules/underscore/modules/pluck.js +function pluck(obj, key) { + return map(obj, property(key)); +} +var init_pluck = __esm({ + "node_modules/underscore/modules/pluck.js"() { + init_map(); + init_property(); + } +}); + +// node_modules/underscore/modules/where.js +function where(obj, attrs) { + return filter(obj, matcher(attrs)); +} +var init_where = __esm({ + "node_modules/underscore/modules/where.js"() { + init_filter(); + init_matcher(); + } +}); + +// node_modules/underscore/modules/max.js +function max(obj, iteratee2, context) { + var result2 = -Infinity, lastComputed = -Infinity, value, computed; + if (iteratee2 == null || typeof iteratee2 == "number" && typeof obj[0] != "object" && obj != null) { + obj = isArrayLike_default(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value > result2) { + result2 = value; + } + } + } else { + iteratee2 = cb(iteratee2, context); + each(obj, function(v, index, list) { + computed = iteratee2(v, index, list); + if (computed > lastComputed || computed === -Infinity && result2 === -Infinity) { + result2 = v; + lastComputed = computed; + } + }); + } + return result2; +} +var init_max = __esm({ + "node_modules/underscore/modules/max.js"() { + init_isArrayLike(); + init_values(); + init_cb(); + init_each(); + } +}); + +// node_modules/underscore/modules/min.js +function min(obj, iteratee2, context) { + var result2 = Infinity, lastComputed = Infinity, value, computed; + if (iteratee2 == null || typeof iteratee2 == "number" && typeof obj[0] != "object" && obj != null) { + obj = isArrayLike_default(obj) ? obj : values(obj); + for (var i = 0, length = obj.length; i < length; i++) { + value = obj[i]; + if (value != null && value < result2) { + result2 = value; + } + } + } else { + iteratee2 = cb(iteratee2, context); + each(obj, function(v, index, list) { + computed = iteratee2(v, index, list); + if (computed < lastComputed || computed === Infinity && result2 === Infinity) { + result2 = v; + lastComputed = computed; + } + }); + } + return result2; +} +var init_min = __esm({ + "node_modules/underscore/modules/min.js"() { + init_isArrayLike(); + init_values(); + init_cb(); + init_each(); + } +}); + +// node_modules/underscore/modules/toArray.js +function toArray(obj) { + if (!obj) + return []; + if (isArray_default(obj)) + return slice.call(obj); + if (isString_default(obj)) { + return obj.match(reStrSymbol); + } + if (isArrayLike_default(obj)) + return map(obj, identity); + return values(obj); +} +var reStrSymbol; +var init_toArray = __esm({ + "node_modules/underscore/modules/toArray.js"() { + init_isArray(); + init_setup(); + init_isString(); + init_isArrayLike(); + init_map(); + init_identity(); + init_values(); + reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; + } +}); + +// node_modules/underscore/modules/sample.js +function sample(obj, n, guard) { + if (n == null || guard) { + if (!isArrayLike_default(obj)) + obj = values(obj); + return obj[random(obj.length - 1)]; + } + var sample2 = toArray(obj); + var length = getLength_default(sample2); + n = Math.max(Math.min(n, length), 0); + var last2 = length - 1; + for (var index = 0; index < n; index++) { + var rand = random(index, last2); + var temp = sample2[index]; + sample2[index] = sample2[rand]; + sample2[rand] = temp; + } + return sample2.slice(0, n); +} +var init_sample = __esm({ + "node_modules/underscore/modules/sample.js"() { + init_isArrayLike(); + init_values(); + init_getLength(); + init_random(); + init_toArray(); + } +}); + +// node_modules/underscore/modules/shuffle.js +function shuffle(obj) { + return sample(obj, Infinity); +} +var init_shuffle = __esm({ + "node_modules/underscore/modules/shuffle.js"() { + init_sample(); + } +}); + +// node_modules/underscore/modules/sortBy.js +function sortBy(obj, iteratee2, context) { + var index = 0; + iteratee2 = cb(iteratee2, context); + return pluck(map(obj, function(value, key, list) { + return { + value, + index: index++, + criteria: iteratee2(value, key, list) + }; + }).sort(function(left, right) { + var a = left.criteria; + var b = right.criteria; + if (a !== b) { + if (a > b || a === void 0) + return 1; + if (a < b || b === void 0) + return -1; + } + return left.index - right.index; + }), "value"); +} +var init_sortBy = __esm({ + "node_modules/underscore/modules/sortBy.js"() { + init_cb(); + init_pluck(); + init_map(); + } +}); + +// node_modules/underscore/modules/_group.js +function group(behavior, partition) { + return function(obj, iteratee2, context) { + var result2 = partition ? [[], []] : {}; + iteratee2 = cb(iteratee2, context); + each(obj, function(value, index) { + var key = iteratee2(value, index, obj); + behavior(result2, value, key); + }); + return result2; + }; +} +var init_group = __esm({ + "node_modules/underscore/modules/_group.js"() { + init_cb(); + init_each(); + } +}); + +// node_modules/underscore/modules/groupBy.js +var groupBy_default; +var init_groupBy = __esm({ + "node_modules/underscore/modules/groupBy.js"() { + init_group(); + init_has(); + groupBy_default = group(function(result2, value, key) { + if (has(result2, key)) + result2[key].push(value); + else + result2[key] = [value]; + }); + } +}); + +// node_modules/underscore/modules/indexBy.js +var indexBy_default; +var init_indexBy = __esm({ + "node_modules/underscore/modules/indexBy.js"() { + init_group(); + indexBy_default = group(function(result2, value, key) { + result2[key] = value; + }); + } +}); + +// node_modules/underscore/modules/countBy.js +var countBy_default; +var init_countBy = __esm({ + "node_modules/underscore/modules/countBy.js"() { + init_group(); + init_has(); + countBy_default = group(function(result2, value, key) { + if (has(result2, key)) + result2[key]++; + else + result2[key] = 1; + }); + } +}); + +// node_modules/underscore/modules/partition.js +var partition_default; +var init_partition = __esm({ + "node_modules/underscore/modules/partition.js"() { + init_group(); + partition_default = group(function(result2, value, pass) { + result2[pass ? 0 : 1].push(value); + }, true); + } +}); + +// node_modules/underscore/modules/size.js +function size(obj) { + if (obj == null) + return 0; + return isArrayLike_default(obj) ? obj.length : keys(obj).length; +} +var init_size = __esm({ + "node_modules/underscore/modules/size.js"() { + init_isArrayLike(); + init_keys(); + } +}); + +// node_modules/underscore/modules/_keyInObj.js +function keyInObj(value, key, obj) { + return key in obj; +} +var init_keyInObj = __esm({ + "node_modules/underscore/modules/_keyInObj.js"() { + } +}); + +// node_modules/underscore/modules/pick.js +var pick_default; +var init_pick = __esm({ + "node_modules/underscore/modules/pick.js"() { + init_restArguments(); + init_isFunction(); + init_optimizeCb(); + init_allKeys(); + init_keyInObj(); + init_flatten(); + pick_default = restArguments(function(obj, keys2) { + var result2 = {}, iteratee2 = keys2[0]; + if (obj == null) + return result2; + if (isFunction_default(iteratee2)) { + if (keys2.length > 1) + iteratee2 = optimizeCb(iteratee2, keys2[1]); + keys2 = allKeys(obj); + } else { + iteratee2 = keyInObj; + keys2 = flatten(keys2, false, false); + obj = Object(obj); + } + for (var i = 0, length = keys2.length; i < length; i++) { + var key = keys2[i]; + var value = obj[key]; + if (iteratee2(value, key, obj)) + result2[key] = value; + } + return result2; + }); + } +}); + +// node_modules/underscore/modules/omit.js +var omit_default; +var init_omit = __esm({ + "node_modules/underscore/modules/omit.js"() { + init_restArguments(); + init_isFunction(); + init_negate(); + init_map(); + init_flatten(); + init_contains(); + init_pick(); + omit_default = restArguments(function(obj, keys2) { + var iteratee2 = keys2[0], context; + if (isFunction_default(iteratee2)) { + iteratee2 = negate(iteratee2); + if (keys2.length > 1) + context = keys2[1]; + } else { + keys2 = map(flatten(keys2, false, false), String); + iteratee2 = function(value, key) { + return !contains(keys2, key); + }; + } + return pick_default(obj, iteratee2, context); + }); + } +}); + +// node_modules/underscore/modules/initial.js +function initial(array, n, guard) { + return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); +} +var init_initial = __esm({ + "node_modules/underscore/modules/initial.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/first.js +function first(array, n, guard) { + if (array == null || array.length < 1) + return n == null || guard ? void 0 : []; + if (n == null || guard) + return array[0]; + return initial(array, array.length - n); +} +var init_first = __esm({ + "node_modules/underscore/modules/first.js"() { + init_initial(); + } +}); + +// node_modules/underscore/modules/rest.js +function rest(array, n, guard) { + return slice.call(array, n == null || guard ? 1 : n); +} +var init_rest = __esm({ + "node_modules/underscore/modules/rest.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/last.js +function last(array, n, guard) { + if (array == null || array.length < 1) + return n == null || guard ? void 0 : []; + if (n == null || guard) + return array[array.length - 1]; + return rest(array, Math.max(0, array.length - n)); +} +var init_last = __esm({ + "node_modules/underscore/modules/last.js"() { + init_rest(); + } +}); + +// node_modules/underscore/modules/compact.js +function compact(array) { + return filter(array, Boolean); +} +var init_compact = __esm({ + "node_modules/underscore/modules/compact.js"() { + init_filter(); + } +}); + +// node_modules/underscore/modules/flatten.js +function flatten2(array, depth) { + return flatten(array, depth, false); +} +var init_flatten2 = __esm({ + "node_modules/underscore/modules/flatten.js"() { + init_flatten(); + } +}); + +// node_modules/underscore/modules/difference.js +var difference_default; +var init_difference = __esm({ + "node_modules/underscore/modules/difference.js"() { + init_restArguments(); + init_flatten(); + init_filter(); + init_contains(); + difference_default = restArguments(function(array, rest2) { + rest2 = flatten(rest2, true, true); + return filter(array, function(value) { + return !contains(rest2, value); + }); + }); + } +}); + +// node_modules/underscore/modules/without.js +var without_default; +var init_without = __esm({ + "node_modules/underscore/modules/without.js"() { + init_restArguments(); + init_difference(); + without_default = restArguments(function(array, otherArrays) { + return difference_default(array, otherArrays); + }); + } +}); + +// node_modules/underscore/modules/uniq.js +function uniq(array, isSorted, iteratee2, context) { + if (!isBoolean(isSorted)) { + context = iteratee2; + iteratee2 = isSorted; + isSorted = false; + } + if (iteratee2 != null) + iteratee2 = cb(iteratee2, context); + var result2 = []; + var seen = []; + for (var i = 0, length = getLength_default(array); i < length; i++) { + var value = array[i], computed = iteratee2 ? iteratee2(value, i, array) : value; + if (isSorted && !iteratee2) { + if (!i || seen !== computed) + result2.push(value); + seen = computed; + } else if (iteratee2) { + if (!contains(seen, computed)) { + seen.push(computed); + result2.push(value); + } + } else if (!contains(result2, value)) { + result2.push(value); + } + } + return result2; +} +var init_uniq = __esm({ + "node_modules/underscore/modules/uniq.js"() { + init_isBoolean(); + init_cb(); + init_getLength(); + init_contains(); + } +}); + +// node_modules/underscore/modules/union.js +var union_default; +var init_union = __esm({ + "node_modules/underscore/modules/union.js"() { + init_restArguments(); + init_uniq(); + init_flatten(); + union_default = restArguments(function(arrays) { + return uniq(flatten(arrays, true, true)); + }); + } +}); + +// node_modules/underscore/modules/intersection.js +function intersection(array) { + var result2 = []; + var argsLength = arguments.length; + for (var i = 0, length = getLength_default(array); i < length; i++) { + var item = array[i]; + if (contains(result2, item)) + continue; + var j; + for (j = 1; j < argsLength; j++) { + if (!contains(arguments[j], item)) + break; + } + if (j === argsLength) + result2.push(item); + } + return result2; +} +var init_intersection = __esm({ + "node_modules/underscore/modules/intersection.js"() { + init_getLength(); + init_contains(); + } +}); + +// node_modules/underscore/modules/unzip.js +function unzip(array) { + var length = array && max(array, getLength_default).length || 0; + var result2 = Array(length); + for (var index = 0; index < length; index++) { + result2[index] = pluck(array, index); + } + return result2; +} +var init_unzip = __esm({ + "node_modules/underscore/modules/unzip.js"() { + init_max(); + init_getLength(); + init_pluck(); + } +}); + +// node_modules/underscore/modules/zip.js +var zip_default; +var init_zip = __esm({ + "node_modules/underscore/modules/zip.js"() { + init_restArguments(); + init_unzip(); + zip_default = restArguments(unzip); + } +}); + +// node_modules/underscore/modules/object.js +function object(list, values2) { + var result2 = {}; + for (var i = 0, length = getLength_default(list); i < length; i++) { + if (values2) { + result2[list[i]] = values2[i]; + } else { + result2[list[i][0]] = list[i][1]; + } + } + return result2; +} +var init_object = __esm({ + "node_modules/underscore/modules/object.js"() { + init_getLength(); + } +}); + +// node_modules/underscore/modules/range.js +function range(start, stop, step) { + if (stop == null) { + stop = start || 0; + start = 0; + } + if (!step) { + step = stop < start ? -1 : 1; + } + var length = Math.max(Math.ceil((stop - start) / step), 0); + var range2 = Array(length); + for (var idx = 0; idx < length; idx++, start += step) { + range2[idx] = start; + } + return range2; +} +var init_range = __esm({ + "node_modules/underscore/modules/range.js"() { + } +}); + +// node_modules/underscore/modules/chunk.js +function chunk(array, count) { + if (count == null || count < 1) + return []; + var result2 = []; + var i = 0, length = array.length; + while (i < length) { + result2.push(slice.call(array, i, i += count)); + } + return result2; +} +var init_chunk = __esm({ + "node_modules/underscore/modules/chunk.js"() { + init_setup(); + } +}); + +// node_modules/underscore/modules/_chainResult.js +function chainResult(instance, obj) { + return instance._chain ? _(obj).chain() : obj; +} +var init_chainResult = __esm({ + "node_modules/underscore/modules/_chainResult.js"() { + init_underscore(); + } +}); + +// node_modules/underscore/modules/mixin.js +function mixin(obj) { + each(functions(obj), function(name) { + var func = _[name] = obj[name]; + _.prototype[name] = function() { + var args = [this._wrapped]; + push.apply(args, arguments); + return chainResult(this, func.apply(_, args)); + }; + }); + return _; +} +var init_mixin = __esm({ + "node_modules/underscore/modules/mixin.js"() { + init_underscore(); + init_each(); + init_functions(); + init_setup(); + init_chainResult(); + } +}); + +// node_modules/underscore/modules/underscore-array-methods.js +var underscore_array_methods_default; +var init_underscore_array_methods = __esm({ + "node_modules/underscore/modules/underscore-array-methods.js"() { + init_underscore(); + init_each(); + init_setup(); + init_chainResult(); + each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) { + method.apply(obj, arguments); + if ((name === "shift" || name === "splice") && obj.length === 0) { + delete obj[0]; + } + } + return chainResult(this, obj); + }; + }); + each(["concat", "join", "slice"], function(name) { + var method = ArrayProto[name]; + _.prototype[name] = function() { + var obj = this._wrapped; + if (obj != null) + obj = method.apply(obj, arguments); + return chainResult(this, obj); + }; + }); + underscore_array_methods_default = _; + } +}); + +// node_modules/underscore/modules/index.js +var modules_exports = {}; +__export(modules_exports, { + VERSION: () => VERSION, + after: () => after, + all: () => every, + allKeys: () => allKeys, + any: () => some, + assign: () => extendOwn_default, + before: () => before, + bind: () => bind_default, + bindAll: () => bindAll_default, + chain: () => chain, + chunk: () => chunk, + clone: () => clone, + collect: () => map, + compact: () => compact, + compose: () => compose, + constant: () => constant, + contains: () => contains, + countBy: () => countBy_default, + create: () => create, + debounce: () => debounce, + default: () => underscore_array_methods_default, + defaults: () => defaults_default, + defer: () => defer_default, + delay: () => delay_default, + detect: () => find, + difference: () => difference_default, + drop: () => rest, + each: () => each, + escape: () => escape_default, + every: () => every, + extend: () => extend_default, + extendOwn: () => extendOwn_default, + filter: () => filter, + find: () => find, + findIndex: () => findIndex_default, + findKey: () => findKey, + findLastIndex: () => findLastIndex_default, + findWhere: () => findWhere, + first: () => first, + flatten: () => flatten2, + foldl: () => reduce_default, + foldr: () => reduceRight_default, + forEach: () => each, + functions: () => functions, + get: () => get, + groupBy: () => groupBy_default, + has: () => has2, + head: () => first, + identity: () => identity, + include: () => contains, + includes: () => contains, + indexBy: () => indexBy_default, + indexOf: () => indexOf_default, + initial: () => initial, + inject: () => reduce_default, + intersection: () => intersection, + invert: () => invert, + invoke: () => invoke_default, + isArguments: () => isArguments_default, + isArray: () => isArray_default, + isArrayBuffer: () => isArrayBuffer_default, + isBoolean: () => isBoolean, + isDataView: () => isDataView_default, + isDate: () => isDate_default, + isElement: () => isElement, + isEmpty: () => isEmpty, + isEqual: () => isEqual, + isError: () => isError_default, + isFinite: () => isFinite2, + isFunction: () => isFunction_default, + isMap: () => isMap_default, + isMatch: () => isMatch, + isNaN: () => isNaN2, + isNull: () => isNull, + isNumber: () => isNumber_default, + isObject: () => isObject, + isRegExp: () => isRegExp_default, + isSet: () => isSet_default, + isString: () => isString_default, + isSymbol: () => isSymbol_default, + isTypedArray: () => isTypedArray_default, + isUndefined: () => isUndefined, + isWeakMap: () => isWeakMap_default, + isWeakSet: () => isWeakSet_default, + iteratee: () => iteratee, + keys: () => keys, + last: () => last, + lastIndexOf: () => lastIndexOf_default, + map: () => map, + mapObject: () => mapObject, + matcher: () => matcher, + matches: () => matcher, + max: () => max, + memoize: () => memoize, + methods: () => functions, + min: () => min, + mixin: () => mixin, + negate: () => negate, + noop: () => noop, + now: () => now_default, + object: () => object, + omit: () => omit_default, + once: () => once_default, + pairs: () => pairs, + partial: () => partial_default, + partition: () => partition_default, + pick: () => pick_default, + pluck: () => pluck, + property: () => property, + propertyOf: () => propertyOf, + random: () => random, + range: () => range, + reduce: () => reduce_default, + reduceRight: () => reduceRight_default, + reject: () => reject, + rest: () => rest, + restArguments: () => restArguments, + result: () => result, + sample: () => sample, + select: () => filter, + shuffle: () => shuffle, + size: () => size, + some: () => some, + sortBy: () => sortBy, + sortedIndex: () => sortedIndex, + tail: () => rest, + take: () => first, + tap: () => tap, + template: () => template, + templateSettings: () => templateSettings_default, + throttle: () => throttle, + times: () => times, + toArray: () => toArray, + toPath: () => toPath, + transpose: () => unzip, + unescape: () => unescape_default, + union: () => union_default, + uniq: () => uniq, + unique: () => uniq, + uniqueId: () => uniqueId, + unzip: () => unzip, + values: () => values, + where: () => where, + without: () => without_default, + wrap: () => wrap, + zip: () => zip_default +}); +var init_modules = __esm({ + "node_modules/underscore/modules/index.js"() { + init_setup(); + init_restArguments(); + init_isObject(); + init_isNull(); + init_isUndefined(); + init_isBoolean(); + init_isElement(); + init_isString(); + init_isNumber(); + init_isDate(); + init_isRegExp(); + init_isError(); + init_isSymbol(); + init_isArrayBuffer(); + init_isDataView(); + init_isArray(); + init_isFunction(); + init_isArguments(); + init_isFinite(); + init_isNaN(); + init_isTypedArray(); + init_isEmpty(); + init_isMatch(); + init_isEqual(); + init_isMap(); + init_isWeakMap(); + init_isSet(); + init_isWeakSet(); + init_keys(); + init_allKeys(); + init_values(); + init_pairs(); + init_invert(); + init_functions(); + init_extend(); + init_extendOwn(); + init_defaults(); + init_create(); + init_clone(); + init_tap(); + init_get(); + init_has2(); + init_mapObject(); + init_identity(); + init_constant(); + init_noop(); + init_toPath(); + init_property(); + init_propertyOf(); + init_matcher(); + init_times(); + init_random(); + init_now(); + init_escape(); + init_unescape(); + init_templateSettings(); + init_template(); + init_result(); + init_uniqueId(); + init_chain(); + init_iteratee(); + init_partial(); + init_bind(); + init_bindAll(); + init_memoize(); + init_delay(); + init_defer(); + init_throttle(); + init_debounce(); + init_wrap(); + init_negate(); + init_compose(); + init_after(); + init_before(); + init_once(); + init_findKey(); + init_findIndex(); + init_findLastIndex(); + init_sortedIndex(); + init_indexOf(); + init_lastIndexOf(); + init_find(); + init_findWhere(); + init_each(); + init_map(); + init_reduce(); + init_reduceRight(); + init_filter(); + init_reject(); + init_every(); + init_some(); + init_contains(); + init_invoke(); + init_pluck(); + init_where(); + init_max(); + init_min(); + init_shuffle(); + init_sample(); + init_sortBy(); + init_groupBy(); + init_indexBy(); + init_countBy(); + init_partition(); + init_toArray(); + init_size(); + init_pick(); + init_omit(); + init_first(); + init_initial(); + init_last(); + init_rest(); + init_compact(); + init_flatten2(); + init_without(); + init_uniq(); + init_union(); + init_intersection(); + init_difference(); + init_unzip(); + init_zip(); + init_object(); + init_range(); + init_chunk(); + init_mixin(); + init_underscore_array_methods(); + } +}); + +// node_modules/underscore/modules/index-default.js +var _2, index_default_default; +var init_index_default = __esm({ + "node_modules/underscore/modules/index-default.js"() { + init_modules(); + init_modules(); + _2 = mixin(modules_exports); + _2._ = _2; + index_default_default = _2; + } +}); + +// node_modules/underscore/modules/index-all.js +var index_all_exports = {}; +__export(index_all_exports, { + VERSION: () => VERSION, + after: () => after, + all: () => every, + allKeys: () => allKeys, + any: () => some, + assign: () => extendOwn_default, + before: () => before, + bind: () => bind_default, + bindAll: () => bindAll_default, + chain: () => chain, + chunk: () => chunk, + clone: () => clone, + collect: () => map, + compact: () => compact, + compose: () => compose, + constant: () => constant, + contains: () => contains, + countBy: () => countBy_default, + create: () => create, + debounce: () => debounce, + default: () => index_default_default, + defaults: () => defaults_default, + defer: () => defer_default, + delay: () => delay_default, + detect: () => find, + difference: () => difference_default, + drop: () => rest, + each: () => each, + escape: () => escape_default, + every: () => every, + extend: () => extend_default, + extendOwn: () => extendOwn_default, + filter: () => filter, + find: () => find, + findIndex: () => findIndex_default, + findKey: () => findKey, + findLastIndex: () => findLastIndex_default, + findWhere: () => findWhere, + first: () => first, + flatten: () => flatten2, + foldl: () => reduce_default, + foldr: () => reduceRight_default, + forEach: () => each, + functions: () => functions, + get: () => get, + groupBy: () => groupBy_default, + has: () => has2, + head: () => first, + identity: () => identity, + include: () => contains, + includes: () => contains, + indexBy: () => indexBy_default, + indexOf: () => indexOf_default, + initial: () => initial, + inject: () => reduce_default, + intersection: () => intersection, + invert: () => invert, + invoke: () => invoke_default, + isArguments: () => isArguments_default, + isArray: () => isArray_default, + isArrayBuffer: () => isArrayBuffer_default, + isBoolean: () => isBoolean, + isDataView: () => isDataView_default, + isDate: () => isDate_default, + isElement: () => isElement, + isEmpty: () => isEmpty, + isEqual: () => isEqual, + isError: () => isError_default, + isFinite: () => isFinite2, + isFunction: () => isFunction_default, + isMap: () => isMap_default, + isMatch: () => isMatch, + isNaN: () => isNaN2, + isNull: () => isNull, + isNumber: () => isNumber_default, + isObject: () => isObject, + isRegExp: () => isRegExp_default, + isSet: () => isSet_default, + isString: () => isString_default, + isSymbol: () => isSymbol_default, + isTypedArray: () => isTypedArray_default, + isUndefined: () => isUndefined, + isWeakMap: () => isWeakMap_default, + isWeakSet: () => isWeakSet_default, + iteratee: () => iteratee, + keys: () => keys, + last: () => last, + lastIndexOf: () => lastIndexOf_default, + map: () => map, + mapObject: () => mapObject, + matcher: () => matcher, + matches: () => matcher, + max: () => max, + memoize: () => memoize, + methods: () => functions, + min: () => min, + mixin: () => mixin, + negate: () => negate, + noop: () => noop, + now: () => now_default, + object: () => object, + omit: () => omit_default, + once: () => once_default, + pairs: () => pairs, + partial: () => partial_default, + partition: () => partition_default, + pick: () => pick_default, + pluck: () => pluck, + property: () => property, + propertyOf: () => propertyOf, + random: () => random, + range: () => range, + reduce: () => reduce_default, + reduceRight: () => reduceRight_default, + reject: () => reject, + rest: () => rest, + restArguments: () => restArguments, + result: () => result, + sample: () => sample, + select: () => filter, + shuffle: () => shuffle, + size: () => size, + some: () => some, + sortBy: () => sortBy, + sortedIndex: () => sortedIndex, + tail: () => rest, + take: () => first, + tap: () => tap, + template: () => template, + templateSettings: () => templateSettings_default, + throttle: () => throttle, + times: () => times, + toArray: () => toArray, + toPath: () => toPath, + transpose: () => unzip, + unescape: () => unescape_default, + union: () => union_default, + uniq: () => uniq, + unique: () => uniq, + uniqueId: () => uniqueId, + unzip: () => unzip, + values: () => values, + where: () => where, + without: () => without_default, + wrap: () => wrap, + zip: () => zip_default +}); +var init_index_all = __esm({ + "node_modules/underscore/modules/index-all.js"() { + init_index_default(); + init_modules(); + } +}); + +// node_modules/backbone/backbone.js +var require_backbone = __commonJS({ + "node_modules/backbone/backbone.js"(exports) { + (function(factory) { + var root2 = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global; + if (typeof define === "function" && define.amd) { + define(["underscore", "jquery", "exports"], function(_4, $2, exports2) { + root2.Backbone = factory(root2, exports2, _4, $2); + }); + } else if (typeof exports !== "undefined") { + var _3 = (init_index_all(), __toCommonJS(index_all_exports)), $; + try { + $ = require("jquery"); + } catch (e) { + } + factory(root2, exports, _3, $); + } else { + root2.Backbone = factory(root2, {}, root2._, root2.jQuery || root2.Zepto || root2.ender || root2.$); + } + })(function(root2, Backbone, _3, $) { + var previousBackbone = root2.Backbone; + var slice2 = Array.prototype.slice; + Backbone.VERSION = "1.6.0"; + Backbone.$ = $; + Backbone.noConflict = function() { + root2.Backbone = previousBackbone; + return this; + }; + Backbone.emulateHTTP = false; + Backbone.emulateJSON = false; + var Events = Backbone.Events = {}; + var eventSplitter = /\s+/; + var _listening; + var eventsApi = function(iteratee2, events, name, callback, opts) { + var i = 0, names; + if (name && typeof name === "object") { + if (callback !== void 0 && "context" in opts && opts.context === void 0) + opts.context = callback; + for (names = _3.keys(name); i < names.length; i++) { + events = eventsApi(iteratee2, events, names[i], name[names[i]], opts); + } + } else if (name && eventSplitter.test(name)) { + for (names = name.split(eventSplitter); i < names.length; i++) { + events = iteratee2(events, names[i], callback, opts); + } + } else { + events = iteratee2(events, name, callback, opts); + } + return events; + }; + Events.on = function(name, callback, context) { + this._events = eventsApi(onApi, this._events || {}, name, callback, { + context, + ctx: this, + listening: _listening + }); + if (_listening) { + var listeners = this._listeners || (this._listeners = {}); + listeners[_listening.id] = _listening; + _listening.interop = false; + } + return this; + }; + Events.listenTo = function(obj, name, callback) { + if (!obj) + return this; + var id = obj._listenId || (obj._listenId = _3.uniqueId("l")); + var listeningTo = this._listeningTo || (this._listeningTo = {}); + var listening = _listening = listeningTo[id]; + if (!listening) { + this._listenId || (this._listenId = _3.uniqueId("l")); + listening = _listening = listeningTo[id] = new Listening(this, obj); + } + var error = tryCatchOn(obj, name, callback, this); + _listening = void 0; + if (error) + throw error; + if (listening.interop) + listening.on(name, callback); + return this; + }; + var onApi = function(events, name, callback, options) { + if (callback) { + var handlers = events[name] || (events[name] = []); + var context = options.context, ctx = options.ctx, listening = options.listening; + if (listening) + listening.count++; + handlers.push({ callback, context, ctx: context || ctx, listening }); + } + return events; + }; + var tryCatchOn = function(obj, name, callback, context) { + try { + obj.on(name, callback, context); + } catch (e) { + return e; + } + }; + Events.off = function(name, callback, context) { + if (!this._events) + return this; + this._events = eventsApi(offApi, this._events, name, callback, { + context, + listeners: this._listeners + }); + return this; + }; + Events.stopListening = function(obj, name, callback) { + var listeningTo = this._listeningTo; + if (!listeningTo) + return this; + var ids = obj ? [obj._listenId] : _3.keys(listeningTo); + for (var i = 0; i < ids.length; i++) { + var listening = listeningTo[ids[i]]; + if (!listening) + break; + listening.obj.off(name, callback, this); + if (listening.interop) + listening.off(name, callback); + } + if (_3.isEmpty(listeningTo)) + this._listeningTo = void 0; + return this; + }; + var offApi = function(events, name, callback, options) { + if (!events) + return; + var context = options.context, listeners = options.listeners; + var i = 0, names; + if (!name && !context && !callback) { + for (names = _3.keys(listeners); i < names.length; i++) { + listeners[names[i]].cleanup(); + } + return; + } + names = name ? [name] : _3.keys(events); + for (; i < names.length; i++) { + name = names[i]; + var handlers = events[name]; + if (!handlers) + break; + var remaining = []; + for (var j = 0; j < handlers.length; j++) { + var handler = handlers[j]; + if (callback && callback !== handler.callback && callback !== handler.callback._callback || context && context !== handler.context) { + remaining.push(handler); + } else { + var listening = handler.listening; + if (listening) + listening.off(name, callback); + } + } + if (remaining.length) { + events[name] = remaining; + } else { + delete events[name]; + } + } + return events; + }; + Events.once = function(name, callback, context) { + var events = eventsApi(onceMap, {}, name, callback, this.off.bind(this)); + if (typeof name === "string" && context == null) + callback = void 0; + return this.on(events, callback, context); + }; + Events.listenToOnce = function(obj, name, callback) { + var events = eventsApi(onceMap, {}, name, callback, this.stopListening.bind(this, obj)); + return this.listenTo(obj, events); + }; + var onceMap = function(map2, name, callback, offer) { + if (callback) { + var once = map2[name] = _3.once(function() { + offer(name, once); + callback.apply(this, arguments); + }); + once._callback = callback; + } + return map2; + }; + Events.trigger = function(name) { + if (!this._events) + return this; + var length = Math.max(0, arguments.length - 1); + var args = Array(length); + for (var i = 0; i < length; i++) + args[i] = arguments[i + 1]; + eventsApi(triggerApi, this._events, name, void 0, args); + return this; + }; + var triggerApi = function(objEvents, name, callback, args) { + if (objEvents) { + var events = objEvents[name]; + var allEvents = objEvents.all; + if (events && allEvents) + allEvents = allEvents.slice(); + if (events) + triggerEvents(events, args); + if (allEvents) + triggerEvents(allEvents, [name].concat(args)); + } + return objEvents; + }; + var triggerEvents = function(events, args) { + var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; + switch (args.length) { + case 0: + while (++i < l) + (ev = events[i]).callback.call(ev.ctx); + return; + case 1: + while (++i < l) + (ev = events[i]).callback.call(ev.ctx, a1); + return; + case 2: + while (++i < l) + (ev = events[i]).callback.call(ev.ctx, a1, a2); + return; + case 3: + while (++i < l) + (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); + return; + default: + while (++i < l) + (ev = events[i]).callback.apply(ev.ctx, args); + return; + } + }; + var Listening = function(listener, obj) { + this.id = listener._listenId; + this.listener = listener; + this.obj = obj; + this.interop = true; + this.count = 0; + this._events = void 0; + }; + Listening.prototype.on = Events.on; + Listening.prototype.off = function(name, callback) { + var cleanup; + if (this.interop) { + this._events = eventsApi(offApi, this._events, name, callback, { + context: void 0, + listeners: void 0 + }); + cleanup = !this._events; + } else { + this.count--; + cleanup = this.count === 0; + } + if (cleanup) + this.cleanup(); + }; + Listening.prototype.cleanup = function() { + delete this.listener._listeningTo[this.obj._listenId]; + if (!this.interop) + delete this.obj._listeners[this.id]; + }; + Events.bind = Events.on; + Events.unbind = Events.off; + _3.extend(Backbone, Events); + var Model3 = Backbone.Model = function(attributes, options) { + var attrs = attributes || {}; + options || (options = {}); + this.preinitialize.apply(this, arguments); + this.cid = _3.uniqueId(this.cidPrefix); + this.attributes = {}; + if (options.collection) + this.collection = options.collection; + if (options.parse) + attrs = this.parse(attrs, options) || {}; + var defaults = _3.result(this, "defaults"); + attrs = _3.defaults(_3.extend({}, defaults, attrs), defaults); + this.set(attrs, options); + this.changed = {}; + this.initialize.apply(this, arguments); + }; + _3.extend(Model3.prototype, Events, { + // A hash of attributes whose current and previous value differ. + changed: null, + // The value returned during the last failed validation. + validationError: null, + // The default name for the JSON `id` attribute is `"id"`. MongoDB and + // CouchDB users may want to set this to `"_id"`. + idAttribute: "id", + // The prefix is used to create the client id which is used to identify models locally. + // You may want to override this if you're experiencing name clashes with model ids. + cidPrefix: "c", + // preinitialize is an empty function by default. You can override it with a function + // or object. preinitialize will run before any instantiation logic is run in the Model. + preinitialize: function() { + }, + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function() { + }, + // Return a copy of the model's `attributes` object. + toJSON: function(options) { + return _3.clone(this.attributes); + }, + // Proxy `Backbone.sync` by default -- but override this if you need + // custom syncing semantics for *this* particular model. + sync: function() { + return Backbone.sync.apply(this, arguments); + }, + // Get the value of an attribute. + get: function(attr) { + return this.attributes[attr]; + }, + // Get the HTML-escaped value of an attribute. + escape: function(attr) { + return _3.escape(this.get(attr)); + }, + // Returns `true` if the attribute contains a value that is not null + // or undefined. + has: function(attr) { + return this.get(attr) != null; + }, + // Special-cased proxy to underscore's `_.matches` method. + matches: function(attrs) { + return !!_3.iteratee(attrs, this)(this.attributes); + }, + // Set a hash of model attributes on the object, firing `"change"`. This is + // the core primitive operation of a model, updating the data and notifying + // anyone who needs to know about the change in state. The heart of the beast. + set: function(key, val, options) { + if (key == null) + return this; + var attrs; + if (typeof key === "object") { + attrs = key; + options = val; + } else { + (attrs = {})[key] = val; + } + options || (options = {}); + if (!this._validate(attrs, options)) + return false; + var unset = options.unset; + var silent = options.silent; + var changes = []; + var changing = this._changing; + this._changing = true; + if (!changing) { + this._previousAttributes = _3.clone(this.attributes); + this.changed = {}; + } + var current = this.attributes; + var changed = this.changed; + var prev = this._previousAttributes; + for (var attr in attrs) { + val = attrs[attr]; + if (!_3.isEqual(current[attr], val)) + changes.push(attr); + if (!_3.isEqual(prev[attr], val)) { + changed[attr] = val; + } else { + delete changed[attr]; + } + unset ? delete current[attr] : current[attr] = val; + } + if (this.idAttribute in attrs) { + var prevId = this.id; + this.id = this.get(this.idAttribute); + this.trigger("changeId", this, prevId, options); + } + if (!silent) { + if (changes.length) + this._pending = options; + for (var i = 0; i < changes.length; i++) { + this.trigger("change:" + changes[i], this, current[changes[i]], options); + } + } + if (changing) + return this; + if (!silent) { + while (this._pending) { + options = this._pending; + this._pending = false; + this.trigger("change", this, options); + } + } + this._pending = false; + this._changing = false; + return this; + }, + // Remove an attribute from the model, firing `"change"`. `unset` is a noop + // if the attribute doesn't exist. + unset: function(attr, options) { + return this.set(attr, void 0, _3.extend({}, options, { unset: true })); + }, + // Clear all attributes on the model, firing `"change"`. + clear: function(options) { + var attrs = {}; + for (var key in this.attributes) + attrs[key] = void 0; + return this.set(attrs, _3.extend({}, options, { unset: true })); + }, + // Determine if the model has changed since the last `"change"` event. + // If you specify an attribute name, determine if that attribute has changed. + hasChanged: function(attr) { + if (attr == null) + return !_3.isEmpty(this.changed); + return _3.has(this.changed, attr); + }, + // Return an object containing all the attributes that have changed, or + // false if there are no changed attributes. Useful for determining what + // parts of a view need to be updated and/or what attributes need to be + // persisted to the server. Unset attributes will be set to undefined. + // You can also pass an attributes object to diff against the model, + // determining if there *would be* a change. + changedAttributes: function(diff) { + if (!diff) + return this.hasChanged() ? _3.clone(this.changed) : false; + var old = this._changing ? this._previousAttributes : this.attributes; + var changed = {}; + var hasChanged; + for (var attr in diff) { + var val = diff[attr]; + if (_3.isEqual(old[attr], val)) + continue; + changed[attr] = val; + hasChanged = true; + } + return hasChanged ? changed : false; + }, + // Get the previous value of an attribute, recorded at the time the last + // `"change"` event was fired. + previous: function(attr) { + if (attr == null || !this._previousAttributes) + return null; + return this._previousAttributes[attr]; + }, + // Get all of the attributes of the model at the time of the previous + // `"change"` event. + previousAttributes: function() { + return _3.clone(this._previousAttributes); + }, + // Fetch the model from the server, merging the response with the model's + // local attributes. Any changed attributes will trigger a "change" event. + fetch: function(options) { + options = _3.extend({ parse: true }, options); + var model = this; + var success = options.success; + options.success = function(resp) { + var serverAttrs = options.parse ? model.parse(resp, options) : resp; + if (!model.set(serverAttrs, options)) + return false; + if (success) + success.call(options.context, model, resp, options); + model.trigger("sync", model, resp, options); + }; + wrapError(this, options); + return this.sync("read", this, options); + }, + // Set a hash of model attributes, and sync the model to the server. + // If the server returns an attributes hash that differs, the model's + // state will be `set` again. + save: function(key, val, options) { + var attrs; + if (key == null || typeof key === "object") { + attrs = key; + options = val; + } else { + (attrs = {})[key] = val; + } + options = _3.extend({ validate: true, parse: true }, options); + var wait = options.wait; + if (attrs && !wait) { + if (!this.set(attrs, options)) + return false; + } else if (!this._validate(attrs, options)) { + return false; + } + var model = this; + var success = options.success; + var attributes = this.attributes; + options.success = function(resp) { + model.attributes = attributes; + var serverAttrs = options.parse ? model.parse(resp, options) : resp; + if (wait) + serverAttrs = _3.extend({}, attrs, serverAttrs); + if (serverAttrs && !model.set(serverAttrs, options)) + return false; + if (success) + success.call(options.context, model, resp, options); + model.trigger("sync", model, resp, options); + }; + wrapError(this, options); + if (attrs && wait) + this.attributes = _3.extend({}, attributes, attrs); + var method = this.isNew() ? "create" : options.patch ? "patch" : "update"; + if (method === "patch" && !options.attrs) + options.attrs = attrs; + var xhr = this.sync(method, this, options); + this.attributes = attributes; + return xhr; + }, + // Destroy this model on the server if it was already persisted. + // Optimistically removes the model from its collection, if it has one. + // If `wait: true` is passed, waits for the server to respond before removal. + destroy: function(options) { + options = options ? _3.clone(options) : {}; + var model = this; + var success = options.success; + var wait = options.wait; + var destroy = function() { + model.stopListening(); + model.trigger("destroy", model, model.collection, options); + }; + options.success = function(resp) { + if (wait) + destroy(); + if (success) + success.call(options.context, model, resp, options); + if (!model.isNew()) + model.trigger("sync", model, resp, options); + }; + var xhr = false; + if (this.isNew()) { + _3.defer(options.success); + } else { + wrapError(this, options); + xhr = this.sync("delete", this, options); + } + if (!wait) + destroy(); + return xhr; + }, + // Default URL for the model's representation on the server -- if you're + // using Backbone's restful methods, override this to change the endpoint + // that will be called. + url: function() { + var base = _3.result(this, "urlRoot") || _3.result(this.collection, "url") || urlError(); + if (this.isNew()) + return base; + var id = this.get(this.idAttribute); + return base.replace(/[^\/]$/, "$&/") + encodeURIComponent(id); + }, + // **parse** converts a response into the hash of attributes to be `set` on + // the model. The default implementation is just to pass the response along. + parse: function(resp, options) { + return resp; + }, + // Create a new model with identical attributes to this one. + clone: function() { + return new this.constructor(this.attributes); + }, + // A model is new if it has never been saved to the server, and lacks an id. + isNew: function() { + return !this.has(this.idAttribute); + }, + // Check if the model is currently in a valid state. + isValid: function(options) { + return this._validate({}, _3.extend({}, options, { validate: true })); + }, + // Run validation against the next complete set of model attributes, + // returning `true` if all is well. Otherwise, fire an `"invalid"` event. + _validate: function(attrs, options) { + if (!options.validate || !this.validate) + return true; + attrs = _3.extend({}, this.attributes, attrs); + var error = this.validationError = this.validate(attrs, options) || null; + if (!error) + return true; + this.trigger("invalid", this, error, _3.extend(options, { validationError: error })); + return false; + } + }); + var Collection = Backbone.Collection = function(models, options) { + options || (options = {}); + this.preinitialize.apply(this, arguments); + if (options.model) + this.model = options.model; + if (options.comparator !== void 0) + this.comparator = options.comparator; + this._reset(); + this.initialize.apply(this, arguments); + if (models) + this.reset(models, _3.extend({ silent: true }, options)); + }; + var setOptions = { add: true, remove: true, merge: true }; + var addOptions = { add: true, remove: false }; + var splice = function(array, insert, at) { + at = Math.min(Math.max(at, 0), array.length); + var tail = Array(array.length - at); + var length = insert.length; + var i; + for (i = 0; i < tail.length; i++) + tail[i] = array[i + at]; + for (i = 0; i < length; i++) + array[i + at] = insert[i]; + for (i = 0; i < tail.length; i++) + array[i + length + at] = tail[i]; + }; + _3.extend(Collection.prototype, Events, { + // The default model for a collection is just a **Backbone.Model**. + // This should be overridden in most cases. + model: Model3, + // preinitialize is an empty function by default. You can override it with a function + // or object. preinitialize will run before any instantiation logic is run in the Collection. + preinitialize: function() { + }, + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function() { + }, + // The JSON representation of a Collection is an array of the + // models' attributes. + toJSON: function(options) { + return this.map(function(model) { + return model.toJSON(options); + }); + }, + // Proxy `Backbone.sync` by default. + sync: function() { + return Backbone.sync.apply(this, arguments); + }, + // Add a model, or list of models to the set. `models` may be Backbone + // Models or raw JavaScript objects to be converted to Models, or any + // combination of the two. + add: function(models, options) { + return this.set(models, _3.extend({ merge: false }, options, addOptions)); + }, + // Remove a model, or a list of models from the set. + remove: function(models, options) { + options = _3.extend({}, options); + var singular = !_3.isArray(models); + models = singular ? [models] : models.slice(); + var removed = this._removeModels(models, options); + if (!options.silent && removed.length) { + options.changes = { added: [], merged: [], removed }; + this.trigger("update", this, options); + } + return singular ? removed[0] : removed; + }, + // Update a collection by `set`-ing a new list of models, adding new ones, + // removing models that are no longer present, and merging models that + // already exist in the collection, as necessary. Similar to **Model#set**, + // the core operation for updating the data contained by the collection. + set: function(models, options) { + if (models == null) + return; + options = _3.extend({}, setOptions, options); + if (options.parse && !this._isModel(models)) { + models = this.parse(models, options) || []; + } + var singular = !_3.isArray(models); + models = singular ? [models] : models.slice(); + var at = options.at; + if (at != null) + at = +at; + if (at > this.length) + at = this.length; + if (at < 0) + at += this.length + 1; + var set = []; + var toAdd = []; + var toMerge = []; + var toRemove = []; + var modelMap = {}; + var add = options.add; + var merge = options.merge; + var remove = options.remove; + var sort = false; + var sortable = this.comparator && at == null && options.sort !== false; + var sortAttr = _3.isString(this.comparator) ? this.comparator : null; + var model, i; + for (i = 0; i < models.length; i++) { + model = models[i]; + var existing = this.get(model); + if (existing) { + if (merge && model !== existing) { + var attrs = this._isModel(model) ? model.attributes : model; + if (options.parse) + attrs = existing.parse(attrs, options); + existing.set(attrs, options); + toMerge.push(existing); + if (sortable && !sort) + sort = existing.hasChanged(sortAttr); + } + if (!modelMap[existing.cid]) { + modelMap[existing.cid] = true; + set.push(existing); + } + models[i] = existing; + } else if (add) { + model = models[i] = this._prepareModel(model, options); + if (model) { + toAdd.push(model); + this._addReference(model, options); + modelMap[model.cid] = true; + set.push(model); + } + } + } + if (remove) { + for (i = 0; i < this.length; i++) { + model = this.models[i]; + if (!modelMap[model.cid]) + toRemove.push(model); + } + if (toRemove.length) + this._removeModels(toRemove, options); + } + var orderChanged = false; + var replace = !sortable && add && remove; + if (set.length && replace) { + orderChanged = this.length !== set.length || _3.some(this.models, function(m, index) { + return m !== set[index]; + }); + this.models.length = 0; + splice(this.models, set, 0); + this.length = this.models.length; + } else if (toAdd.length) { + if (sortable) + sort = true; + splice(this.models, toAdd, at == null ? this.length : at); + this.length = this.models.length; + } + if (sort) + this.sort({ silent: true }); + if (!options.silent) { + for (i = 0; i < toAdd.length; i++) { + if (at != null) + options.index = at + i; + model = toAdd[i]; + model.trigger("add", model, this, options); + } + if (sort || orderChanged) + this.trigger("sort", this, options); + if (toAdd.length || toRemove.length || toMerge.length) { + options.changes = { + added: toAdd, + removed: toRemove, + merged: toMerge + }; + this.trigger("update", this, options); + } + } + return singular ? models[0] : models; + }, + // When you have more items than you want to add or remove individually, + // you can reset the entire set with a new list of models, without firing + // any granular `add` or `remove` events. Fires `reset` when finished. + // Useful for bulk operations and optimizations. + reset: function(models, options) { + options = options ? _3.clone(options) : {}; + for (var i = 0; i < this.models.length; i++) { + this._removeReference(this.models[i], options); + } + options.previousModels = this.models; + this._reset(); + models = this.add(models, _3.extend({ silent: true }, options)); + if (!options.silent) + this.trigger("reset", this, options); + return models; + }, + // Add a model to the end of the collection. + push: function(model, options) { + return this.add(model, _3.extend({ at: this.length }, options)); + }, + // Remove a model from the end of the collection. + pop: function(options) { + var model = this.at(this.length - 1); + return this.remove(model, options); + }, + // Add a model to the beginning of the collection. + unshift: function(model, options) { + return this.add(model, _3.extend({ at: 0 }, options)); + }, + // Remove a model from the beginning of the collection. + shift: function(options) { + var model = this.at(0); + return this.remove(model, options); + }, + // Slice out a sub-array of models from the collection. + slice: function() { + return slice2.apply(this.models, arguments); + }, + // Get a model from the set by id, cid, model object with id or cid + // properties, or an attributes object that is transformed through modelId. + get: function(obj) { + if (obj == null) + return void 0; + return this._byId[obj] || this._byId[this.modelId(this._isModel(obj) ? obj.attributes : obj, obj.idAttribute)] || obj.cid && this._byId[obj.cid]; + }, + // Returns `true` if the model is in the collection. + has: function(obj) { + return this.get(obj) != null; + }, + // Get the model at the given index. + at: function(index) { + if (index < 0) + index += this.length; + return this.models[index]; + }, + // Return models with matching attributes. Useful for simple cases of + // `filter`. + where: function(attrs, first2) { + return this[first2 ? "find" : "filter"](attrs); + }, + // Return the first model with matching attributes. Useful for simple cases + // of `find`. + findWhere: function(attrs) { + return this.where(attrs, true); + }, + // Force the collection to re-sort itself. You don't need to call this under + // normal circumstances, as the set will maintain sort order as each item + // is added. + sort: function(options) { + var comparator = this.comparator; + if (!comparator) + throw new Error("Cannot sort a set without a comparator"); + options || (options = {}); + var length = comparator.length; + if (_3.isFunction(comparator)) + comparator = comparator.bind(this); + if (length === 1 || _3.isString(comparator)) { + this.models = this.sortBy(comparator); + } else { + this.models.sort(comparator); + } + if (!options.silent) + this.trigger("sort", this, options); + return this; + }, + // Pluck an attribute from each model in the collection. + pluck: function(attr) { + return this.map(attr + ""); + }, + // Fetch the default set of models for this collection, resetting the + // collection when they arrive. If `reset: true` is passed, the response + // data will be passed through the `reset` method instead of `set`. + fetch: function(options) { + options = _3.extend({ parse: true }, options); + var success = options.success; + var collection = this; + options.success = function(resp) { + var method = options.reset ? "reset" : "set"; + collection[method](resp, options); + if (success) + success.call(options.context, collection, resp, options); + collection.trigger("sync", collection, resp, options); + }; + wrapError(this, options); + return this.sync("read", this, options); + }, + // Create a new instance of a model in this collection. Add the model to the + // collection immediately, unless `wait: true` is passed, in which case we + // wait for the server to agree. + create: function(model, options) { + options = options ? _3.clone(options) : {}; + var wait = options.wait; + model = this._prepareModel(model, options); + if (!model) + return false; + if (!wait) + this.add(model, options); + var collection = this; + var success = options.success; + options.success = function(m, resp, callbackOpts) { + if (wait) { + m.off("error", collection._forwardPristineError, collection); + collection.add(m, callbackOpts); + } + if (success) + success.call(callbackOpts.context, m, resp, callbackOpts); + }; + if (wait) { + model.once("error", this._forwardPristineError, this); + } + model.save(null, options); + return model; + }, + // **parse** converts a response into a list of models to be added to the + // collection. The default implementation is just to pass it through. + parse: function(resp, options) { + return resp; + }, + // Create a new collection with an identical list of models as this one. + clone: function() { + return new this.constructor(this.models, { + model: this.model, + comparator: this.comparator + }); + }, + // Define how to uniquely identify models in the collection. + modelId: function(attrs, idAttribute) { + return attrs[idAttribute || this.model.prototype.idAttribute || "id"]; + }, + // Get an iterator of all models in this collection. + values: function() { + return new CollectionIterator(this, ITERATOR_VALUES); + }, + // Get an iterator of all model IDs in this collection. + keys: function() { + return new CollectionIterator(this, ITERATOR_KEYS); + }, + // Get an iterator of all [ID, model] tuples in this collection. + entries: function() { + return new CollectionIterator(this, ITERATOR_KEYSVALUES); + }, + // Private method to reset all internal state. Called when the collection + // is first initialized or reset. + _reset: function() { + this.length = 0; + this.models = []; + this._byId = {}; + }, + // Prepare a hash of attributes (or other model) to be added to this + // collection. + _prepareModel: function(attrs, options) { + if (this._isModel(attrs)) { + if (!attrs.collection) + attrs.collection = this; + return attrs; + } + options = options ? _3.clone(options) : {}; + options.collection = this; + var model; + if (this.model.prototype) { + model = new this.model(attrs, options); + } else { + model = this.model(attrs, options); + } + if (!model.validationError) + return model; + this.trigger("invalid", this, model.validationError, options); + return false; + }, + // Internal method called by both remove and set. + _removeModels: function(models, options) { + var removed = []; + for (var i = 0; i < models.length; i++) { + var model = this.get(models[i]); + if (!model) + continue; + var index = this.indexOf(model); + this.models.splice(index, 1); + this.length--; + delete this._byId[model.cid]; + var id = this.modelId(model.attributes, model.idAttribute); + if (id != null) + delete this._byId[id]; + if (!options.silent) { + options.index = index; + model.trigger("remove", model, this, options); + } + removed.push(model); + this._removeReference(model, options); + } + if (models.length > 0 && !options.silent) + delete options.index; + return removed; + }, + // Method for checking whether an object should be considered a model for + // the purposes of adding to the collection. + _isModel: function(model) { + return model instanceof Model3; + }, + // Internal method to create a model's ties to a collection. + _addReference: function(model, options) { + this._byId[model.cid] = model; + var id = this.modelId(model.attributes, model.idAttribute); + if (id != null) + this._byId[id] = model; + model.on("all", this._onModelEvent, this); + }, + // Internal method to sever a model's ties to a collection. + _removeReference: function(model, options) { + delete this._byId[model.cid]; + var id = this.modelId(model.attributes, model.idAttribute); + if (id != null) + delete this._byId[id]; + if (this === model.collection) + delete model.collection; + model.off("all", this._onModelEvent, this); + }, + // Internal method called every time a model in the set fires an event. + // Sets need to update their indexes when models change ids. All other + // events simply proxy through. "add" and "remove" events that originate + // in other collections are ignored. + _onModelEvent: function(event, model, collection, options) { + if (model) { + if ((event === "add" || event === "remove") && collection !== this) + return; + if (event === "destroy") + this.remove(model, options); + if (event === "changeId") { + var prevId = this.modelId(model.previousAttributes(), model.idAttribute); + var id = this.modelId(model.attributes, model.idAttribute); + if (prevId != null) + delete this._byId[prevId]; + if (id != null) + this._byId[id] = model; + } + } + this.trigger.apply(this, arguments); + }, + // Internal callback method used in `create`. It serves as a + // stand-in for the `_onModelEvent` method, which is not yet bound + // during the `wait` period of the `create` call. We still want to + // forward any `'error'` event at the end of the `wait` period, + // hence a customized callback. + _forwardPristineError: function(model, collection, options) { + if (this.has(model)) + return; + this._onModelEvent("error", model, collection, options); + } + }); + var $$iterator = typeof Symbol === "function" && Symbol.iterator; + if ($$iterator) { + Collection.prototype[$$iterator] = Collection.prototype.values; + } + var CollectionIterator = function(collection, kind) { + this._collection = collection; + this._kind = kind; + this._index = 0; + }; + var ITERATOR_VALUES = 1; + var ITERATOR_KEYS = 2; + var ITERATOR_KEYSVALUES = 3; + if ($$iterator) { + CollectionIterator.prototype[$$iterator] = function() { + return this; + }; + } + CollectionIterator.prototype.next = function() { + if (this._collection) { + if (this._index < this._collection.length) { + var model = this._collection.at(this._index); + this._index++; + var value; + if (this._kind === ITERATOR_VALUES) { + value = model; + } else { + var id = this._collection.modelId(model.attributes, model.idAttribute); + if (this._kind === ITERATOR_KEYS) { + value = id; + } else { + value = [id, model]; + } + } + return { value, done: false }; + } + this._collection = void 0; + } + return { value: void 0, done: true }; + }; + var View = Backbone.View = function(options) { + this.cid = _3.uniqueId("view"); + this.preinitialize.apply(this, arguments); + _3.extend(this, _3.pick(options, viewOptions)); + this._ensureElement(); + this.initialize.apply(this, arguments); + }; + var delegateEventSplitter = /^(\S+)\s*(.*)$/; + var viewOptions = ["model", "collection", "el", "id", "attributes", "className", "tagName", "events"]; + _3.extend(View.prototype, Events, { + // The default `tagName` of a View's element is `"div"`. + tagName: "div", + // jQuery delegate for element lookup, scoped to DOM elements within the + // current view. This should be preferred to global lookups where possible. + $: function(selector) { + return this.$el.find(selector); + }, + // preinitialize is an empty function by default. You can override it with a function + // or object. preinitialize will run before any instantiation logic is run in the View + preinitialize: function() { + }, + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function() { + }, + // **render** is the core function that your view should override, in order + // to populate its element (`this.el`), with the appropriate HTML. The + // convention is for **render** to always return `this`. + render: function() { + return this; + }, + // Remove this view by taking the element out of the DOM, and removing any + // applicable Backbone.Events listeners. + remove: function() { + this._removeElement(); + this.stopListening(); + return this; + }, + // Remove this view's element from the document and all event listeners + // attached to it. Exposed for subclasses using an alternative DOM + // manipulation API. + _removeElement: function() { + this.$el.remove(); + }, + // Change the view's element (`this.el` property) and re-delegate the + // view's events on the new element. + setElement: function(element) { + this.undelegateEvents(); + this._setElement(element); + this.delegateEvents(); + return this; + }, + // Creates the `this.el` and `this.$el` references for this view using the + // given `el`. `el` can be a CSS selector or an HTML string, a jQuery + // context or an element. Subclasses can override this to utilize an + // alternative DOM manipulation API and are only required to set the + // `this.el` property. + _setElement: function(el) { + this.$el = el instanceof Backbone.$ ? el : Backbone.$(el); + this.el = this.$el[0]; + }, + // Set callbacks, where `this.events` is a hash of + // + // *{"event selector": "callback"}* + // + // { + // 'mousedown .title': 'edit', + // 'click .button': 'save', + // 'click .open': function(e) { ... } + // } + // + // pairs. Callbacks will be bound to the view, with `this` set properly. + // Uses event delegation for efficiency. + // Omitting the selector binds the event to `this.el`. + delegateEvents: function(events) { + events || (events = _3.result(this, "events")); + if (!events) + return this; + this.undelegateEvents(); + for (var key in events) { + var method = events[key]; + if (!_3.isFunction(method)) + method = this[method]; + if (!method) + continue; + var match = key.match(delegateEventSplitter); + this.delegate(match[1], match[2], method.bind(this)); + } + return this; + }, + // Add a single event listener to the view's element (or a child element + // using `selector`). This only works for delegate-able events: not `focus`, + // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer. + delegate: function(eventName, selector, listener) { + this.$el.on(eventName + ".delegateEvents" + this.cid, selector, listener); + return this; + }, + // Clears all callbacks previously bound to the view by `delegateEvents`. + // You usually don't need to use this, but may wish to if you have multiple + // Backbone views attached to the same DOM element. + undelegateEvents: function() { + if (this.$el) + this.$el.off(".delegateEvents" + this.cid); + return this; + }, + // A finer-grained `undelegateEvents` for removing a single delegated event. + // `selector` and `listener` are both optional. + undelegate: function(eventName, selector, listener) { + this.$el.off(eventName + ".delegateEvents" + this.cid, selector, listener); + return this; + }, + // Produces a DOM element to be assigned to your view. Exposed for + // subclasses using an alternative DOM manipulation API. + _createElement: function(tagName) { + return document.createElement(tagName); + }, + // Ensure that the View has a DOM element to render into. + // If `this.el` is a string, pass it through `$()`, take the first + // matching element, and re-assign it to `el`. Otherwise, create + // an element from the `id`, `className` and `tagName` properties. + _ensureElement: function() { + if (!this.el) { + var attrs = _3.extend({}, _3.result(this, "attributes")); + if (this.id) + attrs.id = _3.result(this, "id"); + if (this.className) + attrs["class"] = _3.result(this, "className"); + this.setElement(this._createElement(_3.result(this, "tagName"))); + this._setAttributes(attrs); + } else { + this.setElement(_3.result(this, "el")); + } + }, + // Set attributes from a hash on this view's element. Exposed for + // subclasses using an alternative DOM manipulation API. + _setAttributes: function(attributes) { + this.$el.attr(attributes); + } + }); + var addMethod = function(base, length, method, attribute) { + switch (length) { + case 1: + return function() { + return base[method](this[attribute]); + }; + case 2: + return function(value) { + return base[method](this[attribute], value); + }; + case 3: + return function(iteratee2, context) { + return base[method](this[attribute], cb2(iteratee2, this), context); + }; + case 4: + return function(iteratee2, defaultVal, context) { + return base[method](this[attribute], cb2(iteratee2, this), defaultVal, context); + }; + default: + return function() { + var args = slice2.call(arguments); + args.unshift(this[attribute]); + return base[method].apply(base, args); + }; + } + }; + var addUnderscoreMethods = function(Class, base, methods, attribute) { + _3.each(methods, function(length, method) { + if (base[method]) + Class.prototype[method] = addMethod(base, length, method, attribute); + }); + }; + var cb2 = function(iteratee2, instance) { + if (_3.isFunction(iteratee2)) + return iteratee2; + if (_3.isObject(iteratee2) && !instance._isModel(iteratee2)) + return modelMatcher(iteratee2); + if (_3.isString(iteratee2)) + return function(model) { + return model.get(iteratee2); + }; + return iteratee2; + }; + var modelMatcher = function(attrs) { + var matcher2 = _3.matches(attrs); + return function(model) { + return matcher2(model.attributes); + }; + }; + var collectionMethods = { + forEach: 3, + each: 3, + map: 3, + collect: 3, + reduce: 0, + foldl: 0, + inject: 0, + reduceRight: 0, + foldr: 0, + find: 3, + detect: 3, + filter: 3, + select: 3, + reject: 3, + every: 3, + all: 3, + some: 3, + any: 3, + include: 3, + includes: 3, + contains: 3, + invoke: 0, + max: 3, + min: 3, + toArray: 1, + size: 1, + first: 3, + head: 3, + take: 3, + initial: 3, + rest: 3, + tail: 3, + drop: 3, + last: 3, + without: 0, + difference: 0, + indexOf: 3, + shuffle: 1, + lastIndexOf: 3, + isEmpty: 1, + chain: 1, + sample: 3, + partition: 3, + groupBy: 3, + countBy: 3, + sortBy: 3, + indexBy: 3, + findIndex: 3, + findLastIndex: 3 + }; + var modelMethods = { + keys: 1, + values: 1, + pairs: 1, + invert: 1, + pick: 0, + omit: 0, + chain: 1, + isEmpty: 1 + }; + _3.each([ + [Collection, collectionMethods, "models"], + [Model3, modelMethods, "attributes"] + ], function(config) { + var Base = config[0], methods = config[1], attribute = config[2]; + Base.mixin = function(obj) { + var mappings = _3.reduce(_3.functions(obj), function(memo, name) { + memo[name] = 0; + return memo; + }, {}); + addUnderscoreMethods(Base, obj, mappings, attribute); + }; + addUnderscoreMethods(Base, _3, methods, attribute); + }); + Backbone.sync = function(method, model, options) { + var type = methodMap[method]; + _3.defaults(options || (options = {}), { + emulateHTTP: Backbone.emulateHTTP, + emulateJSON: Backbone.emulateJSON + }); + var params = { type, dataType: "json" }; + if (!options.url) { + params.url = _3.result(model, "url") || urlError(); + } + if (options.data == null && model && (method === "create" || method === "update" || method === "patch")) { + params.contentType = "application/json"; + params.data = JSON.stringify(options.attrs || model.toJSON(options)); + } + if (options.emulateJSON) { + params.contentType = "application/x-www-form-urlencoded"; + params.data = params.data ? { model: params.data } : {}; + } + if (options.emulateHTTP && (type === "PUT" || type === "DELETE" || type === "PATCH")) { + params.type = "POST"; + if (options.emulateJSON) + params.data._method = type; + var beforeSend = options.beforeSend; + options.beforeSend = function(xhr2) { + xhr2.setRequestHeader("X-HTTP-Method-Override", type); + if (beforeSend) + return beforeSend.apply(this, arguments); + }; + } + if (params.type !== "GET" && !options.emulateJSON) { + params.processData = false; + } + var error = options.error; + options.error = function(xhr2, textStatus, errorThrown) { + options.textStatus = textStatus; + options.errorThrown = errorThrown; + if (error) + error.call(options.context, xhr2, textStatus, errorThrown); + }; + var xhr = options.xhr = Backbone.ajax(_3.extend(params, options)); + model.trigger("request", model, xhr, options); + return xhr; + }; + var methodMap = { + "create": "POST", + "update": "PUT", + "patch": "PATCH", + "delete": "DELETE", + "read": "GET" + }; + Backbone.ajax = function() { + return Backbone.$.ajax.apply(Backbone.$, arguments); + }; + var Router = Backbone.Router = function(options) { + options || (options = {}); + this.preinitialize.apply(this, arguments); + if (options.routes) + this.routes = options.routes; + this._bindRoutes(); + this.initialize.apply(this, arguments); + }; + var optionalParam = /\((.*?)\)/g; + var namedParam = /(\(\?)?:\w+/g; + var splatParam = /\*\w+/g; + var escapeRegExp2 = /[\-{}\[\]+?.,\\\^$|#\s]/g; + _3.extend(Router.prototype, Events, { + // preinitialize is an empty function by default. You can override it with a function + // or object. preinitialize will run before any instantiation logic is run in the Router. + preinitialize: function() { + }, + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function() { + }, + // Manually bind a single named route to a callback. For example: + // + // this.route('search/:query/p:num', 'search', function(query, num) { + // ... + // }); + // + route: function(route, name, callback) { + if (!_3.isRegExp(route)) + route = this._routeToRegExp(route); + if (_3.isFunction(name)) { + callback = name; + name = ""; + } + if (!callback) + callback = this[name]; + var router = this; + Backbone.history.route(route, function(fragment) { + var args = router._extractParameters(route, fragment); + if (router.execute(callback, args, name) !== false) { + router.trigger.apply(router, ["route:" + name].concat(args)); + router.trigger("route", name, args); + Backbone.history.trigger("route", router, name, args); + } + }); + return this; + }, + // Execute a route handler with the provided parameters. This is an + // excellent place to do pre-route setup or post-route cleanup. + execute: function(callback, args, name) { + if (callback) + callback.apply(this, args); + }, + // Simple proxy to `Backbone.history` to save a fragment into the history. + navigate: function(fragment, options) { + Backbone.history.navigate(fragment, options); + return this; + }, + // Bind all defined routes to `Backbone.history`. We have to reverse the + // order of the routes here to support behavior where the most general + // routes can be defined at the bottom of the route map. + _bindRoutes: function() { + if (!this.routes) + return; + this.routes = _3.result(this, "routes"); + var route, routes = _3.keys(this.routes); + while ((route = routes.pop()) != null) { + this.route(route, this.routes[route]); + } + }, + // Convert a route string into a regular expression, suitable for matching + // against the current location hash. + _routeToRegExp: function(route) { + route = route.replace(escapeRegExp2, "\\$&").replace(optionalParam, "(?:$1)?").replace(namedParam, function(match, optional) { + return optional ? match : "([^/?]+)"; + }).replace(splatParam, "([^?]*?)"); + return new RegExp("^" + route + "(?:\\?([\\s\\S]*))?$"); + }, + // Given a route, and a URL fragment that it matches, return the array of + // extracted decoded parameters. Empty or unmatched parameters will be + // treated as `null` to normalize cross-browser behavior. + _extractParameters: function(route, fragment) { + var params = route.exec(fragment).slice(1); + return _3.map(params, function(param, i) { + if (i === params.length - 1) + return param || null; + return param ? decodeURIComponent(param) : null; + }); + } + }); + var History = Backbone.History = function() { + this.handlers = []; + this.checkUrl = this.checkUrl.bind(this); + if (typeof window !== "undefined") { + this.location = window.location; + this.history = window.history; + } + }; + var routeStripper = /^[#\/]|\s+$/g; + var rootStripper = /^\/+|\/+$/g; + var pathStripper = /#.*$/; + History.started = false; + _3.extend(History.prototype, Events, { + // The default interval to poll for hash changes, if necessary, is + // twenty times a second. + interval: 50, + // Are we at the app root? + atRoot: function() { + var path = this.location.pathname.replace(/[^\/]$/, "$&/"); + return path === this.root && !this.getSearch(); + }, + // Does the pathname match the root? + matchRoot: function() { + var path = this.decodeFragment(this.location.pathname); + var rootPath = path.slice(0, this.root.length - 1) + "/"; + return rootPath === this.root; + }, + // Unicode characters in `location.pathname` are percent encoded so they're + // decoded for comparison. `%25` should not be decoded since it may be part + // of an encoded parameter. + decodeFragment: function(fragment) { + return decodeURI(fragment.replace(/%25/g, "%2525")); + }, + // In IE6, the hash fragment and search params are incorrect if the + // fragment contains `?`. + getSearch: function() { + var match = this.location.href.replace(/#.*/, "").match(/\?.+/); + return match ? match[0] : ""; + }, + // Gets the true hash value. Cannot use location.hash directly due to bug + // in Firefox where location.hash will always be decoded. + getHash: function(window2) { + var match = (window2 || this).location.href.match(/#(.*)$/); + return match ? match[1] : ""; + }, + // Get the pathname and search params, without the root. + getPath: function() { + var path = this.decodeFragment( + this.location.pathname + this.getSearch() + ).slice(this.root.length - 1); + return path.charAt(0) === "/" ? path.slice(1) : path; + }, + // Get the cross-browser normalized URL fragment from the path or hash. + getFragment: function(fragment) { + if (fragment == null) { + if (this._usePushState || !this._wantsHashChange) { + fragment = this.getPath(); + } else { + fragment = this.getHash(); + } + } + return fragment.replace(routeStripper, ""); + }, + // Start the hash change handling, returning `true` if the current URL matches + // an existing route, and `false` otherwise. + start: function(options) { + if (History.started) + throw new Error("Backbone.history has already been started"); + History.started = true; + this.options = _3.extend({ root: "/" }, this.options, options); + this.root = this.options.root; + this._trailingSlash = this.options.trailingSlash; + this._wantsHashChange = this.options.hashChange !== false; + this._hasHashChange = "onhashchange" in window && (document.documentMode === void 0 || document.documentMode > 7); + this._useHashChange = this._wantsHashChange && this._hasHashChange; + this._wantsPushState = !!this.options.pushState; + this._hasPushState = !!(this.history && this.history.pushState); + this._usePushState = this._wantsPushState && this._hasPushState; + this.fragment = this.getFragment(); + this.root = ("/" + this.root + "/").replace(rootStripper, "/"); + if (this._wantsHashChange && this._wantsPushState) { + if (!this._hasPushState && !this.atRoot()) { + var rootPath = this.root.slice(0, -1) || "/"; + this.location.replace(rootPath + "#" + this.getPath()); + return true; + } else if (this._hasPushState && this.atRoot()) { + this.navigate(this.getHash(), { replace: true }); + } + } + if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) { + this.iframe = document.createElement("iframe"); + this.iframe.src = "javascript:0"; + this.iframe.style.display = "none"; + this.iframe.tabIndex = -1; + var body = document.body; + var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow; + iWindow.document.open(); + iWindow.document.close(); + iWindow.location.hash = "#" + this.fragment; + } + var addEventListener = window.addEventListener || function(eventName, listener) { + return attachEvent("on" + eventName, listener); + }; + if (this._usePushState) { + addEventListener("popstate", this.checkUrl, false); + } else if (this._useHashChange && !this.iframe) { + addEventListener("hashchange", this.checkUrl, false); + } else if (this._wantsHashChange) { + this._checkUrlInterval = setInterval(this.checkUrl, this.interval); + } + if (!this.options.silent) + return this.loadUrl(); + }, + // Disable Backbone.history, perhaps temporarily. Not useful in a real app, + // but possibly useful for unit testing Routers. + stop: function() { + var removeEventListener = window.removeEventListener || function(eventName, listener) { + return detachEvent("on" + eventName, listener); + }; + if (this._usePushState) { + removeEventListener("popstate", this.checkUrl, false); + } else if (this._useHashChange && !this.iframe) { + removeEventListener("hashchange", this.checkUrl, false); + } + if (this.iframe) { + document.body.removeChild(this.iframe); + this.iframe = null; + } + if (this._checkUrlInterval) + clearInterval(this._checkUrlInterval); + History.started = false; + }, + // Add a route to be tested when the fragment changes. Routes added later + // may override previous routes. + route: function(route, callback) { + this.handlers.unshift({ route, callback }); + }, + // Checks the current URL to see if it has changed, and if it has, + // calls `loadUrl`, normalizing across the hidden iframe. + checkUrl: function(e) { + var current = this.getFragment(); + if (current === this.fragment && this.iframe) { + current = this.getHash(this.iframe.contentWindow); + } + if (current === this.fragment) { + if (!this.matchRoot()) + return this.notfound(); + return false; + } + if (this.iframe) + this.navigate(current); + this.loadUrl(); + }, + // Attempt to load the current URL fragment. If a route succeeds with a + // match, returns `true`. If no defined routes matches the fragment, + // returns `false`. + loadUrl: function(fragment) { + if (!this.matchRoot()) + return this.notfound(); + fragment = this.fragment = this.getFragment(fragment); + return _3.some(this.handlers, function(handler) { + if (handler.route.test(fragment)) { + handler.callback(fragment); + return true; + } + }) || this.notfound(); + }, + // When no route could be matched, this method is called internally to + // trigger the `'notfound'` event. It returns `false` so that it can be used + // in tail position. + notfound: function() { + this.trigger("notfound"); + return false; + }, + // Save a fragment into the hash history, or replace the URL state if the + // 'replace' option is passed. You are responsible for properly URL-encoding + // the fragment in advance. + // + // The options object can contain `trigger: true` if you wish to have the + // route callback be fired (not usually desirable), or `replace: true`, if + // you wish to modify the current URL without adding an entry to the history. + navigate: function(fragment, options) { + if (!History.started) + return false; + if (!options || options === true) + options = { trigger: !!options }; + fragment = this.getFragment(fragment || ""); + var rootPath = this.root; + if (!this._trailingSlash && (fragment === "" || fragment.charAt(0) === "?")) { + rootPath = rootPath.slice(0, -1) || "/"; + } + var url = rootPath + fragment; + fragment = fragment.replace(pathStripper, ""); + var decodedFragment = this.decodeFragment(fragment); + if (this.fragment === decodedFragment) + return; + this.fragment = decodedFragment; + if (this._usePushState) { + this.history[options.replace ? "replaceState" : "pushState"]({}, document.title, url); + } else if (this._wantsHashChange) { + this._updateHash(this.location, fragment, options.replace); + if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) { + var iWindow = this.iframe.contentWindow; + if (!options.replace) { + iWindow.document.open(); + iWindow.document.close(); + } + this._updateHash(iWindow.location, fragment, options.replace); + } + } else { + return this.location.assign(url); + } + if (options.trigger) + return this.loadUrl(fragment); + }, + // Update the hash location, either replacing the current entry, or adding + // a new one to the browser history. + _updateHash: function(location, fragment, replace) { + if (replace) { + var href = location.href.replace(/(javascript:|#).*$/, ""); + location.replace(href + "#" + fragment); + } else { + location.hash = "#" + fragment; + } + } + }); + Backbone.history = new History(); + var extend = function(protoProps, staticProps) { + var parent = this; + var child; + if (protoProps && _3.has(protoProps, "constructor")) { + child = protoProps.constructor; + } else { + child = function() { + return parent.apply(this, arguments); + }; + } + _3.extend(child, parent, staticProps); + child.prototype = _3.create(parent.prototype, protoProps); + child.prototype.constructor = child; + child.__super__ = parent.prototype; + return child; + }; + Model3.extend = Collection.extend = Router.extend = View.extend = History.extend = extend; + var urlError = function() { + throw new Error('A "url" property or function must be specified'); + }; + var wrapError = function(model, options) { + var error = options.error; + options.error = function(resp) { + if (error) + error.call(options.context, model, resp, options); + model.trigger("error", model, resp, options); + }; + }; + Backbone._debug = function() { + return { root: root2, _: _3 }; + }; + return Backbone; + }); + } +}); + +// node_modules/moment/moment.js +var require_moment = __commonJS({ + "node_modules/moment/moment.js"(exports, module2) { + (function(global2, factory) { + typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.moment = factory(); + })(exports, function() { + "use strict"; + var hookCallback; + function hooks() { + return hookCallback.apply(null, arguments); + } + function setHookCallback(callback) { + hookCallback = callback; + } + function isArray(input) { + return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]"; + } + function isObject2(input) { + return input != null && Object.prototype.toString.call(input) === "[object Object]"; + } + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); + } + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k; + for (k in obj) { + if (hasOwnProp(obj, k)) { + return false; + } + } + return true; + } + } + function isUndefined2(input) { + return input === void 0; + } + function isNumber(input) { + return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]"; + } + function isDate(input) { + return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]"; + } + function map2(arr, fn) { + var res = [], i, arrLen = arr.length; + for (i = 0; i < arrLen; ++i) { + res.push(fn(arr[i], i)); + } + return res; + } + function extend(a, b) { + for (var i in b) { + if (hasOwnProp(b, i)) { + a[i] = b[i]; + } + } + if (hasOwnProp(b, "toString")) { + a.toString = b.toString; + } + if (hasOwnProp(b, "valueOf")) { + a.valueOf = b.valueOf; + } + return a; + } + function createUTC(input, format2, locale2, strict) { + return createLocalOrUTC(input, format2, locale2, strict, true).utc(); + } + function defaultParsingFlags() { + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidEra: null, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + era: null, + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + function getParsingFlags(m) { + if (m._pf == null) { + m._pf = defaultParsingFlags(); + } + return m._pf; + } + var some2; + if (Array.prototype.some) { + some2 = Array.prototype.some; + } else { + some2 = function(fun) { + var t = Object(this), len = t.length >>> 0, i; + for (i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + return false; + }; + } + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m), parsedParts = some2.call(flags.parsedDateParts, function(i) { + return i != null; + }), isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + if (m._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0; + } + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + return m._isValid; + } + function createInvalid(flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + return m; + } + var momentProperties = hooks.momentProperties = [], updateInProgress = false; + function copyConfig(to2, from2) { + var i, prop, val, momentPropertiesLen = momentProperties.length; + if (!isUndefined2(from2._isAMomentObject)) { + to2._isAMomentObject = from2._isAMomentObject; + } + if (!isUndefined2(from2._i)) { + to2._i = from2._i; + } + if (!isUndefined2(from2._f)) { + to2._f = from2._f; + } + if (!isUndefined2(from2._l)) { + to2._l = from2._l; + } + if (!isUndefined2(from2._strict)) { + to2._strict = from2._strict; + } + if (!isUndefined2(from2._tzm)) { + to2._tzm = from2._tzm; + } + if (!isUndefined2(from2._isUTC)) { + to2._isUTC = from2._isUTC; + } + if (!isUndefined2(from2._offset)) { + to2._offset = from2._offset; + } + if (!isUndefined2(from2._pf)) { + to2._pf = getParsingFlags(from2); + } + if (!isUndefined2(from2._locale)) { + to2._locale = from2._locale; + } + if (momentPropertiesLen > 0) { + for (i = 0; i < momentPropertiesLen; i++) { + prop = momentProperties[i]; + val = from2[prop]; + if (!isUndefined2(val)) { + to2[prop] = val; + } + } + } + return to2; + } + function Moment4(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + function isMoment(obj) { + return obj instanceof Moment4 || obj != null && obj._isAMomentObject != null; + } + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) { + console.warn("Deprecation warning: " + msg); + } + } + function deprecate(msg, fn) { + var firstTime = true; + return extend(function() { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], arg, i, key, argLen = arguments.length; + for (i = 0; i < argLen; i++) { + arg = ""; + if (typeof arguments[i] === "object") { + arg += "\n[" + i + "] "; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ": " + arguments[0][key] + ", "; + } + } + arg = arg.slice(0, -2); + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn( + msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + var deprecations = {}; + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + function isFunction2(input) { + return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]"; + } + function set(config) { + var prop, i; + for (i in config) { + if (hasOwnProp(config, i)) { + prop = config[i]; + if (isFunction2(prop)) { + this[i] = prop; + } else { + this["_" + i] = prop; + } + } + } + this._config = config; + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source + ); + } + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject2(parentConfig[prop]) && isObject2(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject2(parentConfig[prop])) { + res[prop] = extend({}, res[prop]); + } + } + return res; + } + function Locale(config) { + if (config != null) { + this.set(config); + } + } + var keys2; + if (Object.keys) { + keys2 = Object.keys; + } else { + keys2 = function(obj) { + var i, res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + var defaultCalendar = { + sameDay: "[Today at] LT", + nextDay: "[Tomorrow at] LT", + nextWeek: "dddd [at] LT", + lastDay: "[Yesterday at] LT", + lastWeek: "[Last] dddd [at] LT", + sameElse: "L" + }; + function calendar(key, mom, now2) { + var output = this._calendar[key] || this._calendar["sameElse"]; + return isFunction2(output) ? output.call(mom, now2) : output; + } + function zeroFill(number, targetLength, forceSign) { + var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0; + return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {}; + function addFormatToken(token2, padded, ordinal2, callback) { + var func = callback; + if (typeof callback === "string") { + func = function() { + return this[callback](); + }; + } + if (token2) { + formatTokenFunctions[token2] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function() { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal2) { + formatTokenFunctions[ordinal2] = function() { + return this.localeData().ordinal( + func.apply(this, arguments), + token2 + ); + }; + } + } + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ""); + } + return input.replace(/\\/g, ""); + } + function makeFormatFunction(format2) { + var array = format2.match(formattingTokens), i, length; + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + return function(mom) { + var output = "", i2; + for (i2 = 0; i2 < length; i2++) { + output += isFunction2(array[i2]) ? array[i2].call(mom, format2) : array[i2]; + } + return output; + }; + } + function formatMoment(m, format2) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + format2 = expandFormat(format2, m.localeData()); + formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2); + return formatFunctions[format2](m); + } + function expandFormat(format2, locale2) { + var i = 5; + function replaceLongDateFormatTokens(input) { + return locale2.longDateFormat(input) || input; + } + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format2)) { + format2 = format2.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + return format2; + } + var defaultLongDateFormat = { + 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" + }; + function longDateFormat(key) { + var format2 = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; + if (format2 || !formatUpper) { + return format2; + } + this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) { + if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") { + return tok.slice(1); + } + return tok; + }).join(""); + return this._longDateFormat[key]; + } + var defaultInvalidDate = "Invalid date"; + function invalidDate() { + return this._invalidDate; + } + var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/; + function ordinal(number) { + return this._ordinal.replace("%d", number); + } + var defaultRelativeTime = { + future: "in %s", + past: "%s ago", + s: "a few seconds", + ss: "%d seconds", + m: "a minute", + mm: "%d minutes", + h: "an hour", + hh: "%d hours", + d: "a day", + dd: "%d days", + w: "a week", + ww: "%d weeks", + M: "a month", + MM: "%d months", + y: "a year", + yy: "%d years" + }; + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction2(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + function pastFuture(diff2, output) { + var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"]; + return isFunction2(format2) ? format2(output) : format2.replace(/%s/i, output); + } + var aliases = {}; + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = unit; + } + function normalizeUnits(units) { + return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0; + } + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, normalizedProp, prop; + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + return normalizedInput; + } + var priorities = {}; + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + function getPrioritizedUnits(unitsObj) { + var units = [], u; + for (u in unitsObj) { + if (hasOwnProp(unitsObj, u)) { + units.push({ unit: u, priority: priorities[u] }); + } + } + units.sort(function(a, b) { + return a.priority - b.priority; + }); + return units; + } + function isLeapYear(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } + function absFloor(number) { + if (number < 0) { + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, value = 0; + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + return value; + } + function makeGetSet(unit, keepTime) { + return function(value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get2(this, unit); + } + }; + } + function get2(mom, unit) { + return mom.isValid() ? mom._d["get" + (mom._isUTC ? "UTC" : "") + unit]() : NaN; + } + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === "FullYear" && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { + value = toInt(value); + mom._d["set" + (mom._isUTC ? "UTC" : "") + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value); + } + } + } + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction2(this[units])) { + return this[units](); + } + return this; + } + function stringSet(units, value) { + if (typeof units === "object") { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length; + for (i = 0; i < prioritizedLen; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction2(this[units])) { + return this[units](value); + } + } + return this; + } + var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, regexes; + regexes = {}; + function addRegexToken(token2, regex2, strictRegex) { + regexes[token2] = isFunction2(regex2) ? regex2 : function(isStrict, localeData2) { + return isStrict && strictRegex ? strictRegex : regex2; + }; + } + function getParseRegexForToken(token2, config) { + if (!hasOwnProp(regexes, token2)) { + return new RegExp(unescapeFormat(token2)); + } + return regexes[token2](config._strict, config._locale); + } + function unescapeFormat(s) { + return regexEscape( + s.replace("\\", "").replace( + /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, + function(matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + } + ) + ); + } + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); + } + var tokens = {}; + function addParseToken(token2, callback) { + var i, func = callback, tokenLen; + if (typeof token2 === "string") { + token2 = [token2]; + } + if (isNumber(callback)) { + func = function(input, array) { + array[callback] = toInt(input); + }; + } + tokenLen = token2.length; + for (i = 0; i < tokenLen; i++) { + tokens[token2[i]] = func; + } + } + function addWeekParseToken(token2, callback) { + addParseToken(token2, function(input, array, config, token3) { + config._w = config._w || {}; + callback(input, config._w, config, token3); + }); + } + function addTimeToArrayFromToken(token2, input, config) { + if (input != null && hasOwnProp(tokens, token2)) { + tokens[token2](input, config._a, config, token2); + } + } + var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8; + function mod(n, x) { + return (n % x + x) % x; + } + var indexOf; + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function(o) { + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } + addFormatToken("M", ["MM", 2], "Mo", function() { + return this.month() + 1; + }); + addFormatToken("MMM", 0, 0, function(format2) { + return this.localeData().monthsShort(this, format2); + }); + addFormatToken("MMMM", 0, 0, function(format2) { + return this.localeData().months(this, format2); + }); + addUnitAlias("month", "M"); + addUnitPriority("month", 8); + addRegexToken("M", match1to2); + addRegexToken("MM", match1to2, match2); + addRegexToken("MMM", function(isStrict, locale2) { + return locale2.monthsShortRegex(isStrict); + }); + addRegexToken("MMMM", function(isStrict, locale2) { + return locale2.monthsRegex(isStrict); + }); + addParseToken(["M", "MM"], function(input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(["MMM", "MMMM"], function(input, array, config, token2) { + var month = config._locale.monthsParse(input, token2, config._strict); + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split( + "_" + ), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord; + function localeMonths(m, format2) { + if (!m) { + return isArray(this._months) ? this._months : this._months["standalone"]; + } + return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m.month()]; + } + function localeMonthsShort(m, format2) { + if (!m) { + return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"]; + } + return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m.month()]; + } + function handleStrictParse(monthName, format2, strict) { + var i, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2e3, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + "" + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase(); + } + } + if (strict) { + if (format2 === "MMM") { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format2 === "MMM") { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + function localeMonthsParse(monthName, format2, strict) { + var i, mom, regex2; + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format2, strict); + } + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + for (i = 0; i < 12; i++) { + mom = createUTC([2e3, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + "^" + this.months(mom, "").replace(".", "") + "$", + "i" + ); + this._shortMonthsParse[i] = new RegExp( + "^" + this.monthsShort(mom, "").replace(".", "") + "$", + "i" + ); + } + if (!strict && !this._monthsParse[i]) { + regex2 = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, ""); + this._monthsParse[i] = new RegExp(regex2.replace(".", ""), "i"); + } + if (strict && format2 === "MMMM" && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format2 === "MMM" && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + function setMonth(mom, value) { + var dayOfMonth; + if (!mom.isValid()) { + return mom; + } + if (typeof value === "string") { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + if (!isNumber(value)) { + return mom; + } + } + } + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d["set" + (mom._isUTC ? "UTC" : "") + "Month"](value, dayOfMonth); + return mom; + } + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get2(this, "Month"); + } + } + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, "_monthsRegex")) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, "_monthsShortRegex")) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, "_monthsRegex")) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, "_monthsRegex")) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; + } + } + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; + for (i = 0; i < 12; i++) { + mom = createUTC([2e3, i]); + shortPieces.push(this.monthsShort(mom, "")); + longPieces.push(this.months(mom, "")); + mixedPieces.push(this.months(mom, "")); + mixedPieces.push(this.monthsShort(mom, "")); + } + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + "^(" + longPieces.join("|") + ")", + "i" + ); + this._monthsShortStrictRegex = new RegExp( + "^(" + shortPieces.join("|") + ")", + "i" + ); + } + addFormatToken("Y", 0, 0, function() { + var y = this.year(); + return y <= 9999 ? zeroFill(y, 4) : "+" + y; + }); + addFormatToken(0, ["YY", 2], 0, function() { + return this.year() % 100; + }); + addFormatToken(0, ["YYYY", 4], 0, "year"); + addFormatToken(0, ["YYYYY", 5], 0, "year"); + addFormatToken(0, ["YYYYYY", 6, true], 0, "year"); + addUnitAlias("year", "y"); + addUnitPriority("year", 1); + addRegexToken("Y", matchSigned); + addRegexToken("YY", match1to2, match2); + addRegexToken("YYYY", match1to4, match4); + addRegexToken("YYYYY", match1to6, match6); + addRegexToken("YYYYYY", match1to6, match6); + addParseToken(["YYYYY", "YYYYYY"], YEAR); + addParseToken("YYYY", function(input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken("YY", function(input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken("Y", function(input, array) { + array[YEAR] = parseInt(input, 10); + }); + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + hooks.parseTwoDigitYear = function(input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3); + }; + var getSetYear = makeGetSet("FullYear", true); + function getIsLeapYear() { + return isLeapYear(this.year()); + } + function createDate(y, m, d, h, M, s, ms) { + var date; + if (y < 100 && y >= 0) { + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + return date; + } + function createUTCDate(y) { + var date, args; + if (y < 100 && y >= 0) { + args = Array.prototype.slice.call(arguments); + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + return date; + } + function firstWeekOffset(year, dow, doy) { + var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + return { + week: resWeek, + year: resYear + }; + } + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + addFormatToken("w", ["ww", 2], "wo", "week"); + addFormatToken("W", ["WW", 2], "Wo", "isoWeek"); + addUnitAlias("week", "w"); + addUnitAlias("isoWeek", "W"); + addUnitPriority("week", 5); + addUnitPriority("isoWeek", 5); + addRegexToken("w", match1to2); + addRegexToken("ww", match1to2, match2); + addRegexToken("W", match1to2); + addRegexToken("WW", match1to2, match2); + addWeekParseToken( + ["w", "ww", "W", "WW"], + function(input, week, config, token2) { + week[token2.substr(0, 1)] = toInt(input); + } + ); + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + var defaultLocaleWeek = { + dow: 0, + // Sunday is the first day of the week. + doy: 6 + // The week that contains Jan 6th is the first week of the year. + }; + function localeFirstDayOfWeek() { + return this._week.dow; + } + function localeFirstDayOfYear() { + return this._week.doy; + } + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, "d"); + } + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, "d"); + } + addFormatToken("d", 0, "do", "day"); + addFormatToken("dd", 0, 0, function(format2) { + return this.localeData().weekdaysMin(this, format2); + }); + addFormatToken("ddd", 0, 0, function(format2) { + return this.localeData().weekdaysShort(this, format2); + }); + addFormatToken("dddd", 0, 0, function(format2) { + return this.localeData().weekdays(this, format2); + }); + addFormatToken("e", 0, 0, "weekday"); + addFormatToken("E", 0, 0, "isoWeekday"); + addUnitAlias("day", "d"); + addUnitAlias("weekday", "e"); + addUnitAlias("isoWeekday", "E"); + addUnitPriority("day", 11); + addUnitPriority("weekday", 11); + addUnitPriority("isoWeekday", 11); + addRegexToken("d", match1to2); + addRegexToken("e", match1to2); + addRegexToken("E", match1to2); + addRegexToken("dd", function(isStrict, locale2) { + return locale2.weekdaysMinRegex(isStrict); + }); + addRegexToken("ddd", function(isStrict, locale2) { + return locale2.weekdaysShortRegex(isStrict); + }); + addRegexToken("dddd", function(isStrict, locale2) { + return locale2.weekdaysRegex(isStrict); + }); + addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config, token2) { + var weekday = config._locale.weekdaysParse(input, token2, config._strict); + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + addWeekParseToken(["d", "e", "E"], function(input, week, config, token2) { + week[token2] = toInt(input); + }); + function parseWeekday(input, locale2) { + if (typeof input !== "string") { + return input; + } + if (!isNaN(input)) { + return parseInt(input, 10); + } + input = locale2.weekdaysParse(input); + if (typeof input === "number") { + return input; + } + return null; + } + function parseIsoWeekday(input, locale2) { + if (typeof input === "string") { + return locale2.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord; + function localeWeekdays(m, format2) { + var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"]; + return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays; + } + function localeWeekdaysShort(m) { + return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + function localeWeekdaysMin(m) { + return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + function handleStrictParse$1(weekdayName, format2, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + for (i = 0; i < 7; ++i) { + mom = createUTC([2e3, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + "" + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + "" + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase(); + } + } + if (strict) { + if (format2 === "dddd") { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format2 === "ddd") { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format2 === "dddd") { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format2 === "ddd") { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + function localeWeekdaysParse(weekdayName, format2, strict) { + var i, mom, regex2; + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format2, strict); + } + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + for (i = 0; i < 7; i++) { + mom = createUTC([2e3, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + "^" + this.weekdays(mom, "").replace(".", "\\.?") + "$", + "i" + ); + this._shortWeekdaysParse[i] = new RegExp( + "^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$", + "i" + ); + this._minWeekdaysParse[i] = new RegExp( + "^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$", + "i" + ); + } + if (!this._weekdaysParse[i]) { + regex2 = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, ""); + this._weekdaysParse[i] = new RegExp(regex2.replace(".", ""), "i"); + } + if (strict && format2 === "dddd" && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format2 === "dd" && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, "d"); + } else { + return day; + } + } + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, "d"); + } + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysRegex")) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysShortRegex")) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysMinRegex")) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + mom = createUTC([2e3, 1]).day(i); + minp = regexEscape(this.weekdaysMin(mom, "")); + shortp = regexEscape(this.weekdaysShort(mom, "")); + longp = regexEscape(this.weekdays(mom, "")); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp( + "^(" + longPieces.join("|") + ")", + "i" + ); + this._weekdaysShortStrictRegex = new RegExp( + "^(" + shortPieces.join("|") + ")", + "i" + ); + this._weekdaysMinStrictRegex = new RegExp( + "^(" + minPieces.join("|") + ")", + "i" + ); + } + function hFormat() { + return this.hours() % 12 || 12; + } + function kFormat() { + return this.hours() || 24; + } + addFormatToken("H", ["HH", 2], 0, "hour"); + addFormatToken("h", ["hh", 2], 0, hFormat); + addFormatToken("k", ["kk", 2], 0, kFormat); + addFormatToken("hmm", 0, 0, function() { + return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken("hmmss", 0, 0, function() { + return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken("Hmm", 0, 0, function() { + return "" + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken("Hmmss", 0, 0, function() { + return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + function meridiem(token2, lowercase) { + addFormatToken(token2, 0, 0, function() { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + meridiem("a", true); + meridiem("A", false); + addUnitAlias("hour", "h"); + addUnitPriority("hour", 13); + function matchMeridiem(isStrict, locale2) { + return locale2._meridiemParse; + } + addRegexToken("a", matchMeridiem); + addRegexToken("A", matchMeridiem); + addRegexToken("H", match1to2); + addRegexToken("h", match1to2); + addRegexToken("k", match1to2); + addRegexToken("HH", match1to2, match2); + addRegexToken("hh", match1to2, match2); + addRegexToken("kk", match1to2, match2); + addRegexToken("hmm", match3to4); + addRegexToken("hmmss", match5to6); + addRegexToken("Hmm", match3to4); + addRegexToken("Hmmss", match5to6); + addParseToken(["H", "HH"], HOUR); + addParseToken(["k", "kk"], function(input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(["a", "A"], function(input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(["h", "hh"], function(input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken("hmm", function(input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken("hmmss", function(input, array, config) { + var pos1 = input.length - 4, pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken("Hmm", function(input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken("Hmmss", function(input, array, config) { + var pos1 = input.length - 4, pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + function localeIsPM(input) { + return (input + "").toLowerCase().charAt(0) === "p"; + } + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true); + function localeMeridiem(hours2, minutes2, isLower) { + if (hours2 > 11) { + return isLower ? "pm" : "PM"; + } else { + return isLower ? "am" : "AM"; + } + } + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; + var locales = {}, localeFamilies = {}, globalLocale; + function commonPrefix(arr1, arr2) { + var i, minl = Math.min(arr1.length, arr2.length); + for (i = 0; i < minl; i += 1) { + if (arr1[i] !== arr2[i]) { + return i; + } + } + return minl; + } + function normalizeLocale(key) { + return key ? key.toLowerCase().replace("_", "-") : key; + } + function chooseLocale(names) { + var i = 0, j, next, locale2, split; + while (i < names.length) { + split = normalizeLocale(names[i]).split("-"); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split("-") : null; + while (j > 0) { + locale2 = loadLocale(split.slice(0, j).join("-")); + if (locale2) { + return locale2; + } + if (next && next.length >= j && commonPrefix(split, next) >= j - 1) { + break; + } + j--; + } + i++; + } + return globalLocale; + } + function isLocaleNameSane(name) { + return name.match("^[^/\\\\]*$") != null; + } + function loadLocale(name) { + var oldLocale = null, aliasedRequire; + if (locales[name] === void 0 && typeof module2 !== "undefined" && module2 && module2.exports && isLocaleNameSane(name)) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire("./locale/" + name); + getSetGlobalLocale(oldLocale); + } catch (e) { + locales[name] = null; + } + } + return locales[name]; + } + function getSetGlobalLocale(key, values2) { + var data; + if (key) { + if (isUndefined2(values2)) { + data = getLocale(key); + } else { + data = defineLocale(key, values2); + } + if (data) { + globalLocale = data; + } else { + if (typeof console !== "undefined" && console.warn) { + console.warn( + "Locale " + key + " not found. Did you forget to load it?" + ); + } + } + } + return globalLocale._abbr; + } + function defineLocale(name, config) { + if (config !== null) { + var locale2, parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + "defineLocaleOverride", + "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info." + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale2 = loadLocale(config.parentLocale); + if (locale2 != null) { + parentConfig = locale2._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name, + config + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + if (localeFamilies[name]) { + localeFamilies[name].forEach(function(x) { + defineLocale(x.name, x.config); + }); + } + getSetGlobalLocale(name); + return locales[name]; + } else { + delete locales[name]; + return null; + } + } + function updateLocale(name, config) { + if (config != null) { + var locale2, tmpLocale, parentConfig = baseConfig; + if (locales[name] != null && locales[name].parentLocale != null) { + locales[name].set(mergeConfigs(locales[name]._config, config)); + } else { + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + if (tmpLocale == null) { + config.abbr = name; + } + locale2 = new Locale(config); + locale2.parentLocale = locales[name]; + locales[name] = locale2; + } + getSetGlobalLocale(name); + } else { + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); + } + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + function getLocale(key) { + var locale2; + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + if (!key) { + return globalLocale; + } + if (!isArray(key)) { + locale2 = loadLocale(key); + if (locale2) { + return locale2; + } + key = [key]; + } + return chooseLocale(key); + } + function listLocales() { + return keys2(locales); + } + function checkOverflow(m) { + var overflow, a = m._a; + if (a && getParsingFlags(m).overflow === -2) { + overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + getParsingFlags(m).overflow = overflow; + } + return m; + } + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [ + ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], + ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], + ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], + ["GGGG-[W]WW", /\d{4}-W\d\d/, false], + ["YYYY-DDD", /\d{4}-\d{3}/], + ["YYYY-MM", /\d{4}-\d\d/, false], + ["YYYYYYMMDD", /[+-]\d{10}/], + ["YYYYMMDD", /\d{8}/], + ["GGGG[W]WWE", /\d{4}W\d{3}/], + ["GGGG[W]WW", /\d{4}W\d{2}/, false], + ["YYYYDDD", /\d{7}/], + ["YYYYMM", /\d{6}/, false], + ["YYYY", /\d{4}/, false] + ], isoTimes = [ + ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], + ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], + ["HH:mm:ss", /\d\d:\d\d:\d\d/], + ["HH:mm", /\d\d:\d\d/], + ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], + ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], + ["HHmmss", /\d\d\d\d\d\d/], + ["HHmm", /\d\d\d\d/], + ["HH", /\d\d/] + ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc2822 = /^(?:(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{4}))$/, obsOffsets = { + UT: 0, + 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 configFromISO(config) { + var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length; + if (match) { + getParsingFlags(config).iso = true; + for (i = 0, l = isoDatesLen; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimesLen; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + timeFormat = (match[2] || " ") + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = "Z"; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || "") + (tzFormat || ""); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result2 = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + if (secondStr) { + result2.push(parseInt(secondStr, 10)); + } + return result2; + } + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2e3 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + function preprocessRFC2822(s) { + return s.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); + } + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + return 0; + } else { + var hm = parseInt(numOffset, 10), m = hm % 100, h = (hm - m) / 100; + return h * 60 + m; + } + } + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)), parsedArray; + if (match) { + parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + if (config._strict) { + config._isValid = false; + } else { + hooks.createFromInputFallback(config); + } + } + hooks.createFromInputFallback = deprecate( + "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", + function(config) { + config._d = new Date(config._i + (config._useUTC ? " UTC" : "")); + } + ); + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + function currentDateArray(config) { + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate() + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + function configFromArray(config) { + var i, date, input = [], currentDate, expectedWeekday, yearToUse; + if (config._d) { + return; + } + currentDate = currentDateArray(config); + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { + getParsingFlags(config)._overflowDayOfYear = true; + } + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + for (; i < 7; i++) { + config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; + } + if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { + config._nextDay = true; + config._a[HOUR] = 0; + } + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + if (config._nextDay) { + config._a[HOUR] = 24; + } + if (config._w && typeof config._w.d !== "undefined" && config._w.d !== expectedWeekday) { + getParsingFlags(config).weekdayMismatch = true; + } + } + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + curWeek = weekOfYear(createLocal(), dow, doy); + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + week = defaults(w.w, curWeek.week); + if (w.d != null) { + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + hooks.ISO_8601 = function() { + }; + hooks.RFC_2822 = function() { + }; + function configFromStringAndFormat(config) { + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen; + tokens2 = expandFormat(config._f, config._locale).match(formattingTokens) || []; + tokenLen = tokens2.length; + for (i = 0; i < tokenLen; i++) { + token2 = tokens2[i]; + parsedInput = (string.match(getParseRegexForToken(token2, config)) || [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } + if (formatTokenFunctions[token2]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token2); + } + addTimeToArrayFromToken(token2, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token2); + } + } + getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { + getParsingFlags(config).bigHour = void 0; + } + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + era = getParsingFlags(config).era; + if (era !== null) { + config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); + } + configFromArray(config); + checkOverflow(config); + } + function meridiemFixWrap(locale2, hour, meridiem2) { + var isPm; + if (meridiem2 == null) { + return hour; + } + if (locale2.meridiemHour != null) { + return locale2.meridiemHour(hour, meridiem2); + } else if (locale2.isPM != null) { + isPm = locale2.isPM(meridiem2); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + return hour; + } + } + function configFromStringAndArray(config) { + var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length; + if (configfLen === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + for (i = 0; i < configfLen; i++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + if (isValid(tempConfig)) { + validFormatFound = true; + } + currentScore += getParsingFlags(tempConfig).charsLeftOver; + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + if (!bestFormatIsValid) { + if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } + } else { + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + } + extend(config, bestMoment || tempConfig); + } + function configFromObject(config) { + if (config._d) { + return; + } + var i = normalizeObjectUnits(config._i), dayOrDate = i.day === void 0 ? i.date : i.day; + config._a = map2( + [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], + function(obj) { + return obj && parseInt(obj, 10); + } + ); + configFromArray(config); + } + function createFromConfig(config) { + var res = new Moment4(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + res.add(1, "d"); + res._nextDay = void 0; + } + return res; + } + function prepareConfig(config) { + var input = config._i, format2 = config._f; + config._locale = config._locale || getLocale(config._l); + if (input === null || format2 === void 0 && input === "") { + return createInvalid({ nullInput: true }); + } + if (typeof input === "string") { + config._i = input = config._locale.preparse(input); + } + if (isMoment(input)) { + return new Moment4(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format2)) { + configFromStringAndArray(config); + } else if (format2) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + if (!isValid(config)) { + config._d = null; + } + return config; + } + function configFromInput(config) { + var input = config._i; + if (isUndefined2(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === "string") { + configFromString(config); + } else if (isArray(input)) { + config._a = map2(input.slice(0), function(obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject2(input)) { + configFromObject(config); + } else if (isNumber(input)) { + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + function createLocalOrUTC(input, format2, locale2, strict, isUTC) { + var c = {}; + if (format2 === true || format2 === false) { + strict = format2; + format2 = void 0; + } + if (locale2 === true || locale2 === false) { + strict = locale2; + locale2 = void 0; + } + if (isObject2(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { + input = void 0; + } + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale2; + c._i = input; + c._f = format2; + c._strict = strict; + return createFromConfig(c); + } + function createLocal(input, format2, locale2, strict) { + return createLocalOrUTC(input, format2, locale2, strict, false); + } + var prototypeMin = deprecate( + "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", + function() { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ), prototypeMax = deprecate( + "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", + function() { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + function min2() { + var args = [].slice.call(arguments, 0); + return pickBy("isBefore", args); + } + function max2() { + var args = [].slice.call(arguments, 0); + return pickBy("isAfter", args); + } + var now = function() { + return Date.now ? Date.now() : +new Date(); + }; + var ordering = [ + "year", + "quarter", + "month", + "week", + "day", + "hour", + "minute", + "second", + "millisecond" + ]; + function isDurationValid(m) { + var key, unitHasDecimal = false, i, orderLen = ordering.length; + for (key in m) { + if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { + return false; + } + } + for (i = 0; i < orderLen; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + return true; + } + function isValid$1() { + return this._isValid; + } + function createInvalid$1() { + return createDuration(NaN); + } + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months2 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); + this._milliseconds = +milliseconds2 + seconds2 * 1e3 + // 1000 + minutes2 * 6e4 + // 1000 * 60 + hours2 * 1e3 * 60 * 60; + this._days = +days2 + weeks2 * 7; + this._months = +months2 + quarters * 3 + years2 * 12; + this._data = {}; + this._locale = getLocale(); + this._bubble(); + } + function isDuration(obj) { + return obj instanceof Duration; + } + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; + for (i = 0; i < len; i++) { + if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { + diffs++; + } + } + return diffs + lengthDiff; + } + function offset(token2, separator) { + addFormatToken(token2, 0, 0, function() { + var offset2 = this.utcOffset(), sign2 = "+"; + if (offset2 < 0) { + offset2 = -offset2; + sign2 = "-"; + } + return sign2 + zeroFill(~~(offset2 / 60), 2) + separator + zeroFill(~~offset2 % 60, 2); + }); + } + offset("Z", ":"); + offset("ZZ", ""); + addRegexToken("Z", matchShortOffset); + addRegexToken("ZZ", matchShortOffset); + addParseToken(["Z", "ZZ"], function(input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + var chunkOffset = /([\+\-]|\d\d)/gi; + function offsetFromString(matcher2, string) { + var matches = (string || "").match(matcher2), chunk2, parts, minutes2; + if (matches === null) { + return null; + } + chunk2 = matches[matches.length - 1] || []; + parts = (chunk2 + "").match(chunkOffset) || ["-", 0, 0]; + minutes2 = +(parts[1] * 60) + toInt(parts[2]); + return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2; + } + function cloneWithOffset(input, model) { + var res, diff2; + if (model._isUTC) { + res = model.clone(); + diff2 = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + res._d.setTime(res._d.valueOf() + diff2); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + function getDateOffset(m) { + return -Math.round(m._d.getTimezoneOffset()); + } + hooks.updateOffset = function() { + }; + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset2 = this._offset || 0, localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === "string") { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, "m"); + } + if (offset2 !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract( + this, + createDuration(input - offset2, "m"), + 1, + false + ); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset2 : getDateOffset(this); + } + } + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== "string") { + input = -input; + } + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + if (keepLocalTime) { + this.subtract(getDateOffset(this), "m"); + } + } + return this; + } + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === "string") { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + return this; + } + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + function isDaylightSavingTimeShifted() { + if (!isUndefined2(this._isDSTShifted)) { + return this._isDSTShifted; + } + var c = {}, other; + copyConfig(c, this); + c = prepareConfig(c); + if (c._a) { + other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + return this._isDSTShifted; + } + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + function createDuration(input, key) { + var duration = input, match = null, sign2, ret, diffRes; + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; + } + } else if (match = aspNetRegex.exec(input)) { + sign2 = match[1] === "-" ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign2, + h: toInt(match[HOUR]) * sign2, + m: toInt(match[MINUTE]) * sign2, + s: toInt(match[SECOND]) * sign2, + ms: toInt(absRound(match[MILLISECOND] * 1e3)) * sign2 + // the millisecond decimal point is included in the match + }; + } else if (match = isoRegex.exec(input)) { + sign2 = match[1] === "-" ? -1 : 1; + duration = { + y: parseIso(match[2], sign2), + M: parseIso(match[3], sign2), + w: parseIso(match[4], sign2), + d: parseIso(match[5], sign2), + h: parseIso(match[6], sign2), + m: parseIso(match[7], sign2), + s: parseIso(match[8], sign2) + }; + } else if (duration == null) { + duration = {}; + } else if (typeof duration === "object" && ("from" in duration || "to" in duration)) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + ret = new Duration(duration); + if (isDuration(input) && hasOwnProp(input, "_locale")) { + ret._locale = input._locale; + } + if (isDuration(input) && hasOwnProp(input, "_isValid")) { + ret._isValid = input._isValid; + } + return ret; + } + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + function parseIso(inp, sign2) { + var res = inp && parseFloat(inp.replace(",", ".")); + return (isNaN(res) ? 0 : res) * sign2; + } + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, "M").isAfter(other)) { + --res.months; + } + res.milliseconds = +other - +base.clone().add(res.months, "M"); + return res; + } + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + return res; + } + function createAdder(direction, name) { + return function(val, period) { + var dur, tmp; + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info." + ); + tmp = val; + val = period; + period = tmp; + } + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months2 = absRound(duration._months); + if (!mom.isValid()) { + return; + } + updateOffset = updateOffset == null ? true : updateOffset; + if (months2) { + setMonth(mom, get2(mom, "Month") + months2 * isAdding); + } + if (days2) { + set$1(mom, "Date", get2(mom, "Date") + days2 * isAdding); + } + if (milliseconds2) { + mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days2 || months2); + } + } + var add = createAdder(1, "add"), subtract = createAdder(-1, "subtract"); + function isString(input) { + return typeof input === "string" || input instanceof String; + } + function isMomentInput(input) { + return isMoment(input) || isDate(input) || isString(input) || isNumber(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0; + } + function isMomentInputObject(input) { + var objectTest = isObject2(input) && !isObjectEmpty(input), propertyTest = false, properties = [ + "years", + "year", + "y", + "months", + "month", + "M", + "days", + "day", + "d", + "dates", + "date", + "D", + "hours", + "hour", + "h", + "minutes", + "minute", + "m", + "seconds", + "second", + "s", + "milliseconds", + "millisecond", + "ms" + ], i, property2, propertyLen = properties.length; + for (i = 0; i < propertyLen; i += 1) { + property2 = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property2); + } + return objectTest && propertyTest; + } + function isNumberOrStringArray(input) { + var arrayTest = isArray(input), dataTypeTest = false; + if (arrayTest) { + dataTypeTest = input.filter(function(item) { + return !isNumber(item) && isString(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + function isCalendarSpec(input) { + var objectTest = isObject2(input) && !isObjectEmpty(input), propertyTest = false, properties = [ + "sameDay", + "nextDay", + "lastDay", + "nextWeek", + "lastWeek", + "sameElse" + ], i, property2; + for (i = 0; i < properties.length; i += 1) { + property2 = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property2); + } + return objectTest && propertyTest; + } + function getCalendarFormat(myMoment, now2) { + var diff2 = myMoment.diff(now2, "days", true); + return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse"; + } + function calendar$1(time, formats) { + if (arguments.length === 1) { + if (!arguments[0]) { + time = void 0; + formats = void 0; + } else if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = void 0; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = void 0; + } + } + var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction2(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]); + return this.format( + output || this.localeData().calendar(format2, this, createLocal(now2)) + ); + } + function clone2() { + return new Moment4(this); + } + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + function isBetween(from2, to2, units, inclusivity) { + var localFrom = isMoment(from2) ? from2 : createLocal(from2), localTo = isMoment(to2) ? to2 : createLocal(to2); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || "()"; + return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); + } + } + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + function diff(input, units, asFloat) { + var that, zoneDelta, output; + if (!this.isValid()) { + return NaN; + } + that = cloneWithOffset(input, this); + if (!that.isValid()) { + return NaN; + } + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + switch (units) { + case "year": + output = monthDiff(this, that) / 12; + break; + case "month": + output = monthDiff(this, that); + break; + case "quarter": + output = monthDiff(this, that) / 3; + break; + case "second": + output = (this - that) / 1e3; + break; + case "minute": + output = (this - that) / 6e4; + break; + case "hour": + output = (this - that) / 36e5; + break; + case "day": + output = (this - that - zoneDelta) / 864e5; + break; + case "week": + output = (this - that - zoneDelta) / 6048e5; + break; + default: + output = this - that; + } + return asFloat ? output : absFloor(output); + } + function monthDiff(a, b) { + if (a.date() < b.date()) { + return -monthDiff(b, a); + } + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust; + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, "months"); + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, "months"); + adjust = (b - anchor) / (anchor2 - anchor); + } + return -(wholeMonthDiff + adjust) || 0; + } + hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"; + hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]"; + function toString2() { + return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"); + } + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ" + ); + } + if (isFunction2(Date.prototype.toISOString)) { + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m, "Z")); + } + } + return formatMoment( + m, + utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ" + ); + } + function inspect() { + if (!this.isValid()) { + return "moment.invalid(/* " + this._i + " */)"; + } + var func = "moment", zone = "", prefix, year, datetime, suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone"; + zone = "Z"; + } + prefix = "[" + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY"; + datetime = "-MM-DD[T]HH:mm:ss.SSS"; + suffix = zone + '[")]'; + return this.format(prefix + year + datetime + suffix); + } + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + function locale(key) { + var newLocaleData; + if (key === void 0) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + var lang = deprecate( + "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", + function(key) { + if (key === void 0) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + function localeData() { + return this._locale; + } + var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + function localStartOfDate(y, m, d) { + if (y < 100 && y >= 0) { + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + function utcStartOfDate(y, m, d) { + if (y < 100 && y >= 0) { + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === void 0 || units === "millisecond" || !this.isValid()) { + return this; + } + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + switch (units) { + case "year": + time = startOfDate(this.year(), 0, 1); + break; + case "quarter": + time = startOfDate( + this.year(), + this.month() - this.month() % 3, + 1 + ); + break; + case "month": + time = startOfDate(this.year(), this.month(), 1); + break; + case "week": + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + ); + break; + case "isoWeek": + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case "day": + case "date": + time = startOfDate(this.year(), this.month(), this.date()); + break; + case "hour": + time = this._d.valueOf(); + time -= mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ); + break; + case "minute": + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case "second": + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === void 0 || units === "millisecond" || !this.isValid()) { + return this; + } + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + switch (units) { + case "year": + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case "quarter": + time = startOfDate( + this.year(), + this.month() - this.month() % 3 + 3, + 1 + ) - 1; + break; + case "month": + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case "week": + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + 7 + ) - 1; + break; + case "isoWeek": + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case "day": + case "date": + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case "hour": + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ) - 1; + break; + case "minute": + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case "second": + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 6e4; + } + function unix() { + return Math.floor(this.valueOf() / 1e3); + } + function toDate() { + return new Date(this.valueOf()); + } + function toArray2() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond() + ]; + } + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds() + }; + } + function toJSON() { + return this.isValid() ? this.toISOString() : null; + } + function isValid$2() { + return isValid(this); + } + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + function invalidAt() { + return getParsingFlags(this).overflow; + } + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + addFormatToken("N", 0, 0, "eraAbbr"); + addFormatToken("NN", 0, 0, "eraAbbr"); + addFormatToken("NNN", 0, 0, "eraAbbr"); + addFormatToken("NNNN", 0, 0, "eraName"); + addFormatToken("NNNNN", 0, 0, "eraNarrow"); + addFormatToken("y", ["y", 1], "yo", "eraYear"); + addFormatToken("y", ["yy", 2], 0, "eraYear"); + addFormatToken("y", ["yyy", 3], 0, "eraYear"); + addFormatToken("y", ["yyyy", 4], 0, "eraYear"); + addRegexToken("N", matchEraAbbr); + addRegexToken("NN", matchEraAbbr); + addRegexToken("NNN", matchEraAbbr); + addRegexToken("NNNN", matchEraName); + addRegexToken("NNNNN", matchEraNarrow); + addParseToken( + ["N", "NN", "NNN", "NNNN", "NNNNN"], + function(input, array, config, token2) { + var era = config._locale.erasParse(input, token2, config._strict); + if (era) { + getParsingFlags(config).era = era; + } else { + getParsingFlags(config).invalidEra = input; + } + } + ); + addRegexToken("y", matchUnsigned); + addRegexToken("yy", matchUnsigned); + addRegexToken("yyy", matchUnsigned); + addRegexToken("yyyy", matchUnsigned); + addRegexToken("yo", matchEraYearOrdinal); + addParseToken(["y", "yy", "yyy", "yyyy"], YEAR); + addParseToken(["yo"], function(input, array, config, token2) { + var match; + if (config._locale._eraYearOrdinalRegex) { + match = input.match(config._locale._eraYearOrdinalRegex); + } + if (config._locale.eraYearOrdinalParse) { + array[YEAR] = config._locale.eraYearOrdinalParse(input, match); + } else { + array[YEAR] = parseInt(input, 10); + } + }); + function localeEras(m, format2) { + var i, l, date, eras = this._eras || getLocale("en")._eras; + for (i = 0, l = eras.length; i < l; ++i) { + switch (typeof eras[i].since) { + case "string": + date = hooks(eras[i].since).startOf("day"); + eras[i].since = date.valueOf(); + break; + } + switch (typeof eras[i].until) { + case "undefined": + eras[i].until = Infinity; + break; + case "string": + date = hooks(eras[i].until).startOf("day").valueOf(); + eras[i].until = date.valueOf(); + break; + } + } + return eras; + } + function localeErasParse(eraName, format2, strict) { + var i, l, eras = this.eras(), name, abbr, narrow; + eraName = eraName.toUpperCase(); + for (i = 0, l = eras.length; i < l; ++i) { + name = eras[i].name.toUpperCase(); + abbr = eras[i].abbr.toUpperCase(); + narrow = eras[i].narrow.toUpperCase(); + if (strict) { + switch (format2) { + case "N": + case "NN": + case "NNN": + if (abbr === eraName) { + return eras[i]; + } + break; + case "NNNN": + if (name === eraName) { + return eras[i]; + } + break; + case "NNNNN": + if (narrow === eraName) { + return eras[i]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras[i]; + } + } + } + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? 1 : -1; + if (year === void 0) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; + } + } + function getEraName() { + var i, l, val, eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + val = this.clone().startOf("day").valueOf(); + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].name; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].name; + } + } + return ""; + } + function getEraNarrow() { + var i, l, val, eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + val = this.clone().startOf("day").valueOf(); + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].narrow; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].narrow; + } + } + return ""; + } + function getEraAbbr() { + var i, l, val, eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + val = this.clone().startOf("day").valueOf(); + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].abbr; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].abbr; + } + } + return ""; + } + function getEraYear() { + var i, l, dir, val, eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + dir = eras[i].since <= eras[i].until ? 1 : -1; + val = this.clone().startOf("day").valueOf(); + if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) { + return (this.year() - hooks(eras[i].since).year()) * dir + eras[i].offset; + } + } + return this.year(); + } + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, "_erasNameRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, "_erasAbbrRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, "_erasNarrowRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + function matchEraAbbr(isStrict, locale2) { + return locale2.erasAbbrRegex(isStrict); + } + function matchEraName(isStrict, locale2) { + return locale2.erasNameRegex(isStrict); + } + function matchEraNarrow(isStrict, locale2) { + return locale2.erasNarrowRegex(isStrict); + } + function matchEraYearOrdinal(isStrict, locale2) { + return locale2._eraYearOrdinalRegex || matchUnsigned; + } + function computeErasParse() { + var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l, eras = this.eras(); + for (i = 0, l = eras.length; i < l; ++i) { + namePieces.push(regexEscape(eras[i].name)); + abbrPieces.push(regexEscape(eras[i].abbr)); + narrowPieces.push(regexEscape(eras[i].narrow)); + mixedPieces.push(regexEscape(eras[i].name)); + mixedPieces.push(regexEscape(eras[i].abbr)); + mixedPieces.push(regexEscape(eras[i].narrow)); + } + this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i"); + this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i"); + this._erasNarrowRegex = new RegExp( + "^(" + narrowPieces.join("|") + ")", + "i" + ); + } + addFormatToken(0, ["gg", 2], 0, function() { + return this.weekYear() % 100; + }); + addFormatToken(0, ["GG", 2], 0, function() { + return this.isoWeekYear() % 100; + }); + function addWeekYearFormatToken(token2, getter) { + addFormatToken(0, [token2, token2.length], 0, getter); + } + addWeekYearFormatToken("gggg", "weekYear"); + addWeekYearFormatToken("ggggg", "weekYear"); + addWeekYearFormatToken("GGGG", "isoWeekYear"); + addWeekYearFormatToken("GGGGG", "isoWeekYear"); + addUnitAlias("weekYear", "gg"); + addUnitAlias("isoWeekYear", "GG"); + addUnitPriority("weekYear", 1); + addUnitPriority("isoWeekYear", 1); + addRegexToken("G", matchSigned); + addRegexToken("g", matchSigned); + addRegexToken("GG", match1to2, match2); + addRegexToken("gg", match1to2, match2); + addRegexToken("GGGG", match1to4, match4); + addRegexToken("gggg", match1to4, match4); + addRegexToken("GGGGG", match1to6, match6); + addRegexToken("ggggg", match1to6, match6); + addWeekParseToken( + ["gggg", "ggggg", "GGGG", "GGGGG"], + function(input, week, config, token2) { + week[token2.substr(0, 2)] = toInt(input); + } + ); + addWeekParseToken(["gg", "GG"], function(input, week, config, token2) { + week[token2] = hooks.parseTwoDigitYear(input); + }); + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + addFormatToken("Q", 0, "Qo", "quarter"); + addUnitAlias("quarter", "Q"); + addUnitPriority("quarter", 7); + addRegexToken("Q", match1); + addParseToken("Q", function(input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } + addFormatToken("D", ["DD", 2], "Do", "date"); + addUnitAlias("date", "D"); + addUnitPriority("date", 9); + addRegexToken("D", match1to2); + addRegexToken("DD", match1to2, match2); + addRegexToken("Do", function(isStrict, locale2) { + return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient; + }); + addParseToken(["D", "DD"], DATE); + addParseToken("Do", function(input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + var getSetDayOfMonth = makeGetSet("Date", true); + addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear"); + addUnitAlias("dayOfYear", "DDD"); + addUnitPriority("dayOfYear", 4); + addRegexToken("DDD", match1to3); + addRegexToken("DDDD", match3); + addParseToken(["DDD", "DDDD"], function(input, array, config) { + config._dayOfYear = toInt(input); + }); + function getSetDayOfYear(input) { + var dayOfYear = Math.round( + (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, "d"); + } + addFormatToken("m", ["mm", 2], 0, "minute"); + addUnitAlias("minute", "m"); + addUnitPriority("minute", 14); + addRegexToken("m", match1to2); + addRegexToken("mm", match1to2, match2); + addParseToken(["m", "mm"], MINUTE); + var getSetMinute = makeGetSet("Minutes", false); + addFormatToken("s", ["ss", 2], 0, "second"); + addUnitAlias("second", "s"); + addUnitPriority("second", 15); + addRegexToken("s", match1to2); + addRegexToken("ss", match1to2, match2); + addParseToken(["s", "ss"], SECOND); + var getSetSecond = makeGetSet("Seconds", false); + addFormatToken("S", 0, 0, function() { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ["SS", 2], 0, function() { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ["SSS", 3], 0, "millisecond"); + addFormatToken(0, ["SSSS", 4], 0, function() { + return this.millisecond() * 10; + }); + addFormatToken(0, ["SSSSS", 5], 0, function() { + return this.millisecond() * 100; + }); + addFormatToken(0, ["SSSSSS", 6], 0, function() { + return this.millisecond() * 1e3; + }); + addFormatToken(0, ["SSSSSSS", 7], 0, function() { + return this.millisecond() * 1e4; + }); + addFormatToken(0, ["SSSSSSSS", 8], 0, function() { + return this.millisecond() * 1e5; + }); + addFormatToken(0, ["SSSSSSSSS", 9], 0, function() { + return this.millisecond() * 1e6; + }); + addUnitAlias("millisecond", "ms"); + addUnitPriority("millisecond", 16); + addRegexToken("S", match1to3, match1); + addRegexToken("SS", match1to3, match2); + addRegexToken("SSS", match1to3, match3); + var token, getSetMillisecond; + for (token = "SSSS"; token.length <= 9; token += "S") { + addRegexToken(token, matchUnsigned); + } + function parseMs(input, array) { + array[MILLISECOND] = toInt(("0." + input) * 1e3); + } + for (token = "S"; token.length <= 9; token += "S") { + addParseToken(token, parseMs); + } + getSetMillisecond = makeGetSet("Milliseconds", false); + addFormatToken("z", 0, 0, "zoneAbbr"); + addFormatToken("zz", 0, 0, "zoneName"); + function getZoneAbbr() { + return this._isUTC ? "UTC" : ""; + } + function getZoneName() { + return this._isUTC ? "Coordinated Universal Time" : ""; + } + var proto = Moment4.prototype; + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone2; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray2; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== "undefined" && Symbol.for != null) { + proto[Symbol.for("nodejs.util.inspect.custom")] = function() { + return "Moment<" + this.format() + ">"; + }; + } + proto.toJSON = toJSON; + proto.toString = toString2; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + "dates accessor is deprecated. Use date instead.", + getSetDayOfMonth + ); + proto.months = deprecate( + "months accessor is deprecated. Use month instead", + getSetMonth + ); + proto.years = deprecate( + "years accessor is deprecated. Use year instead", + getSetYear + ); + proto.zone = deprecate( + "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", + getSetZone + ); + proto.isDSTShifted = deprecate( + "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", + isDaylightSavingTimeShifted + ); + function createUnix(input) { + return createLocal(input * 1e3); + } + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + function preParsePostFormat(string) { + return string; + } + var proto$1 = Locale.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + function get$1(format2, index, field, setter) { + var locale2 = getLocale(), utc = createUTC().set(setter, index); + return locale2[field](utc, format2); + } + function listMonthsImpl(format2, index, field) { + if (isNumber(format2)) { + index = format2; + format2 = void 0; + } + format2 = format2 || ""; + if (index != null) { + return get$1(format2, index, field, "month"); + } + var i, out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format2, i, field, "month"); + } + return out; + } + function listWeekdaysImpl(localeSorted, format2, index, field) { + if (typeof localeSorted === "boolean") { + if (isNumber(format2)) { + index = format2; + format2 = void 0; + } + format2 = format2 || ""; + } else { + format2 = localeSorted; + index = format2; + localeSorted = false; + if (isNumber(format2)) { + index = format2; + format2 = void 0; + } + format2 = format2 || ""; + } + var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i, out = []; + if (index != null) { + return get$1(format2, (index + shift) % 7, field, "day"); + } + for (i = 0; i < 7; i++) { + out[i] = get$1(format2, (i + shift) % 7, field, "day"); + } + return out; + } + function listMonths(format2, index) { + return listMonthsImpl(format2, index, "months"); + } + function listMonthsShort(format2, index) { + return listMonthsImpl(format2, index, "monthsShort"); + } + function listWeekdays(localeSorted, format2, index) { + return listWeekdaysImpl(localeSorted, format2, index, "weekdays"); + } + function listWeekdaysShort(localeSorted, format2, index) { + return listWeekdaysImpl(localeSorted, format2, index, "weekdaysShort"); + } + function listWeekdaysMin(localeSorted, format2, index) { + return listWeekdaysImpl(localeSorted, format2, index, "weekdaysMin"); + } + getSetGlobalLocale("en", { + eras: [ + { + since: "0001-01-01", + until: Infinity, + offset: 1, + name: "Anno Domini", + narrow: "AD", + abbr: "AD" + }, + { + since: "0000-12-31", + until: -Infinity, + offset: 1, + name: "Before Christ", + narrow: "BC", + abbr: "BC" + } + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function(number) { + var b = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th"; + return number + output; + } + }); + hooks.lang = deprecate( + "moment.lang is deprecated. Use moment.locale instead.", + getSetGlobalLocale + ); + hooks.langData = deprecate( + "moment.langData is deprecated. Use moment.localeData instead.", + getLocale + ); + var mathAbs = Math.abs; + function abs() { + var data = this._data; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + return this; + } + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + return duration._bubble(); + } + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + function bubble() { + var milliseconds2 = this._milliseconds, days2 = this._days, months2 = this._months, data = this._data, seconds2, minutes2, hours2, years2, monthsFromDays; + if (!(milliseconds2 >= 0 && days2 >= 0 && months2 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months2 <= 0)) { + milliseconds2 += absCeil(monthsToDays(months2) + days2) * 864e5; + days2 = 0; + months2 = 0; + } + data.milliseconds = milliseconds2 % 1e3; + seconds2 = absFloor(milliseconds2 / 1e3); + data.seconds = seconds2 % 60; + minutes2 = absFloor(seconds2 / 60); + data.minutes = minutes2 % 60; + hours2 = absFloor(minutes2 / 60); + data.hours = hours2 % 24; + days2 += absFloor(hours2 / 24); + monthsFromDays = absFloor(daysToMonths(days2)); + months2 += monthsFromDays; + days2 -= absCeil(monthsToDays(monthsFromDays)); + years2 = absFloor(months2 / 12); + months2 %= 12; + data.days = days2; + data.months = months2; + data.years = years2; + return this; + } + function daysToMonths(days2) { + return days2 * 4800 / 146097; + } + function monthsToDays(months2) { + return months2 * 146097 / 4800; + } + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days2, months2, milliseconds2 = this._milliseconds; + units = normalizeUnits(units); + if (units === "month" || units === "quarter" || units === "year") { + days2 = this._days + milliseconds2 / 864e5; + months2 = this._months + daysToMonths(days2); + switch (units) { + case "month": + return months2; + case "quarter": + return months2 / 3; + case "year": + return months2 / 12; + } + } else { + days2 = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case "week": + return days2 / 7 + milliseconds2 / 6048e5; + case "day": + return days2 + milliseconds2 / 864e5; + case "hour": + return days2 * 24 + milliseconds2 / 36e5; + case "minute": + return days2 * 1440 + milliseconds2 / 6e4; + case "second": + return days2 * 86400 + milliseconds2 / 1e3; + case "millisecond": + return Math.floor(days2 * 864e5) + milliseconds2; + default: + throw new Error("Unknown unit " + units); + } + } + } + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + function makeAs(alias) { + return function() { + return this.as(alias); + }; + } + var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"); + function clone$1() { + return createDuration(this); + } + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + "s"]() : NaN; + } + function makeGetter(name) { + return function() { + return this.isValid() ? this._data[name] : NaN; + }; + } + var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months = makeGetter("months"), years = makeGetter("years"); + function weeks() { + return absFloor(this.days() / 7); + } + var round = Math.round, thresholds = { + ss: 44, + // a few seconds to seconds + s: 45, + // seconds to minute + m: 45, + // minutes to hour + h: 22, + // hours to day + d: 26, + // days to month/week + w: null, + // weeks to month + M: 11 + // months to year + }; + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale2) { + return locale2.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) { + var duration = createDuration(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months2 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2]; + if (thresholds2.w != null) { + a = a || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2]; + } + a = a || months2 <= 1 && ["M"] || months2 < thresholds2.M && ["MM", months2] || years2 <= 1 && ["y"] || ["yy", years2]; + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale2; + return substituteTimeAgo.apply(null, a); + } + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === void 0) { + return round; + } + if (typeof roundingFunction === "function") { + round = roundingFunction; + return true; + } + return false; + } + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === void 0) { + return false; + } + if (limit === void 0) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === "s") { + thresholds.ss = limit - 1; + } + return true; + } + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + var withSuffix = false, th = thresholds, locale2, output; + if (typeof argWithSuffix === "object") { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === "boolean") { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === "object") { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; + } + } + locale2 = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale2); + if (withSuffix) { + output = locale2.pastFuture(+this, output); + } + return locale2.postformat(output); + } + var abs$1 = Math.abs; + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + function toISOString$1() { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months2 = abs$1(this._months), minutes2, hours2, years2, s, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign; + if (!total) { + return "P0D"; + } + minutes2 = absFloor(seconds2 / 60); + hours2 = absFloor(minutes2 / 60); + seconds2 %= 60; + minutes2 %= 60; + years2 = absFloor(months2 / 12); + months2 %= 12; + s = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : ""; + totalSign = total < 0 ? "-" : ""; + ymSign = sign(this._months) !== sign(total) ? "-" : ""; + daysSign = sign(this._days) !== sign(total) ? "-" : ""; + hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : ""; + return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months2 ? ymSign + months2 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s + "S" : ""); + } + var proto$2 = Duration.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate( + "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", + toISOString$1 + ); + proto$2.lang = lang; + addFormatToken("X", 0, 0, "unix"); + addFormatToken("x", 0, 0, "valueOf"); + addRegexToken("x", matchSigned); + addRegexToken("X", matchTimestamp); + addParseToken("X", function(input, array, config) { + config._d = new Date(parseFloat(input) * 1e3); + }); + addParseToken("x", function(input, array, config) { + config._d = new Date(toInt(input)); + }); + hooks.version = "2.29.4"; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min2; + hooks.max = max2; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + hooks.HTML5_FMT = { + DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", + // + DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", + // + DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", + // + DATE: "YYYY-MM-DD", + // + TIME: "HH:mm", + // + TIME_SECONDS: "HH:mm:ss", + // + TIME_MS: "HH:mm:ss.SSS", + // + WEEK: "GGGG-[W]WW", + // + MONTH: "YYYY-MM" + // + }; + return hooks; + }); + } +}); + +// node_modules/react/cjs/react.development.js +var require_react_development = __commonJS({ + "node_modules/react/cjs/react.development.js"(exports, module2) { + "use strict"; + if (true) { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var ReactVersion = "18.3.1"; + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactCurrentDispatcher = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactCurrentBatchConfig = { + transition: null + }; + var ReactCurrentActQueue = { + current: null, + // Used to reproduce behavior of `batchedUpdates` in legacy mode. + isBatchingLegacy: false, + didScheduleLegacyUpdate: false + }; + var ReactCurrentOwner = { + /** + * @internal + * @type {ReactComponent} + */ + current: null + }; + var ReactDebugCurrentFrame = {}; + var currentExtraStackFrame = null; + function setExtraStackFrame(stack) { + { + currentExtraStackFrame = stack; + } + } + { + ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { + { + currentExtraStackFrame = stack; + } + }; + ReactDebugCurrentFrame.getCurrentStack = null; + ReactDebugCurrentFrame.getStackAddendum = function() { + var stack = ""; + if (currentExtraStackFrame) { + stack += currentExtraStackFrame; + } + var impl = ReactDebugCurrentFrame.getCurrentStack; + if (impl) { + stack += impl() || ""; + } + return stack; + }; + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var ReactSharedInternals = { + ReactCurrentDispatcher, + ReactCurrentBatchConfig, + ReactCurrentOwner + }; + { + ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; + ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; + } + function warn(format) { + { + { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + } + function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var didWarnStateUpdateForUnmountedComponent = {}; + function warnNoop(publicInstance, callerName) { + { + var _constructor = publicInstance.constructor; + var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; + var warningKey = componentName + "." + callerName; + if (didWarnStateUpdateForUnmountedComponent[warningKey]) { + return; + } + error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); + didWarnStateUpdateForUnmountedComponent[warningKey] = true; + } + } + var ReactNoopUpdateQueue = { + /** + * Checks whether or not this composite component is mounted. + * @param {ReactClass} publicInstance The instance we want to test. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function(publicInstance) { + return false; + }, + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueForceUpdate: function(publicInstance, callback, callerName) { + warnNoop(publicInstance, "forceUpdate"); + }, + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @param {?function} callback Called after component is updated. + * @param {?string} callerName name of the calling function in the public API. + * @internal + */ + enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { + warnNoop(publicInstance, "replaceState"); + }, + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @param {?function} callback Called after component is updated. + * @param {?string} Name of the calling function in the public API. + * @internal + */ + enqueueSetState: function(publicInstance, partialState, callback, callerName) { + warnNoop(publicInstance, "setState"); + } + }; + var assign = Object.assign; + var emptyObject = {}; + { + Object.freeze(emptyObject); + } + function Component6(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + Component6.prototype.isReactComponent = {}; + Component6.prototype.setState = function(partialState, callback) { + if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) { + throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); + } + this.updater.enqueueSetState(this, partialState, callback, "setState"); + }; + Component6.prototype.forceUpdate = function(callback) { + this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); + }; + { + var deprecatedAPIs = { + isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], + replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] + }; + var defineDeprecationWarning = function(methodName, info) { + Object.defineProperty(Component6.prototype, methodName, { + get: function() { + warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); + return void 0; + } + }); + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } + } + function ComponentDummy() { + } + ComponentDummy.prototype = Component6.prototype; + function PureComponent(props, context, updater) { + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + } + var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); + pureComponentPrototype.constructor = PureComponent; + assign(pureComponentPrototype, Component6.prototype); + pureComponentPrototype.isPureReactComponent = true; + function createRef2() { + var refObject = { + current: null + }; + { + Object.seal(refObject); + } + return refObject; + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty2.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + function hasValidKey(config) { + { + if (hasOwnProperty2.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function() { + { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function() { + { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + function warnIfStringRefCannotBeAutoConverted(config) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function createElement(type, config, children) { + var propName; + var props = {}; + var key = null; + var ref = null; + var self2 = null; + var source = null; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + { + warnIfStringRefCannotBeAutoConverted(config); + } + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + self2 = config.__self === void 0 ? null : config.__self; + source = config.__source === void 0 ? null : config.__source; + for (propName in config) { + if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + { + if (Object.freeze) { + Object.freeze(childArray); + } + } + props.children = childArray; + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + { + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); + } + function cloneAndReplaceKey(oldElement, newKey) { + var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); + return newElement; + } + function cloneElement(element, config, children) { + if (element === null || element === void 0) { + throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); + } + var propName; + var props = assign({}, element.props); + var key = element.key; + var ref = element.ref; + var self2 = element._self; + var source = element._source; + var owner = element._owner; + if (config != null) { + if (hasValidRef(config)) { + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + var defaultProps; + if (element.type && element.type.defaultProps) { + defaultProps = element.type.defaultProps; + } + for (propName in config) { + if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + if (config[propName] === void 0 && defaultProps !== void 0) { + props[propName] = defaultProps[propName]; + } else { + props[propName] = config[propName]; + } + } + } + } + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + return ReactElement(element.type, key, ref, self2, source, owner, props); + } + function isValidElement(object2) { + return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE; + } + var SEPARATOR = "."; + var SUBSEPARATOR = ":"; + function escape(key) { + var escapeRegex = /[=:]/g; + var escaperLookup = { + "=": "=0", + ":": "=2" + }; + var escapedString = key.replace(escapeRegex, function(match) { + return escaperLookup[match]; + }); + return "$" + escapedString; + } + var didWarnAboutMaps = false; + var userProvidedKeyEscapeRegex = /\/+/g; + function escapeUserProvidedKey(text) { + return text.replace(userProvidedKeyEscapeRegex, "$&/"); + } + function getElementKey(element, index) { + if (typeof element === "object" && element !== null && element.key != null) { + { + checkKeyStringCoercion(element.key); + } + return escape("" + element.key); + } + return index.toString(36); + } + function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { + var type = typeof children; + if (type === "undefined" || type === "boolean") { + children = null; + } + var invokeCallback = false; + if (children === null) { + invokeCallback = true; + } else { + switch (type) { + case "string": + case "number": + invokeCallback = true; + break; + case "object": + switch (children.$$typeof) { + case REACT_ELEMENT_TYPE: + case REACT_PORTAL_TYPE: + invokeCallback = true; + } + } + } + if (invokeCallback) { + var _child = children; + var mappedChild = callback(_child); + var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; + if (isArray(mappedChild)) { + var escapedChildKey = ""; + if (childKey != null) { + escapedChildKey = escapeUserProvidedKey(childKey) + "/"; + } + mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { + return c; + }); + } else if (mappedChild != null) { + if (isValidElement(mappedChild)) { + { + if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { + checkKeyStringCoercion(mappedChild.key); + } + } + mappedChild = cloneAndReplaceKey( + mappedChild, + // Keep both the (mapped) and old keys if they differ, just as + // traverseAllChildren used to do for objects as children + escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( + // $FlowFixMe Flow incorrectly thinks existing element's key can be a number + // eslint-disable-next-line react-internal/safe-string-coercion + escapeUserProvidedKey("" + mappedChild.key) + "/" + ) : "") + childKey + ); + } + array.push(mappedChild); + } + return 1; + } + var child; + var nextName; + var subtreeCount = 0; + var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = nextNamePrefix + getElementKey(child, i); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else { + var iteratorFn = getIteratorFn(children); + if (typeof iteratorFn === "function") { + var iterableChildren = children; + { + if (iteratorFn === iterableChildren.entries) { + if (!didWarnAboutMaps) { + warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); + } + didWarnAboutMaps = true; + } + } + var iterator = iteratorFn.call(iterableChildren); + var step; + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = nextNamePrefix + getElementKey(child, ii++); + subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); + } + } else if (type === "object") { + var childrenString = String(children); + throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); + } + } + return subtreeCount; + } + function mapChildren(children, func, context) { + if (children == null) { + return children; + } + var result2 = []; + var count = 0; + mapIntoArray(children, result2, "", "", function(child) { + return func.call(context, child, count++); + }); + return result2; + } + function countChildren(children) { + var n = 0; + mapChildren(children, function() { + n++; + }); + return n; + } + function forEachChildren(children, forEachFunc, forEachContext) { + mapChildren(children, function() { + forEachFunc.apply(this, arguments); + }, forEachContext); + } + function toArray2(children) { + return mapChildren(children, function(child) { + return child; + }) || []; + } + function onlyChild(children) { + if (!isValidElement(children)) { + throw new Error("React.Children.only expected to receive a single React element child."); + } + return children; + } + function createContext2(defaultValue) { + var context = { + $$typeof: REACT_CONTEXT_TYPE, + // As a workaround to support multiple concurrent renderers, we categorize + // some renderers as primary and others as secondary. We only expect + // there to be two concurrent renderers at most: React Native (primary) and + // Fabric (secondary); React DOM (primary) and React ART (secondary). + // Secondary renderers store their context values on separate fields. + _currentValue: defaultValue, + _currentValue2: defaultValue, + // Used to track how many concurrent renderers this context currently + // supports within in a single renderer. Such as parallel server rendering. + _threadCount: 0, + // These are circular + Provider: null, + Consumer: null, + // Add these to use same hidden class in VM as ServerContext + _defaultValue: null, + _globalName: null + }; + context.Provider = { + $$typeof: REACT_PROVIDER_TYPE, + _context: context + }; + var hasWarnedAboutUsingNestedContextConsumers = false; + var hasWarnedAboutUsingConsumerProvider = false; + var hasWarnedAboutDisplayNameOnConsumer = false; + { + var Consumer = { + $$typeof: REACT_CONTEXT_TYPE, + _context: context + }; + Object.defineProperties(Consumer, { + Provider: { + get: function() { + if (!hasWarnedAboutUsingConsumerProvider) { + hasWarnedAboutUsingConsumerProvider = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Provider; + }, + set: function(_Provider) { + context.Provider = _Provider; + } + }, + _currentValue: { + get: function() { + return context._currentValue; + }, + set: function(_currentValue) { + context._currentValue = _currentValue; + } + }, + _currentValue2: { + get: function() { + return context._currentValue2; + }, + set: function(_currentValue2) { + context._currentValue2 = _currentValue2; + } + }, + _threadCount: { + get: function() { + return context._threadCount; + }, + set: function(_threadCount) { + context._threadCount = _threadCount; + } + }, + Consumer: { + get: function() { + if (!hasWarnedAboutUsingNestedContextConsumers) { + hasWarnedAboutUsingNestedContextConsumers = true; + error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); + } + return context.Consumer; + } + }, + displayName: { + get: function() { + return context.displayName; + }, + set: function(displayName) { + if (!hasWarnedAboutDisplayNameOnConsumer) { + warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); + hasWarnedAboutDisplayNameOnConsumer = true; + } + } + } + }); + context.Consumer = Consumer; + } + { + context._currentRenderer = null; + context._currentRenderer2 = null; + } + return context; + } + var Uninitialized = -1; + var Pending = 0; + var Resolved = 1; + var Rejected = 2; + function lazyInitializer(payload) { + if (payload._status === Uninitialized) { + var ctor2 = payload._result; + var thenable = ctor2(); + thenable.then(function(moduleObject2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var resolved = payload; + resolved._status = Resolved; + resolved._result = moduleObject2; + } + }, function(error2) { + if (payload._status === Pending || payload._status === Uninitialized) { + var rejected = payload; + rejected._status = Rejected; + rejected._result = error2; + } + }); + if (payload._status === Uninitialized) { + var pending = payload; + pending._status = Pending; + pending._result = thenable; + } + } + if (payload._status === Resolved) { + var moduleObject = payload._result; + { + if (moduleObject === void 0) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject); + } + } + { + if (!("default" in moduleObject)) { + error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); + } + } + return moduleObject.default; + } else { + throw payload._result; + } + } + function lazy(ctor2) { + var payload = { + // We use these fields to store the result. + _status: Uninitialized, + _result: ctor2 + }; + var lazyType = { + $$typeof: REACT_LAZY_TYPE, + _payload: payload, + _init: lazyInitializer + }; + { + var defaultProps; + var propTypes; + Object.defineProperties(lazyType, { + defaultProps: { + configurable: true, + get: function() { + return defaultProps; + }, + set: function(newDefaultProps) { + error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + defaultProps = newDefaultProps; + Object.defineProperty(lazyType, "defaultProps", { + enumerable: true + }); + } + }, + propTypes: { + configurable: true, + get: function() { + return propTypes; + }, + set: function(newPropTypes) { + error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); + propTypes = newPropTypes; + Object.defineProperty(lazyType, "propTypes", { + enumerable: true + }); + } + } + }); + } + return lazyType; + } + function forwardRef(render) { + { + if (render != null && render.$$typeof === REACT_MEMO_TYPE) { + error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); + } else if (typeof render !== "function") { + error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render); + } else { + if (render.length !== 0 && render.length !== 2) { + error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); + } + } + if (render != null) { + if (render.defaultProps != null || render.propTypes != null) { + error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); + } + } + } + var elementType = { + $$typeof: REACT_FORWARD_REF_TYPE, + render + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!render.name && !render.displayName) { + render.displayName = name; + } + } + }); + } + return elementType; + } + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; + } + function memo(type, compare) { + { + if (!isValidElementType(type)) { + error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); + } + } + var elementType = { + $$typeof: REACT_MEMO_TYPE, + type, + compare: compare === void 0 ? null : compare + }; + { + var ownName; + Object.defineProperty(elementType, "displayName", { + enumerable: false, + configurable: true, + get: function() { + return ownName; + }, + set: function(name) { + ownName = name; + if (!type.name && !type.displayName) { + type.displayName = name; + } + } + }); + } + return elementType; + } + function resolveDispatcher() { + var dispatcher = ReactCurrentDispatcher.current; + { + if (dispatcher === null) { + error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); + } + } + return dispatcher; + } + function useContext(Context) { + var dispatcher = resolveDispatcher(); + { + if (Context._context !== void 0) { + var realContext = Context._context; + if (realContext.Consumer === Context) { + error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); + } else if (realContext.Provider === Context) { + error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); + } + } + } + return dispatcher.useContext(Context); + } + function useState(initialState) { + var dispatcher = resolveDispatcher(); + return dispatcher.useState(initialState); + } + function useReducer(reducer, initialArg, init) { + var dispatcher = resolveDispatcher(); + return dispatcher.useReducer(reducer, initialArg, init); + } + function useRef(initialValue) { + var dispatcher = resolveDispatcher(); + return dispatcher.useRef(initialValue); + } + function useEffect(create2, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useEffect(create2, deps); + } + function useInsertionEffect(create2, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useInsertionEffect(create2, deps); + } + function useLayoutEffect(create2, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useLayoutEffect(create2, deps); + } + function useCallback(callback, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useCallback(callback, deps); + } + function useMemo(create2, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useMemo(create2, deps); + } + function useImperativeHandle(ref, create2, deps) { + var dispatcher = resolveDispatcher(); + return dispatcher.useImperativeHandle(ref, create2, deps); + } + function useDebugValue(value, formatterFn) { + { + var dispatcher = resolveDispatcher(); + return dispatcher.useDebugValue(value, formatterFn); + } + } + function useTransition() { + var dispatcher = resolveDispatcher(); + return dispatcher.useTransition(); + } + function useDeferredValue(value) { + var dispatcher = resolveDispatcher(); + return dispatcher.useDeferredValue(value); + } + function useId() { + var dispatcher = resolveDispatcher(); + return dispatcher.useId(); + } + function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { + var dispatcher = resolveDispatcher(); + return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + } + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher$1.current; + ReactCurrentDispatcher$1.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample2) { + if (sample2 && control && typeof sample2.stack === "string") { + var sampleLines = sample2.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher$1.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component7) { + var prototype = Component7.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has3 = Function.call.bind(hasOwnProperty2); + for (var typeSpecName in typeSpecs) { + if (has3(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + setExtraStackFrame(stack); + } else { + setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + function getSourceInfoErrorAddendum(source) { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + function getSourceInfoErrorAddendumForProps(elementProps) { + if (elementProps !== null && elementProps !== void 0) { + return getSourceInfoErrorAddendum(elementProps.__source); + } + return ""; + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + function validateExplicitKey(element, parentType) { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + { + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + if (typeof node !== "object") { + return; + } + if (isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys2 = Object.keys(fragment.props); + for (var i = 0; i < keys2.length; i++) { + var key = keys2[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + function createElementWithValidation(type, props, children) { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendumForProps(props); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + { + error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + } + var element = createElement.apply(this, arguments); + if (element == null) { + return element; + } + if (validType) { + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + var didWarnAboutDeprecatedCreateFactory = false; + function createFactoryWithValidation(type) { + var validatedFactory = createElementWithValidation.bind(null, type); + validatedFactory.type = type; + { + if (!didWarnAboutDeprecatedCreateFactory) { + didWarnAboutDeprecatedCreateFactory = true; + warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); + } + Object.defineProperty(validatedFactory, "type", { + enumerable: false, + get: function() { + warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); + Object.defineProperty(this, "type", { + value: type + }); + return type; + } + }); + } + return validatedFactory; + } + function cloneElementWithValidation(element, props, children) { + var newElement = cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + function startTransition(scope, options) { + var prevTransition = ReactCurrentBatchConfig.transition; + ReactCurrentBatchConfig.transition = {}; + var currentTransition = ReactCurrentBatchConfig.transition; + { + ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set(); + } + try { + scope(); + } finally { + ReactCurrentBatchConfig.transition = prevTransition; + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + if (updatedFibersCount > 10) { + warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."); + } + currentTransition._updatedFibers.clear(); + } + } + } + } + var didWarnAboutMessageChannel = false; + var enqueueTaskImpl = null; + function enqueueTask(task) { + if (enqueueTaskImpl === null) { + try { + var requireString = ("require" + Math.random()).slice(0, 7); + var nodeRequire = module2 && module2[requireString]; + enqueueTaskImpl = nodeRequire.call(module2, "timers").setImmediate; + } catch (_err) { + enqueueTaskImpl = function(callback) { + { + if (didWarnAboutMessageChannel === false) { + didWarnAboutMessageChannel = true; + if (typeof MessageChannel === "undefined") { + error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."); + } + } + } + var channel = new MessageChannel(); + channel.port1.onmessage = callback; + channel.port2.postMessage(void 0); + }; + } + } + return enqueueTaskImpl(task); + } + var actScopeDepth = 0; + var didWarnNoAwaitAct = false; + function act(callback) { + { + var prevActScopeDepth = actScopeDepth; + actScopeDepth++; + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + } + var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; + var result2; + try { + ReactCurrentActQueue.isBatchingLegacy = true; + result2 = callback(); + if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + ReactCurrentActQueue.didScheduleLegacyUpdate = false; + flushActQueue(queue); + } + } + } catch (error2) { + popActScope(prevActScopeDepth); + throw error2; + } finally { + ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; + } + if (result2 !== null && typeof result2 === "object" && typeof result2.then === "function") { + var thenableResult = result2; + var wasAwaited = false; + var thenable = { + then: function(resolve, reject2) { + wasAwaited = true; + thenableResult.then(function(returnValue2) { + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + recursivelyFlushAsyncActWork(returnValue2, resolve, reject2); + } else { + resolve(returnValue2); + } + }, function(error2) { + popActScope(prevActScopeDepth); + reject2(error2); + }); + } + }; + { + if (!didWarnNoAwaitAct && typeof Promise !== "undefined") { + Promise.resolve().then(function() { + }).then(function() { + if (!wasAwaited) { + didWarnNoAwaitAct = true; + error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"); + } + }); + } + } + return thenable; + } else { + var returnValue = result2; + popActScope(prevActScopeDepth); + if (actScopeDepth === 0) { + var _queue = ReactCurrentActQueue.current; + if (_queue !== null) { + flushActQueue(_queue); + ReactCurrentActQueue.current = null; + } + var _thenable = { + then: function(resolve, reject2) { + if (ReactCurrentActQueue.current === null) { + ReactCurrentActQueue.current = []; + recursivelyFlushAsyncActWork(returnValue, resolve, reject2); + } else { + resolve(returnValue); + } + } + }; + return _thenable; + } else { + var _thenable2 = { + then: function(resolve, reject2) { + resolve(returnValue); + } + }; + return _thenable2; + } + } + } + } + function popActScope(prevActScopeDepth) { + { + if (prevActScopeDepth !== actScopeDepth - 1) { + error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); + } + actScopeDepth = prevActScopeDepth; + } + } + function recursivelyFlushAsyncActWork(returnValue, resolve, reject2) { + { + var queue = ReactCurrentActQueue.current; + if (queue !== null) { + try { + flushActQueue(queue); + enqueueTask(function() { + if (queue.length === 0) { + ReactCurrentActQueue.current = null; + resolve(returnValue); + } else { + recursivelyFlushAsyncActWork(returnValue, resolve, reject2); + } + }); + } catch (error2) { + reject2(error2); + } + } else { + resolve(returnValue); + } + } + } + var isFlushing = false; + function flushActQueue(queue) { + { + if (!isFlushing) { + isFlushing = true; + var i = 0; + try { + for (; i < queue.length; i++) { + var callback = queue[i]; + do { + callback = callback(true); + } while (callback !== null); + } + queue.length = 0; + } catch (error2) { + queue = queue.slice(i + 1); + throw error2; + } finally { + isFlushing = false; + } + } + } + } + var createElement$1 = createElementWithValidation; + var cloneElement$1 = cloneElementWithValidation; + var createFactory = createFactoryWithValidation; + var Children = { + map: mapChildren, + forEach: forEachChildren, + count: countChildren, + toArray: toArray2, + only: onlyChild + }; + exports.Children = Children; + exports.Component = Component6; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.Profiler = REACT_PROFILER_TYPE; + exports.PureComponent = PureComponent; + exports.StrictMode = REACT_STRICT_MODE_TYPE; + exports.Suspense = REACT_SUSPENSE_TYPE; + exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; + exports.act = act; + exports.cloneElement = cloneElement$1; + exports.createContext = createContext2; + exports.createElement = createElement$1; + exports.createFactory = createFactory; + exports.createRef = createRef2; + exports.forwardRef = forwardRef; + exports.isValidElement = isValidElement; + exports.lazy = lazy; + exports.memo = memo; + exports.startTransition = startTransition; + exports.unstable_act = act; + exports.useCallback = useCallback; + exports.useContext = useContext; + exports.useDebugValue = useDebugValue; + exports.useDeferredValue = useDeferredValue; + exports.useEffect = useEffect; + exports.useId = useId; + exports.useImperativeHandle = useImperativeHandle; + exports.useInsertionEffect = useInsertionEffect; + exports.useLayoutEffect = useLayoutEffect; + exports.useMemo = useMemo; + exports.useReducer = useReducer; + exports.useRef = useRef; + exports.useState = useState; + exports.useSyncExternalStore = useSyncExternalStore; + exports.useTransition = useTransition; + exports.version = ReactVersion; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); + } + })(); + } + } +}); + +// node_modules/react/index.js +var require_react = __commonJS({ + "node_modules/react/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_react_development(); + } + } +}); + +// node_modules/parsimmon/build/parsimmon.umd.min.js +var require_parsimmon_umd_min = __commonJS({ + "node_modules/parsimmon/build/parsimmon.umd.min.js"(exports, module2) { + !function(n, t) { + "object" == typeof exports && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.Parsimmon = t() : n.Parsimmon = t(); + }("undefined" != typeof self ? self : exports, function() { + return function(n) { + var t = {}; + function r(e) { + if (t[e]) + return t[e].exports; + var u = t[e] = { i: e, l: false, exports: {} }; + return n[e].call(u.exports, u, u.exports, r), u.l = true, u.exports; + } + return r.m = n, r.c = t, r.d = function(n2, t2, e) { + r.o(n2, t2) || Object.defineProperty(n2, t2, { configurable: false, enumerable: true, get: e }); + }, r.r = function(n2) { + Object.defineProperty(n2, "__esModule", { value: true }); + }, r.n = function(n2) { + var t2 = n2 && n2.__esModule ? function() { + return n2.default; + } : function() { + return n2; + }; + return r.d(t2, "a", t2), t2; + }, r.o = function(n2, t2) { + return Object.prototype.hasOwnProperty.call(n2, t2); + }, r.p = "", r(r.s = 0); + }([function(n, t, r) { + "use strict"; + function e(n2) { + if (!(this instanceof e)) + return new e(n2); + this._ = n2; + } + var u = e.prototype; + function o(n2, t2) { + for (var r2 = 0; r2 < n2; r2++) + t2(r2); + } + function i(n2, t2, r2) { + return function(n3, t3) { + o(t3.length, function(r3) { + n3(t3[r3], r3, t3); + }); + }(function(r3, e2, u2) { + t2 = n2(t2, r3, e2, u2); + }, r2), t2; + } + function a(n2, t2) { + return i(function(t3, r2, e2, u2) { + return t3.concat([n2(r2, e2, u2)]); + }, [], t2); + } + function f(n2, t2) { + var r2 = { v: 0, buf: t2 }; + return o(n2, function() { + var n3; + r2 = { v: r2.v << 1 | (n3 = r2.buf, n3[0] >> 7), buf: function(n4) { + var t3 = i(function(n5, t4, r3, e2) { + return n5.concat(r3 === e2.length - 1 ? Buffer.from([t4, 0]).readUInt16BE(0) : e2.readUInt16BE(r3)); + }, [], n4); + return Buffer.from(a(function(n5) { + return (n5 << 1 & 65535) >> 8; + }, t3)); + }(r2.buf) }; + }), r2; + } + function c() { + return "undefined" != typeof Buffer; + } + function s() { + if (!c()) + throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser."); + } + function l(n2) { + s(); + var t2 = i(function(n3, t3) { + return n3 + t3; + }, 0, n2); + if (t2 % 8 != 0) + throw new Error("The bits [" + n2.join(", ") + "] add up to " + t2 + " which is not an even number of bytes; the total should be divisible by 8"); + var r2, u2 = t2 / 8, o2 = (r2 = function(n3) { + return n3 > 48; + }, i(function(n3, t3) { + return n3 || (r2(t3) ? t3 : n3); + }, null, n2)); + if (o2) + throw new Error(o2 + " bit range requested exceeds 48 bit (6 byte) Number max."); + return new e(function(t3, r3) { + var e2 = u2 + r3; + return e2 > t3.length ? x(r3, u2.toString() + " bytes") : b(e2, i(function(n3, t4) { + var r4 = f(t4, n3.buf); + return { coll: n3.coll.concat(r4.v), buf: r4.buf }; + }, { coll: [], buf: t3.slice(r3, e2) }, n2).coll); + }); + } + function h(n2, t2) { + return new e(function(r2, e2) { + return s(), e2 + t2 > r2.length ? x(e2, t2 + " bytes for " + n2) : b(e2 + t2, r2.slice(e2, e2 + t2)); + }); + } + function p(n2, t2) { + if ("number" != typeof (r2 = t2) || Math.floor(r2) !== r2 || t2 < 0 || t2 > 6) + throw new Error(n2 + " requires integer length in range [0, 6]."); + var r2; + } + function d(n2) { + return p("uintBE", n2), h("uintBE(" + n2 + ")", n2).map(function(t2) { + return t2.readUIntBE(0, n2); + }); + } + function v(n2) { + return p("uintLE", n2), h("uintLE(" + n2 + ")", n2).map(function(t2) { + return t2.readUIntLE(0, n2); + }); + } + function g(n2) { + return p("intBE", n2), h("intBE(" + n2 + ")", n2).map(function(t2) { + return t2.readIntBE(0, n2); + }); + } + function m(n2) { + return p("intLE", n2), h("intLE(" + n2 + ")", n2).map(function(t2) { + return t2.readIntLE(0, n2); + }); + } + function y(n2) { + return n2 instanceof e; + } + function E(n2) { + return "[object Array]" === {}.toString.call(n2); + } + function w(n2) { + return c() && Buffer.isBuffer(n2); + } + function b(n2, t2) { + return { status: true, index: n2, value: t2, furthest: -1, expected: [] }; + } + function x(n2, t2) { + return E(t2) || (t2 = [t2]), { status: false, index: -1, value: null, furthest: n2, expected: t2 }; + } + function B(n2, t2) { + if (!t2) + return n2; + if (n2.furthest > t2.furthest) + return n2; + var r2 = n2.furthest === t2.furthest ? function(n3, t3) { + if (function() { + if (void 0 !== e._supportsSet) + return e._supportsSet; + var n4 = "undefined" != typeof Set; + return e._supportsSet = n4, n4; + }() && Array.from) { + for (var r3 = new Set(n3), u2 = 0; u2 < t3.length; u2++) + r3.add(t3[u2]); + var o2 = Array.from(r3); + return o2.sort(), o2; + } + for (var i2 = {}, a2 = 0; a2 < n3.length; a2++) + i2[n3[a2]] = true; + for (var f2 = 0; f2 < t3.length; f2++) + i2[t3[f2]] = true; + var c2 = []; + for (var s2 in i2) + ({}).hasOwnProperty.call(i2, s2) && c2.push(s2); + return c2.sort(), c2; + }(n2.expected, t2.expected) : t2.expected; + return { status: n2.status, index: n2.index, value: n2.value, furthest: t2.furthest, expected: r2 }; + } + var j = {}; + function S(n2, t2) { + if (w(n2)) + return { offset: t2, line: -1, column: -1 }; + n2 in j || (j[n2] = {}); + for (var r2 = j[n2], e2 = 0, u2 = 0, o2 = 0, i2 = t2; i2 >= 0; ) { + if (i2 in r2) { + e2 = r2[i2].line, 0 === o2 && (o2 = r2[i2].lineStart); + break; + } + ("\n" === n2.charAt(i2) || "\r" === n2.charAt(i2) && "\n" !== n2.charAt(i2 + 1)) && (u2++, 0 === o2 && (o2 = i2 + 1)), i2--; + } + var a2 = e2 + u2, f2 = t2 - o2; + return r2[t2] = { line: a2, lineStart: o2 }, { offset: t2, line: a2 + 1, column: f2 + 1 }; + } + function _3(n2) { + if (!y(n2)) + throw new Error("not a parser: " + n2); + } + function L(n2, t2) { + return "string" == typeof n2 ? n2.charAt(t2) : n2[t2]; + } + function O(n2) { + if ("number" != typeof n2) + throw new Error("not a number: " + n2); + } + function k(n2) { + if ("function" != typeof n2) + throw new Error("not a function: " + n2); + } + function P2(n2) { + if ("string" != typeof n2) + throw new Error("not a string: " + n2); + } + var q = 2, A = 3, I = 8, F = 5 * I, M = 4 * I, z = " "; + function R(n2, t2) { + return new Array(t2 + 1).join(n2); + } + function U(n2, t2, r2) { + var e2 = t2 - n2.length; + return e2 <= 0 ? n2 : R(r2, e2) + n2; + } + function W(n2, t2, r2, e2) { + return { from: n2 - t2 > 0 ? n2 - t2 : 0, to: n2 + r2 > e2 ? e2 : n2 + r2 }; + } + function D(n2, t2) { + var r2, e2, u2, o2, f2, c2 = t2.index, s2 = c2.offset, l2 = 1; + if (s2 === n2.length) + return "Got the end of the input"; + if (w(n2)) { + var h2 = s2 - s2 % I, p2 = s2 - h2, d2 = W(h2, F, M + I, n2.length), v2 = a(function(n3) { + return a(function(n4) { + return U(n4.toString(16), 2, "0"); + }, n3); + }, function(n3, t3) { + var r3 = n3.length, e3 = [], u3 = 0; + if (r3 <= t3) + return [n3.slice()]; + for (var o3 = 0; o3 < r3; o3++) + e3[u3] || e3.push([]), e3[u3].push(n3[o3]), (o3 + 1) % t3 == 0 && u3++; + return e3; + }(n2.slice(d2.from, d2.to).toJSON().data, I)); + o2 = function(n3) { + return 0 === n3.from && 1 === n3.to ? { from: n3.from, to: n3.to } : { from: n3.from / I, to: Math.floor(n3.to / I) }; + }(d2), e2 = h2 / I, r2 = 3 * p2, p2 >= 4 && (r2 += 1), l2 = 2, u2 = a(function(n3) { + return n3.length <= 4 ? n3.join(" ") : n3.slice(0, 4).join(" ") + " " + n3.slice(4).join(" "); + }, v2), (f2 = (8 * (o2.to > 0 ? o2.to - 1 : o2.to)).toString(16).length) < 2 && (f2 = 2); + } else { + var g2 = n2.split(/\r\n|[\n\r\u2028\u2029]/); + r2 = c2.column - 1, e2 = c2.line - 1, o2 = W(e2, q, A, g2.length), u2 = g2.slice(o2.from, o2.to), f2 = o2.to.toString().length; + } + var m2 = e2 - o2.from; + return w(n2) && (f2 = (8 * (o2.to > 0 ? o2.to - 1 : o2.to)).toString(16).length) < 2 && (f2 = 2), i(function(t3, e3, u3) { + var i2, a2 = u3 === m2, c3 = a2 ? "> " : z; + return i2 = w(n2) ? U((8 * (o2.from + u3)).toString(16), f2, "0") : U((o2.from + u3 + 1).toString(), f2, " "), [].concat(t3, [c3 + i2 + " | " + e3], a2 ? [z + R(" ", f2) + " | " + U("", r2, " ") + R("^", l2)] : []); + }, [], u2).join("\n"); + } + function N(n2, t2) { + return ["\n", "-- PARSING FAILED " + R("-", 50), "\n\n", D(n2, t2), "\n\n", (r2 = t2.expected, 1 === r2.length ? "Expected:\n\n" + r2[0] : "Expected one of the following: \n\n" + r2.join(", ")), "\n"].join(""); + var r2; + } + function G(n2) { + return void 0 !== n2.flags ? n2.flags : [n2.global ? "g" : "", n2.ignoreCase ? "i" : "", n2.multiline ? "m" : "", n2.unicode ? "u" : "", n2.sticky ? "y" : ""].join(""); + } + function C() { + for (var n2 = [].slice.call(arguments), t2 = n2.length, r2 = 0; r2 < t2; r2 += 1) + _3(n2[r2]); + return e(function(r3, e2) { + for (var u2, o2 = new Array(t2), i2 = 0; i2 < t2; i2 += 1) { + if (!(u2 = B(n2[i2]._(r3, e2), u2)).status) + return u2; + o2[i2] = u2.value, e2 = u2.index; + } + return B(b(e2, o2), u2); + }); + } + function J() { + var n2 = [].slice.call(arguments); + if (0 === n2.length) + throw new Error("seqMap needs at least one argument"); + var t2 = n2.pop(); + return k(t2), C.apply(null, n2).map(function(n3) { + return t2.apply(null, n3); + }); + } + function T() { + var n2 = [].slice.call(arguments), t2 = n2.length; + if (0 === t2) + return Y("zero alternates"); + for (var r2 = 0; r2 < t2; r2 += 1) + _3(n2[r2]); + return e(function(t3, r3) { + for (var e2, u2 = 0; u2 < n2.length; u2 += 1) + if ((e2 = B(n2[u2]._(t3, r3), e2)).status) + return e2; + return e2; + }); + } + function V(n2, t2) { + return H(n2, t2).or(X([])); + } + function H(n2, t2) { + return _3(n2), _3(t2), J(n2, t2.then(n2).many(), function(n3, t3) { + return [n3].concat(t3); + }); + } + function K(n2) { + P2(n2); + var t2 = "'" + n2 + "'"; + return e(function(r2, e2) { + var u2 = e2 + n2.length, o2 = r2.slice(e2, u2); + return o2 === n2 ? b(u2, o2) : x(e2, t2); + }); + } + function Q(n2, t2) { + !function(n3) { + if (!(n3 instanceof RegExp)) + throw new Error("not a regexp: " + n3); + for (var t3 = G(n3), r3 = 0; r3 < t3.length; r3++) { + var e2 = t3.charAt(r3); + if ("i" !== e2 && "m" !== e2 && "u" !== e2 && "s" !== e2) + throw new Error('unsupported regexp flag "' + e2 + '": ' + n3); + } + }(n2), arguments.length >= 2 ? O(t2) : t2 = 0; + var r2 = function(n3) { + return RegExp("^(?:" + n3.source + ")", G(n3)); + }(n2), u2 = "" + n2; + return e(function(n3, e2) { + var o2 = r2.exec(n3.slice(e2)); + if (o2) { + if (0 <= t2 && t2 <= o2.length) { + var i2 = o2[0], a2 = o2[t2]; + return b(e2 + i2.length, a2); + } + return x(e2, "valid match group (0 to " + o2.length + ") in " + u2); + } + return x(e2, u2); + }); + } + function X(n2) { + return e(function(t2, r2) { + return b(r2, n2); + }); + } + function Y(n2) { + return e(function(t2, r2) { + return x(r2, n2); + }); + } + function Z(n2) { + if (y(n2)) + return e(function(t2, r2) { + var e2 = n2._(t2, r2); + return e2.index = r2, e2.value = "", e2; + }); + if ("string" == typeof n2) + return Z(K(n2)); + if (n2 instanceof RegExp) + return Z(Q(n2)); + throw new Error("not a string, regexp, or parser: " + n2); + } + function $(n2) { + return _3(n2), e(function(t2, r2) { + var e2 = n2._(t2, r2), u2 = t2.slice(r2, e2.index); + return e2.status ? x(r2, 'not "' + u2 + '"') : b(r2, null); + }); + } + function nn(n2) { + return k(n2), e(function(t2, r2) { + var e2 = L(t2, r2); + return r2 < t2.length && n2(e2) ? b(r2 + 1, e2) : x(r2, "a character/byte matching " + n2); + }); + } + function tn(n2, t2) { + arguments.length < 2 && (t2 = n2, n2 = void 0); + var r2 = e(function(n3, e2) { + return r2._ = t2()._, r2._(n3, e2); + }); + return n2 ? r2.desc(n2) : r2; + } + function rn() { + return Y("fantasy-land/empty"); + } + u.parse = function(n2) { + if ("string" != typeof n2 && !w(n2)) + throw new Error(".parse must be called with a string or Buffer as its argument"); + var t2, r2 = this.skip(an)._(n2, 0); + return t2 = r2.status ? { status: true, value: r2.value } : { status: false, index: S(n2, r2.furthest), expected: r2.expected }, delete j[n2], t2; + }, u.tryParse = function(n2) { + var t2 = this.parse(n2); + if (t2.status) + return t2.value; + var r2 = N(n2, t2), e2 = new Error(r2); + throw e2.type = "ParsimmonError", e2.result = t2, e2; + }, u.assert = function(n2, t2) { + return this.chain(function(r2) { + return n2(r2) ? X(r2) : Y(t2); + }); + }, u.or = function(n2) { + return T(this, n2); + }, u.trim = function(n2) { + return this.wrap(n2, n2); + }, u.wrap = function(n2, t2) { + return J(n2, this, t2, function(n3, t3) { + return t3; + }); + }, u.thru = function(n2) { + return n2(this); + }, u.then = function(n2) { + return _3(n2), C(this, n2).map(function(n3) { + return n3[1]; + }); + }, u.many = function() { + var n2 = this; + return e(function(t2, r2) { + for (var e2 = [], u2 = void 0; ; ) { + if (!(u2 = B(n2._(t2, r2), u2)).status) + return B(b(r2, e2), u2); + if (r2 === u2.index) + throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause"); + r2 = u2.index, e2.push(u2.value); + } + }); + }, u.tieWith = function(n2) { + return P2(n2), this.map(function(t2) { + if (function(n3) { + if (!E(n3)) + throw new Error("not an array: " + n3); + }(t2), t2.length) { + P2(t2[0]); + for (var r2 = t2[0], e2 = 1; e2 < t2.length; e2++) + P2(t2[e2]), r2 += n2 + t2[e2]; + return r2; + } + return ""; + }); + }, u.tie = function() { + return this.tieWith(""); + }, u.times = function(n2, t2) { + var r2 = this; + return arguments.length < 2 && (t2 = n2), O(n2), O(t2), e(function(e2, u2) { + for (var o2 = [], i2 = void 0, a2 = void 0, f2 = 0; f2 < n2; f2 += 1) { + if (a2 = B(i2 = r2._(e2, u2), a2), !i2.status) + return a2; + u2 = i2.index, o2.push(i2.value); + } + for (; f2 < t2 && (a2 = B(i2 = r2._(e2, u2), a2), i2.status); f2 += 1) + u2 = i2.index, o2.push(i2.value); + return B(b(u2, o2), a2); + }); + }, u.result = function(n2) { + return this.map(function() { + return n2; + }); + }, u.atMost = function(n2) { + return this.times(0, n2); + }, u.atLeast = function(n2) { + return J(this.times(n2), this.many(), function(n3, t2) { + return n3.concat(t2); + }); + }, u.map = function(n2) { + k(n2); + var t2 = this; + return e(function(r2, e2) { + var u2 = t2._(r2, e2); + return u2.status ? B(b(u2.index, n2(u2.value)), u2) : u2; + }); + }, u.contramap = function(n2) { + k(n2); + var t2 = this; + return e(function(r2, e2) { + var u2 = t2.parse(n2(r2.slice(e2))); + return u2.status ? b(e2 + r2.length, u2.value) : u2; + }); + }, u.promap = function(n2, t2) { + return k(n2), k(t2), this.contramap(n2).map(t2); + }, u.skip = function(n2) { + return C(this, n2).map(function(n3) { + return n3[0]; + }); + }, u.mark = function() { + return J(en, this, en, function(n2, t2, r2) { + return { start: n2, value: t2, end: r2 }; + }); + }, u.node = function(n2) { + return J(en, this, en, function(t2, r2, e2) { + return { name: n2, value: r2, start: t2, end: e2 }; + }); + }, u.sepBy = function(n2) { + return V(this, n2); + }, u.sepBy1 = function(n2) { + return H(this, n2); + }, u.lookahead = function(n2) { + return this.skip(Z(n2)); + }, u.notFollowedBy = function(n2) { + return this.skip($(n2)); + }, u.desc = function(n2) { + E(n2) || (n2 = [n2]); + var t2 = this; + return e(function(r2, e2) { + var u2 = t2._(r2, e2); + return u2.status || (u2.expected = n2), u2; + }); + }, u.fallback = function(n2) { + return this.or(X(n2)); + }, u.ap = function(n2) { + return J(n2, this, function(n3, t2) { + return n3(t2); + }); + }, u.chain = function(n2) { + var t2 = this; + return e(function(r2, e2) { + var u2 = t2._(r2, e2); + return u2.status ? B(n2(u2.value)._(r2, u2.index), u2) : u2; + }); + }, u.concat = u.or, u.empty = rn, u.of = X, u["fantasy-land/ap"] = u.ap, u["fantasy-land/chain"] = u.chain, u["fantasy-land/concat"] = u.concat, u["fantasy-land/empty"] = u.empty, u["fantasy-land/of"] = u.of, u["fantasy-land/map"] = u.map; + var en = e(function(n2, t2) { + return b(t2, S(n2, t2)); + }), un = e(function(n2, t2) { + return t2 >= n2.length ? x(t2, "any character/byte") : b(t2 + 1, L(n2, t2)); + }), on = e(function(n2, t2) { + return b(n2.length, n2.slice(t2)); + }), an = e(function(n2, t2) { + return t2 < n2.length ? x(t2, "EOF") : b(t2, null); + }), fn = Q(/[0-9]/).desc("a digit"), cn = Q(/[0-9]*/).desc("optional digits"), sn = Q(/[a-z]/i).desc("a letter"), ln = Q(/[a-z]*/i).desc("optional letters"), hn = Q(/\s*/).desc("optional whitespace"), pn = Q(/\s+/).desc("whitespace"), dn = K("\r"), vn = K("\n"), gn = K("\r\n"), mn = T(gn, vn, dn).desc("newline"), yn = T(mn, an); + e.all = on, e.alt = T, e.any = un, e.cr = dn, e.createLanguage = function(n2) { + var t2 = {}; + for (var r2 in n2) + ({}).hasOwnProperty.call(n2, r2) && function(r3) { + t2[r3] = tn(function() { + return n2[r3](t2); + }); + }(r2); + return t2; + }, e.crlf = gn, e.custom = function(n2) { + return e(n2(b, x)); + }, e.digit = fn, e.digits = cn, e.empty = rn, e.end = yn, e.eof = an, e.fail = Y, e.formatError = N, e.index = en, e.isParser = y, e.lazy = tn, e.letter = sn, e.letters = ln, e.lf = vn, e.lookahead = Z, e.makeFailure = x, e.makeSuccess = b, e.newline = mn, e.noneOf = function(n2) { + return nn(function(t2) { + return n2.indexOf(t2) < 0; + }).desc("none of '" + n2 + "'"); + }, e.notFollowedBy = $, e.of = X, e.oneOf = function(n2) { + for (var t2 = n2.split(""), r2 = 0; r2 < t2.length; r2++) + t2[r2] = "'" + t2[r2] + "'"; + return nn(function(t3) { + return n2.indexOf(t3) >= 0; + }).desc(t2); + }, e.optWhitespace = hn, e.Parser = e, e.range = function(n2, t2) { + return nn(function(r2) { + return n2 <= r2 && r2 <= t2; + }).desc(n2 + "-" + t2); + }, e.regex = Q, e.regexp = Q, e.sepBy = V, e.sepBy1 = H, e.seq = C, e.seqMap = J, e.seqObj = function() { + for (var n2, t2 = {}, r2 = 0, u2 = (n2 = arguments, Array.prototype.slice.call(n2)), o2 = u2.length, i2 = 0; i2 < o2; i2 += 1) { + var a2 = u2[i2]; + if (!y(a2)) { + if (E(a2) && 2 === a2.length && "string" == typeof a2[0] && y(a2[1])) { + var f2 = a2[0]; + if (Object.prototype.hasOwnProperty.call(t2, f2)) + throw new Error("seqObj: duplicate key " + f2); + t2[f2] = true, r2++; + continue; + } + throw new Error("seqObj arguments must be parsers or [string, parser] array pairs."); + } + } + if (0 === r2) + throw new Error("seqObj expects at least one named parser, found zero"); + return e(function(n3, t3) { + for (var r3, e2 = {}, i3 = 0; i3 < o2; i3 += 1) { + var a3, f3; + if (E(u2[i3]) ? (a3 = u2[i3][0], f3 = u2[i3][1]) : (a3 = null, f3 = u2[i3]), !(r3 = B(f3._(n3, t3), r3)).status) + return r3; + a3 && (e2[a3] = r3.value), t3 = r3.index; + } + return B(b(t3, e2), r3); + }); + }, e.string = K, e.succeed = X, e.takeWhile = function(n2) { + return k(n2), e(function(t2, r2) { + for (var e2 = r2; e2 < t2.length && n2(L(t2, e2)); ) + e2++; + return b(e2, t2.slice(r2, e2)); + }); + }, e.test = nn, e.whitespace = pn, e["fantasy-land/empty"] = rn, e["fantasy-land/of"] = X, e.Binary = { bitSeq: l, bitSeqObj: function(n2) { + s(); + var t2 = {}, r2 = 0, e2 = a(function(n3) { + if (E(n3)) { + var e3 = n3; + if (2 !== e3.length) + throw new Error("[" + e3.join(", ") + "] should be length 2, got length " + e3.length); + if (P2(e3[0]), O(e3[1]), Object.prototype.hasOwnProperty.call(t2, e3[0])) + throw new Error("duplicate key in bitSeqObj: " + e3[0]); + return t2[e3[0]] = true, r2++, e3; + } + return O(n3), [null, n3]; + }, n2); + if (r2 < 1) + throw new Error("bitSeqObj expects at least one named pair, got [" + n2.join(", ") + "]"); + var u2 = a(function(n3) { + return n3[0]; + }, e2); + return l(a(function(n3) { + return n3[1]; + }, e2)).map(function(n3) { + return i(function(n4, t3) { + return null !== t3[0] && (n4[t3[0]] = t3[1]), n4; + }, {}, a(function(t3, r3) { + return [t3, n3[r3]]; + }, u2)); + }); + }, byte: function(n2) { + if (s(), O(n2), n2 > 255) + throw new Error("Value specified to byte constructor (" + n2 + "=0x" + n2.toString(16) + ") is larger in value than a single byte."); + var t2 = (n2 > 15 ? "0x" : "0x0") + n2.toString(16); + return e(function(r2, e2) { + var u2 = L(r2, e2); + return u2 === n2 ? b(e2 + 1, u2) : x(e2, t2); + }); + }, buffer: function(n2) { + return h("buffer", n2).map(function(n3) { + return Buffer.from(n3); + }); + }, encodedString: function(n2, t2) { + return h("string", t2).map(function(t3) { + return t3.toString(n2); + }); + }, uintBE: d, uint8BE: d(1), uint16BE: d(2), uint32BE: d(4), uintLE: v, uint8LE: v(1), uint16LE: v(2), uint32LE: v(4), intBE: g, int8BE: g(1), int16BE: g(2), int32BE: g(4), intLE: m, int8LE: m(1), int16LE: m(2), int32LE: m(4), floatBE: h("floatBE", 4).map(function(n2) { + return n2.readFloatBE(0); + }), floatLE: h("floatLE", 4).map(function(n2) { + return n2.readFloatLE(0); + }), doubleBE: h("doubleBE", 8).map(function(n2) { + return n2.readDoubleBE(0); + }), doubleLE: h("doubleLE", 8).map(function(n2) { + return n2.readDoubleLE(0); + }) }, n.exports = e; + }]); + }); + } +}); + +// node_modules/react/cjs/react-jsx-runtime.development.js +var require_react_jsx_runtime_development = __commonJS({ + "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + var React7 = require_react(); + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var ReactSharedInternals = React7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + function error(format) { + { + { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var enableScopeAPI = false; + var enableCacheElement = false; + var enableTransitionTracing = false; + var enableLegacyHidden = false; + var enableDebugTracing = false; + var REACT_MODULE_REFERENCE; + { + REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); + } + function isValidElementType(type) { + if (typeof type === "string" || typeof type === "function") { + return true; + } + if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { + return true; + } + if (typeof type === "object" && type !== null) { + if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object + // types supported by any Flight configuration anywhere since + // we don't know which Flight build this will end up being used + // with. + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { + return true; + } + } + return false; + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + var assign = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample2) { + if (sample2 && control && typeof sample2.stack === "string") { + var sampleLines = sample2.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component6) { + var prototype = Component6.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var loggedTypeFailures = {}; + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame.setExtraStackFrame(null); + } + } + } + function checkPropTypes(typeSpecs, values2, location, componentName, element) { + { + var has3 = Function.call.bind(hasOwnProperty2); + for (var typeSpecName in typeSpecs) { + if (has3(typeSpecs, typeSpecName)) { + var error$1 = void 0; + try { + if (typeof typeSpecs[typeSpecName] !== "function") { + var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); + err.name = "Invariant Violation"; + throw err; + } + error$1 = typeSpecs[typeSpecName](values2, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); + } catch (ex) { + error$1 = ex; + } + if (error$1 && !(error$1 instanceof Error)) { + setCurrentlyValidatingElement(element); + error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); + setCurrentlyValidatingElement(null); + } + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { + loggedTypeFailures[error$1.message] = true; + setCurrentlyValidatingElement(element); + error("Failed %s type: %s", location, error$1.message); + setCurrentlyValidatingElement(null); + } + } + } + } + } + var isArrayImpl = Array.isArray; + function isArray(a) { + return isArrayImpl(a); + } + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + var RESERVED_PROPS = { + key: true, + ref: true, + __self: true, + __source: true + }; + var specialPropKeyWarningShown; + var specialPropRefWarningShown; + var didWarnAboutStringRefs; + { + didWarnAboutStringRefs = {}; + } + function hasValidRef(config) { + { + if (hasOwnProperty2.call(config, "ref")) { + var getter = Object.getOwnPropertyDescriptor(config, "ref").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.ref !== void 0; + } + function hasValidKey(config) { + { + if (hasOwnProperty2.call(config, "key")) { + var getter = Object.getOwnPropertyDescriptor(config, "key").get; + if (getter && getter.isReactWarning) { + return false; + } + } + } + return config.key !== void 0; + } + function warnIfStringRefCannotBeAutoConverted(config, self2) { + { + if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); + if (!didWarnAboutStringRefs[componentName]) { + error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); + didWarnAboutStringRefs[componentName] = true; + } + } + } + } + function defineKeyPropWarningGetter(props, displayName) { + { + var warnAboutAccessingKey = function() { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, "key", { + get: warnAboutAccessingKey, + configurable: true + }); + } + } + function defineRefPropWarningGetter(props, displayName) { + { + var warnAboutAccessingRef = function() { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, "ref", { + get: warnAboutAccessingRef, + configurable: true + }); + } + } + var ReactElement = function(type, key, ref, self2, source, owner, props) { + var element = { + // This tag allows us to uniquely identify this as a React Element + $$typeof: REACT_ELEMENT_TYPE, + // Built-in properties that belong on the element + type, + key, + ref, + props, + // Record the component responsible for creating this element. + _owner: owner + }; + { + element._store = {}; + Object.defineProperty(element._store, "validated", { + configurable: false, + enumerable: false, + writable: true, + value: false + }); + Object.defineProperty(element, "_self", { + configurable: false, + enumerable: false, + writable: false, + value: self2 + }); + Object.defineProperty(element, "_source", { + configurable: false, + enumerable: false, + writable: false, + value: source + }); + if (Object.freeze) { + Object.freeze(element.props); + Object.freeze(element); + } + } + return element; + }; + function jsxDEV(type, config, maybeKey, source, self2) { + { + var propName; + var props = {}; + var key = null; + var ref = null; + if (maybeKey !== void 0) { + { + checkKeyStringCoercion(maybeKey); + } + key = "" + maybeKey; + } + if (hasValidKey(config)) { + { + checkKeyStringCoercion(config.key); + } + key = "" + config.key; + } + if (hasValidRef(config)) { + ref = config.ref; + warnIfStringRefCannotBeAutoConverted(config, self2); + } + for (propName in config) { + if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (props[propName] === void 0) { + props[propName] = defaultProps[propName]; + } + } + } + if (key || ref) { + var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } + } + return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props); + } + } + var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; + var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; + function setCurrentlyValidatingElement$1(element) { + { + if (element) { + var owner = element._owner; + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); + } else { + ReactDebugCurrentFrame$1.setExtraStackFrame(null); + } + } + } + var propTypesMisspellWarningShown; + { + propTypesMisspellWarningShown = false; + } + function isValidElement(object2) { + { + return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE; + } + } + function getDeclarationErrorAddendum() { + { + if (ReactCurrentOwner$1.current) { + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); + if (name) { + return "\n\nCheck the render method of `" + name + "`."; + } + } + return ""; + } + } + function getSourceInfoErrorAddendum(source) { + { + if (source !== void 0) { + var fileName = source.fileName.replace(/^.*[\\\/]/, ""); + var lineNumber = source.lineNumber; + return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; + } + return ""; + } + } + var ownerHasKeyUseWarning = {}; + function getCurrentComponentErrorInfo(parentType) { + { + var info = getDeclarationErrorAddendum(); + if (!info) { + var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; + if (parentName) { + info = "\n\nCheck the top-level render call using <" + parentName + ">."; + } + } + return info; + } + } + function validateExplicitKey(element, parentType) { + { + if (!element._store || element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { + return; + } + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; + var childOwner = ""; + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; + } + setCurrentlyValidatingElement$1(element); + error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); + setCurrentlyValidatingElement$1(null); + } + } + function validateChildKeys(node, parentType) { + { + if (typeof node !== "object") { + return; + } + if (isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (isValidElement(node)) { + if (node._store) { + node._store.validated = true; + } + } else if (node) { + var iteratorFn = getIteratorFn(node); + if (typeof iteratorFn === "function") { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } + } + } + } + function validatePropTypes(element) { + { + var type = element.type; + if (type === null || type === void 0 || typeof type === "string") { + return; + } + var propTypes; + if (typeof type === "function") { + propTypes = type.propTypes; + } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. + // Inner props are checked in the reconciler. + type.$$typeof === REACT_MEMO_TYPE)) { + propTypes = type.propTypes; + } else { + return; + } + if (propTypes) { + var name = getComponentNameFromType(type); + checkPropTypes(propTypes, element.props, "prop", name, element); + } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { + propTypesMisspellWarningShown = true; + var _name = getComponentNameFromType(type); + error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); + } + if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { + error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); + } + } + } + function validateFragmentProps(fragment) { + { + var keys2 = Object.keys(fragment.props); + for (var i = 0; i < keys2.length; i++) { + var key = keys2[i]; + if (key !== "children" && key !== "key") { + setCurrentlyValidatingElement$1(fragment); + error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); + setCurrentlyValidatingElement$1(null); + break; + } + } + if (fragment.ref !== null) { + setCurrentlyValidatingElement$1(fragment); + error("Invalid attribute `ref` supplied to `React.Fragment`."); + setCurrentlyValidatingElement$1(null); + } + } + } + var didWarnAboutKeySpread = {}; + function jsxWithValidation(type, props, key, isStaticChildren, source, self2) { + { + var validType = isValidElementType(type); + if (!validType) { + var info = ""; + if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { + info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; + } + var sourceInfo = getSourceInfoErrorAddendum(source); + if (sourceInfo) { + info += sourceInfo; + } else { + info += getDeclarationErrorAddendum(); + } + var typeString; + if (type === null) { + typeString = "null"; + } else if (isArray(type)) { + typeString = "array"; + } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { + typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; + info = " Did you accidentally export a JSX literal instead of a component?"; + } else { + typeString = typeof type; + } + error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); + } + var element = jsxDEV(type, props, key, source, self2); + if (element == null) { + return element; + } + if (validType) { + var children = props.children; + if (children !== void 0) { + if (isStaticChildren) { + if (isArray(children)) { + for (var i = 0; i < children.length; i++) { + validateChildKeys(children[i], type); + } + if (Object.freeze) { + Object.freeze(children); + } + } else { + error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); + } + } else { + validateChildKeys(children, type); + } + } + } + { + if (hasOwnProperty2.call(props, "key")) { + var componentName = getComponentNameFromType(type); + var keys2 = Object.keys(props).filter(function(k) { + return k !== "key"; + }); + var beforeExample = keys2.length > 0 ? "{key: someKey, " + keys2.join(": ..., ") + ": ...}" : "{key: someKey}"; + if (!didWarnAboutKeySpread[componentName + beforeExample]) { + var afterExample = keys2.length > 0 ? "{" + keys2.join(": ..., ") + ": ...}" : "{}"; + error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); + didWarnAboutKeySpread[componentName + beforeExample] = true; + } + } + } + if (type === REACT_FRAGMENT_TYPE) { + validateFragmentProps(element); + } else { + validatePropTypes(element); + } + return element; + } + } + function jsxWithValidationStatic(type, props, key) { + { + return jsxWithValidation(type, props, key, true); + } + } + function jsxWithValidationDynamic(type, props, key) { + { + return jsxWithValidation(type, props, key, false); + } + } + var jsx8 = jsxWithValidationDynamic; + var jsxs5 = jsxWithValidationStatic; + exports.Fragment = REACT_FRAGMENT_TYPE; + exports.jsx = jsx8; + exports.jsxs = jsxs5; + })(); + } + } +}); + +// node_modules/react/jsx-runtime.js +var require_jsx_runtime = __commonJS({ + "node_modules/react/jsx-runtime.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_react_jsx_runtime_development(); + } + } +}); + +// node_modules/scheduler/cjs/scheduler.development.js +var require_scheduler_development = __commonJS({ + "node_modules/scheduler/cjs/scheduler.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var enableSchedulerDebugging = false; + var enableProfiling = false; + var frameYieldMs = 5; + function push2(heap, node) { + var index = heap.length; + heap.push(node); + siftUp(heap, node, index); + } + function peek(heap) { + return heap.length === 0 ? null : heap[0]; + } + function pop(heap) { + if (heap.length === 0) { + return null; + } + var first2 = heap[0]; + var last2 = heap.pop(); + if (last2 !== first2) { + heap[0] = last2; + siftDown(heap, last2, 0); + } + return first2; + } + function siftUp(heap, node, i) { + var index = i; + while (index > 0) { + var parentIndex = index - 1 >>> 1; + var parent = heap[parentIndex]; + if (compare(parent, node) > 0) { + heap[parentIndex] = node; + heap[index] = parent; + index = parentIndex; + } else { + return; + } + } + } + function siftDown(heap, node, i) { + var index = i; + var length = heap.length; + var halfLength = length >>> 1; + while (index < halfLength) { + var leftIndex = (index + 1) * 2 - 1; + var left = heap[leftIndex]; + var rightIndex = leftIndex + 1; + var right = heap[rightIndex]; + if (compare(left, node) < 0) { + if (rightIndex < length && compare(right, left) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + heap[index] = left; + heap[leftIndex] = node; + index = leftIndex; + } + } else if (rightIndex < length && compare(right, node) < 0) { + heap[index] = right; + heap[rightIndex] = node; + index = rightIndex; + } else { + return; + } + } + } + function compare(a, b) { + var diff = a.sortIndex - b.sortIndex; + return diff !== 0 ? diff : a.id - b.id; + } + var ImmediatePriority = 1; + var UserBlockingPriority = 2; + var NormalPriority = 3; + var LowPriority = 4; + var IdlePriority = 5; + function markTaskErrored(task, ms) { + } + var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; + if (hasPerformanceNow) { + var localPerformance = performance; + exports.unstable_now = function() { + return localPerformance.now(); + }; + } else { + var localDate = Date; + var initialTime = localDate.now(); + exports.unstable_now = function() { + return localDate.now() - initialTime; + }; + } + var maxSigned31BitInt = 1073741823; + var IMMEDIATE_PRIORITY_TIMEOUT = -1; + var USER_BLOCKING_PRIORITY_TIMEOUT = 250; + var NORMAL_PRIORITY_TIMEOUT = 5e3; + var LOW_PRIORITY_TIMEOUT = 1e4; + var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; + var taskQueue = []; + var timerQueue = []; + var taskIdCounter = 1; + var currentTask = null; + var currentPriorityLevel = NormalPriority; + var isPerformingWork = false; + var isHostCallbackScheduled = false; + var isHostTimeoutScheduled = false; + var localSetTimeout = typeof setTimeout === "function" ? setTimeout : null; + var localClearTimeout = typeof clearTimeout === "function" ? clearTimeout : null; + var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null; + var isInputPending = typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null; + function advanceTimers(currentTime) { + var timer = peek(timerQueue); + while (timer !== null) { + if (timer.callback === null) { + pop(timerQueue); + } else if (timer.startTime <= currentTime) { + pop(timerQueue); + timer.sortIndex = timer.expirationTime; + push2(taskQueue, timer); + } else { + return; + } + timer = peek(timerQueue); + } + } + function handleTimeout(currentTime) { + isHostTimeoutScheduled = false; + advanceTimers(currentTime); + if (!isHostCallbackScheduled) { + if (peek(taskQueue) !== null) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + } + } + } + function flushWork(hasTimeRemaining, initialTime2) { + isHostCallbackScheduled = false; + if (isHostTimeoutScheduled) { + isHostTimeoutScheduled = false; + cancelHostTimeout(); + } + isPerformingWork = true; + var previousPriorityLevel = currentPriorityLevel; + try { + if (enableProfiling) { + try { + return workLoop(hasTimeRemaining, initialTime2); + } catch (error) { + if (currentTask !== null) { + var currentTime = exports.unstable_now(); + markTaskErrored(currentTask, currentTime); + currentTask.isQueued = false; + } + throw error; + } + } else { + return workLoop(hasTimeRemaining, initialTime2); + } + } finally { + currentTask = null; + currentPriorityLevel = previousPriorityLevel; + isPerformingWork = false; + } + } + function workLoop(hasTimeRemaining, initialTime2) { + var currentTime = initialTime2; + advanceTimers(currentTime); + currentTask = peek(taskQueue); + while (currentTask !== null && !enableSchedulerDebugging) { + if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { + break; + } + var callback = currentTask.callback; + if (typeof callback === "function") { + currentTask.callback = null; + currentPriorityLevel = currentTask.priorityLevel; + var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; + var continuationCallback = callback(didUserCallbackTimeout); + currentTime = exports.unstable_now(); + if (typeof continuationCallback === "function") { + currentTask.callback = continuationCallback; + } else { + if (currentTask === peek(taskQueue)) { + pop(taskQueue); + } + } + advanceTimers(currentTime); + } else { + pop(taskQueue); + } + currentTask = peek(taskQueue); + } + if (currentTask !== null) { + return true; + } else { + var firstTimer = peek(timerQueue); + if (firstTimer !== null) { + requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); + } + return false; + } + } + function unstable_runWithPriority(priorityLevel, eventHandler) { + switch (priorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + case LowPriority: + case IdlePriority: + break; + default: + priorityLevel = NormalPriority; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_next(eventHandler) { + var priorityLevel; + switch (currentPriorityLevel) { + case ImmediatePriority: + case UserBlockingPriority: + case NormalPriority: + priorityLevel = NormalPriority; + break; + default: + priorityLevel = currentPriorityLevel; + break; + } + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = priorityLevel; + try { + return eventHandler(); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + } + function unstable_wrapCallback(callback) { + var parentPriorityLevel = currentPriorityLevel; + return function() { + var previousPriorityLevel = currentPriorityLevel; + currentPriorityLevel = parentPriorityLevel; + try { + return callback.apply(this, arguments); + } finally { + currentPriorityLevel = previousPriorityLevel; + } + }; + } + function unstable_scheduleCallback(priorityLevel, callback, options) { + var currentTime = exports.unstable_now(); + var startTime2; + if (typeof options === "object" && options !== null) { + var delay = options.delay; + if (typeof delay === "number" && delay > 0) { + startTime2 = currentTime + delay; + } else { + startTime2 = currentTime; + } + } else { + startTime2 = currentTime; + } + var timeout; + switch (priorityLevel) { + case ImmediatePriority: + timeout = IMMEDIATE_PRIORITY_TIMEOUT; + break; + case UserBlockingPriority: + timeout = USER_BLOCKING_PRIORITY_TIMEOUT; + break; + case IdlePriority: + timeout = IDLE_PRIORITY_TIMEOUT; + break; + case LowPriority: + timeout = LOW_PRIORITY_TIMEOUT; + break; + case NormalPriority: + default: + timeout = NORMAL_PRIORITY_TIMEOUT; + break; + } + var expirationTime = startTime2 + timeout; + var newTask = { + id: taskIdCounter++, + callback, + priorityLevel, + startTime: startTime2, + expirationTime, + sortIndex: -1 + }; + if (startTime2 > currentTime) { + newTask.sortIndex = startTime2; + push2(timerQueue, newTask); + if (peek(taskQueue) === null && newTask === peek(timerQueue)) { + if (isHostTimeoutScheduled) { + cancelHostTimeout(); + } else { + isHostTimeoutScheduled = true; + } + requestHostTimeout(handleTimeout, startTime2 - currentTime); + } + } else { + newTask.sortIndex = expirationTime; + push2(taskQueue, newTask); + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + return newTask; + } + function unstable_pauseExecution() { + } + function unstable_continueExecution() { + if (!isHostCallbackScheduled && !isPerformingWork) { + isHostCallbackScheduled = true; + requestHostCallback(flushWork); + } + } + function unstable_getFirstCallbackNode() { + return peek(taskQueue); + } + function unstable_cancelCallback(task) { + task.callback = null; + } + function unstable_getCurrentPriorityLevel() { + return currentPriorityLevel; + } + var isMessageLoopRunning = false; + var scheduledHostCallback = null; + var taskTimeoutID = -1; + var frameInterval = frameYieldMs; + var startTime = -1; + function shouldYieldToHost() { + var timeElapsed = exports.unstable_now() - startTime; + if (timeElapsed < frameInterval) { + return false; + } + return true; + } + function requestPaint() { + } + function forceFrameRate(fps) { + if (fps < 0 || fps > 125) { + console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); + return; + } + if (fps > 0) { + frameInterval = Math.floor(1e3 / fps); + } else { + frameInterval = frameYieldMs; + } + } + var performWorkUntilDeadline = function() { + if (scheduledHostCallback !== null) { + var currentTime = exports.unstable_now(); + startTime = currentTime; + var hasTimeRemaining = true; + var hasMoreWork = true; + try { + hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); + } finally { + if (hasMoreWork) { + schedulePerformWorkUntilDeadline(); + } else { + isMessageLoopRunning = false; + scheduledHostCallback = null; + } + } + } else { + isMessageLoopRunning = false; + } + }; + var schedulePerformWorkUntilDeadline; + if (typeof localSetImmediate === "function") { + schedulePerformWorkUntilDeadline = function() { + localSetImmediate(performWorkUntilDeadline); + }; + } else if (typeof MessageChannel !== "undefined") { + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = performWorkUntilDeadline; + schedulePerformWorkUntilDeadline = function() { + port.postMessage(null); + }; + } else { + schedulePerformWorkUntilDeadline = function() { + localSetTimeout(performWorkUntilDeadline, 0); + }; + } + function requestHostCallback(callback) { + scheduledHostCallback = callback; + if (!isMessageLoopRunning) { + isMessageLoopRunning = true; + schedulePerformWorkUntilDeadline(); + } + } + function requestHostTimeout(callback, ms) { + taskTimeoutID = localSetTimeout(function() { + callback(exports.unstable_now()); + }, ms); + } + function cancelHostTimeout() { + localClearTimeout(taskTimeoutID); + taskTimeoutID = -1; + } + var unstable_requestPaint = requestPaint; + var unstable_Profiling = null; + exports.unstable_IdlePriority = IdlePriority; + exports.unstable_ImmediatePriority = ImmediatePriority; + exports.unstable_LowPriority = LowPriority; + exports.unstable_NormalPriority = NormalPriority; + exports.unstable_Profiling = unstable_Profiling; + exports.unstable_UserBlockingPriority = UserBlockingPriority; + exports.unstable_cancelCallback = unstable_cancelCallback; + exports.unstable_continueExecution = unstable_continueExecution; + exports.unstable_forceFrameRate = forceFrameRate; + exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; + exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; + exports.unstable_next = unstable_next; + exports.unstable_pauseExecution = unstable_pauseExecution; + exports.unstable_requestPaint = unstable_requestPaint; + exports.unstable_runWithPriority = unstable_runWithPriority; + exports.unstable_scheduleCallback = unstable_scheduleCallback; + exports.unstable_shouldYield = shouldYieldToHost; + exports.unstable_wrapCallback = unstable_wrapCallback; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); + } + })(); + } + } +}); + +// node_modules/scheduler/index.js +var require_scheduler = __commonJS({ + "node_modules/scheduler/index.js"(exports, module2) { + "use strict"; + if (false) { + module2.exports = null; + } else { + module2.exports = require_scheduler_development(); + } + } +}); + +// node_modules/react-dom/cjs/react-dom.development.js +var require_react_dom_development = __commonJS({ + "node_modules/react-dom/cjs/react-dom.development.js"(exports) { + "use strict"; + if (true) { + (function() { + "use strict"; + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { + __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); + } + var React7 = require_react(); + var Scheduler = require_scheduler(); + var ReactSharedInternals = React7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + var suppressWarning = false; + function setSuppressWarning(newSuppressWarning) { + { + suppressWarning = newSuppressWarning; + } + } + function warn(format) { + { + if (!suppressWarning) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + printWarning("warn", format, args); + } + } + } + function error(format) { + { + if (!suppressWarning) { + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + printWarning("error", format, args); + } + } + } + function printWarning(level, format, args) { + { + var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; + var stack = ReactDebugCurrentFrame2.getStackAddendum(); + if (stack !== "") { + format += "%s"; + args = args.concat([stack]); + } + var argsWithFormat = args.map(function(item) { + return String(item); + }); + argsWithFormat.unshift("Warning: " + format); + Function.prototype.apply.call(console[level], console, argsWithFormat); + } + } + var FunctionComponent = 0; + var ClassComponent = 1; + var IndeterminateComponent = 2; + var HostRoot = 3; + var HostPortal = 4; + var HostComponent = 5; + var HostText = 6; + var Fragment = 7; + var Mode = 8; + var ContextConsumer = 9; + var ContextProvider = 10; + var ForwardRef = 11; + var Profiler = 12; + var SuspenseComponent = 13; + var MemoComponent = 14; + var SimpleMemoComponent = 15; + var LazyComponent = 16; + var IncompleteClassComponent = 17; + var DehydratedFragment = 18; + var SuspenseListComponent = 19; + var ScopeComponent = 21; + var OffscreenComponent = 22; + var LegacyHiddenComponent = 23; + var CacheComponent = 24; + var TracingMarkerComponent = 25; + var enableClientRenderFallbackOnTextMismatch = true; + var enableNewReconciler = false; + var enableLazyContextPropagation = false; + var enableLegacyHidden = false; + var enableSuspenseAvoidThisFallback = false; + var disableCommentsAsDOMContainers = true; + var enableCustomElementPropertySupport = false; + var warnAboutStringRefs = true; + var enableSchedulingProfiler = true; + var enableProfilerTimer = true; + var enableProfilerCommitHooks = true; + var allNativeEvents = /* @__PURE__ */ new Set(); + var registrationNameDependencies = {}; + var possibleRegistrationNames = {}; + function registerTwoPhaseEvent(registrationName, dependencies) { + registerDirectEvent(registrationName, dependencies); + registerDirectEvent(registrationName + "Capture", dependencies); + } + function registerDirectEvent(registrationName, dependencies) { + { + if (registrationNameDependencies[registrationName]) { + error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); + } + } + registrationNameDependencies[registrationName] = dependencies; + { + var lowerCasedName = registrationName.toLowerCase(); + possibleRegistrationNames[lowerCasedName] = registrationName; + if (registrationName === "onDoubleClick") { + possibleRegistrationNames.ondblclick = registrationName; + } + } + for (var i = 0; i < dependencies.length; i++) { + allNativeEvents.add(dependencies[i]); + } + } + var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + function typeName(value) { + { + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; + return type; + } + } + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + function testStringCoercion(value) { + return "" + value; + } + function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function checkPropStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); + return testStringCoercion(value); + } + } + } + function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + function checkFormFieldValueStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", typeName(value)); + return testStringCoercion(value); + } + } + } + var RESERVED = 0; + var STRING = 1; + var BOOLEANISH_STRING = 2; + var BOOLEAN = 3; + var OVERLOADED_BOOLEAN = 4; + var NUMERIC = 5; + var POSITIVE_NUMERIC = 6; + var ATTRIBUTE_NAME_START_CHAR = ":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"; + var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; + var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); + var illegalAttributeNameCache = {}; + var validatedAttributeNameCache = {}; + function isAttributeNameSafe(attributeName) { + if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName)) { + return true; + } + if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName)) { + return false; + } + if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { + validatedAttributeNameCache[attributeName] = true; + return true; + } + illegalAttributeNameCache[attributeName] = true; + { + error("Invalid attribute name: `%s`", attributeName); + } + return false; + } + function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null) { + return propertyInfo.type === RESERVED; + } + if (isCustomComponentTag) { + return false; + } + if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { + return true; + } + return false; + } + function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { + if (propertyInfo !== null && propertyInfo.type === RESERVED) { + return false; + } + switch (typeof value) { + case "function": + case "symbol": + return true; + case "boolean": { + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + return !propertyInfo.acceptsBooleans; + } else { + var prefix2 = name.toLowerCase().slice(0, 5); + return prefix2 !== "data-" && prefix2 !== "aria-"; + } + } + default: + return false; + } + } + function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { + if (value === null || typeof value === "undefined") { + return true; + } + if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { + return true; + } + if (isCustomComponentTag) { + return false; + } + if (propertyInfo !== null) { + switch (propertyInfo.type) { + case BOOLEAN: + return !value; + case OVERLOADED_BOOLEAN: + return value === false; + case NUMERIC: + return isNaN(value); + case POSITIVE_NUMERIC: + return isNaN(value) || value < 1; + } + } + return false; + } + function getPropertyInfo(name) { + return properties.hasOwnProperty(name) ? properties[name] : null; + } + function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { + this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; + this.attributeName = attributeName; + this.attributeNamespace = attributeNamespace; + this.mustUseProperty = mustUseProperty; + this.propertyName = name; + this.type = type; + this.sanitizeURL = sanitizeURL2; + this.removeEmptyString = removeEmptyString; + } + var properties = {}; + var reservedProps = [ + "children", + "dangerouslySetInnerHTML", + // TODO: This prevents the assignment of defaultValue to regular + // elements (not just inputs). Now that ReactDOMInput assigns to the + // defaultValue property -- do we need this? + "defaultValue", + "defaultChecked", + "innerHTML", + "suppressContentEditableWarning", + "suppressHydrationWarning", + "style" + ]; + reservedProps.forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + RESERVED, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { + var name = _ref[0], attributeName = _ref[1]; + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEANISH_STRING, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "allowFullScreen", + "async", + // Note: there is a special case that prevents it from being written to the DOM + // on the client side because the browsers are inconsistent. Instead we call focus(). + "autoFocus", + "autoPlay", + "controls", + "default", + "defer", + "disabled", + "disablePictureInPicture", + "disableRemotePlayback", + "formNoValidate", + "hidden", + "loop", + "noModule", + "noValidate", + "open", + "playsInline", + "readOnly", + "required", + "reversed", + "scoped", + "seamless", + // Microdata + "itemScope" + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "checked", + // Note: `option.selected` is not updated if `select.multiple` is + // disabled with `removeAttribute`. We have special logic for handling this. + "multiple", + "muted", + "selected" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + BOOLEAN, + true, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "capture", + "download" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + OVERLOADED_BOOLEAN, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "cols", + "rows", + "size", + "span" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + POSITIVE_NUMERIC, + false, + // mustUseProperty + name, + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + ["rowSpan", "start"].forEach(function(name) { + properties[name] = new PropertyInfoRecord( + name, + NUMERIC, + false, + // mustUseProperty + name.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + var CAMELIZE = /[\-\:]([a-z])/g; + var capitalize = function(token) { + return token[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" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + [ + "xlink:actuate", + "xlink:arcrole", + "xlink:role", + "xlink:show", + "xlink:title", + "xlink:type" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + "http://www.w3.org/1999/xlink", + false, + // sanitizeURL + false + ); + }); + [ + "xml:base", + "xml:lang", + "xml:space" + // NOTE: if you add a camelCased prop to this list, + // you'll need to set attributeName to name.toLowerCase() + // instead in the assignment below. + ].forEach(function(attributeName) { + var name = attributeName.replace(CAMELIZE, capitalize); + properties[name] = new PropertyInfoRecord( + name, + STRING, + false, + // mustUseProperty + attributeName, + "http://www.w3.org/XML/1998/namespace", + false, + // sanitizeURL + false + ); + }); + ["tabIndex", "crossOrigin"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, + // mustUseProperty + attributeName.toLowerCase(), + // attributeName + null, + // attributeNamespace + false, + // sanitizeURL + false + ); + }); + var xlinkHref = "xlinkHref"; + properties[xlinkHref] = new PropertyInfoRecord( + "xlinkHref", + STRING, + false, + // mustUseProperty + "xlink:href", + "http://www.w3.org/1999/xlink", + true, + // sanitizeURL + false + ); + ["src", "href", "action", "formAction"].forEach(function(attributeName) { + properties[attributeName] = new PropertyInfoRecord( + attributeName, + STRING, + false, + // mustUseProperty + attributeName.toLowerCase(), + // attributeName + null, + // attributeNamespace + true, + // sanitizeURL + true + ); + }); + var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; + var didWarn = false; + function sanitizeURL(url) { + { + if (!didWarn && isJavaScriptProtocol.test(url)) { + didWarn = true; + error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); + } + } + } + function getValueForProperty(node, name, expected, propertyInfo) { + { + if (propertyInfo.mustUseProperty) { + var propertyName = propertyInfo.propertyName; + return node[propertyName]; + } else { + { + checkAttributeStringCoercion(expected, name); + } + if (propertyInfo.sanitizeURL) { + sanitizeURL("" + expected); + } + var attributeName = propertyInfo.attributeName; + var stringValue = null; + if (propertyInfo.type === OVERLOADED_BOOLEAN) { + if (node.hasAttribute(attributeName)) { + var value = node.getAttribute(attributeName); + if (value === "") { + return true; + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return value; + } + if (value === "" + expected) { + return expected; + } + return value; + } + } else if (node.hasAttribute(attributeName)) { + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return node.getAttribute(attributeName); + } + if (propertyInfo.type === BOOLEAN) { + return expected; + } + stringValue = node.getAttribute(attributeName); + } + if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { + return stringValue === null ? expected : stringValue; + } else if (stringValue === "" + expected) { + return expected; + } else { + return stringValue; + } + } + } + } + function getValueForAttribute(node, name, expected, isCustomComponentTag) { + { + if (!isAttributeNameSafe(name)) { + return; + } + if (!node.hasAttribute(name)) { + return expected === void 0 ? void 0 : null; + } + var value = node.getAttribute(name); + { + checkAttributeStringCoercion(expected, name); + } + if (value === "" + expected) { + return expected; + } + return value; + } + } + function setValueForProperty(node, name, value, isCustomComponentTag) { + var propertyInfo = getPropertyInfo(name); + if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { + return; + } + if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { + value = null; + } + if (isCustomComponentTag || propertyInfo === null) { + if (isAttributeNameSafe(name)) { + var _attributeName = name; + if (value === null) { + node.removeAttribute(_attributeName); + } else { + { + checkAttributeStringCoercion(value, name); + } + node.setAttribute(_attributeName, "" + value); + } + } + return; + } + var mustUseProperty = propertyInfo.mustUseProperty; + if (mustUseProperty) { + var propertyName = propertyInfo.propertyName; + if (value === null) { + var type = propertyInfo.type; + node[propertyName] = type === BOOLEAN ? false : ""; + } else { + node[propertyName] = value; + } + return; + } + var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; + if (value === null) { + node.removeAttribute(attributeName); + } else { + var _type = propertyInfo.type; + var attributeValue; + if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { + attributeValue = ""; + } else { + { + { + checkAttributeStringCoercion(value, attributeName); + } + attributeValue = "" + value; + } + if (propertyInfo.sanitizeURL) { + sanitizeURL(attributeValue.toString()); + } + } + if (attributeNamespace) { + node.setAttributeNS(attributeNamespace, attributeName, attributeValue); + } else { + node.setAttribute(attributeName, attributeValue); + } + } + } + var REACT_ELEMENT_TYPE = Symbol.for("react.element"); + var REACT_PORTAL_TYPE = Symbol.for("react.portal"); + var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); + var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); + var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); + var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); + var REACT_CONTEXT_TYPE = Symbol.for("react.context"); + var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); + var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); + var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); + var REACT_MEMO_TYPE = Symbol.for("react.memo"); + var REACT_LAZY_TYPE = Symbol.for("react.lazy"); + var REACT_SCOPE_TYPE = Symbol.for("react.scope"); + var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"); + var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); + var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); + var REACT_CACHE_TYPE = Symbol.for("react.cache"); + var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"); + var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = "@@iterator"; + function getIteratorFn(maybeIterable) { + if (maybeIterable === null || typeof maybeIterable !== "object") { + return null; + } + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; + if (typeof maybeIterator === "function") { + return maybeIterator; + } + return null; + } + var assign = Object.assign; + var disabledDepth = 0; + var prevLog; + var prevInfo; + var prevWarn; + var prevError; + var prevGroup; + var prevGroupCollapsed; + var prevGroupEnd; + function disabledLog() { + } + disabledLog.__reactDisabledLog = true; + function disableLogs() { + { + if (disabledDepth === 0) { + prevLog = console.log; + prevInfo = console.info; + prevWarn = console.warn; + prevError = console.error; + prevGroup = console.group; + prevGroupCollapsed = console.groupCollapsed; + prevGroupEnd = console.groupEnd; + var props = { + configurable: true, + enumerable: true, + value: disabledLog, + writable: true + }; + Object.defineProperties(console, { + info: props, + log: props, + warn: props, + error: props, + group: props, + groupCollapsed: props, + groupEnd: props + }); + } + disabledDepth++; + } + } + function reenableLogs() { + { + disabledDepth--; + if (disabledDepth === 0) { + var props = { + configurable: true, + enumerable: true, + writable: true + }; + Object.defineProperties(console, { + log: assign({}, props, { + value: prevLog + }), + info: assign({}, props, { + value: prevInfo + }), + warn: assign({}, props, { + value: prevWarn + }), + error: assign({}, props, { + value: prevError + }), + group: assign({}, props, { + value: prevGroup + }), + groupCollapsed: assign({}, props, { + value: prevGroupCollapsed + }), + groupEnd: assign({}, props, { + value: prevGroupEnd + }) + }); + } + if (disabledDepth < 0) { + error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); + } + } + } + var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + var prefix; + function describeBuiltInComponentFrame(name, source, ownerFn) { + { + if (prefix === void 0) { + try { + throw Error(); + } catch (x) { + var match = x.stack.trim().match(/\n( *(at )?)/); + prefix = match && match[1] || ""; + } + } + return "\n" + prefix + name; + } + } + var reentry = false; + var componentFrameCache; + { + var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; + componentFrameCache = new PossiblyWeakMap(); + } + function describeNativeComponentFrame(fn, construct) { + if (!fn || reentry) { + return ""; + } + { + var frame = componentFrameCache.get(fn); + if (frame !== void 0) { + return frame; + } + } + var control; + reentry = true; + var previousPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = void 0; + var previousDispatcher; + { + previousDispatcher = ReactCurrentDispatcher.current; + ReactCurrentDispatcher.current = null; + disableLogs(); + } + try { + if (construct) { + var Fake = function() { + throw Error(); + }; + Object.defineProperty(Fake.prototype, "props", { + set: function() { + throw Error(); + } + }); + if (typeof Reflect === "object" && Reflect.construct) { + try { + Reflect.construct(Fake, []); + } catch (x) { + control = x; + } + Reflect.construct(fn, [], Fake); + } else { + try { + Fake.call(); + } catch (x) { + control = x; + } + fn.call(Fake.prototype); + } + } else { + try { + throw Error(); + } catch (x) { + control = x; + } + fn(); + } + } catch (sample2) { + if (sample2 && control && typeof sample2.stack === "string") { + var sampleLines = sample2.stack.split("\n"); + var controlLines = control.stack.split("\n"); + var s = sampleLines.length - 1; + var c = controlLines.length - 1; + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { + c--; + } + for (; s >= 1 && c >= 0; s--, c--) { + if (sampleLines[s] !== controlLines[c]) { + if (s !== 1 || c !== 1) { + do { + s--; + c--; + if (c < 0 || sampleLines[s] !== controlLines[c]) { + var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); + if (fn.displayName && _frame.includes("")) { + _frame = _frame.replace("", fn.displayName); + } + { + if (typeof fn === "function") { + componentFrameCache.set(fn, _frame); + } + } + return _frame; + } + } while (s >= 1 && c >= 0); + } + break; + } + } + } + } finally { + reentry = false; + { + ReactCurrentDispatcher.current = previousDispatcher; + reenableLogs(); + } + Error.prepareStackTrace = previousPrepareStackTrace; + } + var name = fn ? fn.displayName || fn.name : ""; + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; + { + if (typeof fn === "function") { + componentFrameCache.set(fn, syntheticFrame); + } + } + return syntheticFrame; + } + function describeClassComponentFrame(ctor2, source, ownerFn) { + { + return describeNativeComponentFrame(ctor2, true); + } + } + function describeFunctionComponentFrame(fn, source, ownerFn) { + { + return describeNativeComponentFrame(fn, false); + } + } + function shouldConstruct(Component6) { + var prototype = Component6.prototype; + return !!(prototype && prototype.isReactComponent); + } + function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { + if (type == null) { + return ""; + } + if (typeof type === "function") { + { + return describeNativeComponentFrame(type, shouldConstruct(type)); + } + } + if (typeof type === "string") { + return describeBuiltInComponentFrame(type); + } + switch (type) { + case REACT_SUSPENSE_TYPE: + return describeBuiltInComponentFrame("Suspense"); + case REACT_SUSPENSE_LIST_TYPE: + return describeBuiltInComponentFrame("SuspenseList"); + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_FORWARD_REF_TYPE: + return describeFunctionComponentFrame(type.render); + case REACT_MEMO_TYPE: + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); + } catch (x) { + } + } + } + } + return ""; + } + function describeFiber(fiber) { + var owner = fiber._debugOwner ? fiber._debugOwner.type : null; + var source = fiber._debugSource; + switch (fiber.tag) { + case HostComponent: + return describeBuiltInComponentFrame(fiber.type); + case LazyComponent: + return describeBuiltInComponentFrame("Lazy"); + case SuspenseComponent: + return describeBuiltInComponentFrame("Suspense"); + case SuspenseListComponent: + return describeBuiltInComponentFrame("SuspenseList"); + case FunctionComponent: + case IndeterminateComponent: + case SimpleMemoComponent: + return describeFunctionComponentFrame(fiber.type); + case ForwardRef: + return describeFunctionComponentFrame(fiber.type.render); + case ClassComponent: + return describeClassComponentFrame(fiber.type); + default: + return ""; + } + } + function getStackByFiberInDevAndProd(workInProgress2) { + try { + var info = ""; + var node = workInProgress2; + do { + info += describeFiber(node); + node = node.return; + } while (node); + return info; + } catch (x) { + return "\nError generating stack: " + x.message + "\n" + x.stack; + } + } + function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; + return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; + } + function getContextName(type) { + return type.displayName || "Context"; + } + function getComponentNameFromType(type) { + if (type == null) { + return null; + } + { + if (typeof type.tag === "number") { + error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); + } + } + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + switch (type) { + case REACT_FRAGMENT_TYPE: + return "Fragment"; + case REACT_PORTAL_TYPE: + return "Portal"; + case REACT_PROFILER_TYPE: + return "Profiler"; + case REACT_STRICT_MODE_TYPE: + return "StrictMode"; + case REACT_SUSPENSE_TYPE: + return "Suspense"; + case REACT_SUSPENSE_LIST_TYPE: + return "SuspenseList"; + } + if (typeof type === "object") { + switch (type.$$typeof) { + case REACT_CONTEXT_TYPE: + var context = type; + return getContextName(context) + ".Consumer"; + case REACT_PROVIDER_TYPE: + var provider = type; + return getContextName(provider._context) + ".Provider"; + case REACT_FORWARD_REF_TYPE: + return getWrappedName(type, type.render, "ForwardRef"); + case REACT_MEMO_TYPE: + var outerName = type.displayName || null; + if (outerName !== null) { + return outerName; + } + return getComponentNameFromType(type.type) || "Memo"; + case REACT_LAZY_TYPE: { + var lazyComponent = type; + var payload = lazyComponent._payload; + var init = lazyComponent._init; + try { + return getComponentNameFromType(init(payload)); + } catch (x) { + return null; + } + } + } + } + return null; + } + function getWrappedName$1(outerType, innerType, wrapperName) { + var functionName = innerType.displayName || innerType.name || ""; + return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); + } + function getContextName$1(type) { + return type.displayName || "Context"; + } + function getComponentNameFromFiber(fiber) { + var tag = fiber.tag, type = fiber.type; + switch (tag) { + case CacheComponent: + return "Cache"; + case ContextConsumer: + var context = type; + return getContextName$1(context) + ".Consumer"; + case ContextProvider: + var provider = type; + return getContextName$1(provider._context) + ".Provider"; + case DehydratedFragment: + return "DehydratedFragment"; + case ForwardRef: + return getWrappedName$1(type, type.render, "ForwardRef"); + case Fragment: + return "Fragment"; + case HostComponent: + return type; + case HostPortal: + return "Portal"; + case HostRoot: + return "Root"; + case HostText: + return "Text"; + case LazyComponent: + return getComponentNameFromType(type); + case Mode: + if (type === REACT_STRICT_MODE_TYPE) { + return "StrictMode"; + } + return "Mode"; + case OffscreenComponent: + return "Offscreen"; + case Profiler: + return "Profiler"; + case ScopeComponent: + return "Scope"; + case SuspenseComponent: + return "Suspense"; + case SuspenseListComponent: + return "SuspenseList"; + case TracingMarkerComponent: + return "TracingMarker"; + case ClassComponent: + case FunctionComponent: + case IncompleteClassComponent: + case IndeterminateComponent: + case MemoComponent: + case SimpleMemoComponent: + if (typeof type === "function") { + return type.displayName || type.name || null; + } + if (typeof type === "string") { + return type; + } + break; + } + return null; + } + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; + var current = null; + var isRendering = false; + function getCurrentFiberOwnerNameInDevOrNull() { + { + if (current === null) { + return null; + } + var owner = current._debugOwner; + if (owner !== null && typeof owner !== "undefined") { + return getComponentNameFromFiber(owner); + } + } + return null; + } + function getCurrentFiberStackInDev() { + { + if (current === null) { + return ""; + } + return getStackByFiberInDevAndProd(current); + } + } + function resetCurrentFiber() { + { + ReactDebugCurrentFrame.getCurrentStack = null; + current = null; + isRendering = false; + } + } + function setCurrentFiber(fiber) { + { + ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; + current = fiber; + isRendering = false; + } + } + function getCurrentFiber() { + { + return current; + } + } + function setIsRendering(rendering) { + { + isRendering = rendering; + } + } + function toString2(value) { + return "" + value; + } + function getToStringValue(value) { + switch (typeof value) { + case "boolean": + case "number": + case "string": + case "undefined": + return value; + case "object": + { + checkFormFieldValueStringCoercion(value); + } + return value; + default: + return ""; + } + } + var hasReadOnlyValue = { + button: true, + checkbox: true, + image: true, + hidden: true, + radio: true, + reset: true, + submit: true + }; + function checkControlledValueProps(tagName, props) { + { + if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { + error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); + } + if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { + error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); + } + } + } + function isCheckable(elem) { + var type = elem.type; + var nodeName = elem.nodeName; + return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); + } + function getTracker(node) { + return node._valueTracker; + } + function detachTracker(node) { + node._valueTracker = null; + } + function getValueFromNode(node) { + var value = ""; + if (!node) { + return value; + } + if (isCheckable(node)) { + value = node.checked ? "true" : "false"; + } else { + value = node.value; + } + return value; + } + function trackValueOnNode(node) { + var valueField = isCheckable(node) ? "checked" : "value"; + var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); + { + checkFormFieldValueStringCoercion(node[valueField]); + } + var currentValue = "" + node[valueField]; + if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { + return; + } + var get3 = descriptor.get, set2 = descriptor.set; + Object.defineProperty(node, valueField, { + configurable: true, + get: function() { + return get3.call(this); + }, + set: function(value) { + { + checkFormFieldValueStringCoercion(value); + } + currentValue = "" + value; + set2.call(this, value); + } + }); + Object.defineProperty(node, valueField, { + enumerable: descriptor.enumerable + }); + var tracker = { + getValue: function() { + return currentValue; + }, + setValue: function(value) { + { + checkFormFieldValueStringCoercion(value); + } + currentValue = "" + value; + }, + stopTracking: function() { + detachTracker(node); + delete node[valueField]; + } + }; + return tracker; + } + function track(node) { + if (getTracker(node)) { + return; + } + node._valueTracker = trackValueOnNode(node); + } + function updateValueIfChanged(node) { + if (!node) { + return false; + } + var tracker = getTracker(node); + if (!tracker) { + return true; + } + var lastValue = tracker.getValue(); + var nextValue = getValueFromNode(node); + if (nextValue !== lastValue) { + tracker.setValue(nextValue); + return true; + } + return false; + } + function getActiveElement(doc) { + doc = doc || (typeof document !== "undefined" ? document : void 0); + if (typeof doc === "undefined") { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } + } + var didWarnValueDefaultValue = false; + var didWarnCheckedDefaultChecked = false; + var didWarnControlledToUncontrolled = false; + var didWarnUncontrolledToControlled = false; + function isControlled(props) { + var usesChecked = props.type === "checkbox" || props.type === "radio"; + return usesChecked ? props.checked != null : props.value != null; + } + function getHostProps(element, props) { + var node = element; + var checked = props.checked; + var hostProps = assign({}, props, { + defaultChecked: void 0, + defaultValue: void 0, + value: void 0, + checked: checked != null ? checked : node._wrapperState.initialChecked + }); + return hostProps; + } + function initWrapperState(element, props) { + { + checkControlledValueProps("input", props); + if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { + error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnCheckedDefaultChecked = true; + } + if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { + error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); + didWarnValueDefaultValue = true; + } + } + var node = element; + var defaultValue = props.defaultValue == null ? "" : props.defaultValue; + node._wrapperState = { + initialChecked: props.checked != null ? props.checked : props.defaultChecked, + initialValue: getToStringValue(props.value != null ? props.value : defaultValue), + controlled: isControlled(props) + }; + } + function updateChecked(element, props) { + var node = element; + var checked = props.checked; + if (checked != null) { + setValueForProperty(node, "checked", checked, false); + } + } + function updateWrapper(element, props) { + var node = element; + { + var controlled = isControlled(props); + if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { + error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnUncontrolledToControlled = true; + } + if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { + error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); + didWarnControlledToUncontrolled = true; + } + } + updateChecked(element, props); + var value = getToStringValue(props.value); + var type = props.type; + if (value != null) { + if (type === "number") { + if (value === 0 && node.value === "" || // We explicitly want to coerce to number here if possible. + // eslint-disable-next-line + node.value != value) { + node.value = toString2(value); + } + } else if (node.value !== toString2(value)) { + node.value = toString2(value); + } + } else if (type === "submit" || type === "reset") { + node.removeAttribute("value"); + return; + } + { + if (props.hasOwnProperty("value")) { + setDefaultValue(node, props.type, value); + } else if (props.hasOwnProperty("defaultValue")) { + setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); + } + } + { + if (props.checked == null && props.defaultChecked != null) { + node.defaultChecked = !!props.defaultChecked; + } + } + } + function postMountWrapper(element, props, isHydrating2) { + var node = element; + if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { + var type = props.type; + var isButton = type === "submit" || type === "reset"; + if (isButton && (props.value === void 0 || props.value === null)) { + return; + } + var initialValue = toString2(node._wrapperState.initialValue); + if (!isHydrating2) { + { + if (initialValue !== node.value) { + node.value = initialValue; + } + } + } + { + node.defaultValue = initialValue; + } + } + var name = node.name; + if (name !== "") { + node.name = ""; + } + { + node.defaultChecked = !node.defaultChecked; + node.defaultChecked = !!node._wrapperState.initialChecked; + } + if (name !== "") { + node.name = name; + } + } + function restoreControlledState(element, props) { + var node = element; + updateWrapper(node, props); + updateNamedCousins(node, props); + } + function updateNamedCousins(rootNode, props) { + var name = props.name; + if (props.type === "radio" && name != null) { + var queryRoot = rootNode; + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + { + checkAttributeStringCoercion(name, "name"); + } + var group2 = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); + for (var i = 0; i < group2.length; i++) { + var otherNode = group2[i]; + if (otherNode === rootNode || otherNode.form !== rootNode.form) { + continue; + } + var otherProps = getFiberCurrentPropsFromNode(otherNode); + if (!otherProps) { + throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); + } + updateValueIfChanged(otherNode); + updateWrapper(otherNode, otherProps); + } + } + } + function setDefaultValue(node, type, value) { + if ( + // Focused number inputs synchronize on blur. See ChangeEventPlugin.js + type !== "number" || getActiveElement(node.ownerDocument) !== node + ) { + if (value == null) { + node.defaultValue = toString2(node._wrapperState.initialValue); + } else if (node.defaultValue !== toString2(value)) { + node.defaultValue = toString2(value); + } + } + } + var didWarnSelectedSetOnOption = false; + var didWarnInvalidChild = false; + var didWarnInvalidInnerHTML = false; + function validateProps(element, props) { + { + if (props.value == null) { + if (typeof props.children === "object" && props.children !== null) { + React7.Children.forEach(props.children, function(child) { + if (child == null) { + return; + } + if (typeof child === "string" || typeof child === "number") { + return; + } + if (!didWarnInvalidChild) { + didWarnInvalidChild = true; + error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to