mirror of
https://github.com/logos-storage/logos-storage-docs-obsidian.git
synced 2026-01-04 06:13:09 +00:00
227 lines
432 KiB
JavaScript
227 lines
432 KiB
JavaScript
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var _d=Object.create;var Mi=Object.defineProperty;var Xd=Object.getOwnPropertyDescriptor;var Jd=Object.getOwnPropertyNames;var Wd=Object.getPrototypeOf,Yd=Object.prototype.hasOwnProperty;var Zd=(M,a)=>()=>(a||M((a={exports:{}}).exports,a),a.exports),qd=(M,a)=>{for(var e in a)Mi(M,e,{get:a[e],enumerable:!0})},ma=(M,a,e,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of Jd(a))!Yd.call(M,n)&&n!==e&&Mi(M,n,{get:()=>a[n],enumerable:!(s=Xd(a,n))||s.enumerable});return M};var fa=(M,a,e)=>(e=M!=null?_d(Wd(M)):{},ma(a||!M||!M.__esModule?Mi(e,"default",{value:M,enumerable:!0}):e,M)),$d=M=>ma(Mi({},"__esModule",{value:!0}),M);var ms=Zd((ps,Bs)=>{(function(M,a){typeof ps=="object"&&typeof Bs!="undefined"?Bs.exports=a():typeof define=="function"&&define.amd?define(a):(M=typeof globalThis!="undefined"?globalThis:M||self,M.html2canvas=a())})(ps,function(){"use strict";var M=function(t,A){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},M(t,A)};function a(t,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");M(t,A);function r(){this.constructor=t}t.prototype=A===null?Object.create(A):(r.prototype=A.prototype,new r)}var e=function(){return e=Object.assign||function(A){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(A[c]=r[c])}return A},e.apply(this,arguments)};function s(t,A,r,i){function o(c){return c instanceof r?c:new r(function(g){g(c)})}return new(r||(r=Promise))(function(c,g){function f(Q){try{C(i.next(Q))}catch(U){g(U)}}function m(Q){try{C(i.throw(Q))}catch(U){g(U)}}function C(Q){Q.done?c(Q.value):o(Q.value).then(f,m)}C((i=i.apply(t,A||[])).next())})}function n(t,A){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},i,o,c,g;return g={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function f(C){return function(Q){return m([C,Q])}}function m(C){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(c=C[0]&2?o.return:C[0]?o.throw||((c=o.return)&&c.call(o),0):o.next)&&!(c=c.call(o,C[1])).done)return c;switch(o=0,c&&(C=[C[0]&2,c.value]),C[0]){case 0:case 1:c=C;break;case 4:return r.label++,{value:C[1],done:!1};case 5:r.label++,o=C[1],C=[0];continue;case 7:C=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(C[0]===6||C[0]===2)){r=0;continue}if(C[0]===3&&(!c||C[1]>c[0]&&C[1]<c[3])){r.label=C[1];break}if(C[0]===6&&r.label<c[1]){r.label=c[1],c=C;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(C);break}c[2]&&r.ops.pop(),r.trys.pop();continue}C=A.call(t,r)}catch(Q){C=[6,Q],o=0}finally{i=c=0}if(C[0]&5)throw C[1];return{value:C[0]?C[1]:void 0,done:!0}}}function l(t,A,r){if(r||arguments.length===2)for(var i=0,o=A.length,c;i<o;i++)(c||!(i in A))&&(c||(c=Array.prototype.slice.call(A,0,i)),c[i]=A[i]);return t.concat(c||A)}for(var h=function(){function t(A,r,i,o){this.left=A,this.top=r,this.width=i,this.height=o}return t.prototype.add=function(A,r,i,o){return new t(this.left+A,this.top+r,this.width+i,this.height+o)},t.fromClientRect=function(A,r){return new t(r.left+A.windowBounds.left,r.top+A.windowBounds.top,r.width,r.height)},t.fromDOMRectList=function(A,r){var i=Array.from(r).find(function(o){return o.width!==0});return i?new t(i.left+A.windowBounds.left,i.top+A.windowBounds.top,i.width,i.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t}(),d=function(t,A){return h.fromClientRect(t,A.getBoundingClientRect())},u=function(t){var A=t.body,r=t.documentElement;if(!A||!r)throw new Error("Unable to get document size");var i=Math.max(Math.max(A.scrollWidth,r.scrollWidth),Math.max(A.offsetWidth,r.offsetWidth),Math.max(A.clientWidth,r.clientWidth)),o=Math.max(Math.max(A.scrollHeight,r.scrollHeight),Math.max(A.offsetHeight,r.offsetHeight),Math.max(A.clientHeight,r.clientHeight));return new h(0,0,i,o)},w=function(t){for(var A=[],r=0,i=t.length;r<i;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<i){var c=t.charCodeAt(r++);(c&64512)===56320?A.push(((o&1023)<<10)+(c&1023)+65536):(A.push(o),r--)}else A.push(o)}return A},p=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var r=t.length;if(!r)return"";for(var i=[],o=-1,c="";++o<r;){var g=t[o];g<=65535?i.push(g):(g-=65536,i.push((g>>10)+55296,g%1024+56320)),(o+1===r||i.length>16384)&&(c+=String.fromCharCode.apply(String,i),i.length=0)}return c},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),H=0;H<v.length;H++)y[v.charCodeAt(H)]=H;for(var E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),L=0;L<E.length;L++)F[E.charCodeAt(L)]=L;for(var x=function(t){var A=t.length*.75,r=t.length,i,o=0,c,g,f,m;t[t.length-1]==="="&&(A--,t[t.length-2]==="="&&A--);var C=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(A):new Array(A),Q=Array.isArray(C)?C:new Uint8Array(C);for(i=0;i<r;i+=4)c=F[t.charCodeAt(i)],g=F[t.charCodeAt(i+1)],f=F[t.charCodeAt(i+2)],m=F[t.charCodeAt(i+3)],Q[o++]=c<<2|g>>4,Q[o++]=(g&15)<<4|f>>2,Q[o++]=(f&3)<<6|m&63;return C},S=function(t){for(var A=t.length,r=[],i=0;i<A;i+=2)r.push(t[i+1]<<8|t[i]);return r},V=function(t){for(var A=t.length,r=[],i=0;i<A;i+=4)r.push(t[i+3]<<24|t[i+2]<<16|t[i+1]<<8|t[i]);return r},k=5,G=11,J=2,z=G-k,eA=65536>>k,sA=1<<k,rA=sA-1,EA=1024>>k,bA=eA+EA,Ae=bA,ZA=32,cA=Ae+ZA,dA=65536>>G,qA=1<<z,NA=qA-1,he=function(t,A,r){return t.slice?t.slice(A,r):new Uint16Array(Array.prototype.slice.call(t,A,r))},Vt=function(t,A,r){return t.slice?t.slice(A,r):new Uint32Array(Array.prototype.slice.call(t,A,r))},_t=function(t,A){var r=x(t),i=Array.isArray(r)?V(r):new Uint32Array(r),o=Array.isArray(r)?S(r):new Uint16Array(r),c=24,g=he(o,c/2,i[4]/2),f=i[5]===2?he(o,(c+i[4])/2):Vt(i,Math.ceil((c+i[4])/4));return new xA(i[0],i[1],i[2],i[3],g,f)},xA=function(){function t(A,r,i,o,c,g){this.initialValue=A,this.errorValue=r,this.highStart=i,this.highValueIndex=o,this.index=c,this.data=g}return t.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>k],r=(r<<J)+(A&rA),this.data[r];if(A<=65535)return r=this.index[eA+(A-55296>>k)],r=(r<<J)+(A&rA),this.data[r];if(A<this.highStart)return r=cA-dA+(A>>G),r=this.index[r],r+=A>>k&NA,r=this.index[r],r=(r<<J)+(A&rA),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Re=0;Re<Oe.length;Re++)ct[Oe.charCodeAt(Re)]=Re;var Pa="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc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HUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAc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AA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB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gAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQB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AFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFc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ACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAE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FAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsA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HgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAI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BXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",ws=50,ka=1,Cs=2,vs=3,Oa=4,Ra=5,Qs=7,Fs=8,Us=9,de=10,pr=11,Es=12,Br=13,Na=14,ht=15,mr=16,Xt=17,dt=18,Ga=19,ys=20,fr=21,gt=22,wr=23,Ne=24,PA=25,ut=26,pt=27,Ge=28,Va=29,He=30,_a=31,Jt=32,Wt=33,Cr=34,vr=35,Qr=36,Bt=37,Fr=38,Yt=39,Zt=40,Ur=41,Is=42,Xa=43,Ja=[9001,65288],Hs="!",q="\xD7",qt="\xF7",Er=_t(Pa),ne=[He,Qr],yr=[ka,Cs,vs,Ra],Ss=[de,Fs],bs=[pt,ut],Wa=yr.concat(Ss),xs=[Fr,Yt,Zt,Cr,vr],Ya=[ht,Br],Za=function(t,A){A===void 0&&(A="strict");var r=[],i=[],o=[];return t.forEach(function(c,g){var f=Er.get(c);if(f>ws?(o.push(!0),f-=ws):o.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(c)!==-1)return i.push(g),r.push(mr);if(f===Oa||f===pr){if(g===0)return i.push(g),r.push(He);var m=r[g-1];return Wa.indexOf(m)===-1?(i.push(i[g-1]),r.push(m)):(i.push(g),r.push(He))}if(i.push(g),f===_a)return r.push(A==="strict"?fr:Bt);if(f===Is||f===Va)return r.push(He);if(f===Xa)return c>=131072&&c<=196605||c>=196608&&c<=262141?r.push(Bt):r.push(He);r.push(f)}),[i,r,o]},Ir=function(t,A,r,i){var o=i[r];if(Array.isArray(t)?t.indexOf(o)!==-1:t===o)for(var c=r;c<=i.length;){c++;var g=i[c];if(g===A)return!0;if(g!==de)break}if(o===de)for(var c=r;c>0;){c--;var f=i[c];if(Array.isArray(t)?t.indexOf(f)!==-1:t===f)for(var m=r;m<=i.length;){m++;var g=i[m];if(g===A)return!0;if(g!==de)break}if(f!==de)break}return!1},Ms=function(t,A){for(var r=t;r>=0;){var i=A[r];if(i===de)r--;else return i}return 0},qa=function(t,A,r,i,o){if(r[i]===0)return q;var c=i-1;if(Array.isArray(o)&&o[c]===!0)return q;var g=c-1,f=c+1,m=A[c],C=g>=0?A[g]:0,Q=A[f];if(m===Cs&&Q===vs)return q;if(yr.indexOf(m)!==-1)return Hs;if(yr.indexOf(Q)!==-1||Ss.indexOf(Q)!==-1)return q;if(Ms(c,A)===Fs)return qt;if(Er.get(t[c])===pr||(m===Jt||m===Wt)&&Er.get(t[f])===pr||m===Qs||Q===Qs||m===Us||[de,Br,ht].indexOf(m)===-1&&Q===Us||[Xt,dt,Ga,Ne,Ge].indexOf(Q)!==-1||Ms(c,A)===gt||Ir(wr,gt,c,A)||Ir([Xt,dt],fr,c,A)||Ir(Es,Es,c,A))return q;if(m===de)return qt;if(m===wr||Q===wr)return q;if(Q===mr||m===mr)return qt;if([Br,ht,fr].indexOf(Q)!==-1||m===Na||C===Qr&&Ya.indexOf(m)!==-1||m===Ge&&Q===Qr||Q===ys||ne.indexOf(Q)!==-1&&m===PA||ne.indexOf(m)!==-1&&Q===PA||m===pt&&[Bt,Jt,Wt].indexOf(Q)!==-1||[Bt,Jt,Wt].indexOf(m)!==-1&&Q===ut||ne.indexOf(m)!==-1&&bs.indexOf(Q)!==-1||bs.indexOf(m)!==-1&&ne.indexOf(Q)!==-1||[pt,ut].indexOf(m)!==-1&&(Q===PA||[gt,ht].indexOf(Q)!==-1&&A[f+1]===PA)||[gt,ht].indexOf(m)!==-1&&Q===PA||m===PA&&[PA,Ge,Ne].indexOf(Q)!==-1)return q;if([PA,Ge,Ne,Xt,dt].indexOf(Q)!==-1)for(var U=c;U>=0;){var I=A[U];if(I===PA)return q;if([Ge,Ne].indexOf(I)!==-1)U--;else break}if([pt,ut].indexOf(Q)!==-1)for(var U=[Xt,dt].indexOf(m)!==-1?g:c;U>=0;){var I=A[U];if(I===PA)return q;if([Ge,Ne].indexOf(I)!==-1)U--;else break}if(Fr===m&&[Fr,Yt,Cr,vr].indexOf(Q)!==-1||[Yt,Cr].indexOf(m)!==-1&&[Yt,Zt].indexOf(Q)!==-1||[Zt,vr].indexOf(m)!==-1&&Q===Zt||xs.indexOf(m)!==-1&&[ys,ut].indexOf(Q)!==-1||xs.indexOf(Q)!==-1&&m===pt||ne.indexOf(m)!==-1&&ne.indexOf(Q)!==-1||m===Ne&&ne.indexOf(Q)!==-1||ne.concat(PA).indexOf(m)!==-1&&Q===gt&&Ja.indexOf(t[f])===-1||ne.concat(PA).indexOf(Q)!==-1&&m===dt)return q;if(m===Ur&&Q===Ur){for(var P=r[c],b=1;P>0&&(P--,A[P]===Ur);)b++;if(b%2!==0)return q}return m===Jt&&Q===Wt?q:qt},$a=function(t,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var r=Za(t,A.lineBreak),i=r[0],o=r[1],c=r[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(o=o.map(function(f){return[PA,He,Is].indexOf(f)!==-1?Bt:f}));var g=A.wordBreak==="keep-all"?c.map(function(f,m){return f&&t[m]>=19968&&t[m]<=40959}):void 0;return[i,o,g]},ja=function(){function t(A,r,i,o){this.codePoints=A,this.required=r===Hs,this.start=i,this.end=o}return t.prototype.slice=function(){return p.apply(void 0,this.codePoints.slice(this.start,this.end))},t}(),za=function(t,A){var r=w(t),i=$a(r,A),o=i[0],c=i[1],g=i[2],f=r.length,m=0,C=0;return{next:function(){if(C>=f)return{done:!0,value:null};for(var Q=q;C<f&&(Q=qa(r,c,o,++C,g))===q;);if(Q!==q||C===f){var U=new ja(r,Q,m,C);return m=C,{value:U,done:!1}}return{done:!0,value:null}}}},Ao=1,eo=2,mt=4,Ls=8,$t=10,Ts=47,ft=92,to=9,io=32,jt=34,wt=61,ro=35,so=36,no=37,zt=39,Ai=40,Ct=41,ao=95,MA=45,oo=33,lo=60,co=62,ho=64,go=91,uo=93,po=61,Bo=123,ei=63,mo=125,Ds=124,fo=126,wo=128,Ks=65533,Hr=42,Se=43,Co=44,vo=58,Qo=59,vt=46,Fo=0,Uo=8,Eo=11,yo=14,Io=31,Ho=127,ee=-1,Ps=48,ks=97,Os=101,So=102,bo=117,xo=122,Rs=65,Ns=69,Gs=70,Mo=85,Lo=90,yA=function(t){return t>=Ps&&t<=57},To=function(t){return t>=55296&&t<=57343},Ve=function(t){return yA(t)||t>=Rs&&t<=Gs||t>=ks&&t<=So},Do=function(t){return t>=ks&&t<=xo},Ko=function(t){return t>=Rs&&t<=Lo},Po=function(t){return Do(t)||Ko(t)},ko=function(t){return t>=wo},ti=function(t){return t===$t||t===to||t===io},ii=function(t){return Po(t)||ko(t)||t===ao},Vs=function(t){return ii(t)||yA(t)||t===MA},Oo=function(t){return t>=Fo&&t<=Uo||t===Eo||t>=yo&&t<=Io||t===Ho},ge=function(t,A){return t!==ft?!1:A!==$t},ri=function(t,A,r){return t===MA?ii(A)||ge(A,r):ii(t)?!0:!!(t===ft&&ge(t,A))},Sr=function(t,A,r){return t===Se||t===MA?yA(A)?!0:A===vt&&yA(r):yA(t===vt?A:t)},Ro=function(t){var A=0,r=1;(t[A]===Se||t[A]===MA)&&(t[A]===MA&&(r=-1),A++);for(var i=[];yA(t[A]);)i.push(t[A++]);var o=i.length?parseInt(p.apply(void 0,i),10):0;t[A]===vt&&A++;for(var c=[];yA(t[A]);)c.push(t[A++]);var g=c.length,f=g?parseInt(p.apply(void 0,c),10):0;(t[A]===Ns||t[A]===Os)&&A++;var m=1;(t[A]===Se||t[A]===MA)&&(t[A]===MA&&(m=-1),A++);for(var C=[];yA(t[A]);)C.push(t[A++]);var Q=C.length?parseInt(p.apply(void 0,C),10):0;return r*(o+f*Math.pow(10,-g))*Math.pow(10,m*Q)},No={type:2},Go={type:3},Vo={type:4},_o={type:13},Xo={type:8},Jo={type:21},Wo={type:9},Yo={type:10},Zo={type:11},qo={type:12},$o={type:14},si={type:23},jo={type:1},zo={type:25},Al={type:24},el={type:26},tl={type:27},il={type:28},rl={type:29},sl={type:31},br={type:32},_s=function(){function t(){this._value=[]}return t.prototype.write=function(A){this._value=this._value.concat(w(A))},t.prototype.read=function(){for(var A=[],r=this.consumeToken();r!==br;)A.push(r),r=this.consumeToken();return A},t.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case jt:return this.consumeStringToken(jt);case ro:var r=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);if(Vs(r)||ge(i,o)){var c=ri(r,i,o)?eo:Ao,g=this.consumeName();return{type:5,value:g,flags:c}}break;case so:if(this.peekCodePoint(0)===wt)return this.consumeCodePoint(),_o;break;case zt:return this.consumeStringToken(zt);case Ai:return No;case Ct:return Go;case Hr:if(this.peekCodePoint(0)===wt)return this.consumeCodePoint(),$o;break;case Se:if(Sr(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Co:return Vo;case MA:var f=A,m=this.peekCodePoint(0),C=this.peekCodePoint(1);if(Sr(f,m,C))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(ri(f,m,C))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(m===MA&&C===co)return this.consumeCodePoint(),this.consumeCodePoint(),Al;break;case vt:if(Sr(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Ts:if(this.peekCodePoint(0)===Hr)for(this.consumeCodePoint();;){var Q=this.consumeCodePoint();if(Q===Hr&&(Q=this.consumeCodePoint(),Q===Ts))return this.consumeToken();if(Q===ee)return this.consumeToken()}break;case vo:return el;case Qo:return tl;case lo:if(this.peekCodePoint(0)===oo&&this.peekCodePoint(1)===MA&&this.peekCodePoint(2)===MA)return this.consumeCodePoint(),this.consumeCodePoint(),zo;break;case ho:var U=this.peekCodePoint(0),I=this.peekCodePoint(1),P=this.peekCodePoint(2);if(ri(U,I,P)){var g=this.consumeName();return{type:7,value:g}}break;case go:return il;case ft:if(ge(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case uo:return rl;case po:if(this.peekCodePoint(0)===wt)return this.consumeCodePoint(),Xo;break;case Bo:return Zo;case mo:return qo;case bo:case Mo:var b=this.peekCodePoint(0),T=this.peekCodePoint(1);return b===Se&&(Ve(T)||T===ei)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Ds:if(this.peekCodePoint(0)===wt)return this.consumeCodePoint(),Wo;if(this.peekCodePoint(0)===Ds)return this.consumeCodePoint(),Jo;break;case fo:if(this.peekCodePoint(0)===wt)return this.consumeCodePoint(),Yo;break;case ee:return br}return ti(A)?(this.consumeWhiteSpace(),sl):yA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):ii(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:p(A)}},t.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A=="undefined"?-1:A},t.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},t.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},t.prototype.consumeUnicodeRangeToken=function(){for(var A=[],r=this.consumeCodePoint();Ve(r)&&A.length<6;)A.push(r),r=this.consumeCodePoint();for(var i=!1;r===ei&&A.length<6;)A.push(r),r=this.consumeCodePoint(),i=!0;if(i){var o=parseInt(p.apply(void 0,A.map(function(m){return m===ei?Ps:m})),16),c=parseInt(p.apply(void 0,A.map(function(m){return m===ei?Gs:m})),16);return{type:30,start:o,end:c}}var g=parseInt(p.apply(void 0,A),16);if(this.peekCodePoint(0)===MA&&Ve(this.peekCodePoint(1))){this.consumeCodePoint(),r=this.consumeCodePoint();for(var f=[];Ve(r)&&f.length<6;)f.push(r),r=this.consumeCodePoint();var c=parseInt(p.apply(void 0,f),16);return{type:30,start:g,end:c}}else return{type:30,start:g,end:g}},t.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Ai?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Ai?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},t.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===ee)return{type:22,value:""};var r=this.peekCodePoint(0);if(r===zt||r===jt){var i=this.consumeStringToken(this.consumeCodePoint());return i.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===ee||this.peekCodePoint(0)===Ct)?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),si)}for(;;){var o=this.consumeCodePoint();if(o===ee||o===Ct)return{type:22,value:p.apply(void 0,A)};if(ti(o))return this.consumeWhiteSpace(),this.peekCodePoint(0)===ee||this.peekCodePoint(0)===Ct?(this.consumeCodePoint(),{type:22,value:p.apply(void 0,A)}):(this.consumeBadUrlRemnants(),si);if(o===jt||o===zt||o===Ai||Oo(o))return this.consumeBadUrlRemnants(),si;if(o===ft)if(ge(o,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),si;else A.push(o)}},t.prototype.consumeWhiteSpace=function(){for(;ti(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Ct||A===ee)return;ge(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(A){for(var r=5e4,i="";A>0;){var o=Math.min(r,A);i+=p.apply(void 0,this._value.splice(0,o)),A-=o}return this._value.shift(),i},t.prototype.consumeStringToken=function(A){var r="",i=0;do{var o=this._value[i];if(o===ee||o===void 0||o===A)return r+=this.consumeStringSlice(i),{type:0,value:r};if(o===$t)return this._value.splice(0,i),jo;if(o===ft){var c=this._value[i+1];c!==ee&&c!==void 0&&(c===$t?(r+=this.consumeStringSlice(i),i=-1,this._value.shift()):ge(o,c)&&(r+=this.consumeStringSlice(i),r+=p(this.consumeEscapedCodePoint()),i=-1))}i++}while(!0)},t.prototype.consumeNumber=function(){var A=[],r=mt,i=this.peekCodePoint(0);for((i===Se||i===MA)&&A.push(this.consumeCodePoint());yA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());i=this.peekCodePoint(0);var o=this.peekCodePoint(1);if(i===vt&&yA(o))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=Ls;yA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());i=this.peekCodePoint(0),o=this.peekCodePoint(1);var c=this.peekCodePoint(2);if((i===Ns||i===Os)&&((o===Se||o===MA)&&yA(c)||yA(o)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),r=Ls;yA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[Ro(A),r]},t.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),r=A[0],i=A[1],o=this.peekCodePoint(0),c=this.peekCodePoint(1),g=this.peekCodePoint(2);if(ri(o,c,g)){var f=this.consumeName();return{type:15,number:r,flags:i,unit:f}}return o===no?(this.consumeCodePoint(),{type:16,number:r,flags:i}):{type:17,number:r,flags:i}},t.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Ve(A)){for(var r=p(A);Ve(this.peekCodePoint(0))&&r.length<6;)r+=p(this.consumeCodePoint());ti(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(r,16);return i===0||To(i)||i>1114111?Ks:i}return A===ee?Ks:A},t.prototype.consumeName=function(){for(var A="";;){var r=this.consumeCodePoint();if(Vs(r))A+=p(r);else if(ge(r,this.peekCodePoint(0)))A+=p(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(r),A}},t}(),Xs=function(){function t(A){this._tokens=A}return t.create=function(A){var r=new _s;return r.write(A),new t(r.read())},t.parseValue=function(A){return t.create(A).parseComponentValue()},t.parseValues=function(A){return t.create(A).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var r=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return r;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var A=[];;){var r=this.consumeComponentValue();if(r.type===32)return A;A.push(r),A.push()}},t.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},t.prototype.consumeSimpleBlock=function(A){for(var r={type:A,values:[]},i=this.consumeToken();;){if(i.type===32||al(i,A))return r;this.reconsumeToken(i),r.values.push(this.consumeComponentValue()),i=this.consumeToken()}},t.prototype.consumeFunction=function(A){for(var r={name:A.value,values:[],type:18};;){var i=this.consumeToken();if(i.type===32||i.type===3)return r;this.reconsumeToken(i),r.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A=="undefined"?br:A},t.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},t}(),Qt=function(t){return t.type===15},_e=function(t){return t.type===17},nA=function(t){return t.type===20},nl=function(t){return t.type===0},xr=function(t,A){return nA(t)&&t.value===A},Js=function(t){return t.type!==31},Xe=function(t){return t.type!==31&&t.type!==4},te=function(t){var A=[],r=[];return t.forEach(function(i){if(i.type===4){if(r.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(r),r=[];return}i.type!==31&&r.push(i)}),r.length&&A.push(r),A},al=function(t,A){return A===11&&t.type===12||A===28&&t.type===29?!0:A===2&&t.type===3},ue=function(t){return t.type===17||t.type===15},uA=function(t){return t.type===16||ue(t)},Ws=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},vA={type:17,number:0,flags:mt},Mr={type:16,number:50,flags:mt},pe={type:16,number:100,flags:mt},Ft=function(t,A,r){var i=t[0],o=t[1];return[oA(i,A),oA(typeof o!="undefined"?o:i,r)]},oA=function(t,A){if(t.type===16)return t.number/100*A;if(Qt(t))switch(t.unit){case"rem":case"em":return 16*t.number;case"px":default:return t.number}return t.number},Ys="deg",Zs="grad",qs="rad",$s="turn",ni={name:"angle",parse:function(t,A){if(A.type===15)switch(A.unit){case Ys:return Math.PI*A.number/180;case Zs:return Math.PI/200*A.number;case qs:return A.number;case $s:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},js=function(t){return t.type===15&&(t.unit===Ys||t.unit===Zs||t.unit===qs||t.unit===$s)},zs=function(t){var A=t.filter(nA).map(function(r){return r.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[vA,vA];case"to top":case"bottom":return GA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[vA,pe];case"to right":case"left":return GA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[pe,pe];case"to bottom":case"top":return GA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[pe,vA];case"to left":case"right":return GA(270)}return 0},GA=function(t){return Math.PI*t/180},Be={name:"color",parse:function(t,A){if(A.type===18){var r=ol[A.name];if(typeof r=="undefined")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return r(t,A.values)}if(A.type===5){if(A.value.length===3){var i=A.value.substring(0,1),o=A.value.substring(1,2),c=A.value.substring(2,3);return fe(parseInt(i+i,16),parseInt(o+o,16),parseInt(c+c,16),1)}if(A.value.length===4){var i=A.value.substring(0,1),o=A.value.substring(1,2),c=A.value.substring(2,3),g=A.value.substring(3,4);return fe(parseInt(i+i,16),parseInt(o+o,16),parseInt(c+c,16),parseInt(g+g,16)/255)}if(A.value.length===6){var i=A.value.substring(0,2),o=A.value.substring(2,4),c=A.value.substring(4,6);return fe(parseInt(i,16),parseInt(o,16),parseInt(c,16),1)}if(A.value.length===8){var i=A.value.substring(0,2),o=A.value.substring(2,4),c=A.value.substring(4,6),g=A.value.substring(6,8);return fe(parseInt(i,16),parseInt(o,16),parseInt(c,16),parseInt(g,16)/255)}}if(A.type===20){var f=ae[A.value.toUpperCase()];if(typeof f!="undefined")return f}return ae.TRANSPARENT}},me=function(t){return(255&t)===0},fA=function(t){var A=255&t,r=255&t>>8,i=255&t>>16,o=255&t>>24;return A<255?"rgba("+o+","+i+","+r+","+A/255+")":"rgb("+o+","+i+","+r+")"},fe=function(t,A,r,i){return(t<<24|A<<16|r<<8|Math.round(i*255)<<0)>>>0},An=function(t,A){if(t.type===17)return t.number;if(t.type===16){var r=A===3?1:255;return A===3?t.number/100*r:Math.round(t.number/100*r)}return 0},en=function(t,A){var r=A.filter(Xe);if(r.length===3){var i=r.map(An),o=i[0],c=i[1],g=i[2];return fe(o,c,g,1)}if(r.length===4){var f=r.map(An),o=f[0],c=f[1],g=f[2],m=f[3];return fe(o,c,g,m)}return 0};function Lr(t,A,r){return r<0&&(r+=1),r>=1&&(r-=1),r<1/6?(A-t)*r*6+t:r<1/2?A:r<2/3?(A-t)*6*(2/3-r)+t:t}var tn=function(t,A){var r=A.filter(Xe),i=r[0],o=r[1],c=r[2],g=r[3],f=(i.type===17?GA(i.number):ni.parse(t,i))/(Math.PI*2),m=uA(o)?o.number/100:0,C=uA(c)?c.number/100:0,Q=typeof g!="undefined"&&uA(g)?oA(g,1):1;if(m===0)return fe(C*255,C*255,C*255,1);var U=C<=.5?C*(m+1):C+m-C*m,I=C*2-U,P=Lr(I,U,f+1/3),b=Lr(I,U,f),T=Lr(I,U,f-1/3);return fe(P*255,b*255,T*255,Q)},ol={hsl:tn,hsla:tn,rgb:en,rgba:en},Ut=function(t,A){return Be.parse(t,Xs.create(A).parseComponentValue())},ae={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ll={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,A){return A.map(function(r){if(nA(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},cl={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ai=function(t,A){var r=Be.parse(t,A[0]),i=A[1];return i&&uA(i)?{color:r,stop:i}:{color:r,stop:null}},rn=function(t,A){var r=t[0],i=t[t.length-1];r.stop===null&&(r.stop=vA),i.stop===null&&(i.stop=pe);for(var o=[],c=0,g=0;g<t.length;g++){var f=t[g].stop;if(f!==null){var m=oA(f,A);m>c?o.push(m):o.push(c),c=m}else o.push(null)}for(var C=null,g=0;g<o.length;g++){var Q=o[g];if(Q===null)C===null&&(C=g);else if(C!==null){for(var U=g-C,I=o[C-1],P=(Q-I)/(U+1),b=1;b<=U;b++)o[C+b-1]=P*b;C=null}}return t.map(function(T,W){var N=T.color;return{color:N,stop:Math.max(Math.min(1,o[W]/A),0)}})},hl=function(t,A,r){var i=A/2,o=r/2,c=oA(t[0],A)-i,g=o-oA(t[1],r);return(Math.atan2(g,c)+Math.PI*2)%(Math.PI*2)},dl=function(t,A,r){var i=typeof t=="number"?t:hl(t,A,r),o=Math.abs(A*Math.sin(i))+Math.abs(r*Math.cos(i)),c=A/2,g=r/2,f=o/2,m=Math.sin(i-Math.PI/2)*f,C=Math.cos(i-Math.PI/2)*f;return[o,c-C,c+C,g-m,g+m]},$A=function(t,A){return Math.sqrt(t*t+A*A)},sn=function(t,A,r,i,o){var c=[[0,0],[0,A],[t,0],[t,A]];return c.reduce(function(g,f){var m=f[0],C=f[1],Q=$A(r-m,i-C);return(o?Q<g.optimumDistance:Q>g.optimumDistance)?{optimumCorner:f,optimumDistance:Q}:g},{optimumDistance:o?1/0:-1/0,optimumCorner:null}).optimumCorner},gl=function(t,A,r,i,o){var c=0,g=0;switch(t.size){case 0:t.shape===0?c=g=Math.min(Math.abs(A),Math.abs(A-i),Math.abs(r),Math.abs(r-o)):t.shape===1&&(c=Math.min(Math.abs(A),Math.abs(A-i)),g=Math.min(Math.abs(r),Math.abs(r-o)));break;case 2:if(t.shape===0)c=g=Math.min($A(A,r),$A(A,r-o),$A(A-i,r),$A(A-i,r-o));else if(t.shape===1){var f=Math.min(Math.abs(r),Math.abs(r-o))/Math.min(Math.abs(A),Math.abs(A-i)),m=sn(i,o,A,r,!0),C=m[0],Q=m[1];c=$A(C-A,(Q-r)/f),g=f*c}break;case 1:t.shape===0?c=g=Math.max(Math.abs(A),Math.abs(A-i),Math.abs(r),Math.abs(r-o)):t.shape===1&&(c=Math.max(Math.abs(A),Math.abs(A-i)),g=Math.max(Math.abs(r),Math.abs(r-o)));break;case 3:if(t.shape===0)c=g=Math.max($A(A,r),$A(A,r-o),$A(A-i,r),$A(A-i,r-o));else if(t.shape===1){var f=Math.max(Math.abs(r),Math.abs(r-o))/Math.max(Math.abs(A),Math.abs(A-i)),U=sn(i,o,A,r,!1),C=U[0],Q=U[1];c=$A(C-A,(Q-r)/f),g=f*c}break}return Array.isArray(t.size)&&(c=oA(t.size[0],i),g=t.size.length===2?oA(t.size[1],o):c),[c,g]},ul=function(t,A){var r=GA(180),i=[];return te(A).forEach(function(o,c){if(c===0){var g=o[0];if(g.type===20&&g.value==="to"){r=zs(o);return}else if(js(g)){r=ni.parse(t,g);return}}var f=ai(t,o);i.push(f)}),{angle:r,stops:i,type:1}},oi=function(t,A){var r=GA(180),i=[];return te(A).forEach(function(o,c){if(c===0){var g=o[0];if(g.type===20&&["top","left","right","bottom"].indexOf(g.value)!==-1){r=zs(o);return}else if(js(g)){r=(ni.parse(t,g)+GA(270))%GA(360);return}}var f=ai(t,o);i.push(f)}),{angle:r,stops:i,type:1}},pl=function(t,A){var r=GA(180),i=[],o=1,c=0,g=3,f=[];return te(A).forEach(function(m,C){var Q=m[0];if(C===0){if(nA(Q)&&Q.value==="linear"){o=1;return}else if(nA(Q)&&Q.value==="radial"){o=2;return}}if(Q.type===18){if(Q.name==="from"){var U=Be.parse(t,Q.values[0]);i.push({stop:vA,color:U})}else if(Q.name==="to"){var U=Be.parse(t,Q.values[0]);i.push({stop:pe,color:U})}else if(Q.name==="color-stop"){var I=Q.values.filter(Xe);if(I.length===2){var U=Be.parse(t,I[1]),P=I[0];_e(P)&&i.push({stop:{type:16,number:P.number*100,flags:P.flags},color:U})}}}}),o===1?{angle:(r+GA(180))%GA(360),stops:i,type:o}:{size:g,shape:c,stops:i,position:f,type:o}},nn="closest-side",an="farthest-side",on="closest-corner",ln="farthest-corner",cn="circle",hn="ellipse",dn="cover",gn="contain",Bl=function(t,A){var r=0,i=3,o=[],c=[];return te(A).forEach(function(g,f){var m=!0;if(f===0){var C=!1;m=g.reduce(function(U,I){if(C)if(nA(I))switch(I.value){case"center":return c.push(Mr),U;case"top":case"left":return c.push(vA),U;case"right":case"bottom":return c.push(pe),U}else(uA(I)||ue(I))&&c.push(I);else if(nA(I))switch(I.value){case cn:return r=0,!1;case hn:return r=1,!1;case"at":return C=!0,!1;case nn:return i=0,!1;case dn:case an:return i=1,!1;case gn:case on:return i=2,!1;case ln:return i=3,!1}else if(ue(I)||uA(I))return Array.isArray(i)||(i=[]),i.push(I),!1;return U},m)}if(m){var Q=ai(t,g);o.push(Q)}}),{size:i,shape:r,stops:o,position:c,type:2}},li=function(t,A){var r=0,i=3,o=[],c=[];return te(A).forEach(function(g,f){var m=!0;if(f===0?m=g.reduce(function(Q,U){if(nA(U))switch(U.value){case"center":return c.push(Mr),!1;case"top":case"left":return c.push(vA),!1;case"right":case"bottom":return c.push(pe),!1}else if(uA(U)||ue(U))return c.push(U),!1;return Q},m):f===1&&(m=g.reduce(function(Q,U){if(nA(U))switch(U.value){case cn:return r=0,!1;case hn:return r=1,!1;case gn:case nn:return i=0,!1;case an:return i=1,!1;case on:return i=2,!1;case dn:case ln:return i=3,!1}else if(ue(U)||uA(U))return Array.isArray(i)||(i=[]),i.push(U),!1;return Q},m)),m){var C=ai(t,g);o.push(C)}}),{size:i,shape:r,stops:o,position:c,type:2}},ml=function(t){return t.type===1},fl=function(t){return t.type===2},Tr={name:"image",parse:function(t,A){if(A.type===22){var r={url:A.value,type:0};return t.cache.addImage(A.value),r}if(A.type===18){var i=un[A.name];if(typeof i=="undefined")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return i(t,A.values)}throw new Error("Unsupported image type "+A.type)}};function wl(t){return!(t.type===20&&t.value==="none")&&(t.type!==18||!!un[t.name])}var un={"linear-gradient":ul,"-moz-linear-gradient":oi,"-ms-linear-gradient":oi,"-o-linear-gradient":oi,"-webkit-linear-gradient":oi,"radial-gradient":Bl,"-moz-radial-gradient":li,"-ms-radial-gradient":li,"-o-radial-gradient":li,"-webkit-radial-gradient":li,"-webkit-gradient":pl},Cl={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A.filter(function(i){return Xe(i)&&wl(i)}).map(function(i){return Tr.parse(t,i)})}},vl={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,A){return A.map(function(r){if(nA(r))switch(r.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ql={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,A){return te(A).map(function(r){return r.filter(uA)}).map(Ws)}},Fl={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,A){return te(A).map(function(r){return r.filter(nA).map(function(i){return i.value}).join(" ")}).map(Ul)}},Ul=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Je;(function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"})(Je||(Je={}));var El={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,A){return te(A).map(function(r){return r.filter(yl)})}},yl=function(t){return nA(t)||uA(t)},ci=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Il=ci("top"),Hl=ci("right"),Sl=ci("bottom"),bl=ci("left"),hi=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(A,r){return Ws(r.filter(uA))}}},xl=hi("top-left"),Ml=hi("top-right"),Ll=hi("bottom-right"),Tl=hi("bottom-left"),di=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,r){switch(r){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Dl=di("top"),Kl=di("right"),Pl=di("bottom"),kl=di("left"),gi=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,r){return Qt(r)?r.number:0}}},Ol=gi("top"),Rl=gi("right"),Nl=gi("bottom"),Gl=gi("left"),Vl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},_l={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,A){switch(A){case"rtl":return 1;case"ltr":default:return 0}}},Xl={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,A){return A.filter(nA).reduce(function(r,i){return r|Jl(i.value)},0)}},Jl=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Wl={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Yl={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},ui;(function(t){t.NORMAL="normal",t.STRICT="strict"})(ui||(ui={}));var Zl={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,A){switch(A){case"strict":return ui.STRICT;case"normal":default:return ui.NORMAL}}},ql={name:"line-height",initialValue:"normal",prefix:!1,type:4},pn=function(t,A){return nA(t)&&t.value==="normal"?1.2*A:t.type===17?A*t.number:uA(t)?oA(t,A):A},$l={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,A){return A.type===20&&A.value==="none"?null:Tr.parse(t,A)}},jl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,A){switch(A){case"inside":return 0;case"outside":default:return 1}}},Dr={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,A){switch(A){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},pi=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},zl=pi("top"),Ac=pi("right"),ec=pi("bottom"),tc=pi("left"),ic={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,A){return A.filter(nA).map(function(r){switch(r.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},rc={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,A){switch(A){case"break-word":return"break-word";case"normal":default:return"normal"}}},Bi=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},sc=Bi("top"),nc=Bi("right"),ac=Bi("bottom"),oc=Bi("left"),lc={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,A){switch(A){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},cc={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},hc={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,A){return A.length===1&&xr(A[0],"none")?[]:te(A).map(function(r){for(var i={color:ae.TRANSPARENT,offsetX:vA,offsetY:vA,blur:vA},o=0,c=0;c<r.length;c++){var g=r[c];ue(g)?(o===0?i.offsetX=g:o===1?i.offsetY=g:i.blur=g,o++):i.color=Be.parse(t,g)}return i})}},dc={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(t,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},gc={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(t,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var r=Bc[A.name];if(typeof r=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return r(A.values)}return null}},uc=function(t){var A=t.filter(function(r){return r.type===17}).map(function(r){return r.number});return A.length===6?A:null},pc=function(t){var A=t.filter(function(m){return m.type===17}).map(function(m){return m.number}),r=A[0],i=A[1];A[2],A[3];var o=A[4],c=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var g=A[12],f=A[13];return A[14],A[15],A.length===16?[r,i,o,c,g,f]:null},Bc={matrix:uc,matrix3d:pc},Bn={type:16,number:50,flags:mt},mc=[Bn,Bn],fc={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(t,A){var r=A.filter(uA);return r.length!==2?mc:[r[0],r[1]]}},wc={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(t,A){switch(A){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Et;(function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"})(Et||(Et={}));for(var Cc={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,A){switch(A){case"break-all":return Et.BREAK_ALL;case"keep-all":return Et.KEEP_ALL;case"normal":default:return Et.NORMAL}}},vc={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(t,A){if(A.type===20)return{auto:!0,order:0};if(_e(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},mn={name:"time",parse:function(t,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},Qc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(t,A){return _e(A)?A.number:1}},Fc={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Uc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(t,A){return A.filter(nA).map(function(r){switch(r.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(r){return r!==0})}},Ec={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(t,A){var r=[],i=[];return A.forEach(function(o){switch(o.type){case 20:case 0:r.push(o.value);break;case 17:r.push(o.number.toString());break;case 4:i.push(r.join(" ")),r.length=0;break}}),r.length&&i.push(r.join(" ")),i.map(function(o){return o.indexOf(" ")===-1?o:"'"+o+"'"})}},yc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ic={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(t,A){if(_e(A))return A.number;if(nA(A))switch(A.value){case"bold":return 700;case"normal":default:return 400}return 400}},Hc={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(t,A){return A.filter(nA).map(function(r){return r.value})}},Sc={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(t,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},BA=function(t,A){return(t&A)!==0},bc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(t,A){if(A.length===0)return[];var r=A[0];return r.type===20&&r.value==="none"?[]:A}},xc={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(t,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;for(var i=[],o=A.filter(Js),c=0;c<o.length;c++){var g=o[c],f=o[c+1];if(g.type===20){var m=f&&_e(f)?f.number:1;i.push({counter:g.value,increment:m})}}return i}},Mc={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(t,A){if(A.length===0)return[];for(var r=[],i=A.filter(Js),o=0;o<i.length;o++){var c=i[o],g=i[o+1];if(nA(c)&&c.value!=="none"){var f=g&&_e(g)?g.number:0;r.push({counter:c.value,reset:f})}}return r}},Lc={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(t,A){return A.filter(Qt).map(function(r){return mn.parse(t,r)})}},Tc={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(t,A){if(A.length===0)return null;var r=A[0];if(r.type===20&&r.value==="none")return null;var i=[],o=A.filter(nl);if(o.length%2!==0)return null;for(var c=0;c<o.length;c+=2){var g=o[c].value,f=o[c+1].value;i.push({open:g,close:f})}return i}},fn=function(t,A,r){if(!t)return"";var i=t[Math.min(A,t.length-1)];return i?r?i.open:i.close:""},Dc={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,A){return A.length===1&&xr(A[0],"none")?[]:te(A).map(function(r){for(var i={color:255,offsetX:vA,offsetY:vA,blur:vA,spread:vA,inset:!1},o=0,c=0;c<r.length;c++){var g=r[c];xr(g,"inset")?i.inset=!0:ue(g)?(o===0?i.offsetX=g:o===1?i.offsetY=g:o===2?i.blur=g:i.spread=g,o++):i.color=Be.parse(t,g)}return i})}},Kc={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(t,A){var r=[0,1,2],i=[];return A.filter(nA).forEach(function(o){switch(o.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2);break}}),r.forEach(function(o){i.indexOf(o)===-1&&i.push(o)}),i}},Pc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},kc={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(t,A){return Qt(A)?A.number:0}},Oc=function(){function t(A,r){var i,o;this.animationDuration=O(A,Lc,r.animationDuration),this.backgroundClip=O(A,ll,r.backgroundClip),this.backgroundColor=O(A,cl,r.backgroundColor),this.backgroundImage=O(A,Cl,r.backgroundImage),this.backgroundOrigin=O(A,vl,r.backgroundOrigin),this.backgroundPosition=O(A,Ql,r.backgroundPosition),this.backgroundRepeat=O(A,Fl,r.backgroundRepeat),this.backgroundSize=O(A,El,r.backgroundSize),this.borderTopColor=O(A,Il,r.borderTopColor),this.borderRightColor=O(A,Hl,r.borderRightColor),this.borderBottomColor=O(A,Sl,r.borderBottomColor),this.borderLeftColor=O(A,bl,r.borderLeftColor),this.borderTopLeftRadius=O(A,xl,r.borderTopLeftRadius),this.borderTopRightRadius=O(A,Ml,r.borderTopRightRadius),this.borderBottomRightRadius=O(A,Ll,r.borderBottomRightRadius),this.borderBottomLeftRadius=O(A,Tl,r.borderBottomLeftRadius),this.borderTopStyle=O(A,Dl,r.borderTopStyle),this.borderRightStyle=O(A,Kl,r.borderRightStyle),this.borderBottomStyle=O(A,Pl,r.borderBottomStyle),this.borderLeftStyle=O(A,kl,r.borderLeftStyle),this.borderTopWidth=O(A,Ol,r.borderTopWidth),this.borderRightWidth=O(A,Rl,r.borderRightWidth),this.borderBottomWidth=O(A,Nl,r.borderBottomWidth),this.borderLeftWidth=O(A,Gl,r.borderLeftWidth),this.boxShadow=O(A,Dc,r.boxShadow),this.color=O(A,Vl,r.color),this.direction=O(A,_l,r.direction),this.display=O(A,Xl,r.display),this.float=O(A,Wl,r.cssFloat),this.fontFamily=O(A,Ec,r.fontFamily),this.fontSize=O(A,yc,r.fontSize),this.fontStyle=O(A,Sc,r.fontStyle),this.fontVariant=O(A,Hc,r.fontVariant),this.fontWeight=O(A,Ic,r.fontWeight),this.letterSpacing=O(A,Yl,r.letterSpacing),this.lineBreak=O(A,Zl,r.lineBreak),this.lineHeight=O(A,ql,r.lineHeight),this.listStyleImage=O(A,$l,r.listStyleImage),this.listStylePosition=O(A,jl,r.listStylePosition),this.listStyleType=O(A,Dr,r.listStyleType),this.marginTop=O(A,zl,r.marginTop),this.marginRight=O(A,Ac,r.marginRight),this.marginBottom=O(A,ec,r.marginBottom),this.marginLeft=O(A,tc,r.marginLeft),this.opacity=O(A,Qc,r.opacity);var c=O(A,ic,r.overflow);this.overflowX=c[0],this.overflowY=c[c.length>1?1:0],this.overflowWrap=O(A,rc,r.overflowWrap),this.paddingTop=O(A,sc,r.paddingTop),this.paddingRight=O(A,nc,r.paddingRight),this.paddingBottom=O(A,ac,r.paddingBottom),this.paddingLeft=O(A,oc,r.paddingLeft),this.paintOrder=O(A,Kc,r.paintOrder),this.position=O(A,cc,r.position),this.textAlign=O(A,lc,r.textAlign),this.textDecorationColor=O(A,Fc,(i=r.textDecorationColor)!==null&&i!==void 0?i:r.color),this.textDecorationLine=O(A,Uc,(o=r.textDecorationLine)!==null&&o!==void 0?o:r.textDecoration),this.textShadow=O(A,hc,r.textShadow),this.textTransform=O(A,dc,r.textTransform),this.transform=O(A,gc,r.transform),this.transformOrigin=O(A,fc,r.transformOrigin),this.visibility=O(A,wc,r.visibility),this.webkitTextStrokeColor=O(A,Pc,r.webkitTextStrokeColor),this.webkitTextStrokeWidth=O(A,kc,r.webkitTextStrokeWidth),this.wordBreak=O(A,Cc,r.wordBreak),this.zIndex=O(A,vc,r.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},t.prototype.isTransparent=function(){return me(this.backgroundColor)},t.prototype.isTransformed=function(){return this.transform!==null},t.prototype.isPositioned=function(){return this.position!==0},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return this.float!==0},t.prototype.isInlineLevel=function(){return BA(this.display,4)||BA(this.display,33554432)||BA(this.display,268435456)||BA(this.display,536870912)||BA(this.display,67108864)||BA(this.display,134217728)},t}(),Rc=function(){function t(A,r){this.content=O(A,bc,r.content),this.quotes=O(A,Tc,r.quotes)}return t}(),wn=function(){function t(A,r){this.counterIncrement=O(A,xc,r.counterIncrement),this.counterReset=O(A,Mc,r.counterReset)}return t}(),O=function(t,A,r){var i=new _s,o=r!==null&&typeof r!="undefined"?r.toString():A.initialValue;i.write(o);var c=new Xs(i.read());switch(A.type){case 2:var g=c.parseComponentValue();return A.parse(t,nA(g)?g.value:A.initialValue);case 0:return A.parse(t,c.parseComponentValue());case 1:return A.parse(t,c.parseComponentValues());case 4:return c.parseComponentValue();case 3:switch(A.format){case"angle":return ni.parse(t,c.parseComponentValue());case"color":return Be.parse(t,c.parseComponentValue());case"image":return Tr.parse(t,c.parseComponentValue());case"length":var f=c.parseComponentValue();return ue(f)?f:vA;case"length-percentage":var m=c.parseComponentValue();return uA(m)?m:vA;case"time":return mn.parse(t,c.parseComponentValue())}break}},Nc="data-html2canvas-debug",Gc=function(t){var A=t.getAttribute(Nc);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Kr=function(t,A){var r=Gc(t);return r===1||A===r},ie=function(){function t(A,r){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,Kr(r,3))debugger;this.styles=new Oc(A,window.getComputedStyle(r,null)),qr(r)&&(this.styles.animationDuration.some(function(i){return i>0})&&(r.style.animationDuration="0s"),this.styles.transform!==null&&(r.style.transform="none")),this.bounds=d(this.context,r),Kr(r,4)&&(this.flags|=16)}return t}(),Vc="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAA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U2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIA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GVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACA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AA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Cn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),mi=0;mi<Cn.length;mi++)yt[Cn.charCodeAt(mi)]=mi;for(var _c=function(t){var A=t.length*.75,r=t.length,i,o=0,c,g,f,m;t[t.length-1]==="="&&(A--,t[t.length-2]==="="&&A--);var C=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(A):new Array(A),Q=Array.isArray(C)?C:new Uint8Array(C);for(i=0;i<r;i+=4)c=yt[t.charCodeAt(i)],g=yt[t.charCodeAt(i+1)],f=yt[t.charCodeAt(i+2)],m=yt[t.charCodeAt(i+3)],Q[o++]=c<<2|g>>4,Q[o++]=(g&15)<<4|f>>2,Q[o++]=(f&3)<<6|m&63;return C},Xc=function(t){for(var A=t.length,r=[],i=0;i<A;i+=2)r.push(t[i+1]<<8|t[i]);return r},Jc=function(t){for(var A=t.length,r=[],i=0;i<A;i+=4)r.push(t[i+3]<<24|t[i+2]<<16|t[i+1]<<8|t[i]);return r},be=5,Pr=11,kr=2,Wc=Pr-be,vn=65536>>be,Yc=1<<be,Or=Yc-1,Zc=1024>>be,qc=vn+Zc,$c=qc,jc=32,zc=$c+jc,Ah=65536>>Pr,eh=1<<Wc,th=eh-1,Qn=function(t,A,r){return t.slice?t.slice(A,r):new Uint16Array(Array.prototype.slice.call(t,A,r))},ih=function(t,A,r){return t.slice?t.slice(A,r):new Uint32Array(Array.prototype.slice.call(t,A,r))},rh=function(t,A){var r=_c(t),i=Array.isArray(r)?Jc(r):new Uint32Array(r),o=Array.isArray(r)?Xc(r):new Uint16Array(r),c=24,g=Qn(o,c/2,i[4]/2),f=i[5]===2?Qn(o,(c+i[4])/2):ih(i,Math.ceil((c+i[4])/4));return new sh(i[0],i[1],i[2],i[3],g,f)},sh=function(){function t(A,r,i,o,c,g){this.initialValue=A,this.errorValue=r,this.highStart=i,this.highValueIndex=o,this.index=c,this.data=g}return t.prototype.get=function(A){var r;if(A>=0){if(A<55296||A>56319&&A<=65535)return r=this.index[A>>be],r=(r<<kr)+(A&Or),this.data[r];if(A<=65535)return r=this.index[vn+(A-55296>>be)],r=(r<<kr)+(A&Or),this.data[r];if(A<this.highStart)return r=zc-Ah+(A>>Pr),r=this.index[r],r+=A>>be&th,r=this.index[r],r=(r<<kr)+(A&Or),this.data[r];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t}(),Fn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),fi=0;fi<Fn.length;fi++)nh[Fn.charCodeAt(fi)]=fi;var ah=1,Rr=2,Nr=3,Un=4,En=5,oh=7,yn=8,Gr=9,Vr=10,In=11,Hn=12,Sn=13,bn=14,_r=15,lh=function(t){for(var A=[],r=0,i=t.length;r<i;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<i){var c=t.charCodeAt(r++);(c&64512)===56320?A.push(((o&1023)<<10)+(c&1023)+65536):(A.push(o),r--)}else A.push(o)}return A},ch=function(){for(var t=[],A=0;A<arguments.length;A++)t[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var r=t.length;if(!r)return"";for(var i=[],o=-1,c="";++o<r;){var g=t[o];g<=65535?i.push(g):(g-=65536,i.push((g>>10)+55296,g%1024+56320)),(o+1===r||i.length>16384)&&(c+=String.fromCharCode.apply(String,i),i.length=0)}return c},hh=rh(Vc),VA="\xD7",Xr="\xF7",dh=function(t){return hh.get(t)},gh=function(t,A,r){var i=r-2,o=A[i],c=A[r-1],g=A[r];if(c===Rr&&g===Nr)return VA;if(c===Rr||c===Nr||c===Un||g===Rr||g===Nr||g===Un)return Xr;if(c===yn&&[yn,Gr,In,Hn].indexOf(g)!==-1||(c===In||c===Gr)&&(g===Gr||g===Vr)||(c===Hn||c===Vr)&&g===Vr||g===Sn||g===En||g===oh||c===ah)return VA;if(c===Sn&&g===bn){for(;o===En;)o=A[--i];if(o===bn)return VA}if(c===_r&&g===_r){for(var f=0;o===_r;)f++,o=A[--i];if(f%2===0)return VA}return Xr},uh=function(t){var A=lh(t),r=A.length,i=0,o=0,c=A.map(dh);return{next:function(){if(i>=r)return{done:!0,value:null};for(var g=VA;i<r&&(g=gh(A,c,++i))===VA;);if(g!==VA||i===r){var f=ch.apply(null,A.slice(o,i));return o=i,{value:f,done:!1}}return{done:!0,value:null}}}},ph=function(t){for(var A=uh(t),r=[],i;!(i=A.next()).done;)i.value&&r.push(i.value.slice());return r},Bh=function(t){var A=123;if(t.createRange){var r=t.createRange();if(r.getBoundingClientRect){var i=t.createElement("boundtest");i.style.height=A+"px",i.style.display="block",t.body.appendChild(i),r.selectNode(i);var o=r.getBoundingClientRect(),c=Math.round(o.height);if(t.body.removeChild(i),c===A)return!0}}return!1},mh=function(t){var A=t.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",t.body.appendChild(A);var r=t.createRange();A.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var i=A.firstChild,o=w(i.data).map(function(m){return p(m)}),c=0,g={},f=o.every(function(m,C){r.setStart(i,c),r.setEnd(i,c+m.length);var Q=r.getBoundingClientRect();c+=m.length;var U=Q.x>g.x||Q.y>g.y;return g=Q,C===0?!0:U});return t.body.removeChild(A),f},fh=function(){return typeof new Image().crossOrigin!="undefined"},wh=function(){return typeof new XMLHttpRequest().responseType=="string"},Ch=function(t){var A=new Image,r=t.createElement("canvas"),i=r.getContext("2d");if(!i)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(A,0,0),r.toDataURL()}catch(o){return!1}return!0},xn=function(t){return t[0]===0&&t[1]===255&&t[2]===0&&t[3]===255},vh=function(t){var A=t.createElement("canvas"),r=100;A.width=r,A.height=r;var i=A.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,r,r);var o=new Image,c=A.toDataURL();o.src=c;var g=Jr(r,r,0,0,o);return i.fillStyle="red",i.fillRect(0,0,r,r),Mn(g).then(function(f){i.drawImage(f,0,0);var m=i.getImageData(0,0,r,r).data;i.fillStyle="red",i.fillRect(0,0,r,r);var C=t.createElement("div");return C.style.backgroundImage="url("+c+")",C.style.height=r+"px",xn(m)?Mn(Jr(r,r,0,0,C)):Promise.reject(!1)}).then(function(f){return i.drawImage(f,0,0),xn(i.getImageData(0,0,r,r).data)}).catch(function(){return!1})},Jr=function(t,A,r,i,o){var c="http://www.w3.org/2000/svg",g=document.createElementNS(c,"svg"),f=document.createElementNS(c,"foreignObject");return g.setAttributeNS(null,"width",t.toString()),g.setAttributeNS(null,"height",A.toString()),f.setAttributeNS(null,"width","100%"),f.setAttributeNS(null,"height","100%"),f.setAttributeNS(null,"x",r.toString()),f.setAttributeNS(null,"y",i.toString()),f.setAttributeNS(null,"externalResourcesRequired","true"),g.appendChild(f),f.appendChild(o),g},Mn=function(t){return new Promise(function(A,r){var i=new Image;i.onload=function(){return A(i)},i.onerror=r,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},QA={get SUPPORT_RANGE_BOUNDS(){var t=Bh(document);return Object.defineProperty(QA,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=QA.SUPPORT_RANGE_BOUNDS&&mh(document);return Object.defineProperty(QA,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=Ch(document);return Object.defineProperty(QA,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t=typeof Array.from=="function"&&typeof window.fetch=="function"?vh(document):Promise.resolve(!1);return Object.defineProperty(QA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=fh();return Object.defineProperty(QA,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t=wh();return Object.defineProperty(QA,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(QA,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(QA,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},It=function(){function t(A,r){this.text=A,this.bounds=r}return t}(),Qh=function(t,A,r,i){var o=Eh(A,r),c=[],g=0;return o.forEach(function(f){if(r.textDecorationLine.length||f.trim().length>0)if(QA.SUPPORT_RANGE_BOUNDS){var m=Ln(i,g,f.length).getClientRects();if(m.length>1){var C=Wr(f),Q=0;C.forEach(function(I){c.push(new It(I,h.fromDOMRectList(t,Ln(i,Q+g,I.length).getClientRects()))),Q+=I.length})}else c.push(new It(f,h.fromDOMRectList(t,m)))}else{var U=i.splitText(f.length);c.push(new It(f,Fh(t,i))),i=U}else QA.SUPPORT_RANGE_BOUNDS||(i=i.splitText(f.length));g+=f.length}),c},Fh=function(t,A){var r=A.ownerDocument;if(r){var i=r.createElement("html2canvaswrapper");i.appendChild(A.cloneNode(!0));var o=A.parentNode;if(o){o.replaceChild(i,A);var c=d(t,i);return i.firstChild&&o.replaceChild(i.firstChild,i),c}}return h.EMPTY},Ln=function(t,A,r){var i=t.ownerDocument;if(!i)throw new Error("Node has no owner document");var o=i.createRange();return o.setStart(t,A),o.setEnd(t,A+r),o},Wr=function(t){if(QA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(t)).map(function(r){return r.segment})}return ph(t)},Uh=function(t,A){if(QA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var r=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(r.segment(t)).map(function(i){return i.segment})}return Ih(t,A)},Eh=function(t,A){return A.letterSpacing!==0?Wr(t):Uh(t,A)},yh=[32,160,4961,65792,65793,4153,4241],Ih=function(t,A){for(var r=za(t,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),i=[],o,c=function(){if(o.value){var g=o.value.slice(),f=w(g),m="";f.forEach(function(C){yh.indexOf(C)===-1?m+=p(C):(m.length&&i.push(m),i.push(p(C)),m="")}),m.length&&i.push(m)}};!(o=r.next()).done;)c();return i},Hh=function(){function t(A,r,i){this.text=Sh(r.data,i.textTransform),this.textBounds=Qh(A,this.text,i,r)}return t}(),Sh=function(t,A){switch(A){case 1:return t.toLowerCase();case 3:return t.replace(bh,xh);case 2:return t.toUpperCase();default:return t}},bh=/(^|\s|:|-|\(|\))([a-z])/g,xh=function(t,A,r){return t.length>0?A+r.toUpperCase():t},Tn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.src=i.currentSrc||i.src,o.intrinsicWidth=i.naturalWidth,o.intrinsicHeight=i.naturalHeight,o.context.cache.addImage(o.src),o}return A}(ie),Dn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.canvas=i,o.intrinsicWidth=i.width,o.intrinsicHeight=i.height,o}return A}(ie),Kn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this,c=new XMLSerializer,g=d(r,i);return i.setAttribute("width",g.width+"px"),i.setAttribute("height",g.height+"px"),o.svg="data:image/svg+xml,"+encodeURIComponent(c.serializeToString(i)),o.intrinsicWidth=i.width.baseVal.value,o.intrinsicHeight=i.height.baseVal.value,o.context.cache.addImage(o.svg),o}return A}(ie),Pn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.value=i.value,o}return A}(ie),Yr=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.start=i.start,o.reversed=typeof i.reversed=="boolean"&&i.reversed===!0,o}return A}(ie),Mh=[{type:15,flags:0,unit:"px",number:3}],Lh=[{type:16,flags:0,number:50}],Th=function(t){return t.width>t.height?new h(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width<t.height?new h(t.left,t.top+(t.height-t.width)/2,t.width,t.width):t},Dh=function(t){var A=t.type===Kh?new Array(t.value.length+1).join("\u2022"):t.value;return A.length===0?t.placeholder||"":A},wi="checkbox",Ci="radio",Kh="password",kn=707406591,Zr=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;switch(o.type=i.type.toLowerCase(),o.checked=i.checked,o.value=Dh(i),(o.type===wi||o.type===Ci)&&(o.styles.backgroundColor=3739148031,o.styles.borderTopColor=o.styles.borderRightColor=o.styles.borderBottomColor=o.styles.borderLeftColor=2779096575,o.styles.borderTopWidth=o.styles.borderRightWidth=o.styles.borderBottomWidth=o.styles.borderLeftWidth=1,o.styles.borderTopStyle=o.styles.borderRightStyle=o.styles.borderBottomStyle=o.styles.borderLeftStyle=1,o.styles.backgroundClip=[0],o.styles.backgroundOrigin=[0],o.bounds=Th(o.bounds)),o.type){case wi:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=Mh;break;case Ci:o.styles.borderTopRightRadius=o.styles.borderTopLeftRadius=o.styles.borderBottomRightRadius=o.styles.borderBottomLeftRadius=Lh;break}return o}return A}(ie),On=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this,c=i.options[i.selectedIndex||0];return o.value=c&&c.text||"",o}return A}(ie),Rn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.value=i.value,o}return A}(ie),Nn=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;o.src=i.src,o.width=parseInt(i.width,10)||0,o.height=parseInt(i.height,10)||0,o.backgroundColor=o.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){o.tree=Vn(r,i.contentWindow.document.documentElement);var c=i.contentWindow.document.documentElement?Ut(r,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):ae.TRANSPARENT,g=i.contentWindow.document.body?Ut(r,getComputedStyle(i.contentWindow.document.body).backgroundColor):ae.TRANSPARENT;o.backgroundColor=me(c)?me(g)?o.styles.backgroundColor:g:c}}catch(f){}return o}return A}(ie),Ph=["OL","UL","MENU"],vi=function(t,A,r,i){for(var o=A.firstChild,c=void 0;o;o=c)if(c=o.nextSibling,_n(o)&&o.data.trim().length>0)r.textNodes.push(new Hh(t,o,r.styles));else if(We(o))if(qn(o)&&o.assignedNodes)o.assignedNodes().forEach(function(f){return vi(t,f,r,i)});else{var g=Gn(t,o);g.styles.isVisible()&&(kh(o,g,i)?g.flags|=4:Oh(g.styles)&&(g.flags|=2),Ph.indexOf(o.tagName)!==-1&&(g.flags|=8),r.elements.push(g),o.slot,o.shadowRoot?vi(t,o.shadowRoot,g,i):!Fi(o)&&!Xn(o)&&!Ui(o)&&vi(t,o,g,i))}},Gn=function(t,A){return jr(A)?new Tn(t,A):Jn(A)?new Dn(t,A):Xn(A)?new Kn(t,A):Rh(A)?new Pn(t,A):Nh(A)?new Yr(t,A):Gh(A)?new Zr(t,A):Ui(A)?new On(t,A):Fi(A)?new Rn(t,A):Yn(A)?new Nn(t,A):new ie(t,A)},Vn=function(t,A){var r=Gn(t,A);return r.flags|=4,vi(t,A,r,r),r},kh=function(t,A,r){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||$r(t)&&r.styles.isTransparent()},Oh=function(t){return t.isPositioned()||t.isFloating()},_n=function(t){return t.nodeType===Node.TEXT_NODE},We=function(t){return t.nodeType===Node.ELEMENT_NODE},qr=function(t){return We(t)&&typeof t.style!="undefined"&&!Qi(t)},Qi=function(t){return typeof t.className=="object"},Rh=function(t){return t.tagName==="LI"},Nh=function(t){return t.tagName==="OL"},Gh=function(t){return t.tagName==="INPUT"},Vh=function(t){return t.tagName==="HTML"},Xn=function(t){return t.tagName==="svg"},$r=function(t){return t.tagName==="BODY"},Jn=function(t){return t.tagName==="CANVAS"},Wn=function(t){return t.tagName==="VIDEO"},jr=function(t){return t.tagName==="IMG"},Yn=function(t){return t.tagName==="IFRAME"},Zn=function(t){return t.tagName==="STYLE"},_h=function(t){return t.tagName==="SCRIPT"},Fi=function(t){return t.tagName==="TEXTAREA"},Ui=function(t){return t.tagName==="SELECT"},qn=function(t){return t.tagName==="SLOT"},$n=function(t){return t.tagName.indexOf("-")>0},Xh=function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(A){var r=this.counters[A];return r&&r.length?r[r.length-1]:1},t.prototype.getCounterValues=function(A){var r=this.counters[A];return r||[]},t.prototype.pop=function(A){var r=this;A.forEach(function(i){return r.counters[i].pop()})},t.prototype.parse=function(A){var r=this,i=A.counterIncrement,o=A.counterReset,c=!0;i!==null&&i.forEach(function(f){var m=r.counters[f.counter];m&&f.increment!==0&&(c=!1,m.length||m.push(1),m[Math.max(0,m.length-1)]+=f.increment)});var g=[];return c&&o.forEach(function(f){var m=r.counters[f.counter];g.push(f.counter),m||(m=r.counters[f.counter]=[]),m.push(f.reset)}),g},t}(),jn={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},zn={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Jh={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Wh={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},Ye=function(t,A,r,i,o,c){return t<A||t>r?St(t,o,c.length>0):i.integers.reduce(function(g,f,m){for(;t>=f;)t-=f,g+=i.values[m];return g},"")+c},Aa=function(t,A,r,i){var o="";do r||t--,o=i(t)+o,t/=A;while(t*A>=A);return o},gA=function(t,A,r,i,o){var c=r-A+1;return(t<0?"-":"")+(Aa(Math.abs(t),c,i,function(g){return p(Math.floor(g%c)+A)})+o)},xe=function(t,A,r){r===void 0&&(r=". ");var i=A.length;return Aa(Math.abs(t),i,!1,function(o){return A[Math.floor(o%i)]})+r},Ze=1,we=2,Ce=4,Ht=8,oe=function(t,A,r,i,o,c){if(t<-9999||t>9999)return St(t,4,o.length>0);var g=Math.abs(t),f=o;if(g===0)return A[0]+f;for(var m=0;g>0&&m<=4;m++){var C=g%10;C===0&&BA(c,Ze)&&f!==""?f=A[C]+f:C>1||C===1&&m===0||C===1&&m===1&&BA(c,we)||C===1&&m===1&&BA(c,Ce)&&t>100||C===1&&m>1&&BA(c,Ht)?f=A[C]+(m>0?r[m-1]:"")+f:C===1&&m>0&&(f=r[m-1]+f),g=Math.floor(g/10)}return(t<0?i:"")+f},ea="\u5341\u767E\u5343\u842C",ta="\u62FE\u4F70\u4EDF\u842C",ia="\u30DE\u30A4\u30CA\u30B9",zr="\uB9C8\uC774\uB108\uC2A4",St=function(t,A,r){var i=r?". ":"",o=r?"\u3001":"",c=r?", ":"",g=r?" ":"";switch(A){case 0:return"\u2022"+g;case 1:return"\u25E6"+g;case 2:return"\u25FE"+g;case 5:var f=gA(t,48,57,!0,i);return f.length<4?"0"+f:f;case 4:return xe(t,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",o);case 6:return Ye(t,1,3999,jn,3,i).toLowerCase();case 7:return Ye(t,1,3999,jn,3,i);case 8:return gA(t,945,969,!1,i);case 9:return gA(t,97,122,!1,i);case 10:return gA(t,65,90,!1,i);case 11:return gA(t,1632,1641,!0,i);case 12:case 49:return Ye(t,1,9999,zn,3,i);case 35:return Ye(t,1,9999,zn,3,i).toLowerCase();case 13:return gA(t,2534,2543,!0,i);case 14:case 30:return gA(t,6112,6121,!0,i);case 15:return xe(t,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",o);case 16:return xe(t,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",o);case 17:case 48:return oe(t,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ea,"\u8CA0",o,we|Ce|Ht);case 47:return oe(t,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",ta,"\u8CA0",o,Ze|we|Ce|Ht);case 42:return oe(t,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",ea,"\u8D1F",o,we|Ce|Ht);case 41:return oe(t,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",ta,"\u8D1F",o,Ze|we|Ce|Ht);case 26:return oe(t,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",ia,o,0);case 25:return oe(t,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",ia,o,Ze|we|Ce);case 31:return oe(t,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",zr,c,Ze|we|Ce);case 33:return oe(t,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",zr,c,0);case 32:return oe(t,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",zr,c,Ze|we|Ce);case 18:return gA(t,2406,2415,!0,i);case 20:return Ye(t,1,19999,Wh,3,i);case 21:return gA(t,2790,2799,!0,i);case 22:return gA(t,2662,2671,!0,i);case 22:return Ye(t,1,10999,Jh,3,i);case 23:return xe(t,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return xe(t,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return gA(t,3302,3311,!0,i);case 28:return xe(t,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",o);case 29:return xe(t,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",o);case 34:return gA(t,3792,3801,!0,i);case 37:return gA(t,6160,6169,!0,i);case 38:return gA(t,4160,4169,!0,i);case 39:return gA(t,2918,2927,!0,i);case 40:return gA(t,1776,1785,!0,i);case 43:return gA(t,3046,3055,!0,i);case 44:return gA(t,3174,3183,!0,i);case 45:return gA(t,3664,3673,!0,i);case 46:return gA(t,3872,3881,!0,i);case 3:default:return gA(t,48,57,!0,i)}},ra="data-html2canvas-ignore",sa=function(){function t(A,r,i){if(this.context=A,this.options=i,this.scrolledElements=[],this.referenceElement=r,this.counters=new Xh,this.quoteDepth=0,!r.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(r.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(A,r){var i=this,o=Yh(A,r);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var c=A.defaultView.pageXOffset,g=A.defaultView.pageYOffset,f=o.contentWindow,m=f.document,C=$h(o).then(function(){return s(i,void 0,void 0,function(){var Q,U;return n(this,function(I){switch(I.label){case 0:return this.scrolledElements.forEach(ed),f&&(f.scrollTo(r.left,r.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(f.scrollY!==r.top||f.scrollX!==r.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(f.scrollX-r.left,f.scrollY-r.top,0,0))),Q=this.options.onclone,U=this.clonedReferenceElement,typeof U=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:m.fonts&&m.fonts.ready?[4,m.fonts.ready]:[3,2];case 1:I.sent(),I.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,qh(m)]:[3,4];case 3:I.sent(),I.label=4;case 4:return typeof Q=="function"?[2,Promise.resolve().then(function(){return Q(m,U)}).then(function(){return o})]:[2,o]}})})});return m.open(),m.write(zh(document.doctype)+"<html></html>"),Ad(this.referenceElement.ownerDocument,c,g),m.replaceChild(m.adoptNode(this.documentElement),m.documentElement),m.close(),C},t.prototype.createElementClone=function(A){if(Kr(A,2))debugger;if(Jn(A))return this.createCanvasClone(A);if(Wn(A))return this.createVideoClone(A);if(Zn(A))return this.createStyleClone(A);var r=A.cloneNode(!1);return jr(r)&&(jr(A)&&A.currentSrc&&A.currentSrc!==A.src&&(r.src=A.currentSrc,r.srcset=""),r.loading==="lazy"&&(r.loading="eager")),$n(r)?this.createCustomElementClone(r):r},t.prototype.createCustomElementClone=function(A){var r=document.createElement("html2canvascustomelement");return As(A.style,r),r},t.prototype.createStyleClone=function(A){try{var r=A.sheet;if(r&&r.cssRules){var i=[].slice.call(r.cssRules,0).reduce(function(c,g){return g&&typeof g.cssText=="string"?c+g.cssText:c},""),o=A.cloneNode(!1);return o.textContent=i,o}}catch(c){if(this.context.logger.error("Unable to access cssRules property",c),c.name!=="SecurityError")throw c}return A.cloneNode(!1)},t.prototype.createCanvasClone=function(A){var r;if(this.options.inlineImages&&A.ownerDocument){var i=A.ownerDocument.createElement("img");try{return i.src=A.toDataURL(),i}catch(C){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var o=A.cloneNode(!1);try{o.width=A.width,o.height=A.height;var c=A.getContext("2d"),g=o.getContext("2d");if(g)if(!this.options.allowTaint&&c)g.putImageData(c.getImageData(0,0,A.width,A.height),0,0);else{var f=(r=A.getContext("webgl2"))!==null&&r!==void 0?r:A.getContext("webgl");if(f){var m=f.getContextAttributes();(m==null?void 0:m.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}g.drawImage(A,0,0)}return o}catch(C){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return o},t.prototype.createVideoClone=function(A){var r=A.ownerDocument.createElement("canvas");r.width=A.offsetWidth,r.height=A.offsetHeight;var i=r.getContext("2d");try{return i&&(i.drawImage(A,0,0,r.width,r.height),this.options.allowTaint||i.getImageData(0,0,r.width,r.height)),r}catch(c){this.context.logger.info("Unable to clone video as it is tainted",A)}var o=A.ownerDocument.createElement("canvas");return o.width=A.offsetWidth,o.height=A.offsetHeight,o},t.prototype.appendChildNode=function(A,r,i){(!We(r)||!_h(r)&&!r.hasAttribute(ra)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(r)))&&(!this.options.copyStyles||!We(r)||!Zn(r))&&A.appendChild(this.cloneNode(r,i))},t.prototype.cloneChildNodes=function(A,r,i){for(var o=this,c=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;c;c=c.nextSibling)if(We(c)&&qn(c)&&typeof c.assignedNodes=="function"){var g=c.assignedNodes();g.length&&g.forEach(function(f){return o.appendChildNode(r,f,i)})}else this.appendChildNode(r,c,i)},t.prototype.cloneNode=function(A,r){if(_n(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var i=A.ownerDocument.defaultView;if(i&&We(A)&&(qr(A)||Qi(A))){var o=this.createElementClone(A);o.style.transitionProperty="none";var c=i.getComputedStyle(A),g=i.getComputedStyle(A,":before"),f=i.getComputedStyle(A,":after");this.referenceElement===A&&qr(o)&&(this.clonedReferenceElement=o),$r(o)&&rd(o);var m=this.counters.parse(new wn(this.context,c)),C=this.resolvePseudoContent(A,o,g,bt.BEFORE);$n(A)&&(r=!0),Wn(A)||this.cloneChildNodes(A,o,r),C&&o.insertBefore(C,o.firstChild);var Q=this.resolvePseudoContent(A,o,f,bt.AFTER);return Q&&o.appendChild(Q),this.counters.pop(m),(c&&(this.options.copyStyles||Qi(A))&&!Yn(A)||r)&&As(c,o),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([o,A.scrollLeft,A.scrollTop]),(Fi(A)||Ui(A))&&(Fi(o)||Ui(o))&&(o.value=A.value),o}return A.cloneNode(!1)},t.prototype.resolvePseudoContent=function(A,r,i,o){var c=this;if(i){var g=i.content,f=r.ownerDocument;if(!(!f||!g||g==="none"||g==="-moz-alt-content"||i.display==="none")){this.counters.parse(new wn(this.context,i));var m=new Rc(this.context,i),C=f.createElement("html2canvaspseudoelement");As(i,C),m.content.forEach(function(U){if(U.type===0)C.appendChild(f.createTextNode(U.value));else if(U.type===22){var I=f.createElement("img");I.src=U.value,I.style.opacity="1",C.appendChild(I)}else if(U.type===18){if(U.name==="attr"){var P=U.values.filter(nA);P.length&&C.appendChild(f.createTextNode(A.getAttribute(P[0].value)||""))}else if(U.name==="counter"){var b=U.values.filter(Xe),T=b[0],W=b[1];if(T&&nA(T)){var N=c.counters.getCounterValue(T.value),R=W&&nA(W)?Dr.parse(c.context,W.value):3;C.appendChild(f.createTextNode(St(N,R,!1)))}}else if(U.name==="counters"){var AA=U.values.filter(Xe),T=AA[0],Z=AA[1],W=AA[2];if(T&&nA(T)){var _=c.counters.getCounterValues(T.value),K=W&&nA(W)?Dr.parse(c.context,W.value):3,$=Z&&Z.type===0?Z.value:"",j=_.map(function(LA){return St(LA,K,!1)}).join($);C.appendChild(f.createTextNode(j))}}}else if(U.type===20)switch(U.value){case"open-quote":C.appendChild(f.createTextNode(fn(m.quotes,c.quoteDepth++,!0)));break;case"close-quote":C.appendChild(f.createTextNode(fn(m.quotes,--c.quoteDepth,!1)));break;default:C.appendChild(f.createTextNode(U.value))}}),C.className=es+" "+ts;var Q=o===bt.BEFORE?" "+es:" "+ts;return Qi(r)?r.className.baseValue+=Q:r.className+=Q,C}}},t.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},t}(),bt;(function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"})(bt||(bt={}));var Yh=function(t,A){var r=t.createElement("iframe");return r.className="html2canvas-container",r.style.visibility="hidden",r.style.position="fixed",r.style.left="-10000px",r.style.top="0px",r.style.border="0",r.width=A.width.toString(),r.height=A.height.toString(),r.scrolling="no",r.setAttribute(ra,"true"),t.body.appendChild(r),r},Zh=function(t){return new Promise(function(A){if(t.complete){A();return}if(!t.src){A();return}t.onload=A,t.onerror=A})},qh=function(t){return Promise.all([].slice.call(t.images,0).map(Zh))},$h=function(t){return new Promise(function(A,r){var i=t.contentWindow;if(!i)return r("No window assigned for iframe");var o=i.document;i.onload=t.onload=function(){i.onload=t.onload=null;var c=setInterval(function(){o.body.childNodes.length>0&&o.readyState==="complete"&&(clearInterval(c),A(t))},50)}})},jh=["all","d","content"],As=function(t,A){for(var r=t.length-1;r>=0;r--){var i=t.item(r);jh.indexOf(i)===-1&&A.style.setProperty(i,t.getPropertyValue(i))}return A},zh=function(t){var A="";return t&&(A+="<!DOCTYPE ",t.name&&(A+=t.name),t.internalSubset&&(A+=t.internalSubset),t.publicId&&(A+='"'+t.publicId+'"'),t.systemId&&(A+='"'+t.systemId+'"'),A+=">"),A},Ad=function(t,A,r){t&&t.defaultView&&(A!==t.defaultView.pageXOffset||r!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(A,r)},ed=function(t){var A=t[0],r=t[1],i=t[2];A.scrollLeft=r,A.scrollTop=i},td=":before",id=":after",es="___html2canvas___pseudoelement_before",ts="___html2canvas___pseudoelement_after",na=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,rd=function(t){sd(t,"."+es+td+na+`
|
|
.`+ts+id+na)},sd=function(t,A){var r=t.ownerDocument;if(r){var i=r.createElement("style");i.textContent=A,t.appendChild(i)}},aa=function(){function t(){}return t.getOrigin=function(A){var r=t._link;return r?(r.href=A,r.href=r.href,r.protocol+r.hostname+r.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t}(),nd=function(){function t(A,r){this.context=A,this._options=r,this._cache={}}return t.prototype.addImage=function(A){var r=Promise.resolve();return this.has(A)||(rs(A)||cd(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),r},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return s(this,void 0,void 0,function(){var r,i,o,c,g=this;return n(this,function(f){switch(f.label){case 0:return r=aa.isSameOrigin(A),i=!is(A)&&this._options.useCORS===!0&&QA.SUPPORT_CORS_IMAGES&&!r,o=!is(A)&&!r&&!rs(A)&&typeof this._options.proxy=="string"&&QA.SUPPORT_CORS_XHR&&!i,!r&&this._options.allowTaint===!1&&!is(A)&&!rs(A)&&!o&&!i?[2]:(c=A,o?[4,this.proxy(c)]:[3,2]);case 1:c=f.sent(),f.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(m,C){var Q=new Image;Q.onload=function(){return m(Q)},Q.onerror=C,(hd(c)||i)&&(Q.crossOrigin="anonymous"),Q.src=c,Q.complete===!0&&setTimeout(function(){return m(Q)},500),g._options.imageTimeout>0&&setTimeout(function(){return C("Timed out ("+g._options.imageTimeout+"ms) loading image")},g._options.imageTimeout)})];case 3:return[2,f.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]!="undefined"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var r=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var o=A.substring(0,256);return new Promise(function(c,g){var f=QA.SUPPORT_RESPONSE_TYPE?"blob":"text",m=new XMLHttpRequest;m.onload=function(){if(m.status===200)if(f==="text")c(m.response);else{var U=new FileReader;U.addEventListener("load",function(){return c(U.result)},!1),U.addEventListener("error",function(I){return g(I)},!1),U.readAsDataURL(m.response)}else g("Failed to proxy resource "+o+" with status code "+m.status)},m.onerror=g;var C=i.indexOf("?")>-1?"&":"?";if(m.open("GET",""+i+C+"url="+encodeURIComponent(A)+"&responseType="+f),f!=="text"&&m instanceof XMLHttpRequest&&(m.responseType=f),r._options.imageTimeout){var Q=r._options.imageTimeout;m.timeout=Q,m.ontimeout=function(){return g("Timed out ("+Q+"ms) proxying "+o)}}m.send()})},t}(),ad=/^data:image\/svg\+xml/i,od=/^data:image\/.*;base64,/i,ld=/^data:image\/.*/i,cd=function(t){return QA.SUPPORT_SVG_DRAWING||!dd(t)},is=function(t){return ld.test(t)},hd=function(t){return od.test(t)},rs=function(t){return t.substr(0,4)==="blob"},dd=function(t){return t.substr(-3).toLowerCase()==="svg"||ad.test(t)},D=function(){function t(A,r){this.type=0,this.x=A,this.y=r}return t.prototype.add=function(A,r){return new t(this.x+A,this.y+r)},t}(),qe=function(t,A,r){return new D(t.x+(A.x-t.x)*r,t.y+(A.y-t.y)*r)},Ei=function(){function t(A,r,i,o){this.type=1,this.start=A,this.startControl=r,this.endControl=i,this.end=o}return t.prototype.subdivide=function(A,r){var i=qe(this.start,this.startControl,A),o=qe(this.startControl,this.endControl,A),c=qe(this.endControl,this.end,A),g=qe(i,o,A),f=qe(o,c,A),m=qe(g,f,A);return r?new t(this.start,i,g,m):new t(m,f,c,this.end)},t.prototype.add=function(A,r){return new t(this.start.add(A,r),this.startControl.add(A,r),this.endControl.add(A,r),this.end.add(A,r))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),_A=function(t){return t.type===1},gd=function(){function t(A){var r=A.styles,i=A.bounds,o=Ft(r.borderTopLeftRadius,i.width,i.height),c=o[0],g=o[1],f=Ft(r.borderTopRightRadius,i.width,i.height),m=f[0],C=f[1],Q=Ft(r.borderBottomRightRadius,i.width,i.height),U=Q[0],I=Q[1],P=Ft(r.borderBottomLeftRadius,i.width,i.height),b=P[0],T=P[1],W=[];W.push((c+m)/i.width),W.push((b+U)/i.width),W.push((g+T)/i.height),W.push((C+I)/i.height);var N=Math.max.apply(Math,W);N>1&&(c/=N,g/=N,m/=N,C/=N,U/=N,I/=N,b/=N,T/=N);var R=i.width-m,AA=i.height-I,Z=i.width-U,_=i.height-T,K=r.borderTopWidth,$=r.borderRightWidth,j=r.borderBottomWidth,X=r.borderLeftWidth,pA=oA(r.paddingTop,A.bounds.width),LA=oA(r.paddingRight,A.bounds.width),kA=oA(r.paddingBottom,A.bounds.width),aA=oA(r.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=c>0||g>0?lA(i.left+X/3,i.top+K/3,c-X/3,g-K/3,tA.TOP_LEFT):new D(i.left+X/3,i.top+K/3),this.topRightBorderDoubleOuterBox=c>0||g>0?lA(i.left+R,i.top+K/3,m-$/3,C-K/3,tA.TOP_RIGHT):new D(i.left+i.width-$/3,i.top+K/3),this.bottomRightBorderDoubleOuterBox=U>0||I>0?lA(i.left+Z,i.top+AA,U-$/3,I-j/3,tA.BOTTOM_RIGHT):new D(i.left+i.width-$/3,i.top+i.height-j/3),this.bottomLeftBorderDoubleOuterBox=b>0||T>0?lA(i.left+X/3,i.top+_,b-X/3,T-j/3,tA.BOTTOM_LEFT):new D(i.left+X/3,i.top+i.height-j/3),this.topLeftBorderDoubleInnerBox=c>0||g>0?lA(i.left+X*2/3,i.top+K*2/3,c-X*2/3,g-K*2/3,tA.TOP_LEFT):new D(i.left+X*2/3,i.top+K*2/3),this.topRightBorderDoubleInnerBox=c>0||g>0?lA(i.left+R,i.top+K*2/3,m-$*2/3,C-K*2/3,tA.TOP_RIGHT):new D(i.left+i.width-$*2/3,i.top+K*2/3),this.bottomRightBorderDoubleInnerBox=U>0||I>0?lA(i.left+Z,i.top+AA,U-$*2/3,I-j*2/3,tA.BOTTOM_RIGHT):new D(i.left+i.width-$*2/3,i.top+i.height-j*2/3),this.bottomLeftBorderDoubleInnerBox=b>0||T>0?lA(i.left+X*2/3,i.top+_,b-X*2/3,T-j*2/3,tA.BOTTOM_LEFT):new D(i.left+X*2/3,i.top+i.height-j*2/3),this.topLeftBorderStroke=c>0||g>0?lA(i.left+X/2,i.top+K/2,c-X/2,g-K/2,tA.TOP_LEFT):new D(i.left+X/2,i.top+K/2),this.topRightBorderStroke=c>0||g>0?lA(i.left+R,i.top+K/2,m-$/2,C-K/2,tA.TOP_RIGHT):new D(i.left+i.width-$/2,i.top+K/2),this.bottomRightBorderStroke=U>0||I>0?lA(i.left+Z,i.top+AA,U-$/2,I-j/2,tA.BOTTOM_RIGHT):new D(i.left+i.width-$/2,i.top+i.height-j/2),this.bottomLeftBorderStroke=b>0||T>0?lA(i.left+X/2,i.top+_,b-X/2,T-j/2,tA.BOTTOM_LEFT):new D(i.left+X/2,i.top+i.height-j/2),this.topLeftBorderBox=c>0||g>0?lA(i.left,i.top,c,g,tA.TOP_LEFT):new D(i.left,i.top),this.topRightBorderBox=m>0||C>0?lA(i.left+R,i.top,m,C,tA.TOP_RIGHT):new D(i.left+i.width,i.top),this.bottomRightBorderBox=U>0||I>0?lA(i.left+Z,i.top+AA,U,I,tA.BOTTOM_RIGHT):new D(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=b>0||T>0?lA(i.left,i.top+_,b,T,tA.BOTTOM_LEFT):new D(i.left,i.top+i.height),this.topLeftPaddingBox=c>0||g>0?lA(i.left+X,i.top+K,Math.max(0,c-X),Math.max(0,g-K),tA.TOP_LEFT):new D(i.left+X,i.top+K),this.topRightPaddingBox=m>0||C>0?lA(i.left+Math.min(R,i.width-$),i.top+K,R>i.width+$?0:Math.max(0,m-$),Math.max(0,C-K),tA.TOP_RIGHT):new D(i.left+i.width-$,i.top+K),this.bottomRightPaddingBox=U>0||I>0?lA(i.left+Math.min(Z,i.width-X),i.top+Math.min(AA,i.height-j),Math.max(0,U-$),Math.max(0,I-j),tA.BOTTOM_RIGHT):new D(i.left+i.width-$,i.top+i.height-j),this.bottomLeftPaddingBox=b>0||T>0?lA(i.left+X,i.top+Math.min(_,i.height-j),Math.max(0,b-X),Math.max(0,T-j),tA.BOTTOM_LEFT):new D(i.left+X,i.top+i.height-j),this.topLeftContentBox=c>0||g>0?lA(i.left+X+aA,i.top+K+pA,Math.max(0,c-(X+aA)),Math.max(0,g-(K+pA)),tA.TOP_LEFT):new D(i.left+X+aA,i.top+K+pA),this.topRightContentBox=m>0||C>0?lA(i.left+Math.min(R,i.width+X+aA),i.top+K+pA,R>i.width+X+aA?0:m-X+aA,C-(K+pA),tA.TOP_RIGHT):new D(i.left+i.width-($+LA),i.top+K+pA),this.bottomRightContentBox=U>0||I>0?lA(i.left+Math.min(Z,i.width-(X+aA)),i.top+Math.min(AA,i.height+K+pA),Math.max(0,U-($+LA)),I-(j+kA),tA.BOTTOM_RIGHT):new D(i.left+i.width-($+LA),i.top+i.height-(j+kA)),this.bottomLeftContentBox=b>0||T>0?lA(i.left+X+aA,i.top+_,Math.max(0,b-(X+aA)),T-(j+kA),tA.BOTTOM_LEFT):new D(i.left+X+aA,i.top+i.height-(j+kA))}return t}(),tA;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(tA||(tA={}));var lA=function(t,A,r,i,o){var c=4*((Math.sqrt(2)-1)/3),g=r*c,f=i*c,m=t+r,C=A+i;switch(o){case tA.TOP_LEFT:return new Ei(new D(t,C),new D(t,C-f),new D(m-g,A),new D(m,A));case tA.TOP_RIGHT:return new Ei(new D(t,A),new D(t+g,A),new D(m,C-f),new D(m,C));case tA.BOTTOM_RIGHT:return new Ei(new D(m,A),new D(m,A+f),new D(t+g,C),new D(t,C));case tA.BOTTOM_LEFT:default:return new Ei(new D(m,C),new D(m-g,C),new D(t,A+f),new D(t,A))}},yi=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},ud=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Ii=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},pd=function(){function t(A,r,i){this.offsetX=A,this.offsetY=r,this.matrix=i,this.type=0,this.target=6}return t}(),Hi=function(){function t(A,r){this.path=A,this.target=r,this.type=1}return t}(),Bd=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),md=function(t){return t.type===0},oa=function(t){return t.type===1},fd=function(t){return t.type===2},la=function(t,A){return t.length===A.length?t.some(function(r,i){return r===A[i]}):!1},wd=function(t,A,r,i,o){return t.map(function(c,g){switch(g){case 0:return c.add(A,r);case 1:return c.add(A+i,r);case 2:return c.add(A+i,r+o);case 3:return c.add(A,r+o)}return c})},ca=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),ha=function(){function t(A,r){if(this.container=A,this.parent=r,this.effects=[],this.curves=new gd(this.container),this.container.styles.opacity<1&&this.effects.push(new Bd(this.container.styles.opacity)),this.container.styles.transform!==null){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,o=this.container.bounds.top+this.container.styles.transformOrigin[1].number,c=this.container.styles.transform;this.effects.push(new pd(i,o,c))}if(this.container.styles.overflowX!==0){var g=yi(this.curves),f=Ii(this.curves);la(g,f)?this.effects.push(new Hi(g,6)):(this.effects.push(new Hi(g,2)),this.effects.push(new Hi(f,4)))}}return t.prototype.getEffects=function(A){for(var r=[2,3].indexOf(this.container.styles.position)===-1,i=this.parent,o=this.effects.slice(0);i;){var c=i.effects.filter(function(m){return!oa(m)});if(r||i.container.styles.position!==0||!i.parent){if(o.unshift.apply(o,c),r=[2,3].indexOf(i.container.styles.position)===-1,i.container.styles.overflowX!==0){var g=yi(i.curves),f=Ii(i.curves);la(g,f)||o.unshift(new Hi(f,6))}}else o.unshift.apply(o,c);i=i.parent}return o.filter(function(m){return BA(m.target,A)})},t}(),ss=function(t,A,r,i){t.container.elements.forEach(function(o){var c=BA(o.flags,4),g=BA(o.flags,2),f=new ha(o,t);BA(o.styles.display,2048)&&i.push(f);var m=BA(o.flags,8)?[]:i;if(c||g){var C=c||o.styles.isPositioned()?r:A,Q=new ca(f);if(o.styles.isPositioned()||o.styles.opacity<1||o.styles.isTransformed()){var U=o.styles.zIndex.order;if(U<0){var I=0;C.negativeZIndex.some(function(b,T){return U>b.element.container.styles.zIndex.order?(I=T,!1):I>0}),C.negativeZIndex.splice(I,0,Q)}else if(U>0){var P=0;C.positiveZIndex.some(function(b,T){return U>=b.element.container.styles.zIndex.order?(P=T+1,!1):P>0}),C.positiveZIndex.splice(P,0,Q)}else C.zeroOrAutoZIndexOrTransformedOrOpacity.push(Q)}else o.styles.isFloating()?C.nonPositionedFloats.push(Q):C.nonPositionedInlineLevel.push(Q);ss(f,Q,c?Q:r,m)}else o.styles.isInlineLevel()?A.inlineLevel.push(f):A.nonInlineLevel.push(f),ss(f,A,r,m);BA(o.flags,8)&&da(o,m)})},da=function(t,A){for(var r=t instanceof Yr?t.start:1,i=t instanceof Yr?t.reversed:!1,o=0;o<A.length;o++){var c=A[o];c.container instanceof Pn&&typeof c.container.value=="number"&&c.container.value!==0&&(r=c.container.value),c.listValue=St(r,c.container.styles.listStyleType,!0),r+=i?-1:1}},Cd=function(t){var A=new ha(t,null),r=new ca(A),i=[];return ss(A,r,r,i),da(A.container,i),r},ga=function(t,A){switch(A){case 0:return XA(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return XA(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return XA(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return XA(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},vd=function(t,A){switch(A){case 0:return XA(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return XA(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return XA(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return XA(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},Qd=function(t,A){switch(A){case 0:return XA(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return XA(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return XA(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return XA(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},Fd=function(t,A){switch(A){case 0:return Si(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Si(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Si(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Si(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Si=function(t,A){var r=[];return _A(t)?r.push(t.subdivide(.5,!1)):r.push(t),_A(A)?r.push(A.subdivide(.5,!0)):r.push(A),r},XA=function(t,A,r,i){var o=[];return _A(t)?o.push(t.subdivide(.5,!1)):o.push(t),_A(r)?o.push(r.subdivide(.5,!0)):o.push(r),_A(i)?o.push(i.subdivide(.5,!0).reverse()):o.push(i),_A(A)?o.push(A.subdivide(.5,!1).reverse()):o.push(A),o},ua=function(t){var A=t.bounds,r=t.styles;return A.add(r.borderLeftWidth,r.borderTopWidth,-(r.borderRightWidth+r.borderLeftWidth),-(r.borderTopWidth+r.borderBottomWidth))},bi=function(t){var A=t.styles,r=t.bounds,i=oA(A.paddingLeft,r.width),o=oA(A.paddingRight,r.width),c=oA(A.paddingTop,r.width),g=oA(A.paddingBottom,r.width);return r.add(i+A.borderLeftWidth,c+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+i+o),-(A.borderTopWidth+A.borderBottomWidth+c+g))},Ud=function(t,A){return t===0?A.bounds:t===2?bi(A):ua(A)},Ed=function(t,A){return t===0?A.bounds:t===2?bi(A):ua(A)},ns=function(t,A,r){var i=Ud(je(t.styles.backgroundOrigin,A),t),o=Ed(je(t.styles.backgroundClip,A),t),c=yd(je(t.styles.backgroundSize,A),r,i),g=c[0],f=c[1],m=Ft(je(t.styles.backgroundPosition,A),i.width-g,i.height-f),C=Id(je(t.styles.backgroundRepeat,A),m,c,i,o),Q=Math.round(i.left+m[0]),U=Math.round(i.top+m[1]);return[C,Q,U,g,f]},$e=function(t){return nA(t)&&t.value===Je.AUTO},xi=function(t){return typeof t=="number"},yd=function(t,A,r){var i=A[0],o=A[1],c=A[2],g=t[0],f=t[1];if(!g)return[0,0];if(uA(g)&&f&&uA(f))return[oA(g,r.width),oA(f,r.height)];var m=xi(c);if(nA(g)&&(g.value===Je.CONTAIN||g.value===Je.COVER)){if(xi(c)){var C=r.width/r.height;return C<c!=(g.value===Je.COVER)?[r.width,r.width/c]:[r.height*c,r.height]}return[r.width,r.height]}var Q=xi(i),U=xi(o),I=Q||U;if($e(g)&&(!f||$e(f))){if(Q&&U)return[i,o];if(!m&&!I)return[r.width,r.height];if(I&&m){var P=Q?i:o*c,b=U?o:i/c;return[P,b]}var T=Q?i:r.width,W=U?o:r.height;return[T,W]}if(m){var N=0,R=0;return uA(g)?N=oA(g,r.width):uA(f)&&(R=oA(f,r.height)),$e(g)?N=R*c:(!f||$e(f))&&(R=N/c),[N,R]}var AA=null,Z=null;if(uA(g)?AA=oA(g,r.width):f&&uA(f)&&(Z=oA(f,r.height)),AA!==null&&(!f||$e(f))&&(Z=Q&&U?AA/i*o:r.height),Z!==null&&$e(g)&&(AA=Q&&U?Z/o*i:r.width),AA!==null&&Z!==null)return[AA,Z];throw new Error("Unable to calculate background-size for element")},je=function(t,A){var r=t[A];return typeof r=="undefined"?t[0]:r},Id=function(t,A,r,i,o){var c=A[0],g=A[1],f=r[0],m=r[1];switch(t){case 2:return[new D(Math.round(i.left),Math.round(i.top+g)),new D(Math.round(i.left+i.width),Math.round(i.top+g)),new D(Math.round(i.left+i.width),Math.round(m+i.top+g)),new D(Math.round(i.left),Math.round(m+i.top+g))];case 3:return[new D(Math.round(i.left+c),Math.round(i.top)),new D(Math.round(i.left+c+f),Math.round(i.top)),new D(Math.round(i.left+c+f),Math.round(i.height+i.top)),new D(Math.round(i.left+c),Math.round(i.height+i.top))];case 1:return[new D(Math.round(i.left+c),Math.round(i.top+g)),new D(Math.round(i.left+c+f),Math.round(i.top+g)),new D(Math.round(i.left+c+f),Math.round(i.top+g+m)),new D(Math.round(i.left+c),Math.round(i.top+g+m))];default:return[new D(Math.round(o.left),Math.round(o.top)),new D(Math.round(o.left+o.width),Math.round(o.top)),new D(Math.round(o.left+o.width),Math.round(o.height+o.top)),new D(Math.round(o.left),Math.round(o.height+o.top))]}},Hd="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",pa="Hidden Text",Sd=function(){function t(A){this._data={},this._document=A}return t.prototype.parseMetrics=function(A,r){var i=this._document.createElement("div"),o=this._document.createElement("img"),c=this._document.createElement("span"),g=this._document.body;i.style.visibility="hidden",i.style.fontFamily=A,i.style.fontSize=r,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",g.appendChild(i),o.src=Hd,o.width=1,o.height=1,o.style.margin="0",o.style.padding="0",o.style.verticalAlign="baseline",c.style.fontFamily=A,c.style.fontSize=r,c.style.margin="0",c.style.padding="0",c.appendChild(this._document.createTextNode(pa)),i.appendChild(c),i.appendChild(o);var f=o.offsetTop-c.offsetTop+2;i.removeChild(c),i.appendChild(this._document.createTextNode(pa)),i.style.lineHeight="normal",o.style.verticalAlign="super";var m=o.offsetTop-i.offsetTop+2;return g.removeChild(i),{baseline:f,middle:m}},t.prototype.getMetrics=function(A,r){var i=A+" "+r;return typeof this._data[i]=="undefined"&&(this._data[i]=this.parseMetrics(A,r)),this._data[i]},t}(),Ba=function(){function t(A,r){this.context=A,this.options=r}return t}(),bd=1e4,xd=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o._activeEffects=[],o.canvas=i.canvas?i.canvas:document.createElement("canvas"),o.ctx=o.canvas.getContext("2d"),i.canvas||(o.canvas.width=Math.floor(i.width*i.scale),o.canvas.height=Math.floor(i.height*i.scale),o.canvas.style.width=i.width+"px",o.canvas.style.height=i.height+"px"),o.fontMetrics=new Sd(document),o.ctx.scale(o.options.scale,o.options.scale),o.ctx.translate(-i.x,-i.y),o.ctx.textBaseline="bottom",o._activeEffects=[],o.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),o}return A.prototype.applyEffects=function(r){for(var i=this;this._activeEffects.length;)this.popEffect();r.forEach(function(o){return i.applyEffect(o)})},A.prototype.applyEffect=function(r){this.ctx.save(),fd(r)&&(this.ctx.globalAlpha=r.opacity),md(r)&&(this.ctx.translate(r.offsetX,r.offsetY),this.ctx.transform(r.matrix[0],r.matrix[1],r.matrix[2],r.matrix[3],r.matrix[4],r.matrix[5]),this.ctx.translate(-r.offsetX,-r.offsetY)),oa(r)&&(this.path(r.path),this.ctx.clip()),this._activeEffects.push(r)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(r){return s(this,void 0,void 0,function(){var i;return n(this,function(o){switch(o.label){case 0:return i=r.element.container.styles,i.isVisible()?[4,this.renderStackContent(r)]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(r){return s(this,void 0,void 0,function(){return n(this,function(i){switch(i.label){case 0:if(BA(r.container.flags,16))debugger;return r.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(r)]:[3,3];case 1:return i.sent(),[4,this.renderNodeContent(r)];case 2:i.sent(),i.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(r,i,o){var c=this;if(i===0)this.ctx.fillText(r.text,r.bounds.left,r.bounds.top+o);else{var g=Wr(r.text);g.reduce(function(f,m){return c.ctx.fillText(m,f,r.bounds.top+o),f+c.ctx.measureText(m).width},r.bounds.left)}},A.prototype.createFontStyle=function(r){var i=r.fontVariant.filter(function(g){return g==="normal"||g==="small-caps"}).join(""),o=Kd(r.fontFamily).join(", "),c=Qt(r.fontSize)?""+r.fontSize.number+r.fontSize.unit:r.fontSize.number+"px";return[[r.fontStyle,i,r.fontWeight,c,o].join(" "),o,c]},A.prototype.renderTextNode=function(r,i){return s(this,void 0,void 0,function(){var o,c,g,f,m,C,Q,U,I=this;return n(this,function(P){return o=this.createFontStyle(i),c=o[0],g=o[1],f=o[2],this.ctx.font=c,this.ctx.direction=i.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",m=this.fontMetrics.getMetrics(g,f),C=m.baseline,Q=m.middle,U=i.paintOrder,r.textBounds.forEach(function(b){U.forEach(function(T){switch(T){case 0:I.ctx.fillStyle=fA(i.color),I.renderTextWithLetterSpacing(b,i.letterSpacing,C);var W=i.textShadow;W.length&&b.text.trim().length&&(W.slice(0).reverse().forEach(function(N){I.ctx.shadowColor=fA(N.color),I.ctx.shadowOffsetX=N.offsetX.number*I.options.scale,I.ctx.shadowOffsetY=N.offsetY.number*I.options.scale,I.ctx.shadowBlur=N.blur.number,I.renderTextWithLetterSpacing(b,i.letterSpacing,C)}),I.ctx.shadowColor="",I.ctx.shadowOffsetX=0,I.ctx.shadowOffsetY=0,I.ctx.shadowBlur=0),i.textDecorationLine.length&&(I.ctx.fillStyle=fA(i.textDecorationColor||i.color),i.textDecorationLine.forEach(function(N){switch(N){case 1:I.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top+C),b.bounds.width,1);break;case 2:I.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top),b.bounds.width,1);break;case 3:I.ctx.fillRect(b.bounds.left,Math.ceil(b.bounds.top+Q),b.bounds.width,1);break}}));break;case 1:i.webkitTextStrokeWidth&&b.text.trim().length&&(I.ctx.strokeStyle=fA(i.webkitTextStrokeColor),I.ctx.lineWidth=i.webkitTextStrokeWidth,I.ctx.lineJoin=window.chrome?"miter":"round",I.ctx.strokeText(b.text,b.bounds.left,b.bounds.top+C)),I.ctx.strokeStyle="",I.ctx.lineWidth=0,I.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(r,i,o){if(o&&r.intrinsicWidth>0&&r.intrinsicHeight>0){var c=bi(r),g=Ii(i);this.path(g),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(o,0,0,r.intrinsicWidth,r.intrinsicHeight,c.left,c.top,c.width,c.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(r){return s(this,void 0,void 0,function(){var i,o,c,g,f,m,R,R,C,Q,U,I,Z,P,b,_,T,W,N,R,AA,Z,_;return n(this,function(K){switch(K.label){case 0:this.applyEffects(r.getEffects(4)),i=r.container,o=r.curves,c=i.styles,g=0,f=i.textNodes,K.label=1;case 1:return g<f.length?(m=f[g],[4,this.renderTextNode(m,c)]):[3,4];case 2:K.sent(),K.label=3;case 3:return g++,[3,1];case 4:if(!(i instanceof Tn))return[3,8];K.label=5;case 5:return K.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return R=K.sent(),this.renderReplacedElement(i,o,R),[3,8];case 7:return K.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof Dn&&this.renderReplacedElement(i,o,i.canvas),!(i instanceof Kn))return[3,12];K.label=9;case 9:return K.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return R=K.sent(),this.renderReplacedElement(i,o,R),[3,12];case 11:return K.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof Nn&&i.tree?(C=new A(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}),[4,C.render(i.tree)]):[3,14];case 13:Q=K.sent(),i.width&&i.height&&this.ctx.drawImage(Q,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),K.label=14;case 14:if(i instanceof Zr&&(U=Math.min(i.bounds.width,i.bounds.height),i.type===wi?i.checked&&(this.ctx.save(),this.path([new D(i.bounds.left+U*.39363,i.bounds.top+U*.79),new D(i.bounds.left+U*.16,i.bounds.top+U*.5549),new D(i.bounds.left+U*.27347,i.bounds.top+U*.44071),new D(i.bounds.left+U*.39694,i.bounds.top+U*.5649),new D(i.bounds.left+U*.72983,i.bounds.top+U*.23),new D(i.bounds.left+U*.84,i.bounds.top+U*.34085),new D(i.bounds.left+U*.39363,i.bounds.top+U*.79)]),this.ctx.fillStyle=fA(kn),this.ctx.fill(),this.ctx.restore()):i.type===Ci&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+U/2,i.bounds.top+U/2,U/4,0,Math.PI*2,!0),this.ctx.fillStyle=fA(kn),this.ctx.fill(),this.ctx.restore())),Md(i)&&i.value.length){switch(I=this.createFontStyle(c),Z=I[0],P=I[1],b=this.fontMetrics.getMetrics(Z,P).baseline,this.ctx.font=Z,this.ctx.fillStyle=fA(c.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Td(i.styles.textAlign),_=bi(i),T=0,i.styles.textAlign){case 1:T+=_.width/2;break;case 2:T+=_.width;break}W=_.add(T,0,0,-_.height/2+1),this.ctx.save(),this.path([new D(_.left,_.top),new D(_.left+_.width,_.top),new D(_.left+_.width,_.top+_.height),new D(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new It(i.value,W),c.letterSpacing,b),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!BA(i.styles.display,2048))return[3,20];if(i.styles.listStyleImage===null)return[3,19];if(N=i.styles.listStyleImage,N.type!==0)return[3,18];R=void 0,AA=N.url,K.label=15;case 15:return K.trys.push([15,17,,18]),[4,this.context.cache.match(AA)];case 16:return R=K.sent(),this.ctx.drawImage(R,i.bounds.left-(R.width+10),i.bounds.top),[3,18];case 17:return K.sent(),this.context.logger.error("Error loading list-style-image "+AA),[3,18];case 18:return[3,20];case 19:r.listValue&&i.styles.listStyleType!==-1&&(Z=this.createFontStyle(c)[0],this.ctx.font=Z,this.ctx.fillStyle=fA(c.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new h(i.bounds.left,i.bounds.top+oA(i.styles.paddingTop,i.bounds.width),i.bounds.width,pn(c.lineHeight,c.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new It(r.listValue,_),c.letterSpacing,pn(c.lineHeight,c.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),K.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(r){return s(this,void 0,void 0,function(){var i,o,N,c,g,N,f,m,N,C,Q,N,U,I,N,P,b,N,T,W,N;return n(this,function(R){switch(R.label){case 0:if(BA(r.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(r.element)];case 1:R.sent(),i=0,o=r.negativeZIndex,R.label=2;case 2:return i<o.length?(N=o[i],[4,this.renderStack(N)]):[3,5];case 3:R.sent(),R.label=4;case 4:return i++,[3,2];case 5:return[4,this.renderNodeContent(r.element)];case 6:R.sent(),c=0,g=r.nonInlineLevel,R.label=7;case 7:return c<g.length?(N=g[c],[4,this.renderNode(N)]):[3,10];case 8:R.sent(),R.label=9;case 9:return c++,[3,7];case 10:f=0,m=r.nonPositionedFloats,R.label=11;case 11:return f<m.length?(N=m[f],[4,this.renderStack(N)]):[3,14];case 12:R.sent(),R.label=13;case 13:return f++,[3,11];case 14:C=0,Q=r.nonPositionedInlineLevel,R.label=15;case 15:return C<Q.length?(N=Q[C],[4,this.renderStack(N)]):[3,18];case 16:R.sent(),R.label=17;case 17:return C++,[3,15];case 18:U=0,I=r.inlineLevel,R.label=19;case 19:return U<I.length?(N=I[U],[4,this.renderNode(N)]):[3,22];case 20:R.sent(),R.label=21;case 21:return U++,[3,19];case 22:P=0,b=r.zeroOrAutoZIndexOrTransformedOrOpacity,R.label=23;case 23:return P<b.length?(N=b[P],[4,this.renderStack(N)]):[3,26];case 24:R.sent(),R.label=25;case 25:return P++,[3,23];case 26:T=0,W=r.positiveZIndex,R.label=27;case 27:return T<W.length?(N=W[T],[4,this.renderStack(N)]):[3,30];case 28:R.sent(),R.label=29;case 29:return T++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(r){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(r.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(r){this.ctx.beginPath(),this.formatPath(r),this.ctx.closePath()},A.prototype.formatPath=function(r){var i=this;r.forEach(function(o,c){var g=_A(o)?o.start:o;c===0?i.ctx.moveTo(g.x,g.y):i.ctx.lineTo(g.x,g.y),_A(o)&&i.ctx.bezierCurveTo(o.startControl.x,o.startControl.y,o.endControl.x,o.endControl.y,o.end.x,o.end.y)})},A.prototype.renderRepeat=function(r,i,o,c){this.path(r),this.ctx.fillStyle=i,this.ctx.translate(o,c),this.ctx.fill(),this.ctx.translate(-o,-c)},A.prototype.resizeImage=function(r,i,o){var c;if(r.width===i&&r.height===o)return r;var g=(c=this.canvas.ownerDocument)!==null&&c!==void 0?c:document,f=g.createElement("canvas");f.width=Math.max(1,i),f.height=Math.max(1,o);var m=f.getContext("2d");return m.drawImage(r,0,0,r.width,r.height,0,0,i,o),f},A.prototype.renderBackgroundImage=function(r){return s(this,void 0,void 0,function(){var i,o,c,g,f,m;return n(this,function(C){switch(C.label){case 0:i=r.styles.backgroundImage.length-1,o=function(Q){var U,I,P,pA,TA,DA,aA,FA,j,b,pA,TA,DA,aA,FA,T,W,N,R,AA,Z,_,K,$,j,X,pA,LA,kA,aA,FA,ve,TA,DA,Me,re,Qe,Le,Te,le,De,ce;return n(this,function(ze){switch(ze.label){case 0:if(Q.type!==0)return[3,5];U=void 0,I=Q.url,ze.label=1;case 1:return ze.trys.push([1,3,,4]),[4,c.context.cache.match(I)];case 2:return U=ze.sent(),[3,4];case 3:return ze.sent(),c.context.logger.error("Error loading background-image "+I),[3,4];case 4:return U&&(P=ns(r,i,[U.width,U.height,U.width/U.height]),pA=P[0],TA=P[1],DA=P[2],aA=P[3],FA=P[4],j=c.ctx.createPattern(c.resizeImage(U,aA,FA),"repeat"),c.renderRepeat(pA,j,TA,DA)),[3,6];case 5:ml(Q)?(b=ns(r,i,[null,null,null]),pA=b[0],TA=b[1],DA=b[2],aA=b[3],FA=b[4],T=dl(Q.angle,aA,FA),W=T[0],N=T[1],R=T[2],AA=T[3],Z=T[4],_=document.createElement("canvas"),_.width=aA,_.height=FA,K=_.getContext("2d"),$=K.createLinearGradient(N,AA,R,Z),rn(Q.stops,W).forEach(function(xt){return $.addColorStop(xt.stop,fA(xt.color))}),K.fillStyle=$,K.fillRect(0,0,aA,FA),aA>0&&FA>0&&(j=c.ctx.createPattern(_,"repeat"),c.renderRepeat(pA,j,TA,DA))):fl(Q)&&(X=ns(r,i,[null,null,null]),pA=X[0],LA=X[1],kA=X[2],aA=X[3],FA=X[4],ve=Q.position.length===0?[Mr]:Q.position,TA=oA(ve[0],aA),DA=oA(ve[ve.length-1],FA),Me=gl(Q,TA,DA,aA,FA),re=Me[0],Qe=Me[1],re>0&&Qe>0&&(Le=c.ctx.createRadialGradient(LA+TA,kA+DA,0,LA+TA,kA+DA,re),rn(Q.stops,re*2).forEach(function(xt){return Le.addColorStop(xt.stop,fA(xt.color))}),c.path(pA),c.ctx.fillStyle=Le,re!==Qe?(Te=r.bounds.left+.5*r.bounds.width,le=r.bounds.top+.5*r.bounds.height,De=Qe/re,ce=1/De,c.ctx.save(),c.ctx.translate(Te,le),c.ctx.transform(1,0,0,De,0,0),c.ctx.translate(-Te,-le),c.ctx.fillRect(LA,ce*(kA-le)+le,aA,FA*ce),c.ctx.restore()):c.ctx.fill())),ze.label=6;case 6:return i--,[2]}})},c=this,g=0,f=r.styles.backgroundImage.slice(0).reverse(),C.label=1;case 1:return g<f.length?(m=f[g],[5,o(m)]):[3,4];case 2:C.sent(),C.label=3;case 3:return g++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(r,i,o){return s(this,void 0,void 0,function(){return n(this,function(c){return this.path(ga(o,i)),this.ctx.fillStyle=fA(r),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(r,i,o,c){return s(this,void 0,void 0,function(){var g,f;return n(this,function(m){switch(m.label){case 0:return i<3?[4,this.renderSolidBorder(r,o,c)]:[3,2];case 1:return m.sent(),[2];case 2:return g=vd(c,o),this.path(g),this.ctx.fillStyle=fA(r),this.ctx.fill(),f=Qd(c,o),this.path(f),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(r){return s(this,void 0,void 0,function(){var i,o,c,g,f,m,C,Q,U=this;return n(this,function(I){switch(I.label){case 0:return this.applyEffects(r.getEffects(2)),i=r.container.styles,o=!me(i.backgroundColor)||i.backgroundImage.length,c=[{style:i.borderTopStyle,color:i.borderTopColor,width:i.borderTopWidth},{style:i.borderRightStyle,color:i.borderRightColor,width:i.borderRightWidth},{style:i.borderBottomStyle,color:i.borderBottomColor,width:i.borderBottomWidth},{style:i.borderLeftStyle,color:i.borderLeftColor,width:i.borderLeftWidth}],g=Ld(je(i.backgroundClip,0),r.curves),o||i.boxShadow.length?(this.ctx.save(),this.path(g),this.ctx.clip(),me(i.backgroundColor)||(this.ctx.fillStyle=fA(i.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(r.container)]):[3,2];case 1:I.sent(),this.ctx.restore(),i.boxShadow.slice(0).reverse().forEach(function(P){U.ctx.save();var b=yi(r.curves),T=P.inset?0:bd,W=wd(b,-T+(P.inset?1:-1)*P.spread.number,(P.inset?1:-1)*P.spread.number,P.spread.number*(P.inset?-2:2),P.spread.number*(P.inset?-2:2));P.inset?(U.path(b),U.ctx.clip(),U.mask(W)):(U.mask(b),U.ctx.clip(),U.path(W)),U.ctx.shadowOffsetX=P.offsetX.number+T,U.ctx.shadowOffsetY=P.offsetY.number,U.ctx.shadowColor=fA(P.color),U.ctx.shadowBlur=P.blur.number,U.ctx.fillStyle=P.inset?fA(P.color):"rgba(0,0,0,1)",U.ctx.fill(),U.ctx.restore()}),I.label=2;case 2:f=0,m=0,C=c,I.label=3;case 3:return m<C.length?(Q=C[m],Q.style!==0&&!me(Q.color)&&Q.width>0?Q.style!==2?[3,5]:[4,this.renderDashedDottedBorder(Q.color,Q.width,f,r.curves,2)]:[3,11]):[3,13];case 4:return I.sent(),[3,11];case 5:return Q.style!==3?[3,7]:[4,this.renderDashedDottedBorder(Q.color,Q.width,f,r.curves,3)];case 6:return I.sent(),[3,11];case 7:return Q.style!==4?[3,9]:[4,this.renderDoubleBorder(Q.color,Q.width,f,r.curves)];case 8:return I.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Q.color,f,r.curves)];case 10:I.sent(),I.label=11;case 11:f++,I.label=12;case 12:return m++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(r,i,o,c,g){return s(this,void 0,void 0,function(){var f,m,C,Q,U,I,P,b,T,W,N,R,AA,Z,_,K,_,K;return n(this,function($){return this.ctx.save(),f=Fd(c,o),m=ga(c,o),g===2&&(this.path(m),this.ctx.clip()),_A(m[0])?(C=m[0].start.x,Q=m[0].start.y):(C=m[0].x,Q=m[0].y),_A(m[1])?(U=m[1].end.x,I=m[1].end.y):(U=m[1].x,I=m[1].y),o===0||o===2?P=Math.abs(C-U):P=Math.abs(Q-I),this.ctx.beginPath(),g===3?this.formatPath(f):this.formatPath(m.slice(0,2)),b=i<3?i*3:i*2,T=i<3?i*2:i,g===3&&(b=i,T=i),W=!0,P<=b*2?W=!1:P<=b*2+T?(N=P/(2*b+T),b*=N,T*=N):(R=Math.floor((P+T)/(b+T)),AA=(P-R*b)/(R-1),Z=(P-(R+1)*b)/R,T=Z<=0||Math.abs(T-AA)<Math.abs(T-Z)?AA:Z),W&&(g===3?this.ctx.setLineDash([0,b+T]):this.ctx.setLineDash([b,T])),g===3?(this.ctx.lineCap="round",this.ctx.lineWidth=i):this.ctx.lineWidth=i*2+1.1,this.ctx.strokeStyle=fA(r),this.ctx.stroke(),this.ctx.setLineDash([]),g===2&&(_A(m[0])&&(_=m[3],K=m[0],this.ctx.beginPath(),this.formatPath([new D(_.end.x,_.end.y),new D(K.start.x,K.start.y)]),this.ctx.stroke()),_A(m[1])&&(_=m[1],K=m[2],this.ctx.beginPath(),this.formatPath([new D(_.end.x,_.end.y),new D(K.start.x,K.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(r){return s(this,void 0,void 0,function(){var i;return n(this,function(o){switch(o.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=fA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),i=Cd(r),[4,this.renderStack(i)];case 1:return o.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(Ba),Md=function(t){return t instanceof Rn||t instanceof On?!0:t instanceof Zr&&t.type!==Ci&&t.type!==wi},Ld=function(t,A){switch(t){case 0:return yi(A);case 2:return ud(A);case 1:default:return Ii(A)}},Td=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Dd=["-apple-system","system-ui"],Kd=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return Dd.indexOf(A)===-1}):t},Pd=function(t){a(A,t);function A(r,i){var o=t.call(this,r,i)||this;return o.canvas=i.canvas?i.canvas:document.createElement("canvas"),o.ctx=o.canvas.getContext("2d"),o.options=i,o.canvas.width=Math.floor(i.width*i.scale),o.canvas.height=Math.floor(i.height*i.scale),o.canvas.style.width=i.width+"px",o.canvas.style.height=i.height+"px",o.ctx.scale(o.options.scale,o.options.scale),o.ctx.translate(-i.x,-i.y),o.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),o}return A.prototype.render=function(r){return s(this,void 0,void 0,function(){var i,o;return n(this,function(c){switch(c.label){case 0:return i=Jr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,r),[4,kd(i)];case 1:return o=c.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=fA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(o,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(Ba),kd=function(t){return new Promise(function(A,r){var i=new Image;i.onload=function(){A(i)},i.onerror=r,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},Od=function(){function t(A){var r=A.id,i=A.enabled;this.id=r,this.enabled=i,this.start=Date.now()}return t.prototype.debug=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,l([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,l([this.id,this.getTime()+"ms"],A))},t.prototype.warn=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,l([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.error=function(){for(var A=[],r=0;r<arguments.length;r++)A[r]=arguments[r];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,l([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),Rd=function(){function t(A,r){var i;this.windowBounds=r,this.instanceName="#"+t.instanceCount++,this.logger=new Od({id:this.instanceName,enabled:A.logging}),this.cache=(i=A.cache)!==null&&i!==void 0?i:new nd(this,A)}return t.instanceCount=1,t}(),Nd=function(t,A){return A===void 0&&(A={}),Gd(t,A)};typeof window!="undefined"&&aa.setContext(window);var Gd=function(t,A){return s(void 0,void 0,void 0,function(){var r,i,o,c,g,f,m,C,Q,U,I,P,b,T,W,N,R,AA,Z,_,$,K,$,j,X,pA,LA,kA,aA,FA,ve,TA,DA,Me,re,Qe,Le,Te,le,De;return n(this,function(ce){switch(ce.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(r=t.ownerDocument,!r)throw new Error("Element is not attached to a Document");if(i=r.defaultView,!i)throw new Error("Document is not attached to a Window");return o={allowTaint:(j=A.allowTaint)!==null&&j!==void 0?j:!1,imageTimeout:(X=A.imageTimeout)!==null&&X!==void 0?X:15e3,proxy:A.proxy,useCORS:(pA=A.useCORS)!==null&&pA!==void 0?pA:!1},c=e({logging:(LA=A.logging)!==null&&LA!==void 0?LA:!0,cache:A.cache},o),g={windowWidth:(kA=A.windowWidth)!==null&&kA!==void 0?kA:i.innerWidth,windowHeight:(aA=A.windowHeight)!==null&&aA!==void 0?aA:i.innerHeight,scrollX:(FA=A.scrollX)!==null&&FA!==void 0?FA:i.pageXOffset,scrollY:(ve=A.scrollY)!==null&&ve!==void 0?ve:i.pageYOffset},f=new h(g.scrollX,g.scrollY,g.windowWidth,g.windowHeight),m=new Rd(c,f),C=(TA=A.foreignObjectRendering)!==null&&TA!==void 0?TA:!1,Q={allowTaint:(DA=A.allowTaint)!==null&&DA!==void 0?DA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:C,copyStyles:C},m.logger.debug("Starting document clone with size "+f.width+"x"+f.height+" scrolled to "+-f.left+","+-f.top),U=new sa(m,t,Q),I=U.clonedReferenceElement,I?[4,U.toIFrame(r,f)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return P=ce.sent(),b=$r(I)||Vh(I)?u(I.ownerDocument):d(m,I),T=b.width,W=b.height,N=b.left,R=b.top,AA=Vd(m,I,A.backgroundColor),Z={canvas:A.canvas,backgroundColor:AA,scale:(re=(Me=A.scale)!==null&&Me!==void 0?Me:i.devicePixelRatio)!==null&&re!==void 0?re:1,x:((Qe=A.x)!==null&&Qe!==void 0?Qe:0)+N,y:((Le=A.y)!==null&&Le!==void 0?Le:0)+R,width:(Te=A.width)!==null&&Te!==void 0?Te:Math.ceil(T),height:(le=A.height)!==null&&le!==void 0?le:Math.ceil(W)},C?(m.logger.debug("Document cloned, using foreign object rendering"),$=new Pd(m,Z),[4,$.render(I)]):[3,3];case 2:return _=ce.sent(),[3,5];case 3:return m.logger.debug("Document cloned, element located at "+N+","+R+" with size "+T+"x"+W+" using computed rendering"),m.logger.debug("Starting DOM parsing"),K=Vn(m,I),AA===K.styles.backgroundColor&&(K.styles.backgroundColor=ae.TRANSPARENT),m.logger.debug("Starting renderer for element at "+Z.x+","+Z.y+" with size "+Z.width+"x"+Z.height),$=new xd(m,Z),[4,$.render(K)];case 4:_=ce.sent(),ce.label=5;case 5:return(!((De=A.removeContainer)!==null&&De!==void 0)||De)&&(sa.destroy(P)||m.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),m.logger.debug("Finished rendering"),[2,_]}})})},Vd=function(t,A,r){var i=A.ownerDocument,o=i.documentElement?Ut(t,getComputedStyle(i.documentElement).backgroundColor):ae.TRANSPARENT,c=i.body?Ut(t,getComputedStyle(i.body).backgroundColor):ae.TRANSPARENT,g=typeof r=="string"?Ut(t,r):r===null?ae.TRANSPARENT:4294967295;return A===i.documentElement?me(o)?me(c)?g:c:o:g};return Nd})});var tg={};qd(tg,{default:()=>ur});module.exports=$d(tg);var Da=require("obsidian");var hA=require("obsidian");var iA=require("obsidian");var HA={AGAIN:1,HARD:2,GOOD:3,EASY:4},as={request_retention:.9,maximum_interval:36500,newCardsPerDay:20,reviewsPerDay:100,w:[.4872,1.4003,3.7145,13.8206,5.1618,1.2298,.8975,.031,1.6474,.1367,1.0461,2.1072,.0793,.3246,1.587,.2272,2.8755]};var Qa=require("obsidian");var wa={"Select the AI service provider":"Select the AI service provider.","Ollama (Local)":"Ollama (local)",Model:"Model","Failed to fetch models":"Failed to fetch models.","API Key":"API key","Custom API Address":"Custom API address","If using a custom API proxy, please enter the full API address":"If using a custom API proxy, please enter the full API address.","Please enter your API Key":"Please enter your API key.","Validating API Key...":"Validating API key...","API Key verification successful!":"API key verification successful!","API Key verification failed. Please check your API Key.":"API key verification failed. Please check your API key.",Save:"Save",Cancel:"Cancel",Edit:"Edit",Delete:"Delete","Custom Model":"Custom model","API Key is valid!":"API Key is valid!","Failed to validate API Key. Please check your key and try again.":"Failed to validate API Key. Please check your key and try again.","Please enter an API Key first":"Please enter an API Key first.","Checking...":"Checking...","API Key and the current model are both available!":"API Key and the current model are both available!","API Key is invalid or there is a server error. Please check if your API Key is correct.":"API Key is invalid or there is a server error. Please check if your API Key is correct.","Select the OpenAI model to use":"Select the OpenAI model to use.","OpenAI Settings":"OpenAI service","Enter your OpenAI API Key.":"Enter your OpenAI API key.","No available models found.":"No available models found.","API Key validated successfully!":"API Key validated successfully!","No models available. Please check your API Key.":"No models available. Please check your API Key.","Anthropic Settings":"Anthropic service","Enter your Anthropic API Key.":"Enter your Anthropic API key.","Select the Anthropic model to use":"Select the Anthropic model to use.","Select a model or use a custom one":"Select a model or use a custom one.","Model ID can only contain letters, numbers, underscores, dots and hyphens":"Model ID can only contain letters, numbers, underscores, dots and hyphens.","Select the Gemini model to use":"Select the Gemini model to use.","Unable to create model selection dropdown menu.":"Unable to create model selection dropdown menu.","Gemini Settings":"Gemini service","Enter your Gemini API Key":"Enter your Gemini API key.","Deepseek Settings":"Deepseek service","Enter your Deepseek API Key":"Enter your Deepseek API key.","Ollama Settings":"Ollama service","Server Address":"Server address","Ollama server address (default: http://localhost:11434)":"Ollama server address (default: http://localhost:11434)",Check:"Check","Successfully connected to Ollama service":"Successfully connected to Ollama service.","No models found. Please download models using ollama":"No models found. Please download models using ollama.","Could not connect to Ollama service":"Could not connect to Ollama service","Failed to connect to Ollama service. Please check the server address.":"Failed to connect to Ollama service. Please check the server address.","Currently selected model (Test connection to see all available models)":"Currently selected model (Test connection to see all available models)","Select a model to use":"Select a model to use","No models available. Please load an available model first.":"No models available. Please load an available model first.","No models available":"No models available","Prompt settings":"Custom prompt","Add Prompt":"Add prompt","Input Prompt Name":"Input prompt name","Input Prompt Content\nAvailable parameters:\n{{highlight}} - Current highlighted text\n{{comment}} - Existing comment":`Input prompt content
|
|
Available parameters:
|
|
{{highlight}} - Current highlighted text
|
|
{{comment}} - Existing comment`,"Prompt added":"Prompt added","Prompt updated":"Prompt updated","Shift + Enter Wrap, Enter Save":"Shift + Enter Wrap, Enter Save","Delete comment":"Delete","Add Comment":"Add comment","Export as Image":"Export as image","Select Prompt":"Select prompt","Please add Prompt in the settings first":"Please add prompt in the settings first","AI comments have been added":"AI comments have been added","AI comments failed:":"AI comments failed:",Chat:"Chat","Failed to process dropped highlight:":"Failed to process dropped highlight:","highlighted notes":" highlighted notes","Input message...":"Input message...","Unable to access the Ollama model, please check the service.":"Unable to access the Ollama model, please check the service.","Unable to get Gemini model list, please check API Key and network connection.":"Unable to get Gemini model list, please check API key and network connection.",Download:"Download","Export successful!":"Export successful!","Export failed, please try again.":"Export failed, please try again.","Loading...":"Loading...","Search...":"Search...","No matching content found.":"No matching content found.","The current document has no highlighted content.":"The current document has no highlighted content.","No corresponding file found.":"No corresponding file found.","Export failed: Failed to load necessary components.":"Export failed: Failed to load necessary components.","All Highlight":"All highlight","Export as notes":"Export as notes","Add File Comment":"Add file comment","File Comment":"File comment","Successfully exported highlights to: ":"Successfully exported highlights to: ","Failed to export highlights: ":"Failed to export highlights: ","Default Template":"Default template","Modern minimalist knowledge card style":"Modern minimalist knowledge card style","Academic Template":"Academic template","Formal style suitable for academic citations":"Formal style suitable for academic citations","Social Template":"Social template","Modern style suitable for social media sharing":"Modern style suitable for social media sharing","Open AI chat window":"Open AI chat window","Open HiNote window":"Open HiNote window",General:"Highlight","Export Path":"Export path","Set the path for exported highlight notes. Leave empty to use vault root. The path should be relative to your vault root.":"Set the path for exported highlight notes. Leave empty to use vault root. The path should be relative to your vault root.",Exclusions:"Exclusions","Comma separated list of paths, tags, note titles or file extensions that will be excluded from highlighting. e.g. folder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md":"Comma separated list of paths, tags, note titles or file extensions that will be excluded from highlighting. e.g. folder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md","Custom text extraction":"Custom text extraction","Use Custom Pattern":"Use custom pattern","Enable to use a custom regular expression for extracting text.":"Enable to use a custom regular expression for extracting text.","Custom Pattern":"Custom pattern","Enter a custom regular expression for extracting text. Use capture groups () to specify the text to extract. The first non-empty capture group will be used as the extracted text.":"Enter a custom regular expression for extracting text. Use capture groups () to specify the text to extract. The first non-empty capture group will be used as the extracted text.","Default Color":"Default color","Set the default color for decorators when no color is specified. Leave empty to use system default.":"Set the default color for decorators when no color is specified. Leave empty to use system default.","Export template":"Export template","Clean orphaned data":"Clean orphaned data","Remove highlights and comments that no longer exist in your documents. This is useful if you have deleted highlights but their comments are still stored in the data file.":"Remove highlights and comments that no longer exist in your documents. This is useful if you have deleted highlights but their comments are still stored in the data file.","Flashcard learning":"Flashcard learning","New cards per day":"New cards per day","Maximum number of new cards to learn each day":"Maximum number of new cards to learn each day.","Reviews per day":"Reviews per day","Maximum number of cards to review each day":"Maximum number of cards to review each day.","Target retention":"Target retention","Target memory retention rate (0.8 = 80%)":"Target memory retention rate (0.8 = 80%).","Maximum interval":"Maximum interval","Maximum interval in days between reviews":"Maximum interval in days between reviews.","Reset daily stats":"Reset daily stats","Reset today's learning statistics":"Reset today's learning statistics.",Reset:"Reset","Daily statistics have been reset":"Daily statistics have been reset","No statistics to reset for today":"No statistics to reset for today",Advanced:"Advanced","These settings control the FSRS algorithm parameters. Only change them if you understand the algorithm.":"These settings control the FSRS algorithm parameters. Only change them if you understand the algorithm.","Reset algorithm parameters":"Reset algorithm parameters","Reset the FSRS algorithm parameters to default values":"Reset the FSRS algorithm parameters to default values.","Reset to Default":"Reset to default","FSRS parameters have been reset to default values":"FSRS parameters have been reset to default values.",days:"days","Activate HiCard":"Activate HiCard","Enter your license key to activate HiCard feature.":"Enter your license key to activate HiCard feature.","Enter license key":"Enter license key",Activate:"Activate","Please enter a license key":"Please enter a license key","HiCard activated successfully!":"HiCard activated successfully!","Invalid license key":"Invalid license key","Use global settings":"Use global settings","New cards per day:":"New cards per day:","Reviews per day:":"Reviews per day:","All Cards":"All cards","Due Today":"Due today","New Cards":"New cards",Learned:"Learned","Create Group":"Create group","Group name":"Group name",Create:"Create",Again:"Again",Hard:"Hard",Good:"Good",Easy:"Easy",Card:"Card",of:"of",Settings:"Settings","Are you sure you want to delete this group?":"Are you sure you want to delete this group?",Yes:"Yes",No:"No","You've completed all cards for today!":"You've completed all cards for today!","No cards available.":"No cards available.","Return to First Card":"Return to First Card","Edit Group":"Edit group","Create New Group":"Create new group","Group Name":"Group name","Please fill in all fields":"Please fill in all fields","Saving...":"Saving...","Creating...":"Creating...","Group updated successfully":"Group updated successfully","Failed to update group":"Failed to update group","Group created successfully":"Group created successfully","Failed to create or update group":"Failed to create or update group",Due:"Due",New:"New",Review:"Review",Retention:"Retention","Limits:":"Limits:","\u6BCF\u65E5\u5B66\u4E60\u9650\u5236\n":`Daily learning limits
|
|
`,"\u65B0\u5361\u7247:":"New cards:","\u590D\u4E60\u5361\u7247:":"Review cards:","\u5B66\u4E60\u5B8C\u6210\uFF01":"Learning completed!",\u8FD4\u56DE\u7B2C\u4E00\u5F20\u5361\u7247:"Return to first card","\u60A8\u4ECA\u5929\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002":"You've reached your daily quota for new cards! Come back tomorrow.","\u60A8\u4ECA\u5929\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002":"You've reached your daily quota for reviews! Come back tomorrow.",'\u60A8\u4ECA\u5929\u5728 "':`You've reached your daily quota in "`,'" \u5206\u7EC4\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002':'" group for new cards! Come back tomorrow.','" \u5206\u7EC4\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002':'" group for reviews! Come back tomorrow.','\u606D\u559C\uFF01\u60A8\u5DF2\u5B8C\u6210 "':`Congratulations! You've completed all cards in "`,'" \u4E2D\u7684\u6240\u6709\u5361\u7247\u5B66\u4E60\u3002':'" group.','\u786E\u5B9A\u8981\u5220\u9664\u5206\u7EC4 "':'Are you sure you want to delete group "','" \u5417\uFF1F':'"?',\u5206\u7EC4\u5220\u9664\u6210\u529F:"Group deleted successfully",\u5220\u9664\u5206\u7EC4\u5931\u8D25:"Failed to delete group","\u652F\u6301\u4EE5\u4E0B\u683C\u5F0F\uFF1A\n- \u6587\u4EF6\u5939\uFF1Afolder1, folder1/folder2\n- \u7B14\u8BB0\uFF1A[[note1]], [[note2]]\n- \u6807\u7B7E\uFF1A#tag1, #tag2\n- \u901A\u914D\u7B26\uFF1A*.excalidraw.md\n- \u5185\u5BB9\uFF1A\u76F4\u63A5\u8F93\u5165\u8981\u641C\u7D22\u7684\u6587\u672C":`Supports the following formats:
|
|
- Folders: folder1, folder1/folder2
|
|
- Notes: [[note1]], [[note2]]
|
|
- Tags: #tag1, #tag2
|
|
- Wildcards: *.excalidraw.md
|
|
- Content: directly enter text to search for`,"\u53CD\u8F6C\u5361\u7247\uFF08\u4F7F\u7528\u8BC4\u8BBA\u4F5C\u4E3A\u95EE\u9898\uFF09":"Reverse cards (use comments as questions)","Learning settings":"Learning settings","\u8BB0\u5FC6\u4FDD\u6301\u7387 = (\u603B\u590D\u4E60\u6B21\u6570 - \u9057\u5FD8\u6B21\u6570) / \u603B\u590D\u4E60\u6B21\u6570\n\u8BE5\u6307\u6807\u53CD\u6620\u4E86\u4F60\u7684\u5B66\u4E60\u6548\u679C\uFF0C\u8D8A\u9AD8\u8BF4\u660E\u8BB0\u5FC6\u6548\u679C\u8D8A\u597D":`Memory retention = (total reviews - forgotten reviews) / total reviews
|
|
This metric reflects your learning effectiveness. Higher means better memory retention`,"Open (DoubleClick)":"Open (double-click)"};var Ca={"Select the AI service provider":"\u9009\u62E9 AI \u670D\u52A1\u63D0\u4F9B\u5546\u3002","Ollama (Local)":"Ollama (\u672C\u5730)",Model:"\u6A21\u578B","Failed to fetch models":"\u83B7\u53D6\u6A21\u578B\u5931\u8D25","API Key":"API \u5BC6\u94A5","Custom API Address":"\u81EA\u5B9A\u4E49 API \u5730\u5740","If using a custom API proxy, please enter the full API address":"\u5982\u679C\u4F7F\u7528\u81EA\u5B9A\u4E49 API \u4EE3\u7406\uFF0C\u8BF7\u8F93\u5165\u5B8C\u6574\u7684 API \u5730\u5740","Please enter your API Key":"\u8BF7\u8F93\u5165\u60A8\u7684 API \u5BC6\u94A5","Validating API Key...":"\u6B63\u5728\u9A8C\u8BC1 API \u5BC6\u94A5...","API Key verification successful!":"API \u5BC6\u94A5\u9A8C\u8BC1\u6210\u529F\uFF01","API Key verification failed. Please check your API Key.":"API \u5BC6\u94A5\u9A8C\u8BC1\u5931\u8D25\u3002\u8BF7\u68C0\u67E5\u60A8\u7684 API \u5BC6\u94A5\u3002",Save:"\u4FDD\u5B58",Cancel:"\u53D6\u6D88",Edit:"\u7F16\u8F91",Delete:"\u5220\u9664","Custom Model":"\u81EA\u5B9A\u4E49\u6A21\u578B","API Key is valid!":"API \u5BC6\u94A5\u6709\u6548\uFF01","Failed to validate API Key. Please check your key and try again.":"API \u5BC6\u94A5\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u5BC6\u94A5\u5E76\u91CD\u8BD5","Please enter an API Key first":"\u8BF7\u5148\u8F93\u5165 API \u5BC6\u94A5","Checking...":"\u68C0\u67E5\u4E2D...","API Key and the current model are both available!":"API \u5BC6\u94A5\u548C\u5F53\u524D\u6A21\u578B\u90FD\u53EF\u7528\uFF01","API Key is invalid or there is a server error. Please check if your API Key is correct.":"API \u5BC6\u94A5\u65E0\u6548\u6216\u670D\u52A1\u5668\u9519\u8BEF\u3002\u8BF7\u68C0\u67E5\u60A8\u7684 API \u5BC6\u94A5\u662F\u5426\u6B63\u786E\u3002","Select the OpenAI model to use":"\u9009\u62E9 OpenAI \u6A21\u578B","OpenAI Settings":"OpenAI \u670D\u52A1","Enter your OpenAI API Key.":"\u8F93\u5165\u60A8\u7684 OpenAI API \u5BC6\u94A5\u3002","No available models found.":"\u672A\u627E\u5230\u53EF\u7528\u6A21\u578B\u3002","API Key validated successfully!":"API \u5BC6\u94A5\u9A8C\u8BC1\u6210\u529F\uFF01","No models available. Please check your API Key.":"\u6CA1\u6709\u53EF\u7528\u7684\u6A21\u578B\u3002\u8BF7\u68C0\u67E5\u60A8\u7684 API \u5BC6\u94A5\u3002","Anthropic Settings":"Anthropic \u670D\u52A1","Enter your Anthropic API Key.":"\u8F93\u5165\u60A8\u7684 Anthropic API \u5BC6\u94A5\u3002","Select the Anthropic model to use":"\u9009\u62E9 Anthropic \u6A21\u578B","Select a model or use a custom one":"\u9009\u62E9\u6A21\u578B\u6216\u4F7F\u7528\u81EA\u5B9A\u4E49\u6A21\u578B","Model ID can only contain letters, numbers, underscores, dots and hyphens":"\u6A21\u578B ID \u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u70B9\u548C\u8FDE\u5B57\u7B26","Select the Gemini model to use":"\u9009\u62E9 Gemini \u6A21\u578B","Unable to create model selection dropdown menu.":"\u65E0\u6CD5\u521B\u5EFA\u6A21\u578B\u9009\u62E9\u4E0B\u62C9\u83DC\u5355\u3002","Gemini Settings":"Gemini \u670D\u52A1","Enter your Gemini API Key":"\u8F93\u5165\u60A8\u7684 Gemini API \u5BC6\u94A5","Deepseek Settings":"Deepseek \u670D\u52A1","Enter your Deepseek API Key":"\u8F93\u5165\u60A8\u7684 Deepseek API \u5BC6\u94A5","Ollama Settings":"Ollama \u670D\u52A1","Server Address":"\u670D\u52A1\u5668\u5730\u5740","Ollama server address (default: http://localhost:11434)":"Ollama \u670D\u52A1\u5668\u5730\u5740\uFF08\u9ED8\u8BA4\uFF1Ahttp://localhost:11434\uFF09",Check:"\u9A8C\u8BC1","Successfully connected to Ollama service":"\u6210\u529F\u8FDE\u63A5\u5230 Ollama \u670D\u52A1","No models found. Please download models using ollama":"\u672A\u627E\u5230\u6A21\u578B\u3002\u8BF7\u4F7F\u7528 ollama \u4E0B\u8F7D\u6A21\u578B","Could not connect to Ollama service":"\u65E0\u6CD5\u8FDE\u63A5\u5230 Ollama \u670D\u52A1","Failed to connect to Ollama service. Please check the server address.":"\u65E0\u6CD5\u8FDE\u63A5\u5230 Ollama \u670D\u52A1\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5668\u5730\u5740\u3002","Currently selected model (Test connection to see all available models)":"\u5F53\u524D\u9009\u62E9\u7684\u6A21\u578B\uFF08\u6D4B\u8BD5\u8FDE\u63A5\u4EE5\u67E5\u770B\u53EF\u7528\u6A21\u578B\uFF09","Select a model to use":"\u9009\u62E9\u4E00\u4E2A\u6A21\u578B","No models available. Please load an available model first.":"\u65E0\u53EF\u7528\u6A21\u578B\uFF0C\u8BF7\u5148\u52A0\u8F7D\u53EF\u7528\u6A21\u578B\u3002","No models available":"\u65E0\u53EF\u7528\u6A21\u578B","Prompt settings":"\u81EA\u5B9A\u4E49 Prompt","Add Prompt":"\u6DFB\u52A0 Prompt","Input Prompt Name":"\u8F93\u5165 Prompt \u540D\u79F0","Input Prompt Content\nAvailable parameters:\n{{highlight}} - Current highlighted text\n{{comment}} - Existing comment":`\u8F93\u5165 Prompt \u5185\u5BB9
|
|
\u53EF\u7528\u53C2\u6570:
|
|
{{highlight}} - \u5F53\u524D\u9AD8\u4EAE\u6587\u672C
|
|
{{comment}} - \u5DF2\u5B58\u5728\u7684\u6CE8\u91CA`,"Prompt added":"Prompt \u5DF2\u6DFB\u52A0","Prompt updated":"Prompt \u5DF2\u66F4\u65B0","Shift + Enter Wrap, Enter Save":"Shift + Enter \u6362\u884C\uFF0CEnter \u4FDD\u5B58","Delete comment":"\u5220\u9664\u8BC4\u8BBA","Add Comment":"\u6DFB\u52A0\u8BC4\u8BBA","Export as Image":"\u5BFC\u51FA\u4E3A\u56FE\u7247","Select Prompt":"\u9009\u62E9 Prompt","Please add Prompt in the settings first":"\u8BF7\u5148\u5728\u8BBE\u7F6E\u4E2D\u6DFB\u52A0 Prompt","AI comments have been added":"AI \u8BC4\u8BBA\u5DF2\u6DFB\u52A0","AI comments failed:":"AI \u8BC4\u8BBA\u5931\u8D25\uFF1A",Chat:"\u5BF9\u8BDD","Failed to process dropped highlight:":"\u65E0\u6CD5\u5904\u7406\u5220\u9664\u7684\u9AD8\u4EAE\uFF1A","highlighted notes":" \u6761\u9AD8\u4EAE\u7B14\u8BB0","Input message...":"\u8F93\u5165\u6D88\u606F...","Unable to access the Ollama model, please check the service.":"\u65E0\u6CD5\u8BBF\u95EE Ollama \u6A21\u578B\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u662F\u5426\u6B63\u5E38\u8FD0\u884C","Unable to get Gemini model list, please check API Key and network connection.":"\u65E0\u6CD5\u83B7\u53D6 Gemini \u6A21\u578B\u5217\u8868\uFF0C\u8BF7\u68C0\u67E5 API Key \u548C\u7F51\u7EDC\u8FDE\u63A5",Download:"\u4E0B\u8F7D","Export successful!":"\u5BFC\u51FA\u6210\u529F\uFF01","Export failed, please try again.":"\u5BFC\u51FA\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5","Loading...":"\u52A0\u8F7D\u4E2D...","Search...":"\u641C\u7D22\u9AD8\u4EAE\u6216\u8BC4\u8BBA...","No matching content found.":"\u672A\u627E\u5230\u5339\u914D\u7684\u5185\u5BB9\u3002","The current document has no highlighted content.":"\u5F53\u524D\u6587\u6863\u6CA1\u6709\u9AD8\u4EAE\u5185\u5BB9\u3002","No corresponding file found.":"\u672A\u627E\u5230\u76F8\u5E94\u7684\u6587\u4EF6\u3002","Export failed: Failed to load necessary components.":"\u5BFC\u51FA\u5931\u8D25\uFF1A\u52A0\u8F7D\u5FC5\u8981\u7EC4\u4EF6\u5931\u8D25\u3002","All Highlight":"\u5168\u90E8\u9AD8\u4EAE","Export as notes":"\u5BFC\u51FA\u4E3A\u7B14\u8BB0","Add File Comment":"\u6DFB\u52A0\u6587\u4EF6\u8BC4\u8BBA","File Comment":"\u6587\u4EF6\u8BC4\u8BBA","Successfully exported highlights to: ":"\u6210\u529F\u5BFC\u51FA\u9AD8\u4EAE\u5230\uFF1A","Failed to export highlights: ":"\u65E0\u6CD5\u5BFC\u51FA\u9AD8\u4EAE\uFF1A","Default Template":"\u9ED8\u8BA4\u6A21\u677F","Modern minimalist knowledge card style":"\u73B0\u4EE3\u6781\u7B80\u77E5\u8BC6\u5361\u7247\u98CE\u683C","Academic Template":"\u5B66\u672F\u6A21\u677F","Formal style suitable for academic citations":"\u9002\u7528\u4E8E\u5B66\u672F\u5F15\u7528\u7684\u6B63\u5F0F\u98CE\u683C","Social Template":"\u793E\u4EA4\u6A21\u677F","Modern style suitable for social media sharing":"\u9002\u7528\u4E8E\u793E\u4EA4\u5A92\u4F53\u5206\u4EAB\u7684\u73B0\u4EE3\u98CE\u683C","Open AI chat window":"\u6253\u5F00 AI \u5BF9\u8BDD\u7A97\u53E3","Open HiNote window":"\u6253\u5F00 HiNote \u7A97\u53E3","General Settings":"\u901A\u7528\u8BBE\u7F6E","Export Path":"\u5BFC\u51FA\u8DEF\u5F84","Set the path for exported highlight notes. Leave empty to use vault root. The path should be relative to your vault root.":"\u8BBE\u7F6E\u9AD8\u4EAE\u7B14\u8BB0\u7684\u5BFC\u51FA\u8DEF\u5F84\u3002\u7559\u7A7A\u5219\u4F7F\u7528 vault \u6839\u76EE\u5F55\u3002\u8DEF\u5F84\u5E94\u76F8\u5BF9\u4E8E vault \u6839\u76EE\u5F55\u3002",Exclusions:"\u6392\u9664","Comma separated list of paths, tags, note titles or file extensions that will be excluded from highlighting. e.g. folder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md":"\u9017\u53F7\u5206\u9694\u7684\u8DEF\u5F84\uFF0C\u6807\u7B7E\uFF0C\u7B14\u8BB0\u6807\u9898\u6216\u6587\u4EF6\u6269\u5C55\u540D\uFF0C\u5C06\u4ECE\u9AD8\u4EAE\u4E2D\u6392\u9664\u3002\u4F8B\u5982\uFF1Afolder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md","Custom text extraction":"\u81EA\u5B9A\u4E49\u6587\u672C\u63D0\u53D6","Use Custom Pattern":"\u4F7F\u7528\u81EA\u5B9A\u4E49\u6A21\u5F0F","Enable to use a custom regular expression for extracting text.":"\u542F\u7528\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F\u4EE5\u63D0\u53D6\u6587\u672C\u3002","Custom Pattern":"\u81EA\u5B9A\u4E49\u6A21\u5F0F","Enter a custom regular expression for extracting text. Use capture groups () to specify the text to extract. The first non-empty capture group will be used as the extracted text.":"\u8F93\u5165\u81EA\u5B9A\u4E49\u6B63\u5219\u8868\u8FBE\u5F0F\u4EE5\u63D0\u53D6\u6587\u672C\u3002\u4F7F\u7528\u6355\u83B7\u7EC4 () \u6307\u5B9A\u8981\u63D0\u53D6\u7684\u6587\u672C\u3002\u7B2C\u4E00\u4E2A\u975E\u7A7A\u6355\u83B7\u7EC4\u5C06\u7528\u4F5C\u63D0\u53D6\u7684\u6587\u672C\u3002","Default Color":"\u9ED8\u8BA4\u989C\u8272","Set the default color for decorators when no color is specified. Leave empty to use system default.":"\u8BBE\u7F6E\u5F53\u672A\u6307\u5B9A\u989C\u8272\u65F6\u7684\u88C5\u9970\u5668\u7684\u9ED8\u8BA4\u989C\u8272\u3002\u7559\u7A7A\u4EE5\u4F7F\u7528\u7CFB\u7EDF\u9ED8\u8BA4\u989C\u8272\u3002","Export template":"\u5BFC\u51FA\u6A21\u677F","Clean orphaned data":"\u6E05\u7406\u5B64\u7ACB\u6570\u636E","Remove highlights and comments that no longer exist in your documents. This is useful if you have deleted highlights but their comments are still stored in the data file.":"\u5220\u9664\u4E0D\u518D\u5B58\u5728\u4E8E\u60A8\u7684\u6587\u6863\u4E2D\u7684\u9AD8\u4EAE\u548C\u6CE8\u91CA\u3002\u8FD9\u5728\u60A8\u5220\u9664\u9AD8\u4EAE\u4F46\u6CE8\u91CA\u4ECD\u7136\u5B58\u50A8\u5728\u6570\u636E\u6587\u4EF6\u4E2D\u65F6\u5F88\u6709\u7528\u3002","Flashcard learning":"\u95EA\u5361\u5B66\u4E60\u8BBE\u7F6E","New cards per day":"\u6BCF\u65E5\u65B0\u5361\u7247\u6570\u91CF","Maximum number of new cards to learn each day":"\u6BCF\u5929\u5B66\u4E60\u7684\u65B0\u5361\u7247\u6700\u5927\u6570\u91CF","Reviews per day":"\u6BCF\u65E5\u590D\u4E60\u6570\u91CF","Maximum number of cards to review each day":"\u6BCF\u5929\u590D\u4E60\u7684\u5361\u7247\u6700\u5927\u6570\u91CF","Target retention":"\u76EE\u6807\u8BB0\u5FC6\u4FDD\u6301\u7387","Target memory retention rate (0.8 = 80%)":"\u76EE\u6807\u8BB0\u5FC6\u4FDD\u6301\u7387\uFF080.8 = 80%\uFF09","Maximum interval":"\u6700\u5927\u95F4\u9694","Maximum interval in days between reviews":"\u590D\u4E60\u4E4B\u95F4\u7684\u6700\u5927\u95F4\u9694\u5929\u6570","Reset daily stats":"\u91CD\u7F6E\u4ECA\u65E5\u7EDF\u8BA1","Reset today's learning statistics":"\u91CD\u7F6E\u4ECA\u5929\u7684\u5B66\u4E60\u7EDF\u8BA1\u6570\u636E",Reset:"\u91CD\u7F6E","Daily statistics have been reset":"\u4ECA\u65E5\u7EDF\u8BA1\u5DF2\u91CD\u7F6E","No statistics to reset for today":"\u4ECA\u5929\u6CA1\u6709\u53EF\u91CD\u7F6E\u7684\u7EDF\u8BA1\u6570\u636E",Advanced:"\u9AD8\u7EA7\u8BBE\u7F6E","These settings control the FSRS algorithm parameters. Only change them if you understand the algorithm.":"\u8FD9\u4E9B\u8BBE\u7F6E\u63A7\u5236FSRS\u7B97\u6CD5\u53C2\u6570\u3002\u4EC5\u5728\u7406\u89E3\u7B97\u6CD5\u7684\u60C5\u51B5\u4E0B\u66F4\u6539\u5B83\u4EEC\u3002","Reset algorithm parameters":"\u91CD\u7F6E\u7B97\u6CD5\u53C2\u6570","Reset the FSRS algorithm parameters to default values":"\u5C06FSRS\u7B97\u6CD5\u53C2\u6570\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C","Reset to Default":"\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C","FSRS parameters have been reset to default values":"FSRS\u53C2\u6570\u5DF2\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C",days:"\u5929","Activate HiCard":"\u6FC0\u6D3B HiCard","Enter your license key to activate HiCard feature.":"\u8F93\u5165\u60A8\u7684\u8BB8\u53EF\u8BC1\u5BC6\u94A5\u4EE5\u6FC0\u6D3B HiCard \u529F\u80FD\u3002","Enter license key":"\u8F93\u5165\u8BB8\u53EF\u8BC1\u5BC6\u94A5",Activate:"\u6FC0\u6D3B","Please enter a license key":"\u8BF7\u8F93\u5165\u8BB8\u53EF\u8BC1\u5BC6\u94A5","HiCard activated successfully!":"HiCard \u6FC0\u6D3B\u6210\u529F\uFF01","Invalid license key":"\u65E0\u6548\u7684\u8BB8\u53EF\u8BC1\u5BC6\u94A5","Use global settings":"\u4F7F\u7528\u5168\u5C40\u8BBE\u7F6E","New cards per day:":"\u6BCF\u65E5\u65B0\u5361\u6570\u91CF:","Reviews per day:":"\u6BCF\u65E5\u590D\u4E60\u6570\u91CF:","All Cards":"\u5168\u90E8\u5361\u7247","Due Today":"\u4ECA\u65E5\u5230\u671F","New Cards":"\u65B0\u5361\u7247",Learned:"\u5DF2\u5B66\u4E60","Create Group":"\u521B\u5EFA\u5206\u7EC4","Group name":"\u5206\u7EC4\u540D\u79F0",Create:"\u521B\u5EFA",Again:"\u91CD\u6765",Hard:"\u56F0\u96BE",Good:"\u826F\u597D",Easy:"\u7B80\u5355",Card:"\u5361\u7247",of:"\u5171",Settings:"\u8BBE\u7F6E","Are you sure you want to delete this group?":"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u5206\u7EC4\u5417\uFF1F",Yes:"\u662F",No:"\u5426","You've completed all cards for today!":"\u60A8\u4ECA\u5929\u5DF2\u5B8C\u6210\u6240\u6709\u5361\u7247\uFF01","No cards available.":"\u6CA1\u6709\u53EF\u7528\u7684\u5361\u7247\u3002","Return to First Card":"\u8FD4\u56DE\u7B2C\u4E00\u5F20\u5361\u7247","Edit Group":"\u7F16\u8F91\u5206\u7EC4","Create New Group":"\u521B\u5EFA\u65B0\u5206\u7EC4","Group Name":"\u5206\u7EC4\u540D\u79F0","Please fill in all fields":"\u8BF7\u586B\u5199\u6240\u6709\u5B57\u6BB5","Saving...":"\u4FDD\u5B58\u4E2D...","Creating...":"\u521B\u5EFA\u4E2D...","Group updated successfully":"\u5206\u7EC4\u66F4\u65B0\u6210\u529F","Failed to update group":"\u5206\u7EC4\u66F4\u65B0\u5931\u8D25","Group created successfully":"\u5206\u7EC4\u521B\u5EFA\u6210\u529F","Failed to create or update group":"\u521B\u5EFA\u6216\u66F4\u65B0\u5206\u7EC4\u5931\u8D25",Due:"\u5230\u671F",New:"\u65B0\u7684",Review:"\u590D\u4E60",Retention:"\u4FDD\u7559\u7387","Limits:":"\u9650\u5236\uFF1A","\u6BCF\u65E5\u5B66\u4E60\u9650\u5236\n":`\u6BCF\u65E5\u5B66\u4E60\u9650\u5236
|
|
`,"\u65B0\u5361\u7247:":"\u65B0\u5361\u7247:","\u590D\u4E60\u5361\u7247:":"\u590D\u4E60\u5361\u7247:","\u5B66\u4E60\u5B8C\u6210\uFF01":"\u5B66\u4E60\u5B8C\u6210\uFF01",\u8FD4\u56DE\u7B2C\u4E00\u5F20\u5361\u7247:"\u8FD4\u56DE\u7B2C\u4E00\u5F20\u5361\u7247","\u60A8\u4ECA\u5929\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002":"\u60A8\u4ECA\u5929\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002","\u60A8\u4ECA\u5929\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002":"\u60A8\u4ECA\u5929\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002",'\u60A8\u4ECA\u5929\u5728 "':'\u60A8\u4ECA\u5929\u5728 "','" \u5206\u7EC4\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002':'" \u5206\u7EC4\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002','" \u5206\u7EC4\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002':'" \u5206\u7EC4\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002','\u606D\u559C\uFF01\u60A8\u5DF2\u5B8C\u6210 "':'\u606D\u559C\uFF01\u60A8\u5DF2\u5B8C\u6210 "','" \u4E2D\u7684\u6240\u6709\u5361\u7247\u5B66\u4E60\u3002':'" \u4E2D\u7684\u6240\u6709\u5361\u7247\u5B66\u4E60\u3002','\u786E\u5B9A\u8981\u5220\u9664\u5206\u7EC4 "':'\u786E\u5B9A\u8981\u5220\u9664\u5206\u7EC4 "','" \u5417\uFF1F':'" \u5417\uFF1F',\u5206\u7EC4\u5220\u9664\u6210\u529F:"\u5206\u7EC4\u5220\u9664\u6210\u529F",\u5220\u9664\u5206\u7EC4\u5931\u8D25:"\u5220\u9664\u5206\u7EC4\u5931\u8D25","\u652F\u6301\u4EE5\u4E0B\u683C\u5F0F\uFF1A\n- \u6587\u4EF6\u5939\uFF1Afolder1, folder1/folder2\n- \u7B14\u8BB0\uFF1A[[note1]], [[note2]]\n- \u6807\u7B7E\uFF1A#tag1, #tag2\n- \u901A\u914D\u7B26\uFF1A*.excalidraw.md\n- \u5185\u5BB9\uFF1A\u76F4\u63A5\u8F93\u5165\u8981\u641C\u7D22\u7684\u6587\u672C":`\u652F\u6301\u4EE5\u4E0B\u683C\u5F0F\uFF1A
|
|
- \u6587\u4EF6\u5939\uFF1Afolder1, folder1/folder2
|
|
- \u7B14\u8BB0\uFF1A[[note1]], [[note2]]
|
|
- \u6807\u7B7E\uFF1A#tag1, #tag2
|
|
- \u901A\u914D\u7B26\uFF1A*.excalidraw.md
|
|
- \u5185\u5BB9\uFF1A\u76F4\u63A5\u8F93\u5165\u8981\u641C\u7D22\u7684\u6587\u672C`,"\u53CD\u8F6C\u5361\u7247\uFF08\u4F7F\u7528\u8BC4\u8BBA\u4F5C\u4E3A\u95EE\u9898\uFF09":"\u53CD\u8F6C\u5361\u7247\uFF08\u4F7F\u7528\u8BC4\u8BBA\u4F5C\u4E3A\u95EE\u9898\uFF09","Learning settings":"\u5B66\u4E60\u8BBE\u7F6E","\u8BB0\u5FC6\u4FDD\u6301\u7387 = (\u603B\u590D\u4E60\u6B21\u6570 - \u9057\u5FD8\u6B21\u6570) / \u603B\u590D\u4E60\u6B21\u6570\n\u8BE5\u6307\u6807\u53CD\u6620\u4E86\u4F60\u7684\u5B66\u4E60\u6548\u679C\uFF0C\u8D8A\u9AD8\u8BF4\u660E\u8BB0\u5FC6\u6548\u679C\u8D8A\u597D":`\u8BB0\u5FC6\u4FDD\u6301\u7387 = (\u603B\u590D\u4E60\u6B21\u6570 - \u9057\u5FD8\u6B21\u6570) / \u603B\u590D\u4E60\u6B21\u6570
|
|
\u8BE5\u6307\u6807\u53CD\u6620\u4E86\u4F60\u7684\u5B66\u4E60\u6548\u679C\uFF0C\u8D8A\u9AD8\u8BF4\u660E\u8BB0\u5FC6\u6548\u679C\u8D8A\u597D`,"Open (double-click)":"\u53CC\u51FB\u6253\u5F00"};var va={en:wa,zh:Ca};function B(M){let s=(Qa.moment.locale().startsWith("zh")?va.zh:va.en)[M];return s||M}var Mt=class extends iA.Component{constructor(e,s){super();this.progressContainer=null;this.currentIndex=0;this.isFlipped=!1;this.cards=[];this.isActive=!1;this.currentCard=null;this.currentGroupName="All Cards";this.completionMessage=null;this.groupCompletionMessages={};this.groupProgress={};this.ratingButtons=[{label:B("Again"),rating:HA.AGAIN,key:"1",ratingText:"again",stability:.1},{label:B("Hard"),rating:HA.HARD,key:"2",ratingText:"hard",stability:.5},{label:B("Good"),rating:HA.GOOD,key:"3",ratingText:"good",stability:2},{label:B("Easy"),rating:HA.EASY,key:"4",ratingText:"easy",stability:4}];this.container=e,this.fsrsManager=s.fsrsManager,this.app=s.app,this.setupKeyboardShortcuts();let n=this.fsrsManager.getUIState();this.currentGroupName=n.currentGroupName,this.currentIndex=n.currentIndex,this.isFlipped=n.isFlipped,this.completionMessage=n.completionMessage||null,this.groupCompletionMessages=n.groupCompletionMessages||{},this.groupProgress=n.groupProgress||{}}formatInterval(e){return e<1?`${Math.round(e*24)}h`:e<30?`${Math.round(e)}d`:e<365?`${Math.round(e/30)}mo`:`${Math.round(e/365)}y`}setLicenseManager(e){this.licenseManager=e}setCards(e){var s;for(let n of e){if(!((s=n.comments)!=null&&s.length))continue;let l=n.text&&n.text.includes("#"),h=n.comments.map(d=>d.content).join("<hr>");n.filePath&&(this.fsrsManager.getCardsByFile(n.filePath).filter(u=>u.text===n.text).length===0?this.fsrsManager.addCard(n.text,h,n.filePath):this.fsrsManager.updateCardContent(n.text,h,n.filePath))}if(this.currentGroupName==="All Cards")this.cards=this.fsrsManager.getLatestCards();else if(this.currentGroupName==="Due Today")this.cards=this.fsrsManager.getDueCards();else if(this.currentGroupName==="New Cards")this.cards=this.fsrsManager.getLatestCards().filter(n=>n.lastReview===0);else if(this.currentGroupName==="Learned")this.cards=this.fsrsManager.getLatestCards().filter(n=>n.lastReview>0);else{let n=this.fsrsManager.getCardGroups().find(l=>l.name===this.currentGroupName);n?this.cards=this.fsrsManager.getCardsInGroup(n):this.cards=this.fsrsManager.getLatestCards()}this.currentIndex=0,this.isFlipped=!1,this.currentCard=this.cards[0]||null,this.isActive&&this.activate()}cleanup(){document.removeEventListener("keydown",this.boundHandleKeyDown),this.deactivate()}async activate(){if(!this.licenseManager)return;let e=await this.licenseManager.isActivated();this.isActive=!0,e?this.render():this.renderActivation()}renderActivation(){this.container.empty(),this.container.addClass("flashcard-mode");let e=this.container.createEl("div",{cls:"flashcard-activation-container"}),s=e.createEl("div",{cls:"flashcard-activation-header",text:B("Activate HiCard")}),n=e.createEl("div",{cls:"flashcard-activation-description",text:B("Enter your license key to activate HiCard feature.")}),l=e.createEl("div",{cls:"flashcard-activation-input-container"}),h=l.createEl("input",{cls:"flashcard-activation-input",type:"text",placeholder:B("Enter license key")});l.createEl("button",{cls:"flashcard-activation-button",text:B("Activate")}).addEventListener("click",async()=>{let u=h.value.trim();if(!u){new iA.Notice(B("Please enter a license key"));return}await this.licenseManager.activateLicense(u)?(new iA.Notice(B("HiCard activated successfully!")),this.render()):new iA.Notice(B("Invalid license key"))})}deactivate(){this.saveState(),this.isActive=!1,this.container.empty(),this.container.removeClass("flashcard-mode"),this.container.removeClass("flashcard-container"),this.container.removeClass("is-flipped");let e=this.container.querySelector(".flashcard-container");e&&e.remove()}showGroupModal(e){var qA,NA,he,Vt,_t;let s=document.createElement("div");s.className="flashcard-modal",s.addEventListener("keydown",xA=>{xA.stopPropagation()});let n=document.createElement("div");n.className="flashcard-modal-content";let l=document.createElement("h3");l.textContent=e?B("Edit Group"):B("Create New Group"),n.appendChild(l);let h=document.createElement("input");h.type="text",h.placeholder=B("Group Name"),h.className="flashcard-modal-input",e&&(h.value=e.name),n.appendChild(h);let d=document.createElement("textarea");d.placeholder=B(`\u652F\u6301\u4EE5\u4E0B\u683C\u5F0F\uFF1A
|
|
- \u6587\u4EF6\u5939\uFF1Afolder1, folder1/folder2
|
|
- \u7B14\u8BB0\uFF1A[[note1]], [[note2]]
|
|
- \u6807\u7B7E\uFF1A#tag1, #tag2
|
|
- \u901A\u914D\u7B26\uFF1A*.excalidraw.md
|
|
- \u5185\u5BB9\uFF1A\u76F4\u63A5\u8F93\u5165\u8981\u641C\u7D22\u7684\u6587\u672C`),d.className="flashcard-modal-input",d.rows=3,e&&(d.value=e.filter),n.appendChild(d);let u=document.createElement("div");u.className="flashcard-modal-option";let w=document.createElement("input");w.type="checkbox",w.className="flashcard-modal-checkbox",w.checked=(e==null?void 0:e.isReversed)||!1,u.appendChild(w);let p=document.createElement("label");p.textContent=B("\u53CD\u8F6C\u5361\u7247\uFF08\u4F7F\u7528\u8BC4\u8BBA\u4F5C\u4E3A\u95EE\u9898\uFF09"),p.className="flashcard-modal-label",u.appendChild(p),n.appendChild(u);let v=document.createElement("div");v.className="flashcard-modal-settings";let y=document.createElement("div");y.className="flashcard-modal-settings-header";let H=document.createElement("h4");H.textContent=B("Learning settings"),H.className="settings-title",y.appendChild(H);let E=document.createElement("div");E.className="flashcard-modal-option use-global-option";let F=document.createElement("input");F.type="checkbox",F.className="flashcard-modal-checkbox",F.id="use-global-settings",F.checked=((qA=e==null?void 0:e.settings)==null?void 0:qA.useGlobalSettings)!==!1,E.appendChild(F);let L=document.createElement("label");L.textContent=B("Use global settings"),L.className="flashcard-modal-label",L.htmlFor="use-global-settings",E.appendChild(L),y.appendChild(E),v.appendChild(y);let x=document.createElement("div");x.className="flashcard-modal-option slider-option";let S=document.createElement("label");S.textContent=B("New cards per day:"),S.className="flashcard-modal-label",x.appendChild(S);let V=document.createElement("div");V.className="slider-with-value";let k=document.createElement("input");k.type="range",k.min="5",k.max="100",k.step="5",k.className="flashcard-modal-slider",k.value=((he=(NA=e==null?void 0:e.settings)==null?void 0:NA.newCardsPerDay)==null?void 0:he.toString())||"20";let G=parseInt(k.value);G<5?k.value="5":G%5!==0&&(k.value=(Math.round(G/5)*5).toString()),V.appendChild(k);let J=document.createElement("span");J.className="slider-value",J.textContent=k.value,V.appendChild(J),k.addEventListener("input",()=>{J.textContent=k.value}),x.appendChild(V),v.appendChild(x);let z=document.createElement("div");z.className="flashcard-modal-option slider-option";let eA=document.createElement("label");eA.textContent=B("Reviews per day:"),eA.className="flashcard-modal-label",z.appendChild(eA);let sA=document.createElement("div");sA.className="slider-with-value";let rA=document.createElement("input");rA.type="range",rA.min="10",rA.max="300",rA.step="10",rA.className="flashcard-modal-slider",rA.value=((_t=(Vt=e==null?void 0:e.settings)==null?void 0:Vt.reviewsPerDay)==null?void 0:_t.toString())||"100";let EA=parseInt(rA.value);EA<10?rA.value="10":EA%10!==0&&(rA.value=(Math.round(EA/10)*10).toString()),sA.appendChild(rA);let bA=document.createElement("span");bA.className="slider-value",bA.textContent=rA.value,sA.appendChild(bA),rA.addEventListener("input",()=>{bA.textContent=rA.value}),z.appendChild(sA),v.appendChild(z);let Ae=()=>{let xA=F.checked;k.disabled=xA,rA.disabled=xA,x.classList.toggle("disabled",xA),z.classList.toggle("disabled",xA)};F.addEventListener("change",Ae),Ae(),n.appendChild(v);let ZA=document.createElement("div");ZA.className="flashcard-modal-buttons";let cA=document.createElement("button");cA.textContent=B("Cancel"),cA.className="flashcard-modal-button",cA.onclick=()=>{document.body.removeChild(s)};let dA=document.createElement("button");dA.textContent=e?B("Save"):B("Create"),dA.className="flashcard-modal-button primary",dA.onclick=async()=>{let xA=h.value.trim(),Oe=d.value.trim();if(!xA||!Oe){new iA.Notice(B("Please fill in all fields"));return}try{dA.disabled=!0,dA.textContent=e?B("Saving..."):B("Creating...");let ct={useGlobalSettings:F.checked,newCardsPerDay:parseInt(k.value),reviewsPerDay:parseInt(rA.value)};if(e)await this.fsrsManager.updateCardGroup(e.id,{name:xA,filter:Oe,isReversed:w.checked,settings:ct})?(this.currentGroupName===e.name&&(this.currentGroupName=xA),document.body.removeChild(s),this.render(),new iA.Notice(B("Group updated successfully"))):new iA.Notice(B("Failed to update group"));else{let Re=await this.fsrsManager.createCardGroup({name:xA,filter:Oe,sortOrder:this.fsrsManager.getCardGroups().length,createdTime:Date.now(),isReversed:w.checked,settings:ct});this.currentGroupName=xA,document.body.removeChild(s),this.render(),new iA.Notice(B("Group created successfully"))}}catch(ct){new iA.Notice(B("Failed to create or update group"))}finally{dA.disabled=!1,dA.textContent=e?B("Save"):B("Create")}},ZA.appendChild(cA),ZA.appendChild(dA),n.appendChild(ZA),s.appendChild(n),document.body.appendChild(s),h.focus()}showCreateGroupModal(){this.showGroupModal()}showEditGroupModal(e){this.showGroupModal(e)}renderGroupStats(e,s){let n=s?this.fsrsManager.getGroupProgress(s):this.fsrsManager.getProgress();if(!n)return;let l=e.createEl("div",{cls:"flashcard-stats-container"}),h=l.createEl("div",{cls:"flashcard-stat-item"});h.createEl("span",{cls:"flashcard-stat-label",text:B("Due Today")}),h.createEl("span",{cls:"flashcard-stat-value",text:n.due.toString()});let d=l.createEl("div",{cls:"flashcard-stat-item"});d.createEl("span",{cls:"flashcard-stat-label",text:B("New Cards")}),d.createEl("span",{cls:"flashcard-stat-value",text:n.newCards.toString()});let u=l.createEl("div",{cls:"flashcard-stat-item"});u.createEl("span",{cls:"flashcard-stat-label",text:B("Learned")}),u.createEl("span",{cls:"flashcard-stat-value",text:n.learned.toString()})}render(){if(!this.isActive){this.deactivate();return}this.container.empty(),this.container.addClass("flashcard-mode"),this.progressContainer=this.container.createEl("div",{cls:"flashcard-progress-container"});let e=this.progressContainer.createEl("div",{cls:"flashcard-progress-text"});e.createSpan({text:this.currentGroupName,cls:"group-name"}),e.createSpan({text:"|",cls:"separator"});let s=this.getGroupProgress();[{label:B("Due"),value:s.due},{label:B("New"),value:s.newCards},{label:B("Learned"),value:s.learned},{label:B("Retention"),value:`${(s.retention*100).toFixed(1)}%`}].forEach((S,V)=>{V>0&&e.createSpan({text:"|",cls:"separator"});let k=e.createEl("div",{cls:"stat"});if(k.createSpan({text:S.label+": "}),k.createSpan({text:S.value.toString(),cls:"stat-value"}),S.label===B("Retention")){let G=k.createSpan({cls:"help-icon"});(0,iA.setIcon)(G,"help-circle"),G.setAttribute("aria-label",B(`\u8BB0\u5FC6\u4FDD\u6301\u7387 = (\u603B\u590D\u4E60\u6B21\u6570 - \u9057\u5FD8\u6B21\u6570) / \u603B\u590D\u4E60\u6B21\u6570
|
|
\u8BE5\u6307\u6807\u53CD\u6620\u4E86\u4F60\u7684\u5B66\u4E60\u6548\u679C\uFF0C\u8D8A\u9AD8\u8BF4\u660E\u8BB0\u5FC6\u6548\u679C\u8D8A\u597D`))}}),this.updateProgress();let l=this.container.createEl("div",{cls:"flashcard-main-container"}),h=l.createEl("div",{cls:"flashcard-sidebar"}),u=h.createEl("div",{cls:"flashcard-default-groups"}).createEl("div",{cls:"flashcard-group-list"}),w=this.fsrsManager.getLatestCards(),p=Date.now();[{name:B("All Cards"),icon:"gallery-thumbnails",getCards:()=>w},{name:B("Due Today"),icon:"calendar-clock",getCards:()=>w.filter(S=>S.nextReview<=p)},{name:B("New Cards"),icon:"sparkle",getCards:()=>w.filter(S=>S.lastReview===0)},{name:B("Learned"),icon:"check-small",getCards:()=>w.filter(S=>S.lastReview>0)}].forEach((S,V)=>{let k=S.getCards(),G=u.createEl("div",{cls:`flashcard-group-item ${S.name===this.currentGroupName?"active":""}`}),J=G.createEl("div",{cls:"flashcard-group-item-left"}),z=J.createEl("div",{cls:"flashcard-group-icon"});(0,iA.setIcon)(z,S.icon),J.createEl("span",{cls:"flashcard-group-name",text:S.name}),G.createEl("span",{cls:"flashcard-group-count",text:k.length.toString()}),G.addEventListener("click",()=>{this.groupCompletionMessages[this.currentGroupName]=this.completionMessage,this.groupProgress[this.currentGroupName]={currentIndex:this.currentIndex,isFlipped:this.isFlipped},this.currentGroupName=S.name,this.container.querySelectorAll(".flashcard-group-item").forEach(sA=>sA.classList.remove("active")),G.classList.add("active"),this.completionMessage=this.groupCompletionMessages[S.name]||null,this.cards=k,this.groupProgress[S.name]&&!this.completionMessage?(this.currentIndex=this.groupProgress[S.name].currentIndex,this.isFlipped=this.groupProgress[S.name].isFlipped):(this.currentIndex=0,this.isFlipped=!1),this.currentCard=this.cards[this.currentIndex]||null,this.saveState(),this.render()})});let y=h.createEl("div",{cls:"flashcard-custom-groups"}),H=y.createEl("div",{cls:"flashcard-add-group"});(0,iA.setIcon)(H,"plus"),H.addEventListener("click",()=>this.showCreateGroupModal());let E=y.createEl("div",{cls:"flashcard-group-list"});(this.fsrsManager.getCardGroups()||[]).forEach(S=>{let V=E.createEl("div",{cls:`flashcard-group-item ${S.name===this.currentGroupName?"active":""}`}),k=V.createEl("div",{cls:"flashcard-group-item-header"}),G=k.createEl("div",{cls:"flashcard-group-title"}),J=G.createEl("span",{cls:"flashcard-group-icon"});(0,iA.setIcon)(J,S.filter.startsWith("#")?"hash":"gallery-horizontal-end"),G.createEl("span",{cls:"flashcard-group-name",text:S.name});let z=k.createEl("div",{cls:"flashcard-group-actions"}),eA=z.createEl("div",{cls:"flashcard-group-action"});(0,iA.setIcon)(eA,"edit"),eA.addEventListener("click",EA=>{EA.stopPropagation(),this.showEditGroupModal(S)});let sA=z.createEl("div",{cls:"flashcard-group-action"});(0,iA.setIcon)(sA,"trash"),sA.addEventListener("click",async EA=>{if(EA.stopPropagation(),confirm(B('\u786E\u5B9A\u8981\u5220\u9664\u5206\u7EC4 "')+S.name+B('" \u5417\uFF1F')))try{await this.fsrsManager.deleteCardGroup(S.id)?(this.currentGroupName===S.name&&(this.currentGroupName="All Cards"),new iA.Notice(B("\u5206\u7EC4\u5220\u9664\u6210\u529F")),this.render()):new iA.Notice(B("\u5220\u9664\u5206\u7EC4\u5931\u8D25"))}catch(bA){new iA.Notice(B("\u5220\u9664\u5206\u7EC4\u5931\u8D25"))}});let rA=this.fsrsManager.getGroupProgress(S.id);if(rA){let EA=V.createEl("div",{cls:"flashcard-group-stats"}),bA=EA.createEl("div",{cls:"flashcard-group-stat",attr:{"data-tooltip":B("Due Today")}}),Ae=bA.createEl("span",{cls:"flashcard-stat-icon"});(0,iA.setIcon)(Ae,"calendar-clock"),bA.createEl("span",{text:rA.due.toString()});let ZA=EA.createEl("div",{cls:"flashcard-group-stat",attr:{"data-tooltip":B("New Cards")}}),cA=ZA.createEl("span",{cls:"flashcard-stat-icon"});(0,iA.setIcon)(cA,"sparkle"),ZA.createEl("span",{text:rA.newCards.toString()});let dA=EA.createEl("div",{cls:"flashcard-group-stat",attr:{"data-tooltip":B("Learned")}}),qA=dA.createEl("span",{cls:"flashcard-stat-icon"});(0,iA.setIcon)(qA,"check-small"),dA.createEl("span",{text:rA.learned.toString()})}V.addEventListener("click",()=>{this.groupCompletionMessages[this.currentGroupName]=this.completionMessage,this.groupProgress[this.currentGroupName]={currentIndex:this.currentIndex,isFlipped:this.isFlipped},this.currentGroupName=S.name,this.container.querySelectorAll(".flashcard-group-item").forEach(Ae=>Ae.classList.remove("active")),V.classList.add("active"),this.completionMessage=this.groupCompletionMessages[S.name]||null;let bA=this.fsrsManager.getCardsInGroup(S);this.cards=bA,this.groupProgress[S.name]&&!this.completionMessage?(this.currentIndex=this.groupProgress[S.name].currentIndex,this.isFlipped=this.groupProgress[S.name].isFlipped):(this.currentIndex=0,this.isFlipped=!1),this.currentCard=this.cards[this.currentIndex]||null,this.saveState(),this.render()})});let x=l.createEl("div",{cls:"flashcard-content-area"}).createEl("div",{cls:"flashcard-container"});if(this.cards.length===0){x.createEl("div",{cls:"flashcard-empty",text:B("No cards due for review")});return}if(this.completionMessage){let S=x.createEl("div",{cls:"flashcard-completion-message"}),V=S.createEl("div",{cls:"completion-icon"});(0,iA.setIcon)(V,"check-circle"),S.createEl("h3",{text:B("\u5B66\u4E60\u5B8C\u6210\uFF01")}),S.createEl("p",{text:this.completionMessage}),S.createEl("button",{cls:"flashcard-return-button",text:B("\u8FD4\u56DE\u7B2C\u4E00\u5F20\u5361\u7247")}).addEventListener("click",()=>{this.completionMessage=null,this.groupCompletionMessages[this.currentGroupName]=null,this.groupProgress[this.currentGroupName]={currentIndex:0,isFlipped:!1},this.currentIndex=0,this.currentCard=this.cards[0]||null,this.isFlipped=!1,this.saveState(),this.render()});return}if(this.currentCard){let S=x.createEl("div",{cls:"flashcard"}),G=this.fsrsManager.getCardGroups().filter(cA=>this.fsrsManager.getCardsInGroup(cA).some(qA=>{var NA;return qA.id===((NA=this.currentCard)==null?void 0:NA.id)})).some(cA=>cA.isReversed),J=G?this.currentCard.answer:this.currentCard.text,z=G?this.currentCard.text:this.currentCard.answer,eA=G,sA=cA=>cA.split("<hr>").filter(NA=>!/^(#[^\s#]+\s*)+$/.test(NA.trim())).join("<hr>");G?J=sA(J):z=sA(z);let EA=S.createEl("div",{cls:"flashcard-side flashcard-front"}).createEl("div",{cls:"flashcard-content markdown-rendered"});this.renderMarkdownContent(EA,J,this.currentCard.filePath);let Ae=S.createEl("div",{cls:"flashcard-side flashcard-back"}).createEl("div",{cls:"flashcard-content markdown-rendered"});this.renderMarkdownContent(Ae,z,this.currentCard.filePath),S.addEventListener("click",()=>this.flipCard());let ZA=x.createEl("div",{cls:"flashcard-rating"});if(this.ratingButtons.forEach(cA=>{var NA;let dA=ZA.createEl("button",{cls:"flashcard-rating-button",attr:{"data-rating":cA.ratingText,title:`${cA.label} (${cA.key})`}});dA.createSpan({text:cA.label});let qA=((NA=this.currentCard)==null?void 0:NA.lastReview)===0?cA.stability:this.fsrsManager.fsrsService.calculateNextInterval(.9,cA.stability);dA.createSpan({text:this.formatInterval(qA),cls:"days"}),dA.addEventListener("click",he=>{he.stopPropagation(),this.rateCard(cA.rating)})}),this.isFlipped&&S.classList.add("is-flipped"),x.createEl("div",{cls:"flashcard-counter",text:`${this.currentIndex+1}/${this.cards.length}`}),this.currentCard.filePath){let dA=x.createEl("div",{cls:"flashcard-source"}).createEl("span",{text:this.currentCard.filePath.split("/").pop()||""});this.addPagePreview(dA,this.currentCard.filePath)}}else x.createEl("div",{cls:"flashcard-empty-state",text:B("No cards available")})}setupKeyboardShortcuts(){this.boundHandleKeyDown=this.handleKeyDown.bind(this),document.addEventListener("keydown",this.boundHandleKeyDown)}handleKeyDown(e){if(!(!this.isActive||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||!(this.container.contains(e.target)||this.container===e.target))){if(e.key==="Enter"||e.key===" ")e.preventDefault(),this.flipCard();else if(e.key==="ArrowLeft")e.preventDefault(),this.isFlipped||this.previousCard();else if(e.key==="ArrowRight")e.preventDefault(),this.isFlipped||this.nextCard();else if(this.isFlipped){let n=this.ratingButtons.find(l=>l.key===e.key);n&&(e.preventDefault(),this.rateCard(n.rating))}}}rateCard(e){if(!this.currentCard)return;let s=this.fsrsManager.reviewCard(this.currentCard.id,e);if(s){this.cards[this.currentIndex]=s;let n=!1,l=this.fsrsManager.getCardGroups().find(d=>d.name===this.currentGroupName),h=l==null?void 0:l.id;if(this.currentGroupName==="New Cards"&&!this.fsrsManager.canLearnNewCardsToday())this.completionMessage=B("\u60A8\u4ECA\u5929\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002");else if(this.currentGroupName==="Due Today"&&!this.fsrsManager.canReviewCardsToday())this.completionMessage=B("\u60A8\u4ECA\u5929\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002");else if(h){let d=s.reviews===1;d&&!this.fsrsManager.canLearnNewCardsToday(h)?this.completionMessage=B('\u60A8\u4ECA\u5929\u5728 "')+this.currentGroupName+B('" \u5206\u7EC4\u7684\u65B0\u5361\u7247\u5B66\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u5B66\u4E60\u5427\u3002'):!d&&!this.fsrsManager.canReviewCardsToday(h)?this.completionMessage=B('\u60A8\u4ECA\u5929\u5728 "')+this.currentGroupName+B('" \u5206\u7EC4\u7684\u590D\u4E60\u914D\u989D\u5DF2\u7528\u5B8C\uFF01\u660E\u5929\u518D\u6765\u590D\u4E60\u5427\u3002'):this.currentIndex<this.cards.length-1?(this.currentIndex++,n=!0):(this.completionMessage=B('\u606D\u559C\uFF01\u60A8\u5DF2\u5B8C\u6210 "')+this.currentGroupName+B('" \u4E2D\u7684\u6240\u6709\u5361\u7247\u5B66\u4E60\u3002'),this.currentIndex=0,n=this.cards.length>0)}else this.currentIndex<this.cards.length-1?(this.currentIndex++,n=!0):(this.completionMessage=B('\u606D\u559C\uFF01\u60A8\u5DF2\u5B8C\u6210 "')+this.currentGroupName+B('" \u4E2D\u7684\u6240\u6709\u5361\u7247\u5B66\u4E60\u3002'),this.currentIndex=0,n=this.cards.length>0);this.currentCard=n?this.cards[this.currentIndex]:null,this.isFlipped=!1,this.saveState(),this.render(),this.updateProgress(),(this.currentGroupName==="New Cards"||this.currentGroupName==="Due Today")&&this.refreshCardList()}}refreshCardList(){if(this.currentGroupName==="New Cards"){let e=this.fsrsManager.getLatestCards();this.cards=e.filter(s=>s.lastReview===0)}else if(this.currentGroupName==="Due Today"){let e=this.fsrsManager.getLatestCards(),s=Date.now();this.cards=e.filter(n=>n.nextReview<=s)}else if(this.currentGroupName==="All Cards")this.cards=this.fsrsManager.getLatestCards();else if(this.currentGroupName==="Learned"){let e=this.fsrsManager.getLatestCards();this.cards=e.filter(s=>s.lastReview>0)}else{let e=this.fsrsManager.getCardGroups().find(s=>s.name===this.currentGroupName);if(e){let s=this.fsrsManager.getCardsInGroup(e);if(e.settings&&!e.settings.useGlobalSettings&&(this.fsrsManager.getRemainingNewCardsToday(e.id)<=0&&(s=s.filter(h=>h.lastReview>0)),this.fsrsManager.getRemainingReviewsToday(e.id)<=0)){let h=Date.now();s=s.filter(d=>d.lastReview===0||d.nextReview>h)}this.cards=s}}this.completionMessage||(this.currentIndex>=this.cards.length&&(this.currentIndex=0),this.currentCard=this.cards[this.currentIndex]||null,this.isFlipped=!1),this.saveState(),this.render()}flipCard(){if(!this.currentCard)return;this.isFlipped=!this.isFlipped;let e=this.container.querySelector(".flashcard");e&&(e.classList.toggle("is-flipped",this.isFlipped),this.saveState(),this.updateProgress())}nextCard(){this.currentIndex<this.cards.length-1&&(this.currentIndex++,this.currentCard=this.cards[this.currentIndex],this.isFlipped=!1,this.saveState(),this.render(),this.updateProgress())}saveState(){this.fsrsManager.updateUIState({currentGroupName:this.currentGroupName,currentIndex:this.currentIndex,isFlipped:this.isFlipped,completionMessage:this.completionMessage,groupCompletionMessages:this.groupCompletionMessages,groupProgress:this.groupProgress})}getGroupProgress(){let e={due:0,newCards:0,learned:0,retention:0};if(this.currentGroupName==="All Cards")return this.fsrsManager.getProgress()||e;let s=this.fsrsManager.getCardGroups().find(h=>h.name===this.currentGroupName);if(s)return this.fsrsManager.getGroupProgress(s.id)||e;let n=this.fsrsManager.getLatestCards(),l=Date.now();if(this.currentGroupName==="Due Today"){let h=n.filter(d=>d.nextReview<=l);return{due:h.length,newCards:h.filter(d=>d.lastReview===0).length,learned:h.filter(d=>d.lastReview>0).length,retention:this.calculateRetention(h)}}else if(this.currentGroupName==="New Cards"){let h=n.filter(d=>d.lastReview===0);return{due:h.filter(d=>d.nextReview<=l).length,newCards:h.length,learned:0,retention:0}}else if(this.currentGroupName==="Learned"){let h=n.filter(d=>d.lastReview>0);return{due:h.filter(d=>d.nextReview<=l).length,newCards:0,learned:h.length,retention:this.calculateRetention(h)}}return this.fsrsManager.getProgress()||e}calculateRetention(e){if(e.length===0)return 0;let s=e.filter(h=>h.lastReview>0);if(s.length===0)return 0;let n=s.reduce((h,d)=>h+d.reviews,0),l=s.reduce((h,d)=>h+d.lapses,0);return n>0?(n-l)/n:0}updateProgress(){if(!this.progressContainer||this.cards.length===0)return;let s=this.currentIndex/this.cards.length*100;this.progressContainer.style.setProperty("--progress-width",`${s}%`);let n=this.progressContainer.querySelector(".progress-text"),l=`${this.currentIndex+1}/${this.cards.length} | ${Math.round(s)}%`;if(n)n.textContent=l;else{let w=this.progressContainer.createSpan({cls:"progress-text"});w.textContent=l}let h=this.progressContainer.querySelector(".group-name");h&&(h.textContent=this.currentGroupName);let d=this.getGroupProgress(),u=this.progressContainer.querySelectorAll(".stat-value");if(u.length>=4&&(u[0].textContent=d.due.toString(),u[1].textContent=d.newCards.toString(),u[2].textContent=d.learned.toString(),u[3].textContent=`${(d.retention*100).toFixed(1)}%`,u.length>=5)){let w=this.fsrsManager.getCardGroups().find(H=>H.name===this.currentGroupName),p=w==null?void 0:w.id,v=this.fsrsManager.getRemainingNewCardsToday(p),y=this.fsrsManager.getRemainingReviewsToday(p);u[4].textContent=`${v} ${B("New")}, ${y} ${B("Review")}`}}addPagePreview(e,s){if(!s)return;let n=this.app.vault.getAbstractFileByPath(s);if(!(n instanceof iA.TFile))return;let l;e.addEventListener("mouseenter",h=>{l=setTimeout(async()=>{let d=h.target;this.app.workspace.trigger("hover-link",{event:h,source:"hi-note",hoverParent:d,targetEl:d,linktext:n.path})},300)}),e.addEventListener("mouseleave",()=>{l&&clearTimeout(l)})}previousCard(){this.currentIndex>0&&(this.currentIndex--,this.currentCard=this.cards[this.currentIndex],this.isFlipped=!1,this.saveState(),this.render(),this.updateProgress())}renderHTMLContent(e,s){for(;e.firstChild;)e.removeChild(e.firstChild);let n=s.split("<hr>");n.forEach((l,h)=>{if(l.trim()){let d=e.createEl("div",{cls:"flashcard-paragraph"}),u=l.trim().replace(/<\/?b>/g,"**").replace(/<\/?i>/g,"_").replace(/<\/?u>/g,"").replace(/<\/?strong>/g,"**").replace(/<\/?em>/g,"_").replace(/<br\s*\/?>/g,`
|
|
`).replace(/<\/?p>/g,`
|
|
`).replace(/<\/?div>/g,`
|
|
`).replace(/<span class="highlight-tag">(.*?)<\/span>/g,"$1").replace(/<[^>]*>/g,"");d.setText(u)}h<n.length-1&&e.createEl("hr")})}async renderMarkdownContent(e,s,n){for(;e.firstChild;)e.removeChild(e.firstChild);let l=s;s.includes("<")&&s.includes(">")&&(l=s.replace(/<\/?b>/g,"**").replace(/<\/?i>/g,"_").replace(/<\/?u>/g,"").replace(/<\/?strong>/g,"**").replace(/<\/?em>/g,"_").replace(/<br\s*\/?>/g,`
|
|
`).replace(/<\/?p>/g,`
|
|
`).replace(/<\/?div>/g,`
|
|
`).replace(/<span class="highlight-tag">(.*?)<\/span>/g,"$1").replace(/<hr>/g,`---
|
|
`).replace(/<[^>]*>/g,""));let h=l.split(`---
|
|
`);for(let d=0;d<h.length;d++){let u=h[d].trim();if(!u)continue;let w=e.createEl("div",{cls:"flashcard-paragraph markdown-rendered"});try{await iA.MarkdownRenderer.render(this.app,u,w,n||"",new iA.Component),w.querySelectorAll("ul, ol").forEach(v=>{v.addClass("flashcard-markdown-list")})}catch(p){console.error("Error rendering markdown in flashcard:",p),w.textContent=u}d<h.length-1&&e.createEl("hr")}}destroy(){document.removeEventListener("keydown",this.boundHandleKeyDown),this.container.removeClass("flashcard-mode"),this.container.empty()}};var Lt=require("obsidian");var Fa={id:"default",name:B("Default Template"),description:B("Modern minimalist knowledge card style"),render:M=>{var H;let a=document.createElement("div");a.className="highlight-export-card highlight-export-card-modern";let e=document.createElement("div");e.className="highlight-export-quote-section";let s=document.createElement("div");s.className="highlight-export-quote-decoration";let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","48"),n.setAttribute("height","48"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","1");let l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d","M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z");let h=document.createElementNS("http://www.w3.org/2000/svg","path");h.setAttribute("d","M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"),n.appendChild(l),n.appendChild(h),s.appendChild(n),e.appendChild(s);let d=document.createElement("div");d.className="highlight-export-quote",d.textContent=M.text,e.appendChild(d),a.appendChild(e);let u=document.createElement("div");u.className="highlight-export-footer";let w=document.createElement("div");w.className="highlight-export-source",w.textContent=M.fileName||((H=M.filePath)==null?void 0:H.split("/").pop())||"Untitled",u.appendChild(w);let p=document.createElement("div");p.className="highlight-export-date";let v=new Date,y={year:"numeric",month:"long",day:"numeric"};return p.textContent=v.toLocaleDateString(void 0,y),u.appendChild(p),a.appendChild(u),a}},jd={id:"academic",name:B("Academic Template"),description:B("Formal style suitable for academic citations"),render:M=>{var h;let a=document.createElement("div");a.className="highlight-export-card highlight-export-card-academic";let e=document.createElement("div");e.className="highlight-export-quote",e.textContent=`"${M.text}"`,a.appendChild(e);let s=document.createElement("div");s.className="highlight-export-footer";let n=document.createElement("div");n.className="highlight-export-source",n.textContent=M.fileName||((h=M.filePath)==null?void 0:h.split("/").pop())||"Untitled",s.appendChild(n);let l=document.createElement("div");return l.className="highlight-export-date",l.textContent=`Retrieved: ${new Date().toLocaleDateString()}`,s.appendChild(l),a.appendChild(s),a}},zd={id:"social",name:B("Social Template"),description:B("Modern style suitable for social media sharing"),render:M=>{var v;let a=document.createElement("div");a.className="highlight-export-card highlight-export-card-social";let e=document.createElement("div");e.className="highlight-export-header";let s=document.createElement("div");s.className="highlight-export-logo";let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("width","24"),n.setAttribute("height","24"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2"),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round");let l=document.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx","12"),l.setAttribute("cy","12"),l.setAttribute("r","10");let h=[["14.31","8","20.05","17.94"],["9.69","8","21.17","8"],["7.38","12","13.12","2.06"],["9.69","16","3.95","6.06"],["14.31","16","2.83","16"],["16.62","12","10.88","21.94"]].map(([y,H,E,F])=>{let L=document.createElementNS("http://www.w3.org/2000/svg","line");return L.setAttribute("x1",y),L.setAttribute("y1",H),L.setAttribute("x2",E),L.setAttribute("y2",F),L});n.appendChild(l),h.forEach(y=>n.appendChild(y)),s.appendChild(n),e.appendChild(s);let d=document.createElement("div");d.className="highlight-export-app-name",d.textContent="Obsidian",e.appendChild(d),a.appendChild(e);let u=document.createElement("div");u.className="highlight-export-quote",u.textContent=M.text,a.appendChild(u);let w=document.createElement("div");w.className="highlight-export-footer";let p=document.createElement("div");return p.className="highlight-export-source",p.textContent=M.fileName||((v=M.filePath)==null?void 0:v.split("/").pop())||"Untitled",w.appendChild(p),a.appendChild(w),a}},os=[Fa,jd,zd];function ls(M){return os.find(a=>a.id===M)||Fa}var Ua=`
|
|
/* \u5BFC\u51FA\u5361\u7247\u57FA\u7840\u6837\u5F0F */
|
|
.highlight-export-card {
|
|
transition: all 0.3s ease;
|
|
padding: 20px;
|
|
background-color: #ffffff;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
|
|
/* \u6DFB\u52A0\u66F4\u4E25\u683C\u7684\u6587\u672C\u63A7\u5236 */
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
letter-spacing: normal;
|
|
word-spacing: normal;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
}
|
|
|
|
/* \u73B0\u4EE3\u98CE\u683C\u6A21\u677F */
|
|
.highlight-export-card-modern {
|
|
padding: 24px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.highlight-export-card-modern::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 4px;
|
|
background: linear-gradient(to bottom right, #5871ef 0%, #4c63e6 100%);
|
|
}
|
|
|
|
.highlight-export-card-modern .highlight-export-quote-decoration {
|
|
position: absolute;
|
|
top: 24px;
|
|
right: 24px;
|
|
opacity: 0.06;
|
|
transform: scale(2);
|
|
}
|
|
|
|
.highlight-export-card-modern .highlight-export-quote-section {
|
|
position: relative;
|
|
padding: 24px 0;
|
|
/* \u786E\u4FDD\u5F15\u7528\u90E8\u5206\u7684\u6587\u672C\u6837\u5F0F\u4E00\u81F4\u6027 */
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
letter-spacing: inherit;
|
|
word-spacing: inherit;
|
|
}
|
|
|
|
.highlight-export-card-modern .highlight-export-quote {
|
|
font-size: 1em;
|
|
line-height: 1.7;
|
|
color: #333333;
|
|
font-weight: 400;
|
|
margin: 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
/* \u786E\u4FDD\u5F15\u7528\u6587\u672C\u7684\u6837\u5F0F\u4E00\u81F4\u6027 */
|
|
letter-spacing: normal;
|
|
word-spacing: normal;
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* \u786E\u4FDD\u6240\u6709\u6587\u672C\u5143\u7D20\u7EE7\u627F\u57FA\u7840\u6837\u5F0F */
|
|
.highlight-export-card * {
|
|
text-rendering: optimizeLegibility;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* \u5BFC\u51FA\u9884\u89C8\u5BB9\u5668 */
|
|
.highlight-export-preview {
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
|
padding: 20px;
|
|
}
|
|
|
|
/* \u5BFC\u51FA\u5BB9\u5668 */
|
|
.highlight-export-container {
|
|
padding: 20px;
|
|
margin: 0;
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
|
width: 480px;
|
|
}
|
|
`;var Li=class extends Lt.Modal{constructor(e,s,n){super(e);this.selectedTemplateId="default";this.highlight=s,this.html2canvasInstance=n}async onOpen(){let{contentEl:e}=this;e.empty(),e.addClass("highlight-export-modal");let s=e.createEl("div",{cls:"highlight-export-main-container"}),l=s.createEl("div",{cls:"highlight-template-selector"}).createEl("select",{cls:"highlight-template-select"});os.forEach(d=>{let u=l.createEl("option",{text:d.name,value:d.id});this.selectedTemplateId===d.id&&(u.selected=!0)}),l.addEventListener("change",d=>{let u=d.target;this.selectedTemplateId=u.value,this.updatePreview()}),this.previewContainer=s.createEl("div",{cls:"highlight-export-preview-container"}),this.updatePreview();let h=e.createEl("div",{cls:"highlight-export-modal-buttons"});h.createEl("button",{cls:"highlight-btn",text:B("Cancel")}).addEventListener("click",()=>this.close()),h.createEl("button",{cls:"highlight-btn highlight-btn-primary",text:B("Download")}).addEventListener("click",async()=>{try{let d=document.createElement("div");d.className="highlight-export-container";let w=ls(this.selectedTemplateId).render(this.highlight);d.appendChild(w),document.body.appendChild(d);let v=(await this.html2canvasInstance(d,{backgroundColor:null,scale:window.devicePixelRatio*2,useCORS:!0,allowTaint:!0,logging:!1,imageTimeout:0,removeContainer:!0,onclone:async H=>{let E=H.createElement("style");E.textContent=this.getExportStyles(),H.head.appendChild(E),await new Promise(F=>setTimeout(F,100))}})).toDataURL("image/png",1),y=document.createElement("a");y.download=`highlight-${this.selectedTemplateId}-${Date.now()}.png`,y.href=v,y.click(),this.close(),new Lt.Notice(B("Export successful!"))}catch(d){new Lt.Notice(B("Export failed, please try again"))}})}updatePreview(){this.previewContainer.empty(),this.previewContainer.className="highlight-export-preview";let s=ls(this.selectedTemplateId).render(this.highlight);this.previewContainer.appendChild(s)}getExportStyles(){return`
|
|
body {
|
|
margin: 0;
|
|
background: none;
|
|
}
|
|
${Ua}
|
|
`}onClose(){let{contentEl:e}=this;e.empty()}};var Dt=require("obsidian"),Tt=class extends Dt.Component{constructor(e,s,n,l=window.app){super();this.highlight=s;this.onHighlightClick=n;this.app=l;this.render(e).catch(h=>{console.error("Error rendering highlight content:",h)})}async render(e){this.container=e.createEl("div",{cls:"highlight-content"}),await this.renderText()}async renderText(){this.textContainer=this.container.createEl("div",{cls:"highlight-text-container"});let e=this.textContainer.createEl("div",{cls:"highlight-text-decorator"});this.highlight.backgroundColor&&(e.style.backgroundColor=this.highlight.backgroundColor);let n=this.textContainer.createEl("div",{cls:"highlight-text"}).createEl("div",{cls:`highlight-text-content ${this.highlight.isVirtual?"virtual-highlight":""} markdown-rendered`}),l=(this.highlight.isVirtual?this.highlight.displayText:this.highlight.text)||"";try{await Dt.MarkdownRenderer.render(this.app,l,n,this.highlight.filePath||"",new Dt.Component),n.querySelectorAll("ul, ol").forEach(d=>{d.addClass("highlight-markdown-list")})}catch(h){console.error("Error rendering markdown in highlight:",h);let d=l.split(`
|
|
`);d.forEach((u,w)=>{let p=n.createEl("p",{text:u,cls:"highlight-text-line"});w<d.length-1&&p.addClass("highlight-text-line-spacing")})}n.addEventListener("mousedown",async h=>{h.preventDefault(),h.stopPropagation(),await this.onHighlightClick(this.highlight)})}getContainer(){return this.container}};Tt.dragPreview=null;var gs=require("obsidian");var Ke=require("obsidian");var At=[{id:"deepseek-chat",name:"Deepseek Chat"},{id:"deepseek-reasoner",name:"Deepseek Reasoner"}],Fe=[{id:"gemini-1.5-flash",name:"Gemini 1.5 Flash"},{id:"gemini-1.5-pro",name:"Gemini 1.5 Pro"},{id:"gemini-2.0-flash",name:"Gemini 2.0 Flash"},{id:"gemini-2.0-flash-lite-preview-02-05",name:"Gemini 2.0 Flash Lite"}],se=[{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek V3",isCustom:!1},{id:"Qwen/Qwen2.5-7B-Instruct",name:"Qwen2.5 7B",isCustom:!1},{id:"Qwen/Qwen2.5-14B-Instruct",name:"Qwen2.5 14B",isCustom:!1},{id:"Pro/Qwen/Qwen2-7B-Instruct",name:"Qwen2 7B",isCustom:!1},{id:"Pro/THUDM/glm-4-9b-chat",name:"GLM-4 9B",isCustom:!1},{id:"google/gemma-2-9b-it",name:"Gemma2 9B",isCustom:!1}],Y={excludePatterns:"",useCustomPattern:!1,highlightPattern:"==\\s*(.*?)\\s*==|<mark[^>]*>(.*?)</mark>|<span[^>]*>(.*?)</span>",defaultHighlightColor:"#ffeb3b",ai:{provider:"ollama",ollama:{host:"http://localhost:11434",model:""},gemini:{apiKey:"",model:"gemini-pro",baseUrl:"",isCustomModel:!1},openai:{apiKey:"",model:"gpt-4o",baseUrl:""},anthropic:{apiKey:"",model:"claude-2",apiAddress:"",isCustomModel:!1,lastCustomModel:""},deepseek:{apiKey:"",model:"deepseek-chat",baseUrl:""},prompts:{"\u{1F914} Key Insight":"{{highlight}}.Please reinterpret the above content from a fresh perspective and summarize its core idea within 200 characters."}},export:{exportPath:""}};var et=require("obsidian"),tt=class{constructor(a="http://localhost:11434"){this.retryAttempts=3;this.retryDelay=1e3;!a.startsWith("http://")&&!a.startsWith("https://")&&(a="http://"+a),this.baseUrl=a.replace(/\/$/,"")}async listModels(){try{await this.ensureConnection();let a=await this.makeRequest({endpoint:"/api/tags",method:"GET"});if(!a||!a.models)throw new Error("Invalid API response format");return a.models.map(e=>e.name)}catch(a){throw this.handleError(a)}}async generateCompletion(a,e){try{await this.ensureConnection();let s=await this.makeRequest({endpoint:"/api/generate",method:"POST",body:JSON.stringify({model:a,prompt:e,stream:!1})});if(!s||!s.response)throw new Error("Invalid API response format");return s.response}catch(s){throw this.handleError(s)}}async pullModel(a){try{new et.Notice(`Downloading model ${a}...`);let e=await this.makeRequest({endpoint:"/api/pull",method:"POST",body:JSON.stringify({name:a})});if(!e.ok)throw new Error(`Failed to download model: ${e.status}`);new et.Notice(`Model ${a} downloaded successfully`)}catch(e){throw new Error(`Failed to download model: ${e.message}`)}}async chat(a,e){var s;try{await this.ensureConnection();let n=await this.makeRequest({endpoint:"/api/chat",method:"POST",body:JSON.stringify({model:a,messages:e,stream:!1})});if(!n||!((s=n.message)!=null&&s.content))throw new Error("Invalid API response format");return n.message.content}catch(n){throw this.handleError(n)}}async ensureConnection(){if(!this.baseUrl)throw new Error("Ollama service not configured. Please set the host in settings.");if(!await this.testConnection())throw new Error("Unable to connect to Ollama service. Please ensure the service is running.")}async testConnection(){if(!this.baseUrl)return!1;try{let a=await this.makeRequest({endpoint:"/api/version",method:"GET"});return!!(a!=null&&a.version)}catch(a){return!1}}async makeRequest(a){let e=null;for(let s=1;s<=this.retryAttempts;s++)try{let n=new URL(a.endpoint,this.baseUrl).toString(),l=await(0,et.requestUrl)({url:n,method:a.method,headers:{"Content-Type":"application/json",Accept:"application/json"},body:a.body,throw:!1});if(l.status===200)try{return l.text?JSON.parse(l.text):{}}catch(d){throw new Error("Invalid JSON response from server")}let h=`HTTP error! status: ${l.status}`;try{let d=JSON.parse(l.text);d.error&&(h=d.error)}catch(d){l.text&&(h=l.text)}throw new Error(h)}catch(n){if(e=n,s<this.retryAttempts){await this.delay(this.retryDelay*s);continue}break}throw e}handleError(a){return a.message.includes("ECONNREFUSED")?(new et.Notice("Ollama service is not running. Please start the service."),new Error("Unable to connect to Ollama service. Please ensure the service is running.")):a instanceof TypeError&&a.message.includes("Invalid URL")?new Error(`Invalid Ollama service URL: ${this.baseUrl}`):a}delay(a){return new Promise(e=>setTimeout(e,a))}};var cs=require("obsidian"),it=class{constructor(a,e,s){this.apiKey=a,this.apiAddress=e||"https://api.anthropic.com",this.model=s||"claude-3-opus-20240229"}async generateResponse(a){try{let e=await(0,cs.requestUrl)({url:`${this.apiAddress}/v1/messages`,method:"POST",headers:{"x-api-key":this.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:this.model,max_tokens:4096,messages:[{role:"user",content:a}]})});if(e.status!==200)throw new Error(`Anthropic API error: ${e.text}`);return e.json.content[0].text}catch(e){throw new Error("Failed to generate response from Anthropic API")}}async testConnection(){try{return(await(0,cs.requestUrl)({url:`${this.apiAddress}/v1/messages`,method:"POST",headers:{"x-api-key":this.apiKey,"anthropic-version":"2023-06-01","content-type":"application/json"},body:JSON.stringify({model:this.model,max_tokens:1,messages:[{role:"user",content:"Hi"}]})})).status===200}catch(a){return!1}}};var Ti=require("obsidian"),Di=class{constructor(a,e="gemini-pro",s){this.apiKey=a,this.model=e,this.baseUrl=s||"https://generativelanguage.googleapis.com"}updateModel(a){this.model=a}async generateResponse(a){var e,s,n,l,h;try{let d=`${this.baseUrl}/v1beta/models/${this.model}:generateContent?key=${this.apiKey}`,w=await(0,Ti.requestUrl)({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{parts:[{text:a}]}],generationConfig:{maxOutputTokens:2048,temperature:.7}})});if(w.status!==200)throw new Error(`Gemini API error (${w.status}): ${w.text}`);let p=w.json;if(!((h=(l=(n=(s=(e=p.candidates)==null?void 0:e[0])==null?void 0:s.content)==null?void 0:n.parts)==null?void 0:l[0])!=null&&h.text))throw new Error("Invalid response format from Gemini API");return p.candidates[0].content.parts[0].text}catch(d){throw d instanceof Error?d:new Error("Failed to generate response from Gemini API")}}async chat(a){var e,s,n,l,h;try{let d=`${this.baseUrl}/v1beta/models/${this.model}:generateContent?key=${this.apiKey}`,w={contents:a.map(y=>({role:y.role==="assistant"?"model":"user",parts:[{text:y.content}]})),generationConfig:{maxOutputTokens:2048,temperature:.7}},p=await(0,Ti.requestUrl)({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(p.status!==200)throw new Error(`Gemini Chat API error (${p.status}): ${p.text}`);let v=p.json;if(!((h=(l=(n=(s=(e=v.candidates)==null?void 0:e[0])==null?void 0:s.content)==null?void 0:n.parts)==null?void 0:l[0])!=null&&h.text))throw new Error("Invalid response format from Gemini Chat API");return v.candidates[0].content.parts[0].text}catch(d){throw d instanceof Error?d:new Error("Failed to chat with Gemini API")}}async testConnection(){try{let a=`${this.baseUrl}/v1beta/models/${this.model}?key=${this.apiKey}`,e=await(0,Ti.requestUrl)({url:a,method:"GET"});return e.status,e.status===200}catch(a){return!1}}};var hs=require("obsidian"),Ki=class{constructor(a){var e;if(!((e=a.siliconflow)!=null&&e.apiKey))throw new Error("SiliconFlow API key is required");this.settings=a,this.baseUrl=a.siliconflow.baseUrl||"https://api.siliconflow.cn/v1"}async chat(a,e){var s,n;try{let l=((s=this.settings.siliconflow)==null?void 0:s.model)||"deepseek-ai/DeepSeek-V3",h=await(0,hs.requestUrl)({url:`${this.baseUrl}/chat/completions`,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${(n=this.settings.siliconflow)==null?void 0:n.apiKey}`},body:JSON.stringify({model:l,messages:a.map(u=>({role:u.role,content:u.content})),stream:!1})});if(h.status!==200)throw new Error(`SiliconFlow API request failed: ${h.text}`);let d=h.json;if(!d.choices||!d.choices[0]||!d.choices[0].message)throw new Error("Unexpected API response format");return d.choices[0].message.content}catch(l){throw l}}async listModels(){var a;try{let e=await(0,hs.requestUrl)({url:`${this.baseUrl}/models`,method:"GET",headers:{Authorization:`Bearer ${(a=this.settings.siliconflow)==null?void 0:a.apiKey}`}});if(e.status!==200)throw new Error(`Failed to list models: ${e.text}`);return e.json.data.map(s=>({id:s.id,name:s.id.split("/").pop()||s.id,isCustom:!1}))}catch(e){throw e}}};var ds=require("obsidian"),Pi=class{constructor(a,e="deepseek-chat",s){this.apiKey=a;this.model=e,this.baseUrl=s||"https://api.deepseek.com/v1"}updateModel(a){this.model=a}async generateResponse(a){let e=[{role:"user",content:a}];return await this.chat(e)}async chat(a){var e,s,n;try{let l=await(0,ds.requestUrl)({url:`${this.baseUrl}/chat/completions`,method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({model:this.model,messages:a,temperature:.7,max_tokens:4096,frequency_penalty:0,presence_penalty:0})});if(l.status!==200)throw new Error(`Deepseek API error (${l.status}): ${l.text}`);let h=l.json;if(!((n=(s=(e=h.choices)==null?void 0:e[0])==null?void 0:s.message)!=null&&n.content))throw new Error("Invalid response format from Deepseek API");return h.choices[0].message.content}catch(l){throw l instanceof Error?l:new Error("Failed to generate response from Deepseek API")}}async testConnection(){try{return(await(0,ds.requestUrl)({url:`${this.baseUrl}/chat/completions`,method:"POST",headers:{Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:this.model,messages:[{role:"user",content:"test"}],max_tokens:10})})).status===200}catch(a){return!1}}};var Ea=require("obsidian"),rt=class{constructor(a){this.settings=a;this.anthropicService=null;this.geminiService=null;this.deepseekService=null;this.siliconflowService=null;this.currentState={provider:"",model:""};var e,s,n,l,h,d,u,w;switch((e=a.ollama)!=null&&e.host&&(this.ollamaService=new tt(a.ollama.host)),(s=a.anthropic)!=null&&s.apiKey&&(this.anthropicService=new it(a.anthropic.apiKey,a.anthropic.apiAddress,a.anthropic.model)),(n=a.gemini)!=null&&n.apiKey&&(this.geminiService=new Di(a.gemini.apiKey,a.gemini.model,a.gemini.baseUrl)),(l=a.deepseek)!=null&&l.apiKey&&(this.deepseekService=new Pi(a.deepseek.apiKey,a.deepseek.model,a.deepseek.baseUrl)),(h=a.siliconflow)!=null&&h.apiKey&&(this.siliconflowService=new Ki(this.settings)),this.currentState.provider=a.provider,a.provider){case"gemini":this.currentState.model=((d=a.gemini)==null?void 0:d.model)||"";break;case"deepseek":this.currentState.model=((u=a.deepseek)==null?void 0:u.model)||"deepseek-chat";break;case"siliconflow":this.currentState.model=((w=a.siliconflow)==null?void 0:w.model)||"internlm/internlm2_5-7b-chat";break}}updateModel(a,e){switch(this.currentState.provider=a,this.currentState.model=e,a){case"gemini":this.geminiService&&this.geminiService.updateModel(e);break;case"deepseek":this.deepseekService&&this.deepseekService.updateModel(e);break}}async generateResponse(a,e,s){let n=a.replace("{{highlight}}",e);switch(s&&(n=n.replace("{{comment}}",s)),this.settings.provider){case"openai":return await this.callOpenAI(n);case"anthropic":return await this.callAnthropic(n);case"ollama":return await this.callOllama(n);case"gemini":return await this.callGemini(n);case"deepseek":return await this.callDeepseek(n);case"siliconflow":return await this.callSiliconFlow(n);default:throw new Error("AI service not configured")}}async chat(a){switch(this.settings.provider){case"openai":return await this.chatWithOpenAI(a);case"anthropic":return await this.chatWithAnthropic(a);case"ollama":return await this.chatWithOllama(a);case"gemini":return await this.chatWithGemini(a);case"deepseek":return await this.chatWithDeepseek(a);case"siliconflow":return await this.chatWithSiliconFlow(a);default:throw new Error("AI service not configured")}}async chatWithOpenAI(a){var n;if(!((n=this.settings.openai)!=null&&n.apiKey))throw new Error("OpenAI API Key not configured");let e=await(0,Ea.requestUrl)({url:this.settings.openai.baseUrl||"https://api.openai.com/v1/chat/completions",method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.settings.openai.apiKey}`},body:JSON.stringify({model:this.settings.openai.model,messages:a,temperature:.7})});if(e.status!==200)throw new Error(`OpenAI API request failed: ${e.text}`);return e.json.choices[0].message.content}async chatWithAnthropic(a){if(!this.anthropicService)throw new Error("Anthropic service not configured");let e=a[a.length-1];return await this.anthropicService.generateResponse(e.content)}async chatWithOllama(a){var e;if(!this.ollamaService)throw new Error("Ollama service not configured");if(!((e=this.settings.ollama)!=null&&e.model))throw new Error("Ollama model not configured");return await this.ollamaService.chat(this.settings.ollama.model,a)}async chatWithGemini(a){if(!this.geminiService)throw new Error("Gemini service not configured");return await this.geminiService.chat(a)}async chatWithSiliconFlow(a){if(!this.siliconflowService)throw new Error("SiliconFlow service not configured");try{return await this.siliconflowService.chat(a)}catch(e){throw e}}async chatWithDeepseek(a){if(!this.deepseekService)throw new Error("Deepseek service not configured");return await this.deepseekService.chat(a)}async callOpenAI(a){return await this.chatWithOpenAI([{role:"user",content:a}])}async callAnthropic(a){if(!this.anthropicService)throw new Error("Anthropic service not configured");return await this.anthropicService.generateResponse(a)}async callOllama(a){var e;if(!this.ollamaService)throw new Error("Ollama service not configured");if(!((e=this.settings.ollama)!=null&&e.model))throw new Error("Ollama model not configured");return await this.ollamaService.generateCompletion(this.settings.ollama.model,a)}async callGemini(a){if(!this.geminiService)throw new Error("Gemini service not configured");return await this.geminiService.generateResponse(a)}async callSiliconFlow(a){if(!this.siliconflowService)throw new Error("SiliconFlow service not configured");try{return await this.siliconflowService.chat([{role:"user",content:a}])}catch(e){throw e}}async callDeepseek(a){if(!this.deepseekService)throw new Error("Deepseek service not configured");return await this.deepseekService.generateResponse(a)}async testConnection(){switch(this.settings.provider){case"openai":try{return await this.chatWithOpenAI([{role:"user",content:"test"}]),!0}catch(a){return!1}case"anthropic":return this.anthropicService?await this.anthropicService.testConnection():!1;case"ollama":return this.ollamaService?await this.ollamaService.testConnection():!1;case"gemini":return this.geminiService?await this.geminiService.testConnection():!1;case"deepseek":return this.deepseekService?await this.deepseekService.testConnection():!1;default:return!1}}async listOllamaModels(){if(!this.ollamaService)throw new Error("Ollama service not configured");return await this.ollamaService.listModels()}async listGeminiModels(){if(!this.geminiService)throw new Error("Gemini service not configured");return Promise.resolve(Fe)}async listDeepseekModels(){if(!this.deepseekService)throw new Error("Deepseek service not configured");return Promise.resolve([{id:"deepseek-chat",name:"Deepseek Chat"},{id:"deepseek-coder",name:"Deepseek Coder"}])}async listSiliconFlowModels(){return se}async listOpenAIModels(){var e,s;let a=[{id:"gpt-4",name:"GPT-4",isCustom:!1},{id:"gpt-4-turbo",name:"GPT-4 Turbo",isCustom:!1},{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo",isCustom:!1}];return(e=this.settings.openai)!=null&&e.isCustomModel&&((s=this.settings.openai)!=null&&s.model)&&a.push({id:this.settings.openai.model,name:this.settings.openai.model,isCustom:!0}),a}};var ki=class{constructor(a,e,s,n){this.highlight=e;this.onCommentAdd=n;var d;this.plugin=s,this.container=a,this.initButton(),this.boundClickHandler=u=>{this.container.contains(u.target)||this.closeDropdown()},document.addEventListener("click",this.boundClickHandler);let l=(d=this.plugin.app.workspace.getLeavesOfType("comment-view")[0])==null?void 0:d.view,h=l instanceof JA?l:null;h!=null&&h.registerAIButton&&h.registerAIButton(this)}destroy(){var s;document.removeEventListener("click",this.boundClickHandler);let a=(s=this.plugin.app.workspace.getLeavesOfType("comment-view")[0])==null?void 0:s.view,e=a instanceof JA?a:null;e!=null&&e.unregisterAIButton&&e.unregisterAIButton(this)}initButton(){let a=this.container.createEl("div",{cls:"highlight-ai-container"}),e=a.createEl("button",{cls:"highlight-action-btn highlight-ai-btn",attr:{"aria-label":B("Select Prompt")}});(0,Ke.setIcon)(e,"bot-message-square"),this.dropdown=a.createEl("div",{cls:"highlight-ai-dropdown hi-note-hidden"}),this.dropdown.addEventListener("click",s=>{s.stopPropagation()}),this.updateDropdownContent(),e.addEventListener("click",s=>{s.stopPropagation(),this.toggleDropdown()}),this.aiButton=e}toggleDropdown(){this.dropdown.hasClass("hi-note-hidden")?(document.querySelectorAll(".highlight-ai-dropdown").forEach(a=>{a!==this.dropdown&&a.addClass("hi-note-hidden")}),this.dropdown.removeClass("hi-note-hidden")):this.dropdown.addClass("hi-note-hidden")}updateDropdownContent(){this.dropdown.empty();let a=Object.entries(this.plugin.settings.ai.prompts||{});a.length>0?a.forEach(([e,s])=>{this.dropdown.createEl("div",{cls:"highlight-ai-dropdown-item",text:e}).addEventListener("click",async()=>{this.dropdown.addClass("hi-note-hidden"),await this.handleAIAnalysis(e)})}):this.dropdown.createEl("div",{cls:"highlight-ai-dropdown-item",text:B("Please add Prompt in the settings")})}async handleAIAnalysis(a){try{this.setLoading(!0);let e=new rt(this.plugin.settings.ai),s=this.plugin.settings.ai.prompts[a];if(!s)throw new Error(B(`\u672A\u627E\u5230\u540D\u4E3A "${a}" \u7684 Prompt`));let l=(this.highlight.comments||[]).map(d=>d.content).join(`
|
|
`),h=await e.generateResponse(s,this.highlight.text,l);await this.onCommentAdd(h),new Ke.Notice(B("AI comments have been added"))}catch(e){new Ke.Notice(B(`AI comments failed:) ${e.message}`))}finally{this.setLoading(!1)}}setLoading(a){a?(this.aiButton.addClass("loading"),(0,Ke.setIcon)(this.aiButton,"loader")):(this.aiButton.removeClass("loading"),(0,Ke.setIcon)(this.aiButton,"bot-message-square"))}closeDropdown(){this.dropdown&&(this.dropdown.addClass("hi-note-hidden"),requestAnimationFrame(()=>{this.dropdown.addClass("highlight-dropdown-hidden"),requestAnimationFrame(()=>{this.dropdown.removeClass("highlight-dropdown-hidden")})}))}};var Oi=class{constructor(a,e,s,n){this.highlight=e;this.plugin=s;this.options=n;this.render(a)}render(a){this.container=a.createEl("div",{cls:"highlight-action-buttons"}),this.renderLeftButtons(),this.renderRightButtons()}renderLeftButtons(){let a=this.container.createEl("div",{cls:"highlight-action-buttons-left"});new ki(a,this.highlight,this.plugin,this.options.onAIResponse)}renderRightButtons(){let a=this.container.createEl("div",{cls:"highlight-action-buttons-right"}),e=a.createEl("button",{cls:"highlight-action-btn highlight-add-comment-btn",attr:{"aria-label":B("Add Comment")}});(0,gs.setIcon)(e,"square-plus"),e.addEventListener("click",n=>{n.stopPropagation(),this.options.onCommentAdd()});let s=a.createEl("button",{cls:"highlight-action-btn highlight-share-btn",attr:{"aria-label":B("Export as Image")}});(0,gs.setIcon)(s,"image-down"),s.addEventListener("click",n=>{n.stopPropagation(),this.options.onExport(this.highlight)})}};var Gi=require("obsidian"),ya=/#[\w\u4e00-\u9fa5]+/g,Ri=/^\s*(#[\w\u4e00-\u9fa5]+(\s+#[\w\u4e00-\u9fa5]+)*\s*)$/,Ni=class extends Gi.Component{constructor(e,s,n){super();this.highlight=s;this.onCommentEdit=n;this.render(e)}render(e){if((this.highlight.comments||[]).length===0)return;let n=e.createEl("div",{cls:"hi-notes-section"});this.container=n.createEl("div",{cls:"hi-notes-list"}),this.renderComments().catch(l=>{console.error("Error rendering comments:",l)})}async renderComments(){let e=this.highlight.comments||[];for(e.sort((s,n)=>{let l=Ri.test(s.content),h=Ri.test(n.content);return l&&!h?-1:!l&&h?1:n.updatedAt-s.updatedAt});this.container.firstChild;)this.container.removeChild(this.container.firstChild);for(let s of e){let n=Ri.test(s.content),l=this.container.createEl("div",{cls:`hi-note${n?" pure-tags-comment":""}`,attr:{"data-comment-id":s.id}}),h=l.createEl("div",{cls:"hi-note-content markdown-rendered"}),d=s.content;if(Ri.test(d)){let w=d,p=d.match(ya)||[];for(;h.firstChild;)h.removeChild(h.firstChild);if(p.length>0){let v=w.split(ya),y=0;v.forEach((H,E)=>{if(H&&h.appendChild(document.createTextNode(H)),E<p.length){let F=document.createElement("span");F.className="highlight-tag",F.textContent=p[E],h.appendChild(F)}})}else h.textContent=d}else try{await Gi.MarkdownRenderer.renderMarkdown(d,h,this.highlight.filePath||"",this),h.querySelectorAll("ul, ol").forEach(p=>{p.addClass("comment-markdown-list")})}catch(w){console.error("Error rendering markdown in comment:",w),h.textContent=d}h.addEventListener("dblclick",w=>{w.stopPropagation(),w.preventDefault(),this.onCommentEdit(s)}),h.addEventListener("click",w=>{w.stopPropagation()});let u=l.createEl("div",{cls:"hi-note-footer"});u.createEl("div",{text:new Date(s.updatedAt).toLocaleString(),cls:"hi-note-time"}),u.createEl("span",{text:"\u53CC\u51FB\u7F16\u8F91",cls:"hi-note-edit-hint"}),u.createEl("div",{cls:"hi-note-actions"})}}};var st=require("obsidian");var Pe=class Pe{static start(a,e,s={}){var u;let{showIcon:n=!0,maxLength:l=30}=s;this.clear(),this.instance=document.createElement("div"),this.instance.className="highlight-dragging";let h=document.createElement("div");h.className="highlight-dragging-content";let d=e.length>l?e.slice(0,l)+"...":e;h.textContent=d,this.instance.appendChild(h),document.body.appendChild(this.instance),this.updatePosition(a.clientX,a.clientY),(u=a.dataTransfer)==null||u.setDragImage(this.dragImage,0,0),document.addEventListener("dragover",this.handleDragOver)}static updatePosition(a,e){this.instance&&this.instance.setAttribute("style",`left: ${a+10}px; top: ${e+10}px;`)}static clear(){this.instance&&(this.instance.remove(),this.instance=null),document.removeEventListener("dragover",this.handleDragOver)}};Pe.instance=null,Pe.dragImage=new Image,Pe.dragImage.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Pe.handleDragOver=a=>{a.preventDefault(),Pe.updatePosition(a.clientX,a.clientY)};var Kt=Pe;var Ia=require("obsidian"),Pt=class{constructor(a,e){this.highlight=a;this.plugin=e}generateSync(){var e,s,n,l;let a=[];if(this.highlight.isVirtual){let h=((s=(e=this.highlight.filePath)==null?void 0:e.split("/").pop())==null?void 0:s.replace(".md",""))||"File";a.push(`> [!note] [[${h}]]`),a.push("> ")}else{a.push("> [!quote] Highlight");let h=!1;if(this.highlight.blockId){let d=this.highlight.filePath;if(!d){let u=this.plugin.app.workspace.getActiveFile();u&&(d=u.path)}if(d){let u=(n=d.split("/").pop())==null?void 0:n.replace(".md","");if(u){let w=`> ![[${u}#^${this.highlight.blockId}]]`;a.push(w),a.push("> "),h=!0}}}else if(this.highlight.filePath&&typeof this.highlight.position=="number"){let d=this.plugin.app.vault.getAbstractFileByPath(this.highlight.filePath);if(d instanceof Ia.TFile){let u=this.plugin.app.metadataCache.getFileCache(d);if(u!=null&&u.sections){let w=this.highlight.position,p=u.sections.find(v=>v.position.start.offset<=w&&v.position.end.offset>=w);if(p!=null&&p.id){let v=(l=this.highlight.filePath.split("/").pop())==null?void 0:l.replace(".md","");if(v){let y=`> ![[${v}#^${p.id}]]`;a.push(y),a.push("> "),h=!0}}}}}!h&&this.highlight.text&&(a.push(`> ${this.highlight.text}`),a.push("> "))}if(this.highlight.comments&&this.highlight.comments.length>0)for(let h of this.highlight.comments)a.push(...this.formatComment(h,!1));return a.join(`
|
|
`)}async generate(){return this.generateSync()}formatComment(a,e){let s=[],n=e?">":">>";e||s.push(">> [!note] Comment");let l=a.content.split(`
|
|
`).map(h=>(h=h.trim(),h?`${n} ${h}`:n)).join(`
|
|
`);if(s.push(l),a.updatedAt){let h=window.moment(a.updatedAt);s.push(`${n} *${h.format("YYYY-MM-DD HH:mm:ss")}*`)}return s.push(">"),s}};var ke=class ke{constructor(a,e,s,n,l=!1,h){this.container=a;this.highlight=e;this.plugin=s;this.options=n;this.isInMainView=l;this.fileName=h;this.isEditing=!1;this.render()}render(){if(this.card=this.container.createEl("div",{cls:`highlight-card ${this.highlight.isVirtual?"virtual-highlight-card":""}`,attr:{"data-highlight":JSON.stringify(this.highlight)}}),this.card.addEventListener("click",e=>{this.isEditing||this.selectCard()}),this.isInMainView&&this.fileName){let e=this.card.createEl("div",{cls:"highlight-card-filename"});e.setAttribute("draggable","true"),this.highlight&&this.highlight.filePath&&typeof this.highlight.position=="number"&&this.plugin.app.vault.getAbstractFileByPath(this.highlight.filePath)instanceof st.TFile&&this.generateDragContent().catch(h=>{console.error("[HighlightCard] Error pre-generating block ID:",h)}),e.addEventListener("dragstart",async l=>{var h,d;try{if(!this.highlight||!this.highlight.text)throw new Error("Invalid highlight data");let u;try{let p=new Promise((v,y)=>{setTimeout(()=>y(new Error("Block ID generation timeout")),300)});u=await Promise.race([this.generateDragContent(),p])}catch(p){console.debug("[HighlightCard] Using sync fallback for drag content:",p),u=this.generateDragContentSync()}(h=l.dataTransfer)==null||h.setData("text/plain",u);let w=JSON.stringify(this.highlight);(d=l.dataTransfer)==null||d.setData("application/highlight",w),e.addClass("dragging"),Kt.start(l,this.highlight.text)}catch(u){console.error("[HighlightCard] Error during drag start:",u),l.preventDefault(),l.stopPropagation()}}),e.addEventListener("dragend",()=>{e.removeClass("dragging"),Kt.clear()});let s=e.createEl("span",{cls:"highlight-card-filename-icon",attr:{"aria-label":B("Open (DoubleClick)")}});(0,st.setIcon)(s,"file-text"),s.addEventListener("dblclick",async l=>{l.stopPropagation();let h=this.highlight.filePath||this.fileName;if(!h)return;let d=this.plugin.app.vault.getAbstractFileByPath(h);if(!d||!(d instanceof st.TFile))return;let u=this.plugin.app.workspace.getLeavesOfType("markdown"),w=this.plugin.app.workspace.activeLeaf,p=u.find(v=>v!==w);if(p||(p=this.plugin.app.workspace.getLeaf("split","vertical")),await p.openFile(d),this.highlight.position!==void 0){let v=p.view;if(v.getViewType()==="markdown"){let y=v.getViewType()==="markdown"?v.editor:null;if(y){let H=y.offsetToPos(this.highlight.position);y.setCursor(H),y.scrollIntoView({from:H,to:H},!0)}}}});let n=e.createEl("span",{text:this.fileName,cls:"highlight-card-filename-text"});this.addPagePreview(n,this.highlight.filePath||this.fileName)}let a=this.card.createEl("div",{cls:"highlight-content"});new Tt(a,this.highlight,this.options.onHighlightClick),new Oi(a,this.highlight,this.plugin,{onCommentAdd:()=>this.options.onCommentAdd(this.highlight),onExport:()=>{let e={...this.highlight};this.fileName&&(e.fileName=this.fileName),this.options.onExport(e)},onAIResponse:this.options.onAIResponse}),new Ni(this.card,this.highlight,e=>{this.isEditing=!0,this.selectCard(),this.options.onCommentEdit(this.highlight,e)})}selectCard(){ke.selectedCard&&ke.selectedCard!==this.card&&ke.selectedCard.removeClass("selected"),this.card.addClass("selected"),ke.selectedCard=this.card}getElement(){return this.card}addPagePreview(a,e){if(!e)return;let s=this.plugin.app.vault.getAbstractFileByPath(e);if(!(s instanceof st.TFile))return;let n;a.addEventListener("mouseenter",l=>{n=setTimeout(async()=>{let h=l.target;this.plugin.app.workspace.trigger("hover-link",{event:l,source:"hi-note",hoverParent:h,targetEl:h,linktext:s.path})},300)}),a.addEventListener("mouseleave",()=>{n&&clearTimeout(n)})}update(a){this.highlight=a,this.isEditing=!1,this.card.empty(),this.render()}generateDragContentSync(){return new Pt(this.highlight,this.plugin).generateSync()}async generateDragContent(){return new Pt(this.highlight,this.plugin).generate()}};ke.selectedCard=null;var Vi=ke;var _i=class{static shouldExclude(a,e){if(!e||e.trim().length===0)return!1;let s=e.split(",").map(h=>h.trim()).filter(h=>h.length>0),n=a.path,l=a.basename;return s.some(h=>{if(h=h.trim(),!h)return!1;if(h.startsWith("[[")&&h.endsWith("]]")){let w=h.slice(2,-2);return l===w}if(h.startsWith("*.")){let w=h.slice(2);return a.extension===w||n.endsWith(w)}let d=h.replace(/^\/+/,""),u=n.replace(/^\/+/,"");return u.startsWith(d+"/")||u===d})}};var kt=class{extractColorFromStyle(a){if(!a)return null;let e=a.match(/background(?:-color)?:\s*((?:rgba?\(.*?\)|#[0-9a-fA-F]{3,8}|var\(--[^)]+\)))/);return e?e[1]:null}extractColorFromElement(a){let e=a.match(/style=["']([^"']*)["']/);return e?this.extractColorFromStyle(e[1]):null}};kt.COLOR_PATTERNS=[/rgba?\(\d+,\s*\d+,\s*\d+(?:,\s*[0-9.]+)?\)/,/#[0-9a-fA-F]{3,8}/,/var\(--[^)]+\)/];var Ha=require("obsidian"),Ue=class{constructor(a){this.app=a;this.events=new Ha.Events}emitHighlightUpdate(a,e,s){this.events.trigger("highlight:update",a,e,s)}emitHighlightDelete(a,e){this.events.trigger("highlight:delete",a,e)}emitCommentUpdate(a,e,s){this.events.trigger("comment:update",a,e,s)}emitCommentDelete(a,e){this.events.trigger("comment:delete",a,e)}emitFlashcardChanged(){this.events.trigger("flashcard:changed")}on(a,e){return this.events.on(a,e)}off(a,e){this.events.off(a,e)}};var nt=class{constructor(a){this.app=a}getOrCreateBlockId(a,e){let s=a.getLine(e),n=s.match(/\^([a-zA-Z0-9-]+)$/);if(n)return n[1];let l=Date.now().toString(36),h=Math.random().toString(36).substr(2,5),d=`${l}-${h}`,u=s.trimEnd();return a.setLine(e,`${u} ^${d}`),d}extractBlockId(a){let e=a.match(/\^([a-zA-Z0-9-]+)$/);return e?e[1]:void 0}getParagraphBlockId(a,e){let s=this.app.metadataCache.getFileCache(a);if(!(s!=null&&s.sections))return;let n=s.sections.find(l=>l.position.start.offset<=e&&l.position.end.offset>=e);return n!=null&&n.id?`${a.path}#^${n.id}`:void 0}async createParagraphBlockId(a,e,s){let n=this.getParagraphBlockId(a,e);if(n)return n;let l=this.app.workspace.getLeaf();await l.openFile(a,{active:!1});let d=l.view.editor,w=d.offsetToPos(e).line,p=this.app.metadataCache.getFileCache(a);if(p!=null&&p.sections){let y=s||e,H=p.sections.find(E=>E.position.start.offset<=y&&E.position.end.offset>=y);H&&(w=d.offsetToPos(H.position.end.offset).line,console.debug(`[BlockIdService] \u627E\u5230\u5305\u542B\u9AD8\u4EAE\u7684\u6BB5\u843D\uFF0C\u7ED3\u675F\u884C: ${w}`))}let v=this.getOrCreateBlockId(d,w);return await this.app.vault.modify(a,d.getValue()),`${a.path}#^${v}`}hasValidBlockId(a){return/\^[a-zA-Z0-9-]+$/.test(a)}};var Xi=class Xi{constructor(a){this.app=a;var n;let e=a.plugins,s=e&&e.plugins?e.plugins["hi-note"]:void 0;this.settings=s==null?void 0:s.settings,this.colorExtractor=new kt,this.eventManager=new Ue(a),this.blockIdService=new nt(a),console.debug("[HighlightService] Current settings:",this.settings),console.debug("[HighlightService] Exclude patterns:",(n=this.settings)==null?void 0:n.excludePatterns)}shouldProcessFile(a){var e;return!_i.shouldExclude(a,((e=this.settings)==null?void 0:e.excludePatterns)||"")}extractHighlights(a){let e=[],s=this.settings.useCustomPattern?new RegExp(this.settings.highlightPattern,"g"):Xi.DEFAULT_HIGHLIGHT_PATTERN,n;for(;(n=s.exec(a))!==null;){let l=n,h=l[0],d=l.slice(1).find(p=>p!==void 0),u=null;if(h.includes("style=")&&(u=this.colorExtractor.extractColorFromElement(h)),!e.some(p=>typeof p.position=="number"&&Math.abs(p.position-l.index)<10&&p.text===d)&&d){let p=this.app.workspace.getActiveFile();if(p){let v=this.app.metadataCache.getFileCache(p);if(v!=null&&v.sections){let y=v.sections.find(E=>E.position.start.offset<=l.index&&E.position.end.offset>=l.index),H=y==null?void 0:y.id;if(!H){let E=this.blockIdService.getParagraphBlockId(p,l.index);if(E){let F=E.match(/#\^([a-zA-Z0-9-]+)/);F&&F[1]&&(H=F[1])}}e.push({text:d,position:l.index,paragraphOffset:this.getParagraphOffset(a,l.index),backgroundColor:u||this.settings.defaultHighlightColor,id:`highlight-${Date.now()}-${l.index}`,comments:[],createdAt:Date.now(),updatedAt:Date.now(),originalLength:h.length,blockId:H})}}}}return e.sort((l,h)=>{var d,u;return((d=l.position)!=null?d:0)-((u=h.position)!=null?u:0)})}getParagraphOffset(a,e){let s=a.substring(0,e),n=s.split(/\n\s*\n/);return s.length-n[n.length-1].length}async getFilesWithHighlights(){let a=this.app.vault.getMarkdownFiles(),e=[],s=0;for(let n of a){if(!this.shouldProcessFile(n))continue;let l=await this.app.vault.read(n),h=this.extractHighlights(l);h.length>0&&(e.push(n),s+=h.length)}return e}createBlockIdForPosition(a,e,s=!1){try{let n=this.blockIdService.getParagraphBlockId(a,e);if(n){let l=n.match(/#\^([a-zA-Z0-9-]+)/);return l&&l[1]?l[1]:void 0}s&&this.blockIdService.createParagraphBlockId(a,e).then(l=>{let h,d=l.match(/#\^([a-zA-Z0-9-]+)/);return d&&d[1]&&(h=d[1]),console.debug(`[HighlightService] Created block ID: ${h}`),h}).catch(l=>{console.error("[HighlightService] Error creating block ID:",l)});return}catch(n){console.error("[HighlightService] Error in createBlockIdForPosition:",n);return}}async createBlockIdForHighlight(a,e,s){try{let n=this.blockIdService.getParagraphBlockId(a,e);if(n)return n;let l=s?e+s:e;return await this.blockIdService.createParagraphBlockId(a,e,l)}catch(n){throw console.error("[HighlightService] Error creating block ID for highlight:",n),n}}};Xi.DEFAULT_HIGHLIGHT_PATTERN=/==\s*(.*?)\s*==|<mark[^>]*>(.*?)<\/mark>|<span[^>]*>(.*?)<\/span>/g;var jA=Xi;var Ot=require("obsidian");var zA=class{constructor(a){this.app=a;this.SIMILARITY_THRESHOLD=.7;this.MAX_SEARCH_RANGE=5e3}levenshteinDistance(a,e){if(a===e)return 0;if(a.length===0)return e.length;if(e.length===0)return a.length;let s=[];for(let n=0;n<=a.length;n++)s[n]=[n];for(let n=0;n<=e.length;n++)s[0][n]=n;for(let n=1;n<=a.length;n++)for(let l=1;l<=e.length;l++)a[n-1]===e[l-1]?s[n][l]=s[n-1][l-1]:s[n][l]=Math.min(s[n-1][l-1]+1,s[n][l-1]+1,s[n-1][l]+1);return s[a.length][e.length]}calculateSimilarity(a,e){let s=this.levenshteinDistance(a,e),n=Math.max(a.length,e.length);return n===0?1:1-s/n}findBestMatch(a,e,s,n){if(a.length<3){let y=e.indexOf(a);return y!==-1?{text:a,position:y}:null}let l=n||this.SIMILARITY_THRESHOLD,h=e,d=0;if(s!==void 0&&s>=0){let y=this.MAX_SEARCH_RANGE/2,H=Math.max(0,s-y),E=Math.min(e.length,s+y);h=e.substring(H,E),d=H}let u=this.extractPossibleMatches(h,a.length),w=null,p=0,v=-1;for(let y of u){let H=this.calculateSimilarity(a,y.text);H>p&&(p=H,w=y.text,v=y.position)}return p>=l&&w&&v!==-1?{text:w,position:v+d}:null}extractPossibleMatches(a,e){let s=[],n=e,l=Math.max(1,Math.floor(n/4));for(let u=0;u<a.length-n+1;u+=l){let w=a.substring(u,u+n);s.push({text:w,position:u})}let h=a.split(/[.!?。!?\n]+/),d=0;for(let u of h){let w=u.trim();w.length>0&&(d=a.indexOf(w,d),d!==-1&&(s.push({text:w,position:d}),d+=w.length))}return s}};var Ji=class{constructor(a){this.app=a;this.textSimilarityService=new zA(a)}async jumpToHighlight(a,e){let s=await this.openOrActivateFile(e);s&&await this.locateAndHighlightText(s,a.text,a.position)}async openOrActivateFile(a){let s=this.app.workspace.getLeavesOfType("markdown").find(n=>{var h;return((h=n.view.file)==null?void 0:h.path)===a});if(!s)try{let n=this.app.vault.getAbstractFileByPath(a);if(!n)return new Ot.Notice("\u672A\u627E\u5230\u6587\u4EF6"),null;s=await this.app.workspace.getLeaf("tab"),await s.openFile(n)}catch(n){return new Ot.Notice("\u6253\u5F00\u6587\u4EF6\u5931\u8D25"),null}return await this.app.workspace.setActiveLeaf(s,{focus:!1}),s}async locateAndHighlightText(a,e,s){await new Promise(E=>setTimeout(E,300));let l=a.view.editor,h=l.getValue(),d=-1,u=[],w=e,p=0,v=-1;for(;(v=h.indexOf(e,p))!==-1;)u.push(v),p=v+1;if(s!==void 0&&s>=0){if(h.substring(s,s+e.length)===e)d=s;else if(u.length>0){let E=u[0],F=Math.abs(s-E);for(let L of u){let x=Math.abs(s-L);x<F&&(F=x,E=L)}d=E}}if(d===-1)if(u.length>0)d=u[0];else{let E=this.textSimilarityService.findBestMatch(e,h,s);if(E)d=E.position,w=E.text,new Ot.Notice("\u4F7F\u7528\u6A21\u7CCA\u5339\u914D\u627E\u5230\u4E86\u76F8\u4F3C\u5185\u5BB9");else{new Ot.Notice("\u672A\u627E\u5230\u9AD8\u4EAE\u5185\u5BB9");return}}let y=l.offsetToPos(d),H=l.offsetToPos(d+w.length);l.setSelection(y,H),l.scrollIntoView({from:y,to:H},!0),this.app.workspace.setActiveLeaf(a,{focus:!0})}};var Wi=class{constructor(a,e){this.app=a;this.commentStore=e;this.highlightService=new jA(a)}async exportHighlightsToNote(a){var p,v;let e=await this.getFileHighlights(a);if(!e||e.length===0)throw new Error(B("No highlights found in the current file."));let s=await this.generateExportContent(a,e),n=this.app.plugins,l=n&&n.plugins?n.plugins["hi-note"]:void 0,h=((v=(p=l==null?void 0:l.settings)==null?void 0:p.export)==null?void 0:v.exportPath)||"",d=`${a.basename} - Highlights ${window.moment().format("YYYYMMDDHHmm")}`,u=d;return h&&(this.app.vault.getAbstractFileByPath(h)||await this.app.vault.createFolder(h),u=`${h}/${d}`),await this.app.vault.create(`${u}.md`,s)}async getFileHighlights(a){let e=await this.app.vault.read(a),s=this.highlightService.extractHighlights(e),n=this.commentStore.getFileComments(a),l=n.filter(u=>u.isVirtual&&u.comments&&u.comments.length>0),h=n.filter(u=>!u.isVirtual),d=s.map(u=>{var p,v,y,H;let w=h.find(E=>{let F=E.text===u.text;return F&&typeof E.position=="number"&&typeof u.position=="number"?Math.abs(E.position-u.position)<1e3:F});return w?{...w,position:(p=u.position)!=null?p:0,paragraphOffset:(v=u.paragraphOffset)!=null?v:0}:{id:this.generateHighlightId(u),...u,position:(y=u.position)!=null?y:0,paragraphOffset:(H=u.paragraphOffset)!=null?H:0,comments:[],createdAt:Date.now(),updatedAt:Date.now()}});return[...l,...d]}async generateExportContent(a,e){var h,d;let s=this.app.plugins,n=s&&s.plugins?s.plugins["hi-note"]:void 0,l=(d=(h=n==null?void 0:n.settings)==null?void 0:h.export)==null?void 0:d.exportTemplate;return l&&l.trim()!==""?this.generateContentFromTemplate(a,e,l):this.generateDefaultContent(a,e)}async generateContentFromTemplate(a,e,s){let n=[],l=s.split(`
|
|
|
|
`)[0]||"";l=this.replaceVariables(l,{sourceFile:a.basename,exportDate:window.moment().format("YYYY-MM-DD HH:mm:ss")}),n.push(l);let h=s.split(`
|
|
|
|
`),d=h.length>1?h.slice(1).join(`
|
|
|
|
`):s;for(let u of e){if(u.isVirtual){if(u.comments&&u.comments.length>0)for(let w of u.comments){let v=`> [!note] File Comment
|
|
> {{commentContent}}
|
|
> *{{commentDate}}*`;v=this.replaceVariables(v,{sourceFile:a.basename,commentContent:w.content||"",commentDate:window.moment(w.updatedAt||Date.now()).format("YYYY-MM-DD HH:mm:ss")}),n.push(v)}}else{let w="",p=u.text||"";if(typeof u.position=="number")try{let y=u.originalLength||u.text.length;w=await this.highlightService.createBlockIdForHighlight(a,u.position,y)||""}catch(y){console.error("[ExportService] Error creating block ID:",y)}let v=d;if(v=this.replaceVariables(v,{sourceFile:a.basename,highlightText:p,highlightBlockRef:w,highlightType:"Highlight"}),u.comments&&u.comments.length>0){let y=d.split("---"),H=y[0]||"",E=y.length>1?y[1]:"";H=this.replaceVariables(H,{sourceFile:a.basename,highlightText:p,highlightBlockRef:w,highlightType:"Highlight"}),n.push(H.trim()),n.push("> ---");for(let F=0;F<u.comments.length;F++){let L=u.comments[F],x=E;x=this.replaceVariables(x,{commentContent:L.content||"",commentDate:window.moment(L.updatedAt||Date.now()).format("YYYY-MM-DD HH:mm:ss")}),n.push(x.trim()),F<u.comments.length-1&&n.push("> ---")}}else{let y=v;y=y.replace(/.*\{\{commentContent\}\}.*\n?/g,""),y=y.replace(/.*\{\{commentDate\}\}.*\n?/g,""),y=y.replace(/.*\[!note\]\s*Comment.*\n?/g,""),y=y.replace(/.*---.*\n?/g,""),y=y.replace(/\n{3,}/g,`
|
|
|
|
`),n.push(y)}}n.push("")}return n.join(`
|
|
`)}replaceVariables(a,e){let s=a;for(let[n,l]of Object.entries(e))s=s.replace(new RegExp(`{{${n}}}`,"g"),l||"");return s}async generateDefaultContent(a,e){let s=[];s.push(`[[${a.basename}]] - HighlightsNotes`),s.push("");for(let n of e){if(n.isVirtual)s.push("> [!note] File Comment"),s.push("> ");else{if(s.push("> [!quote] Highlight"),typeof n.position=="number")try{let l=n.originalLength||n.text.length,h=await this.highlightService.createBlockIdForHighlight(a,n.position,l);h?(s.push(`> ![[${h}]]`),console.debug(`[ExportService] \u4F7F\u7528 Block ID \u5F15\u7528: ${h}`)):s.push(`> ${n.text}`)}catch(l){console.error("[ExportService] Error creating block ID:",l),s.push(`> ${n.text}`)}else s.push(`> ${n.text}`);s.push("> ")}if(n.comments&&n.comments.length>0){n.isVirtual||(s.push("> ---"),s.push("> "));for(let l of n.comments){if(n.isVirtual){let h=l.content.split(`
|
|
`).map(d=>(d=d.trim(),d?`> ${d}`:">")).join(`
|
|
`);s.push(h)}else{s.push(">> [!note] Comment");let h=l.content.split(`
|
|
`).map(d=>(d=d.trim(),d?`>> ${d}`:">>")).join(`
|
|
`);s.push(h)}if(l.updatedAt){let h=window.moment(l.updatedAt);n.isVirtual?s.push(`> *${h.format("YYYY-MM-DD HH:mm:ss")}*`):s.push(`>> *${h.format("YYYY-MM-DD HH:mm:ss")}*`)}s.push((n.isVirtual,">"))}}s.push("")}return s.join(`
|
|
`)}getParagraphOffset(a,e){let n=a.substring(0,e).lastIndexOf(`
|
|
`);return n===-1?e:e-n}generateHighlightId(a){return`highlight-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}};var Ag=/#[\w\u4e00-\u9fa5]+/g,eg=/^\s*(#[\w\u4e00-\u9fa5]+(\s+#[\w\u4e00-\u9fa5]+)*\s*)$/,Yi=class{constructor(a,e,s,n){this.card=a;this.highlight=e;this.existingComment=s;this.options=n;this.cancelEdit=()=>{};this.isProcessing=!1;this.boundHandleOutsideClick=this.handleOutsideClick.bind(this),document.addEventListener("click",this.boundHandleOutsideClick)}show(){this.existingComment?this.showEditMode():this.showCreateMode()}showEditMode(){var l;let a=this.card.querySelector(`[data-comment-id="${this.existingComment.id}"]`);if(!a)return;let e=a.querySelector(".hi-note-content");if(!e)return;let s=((l=this.existingComment)==null?void 0:l.content)||"";this.textarea=document.createElement("textarea"),this.textarea.value=s,this.textarea.className="hi-note-input",this.textarea.style.minHeight=`${e.offsetHeight}px`,this.textarea.addEventListener("input",()=>{this.processTagsInInput(),this.autoResizeTextarea()}),e.replaceWith(this.textarea);let n=a.querySelector(".hi-note-footer");n&&n.addClass("hi-note-hidden"),this.actionHint=a.createEl("div",{cls:"hi-note-actions-hint"}),this.actionHint.createEl("span",{cls:"hi-note-hint",text:B("Shift + Enter Wrap, Enter Save")}),this.options.onDelete&&this.actionHint.createEl("div",{cls:"hi-note-delete-link",text:B("Delete comment")}).addEventListener("click",async d=>{var u,w;d.stopPropagation(),await((w=(u=this.options).onDelete)==null?void 0:w.call(u))}),this.setupKeyboardEvents(e,n||void 0),setTimeout(()=>{this.textarea.focus(),this.textarea.setSelectionRange(this.textarea.value.length,this.textarea.value.length)},50)}showCreateMode(){let a=document.createElement("div");a.className="hi-note-input",this.textarea=a.createEl("textarea"),this.textarea.addEventListener("input",()=>{this.processTagsInInput(),this.autoResizeTextarea()}),a.createEl("div",{cls:"hi-note-hint",text:B("Shift + Enter Wrap, Enter Save")});let e=this.card.querySelector(".hi-notes-section");e||(e=this.card.createEl("div",{cls:"hi-notes-section"}),e.createEl("div",{cls:"hi-notes-list"}));let s=e.querySelector(".hi-notes-list");s&&s.insertBefore(a,s.firstChild),this.setupKeyboardEvents(),setTimeout(()=>{this.textarea.focus()},50)}setupKeyboardEvents(a,e){this.cancelEdit=()=>{this.existingComment?a&&e&&requestAnimationFrame(()=>{this.textarea.replaceWith(a),this.actionHint.remove(),e.removeClass("hi-note-hidden"),document.removeEventListener("click",this.boundHandleOutsideClick)}):requestAnimationFrame(()=>{var s,n;(s=this.textarea.closest(".hi-note-input"))==null||s.remove(),this.card.querySelector(".hi-note")||(n=this.card.querySelector(".hi-notes-section"))==null||n.remove(),document.removeEventListener("click",this.boundHandleOutsideClick)}),this.options.onCancel()},this.textarea.onkeydown=async s=>{if(s.key==="Enter"){if(s.shiftKey||(s.preventDefault(),this.isProcessing))return;let n=this.textarea.value.trim();if(!n)return;this.isProcessing=!0,this.textarea.disabled=!0;try{await this.options.onSave(n),requestAnimationFrame(()=>{document.removeEventListener("click",this.boundHandleOutsideClick),this.isProcessing=!1,this.textarea.disabled=!1})}catch(l){this.textarea.disabled=!1,this.isProcessing=!1}}}}autoResizeTextarea(){let a=window.scrollY;this.textarea.style.height="auto";let e=this.textarea.scrollHeight;this.textarea.style.height=`${e}px`,window.scrollTo(0,a)}processTagsInInput(){var e,s,n,l;let a=this.textarea.value;if(eg.test(a)){let h=a.match(Ag)||[];if(h.length>0){let d=(e=this.textarea.parentElement)==null?void 0:e.querySelector(".highlight-tags-preview");if(d||(d=document.createElement("div"),d.className="highlight-tags-preview",(s=this.textarea.parentElement)==null||s.insertBefore(d,this.textarea)),d){for(;d.firstChild;)d.removeChild(d.firstChild);let u=d;h.forEach(w=>{let p=document.createElement("span");p.className="highlight-tag",p.textContent=w,u.appendChild(p)})}}}else(l=(n=this.textarea.parentElement)==null?void 0:n.querySelector(".highlight-tags-preview"))==null||l.remove()}handleOutsideClick(a){if(!this.textarea||this.isProcessing)return;let e=a.target;if(!this.textarea.contains(e)&&!e.closest(".hi-note-actions-hint")){a.preventDefault(),a.stopPropagation(),this.isProcessing=!0;let n=this.textarea.value.trim();if(n){let l=n;this.textarea.disabled=!0,this.options.onSave(l).then(()=>{requestAnimationFrame(()=>{document.removeEventListener("click",this.boundHandleOutsideClick),this.isProcessing=!1,this.textarea.disabled=!1})}).catch(()=>{this.textarea.disabled=!1,this.isProcessing=!1})}else requestAnimationFrame(()=>{this.cancelEdit(),this.isProcessing=!1})}}destroy(){document.removeEventListener("click",this.boundHandleOutsideClick),this.isProcessing=!1}};var wA=require("obsidian");var Sa=require("obsidian");var Zi=class{constructor(a){this.plugin=a;this.aiService=new rt(this.plugin.settings.ai)}updateModel(a,e){this.aiService&&this.aiService.updateModel(a,e)}async sendMessage(a,e=[]){try{let s=e.map(l=>({role:l.role,content:l.content}));return s.push({role:"user",content:a}),{content:await this.aiService.chat(s),type:"assistant",timestamp:Date.now()}}catch(s){throw new Sa.Notice("\u83B7\u53D6 AI \u54CD\u5E94\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u914D\u7F6E\u548C\u7F51\u7EDC\u8FDE\u63A5"),s}}async testConnection(){return await this.aiService.testConnection()}};var SA=class SA extends wA.Component{constructor(e,s){super();this.plugin=s;this.isProcessing=!1;this.draggedContents=[];this.chatHistory=[];this.currentPreviewContainer=null;this.textarea=null;this.chatModelState={provider:"",model:""};if(SA.instance)return SA.instance;this.app=e,this.chatService=new Zi(this.plugin),this.floatingButton=document.querySelector(".highlight-floating-button"),this.containerEl=document.createElement("div"),this.containerEl.addClass("highlight-chat-window");let n=this.containerEl.createEl("div",{cls:"highlight-chat-header"}),l=n.createEl("div",{cls:"highlight-chat-title"});l.createEl("span",{text:B("Chat")});let h=l.createEl("div",{cls:"highlight-chat-model",text:this.getCurrentModelName()});h.addEventListener("click",S=>{S.stopPropagation(),this.showModelSelector(h,S)});let d=n.createEl("div",{cls:"highlight-chat-buttons"}),u=d.createEl("div",{cls:"highlight-chat-clear"});(0,wA.setIcon)(u,"eraser"),u.addEventListener("click",()=>this.clearChat());let w=d.createEl("div",{cls:"highlight-chat-close"});(0,wA.setIcon)(w,"x"),w.addEventListener("click",()=>this.close());let p=this.containerEl.createEl("div",{cls:"highlight-chat-history"}),v=this.containerEl.createEl("div",{cls:"highlight-chat-input-container"});this.setupChatInput(v);let y={text:"",position:0,paragraphOffset:0,paragraphId:"chat",createdAt:Date.now(),updatedAt:Date.now()};p.addEventListener("dragenter",S=>{S.preventDefault(),p.addClass("drag-over")}),p.addEventListener("dragover",S=>{S.preventDefault(),S.stopPropagation(),p.addClass("drag-over");let V=p.getBoundingClientRect(),k=p.scrollTop,G=V.height;p.addClass("highlight-chat-history-drag-guide"),p.style.setProperty("--drag-guide-top",`${k+12}px`),p.style.setProperty("--drag-guide-height",`${G-24}px`);let J=document.querySelector(".highlight-dragging");J&&(J.addClass("highlight-chat-preview"),J.style.left=`${S.clientX+10}px`,J.style.top=`${S.clientY+10}px`)}),p.addEventListener("dragleave",S=>{p.contains(S.relatedTarget)||p.removeClass("drag-over")}),p.addEventListener("drop",async S=>{var k;S.preventDefault(),p.removeClass("drag-over");let V=(k=S.dataTransfer)==null?void 0:k.getData("application/highlight");if(V)try{let G=JSON.parse(V);if(!G.text)return;this.draggedContents.some(z=>z.text===G.text)||(this.draggedContents.push(G),this.showDraggedPreviewsInChat(p))}catch(G){}});let H=!1,E,F,L,x;if(n.addEventListener("mousedown",S=>{S.target===w||S.target===u||(H=!0,L=S.clientX-this.containerEl.offsetLeft,x=S.clientY-this.containerEl.offsetTop,n.addClass("dragging"))}),document.addEventListener("mousemove",S=>{if(!H)return;S.preventDefault(),E=S.clientX-L,F=S.clientY-x;let V=window.innerWidth-this.containerEl.offsetWidth,k=window.innerHeight-this.containerEl.offsetHeight;E=Math.max(0,Math.min(E,V)),F=Math.max(0,Math.min(F,k)),this.containerEl.addClass("highlight-chat-window"),this.containerEl.style.left=`${E}px`,this.containerEl.style.top=`${F}px`}),document.addEventListener("mouseup",()=>{H=!1,n.removeClass("dragging")}),SA.savedState){this.chatHistory=SA.savedState.chatHistory,this.draggedContents=SA.savedState.draggedContents;let S=this.containerEl.querySelector(".highlight-chat-history");if(S){for(;S.firstChild;)S.removeChild(S.firstChild);this.chatHistory.forEach(V=>{this.addMessage(S,V.content,V.role,!1)}),this.draggedContents.length>0&&this.showDraggedPreviewsInChat(S),SA.savedState.currentPreviewContainer&&(this.currentPreviewContainer=S.querySelector(".highlight-chat-preview-cards"))}}SA.instance=this}showDraggedPreviewsInChat(e){var d;if(!this.currentPreviewContainer){let w=e.createEl("div",{cls:"highlight-chat-message highlight-chat-message-preview"}).createEl("div",{cls:"highlight-chat-previews"}),p=w.createEl("div",{cls:"highlight-chat-preview-header"});p.createEl("span",{cls:"highlight-chat-preview-count",text:String(this.draggedContents.length)}),p.createSpan({text:B("highlighted notes")});let v=w.createEl("div",{cls:"highlight-chat-preview-cards"});this.currentPreviewContainer=v}let s=this.currentPreviewContainer.createEl("div",{cls:"highlight-chat-preview-card"}),n=this.draggedContents[this.draggedContents.length-1];s.createEl("div",{cls:"highlight-chat-preview-content",text:n.text});let l=s.createEl("div",{cls:"highlight-chat-preview-delete"});(0,wA.setIcon)(l,"x"),l.addEventListener("click",()=>{var w;let u=this.draggedContents.indexOf(n);if(u>-1)if(this.draggedContents.splice(u,1),s.remove(),this.draggedContents.length===0){let p=(w=this.currentPreviewContainer)==null?void 0:w.closest(".highlight-chat-message-preview");p&&(p.remove(),this.currentPreviewContainer=null)}else this.updatePreviewCount()});let h=(d=this.currentPreviewContainer.closest(".highlight-chat-message-preview"))==null?void 0:d.querySelector(".highlight-chat-preview-count");h&&(h.textContent=String(this.draggedContents.length)),e.scrollTop=e.scrollHeight}show(){document.body.contains(this.containerEl)?this.containerEl.removeClass("highlight-chat-hidden"):(this.containerEl.addClass("highlight-chat-window"),this.containerEl.addClass("highlight-chat-window-position"),document.body.appendChild(this.containerEl)),this.floatingButton&&this.floatingButton.addClass("hi-note-hidden"),requestAnimationFrame(()=>{var e;(e=this.textarea)==null||e.focus()})}close(){this.containerEl.addClass("highlight-chat-hidden"),this.floatingButton&&this.floatingButton.removeClass("hi-note-hidden")}addMessage(e,s,n,l=!0){let h=e.createEl("div",{cls:"highlight-chat-message"}),d=h.createEl("div",{cls:"highlight-chat-message-content markdown-rendered"});h.addClass(`highlight-chat-message-${n}`),d.addClass(`highlight-chat-message-content-${n}`),n==="assistant"&&l?this.typeWriter(d,s):this.renderMarkdownContent(d,s),e.scrollTop=e.scrollHeight}async typeWriter(e,s,n=30){let l=0;e.textContent="";let h=e.createEl("span",{cls:"highlight-chat-cursor"}),d=()=>{l<s.length?(e.insertBefore(document.createTextNode(s.charAt(l)),h),l++,setTimeout(d,n)):(h.remove(),this.renderMarkdownContent(e,s))};d()}static getInstance(e,s){return SA.instance||(SA.instance=new SA(e,s)),SA.instance}async renderMarkdownContent(e,s){for(;e.firstChild;)e.removeChild(e.firstChild);try{await wA.MarkdownRenderer.render(this.app,s,e,"",new wA.Component),e.querySelectorAll("ul, ol").forEach(l=>{l.addClass("chat-markdown-list")})}catch(n){console.error("Error rendering markdown in chat:",n),e.textContent=s}}setupChatInput(e){let s=e.createEl("div",{cls:"highlight-chat-input-wrapper"});this.textarea=s.createEl("textarea",{cls:"highlight-chat-input",attr:{placeholder:B("Input message..."),rows:"1"}});let n=()=>{this.textarea&&(this.textarea.addClass("highlight-chat-input"),this.textarea.style.height=`${Math.min(this.textarea.scrollHeight,150)}px`)};return this.textarea.addEventListener("input",()=>{n()}),this.textarea.addEventListener("keydown",l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),this.textarea&&this.handleSendMessage(this.textarea))}),this.textarea}async handleSendMessage(e){let s=e.value.trim();if(!(!s||this.isProcessing))try{this.isProcessing=!0;let n=s,l=s;if(this.draggedContents.length>0){let d=this.draggedContents.map(u=>u.text).join(`
|
|
|
|
---
|
|
|
|
`);if(this.chatHistory.push({role:"user",content:`\u4EE5\u4E0B\u662F\u9700\u8981\u5206\u6790\u7684\u5185\u5BB9\uFF1A
|
|
|
|
${d}`}),n=s,l=`\u7528\u6237\u63D0\u793A\uFF1A${s}`,this.currentPreviewContainer){let u=this.currentPreviewContainer.closest(".highlight-chat-message-preview");u&&u.addClass("sent"),this.currentPreviewContainer=null,this.draggedContents=[]}}this.chatHistory.push({role:"user",content:l}),requestAnimationFrame(()=>{e.value="",e.addClass("highlight-chat-input"),e.dispatchEvent(new Event("input"))});let h=this.containerEl.querySelector(".highlight-chat-history");if(h){this.addMessage(h,s,"user",!0);let d=await this.chatService.sendMessage(n,this.chatHistory);this.chatHistory.push({role:"assistant",content:d.content}),this.addMessage(h,d.content,"assistant",!0)}}catch(n){}finally{this.isProcessing=!1}}updatePreviewCount(){if(this.currentPreviewContainer){let e=this.currentPreviewContainer.closest(".highlight-chat-message-preview"),s=e==null?void 0:e.querySelector(".highlight-chat-preview-count");s&&(s.textContent=String(this.draggedContents.length),this.draggedContents.length===0&&e&&(e.remove(),this.currentPreviewContainer=null))}}clearChat(){if(this.chatHistory=[],this.draggedContents=[],this.currentPreviewContainer){let s=this.currentPreviewContainer.closest(".highlight-chat-message-preview");s&&s.remove(),this.currentPreviewContainer=null}let e=this.containerEl.querySelector(".highlight-chat-history");if(e)for(;e.firstChild;)e.removeChild(e.firstChild);this.textarea&&(this.textarea.value="",this.textarea.addClass("highlight-chat-input"))}getCurrentModelName(){var n,l,h,d,u,w,p,v;let e=this.plugin.settings.ai;switch(this.chatModelState.provider||e.provider){case"openai":return this.chatModelState.model||((n=e.openai)==null?void 0:n.model)||"GPT-4";case"anthropic":return this.chatModelState.model||((l=e.anthropic)==null?void 0:l.model)||"Claude-3";case"ollama":return this.chatModelState.model||((h=e.ollama)==null?void 0:h.model)||"Ollama";case"gemini":return this.chatModelState.model||((d=e.gemini)==null?void 0:d.model)||"Gemini Pro";case"deepseek":return this.chatModelState.model||((u=e.deepseek)==null?void 0:u.model)||"Deepseek Chat";case"siliconflow":return(w=e.siliconflow)!=null&&w.isCustomModel&&((p=e.siliconflow)!=null&&p.model)?e.siliconflow.model:this.chatModelState.model?this.chatModelState.model:((v=e.siliconflow)==null?void 0:v.model)||"SiliconFlow";default:return"Unknown model"}}async showModelSelector(e,s){var d,u,w,p,v,y;let n=new wA.Menu,l=this.plugin.settings.ai;switch(l.provider){case"siliconflow":try{if(se.forEach(F=>{n.addItem(L=>{var S,V;let x=!((S=l.siliconflow)!=null&&S.isCustomModel)&&(this.chatModelState.model===F.id||((V=l.siliconflow)==null?void 0:V.model)===F.id);L.setTitle(F.name).setChecked(x).onClick(async()=>{l.siliconflow?(l.siliconflow.model=F.id,l.siliconflow.isCustomModel=!1):l.siliconflow={model:F.id,isCustomModel:!1},this.chatModelState.provider="siliconflow",this.chatModelState.model=F.id,this.chatService.updateModel("siliconflow",F.id),await this.plugin.saveSettings(),e.textContent=F.name})})}),(d=l.siliconflow)!=null&&d.isCustomModel&&((u=l.siliconflow)!=null&&u.model)){n.addSeparator();let F=l.siliconflow.model;n.addItem(L=>{var S,V;let x=((S=l.siliconflow)==null?void 0:S.isCustomModel)&&(this.chatModelState.model===F||((V=l.siliconflow)==null?void 0:V.model)===F);L.setTitle(F).setChecked(x).onClick(async()=>{l.siliconflow?(l.siliconflow.model=F,l.siliconflow.isCustomModel=!0):l.siliconflow={model:F,isCustomModel:!0},this.chatModelState.provider="siliconflow",this.chatModelState.model=F,this.chatService.updateModel("siliconflow",F),await this.plugin.saveSettings(),e.textContent=F})})}}catch(E){new wA.Notice(B("Unable to get SiliconFlow model list, please check API Key and network connection."))}break;case"openai":try{let E=await this.chatService.aiService.listOpenAIModels(),F=E.filter(x=>!x.isCustom),L=E.filter(x=>x.isCustom);F.forEach(x=>{n.addItem(S=>{S.setTitle(x.name).setChecked(this.chatModelState.model===x.id).onClick(async()=>{this.chatModelState.provider="openai",this.chatModelState.model=x.id,this.chatService.updateModel("openai",x.id),e.textContent=this.getCurrentModelName()})})}),L.length>0&&(n.addSeparator(),L.forEach(x=>{n.addItem(S=>{S.setTitle(x.name).setChecked(this.chatModelState.model===x.id).onClick(async()=>{this.chatModelState.provider="openai",this.chatModelState.model=x.id,this.chatService.updateModel("openai",x.id),e.textContent=this.getCurrentModelName()})})}))}catch(E){new wA.Notice(B("Unable to get OpenAI model list, please check API Key and network connection."))}break;case"anthropic":["claude-3-opus-20240229","claude-3-sonnet-20240229","claude-3-haiku-20240307"].forEach(E=>{n.addItem(F=>{var L;F.setTitle(E).setChecked(((L=l.anthropic)==null?void 0:L.model)===E).onClick(async()=>{l.anthropic||(l.anthropic={apiKey:"",model:E}),l.anthropic.model=E,await this.plugin.saveSettings(),e.textContent=this.getCurrentModelName()})})});break;case"ollama":try{(await this.chatService.aiService.listOllamaModels()).forEach(F=>{n.addItem(L=>{var x;L.setTitle(F).setChecked(((x=l.ollama)==null?void 0:x.model)===F).onClick(async()=>{l.ollama||(l.ollama={host:"http://localhost:11434",model:F}),l.ollama.model=F,await this.plugin.saveSettings(),e.textContent=this.getCurrentModelName()})})})}catch(E){new wA.Notice(B("Unable to access the Ollama model, please check the service."))}break;case"gemini":try{(await this.chatService.aiService.listGeminiModels()).forEach(F=>{n.addItem(L=>{var x;L.setTitle(F.name).setChecked(((x=l.gemini)==null?void 0:x.model)===F.id).onClick(async()=>{this.chatModelState.provider="gemini",this.chatModelState.model=F.id,this.chatService.updateModel("gemini",F.id),e.textContent=this.getCurrentModelName()})})}),(w=l.gemini)!=null&&w.isCustomModel&&((p=l.gemini)!=null&&p.model)&&(n.addSeparator(),n.addItem(F=>{var x,S;let L={id:((x=l.gemini)==null?void 0:x.model)||"",name:(S=l.gemini)==null?void 0:S.model,isCustom:!0};F.setTitle(L.name).setChecked(this.chatModelState.model===L.id).onClick(async()=>{this.chatModelState.provider="gemini",this.chatModelState.model=L.id,this.chatService.updateModel("gemini",L.id),e.textContent=this.getCurrentModelName()})}))}catch(E){new wA.Notice(B("Unable to get Gemini model list, please check API Key and network connection."))}break;case"deepseek":try{(await this.chatService.aiService.listDeepseekModels()).forEach(F=>{n.addItem(L=>{var x;L.setTitle(F.name).setChecked(((x=l.deepseek)==null?void 0:x.model)===F.id).onClick(async()=>{this.chatModelState.provider="deepseek",this.chatModelState.model=F.id,this.chatService.updateModel("deepseek",F.id),e.textContent=this.getCurrentModelName()})})}),(v=l.deepseek)!=null&&v.isCustomModel&&((y=l.deepseek)!=null&&y.model)&&(n.addSeparator(),n.addItem(F=>{var x,S;let L={id:((x=l.deepseek)==null?void 0:x.model)||"",name:(S=l.deepseek)==null?void 0:S.model,isCustom:!0};F.setTitle(L.name).setChecked(this.chatModelState.model===L.id).onClick(async()=>{this.chatModelState.provider="deepseek",this.chatModelState.model=L.id,this.chatService.updateModel("deepseek",L.id),e.textContent=this.getCurrentModelName()})}))}catch(E){new wA.Notice(B("Unable to get Deepseek model list, please check API Key and network connection."))}break;default:new wA.Notice(B("Unknown AI provider"));break}let h=e.getBoundingClientRect();n.showAtPosition({x:h.left,y:h.bottom})}};SA.instance=null,SA.savedState=null;var Ee=SA;var us=require("obsidian"),at=class{constructor(a){this.STORAGE_KEY="flashcard-license";this.VAULT_ID_KEY="vault-id";this.API_URL="https://hi-note-license-server-production.up.railway.app";this.FEATURES=["flashcard"];this.VERIFICATION_INTERVAL_DAYS=7;this.licenseToken=null;this.plugin=a}async generateVaultId(){try{let a=await this.plugin.loadData()||{};if(a[this.VAULT_ID_KEY])return a[this.VAULT_ID_KEY];let e=this.plugin.app.vault.adapter,s=this.plugin.app.vault.getName();e&&"basePath"in e&&(s=e.basePath+"/"+s);let n=navigator.platform||"",l=[s,n].join("|"),d=new TextEncoder().encode(l),u=await crypto.subtle.digest("SHA-256",d),p=Array.from(new Uint8Array(u)).map(v=>v.toString(16).padStart(2,"0")).join("");return await this.saveVaultId(p),p}catch(a){let e=this.plugin.app.vault.getName(),n=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",n),d=Array.from(new Uint8Array(l)).map(u=>u.toString(16).padStart(2,"0")).join("");return await this.saveVaultId(d),d}}async saveVaultId(a){let e=await this.plugin.loadData()||{};await this.plugin.saveData({...e,[this.VAULT_ID_KEY]:a})}async activateLicense(a){try{let e=await this.generateVaultId(),s=`${this.API_URL}/api/verify`,h=(await(0,us.requestUrl)({url:s,method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({licenseKey:a,deviceId:e})})).json;if(h.valid){let d=await this.plugin.loadData()||{};return await this.plugin.saveData({...d,[this.STORAGE_KEY]:{key:a,token:h.token,features:h.features,vaultId:e,lastVerified:Date.now()}}),this.licenseToken=h.token,!0}return!1}catch(e){let s=e instanceof Error?e.message:"Unknown error";return!1}}async isFeatureEnabled(a){var n;let e=await this.plugin.loadData(),s=e==null?void 0:e[this.STORAGE_KEY];return((n=s==null?void 0:s.features)==null?void 0:n.includes(a))||!1}async isActivated(){try{let a=await this.plugin.loadData(),e=a==null?void 0:a[this.STORAGE_KEY];return e!=null&&e.token?this.shouldVerifyLicense(e.lastVerified)?this.verifyWithServer(e):(this.licenseToken||(this.licenseToken=e.token),!0):!1}catch(a){return!1}}shouldVerifyLicense(a){return a?(Date.now()-a)/(1e3*60*60*24)>=this.VERIFICATION_INTERVAL_DAYS:!0}async verifyWithServer(a){try{let e=await this.generateVaultId(),s=a.vaultId,n=s&&s!==e,h=(await(0,us.requestUrl)({url:`${this.API_URL}/api/verify`,method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${a.token}`},body:JSON.stringify({licenseKey:a.key,deviceId:e,isDeviceChanged:n})})).json;if(!h)return!!this.licenseToken;if(h.valid){let d=await this.plugin.loadData()||{};return await this.plugin.saveData({...d,[this.STORAGE_KEY]:{...a,token:h.token||a.token,vaultId:e,lastVerified:Date.now()}}),this.licenseToken=h.token||a.token,!0}return!1}catch(e){return!!this.licenseToken}}};var OA="comment-view",JA=class extends hA.ItemView{constructor(e,s){super(e);this.currentFile=null;this.isFlashcardMode=!1;this.highlights=[];this.isDraggedToMainView=!1;this.currentBatch=0;this.isLoading=!1;this.BATCH_SIZE=20;this.floatingButton=null;this.aiButtons=[];this.currentEditingHighlightId=null;this.flashcardComponent=null;this.commentStore=s;let n=this.app.plugins;if(n&&n.plugins&&n.plugins["hi-note"])this.plugin=n.plugins["hi-note"];else throw new Error("Hi-Note plugin not found");this.locationService=new Ji(this.app),this.exportService=new Wi(this.app,this.commentStore),this.highlightService=new jA(this.app),this.licenseManager=new at(this.plugin),this.registerEvent(this.app.workspace.on("file-open",h=>{h&&!this.isDraggedToMainView&&(this.currentFile=h,this.updateHighlights())})),this.registerEvent(this.app.vault.on("modify",h=>{h===this.currentFile&&!this.isDraggedToMainView&&this.updateHighlights()}));let l=h=>{let{highlightId:d,text:u}=h.detail;setTimeout(()=>{this.highlightContainer.querySelectorAll(".highlight-card").forEach(p=>{p.removeClass("selected")});let w=Array.from(this.highlightContainer.querySelectorAll(".highlight-card")).find(p=>{var y;return((y=p.querySelector(".highlight-text-content"))==null?void 0:y.textContent)===u});if(w){w.addClass("selected");let p=w.querySelector(".highlight-action-buttons .highlight-action-buttons-right .highlight-add-comment-btn");p&&p.click(),w.scrollIntoView({behavior:"smooth"})}},100)};window.addEventListener("open-comment-input",l),this.register(()=>window.removeEventListener("open-comment-input",l)),this.registerEvent(this.app.workspace.on("layout-change",()=>{this.checkViewPosition()})),this.loadingIndicator=createEl("div",{cls:"highlight-loading-indicator",text:B("Loading...")}),this.loadingIndicator.addClass("highlight-display-none")}getViewType(){return OA}getDisplayText(){return"HiNote"}getIcon(){return"highlighter"}async onOpen(){let e=this.containerEl.children[1];e.empty();let s=e.createEl("div",{cls:"highlight-main-container"});this.fileListContainer=s.createEl("div",{cls:"highlight-file-list-container"}),this.mainContentContainer=s.createEl("div",{cls:"highlight-content-container"}),this.searchContainer=this.mainContentContainer.createEl("div",{cls:"highlight-search-container"}),this.searchInput=this.searchContainer.createEl("input",{cls:"highlight-search-input",attr:{type:"text",placeholder:B("Search...")}});let n=this.searchContainer.createEl("div",{cls:"highlight-search-icons"}),l=n.createEl("button",{cls:"highlight-icon-button"});(0,hA.setIcon)(l,"message-square-plus"),l.setAttribute("aria-label",B("Add File Comment")),l.addEventListener("click",async()=>{if(!this.currentFile){new hA.Notice(B("Please open a file first."));return}let p=Date.now(),y={id:`file-comment-${p}`,text:`__virtual_highlight_${p}__`,filePath:this.currentFile.path,fileType:this.currentFile.extension,displayText:B("File Comment"),isVirtual:!0,position:0,paragraphOffset:0,paragraphId:`${this.currentFile.path}#^virtual-${p}`,createdAt:p,updatedAt:p,comments:[]};await this.commentStore.addComment(this.currentFile,y),this.highlights.unshift(y),this.renderHighlights(this.highlights),setTimeout(()=>{let H=this.highlightContainer.querySelector(".highlight-card");H&&(this.showCommentInput(H,y),this.highlightContainer.scrollTo({top:0,behavior:"smooth"}))},100)});let h=n.createEl("button",{cls:"highlight-icon-button"});(0,hA.setIcon)(h,"file-symlink"),h.setAttribute("aria-label",B("Export as notes")),h.addEventListener("click",async()=>{if(!this.currentFile){new hA.Notice(B("Please open a file first."));return}try{let p=await this.exportService.exportHighlightsToNote(this.currentFile);new hA.Notice(B("Successfully exported highlights to: ")+p.path),await this.app.workspace.getLeaf().openFile(p)}catch(p){new hA.Notice(B("Failed to export highlights: ")+p.message)}}),this.searchInput.addEventListener("input",(0,hA.debounce)(()=>{this.updateHighlightsList()},300)),this.highlightContainer=this.mainContentContainer.createEl("div",{cls:"highlight-container"});let d=this.app.workspace.getActiveFile();d&&(this.currentFile=d,await this.updateHighlights()),this.updateViewLayout(),this.highlightContainer.empty();let u=this.searchInput.value.toLowerCase().trim(),w=this.highlights.filter(p=>{var v,y;return!!(p.text.toLowerCase().includes(u)||(v=p.comments)!=null&&v.some(H=>H.content.toLowerCase().includes(u))||this.currentFile===null&&((y=p.fileName)!=null&&y.toLowerCase().includes(u)))});this.renderHighlights(w)}renderHighlights(e,s=!1){if(s||this.highlightContainer.empty(),e.length===0&&!s){this.highlightContainer.createEl("div",{cls:"highlight-empty-state",text:this.searchInput.value.trim()?B("No matching content found."):B("The current document has no highlighted content.")});return}let n=this.highlightContainer.querySelector(".highlight-list");n||(n=this.highlightContainer.createEl("div",{cls:"highlight-list"})),e.forEach(l=>{let h;this.currentFile&&!l.filePath&&(l.filePath=this.currentFile.path),h=new Vi(n,l,this.plugin,{onHighlightClick:async u=>await this.jumpToHighlight(u),onCommentAdd:u=>this.showCommentInput(h.getElement(),u),onExport:u=>this.exportHighlightAsImage(u),onCommentEdit:(u,w)=>this.showCommentInput(h.getElement(),u,w),onAIResponse:async u=>{await this.addComment(l,u),await this.updateHighlights()}},this.isDraggedToMainView,this.currentFile===null?l.fileName:this.currentFile.basename);let d=h.getElement();if(this.isDraggedToMainView){d.classList.add("in-main-view");let u=d.querySelector(".highlight-text-content");u&&u.removeAttribute("title")}else{d.classList.remove("in-main-view");let u=d.querySelector(".highlight-text-content");u&&u.setAttribute("aria-label","Click to jump to the document position")}})}async addComment(e,s){let n=await this.getFileForHighlight(e);if(!n){new hA.Notice(B("No corresponding file found."));return}e.id||(e.id=this.generateHighlightId(e)),e.comments||(e.comments=[]);let l={id:`comment-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,content:s,createdAt:Date.now(),updatedAt:Date.now()};e.comments.push(l),e.updatedAt=Date.now(),await this.commentStore.addComment(n,e),window.dispatchEvent(new CustomEvent("comment-updated",{detail:{text:e.text,comments:e.comments}})),await this.refreshView()}async updateComment(e,s,n){let l=await this.getFileForHighlight(e);if(!l||!e.comments)return;let h=e.comments.find(d=>d.id===s);h&&(h.content=n,h.updatedAt=Date.now(),e.updatedAt=Date.now(),await this.commentStore.addComment(l,e),window.dispatchEvent(new CustomEvent("comment-updated",{detail:{text:e.text,comments:e.comments}})),await this.refreshView())}async deleteComment(e,s){let n=await this.getFileForHighlight(e);!n||!e.comments||(e.comments=e.comments.filter(l=>l.id!==s),e.updatedAt=Date.now(),e.isVirtual&&e.comments.length===0?(await this.commentStore.removeComment(n,e),this.highlights=this.highlights.filter(l=>l.id!==e.id)):await this.commentStore.addComment(n,e),window.dispatchEvent(new CustomEvent("comment-updated",{detail:{text:e.text,comments:e.comments}})),await this.refreshView())}async getFileForHighlight(e){if(this.currentFile)return this.currentFile;if(e.filePath){let s=this.app.vault.getAbstractFileByPath(e.filePath);if(s instanceof hA.TFile)return s}if(e.fileName){let n=this.app.vault.getFiles().find(l=>l.basename===e.fileName||l.name===e.fileName);if(n)return n}return null}generateHighlightId(e){return`highlight-${e.position}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}async jumpToHighlight(e){if(!this.isDraggedToMainView){if(!this.currentFile){new hA.Notice(B("No corresponding file found."));return}await this.locationService.jumpToHighlight(e,this.currentFile.path)}}async exportHighlightAsImage(e){try{let s=(await Promise.resolve().then(()=>fa(ms()))).default;new Li(this.app,e,s).open()}catch(s){new hA.Notice(B("Export failed: Failed to load necessary components."))}}async showCommentInput(e,s,n){this.currentEditingHighlightId=s.id,new Yi(e,s,n,{onSave:async l=>{n?await this.updateComment(s,n.id,l):await this.addComment(s,l),await this.updateHighlights()},onDelete:n?async()=>{await this.deleteComment(s,n.id)}:void 0,onCancel:async()=>{let l=this.highlights.find(h=>h.id===this.currentEditingHighlightId);if(l!=null&&l.isVirtual&&(!l.comments||l.comments.length===0)){let h=await this.getFileForHighlight(l);h&&(await this.commentStore.removeComment(h,l),this.highlights=this.highlights.filter(d=>d.id!==l.id),await this.refreshView())}}}).show()}async onload(){}checkViewPosition(){let e=this.app.workspace.rootSplit,s=this.isViewInMainArea(this.leaf,e);if(this.isDraggedToMainView!==s){if(this.isDraggedToMainView=s,!s){this.isFlashcardMode&&(this.isFlashcardMode=!1,this.flashcardComponent&&(this.flashcardComponent.deactivate(),this.flashcardComponent=null),this.updateFileListSelection());let n=this.app.workspace.getActiveFile();n&&(this.currentFile=n,this.updateHighlights())}this.updateViewLayout(),this.updateHighlightsList()}}isViewInMainArea(e,s){return s&&s.children?s.children.some(n=>n===e?!0:this.isViewInMainArea(e,n)):!1}async updateViewLayout(){if(this.fileListContainer.removeClass("highlight-display-block"),this.fileListContainer.removeClass("highlight-display-none"),this.isDraggedToMainView)this.fileListContainer.addClass("highlight-display-block"),await this.updateFileList(),this.createFloatingButton();else if(this.fileListContainer.addClass("highlight-display-none"),this.removeFloatingButton(),!this.isFlashcardMode){this.searchContainer.removeClass("highlight-display-none");let e=this.searchContainer.querySelector(".highlight-search-icons");e&&e.removeClass("highlight-display-none")}}async updateFileList(){var E;if(this.fileListContainer.children.length>0){this.updateFileListSelection();return}this.fileListContainer.empty(),this.fileListContainer.createEl("div",{cls:"highlight-file-list-header"}).createEl("div",{text:"HiNote",cls:"highlight-file-list-title"});let s=this.fileListContainer.createEl("div",{cls:"highlight-file-list"}),n=s.createEl("div",{cls:`highlight-file-item highlight-file-item-all ${this.currentFile===null?"is-active":""}`});n.addEventListener("click",()=>{this.currentFile=null,this.isFlashcardMode=!1,this.updateHighlights(),this.updateFileListSelection(),this.searchContainer.removeClass("highlight-display-none");let F=this.searchContainer.querySelector(".highlight-search-icons");F&&F.addClass("highlight-display-none")});let l=n.createEl("div",{cls:"highlight-file-item-left"}),h=l.createEl("span",{cls:"highlight-file-item-icon"});(0,hA.setIcon)(h,"documents"),l.createEl("span",{text:B("All Highlight"),cls:"highlight-file-item-name"});let d=s.createEl("div",{cls:"highlight-file-item highlight-file-item-flashcard"});d.addEventListener("click",async()=>{this.currentFile=null,this.isFlashcardMode=!0,this.updateFileListSelection(),this.searchContainer.addClass("highlight-display-none");let F=await this.getFilesWithHighlights(),L=[];for(let x of F){let V=this.commentStore.getFileComments(x).filter(k=>{var G;return!k.isVirtual&&((G=k.comments)==null?void 0:G.length)>0});L.push(...V)}this.highlightContainer.empty(),this.flashcardComponent||(this.flashcardComponent=new Mt(this.highlightContainer,this.plugin),this.flashcardComponent.setLicenseManager(this.licenseManager)),await this.flashcardComponent.activate(),this.flashcardComponent.setCards(L)});let u=d.createEl("div",{cls:"highlight-file-item-left"}),w=u.createEl("span",{cls:"highlight-file-item-icon"});(0,hA.setIcon)(w,"book-heart"),u.createEl("span",{text:B("HiCard"),cls:"highlight-file-item-name"});let p=d.createEl("span",{cls:"highlight-file-item-count"}),v=async()=>{let F=this.plugin.fsrsManager.getLatestCards();p.textContent=`${F.length}`};v(),this.registerEvent(this.plugin.eventManager.on("flashcard:changed",()=>{v()})),u.addEventListener("click",async()=>{let L=this.plugin.fsrsManager.getLatestCards().map(x=>({id:x.id,text:x.text,filePath:x.filePath,comments:[{id:x.id+"-answer",content:x.answer,createdAt:x.createdAt,updatedAt:x.lastReview||x.createdAt}],isVirtual:!1,position:0,paragraphOffset:0,paragraphId:"",createdAt:x.createdAt,updatedAt:x.lastReview||x.createdAt}));this.highlightContainer.empty(),this.flashcardComponent||(this.flashcardComponent=new Mt(this.highlightContainer,this.plugin),this.flashcardComponent.setLicenseManager(this.licenseManager)),await this.flashcardComponent.activate(),this.flashcardComponent.setCards(L),this.updateFileListSelection()});let y=await this.getTotalHighlightsCount();n.createEl("span",{text:`${y}`,cls:"highlight-file-item-count"}),s.createEl("div",{cls:"highlight-file-list-separator"}),n.addEventListener("click",async()=>{this.currentFile=null,this.isFlashcardMode=!1,this.flashcardComponent&&(this.flashcardComponent.deactivate(),this.flashcardComponent=null),this.updateFileListSelection(),await this.updateAllHighlights()});let H=await this.getFilesWithHighlights();for(let F of H){let L=s.createEl("div",{cls:`highlight-file-item ${((E=this.currentFile)==null?void 0:E.path)===F.path?"is-active":""}`});L.setAttribute("data-path",F.path);let x=L.createEl("div",{cls:"highlight-file-item-left"}),S=x.createEl("span",{cls:"highlight-file-item-icon",attr:{"aria-label":B("Open (DoubleClick)")}});(0,hA.setIcon)(S,"file-text"),S.addEventListener("dblclick",async G=>{G.stopPropagation(),await this.getPreferredLeaf().openFile(F)});let V=x.createEl("span",{text:F.basename,cls:"highlight-file-item-name"});this.addPagePreview(V,F);let k=await this.getFileHighlightsCount(F);L.createEl("span",{text:`${k}`,cls:"highlight-file-item-count"}),L.addEventListener("click",async()=>{this.currentFile=F,this.isFlashcardMode=!1,this.flashcardComponent&&(this.flashcardComponent.deactivate(),this.flashcardComponent=null),this.updateFileListSelection(),this.searchContainer.removeClass("highlight-display-none");let G=this.searchContainer.querySelector(".highlight-search-icons");G&&G.removeClass("highlight-display-none"),await this.updateHighlights()})}}updateFileListSelection(){let e=this.fileListContainer.querySelector(".highlight-file-item-all");e&&e.classList.toggle("is-active",this.currentFile===null&&!this.isFlashcardMode);let s=this.fileListContainer.querySelector(".highlight-file-item-flashcard");s&&s.classList.toggle("is-active",this.isFlashcardMode),this.fileListContainer.querySelectorAll(".highlight-file-item:not(.highlight-file-item-all):not(.highlight-file-item-flashcard)").forEach(l=>{var d;let h=((d=this.currentFile)==null?void 0:d.path)===l.getAttribute("data-path");l.classList.toggle("is-active",h)})}async getFilesWithHighlights(){let s=(await this.app.vault.getMarkdownFiles()).filter(l=>this.highlightService.shouldProcessFile(l)),n=[];for(let l of s){let h=await this.app.vault.read(l);this.highlightService.extractHighlights(h).length>0&&n.push(l)}return n}async updateAllHighlights(){this.currentBatch=0,this.highlights=[],this.highlightContainer.empty(),this.highlightContainer.appendChild(this.loadingIndicator),await this.loadMoreHighlights();let e=(0,hA.debounce)(async s=>{let n=s.target,{scrollTop:l,scrollHeight:h,clientHeight:d}=n;h-l-d<300&&await this.loadMoreHighlights()},100);this.highlightContainer.addEventListener("scroll",e),this.register(()=>this.highlightContainer.removeEventListener("scroll",e))}async loadMoreHighlights(){if(!this.isLoading){this.isLoading=!0,this.loadingIndicator.addClass("highlight-display-block");try{let e=await this.getFilesWithHighlights(),s=this.currentBatch*this.BATCH_SIZE,n=e.slice(s,s+this.BATCH_SIZE);if(n.length===0){this.loadingIndicator.remove();return}let l=[];for(let h of n){let d=await this.app.vault.read(h),u=this.highlightService.extractHighlights(d),w=this.commentStore.getFileComments(h),p=u.map(v=>{let y=w.find(H=>{let E=H.text===v.text;return E&&v.position!==void 0&&H.position!==void 0?Math.abs(H.position-v.position)<1e3:E});if(y){let H=[...y.comments].sort((E,F)=>F.updatedAt-E.updatedAt);return{...y,comments:H,position:v.position,paragraphOffset:v.paragraphOffset,fileName:h.basename,filePath:h.path,fileIcon:"file-text"}}return{id:this.generateHighlightId(v),...v,comments:[],createdAt:Date.now(),updatedAt:Date.now(),fileName:h.basename,filePath:h.path,fileIcon:"file-text"}});l.push(...p)}this.highlights.push(...l),await this.renderHighlights(l,!0),this.currentBatch++}catch(e){new hA.Notice("\u52A0\u8F7D\u9AD8\u4EAE\u5185\u5BB9\u65F6\u51FA\u9519")}finally{this.isLoading=!1,this.loadingIndicator.addClass("highlight-display-none")}}}async getFileHighlightsCount(e){let s=await this.app.vault.read(e);return this.highlightService.extractHighlights(s).length}async getTotalHighlightsCount(){let e=await this.getFilesWithHighlights(),s=0;for(let n of e)s+=await this.getFileHighlightsCount(n);return s}createFloatingButton(){if(this.floatingButton)return;this.floatingButton=document.createElement("div"),this.floatingButton.className="highlight-floating-button";let e=document.createElement("span");(0,hA.setIcon)(e,"message-circle"),this.floatingButton.appendChild(e),this.floatingButton.addEventListener("click",()=>{try{Ee.getInstance(this.app,this.plugin).show()}catch(s){}}),document.body.appendChild(this.floatingButton)}removeFloatingButton(){this.floatingButton&&(this.floatingButton.remove(),this.floatingButton=null)}onunload(){this.removeFloatingButton()}updateAIDropdowns(){this.aiButtons.forEach(e=>{e.updateDropdownContent()}),this.app.workspace.trigger("comment-view:update-ai-dropdowns")}registerAIButton(e){this.aiButtons.push(e)}unregisterAIButton(e){let s=this.aiButtons.indexOf(e);s!==-1&&this.aiButtons.splice(s,1)}isInAllHighlightsView(){return this.currentFile===null}updateHighlightsList(){let e=this.searchInput.value.toLowerCase().trim(),s=this.highlights.filter(n=>{var l,h;return!!(n.text.toLowerCase().includes(e)||(l=n.comments)!=null&&l.some(d=>d.content.toLowerCase().includes(e))||this.currentFile===null&&((h=n.fileName)!=null&&h.toLowerCase().includes(e)))});this.renderHighlights(s)}async refreshView(){this.isInAllHighlightsView()?await this.updateAllHighlights():await this.updateHighlights()}async updateHighlights(){if(this.isInAllHighlightsView()){await this.updateAllHighlights();return}if(!this.currentFile){this.renderHighlights([]);return}if(!this.highlightService.shouldProcessFile(this.currentFile)){this.renderHighlights([]);return}let e=await this.app.vault.read(this.currentFile),s=this.highlightService.extractHighlights(e),n=this.commentStore.getFileComments(this.currentFile),l=new Set;this.highlights=s.map(d=>{let u=n.find(w=>{if(l.has(w.id))return!1;let p=w.text===d.text;return p&&d.position!==void 0&&w.position!==void 0?Math.abs(w.position-d.position)<1e3:p});if(!u&&d.position!==void 0&&(u=n.find(w=>!l.has(w.id)&&w.position!==void 0&&d.position!==void 0&&Math.abs(w.position-d.position)<50)),!u&&this.plugin.highlightMatchingService){let w={id:d.id||`highlight-${Date.now()}-${d.position!==void 0?d.position:0}`,text:d.text,position:d.position||0,comments:[],createdAt:d.createdAt||Date.now(),updatedAt:d.updatedAt||Date.now(),blockId:d.blockId,paragraphId:d.paragraphId,paragraphOffset:d.paragraphOffset||0,isVirtual:!1};if(this.currentFile){let p=this.plugin.highlightMatchingService.findMatchingHighlight(this.currentFile,w);p&&!l.has(p.id)&&(console.log(`[CommentView] \u4F7F\u7528\u6A21\u7CCA\u5339\u914D\u627E\u5230\u9AD8\u4EAE: "${p.text}"`),u=p)}}return u?(l.add(u.id),{...d,id:u.id,comments:u.comments,createdAt:u.createdAt,updatedAt:u.updatedAt}):d});let h=n.filter(d=>d.isVirtual&&d.comments&&d.comments.length>0&&!l.has(d.id));h.forEach(d=>l.add(d.id)),this.highlights.unshift(...h),this.renderHighlights(this.highlights)}addPagePreview(e,s){let n;e.addEventListener("mouseenter",l=>{n=setTimeout(async()=>{let h=l.target;this.app.workspace.trigger("hover-link",{event:l,source:"hi-note",hoverParent:h,targetEl:h,linktext:s.path})},300)}),e.addEventListener("mouseleave",()=>{n&&clearTimeout(n)})}getPreferredLeaf(){let e=this.app.workspace.getLeavesOfType("markdown");if(this.isDraggedToMainView){let s=e.find(n=>n!==this.leaf);if(s)return s}return this.app.workspace.getLeaf("split","vertical")}};var Rt=require("obsidian");var qi=class{constructor(a){this.data={};this.fileCommentsData={};this.comments=new Map;this.fileComments=new Map;this.commentCache=new Map;this.maxCacheSize=100;this.PERFORMANCE_THRESHOLD=100;this.plugin=a,this.eventManager=new Ue(a.app),this.blockIdService=new nt(a.app),this.highlightService=new jA(a.app)}async loadComments(){let a=await this.plugin.loadData();this.data=(a==null?void 0:a.comments)||{},this.fileCommentsData=(a==null?void 0:a.fileComments)||{},this.migrateDataToBlockId(),this.comments=new Map(Object.entries(this.data).map(([e,s])=>[e,Object.values(s)])),this.fileComments=new Map(Object.entries(this.fileCommentsData))}migrateDataToBlockId(){let a=0;for(let e in this.data){let s=this.data[e];for(let n in s){let l=s[n];if(l.paragraphId&&!l.blockId){let h=l.paragraphId.match(/#\^([a-zA-Z0-9-]+)/);h&&h[1]&&(l.blockId=h[1],a++)}}}}async saveComments(){let e={...await this.plugin.loadData()||{},comments:this.data,fileComments:Object.fromEntries(this.fileComments)};await this.plugin.saveData(e);let s=await this.plugin.loadData()}async checkOrphanedDataCount(){let a=0,e=new Set;for(let s in this.data){let n=this.plugin.app.vault.getAbstractFileByPath(s);if(!n||!(n instanceof Rt.TFile)){e.add(s),a+=Object.keys(this.data[s]||{}).length;continue}try{let l=await this.plugin.app.vault.read(n),h=this.highlightService.extractHighlights(l),d=new Set(h.map(p=>p.text)),u=this.data[s]||{},w=!1;for(let p in u){let v=u[p];v.isVirtual||d.has(v.text)||(a++,w=!0)}w&&e.add(s)}catch(l){}}return{orphanedHighlights:a,affectedFiles:e.size}}async cleanOrphanedData(){let a=0,e=new Set;for(let s in this.data){let n=this.plugin.app.vault.getAbstractFileByPath(s);if(!n||!(n instanceof Rt.TFile)){delete this.data[s],this.comments.delete(s),e.add(s),a+=Object.keys(this.data[s]||{}).length;continue}try{let l=await this.plugin.app.vault.read(n),h=this.highlightService.extractHighlights(l),d=new Set(h.map(p=>p.text)),u=this.data[s]||{},w=!1;for(let p in u){let v=u[p];v.isVirtual||d.has(v.text)||(delete u[p],a++,w=!0)}w&&(e.add(s),this.comments.set(s,Object.values(u)),Object.keys(u).length===0&&(delete this.data[s],this.comments.delete(s)))}catch(l){}}return a>0&&await this.saveComments(),{removedHighlights:a,affectedFiles:e.size}}async handleFileRename(a,e){if(this.data[a]){this.data[e]=this.data[a],delete this.data[a];let l=this.commentCache.get(a);l&&(this.commentCache.delete(a),this.commentCache.set(e,l))}let s=this.fileComments.get(a);s&&(this.fileComments.delete(a),this.fileComments.set(e,s));let n=this.comments.get(a);n&&(this.comments.delete(a),this.comments.set(e,n)),await this.saveComments()}getFileComments(a){let e=this.data[a.path]||{};return Object.values(e).sort((s,n)=>{let l="isVirtual"in s?s.isVirtual:!1,h="isVirtual"in n?n.isVirtual:!1;return l&&!h?-1:!l&&h?1:s.position-n.position})}getFileOnlyComments(a){return this.fileComments.get(a.path)||[]}async addComment(a,e){if(!e.id)throw new Error("Highlight ID is required");if(this.data[a.path]||(this.data[a.path]={}),"isVirtual"in e&&e.isVirtual){this.data[a.path][e.id]=e,await this.saveComments();return}if(!e.blockId){let s=this.plugin.app.workspace.getActiveViewOfType(Rt.MarkdownView),n=s==null?void 0:s.editor,l=s==null?void 0:s.file;if(n&&l&&typeof e.position=="number")try{let h=n.offsetToPos(e.position),d=this.blockIdService.getOrCreateBlockId(n,h.line);e.blockId=d;let u=n.getValue();await this.plugin.app.vault.modify(l,u)}catch(h){let d=Date.now().toString(36)+"-"+Math.random().toString(36).substr(2,5);e.blockId=d}else{let h=Date.now().toString(36)+"-"+Math.random().toString(36).substr(2,5);e.blockId=h}}if(e.paragraphId&&!e.blockId){let s=e.paragraphId.match(/#\^([a-zA-Z0-9-]+)/);s&&s[1]&&(e.blockId=s[1])}this.data[a.path][e.id]=e,await this.saveComments()}async addFileComment(a,e){let s={id:`file-comment-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,content:e,createdAt:Date.now(),updatedAt:Date.now(),filePath:a.path},n=this.fileComments.get(a.path)||[];return n.push(s),this.fileComments.set(a.path,n),await this.saveComments(),s}async updateComment(a,e,s){var n;if((n=this.data[a.path])!=null&&n[e]){let l=this.data[a.path][e],h={id:`comment-${Date.now()}`,content:s,createdAt:Date.now(),updatedAt:Date.now()};l.comments||(l.comments=[]),l.comments.push(h),l.updatedAt=Date.now(),await this.saveComments()}}async updateFileComment(a,e,s){let l=(this.fileComments.get(a.path)||[]).find(h=>h.id===e);l&&(l.content=s,l.updatedAt=Date.now(),await this.saveComments())}async removeComment(a,e){var n;let s=a.path;(n=this.data[s])!=null&&n[e.id]&&(delete this.data[s][e.id],Object.keys(this.data[s]).length===0&&delete this.data[s],await this.saveComments())}async deleteFileComment(a,e){let s=this.fileComments.get(a.path)||[],n=s.findIndex(l=>l.id===e);n!==-1&&(s.splice(n,1),s.length===0?this.fileComments.delete(a.path):this.fileComments.set(a.path,s),await this.saveComments())}async cleanupComments(a){let e=!1;for(let s of Object.keys(this.data))a.has(s)||(delete this.data[s],e=!0);for(let s of Object.keys(this.fileCommentsData))a.has(s)||(delete this.fileCommentsData[s],e=!0);e&&await this.saveComments()}loadVisibleComments(a){let e=this.plugin.app.workspace.getActiveFile();e&&(a.forEach(s=>{let n=this.getCommentsByParagraphId(e,s);this.commentCache.set(s,n)}),this.pruneCache())}pruneCache(){this.commentCache.size>this.maxCacheSize&&Array.from(this.commentCache.keys()).slice(0,this.commentCache.size-this.maxCacheSize).forEach(e=>this.commentCache.delete(e))}batchUpdateComments(a){let e=new Map;a.forEach(({id:s,comment:n})=>{var l;e.has(s)||e.set(s,[]),(l=e.get(s))==null||l.push(n)}),e.forEach((s,n)=>{this.comments.set(n,s)})}checkPerformance(a){let e=performance.now();a(),performance.now()-e>this.PERFORMANCE_THRESHOLD}getCommentsByParagraphId(a,e){let s=this.data[a.path]||{};return Object.values(s).filter(n=>n.paragraphId===e).sort((n,l)=>n.position-l.position)}getCommentsByBlockId(a,e){let s=this.data[a.path]||{};return Object.values(s).filter(n=>n.blockId===e).sort((n,l)=>n.position-l.position)}hasParagraphComments(a,e){return this.getCommentsByParagraphId(a,e).length>0}hasBlockComments(a,e){return this.getCommentsByBlockId(a,e).length>0}async clearAllComments(){this.data={},this.fileCommentsData={},await this.saveComments()}getBlockId(a,e){return this.blockIdService.getOrCreateBlockId(a,e)}getHiNotes(a){let e=this.plugin.app.workspace.getActiveFile();return e?this.getFileComments(e).filter(n=>{let l=n.text===a.text;return l&&typeof n.position=="number"&&typeof a.position=="number"?Math.abs(n.position-a.position)<1e3:l}):[]}};var ye=require("@codemirror/view"),fs=require("obsidian");var ba=require("@codemirror/view"),ot=require("obsidian");var $i=class M extends ba.WidgetType{constructor(e,s,n,l){super();this.plugin=e;this.highlight=s;this.highlightItems=n;this.onClick=l;this.app=this.plugin.app,this.textSimilarityService=new zA(this.plugin.app)}eq(e){return e instanceof M?(this.textSimilarityService.calculateSimilarity(this.highlight.text,e.highlight.text)>.7||this.highlight.text===e.highlight.text)&&this.highlight.comments.length===e.highlight.comments.length:!1}get estimatedHeight(){return 0}get lineBreaks(){return 0}coordsAt(e,s,n){return null}toDOM(){let e=document.createElement("span");return e.addClass("hi-note-widget"),this.highlight.blockId&&e.setAttribute("data-block-id",this.highlight.blockId),this.highlight.paragraphId&&e.setAttribute("data-paragraph-id",this.highlight.paragraphId),e.setAttribute("data-highlight-text",this.highlight.text),(this.highlight.comments||[]).length>0||e.addClass("hi-note-widget-no-comments"),this.createButton(e),e}createButton(e){let s=(this.highlight.comments||[]).length>0,n=e.createEl("button",{cls:`hi-note-button ${s?"":"hi-note-button-hidden"}`}),l=this.createIconContainer(n),h=this.createTooltip(e);this.setupEventListeners(e,n,h)}createIconContainer(e){let s=e.createEl("span",{cls:"hi-note-icon-container"});(0,ot.setIcon)(s,"message-circle");let n=this.highlight,l=0;if(this.highlightItems&&this.highlightItems.length>1)for(let u of this.highlightItems){if(!u.comments||u.comments.length===0)continue;let w=this.textSimilarityService.calculateSimilarity(this.highlight.text,u.text);w>l&&(l=w,n=u)}let d=(n.comments||[]).length;return d>0&&s.createEl("span",{cls:"hi-note-count",text:d.toString()}),s}createTooltip(e){let s=document.createElement("div");s.addClass("hi-note-tooltip","hi-note-tooltip-hidden"),s.setAttribute("data-highlight-id",this.highlight.id);let n=s.createEl("div",{cls:"hi-note-tooltip-list"}),l=this.highlight.comments||[];return this.renderTooltipContent(n,l,s),document.body.appendChild(s),{tooltip:s,updateTooltipPosition:()=>{let d=e.getBoundingClientRect();s.style.position="fixed",s.style.top=`${d.bottom+4}px`,s.style.left=`${d.right-s.offsetWidth}px`}}}renderTooltipContent(e,s,n){s.length!==0&&(s.slice(0,3).forEach(l=>{let h=e.createEl("div",{cls:"hi-note-tooltip-item"}),d=h.createEl("div",{cls:"hi-note-tooltip-content markdown-rendered"});this.renderMarkdownContent(d,l.content),h.createEl("div",{cls:"hi-note-tooltip-time",text:new Date(l.createdAt).toLocaleString()})}),s.length>3&&n.createEl("div",{cls:"hi-note-tooltip-more",text:`\u8FD8\u6709 ${s.length-3} \u6761\u8BC4\u8BBA...`}))}setupEventListeners(e,s,n){let{tooltip:l,updateTooltipPosition:h}=n;(this.highlight.comments||[]).length>0?(s.removeClass("hi-note-button-hidden"),s.addEventListener("mouseenter",()=>{l.removeClass("hi-note-tooltip-hidden"),h()}),s.addEventListener("mouseleave",()=>{l.addClass("hi-note-tooltip-hidden")})):(s.addClass("hi-note-button-hidden"),e.addEventListener("mouseenter",()=>{s.removeClass("hi-note-button-hidden")}),e.addEventListener("mouseleave",()=>{s.addClass("hi-note-button-hidden")})),s.addEventListener("click",w=>{w.preventDefault(),w.stopPropagation(),this.onClick(),l.addClass("hi-note-tooltip-hidden");let p=new CustomEvent("open-comment-input",{detail:{highlightId:this.highlight.id,text:this.highlight.text}});window.dispatchEvent(p)}),window.addEventListener("resize",h)}async renderMarkdownContent(e,s){try{await ot.MarkdownRenderer.render(this.app,s,e,"",new ot.Component),e.querySelectorAll("ul, ol").forEach(l=>{l.addClass("tooltip-markdown-list")})}catch(n){console.error("Error rendering markdown in tooltip:",n),e.textContent=s}}destroy(e){let s=document.querySelector(`.hi-note-tooltip[data-highlight-id="${this.highlight.id}"]`);s&&s.remove(),e.remove()}updateDOM(e){return!1}ignoreEvent(){return!1}};var ji=class{constructor(a,e){this.plugin=a,this.commentStore=e,this.highlightService=new jA(this.plugin.app),this.textSimilarityService=new zA(this.plugin.app)}findMatchingHighlight(a,e,s){if(!s||s.length===0)return null;let n=s.find(l=>l.text===e.text&&(typeof l.position!="number"||typeof e.position!="number"||Math.abs(l.position-e.position)<10))||null;if(!n&&typeof e.position=="number"&&(n=s.find(l=>typeof l.position=="number"&&Math.abs(l.position-e.position)<30)||null),!n){let l=null,h=0;for(let d of s){if(!d.comments||d.comments.length===0)continue;let u=this.textSimilarityService.calculateSimilarity(d.text,e.text);u>h&&u>.6&&(h=u,l=d)}l&&(n=l)}return n}getActiveMarkdownView(){return this.plugin.app.workspace.getActiveViewOfType(fs.MarkdownView)}enable(){let a=this.plugin,e=this.commentStore;this.plugin.registerDomEvent(window,"comment-updated",n=>{let l=document.querySelectorAll(".hi-note-widget"),h=n.detail.text,d=this.getActiveMarkdownView();if(!d||!d.file)return;let u=this.commentStore.getFileComments(d.file);u&&l.forEach(w=>{let p=w.getAttribute("data-highlight-text");if(p===h){let v=u.find(F=>F.text===p),y=(v==null?void 0:v.comments)||[],H=w.querySelector(".hi-note-count");if(H){let F=y.length;H.textContent=F.toString();let L=w.querySelector(".hi-note-button");F===0?L==null||L.addClass("hi-note-button-hidden"):L==null||L.removeClass("hi-note-button-hidden")}let E=w.querySelector(".hi-note-tooltip");E&&this.updateTooltipContent(E,y)}})});let s=ye.ViewPlugin.fromClass(class{constructor(n){this.plugin=a,this.commentStore=e,this.highlightService=new jA(this.plugin.app),this.textSimilarityService=new zA(this.plugin.app),this.decorations=this.buildDecorations(n)}findMatchingHighlight(n,l,h){if(!h||h.length===0)return null;let d=h.find(u=>u.text===l.text&&(typeof u.position!="number"||typeof l.position!="number"||Math.abs(u.position-l.position)<10))||null;if(!d&&typeof l.position=="number"&&(d=h.find(u=>typeof u.position=="number"&&Math.abs(u.position-l.position)<30)||null),!d){let u=null,w=0;for(let p of h){if(!p.comments||p.comments.length===0)continue;let v=this.textSimilarityService.calculateSimilarity(p.text,l.text);v>w&&v>.6&&(w=v,u=p)}u&&(d=u)}return d}update(n){(n.docChanged||n.viewportChanged)&&(this.decorations=this.buildDecorations(n.view))}buildDecorations(n){var p,v,y,H;let l=[],d=n.state.doc.toString(),u=this.plugin.app.workspace.getActiveViewOfType(fs.MarkdownView);if(!u||!u.file)return ye.Decoration.none;if(!this.highlightService.shouldProcessFile(u.file))return ye.Decoration.none;let w=this.highlightService.extractHighlights(d);for(let E of w){if(E.position===void 0)continue;let F={...E,id:E.id||`highlight-${Date.now()}-${E.position}`,comments:E.comments||[],position:E.position,paragraphOffset:E.paragraphOffset||0,blockId:E.blockId,paragraphId:E.paragraphId||`p-${E.paragraphOffset||0}`,createdAt:E.createdAt||Date.now(),updatedAt:E.updatedAt||Date.now(),text:E.text};if(F.blockId){let J=this.commentStore.getCommentsByBlockId(u.file,F.blockId);if(J&&J.length>0){let z=J.find(eA=>eA.text===F.text&&(typeof eA.position!="number"||typeof F.position!="number"||Math.abs(eA.position-F.position)<10));if(z)F.comments=z.comments||[];else{let eA=u.file;if(!eA)continue;let sA=this.findMatchingHighlight(eA,F,J);sA?(sA.text!==F.text&&this.plugin.highlightMatchingService.recoverHighlight(eA,sA,F.text).then(rA=>{rA&&this.plugin.eventManager.emitHighlightUpdate(eA.path,sA.text,F.text)}),F.comments=sA.comments||[]):F.comments=J[0].comments||[]}}}else{let J=this.commentStore.getHiNotes(F);if(J&&J.length>0){let z=J.find(eA=>eA.text===F.text&&(typeof eA.position!="number"||typeof F.position!="number"||Math.abs(eA.position-F.position)<10));if(z)F.comments=z.comments||[];else{let eA=u.file;if(!eA)continue;let sA=this.findMatchingHighlight(eA,F,J);sA?(sA.text!==F.text&&this.plugin.highlightMatchingService.recoverHighlight(eA,sA,F.text).then(rA=>{rA&&this.plugin.eventManager.emitHighlightUpdate(eA.path,sA.text,F.text)}),F.comments=sA.comments||[]):F.comments=J[0].comments||[]}}}let L,x=(p=E.originalLength)!=null?p:E.text.length+4,S=d.slice(E.position,E.position+x);if(S.startsWith("<")){let J=/<[^>]+>/.exec(S),z=/<\/[^>]+>/.exec(S);L=E.position+x}else L=E.position+E.text.length+4;let k=this.isAtParagraphEnd(d,L),G=this.createCommentWidget(F,[F]);l.push(G.range(L))}for(let E of w){if(E.position===void 0)continue;let F={...E,id:E.id||`highlight-${Date.now()}-${E.position}`,comments:E.comments||[],position:E.position,paragraphOffset:E.paragraphOffset||0,blockId:E.blockId,paragraphId:E.paragraphId||`p-${E.paragraphOffset||0}`,createdAt:E.createdAt||Date.now(),updatedAt:E.updatedAt||Date.now(),text:E.text};if(F.blockId){let V=this.commentStore.getCommentsByBlockId(u.file,F.blockId);if(V&&V.length>0){let k=V.find(G=>G.text===F.text&&(typeof G.position!="number"||typeof F.position!="number"||Math.abs(G.position-F.position)<10));k?F.comments=k.comments||[]:F.comments=V[0].comments||[]}}else{let V=this.commentStore.getHiNotes(F);if(V&&V.length>0){let k=V.find(G=>G.text===F.text&&(typeof G.position!="number"||typeof F.position!="number"||Math.abs(G.position-F.position)<10));k?F.comments=k.comments||[]:F.comments=V[0].comments||[]}}let L=(v=E.originalLength)!=null?v:E.text.length+4,x=d.slice(E.position,E.position+L);if(x.startsWith("<")){let V=/<[^>]+>/.exec(x),k=/<\/[^>]+>/.exec(x);if(V&&k){let G=E.position+V[0].length,J=E.position+L-k[0].length,z=this.commentStore.getHiNotes(F),eA=z.length>0?(y=z[0].comments[0])==null?void 0:y.content:"",sA=ye.Decoration.mark({class:"cm-highlight",attributes:{title:eA||"","data-highlight-type":"html",style:E.backgroundColor?`background-color: ${E.backgroundColor}`:""}});l.push(sA.range(G,J))}}else{let k=E.position+E.text.length+4,G=this.commentStore.getHiNotes(F),J=G.length>0?(H=G[0].comments[0])==null?void 0:H.content:""}}return ye.Decoration.set(l.sort((E,F)=>E.from-F.from))}createCommentWidget(n,l){return ye.Decoration.widget({widget:new $i(this.plugin,n,l,()=>this.openCommentPanel(n)),side:2,stopEvent:h=>!0})}openCommentPanel(n){let l=this.plugin.app.workspace,h=l.getLeavesOfType("comment-view");if(h.length)l.revealLeaf(h[0]);else{let d=l.getRightLeaf(!1);d&&d.setViewState({type:"comment-view",active:!0})}}isAtParagraphEnd(n,l){if(l>=n.length)return!0;let h=n.charAt(l),d=n.substr(l,2),u=h===`
|
|
`||h==="\r"||d===`\r
|
|
`,w=u;if(u){let p=l+(d===`\r
|
|
`?2:1);if(p>=n.length)w=!0;else{let v=n.charAt(p),y=n.substr(p,2);w=v===`
|
|
`||v==="\r"||y===`\r
|
|
`}}return w}},{decorations:n=>n.decorations});this.highlightPlugin=s,this.plugin.registerEditorExtension([s])}disable(){if(this.highlightPlugin){let a=this.getActiveMarkdownView();a!=null&&a.editor&&a.editor.refresh()}document.querySelectorAll(".hi-note-widget").forEach(a=>a.remove())}updateTooltipContent(a,e){let s=a.querySelector(".hi-note-tooltip-list");s&&(s.empty(),e.slice(0,3).forEach(n=>{let l=s.createEl("div",{cls:"hi-note-tooltip-item"});l.createEl("div",{cls:"hi-note-tooltip-content",text:n.content}),l.createEl("div",{cls:"hi-note-tooltip-time",text:new Date(n.createdAt).toLocaleString()})}))}};var La=require("obsidian");var CA=require("obsidian");var zi=class{constructor(a,e){this.plugin=a,this.containerEl=e}addStyles(){let a=document.createElement("style");a.id="hinote-settings-styles",a.textContent=`
|
|
.modal-button-container {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.orphaned-data-count {
|
|
color: var(--text-error);
|
|
font-weight: bold;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.no-orphaned-data {
|
|
color: var(--text-success);
|
|
font-weight: bold;
|
|
margin-top: 8px;
|
|
}
|
|
`;let e=document.getElementById("hinote-settings-styles");e&&e.remove(),document.head.appendChild(a)}async updateOrphanedDataCount(a){try{let e=a.querySelector(".orphaned-data-count, .no-orphaned-data");e&&e.remove();let s=await this.plugin.commentStore.checkOrphanedDataCount(),n=document.createElement("div");s.orphanedHighlights>0?(n.className="orphaned-data-count",n.textContent=`Found ${s.orphanedHighlights} orphaned highlights in ${s.affectedFiles} files.`):(n.className="no-orphaned-data",n.textContent="No orphaned data found."),a.appendChild(n)}catch(e){console.error("[HiNote] Error updating orphaned data count:",e)}}display(){let a=this.containerEl.createEl("div",{cls:"general-settings-container"});this.addStyles(),new CA.Setting(a).setName(B("Export Path")).setDesc(B("Set the path for exported highlight notes. Leave empty to use vault root. The path should be relative to your vault root.")).addText(s=>s.setPlaceholder("Example: Highlights/Export").setValue(this.plugin.settings.export.exportPath||"").onChange(async n=>{n=n.replace(/^\/+/,""),n=n.replace(/\/+$/,""),this.plugin.settings.export.exportPath=n,await this.plugin.saveSettings()})),new CA.Setting(a).setName(B("Export template")).setDesc(B("Customize the format of exported highlights and comments using variables. Available variables: {{sourceFile}}, {{highlightText}}, {{highlightBlockRef}}, {{commentContent}}, {{commentDate}}. Leave empty to use default template.")).addTextArea(s=>{s.setPlaceholder(`[[{{sourceFile}}]] - HighlightsNotes
|
|
|
|
> [!quote] Highlight
|
|
> ![[{{highlightBlockRef}}]]
|
|
>
|
|
> ---
|
|
>
|
|
>> [!note] Comment
|
|
>> {{commentContent}}
|
|
>> *{{commentDate}}*`).setValue(this.plugin.settings.export.exportTemplate||"").onChange(async l=>{this.plugin.settings.export.exportTemplate=l,await this.plugin.saveSettings()}),s.inputEl.rows=10,s.inputEl.cols=40}),new CA.Setting(a).setName(B("Exclusions")).setDesc(B("Comma separated list of paths, tags, note titles or file extensions that will be excluded from highlighting. e.g. folder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md")).addTextArea(s=>{s.setPlaceholder("folder1, folder1/folder2, [[note1]], [[note2]], *.excalidraw.md").setValue(this.plugin.settings.excludePatterns||"").onChange(async n=>{let l=n.split(",").map(h=>h.trim()).filter(h=>h.length>0);this.plugin.settings.excludePatterns=n,await this.plugin.saveSettings()}),s.inputEl.rows=4,s.inputEl.cols=40}),new CA.Setting(a).setName(B("Custom text extraction")).setHeading(),new CA.Setting(a).setName(B("Use Custom Pattern")).setDesc(B("Enable to use a custom regular expression for extracting text.")).addToggle(s=>s.setValue(this.plugin.settings.useCustomPattern).onChange(async n=>{this.plugin.settings.useCustomPattern=n,await this.plugin.saveSettings()})),new CA.Setting(a).setName(B("Custom Pattern")).setDesc(B("Enter a custom regular expression for extracting text. Use capture groups () to specify the text to extract. The first non-empty capture group will be used as the extracted text.")).addTextArea(s=>{s.setPlaceholder("==\\s*(.*?)\\s*==|<mark[^>]*>(.*?)</mark>|<span[^>]*>(.*?)</span>").setValue(this.plugin.settings.highlightPattern===Y.highlightPattern?"":this.plugin.settings.highlightPattern).onChange(async n=>{this.plugin.settings.highlightPattern=n||Y.highlightPattern,await this.plugin.saveSettings()}),s.inputEl.rows=4,s.inputEl.cols=40}),new CA.Setting(a).setName(B("Default Color")).setDesc(B("Set the default color for decorators when no color is specified. Leave empty to use system default.")).addText(s=>s.setPlaceholder("#ffeb3b").setValue(this.plugin.settings.defaultHighlightColor===Y.defaultHighlightColor?"":this.plugin.settings.defaultHighlightColor).onChange(async n=>{(n===""||/^#[0-9A-Fa-f]{6}$/.test(n))&&(this.plugin.settings.defaultHighlightColor=n||Y.defaultHighlightColor,await this.plugin.saveSettings())})),new CA.Setting(a).setName(B("Data management")).setHeading();let e=new CA.Setting(a).setName(B("Clean orphaned data")).setDesc(B("Remove highlights and comments that no longer exist in your documents. This is useful if you have deleted highlights but their comments are still stored in the data file.")).addButton(s=>s.setButtonText(B("Clean data")).onClick(async()=>{s.setButtonText(B("Checking...")),s.setDisabled(!0);try{let n=await this.plugin.commentStore.checkOrphanedDataCount();if(n.orphanedHighlights===0){new CA.Notice("No orphaned data found.");return}let l=new CA.Modal(this.plugin.app);l.titleEl.setText(B("Confirm data cleanup"));let h=l.contentEl;h.empty(),h.createEl("p",{text:`Found ${n.orphanedHighlights} orphaned highlights in ${n.affectedFiles} files.`}),h.createEl("p",{text:"Do you want to clean up these orphaned highlights and comments?"});let d=h.createDiv({cls:"modal-button-container"});d.createEl("button",{text:B("Cancel"),cls:"mod-warning"}).addEventListener("click",()=>{l.close()}),d.createEl("button",{text:B("Clean"),cls:"mod-cta"}).addEventListener("click",async()=>{l.close(),s.setButtonText(B("Cleaning...")),s.setDisabled(!0);try{let u=await this.plugin.commentStore.cleanOrphanedData();u.removedHighlights>0?new CA.Notice(`Cleaned ${u.removedHighlights} orphaned highlights from ${u.affectedFiles} files.`):new CA.Notice("No orphaned data found."),this.updateOrphanedDataCount(e.descEl)}catch(u){console.error("[HiNote] Error cleaning orphaned data:",u),new CA.Notice("Error cleaning orphaned data. Check console for details.")}finally{s.setButtonText(B("Clean data")),s.setDisabled(!1)}}),l.open()}catch(n){console.error("[HiNote] Error checking orphaned data:",n),new CA.Notice("Error checking orphaned data. Check console for details.")}finally{s.setButtonText(B("Clean data")),s.setDisabled(!1)}}));this.updateOrphanedDataCount(e.descEl)}};var Ma=require("obsidian");var UA=require("obsidian");var xa=require("obsidian");var KA=class{constructor(a,e){this.plugin=a,this.containerEl=e}createModelDropdown(a,e,s){new xa.Setting(a).setName(B("Model")).setDesc(B("Select the AI model to use")).addDropdown(n=>{let l=Object.fromEntries(e.map(h=>[h.id,h.name]));return n.addOptions(l).setValue(this.plugin.settings.ai.model||s.id).onChange(async h=>{this.plugin.settings.ai.model=h,await this.plugin.saveSettings()})})}};var Nt=[{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-turbo",name:"GPT-4 Turbo"},{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo"}],Ar=class extends KA{constructor(e,s){super(e,s);this.modelSelectEl=null;this.customModelContainer=null;this.modelState=this.initializeModelState()}initializeModelState(){this.plugin.settings.ai.openai||(this.plugin.settings.ai.openai={apiKey:"",model:Nt[0].id,apiAddress:"",isCustomModel:!1,lastCustomModel:""});let e=this.plugin.settings.ai.openai,s;if(e.isCustomModel)s={id:e.model,name:e.model,isCustom:!0};else{let n=Nt.find(l=>l.id===e.model);s=n||Nt[0],n||(e.model=s.id)}return{selectedModel:s,apiKey:e.apiKey||""}}async saveModelState(){this.plugin.settings.ai.openai||(this.plugin.settings.ai.openai={});let e=this.plugin.settings.ai.openai,s=this.modelState.selectedModel;e.model=s.id,e.isCustomModel=!!s.isCustom,e.apiKey=this.modelState.apiKey||"",s.isCustom&&s.id&&(e.lastCustomModel=s.id),await this.plugin.saveSettings()}display(e){let s=e.createEl("div",{cls:"ai-service-settings"});new UA.Setting(s).setName(B("OpenAI Settings")).setHeading(),new UA.Setting(s).setName(B("API Key")).setDesc(B("Enter your OpenAI API Key.")).addText(w=>w.setPlaceholder("sk-...").setValue(this.modelState.apiKey).onChange(async p=>{this.modelState.apiKey=p,await this.saveModelState()})).addButton(w=>w.setButtonText(B("Check")).onClick(async()=>{if(!this.modelState.apiKey){new UA.Notice(B("Please enter an API Key first"));return}w.setDisabled(!0),w.setButtonText(B("Checking..."));try{(await this.fetchAvailableModels(this.modelState.apiKey)).length>0?new UA.Notice(B("API Key validated successfully!")):new UA.Notice(B("No models available. Please check your API Key."))}catch(p){new UA.Notice(B("Failed to validate API Key. Please check your key and try again."))}finally{w.setDisabled(!1),w.setButtonText(B("Check"))}}));let n=new UA.Setting(s).setName(B("Model")).setDesc(B("Select a model or use a custom one")).addDropdown(w=>{Nt.forEach(v=>{w.addOption(v.id,v.name)}),w.addOption("custom",B("Custom Model"));let p=this.modelState.selectedModel.isCustom?"custom":this.modelState.selectedModel.id;return w.setValue(p),this.modelSelectEl=w.selectEl,w.onChange(async v=>{if(v==="custom")await this.showCustomModelInput();else{let y=Nt.find(H=>H.id===v);if(y){if(this.modelState.selectedModel.isCustom){let H=this.plugin.settings.ai.openai;H.lastCustomModel=this.modelState.selectedModel.id,await this.plugin.saveSettings()}this.modelState.selectedModel=y,await this.saveModelState(),await this.hideCustomModelInput()}}}),w});this.customModelContainer=n.settingEl.createDiv("custom-model-container"),this.customModelContainer.addClass("custom-model-container");let l=n.settingEl.querySelector(".setting-item-control");l&&(l.addClass("openai-dropdown-container"),l.insertBefore(this.customModelContainer,l.firstChild));let d=new UA.Setting(this.customModelContainer).addText(w=>w.setPlaceholder("model-id").setValue(this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:"").onChange(async p=>{let v=p.trim();if(v){if(!/^[a-zA-Z0-9-_.]+$/.test(v)){new UA.Notice(B("\u6A21\u578B ID \u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u70B9\u548C\u77ED\u6760")),w.setValue(this.modelState.selectedModel.id);return}this.modelState.selectedModel={id:v,name:v,isCustom:!0},await this.saveModelState()}})).settingEl;d.addClass("openai-setting-no-border");let u=d.querySelector(".setting-item-control");u&&u.addClass("openai-setting-no-margin"),this.modelState.selectedModel.isCustom&&this.showCustomModelInput(),new UA.Setting(s).setName(B("Custom API Address")).setDesc(B("If using a custom API proxy, please enter the full API address")).addText(w=>{var p;return w.setPlaceholder("https://api.openai.com/v1").setValue(((p=this.plugin.settings.ai.openai)==null?void 0:p.apiAddress)||"").onChange(async v=>{this.plugin.settings.ai.openai||(this.plugin.settings.ai.openai={}),this.plugin.settings.ai.openai.apiAddress=v,await this.plugin.saveSettings()})})}async validateModel(e,s,n){try{let l=await(0,UA.requestUrl)({url:`${n}/models/${s}`,method:"GET",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(l.status!==200){let d=await l.json.catch(()=>null);return new UA.Notice(B("\u81EA\u5B9A\u4E49\u6A21\u578B\u4E0D\u53EF\u7528\u3002\u8BF7\u68C0\u67E5\u6A21\u578B ID \u662F\u5426\u6B63\u786E\uFF0C\u4EE5\u53CA\u4F60\u662F\u5426\u6709\u6743\u9650\u8BBF\u95EE\u6B64\u6A21\u578B\u3002")),!1}let h=await(0,UA.requestUrl)({url:`${n}/chat/completions`,method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:s,messages:[{role:"user",content:"Hello"}],max_tokens:1})});if(h.status!==200){let d=await h.json.catch(()=>null);return!1}return!0}catch(l){return!1}}async fetchAvailableModels(e){var s;try{let n=((s=this.plugin.settings.ai.openai)==null?void 0:s.apiAddress)||"https://api.openai.com/v1";if(this.modelState.selectedModel.isCustom){let h=this.modelState.selectedModel.id;if(!await this.validateModel(e,h,n))throw new Error(`Custom model not available: ${h}`);return[this.modelState.selectedModel]}let l=await(0,UA.requestUrl)({url:`${n}/models`,method:"GET",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});return l.status===200?l.json.data.map(u=>({id:u.id,name:u.id})):[]}catch(n){throw n}}async showCustomModelInput(){if(this.customModelContainer&&this.modelSelectEl){this.customModelContainer.addClass("visible"),this.modelSelectEl.value="custom";let e=this.plugin.settings.ai.openai;if(!this.modelState.selectedModel.isCustom){let n=e.lastCustomModel||"";this.modelState.selectedModel={id:n,name:n,isCustom:!0},e.model=n,e.isCustomModel=!0,await this.plugin.saveSettings();let l=this.customModelContainer.querySelector("input");l&&(l.value=n)}}}async hideCustomModelInput(){this.customModelContainer&&this.customModelContainer.removeClass("visible")}};var WA=require("obsidian");var Gt=[{id:"claude-3-opus-20240229",name:"Claude 3 Opus"},{id:"claude-3-sonnet-20240229",name:"Claude 3 Sonnet"},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku"},{id:"claude-2",name:"Claude 2"},{id:"claude-instant-1",name:"Claude Instant"}],er=class extends KA{constructor(e,s){super(e,s);this.modelSelectEl=null;this.customModelContainer=null;this.modelState=this.initializeModelState()}initializeModelState(){this.plugin.settings.ai.anthropic||(this.plugin.settings.ai.anthropic={apiKey:"",model:Gt[0].id,apiAddress:"",isCustomModel:!1,lastCustomModel:""});let e=this.plugin.settings.ai.anthropic,s;if(e.isCustomModel)s={id:e.model,name:e.model,isCustom:!0};else{let n=Gt.find(l=>l.id===e.model);s=n||Gt[0],n||(e.model=s.id)}return{selectedModel:s,apiKey:e.apiKey||""}}async saveModelState(){this.plugin.settings.ai.anthropic||(this.plugin.settings.ai.anthropic={});let e=this.plugin.settings.ai.anthropic,s=this.modelState.selectedModel;e.model=s.id,e.isCustomModel=!!s.isCustom,e.apiKey=this.modelState.apiKey||"",s.isCustom&&s.id&&(e.lastCustomModel=s.id),await this.plugin.saveSettings()}display(e){let s=e.createEl("div",{cls:"ai-service-settings"});new WA.Setting(s).setName(B("Anthropic Settings")).setHeading(),new WA.Setting(s).setName(B("API Key")).setDesc(B("Enter your Anthropic API Key.")).addText(w=>w.setPlaceholder("sk-ant-...").setValue(this.modelState.apiKey).onChange(async p=>{this.modelState.apiKey=p,await this.saveModelState()})).addButton(w=>w.setButtonText(B("Check")).onClick(async()=>{var p;try{let v=this.modelState.apiKey;if(!v){new WA.Notice(B("Please enter an API Key first"));return}w.setDisabled(!0),w.setButtonText(B("Checking..."));let y=((p=this.plugin.settings.ai.anthropic)==null?void 0:p.apiAddress)||"https://api.anthropic.com",H=this.modelState.selectedModel.id;await new it(v,y,H).testConnection()?new WA.Notice(B("API Key is valid!")):new WA.Notice(B("Failed to validate API Key. Please check your key and try again."))}catch(v){console.error("Anthropic API validation error:",v),new WA.Notice(B("Failed to validate API Key. Please check your key and try again."))}finally{w.setDisabled(!1),w.setButtonText(B("Check"))}}));let n=new WA.Setting(s).setName(B("Model")).setDesc(B("Select a model or use a custom one")).addDropdown(w=>{Gt.forEach(v=>{w.addOption(v.id,v.name)}),w.addOption("custom",B("Custom Model"));let p=this.modelState.selectedModel.isCustom?"custom":this.modelState.selectedModel.id;return w.setValue(p),this.modelSelectEl=w.selectEl,w.onChange(async v=>{if(v==="custom")await this.showCustomModelInput();else{let y=Gt.find(H=>H.id===v);if(y){if(this.modelState.selectedModel.isCustom){let H=this.plugin.settings.ai.anthropic;H.lastCustomModel=this.modelState.selectedModel.id,await this.plugin.saveSettings()}this.modelState.selectedModel=y,await this.saveModelState(),await this.hideCustomModelInput()}}}),w});this.customModelContainer=n.settingEl.createDiv("custom-model-container"),this.customModelContainer.addClass("custom-model-container");let l=n.settingEl.querySelector(".setting-item-control");l&&(l.addClass("openai-dropdown-container"),l.insertBefore(this.customModelContainer,l.firstChild));let d=new WA.Setting(this.customModelContainer).addText(w=>w.setPlaceholder("model-id").setValue(this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:"").onChange(async p=>{let v=p.trim();if(v){if(!/^[a-zA-Z0-9-_.]+$/.test(v)){new WA.Notice(B("Model ID can only contain letters, numbers, underscores, dots and hyphens")),w.setValue(this.modelState.selectedModel.id);return}this.modelState.selectedModel={id:v,name:v,isCustom:!0},await this.saveModelState()}})).settingEl;d.addClass("openai-setting-no-border");let u=d.querySelector(".setting-item-control");u&&u.addClass("openai-setting-no-margin"),this.modelState.selectedModel.isCustom&&this.showCustomModelInput(),new WA.Setting(s).setName(B("Custom API Address")).setDesc(B("If using a custom API proxy, please enter the full API address")).addText(w=>{var p;return w.setPlaceholder("https://api.anthropic.com").setValue(((p=this.plugin.settings.ai.anthropic)==null?void 0:p.apiAddress)||"").onChange(async v=>{this.plugin.settings.ai.anthropic||(this.plugin.settings.ai.anthropic={}),this.plugin.settings.ai.anthropic.apiAddress=v,await this.plugin.saveSettings()})})}async showCustomModelInput(){if(this.customModelContainer&&this.modelSelectEl){this.customModelContainer.addClass("visible"),this.modelSelectEl.value="custom";let e=this.plugin.settings.ai.anthropic;if(!this.modelState.selectedModel.isCustom){let n=e.lastCustomModel||"";this.modelState.selectedModel={id:n,name:n,isCustom:!0},e.model=n,e.isCustomModel=!0,await this.plugin.saveSettings();let l=this.customModelContainer.querySelector("input");l&&(l.value=n)}}}async hideCustomModelInput(){this.customModelContainer&&this.customModelContainer.removeClass("visible")}};var IA=require("obsidian");var tr=class extends KA{constructor(e,s){super(e,s);this.modelSelectEl=null;this.customModelContainer=null;this.modelState=this.initializeModelState()}initializeModelState(){this.plugin.settings.ai.deepseek||(this.plugin.settings.ai.deepseek={apiKey:"",model:At[0].id,apiAddress:"",isCustomModel:!1,lastCustomModel:""});let e=this.plugin.settings.ai.deepseek,s;if(e.isCustomModel)s={id:e.model,name:e.model,isCustom:!0};else{let n=At.find(l=>l.id===e.model);s=n||At[0],n||(e.model=s.id)}return{selectedModel:s,apiKey:e.apiKey||""}}async saveModelState(){this.plugin.settings.ai.deepseek||(this.plugin.settings.ai.deepseek={});let e=this.plugin.settings.ai.deepseek,s=this.modelState.selectedModel;e.model=s.id,e.isCustomModel=!!s.isCustom,e.apiKey=this.modelState.apiKey||"",e.apiAddress=e.apiAddress||"",s.isCustom&&s.id&&(e.lastCustomModel=s.id),await this.plugin.saveSettings()}async validateApiKey(e){var s;try{let n="https://api.deepseek.com",l=(s=this.plugin.settings.ai.deepseek)==null?void 0:s.apiAddress,h=l&&l.trim()?l:n,d=this.modelState.selectedModel.id,u=`${h}/models/${d}`,w=await(0,IA.requestUrl)({url:u,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(!w.status||w.status<200||w.status>=300){if(this.modelState.selectedModel.isCustom)return new IA.Notice(B("\u81EA\u5B9A\u4E49\u6A21\u578B\u4E0D\u53EF\u7528\uFF0C\u8BF7\u68C0\u67E5\u6A21\u578B ID \u548C API \u5730\u5740")),!1;if(d!=="deepseek-chat"){let y=`${h}/models/deepseek-chat`,H=await(0,IA.requestUrl)({url:y,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});if(H.status&&H.status>=200&&H.status<300)return new IA.Notice(B("\u5F53\u524D\u9009\u62E9\u7684\u6A21\u578B\u4E0D\u53EF\u7528\uFF0C\u4F46 API Key \u662F\u6709\u6548\u7684")),!1}return new IA.Notice(B("Failed to validate API Key. Please check your key and try again.")),!1}let p=w.json,v=!!(p&&p.id);return v&&new IA.Notice(B("API Key and the current model are both available!")),v}catch(n){return new IA.Notice(B("Failed to validate API Key. Please check your key and try again.")),!1}}display(e){let s=e.createEl("div",{cls:"ai-service-settings"});new IA.Setting(s).setName(B("Deepseek Settings")).setHeading(),new IA.Setting(s).setName(B("API Key")).setDesc(B("Enter your Deepseek API Key")).addText(h=>h.setPlaceholder("dsk-...").setValue(this.modelState.apiKey).onChange(async d=>{this.modelState.apiKey=d,await this.saveModelState()})).addButton(h=>h.setButtonText(B("Check")).onClick(async()=>{if(!this.modelState.apiKey){new IA.Notice(B("Please enter an API Key first"));return}h.setDisabled(!0),h.setButtonText(B("Checking..."));try{await this.validateApiKey(this.modelState.apiKey)}finally{h.setDisabled(!1),h.setButtonText(B("Check"))}}));let n=new IA.Setting(s).setName(B("Model")).setDesc(B("Select a model or use a custom one")).addDropdown(h=>{At.forEach(u=>{h.addOption(u.id,u.name)}),h.addOption("custom",B("Custom Model"));let d=this.modelState.selectedModel.isCustom?"custom":this.modelState.selectedModel.id;return h.setValue(d),this.modelSelectEl=h.selectEl,h.onChange(async u=>{if(u==="custom")await this.showCustomModelInput();else{let w=At.find(p=>p.id===u);if(w){if(this.modelState.selectedModel.isCustom){let p=this.plugin.settings.ai.deepseek;p.lastCustomModel=this.modelState.selectedModel.id,await this.plugin.saveSettings()}this.modelState.selectedModel=w,await this.saveModelState(),await this.hideCustomModelInput()}}}),h});this.customModelContainer=n.settingEl.createDiv("custom-model-container"),this.customModelContainer.addClass("custom-model-container");let l=n.settingEl.querySelector(".setting-item-control");l&&(l.addClass("openai-dropdown-container"),l.insertBefore(this.customModelContainer,l.firstChild)),this.modelState.selectedModel.isCustom&&this.showCustomModelInput(),new IA.Setting(s).setName(B("Custom API Address")).setDesc(B("If using a custom API proxy, enter the full API address")).addText(h=>{var d;return h.setPlaceholder("https://api.deepseek.com/v1").setValue(((d=this.plugin.settings.ai.deepseek)==null?void 0:d.apiAddress)||"").onChange(async u=>{this.plugin.settings.ai.deepseek||(this.plugin.settings.ai.deepseek={}),this.plugin.settings.ai.deepseek.apiAddress=u,await this.plugin.saveSettings()})})}async showCustomModelInput(){if(!this.customModelContainer)return;this.customModelContainer.addClass("visible"),this.customModelContainer.empty();let e=document.createElement("input");e.type="text",e.className="custom-model-input",e.placeholder="model-id",e.value=this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:"",e.addEventListener("input",async()=>{let s=e.value.trim();if(s){if(!/^[a-zA-Z0-9-_.]+$/.test(s)){new IA.Notice(B("\u6A21\u578B ID \u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u70B9\u548C\u77ED\u6760")),e.value=this.modelState.selectedModel.id;return}this.modelState.selectedModel={id:s,name:s,isCustom:!0},await this.saveModelState()}}),this.customModelContainer.appendChild(e)}hideCustomModelInput(){this.customModelContainer&&(this.customModelContainer.removeClass("visible"),this.customModelContainer.empty())}};var mA=require("obsidian");var ir=class extends KA{constructor(e,s){super(e,s);this.modelSelectEl=null;this.customModelContainer=null;this.modelState=this.initializeModelState()}initializeModelState(){this.plugin.settings.ai.gemini||(this.plugin.settings.ai.gemini={apiKey:"",model:Fe[0].id,baseUrl:"",isCustomModel:!1,lastCustomModel:""});let e=this.plugin.settings.ai.gemini,s;if(e.isCustomModel)s={id:e.model,name:e.model,isCustom:!0};else{let n=Fe.find(l=>l.id===e.model);s=n||Fe[0],n||(e.model=s.id)}return{selectedModel:s,apiKey:e.apiKey||""}}async saveModelState(){this.plugin.settings.ai.gemini||(this.plugin.settings.ai.gemini={});let e=this.plugin.settings.ai.gemini,s=this.modelState.selectedModel;e.model=s.id,e.isCustomModel=!!s.isCustom,e.apiKey=this.modelState.apiKey||"",e.baseUrl=e.baseUrl||"",s.isCustom&&s.id&&(e.lastCustomModel=s.id),await this.plugin.saveSettings()}async validateApiKey(e){var s;try{let n="https://generativelanguage.googleapis.com",l=(s=this.plugin.settings.ai.gemini)==null?void 0:s.baseUrl,h=l&&l.trim()?l:n,d=this.modelState.selectedModel.id,u=`${h}/v1/models/${d}?key=${e}`,w=await(0,mA.requestUrl)({url:u});if(!w.status||w.status<200||w.status>=300){let y=w.json||null;if(d.includes("-exp-")){let E=`${h}/v1/models/gemini-pro?key=${e}`,F=await(0,mA.requestUrl)({url:E});throw F.status&&F.status>=200&&F.status<300?(new mA.Notice(B("API Key \u6709\u6548\uFF0C\u4F46\u65E0\u6CD5\u8BBF\u95EE\u5B9E\u9A8C\u6027\u6A21\u578B\u3002\u8BF7\u786E\u4FDD\u4F60\u6709\u6743\u9650\u8BBF\u95EE\u6B64\u6A21\u578B\uFF0C\u6216\u7B49\u5F85\u6A21\u578B\u6B63\u5F0F\u53D1\u5E03\u3002")),new Error(`Experimental model not accessible: ${d}`)):(new mA.Notice(B("API Key \u65E0\u6548\u3002\u8BF7\u68C0\u67E5\u4F60\u7684 API Key \u662F\u5426\u6B63\u786E\u3002")),new Error("Invalid API Key"))}if(this.modelState.selectedModel.isCustom)throw new mA.Notice(B("\u81EA\u5B9A\u4E49\u6A21\u578B\u4E0D\u53EF\u7528\u3002\u8BF7\u68C0\u67E5\u6A21\u578B ID \u662F\u5426\u6B63\u786E\uFF0C\u4EE5\u53CA\u4F60\u662F\u5426\u6709\u6743\u9650\u8BBF\u95EE\u6B64\u6A21\u578B\u3002")),new Error(`Custom model not available: ${d}`);if(d!=="gemini-pro"){let E=`${h}/v1/models/gemini-pro?key=${e}`,F=await(0,mA.requestUrl)({url:E});if(F.status&&F.status>=200&&F.status<300)throw new mA.Notice(B("API Key \u6709\u6548\uFF0C\u4F46\u5F53\u524D\u9009\u62E9\u7684\u6A21\u578B\u4E0D\u53EF\u7528\u3002\u53EF\u80FD\u662F\u6A21\u578B\u672A\u53D1\u5E03\u6216\u4F60\u6CA1\u6709\u8BBF\u95EE\u6743\u9650\u3002")),new Error(`Selected model not available: ${d}`)}throw new mA.Notice(B("API Key is invalid or there is a server error. Please check if your API Key is correct.")),new Error(`HTTP error! status: ${w.status}`)}let p=await w.json(),v=!!(p&&p.name);return v&&new mA.Notice(B("API Key and the current model are both available\uFF01")),v}catch(n){return!1}}display(e){let s=e.createEl("div",{cls:"ai-service-settings"});new mA.Setting(s).setName(B("Gemini Settings")).setHeading(),new mA.Setting(s).setName(B("API Key")).setDesc(B("Enter your Gemini API Key")).addText(w=>w.setPlaceholder("Enter your API key").setValue(this.modelState.apiKey).onChange(async p=>{this.modelState.apiKey=p,await this.saveModelState()})).addButton(w=>w.setButtonText(B("Check")).onClick(async()=>{if(!this.modelState.apiKey){new mA.Notice(B("Please enter an API Key first"));return}w.setDisabled(!0),w.setButtonText(B("Checking..."));try{await this.validateApiKey(this.modelState.apiKey)}finally{w.setDisabled(!1),w.setButtonText(B("Check"))}}));let n=new mA.Setting(s).setName(B("Model")).setDesc(B("Select a model or use a custom one")).addDropdown(w=>{Fe.forEach(v=>{w.addOption(v.id,v.name)}),w.addOption("custom",B("Custom Model"));let p=this.modelState.selectedModel.isCustom?"custom":this.modelState.selectedModel.id;return w.setValue(p),this.modelSelectEl=w.selectEl,w.onChange(async v=>{if(v==="custom")await this.showCustomModelInput();else{let y=Fe.find(H=>H.id===v);if(y){if(this.modelState.selectedModel.isCustom){let H=this.plugin.settings.ai.gemini;H.lastCustomModel=this.modelState.selectedModel.id,await this.plugin.saveSettings()}this.modelState.selectedModel=y,await this.saveModelState(),await this.hideCustomModelInput()}}}),w});this.customModelContainer=n.settingEl.createDiv("custom-model-container"),this.customModelContainer.addClass("custom-model-container");let l=n.settingEl.querySelector(".setting-item-control");l&&(l.addClass("openai-dropdown-container"),l.insertBefore(this.customModelContainer,l.firstChild));let d=new mA.Setting(this.customModelContainer).addText(w=>w.setPlaceholder("model-id").setValue(this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:"").onChange(async p=>{let v=p.trim();if(v){if(!/^[a-zA-Z0-9-_.]+$/.test(v)){new mA.Notice(B("\u6A21\u578B ID \u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u70B9\u548C\u77ED\u6760")),w.setValue(this.modelState.selectedModel.id);return}this.modelState.selectedModel={id:v,name:v,isCustom:!0},await this.saveModelState()}})).settingEl;d.addClass("openai-setting-no-border");let u=d.querySelector(".setting-item-control");u&&u.addClass("openai-setting-no-margin"),this.modelState.selectedModel.isCustom&&this.showCustomModelInput(),new mA.Setting(s).setName(B("Custom API Address")).setDesc(B("Enter your custom API endpoint")).addText(w=>{var y;let p="https://generativelanguage.googleapis.com",v=(y=this.plugin.settings.ai.gemini)==null?void 0:y.baseUrl;return w.setPlaceholder(p).setValue(v||"").onChange(async H=>{this.plugin.settings.ai.gemini||(this.plugin.settings.ai.gemini={}),this.plugin.settings.ai.gemini.baseUrl=H||"",await this.plugin.saveSettings()}),w})}async showCustomModelInput(){if(this.customModelContainer&&this.modelSelectEl){this.customModelContainer.addClass("visible"),this.modelSelectEl.value="custom";let e=this.plugin.settings.ai.gemini;if(!this.modelState.selectedModel.isCustom){let n=e.lastCustomModel||"";this.modelState.selectedModel={id:n,name:n,isCustom:!0},e.model=n,e.isCustomModel=!0,await this.plugin.saveSettings();let l=this.customModelContainer.querySelector("input");l&&(l.value=n)}}}async hideCustomModelInput(){if(this.customModelContainer){this.customModelContainer.removeClass("visible");let e=this.plugin.settings.ai.gemini,s=this.modelState.selectedModel;if(s.isCustom&&s.id){e.lastCustomModel=s.id;let n=this.customModelContainer.querySelector("input");n&&(n.value=s.id)}e.isCustomModel=!1,await this.plugin.saveSettings()}}};var Ie=require("obsidian");var rr=class extends KA{async display(a){var h,d,u;let e=a.createEl("div",{cls:"ai-service-settings"});new Ie.Setting(e).setName(B("Ollama Settings")).setHeading();let s="http://localhost:11434";(h=this.plugin.settings.ai.ollama)!=null&&h.host||(this.plugin.settings.ai.ollama||(this.plugin.settings.ai.ollama={}),this.plugin.settings.ai.ollama.host=s,await this.plugin.saveSettings());let n=new Ie.Setting(e).setName(B("Server Address")).setDesc(B("Ollama server address (default: http://localhost:11434)")).addText(w=>{var p;return w.setPlaceholder(s).setValue(((p=this.plugin.settings.ai.ollama)==null?void 0:p.host)||s).onChange(async v=>{this.plugin.settings.ai.ollama||(this.plugin.settings.ai.ollama={}),this.plugin.settings.ai.ollama.host=v||s,await this.plugin.saveSettings()}),w}),l;n.addButton(w=>(l=w.buttonEl,w.setButtonText(B("Check")).onClick(async()=>{var H;let p=((H=this.plugin.settings.ai.ollama)==null?void 0:H.host)||s;l.disabled=!0;let v=l.textContent;l.textContent=B("Checking...");let y=new tt(p);try{let E=await y.listModels();l.disabled=!1,l.textContent=v,E&&E.length>0?(this.plugin.settings.ai.ollama.availableModels=E,await this.plugin.saveSettings(),this.displayOllamaModelDropdown(e,E),new Ie.Notice(B("Successfully connected to Ollama service"))):new Ie.Notice(B("No models found. Please download models using ollama"))}catch(E){l.disabled=!1,l.textContent=v,new Ie.Notice(B("Failed to connect to Ollama service. Please check the server address."))}}))),(u=(d=this.plugin.settings.ai.ollama)==null?void 0:d.availableModels)!=null&&u.length&&this.displayOllamaModelDropdown(e,this.plugin.settings.ai.ollama.availableModels)}displayOllamaModelDropdown(a,e){let s=a.querySelector(".model-setting");s&&s.remove(),new Ie.Setting(a).setName(B("Model")).setDesc(B("Select the Ollama model to use")).addDropdown(l=>{var w;let h=Object.fromEntries(e.map(p=>[p,p])),d=(w=this.plugin.settings.ai.ollama)==null?void 0:w.model,u=e.includes(d)?d:e[0];return l.addOptions(h).setValue(u).onChange(async p=>{this.plugin.settings.ai.ollama||(this.plugin.settings.ai.ollama={}),this.plugin.settings.ai.ollama.model=p,await this.plugin.saveSettings()})}).settingEl.addClass("model-setting")}};var YA=require("obsidian");var sr=class extends KA{constructor(e,s){super(e,s);this.modelSelectEl=null;this.customModelContainer=null;this.modelState=this.initializeModelState()}initializeModelState(){this.plugin.settings.ai.siliconflow||(this.plugin.settings.ai.siliconflow={apiKey:"",model:se[0].id,baseUrl:"",isCustomModel:!1,lastCustomModel:""});let e=this.plugin.settings.ai.siliconflow,s;if(e.isCustomModel)s={id:e.model,name:e.model,isCustom:!0};else{let n=se.find(l=>l.id===e.model);s=n||se[0],n||(e.model=s.id)}return{selectedModel:s,apiKey:e.apiKey||""}}async saveModelState(){if(!this.plugin.settings.ai.siliconflow)this.plugin.settings.ai.siliconflow={apiKey:this.modelState.apiKey||"",model:this.modelState.selectedModel.id,baseUrl:"",isCustomModel:!!this.modelState.selectedModel.isCustom,lastCustomModel:this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:void 0};else{let e=this.plugin.settings.ai.siliconflow,s=this.modelState.selectedModel;e.model=s.id,e.isCustomModel=!!s.isCustom,e.apiKey=this.modelState.apiKey||"",s.isCustom&&s.id&&(e.lastCustomModel=s.id)}await this.plugin.saveSettings()}async validateApiKey(e){var s;try{let n="https://api.siliconflow.cn/v1",l=(s=this.plugin.settings.ai.siliconflow)==null?void 0:s.baseUrl,h=l&&l.trim()?l:n,d=this.modelState.selectedModel.id,u=`${h}/chat/completions`,w=await(0,YA.requestUrl)({url:u,method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({model:d,messages:[{role:"user",content:"Hello"}],max_tokens:1})});if(!w.status||w.status<200||w.status>=300){let p=w.json||null;return{isValid:!1,message:B("API Key \u65E0\u6548\u6216\u6A21\u578B\u4E0D\u53EF\u7528\u3002\u8BF7\u68C0\u67E5\u4F60\u7684 API Key \u548C\u6A21\u578B ID \u662F\u5426\u6B63\u786E\u3002")}}return{isValid:!0,message:B("API Key and the current model are both available!")}}catch(n){return{isValid:!1,message:B("API Key \u65E0\u6548\u6216\u670D\u52A1\u5668\u9519\u8BEF\u3002")}}}async showCustomModelInput(){this.customModelContainer&&this.modelSelectEl&&this.customModelContainer.addClass("visible")}async hideCustomModelInput(){this.customModelContainer&&this.modelSelectEl&&this.customModelContainer.removeClass("visible")}display(e){let s=e.createEl("div",{cls:"ai-service-settings"});new YA.Setting(s).setName(B("SiliconFlow service")).setHeading();let n=new YA.Setting(s).setName(B("API key")).setDesc(B("Enter your SiliconFlow API key.")).addText(p=>p.setPlaceholder("sk-...").setValue(this.modelState.apiKey).onChange(async v=>{this.modelState.apiKey=v,await this.saveModelState()})).addButton(p=>p.setButtonText(B("Check")).onClick(async()=>{let v=this.modelState.apiKey;if(!v){new YA.Notice(B("Please input API Key"));return}p.setButtonText(B("Checking...")),p.setDisabled(!0);let y=await this.validateApiKey(v);p.setButtonText(B("Check")),p.setDisabled(!1),y.message&&new YA.Notice(y.message)})),l=new YA.Setting(s).setName(B("Model")).setDesc(B("Select the SiliconFlow model to use")).addDropdown(p=>{se.forEach(y=>{p.addOption(y.id,y.name)}),p.addOption("custom","Custom Model");let v=this.modelState.selectedModel;return p.setValue(v.isCustom?"custom":v.id),this.modelSelectEl=p.selectEl,p.onChange(async y=>{var H;if(y==="custom"){let E=(H=this.plugin.settings.ai.siliconflow)==null?void 0:H.lastCustomModel;this.modelState.selectedModel={id:E||"",name:E||"",isCustom:!0},await this.saveModelState(),await this.showCustomModelInput()}else{let E=se.find(F=>F.id===y);E&&(this.modelState.selectedModel.isCustom&&this.plugin.settings.ai.siliconflow&&(this.plugin.settings.ai.siliconflow.lastCustomModel=this.modelState.selectedModel.id,await this.plugin.saveSettings()),this.modelState.selectedModel=E,await this.saveModelState(),await this.hideCustomModelInput())}}),p});this.customModelContainer=l.settingEl.createDiv("custom-model-container"),this.customModelContainer.addClass("custom-model-container");let h=l.settingEl.querySelector(".setting-item-control");h&&(h.addClass("openai-dropdown-container"),h.insertBefore(this.customModelContainer,h.firstChild));let u=new YA.Setting(this.customModelContainer).addText(p=>p.setPlaceholder("model-id").setValue(this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:"").onChange(async v=>{let y=v.trim();if(y){if(!/^[a-zA-Z0-9-_./]+$/.test(y)){new YA.Notice("\u6A21\u578B ID \u53EA\u80FD\u5305\u542B\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u4E0B\u5212\u7EBF\u3001\u70B9\u3001\u77ED\u6760\u548C\u659C\u6760"),p.setValue(this.modelState.selectedModel.id);return}this.modelState.selectedModel={id:y,name:y,isCustom:!0},await this.saveModelState()}})).settingEl;u.addClass("openai-setting-no-border");let w=u.querySelector(".setting-item-control");w&&w.addClass("openai-setting-no-margin"),this.modelState.selectedModel.isCustom&&this.showCustomModelInput(),new YA.Setting(s).setName(B("Custom API address")).setDesc(B("If using a custom API proxy, please enter the full API address")).addText(p=>{var H;let v="https://api.siliconflow.cn/v1",y=(H=this.plugin.settings.ai.siliconflow)==null?void 0:H.baseUrl;return p.setPlaceholder(v).setValue(y||"").onChange(async E=>{this.plugin.settings.ai.siliconflow?this.plugin.settings.ai.siliconflow.baseUrl=E||"":this.plugin.settings.ai.siliconflow={apiKey:this.modelState.apiKey||"",model:this.modelState.selectedModel.id,baseUrl:E||"",isCustomModel:!!this.modelState.selectedModel.isCustom,lastCustomModel:this.modelState.selectedModel.isCustom?this.modelState.selectedModel.id:void 0},await this.plugin.saveSettings()}),p})}};var lt=require("obsidian"),nr=require("obsidian");var ar=class{constructor(a,e){this.plugin=a,this.containerEl=e}display(){let a=this.containerEl.createEl("div",{cls:"prompt-settings-container"}),e=a.createEl("div",{cls:"prompt-settings-header setting-item-heading"});e.createEl("h4",{text:B("Prompt settings"),cls:"prompt-settings-title"});let s=e.createEl("button",{cls:"prompt-add-btn",attr:{"aria-label":B("Add prompt")}});(0,nr.setIcon)(s,"plus"),s.onclick=()=>{if(a.querySelector(".new-prompt-section"))return;let n=a.querySelector(".prompt-list");n&&this.createNewPromptForm(a,n)},this.displayPromptList(a)}createNewPromptForm(a,e){var w;let s=a.createEl("div",{cls:"new-prompt-section"});(w=e.parentElement)==null||w.insertBefore(s,e);let n=s.createEl("input",{cls:"prompt-name-input",attr:{placeholder:B("Input Prompt Name"),type:"text"}}),l=new lt.TextAreaComponent(s);l.setPlaceholder(B(`Input Prompt Content
|
|
Available parameters:
|
|
{{highlight}} - Current highlighted text
|
|
{{comment}} - Existing comment`)).setValue(""),l.inputEl.addClass("prompt-textarea");let h=s.createEl("div",{cls:"prompt-buttons"}),d=h.createEl("button",{cls:"prompt-save-btn",text:B("Save")});d.onclick=async()=>{var y;let p=n.value,v=l.getValue();if(p&&v){this.plugin.settings.ai.prompts||(this.plugin.settings.ai.prompts={}),this.plugin.settings.ai.prompts[p]=v,await this.plugin.saveSettings(),s.remove(),this.displayPromptList(a),new lt.Notice(B("Prompt added"));let H=(y=this.plugin.app.workspace.getLeavesOfType("comment-view")[0])==null?void 0:y.view;H&&H.updateAIDropdowns()}};let u=h.createEl("button",{cls:"prompt-cancel-btn",text:B("Cancel")});u.onclick=()=>{s.remove()}}displayPromptList(a){let e=a.querySelector(".prompt-list");e&&e.remove();let s=a.createEl("div",{cls:"prompt-list"}),n=this.plugin.settings.ai.prompts||{};for(let[l,h]of Object.entries(n)){let d=s.createEl("div",{cls:"prompt-item"}),u=d.createEl("div",{cls:"prompt-display-mode"}),w=u.createEl("div",{cls:"prompt-info"});w.createEl("div",{cls:"prompt-name",text:l});let p=h.replace(/\n/g," ");w.createEl("div",{cls:"prompt-content-preview",text:p});let y=u.createEl("div",{cls:"prompt-buttons"}).createEl("button",{cls:"prompt-edit-btn",attr:{"aria-label":B("Edit")}});(0,nr.setIcon)(y,"square-pen");let H=d.createEl("div",{cls:"prompt-edit-mode hi-note-hidden"}),E=H.createEl("input",{cls:"prompt-name-input",attr:{value:l,type:"text"}}),F=new lt.TextAreaComponent(H);F.setValue(h),F.inputEl.classList.add("prompt-content-input"),F.inputEl.addClass("prompt-textarea");let L=H.createEl("div",{cls:"prompt-edit-buttons"}),x=L.createEl("button",{cls:"prompt-save-btn",text:B("Save")}),S=L.createEl("button",{cls:"prompt-cancel-btn",text:B("Cancel")}),V=L.createEl("button",{cls:"prompt-delete-btn",attr:{"aria-label":B("Delete")}});(0,nr.setIcon)(V,"trash-2"),y.onclick=()=>{u.addClass("hi-note-hidden"),H.removeClass("hi-note-hidden")},V.onclick=async()=>{var G;delete this.plugin.settings.ai.prompts[l],await this.plugin.saveSettings(),d.remove();let k=(G=this.plugin.app.workspace.getLeavesOfType("comment-view")[0])==null?void 0:G.view;k&&k.updateAIDropdowns()},x.onclick=async()=>{var J;let k=E.value,G=F.getValue();if(k&&G){k!==l&&delete this.plugin.settings.ai.prompts[l],this.plugin.settings.ai.prompts[k]=G,await this.plugin.saveSettings(),this.displayPromptList(a),new lt.Notice(B("Prompt updated"));let z=(J=this.plugin.app.workspace.getLeavesOfType("comment-view")[0])==null?void 0:J.view;z&&z.updateAIDropdowns()}},S.onclick=()=>{u.removeClass("hi-note-hidden"),H.addClass("hi-note-hidden")}}}};var or=class{constructor(a,e){this.plugin=a,this.containerEl=e}display(){switch(new Ma.Setting(this.containerEl).setName("AI service").setDesc(B("Select the AI service provider")).addDropdown(a=>{let e={openai:"OpenAI",gemini:"Gemini",anthropic:"Anthropic",deepseek:"Deepseek",siliconflow:"SiliconFlow",ollama:"Ollama (Local)"};return a.addOptions(e).setValue(this.plugin.settings.ai.provider).onChange(async s=>{this.plugin.settings.ai.provider=s,await this.plugin.saveSettings(),this.containerEl.empty(),this.display()})}),this.plugin.settings.ai.provider){case"openai":new Ar(this.plugin,this.containerEl).display(this.containerEl);break;case"gemini":new ir(this.plugin,this.containerEl).display(this.containerEl);break;case"anthropic":new er(this.plugin,this.containerEl).display(this.containerEl);break;case"ollama":new rr(this.plugin,this.containerEl).display(this.containerEl);break;case"deepseek":new tr(this.plugin,this.containerEl).display(this.containerEl);break;case"siliconflow":new sr(this.plugin,this.containerEl).display(this.containerEl);break}new ar(this.plugin,this.containerEl).display()}};var RA=require("obsidian");var lr=class{constructor(a,e){this.plugin=a,this.containerEl=e,this.fsrsService=a.fsrsManager.fsrsService}display(){let a=this.containerEl.createEl("div",{cls:"flashcard-settings-container"});new RA.Setting(a).setName(B("Flashcard learning")).setHeading(),new RA.Setting(a).setName(B("New cards per day")).setDesc(B("Maximum number of new cards to learn each day")).addSlider(e=>{var l;let s=this.fsrsService.getParameters();e.setLimits(1,200,1).setValue(s.newCardsPerDay).setDynamicTooltip().onChange(async h=>{let d=this.fsrsService.getParameters();d.newCardsPerDay=h,this.fsrsService.setParameters(d),await this.plugin.saveSettings()});let n=createEl("span",{cls:"slider-value",text:String(s.newCardsPerDay)});(l=e.sliderEl.parentElement)==null||l.appendChild(n),e.sliderEl.addEventListener("input",()=>{n.textContent=String(e.getValue())})}),new RA.Setting(a).setName(B("Reviews per day")).setDesc(B("Maximum number of cards to review each day")).addSlider(e=>{var l;let s=this.fsrsService.getParameters();e.setLimits(10,500,10).setValue(s.reviewsPerDay).setDynamicTooltip().onChange(async h=>{let d=this.fsrsService.getParameters();d.reviewsPerDay=h,this.fsrsService.setParameters(d),await this.plugin.saveSettings()});let n=createEl("span",{cls:"slider-value",text:String(s.reviewsPerDay)});(l=e.sliderEl.parentElement)==null||l.appendChild(n),e.sliderEl.addEventListener("input",()=>{n.textContent=String(e.getValue())})}),new RA.Setting(a).setName(B("Target retention")).setDesc(B("Target memory retention rate (0.8 = 80%)")).addSlider(e=>{var l;let s=this.fsrsService.getParameters();e.setLimits(.7,.95,.01).setValue(s.request_retention).setDynamicTooltip().onChange(async h=>{let d=this.fsrsService.getParameters();d.request_retention=h,this.fsrsService.setParameters(d),await this.plugin.saveSettings()});let n=createEl("span",{cls:"slider-value",text:`${Math.round(s.request_retention*100)}%`});(l=e.sliderEl.parentElement)==null||l.appendChild(n),e.sliderEl.addEventListener("input",()=>{n.textContent=`${Math.round(e.getValue()*100)}%`})}),new RA.Setting(a).setName(B("Maximum interval")).setDesc(B("Maximum interval in days between reviews")).addSlider(e=>{var l;let s=this.fsrsService.getParameters();e.setLimits(365,3650,365).setValue(s.maximum_interval).setDynamicTooltip().onChange(async h=>{let d=this.fsrsService.getParameters();d.maximum_interval=h,this.fsrsService.setParameters(d),await this.plugin.saveSettings()});let n=createEl("span",{cls:"slider-value",text:`${s.maximum_interval} ${B("days")}`});(l=e.sliderEl.parentElement)==null||l.appendChild(n),e.sliderEl.addEventListener("input",()=>{n.textContent=`${e.getValue()} ${B("days")}`})}),new RA.Setting(a).setName(B("Reset daily stats")).setDesc(B("Reset today's learning statistics")).addButton(e=>e.setButtonText(B("Reset")).onClick(async()=>{let s=new Date;s.setHours(0,0,0,0);let n=this.plugin.fsrsManager.storage.dailyStats,l=n.findIndex(h=>h.date===s.getTime());l>=0?(n.splice(l,1),await this.plugin.fsrsManager.saveStorage(),new RA.Notice(B("Daily statistics have been reset"))):new RA.Notice(B("No statistics to reset for today"))})),new RA.Setting(a).setName(B("Advanced")).setHeading(),a.createEl("p",{text:B("These settings control the FSRS algorithm parameters. Only change them if you understand the algorithm."),cls:"setting-item-description"}),new RA.Setting(a).setName(B("Reset algorithm parameters")).setDesc(B("Reset the FSRS algorithm parameters to default values")).addButton(e=>e.setButtonText(B("Reset to default")).onClick(async()=>{this.fsrsService.resetParameters(),await this.plugin.saveSettings(),this.display(),new RA.Notice(B("FSRS parameters have been reset to default values"))}))}};var cr=class extends La.PluginSettingTab{constructor(a,e){super(a,e),this.plugin=e,this.DEFAULT_SETTINGS=e.DEFAULT_SETTINGS,this.licenseManager=new at(this.plugin)}async display(){let{containerEl:a}=this;a.empty();let e=await this.licenseManager.isActivated(),s=a.createEl("div",{cls:"setting-tabs"}),n=a.createEl("div",{cls:"setting-tab-content"}),l=s.createEl("div",{text:B("General"),cls:"setting-tab-btn active",attr:{role:"button",tabindex:"0"}}),h=s.createEl("div",{text:B("AI service"),cls:"setting-tab-btn",attr:{role:"button",tabindex:"0"}}),d=null;e&&(d=s.createEl("div",{text:"HiCard",cls:"setting-tab-btn",attr:{role:"button",tabindex:"0"}}));let u=n.createEl("div",{cls:"setting-tab-pane active"}),w=n.createEl("div",{cls:"setting-tab-pane"}),p=null;e&&(p=n.createEl("div",{cls:"setting-tab-pane"}));let v=(y,H)=>{s.findAll(".setting-tab-btn").forEach(E=>E.removeClass("active")),n.findAll(".setting-tab-pane").forEach(E=>E.removeClass("active")),y.addClass("active"),H.addClass("active")};l.onclick=()=>v(l,u),h.onclick=()=>v(h,w),d&&p&&(d.onclick=()=>v(d,p)),new zi(this.plugin,u).display(),new or(this.plugin,w).display(),p&&new lr(this.plugin,p).display()}};var Ka=fa(ms());var hr=class{constructor(a={}){this.params={...as,...a}}calculateRetrievability(a,e){return Math.pow(1+.2345679012345679*(a/e),-.5)}calculateNextInterval(a,e){let l=e/.2345679012345679*(Math.pow(a,1/-.5)-1);return Math.min(Math.max(1,l),this.params.maximum_interval)}calculateInitialDifficulty(a){let e=this.params.w;return e[3]-Math.exp(e[4]*(a-1))+1}updateDifficulty(a,e){let s=this.params.w,n=-s[5]*(e-3),l=a+n*(10-a)/9,h=this.calculateInitialDifficulty(HA.GOOD);return l=s[6]*h+(1-s[6])*l,Math.min(Math.max(1,l),10)}updateStability(a,e,s){let n=this.params.w,l=0;s===HA.AGAIN?l=n[7]:s===HA.HARD?l=n[8]:s===HA.GOOD?l=n[9]+n[10]*(1-e):s===HA.EASY&&(l=n[11]+n[12]*(1-e));let h=a*l;return Math.max(.1,h)}initializeCard(a,e,s){let n=Date.now();return{id:`card-${n}-${Math.random().toString(36).substr(2,9)}`,difficulty:5,stability:.1,retrievability:1,lastReview:0,nextReview:n,reviews:0,lapses:0,reviewHistory:[],text:a,answer:e,filePath:s,createdAt:n}}reviewCard(a,e){let s=Date.now(),n=a.lastReview===0?0:(s-a.lastReview)/(24*60*60*1e3),l=(a.reviews||0)+1,h=(a.lapses||0)+(e===HA.AGAIN?1:0);if(a.lastReview===0){let v=this.calculateInitialDifficulty(e),y=e===HA.AGAIN?.1:e===HA.HARD?.5:e===HA.GOOD?2:4;return{...a,difficulty:v,stability:y,retrievability:1,lastReview:s,nextReview:s+y*24*60*60*1e3,reviews:l,lapses:h,reviewHistory:[...a.reviewHistory,{timestamp:s,rating:e,elapsed:n}]}}let d=this.calculateRetrievability(n,a.stability),u=this.updateDifficulty(a.difficulty,e),w=this.updateStability(a.stability,d,e),p=this.calculateNextInterval(this.params.request_retention,w);return{...a,difficulty:u,stability:w,retrievability:d,lastReview:s,nextReview:s+p*24*60*60*1e3,reviews:l,lapses:h,reviewHistory:[...a.reviewHistory,{timestamp:s,rating:e,elapsed:n}]}}isDue(a){return Date.now()>=a.nextReview}getReviewableCards(a){return a.filter(e=>this.isDue(e)).sort((e,s)=>e.nextReview-s.nextReview)}getParameters(){return{...this.params}}setParameters(a){this.params={...this.params,...a}}resetParameters(){this.params={...as}}};var Ta=require("obsidian"),dr=class{constructor(a){this.plugin=a,this.fsrsService=new hr,this.storage={version:"1.0",cards:{},globalStats:{totalReviews:0,averageRetention:1,streakDays:0,lastReviewDate:0},cardGroups:[],uiState:{currentGroupName:"All Cards",currentIndex:0,isFlipped:!1,completionMessage:null,groupCompletionMessages:{},groupProgress:{}},dailyStats:[]},this.saveStorageDebounced=(0,Ta.debounce)(this.saveStorage.bind(this),1e3,!0),this.loadStorage().then(e=>{this.storage=e}).catch(e=>{})}async loadStorage(){let a={version:"1.0",cards:{},globalStats:{totalReviews:0,averageRetention:1,streakDays:0,lastReviewDate:0},cardGroups:[],uiState:{currentGroupName:"All Cards",currentIndex:0,isFlipped:!1,completionMessage:null,groupCompletionMessages:{},groupProgress:{}},dailyStats:[]};try{let e=await this.plugin.loadData();if(!(e!=null&&e.fsrs))return a;let s=Array.isArray(e.fsrs.cardGroups)?e.fsrs.cardGroups:[];return{...a,...e.fsrs,cardGroups:s}}catch(e){return a}}async saveStorage(){try{let a=await this.plugin.loadData()||{};Array.isArray(this.storage.cardGroups)||(this.storage.cardGroups=[]);let e={...a,fsrs:this.storage};await this.plugin.saveData(e);let s=await this.plugin.loadData()}catch(a){throw a}}updateGlobalStats(a,e){let s=this.storage.globalStats,n=Date.now(),l=new Date(n).setHours(0,0,0,0);if(s.totalReviews++,s.averageRetention=(s.averageRetention*(s.totalReviews-1)+e)/s.totalReviews,s.lastReviewDate===0)s.streakDays=1;else{let h=new Date(s.lastReviewDate).setHours(0,0,0,0),d=(l-h)/(24*60*60*1e3);d===1?s.streakDays++:d>1&&(s.streakDays=1)}s.lastReviewDate=n}addCard(a,e,s){let n=this.fsrsService.initializeCard(a,e,s);return this.storage.cards[n.id]=n,this.saveStorageDebounced(),this.plugin.eventManager.emitFlashcardChanged(),n}updateCardContent(a,e,s){let n=this.getCardsByFile(s);for(let l of n)(l.text===a||l.answer===e)&&(this.storage.cards[l.id]={...l,text:a,answer:e},this.saveStorageDebounced(),this.plugin.eventManager.emitFlashcardChanged())}deleteCardsByContent(a,e,s){let n=this.getCardsByFile(a),l=!1;for(let h of n)(!e&&!s||e&&h.text===e||s&&h.answer===s)&&(delete this.storage.cards[h.id],l=!0);l&&(this.saveStorageDebounced(),this.plugin.eventManager.emitFlashcardChanged())}rateCard(a,e){let s=this.storage.cards[a];if(!s)return;let n=s.reviews===0,l=this.fsrsService.reviewCard(s,e);this.storage.cards[a]=l,this.storage.globalStats.totalReviews++,this.updateTodayStats(n);let h=new Date;h.setHours(0,0,0,0);let d=h.getTime();this.storage.globalStats.lastReviewDate===0?(this.storage.globalStats.lastReviewDate=d,this.storage.globalStats.streakDays=1):this.storage.globalStats.lastReviewDate===d||(this.storage.globalStats.lastReviewDate===d-864e5?(this.storage.globalStats.lastReviewDate=d,this.storage.globalStats.streakDays++):this.storage.globalStats.lastReviewDate<d&&(this.storage.globalStats.lastReviewDate=d,this.storage.globalStats.streakDays=1)),this.saveStorageDebounced()}reviewCard(a,e){let s=this.storage.cards[a];if(!s)return null;let n=this.fsrsService.reviewCard(s,e);return this.storage.cards[a]=n,this.updateGlobalStats(e,n.retrievability),this.saveStorageDebounced(),this.plugin.eventManager.emitFlashcardChanged(),n}getDueCards(){let a=this.fsrsService.getReviewableCards(Object.values(this.storage.cards)),e=this.getRemainingReviewsToday();return e<=0?[]:a.slice(0,e)}getNewCards(){let a=Object.values(this.storage.cards).filter(s=>s.reviews===0),e=this.getRemainingNewCardsToday();return e<=0?[]:a.slice(0,e)}getLatestCards(){let a=Object.values(this.storage.cards).reduce((e,s)=>((!e[s.text]||e[s.text].id<s.id)&&(e[s.text]=s),e),{});return Object.values(a)}getProgress(){let a=this.getLatestCards(),e=Date.now();return{due:a.filter(s=>s.nextReview<=e).length,newCards:a.filter(s=>s.lastReview===0).length,learned:a.filter(s=>s.lastReview>0).length,retention:this.storage.globalStats.averageRetention}}getStats(){return{...this.storage.globalStats}}getUIState(){return{...this.storage.uiState}}updateUIState(a){this.storage.uiState={...this.storage.uiState,...a},this.saveStorageDebounced()}deleteCard(a){return this.storage.cards[a]?(delete this.storage.cards[a],this.saveStorageDebounced(),this.plugin.eventManager.emitFlashcardChanged(),!0):!1}getCardsByFile(a){return Object.values(this.storage.cards).filter(s=>s.filePath===a)}exportData(){return JSON.parse(JSON.stringify(this.storage))}importData(a){try{if(typeof a.version!="string"||!a.cards||!a.globalStats)throw new Error("Invalid FSRS data structure");return this.storage=a,this.saveStorage(),!0}catch(e){return!1}}async reset(){try{this.storage=await this.loadStorage(),await this.saveStorage()}catch(a){throw a}}getCardGroups(){return Array.isArray(this.storage.cardGroups)||(this.storage.cardGroups=[],this.saveStorageDebounced()),this.storage.cardGroups}generateUUID(){let a=Date.now().toString(36),e=Math.random().toString(36).substring(2,15);return`${a}-${e}`}async createCardGroup(a){this.storage.cardGroups||(this.storage.cardGroups=[]);let e=this.fsrsService.getParameters(),s={...a,id:this.generateUUID(),settings:a.settings||{useGlobalSettings:!0,newCardsPerDay:e.newCardsPerDay,reviewsPerDay:e.reviewsPerDay}};this.storage.cardGroups.push(s);try{return await this.saveStorage(),s}catch(n){throw this.storage.cardGroups.pop(),n}}async updateCardGroup(a,e){if(!this.storage.cardGroups)return!1;let s=this.storage.cardGroups.findIndex(n=>n.id===a);if(s===-1)return!1;this.storage.cardGroups[s]={...this.storage.cardGroups[s],...e,id:a};try{return await this.saveStorage(),!0}catch(n){return!1}}async deleteCardGroup(a){if(!this.storage.cardGroups)return!1;let e=this.storage.cardGroups.findIndex(n=>n.id===a);if(e===-1)return!1;let s=this.storage.cardGroups[e];this.storage.cardGroups.splice(e,1);try{return await this.saveStorage(),!0}catch(n){return this.storage.cardGroups.splice(e,0,s),!1}}getGroupProgress(a){let e=this.storage.cardGroups.find(l=>l.id===a);if(!e)return null;let s=this.getCardsInGroup(e),n=Date.now();return{due:s.filter(l=>l.nextReview<=n).length,newCards:s.filter(l=>l.lastReview===0).length,learned:s.filter(l=>l.lastReview>0).length,retention:this.calculateGroupRetention(s)}}calculateGroupRetention(a){let e=a.filter(n=>n.lastReview>0);return e.length===0?1:e.reduce((n,l)=>n+l.retrievability,0)/e.length}getCardsInGroup(a){return this.getLatestCards().filter(n=>{let l=a.filter.split(",").map(p=>p.trim().toLowerCase()),h=n.text.toLowerCase(),d=n.answer.toLowerCase(),u=(n.filePath||"").toLowerCase();return l.some(p=>{if(p.startsWith("#")){let H=p.substring(1),E=this.extractTagsFromText(h),F=this.extractTagsFromText(d),L=[...E,...F],x=h.includes(p)||d.includes(p),S=L.some(k=>k.toLowerCase()===H||k.toLowerCase().includes(H));return x||S}if(p.startsWith("[[")&&p.endsWith("]]")){let H=p.slice(2,-2);return u.includes(H)}if(p.includes("*")){let H=p.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(H,"i").test(u)}return u.includes(p)?!0:h.includes(p)||d.includes(p)})})}extractTagsFromText(a){let e=/#([^\s#]+)/g,s=a.match(e);return s?s.map(n=>n.substring(1)):[]}getTodayTimestamp(){let a=new Date;return a.setHours(0,0,0,0),a.getTime()}getTodayStats(){let a=this.getTodayTimestamp(),e=this.storage.dailyStats.find(s=>s.date===a);return e||(e={date:a,newCardsLearned:0,cardsReviewed:0},this.storage.dailyStats.push(e),this.storage.dailyStats.length>30&&(this.storage.dailyStats.sort((s,n)=>n.date-s.date),this.storage.dailyStats=this.storage.dailyStats.slice(0,30))),e}updateTodayStats(a){let e=this.getTodayStats();a?e.newCardsLearned++:e.cardsReviewed++,this.saveStorageDebounced()}canLearnNewCardsToday(a){let e=this.getTodayStats(),s=this.fsrsService.getParameters();if(a){let n=this.storage.cardGroups.find(l=>l.id===a);if(n&&n.settings&&!n.settings.useGlobalSettings&&n.settings.newCardsPerDay!==void 0)return e.newCardsLearned<n.settings.newCardsPerDay}return e.newCardsLearned<s.newCardsPerDay}canReviewCardsToday(a){let e=this.getTodayStats(),s=this.fsrsService.getParameters();if(a){let n=this.storage.cardGroups.find(l=>l.id===a);if(n&&n.settings&&!n.settings.useGlobalSettings&&n.settings.reviewsPerDay!==void 0)return e.cardsReviewed<n.settings.reviewsPerDay}return e.cardsReviewed<s.reviewsPerDay}getRemainingNewCardsToday(a){let e=this.getTodayStats(),s=this.fsrsService.getParameters();if(a){let n=this.storage.cardGroups.find(l=>l.id===a);if(n&&n.settings&&!n.settings.useGlobalSettings&&n.settings.newCardsPerDay!==void 0)return Math.max(0,n.settings.newCardsPerDay-e.newCardsLearned)}return Math.max(0,s.newCardsPerDay-e.newCardsLearned)}getRemainingReviewsToday(a){let e=this.getTodayStats(),s=this.fsrsService.getParameters();if(a){let n=this.storage.cardGroups.find(l=>l.id===a);if(n&&n.settings&&!n.settings.useGlobalSettings&&n.settings.reviewsPerDay!==void 0)return Math.max(0,n.settings.reviewsPerDay-e.cardsReviewed)}return Math.max(0,s.reviewsPerDay-e.cardsReviewed)}};var gr=class{constructor(a,e){this.app=a;this.commentStore=e;this.textSimilarityService=new zA(a)}findMatchingHighlight(a,e){let s=this.commentStore.getFileComments(a);if(!s||s.length===0)return null;let n=s.find(d=>d.text!==e.text?!1:typeof d.position=="number"&&typeof e.position=="number"?Math.abs(d.position-e.position)<10:d.blockId&&e.blockId?d.blockId===e.blockId:!1);if(n||e.position!==void 0&&(n=s.find(d=>typeof d.position=="number"&&Math.abs(d.position-e.position)<30),n))return n;let l=null,h=0;for(let d of s){if(!d.comments||d.comments.length===0)continue;let u=this.textSimilarityService.calculateSimilarity(d.text,e.text);u>h&&u>.6&&(h=u,l=d)}if(l)return l;if(e.blockId){let d=s.filter(u=>u.blockId===e.blockId);if(d.length>0)return d[0]}return null}async recoverHighlight(a,e,s){let n={...e,text:s,updatedAt:Date.now()};return await this.commentStore.addComment(a,n),n}};var ur=class extends Da.Plugin{constructor(){super(...arguments);this.DEFAULT_SETTINGS={...Y,anthropic:{apiKey:"",model:"claude-2",apiAddress:"",isCustomModel:!1,lastCustomModel:""}}}async onload(){let e=await this.loadData();this.settings=Object.assign({},Y,e),window.html2canvas=Ka.default,this.commentStore=new qi(this),await this.commentStore.loadComments(),this.eventManager=new Ue(this.app),this.fsrsManager=new dr(this),this.highlightMatchingService=new gr(this.app,this.commentStore),this.highlightDecorator=new ji(this,this.commentStore),this.highlightDecorator.enable(),this.registerView(OA,n=>new JA(n,this.commentStore)),this.addRibbonIcon("highlighter","HiNote",async()=>{let{workspace:n}=this.app,l=n.getLeavesOfType(OA);if(l.length){n.revealLeaf(l[0]);return}let h=n.getRightLeaf(!1);h&&await h.setViewState({type:OA,active:!0})}),this.addCommand({id:"open-comment-window",name:B("Open in right sidebar"),callback:async()=>{let{workspace:n}=this.app,l=n.getLeavesOfType(OA);if(l.length){let d=l[0],u=d.view;if(u&&u instanceof JA&&u.isDraggedToMainView){n.detachLeavesOfType(OA);let w=n.getRightLeaf(!1);if(w){await w.setViewState({type:OA,active:!0});let p=w.view;p&&p instanceof JA&&(p.isDraggedToMainView=!1,p.updateViewLayout(),p.updateHighlights())}}else n.revealLeaf(d);return}let h=n.getRightLeaf(!1);if(h){await h.setViewState({type:OA,active:!0});let d=h.view;d&&d instanceof JA&&(d.isDraggedToMainView=!1,d.updateViewLayout())}}}),this.addSettingTab(new cr(this.app,this));let s=()=>{let n=performance.now(),l=performance.now()};this.registerEvent(this.app.vault.on("rename",(n,l)=>{this.commentStore.handleFileRename(l,n.path)})),this.addCommand({id:"open-chat-window",name:B("Open AI chat window"),callback:()=>{Ee.getInstance(this.app,this).show()}}),this.addCommand({id:"open-comment-main-window",name:B("Open in main window"),callback:async()=>{let{workspace:n}=this.app,l=n.getLeavesOfType(OA);if(l.length){let d=l[0];n.setActiveLeaf(d,{focus:!0}),n.detachLeavesOfType(OA);let u=n.getLeaf("split");await u.setViewState({type:OA,active:!0});let w=u.view;w&&w instanceof JA&&(w.isDraggedToMainView=!0,w.updateViewLayout(),w.updateHighlights());return}let h=n.getLeaf("split");h&&(await h.setViewState({type:OA,active:!0}),setTimeout(()=>{let d=h.view;d&&d instanceof JA&&(d.isDraggedToMainView=!0,d.updateViewLayout(),d.updateHighlights())},100))}})}async onunload(){try{await this.commentStore.saveComments();let e=await this.loadData()}catch(e){}this.highlightDecorator&&this.highlightDecorator.disable(),Ee.instance&&Ee.instance.close()}async loadSettings(){let e=await this.loadData();this.settings||(this.settings={excludePatterns:Y.excludePatterns,useCustomPattern:Y.useCustomPattern,highlightPattern:Y.highlightPattern,defaultHighlightColor:Y.defaultHighlightColor,ai:{provider:Y.ai.provider,openai:Y.ai.openai?{...Y.ai.openai}:void 0,anthropic:Y.ai.anthropic?{...Y.ai.anthropic}:void 0,gemini:Y.ai.gemini?{...Y.ai.gemini}:void 0,ollama:Y.ai.ollama?{...Y.ai.ollama}:void 0,deepseek:Y.ai.deepseek?{...Y.ai.deepseek}:void 0,prompts:{...Y.ai.prompts}},export:{exportPath:Y.export.exportPath}}),(e==null?void 0:e.excludePatterns)!==void 0&&(this.settings.excludePatterns=e.excludePatterns),e!=null&&e.ai&&(e.ai.provider&&(this.settings.ai.provider=e.ai.provider),e.ai.openai&&this.settings.ai.openai&&(this.settings.ai.openai={apiKey:e.ai.openai.apiKey||this.settings.ai.openai.apiKey,model:e.ai.openai.model||this.settings.ai.openai.model,baseUrl:e.ai.openai.baseUrl}),e.ai.anthropic&&this.settings.ai.anthropic&&(this.settings.ai.anthropic={apiKey:e.ai.anthropic.apiKey||this.settings.ai.anthropic.apiKey,model:e.ai.anthropic.model||this.settings.ai.anthropic.model,availableModels:e.ai.anthropic.availableModels,apiAddress:e.ai.anthropic.apiAddress||e.ai.anthropic.baseUrl,isCustomModel:e.ai.anthropic.isCustomModel||!1,lastCustomModel:e.ai.anthropic.lastCustomModel||""}),e.ai.gemini&&this.settings.ai.gemini&&(this.settings.ai.gemini={apiKey:e.ai.gemini.apiKey||this.settings.ai.gemini.apiKey,model:e.ai.gemini.model||this.settings.ai.gemini.model,baseUrl:e.ai.gemini.baseUrl,isCustomModel:e.ai.gemini.isCustomModel||!1}),e.ai.ollama&&this.settings.ai.ollama&&(this.settings.ai.ollama={host:e.ai.ollama.host||this.settings.ai.ollama.host,model:e.ai.ollama.model||this.settings.ai.ollama.model,availableModels:e.ai.ollama.availableModels}),e.ai.deepseek&&this.settings.ai.deepseek&&(this.settings.ai.deepseek={apiKey:e.ai.deepseek.apiKey||this.settings.ai.deepseek.apiKey,model:e.ai.deepseek.model||this.settings.ai.deepseek.model,baseUrl:e.ai.deepseek.baseUrl}),e.ai.prompts&&(this.settings.ai.prompts={...this.settings.ai.prompts,...e.ai.prompts})),e!=null&&e.export&&e.export.exportPath&&(this.settings.export.exportPath=e.export.exportPath),e!=null&&e.comments&&(this.settings.comments=e.comments),e!=null&&e.fileComments&&(this.settings.fileComments=e.fileComments),await this.saveSettings()}async saveSettings(){var s,n,l,h,d,u,w,p,v;this.settings||(this.settings={...Y});let e=await this.loadData();e!=null&&e["flashcard-license"]&&(this.settings["flashcard-license"]=e["flashcard-license"]),this.settings.excludePatterns=(s=this.settings.excludePatterns)!=null?s:Y.excludePatterns,this.settings.useCustomPattern=(n=this.settings.useCustomPattern)!=null?n:Y.useCustomPattern,this.settings.highlightPattern=this.settings.highlightPattern||Y.highlightPattern,this.settings.defaultHighlightColor=this.settings.defaultHighlightColor||Y.defaultHighlightColor,this.settings.ai||(this.settings.ai={...Y.ai}),this.settings.export||(this.settings.export={...Y.export}),this.settings.ai.openai||(this.settings.ai.openai={apiKey:"",model:((l=Y.ai.openai)==null?void 0:l.model)||"gpt-4o",baseUrl:(h=Y.ai.openai)==null?void 0:h.baseUrl}),this.settings.ai.anthropic||(this.settings.ai.anthropic={apiKey:"",model:"claude-2",availableModels:(d=Y.ai.anthropic)==null?void 0:d.availableModels,apiAddress:(u=Y.ai.anthropic)==null?void 0:u.apiAddress,isCustomModel:!1,lastCustomModel:""}),this.settings.ai.gemini||(this.settings.ai.gemini={apiKey:"",model:"gemini-1.5-flash",isCustomModel:!1,baseUrl:(w=Y.ai.gemini)==null?void 0:w.baseUrl}),this.settings.ai.ollama||(this.settings.ai.ollama={host:"http://localhost:11434",model:"",availableModels:(p=Y.ai.ollama)==null?void 0:p.availableModels}),this.settings.ai.deepseek||(this.settings.ai.deepseek={apiKey:"",model:"deepseek-chat",baseUrl:(v=Y.ai.deepseek)==null?void 0:v.baseUrl}),this.settings.ai.prompts||(this.settings.ai.prompts={...Y.ai.prompts}),this.settings.export||(this.settings.export={exportPath:Y.export.exportPath}),await this.saveData(this.settings)}};
|
|
/*! Bundled license information:
|
|
|
|
html2canvas/dist/html2canvas.js:
|
|
(*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*)
|
|
(*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** *)
|
|
*/
|
|
|
|
/* nosourcemap */ |