558 lines
1.8 MiB
JavaScript
558 lines
1.8 MiB
JavaScript
|
|
import{E as e,h as t,l as n,r,u as i}from"./package-Bop5TfAT.js";import{D as a,J as o,X as s,Y as c,_ as l,b as u,f as d,g as f,h as p,i as m,o as h,r as g,s as _,t as v,y}from"./runtime-core.esm-bundler-DO-WTVbd.js";import{n as b,r as x}from"./printLayout-D2pf0W9y.js";import{t as S}from"./worker-ref-BbTnHTC-.js";var C={9306(e,t,n){var r=n(4901),i=n(6823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a function`)}},3506(e,t,n){var r=n(3925),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(`Can't set `+i(e)+` as a prototype`)}},7080(e,t,n){var r=n(4402).has;e.exports=function(e){return r(e),e}},3463(e){var t=TypeError;e.exports=function(e){if(typeof e==`string`)return e;throw new t(`Argument is not a string`)}},4328(e,t,n){var r=n(4995),i=new r.WeakMap,a=r.set,o=r.remove;e.exports=function(e){return a(i,e,1),o(i,e),e}},6557(e,t,n){var r=n(4995).has;e.exports=function(e){return r(e),e}},6469(e,t,n){var r=n(8227),i=n(2360),a=n(4913).f,o=r(`unscopables`),s=Array.prototype;s[o]===void 0&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},679(e,t,n){var r=n(1625),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i(`Incorrect invocation`)}},3972(e,t,n){var r=n(34),i=String,a=TypeError;e.exports=function(e){if(e===void 0||r(e))return e;throw new a(i(e)+` is not an object or undefined`)}},8551(e,t,n){var r=n(34),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not an object`)}},4154(e,t,n){var r=n(6955),i=TypeError;e.exports=function(e){if(r(e)===`Uint8Array`)return e;throw new i(`Argument is not an Uint8Array`)}},7811(e){e.exports=typeof ArrayBuffer<`u`&&typeof DataView<`u`},7394(e,t,n){var r=n(4576),i=n(6706),a=n(2195),o=r.ArrayBuffer,s=r.TypeError;e.exports=o&&i(o.prototype,`byteLength`,`get`)||function(e){if(a(e)!==`ArrayBuffer`)throw new s(`ArrayBuffer expected`);return e.byteLength}},3238(e,t,n){var r=n(4576),i=n(7811),a=n(7394),o=r.DataView;e.exports=function(e){if(!i||a(e)!==0)return!1;try{return new o(e),!1}catch{return!0}}},5169(e,t,n){var r=n(3238),i=TypeError;e.exports=function(e){if(r(e))throw new i(`ArrayBuffer is detached`);return e}},5636(e,t,n){var r=n(4576),i=n(9504),a=n(6706),o=n(7696),s=n(5169),c=n(7394),l=n(4483),u=n(1548),d=r.structuredClone,f=r.ArrayBuffer,p=r.DataView,m=Math.max,h=Math.min,g=f.prototype,_=p.prototype,v=i(g.slice),y=a(g,`resizable`,`get`),b=a(g,`maxByteLength`,`get`),x=i(_.getInt8),S=i(_.setInt8);e.exports=(u||l)&&function(e,t,n){var r=c(e),i=t===void 0?r:o(t),a=!y||!y(e),g;if(s(e),u&&(e=d(e,{transfer:[e]}),r===i&&(n||a)))return e;if(r>=i&&(!n||a))g=v(e,0,i);else{g=new f(i,n&&!a&&b?{maxByteLength:m(i,b(e))}:void 0);for(var _=new p(e),C=new p(g),w=h(i,r),T=0;T<w;T++)S(C,T,x(_,T))}return u||l(e),g}},4644(e,t,n){var r=n(7811),i=n(3724),a=n(4576),o=n(4901),s=n(34),c=n(9297),l=n(6955),u=n(6823),d=n(6699),f=n(6840),p=n(2106),m=n(1625),h=n(2787),g=n(2967),_=n(8227),v=n(3392),y=n(1181),b=y.enforce,x=y.get,S=a.Int8Array,C=S&&S.prototype,w=a.Uint8ClampedArray,T=w&&w.prototype,E=S&&h(S),D=C&&h(C),O=Object.prototype,k=a.TypeError,A=_(`toStringTag`),j=v(`TYPED_ARRAY_TAG`),M=`TypedArrayConstructor`,N=r&&!!g&&l(a.opera)!==`Opera`,P=!1,F,I,L,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},ee=function(e){if(!s(e))return!1;var t=l(e);return t===`DataView`||c(R,t)||c(z,t)},B=function(e){var t=h(e);if(s(t)){var n=x(t);return n&&c(n,M)?n[M]:B(t)}},te=function(e){if(!s(e))return!1;var t=l(e);return c(R,t)||c(z,t)},ne=function(e){if(te(e))return e;throw new k(`Target is not a typed array`)},V=function(e){if(o(e)&&(!g||m(E,e)))return e;throw new k(u(e)+` is not a typed array constructor`)},re=function(e,t,n,r){if(i){if(n)for(var o in R){var s=a[o];if(s&&c(s.prototype,e))try{delete s.prototype[e]}catch{try{s.prototype[e]=t}catch{}}}(!D[e]||n)&&f(D,e,n?t:N&&C[e]||t,r)}},ie=function(e,t,n){var r,o;if(i){if(g){if(n){for(r in R)if(o=a[r],o&&c(o,e))try{delete o[e]}catch{}}if(!
|
|||
|
|
`,"\\r":`\r`,"\\t":` `},f=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var n=!0,r=``;t<e.length;){var m=c(e,t);if(m===`\\`){var h=l(e,t,t+2);if(i(d,h))r+=d[h],t+=2;else if(h===`\\u`){t+=2;var g=l(e,t,t+4);if(!u(f,g))throw new a(`Bad Unicode escape at: `+t);r+=s(o(g,16)),t+=4}else throw new a(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){n=!1,t++;break}else{if(u(p,m))throw new a(`Bad control character in string literal at: `+t);r+=m,t++}}if(n)throw new a(`Unterminated string at: `+t);return{value:r,end:t}}},1103(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},7750(e,t,n){var r=n(4117),i=TypeError;e.exports=function(e){if(r(e))throw new i(`Can't call method on `+e);return e}},9286(e,t,n){var r=n(4402),i=n(8469),a=r.Set,o=r.add;e.exports=function(e){var t=new a;return i(e,function(e){o(t,e)}),t}},3440(e,t,n){var r=n(7080),i=n(4402),a=n(9286),o=n(5170),s=n(3789),c=n(8469),l=n(507),u=i.has,d=i.remove;e.exports=function(e){var t=r(this),n=s(e),i=a(t);return o(i)<=n.size?c(i,function(e){n.includes(e)&&d(i,e)}):l(n.getIterator(),function(e){u(i,e)&&d(i,e)}),i}},4402(e,t,n){var r=n(9504),i=Set.prototype;e.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},8750(e,t,n){var r=n(7080),i=n(4402),a=n(5170),o=n(3789),s=n(8469),c=n(507),l=i.Set,u=i.add,d=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new l;return a(t)>n.size?c(n.getIterator(),function(e){d(t,e)&&u(i,e)}):s(t,function(e){n.includes(e)&&u(i,e)}),i}},4449(e,t,n){var r=n(7080),i=n(4402).has,a=n(5170),o=n(3789),s=n(8469),c=n(507),l=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<=n.size)return s(t,function(e){if(n.includes(e))return!1},!0)!==!1;var u=n.getIterator();return c(u,function(e){if(i(t,e))return l(u.iterator,`normal`,!1)})!==!1}},3838(e,t,n){var r=n(7080),i=n(5170),a=n(8469),o=n(3789);e.exports=function(e){var t=r(this),n=o(e);return i(t)>n.size?!1:a(t,function(e){if(!n.includes(e))return!1},!0)!==!1}},8527(e,t,n){var r=n(7080),i=n(4402).has,a=n(5170),o=n(3789),s=n(507),c=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<n.size)return!1;var l=n.getIterator();return s(l,function(e){if(!i(t,e))return c(l.iterator,`normal`,!1)})!==!1}},8469(e,t,n){var r=n(9504),i=n(507),a=n(4402),o=a.Set,s=a.proto,c=r(s.forEach),l=r(s.keys),u=l(new o).next;e.exports=function(e,t,n){return n?i({iterator:l(e),next:u},t):c(e,t)}},4916(e,t,n){var r=n(7751),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},a=function(e){return{size:e,has:function(){return!0},keys:function(){throw Error(`e`)}}};e.exports=function(e,t){var n=r(`Set`);try{new n()[e](i(0));try{return new n()[e](i(-1)),!1}catch{if(!t)return!0;try{return new n()[e](a(-1/0)),!1}catch{return t(new n([1,2])[e](a(1/0)))}}}catch{return!1}}},9835(e){e.exports=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}}},5170(e,t,n){e.exports=n(6706)(n(4402).proto,`size`,`get`)||function(e){return e.size}},3650(e,t,n){var r=n(7080),i=n(4402),a=n(9286),o=n(3789),s=n(507),c=i.add,l=i.has,u=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=a(t);return s(n,function(e){l(t,e)?u(i,e):c(i,e)}),i}},4204(e,t,n){var r=n(7080),i=n(4402).add,a=n(9286),o=n(3789),s=n(507);e.exports=function(e){var t=r(this),n=o(e).getIterator(),c=a(t);return s(n,function(e){i(c,e)}),c}},6119(e,t,n){var r=n(5745),i=n(3392),a=r(`keys`);e.exports=function(e){return a[e]||(a[e]=i(e))}},7629(e,t,n){var r=n(6395),i=n(4576),a=n(9433),o=`__core-js_shared__`,s=e.exports=i[o]||a(o,{});(s.versions||=[]).push({version:`3.49.0`,mode:r?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`})},5745(e
|
|||
|
|
`&&r!==`\f`&&r!==`\r`)break}return t},_=function(e,t,n){var r=e.length;r<4&&(e+=r===2?`AA`:`A`);var i=(t[h(e,0)]<<18)+(t[h(e,1)]<<12)+(t[h(e,2)]<<6)+t[h(e,3)],a=[i>>16&255,i>>8&255,i&255];if(r===2){if(n&&a[1]!==0)throw new p(`Extra bits`);return[a[0]]}if(r===3){if(n&&a[2]!==0)throw new p(`Extra bits`);return[a[0],a[1]]}return a},v=function(e,t,n){for(var r=t.length,i=0;i<r;i++)e[n+i]=t[i];return n+r};e.exports=function(e,t,n,r){o(e),a(t);var i=l(t)===`base64`?d:f,c=t?t.lastChunkHandling:void 0;if(c===void 0&&(c=`loose`),c!==`loose`&&c!==`strict`&&c!==`stop-before-partial`)throw new m("Incorrect `lastChunkHandling` option");n&&u(n.buffer);var y=e.length,b=n||[],x=0,S=0,C=``,w=0;if(r)for(;;){if(w=g(e,w),w===y){if(C.length>0){if(c===`stop-before-partial`)break;if(c===`loose`){if(C.length===1)throw new p(`Malformed padding: exactly one additional character`);x=v(b,_(C,i,!1),x)}else throw new p(`Missing padding`)}S=y;break}var T=h(e,w);if(++w,T===`=`){if(C.length<2)throw new p(`Padding is too early`);if(w=g(e,w),C.length===2){if(w===y){if(c===`stop-before-partial`)break;throw new p(`Malformed padding: only one =`)}h(e,w)===`=`&&(++w,w=g(e,w))}if(w<y)throw new p(`Unexpected character after padding`);x=v(b,_(C,i,c===`strict`),x),S=y;break}if(!s(i,T))throw new p(`Unexpected character`);var E=r-x;if(E===1&&C.length===2||E===2&&C.length===3||(C+=T,C.length===4&&(x=v(b,_(C,i,!1),x),C=``,S=w,x===r)))break}return{bytes:b,read:S,written:x}}},2303(e,t,n){var r=n(4576),i=n(9504),a=r.Uint8Array,o=r.SyntaxError,s=Math.min,c=i(``.match);e.exports=function(e,t){var n=e.length;if(n%2!=0)throw new o(`String should be an even number of characters`);for(var r=t?s(t.length,n/2):n/2,i=t||new a(r),l=c(e,/.{2}/g),u=0;u<r;u++){var d=+(`0x`+l[u]+`0`);if(d!==d)throw new o(`String should only contain hex characters`);i[u]=d>>4}return{bytes:i,read:u<<1}}},7416(e,t,n){var r=n(9039),i=n(8227),a=n(3724),o=n(6395),s=i(`iterator`);e.exports=!r(function(){var e=new URL(`b?a=1&b=2&c=3`,`https://a`),t=e.searchParams,n=new URLSearchParams(`a=1&a=2&b=3`),r=``;return e.pathname=`c%20d`,t.forEach(function(e,n){t.delete(`b`),r+=n+e}),n.delete(`a`,2),n.delete(`b`,void 0),o&&(!e.toJSON||!n.has(`a`,1)||n.has(`a`,2)||!n.has(`a`,void 0)||n.has(`b`))||!t.size&&(o||!a)||!t.sort||e.href!==`https://a/c%20d?a=1&c=3`||t.get(`c`)!==`3`||String(new URLSearchParams(`?a=1`))!==`a=1`||!t[s]||new URL(`https://a@b`).username!==`a`||new URLSearchParams(new URLSearchParams(`a=b`)).get(`a`)!==`b`||new URL(`https://тест`).host!==`xn--e1aybc`||new URL(`https://a#б`).hash!==`#%D0%B1`||r!==`a1c3`||new URL(`https://x`,void 0).host!==`x`})},7040(e,t,n){e.exports=n(4495)&&!Symbol.sham&&typeof Symbol.iterator==`symbol`},8686(e,t,n){var r=n(3724),i=n(9039);e.exports=r&&i(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812(e){var t=TypeError;e.exports=function(e,n){if(e<n)throw new t(`Not enough arguments`);return e}},8622(e,t,n){var r=n(4576),i=n(4901),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},4995(e,t,n){var r=n(9504),i=WeakMap.prototype;e.exports={WeakMap,set:r(i.set),get:r(i.get),has:r(i.has),remove:r(i.delete)}},8227(e,t,n){var r=n(4576),i=n(5745),a=n(9297),o=n(3392),s=n(4495),c=n(7040),l=r.Symbol,u=i(`wks`),d=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(u,e)||(u[e]=s&&a(l,e)?l[e]:d(`Symbol.`+e)),u[e]}},6573(e,t,n){var r=n(3724),i=n(2106),a=n(3238),o=ArrayBuffer.prototype;r&&!(`detached`in o)&&i(o,`detached`,{configurable:!0,get:function(){return a(this)}})},7936(e,t,n){var r=n(6518),i=n(5636);i&&r({target:`ArrayBuffer`,proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},8100(e,t,n){var r=n(6518),i=n(5636);i&&r({target:`ArrayBuffer`,proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},4423(e,t,n){var r=n(6518),i=n(9617).includes,a=n(9039),o=n(6469),s=a(function(){return![,].includes()}),c=a(function(){return[,1].includes(void 0,1)});r({target:`Array`,proto:!0,forced:s||c},{includes:function(e){return i(th
|
|||
|
|
struct Uniforms {
|
|||
|
|
offsetX : f32,
|
|||
|
|
offsetY : f32,
|
|||
|
|
scaleX : f32,
|
|||
|
|
scaleY : f32,
|
|||
|
|
paddedWidth : f32,
|
|||
|
|
paddedHeight : f32,
|
|||
|
|
borderSize : f32,
|
|||
|
|
_pad : f32,
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
@group(0) @binding(0) var<uniform> u : Uniforms;
|
|||
|
|
|
|||
|
|
struct VertexInput {
|
|||
|
|
@location(0) position : vec2<f32>,
|
|||
|
|
@location(1) color : vec4<f32>,
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
struct VertexOutput {
|
|||
|
|
@builtin(position) position : vec4<f32>,
|
|||
|
|
@location(0) color : vec3<f32>,
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
@vertex
|
|||
|
|
fn vs_main(in : VertexInput) -> VertexOutput {
|
|||
|
|
var out : VertexOutput;
|
|||
|
|
let cx = (in.position.x + u.offsetX) * u.scaleX;
|
|||
|
|
let cy = (in.position.y + u.offsetY) * u.scaleY;
|
|||
|
|
out.position = vec4<f32>(
|
|||
|
|
((cx + u.borderSize) / u.paddedWidth) * 2.0 - 1.0,
|
|||
|
|
1.0 - ((cy + u.borderSize) / u.paddedHeight) * 2.0,
|
|||
|
|
0.0,
|
|||
|
|
1.0
|
|||
|
|
);
|
|||
|
|
out.color = in.color.rgb;
|
|||
|
|
return out;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
@fragment
|
|||
|
|
fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|||
|
|
return vec4<f32>(in.color, 1.0);
|
|||
|
|
}
|
|||
|
|
`,On=new class{#e=null;#t=null;#n=null;#r=null;async#i(){if(!globalThis.navigator?.gpu)return!1;try{let e=await navigator.gpu.requestAdapter();return e?(this.#r=navigator.gpu.getPreferredCanvasFormat(),this.#t=await e.requestDevice(),!0):!1}catch{return!1}}init(){return this.#e||=this.#i()}get isReady(){return this.#t!==null}loadMeshShader(){if(!this.#t||this.#n)return;let e=this.#t.createShaderModule({code:Dn});this.#n=this.#t.createRenderPipeline({layout:`auto`,vertex:{module:e,entryPoint:`vs_main`,buffers:[{arrayStride:8,attributes:[{shaderLocation:0,offset:0,format:`float32x2`}]},{arrayStride:4,attributes:[{shaderLocation:1,offset:0,format:`unorm8x4`}]}]},fragment:{module:e,entryPoint:`fs_main`,targets:[{format:this.#r}]},primitive:{topology:`triangle-list`}})}draw(e,t,n,r,i,a,o,s){this.loadMeshShader();let c=this.#t,{offsetX:l,offsetY:u,scaleX:d,scaleY:f}=r,p=c.createBuffer({size:Math.max(e.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});e.byteLength>0&&c.queue.writeBuffer(p,0,e);let m=c.createBuffer({size:Math.max(t.byteLength,4),usage:GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST});t.byteLength>0&&c.queue.writeBuffer(m,0,t);let h=c.createBuffer({size:32,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST});c.queue.writeBuffer(h,0,new Float32Array([l,u,d,f,a,o,s,0]));let g=c.createBindGroup({layout:this.#n.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:h}}]}),_=new OffscreenCanvas(a,o),v=_.getContext(`webgpu`);v.configure({device:c,format:this.#r,alphaMode:i?`opaque`:`premultiplied`});let y=i?{r:i[0]/255,g:i[1]/255,b:i[2]/255,a:1}:{r:0,g:0,b:0,a:0},b=c.createCommandEncoder(),x=b.beginRenderPass({colorAttachments:[{view:v.getCurrentTexture().createView(),clearValue:y,loadOp:`clear`,storeOp:`store`}]});return n>0&&(x.setPipeline(this.#n),x.setBindGroup(0,g),x.setVertexBuffer(0,p),x.setVertexBuffer(1,m),x.draw(n)),x.end(),c.queue.submit([b.finish()]),p.destroy(),m.destroy(),h.destroy(),_.transferToImageBitmap()}};function kn(){return On.init()}function An(){return On.isReady}function jn(){On.loadMeshShader()}function Mn(e,t,n,r,i,a,o,s){return On.draw(e,t,n,r,i,a,o,s)}var Nn={FILL:`Fill`,STROKE:`Stroke`,SHADING:`Shading`};function Pn(e,t){if(!t)return;let n=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],n,r),e.clip(i)}var Fn=class{isModifyingCurrentTransform(){return!1}getPattern(){U("Abstract method `getPattern` called.")}},In=class extends Fn{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}isOriginBased(){return this._p0[0]===0&&this._p0[1]===0&&(!this.isRadial()||this._p1[0]===0&&this._p1[1]===0)}isRadial(){return this._type===`radial`}areConic(){if(!this.isRadial())return!1;let e=Math.hypot(this._p0[0]-this._p1[0],this._p0[1]-this._p1[1]);return e+this._r1>this._r0&&e+this._r0>this._r1}_createGradient(e,t=null){let n,r=this._p0,i=this._p1;if(t&&(r=r.slice(),i=i.slice(),K.applyTransform(r,t),K.applyTransform(i,t)),this._type===`axial`)n=e.createLinearGradient(r[0],r[1],i[0],i[1]);else if(this._type===`radial`){let a=this._r0,o=this._r1;if(t){let e=new Float32Array(2);K.singularValueDecompose2dScale(t,e),a*=e[0],o*=e[0]}n=e.createRadialGradient(r[0],r[1],a,i[0],i[1],o)}for(let e of this._colorStops)n.addColorStop(e[0],e[1]);return n}_createReversedGradient(e,t=null){let n=this._p1,r=this._p0;t&&(n=n.slice(),r=r.slice(),K.applyTransform(n,t),K.applyTransform(r,t));let i=this._r1,a=this._r0;if(t){let e=new Float32Array(2);K.singularValueDecompose2dScale(t,e),i*=e[0],a*=e[0]}let o=e.createRadialGradient(n[0],n[1],i,r[0],r[1],a),s=this._colorStops.map(([e,t])=>[1-e,t]).reverse();for(let[e,t]of s)o.addColorStop(e,t);return o}getPattern(e,t,n,r){let i;if(r===Nn.STROKE||r===Nn.FILL){if(this.isOriginBased()){let r=K.transform(n,t.baseTransform);this.matrix&&(r=K.transform(r,this.matrix));let i=.001,a=Math.hypot(r[0],r[1]),o=Math.hypot(r[2],r[3]),s=(r[0]*r[2]+r[1]*r[3])/(a*o);if(Math.abs(s)<i)if(this.isRadial()){if(Math.abs(a-o)<i)return this._createGradient(e,r)}else return this._creat
|
|||
|
|
`)||null;o&&this.data.comb&&(o=o.replaceAll(/\s+/g,``));let s={userValue:i,formattedValue:o,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement(`textarea`),n.textContent=o??i,this.data.doNotScroll&&(n.style.overflowY=`hidden`)):(n=document.createElement(`input`),n.type=this.data.password?`password`:`text`,n.setAttribute(`value`,o??i),this.data.doNotScroll&&(n.style.overflowX=`hidden`)),this.data.hasOwnCanvas&&(n.hidden=!0),bi.add(n),this.contentElement=n,n.setAttribute(`data-element-id`,t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=0;let{datetimeFormat:c,datetimeType:l,timeStep:u}=this.data,d=!!l&&this.enableScripting;c&&(n.title=c),this._setRequired(n,this.data.required),a&&(n.maxLength=a),n.addEventListener(`input`,r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(n,`value`,r.target.value,`value`),s.formattedValue=null}),n.addEventListener(`resetform`,e=>{let t=this.data.defaultFieldValue??``;n.value=s.userValue=t,s.formattedValue=null});let f=e=>{let{formattedValue:t}=s;t!=null&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener(`focus`,e=>{if(s.focused)return;let{target:t}=e;if(d&&(t.type=l,u&&(t.step=u)),s.userValue){let e=s.userValue;if(d)if(l===`time`){let n=new Date(e);t.value=[n.getHours(),n.getMinutes(),n.getSeconds()].map(e=>e.toString().padStart(2,`0`)).join(`:`)}else t.value=new Date(e-xi).toISOString().split(l===`date`?`T`:`.`,1)[0];else t.value=e}s.lastCommittedValue=t.value,s.commitKey=1,this.data.actions?.Focus||(s.focused=!0)}),n.addEventListener(`updatefromsandbox`,n=>{this.showElementAndHideCanvas(n.target),this._dispatchEventFromSandbox({value(n){s.userValue=n.detail.value??``,d||e.setValue(t,{value:s.userValue.toString()}),n.target.value=s.userValue},formattedValue(n){let{formattedValue:r}=n.detail;s.formattedValue=r,r!=null&&n.target!==document.activeElement&&(n.target.value=r);let i={formattedValue:r};d&&(i.value=r),e.setValue(t,i)},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:n=>{let{charLimit:r}=n.detail,{target:i}=n;if(r===0){i.removeAttribute(`maxLength`);return}i.setAttribute(`maxLength`,r);let a=s.userValue;!a||a.length<=r||(a=a.slice(0,r),i.value=s.userValue=a,e.setValue(t,{value:a}),this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:a,willCommit:!0,commitKey:1,selStart:i.selectionStart,selEnd:i.selectionEnd}}))}},n)}),n.addEventListener(`keydown`,e=>{s.commitKey=1;let n=-1;if(e.key===`Escape`?n=0:e.key===`Enter`&&!this.data.multiLine?n=2:e.key===`Tab`&&(s.commitKey=3),n===-1)return;let{value:r}=e.target;s.lastCommittedValue!==r&&(s.lastCommittedValue=r,s.userValue=r,this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:r,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});let r=f;f=null,n.addEventListener(`blur`,e=>{if(!s.focused||!e.relatedTarget)return;this.data.actions?.Blur||(s.focused=!1);let{target:n}=e,{value:i}=n;if(d){if(i&&l===`time`){let e=i.split(`:`).map(e=>parseInt(e,10));i=new Date(2e3,0,1,e[0],e[1],e[2]||0).valueOf(),n.step=``}else i.includes(`T`)||(i=`${i}T00:00`),i=new Date(i).valueOf();n.type=`text`}s.userValue=i,s.lastCommittedValue!==i&&this.linkService.eventBus?.dispatch(`dispatcheventinsandbox`,{source:this,detail:{id:t,name:`Keystroke`,value:i,willCommit:!0,commitKey:s.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)}),this.data.actions?.Keystroke&&n.addEventListener(`beforeinput`,e=>{s.lastCommittedValue=null;let{data:n,target:r}=e,{value:i,selectionStart:a,selectionEnd:o}=r,c=a,l=o;switch(e.inputType){case`deleteWordBackward`:{let e=i.substring(0,a).match(/\w*\W*$/);e&&(c-=e[0].length);break}case`deleteWordForward`:{let e=i.substring(a).match(/^\W*\w*/);e&&(l+=e[0].length);break}case`deleteContentBackward`:a===o&&--c;break;case`deleteContentForward`:a===o&&(l+=1);break}e.preventDefault(),this.linkService.eventBus?.d
|
|||
|
|
`))t.push({name:`span`,value:n,attributes:r});return n}#P(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key===`Enter`||e.key===`Escape`&&this.#f)&&this.#I()}updateEdited({rect:e,popup:t,deleted:n}){if(this.#e){n?(this.remove(),this.#T=null):t&&(t.deleted?this.remove():(this.#k(),this.#T=t.text)),e&&(this.#_=null,this.#D(),this.#O());return}if(n||t?.deleted){this.remove();return}this.#E(),this.#S||={contentsObj:this.#s,richText:this.#b},e&&(this.#h=null),t&&t.text&&(this.#b=this.#N(t.text),this.#c=Ke.toDateObject(t.date),this.#s=null),this.#p?.remove(),this.#p=null}resetEdited(){this.#S&&({contentsObj:this.#s,richText:this.#b}=this.#S,this.#S=null,this.#p?.remove(),this.#p=null,this.#h=null)}remove(){if(this.#m?.abort(),this.#m=null,this.#p?.remove(),this.#p=null,this.#C=!1,this.#f=!1,this.#g?.remove(),this.#g=null,this.trigger)for(let e of this.trigger)e.classList.remove(`popupTriggerArea`)}#F(){if(this.#h!==null)return;let{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:n,pageX:r,pageY:i}}}=this.#u,a=!!this.#d,o=a?this.#d:this.#y;for(let e of this.#l)if(!o||K.intersect(e.data.rect,o)!==null){o=e.data.rect,a=!0;break}let s=K.normalizeRect([o[0],e[3]-o[1]+e[1],o[2],e[3]-o[3]+e[1]]),c=a?o[2]-o[0]+5:0,l=s[0]+c,u=s[1];this.#h=[100*(l-r)/t,100*(u-i)/n];let{style:d}=this.#o;d.left=`${this.#h[0]}%`,d.top=`${this.#h[1]}%`}#I(){if(this.#e){this.#e.toggleCommentPopup(this,!1);return}this.#f=!this.#f,this.#f?(this.#L(),this.#o.addEventListener(`click`,this.#i),this.#o.addEventListener(`keydown`,this.#t)):(this.#R(),this.#o.removeEventListener(`click`,this.#i),this.#o.removeEventListener(`keydown`,this.#t))}#L(){this.#p||this.render(),this.isVisible?this.#f&&this.#o.classList.add(`focused`):(this.#F(),this.#o.hidden=!1,this.#o.style.zIndex=parseInt(this.#o.style.zIndex,10)+1e3)}#R(){this.#o.classList.remove(`focused`),!(this.#f||!this.isVisible)&&(this.#o.hidden=!0,this.#o.style.zIndex=parseInt(this.#o.style.zIndex,10)-1e3)}forceHide(){this.#C=this.isVisible,this.#C&&(this.#o.hidden=!0)}maybeShow(){this.#e||(this.#E(),this.#C&&(this.#p||this.#L(),this.#C=!1,this.#o.hidden=!1))}get isVisible(){return this.#e?!1:this.#o.hidden===!1}},Ii=class extends Ci{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=I.FREETEXT}render(){if(this.container.classList.add(`freeTextAnnotation`),this.textContent){let e=this.contentElement=document.createElement(`div`);e.classList.add(`annotationTextContent`),e.setAttribute(`role`,`comment`);for(let t of this.textContent){let n=document.createElement(`span`);n.textContent=t,e.append(n)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this._editOnDoubleClick(),this.container}},Li=class extends Ci{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add(`lineAnnotation`);let{data:e,width:t,height:n}=this,r=this.svgFactory.create(t,n,!0),i=this.#e=this.svgFactory.createElement(`svg:line`);return i.setAttribute(`x1`,e.rect[2]-e.lineCoordinates[0]),i.setAttribute(`y1`,e.rect[3]-e.lineCoordinates[1]),i.setAttribute(`x2`,e.rect[2]-e.lineCoordinates[2]),i.setAttribute(`y2`,e.rect[3]-e.lineCoordinates[3]),i.setAttribute(`stroke-width`,e.borderStyle.width||1),i.setAttribute(`stroke`,`transparent`),i.setAttribute(`fill`,`transparent`),r.append(i),this.container.append(r),!e.popupRef&&this.hasPopupData&&(this.hasOwnCommentButton=!0,this._createPopup()),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add(`highlightArea`)}},Ri=class extends Ci{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add(`squareAnnotation`);let{data:e,width:t,height:n}=this,r=this.svgFactory.create(t,n,!0),i=e.borderStyle.width,a=this.#e=this.svgFactory.createElement(`svg:rect`);return a.setAttribute(`x`,i/2),a.setAttribute(`y`,i/2),a.setAttribute(`width`,t-i),a.setAttribute(`height`,n-i),a.setAttribute(`st
|
|||
|
|
`)}#s(){let[e,t]=this.parentDimensions,n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{let{currentLayer:e,div:t}=this,r=t.style.display,i=t.classList.contains(`hidden`);t.classList.remove(`hidden`),t.style.display=`hidden`,e.div.append(this.div),n=t.getBoundingClientRect(),t.remove(),t.style.display=r,t.classList.toggle(`hidden`,i)}this.rotation%180==this.parentRotation%180?(this.width=n.width/e,this.height=n.height/t):(this.width=n.height/e,this.height=n.width/t),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=this.#e,t=this.#e=this.#o().trimEnd();if(e===t)return;let n=e=>{if(this.#e=e,!e){this.remove();return}this.#l(),this._uiManager.rebuild(this),this.#s()};this.addCommands({cmd:()=>{n(t)},undo:()=>{n(e)},mustExec:!1}),this.#s()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key===`Enter`&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(t){e._keyboardManager.exec(this,t)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle(`freetextEditing`,this.isEmpty())}disableEditing(){this.editorDiv.setAttribute(`role`,`comment`),this.editorDiv.removeAttribute(`aria-multiline`)}enableEditing(){this.editorDiv.setAttribute(`role`,`textbox`),this.editorDiv.setAttribute(`aria-multiline`,!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,t;(this._isCopy||this.annotationElementId)&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement(`div`),this.editorDiv.className=`internal`,this.editorDiv.setAttribute(`id`,this.#t),this.editorDiv.setAttribute(`data-l10n-id`,`pdfjs-free-text2`),this.editorDiv.setAttribute(`data-l10n-attrs`,`default-content`),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#r}px * var(--total-scale-factor))`,n.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement(`div`),this.overlayDiv.classList.add(`overlay`,`enabled`),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){let[n,r]=this.parentDimensions;if(this.annotationElementId){let{position:i}=this._initialData,[a,o]=this.getInitialTranslation();[a,o]=this.pageTranslationToScreen(a,o);let[s,c]=this.pageDimensions,[l,u]=this.pageTranslation,d,f;switch(this.rotation){case 0:d=e+(i[0]-l)/s,f=t+this.height-(i[1]-u)/c;break;case 90:d=e+(i[0]-l)/s,f=t-(i[1]-u)/c,[a,o]=[o,-a];break;case 180:d=e-this.width+(i[0]-l)/s,f=t-(i[1]-u)/c,[a,o]=[-a,-o];break;case 270:d=e+(i[0]-l-this.height*c)/s,f=t+(i[1]-u-this.width*s)/c,[a,o]=[-o,a];break}this.setAt(d*n,f*r,a,o)}else this._moveAfterPaste(e,t);this.#l(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#c(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(Zi,``)}editorDivPaste(t){let n=t.clipboardData||window.clipboardData,{types:r}=n;if(r.length===1&&r[0]===`text/plain`)return;t.preventDefault();let i=e.#d(n.getData(`text`)||``).replaceAll(Zi,`
|
|||
|
|
`);if(!i)return;let a=window.getSelection();if(!a.rangeCount)return;this.editorDiv.normalize(),a.deleteFromDocument();let o=a.getRangeAt(0);if(!i.includes(`
|
|||
|
|
`)){o.insertNode(document.createTextNode(i)),this.editorDiv.normalize(),a.collapseToStart();return}let{startContainer:s,startOffset:c}=o,l=[],u=[];if(s.nodeType===Node.TEXT_NODE){let t=s.parentElement;if(u.push(s.nodeValue.slice(c).replaceAll(Zi,``)),t!==this.editorDiv){let n=l;for(let r of this.editorDiv.childNodes){if(r===t){n=u;continue}n.push(e.#c(r))}}l.push(s.nodeValue.slice(0,c).replaceAll(Zi,``))}else if(s===this.editorDiv){let t=l,n=0;for(let r of this.editorDiv.childNodes)n++===c&&(t=u),t.push(e.#c(r))}this.#e=`${l.join(`
|
|||
|
|
`)}${i}${u.join(`
|
|||
|
|
`)}`,this.#l();let d=new Range,f=Math.sumPrecise(l.map(e=>e.length));for(let{firstChild:e}of this.editorDiv.childNodes)if(e.nodeType===Node.TEXT_NODE){let t=e.nodeValue.length;if(f<=t){d.setStart(e,f),d.setEnd(e,f);break}f-=t}a.removeAllRanges(),a.addRange(d)}#l(){if(this.editorDiv.replaceChildren(),this.#e)for(let e of this.#e.split(`
|
|||
|
|
`)){let t=document.createElement(`div`);t.append(e?document.createTextNode(e):document.createElement(`br`)),this.editorDiv.append(t)}}#u(){return this.#e.replaceAll(`\xA0`,` `)}static#d(e){return e.replaceAll(` `,`\xA0`)}get contentDiv(){return this.editorDiv}getPDFRect(){let t=e._internalPadding*this.parentScale;return this.getRect(t,t)}static async deserialize(t,n,r){let i=null;if(t instanceof Ii){let{data:{defaultAppearanceData:{fontSize:e,fontColor:n},rect:r,rotation:a,id:o,popupRef:s,richText:c,contentsObj:l,creationDate:u,modificationDate:d},textContent:f,textPosition:p,parent:{page:{pageNumber:m}}}=t;if(!f||f.length===0)return null;i=t={annotationType:I.FREETEXT,color:Array.from(n),fontSize:e,value:f.join(`
|
|||
|
|
`),position:p,pageIndex:m-1,rect:r.slice(0),rotation:a,annotationElementId:o,id:o,deleted:!1,popupRef:s,comment:l?.str||null,richText:c,creationDate:u,modificationDate:d}}let a=await super.deserialize(t,n,r);return a.#r=t.fontSize,a.color=K.makeHexColor(...t.color),a.#e=e.#d(t.value),a._initialData=i,t.comment&&a.setCommentData(t),a}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let t=J._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),n=Object.assign(super.serialize(e),{color:t,fontSize:this.#r,value:this.#u()});return this.addComment(n),e?(n.isCopy=!0,n):this.annotationElementId&&!this.#f(n)?null:(n.id=this.annotationElementId,n)}#f(e){let{value:t,fontSize:n,color:r,pageIndex:i}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==t||e.fontSize!==n||e.color.some((e,t)=>e!==r[t])||e.pageIndex!==i}renderAnnotationElement(e){let t=super.renderAnnotationElement(e);if(!t)return null;let{style:n}=t;n.fontSize=`calc(${this.#r}px * var(--total-scale-factor))`,n.color=this.color,t.replaceChildren();for(let e of this.#e.split(`
|
|||
|
|
`)){let n=document.createElement(`div`);n.append(e?document.createTextNode(e):document.createElement(`br`)),t.append(n)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:this.#e}}),t}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}},Y=class{static PRECISION=1e-4;toSVGPath(){U("Abstract method `toSVGPath` must be implemented.")}get box(){U("Abstract getter `box` must be implemented.")}serialize(e,t){U("Abstract method `serialize` must be implemented.")}static _rescale(e,t,n,r,i,a){a||=new Float32Array(e.length);for(let o=0,s=e.length;o<s;o+=2)a[o]=t+e[o]*r,a[o+1]=n+e[o+1]*i;return a}static _rescaleAndSwap(e,t,n,r,i,a){a||=new Float32Array(e.length);for(let o=0,s=e.length;o<s;o+=2)a[o]=t+e[o+1]*r,a[o+1]=n+e[o]*i;return a}static _translate(e,t,n,r){r||=new Float32Array(e.length);for(let i=0,a=e.length;i<a;i+=2)r[i]=t+e[i],r[i+1]=n+e[i+1];return r}static svgRound(e){return Math.round(e*1e4)}static _normalizePoint(e,t,n,r,i){switch(i){case 90:return[1-t/n,e/r];case 180:return[1-e/n,1-t/r];case 270:return[t/n,1-e/r];default:return[e/n,t/r]}}static createBezierPoints(e,t,n,r,i,a){return[(e+5*n)/6,(t+5*r)/6,(5*n+i)/6,(5*r+a)/6,(n+i)/2,(r+a)/2]}},$i=class e{#e;#t=[];#n;#r;#i=[];#a=new Float32Array(18);#o;#s;#c;#l;#u;#d;#f=[];static#p=8;static#m=2;static#h=e.#p+e.#m;constructor({x:t,y:n},r,i,a,o,s=0){this.#e=r,this.#d=a*i,this.#r=o,this.#a.set([NaN,NaN,NaN,NaN,t,n],6),this.#n=s,this.#l=e.#p*i,this.#c=e.#h*i,this.#u=i,this.#f.push(t,n)}isEmpty(){return isNaN(this.#a[8])}#g(){let e=this.#a.subarray(4,6),t=this.#a.subarray(16,18),[n,r,i,a]=this.#e;return[(this.#o+(e[0]-t[0])/2-n)/i,(this.#s+(e[1]-t[1])/2-r)/a,(this.#o+(t[0]-e[0])/2-n)/i,(this.#s+(t[1]-e[1])/2-r)/a]}add({x:e,y:t}){this.#o=e,this.#s=t;let[n,r,i,a]=this.#e,[o,s,c,l]=this.#a.subarray(8,12),u=e-c,d=t-l,f=Math.hypot(u,d);if(f<this.#c)return!1;let p=f-this.#l,m=p/f,h=m*u,g=m*d,_=o,v=s;o=c,s=l,c+=h,l+=g,this.#f?.push(e,t);let y=-g/p,b=h/p,x=y*this.#d,S=b*this.#d;return this.#a.set(this.#a.subarray(2,8),0),this.#a.set([c+x,l+S],4),this.#a.set(this.#a.subarray(14,18),12),this.#a.set([c-x,l-S],16),isNaN(this.#a[6])?(this.#i.length===0&&(this.#a.set([o+x,s+S],2),this.#i.push(NaN,NaN,NaN,NaN,(o+x-n)/i,(s+S-r)/a),this.#a.set([o-x,s-S],14),this.#t.push(NaN,NaN,NaN,NaN,(o-x-n)/i,(s-S-r)/a)),this.#a.set([_,v,o,s,c,l],6),!this.isEmpty()):(this.#a.set([_,v,o,s,c,l],6),Math.abs(Math.atan2(v-s,_-o)-Math.atan2(g,h))<Math.PI/2?([o,s,c,l]=this.#a.subarray(2,6),this.#i.push(NaN,NaN,NaN,NaN,((o+c)/2-n)/i,((s+l)/2-r)/a),[o,s,_,v]=this.#a.subarray(14,18),this.#t.push(NaN,NaN,NaN,NaN,((_+o)/2-n)/i,((v+s)/2-r)/a),!0):([_,v,o,s,c,l]=this.#a.subarray(0,6),this.#i.push(((_+5*o)/6-n)/i,((v+5*s)/6-r)/a,((5*o+c)/6-n)/i,((5*s+l)/6-r)/a,((o+c)/2-n)/i,((s+l)/2-r)/a),[c,l,o,s,_,v]=this.#a.subarray(12,18),this.#t.push(((_+5*o)/6-n)/i,((v+5*s)/6-r)/a,((5*o+c)/6-n)/i,((5*s+l)/6-r)/a,((o+c)/2-n)/i,((s+l)/2-r)/a),!0))}toSVGPath(){if(this.isEmpty())return``;let e=this.#i,t=this.#t;if(isNaN(this.#a[6])&&!this.isEmpty())return this.#_();let n=[];n.push(`M${e[4]} ${e[5]}`);for(let t=6;t<e.length;t+=6)isNaN(e[t])?n.push(`L${e[t+4]} ${e[t+5]}`):n.push(`C${e[t]} ${e[t+1]} ${e[t+2]} ${e[t+3]} ${e[t+4]} ${e[t+5]}`);this.#y(n);for(let e=t.length-6;e>=6;e-=6)isNaN(t[e])?n.push(`L${t[e+4]} ${t[e+5]}`):n.push(`C${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${t[e+5]}`);return this.#v(n),n.join(` `)}#_(){let[e,t,n,r]=this.#e,[i,a,o,s]=this.#g();return`M${(this.#a[2]-e)/n} ${(this.#a[3]-t)/r} L${(this.#a[4]-e)/n} ${(this.#a[5]-t)/r} L${i} ${a} L${o} ${s} L${(this.#a[16]-e)/n} ${(this.#a[17]-t)/r} L${(this.#a[14]-e)/n} ${(this.#a[15]-t)/r} Z`}#v(e){let t=this.#t;e.push(`L${t[4]} ${t[5]} Z`)}#y(e){let[t,n,r,i]=this.#e,a=this.#a.subarray(4,6),o=this.#a.subarray(16,18),[s,c,l,u]=this.#g();e.push(`L${(a[0]-t)/r} ${(a[1]-n)/i} L${s} ${c} L${l} ${u} L${(o[0]-t)/r} ${(o[1]-n)/i}`)}newFreeDrawOutline(e,t,n,r,i,a){return new ea(e,t,n,r,i,a)}getOutlines(){let e=this.#i,t=this.#t,n=this.#a,[r,i,a,o]=this.#e,s=new Float32Array((this
|
|||
|
|
`,"\\r":`\r`,"\\t":` `},f=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var n=!0,r=``;t<e.length;){var m=c(e,t);if(m===`\\`){var h=l(e,t,t+2);if(i(d,h))r+=d[h],t+=2;else if(h===`\\u`){t+=2;var g=l(e,t,t+4);if(!u(f,g))throw new a(`Bad Unicode escape at: `+t);r+=s(o(g,16)),t+=4}else throw new a(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){n=!1,t++;break}else{if(u(p,m))throw new a(`Bad control character in string literal at: `+t);r+=m,t++}}if(n)throw new a(`Unterminated string at: `+t);return{value:r,end:t}}},7750(e,t,n){var r=n(4117),i=TypeError;e.exports=function(e){if(r(e))throw new i(`Can't call method on `+e);return e}},9286(e,t,n){var r=n(4402),i=n(8469),a=r.Set,o=r.add;e.exports=function(e){var t=new a;return i(e,function(e){o(t,e)}),t}},3440(e,t,n){var r=n(7080),i=n(4402),a=n(9286),o=n(5170),s=n(3789),c=n(8469),l=n(507),u=i.has,d=i.remove;e.exports=function(e){var t=r(this),n=s(e),i=a(t);return o(i)<=n.size?c(i,function(e){n.includes(e)&&d(i,e)}):l(n.getIterator(),function(e){u(i,e)&&d(i,e)}),i}},4402(e,t,n){var r=n(9504),i=Set.prototype;e.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},8750(e,t,n){var r=n(7080),i=n(4402),a=n(5170),o=n(3789),s=n(8469),c=n(507),l=i.Set,u=i.add,d=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new l;return a(t)>n.size?c(n.getIterator(),function(e){d(t,e)&&u(i,e)}):s(t,function(e){n.includes(e)&&u(i,e)}),i}},4449(e,t,n){var r=n(7080),i=n(4402).has,a=n(5170),o=n(3789),s=n(8469),c=n(507),l=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<=n.size)return s(t,function(e){if(n.includes(e))return!1},!0)!==!1;var u=n.getIterator();return c(u,function(e){if(i(t,e))return l(u.iterator,`normal`,!1)})!==!1}},3838(e,t,n){var r=n(7080),i=n(5170),a=n(8469),o=n(3789);e.exports=function(e){var t=r(this),n=o(e);return i(t)>n.size?!1:a(t,function(e){if(!n.includes(e))return!1},!0)!==!1}},8527(e,t,n){var r=n(7080),i=n(4402).has,a=n(5170),o=n(3789),s=n(507),c=n(9539);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<n.size)return!1;var l=n.getIterator();return s(l,function(e){if(!i(t,e))return c(l.iterator,`normal`,!1)})!==!1}},8469(e,t,n){var r=n(9504),i=n(507),a=n(4402),o=a.Set,s=a.proto,c=r(s.forEach),l=r(s.keys),u=l(new o).next;e.exports=function(e,t,n){return n?i({iterator:l(e),next:u},t):c(e,t)}},4916(e,t,n){var r=n(7751),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},a=function(e){return{size:e,has:function(){return!0},keys:function(){throw Error(`e`)}}};e.exports=function(e,t){var n=r(`Set`);try{new n()[e](i(0));try{return new n()[e](i(-1)),!1}catch{if(!t)return!0;try{return new n()[e](a(-1/0)),!1}catch{return t(new n([1,2])[e](a(1/0)))}}}catch{return!1}}},9835(e){e.exports=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}}},5170(e,t,n){e.exports=n(6706)(n(4402).proto,`size`,`get`)||function(e){return e.size}},3650(e,t,n){var r=n(7080),i=n(4402),a=n(9286),o=n(3789),s=n(507),c=i.add,l=i.has,u=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=a(t);return s(n,function(e){l(t,e)?u(i,e):c(i,e)}),i}},4204(e,t,n){var r=n(7080),i=n(4402).add,a=n(9286),o=n(3789),s=n(507);e.exports=function(e){var t=r(this),n=o(e).getIterator(),c=a(t);return s(n,function(e){i(c,e)}),c}},6119(e,t,n){var r=n(5745),i=n(3392),a=r(`keys`);e.exports=function(e){return a[e]||(a[e]=i(e))}},7629(e,t,n){var r=n(6395),i=n(4576),a=n(9433),o=`__core-js_shared__`,s=e.exports=i[o]||a(o,{});(s.versions||=[]).push({version:`3.49.0`,mode:r?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`})},5745(e,t,n){var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},533(e,t,n){var r=n(9504),i
|
|||
|
|
\v\f\r \xA0 \u2028\u2029`},6573(e,t,n){var r=n(3724),i=n(2106),a=n(3238),o=ArrayBuffer.prototype;r&&!(`detached`in o)&&i(o,`detached`,{configurable:!0,get:function(){return a(this)}})},7936(e,t,n){var r=n(6518),i=n(5636);i&&r({target:`ArrayBuffer`,proto:!0},{transferToFixedLength:function(){return i(this,arguments.length?arguments[0]:void 0,!1)}})},8100(e,t,n){var r=n(6518),i=n(5636);i&&r({target:`ArrayBuffer`,proto:!0},{transfer:function(){return i(this,arguments.length?arguments[0]:void 0,!0)}})},4423(e,t,n){var r=n(6518),i=n(9617).includes,a=n(9039),o=n(6469),s=a(function(){return![,].includes()}),c=a(function(){return[,1].includes(void 0,1)});r({target:`Array`,proto:!0,forced:s||c},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(`includes`)},4114(e,t,n){var r=n(6518),i=n(8981),a=n(6198),o=n(4527),s=n(6837);r({target:`Array`,proto:!0,arity:1,forced:n(9039)(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=a(t),r=arguments.length;s(n+r);for(var c=0;c<r;c++)t[n]=arguments[c],n++;return o(t,n),n}})},8111(e,t,n){var r=n(6518),i=n(4576),a=n(679),o=n(8551),s=n(4901),c=n(2787),l=n(2106),u=n(4659),d=n(9039),f=n(9297),p=n(8227),m=n(7657).IteratorPrototype,h=n(3724),g=n(6395),_=`constructor`,v=`Iterator`,y=p(`toStringTag`),b=TypeError,x=i[v],S=g||!s(x)||x.prototype!==m||!d(function(){x({})}),C=function(){if(a(this,m),c(this)===m)throw new b(`Abstract class Iterator not directly constructable`)},w=function(e,t){h?l(m,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===m)throw new b(`You can't redefine this property`);f(this,e)?this[e]=t:u(this,e,t)}}):m[e]=t};f(m,y)||w(y,v),(S||!f(m,_)||m[_]===Object)&&w(_,C),C.prototype=m,r({global:!0,constructor:!0,forced:S},{Iterator:C})},1148(e,t,n){var r=n(6518),i=n(9565),a=n(2652),o=n(9306),s=n(8551),c=n(1767),l=n(9539),u=n(4549)(`every`,TypeError);r({target:`Iterator`,proto:!0,real:!0,forced:u},{every:function(e){s(this);try{o(e)}catch(e){l(this,`throw`,e)}if(u)return i(u,this,e);var t=c(this),n=0;return!a(t,function(t,r){if(!e(t,n++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},2489(e,t,n){var r=n(6518),i=n(9565),a=n(9306),o=n(8551),s=n(1767),c=n(9462),l=n(6319),u=n(6395),d=n(9539),f=n(684),p=n(4549),m=!u&&!f(`filter`,function(){}),h=!u&&!m&&p(`filter`,TypeError),g=u||m||h,_=c(function(){for(var e=this.iterator,t=this.predicate,n=this.next,r,a,s;;){if(r=o(i(n,e)),a=this.done=!!r.done,a)return;if(s=r.value,l(e,t,[s,this.counter++],!0))return s}});r({target:`Iterator`,proto:!0,real:!0,forced:g},{filter:function(e){o(this);try{a(e)}catch(e){d(this,`throw`,e)}return h?i(h,this,e):new _(s(this),{predicate:e})}})},7588(e,t,n){var r=n(6518),i=n(9565),a=n(2652),o=n(9306),s=n(8551),c=n(1767),l=n(9539),u=n(4549)(`forEach`,TypeError);r({target:`Iterator`,proto:!0,real:!0,forced:u},{forEach:function(e){s(this);try{o(e)}catch(e){l(this,`throw`,e)}if(u)return i(u,this,e);var t=c(this),n=0;a(t,function(t){e(t,n++)},{IS_RECORD:!0})}})},1701(e,t,n){var r=n(6518),i=n(9565),a=n(9306),o=n(8551),s=n(1767),c=n(9462),l=n(6319),u=n(9539),d=n(684),f=n(4549),p=n(6395),m=!p&&!d(`map`,function(){}),h=!p&&!m&&f(`map`,TypeError),g=p||m||h,_=c(function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});r({target:`Iterator`,proto:!0,real:!0,forced:g},{map:function(e){o(this);try{a(e)}catch(e){u(this,`throw`,e)}return h?i(h,this,e):new _(s(this),{mapper:e})}})},3579(e,t,n){var r=n(6518),i=n(9565),a=n(2652),o=n(9306),s=n(8551),c=n(1767),l=n(9539),u=n(4549)(`some`,TypeError);r({target:`Iterator`,proto:!0,real:!0,forced:u},{some:function(e){s(this);try{o(e)}catch(e){l(this,`throw`,e)}if(u)return i(u,this,e);var t=c(this),n=0;return a(t,function(t,r){if(e(t,n++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},9112(e,t,n){var r=n(6518),i=n(3724),a=n(4576),o=n(7751),s
|
|||
|
|
`),t=e?o.length-2:o.length;h=!0;let n=t;b+m===s[u]?.[1]&&(n-=s[u][0],++u);for(let e=1;e<=n;e++)l.push(b-1-f+e,f-e);return f-=n,p+=n,e?(b+=t-1,l.push(b-f+1,1+f),f+=1,p+=1,m+=1,o.slice(0,t)):o}if(c){if(a)return p+=1,m+=1,c.slice(0,-1);let e=c.length-2;return l.push(b-f+e,1+f),f+=1,p+=1,m+=1,c.slice(0,-2)}if(g)return p+=1,m+=1,g.slice(0,-1);if(_){let e=_.length-1;return l.push(b-f+e,f),p+=1,m+=1,_.slice(0,-1)}if(v)return l.push(b-f+1,f-1),--f,p+=1,m+=1,` `;if(b+m===n[d]?.[1]){let e=n[d][0]-1;++d;for(let t=1;t<=e;t++)l.push(b-(f-t),f-t);f-=e,p+=e}return y}),l.push(c.length,f);let g=new Uint32Array(l.length>>1),_=new Int32Array(l.length>>1);for(let e=0,t=l.length;e<t;e+=2)g[e>>1]=l[e],_[e>>1]=l[e+1];return[c,[g,_],h]}function Ws(e,t,n){if(!e)return[t,n];let[r,i]=e,a=t,o=t+n-1,s=ms(r,e=>e>=a);r[s]>a&&--s;let c=ms(r,e=>e>=o,s);r[c]>o&&--c;let l=a+i[s];return[l,o+i[c]+1-l]}var Gs=class{#e=null;#t=!0;#n=0;#r=0;#i=null;#a=null;constructor({linkService:e,eventBus:t,delay:n=250,updateMatchesCountOnProgress:r=!0}){this._linkService=e,this._eventBus=t,this.#t=r,this.#n=n,this.onIsPageVisible=null,this.#s(),t.on(`find`,this.#o.bind(this),Os),t.on(`findbarclose`,this.#S.bind(this),Os),t.on(`pagesedited`,this.#x.bind(this),Os)}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this.#e}setDocument(e){this._pdfDocument&&this.#s(),e&&(this._pdfDocument=e,this._firstPageCapability.resolve())}#o(e){if(!e)return;let t=this._pdfDocument,{type:n}=e;(this.#e===null||this.#l(e))&&(this._dirtyMatch=!0),this.#e=e,n!==`highlightallchange`&&this.#T(ks.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||t&&this._pdfDocument!==t)return;this.#p();let e=!this._highlightMatches,r=!!this._findTimeout;this._findTimeout&&=(clearTimeout(this._findTimeout),null),n?this._dirtyMatch?this.#g():n===`again`?(this.#g(),e&&this.#e.highlightAll&&this.#h()):n===`highlightallchange`?(r?this.#g():this._highlightMatches=!0,this.#h()):this.#g():this._findTimeout=setTimeout(()=>{this.#g(),this._findTimeout=null},this.#n)})}scrollMatchIntoView({element:e=null,pageIndex:t=-1,matchIndex:n=-1}){!this._scrollMatches||!e||n===-1||n!==this._selected.matchIdx||t===-1||t!==this._selected.pageIdx||(this._scrollMatches=!1,e.scrollIntoView({block:`start`,inline:`center`}))}#s(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this.#r=0,this.#e=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this.#i=null,this._firstPageCapability=Promise.withResolvers()}get#c(){let{query:e}=this.#e;return typeof e==`string`?(e!==this._rawQuery&&(this._rawQuery=e,[this._normalizedQuery]=Us(e)),this._normalizedQuery):(e||[]).filter(e=>!!e).map(e=>Us(e)[0])}#l(e){let t=e.query,n=this.#e.query,r=typeof t;if(r!==typeof n)return!0;if(r===`string`){if(t!==n)return!0}else if(JSON.stringify(t)!==JSON.stringify(n))return!0;switch(e.type){case`again`:let e=this._selected.pageIdx+1,t=this._linkService;return e>=1&&e<=t.pagesCount&&e!==t.page&&!(this.onIsPageVisible?.(e)??!0);case`highlightallchange`:return!1}return!0}#u(e,t,n){let r=e.slice(0,t).match(Fs);if(r){let n=e.charCodeAt(t),i=r[1].charCodeAt(0);if(Jo(n)===Jo(i))return!1}if(r=e.slice(t+n).match(Is),r){let i=e.charCodeAt(t+n-1),a=r[1].charCodeAt(0);if(Jo(i)===Jo(a))return!1}return!0}#d(e,t){let{matchDiacritics:n}=this.#e,r=!1,i=(t,n)=>t===e?n:e.startsWith(t)?`${n}[ ]*`:e.endsWith(t)?`[ ]*${n}`:`[ ]*${n}[ ]*`;return e=e.replaceAll(Ps,(e,a,o,s,c,l)=>a?i(a,RegExp.escape(a)):o?i(o,RegExp.escape(o)):s?`[ ]+`:n?c||l:c?js.has(c.charCodeAt(0))?c:``:t?(r=!0,`${l}\\p{M}*`):l),e.endsWith(`[ ]*`)&&(e=e.
|
|||
|
|
`);[this._pageContents[r],this._pageDiffs[r],this._hasDiacritics[r]]=Us(i.join(``))}catch(e){if(n!==this._pdfDocument){a();return}console.error(`Unable to get text content for page ${r+1}`,e),[this._pageContents[r],this._pageDiffs[r],this._hasDiacritics[r]]=[``,null,!1]}a()})}}#m(e){this._scrollMatches&&this._selected.pageIdx===e&&(this._linkService.page=e+1),this._eventBus.dispatch(`updatetextlayermatches`,{source:this,pageIndex:e})}#h(){this._eventBus.dispatch(`updatetextlayermatches`,{source:this,pageIndex:-1})}#g(){let e=this.#e.findPrevious,t=this._linkService.page-1,n=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=t,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this.#r=0,this._matchesCountTotal=0,this.#h();for(let e=0;e<n;e++)this._pendingFindMatches.has(e)||(this._pendingFindMatches.add(e),this._extractTextPromises[e].then(()=>{this._pendingFindMatches.delete(e),this.#f(e)}))}if(this.#c.length===0){this.#T(ks.FOUND);return}if(this._resumePageIdx)return;let r=this._offset;if(this._pagesToSearch=n,r.matchIdx!==null){let t=this._pageMatches[r.pageIdx].length;if(!e&&r.matchIdx+1<t||e&&r.matchIdx>0){r.matchIdx=e?r.matchIdx-1:r.matchIdx+1,this.#b(!0);return}this.#y(e)}this.#v()}#_(e){let t=this._offset,n=e.length,r=this.#e.findPrevious;return n?(t.matchIdx=r?n-1:0,this.#b(!0),!0):(this.#y(r),t.wrapped&&(t.matchIdx=null,this._pagesToSearch<0)?(this.#b(!1),!0):!1)}#v(){this._resumePageIdx!==null&&console.error(`There can only be one pending page.`);let e=null;do{let t=this._offset.pageIdx;if(e=this._pageMatches[t],!e){this._resumePageIdx=t;break}}while(!this.#_(e))}#y(e){let t=this._offset,n=this._linkService.pagesCount;t.pageIdx=e?t.pageIdx-1:t.pageIdx+1,t.matchIdx=null,this._pagesToSearch--,(t.pageIdx>=n||t.pageIdx<0)&&(t.pageIdx=e?n-1:0,t.wrapped=!0)}#b(e=!1){let t=ks.NOT_FOUND,n=this._offset.wrapped;if(this._offset.wrapped=!1,e){let e=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,t=n?ks.WRAPPED:ks.FOUND,e!==-1&&e!==this._selected.pageIdx&&this.#m(e)}this.#T(t,this.#e.findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,this.#m(this._selected.pageIdx))}#x({pagesMapper:e,type:t,pageNumbers:n}){if(this._extractTextPromises.length===0)return;if(t===`copy`){let e=new Map,t=new Map,r=new Map,i=new Map;for(let a of n)e.set(a,this._extractTextPromises[a-1]),t.set(a,this._pageContents[a-1]),r.set(a,this._pageDiffs[a-1]),i.set(a,this._hasDiacritics[a-1]);this.#i={promises:e,contents:t,diffs:r,diacritics:i};return}if(t===`cancelCopy`){this.#i=null;return}if(t===`delete`&&(this.#a={promises:this._extractTextPromises,contents:this._pageContents,diffs:this._pageDiffs,diacritics:this._hasDiacritics}),t===`cancelDelete`){this._extractTextPromises=this.#a.promises,this._pageContents=this.#a.contents,this._pageDiffs=this.#a.diffs,this._hasDiacritics=this.#a.diacritics;return}if(t===`cleanSavedData`){this.#a=null;return}this._findTimeout&&=(clearTimeout(this._findTimeout),null),this._resumePageIdx=null,this._dirtyMatch=!0;let r=this._extractTextPromises,i=this._pageContents,a=this._pageDiffs,o=this._hasDiacritics,s=this._extractTextPromises=[],c=this._pageContents=[],l=this._pageDiffs=[],u=this._hasDiacritics=[];for(let t=1,n=e.pagesNumber;t<=n;t++){let n=e.getPrevPageNumber(t);if(n<0){let e=-n;s.push(this.#i?.promises.get(e)||Promise.resolve()),c.push(this.#i?.contents.get(e)??``),l.push(this.#i?.diffs.get(e)??null),u.push(this.#i?.diacritics.get(e)??!1);continue}s.push(r[n-1]||Promise.resolve()),c.push(i[n-1]??``),l.push(a[n-1]??null),u.push(o[n-1]??!1)}this.#e&&this.#g()}#S(e){let t=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||t&&this._pdfDocument!==t||(this._findTimeout&&=(clearTimeout(this._findTimeout),null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this.#T(ks.FOUND),this._highlight
|
|||
|
|
`),n=Uc.exec(e)[1].length;return new el(t,n)}}},el=class{constructor(e,t){this.value=e,this.length=t}},tl=/<|&#?\w+;/,nl={"http://www.w3.org/1999/xhtml":[`em`,`strong`,`small`,`s`,`cite`,`q`,`dfn`,`abbr`,`data`,`time`,`code`,`var`,`samp`,`kbd`,`sub`,`sup`,`i`,`b`,`u`,`mark`,`bdi`,`bdo`,`span`,`br`,`wbr`]},rl={"http://www.w3.org/1999/xhtml":{global:[`title`,`aria-description`,`aria-label`,`aria-valuetext`],a:[`download`],area:[`download`,`alt`],input:[`alt`,`placeholder`],menuitem:[`label`],menu:[`label`],optgroup:[`label`],option:[`label`],track:[`label`],img:[`alt`],textarea:[`placeholder`],th:[`abbr`]},"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul":{global:[`accesskey`,`aria-label`,`aria-valuetext`,`label`,`title`,`tooltiptext`],description:[`value`],key:[`key`,`keycode`],label:[`value`],textbox:[`placeholder`,`value`]}};function il(e,t){let{value:n}=t;if(typeof n==`string`)if(e.localName===`title`&&e.namespaceURI===`http://www.w3.org/1999/xhtml`)e.textContent=n;else if(!tl.test(n))e.textContent=n;else{let t=e.ownerDocument.createElementNS(`http://www.w3.org/1999/xhtml`,`template`);t.innerHTML=n,al(t.content,e)}sl(t,e)}function al(e,t){for(let n of e.childNodes)if(n.nodeType!==n.TEXT_NODE){if(n.hasAttribute(`data-l10n-name`)){let r=cl(t,n);e.replaceChild(r,n);continue}if(dl(n)){let t=ll(n);e.replaceChild(t,n);continue}console.warn(`An element of forbidden type "${n.localName}" was found in the translation. Only safe text-level elements and elements with data-l10n-name are allowed.`),e.replaceChild(ul(n),n)}t.textContent=``,t.appendChild(e)}function ol(e,t){if(!e)return!1;for(let n of e)if(n.name===t)return!0;return!1}function sl(e,t){let n=t.hasAttribute(`data-l10n-attrs`)?t.getAttribute(`data-l10n-attrs`).split(`,`).map(e=>e.trim()):null;for(let r of Array.from(t.attributes))fl(r.name,t,n)&&!ol(e.attributes,r.name)&&t.removeAttribute(r.name);if(e.attributes)for(let r of Array.from(e.attributes))fl(r.name,t,n)&&t.getAttribute(r.name)!==r.value&&t.setAttribute(r.name,r.value)}function cl(e,t){let n=t.getAttribute(`data-l10n-name`),r=e.querySelector(`[data-l10n-name="${n}"]`);return r?r.localName===t.localName?(e.removeChild(r),pl(t,r.cloneNode(!1))):(console.warn(`An element named "${n}" was found in the translation but its type ${t.localName} didn't match the element found in the source (${r.localName}).`),ul(t)):(console.warn(`An element named "${n}" wasn't found in the source.`),ul(t))}function ll(e){return pl(e,e.ownerDocument.createElement(e.localName))}function ul(e){return e.ownerDocument.createTextNode(e.textContent)}function dl(e){let t=nl[e.namespaceURI];return t&&t.includes(e.localName)}function fl(e,t,n=null){if(n&&n.includes(e))return!0;let r=rl[t.namespaceURI];if(!r)return!1;let i=e.toLowerCase(),a=t.localName;if(r.global.includes(i))return!0;if(!r[a])return!1;if(r[a].includes(i))return!0;if(t.namespaceURI===`http://www.w3.org/1999/xhtml`&&a===`input`&&i===`value`){let e=t.type.toLowerCase();if(e===`submit`||e===`button`||e===`reset`)return!0}return!1}function pl(e,t){return t.textContent=e.textContent,sl(e,t),t}var ml=class extends Array{static from(e){return e instanceof this?e:new this(e)}},hl=class extends ml{constructor(e){if(super(),Symbol.asyncIterator in Object(e))this.iterator=e[Symbol.asyncIterator]();else if(Symbol.iterator in Object(e))this.iterator=e[Symbol.iterator]();else throw TypeError(`Argument must implement the iteration protocol.`)}[Symbol.asyncIterator](){let e=this,t=0;return{async next(){return e.length<=t&&e.push(e.iterator.next()),e[t++]}}}async touchNext(e=1){let t=0;for(;t++<e;){let e=this[this.length-1];if(e&&(await e).done)break;this.push(this.iterator.next())}return this[this.length-1]}},gl=class{constructor(e=[],t){this.resourceIds=e,this.generateBundles=t,this.onChange(!0)}addResourceIds(e,t=!1){return this.resourceIds.push(...e),this.onChange(t),this.resourceIds.length}removeResourceIds(e){return this.resourceIds=this.resourceIds.filter(t=>!e.includes(t)),this.onChange(),this.resourceIds.length}async formatWithFallback(e,t){let n=[],r=!1;for await(let i o
|
|||
|
|
keys: ${JSON.stringify(e)}.
|
|||
|
|
resourceIds: ${JSON.stringify(this.resourceIds)}.`),n}formatMessages(e){return this.formatWithFallback(e,vl)}formatValues(e){return this.formatWithFallback(e,_l)}async formatValue(e,t){let[n]=await this.formatValues([{id:e,args:t}]);return n}handleEvent(){this.onChange()}onChange(e=!1){this.bundles=hl.from(this.generateBundles(this.resourceIds)),e&&this.bundles.touchNext(2)}};function _l(e,t,n,r){return n.value?e.formatPattern(n.value,r,t):null}function vl(e,t,n,r){let i={value:null,attributes:null};n.value&&(i.value=e.formatPattern(n.value,r,t));let a=Object.keys(n.attributes);if(a.length>0){i.attributes=Array(a.length);for(let[o,s]of a.entries()){let a=e.formatPattern(n.attributes[s],r,t);i.attributes[o]={name:s,value:a}}}return i}function yl(e,t,n,r){let i=[],a=new Set;return n.forEach(({id:n,args:o},s)=>{if(r[s]!==void 0)return;let c=t.getMessage(n);if(c){if(i.length=0,r[s]=e(t,i,c,o),i.length>0&&typeof console<`u`){let e=t.locales[0],r=i.join(`, `);console.warn(`[fluent][resolver] errors in ${e}/${n}: ${r}.`)}}else a.add(n)}),a}var bl=`data-l10n-id`,xl=`data-l10n-args`,Sl=`[${bl}]`,Cl=class extends gl{constructor(e,t){super(e,t),this.roots=new Set,this.pendingrAF=null,this.pendingElements=new Set,this.windowElement=null,this.mutationObserver=null,this.observerConfig={attributes:!0,characterData:!1,childList:!0,subtree:!0,attributeFilter:[bl,xl]}}onChange(e=!1){super.onChange(e),this.roots&&this.translateRoots()}setAttributes(e,t,n){return e.setAttribute(bl,t),n?e.setAttribute(xl,JSON.stringify(n)):e.removeAttribute(xl),e}getAttributes(e){return{id:e.getAttribute(bl),args:JSON.parse(e.getAttribute(xl)||null)}}connectRoot(e){for(let t of this.roots)if(t===e||t.contains(e)||e.contains(t))throw Error(`Cannot add a root that overlaps with existing root.`);if(this.windowElement){if(this.windowElement!==e.ownerDocument.defaultView)throw Error(`Cannot connect a root:
|
|||
|
|
DOMLocalization already has a root from a different window.`)}else this.windowElement=e.ownerDocument.defaultView,this.mutationObserver=new this.windowElement.MutationObserver(e=>this.translateMutations(e));this.roots.add(e),this.mutationObserver.observe(e,this.observerConfig)}disconnectRoot(e){return this.roots.delete(e),this.pauseObserving(),this.roots.size===0?(this.mutationObserver=null,this.windowElement&&this.pendingrAF&&this.windowElement.cancelAnimationFrame(this.pendingrAF),this.windowElement=null,this.pendingrAF=null,this.pendingElements.clear(),!0):(this.resumeObserving(),!1)}translateRoots(){let e=Array.from(this.roots);return Promise.all(e.map(e=>this.translateFragment(e)))}pauseObserving(){this.mutationObserver&&(this.translateMutations(this.mutationObserver.takeRecords()),this.mutationObserver.disconnect())}resumeObserving(){if(this.mutationObserver)for(let e of this.roots)this.mutationObserver.observe(e,this.observerConfig)}translateMutations(e){for(let t of e)switch(t.type){case`attributes`:t.target.hasAttribute(`data-l10n-id`)&&this.pendingElements.add(t.target);break;case`childList`:for(let e of t.addedNodes)if(e.nodeType===e.ELEMENT_NODE)if(e.childElementCount)for(let t of this.getTranslatables(e))this.pendingElements.add(t);else e.hasAttribute(bl)&&this.pendingElements.add(e);break}this.pendingElements.size>0&&this.pendingrAF===null&&(this.pendingrAF=this.windowElement.requestAnimationFrame(()=>{this.translateElements(Array.from(this.pendingElements)),this.pendingElements.clear(),this.pendingrAF=null}))}translateFragment(e){return this.translateElements(this.getTranslatables(e))}async translateElements(e){if(!e.length)return;let t=e.map(this.getKeysForElement),n=await this.formatMessages(t);return this.applyTranslations(e,n)}applyTranslations(e,t){this.pauseObserving();for(let n=0;n<e.length;n++)t[n]!==void 0&&il(e[n],t[n]);this.resumeObserving()}getTranslatables(e){let t=Array.from(e.querySelectorAll(Sl));return typeof e.hasAttribute==`function`&&e.hasAttribute(bl)&&t.push(e),t}getKeysForElement(e){return{id:e.getAttribute(bl),args:JSON.parse(e.getAttribute(xl)||null)}}},wl=class e{#e;#t;#n;#r;constructor({lang:t,isRTL:n},r=null){this.#n=e.#i(t),this.#r=r,this.#e=n??e.#a(this.#n)?`rtl`:`ltr`}_setL10n(e){this.#r=e}getLanguage(){return this.#n}getDirection(){return this.#e}async get(e,t=null,n){return Array.isArray(e)?(e=e.map(e=>({id:e})),(await this.#r.formatMessages(e)).map(e=>e.value)):(await this.#r.formatMessages([{id:e,args:t}]))[0]?.value||n}async translate(e){(this.#t||=new Set).add(e);try{this.#r.connectRoot(e),await this.#r.translateRoots()}catch{}}async translateOnce(e){try{await this.#r.translateElements([e])}catch(e){console.error(`translateOnce:`,e)}}async destroy(){if(this.#t){for(let e of this.#t)this.#r.disconnectRoot(e);this.#t.clear(),this.#t=null}this.#r.pauseObserving()}pause(){this.#r.pauseObserving()}resume(){this.#r.resumeObserving()}static#i(e){return e=e?.toLowerCase()||`en-us`,{en:`en-us`,es:`es-es`,fy:`fy-nl`,ga:`ga-ie`,gu:`gu-in`,hi:`hi-in`,hy:`hy-am`,nb:`nb-no`,ne:`ne-np`,nn:`nn-no`,pa:`pa-in`,pt:`pt-pt`,sv:`sv-se`,zh:`zh-cn`}[e]||e}static#a(e){let t=e.split(`-`,1)[0];return[`ar`,`he`,`fa`,`ps`,`ur`].includes(t)}};function Tl(){let{isAndroid:e,isLinux:t,isMac:n,isWindows:r}=Ga.platform;return t?`linux`:r?`windows`:n?`macos`:e?`android`:`other`}function El(e,t){let n=new $c(t),r=new Oc(e,{functions:{PLATFORM:Tl}}),i=r.addResource(n);return i.length&&console.error(`L10n errors`,i),r}var Dl=class e extends wl{constructor(t){super({lang:t});let n=t?e.#e.bind(e,`en-us`,this.getLanguage()):e.#r.bind(e,this.getLanguage());this._setL10n(new Cl([],n))}static async*#e(e,t){let{baseURL:n,paths:r}=await this.#n(),i=[t];if(e!==t){let n=t.split(`-`,1)[0];n!==t&&i.push(n),i.push(e)}let a=i.map(e=>[e,this.#t(e,n,r)]);for(let[e,t]of a){let n=await t;n?yield n:e===`en-us`&&(yield this.#i(e))}}static async#t(e,t,n){let r=n[e];return r?El(e,await Ka(new URL(r,t),`text`)):null}static async#n(){try{let{href:e}=document.querySelector(`link[type="application/l10n"]`),t=await Ka(e,`js
|
|||
|
|
.title = Previous Page
|
|||
|
|
pdfjs-previous-button-label = Previous
|
|||
|
|
pdfjs-next-button =
|
|||
|
|
.title = Next Page
|
|||
|
|
pdfjs-next-button-label = Next
|
|||
|
|
pdfjs-page-input =
|
|||
|
|
.title = Page
|
|||
|
|
pdfjs-of-pages = of { $pagesCount }
|
|||
|
|
pdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })
|
|||
|
|
pdfjs-zoom-out-button =
|
|||
|
|
.title = Zoom Out
|
|||
|
|
pdfjs-zoom-out-button-label = Zoom Out
|
|||
|
|
pdfjs-zoom-in-button =
|
|||
|
|
.title = Zoom In
|
|||
|
|
pdfjs-zoom-in-button-label = Zoom In
|
|||
|
|
pdfjs-zoom-select =
|
|||
|
|
.title = Zoom
|
|||
|
|
pdfjs-presentation-mode-button =
|
|||
|
|
.title = Switch to Presentation Mode
|
|||
|
|
pdfjs-presentation-mode-button-label = Presentation Mode
|
|||
|
|
pdfjs-open-file-button =
|
|||
|
|
.title = Open File
|
|||
|
|
pdfjs-open-file-button-label = Open
|
|||
|
|
pdfjs-print-button =
|
|||
|
|
.title = Print
|
|||
|
|
pdfjs-print-button-label = Print
|
|||
|
|
pdfjs-save-button =
|
|||
|
|
.title = Save
|
|||
|
|
pdfjs-save-button-label = Save
|
|||
|
|
pdfjs-download-button =
|
|||
|
|
.title = Download
|
|||
|
|
pdfjs-download-button-label = Download
|
|||
|
|
pdfjs-bookmark-button =
|
|||
|
|
.title = Current Page (View URL from Current Page)
|
|||
|
|
pdfjs-bookmark-button-label = Current Page
|
|||
|
|
pdfjs-tools-button =
|
|||
|
|
.title = Tools
|
|||
|
|
pdfjs-tools-button-label = Tools
|
|||
|
|
pdfjs-first-page-button =
|
|||
|
|
.title = Go to First Page
|
|||
|
|
pdfjs-first-page-button-label = Go to First Page
|
|||
|
|
pdfjs-last-page-button =
|
|||
|
|
.title = Go to Last Page
|
|||
|
|
pdfjs-last-page-button-label = Go to Last Page
|
|||
|
|
pdfjs-page-rotate-cw-button =
|
|||
|
|
.title = Rotate Clockwise
|
|||
|
|
pdfjs-page-rotate-cw-button-label = Rotate Clockwise
|
|||
|
|
pdfjs-page-rotate-ccw-button =
|
|||
|
|
.title = Rotate Counterclockwise
|
|||
|
|
pdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise
|
|||
|
|
pdfjs-cursor-text-select-tool-button =
|
|||
|
|
.title = Enable Text Selection Tool
|
|||
|
|
pdfjs-cursor-text-select-tool-button-label = Text Selection Tool
|
|||
|
|
pdfjs-cursor-hand-tool-button =
|
|||
|
|
.title = Enable Hand Tool
|
|||
|
|
pdfjs-cursor-hand-tool-button-label = Hand Tool
|
|||
|
|
pdfjs-scroll-page-button =
|
|||
|
|
.title = Use Page Scrolling
|
|||
|
|
pdfjs-scroll-page-button-label = Page Scrolling
|
|||
|
|
pdfjs-scroll-vertical-button =
|
|||
|
|
.title = Use Vertical Scrolling
|
|||
|
|
pdfjs-scroll-vertical-button-label = Vertical Scrolling
|
|||
|
|
pdfjs-scroll-horizontal-button =
|
|||
|
|
.title = Use Horizontal Scrolling
|
|||
|
|
pdfjs-scroll-horizontal-button-label = Horizontal Scrolling
|
|||
|
|
pdfjs-scroll-wrapped-button =
|
|||
|
|
.title = Use Wrapped Scrolling
|
|||
|
|
pdfjs-scroll-wrapped-button-label = Wrapped Scrolling
|
|||
|
|
pdfjs-spread-none-button =
|
|||
|
|
.title = Do not join page spreads
|
|||
|
|
pdfjs-spread-none-button-label = No Spreads
|
|||
|
|
pdfjs-spread-odd-button =
|
|||
|
|
.title = Join page spreads starting with odd-numbered pages
|
|||
|
|
pdfjs-spread-odd-button-label = Odd Spreads
|
|||
|
|
pdfjs-spread-even-button =
|
|||
|
|
.title = Join page spreads starting with even-numbered pages
|
|||
|
|
pdfjs-spread-even-button-label = Even Spreads
|
|||
|
|
pdfjs-document-properties-button =
|
|||
|
|
.title = Document Properties…
|
|||
|
|
pdfjs-document-properties-button-label = Document Properties…
|
|||
|
|
pdfjs-document-properties-file-name = File name:
|
|||
|
|
pdfjs-document-properties-file-size = File size:
|
|||
|
|
pdfjs-document-properties-size-kb = { NUMBER($kb, maximumSignificantDigits: 3) } KB ({ $b } bytes)
|
|||
|
|
pdfjs-document-properties-size-mb = { NUMBER($mb, maximumSignificantDigits: 3) } MB ({ $b } bytes)
|
|||
|
|
pdfjs-document-properties-title = Title:
|
|||
|
|
pdfjs-document-properties-author = Author:
|
|||
|
|
pdfjs-document-properties-subject = Subject:
|
|||
|
|
pdfjs-document-properties-keywords = Keywords:
|
|||
|
|
pdfjs-document-properties-creation-date = Creation Date:
|
|||
|
|
pdfjs-document-properties-modification-date = Modification Date:
|
|||
|
|
pdfjs-document-properties-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
|
|||
|
|
pdfjs-document-properties-creator = Creator:
|
|||
|
|
pdfjs-document-properties-producer = PDF Producer:
|
|||
|
|
pdfjs-document-properties-version = PDF Version:
|
|||
|
|
pdfjs-document-properties-page-count = Page Count:
|
|||
|
|
pdfjs-document-properties-page-size = Page Size:
|
|||
|
|
pdfjs-document-properties-page-size-unit-inches = in
|
|||
|
|
pdfjs-document-properties-page-size-unit-millimeters = mm
|
|||
|
|
pdfjs-document-properties-page-size-orientation-portrait = portrait
|
|||
|
|
pdfjs-document-properties-page-size-orientation-landscape = landscape
|
|||
|
|
pdfjs-document-properties-page-size-name-a-three = A3
|
|||
|
|
pdfjs-document-properties-page-size-name-a-four = A4
|
|||
|
|
pdfjs-document-properties-page-size-name-letter = Letter
|
|||
|
|
pdfjs-document-properties-page-size-name-legal = Legal
|
|||
|
|
pdfjs-document-properties-page-size-dimension-string = { $width } × { $height } { $unit } ({ $orientation })
|
|||
|
|
pdfjs-document-properties-page-size-dimension-name-string = { $width } × { $height } { $unit } ({ $name }, { $orientation })
|
|||
|
|
pdfjs-document-properties-linearized = Fast Web View:
|
|||
|
|
pdfjs-document-properties-linearized-yes = Yes
|
|||
|
|
pdfjs-document-properties-linearized-no = No
|
|||
|
|
pdfjs-document-properties-close-button = Close
|
|||
|
|
pdfjs-print-progress-message = Preparing document for printing…
|
|||
|
|
pdfjs-print-progress-percent = { $progress }%
|
|||
|
|
pdfjs-print-progress-close-button = Cancel
|
|||
|
|
pdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.
|
|||
|
|
pdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.
|
|||
|
|
pdfjs-current-outline-item-button =
|
|||
|
|
.title = Find Current Outline Item
|
|||
|
|
pdfjs-current-outline-item-button-label = Current Outline Item
|
|||
|
|
pdfjs-findbar-button =
|
|||
|
|
.title = Find in Document
|
|||
|
|
pdfjs-findbar-button-label = Find
|
|||
|
|
pdfjs-additional-layers = Additional Layers
|
|||
|
|
pdfjs-thumb-page-title1 =
|
|||
|
|
.title = Page { $page } of { $total }
|
|||
|
|
pdfjs-thumb-page-canvas =
|
|||
|
|
.aria-label = Thumbnail of Page { $page }
|
|||
|
|
pdfjs-thumb-page-checkbox1 =
|
|||
|
|
.title = Select page { $page }
|
|||
|
|
pdfjs-find-input =
|
|||
|
|
.title = Find
|
|||
|
|
.placeholder = Find in document…
|
|||
|
|
pdfjs-find-previous-button =
|
|||
|
|
.title = Find the previous occurrence of the phrase
|
|||
|
|
pdfjs-find-previous-button-label = Previous
|
|||
|
|
pdfjs-find-next-button =
|
|||
|
|
.title = Find the next occurrence of the phrase
|
|||
|
|
pdfjs-find-next-button-label = Next
|
|||
|
|
pdfjs-find-highlight-checkbox = Highlight All
|
|||
|
|
pdfjs-find-match-case-checkbox-label = Match Case
|
|||
|
|
pdfjs-find-match-diacritics-checkbox-label = Match Diacritics
|
|||
|
|
pdfjs-find-entire-word-checkbox-label = Whole Words
|
|||
|
|
pdfjs-find-reached-top = Reached top of document, continued from bottom
|
|||
|
|
pdfjs-find-reached-bottom = Reached end of document, continued from top
|
|||
|
|
pdfjs-find-match-count =
|
|||
|
|
{ $total ->
|
|||
|
|
[one] { $current } of { $total } match
|
|||
|
|
*[other] { $current } of { $total } matches
|
|||
|
|
}
|
|||
|
|
pdfjs-find-match-count-limit =
|
|||
|
|
{ $limit ->
|
|||
|
|
[one] More than { $limit } match
|
|||
|
|
*[other] More than { $limit } matches
|
|||
|
|
}
|
|||
|
|
pdfjs-find-not-found = Phrase not found
|
|||
|
|
pdfjs-page-scale-width = Page Width
|
|||
|
|
pdfjs-page-scale-fit = Page Fit
|
|||
|
|
pdfjs-page-scale-auto = Automatic Zoom
|
|||
|
|
pdfjs-page-scale-actual = Actual Size
|
|||
|
|
pdfjs-page-scale-percent = { $scale }%
|
|||
|
|
pdfjs-page-landmark =
|
|||
|
|
.aria-label = Page { $page }
|
|||
|
|
pdfjs-loading-error = An error occurred while loading the PDF.
|
|||
|
|
pdfjs-invalid-file-error = Invalid or corrupted PDF file.
|
|||
|
|
pdfjs-missing-file-error = Missing PDF file.
|
|||
|
|
pdfjs-unexpected-response-error = Unexpected server response.
|
|||
|
|
pdfjs-rendering-error = An error occurred while rendering the page.
|
|||
|
|
pdfjs-annotation-date-time-string = { DATETIME($dateObj, dateStyle: "short", timeStyle: "medium") }
|
|||
|
|
pdfjs-text-annotation-type =
|
|||
|
|
.alt = [{ $type } Annotation]
|
|||
|
|
pdfjs-password-label = Enter the password to open this PDF file.
|
|||
|
|
pdfjs-password-invalid = Invalid password. Please try again.
|
|||
|
|
pdfjs-password-ok-button = OK
|
|||
|
|
pdfjs-password-cancel-button = Cancel
|
|||
|
|
pdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.
|
|||
|
|
pdfjs-editor-free-text-button =
|
|||
|
|
.title = Text
|
|||
|
|
pdfjs-editor-color-picker-free-text-input =
|
|||
|
|
.title = Change text color
|
|||
|
|
pdfjs-editor-free-text-button-label = Text
|
|||
|
|
pdfjs-editor-ink-button =
|
|||
|
|
.title = Draw
|
|||
|
|
pdfjs-editor-color-picker-ink-input =
|
|||
|
|
.title = Change drawing color
|
|||
|
|
pdfjs-editor-ink-button-label = Draw
|
|||
|
|
pdfjs-editor-stamp-button =
|
|||
|
|
.title = Add or edit images
|
|||
|
|
pdfjs-editor-stamp-button-label = Add or edit images
|
|||
|
|
pdfjs-editor-highlight-button =
|
|||
|
|
.title = Highlight
|
|||
|
|
pdfjs-editor-highlight-button-label = Highlight
|
|||
|
|
pdfjs-highlight-floating-button1 =
|
|||
|
|
.title = Highlight
|
|||
|
|
.aria-label = Highlight
|
|||
|
|
pdfjs-highlight-floating-button-label = Highlight
|
|||
|
|
pdfjs-comment-floating-button =
|
|||
|
|
.title = Comment
|
|||
|
|
.aria-label = Comment
|
|||
|
|
pdfjs-comment-floating-button-label = Comment
|
|||
|
|
pdfjs-editor-comment-button =
|
|||
|
|
.title = Comment
|
|||
|
|
.aria-label = Comment
|
|||
|
|
pdfjs-editor-comment-button-label = Comment
|
|||
|
|
pdfjs-editor-signature-button =
|
|||
|
|
.title = Add signature
|
|||
|
|
pdfjs-editor-signature-button-label = Add signature
|
|||
|
|
pdfjs-editor-highlight-editor =
|
|||
|
|
.aria-label = Highlight editor
|
|||
|
|
pdfjs-editor-ink-editor =
|
|||
|
|
.aria-label = Drawing editor
|
|||
|
|
pdfjs-editor-signature-editor1 =
|
|||
|
|
.aria-description = Signature editor: { $description }
|
|||
|
|
pdfjs-editor-stamp-editor =
|
|||
|
|
.aria-label = Image editor
|
|||
|
|
pdfjs-editor-remove-ink-button =
|
|||
|
|
.title = Remove drawing
|
|||
|
|
pdfjs-editor-remove-freetext-button =
|
|||
|
|
.title = Remove text
|
|||
|
|
pdfjs-editor-remove-stamp-button =
|
|||
|
|
.title = Remove image
|
|||
|
|
pdfjs-editor-remove-highlight-button =
|
|||
|
|
.title = Remove highlight
|
|||
|
|
pdfjs-editor-remove-signature-button =
|
|||
|
|
.title = Remove signature
|
|||
|
|
pdfjs-editor-free-text-color-input = Color
|
|||
|
|
pdfjs-editor-free-text-size-input = Size
|
|||
|
|
pdfjs-editor-ink-color-input = Color
|
|||
|
|
pdfjs-editor-ink-thickness-input = Thickness
|
|||
|
|
pdfjs-editor-ink-opacity-input = Opacity
|
|||
|
|
pdfjs-editor-stamp-add-image-button =
|
|||
|
|
.title = Add image
|
|||
|
|
pdfjs-editor-stamp-add-image-button-label = Add image
|
|||
|
|
pdfjs-editor-free-highlight-thickness-input = Thickness
|
|||
|
|
pdfjs-editor-free-highlight-thickness-title =
|
|||
|
|
.title = Change thickness when highlighting items other than text
|
|||
|
|
pdfjs-editor-add-signature-container =
|
|||
|
|
.aria-label = Signature controls and saved signatures
|
|||
|
|
pdfjs-editor-signature-add-signature-button =
|
|||
|
|
.title = Add new signature
|
|||
|
|
pdfjs-editor-signature-add-signature-button-label = Add new signature
|
|||
|
|
pdfjs-editor-add-saved-signature-button =
|
|||
|
|
.title = Saved signature: { $description }
|
|||
|
|
pdfjs-free-text2 =
|
|||
|
|
.aria-label = Text Editor
|
|||
|
|
.default-content = Start typing…
|
|||
|
|
pdfjs-editor-comments-sidebar-title =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] Comment
|
|||
|
|
*[other] Comments
|
|||
|
|
}
|
|||
|
|
pdfjs-editor-comments-sidebar-close-button =
|
|||
|
|
.title = Close the sidebar
|
|||
|
|
.aria-label = Close the sidebar
|
|||
|
|
pdfjs-editor-comments-sidebar-close-button-label = Close the sidebar
|
|||
|
|
pdfjs-editor-comments-sidebar-no-comments1 = See something noteworthy? Highlight it and leave a comment.
|
|||
|
|
pdfjs-editor-comments-sidebar-no-comments-link = Learn more
|
|||
|
|
pdfjs-editor-alt-text-button =
|
|||
|
|
.aria-label = Alt text
|
|||
|
|
pdfjs-editor-alt-text-button-label = Alt text
|
|||
|
|
pdfjs-editor-alt-text-edit-button =
|
|||
|
|
.aria-label = Edit alt text
|
|||
|
|
pdfjs-editor-alt-text-dialog-label = Choose an option
|
|||
|
|
pdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.
|
|||
|
|
pdfjs-editor-alt-text-add-description-label = Add a description
|
|||
|
|
pdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.
|
|||
|
|
pdfjs-editor-alt-text-mark-decorative-label = Mark as decorative
|
|||
|
|
pdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.
|
|||
|
|
pdfjs-editor-alt-text-cancel-button = Cancel
|
|||
|
|
pdfjs-editor-alt-text-save-button = Save
|
|||
|
|
pdfjs-editor-alt-text-decorative-tooltip = Marked as decorative
|
|||
|
|
pdfjs-editor-alt-text-textarea =
|
|||
|
|
.placeholder = For example, “A young man sits down at a table to eat a meal”
|
|||
|
|
pdfjs-editor-resizer-top-left =
|
|||
|
|
.aria-label = Top left corner — resize
|
|||
|
|
pdfjs-editor-resizer-top-middle =
|
|||
|
|
.aria-label = Top middle — resize
|
|||
|
|
pdfjs-editor-resizer-top-right =
|
|||
|
|
.aria-label = Top right corner — resize
|
|||
|
|
pdfjs-editor-resizer-middle-right =
|
|||
|
|
.aria-label = Middle right — resize
|
|||
|
|
pdfjs-editor-resizer-bottom-right =
|
|||
|
|
.aria-label = Bottom right corner — resize
|
|||
|
|
pdfjs-editor-resizer-bottom-middle =
|
|||
|
|
.aria-label = Bottom middle — resize
|
|||
|
|
pdfjs-editor-resizer-bottom-left =
|
|||
|
|
.aria-label = Bottom left corner — resize
|
|||
|
|
pdfjs-editor-resizer-middle-left =
|
|||
|
|
.aria-label = Middle left — resize
|
|||
|
|
pdfjs-editor-highlight-colorpicker-label = Highlight color
|
|||
|
|
pdfjs-editor-colorpicker-button =
|
|||
|
|
.title = Change color
|
|||
|
|
pdfjs-editor-colorpicker-dropdown =
|
|||
|
|
.aria-label = Color choices
|
|||
|
|
pdfjs-editor-colorpicker-yellow =
|
|||
|
|
.title = Yellow
|
|||
|
|
pdfjs-editor-colorpicker-green =
|
|||
|
|
.title = Green
|
|||
|
|
pdfjs-editor-colorpicker-blue =
|
|||
|
|
.title = Blue
|
|||
|
|
pdfjs-editor-colorpicker-pink =
|
|||
|
|
.title = Pink
|
|||
|
|
pdfjs-editor-colorpicker-red =
|
|||
|
|
.title = Red
|
|||
|
|
pdfjs-editor-highlight-show-all-button-label = Show all
|
|||
|
|
pdfjs-editor-highlight-show-all-button =
|
|||
|
|
.title = Show all
|
|||
|
|
pdfjs-editor-new-alt-text-dialog-edit-label = Edit alt text (image description)
|
|||
|
|
pdfjs-editor-new-alt-text-dialog-add-label = Add alt text (image description)
|
|||
|
|
pdfjs-editor-new-alt-text-textarea =
|
|||
|
|
.placeholder = Write your description here…
|
|||
|
|
pdfjs-editor-new-alt-text-description = Short description for people who can’t see the image or when the image doesn’t load.
|
|||
|
|
pdfjs-editor-new-alt-text-disclaimer1 = This alt text was created automatically and may be inaccurate.
|
|||
|
|
pdfjs-editor-new-alt-text-disclaimer-learn-more-url = Learn more
|
|||
|
|
pdfjs-editor-new-alt-text-create-automatically-button-label = Create alt text automatically
|
|||
|
|
pdfjs-editor-new-alt-text-not-now-button = Not now
|
|||
|
|
pdfjs-editor-new-alt-text-error-title = Couldn’t create alt text automatically
|
|||
|
|
pdfjs-editor-new-alt-text-error-description = Please write your own alt text or try again later.
|
|||
|
|
pdfjs-editor-new-alt-text-error-close-button = Close
|
|||
|
|
pdfjs-editor-new-alt-text-ai-model-downloading-progress = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
|
|||
|
|
.aria-valuetext = Downloading alt text AI model ({ $downloadedSize } of { $totalSize } MB)
|
|||
|
|
pdfjs-editor-new-alt-text-added-button =
|
|||
|
|
.aria-label = Alt text added
|
|||
|
|
pdfjs-editor-new-alt-text-added-button-label = Alt text added
|
|||
|
|
pdfjs-editor-new-alt-text-missing-button =
|
|||
|
|
.aria-label = Missing alt text
|
|||
|
|
pdfjs-editor-new-alt-text-missing-button-label = Missing alt text
|
|||
|
|
pdfjs-editor-new-alt-text-to-review-button =
|
|||
|
|
.aria-label = Review alt text
|
|||
|
|
pdfjs-editor-new-alt-text-to-review-button-label = Review alt text
|
|||
|
|
pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer = Created automatically: { $generatedAltText }
|
|||
|
|
pdfjs-image-alt-text-settings-button =
|
|||
|
|
.title = Image alt text settings
|
|||
|
|
pdfjs-image-alt-text-settings-button-label = Image alt text settings
|
|||
|
|
pdfjs-editor-alt-text-settings-dialog-label = Image alt text settings
|
|||
|
|
pdfjs-editor-alt-text-settings-automatic-title = Automatic alt text
|
|||
|
|
pdfjs-editor-alt-text-settings-create-model-button-label = Create alt text automatically
|
|||
|
|
pdfjs-editor-alt-text-settings-create-model-description = Suggests descriptions to help people who can’t see the image or when the image doesn’t load.
|
|||
|
|
pdfjs-editor-alt-text-settings-editor-title = Alt text editor
|
|||
|
|
pdfjs-editor-alt-text-settings-show-dialog-button-label = Show alt text editor right away when adding an image
|
|||
|
|
pdfjs-editor-alt-text-settings-show-dialog-description = Helps you make sure all your images have alt text.
|
|||
|
|
pdfjs-editor-alt-text-settings-close-button = Close
|
|||
|
|
pdfjs-editor-highlight-added-alert = Highlight added
|
|||
|
|
pdfjs-editor-freetext-added-alert = Text added
|
|||
|
|
pdfjs-editor-ink-added-alert = Drawing added
|
|||
|
|
pdfjs-editor-stamp-added-alert = Image added
|
|||
|
|
pdfjs-editor-signature-added-alert = Signature added
|
|||
|
|
pdfjs-editor-undo-bar-message-highlight = Highlight removed
|
|||
|
|
pdfjs-editor-undo-bar-message-freetext = Text removed
|
|||
|
|
pdfjs-editor-undo-bar-message-ink = Drawing removed
|
|||
|
|
pdfjs-editor-undo-bar-message-stamp = Image removed
|
|||
|
|
pdfjs-editor-undo-bar-message-signature = Signature removed
|
|||
|
|
pdfjs-editor-undo-bar-message-comment = Comment removed
|
|||
|
|
pdfjs-editor-undo-bar-message-multiple =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] { $count } annotation removed
|
|||
|
|
*[other] { $count } annotations removed
|
|||
|
|
}
|
|||
|
|
pdfjs-editor-undo-bar-undo-button =
|
|||
|
|
.title = Undo
|
|||
|
|
pdfjs-editor-undo-bar-undo-button-label = Undo
|
|||
|
|
pdfjs-editor-undo-bar-close-button =
|
|||
|
|
.title = Close
|
|||
|
|
pdfjs-editor-undo-bar-close-button-label = Close
|
|||
|
|
pdfjs-editor-add-signature-dialog-label = This modal allows the user to create a signature to add to a PDF document. The user can edit the name (which also serves as the alt text), and optionally save the signature for repeated use.
|
|||
|
|
pdfjs-editor-add-signature-dialog-title = Add a signature
|
|||
|
|
pdfjs-editor-add-signature-type-button = Type
|
|||
|
|
.title = Type
|
|||
|
|
pdfjs-editor-add-signature-draw-button = Draw
|
|||
|
|
.title = Draw
|
|||
|
|
pdfjs-editor-add-signature-image-button = Image
|
|||
|
|
.title = Image
|
|||
|
|
pdfjs-editor-add-signature-type-input =
|
|||
|
|
.aria-label = Type your signature
|
|||
|
|
.placeholder = Type your signature
|
|||
|
|
pdfjs-editor-add-signature-draw-placeholder = Draw your signature
|
|||
|
|
pdfjs-editor-add-signature-draw-thickness-range-label = Thickness
|
|||
|
|
pdfjs-editor-add-signature-draw-thickness-range =
|
|||
|
|
.title = Drawing thickness: { $thickness }
|
|||
|
|
pdfjs-editor-add-signature-image-placeholder = Drag a file here to upload
|
|||
|
|
pdfjs-editor-add-signature-image-browse-link =
|
|||
|
|
{ PLATFORM() ->
|
|||
|
|
[macos] Or choose image files
|
|||
|
|
*[other] Or browse image files
|
|||
|
|
}
|
|||
|
|
pdfjs-editor-add-signature-description-label = Description (alt text)
|
|||
|
|
pdfjs-editor-add-signature-description-input =
|
|||
|
|
.title = Description (alt text)
|
|||
|
|
pdfjs-editor-add-signature-description-default-when-drawing = Signature
|
|||
|
|
pdfjs-editor-add-signature-clear-button-label = Clear signature
|
|||
|
|
pdfjs-editor-add-signature-clear-button =
|
|||
|
|
.title = Clear signature
|
|||
|
|
pdfjs-editor-add-signature-save-checkbox = Save signature
|
|||
|
|
pdfjs-editor-add-signature-save-warning-message = You’ve reached the limit of 5 saved signatures. Remove one to save more.
|
|||
|
|
pdfjs-editor-add-signature-image-upload-error-title = Couldn’t upload image
|
|||
|
|
pdfjs-editor-add-signature-image-upload-error-description = Check your network connection or try another image.
|
|||
|
|
pdfjs-editor-add-signature-image-no-data-error-title = Can’t convert this image into a signature
|
|||
|
|
pdfjs-editor-add-signature-image-no-data-error-description = Please try uploading a different image.
|
|||
|
|
pdfjs-editor-add-signature-error-close-button = Close
|
|||
|
|
pdfjs-editor-add-signature-cancel-button = Cancel
|
|||
|
|
pdfjs-editor-add-signature-add-button = Add
|
|||
|
|
pdfjs-editor-delete-signature-button1 =
|
|||
|
|
.title = Remove saved signature
|
|||
|
|
pdfjs-editor-delete-signature-button-label1 = Remove saved signature
|
|||
|
|
pdfjs-editor-add-signature-edit-button-label = Edit description
|
|||
|
|
pdfjs-editor-edit-signature-dialog-title = Edit description
|
|||
|
|
pdfjs-editor-edit-signature-update-button = Update
|
|||
|
|
pdfjs-show-comment-button =
|
|||
|
|
.title = Show comment
|
|||
|
|
pdfjs-editor-edit-comment-popup-button-label = Edit comment
|
|||
|
|
pdfjs-editor-edit-comment-popup-button =
|
|||
|
|
.title = Edit comment
|
|||
|
|
pdfjs-editor-delete-comment-popup-button-label = Remove comment
|
|||
|
|
pdfjs-editor-delete-comment-popup-button =
|
|||
|
|
.title = Remove comment
|
|||
|
|
pdfjs-editor-edit-comment-dialog-title-when-editing = Edit comment
|
|||
|
|
pdfjs-editor-edit-comment-dialog-save-button-when-editing = Update
|
|||
|
|
pdfjs-editor-edit-comment-dialog-title-when-adding = Add comment
|
|||
|
|
pdfjs-editor-edit-comment-dialog-save-button-when-adding = Add
|
|||
|
|
pdfjs-editor-edit-comment-dialog-text-input =
|
|||
|
|
.placeholder = Start typing…
|
|||
|
|
pdfjs-editor-edit-comment-dialog-cancel-button = Cancel
|
|||
|
|
pdfjs-editor-add-comment-button =
|
|||
|
|
.title = Add comment
|
|||
|
|
pdfjs-toggle-views-manager-button1 =
|
|||
|
|
.title = Manage pages
|
|||
|
|
pdfjs-toggle-views-manager-notification-button =
|
|||
|
|
.title = Toggle Sidebar (document contains thumbnails/outline/attachments/layers)
|
|||
|
|
pdfjs-toggle-views-manager-button1-label = Manage pages
|
|||
|
|
pdfjs-views-manager-sidebar =
|
|||
|
|
.aria-label = Sidebar
|
|||
|
|
pdfjs-views-manager-sidebar-resizer =
|
|||
|
|
.aria-label = Sidebar resizer
|
|||
|
|
pdfjs-views-manager-view-selector-button =
|
|||
|
|
.title = Views
|
|||
|
|
pdfjs-views-manager-view-selector-button-label = Views
|
|||
|
|
pdfjs-views-manager-pages-title = Pages
|
|||
|
|
pdfjs-views-manager-outlines-title1 = Document outline
|
|||
|
|
.title = Document outline (double-click to expand/collapse all items)
|
|||
|
|
pdfjs-views-manager-attachments-title = Attachments
|
|||
|
|
pdfjs-views-manager-layers-title1 = Layers
|
|||
|
|
.title = Layers (double-click to reset all layers to the default state)
|
|||
|
|
pdfjs-views-manager-pages-option-label = Pages
|
|||
|
|
pdfjs-views-manager-outlines-option-label = Document outline
|
|||
|
|
pdfjs-views-manager-attachments-option-label = Attachments
|
|||
|
|
pdfjs-views-manager-layers-option-label = Layers
|
|||
|
|
pdfjs-views-manager-add-file-button =
|
|||
|
|
.title = Add file
|
|||
|
|
pdfjs-views-manager-add-file-button-label = Add file
|
|||
|
|
pdfjs-views-manager-pages-status-action-label =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] { $count } selected
|
|||
|
|
*[other] { $count } selected
|
|||
|
|
}
|
|||
|
|
pdfjs-views-manager-pages-status-none-action-label = Select pages
|
|||
|
|
pdfjs-views-manager-pages-status-action-button-label = Manage
|
|||
|
|
pdfjs-views-manager-pages-status-copy-button-label = Copy
|
|||
|
|
pdfjs-views-manager-pages-status-cut-button-label = Cut
|
|||
|
|
pdfjs-views-manager-pages-status-delete-button-label = Delete
|
|||
|
|
pdfjs-views-manager-pages-status-export-selected-button-label = Export selected…
|
|||
|
|
pdfjs-views-manager-status-undo-cut-label =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] 1 page cut
|
|||
|
|
*[other] { $count } pages cut
|
|||
|
|
}
|
|||
|
|
pdfjs-views-manager-pages-status-undo-copy-label =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] 1 page copied
|
|||
|
|
*[other] { $count } pages copied
|
|||
|
|
}
|
|||
|
|
pdfjs-views-manager-pages-status-undo-delete-label =
|
|||
|
|
{ $count ->
|
|||
|
|
[one] 1 page deleted
|
|||
|
|
*[other] { $count } pages deleted
|
|||
|
|
}
|
|||
|
|
pdfjs-views-manager-pages-status-waiting-ready-label = Getting your file ready…
|
|||
|
|
pdfjs-views-manager-pages-status-waiting-uploading-label = Uploading file…
|
|||
|
|
pdfjs-views-manager-status-warning-cut-label = Couldn’t cut. Refresh page and try again.
|
|||
|
|
pdfjs-views-manager-status-warning-copy-label = Couldn’t copy. Refresh page and try again.
|
|||
|
|
pdfjs-views-manager-status-warning-delete-label = Couldn’t delete. Refresh page and try again.
|
|||
|
|
pdfjs-views-manager-status-warning-save-label = Couldn’t save. Refresh page and try again.
|
|||
|
|
pdfjs-views-manager-status-undo-button-label = Undo
|
|||
|
|
pdfjs-views-manager-status-done-button-label = Done
|
|||
|
|
pdfjs-views-manager-status-close-button =
|
|||
|
|
.title = Close
|
|||
|
|
pdfjs-views-manager-status-close-button-label = Close
|
|||
|
|
pdfjs-views-manager-paste-button-label = Paste
|
|||
|
|
pdfjs-views-manager-paste-button-before =
|
|||
|
|
.title = Paste before the first page
|
|||
|
|
pdfjs-views-manager-paste-button-after =
|
|||
|
|
.title = Paste after page { $page }
|
|||
|
|
pdfjs-new-badge-content = NEW
|
|||
|
|
pdfjs-views-manager-waiting-for-file = Uploading file…`)}},Ol=1e3,kl=50,Al=1e3;function jl(){return document.location.hash}var Ml=class{#e=null;constructor({linkService:e,eventBus:t}){this.linkService=e,this.eventBus=t,this._initialized=!1,this._fingerprint=``,this.reset(),this.eventBus.on(`pagesinit`,()=>{this._isPagesLoaded=!1,this.eventBus.on(`pagesloaded`,e=>{this._isPagesLoaded=!!e.pagesCount},{once:!0,...Os})},Os)}initialize({fingerprint:e,resetHistory:t=!1,updateUrl:n=!1}){if(!e||typeof e!=`string`){console.error(`PDFHistory.initialize: The "fingerprint" must be a non-empty string.`);return}this._initialized&&this.reset();let r=this._fingerprint!==``&&this._fingerprint!==e;this._fingerprint=e,this._updateUrl=n===!0,this._initialized=!0,this.#u();let i=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=jl(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this.#i(i,!0)||t){let{hash:e,page:n,rotation:i}=this.#o(!0);if(!e||r||t){this.#t(null,!0);return}this.#t({hash:e,page:n,rotation:i},!0);return}let a=i.destination;this.#a(a,i.uid,!0),a.rotation!==void 0&&(this._initialRotation=a.rotation),a.dest?(this._initialBookmark=JSON.stringify(a.dest),this._destination.page=null):a.hash?this._initialBookmark=a.hash:a.page&&(this._initialBookmark=`page=${a.page}`)}reset(){this._initialized&&(this.#l(),this._initialized=!1,this.#d()),this._updateViewareaTimeout&&=(clearTimeout(this._updateViewareaTimeout),null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:e=null,explicitDest:t,pageNumber:n}){if(!this._initialized)return;if(e&&typeof e!=`string`){console.error(`PDFHistory.push: "${e}" is not a valid namedDest parameter.`);return}else if(!Array.isArray(t)){console.error(`PDFHistory.push: "${t}" is not a valid explicitDest parameter.`);return}else if(!this.#r(n)&&(n!==null||this._destination)){console.error(`PDFHistory.push: "${n}" is not a valid pageNumber parameter.`);return}let r=e||JSON.stringify(t);if(!r)return;let i=!1;if(this._destination&&(Nl(this._destination.hash,r)||Pl(this._destination.dest,t))){if(this._destination.page)return;i=!0}this._popStateInProgress&&!i||(this.#t({dest:t,hash:r,page:n,rotation:this.linkService.rotation},i),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(e){if(this._initialized){if(!this.#r(e)){console.error(`PDFHistory.pushPage: "${e}" is not a valid page number.`);return}this._destination?.page!==e&&(this._popStateInProgress||(this.#t({dest:null,hash:`page=${e}`,page:e,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||this.#n()}back(){if(!this._initialized||this._popStateInProgress)return;let e=window.history.state;this.#i(e)&&e.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;let e=window.history.state;this.#i(e)&&e.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}#t(e,t=!1){let n=t||!this._destination,r={fingerprint:this._fingerprint,uid:n?this._uid:this._uid+1,destination:e};this.#a(e,r.uid);let i;if(this._updateUrl&&e?.hash){let{href:t,protocol:n}=document.location;n!==`file:`&&(i=Mo(t,e.hash))}n?window.history.replaceState(r,``,i):window.history.pushState(r,``,i)}#n(e=!1){if(!this._position)return;let t=this._position;if(e&&(t=Object.assign(Object.create(null),this._position),t.temporary=!0),!this._destination){this.#t(t);return}if(this._destination.temporary){this.#t(t,!0);return}if(this._destination.hash===t.hash||!this._destination.page&&this._numPositionUpdates<=kl)return;let n=!1;if(this._destination.page>=t.first&&this._destination.page<=
|
|||
|
|
`)).map(t=>Ul(t,e,this.#e++))}},$={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},Gl=class{renderingId=``;renderTask=null;resume=null;get renderingState(){throw Error("Abstract getter `renderingState` accessed")}set renderingState(e){throw Error("Abstract setter `renderingState` accessed")}async draw(){throw Error(`Not implemented: draw`)}},Kl=class extends Gl{#e=null;#t=null;#n=$.INITIAL;#r=null;#i=0;#a=null;canvas=null;div=null;enableOptimizedPartialRendering=!1;enableSelectionRendering=!0;imagesRightClickMinSize=-1;eventBus=null;id=null;imageCoordinates=null;pageColors=null;recordedBBoxes=null;renderingQueue=null;constructor(e){super(),this.eventBus=e.eventBus,this.id=e.id,this.pageColors=e.pageColors||null,this.renderingQueue=e.renderingQueue,this.enableOptimizedPartialRendering=e.enableOptimizedPartialRendering??!1,this.enableSelectionRendering=e.enableSelectionRendering!==!1,this.imagesRightClickMinSize=e.imagesRightClickMinSize??-1,this.minDurationToUpdateCanvas=e.minDurationToUpdateCanvas??500}get renderingState(){return this.#n}set renderingState(e){if(e!==this.#n)switch(this.#n=e,this.#e&&=(clearTimeout(this.#e),null),e){case $.PAUSED:this.div.classList.remove(`loading`),this.#i=0,this.#r?.(!1);break;case $.RUNNING:this.div.classList.add(`loadingIcon`),this.#e=setTimeout(()=>{this.div.classList.add(`loading`),this.#e=null},0),this.#i=Date.now();break;case $.INITIAL:case $.FINISHED:this.div.classList.remove(`loadingIcon`,`loading`),this.#i=0;break}}_createCanvas(e,t=!1){let{pageColors:n}=this,r=!!(n?.background&&n?.foreground),i=this.canvas,a=!i&&!r&&!t,o=this.canvas=document.createElement(`canvas`);return this.#r=t=>{if(a){let n=this.#a;if(!t&&this.minDurationToUpdateCanvas>0){if(Date.now()-this.#i<this.minDurationToUpdateCanvas)return;n||(n=this.#a=o,o=this.canvas=o.cloneNode(!1),e(o))}if(n){o.getContext(`2d`,{alpha:!1}).drawImage(n,0,0),t?this.#s():this.#i=Date.now();return}e(o),this.#r=null;return}t&&(i?(i.replaceWith(o),i.width=i.height=0):e(o))},{canvas:o,prevCanvas:i}}#o=e=>{if(this.#r?.(!1),this.renderingQueue&&!this.renderingQueue.isHighestPriority(this)){this.renderingState=$.PAUSED,this.resume=()=>{this.renderingState=$.RUNNING,e()};return}e()};_resetCanvas(){let{canvas:e}=this;e&&(e.remove(),e.width=e.height=0,this.canvas=null,this.#s())}#s(){this.#a&&=(this.#a.width=this.#a.height=0,null)}async _drawCanvas(e,t,n){let r=this.renderTask=this.pdfPage.render(e);r.onContinue=this.#o,r.onError=e=>{e instanceof xo&&(t(),this.#t=null)};let i=null;try{await r.promise,this.#r?.(!0)}catch(e){if(e instanceof xo)return;i=e,this.#r?.(!0)}finally{this.#t=i,r===this.renderTask&&(this.renderTask=null,this.enableOptimizedPartialRendering&&(this.recordedBBoxes??=r.recordedBBoxes),this.imagesRightClickMinSize!==-1&&(this.imageCoordinates??=this.pdfPage.imageCoordinates))}if(this.renderingState=$.FINISHED,n(r),i)throw i}cancelRendering({cancelExtraDelay:e=0}={}){this.renderTask&&=(this.renderTask.cancel(e),null),this.resume=null}dispatchPageRender(){this.eventBus.dispatch(`pagerender`,{source:this,pageNumber:this.id})}dispatchPageRendered(e,t){this.eventBus.dispatch(`pagerendered`,{source:this,pageNumber:this.id,cssTransform:e,isDetailView:t,timestamp:performance.now(),error:this.#t})}},ql=class{#e=null;constructor(e){this.pageIndex=e.pageIndex,this.textLayer=e.textLayer||null,this.filterFactory=e.filterFactory||null,this.pageColors=e.pageColors||null}async render({intent:e=`display`}){e!==`display`||this.#e||this._cancelled||(this.#e=new Wa({pageIndex:this.pageIndex,textLayer:this.textLayer,filterFactory:this.filterFactory,pageColors:this.pageColors}))}cancel(){this._cancelled=!0,this.#e&&=(this.#e.destroy(),null)}setParent(e){this.#e?.setParent(e)}getDrawLayer(){return this.#e}},Jl=class extends Kl{#e=null;renderingCancelled=!1;constructor({pageView:e}){super(e),this.pageView=e,this.renderingId=`detail`+this.id,this.div=e.div}setPdfPage(e){this.pageView.setPdfPage(e)}get pdfPage(){return this.pageView.pdfPage}get renderingState(){return super.renderingState}set renderingState(e){this.renderingCancelled=!1,super.renderingSt
|
|||
|
|
`);t.push(ps(n.join(``)))}return t.join(`
|
|||
|
|
`)}#L(e,t){let n=document.getSelection(),{focusNode:r,anchorNode:i}=n;if(i&&r&&n.containsNode(this.#C)){if(this.#S||e===ss.ENABLE_PERMISSIONS){Do(t);return}this.#S=!0;let{classList:n}=this.viewer;n.add(`copyAll`);let r=new AbortController,i=new AbortController;window.addEventListener(`keydown`,e=>{e.key===`Escape`&&i.abort()},{signal:r.signal}),this.getAllText(i.signal).then(async e=>{e!==null&&await navigator.clipboard.writeText(e)}).catch(e=>{console.warn(`Something goes wrong when extracting the text: ${e.message}`)}).finally(()=>{this.#S=!1,r.abort(),n.remove(`copyAll`)}),Do(t)}}setDocument(e){if(this.pdfDocument&&(this.eventBus.dispatch(`pagesdestroy`,{source:this}),this._cancelRendering(),this._resetView(),this.findController?.setDocument(null),this._scriptingManager?.setDocument(null),this.#i?.destroy(),this.#i=null,this.#r=Na.NONE,this.#v=!0),this.pdfDocument=e,!e)return;let t=e.numPages,n=e.getPage(1),r=e.getOptionalContentConfig({intent:`display`}),i=this.#u?e.getPermissions():Promise.resolve(),{eventBus:a,pageColors:o,viewer:s}=this;this.#h=new AbortController;let{signal:c}=this.#h,l={signal:c,...Os};if(t>hu.FORCE_SCROLL_MODE_PAGE){console.warn(`Forcing PAGE-scrolling for performance reasons, given the length of the document.`);let e=this._scrollMode=Z.PAGE;a.dispatch(`scrollmodechanged`,{source:this,mode:e})}this._pagesCapability.promise.then(()=>{a.dispatch(`pagesloaded`,{source:this,pagesCount:t})},()=>{}),a.on(`pagerender`,e=>{let t=this._pages[e.pageNumber-1];t&&this.#e.push(t)},l);let u=e=>{e.cssTransform||e.isDetailView||(this._onePageRenderedCapability.resolve({timestamp:e.timestamp}),a.off(`pagerendered`,u))};a.on(`pagerendered`,u,l),Promise.all([n,i]).then(([n,i])=>{if(e!==this.pdfDocument)return;this._firstPageCapability.resolve(n),this._optionalContentConfigPromise=r;let{annotationEditorMode:l,annotationMode:u,textLayerMode:d}=this.#F(i);if(d!==ss.DISABLE){let e=this.#C=document.createElement(`div`);e.id=`hiddenCopyElement`,e.style.cssText=`position:absolute;top:0;left:0;width:0;height:0;display:none`,s.before(e)}if(l!==Na.DISABLE){let t=l;e.isPureXfa?console.warn(`Warning: XFA-editing is not implemented.`):gu(t)?(this.#i=new Pa(this.container,s,this.#j,this.#t,this.#o,this.#O,a,e,o,this.#n,this.#l,this.#d,this.#f,this.#_,this.#c,this.#k),a.dispatch(`annotationeditoruimanager`,{source:this,uiManager:this.#i}),t!==Na.NONE&&(this.#$(t),this.#i.updateMode(t))):console.error(`Invalid AnnotationEditor mode: ${t}`)}let f=this._scrollMode===Z.PAGE?null:s,p=this.currentScale,m=n.getViewport({scale:p*bo.PDF_TO_CSS_UNITS});s.style.setProperty(`--scale-factor`,m.scale),o?.background&&s.style.setProperty(`--page-bg-color`,o.background),(o?.foreground===`CanvasText`||o?.background===`Canvas`)&&(s.style.setProperty(`--hcm-highlight-filter`,e.filterFactory.addHighlightHCMFilter(`highlight`,`CanvasText`,`Canvas`,`HighlightText`,`Highlight`)),s.style.setProperty(`--hcm-highlight-selected-filter`,e.filterFactory.addHighlightHCMFilter(`highlight_selected`,`CanvasText`,`Canvas`,`HighlightText`,`ButtonText`)));for(let e=1;e<=t;++e){let t=new su({container:f,eventBus:a,id:e,scale:p,defaultViewport:m.clone(),optionalContentConfigPromise:r,renderingQueue:this.renderingQueue,textLayerMode:d,annotationMode:u,imageResourcesPath:this.imageResourcesPath,maxCanvasPixels:this.maxCanvasPixels,maxCanvasDim:this.maxCanvasDim,capCanvasAreaFactor:this.capCanvasAreaFactor,enableDetailCanvas:this.enableDetailCanvas,enableOptimizedPartialRendering:this.enableOptimizedPartialRendering,enableSelectionRendering:this.enableSelectionRendering,imagesRightClickMinSize:this.imagesRightClickMinSize,pageColors:o,l10n:this.l10n,layerProperties:this._layerProperties,enableAutoLinking:this.#p,minDurationToUpdateCanvas:this.#g,commentManager:this.#o,abortSignal:this.#m});this._pages.push(t)}this._pages[0]?.setPdfPage(n),this._scrollMode===Z.PAGE?this.#R():this._spreadMode!==cs.NONE&&this._updateSpreadMode(),a.on(`annotationeditorlayerrendered`,e=>{this.#i&&a.dispatch(`annotationeditormodechanged`,{source:this,mode:this.#r})},{once:!0,signal:c,...Os}
|