You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
112 KiB
154 lines
112 KiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var cn=Object.create;var ht=Object.defineProperty;var un=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var fn=Object.getPrototypeOf,pn=Object.prototype.hasOwnProperty;var Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gn=(e,t)=>{for(var r in t)ht(e,r,{get:t[r],enumerable:!0})},Vr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of hn(t))!pn.call(e,s)&&s!==r&&ht(e,s,{get:()=>t[s],enumerable:!(i=un(t,s))||i.enumerable});return e};var ke=(e,t,r)=>(r=e!=null?cn(fn(e)):{},Vr(t||!e||!e.__esModule?ht(r,"default",{value:e,enumerable:!0}):r,e)),mn=e=>Vr(ht({},"__esModule",{value:!0}),e);var qr=Ee((jr,Yr)=>{(function(e){if(typeof jr=="object")Yr.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t;try{t=window}catch(r){t=self}t.SparkMD5=e()}})(function(e){"use strict";var t=function(g,p){return g+p&4294967295},r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(g,p,o,a,f,c){return p=t(t(p,g),t(a,c)),t(p<<f|p>>>32-f,o)}function s(g,p){var o=g[0],a=g[1],f=g[2],c=g[3];o+=(a&f|~a&c)+p[0]-680876936|0,o=(o<<7|o>>>25)+a|0,c+=(o&a|~o&f)+p[1]-389564586|0,c=(c<<12|c>>>20)+o|0,f+=(c&o|~c&a)+p[2]+606105819|0,f=(f<<17|f>>>15)+c|0,a+=(f&c|~f&o)+p[3]-1044525330|0,a=(a<<22|a>>>10)+f|0,o+=(a&f|~a&c)+p[4]-176418897|0,o=(o<<7|o>>>25)+a|0,c+=(o&a|~o&f)+p[5]+1200080426|0,c=(c<<12|c>>>20)+o|0,f+=(c&o|~c&a)+p[6]-1473231341|0,f=(f<<17|f>>>15)+c|0,a+=(f&c|~f&o)+p[7]-45705983|0,a=(a<<22|a>>>10)+f|0,o+=(a&f|~a&c)+p[8]+1770035416|0,o=(o<<7|o>>>25)+a|0,c+=(o&a|~o&f)+p[9]-1958414417|0,c=(c<<12|c>>>20)+o|0,f+=(c&o|~c&a)+p[10]-42063|0,f=(f<<17|f>>>15)+c|0,a+=(f&c|~f&o)+p[11]-1990404162|0,a=(a<<22|a>>>10)+f|0,o+=(a&f|~a&c)+p[12]+1804603682|0,o=(o<<7|o>>>25)+a|0,c+=(o&a|~o&f)+p[13]-40341101|0,c=(c<<12|c>>>20)+o|0,f+=(c&o|~c&a)+p[14]-1502002290|0,f=(f<<17|f>>>15)+c|0,a+=(f&c|~f&o)+p[15]+1236535329|0,a=(a<<22|a>>>10)+f|0,o+=(a&c|f&~c)+p[1]-165796510|0,o=(o<<5|o>>>27)+a|0,c+=(o&f|a&~f)+p[6]-1069501632|0,c=(c<<9|c>>>23)+o|0,f+=(c&a|o&~a)+p[11]+643717713|0,f=(f<<14|f>>>18)+c|0,a+=(f&o|c&~o)+p[0]-373897302|0,a=(a<<20|a>>>12)+f|0,o+=(a&c|f&~c)+p[5]-701558691|0,o=(o<<5|o>>>27)+a|0,c+=(o&f|a&~f)+p[10]+38016083|0,c=(c<<9|c>>>23)+o|0,f+=(c&a|o&~a)+p[15]-660478335|0,f=(f<<14|f>>>18)+c|0,a+=(f&o|c&~o)+p[4]-405537848|0,a=(a<<20|a>>>12)+f|0,o+=(a&c|f&~c)+p[9]+568446438|0,o=(o<<5|o>>>27)+a|0,c+=(o&f|a&~f)+p[14]-1019803690|0,c=(c<<9|c>>>23)+o|0,f+=(c&a|o&~a)+p[3]-187363961|0,f=(f<<14|f>>>18)+c|0,a+=(f&o|c&~o)+p[8]+1163531501|0,a=(a<<20|a>>>12)+f|0,o+=(a&c|f&~c)+p[13]-1444681467|0,o=(o<<5|o>>>27)+a|0,c+=(o&f|a&~f)+p[2]-51403784|0,c=(c<<9|c>>>23)+o|0,f+=(c&a|o&~a)+p[7]+1735328473|0,f=(f<<14|f>>>18)+c|0,a+=(f&o|c&~o)+p[12]-1926607734|0,a=(a<<20|a>>>12)+f|0,o+=(a^f^c)+p[5]-378558|0,o=(o<<4|o>>>28)+a|0,c+=(o^a^f)+p[8]-2022574463|0,c=(c<<11|c>>>21)+o|0,f+=(c^o^a)+p[11]+1839030562|0,f=(f<<16|f>>>16)+c|0,a+=(f^c^o)+p[14]-35309556|0,a=(a<<23|a>>>9)+f|0,o+=(a^f^c)+p[1]-1530992060|0,o=(o<<4|o>>>28)+a|0,c+=(o^a^f)+p[4]+1272893353|0,c=(c<<11|c>>>21)+o|0,f+=(c^o^a)+p[7]-155497632|0,f=(f<<16|f>>>16)+c|0,a+=(f^c^o)+p[10]-1094730640|0,a=(a<<23|a>>>9)+f|0,o+=(a^f^c)+p[13]+681279174|0,o=(o<<4|o>>>28)+a|0,c+=(o^a^f)+p[0]-358537222|0,c=(c<<11|c>>>21)+o|0,f+=(c^o^a)+p[3]-722521979|0,f=(f<<16|f>>>16)+c|0,a+=(f^c^o)+p[6]+76029189|0,a=(a<<23|a>>>9)+f|0,o+=(a^f^c)+p[9]-640364487|0,o=(o<<4|o>>>28)+a|0,c+=(o^a^f)+p[12]-421815835|0,c=(c<<11|c>>>21)+o|0,f+=(c^o^a)+p[15]+530742520|0,f=(f<<16|f>>>16)+c|0,a+=(f^c^o)+p[2]-995338651|0,a=(a<<23|a>>>9)+f|0,o+=(f^(a|~c))+p[0]-198630844|0,o=(o<<6|o>>>26)+a|0,c+=(a^(o|~f))+p[7]+1126891415|0,c=(c<<10|c>>>22)+o|0,f+=(o^(c|~a))+p[14]-1416354905|0,f=(f<<15|f>>>17)+c|0,a+=(c^(f|~o))+p[5]-57434055|0,a=(a<<21|a>>>11)+f|0,o+=(f^(a|~c))+p[12]+1700485571|0,o=(o<<6|o>>>26)+a|0,c+=(a^(o|~f))+p[3]-1894986606|0,c=(c<<10|c>>>22)+o|0,f+=(o^(c|~a))+p[10]-1051523|0,f=(f<<15|f>>>17)+c|0,a+=(c^(f|~o))+p[1]-2054922799|0,a=(a<<21|a>>>11)+f|0,o+=(f^(a|~c))+p[8]+1873313359|0,o=(o<<6|o>>>26)+a|0,c+=(a^(o|~f))+p[15]-30611744|0,c=(c<<10|c>>>22)+o|0,f+=(o^(c|~a))+p[6]-1560198380|0,f=(f<<15|f>>>17)+c|0,a+=(c^(f|~o))+p[13]+1309151649|0,a=(a<<21|a>>>11)+f|0,o+=(f^(a|~c))+p[4]-145523070|0,o=(o<<6|o>>>26)+a|0,c+=(a^(o|~f))+p[11]-1120210379|0,c=(c<<10|c>>>22)+o|0,f+=(o^(c|~a))+p[2]+718787259|0,f=(f<<15|f>>>17)+c|0,a+=(c^(f|~o))+p[9]-343485551|0,a=(a<<21|a>>>11)+f|0,g[0]=o+g[0]|0,g[1]=a+g[1]|0,g[2]=f+g[2]|0,g[3]=c+g[3]|0}function l(g){var p=[],o;for(o=0;o<64;o+=4)p[o>>2]=g.charCodeAt(o)+(g.charCodeAt(o+1)<<8)+(g.charCodeAt(o+2)<<16)+(g.charCodeAt(o+3)<<24);return p}function n(g){var p=[],o;for(o=0;o<64;o+=4)p[o>>2]=g[o]+(g[o+1]<<8)+(g[o+2]<<16)+(g[o+3]<<24);return p}function u(g){var p=g.length,o=[1732584193,-271733879,-1732584194,271733878],a,f,c,P,H,K;for(a=64;a<=p;a+=64)s(o,l(g.substring(a-64,a)));for(g=g.substring(a-64),f=g.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<f;a+=1)c[a>>2]|=g.charCodeAt(a)<<(a%4<<3);if(c[a>>2]|=128<<(a%4<<3),a>55)for(s(o,c),a=0;a<16;a+=1)c[a]=0;return P=p*8,P=P.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(P[2],16),K=parseInt(P[1],16)||0,c[14]=H,c[15]=K,s(o,c),o}function d(g){var p=g.length,o=[1732584193,-271733879,-1732584194,271733878],a,f,c,P,H,K;for(a=64;a<=p;a+=64)s(o,n(g.subarray(a-64,a)));for(g=a-64<p?g.subarray(a-64):new Uint8Array(0),f=g.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<f;a+=1)c[a>>2]|=g[a]<<(a%4<<3);if(c[a>>2]|=128<<(a%4<<3),a>55)for(s(o,c),a=0;a<16;a+=1)c[a]=0;return P=p*8,P=P.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(P[2],16),K=parseInt(P[1],16)||0,c[14]=H,c[15]=K,s(o,c),o}function m(g){var p="",o;for(o=0;o<4;o+=1)p+=r[g>>o*8+4&15]+r[g>>o*8&15];return p}function A(g){var p;for(p=0;p<g.length;p+=1)g[p]=m(g[p]);return g.join("")}A(u("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(t=function(g,p){var o=(g&65535)+(p&65535),a=(g>>16)+(p>>16)+(o>>16);return a<<16|o&65535}),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function g(p,o){return p=p|0||0,p<0?Math.max(p+o,0):Math.min(p,o)}ArrayBuffer.prototype.slice=function(p,o){var a=this.byteLength,f=g(p,a),c=a,P,H,K,ve;return o!==e&&(c=g(o,a)),f>c?new ArrayBuffer(0):(P=c-f,H=new ArrayBuffer(P),K=new Uint8Array(H),ve=new Uint8Array(this,f,P),K.set(ve),H)}}();function w(g){return/[\u0080-\uFFFF]/.test(g)&&(g=unescape(encodeURIComponent(g))),g}function I(g,p){var o=g.length,a=new ArrayBuffer(o),f=new Uint8Array(a),c;for(c=0;c<o;c+=1)f[c]=g.charCodeAt(c);return p?f:a}function C(g){return String.fromCharCode.apply(null,new Uint8Array(g))}function k(g,p,o){var a=new Uint8Array(g.byteLength+p.byteLength);return a.set(new Uint8Array(g)),a.set(new Uint8Array(p),g.byteLength),o?a:a.buffer}function D(g){var p=[],o=g.length,a;for(a=0;a<o-1;a+=2)p.push(parseInt(g.substr(a,2),16));return String.fromCharCode.apply(String,p)}function T(){this.reset()}return T.prototype.append=function(g){return this.appendBinary(w(g)),this},T.prototype.appendBinary=function(g){this._buff+=g,this._length+=g.length;var p=this._buff.length,o;for(o=64;o<=p;o+=64)s(this._hash,l(this._buff.substring(o-64,o)));return this._buff=this._buff.substring(o-64),this},T.prototype.end=function(g){var p=this._buff,o=p.length,a,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c;for(a=0;a<o;a+=1)f[a>>2]|=p.charCodeAt(a)<<(a%4<<3);return this._finish(f,o),c=A(this._hash),g&&(c=D(c)),this.reset(),c},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(g){return this._buff=g.buff,this._length=g.length,this._hash=g.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(g,p){var o=p,a,f,c;if(g[o>>2]|=128<<(o%4<<3),o>55)for(s(this._hash,g),o=0;o<16;o+=1)g[o]=0;a=this._length*8,a=a.toString(16).match(/(.*?)(.{0,8})$/),f=parseInt(a[2],16),c=parseInt(a[1],16)||0,g[14]=f,g[15]=c,s(this._hash,g)},T.hash=function(g,p){return T.hashBinary(w(g),p)},T.hashBinary=function(g,p){var o=u(g),a=A(o);return p?D(a):a},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(g){var p=k(this._buff.buffer,g,!0),o=p.length,a;for(this._length+=g.byteLength,a=64;a<=o;a+=64)s(this._hash,n(p.subarray(a-64,a)));return this._buff=a-64<o?new Uint8Array(p.buffer.slice(a-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(g){var p=this._buff,o=p.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f,c;for(f=0;f<o;f+=1)a[f>>2]|=p[f]<<(f%4<<3);return this._finish(a,o),c=A(this._hash),g&&(c=D(c)),this.reset(),c},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var g=T.prototype.getState.call(this);return g.buff=C(g.buff),g},T.ArrayBuffer.prototype.setState=function(g){return g.buff=I(g.buff,!0),T.prototype.setState.call(this,g)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(g,p){var o=d(new Uint8Array(g)),a=A(o);return p?D(a):a},T})});var Zr=Ee(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.toSeconds=X.end=X.parse=X.pattern=void 0;var Ue="\\d+",Xt="".concat(Ue,"(?:[\\.,]").concat(Ue,")?"),En="(".concat(Ue,"Y)?(").concat(Ue,"M)?(").concat(Ue,"W)?(").concat(Ue,"D)?"),_n="T(".concat(Xt,"H)?(").concat(Xt,"M)?(").concat(Xt,"S)?"),wn="P(?:".concat(En,"(?:").concat(_n,")?)"),Sn=["years","months","weeks","days","hours","minutes","seconds"],Jr=Object.freeze({years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0});X.pattern=new RegExp(wn);var Dn=function(e){var t=e.replace(/,/g,".").match(X.pattern);if(!t)throw new RangeError("invalid duration: ".concat(e));var r=t.slice(1);if(r.filter(function(i){return i!=null}).length===0)throw new RangeError("invalid duration: ".concat(e));if(r.filter(function(i){return/\./.test(i||"")}).length>1)throw new RangeError("only the smallest unit can be fractional");return r.reduce(function(i,s,l){return i[Sn[l]]=parseFloat(s||"0")||0,i},{})};X.parse=Dn;var Rn=function(e,t){t===void 0&&(t=new Date);var r=Object.assign({},Jr,e),i=t.getTime(),s=new Date(i);s.setFullYear(s.getFullYear()+r.years),s.setMonth(s.getMonth()+r.months),s.setDate(s.getDate()+r.days);var l=r.hours*3600*1e3,n=r.minutes*60*1e3;return s.setMilliseconds(s.getMilliseconds()+r.seconds*1e3+l+n),s.setDate(s.getDate()+r.weeks*7),s};X.end=Rn;var xn=function(e,t){t===void 0&&(t=new Date);var r=Object.assign({},Jr,e),i=t.getTime(),s=new Date(i),l=(0,X.end)(r,s),n=(l.getTime()-s.getTime())/1e3;return n};X.toSeconds=xn;X.default={end:X.end,toSeconds:X.toSeconds,pattern:X.pattern,parse:X.parse}});var cr=Ee((or,lr)=>{(function(e,t){typeof or=="object"&&typeof lr!="undefined"?lr.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.DOMPurify=t())})(or,function(){"use strict";function e(y){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},e(y)}function t(y,b){return t=Object.setPrototypeOf||function(L,F){return L.__proto__=F,L},t(y,b)}function r(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(y){return!1}}function i(y,b,_){return r()?i=Reflect.construct:i=function(F,oe,fe){var le=[null];le.push.apply(le,oe);var Ye=Function.bind.apply(F,le),qe=new Ye;return fe&&t(qe,fe.prototype),qe},i.apply(null,arguments)}function s(y){return l(y)||n(y)||u(y)||m()}function l(y){if(Array.isArray(y))return d(y)}function n(y){if(typeof Symbol!="undefined"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function u(y,b){if(y){if(typeof y=="string")return d(y,b);var _=Object.prototype.toString.call(y).slice(8,-1);if(_==="Object"&&y.constructor&&(_=y.constructor.name),_==="Map"||_==="Set")return Array.from(y);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return d(y,b)}}function d(y,b){(b==null||b>y.length)&&(b=y.length);for(var _=0,L=new Array(b);_<b;_++)L[_]=y[_];return L}function m(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A=Object.hasOwnProperty,w=Object.setPrototypeOf,I=Object.isFrozen,C=Object.getPrototypeOf,k=Object.getOwnPropertyDescriptor,D=Object.freeze,T=Object.seal,g=Object.create,p=typeof Reflect!="undefined"&&Reflect,o=p.apply,a=p.construct;o||(o=function(b,_,L){return b.apply(_,L)}),D||(D=function(b){return b}),T||(T=function(b){return b}),a||(a=function(b,_){return i(b,s(_))});var f=ee(Array.prototype.forEach),c=ee(Array.prototype.pop),P=ee(Array.prototype.push),H=ee(String.prototype.toLowerCase),K=ee(String.prototype.toString),ve=ee(String.prototype.match),Q=ee(String.prototype.replace),Ge=ee(String.prototype.indexOf),_t=ee(String.prototype.trim),V=ee(RegExp.prototype.test),U=Ve(TypeError);function ee(y){return function(b){for(var _=arguments.length,L=new Array(_>1?_-1:0),F=1;F<_;F++)L[F-1]=arguments[F];return o(y,b,L)}}function Ve(y){return function(){for(var b=arguments.length,_=new Array(b),L=0;L<b;L++)_[L]=arguments[L];return a(y,_)}}function S(y,b,_){_=_||H,w&&w(y,null);for(var L=b.length;L--;){var F=b[L];if(typeof F=="string"){var oe=_(F);oe!==F&&(I(b)||(b[L]=oe),F=oe)}y[F]=!0}return y}function ae(y){var b=g(null),_;for(_ in y)o(A,y,[_])===!0&&(b[_]=y[_]);return b}function O(y,b){for(;y!==null;){var _=k(y,b);if(_){if(_.get)return ee(_.get);if(typeof _.value=="function")return ee(_.value)}y=C(y)}function L(F){return console.warn("fallback value for",F),null}return L}var Ae=D(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Se=D(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),De=D(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),et=D(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ne=D(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Re=D(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xe=D(["#text"]),ye=D(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$e=D(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),We=D(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),te=D(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),se=T(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tt=T(/<%[\w\W]*|[\w\W]*%>/gm),Le=T(/\${[\w\W]*}/gm),he=T(/^data-[\-\w.\u00B7-\uFFFF]/),ze=T(/^aria-[\-\w]+$/),je=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mi=T(/^(?:\w+script|data):/i),Oi=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fi=T(/^html$/i),ki=function(){return typeof window=="undefined"?null:window},Ui=function(b,_){if(e(b)!=="object"||typeof b.createPolicy!="function")return null;var L=null,F="data-tt-policy-suffix";_.currentScript&&_.currentScript.hasAttribute(F)&&(L=_.currentScript.getAttribute(F));var oe="dompurify"+(L?"#"+L:"");try{return b.createPolicy(oe,{createHTML:function(le){return le},createScriptURL:function(le){return le}})}catch(fe){return console.warn("TrustedTypes policy "+oe+" could not be created."),null}};function yr(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ki(),b=function(h){return yr(h)};if(b.version="2.4.3",b.removed=[],!y||!y.document||y.document.nodeType!==9)return b.isSupported=!1,b;var _=y.document,L=y.document,F=y.DocumentFragment,oe=y.HTMLTemplateElement,fe=y.Node,le=y.Element,Ye=y.NodeFilter,qe=y.NamedNodeMap,Hi=qe===void 0?y.NamedNodeMap||y.MozNamedAttrMap:qe,Gi=y.HTMLFormElement,Vi=y.DOMParser,rt=y.trustedTypes,it=le.prototype,$i=O(it,"cloneNode"),Wi=O(it,"nextSibling"),zi=O(it,"childNodes"),wt=O(it,"parentNode");if(typeof oe=="function"){var St=L.createElement("template");St.content&&St.content.ownerDocument&&(L=St.content.ownerDocument)}var ie=Ui(rt,_),Dt=ie?ie.createHTML(""):"",nt=L,Rt=nt.implementation,ji=nt.createNodeIterator,Yi=nt.createDocumentFragment,qi=nt.getElementsByTagName,Xi=_.importNode,Nr={};try{Nr=ae(L).documentMode?L.documentMode:{}}catch(E){}var ce={};b.isSupported=typeof wt=="function"&&Rt&&typeof Rt.createHTMLDocument!="undefined"&&Nr!==9;var xt=se,Lt=tt,It=Le,Ki=he,Ji=ze,Zi=Mi,br=Oi,Ct=je,$=null,Tr=S({},[].concat(s(Ae),s(Se),s(De),s(Ne),s(xe))),Y=null,Er=S({},[].concat(s(ye),s($e),s(We),s(te))),B=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Xe=null,Pt=null,_r=!0,Mt=!0,wr=!1,Ie=!1,be=!1,Ot=!1,Ft=!1,Ce=!1,at=!1,st=!1,Sr=!0,Dr=!1,Qi="user-content-",kt=!0,Ke=!1,Pe={},Me=null,Rr=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),xr=null,Lr=S({},["audio","video","img","source","image","track"]),Ut=null,Ir=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ot="http://www.w3.org/1998/Math/MathML",lt="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",Oe=pe,Bt=!1,Ht=null,en=S({},[ot,lt,pe],K),Te,tn=["application/xhtml+xml","text/html"],rn="text/html",W,Fe=null,nn=L.createElement("form"),Cr=function(h){return h instanceof RegExp||h instanceof Function},Gt=function(h){Fe&&Fe===h||((!h||e(h)!=="object")&&(h={}),h=ae(h),Te=tn.indexOf(h.PARSER_MEDIA_TYPE)===-1?Te=rn:Te=h.PARSER_MEDIA_TYPE,W=Te==="application/xhtml+xml"?K:H,$="ALLOWED_TAGS"in h?S({},h.ALLOWED_TAGS,W):Tr,Y="ALLOWED_ATTR"in h?S({},h.ALLOWED_ATTR,W):Er,Ht="ALLOWED_NAMESPACES"in h?S({},h.ALLOWED_NAMESPACES,K):en,Ut="ADD_URI_SAFE_ATTR"in h?S(ae(Ir),h.ADD_URI_SAFE_ATTR,W):Ir,xr="ADD_DATA_URI_TAGS"in h?S(ae(Lr),h.ADD_DATA_URI_TAGS,W):Lr,Me="FORBID_CONTENTS"in h?S({},h.FORBID_CONTENTS,W):Rr,Xe="FORBID_TAGS"in h?S({},h.FORBID_TAGS,W):{},Pt="FORBID_ATTR"in h?S({},h.FORBID_ATTR,W):{},Pe="USE_PROFILES"in h?h.USE_PROFILES:!1,_r=h.ALLOW_ARIA_ATTR!==!1,Mt=h.ALLOW_DATA_ATTR!==!1,wr=h.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=h.SAFE_FOR_TEMPLATES||!1,be=h.WHOLE_DOCUMENT||!1,Ce=h.RETURN_DOM||!1,at=h.RETURN_DOM_FRAGMENT||!1,st=h.RETURN_TRUSTED_TYPE||!1,Ft=h.FORCE_BODY||!1,Sr=h.SANITIZE_DOM!==!1,Dr=h.SANITIZE_NAMED_PROPS||!1,kt=h.KEEP_CONTENT!==!1,Ke=h.IN_PLACE||!1,Ct=h.ALLOWED_URI_REGEXP||Ct,Oe=h.NAMESPACE||pe,h.CUSTOM_ELEMENT_HANDLING&&Cr(h.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(B.tagNameCheck=h.CUSTOM_ELEMENT_HANDLING.tagNameCheck),h.CUSTOM_ELEMENT_HANDLING&&Cr(h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(B.attributeNameCheck=h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),h.CUSTOM_ELEMENT_HANDLING&&typeof h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(B.allowCustomizedBuiltInElements=h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Mt=!1),at&&(Ce=!0),Pe&&($=S({},s(xe)),Y=[],Pe.html===!0&&(S($,Ae),S(Y,ye)),Pe.svg===!0&&(S($,Se),S(Y,$e),S(Y,te)),Pe.svgFilters===!0&&(S($,De),S(Y,$e),S(Y,te)),Pe.mathMl===!0&&(S($,Ne),S(Y,We),S(Y,te))),h.ADD_TAGS&&($===Tr&&($=ae($)),S($,h.ADD_TAGS,W)),h.ADD_ATTR&&(Y===Er&&(Y=ae(Y)),S(Y,h.ADD_ATTR,W)),h.ADD_URI_SAFE_ATTR&&S(Ut,h.ADD_URI_SAFE_ATTR,W),h.FORBID_CONTENTS&&(Me===Rr&&(Me=ae(Me)),S(Me,h.FORBID_CONTENTS,W)),kt&&($["#text"]=!0),be&&S($,["html","head","body"]),$.table&&(S($,["tbody"]),delete Xe.tbody),D&&D(h),Fe=h)},Pr=S({},["mi","mo","mn","ms","mtext"]),Mr=S({},["foreignobject","desc","title","annotation-xml"]),an=S({},["title","style","font","a","script"]),ct=S({},Se);S(ct,De),S(ct,et);var Vt=S({},Ne);S(Vt,Re);var sn=function(h){var v=wt(h);(!v||!v.tagName)&&(v={namespaceURI:Oe,tagName:"template"});var N=H(h.tagName),M=H(v.tagName);return Ht[h.namespaceURI]?h.namespaceURI===lt?v.namespaceURI===pe?N==="svg":v.namespaceURI===ot?N==="svg"&&(M==="annotation-xml"||Pr[M]):Boolean(ct[N]):h.namespaceURI===ot?v.namespaceURI===pe?N==="math":v.namespaceURI===lt?N==="math"&&Mr[M]:Boolean(Vt[N]):h.namespaceURI===pe?v.namespaceURI===lt&&!Mr[M]||v.namespaceURI===ot&&!Pr[M]?!1:!Vt[N]&&(an[N]||!ct[N]):!!(Te==="application/xhtml+xml"&&Ht[h.namespaceURI]):!1},ge=function(h){P(b.removed,{element:h});try{h.parentNode.removeChild(h)}catch(v){try{h.outerHTML=Dt}catch(N){h.remove()}}},$t=function(h,v){try{P(b.removed,{attribute:v.getAttributeNode(h),from:v})}catch(N){P(b.removed,{attribute:null,from:v})}if(v.removeAttribute(h),h==="is"&&!Y[h])if(Ce||at)try{ge(v)}catch(N){}else try{v.setAttribute(h,"")}catch(N){}},Or=function(h){var v,N;if(Ft)h="<remove></remove>"+h;else{var M=ve(h,/^[\r\n\t ]+/);N=M&&M[0]}Te==="application/xhtml+xml"&&Oe===pe&&(h='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+h+"</body></html>");var re=ie?ie.createHTML(h):h;if(Oe===pe)try{v=new Vi().parseFromString(re,Te)}catch(q){}if(!v||!v.documentElement){v=Rt.createDocument(Oe,"template",null);try{v.documentElement.innerHTML=Bt?Dt:re}catch(q){}}var J=v.body||v.documentElement;return h&&N&&J.insertBefore(L.createTextNode(N),J.childNodes[0]||null),Oe===pe?qi.call(v,be?"html":"body")[0]:be?v.documentElement:J},Fr=function(h){return ji.call(h.ownerDocument||h,h,Ye.SHOW_ELEMENT|Ye.SHOW_COMMENT|Ye.SHOW_TEXT,null,!1)},on=function(h){return h instanceof Gi&&(typeof h.nodeName!="string"||typeof h.textContent!="string"||typeof h.removeChild!="function"||!(h.attributes instanceof Hi)||typeof h.removeAttribute!="function"||typeof h.setAttribute!="function"||typeof h.namespaceURI!="string"||typeof h.insertBefore!="function"||typeof h.hasChildNodes!="function")},Je=function(h){return e(fe)==="object"?h instanceof fe:h&&e(h)==="object"&&typeof h.nodeType=="number"&&typeof h.nodeName=="string"},me=function(h,v,N){ce[h]&&f(ce[h],function(M){M.call(b,v,N,Fe)})},kr=function(h){var v;if(me("beforeSanitizeElements",h,null),on(h)||V(/[\u0080-\uFFFF]/,h.nodeName))return ge(h),!0;var N=W(h.nodeName);if(me("uponSanitizeElement",h,{tagName:N,allowedTags:$}),h.hasChildNodes()&&!Je(h.firstElementChild)&&(!Je(h.content)||!Je(h.content.firstElementChild))&&V(/<[/\w]/g,h.innerHTML)&&V(/<[/\w]/g,h.textContent)||N==="select"&&V(/<template/i,h.innerHTML))return ge(h),!0;if(!$[N]||Xe[N]){if(!Xe[N]&&Br(N)&&(B.tagNameCheck instanceof RegExp&&V(B.tagNameCheck,N)||B.tagNameCheck instanceof Function&&B.tagNameCheck(N)))return!1;if(kt&&!Me[N]){var M=wt(h)||h.parentNode,re=zi(h)||h.childNodes;if(re&&M)for(var J=re.length,q=J-1;q>=0;--q)M.insertBefore($i(re[q],!0),Wi(h))}return ge(h),!0}return h instanceof le&&!sn(h)||(N==="noscript"||N==="noembed")&&V(/<\/no(script|embed)/i,h.innerHTML)?(ge(h),!0):(Ie&&h.nodeType===3&&(v=h.textContent,v=Q(v,xt," "),v=Q(v,Lt," "),v=Q(v,It," "),h.textContent!==v&&(P(b.removed,{element:h.cloneNode()}),h.textContent=v)),me("afterSanitizeElements",h,null),!1)},Ur=function(h,v,N){if(Sr&&(v==="id"||v==="name")&&(N in L||N in nn))return!1;if(!(Mt&&!Pt[v]&&V(Ki,v))){if(!(_r&&V(Ji,v))){if(!Y[v]||Pt[v]){if(!(Br(h)&&(B.tagNameCheck instanceof RegExp&&V(B.tagNameCheck,h)||B.tagNameCheck instanceof Function&&B.tagNameCheck(h))&&(B.attributeNameCheck instanceof RegExp&&V(B.attributeNameCheck,v)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(v))||v==="is"&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&V(B.tagNameCheck,N)||B.tagNameCheck instanceof Function&&B.tagNameCheck(N))))return!1}else if(!Ut[v]){if(!V(Ct,Q(N,br,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&h!=="script"&&Ge(N,"data:")===0&&xr[h])){if(!(wr&&!V(Zi,Q(N,br,"")))){if(N)return!1}}}}}}return!0},Br=function(h){return h.indexOf("-")>0},Hr=function(h){var v,N,M,re;me("beforeSanitizeAttributes",h,null);var J=h.attributes;if(J){var q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};for(re=J.length;re--;){v=J[re];var ut=v,z=ut.name,Wt=ut.namespaceURI;if(N=z==="value"?v.value:_t(v.value),M=W(z),q.attrName=M,q.attrValue=N,q.keepAttr=!0,q.forceKeepAttr=void 0,me("uponSanitizeAttribute",h,q),N=q.attrValue,!q.forceKeepAttr&&($t(z,h),!!q.keepAttr)){if(V(/\/>/i,N)){$t(z,h);continue}Ie&&(N=Q(N,xt," "),N=Q(N,Lt," "),N=Q(N,It," "));var Gr=W(h.nodeName);if(Ur(Gr,M,N)){if(Dr&&(M==="id"||M==="name")&&($t(z,h),N=Qi+N),ie&&e(rt)==="object"&&typeof rt.getAttributeType=="function"&&!Wt)switch(rt.getAttributeType(Gr,M)){case"TrustedHTML":N=ie.createHTML(N);break;case"TrustedScriptURL":N=ie.createScriptURL(N);break}try{Wt?h.setAttributeNS(Wt,z,N):h.setAttribute(z,N),c(b.removed)}catch(ga){}}}}me("afterSanitizeAttributes",h,null)}},ln=function E(h){var v,N=Fr(h);for(me("beforeSanitizeShadowDOM",h,null);v=N.nextNode();)me("uponSanitizeShadowNode",v,null),!kr(v)&&(v.content instanceof F&&E(v.content),Hr(v));me("afterSanitizeShadowDOM",h,null)};return b.sanitize=function(E){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v,N,M,re,J;if(Bt=!E,Bt&&(E="<!-->"),typeof E!="string"&&!Je(E)){if(typeof E.toString!="function")throw U("toString is not a function");if(E=E.toString(),typeof E!="string")throw U("dirty is not a string, aborting")}if(!b.isSupported){if(e(y.toStaticHTML)==="object"||typeof y.toStaticHTML=="function"){if(typeof E=="string")return y.toStaticHTML(E);if(Je(E))return y.toStaticHTML(E.outerHTML)}return E}if(Ot||Gt(h),b.removed=[],typeof E=="string"&&(Ke=!1),Ke){if(E.nodeName){var q=W(E.nodeName);if(!$[q]||Xe[q])throw U("root node is forbidden and cannot be sanitized in-place")}}else if(E instanceof fe)v=Or("<!---->"),N=v.ownerDocument.importNode(E,!0),N.nodeType===1&&N.nodeName==="BODY"||N.nodeName==="HTML"?v=N:v.appendChild(N);else{if(!Ce&&!Ie&&!be&&E.indexOf("<")===-1)return ie&&st?ie.createHTML(E):E;if(v=Or(E),!v)return Ce?null:st?Dt:""}v&&Ft&&ge(v.firstChild);for(var ut=Fr(Ke?E:v);M=ut.nextNode();)M.nodeType===3&&M===re||kr(M)||(M.content instanceof F&&ln(M.content),Hr(M),re=M);if(re=null,Ke)return E;if(Ce){if(at)for(J=Yi.call(v.ownerDocument);v.firstChild;)J.appendChild(v.firstChild);else J=v;return Y.shadowroot&&(J=Xi.call(_,J,!0)),J}var z=be?v.outerHTML:v.innerHTML;return be&&$["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&V(Fi,v.ownerDocument.doctype.name)&&(z="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
|
|
`+z),Ie&&(z=Q(z,xt," "),z=Q(z,Lt," "),z=Q(z,It," ")),ie&&st?ie.createHTML(z):z},b.setConfig=function(E){Gt(E),Ot=!0},b.clearConfig=function(){Fe=null,Ot=!1},b.isValidAttribute=function(E,h,v){Fe||Gt({});var N=W(E),M=W(h);return Ur(N,M,v)},b.addHook=function(E,h){typeof h=="function"&&(ce[E]=ce[E]||[],P(ce[E],h))},b.removeHook=function(E){if(ce[E])return c(ce[E])},b.removeHooks=function(E){ce[E]&&(ce[E]=[])},b.removeAllHooks=function(){ce={}},b}var Bi=yr();return Bi})});var ur=Ee((cs,Ti)=>{Ti.exports=window.DOMPurify||(window.DOMPurify=cr().default||cr())});var wi=Ee((ds,pr)=>{function _i(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(t=t||{},this._doc=e,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._keepClasses=!!t.keepClasses,this._serializer=t.serializer||function(r){return r.innerHTML},this._disableJSONLD=!!t.disableJSONLD,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let r=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let s=Array.from(i.attributes||[],function(l){return`${l.name}="${l.value}"`}).join(" ");return`<${i.localName} ${s}>`};this.log=function(){if(typeof dump!="undefined"){var i=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?r(s):s}).join(" ");dump("Reader: (Readability) "+i+`
|
|
`)}else if(typeof console!="undefined"){let s=Array.from(arguments,l=>l&&l.nodeType==this.ELEMENT_NODE?r(l):l);s.unshift("Reader: (Readability)"),console.log.apply(console,s)}}}else this.log=function(){}}_i.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(e){this._fixRelativeUris(e),this._simplifyNestedElements(e),this._keepClasses||this._cleanClasses(e)},_removeNodes:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var r=e.length-1;r>=0;r--){var i=e[r],s=i.parentNode;s&&(!t||t.call(this,i,r,e))&&s.removeChild(i)}},_replaceNodeTags:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let r of e)this._setNodeTag(r,t)},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_findNode:function(e,t){return Array.prototype.find.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments),r=t.map(function(i){return e.call(i)});return Array.prototype.concat.apply([],r)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(r){var i=e.getElementsByTagName(r);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(e){var t=this._classesToPreserve,r=(e.getAttribute("class")||"").split(/\s+/).filter(function(i){return t.indexOf(i)!=-1}).join(" ");for(r?e.setAttribute("class",r):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},_fixRelativeUris:function(e){var t=this._doc.baseURI,r=this._doc.documentURI;function i(n){if(t==r&&n.charAt(0)=="#")return n;try{return new URL(n,t).href}catch(u){}return n}var s=this._getAllNodesWithTag(e,["a"]);this._forEachNode(s,function(n){var u=n.getAttribute("href");if(u)if(u.indexOf("javascript:")===0)if(n.childNodes.length===1&&n.childNodes[0].nodeType===this.TEXT_NODE){var d=this._doc.createTextNode(n.textContent);n.parentNode.replaceChild(d,n)}else{for(var m=this._doc.createElement("span");n.firstChild;)m.appendChild(n.firstChild);n.parentNode.replaceChild(m,n)}else n.setAttribute("href",i(u))});var l=this._getAllNodesWithTag(e,["img","picture","figure","video","audio","source"]);this._forEachNode(l,function(n){var u=n.getAttribute("src"),d=n.getAttribute("poster"),m=n.getAttribute("srcset");if(u&&n.setAttribute("src",i(u)),d&&n.setAttribute("poster",i(d)),m){var A=m.replace(this.REGEXPS.srcsetUrl,function(w,I,C,k){return i(I)+(C||"")+k});n.setAttribute("srcset",A)}})},_simplifyNestedElements:function(e){for(var t=e;t;){if(t.parentNode&&["DIV","SECTION"].includes(t.tagName)&&!(t.id&&t.id.startsWith("readability"))){if(this._isElementWithoutContent(t)){t=this._removeAndGetNext(t);continue}else if(this._hasSingleTagInsideElement(t,"DIV")||this._hasSingleTagInsideElement(t,"SECTION")){for(var r=t.children[0],i=0;i<t.attributes.length;i++)r.setAttribute(t.attributes[i].name,t.attributes[i].value);t.parentNode.replaceChild(r,t),t=r;continue}}t=this._getNextNode(t)}},_getArticleTitle:function(){var e=this._doc,t="",r="";try{t=r=e.title.trim(),typeof t!="string"&&(t=r=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(A){}var i=!1;function s(A){return A.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))i=/ [\\\/>»] /.test(t),t=r.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(t)<3&&(t=r.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(t.indexOf(": ")!==-1){var l=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),n=t.trim(),u=this._someNode(l,function(A){return A.textContent.trim()===n});u||(t=r.substring(r.lastIndexOf(":")+1),s(t)<3?t=r.substring(r.indexOf(":")+1):s(r.substr(0,r.indexOf(":")))>5&&(t=r))}else if(t.length>150||t.length<15){var d=e.getElementsByTagName("h1");d.length===1&&(t=this._getInnerText(d[0]))}t=t.trim().replace(this.REGEXPS.normalize," ");var m=s(t);return m<=4&&(!i||m!=s(r.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=r),t},_prepDocument:function(){var e=this._doc;this._removeNodes(this._getAllNodesWithTag(e,["style"])),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(this._getAllNodesWithTag(e,["font"]),"SPAN")},_nextNode:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(t){for(var r=t.nextSibling,i=!1;(r=this._nextNode(r))&&r.tagName=="BR";){i=!0;var s=r.nextSibling;r.parentNode.removeChild(r),r=s}if(i){var l=this._doc.createElement("p");for(t.parentNode.replaceChild(l,t),r=l.nextSibling;r;){if(r.tagName=="BR"){var n=this._nextNode(r.nextSibling);if(n&&n.tagName=="BR")break}if(!this._isPhrasingContent(r))break;var u=r.nextSibling;l.appendChild(r),r=u}for(;l.lastChild&&this._isWhitespace(l.lastChild);)l.removeChild(l.lastChild);l.parentNode.tagName==="P"&&this._setNodeTag(l.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),this._docJSDOMParser)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var r=e.ownerDocument.createElement(t);e.firstChild;)r.appendChild(e.firstChild);e.parentNode.replaceChild(r,e),e.readability&&(r.readability=e.readability);for(var i=0;i<e.attributes.length;i++)try{r.setAttribute(e.attributes[i].name,e.attributes[i].value)}catch(s){}return r},_prepArticle:function(e){this._cleanStyles(e),this._markDataTables(e),this._fixLazyImages(e),this._cleanConditionally(e,"form"),this._cleanConditionally(e,"fieldset"),this._clean(e,"object"),this._clean(e,"embed"),this._clean(e,"footer"),this._clean(e,"link"),this._clean(e,"aside");var t=this.DEFAULT_CHAR_THRESHOLD;this._forEachNode(e.children,function(r){this._cleanMatchedNodes(r,function(i,s){return this.REGEXPS.shareElements.test(s)&&i.textContent.length<t})}),this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._replaceNodeTags(this._getAllNodesWithTag(e,["h1"]),"h2"),this._removeNodes(this._getAllNodesWithTag(e,["p"]),function(r){var i=r.getElementsByTagName("img").length,s=r.getElementsByTagName("embed").length,l=r.getElementsByTagName("object").length,n=r.getElementsByTagName("iframe").length,u=i+s+l+n;return u===0&&!this._getInnerText(r,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(r){var i=this._nextNode(r.nextSibling);i&&i.tagName=="P"&&r.parentNode.removeChild(r)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(r){var i=this._hasSingleTagInsideElement(r,"TBODY")?r.firstElementChild:r;if(this._hasSingleTagInsideElement(i,"TR")){var s=i.firstElementChild;if(this._hasSingleTagInsideElement(s,"TD")){var l=s.firstElementChild;l=this._setNodeTag(l,this._everyNode(l.childNodes,this._isPhrasingContent)?"P":"DIV"),r.parentNode.replaceChild(l,r)}}})},_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5;break}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do e=e.parentNode;while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},_textSimilarity:function(e,t){var r=e.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean),i=t.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);if(!r.length||!i.length)return 0;var s=i.filter(n=>!r.includes(n)),l=s.join(" ").length/i.join(" ").length;return 1-l},_checkByline:function(e,t){if(this._articleByline)return!1;if(e.getAttribute!==void 0)var r=e.getAttribute("rel"),i=e.getAttribute("itemprop");return(r==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(t))&&this._isValidByline(e.textContent)?(this._articleByline=e.textContent.trim(),!0):!1},_getNodeAncestors:function(e,t){t=t||0;for(var r=0,i=[];e.parentNode&&(i.push(e.parentNode),!(t&&++r===t));)e=e.parentNode;return i},_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,r=e!==null;if(e=e||this._doc.body,!e)return this.log("No body found in document. Abort."),null;for(var i=e.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),l=[],n=this._doc.documentElement;let We=!0;for(;n;){n.tagName==="HTML"&&(this._articleLang=n.getAttribute("lang"));var u=n.className+" "+n.id;if(!this._isProbablyVisible(n)){this.log("Removing hidden node - "+u),n=this._removeAndGetNext(n);continue}if(this._checkByline(n,u)){n=this._removeAndGetNext(n);continue}if(We&&this._headerDuplicatesTitle(n)){this.log("Removing header: ",n.textContent.trim(),this._articleTitle.trim()),We=!1,n=this._removeAndGetNext(n);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(u)&&!this.REGEXPS.okMaybeItsACandidate.test(u)&&!this._hasAncestorTag(n,"table")&&!this._hasAncestorTag(n,"code")&&n.tagName!=="BODY"&&n.tagName!=="A"){this.log("Removing unlikely candidate - "+u),n=this._removeAndGetNext(n);continue}if(this.UNLIKELY_ROLES.includes(n.getAttribute("role"))){this.log("Removing content with role "+n.getAttribute("role")+" - "+u),n=this._removeAndGetNext(n);continue}}if((n.tagName==="DIV"||n.tagName==="SECTION"||n.tagName==="HEADER"||n.tagName==="H1"||n.tagName==="H2"||n.tagName==="H3"||n.tagName==="H4"||n.tagName==="H5"||n.tagName==="H6")&&this._isElementWithoutContent(n)){n=this._removeAndGetNext(n);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(n.tagName)!==-1&&l.push(n),n.tagName==="DIV"){for(var d=null,m=n.firstChild;m;){var A=m.nextSibling;if(this._isPhrasingContent(m))d!==null?d.appendChild(m):this._isWhitespace(m)||(d=t.createElement("p"),n.replaceChild(d,m),d.appendChild(m));else if(d!==null){for(;d.lastChild&&this._isWhitespace(d.lastChild);)d.removeChild(d.lastChild);d=null}m=A}if(this._hasSingleTagInsideElement(n,"P")&&this._getLinkDensity(n)<.25){var w=n.children[0];n.parentNode.replaceChild(w,n),n=w,l.push(n)}else this._hasChildBlockElement(n)||(n=this._setNodeTag(n,"P"),l.push(n))}n=this._getNextNode(n)}var I=[];this._forEachNode(l,function(te){if(!(!te.parentNode||typeof te.parentNode.tagName=="undefined")){var se=this._getInnerText(te);if(!(se.length<25)){var tt=this._getNodeAncestors(te,5);if(tt.length!==0){var Le=0;Le+=1,Le+=se.split(",").length,Le+=Math.min(Math.floor(se.length/100),3),this._forEachNode(tt,function(he,ze){if(!(!he.tagName||!he.parentNode||typeof he.parentNode.tagName=="undefined")){if(typeof he.readability=="undefined"&&(this._initializeNode(he),I.push(he)),ze===0)var je=1;else ze===1?je=2:je=ze*3;he.readability.contentScore+=Le/je}})}}}});for(var C=[],k=0,D=I.length;k<D;k+=1){var T=I[k],g=T.readability.contentScore*(1-this._getLinkDensity(T));T.readability.contentScore=g,this.log("Candidate:",T,"with score "+g);for(var p=0;p<this._nbTopCandidates;p++){var o=C[p];if(!o||g>o.readability.contentScore){C.splice(p,0,T),C.length>this._nbTopCandidates&&C.pop();break}}}var a=C[0]||null,f=!1,c;if(a===null||a.tagName==="BODY"){for(a=t.createElement("DIV"),f=!0;e.firstChild;)this.log("Moving child out:",e.firstChild),a.appendChild(e.firstChild);e.appendChild(a),this._initializeNode(a)}else if(a){for(var P=[],H=1;H<C.length;H++)C[H].readability.contentScore/a.readability.contentScore>=.75&&P.push(this._getNodeAncestors(C[H]));var K=3;if(P.length>=K)for(c=a.parentNode;c.tagName!=="BODY";){for(var ve=0,Q=0;Q<P.length&&ve<K;Q++)ve+=Number(P[Q].includes(c));if(ve>=K){a=c;break}c=c.parentNode}a.readability||this._initializeNode(a),c=a.parentNode;for(var Ge=a.readability.contentScore,_t=Ge/3;c.tagName!=="BODY";){if(!c.readability){c=c.parentNode;continue}var V=c.readability.contentScore;if(V<_t)break;if(V>Ge){a=c;break}Ge=c.readability.contentScore,c=c.parentNode}for(c=a.parentNode;c.tagName!="BODY"&&c.children.length==1;)a=c,c=a.parentNode;a.readability||this._initializeNode(a)}var U=t.createElement("DIV");r&&(U.id="readability-content");var ee=Math.max(10,a.readability.contentScore*.2);c=a.parentNode;for(var Ve=c.children,S=0,ae=Ve.length;S<ae;S++){var O=Ve[S],Ae=!1;if(this.log("Looking at sibling node:",O,O.readability?"with score "+O.readability.contentScore:""),this.log("Sibling has score",O.readability?O.readability.contentScore:"Unknown"),O===a)Ae=!0;else{var Se=0;if(O.className===a.className&&a.className!==""&&(Se+=a.readability.contentScore*.2),O.readability&&O.readability.contentScore+Se>=ee)Ae=!0;else if(O.nodeName==="P"){var De=this._getLinkDensity(O),et=this._getInnerText(O),Ne=et.length;(Ne>80&&De<.25||Ne<80&&Ne>0&&De===0&&et.search(/\.( |$)/)!==-1)&&(Ae=!0)}}Ae&&(this.log("Appending node:",O),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(O.nodeName)===-1&&(this.log("Altering sibling:",O,"to div."),O=this._setNodeTag(O,"DIV")),U.appendChild(O),Ve=c.children,S-=1,ae-=1)}if(this._debug&&this.log("Article content pre-prep: "+U.innerHTML),this._prepArticle(U),this._debug&&this.log("Article content post-prep: "+U.innerHTML),f)a.id="readability-page-1",a.className="page";else{var Re=t.createElement("DIV");for(Re.id="readability-page-1",Re.className="page";U.firstChild;)Re.appendChild(U.firstChild);U.appendChild(Re)}this._debug&&this.log("Article content after paging: "+U.innerHTML);var xe=!0,ye=this._getInnerText(U,!0).length;if(ye<this._charThreshold)if(xe=!1,e.innerHTML=i,this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS),this._attempts.push({articleContent:U,textLength:ye});else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES),this._attempts.push({articleContent:U,textLength:ye});else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY),this._attempts.push({articleContent:U,textLength:ye});else{if(this._attempts.push({articleContent:U,textLength:ye}),this._attempts.sort(function(te,se){return se.textLength-te.textLength}),!this._attempts[0].textLength)return null;U=this._attempts[0].articleContent,xe=!0}if(xe){var $e=[c,a].concat(this._getNodeAncestors(c));return this._someNode($e,function(te){if(!te.tagName)return!1;var se=te.getAttribute("dir");return se?(this._articleDir=se,!0):!1}),U}}},_isValidByline:function(e){return typeof e=="string"||e instanceof String?(e=e.trim(),e.length>0&&e.length<100):!1},_unescapeHtmlEntities:function(e){if(!e)return e;var t=this.HTML_ESCAPE_MAP;return e.replace(/&(quot|amp|apos|lt|gt);/g,function(r,i){return t[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(r,i,s){var l=parseInt(i||s,i?16:10);return String.fromCharCode(l)})},_getJSONLD:function(e){var t=this._getAllNodesWithTag(e,["script"]),r;return this._forEachNode(t,function(i){if(!r&&i.getAttribute("type")==="application/ld+json")try{var s=i.textContent.replace(/^\s*<!\[CDATA\[|\]\]>\s*$/g,""),l=JSON.parse(s);if(!l["@context"]||!l["@context"].match(/^https?\:\/\/schema\.org$/)||(!l["@type"]&&Array.isArray(l["@graph"])&&(l=l["@graph"].find(function(m){return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!l||!l["@type"]||!l["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(r={},typeof l.name=="string"&&typeof l.headline=="string"&&l.name!==l.headline){var n=this._getArticleTitle(),u=this._textSimilarity(l.name,n)>.75,d=this._textSimilarity(l.headline,n)>.75;d&&!u?r.title=l.headline:r.title=l.name}else typeof l.name=="string"?r.title=l.name.trim():typeof l.headline=="string"&&(r.title=l.headline.trim());l.author&&(typeof l.author.name=="string"?r.byline=l.author.name.trim():Array.isArray(l.author)&&l.author[0]&&typeof l.author[0].name=="string"&&(r.byline=l.author.filter(function(m){return m&&typeof m.name=="string"}).map(function(m){return m.name.trim()}).join(", "))),typeof l.description=="string"&&(r.excerpt=l.description.trim()),l.publisher&&typeof l.publisher.name=="string"&&(r.siteName=l.publisher.name.trim());return}catch(m){this.log(m.message)}}),r||{}},_getArticleMetadata:function(e){var t={},r={},i=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,l=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(n){var u=n.getAttribute("name"),d=n.getAttribute("property"),m=n.getAttribute("content");if(m){var A=null,w=null;d&&(A=d.match(s),A&&(w=A[0].toLowerCase().replace(/\s/g,""),r[w]=m.trim())),!A&&u&&l.test(u)&&(w=u,m&&(w=w.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),r[w]=m.trim()))}}),t.title=e.title||r["dc:title"]||r["dcterm:title"]||r["og:title"]||r["weibo:article:title"]||r["weibo:webpage:title"]||r.title||r["twitter:title"],t.title||(t.title=this._getArticleTitle()),t.byline=e.byline||r["dc:creator"]||r["dcterm:creator"]||r.author,t.excerpt=e.excerpt||r["dc:description"]||r["dcterm:description"]||r["og:description"]||r["weibo:article:description"]||r["weibo:webpage:description"]||r.description||r["twitter:description"],t.siteName=e.siteName||r["og:site_name"],t.title=this._unescapeHtmlEntities(t.title),t.byline=this._unescapeHtmlEntities(t.byline),t.excerpt=this._unescapeHtmlEntities(t.excerpt),t.siteName=this._unescapeHtmlEntities(t.siteName),t},_isSingleImage:function(e){return e.tagName==="IMG"?!0:e.children.length!==1||e.textContent.trim()!==""?!1:this._isSingleImage(e.children[0])},_unwrapNoscriptImages:function(e){var t=Array.from(e.getElementsByTagName("img"));this._forEachNode(t,function(i){for(var s=0;s<i.attributes.length;s++){var l=i.attributes[s];switch(l.name){case"src":case"srcset":case"data-src":case"data-srcset":return}if(/\.(jpg|jpeg|png|webp)/i.test(l.value))return}i.parentNode.removeChild(i)});var r=Array.from(e.getElementsByTagName("noscript"));this._forEachNode(r,function(i){var s=e.createElement("div");if(s.innerHTML=i.innerHTML,!!this._isSingleImage(s)){var l=i.previousElementSibling;if(l&&this._isSingleImage(l)){var n=l;n.tagName!=="IMG"&&(n=l.getElementsByTagName("img")[0]);for(var u=s.getElementsByTagName("img")[0],d=0;d<n.attributes.length;d++){var m=n.attributes[d];if(m.value!==""&&(m.name==="src"||m.name==="srcset"||/\.(jpg|jpeg|png|webp)/i.test(m.value))){if(u.getAttribute(m.name)===m.value)continue;var A=m.name;u.hasAttribute(A)&&(A="data-old-"+A),u.setAttribute(A,m.value)}}i.parentNode.replaceChild(s.firstElementChild,l)}}})},_removeScripts:function(e){this._removeNodes(this._getAllNodesWithTag(e,["script"]),function(t){return t.nodeValue="",t.removeAttribute("src"),!0}),this._removeNodes(this._getAllNodesWithTag(e,["noscript"]))},_hasSingleTagInsideElement:function(e,t){return e.children.length!=1||e.children[0].tagName!==t?!1:!this._someNode(e.childNodes,function(r){return r.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(r.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&e.textContent.trim().length==0&&(e.children.length==0||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(t){return this.DIV_TO_P_ELEMS.has(t.tagName)||this._hasChildBlockElement(t)})},_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||this.PHRASING_ELEMS.indexOf(e.tagName)!==-1||(e.tagName==="A"||e.tagName==="DEL"||e.tagName==="INS")&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&e.textContent.trim().length===0||e.nodeType===this.ELEMENT_NODE&&e.tagName==="BR"},_getInnerText:function(e,t){t=typeof t=="undefined"?!0:t;var r=e.textContent.trim();return t?r.replace(this.REGEXPS.normalize," "):r},_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},_cleanStyles:function(e){if(!(!e||e.tagName.toLowerCase()==="svg")){for(var t=0;t<this.PRESENTATIONAL_ATTRIBUTES.length;t++)e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[t]);this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.indexOf(e.tagName)!==-1&&(e.removeAttribute("width"),e.removeAttribute("height"));for(var r=e.firstElementChild;r!==null;)this._cleanStyles(r),r=r.nextElementSibling}},_getLinkDensity:function(e){var t=this._getInnerText(e).length;if(t===0)return 0;var r=0;return this._forEachNode(e.getElementsByTagName("a"),function(i){var s=i.getAttribute("href"),l=s&&this.REGEXPS.hashUrl.test(s)?.3:1;r+=this._getInnerText(i).length*l}),r/t},_getClassWeight:function(e){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var t=0;return typeof e.className=="string"&&e.className!==""&&(this.REGEXPS.negative.test(e.className)&&(t-=25),this.REGEXPS.positive.test(e.className)&&(t+=25)),typeof e.id=="string"&&e.id!==""&&(this.REGEXPS.negative.test(e.id)&&(t-=25),this.REGEXPS.positive.test(e.id)&&(t+=25)),t},_clean:function(e,t){var r=["object","embed","iframe"].indexOf(t)!==-1;this._removeNodes(this._getAllNodesWithTag(e,[t]),function(i){if(r){for(var s=0;s<i.attributes.length;s++)if(this.REGEXPS.videos.test(i.attributes[s].value))return!1;if(i.tagName==="object"&&this.REGEXPS.videos.test(i.innerHTML))return!1}return!0})},_hasAncestorTag:function(e,t,r,i){r=r||3,t=t.toUpperCase();for(var s=0;e.parentNode;){if(r>0&&s>r)return!1;if(e.parentNode.tagName===t&&(!i||i(e.parentNode)))return!0;e=e.parentNode,s++}return!1},_getRowAndColumnCount:function(e){for(var t=0,r=0,i=e.getElementsByTagName("tr"),s=0;s<i.length;s++){var l=i[s].getAttribute("rowspan")||0;l&&(l=parseInt(l,10)),t+=l||1;for(var n=0,u=i[s].getElementsByTagName("td"),d=0;d<u.length;d++){var m=u[d].getAttribute("colspan")||0;m&&(m=parseInt(m,10)),n+=m||1}r=Math.max(r,n)}return{rows:t,columns:r}},_markDataTables:function(e){for(var t=e.getElementsByTagName("table"),r=0;r<t.length;r++){var i=t[r],s=i.getAttribute("role");if(s=="presentation"){i._readabilityDataTable=!1;continue}var l=i.getAttribute("datatable");if(l=="0"){i._readabilityDataTable=!1;continue}var n=i.getAttribute("summary");if(n){i._readabilityDataTable=!0;continue}var u=i.getElementsByTagName("caption")[0];if(u&&u.childNodes.length>0){i._readabilityDataTable=!0;continue}var d=["col","colgroup","tfoot","thead","th"],m=function(w){return!!i.getElementsByTagName(w)[0]};if(d.some(m)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var A=this._getRowAndColumnCount(i);if(A.rows>=10||A.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=A.rows*A.columns>10}},_fixLazyImages:function(e){this._forEachNode(this._getAllNodesWithTag(e,["img","picture","figure"]),function(t){if(t.src&&this.REGEXPS.b64DataUrl.test(t.src)){var r=this.REGEXPS.b64DataUrl.exec(t.src);if(r[1]==="image/svg+xml")return;for(var i=!1,s=0;s<t.attributes.length;s++){var l=t.attributes[s];if(l.name!=="src"&&/\.(jpg|jpeg|png|webp)/i.test(l.value)){i=!0;break}}if(i){var n=t.src.search(/base64\s*/i)+7,u=t.src.length-n;u<133&&t.removeAttribute("src")}}if(!((t.src||t.srcset&&t.srcset!="null")&&t.className.toLowerCase().indexOf("lazy")===-1)){for(var d=0;d<t.attributes.length;d++)if(l=t.attributes[d],!(l.name==="src"||l.name==="srcset"||l.name==="alt")){var m=null;if(/\.(jpg|jpeg|png|webp)\s+\d/.test(l.value)?m="srcset":/^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$/.test(l.value)&&(m="src"),m){if(t.tagName==="IMG"||t.tagName==="PICTURE")t.setAttribute(m,l.value);else if(t.tagName==="FIGURE"&&!this._getAllNodesWithTag(t,["img","picture"]).length){var A=this._doc.createElement("img");A.setAttribute(m,l.value),t.appendChild(A)}}}}})},_getTextDensity:function(e,t){var r=this._getInnerText(e,!0).length;if(r===0)return 0;var i=0,s=this._getAllNodesWithTag(e,t);return this._forEachNode(s,l=>i+=this._getInnerText(l,!0).length),i/r},_cleanConditionally:function(e,t){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(e,[t]),function(r){var i=function(f){return f._readabilityDataTable},s=t==="ul"||t==="ol";if(!s){var l=0,n=this._getAllNodesWithTag(r,["ul","ol"]);this._forEachNode(n,f=>l+=this._getInnerText(f).length),s=l/this._getInnerText(r).length>.9}if(t==="table"&&i(r)||this._hasAncestorTag(r,"table",-1,i)||this._hasAncestorTag(r,"code"))return!1;var u=this._getClassWeight(r);this.log("Cleaning Conditionally",r);var d=0;if(u+d<0)return!0;if(this._getCharCount(r,",")<10){for(var m=r.getElementsByTagName("p").length,A=r.getElementsByTagName("img").length,w=r.getElementsByTagName("li").length-100,I=r.getElementsByTagName("input").length,C=this._getTextDensity(r,["h1","h2","h3","h4","h5","h6"]),k=0,D=this._getAllNodesWithTag(r,["object","embed","iframe"]),T=0;T<D.length;T++){for(var g=0;g<D[T].attributes.length;g++)if(this.REGEXPS.videos.test(D[T].attributes[g].value))return!1;if(D[T].tagName==="object"&&this.REGEXPS.videos.test(D[T].innerHTML))return!1;k++}var p=this._getLinkDensity(r),o=this._getInnerText(r).length,a=A>1&&m/A<.5&&!this._hasAncestorTag(r,"figure")||!s&&w>m||I>Math.floor(m/3)||!s&&C<.9&&o<25&&(A===0||A>2)&&!this._hasAncestorTag(r,"figure")||!s&&u<25&&p>.2||u>=25&&p>.5||k===1&&o<75||k>1;return a}return!1})},_cleanMatchedNodes:function(e,t){for(var r=this._getNextNode(e,!0),i=this._getNextNode(e);i&&i!=r;)t.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(e){let t=this._getAllNodesWithTag(e,["h1","h2"]);this._removeNodes(t,function(r){let i=this._getClassWeight(r)<0;return i&&this.log("Removing header with low class weight:",r),i})},_headerDuplicatesTitle:function(e){if(e.tagName!="H1"&&e.tagName!="H2")return!1;var t=this._getInnerText(e,!1);return this.log("Evaluating similarity of header:",t,this._articleTitle),this._textSimilarity(this._articleTitle,t)>.75},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return(!e.style||e.style.display!="none")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||e.getAttribute("aria-hidden")!="true"||e.className&&e.className.indexOf&&e.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._unwrapNoscriptImages(this._doc);var t=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var r=this._getArticleMetadata(t);this._articleTitle=r.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!r.excerpt){var s=i.getElementsByTagName("p");s.length>0&&(r.excerpt=s[0].textContent.trim())}var l=i.textContent;return{title:this._articleTitle,byline:r.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:l,length:l.length,excerpt:r.excerpt,siteName:r.siteName||this._articleSiteName}}};typeof pr=="object"&&(pr.exports=_i)});var Di=Ee((vs,gr)=>{var Si={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function la(e){return(!e.style||e.style.display!="none")&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||e.getAttribute("aria-hidden")!="true"||e.className&&e.className.indexOf&&e.className.indexOf("fallback-image")!==-1)}function ca(e,t={}){typeof t=="function"&&(t={visibilityChecker:t});var r={minScore:20,minContentLength:140,visibilityChecker:la};t=Object.assign(r,t);var i=e.querySelectorAll("p, pre, article"),s=e.querySelectorAll("div > br");if(s.length){var l=new Set(i);[].forEach.call(s,function(u){l.add(u.parentNode)}),i=Array.from(l)}var n=0;return[].some.call(i,function(u){if(!t.visibilityChecker(u))return!1;var d=u.className+" "+u.id;if(Si.unlikelyCandidates.test(d)&&!Si.okMaybeItsACandidate.test(d)||u.matches("li p"))return!1;var m=u.textContent.trim().length;return m<t.minContentLength?!1:(n+=Math.sqrt(m-t.minContentLength),n>t.minScore)})}typeof gr=="object"&&(gr.exports=ca)});var xi=Ee((As,Ri)=>{var ua=wi(),ha=Di();Ri.exports={Readability:ua,isProbablyReaderable:ha}});var pa={};gn(pa,{default:()=>Et});module.exports=mn(pa);var ue=require("obsidian");var $r=require("obsidian");async function zt(e){return{fileContent:await(await(0,$r.requestUrl)({url:e.href,method:"get"})).arrayBuffer,fileExtension:e.pathname.slice(e.pathname.lastIndexOf(".")+1)}}var ft=require("obsidian");async function Ze(e,t){t=(0,ft.normalizePath)(t);let r=e.getAbstractFileByPath(t);r&&r instanceof ft.TFolder||await e.createFolder(t)}var Xr=require("path");var Wr=ke(require("path")),zr=require("obsidian");function Qe(e){try{new URL(e)}catch(t){return!1}return!0}function jt(e,t){return new URL(e,t).href}function ne(e){return e.replace(/[:#/\\|?*<>"]/g,"")}function pt(e,t){let r=Wr.default.join(e,t);return(0,zr.normalizePath)(r.replace(/\\/g,"/"))}var Yt=ke(qr()),qt=class{constructor(){this.linksInfo={}}ensureHashGenerated(t,r){this.linksInfo[t.href]||(this.linksInfo[t.href]=Yt.ArrayBuffer.hash(r))}isSame(t,r){let i=Yt.ArrayBuffer.hash(r);return this.linksInfo[t.href]==i}},gt=new qt;var dn=/!\[(?<anchor>.*?)\]\((?<link>.+?)\)/g;async function _e(e,t,r){return await vn(t,dn,yn(e,r))}function vn(e,t,r){try{if(typeof r=="function"){let i=[];return String.prototype.replace.call(e,t,function(s,l,n){return i.push(r(s,l,n)),""}),Promise.all(i).then(function(s){return String.prototype.replace.call(e,t,function(){return s.shift()})})}else return Promise.resolve(String.prototype.replace.call(e,t,r))}catch(i){return Promise.reject(i)}}var An=5;function yn(e,t){return async function(i,s,l){if(!Qe(l))return i;let n=new URL(l);await Ze(e.vault,t);try{let{fileContent:u,fileExtension:d}=await zt(n),m=0;for(;m<An;)try{let{fileName:A,needWrite:w}=await Tn(e.vault.adapter,t,s,n,u,d);if(w&&A&&await e.vault.createBinary(A,u),A){let I=A.replace(/\s/g,"%20");return`![${s}](${I})`}else return i}catch(A){if(A.message==="File already exists.")m++;else throw A}return i}catch(u){return console.warn("Image processing failed: ",u),i}}}var Nn="media",bn=1e3;async function Tn(e,t,r,i,s,l){if(!l)return{fileName:"",needWrite:!1};r||(r=(0,Xr.basename)(i.pathname)),r||(r=Nn),r.endsWith(`.${l}`)&&(r=r.slice(0,-1*(l.length+1))),r=ne(r);let n="",u=!0,d=0;for(;!n&&d<bn;){let m=d?pt(t,`${r}-${d}.${l}`):pt(t,`${r}.${l}`);if(await e.exists(m,!1)){gt.ensureHashGenerated(i,s);let A=await e.readBinary(m);gt.isSame(i,A)&&(n=m,u=!1)}else n=m;d++}if(!n)throw new Error("Failed to generate file name for media file.");return gt.ensureHashGenerated(i,s),{fileName:n,needWrite:u}}var Kr=require("obsidian");function mt(e){throw new Kr.Notice("Error occured. Please check console output for detailed information."),e}var R={inboxDir:"ReadItLater Inbox",assetsDir:"ReadItLater Inbox/assets",openNewNote:!1,youtubeNoteTitle:"Youtube - %title%",youtubeNote:`[[ReadItLater]] [[Youtube]]
|
|
|
|
# [%videoTitle%](%videoURL%)
|
|
|
|
%videoPlayer%`,vimeoNoteTitle:"Vimeo - %title%",vimeoNote:`[[ReadItLater]] [[Vimeo]]
|
|
|
|
# [%videoTitle%](%videoURL%)
|
|
|
|
%videoPlayer%`,bilibiliNoteTitle:"Bilibili - %title%",bilibiliNote:`[[ReadItLater]] [[Bilibili]]
|
|
|
|
# [%videoTitle%](%videoURL%)
|
|
|
|
%videoPlayer%`,twitterNoteTitle:"Tweet from %tweetAuthorName% (%date%)",twitterNote:`[[ReadItLater]] [[Tweet]]
|
|
|
|
# [%tweetAuthorName%](%tweetURL%)
|
|
|
|
%tweetContent%`,parseableArticleNoteTitle:"%title%",parsableArticleNote:`[[ReadItLater]] [[Article]]
|
|
|
|
# [%articleTitle%](%articleURL%)
|
|
|
|
%articleContent%`,notParseableArticleNoteTitle:"Article %date%",notParsableArticleNote:`[[ReadItLater]] [[Article]]
|
|
|
|
[%articleURL%](%articleURL%)`,textSnippetNoteTitle:"Note %date%",textSnippetNote:`[[ReadItLater]] [[Textsnippet]]
|
|
|
|
%content%`,mastodonNoteTitle:"Toot from %tootAuthorName% (%date%)",mastodonNote:`[[ReadItLater]] [[Toot]]
|
|
|
|
# [%tootAuthorName%](%tootURL%)
|
|
|
|
> %tootContent%`,downloadImages:!0,downloadImagesInArticleDir:!1,dateTitleFmt:"YYYY-MM-DD HH-mm-ss",dateContentFmt:"YYYY-MM-DD",downloadMastodonMediaAttachments:!0,downloadMastodonMediaAttachmentsInDir:!1,saveMastodonReplies:!1,mastodonReply:`[%tootAuthorName%](%tootURL%)
|
|
|
|
> %tootContent%`,stackExchangeNoteTitle:"%title%",stackExchangeNote:`[[ReadItLater]] [[StackExchange]]
|
|
|
|
# [%questionTitle%](%questionURL%)
|
|
|
|
Author: [%authorName%](%authorProfileURL%)
|
|
|
|
%questionContent%
|
|
|
|
***
|
|
|
|
%topAnswer%
|
|
|
|
%answers%`,stackExchangeAnswer:`Answered by: [%authorName%](%authorProfileURL%)
|
|
|
|
%answerContent%`,downloadStackExchangeAssets:!0,downloadStackExchangeAssetsInDir:!1,youtubeApiKey:""};var x=require("obsidian");var dt=class extends x.PluginSettingTab{constructor(r,i){super(r,i);this.plugin=i}display(){let{containerEl:r}=this;r.empty(),r.createEl("h2",{text:"General"}),new x.Setting(r).setName("Inbox dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is enetred, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.inboxDir||R.inboxDir).onChange(async u=>{this.plugin.settings.inboxDir=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Assets dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is enetred, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.assetsDir||R.inboxDir+"/assets").onChange(async u=>{this.plugin.settings.assetsDir=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Open new note").setDesc("If enabled, new note will open in current workspace").addToggle(n=>n.setValue(this.plugin.settings.openNewNote||R.openNewNote).onChange(async u=>{this.plugin.settings.openNewNote=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Date format string").setDesc("Format of the %date% variable. NOTE: do not use symbols forbidden in file names.").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD HH-mm-ss").setValue(this.plugin.settings.dateTitleFmt||R.dateTitleFmt).onChange(async u=>{this.plugin.settings.dateTitleFmt=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Date format string in contents").setDesc("Format of the %date% variable for contents").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD").setValue(this.plugin.settings.dateContentFmt||R.dateContentFmt).onChange(async u=>{this.plugin.settings.dateContentFmt=u,await this.plugin.saveSettings()})),r.createEl("h2",{text:"YouTube"}),new x.Setting(r).setName("Youtube note template title").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.youtubeNoteTitle||R.youtubeNoteTitle).onChange(async u=>{this.plugin.settings.youtubeNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Youtube note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %channelId%, %channelName%, %channelURL%").addTextArea(n=>{n.setValue(this.plugin.settings.youtubeNote||R.youtubeNote).onChange(async u=>{this.plugin.settings.youtubeNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new x.Setting(r).setName("Youtube Data API v3 key").setDesc("If entered, additional template variables are available").addText(n=>n.setPlaceholder("").setValue(this.plugin.settings.youtubeApiKey||R.youtubeApiKey).onChange(async u=>{this.plugin.settings.youtubeApiKey=u,await this.plugin.saveSettings()})),r.createEl("h2",{text:"Vimeo"}),new x.Setting(r).setName("Vimeo note title template").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.vimeoNoteTitle||R.vimeoNoteTitle).onChange(async u=>{this.plugin.settings.vimeoNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Vimeo note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %channelName%, %channelURL%").addTextArea(n=>{n.setValue(this.plugin.settings.vimeoNote||R.vimeoNote).onChange(async u=>{this.plugin.settings.vimeoNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),r.createEl("h2",{text:"Bilibili"}),new x.Setting(r).setName("Bilibili note template title").setDesc("Available variables: %title%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.bilibiliNoteTitle||R.bilibiliNoteTitle).onChange(async u=>{this.plugin.settings.bilibiliNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Bilibili note template").setDesc("Available variables: %videoTitle%, %videoURL%, %videoId%, %videoPlayer%").addTextArea(n=>{n.setValue(this.plugin.settings.bilibiliNote||R.bilibiliNote).onChange(async u=>{this.plugin.settings.bilibiliNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),r.createEl("h2",{text:"Twitter"}),new x.Setting(r).setName("Twitter note template title").setDesc("Available variables: %tweetAuthorName%, %date%").addText(n=>n.setPlaceholder("Defaults to %tweetAuthorName%").setValue(this.plugin.settings.twitterNoteTitle||R.twitterNoteTitle).onChange(async u=>{this.plugin.settings.twitterNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Twitter note template").setDesc("Available variables: %date%, %tweetAuthorName%, %tweetURL%, %tweetContent%").addTextArea(n=>{n.setValue(this.plugin.settings.twitterNote||R.twitterNote).onChange(async u=>{this.plugin.settings.twitterNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),r.createEl("h2",{text:"Stack Exchange"}),new x.Setting(r).setName("Stack Exchange note title template").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.stackExchangeNoteTitle||R.stackExchangeNoteTitle).onChange(async u=>{this.plugin.settings.stackExchangeNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Stack Exchange question note template").setDesc("Available variables: %date%, %questionTitle%, %questionURL%, %authorName%, %authorProfileURL%, %questionContent%, %topAnswer%, %answers%").addTextArea(n=>{n.setValue(this.plugin.settings.stackExchangeNote||R.stackExchangeNote).onChange(async u=>{this.plugin.settings.stackExchangeNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new x.Setting(r).setName("Stack Exchange answer template").setDesc("Available variables: %date%, %answerContent%, %authorName%, %authorProfileURL%").addTextArea(n=>{n.setValue(this.plugin.settings.stackExchangeAnswer||R.stackExchangeAnswer).onChange(async u=>{this.plugin.settings.stackExchangeAnswer=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new x.Setting(r).setName("Download media attachments").setDesc("If enabled, media attachments are downloaded to the assets folder (only Desktop App feature)").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadStackExchangeAssets")?this.plugin.settings.downloadStackExchangeAssets:R.downloadStackExchangeAssets).onChange(async u=>{this.plugin.settings.downloadStackExchangeAssets=u,i.setDisabled(!u),await this.plugin.saveSettings()}));let i=new x.Setting(r).setName("Download media attachments to folder").setDesc("If enabled, the media attachments are stored in their own folder.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadStackExchangeAssetsInDir")?this.plugin.settings.downloadStackExchangeAssetsInDir:R.downloadStackExchangeAssetsInDir).onChange(async u=>{this.plugin.settings.downloadStackExchangeAssetsInDir=u,await this.plugin.saveSettings()}));r.createEl("h2",{text:"Mastodon"}),new x.Setting(r).setName("Mastodon note template title").setDesc("Available variables: %tootAuthorName%, %date%").addText(n=>n.setPlaceholder("Defaults to %tootAuthorName%").setValue(this.plugin.settings.mastodonNoteTitle||R.mastodonNoteTitle).onChange(async u=>{this.plugin.settings.mastodonNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Mastodon note template").setDesc("Available variables: %date%, %tootAuthorName%, %tootURL%, %tootContent%").addTextArea(n=>{n.setValue(this.plugin.settings.mastodonNote||R.mastodonNote).onChange(async u=>{this.plugin.settings.mastodonNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new x.Setting(r).setName("Download media attachments").setDesc("If enabled, media attachments of toot are downloaded to the assets folder (only Desktop App feature)").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadMastodonMediaAttachments")?this.plugin.settings.downloadMastodonMediaAttachments:R.downloadMastodonMediaAttachments).onChange(async u=>{this.plugin.settings.downloadMastodonMediaAttachments=u,s.setDisabled(!u),await this.plugin.saveSettings()}));let s=new x.Setting(r).setName("Download media attachments to folder").setDesc("If enabled, the media attachments of toot are stored in their own folder.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadMastodonMediaAttachmentsInDir")?this.plugin.settings.downloadMastodonMediaAttachmentsInDir:R.downloadMastodonMediaAttachmentsInDir).onChange(async u=>{this.plugin.settings.downloadMastodonMediaAttachmentsInDir=u,await this.plugin.saveSettings()}));new x.Setting(r).setName("Save replies").setDesc("If enabled, replies of toot will be saved.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"saveMastodonReplies")?this.plugin.settings.saveMastodonReplies:R.saveMastodonReplies).onChange(async u=>{this.plugin.settings.saveMastodonReplies=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Mastodon reply template").setDesc("Available variables: %tootAuthorName%, %tootURL%, %tootContent%").addTextArea(n=>{n.setValue(this.plugin.settings.mastodonReply||R.mastodonReply).onChange(async u=>{this.plugin.settings.mastodonReply=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),r.createEl("h2",{text:"Readable Article"}),new x.Setting(r).setName("Readable article note template title").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.parseableArticleNoteTitle||R.parseableArticleNoteTitle).onChange(async u=>{this.plugin.settings.parseableArticleNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Readable article note template").setDesc("Available variables: %date%, %articleTitle%, %articleURL%, %articleContent%, %author%, %siteName%, %articleReadingTime%").addTextArea(n=>{n.setValue(this.plugin.settings.parsableArticleNote||R.parsableArticleNote).onChange(async u=>{this.plugin.settings.parsableArticleNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new x.Setting(r).setName("Download images").setDesc("If enabled, images in article are downloaded to the assets folder (only Desktop App feature)").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadImages")?this.plugin.settings.downloadImages:R.downloadImages).onChange(async u=>{this.plugin.settings.downloadImages=u,l.setDisabled(!u),await this.plugin.saveSettings()}));let l=new x.Setting(r).setName("Download images to note folder").setDesc("If enabled, the images in article are stored in their own folder.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"downloadImagesInArticleDir")?this.plugin.settings.downloadImagesInArticleDir:R.downloadImagesInArticleDir).onChange(async u=>{this.plugin.settings.downloadImagesInArticleDir=u,await this.plugin.saveSettings()}));r.createEl("h2",{text:"Nonreadable Article"}),new x.Setting(r).setName("Nonreadable article note template title").setDesc("Available variables: %date%").addText(n=>n.setPlaceholder("Defaults to 'Article %date%'").setValue(this.plugin.settings.notParseableArticleNoteTitle||R.notParseableArticleNoteTitle).onChange(async u=>{this.plugin.settings.notParseableArticleNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Nonreadable article note template").setDesc("Available variables: %date%, %articleURL%").addTextArea(n=>{n.setValue(this.plugin.settings.notParsableArticleNote||R.notParsableArticleNote).onChange(async u=>{this.plugin.settings.notParsableArticleNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),r.createEl("h2",{text:"Text Snippet"}),new x.Setting(r).setName("Text snippet note template title").setDesc("Available variables: %date%").addText(n=>n.setPlaceholder("Defaults to 'Note %date%'").setValue(this.plugin.settings.textSnippetNoteTitle||R.textSnippetNoteTitle).onChange(async u=>{this.plugin.settings.textSnippetNoteTitle=u,await this.plugin.saveSettings()})),new x.Setting(r).setName("Text snippet note template").setDesc("Available variables: %date%, %content%").addTextArea(n=>{n.setValue(this.plugin.settings.textSnippetNote||R.textSnippetNote).onChange(async u=>{this.plugin.settings.textSnippetNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25})}};var vt=require("obsidian"),At=ke(Zr());var G=class{constructor(t,r){this.fileName=t,this.content=r}};var Kt=require("obsidian"),j=class{constructor(t,r){this.app=t,this.settings=r}isValidUrl(t){try{new URL(t)}catch(r){return!1}return!0}getFormattedDateForFilename(){return(0,Kt.moment)(new Date).format(this.settings.dateTitleFmt)}getFormattedDateForContent(){return(0,Kt.moment)(new Date).format(this.settings.dateContentFmt)}};var Jt=class extends j{constructor(r,i){super(r,i);this.PATTERN=/(youtube.com|youtu.be)\/(watch|shorts)?(\?v=|\/)?(\S+)?/}test(r){return this.isValidUrl(r)&&this.PATTERN.test(r)}async prepareNote(r){let i=this.settings.youtubeApiKey===""?await this.parseSchema(r):await this.parseApiResponse(r),s=this.settings.youtubeNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%videoTitle%/g,i.title).replace(/%videoId%/g,i.id).replace(/%videoDescription%/g,i.description).replace(/%videoThumbnail%/g,i.thumbnail).replace(/%videoDuration%/g,i.duration.toString()).replace(/%videoDurationFormatted%/g,i.durationFormatted).replace(/%videoViewsCount%/g,i.viewsCount.toString()).replace(/%videoURL%/g,i.url).replace(/%channelId%/g,i.channel.id).replace(/%channelName%/g,i.channel.name).replace(/%channelURL%/g,i.channel.url).replace(/%videoTags%/g,i.tags.join(" ")).replace(/%videoPlayer%/g,i.player),n=`${this.settings.youtubeNoteTitle.replace(/%title%/g,i.title).replace(/%date%/g,this.getFormattedDateForFilename())}.md`;return new G(n,s)}async parseApiResponse(r){var s;let i=this.PATTERN.exec(r)[4];try{let l=await(0,vt.request)({method:"GET",url:`https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,statistics,status,topicDetails&id=${i}&key=${this.settings.youtubeApiKey}`,headers:{Accept:"application/json"}}),n=JSON.parse(l);if(n.items.length===0)throw new Error(`Video (${r}) cannot be fetched from API`);let u=n.items[0],d=await(0,vt.request)({method:"GET",url:`https://www.googleapis.com/youtube/v3/channels?part=snippet,contentDetails,statistics&id=${u.snippet.channelId}&key=${this.settings.youtubeApiKey}`,headers:{Accept:"application/json"}}),m=JSON.parse(d);if(m.items.length===0)throw new Error(`Channel (${u.snippet.channelId}) cannot be fetched from API`);let A=m.items[0],w=`<iframe width="560" height="315" src="https://www.youtube.com/embed/${u.id}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`,I=(0,At.parse)(u.contentDetails.duration);return{id:u.id,url:r,title:u.snippet.title,description:u.snippet.description,thumbnail:u.snippet.thumbnails.default.url,player:w,duration:(0,At.toSeconds)(I),durationFormatted:this.formatDuration(I),viewsCount:u.statistics.viewCount,tags:u.snippet.tags.map(C=>C.replace(/[\s:\-_.]/g,"").replace(/^/,"#")),channel:{id:A.id,url:`https://www.youtube.com/channel/${A.id}`,name:(s=A.snippet.title)!=null?s:""}}}catch(l){mt(l)}}async parseSchema(r){var i,s,l,n,u,d,m,A,w,I;try{let C=await(0,vt.request)({method:"GET",url:r,headers:{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"}}),D=new DOMParser().parseFromString(C,"text/html").querySelector('[itemtype="http://schema.org/VideoObject"]'),T=(s=(i=D==null?void 0:D.querySelector('[itemprop="videoId"]'))==null?void 0:i.getAttribute("content"))!=null?s:"",g=D.querySelector('[itemtype="http://schema.org/Person"]'),p=`<iframe width="560" height="315" src="https://www.youtube.com/embed/${T}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`;return{id:T,url:r,title:(n=(l=D==null?void 0:D.querySelector('[itemprop="name"]'))==null?void 0:l.getAttribute("content"))!=null?n:"",description:"",thumbnail:"",player:p,duration:0,durationFormatted:"",viewsCount:0,tags:[],channel:{id:(d=(u=D==null?void 0:D.querySelector('[itemprop="channelId"'))==null?void 0:u.getAttribute("content"))!=null?d:"",url:(A=(m=g==null?void 0:g.querySelector('[itemprop="url"]'))==null?void 0:m.getAttribute("href"))!=null?A:"",name:(I=(w=g==null?void 0:g.querySelector('[itemprop="name"]'))==null?void 0:w.getAttribute("content"))!=null?I:""}}}catch(C){mt(C)}}formatDuration(r){let i="";return r.years>0&&(i=i.concat(" ",`${r.years}y`)),r.months>0&&(i=i.concat(" ",`${r.months}m`)),r.weeks>0&&(i=i.concat(" ",`${r.weeks}w`)),r.days>0&&(i=i.concat(" ",`${r.days}d`)),r.hours>0&&(i=i.concat(" ",`${r.hours}h`)),r.minutes>0&&(i=i.concat(" ",`${r.minutes}m`)),r.seconds>0&&(i=i.concat(" ",`${r.seconds}s`)),i.trim()}},Qr=Jt;var ei=require("obsidian");var Zt=class extends j{constructor(r,i){super(r,i);this.PATTERN=/(vimeo.com)\/(\d+)?/}test(r){return this.isValidUrl(r)&&this.PATTERN.test(r)}async prepareNote(r){let i=await this.parseSchema(r),s=this.settings.vimeoNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%videoTitle%/g,i.title).replace(/%videoId%/g,i.id).replace(/%videoURL%/g,i.url).replace(/%channelName%/g,i.channel.name).replace(/%channelURL%/g,i.channel.url).replace(/%videoPlayer%/g,i.player),n=`${this.settings.vimeoNoteTitle.replace(/%title%/g,i.title).replace(/%date%/g,this.getFormattedDateForFilename())}.md`;return new G(n,s)}async parseSchema(r){var m,A,w,I,C,k;let i=await(0,ei.request)({method:"GET",url:r,headers:{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"}}),l=new DOMParser().parseFromString(i,"text/html").querySelector('script[type="application/ld+json"]'),u=JSON.parse(l.textContent)[0],d=this.PATTERN.exec(r);return{id:d.length===3?d[2]:"",url:(m=u==null?void 0:u.url)!=null?m:"",title:(A=u==null?void 0:u.name)!=null?A:"",player:`<iframe width="560" height="315" src="${u==null?void 0:u.embedUrl}" title="Vimeo video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`,channel:{name:(I=(w=u==null?void 0:u.author)==null?void 0:w.name)!=null?I:"",url:(k=(C=u==null?void 0:u.author)==null?void 0:C.url)!=null?k:""}}}},ti=Zt;var ri=require("obsidian");var Qt=class extends j{constructor(r,i){super(r,i);this.PATTERN=/(bilibili.com)\/(video)?\/([a-z0-9]+)?/i}test(r){return this.isValidUrl(r)&&this.PATTERN.test(r)}async prepareNote(r){let i=await(0,ri.request)({method:"GET",url:r,headers:{"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"}}),l=new DOMParser().parseFromString(i,"text/html").querySelector("[property~='og:title']").getAttribute("content"),n=this.PATTERN.exec(r)[3],u=`<iframe width="560" height="315" src="https://player.bilibili.com/player.html?bvid=${n}" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`,d=this.settings.bilibiliNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%videoTitle%/g,l).replace(/%videoURL%/g,r).replace(/%videoId%/g,n).replace(/%videoPlayer%/g,u),A=`${this.settings.bilibiliNoteTitle.replace(/%title%/g,l).replace(/%date%/g,this.getFormattedDateForFilename())}.md`;return new G(A,d)}},ii=Qt;var Ni=require("obsidian");function Ln(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}function ir(e,t){return Array(t+1).join(e)}function In(e){return e.replace(/^\n*/,"")}function Cn(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
`;)t--;return e.substring(0,t)}var Pn=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function nr(e){return ar(e,Pn)}var si=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function oi(e){return ar(e,si)}function Mn(e){return ci(e,si)}var li=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function On(e){return ar(e,li)}function Fn(e){return ci(e,li)}function ar(e,t){return t.indexOf(e.nodeName)>=0}function ci(e,t){return e.getElementsByTagName&&t.some(function(r){return e.getElementsByTagName(r).length})}var Z={};Z.paragraph={filter:"p",replacement:function(e){return`
|
|
|
|
`+e+`
|
|
|
|
`}};Z.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+`
|
|
`}};Z.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var i=Number(t.nodeName.charAt(1));if(r.headingStyle==="setext"&&i<3){var s=ir(i===1?"=":"-",e.length);return`
|
|
|
|
`+e+`
|
|
`+s+`
|
|
|
|
`}else return`
|
|
|
|
`+ir("#",i)+" "+e+`
|
|
|
|
`}};Z.blockquote={filter:"blockquote",replacement:function(e){return e=e.replace(/^\n+|\n+$/g,""),e=e.replace(/^/gm,"> "),`
|
|
|
|
`+e+`
|
|
|
|
`}};Z.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return r.nodeName==="LI"&&r.lastElementChild===t?`
|
|
`+e:`
|
|
|
|
`+e+`
|
|
|
|
`}};Z.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,`
|
|
`).replace(/\n/gm,`
|
|
`);var i=r.bulletListMarker+" ",s=t.parentNode;if(s.nodeName==="OL"){var l=s.getAttribute("start"),n=Array.prototype.indexOf.call(s.children,t);i=(l?Number(l)+n:n+1)+". "}return i+e+(t.nextSibling&&!/\n$/.test(e)?`
|
|
`:"")}};Z.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){return`
|
|
|
|
`+t.firstChild.textContent.replace(/\n/g,`
|
|
`)+`
|
|
|
|
`}};Z.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,r){for(var i=t.firstChild.getAttribute("class")||"",s=(i.match(/language-(\S+)/)||[null,""])[1],l=t.firstChild.textContent,n=r.fence.charAt(0),u=3,d=new RegExp("^"+n+"{3,}","gm"),m;m=d.exec(l);)m[0].length>=u&&(u=m[0].length+1);var A=ir(n,u);return`
|
|
|
|
`+A+s+`
|
|
`+l.replace(/\n$/,"")+`
|
|
`+A+`
|
|
|
|
`}};Z.horizontalRule={filter:"hr",replacement:function(e,t,r){return`
|
|
|
|
`+r.hr+`
|
|
|
|
`}};Z.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),i=yt(t.getAttribute("title"));return i&&(i=' "'+i+'"'),"["+e+"]("+r+i+")"}};Z.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,r){var i=t.getAttribute("href"),s=yt(t.getAttribute("title"));s&&(s=' "'+s+'"');var l,n;switch(r.linkReferenceStyle){case"collapsed":l="["+e+"][]",n="["+e+"]: "+i+s;break;case"shortcut":l="["+e+"]",n="["+e+"]: "+i+s;break;default:var u=this.references.length+1;l="["+e+"]["+u+"]",n="["+u+"]: "+i+s}return this.references.push(n),l},references:[],append:function(e){var t="";return this.references.length&&(t=`
|
|
|
|
`+this.references.join(`
|
|
`)+`
|
|
|
|
`,this.references=[]),t}};Z.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}};Z.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}};Z.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",i=e.match(/`+/gm)||[];i.indexOf(r)!==-1;)r=r+"`";return r+t+e+t+r}};Z.image={filter:"img",replacement:function(e,t){var r=yt(t.getAttribute("alt")),i=t.getAttribute("src")||"",s=yt(t.getAttribute("title")),l=s?' "'+s+'"':"";return i?"!["+r+"]("+i+l+")":""}};function yt(e){return e?e.replace(/(\n+\s*)+/g,`
|
|
`):""}function ui(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}ui.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=er(this.array,e,this.options))||(t=er(this._keep,e,this.options))||(t=er(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function er(e,t,r){for(var i=0;i<e.length;i++){var s=e[i];if(kn(s,t,r))return s}}function kn(e,t,r){var i=e.filter;if(typeof i=="string"){if(i===t.nodeName.toLowerCase())return!0}else if(Array.isArray(i)){if(i.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof i=="function"){if(i.call(e,t,r))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function Un(e){var t=e.element,r=e.isBlock,i=e.isVoid,s=e.isPre||function(w){return w.nodeName==="PRE"};if(!(!t.firstChild||s(t))){for(var l=null,n=!1,u=null,d=ni(u,t,s);d!==t;){if(d.nodeType===3||d.nodeType===4){var m=d.data.replace(/[ \r\n\t]+/g," ");if((!l||/ $/.test(l.data))&&!n&&m[0]===" "&&(m=m.substr(1)),!m){d=tr(d);continue}d.data=m,l=d}else if(d.nodeType===1)r(d)||d.nodeName==="BR"?(l&&(l.data=l.data.replace(/ $/,"")),l=null,n=!1):i(d)||s(d)?(l=null,n=!0):l&&(n=!1);else{d=tr(d);continue}var A=ni(u,d,s);u=d,d=A}l&&(l.data=l.data.replace(/ $/,""),l.data||tr(l))}}function tr(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function ni(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var hi=typeof window!="undefined"?window:{};function Bn(){var e=hi.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch(r){}return t}function Hn(){var e=function(){};return Gn()?e.prototype.parseFromString=function(t){var r=new window.ActiveXObject("htmlfile");return r.designMode="on",r.open(),r.write(t),r.close(),r}:e.prototype.parseFromString=function(t){var r=document.implementation.createHTMLDocument("");return r.open(),r.write(t),r.close(),r},e}function Gn(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}var Vn=Bn()?hi.DOMParser:Hn();function $n(e,t){var r;if(typeof e=="string"){var i=Wn().parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html");r=i.getElementById("turndown-root")}else r=e.cloneNode(!0);return Un({element:r,isBlock:nr,isVoid:oi,isPre:t.preformattedCode?zn:null}),r}var rr;function Wn(){return rr=rr||new Vn,rr}function zn(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function jn(e,t){return e.isBlock=nr(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=Yn(e),e.flankingWhitespace=qn(e,t),e}function Yn(e){return!oi(e)&&!On(e)&&/^\s*$/i.test(e.textContent)&&!Mn(e)&&!Fn(e)}function qn(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=Xn(e.textContent);return r.leadingAscii&&ai("left",e,t)&&(r.leading=r.leadingNonAscii),r.trailingAscii&&ai("right",e,t)&&(r.trailing=r.trailingNonAscii),{leading:r.leading,trailing:r.trailing}}function Xn(e){var t=e.match(/^(([ \t\r\n]*)(\s*))[\s\S]*?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function ai(e,t,r){var i,s,l;return e==="left"?(i=t.previousSibling,s=/ $/):(i=t.nextSibling,s=/^ /),i&&(i.nodeType===3?l=s.test(i.nodeValue):r.preformattedCode&&i.nodeName==="CODE"?l=!1:i.nodeType===1&&!nr(i)&&(l=s.test(i.textContent))),l}var Kn=Array.prototype.reduce,Jn=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Nt(e){if(!(this instanceof Nt))return new Nt(e);var t={rules:Z,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(r,i){return i.isBlock?`
|
|
|
|
`:""},keepReplacement:function(r,i){return i.isBlock?`
|
|
|
|
`+i.outerHTML+`
|
|
|
|
`:i.outerHTML},defaultReplacement:function(r,i){return i.isBlock?`
|
|
|
|
`+r+`
|
|
|
|
`:r}};this.options=Ln({},t,e),this.rules=new ui(this.options)}Nt.prototype={turndown:function(e){if(!ea(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=fi.call(this,new $n(e,this.options));return Zn.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e=="function")e(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return Jn.reduce(function(t,r){return t.replace(r[0],r[1])},e)}};function fi(e){var t=this;return Kn.call(e.childNodes,function(r,i){i=new jn(i,t.options);var s="";return i.nodeType===3?s=i.isCode?i.nodeValue:t.escape(i.nodeValue):i.nodeType===1&&(s=Qn.call(t,i)),pi(r,s)},"")}function Zn(e){var t=this;return this.rules.forEach(function(r){typeof r.append=="function"&&(e=pi(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Qn(e){var t=this.rules.forNode(e),r=fi.call(this,e),i=e.flankingWhitespace;return(i.leading||i.trailing)&&(r=r.trim()),i.leading+t.replacement(r,e,this.options)+i.trailing}function pi(e,t){var r=Cn(e),i=In(t),s=Math.max(e.length-r.length,t.length-i.length),l=`
|
|
|
|
`.substring(0,s);return r+l+i}function ea(e){return e!=null&&(typeof e=="string"||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}var gi=Nt;var mi=/highlight-(?:text|source)-([a-z0-9]+)/;function ta(e){e.addRule("highlightedCodeBlock",{filter:function(t){var r=t.firstChild;return t.nodeName==="DIV"&&mi.test(t.className)&&r&&r.nodeName==="PRE"},replacement:function(t,r,i){var s=r.className||"",l=(s.match(mi)||[null,""])[1];return`
|
|
|
|
`+i.fence+l+`
|
|
`+r.firstChild.textContent+`
|
|
`+i.fence+`
|
|
|
|
`}})}function ra(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return"~"+t+"~"}})}var ia=Array.prototype.indexOf,we={};we.tableCell={filter:["th","td"],replacement:function(e,t){return di(e,t)+vi(t,"")}};we.tableRow={filter:"tr",replacement:function(e,t){var r="",i={left:":--",right:"--:",center:":-:"};if(na(t))for(var s=0;s<t.childNodes.length;s++){var l="---",n=(t.childNodes[s].getAttribute("align")||"").toLowerCase();n&&(l=i[n]||l),r+=di(l,t.childNodes[s])+vi(t.childNodes[s],l)}return`
|
|
`+e+(r?`
|
|
`+r:"")}};we.table={filter:function(e){return e.nodeName==="TABLE"&&!Ai(e)},replacement:function(e){return e=e.replace(`
|
|
|
|
`,`
|
|
`),`
|
|
|
|
`+e+`
|
|
|
|
`}};we.tableSection={filter:["thead","tbody","tfoot"],replacement:function(e){return e}};we.captionSection={filter:"caption",replacement:function(e,t){return t.parentNode.nodeName==="TABLE"&&t.parentNode.childNodes[0]===t?e:""}};function na(e){var t=e.parentNode,r=t;return(t.nodeName==="THEAD"||t.nodeName==="TFOOT"||t.nodeName==="TBODY")&&(r=t.parentNode),r.nodeName==="TABLE"&&r.rows[0]===e}function di(e,t){var r=ia.call(t.parentNode.childNodes,t),i=" ";return r===0&&(i="| "),e=e.replace(/\r\n/g,`
|
|
`).replace(/\n/g," "),e=e.replace(/\|/g,"\\|"),i+e+" |"}function vi(e,t){var r=e.getAttribute("colspan")||1;return r<=1?"":(" "+t+" |").repeat(r-1)}function Ai(e){for(var t=e.parentNode;t;){if(t.nodeName==="TABLE")return!0;t=t.parentNode}return!1}function aa(e){e.keep(function(r){return r.nodeName==="TABLE"&&Ai(r)});for(var t in we)e.addRule(t,we[t])}function sa(e){e.addRule("taskListItems",{filter:function(t){return t.type==="checkbox"&&t.parentNode.nodeName==="LI"},replacement:function(t,r){return(r.checked?"[x]":"[ ]")+" "}})}function yi(e){e.use([ta,ra,aa,sa])}async function de(e){let t=yi,r=new gi({headingStyle:"atx",hr:"---",bulletListMarker:"-",codeBlockStyle:"fenced",emDelimiter:"*"});return r.use(t),r.turndown(e)}var sr=class extends j{constructor(r,i){super(r,i);this.PATTERN=/(https:\/\/twitter.com\/([a-zA-Z0-9_]+\/)([a-zA-Z0-9_]+\/[a-zA-Z0-9_]+))/}test(r){return this.isValidUrl(r)&&this.PATTERN.test(r)}async prepareNote(r){let i=JSON.parse(await(0,Ni.request)({method:"GET",contentType:"application/json",url:`https://publish.twitter.com/oembed?url=${r}`})),s=i.author_name,l=await de(i.html),n=this.settings.twitterNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%tweetAuthorName%/g,s).replace(/%tweetURL%/g,i.url).replace(/%tweetContent%/g,l),d=`${this.settings.twitterNoteTitle.replace(/%tweetAuthorName%/g,s).replace(/%date%/g,this.getFormattedDateForFilename())}.md`;return new G(d,n)}},bi=sr;var bt=require("obsidian"),hr=ke(ur());var fr=class extends j{constructor(r,i){super(r,i);this.PATTERN=/(https:\/\/|http:\/\/)(stackoverflow\.com|serverfault\.com|superuser\.com|askubuntu\.com|stackapps\.com|.*\.stackexchange\.com)\/(q|a|questions)\/(\d+)/}test(r){return this.isValidUrl(r)&&this.PATTERN.test(r)}async prepareNote(r){let i=await(0,bt.request)({method:"GET",url:r}),s=new DOMParser().parseFromString(i,"text/html"),l=await this.parseDocument(s),n=this.settings.stackExchangeNoteTitle.replace(/%title%/g,l.title).replace(/%date%/g,this.getFormattedDateForFilename()),u=l.topAnswer?this.settings.stackExchangeAnswer.replace(/%answerContent%/g,l.topAnswer.content).replace(/%authorName%/g,l.topAnswer.author.name).replace(/%authorProfileURL%/g,l.topAnswer.author.profile):"",d="";for(let I=0;I<l.answers.length;I++){let C=this.settings.stackExchangeAnswer.replace(/%answerContent%/g,l.answers[I].content).replace(/%authorName%/g,l.answers[I].author.name).replace(/%authorProfileURL%/g,l.answers[I].author.profile);d=d.concat(`
|
|
|
|
***
|
|
|
|
`,C)}let m=this.settings.stackExchangeNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%questionTitle%/g,l.title).replace(/%questionURL%/g,l.url).replace(/%questionContent%/g,l.content).replace(/%authorName%/g,l.author.name).replace(/%authorProfileURL%/g,l.author.profile).replace(/%topAnswer%/g,u).replace(/%answers%/g,d.trim()),A=this.settings.downloadStackExchangeAssetsInDir?`${this.settings.assetsDir}/${ne(n)}/`:this.settings.assetsDir;this.settings.downloadStackExchangeAssets&&bt.Platform.isDesktop&&(m=await _e(app,m,A));let w=`${n}.md`;return new G(w,m)}async parseDocument(r){var n,u,d,m,A,w,I,C,k,D,T,g,p,o,a,f;let i;try{i=new URL((d=(n=r.querySelector('link[rel="canonical"]'))==null?void 0:n.getAttribute("href"))!=null?d:(u=r.querySelector('meta[property="og:url"]'))==null?void 0:u.getAttribute("content"))}catch(c){i=null}let s=r.querySelector('#question [itemprop="author"]'),l=[];for(let c of r.querySelectorAll(".answer")){let P=c.querySelector('[itemprop="author"]');l.push({content:await de(hr.sanitize((m=c.querySelector('[itemprop="text"]'))!=null?m:"")),author:{name:(w=(A=P==null?void 0:P.querySelector('[itemprop="name"]'))==null?void 0:A.textContent)!=null?w:"",profile:P instanceof Element&&i instanceof URL?String.prototype.concat(i.origin,(C=(I=P.querySelector("a"))==null?void 0:I.getAttribute("href"))!=null?C:""):""}})}return{title:(D=(k=r.querySelector('#question-header [itemprop="name"]'))==null?void 0:k.textContent)!=null?D:"",content:await de(hr.sanitize((T=r.querySelector('#question [itemprop="text"]'))!=null?T:"")),url:(g=i==null?void 0:i.href)!=null?g:"",topAnswer:l.slice(0,1).shift(),answers:l.slice(1),author:{name:(o=(p=s==null?void 0:s.querySelector('[itemprop="name"]'))==null?void 0:p.textContent)!=null?o:"",profile:s instanceof Element&&i instanceof URL?String.prototype.concat(i.origin,(f=(a=s.querySelector("a"))==null?void 0:a.getAttribute("href"))!=null?f:""):""}}}},Ei=fr;var Be=require("obsidian"),Tt=ke(xi()),Li=ke(ur());var mr=class extends j{constructor(t,r){super(t,r)}test(t){return this.isValidUrl(t)}async prepareNote(t){let r=new URL(t),i=await(0,Be.request)({method:"GET",url:r.href}),s=new DOMParser().parseFromString(i,"text/html"),l=s.getElementsByTagName("base"),n=null;l.length>0&&(n=l.item(0).getAttribute("href"),Array.from(l).forEach(A=>{A.remove()}));let u=s.createElement("base");u.setAttribute("href",jt(n!=null?n:r.href,r.origin)),s.head.append(u);let d=Li.sanitize(s.body.innerHTML);s.body.innerHTML=d,(0,Tt.isProbablyReaderable)(s)||new Be.Notice("@mozilla/readability considers this document to unlikely be readerable.");let m=new Tt.Readability(s).parse();return m!=null&&m.content?await this.parsableArticle(this.app,m,r.href):this.notParsableArticle(r.href)}async parsableArticle(t,r,i){let s=r.title||"No title",l=r.siteName||"",n=r.byline||"",u=await de(r.content),d=this.settings.parseableArticleNoteTitle.replace(/%title%/g,s).replace(/%date%/g,this.getFormattedDateForFilename()),m=this.settings.downloadImagesInArticleDir?`${this.settings.assetsDir}/${ne(d)}/`:this.settings.assetsDir;this.settings.downloadImages&&Be.Platform.isDesktop&&(u=await _e(t,u,m));let A=this.settings.parsableArticleNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%articleTitle%/g,s).replace(/%articleURL%/g,i).replace(/%articleReadingTime%/g,`${this.getEstimatedReadingTime(r)}`).replace(/%articleContent%/g,u).replace(/%siteName%/g,l).replace(/%author%/g,n),w=`${d}.md`;return new G(w,A)}notParsableArticle(t){console.error("Website not parseable");let r=this.settings.notParsableArticleNote.replace("%articleURL%",t),s=`${this.settings.notParseableArticleNoteTitle.replace(/%date%/g,this.getFormattedDateForFilename())}.md`;return new G(s,r)}getEstimatedReadingTime(t){let r=t.lang||"en",i=this.getReadingSpeed(r),s=t.textContent.trim().split(/\s+/).length;return Math.ceil(s/i)}getReadingSpeed(t){let r=new Map([["en",228],["ar",138],["de",179],["es",218],["fi",161],["fr",195],["he",187],["it",188],["ja",193],["nl",202],["pl",166],["pt",181],["ru",184],["sk",190],["sl",180],["sv",199],["tr",166],["zh",158]]);return r.get(t)||r.get("en")}},Ii=mr;var dr=class extends j{constructor(t,r){super(t,r)}test(){return!0}async prepareNote(t){let i=`${this.settings.textSnippetNoteTitle.replace(/%date%/g,this.getFormattedDateForFilename())}.md`,s=this.settings.textSnippetNote.replace(/%content%/g,t).replace(/%date%/g,this.getFormattedDateForContent());return new G(i,s)}},Ci=dr;var He=require("obsidian");var vr={INSTANCE:"/api/v2/instance",OEMBED:"/api/oembed",STATUS:"/api/v1/statuses",CONTEXT:"/api/v1/statuses/%id%/context"},Ar=class extends j{constructor(t,r){super(t,r)}async test(t){return Qe(t)&&await this.testIsMastodon(t)}async prepareNote(t){let r=new URL(t),i=r.pathname.split("/")[2],s=await this.loadStatus(r.hostname,i),l=this.settings.mastodonNoteTitle.replace(/%tootAuthorName%/g,s.account.display_name).replace(/%date%/g,this.getFormattedDateForFilename()),n=this.settings.downloadMastodonMediaAttachmentsInDir?`${this.settings.assetsDir}/${ne(l)}/`:this.settings.assetsDir,u=await this.parseStatus(s,n);if(this.settings.saveMastodonReplies){let A=await this.loadReplies(r.hostname,i);for(let w=0;w<A.length;w++){let I=await this.parseStatus(A[w],n),C=this.settings.mastodonReply.replace(/%tootAuthorName%/g,A[w].account.display_name).replace(/%tootURL%/g,A[w].url).replace(/%tootContent%/g,I);u=u.concat(`
|
|
|
|
***
|
|
|
|
`,C)}}let d=this.settings.mastodonNote.replace(/%date%/g,this.getFormattedDateForContent()).replace(/%tootAuthorName%/g,s.account.display_name).replace(/%tootURL%/g,s.url).replace(/%tootContent%/g,u),m=`${l}.md`;return new G(m,d)}async loadStatus(t,r){return JSON.parse(await(0,He.request)({method:"GET",contentType:"application/json",url:`https://${t}${vr.STATUS}/${r}`}))}async loadReplies(t,r){let i=String.prototype.concat.call("https://",t,String.prototype.replace.call(vr.CONTEXT,"%id%",r));return JSON.parse(await(0,He.request)({method:"GET",contentType:"application/json",url:i})).descendants}async parseStatus(t,r){let i=await de(t.content),s=this.settings.downloadMastodonMediaAttachments&&He.Platform.isDesktop?await _e(app,this.prepareMedia(t.media_attachments),r):this.prepareMedia(t.media_attachments);return i.concat(s)}prepareMedia(t){return t.reduce((r,{url:i,description:s})=>{let l=s?`
|
|
> *${s}*`:"";return`${r}
|
|
|
|
![](${i})${l}`},"")}async testIsMastodon(t){if(!t)return!1;let r=new URL(t).hostname;try{let i=JSON.parse(await(0,He.request)({method:"GET",contentType:"application/json",url:`https://${r}${vr.INSTANCE}`}));return(i==null?void 0:i.domain)===r}catch(i){return!1}}},Pi=Ar;var Et=class extends ue.Plugin{async onload(){await this.loadSettings(),this.parsers=[new Qr(this.app,this.settings),new ti(this.app,this.settings),new ii(this.app,this.settings),new bi(this.app,this.settings),new Ei(this.app,this.settings),new Pi(this.app,this.settings),new Ii(this.app,this.settings),new Ci(this.app,this.settings)],(0,ue.addIcon)("read-it-later",fa),this.addRibbonIcon("read-it-later","ReadItLater: Save clipboard",async()=>{await this.processClipboard()}),this.addCommand({id:"save-clipboard-to-notice",name:"Save clipboard",callback:async()=>{await this.processClipboard()}}),this.addSettingTab(new dt(this.app,this))}async loadSettings(){this.settings=Object.assign({},R,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async processClipboard(){let r=await navigator.clipboard.readText();for(let i of this.parsers)if(await i.test(r)){let s=await i.prepareNote(r);await this.writeFile(s.fileName,s.content);break}}async writeFile(r,i){let s;if(r=ne(r),await Ze(this.app.vault,this.settings.inboxDir),this.settings.inboxDir?s=(0,ue.normalizePath)(`${this.settings.inboxDir}/${r}`):s=(0,ue.normalizePath)(`/${r}`),await this.app.vault.adapter.exists(s))new ue.Notice(`${r} already exists!`);else{let l=await this.app.vault.create(s,i);this.settings.openNewNote&&this.app.workspace.getLeaf(!1).openFile(l),new ue.Notice(`${r} created successful`)}}},fa=`
|
|
<svg fill="currentColor" stroke="currentColor" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
<g>
|
|
<path d="m365.9,144.9c-12.3,0-24.2,1.8-35.4,5.2v-114.7h-96.9l7.3-35.4h-150.2l6.8,35.4h-97.5v454.6h330.5v-102.1c11.2,3.4 23.1,5.2 35.4,5.2 68.8-0.1 124.1-56.4 124.1-124.1 0-67.8-55.3-124.1-124.1-124.1zm-150.1-124l-10.4,50h-79.2l-9.4-50h99zm93.8,448.2h-288.7v-412.8h80.7l6.8,35.4h113.6l7.3-35.4h80.3v102.2c-27.3,14-48.8,37.9-59.7,66.7h-200.9v20.8h195c-1.4,7.4-2.2,15.1-2.2,22.9 0,13.4 2.2,26.4 6.2,38.6h-199v20.9h208.1c12,21.8 30.3,39.7 52.5,51.1v89.6zm56.3-98c-57.3,0-103.2-46.9-103.2-103.2s46.9-103.2 103.2-103.2c57.3,0 103.2,46.9 103.2,103.2s-45.8,103.2-103.2,103.2z"/>
|
|
<polygon points="426.4,223.1 346.1,303.4 313.8,271.1 299.2,285.7 346.1,332.6 441,237.7 "/>
|
|
<rect width="233.5" x="49" y="143.9" height="20.9"/>
|
|
<rect width="233.5" x="49" y="388.9" height="20.9"/>
|
|
</g>
|
|
</svg>`;
|
|
/*! Bundled license information:
|
|
|
|
dompurify/dist/purify.js:
|
|
(*! @license DOMPurify 2.4.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.3/LICENSE *)
|
|
*/
|