/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source visit the plugins github repository (https://github.com/Vinzent03/obsidian-advanced-uri) */ var ze=Object.create;var Y=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty;var Ne=(a,n)=>()=>(n||a((n={exports:{}}).exports,n),n.exports),We=(a,n)=>{for(var e in n)Y(a,e,{get:n[e],enumerable:!0})},fe=(a,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of De(n))!He.call(a,i)&&i!==e&&Y(a,i,{get:()=>n[i],enumerable:!(t=Le(n,i))||t.enumerable});return a};var Be=(a,n,e)=>(e=a!=null?ze(Ue(a)):{},fe(n||!a||!a.__esModule?Y(e,"default",{value:a,enumerable:!0}):e,a)),$e=a=>fe(Y({},"__esModule",{value:!0}),a);var ge=Ne((H,ae)=>{(function(n,e){typeof H=="object"&&typeof ae=="object"?ae.exports=e():typeof define=="function"&&define.amd?define([],e):typeof H=="object"?H.feather=e():n.feather=e()})(typeof self!="undefined"?self:H,function(){return function(a){var n={};function e(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return a[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=a,e.c=n,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=0)}({"./dist/icons.json":function(a){a.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(a,n,e){var t,i;(function(){"use strict";var o=function(){function l(){}l.prototype=Object.create(null);function s(f,y){for(var x=y.length,m=0;m1?arguments[1]:void 0,y=f!==void 0,x=0,m=c(h),M,j,b,A;if(y&&(f=t(f,g>2?arguments[2]:void 0,2)),m!=null&&!(u==Array&&l(m)))for(A=m.call(h),j=new u;!(b=A.next()).done;x++)r(j,x,y?o(A,f,[b.value,x],!0):b.value);else for(M=s(h.length),j=new u(M);M>x;x++)r(j,x,y?f(h[x],x):h[x]);return j.length=x,j}},"./node_modules/core-js/internals/array-includes.js":function(a,n,e){var t=e("./node_modules/core-js/internals/to-indexed-object.js"),i=e("./node_modules/core-js/internals/to-length.js"),o=e("./node_modules/core-js/internals/to-absolute-index.js");a.exports=function(l){return function(s,r,c){var d=t(s),p=i(d.length),h=o(c,p),u;if(l&&r!=r){for(;p>h;)if(u=d[h++],u!=u)return!0}else for(;p>h;h++)if((l||h in d)&&d[h]===r)return l||h||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(a,n,e){var t=e("./node_modules/core-js/internals/a-function.js");a.exports=function(i,o,l){if(t(i),o===void 0)return i;switch(l){case 0:return function(){return i.call(o)};case 1:return function(s){return i.call(o,s)};case 2:return function(s,r){return i.call(o,s,r)};case 3:return function(s,r,c){return i.call(o,s,r,c)}}return function(){return i.apply(o,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(a,n,e){var t=e("./node_modules/core-js/internals/an-object.js");a.exports=function(i,o,l,s){try{return s?o(t(l)[0],l[1]):o(l)}catch(c){var r=i.return;throw r!==void 0&&t(r.call(i)),c}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(a,n,e){var t=e("./node_modules/core-js/internals/well-known-symbol.js"),i=t("iterator"),o=!1;try{var l=0,s={next:function(){return{done:!!l++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,function(){throw 2})}catch(r){}a.exports=function(r,c){if(!c&&!o)return!1;var d=!1;try{var p={};p[i]=function(){return{next:function(){return{done:d=!0}}}},r(p)}catch(h){}return d}},"./node_modules/core-js/internals/classof-raw.js":function(a,n){var e={}.toString;a.exports=function(t){return e.call(t).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(a,n,e){var t=e("./node_modules/core-js/internals/classof-raw.js"),i=e("./node_modules/core-js/internals/well-known-symbol.js"),o=i("toStringTag"),l=t(function(){return arguments}())=="Arguments",s=function(r,c){try{return r[c]}catch(d){}};a.exports=function(r){var c,d,p;return r===void 0?"Undefined":r===null?"Null":typeof(d=s(c=Object(r),o))=="string"?d:l?t(c):(p=t(c))=="Object"&&typeof c.callee=="function"?"Arguments":p}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(a,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/own-keys.js"),o=e("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=e("./node_modules/core-js/internals/object-define-property.js");a.exports=function(s,r){for(var c=i(r),d=l.f,p=o.f,h=0;h",M="java"+x+":",j;for(g.style.display="none",s.appendChild(g),g.src=String(M),j=g.contentWindow.document,j.open(),j.write(y+x+m+"document.F=Object"+y+"/"+x+m),j.close(),u=j.F;f--;)delete u[p][o[f]];return u()};a.exports=Object.create||function(f,y){var x;return f!==null?(h[p]=t(f),x=new h,h[p]=null,x[d]=f):x=u(),y===void 0?x:i(x,y)},l[d]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(a,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/object-define-property.js"),o=e("./node_modules/core-js/internals/an-object.js"),l=e("./node_modules/core-js/internals/object-keys.js");a.exports=t?Object.defineProperties:function(r,c){o(r);for(var d=l(c),p=d.length,h=0,u;p>h;)i.f(r,u=d[h++],c[u]);return r}},"./node_modules/core-js/internals/object-define-property.js":function(a,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/ie8-dom-define.js"),o=e("./node_modules/core-js/internals/an-object.js"),l=e("./node_modules/core-js/internals/to-primitive.js"),s=Object.defineProperty;n.f=t?s:function(c,d,p){if(o(c),d=l(d,!0),o(p),i)try{return s(c,d,p)}catch(h){}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(c[d]=p.value),c}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(a,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/object-property-is-enumerable.js"),o=e("./node_modules/core-js/internals/create-property-descriptor.js"),l=e("./node_modules/core-js/internals/to-indexed-object.js"),s=e("./node_modules/core-js/internals/to-primitive.js"),r=e("./node_modules/core-js/internals/has.js"),c=e("./node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;n.f=t?d:function(h,u){if(h=l(h),u=s(u,!0),c)try{return d(h,u)}catch(g){}if(r(h,u))return o(!i.f.call(h,u),h[u])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(a,n,e){var t=e("./node_modules/core-js/internals/object-keys-internal.js"),i=e("./node_modules/core-js/internals/enum-bug-keys.js"),o=i.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(s){return t(s,o)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(a,n){n.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(a,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/to-object.js"),o=e("./node_modules/core-js/internals/shared-key.js"),l=e("./node_modules/core-js/internals/correct-prototype-getter.js"),s=o("IE_PROTO"),r=Object.prototype;a.exports=l?Object.getPrototypeOf:function(c){return c=i(c),t(c,s)?c[s]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?r:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(a,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/to-indexed-object.js"),o=e("./node_modules/core-js/internals/array-includes.js"),l=e("./node_modules/core-js/internals/hidden-keys.js"),s=o(!1);a.exports=function(r,c){var d=i(r),p=0,h=[],u;for(u in d)!t(l,u)&&t(d,u)&&h.push(u);for(;c.length>p;)t(d,u=c[p++])&&(~s(h,u)||h.push(u));return h}},"./node_modules/core-js/internals/object-keys.js":function(a,n,e){var t=e("./node_modules/core-js/internals/object-keys-internal.js"),i=e("./node_modules/core-js/internals/enum-bug-keys.js");a.exports=Object.keys||function(l){return t(l,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(a,n,e){"use strict";var t={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!t.call({1:2},1);n.f=o?function(s){var r=i(this,s);return!!r&&r.enumerable}:t},"./node_modules/core-js/internals/object-set-prototype-of.js":function(a,n,e){var t=e("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");a.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,o={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(o,[]),i=o instanceof Array}catch(s){}return function(r,c){return t(r,c),i?l.call(r,c):r.__proto__=c,r}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(a,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/object-get-own-property-names.js"),o=e("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=e("./node_modules/core-js/internals/an-object.js"),s=t.Reflect;a.exports=s&&s.ownKeys||function(c){var d=i.f(l(c)),p=o.f;return p?d.concat(p(c)):d}},"./node_modules/core-js/internals/path.js":function(a,n,e){a.exports=e("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(a,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/shared.js"),o=e("./node_modules/core-js/internals/hide.js"),l=e("./node_modules/core-js/internals/has.js"),s=e("./node_modules/core-js/internals/set-global.js"),r=e("./node_modules/core-js/internals/function-to-string.js"),c=e("./node_modules/core-js/internals/internal-state.js"),d=c.get,p=c.enforce,h=String(r).split("toString");i("inspectSource",function(u){return r.call(u)}),(a.exports=function(u,g,f,y){var x=y?!!y.unsafe:!1,m=y?!!y.enumerable:!1,M=y?!!y.noTargetGet:!1;if(typeof f=="function"&&(typeof g=="string"&&!l(f,"name")&&o(f,"name",g),p(f).source=h.join(typeof g=="string"?g:"")),u===t){m?u[g]=f:s(g,f);return}else x?!M&&u[g]&&(m=!0):delete u[g];m?u[g]=f:o(u,g,f)})(Function.prototype,"toString",function(){return typeof this=="function"&&d(this).source||r.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(a,n){a.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js/internals/set-global.js":function(a,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/hide.js");a.exports=function(o,l){try{i(t,o,l)}catch(s){t[o]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(a,n,e){var t=e("./node_modules/core-js/internals/object-define-property.js").f,i=e("./node_modules/core-js/internals/has.js"),o=e("./node_modules/core-js/internals/well-known-symbol.js"),l=o("toStringTag");a.exports=function(s,r,c){s&&!i(s=c?s:s.prototype,l)&&t(s,l,{configurable:!0,value:r})}},"./node_modules/core-js/internals/shared-key.js":function(a,n,e){var t=e("./node_modules/core-js/internals/shared.js"),i=e("./node_modules/core-js/internals/uid.js"),o=t("keys");a.exports=function(l){return o[l]||(o[l]=i(l))}},"./node_modules/core-js/internals/shared.js":function(a,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/set-global.js"),o=e("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",s=t[l]||i(l,{});(a.exports=function(r,c){return s[r]||(s[r]=c!==void 0?c:{})})("versions",[]).push({version:"3.1.3",mode:o?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(a,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=e("./node_modules/core-js/internals/require-object-coercible.js");a.exports=function(o,l,s){var r=String(i(o)),c=t(l),d=r.length,p,h;return c<0||c>=d?s?"":void 0:(p=r.charCodeAt(c),p<55296||p>56319||c+1===d||(h=r.charCodeAt(c+1))<56320||h>57343?s?r.charAt(c):p:s?r.slice(c,c+2):(p-55296<<10)+(h-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(a,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=Math.max,o=Math.min;a.exports=function(l,s){var r=t(l);return r<0?i(r+s,0):o(r,s)}},"./node_modules/core-js/internals/to-indexed-object.js":function(a,n,e){var t=e("./node_modules/core-js/internals/indexed-object.js"),i=e("./node_modules/core-js/internals/require-object-coercible.js");a.exports=function(o){return t(i(o))}},"./node_modules/core-js/internals/to-integer.js":function(a,n){var e=Math.ceil,t=Math.floor;a.exports=function(i){return isNaN(i=+i)?0:(i>0?t:e)(i)}},"./node_modules/core-js/internals/to-length.js":function(a,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=Math.min;a.exports=function(o){return o>0?i(t(o),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(a,n,e){var t=e("./node_modules/core-js/internals/require-object-coercible.js");a.exports=function(i){return Object(t(i))}},"./node_modules/core-js/internals/to-primitive.js":function(a,n,e){var t=e("./node_modules/core-js/internals/is-object.js");a.exports=function(i,o){if(!t(i))return i;var l,s;if(o&&typeof(l=i.toString)=="function"&&!t(s=l.call(i))||typeof(l=i.valueOf)=="function"&&!t(s=l.call(i))||!o&&typeof(l=i.toString)=="function"&&!t(s=l.call(i)))return s;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(a,n){var e=0,t=Math.random();a.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++e+t).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(a,n,e){var t=e("./node_modules/core-js/internals/is-object.js"),i=e("./node_modules/core-js/internals/an-object.js");a.exports=function(o,l){if(i(o),!t(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(a,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/shared.js"),o=e("./node_modules/core-js/internals/uid.js"),l=e("./node_modules/core-js/internals/native-symbol.js"),s=t.Symbol,r=i("wks");a.exports=function(c){return r[c]||(r[c]=l&&s[c]||(l?s:o)("Symbol."+c))}},"./node_modules/core-js/modules/es.array.from.js":function(a,n,e){var t=e("./node_modules/core-js/internals/export.js"),i=e("./node_modules/core-js/internals/array-from.js"),o=e("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!o(function(s){Array.from(s)});t({target:"Array",stat:!0,forced:l},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(a,n,e){"use strict";var t=e("./node_modules/core-js/internals/string-at.js"),i=e("./node_modules/core-js/internals/internal-state.js"),o=e("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",s=i.set,r=i.getterFor(l);o(String,"String",function(c){s(this,{type:l,string:String(c),index:0})},function(){var d=r(this),p=d.string,h=d.index,u;return h>=p.length?{value:void 0,done:!0}:(u=t(p,h,!0),d.index+=u.length,{value:u,done:!1})})},"./node_modules/webpack/buildin/global.js":function(a,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){typeof window=="object"&&(e=window)}a.exports=e},"./src/default-attrs.json":function(a){a.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(a,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(u){for(var g=1;g2&&arguments[2]!==void 0?arguments[2]:[];d(this,u),this.name=g,this.contents=f,this.tags=y,this.attrs=t({},r.default,{class:"feather feather-"+g})}return i(u,[{key:"toSvg",value:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=t({},this.attrs,f,{class:(0,l.default)(this.attrs.class,f.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),u}();function h(u){return Object.keys(u).map(function(g){return g+'="'+u[g]+'"'}).join(" ")}n.default=p},"./src/icons.js":function(a,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=e("./src/icon.js"),i=c(t),o=e("./dist/icons.json"),l=c(o),s=e("./src/tags.json"),r=c(s);function c(d){return d&&d.__esModule?d:{default:d}}n.default=Object.keys(l.default).map(function(d){return new i.default(d,l.default[d],r.default[d])}).reduce(function(d,p){return d[p.name]=p,d},{})},"./src/index.js":function(a,n,e){"use strict";var t=e("./src/icons.js"),i=c(t),o=e("./src/to-svg.js"),l=c(o),s=e("./src/replace.js"),r=c(s);function c(d){return d&&d.__esModule?d:{default:d}}a.exports={icons:i.default,toSvg:l.default,replace:r.default}},"./src/replace.js":function(a,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(h){for(var u=1;u0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var u=document.querySelectorAll("[data-feather]");Array.from(u).forEach(function(g){return d(g,h)})}function d(h){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=p(h),f=g["data-feather"];delete g["data-feather"];var y=s.default[f].toSvg(t({},u,g,{class:(0,o.default)(u.class,g.class)})),x=new DOMParser().parseFromString(y,"image/svg+xml"),m=x.querySelector("svg");h.parentNode.replaceChild(m,h)}function p(h){return Array.from(h.attributes).reduce(function(u,g){return u[g.name]=g.value,u},{})}n.default=c},"./src/tags.json":function(a){a.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(a,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=e("./src/icons.js"),i=o(t);function o(s){return s&&s.__esModule?s:{default:s}}function l(s){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!s)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[s])throw new Error("No icon matching '"+s+"'. See the complete list of icons at https://feathericons.com");return i.default[s].toSvg(r)}n.default=l},0:function(a,n,e){e("./node_modules/core-js/es/array/from.js"),a.exports=e("./src/index.js")}})})});var Xe={};We(Xe,{default:()=>oe});module.exports=$e(Xe);var w=require("obsidian");var Ke=Be(ge()),O=require("obsidian");var N=a=>a.match(/\.MD$|\.md$/m)?a.split(/\.MD$|\.md$/m).slice(0,-1).join(".md"):a;var xe=require("obsidian"),Z=class a{static getBlock(n,e,t){var c,d;let i=e.getCursor("to"),o=n.metadataCache.getFileCache(t),l=o==null?void 0:o.sections;if(!l||l.length===0){console.log("error reading FileCache (empty file?)");return}let s=l.findIndex(p=>p.position.start.line>i.line),r=s>0?l[s-1]:l[l.length-1];return(r==null?void 0:r.type)=="list"&&(r=(d=(c=o.listItems)==null?void 0:c.find(p=>p.position.start.line<=i.line&&p.position.end.line>=i.line))!=null?d:r),r}static getIdOfBlock(n,e){let t=e.id;if(t)return t;let i=e.position.end,o={ch:i.col,line:i.line},l=Math.random().toString(36).substring(2,8),s=a.shouldInsertAfter(e)?` `:" ";return n.replaceRange(`${s}^${l}`,o),l}static shouldInsertAfter(n){if(n.type)return["blockquote","code","table","heading","comment","footnoteDefinition"].includes(n.type)}static getBlockId(n){let e=n.workspace.getActiveViewOfType(xe.MarkdownView);if(e){let t=e.editor,i=e.file,o=this.getBlock(n,t,i);if(o)return this.getIdOfBlock(t,o)}}};var me={openFileOnWrite:!0,openDailyInNewPane:!1,openFileOnWriteInNewPane:!1,openFileWithoutWriteInNewPane:!1,idField:"id",useUID:!1,addFilepathWhenUsingUID:!1,allowEval:!1,includeVaultName:!0,vaultParam:"name"};var ve=require("obsidian");function je(a){let n=a.internalPlugins.plugins["daily-notes"];if(n&&n.enabled)return!0}function Ge(...a){let n=[];for(let t=0,i=a.length;t{this.file?this.plugin.tools.copyURI({filepath:this.file,data:e,mode:i}):this.plugin.tools.copyURI({daily:"true",data:e,mode:i})}})}return t}renderSuggestion(e,t){t.innerText=e.display}onChooseSuggestion(e,t){e.func()}};var Me=require("obsidian"),R=class extends Me.FuzzySuggestModal{constructor(e,t,i=!0){super(e.app);this.placeHolder=t;this.allowNoFile=i;this.plugin=e,this.setPlaceholder(this.placeHolder)}getItems(){let e=[];this.allowNoFile&&e.push({display:"",source:void 0});let t=this.app.workspace.getActiveFile();return t&&e.push({display:"",source:t.path}),[...e,...this.app.vault.getFiles().map(i=>({display:i.path,source:i.path}))]}getItemText(e){return e.display}onChooseItem(e,t){}};var Ae=require("obsidian");function se(a){return a.viewmode?{state:{mode:a.viewmode,source:a.viewmode=="source"}}:void 0}function W(a){return navigator.clipboard.writeText(a)}function J(a,n){var o;let e=(o=n.parent)==null?void 0:o.path,t=e==="/"?"":e,i=n.name;for(let l=1;l<100;l++){let s=N(i),r=t+(t==""?"":"/")+s+` ${l}.md`;if(!(a.vault.getAbstractFileByPath(r)!==null))return r}}function Ie(a,n){let e=new URL(a.vault.getResourcePath(n));return e.host="localhosthostlocal",e.protocol="file",e.search="",e.pathname=decodeURIComponent(e.pathname),e.toString().replace("/localhosthostlocal/","/")}function re(a,n,e){var l,s;let t=a.metadataCache.getFileCache(n),i=t.sections,o=(l=t.headings)==null?void 0:l.find(r=>r.heading===e);if(o){let r=i.findIndex(u=>u.type==="heading"&&u.position.start.line===o.position.start.line),c=i.slice(r+1),d=c==null?void 0:c.findIndex(u=>u.type==="heading");return{lastLine:((s=c[(d!==-1?d:c.length)-1])!=null?s:i[r]).position.end.line+1,firstLine:i[r].position.end.line+1}}else new Ae.Notice("Can't find heading")}var D=class extends Error{constructor(e,t,i){super(e);this.name="KeyPathError",this.errKey=t,i&&(this.cause=i)}};function Fe(a){let{originalObject:n,key:e,data:t}=a;if(e.startsWith("[")&&e.endsWith("]")){let i=e.substring(1,e.length-1).split(","),o=n;for(let l=0;lp==s)),r===void 0)throw new D(`Failed to resolve or convert "${s}" to a valid array index.`,s);r=Math.min(r,o.length),r=Math.max(r,-1)}if(l==i.length-1){o instanceof Array?r===-1?o.unshift(t):o[r]=t:o[s]=t;return}let d=!Number.isNaN(parseInt(i[l+1]))?[]:{};try{o instanceof Array?r>=o.length?(o.push(d),o=d):r===-1?(o.unshift(d),o=d):o=o[Math.max(r,0)]:o[s]===void 0?(o[s]=d,o=d):o=o[s]}catch(p){throw new D(`Failed to resolve "${s}" as a valid object key`,s,p)}}}else n[e]=t}function Pe(a){let{obj:n,key:e}=a;if(e.startsWith("[")&&e.endsWith("]")){let t=e.substring(1,e.length-1).split(","),i=n;for(let o of t)if(i instanceof Array){let l=parseInt(o);Number.isNaN(l)?i=i.find(s=>s==o):i=i[l]}else if(i&&typeof i=="object")i=i[o];else return;return i}else return n?n[e]:void 0}var B=class{constructor(n){this.plugin=n;this.app=this.plugin.app}get tools(){return this.plugin.tools}handlePluginManagement(n){if(n["enable-plugin"]){let e=n["enable-plugin"];e in this.app.plugins.manifests&&!this.app.plugins.getPlugin(e)?(this.app.plugins.enablePluginAndSave(e),new v.Notice(`Enabled ${e}`)):this.app.internalPlugins.plugins[e]&&(this.app.internalPlugins.plugins[e].enable(!0),new v.Notice(`Enabled ${e}`))}else if(n["disable-plugin"]){let e=n["disable-plugin"];this.app.plugins.getPlugin(e)?(this.app.plugins.disablePluginAndSave(e),new v.Notice(`Disabled ${e}`)):this.app.internalPlugins.plugins[e]&&(this.app.internalPlugins.plugins[e].disable(!0),new v.Notice(`Disabled ${e}`))}}handleFrontmatterKey(n){var o;let e=n.frontmatterkey,t=this.app.vault.getAbstractFileByPath((o=n.filepath)!=null?o:this.app.workspace.getActiveFile().path);if(!(t instanceof v.TFile))return;let i=this.app.metadataCache.getFileCache(t).frontmatter;if(n.data){let l=n.data;try{l=JSON.parse(l)}catch(s){try{l=`"${l}"`,l=JSON.parse(l)}catch(r){new v.Notice("Failed to parse data, check console for more details"),console.error(r);return}}this.app.fileManager.processFrontMatter(t,s=>{try{Fe({originalObject:s,key:e,data:l})}catch(r){console.error(r),r instanceof D?new v.Notice(`Invalid key in path. ${r.message}`):new v.Notice("Failed to update frontmatter, check console for more details")}});return}W(Pe({obj:i,key:e}))}handleWorkspace(n){let e=this.app.internalPlugins.getEnabledPluginById("workspaces");if(!e)new v.Notice("Workspaces plugin is not enabled"),this.plugin.failure(n);else{if(n.saveworkspace=="true"){let t=e.activeWorkspace;e.saveWorkspace(t),new v.Notice(`Saved current workspace to ${t}`)}n.clipboard&&n.clipboard!="false"?this.tools.copyURI({workspace:e.activeWorkspace}):n.workspace!=null&&e.loadWorkspace(n.workspace),this.plugin.success(n)}}async handleCommand(n){if(n.filepath)if(n.mode){if(n.mode=="new"){let t=this.app.metadataCache.getFirstLinkpathDest(n.filepath,"/");t instanceof v.TFile&&(n.filepath=J(this.app,t))}await this.plugin.open({file:n.filepath,mode:"source",parameters:n});let e=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(e){let t=e.editor,i=t.getValue();if(n.mode==="append"){t.setValue(i+` `);let o=t.lineCount();t.setCursor({ch:0,line:o})}else n.mode==="prepend"?(t.setValue(` `+i),t.setCursor({ch:0,line:0})):n.mode==="overwrite"&&t.setValue("")}}else n.line!=null||n.column!=null||n.offset!=null?(await this.plugin.open({file:n.filepath,mode:"source",parameters:n}),await this.plugin.setCursorInLine(n)):await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});else(n.openmode||n.viewmode)&&await this.plugin.open({parameters:n});if(n.commandid)this.app.commands.executeCommandById(n.commandid);else if(n.commandname){let e=this.app.commands.commands;for(let t in e)if(e[t].name===n.commandname){e[t].callback?await e[t].callback():e[t].checkCallback(!1);break}}if(n.confirm&&n.confirm!="false"){await new Promise(t=>setTimeout(t,750));let e=document.querySelector(".mod-cta:not([style*='display: none'])");e.click instanceof Function&&e.click()}this.plugin.success(n)}async handleEval(n){if(n.filepath)if(n.mode){if(n.mode=="new"){let t=this.app.metadataCache.getFirstLinkpathDest(n.filepath,"/");t instanceof v.TFile&&(n.filepath=J(this.app,t))}await this.plugin.open({file:n.filepath,mode:"source",parameters:n});let e=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(e){let t=e.editor,i=t.getValue();if(n.mode==="append"){t.setValue(i+` `);let o=t.lineCount();t.setCursor({ch:0,line:o})}else n.mode==="prepend"?(t.setValue(` `+i),t.setCursor({ch:0,line:0})):n.mode==="overwrite"&&t.setValue("")}}else n.line!=null||n.column!=null||n.offset!=null?(await this.plugin.open({file:n.filepath,mode:"source",parameters:n}),await this.plugin.setCursorInLine(n)):await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});this.plugin.settings.allowEval?((0,eval)(n.eval),this.plugin.success(n)):(new v.Notice("Eval is not allowed. Please enable it in the settings."),this.plugin.failure(n))}async handleDoesFileExist(n){let e=await this.app.vault.adapter.exists(n.filepath);W((e?1:0).toString()),this.plugin.success(n)}async handleSearchAndReplace(n){let e;if(n.filepath){let t=this.app.vault.getAbstractFileByPath(n.filepath);t instanceof v.TFile&&(e=t)}else e=this.app.workspace.getActiveFile();if(e){let t=await this.app.vault.read(e);if(n.searchregex)try{let[,,i,o]=n.searchregex.match(/(\/?)(.+)\1([a-z]*)/i),l=new RegExp(i,o);t=t.replace(l,n.replace),this.plugin.success(n)}catch(i){new v.Notice(`Can't parse ${n.searchregex} as RegEx`),this.plugin.failure(n)}else t=t.replaceAll(n.search,n.replace),this.plugin.success(n);await this.plugin.writeAndOpenFile(e.path,t,n)}else new v.Notice("Cannot find file"),this.plugin.failure(n)}async handleSearch(n){n.filepath&&await this.plugin.open({file:n.filepath,parameters:n});let e=this.app.workspace.getActiveViewOfType(v.FileView);e.currentMode.showSearch();let t=e.currentMode.search;t.searchInputEl.value=n.search,t.searchInputEl.dispatchEvent(new Event("input"))}async handleWrite(n,e=!1){var i;let t;if(n.filepath?t=this.app.vault.getAbstractFileByPath(n.filepath):t=this.app.workspace.getActiveFile(),n.filepath||t){let o,l=(i=n.filepath)!=null?i:t.path;n.mode==="overwrite"?(o=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.success(n)):n.mode==="prepend"?(t instanceof v.TFile?o=await this.plugin.prepend(t,n):o=await this.plugin.prepend(l,n),this.plugin.success(n)):n.mode==="append"?(t instanceof v.TFile?o=await this.plugin.append(t,n):o=await this.plugin.append(l,n),this.plugin.success(n)):n.mode==="new"?t instanceof v.TFile?(o=await this.plugin.writeAndOpenFile(J(this.app,t),n.data,n),this.plugin.hookSuccess(n,o)):(o=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.hookSuccess(n,o)):!e&&t instanceof v.TFile?(new v.Notice("File already exists"),this.plugin.openExistingFileAndSetCursor(t.path,n),this.plugin.failure(n)):(o=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.success(n)),n.uid&&this.tools.writeUIDToFile(o,n.uid)}else new v.Notice("Cannot find file"),this.plugin.failure(n)}async handleOpen(n){if(n.heading!=null){await this.plugin.open({file:n.filepath+"#"+n.heading,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(!e)return;let i=this.app.metadataCache.getFileCache(e.file).headings.find(o=>o.heading===n.heading);e.editor.focus(),e.editor.setCursor({line:i.position.start.line+1,ch:0})}else if(n.block!=null){await this.plugin.open({file:n.filepath+"#^"+n.block,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.getActiveViewOfType(v.MarkdownView);if(!e)return;let i=this.app.metadataCache.getFileCache(e.file).blocks[n.block.toLowerCase()];e.editor.focus(),i&&e.editor.setCursor({line:i.position.start.line,ch:0})}else await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n}),(n.line!=null||n.column!=null||n.offset!=null)&&await this.plugin.setCursorInLine(n);if(n.mode!=null&&await this.plugin.setCursor(n),n.uid){let e=this.app.workspace.getActiveViewOfType(v.MarkdownView);this.tools.writeUIDToFile(e.file,n.uid)}this.plugin.success(n)}async handleOpenBlock(n){let e=this.tools.getFileFromBlockID(n.block);e&&await this.plugin.chooseHandler({...n,filepath:e.path},!1)}handleCopyFileURI(n,e){let t=this.app.workspace.getActiveViewOfType(v.FileView);if(!(!t&&!e)){if(t instanceof v.MarkdownView){let i=t.editor.getCursor(),o=this.app.metadataCache.getFileCache(t.file);if(o.headings){for(let l of o.headings)if(l.position.start.line<=i.line&&l.position.end.line>=i.line){this.tools.copyURI({filepath:t.file.path,heading:l.heading});return}}if(o.blocks)for(let l of Object.keys(o.blocks)){let s=o.blocks[l];if(s.position.start.line<=i.line&&s.position.end.line>=i.line){this.tools.copyURI({filepath:t.file.path,block:s.id});return}}}if(n){let i=e!=null?e:this.app.workspace.getActiveFile();if(!i){new v.Notice("No file opened");return}this.tools.copyURI({filepath:i.path})}else{let i=new R(this.plugin,"Choose a file",!1);i.open(),i.onChooseItem=(o,l)=>{new L(this.plugin,o.source).open()}}}}handleOpenSettings(n){if(this.app.setting.containerEl.parentElement===null&&this.app.setting.open(),n.settingid=="plugin-browser"?(this.app.setting.openTabById("community-plugins"),this.app.setting.activeTab.containerEl.find(".mod-cta").click()):n.settingid=="theme-browser"?(this.app.setting.openTabById("appearance"),this.app.setting.activeTab.containerEl.find(".mod-cta").click()):this.app.setting.openTabById(n.settingid),n.settingsection){let e=this.app.setting.tabContentContainer.querySelectorAll("*"),t=Array.prototype.find.call(e,i=>i.textContent==n.settingsection);t&&t.scrollIntoView()}this.plugin.success(n)}async handleUpdatePlugins(n){new v.Notice("Checking for updates\u2026"),await this.app.plugins.checkForUpdates(),Object.keys(this.app.plugins.updates).length>0&&(n.settingid="community-plugins",this.handleOpenSettings(n),this.app.setting.activeTab.containerEl.findAll(".mod-cta").last().click()),this.plugin.success(n)}async handleBookmarks(n){let e=this.app.internalPlugins.getEnabledPluginById("bookmarks"),i=e.getBookmarks().find(l=>l.title==n.bookmark),o;n.openmode=="true"||n.openmode=="false"?o=n.openmode=="true":o=n.openmode,e.openBookmark(i,o)}async handleCanvas(n){n.filepath&&await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.activeLeaf.view;if(e.getViewType()!="canvas"){new v.Notice("Active view is not a canvas");return}let t=e;if(n.canvasnodes){let i=n.canvasnodes.split(","),o=t.canvas.nodes,l=i.map(r=>o.get(r)),s=t.canvas.selection;t.canvas.updateSelection(()=>{for(let r of l)s.add(r)}),t.canvas.zoomToSelection()}if(n.canvasviewport){let[i,o,l]=n.canvasviewport.split(",");if(i!="-")if(i.startsWith("--")||i.startsWith("++")){let s=t.canvas.tx+Number(i.substring(1));t.canvas.tx=s}else t.canvas.tx=Number(i);if(o!="-")if(o.startsWith("--")||o.startsWith("++")){let s=t.canvas.ty+Number(o.substring(1));t.canvas.ty=s}else t.canvas.ty=Number(o);if(l!="-")if(l.startsWith("--")||l.startsWith("++")){let s=t.canvas.tZoom+Number(l.substring(1));t.canvas.tZoom=s}else t.canvas.tZoom=Number(l);t.canvas.markViewportChanged()}}};var Se=require("obsidian"),Q=class extends Se.FuzzySuggestModal{constructor(e,t){super(e.app);this.plugin=e,this.file=t}getItems(){let e=this.app.commands.commands;return Object.keys(e).map(i=>({id:e[i].id,name:e[i].name}))}getItemText(e){return e.name}onChooseItem(e,t){this.plugin.tools.copyURI({filepath:this.file,commandid:e.id})}};var Ce=require("obsidian"),X=class extends Ce.SuggestModal{constructor(e,t,i){super(e.app);this.search=t;this.filepath=i;this.emptyText="Empty text (replace with nothing)";this.plugin=e,this.setPlaceholder("Replacement text")}getSuggestions(e){return e===""&&(e=this.emptyText),[e]}renderSuggestion(e,t){t.innerText=e}onChooseSuggestion(e,t){this.search.isRegEx?this.plugin.tools.copyURI({filepath:this.filepath,searchregex:this.search.source,replace:e==this.emptyText?"":e}):this.plugin.tools.copyURI({filepath:this.filepath,search:this.search.source,replace:e==this.emptyText?"":e})}};var Oe=require("obsidian"),q=class extends Oe.SuggestModal{constructor(e){super(e.app);this.plugin=e,this.setPlaceholder("Searched text. RegEx is supported")}getSuggestions(e){e===""&&(e="...");let t;try{t=new RegExp(e)}catch(i){}return[{source:e,isRegEx:!1,display:e},{source:e,display:t?`As RegEx: ${e}`:"Can't parse RegEx",isRegEx:!0}]}renderSuggestion(e,t){t.innerText=e.display}onChooseSuggestion(e,t){}};var F=require("obsidian"),_=class extends F.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:this.plugin.manifest.name}),new F.Setting(e).setName("Open file on write").addToggle(t=>t.setValue(this.plugin.settings.openFileOnWrite).onChange(i=>{this.plugin.settings.openFileOnWrite=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Open file on write in a new pane").setDisabled(this.plugin.settings.openFileOnWrite).addToggle(t=>t.setValue(this.plugin.settings.openFileOnWriteInNewPane).onChange(i=>{this.plugin.settings.openFileOnWriteInNewPane=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Open daily note in a new pane").addToggle(t=>t.setValue(this.plugin.settings.openDailyInNewPane).onChange(i=>{this.plugin.settings.openDailyInNewPane=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Open file without write in new pane").addToggle(t=>t.setValue(this.plugin.settings.openFileWithoutWriteInNewPane).onChange(i=>{this.plugin.settings.openFileWithoutWriteInNewPane=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Use UID instead of file paths").addToggle(t=>t.setValue(this.plugin.settings.useUID).onChange(i=>{this.plugin.settings.useUID=i,this.plugin.saveSettings(),this.display()})),new F.Setting(e).setName("Include vault name/ID parameter").addToggle(t=>t.setValue(this.plugin.settings.includeVaultName).onChange(i=>{this.plugin.settings.includeVaultName=i,this.plugin.saveSettings(),this.display()})),this.plugin.settings.includeVaultName&&new F.Setting(e).setName("Vault identifying parameter").setDesc("Choose whether to use the vault Name or its internal ID as the identifying parameter.").addDropdown(t=>t.addOption("name","Name").addOption("id","ID").setValue(this.plugin.settings.vaultParam).onChange(i=>{this.plugin.settings.vaultParam=i,this.plugin.saveSettings()})),this.plugin.settings.useUID&&new F.Setting(e).setName("Add filepath parameter").setDesc("When using UID instead of file paths, you can still add the filepath parameter to know what this URI is about. It's NOT actually used.").addToggle(t=>t.setValue(this.plugin.settings.addFilepathWhenUsingUID).onChange(i=>{this.plugin.settings.addFilepathWhenUsingUID=i,this.plugin.saveSettings()})),new F.Setting(e).setName("UID field in frontmatter").addText(t=>t.setValue(this.plugin.settings.idField).onChange(i=>{this.plugin.settings.idField=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Allow executing arbitrary code via eval").setDesc("\u26A0\uFE0F This can be dangerous as it allows executing arbitrary code. Only enable this if you trust the source of the URIs you are using and know what you are doing. \u26A0\uFE0F").addToggle(t=>t.setValue(this.plugin.settings.allowEval).onChange(i=>{this.plugin.settings.allowEval=i,this.plugin.saveSettings()})),new F.Setting(e).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(t=>{t.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"})}};var V=require("obsidian");var ee,Ye=new Uint8Array(16);function ce(){if(!ee&&(ee=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ee))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ee(Ye)}var ke=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ze(a){return typeof a=="string"&&ke.test(a)}var Te=Ze;var I=[];for(te=0;te<256;++te)I.push((te+256).toString(16).substr(1));var te;function Je(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(I[a[n+0]]+I[a[n+1]]+I[a[n+2]]+I[a[n+3]]+"-"+I[a[n+4]]+I[a[n+5]]+"-"+I[a[n+6]]+I[a[n+7]]+"-"+I[a[n+8]]+I[a[n+9]]+"-"+I[a[n+10]]+I[a[n+11]]+I[a[n+12]]+I[a[n+13]]+I[a[n+14]]+I[a[n+15]]).toLowerCase();if(!Te(e))throw TypeError("Stringified UUID is invalid");return e}var Re=Je;function Qe(a,n,e){a=a||{};var t=a.random||(a.rng||ce)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var i=0;i<16;++i)n[e+i]=t[i];return n}return Re(t)}var de=Qe;var $=class{constructor(n){this.plugin=n;this.app=this.plugin.app}get settings(){return this.plugin.settings}async writeUIDToFile(n,e){var c;let t=(c=this.app.metadataCache.getFileCache(n))==null?void 0:c.frontmatter,i=await this.app.vault.read(n),o=(!t||t.length===0)&&!i.match(/^-{3}\s*\n*\r*-{3}/),l=i.split(` `),s=`${this.plugin.settings.idField}:`;if(o)l.unshift("---"),l.unshift(`${s} ${e}`),l.unshift("---");else{let d=l.findIndex(p=>p.startsWith(s));d!=-1?l[d]=`${s} ${e}`:l.splice(1,0,`${s} ${e}`)}let r=l.join(` `);return await this.app.vault.modify(n,r),e}async getUIDFromFile(n){var i;let e=(i=this.app.metadataCache.getFileCache(n))!=null?i:await new Promise(o=>{let l=this.app.metadataCache.on("changed",s=>{if(s.path==n.path){let r=this.app.metadataCache.getFileCache(n);this.app.metadataCache.offref(l),o(r)}})}),t=(0,V.parseFrontMatterEntry)(e.frontmatter,this.plugin.settings.idField);return t!=null?t instanceof Array?t[0]:t:await this.writeUIDToFile(n,de())}async generateURI(n){let e="obsidian://adv-uri",t="",i=this.app.vault.getAbstractFileByPath(n.filepath);this.settings.includeVaultName&&(t+="?vault=",this.settings.vaultParam=="id"&&this.app.appId?t+=encodeURIComponent(this.app.appId):t+=encodeURIComponent(this.app.vault.getName())),this.settings.useUID&&i instanceof V.TFile&&i.extension=="md"&&(this.settings.addFilepathWhenUsingUID||(n.filepath=void 0),n.uid=await this.getUIDFromFile(i));let o=Object.keys(n).filter(l=>n[l]).sort((l,s)=>{let r=["filepath","filename","uid","daily"],c=["data","eval"];return r.includes(l)?-1:r.includes(s)||c.includes(l)?1:c.includes(s)?-1:0});for(let l of o)n[l]!=null&&(t+=t?"&":"?",t+=`${l}=${encodeURIComponent(n[l])}`);return t.endsWith("%20")&&(t+="&"),e+t}async copyURI(n){let e=await this.generateURI(n);await W(e),new V.Notice("Advanced URI copied to your clipboard")}getFileFromUID(n){var i;let e=this.app.vault.getMarkdownFiles(),t=this.settings.idField;for(let o of e){let l=(0,V.parseFrontMatterEntry)((i=this.app.metadataCache.getFileCache(o))==null?void 0:i.frontmatter,t);if(l instanceof Array){if(l.contains(n))return o}else if(l==n)return o}}getFileFromBlockID(n){var t,i;let e=this.app.vault.getMarkdownFiles();n=n.toLowerCase();for(let o of e)if(((i=(t=this.app.metadataCache.getFileCache(o))==null?void 0:t.blocks)==null?void 0:i[n])!=null)return o}};var ie=require("obsidian"),ne=class extends ie.FuzzySuggestModal{constructor(e){super(e.app);this.plugin=e,this.setPlaceholder("Choose a workspace")}getItems(){let e=this.app.internalPlugins.getEnabledPluginById("workspaces");if(!e)new ie.Notice("Workspaces plugin is not enabled");else return Object.keys(e.workspaces)}getItemText(e){return e}onChooseItem(e,t){this.plugin.tools.copyURI({workspace:e})}};var oe=class extends w.Plugin{constructor(){super(...arguments);this.handlers=new B(this);this.tools=new $(this)}async onload(){await this.loadSettings(),this.addSettingTab(new _(this.app,this)),this.addCommand({id:"copy-uri-current-file",name:"Copy URI for file with options",callback:()=>this.handlers.handleCopyFileURI(!1)}),this.addCommand({id:"copy-uri-current-file-simple",name:"Copy URI for current file",callback:()=>this.handlers.handleCopyFileURI(!0)}),this.addCommand({id:"copy-uri-daily",name:"Copy URI for daily note",callback:()=>new L(this).open()}),this.addCommand({id:"copy-uri-search-and-replace",name:"Copy URI for search and replace",callback:()=>{let e=new R(this,"Used file for search and replace");e.open(),e.onChooseItem=t=>{let i=new q(this);i.open(),i.onChooseSuggestion=o=>{new X(this,o,t==null?void 0:t.source).open()}}}}),this.addCommand({id:"copy-uri-command",name:"Copy URI for command",callback:()=>{let e=new R(this,"Select a file to be opened before executing the command");e.open(),e.onChooseItem=t=>{new Q(this,t==null?void 0:t.source).open()}}}),this.addCommand({id:"copy-uri-block",name:"Copy URI for current block",checkCallback:e=>{let t=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(e)return t!=null;let i=Z.getBlockId(this.app);i&&this.tools.copyURI({filepath:t.file.path,block:i})}}),this.addCommand({id:"copy-uri-workspace",name:"Copy URI for workspace",callback:()=>{new ne(this).open()}}),this.addCommand({id:"copy-uri-canvas-node",name:"Copy URI for selected canvas nodes",checkCallback:e=>{let t=this.app.workspace.activeLeaf.view;if(e)return t.getViewType()==="canvas"&&t.canvas.selection.size>0;if(t.getViewType()!=="canvas")return!1;let i=t,o=[];i.canvas.selection.forEach(l=>{o.push(l.id)}),this.tools.copyURI({canvasnodes:o.join(","),filepath:t.file.path})}}),this.addCommand({id:"copy-uri-canvas-viewport",name:"Copy URI for current canvas viewport",checkCallback:e=>{let t=this.app.workspace.activeLeaf.view;if(e)return t.getViewType()==="canvas";if(t.getViewType()!=="canvas")return!1;let o=t.canvas,l=o.tx.toFixed(0),s=o.ty.toFixed(0),r=o.tZoom.toFixed(3);this.tools.copyURI({filepath:t.file.path,canvasviewport:`${l},${s},${r}`})}}),this.registerObsidianProtocolHandler("advanced-uri",async e=>{let t=e;for(let i in t)t[i]=decodeURIComponent(t[i]);this.onUriCall(t)}),this.registerObsidianProtocolHandler("adv-uri",async e=>{let t=e;this.onUriCall(t)}),this.registerObsidianProtocolHandler("hook-get-advanced-uri",async e=>{let t=e;for(let o in t)t[o]=decodeURIComponent(t[o]);let i=this.app.workspace.getActiveFile();i?this.hookSuccess(t,i):this.failure(t,{errorMessage:"No file opened"})}),this.registerEvent(this.app.workspace.on("file-menu",(e,t,i)=>{(i==="more-options"||i==="tab-header"||i=="file-explorer-context-menu")&&t instanceof w.TFile&&e.addItem(o=>{o.setTitle("Copy Advanced URI").setIcon("link").setSection("info").onClick(l=>this.handlers.handleCopyFileURI(!0,t))})}))}async onUriCall(e){var i,o,l;let t=!1;if(this.lastParameters={...e},e.uid){let s=(i=this.tools.getFileFromUID(e.uid))==null?void 0:i.path;s!=null&&(e.filepath=s,e.uid=void 0)}else if(e.filename){let s=this.app.metadataCache.getFirstLinkpathDest(e.filename,"");s||(s=this.app.vault.getMarkdownFiles().find(d=>{var p;return(p=(0,w.parseFrontMatterAliases)(this.app.metadataCache.getFileCache(d).frontmatter))==null?void 0:p.includes(e.filename)}));let r=this.app.fileManager.getNewFileParent((o=this.app.workspace.getActiveFile())==null?void 0:o.path),c=r.isRoot()?"":r.path+"/";e.filepath=(l=s==null?void 0:s.path)!=null?l:c+(0,w.normalizePath)(e.filename)}if(e.filepath){e.filepath=(0,w.normalizePath)(e.filepath);let s=e.filepath.lastIndexOf(".");e.filepath.substring(s<0?e.filepath.length:s)===""&&(e.filepath=e.filepath+".md")}else if(e.daily==="true"){if(!je(this.app)){new w.Notice("Daily notes plugin is not loaded");return}let s=window.moment(Date.now()),r=await we(s,this.app),c=this.app.vault.getAbstractFileByPath(r);c||(e.exists==="true"?e.filepath=r:(c=await this.app.internalPlugins.getEnabledPluginById("daily-notes").getDailyNote(),t=!0)),c&&(e.filepath=c.path)}e.clipboard==="true"&&(e.data=await navigator.clipboard.readText()),this.chooseHandler(e,t)}async chooseHandler(e,t){e["enable-plugin"]||e["disable-plugin"]?this.handlers.handlePluginManagement(e):e.frontmatterkey?this.handlers.handleFrontmatterKey(e):e.workspace||e.saveworkspace=="true"?this.handlers.handleWorkspace(e):e.commandname||e.commandid?this.handlers.handleCommand(e):e.bookmark?this.handlers.handleBookmarks(e):e.eval?this.handlers.handleEval(e):e.filepath&&e.exists==="true"?this.handlers.handleDoesFileExist(e):e.canvasnodes||e.canvasviewport?this.handlers.handleCanvas(e):e.data?this.handlers.handleWrite(e,t):e.filepath&&e.heading?(await this.handlers.handleOpen(e),e.filepath=void 0,e.heading=void 0,this.chooseHandler(e,t)):e.filepath&&e.block?(await this.handlers.handleOpen(e),e.filepath=void 0,e.block=void 0,this.chooseHandler(e,t)):(e.search||e.searchregex)&&e.replace!=null?this.handlers.handleSearchAndReplace(e):e.search?this.handlers.handleSearch(e):e.filepath?this.handlers.handleOpen(e):e.block?this.handlers.handleOpenBlock(e):e.settingid?this.handlers.handleOpenSettings(e):e.updateplugins&&this.handlers.handleUpdatePlugins(e)}async hookSuccess(e,t){if(!e["x-success"])return;let i={title:N(t.name),advanceduri:await this.tools.generateURI({filepath:t.path}),urlkey:"advanceduri",fileuri:Ie(this.app,t)};this.success(e,i)}success(e,t){if(e["x-success"]){let i=new URL(e["x-success"]);for(let o in t)i.searchParams.set(o,t[o]);window.open(i.toString())}}failure(e,t){if(e["x-error"]){let i=new URL(e["x-error"]);for(let o in t)i.searchParams.set(o,t[o]);window.open(i.toString())}}async append(e,t){var l,s;let i,o;if(e instanceof w.TFile){i=e.path;let c=(await this.app.vault.read(e)).split(` `),d;if(t.heading){let p=re(this.app,e,t.heading);if(d=p==null?void 0:p.lastLine,d===void 0)return;p.firstLine==p.lastLine&&t.separator&&(t.separator=` `+t.separator)}else t.line?d=Number(t.line):d=c.length;d=Math.max(1,d),c[d-1]=((l=c[d-1])!=null?l:"")+((s=t.separator)!=null?s:` `)+t.data,o=c.join(` `)}else i=e,o=t.data;return this.writeAndOpenFile(i,o,t)}async prepend(e,t){var l,s,r;let i,o;if(e instanceof w.TFile){i=e.path;let c=await this.app.vault.read(e),d=this.app.metadataCache.getFileCache(e),p=c.split(` `),h;if(t.heading){if(h=(l=re(this.app,e,t.heading))==null?void 0:l.firstLine,h===void 0)return;h+=1}else t.line?h=Number(t.line):d.frontmatterPosition?h=d.frontmatterPosition.end.line+2:h=1;h=Math.max(1,h),p[h-1]=`${t.data}${(s=t.separator)!=null?s:` `}${(r=p[h-1])!=null?r:""}`,o=p.join(` `)}else i=e,o=t.data;return this.writeAndOpenFile(i,o,t)}async writeAndOpenFile(e,t,i){let o=this.app.vault.getAbstractFileByPath(e);if(o instanceof w.TFile)await this.app.vault.modify(o,t);else{let l=e.split("/"),s=l.slice(0,l.length-1).join("/");l.length>1&&!(this.app.vault.getAbstractFileByPath(s)instanceof w.TFolder)&&await this.app.vault.createFolder(s),/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(t)?await this.app.vault.createBinary(e,(0,w.base64ToArrayBuffer)(t)):await this.app.vault.create(e,t)}return this.openExistingFileAndSetCursor(e,i),this.app.vault.getAbstractFileByPath(e)}async openExistingFileAndSetCursor(e,t){t.openmode!="silent"&&this.settings.openFileOnWrite&&(await this.open({file:e,setting:this.settings.openFileOnWriteInNewPane,parameters:t}),(t.line!=null||t.column!=null||t.offset!=null)&&await this.setCursorInLine(t))}async open({file:e,setting:t,parameters:i,supportPopover:o,mode:l}){var r;let s;if(i.openmode=="popover"&&(o==null||o)){let c=this.app.plugins.plugins["obsidian-hover-editor"];c||(new w.Notice("Cannot find Hover Editor plugin. Please file an issue."),this.failure(i)),await new Promise(d=>{s=c.spawnPopover(void 0,()=>{this.app.workspace.setActiveLeaf(s,{focus:!0}),d()})})}else{let c=t;if(i.newpane!==void 0&&(c=i.newpane=="true"),i.openmode!==void 0&&(i.openmode=="true"||i.openmode=="false"?c=i.openmode=="true":i.openmode=="popover"?c=!1:w.Platform.isMobile&&i.openmode=="window"||(c=i.openmode)),c=="silent")return;if(w.Platform.isMobileApp&&c=="window"&&(c=!0),e!=null){let d=!1;isBoolean(c)&&this.app.workspace.iterateAllLeaves(p=>{var h;if(((h=p.view.file)==null?void 0:h.path)===i.filepath){if(d&&p.width==0)return;d=!0,this.app.workspace.setActiveLeaf(p,{focus:!0}),s=p}})}s||(s=this.app.workspace.getLeaf(c),this.app.workspace.setActiveLeaf(s,{focus:!0}))}if(e instanceof w.TFile?await s.openFile(e):e!=null&&await this.app.workspace.openLinkText(e,"/",!1,l!=null?{state:{mode:l}}:se(i)),s.view instanceof w.MarkdownView){let c=s.getViewState();l!=null?c.state.mode=l:c.state={...c.state,...(r=se(i))==null?void 0:r.state},await s.setViewState(c)}return s}async setCursor(e){let t=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(!t)return;let i=e.mode,o=t.editor,l=t.leaf.getViewState();if(l.state.mode="source",i==="append"){let s=o.lastLine(),r=o.getLine(s).length;await t.leaf.setViewState(l,{focus:!0}),o.setCursor({ch:r,line:s})}else i==="prepend"&&(await t.leaf.setViewState(l,{focus:!0}),o.setCursor({ch:0,line:0}));await new Promise(s=>setTimeout(s,10)),e.viewmode=="preview"&&(l.state.mode="preview",await t.leaf.setViewState(l))}async setCursorInLine(e){let t=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(!t)return;let i=t.leaf.getViewState(),o=e.line!=null?Number(e.line):void 0,l=e.column?Number(e.column):void 0;i.state.mode="source",await t.leaf.setViewState(i);let s,r;if(e.offset!=null){let c=t.editor.offsetToPos(Number(e.offset));s=c.line,r=c.ch}else{s=o!=null?Math.min(o-1,t.editor.lineCount()-1):t.editor.getCursor().line;let c=t.editor.getLine(s).length-1;r=Math.min(l-1,c)}t.editor.focus(),t.editor.setCursor({line:s,ch:r}),t.editor.scrollIntoView({from:{line:s,ch:r},to:{line:s,ch:r}},!0),await new Promise(c=>setTimeout(c,10)),e.viewmode=="preview"&&(i.state.mode="preview",await t.leaf.setViewState(i))}async loadSettings(){this.settings=Object.assign(me,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}}; //! All of these methods are taken from https://www.npmjs.com/package/obsidian-daily-notes-interface. /*! Bundled license information: feather-icons/dist/feather.js: (*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames *) */ /* nosourcemap */