@d1g1tal/transportr 4.0.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
1
  (() => {
2
- var $r=Object.defineProperty;var Yr=(n,e)=>()=>(n&&(e=n(n=0)),e);var Xr=(n,e)=>{for(var t in e)$r(n,t,{get:e[t],enumerable:!0})};var mr={};Xr(mr,{default:()=>vn});function Zt(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,a=Array(e);t<e;t++)a[t]=n[t];return a}function Vr(n){if(Array.isArray(n))return n}function Jr(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var a,o,i,s,l=[],u=!0,d=!1;try{if(i=(t=t.call(n)).next,e!==0)for(;!(u=(a=i.call(t)).done)&&(l.push(a.value),l.length!==e);u=!0);}catch(m){d=!0,o=m}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(d)throw o}}return l}}function Kr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zr(n,e){return Vr(n)||Jr(n,e)||Qr(n,e)||Kr()}function Qr(n,e){if(n){if(typeof n=="string")return Zt(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Zt(n,e):void 0}}function I(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];return Et(n,e,a)}}function cn(n){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return St(n,t)}}function b(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve;if(Qt&&Qt(n,null),!F(e))return n;let a=e.length;for(;a--;){let o=e[a];if(typeof o=="string"){let i=t(o);i!==o&&(en(e)||(e[a]=i),o=i)}n[o]=!0}return n}function un(n){for(let e=0;e<n.length;e++)A(n,e)||(n[e]=null);return n}function _(n){let e=Te(null);for(let a of hr(n)){var t=Zr(a,2);let o=t[0],i=t[1];A(n,o)&&(F(i)?e[o]=un(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=_(i):e[o]=i)}return e}function hn(n){switch(typeof n){case"string":return n;case"number":return sn(n);case"boolean":return ln(n);case"bigint":return nr?nr(n):"0";case"symbol":return ar?ar(n):"Symbol()";case"undefined":return Oe(n);case"function":case"object":{if(n===null)return Oe(n);let e=n,t=V(e,"toString");if(typeof t=="function"){let a=t(e);return typeof a=="string"?a:Oe(a)}return Oe(n)}default:return Oe(n)}}function V(n,e){for(;n!==null;){let a=rn(n,e);if(a){if(a.get)return I(a.get);if(typeof a.value=="function")return I(a.value)}n=tn(n)}function t(){return null}return t}function fn(n){try{return k(n,""),!0}catch{return!1}}function dr(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn(),e=r=>dr(r);if(e.version="3.4.8",e.removed=[],!n||!n.document||n.document.nodeType!==X.document||!n.Element)return e.isSupported=!1,e;let t=n.document,a=t,o=a.currentScript;n.DocumentFragment;let i=n.HTMLTemplateElement,s=n.Node,l=n.Element,u=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,p=n.trustedTypes,g=l.prototype,S=V(g,"cloneNode"),T=V(g,"remove"),M=V(g,"nextSibling"),K=V(g,"childNodes"),Z=V(g,"parentNode"),ee=V(g,"shadowRoot"),De=V(g,"attributes"),R=s&&s.prototype?V(s.prototype,"nodeType"):null,G=s&&s.prototype?V(s.prototype,"nodeName"):null;if(typeof i=="function"){let r=t.createElement("template");r.content&&r.content.ownerDocument&&(t=r.content.ownerDocument)}let D,ne="",Qe=0,le=function(r){if(Qe>0)throw be('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');Qe++;try{return D.createHTML(r)}finally{Qe--}},Le=t,et=Le.implementation,Dt=Le.createNodeIterator,Lr=Le.createDocumentFragment,xr=Le.getElementsByTagName,kr=a.importNode,L=ur();e.isSupported=typeof hr=="function"&&typeof Z=="function"&&et&&et.createHTMLDocument!==void 0;let xe=pn,ke=gn,Pe=yn,Pr=bn,Mr=Tn,Ur=En,Lt=Sn,_r=An,xt=cr,O=null,tt=b({},[...or,...gt,...yt,...bt,...ir]),C=null,rt=b({},[...sr,...Tt,...lr,...Be]),v=Object.seal(Te(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}})),Se=null,Me=null,te=Object.seal(Te(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),kt=!0,nt=!0,Pt=!1,Mt=!0,re=!1,we=!0,ae=!1,at=!1,ot=!1,ce=!1,Ue=!1,_e=!1,Ut=!0,_t=!1,Ft="user-content-",it=!0,Ae=!1,ue={},$=null,st=b({},["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"]),Ht=null,jt=b({},["audio","video","img","source","image","track"]),lt=null,Gt=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fe="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Y="http://www.w3.org/1999/xhtml",he=Y,ct=!1,ut=null,Fr=b({},[Fe,He,Y],pt),ht=b({},["mi","mo","mn","ms","mtext"]),ft=b({},["annotation-xml"]),Hr=b({},["title","style","font","a","script"]),Re=null,jr=["application/xhtml+xml","text/html"],Gr="text/html",N=null,fe=null,zr=t.createElement("form"),zt=function(r){return r instanceof RegExp||r instanceof Function},dt=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fe&&fe===r)return;(!r||typeof r!="object")&&(r={}),r=_(r),Re=jr.indexOf(r.PARSER_MEDIA_TYPE)===-1?Gr:r.PARSER_MEDIA_TYPE,N=Re==="application/xhtml+xml"?pt:ve,O=A(r,"ALLOWED_TAGS")&&F(r.ALLOWED_TAGS)?b({},r.ALLOWED_TAGS,N):tt,C=A(r,"ALLOWED_ATTR")&&F(r.ALLOWED_ATTR)?b({},r.ALLOWED_ATTR,N):rt,ut=A(r,"ALLOWED_NAMESPACES")&&F(r.ALLOWED_NAMESPACES)?b({},r.ALLOWED_NAMESPACES,pt):Fr,lt=A(r,"ADD_URI_SAFE_ATTR")&&F(r.ADD_URI_SAFE_ATTR)?b(_(Gt),r.ADD_URI_SAFE_ATTR,N):Gt,Ht=A(r,"ADD_DATA_URI_TAGS")&&F(r.ADD_DATA_URI_TAGS)?b(_(jt),r.ADD_DATA_URI_TAGS,N):jt,$=A(r,"FORBID_CONTENTS")&&F(r.FORBID_CONTENTS)?b({},r.FORBID_CONTENTS,N):st,Se=A(r,"FORBID_TAGS")&&F(r.FORBID_TAGS)?b({},r.FORBID_TAGS,N):_({}),Me=A(r,"FORBID_ATTR")&&F(r.FORBID_ATTR)?b({},r.FORBID_ATTR,N):_({}),ue=A(r,"USE_PROFILES")?r.USE_PROFILES&&typeof r.USE_PROFILES=="object"?_(r.USE_PROFILES):r.USE_PROFILES:!1,kt=r.ALLOW_ARIA_ATTR!==!1,nt=r.ALLOW_DATA_ATTR!==!1,Pt=r.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,re=r.SAFE_FOR_TEMPLATES||!1,we=r.SAFE_FOR_XML!==!1,ae=r.WHOLE_DOCUMENT||!1,ce=r.RETURN_DOM||!1,Ue=r.RETURN_DOM_FRAGMENT||!1,_e=r.RETURN_TRUSTED_TYPE||!1,ot=r.FORCE_BODY||!1,Ut=r.SANITIZE_DOM!==!1,_t=r.SANITIZE_NAMED_PROPS||!1,it=r.KEEP_CONTENT!==!1,Ae=r.IN_PLACE||!1,xt=fn(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:cr,he=typeof r.NAMESPACE=="string"?r.NAMESPACE:Y,ht=A(r,"MATHML_TEXT_INTEGRATION_POINTS")&&r.MATHML_TEXT_INTEGRATION_POINTS&&typeof r.MATHML_TEXT_INTEGRATION_POINTS=="object"?_(r.MATHML_TEXT_INTEGRATION_POINTS):b({},["mi","mo","mn","ms","mtext"]),ft=A(r,"HTML_INTEGRATION_POINTS")&&r.HTML_INTEGRATION_POINTS&&typeof r.HTML_INTEGRATION_POINTS=="object"?_(r.HTML_INTEGRATION_POINTS):b({},["annotation-xml"]);let c=A(r,"CUSTOM_ELEMENT_HANDLING")&&r.CUSTOM_ELEMENT_HANDLING&&typeof r.CUSTOM_ELEMENT_HANDLING=="object"?_(r.CUSTOM_ELEMENT_HANDLING):Te(null);if(v=Te(null),A(c,"tagNameCheck")&&zt(c.tagNameCheck)&&(v.tagNameCheck=c.tagNameCheck),A(c,"attributeNameCheck")&&zt(c.attributeNameCheck)&&(v.attributeNameCheck=c.attributeNameCheck),A(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),re&&(nt=!1),Ue&&(ce=!0),ue&&(O=b({},ir),C=Te(null),ue.html===!0&&(b(O,or),b(C,sr)),ue.svg===!0&&(b(O,gt),b(C,Tt),b(C,Be)),ue.svgFilters===!0&&(b(O,yt),b(C,Tt),b(C,Be)),ue.mathMl===!0&&(b(O,bt),b(C,lr),b(C,Be))),te.tagCheck=null,te.attributeCheck=null,A(r,"ADD_TAGS")&&(typeof r.ADD_TAGS=="function"?te.tagCheck=r.ADD_TAGS:F(r.ADD_TAGS)&&(O===tt&&(O=_(O)),b(O,r.ADD_TAGS,N))),A(r,"ADD_ATTR")&&(typeof r.ADD_ATTR=="function"?te.attributeCheck=r.ADD_ATTR:F(r.ADD_ATTR)&&(C===rt&&(C=_(C)),b(C,r.ADD_ATTR,N))),A(r,"ADD_URI_SAFE_ATTR")&&F(r.ADD_URI_SAFE_ATTR)&&b(lt,r.ADD_URI_SAFE_ATTR,N),A(r,"FORBID_CONTENTS")&&F(r.FORBID_CONTENTS)&&($===st&&($=_($)),b($,r.FORBID_CONTENTS,N)),A(r,"ADD_FORBID_CONTENTS")&&F(r.ADD_FORBID_CONTENTS)&&($===st&&($=_($)),b($,r.ADD_FORBID_CONTENTS,N)),it&&(O["#text"]=!0),ae&&b(O,["html","head","body"]),O.table&&(b(O,["tbody"]),delete Se.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw be('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw be('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let f=D;D=r.TRUSTED_TYPES_POLICY;try{ne=le("")}catch(y){throw D=f,y}}else D===void 0&&r.TRUSTED_TYPES_POLICY!==null&&(D=On(p,o)),D&&typeof ne=="string"&&(ne=le(""));(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&O===tt&&(O=_(O)),L.uponSanitizeAttribute.length>0&&C===rt&&(C=_(C)),H&&H(r),fe=r},Bt=b({},[...gt,...yt,...dn]),qt=b({},[...bt,...mn]),Br=function(r){let c=Z(r);(!c||!c.tagName)&&(c={namespaceURI:he,tagName:"template"});let f=ve(r.tagName),y=ve(c.tagName);return ut[r.namespaceURI]?r.namespaceURI===He?c.namespaceURI===Y?f==="svg":c.namespaceURI===Fe?f==="svg"&&(y==="annotation-xml"||ht[y]):!!Bt[f]:r.namespaceURI===Fe?c.namespaceURI===Y?f==="math":c.namespaceURI===He?f==="math"&&ft[y]:!!qt[f]:r.namespaceURI===Y?c.namespaceURI===He&&!ft[y]||c.namespaceURI===Fe&&!ht[y]?!1:!qt[f]&&(Hr[f]||!Bt[f]):!!(Re==="application/xhtml+xml"&&ut[r.namespaceURI]):!1},oe=function(r){ge(e.removed,{element:r});try{Z(r).removeChild(r)}catch{T(r)}},ie=function(r,c){try{ge(e.removed,{attribute:c.getAttributeNode(r),from:c})}catch{ge(e.removed,{attribute:null,from:c})}if(c.removeAttribute(r),r==="is")if(ce||Ue)try{oe(c)}catch{}else try{c.setAttribute(r,"")}catch{}},Wt=function(r){let c=null,f=null;if(ot)r="<remove></remove>"+r;else{let w=tr(r,/^[\r\n\t ]+/);f=w&&w[0]}Re==="application/xhtml+xml"&&he===Y&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");let y=D?le(r):r;if(he===Y)try{c=new m().parseFromString(y,Re)}catch{}if(!c||!c.documentElement){c=et.createDocument(he,"template",null);try{c.documentElement.innerHTML=ct?ne:y}catch{}}let E=c.body||c.documentElement;return r&&f&&E.insertBefore(t.createTextNode(f),E.childNodes[0]||null),he===Y?xr.call(c,ae?"html":"body")[0]:ae?c.documentElement:E},$t=function(r){return Dt.call(r.ownerDocument||r,r,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},mt=function(r){var c,f;r.normalize();let y=Dt.call(r.ownerDocument||r,r,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),E=y.nextNode();for(;E;){let U=E.data;se([xe,ke,Pe],B=>{U=ye(U,B," ")}),E.data=U,E=y.nextNode()}let w=(c=(f=r.querySelectorAll)===null||f===void 0?void 0:f.call(r,"template"))!==null&&c!==void 0?c:[];se(Array.from(w),U=>{de(U.content)&&mt(U.content)})},je=function(r){let c=G?G(r):null;return typeof c!="string"||N(c)!=="form"?!1:typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||r.attributes!==De(r)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function"||r.nodeType!==R(r)||r.childNodes!==K(r)},de=function(r){if(!R||typeof r!="object"||r===null)return!1;try{return R(r)===X.documentFragment}catch{return!1}},Ge=function(r){if(!R||typeof r!="object"||r===null)return!1;try{return typeof R(r)=="number"}catch{return!1}};function Q(r,c,f){se(r,y=>{y.call(e,c,f,fe)})}let Yt=function(r){let c=null;if(Q(L.beforeSanitizeElements,r,null),je(r))return oe(r),!0;let f=N(G?G(r):r.nodeName);if(Q(L.uponSanitizeElement,r,{tagName:f,allowedTags:O}),we&&r.hasChildNodes()&&!Ge(r.firstElementChild)&&k(/<[/\w!]/g,r.innerHTML)&&k(/<[/\w!]/g,r.textContent)||we&&r.namespaceURI===Y&&f==="style"&&Ge(r.firstElementChild)||r.nodeType===X.progressingInstruction||we&&r.nodeType===X.comment&&k(/<[/\w]/g,r.data))return oe(r),!0;if(Se[f]||!(te.tagCheck instanceof Function&&te.tagCheck(f))&&!O[f]){if(!Se[f]&&Vt(f)&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,f)||v.tagNameCheck instanceof Function&&v.tagNameCheck(f)))return!1;if(it&&!$[f]){let y=Z(r),E=K(r);if(E&&y){let w=E.length;for(let U=w-1;U>=0;--U){let B=S(E[U],!0);y.insertBefore(B,M(r))}}}return oe(r),!0}return(R?R(r):r.nodeType)===X.element&&!Br(r)||(f==="noscript"||f==="noembed"||f==="noframes")&&k(/<\/no(script|embed|frames)/i,r.innerHTML)?(oe(r),!0):(re&&r.nodeType===X.text&&(c=r.textContent,se([xe,ke,Pe],y=>{c=ye(c,y," ")}),r.textContent!==c&&(ge(e.removed,{element:r.cloneNode()}),r.textContent=c)),Q(L.afterSanitizeElements,r,null),!1)},Xt=function(r,c,f){if(Me[c]||Ut&&(c==="id"||c==="name")&&(f in t||f in zr))return!1;let y=C[c]||te.attributeCheck instanceof Function&&te.attributeCheck(c,r);if(!(nt&&!Me[c]&&k(Pr,c))&&!(kt&&k(Mr,c))){if(!y||Me[c]){if(!(Vt(r)&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,r)||v.tagNameCheck instanceof Function&&v.tagNameCheck(r))&&(v.attributeNameCheck instanceof RegExp&&k(v.attributeNameCheck,c)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(c,r))||c==="is"&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&k(v.tagNameCheck,f)||v.tagNameCheck instanceof Function&&v.tagNameCheck(f))))return!1}else if(!lt[c]&&!k(xt,ye(f,Lt,""))&&!((c==="src"||c==="xlink:href"||c==="href")&&r!=="script"&&rr(f,"data:")===0&&Ht[r])&&!(Pt&&!k(Ur,ye(f,Lt,"")))&&f)return!1}return!0},qr=b({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vt=function(r){return!qr[ve(r)]&&k(_r,r)},Jt=function(r){Q(L.beforeSanitizeAttributes,r,null);let c=r.attributes;if(!c||je(r))return;let f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0},y=c.length;for(;y--;){let E=c[y],w=E.name,U=E.namespaceURI,B=E.value,W=N(w),pe=B,x=w==="value"?pe:on(pe);if(f.attrName=W,f.attrValue=x,f.keepAttr=!0,f.forceKeepAttr=void 0,Q(L.uponSanitizeAttribute,r,f),x=f.attrValue,_t&&(W==="id"||W==="name")&&rr(x,Ft)!==0&&(ie(w,r),x=Ft+x),we&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,x)){ie(w,r);continue}if(W==="attributename"&&tr(x,"href")){ie(w,r);continue}if(f.forceKeepAttr)continue;if(!f.keepAttr){ie(w,r);continue}if(!Mt&&k(/\/>/i,x)){ie(w,r);continue}re&&se([xe,ke,Pe],Wr=>{x=ye(x,Wr," ")});let Kt=N(r.nodeName);if(!Xt(Kt,W,x)){ie(w,r);continue}if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!U)switch(p.getAttributeType(Kt,W)){case"TrustedHTML":{x=le(x);break}case"TrustedScriptURL":{x=D.createScriptURL(x);break}}if(x!==pe)try{U?r.setAttributeNS(U,w,x):r.setAttribute(w,x),je(r)?oe(r):er(e.removed)}catch{ie(w,r)}}Q(L.afterSanitizeAttributes,r,null)},ze=function(r){let c=null,f=$t(r);for(Q(L.beforeSanitizeShadowDOM,r,null);c=f.nextNode();)if(Q(L.uponSanitizeShadowNode,c,null),Yt(c),Jt(c),de(c.content)&&ze(c.content),(R?R(c):c.nodeType)===X.element){let y=ee?ee(c):c.shadowRoot;de(y)&&(me(y),ze(y))}Q(L.afterSanitizeShadowDOM,r,null)},me=function(r){let c=R?R(r):r.nodeType;if(c===X.element){let E=ee?ee(r):r.shadowRoot;de(E)&&(me(E),ze(E))}let f=K?K(r):r.childNodes;if(!f)return;let y=[];se(f,E=>{ge(y,E)});for(let E of y)me(E);if(c===X.element){let E=G?G(r):null;if(typeof E=="string"&&N(E)==="template"){let w=r.content;de(w)&&me(w)}}};return e.sanitize=function(r){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,y=null,E=null,w=null;if(ct=!r,ct&&(r="<!-->"),typeof r!="string"&&!Ge(r)&&(r=hn(r),typeof r!="string"))throw be("dirty is not a string, aborting");if(!e.isSupported)return r;if(at||dt(c),e.removed=[],typeof r=="string"&&(Ae=!1),Ae){let W=G?G(r):r.nodeName;if(typeof W=="string"){let pe=N(W);if(!O[pe]||Se[pe])throw be("root node is forbidden and cannot be sanitized in-place")}if(je(r))throw be("root node is clobbered and cannot be sanitized in-place");me(r)}else if(Ge(r))f=Wt("<!---->"),y=f.ownerDocument.importNode(r,!0),y.nodeType===X.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?f=y:f.appendChild(y),me(y);else{if(!ce&&!re&&!ae&&r.indexOf("<")===-1)return D&&_e?le(r):r;if(f=Wt(r),!f)return ce?null:_e?ne:""}f&&ot&&oe(f.firstChild);let U=$t(Ae?r:f);for(;E=U.nextNode();)Yt(E),Jt(E),de(E.content)&&ze(E.content);if(Ae)return re&&mt(r),r;if(ce){if(re&&mt(f),Ue)for(w=Lr.call(f.ownerDocument);f.firstChild;)w.appendChild(f.firstChild);else w=f;return(C.shadowroot||C.shadowrootmode)&&(w=kr.call(a,w,!0)),w}let B=ae?f.outerHTML:f.innerHTML;return ae&&O["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&k(wn,f.ownerDocument.doctype.name)&&(B="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
4
- `+B),re&&se([xe,ke,Pe],W=>{B=ye(B,W," ")}),D&&_e?le(B):B},e.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dt(r),at=!0},e.clearConfig=function(){fe=null,at=!1},e.isValidAttribute=function(r,c,f){fe||dt({});let y=N(r),E=N(c);return Xt(y,E,f)},e.addHook=function(r,c){typeof c=="function"&&ge(L[r],c)},e.removeHook=function(r,c){if(c!==void 0){let f=nn(L[r],c);return f===-1?void 0:an(L[r],f,1)[0]}return er(L[r])},e.removeHooks=function(r){L[r]=[]},e.removeAllHooks=function(){L=ur()},e}var hr,Qt,en,tn,rn,H,q,Te,fr,Et,St,se,nn,er,ge,an,F,ve,pt,tr,ye,rr,on,sn,ln,nr,ar,A,Oe,k,be,or,gt,yt,dn,bt,mn,ir,sr,Tt,lr,Be,pn,gn,yn,bn,Tn,cr,En,Sn,wn,An,X,Rn,On,ur,vn,pr=Yr(()=>{hr=Object.entries,Qt=Object.setPrototypeOf,en=Object.isFrozen,tn=Object.getPrototypeOf,rn=Object.getOwnPropertyDescriptor,H=Object.freeze,q=Object.seal,Te=Object.create,fr=typeof Reflect<"u"&&Reflect,Et=fr.apply,St=fr.construct;H||(H=function(n){return n});q||(q=function(n){return n});Et||(Et=function(n,e){for(var t=arguments.length,a=new Array(t>2?t-2:0),o=2;o<t;o++)a[o-2]=arguments[o];return n.apply(e,a)});St||(St=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];return new n(...t)});se=I(Array.prototype.forEach),nn=I(Array.prototype.lastIndexOf),er=I(Array.prototype.pop),ge=I(Array.prototype.push),an=I(Array.prototype.splice),F=Array.isArray,ve=I(String.prototype.toLowerCase),pt=I(String.prototype.toString),tr=I(String.prototype.match),ye=I(String.prototype.replace),rr=I(String.prototype.indexOf),on=I(String.prototype.trim),sn=I(Number.prototype.toString),ln=I(Boolean.prototype.toString),nr=typeof BigInt>"u"?null:I(BigInt.prototype.toString),ar=typeof Symbol>"u"?null:I(Symbol.prototype.toString),A=I(Object.prototype.hasOwnProperty),Oe=I(Object.prototype.toString),k=I(RegExp.prototype.test),be=cn(TypeError);or=H(["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","search","section","select","shadow","slot","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"]),gt=H(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),yt=H(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),dn=H(["animate","color-profile","cursor","discard","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"]),bt=H(["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","mprescripts"]),mn=H(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ir=H(["#text"]),sr=H(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Tt=H(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),lr=H(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Be=H(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pn=q(/{{[\w\W]*|^[\w\W]*}}/g),gn=q(/<%[\w\W]*|^[\w\W]*%>/g),yn=q(/\${[\w\W]*/g),bn=q(/^data-[\-\w.\u00B7-\uFFFF]+$/),Tn=q(/^aria-[\-\w]+$/),cr=q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),En=q(/^(?:\w+script|data):/i),Sn=q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wn=q(/^html$/i),An=q(/^[a-z][.\w]*(-[.\w]+)+$/i),X={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Rn=function(){return typeof window>"u"?null:window},On=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let t=null,a="data-tt-policy-suffix";e&&e.hasAttribute(a)&&(t=e.getAttribute(a));let o="dompurify"+(t?"#"+t:"");try{return n.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ur=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};vn=dr();});var Ve=/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u,Nn=/(["\\])/ug,Cn=/^[\t\u0020-\u007E\u0080-\u00FF]*$/u,qe=n=>{for(let e=0,t=n.length;e<t;e++){let a=n.charCodeAt(e);if(a>=65&&a<=90)return n.toLowerCase()}return n},gr=class Or extends Map{constructor(e=[]){super(e)}static isValid(e,t){return Ve.test(e)&&Cn.test(t)}get(e){return super.get(qe(e))}has(e){return super.has(qe(e))}set(e,t){if(!Or.isValid(e,t))throw new Error(`Invalid media type parameter name/value: ${e}/${t}`);return super.set(qe(e),t),this}delete(e){return super.delete(qe(e))}toString(){let e="";for(let[t,a]of this)e+=";",e+=t,e+="=",a.length===0||!Ve.test(a)?(e+='"',e+=a.replace(Nn,"\\$1"),e+='"'):e+=a;return e}get[Symbol.toStringTag](){return"MediaTypeParameters"}},Ne=n=>n===32||n===9||n===10||n===13,In=Map.prototype.set,Dn=Map.prototype.has,Ln=class J{constructor(){}static parse(e){let t=0,a=e.length;for(;t<a&&Ne(e.charCodeAt(t));)t++;for(;a>t&&Ne(e.charCodeAt(a-1));)a--;(t!==0||a!==e.length)&&(e=e.slice(t,a));let o=e.length,i=0;for(;i<o&&e.charCodeAt(i)!==47;)i++;if(i===0||i>=o)throw new TypeError(J.#n("type",e.slice(0,i)));let s=e.slice(0,i);if(!Ve.test(s))throw new TypeError(J.#n("type",s));s=s.toLowerCase(),i++;let l=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let u=i;for(;u>l&&Ne(e.charCodeAt(u-1));)u--;if(u===l)throw new TypeError(J.#n("subtype",""));let d=e.slice(l,u);if(!Ve.test(d))throw new TypeError(J.#n("subtype",d));d=d.toLowerCase();let m=new gr;for(;i<o;){for(i++;i<o&&Ne(e.charCodeAt(i));)i++;let p=i;for(;i<o;){let T=e.charCodeAt(i);if(T===59||T===61)break;i++}let g=p===i?"":e.slice(p,i);if(i>=o||e.charCodeAt(i)===59)continue;i++;let S;if(i<o&&e.charCodeAt(i)===34){i=J.#t(e,i,o),S=J.#e;let T=e.indexOf(";",i);i=T===-1?o:T}else{let T=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let M=i;for(;M>T&&Ne(e.charCodeAt(M-1));)M--;if(M===T)continue;S=e.slice(T,M)}if(g.length!==0&&gr.isValid(g,S)){let T=g.toLowerCase();Dn.call(m,T)||In.call(m,T,S)}}return{type:s,subtype:d,parameters:m}}static#e="";static#t(e,t,a){t++;let o=t;for(;t<a;){let s=e.charCodeAt(t);if(s===34||s===92)break;t++}if(t>=a)return J.#e=e.slice(o,t),t;if(e.charCodeAt(t)===34)return J.#e=e.slice(o,t),t+1;let i=e.slice(o,t);for(;t<a;){let s=e.charCodeAt(t);if(s===34){t++;break}s===92&&t+1<a&&t++,i+=e[t],t++}return J.#e=i,t}static#n(e,t){return`Invalid ${e} "${t}": only HTTP token code points are valid.`}},vr=class Nr{#e;#t;#n;#r;constructor(e,t){if({type:this.#e,subtype:this.#t,parameters:this.#r}=Ln.parse(e),this.#n=this.#e+"/"+this.#t,t!==void 0){if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError("The parameters argument must be an object");for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&this.#r.set(a,t[a])}}static parse(e){try{return new Nr(e)}catch{}return null}get type(){return this.#e}get subtype(){return this.#t}get essence(){return this.#n}get parameters(){return this.#r}matches(e){return typeof e=="string"?this.#n===e:this.#e===e.#e&&this.#t===e.#t}toString(){return this.#n+this.#r.toString()}get[Symbol.toStringTag](){return"MediaType"}},xn=class extends Map{set(n,e){return super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),this}getOrInsert(n,e){return this.has(n)?super.get(n):(super.set(n,e instanceof Set?e:(super.get(n)??new Set).add(e)),e)}getOrInsertComputed(n,e){if(this.has(n))return super.get(n);let t=e(n);return super.set(n,t instanceof Set?t:(super.get(n)??new Set).add(t)),t}find(n,e){let t=this.get(n);if(t!==void 0)return Array.from(t).find(e)}hasValue(n,e){let t=super.get(n);return t?t.has(e):!1}deleteValue(n,e){if(e===void 0)return this.delete(n);let t=super.get(n);if(t){let a=t.delete(e);return t.size===0&&super.delete(n),a}return!1}get[Symbol.toStringTag](){return"SetMultiMap"}},kn=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}handle(n,e){this.#t.call(this.#e,n,e)}get[Symbol.toStringTag](){return"ContextEventHandler"}},Pn=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get eventName(){return this.#e}get contextEventHandler(){return this.#t}get[Symbol.toStringTag](){return"Subscription"}},wt=class{#e=new xn;#t;setErrorHandler(n){this.#t=n}subscribe(n,e,t=e,a){if(this.#n(n),a?.once){let s=e;e=(l,u)=>{s.call(t,l,u),this.unsubscribe(i)}}let o=new kn(t,e);this.#e.set(n,o);let i=new Pn(n,o);return i}unsubscribe({eventName:n,contextEventHandler:e}){let t=this.#e.get(n);if(!t)return!1;let a=t.delete(e);return a&&t.size===0&&this.#e.delete(n),a}publish(n,e=new CustomEvent(n),t){this.#n(n),this.#e.get(n)?.forEach(a=>{try{a.handle(e,t)}catch(o){this.#t?this.#t(o,n,e,t):console.error(`Error in event handler for '${n}':`,o)}})}isSubscribed({eventName:n,contextEventHandler:e}){return this.#e.get(n)?.has(e)??!1}#n(n){if(!n||typeof n!="string")throw new TypeError("Event name must be a non-empty string");if(n.trim()!==n)throw new Error("Event name cannot have leading or trailing whitespace")}destroy(){this.#e.clear()}get[Symbol.toStringTag](){return"Subscribr"}},Ce=class extends Error{#e;#t;#n;#r;#o;constructor(n,{message:e,cause:t,entity:a,url:o,method:i,timing:s}={}){super(e,{cause:t}),this.#e=a,this.#t=n,this.#n=o,this.#r=i,this.#o=s}get entity(){return this.#e}get statusCode(){return this.#t.code}get statusText(){return this.#t?.text}get url(){return this.#n}get method(){return this.#r}get timing(){return this.#o}get name(){return"HttpError"}get[Symbol.toStringTag](){return this.name}},Je=class{#e;#t;constructor(n,e){this.#e=n,this.#t=e}get code(){return this.#e}get text(){return this.#t}get[Symbol.toStringTag](){return"ResponseStatus"}toString(){return`${this.#e} ${this.#t}`}},Mn="XSRF-TOKEN",Un="X-XSRF-TOKEN",P={PNG:"image/png",TEXT:"text/plain",JSON:"application/json",HTML:"text/html",JAVA_SCRIPT:"text/javascript",CSS:"text/css",XML:"application/xml",BIN:"application/octet-stream",EVENT_STREAM:"text/event-stream",NDJSON:"application/x-ndjson"},_n={charset:"utf-8"},We=new vr(P.JSON,_n),yr=globalThis.location?.origin??"http://localhost",Fn={DEFAULT:"default",FORCE_CACHE:"force-cache",NO_CACHE:"no-cache",NO_STORE:"no-store",ONLY_IF_CACHED:"only-if-cached",RELOAD:"reload"},z={CONFIGURED:"configured",SUCCESS:"success",ERROR:"error",ABORTED:"aborted",TIMEOUT:"timeout",RETRY:"retry",COMPLETE:"complete",ALL_COMPLETE:"all-complete"},Ee={ABORT:"abort",TIMEOUT:"timeout"},Ie={ABORT:"AbortError",TIMEOUT:"TimeoutError"},$e={once:!0,passive:!0},Cr=()=>new CustomEvent(Ee.ABORT,{detail:{cause:Ie.ABORT}}),Hn=()=>new CustomEvent(Ee.TIMEOUT,{detail:{cause:Ie.TIMEOUT}}),jn=["POST","PUT","PATCH","DELETE"],Gn=new Je(500,"Internal Server Error"),zn=new Je(499,"Aborted"),Bn=new Je(504,"Request Timeout"),br=[408,413,429,500,502,503,504],Tr=["GET","PUT","HEAD","DELETE","OPTIONS"],At=300,Rt=2,qn=class{#e;#t=new AbortController;#n;#r;constructor({signal:n,timeout:e=1/0}={}){if(e<0)throw new RangeError("The timeout cannot be negative");let t=n!=null,a=e!==1/0;if(!t&&!a){this.#e=this.#t.signal,this.#r=!1;return}let o=[this.#t.signal];t&&o.push(n),a&&o.push(AbortSignal.timeout(e)),this.#e=AbortSignal.any(o),this.#r=!0,a&&this.#e.addEventListener(Ee.ABORT,this,$e)}handleEvent({target:{reason:n}}){this.#t.signal.aborted||n instanceof DOMException&&n.name===Ie.TIMEOUT&&this.#e.dispatchEvent(Hn())}get signal(){return this.#e}onAbort(n){return this.#o(Ee.ABORT,n)}onTimeout(n){return this.#o(Ee.TIMEOUT,n)}abort(n=Cr()){this.#t.abort(n.detail?.cause)}destroy(){this.#r&&this.#e.removeEventListener(Ee.ABORT,this,$e);let n=this.#n;if(n!==void 0){for(let[e,t]of n)this.#e.removeEventListener(t,e,$e);n.clear()}return this}#o(n,e){return this.#e.addEventListener(n,e,$e),(this.#n??=new Map).set(e,n),this}get[Symbol.toStringTag](){return"SignalController"}},Ot,Ke,Ze=()=>Ot||(Ot=(typeof document>"u"||typeof DOMParser>"u"||typeof DocumentFragment>"u"?import("jsdom").then(({JSDOM:n})=>{let{window:e}=new n("<!DOCTYPE html><html><head></head><body></body></html>",{url:"http://localhost"});globalThis.window=e,Object.assign(globalThis,{document:e.document,DOMParser:e.DOMParser,DocumentFragment:e.DocumentFragment})}).catch(()=>{throw Ot=void 0,new Error("jsdom is required for HTML/XML/DOM features in Node.js environments. Install it with: npm install jsdom")}):Promise.resolve()).then(()=>Promise.resolve().then(()=>(pr(),mr))).then(({default:n})=>{Ke=n})),Ir=async(n,e)=>(await Ze(),new DOMParser().parseFromString(Ke.sanitize(await n.text()),e)),It=async(n,e)=>{await Ze();let t=URL.createObjectURL(await n.blob());try{return new Promise((a,o)=>e(t,a,o))}finally{URL.revokeObjectURL(t)}},Wn=n=>n.text(),Er=n=>It(n,(e,t,a)=>{let o=Object.assign(document.createElement("script"),{src:e,type:"text/javascript",async:!0});o.onload=()=>{document.head.removeChild(o),t()},o.onerror=()=>{document.head.removeChild(o),a(new Error("Script failed to load"))},document.head.appendChild(o)}),Sr=n=>It(n,(e,t,a)=>{let o=Object.assign(document.createElement("link"),{href:e,type:"text/css",rel:"stylesheet"});o.onload=()=>t(),o.onerror=()=>{document.head.removeChild(o),a(new Error("Stylesheet load failed"))},document.head.appendChild(o)}),Ye=n=>n.json(),$n=n=>n.blob(),wr=n=>It(n,(e,t,a)=>{let o=new Image;o.onload=()=>t(o),o.onerror=()=>a(new Error("Image failed to load")),o.src=e}),Yn=n=>n.arrayBuffer(),Ar=n=>Promise.resolve(n.body),Xe=async n=>Ir(n,"application/xml"),Rr=async n=>Ir(n,"text/html"),Xn=async n=>(await Ze(),document.createRange().createContextualFragment(Ke.sanitize(await n.text()))),Vn=async n=>(await Ze(),Ke.sanitize(await n.text(),{ADD_TAGS:["script"],ADD_ATTR:["src","type","async","defer","crossorigin","integrity","nomodule"],FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0}));async function*Dr(n,e,t){let a=n.getReader(),o=new TextDecoder,i=e.length,s="",l=0;try{for(;;){let u;for(;(u=s.indexOf(e,l))!==-1;)yield s.slice(l,u),l=u+i;l>0&&l>=s.length-l&&(s=l<s.length?s.slice(l):"",l=0);let{done:d,value:m}=await a.read();if(d)break;s+=o.decode(m,{stream:!0})}if(t){let u=((l<s.length?s.slice(l):"")+o.decode()).trim();u&&(yield u)}}finally{await a.cancel()}}var Jn=n=>{let e="message",t="",a,o,i,s=n.split(`
5
- `);for(let u=0,d,m=s.length;u<m;u++){if(d=s[u],d.charCodeAt(0)===58)continue;let p=d.indexOf(":"),g,S;switch(p===-1?(g=d,S=""):(g=d.slice(0,p),S=d.charCodeAt(p+1)===32?d.slice(p+2):d.slice(p+1)),g){case"event":{e=S;break}case"data":{o===void 0?o=S:(i??=[]).push(S);break}case"id":{t=S;break}case"retry":{let T=parseInt(S,10);isNaN(T)||(a=T);break}}}if(o===void 0&&e==="message")return;let l=i===void 0?o??"":`${o}
2
+ var Tn=Object.defineProperty;var wn=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(a){throw t=[a],a}};var Sn=(r,e)=>{for(var t in e)Tn(r,t,{get:e[t],enumerable:!0})};var Rr={};Sn(Rr,{default:()=>ta});function ir(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t<e;t++)a[t]=r[t];return a}function En(r){if(Array.isArray(r))return r}function Rn(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,o,i,s,c=[],u=!0,d=!1;try{if(i=(t=t.call(r)).next,e!==0)for(;!(u=(a=i.call(t)).done)&&(c.push(a.value),c.length!==e);u=!0);}catch(p){d=!0,o=p}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(d)throw o}}return c}}function An(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function On(r,e){return En(r)||Rn(r,e)||vn(r,e)||An()}function vn(r,e){if(r){if(typeof r=="string")return ir(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ir(r,e):void 0}}function k(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];return Et(r,e,a)}}function Mn(r){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return Rt(r,t)}}function S(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Le;if(sr&&sr(r,null),!se(e))return r;let a=e.length;for(;a--;){let o=e[a];if(typeof o=="string"){let i=t(o);i!==o&&(Nn(e)||(e[a]=i),o=i)}r[o]=!0}return r}function Un(r){for(let e=0;e<r.length;e++)D(r,e)||(r[e]=null);return r}function j(r){let e=we(null);for(let a of wr(r)){var t=On(a,2);let o=t[0],i=t[1];D(r,o)&&(se(i)?e[o]=Un(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=j(i):e[o]=i)}return e}function _n(r){switch(typeof r){case"string":return r;case"number":return Dn(r);case"boolean":return Pn(r);case"bigint":return hr?hr(r):"0";case"symbol":return dr?dr(r):"Symbol()";case"undefined":return xe(r);case"function":case"object":{if(r===null)return xe(r);let e=r,t=K(e,"toString");if(typeof t=="function"){let a=t(e);return typeof a=="string"?a:xe(a)}return xe(r)}default:return xe(r)}}function K(r,e){for(;r!==null;){let a=In(r,e);if(a){if(a.get)return k(a.get);if(typeof a.value=="function")return k(a.value)}r=Cn(r)}function t(){return null}return t}function Hn(r){try{return M(r,""),!0}catch{return!1}}function Er(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qn(),e=n=>Er(n);if(e.version="3.4.11",e.removed=[],!r||!r.document||r.document.nodeType!==J.document||!r.Element)return e.isSupported=!1,e;let t=r.document,a=t,o=a.currentScript;r.DocumentFragment;let i=r.HTMLTemplateElement,s=r.Node,c=r.Element,u=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let p=r.DOMParser,g=r.trustedTypes,y=c.prototype,T=K(y,"cloneNode"),b=K(y,"remove"),O=K(y,"nextSibling"),G=K(y,"childNodes"),P=K(y,"parentNode"),Y=K(y,"shadowRoot"),$=K(y,"attributes"),A=s&&s.prototype?K(s.prototype,"nodeType"):null,q=s&&s.prototype?K(s.prototype,"nodeName"):null;if(typeof i=="function"){let n=t.createElement("template");n.content&&n.content.ownerDocument&&(t=n.content.ownerDocument)}let L,ee="",Qe,Lt=!1,Re=0,kt=function(){if(Re>0)throw de('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},fe=function(n){kt(),Re++;try{return L.createHTML(n)}finally{Re--}},Br=function(n){kt(),Re++;try{return L.createScriptURL(n)}finally{Re--}},Wr=function(){return Lt||(Qe=ea(g,o),Lt=!0),Qe},Me=t,et=Me.implementation,Dt=Me.createNodeIterator,$r=Me.createDocumentFragment,Yr=Me.getElementsByTagName,Xr=a.importNode,x=Tr();e.isSupported=typeof wr=="function"&&typeof P=="function"&&et&&et.createHTMLDocument!==void 0;let Vr=jn,Jr=Gn,Kr=qn,Zr=Bn,Qr=Wn,en=$n,Pt=Yn,tn=Vn,Mt=yr,v=null,Ut=S({},[...fr,...bt,...Tt,...wt,...pr]),N=null,_t=S({},[...mr,...St,...gr,...qe]),C=Object.seal(we(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}})),Ae=null,Ht=null,re=Object.seal(we(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),zt=!0,tt=!0,Ft=!1,jt=!0,ne=!1,Oe=!0,le=!1,rt=!1,nt=null,at=null,ot=!1,pe=!1,Ue=!1,_e=!1,Gt=!0,qt=!1,Bt="user-content-",it=!0,st=!1,me={},X=null,lt=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Wt=null,$t=S({},["audio","video","img","source","image","track"]),ct=null,Yt=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",V="http://www.w3.org/1999/xhtml",ge=V,ut=!1,ht=null,rn=S({},[He,ze,V],yt),Xt=U(["mi","mo","mn","ms","mtext"]),dt=S({},Xt),Vt=U(["annotation-xml"]),ft=S({},Vt),nn=S({},["title","style","font","a","script"]),ve=null,an=["application/xhtml+xml","text/html"],on="text/html",I=null,ye=null,sn=t.createElement("form"),Jt=function(n){return n instanceof RegExp||n instanceof Function},pt=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ye&&ye===n)return;(!n||typeof n!="object")&&(n={}),n=j(n),ve=an.indexOf(n.PARSER_MEDIA_TYPE)===-1?on:n.PARSER_MEDIA_TYPE,I=ve==="application/xhtml+xml"?yt:Le,v=ie(n,"ALLOWED_TAGS",Ut,{transform:I}),N=ie(n,"ALLOWED_ATTR",_t,{transform:I}),ht=ie(n,"ALLOWED_NAMESPACES",rn,{transform:yt}),ct=ie(n,"ADD_URI_SAFE_ATTR",Yt,{transform:I,base:Yt}),Wt=ie(n,"ADD_DATA_URI_TAGS",$t,{transform:I,base:$t}),X=ie(n,"FORBID_CONTENTS",lt,{transform:I}),Ae=ie(n,"FORBID_TAGS",j({}),{transform:I}),Ht=ie(n,"FORBID_ATTR",j({}),{transform:I}),me=D(n,"USE_PROFILES")?n.USE_PROFILES&&typeof n.USE_PROFILES=="object"?j(n.USE_PROFILES):n.USE_PROFILES:!1,zt=n.ALLOW_ARIA_ATTR!==!1,tt=n.ALLOW_DATA_ATTR!==!1,Ft=n.ALLOW_UNKNOWN_PROTOCOLS||!1,jt=n.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=n.SAFE_FOR_TEMPLATES||!1,Oe=n.SAFE_FOR_XML!==!1,le=n.WHOLE_DOCUMENT||!1,pe=n.RETURN_DOM||!1,Ue=n.RETURN_DOM_FRAGMENT||!1,_e=n.RETURN_TRUSTED_TYPE||!1,ot=n.FORCE_BODY||!1,Gt=n.SANITIZE_DOM!==!1,qt=n.SANITIZE_NAMED_PROPS||!1,it=n.KEEP_CONTENT!==!1,st=n.IN_PLACE||!1,Mt=Hn(n.ALLOWED_URI_REGEXP)?n.ALLOWED_URI_REGEXP:yr,ge=typeof n.NAMESPACE=="string"?n.NAMESPACE:V,dt=D(n,"MATHML_TEXT_INTEGRATION_POINTS")&&n.MATHML_TEXT_INTEGRATION_POINTS&&typeof n.MATHML_TEXT_INTEGRATION_POINTS=="object"?j(n.MATHML_TEXT_INTEGRATION_POINTS):S({},Xt),ft=D(n,"HTML_INTEGRATION_POINTS")&&n.HTML_INTEGRATION_POINTS&&typeof n.HTML_INTEGRATION_POINTS=="object"?j(n.HTML_INTEGRATION_POINTS):S({},Vt);let l=D(n,"CUSTOM_ELEMENT_HANDLING")&&n.CUSTOM_ELEMENT_HANDLING&&typeof n.CUSTOM_ELEMENT_HANDLING=="object"?j(n.CUSTOM_ELEMENT_HANDLING):we(null);if(C=we(null),D(l,"tagNameCheck")&&Jt(l.tagNameCheck)&&(C.tagNameCheck=l.tagNameCheck),D(l,"attributeNameCheck")&&Jt(l.attributeNameCheck)&&(C.attributeNameCheck=l.attributeNameCheck),D(l,"allowCustomizedBuiltInElements")&&typeof l.allowCustomizedBuiltInElements=="boolean"&&(C.allowCustomizedBuiltInElements=l.allowCustomizedBuiltInElements),_(C),ne&&(tt=!1),Ue&&(pe=!0),me&&(v=S({},pr),N=we(null),me.html===!0&&(S(v,fr),S(N,mr)),me.svg===!0&&(S(v,bt),S(N,St),S(N,qe)),me.svgFilters===!0&&(S(v,Tt),S(N,St),S(N,qe)),me.mathMl===!0&&(S(v,wt),S(N,gr),S(N,qe))),re.tagCheck=null,re.attributeCheck=null,D(n,"ADD_TAGS")&&(typeof n.ADD_TAGS=="function"?re.tagCheck=n.ADD_TAGS:se(n.ADD_TAGS)&&(v===Ut&&(v=j(v)),S(v,n.ADD_TAGS,I))),D(n,"ADD_ATTR")&&(typeof n.ADD_ATTR=="function"?re.attributeCheck=n.ADD_ATTR:se(n.ADD_ATTR)&&(N===_t&&(N=j(N)),S(N,n.ADD_ATTR,I))),D(n,"ADD_URI_SAFE_ATTR")&&se(n.ADD_URI_SAFE_ATTR)&&S(ct,n.ADD_URI_SAFE_ATTR,I),D(n,"FORBID_CONTENTS")&&se(n.FORBID_CONTENTS)&&(X===lt&&(X=j(X)),S(X,n.FORBID_CONTENTS,I)),D(n,"ADD_FORBID_CONTENTS")&&se(n.ADD_FORBID_CONTENTS)&&(X===lt&&(X=j(X)),S(X,n.ADD_FORBID_CONTENTS,I)),it&&(v["#text"]=!0),le&&S(v,["html","head","body"]),v.table&&(S(v,["tbody"]),delete Ae.tbody),n.TRUSTED_TYPES_POLICY){if(typeof n.TRUSTED_TYPES_POLICY.createHTML!="function")throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof n.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let h=L;L=n.TRUSTED_TYPES_POLICY;try{ee=fe("")}catch(m){throw L=h,m}}else n.TRUSTED_TYPES_POLICY===null?(L=void 0,ee=""):(L===void 0&&(L=Wr()),L&&typeof ee=="string"&&(ee=fe("")));U&&U(n),ye=n},Kt=S({},[...bt,...Tt,...zn]),Zt=S({},[...wt,...Fn]),ln=function(n,l,h){return l.namespaceURI===V?n==="svg":l.namespaceURI===He?n==="svg"&&(h==="annotation-xml"||dt[h]):!!Kt[n]},cn=function(n,l,h){return l.namespaceURI===V?n==="math":l.namespaceURI===ze?n==="math"&&ft[h]:!!Zt[n]},un=function(n,l,h){return l.namespaceURI===ze&&!ft[h]||l.namespaceURI===He&&!dt[h]?!1:!Zt[n]&&(nn[n]||!Kt[n])},hn=function(n){let l=P(n);(!l||!l.tagName)&&(l={namespaceURI:ge,tagName:"template"});let h=Le(n.tagName),m=Le(l.tagName);return ht[n.namespaceURI]?n.namespaceURI===ze?ln(h,l,m):n.namespaceURI===He?cn(h,l,m):n.namespaceURI===V?un(h,l,m):!!(ve==="application/xhtml+xml"&&ht[n.namespaceURI]):!1},ce=function(n){Te(e.removed,{element:n});try{P(n).removeChild(n)}catch{if(b(n),!P(n))throw de("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Qt=function(n){let l=G(n);if(l){let m=[];Ce(l,w=>{Te(m,w)}),Ce(m,w=>{try{b(w)}catch{}})}let h=$(n);if(h)for(let m=h.length-1;m>=0;--m){let w=h[m],E=w&&w.name;if(typeof E=="string")try{n.removeAttribute(E)}catch{}}},ue=function(n,l){try{Te(e.removed,{attribute:l.getAttributeNode(n),from:l})}catch{Te(e.removed,{attribute:null,from:l})}if(l.removeAttribute(n),n==="is")if(pe||Ue)try{ce(l)}catch{}else try{l.setAttribute(n,"")}catch{}},dn=function(n){let l=$(n);if(l)for(let h=l.length-1;h>=0;--h){let m=l[h],w=m&&m.name;if(!(typeof w!="string"||N[I(w)]))try{n.removeAttribute(w)}catch{}}},fn=function(n){let l=[n];for(;l.length>0;){let h=l.pop();(A?A(h):h.nodeType)===J.element&&dn(h);let m=G(h);if(m)for(let w=m.length-1;w>=0;--w)l.push(m[w])}},er=function(n){let l=null,h=null;if(ot)n="<remove></remove>"+n;else{let E=cr(n,/^[\r\n\t ]+/);h=E&&E[0]}ve==="application/xhtml+xml"&&ge===V&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+n+"</body></html>");let m=L?fe(n):n;if(ge===V)try{l=new p().parseFromString(m,ve)}catch{}if(!l||!l.documentElement){l=et.createDocument(ge,"template",null);try{l.documentElement.innerHTML=ut?ee:m}catch{}}let w=l.body||l.documentElement;return n&&h&&w.insertBefore(t.createTextNode(h),w.childNodes[0]||null),ge===V?Yr.call(l,le?"html":"body")[0]:le?l.documentElement:w},tr=function(n){return Dt.call(n.ownerDocument||n,n,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Fe=function(n){return n=Ie(n,Vr," "),n=Ie(n,Jr," "),n=Ie(n,Kr," "),n},mt=function(n){var l;n.normalize();let h=Dt.call(n.ownerDocument||n,n,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),m=h.nextNode();for(;m;)m.data=Fe(m.data),m=h.nextNode();let w=(l=n.querySelectorAll)===null||l===void 0?void 0:l.call(n,"template");w&&Ce(w,E=>{be(E.content)&&mt(E.content)})},je=function(n){let l=q?q(n):null;return typeof l!="string"||I(l)!=="form"?!1:typeof n.nodeName!="string"||typeof n.textContent!="string"||typeof n.removeChild!="function"||n.attributes!==$(n)||typeof n.removeAttribute!="function"||typeof n.setAttribute!="function"||typeof n.namespaceURI!="string"||typeof n.insertBefore!="function"||typeof n.hasChildNodes!="function"||n.nodeType!==A(n)||n.childNodes!==G(n)},be=function(n){if(!A||typeof n!="object"||n===null)return!1;try{return A(n)===J.documentFragment}catch{return!1}},Ne=function(n){if(!A||typeof n!="object"||n===null)return!1;try{return typeof A(n)=="number"}catch{return!1}};function te(n,l,h){n.length!==0&&Ce(n,m=>{m.call(e,l,h,ye)})}let pn=function(n,l){return!!(Oe&&n.hasChildNodes()&&!Ne(n.firstElementChild)&&M(br,n.textContent)&&M(br,n.innerHTML)||Oe&&n.namespaceURI===V&&l==="style"&&Ne(n.firstElementChild)||n.nodeType===J.processingInstruction||Oe&&n.nodeType===J.comment&&M(Jn,n.data))},mn=function(n,l){if(!Ae[l]&&ar(l)&&(C.tagNameCheck instanceof RegExp&&M(C.tagNameCheck,l)||C.tagNameCheck instanceof Function&&C.tagNameCheck(l)))return!1;if(it&&!X[l]){let h=P(n),m=G(n);if(m&&h){let w=m.length;for(let E=w-1;E>=0;--E){let R=st?m[E]:T(m[E],!0);h.insertBefore(R,O(n))}}}return ce(n),!0},rr=function(n){if(te(x.beforeSanitizeElements,n,null),je(n))return ce(n),!0;let l=I(q?q(n):n.nodeName);if(te(x.uponSanitizeElement,n,{tagName:l,allowedTags:v}),pn(n,l))return ce(n),!0;if(Ae[l]||!(re.tagCheck instanceof Function&&re.tagCheck(l))&&!v[l])return mn(n,l);if((A?A(n):n.nodeType)===J.element&&!hn(n)||(l==="noscript"||l==="noembed"||l==="noframes")&&M(Kn,n.innerHTML))return ce(n),!0;if(ne&&n.nodeType===J.text){let h=Fe(n.textContent);n.textContent!==h&&(Te(e.removed,{element:n.cloneNode()}),n.textContent=h)}return te(x.afterSanitizeElements,n,null),!1},nr=function(n,l,h){if(Ht[l]||Gt&&(l==="id"||l==="name")&&(h in t||h in sn))return!1;let m=N[l]||re.attributeCheck instanceof Function&&re.attributeCheck(l,n);if(!(tt&&M(Zr,l))&&!(zt&&M(Qr,l))){if(m){if(!ct[l]&&!M(Mt,Ie(h,Pt,""))&&!((l==="src"||l==="xlink:href"||l==="href")&&n!=="script"&&ur(h,"data:")===0&&Wt[n])&&!(Ft&&!M(en,Ie(h,Pt,"")))&&h)return!1}else if(!(ar(n)&&(C.tagNameCheck instanceof RegExp&&M(C.tagNameCheck,n)||C.tagNameCheck instanceof Function&&C.tagNameCheck(n))&&(C.attributeNameCheck instanceof RegExp&&M(C.attributeNameCheck,l)||C.attributeNameCheck instanceof Function&&C.attributeNameCheck(l,n))||l==="is"&&C.allowCustomizedBuiltInElements&&(C.tagNameCheck instanceof RegExp&&M(C.tagNameCheck,h)||C.tagNameCheck instanceof Function&&C.tagNameCheck(h))))return!1}return!0},gn=S({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ar=function(n){return!gn[Le(n)]&&M(tn,n)},yn=function(n,l,h,m){if(L&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!h)switch(g.getAttributeType(n,l)){case"TrustedHTML":return fe(m);case"TrustedScriptURL":return Br(m)}return m},bn=function(n,l,h,m){try{h?n.setAttributeNS(h,l,m):n.setAttribute(l,m),je(n)?ce(n):lr(e.removed)}catch{ue(l,n)}},or=function(n){te(x.beforeSanitizeAttributes,n,null);let l=n.attributes;if(!l||je(n))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},m=l.length,w=I(n.nodeName);for(;m--;){let E=l[m],R=E.name,he=E.namespaceURI,ae=E.value,B=I(R),oe=ae,F=R==="value"?oe:kn(oe);if(h.attrName=B,h.attrValue=F,h.keepAttr=!0,h.forceKeepAttr=void 0,te(x.uponSanitizeAttribute,n,h),F=h.attrValue,qt&&(B==="id"||B==="name")&&ur(F,Bt)!==0&&(ue(R,n),F=Bt+F),Oe&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,F)){ue(R,n);continue}if(B==="attributename"&&cr(F,"href")){ue(R,n);continue}if(!h.forceKeepAttr){if(!h.keepAttr){ue(R,n);continue}if(!jt&&M(Zn,F)){ue(R,n);continue}if(ne&&(F=Fe(F)),!nr(w,B,F)){ue(R,n);continue}F=yn(w,B,he,F),F!==oe&&bn(n,R,he,F)}}te(x.afterSanitizeAttributes,n,null)},Ge=function(n){let l=null,h=tr(n);for(te(x.beforeSanitizeShadowDOM,n,null);l=h.nextNode();)if(te(x.uponSanitizeShadowNode,l,null),rr(l),or(l),be(l.content)&&Ge(l.content),(A?A(l):l.nodeType)===J.element){let m=Y(l);be(m)&&(gt(m),Ge(m))}te(x.afterSanitizeShadowDOM,n,null)},gt=function(n){let l=[{node:n,shadow:null}];for(;l.length>0;){let h=l.pop();if(h.shadow){Ge(h.shadow);continue}let m=h.node,w=(A?A(m):m.nodeType)===J.element,E=G(m);if(E)for(let R=E.length-1;R>=0;--R)l.push({node:E[R],shadow:null});if(w){let R=q?q(m):null;if(typeof R=="string"&&I(R)==="template"){let he=m.content;be(he)&&l.push({node:he,shadow:null})}}if(w){let R=Y(m);be(R)&&l.push({node:null,shadow:R},{node:R,shadow:null})}}};return e.sanitize=function(n){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,m=null,w=null,E=null;if(ut=!n,ut&&(n="<!-->"),typeof n!="string"&&!Ne(n)&&(n=_n(n),typeof n!="string"))throw de("dirty is not a string, aborting");if(!e.isSupported)return n;rt?(v=nt,N=at):pt(l),(x.uponSanitizeElement.length>0||x.uponSanitizeAttribute.length>0)&&(v=j(v)),x.uponSanitizeAttribute.length>0&&(N=j(N)),e.removed=[];let R=st&&typeof n!="string"&&Ne(n);if(R){let B=q?q(n):n.nodeName;if(typeof B=="string"){let oe=I(B);if(!v[oe]||Ae[oe])throw de("root node is forbidden and cannot be sanitized in-place")}if(je(n))throw de("root node is clobbered and cannot be sanitized in-place");try{gt(n)}catch(oe){throw Qt(n),oe}}else if(Ne(n))h=er("<!---->"),m=h.ownerDocument.importNode(n,!0),m.nodeType===J.element&&m.nodeName==="BODY"||m.nodeName==="HTML"?h=m:h.appendChild(m),gt(m);else{if(!pe&&!ne&&!le&&n.indexOf("<")===-1)return L&&_e?fe(n):n;if(h=er(n),!h)return pe?null:_e?ee:""}h&&ot&&ce(h.firstChild);let he=tr(R?n:h);try{for(;w=he.nextNode();)rr(w),or(w),be(w.content)&&Ge(w.content)}catch(B){throw R&&Qt(n),B}if(R)return Ce(e.removed,B=>{B.element&&fn(B.element)}),ne&&mt(n),n;if(pe){if(ne&&mt(h),Ue)for(E=$r.call(h.ownerDocument);h.firstChild;)E.appendChild(h.firstChild);else E=h;return(N.shadowroot||N.shadowrootmode)&&(E=Xr.call(a,E,!0)),E}let ae=le?h.outerHTML:h.innerHTML;return le&&v["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&M(Xn,h.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
4
+ `+ae),ne&&(ae=Fe(ae)),L&&_e?fe(ae):ae},e.setConfig=function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(n),rt=!0,nt=v,at=N},e.clearConfig=function(){ye=null,rt=!1,nt=null,at=null,L=Qe,ee=""},e.isValidAttribute=function(n,l,h){ye||pt({});let m=I(n),w=I(l);return nr(m,w,h)},e.addHook=function(n,l){typeof l=="function"&&D(x,n)&&Te(x[n],l)},e.removeHook=function(n,l){if(D(x,n)){if(l!==void 0){let h=xn(x[n],l);return h===-1?void 0:Ln(x[n],h,1)[0]}return lr(x[n])}},e.removeHooks=function(n){D(x,n)&&(x[n]=[])},e.removeAllHooks=function(){x=Tr()},e}var wr,sr,Nn,Cn,In,U,_,we,Sr,Et,Rt,Ce,xn,lr,Te,Ln,se,Le,yt,cr,Ie,ur,kn,Dn,Pn,hr,dr,D,xe,M,de,fr,bt,Tt,zn,wt,Fn,pr,mr,St,gr,qe,jn,Gn,qn,Bn,Wn,yr,$n,Yn,Xn,Vn,br,Jn,Kn,Zn,J,Qn,ea,Tr,ie,ta,Ar=wn(()=>{wr=Object.entries,sr=Object.setPrototypeOf,Nn=Object.isFrozen,Cn=Object.getPrototypeOf,In=Object.getOwnPropertyDescriptor,U=Object.freeze,_=Object.seal,we=Object.create,Sr=typeof Reflect<"u"&&Reflect,Et=Sr.apply,Rt=Sr.construct;U||(U=function(r){return r});_||(_=function(r){return r});Et||(Et=function(r,e){for(var t=arguments.length,a=new Array(t>2?t-2:0),o=2;o<t;o++)a[o-2]=arguments[o];return r.apply(e,a)});Rt||(Rt=function(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];return new r(...t)});Ce=k(Array.prototype.forEach),xn=k(Array.prototype.lastIndexOf),lr=k(Array.prototype.pop),Te=k(Array.prototype.push),Ln=k(Array.prototype.splice),se=Array.isArray,Le=k(String.prototype.toLowerCase),yt=k(String.prototype.toString),cr=k(String.prototype.match),Ie=k(String.prototype.replace),ur=k(String.prototype.indexOf),kn=k(String.prototype.trim),Dn=k(Number.prototype.toString),Pn=k(Boolean.prototype.toString),hr=typeof BigInt>"u"?null:k(BigInt.prototype.toString),dr=typeof Symbol>"u"?null:k(Symbol.prototype.toString),D=k(Object.prototype.hasOwnProperty),xe=k(Object.prototype.toString),M=k(RegExp.prototype.test),de=Mn(TypeError);fr=U(["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","search","section","select","shadow","slot","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"]),bt=U(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Tt=U(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),zn=U(["animate","color-profile","cursor","discard","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"]),wt=U(["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","mprescripts"]),Fn=U(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pr=U(["#text"]),mr=U(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),St=U(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),gr=U(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),qe=U(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jn=_(/{{[\w\W]*|^[\w\W]*}}/g),Gn=_(/<%[\w\W]*|^[\w\W]*%>/g),qn=_(/\${[\w\W]*/g),Bn=_(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wn=_(/^aria-[\-\w]+$/),yr=_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$n=_(/^(?:\w+script|data):/i),Yn=_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xn=_(/^html$/i),Vn=_(/^[a-z][.\w]*(-[.\w]+)+$/i),br=_(/<[/\w!]/g),Jn=_(/<[/\w]/g),Kn=_(/<\/no(script|embed|frames)/i),Zn=_(/\/>/i),J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Qn=function(){return typeof window>"u"?null:window},ea=function(r,e){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let t=null,a="data-tt-policy-suffix";e&&e.hasAttribute(a)&&(t=e.getAttribute(a));let o="dompurify"+(t?"#"+t:"");try{return r.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Tr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ie=function(r,e,t,a){return D(r,e)&&se(r[e])?S(a.base?j(a.base):{},r[e],a.transform):t};ta=Er();});var Ve=/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u,ra=/(["\\])/ug,na=/^[\t\u0020-\u007E\u0080-\u00FF]*$/u,Be=r=>{for(let e=0,t=r.length;e<t;e++){let a=r.charCodeAt(e);if(a>=65&&a<=90)return r.toLowerCase()}return r},Or=class Dr extends Map{constructor(e=[]){super(e)}static isValid(e,t){return Ve.test(e)&&na.test(t)}get(e){return super.get(Be(e))}has(e){return super.has(Be(e))}set(e,t){if(!Dr.isValid(e,t))throw new Error(`Invalid media type parameter name/value: ${e}/${t}`);return super.set(Be(e),t),this}delete(e){return super.delete(Be(e))}toString(){let e="";for(let[t,a]of this)e+=";",e+=t,e+="=",a.length===0||!Ve.test(a)?(e+='"',e+=a.replace(ra,"\\$1"),e+='"'):e+=a;return e}get[Symbol.toStringTag](){return"MediaTypeParameters"}},ke=r=>r===32||r===9||r===10||r===13,aa=Map.prototype.set,oa=Map.prototype.has,ia=class Z{constructor(){}static parse(e){let t=0,a=e.length;for(;t<a&&ke(e.charCodeAt(t));)t++;for(;a>t&&ke(e.charCodeAt(a-1));)a--;(t!==0||a!==e.length)&&(e=e.slice(t,a));let o=e.length,i=0;for(;i<o&&e.charCodeAt(i)!==47;)i++;if(i===0||i>=o)throw new TypeError(Z.#n("type",e.slice(0,i)));let s=e.slice(0,i);if(!Ve.test(s))throw new TypeError(Z.#n("type",s));s=s.toLowerCase(),i++;let c=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let u=i;for(;u>c&&ke(e.charCodeAt(u-1));)u--;if(u===c)throw new TypeError(Z.#n("subtype",""));let d=e.slice(c,u);if(!Ve.test(d))throw new TypeError(Z.#n("subtype",d));d=d.toLowerCase();let p=new Or;for(;i<o;){for(i++;i<o&&ke(e.charCodeAt(i));)i++;let g=i;for(;i<o;){let b=e.charCodeAt(i);if(b===59||b===61)break;i++}let y=g===i?"":e.slice(g,i);if(i>=o||e.charCodeAt(i)===59)continue;i++;let T;if(i<o&&e.charCodeAt(i)===34){i=Z.#t(e,i,o),T=Z.#e;let b=e.indexOf(";",i);i=b===-1?o:b}else{let b=i;for(;i<o&&e.charCodeAt(i)!==59;)i++;let O=i;for(;O>b&&ke(e.charCodeAt(O-1));)O--;if(O===b)continue;T=e.slice(b,O)}if(y.length!==0&&Or.isValid(y,T)){let b=y.toLowerCase();oa.call(p,b)||aa.call(p,b,T)}}return{type:s,subtype:d,parameters:p}}static#e="";static#t(e,t,a){t++;let o=t;for(;t<a;){let s=e.charCodeAt(t);if(s===34||s===92)break;t++}if(t>=a)return Z.#e=e.slice(o,t),t;if(e.charCodeAt(t)===34)return Z.#e=e.slice(o,t),t+1;let i=e.slice(o,t);for(;t<a;){let s=e.charCodeAt(t);if(s===34){t++;break}s===92&&t+1<a&&t++,i+=e[t],t++}return Z.#e=i,t}static#n(e,t){return`Invalid ${e} "${t}": only HTTP token code points are valid.`}},Pr=class Mr{#e;#t;#n;#r;constructor(e,t){if({type:this.#e,subtype:this.#t,parameters:this.#r}=ia.parse(e),this.#n=this.#e+"/"+this.#t,t!==void 0){if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError("The parameters argument must be an object");for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&this.#r.set(a,t[a])}}static parse(e){try{return new Mr(e)}catch{}return null}get type(){return this.#e}get subtype(){return this.#t}get essence(){return this.#n}get parameters(){return this.#r}matches(e){return typeof e=="string"?this.#n===e:this.#e===e.#e&&this.#t===e.#t}toString(){return this.#n+this.#r.toString()}get[Symbol.toStringTag](){return"MediaType"}},sa=class extends Map{set(r,e){return super.set(r,e instanceof Set?e:(super.get(r)??new Set).add(e)),this}getOrInsert(r,e){return this.has(r)?super.get(r):(super.set(r,e instanceof Set?e:(super.get(r)??new Set).add(e)),e)}getOrInsertComputed(r,e){if(this.has(r))return super.get(r);let t=e(r);return super.set(r,t instanceof Set?t:(super.get(r)??new Set).add(t)),t}find(r,e){let t=this.get(r);if(t!==void 0)return Array.from(t).find(e)}hasValue(r,e){let t=super.get(r);return t?t.has(e):!1}deleteValue(r,e){if(e===void 0)return this.delete(r);let t=super.get(r);if(t){let a=t.delete(e);return t.size===0&&super.delete(r),a}return!1}get[Symbol.toStringTag](){return"SetMultiMap"}},la=class{#e;#t;constructor(r,e){this.#e=r,this.#t=e}handle(r,e){this.#t.call(this.#e,r,e)}get[Symbol.toStringTag](){return"ContextEventHandler"}},ca=class{#e;#t;constructor(r,e){this.#e=r,this.#t=e}get eventName(){return this.#e}get contextEventHandler(){return this.#t}get[Symbol.toStringTag](){return"Subscription"}},At=class{#e=new sa;#t;setErrorHandler(r){this.#t=r}subscribe(r,e,t=e,a){if(this.#n(r),a?.once){let s=e;e=(c,u)=>{s.call(t,c,u),this.unsubscribe(i)}}let o=new la(t,e);this.#e.set(r,o);let i=new ca(r,o);return i}unsubscribe({eventName:r,contextEventHandler:e}){let t=this.#e.get(r);if(!t)return!1;let a=t.delete(e);return a&&t.size===0&&this.#e.delete(r),a}publish(r,e=new CustomEvent(r),t){this.#n(r),this.#e.get(r)?.forEach(a=>{try{a.handle(e,t)}catch(o){this.#t?this.#t(o,r,e,t):console.error(`Error in event handler for '${r}':`,o)}})}isSubscribed({eventName:r,contextEventHandler:e}){return this.#e.get(r)?.has(e)??!1}#n(r){if(!r||typeof r!="string")throw new TypeError("Event name must be a non-empty string");if(r.trim()!==r)throw new Error("Event name cannot have leading or trailing whitespace")}destroy(){this.#e.clear()}get[Symbol.toStringTag](){return"Subscribr"}},De=class extends Error{#e;#t;#n;#r;#o;constructor(r,{message:e,cause:t,entity:a,url:o,method:i,timing:s}={}){super(e,{cause:t}),this.#e=a,this.#t=r,this.#n=o,this.#r=i,this.#o=s}get entity(){return this.#e}get statusCode(){return this.#t.code}get statusText(){return this.#t?.text}get url(){return this.#n}get method(){return this.#r}get timing(){return this.#o}get name(){return"HttpError"}get[Symbol.toStringTag](){return this.name}},Je=class{#e;#t;constructor(r,e){this.#e=r,this.#t=e}get code(){return this.#e}get text(){return this.#t}get[Symbol.toStringTag](){return"ResponseStatus"}toString(){return`${this.#e} ${this.#t}`}},ua="XSRF-TOKEN",ha="X-XSRF-TOKEN",H={PNG:"image/png",TEXT:"text/plain",JSON:"application/json",HTML:"text/html",JAVA_SCRIPT:"text/javascript",CSS:"text/css",XML:"application/xml",BIN:"application/octet-stream",EVENT_STREAM:"text/event-stream",NDJSON:"application/x-ndjson"},da={charset:"utf-8"},We=new Pr(H.JSON,da),vr=globalThis.location?.origin??"http://localhost",fa={DEFAULT:"default",FORCE_CACHE:"force-cache",NO_CACHE:"no-cache",NO_STORE:"no-store",ONLY_IF_CACHED:"only-if-cached",RELOAD:"reload"},W={CONFIGURED:"configured",SUCCESS:"success",ERROR:"error",ABORTED:"aborted",TIMEOUT:"timeout",RETRY:"retry",COMPLETE:"complete",ALL_COMPLETE:"all-complete"},Ee={ABORT:"abort",TIMEOUT:"timeout"},Pe={ABORT:"AbortError",TIMEOUT:"TimeoutError"},$e={once:!0,passive:!0},Ur=()=>new CustomEvent(Ee.ABORT,{detail:{cause:Pe.ABORT}}),pa=()=>new CustomEvent(Ee.TIMEOUT,{detail:{cause:Pe.TIMEOUT}}),ma=["POST","PUT","PATCH","DELETE"],ga=new Je(500,"Internal Server Error"),ya=new Je(499,"Aborted"),ba=new Je(504,"Request Timeout"),Nr=[408,413,429,500,502,503,504],Cr=["GET","PUT","HEAD","DELETE","OPTIONS"],Ot=300,vt=2,Ta=class{#e;#t=new AbortController;#n;#r;constructor({signal:r,timeout:e=1/0}={}){if(e<0)throw new RangeError("The timeout cannot be negative");let t=r!=null,a=e!==1/0;if(!t&&!a){this.#e=this.#t.signal,this.#r=!1;return}let o=[this.#t.signal];t&&o.push(r),a&&o.push(AbortSignal.timeout(e)),this.#e=AbortSignal.any(o),this.#r=!0,a&&this.#e.addEventListener(Ee.ABORT,this,$e)}handleEvent({target:{reason:r}}){this.#t.signal.aborted||r instanceof DOMException&&r.name===Pe.TIMEOUT&&this.#e.dispatchEvent(pa())}get signal(){return this.#e}onAbort(r){return this.#o(Ee.ABORT,r)}onTimeout(r){return this.#o(Ee.TIMEOUT,r)}abort(r=Ur()){this.#t.abort(r.detail?.cause)}destroy(){this.#r&&this.#e.removeEventListener(Ee.ABORT,this,$e);let r=this.#n;if(r!==void 0){for(let[e,t]of r)this.#e.removeEventListener(t,e,$e);r.clear()}return this}#o(r,e){return this.#e.addEventListener(r,e,$e),(this.#n??=new Map).set(e,r),this}get[Symbol.toStringTag](){return"SignalController"}},wa=r=>r!==void 0&&ma.includes(r),Sa=r=>r instanceof FormData||r instanceof Blob||r instanceof ArrayBuffer||r instanceof ReadableStream||r instanceof URLSearchParams||ArrayBuffer.isView(r),Ea=r=>{if(typeof document>"u")return;let e=document.cookie;if(!e)return;let t=`${r}=`,a=t.length,o=e.length,i=0;for(;i<o;){for(;i<o&&e.charCodeAt(i)===32;)i++;let s=e.indexOf(";",i);if(s===-1&&(s=o),s-i>=a&&e.startsWith(t,i))return decodeURIComponent(e.slice(i+a,s));i=s+1}},Ra=r=>JSON.stringify(r),Se=r=>r!==null&&typeof r=="string",Aa=r=>r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]",z=r=>r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.getPrototypeOf(r)===Object.prototype,Ct=(...r)=>{let e=r.length;if(e===0)return;if(e===1){let[a]=r;return z(a)?It(a):a}let t={};for(let a=0,o=r.length;a<o;a++){let i=r[a];if(!z(i))return;let s=Object.keys(i);for(let c=0,u=s.length;c<u;c++){let d=s[c],p=i[d],g=t[d];if(Array.isArray(p))if(Array.isArray(g)){let y=p.slice();for(let T=0,b=g.length;T<b;T++){let O=g[T];p.includes(O)||y.push(O)}t[d]=y}else t[d]=p.slice();else z(p)?t[d]=z(g)?Ct(g,p):It(p):t[d]=p}}return t};function It(r){if(z(r)){let e={},t=Object.keys(r);for(let a=0,o=t.length,i;a<o;a++)i=t[a],e[i]=It(r[i]);return e}return r}var Oa=r=>{throw new Error(`Unhandled sanitization preset: ${r}`)},_r={ALLOW_ARIA_ATTR:!0,ALLOW_DATA_ATTR:!0,KEEP_CONTENT:!0},va={..._r,ALLOW_UNKNOWN_PROTOCOLS:!0},Na=["text/x-jquery-tmpl","text/x-jquery-template","text/template","text/ng-template","text/x-handlebars-template","text/x-mustache-template"],Ke=r=>typeof r=="string"?{preset:r,preserveTemplateScripts:!1,templateScriptTypes:[],allowScripts:!1}:{preset:r.preset??"strict",preserveTemplateScripts:r.preserveTemplateScripts===!0,templateScriptTypes:r.templateScriptTypes??[],allowScripts:r.allowScripts===!0},Hr=r=>r.trim().toLowerCase(),Ze=r=>{let e=r.preserveTemplateScripts?[...Na,...r.templateScriptTypes]:r.templateScriptTypes;return new Set(e.map(Hr).filter(Boolean))},Ca=(r,e)=>{if(e.size===0)return{markup:r,placeholders:new Map};let t=document.createRange().createContextualFragment(r),a=Array.from(t.querySelectorAll("script[type]"));if(a.length===0)return{markup:r,placeholders:new Map};let o=Math.random().toString(36).slice(2),i=new Map;for(let c=0,u=a.length;c<u;c++){let d=a[c];if(!e.has(Hr(d.getAttribute("type")??"")))continue;let p=`__TRANSPORTR_TEMPLATE_SCRIPT_${o}_${c}_${i.size}__`;i.set(p,{attributes:Array.from(d.attributes,({name:g,value:y})=>[g,y]),content:d.textContent??""}),d.replaceWith(document.createTextNode(p))}if(i.size===0)return{markup:r,placeholders:i};let s=document.createElement("div");return s.append(t),{markup:s.innerHTML,placeholders:i}},Ia=(r,e)=>{if(e.size===0)return r;let t=document.createElement("div");t.innerHTML=r;let a=[],o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i;for(;i=o.nextNode();)a.push(i);for(let s=0,c=a.length;s<c;s++){let u=a[s];if(!u.parentNode)continue;let d=u.nodeValue;if(d===null)continue;let p=0,g=!1,y=document.createDocumentFragment();for(let T=-1,b="",O;;O=void 0){for(let[P,Y]of e){let $=d.indexOf(P,p);$!==-1&&(T===-1||$<T)&&(T=$,b=P,O=Y)}if(T===-1||!O)break;g=!0,T>p&&y.append(document.createTextNode(d.slice(p,T)));let G=document.createElement("script");for(let P=0,Y=O.attributes.length;P<Y;P++){let[$,A]=O.attributes[P];G.setAttribute($,A)}G.textContent=O.content,y.append(G),p=T+b.length}g&&(p<d.length&&y.append(document.createTextNode(d.slice(p))),u.parentNode.replaceChild(y,u))}return t.innerHTML},xa=class{#e;#t;domReady=()=>{if(this.#e)return this.#e;let r=typeof document<"u"&&typeof DOMParser<"u"&&typeof DocumentFragment<"u";return this.#e=r?Promise.resolve():import("jsdom").then(({JSDOM:e})=>{let{window:t}=new e("<!DOCTYPE html><html><head></head><body></body></html>",{url:"http://localhost"});globalThis.window=t,Object.assign(globalThis,{document:t.document,DOMParser:t.DOMParser,DocumentFragment:t.DocumentFragment})}).catch(()=>{throw this.#e=void 0,new Error("jsdom is required for HTML/XML/DOM features in Node.js environments. Install it with: npm install jsdom")})};getSanitizer=()=>{if(this.#t)return this.#t;let r=(async()=>{await this.domReady();let{default:e}=await Promise.resolve().then(()=>(Ar(),Rr));return e})();return this.#t=r.catch(e=>{throw this.#t=void 0,e})}},Q=new xa,zr=async(r,e)=>(await Q.domReady(),new DOMParser().parseFromString((await Q.getSanitizer()).sanitize(await r.text()),e)),La=r=>{let e;switch(r.preset){case"bypass":case"strict":e=void 0;break;case"balanced":e=_r;break;case"relaxed":e=va;break;default:Oa(r.preset)}return r.allowScripts?{...e,ADD_TAGS:["script"]}:e},Fr=async(r,e)=>{let t=Ke(e);if(t.preset==="bypass")return r;let a=La(t);if(t.allowScripts){let u=(await Q.getSanitizer()).sanitize(r,a);return typeof u=="string"?u:String(u)}let{markup:o,placeholders:i}=Ca(r,Ze(t)),s=(await Q.getSanitizer()).sanitize(o,a),c=typeof s=="string"?s:String(s);return Ia(c,i)},jr=async(r,e,t)=>{await Q.domReady();let a=await Fr(await r.text(),t);return new DOMParser().parseFromString(a,e)},ka=async(r,e)=>{await Q.domReady();let t=await Fr(await r.text(),e);return document.createRange().createContextualFragment(t)},xt=async(r,e)=>{await Q.domReady();let t=URL.createObjectURL(await r.blob());try{return new Promise((a,o)=>e(t,a,o))}finally{URL.revokeObjectURL(t)}},Da=r=>r.text(),Ir=r=>xt(r,(e,t,a)=>{let o=Object.assign(document.createElement("script"),{src:e,type:"text/javascript",async:!0});o.onload=()=>{document.head.removeChild(o),t()},o.onerror=()=>{document.head.removeChild(o),a(new Error("Script failed to load"))},document.head.appendChild(o)}),xr=r=>xt(r,(e,t,a)=>{let o=Object.assign(document.createElement("link"),{href:e,type:"text/css",rel:"stylesheet"});o.onload=()=>t(),o.onerror=()=>{document.head.removeChild(o),a(new Error("Stylesheet load failed"))},document.head.appendChild(o)}),Ye=r=>r.json(),Pa=r=>r.blob(),Lr=r=>xt(r,(e,t,a)=>{let o=new Image;o.onload=()=>t(o),o.onerror=()=>a(new Error("Image failed to load")),o.src=e}),Ma=r=>r.arrayBuffer(),kr=r=>Promise.resolve(r.body),Xe=async r=>zr(r,"application/xml"),Gr=async r=>zr(r,"text/html"),Ua=async r=>(await Q.domReady(),document.createRange().createContextualFragment((await Q.getSanitizer()).sanitize(await r.text()))),_a=async r=>(await Q.domReady(),document.createRange().createContextualFragment(await r.text())),Ha=r=>{let e=Ke(r);return e.preset==="strict"&&!e.allowScripts&&Ze(e).size===0?Gr:async t=>jr(t,"text/html",e)},za=r=>{let e=Ke(r);return e.preset==="strict"&&!e.allowScripts&&Ze(e).size===0?Xe:async t=>jr(t,"application/xml",e)},Fa=r=>{let e=Ke(r);return e.preset==="strict"&&!e.allowScripts&&Ze(e).size===0?Ua:e.preset==="bypass"?_a:async t=>ka(t,e)};async function*qr(r,e,t){let a=r.getReader(),o=new TextDecoder,i=e.length,s="",c=0;try{for(;;){let u;for(;(u=s.indexOf(e,c))!==-1;)yield s.slice(c,u),c=u+i;c>0&&c>=s.length-c&&(s=c<s.length?s.slice(c):"",c=0);let{done:d,value:p}=await a.read();if(d)break;s+=o.decode(p,{stream:!0})}if(t){let u=((c<s.length?s.slice(c):"")+o.decode()).trim();u&&(yield u)}}finally{await a.cancel()}}var ja=r=>{let e="message",t="",a,o,i,s=r.split(`
5
+ `);for(let u=0,d,p=s.length;u<p;u++){if(d=s[u],d.charCodeAt(0)===58)continue;let g=d.indexOf(":"),y,T;switch(g===-1?(y=d,T=""):(y=d.slice(0,g),T=d.charCodeAt(g+1)===32?d.slice(g+2):d.slice(g+1)),y){case"event":{e=T;break}case"data":{o===void 0?o=T:(i??=[]).push(T);break}case"id":{t=T;break}case"retry":{let b=parseInt(T,10);isNaN(b)||(a=b);break}}}if(o===void 0&&e==="message")return;let c=i===void 0?o??"":`${o}
6
6
  ${i.join(`
7
- `)}`;return{event:e,data:l,id:t,retry:a}},Kn=n=>({async*[Symbol.asyncIterator](){for await(let e of Dr(n.body,`
7
+ `)}`;return{event:e,data:c,id:t,retry:a}},Ga=r=>({async*[Symbol.asyncIterator](){for await(let e of qr(r.body,`
8
8
 
9
- `,!1)){if(!e)continue;let t=Jn(e);t&&(yield t)}}}),Zn=n=>({async*[Symbol.asyncIterator](){for await(let e of Dr(n.body,`
10
- `,!0)){let t=e.trim();t&&(yield JSON.parse(t))}}}),Qn=n=>n!==void 0&&jn.includes(n),ea=n=>n instanceof FormData||n instanceof Blob||n instanceof ArrayBuffer||n instanceof ReadableStream||n instanceof URLSearchParams||ArrayBuffer.isView(n),ta=n=>{if(typeof document>"u")return;let e=document.cookie;if(!e)return;let t=`${n}=`,a=t.length,o=e.length,i=0;for(;i<o;){for(;i<o&&e.charCodeAt(i)===32;)i++;let s=e.indexOf(";",i);if(s===-1&&(s=o),s-i>=a&&e.startsWith(t,i))return decodeURIComponent(e.slice(i+a,s));i=s+1}},ra=n=>JSON.stringify(n),vt=n=>n!==null&&typeof n=="string",na=n=>n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]",j=n=>n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.getPrototypeOf(n)===Object.prototype,Nt=(...n)=>{let e=n.length;if(e===0)return;if(e===1){let[a]=n;return j(a)?Ct(a):a}let t={};for(let a=0,o=n.length;a<o;a++){let i=n[a];if(!j(i))return;let s=Object.keys(i);for(let l=0,u=s.length;l<u;l++){let d=s[l],m=i[d],p=t[d];if(Array.isArray(m))if(Array.isArray(p)){let g=m.slice();for(let S=0,T=p.length;S<T;S++){let M=p[S];m.includes(M)||g.push(M)}t[d]=g}else t[d]=m.slice();else j(m)?t[d]=j(p)?Nt(p,m):Ct(m):t[d]=m}}return t};function Ct(n){if(j(n)){let e={},t=Object.keys(n);for(let a=0,o=t.length,i;a<o;a++)i=t[a],e[i]=Ct(n[i]);return e}return n}var oa=class h{#e;#t;#n;#r;#o;#p;#s={beforeRequest:[],afterResponse:[],beforeError:[]};#d={beforeRequest:0,afterResponse:0,beforeError:0};#l=Object.create(null);static#S=new wt;static#h={beforeRequest:[],afterResponse:[],beforeError:[]};static#m={beforeRequest:0,afterResponse:0,beforeError:0};static#f=Object.create(null);static#g=new Set;static#w=new Map;static#P={limit:0,statusCodes:[],methods:[],delay:At,backoffFactor:Rt};static#L=new WeakMap;static#y=new Map([[We.toString(),We]]);static#c=new Map;static#A=[[P.TEXT,Wn],[P.JSON,Ye],[P.BIN,Ar],[P.HTML,Rr],[P.XML,Xe],[P.PNG,wr],[P.JAVA_SCRIPT,Er],[P.CSS,Sr]];constructor(e=yr,t={}){j(e)&&([e,t]=[yr,e]),this.#e=h.#G(e),this.#t=this.#e.origin;let a=this.#e.pathname;this.#n=a.length>0&&a.charCodeAt(a.length-1)===47?a.slice(0,-1):a,this.#r=h.#j(t,h.#M),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type"),this.#p=new wt}static CredentialsPolicy={INCLUDE:"include",OMIT:"omit",SAME_ORIGIN:"same-origin"};static RequestMode={CORS:"cors",NAVIGATE:"navigate",NO_CORS:"no-cors",SAME_ORIGIN:"same-origin"};static RequestPriority={HIGH:"high",LOW:"low",AUTO:"auto"};static RedirectPolicy={ERROR:"error",FOLLOW:"follow",MANUAL:"manual"};static ReferrerPolicy={NO_REFERRER:"no-referrer",NO_REFERRER_WHEN_DOWNGRADE:"no-referrer-when-downgrade",ORIGIN:"origin",ORIGIN_WHEN_CROSS_ORIGIN:"origin-when-cross-origin",SAME_ORIGIN:"same-origin",STRICT_ORIGIN:"strict-origin",STRICT_ORIGIN_WHEN_CROSS_ORIGIN:"strict-origin-when-cross-origin",UNSAFE_URL:"unsafe-url"};static RequestEvent=z;static#M={body:void 0,cache:Fn.NO_STORE,credentials:h.CredentialsPolicy.SAME_ORIGIN,headers:new Headers({"content-type":We.toString(),accept:We.toString()}),searchParams:void 0,integrity:void 0,keepalive:void 0,method:"GET",mode:h.RequestMode.CORS,priority:h.RequestPriority.AUTO,redirect:h.RedirectPolicy.FOLLOW,referrer:"about:client",referrerPolicy:h.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,signal:void 0,timeout:3e4,global:!0};static register(e,t,a){let o=h.#S.subscribe(e,t,a);return h.#f[e]=(h.#f[e]??0)+1,o}static unregister(e){let t=h.#S.unsubscribe(e);if(t){let a=e.eventName,o=(h.#f[a]??1)-1;o<=0?delete h.#f[a]:h.#f[a]=o}return t}static abortAll(){for(let e of this.#g)e.abort(Cr());this.#g.clear()}static all(e){return Promise.all(e)}static async race(e){let t=[],a=new Array(e.length);for(let o=0;o<e.length;o++){let i=new AbortController;t.push(i),a[o]=e[o](i.signal)}try{return await Promise.race(a)}finally{for(let o of t)o.abort()}}static registerContentTypeHandler(e,t){h.#A.unshift([e,t]),h.#c.clear()}static unregisterContentTypeHandler(e){let t=h.#A.findIndex(([a])=>a===e);return t===-1?!1:(h.#A.splice(t,1),h.#c.clear(),!0)}static addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;t&&(h.#h.beforeRequest.push(...t),h.#m.beforeRequest+=t.length),a&&(h.#h.afterResponse.push(...a),h.#m.afterResponse+=a.length),o&&(h.#h.beforeError.push(...o),h.#m.beforeError+=o.length)}static clearHooks(){h.#h={beforeRequest:[],afterResponse:[],beforeError:[]},h.#m.beforeRequest=0,h.#m.afterResponse=0,h.#m.beforeError=0}static unregisterAll(){h.abortAll(),h.#S=new wt,h.#f=Object.create(null),h.clearHooks(),h.#w.clear()}get baseUrl(){return this.#e}register(e,t,a){let o=this.#p.subscribe(e,t,a);return this.#l[e]=(this.#l[e]??0)+1,o}unregister(e){let t=this.#p.unsubscribe(e);if(t){let a=e.eventName,o=(this.#l[a]??1)-1;o<=0?delete this.#l[a]:this.#l[a]=o}return t}addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;return t&&(this.#s.beforeRequest.push(...t),this.#d.beforeRequest+=t.length),a&&(this.#s.afterResponse.push(...a),this.#d.afterResponse+=a.length),o&&(this.#s.beforeError.push(...o),this.#d.beforeError+=o.length),this}clearHooks(){return this.#s.beforeRequest.length=0,this.#s.afterResponse.length=0,this.#s.beforeError.length=0,this.#d.beforeRequest=0,this.#d.afterResponse=0,this.#d.beforeError=0,this}configure({headers:e,searchParams:t,hooks:a,...o}){return e&&(h.#I(this.#r.headers,e),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type")),t&&h.#T(this.#r.searchParams,t),Object.assign(this.#r,o),a&&this.addHooks(a),this}destroy(){this.clearHooks(),this.#p.destroy();for(let e in this.#l)delete this.#l[e]}async get(e,t){return this.#i(e,t)}async post(e,t,a){return this.#O("POST",e,t,a)}async put(e,t,a){return this.#O("PUT",e,t,a)}async patch(e,t,a){return this.#O("PATCH",e,t,a)}async delete(e,t,a){return this.#O("DELETE",e,t,a)}async head(e,t){return this.#C(e,t,{method:"HEAD"})}async options(e,t={}){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{method:"OPTIONS"}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a);u=await this.#N(u,o,s?.afterResponse);let d=u.headers.get("allow"),m;if(d){let p=d.split(",");m=new Array(p.length);for(let g=0,S=p.length;g<S;g++)m[g]=p[g].trim()}return this.#a({name:z.SUCCESS,data:m,global:t.global}),i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async request(e,t={}){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t,{}),o=a.requestOptions.unwrap!==!1;try{let i=await this.#b(e,a);return this.#a({name:z.SUCCESS,data:i,global:t.global}),o?i:[!0,i]}catch(i){if(!o)return[!1,i];throw i}}async getJson(e,t){return this.#i(e,t,{headers:{accept:`${P.JSON}`}},Ye)}async getXml(e,t){return this.#i(e,t,{headers:{accept:`${P.XML}`}},Xe)}async getHtml(e,t,a){let o=await this.#i(e,t,{headers:{accept:`${P.HTML}`}},Rr);return Array.isArray(o)?o:a&&o?o.querySelector(a):o}async getHtmlFragment(e,t,a){let o=((j(e)?e:t)?.allowScripts??this.#r.allowScripts)===!0,i=await this.#i(e,t,{headers:{accept:`${P.HTML}`}},o?Vn:Xn);return Array.isArray(i)?i:a&&i?i.querySelector(a):i}async getScript(e,t){return this.#i(e,t,{headers:{accept:`${P.JAVA_SCRIPT}`}},Er)}async getStylesheet(e,t){return this.#i(e,t,{headers:{accept:`${P.CSS}`}},Sr)}async getBlob(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},$n)}async getImage(e,t){return this.#i(e,t,{headers:{accept:"image/*"}},wr)}async getBuffer(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Yn)}async getStream(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Ar)}async getEventStream(e,t){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:t?.body?"POST":"GET",headers:{accept:`${P.EVENT_STREAM}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:z.SUCCESS,data:d,global:a.global});let m=Kn(d);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async getJsonStream(e,t){j(e)&&([e,t]=[void 0,e]);let a=this.#E(t??{},{method:"GET",headers:{accept:`${P.NDJSON}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let l=h.#u(this,e,o.searchParams);await this.#v(o,l,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:z.SUCCESS,data:d,global:a.global});let m=Zn(d);return i?m:[!0,m]}catch(l){if(!i)return[!1,l];throw l}}async#i(e,t,a={},o){return a.method="GET",a.body=void 0,this.#C(e,t,a,o)}async#b(e,t){let{signalController:a,requestOptions:o,global:i}=t;h.#g.add(a);let s=h.#F(o.retry),l=o.method??"GET",u=s.limit>0&&s.methods.includes(l),d=o.dedupe===!0&&(l==="GET"||l==="HEAD"),m=performance.now();try{let p=h.#u(this,e,o.searchParams),g;if(d){g=`${l}:${p.href}`;let K=h.#w.get(g);if(K)return(await K).clone()}let S=o.onUploadProgress,T=o.body;S&&T!=null&&(o.duplex="half");let M=this.#U(p,o,e,l,u,s,T,S,m,i);if(d){h.#w.set(g,M);try{return h.#x(await M,o)}finally{h.#w.delete(g)}}return h.#x(await M,o)}finally{if(h.#g.delete(a.destroy()),!o.signal?.aborted){let p=performance.now();this.#a({name:z.COMPLETE,data:{timing:{start:m,end:p,duration:p-m}},global:i}),h.#g.size===0&&this.#a({name:z.ALL_COMPLETE,global:i})}}}async#U(e,t,a,o,i,s,l,u,d,m){let p=0;for(;;)try{u&&await h.#_(t,l,u);let g=await fetch(e,t);if(!g.ok){if(i&&p<s.limit&&s.statusCodes.includes(g.status)){p++,this.#a({name:z.RETRY,data:{attempt:p,status:g.status,method:o,path:a,timing:h.#R(d)},global:m}),await h.#k(s,p);continue}let S;if(t.captureErrorBody!==!1)try{S=await g.text()}catch{}throw await this.#D(a,g,{entity:S,url:e,method:o,timing:h.#R(d)},t)}return g}catch(g){if(g instanceof Ce)throw g;if(i&&p<s.limit){p++,this.#a({name:z.RETRY,data:{attempt:p,error:g.message,method:o,path:a,timing:h.#R(d)},global:m}),await h.#k(s,p);continue}throw await this.#D(a,void 0,{cause:g,url:e,method:o,timing:h.#R(d)},t)}}static async#_(e,t,a){if(t==null)return;let o=null;if(typeof t=="string")o=new TextEncoder().encode(t);else if(t instanceof Blob)o=new Uint8Array(await t.arrayBuffer());else if(na(t))o=new Uint8Array(t);else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(!(t instanceof ReadableStream))return;let i=o?o.byteLength:null,s=o?new ReadableStream({start(d){d.enqueue(o),d.close()}}):t,l=0,u=new TransformStream({transform(d,m){l+=d.byteLength,a({loaded:l,total:i,percentage:i!==null&&i>0?Math.round(l/i*100):null}),m.enqueue(d)}});e.body=s.pipeThrough(u)}static#x(e,t){let a=t.onDownloadProgress;if(!a||!e.body)return e;let o=e.headers.get("content-length"),i=o?parseInt(o,10):null,s=0,l=new TransformStream({transform(u,d){s+=u.byteLength,a({loaded:s,total:i,percentage:i!==null&&i>0?Math.round(s/i*100):null}),d.enqueue(u)}});return new Response(e.body.pipeThrough(l),{status:e.status,statusText:e.statusText,headers:e.headers})}static#R(e){let t=performance.now();return{start:e,end:t,duration:t-e}}static#F(e){if(e===void 0)return h.#P;if(typeof e=="number")return{limit:e,statusCodes:br,methods:Tr,delay:At,backoffFactor:Rt};let t=h.#L.get(e);if(t!==void 0)return t;let a={limit:e.limit??0,statusCodes:e.statusCodes??br,methods:e.methods??Tr,delay:e.delay??At,backoffFactor:e.backoffFactor??Rt};return h.#L.set(e,a),a}static#k(e,t){let a=typeof e.delay=="function"?e.delay(t):e.delay*e.backoffFactor**(t-1);return new Promise(o=>setTimeout(o,a))}#O(e,t,a,o,i){let[s,l,u]=vt(t)?[t,a,o]:[void 0,t,a],d=u!==void 0?Object.assign({},u,{body:l,method:e}):{body:l,method:e};return this.#C(s,d,{},i)}async#v(e,t,a,o){let i=h.#h.beforeRequest,s=this.#s.beforeRequest,l=o===void 0?0:o.length;if(i.length===0&&s.length===0&&l===0)return t;for(let u=0,d=i.length;u<d;u++){let m=await i[u](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}for(let u=0,d=s.length;u<d;u++){let m=await s[u](e,t);m&&(Object.assign(e,m),m.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}for(let u=0;u<l;u++){let d=await o[u](e,t);d&&(Object.assign(e,d),d.searchParams!==void 0&&(t=h.#u(this,a,e.searchParams)))}return t}async#N(e,t,a){let o=h.#h.afterResponse,i=this.#s.afterResponse,s=a===void 0?0:a.length;if(o.length===0&&i.length===0&&s===0)return e;for(let l=0,u=o.length;l<u;l++){let d=await o[l](e,t);d&&(e=d)}for(let l=0,u=i.length;l<u;l++){let d=await i[l](e,t);d&&(e=d)}for(let l=0;l<s;l++){let u=await a[l](e,t);u&&(e=u)}return e}async#H(e,t){let a=h.#h.beforeError,o=this.#s.beforeError,i=t===void 0?0:t.length;if(a.length===0&&o.length===0&&i===0)return e;for(let s=0,l=a.length;s<l;s++){let u=await a[s](e);u instanceof Ce&&(e=u)}for(let s=0,l=o.length;s<l;s++){let u=await o[s](e);u instanceof Ce&&(e=u)}for(let s=0;s<i;s++){let l=await t[s](e);l instanceof Ce&&(e=l)}return e}async#C(e,t={},a={},o){j(e)&&([e,t]=[void 0,e]);let i=this.#E(t,a),{requestOptions:s}=i,l=s.unwrap!==!1,u=s.hooks;try{let d=h.#u(this,e,s.searchParams);await this.#v(s,d,e,u?.beforeRequest);let m=await this.#b(e,i);m=await this.#N(m,s,u?.afterResponse);try{!o&&m.status!==204&&(o=this.#q(m.headers.get("content-type")));let p=await o?.(m);return this.#a({name:z.SUCCESS,data:p,global:i.global}),l?p:[!0,p]}catch(p){throw await this.#D(e,m,{cause:p},s)}}catch(d){if(!l)return[!1,d];throw d}}static#j({headers:e,searchParams:t,...a},{headers:o,searchParams:i,...s}){return o=h.#I(new Headers,e,o),i=h.#T(new URLSearchParams,t,i),{...Nt(s,a),headers:o,searchParams:i}}static#I(e,...t){for(let a of t)if(a!==void 0)if(a instanceof Headers)a.forEach((o,i)=>e.set(i,o));else if(Array.isArray(a))for(let[o,i]of a)e.set(o,i);else{let o=Object.keys(a);for(let i=0,s=o.length;i<s;i++){let l=o[i],u=a[l];u!==void 0&&e.set(l,u)}}return e}static#T(e,...t){for(let a of t)if(a!==void 0)if(a instanceof URLSearchParams)a.forEach((o,i)=>e.set(i,o));else if(vt(a)||Array.isArray(a))for(let[o,i]of new URLSearchParams(a))e.set(o,i);else{let o=Object.keys(a);for(let i=0;i<o.length;i++){let s=o[i],l=a[s];l!==void 0&&e.set(s,typeof l=="string"?l:String(l))}}return e}#E(e,t){let a=e.headers,o=e.searchParams,i=e.body,s=t.headers,l=t.searchParams,u=t.method??e.method??this.#r.method??"GET",d=Qn(u),m;!d&&a===void 0&&s===void 0?m=new Headers(this.#o):(m=new Headers(this.#r.headers),(a!==void 0||s!==void 0)&&h.#I(m,a,s));let p=this.#r.searchParams,g=p!==void 0&&p.size>0,S;!g&&o===void 0&&l===void 0?S=new URLSearchParams:(S=new URLSearchParams(p),(o!==void 0||l!==void 0)&&h.#T(S,o,l));let T=Object.assign({},this.#r,e,t);if(T.headers=m,T.searchParams=S,d)if(ea(i))T.body=i,m.delete("content-type");else{let R=this.#r.body,G=j(R)&&j(i)?Nt(R,i):i!==void 0?i:R,D=m.get("content-type"),ne=D!==null&&D.includes("json");T.body=ne&&j(G)?ra(G):G}else T.body instanceof URLSearchParams&&h.#T(S,T.body),T.body=void 0,(a!==void 0||s!==void 0)&&m.delete("content-type");let M=T.signal,K=T.timeout,Z=T.global??!1,ee=T.xsrf;if(ee){let{cookieName:R,headerName:G}=typeof ee=="object"?ee:{},D=ta(R??Mn);D&&m.set(G??Un,D)}let De=new qn({signal:M,timeout:K}).onAbort(R=>this.#a({name:z.ABORTED,event:R,global:Z})).onTimeout(R=>this.#a({name:z.TIMEOUT,event:R,global:Z}));return T.signal=De.signal,this.#a({name:z.CONFIGURED,data:T,global:Z}),{signalController:De,requestOptions:T,global:Z}}static#G(e){if(e instanceof URL)return e;if(!vt(e))throw new TypeError("Invalid URL");return new URL(e,e.startsWith("/")?globalThis.location.origin:void 0)}static#z(e){if(e===null)return;let t=h.#y.get(e);return t!==void 0||(t=vr.parse(e)??void 0,t!==void 0&&(h.#y.size>=100&&h.#y.delete(h.#y.keys().next().value),h.#y.set(e,t))),t}static#u(e,t,a){let o;if(e instanceof URL){let i=e.pathname,s=i.charCodeAt(i.length-1)===47?i.slice(0,-1):i;o=t?new URL(`${s}${t}`,e.origin):new URL(e)}else o=t?new URL(`${e.#n}${t}`,e.#t):new URL(e.#e);return a&&h.#T(o.searchParams,a),o}static#B(e,{status:t,statusText:a}=new Response){switch(e){case Ie.ABORT:return zn;case Ie.TIMEOUT:return Bn;default:return t>=400?new Je(t,a):Gn}}async#D(e,t,{cause:a,entity:o,url:i,method:s,timing:l}={},u){let d=s&&i?`${s} ${i.href} failed${t?` with status ${t.status}`:""}`:`An error has occurred with your request to: '${e}'`,m=new Ce(h.#B(a?.name,t),{message:d,cause:a,entity:o,url:i,method:s,timing:l});return m=await this.#H(m,u?.hooks?.beforeError),this.#a({name:z.ERROR,data:m}),m}#a({name:e,event:t,data:a,global:o=!0}){let i=o&&(h.#f[e]??0)>0,s=(this.#l[e]??0)>0;if(!i&&!s)return;let l=t??new CustomEvent(e);i&&h.#S.publish(e,l,a),s&&this.#p.publish(e,l,a)}#q(e){if(!e)return;let t=h.#c.get(e);if(t!==void 0)return t===null?void 0:t;let a=h.#z(e);if(!a){h.#c.set(e,null);return}let o=h.#A;for(let s=0,l=o.length;s<l;s++){let u=o[s];if(a.matches(u[0])){let d=u[1];return h.#c.set(e,d),d}}let i=a.subtype;if(i.endsWith("+json"))return h.#c.set(e,Ye),Ye;if(i.endsWith("+xml"))return h.#c.set(e,Xe),Xe;h.#c.set(e,null)}get[Symbol.toStringTag](){return"Transportr"}};
11
- Object.assign(globalThis, { Transportr: oa });
9
+ `,!1)){if(!e)continue;let t=ja(e);t&&(yield t)}}}),qa=r=>({async*[Symbol.asyncIterator](){for await(let e of qr(r.body,`
10
+ `,!0)){let t=e.trim();t&&(yield JSON.parse(t))}}}),Nt=(r,e)=>({preset:r?.sanitization?.preset??r?.sanitizePreset??e.sanitization?.preset??e.sanitizePreset??"strict",preserveTemplateScripts:r?.sanitization?.preserveTemplateScripts??e.sanitization?.preserveTemplateScripts,templateScriptTypes:r?.sanitization?.templateScriptTypes??e.sanitization?.templateScriptTypes}),Wa=class f{#e;#t;#n;#r;#o;#m;#s={beforeRequest:[],afterResponse:[],beforeError:[]};#f={beforeRequest:0,afterResponse:0,beforeError:0};#l=Object.create(null);static#S=new At;static#h={beforeRequest:[],afterResponse:[],beforeError:[]};static#p={beforeRequest:0,afterResponse:0,beforeError:0};static#d=Object.create(null);static#g=new Set;static#E=new Map;static#P={limit:0,statusCodes:[],methods:[],delay:Ot,backoffFactor:vt};static#L=new WeakMap;static#y=new Map([[We.toString(),We]]);static#c=new Map;static#R=[[H.TEXT,Da],[H.JSON,Ye],[H.BIN,kr],[H.HTML,Gr],[H.XML,Xe],[H.PNG,Lr],[H.JAVA_SCRIPT,Ir],[H.CSS,xr]];constructor(e=vr,t={}){z(e)&&([e,t]=[vr,e]),this.#e=f.#j(e),this.#t=this.#e.origin;let a=this.#e.pathname;this.#n=a.length>0&&a.charCodeAt(a.length-1)===47?a.slice(0,-1):a,this.#r=f.#F(t,f.#M),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type"),this.#m=new At}static CredentialsPolicy={INCLUDE:"include",OMIT:"omit",SAME_ORIGIN:"same-origin"};static RequestMode={CORS:"cors",NAVIGATE:"navigate",NO_CORS:"no-cors",SAME_ORIGIN:"same-origin"};static RequestPriority={HIGH:"high",LOW:"low",AUTO:"auto"};static RedirectPolicy={ERROR:"error",FOLLOW:"follow",MANUAL:"manual"};static ReferrerPolicy={NO_REFERRER:"no-referrer",NO_REFERRER_WHEN_DOWNGRADE:"no-referrer-when-downgrade",ORIGIN:"origin",ORIGIN_WHEN_CROSS_ORIGIN:"origin-when-cross-origin",SAME_ORIGIN:"same-origin",STRICT_ORIGIN:"strict-origin",STRICT_ORIGIN_WHEN_CROSS_ORIGIN:"strict-origin-when-cross-origin",UNSAFE_URL:"unsafe-url"};static RequestEvent=W;static#M={body:void 0,cache:fa.NO_STORE,credentials:f.CredentialsPolicy.SAME_ORIGIN,headers:new Headers({"content-type":We.toString(),accept:We.toString()}),searchParams:void 0,integrity:void 0,keepalive:void 0,method:"GET",mode:f.RequestMode.CORS,priority:f.RequestPriority.AUTO,redirect:f.RedirectPolicy.FOLLOW,referrer:"about:client",referrerPolicy:f.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,signal:void 0,timeout:3e4,global:!0};static register(e,t,a){let o=f.#S.subscribe(e,t,a);return f.#d[e]=(f.#d[e]??0)+1,o}static unregister(e){let t=f.#S.unsubscribe(e);if(t){let a=e.eventName,o=(f.#d[a]??1)-1;o<=0?delete f.#d[a]:f.#d[a]=o}return t}static abortAll(){for(let e of this.#g)e.abort(Ur());this.#g.clear()}static all(e){return Promise.all(e)}static async race(e){let t=[],a=new Array(e.length);for(let o=0;o<e.length;o++){let i=new AbortController;t.push(i),a[o]=e[o](i.signal)}try{return await Promise.race(a)}finally{for(let o of t)o.abort()}}static registerContentTypeHandler(e,t){f.#R.unshift([e,t]),f.#c.clear()}static unregisterContentTypeHandler(e){let t=f.#R.findIndex(([a])=>a===e);return t===-1?!1:(f.#R.splice(t,1),f.#c.clear(),!0)}static addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;t&&(f.#h.beforeRequest.push(...t),f.#p.beforeRequest+=t.length),a&&(f.#h.afterResponse.push(...a),f.#p.afterResponse+=a.length),o&&(f.#h.beforeError.push(...o),f.#p.beforeError+=o.length)}static clearHooks(){f.#h={beforeRequest:[],afterResponse:[],beforeError:[]},f.#p.beforeRequest=0,f.#p.afterResponse=0,f.#p.beforeError=0}static unregisterAll(){f.abortAll(),f.#S=new At,f.#d=Object.create(null),f.clearHooks(),f.#E.clear()}get baseUrl(){return this.#e}register(e,t,a){let o=this.#m.subscribe(e,t,a);return this.#l[e]=(this.#l[e]??0)+1,o}unregister(e){let t=this.#m.unsubscribe(e);if(t){let a=e.eventName,o=(this.#l[a]??1)-1;o<=0?delete this.#l[a]:this.#l[a]=o}return t}addHooks(e){let{beforeRequest:t,afterResponse:a,beforeError:o}=e;return t&&(this.#s.beforeRequest.push(...t),this.#f.beforeRequest+=t.length),a&&(this.#s.afterResponse.push(...a),this.#f.afterResponse+=a.length),o&&(this.#s.beforeError.push(...o),this.#f.beforeError+=o.length),this}clearHooks(){return this.#s.beforeRequest.length=0,this.#s.afterResponse.length=0,this.#s.beforeError.length=0,this.#f.beforeRequest=0,this.#f.afterResponse=0,this.#f.beforeError=0,this}configure({headers:e,searchParams:t,hooks:a,...o}){return e&&(f.#I(this.#r.headers,e),this.#o=new Headers(this.#r.headers),this.#o.delete("content-type")),t&&f.#T(this.#r.searchParams,t),Object.assign(this.#r,o),a&&this.addHooks(a),this}destroy(){this.clearHooks(),this.#m.destroy();for(let e in this.#l)delete this.#l[e]}async get(e,t){return this.#i(e,t)}async post(e,t,a){return this.#O("POST",e,t,a)}async put(e,t,a){return this.#O("PUT",e,t,a)}async patch(e,t,a){return this.#O("PATCH",e,t,a)}async delete(e,t,a){return this.#O("DELETE",e,t,a)}async head(e,t){return this.#C(e,t,{method:"HEAD"})}async options(e,t={}){z(e)&&([e,t]=[void 0,e]);let a=this.#w(t,{method:"OPTIONS"}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let c=f.#u(this,e,o.searchParams);await this.#v(o,c,e,s?.beforeRequest);let u=await this.#b(e,a);u=await this.#N(u,o,s?.afterResponse);let d=u.headers.get("allow"),p;if(d){let g=d.split(",");p=new Array(g.length);for(let y=0,T=g.length;y<T;y++)p[y]=g[y].trim()}return this.#a({name:W.SUCCESS,data:p,global:t.global}),i?p:[!0,p]}catch(c){if(!i)return[!1,c];throw c}}async request(e,t={}){z(e)&&([e,t]=[void 0,e]);let a=this.#w(t,{}),o=a.requestOptions.unwrap!==!1;try{let i=await this.#b(e,a);return this.#a({name:W.SUCCESS,data:i,global:t.global}),o?i:[!0,i]}catch(i){if(!o)return[!1,i];throw i}}async getJson(e,t){return this.#i(e,t,{headers:{accept:`${H.JSON}`}},Ye)}async getXml(e,t){let a=z(e)&&!Se(e)?e:t;return this.#i(e,t,{headers:{accept:`${H.XML}`}},za(Nt(a,this.#r)))}async getHtml(e,t,a){let o=z(e)&&!Se(e)?e:t,i=await this.#i(e,t,{headers:{accept:`${H.HTML}`}},Ha(Nt(o,this.#r)));return Array.isArray(i)?i:a&&i?i.querySelector(a):i}async getHtmlFragment(e,t,a){let o=z(e)&&!Se(e)?e:t,i=await this.#i(e,t,{headers:{accept:`${H.HTML}`}},Fa(Nt(o,this.#r)));return Array.isArray(i)?i:a&&i?i.querySelector(a):i}async getScript(e,t){return this.#i(e,t,{headers:{accept:`${H.JAVA_SCRIPT}`}},Ir)}async getStylesheet(e,t){return this.#i(e,t,{headers:{accept:`${H.CSS}`}},xr)}async getBlob(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Pa)}async getImage(e,t){return this.#i(e,t,{headers:{accept:"image/*"}},Lr)}async getBuffer(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},Ma)}async getStream(e,t){return this.#i(e,t,{headers:{accept:"application/octet-stream"}},kr)}async getEventStream(e,t){z(e)&&([e,t]=[void 0,e]);let a=this.#w(t??{},{method:t?.body?"POST":"GET",headers:{accept:`${H.EVENT_STREAM}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let c=f.#u(this,e,o.searchParams);await this.#v(o,c,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:W.SUCCESS,data:d,global:a.global});let p=Ga(d);return i?p:[!0,p]}catch(c){if(!i)return[!1,c];throw c}}async getJsonStream(e,t){z(e)&&([e,t]=[void 0,e]);let a=this.#w(t??{},{method:"GET",headers:{accept:`${H.NDJSON}`}}),{requestOptions:o}=a,i=o.unwrap!==!1,s=o.hooks;try{let c=f.#u(this,e,o.searchParams);await this.#v(o,c,e,s?.beforeRequest);let u=await this.#b(e,a),d=await this.#N(u,o,s?.afterResponse);this.#a({name:W.SUCCESS,data:d,global:a.global});let p=qa(d);return i?p:[!0,p]}catch(c){if(!i)return[!1,c];throw c}}async#i(e,t,a={},o){return a.method="GET",a.body=void 0,this.#C(e,t,a,o)}async#b(e,t){let{signalController:a,requestOptions:o,global:i}=t;f.#g.add(a);let s=f.#H(o.retry),c=o.method??"GET",u=s.limit>0&&s.methods.includes(c),d=o.dedupe===!0&&(c==="GET"||c==="HEAD"),p=performance.now();try{let g=f.#u(this,e,o.searchParams),y;if(d){y=`${c}:${g.href}`;let G=f.#E.get(y);if(G)return(await G).clone()}let T=o.onUploadProgress,b=o.body;T&&b!=null&&(o.duplex="half");let O=this.#U(g,o,e,c,u,s,b,T,p,i);if(d){f.#E.set(y,O);try{return f.#k(await O,o)}finally{f.#E.delete(y)}}return f.#k(await O,o)}finally{if(f.#g.delete(a.destroy()),!o.signal?.aborted){let g=performance.now();this.#a({name:W.COMPLETE,data:{timing:{start:p,end:g,duration:g-p}},global:i}),f.#g.size===0&&this.#a({name:W.ALL_COMPLETE,global:i})}}}async#U(e,t,a,o,i,s,c,u,d,p){let g=0;for(;;)try{u&&await f.#_(t,c,u);let y=await fetch(e,t);if(!y.ok){if(i&&g<s.limit&&s.statusCodes.includes(y.status)){g++,this.#a({name:W.RETRY,data:{attempt:g,status:y.status,method:o,path:a,timing:f.#A(d)},global:p}),await f.#D(s,g);continue}let T;if(t.captureErrorBody!==!1)try{T=await y.text()}catch{}throw await this.#x(a,y,{entity:T,url:e,method:o,timing:f.#A(d)},t)}return y}catch(y){if(y instanceof De)throw y;if(i&&g<s.limit){g++,this.#a({name:W.RETRY,data:{attempt:g,error:y.message,method:o,path:a,timing:f.#A(d)},global:p}),await f.#D(s,g);continue}throw await this.#x(a,void 0,{cause:y,url:e,method:o,timing:f.#A(d)},t)}}static async#_(e,t,a){if(t==null)return;let o=null;if(typeof t=="string")o=new TextEncoder().encode(t);else if(t instanceof Blob)o=new Uint8Array(await t.arrayBuffer());else if(Aa(t))o=new Uint8Array(t);else if(ArrayBuffer.isView(t))o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(!(t instanceof ReadableStream))return;let i=o?o.byteLength:null,s=o?new ReadableStream({start(d){d.enqueue(o),d.close()}}):t,c=0,u=new TransformStream({transform(d,p){c+=d.byteLength,a({loaded:c,total:i,percentage:i!==null&&i>0?Math.round(c/i*100):null}),p.enqueue(d)}});e.body=s.pipeThrough(u)}static#k(e,t){let a=t.onDownloadProgress;if(!a||!e.body)return e;let o=e.headers.get("content-length"),i=o?parseInt(o,10):null,s=0,c=new TransformStream({transform(u,d){s+=u.byteLength,a({loaded:s,total:i,percentage:i!==null&&i>0?Math.round(s/i*100):null}),d.enqueue(u)}});return new Response(e.body.pipeThrough(c),{status:e.status,statusText:e.statusText,headers:e.headers})}static#A(e){let t=performance.now();return{start:e,end:t,duration:t-e}}static#H(e){if(e===void 0)return f.#P;if(typeof e=="number")return{limit:e,statusCodes:Nr,methods:Cr,delay:Ot,backoffFactor:vt};let t=f.#L.get(e);if(t!==void 0)return t;let a={limit:e.limit??0,statusCodes:e.statusCodes??Nr,methods:e.methods??Cr,delay:e.delay??Ot,backoffFactor:e.backoffFactor??vt};return f.#L.set(e,a),a}static#D(e,t){let a=typeof e.delay=="function"?e.delay(t):e.delay*e.backoffFactor**(t-1);return new Promise(o=>setTimeout(o,a))}#O(e,t,a,o,i){let[s,c,u]=Se(t)?[t,a,o]:[void 0,t,a],d=u!==void 0?Object.assign({},u,{body:c,method:e}):{body:c,method:e};return this.#C(s,d,{},i)}async#v(e,t,a,o){let i=f.#h.beforeRequest,s=this.#s.beforeRequest,c=o===void 0?0:o.length;if(i.length===0&&s.length===0&&c===0)return t;for(let u=0,d=i.length;u<d;u++){let p=await i[u](e,t);p&&(Object.assign(e,p),p.searchParams!==void 0&&(t=f.#u(this,a,e.searchParams)))}for(let u=0,d=s.length;u<d;u++){let p=await s[u](e,t);p&&(Object.assign(e,p),p.searchParams!==void 0&&(t=f.#u(this,a,e.searchParams)))}for(let u=0;u<c;u++){let d=await o[u](e,t);d&&(Object.assign(e,d),d.searchParams!==void 0&&(t=f.#u(this,a,e.searchParams)))}return t}async#N(e,t,a){let o=f.#h.afterResponse,i=this.#s.afterResponse,s=a===void 0?0:a.length;if(o.length===0&&i.length===0&&s===0)return e;for(let c=0,u=o.length;c<u;c++){let d=await o[c](e,t);d&&(e=d)}for(let c=0,u=i.length;c<u;c++){let d=await i[c](e,t);d&&(e=d)}for(let c=0;c<s;c++){let u=await a[c](e,t);u&&(e=u)}return e}async#z(e,t){let a=f.#h.beforeError,o=this.#s.beforeError,i=t===void 0?0:t.length;if(a.length===0&&o.length===0&&i===0)return e;for(let s=0,c=a.length;s<c;s++){let u=await a[s](e);u instanceof De&&(e=u)}for(let s=0,c=o.length;s<c;s++){let u=await o[s](e);u instanceof De&&(e=u)}for(let s=0;s<i;s++){let c=await t[s](e);c instanceof De&&(e=c)}return e}async#C(e,t={},a={},o){z(e)&&([e,t]=[void 0,e]);let i=this.#w(t,a),{requestOptions:s}=i,c=s.unwrap!==!1,u=s.hooks;try{let d=f.#u(this,e,s.searchParams);await this.#v(s,d,e,u?.beforeRequest);let p=await this.#b(e,i);p=await this.#N(p,s,u?.afterResponse);try{!o&&p.status!==204&&(o=this.#B(p.headers.get("content-type")));let g=await o?.(p);return this.#a({name:W.SUCCESS,data:g,global:i.global}),c?g:[!0,g]}catch(g){throw await this.#x(e,p,{cause:g},s)}}catch(d){if(!c)return[!1,d];throw d}}static#F({headers:e,searchParams:t,...a},{headers:o,searchParams:i,...s}){return o=f.#I(new Headers,e,o),i=f.#T(new URLSearchParams,t,i),{...Ct(s,a),headers:o,searchParams:i}}static#I(e,...t){for(let a of t)if(a!==void 0)if(a instanceof Headers)a.forEach((o,i)=>e.set(i,o));else if(Array.isArray(a))for(let[o,i]of a)e.set(o,i);else{let o=Object.keys(a);for(let i=0,s=o.length;i<s;i++){let c=o[i],u=a[c];u!==void 0&&e.set(c,u)}}return e}static#T(e,...t){for(let a of t)if(a!==void 0)if(a instanceof URLSearchParams)a.forEach((o,i)=>e.set(i,o));else if(Se(a)||Array.isArray(a))for(let[o,i]of new URLSearchParams(a))e.set(o,i);else{let o=Object.keys(a);for(let i=0;i<o.length;i++){let s=o[i],c=a[s];c!==void 0&&e.set(s,typeof c=="string"?c:String(c))}}return e}#w(e,t){let a=e.headers,o=e.searchParams,i=e.body,s=t.headers,c=t.searchParams,u=t.method??e.method??this.#r.method??"GET",d=wa(u),p;!d&&a===void 0&&s===void 0?p=new Headers(this.#o):(p=new Headers(this.#r.headers),(a!==void 0||s!==void 0)&&f.#I(p,a,s));let g=this.#r.searchParams,y=g!==void 0&&g.size>0,T;!y&&o===void 0&&c===void 0?T=new URLSearchParams:(T=new URLSearchParams(g),(o!==void 0||c!==void 0)&&f.#T(T,o,c));let b=Object.assign({},this.#r,e,t);if(b.headers=p,b.searchParams=T,d)if(Sa(i))b.body=i,p.delete("content-type");else{let A=this.#r.body,q=z(A)&&z(i)?Ct(A,i):i!==void 0?i:A,L=p.get("content-type"),ee=L!==null&&L.includes("json");b.body=ee&&z(q)?Ra(q):q}else b.body instanceof URLSearchParams&&f.#T(T,b.body),b.body=void 0,(a!==void 0||s!==void 0)&&p.delete("content-type");let O=b.signal,G=b.timeout,P=b.global??!1,Y=b.xsrf;if(Y){let{cookieName:A,headerName:q}=typeof Y=="object"?Y:{},L=Ea(A??ua);L&&p.set(q??ha,L)}let $=new Ta({signal:O,timeout:G}).onAbort(A=>this.#a({name:W.ABORTED,event:A,global:P})).onTimeout(A=>this.#a({name:W.TIMEOUT,event:A,global:P}));return b.signal=$.signal,this.#a({name:W.CONFIGURED,data:b,global:P}),{signalController:$,requestOptions:b,global:P}}static#j(e){if(e instanceof URL)return e;if(!Se(e))throw new TypeError("Invalid URL");return new URL(e,e.startsWith("/")?globalThis.location.origin:void 0)}static#G(e){if(e===null)return;let t=f.#y.get(e);return t!==void 0||(t=Pr.parse(e)??void 0,t!==void 0&&(f.#y.size>=100&&f.#y.delete(f.#y.keys().next().value),f.#y.set(e,t))),t}static#u(e,t,a){let o;if(e instanceof URL){let i=e.pathname,s=i.charCodeAt(i.length-1)===47?i.slice(0,-1):i;o=t?new URL(`${s}${t}`,e.origin):new URL(e)}else o=t?new URL(`${e.#n}${t}`,e.#t):new URL(e.#e);return a&&f.#T(o.searchParams,a),o}static#q(e,{status:t,statusText:a}=new Response){switch(e){case Pe.ABORT:return ya;case Pe.TIMEOUT:return ba;default:return t>=400?new Je(t,a):ga}}async#x(e,t,{cause:a,entity:o,url:i,method:s,timing:c}={},u){let d=s&&i?`${s} ${i.href} failed${t?` with status ${t.status}`:""}`:`An error has occurred with your request to: '${e}'`,p=new De(f.#q(a?.name,t),{message:d,cause:a,entity:o,url:i,method:s,timing:c});return p=await this.#z(p,u?.hooks?.beforeError),this.#a({name:W.ERROR,data:p}),p}#a({name:e,event:t,data:a,global:o=!0}){let i=o&&(f.#d[e]??0)>0,s=(this.#l[e]??0)>0;if(!i&&!s)return;let c=t??new CustomEvent(e);i&&f.#S.publish(e,c,a),s&&this.#m.publish(e,c,a)}#B(e){if(!e)return;let t=f.#c.get(e);if(t!==void 0)return t===null?void 0:t;let a=f.#G(e);if(!a){f.#c.set(e,null);return}let o=f.#R;for(let s=0,c=o.length;s<c;s++){let u=o[s];if(a.matches(u[0])){let d=u[1];return f.#c.set(e,d),d}}let i=a.subtype;if(i.endsWith("+json"))return f.#c.set(e,Ye),Ye;if(i.endsWith("+xml"))return f.#c.set(e,Xe),Xe;f.#c.set(e,null)}get[Symbol.toStringTag](){return"Transportr"}};
11
+ Object.assign(globalThis, { Transportr: Wa });
12
12
  })();
13
13
  /*! Bundled license information:
14
14
 
15
15
  dompurify/dist/purify.es.mjs:
16
- (*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE *)
16
+ (*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE *)
17
17
  */
18
18
 
19
19
  //# sourceMappingURL=transportr.js.map