!function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e={};({get exports(){return e},set exports(t){e=t}}).exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",c="week",u="month",s="quarter",f="year",p="date",h="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},b={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function t(e,n){if(e.date()1)return t(i[0])}else{var l=e.name;w[l]=e,o=l}return!r&&o&&(y=o),o||!r&&y},x=function(t,e){if($(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},k=b;k.l=M,k.i=$,k.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function m(t){this.$L=M(t.locale,null,!0),this.parse(t)}var v=m.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(d);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return t;const r=Array.isArray(e)?e:e.split(".");let o=t;for(let t=0;t{const n=e.prototype,r=n.format;n.format=function(t){const e=t||"YYYY-MM-DDTHH:mm:ssZ",n=this.$locale().seasonSeparator||"-",o=e.replace(/(\[[^\]]+])|BB|B/g,((t,e)=>{const r=this.$y,o=r+1,a="B"===t,i=a?[String(r).slice(-2),2]:[r,4],l=[String(o).slice(-2),2];return e||"".concat(a?"'":"").concat(this.$utils().s(...i,"0")).concat(n).concat(a?"'":"").concat(this.$utils().s(...l,"0"))}));return r.bind(this)(o)}};const a=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,i=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/;var l=t=>{if(t.match(a)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(i)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);const e=parseInt(t,16);return[e>>24&255,e>>16&255,e>>8&255,Math.round((255&e)/255*100)/100]}throw new Error("unknown hex color: ".concat(t))},c=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return tn?n:t};const u=c;const s={};for(let t of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])s["[object ".concat(t,"]")]=t.toLowerCase();var f=function(t){return s[Object.prototype.toString.call(t)]||"object"};const p=f;const h=f;const d=Math.PI;var g={clip_rgb:t=>{t._clipped=!1,t._unclipped=t.slice(0);for(let e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=u(t[e],0,255)):3===e&&(t[e]=u(t[e],0,1));return t},limit:c,type:f,unpack:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.length>=3?Array.prototype.slice.call(t):"object"==p(t[0])&&e?e.split("").filter((e=>void 0!==t[0][e])).map((e=>t[0][e])):t[0]},last:t=>{if(t.length<2)return null;const e=t.length-1;return"string"==h(t[e])?t[e].toLowerCase():null},PI:d,TWOPI:2*d,PITHIRD:d/3,DEG2RAD:d/180,RAD2DEG:180/d};const m={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{unpack:v}=g,{pow:b}=Math,y=t=>(t/=255)<=.04045?t/12.92:b((t+.055)/1.055,2.4),w=t=>t>m.t3?b(t,1/3):t/m.t2+m.t0,$=(t,e,n)=>{t=y(t),e=y(e),n=y(n);return[w((.4124564*t+.3575761*e+.1804375*n)/m.Xn),w((.2126729*t+.7151522*e+.072175*n)/m.Yn),w((.0193339*t+.119192*e+.9503041*n)/m.Zn)]};var M=function(){for(var t=arguments.length,e=new Array(t),n=0;n1?e-1:0),r=1;ro.unsubscribe():o}function j(t,e,n){t.$$.on_destroy.push(C(e,n))}function T(t,e,n,r){if(t){const o=L(t,e,n,r);return t[0](o)}}function L(t,e,n,r){return t[1]&&r?A(n.ctx.slice(),t[1](r(e))):n.ctx}function R(t,e,n,r){if(t[2]&&r){const o=t[2](r(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let r=0;r32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function Q(t){return function(e){e.target===this&&t.call(this,e)}}function K(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function tt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)null==e[r]?t.removeAttribute(r):"style"===r?t.style.cssText=e[r]:"__value"===r?t.value=t[r]=e[r]:n[r]&&n[r].set?t[r]=e[r]:K(t,r,e[r])}function et(t,e){for(const n in e)K(t,n,e[n])}function nt(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function rt(t,e){t.value=null==e?"":e}function ot(t,e,n,r){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function at(t,e,n){t.classList[n?"add":"remove"](e)}class it{constructor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.e||(this.is_svg?this.e=G(e.nodeName):this.e=W(e.nodeName),this.t=e,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:{};const o=t.$$.callbacks[e];if(o){const a=function(t,e){let{bubbles:n=!1,cancelable:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}(e,n,{cancelable:r});return o.slice().forEach((e=>{e.call(t,a)})),!a.defaultPrevented}return!0}}function ht(t){return ut().$$.context.get(t)}function dt(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const gt=[],mt=[],vt=[],bt=[],yt=Promise.resolve();let wt=!1;function $t(){wt||(wt=!0,yt.then(At))}function Mt(){return $t(),yt}function xt(t){vt.push(t)}function kt(t){bt.push(t)}const _t=new Set;let St=0;function At(){if(0!==St)return;const t=lt;do{try{for(;St{Nt.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function Tt(t,e){const n={},r={},o={$$scope:1};let a=t.length;for(;a--;){const i=t[a],l=e[a];if(l){for(const t in i)t in l||(r[t]=1);for(const t in l)o[t]||(n[t]=l[t],o[t]=1);t[a]=l}else for(const t in i)o[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}function Lt(t){return"object"==typeof t&&null!==t?t:{}}function Rt(t,e,n){const r=t.$$.props[e];void 0!==r&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Bt(t){t&&t.c()}function It(t,e,n,r){const{fragment:o,after_update:a}=t.$$;o&&o.m(e,n),r||xt((()=>{const e=t.$$.on_mount.map(Y).filter(O);t.$$.on_destroy?t.$$.on_destroy.push(...e):E(e),t.$$.on_mount=[]})),a.forEach(xt)}function Ft(t,e){const n=t.$$;null!==n.fragment&&(E(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function zt(t,e,n,r,o,a,i){let l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1];const c=lt;ct(t);const u=t.$$={fragment:null,ctx:[],props:a,update:S,not_equal:o,bound:N(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:N(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};i&&i(u.root);let s=!1;if(u.ctx=n?n(t,e.props||{},(function(e,n){const r=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:n;return u.ctx&&o(u.ctx[e],u.ctx[e]=r)&&(!u.skip_bound&&u.bound[e]&&u.bound[e](r),s&&function(t,e){-1===t.$$.dirty[0]&&(gt.push(t),$t(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var Ht="1.13.6",Ut="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},qt=Array.prototype,Wt=Object.prototype,Gt="undefined"!=typeof Symbol?Symbol.prototype:null,Vt=qt.push,Zt=qt.slice,Jt=Wt.toString,Xt=Wt.hasOwnProperty,Qt="undefined"!=typeof ArrayBuffer,Kt="undefined"!=typeof DataView,te=Array.isArray,ee=Object.keys,ne=Object.create,re=Qt&&ArrayBuffer.isView,oe=isNaN,ae=isFinite,ie=!{toString:null}.propertyIsEnumerable("toString"),le=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ce=Math.pow(2,53)-1;function ue(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),o=0;o=0&&n<=ce}}function Re(t){return function(e){return null==e?void 0:e[t]}}var Be=Re("byteLength"),Ie=Le(Be),Fe=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var ze=Qt?function(t){return re?re(t)&&!Ye(t):Ie(t)&&Fe.test(Jt.call(t))}:Te(!1),Pe=Re("length");function He(t,e){e=function(t){for(var e={},n=t.length,r=0;r":">",'"':""","'":"'","`":"`"},Tn=Cn(jn),Ln=Cn(pn(jn)),Rn=We.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Bn=/(.)^/,In={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Fn=/\\|'|\r|\n|\u2028|\u2029/g;function zn(t){return"\\"+In[t]}var Pn=/^\s*(\w|\$)+\s*$/;var Hn=0;function Un(t,e,n,r,o){if(!(r instanceof e))return t.apply(n,o);var a=bn(t.prototype),i=t.apply(a,o);return se(i)?i:a}var qn=ue((function(t,e){var n=qn.placeholder,r=function(){for(var o=0,a=e.length,i=Array(a),l=0;l1)Vn(l,e-1,n,r),o=r.length;else for(var c=0,u=l.length;c0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}var tr=qn(Kn,2);function er(t,e,n){e=Nn(e,n);for(var r,o=Ue(t),a=0,i=o.length;a0?0:o-1;a>=0&&a0?i=a>=0?a:Math.max(a+l,i):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=e(Zt.call(r,i,l),je))>=0?a+i:-1;for(a=t>0?i:l-1;a>=0&&a0?0:i-1;for(o||(r=e[a?a[l]:l],l+=t);l>=0&&l=3;return e(t,Sn(n,o,4),r,a)}}var hr=pr(1),dr=pr(-1);function gr(t,e,n){var r=[];return e=Nn(e,n),sr(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function mr(t,e,n){e=Nn(e,n);for(var r=!Gn(t)&&Ue(t),o=(r||t).length,a=0;a=0}var yr=ue((function(t,e,n){var r,o;return xe(e)?o=e:(e=wn(e),r=e.slice(0,-1),e=e[e.length-1]),fr(t,(function(t){var a=o;if(!a){if(r&&r.length&&(t=$n(t,r)),null==t)return;a=t[e]}return null==a?a:a.apply(t,n)}))}));function wr(t,e){return fr(t,_n(e))}function $r(t,e,n){var r,o,a=-1/0,i=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var l=0,c=(t=Gn(t)?t:fn(t)).length;la&&(a=r);else e=Nn(e,n),sr(t,(function(t,n,r){((o=e(t,n,r))>i||o===-1/0&&a===-1/0)&&(a=t,i=o)}));return a}var Mr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function xr(t){return t?Ne(t)?Zt.call(t):de(t)?t.match(Mr):Gn(t)?fr(t,xn):fn(t):[]}function kr(t,e,n){if(null==e||n)return Gn(t)||(t=fn(t)),t[On(t.length-1)];var r=xr(t),o=Pe(r);e=Math.max(Math.min(e,o),0);for(var a=o-1,i=0;i1&&(r=Sn(r,e[1])),e=Qe(t)):(r=Er,e=Vn(e,!1,!1),t=Object(t));for(var o=0,a=e.length;o1&&(n=e[1])):(e=fr(Vn(e,!1,!1),String),r=function(t,n){return!br(e,n)}),Or(t,r,n)}));function Cr(t,e,n){return Zt.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function jr(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Cr(t,t.length-e)}function Tr(t,e,n){return Zt.call(t,null==e||n?1:e)}var Lr=ue((function(t,e){return e=Vn(e,!0,!0),gr(t,(function(t){return!br(e,t)}))})),Rr=ue((function(t,e){return Lr(t,e)}));function Br(t,e,n,r){pe(e)||(r=n,n=e,e=!1),null!=n&&(n=Nn(n,r));for(var o=[],a=[],i=0,l=Pe(t);ie?(r&&(clearTimeout(r),r=null),l=u,i=t.apply(o,a),r||(o=a=null)):r||!1===n.trailing||(r=setTimeout(c,s)),i};return u.cancel=function(){clearTimeout(r),l=0,r=o=a=null},u},debounce:function(t,e,n){var r,o,a,i,l,c=function(){var u=Dn()-o;e>u?r=setTimeout(c,e-u):(r=null,n||(i=t.apply(l,a)),r||(a=l=null))},u=ue((function(u){return l=this,a=u,o=Dn(),r||(r=setTimeout(c,e),n&&(i=t.apply(l,a))),i}));return u.cancel=function(){clearTimeout(r),r=a=l=null},u},wrap:function(t,e){return qn(e,t)},negate:Qn,compose:function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},after:function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},before:Kn,once:tr,findKey:er,findIndex:rr,findLastIndex:or,sortedIndex:ar,indexOf:lr,lastIndexOf:cr,find:ur,detect:ur,findWhere:function(t,e){return ur(t,kn(e))},each:sr,forEach:sr,map:fr,collect:fr,reduce:hr,foldl:hr,inject:hr,reduceRight:dr,foldr:dr,filter:gr,select:gr,reject:function(t,e,n){return gr(t,Qn(Nn(e)),n)},every:mr,all:mr,some:vr,any:vr,contains:br,includes:br,include:br,invoke:yr,pluck:wr,where:function(t,e){return gr(t,kn(e))},max:$r,min:function(t,e,n){var r,o,a=1/0,i=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var l=0,c=(t=Gn(t)?t:fn(t)).length;lr||void 0===n)return 1;if(nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?n-1:0),o=1;o/gm),J=m(/\${[\w\W]*}/gm),X=m(/^data-[\-\w.\u00B7-\uFFFF]/),Q=m(/^aria-[\-\w]+$/),K=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=m(/^(?:\w+script|data):/i),et=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=m(/^html$/i),rt=function(){return"undefined"==typeof window?null:window},ot=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt(),n=function(t){return at(t)};if(n.version="2.4.4",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,a=e.document,i=e.DocumentFragment,l=e.HTMLTemplateElement,c=e.Node,u=e.Element,s=e.NodeFilter,f=e.NamedNodeMap,p=void 0===f?e.NamedNodeMap||e.MozNamedAttrMap:f,h=e.HTMLFormElement,d=e.DOMParser,m=e.trustedTypes,v=u.prototype,b=L(v,"cloneNode"),y=L(v,"nextSibling"),w=L(v,"childNodes"),D=L(v,"parentNode");if("function"==typeof l){var C=a.createElement("template");C.content&&C.content.ownerDocument&&(a=C.content.ownerDocument)}var it=ot(m,r),lt=it?it.createHTML(""):"",ct=a,ut=ct.implementation,st=ct.createNodeIterator,ft=ct.createDocumentFragment,pt=ct.getElementsByTagName,ht=r.importNode,dt={};try{dt=T(a).documentMode?a.documentMode:{}}catch(t){}var gt={};n.isSupported="function"==typeof D&&ut&&void 0!==ut.createHTMLDocument&&9!==dt;var mt,vt,bt=V,yt=Z,wt=J,$t=X,Mt=Q,xt=tt,kt=et,_t=K,St=null,At=j({},[].concat(o(R),o(B),o(I),o(z),o(H))),Yt=null,Nt=j({},[].concat(o(U),o(q),o(W),o(G))),Et=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ot=null,Dt=null,Ct=!0,jt=!0,Tt=!1,Lt=!0,Rt=!1,Bt=!1,It=!1,Ft=!1,zt=!1,Pt=!1,Ht=!1,Ut=!0,qt=!1,Wt="user-content-",Gt=!0,Vt=!1,Zt={},Jt=null,Xt=j({},["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"]),Qt=null,Kt=j({},["audio","video","img","source","image","track"]),te=null,ee=j({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ne="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",oe="http://www.w3.org/1999/xhtml",ae=oe,ie=!1,le=null,ce=j({},[ne,re,oe],_),ue=["application/xhtml+xml","text/html"],se="text/html",fe=null,pe=a.createElement("form"),he=function(t){return t instanceof RegExp||t instanceof Function},de=function(e){fe&&fe===e||(e&&"object"===t(e)||(e={}),e=T(e),mt=mt=-1===ue.indexOf(e.PARSER_MEDIA_TYPE)?se:e.PARSER_MEDIA_TYPE,vt="application/xhtml+xml"===mt?_:k,St="ALLOWED_TAGS"in e?j({},e.ALLOWED_TAGS,vt):At,Yt="ALLOWED_ATTR"in e?j({},e.ALLOWED_ATTR,vt):Nt,le="ALLOWED_NAMESPACES"in e?j({},e.ALLOWED_NAMESPACES,_):ce,te="ADD_URI_SAFE_ATTR"in e?j(T(ee),e.ADD_URI_SAFE_ATTR,vt):ee,Qt="ADD_DATA_URI_TAGS"in e?j(T(Kt),e.ADD_DATA_URI_TAGS,vt):Kt,Jt="FORBID_CONTENTS"in e?j({},e.FORBID_CONTENTS,vt):Xt,Ot="FORBID_TAGS"in e?j({},e.FORBID_TAGS,vt):{},Dt="FORBID_ATTR"in e?j({},e.FORBID_ATTR,vt):{},Zt="USE_PROFILES"in e&&e.USE_PROFILES,Ct=!1!==e.ALLOW_ARIA_ATTR,jt=!1!==e.ALLOW_DATA_ATTR,Tt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Lt=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Rt=e.SAFE_FOR_TEMPLATES||!1,Bt=e.WHOLE_DOCUMENT||!1,zt=e.RETURN_DOM||!1,Pt=e.RETURN_DOM_FRAGMENT||!1,Ht=e.RETURN_TRUSTED_TYPE||!1,Ft=e.FORCE_BODY||!1,Ut=!1!==e.SANITIZE_DOM,qt=e.SANITIZE_NAMED_PROPS||!1,Gt=!1!==e.KEEP_CONTENT,Vt=e.IN_PLACE||!1,_t=e.ALLOWED_URI_REGEXP||_t,ae=e.NAMESPACE||oe,e.CUSTOM_ELEMENT_HANDLING&&he(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Et.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&he(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Et.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Et.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Rt&&(jt=!1),Pt&&(zt=!0),Zt&&(St=j({},o(H)),Yt=[],!0===Zt.html&&(j(St,R),j(Yt,U)),!0===Zt.svg&&(j(St,B),j(Yt,q),j(Yt,G)),!0===Zt.svgFilters&&(j(St,I),j(Yt,q),j(Yt,G)),!0===Zt.mathMl&&(j(St,z),j(Yt,W),j(Yt,G))),e.ADD_TAGS&&(St===At&&(St=T(St)),j(St,e.ADD_TAGS,vt)),e.ADD_ATTR&&(Yt===Nt&&(Yt=T(Yt)),j(Yt,e.ADD_ATTR,vt)),e.ADD_URI_SAFE_ATTR&&j(te,e.ADD_URI_SAFE_ATTR,vt),e.FORBID_CONTENTS&&(Jt===Xt&&(Jt=T(Jt)),j(Jt,e.FORBID_CONTENTS,vt)),Gt&&(St["#text"]=!0),Bt&&j(St,["html","head","body"]),St.table&&(j(St,["tbody"]),delete Ot.tbody),g&&g(e),fe=e)},ge=j({},["mi","mo","mn","ms","mtext"]),me=j({},["foreignobject","desc","title","annotation-xml"]),ve=j({},["title","style","font","a","script"]),be=j({},B);j(be,I),j(be,F);var ye=j({},z);j(ye,P);var we=function(t){var e=D(t);e&&e.tagName||(e={namespaceURI:ae,tagName:"template"});var n=k(t.tagName),r=k(e.tagName);return!!le[t.namespaceURI]&&(t.namespaceURI===re?e.namespaceURI===oe?"svg"===n:e.namespaceURI===ne?"svg"===n&&("annotation-xml"===r||ge[r]):Boolean(be[n]):t.namespaceURI===ne?e.namespaceURI===oe?"math"===n:e.namespaceURI===re?"math"===n&&me[r]:Boolean(ye[n]):t.namespaceURI===oe?!(e.namespaceURI===re&&!me[r])&&!(e.namespaceURI===ne&&!ge[r])&&!ye[n]&&(ve[n]||!be[n]):!("application/xhtml+xml"!==mt||!le[t.namespaceURI]))},$e=function(t){x(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=lt}catch(e){t.remove()}}},Me=function(t,e){try{x(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){x(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Yt[t])if(zt||Pt)try{$e(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},xe=function(t){var e,n;if(Ft)t=""+t;else{var r=S(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===mt&&ae===oe&&(t=''+t+"");var o=it?it.createHTML(t):t;if(ae===oe)try{e=(new d).parseFromString(o,mt)}catch(t){}if(!e||!e.documentElement){e=ut.createDocument(ae,"template",null);try{e.documentElement.innerHTML=ie?lt:o}catch(t){}}var i=e.body||e.documentElement;return t&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),ae===oe?pt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:i},ke=function(t){return st.call(t.ownerDocument||t,t,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT,null,!1)},_e=function(t){return t instanceof h&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof p)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Se=function(e){return"object"===t(c)?e instanceof c:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ae=function(t,e,r){gt[t]&&$(gt[t],(function(t){t.call(n,e,r,fe)}))},Ye=function(t){var e;if(Ae("beforeSanitizeElements",t,null),_e(t))return $e(t),!0;if(E(/[\u0080-\uFFFF]/,t.nodeName))return $e(t),!0;var r=vt(t.nodeName);if(Ae("uponSanitizeElement",t,{tagName:r,allowedTags:St}),t.hasChildNodes()&&!Se(t.firstElementChild)&&(!Se(t.content)||!Se(t.content.firstElementChild))&&E(/<[/\w]/g,t.innerHTML)&&E(/<[/\w]/g,t.textContent))return $e(t),!0;if("select"===r&&E(/