Skip to content

Instantly share code, notes, and snippets.

@nicoandmee
Last active November 11, 2024 21:58
Show Gist options
  • Save nicoandmee/023e9ca99eeb3e071bdb14a068cf0b68 to your computer and use it in GitHub Desktop.
Save nicoandmee/023e9ca99eeb3e071bdb14a068cf0b68 to your computer and use it in GitHub Desktop.
Surfingkeys config 11/11/2024, 2:58:48 PM
(()=>{var e={385:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e,o,r){return a=n()?Reflect.construct:function(e,n,a){var o=[null];o.push.apply(o,n);var r=new(Function.bind.apply(e,o));return a&&t(r,a.prototype),r},a.apply(null,arguments)}function o(e){return r(e)||i(e)||s(e)||c()}function r(e){if(Array.isArray(e))return l(e)}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=Object.hasOwnProperty,d=Object.setPrototypeOf,m=Object.isFrozen,u=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,g=Object.freeze,f=Object.seal,b=Object.create,w="undefined"!=typeof Reflect&&Reflect,y=w.apply,v=w.construct;y||(y=function(e,t,n){return e.apply(t,n)}),g||(g=function(e){return e}),f||(f=function(e){return e}),v||(v=function(e,t){return a(e,o(t))});var k=N(Array.prototype.forEach),x=N(Array.prototype.pop),S=N(Array.prototype.push),_=N(String.prototype.toLowerCase),$=N(String.prototype.toString),T=N(String.prototype.match),C=N(String.prototype.replace),R=N(String.prototype.indexOf),A=N(String.prototype.trim),L=N(RegExp.prototype.test),E=O(TypeError);function N(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return y(e,t,a)}}function O(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return v(e,n)}}function I(e,t,n){var a;n=null!==(a=n)&&void 0!==a?a:_,d&&d(e,null);for(var o=t.length;o--;){var r=t[o];if("string"==typeof r){var i=n(r);i!==r&&(m(t)||(t[o]=i),r=i)}e[r]=!0}return e}function q(e){var t,n=b(null);for(t in e)!0===y(p,e,[t])&&(n[t]=e[t]);return n}function U(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=u(e)}function a(e){return console.warn("fallback value for",e),null}return a}var H=g(["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"]),D=g(["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"]),M=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=g(["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"]),F=g(["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"]),j=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=g(["#text"]),B=g(["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"]),V=g(["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"]),G=g(["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"]),J=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=f(/<%[\w\W]*|[\w\W]*%>/gm),Y=f(/\${[\w\W]*}/gm),Z=f(/^data-[\-\w.\u00B7-\uFFFF]/),Q=f(/^aria-[\-\w]+$/),X=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=f(/^(?:\w+script|data):/i),te=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=f(/^html$/i),ae=f(/^[a-z][.\w]*(-[.\w]+)+$/i),oe=function(){return"undefined"==typeof window?null:window},re=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var a=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(a=n.currentScript.getAttribute(o));var r="dompurify"+(a?"#"+a:"");try{return t.createPolicy(r,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function ie(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe(),n=function(e){return ie(e)};if(n.version="2.5.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var a=t.document,r=t.document,i=t.DocumentFragment,s=t.HTMLTemplateElement,l=t.Node,c=t.Element,p=t.NodeFilter,d=t.NamedNodeMap,m=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,u=t.HTMLFormElement,h=t.DOMParser,f=t.trustedTypes,b=c.prototype,w=U(b,"cloneNode"),y=U(b,"nextSibling"),v=U(b,"childNodes"),N=U(b,"parentNode");if("function"==typeof s){var O=r.createElement("template");O.content&&O.content.ownerDocument&&(r=O.content.ownerDocument)}var se=re(f,a),le=se?se.createHTML(""):"",ce=r,pe=ce.implementation,de=ce.createNodeIterator,me=ce.createDocumentFragment,ue=ce.getElementsByTagName,he=a.importNode,ge={};try{ge=q(r).documentMode?r.documentMode:{}}catch(e){}var fe={};n.isSupported="function"==typeof N&&pe&&void 0!==pe.createHTMLDocument&&9!==ge;var be,we,ye=W,ve=K,ke=Y,xe=Z,Se=Q,_e=ee,$e=te,Te=ae,Ce=X,Re=null,Ae=I({},[].concat(o(H),o(D),o(M),o(F),o(z))),Le=null,Ee=I({},[].concat(o(B),o(V),o(G),o(J))),Ne=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}})),Oe=null,Ie=null,qe=!0,Ue=!0,He=!1,De=!0,Me=!1,Pe=!0,Fe=!1,je=!1,ze=!1,Be=!1,Ve=!1,Ge=!1,Je=!0,We=!1,Ke="user-content-",Ye=!0,Ze=!1,Qe={},Xe=null,et=I({},["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"]),tt=null,nt=I({},["audio","video","img","source","image","track"]),at=null,ot=I({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rt="http://www.w3.org/1998/Math/MathML",it="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",lt=st,ct=!1,pt=null,dt=I({},[rt,it,st],$),mt=["application/xhtml+xml","text/html"],ut="text/html",ht=null,gt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},bt=function(t){ht&&ht===t||(t&&"object"===e(t)||(t={}),t=q(t),be=be=-1===mt.indexOf(t.PARSER_MEDIA_TYPE)?ut:t.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===be?$:_,Re="ALLOWED_TAGS"in t?I({},t.ALLOWED_TAGS,we):Ae,Le="ALLOWED_ATTR"in t?I({},t.ALLOWED_ATTR,we):Ee,pt="ALLOWED_NAMESPACES"in t?I({},t.ALLOWED_NAMESPACES,$):dt,at="ADD_URI_SAFE_ATTR"in t?I(q(ot),t.ADD_URI_SAFE_ATTR,we):ot,tt="ADD_DATA_URI_TAGS"in t?I(q(nt),t.ADD_DATA_URI_TAGS,we):nt,Xe="FORBID_CONTENTS"in t?I({},t.FORBID_CONTENTS,we):et,Oe="FORBID_TAGS"in t?I({},t.FORBID_TAGS,we):{},Ie="FORBID_ATTR"in t?I({},t.FORBID_ATTR,we):{},Qe="USE_PROFILES"in t&&t.USE_PROFILES,qe=!1!==t.ALLOW_ARIA_ATTR,Ue=!1!==t.ALLOW_DATA_ATTR,He=t.ALLOW_UNKNOWN_PROTOCOLS||!1,De=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Me=t.SAFE_FOR_TEMPLATES||!1,Pe=!1!==t.SAFE_FOR_XML,Fe=t.WHOLE_DOCUMENT||!1,Be=t.RETURN_DOM||!1,Ve=t.RETURN_DOM_FRAGMENT||!1,Ge=t.RETURN_TRUSTED_TYPE||!1,ze=t.FORCE_BODY||!1,Je=!1!==t.SANITIZE_DOM,We=t.SANITIZE_NAMED_PROPS||!1,Ye=!1!==t.KEEP_CONTENT,Ze=t.IN_PLACE||!1,Ce=t.ALLOWED_URI_REGEXP||Ce,lt=t.NAMESPACE||st,Ne=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ft(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ne.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Ue=!1),Ve&&(Be=!0),Qe&&(Re=I({},o(z)),Le=[],!0===Qe.html&&(I(Re,H),I(Le,B)),!0===Qe.svg&&(I(Re,D),I(Le,V),I(Le,J)),!0===Qe.svgFilters&&(I(Re,M),I(Le,V),I(Le,J)),!0===Qe.mathMl&&(I(Re,F),I(Le,G),I(Le,J))),t.ADD_TAGS&&(Re===Ae&&(Re=q(Re)),I(Re,t.ADD_TAGS,we)),t.ADD_ATTR&&(Le===Ee&&(Le=q(Le)),I(Le,t.ADD_ATTR,we)),t.ADD_URI_SAFE_ATTR&&I(at,t.ADD_URI_SAFE_ATTR,we),t.FORBID_CONTENTS&&(Xe===et&&(Xe=q(Xe)),I(Xe,t.FORBID_CONTENTS,we)),Ye&&(Re["#text"]=!0),Fe&&I(Re,["html","head","body"]),Re.table&&(I(Re,["tbody"]),delete Oe.tbody),g&&g(t),ht=t)},wt=I({},["mi","mo","mn","ms","mtext"]),yt=I({},["annotation-xml"]),vt=I({},["title","style","font","a","script"]),kt=I({},D);I(kt,M),I(kt,P);var xt=I({},F);I(xt,j);var St=function(e){var t=N(e);t&&t.tagName||(t={namespaceURI:lt,tagName:"template"});var n=_(e.tagName),a=_(t.tagName);return!!pt[e.namespaceURI]&&(e.namespaceURI===it?t.namespaceURI===st?"svg"===n:t.namespaceURI===rt?"svg"===n&&("annotation-xml"===a||wt[a]):Boolean(kt[n]):e.namespaceURI===rt?t.namespaceURI===st?"math"===n:t.namespaceURI===it?"math"===n&&yt[a]:Boolean(xt[n]):e.namespaceURI===st?!(t.namespaceURI===it&&!yt[a])&&!(t.namespaceURI===rt&&!wt[a])&&!xt[n]&&(vt[n]||!kt[n]):!("application/xhtml+xml"!==be||!pt[e.namespaceURI]))},_t=function(e){S(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=le}catch(t){e.remove()}}},$t=function(e,t){try{S(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){S(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Le[e])if(Be||Ve)try{_t(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){var t,n;if(ze)e="<remove></remove>"+e;else{var a=T(e,/^[\r\n\t ]+/);n=a&&a[0]}"application/xhtml+xml"===be&&lt===st&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=se?se.createHTML(e):e;if(lt===st)try{t=(new h).parseFromString(o,be)}catch(e){}if(!t||!t.documentElement){t=pe.createDocument(lt,"template",null);try{t.documentElement.innerHTML=ct?le:o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),lt===st?ue.call(t,Fe?"html":"body")[0]:Fe?t.documentElement:i},Ct=function(e){return de.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null,!1)},Rt=function(e){return e instanceof u&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Lt=function(e,t,a){fe[e]&&k(fe[e],(function(e){e.call(n,t,a,ht)}))},Et=function(e){var t;if(Lt("beforeSanitizeElements",e,null),Rt(e))return _t(e),!0;if(L(/[\u0080-\uFFFF]/,e.nodeName))return _t(e),!0;var a=we(e.nodeName);if(Lt("uponSanitizeElement",e,{tagName:a,allowedTags:Re}),e.hasChildNodes()&&!At(e.firstElementChild)&&(!At(e.content)||!At(e.content.firstElementChild))&&L(/<[/\w]/g,e.innerHTML)&&L(/<[/\w]/g,e.textContent))return _t(e),!0;if("select"===a&&L(/<template/i,e.innerHTML))return _t(e),!0;if(7===e.nodeType)return _t(e),!0;if(Pe&&8===e.nodeType&&L(/<[/\w]/g,e.data))return _t(e),!0;if(!Re[a]||Oe[a]){if(!Oe[a]&&Ot(a)){if(Ne.tagNameCheck instanceof RegExp&&L(Ne.tagNameCheck,a))return!1;if(Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(a))return!1}if(Ye&&!Xe[a]){var o=N(e)||e.parentNode,r=v(e)||e.childNodes;if(r&&o)for(var i=r.length-1;i>=0;--i){var s=w(r[i],!0);s.__removalCount=(e.__removalCount||0)+1,o.insertBefore(s,y(e))}}return _t(e),!0}return e instanceof c&&!St(e)?(_t(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&3===e.nodeType&&(t=e.textContent,t=C(t,ye," "),t=C(t,ve," "),t=C(t,ke," "),e.textContent!==t&&(S(n.removed,{element:e.cloneNode()}),e.textContent=t)),Lt("afterSanitizeElements",e,null),!1):(_t(e),!0)},Nt=function(e,t,n){if(Je&&("id"===t||"name"===t)&&(n in r||n in gt))return!1;if(Ue&&!Ie[t]&&L(xe,t));else if(qe&&L(Se,t));else if(!Le[t]||Ie[t]){if(!(Ot(e)&&(Ne.tagNameCheck instanceof RegExp&&L(Ne.tagNameCheck,e)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(e))&&(Ne.attributeNameCheck instanceof RegExp&&L(Ne.attributeNameCheck,t)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(t))||"is"===t&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&L(Ne.tagNameCheck,n)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(n))))return!1}else if(at[t]);else if(L(Ce,C(n,$e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!tt[e])if(He&&!L(_e,C(n,$e,"")));else if(n)return!1;return!0},Ot=function(e){return"annotation-xml"!==e&&T(e,Te)},It=function(t){var a,o,r,i;Lt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};for(i=s.length;i--;){var c=a=s[i],p=c.name,d=c.namespaceURI;if(o="value"===p?a.value:A(a.value),r=we(p),l.attrName=r,l.attrValue=o,l.keepAttr=!0,l.forceKeepAttr=void 0,Lt("uponSanitizeAttribute",t,l),o=l.attrValue,!l.forceKeepAttr&&($t(p,t),l.keepAttr))if(De||!L(/\/>/i,o)){Me&&(o=C(o,ye," "),o=C(o,ve," "),o=C(o,ke," "));var m=we(t.nodeName);if(Nt(m,r,o))if(!We||"id"!==r&&"name"!==r||($t(p,t),o=Ke+o),Pe&&L(/((--!?|])>)|<\/(style|title)/i,o))$t(p,t);else{if(se&&"object"===e(f)&&"function"==typeof f.getAttributeType)if(d);else switch(f.getAttributeType(m,r)){case"TrustedHTML":o=se.createHTML(o);break;case"TrustedScriptURL":o=se.createScriptURL(o)}try{d?t.setAttributeNS(d,p,o):t.setAttribute(p,o),Rt(t)?_t(t):x(n.removed)}catch(e){}}}else $t(p,t)}Lt("afterSanitizeAttributes",t,null)}},qt=function e(t){var n,a=Ct(t);for(Lt("beforeSanitizeShadowDOM",t,null);n=a.nextNode();)Lt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof i&&e(n.content),It(n));Lt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(o){var r,s,c,p,d,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ct=!o)&&(o="\x3c!--\x3e"),"string"!=typeof o&&!At(o)){if("function"!=typeof o.toString)throw E("toString is not a function");if("string"!=typeof(o=o.toString()))throw E("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(At(o))return t.toStaticHTML(o.outerHTML)}return o}if(je||bt(m),n.removed=[],"string"==typeof o&&(Ze=!1),Ze){if(o.nodeName){var u=we(o.nodeName);if(!Re[u]||Oe[u])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof l)1===(s=(r=Tt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?r=s:r.appendChild(s);else{if(!Be&&!Me&&!Fe&&-1===o.indexOf("<"))return se&&Ge?se.createHTML(o):o;if(!(r=Tt(o)))return Be?null:Ge?le:""}r&&ze&&_t(r.firstChild);for(var h=Ct(Ze?o:r);c=h.nextNode();)3===c.nodeType&&c===p||Et(c)||(c.content instanceof i&&qt(c.content),It(c),p=c);if(p=null,Ze)return o;if(Be){if(Ve)for(d=me.call(r.ownerDocument);r.firstChild;)d.appendChild(r.firstChild);else d=r;return(Le.shadowroot||Le.shadowrootmod)&&(d=he.call(a,d,!0)),d}var g=Fe?r.outerHTML:r.innerHTML;return Fe&&Re["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&L(ne,r.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+g),Me&&(g=C(g,ye," "),g=C(g,ve," "),g=C(g,ke," ")),se&&Ge?se.createHTML(g):g},n.setConfig=function(e){bt(e),je=!0},n.clearConfig=function(){ht=null,je=!1},n.isValidAttribute=function(e,t,n){ht||bt({});var a=we(e),o=we(t);return Nt(a,o,n)},n.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],S(fe[e],t))},n.removeHook=function(e){if(fe[e])return x(fe[e])},n.removeHooks=function(e){fe[e]&&(fe[e]=[])},n.removeAllHooks=function(){fe={}},n}return ie()}()},326:(e,t,n)=>{"use strict";const a=n(496),o=n(772);t.all=a,t.check=e=>(e=(e||"").toString().toLowerCase(),a.includes(e)),t.oddballs=e=>e&&e in o?o[e]:Object.keys(o).sort()},772:e=>{"use strict";e.exports='{\n\t"avatars": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"assets": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"bookmarks": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"checks": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"conversations": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"labels": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"media": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"nodes": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"owners": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"page": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"registry": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"seats": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"shared": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"tasks": {"reserved": true, "taken": true, "typical": true, "included": false},\n\t"uploads": {"reserved": true, "taken": true, "typical": true, "included": false},\n\n\t"account": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/settings/profile", "included": true},\n\t"apps": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/marketplace", "included": true},\n\t"blog": {"reserved": true, "taken": false, "typical": false, "redirect": "https://blog.github.com", "included": true},\n\t"c": {"reserved": true, "taken": false, "typical": false, "redirect": "https://support.github.com/", "included": true},\n\t"contact": {"reserved": true, "taken": false, "typical": false, "redirect": "https://support.github.com/", "included": true},\n\t"contributing": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/about/careers", "included": true},\n\t"customer": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/business/customers", "included": true},\n\t"customers": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/business/customers", "included": true},\n\t"developer": {"reserved": true, "taken": false, "typical": false, "redirect": "https://developer.github.com", "included": true},\n\t"edu": {"reserved": true, "taken": false, "typical": false, "redirect": "https://education.github.com", "included": true},\n\t"guides": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com", "included": true},\n\t"help": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com", "included": true},\n\t"launch": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/search", "included": true},\n\t"mac": {"reserved": true, "taken": false, "typical": false, "redirect": "https://desktop.github.com", "included": true},\n\t"mirrors": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/about-github-mirrors/", "included": true},\n\t"pages": {"reserved": true, "taken": false, "typical": false, "redirect": "https://pages.github.com", "included": true},\n\t"plans": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/pricing", "included": true},\n\t"press": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/about/press", "included": true},\n\t"readme": {"reserved": true, "taken": false, "typical": false, "included": true},\n\t"repositories": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/trending", "included": true},\n\t"resources": {"reserved": true, "taken": false, "typical": false, "redirect": "https://resources.github.com", "included": true},\n\t"security": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-security/", "included": true},\n\t"settings": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/settings/profile", "included": true},\n\t"signup": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/join", "included": true},\n\t"terms": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-terms-of-service/", "included": true},\n\t"topic": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com/topics", "included": true},\n\t"tos": {"reserved": true, "taken": false, "typical": false, "redirect": "https://help.github.com/articles/github-terms-of-service/", "included": true},\n\t"training": {"reserved": true, "taken": false, "typical": false, "redirect": "https://services.github.com", "included": true},\n\t"users": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com", "included": true},\n\t"wiki": {"reserved": true, "taken": false, "typical": false, "redirect": "https://github.com", "included": true},\n\t"windows": {"reserved": true, "taken": false, "typical": false, "redirect": "https://desktop.github.com", "included": true},\n\n\t"advisories": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "GitHub Advisory Database"},\n\t"collections": {"reserved": true, "taken": false, "typical": false, "included": true, "notes": "Curated lists of GitHub repos"},\n\t"dashboard-feed": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "GitHub dashboard feed"},\n\t"hovercards": {"reserved": true, "taken": false, "typical": false, "included": true, "notes": "HTTP ERROR 406"},\n\t"inbox": {"reserved": true, "taken": true, "typical": false, "redirect": "https://github.com/410", "included": true, "notes": "410 ERROR"},\n\t"invalid-email-address": {"reserved": true, "taken": true, "typical": false, "included": true, "notes": "HTTP ERROR 404"},\n\t"suggestions": {"reserved": true, "taken": false, "typical": false, "included": true},\n\t"suspended": {"reserved": true, "taken": true, "typical": false, "redirect": "https://github.com", "included": true, "notes": "Page behaviour depends on whether you\'re logged in or if your account is actually suspended"},\n\n\t"case-studies": {"reserved": false, "taken": true, "typical": false, "included": true},\n\t"watching": {"reserved": false, "taken": true, "typical": false, "included": true},\n\t"save-net-neutrality": {"reserved": false, "taken": true, "typical": false, "included": true},\n\n\t"ghost": {"reserved": false, "taken": true, "typical": true, "included": true},\n\n\t"status": {"reserved": true, "taken": false, "typical": false, "included": true}\n}\n'},496:e=>{"use strict";e.exports='[\n "300",\n "302",\n "400",\n "401",\n "402",\n "403",\n "404",\n "405",\n "406",\n "407",\n "408",\n "409",\n "410",\n "411",\n "412",\n "413",\n "414",\n "415",\n "416",\n "417",\n "418",\n "419",\n "420",\n "421",\n "422",\n "423",\n "424",\n "425",\n "426",\n "427",\n "428",\n "429",\n "430",\n "431",\n "500",\n "501",\n "502",\n "503",\n "504",\n "505",\n "506",\n "507",\n "508",\n "509",\n "510",\n "511",\n "693",\n "694",\n "695",\n "900",\n "about",\n "account",\n "admin",\n "advisories",\n "anonymous",\n "any",\n "api",\n "apps",\n "attributes",\n "auth",\n "billing",\n "blob",\n "blog",\n "bounty",\n "branches",\n "business",\n "businesses",\n "c",\n "cache",\n "careers",\n "case-studies",\n "categories",\n "central",\n "certification",\n "changelog",\n "chat",\n "cla",\n "cloud",\n "codereview",\n "collection",\n "collections",\n "comments",\n "commit",\n "commits",\n "companies",\n "compare",\n "contact",\n "contributing",\n "cookbook",\n "copilot",\n "coupons",\n "customer",\n "customer-stories",\n "customers",\n "dashboard",\n "dashboard-feed",\n "dashboards",\n "design",\n "develop",\n "developer",\n "diff",\n "discover",\n "discussions",\n "downloads",\n "downtime",\n "editor",\n "editors",\n "edu",\n "education",\n "enterprise",\n "events",\n "explore",\n "featured",\n "features",\n "files",\n "fixtures",\n "forked",\n "garage",\n "ghost",\n "gist",\n "gists",\n "graphs",\n "groups",\n "guide",\n "guides",\n "help",\n "help-wanted",\n "home",\n "hooks",\n "hosting",\n "hovercards",\n "identity",\n "images",\n "inbox",\n "individual",\n "info",\n "integration",\n "interfaces",\n "introduction",\n "invalid-email-address",\n "investors",\n "issues",\n "jobs",\n "join",\n "journal",\n "journals",\n "lab",\n "labs",\n "languages",\n "launch",\n "layouts",\n "learn",\n "legal",\n "library",\n "linux",\n "listings",\n "lists",\n "login",\n "logos",\n "logout",\n "mac",\n "maintenance",\n "malware",\n "man",\n "marketplace",\n "mention",\n "mentioned",\n "mentioning",\n "mentions",\n "migrating",\n "milestones",\n "mine",\n "mirrors",\n "mobile",\n "navigation",\n "network",\n "new",\n "news",\n "none",\n "nonprofit",\n "nonprofits",\n "notices",\n "notifications",\n "oauth",\n "offer",\n "open-source",\n "organisations",\n "organizations",\n "orgs",\n "pages",\n "partners",\n "payments",\n "personal",\n "plans",\n "plugins",\n "popular",\n "popularity",\n "posts",\n "press",\n "preview",\n "pricing",\n "professional",\n "projects",\n "pulls",\n "raw",\n "readme",\n "recommendations",\n "redeem",\n "releases",\n "render",\n "reply",\n "repositories",\n "resources",\n "restore",\n "revert",\n "save-net-neutrality",\n "saved",\n "scraping",\n "search",\n "security",\n "services",\n "sessions",\n "settings",\n "shareholders",\n "shop",\n "showcases",\n "signin",\n "signup",\n "site",\n "socials",\n "spam",\n "sponsors",\n "ssh",\n "staff",\n "starred",\n "stars",\n "static",\n "status",\n "statuses",\n "storage",\n "store",\n "stories",\n "styleguide",\n "subscriptions",\n "suggest",\n "suggestion",\n "suggestions",\n "support",\n "suspended",\n "talks",\n "teach",\n "teacher",\n "teachers",\n "teaching",\n "team",\n "teams",\n "ten",\n "terms",\n "timeline",\n "topic",\n "topics",\n "tos",\n "tour",\n "train",\n "training",\n "translations",\n "tree",\n "trending",\n "undefined",\n "updates",\n "username",\n "users",\n "visualization",\n "w",\n "watching",\n "wiki",\n "wikis",\n "windows",\n "works-with",\n "www0",\n "www1",\n "www2",\n "www3",\n "www4",\n "www5",\n "www6",\n "www7",\n "www8",\n "www9"\n]\n'}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,n),r.exports}(()=>{"use strict";const e=()=>{if(-1!==window.navigator.userAgent.indexOf("Chrome"))return"Chrome";if(0===window.navigator.vendor.indexOf("Apple Computer, Inc.")){return/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1?"Safari-iOS":"Safari"}return-1!==window.navigator.userAgent.indexOf("Firefox")?"Firefox":"Chrome"},t="undefined"==typeof window?{}:"undefined"!=typeof api?{v1:!0,...api}:{v1:!1,getBrowserName:e,RUNTIME,Clipboard,Normal,Hints,Visual,Front,insertJS:Normal.insertJS,addSearchAlias:addSearchAliasX,aceVimMap,addVimMapKey,cmap,imap,imapkey,getClickableElements,getFormData,map,unmap,unmapAllExcept,iunmap,vunmap,mapkey,readText,removeSearchAlias,searchSelectedWith,tabOpenLink,vmap,vmapkey};var a=n(326);const o={crunchbase:"",google_cs:"AIzaSyDSc6lADAURez0Dl9BKcwlrYV6zb5QojJs",google_yt:"AIzaSyCIRN6kHTGFABfdDzwA2M7BdpOz5BiUuus",wolframalpha:"",domainr:"18cffef341msh21358904326422ep10bd31jsnda2649a3cbe4",alternativeTo:"",google_cx_ex:"65f6a233959ec4562",google_cx_af:"72db069dbcfb14ad6",google_cx_al:"65aec8d98a5394c9f",google_cx_no:"60d886841b821401e",google_cx_cs:"5631bd769b1024c83",google_cx_jq:"04ab5af0010924f0e",google_cx_gg:"d4d7e03d7d5ca4117"},r=e=>`https://doi.org/${e}`;var i=n(385);class s extends Map{set(e,t){return super.set(e,t),t}}class l extends WeakMap{set(e,t){return super.set(e,t),t}}const c=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,p=/<([a-z]+[a-z0-9:._-]*)([^>]*?)(\/?)>/g,d=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,m=/[\x01\x02]/g,u=(e,t)=>111===e.nodeType?1/t<0?t?(({firstChild:e,lastChild:t})=>{const n=document.createRange();return n.setStartAfter(e),n.setEndAfter(t),n.deleteContents(),e})(e):e.lastChild:t?e.valueOf():e.firstChild:e,{isArray:h}=Array,{indexOf:g,slice:f}=[];let b=!1;class w{constructor(e,t){b=!0,this._=(...n)=>e(...n,t)}}const y=e=>null==e?e:e.valueOf(),v=(e,t)=>{let n,a,o=t.slice(2);return!(t in e)&&(a=t.toLowerCase())in e&&(o=a.slice(2)),t=>{const a=h(t)?t:[t,!1];n!==a[0]&&(n&&e.removeEventListener(o,n,a[1]),(n=a[0])&&e.addEventListener(o,n,a[1]))}},{isArray:k,prototype:x}=Array,{indexOf:S}=x,{createDocumentFragment:_,createElement:T,createElementNS:C,createTextNode:R,createTreeWalker:A,importNode:L}=new Proxy({},{get:(e,t)=>document[t].bind(document)});let E;const N=(e,t)=>t?(e=>{E||(E=C("http://www.w3.org/2000/svg","svg")),E.innerHTML=e;const t=_();return t.append(...E.childNodes),t})(e):(e=>{const t=T("template");return t.innerHTML=e,t.content})(e),O=({childNodes:e},t)=>e[t],I=(e,t,n)=>((e,t,n,a,o)=>{const r=n.length;let i=t.length,s=r,l=0,c=0,p=null;for(;l<i||c<s;)if(i===l){const t=s<r?c?a(n[c-1],-0).nextSibling:a(n[s-c],0):o;for(;c<s;)e.insertBefore(a(n[c++],1),t)}else if(s===c)for(;l<i;)p&&p.has(t[l])||e.removeChild(a(t[l],-1)),l++;else if(t[l]===n[c])l++,c++;else if(t[i-1]===n[s-1])i--,s--;else if(t[l]===n[s-1]&&n[c]===t[i-1]){const o=a(t[--i],-1).nextSibling;e.insertBefore(a(n[c++],1),a(t[l++],-1).nextSibling),e.insertBefore(a(n[--s],1),o),t[i]=n[s]}else{if(!p){p=new Map;let e=c;for(;e<s;)p.set(n[e],e++)}if(p.has(t[l])){const o=p.get(t[l]);if(c<o&&o<s){let r=l,d=1;for(;++r<i&&r<s&&p.get(t[r])===o+d;)d++;if(d>o-c){const r=a(t[l],0);for(;c<o;)e.insertBefore(a(n[c++],1),r)}else e.replaceChild(a(n[c++],1),a(t[l++],-1))}else l++}else e.removeChild(a(t[l++],-1))}return n})(e.parentNode,t,n,u,e),q=(e,t)=>{switch(t[0]){case"?":return((e,t,n)=>a=>{const o=!!y(a);n!==o&&((n=o)?e.setAttribute(t,""):e.removeAttribute(t))})(e,t.slice(1),!1);case".":return((e,t)=>"dataset"===t?(({dataset:e})=>t=>{for(const n in t){const a=t[n];null==a?delete e[n]:e[n]=a}})(e):n=>{e[t]=n})(e,t.slice(1));case"@":return v(e,"on"+t.slice(1));case"o":if("n"===t[1])return v(e,t)}switch(t){case"ref":return(e=>{let t;return n=>{t!==n&&(t=n,"function"==typeof n?n(e):n.current=e)}})(e);case"aria":return(e=>t=>{for(const n in t){const a="role"===n?n:`aria-${n}`,o=t[n];null==o?e.removeAttribute(a):e.setAttribute(a,o)}})(e)}return((e,t)=>{let n,a=!0;const o=document.createAttributeNS(null,t);return r=>{const i=b&&r instanceof w?r._(e,t):y(r);n!==i&&(null==(n=i)?a||(e.removeAttributeNode(o),a=!0):(o.value=i,a&&(e.setAttributeNodeNS(o),a=!1)))}})(e,t)};function U(e){const{type:t,path:n}=e,a=n.reduceRight(O,this);return"node"===t?(e=>{let t,n,a=[];const o=r=>{switch(typeof r){case"string":case"number":case"boolean":t!==r&&(t=r,n||(n=R("")),n.data=r,a=I(e,a,[n]));break;case"object":case"undefined":if(null==r){t!=r&&(t=r,a=I(e,a,[]));break}if(k(r)){t=r,0===r.length?a=I(e,a,[]):"object"==typeof r[0]?a=I(e,a,r):o(String(r));break}if(t!==r)if("ELEMENT_NODE"in r)t=r,a=I(e,a,11===r.nodeType?[...r.childNodes]:[r]);else{const e=r.valueOf();e!==r&&o(e)}break;case"function":o(r(e))}};return o})(a):"attr"===t?q(a,e.name):(e=>{let t;return n=>{const a=y(n);t!=a&&(t=a,e.textContent=null==a?"":a)}})(a)}const H=e=>{const t=[];let{parentNode:n}=e;for(;n;)t.push(S.call(n.childNodes,e)),e=n,({parentNode:n}=e);return t},D="isµ",M=new l,P=/^(?:textarea|script|style|title|plaintext|xmp)$/,F=(e,t)=>{const n="svg"===e,a=((e,t,n)=>{let a=0;return e.join("").trim().replace(p,((e,t,a,o)=>{let r=t+a.replace(d,"=$2$1").trimEnd();return o.length&&(r+=n||c.test(t)?" /":"></"+t),"<"+r+">"})).replace(m,(e=>""===e?"\x3c!--"+t+a+++"--\x3e":t+a++))})(t,D,n),o=N(a,n),r=A(o,129),i=[],s=t.length-1;let l=0,u=`${D}${l}`;for(;l<s;){const e=r.nextNode();if(!e)throw`bad template: ${a}`;if(8===e.nodeType)e.data===u&&(i.push({type:"node",path:H(e)}),u=`${D}${++l}`);else{for(;e.hasAttribute(u);)i.push({type:"attr",path:H(e),name:e.getAttribute(u)}),e.removeAttribute(u),u=`${D}${++l}`;P.test(e.localName)&&e.textContent.trim()===`\x3c!--${u}--\x3e`&&(e.textContent="",i.push({type:"text",path:H(e)}),u=`${D}${++l}`)}}return{content:o,nodes:i}},j=(e,t)=>{const{content:n,nodes:a}=M.get(t)||M.set(t,F(e,t)),o=L(n,!0);return{content:o,updates:a.map(U,o)}},z=(e,{type:t,template:n,values:a})=>{const o=B(e,a);let{entry:r}=e;r&&r.template===n&&r.type===t||(e.entry=r=((e,t)=>{const{content:n,updates:a}=j(e,t);return{type:e,template:t,content:n,updates:a,wire:null}})(t,n));const{content:i,updates:s,wire:l}=r;for(let e=0;e<o;e++)s[e](a[e]);return l||(r.wire=(e=>{const{firstChild:t,lastChild:n}=e;if(t===n)return n||e;const{childNodes:a}=e,o=[...a];return{ELEMENT_NODE:1,nodeType:111,firstChild:t,lastChild:n,valueOf:()=>(a.length!==o.length&&e.append(...o),e)}})(i))},B=({stack:e},t)=>{const{length:n}=t;for(let a=0;a<n;a++){const n=t[a];n instanceof V?t[a]=z(e[a]||(e[a]={stack:[],entry:null,wire:null}),n):k(n)?B(e[a]||(e[a]={stack:[],entry:null,wire:null}),n):e[a]=null}return n<e.length&&e.splice(n),n};class V{constructor(e,t,n){this.type=e,this.template=t,this.values=n}}const G=e=>{const t=new l;return Object.assign(((t,...n)=>new V(e,t,n)),{for(n,a){const o=t.get(n)||t.set(n,new s);return o.get(a)||o.set(a,(t=>(n,...a)=>z(t,{type:e,template:n,values:a}))({stack:[],entry:null,wire:null}))},node:(t,...n)=>z({stack:[],entry:null,wire:null},new V(e,t,n)).valueOf()})},J=(new l,G("html")),{Hints:W,RUNTIME:K}=(G("svg"),t),Y={},Z=e=>(...t)=>new Promise(((n,a)=>{try{e(...t,n)}catch(e){a(e)}}));Y.promisify=Z;const Q=Z(K);Y.runtime=Q,Y.runtimeHttpRequest=async(e,t)=>(await Q("request",{...t,url:e})).text,Y.getURLPath=({count:e=0,domain:t=!1}={})=>{let n=window.location.pathname.slice(1);return e&&(n=n.split("/").slice(0,e).join("/")),t&&(n=`${window.location.hostname}/${n}`),n},Y.getMap=(e,t)=>t.split("").reduce(((e,t)=>e[t]||e),e.mappings).meta||null,Y.escapeHTML=e=>{const t=document.createElement("span");return t.textContent=e,t.innerHTML};const X={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};Y.escapeForAlias=e=>String(e).replace(/[&<>"'`=/]/g,(e=>X[e])),Y.escapeRegExp=e=>e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),Y.until=(e,t=(e=>e),n=50,a=50)=>new Promise(((o,r)=>{const i=(s=0)=>{const l=e();t(l)?o(l):s>n?r(new Error("until: timeout")):setTimeout((()=>i(s+1)),a)};i()}));const[ee,te]=(()=>{if("undefined"!=typeof browser)return[browser.storage.local.get,browser.storage.local.set];if("undefined"!=typeof chrome)return[chrome.storage.local.get,chrome.storage.local.set].map((e=>Y.promisify(e.bind(chrome.storage.local))));const e=()=>new Error("local storage unavailable: unsupported environment");return[e,e]})();Y.localStorage={},Y.localStorage.fullkey=e=>`surfingkeys-conf.${e}`,Y.localStorage.get=async e=>{const t=Y.localStorage.fullkey(e);return(await ee(t))[t]},Y.localStorage.set=async(e,t)=>{const n=Y.localStorage.fullkey(e);return te({[n]:t})},Y.getElement=e=>t.getClickableElements(e)[0],Y.dispatchMouseClicks=(e=[])=>new Set(e.map((e=>e.href))).forEach((e=>t.RUNTIME("openLink",{tab:{tabbed:!0,active:!1},url:e}))),Y.darkReaderEnabled=()=>document.querySelector("style.darkreader")||document.querySelector("style#dark-reader-style"),Y.htmlUnsafe=e=>J.node([e]),Y.htmlPurify=(e,t={USE_PROFILES:{html:!0}})=>Y.htmlUnsafe(i.sanitize(e,t)),Y.htmlNode=(e,...t)=>J.node(e,...t),Y.htmlForEach=e=>e.map((e=>J.for(e)`${e}`)),Y.html=(e,...t)=>Y.htmlNode(e,...t).outerHTML,Y.suggestionItem=(e={})=>(t,...n)=>({html:Y.html(t,...n),props:e}),Y.createSuggestionItem=(e,t={})=>{const n=document.createElement("li");return n.innerHTML=e,{html:n.outerHTML,props:t}},Y.urlItem=(e,t,{desc:n=null,query:a=null}={})=>{const o=n&&n.length>0?(Array.isArray(n)?n:[n]).map((e=>Y.htmlNode`<div>${e}</div>`)):[];return Y.suggestionItem({url:t,query:a??e})`
<div>
<div style="font-weight: bold">${e}</div>
${Y.htmlForEach(o)}
<div style="opacity: 0.7; line-height: 1.3em">${t}</div>
</div>
`},Y.elementExists=e=>null!==document.querySelector(e),Y.defaultSelector="a[href]:not([href^=javascript])",Y.querySelectorFiltered=(e=Y.defaultSelector,t=(()=>!0))=>[...document.querySelectorAll(e)].filter(t),Y.createHints=(e=Y.defaultSelector,t=W.dispatchMouseClick,n={})=>new Promise((a=>{W.create(e,((...e)=>{a(...e),"function"==typeof t&&t(...e)}),n)})),Y.createHintsFiltered=(e,t,...n)=>{Y.createHints(Y.querySelectorFiltered(t,e),...n)},Y.isRectVisibleInViewport=e=>e.height>0&&e.width>0&&e.bottom>=0&&e.right>=0&&e.top<=(window.innerHeight||document.documentElement.clientHeight)&&e.left<=(window.innerWidth||document.documentElement.clientWidth),Y.isElementInViewport=e=>e.offsetHeight>0&&e.offsetWidth>0&&!e.getAttribute("disabled")&&Y.isRectVisibleInViewport(e.getBoundingClientRect()),Y.getDuckduckgoFaviconUrl=e=>{const t=e instanceof URL?e:new URL(e);return new URL(`https://icons.duckduckgo.com/ip3/${t.hostname}.ico`).href},Y.calculateAngle=(e,t,n,a)=>{const o=n-e,r=a-t,i=Math.acos(o/Math.sqrt(o*o+r*r));return r<0?-i:i},Y.prettyDate=e=>{const t=((new Date).getTime()-e.getTime())/1e3,n=Math.floor(t/86400);if(Number.isNaN(n)||n<0)return"";const[a,o]=0===n&&(t<60&&[null,"just now"]||t<3600&&[Math.floor(t/60),"minute"]||t<86400&&[Math.floor(t/3600),"hour"])||1===n&&[null,"yesterday"]||n<7&&[n,"day"]||n<30&&[Math.round(n/7),"week"]||n<365&&[Math.round(n/30),"month"]||[Math.round(n/365),"year"];return`${a??""}${a?" ":""}${o}${(a??0)>1?"s":""}${a?" ago":""}`};Y.cleanupUrl=()=>{let e=document.title;const t=location.href,n=location.hostname,a=location.pathname;let o="";if(n.includes("www.alfredforum.com")&&(e=e.replace("- Discussion & Help - Alfred App Community Forum","")),"github.com"===n){const t=/pull\/\d+$/;if(/issues\/\d+$/.test(a)){const t=/\/(.*)\/issues\/(\d+)$/.exec(a),[,n,o]=t;e=`${n}#${o}`}else if(t.test(a)){const t=/\/(.*)\/pull\/(\d+)$/.exec(a),[,n,o]=t;e=`${n} PR #${o}`}else{const e=document.querySelector("#repo-stars-counter-star"),t=e&&e.innerText.trim()||"0";o=t.endsWith("k")||parseInt(t)>99?`${t}★ `:""}}return`${o}[${e}](${((e,t=!0)=>/http[^#\?]*/.exec(e)[0])(t,doCleanup)})`},Y.oudentParentTab=()=>{browser.runtime.sendMessage(tstId,{type:"outdent",tab:"current"})},Y.sendKey=(e,t,n,a=10)=>{const o={...{key:e,code:t,bubbles:!0,cancelable:!0,composed:!0,view:window},keyCode:n,which:n},r=new KeyboardEvent("keydown",o);document.body.dispatchEvent(r),setTimeout((()=>{const e=new KeyboardEvent("keyup",o);document.body.dispatchEvent(e)}),a)},Y.html=(e,...t)=>String.raw({raw:e},...t),Y.css=(e,...t)=>String.raw({raw:e},...t),Y.searchResult=e=>{const t="imgHtml"in e?e.imgHtml:e.img?J`<img class="thumb" alt="thumbnail" src="${e.img}" />`:"",n=e.description?J`<div>${e.description}</div>`:"",a=e.timestamp?J`<div class="url">
<div>${e.url}</div>
<span class="omnibar_timestamp"># ${e.timestamp}</div>
</div>`:J`<div class="url">${e.url}</div>`;return J` <div class="result">
${t}
<div>
<div class="title">${e.title}</div>
<div>${n} ${a}</div>
</div>
</div>`},Y.githubCommitInPullRequestTitle=()=>{const e=document.getElementsByClassName("commit-title")?.[0]?.innerText;if("string"==typeof e&&document.location.pathname.split("/").includes("pull")&&!document.title.includes(e))return`${e} · ${document.title}`},Y.getVisibleElements=e=>{let t=Array.from(document.documentElement.getElementsByTagName("*"));const n=[];for(let o=0;o<t.length;o++){const r=t[o];if(r.shadowRoot){const e=r.shadowRoot.querySelectorAll("*");for(let n=0;n<e.length;n++)t.push(e[n])}var a=r.getBoundingClientRect();a.top<=window.innerHeight&&a.bottom>=0&&a.left<=window.innerWidth&&a.right>=0&&a.height>0&&e(r,n)}return n},Y.isEditable=e=>e&&!e.disabled&&("textarea"===e.localName||"select"===e.localName||e.isContentEditable||"input"===e.localName&&/^(?!button|checkbox|file|hidden|image|radio|reset|submit)/i.test(e.type)),Y.tabActivateOrCreate=(e,n=void 0)=>{t.RUNTIME("getTabs",{queryInfo:{url:e,currentWindow:!0}},(({tabs:a})=>{if(!Array.isArray(a))throw new Error(`tabs is not Array: ${JSON.stringify(a)}`);const o=a?.[0]?.id;null!=o?t.RUNTIME("focusTab",{tabId:o}):t.RUNTIME("openLink",{url:n??e})}))},Y.getTwitterEmbed=async e=>{if("twitter.com"!==e.hostname&&"mobile.twitter.com"!==e.hostname&&"x.com"!==e.hostname||!/^\/\w+\/status\/\d+/.exec(e.pathname))return;const t=new URL("https://publish.twitter.com/oembed");t.searchParams.set("url",e.href),t.searchParams.set("omit_script","t"),t.searchParams.set("lang",navigator.language||"en");const n=await fetch(t.href);if(!n.ok)throw new Error(`${t.href}: response is not ok ${JSON.stringify(n.statusText)}`);return(await n.json()).html},Y.getCssSelectorsOfEditableText=()=>[`input:not(${["button","checkbox","color","date","datetime-local","file","image","radio","range","reset","submit"].map((e=>`input[type=${e}]`)).join(", ")})`,"textarea","*[contenteditable=true]","*[role=textbox]","select","div.ace_cursor"].join(", "),Y.scrollToSmooth=e=>{window.scrollTo({top:e,left:0,behavior:"smooth"})},Y.scrollBySmooth=(e,t=1)=>{window.scrollTo({top:window.scrollY+t*e,left:0,behavior:"smooth"})};const ne=Y,{tabOpenLink:ae,open:oe,Front:re,Hints:ie,Normal:se,RUNTIME:le,Clipboard:ce,mapkey:pe}=t,de={openFireship:()=>ae("https://fireship.io/courses"),openCodeCrafters:()=>ae("https://app.codecrafters.io/catalog"),openDuolingo:()=>ae("https://www.duolingo.com/"),openLeetCode:()=>ae("https://leetcode.com/problemset/all/'"),openIFTTT:()=>ae("https://ifttt.com/explore"),openTwitter:()=>ne.tabActivateOrCreate("https://x.com"),openGrok:()=>ae("https://x.com/i/grok"),openFastGPT:()=>ae("https://kagi.com/fastgpt"),openPipedream:()=>ae("https://pipedream.com/@nicoandmemes/projects"),openHackerNews:()=>ae("https://insin.github.io/react-hn/#/news"),openSnippetGenerator:()=>ae("https://vscodesnippetgenerator.azurewebsites.net/"),openSourcegraph:()=>ae("https://sourcegraph.com/search"),openCodyChat:()=>ae("https://cody.sourcegraph.com/chat"),openSavedSearch:()=>ae("https://sourcegraph.com/saved-searches"),openUserStyles:()=>ae("https://userstyles.world/"),openReadwiseReader:()=>ae("https://read.readwise.io/new"),openRaycastStore:()=>ae("https://raycast.com/store"),openRaindrop:()=>ae("https://app.raindrop.io/my/-1"),openStylus:()=>{"Chrome"===t.getBrowserName()&&ae("https://chromewebstore.google.com/detail/stylus-beta/apmmpaebfobifelkijhaljbmpcgbjbdo")},openAFineStart:()=>{"Chrome"===t.getBrowserName()?ae("chrome-extension://kcgjmjiklcchbhljelchjdpoooccmhcn/bookmarks/index.html"):"Firefox"===t.getBrowserName()&&ae("moz-extension://26276c35-3a6b-4cf5-84bf-24e3152003c1/bookmarks/index.html")},openTobyMini:()=>{"Chrome"===t.getBrowserName()&&ae("chrome-extension://gfdcgfhkelkdmglklfbndgopaihmoeci/toby.html")},openOneTab:()=>{"Chrome"===t.getBrowserName()?ae("chrome-extension://chphlpgkkbolifaimnlloiipkdnihall/onetab.html"):ae("moz-extension://59b912fc-f318-419e-99a7-76469dc200ce/onetab.html")},openProxySwitchOmega:()=>{"Chrome"===t.getBrowserName()?ae("chrome-extension://padekgcemlokbadohgkifijomclgjgif/options.html"):ae("moz-extension://f1f9076e-23c8-496e-a9c3-205956daadbc/options.html")},toggleActiveEnv:()=>{const e=window.location.href,t=e.startsWith("https://lobste.rs/")?"http://localhost:3000/":"https://lobste.rs/";window.location.href=t+e.split("/").slice(3).join("/")},openChromeShortcuts:()=>ae("chrome://extensions/shortcuts/"),openChromeFlags:()=>ae("chrome://flags/"),openChromeSettings:()=>ae("chrome://settings/"),openChromeHistory:()=>ae("chrome://history/"),closeDownloadsShelf:()=>t.RUNTIME("closeDownloadsShelf",{clearHistory:!0}),openMozillaAddons:()=>ae("https://addons.mozilla.org/en-US/firefox/"),openMozillaSettings:()=>ae("about:preferences"),openWorkEmail:()=>ae("https://mail.google.com/mail/u/1/#inbox"),openPersonalEmail:()=>ae("https://mail.google.com/mail/u/0/#inbox"),openLegacyEmail:()=>ae("https://mail.google.com/mail/u/3/#inbox"),openStoryAndComments:({story:e,link:t,comments:n}={})=>{ie.create(e,(e=>{ne.dispatchMouseClicks([ne.getElement(`*[id="${e.id}"] ${t}`),ne.getElement(`*[id="${e.id}"] ${n}`)])}))},moveTabNextToTab:(e,t,n=!1)=>browser.tabs.move(e,{windowId:t.windowId,index:t.index-(n?1:0)}),dispatchEvents:(e,t,...n)=>n.forEach((n=>{const a=document.createEvent(e);a.initEvent(n,!0,!0),t.dispatchEvent(a)}))};de.dispatchMouseEvents=de.dispatchEvents.bind(void 0,["MouseEvents"]),de.scrollToHash=(e=null)=>{const t=(e||document.location.hash).replace("#",""),n=document.getElementById(t)||document.querySelector(`[name="${t}"]`);n&&n.scrollIntoView({behavior:"smooth"})},de.displayPasswords=()=>{[...document.querySelectorAll("input[type=password]")].forEach((e=>{e.setAttribute("type","text")}))},de.openLocalHost=()=>{const e=[9222,9706].map((e=>({title:`localhost:${e}`,url:`http://localhost:${e}`})));re.openOmnibar({type:"UserURLs",extra:e})},de.tabActivateOrCreate=e=>{le("getTabs",{queryInfo:{url:e,currentWindow:!0}},(({tabs:t})=>{if(!Array.isArray(t))throw new Error(`tabs is not Array: ${JSON.stringify(t)}`);const n=t?.[0]?.id;null!=n?le("focusTab",{tabId:n}):ae(e)}))},de.saveSessionAndQuit=()=>{le("createSession",{name:"LAST"}),le("quit")},de.restoreLastSession=()=>{le("openSession",{name:"LAST"})},de.restoreSession=e=>{le("openSession",{name:e})},de.createSession=e=>{le("createSession",{name:e})},de.getOrgLink=()=>`[[${window.location.href}][${document.title}]]`;const me={a:"https://aws.amazon.com/console",b:"https://bard.google.com",B:"www.bing.com/chat",c:"www.utdt.edu/campusvirtual",d:"https://drive.google.com/drive/u/0/folders/0B9ulz1YH9ei7dGJValg1Tm9tMVE",g:"www.github.com",h:"www.google.com.ar",i:"www.infobae.com",l:"www.lanacion.com.ar",L:"http://neverssl.com/",m:"https://mercadolibre.com.ar",M:"https://mail.google.com",n:"www.netflix.com",N:"synology-ds:5000",o:"https://onedrive.live.com",p:"http://pirateproxy.net",r:"www.reddit.com",s:"http://stackoverflow.com",u:"www.alumnos.econ.uba.ar",v:"http://virtual.econ.uba.ar/",y:"www.youtube.com",q:"http://localhost:631/jobs"},ue=function(e,t){const n="'"!==e,a=function(e,t){return function(){le("openLink",{tab:{tabbed:t},url:e})}};for(var o in t)pe(e+o,"qmark: "+t[o],a(t[o],n))};ue('"',me),ue("'",me),de.jumpToVimMark=e=>{let n=me[e];if(void 0!==n)for(var a of("string"==typeof n&&(n=[n]),n)){var o={url:a,scrollLeft:0,scrollTop:0,tab:{tabbed:!1,active:!1}};t.RUNTIME("openLink",o)}else se.jumpVIMark(e,!0)},de.downloadImage=()=>{t.Hints.create("img",(function(e){chrome.downloads.download({url:e.src,saveAs:!0}),console.log(e)}))},de.getMarkdownLink=({title:e=document.title,href:t=window.location.href}={})=>`[${e}](${t})`,de.editCurrentURLNeovimCurrentTab=()=>{re.showEditor(window.location.href,(function(e){window.location.href=e}),"url")};const he="http://centralops.net/co/DomainDossier.aspx";function ge(e=!0){if(!window.location.href.includes("sourcegraph.com"))return;document.querySelector(".NewSearchContent-module__new-filters")&&document.querySelector(".NewSearchContent-module__new-filters").remove();const t=[...document.querySelectorAll("button, [type=button]")].filter((e=>["Hide preview","Preview"].includes(e.innerText.trim())));(()=>{const n=t.findIndex((e=>"Hide preview"===e.innerText.trim())),a=n+1,o=n-1;if(e&&a<t.length){t.at(a).click()}else if(!e&&o>=0){t.at(o).click()}})(),document.querySelector('div[aria-label="File sidebar"]').style.width="100%"}de.shodanUrl=({hostname:e=window.location.hostname}={})=>`https://www.shodan.io/host/${e}`,de.getWhoisUrl=({hostname:e=window.location.hostname}={})=>`${he}?dom_whois=true&addr=${e}`,de.getDnsInfoUrl=({hostname:e=window.location.hostname,all:t=!1}={})=>`${he}?dom_dns=true&addr=${e}${t?"?dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true":""}`,de.getGoogleCacheUrl=({href:e=window.location.href}={})=>`https://webcache.googleusercontent.com/search?q=cache:${e}`,de.get12ftUrl=({href:e=window.location.href}={})=>`https://12ft.io/${e}`,de.getWaybackUrl=({href:e=window.location.href}={})=>`https://web.archive.org/web/*/${e}`,de.getSummaryUrl=({href:e=window.location.href}={})=>`https://kagi.com/summarizer/index.html?${new URLSearchParams({url:e})}`,de.goToEditTextBox=()=>{ie.setCharacters(hintsCharactersAll),ie.create(ne.getCssSelectorsOfEditableText(),ie.dispatchMouseClick)},de.instantHTMLPreview=()=>{try{navigator.clipboard.readText().then((function(e){if(e){var t=window.open("","_blank","width=800,height=600");t.document.open(),t.document.write(e),t.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")})).catch((function(e){console.error("Failed to read clipboard contents: ",e),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")}))}catch(e){console.error("An error occurred:",e),alert("An error occurred while trying to open the new window with the clipboard content.")}},de.openAnchor=({newTab:e=!1,active:t=!0,prop:n="href"}={})=>a=>de.openLink(a[n],{newTab:e,active:t}),de.openLink=(e,{newTab:t=!1,active:n=!0}={})=>{t?le("openLink",{tab:{tabbed:!0,active:n},url:e instanceof URL?e.href:e}):window.location.assign(e)},de.copyLastElementInURL=()=>{const e=window.location.href.split("/"),n=e[e.length-1].split("#")[0].split("?")[0];n?(t.Clipboard.write(n),t.Front.showBanner(`Copied ${n} to the clipboard.`)):t.Front.showBanner("No last element was found.")},de.editSettings=()=>ae(chrome.extension.getURL("/pages/options.html")),de.openNeovim=()=>ae(chrome.extension.getURL("/pages/neovim.html")),de.login=()=>{const e=t.getClickableElements("a, button",conf.loginLinkRegex);return e=ne.filterOverlapElements(e),!!e.length&&(t.clickOn(e),!0)},de.displayDateTime=()=>{const e=e=>String(e).padStart(2,"0"),n=new Date,a=`${e(n.getMonth()+1)}月${e(n.getDate())}日(${["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][n.getDay()]}) ${e(n.getHours())}:${e(n.getMinutes())}`;t.Front.showPopup(a)},de.followInoreader=()=>{},de.toThings=({href:e=window.location.href}={})=>{const n=document.title,a=`Link:${e}`;window.open(`things:///add?title=${n}&notes=${a}&list=Backlog&heading=Someday&show-quick-entry=true&reveal=true&tags=${["web"].join(",")}`,"_blank"),t.Front.showBanner("Sent to Things: "+a)},de.addLinkToThings=e=>{const{selectionText:n,linkUrl:a}=e;window.open(`things:///add?title=${n}&show-quick-entry=true&notes=Link:${a}`,"_blank"),t.Front.showBanner("Sent to Things: "+n)},de.addToAnyBox=({href:e=window.location.href}={})=>{window.open(`anybox://download?url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved tab to AnyBox: "+e)},de.addToInstapaper=({href:e=window.location.href}={})=>{const n=document.createElement("script");n.innerHTML="(() => { var d=document;try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u='+encodeURIComponent(d.location.href);}catch(e){alert('Please wait until the page has loaded.');} })()",document.body.appendChild(n),t.Front.showBanner("Saved page to Instapaper: "+e)},de.addToRaindrop=({href:e=window.location.href}={})=>{const t=parseInt(screen.width/2-225),n=parseInt(screen.height/2-300);window.open("https://app.raindrop.io/add?link="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"raindrop-save","width=450,height=600,resizable=yes,scrollbars=yes,status=false,location=false,toolbar=false,left="+t+",top="+n)},de.addToReadwise=({href:e=window.location.href}={})=>{const n=document.title.trim();window.open(`https://readwise.io/save?title=${encodeURIComponent(n)}&url=${encodeURIComponent(e)}`,"_blank"),t.Front.showBanner("Saved page to Readwise: "+n+" "+e)},de.copyCurrentURLToObsidian=()=>{const e=new URL(window.location.href);const n=`[${window.document.title.replace(/(<|>)/g,"\\$1")}](${e.href})`,a="obsidian://advanced-uri?vault=content&daily=true&mode=append&data="+n;window.open(a,"_blank"),t.Front.showBanner("Sent to Obsidian: "+n)},de.togglePdfViewer=()=>chrome.storage.local.get("noPdfViewer",(e=>{e.noPdfViewer?chrome.storage.local.remove("noPdfViewer",(()=>{re.showBanner("PDF viewer enabled.")})):chrome.storage.local.set({noPdfViewer:1},(()=>{re.showBanner("PDF viewer disabled.")}))})),de.previewLink=()=>ne.createHints("a[href]",(e=>re.showEditor(e.href,(e=>de.openLink(e)),"url"))),de.scrollElement=(e,t)=>{de.dispatchMouseEvents(e,"mousedown"),se.scroll(t)},de.copyImdbId=()=>{if(!window.location.hostname.includes("imdb.com"))return;const e=/imdb\.com\/title\/(tt\d+)/.exec(window.location.href);if(null===e||2!==e.length)return;const n=`imdb:${e[1]}`;t.Clipboard.write(n),t.Front.showBanner(`Copied title id [${n}] to the clipboard.`)},de.paginateIMDB=()=>{const e=document.querySelector("span.ipc-see-more__text");e&&(e.click(),setTimeout((()=>{de.paginateIMDB()}),1e3))},de.copyTVDBId=()=>{if(!window.location.hostname.includes("thetvdb.com"))return;if(document.querySelector("div#series_basic_info li:nth-child(1) > span")){let e=document.querySelector("div#series_basic_info li:nth-child(1) > span").innerText;e=`tvdb:${e}`,t.Clipboard.write(e),t.Front.showBanner(`Copied series id [${e}] to the clipboard.`)}},de.az={},de.az.viewProduct=()=>{const e=/^([-\w]+[.])*amazon.\w+$/,t=/^(?:.*\/)*(?:dp|gp\/product)(?:\/(\w{10})).*/,n={};document.querySelectorAll("a[href]").forEach((a=>{const o=new URL(a.href);if(0===o.hash.length&&e.test(o.hostname)){const e=t.exec(o.pathname);if(null===e||2!==e.length)return;if(!ne.isElementInViewport(a))return;const r=e[1];if(void 0!==n[r]&&!(0===n[r].text.trim().length&&a.text.trim().length>0))return;n[r]=a}})),ie.create(Object.values(n),ie.dispatchMouseClick)},de.viewGodoc=()=>de.openLink(`https://godoc.org/${ne.getURLPath({count:2,domain:!0})}`,{newTab:!0}),de.sg={},de.sg.openSourcegraphFromExt=()=>{if("github.com"!==window.location.hostname&&"sourcegraph.com"!==window.location.hostname)return void alert(`This bookmarklet may only be used on GitHub.com or Sourcegraph.com, not ${window.location.hostname}.`);const e=[["^/([^/]+)/([^/]+)/tree/([^/]+)$","/github.com/$1/$2@$3","^/github.com/([^/]+)/([^/@]+)@([^/]+)$","/$1/$2/tree/$3"],["^/([^/]+)/([^/]+)/tree/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/tree/$4","^/github.com/([^/]+)/([^/@]+)@([^/]+)/-/tree/(.+)$","/$1/$2/tree/$3/$4"],["^/([^/]+)/([^/]+)/blob/([^/]+)/(.+)$","/github.com/$1/$2@$3/-/blob/$4","",""],["^/([^/]+)/([^/]+)$","/github.com/$1/$2","^/github.com/([^/]+)/([^/]+)$","/$1/$2"],["^/([^/]+)$","/$1","^/([^/]+)$","/$1"]];let{pathname:t}=window.location;"sourcegraph.com"===window.location.hostname&&(0===t.indexOf("/sourcegraph.com/")?t=t.replace("/sourcegraph.com/","/github.com/"):0===t.indexOf("/sourcegraph/")&&(t=`/github.com${t}`));for(let o=0;o<e.length;o++){const r=e[o];if("github.com"===window.location.hostname){if(""===r[0])continue;var n=new RegExp(r[0]);if(t.match(n)){var a=t.replace(n,r[1]);return void(window.location=`https://sourcegraph.com${a}`)}}else{if(""===r[2])continue;n=new RegExp(r[2]);if(t.match(n)){a=t.replace(n,r[3]);return void(window.location=`https://github.com${a}`)}}}},de.sg.saveSearchQuery=()=>{const e=(e=>{const t=new URL(e),n=t.searchParams.get("q");t.pathname.split("/").slice(1).join("/");return`https://sourcegraph.com/saved-searches/new?query=${n}&patternType=keyword&sm=0`})(window.location.href);de.openLink(e,{newTab:!0,active:!1})},de.sg.viewOnGithub=()=>{const e=document.querySelector('a[aria-label="View on GitHub"]');e&&e.click()},de.sg.toggleSidebar=()=>{const e=document.querySelector('button[aria-label="Show sidebar"],button[aria-label="Hide sidebar"]');e&&e.click()},de.sg.prevNext=()=>{ge(!0)},de.sg.prevPrev=()=>{ge(!1)},de.sg.openPreviewed=()=>{let e=document.querySelector(".NewSearchContent-module__preview .AnchorLink-module__anchor-link");e&&de.openLink(e.href,{newTab:!0,active:!1})},de.sg.openCodeOnHost=()=>{let e=document.querySelector("a[id='go-to-code-host']");e&&de.openLink(e.href,{newTab:!1})},de.sg.openCommitsView=()=>{let e=document.querySelector('a[name="Commits"]');e&&de.openLink(e.href,{newTab:!1})},de.sg.toggleHistoryView=()=>{let e=document.querySelector('a[aria-label="Hide history (Alt+H/Opt+H)"],a[aria-label="Show history (Alt+H/Opt+H)"]');e&&e.click()},de.sg.openBranchesView=()=>{let e=[...document.querySelectorAll(".Button-module__btn-group a")].find((e=>e.textContent.trim().toLowerCase().includes("branches")));e&&de.openLink(e.href,{newTab:!1})},de.sg.openTagsView=()=>{let e=[...document.querySelectorAll(".Button-module__btn-group a")].find((e=>e.textContent.trim().toLowerCase().includes("tags")));e&&de.openLink(e.href,{newTab:!1})},de.sg.copyBlobContent=()=>{let e=document.querySelector('div[aria-label="File blob"]');if(e){let n=e.innerText.trim().split("\n"),a=document.querySelector(".cm-lineNumbers").innerText.trim().split("\n");n=n.slice().splice(0,a.length),console.debug(n);let o=n.join("\n");t.Clipboard.write(o),t.Front.showBanner(`Copied ${n.length} lines to the clipboard.`)}},de.sg.viewFileHistory=()=>{[...document.querySelectorAll("a.RepoHeaderActions-module__action")].find((e=>e.innerText.trim().includes("History")))},de.sg.downloadRaw=()=>{document.querySelector("mdi-icon Icon-module__icon-inline LoadingSpinner-module__loading-spinner,div[aria-label='Loading']"),[...document.querySelectorAll("button[data-reach-menu-button]")].filter((e=>"…"===e.innerText.trim()))},de.sg.copyAllRepos=()=>{Object.entries(window.localStorage).forEach((([e,t])=>{e.startsWith("user-history:")&&!e.includes("anonymous")&&(console.log(e),console.log(JSON.parse(t)))}))},de.go={},de.go.parseLocation=()=>{const e=new URL(window.location.href),t=e.searchParams.get("q"),n=e.pathname.split("/"),a={type:"unknown",url:e,query:t};if("www.google.com"===e.hostname)if(n.length<=1)a.type="home";else if("search"===n[1])switch(e.searchParams.get("tbm")){case"vid":a.type="videos";break;case"isch":a.type="images";break;case"nws":a.type="news";break;default:a.type="web"}else"maps"===n[1]&&(a.type="maps","search"===n[2]&&void 0!==n[3]?a.query=n[3]:void 0!==n[2]&&(a.query=n[2]));return a},de.kagi={},de.kagi.openKagiInGoogle=()=>{location.href.startsWith("https://kagi.com/search?")&&(location.href=`https://www.google.com/search?q=${new URL(location.href).searchParams.get("q")}`)},de.gh={},de.gh.addRepositoryToList=()=>{let e=document.querySelector('summary[aria-label="Add this repository to a list"]');e&&e.click()},de.gh.viewGoDoc=()=>ae(`https://godoc.org/${getURLPath(2,!0)}`),de.gh.downloadGistFiles=()=>{[...document.querySelectorAll(".Button--secondary")].filter((e=>e.innerText.trim().includes("Raw"))).map((e=>e.href)).forEach((e=>{t.Clipboard.write(e),de.openLink(e,{newTab:!0,active:!1})}))},de.gh.star=({toggle:e=!1}={})=>async()=>{const t=e=>"none"===window.getComputedStyle(e).display||!!e.parentElement&&t(e.parentElement),n=Array.from(document.querySelectorAll("div.starring-container")).filter((e=>!t(e)));let a;switch(n.length){case 0:return;case 1:[a]=n;break;default:try{a=await ne.createHints(n,{action:null})}catch(e){return}}const o=a.parentElement.parentElement?.matches("ul.pagehead-actions")?window.location.pathname:new URL(a.parentElement.querySelector("form").action).pathname,r=a.classList.contains("on"),i=o.slice(1).split("/").slice(0,2).join("/");let s="★",l="starred",c="is";(r&&e||!r&&!e)&&(l=`un${l}`,s="☆"),e&&(c="has been",a.querySelector(r?".starred button, button.starred":".unstarred button, button.unstarred").click()),re.showBanner(`${s} Repository ${i} ${c} ${l}!`)},de.gh.parseRepo=(e=window.location.href,t=!1)=>{let n;try{n=e instanceof URL?e:new URL(e)}catch(t){n=new URL(`https://github.com/${e}`)}const[o,r,...i]=n.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return["github.com","gist.github.com","raw.githubusercontent.com"].includes(n.hostname)&&"string"==typeof o&&o.length>0&&"string"==typeof r&&r.length>0&&(s||!1===t)&&/^([a-zA-Z0-9]+-?)+$/.test(o)&&!a.check(o)?{type:"repo",user:o,repo:r,owner:o,name:r,href:e,url:n,repoBase:`${o}/${r}`,repoRoot:s,repoPath:i}:null},de.gh.parseUser=(e=window.location.href,t=!1)=>{const n=e instanceof URL?e:new URL(e),[o,...r]=n.pathname.split("/").filter((e=>""!==e)),i=0===r.length;return n.origin===window.location.origin&&"string"==typeof o&&o.length>0&&(!1===t||0===r.length)&&/^([a-zA-Z0-9]+-?)+$/.test(o)&&!a.check(o)?{type:"user",name:o,user:o,href:e,url:n,userRoot:i,userPath:r}:null},de.gh.parseFile=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,o,r,i,...s]=t.pathname.split("/").filter((e=>""!==e));if(!(t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof o&&o.length>0&&"string"==typeof r&&("blob"===r||"tree"===r)&&"string"==typeof i&&i.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!a.check(n)))return null;const l={type:"file",user:n,repo:o,pathType:r,commitHash:i,isDirectory:"tree"===r,href:e,url:t,filePath:s,repoBase:`/${n}/${o}`};return l.rawUrl=l.isDirectory?null:`https://raw.githubusercontent.com/${l.user}/${l.repo}/${l.commitHash}/${l.filePath.join("/")}`,l},de.gh.parseCommit=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,o,r,i]=t.pathname.split("/").filter((e=>""!==e));return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof o&&o.length>0&&"string"==typeof r&&"commit"===r&&"string"==typeof i&&i.length>0&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!a.check(n)?{type:"commit",user:n,repo:o,commitHash:i,href:e,url:t}:null},de.gh.parseIssue=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,o,r,...i]=t.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof o&&o.length>0&&"issues"===r&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!a.check(n)?{href:e,url:t,...s?{type:"issues",issuePath:i}:{type:"issue",number:i[0],issuePath:i}}:null},de.gh.parsePull=(e=window.location.href)=>{const t=e instanceof URL?e:new URL(e),[n,o,r,...i]=t.pathname.split("/").filter((e=>""!==e)),s=0===i.length;return t.origin===window.location.origin&&"string"==typeof n&&n.length>0&&"string"==typeof o&&o.length>0&&/^pulls?$/.test(r)&&/^([a-zA-Z0-9]+-?)+$/.test(n)&&!a.check(n)?{href:e,url:t,...s?{type:"pulls",pullPath:i}:{type:"pull",number:i[0],pullPath:i}}:null},de.gh.isUser=(e=window.location.href,t=!0)=>null!==de.gh.parseUser(e,t),de.gh.isRepo=(e=window.location.href,t=!0)=>null!==de.gh.parseRepo(e,t),de.gh.isFile=(e=window.location.href)=>null!==de.gh.parseFile(e),de.gh.isCommit=(e=window.location.href)=>null!==de.gh.parseCommit(e),de.gh.isIssue=(e=window.location.href)=>null!==de.gh.parseIssue(e),de.gh.isPull=(e=window.location.href)=>null!==de.gh.parsePull(e),de.gh.openRepo=()=>ne.createHintsFiltered((e=>de.gh.isRepo(e.href))),de.gh.openUser=()=>ne.createHintsFiltered((e=>de.gh.isUser(e.href))),de.gh.openFile=()=>ne.createHintsFiltered((e=>de.gh.isFile(e.href))),de.gh.openCommit=()=>ne.createHintsFiltered((e=>de.gh.isCommit(e.href))),de.gh.openIssue=()=>ne.createHintsFiltered((e=>de.gh.isIssue(e.href))),de.gh.openPull=()=>ne.createHintsFiltered((e=>de.gh.isPull(e.href))),de.gh.openPage=e=>de.openLink(`https://github.com/${e}`),de.gh.openRepoPage=e=>{const t=de.gh.parseRepo();null!==t&&de.gh.openPage(`${t.repoBase}${e}`)},de.gh.openRepoOwner=()=>{const e=de.gh.parseRepo();null!==e&&de.gh.openPage(`${e.owner}`)},de.gh.openGithubPagesRepo=()=>{const e=window.location.hostname.split(".")[0],t=window.location.pathname.split("/")[1]??"";de.gh.openPage(`${e}/${t}`)},de.gh.fetchStars=(e="nicoandmee")=>get(`https://api.github.com/users/${e}/starred`).then((e=>{if(void 0!==e){console.log({raw:e});const t=e.map((e=>({origin_user:e.owner.login,origin_id:e.id,origin_url:e.html_url,origin_created_at:e.created_at,content:e.description,title:e.name,tags:e.topics.concat(e.language),meta:{isFork:e.fork,git_url:e.git_url,ssh_url:e.ssh_url,repo_name:e.name,repo_full_name:e.full_name}})));console.log({starred:t})}})),de.gh.openSourceFile=()=>{const e=window.location.pathname.split("/");de.gh.openPage(`${[...e.slice(1,3),"tree",...e.slice(3)].join("/")}`)},de.gh.openProfile=()=>de.gh.openPage(`${document.querySelector("meta[name='user-login']").content}`),de.gh.toggleLangStats=()=>document.querySelector(".repository-lang-stats-graph").click(),de.gh.expandAllInFeed=()=>{let e=document.querySelectorAll("svg[aria-label=Expand]");Array.from(e).map((e=>e.parentElement.parentElement)).forEach((e=>e.click()))},de.gh.goParent=()=>{const e=window.location.pathname.split("/").filter((e=>""!==e)),t=(()=>{const[t,n,a]=e;switch(e.length){case 0:return!1;case 4:switch(a){case"blob":case"tree":return[t,n];case"pull":return[t,n,"pulls"]}break;case 5:if("blob"===a)return[t,n]}return e.slice(0,e.length-1)})();if(!1!==t){const e=`${window.location.origin}/${t.join("/")}`;de.openLink(e)}},de.gh.viewSourceGraphInSameTab=()=>de.gh.viewSourceGraph(!1),de.gh.viewSourceGraph=(e=void 0)=>{if(ne.elementExists('a[title="View repository on Sourcegraph"]'))return void document.querySelector('a[title="View repository on Sourcegraph"]').click();const t=new URL("https://sourcegraph.com/github.com");let n=null;if(null!==(n=de.gh.parseFile(window.location.href))){const e=n.filePath.join("/");if(t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}/-/${n.pathType}/${e}`,""!==window.location.hash)t.hash=window.location.hash;else if(!ne.isElementInViewport(document.querySelector("#L1")))for(const e of document.querySelectorAll(".js-line-number"))if(ne.isElementInViewport(e)){t.hash=e.id;break}}else null!==(n=de.gh.parseCommit(window.location.href))?t.pathname+=`/${n.user}/${n.repo}@${n.commitHash}`:null!==(n=de.gh.parseRepo(window.location.href))?t.pathname+=`/${n.user}/${n.repo}`:t.pathname="";let a=!1;e||(a=!0),de.openLink(t.href,{newTab:a})},de.gh.openInDev=({newTab:e=!1}={})=>{const t=new URL(window.location.href);t.hostname="github.dev",de.openLink(t.href,{newTab:e})},de.gh.selectFile=async({files:e=!0,directories:t=!0}={})=>{if(!e&&!t)throw new Error("At least one of 'files' or 'directories' must be true");const n=n=>n&&!(!t&&n.isDirectory||!e&&!n.isDirectory);let a=de.gh.parseFile();if(n(a))return a;if(null===de.gh.parseRepo())throw new Error("Not a repository");const o=ne.createHintsFiltered((e=>{const t=de.gh.parseFile(e.href);return t&&!1===t.isDirectory}),null);if(a=de.gh.parseFile(o.href),!n(a))throw new Error("Not a file");return a},de.gh.openFileFromClipboard=async({newTab:e=!0}={})=>{const t=await navigator.clipboard.readText();if("string"!=typeof t||0===t.length)return;const n=window.location.href,a={user:null,repo:null,commitHash:"master"},o=de.gh.parseFile(n);if(null!==o)a.user=o.user,a.repo=o.repo,a.commitHash=o.commitHash;else{const e=de.gh.parseCommit(n);if(null!==e)a.user=e.user,a.repo=e.repo,a.commitHash=e.commitHash;else{const e=de.gh.parseRepo(n);if(null!==e)return;a.user=e.user,a.repo=e.repo}}de.openLink(`https://github.com/${a.user}/${a.repo}/tree/${a.commitHash}/${t}`,{newTab:e})},de.gl={},de.gl.star=()=>{const e=window.location.pathname.slice(1).split("/").slice(0,2).join("/"),t=document.querySelector(".btn.star-btn > span");t.click();const n=`${t.textContent.toLowerCase()}red`;let a="☆";"starred"===n&&(a="★"),re.showBanner(`${a} Repository ${e} ${n}`)},de.tw={},de.tw.openUser=()=>ne.createHints([].concat([...document.querySelectorAll("a[role='link'] img[src^='https://pbs.twimg.com/profile_images']")].map((e=>e.closest("a"))),[...document.querySelectorAll("a[role='link']")].filter((e=>e.text.match(/^@/))))),de.by={},de.by.copyDID=()=>{ne.createHints("img[src*='/did:plc:']",(e=>{const[t,n]=e.src.match("/(did:.*)/");n&&ce.write(n)}))},de.by.copyPostID=()=>{ne.createHints('a[href*="/post/"]',(e=>{const[t,n]=e.pathname.match(/^\/profile\/[^/]+\/post\/(\w+)/);n&&ce.write(n)}))},de.re={},de.re.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll(".noncollapsed.comment")).filter((e=>ne.isElementInViewport(e)));e.length>0&&e[0].querySelector(".expand").click()},de.hn={},de.hn.goParent=()=>{const e=document.querySelector(".navs>a[href^='item']");e&&de.openLink(e.href)},de.hn.collapseNextComment=()=>{const e=Array.from(document.querySelectorAll("a.togg")).filter((e=>"[–]"===e.innerText&&ne.isElementInViewport(e)));e.length>0&&e[0].click()},de.hn.goPage=(e=1)=>{let t;try{t=new URL(window.location.href)}catch(e){return}let n=t.searchParams.get("p");null!==n&&""!==n||(n="1");const a=parseInt(n,10);if(Number.isNaN(a))return;const o=a+e;o<1||(t.searchParams.set("p",o),de.openLink(t.href))},de.hn.openLinkAndComments=e=>{const t=e.querySelector(".titleline>a").href,n=e.nextElementSibling.querySelector("a[href^='item']:not(.titlelink)").href;de.openLink(n,{newTab:!0}),de.openLink(t,{newTab:!0})},de.feedbin={},de.feedbin.subscribe=()=>{ae("https://feedbin.com/?subscribe="+encodeURIComponent(window.location.href))},de.ph={},de.ph.openExternal=()=>{ie.create("ul[class^='postsList_'] > li > div[class^='item_']",(e=>de.openLink(e.querySelector("div[class^='meta_'] > div[class^='actions_'] > div[class^='minorActions_'] > a:nth-child(1)").href,{newTab:!0})))},de.wp={},de.wp.toggleSimple=()=>{const e=new URL(window.location.href);e.hostname=e.hostname.split(".").map(((e,t)=>0===t?"simple"===e?"":"simple":e)).filter((e=>""!==e)).join("."),de.openLink(e.href)},de.wp.viewWikiRank=()=>{const e=document.location.hostname.split("."),t=e.length>2&&"www"!==e[0]?e[0]:"en",n=document.location.pathname.split("/");if(n.length<3||"wiki"!==n[1])return;const a=n.slice(2).join("/");de.openLink(`https://wikirank.net/${t}/${a}`,{newTab:!0})},de.wp.markdownSummary=()=>`> ${[e=>[...e.querySelectorAll("sup")].map((e=>e.remove())),e=>[...e.querySelectorAll("b")].forEach((e=>{e.innerText=`**${e.innerText}**`})),e=>[...e.querySelectorAll("i")].forEach((e=>{e.innerText=`_${e.innerText}_`}))].reduce(((e,t)=>(t(e),e)),document.querySelector("#mw-content-text p:not([class]):not([id])").cloneNode(!0)).innerText.trim()}\n\n— ${de.getMarkdownLink()}`,de.re={},de.re.focusSearch=()=>de.dispatchMouseEvents(document.getElementById("docsearch"),"mousedown","click"),de.re.scrollSidebar=e=>de.scrollElement(document.getElementById("sidebar-content"),e),de.re.scrollContent=e=>de.scrollElement(document.body,e),de.dv={},de.dv.scrollSidebar=e=>de.scrollElement(document.querySelector("._list"),e),de.dv.scrollContent=e=>de.scrollElement(document.querySelector("._content"),e),de.yt={},de.yt.getCurrentTimestamp=()=>{const[e,t,n=0]=document.querySelector("#ytd-player .ytp-time-current")?.innerText?.split(":")?.reverse()?.map(Number)??[0,0,0];return[e,t,n]},de.yt.getCurrentTimestampSeconds=()=>{const[e,t,n]=de.yt.getCurrentTimestamp();return 60*n*60+60*t+e},de.yt.getCurrentTimestampHuman=()=>{const[e,t,n]=de.yt.getCurrentTimestamp(),a=e=>`${e}`.padStart(2,"0");return n>0?`${n}:${a(t)}:${a(e)}`:`${t}:${a(e)}`},de.yt.getShortLink=()=>`https://youtu.be/${new URLSearchParams(window.location.search).get("v")}`,de.yt.getCurrentTimestampLink=()=>`${de.yt.getShortLink()}?t=${de.yt.getCurrentTimestampSeconds()}`,de.yt.getCurrentTimestampMarkdownLink=()=>de.getMarkdownLink({title:`${document.querySelector("#ytd-player .ytp-title").innerText} @ ${de.yt.getCurrentTimestampHuman()} - YouTube`,href:de.yt.getCurrentTimestampLink()}),de.doi={},de.doi.providers={},de.doi.providers.meta_citation_doi=()=>document.querySelector("meta[name=citation_doi]")?.content,de.doi.providers.meta_dcIdentifier_doi=()=>document.querySelector("meta[name='dc.Identifier'][scheme=doi]")?.content,de.doi.getLink=e=>{if(!r)return void re.showBanner("DOI Handler not confingured (see conf.priv.example.js)");const t=e();if(t)return r(t);re.showBanner("DOI not found")},de.cg={},de.cg.getNewChatLink=()=>[...document.querySelectorAll("a")].find((e=>"New chat"===e.innerText)),de.cg.newChat=async()=>{const e=de.cg.getNewChatLink();if(e){(await(async e=>(e.click(),await ne.until((()=>[...document.querySelectorAll('li[class*="group/toggle"]')].find((e=>"GPT-4"===e.innerText))))))(e)).querySelector("button>div").click()}else location.assign("https://chat.openai.com/?model=gpt-4")},de.cg.getChatLinks=()=>de.cg.getNewChatLink().parentElement.nextSibling.nextSibling.querySelectorAll("a");const fe=de,be={categories:{help:0,mouseClick:1,scroll:2,tabs:3,pageNav:4,sessions:5,searchSelectedWith:6,clipboard:7,omnibar:8,visualMode:9,vimMarks:10,settings:11,chromeURLs:12,proxy:13,misc:14,insertMode:15}},{categories:we}=be,{Clipboard:ye,Front:ve,tabOpenLink:ke}=t,xe={mappings:["gk","gn","sb","sw","ob","oe","ow","oy","cp",";cp",";ap","spa","spb","spd","sps","spc","spi","sfr","zQ","zz","zR","od","ab","Q","q","ag","af","yj",";s","yp","p","<Ctrl-j>","<Ctrl-h>"]},Se={};Se.global=[{alias:"p",category:we.mouseClick,description:"Go to editable text",callback:fe.goToEditTextBox},{alias:"F",map:"gf",category:we.mouseClick,description:"Open a link in non-active new tab"},{alias:"zf",category:we.mouseClick,description:"Open link URL in vim editor",callback:fe.previewLink},{alias:"ZZ",category:we.sessions,description:"Save current session and quit",callback:fe.saveSessionAndQuit},{alias:"ZR",category:we.sessions,description:"Restore last session",callback:fe.restoreLastSession},{alias:"Zl",category:we.sessions,description:"List saved sessions",callback:()=>{runtime.command({action:"getSessions"},(function(e){Omnibar.listResults(Object.keys(e.sessions),(function(e){return $("<li></li>").html(e)}))}))}},{alias:"Zo",category:we.misc,description:"Capture URL to Things",callback:fe.toThings},{alias:"w",map:"k",category:we.scroll,description:"Scroll up"},{alias:"s",map:"j",category:we.scroll,description:"Scroll down"},{alias:"K",map:"e",category:we.scroll,description:"Scroll half page up"},{alias:"J",map:"d",category:we.scroll,description:"Scroll half page down"},{alias:"gh",category:we.scroll,description:"Scroll to element targeted by URL hash",callback:fe.scrollToHash},{alias:"gI",category:we.pageNav,description:"View image in new tab",callback:()=>ne.createHints("img",(e=>fe.openLink(e.src)))},{alias:"g.",category:we.pageNav,description:"Go to parent domain",callback:()=>{const e=window.location.host.split("."),t=(e.length>2?e.slice(1):e).join(".");fe.openLink(`${window.location.protocol}//${t}`)}},{alias:"gn",category:we.misc,description:"Jump to vim-like mark in new tab",callback:fe.jumpToVimMark},{alias:"yp",category:we.clipboard,description:"Copy URL path of current page",callback:()=>ye.write(window.location.href)},{alias:"yO",category:we.misc,description:"Copy current page's link to obsidian",callback:()=>fe.copyCurrentURLToObsidian()},{alias:"yI",category:we.clipboard,description:"Copy Image URL",callback:()=>ne.createHints("img",(e=>ye.write(e.src)))},{alias:"yA",category:we.clipboard,description:"Copy link as Markdown",callback:()=>ne.createHints("a[href]",(e=>ye.write(`[${e.innerText}](${e.href})`)))},{alias:"yM",category:we.clipboard,description:"Copy page URL/Title as Markdown link",callback:()=>ye.write(fe.getMarkdownLink())},{alias:"yT",category:we.tabs,description:"Duplicate current tab (non-active new tab)",callback:()=>fe.openLink(window.location.href,{newTab:!0,active:!1})},{alias:";q",category:we.misc,description:"Insert jquery library on current page",callback:()=>Normal.insertJS("//ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js")},{alias:"yl",category:we.tabs,description:"Copy last element in URL",callback:fe.copyLastElementInURL},{alias:";se",category:we.settings,description:"Edit SK Settings",callback:fe.editSettings},{alias:"gs",category:we.chromeURLs,description:"Open Chrome Shortcuts",callback:fe.openChromeShortcuts},{alias:"gh",category:we.chromeURLs,description:"Open Chrome History",callback:fe.openChromeHistory},{alias:"gz",category:we.misc,description:"Open Proxy SwitchyOmega",callback:fe.openProxySwitchOmega},{alias:"gA",category:we.misc,description:"Open AFineStart",callback:fe.openAFineStart},{alias:"gk",category:we.misc,description:"Open Toby",callback:fe.openTobyMini},{alias:"gO",category:we.misc,description:"Open OneTab",callback:fe.openOneTab},{alias:"=W",category:we.misc,description:"Lookup whois information for domain",callback:()=>fe.openLink(fe.getWhoisUrl(),{newTab:!0})},{alias:"=d",category:we.misc,description:"Lookup dns information for domain",callback:()=>fe.openLink(fe.getDnsInfoUrl(),{newTab:!0})},{alias:"=D",category:we.misc,description:"Lookup all information for domain",callback:()=>fe.openLink(fe.getDnsInfoUrl({all:!0}),{newTab:!0})},{alias:"=c",category:we.misc,description:"Show Google's cached version of page",callback:()=>fe.openLink(fe.getGoogleCacheUrl(),{newTab:!0})},{alias:"=p",category:we.misc,description:"Remove popups, banners, and ads from any website.",callback:()=>fe.openLink(fe.get12ftUrl(),{newTab:!1})},{alias:"=a",category:we.misc,description:"Show Archive.org Wayback Machine for page",callback:()=>fe.openLink(fe.getWaybackUrl(),{newTab:!0})},{alias:"=S",category:we.misc,description:"View summary for page",callback:()=>fe.openLink(fe.getSummaryUrl(),{newTab:!0})},{alias:"=t",category:we.misc,description:"Add to Things",callback:fe.toThings},{alias:"=A",category:we.misc,description:"Add to Anybox",callback:fe.addToAnyBox},{alias:"=R",category:we.misc,description:"Add to Raindrop",callback:fe.addToRaindrop},{alias:"=I",category:we.misc,description:"Add to Readwise",callback:fe.addToReadwise},{alias:";pd",category:we.misc,description:"Toggle PDF viewer from SurfingKeys",callback:fe.togglePdfViewer},{alias:";dI",category:we.misc,description:"Download image to",callback:()=>{t.Hints.create("img",(function(e){t.RUNTIME("download",{url:e.src,saveAs:!0})}))}},{alias:"gxE",map:"gxt",category:we.tabs,description:"Close tab to left"},{alias:"gxR",map:"gxT",category:we.tabs,description:"Close tab to right"},{alias:"F",map:"gf",category:we.mouseClick,description:"Open a link in non-active new tab"},{alias:"ol",category:we.omnibar,description:"Open localhost",callback:fe.openLocalHost},{alias:"oh",category:we.omnibar,description:"Open URL from history",callback:()=>ve.openOmnibar({type:"History"})},{alias:"o,",category:we.omnibar,description:"Open RecentlyClosed",callback:()=>ve.openOmnibar({type:"RecentlyClosed"})},{alias:"oc",category:we.omnibar,description:"Search grep.app",callback:()=>ve.openOmnibar({type:"SearchEngine",extra:"gr"})}],Se["imdb.com"]=[{alias:"yt",description:"Copy IMDB title identifier",callback:fe.copyImdbId}],Se["thetvdb.com"]=[{alias:"yt",description:"Copy TVDB title identifier",callback:fe.copyTVDBId}],Se["amazon.com"]=[{alias:"a",description:"View product",callback:fe.az.viewProduct},{alias:"c",description:"Add to Cart",callback:()=>ne.createHints("#add-to-cart-button")},{alias:"R",description:"View Product Reviews",callback:()=>fe.openLink("#customerReviews")},{alias:"Q",description:"View Product Q&A",callback:()=>fe.openLink("#Ask")},{alias:"A",description:"Open Account page",callback:()=>fe.openLink("/gp/css/homepage.html")},{alias:"C",description:"Open Cart page",callback:()=>fe.openLink("/gp/cart/view.html")},{alias:"O",description:"Open Orders page",callback:()=>fe.openLink("/gp/css/order-history")}],Se["imgur.com"]=[{alias:"!rRight",decsription:"Imgur Next Item",callback:()=>document?.querySelector("a.Navigation-next")?.click()}];const _e=["a h3","h3 a","a[href^='/search']:not(.fl):not(#pnnext,#pnprev):not([role]):not(.hide-focus-ring)","g-scrolling-carousel a",".rc > div:nth-child(2) a",".kno-rdesc a",".kno-fv a",".isv-r > a:first-child",".dbsr > a:first-child",".X5OiLe",".WlydOe",".fl"].join(",");Se["www.google.com"]=[{alias:"a",description:"Open search result",callback:()=>ne.createHints(_e)},{alias:"A",description:"Open search result (new tab)",callback:()=>ne.createHints(_e,fe.openAnchor({newTab:!0,active:!1}))}],Se["algolia.com"]=[{alias:"a",description:"Open search result",callback:()=>ne.createHints(".item-main h2>a:first-child")}],Se["youtube.com"]=[{leader:"",alias:"A",description:"Open video",callback:()=>ne.createHints("*[id='video-title']",fe.openAnchor({newTab:!0}))},{leader:"",alias:"C",description:"Open channel",callback:()=>ne.createHints("*[id='byline']")},{leader:"",alias:"gH",description:"Goto homepage",callback:()=>fe.openLink("https://www.youtube.com/feed/subscriptions?flow=2")},{leader:"",alias:"F",description:"Toggle fullscreen",callback:()=>fe.dispatchMouseEvents(document.querySelector("#movie_player.ytp-fullscreen-button"),"mousedown","click")},{leader:"",alias:"Yt",description:"Copy YouTube video link for current time",callback:()=>ye.write(fe.yt.getCurrentTimestampLink())},{leader:"",alias:"Ym",description:"Copy YouTube video markdown link for current time",callback:()=>ye.write(fe.yt.getCurrentTimestampMarkdownLink())}],Se["sourcegraph.com"]=[{alias:"]",description:"Preview next search result",callback:fe.sg.prevNext},{alias:"[",description:"Preview previous search result",callback:fe.sg.prevPrev},{alias:"O",description:"Open currently previewed search result",callback:fe.sg.openPreviewed},{alias:"S",description:"Save search query",callback:fe.sg.saveSearchQuery},{alias:"1",description:"Toggle sidebar",callback:fe.sg.toggleSidebar},{alias:"c",description:"Open Commits View",callback:fe.sg.openCommitsView},{alias:"b",description:"Open Branches View",callback:fe.sg.openBranchesView},{alias:"h",description:"Toggle history view",callback:fe.sg.toggleHistoryView}],Se["github.com"]=[{alias:";rr",description:"Download associated gist files (raw)",callback:fe.gh.downloadGistFiles},{alias:".l",description:"Add repository to list(s) (beta)",callback:fe.gh.addRepositoryToList},{alias:"A",description:"Open repository Actions page",callback:()=>fe.gh.openRepoPage("/actions")},{alias:"C",description:"Open repository Commits page",callback:()=>fe.gh.openRepoPage("/commits")},{alias:"I",description:"Open repository Issues page",callback:()=>fe.gh.openRepoPage("/issues")},{alias:"N",description:"Open notifications page",callback:()=>fe.gh.openPage("/notifications")},{alias:"P",description:"Open repository Pull Requests page",callback:()=>fe.gh.openRepoPage("/pulls")},{alias:"R",description:"Open Repository page",callback:()=>fe.gh.openRepoPage("/")},{alias:"S",description:"Open repository Settings page",callback:()=>fe.gh.openRepoPage("/settings")},{alias:"W",description:"Open repository Wiki page",callback:()=>fe.gh.openRepoPage("/wiki")},{alias:"X",description:"Open repository Security page",callback:()=>fe.gh.openRepoPage("/security")},{alias:"O",description:"Open repository Owner's profile page",callback:fe.gh.openRepoOwner},{alias:"M",description:"Open your profile page ('Me')",callback:fe.gh.openProfile},{alias:"a",description:"View Repository",callback:fe.gh.openRepo},{alias:"u",description:"View User",callback:fe.gh.openUser},{alias:"f",description:"View File",callback:fe.gh.openFile},{alias:"c",description:"View Commit",callback:fe.gh.openCommit},{alias:"i",description:"View Issue",callback:fe.gh.openIssue},{alias:"p",description:"View Pull Request",callback:fe.gh.openPull},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{leader:"",alias:"gu",description:"Go up one path in the URL (GitHub)",callback:fe.gh.goParent},{alias:"s",description:"Toggle Star",callback:fe.gh.star({toggle:!0})},{alias:"yy",description:"Copy repository name (owner/repo)",callback:async()=>ye.write(ne.getURLPath({count:2}))},{alias:"l",description:"Expand all in gh feed",callback:fe.gh.expandAllInFeed},{alias:"D",description:"Open in github.dev (new tab)",callback:()=>fe.gh.openInDev({newTab:!0})},{alias:"View GoDoc for Project",description:"Open go.dev documentation for the project",callback:fe.gh.viewGoDoc},{alias:"G",description:"View on SourceGraph",callback:fe.gh.viewSourceGraph},{alias:"g",description:"View on SourceGraph (Preserve Tab)",callback:fe.gh.viewSourceGraphInSameTab},{alias:"r",description:"View live raw version of file",callback:()=>fe.gh.selectFile({directories:!1}).then((e=>fe.openLink(e.rawUrl,{newTab:!0})))},{alias:"yr",description:"Copy raw link to file",callback:()=>fe.gh.selectFile({directories:!1}).then((e=>ye.write(e.rawUrl)))},{alias:"yf",description:"Copy link to file",callback:()=>fe.gh.selectFile().then((e=>ye.write(e.url)))},{alias:"gcp",description:"Open clipboard string as file path in repo",callback:fe.gh.openFileFromClipboard}],Se["raw.githubusercontent.com"]=[{alias:"R",description:"Open Repository page",callback:()=>fe.gh.openRepoPage("/")},{alias:"F",description:"Open Source File",callback:fe.gh.openSourceFile}],Se["github.io"]=[{alias:"R",description:"Open Repository page",callback:()=>fe.gh.openGithubPagesRepo()}],Se["gitlab.com"]=[{alias:"s",description:"Toggle Star",callback:fe.gl.star},{alias:"y",description:"Copy Project Path",callback:()=>ye.write(ne.getURLPath({count:2}))},{alias:"Y",description:"Copy Project Path (including domain)",callback:()=>ye.write(ne.getURLPath({count:2,domain:!0}))},{alias:"D",description:"View GoDoc for Project",callback:fe.viewGodoc}],Se["lobste.rs"]=[{alias:"f",description:"Open Link and Comments [Lobsters]",path:/^(page.*)?$/,callback:()=>fe.openStoryAndComments({story:"li.story",link:"a.u-url",comments:".comments_label a"})}],Se["x.com"]=[{alias:"ye",description:"Get Twitter embed script",callback:()=>async()=>ye.write(await ne.getTwitterEmbed(new URL(window.location.href)))},{alias:"f",description:"Follow user",callback:()=>ne.createHints("div[role='button'][data-testid$='follow']")},{alias:"s",description:"Like tweet",callback:()=>ne.createHints("div[role='button'][data-testid$='like']")},{alias:"R",description:"Retweet",callback:()=>ne.createHints("div[role='button'][data-testid$='retweet']")},{alias:"c",description:"Comment/Reply",callback:()=>ne.createHints("div[role='button'][data-testid='reply']")},{alias:"T",description:"New tweet",callback:()=>document.querySelector("a[role='button'][data-testid='SideNav_NewTweet_Button']").click()},{alias:"u",description:"Goto user",callback:fe.tw.openUser},{alias:"t",description:"Goto tweet",callback:()=>ne.createHints("article, article div[data-focusable='true'][role='link'][tabindex='0']")}],Se["bsky.app"]=[{alias:"d",description:"Copy user DID",callback:fe.by.copyDID},{alias:"p",description:"Copy user post ID",callback:fe.by.copyPostID}],Se["reddit.com"]=[{alias:"x",description:"Collapse comment",callback:()=>ne.createHints(".expand")},{alias:"X",description:"Collapse next comment",callback:fe.re.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>ne.createHints(".arrow.up")},{alias:"S",description:"Downvote",callback:()=>ne.createHints(".arrow.down")},{alias:"e",description:"Expand expando",callback:()=>ne.createHints(".expando-button")},{alias:"a",description:"View post (link)",callback:()=>ne.createHints(".title")},{alias:"A",description:"View post (link) (non-active new tab)",callback:()=>ne.createHints(".title",fe.openAnchor({newTab:!0,active:!1}))},{alias:"c",description:"View post (comments)",callback:()=>ne.createHints(".comments")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>ne.createHints(".comments",fe.openAnchor({newTab:!0,active:!1}))}],Se["news.ycombinator.com"]=[{alias:"x",description:"Collapse comment",callback:()=>ne.createHints(".togg")},{alias:"X",description:"Collapse next comment",callback:fe.hn.collapseNextComment},{alias:"s",description:"Upvote",callback:()=>ne.createHints(".votearrow[title='upvote']")},{alias:"S",description:"Downvote",callback:()=>ne.createHints(".votearrow[title='downvote']")},{alias:"a",description:"View post (link)",callback:()=>ne.createHints(".titleline>a")},{alias:"A",description:"View post (link and comments)",callback:()=>ne.createHints(".athing",fe.hn.openLinkAndComments)},{alias:"c",description:"View post (comments)",callback:()=>ne.createHints(".subline>a[href^='item']")},{alias:"C",description:"View post (comments) (non-active new tab)",callback:()=>ne.createHints(".subline>a[href^='item']",fe.openAnchor({newTab:!0,active:!1}))},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{leader:"",alias:"gp",description:"Go to parent",callback:fe.hn.goParent},{leader:"",alias:"]]",description:"Next page",callback:()=>fe.hn.goPage(1)},{leader:"",alias:"[[",description:"Prev page",callback:()=>fe.hn.goPage(-1)}],Se["producthunt.com"]=[{alias:"a",description:"View product (external)",callback:fe.ph.openExternal},{alias:"v",description:"View product",callback:()=>ne.createHints("ul[class^='postsList_'] > li > div[class^='item_'] > a")},{alias:"s",description:"Upvote product",callback:()=>ne.createHints("button[data-test='vote-button']")}],Se["wikipedia.org"]=[{alias:"s",description:"Toggle simple version of current article",callback:fe.wp.toggleSimple},{alias:"a",description:"View page",callback:()=>ne.createHints("#bodyContent :not(sup):not(.mw-editsection) > a:not([rel=nofollow])")},{alias:"e",description:"View external link",callback:()=>ne.createHints("a[rel=nofollow]")},{alias:"ys",description:"Copy article summary as Markdown",callback:()=>ye.write(fe.wp.markdownSummary())},{alias:"R",description:"View WikiRank for current article",callback:fe.wp.viewWikiRank}],Se["craigslist.org"]=[{alias:"a",description:"View listing",callback:()=>ne.createHints("a.result-title")}],Se["stackoverflow.com"]=[{alias:"a",description:"View question",callback:()=>ne.createHints("a.question-hyperlink")}],Se["aur.archlinux.org"]=[{alias:"a",description:"View package",callback:()=>ne.createHints("a[href^='/packages/'][href$='/']")}];const $e="/docs(/.*)?";Se["rescript-lang.org"]=[{leader:"",alias:"i",description:"Focus search field",path:`(${$e})?$`,callback:fe.re.focusSearch},{alias:"a",description:"Open docs link",path:$e,callback:()=>ne.createHints("a[href^='/docs/']")},{alias:"L",description:"Open language manual",callback:()=>fe.openLink("/docs/manual/latest/introduction")},{alias:"R",description:"Open ReScript + React docs",callback:()=>fe.openLink("/docs/react/latest/introduction")},{alias:"G",description:"Open GenType docs",callback:()=>fe.openLink("/docs/gentype/latest/introduction")},{alias:"P",description:"Open package index",callback:()=>fe.openLink("/packages")},{alias:"Y",description:"Open playground",callback:()=>fe.openLink("/try")},{alias:"S",description:"Open syntax lookup",callback:()=>fe.openLink("/syntax-lookup")},{alias:"F",description:"Open community forum",callback:()=>fe.openLink("https://forum.rescript-lang.org/")},{alias:"A",description:"Open API docs",callback:()=>fe.openLink("/docs/manual/latest/api")},{alias:"J",description:"Open JS API docs",callback:()=>fe.openLink("/docs/manual/latest/api/js")},{alias:"B",description:"Open Belt API docs",callback:()=>fe.openLink("/docs/manual/latest/api/belt")},{alias:"D",description:"Open DOM API docs",callback:()=>fe.openLink("/docs/manual/latest/api/dom")},{leader:"",alias:"w",description:"Scroll sidebar up",path:$e,callback:()=>fe.re.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",path:$e,callback:()=>fe.re.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",path:$e,callback:()=>fe.re.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",path:$e,callback:()=>fe.re.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",path:$e,callback:()=>fe.re.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",path:$e,callback:()=>fe.re.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",path:$e,callback:()=>fe.re.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",path:$e,callback:()=>fe.re.scrollContent("pageDown")}],Se["devdocs.io"]=[{leader:"",alias:"w",description:"Scroll sidebar up",callback:()=>fe.dv.scrollSidebar("up")},{leader:"",alias:"s",description:"Scroll sidebar down",callback:()=>fe.dv.scrollSidebar("down")},{leader:"",alias:"e",description:"Scroll sidebar page up",callback:()=>fe.dv.scrollSidebar("pageUp")},{leader:"",alias:"d",description:"Scroll sidebar page down",callback:()=>fe.dv.scrollSidebar("pageDown")},{leader:"",alias:"k",description:"Scroll body up",callback:()=>fe.dv.scrollContent("up")},{leader:"",alias:"j",description:"Scroll body down",callback:()=>fe.dv.scrollContent("down")},{leader:"",alias:"K",description:"Scroll body page up",callback:()=>fe.dv.scrollContent("pageUp")},{leader:"",alias:"J",description:"Scroll body page down",callback:()=>fe.dv.scrollContent("pageDown")}],Se["ebay.com"]=[{alias:"fs",description:"Fakespot",callback:fe.fakeSpot}],Se["kagi.com"]=[{alias:"gg",description:"Kagi to Google",callback:fe.kagi.openKagiInGoogle}],Se["chat.openai.com"]=[{alias:"n",description:"New chat",callback:()=>fe.cg.newChat()},{alias:"a",description:"Open chat",callback:()=>ne.createHints([...fe.cg.getChatLinks()])}];const Te=(e,t=fe.doi.providers.meta_citation_doi)=>{Se[e]||(Se[e]=[]),Se[e].push({alias:"O",description:"Open DOI",callback:()=>{const e=fe.doi.getLink(t);e&&fe.openLink(e,{newTab:!0})},hide:!0})};r&&(Te("aaai.org"),Te("academic.oup.com"),Te("aeaweb.org"),Te("aging-us.com"),Te("ahajournals.org",fe.doi.providers.meta_dcIdentifier_doi),Te("ajnr.org"),Te("annualreviews.org",fe.doi.providers.meta_dcIdentifier_doi),Te("apa.org",(()=>document.querySelector(".citation a")?.innerText?.replace(/^https:\/\/doi\.org\//,""))),Te("ashpublications.org"),Te("asnjournals.org"),Te("biomedcentral.com"),Te("bmj.com"),Te("brill.com"),Te("cambridge.org"),Te("cell.com"),Te("cmaj.ca"),Te("cochranelibrary.com"),Te("diabetesjournals.org"),Te("direct.mit.edu"),Te("dl.acm.org",fe.doi.providers.meta_dcIdentifier_doi),Te("elifesciences.org",(()=>document.querySelector("meta[name='dc.identifier']")?.content?.replace(/^doi:/,""))),Te("embopress.org"),Te("emerald.com",fe.doi.providers.meta_dcIdentifier_doi),Te("episciences.org"),Te("epubs.siam.org",fe.doi.providers.meta_dcIdentifier_doi),Te("ersjournals.com"),Te("europepmc.org"),Te("frontiersin.org"),Te("future-science.com",fe.doi.providers.meta_dcIdentifier_doi),Te("go.gale.com"),Te("ieee.org",(()=>document.querySelector(".stats-document-abstract-doi a")?.innerText)),Te("ingentaconnect.com",(()=>document.querySelector("meta[name='DC.identifier']")?.content?.replace(/^info:doi\//,""))),Te("jacc.or",fe.doi.providers.meta_dcIdentifier_doi),Te("jamanetwork.com"),Te("jci.org"),Te("jfdc.cnic.cn"),Te("jlr.org"),Te("jneurosci.org"),Te("journals.lww.com"),Te("journals.physiology.org",fe.doi.providers.meta_dcIdentifier_doi),Te("journals.plos.org"),Te("journals.sagepub.com",fe.doi.providers.meta_dcIdentifier_doi),Te("journals.uchicago.edu",fe.doi.providers.meta_dcIdentifier_doi),Te("jst.go.jp"),Te("karger.com"),Te("koreascience.kr"),Te("koreascience.or.kr"),Te("liebertpub.com",fe.doi.providers.meta_dcIdentifier_doi),Te("mdpi.com"),Te("msp.org",(()=>document.querySelector(".paper-doi a")?.innerText)),Te("nature.com"),Te("nejm.org",fe.doi.providers.meta_dcIdentifier_doi),Te("nowpublishers.com"),Te("nsf.gov"),Te("ocl-journal.org"),Te("onlinelibrary.wiley.com"),Te("pnas.org"),Te("ncbi.nlm.nih.gov"),Te("pubs.acs.org",fe.doi.providers.meta_dcIdentifier_doi),Te("pubs.geoscienceworld.org"),Te("pubs.rsna.org",fe.doi.providers.meta_dcIdentifier_doi),Te("research.manchester.ac.uk"),Te("royalsocietypublishing.org",fe.doi.providers.meta_dcIdentifier_doi),Te("rupress.org"),Te("science.org",fe.doi.providers.meta_dcIdentifier_doi),Te("sciencedirect.com"),Te("scitation.org"),Te("spandidos-publications.com"),Te("spiedigitallibrary.org"),Te("springer.com"),Te("synapse.koreamed.org"),Te("tandfonline.com",fe.doi.providers.meta_dcIdentifier_doi),Te("thelancet.com"),Te("worldscientific.com",fe.doi.providers.meta_dcIdentifier_doi));const Ce={"wikipedia.org":["wiktionary.org","wikiquote.org","wikisource.org","wikimedia.org","mediawiki.org","wikivoyage.org","wikibooks.org","wikinews.org","wikiversity.org","wikidata.org","wiki.archlinux.org"],"stackoverflow.com":["stackexchange.com","serverfault.com","superuser.com","askubuntu.com","stackapps.com","mathoverflow.net"]};console.dir({unmaps:xe,maps:Se,aliases:Ce},{depth:null});const Re={unmaps:xe,maps:Se,aliases:Ce},{htmlPurify:Ae,htmlNode:Le,htmlForEach:Ee,suggestionItem:Ne,urlItem:Oe,prettyDate:Ie,getDuckduckgoFaviconUrl:qe,localStorage:Ue,runtimeHttpRequest:He,escapeForAlias:De,createSuggestionItem:Me}=ne,Pe="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2056%2056%22%20enable-background%3D%22new%200%200%2056%2056%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23eee%22%20d%3D%22M0%200h56v56h-56z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23999%22%20d%3D%22M36.4%2013.5h-18.6v24.9c0%201.4.9%202.3%202.3%202.3h18.7v-25c.1-1.4-1-2.2-2.4-2.2zm-6.2%203.5h5.1v6.4h-5.1v-6.4zm-8.8%200h6v1.8h-6v-1.8zm0%204.6h6v1.8h-6v-1.8zm0%2015.5v-1.8h13.8v1.8h-13.8zm13.8-4.5h-13.8v-1.8h13.8v1.8zm0-4.7h-13.8v-1.8h13.8v1.8z%22%2F%3E%0A%3C%2Fsvg%3E%0A",Fe="undefined"!=typeof navigator?navigator.language:"",je={},ze=e=>{let t="https://google.com/favicon.ico";return e.favicon?t=e.favicon:e.domain?t=qe(`https://${e.domain}`):e.search&&(t=qe(e.search)),{favicon:t,compl:`https://www.googleapis.com/customsearch/v1?key=${o.google_cs}&cx=${o[`google_cx_${e.alias}`]}&q=`,search:`https://cse.google.com/cse/publicurl?cx=${o[`google_cx_${e.alias}`]}&q=`,callback:e=>JSON.parse(e.text).items.map((e=>Ne({url:e.link})`
<div>
<div class="title"><strong>${Ae(e.htmlTitle)}</strong></div>
<div>${Ae(e.htmlSnippet)}</div>
</div>
`)),priv:!0,...e}};je.td={alias:"td",name:"thefreedictionary",search:"https://www.thefreedictionary.com/search.php?q="},je.nx={alias:"nx",name:"nixpkg",search:"https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=%s"},je.trakt={alias:"trkt",name:"Trakt.tv",domain:"trakt.tv",search:"https://trakt.tv/search?query="},je.tv={alias:"mv",domain:"imdb.com",name:"IMDB",search:"https://www.imdb.com/find?s=all&q="},je.al=ze({alias:"al",name:"archlinux",search:"https://www.archlinux.org/packages/?arch=x86_64&q="}),je.au={alias:"au",name:"AUR",search:"https://aur.archlinux.org/packages/?O=0&SeB=nd&outdated=&SB=v&SO=d&PP=100&do_Search=Go&K=",compl:"https://aur.archlinux.org/rpc?v=5&type=suggest&arg="},je.au.callback=e=>JSON.parse(e.text).map((e=>Oe(e,`https://aur.archlinux.org/packages/${e}`))),je.aw={alias:"aw",name:"archwiki",search:"https://wiki.archlinux.org/index.php?go=go&search=",compl:"https://wiki.archlinux.org/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},je.aw.callback=e=>JSON.parse(e.text)[1],je.af=ze({alias:"af",name:"archforums",domain:"bbs.archlinux.org"}),je.mk={alias:"mk",name:"mankier",search:"https://www.mankier.com/?q=",compl:"https://www.mankier.com/api/v2/suggest/?exclude_sections=&q=",callback:e=>JSON.parse(e.text).results.map((e=>Ne({url:e.url})`
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px">
<div>
<div class="title"><strong>${e.text}</strong></div>
<div class="title">${e.description??""}</div>
</div>
</div>
`))},je.lg={alias:"lg",name:"libgen",search:"https://libgen.is/search.php?req="},je.cs=ze({alias:"cs",name:"chromestore",search:"https://chrome.google.com/webstore/search/"});const Be=e=>JSON.parse(e.text).results.map((e=>{let{name:t}=e;"object"==typeof t&&(void 0!==t[navigator.language]?t=t[navigator.language]:[t]=Object.values(t));let n="";switch(e.type){case"extension":n+="🧩 ";break;case"statictheme":n+="🖌 "}return Ne({url:e.url})`
<div style="padding:5px;display:grid;grid-template-columns:2em 1fr;grid-gap:15px">
<img style="width:2em" src="${e.icon_url}">
<div>
<div class="title"><strong>${n}${t}</strong></div>
</div>
</div>
`}));je.fa={alias:"fa",name:"firefox-addons",search:`https://addons.mozilla.org/${Fe}/firefox/search/?q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?q=",callback:Be},je.ft={alias:"ft",name:"firefox-themes",search:`https://addons.mozilla.org/${Fe}/firefox/search/?type=statictheme&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=statictheme&q=",callback:Be},je.fe={alias:"fe",name:"firefox-extensions",search:`https://addons.mozilla.org/${Fe}/firefox/search/?type=extension&q=`,compl:"https://addons.mozilla.org/api/v4/addons/autocomplete/?type=extension&q=",callback:Be},je.so={alias:"so",name:"stackoverflow",search:"https://stackoverflow.com/search?q=",compl:"https://api.stackexchange.com/2.2/search/advanced?pagesize=10&order=desc&sort=relevance&site=stackoverflow&q="},je.so.callback=e=>JSON.parse(e.text).items.map((e=>Oe(`[${e.score}] ${e.title}`,e.link,{query:!1}))),je.se={alias:"se",name:"stackexchange",search:"https://stackexchange.com/search?q="},je.se.callback=e=>JSON.parse(e.text).map((e=>e.phrase.replace(/^!stackexchange /,""))),je.sg={alias:"sg",name:"Sourcegraph",search:"https://sourcegraph.com/search?q=",compl:"https://sourcegraph.com/.api/graphql?SuggestionsRepo"},je.dh={alias:"dh",name:"dockerhub",search:"https://hub.docker.com/search/?page=1&q=",compl:"https://hub.docker.com/v2/search/repositories/?page_size=20&query="},je.dh.callback=e=>JSON.parse(e.text).results.map((e=>{let t="",n=e.repo_name;return t+=`[★${e.star_count}] `,t+=`[↓${e.pull_count}] `,-1===n.indexOf("/")&&(n=`_/${n}`),Ne({url:`https://hub.docker.com/r/${n}`})`
<div>
<div class="title"><strong>${n}</strong></div>
<div>${t}</div>
<div>${e.short_description}</div>
</div>
`})),je.gh={alias:"gh",name:"github",search:"https://github.com/search?q=",compl:"https://api.github.com/search/repositories?sort=stars&order=desc&q="},je.gh.callback=e=>JSON.parse(e.text).items.map((e=>{let t="";return e.stargazers_count&&(t+=`[★${parseInt(e.stargazers_count,10)}] `),Oe(t+e.full_name,e.html_url,{query:e.full_name,desc:e.description})})),je.gst={alias:"gst",name:"Gist [JS]",search:"https://gist.github.com/search?o=desc&s=stars&q=%22%3D%3DUserScript%3D%3D%22+",compl:"https://api.github.com/gists/public?&l=JavaScript&q=per_page=20&q=",favicon:qe("https://gist.github.com"),callback:e=>JSON.parse(e.text).map((e=>{const t=e.description?e.description:"No description";return Ne({url:e.html_url})`
<div>
<div class="title"><strong>${e.owner.login}/${e.files[Object.keys(e.files)[0]].filename}</strong></div>
<div>${t}</div>
</div>
`}))},je.vw={alias:"vw",name:"vimwiki",search:"https://vim.fandom.com/wiki/Special:Search?query=",compl:"https://vim.fandom.com/api.php?action=opensearch&format=json&formatversion=2&namespace=0&limit=10&suggest=true&search="},je.vw.callback=e=>JSON.parse(e.text)[1].map((e=>Oe(e,`https://vim.fandom.com/wiki/${encodeURIComponent(e)}`,{query:!1}))),je.az={alias:"az",name:"amazon",search:"https://smile.amazon.com/s/?field-keywords=",compl:"https://completion.amazon.com/search/complete?method=completion&mkt=1&search-alias=aps&q="},je.az.callback=e=>JSON.parse(e.text)[1],je.cr={alias:"cr",name:"crates",search:"https://crates.io/search?q=",compl:"https://crates.io/api/v1/crates?q=",callback:e=>JSON.parse(e.text).crates.map((e=>{const t=`[${e.num_downloads} downloads]`;return Ne({url:e.documentation})`
<div>
<div class="title"><strong>${e.name}</strong></div>
<div>${e.description}</div>
<div>${t}</div>
</div>
`}))},je.cl={alias:"cl",name:"craigslist",search:"https://www.craigslist.org/search/sss?query=",compl:"https://www.craigslist.org/suggest?v=12&type=search&cat=sss&area=1&term="},je.cl.callback=e=>JSON.parse(e.text),je.eb={alias:"eb",name:"ebay",search:"https://www.ebay.com/sch/i.html?_nkw=",compl:"https://autosug.ebay.com/autosug?callback=0&sId=0&kwd="},je.eb.callback=e=>JSON.parse(e.text).res.sug,je.un={alias:"un",name:"unicode",search:"https://unicode-table.com/en/search/?q=",compl:"http://localhost:9919/s/unicode?q=",local:!0},je.ri={alias:"ri",name:"reddit",search:"https://old.reddit.com/r/"},je.usw={alias:"usw",name:"userstyles.world",search:"https://userstyles.world/search?q="},je.un.callback=e=>{const t=JSON.parse(e.text).slice(0,20),n="font-family: monospace; background-color: rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.4); border-radius: 5px; padding: 2px 4px; opacity: 70%";return t.map((({symbol:e,name:t,value:a})=>{return Ne({url:`https://unicode-table.com/en/${a}`,copy:e})`
<div>
<span style="font-size: 2em; font-weight: bold; min-width: 1em; margin-left: 0.5em; display: inline-block">${e}</span>
<span style="${n}">U+${a}</span>
<span style="${n}">&amp;#${parseInt(a,16)};</span>
<span>${o=t.toLowerCase(),o.split(" ").map((e=>`${e[0]?.toUpperCase()??""}${e.length>1?e.slice(1):""}`)).join(" ")}</span>
</div>
`;var o}))},je.gr={alias:"gr",name:"grep",search:"https://grep.app/search?q=",compl:"https://grep.app/search?q=",callback:e=>JSON.parse(e.text).map((function(e){return e.phrase}))};const Ve=(e,t={})=>{const n={maxDefs:-1,ellipsis:!1,...t};return e.map((e=>{const t=[];let a="";if((n.maxDefs<=-1||n.maxDefs>0)&&e.defs&&e.defs.length>0){for(const a of e.defs.slice(0,n.maxDefs<=-1?void 0:n.maxDefs)){const e=a.split("\t"),n=`(${e[0]})`,o=e[1];t.push(`<span><em>${n}</em> ${o}</span>`)}n.ellipsis&&e.defs.length>n.maxDefs&&t.push("<span><em>&hellip;</em></span>"),a=`<div>${t.join("<br />")}</div>`}return Ne({url:`${n.wordBaseURL}${e.word}`})`
<div>
<div class="title"><strong>${e.word}</strong></div>
${Ae(a)}
</div>
`}))};je.de={alias:"de",name:"define",search:"http://onelook.com/?w=",compl:"https://api.datamuse.com/words?md=d&sp=%s*",opts:{maxDefs:16,ellipsis:!0,wordBaseURL:"http://onelook.com/?w="}},je.de.callback=e=>{const t=JSON.parse(e.text);return Ve(t,je.de.opts)},je.cb={alias:"cb",name:"crunchbase",search:"https://www.crunchbase.com/textsearch?q=",compl:`https://api.crunchbase.com/v/3/odm_organizations?user_key=${o.crunchbase}&query=%s`,priv:!0},je.th={alias:"th",name:"thesaurus",search:"https://www.onelook.com/thesaurus/?s=",compl:"https://api.datamuse.com/words?md=d&ml=%s",opts:{maxDefs:3,ellipsis:!0,wordBaseURL:"http://onelook.com/thesaurus/?s="}},je.th.callback=e=>{const t=JSON.parse(e.text);return Ve(t,je.th.opts)},je.wp={alias:"wp",name:"wikipedia",search:"https://en.wikipedia.org/w/index.php?search=",compl:"https://en.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&prop=info|pageprops%7Cpageimages%7Cdescription&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=100&pilimit=6&inprop=url&gpssearch="},je.wp.callback=e=>Object.values(JSON.parse(e.text).query.pages).map((e=>{const t=e.thumbnail?e.thumbnail.source:Pe;return Ne({url:e.fullurl})`
<div style="padding:5px;display:grid;grid-template-columns:60px 1fr;grid-gap:15px">
<img style="width:60px" src="${t}">
<div>
<div class="title"><strong>${e.title}</strong></div>
<div class="title">${e.description??""}</div>
</div>
</div>
`})),je.wa={alias:"wa",name:"wolframalpha",search:"http://www.wolframalpha.com/input/?i=",compl:`http://api.wolframalpha.com/v2/query?appid=${o.wolframalpha}&format=plaintext,image&output=json&reinterpret=true&input=%s`,priv:!0},je.wa.callback=(e,{query:t})=>{const n=JSON.parse(e.text).queryresult;if(n.error)return[Ne({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Error</strong> (Code ${n.error.code})</div>
<div class="title">${n.error.msg}</div>
</div>
`];if(!n.success)return n.tips?[Ne({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>No Results</strong></div>
<div class="title">${n.tips.text}</div>
</div>
`]:n.didyoumeans?n.didyoumeans.map((e=>Ne({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Did you mean...?</strong></div>
<div class="title">${e.val}</div>
</div>
`)):[Ne({url:"https://www.wolframalpha.com/"})`
<div>
<div class="title"><strong>Error</strong></div>
<div class="title">An unknown error occurred.</div>
</div>
`];const a=[];return n.pods.forEach((e=>{const n={title:e.title,values:[],url:`http://www.wolframalpha.com/input/?i=${encodeURIComponent(t)}`};e.numsubpods>0&&(e.subpods[0].plaintext&&(n.url=encodeURIComponent(e.subpods[0].plaintext),n.copy=e.subpods[0].plaintext),e.subpods.forEach((e=>{let t="";e.title&&(t=Le`<strong>${e.title}</strong>: `),e.img?t=Le`
<div>${t}</div>
<div>
<img
src="${e.img.src}"
width="${e.img.width}"
height="${e.img.height}"
style="margin-top: 6px; padding: 12px; border-radius: 12px; background: white"
>
</div>
`:e.plaintext&&(t=`${t}${e.plaintext}`),t&&(t=Le`<div class="title">${t}</div>`),n.values.push(t)}))),n.values.length>0&&a.push(n)})),a.map((e=>Ne({url:e.url,copy:e.copy,query:e.query})`
<div>
<div class="title"><strong>${e.title}</strong></div>
${Ee(e.values)}
</div>`))},je.xm={alias:"xm",name:"X my",search:"https://x.com/search?q=from:nicoandmee%20{0}&f=live"},je.xp={alias:"xp",name:"X (all)",search:"https://x.com/search?q="},je.xu={alias:"oxu",name:"X (from user)",search:"https://x.com/search?q=from:{0}&f=live"},je.go={alias:"go",name:"google",search:"https://www.google.com/search?q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&q="},je.go.callback=e=>JSON.parse(e.text)[1],je.gi={alias:"gi",name:"google-images",search:"https://www.google.com/search?tbm=isch&q=",compl:"https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext&oit=1&cp=1&pgcl=7&ds=i&q=",callback:je.go.callback},je.ka={alias:"ka",name:"kagi",search:"https://kagi.com/search?q=",compl:"https://kagi.com/autosuggest?q=",callback:e=>JSON.parse(e.text).map((e=>{const t=new URL("https://kagi.com/search");return t.searchParams.append("q",e.t),e.goto&&(t.href=e.goto),Ne({url:t.href})`
<div style="padding: 5px; display: grid; grid-template-columns: 32px 1fr; grid-gap: 15px">
<img style="width: 32px" src="${e.img?new URL(e.img,"https://kagi.com"):Pe}" />
<div>
<div class="title"><strong>${e.t}</strong></div>
<div class="title">${e.txt??""}</div>
</div>
</div>
`}))},je.gd={alias:"gd",name:"Google Drive",search:"https://drive.google.com/drive/u/0/search?q="},je.rs={alias:"rs",name:"docs.rs",search:"https://docs.rs/releases/search?query="},je.hx={alias:"hx",name:"hex",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hx&search="},je.hx.callback=e=>JSON.parse(e.text).map((e=>Ne({url:e.html_url})`
<div>
<div class="title">${e.repository}/<strong>${e.name}</strong></div>
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div>
<div>${e.meta?.description??""}</div>
</div>
`)),je.hd={alias:"hd",name:"hexdocs",search:"https://hex.pm/packages?sort=downloads&search=",compl:"https://hex.pm/api/packages?sort=downloads&hd&search="},je.hd.callback=e=>JSON.parse(e.text).map((e=>Ne({url:`https://hexdocs.pm/${encodeURIComponent(e.name)}`})`
<div>
<div class="title">${e.repository}/<strong>${e.name}</strong></div>
<div>${e.downloads?.all?`[↓${e.downloads.all}]`:""}</div>
<div>${e.meta?.description??""}</div>
</div>
`)),je.gg=ze({alias:"gg",name:"golang",domain:"golang.org"}),je.gp={alias:"gp",name:"gopkg",search:"https://pkg.go.dev/search?q=htmlq&m=package",compl:"https://pkg.go.dev/search?q=",callback:e=>JSON.parse(e.text).Results.map((e=>{const t=new URL("https://pkg.go.dev");return t.searchParams.append("q",e.Name),Ne({url:t.href})`
<div>
<div class="title"><strong>${e.Name}</strong></div>
<div>${e.Synopsis}</div>
</div>
`}))},je.tw={alias:"tw",name:"twitter",search:"https://twitter.com/search?q=",compl:"https://twitter.com/i/search/typeahead.json?count=10&filters=true&q="},je.tw.callback=e=>JSON.parse(e.text).topics.map((e=>Me(e.topic,{url:`https://twitter.com/search?q=${encodeURIComponent(e.topic)}`}))),je.no=ze({alias:"no",name:"node",domain:"nodejs.org"}),je.md={alias:"md",name:"mdn",search:"https://developer.mozilla.org/en-US/search?q=",compl:"https://developer.mozilla.org/api/v1/search?q=",callback:e=>JSON.parse(e.text).documents.map((e=>Me(`\n <div>\n <div class="title"><strong>${e.title}</strong></div>\n <div style="font-size:0.8em"><em>${e.slug}</em></div>\n <div>${e.summary}</div>\n </div>\n `,{url:`https://developer.mozilla.org/${e.locale}/docs/${e.slug}`})))},je.np={alias:"np",name:"npm",search:"https://www.npmjs.com/search?q=",compl:"https://api.npms.io/v2/search/suggestions?size=20&q=",favicon:qe("https://www.npmjs.com")},je.np.callback=e=>JSON.parse(e.text).map((e=>{let t="",n="",a="",o="";return e.package.description&&(n=De(e.package.description)),e.score&&e.score.final&&(o=Math.round(5*Number(e.score.final)),a="⭐".repeat(o)+"☆".repeat(5-o)),e.flags&&Object.keys(e.flags).forEach((e=>{t+=`[<span style='color:#ff4d00'>⚑</span> ${De(e)}] `})),Me(`\n <div>\n <style>.title>em { font-weight: bold; }</style>\n <div class="title">${e.highlight}</div>\n <div>\n <span style="font-size:1.5em;line-height:1em">${a}</span>\n <span>${t}</span>\n </div>\n <div>${n}</div>\n </div>\n `,{url:e.package.links.npm})})),je.ts={alias:"ts",name:"typescript",domain:"www.typescriptlang.org",search:"https://duckduckgo.com/?q=site%3Awww.typescriptlang.org+",compl:"https://bgcdyoiyz5-dsn.algolia.net/1/indexes/typescriptlang?x-algolia-application-id=BGCDYOIYZ5&x-algolia-api-key=37ee06fa68db6aef451a490df6df7c60&query=",favicon:"https://www.typescriptlang.org/favicon-32x32.png"},je.ts.callback=async e=>{const t=JSON.parse(e.text);return Object.entries(t.hits.reduce(((e,t)=>{const n=t.hierarchy.lvl0;return e[n]||(e[n]=[]),e[n].push(t),e}),{})).sort((([e],[t])=>e.localeCompare(t))).flatMap((([e,t])=>t.map((e=>{console.log(e);const t=e.type,n=Object.entries(e.hierarchy).reduce(((t,[n,a])=>a&&n!==e.type?`${t?t+" > ":""}${a}`:t),""),a=e.hierarchy[t],o=e.content;return Ne({url:e.url})`
<div>
<div style="font-weight: bold">
<span style="opacity: 0.6">${Ae(n)}${a?" > ":""}</span>
<span style="">${Ae(a)}</span>
</div>
<div>${Ae(o)}</div>
<div style="opacity: 0.6; line-height: 1.3em">${Ae(e.url)}</div>
</div>
`}))))},je.lb={alias:"lb",name:"lobsters",domain:"lobste.rs",search:"https://lobste.rs/search?what=comments&order=newest&q="},je.dt={alias:"dto",name:"DEV",domain:"dev.to",search:"https://dev.to/search&sort_by=published_at&sort_direction=desc&q="},je.rd={alias:"rd",name:"raindrop",domain:"app.raindrop.io",search:"https://api.raindrop.io/v1/raindrops/0?sort=-created&perpage=10&search=",callback:e=>JSON.parse(e.text).items.map((e=>{const t=e.title,n=e.link,a=new URL(n).hostname;return Ne({url:n})`
<div>
<div class="title"><strong>${t}</strong></div>
<div>${a}</div>
</div>
`}))},je.br={alias:"br",name:"brew",domain:"formulae.brew.sh",search:"https://formulae.brew.sh/search/",compl:"https://formulae.brew.sh/api/formula.json",favicon:"https://formulae.brew.sh/assets/img/homebrew-256x256.png",callback:e=>JSON.parse(e.text).map((e=>{const t=e.name,n=e.desc;return Ne({url:`https://formulae.brew.sh/formula/${e.name}`})`
<div>
<div class="title"><strong>${t}</strong></div>
<div>${n}</div>
</div>
`}))},je.hn={alias:"hn",name:"hackernews",domain:"news.ycombinator.com",search:"https://hn.algolia.com/?query=",compl:"https://hn.algolia.com/api/v1/search?tags=(story,comment)&query=",callback:e=>JSON.parse(e.text).hits.map((e=>{let t="",n="";switch(e.points&&(n+=`[↑${e.points}] `),e.num_comments&&(n+=`[↲${e.num_comments}] `),e._tags[0]){case"story":t=e.title;break;case"comment":t=e.comment_text;break;default:t=e.objectID}const a=`https://news.ycombinator.com/item?id=${encodeURIComponent(e.objectID)}`;return Ne({url:a})`
<div>
<div class="title">${n}${t}</div>
<div class="url">${a}</div>
</div>
`}))},je.lr={alias:"lr",name:"luarocks",domain:"luarocks.org",search:"https://luarocks.org/search?q="},je.re={alias:"re",name:"reddit",search:"https://www.reddit.com/search?sort=relevance&t=all&q=",compl:"https://api.reddit.com/search?syntax=plain&sort=relevance&limit=20&q="},je.re.thumbs={default:"https://i.imgur.com/VCm94xa.png",image:"https://i.imgur.com/OaAUUaQ.png",nsfw:"https://i.imgur.com/lnmJrXP.png",self:"https://i.imgur.com/KQ8uYZz.png",spoiler:"https://i.imgur.com/gx2tGsv.png"},je.re.callback=async(e,{query:t})=>{const[n,a,o,r=""]=t.match(/^\s*\/?(r\/[a-zA-Z0-9_]+)(\s+(.*))?/)??[null,null,null,t];if(a&&r)e={text:await He(`https://api.reddit.com/${encodeURIComponent(a)}/search?syntax=plain&sort=relevance&restrict_sr=on&limit=20&q=${encodeURIComponent(r)}`)};else if(a){const e=await He(`https://www.reddit.com/api/search_reddit_names.json?typeahead=true&exact=false&query=${encodeURIComponent(a)}`);return JSON.parse(e).names.map((e=>Oe(`r/${e}`,`https://reddit.com/r/${encodeURIComponent(e)}`,{query:`r/${e}`})))}return JSON.parse(e.text).data.children.map((({data:e})=>{const t=e.thumbnail?.match(/^https?:\/\//)?e.thumbnail:je.re.thumbs[e.thumbnail]??je.re.thumbs.default,n=Ie(new Date(1e3*parseInt(e.created,10)));return Ne({url:encodeURI(`https://reddit.com${e.permalink}`)})`
<div style="display: flex; flex-direction: row">
<img style="width: 70px; height: 50px; margin-right: 0.8em" alt="thumbnail" src="${t}">
<div>
<div>
<strong><span style="font-size: 1.2em; margin-right: 0.2em">↑</span>${e.score}</strong> ${e.title} <span style="font-size: 0.8em; opacity: 60%">(${e.domain})</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="color: opacity: 70%">r/${e.subreddit}</span> • <span style="color: opacity: 70%">${e.num_comments??"unknown"}</span> <span style="opacity: 60%">comments</span> • <span style="opacity: 60%">submitted ${n} by</span> <span style="color: opacity: 70%">${e.author}</span></span>
</div>
</div>
</div>
`}))},je.ol={alias:"ol",name:"OpenLibrary",domain:"openlibrary.org",search:"https://openlibrary.org/search?q=",compl:"https://openlibrary.org/search.json?q=",callback:e=>JSON.parse(e.text).docs.map((e=>{const t=e.author_name?.[0]??"unknown",n=e.title,a=e.first_publish_year??"unknown";return Ne({url:`https://openlibrary.org${e.key}`})`
<div>
<div class="title"><strong>${n}</strong></div>
<div class="title">${t} • ${a}</div>
</div>
`}))},je.devv={alias:"dvai",name:"devv.ai",domain:"devv.ai",search:"https://devv.ai/search/",favicon:"https://devv.ai/favicon.ico"},je.yt={alias:"yt",name:"youtube",search:"https://www.youtube.com/search?q=",compl:`https://www.googleapis.com/youtube/v3/search?maxResults=20&part=snippet&type=video,channel&key=${o.google_yt}&safeSearch=none&q=`,priv:!0},je.yt.callback=e=>JSON.parse(e.text).items.map((e=>{const t=e.snippet.thumbnails.default;switch(e.id.kind){case"youtube#channel":return Ne({url:`https://youtube.com/channel/${e.id.channelId}`})`
<div style="display: flex; flex-direction: row">
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}">
<div>
<div>
<strong>${e.snippet.channelTitle}</strong>
</div>
<div>
<span>${e.snippet.description}</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="opacity: 70%">channel</span></span>
</div>
</div>
</div>
`;case"youtube#video":const n=Ie(new Date(e.snippet.publishTime));return Ne({url:`https://youtu.be/${encodeURIComponent(e.id.videoId)}`})`
<div style="display: flex; flex-direction: row">
<img style="${`width: ${t.width??120}px; height: ${t.height??90}px; margin-right: 0.8em`}" alt="thumbnail" src="${t.url}">
<div>
<div>
<strong>${Ae(e.snippet.title)}</strong>
</div>
<div>
<span>${Ae(e.snippet.description)}</span>
</div>
<div>
<span style="font-size: 0.8em"><span style="opacity: 70%">video</span> <span style="opacity: 60%">by</span> <span style="opacity: 70%">${e.snippet.channelTitle}</span> • <span style="opacity: 70%">${n}</span></span>
</div>
</div>
</div>
`;default:return null}})).filter((e=>!!e));const Ge=je,Je={rosewater:"#f5e0dc",flamingo:"#f2cdcd",pink:"#f5c2e7",mauve:"#cba6f7",red:"#f38ba8",maroon:"#eba0ac",peach:"#fab387",yellow:"#f9e2af",green:"#a6e3a1",teal:"#94e2d5",sky:"#89dceb",sapphire:"#74c7ec",blue:"#87b0f9",lavender:"#b4befe",text:"#c6d0f5",subtext1:"#b3bcdf",subtext0:"#a1a8c9",overlay3:"#9ca3c0",overlay2:"#8e95b3",overlay1:"#7b819d",overlay0:"#696d86",surface2:"#565970",surface1:"#43465a",surface0:"#313244",base:"#1e1e2e",mantle:"#181825",crust:"#11111b"};const We=`font-size: 14pt; font-family: "Iosevka Nerd Font"; border: 0px; color: ${Je.text} !important; background: ${Je.base}; background-color: ${Je.base}`;api.Hints.style(We),api.Hints.style(We,"text"),api.Visual.style("marks",`background-color: ${Je.green};`),api.Visual.style("cursor",`background-color: ${Je.sapphire};`);const Ke=`\n background: ${Je.teal} none;\n border: solid 1px ${Je.blue};\n color: ${Je.crust};\n font-size: 14px;\n font-weight: 200;\n font-family: "Iosevka Nerd Font";\n padding: 2px;\n text-transform: lowercase;\n`;api.Hints.style(Ke),api.Hints.style(`div { ${Ke} }\n div.begin { color: ${Je.crust}; }`,"text"),api.Hints.charactersUpper=!1;const Ye=`\n${function(e){return`:root {\n ${Object.entries(e).map((([e,t])=>`\t--ctp-${e.toLowerCase()}: ${t};`)).join("\n")}\n}`}(Je)}\n :root {\n --font: 'Iosevka Nerd Font', Menlo, sans;\n --font-size: 18;\n --font-weight: bold;\n\n --tridactyl-hintspan-fg: var(--base0A);\n --tridactyl-hintspan-bg: var(--base08);\n --tridactyl-hintspan-border-color: var(--base00);\n --tridactyl-hintspan-border-width: 2px;\n --tridactyl-hintspan-border-radius: 30px;\n --tridactyl-hintspan-margin: 3px;\n --tridactyl-hintspan-border-style: solid;\n\n --tridactyl-fg: var(--base05);\n --tridactyl-bg: var(--base00);\n --tridactyl-url-fg: var(--base08);\n --tridactyl-url-bg: var(--base00);\n --tridactyl-highlight-box-bg: var(--base0B);\n --tridactyl-highlight-box-fg: var(--base00);\n }\n\n\n .sk_theme {\n background: var(--ctp-base);\n color: var(--ctp-text);\n }\n .sk_theme input {\n color: var(--ctp-text);\n }\n .sk_theme .url {\n color: var(--ctp-lavender);\n }\n .sk_theme .annotation {\n color: var(--ctp-rosewater);\n }\n .sk_theme kbd {\n background: var(--ctp-overlay0);\n color: var(--ctp-text);\n }\n .sk_theme .frame {\n background: var(--ctp-surface1);\n }\n .sk_theme .omnibar_highlight {\n color: var(--ctp-overlay1);\n }\n .sk_theme .omnibar_folder {\n color: var(--ctp-text);\n }\n .sk_theme .omnibar_timestamp {\n color: var(--ctp-blue);\n }\n .sk_theme .omnibar_visitcount {\n color: var(--ctp-maroon);\n }\n .sk_theme .prompt, .sk_theme .resultPage {\n color: var(--ctp-text);\n }\n .sk_theme .feature_name {\n color: var(--ctp-text);\n }\n .sk_theme .separator {\n color: var(--ctp-overlay1);\n }\n body {\n margin: 0;\n font-family: "Iosevka Nerd Font", "Cascadia Code", "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 16px;\n }\n #sk_omnibar {\n overflow: hidden;\n position: fixed;\n width: 80%;\n max-height: 80%;\n left: 10%;\n text-align: left;\n box-shadow: 0px 2px 10px var(--ctp-overlay0);\n z-index: 2147483000;\n }\n .sk_omnibar_middle {\n top: 10%;\n border-radius: 4px;\n }\n .sk_omnibar_bottom {\n bottom: 0;\n border-radius: 4px 4px 0px 0px;\n }\n #sk_omnibar span.omnibar_highlight {\n text-shadow: 0 0 0.01em;\n }\n #sk_omnibarSearchArea .prompt, #sk_omnibarSearchArea .resultPage {\n display: inline-block;\n font-size: 20px;\n width: auto;\n }\n #sk_omnibarSearchArea>input {\n display: inline-block;\n width: 100%;\n flex: 1;\n font-size: 20px;\n margin-bottom: 0;\n padding: 0px 0px 0px 0.5rem;\n background: transparent;\n border-style: none;\n outline: none;\n }\n #sk_omnibarSearchArea {\n display: flex;\n align-items: center;\n border-bottom: 1px solid var(--ctp-overlay1);\n }\n .sk_omnibar_middle #sk_omnibarSearchArea {\n margin: 0.5rem 1rem;\n }\n .sk_omnibar_bottom #sk_omnibarSearchArea {\n margin: 0.2rem 1rem;\n }\n .sk_omnibar_middle #sk_omnibarSearchResult>ul {\n margin-top: 0;\n }\n .sk_omnibar_bottom #sk_omnibarSearchResult>ul {\n margin-bottom: 0;\n }\n #sk_omnibarSearchResult {\n max-height: 60vh;\n overflow: hidden;\n margin: 0rem 0.6rem;\n }\n #sk_omnibarSearchResult:empty {\n display: none;\n }\n #sk_omnibarSearchResult>ul {\n padding: 0;\n }\n #sk_omnibarSearchResult>ul>li {\n padding: 0.2rem 0rem;\n display: block;\n max-height: 600px;\n overflow-x: hidden;\n overflow-y: auto;\n }\n .sk_theme #sk_omnibarSearchResult>ul>li:nth-child(odd) {\n background: var(--ctp-surface1);\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.focused {\n background: var(--ctp-overlay0);\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.window {\n border: 2px solid var(--ctp-overlay1);\n border-radius: 8px;\n margin: 4px 0px;\n }\n .sk_theme #sk_omnibarSearchResult>ul>li.window.focused {\n border: 2px solid var(--ctp-lavender);\n }\n .sk_theme div.table {\n display: table;\n }\n .sk_theme div.table>* {\n vertical-align: middle;\n display: table-cell;\n }\n #sk_omnibarSearchResult li div.title {\n text-align: left;\n }\n #sk_omnibarSearchResult li div.url {\n font-weight: bold;\n white-space: nowrap;\n }\n #sk_omnibarSearchResult li.focused div.url {\n white-space: normal;\n }\n #sk_omnibarSearchResult li span.annotation {\n float: right;\n }\n #sk_omnibarSearchResult .tab_in_window {\n display: inline-block;\n padding: 5px;\n margin: 5px;\n box-shadow: 0px 2px 10px var(--ctp-overlay0);\n }\n #sk_status {\n position: fixed;\n bottom: 0;\n right: 20%;\n z-index: 2147483000;\n padding: 4px 8px 0 8px;\n border-radius: 4px 4px 0px 0px;\n border: 1px solid var(--ctp-overlay1);\n font-size: 12px;\n }\n #sk_status>span {\n line-height: 16px;\n }\n .expandRichHints span.annotation {\n padding-left: 4px;\n color: var(--ctp-rosewater);\n }\n .expandRichHints .kbd-span {\n min-width: 30px;\n text-align: right;\n display: inline-block;\n }\n .expandRichHints kbd>.candidates {\n color: var(--ctp-text);\n font-weight: bold;\n }\n .expandRichHints kbd {\n padding: 1px 2px;\n }\n #sk_find {\n border-style: none;\n outline: none;\n }\n #sk_keystroke {\n padding: 6px;\n position: fixed;\n float: right;\n bottom: 0px;\n z-index: 2147483000;\n right: 0px;\n background: var(--ctp-base);\n color: var(--ctp-text);\n }\n #sk_usage, #sk_popup, #sk_editor {\n overflow: auto;\n position: fixed;\n width: 80%;\n max-height: 80%;\n top: 10%;\n left: 10%;\n text-align: left;\n box-shadow: var(--ctp-overlay0);\n z-index: 2147483298;\n padding: 1rem;\n }\n #sk_nvim {\n position: fixed;\n top: 10%;\n left: 10%;\n width: 80%;\n height: 30%;\n }\n #sk_popup img {\n width: 100%;\n }\n #sk_usage>div {\n display: inline-block;\n vertical-align: top;\n }\n #sk_usage .kbd-span {\n width: 80px;\n text-align: right;\n display: inline-block;\n }\n #sk_usage .feature_name {\n text-align: center;\n padding-bottom: 4px;\n }\n #sk_usage .feature_name>span {\n border-bottom: 2px solid $highlightHigh;\n }\n #sk_usage span.annotation {\n padding-left: 32px;\n line-height: 22px;\n }\n #sk_usage * {\n font-size: 10pt;\n }\n kbd {\n white-space: nowrap;\n display: inline-block;\n padding: 3px 5px;\n font: 11px "Iosevka Nerd Font", "Cascadia Code", "Helvetica Neue", Helvetica, Arial, sans-serif;\n line-height: 10px;\n vertical-align: middle;\n border: solid 1px var(--ctp-overlay3);\n border-bottom-lolor: var(--ctp-overlay3);\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 var(--ctp-overlay0);\n }\n #sk_banner {\n padding: 0.5rem;\n position: fixed;\n left: 10%;\n top: -3rem;\n z-index: 2147483000;\n width: 80%;\n border-radius: 0px 0px 4px 4px;\n border: 1px solid var(--ctp-overlay1);\n border-top-style: none;\n text-align: center;\n background: var(--ctp-base);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n #sk_tabs {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n overflow: auto;\n z-index: 2147483000;\n }\n div.sk_tab {\n display: inline-flex;\n height: 28px;\n width: 202px;\n justify-content: space-between;\n align-items: center;\n flex-direction: row-reverse;\n border-radius: 3px;\n padding: 10px 20px;\n margin: 5px;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,var(--ctp-base)), color-stop(100%,var(--ctp-base)));\n box-shadow: 0px 3px 7px 0px var(--ctp-overlay0);\n }\n div.sk_tab_wrap {\n display: inline-block;\n flex: 1;\n }\n div.sk_tab_icon {\n display: inline-block;\n vertical-align: middle;\n }\n div.sk_tab_icon>img {\n width: 18px;\n }\n div.sk_tab_title {\n width: 150px;\n display: inline-block;\n vertical-align: middle;\n font-size: 10pt;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding-left: 5px;\n color: var(--ctp-text);\n }\n div.sk_tab_url {\n font-size: 10pt;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n color: var(--ctp-lavender);\n }\n div.sk_tab_hint {\n display: inline-block;\n float:right;\n font-size: 10pt;\n font-weight: bold;\n padding: 0px 2px 0px 2px;\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,var(--ctp-base)), color-stop(100%,var(--ctp-base)));\n color: var(--ctp-text);\n border: solid 1px var(--ctp-overlay1);\n border-radius: 3px;\n box-shadow: var(--ctp-overlay0);\n }\n #sk_tabs.vertical div.sk_tab_hint {\n position: initial;\n margin-inline: 0;\n }\n div.tab_rocket {\n display: none;\n }\n #sk_bubble {\n position: absolute;\n padding: 9px;\n border: 1px solid var(--ctp-overlay1);\n border-radius: 4px;\n box-shadow: 0 0 20px var(--ctp-overlay0);\n color: var(--ctp-text);\n background-color: var(--ctp-base);\n z-index: 2147483000;\n font-size: 14px;\n }\n #sk_bubble .sk_bubble_content {\n overflow-y: scroll;\n background-size: 3px 100%;\n background-position: 100%;\n background-repeat: no-repeat;\n }\n .sk_scroller_indicator_top {\n background-image: linear-gradient(var(--ctp-base), transparent);\n }\n .sk_scroller_indicator_middle {\n background-image: linear-gradient(transparent, var(--ctp-base), transparent);\n }\n .sk_scroller_indicator_bottom {\n background-image: linear-gradient(transparent, var(--ctp-base), transparent);\n }\n #sk_bubble * {\n color: var(--ctp-text) !important;\n }\n div.sk_arrow>div:nth-of-type(1) {\n left: 0;\n position: absolute;\n width: 0;\n border-left: 12px solid transparent;\n border-right: 12px solid transparent;\n background: transparent;\n }\n div.sk_arrow[dir=down]>div:nth-of-type(1) {\n border-top: 12px solid var(--ctp-overlay1);\n }\n div.sk_arrow[dir=up]>div:nth-of-type(1) {\n border-bottom: 12px solid var(--ctp-overlay1);\n }\n div.sk_arrow>div:nth-of-type(2) {\n left: 2px;\n position: absolute;\n width: 0;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n background: transparent;\n }\n div.sk_arrow[dir=down]>div:nth-of-type(2) {\n border-top: 10px solid var(--ctp-text);\n }\n div.sk_arrow[dir=up]>div:nth-of-type(2) {\n top: 2px;\n border-bottom: 10px solid var(--ctp-text);\n }\n .ace_editor.ace_autocomplete {\n z-index: 2147483300 !important;\n width: 80% !important;\n }\n @media only screen and (max-width: 767px) {\n #sk_omnibar {\n width: 100%;\n left: 0;\n }\n #sk_omnibarSearchResult {\n max-height: 50vh;\n overflow: scroll;\n }\n .sk_omnibar_bottom #sk_omnibarSearchArea {\n margin: 0;\n padding: 0.2rem;\n }\n }\n`,Ze={settings:{hintAlign:"left",hintCharacters:"fdsajklghvcxzmbnuioprewqty",hintsCharactersAll:"crhtnsueoabmwvzkjq;",hintsCharactersLeft:"iueoakjq;",hintsCharactersRight:"dhtnsbmwvzcr",omnibarSuggestionTimeout:500,omnibarMaxResults:40,richHintsForKeystroke:1,defaultSearchEngine:"g",enableAutoFocus:!0,modeAfterYank:"Normal",noPdfViewer:!0,smoothScroll:!0,tabsMRUOrder:!0,scrollStepSize:140,omnibarHistoryCacheSize:1e3,tabsThreshold:0,theme:Ye,nextLinkRegex:/(>>|\bnext(ous)?\b|后页|下一頁|后一頁|下頁|后頁)/i,prevLinkRegex:/(<<|\bprev(ious)?\b|上一页|前一页|上页|前页|上一頁|前一頁|上頁|前頁)/i,optionalRegex:/(\b(confirm|okay|ok|understand|g(e|o)t\sit|accept|dismiss|close|continue|cancel|yes|no)\b)/i,loginLinkRegex:/(\blog\b|\bsign\b|\bjoin\b|登录|注册|加入|登錄|註冊|加入)/i,blocklistPattern:new RegExp(["youtube.com/watch","console.aws.amazon.com","colab.research.google.com","www.notion.so","docs.google.com","mail.google.com","calendar.google.com","readwise.io","udemy.com","overleaf.com","duolingo.com"].join("|"),"i")},keys:Re,searchEngines:Ge,siteleader:"<Space>",searchleader:"a",logLevels:["log","warn","error"]},{categories:Qe}=be,{mapkey:Xe,map:et,unmap:tt,Clipboard:nt,Front:at,removeSearchAlias:ot,addSearchAlias:rt,Hints:it,Visual:st}=t,lt=(e,t,n)=>{const a=Object.entries(t).flatMap((([t,n])=>n.flatMap((n=>({[n]:e[t]}))))),o=Object.assign({},e,...a);Object.entries(o).forEach((([e,t])=>t.forEach((t=>((e,t,n)=>{const{alias:a,callback:o,leader:r=("global"===e?"":n),category:i=Qe.misc,description:s="",path:l="(/.*)?"}=t,c={},p=`${r}${a}`;if("global"!==e){const t=e.replace(".","\\.");c.domain=new RegExp(`^http(s)?://(([a-zA-Z0-9-_]+\\.)*)(${t})${l}`)}const d=`#${i} ${s}`;void 0!==t.map?et(a,t.map):Xe(p,d,o,c)})(e,t,n)))))},ct=async()=>{if(window.surfingKeys=t,Ze.settings&&Object.assign(settings,"function"==typeof Ze.settings?Ze.settings():Ze.settings),Ze.logLevels)try{await chrome.storage.local.set({logLevels:Ze.logLevels})}catch(e){console.error(e)}if(Ze.keys&&Ze.keys.unmaps){const{unmaps:e}=Ze.keys;e.mappings&&e.mappings.forEach((e=>tt(e))),e.searchAliases&&Object.entries(e.searchAliases).forEach((([e,t])=>{t.forEach((t=>ot(t,e)))}))}var e,n;if(Ze.searchEngines&&(e=Ze.searchEngines,n=Ze.searchleader??"o",Object.values(e).forEach((e=>{const t={favicon_url:e.favicon,skipMaps:!0};rt(e.alias,e.name,e.search,"",e.compl,e.callback,void 0,t),Xe(`${n}${e.alias}`,`#8Search ${e.name}`,(()=>at.openOmnibar({type:"SearchEngine",extra:e.alias}))),Xe(`c${n}${e.alias}`,`#8Search ${e.name} with clipboard contents`,(()=>{nt.read((t=>{at.openOmnibar({type:"SearchEngine",pref:t.data,extra:e.alias})}))}))}))),Ze.keys&&Ze.keys.maps){const{keys:e}=Ze,{maps:t,aliases:n={}}=e;lt(t,n,Ze.siteleader)}it.characters="qwertyuiopasdfghjklzxcvbnm"};"undefined"!=typeof window&&ct()})()})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment