var ko="2.1.16";var Rt="[data-trix-attachment]",yi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},z={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return $i(i.parentNode)===z[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return $i(i.parentNode)===z[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},$i=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},tr=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Ln=tr&&parseInt(tr[1]),Se={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Ln&&Ln>12,samsungAndroid:Ln&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Ro={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"},Nr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},Do=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Br={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),o=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(o," ").concat(Do[e])}}},fn="\uFEFF",bt="\xA0",Ai="\uFFFC",_r=function(i){for(let t in i){let e=i[t];this[t]=e}return this},xi=document.documentElement,Lo=xi.matches,C=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||xi,c=e,d=r==="capturing",g=function(x){s!=null&&--s===0&&g.destroy();let T=vt(x.target,{matchingSelector:c});T!=null&&(n?.call(T,x,T),o&&x.preventDefault())};return g.destroy=()=>l.removeEventListener(i,g,d),l.addEventListener(i,g,d),g},Oo=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.times=1,C(i,t)},jr=function(i){let{bubbles:t,cancelable:e,attributes:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t=t!==!1,e=e!==!1;let r=document.createEvent("Events");return r.initEvent(i,t,e),n!=null&&_r.call(r,n),r},me=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??xi,s=jr(i,{bubbles:e,cancelable:n,attributes:r});return o.dispatchEvent(s)},Wr=function(i,t){if(i?.nodeType===1)return Lo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null)if(t!=null){if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Wr(i,t))return i;i=i.parentNode}}else return i},Po=function(i){for(;(t=i)!==null&&t!==void 0&&t.firstElementChild;){var t;i=i.firstElementChild}return i},Ei=i=>document.activeElement!==i&&kt(i,document.activeElement),kt=function(i,t){if(!(!i||!t))for(;t;){if(t===i)return!0;t=t.parentNode}};var On=function(i){var t;if(!((t=i)!==null&&t!==void 0&&t.parentNode))return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},yt=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},He=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},W=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e,n;typeof i=="object"?(t=i,i=t.tagName):t={attributes:t};let r=document.createElement(i);if(t.editable!=null&&(t.attributes==null&&(t.attributes={}),t.attributes.contenteditable=t.editable),t.attributes)for(e in t.attributes)n=t.attributes[e],r.setAttribute(e,n);if(t.style)for(e in t.style)n=t.style[e],r.style[e]=n;if(t.data)for(e in t.data)n=t.data[e],r.dataset[e]=n;return t.className&&t.className.split(" ").forEach(o=>{r.classList.add(o)}),t.textContent&&(r.textContent=t.textContent),t.childNodes&&[].concat(t.childNodes).forEach(o=>{r.appendChild(o)}),r},se,pe=function(){if(se!=null)return se;se=[];for(let i in z){let t=z[i];t.tagName&&se.push(t.tagName)}return se},Pn=i=>Gt(i?.firstChild),Io=function(i){return pe().includes(W(i))&&!pe().includes(W(i.firstChild))},er=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?Gt(i):Gt(i)||!Gt(i.firstChild)&&Io(i)},Gt=i=>Mo(i)&&i?.data==="block",Mo=i=>i?.nodeType===Node.COMMENT_NODE,Kt=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!!i)if(be(i)){if(i.data===fn)return t?i.parentNode.dataset.trixCursorTarget===t:!0}else return Kt(i.firstChild)},Dt=i=>Wr(i,Rt),zr=i=>be(i)&&i?.data==="",be=i=>i?.nodeType===Node.TEXT_NODE,wi={level2Enabled:!0,getLevel(){return this.level2Enabled&&Se.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),yt(t)}),yt(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Fo={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"},ze={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:`
`},Lt={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser(i){return window.getComputedStyle(i).fontStyle==="italic"}},href:{groupTagName:"a",parser(i){let t="a:not(".concat(Rt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Ur={getDefaultHTML(){return`
`)}},ii={interval:5e3},Te=Object.freeze({__proto__:null,attachments:yi,blockAttributes:z,browser:Se,css:Ro,dompurify:Nr,fileSize:Br,input:wi,keyNames:Fo,lang:m,parser:ze,textAttributes:Lt,toolbar:Ur,undo:ii}),S=class{static proxyMethod(t){let{name:e,toMethod:n,toProperty:r,optional:o}=No(t);this.prototype[e]=function(){let s,l;if(n)if(o){var c;l=(c=this[n])===null||c===void 0?void 0:c.call(this)}else l=this[n]();else r&&(l=this[r]);if(o){var d;if(s=(d=l)===null||d===void 0?void 0:d[e],s)return nr.call(s,l,arguments)}else return s=l[e],nr.call(s,l,arguments)}}},No=function(i){let t=i.match(Bo);if(!t)throw new Error("can't parse @proxyMethod expression: ".concat(i));let e={name:t[4]};return t[2]!=null?e.toMethod=t[1]:e.toProperty=t[1],t[3]!=null&&(e.optional=!0),e},{apply:nr}=Function.prototype,Bo=new RegExp("^(.+?)(\\(\\))?(\\?)?\\.(.+?)$"),In,Mn,ir,Fn,Ot=class extends S{static box(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t instanceof this?t:this.fromUCS2String(t?.toString())}static fromUCS2String(t){return new this(t,qe(t))}static fromCodepoints(t){return new this(Ge(t),t)}constructor(t,e){super(...arguments),this.ucs2String=t,this.codepoints=e,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}offsetToUCS2Offset(t){return Ge(this.codepoints.slice(0,Math.max(0,t))).length}offsetFromUCS2Offset(t){return qe(this.ucs2String.slice(0,Math.max(0,t))).length}slice(){return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))}charAt(t){return this.slice(t,t+1)}isEqualTo(t){return this.constructor.box(t).ucs2String===this.ucs2String}toJSON(){return this.ucs2String}getCacheKey(){return this.ucs2String}toString(){return this.ucs2String}},_o=((In=Array.from)===null||In===void 0?void 0:In.call(Array,"\u{1F47C}").length)===1,jo=((Mn=(ir=" ").codePointAt)===null||Mn===void 0?void 0:Mn.call(ir,0))!=null,Wo=((Fn=String.fromCodePoint)===null||Fn===void 0?void 0:Fn.call(String,32,128124))===" \u{1F47C}",qe,Ge;_o&&jo?qe=i=>Array.from(i).map(t=>t.codePointAt(0)):qe=function(i){let t=[],e=0,{length:n}=i;for(;eString.fromCodePoint(...Array.from(i||[])):Ge=function(i){return(()=>{let e=[];return Array.from(i).forEach(n=>{let r="";n>65535&&(n-=65536,r+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023),e.push(r+String.fromCharCode(n))}),e})().join("")};var zo=0,dt=class extends S{static fromJSONString(t){return this.fromJSON(JSON.parse(t))}constructor(){super(...arguments),this.id=++zo}hasSameConstructorAs(t){return this.constructor===t?.constructor}isEqualTo(t){return this===t}inspect(){let t=[],e=this.contentsForInspection()||{};for(let n in e){let r=e[n];t.push("".concat(n,"=").concat(r))}return"#<".concat(this.constructor.name,":").concat(this.id).concat(t.length?" ".concat(t.join(", ")):"",">")}contentsForInspection(){}toJSONString(){return JSON.stringify(this)}toUTF16String(){return Ot.box(this)}getCacheKey(){return this.id.toString()}},Pt=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(i.length!==t.length)return!1;for(let e=0;e0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Pt(i.slice(0,t.length),t)},Ci=function(i){let t=i.slice(0);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],e=[],n=[],r=new Set;i.forEach(s=>{r.add(s)});let o=new Set;return t.forEach(s=>{o.add(s),r.has(s)||e.push(s)}),i.forEach(s=>{o.has(s)||n.push(s)}),{added:e,removed:n}},Ho=/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,qo=function(){let i=p("input",{dir:"auto",name:"x",dirName:"x.dir"}),t=p("textarea",{dir:"auto",name:"y",dirName:"y.dir"}),e=p("form");e.appendChild(i),e.appendChild(t);let n=function(){try{return new FormData(e).has(t.dirName)}catch{return!1}}(),r=function(){try{return i.matches(":dir(ltr),:dir(rtl)")}catch{return!1}}();return n?function(o){return t.value=o,new FormData(e).get(t.dirName)}:r?function(o){return i.value=o,i.matches(":dir(rtl)")?"rtl":"ltr"}:function(o){let s=o.trim().charAt(0);return Ho.test(s)?"rtl":"ltr"}}(),Nn=null,Bn=null,_n=null,Me=null,ri=()=>(Nn||(Nn=Ko().concat(Go())),Nn),D=i=>z[i],Go=()=>(Bn||(Bn=Object.keys(z)),Bn),oi=i=>Lt[i],Ko=()=>(_n||(_n=Object.keys(Lt)),_n),Jo=()=>{if(!Me){Me=[];for(let i in z){let{listAttribute:t}=z[i];t!=null&&Me.push(t)}}return Me},Vr=function(i,t){let e=Yo(i);e.textContent=t.replace(/%t/g,i)},Yo=function(i){let t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("data-tag-name",i.toLowerCase());let e=Xo();return e&&t.setAttribute("nonce",e),document.head.insertBefore(t,document.head.firstChild),t},Xo=function(){let i=rr("trix-csp-nonce")||rr("csp-nonce");if(i){let{nonce:t,content:e}=i;return t==""?e:t}},rr=i=>document.head.querySelector("meta[name=".concat(i,"]")),or={"application/x-trix-feature-detection":"test"},Hr=function(i){let t=i.getData("text/plain"),e=i.getData("text/html");if(t&&e){let{body:n}=new DOMParser().parseFromString(e,"text/html");if(n.textContent===t)return!n.querySelector("*")}else return t?.length},Zo=i=>{let{dataTransfer:t}=i;return t.types.includes("Files")&&t.types.includes("text/html")&&t.getData("text/html").includes("urn:schemas-microsoft-com:office:office")},Qo=function(i){if(!(i!=null&&i.setData))return!1;for(let t in or){let e=or[t];try{if(i.setData(t,e),!i.getData(t)===e)return!1}catch{return!1}}return!0},qr=function(){return/Mac|^iP/.test(navigator.platform)?i=>i.metaKey:i=>i.ctrlKey}();function $o(i){return/iPhone|iPad/.test(navigator.userAgent)?!i.inputType||i.inputType==="insertParagraph":!1}var Si=i=>setTimeout(i,1),Gr=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};for(let e in i){let n=i[e];t[e]=n}return t},ee=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Object.keys(i).length!==Object.keys(t).length)return!1;for(let e in i)if(i[e]!==t[e])return!1;return!0},A=function(i){if(i!=null)return Array.isArray(i)||(i=[i,i]),[sr(i[0]),sr(i[1]!=null?i[1]:i[0])]},ut=function(i){if(i==null)return;let[t,e]=A(i);return si(t,e)},gn=function(i,t){if(i==null||t==null)return;let[e,n]=A(i),[r,o]=A(t);return si(e,r)&&si(n,o)},sr=function(i){return typeof i=="number"?i:Gr(i)},si=function(i,t){return typeof i=="number"?i===t:ee(i,t)},Ke=class extends S{constructor(){super(...arguments),this.update=this.update.bind(this),this.selectionManagers=[]}start(){this.started||(this.started=!0,document.addEventListener("selectionchange",this.update,!0))}stop(){if(this.started)return this.started=!1,document.removeEventListener("selectionchange",this.update,!0)}registerSelectionManager(t){if(!this.selectionManagers.includes(t))return this.selectionManagers.push(t),this.start()}unregisterSelectionManager(t){if(this.selectionManagers=this.selectionManagers.filter(e=>e!==t),this.selectionManagers.length===0)return this.stop()}notifySelectionManagersOfSelectionChange(){return this.selectionManagers.map(t=>t.selectionDidChange())}update(){this.notifySelectionManagersOfSelectionChange()}reset(){this.update()}},It=new Ke,Kr=function(){let i=window.getSelection();if(i.rangeCount>0)return i},ve=function(){var i;let t=(i=Kr())===null||i===void 0?void 0:i.getRangeAt(0);if(t&&!ts(t))return t},Jr=function(i){let t=window.getSelection();return t.removeAllRanges(),t.addRange(i),It.update()},ts=i=>ar(i.startContainer)||ar(i.endContainer),ar=i=>!Object.getPrototypeOf(i),ge=i=>i.replace(new RegExp("".concat(fn),"g"),"").replace(new RegExp("".concat(bt),"g")," "),es=i=>i.replace(/\r\n?/g,`
`),Ti=new RegExp("[^\\S".concat(bt,"]")),ki=i=>i.replace(new RegExp("".concat(Ti.source),"g")," ").replace(/\ {2,}/g," "),ns=function(i,t){let e,n;return i=Ot.box(i),t=Ot.box(t),t.lengthe+1&&i.charAt(n-1).isEqualTo(t.charAt(r-1));)n--,r--;return{utf16String:i.slice(e,n),offset:e}},U=class extends dt{static fromCommonAttributesOfObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!t.length)return new this;let e=ae(t[0]),n=e.getKeys();return t.slice(1).forEach(r=>{n=e.getKeysCommonToHash(ae(r)),e=e.slice(n)}),e}static box(t){return ae(t)}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(...arguments),this.values=Ue(t)}add(t,e){return this.merge(is(t,e))}remove(t){return new U(Ue(this.values,t))}get(t){return this.values[t]}has(t){return t in this.values}merge(t){return new U(rs(this.values,os(t)))}slice(t){let e={};return Array.from(t).forEach(n=>{this.has(n)&&(e[n]=this.values[n])}),new U(e)}getKeys(){return Object.keys(this.values)}getKeysCommonToHash(t){return t=ae(t),this.getKeys().filter(e=>this.values[e]===t.values[e])}isEqualTo(t){return Pt(this.toArray(),ae(t).toArray())}isEmpty(){return this.getKeys().length===0}toArray(){if(!this.array){let t=[];for(let e in this.values){let n=this.values[e];t.push(t.push(e,n))}this.array=t.slice(0)}return this.array}toObject(){return Ue(this.values)}toJSON(){return this.toObject()}contentsForInspection(){return{values:JSON.stringify(this.values)}}},is=function(i,t){let e={};return e[i]=t,e},rs=function(i,t){let e=Ue(i);for(let n in t){let r=t[n];e[n]=r}return e},Ue=function(i,t){let e={};return Object.keys(i).sort().forEach(r=>{r!==t&&(e[r]=i[r])}),e},ae=function(i){return i instanceof U?i:new U(i)},os=function(i){return i instanceof U?i.values:i},Ae=class{static groupObjects(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;n&&e==null&&(e=0);let o=[];return Array.from(t).forEach(s=>{var l;if(r){var c,d,g;if((c=s.canBeGrouped)!==null&&c!==void 0&&c.call(s,e)&&(d=(g=r[r.length-1]).canBeGroupedWith)!==null&&d!==void 0&&d.call(g,s,e)){r.push(s);return}else o.push(new this(r,{depth:e,asTree:n})),r=null}(l=s.canBeGrouped)!==null&&l!==void 0&&l.call(s,e)?r=[s]:o.push(s)}),r&&o.push(new this(r,{depth:e,asTree:n})),o}constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{depth:e,asTree:n}=arguments.length>1?arguments[1]:void 0;this.objects=t,n&&(this.depth=e,this.objects=this.constructor.groupObjects(this.objects,{asTree:n,depth:this.depth+1}))}getObjects(){return this.objects}getDepth(){return this.depth}getCacheKey(){let t=["objectGroup"];return Array.from(this.getObjects()).forEach(e=>{t.push(e.getCacheKey())}),t.join("/")}},ai=class extends S{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];super(...arguments),this.objects={},Array.from(t).forEach(e=>{let n=JSON.stringify(e);this.objects[n]==null&&(this.objects[n]=e)})}find(t){let e=JSON.stringify(t);return this.objects[e]}},li=class{constructor(t){this.reset(t)}add(t){let e=cr(t);this.elements[e]=t}remove(t){let e=cr(t),n=this.elements[e];if(n)return delete this.elements[e],n}reset(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.elements={},Array.from(t).forEach(e=>{this.add(e)}),t}},cr=i=>i.dataset.trixStoreKey,Yt=class extends S{isPerforming(){return this.performing===!0}hasPerformed(){return this.performed===!0}hasSucceeded(){return this.performed&&this.succeeded}hasFailed(){return this.performed&&!this.succeeded}getPromise(){return this.promise||(this.promise=new Promise((t,e)=>(this.performing=!0,this.perform((n,r)=>{this.succeeded=n,this.performing=!1,this.performed=!0,this.succeeded?t(r):e(r)})))),this.promise}perform(t){return t(!1)}release(){var t,e;(t=this.promise)===null||t===void 0||(e=t.cancel)===null||e===void 0||e.call(t),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null}};Yt.proxyMethod("getPromise().then");Yt.proxyMethod("getPromise().catch");var ht=class extends S{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.object=t,this.options=e,this.childViews=[],this.rootView=this}getNodes(){return this.nodes||(this.nodes=this.createNodes()),this.nodes.map(t=>t.cloneNode(!0))}invalidate(){var t;return this.nodes=null,this.childViews=[],(t=this.parentView)===null||t===void 0?void 0:t.invalidate()}invalidateViewForObject(t){var e;return(e=this.findViewForObject(t))===null||e===void 0?void 0:e.invalidate()}findOrCreateCachedChildView(t,e,n){let r=this.getCachedViewForObject(e);return r?this.recordChildView(r):(r=this.createChildView(...arguments),this.cacheViewForObject(r,e)),r}createChildView(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e instanceof Ae&&(n.viewClass=t,t=ci);let r=new t(e,n);return this.recordChildView(r)}recordChildView(t){return t.parentView=this,t.rootView=this.rootView,this.childViews.push(t),t}getAllChildViews(){let t=[];return this.childViews.forEach(e=>{t.push(e),t=t.concat(e.getAllChildViews())}),t}findElement(){return this.findElementForObject(this.object)}findElementForObject(t){let e=t?.id;if(e)return this.rootView.element.querySelector("[data-trix-id='".concat(e,"']"))}findViewForObject(t){for(let e of this.getAllChildViews())if(e.object===t)return e}getViewCache(){if(this.rootView===this){if(this.isViewCachingEnabled())return this.viewCache||(this.viewCache={}),this.viewCache}else return this.rootView.getViewCache()}isViewCachingEnabled(){return this.shouldCacheViews!==!1}enableViewCaching(){this.shouldCacheViews=!0}disableViewCaching(){this.shouldCacheViews=!1}getCachedViewForObject(t){var e;return(e=this.getViewCache())===null||e===void 0?void 0:e[t.getCacheKey()]}cacheViewForObject(t,e){let n=this.getViewCache();n&&(n[e.getCacheKey()]=t)}garbageCollectCachedViews(){let t=this.getViewCache();if(t){let n=this.getAllChildViews().concat(this).map(r=>r.object.getCacheKey());for(let r in t)n.includes(r)||delete t[r]}}},ci=class extends ht{constructor(){super(...arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}getChildViews(){return this.childViews.length||Array.from(this.objectGroup.getObjects()).forEach(t=>{this.findOrCreateCachedChildView(this.viewClass,t,this.options)}),this.childViews}createNodes(){let t=this.createContainerElement();return this.getChildViews().forEach(e=>{Array.from(e.getNodes()).forEach(n=>{t.appendChild(n)})}),[t]}createContainerElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.objectGroup.getDepth();return this.getChildViews()[0].createContainerElement(t)}};var{entries:Yr,setPrototypeOf:ur,isFrozen:ss,getPrototypeOf:as,getOwnPropertyDescriptor:ls}=Object,{freeze:V,seal:X,create:Xr}=Object,{apply:ui,construct:di}=typeof Reflect<"u"&&Reflect;V||(V=function(t){return t});X||(X=function(t){return t});ui||(ui=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1?e-1:0),r=1;r1?e-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Ve;ur&&ur(i,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){let o=e(r);o!==r&&(ss(t)||(t[n]=o),r=o)}i[r]=!0}return i}function gs(i){for(let t=0;t/gm),ys=X(/\$\{[\w\W]*/gm),As=X(/^data-[\-\w.\u00B7-\uFFFF]+$/),xs=X(/^aria-[\-\w]+$/),Zr=X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Es=X(/^(?:\w+script|data):/i),ws=X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Qr=X(/^html$/i),Cs=X(/^[a-z][.\w]*(-[.\w]+)+$/i),pr=Object.freeze({__proto__:null,ARIA_ATTR:xs,ATTR_WHITESPACE:ws,CUSTOM_ELEMENT:Cs,DATA_ATTR:As,DOCTYPE_NAME:Qr,ERB_EXPR:vs,IS_ALLOWED_URI:Zr,IS_SCRIPT_OR_DATA:Es,MUSTACHE_EXPR:bs,TMPLIT_EXPR:ys}),he={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ss=function(){return typeof window>"u"?null:window},Ts=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},br=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $r(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ss(),t=f=>$r(f);if(t.version="3.2.7",t.removed=[],!i||!i.document||i.document.nodeType!==he.document||!i.Element)return t.isSupported=!1,t;let{document:e}=i,n=e,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:d,NamedNodeMap:g=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:x,DOMParser:T,trustedTypes:Z}=i,F=c.prototype,Q=de(F,"cloneNode"),Et=de(F,"remove"),mt=de(F,"nextSibling"),Bt=de(F,"childNodes"),ot=de(F,"parentNode");if(typeof s=="function"){let f=e.createElement("template");f.content&&f.content.ownerDocument&&(e=f.content.ownerDocument)}let y,J="",{implementation:wt,createNodeIterator:ne,createDocumentFragment:ho,getElementsByTagName:fo}=e,{importNode:go}=n,_=br();t.isSupported=typeof Yr=="function"&&typeof ot=="function"&&wt&&wt.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:pn,ERB_EXPR:bn,TMPLIT_EXPR:vn,DATA_ATTR:mo,ARIA_ATTR:po,IS_SCRIPT_OR_DATA:bo,ATTR_WHITESPACE:Ri,CUSTOM_ELEMENT:vo}=pr,{IS_ALLOWED_URI:Di}=pr,O=null,Li=b({},[...hr,...Un,...Vn,...Hn,...fr]),I=null,Oi=b({},[...gr,...qn,...mr,...Ne]),k=Object.seal(Xr(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}})),ie=null,yn=null,Pi=!0,An=!0,Ii=!1,Mi=!0,_t=!1,ke=!0,Ct=!1,xn=!1,En=!1,jt=!1,Re=!1,De=!1,Fi=!0,Ni=!1,yo="user-content-",wn=!0,re=!1,Wt={},zt=null,Bi=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"]),_i=null,ji=b({},["audio","video","img","source","image","track"]),Cn=null,Wi=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Le="http://www.w3.org/1998/Math/MathML",Oe="http://www.w3.org/2000/svg",st="http://www.w3.org/1999/xhtml",Ut=st,Sn=!1,Tn=null,Ao=b({},[Le,Oe,st],Wn),Pe=b({},["mi","mo","mn","ms","mtext"]),Ie=b({},["annotation-xml"]),xo=b({},["title","style","font","a","script"]),oe=null,Eo=["application/xhtml+xml","text/html"],wo="text/html",P=null,Vt=null,Co=e.createElement("form"),zi=function(a){return a instanceof RegExp||a instanceof Function},kn=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vt&&Vt===a)){if((!a||typeof a!="object")&&(a={}),a=ct(a),oe=Eo.indexOf(a.PARSER_MEDIA_TYPE)===-1?wo:a.PARSER_MEDIA_TYPE,P=oe==="application/xhtml+xml"?Wn:Ve,O=tt(a,"ALLOWED_TAGS")?b({},a.ALLOWED_TAGS,P):Li,I=tt(a,"ALLOWED_ATTR")?b({},a.ALLOWED_ATTR,P):Oi,Tn=tt(a,"ALLOWED_NAMESPACES")?b({},a.ALLOWED_NAMESPACES,Wn):Ao,Cn=tt(a,"ADD_URI_SAFE_ATTR")?b(ct(Wi),a.ADD_URI_SAFE_ATTR,P):Wi,_i=tt(a,"ADD_DATA_URI_TAGS")?b(ct(ji),a.ADD_DATA_URI_TAGS,P):ji,zt=tt(a,"FORBID_CONTENTS")?b({},a.FORBID_CONTENTS,P):Bi,ie=tt(a,"FORBID_TAGS")?b({},a.FORBID_TAGS,P):ct({}),yn=tt(a,"FORBID_ATTR")?b({},a.FORBID_ATTR,P):ct({}),Wt=tt(a,"USE_PROFILES")?a.USE_PROFILES:!1,Pi=a.ALLOW_ARIA_ATTR!==!1,An=a.ALLOW_DATA_ATTR!==!1,Ii=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Mi=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=a.SAFE_FOR_TEMPLATES||!1,ke=a.SAFE_FOR_XML!==!1,Ct=a.WHOLE_DOCUMENT||!1,jt=a.RETURN_DOM||!1,Re=a.RETURN_DOM_FRAGMENT||!1,De=a.RETURN_TRUSTED_TYPE||!1,En=a.FORCE_BODY||!1,Fi=a.SANITIZE_DOM!==!1,Ni=a.SANITIZE_NAMED_PROPS||!1,wn=a.KEEP_CONTENT!==!1,re=a.IN_PLACE||!1,Di=a.ALLOWED_URI_REGEXP||Zr,Ut=a.NAMESPACE||st,Pe=a.MATHML_TEXT_INTEGRATION_POINTS||Pe,Ie=a.HTML_INTEGRATION_POINTS||Ie,k=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&zi(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&zi(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(An=!1),Re&&(jt=!0),Wt&&(O=b({},fr),I=[],Wt.html===!0&&(b(O,hr),b(I,gr)),Wt.svg===!0&&(b(O,Un),b(I,qn),b(I,Ne)),Wt.svgFilters===!0&&(b(O,Vn),b(I,qn),b(I,Ne)),Wt.mathMl===!0&&(b(O,Hn),b(I,mr),b(I,Ne))),a.ADD_TAGS&&(O===Li&&(O=ct(O)),b(O,a.ADD_TAGS,P)),a.ADD_ATTR&&(I===Oi&&(I=ct(I)),b(I,a.ADD_ATTR,P)),a.ADD_URI_SAFE_ATTR&&b(Cn,a.ADD_URI_SAFE_ATTR,P),a.FORBID_CONTENTS&&(zt===Bi&&(zt=ct(zt)),b(zt,a.FORBID_CONTENTS,P)),wn&&(O["#text"]=!0),Ct&&b(O,["html","head","body"]),O.table&&(b(O,["tbody"]),delete ie.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw ue('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ue('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=a.TRUSTED_TYPES_POLICY,J=y.createHTML("")}else y===void 0&&(y=Ts(Z,r)),y!==null&&typeof J=="string"&&(J=y.createHTML(""));V&&V(a),Vt=a}},Ui=b({},[...Un,...Vn,...ms]),Vi=b({},[...Hn,...ps]),So=function(a){let u=ot(a);(!u||!u.tagName)&&(u={namespaceURI:Ut,tagName:"template"});let h=Ve(a.tagName),w=Ve(u.tagName);return Tn[a.namespaceURI]?a.namespaceURI===Oe?u.namespaceURI===st?h==="svg":u.namespaceURI===Le?h==="svg"&&(w==="annotation-xml"||Pe[w]):Boolean(Ui[h]):a.namespaceURI===Le?u.namespaceURI===st?h==="math":u.namespaceURI===Oe?h==="math"&&Ie[w]:Boolean(Vi[h]):a.namespaceURI===st?u.namespaceURI===Oe&&!Ie[w]||u.namespaceURI===Le&&!Pe[w]?!1:!Vi[h]&&(xo[h]||!Ui[h]):!!(oe==="application/xhtml+xml"&&Tn[a.namespaceURI]):!1},nt=function(a){le(t.removed,{element:a});try{ot(a).removeChild(a)}catch{Et(a)}},St=function(a,u){try{le(t.removed,{attribute:u.getAttributeNode(a),from:u})}catch{le(t.removed,{attribute:null,from:u})}if(u.removeAttribute(a),a==="is")if(jt||Re)try{nt(u)}catch{}else try{u.setAttribute(a,"")}catch{}},Hi=function(a){let u=null,h=null;if(En)a=""+a;else{let L=zn(a,/^[\r\n\t ]+/);h=L&&L[0]}oe==="application/xhtml+xml"&&Ut===st&&(a=''+a+"");let w=y?y.createHTML(a):a;if(Ut===st)try{u=new T().parseFromString(w,oe)}catch{}if(!u||!u.documentElement){u=wt.createDocument(Ut,"template",null);try{u.documentElement.innerHTML=Sn?J:w}catch{}}let N=u.body||u.documentElement;return a&&h&&N.insertBefore(e.createTextNode(h),N.childNodes[0]||null),Ut===st?fo.call(u,Ct?"html":"body")[0]:Ct?u.documentElement:N},qi=function(a){return ne.call(a.ownerDocument||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Rn=function(a){return a instanceof x&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof g)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},Gi=function(a){return typeof l=="function"&&a instanceof l};function at(f,a,u){Fe(f,h=>{h.call(t,a,u,Vt)})}let Ki=function(a){let u=null;if(at(_.beforeSanitizeElements,a,null),Rn(a))return nt(a),!0;let h=P(a.nodeName);if(at(_.uponSanitizeElement,a,{tagName:h,allowedTags:O}),ke&&a.hasChildNodes()&&!Gi(a.firstElementChild)&&j(/<[/\w!]/g,a.innerHTML)&&j(/<[/\w!]/g,a.textContent)||a.nodeType===he.progressingInstruction||ke&&a.nodeType===he.comment&&j(/<[/\w]/g,a.data))return nt(a),!0;if(!O[h]||ie[h]){if(!ie[h]&&Yi(h)&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,h)||k.tagNameCheck instanceof Function&&k.tagNameCheck(h)))return!1;if(wn&&!zt[h]){let w=ot(a)||a.parentNode,N=Bt(a)||a.childNodes;if(N&&w){let L=N.length;for(let q=L-1;q>=0;--q){let lt=Q(N[q],!0);lt.__removalCount=(a.__removalCount||0)+1,w.insertBefore(lt,mt(a))}}}return nt(a),!0}return a instanceof c&&!So(a)||(h==="noscript"||h==="noembed"||h==="noframes")&&j(/<\/no(script|embed|frames)/i,a.innerHTML)?(nt(a),!0):(_t&&a.nodeType===he.text&&(u=a.textContent,Fe([pn,bn,vn],w=>{u=ce(u,w," ")}),a.textContent!==u&&(le(t.removed,{element:a.cloneNode()}),a.textContent=u)),at(_.afterSanitizeElements,a,null),!1)},Ji=function(a,u,h){if(Fi&&(u==="id"||u==="name")&&(h in e||h in Co))return!1;if(!(An&&!yn[u]&&j(mo,u))){if(!(Pi&&j(po,u))){if(!I[u]||yn[u]){if(!(Yi(a)&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,a)||k.tagNameCheck instanceof Function&&k.tagNameCheck(a))&&(k.attributeNameCheck instanceof RegExp&&j(k.attributeNameCheck,u)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(u,a))||u==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&j(k.tagNameCheck,h)||k.tagNameCheck instanceof Function&&k.tagNameCheck(h))))return!1}else if(!Cn[u]){if(!j(Di,ce(h,Ri,""))){if(!((u==="src"||u==="xlink:href"||u==="href")&&a!=="script"&&ds(h,"data:")===0&&_i[a])){if(!(Ii&&!j(bo,ce(h,Ri,"")))){if(h)return!1}}}}}}return!0},Yi=function(a){return a!=="annotation-xml"&&zn(a,vo)},Xi=function(a){at(_.beforeSanitizeAttributes,a,null);let{attributes:u}=a;if(!u||Rn(a))return;let h={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},w=u.length;for(;w--;){let N=u[w],{name:L,namespaceURI:q,value:lt}=N,Ht=P(L),Dn=lt,M=L==="value"?Dn:hs(Dn);if(h.attrName=Ht,h.attrValue=M,h.keepAttr=!0,h.forceKeepAttr=void 0,at(_.uponSanitizeAttribute,a,h),M=h.attrValue,Ni&&(Ht==="id"||Ht==="name")&&(St(L,a),M=yo+M),ke&&j(/((--!?|])>)|<\/(style|title|textarea)/i,M)){St(L,a);continue}if(Ht==="attributename"&&zn(M,"href")){St(L,a);continue}if(h.forceKeepAttr)continue;if(!h.keepAttr){St(L,a);continue}if(!Mi&&j(/\/>/i,M)){St(L,a);continue}_t&&Fe([pn,bn,vn],Qi=>{M=ce(M,Qi," ")});let Zi=P(a.nodeName);if(!Ji(Zi,Ht,M)){St(L,a);continue}if(y&&typeof Z=="object"&&typeof Z.getAttributeType=="function"&&!q)switch(Z.getAttributeType(Zi,Ht)){case"TrustedHTML":{M=y.createHTML(M);break}case"TrustedScriptURL":{M=y.createScriptURL(M);break}}if(M!==Dn)try{q?a.setAttributeNS(q,L,M):a.setAttribute(L,M),Rn(a)?nt(a):dr(t.removed)}catch{St(L,a)}}at(_.afterSanitizeAttributes,a,null)},To=function f(a){let u=null,h=qi(a);for(at(_.beforeSanitizeShadowDOM,a,null);u=h.nextNode();)at(_.uponSanitizeShadowNode,u,null),Ki(u),Xi(u),u.content instanceof o&&f(u.content);at(_.afterSanitizeShadowDOM,a,null)};return t.sanitize=function(f){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=null,h=null,w=null,N=null;if(Sn=!f,Sn&&(f=""),typeof f!="string"&&!Gi(f))if(typeof f.toString=="function"){if(f=f.toString(),typeof f!="string")throw ue("dirty is not a string, aborting")}else throw ue("toString is not a function");if(!t.isSupported)return f;if(xn||kn(a),t.removed=[],typeof f=="string"&&(re=!1),re){if(f.nodeName){let lt=P(f.nodeName);if(!O[lt]||ie[lt])throw ue("root node is forbidden and cannot be sanitized in-place")}}else if(f instanceof l)u=Hi(""),h=u.ownerDocument.importNode(f,!0),h.nodeType===he.element&&h.nodeName==="BODY"||h.nodeName==="HTML"?u=h:u.appendChild(h);else{if(!jt&&!_t&&!Ct&&f.indexOf("<")===-1)return y&&De?y.createHTML(f):f;if(u=Hi(f),!u)return jt?null:De?J:""}u&&En&&nt(u.firstChild);let L=qi(re?f:u);for(;w=L.nextNode();)Ki(w),Xi(w),w.content instanceof o&&To(w.content);if(re)return f;if(jt){if(Re)for(N=ho.call(u.ownerDocument);u.firstChild;)N.appendChild(u.firstChild);else N=u;return(I.shadowroot||I.shadowrootmode)&&(N=go.call(n,N,!0)),N}let q=Ct?u.outerHTML:u.innerHTML;return Ct&&O["!doctype"]&&u.ownerDocument&&u.ownerDocument.doctype&&u.ownerDocument.doctype.name&&j(Qr,u.ownerDocument.doctype.name)&&(q="
`+q),_t&&Fe([pn,bn,vn],lt=>{q=ce(q,lt," ")}),y&&De?y.createHTML(q):q},t.setConfig=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(f),xn=!0},t.clearConfig=function(){Vt=null,xn=!1},t.isValidAttribute=function(f,a,u){Vt||kn({});let h=P(f),w=P(a);return Ji(h,w,u)},t.addHook=function(f,a){typeof a=="function"&&le(_[f],a)},t.removeHook=function(f,a){if(a!==void 0){let u=cs(_[f],a);return u===-1?void 0:us(_[f],u,1)[0]}return dr(_[f])},t.removeHooks=function(f){_[f]=[]},t.removeAllHooks=function(){_=br()},t}var xe=$r();xe.addHook("uponSanitizeAttribute",function(i,t){/^data-trix-/.test(t.attrName)&&(t.forceKeepAttr=!0)});var ks="style href src width height language class".split(" "),Rs="javascript:".split(" "),Ds="script iframe form noscript".split(" "),Xt=class extends S{static setHTML(t,e,n){let r=new this(e,n).sanitize(),o=r.getHTML?r.getHTML():r.outerHTML;t.innerHTML=o}static sanitize(t,e){let n=new this(t,e);return n.sanitize(),n}constructor(t){let{allowedAttributes:e,forbiddenProtocols:n,forbiddenElements:r,purifyOptions:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(...arguments),this.allowedAttributes=e||ks,this.forbiddenProtocols=n||Rs,this.forbiddenElements=r||Ds,this.purifyOptions=o||{},this.body=Ls(t)}sanitize(){this.sanitizeElements(),this.normalizeListElementNesting();let t=Object.assign({},Nr,this.purifyOptions);return xe.setConfig(t),this.body=xe.sanitize(this.body),this.body}getHTML(){return this.body.innerHTML}getBody(){return this.body}sanitizeElements(){let t=He(this.body),e=[];for(;t.nextNode();){let n=t.currentNode;switch(n.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(n)?e.push(n):this.sanitizeElement(n);break;case Node.COMMENT_NODE:e.push(n);break}}return e.forEach(n=>yt(n)),this.body}sanitizeElement(t){return t.hasAttribute("href")&&this.forbiddenProtocols.includes(t.protocol)&&t.removeAttribute("href"),Array.from(t.attributes).forEach(e=>{let{name:n}=e;!this.allowedAttributes.includes(n)&&n.indexOf("data-trix")!==0&&t.removeAttribute(n)}),t}normalizeListElementNesting(){return Array.from(this.body.querySelectorAll("ul,ol")).forEach(t=>{let e=t.previousElementSibling;e&&W(e)==="li"&&e.appendChild(t)}),this.body}elementIsRemovable(t){if(t?.nodeType===Node.ELEMENT_NODE)return this.elementIsForbidden(t)||this.elementIsntSerializable(t)}elementIsForbidden(t){return this.forbiddenElements.includes(W(t))}elementIsntSerializable(t){return t.getAttribute("data-trix-serialize")==="false"&&!Dt(t)}},Ls=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";i=i.replace(/<\/html[^>]*>[^]*$/i,"