/** * @licstart The following is the entire license notice for the * JavaScript code in this page * * Copyright 2024 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @licend The above is the entire license notice for the * JavaScript code in this page */var A={9306:(A,I,g)=>{var Q=g(4901),B=g(6823),C=TypeError;A.exports=function(A){if(Q(A))return A;throw new C(B(A)+" is not a function")}},3506:(A,I,g)=>{var Q=g(3925),B=String,C=TypeError;A.exports=function(A){if(Q(A))return A;throw new C("Can't set "+B(A)+" as a prototype")}},7080:(A,I,g)=>{var Q=g(4402).has;A.exports=function(A){Q(A);return A}},679:(A,I,g)=>{var Q=g(1625),B=TypeError;A.exports=function(A,I){if(Q(I,A))return A;throw new B("Incorrect invocation")}},8551:(A,I,g)=>{var Q=g(34),B=String,C=TypeError;A.exports=function(A){if(Q(A))return A;throw new C(B(A)+" is not an object")}},7811:A=>{A.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},7394:(A,I,g)=>{var Q=g(4576),B=g(6706),C=g(2195),E=Q.ArrayBuffer,i=Q.TypeError;A.exports=E&&B(E.prototype,"byteLength","get")||function(A){if("ArrayBuffer"!==C(A))throw new i("ArrayBuffer expected");return A.byteLength}},3238:(A,I,g)=>{var Q=g(4576),B=g(7476),C=g(7394),E=Q.ArrayBuffer,i=E&&E.prototype,o=i&&B(i.slice);A.exports=function(A){if(0!==C(A))return!1;if(!o)return!1;try{o(A,0,0);return!1}catch(A){return!0}}},5169:(A,I,g)=>{var Q=g(3238),B=TypeError;A.exports=function(A){if(Q(A))throw new B("ArrayBuffer is detached");return A}},5636:(A,I,g)=>{var Q=g(4576),B=g(9504),C=g(6706),E=g(7696),i=g(5169),o=g(7394),D=g(4483),h=g(1548),s=Q.structuredClone,a=Q.ArrayBuffer,t=Q.DataView,G=Math.min,y=a.prototype,e=t.prototype,c=B(y.slice),w=C(y,"resizable","get"),r=C(y,"maxByteLength","get"),R=B(e.getInt8),n=B(e.setInt8);A.exports=(h||D)&&function(A,I,g){var Q,B=o(A),C=void 0===I?B:E(I),y=!w||!w(A);i(A);if(h){A=s(A,{transfer:[A]});if(B===C&&(g||y))return A}if(B>=C&&(!g||y))Q=c(A,0,C);else{var e=g&&!y&&r?{maxByteLength:r(A)}:void 0;Q=new a(C,e);for(var S=new t(A),N=new t(Q),k=G(C,B),J=0;J{var Q,B,C,E=g(7811),i=g(3724),o=g(4576),D=g(4901),h=g(34),s=g(9297),a=g(6955),t=g(6823),G=g(6699),y=g(6840),e=g(2106),c=g(1625),w=g(2787),r=g(2967),R=g(8227),n=g(3392),S=g(1181),N=S.enforce,k=S.get,J=o.Int8Array,U=J&&J.prototype,Y=o.Uint8ClampedArray,H=Y&&Y.prototype,d=J&&w(J),L=U&&w(U),K=Object.prototype,M=o.TypeError,l=R("toStringTag"),f=n("TYPED_ARRAY_TAG"),q="TypedArrayConstructor",b=E&&!!r&&"Opera"!==a(o.opera),W=!1,u={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},x={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(A){var I=w(A);if(h(I)){var g=k(I);return g&&s(g,q)?g[q]:getTypedArrayConstructor(I)}},isTypedArray=function(A){if(!h(A))return!1;var I=a(A);return s(u,I)||s(x,I)};for(Q in u)(C=(B=o[Q])&&B.prototype)?N(C)[q]=B:b=!1;for(Q in x)(C=(B=o[Q])&&B.prototype)&&(N(C)[q]=B);if(!b||!D(d)||d===Function.prototype){d=function TypedArray(){throw new M("Incorrect invocation")};if(b)for(Q in u)o[Q]&&r(o[Q],d)}if(!b||!L||L===K){L=d.prototype;if(b)for(Q in u)o[Q]&&r(o[Q].prototype,L)}b&&w(H)!==L&&r(H,L);if(i&&!s(L,l)){W=!0;e(L,l,{configurable:!0,get:function(){return h(this)?this[f]:void 0}});for(Q in u)o[Q]&&G(o[Q],f,Q)}A.exports={NATIVE_ARRAY_BUFFER_VIEWS:b,TYPED_ARRAY_TAG:W&&f,aTypedArray:function(A){if(isTypedArray(A))return A;throw new M("Target is not a typed array")},aTypedArrayConstructor:function(A){if(D(A)&&(!r||c(d,A)))return A;throw new M(t(A)+" is not a typed array constructor")},exportTypedArrayMethod:function(A,I,g,Q){if(i){if(g)for(var B in u){var C=o[B];if(C&&s(C.prototype,A))try{delete C.prototype[A]}catch(g){try{C.prototype[A]=I}catch(A){}}}L[A]&&!g||y(L,A,g?I:b&&U[A]||I,Q)}},exportTypedArrayStaticMethod:function(A,I,g){var Q,B;if(i){if(r){if(g)for(Q in u)if((B=o[Q])&&s(B,A))try{delete B[A]}catch(A){}if(d[A]&&!g)return;try{return y(d,A,g?I:b&&d[A]||I)}catch(A){}}for(Q in u)!(B=o[Q])||B[A]&&!g||y(B,A,I)}},getTypedArrayConstructor,isView:function isView(A){if(!h(A))return!1;var I=a(A);return"DataView"===I||s(u,I)||s(x,I)},isTypedArray,TypedArray:d,TypedArrayPrototype:L}},5370:(A,I,g)=>{var Q=g(6198);A.exports=function(A,I,g){for(var B=0,C=arguments.length>2?g:Q(I),E=new A(C);C>B;)E[B]=I[B++];return E}},9617:(A,I,g)=>{var Q=g(5397),B=g(5610),C=g(6198),createMethod=function(A){return function(I,g,E){var i=Q(I),o=C(i);if(0===o)return!A&&-1;var D,h=B(E,o);if(A&&g!=g){for(;o>h;)if((D=i[h++])!=D)return!0}else for(;o>h;h++)if((A||h in i)&&i[h]===g)return A||h||0;return!A&&-1}};A.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4527:(A,I,g)=>{var Q=g(3724),B=g(4376),C=TypeError,E=Object.getOwnPropertyDescriptor,i=Q&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(A){return A instanceof TypeError}}();A.exports=i?function(A,I){if(B(A)&&!E(A,"length").writable)throw new C("Cannot set read only .length");return A.length=I}:function(A,I){return A.length=I}},7628:(A,I,g)=>{var Q=g(6198);A.exports=function(A,I){for(var g=Q(A),B=new I(g),C=0;C{var Q=g(6198),B=g(1291),C=RangeError;A.exports=function(A,I,g,E){var i=Q(A),o=B(g),D=o<0?i+o:o;if(D>=i||D<0)throw new C("Incorrect index");for(var h=new I(i),s=0;s{var Q=g(8551),B=g(9539);A.exports=function(A,I,g,C){try{return C?I(Q(g)[0],g[1]):I(g)}catch(I){B(A,"throw",I)}}},2195:(A,I,g)=>{var Q=g(9504),B=Q({}.toString),C=Q("".slice);A.exports=function(A){return C(B(A),8,-1)}},6955:(A,I,g)=>{var Q=g(2140),B=g(4901),C=g(2195),E=g(8227)("toStringTag"),i=Object,o="Arguments"===C(function(){return arguments}());A.exports=Q?C:function(A){var I,g,Q;return void 0===A?"Undefined":null===A?"Null":"string"==typeof(g=function(A,I){try{return A[I]}catch(A){}}(I=i(A),E))?g:o?C(I):"Object"===(Q=C(I))&&B(I.callee)?"Arguments":Q}},7740:(A,I,g)=>{var Q=g(9297),B=g(5031),C=g(7347),E=g(4913);A.exports=function(A,I,g){for(var i=B(I),o=E.f,D=C.f,h=0;h{var Q=g(9039);A.exports=!Q((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},2529:A=>{A.exports=function(A,I){return{value:A,done:I}}},6699:(A,I,g)=>{var Q=g(3724),B=g(4913),C=g(6980);A.exports=Q?function(A,I,g){return B.f(A,I,C(1,g))}:function(A,I,g){A[I]=g;return A}},6980:A=>{A.exports=function(A,I){return{enumerable:!(1&A),configurable:!(2&A),writable:!(4&A),value:I}}},4659:(A,I,g)=>{var Q=g(3724),B=g(4913),C=g(6980);A.exports=function(A,I,g){Q?B.f(A,I,C(0,g)):A[I]=g}},2106:(A,I,g)=>{var Q=g(283),B=g(4913);A.exports=function(A,I,g){g.get&&Q(g.get,I,{getter:!0});g.set&&Q(g.set,I,{setter:!0});return B.f(A,I,g)}},6840:(A,I,g)=>{var Q=g(4901),B=g(4913),C=g(283),E=g(9433);A.exports=function(A,I,g,i){i||(i={});var o=i.enumerable,D=void 0!==i.name?i.name:I;Q(g)&&C(g,D,i);if(i.global)o?A[I]=g:E(I,g);else{try{i.unsafe?A[I]&&(o=!0):delete A[I]}catch(A){}o?A[I]=g:B.f(A,I,{value:g,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return A}},6279:(A,I,g)=>{var Q=g(6840);A.exports=function(A,I,g){for(var B in I)Q(A,B,I[B],g);return A}},9433:(A,I,g)=>{var Q=g(4576),B=Object.defineProperty;A.exports=function(A,I){try{B(Q,A,{value:I,configurable:!0,writable:!0})}catch(g){Q[A]=I}return I}},3724:(A,I,g)=>{var Q=g(9039);A.exports=!Q((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4483:(A,I,g)=>{var Q,B,C,E,i=g(4576),o=g(9429),D=g(1548),h=i.structuredClone,s=i.ArrayBuffer,a=i.MessageChannel,t=!1;if(D)t=function(A){h(A,{transfer:[A]})};else if(s)try{a||(Q=o("worker_threads"))&&(a=Q.MessageChannel);if(a){B=new a;C=new s(2);E=function(A){B.port1.postMessage(null,[A])};if(2===C.byteLength){E(C);0===C.byteLength&&(t=E)}}}catch(A){}A.exports=t},4055:(A,I,g)=>{var Q=g(4576),B=g(34),C=Q.document,E=B(C)&&B(C.createElement);A.exports=function(A){return E?C.createElement(A):{}}},6837:A=>{var I=TypeError;A.exports=function(A){if(A>9007199254740991)throw I("Maximum allowed index exceeded");return A}},5002:A=>{A.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},8727:A=>{A.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6193:(A,I,g)=>{var Q=g(4215);A.exports="NODE"===Q},2839:(A,I,g)=>{var Q=g(4576).navigator,B=Q&&Q.userAgent;A.exports=B?String(B):""},9519:(A,I,g)=>{var Q,B,C=g(4576),E=g(2839),i=C.process,o=C.Deno,D=i&&i.versions||o&&o.version,h=D&&D.v8;h&&(B=(Q=h.split("."))[0]>0&&Q[0]<4?1:+(Q[0]+Q[1]));!B&&E&&(!(Q=E.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=E.match(/Chrome\/(\d+)/))&&(B=+Q[1]);A.exports=B},4215:(A,I,g)=>{var Q=g(4576),B=g(2839),C=g(2195),userAgentStartsWith=function(A){return B.slice(0,A.length)===A};A.exports=userAgentStartsWith("Bun/")?"BUN":userAgentStartsWith("Cloudflare-Workers")?"CLOUDFLARE":userAgentStartsWith("Deno/")?"DENO":userAgentStartsWith("Node.js/")?"NODE":Q.Bun&&"string"==typeof Bun.version?"BUN":Q.Deno&&"object"==typeof Deno.version?"DENO":"process"===C(Q.process)?"NODE":Q.window&&Q.document?"BROWSER":"REST"},8574:(A,I,g)=>{var Q=g(9504),B=Error,C=Q("".replace),E=String(new B("zxcasd").stack),i=/\n\s*at [^:]*:[^\n]*/,o=i.test(E);A.exports=function(A,I){if(o&&"string"==typeof A&&!B.prepareStackTrace)for(;I--;)A=C(A,i,"");return A}},6518:(A,I,g)=>{var Q=g(4576),B=g(7347).f,C=g(6699),E=g(6840),i=g(9433),o=g(7740),D=g(2796);A.exports=function(A,I){var g,h,s,a,t,G=A.target,y=A.global,e=A.stat;if(g=y?Q:e?Q[G]||i(G,{}):Q[G]&&Q[G].prototype)for(h in I){a=I[h];s=A.dontCallGetSet?(t=B(g,h))&&t.value:g[h];if(!D(y?h:G+(e?".":"#")+h,A.forced)&&void 0!==s){if(typeof a==typeof s)continue;o(a,s)}(A.sham||s&&s.sham)&&C(a,"sham",!0);E(g,h,a,A)}}},9039:A=>{A.exports=function(A){try{return!!A()}catch(A){return!0}}},6080:(A,I,g)=>{var Q=g(7476),B=g(9306),C=g(616),E=Q(Q.bind);A.exports=function(A,I){B(A);return void 0===I?A:C?E(A,I):function(){return A.apply(I,arguments)}}},616:(A,I,g)=>{var Q=g(9039);A.exports=!Q((function(){var A=function(){}.bind();return"function"!=typeof A||A.hasOwnProperty("prototype")}))},9565:(A,I,g)=>{var Q=g(616),B=Function.prototype.call;A.exports=Q?B.bind(B):function(){return B.apply(B,arguments)}},350:(A,I,g)=>{var Q=g(3724),B=g(9297),C=Function.prototype,E=Q&&Object.getOwnPropertyDescriptor,i=B(C,"name"),o=i&&"something"===function something(){}.name,D=i&&(!Q||Q&&E(C,"name").configurable);A.exports={EXISTS:i,PROPER:o,CONFIGURABLE:D}},6706:(A,I,g)=>{var Q=g(9504),B=g(9306);A.exports=function(A,I,g){try{return Q(B(Object.getOwnPropertyDescriptor(A,I)[g]))}catch(A){}}},7476:(A,I,g)=>{var Q=g(2195),B=g(9504);A.exports=function(A){if("Function"===Q(A))return B(A)}},9504:(A,I,g)=>{var Q=g(616),B=Function.prototype,C=B.call,E=Q&&B.bind.bind(C,C);A.exports=Q?E:function(A){return function(){return C.apply(A,arguments)}}},9429:(A,I,g)=>{var Q=g(4576),B=g(6193);A.exports=function(A){if(B){try{return Q.process.getBuiltinModule(A)}catch(A){}try{return Function('return require("'+A+'")')()}catch(A){}}}},7751:(A,I,g)=>{var Q=g(4576),B=g(4901);A.exports=function(A,I){return arguments.length<2?(g=Q[A],B(g)?g:void 0):Q[A]&&Q[A][I];var g}},1767:A=>{A.exports=function(A){return{iterator:A,next:A.next,done:!1}}},851:(A,I,g)=>{var Q=g(6955),B=g(5966),C=g(4117),E=g(6269),i=g(8227)("iterator");A.exports=function(A){if(!C(A))return B(A,i)||B(A,"@@iterator")||E[Q(A)]}},81:(A,I,g)=>{var Q=g(9565),B=g(9306),C=g(8551),E=g(6823),i=g(851),o=TypeError;A.exports=function(A,I){var g=arguments.length<2?i(A):I;if(B(g))return C(Q(g,A));throw new o(E(A)+" is not iterable")}},5966:(A,I,g)=>{var Q=g(9306),B=g(4117);A.exports=function(A,I){var g=A[I];return B(g)?void 0:Q(g)}},3789:(A,I,g)=>{var Q=g(9306),B=g(8551),C=g(9565),E=g(1291),i=g(1767),o="Invalid size",D=RangeError,h=TypeError,s=Math.max,SetRecord=function(A,I){this.set=A;this.size=s(I,0);this.has=Q(A.has);this.keys=Q(A.keys)};SetRecord.prototype={getIterator:function(){return i(B(C(this.keys,this.set)))},includes:function(A){return C(this.has,this.set,A)}};A.exports=function(A){B(A);var I=+A.size;if(I!=I)throw new h(o);var g=E(I);if(g<0)throw new D(o);return new SetRecord(A,g)}},4576:function(A){var check=function(A){return A&&A.Math===Math&&A};A.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(A,I,g)=>{var Q=g(9504),B=g(8981),C=Q({}.hasOwnProperty);A.exports=Object.hasOwn||function hasOwn(A,I){return C(B(A),I)}},421:A=>{A.exports={}},397:(A,I,g)=>{var Q=g(7751);A.exports=Q("document","documentElement")},5917:(A,I,g)=>{var Q=g(3724),B=g(9039),C=g(4055);A.exports=!Q&&!B((function(){return 7!==Object.defineProperty(C("div"),"a",{get:function(){return 7}}).a}))},7055:(A,I,g)=>{var Q=g(9504),B=g(9039),C=g(2195),E=Object,i=Q("".split);A.exports=B((function(){return!E("z").propertyIsEnumerable(0)}))?function(A){return"String"===C(A)?i(A,""):E(A)}:E},3167:(A,I,g)=>{var Q=g(4901),B=g(34),C=g(2967);A.exports=function(A,I,g){var E,i;C&&Q(E=I.constructor)&&E!==g&&B(i=E.prototype)&&i!==g.prototype&&C(A,i);return A}},3706:(A,I,g)=>{var Q=g(9504),B=g(4901),C=g(7629),E=Q(Function.toString);B(C.inspectSource)||(C.inspectSource=function(A){return E(A)});A.exports=C.inspectSource},1181:(A,I,g)=>{var Q,B,C,E=g(8622),i=g(4576),o=g(34),D=g(6699),h=g(9297),s=g(7629),a=g(6119),t=g(421),G="Object already initialized",y=i.TypeError,e=i.WeakMap;if(E||s.state){var c=s.state||(s.state=new e);c.get=c.get;c.has=c.has;c.set=c.set;Q=function(A,I){if(c.has(A))throw new y(G);I.facade=A;c.set(A,I);return I};B=function(A){return c.get(A)||{}};C=function(A){return c.has(A)}}else{var w=a("state");t[w]=!0;Q=function(A,I){if(h(A,w))throw new y(G);I.facade=A;D(A,w,I);return I};B=function(A){return h(A,w)?A[w]:{}};C=function(A){return h(A,w)}}A.exports={set:Q,get:B,has:C,enforce:function(A){return C(A)?B(A):Q(A,{})},getterFor:function(A){return function(I){var g;if(!o(I)||(g=B(I)).type!==A)throw new y("Incompatible receiver, "+A+" required");return g}}}},4209:(A,I,g)=>{var Q=g(8227),B=g(6269),C=Q("iterator"),E=Array.prototype;A.exports=function(A){return void 0!==A&&(B.Array===A||E[C]===A)}},4376:(A,I,g)=>{var Q=g(2195);A.exports=Array.isArray||function isArray(A){return"Array"===Q(A)}},1108:(A,I,g)=>{var Q=g(6955);A.exports=function(A){var I=Q(A);return"BigInt64Array"===I||"BigUint64Array"===I}},4901:A=>{var I="object"==typeof document&&document.all;A.exports=void 0===I&&void 0!==I?function(A){return"function"==typeof A||A===I}:function(A){return"function"==typeof A}},2796:(A,I,g)=>{var Q=g(9039),B=g(4901),C=/#|\.prototype\./,isForced=function(A,I){var g=i[E(A)];return g===D||g!==o&&(B(I)?Q(I):!!I)},E=isForced.normalize=function(A){return String(A).replace(C,".").toLowerCase()},i=isForced.data={},o=isForced.NATIVE="N",D=isForced.POLYFILL="P";A.exports=isForced},4117:A=>{A.exports=function(A){return null==A}},34:(A,I,g)=>{var Q=g(4901);A.exports=function(A){return"object"==typeof A?null!==A:Q(A)}},3925:(A,I,g)=>{var Q=g(34);A.exports=function(A){return Q(A)||null===A}},6395:A=>{A.exports=!1},757:(A,I,g)=>{var Q=g(7751),B=g(4901),C=g(1625),E=g(7040),i=Object;A.exports=E?function(A){return"symbol"==typeof A}:function(A){var I=Q("Symbol");return B(I)&&C(I.prototype,i(A))}},507:(A,I,g)=>{var Q=g(9565);A.exports=function(A,I,g){for(var B,C,E=g?A:A.iterator,i=A.next;!(B=Q(i,E)).done;)if(void 0!==(C=I(B.value)))return C}},2652:(A,I,g)=>{var Q=g(6080),B=g(9565),C=g(8551),E=g(6823),i=g(4209),o=g(6198),D=g(1625),h=g(81),s=g(851),a=g(9539),t=TypeError,Result=function(A,I){this.stopped=A;this.result=I},G=Result.prototype;A.exports=function(A,I,g){var y,e,c,w,r,R,n,S=g&&g.that,N=!(!g||!g.AS_ENTRIES),k=!(!g||!g.IS_RECORD),J=!(!g||!g.IS_ITERATOR),U=!(!g||!g.INTERRUPTED),Y=Q(I,S),stop=function(A){y&&a(y,"normal",A);return new Result(!0,A)},callFn=function(A){if(N){C(A);return U?Y(A[0],A[1],stop):Y(A[0],A[1])}return U?Y(A,stop):Y(A)};if(k)y=A.iterator;else if(J)y=A;else{if(!(e=s(A)))throw new t(E(A)+" is not iterable");if(i(e)){for(c=0,w=o(A);w>c;c++)if((r=callFn(A[c]))&&D(G,r))return r;return new Result(!1)}y=h(A,e)}R=k?A.next:y.next;for(;!(n=B(R,y)).done;){try{r=callFn(n.value)}catch(A){a(y,"throw",A)}if("object"==typeof r&&r&&D(G,r))return r}return new Result(!1)}},9539:(A,I,g)=>{var Q=g(9565),B=g(8551),C=g(5966);A.exports=function(A,I,g){var E,i;B(A);try{if(!(E=C(A,"return"))){if("throw"===I)throw g;return g}E=Q(E,A)}catch(A){i=!0;E=A}if("throw"===I)throw g;if(i)throw E;B(E);return g}},9462:(A,I,g)=>{var Q=g(9565),B=g(2360),C=g(6699),E=g(6279),i=g(8227),o=g(1181),D=g(5966),h=g(7657).IteratorPrototype,s=g(2529),a=g(9539),t=i("toStringTag"),G="IteratorHelper",y="WrapForValidIterator",e=o.set,createIteratorProxyPrototype=function(A){var I=o.getterFor(A?y:G);return E(B(h),{next:function next(){var g=I(this);if(A)return g.nextHandler();try{var Q=g.done?void 0:g.nextHandler();return s(Q,g.done)}catch(A){g.done=!0;throw A}},return:function(){var g=I(this),B=g.iterator;g.done=!0;if(A){var C=D(B,"return");return C?Q(C,B):s(void 0,!0)}if(g.inner)try{a(g.inner.iterator,"normal")}catch(A){return a(B,"throw",A)}a(B,"normal");return s(void 0,!0)}})},c=createIteratorProxyPrototype(!0),w=createIteratorProxyPrototype(!1);C(w,t,"Iterator Helper");A.exports=function(A,I){var g=function Iterator(g,Q){if(Q){Q.iterator=g.iterator;Q.next=g.next}else Q=g;Q.type=I?y:G;Q.nextHandler=A;Q.counter=0;Q.done=!1;e(this,Q)};g.prototype=I?c:w;return g}},713:(A,I,g)=>{var Q=g(9565),B=g(9306),C=g(8551),E=g(1767),i=g(9462),o=g(6319),D=i((function(){var A=this.iterator,I=C(Q(this.next,A));if(!(this.done=!!I.done))return o(A,this.mapper,[I.value,this.counter++],!0)}));A.exports=function map(A){C(this);B(A);return new D(E(this),{mapper:A})}},7657:(A,I,g)=>{var Q,B,C,E=g(9039),i=g(4901),o=g(34),D=g(2360),h=g(2787),s=g(6840),a=g(8227),t=g(6395),G=a("iterator"),y=!1;[].keys&&("next"in(C=[].keys())?(B=h(h(C)))!==Object.prototype&&(Q=B):y=!0);!o(Q)||E((function(){var A={};return Q[G].call(A)!==A}))?Q={}:t&&(Q=D(Q));i(Q[G])||s(Q,G,(function(){return this}));A.exports={IteratorPrototype:Q,BUGGY_SAFARI_ITERATORS:y}},6269:A=>{A.exports={}},6198:(A,I,g)=>{var Q=g(8014);A.exports=function(A){return Q(A.length)}},283:(A,I,g)=>{var Q=g(9504),B=g(9039),C=g(4901),E=g(9297),i=g(3724),o=g(350).CONFIGURABLE,D=g(3706),h=g(1181),s=h.enforce,a=h.get,t=String,G=Object.defineProperty,y=Q("".slice),e=Q("".replace),c=Q([].join),w=i&&!B((function(){return 8!==G((function(){}),"length",{value:8}).length})),r=String(String).split("String"),R=A.exports=function(A,I,g){"Symbol("===y(t(I),0,7)&&(I="["+e(t(I),/^Symbol\(([^)]*)\).*$/,"$1")+"]");g&&g.getter&&(I="get "+I);g&&g.setter&&(I="set "+I);(!E(A,"name")||o&&A.name!==I)&&(i?G(A,"name",{value:I,configurable:!0}):A.name=I);w&&g&&E(g,"arity")&&A.length!==g.arity&&G(A,"length",{value:g.arity});try{g&&E(g,"constructor")&&g.constructor?i&&G(A,"prototype",{writable:!1}):A.prototype&&(A.prototype=void 0)}catch(A){}var Q=s(A);E(Q,"source")||(Q.source=c(r,"string"==typeof I?I:""));return A};Function.prototype.toString=R((function toString(){return C(this)&&a(this).source||D(this)}),"toString")},741:A=>{var I=Math.ceil,g=Math.floor;A.exports=Math.trunc||function trunc(A){var Q=+A;return(Q>0?g:I)(Q)}},2603:(A,I,g)=>{var Q=g(655);A.exports=function(A,I){return void 0===A?arguments.length<2?"":I:Q(A)}},2360:(A,I,g)=>{var Q,B=g(8551),C=g(6801),E=g(8727),i=g(421),o=g(397),D=g(4055),h=g(6119),s="prototype",a="script",t=h("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(A){return"<"+a+">"+A+""},NullProtoObjectViaActiveX=function(A){A.write(scriptTag(""));A.close();var I=A.parentWindow.Object;A=null;return I},NullProtoObject=function(){try{Q=new ActiveXObject("htmlfile")}catch(A){}NullProtoObject="undefined"!=typeof document?document.domain&&Q?NullProtoObjectViaActiveX(Q):function(){var A,I=D("iframe"),g="java"+a+":";I.style.display="none";o.appendChild(I);I.src=String(g);(A=I.contentWindow.document).open();A.write(scriptTag("document.F=Object"));A.close();return A.F}():NullProtoObjectViaActiveX(Q);for(var A=E.length;A--;)delete NullProtoObject[s][E[A]];return NullProtoObject()};i[t]=!0;A.exports=Object.create||function create(A,I){var g;if(null!==A){EmptyConstructor[s]=B(A);g=new EmptyConstructor;EmptyConstructor[s]=null;g[t]=A}else g=NullProtoObject();return void 0===I?g:C.f(g,I)}},6801:(A,I,g)=>{var Q=g(3724),B=g(8686),C=g(4913),E=g(8551),i=g(5397),o=g(1072);I.f=Q&&!B?Object.defineProperties:function defineProperties(A,I){E(A);for(var g,Q=i(I),B=o(I),D=B.length,h=0;D>h;)C.f(A,g=B[h++],Q[g]);return A}},4913:(A,I,g)=>{var Q=g(3724),B=g(5917),C=g(8686),E=g(8551),i=g(6969),o=TypeError,D=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s="enumerable",a="configurable",t="writable";I.f=Q?C?function defineProperty(A,I,g){E(A);I=i(I);E(g);if("function"==typeof A&&"prototype"===I&&"value"in g&&t in g&&!g[t]){var Q=h(A,I);if(Q&&Q[t]){A[I]=g.value;g={configurable:a in g?g[a]:Q[a],enumerable:s in g?g[s]:Q[s],writable:!1}}}return D(A,I,g)}:D:function defineProperty(A,I,g){E(A);I=i(I);E(g);if(B)try{return D(A,I,g)}catch(A){}if("get"in g||"set"in g)throw new o("Accessors not supported");"value"in g&&(A[I]=g.value);return A}},7347:(A,I,g)=>{var Q=g(3724),B=g(9565),C=g(8773),E=g(6980),i=g(5397),o=g(6969),D=g(9297),h=g(5917),s=Object.getOwnPropertyDescriptor;I.f=Q?s:function getOwnPropertyDescriptor(A,I){A=i(A);I=o(I);if(h)try{return s(A,I)}catch(A){}if(D(A,I))return E(!B(C.f,A,I),A[I])}},8480:(A,I,g)=>{var Q=g(1828),B=g(8727).concat("length","prototype");I.f=Object.getOwnPropertyNames||function getOwnPropertyNames(A){return Q(A,B)}},3717:(A,I)=>{I.f=Object.getOwnPropertySymbols},2787:(A,I,g)=>{var Q=g(9297),B=g(4901),C=g(8981),E=g(6119),i=g(2211),o=E("IE_PROTO"),D=Object,h=D.prototype;A.exports=i?D.getPrototypeOf:function(A){var I=C(A);if(Q(I,o))return I[o];var g=I.constructor;return B(g)&&I instanceof g?g.prototype:I instanceof D?h:null}},1625:(A,I,g)=>{var Q=g(9504);A.exports=Q({}.isPrototypeOf)},1828:(A,I,g)=>{var Q=g(9504),B=g(9297),C=g(5397),E=g(9617).indexOf,i=g(421),o=Q([].push);A.exports=function(A,I){var g,Q=C(A),D=0,h=[];for(g in Q)!B(i,g)&&B(Q,g)&&o(h,g);for(;I.length>D;)B(Q,g=I[D++])&&(~E(h,g)||o(h,g));return h}},1072:(A,I,g)=>{var Q=g(1828),B=g(8727);A.exports=Object.keys||function keys(A){return Q(A,B)}},8773:(A,I)=>{var g={}.propertyIsEnumerable,Q=Object.getOwnPropertyDescriptor,B=Q&&!g.call({1:2},1);I.f=B?function propertyIsEnumerable(A){var I=Q(this,A);return!!I&&I.enumerable}:g},2967:(A,I,g)=>{var Q=g(6706),B=g(34),C=g(7750),E=g(3506);A.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var A,I=!1,g={};try{(A=Q(Object.prototype,"__proto__","set"))(g,[]);I=g instanceof Array}catch(A){}return function setPrototypeOf(g,Q){C(g);E(Q);if(!B(g))return g;I?A(g,Q):g.__proto__=Q;return g}}():void 0)},4270:(A,I,g)=>{var Q=g(9565),B=g(4901),C=g(34),E=TypeError;A.exports=function(A,I){var g,i;if("string"===I&&B(g=A.toString)&&!C(i=Q(g,A)))return i;if(B(g=A.valueOf)&&!C(i=Q(g,A)))return i;if("string"!==I&&B(g=A.toString)&&!C(i=Q(g,A)))return i;throw new E("Can't convert object to primitive value")}},5031:(A,I,g)=>{var Q=g(7751),B=g(9504),C=g(8480),E=g(3717),i=g(8551),o=B([].concat);A.exports=Q("Reflect","ownKeys")||function ownKeys(A){var I=C.f(i(A)),g=E.f;return g?o(I,g(A)):I}},7750:(A,I,g)=>{var Q=g(4117),B=TypeError;A.exports=function(A){if(Q(A))throw new B("Can't call method on "+A);return A}},9286:(A,I,g)=>{var Q=g(4402),B=g(8469),C=Q.Set,E=Q.add;A.exports=function(A){var I=new C;B(A,(function(A){E(I,A)}));return I}},3440:(A,I,g)=>{var Q=g(7080),B=g(4402),C=g(9286),E=g(5170),i=g(3789),o=g(8469),D=g(507),h=B.has,s=B.remove;A.exports=function difference(A){var I=Q(this),g=i(A),B=C(I);E(I)<=g.size?o(I,(function(A){g.includes(A)&&s(B,A)})):D(g.getIterator(),(function(A){h(I,A)&&s(B,A)}));return B}},4402:(A,I,g)=>{var Q=g(9504),B=Set.prototype;A.exports={Set,add:Q(B.add),has:Q(B.has),remove:Q(B.delete),proto:B}},8750:(A,I,g)=>{var Q=g(7080),B=g(4402),C=g(5170),E=g(3789),i=g(8469),o=g(507),D=B.Set,h=B.add,s=B.has;A.exports=function intersection(A){var I=Q(this),g=E(A),B=new D;C(I)>g.size?o(g.getIterator(),(function(A){s(I,A)&&h(B,A)})):i(I,(function(A){g.includes(A)&&h(B,A)}));return B}},4449:(A,I,g)=>{var Q=g(7080),B=g(4402).has,C=g(5170),E=g(3789),i=g(8469),o=g(507),D=g(9539);A.exports=function isDisjointFrom(A){var I=Q(this),g=E(A);if(C(I)<=g.size)return!1!==i(I,(function(A){if(g.includes(A))return!1}),!0);var h=g.getIterator();return!1!==o(h,(function(A){if(B(I,A))return D(h,"normal",!1)}))}},3838:(A,I,g)=>{var Q=g(7080),B=g(5170),C=g(8469),E=g(3789);A.exports=function isSubsetOf(A){var I=Q(this),g=E(A);return!(B(I)>g.size)&&!1!==C(I,(function(A){if(!g.includes(A))return!1}),!0)}},8527:(A,I,g)=>{var Q=g(7080),B=g(4402).has,C=g(5170),E=g(3789),i=g(507),o=g(9539);A.exports=function isSupersetOf(A){var I=Q(this),g=E(A);if(C(I){var Q=g(9504),B=g(507),C=g(4402),E=C.Set,i=C.proto,o=Q(i.forEach),D=Q(i.keys),h=D(new E).next;A.exports=function(A,I,g){return g?B({iterator:D(A),next:h},I):o(A,I)}},4916:(A,I,g)=>{var Q=g(7751),createSetLike=function(A){return{size:A,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};A.exports=function(A){var I=Q("Set");try{(new I)[A](createSetLike(0));try{(new I)[A](createSetLike(-1));return!1}catch(A){return!0}}catch(A){return!1}}},5170:(A,I,g)=>{var Q=g(6706),B=g(4402);A.exports=Q(B.proto,"size","get")||function(A){return A.size}},3650:(A,I,g)=>{var Q=g(7080),B=g(4402),C=g(9286),E=g(3789),i=g(507),o=B.add,D=B.has,h=B.remove;A.exports=function symmetricDifference(A){var I=Q(this),g=E(A).getIterator(),B=C(I);i(g,(function(A){D(I,A)?h(B,A):o(B,A)}));return B}},4204:(A,I,g)=>{var Q=g(7080),B=g(4402).add,C=g(9286),E=g(3789),i=g(507);A.exports=function union(A){var I=Q(this),g=E(A).getIterator(),o=C(I);i(g,(function(A){B(o,A)}));return o}},6119:(A,I,g)=>{var Q=g(5745),B=g(3392),C=Q("keys");A.exports=function(A){return C[A]||(C[A]=B(A))}},7629:(A,I,g)=>{var Q=g(6395),B=g(4576),C=g(9433),E="__core-js_shared__",i=A.exports=B[E]||C(E,{});(i.versions||(i.versions=[])).push({version:"3.38.1",mode:Q?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(A,I,g)=>{var Q=g(7629);A.exports=function(A,I){return Q[A]||(Q[A]=I||{})}},1548:(A,I,g)=>{var Q=g(4576),B=g(9039),C=g(9519),E=g(4215),i=Q.structuredClone;A.exports=!!i&&!B((function(){if("DENO"===E&&C>92||"NODE"===E&&C>94||"BROWSER"===E&&C>97)return!1;var A=new ArrayBuffer(8),I=i(A,{transfer:[A]});return 0!==A.byteLength||8!==I.byteLength}))},4495:(A,I,g)=>{var Q=g(9519),B=g(9039),C=g(4576).String;A.exports=!!Object.getOwnPropertySymbols&&!B((function(){var A=Symbol("symbol detection");return!C(A)||!(Object(A)instanceof Symbol)||!Symbol.sham&&Q&&Q<41}))},5610:(A,I,g)=>{var Q=g(1291),B=Math.max,C=Math.min;A.exports=function(A,I){var g=Q(A);return g<0?B(g+I,0):C(g,I)}},5854:(A,I,g)=>{var Q=g(2777),B=TypeError;A.exports=function(A){var I=Q(A,"number");if("number"==typeof I)throw new B("Can't convert number to bigint");return BigInt(I)}},7696:(A,I,g)=>{var Q=g(1291),B=g(8014),C=RangeError;A.exports=function(A){if(void 0===A)return 0;var I=Q(A),g=B(I);if(I!==g)throw new C("Wrong length or index");return g}},5397:(A,I,g)=>{var Q=g(7055),B=g(7750);A.exports=function(A){return Q(B(A))}},1291:(A,I,g)=>{var Q=g(741);A.exports=function(A){var I=+A;return I!=I||0===I?0:Q(I)}},8014:(A,I,g)=>{var Q=g(1291),B=Math.min;A.exports=function(A){var I=Q(A);return I>0?B(I,9007199254740991):0}},8981:(A,I,g)=>{var Q=g(7750),B=Object;A.exports=function(A){return B(Q(A))}},2777:(A,I,g)=>{var Q=g(9565),B=g(34),C=g(757),E=g(5966),i=g(4270),o=g(8227),D=TypeError,h=o("toPrimitive");A.exports=function(A,I){if(!B(A)||C(A))return A;var g,o=E(A,h);if(o){void 0===I&&(I="default");g=Q(o,A,I);if(!B(g)||C(g))return g;throw new D("Can't convert object to primitive value")}void 0===I&&(I="number");return i(A,I)}},6969:(A,I,g)=>{var Q=g(2777),B=g(757);A.exports=function(A){var I=Q(A,"string");return B(I)?I:I+""}},2140:(A,I,g)=>{var Q={};Q[g(8227)("toStringTag")]="z";A.exports="[object z]"===String(Q)},655:(A,I,g)=>{var Q=g(6955),B=String;A.exports=function(A){if("Symbol"===Q(A))throw new TypeError("Cannot convert a Symbol value to a string");return B(A)}},6823:A=>{var I=String;A.exports=function(A){try{return I(A)}catch(A){return"Object"}}},3392:(A,I,g)=>{var Q=g(9504),B=0,C=Math.random(),E=Q(1..toString);A.exports=function(A){return"Symbol("+(void 0===A?"":A)+")_"+E(++B+C,36)}},7040:(A,I,g)=>{var Q=g(4495);A.exports=Q&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(A,I,g)=>{var Q=g(3724),B=g(9039);A.exports=Q&&B((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:A=>{var I=TypeError;A.exports=function(A,g){if(A{var Q=g(4576),B=g(4901),C=Q.WeakMap;A.exports=B(C)&&/native code/.test(String(C))},8227:(A,I,g)=>{var Q=g(4576),B=g(5745),C=g(9297),E=g(3392),i=g(4495),o=g(7040),D=Q.Symbol,h=B("wks"),s=o?D.for||D:D&&D.withoutSetter||E;A.exports=function(A){C(h,A)||(h[A]=i&&C(D,A)?D[A]:s("Symbol."+A));return h[A]}},6573:(A,I,g)=>{var Q=g(3724),B=g(2106),C=g(3238),E=ArrayBuffer.prototype;Q&&!("detached"in E)&&B(E,"detached",{configurable:!0,get:function detached(){return C(this)}})},7936:(A,I,g)=>{var Q=g(6518),B=g(5636);B&&Q({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return B(this,arguments.length?arguments[0]:void 0,!1)}})},8100:(A,I,g)=>{var Q=g(6518),B=g(5636);B&&Q({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return B(this,arguments.length?arguments[0]:void 0,!0)}})},4114:(A,I,g)=>{var Q=g(6518),B=g(8981),C=g(6198),E=g(4527),i=g(6837);Q({target:"Array",proto:!0,arity:1,forced:g(9039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(A){return A instanceof TypeError}}()},{push:function push(A){var I=B(this),g=C(I),Q=arguments.length;i(g+Q);for(var o=0;o{var Q=g(6518),B=g(3440);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("difference")},{difference:B})},8004:(A,I,g)=>{var Q=g(6518),B=g(9039),C=g(8750);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("intersection")||B((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:C})},3853:(A,I,g)=>{var Q=g(6518),B=g(4449);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("isDisjointFrom")},{isDisjointFrom:B})},5876:(A,I,g)=>{var Q=g(6518),B=g(3838);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("isSubsetOf")},{isSubsetOf:B})},2475:(A,I,g)=>{var Q=g(6518),B=g(8527);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("isSupersetOf")},{isSupersetOf:B})},5024:(A,I,g)=>{var Q=g(6518),B=g(3650);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("symmetricDifference")},{symmetricDifference:B})},1698:(A,I,g)=>{var Q=g(6518),B=g(4204);Q({target:"Set",proto:!0,real:!0,forced:!g(4916)("union")},{union:B})},7467:(A,I,g)=>{var Q=g(7628),B=g(4644),C=B.aTypedArray,E=B.exportTypedArrayMethod,i=B.getTypedArrayConstructor;E("toReversed",(function toReversed(){return Q(C(this),i(this))}))},4732:(A,I,g)=>{var Q=g(4644),B=g(9504),C=g(9306),E=g(5370),i=Q.aTypedArray,o=Q.getTypedArrayConstructor,D=Q.exportTypedArrayMethod,h=B(Q.TypedArrayPrototype.sort);D("toSorted",(function toSorted(A){void 0!==A&&C(A);var I=i(this),g=E(o(I),I);return h(g,A)}))},9577:(A,I,g)=>{var Q=g(9928),B=g(4644),C=g(1108),E=g(1291),i=g(5854),o=B.aTypedArray,D=B.getTypedArrayConstructor,h=B.exportTypedArrayMethod,s=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(A){return 8===A}}();h("with",{with:function(A,I){var g=o(this),B=E(A),h=C(g)?i(I):+I;return Q(g,D(g),B,h)}}.with,!s)},8992:(A,I,g)=>{var Q=g(6518),B=g(4576),C=g(679),E=g(8551),i=g(4901),o=g(2787),D=g(2106),h=g(4659),s=g(9039),a=g(9297),t=g(8227),G=g(7657).IteratorPrototype,y=g(3724),e=g(6395),c="constructor",w="Iterator",r=t("toStringTag"),R=TypeError,n=B[w],S=e||!i(n)||n.prototype!==G||!s((function(){n({})})),N=function Iterator(){C(this,G);if(o(this)===G)throw new R("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(A,I){y?D(G,A,{configurable:!0,get:function(){return I},set:function(I){E(this);if(this===G)throw new R("You can't redefine this property");a(this,A)?this[A]=I:h(this,A,I)}}):G[A]=I};a(G,r)||defineIteratorPrototypeAccessor(r,w);!S&&a(G,c)&&G[c]!==Object||defineIteratorPrototypeAccessor(c,N);N.prototype=G;Q({global:!0,constructor:!0,forced:S},{Iterator:N})},3215:(A,I,g)=>{var Q=g(6518),B=g(2652),C=g(9306),E=g(8551),i=g(1767);Q({target:"Iterator",proto:!0,real:!0},{every:function every(A){E(this);C(A);var I=i(this),g=0;return!B(I,(function(I,Q){if(!A(I,g++))return Q()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},3949:(A,I,g)=>{var Q=g(6518),B=g(2652),C=g(9306),E=g(8551),i=g(1767);Q({target:"Iterator",proto:!0,real:!0},{forEach:function forEach(A){E(this);C(A);var I=i(this),g=0;B(I,(function(I){A(I,g++)}),{IS_RECORD:!0})}})},1454:(A,I,g)=>{var Q=g(6518),B=g(713);Q({target:"Iterator",proto:!0,real:!0,forced:g(6395)},{map:B})},4979:(A,I,g)=>{var Q=g(6518),B=g(4576),C=g(7751),E=g(6980),i=g(4913).f,o=g(9297),D=g(679),h=g(3167),s=g(2603),a=g(5002),t=g(8574),G=g(3724),y=g(6395),e="DOMException",c=C("Error"),w=C(e),r=function DOMException(){D(this,R);var A=arguments.length,I=s(A<1?void 0:arguments[0]),g=s(A<2?void 0:arguments[1],"Error"),Q=new w(I,g),B=new c(I);B.name=e;i(Q,"stack",E(1,t(B.stack,1)));h(Q,this,r);return Q},R=r.prototype=w.prototype,n="stack"in new c(e),S="stack"in new w(1,2),N=w&&G&&Object.getOwnPropertyDescriptor(B,e),k=!(!N||N.writable&&N.configurable),J=n&&!k&&!S;Q({global:!0,constructor:!0,forced:y||J},{DOMException:J?r:w});var U=C(e),Y=U.prototype;if(Y.constructor!==U){y||i(Y,"constructor",E(1,U));for(var H in a)if(o(a,H)){var d=a[H],L=d.s;o(U,L)||i(U,L,E(6,d.c))}}},3611:(A,I,g)=>{var Q=g(6518),B=g(4576),C=g(2106),E=g(3724),i=TypeError,o=Object.defineProperty,D=B.self!==B;try{if(E){var h=Object.getOwnPropertyDescriptor(B,"self");!D&&h&&h.get&&h.enumerable||C(B,"self",{get:function self(){return B},set:function self(A){if(this!==B)throw new i("Illegal invocation");o(B,"self",{value:A,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else Q({global:!0,simple:!0,forced:D},{self:B})}catch(A){}},4603:(A,I,g)=>{var Q=g(6840),B=g(9504),C=g(655),E=g(2812),i=URLSearchParams,o=i.prototype,D=B(o.append),h=B(o.delete),s=B(o.forEach),a=B([].push),t=new i("a=1&a=2&b=3");t.delete("a",1);t.delete("b",void 0);t+""!="a=2"&&Q(o,"delete",(function(A){var I=arguments.length,g=I<2?void 0:arguments[1];if(I&&void 0===g)return h(this,A);var Q=[];s(this,(function(A,I){a(Q,{key:I,value:A})}));E(I,1);for(var B,i=C(A),o=C(g),t=0,G=0,y=!1,e=Q.length;t{var Q=g(6840),B=g(9504),C=g(655),E=g(2812),i=URLSearchParams,o=i.prototype,D=B(o.getAll),h=B(o.has),s=new i("a=1");!s.has("a",2)&&s.has("a",void 0)||Q(o,"has",(function has(A){var I=arguments.length,g=I<2?void 0:arguments[1];if(I&&void 0===g)return h(this,A);var Q=D(this,A);E(I,1);for(var B=C(g),i=0;i{var Q=g(3724),B=g(9504),C=g(2106),E=URLSearchParams.prototype,i=B(E.forEach);Q&&!("size"in E)&&C(E,"size",{get:function size(){var A=0;i(this,(function(){A++}));return A},configurable:!0,enumerable:!0})}},I={};function __webpack_require__(g){var Q=I[g];if(void 0!==Q)return Q.exports;var B=I[g]={exports:{}};A[g].call(B.exports,B,B.exports,__webpack_require__);return B.exports}__webpack_require__.d=(A,I)=>{for(var g in I)__webpack_require__.o(I,g)&&!__webpack_require__.o(A,g)&&Object.defineProperty(A,g,{enumerable:!0,get:I[g]})};__webpack_require__.o=(A,I)=>Object.prototype.hasOwnProperty.call(A,I);var __webpack_exports__ = globalThis.pdfjsImageDecoders = {};__webpack_require__.d(__webpack_exports__,{Jbig2Error:()=>Jbig2Error,Jbig2Image:()=>Jbig2Image,JpegError:()=>JpegError,JpegImage:()=>JpegImage,JpxError:()=>JpxError,JpxImage:()=>JpxImage,VerbosityLevel:()=>g,getVerbosityLevel:()=>getVerbosityLevel,setVerbosityLevel:()=>setVerbosityLevel});__webpack_require__(4114),__webpack_require__(6573),__webpack_require__(8100),__webpack_require__(7936),__webpack_require__(7467),__webpack_require__(4732),__webpack_require__(9577),__webpack_require__(4979),__webpack_require__(4603),__webpack_require__(7566),__webpack_require__(8721);"object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&process.type;const g={ERRORS:0,WARNINGS:1,INFOS:5};let Q=g.WARNINGS;function setVerbosityLevel(A){Number.isInteger(A)&&(Q=A)}function getVerbosityLevel(){return Q}function info(A){Q>=g.INFOS&&console.log(`Info: ${A}`)}function util_warn(A){Q>=g.WARNINGS&&console.log(`Warning: ${A}`)}function util_unreachable(A){throw new Error(A)}function util_shadow(A,I,g,Q=!1){Object.defineProperty(A,I,{value:g,enumerable:!Q,configurable:!0,writable:!1});return g}const B=function BaseExceptionClosure(){function BaseException(A,I){this.message=A;this.name=I}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class FormatError extends B{constructor(A){super(A,"FormatError")}}function bytesToString(A){"object"==typeof A&&void 0!==A?.length||util_unreachable("Invalid argument for bytesToString");const I=A.length,g=8192;if(IA.toString(16).padStart(2,"0")));__webpack_require__(7642),__webpack_require__(8004),__webpack_require__(3853),__webpack_require__(5876),__webpack_require__(2475),__webpack_require__(5024),__webpack_require__(1698),__webpack_require__(8992),__webpack_require__(3215),__webpack_require__(1454);Symbol("CIRCULAR_REF"),Symbol("EOF");Object.create(null),Object.create(null),Object.create(null);Symbol.iterator;Symbol.iterator;class base_stream_BaseStream{get length(){util_unreachable("Abstract getter `length` accessed")}get isEmpty(){util_unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return util_shadow(this,"isDataLoaded",!0)}getByte(){util_unreachable("Abstract method `getByte` called")}getBytes(A){util_unreachable("Abstract method `getBytes` called")}async getImageData(A,I){return this.getBytes(A,I)}async asyncGetBytes(){util_unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const A=this.getByte();-1!==A&&this.pos--;return A}peekBytes(A){const I=this.getBytes(A);this.pos-=I.length;return I}getUint16(){const A=this.getByte(),I=this.getByte();return-1===A||-1===I?-1:(A<<8)+I}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(A,I){util_unreachable("Abstract method `getByteRange` called")}getString(A){return bytesToString(this.getBytes(A))}skip(A){this.pos+=A||1}reset(){util_unreachable("Abstract method `reset` called")}moveStart(){util_unreachable("Abstract method `moveStart` called")}makeSubStream(A,I,g=null){util_unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}function log2(A){return A<=0?0:Math.ceil(Math.log2(A))}function readInt8(A,I){return A[I]<<24>>24}function readUint16(A,I){return A[I]<<8|A[I+1]}function readUint32(A,I){return(A[I]<<24|A[I+1]<<16|A[I+2]<<8|A[I+3])>>>0}const C=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class ArithmeticDecoder{constructor(A,I,g){this.data=A;this.bp=I;this.dataEnd=g;this.chigh=A[I];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}byteIn(){const A=this.data;let I=this.bp;if(255===A[I])if(A[I+1]>143){this.clow+=65280;this.ct=8}else{I++;this.clow+=A[I]<<9;this.ct=7;this.bp=I}else{I++;this.clow+=I65535){this.chigh+=this.clow>>16;this.clow&=65535}}readBit(A,I){let g=A[I]>>1,Q=1&A[I];const B=C[g],E=B.qe;let i,o=this.a-E;if(this.chigh>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&o));this.a=o;A[I]=g<<1|Q;return i}}const E=-1,i=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],o=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],D=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],h=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],s=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],a=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class CCITTFaxDecoder{constructor(A,I={}){if(!A||"function"!=typeof A.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=A;this.eof=!1;this.encoding=I.K||0;this.eoline=I.EndOfLine||!1;this.byteAlign=I.EncodedByteAlign||!1;this.columns=I.Columns||1728;this.rows=I.Rows||0;this.eoblock=I.EndOfBlock??!0;this.black=I.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;let g;for(;0===(g=this._lookBits(12));)this._eatBits(1);1===g&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}readNextChar(){if(this.eof)return-1;const A=this.refLine,I=this.codingLine,g=this.columns;let Q,B,C,i,o;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;let C,o,D;if(this.nextLine2D){for(i=0;I[i]=64);do{o+=D=this._getWhiteCode()}while(D>=64)}else{do{C+=D=this._getWhiteCode()}while(D>=64);do{o+=D=this._getBlackCode()}while(D>=64)}this._addPixels(I[this.codingPos]+C,B);I[this.codingPos]0?--Q:++Q;for(;A[Q]<=I[this.codingPos]&&A[Q]0?--Q:++Q;for(;A[Q]<=I[this.codingPos]&&A[Q]0?--Q:++Q;for(;A[Q]<=I[this.codingPos]&&A[Q]=64);else do{C+=D=this._getWhiteCode()}while(D>=64);this._addPixels(I[this.codingPos]+C,B);B^=1}}let h=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){C=this._lookBits(12);if(this.eoline)for(;C!==E&&1!==C;){this._eatBits(1);C=this._lookBits(12)}else for(;0===C;){this._eatBits(1);C=this._lookBits(12)}if(1===C){this._eatBits(12);h=!0}else C===E&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&h&&this.byteAlign){C=this._lookBits(12);if(1===C){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(i=0;i<4;++i){C=this._lookBits(12);1!==C&&info("bad rtc code: "+C);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){C=this._lookBits(13);if(C===E){this.eof=!0;return-1}if(C>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&C)}}this.outputBits=I[0]>0?I[this.codingPos=0]:I[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&I[this.codingPos]C){o<<=C;1&this.codingPos||(o|=255>>8-C);this.outputBits-=C;C=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);C-=this.outputBits;this.outputBits=0;if(I[this.codingPos]0){o<<=C;C=0}}}while(C)}this.black&&(o^=255);return o}_addPixels(A,I){const g=this.codingLine;let Q=this.codingPos;if(A>g[Q]){if(A>this.columns){info("row is wrong length");this.err=!0;A=this.columns}1&Q^I&&++Q;g[Q]=A}this.codingPos=Q}_addPixelsNeg(A,I){const g=this.codingLine;let Q=this.codingPos;if(A>g[Q]){if(A>this.columns){info("row is wrong length");this.err=!0;A=this.columns}1&Q^I&&++Q;g[Q]=A}else if(A0&&A=B){const I=g[A-B];if(I[0]===Q){this._eatBits(Q);return[!0,I[1],!0]}}}return[!1,0,!1]}_getTwoDimCode(){let A,I=0;if(this.eoblock){I=this._lookBits(7);A=i[I];if(A?.[0]>0){this._eatBits(A[0]);return A[1]}}else{const A=this._findTableCode(1,7,i);if(A[0]&&A[2])return A[1]}info("Bad two dim code");return E}_getWhiteCode(){let A,I=0;if(this.eoblock){I=this._lookBits(12);if(I===E)return 1;A=I>>5==0?o[I]:D[I>>3];if(A[0]>0){this._eatBits(A[0]);return A[1]}}else{let A=this._findTableCode(1,9,D);if(A[0])return A[1];A=this._findTableCode(11,12,o);if(A[0])return A[1]}info("bad white code");this._eatBits(1);return 1}_getBlackCode(){let A,I;if(this.eoblock){A=this._lookBits(13);if(A===E)return 1;I=A>>7==0?h[A]:A>>9==0&&A>>7!=0?s[(A>>1)-64]:a[A>>7];if(I[0]>0){this._eatBits(I[0]);return I[1]}}else{let A=this._findTableCode(2,6,a);if(A[0])return A[1];A=this._findTableCode(7,12,s,64);if(A[0])return A[1];A=this._findTableCode(10,13,h);if(A[0])return A[1]}info("bad black code");this._eatBits(1);return 1}_lookBits(A){let I;for(;this.inputBits>16-A;this.inputBuf=this.inputBuf<<8|I;this.inputBits+=8}return this.inputBuf>>this.inputBits-A&65535>>16-A}_eatBits(A){(this.inputBits-=A)<0&&(this.inputBits=0)}}class Jbig2Error extends B{constructor(A){super(A,"Jbig2Error")}}class ContextCache{getContexts(A){return A in this?this[A]:this[A]=new Int8Array(65536)}}class DecodingContext{constructor(A,I,g){this.data=A;this.start=I;this.end=g}get decoder(){return util_shadow(this,"decoder",new ArithmeticDecoder(this.data,this.start,this.end))}get contextCache(){return util_shadow(this,"contextCache",new ContextCache)}}const t=2**31-1,G=-(2**31);function decodeInteger(A,I,g){const Q=A.getContexts(I);let B=1;function readBits(A){let I=0;for(let C=0;C>>0}const C=readBits(1),E=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);let i;0===C?i=E:E>0&&(i=-E);return i>=G&&i<=t?i:null}function decodeIAID(A,I,g){const Q=A.getContexts("IAID");let B=1;for(let A=0;A=U&&f=Y){Z=Z<<1&c;for(y=0;y=0&&b=0){W=K[q][b];W&&(Z|=W<=A?D<<=1:D=D<<1|N[i][o]}for(t=0;t=n||o<0||o>=R?D<<=1:D=D<<1|Q[i][o]}const G=k.readBit(J,D);I[E]=G}}return N}function decodeTextRegion(A,I,g,Q,B,C,E,i,o,D,h,s,a,t,G,y,e,c,w){if(A&&I)throw new Jbig2Error("refinement with Huffman is not supported");const r=[];let R,n;for(R=0;R1&&(B=A?w.readBits(c):decodeInteger(N,"IAIT",S));const C=E*k+B,J=A?t.symbolIDTable.decode(w):decodeIAID(N,S,o),U=I&&(A?w.readBit():decodeInteger(N,"IARI",S));let Y=i[J],H=Y[0].length,d=Y.length;if(U){const A=decodeInteger(N,"IARDW",S),I=decodeInteger(N,"IARDH",S);H+=A;d+=I;Y=decodeRefinement(H,d,G,Y,(A>>1)+decodeInteger(N,"IARDX",S),(I>>1)+decodeInteger(N,"IARDY",S),!1,y,e)}let L=0;D?1&s?L=d-1:Q+=d-1:s>1?Q+=H-1:L=H-1;const K=C-(1&s?0:d-1),M=Q-(2&s?H-1:0);let l,f,q;if(D)for(l=0;l>5&7;const o=[31&E];let D=I+6;if(7===E){i=536870911&readUint32(A,D-1);D+=3;let I=i+7>>3;o[0]=A[D++];for(;--I>0;)o.push(A[D++])}else if(5===E||6===E)throw new Jbig2Error("invalid referred-to flags");g.retainBits=o;let h=4;g.number<=256?h=1:g.number<=65536&&(h=2);const s=[];let a,t;for(a=0;a>>24&255;C[3]=I.height>>16&255;C[4]=I.height>>8&255;C[5]=255&I.height;for(a=D,t=A.length;a>2&3;A.huffmanDWSelector=I>>4&3;A.bitmapSizeSelector=I>>6&1;A.aggregationInstancesSelector=I>>7&1;A.bitmapCodingContextUsed=!!(256&I);A.bitmapCodingContextRetained=!!(512&I);A.template=I>>10&3;A.refinementTemplate=I>>12&1;D+=2;if(!A.huffman){o=0===A.template?4:1;E=[];for(i=0;i>2&3;h.stripSize=1<>4&3;h.transposed=!!(64&s);h.combinationOperator=s>>7&3;h.defaultPixelValue=s>>9&1;h.dsOffset=s<<17>>27;h.refinementTemplate=s>>15&1;if(h.huffman){const A=readUint16(Q,D);D+=2;h.huffmanFS=3&A;h.huffmanDS=A>>2&3;h.huffmanDT=A>>4&3;h.huffmanRefinementDW=A>>6&3;h.huffmanRefinementDH=A>>8&3;h.huffmanRefinementDX=A>>10&3;h.huffmanRefinementDY=A>>12&3;h.huffmanRefinementSizeSelector=!!(16384&A)}if(h.refinement&&!h.refinementTemplate){E=[];for(i=0;i<2;i++){E.push({x:readInt8(Q,D),y:readInt8(Q,D+1)});D+=2}h.refinementAt=E}h.numberOfSymbolInstances=readUint32(Q,D);D+=4;C=[h,g.referredTo,Q,D,B];break;case 16:const a={},t=Q[D++];a.mmr=!!(1&t);a.template=t>>1&3;a.patternWidth=Q[D++];a.patternHeight=Q[D++];a.maxPatternIndex=readUint32(Q,D);D+=4;C=[a,g.number,Q,D,B];break;case 22:case 23:const G={};G.info=readRegionSegmentInformation(Q,D);D+=R;const y=Q[D++];G.mmr=!!(1&y);G.template=y>>1&3;G.enableSkip=!!(8&y);G.combinationOperator=y>>4&7;G.defaultPixelValue=y>>7&1;G.gridWidth=readUint32(Q,D);D+=4;G.gridHeight=readUint32(Q,D);D+=4;G.gridOffsetX=4294967295&readUint32(Q,D);D+=4;G.gridOffsetY=4294967295&readUint32(Q,D);D+=4;G.gridVectorX=readUint16(Q,D);D+=2;G.gridVectorY=readUint16(Q,D);D+=2;C=[G,g.referredTo,Q,D,B];break;case 38:case 39:const e={};e.info=readRegionSegmentInformation(Q,D);D+=R;const c=Q[D++];e.mmr=!!(1&c);e.template=c>>1&3;e.prediction=!!(8&c);if(!e.mmr){o=0===e.template?4:1;E=[];for(i=0;i>2&1;w.combinationOperator=r>>3&3;w.requiresBuffer=!!(32&r);w.combinationOperatorOverride=!!(64&r);C=[w];break;case 49:case 50:case 51:case 62:break;case 53:C=[g.number,Q,D,B];break;default:throw new Jbig2Error(`segment type ${g.typeName}(${g.type}) is not implemented`)}const h="on"+g.typeName;h in I&&I[h].apply(I,C)}function processSegments(A,I){for(let g=0,Q=A.length;g>3,g=new Uint8ClampedArray(I*A.height);A.defaultPixelValue&&g.fill(255);this.buffer=g}drawBitmap(A,I){const g=this.currentPageInfo,Q=A.width,B=A.height,C=g.width+7>>3,E=g.combinationOperatorOverride?A.combinationOperator:g.combinationOperator,i=this.buffer,o=128>>(7&A.x);let D,h,s,a,t=A.y*C+(A.x>>3);switch(E){case 0:for(D=0;D>=1;if(!s){s=128;a++}}t+=C}break;case 2:for(D=0;D>=1;if(!s){s=128;a++}}t+=C}break;default:throw new Jbig2Error(`operator ${E} is not supported`)}}onImmediateGenericRegion(A,I,g,Q){const B=A.info,C=new DecodingContext(I,g,Q),E=decodeBitmap(A.mmr,B.width,B.height,A.template,A.prediction,null,A.at,C);this.drawBitmap(B,E)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(A,I,g,Q,B,C){let E,i;if(A.huffman){E=function getSymbolDictionaryHuffmanTables(A,I,g){let Q,B,C,E,i=0;switch(A.huffmanDHSelector){case 0:case 1:Q=getStandardTable(A.huffmanDHSelector+4);break;case 3:Q=getCustomHuffmanTable(i,I,g);i++;break;default:throw new Jbig2Error("invalid Huffman DH selector")}switch(A.huffmanDWSelector){case 0:case 1:B=getStandardTable(A.huffmanDWSelector+2);break;case 3:B=getCustomHuffmanTable(i,I,g);i++;break;default:throw new Jbig2Error("invalid Huffman DW selector")}if(A.bitmapSizeSelector){C=getCustomHuffmanTable(i,I,g);i++}else C=getStandardTable(1);E=A.aggregationInstancesSelector?getCustomHuffmanTable(i,I,g):getStandardTable(1);return{tableDeltaHeight:Q,tableDeltaWidth:B,tableBitmapSize:C,tableAggregateInstances:E}}(A,g,this.customTables);i=new Reader(Q,B,C)}let o=this.symbols;o||(this.symbols=o={});const D=[];for(const A of g){const I=o[A];I&&D.push(...I)}const h=new DecodingContext(Q,B,C);o[I]=function decodeSymbolDictionary(A,I,g,Q,B,C,E,i,o,D,h,s){if(A&&I)throw new Jbig2Error("symbol refinement with Huffman is not supported");const a=[];let t=0,G=log2(g.length+Q);const y=h.decoder,e=h.contextCache;let c,w;if(A){c=getStandardTable(1);w=[];G=Math.max(G,1)}for(;a.length1)r=decodeTextRegion(A,I,Q,t,0,B,1,g.concat(a),G,0,0,1,0,C,o,D,h,0,s);else{const A=decodeIAID(e,y,G),I=decodeInteger(e,"IARDX",y),B=decodeInteger(e,"IARDY",y);r=decodeRefinement(Q,t,o,A=32){let g,Q,E;switch(I){case 32:if(0===A)throw new Jbig2Error("no previous value in symbol ID table");Q=B.readBits(2)+3;g=C[A-1].prefixLength;break;case 33:Q=B.readBits(3)+3;g=0;break;case 34:Q=B.readBits(7)+11;g=0;break;default:throw new Jbig2Error("invalid code length in symbol ID table")}for(E=0;E=0;e--){Y=A?decodeMMRBitmap(U,o,D,!0):decodeBitmap(!1,o,D,g,!1,null,k,G);J[e]=Y}for(H=0;H=0;c--){L^=J[c][H][d];K|=L<>8;f=s+H*a-d*t>>8;if(l>=0&&l+n<=Q&&f>=0&&f+S<=B)for(e=0;e=B)){b=y[I];q=M[e];for(c=0;c=0&&A>1&7),o=1+(Q>>4&7),D=[];let h,s,a=B;do{h=E.readBits(i);s=E.readBits(o);D.push(new HuffmanLine([a,h,s,0]));a+=1<>I&1;if(I<=0)this.children[g]=new HuffmanTreeNode(A);else{let Q=this.children[g];Q||(this.children[g]=Q=new HuffmanTreeNode(null));Q.buildTree(A,I-1)}}decodeNode(A){if(this.isLeaf){if(this.isOOB)return null;const I=A.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-I:I)}const I=this.children[A.readBit()];if(!I)throw new Jbig2Error("invalid Huffman data");return I.decodeNode(A)}}class HuffmanTable{constructor(A,I){I||this.assignPrefixCodes(A);this.rootNode=new HuffmanTreeNode(null);for(let I=0,g=A.length;I0&&this.rootNode.buildTree(g,g.prefixLength-1)}}decode(A){return this.rootNode.decodeNode(A)}assignPrefixCodes(A){const I=A.length;let g=0;for(let Q=0;Q=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}const A=this.currentByte>>this.shift&1;this.shift--;return A}readBits(A){let I,g=0;for(I=A-1;I>=0;I--)g|=this.readBit()<=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(A,I,g){let Q=0;for(let B=0,C=I.length;B>g&1;g--}}if(Q&&!i){const A=5;for(let I=0;I>=1}}return{imgData:h,width:i,height:o}}(A);this.width=g;this.height=Q;return I}}class JpegError extends B{constructor(A){super(A,"JpegError")}}class DNLMarkerError extends B{constructor(A,I){super(A,"DNLMarkerError");this.scanLines=I}}class EOIMarkerError extends B{constructor(A){super(A,"EOIMarkerError")}}const S=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),N=4017,k=799,J=3406,U=2276,Y=1567,H=3784,d=5793,L=2896;function buildHuffmanTable(A,I){let g,Q,B=0,C=16;for(;C>0&&!A[C-1];)C--;const E=[{children:[],index:0}];let i,o=E[0];for(g=0;g0;)o=E.pop();o.index++;E.push(o);for(;E.length<=g;){E.push(i={children:[],index:0});o.children[o.index]=i.children;o=i}B++}if(g+10){G--;return t>>G&1}t=A[I++];if(255===t){const Q=A[I++];if(Q){if(220===Q&&D){const Q=readUint16(A,I+=2);I+=2;if(Q>0&&Q!==g.scanLines)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",Q)}else if(217===Q){if(D){const A=w*(8===g.precision?8:0);if(A>0&&Math.round(g.scanLines/A)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",A)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(t<<8|Q).toString(16)}`)}}G=7;return t>>>7}function decodeHuffman(A){let I=A;for(;;){I=I[readBit()];switch(typeof I){case"number":return I;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(A){let I=0;for(;A>0;){I=I<<1|readBit();A--}return I}function receiveAndExtend(A){if(1===A)return 1===readBit()?1:-1;const I=receive(A);return I>=1<0){y--;return}let g=C;const Q=E;for(;g<=Q;){const Q=decodeHuffman(A.huffmanTableAC),B=15&Q,C=Q>>4;if(0===B){if(C<15){y=receive(C)+(1<>4;if(0===B)if(D<15){y=receive(D)+(1<>4;if(0===Q){if(C<15)break;B+=16;continue}B+=C;const E=S[B];A.blockData[I+E]=receiveAndExtend(Q);B++}};let Y,H=0;const d=1===r?Q[0].blocksPerLine*Q[0].blocksPerColumn:h*g.mcusPerColumn;let L,K;for(;H<=d;){const g=B?Math.min(d-H,B):d;if(g>0){for(n=0;n0?"unexpected":"excessive"} MCU data, current marker is: ${Y.invalid}`);I=Y.offset}if(!(Y.marker>=65488&&Y.marker<=65495))break;I+=2}return I-a}function quantizeAndInverse(A,I,g){const Q=A.quantizationTable,B=A.blockData;let C,E,i,o,D,h,s,a,t,G,y,e,c,w,r,R,n;if(!Q)throw new JpegError("missing required Quantization Table.");for(let A=0;A<64;A+=8){t=B[I+A];G=B[I+A+1];y=B[I+A+2];e=B[I+A+3];c=B[I+A+4];w=B[I+A+5];r=B[I+A+6];R=B[I+A+7];t*=Q[A];if(0!=(G|y|e|c|w|r|R)){G*=Q[A+1];y*=Q[A+2];e*=Q[A+3];c*=Q[A+4];w*=Q[A+5];r*=Q[A+6];R*=Q[A+7];C=d*t+128>>8;E=d*c+128>>8;i=y;o=r;D=L*(G-R)+128>>8;a=L*(G+R)+128>>8;h=e<<4;s=w<<4;C=C+E+1>>1;E=C-E;n=i*H+o*Y+128>>8;i=i*Y-o*H+128>>8;o=n;D=D+s+1>>1;s=D-s;a=a+h+1>>1;h=a-h;C=C+o+1>>1;o=C-o;E=E+i+1>>1;i=E-i;n=D*U+a*J+2048>>12;D=D*J-a*U+2048>>12;a=n;n=h*k+s*N+2048>>12;h=h*N-s*k+2048>>12;s=n;g[A]=C+a;g[A+7]=C-a;g[A+1]=E+s;g[A+6]=E-s;g[A+2]=i+h;g[A+5]=i-h;g[A+3]=o+D;g[A+4]=o-D}else{n=d*t+512>>10;g[A]=n;g[A+1]=n;g[A+2]=n;g[A+3]=n;g[A+4]=n;g[A+5]=n;g[A+6]=n;g[A+7]=n}}for(let A=0;A<8;++A){t=g[A];G=g[A+8];y=g[A+16];e=g[A+24];c=g[A+32];w=g[A+40];r=g[A+48];R=g[A+56];if(0!=(G|y|e|c|w|r|R)){C=d*t+2048>>12;E=d*c+2048>>12;i=y;o=r;D=L*(G-R)+2048>>12;a=L*(G+R)+2048>>12;h=e;s=w;C=4112+(C+E+1>>1);E=C-E;n=i*H+o*Y+2048>>12;i=i*Y-o*H+2048>>12;o=n;D=D+s+1>>1;s=D-s;a=a+h+1>>1;h=a-h;C=C+o+1>>1;o=C-o;E=E+i+1>>1;i=E-i;n=D*U+a*J+2048>>12;D=D*J-a*U+2048>>12;a=n;n=h*k+s*N+2048>>12;h=h*N-s*k+2048>>12;s=n;t=C+a;R=C-a;G=E+s;r=E-s;y=i+h;w=i-h;e=o+D;c=o-D;t<16?t=0:t>=4080?t=255:t>>=4;G<16?G=0:G>=4080?G=255:G>>=4;y<16?y=0:y>=4080?y=255:y>>=4;e<16?e=0:e>=4080?e=255:e>>=4;c<16?c=0:c>=4080?c=255:c>>=4;w<16?w=0:w>=4080?w=255:w>>=4;r<16?r=0:r>=4080?r=255:r>>=4;R<16?R=0:R>=4080?R=255:R>>=4;B[I+A]=t;B[I+A+8]=G;B[I+A+16]=y;B[I+A+24]=e;B[I+A+32]=c;B[I+A+40]=w;B[I+A+48]=r;B[I+A+56]=R}else{n=d*t+8192>>14;n=n<-2040?0:n>=2024?255:n+2056>>4;B[I+A]=n;B[I+A+8]=n;B[I+A+16]=n;B[I+A+24]=n;B[I+A+32]=n;B[I+A+40]=n;B[I+A+48]=n;B[I+A+56]=n}}}function buildComponentData(A,I){const g=I.blocksPerLine,Q=I.blocksPerColumn,B=new Int16Array(64);for(let A=0;A=Q)return null;const C=readUint16(A,I);if(C>=65472&&C<=65534)return{invalid:null,marker:C,offset:I};let E=readUint16(A,B);for(;!(E>=65472&&E<=65534);){if(++B>=Q)return null;E=readUint16(A,B)}return{invalid:C.toString(16),marker:E,offset:B}}function prepareComponents(A){const I=Math.ceil(A.samplesPerLine/8/A.maxH),g=Math.ceil(A.scanLines/8/A.maxV);for(const Q of A.components){const B=Math.ceil(Math.ceil(A.samplesPerLine/8)*Q.h/A.maxH),C=Math.ceil(Math.ceil(A.scanLines/8)*Q.v/A.maxV),E=I*Q.h,i=64*(g*Q.v)*(E+1);Q.blockData=new Int16Array(i);Q.blocksPerLine=B;Q.blocksPerColumn=C}A.mcusPerLine=I;A.mcusPerColumn=g}function readDataBlock(A,I){const g=readUint16(A,I);let Q=(I+=2)+g-2;const B=findNextFileMarker(A,Q,I);if(B?.invalid){util_warn("readDataBlock - incorrect length, current marker is: "+B.invalid);Q=B.offset}const C=A.subarray(I,Q);return{appData:C,newOffset:I+=C.length}}function skipData(A,I){const g=readUint16(A,I),Q=(I+=2)+g-2,B=findNextFileMarker(A,Q,I);return B?.invalid?B.offset:Q}class JpegImage{constructor({decodeTransform:A=null,colorTransform:I=-1}={}){this._decodeTransform=A;this._colorTransform=I}static canUseImageDecoder(A,I=-1){let g=0,Q=null,B=readUint16(A,g);g+=2;if(65496!==B)throw new JpegError("SOI not found");B=readUint16(A,g);g+=2;A:for(;65497!==B;){switch(B){case 65472:case 65473:case 65474:Q=A[g+7];break A;case 65535:255!==A[g]&&g--}g=skipData(A,g);B=readUint16(A,g);g+=2}return 4!==Q&&(3!==Q||0!==I)}parse(A,{dnlScanLines:I=null}={}){let g,Q,B=0,C=null,E=null,i=0;const o=[],D=[],h=[];let s=readUint16(A,B);B+=2;if(65496!==s)throw new JpegError("SOI not found");s=readUint16(A,B);B+=2;A:for(;65497!==s;){let a,t,G;switch(s){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const{appData:y,newOffset:e}=readDataBlock(A,B);B=e;65504===s&&74===y[0]&&70===y[1]&&73===y[2]&&70===y[3]&&0===y[4]&&(C={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])});65518===s&&65===y[0]&&100===y[1]&&111===y[2]&&98===y[3]&&101===y[4]&&(E={version:y[5]<<8|y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break;case 65499:const c=readUint16(A,B);B+=2;const w=c+B-2;let r;for(;B>4==0)for(t=0;t<64;t++){r=S[t];g[r]=A[B++]}else{if(I>>4!=1)throw new JpegError("DQT - invalid table spec");for(t=0;t<64;t++){r=S[t];g[r]=readUint16(A,B);B+=2}}o[15&I]=g}break;case 65472:case 65473:case 65474:if(g)throw new JpegError("Only single frame JPEGs supported");B+=2;g={};g.extended=65473===s;g.progressive=65474===s;g.precision=A[B++];const R=readUint16(A,B);B+=2;g.scanLines=I||R;g.samplesPerLine=readUint16(A,B);B+=2;g.components=[];g.componentIds={};const n=A[B++];let N=0,k=0;for(a=0;a>4,C=15&A[B+1];N>4==0?h:D)[15&I]=buildHuffmanTable(g,C)}break;case 65501:B+=2;Q=readUint16(A,B);B+=2;break;case 65498:const U=1==++i&&!I;B+=2;const Y=A[B++],H=[];for(a=0;a>4];C.huffmanTableAC=D[15&E];H.push(C)}const d=A[B++],L=A[B++],K=A[B++];try{B+=decodeScan(A,B,g,H,Q,d,L,K>>4,15&K,U)}catch(I){if(I instanceof DNLMarkerError){util_warn(`${I.message} -- attempting to re-parse the JPEG image.`);return this.parse(A,{dnlScanLines:I.scanLines})}if(I instanceof EOIMarkerError){util_warn(`${I.message} -- ignoring the rest of the image data.`);break A}throw I}break;case 65500:B+=4;break;case 65535:255!==A[B]&&B--;break;default:const M=findNextFileMarker(A,B-2,B-3);if(M?.invalid){util_warn("JpegImage.parse - unexpected data, current marker is: "+M.invalid);B=M.offset;break}if(!M||B>=A.length-1){util_warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break A}throw new JpegError("JpegImage.parse - unknown marker: "+s.toString(16))}s=readUint16(A,B);B+=2}if(!g)throw new JpegError("JpegImage.parse - no frame data found.");this.width=g.samplesPerLine;this.height=g.scanLines;this.jfif=C;this.adobe=E;this.components=[];for(const A of g.components){const I=o[A.quantizationId];I&&(A.quantizationTable=I);this.components.push({index:A.index,output:buildComponentData(0,A),scaleX:A.h/g.maxH,scaleY:A.v/g.maxV,blocksPerLine:A.blocksPerLine,blocksPerColumn:A.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(A,I,g=!1){const Q=this.width/A,B=this.height/I;let C,E,i,o,D,h,s,a,t,G,y,e=0;const c=this.components.length,w=A*I*c,r=new Uint8ClampedArray(w),R=new Uint32Array(A),n=4294967288;let S;for(s=0;s>8)+N[t+1];return r}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(A){let I,g,Q;for(let B=0,C=A.length;B4)throw new JpegError("Unsupported color mode");const C=this._getLinearizedBlockData(A,I,B);if(1===this.numComponents&&(g||Q)){const A=C.length*(g?4:3),I=new Uint8ClampedArray(A);let Q=0;if(g)!function grayToRGBA(A,I){if(util_FeatureTest.isLittleEndian)for(let g=0,Q=A.length;g{I=A;g=Q}));Q.decode=function(A,{numComponents:I=4,isIndexedColormap:g=!1,smaskInData:B=!1}){const C=A.length,E=Q._malloc(C);Q.HEAPU8.set(A,E);const i=Q._jp2_decode(E,C,I>0?I:0,!!g,!!B);Q._free(E);if(i){const{errorMessages:A}=Q;if(A){delete Q.errorMessages;return A}return"Unknown error"}const{imageData:o}=Q;Q.imageData=null;return o};var B,C=Object.assign({},Q),E="./this.program",i="";"undefined"!=typeof document&&document.currentScript&&(i=document.currentScript.src);K&&(i=K);i=i.startsWith("blob:")?"":i.substr(0,i.replace(/[?#].*/,"").lastIndexOf("/")+1);var o,D,h,s,a,t=Q.print||console.log.bind(console),G=Q.printErr||console.error.bind(console);Object.assign(Q,C);C=null;Q.arguments&&Q.arguments;Q.thisProgram&&(E=Q.thisProgram);Q.quit&&Q.quit;Q.wasmBinary&&(o=Q.wasmBinary);function tryParseAsDataURI(A){if(isDataURI(A))return function intArrayFromBase64(A){for(var I=atob(A),g=new Uint8Array(I.length),Q=0;QA.startsWith(S);function instantiateSync(A,I){var g,Q=function getBinarySync(A){if(A==y&&o)return new Uint8Array(o);var I=tryParseAsDataURI(A);if(I)return I;if(B)return B(A);throw'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'}(A);g=new WebAssembly.Module(Q);return[new WebAssembly.Instance(g,I),g]}var callRuntimeCallbacks=A=>{for(;A.length>0;)A.shift()(Q)};Q.noExitRuntime;var N,growMemory=A=>{var I=(A-D.buffer.byteLength+65535)/65536;try{D.grow(I);updateMemoryViews();return 1}catch(A){}},k={},getEnvStrings=()=>{if(!getEnvStrings.strings){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:E||"./this.program"};for(var I in k)void 0===k[I]?delete A[I]:A[I]=k[I];var g=[];for(var I in A)g.push(`${I}=${A[I]}`);getEnvStrings.strings=g}return getEnvStrings.strings},J=[null,[],[]],U="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,UTF8ArrayToString=(A,I,g)=>{for(var Q=I+g,B=I;A[B]&&!(B>=Q);)++B;if(B-I>16&&A.buffer&&U)return U.decode(A.subarray(I,B));for(var C="";I>10,56320|1023&D)}}else C+=String.fromCharCode((31&E)<<6|i)}else C+=String.fromCharCode(E)}return C},printChar=(A,I)=>{var g=J[A];if(0===I||10===I){(1===A?t:G)(UTF8ArrayToString(g,0));g.length=0}else g.push(I)},UTF8ToString=(A,I)=>A?UTF8ArrayToString(s,A,I):"",Y={c:(A,I,g)=>s.copyWithin(A,I,I+g),g:function _copy_pixels_1(A,I){A>>=2;const g=Q.imageData=new Uint8ClampedArray(I),B=Q.HEAP32.subarray(A,A+I);g.set(B)},f:function _copy_pixels_3(A,I,g,B){A>>=2;I>>=2;g>>=2;const C=Q.imageData=new Uint8ClampedArray(3*B),E=Q.HEAP32.subarray(A,A+B),i=Q.HEAP32.subarray(I,I+B),o=Q.HEAP32.subarray(g,g+B);for(let A=0;A>=2;I>>=2;g>>=2;B>>=2;const E=Q.imageData=new Uint8ClampedArray(4*C),i=Q.HEAP32.subarray(A,A+C),o=Q.HEAP32.subarray(I,I+C),D=Q.HEAP32.subarray(g,g+C),h=Q.HEAP32.subarray(B,B+C);for(let A=0;A{var I=s.length,g=2147483648;if((A>>>=0)>g)return!1;for(var Q,B,C=1;C<=4;C*=2){var E=I*(1+.2/C);E=Math.min(E,A+100663296);var i=Math.min(g,(Q=Math.max(A,E))+((B=65536)-Q%B)%B);if(growMemory(i))return!0}return!1},l:(A,I)=>{var g=0;getEnvStrings().forEach(((Q,B)=>{var C=I+g;a[A+4*B>>2]=C;((A,I)=>{for(var g=0;g{var g=getEnvStrings();a[A>>2]=g.length;var Q=0;g.forEach((A=>Q+=A.length+1));a[I>>2]=Q;return 0},n:A=>52,j:function _fd_seek(A,I,g,Q,B){return 70},b:(A,I,g,Q)=>{for(var B=0,C=0;C>2],i=a[I+4>>2];I+=8;for(var o=0;o>2]=B;return 0},o:function _gray_to_rgba(A,I){A>>=2;const g=Q.imageData=new Uint8ClampedArray(4*I),B=Q.HEAP32.subarray(A,A+I);for(let A=0;A>=2;I>>=2;const B=Q.imageData=new Uint8ClampedArray(4*g),C=Q.HEAP32.subarray(A,A+g),E=Q.HEAP32.subarray(I,I+g);for(let A=0;A>=2;I>>=2;g>>=2;const C=Q.imageData=new Uint8ClampedArray(4*B),E=Q.HEAP32.subarray(A,A+B),i=Q.HEAP32.subarray(I,I+B),o=Q.HEAP32.subarray(g,g+B);for(let A=0;A0)){!function preRun(){if(Q.preRun){"function"==typeof Q.preRun&&(Q.preRun=[Q.preRun]);for(;Q.preRun.length;)A=Q.preRun.shift(),e.unshift(A)}var A;callRuntimeCallbacks(e)}();if(!(r>0))if(Q.setStatus){Q.setStatus("Running...");setTimeout((function(){setTimeout((function(){Q.setStatus("")}),1);doRun()}),1)}else doRun()}function doRun(){if(!N){N=!0;Q.calledRun=!0;!function initRuntime(){callRuntimeCallbacks(c)}();I(Q);Q.onRuntimeInitialized&&Q.onRuntimeInitialized();!function postRun(){if(Q.postRun){"function"==typeof Q.postRun&&(Q.postRun=[Q.postRun]);for(;Q.postRun.length;)A=Q.postRun.shift(),w.unshift(A)}var A;callRuntimeCallbacks(w)}()}}}if(Q.preInit){"function"==typeof Q.preInit&&(Q.preInit=[Q.preInit]);for(;Q.preInit.length>0;)Q.preInit.pop()()}run();return Q});const l=M;class Stream extends base_stream_BaseStream{constructor(A,I,g,Q){super();this.bytes=A instanceof Uint8Array?A:new Uint8Array(A);this.start=I||0;this.pos=this.start;this.end=I+g||this.bytes.length;this.dict=Q}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(A){const I=this.bytes,g=this.pos,Q=this.end;if(!A)return I.subarray(g,Q);let B=g+A;B>Q&&(B=Q);this.pos=B;return I.subarray(g,B)}getByteRange(A,I){A<0&&(A=0);I>this.end&&(I=this.end);return this.bytes.subarray(A,I)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(A,I,g=null){return new Stream(this.bytes.buffer,A,I,g)}}class JpxError extends B{constructor(A){super(A,"JpxError")}}class JpxImage{static#A=null;static decode(A,I){I||={};this.#A||=l({warn:util_warn});const g=this.#A.decode(A,I);if("string"==typeof g)throw new JpxError(g);return g}static cleanup(){this.#A=null}static parseImageProperties(A){if(!(A instanceof ArrayBuffer||ArrayBuffer.isView(A)))throw new JpxError("Invalid data format, must be a TypedArray.");let I=(A=new Stream(A)).getByte();for(;I>=0;){const g=I;I=A.getByte();if(65361===(g<<8|I)){A.skip(4);const I=A.getInt32()>>>0,g=A.getInt32()>>>0,Q=A.getInt32()>>>0,B=A.getInt32()>>>0;A.skip(16);return{width:I-Q,height:g-B,bitsPerComponent:8,componentsCount:A.getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}var f=__webpack_exports__.Jbig2Error,q=__webpack_exports__.Jbig2Image,b=__webpack_exports__.JpegError,W=__webpack_exports__.JpegImage,u=__webpack_exports__.JpxError,x=__webpack_exports__.JpxImage,Z=__webpack_exports__.VerbosityLevel,p=__webpack_exports__.getVerbosityLevel,m=__webpack_exports__.setVerbosityLevel;export{f as Jbig2Error,q as Jbig2Image,b as JpegError,W as JpegImage,u as JpxError,x as JpxImage,Z as VerbosityLevel,p as getVerbosityLevel,m as setVerbosityLevel};