/*!
 * 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([[11],{23848(t,e,n){n.d(e,{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 */(()=>{"use strict";var t,e={},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.m=e,r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,n)=>(r.f[n](t,e),e),[])),r.u=t=>"nutrient-viewer-lib/chunk-"+t+"-0e29eaa2cc584060.worker.js",r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.tt=()=>(void 0===t&&(t={createScriptURL:t=>t},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(t=trustedTypes.createPolicy("nutrient-web-sdk#webpack",t))),t),r.tu=t=>r.tt().createScriptURL(t),r.p="",(()=>{var t={224:1};r.f.i=(e,n)=>{t[e]||importScripts(r.tu(r.p+r.u(e)))};var e=self.webpackChunkNutrientViewer=self.webpackChunkNutrientViewer||[],n=e.push.bind(e);e.push=e=>{var[o,i,a]=e;for(var s in i)r.o(i,s)&&(r.m[s]=i[s]);for(a&&a(r);o.length;)t[o.pop()]=1;n(e)}})();var o={};r.r(o),r.d(o,{default:()=>Ct});const i=function t(e){let n;return n=e instanceof Error?e:new Error(e),Object.setPrototypeOf(n,t.prototype),n};i.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const a=i;function s(t,e){if(!t)throw new a(`Assertion failed: ${e||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}function l(t){return"[object Object]"===Object.prototype.toString.call(t)}function c(){console.warn(...arguments)}["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",\'[tabindex]:not([tabindex^="-"])\'].join(",");function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function f(t){var e=function(t,e){if("object"!=u(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==u(e)?e:e+""}function p(t,e,n){return(e=f(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}new WeakMap;function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}(t,e)||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 h=Object.entries,g=Object.setPrototypeOf,y=Object.isFrozen,b=Object.getPrototypeOf,w=Object.getOwnPropertyDescriptor;let S=Object.freeze,T=Object.seal,E=Object.create,v="undefined"!=typeof Reflect&&Reflect,_=v.apply,A=v.construct;S||(S=function(t){return t}),T||(T=function(t){return t}),_||(_=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),A||(A=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const N=q(Array.prototype.forEach),O=q(Array.prototype.lastIndexOf),I=q(Array.prototype.pop),k=q(Array.prototype.push),x=q(Array.prototype.splice),C=Array.isArray,D=q(String.prototype.toLowerCase),R=q(String.prototype.toString),M=q(String.prototype.match),U=q(String.prototype.replace),L=q(String.prototype.indexOf),F=q(String.prototype.trim),P=q(Number.prototype.toString),z=q(Boolean.prototype.toString),$="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),j="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),H=q(Object.prototype.hasOwnProperty),B=q(Object.prototype.toString),W=q(RegExp.prototype.test),G=(Y=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return A(Y,e)});var Y;function q(t){return function(e){e instanceof RegExp&&(e.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 _(t,e,r)}}function K(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;if(g&&g(t,null),!C(e))return t;let r=e.length;for(;r--;){let o=e[r];if("string"==typeof o){const t=n(o);t!==o&&(y(e)||(e[r]=t),o=t)}t[o]=!0}return t}function V(t){for(let e=0;e<t.length;e++){H(t,e)||(t[e]=null)}return t}function X(t){const e=E(null);for(const r of h(t)){var n=d(r,2);const o=n[0],i=n[1];H(t,o)&&(C(i)?e[o]=V(i):i&&"object"==typeof i&&i.constructor===Object?e[o]=X(i):e[o]=i)}return e}function Z(t,e){for(;null!==t;){const n=w(t,e);if(n){if(n.get)return q(n.get);if("function"==typeof n.value)return q(n.value)}t=b(t)}return function(){return null}}const Q=S(["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"]),J=S(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=S(["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"]),et=S(["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"]),nt=S(["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"]),rt=S(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ot=S(["#text"]),it=S(["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"]),at=S(["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"]),st=S(["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"]),lt=S(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ct=T(/{{[\\w\\W]*|^[\\w\\W]*}}/g),ut=T(/<%[\\w\\W]*|^[\\w\\W]*%>/g),ft=T(/\\${[\\w\\W]*/g),pt=T(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),mt=T(/^aria-[\\-\\w]+$/),dt=T(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),ht=T(/^(?:\\w+script|data):/i),gt=T(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),yt=T(/^html$/i),bt=T(/^[a-z][.\\w]*(-[.\\w]+)+$/i),wt=T(/<[/\\w!]/g),St=T(/<[/\\w]/g),Tt=T(/<\\/no(script|embed|frames)/i),Et=T(/\\/>/i),vt=1,_t=3,At=7,Nt=8,Ot=9,It=11,kt=function(){return"undefined"==typeof window?null:window},xt=function(t,e,n,r){return H(t,e)&&C(t[e])?K(r.base?X(r.base):{},t[e],r.transform):n};var Ct=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kt();const n=e=>t(e);if(n.version="3.4.11",n.removed=[],!e||!e.document||e.document.nodeType!==Ot||!e.Element)return n.isSupported=!1,n;let r=e.document;const o=r,i=o.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap;void 0===u&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,p=e.trustedTypes,m=l.prototype,d=Z(m,"cloneNode"),g=Z(m,"remove"),y=Z(m,"nextSibling"),b=Z(m,"childNodes"),w=Z(m,"parentNode"),v=Z(m,"shadowRoot"),_=Z(m,"attributes"),A=s&&s.prototype?Z(s.prototype,"nodeType"):null,Y=s&&s.prototype?Z(s.prototype,"nodeName"):null;if("function"==typeof a){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let q,V,Ct="",Dt=!1,Rt=0;const Mt=function(){if(Rt>0)throw G(\'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.\')},Ut=function(t){Mt(),Rt++;try{return q.createHTML(t)}finally{Rt--}},Lt=function(){return Dt||(V=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,i),Dt=!0),V},Ft=r,Pt=Ft.implementation,zt=Ft.createNodeIterator,$t=Ft.createDocumentFragment,jt=Ft.getElementsByTagName,Ht=o.importNode;let Bt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof h&&"function"==typeof w&&Pt&&void 0!==Pt.createHTMLDocument;const Wt=ct,Gt=ut,Yt=ft,qt=pt,Kt=mt,Vt=ht,Xt=gt,Zt=bt;let Qt=dt,Jt=null;const te=K({},[...Q,...J,...tt,...nt,...ot]);let ee=null;const ne=K({},[...it,...at,...st,...lt]);let re=Object.seal(E(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),oe=null,ie=null;const ae=Object.seal(E(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let se=!0,le=!0,ce=!1,ue=!0,fe=!1,pe=!0,me=!1,de=!1,he=null,ge=null,ye=!1,be=!1,we=!1,Se=!1,Te=!0,Ee=!1;const ve="user-content-";let _e=!0,Ae=!1,Ne={},Oe=null;const Ie=K({},["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 ke=null;const xe=K({},["audio","video","img","source","image","track"]);let Ce=null;const De=K({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Re="http://www.w3.org/1998/Math/MathML",Me="http://www.w3.org/2000/svg",Ue="http://www.w3.org/1999/xhtml";let Le=Ue,Fe=!1,Pe=null;const ze=K({},[Re,Me,Ue],R),$e=S(["mi","mo","mn","ms","mtext"]);let je=K({},$e);const He=S(["annotation-xml"]);let Be=K({},He);const We=K({},["title","style","font","a","script"]);let Ge=null;const Ye=["application/xhtml+xml","text/html"];let qe=null,Ke=null;const Ve=r.createElement("form"),Xe=function(t){return t instanceof RegExp||t instanceof Function},Ze=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ke&&Ke===t)return;t&&"object"==typeof t||(t={}),t=X(t),Ge=-1===Ye.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,qe="application/xhtml+xml"===Ge?R:D,Jt=xt(t,"ALLOWED_TAGS",te,{transform:qe}),ee=xt(t,"ALLOWED_ATTR",ne,{transform:qe}),Pe=xt(t,"ALLOWED_NAMESPACES",ze,{transform:R}),Ce=xt(t,"ADD_URI_SAFE_ATTR",De,{transform:qe,base:De}),ke=xt(t,"ADD_DATA_URI_TAGS",xe,{transform:qe,base:xe}),Oe=xt(t,"FORBID_CONTENTS",Ie,{transform:qe}),oe=xt(t,"FORBID_TAGS",X({}),{transform:qe}),ie=xt(t,"FORBID_ATTR",X({}),{transform:qe}),Ne=!!H(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?X(t.USE_PROFILES):t.USE_PROFILES),se=!1!==t.ALLOW_ARIA_ATTR,le=!1!==t.ALLOW_DATA_ATTR,ce=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,fe=t.SAFE_FOR_TEMPLATES||!1,pe=!1!==t.SAFE_FOR_XML,me=t.WHOLE_DOCUMENT||!1,be=t.RETURN_DOM||!1,we=t.RETURN_DOM_FRAGMENT||!1,Se=t.RETURN_TRUSTED_TYPE||!1,ye=t.FORCE_BODY||!1,Te=!1!==t.SANITIZE_DOM,Ee=t.SANITIZE_NAMED_PROPS||!1,_e=!1!==t.KEEP_CONTENT,Ae=t.IN_PLACE||!1,Qt=function(t){try{return W(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:dt,Le="string"==typeof t.NAMESPACE?t.NAMESPACE:Ue,je=H(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof t.MATHML_TEXT_INTEGRATION_POINTS?X(t.MATHML_TEXT_INTEGRATION_POINTS):K({},$e),Be=H(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&"object"==typeof t.HTML_INTEGRATION_POINTS?X(t.HTML_INTEGRATION_POINTS):K({},He);const e=H(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&"object"==typeof t.CUSTOM_ELEMENT_HANDLING?X(t.CUSTOM_ELEMENT_HANDLING):E(null);if(re=E(null),H(e,"tagNameCheck")&&Xe(e.tagNameCheck)&&(re.tagNameCheck=e.tagNameCheck),H(e,"attributeNameCheck")&&Xe(e.attributeNameCheck)&&(re.attributeNameCheck=e.attributeNameCheck),H(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(re.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),T(re),fe&&(le=!1),we&&(be=!0),Ne&&(Jt=K({},ot),ee=E(null),!0===Ne.html&&(K(Jt,Q),K(ee,it)),!0===Ne.svg&&(K(Jt,J),K(ee,at),K(ee,lt)),!0===Ne.svgFilters&&(K(Jt,tt),K(ee,at),K(ee,lt)),!0===Ne.mathMl&&(K(Jt,nt),K(ee,st),K(ee,lt))),ae.tagCheck=null,ae.attributeCheck=null,H(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?ae.tagCheck=t.ADD_TAGS:C(t.ADD_TAGS)&&(Jt===te&&(Jt=X(Jt)),K(Jt,t.ADD_TAGS,qe))),H(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?ae.attributeCheck=t.ADD_ATTR:C(t.ADD_ATTR)&&(ee===ne&&(ee=X(ee)),K(ee,t.ADD_ATTR,qe))),H(t,"ADD_URI_SAFE_ATTR")&&C(t.ADD_URI_SAFE_ATTR)&&K(Ce,t.ADD_URI_SAFE_ATTR,qe),H(t,"FORBID_CONTENTS")&&C(t.FORBID_CONTENTS)&&(Oe===Ie&&(Oe=X(Oe)),K(Oe,t.FORBID_CONTENTS,qe)),H(t,"ADD_FORBID_CONTENTS")&&C(t.ADD_FORBID_CONTENTS)&&(Oe===Ie&&(Oe=X(Oe)),K(Oe,t.ADD_FORBID_CONTENTS,qe)),_e&&(Jt["#text"]=!0),me&&K(Jt,["html","head","body"]),Jt.table&&(K(Jt,["tbody"]),delete oe.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw G(\'TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.\');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw G(\'TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.\');const e=q;q=t.TRUSTED_TYPES_POLICY;try{Ct=Ut("")}catch(t){throw q=e,t}}else null===t.TRUSTED_TYPES_POLICY?(q=void 0,Ct=""):(void 0===q&&(q=Lt()),q&&"string"==typeof Ct&&(Ct=Ut("")));S&&S(t),Ke=t},Qe=K({},[...J,...tt,...et]),Je=K({},[...nt,...rt]),tn=function(t){let e=w(t);e&&e.tagName||(e={namespaceURI:Le,tagName:"template"});const n=D(t.tagName),r=D(e.tagName);return!!Pe[t.namespaceURI]&&(t.namespaceURI===Me?function(t,e,n){return e.namespaceURI===Ue?"svg"===t:e.namespaceURI===Re?"svg"===t&&("annotation-xml"===n||je[n]):Boolean(Qe[t])}(n,e,r):t.namespaceURI===Re?function(t,e,n){return e.namespaceURI===Ue?"math"===t:e.namespaceURI===Me?"math"===t&&Be[n]:Boolean(Je[t])}(n,e,r):t.namespaceURI===Ue?function(t,e,n){return!(e.namespaceURI===Me&&!Be[n])&&!(e.namespaceURI===Re&&!je[n])&&!Je[t]&&(We[t]||!Qe[t])}(n,e,r):!("application/xhtml+xml"!==Ge||!Pe[t.namespaceURI]))},en=function(t){k(n.removed,{element:t});try{w(t).removeChild(t)}catch(e){if(g(t),!w(t))throw G("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nn=function(t){const e=b(t);if(e){const t=[];N(e,e=>{k(t,e)}),N(t,t=>{try{g(t)}catch(t){}})}const n=_(t);if(n)for(let e=n.length-1;e>=0;--e){const r=n[e],o=r&&r.name;if("string"==typeof o)try{t.removeAttribute(o)}catch(t){}}},rn=function(t,e){try{k(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){k(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(be||we)try{en(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},on=function(t){const e=_(t);if(e)for(let n=e.length-1;n>=0;--n){const r=e[n],o=r&&r.name;if("string"==typeof o&&!ee[qe(o)])try{t.removeAttribute(o)}catch(t){}}},an=function(t){let e=null,n=null;if(ye)t="<remove></remove>"+t;else{const e=M(t,/^[\\r\\n\\t ]+/);n=e&&e[0]}"application/xhtml+xml"===Ge&&Le===Ue&&(t=\'<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>\'+t+"</body></html>");const o=q?Ut(t):t;if(Le===Ue)try{e=(new f).parseFromString(o,Ge)}catch(t){}if(!e||!e.documentElement){e=Pt.createDocument(Le,"template",null);try{e.documentElement.innerHTML=Fe?Ct:o}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Le===Ue?jt.call(e,me?"html":"body")[0]:me?e.documentElement:i},sn=function(t){return zt.call(t.ownerDocument||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(t){return t=U(t,Wt," "),t=U(t,Gt," "),t=U(t,Yt," ")},cn=function(t){var e;t.normalize();const n=zt.call(t.ownerDocument||t,t,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===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");o&&N(o,t=>{fn(t.content)&&cn(t.content)})},un=function(t){const e=Y?Y(t):null;return"string"==typeof e&&("form"===qe(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==_(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==A(t)||t.childNodes!==b(t)))},fn=function(t){if(!A||"object"!=typeof t||null===t)return!1;try{return A(t)===It}catch(t){return!1}},pn=function(t){if(!A||"object"!=typeof t||null===t)return!1;try{return"number"==typeof A(t)}catch(t){return!1}};function mn(t,e,r){0!==t.length&&N(t,t=>{t.call(n,e,r,Ke)})}const dn=function(t){if(mn(Bt.beforeSanitizeElements,t,null),un(t))return en(t),!0;const e=qe(Y?Y(t):t.nodeName);if(mn(Bt.uponSanitizeElement,t,{tagName:e,allowedTags:Jt}),function(t,e){return!!(pe&&t.hasChildNodes()&&!pn(t.firstElementChild)&&W(wt,t.textContent)&&W(wt,t.innerHTML))||!(!pe||t.namespaceURI!==Ue||"style"!==e||!pn(t.firstElementChild))||t.nodeType===At||!(!pe||t.nodeType!==Nt||!W(St,t.data))}(t,e))return en(t),!0;if(oe[e]||!(ae.tagCheck instanceof Function&&ae.tagCheck(e))&&!Jt[e])return function(t,e){if(!oe[e]&&yn(e)){if(re.tagNameCheck instanceof RegExp&&W(re.tagNameCheck,e))return!1;if(re.tagNameCheck instanceof Function&&re.tagNameCheck(e))return!1}if(_e&&!Oe[e]){const e=w(t),n=b(t);if(n&&e)for(let r=n.length-1;r>=0;--r){const o=Ae?n[r]:d(n[r],!0);e.insertBefore(o,y(t))}}return en(t),!0}(t,e);if((A?A(t):t.nodeType)===vt&&!tn(t))return en(t),!0;if(("noscript"===e||"noembed"===e||"noframes"===e)&&W(Tt,t.innerHTML))return en(t),!0;if(fe&&t.nodeType===_t){const e=ln(t.textContent);t.textContent!==e&&(k(n.removed,{element:t.cloneNode()}),t.textContent=e)}return mn(Bt.afterSanitizeElements,t,null),!1},hn=function(t,e,n){if(ie[e])return!1;if(Te&&("id"===e||"name"===e)&&(n in r||n in Ve))return!1;const o=ee[e]||ae.attributeCheck instanceof Function&&ae.attributeCheck(e,t);if(le&&W(qt,e));else if(se&&W(Kt,e));else if(o)if(Ce[e]);else if(W(Qt,U(n,Xt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==L(n,"data:")||!ke[t]){if(ce&&!W(Vt,U(n,Xt,"")));else if(n)return!1}else;else if(!(yn(t)&&(re.tagNameCheck instanceof RegExp&&W(re.tagNameCheck,t)||re.tagNameCheck instanceof Function&&re.tagNameCheck(t))&&(re.attributeNameCheck instanceof RegExp&&W(re.attributeNameCheck,e)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(e,t))||"is"===e&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&W(re.tagNameCheck,n)||re.tagNameCheck instanceof Function&&re.tagNameCheck(n))))return!1;return!0},gn=K({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),yn=function(t){return!gn[D(t)]&&W(Zt,t)},bn=function(t,e,n,r){if(q&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!n)switch(p.getAttributeType(t,e)){case"TrustedHTML":return Ut(r);case"TrustedScriptURL":return function(t){Mt(),Rt++;try{return q.createScriptURL(t)}finally{Rt--}}(r)}return r},wn=function(t,e,r,o){try{r?t.setAttributeNS(r,e,o):t.setAttribute(e,o),un(t)?en(t):I(n.removed)}catch(n){rn(e,t)}},Sn=function(t){mn(Bt.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||un(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0};let r=e.length;const o=qe(t.nodeName);for(;r--;){const i=e[r],a=i.name,s=i.namespaceURI,l=i.value,c=qe(a),u=l;let f="value"===a?u:F(u);n.attrName=c,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,mn(Bt.uponSanitizeAttribute,t,n),f=n.attrValue,!Ee||"id"!==c&&"name"!==c||0===L(f,ve)||(rn(a,t),f=ve+f),pe&&W(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)?rn(a,t):"attributename"===c&&M(f,"href")?rn(a,t):n.forceKeepAttr||(n.keepAttr&&(ue||!W(Et,f))?(fe&&(f=ln(f)),hn(o,c,f)?(f=bn(o,c,s,f),f!==u&&wn(t,a,s,f)):rn(a,t)):rn(a,t))}mn(Bt.afterSanitizeAttributes,t,null)},Tn=function(t){let e=null;const n=sn(t);for(mn(Bt.beforeSanitizeShadowDOM,t,null);e=n.nextNode();){mn(Bt.uponSanitizeShadowNode,e,null),dn(e),Sn(e),fn(e.content)&&Tn(e.content);if((A?A(e):e.nodeType)===vt){const t=v(e);fn(t)&&(En(t),Tn(t))}}mn(Bt.afterSanitizeShadowDOM,t,null)},En=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){Tn(t.shadow);continue}const n=t.node,r=(A?A(n):n.nodeType)===vt,o=b(n);if(o)for(let t=o.length-1;t>=0;--t)e.push({node:o[t],shadow:null});if(r){const t=Y?Y(n):null;if("string"==typeof t&&"template"===qe(t)){const t=n.content;fn(t)&&e.push({node:t,shadow:null})}}if(r){const t=v(n);fn(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,s=null;if(Fe=!t,Fe&&(t="\\x3c!--\\x3e"),"string"!=typeof t&&!pn(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return P(t);case"boolean":return z(t);case"bigint":return $?$(t):"0";case"symbol":return j?j(t):"Symbol()";case"undefined":default:return B(t);case"function":case"object":{if(null===t)return B(t);const e=t,n=Z(e,"toString");if("function"==typeof n){const t=n(e);return"string"==typeof t?t:B(t)}return B(t)}}}(t)))throw G("dirty is not a string, aborting");if(!n.isSupported)return t;de?(Jt=he,ee=ge):Ze(e),(Bt.uponSanitizeElement.length>0||Bt.uponSanitizeAttribute.length>0)&&(Jt=X(Jt)),Bt.uponSanitizeAttribute.length>0&&(ee=X(ee)),n.removed=[];const l=Ae&&"string"!=typeof t&&pn(t);if(l){const e=Y?Y(t):t.nodeName;if("string"==typeof e){const t=qe(e);if(!Jt[t]||oe[t])throw G("root node is forbidden and cannot be sanitized in-place")}if(un(t))throw G("root node is clobbered and cannot be sanitized in-place");try{En(t)}catch(e){throw nn(t),e}}else if(pn(t))r=an("\\x3c!----\\x3e"),i=r.ownerDocument.importNode(t,!0),i.nodeType===vt&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),En(i);else{if(!be&&!fe&&!me&&-1===t.indexOf("<"))return q&&Se?Ut(t):t;if(r=an(t),!r)return be?null:Se?Ct:""}r&&ye&&en(r.firstChild);const c=sn(l?t:r);try{for(;a=c.nextNode();)dn(a),Sn(a),fn(a.content)&&Tn(a.content)}catch(e){throw l&&nn(t),e}if(l)return N(n.removed,t=>{t.element&&function(t){const e=[t];for(;e.length>0;){const t=e.pop();(A?A(t):t.nodeType)===vt&&on(t);const n=b(t);if(n)for(let t=n.length-1;t>=0;--t)e.push(n[t])}}(t.element)}),fe&&cn(t),t;if(be){if(fe&&cn(r),we)for(s=$t.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(ee.shadowroot||ee.shadowrootmode)&&(s=Ht.call(o,s,!0)),s}let u=me?r.outerHTML:r.innerHTML;return me&&Jt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&W(yt,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\\n"+u),fe&&(u=ln(u)),q&&Se?Ut(u):u},n.setConfig=function(){Ze(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),de=!0,he=Jt,ge=ee},n.clearConfig=function(){Ke=null,de=!1,he=null,ge=null,q=V,Ct=""},n.isValidAttribute=function(t,e,n){Ke||Ze({});const r=qe(t),o=qe(e);return hn(r,o,n)},n.addHook=function(t,e){"function"==typeof e&&H(Bt,t)&&k(Bt[t],e)},n.removeHook=function(t,e){if(H(Bt,t)){if(void 0!==e){const n=O(Bt[t],e);return-1===n?void 0:x(Bt[t],n,1)[0]}return I(Bt[t])}},n.removeHooks=function(t){H(Bt,t)&&(Bt[t]=[])},n.removeAllHooks=function(){Bt={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"]);async function Dt(t){const e=(await async function(t){try{const e=await fetch(t).catch(e=>{throw new a(`Error fetching dynamic fonts file ${t}. ${e}`)});if(200!==e.status)throw new a(`Error fetching dynamic fonts file ${t}. Status code: ${e.status}`);return e}catch(t){throw t}}(t)).json().catch(e=>{throw new a(`Error parsing dynamic fonts file ${t}. ${e}`)});return e}let Rt=function(t){return t[t.pdf_a_1a=0]="pdf_a_1a",t[t.pdf_a_1b=1]="pdf_a_1b",t[t.pdf_a_2a=2]="pdf_a_2a",t[t.pdf_a_2u=3]="pdf_a_2u",t[t.pdf_a_2b=4]="pdf_a_2b",t[t.pdf_a_3a=5]="pdf_a_3a",t[t.pdf_a_3u=6]="pdf_a_3u",t[t.pdf_a_3b=7]="pdf_a_3b",t[t.pdf_a_4=8]="pdf_a_4",t[t.pdf_a_4e=9]="pdf_a_4e",t[t.pdf_a_4f=10]="pdf_a_4f",t}({});const Mt=/^data:([^;,]+)?;base64,(.*)$/i,Ut=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}(?:==)?|[A-Za-z0-9+/]{3}=?)?$/,Lt=new Set(["original","fixed","fit-width","fit-height","fit-max"]),Ft=new Set(["png","jpg","gif","bmp","tif"]),Pt={"image/png":"png","image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/bmp":"bmp","image/tiff":"tif","image/x-tiff":"tif"};async function zt(t){const e={urlImageReferences:[]},n=$t(t.model,"$.model",e);if(e.urlImageReferences.length>0){const t=await async function(t){const e=Array.from(new Set(t.map(t=>t.normalizedUrl))),n=new Map;for(const e of t){if(!e.preferredFormat)continue;const t=n.get(e.normalizedUrl);if(t){if(t.format!==e.preferredFormat)throw new Error(`Conflicting image formats for URL "${e.normalizedUrl}" between ${t.path} and ${e.path}.`)}else n.set(e.normalizedUrl,{format:e.preferredFormat,path:e.path})}const r=await Promise.all(e.map(t=>async function(t,e){let n;try{n=await fetch(t)}catch(e){throw new Error(`Failed to fetch ${t}. This can happen when the URL is cross-origin without CORS headers. Configure CORS or pass base64/data URL instead.`)}if(!n.ok)throw new Error(`Failed to fetch ${t}: ${n.status} ${n.statusText}.`);const r=new Uint8Array(await n.arrayBuffer()),o=n.headers.get("content-type");if(o?.toLowerCase().includes("image/svg+xml"))throw new Error("svg format is not supported in this release.");const i=function(t){if(!t)return;const e=t.toLowerCase().split(";")[0].trim();return Pt[e]}(o),a=function(t){try{const e=new URL(t).pathname,n=e.split(".").pop()?.toLowerCase();if(!n)return;return Wt(n)??void 0}catch(t){return}}(t),s=e??i??a;if(!s)throw new Error(`Failed to infer image format for ${t}. Provide "format" in the image object.`);return{normalizedUrl:t,base64Data:jt(r),format:s}}(t,n.get(t)?.format)));return new Map(r.map(t=>[t.normalizedUrl,t]))}(e.urlImageReferences);!function(t,e){for(const n of t){const t=e.get(n.normalizedUrl);n.image.source="base64",n.image.data=t.base64Data,null==n.image.format&&t.format&&(n.image.format=t.format),delete n.image.url,delete n.image.path}}(e.urlImageReferences,t)}const r=function(t){if(null==t)return{delimiter:{start:"{",end:"}"}};if(!l(t))throw new Error("$.config must be a valid object.");const e={...t},n=e.delimiter;return e.delimiter=function(t){if(null==t)return{start:"{",end:"}"};if(!l(t))throw new Error("$.config.delimiter must be a valid object.");const e={...t},{start:n,end:r,objectDelimiter:o}=e;if(null!=n&&"string"!=typeof n)throw new Error("$.config.delimiter.start must be a string.");if(null!=r&&"string"!=typeof r)throw new Error("$.config.delimiter.end must be a string.");if(null!=o&&"string"!=typeof o)throw new Error("$.config.delimiter.objectDelimiter must be a string.");return e.start="string"==typeof n?n:"{",e.end="string"==typeof r?r:"}",e}(n),e}(t.config);return{serializedData:JSON.stringify({config:r,model:n},null,2)}}function $t(t,e,n){if(Array.isArray(t))return t.map((t,r)=>$t(t,`${e}[${r}]`,n));if(!l(t))return t;if(function(t){return l(t)&&"image"===t._type}(t))return function(t,e,n){const r={...t},o=function(t,e){if("string"!=typeof t)throw new Error(`${e}.source must be a string.`);if("dataUrl"===t)return"base64";if("base64"===t||"url"===t)return t;if("file"===t)throw new Error(`${e}.source "file" is not supported in public APIs. Use "base64" (or "dataUrl") or "url".`);throw new Error(`${e}.source must be one of "base64", "dataUrl", or "url". Received "${t}".`)}(r.source,e);r.source=o,function(t,e){if(void 0===t.sizing)return;if(!Lt.has(t.sizing))throw new Error(`${e}.sizing must be one of "original", "fixed", "fit-width", "fit-height", "fit-max".`);switch(t.sizing){case"fixed":case"fit-max":Bt(t.width,`${e}.width`),Bt(t.height,`${e}.height`);break;case"fit-width":Bt(t.width,`${e}.width`);break;case"fit-height":Bt(t.height,`${e}.height`)}}(r,e),function(t,e){if(void 0===t.pageNumber)return;if(!Number.isInteger(t.pageNumber)||t.pageNumber<=0)throw new Error(`${e}.pageNumber must be a positive integer.`)}(r,e);const i=function(t,e){if(void 0===t)return;if("string"!=typeof t)throw new Error(`${e}.format must be a string.`);if("svg"===t.toLowerCase().trim())throw new Error(`${e}.format svg is not supported in this release.`);const n=Wt(t);if(!n)throw new Error(`${e}.format must be one of "png", "jpg"/"jpeg", "gif", "bmp", "tif"/"tiff".`);return n}(r.format,e);i&&(r.format=i);switch(o){case"base64":{const t=r.data;if("string"!=typeof t||""===t.trim())throw new Error(`${e}.data must be a non-empty string.`);const n=function(t,e){const n=Mt.exec(t.trim());if(n){const t=(n[1]||"").toLowerCase(),r=n[2];if(!r)throw new Error(`${e} must contain non-empty base64 data.`);if("image/svg+xml"===t)throw new Error(`${e} does not support svg images in this release.`);return Ht(r,e),{isDataUrl:!0}}return Ht(t.trim(),e),{isDataUrl:!1}}(t,`${e}.data`);if(!n.isDataUrl&&!r.format)throw new Error(`${e}.format must be supplied when source is raw base64 data.`);break}case"url":{const t="string"==typeof r.url&&""!==r.url.trim()?r.url.trim():"string"==typeof r.path&&""!==r.path.trim()?r.path.trim():null;if(!t)throw new Error(`${e}.url must be supplied when source is "url".`);const o=function(t,e){let n;try{n=new URL(t.trim())}catch(t){throw new Error(`${e} must be a valid absolute URL.`)}if(!["http:","https:"].includes(n.protocol))throw new Error(`${e} must use http or https.`);return n.toString()}(t,`${e}.url`);r.url=o,n.urlImageReferences.push({path:e,image:r,normalizedUrl:o,preferredFormat:r.format});break}}return r}(t,e,n);const r={};for(const[o,i]of Object.entries(t))r[o]=$t(i,`${e}${Gt(o)}`,n);return r}function jt(t){if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");let e="";for(let n=0;n<t.length;n+=32768){const r=t.subarray(n,n+32768);e+=String.fromCharCode(...r)}return btoa(e)}function Ht(t,e){const n=t.replace(/\\s+/g,"");if(""===n||!Ut.test(n))throw new Error(`${e} must be valid base64 data.`)}function Bt(t,e){if("number"!=typeof t||!Number.isFinite(t)||t<=0)throw new Error(`${e} must be a positive number.`)}function Wt(t){const e=t.toLowerCase().trim();return"jpeg"===e?"jpg":"tiff"===e?"tif":Ft.has(e)?e:null}function Gt(t){return/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}const Yt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const qt=function(t){return"string"==typeof t&&Yt.test(t)};const Kt=function(t){if(!qt(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,255&e,(e=parseInt(t.slice(9,13),16))>>>8,255&e,(e=parseInt(t.slice(14,18),16))>>>8,255&e,(e=parseInt(t.slice(19,23),16))>>>8,255&e,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,255&e)};const Vt=[];for(let t=0;t<256;++t)Vt.push((t+256).toString(16).slice(1));function Xt(t,e=0){return(Vt[t[e+0]]+Vt[t[e+1]]+Vt[t[e+2]]+Vt[t[e+3]]+"-"+Vt[t[e+4]]+Vt[t[e+5]]+"-"+Vt[t[e+6]]+Vt[t[e+7]]+"-"+Vt[t[e+8]]+Vt[t[e+9]]+"-"+Vt[t[e+10]]+Vt[t[e+11]]+Vt[t[e+12]]+Vt[t[e+13]]+Vt[t[e+14]]+Vt[t[e+15]]).toLowerCase()}let Zt;const Qt=new Uint8Array(16);function Jt(t){return 14+(t+64>>>9<<4)+1}function te(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function ee(t,e,n,r,o,i){return te((a=te(te(e,t),te(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function ne(t,e,n,r,o,i,a){return ee(e&n|~e&r,t,e,o,i,a)}function re(t,e,n,r,o,i,a){return ee(e&r|n&~r,t,e,o,i,a)}function oe(t,e,n,r,o,i,a){return ee(e^n^r,t,e,o,i,a)}function ie(t,e,n,r,o,i,a){return ee(n^(e|~r),t,e,o,i,a)}const ae=function(t){return function(t){const e=new Uint8Array(4*t.length);for(let n=0;n<4*t.length;n++)e[n]=t[n>>2]>>>n%4*8&255;return e}(function(t,e){const n=new Uint32Array(Jt(e)).fill(0);n.set(t),n[e>>5]|=128<<e%32,n[n.length-1]=e,t=n;let r=1732584193,o=-271733879,i=-1732584194,a=271733878;for(let e=0;e<t.length;e+=16){const n=r,s=o,l=i,c=a;r=ne(r,o,i,a,t[e],7,-680876936),a=ne(a,r,o,i,t[e+1],12,-389564586),i=ne(i,a,r,o,t[e+2],17,606105819),o=ne(o,i,a,r,t[e+3],22,-1044525330),r=ne(r,o,i,a,t[e+4],7,-176418897),a=ne(a,r,o,i,t[e+5],12,1200080426),i=ne(i,a,r,o,t[e+6],17,-1473231341),o=ne(o,i,a,r,t[e+7],22,-45705983),r=ne(r,o,i,a,t[e+8],7,1770035416),a=ne(a,r,o,i,t[e+9],12,-1958414417),i=ne(i,a,r,o,t[e+10],17,-42063),o=ne(o,i,a,r,t[e+11],22,-1990404162),r=ne(r,o,i,a,t[e+12],7,1804603682),a=ne(a,r,o,i,t[e+13],12,-40341101),i=ne(i,a,r,o,t[e+14],17,-1502002290),o=ne(o,i,a,r,t[e+15],22,1236535329),r=re(r,o,i,a,t[e+1],5,-165796510),a=re(a,r,o,i,t[e+6],9,-1069501632),i=re(i,a,r,o,t[e+11],14,643717713),o=re(o,i,a,r,t[e],20,-373897302),r=re(r,o,i,a,t[e+5],5,-701558691),a=re(a,r,o,i,t[e+10],9,38016083),i=re(i,a,r,o,t[e+15],14,-660478335),o=re(o,i,a,r,t[e+4],20,-405537848),r=re(r,o,i,a,t[e+9],5,568446438),a=re(a,r,o,i,t[e+14],9,-1019803690),i=re(i,a,r,o,t[e+3],14,-187363961),o=re(o,i,a,r,t[e+8],20,1163531501),r=re(r,o,i,a,t[e+13],5,-1444681467),a=re(a,r,o,i,t[e+2],9,-51403784),i=re(i,a,r,o,t[e+7],14,1735328473),o=re(o,i,a,r,t[e+12],20,-1926607734),r=oe(r,o,i,a,t[e+5],4,-378558),a=oe(a,r,o,i,t[e+8],11,-2022574463),i=oe(i,a,r,o,t[e+11],16,1839030562),o=oe(o,i,a,r,t[e+14],23,-35309556),r=oe(r,o,i,a,t[e+1],4,-1530992060),a=oe(a,r,o,i,t[e+4],11,1272893353),i=oe(i,a,r,o,t[e+7],16,-155497632),o=oe(o,i,a,r,t[e+10],23,-1094730640),r=oe(r,o,i,a,t[e+13],4,681279174),a=oe(a,r,o,i,t[e],11,-358537222),i=oe(i,a,r,o,t[e+3],16,-722521979),o=oe(o,i,a,r,t[e+6],23,76029189),r=oe(r,o,i,a,t[e+9],4,-640364487),a=oe(a,r,o,i,t[e+12],11,-421815835),i=oe(i,a,r,o,t[e+15],16,530742520),o=oe(o,i,a,r,t[e+2],23,-995338651),r=ie(r,o,i,a,t[e],6,-198630844),a=ie(a,r,o,i,t[e+7],10,1126891415),i=ie(i,a,r,o,t[e+14],15,-1416354905),o=ie(o,i,a,r,t[e+5],21,-57434055),r=ie(r,o,i,a,t[e+12],6,1700485571),a=ie(a,r,o,i,t[e+3],10,-1894986606),i=ie(i,a,r,o,t[e+10],15,-1051523),o=ie(o,i,a,r,t[e+1],21,-2054922799),r=ie(r,o,i,a,t[e+8],6,1873313359),a=ie(a,r,o,i,t[e+15],10,-30611744),i=ie(i,a,r,o,t[e+6],15,-1560198380),o=ie(o,i,a,r,t[e+13],21,1309151649),r=ie(r,o,i,a,t[e+4],6,-145523070),a=ie(a,r,o,i,t[e+11],10,-1120210379),i=ie(i,a,r,o,t[e+2],15,718787259),o=ie(o,i,a,r,t[e+9],21,-343485551),r=te(r,n),o=te(o,s),i=te(i,l),a=te(a,c)}return Uint32Array.of(r,o,i,a)}(function(t){if(0===t.length)return new Uint32Array;const e=new Uint32Array(Jt(8*t.length)).fill(0);for(let n=0;n<t.length;n++)e[n>>2]|=(255&t[n])<<n%4*8;return e}(t),8*t.length))};const se="6ba7b810-9dad-11d1-80b4-00c04fd430c8",le="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function ce(t,e,n,r,o,i){const a="string"==typeof n?function(t){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n);return e}(n):n,s="string"==typeof r?Kt(r):r;if("string"==typeof r&&(r=Kt(r)),16!==r?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+a.length);if(l.set(s),l.set(a,s.length),l=e(l),l[6]=15&l[6]|t,l[8]=63&l[8]|128,o){if((i=i||0)<0||i+16>o.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let t=0;t<16;++t)o[i+t]=l[t];return o}return Xt(l)}function ue(t,e,n,r){return ce(48,ae,t,e,n,r)}ue.DNS=se,ue.URL=le;const fe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};const pe=function(t,e,n){if(fe.randomUUID&&!e&&!t)return fe.randomUUID();const r=(t=t||{}).random??t.rng?.()??function(){if(!Zt){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Zt=crypto.getRandomValues.bind(crypto)}return Zt(Qt)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=r[t];return e}return Xt(r)};function me(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function de(t,e){return t<<e|t>>>32-e}const he=function(t){const e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(t.length+1);r.set(t),r[t.length]=128;const o=(t=r).length/4+2,i=Math.ceil(o/16),a=new Array(i);for(let e=0;e<i;++e){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=t[64*e+4*r]<<24|t[64*e+4*r+1]<<16|t[64*e+4*r+2]<<8|t[64*e+4*r+3];a[e]=n}a[i-1][14]=8*(t.length-1)/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<i;++t){const r=new Uint32Array(80);for(let e=0;e<16;++e)r[e]=a[t][e];for(let t=16;t<80;++t)r[t]=de(r[t-3]^r[t-8]^r[t-14]^r[t-16],1);let o=n[0],i=n[1],s=n[2],l=n[3],c=n[4];for(let t=0;t<80;++t){const n=Math.floor(t/20),a=de(o,5)+me(n,i,s,l)+c+e[n]+r[t]>>>0;c=l,l=s,s=de(i,30)>>>0,i=o,o=a}n[0]=n[0]+o>>>0,n[1]=n[1]+i>>>0,n[2]=n[2]+s>>>0,n[3]=n[3]+l>>>0,n[4]=n[4]+c>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])};function ge(t,e,n,r){return ce(80,he,t,e,n,r)}ge.DNS=se,ge.URL=le;function ye(){const t="nutrient-analytics-user-id";if(!window||!window.localStorage)return null;try{if(window.localStorage.getItem(t))return window.localStorage.getItem(t);const e=pe();return window.localStorage.setItem(t,e),e}catch{return null}}class be{constructor(){p(this,"maxQueueSize",1e3),p(this,"flushTimer",null),p(this,"visibilityChangeHandler",null),p(this,"isFlushing",!1),p(this,"queue",[]),p(this,"allEvents",[])}static getInstance(){return be.instance||(be.instance=new be),be.instance}emit(t){this.collect(t)}configure(t){const{hmacSecret:e,endpoint:n,flushInterval:r,maxQueueSize:o,clientInfo:i}=t;this.clientInfo=i,this.hmacSecret=this.hexStringToHmacSecret(e),this.endpoint=n,void 0!==o&&(this.maxQueueSize=o),this.isE2E()||(this.flushTimer=setInterval(()=>this.flush(),r||3e3),this.visibilityChangeHandler=()=>{"hidden"===document.visibilityState&&this.queue.length>0&&this.flush()},document.addEventListener("visibilitychange",this.visibilityChangeHandler))}cleanup(){null!==this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),null!==this.visibilityChangeHandler&&(document.removeEventListener("visibilitychange",this.visibilityChangeHandler),this.visibilityChangeHandler=null)}static cleanup(){be.instance&&(be.instance.cleanup(),be.instance=void 0)}shouldBeIgnored(t){switch(t.name){case"content|editor|save":return!!this.allEvents.find(e=>e.name===t.name&&Math.abs(e.timestamp-t.timestamp)<1e3);case"form|creator|field|add":return!this.allEvents.find(t=>"form|creator|enter"===t.name);case"annotation|edit":return!!this.allEvents.find(e=>e.name===t.name&&Math.abs(e.timestamp-t.timestamp)<100);default:return!1}}collect(t){if(this.isE2E()){const e=window;if(e.__PSPDFKIT_ANALYTICS_EVENTS__??=[],this.shouldBeIgnored(t))return;return this.allEvents.push(t),void e.__PSPDFKIT_ANALYTICS_EVENTS__.push(t)}this.shouldBeIgnored(t)||(this.allEvents.push(t),this.queue.length>=this.maxQueueSize&&this.queue.shift(),this.queue.push(t))}async flush(){if(this.isFlushing||this.isE2E()||0===this.queue.length)return;this.isFlushing=!0;const t=this.queue.splice(0,this.queue.length);try{const e=await this.uploadBatch(t);this.requeue(e)}finally{this.isFlushing=!1}}async uploadBatch(t){try{const e=await this.prepareUpload(t);if(!e)return t;const n=`${this.endpoint}/proto/metrics`,r=await fetch(n,{method:"POST",headers:e.headers,body:e.body,keepalive:!0});return r.ok?[]:413===r.status?this.splitAndRetryBatch(t):t}catch(e){return t}}async splitAndRetryBatch(t){if(t.length<=1)return c("Dropping one analytics event: metrics endpoint rejected a single-event payload as too large (HTTP 413)."),[];const e=Math.floor(t.length/2),n=t.slice(0,e),r=t.slice(e);return[...await this.uploadBatch(n),...await this.uploadBatch(r)]}async prepareUpload(t){const{prepareUpload:e}=await r.e(165).then(r.bind(r,165));return e({clientInfo:{...this.clientInfo,tag:ye()??void 0},hmacSecret:this.hmacSecret},this.buildMetrics(t))}buildMetrics(t){return t.map(t=>({type:"counter",name:t.name,attributes:Object.fromEntries(Object.entries(t.attributes).map(t=>{let[e,n]=t;return[e,String(n)]})),timestamp:t.timestamp}))}requeue(t){const e=this.maxQueueSize-this.queue.length;if(e<=0)return;const n=t.slice(0,e);this.queue.unshift(...n)}isE2E(){return"undefined"!=typeof window&&Boolean(window.__E2E_TEST__)}hexStringToHmacSecret(t){if(128!==t.length)throw new Error(`Invalid hex string length: expected 128 characters, got ${t.length}`);return new Uint8Array(Array.from(t,t=>t.charCodeAt(0)))}}function we(t){var e,n;e="convert|from|office",n={feature:"office_conversion",mime_type:t},be.getInstance().emit({name:e,attributes:n??{},timestamp:Date.now()})}p(be,"instance",void 0);const Se="/create.pdf",Te="/save.pdf",Ee="/create.docx",ve="/save.docx",_e="/templateData.json",Ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let Ne=null,Oe=null;function Ie(t){let e;s(Oe,"GdPicture WebAssembly is not loaded.");for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(const t of r)e=Object.assign(r[0],t);const i=JSON.stringify({type:t,...e}),a=JSON.parse(Oe.CommandHandler(i));if(!a.success)throw new Error(a.errorReason+": "+a.errorMessage+"\\n"+a.error);return a}const ke={allMarkup:0,simpleMarkup:1,noMarkup:2,original:3},xe=ke.noMarkup,Ce={documentMarkupMode:xe};function De(t){if(!t)return Ce;if(!t.documentMarkupMode)return{...t,documentMarkupMode:xe};if(!(t.documentMarkupMode in ke))throw new Error(`Invalid documentMarkupMode value: ${t.documentMarkupMode}. Allowed values are: ${Object.keys(ke).join(", ")}`);return{...t,documentMarkupMode:ke[t.documentMarkupMode]}}const Re={"application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt"},Me=new class{_mountCustomFonts(t,e){s(Ne,"WebAssembly module not loaded."),Ne.FS.mkdir(e);{const n=Ae?Ne.FS.filesystems.WORKERFS:Ne.FS.filesystems.MEMFS;Ne.FS.mount(n,{blobs:t},e)}}async loadModule(t,e,n,r,o,i,a){const{Assemblies:s,Module:l}=await async function(t,e){if("string"==typeof t){const n="nutrient-viewer-lib/",r=`${n}gdpicture-0fbc2651/jit`,o=`${n}gdpicture-0fbc2651/aot`;let i,a;e?(i=`${t}${o}/initDotnet.js`,a=`${t}${o}`):(i=`${t}${r}/initDotnet.js`,a=`${t}${r}`);const{initDotnet:s}=await import(i);return s(a,(t,e,n,r,o)=>"blazor.boot.json"===e?fetch(n,{credentials:"same-origin"}):null)}throw new Error("GdPicture WASM loader not implemented")}(t,e);Oe=s.GdPictureWasm.API,Ne=l,Ie("gdpicture/setLicense",{origin:n},{licenseKey:r||"DEMO_PSPDFKIT_WEB"});const c=o?"/fonts":"";if(o&&!Ne.FS.analyzePath(c).exists&&(this._mountCustomFonts(o,c),Ie("gdpicture/setFonts",{fontPaths:[c]})),i){const t=await Dt(i);Ie("gdpicture/setDynamicFontLoading",{baseUrl:i.split("/").slice(0,-1).join("/"),allowedFonts:t.availableFonts,v:1})}a&&Ie("gdpicture/setFontSubstitutions",{fontSubstitutions:a})}toPdf(t,e,n,r,o){let i=Se;if(o&&"pdf"!==o&&Object.values(Re).includes(o)){we(Object.keys(Re).find(t=>Re[t].toLowerCase()===o.toLowerCase()).toLowerCase()),i+=`.${o}`}else if(r&&"application/pdf"!==r){const t=r.toLowerCase();we(t);const e=Re.hasOwnProperty(t)&&Re[t];e&&(i+=`.${e}`)}Ne.FS.writeFile(i,new Uint8Array(t),{canOwn:!0});const a={file:Te,format:"pdf",conformance:e&&e in Rt?e:void 0,officeConversionSettings:De(n)};try{return Ie("gdpicture/process",{input:{file:i},output:a}),Ne.FS.readFile(Te).buffer}finally{try{Ne.FS.unlink(Te),Ne.FS.unlink(i)}catch{}}}toOffice(t,e){Ne.FS.writeFile(Se,new Uint8Array(t));const n=`/save.${e}`;try{return Ie("gdpicture/process",{input:{file:Se},output:{file:n,format:e}}),Ne.FS.readFile(n).buffer}finally{try{Ne.FS.unlink(n),Ne.FS.unlink(Se)}catch(t){console.log(t.message)}}}async populateDocumentTemplate(t,e){Ne.FS.writeFile(Ee,new Uint8Array(t));const{serializedData:n}=await zt(e);Ne.FS.writeFile(_e,n);try{return Ie("gdpicture/process-office-template",{inputFile:Ee,modelAndConfigFile:_e,outputFile:ve}),Ne.FS.readFile(ve).buffer}finally{try{Ne.FS.unlink(ve),Ne.FS.unlink(_e),Ne.FS.unlink(Ee)}catch(t){console.log(t.message)}}}},Ue=self;Ue.global=Ue,Ue.module={},Ue.addEventListener("message",async t=>{let e,n,{data:r}=t;try{const t=await Me[r.action](...r.args);if(e={id:r.id,result:t},Array.isArray(t)){const e=t.filter(t=>t instanceof ArrayBuffer);e.length>0&&(n=e)}t instanceof ArrayBuffer&&(n=[t])}catch(t){const o=[...r.args].filter(t=>t instanceof ArrayBuffer);o.length>0&&(n=o),e={id:r.id,error:t.message||t.toString(),callArgs:r.args}}Ue.postMessage(e,n)})})();',"Worker",void 0,void 0)}},37737(t){function e(t){var e=function(){var t=self||window;if(void 0===t.trustedTypes)return null;try{return t.trustedTypes.createPolicy("nutrient-web-sdk#webpack-worker",{createScriptURL:function(t){return t}})}catch(e){return t.trustedTypes.defaultPolicy||null}}();return e?e.createScriptURL(t):t}t.exports=function(t,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      "+t;try{a=new i.Blob([s])}catch(t){(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=e(c),f=new i[n](u,r);return l.revokeObjectURL(c),f}catch(o){var p=e("data:application/javascript,".concat(encodeURIComponent(t)));return new i[n](p,r)}}catch(t){if(!o)throw Error("Inline worker is not supported");var m=e(o);return new i[n](m,r)}}}}]);