/*!
 * Nutrient Web SDK 1.18.0-d151a78 (https://www.nutrient.io/sdk/web)
 *
 * Copyright (c) 2016-2026 PSPDFKit GmbH. All rights reserved.
 *
 * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
 * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
 * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
 * This notice may not be removed from this file.
 *
 * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
 */
"use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[38],{88206(e,t,n){n.d(t,{default:()=>i});var r=n(37737),o=n.n(r);function i(){return o()('/*!\n * Nutrient Web SDK 1.18.0-d151a78 (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2026 PSPDFKit GmbH. All rights reserved.\n *\n * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW\n * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.\n * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.\n * This notice may not be removed from this file.\n *\n * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{var e={369(e,t,n){var r=n(350),o=n(700),i=n(146),a=o.DEFAULT_COMPARATOR,s=o.reverseComparator;function l(e,t,n,r){for(var o,i,a=t[r];r>n&&e(a,i=t[o=r-1>>1])<0;)t[r]=i,r=o;t[r]=a}function c(e,t,n){for(var r,o=t.length,i=n,a=t[n],s=2*n+1;s<o;)(r=s+1)<o&&e(t[s],t[r])>=0&&(s=r),t[n]=t[s],s=2*(n=s)+1;t[n]=a,l(e,t,i,n)}function u(e,t,n){t.push(n),l(e,t,0,t.length-1)}function f(e,t){var n=t.pop();if(0!==t.length){var r=t[0];return t[0]=n,c(e,t,0),r}return n}function p(e,t,n){if(0===t.length)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var r=t[0];return t[0]=n,c(e,t,0),r}function d(e,t,n){var r;return 0!==t.length&&e(t[0],n)<0&&(r=t[0],t[0]=n,n=r,c(e,t,0)),n}function h(e,t){for(var n=t.length>>1;--n>=0;)c(e,t,n)}function m(e,t){for(var n=t.length,r=0,o=new Array(n);r<n;)o[r++]=f(e,t);return o}function y(e){if(this.clear(),this.comparator=e||a,"function"!=typeof this.comparator)throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}function g(e){if(this.clear(),this.comparator=e||a,"function"!=typeof this.comparator)throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=s(this.comparator)}y.prototype.clear=function(){this.items=[],this.size=0},y.prototype.push=function(e){return u(this.comparator,this.items,e),++this.size},y.prototype.peek=function(){return this.items[0]},y.prototype.pop=function(){return 0!==this.size&&this.size--,f(this.comparator,this.items)},y.prototype.replace=function(e){return p(this.comparator,this.items,e)},y.prototype.pushpop=function(e){return d(this.comparator,this.items,e)},y.prototype.consume=function(){return this.size=0,m(this.comparator,this.items)},y.prototype.toArray=function(){return m(this.comparator,this.items.slice())},y.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,"constructor",{value:y,enumerable:!1}),e},"undefined"!=typeof Symbol&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),g.prototype=y.prototype,y.from=function(e,t){var n,r=new y(t);return n=i.isArrayLike(e)?e.slice():i.toArray(e),h(r.comparator,n),r.items=n,r.size=n.length,r},g.from=function(e,t){var n,r=new g(t);return n=i.isArrayLike(e)?e.slice():i.toArray(e),h(r.comparator,n),r.items=n,r.size=n.length,r},y.siftUp=c,y.siftDown=l,y.push=u,y.pop=f,y.replace=p,y.pushpop=d,y.heapify=h,y.consume=m,y.nsmallest=function(e,t,n){2===arguments.length&&(n=t,t=e,e=a);var o,l,c,u,f=s(e),d=1/0;if(1===t){if(i.isArrayLike(n)){for(o=0,l=n.length;o<l;o++)c=n[o],(d===1/0||e(c,d)<0)&&(d=c);return(u=new n.constructor(1))[0]=d,u}return r(n,function(t){(d===1/0||e(t,d)<0)&&(d=t)}),[d]}if(i.isArrayLike(n)){if(t>=n.length)return n.slice().sort(e);for(u=n.slice(0,t),h(f,u),o=t,l=n.length;o<l;o++)f(n[o],u[0])>0&&p(f,u,n[o]);return u.sort(e)}var m=i.guessLength(n);return null!==m&&m<t&&(t=m),u=new Array(t),o=0,r(n,function(e){o<t?u[o]=e:(o===t&&h(f,u),f(e,u[0])>0&&p(f,u,e)),o++}),u.length>o&&(u.length=o),u.sort(e)},y.nlargest=function(e,t,n){2===arguments.length&&(n=t,t=e,e=a);var o,l,c,u,f=s(e),d=-1/0;if(1===t){if(i.isArrayLike(n)){for(o=0,l=n.length;o<l;o++)c=n[o],(d===-1/0||e(c,d)>0)&&(d=c);return(u=new n.constructor(1))[0]=d,u}return r(n,function(t){(d===-1/0||e(t,d)>0)&&(d=t)}),[d]}if(i.isArrayLike(n)){if(t>=n.length)return n.slice().sort(f);for(u=n.slice(0,t),h(e,u),o=t,l=n.length;o<l;o++)e(n[o],u[0])>0&&p(e,u,n[o]);return u.sort(f)}var m=i.guessLength(n);return null!==m&&m<t&&(t=m),u=new Array(t),o=0,r(n,function(n){o<t?u[o]=n:(o===t&&h(e,u),e(n,u[0])>0&&p(e,u,n)),o++}),u.length>o&&(u.length=o),u.sort(f)},y.MinHeap=y,y.MaxHeap=g,e.exports=y},700(e,t){t.DEFAULT_COMPARATOR=function(e,t){return e<t?-1:e>t?1:0},t.DEFAULT_REVERSE_COMPARATOR=function(e,t){return e<t?1:e>t?-1:0},t.reverseComparator=function(e){return function(t,n){return e(n,t)}},t.createTupleComparator=function(e){return 2===e?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:e[1]>t[1]?1:0}:function(t,n){for(var r=0;r<e;){if(t[r]<n[r])return-1;if(t[r]>n[r])return 1;r++}return 0}}},146(e,t,n){var r=n(350),o=n(232);function i(e){return"number"==typeof e.length?e.length:"number"==typeof e.size?e.size:void 0}t.isArrayLike=function(e){return Array.isArray(e)||o.isTypedArray(e)},t.guessLength=i,t.toArray=function(e){var t=i(e),n="number"==typeof t?new Array(t):[],o=0;return r(e,function(e){n[o++]=e}),n},t.toArrayWithIndices=function(e){var t=i(e),n="number"==typeof t?o.getPointerArray(t):Array,a="number"==typeof t?new Array(t):[],s="number"==typeof t?new n(t):[],l=0;return r(e,function(e){a[l]=e,s[l]=l++}),[a,s]}},232(e,t){var n=Math.pow(2,8)-1,r=Math.pow(2,16)-1,o=Math.pow(2,32)-1,i=Math.pow(2,7)-1,a=Math.pow(2,15)-1,s=Math.pow(2,31)-1;t.getPointerArray=function(e){var t=e-1;if(t<=n)return Uint8Array;if(t<=r)return Uint16Array;if(t<=o)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},t.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=s?Int32Array:Float64Array},t.getNumberType=function(e){return e===(0|e)?-1===Math.sign(e)?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var l={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};t.getMinimalRepresentation=function(e,n){var r,o,i,a,s,c=null,u=0;for(a=0,s=e.length;a<s;a++)i=n?n(e[a]):e[a],o=t.getNumberType(i),(r=l[o.name])>u&&(u=r,c=o);return c},t.isTypedArray=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(e)},t.concat=function(){var e,t,n,r=0;for(e=0,n=arguments.length;e<n;e++)r+=arguments[e].length;var o=new arguments[0].constructor(r);for(e=0,t=0;e<n;e++)o.set(arguments[e],t),t+=arguments[e].length;return o},t.indices=function(e){for(var n=new(t.getPointerArray(e))(e),r=0;r<e;r++)n[r]=r;return n}},350(e,t,n){var r=n(531),o=r.ARRAY_BUFFER_SUPPORT,i=r.SYMBOL_SUPPORT;e.exports=function(e,t){var n,r,a,s,l;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if("function"!=typeof t)throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||o&&ArrayBuffer.isView(e)||"string"==typeof e||"[object Arguments]"===e.toString())for(a=0,s=e.length;a<s;a++)t(e[a],a);else if("function"!=typeof e.forEach)if(i&&Symbol.iterator in e&&"function"!=typeof e.next&&(e=e[Symbol.iterator]()),"function"!=typeof e.next)for(r in e)e.hasOwnProperty(r)&&t(e[r],r);else for(n=e,a=0;!0!==(l=n.next()).done;)t(l.value,a),a++;else e.forEach(t)}},531(e,t){t.ARRAY_BUFFER_SUPPORT="undefined"!=typeof ArrayBuffer,t.SYMBOL_SUPPORT="undefined"!=typeof Symbol}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function o(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(e),n.d(e,{default:()=>Ge});const i=Symbol("Comlink.proxy"),a=Symbol("Comlink.endpoint"),s=Symbol("Comlink.releaseProxy"),l=Symbol("Comlink.finalizer"),c=Symbol("Comlink.thrown"),u=e=>"object"==typeof e&&null!==e||"function"==typeof e,f=new Map([["proxy",{canHandle:e=>u(e)&&e[i],serialize(e){const{port1:t,port2:n}=new MessageChannel;return p(e,t),[n,[n]]},deserialize:e=>(e.start(),h(e))}],["throw",{canHandle:e=>u(e)&&c in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function p(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(o){if(!o||!o.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,o.origin))return void console.warn(`Invalid origin \'${o.origin}\' for comlink proxy`);const{id:a,type:s,path:u}=Object.assign({path:[]},o.data),f=(o.data.argumentList||[]).map(S);let h;try{const t=u.slice(0,-1).reduce((e,t)=>e[t],e),n=u.reduce((e,t)=>e[t],e);switch(s){case"GET":h=n;break;case"SET":t[u.slice(-1)[0]]=S(o.data.value),h=!0;break;case"APPLY":h=n.apply(t,f);break;case"CONSTRUCT":h=function(e){return Object.assign(e,{[i]:!0})}(new n(...f));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;p(e,n),h=function(e,t){return v.set(e,t),e}(t,[t])}break;case"RELEASE":h=void 0;break;default:return}}catch(e){h={value:e,[c]:0}}Promise.resolve(h).catch(e=>({value:e,[c]:0})).then(n=>{const[o,i]=A(n);t.postMessage(Object.assign(Object.assign({},o),{id:a}),i),"RELEASE"===s&&(t.removeEventListener("message",r),d(t),l in e&&"function"==typeof e[l]&&e[l]())}).catch(e=>{const[n,r]=A({value:new TypeError("Unserializable return value"),[c]:0});t.postMessage(Object.assign(Object.assign({},n),{id:a}),r)})}),t.start&&t.start()}function d(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function h(e,t){const n=new Map;return e.addEventListener("message",function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),T(e,n,[],t)}function m(e){if(e)throw new Error("Proxy has been released and is not useable")}function y(e){return E(e,new Map,{type:"RELEASE"}).then(()=>{d(e)})}const g=new WeakMap,b="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(g.get(e)||0)-1;g.set(e,t),0===t&&y(e)});function T(e,t,n=[],r=function(){}){let o=!1;const i=new Proxy(r,{get(r,a){if(m(o),a===s)return()=>{!function(e){b&&b.unregister(e)}(i),y(e),t.clear(),o=!0};if("then"===a){if(0===n.length)return{then:()=>i};const r=E(e,t,{type:"GET",path:n.map(e=>e.toString())}).then(S);return r.then.bind(r)}return T(e,t,[...n,a])},set(r,i,a){m(o);const[s,l]=A(a);return E(e,t,{type:"SET",path:[...n,i].map(e=>e.toString()),value:s},l).then(S)},apply(r,i,s){m(o);const l=n[n.length-1];if(l===a)return E(e,t,{type:"ENDPOINT"}).then(S);if("bind"===l)return T(e,t,n.slice(0,-1));const[c,u]=w(s);return E(e,t,{type:"APPLY",path:n.map(e=>e.toString()),argumentList:c},u).then(S)},construct(r,i){m(o);const[a,s]=w(i);return E(e,t,{type:"CONSTRUCT",path:n.map(e=>e.toString()),argumentList:a},s).then(S)}});return function(e,t){const n=(g.get(t)||0)+1;g.set(t,n),b&&b.register(e,t,e)}(i,e),i}function w(e){const t=e.map(A);return[t.map(e=>e[0]),(n=t.map(e=>e[1]),Array.prototype.concat.apply([],n))];var n}const v=new WeakMap;function A(e){for(const[t,n]of f)if(n.canHandle(e)){const[r,o]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},o]}return[{type:"RAW",value:e},v.get(e)||[]]}function S(e){switch(e.type){case"HANDLER":return f.get(e.name).deserialize(e.value);case"RAW":return e.value}}function E(e,t,n,r){return new Promise(o=>{const i=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.set(i,o),e.start&&e.start(),e.postMessage(Object.assign({id:i},n),r)})}const R=function e(t){let n;return n=t instanceof Error?t:new Error(t),Object.setPrototypeOf(n,e.prototype),n};R.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const N=R;["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",\'[tabindex]:not([tabindex^="-"])\'].join(",");new WeakMap;function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const I=Object.entries,_=Object.setPrototypeOf,k=Object.isFrozen,x=Object.getPrototypeOf,P=Object.getOwnPropertyDescriptor;let M=Object.freeze,D=Object.seal,L=Object.create,z="undefined"!=typeof Reflect&&Reflect,U=z.apply,q=z.construct;M||(M=function(e){return e}),D||(D=function(e){return e}),U||(U=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),q||(q=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const F=se(Array.prototype.forEach),j=se(Array.prototype.lastIndexOf),B=se(Array.prototype.pop),H=se(Array.prototype.push),W=se(Array.prototype.splice),G=Array.isArray,Y=se(String.prototype.toLowerCase),Q=se(String.prototype.toString),V=se(String.prototype.match),$=se(String.prototype.replace),X=se(String.prototype.indexOf),K=se(String.prototype.trim),Z=se(Number.prototype.toString),J=se(Boolean.prototype.toString),ee="undefined"==typeof BigInt?null:se(BigInt.prototype.toString),te="undefined"==typeof Symbol?null:se(Symbol.prototype.toString),ne=se(Object.prototype.hasOwnProperty),re=se(Object.prototype.toString),oe=se(RegExp.prototype.test),ie=(ae=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return q(ae,t)});var ae;function se(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return U(e,t,r)}}function le(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y;if(_&&_(e,null),!G(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(k(t)||(t[r]=e),o=e)}e[o]=!0}return e}function ce(e){for(let t=0;t<e.length;t++){ne(e,t)||(e[t]=null)}return e}function ue(e){const t=L(null);for(const r of I(e)){var n=C(r,2);const o=n[0],i=n[1];ne(e,o)&&(G(i)?t[o]=ce(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=ue(i):t[o]=i)}return t}function fe(e,t){for(;null!==e;){const n=P(e,t);if(n){if(n.get)return se(n.get);if("function"==typeof n.value)return se(n.value)}e=x(e)}return function(){return null}}const pe=M(["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"]),de=M(["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"]),he=M(["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"]),me=M(["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"]),ye=M(["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"]),ge=M(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),be=M(["#text"]),Te=M(["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"]),we=M(["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"]),ve=M(["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"]),Ae=M(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Se=D(/{{[\\w\\W]*|^[\\w\\W]*}}/g),Ee=D(/<%[\\w\\W]*|^[\\w\\W]*%>/g),Re=D(/\\${[\\w\\W]*/g),Ne=D(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),Oe=D(/^aria-[\\-\\w]+$/),Ce=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),Ie=D(/^(?:\\w+script|data):/i),_e=D(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),ke=D(/^html$/i),xe=D(/^[a-z][.\\w]*(-[.\\w]+)+$/i),Pe=D(/<[/\\w!]/g),Me=D(/<[/\\w]/g),De=D(/<\\/no(script|embed|frames)/i),Le=D(/\\/>/i),ze=1,Ue=3,qe=7,Fe=8,je=9,Be=11,He=function(){return"undefined"==typeof window?null:window},We=function(e,t,n,r){return ne(e,t)&&G(e[t])?le(r.base?ue(r.base):{},e[t],r.transform):n};var Ge=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He();const n=t=>e(t);if(n.version="3.4.11",n.removed=[],!t||!t.document||t.document.nodeType!==je||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,s=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap;void 0===u&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const f=t.DOMParser,p=t.trustedTypes,d=l.prototype,h=fe(d,"cloneNode"),m=fe(d,"remove"),y=fe(d,"nextSibling"),g=fe(d,"childNodes"),b=fe(d,"parentNode"),T=fe(d,"shadowRoot"),w=fe(d,"attributes"),v=s&&s.prototype?fe(s.prototype,"nodeType"):null,A=s&&s.prototype?fe(s.prototype,"nodeName"):null;if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let S,E,R="",N=!1,O=0;const C=function(){if(O>0)throw ie(\'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.\')},_=function(e){C(),O++;try{return S.createHTML(e)}finally{O--}},k=function(){return N||(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),N=!0),E},x=r,P=x.implementation,z=x.createNodeIterator,U=x.createDocumentFragment,q=x.getElementsByTagName,ae=o.importNode;let se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof I&&"function"==typeof b&&P&&void 0!==P.createHTMLDocument;const ce=Se,Ge=Ee,Ye=Re,Qe=Ne,Ve=Oe,$e=Ie,Xe=_e,Ke=xe;let Ze=Ce,Je=null;const et=le({},[...pe,...de,...he,...ye,...be]);let tt=null;const nt=le({},[...Te,...we,...ve,...Ae]);let rt=Object.seal(L(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,it=null;const at=Object.seal(L(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let st=!0,lt=!0,ct=!1,ut=!0,ft=!1,pt=!0,dt=!1,ht=!1,mt=null,yt=null,gt=!1,bt=!1,Tt=!1,wt=!1,vt=!0,At=!1;const St="user-content-";let Et=!0,Rt=!1,Nt={},Ot=null;const Ct=le({},["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"]);let It=null;const _t=le({},["audio","video","img","source","image","track"]);let kt=null;const xt=le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pt="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",Dt="http://www.w3.org/1999/xhtml";let Lt=Dt,zt=!1,Ut=null;const qt=le({},[Pt,Mt,Dt],Q),Ft=M(["mi","mo","mn","ms","mtext"]);let jt=le({},Ft);const Bt=M(["annotation-xml"]);let Ht=le({},Bt);const Wt=le({},["title","style","font","a","script"]);let Gt=null;const Yt=["application/xhtml+xml","text/html"];let Qt=null,Vt=null;const $t=r.createElement("form"),Xt=function(e){return e instanceof RegExp||e instanceof Function},Kt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vt&&Vt===e)return;e&&"object"==typeof e||(e={}),e=ue(e),Gt=-1===Yt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Qt="application/xhtml+xml"===Gt?Q:Y,Je=We(e,"ALLOWED_TAGS",et,{transform:Qt}),tt=We(e,"ALLOWED_ATTR",nt,{transform:Qt}),Ut=We(e,"ALLOWED_NAMESPACES",qt,{transform:Q}),kt=We(e,"ADD_URI_SAFE_ATTR",xt,{transform:Qt,base:xt}),It=We(e,"ADD_DATA_URI_TAGS",_t,{transform:Qt,base:_t}),Ot=We(e,"FORBID_CONTENTS",Ct,{transform:Qt}),ot=We(e,"FORBID_TAGS",ue({}),{transform:Qt}),it=We(e,"FORBID_ATTR",ue({}),{transform:Qt}),Nt=!!ne(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?ue(e.USE_PROFILES):e.USE_PROFILES),st=!1!==e.ALLOW_ARIA_ATTR,lt=!1!==e.ALLOW_DATA_ATTR,ct=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ft=e.SAFE_FOR_TEMPLATES||!1,pt=!1!==e.SAFE_FOR_XML,dt=e.WHOLE_DOCUMENT||!1,bt=e.RETURN_DOM||!1,Tt=e.RETURN_DOM_FRAGMENT||!1,wt=e.RETURN_TRUSTED_TYPE||!1,gt=e.FORCE_BODY||!1,vt=!1!==e.SANITIZE_DOM,At=e.SANITIZE_NAMED_PROPS||!1,Et=!1!==e.KEEP_CONTENT,Rt=e.IN_PLACE||!1,Ze=function(e){try{return oe(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ce,Lt="string"==typeof e.NAMESPACE?e.NAMESPACE:Dt,jt=ne(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?ue(e.MATHML_TEXT_INTEGRATION_POINTS):le({},Ft),Ht=ne(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?ue(e.HTML_INTEGRATION_POINTS):le({},Bt);const t=ne(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?ue(e.CUSTOM_ELEMENT_HANDLING):L(null);if(rt=L(null),ne(t,"tagNameCheck")&&Xt(t.tagNameCheck)&&(rt.tagNameCheck=t.tagNameCheck),ne(t,"attributeNameCheck")&&Xt(t.attributeNameCheck)&&(rt.attributeNameCheck=t.attributeNameCheck),ne(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(rt.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),D(rt),ft&&(lt=!1),Tt&&(bt=!0),Nt&&(Je=le({},be),tt=L(null),!0===Nt.html&&(le(Je,pe),le(tt,Te)),!0===Nt.svg&&(le(Je,de),le(tt,we),le(tt,Ae)),!0===Nt.svgFilters&&(le(Je,he),le(tt,we),le(tt,Ae)),!0===Nt.mathMl&&(le(Je,ye),le(tt,ve),le(tt,Ae))),at.tagCheck=null,at.attributeCheck=null,ne(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?at.tagCheck=e.ADD_TAGS:G(e.ADD_TAGS)&&(Je===et&&(Je=ue(Je)),le(Je,e.ADD_TAGS,Qt))),ne(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?at.attributeCheck=e.ADD_ATTR:G(e.ADD_ATTR)&&(tt===nt&&(tt=ue(tt)),le(tt,e.ADD_ATTR,Qt))),ne(e,"ADD_URI_SAFE_ATTR")&&G(e.ADD_URI_SAFE_ATTR)&&le(kt,e.ADD_URI_SAFE_ATTR,Qt),ne(e,"FORBID_CONTENTS")&&G(e.FORBID_CONTENTS)&&(Ot===Ct&&(Ot=ue(Ot)),le(Ot,e.FORBID_CONTENTS,Qt)),ne(e,"ADD_FORBID_CONTENTS")&&G(e.ADD_FORBID_CONTENTS)&&(Ot===Ct&&(Ot=ue(Ot)),le(Ot,e.ADD_FORBID_CONTENTS,Qt)),Et&&(Je["#text"]=!0),dt&&le(Je,["html","head","body"]),Je.table&&(le(Je,["tbody"]),delete ot.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw ie(\'TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.\');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw ie(\'TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.\');const t=S;S=e.TRUSTED_TYPES_POLICY;try{R=_("")}catch(e){throw S=t,e}}else null===e.TRUSTED_TYPES_POLICY?(S=void 0,R=""):(void 0===S&&(S=k()),S&&"string"==typeof R&&(R=_("")));M&&M(e),Vt=e},Zt=le({},[...de,...he,...me]),Jt=le({},[...ye,...ge]),en=function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Lt,tagName:"template"});const n=Y(e.tagName),r=Y(t.tagName);return!!Ut[e.namespaceURI]&&(e.namespaceURI===Mt?function(e,t,n){return t.namespaceURI===Dt?"svg"===e:t.namespaceURI===Pt?"svg"===e&&("annotation-xml"===n||jt[n]):Boolean(Zt[e])}(n,t,r):e.namespaceURI===Pt?function(e,t,n){return t.namespaceURI===Dt?"math"===e:t.namespaceURI===Mt?"math"===e&&Ht[n]:Boolean(Jt[e])}(n,t,r):e.namespaceURI===Dt?function(e,t,n){return!(t.namespaceURI===Mt&&!Ht[n])&&!(t.namespaceURI===Pt&&!jt[n])&&!Jt[e]&&(Wt[e]||!Zt[e])}(n,t,r):!("application/xhtml+xml"!==Gt||!Ut[e.namespaceURI]))},tn=function(e){H(n.removed,{element:e});try{b(e).removeChild(e)}catch(t){if(m(e),!b(e))throw ie("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nn=function(e){const t=g(e);if(t){const e=[];F(t,t=>{H(e,t)}),F(e,e=>{try{m(e)}catch(e){}})}const n=w(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},rn=function(e,t){try{H(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){H(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(bt||Tt)try{tn(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},on=function(e){const t=w(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;if("string"==typeof o&&!tt[Qt(o)])try{e.removeAttribute(o)}catch(e){}}},an=function(e){let t=null,n=null;if(gt)e="<remove></remove>"+e;else{const t=V(e,/^[\\r\\n\\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Gt&&Lt===Dt&&(e=\'<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>\'+e+"</body></html>");const o=S?_(e):e;if(Lt===Dt)try{t=(new f).parseFromString(o,Gt)}catch(e){}if(!t||!t.documentElement){t=P.createDocument(Lt,"template",null);try{t.documentElement.innerHTML=zt?R:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Lt===Dt?q.call(t,dt?"html":"body")[0]:dt?t.documentElement:i},sn=function(e){return z.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(e){return e=$(e,ce," "),e=$(e,Ge," "),e=$(e,Ye," ")},cn=function(e){var t;e.normalize();const n=z.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=ln(r.data),r=n.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&F(o,e=>{fn(e.content)&&cn(e.content)})},un=function(e){const t=A?A(e):null;return"string"==typeof t&&("form"===Qt(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==w(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==v(e)||e.childNodes!==g(e)))},fn=function(e){if(!v||"object"!=typeof e||null===e)return!1;try{return v(e)===Be}catch(e){return!1}},pn=function(e){if(!v||"object"!=typeof e||null===e)return!1;try{return"number"==typeof v(e)}catch(e){return!1}};function dn(e,t,r){0!==e.length&&F(e,e=>{e.call(n,t,r,Vt)})}const hn=function(e){if(dn(se.beforeSanitizeElements,e,null),un(e))return tn(e),!0;const t=Qt(A?A(e):e.nodeName);if(dn(se.uponSanitizeElement,e,{tagName:t,allowedTags:Je}),function(e,t){return!!(pt&&e.hasChildNodes()&&!pn(e.firstElementChild)&&oe(Pe,e.textContent)&&oe(Pe,e.innerHTML))||!(!pt||e.namespaceURI!==Dt||"style"!==t||!pn(e.firstElementChild))||e.nodeType===qe||!(!pt||e.nodeType!==Fe||!oe(Me,e.data))}(e,t))return tn(e),!0;if(ot[t]||!(at.tagCheck instanceof Function&&at.tagCheck(t))&&!Je[t])return function(e,t){if(!ot[t]&&gn(t)){if(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,t))return!1;if(rt.tagNameCheck instanceof Function&&rt.tagNameCheck(t))return!1}if(Et&&!Ot[t]){const t=b(e),n=g(e);if(n&&t)for(let r=n.length-1;r>=0;--r){const o=Rt?n[r]:h(n[r],!0);t.insertBefore(o,y(e))}}return tn(e),!0}(e,t);if((v?v(e):e.nodeType)===ze&&!en(e))return tn(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&oe(De,e.innerHTML))return tn(e),!0;if(ft&&e.nodeType===Ue){const t=ln(e.textContent);e.textContent!==t&&(H(n.removed,{element:e.cloneNode()}),e.textContent=t)}return dn(se.afterSanitizeElements,e,null),!1},mn=function(e,t,n){if(it[t])return!1;if(vt&&("id"===t||"name"===t)&&(n in r||n in $t))return!1;const o=tt[t]||at.attributeCheck instanceof Function&&at.attributeCheck(t,e);if(lt&&oe(Qe,t));else if(st&&oe(Ve,t));else if(o)if(kt[t]);else if(oe(Ze,$(n,Xe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==X(n,"data:")||!It[e]){if(ct&&!oe($e,$(n,Xe,"")));else if(n)return!1}else;else if(!(gn(e)&&(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,e)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(e))&&(rt.attributeNameCheck instanceof RegExp&&oe(rt.attributeNameCheck,t)||rt.attributeNameCheck instanceof Function&&rt.attributeNameCheck(t,e))||"is"===t&&rt.allowCustomizedBuiltInElements&&(rt.tagNameCheck instanceof RegExp&&oe(rt.tagNameCheck,n)||rt.tagNameCheck instanceof Function&&rt.tagNameCheck(n))))return!1;return!0},yn=le({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),gn=function(e){return!yn[Y(e)]&&oe(Ke,e)},bn=function(e,t,n,r){if(S&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(e,t)){case"TrustedHTML":return _(r);case"TrustedScriptURL":return function(e){C(),O++;try{return S.createScriptURL(e)}finally{O--}}(r)}return r},Tn=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),un(e)?tn(e):B(n.removed)}catch(n){rn(t,e)}},wn=function(e){dn(se.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||un(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt,forceKeepAttr:void 0};let r=t.length;const o=Qt(e.nodeName);for(;r--;){const i=t[r],a=i.name,s=i.namespaceURI,l=i.value,c=Qt(a),u=l;let f="value"===a?u:K(u);n.attrName=c,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,dn(se.uponSanitizeAttribute,e,n),f=n.attrValue,!At||"id"!==c&&"name"!==c||0===X(f,St)||(rn(a,e),f=St+f),pt&&oe(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?rn(a,e):"attributename"===c&&V(f,"href")?rn(a,e):n.forceKeepAttr||(n.keepAttr&&(ut||!oe(Le,f))?(ft&&(f=ln(f)),mn(o,c,f)?(f=bn(o,c,s,f),f!==u&&Tn(e,a,s,f)):rn(a,e)):rn(a,e))}dn(se.afterSanitizeAttributes,e,null)},vn=function(e){let t=null;const n=sn(e);for(dn(se.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){dn(se.uponSanitizeShadowNode,t,null),hn(t),wn(t),fn(t.content)&&vn(t.content);if((v?v(t):t.nodeType)===ze){const e=T(t);fn(e)&&(An(e),vn(e))}}dn(se.afterSanitizeShadowDOM,e,null)},An=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){vn(e.shadow);continue}const n=e.node,r=(v?v(n):n.nodeType)===ze,o=g(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=A?A(n):null;if("string"==typeof e&&"template"===Qt(e)){const e=n.content;fn(e)&&t.push({node:e,shadow:null})}}if(r){const e=T(n);fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(zt=!e,zt&&(e="\\x3c!--\\x3e"),"string"!=typeof e&&!pn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return Z(e);case"boolean":return J(e);case"bigint":return ee?ee(e):"0";case"symbol":return te?te(e):"Symbol()";case"undefined":default:return re(e);case"function":case"object":{if(null===e)return re(e);const t=e,n=fe(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:re(e)}return re(e)}}}(e)))throw ie("dirty is not a string, aborting");if(!n.isSupported)return e;ht?(Je=mt,tt=yt):Kt(t),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(Je=ue(Je)),se.uponSanitizeAttribute.length>0&&(tt=ue(tt)),n.removed=[];const l=Rt&&"string"!=typeof e&&pn(e);if(l){const t=A?A(e):e.nodeName;if("string"==typeof t){const e=Qt(t);if(!Je[e]||ot[e])throw ie("root node is forbidden and cannot be sanitized in-place")}if(un(e))throw ie("root node is clobbered and cannot be sanitized in-place");try{An(e)}catch(t){throw nn(e),t}}else if(pn(e))r=an("\\x3c!----\\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ze&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),An(i);else{if(!bt&&!ft&&!dt&&-1===e.indexOf("<"))return S&&wt?_(e):e;if(r=an(e),!r)return bt?null:wt?R:""}r&&gt&&tn(r.firstChild);const c=sn(l?e:r);try{for(;a=c.nextNode();)hn(a),wn(a),fn(a.content)&&vn(a.content)}catch(t){throw l&&nn(e),t}if(l)return F(n.removed,e=>{e.element&&function(e){const t=[e];for(;t.length>0;){const e=t.pop();(v?v(e):e.nodeType)===ze&&on(e);const n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}}(e.element)}),ft&&cn(e),e;if(bt){if(ft&&cn(r),Tt)for(s=U.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(tt.shadowroot||tt.shadowrootmode)&&(s=ae.call(o,s,!0)),s}let u=dt?r.outerHTML:r.innerHTML;return dt&&Je["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&oe(ke,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\\n"+u),ft&&(u=ln(u)),S&&wt?_(u):u},n.setConfig=function(){Kt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ht=!0,mt=Je,yt=tt},n.clearConfig=function(){Vt=null,ht=!1,mt=null,yt=null,S=E,R=""},n.isValidAttribute=function(e,t,n){Vt||Kt({});const r=Qt(e),o=Qt(t);return mn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&ne(se,e)&&H(se[e],t)},n.removeHook=function(e,t){if(ne(se,e)){if(void 0!==t){const n=j(se[e],t);return-1===n?void 0:W(se[e],n,1)[0]}return B(se[e])}},n.removeHooks=function(e){ne(se,e)&&(se[e]=[])},n.removeAllHooks=function(){se={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();Symbol.for("nutrient.web.trustedTypesPolicy");new Set(["background-color","color","font-family","font-size","font-style","font-weight","text-align","text-decoration"]),new Set(["auto","aqua","black","block","blue","bold","both","bottom","brown","center","collapse","dashed","dotted","fuchsia","gray","green","!important","initial","italic","left","lime","maroon","medium","middle","none","navy","normal","nowrap","olive","pointer","purple","red","right","solid","silver","teal","top","transparent","underline","white","yellow"]);var Ye=n(369),Qe=n.n(Ye);class Ve{constructor(e,t,n){o(this,"queue",new(Qe())((e,t)=>e.priority-t.priority)),o(this,"queuedRequests",new Map),o(this,"activeRequests",new Map),o(this,"isProcessing",!1),o(this,"renderCallbacks",new Map),o(this,"errorCallbacks",new Map),o(this,"latestViewportUpdateId",new Map),o(this,"maxConcurrentRequests",1),o(this,"activeRequestCount",0),this.renderChannel=e,this.maxConcurrentRequests=t,this.isServer=n}static async create(e){const t=await e.isServer();return new Ve(e,t?4:1,t)}setCallbacks(e,t,n){this.renderCallbacks.set(e,t),this.errorCallbacks.set(e,n)}enqueue(e,t){const n=Date.now();if(0===t.length)return;let r=this.latestViewportUpdateId.get(e)??-1/0;for(const e of t)e.viewportRenderUpdateId>r&&(r=e.viewportRenderUpdateId);const o=this.latestViewportUpdateId.get(e);void 0!==o&&r>o&&this.cancelStaleRequests(e,r),this.latestViewportUpdateId.set(e,r);for(const r of t){const t=this.activeRequests.get(r.id);if(t){if(!t.cancelled)continue;this.activeRequests.delete(r.id)}const o=this.queuedRequests.get(r.id);o&&(o.cancelled=!0,this.queuedRequests.delete(r.id));const i={request:r,sessionId:e,priority:this.calculatePriority(r),timestamp:n,cancelled:!1};this.queue.push(i),this.queuedRequests.set(r.id,i)}this.isProcessing||this.startProcessing()}cancel(e,t){for(const n of t){const t=this.queuedRequests.get(n);t&&t.sessionId===e&&(t.cancelled=!0);const r=this.activeRequests.get(n);r&&r.sessionId===e&&(r.cancelled=!0)}}cancelSession(e){for(const t of this.queuedRequests.values())t.sessionId===e&&(t.cancelled=!0);for(const t of this.activeRequests.values())t.sessionId===e&&(t.cancelled=!0);this.latestViewportUpdateId.delete(e)}async startProcessing(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.size>0||this.activeRequestCount>0;){for(;this.activeRequestCount<this.maxConcurrentRequests&&this.queue.size>0;){const e=this.getNextRequest();if(!e)break;this.activeRequestCount++,this.processRequest(e).finally(()=>{this.activeRequestCount--})}await new Promise(e=>setTimeout(e,0))}this.isProcessing=!1}}getNextRequest(){for(;this.queue.size>0;){const e=this.queue.pop();if(!e)break;if(this.queuedRequests.delete(e.request.id),!e.cancelled)return this.activeRequests.set(e.request.id,e),e}return null}async processRequest(e){const t=this.collectBatch(e);if(t.length>1)return void await this.processBatch(t);const{request:n,sessionId:r}=e;try{if(e.cancelled)return;const t=await this.renderTile(n);if(e.cancelled)return;const o=this.renderCallbacks.get(r);o&&o(r,n.id,t)}catch(t){if(console.error("[SharedRenderQueue] Error processing request:",t),!e.cancelled){const e=this.errorCallbacks.get(r);e&&e(r,n.id,t)}}finally{this.activeRequests.delete(n.id)}}collectBatch(e){if(this.isServer||this.maxConcurrentRequests>1)return[e];if(!("function"==typeof this.renderChannel.renderTiles))return[e];const{request:t,sessionId:n}=e;if(t.options.disableBatch)return[e];const r=[e],o=[],i=8-r.length;for(const e of this.queuedRequests.values()){if(o.length>=i)break;e.cancelled||e.sessionId!==n||this.canBatchWith(e,t)&&o.push(e)}for(const e of o)this.queuedRequests.delete(e.request.id),this.activeRequests.set(e.request.id,e),r.push(e);return r}canBatchWith(e,t){const{sourceInfo:n,options:r,viewportRenderUpdateId:o}=t,i=e.request,a=i.options;return i.viewportRenderUpdateId===o&&i.sourceInfo.pageIndex===n.pageIndex&&i.sourceInfo.pageSize.width===n.pageSize.width&&i.sourceInfo.pageSize.height===n.pageSize.height&&a.renderForPrinting===r.renderForPrinting&&a.renderText===r.renderText&&a.renderAnnotations===r.renderAnnotations&&Boolean(a.disableBatch)===Boolean(r.disableBatch)&&(a.priority||"high")===(r.priority||"high")}async processBatch(e){const[t]=e,{sessionId:n}=t;try{const t=await this.renderTiles(e.map(e=>e.request));if(t.length!==e.length)return console.warn(`[SharedRenderQueue] renderTiles returned ${t.length} results for ${e.length} requests; falling back to per-tile rendering.`),void await Promise.all(e.map(async e=>{if(!e.cancelled)try{const t=await this.renderTile(e.request),r=this.renderCallbacks.get(n);r&&r(n,e.request.id,t)}catch(t){if(!e.cancelled){const r=this.errorCallbacks.get(n);r&&r(n,e.request.id,t)}}finally{this.activeRequests.delete(e.request.id)}}));for(let r=0;r<e.length;r++){const o=e[r],i=t[r];if(o.cancelled)continue;const a=this.renderCallbacks.get(n);a&&a(n,o.request.id,i),this.activeRequests.delete(o.request.id)}}catch(t){console.error("[SharedRenderQueue] Error processing request batch:",t);for(const r of e){if(!r.cancelled){const e=this.errorCallbacks.get(n);e&&e(n,r.request.id,t)}this.activeRequests.delete(r.request.id)}}}async renderTile(e){const{sourceInfo:t,options:n}=e,r=await this.renderChannel.render(t.pageIndex,t.pageSize,t.tileRect,{renderForPrinting:n.renderForPrinting,renderText:n.renderText,priority:n.priority||"high"});return{buffer:r,format:n.format||"bitmap",width:r.width,height:r.height}}async renderTiles(e){const{sourceInfo:t,options:n}=e[0],r=e.map(e=>e.sourceInfo.tileRect);return(await this.renderChannel.renderTiles(t.pageIndex,t.pageSize,r,{renderForPrinting:n.renderForPrinting,renderText:n.renderText,priority:n.priority||"high"})).map(e=>({buffer:e,format:n.format||"bitmap",width:e.width,height:e.height}))}calculatePriority(e){let t=0;"high"===e.options.priority&&(t-=1e3),e.targetInfo.isVisible&&(t-=500),t-=10*e.viewportRenderUpdateId;return t+=100*Math.abs(e.targetInfo.scale-e.targetInfo.targetScale),t}cancelStaleRequests(e,t){for(const[n,r]of this.queuedRequests.entries())r.sessionId===e&&r.request.viewportRenderUpdateId<t&&(r.cancelled=!0,this.queuedRequests.delete(n));for(const n of this.activeRequests.values())n.sessionId===e&&n.request.viewportRenderUpdateId<t&&(n.cancelled=!0)}}p(new class{constructor(){o(this,"sharedRenderQueue",null),o(this,"sharedRenderQueuePromise",null),o(this,"sessionCallbacks",new Map),o(this,"sessionErrors",new Map),o(this,"renderChannel",null),o(this,"sessionCounter",0),o(this,"viewportUpdateCounter",0)}async setupRenderMessageChannel(e){this.renderChannel=h(e)}async getSharedRenderQueue(){this.sharedRenderQueuePromise||(!function(e,t){if(!e)throw new N(`Assertion failed: ${t||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}(this.renderChannel,"Setup render channel first"),this.sharedRenderQueuePromise=Ve.create(this.renderChannel));const e=await this.sharedRenderQueuePromise;return this.sharedRenderQueue=e,e}async beginRenderer(e,t,n,r,o){const i=await this.getSharedRenderQueue(),a=`page-${e}-${this.sessionCounter++}`;return this.sessionCallbacks.set(a,r),this.sessionErrors.set(a,o),i.setCallbacks(a,this.handleTileReady.bind(this),this.handleTileError.bind(this)),a}async requestTiles(e,t){if(!this.sharedRenderQueue)return void console.warn("SharedRenderQueue not initialized");const n=++this.viewportUpdateCounter,r=t.map(e=>({id:e.id,viewportRenderUpdateId:n,sourceInfo:{pageIndex:e.pageIndex,pageSize:e.pageSize,tileRect:e.tileRect},targetInfo:{scale:e.mip,targetScale:e.mip,isVisible:!0,canvasRect:{left:0,top:0,width:e.tileRect.width,height:e.tileRect.height}},options:{renderAnnotations:e.options.renderAnnotations,renderText:e.options.renderText,format:"bitmap",priority:e.options.priority,disableBatch:e.options.disableBatch}}));this.sharedRenderQueue.enqueue(e,r)}async cancelTiles(e,t){this.sharedRenderQueue&&this.sharedRenderQueue.cancel(e,t)}async endRenderer(e){this.sessionCallbacks.delete(e),this.sessionErrors.delete(e),this.sharedRenderQueue?.cancelSession(e)}handleTileReady(e,t,n){const r=this.sessionCallbacks.get(e);r&&r(e,t,n)}handleTileError(e,t,n){const r=this.sessionErrors.get(e);r&&r(e,t,n)}})})()})();',"Worker",void 0,void 0)}},37737(e){function t(e){var t=function(){var e=self||window;if(void 0===e.trustedTypes)return null;try{return e.trustedTypes.createPolicy("nutrient-web-sdk#webpack-worker",{createScriptURL:function(e){return e}})}catch(t){return e.trustedTypes.defaultPolicy||null}}();return t?t.createScriptURL(e):e}e.exports=function(e,n,r,o){var i=self||window;try{try{var a,s="\n        // Trusted Types policy for worker context - use Webpack's policy naming\n        if (typeof trustedTypes !== 'undefined') {\n          try {\n            var workerPolicy = trustedTypes.createPolicy('nutrient-web-sdk#webpack-worker', {\n              createScriptURL: function(s) { return s; }\n            });\n            // Wrap importScripts to use Trusted Types\n            var originalImportScripts = importScripts;\n            importScripts = function() {\n              var args = Array.prototype.slice.call(arguments);\n              var trustedArgs = args.map(function(url) {\n                return workerPolicy.createScriptURL(url);\n              });\n              return originalImportScripts.apply(this, trustedArgs);\n            };\n          } catch (e) {\n            // Policy creation failed, continue without Trusted Types\n          }\n        }\n      "+e;try{a=new i.Blob([s])}catch(e){(a=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(s),a=a.getBlob()}var l=i.URL||i.webkitURL,c=l.createObjectURL(a),u=t(c),f=new i[n](u,r);return l.revokeObjectURL(c),f}catch(o){var p=t("data:application/javascript,".concat(encodeURIComponent(e)));return new i[n](p,r)}}catch(e){if(!o)throw Error("Inline worker is not supported");var d=t(o);return new i[n](d,r)}}}}]);