@pdfme/ui 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +157 -69
- package/dist/index.umd.js +4 -4
- package/dist/types/components/Designer/RightSidebar/DetailView/ButtonGroupWidget.d.ts +4 -0
- package/dist/types/contexts.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/Designer/RightSidebar/DetailView/ButtonGroupWidget.tsx +70 -0
- package/src/components/Designer/RightSidebar/DetailView/index.tsx +3 -1
- package/src/i18n.ts +12 -1
package/dist/index.umd.js
CHANGED
@@ -39,7 +39,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
39
39
|
*
|
40
40
|
* @author Feross Aboukhadijeh <https://feross.org>
|
41
41
|
* @license MIT
|
42
|
-
*/(function(a){const s=base64Js,$=ieee754,_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=at,a.SlowBuffer=gt,a.INSPECT_MAX_BYTES=50;const _e=2147483647;a.kMaxLength=_e,at.TYPED_ARRAY_SUPPORT=tt(),!at.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function tt(){try{const Xt=new Uint8Array(1),Gt={foo:function(){return 42}};return Object.setPrototypeOf(Gt,Uint8Array.prototype),Object.setPrototypeOf(Xt,Gt),Xt.foo()===42}catch{return!1}}Object.defineProperty(at.prototype,"parent",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.buffer}}),Object.defineProperty(at.prototype,"offset",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.byteOffset}});function nt(Xt){if(Xt>_e)throw new RangeError('The value "'+Xt+'" is invalid for option "size"');const Gt=new Uint8Array(Xt);return Object.setPrototypeOf(Gt,at.prototype),Gt}function at(Xt,Gt,Wt){if(typeof Xt=="number"){if(typeof Gt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lt(Xt)}return ot(Xt,Gt,Wt)}at.poolSize=8192;function ot(Xt,Gt,Wt){if(typeof Xt=="string")return et(Xt,Gt);if(ArrayBuffer.isView(Xt))return ut(Xt);if(Xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt);if(tr(Xt,ArrayBuffer)||Xt&&tr(Xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tr(Xt,SharedArrayBuffer)||Xt&&tr(Xt.buffer,SharedArrayBuffer)))return ft(Xt,Gt,Wt);if(typeof Xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const er=Xt.valueOf&&Xt.valueOf();if(er!=null&&er!==Xt)return at.from(er,Gt,Wt);const lr=ht(Xt);if(lr)return lr;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Xt[Symbol.toPrimitive]=="function")return at.from(Xt[Symbol.toPrimitive]("string"),Gt,Wt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt)}at.from=function(Xt,Gt,Wt){return ot(Xt,Gt,Wt)},Object.setPrototypeOf(at.prototype,Uint8Array.prototype),Object.setPrototypeOf(at,Uint8Array);function rt(Xt){if(typeof Xt!="number")throw new TypeError('"size" argument must be of type number');if(Xt<0)throw new RangeError('The value "'+Xt+'" is invalid for option "size"')}function st(Xt,Gt,Wt){return rt(Xt),Xt<=0?nt(Xt):Gt!==void 0?typeof Wt=="string"?nt(Xt).fill(Gt,Wt):nt(Xt).fill(Gt):nt(Xt)}at.alloc=function(Xt,Gt,Wt){return st(Xt,Gt,Wt)};function lt(Xt){return rt(Xt),nt(Xt<0?0:dt(Xt)|0)}at.allocUnsafe=function(Xt){return lt(Xt)},at.allocUnsafeSlow=function(Xt){return lt(Xt)};function et(Xt,Gt){if((typeof Gt!="string"||Gt==="")&&(Gt="utf8"),!at.isEncoding(Gt))throw new TypeError("Unknown encoding: "+Gt);const Wt=pt(Xt,Gt)|0;let er=nt(Wt);const lr=er.write(Xt,Gt);return lr!==Wt&&(er=er.slice(0,lr)),er}function it(Xt){const Gt=Xt.length<0?0:dt(Xt.length)|0,Wt=nt(Gt);for(let er=0;er<Gt;er+=1)Wt[er]=Xt[er]&255;return Wt}function ut(Xt){if(tr(Xt,Uint8Array)){const Gt=new Uint8Array(Xt);return ft(Gt.buffer,Gt.byteOffset,Gt.byteLength)}return it(Xt)}function ft(Xt,Gt,Wt){if(Gt<0||Xt.byteLength<Gt)throw new RangeError('"offset" is outside of buffer bounds');if(Xt.byteLength<Gt+(Wt||0))throw new RangeError('"length" is outside of buffer bounds');let er;return Gt===void 0&&Wt===void 0?er=new Uint8Array(Xt):Wt===void 0?er=new Uint8Array(Xt,Gt):er=new Uint8Array(Xt,Gt,Wt),Object.setPrototypeOf(er,at.prototype),er}function ht(Xt){if(at.isBuffer(Xt)){const Gt=dt(Xt.length)|0,Wt=nt(Gt);return Wt.length===0||Xt.copy(Wt,0,0,Gt),Wt}if(Xt.length!==void 0)return typeof Xt.length!="number"||ir(Xt.length)?nt(0):it(Xt);if(Xt.type==="Buffer"&&Array.isArray(Xt.data))return it(Xt.data)}function dt(Xt){if(Xt>=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return Xt|0}function gt(Xt){return+Xt!=Xt&&(Xt=0),at.alloc(+Xt)}at.isBuffer=function(Gt){return Gt!=null&&Gt._isBuffer===!0&&Gt!==at.prototype},at.compare=function(Gt,Wt){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),tr(Wt,Uint8Array)&&(Wt=at.from(Wt,Wt.offset,Wt.byteLength)),!at.isBuffer(Gt)||!at.isBuffer(Wt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Gt===Wt)return 0;let er=Gt.length,lr=Wt.length;for(let ur=0,pr=Math.min(er,lr);ur<pr;++ur)if(Gt[ur]!==Wt[ur]){er=Gt[ur],lr=Wt[ur];break}return er<lr?-1:lr<er?1:0},at.isEncoding=function(Gt){switch(String(Gt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},at.concat=function(Gt,Wt){if(!Array.isArray(Gt))throw new TypeError('"list" argument must be an Array of Buffers');if(Gt.length===0)return at.alloc(0);let er;if(Wt===void 0)for(Wt=0,er=0;er<Gt.length;++er)Wt+=Gt[er].length;const lr=at.allocUnsafe(Wt);let ur=0;for(er=0;er<Gt.length;++er){let pr=Gt[er];if(tr(pr,Uint8Array))ur+pr.length>lr.length?(at.isBuffer(pr)||(pr=at.from(pr)),pr.copy(lr,ur)):Uint8Array.prototype.set.call(lr,pr,ur);else if(at.isBuffer(pr))pr.copy(lr,ur);else throw new TypeError('"list" argument must be an Array of Buffers');ur+=pr.length}return lr};function pt(Xt,Gt){if(at.isBuffer(Xt))return Xt.length;if(ArrayBuffer.isView(Xt)||tr(Xt,ArrayBuffer))return Xt.byteLength;if(typeof Xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Xt);const Wt=Xt.length,er=arguments.length>2&&arguments[2]===!0;if(!er&&Wt===0)return 0;let lr=!1;for(;;)switch(Gt){case"ascii":case"latin1":case"binary":return Wt;case"utf8":case"utf-8":return Jt(Xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt*2;case"hex":return Wt>>>1;case"base64":return Kt(Xt).length;default:if(lr)return er?-1:Jt(Xt).length;Gt=(""+Gt).toLowerCase(),lr=!0}}at.byteLength=pt;function mt(Xt,Gt,Wt){let er=!1;if((Gt===void 0||Gt<0)&&(Gt=0),Gt>this.length||((Wt===void 0||Wt>this.length)&&(Wt=this.length),Wt<=0)||(Wt>>>=0,Gt>>>=0,Wt<=Gt))return"";for(Xt||(Xt="utf8");;)switch(Xt){case"hex":return Rt(this,Gt,Wt);case"utf8":case"utf-8":return Tt(this,Gt,Wt);case"ascii":return It(this,Gt,Wt);case"latin1":case"binary":return yt(this,Gt,Wt);case"base64":return Ot(this,Gt,Wt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,Gt,Wt);default:if(er)throw new TypeError("Unknown encoding: "+Xt);Xt=(Xt+"").toLowerCase(),er=!0}}at.prototype._isBuffer=!0;function ct(Xt,Gt,Wt){const er=Xt[Gt];Xt[Gt]=Xt[Wt],Xt[Wt]=er}at.prototype.swap16=function(){const Gt=this.length;if(Gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Wt=0;Wt<Gt;Wt+=2)ct(this,Wt,Wt+1);return this},at.prototype.swap32=function(){const Gt=this.length;if(Gt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Wt=0;Wt<Gt;Wt+=4)ct(this,Wt,Wt+3),ct(this,Wt+1,Wt+2);return this},at.prototype.swap64=function(){const Gt=this.length;if(Gt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Wt=0;Wt<Gt;Wt+=8)ct(this,Wt,Wt+7),ct(this,Wt+1,Wt+6),ct(this,Wt+2,Wt+5),ct(this,Wt+3,Wt+4);return this},at.prototype.toString=function(){const Gt=this.length;return Gt===0?"":arguments.length===0?Tt(this,0,Gt):mt.apply(this,arguments)},at.prototype.toLocaleString=at.prototype.toString,at.prototype.equals=function(Gt){if(!at.isBuffer(Gt))throw new TypeError("Argument must be a Buffer");return this===Gt?!0:at.compare(this,Gt)===0},at.prototype.inspect=function(){let Gt="";const Wt=a.INSPECT_MAX_BYTES;return Gt=this.toString("hex",0,Wt).replace(/(.{2})/g,"$1 ").trim(),this.length>Wt&&(Gt+=" ... "),"<Buffer "+Gt+">"},_&&(at.prototype[_]=at.prototype.inspect),at.prototype.compare=function(Gt,Wt,er,lr,ur){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),!at.isBuffer(Gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Gt);if(Wt===void 0&&(Wt=0),er===void 0&&(er=Gt?Gt.length:0),lr===void 0&&(lr=0),ur===void 0&&(ur=this.length),Wt<0||er>Gt.length||lr<0||ur>this.length)throw new RangeError("out of range index");if(lr>=ur&&Wt>=er)return 0;if(lr>=ur)return-1;if(Wt>=er)return 1;if(Wt>>>=0,er>>>=0,lr>>>=0,ur>>>=0,this===Gt)return 0;let pr=ur-lr,yr=er-Wt;const Er=Math.min(pr,yr),br=this.slice(lr,ur),gr=Gt.slice(Wt,er);for(let Ar=0;Ar<Er;++Ar)if(br[Ar]!==gr[Ar]){pr=br[Ar],yr=gr[Ar];break}return pr<yr?-1:yr<pr?1:0};function vt(Xt,Gt,Wt,er,lr){if(Xt.length===0)return-1;if(typeof Wt=="string"?(er=Wt,Wt=0):Wt>2147483647?Wt=2147483647:Wt<-2147483648&&(Wt=-2147483648),Wt=+Wt,ir(Wt)&&(Wt=lr?0:Xt.length-1),Wt<0&&(Wt=Xt.length+Wt),Wt>=Xt.length){if(lr)return-1;Wt=Xt.length-1}else if(Wt<0)if(lr)Wt=0;else return-1;if(typeof Gt=="string"&&(Gt=at.from(Gt,er)),at.isBuffer(Gt))return Gt.length===0?-1:At(Xt,Gt,Wt,er,lr);if(typeof Gt=="number")return Gt=Gt&255,typeof Uint8Array.prototype.indexOf=="function"?lr?Uint8Array.prototype.indexOf.call(Xt,Gt,Wt):Uint8Array.prototype.lastIndexOf.call(Xt,Gt,Wt):At(Xt,[Gt],Wt,er,lr);throw new TypeError("val must be string, number or Buffer")}function At(Xt,Gt,Wt,er,lr){let ur=1,pr=Xt.length,yr=Gt.length;if(er!==void 0&&(er=String(er).toLowerCase(),er==="ucs2"||er==="ucs-2"||er==="utf16le"||er==="utf-16le")){if(Xt.length<2||Gt.length<2)return-1;ur=2,pr/=2,yr/=2,Wt/=2}function Er(gr,Ar){return ur===1?gr[Ar]:gr.readUInt16BE(Ar*ur)}let br;if(lr){let gr=-1;for(br=Wt;br<pr;br++)if(Er(Xt,br)===Er(Gt,gr===-1?0:br-gr)){if(gr===-1&&(gr=br),br-gr+1===yr)return gr*ur}else gr!==-1&&(br-=br-gr),gr=-1}else for(Wt+yr>pr&&(Wt=pr-yr),br=Wt;br>=0;br--){let gr=!0;for(let Ar=0;Ar<yr;Ar++)if(Er(Xt,br+Ar)!==Er(Gt,Ar)){gr=!1;break}if(gr)return br}return-1}at.prototype.includes=function(Gt,Wt,er){return this.indexOf(Gt,Wt,er)!==-1},at.prototype.indexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!0)},at.prototype.lastIndexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!1)};function xt(Xt,Gt,Wt,er){Wt=Number(Wt)||0;const lr=Xt.length-Wt;er?(er=Number(er),er>lr&&(er=lr)):er=lr;const ur=Gt.length;er>ur/2&&(er=ur/2);let pr;for(pr=0;pr<er;++pr){const yr=parseInt(Gt.substr(pr*2,2),16);if(ir(yr))return pr;Xt[Wt+pr]=yr}return pr}function bt(Xt,Gt,Wt,er){return nr(Jt(Gt,Xt.length-Wt),Xt,Wt,er)}function Et(Xt,Gt,Wt,er){return nr(rr(Gt),Xt,Wt,er)}function St(Xt,Gt,Wt,er){return nr(Kt(Gt),Xt,Wt,er)}function Bt(Xt,Gt,Wt,er){return nr(Yt(Gt,Xt.length-Wt),Xt,Wt,er)}at.prototype.write=function(Gt,Wt,er,lr){if(Wt===void 0)lr="utf8",er=this.length,Wt=0;else if(er===void 0&&typeof Wt=="string")lr=Wt,er=this.length,Wt=0;else if(isFinite(Wt))Wt=Wt>>>0,isFinite(er)?(er=er>>>0,lr===void 0&&(lr="utf8")):(lr=er,er=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ur=this.length-Wt;if((er===void 0||er>ur)&&(er=ur),Gt.length>0&&(er<0||Wt<0)||Wt>this.length)throw new RangeError("Attempt to write outside buffer bounds");lr||(lr="utf8");let pr=!1;for(;;)switch(lr){case"hex":return xt(this,Gt,Wt,er);case"utf8":case"utf-8":return bt(this,Gt,Wt,er);case"ascii":case"latin1":case"binary":return Et(this,Gt,Wt,er);case"base64":return St(this,Gt,Wt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,Gt,Wt,er);default:if(pr)throw new TypeError("Unknown encoding: "+lr);lr=(""+lr).toLowerCase(),pr=!0}},at.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ot(Xt,Gt,Wt){return Gt===0&&Wt===Xt.length?s.fromByteArray(Xt):s.fromByteArray(Xt.slice(Gt,Wt))}function Tt(Xt,Gt,Wt){Wt=Math.min(Xt.length,Wt);const er=[];let lr=Gt;for(;lr<Wt;){const ur=Xt[lr];let pr=null,yr=ur>239?4:ur>223?3:ur>191?2:1;if(lr+yr<=Wt){let Er,br,gr,Ar;switch(yr){case 1:ur<128&&(pr=ur);break;case 2:Er=Xt[lr+1],(Er&192)===128&&(Ar=(ur&31)<<6|Er&63,Ar>127&&(pr=Ar));break;case 3:Er=Xt[lr+1],br=Xt[lr+2],(Er&192)===128&&(br&192)===128&&(Ar=(ur&15)<<12|(Er&63)<<6|br&63,Ar>2047&&(Ar<55296||Ar>57343)&&(pr=Ar));break;case 4:Er=Xt[lr+1],br=Xt[lr+2],gr=Xt[lr+3],(Er&192)===128&&(br&192)===128&&(gr&192)===128&&(Ar=(ur&15)<<18|(Er&63)<<12|(br&63)<<6|gr&63,Ar>65535&&Ar<1114112&&(pr=Ar))}}pr===null?(pr=65533,yr=1):pr>65535&&(pr-=65536,er.push(pr>>>10&1023|55296),pr=56320|pr&1023),er.push(pr),lr+=yr}return Ct(er)}const wt=4096;function Ct(Xt){const Gt=Xt.length;if(Gt<=wt)return String.fromCharCode.apply(String,Xt);let Wt="",er=0;for(;er<Gt;)Wt+=String.fromCharCode.apply(String,Xt.slice(er,er+=wt));return Wt}function It(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]&127);return er}function yt(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]);return er}function Rt(Xt,Gt,Wt){const er=Xt.length;(!Gt||Gt<0)&&(Gt=0),(!Wt||Wt<0||Wt>er)&&(Wt=er);let lr="";for(let ur=Gt;ur<Wt;++ur)lr+=sr[Xt[ur]];return lr}function kt(Xt,Gt,Wt){const er=Xt.slice(Gt,Wt);let lr="";for(let ur=0;ur<er.length-1;ur+=2)lr+=String.fromCharCode(er[ur]+er[ur+1]*256);return lr}at.prototype.slice=function(Gt,Wt){const er=this.length;Gt=~~Gt,Wt=Wt===void 0?er:~~Wt,Gt<0?(Gt+=er,Gt<0&&(Gt=0)):Gt>er&&(Gt=er),Wt<0?(Wt+=er,Wt<0&&(Wt=0)):Wt>er&&(Wt=er),Wt<Gt&&(Wt=Gt);const lr=this.subarray(Gt,Wt);return Object.setPrototypeOf(lr,at.prototype),lr};function jt(Xt,Gt,Wt){if(Xt%1!==0||Xt<0)throw new RangeError("offset is not uint");if(Xt+Gt>Wt)throw new RangeError("Trying to access beyond buffer length")}at.prototype.readUintLE=at.prototype.readUIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return lr},at.prototype.readUintBE=at.prototype.readUIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt+--Wt],ur=1;for(;Wt>0&&(ur*=256);)lr+=this[Gt+--Wt]*ur;return lr},at.prototype.readUint8=at.prototype.readUInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]},at.prototype.readUint16LE=at.prototype.readUInt16LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]|this[Gt+1]<<8},at.prototype.readUint16BE=at.prototype.readUInt16BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]<<8|this[Gt+1]},at.prototype.readUint32LE=at.prototype.readUInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),(this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16)+this[Gt+3]*16777216},at.prototype.readUint32BE=at.prototype.readUInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]*16777216+(this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3])},at.prototype.readBigUInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24,ur=this[++Gt]+this[++Gt]*2**8+this[++Gt]*2**16+er*2**24;return BigInt(lr)+(BigInt(ur)<<BigInt(32))}),at.prototype.readBigUInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt*2**24+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt],ur=this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er;return(BigInt(lr)<<BigInt(32))+BigInt(ur)}),at.prototype.readIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return ur*=128,lr>=ur&&(lr-=Math.pow(2,8*Wt)),lr},at.prototype.readIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=Wt,ur=1,pr=this[Gt+--lr];for(;lr>0&&(ur*=256);)pr+=this[Gt+--lr]*ur;return ur*=128,pr>=ur&&(pr-=Math.pow(2,8*Wt)),pr},at.prototype.readInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]&128?(255-this[Gt]+1)*-1:this[Gt]},at.prototype.readInt16LE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt]|this[Gt+1]<<8;return er&32768?er|4294901760:er},at.prototype.readInt16BE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt+1]|this[Gt]<<8;return er&32768?er|4294901760:er},at.prototype.readInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16|this[Gt+3]<<24},at.prototype.readInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]<<24|this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3]},at.prototype.readBigInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=this[Gt+4]+this[Gt+5]*2**8+this[Gt+6]*2**16+(er<<24);return(BigInt(lr)<<BigInt(32))+BigInt(Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24)}),at.prototype.readBigInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=(Wt<<24)+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt];return(BigInt(lr)<<BigInt(32))+BigInt(this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er)}),at.prototype.readFloatLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!0,23,4)},at.prototype.readFloatBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!1,23,4)},at.prototype.readDoubleLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!0,52,8)},at.prototype.readDoubleBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!1,52,8)};function Ht(Xt,Gt,Wt,er,lr,ur){if(!at.isBuffer(Xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Gt>lr||Gt<ur)throw new RangeError('"value" argument is out of bounds');if(Wt+er>Xt.length)throw new RangeError("Index out of range")}at.prototype.writeUintLE=at.prototype.writeUIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=1,pr=0;for(this[Wt]=Gt&255;++pr<er&&(ur*=256);)this[Wt+pr]=Gt/ur&255;return Wt+er},at.prototype.writeUintBE=at.prototype.writeUIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=er-1,pr=1;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)this[Wt+ur]=Gt/pr&255;return Wt+er},at.prototype.writeUint8=at.prototype.writeUInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,255,0),this[Wt]=Gt&255,Wt+1},at.prototype.writeUint16LE=at.prototype.writeUInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeUint16BE=at.prototype.writeUInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeUint32LE=at.prototype.writeUInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt+3]=Gt>>>24,this[Wt+2]=Gt>>>16,this[Wt+1]=Gt>>>8,this[Wt]=Gt&255,Wt+4},at.prototype.writeUint32BE=at.prototype.writeUInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4};function Ft(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,Wt}function _t(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt+7]=ur,ur=ur>>8,Xt[Wt+6]=ur,ur=ur>>8,Xt[Wt+5]=ur,ur=ur>>8,Xt[Wt+4]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt+3]=pr,pr=pr>>8,Xt[Wt+2]=pr,pr=pr>>8,Xt[Wt+1]=pr,pr=pr>>8,Xt[Wt]=pr,Wt+8}at.prototype.writeBigUInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeBigUInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=0,pr=1,yr=0;for(this[Wt]=Gt&255;++ur<er&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur-1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=er-1,pr=1,yr=0;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur+1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,127,-128),Gt<0&&(Gt=255+Gt+1),this[Wt]=Gt&255,Wt+1},at.prototype.writeInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,this[Wt+2]=Gt>>>16,this[Wt+3]=Gt>>>24,Wt+4},at.prototype.writeInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),Gt<0&&(Gt=4294967295+Gt+1),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4},at.prototype.writeBigInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),at.prototype.writeBigInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Nt(Xt,Gt,Wt,er,lr,ur){if(Wt+er>Xt.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("Index out of range")}function Mt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,4),$.write(Xt,Gt,Wt,er,23,4),Wt+4}at.prototype.writeFloatLE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!0,er)},at.prototype.writeFloatBE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!1,er)};function Lt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,8),$.write(Xt,Gt,Wt,er,52,8),Wt+8}at.prototype.writeDoubleLE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!0,er)},at.prototype.writeDoubleBE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!1,er)},at.prototype.copy=function(Gt,Wt,er,lr){if(!at.isBuffer(Gt))throw new TypeError("argument should be a Buffer");if(er||(er=0),!lr&&lr!==0&&(lr=this.length),Wt>=Gt.length&&(Wt=Gt.length),Wt||(Wt=0),lr>0&&lr<er&&(lr=er),lr===er||Gt.length===0||this.length===0)return 0;if(Wt<0)throw new RangeError("targetStart out of bounds");if(er<0||er>=this.length)throw new RangeError("Index out of range");if(lr<0)throw new RangeError("sourceEnd out of bounds");lr>this.length&&(lr=this.length),Gt.length-Wt<lr-er&&(lr=Gt.length-Wt+er);const ur=lr-er;return this===Gt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Wt,er,lr):Uint8Array.prototype.set.call(Gt,this.subarray(er,lr),Wt),ur},at.prototype.fill=function(Gt,Wt,er,lr){if(typeof Gt=="string"){if(typeof Wt=="string"?(lr=Wt,Wt=0,er=this.length):typeof er=="string"&&(lr=er,er=this.length),lr!==void 0&&typeof lr!="string")throw new TypeError("encoding must be a string");if(typeof lr=="string"&&!at.isEncoding(lr))throw new TypeError("Unknown encoding: "+lr);if(Gt.length===1){const pr=Gt.charCodeAt(0);(lr==="utf8"&&pr<128||lr==="latin1")&&(Gt=pr)}}else typeof Gt=="number"?Gt=Gt&255:typeof Gt=="boolean"&&(Gt=Number(Gt));if(Wt<0||this.length<Wt||this.length<er)throw new RangeError("Out of range index");if(er<=Wt)return this;Wt=Wt>>>0,er=er===void 0?this.length:er>>>0,Gt||(Gt=0);let ur;if(typeof Gt=="number")for(ur=Wt;ur<er;++ur)this[ur]=Gt;else{const pr=at.isBuffer(Gt)?Gt:at.from(Gt,lr),yr=pr.length;if(yr===0)throw new TypeError('The value "'+Gt+'" is invalid for argument "value"');for(ur=0;ur<er-Wt;++ur)this[ur+Wt]=pr[ur%yr]}return this};const $t={};function Pt(Xt,Gt,Wt){$t[Xt]=class extends Wt{constructor(){super(),Object.defineProperty(this,"message",{value:Gt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Xt}]`,this.stack,delete this.name}get code(){return Xt}set code(lr){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:lr,writable:!0})}toString(){return`${this.name} [${Xt}]: ${this.message}`}}}Pt("ERR_BUFFER_OUT_OF_BOUNDS",function(Xt){return Xt?`${Xt} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pt("ERR_INVALID_ARG_TYPE",function(Xt,Gt){return`The "${Xt}" argument must be of type number. Received type ${typeof Gt}`},TypeError),Pt("ERR_OUT_OF_RANGE",function(Xt,Gt,Wt){let er=`The value of "${Xt}" is out of range.`,lr=Wt;return Number.isInteger(Wt)&&Math.abs(Wt)>2**32?lr=Dt(String(Wt)):typeof Wt=="bigint"&&(lr=String(Wt),(Wt>BigInt(2)**BigInt(32)||Wt<-(BigInt(2)**BigInt(32)))&&(lr=Dt(lr)),lr+="n"),er+=` It must be ${Gt}. Received ${lr}`,er},RangeError);function Dt(Xt){let Gt="",Wt=Xt.length;const er=Xt[0]==="-"?1:0;for(;Wt>=er+4;Wt-=3)Gt=`_${Xt.slice(Wt-3,Wt)}${Gt}`;return`${Xt.slice(0,Wt)}${Gt}`}function Ut(Xt,Gt,Wt){Qt(Gt,"offset"),(Xt[Gt]===void 0||Xt[Gt+Wt]===void 0)&&qt(Gt,Xt.length-(Wt+1))}function Vt(Xt,Gt,Wt,er,lr,ur){if(Xt>Wt||Xt<Gt){const pr=typeof Gt=="bigint"?"n":"";let yr;throw ur>3?Gt===0||Gt===BigInt(0)?yr=`>= 0${pr} and < 2${pr} ** ${(ur+1)*8}${pr}`:yr=`>= -(2${pr} ** ${(ur+1)*8-1}${pr}) and < 2 ** ${(ur+1)*8-1}${pr}`:yr=`>= ${Gt}${pr} and <= ${Wt}${pr}`,new $t.ERR_OUT_OF_RANGE("value",yr,Xt)}Ut(er,lr,ur)}function Qt(Xt,Gt){if(typeof Xt!="number")throw new $t.ERR_INVALID_ARG_TYPE(Gt,"number",Xt)}function qt(Xt,Gt,Wt){throw Math.floor(Xt)!==Xt?(Qt(Xt,Wt),new $t.ERR_OUT_OF_RANGE(Wt||"offset","an integer",Xt)):Gt<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE(Wt||"offset",`>= ${Wt?1:0} and <= ${Gt}`,Xt)}const Zt=/[^+/0-9A-Za-z-_]/g;function ar(Xt){if(Xt=Xt.split("=")[0],Xt=Xt.trim().replace(Zt,""),Xt.length<2)return"";for(;Xt.length%4!==0;)Xt=Xt+"=";return Xt}function Jt(Xt,Gt){Gt=Gt||1/0;let Wt;const er=Xt.length;let lr=null;const ur=[];for(let pr=0;pr<er;++pr){if(Wt=Xt.charCodeAt(pr),Wt>55295&&Wt<57344){if(!lr){if(Wt>56319){(Gt-=3)>-1&&ur.push(239,191,189);continue}else if(pr+1===er){(Gt-=3)>-1&&ur.push(239,191,189);continue}lr=Wt;continue}if(Wt<56320){(Gt-=3)>-1&&ur.push(239,191,189),lr=Wt;continue}Wt=(lr-55296<<10|Wt-56320)+65536}else lr&&(Gt-=3)>-1&&ur.push(239,191,189);if(lr=null,Wt<128){if((Gt-=1)<0)break;ur.push(Wt)}else if(Wt<2048){if((Gt-=2)<0)break;ur.push(Wt>>6|192,Wt&63|128)}else if(Wt<65536){if((Gt-=3)<0)break;ur.push(Wt>>12|224,Wt>>6&63|128,Wt&63|128)}else if(Wt<1114112){if((Gt-=4)<0)break;ur.push(Wt>>18|240,Wt>>12&63|128,Wt>>6&63|128,Wt&63|128)}else throw new Error("Invalid code point")}return ur}function rr(Xt){const Gt=[];for(let Wt=0;Wt<Xt.length;++Wt)Gt.push(Xt.charCodeAt(Wt)&255);return Gt}function Yt(Xt,Gt){let Wt,er,lr;const ur=[];for(let pr=0;pr<Xt.length&&!((Gt-=2)<0);++pr)Wt=Xt.charCodeAt(pr),er=Wt>>8,lr=Wt%256,ur.push(lr),ur.push(er);return ur}function Kt(Xt){return s.toByteArray(ar(Xt))}function nr(Xt,Gt,Wt,er){let lr;for(lr=0;lr<er&&!(lr+Wt>=Gt.length||lr>=Xt.length);++lr)Gt[lr+Wt]=Xt[lr];return lr}function tr(Xt,Gt){return Xt instanceof Gt||Xt!=null&&Xt.constructor!=null&&Xt.constructor.name!=null&&Xt.constructor.name===Gt.name}function ir(Xt){return Xt!==Xt}const sr=function(){const Xt="0123456789abcdef",Gt=new Array(256);for(let Wt=0;Wt<16;++Wt){const er=Wt*16;for(let lr=0;lr<16;++lr)Gt[er+lr]=Xt[Wt]+Xt[lr]}return Gt}();function cr(Xt){return typeof BigInt>"u"?or:Xt}function or(){throw new Error("BigInt not supported")}})(buffer$1);const langs=["en","zh","ja","ko","ar","th","pl","it","de","es","fr"],Lang=z.enum(langs);z.object({cancel:z.string(),field:z.string(),fieldName:z.string(),align:z.string(),width:z.string(),opacity:z.string(),height:z.string(),rotate:z.string(),edit:z.string(),plsInputName:z.string(),fieldMustUniq:z.string(),notUniq:z.string(),noKeyName:z.string(),fieldsList:z.string(),editField:z.string(),type:z.string(),errorOccurred:z.string(),errorBulkUpdateFieldName:z.string(),commitBulkUpdateFieldName:z.string(),bulkUpdateFieldName:z.string(),addPageAfter:z.string(),removePage:z.string(),removePageConfirm:z.string(),hexColorPrompt:z.string(),"schemas.color":z.string(),"schemas.borderWidth":z.string(),"schemas.borderColor":z.string(),"schemas.backgroundColor":z.string(),"schemas.textColor":z.string(),"schemas.bgColor":z.string(),"schemas.horizontal":z.string(),"schemas.vertical":z.string(),"schemas.left":z.string(),"schemas.center":z.string(),"schemas.right":z.string(),"schemas.top":z.string(),"schemas.middle":z.string(),"schemas.bottom":z.string(),"schemas.padding":z.string(),"schemas.text.fontName":z.string(),"schemas.text.size":z.string(),"schemas.text.spacing":z.string(),"schemas.text.textAlign":z.string(),"schemas.text.verticalAlign":z.string(),"schemas.text.lineHeight":z.string(),"schemas.text.min":z.string(),"schemas.text.max":z.string(),"schemas.text.fit":z.string(),"schemas.text.dynamicFontSize":z.string(),"schemas.barcodes.barColor":z.string(),"schemas.barcodes.includetext":z.string(),"schemas.table.alternateBackgroundColor":z.string(),"schemas.table.tableStyle":z.string(),"schemas.table.headStyle":z.string(),"schemas.table.bodyStyle":z.string(),"schemas.table.columnStyle":z.string()}),z.enum(["viewer","form","designer"]);const ColorType=z.enum(["rgb","cmyk"]).optional();z.object({height:z.number(),width:z.number()});const Schema$1=z.object({type:z.string(),icon:z.string().optional(),content:z.string().optional(),position:z.object({x:z.number(),y:z.number()}),width:z.number(),height:z.number(),rotate:z.number().optional(),opacity:z.number().optional(),readOnly:z.boolean().optional()}).passthrough(),SchemaForUIAdditionalInfo=z.object({id:z.string(),key:z.string()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=z.any().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=z.any().refine(a=>a instanceof Uint8Array),BlankPdf=z.object({width:z.number(),height:z.number(),padding:z.tuple([z.number(),z.number(),z.number(),z.number()])}),BasePdf=z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema,BlankPdf]),Template=z.object({schemas:z.array(z.record(Schema$1)),basePdf:BasePdf,pdfmeVersion:z.string().optional()}).passthrough(),Inputs=z.array(z.record(z.any())).min(1),Font=z.record(z.object({data:z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema]),fallback:z.boolean().optional(),subset:z.boolean().optional()})),CommonOptions=z.object({font:Font.optional()}).passthrough(),CommonProps=z.object({template:Template,options:CommonOptions.optional(),plugins:z.record(z.object({ui:z.any(),pdf:z.any(),propPanel:z.any()})).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:z.string().optional(),creationDate:z.date().optional(),creator:z.string().optional(),keywords:z.array(z.string()).optional(),language:z.string().optional(),modificationDate:z.date().optional(),producer:z.string().optional(),subject:z.string().optional(),title:z.string().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:z.record(z.string(),z.string()).optional(),theme:z.record(z.string(),z.unknown()).optional()}),HTMLElementSchema=z.any().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const s="",$=Object.entries(a).reduce((_,_e)=>{const[tt,nt]=_e;return!_&&nt.fallback?tt:_},s);if($===s)throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return $},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>{const s=.26458333333333;return parseFloat(String(a))*s},blob2Base64Pdf=a=>new Promise((s,$)=>{const _=new FileReader;_.onloadend=()=>{_.result.startsWith("data:application/pdf;")?s(_.result):$(Error("[@pdfme/common] template.basePdf must be pdf data."))},_.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),getB64BasePdf=a=>typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"?fetch(a).then($=>$.blob()).then(blob2Base64Pdf).catch($=>{throw $}):a,isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>buffer$1.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,$=getByteString(s),_=new Uint8Array($.length);for(let _e=0;_e<$.length;_e+=1)_[_e]=$.charCodeAt(_e);return _},getFontNamesInSchemas=a=>uniq(a.map(s=>Object.values(s).map($=>$.fontName??"")).reduce((s,$)=>s.concat($),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:$}}=a,_e=Object.values(s).reduce((at,ot)=>ot.fallback?at+1:at,0);if(_e===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
42
|
+
*/(function(a){const s=base64Js,$=ieee754,_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=at,a.SlowBuffer=gt,a.INSPECT_MAX_BYTES=50;const _e=2147483647;a.kMaxLength=_e,at.TYPED_ARRAY_SUPPORT=tt(),!at.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function tt(){try{const Xt=new Uint8Array(1),Gt={foo:function(){return 42}};return Object.setPrototypeOf(Gt,Uint8Array.prototype),Object.setPrototypeOf(Xt,Gt),Xt.foo()===42}catch{return!1}}Object.defineProperty(at.prototype,"parent",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.buffer}}),Object.defineProperty(at.prototype,"offset",{enumerable:!0,get:function(){if(at.isBuffer(this))return this.byteOffset}});function nt(Xt){if(Xt>_e)throw new RangeError('The value "'+Xt+'" is invalid for option "size"');const Gt=new Uint8Array(Xt);return Object.setPrototypeOf(Gt,at.prototype),Gt}function at(Xt,Gt,Wt){if(typeof Xt=="number"){if(typeof Gt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lt(Xt)}return ot(Xt,Gt,Wt)}at.poolSize=8192;function ot(Xt,Gt,Wt){if(typeof Xt=="string")return et(Xt,Gt);if(ArrayBuffer.isView(Xt))return ut(Xt);if(Xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt);if(tr(Xt,ArrayBuffer)||Xt&&tr(Xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(tr(Xt,SharedArrayBuffer)||Xt&&tr(Xt.buffer,SharedArrayBuffer)))return ft(Xt,Gt,Wt);if(typeof Xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const er=Xt.valueOf&&Xt.valueOf();if(er!=null&&er!==Xt)return at.from(er,Gt,Wt);const lr=ht(Xt);if(lr)return lr;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Xt[Symbol.toPrimitive]=="function")return at.from(Xt[Symbol.toPrimitive]("string"),Gt,Wt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Xt)}at.from=function(Xt,Gt,Wt){return ot(Xt,Gt,Wt)},Object.setPrototypeOf(at.prototype,Uint8Array.prototype),Object.setPrototypeOf(at,Uint8Array);function rt(Xt){if(typeof Xt!="number")throw new TypeError('"size" argument must be of type number');if(Xt<0)throw new RangeError('The value "'+Xt+'" is invalid for option "size"')}function st(Xt,Gt,Wt){return rt(Xt),Xt<=0?nt(Xt):Gt!==void 0?typeof Wt=="string"?nt(Xt).fill(Gt,Wt):nt(Xt).fill(Gt):nt(Xt)}at.alloc=function(Xt,Gt,Wt){return st(Xt,Gt,Wt)};function lt(Xt){return rt(Xt),nt(Xt<0?0:dt(Xt)|0)}at.allocUnsafe=function(Xt){return lt(Xt)},at.allocUnsafeSlow=function(Xt){return lt(Xt)};function et(Xt,Gt){if((typeof Gt!="string"||Gt==="")&&(Gt="utf8"),!at.isEncoding(Gt))throw new TypeError("Unknown encoding: "+Gt);const Wt=pt(Xt,Gt)|0;let er=nt(Wt);const lr=er.write(Xt,Gt);return lr!==Wt&&(er=er.slice(0,lr)),er}function it(Xt){const Gt=Xt.length<0?0:dt(Xt.length)|0,Wt=nt(Gt);for(let er=0;er<Gt;er+=1)Wt[er]=Xt[er]&255;return Wt}function ut(Xt){if(tr(Xt,Uint8Array)){const Gt=new Uint8Array(Xt);return ft(Gt.buffer,Gt.byteOffset,Gt.byteLength)}return it(Xt)}function ft(Xt,Gt,Wt){if(Gt<0||Xt.byteLength<Gt)throw new RangeError('"offset" is outside of buffer bounds');if(Xt.byteLength<Gt+(Wt||0))throw new RangeError('"length" is outside of buffer bounds');let er;return Gt===void 0&&Wt===void 0?er=new Uint8Array(Xt):Wt===void 0?er=new Uint8Array(Xt,Gt):er=new Uint8Array(Xt,Gt,Wt),Object.setPrototypeOf(er,at.prototype),er}function ht(Xt){if(at.isBuffer(Xt)){const Gt=dt(Xt.length)|0,Wt=nt(Gt);return Wt.length===0||Xt.copy(Wt,0,0,Gt),Wt}if(Xt.length!==void 0)return typeof Xt.length!="number"||ir(Xt.length)?nt(0):it(Xt);if(Xt.type==="Buffer"&&Array.isArray(Xt.data))return it(Xt.data)}function dt(Xt){if(Xt>=_e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_e.toString(16)+" bytes");return Xt|0}function gt(Xt){return+Xt!=Xt&&(Xt=0),at.alloc(+Xt)}at.isBuffer=function(Gt){return Gt!=null&&Gt._isBuffer===!0&&Gt!==at.prototype},at.compare=function(Gt,Wt){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),tr(Wt,Uint8Array)&&(Wt=at.from(Wt,Wt.offset,Wt.byteLength)),!at.isBuffer(Gt)||!at.isBuffer(Wt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Gt===Wt)return 0;let er=Gt.length,lr=Wt.length;for(let ur=0,pr=Math.min(er,lr);ur<pr;++ur)if(Gt[ur]!==Wt[ur]){er=Gt[ur],lr=Wt[ur];break}return er<lr?-1:lr<er?1:0},at.isEncoding=function(Gt){switch(String(Gt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},at.concat=function(Gt,Wt){if(!Array.isArray(Gt))throw new TypeError('"list" argument must be an Array of Buffers');if(Gt.length===0)return at.alloc(0);let er;if(Wt===void 0)for(Wt=0,er=0;er<Gt.length;++er)Wt+=Gt[er].length;const lr=at.allocUnsafe(Wt);let ur=0;for(er=0;er<Gt.length;++er){let pr=Gt[er];if(tr(pr,Uint8Array))ur+pr.length>lr.length?(at.isBuffer(pr)||(pr=at.from(pr)),pr.copy(lr,ur)):Uint8Array.prototype.set.call(lr,pr,ur);else if(at.isBuffer(pr))pr.copy(lr,ur);else throw new TypeError('"list" argument must be an Array of Buffers');ur+=pr.length}return lr};function pt(Xt,Gt){if(at.isBuffer(Xt))return Xt.length;if(ArrayBuffer.isView(Xt)||tr(Xt,ArrayBuffer))return Xt.byteLength;if(typeof Xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Xt);const Wt=Xt.length,er=arguments.length>2&&arguments[2]===!0;if(!er&&Wt===0)return 0;let lr=!1;for(;;)switch(Gt){case"ascii":case"latin1":case"binary":return Wt;case"utf8":case"utf-8":return Jt(Xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt*2;case"hex":return Wt>>>1;case"base64":return Kt(Xt).length;default:if(lr)return er?-1:Jt(Xt).length;Gt=(""+Gt).toLowerCase(),lr=!0}}at.byteLength=pt;function mt(Xt,Gt,Wt){let er=!1;if((Gt===void 0||Gt<0)&&(Gt=0),Gt>this.length||((Wt===void 0||Wt>this.length)&&(Wt=this.length),Wt<=0)||(Wt>>>=0,Gt>>>=0,Wt<=Gt))return"";for(Xt||(Xt="utf8");;)switch(Xt){case"hex":return Rt(this,Gt,Wt);case"utf8":case"utf-8":return Tt(this,Gt,Wt);case"ascii":return It(this,Gt,Wt);case"latin1":case"binary":return yt(this,Gt,Wt);case"base64":return Ot(this,Gt,Wt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return kt(this,Gt,Wt);default:if(er)throw new TypeError("Unknown encoding: "+Xt);Xt=(Xt+"").toLowerCase(),er=!0}}at.prototype._isBuffer=!0;function ct(Xt,Gt,Wt){const er=Xt[Gt];Xt[Gt]=Xt[Wt],Xt[Wt]=er}at.prototype.swap16=function(){const Gt=this.length;if(Gt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Wt=0;Wt<Gt;Wt+=2)ct(this,Wt,Wt+1);return this},at.prototype.swap32=function(){const Gt=this.length;if(Gt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Wt=0;Wt<Gt;Wt+=4)ct(this,Wt,Wt+3),ct(this,Wt+1,Wt+2);return this},at.prototype.swap64=function(){const Gt=this.length;if(Gt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Wt=0;Wt<Gt;Wt+=8)ct(this,Wt,Wt+7),ct(this,Wt+1,Wt+6),ct(this,Wt+2,Wt+5),ct(this,Wt+3,Wt+4);return this},at.prototype.toString=function(){const Gt=this.length;return Gt===0?"":arguments.length===0?Tt(this,0,Gt):mt.apply(this,arguments)},at.prototype.toLocaleString=at.prototype.toString,at.prototype.equals=function(Gt){if(!at.isBuffer(Gt))throw new TypeError("Argument must be a Buffer");return this===Gt?!0:at.compare(this,Gt)===0},at.prototype.inspect=function(){let Gt="";const Wt=a.INSPECT_MAX_BYTES;return Gt=this.toString("hex",0,Wt).replace(/(.{2})/g,"$1 ").trim(),this.length>Wt&&(Gt+=" ... "),"<Buffer "+Gt+">"},_&&(at.prototype[_]=at.prototype.inspect),at.prototype.compare=function(Gt,Wt,er,lr,ur){if(tr(Gt,Uint8Array)&&(Gt=at.from(Gt,Gt.offset,Gt.byteLength)),!at.isBuffer(Gt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Gt);if(Wt===void 0&&(Wt=0),er===void 0&&(er=Gt?Gt.length:0),lr===void 0&&(lr=0),ur===void 0&&(ur=this.length),Wt<0||er>Gt.length||lr<0||ur>this.length)throw new RangeError("out of range index");if(lr>=ur&&Wt>=er)return 0;if(lr>=ur)return-1;if(Wt>=er)return 1;if(Wt>>>=0,er>>>=0,lr>>>=0,ur>>>=0,this===Gt)return 0;let pr=ur-lr,yr=er-Wt;const Er=Math.min(pr,yr),br=this.slice(lr,ur),gr=Gt.slice(Wt,er);for(let Ar=0;Ar<Er;++Ar)if(br[Ar]!==gr[Ar]){pr=br[Ar],yr=gr[Ar];break}return pr<yr?-1:yr<pr?1:0};function vt(Xt,Gt,Wt,er,lr){if(Xt.length===0)return-1;if(typeof Wt=="string"?(er=Wt,Wt=0):Wt>2147483647?Wt=2147483647:Wt<-2147483648&&(Wt=-2147483648),Wt=+Wt,ir(Wt)&&(Wt=lr?0:Xt.length-1),Wt<0&&(Wt=Xt.length+Wt),Wt>=Xt.length){if(lr)return-1;Wt=Xt.length-1}else if(Wt<0)if(lr)Wt=0;else return-1;if(typeof Gt=="string"&&(Gt=at.from(Gt,er)),at.isBuffer(Gt))return Gt.length===0?-1:At(Xt,Gt,Wt,er,lr);if(typeof Gt=="number")return Gt=Gt&255,typeof Uint8Array.prototype.indexOf=="function"?lr?Uint8Array.prototype.indexOf.call(Xt,Gt,Wt):Uint8Array.prototype.lastIndexOf.call(Xt,Gt,Wt):At(Xt,[Gt],Wt,er,lr);throw new TypeError("val must be string, number or Buffer")}function At(Xt,Gt,Wt,er,lr){let ur=1,pr=Xt.length,yr=Gt.length;if(er!==void 0&&(er=String(er).toLowerCase(),er==="ucs2"||er==="ucs-2"||er==="utf16le"||er==="utf-16le")){if(Xt.length<2||Gt.length<2)return-1;ur=2,pr/=2,yr/=2,Wt/=2}function Er(gr,Ar){return ur===1?gr[Ar]:gr.readUInt16BE(Ar*ur)}let br;if(lr){let gr=-1;for(br=Wt;br<pr;br++)if(Er(Xt,br)===Er(Gt,gr===-1?0:br-gr)){if(gr===-1&&(gr=br),br-gr+1===yr)return gr*ur}else gr!==-1&&(br-=br-gr),gr=-1}else for(Wt+yr>pr&&(Wt=pr-yr),br=Wt;br>=0;br--){let gr=!0;for(let Ar=0;Ar<yr;Ar++)if(Er(Xt,br+Ar)!==Er(Gt,Ar)){gr=!1;break}if(gr)return br}return-1}at.prototype.includes=function(Gt,Wt,er){return this.indexOf(Gt,Wt,er)!==-1},at.prototype.indexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!0)},at.prototype.lastIndexOf=function(Gt,Wt,er){return vt(this,Gt,Wt,er,!1)};function xt(Xt,Gt,Wt,er){Wt=Number(Wt)||0;const lr=Xt.length-Wt;er?(er=Number(er),er>lr&&(er=lr)):er=lr;const ur=Gt.length;er>ur/2&&(er=ur/2);let pr;for(pr=0;pr<er;++pr){const yr=parseInt(Gt.substr(pr*2,2),16);if(ir(yr))return pr;Xt[Wt+pr]=yr}return pr}function bt(Xt,Gt,Wt,er){return nr(Jt(Gt,Xt.length-Wt),Xt,Wt,er)}function Et(Xt,Gt,Wt,er){return nr(rr(Gt),Xt,Wt,er)}function St(Xt,Gt,Wt,er){return nr(Kt(Gt),Xt,Wt,er)}function Bt(Xt,Gt,Wt,er){return nr(Yt(Gt,Xt.length-Wt),Xt,Wt,er)}at.prototype.write=function(Gt,Wt,er,lr){if(Wt===void 0)lr="utf8",er=this.length,Wt=0;else if(er===void 0&&typeof Wt=="string")lr=Wt,er=this.length,Wt=0;else if(isFinite(Wt))Wt=Wt>>>0,isFinite(er)?(er=er>>>0,lr===void 0&&(lr="utf8")):(lr=er,er=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ur=this.length-Wt;if((er===void 0||er>ur)&&(er=ur),Gt.length>0&&(er<0||Wt<0)||Wt>this.length)throw new RangeError("Attempt to write outside buffer bounds");lr||(lr="utf8");let pr=!1;for(;;)switch(lr){case"hex":return xt(this,Gt,Wt,er);case"utf8":case"utf-8":return bt(this,Gt,Wt,er);case"ascii":case"latin1":case"binary":return Et(this,Gt,Wt,er);case"base64":return St(this,Gt,Wt,er);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,Gt,Wt,er);default:if(pr)throw new TypeError("Unknown encoding: "+lr);lr=(""+lr).toLowerCase(),pr=!0}},at.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ot(Xt,Gt,Wt){return Gt===0&&Wt===Xt.length?s.fromByteArray(Xt):s.fromByteArray(Xt.slice(Gt,Wt))}function Tt(Xt,Gt,Wt){Wt=Math.min(Xt.length,Wt);const er=[];let lr=Gt;for(;lr<Wt;){const ur=Xt[lr];let pr=null,yr=ur>239?4:ur>223?3:ur>191?2:1;if(lr+yr<=Wt){let Er,br,gr,Ar;switch(yr){case 1:ur<128&&(pr=ur);break;case 2:Er=Xt[lr+1],(Er&192)===128&&(Ar=(ur&31)<<6|Er&63,Ar>127&&(pr=Ar));break;case 3:Er=Xt[lr+1],br=Xt[lr+2],(Er&192)===128&&(br&192)===128&&(Ar=(ur&15)<<12|(Er&63)<<6|br&63,Ar>2047&&(Ar<55296||Ar>57343)&&(pr=Ar));break;case 4:Er=Xt[lr+1],br=Xt[lr+2],gr=Xt[lr+3],(Er&192)===128&&(br&192)===128&&(gr&192)===128&&(Ar=(ur&15)<<18|(Er&63)<<12|(br&63)<<6|gr&63,Ar>65535&&Ar<1114112&&(pr=Ar))}}pr===null?(pr=65533,yr=1):pr>65535&&(pr-=65536,er.push(pr>>>10&1023|55296),pr=56320|pr&1023),er.push(pr),lr+=yr}return Ct(er)}const wt=4096;function Ct(Xt){const Gt=Xt.length;if(Gt<=wt)return String.fromCharCode.apply(String,Xt);let Wt="",er=0;for(;er<Gt;)Wt+=String.fromCharCode.apply(String,Xt.slice(er,er+=wt));return Wt}function It(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]&127);return er}function yt(Xt,Gt,Wt){let er="";Wt=Math.min(Xt.length,Wt);for(let lr=Gt;lr<Wt;++lr)er+=String.fromCharCode(Xt[lr]);return er}function Rt(Xt,Gt,Wt){const er=Xt.length;(!Gt||Gt<0)&&(Gt=0),(!Wt||Wt<0||Wt>er)&&(Wt=er);let lr="";for(let ur=Gt;ur<Wt;++ur)lr+=sr[Xt[ur]];return lr}function kt(Xt,Gt,Wt){const er=Xt.slice(Gt,Wt);let lr="";for(let ur=0;ur<er.length-1;ur+=2)lr+=String.fromCharCode(er[ur]+er[ur+1]*256);return lr}at.prototype.slice=function(Gt,Wt){const er=this.length;Gt=~~Gt,Wt=Wt===void 0?er:~~Wt,Gt<0?(Gt+=er,Gt<0&&(Gt=0)):Gt>er&&(Gt=er),Wt<0?(Wt+=er,Wt<0&&(Wt=0)):Wt>er&&(Wt=er),Wt<Gt&&(Wt=Gt);const lr=this.subarray(Gt,Wt);return Object.setPrototypeOf(lr,at.prototype),lr};function jt(Xt,Gt,Wt){if(Xt%1!==0||Xt<0)throw new RangeError("offset is not uint");if(Xt+Gt>Wt)throw new RangeError("Trying to access beyond buffer length")}at.prototype.readUintLE=at.prototype.readUIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return lr},at.prototype.readUintBE=at.prototype.readUIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt+--Wt],ur=1;for(;Wt>0&&(ur*=256);)lr+=this[Gt+--Wt]*ur;return lr},at.prototype.readUint8=at.prototype.readUInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]},at.prototype.readUint16LE=at.prototype.readUInt16LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]|this[Gt+1]<<8},at.prototype.readUint16BE=at.prototype.readUInt16BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,2,this.length),this[Gt]<<8|this[Gt+1]},at.prototype.readUint32LE=at.prototype.readUInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),(this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16)+this[Gt+3]*16777216},at.prototype.readUint32BE=at.prototype.readUInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]*16777216+(this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3])},at.prototype.readBigUInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24,ur=this[++Gt]+this[++Gt]*2**8+this[++Gt]*2**16+er*2**24;return BigInt(lr)+(BigInt(ur)<<BigInt(32))}),at.prototype.readBigUInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=Wt*2**24+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt],ur=this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er;return(BigInt(lr)<<BigInt(32))+BigInt(ur)}),at.prototype.readIntLE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=this[Gt],ur=1,pr=0;for(;++pr<Wt&&(ur*=256);)lr+=this[Gt+pr]*ur;return ur*=128,lr>=ur&&(lr-=Math.pow(2,8*Wt)),lr},at.prototype.readIntBE=function(Gt,Wt,er){Gt=Gt>>>0,Wt=Wt>>>0,er||jt(Gt,Wt,this.length);let lr=Wt,ur=1,pr=this[Gt+--lr];for(;lr>0&&(ur*=256);)pr+=this[Gt+--lr]*ur;return ur*=128,pr>=ur&&(pr-=Math.pow(2,8*Wt)),pr},at.prototype.readInt8=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,1,this.length),this[Gt]&128?(255-this[Gt]+1)*-1:this[Gt]},at.prototype.readInt16LE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt]|this[Gt+1]<<8;return er&32768?er|4294901760:er},at.prototype.readInt16BE=function(Gt,Wt){Gt=Gt>>>0,Wt||jt(Gt,2,this.length);const er=this[Gt+1]|this[Gt]<<8;return er&32768?er|4294901760:er},at.prototype.readInt32LE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]|this[Gt+1]<<8|this[Gt+2]<<16|this[Gt+3]<<24},at.prototype.readInt32BE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),this[Gt]<<24|this[Gt+1]<<16|this[Gt+2]<<8|this[Gt+3]},at.prototype.readBigInt64LE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=this[Gt+4]+this[Gt+5]*2**8+this[Gt+6]*2**16+(er<<24);return(BigInt(lr)<<BigInt(32))+BigInt(Wt+this[++Gt]*2**8+this[++Gt]*2**16+this[++Gt]*2**24)}),at.prototype.readBigInt64BE=cr(function(Gt){Gt=Gt>>>0,Qt(Gt,"offset");const Wt=this[Gt],er=this[Gt+7];(Wt===void 0||er===void 0)&&qt(Gt,this.length-8);const lr=(Wt<<24)+this[++Gt]*2**16+this[++Gt]*2**8+this[++Gt];return(BigInt(lr)<<BigInt(32))+BigInt(this[++Gt]*2**24+this[++Gt]*2**16+this[++Gt]*2**8+er)}),at.prototype.readFloatLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!0,23,4)},at.prototype.readFloatBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,4,this.length),$.read(this,Gt,!1,23,4)},at.prototype.readDoubleLE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!0,52,8)},at.prototype.readDoubleBE=function(Gt,Wt){return Gt=Gt>>>0,Wt||jt(Gt,8,this.length),$.read(this,Gt,!1,52,8)};function Ht(Xt,Gt,Wt,er,lr,ur){if(!at.isBuffer(Xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(Gt>lr||Gt<ur)throw new RangeError('"value" argument is out of bounds');if(Wt+er>Xt.length)throw new RangeError("Index out of range")}at.prototype.writeUintLE=at.prototype.writeUIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=1,pr=0;for(this[Wt]=Gt&255;++pr<er&&(ur*=256);)this[Wt+pr]=Gt/ur&255;return Wt+er},at.prototype.writeUintBE=at.prototype.writeUIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,er=er>>>0,!lr){const yr=Math.pow(2,8*er)-1;Ht(this,Gt,Wt,er,yr,0)}let ur=er-1,pr=1;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)this[Wt+ur]=Gt/pr&255;return Wt+er},at.prototype.writeUint8=at.prototype.writeUInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,255,0),this[Wt]=Gt&255,Wt+1},at.prototype.writeUint16LE=at.prototype.writeUInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeUint16BE=at.prototype.writeUInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,65535,0),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeUint32LE=at.prototype.writeUInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt+3]=Gt>>>24,this[Wt+2]=Gt>>>16,this[Wt+1]=Gt>>>8,this[Wt]=Gt&255,Wt+4},at.prototype.writeUint32BE=at.prototype.writeUInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,4294967295,0),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4};function Ft(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur,ur=ur>>8,Xt[Wt++]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,pr=pr>>8,Xt[Wt++]=pr,Wt}function _t(Xt,Gt,Wt,er,lr){Vt(Gt,er,lr,Xt,Wt,7);let ur=Number(Gt&BigInt(4294967295));Xt[Wt+7]=ur,ur=ur>>8,Xt[Wt+6]=ur,ur=ur>>8,Xt[Wt+5]=ur,ur=ur>>8,Xt[Wt+4]=ur;let pr=Number(Gt>>BigInt(32)&BigInt(4294967295));return Xt[Wt+3]=pr,pr=pr>>8,Xt[Wt+2]=pr,pr=pr>>8,Xt[Wt+1]=pr,pr=pr>>8,Xt[Wt]=pr,Wt+8}at.prototype.writeBigUInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeBigUInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,BigInt(0),BigInt("0xffffffffffffffff"))}),at.prototype.writeIntLE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=0,pr=1,yr=0;for(this[Wt]=Gt&255;++ur<er&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur-1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeIntBE=function(Gt,Wt,er,lr){if(Gt=+Gt,Wt=Wt>>>0,!lr){const Er=Math.pow(2,8*er-1);Ht(this,Gt,Wt,er,Er-1,-Er)}let ur=er-1,pr=1,yr=0;for(this[Wt+ur]=Gt&255;--ur>=0&&(pr*=256);)Gt<0&&yr===0&&this[Wt+ur+1]!==0&&(yr=1),this[Wt+ur]=(Gt/pr>>0)-yr&255;return Wt+er},at.prototype.writeInt8=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,1,127,-128),Gt<0&&(Gt=255+Gt+1),this[Wt]=Gt&255,Wt+1},at.prototype.writeInt16LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,Wt+2},at.prototype.writeInt16BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,2,32767,-32768),this[Wt]=Gt>>>8,this[Wt+1]=Gt&255,Wt+2},at.prototype.writeInt32LE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),this[Wt]=Gt&255,this[Wt+1]=Gt>>>8,this[Wt+2]=Gt>>>16,this[Wt+3]=Gt>>>24,Wt+4},at.prototype.writeInt32BE=function(Gt,Wt,er){return Gt=+Gt,Wt=Wt>>>0,er||Ht(this,Gt,Wt,4,2147483647,-2147483648),Gt<0&&(Gt=4294967295+Gt+1),this[Wt]=Gt>>>24,this[Wt+1]=Gt>>>16,this[Wt+2]=Gt>>>8,this[Wt+3]=Gt&255,Wt+4},at.prototype.writeBigInt64LE=cr(function(Gt,Wt=0){return Ft(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),at.prototype.writeBigInt64BE=cr(function(Gt,Wt=0){return _t(this,Gt,Wt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Nt(Xt,Gt,Wt,er,lr,ur){if(Wt+er>Xt.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("Index out of range")}function Mt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,4),$.write(Xt,Gt,Wt,er,23,4),Wt+4}at.prototype.writeFloatLE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!0,er)},at.prototype.writeFloatBE=function(Gt,Wt,er){return Mt(this,Gt,Wt,!1,er)};function Lt(Xt,Gt,Wt,er,lr){return Gt=+Gt,Wt=Wt>>>0,lr||Nt(Xt,Gt,Wt,8),$.write(Xt,Gt,Wt,er,52,8),Wt+8}at.prototype.writeDoubleLE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!0,er)},at.prototype.writeDoubleBE=function(Gt,Wt,er){return Lt(this,Gt,Wt,!1,er)},at.prototype.copy=function(Gt,Wt,er,lr){if(!at.isBuffer(Gt))throw new TypeError("argument should be a Buffer");if(er||(er=0),!lr&&lr!==0&&(lr=this.length),Wt>=Gt.length&&(Wt=Gt.length),Wt||(Wt=0),lr>0&&lr<er&&(lr=er),lr===er||Gt.length===0||this.length===0)return 0;if(Wt<0)throw new RangeError("targetStart out of bounds");if(er<0||er>=this.length)throw new RangeError("Index out of range");if(lr<0)throw new RangeError("sourceEnd out of bounds");lr>this.length&&(lr=this.length),Gt.length-Wt<lr-er&&(lr=Gt.length-Wt+er);const ur=lr-er;return this===Gt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Wt,er,lr):Uint8Array.prototype.set.call(Gt,this.subarray(er,lr),Wt),ur},at.prototype.fill=function(Gt,Wt,er,lr){if(typeof Gt=="string"){if(typeof Wt=="string"?(lr=Wt,Wt=0,er=this.length):typeof er=="string"&&(lr=er,er=this.length),lr!==void 0&&typeof lr!="string")throw new TypeError("encoding must be a string");if(typeof lr=="string"&&!at.isEncoding(lr))throw new TypeError("Unknown encoding: "+lr);if(Gt.length===1){const pr=Gt.charCodeAt(0);(lr==="utf8"&&pr<128||lr==="latin1")&&(Gt=pr)}}else typeof Gt=="number"?Gt=Gt&255:typeof Gt=="boolean"&&(Gt=Number(Gt));if(Wt<0||this.length<Wt||this.length<er)throw new RangeError("Out of range index");if(er<=Wt)return this;Wt=Wt>>>0,er=er===void 0?this.length:er>>>0,Gt||(Gt=0);let ur;if(typeof Gt=="number")for(ur=Wt;ur<er;++ur)this[ur]=Gt;else{const pr=at.isBuffer(Gt)?Gt:at.from(Gt,lr),yr=pr.length;if(yr===0)throw new TypeError('The value "'+Gt+'" is invalid for argument "value"');for(ur=0;ur<er-Wt;++ur)this[ur+Wt]=pr[ur%yr]}return this};const $t={};function Pt(Xt,Gt,Wt){$t[Xt]=class extends Wt{constructor(){super(),Object.defineProperty(this,"message",{value:Gt.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Xt}]`,this.stack,delete this.name}get code(){return Xt}set code(lr){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:lr,writable:!0})}toString(){return`${this.name} [${Xt}]: ${this.message}`}}}Pt("ERR_BUFFER_OUT_OF_BOUNDS",function(Xt){return Xt?`${Xt} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pt("ERR_INVALID_ARG_TYPE",function(Xt,Gt){return`The "${Xt}" argument must be of type number. Received type ${typeof Gt}`},TypeError),Pt("ERR_OUT_OF_RANGE",function(Xt,Gt,Wt){let er=`The value of "${Xt}" is out of range.`,lr=Wt;return Number.isInteger(Wt)&&Math.abs(Wt)>2**32?lr=Dt(String(Wt)):typeof Wt=="bigint"&&(lr=String(Wt),(Wt>BigInt(2)**BigInt(32)||Wt<-(BigInt(2)**BigInt(32)))&&(lr=Dt(lr)),lr+="n"),er+=` It must be ${Gt}. Received ${lr}`,er},RangeError);function Dt(Xt){let Gt="",Wt=Xt.length;const er=Xt[0]==="-"?1:0;for(;Wt>=er+4;Wt-=3)Gt=`_${Xt.slice(Wt-3,Wt)}${Gt}`;return`${Xt.slice(0,Wt)}${Gt}`}function Ut(Xt,Gt,Wt){Qt(Gt,"offset"),(Xt[Gt]===void 0||Xt[Gt+Wt]===void 0)&&qt(Gt,Xt.length-(Wt+1))}function Vt(Xt,Gt,Wt,er,lr,ur){if(Xt>Wt||Xt<Gt){const pr=typeof Gt=="bigint"?"n":"";let yr;throw ur>3?Gt===0||Gt===BigInt(0)?yr=`>= 0${pr} and < 2${pr} ** ${(ur+1)*8}${pr}`:yr=`>= -(2${pr} ** ${(ur+1)*8-1}${pr}) and < 2 ** ${(ur+1)*8-1}${pr}`:yr=`>= ${Gt}${pr} and <= ${Wt}${pr}`,new $t.ERR_OUT_OF_RANGE("value",yr,Xt)}Ut(er,lr,ur)}function Qt(Xt,Gt){if(typeof Xt!="number")throw new $t.ERR_INVALID_ARG_TYPE(Gt,"number",Xt)}function qt(Xt,Gt,Wt){throw Math.floor(Xt)!==Xt?(Qt(Xt,Wt),new $t.ERR_OUT_OF_RANGE(Wt||"offset","an integer",Xt)):Gt<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE(Wt||"offset",`>= ${Wt?1:0} and <= ${Gt}`,Xt)}const Zt=/[^+/0-9A-Za-z-_]/g;function ar(Xt){if(Xt=Xt.split("=")[0],Xt=Xt.trim().replace(Zt,""),Xt.length<2)return"";for(;Xt.length%4!==0;)Xt=Xt+"=";return Xt}function Jt(Xt,Gt){Gt=Gt||1/0;let Wt;const er=Xt.length;let lr=null;const ur=[];for(let pr=0;pr<er;++pr){if(Wt=Xt.charCodeAt(pr),Wt>55295&&Wt<57344){if(!lr){if(Wt>56319){(Gt-=3)>-1&&ur.push(239,191,189);continue}else if(pr+1===er){(Gt-=3)>-1&&ur.push(239,191,189);continue}lr=Wt;continue}if(Wt<56320){(Gt-=3)>-1&&ur.push(239,191,189),lr=Wt;continue}Wt=(lr-55296<<10|Wt-56320)+65536}else lr&&(Gt-=3)>-1&&ur.push(239,191,189);if(lr=null,Wt<128){if((Gt-=1)<0)break;ur.push(Wt)}else if(Wt<2048){if((Gt-=2)<0)break;ur.push(Wt>>6|192,Wt&63|128)}else if(Wt<65536){if((Gt-=3)<0)break;ur.push(Wt>>12|224,Wt>>6&63|128,Wt&63|128)}else if(Wt<1114112){if((Gt-=4)<0)break;ur.push(Wt>>18|240,Wt>>12&63|128,Wt>>6&63|128,Wt&63|128)}else throw new Error("Invalid code point")}return ur}function rr(Xt){const Gt=[];for(let Wt=0;Wt<Xt.length;++Wt)Gt.push(Xt.charCodeAt(Wt)&255);return Gt}function Yt(Xt,Gt){let Wt,er,lr;const ur=[];for(let pr=0;pr<Xt.length&&!((Gt-=2)<0);++pr)Wt=Xt.charCodeAt(pr),er=Wt>>8,lr=Wt%256,ur.push(lr),ur.push(er);return ur}function Kt(Xt){return s.toByteArray(ar(Xt))}function nr(Xt,Gt,Wt,er){let lr;for(lr=0;lr<er&&!(lr+Wt>=Gt.length||lr>=Xt.length);++lr)Gt[lr+Wt]=Xt[lr];return lr}function tr(Xt,Gt){return Xt instanceof Gt||Xt!=null&&Xt.constructor!=null&&Xt.constructor.name!=null&&Xt.constructor.name===Gt.name}function ir(Xt){return Xt!==Xt}const sr=function(){const Xt="0123456789abcdef",Gt=new Array(256);for(let Wt=0;Wt<16;++Wt){const er=Wt*16;for(let lr=0;lr<16;++lr)Gt[er+lr]=Xt[Wt]+Xt[lr]}return Gt}();function cr(Xt){return typeof BigInt>"u"?or:Xt}function or(){throw new Error("BigInt not supported")}})(buffer$1);const langs=["en","zh","ja","ko","ar","th","pl","it","de","es","fr"],Lang=z.enum(langs);z.object({cancel:z.string(),field:z.string(),fieldName:z.string(),align:z.string(),width:z.string(),opacity:z.string(),height:z.string(),rotate:z.string(),edit:z.string(),plsInputName:z.string(),fieldMustUniq:z.string(),notUniq:z.string(),noKeyName:z.string(),fieldsList:z.string(),editField:z.string(),type:z.string(),errorOccurred:z.string(),errorBulkUpdateFieldName:z.string(),commitBulkUpdateFieldName:z.string(),bulkUpdateFieldName:z.string(),addPageAfter:z.string(),removePage:z.string(),removePageConfirm:z.string(),hexColorPrompt:z.string(),"schemas.color":z.string(),"schemas.borderWidth":z.string(),"schemas.borderColor":z.string(),"schemas.backgroundColor":z.string(),"schemas.textColor":z.string(),"schemas.bgColor":z.string(),"schemas.horizontal":z.string(),"schemas.vertical":z.string(),"schemas.left":z.string(),"schemas.center":z.string(),"schemas.right":z.string(),"schemas.top":z.string(),"schemas.middle":z.string(),"schemas.bottom":z.string(),"schemas.padding":z.string(),"schemas.text.fontName":z.string(),"schemas.text.size":z.string(),"schemas.text.spacing":z.string(),"schemas.text.textAlign":z.string(),"schemas.text.verticalAlign":z.string(),"schemas.text.lineHeight":z.string(),"schemas.text.min":z.string(),"schemas.text.max":z.string(),"schemas.text.fit":z.string(),"schemas.text.dynamicFontSize":z.string(),"schemas.text.format":z.string(),"schemas.barcodes.barColor":z.string(),"schemas.barcodes.includetext":z.string(),"schemas.table.alternateBackgroundColor":z.string(),"schemas.table.tableStyle":z.string(),"schemas.table.headStyle":z.string(),"schemas.table.bodyStyle":z.string(),"schemas.table.columnStyle":z.string()}),z.enum(["viewer","form","designer"]);const ColorType=z.enum(["rgb","cmyk"]).optional();z.object({height:z.number(),width:z.number()});const Schema$1=z.object({type:z.string(),icon:z.string().optional(),content:z.string().optional(),position:z.object({x:z.number(),y:z.number()}),width:z.number(),height:z.number(),rotate:z.number().optional(),opacity:z.number().optional(),readOnly:z.boolean().optional()}).passthrough(),SchemaForUIAdditionalInfo=z.object({id:z.string(),key:z.string()});Schema$1.merge(SchemaForUIAdditionalInfo);const ArrayBufferSchema=z.any().refine(a=>a instanceof ArrayBuffer),Uint8ArraySchema=z.any().refine(a=>a instanceof Uint8Array),BlankPdf=z.object({width:z.number(),height:z.number(),padding:z.tuple([z.number(),z.number(),z.number(),z.number()])}),BasePdf=z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema,BlankPdf]),Template=z.object({schemas:z.array(z.record(Schema$1)),basePdf:BasePdf,pdfmeVersion:z.string().optional()}).passthrough(),Inputs=z.array(z.record(z.any())).min(1),Font=z.record(z.object({data:z.union([z.string(),ArrayBufferSchema,Uint8ArraySchema]),fallback:z.boolean().optional(),subset:z.boolean().optional()})),CommonOptions=z.object({font:Font.optional()}).passthrough(),CommonProps=z.object({template:Template,options:CommonOptions.optional(),plugins:z.record(z.object({ui:z.any(),pdf:z.any(),propPanel:z.any()})).optional()}),GeneratorOptions=CommonOptions.extend({colorType:ColorType,author:z.string().optional(),creationDate:z.date().optional(),creator:z.string().optional(),keywords:z.array(z.string()).optional(),language:z.string().optional(),modificationDate:z.date().optional(),producer:z.string().optional(),subject:z.string().optional(),title:z.string().optional()});CommonProps.extend({inputs:Inputs,options:GeneratorOptions.optional()}).strict();const UIOptions=CommonOptions.extend({lang:Lang.optional(),labels:z.record(z.string(),z.string()).optional(),theme:z.record(z.string(),z.unknown()).optional()}),HTMLElementSchema=z.any().refine(a=>a instanceof HTMLElement),UIProps=CommonProps.extend({domContainer:HTMLElementSchema,options:UIOptions.optional()}),PreviewProps=UIProps.extend({inputs:Inputs}).strict(),DesignerProps=UIProps.extend({}).strict(),uniq=a=>Array.from(new Set(a)),getFallbackFontName=a=>{const s="",$=Object.entries(a).reduce((_,_e)=>{const[tt,nt]=_e;return!_&&nt.fallback?tt:_},s);if($===s)throw Error("[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.");return $},getDefaultFont=()=>({[DEFAULT_FONT_NAME]:{data:b64toUint8Array(DEFAULT_FONT_VALUE),fallback:!0}}),mm2pt=a=>parseFloat(String(a))*MM_TO_PT_RATIO,pt2mm=a=>a*PT_TO_MM_RATIO,pt2px=a=>a*PT_TO_PX_RATIO,px2mm=a=>{const s=.26458333333333;return parseFloat(String(a))*s},blob2Base64Pdf=a=>new Promise((s,$)=>{const _=new FileReader;_.onloadend=()=>{_.result.startsWith("data:application/pdf;")?s(_.result):$(Error("[@pdfme/common] template.basePdf must be pdf data."))},_.readAsDataURL(a)}),isHexValid=a=>/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/i.test(a),getB64BasePdf=a=>typeof a=="string"&&!a.startsWith("data:application/pdf;")&&typeof window<"u"?fetch(a).then($=>$.blob()).then(blob2Base64Pdf).catch($=>{throw $}):a,isBlankPdf=a=>BlankPdf.safeParse(a).success,getByteString=a=>buffer$1.Buffer.from(a,"base64").toString("binary"),b64toUint8Array=a=>{const s=a.split(";base64,")[1]?a.split(";base64,")[1]:a,$=getByteString(s),_=new Uint8Array($.length);for(let _e=0;_e<$.length;_e+=1)_[_e]=$.charCodeAt(_e);return _},getFontNamesInSchemas=a=>uniq(a.map(s=>Object.values(s).map($=>$.fontName??"")).reduce((s,$)=>s.concat($),[]).filter(Boolean)),checkFont=a=>{const{font:s,template:{schemas:$}}=a,_e=Object.values(s).reduce((at,ot)=>ot.fallback?at+1:at,0);if(_e===0)throw Error(`[@pdfme/common] fallback flag is not found in font. true fallback flag must be only one.
|
43
43
|
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);if(_e>1)throw Error(`[@pdfme/common] ${_e} fallback flags found in font. true fallback flag must be only one.
|
44
44
|
Check this document: https://pdfme.com/docs/custom-fonts#about-font-type`);const tt=getFontNamesInSchemas($),nt=Object.keys(s);if(tt.some(at=>!nt.includes(at)))throw Error(`[@pdfme/common] ${tt.filter(at=>!nt.includes(at)).join()} of template.schemas is not found in font.
|
45
45
|
Check this document: https://pdfme.com/docs/custom-fonts`)},checkPlugins=a=>{const{plugins:s,template:{schemas:$}}=a,_=uniq($.map(tt=>Object.values(tt).map(nt=>nt.type)).flat()),_e=Object.values(s).map(tt=>tt==null?void 0:tt.propPanel.defaultSchema.type);if(_.some(tt=>!_e.includes(tt)))throw Error(`[@pdfme/common] ${_.filter(tt=>!_e.includes(tt)).join()} of template.schemas is not found in plugins.`)},checkProps=(a,s)=>{try{s.parse(a)}catch($){if($ instanceof z.ZodError){const _e=$.issues.map(tt=>`ERROR POSITION: ${tt.path.join(".")}
|
@@ -125,7 +125,7 @@ endstream`,s}copyBytesInto(s,$){this.updateDict();const _=$;$+=this.dict.copyByt
|
|
125
125
|
`}return s}getUnencodedContents(){const s=new Uint8Array(this.getUnencodedContentsSize());let $=copyStringIntoBuffer(this.offsetsString,s,0);for(let _=0,_e=this.objects.length;_<_e;_++){const[,tt]=this.objects[_];$+=tt.copyBytesInto(s,$),s[$++]=CharCodes$1.Newline}return s}getUnencodedContentsSize(){return this.offsetsString.length+last$1(this.offsets)[1]+last$1(this.objects)[1].sizeInBytes()+1}computeOffsetsString(){let s="";for(let $=0,_=this.offsets.length;$<_;$++){const[_e,tt]=this.offsets[$];s+=`${_e} ${tt} `}return s}computeObjectOffsets(){let s=0;const $=new Array(this.objects.length);for(let _=0,_e=this.objects.length;_<_e;_++){const[tt,nt]=this.objects[_];$[_]=[tt.objectNumber,s],s+=nt.sizeInBytes()+1}return $}}PDFObjectStream.withContextAndObjects=(a,s,$=!0)=>new PDFObjectStream(a,s,$);class PDFInvalidObject extends PDFObject{constructor(s){super(),this.data=s}clone(){return PDFInvalidObject.of(this.data.slice())}toString(){return`PDFInvalidObject(${this.data.length} bytes)`}sizeInBytes(){return this.data.length}copyBytesInto(s,$){const _=this.data.length;for(let _e=0;_e<_;_e++)s[$++]=this.data[_e];return _}}PDFInvalidObject.of=a=>new PDFInvalidObject(a);var EntryType;(function(a){a[a.Deleted=0]="Deleted",a[a.Uncompressed=1]="Uncompressed",a[a.Compressed=2]="Compressed"})(EntryType||(EntryType={}));class PDFCrossRefStream extends PDFFlateStream{constructor(s,$,_=!0){super(s,_),this.computeIndex=()=>{const _e=[];let tt=0;for(let nt=0,at=this.entries.length;nt<at;nt++){const ot=this.entries[nt],rt=this.entries[nt-1];nt===0?_e.push(ot.ref.objectNumber):ot.ref.objectNumber-rt.ref.objectNumber>1&&(_e.push(tt),_e.push(ot.ref.objectNumber),tt=0),tt+=1}return _e.push(tt),_e},this.computeEntryTuples=()=>{const _e=new Array(this.entries.length);for(let tt=0,nt=this.entries.length;tt<nt;tt++){const at=this.entries[tt];if(at.type===EntryType.Deleted){const{type:ot,nextFreeObjectNumber:rt,ref:st}=at;_e[tt]=[ot,rt,st.generationNumber]}if(at.type===EntryType.Uncompressed){const{type:ot,offset:rt,ref:st}=at;_e[tt]=[ot,rt,st.generationNumber]}if(at.type===EntryType.Compressed){const{type:ot,objectStreamRef:rt,index:st}=at;_e[tt]=[ot,rt.objectNumber,st]}}return _e},this.computeMaxEntryByteWidths=()=>{const _e=this.entryTuplesCache.access(),tt=[0,0,0];for(let nt=0,at=_e.length;nt<at;nt++){const[ot,rt,st]=_e[nt],lt=sizeInBytes(ot),et=sizeInBytes(rt),it=sizeInBytes(st);lt>tt[0]&&(tt[0]=lt),et>tt[1]&&(tt[1]=et),it>tt[2]&&(tt[2]=it)}return tt},this.entries=$||[],this.entryTuplesCache=Cache.populatedBy(this.computeEntryTuples),this.maxByteWidthsCache=Cache.populatedBy(this.computeMaxEntryByteWidths),this.indexCache=Cache.populatedBy(this.computeIndex),s.set(PDFName.of("Type"),PDFName.of("XRef"))}addDeletedEntry(s,$){const _=EntryType.Deleted;this.entries.push({type:_,ref:s,nextFreeObjectNumber:$}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addUncompressedEntry(s,$){const _=EntryType.Uncompressed;this.entries.push({type:_,ref:s,offset:$}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}addCompressedEntry(s,$,_){const _e=EntryType.Compressed;this.entries.push({type:_e,ref:s,objectStreamRef:$,index:_}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()}clone(s){const{dict:$,entries:_,encode:_e}=this;return PDFCrossRefStream.of($.clone(s),_.slice(),_e)}getContentsString(){const s=this.entryTuplesCache.access(),$=this.maxByteWidthsCache.access();let _="";for(let _e=0,tt=s.length;_e<tt;_e++){const[nt,at,ot]=s[_e],rt=reverseArray(bytesFor(nt)),st=reverseArray(bytesFor(at)),lt=reverseArray(bytesFor(ot));for(let et=$[0]-1;et>=0;et--)_+=(rt[et]||0).toString(2);for(let et=$[1]-1;et>=0;et--)_+=(st[et]||0).toString(2);for(let et=$[2]-1;et>=0;et--)_+=(lt[et]||0).toString(2)}return _}getUnencodedContents(){const s=this.entryTuplesCache.access(),$=this.maxByteWidthsCache.access(),_=new Uint8Array(this.getUnencodedContentsSize());let _e=0;for(let tt=0,nt=s.length;tt<nt;tt++){const[at,ot,rt]=s[tt],st=reverseArray(bytesFor(at)),lt=reverseArray(bytesFor(ot)),et=reverseArray(bytesFor(rt));for(let it=$[0]-1;it>=0;it--)_[_e++]=st[it]||0;for(let it=$[1]-1;it>=0;it--)_[_e++]=lt[it]||0;for(let it=$[2]-1;it>=0;it--)_[_e++]=et[it]||0}return _}getUnencodedContentsSize(){const s=this.maxByteWidthsCache.access();return sum$1(s)*this.entries.length}updateDict(){super.updateDict();const s=this.maxByteWidthsCache.access(),$=this.indexCache.access(),{context:_}=this.dict;this.dict.set(PDFName.of("W"),_.obj(s)),this.dict.set(PDFName.of("Index"),_.obj($))}}PDFCrossRefStream.create=(a,s=!0)=>{const $=new PDFCrossRefStream(a,[],s);return $.addDeletedEntry(PDFRef.of(0,65535),0),$},PDFCrossRefStream.of=(a,s,$=!0)=>new PDFCrossRefStream(a,s,$);class PDFHexString extends PDFObject{constructor(s){super(),this.value=s}asBytes(){const s=this.value+(this.value.length%2===1?"0":""),$=s.length,_=new Uint8Array(s.length/2);let _e=0,tt=0;for(;_e<$;){const nt=parseInt(s.substring(_e,_e+2),16);_[tt]=nt,_e+=2,tt+=1}return _}decodeText(){const s=this.asBytes();return hasUtf16BOM(s)?utf16Decode(s):pdfDocEncodingDecode(s)}decodeDate(){const s=this.decodeText(),$=parseDate(s);if(!$)throw new InvalidPDFDateStringError(s);return $}asString(){return this.value}clone(){return PDFHexString.of(this.value)}toString(){return`<${this.value}>`}sizeInBytes(){return this.value.length+2}copyBytesInto(s,$){return s[$++]=CharCodes$1.LessThan,$+=copyStringIntoBuffer(this.value,s,$),s[$++]=CharCodes$1.GreaterThan,this.value.length+2}}PDFHexString.of=a=>new PDFHexString(a),PDFHexString.fromText=a=>{const s=utf16Encode(a);let $="";for(let _=0,_e=s.length;_<_e;_++)$+=toHexStringOfMinLength(s[_],4);return new PDFHexString($)};class PDFString extends PDFObject{constructor(s){super(),this.value=s}asBytes(){const s=[];let $="",_=!1;const _e=tt=>{tt!==void 0&&s.push(tt),_=!1};for(let tt=0,nt=this.value.length;tt<nt;tt++){const at=this.value[tt],ot=toCharCode(at),rt=this.value[tt+1];_?ot===CharCodes$1.Newline||ot===CharCodes$1.CarriageReturn?_e():ot===CharCodes$1.n?_e(CharCodes$1.Newline):ot===CharCodes$1.r?_e(CharCodes$1.CarriageReturn):ot===CharCodes$1.t?_e(CharCodes$1.Tab):ot===CharCodes$1.b?_e(CharCodes$1.Backspace):ot===CharCodes$1.f?_e(CharCodes$1.FormFeed):ot===CharCodes$1.LeftParen?_e(CharCodes$1.LeftParen):ot===CharCodes$1.RightParen?_e(CharCodes$1.RightParen):ot===CharCodes$1.Backspace?_e(CharCodes$1.BackSlash):ot>=CharCodes$1.Zero&&ot<=CharCodes$1.Seven?($+=at,($.length===3||!(rt>="0"&&rt<="7"))&&(_e(parseInt($,8)),$="")):_e(ot):ot===CharCodes$1.BackSlash?_=!0:_e(ot)}return new Uint8Array(s)}decodeText(){const s=this.asBytes();return hasUtf16BOM(s)?utf16Decode(s):pdfDocEncodingDecode(s)}decodeDate(){const s=this.decodeText(),$=parseDate(s);if(!$)throw new InvalidPDFDateStringError(s);return $}asString(){return this.value}clone(){return PDFString.of(this.value)}toString(){return`(${this.value})`}sizeInBytes(){return this.value.length+2}copyBytesInto(s,$){return s[$++]=CharCodes$1.LeftParen,$+=copyStringIntoBuffer(this.value,s,$),s[$++]=CharCodes$1.RightParen,this.value.length+2}}PDFString.of=a=>new PDFString(a),PDFString.fromDate=a=>{const s=padStart$1(String(a.getUTCFullYear()),4,"0"),$=padStart$1(String(a.getUTCMonth()+1),2,"0"),_=padStart$1(String(a.getUTCDate()),2,"0"),_e=padStart$1(String(a.getUTCHours()),2,"0"),tt=padStart$1(String(a.getUTCMinutes()),2,"0"),nt=padStart$1(String(a.getUTCSeconds()),2,"0");return new PDFString(`D:${s}${$}${_}${_e}${tt}${nt}Z`)};var AFRelationship;(function(a){a.Source="Source",a.Data="Data",a.Alternative="Alternative",a.Supplement="Supplement",a.EncryptedPayload="EncryptedPayload",a.FormData="EncryptedPayload",a.Schema="Schema",a.Unspecified="Unspecified"})(AFRelationship||(AFRelationship={}));var ColorSpace;(function(a){a.DeviceGray="DeviceGray",a.DeviceRGB="DeviceRGB",a.DeviceCMYK="DeviceCMYK"})(ColorSpace||(ColorSpace={})),ColorSpace.DeviceGray,ColorSpace.DeviceRGB,ColorSpace.DeviceCMYK;var UPNG={};UPNG.toRGBA8=function(a){var s=a.width,$=a.height;if(a.tabs.acTL==null)return[UPNG.toRGBA8.decodeImage(a.data,s,$,a).buffer];var _=[];a.frames[0].data==null&&(a.frames[0].data=a.data);for(var _e=s*$*4,tt=new Uint8Array(_e),nt=new Uint8Array(_e),at=new Uint8Array(_e),ot=0;ot<a.frames.length;ot++){var rt=a.frames[ot],st=rt.rect.x,lt=rt.rect.y,et=rt.rect.width,it=rt.rect.height,ut=UPNG.toRGBA8.decodeImage(rt.data,et,it,a);if(ot!=0)for(var ft=0;ft<_e;ft++)at[ft]=tt[ft];if(rt.blend==0?UPNG._copyTile(ut,et,it,tt,s,$,st,lt,0):rt.blend==1&&UPNG._copyTile(ut,et,it,tt,s,$,st,lt,1),_.push(tt.buffer.slice(0)),rt.dispose!=0){if(rt.dispose==1)UPNG._copyTile(nt,et,it,tt,s,$,st,lt,0);else if(rt.dispose==2)for(var ft=0;ft<_e;ft++)tt[ft]=at[ft]}}return _},UPNG.toRGBA8.decodeImage=function(a,s,$,_){var _e=s*$,tt=UPNG.decode._getBPP(_),nt=Math.ceil(s*tt/8),at=new Uint8Array(_e*4),ot=new Uint32Array(at.buffer),rt=_.ctype,st=_.depth,lt=UPNG._bin.readUshort;if(rt==6){var et=_e<<2;if(st==8)for(var it=0;it<et;it+=4)at[it]=a[it],at[it+1]=a[it+1],at[it+2]=a[it+2],at[it+3]=a[it+3];if(st==16)for(var it=0;it<et;it++)at[it]=a[it<<1]}else if(rt==2){var ut=_.tabs.tRNS;if(ut==null){if(st==8)for(var it=0;it<_e;it++){var ft=it*3;ot[it]=255<<24|a[ft+2]<<16|a[ft+1]<<8|a[ft]}if(st==16)for(var it=0;it<_e;it++){var ft=it*6;ot[it]=255<<24|a[ft+4]<<16|a[ft+2]<<8|a[ft]}}else{var ht=ut[0],dt=ut[1],gt=ut[2];if(st==8)for(var it=0;it<_e;it++){var pt=it<<2,ft=it*3;ot[it]=255<<24|a[ft+2]<<16|a[ft+1]<<8|a[ft],a[ft]==ht&&a[ft+1]==dt&&a[ft+2]==gt&&(at[pt+3]=0)}if(st==16)for(var it=0;it<_e;it++){var pt=it<<2,ft=it*6;ot[it]=255<<24|a[ft+4]<<16|a[ft+2]<<8|a[ft],lt(a,ft)==ht&<(a,ft+2)==dt&<(a,ft+4)==gt&&(at[pt+3]=0)}}}else if(rt==3){var mt=_.tabs.PLTE,ct=_.tabs.tRNS,vt=ct?ct.length:0;if(st==1)for(var At=0;At<$;At++)for(var xt=At*nt,bt=At*s,it=0;it<s;it++){var pt=bt+it<<2,Et=a[xt+(it>>3)]>>7-((it&7)<<0)&1,St=3*Et;at[pt]=mt[St],at[pt+1]=mt[St+1],at[pt+2]=mt[St+2],at[pt+3]=Et<vt?ct[Et]:255}if(st==2)for(var At=0;At<$;At++)for(var xt=At*nt,bt=At*s,it=0;it<s;it++){var pt=bt+it<<2,Et=a[xt+(it>>2)]>>6-((it&3)<<1)&3,St=3*Et;at[pt]=mt[St],at[pt+1]=mt[St+1],at[pt+2]=mt[St+2],at[pt+3]=Et<vt?ct[Et]:255}if(st==4)for(var At=0;At<$;At++)for(var xt=At*nt,bt=At*s,it=0;it<s;it++){var pt=bt+it<<2,Et=a[xt+(it>>1)]>>4-((it&1)<<2)&15,St=3*Et;at[pt]=mt[St],at[pt+1]=mt[St+1],at[pt+2]=mt[St+2],at[pt+3]=Et<vt?ct[Et]:255}if(st==8)for(var it=0;it<_e;it++){var pt=it<<2,Et=a[it],St=3*Et;at[pt]=mt[St],at[pt+1]=mt[St+1],at[pt+2]=mt[St+2],at[pt+3]=Et<vt?ct[Et]:255}}else if(rt==4){if(st==8)for(var it=0;it<_e;it++){var pt=it<<2,Bt=it<<1,Ot=a[Bt];at[pt]=Ot,at[pt+1]=Ot,at[pt+2]=Ot,at[pt+3]=a[Bt+1]}if(st==16)for(var it=0;it<_e;it++){var pt=it<<2,Bt=it<<2,Ot=a[Bt];at[pt]=Ot,at[pt+1]=Ot,at[pt+2]=Ot,at[pt+3]=a[Bt+2]}}else if(rt==0)for(var ht=_.tabs.tRNS?_.tabs.tRNS:-1,At=0;At<$;At++){var Tt=At*nt,wt=At*s;if(st==1)for(var Ct=0;Ct<s;Ct++){var Ot=255*(a[Tt+(Ct>>>3)]>>>7-(Ct&7)&1),It=Ot==ht*255?0:255;ot[wt+Ct]=It<<24|Ot<<16|Ot<<8|Ot}else if(st==2)for(var Ct=0;Ct<s;Ct++){var Ot=85*(a[Tt+(Ct>>>2)]>>>6-((Ct&3)<<1)&3),It=Ot==ht*85?0:255;ot[wt+Ct]=It<<24|Ot<<16|Ot<<8|Ot}else if(st==4)for(var Ct=0;Ct<s;Ct++){var Ot=17*(a[Tt+(Ct>>>1)]>>>4-((Ct&1)<<2)&15),It=Ot==ht*17?0:255;ot[wt+Ct]=It<<24|Ot<<16|Ot<<8|Ot}else if(st==8)for(var Ct=0;Ct<s;Ct++){var Ot=a[Tt+Ct],It=Ot==ht?0:255;ot[wt+Ct]=It<<24|Ot<<16|Ot<<8|Ot}else if(st==16)for(var Ct=0;Ct<s;Ct++){var Ot=a[Tt+(Ct<<1)],It=lt(a,Tt+(Ct<<it))==ht?0:255;ot[wt+Ct]=It<<24|Ot<<16|Ot<<8|Ot}}return at},UPNG.decode=function(a){for(var s=new Uint8Array(a),$=8,_=UPNG._bin,_e=_.readUshort,tt=_.readUint,nt={tabs:{},frames:[]},at=new Uint8Array(s.length),ot=0,rt,st=0,lt=[137,80,78,71,13,10,26,10],et=0;et<8;et++)if(s[et]!=lt[et])throw"The input is not a PNG file!";for(;$<s.length;){var it=_.readUint(s,$);$+=4;var ut=_.readASCII(s,$,4);if($+=4,ut=="IHDR")UPNG.decode._IHDR(s,$,nt);else if(ut=="IDAT"){for(var et=0;et<it;et++)at[ot+et]=s[$+et];ot+=it}else if(ut=="acTL")nt.tabs[ut]={num_frames:tt(s,$),num_plays:tt(s,$+4)},rt=new Uint8Array(s.length);else if(ut=="fcTL"){if(st!=0){var ft=nt.frames[nt.frames.length-1];ft.data=UPNG.decode._decompress(nt,rt.slice(0,st),ft.rect.width,ft.rect.height),st=0}var ht={x:tt(s,$+12),y:tt(s,$+16),width:tt(s,$+4),height:tt(s,$+8)},dt=_e(s,$+22);dt=_e(s,$+20)/(dt==0?100:dt);var gt={rect:ht,delay:Math.round(dt*1e3),dispose:s[$+24],blend:s[$+25]};nt.frames.push(gt)}else if(ut=="fdAT"){for(var et=0;et<it-4;et++)rt[st+et]=s[$+et+4];st+=it-4}else if(ut=="pHYs")nt.tabs[ut]=[_.readUint(s,$),_.readUint(s,$+4),s[$+8]];else if(ut=="cHRM"){nt.tabs[ut]=[];for(var et=0;et<8;et++)nt.tabs[ut].push(_.readUint(s,$+et*4))}else if(ut=="tEXt"){nt.tabs[ut]==null&&(nt.tabs[ut]={});var pt=_.nextZero(s,$),mt=_.readASCII(s,$,pt-$),ct=_.readASCII(s,pt+1,$+it-pt-1);nt.tabs[ut][mt]=ct}else if(ut=="iTXt"){nt.tabs[ut]==null&&(nt.tabs[ut]={});var pt=0,vt=$;pt=_.nextZero(s,vt);var mt=_.readASCII(s,vt,pt-vt);vt=pt+1,s[vt],s[vt+1],vt+=2,pt=_.nextZero(s,vt),_.readASCII(s,vt,pt-vt),vt=pt+1,pt=_.nextZero(s,vt),_.readUTF8(s,vt,pt-vt),vt=pt+1;var ct=_.readUTF8(s,vt,it-(vt-$));nt.tabs[ut][mt]=ct}else if(ut=="PLTE")nt.tabs[ut]=_.readBytes(s,$,it);else if(ut=="hIST"){var At=nt.tabs.PLTE.length/3;nt.tabs[ut]=[];for(var et=0;et<At;et++)nt.tabs[ut].push(_e(s,$+et*2))}else if(ut=="tRNS")nt.ctype==3?nt.tabs[ut]=_.readBytes(s,$,it):nt.ctype==0?nt.tabs[ut]=_e(s,$):nt.ctype==2&&(nt.tabs[ut]=[_e(s,$),_e(s,$+2),_e(s,$+4)]);else if(ut=="gAMA")nt.tabs[ut]=_.readUint(s,$)/1e5;else if(ut=="sRGB")nt.tabs[ut]=s[$];else if(ut=="bKGD")nt.ctype==0||nt.ctype==4?nt.tabs[ut]=[_e(s,$)]:nt.ctype==2||nt.ctype==6?nt.tabs[ut]=[_e(s,$),_e(s,$+2),_e(s,$+4)]:nt.ctype==3&&(nt.tabs[ut]=s[$]);else if(ut=="IEND")break;$+=it,_.readUint(s,$),$+=4}if(st!=0){var ft=nt.frames[nt.frames.length-1];ft.data=UPNG.decode._decompress(nt,rt.slice(0,st),ft.rect.width,ft.rect.height),st=0}return nt.data=UPNG.decode._decompress(nt,at,nt.width,nt.height),delete nt.compress,delete nt.interlace,delete nt.filter,nt},UPNG.decode._decompress=function(a,s,$,_){var _e=UPNG.decode._getBPP(a),tt=Math.ceil($*_e/8),nt=new Uint8Array((tt+1+a.interlace)*_);return s=UPNG.decode._inflate(s,nt),a.interlace==0?s=UPNG.decode._filterZero(s,a,0,$,_):a.interlace==1&&(s=UPNG.decode._readInterlace(s,a)),s},UPNG.decode._inflate=function(a,s){var $=UPNG.inflateRaw(new Uint8Array(a.buffer,2,a.length-6),s);return $},UPNG.inflateRaw=function(){var a={};return a.H={},a.H.N=function(s,$){var _=Uint8Array,_e=0,tt=0,nt=0,at=0,ot=0,rt=0,st=0,lt=0,et=0,it,ut;if(s[0]==3&&s[1]==0)return $||new _(0);var ft=a.H,ht=ft.b,dt=ft.e,gt=ft.R,pt=ft.n,mt=ft.A,ct=ft.Z,vt=ft.m,At=$==null;for(At&&($=new _(s.length>>>2<<3));_e==0;){if(_e=ht(s,et,1),tt=ht(s,et+1,2),et+=3,tt==0){et&7&&(et+=8-(et&7));var xt=(et>>>3)+4,bt=s[xt-4]|s[xt-3]<<8;At&&($=a.H.W($,lt+bt)),$.set(new _(s.buffer,s.byteOffset+xt,bt),lt),et=xt+bt<<3,lt+=bt;continue}if(At&&($=a.H.W($,lt+(1<<17))),tt==1&&(it=vt.J,ut=vt.h,rt=511,st=31),tt==2){nt=dt(s,et,5)+257,at=dt(s,et+5,5)+1,ot=dt(s,et+10,4)+4,et+=14;for(var Et=1,St=0;St<38;St+=2)vt.Q[St]=0,vt.Q[St+1]=0;for(var St=0;St<ot;St++){var Bt=dt(s,et+St*3,3);vt.Q[(vt.X[St]<<1)+1]=Bt,Bt>Et&&(Et=Bt)}et+=3*ot,pt(vt.Q,Et),mt(vt.Q,Et,vt.u),it=vt.w,ut=vt.d,et=gt(vt.u,(1<<Et)-1,nt+at,s,et,vt.v);var Ot=ft.V(vt.v,0,nt,vt.C);rt=(1<<Ot)-1;var Tt=ft.V(vt.v,nt,at,vt.D);st=(1<<Tt)-1,pt(vt.C,Ot),mt(vt.C,Ot,it),pt(vt.D,Tt),mt(vt.D,Tt,ut)}for(;;){var wt=it[ct(s,et)&rt];et+=wt&15;var Ct=wt>>>4;if(!(Ct>>>8))$[lt++]=Ct;else{if(Ct==256)break;var It=lt+Ct-254;if(Ct>264){var yt=vt.q[Ct-257];It=lt+(yt>>>3)+dt(s,et,yt&7),et+=yt&7}var Rt=ut[ct(s,et)&st];et+=Rt&15;var kt=Rt>>>4,jt=vt.c[kt],Ht=(jt>>>4)+ht(s,et,jt&15);for(et+=jt&15;lt<It;)$[lt]=$[lt++-Ht],$[lt]=$[lt++-Ht],$[lt]=$[lt++-Ht],$[lt]=$[lt++-Ht];lt=It}}}return $.length==lt?$:$.slice(0,lt)},a.H.W=function(s,$){var _=s.length;if($<=_)return s;var _e=new Uint8Array(_<<1);return _e.set(s,0),_e},a.H.R=function(s,$,_,_e,tt,nt){for(var at=a.H.e,ot=a.H.Z,rt=0;rt<_;){var st=s[ot(_e,tt)&$];tt+=st&15;var lt=st>>>4;if(lt<=15)nt[rt]=lt,rt++;else{var et=0,it=0;lt==16?(it=3+at(_e,tt,2),tt+=2,et=nt[rt-1]):lt==17?(it=3+at(_e,tt,3),tt+=3):lt==18&&(it=11+at(_e,tt,7),tt+=7);for(var ut=rt+it;rt<ut;)nt[rt]=et,rt++}}return tt},a.H.V=function(s,$,_,_e){for(var tt=0,nt=0,at=_e.length>>>1;nt<_;){var ot=s[nt+$];_e[nt<<1]=0,_e[(nt<<1)+1]=ot,ot>tt&&(tt=ot),nt++}for(;nt<at;)_e[nt<<1]=0,_e[(nt<<1)+1]=0,nt++;return tt},a.H.n=function(s,$){for(var _=a.H.m,_e=s.length,tt,nt,at,ot,rt,st=_.j,ot=0;ot<=$;ot++)st[ot]=0;for(ot=1;ot<_e;ot+=2)st[s[ot]]++;var lt=_.K;for(tt=0,st[0]=0,nt=1;nt<=$;nt++)tt=tt+st[nt-1]<<1,lt[nt]=tt;for(at=0;at<_e;at+=2)rt=s[at+1],rt!=0&&(s[at]=lt[rt],lt[rt]++)},a.H.A=function(s,$,_){for(var _e=s.length,tt=a.H.m,nt=tt.r,at=0;at<_e;at+=2)if(s[at+1]!=0)for(var ot=at>>1,rt=s[at+1],st=ot<<4|rt,lt=$-rt,et=s[at]<<lt,it=et+(1<<lt);et!=it;){var ut=nt[et]>>>15-$;_[ut]=st,et++}},a.H.l=function(s,$){for(var _=a.H.m.r,_e=15-$,tt=0;tt<s.length;tt+=2){var nt=s[tt]<<$-s[tt+1];s[tt]=_[nt]>>>_e}},a.H.M=function(s,$,_){_=_<<($&7);var _e=$>>>3;s[_e]|=_,s[_e+1]|=_>>>8},a.H.I=function(s,$,_){_=_<<($&7);var _e=$>>>3;s[_e]|=_,s[_e+1]|=_>>>8,s[_e+2]|=_>>>16},a.H.e=function(s,$,_){return(s[$>>>3]|s[($>>>3)+1]<<8)>>>($&7)&(1<<_)-1},a.H.b=function(s,$,_){return(s[$>>>3]|s[($>>>3)+1]<<8|s[($>>>3)+2]<<16)>>>($&7)&(1<<_)-1},a.H.Z=function(s,$){return(s[$>>>3]|s[($>>>3)+1]<<8|s[($>>>3)+2]<<16)>>>($&7)},a.H.i=function(s,$){return(s[$>>>3]|s[($>>>3)+1]<<8|s[($>>>3)+2]<<16|s[($>>>3)+3]<<24)>>>($&7)},a.H.m=function(){var s=Uint16Array,$=Uint32Array;return{K:new s(16),j:new s(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new s(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new $(32),J:new s(512),_:[],h:new s(32),$:[],w:new s(32768),C:[],v:[],d:new s(32768),D:[],u:new s(512),Q:[],r:new s(32768),s:new $(286),Y:new $(30),a:new $(19),t:new $(15e3),k:new s(65536),g:new s(32768)}}(),function(){for(var s=a.H.m,$=32768,_=0;_<$;_++){var _e=_;_e=(_e&2863311530)>>>1|(_e&1431655765)<<1,_e=(_e&3435973836)>>>2|(_e&858993459)<<2,_e=(_e&4042322160)>>>4|(_e&252645135)<<4,_e=(_e&4278255360)>>>8|(_e&16711935)<<8,s.r[_]=(_e>>>16|_e<<16)>>>17}function tt(nt,at,ot){for(;at--!=0;)nt.push(0,ot)}for(var _=0;_<32;_++)s.q[_]=s.S[_]<<3|s.T[_],s.c[_]=s.p[_]<<4|s.z[_];tt(s._,144,8),tt(s._,112,9),tt(s._,24,7),tt(s._,8,8),a.H.n(s._,9),a.H.A(s._,9,s.J),a.H.l(s._,9),tt(s.$,32,5),a.H.n(s.$,5),a.H.A(s.$,5,s.h),a.H.l(s.$,5),tt(s.Q,19,0),tt(s.C,286,0),tt(s.D,30,0),tt(s.v,320,0)}(),a.H.N}(),UPNG.decode._readInterlace=function(a,s){for(var $=s.width,_=s.height,_e=UPNG.decode._getBPP(s),tt=_e>>3,nt=Math.ceil($*_e/8),at=new Uint8Array(_*nt),ot=0,rt=[0,0,4,0,2,0,1],st=[0,4,0,2,0,1,0],lt=[8,8,8,4,4,2,2],et=[8,8,4,4,2,2,1],it=0;it<7;){for(var ut=lt[it],ft=et[it],ht=0,dt=0,gt=rt[it];gt<_;)gt+=ut,dt++;for(var pt=st[it];pt<$;)pt+=ft,ht++;var mt=Math.ceil(ht*_e/8);UPNG.decode._filterZero(a,s,ot,ht,dt);for(var ct=0,vt=rt[it];vt<_;){for(var At=st[it],xt=ot+ct*mt<<3;At<$;){if(_e==1){var bt=a[xt>>3];bt=bt>>7-(xt&7)&1,at[vt*nt+(At>>3)]|=bt<<7-((At&7)<<0)}if(_e==2){var bt=a[xt>>3];bt=bt>>6-(xt&7)&3,at[vt*nt+(At>>2)]|=bt<<6-((At&3)<<1)}if(_e==4){var bt=a[xt>>3];bt=bt>>4-(xt&7)&15,at[vt*nt+(At>>1)]|=bt<<4-((At&1)<<2)}if(_e>=8)for(var Et=vt*nt+At*tt,St=0;St<tt;St++)at[Et+St]=a[(xt>>3)+St];xt+=_e,At+=ft}ct++,vt+=ut}ht*dt!=0&&(ot+=dt*(1+mt)),it=it+1}return at},UPNG.decode._getBPP=function(a){var s=[1,null,3,1,2,null,4][a.ctype];return s*a.depth},UPNG.decode._filterZero=function(a,s,$,_,_e){var tt=UPNG.decode._getBPP(s),nt=Math.ceil(_*tt/8),at=UPNG.decode._paeth;tt=Math.ceil(tt/8);var ot=0,rt=1,st=a[$],lt=0;if(st>1&&(a[$]=[0,0,1][st-2]),st==3)for(lt=tt;lt<nt;lt++)a[lt+1]=a[lt+1]+(a[lt+1-tt]>>>1)&255;for(var et=0;et<_e;et++)if(ot=$+et*nt,rt=ot+et+1,st=a[rt-1],lt=0,st==0)for(;lt<nt;lt++)a[ot+lt]=a[rt+lt];else if(st==1){for(;lt<tt;lt++)a[ot+lt]=a[rt+lt];for(;lt<nt;lt++)a[ot+lt]=a[rt+lt]+a[ot+lt-tt]}else if(st==2)for(;lt<nt;lt++)a[ot+lt]=a[rt+lt]+a[ot+lt-nt];else if(st==3){for(;lt<tt;lt++)a[ot+lt]=a[rt+lt]+(a[ot+lt-nt]>>>1);for(;lt<nt;lt++)a[ot+lt]=a[rt+lt]+(a[ot+lt-nt]+a[ot+lt-tt]>>>1)}else{for(;lt<tt;lt++)a[ot+lt]=a[rt+lt]+at(0,a[ot+lt-nt],0);for(;lt<nt;lt++)a[ot+lt]=a[rt+lt]+at(a[ot+lt-tt],a[ot+lt-nt],a[ot+lt-tt-nt])}return a},UPNG.decode._paeth=function(a,s,$){var _=a+s-$,_e=_-a,tt=_-s,nt=_-$;return _e*_e<=tt*tt&&_e*_e<=nt*nt?a:tt*tt<=nt*nt?s:$},UPNG.decode._IHDR=function(a,s,$){var _=UPNG._bin;$.width=_.readUint(a,s),s+=4,$.height=_.readUint(a,s),s+=4,$.depth=a[s],s++,$.ctype=a[s],s++,$.compress=a[s],s++,$.filter=a[s],s++,$.interlace=a[s],s++},UPNG._bin={nextZero:function(a,s){for(;a[s]!=0;)s++;return s},readUshort:function(a,s){return a[s]<<8|a[s+1]},writeUshort:function(a,s,$){a[s]=$>>8&255,a[s+1]=$&255},readUint:function(a,s){return a[s]*(256*256*256)+(a[s+1]<<16|a[s+2]<<8|a[s+3])},writeUint:function(a,s,$){a[s]=$>>24&255,a[s+1]=$>>16&255,a[s+2]=$>>8&255,a[s+3]=$&255},readASCII:function(a,s,$){for(var _="",_e=0;_e<$;_e++)_+=String.fromCharCode(a[s+_e]);return _},writeASCII:function(a,s,$){for(var _=0;_<$.length;_++)a[s+_]=$.charCodeAt(_)},readBytes:function(a,s,$){for(var _=[],_e=0;_e<$;_e++)_.push(a[s+_e]);return _},pad:function(a){return a.length<2?"0"+a:a},readUTF8:function(a,s,$){for(var _="",_e,tt=0;tt<$;tt++)_+="%"+UPNG._bin.pad(a[s+tt].toString(16));try{_e=decodeURIComponent(_)}catch{return UPNG._bin.readASCII(a,s,$)}return _e}},UPNG._copyTile=function(a,s,$,_,_e,tt,nt,at,ot){for(var rt=Math.min(s,_e),st=Math.min($,tt),lt=0,et=0,it=0;it<st;it++)for(var ut=0;ut<rt;ut++)if(nt>=0&&at>=0?(lt=it*s+ut<<2,et=(at+it)*_e+nt+ut<<2):(lt=(-at+it)*s-nt+ut<<2,et=it*_e+ut<<2),ot==0)_[et]=a[lt],_[et+1]=a[lt+1],_[et+2]=a[lt+2],_[et+3]=a[lt+3];else if(ot==1){var ft=a[lt+3]*.00392156862745098,ht=a[lt]*ft,dt=a[lt+1]*ft,gt=a[lt+2]*ft,pt=_[et+3]*(1/255),mt=_[et]*pt,ct=_[et+1]*pt,vt=_[et+2]*pt,At=1-ft,xt=ft+pt*At,bt=xt==0?0:1/xt;_[et+3]=255*xt,_[et+0]=(ht+mt*At)*bt,_[et+1]=(dt+ct*At)*bt,_[et+2]=(gt+vt*At)*bt}else if(ot==2){var ft=a[lt+3],ht=a[lt],dt=a[lt+1],gt=a[lt+2],pt=_[et+3],mt=_[et],ct=_[et+1],vt=_[et+2];ft==pt&&ht==mt&&dt==ct&>==vt?(_[et]=0,_[et+1]=0,_[et+2]=0,_[et+3]=0):(_[et]=ht,_[et+1]=dt,_[et+2]=gt,_[et+3]=ft)}else if(ot==3){var ft=a[lt+3],ht=a[lt],dt=a[lt+1],gt=a[lt+2],pt=_[et+3],mt=_[et],ct=_[et+1],vt=_[et+2];if(ft==pt&&ht==mt&&dt==ct&>==vt)continue;if(ft<220&&pt>20)return!1}return!0},UPNG.encode=function(a,s,$,_,_e,tt,nt){_==null&&(_=0),nt==null&&(nt=!1);var at=UPNG.encode.compress(a,s,$,_,[!1,!1,!1,0,nt]);return UPNG.encode.compressPNG(at,-1),UPNG.encode._main(at,s,$,_e,tt)},UPNG.encodeLL=function(a,s,$,_,_e,tt,nt,at){for(var ot={ctype:0+(_==1?0:2)+(_e==0?0:4),depth:tt,frames:[]},rt=(_+_e)*tt,st=rt*s,lt=0;lt<a.length;lt++)ot.frames.push({rect:{x:0,y:0,width:s,height:$},img:new Uint8Array(a[lt]),blend:0,dispose:1,bpp:Math.ceil(rt/8),bpl:Math.ceil(st/8)});UPNG.encode.compressPNG(ot,0,!0);var et=UPNG.encode._main(ot,s,$,nt,at);return et},UPNG.encode._main=function(a,s,$,_,_e){_e==null&&(_e={});var tt=UPNG.crc.crc,nt=UPNG._bin.writeUint,at=UPNG._bin.writeUshort,ot=UPNG._bin.writeASCII,rt=8,st=a.frames.length>1,lt=!1,et=33+(st?20:0);if(_e.sRGB!=null&&(et+=13),_e.pHYs!=null&&(et+=21),a.ctype==3){for(var it=a.plte.length,ut=0;ut<it;ut++)a.plte[ut]>>>24!=255&&(lt=!0);et+=8+it*3+4+(lt?8+it*1+4:0)}for(var ft=0;ft<a.frames.length;ft++){var ht=a.frames[ft];st&&(et+=38),et+=ht.cimg.length+12,ft!=0&&(et+=4)}et+=12;for(var dt=new Uint8Array(et),gt=[137,80,78,71,13,10,26,10],ut=0;ut<8;ut++)dt[ut]=gt[ut];if(nt(dt,rt,13),rt+=4,ot(dt,rt,"IHDR"),rt+=4,nt(dt,rt,s),rt+=4,nt(dt,rt,$),rt+=4,dt[rt]=a.depth,rt++,dt[rt]=a.ctype,rt++,dt[rt]=0,rt++,dt[rt]=0,rt++,dt[rt]=0,rt++,nt(dt,rt,tt(dt,rt-17,17)),rt+=4,_e.sRGB!=null&&(nt(dt,rt,1),rt+=4,ot(dt,rt,"sRGB"),rt+=4,dt[rt]=_e.sRGB,rt++,nt(dt,rt,tt(dt,rt-5,5)),rt+=4),_e.pHYs!=null&&(nt(dt,rt,9),rt+=4,ot(dt,rt,"pHYs"),rt+=4,nt(dt,rt,_e.pHYs[0]),rt+=4,nt(dt,rt,_e.pHYs[1]),rt+=4,dt[rt]=_e.pHYs[2],rt++,nt(dt,rt,tt(dt,rt-13,13)),rt+=4),st&&(nt(dt,rt,8),rt+=4,ot(dt,rt,"acTL"),rt+=4,nt(dt,rt,a.frames.length),rt+=4,nt(dt,rt,_e.loop!=null?_e.loop:0),rt+=4,nt(dt,rt,tt(dt,rt-12,12)),rt+=4),a.ctype==3){var it=a.plte.length;nt(dt,rt,it*3),rt+=4,ot(dt,rt,"PLTE"),rt+=4;for(var ut=0;ut<it;ut++){var pt=ut*3,mt=a.plte[ut],ct=mt&255,vt=mt>>>8&255,At=mt>>>16&255;dt[rt+pt+0]=ct,dt[rt+pt+1]=vt,dt[rt+pt+2]=At}if(rt+=it*3,nt(dt,rt,tt(dt,rt-it*3-4,it*3+4)),rt+=4,lt){nt(dt,rt,it),rt+=4,ot(dt,rt,"tRNS"),rt+=4;for(var ut=0;ut<it;ut++)dt[rt+ut]=a.plte[ut]>>>24&255;rt+=it,nt(dt,rt,tt(dt,rt-it-4,it+4)),rt+=4}}for(var xt=0,ft=0;ft<a.frames.length;ft++){var ht=a.frames[ft];st&&(nt(dt,rt,26),rt+=4,ot(dt,rt,"fcTL"),rt+=4,nt(dt,rt,xt++),rt+=4,nt(dt,rt,ht.rect.width),rt+=4,nt(dt,rt,ht.rect.height),rt+=4,nt(dt,rt,ht.rect.x),rt+=4,nt(dt,rt,ht.rect.y),rt+=4,at(dt,rt,_[ft]),rt+=2,at(dt,rt,1e3),rt+=2,dt[rt]=ht.dispose,rt++,dt[rt]=ht.blend,rt++,nt(dt,rt,tt(dt,rt-30,30)),rt+=4);var bt=ht.cimg,it=bt.length;nt(dt,rt,it+(ft==0?0:4)),rt+=4;var Et=rt;ot(dt,rt,ft==0?"IDAT":"fdAT"),rt+=4,ft!=0&&(nt(dt,rt,xt++),rt+=4),dt.set(bt,rt),rt+=it,nt(dt,rt,tt(dt,Et,rt-Et)),rt+=4}return nt(dt,rt,0),rt+=4,ot(dt,rt,"IEND"),rt+=4,nt(dt,rt,tt(dt,rt-4,4)),rt+=4,dt.buffer},UPNG.encode.compressPNG=function(a,s,$){for(var _=0;_<a.frames.length;_++){var _e=a.frames[_];_e.rect.width;var tt=_e.rect.height,nt=new Uint8Array(tt*_e.bpl+tt);_e.cimg=UPNG.encode._filterZero(_e.img,tt,_e.bpp,_e.bpl,nt,s,$)}},UPNG.encode.compress=function(a,s,$,_,_e){for(var tt=_e[0],nt=_e[1],at=_e[2],ot=_e[3],rt=_e[4],st=6,lt=8,et=255,it=0;it<a.length;it++)for(var ut=new Uint8Array(a[it]),ft=ut.length,ht=0;ht<ft;ht+=4)et&=ut[ht+3];var dt=et!=255,gt=UPNG.encode.framize(a,s,$,tt,nt,at),pt={},mt=[],ct=[];if(_!=0){for(var vt=[],ht=0;ht<gt.length;ht++)vt.push(gt[ht].img.buffer);for(var At=UPNG.encode.concatRGBA(vt),xt=UPNG.quantize(At,_),bt=0,Et=new Uint8Array(xt.abuf),ht=0;ht<gt.length;ht++){var St=gt[ht].img,Bt=St.length;ct.push(new Uint8Array(xt.inds.buffer,bt>>2,Bt>>2));for(var it=0;it<Bt;it+=4)St[it]=Et[bt+it],St[it+1]=Et[bt+it+1],St[it+2]=Et[bt+it+2],St[it+3]=Et[bt+it+3];bt+=Bt}for(var ht=0;ht<xt.plte.length;ht++)mt.push(xt.plte[ht].est.rgba)}else for(var it=0;it<gt.length;it++){var Ot=gt[it],Tt=new Uint32Array(Ot.img.buffer),wt=Ot.rect.width,ft=Tt.length,Ct=new Uint8Array(ft);ct.push(Ct);for(var ht=0;ht<ft;ht++){var It=Tt[ht];if(ht!=0&&It==Tt[ht-1])Ct[ht]=Ct[ht-1];else if(ht>wt&&It==Tt[ht-wt])Ct[ht]=Ct[ht-wt];else{var yt=pt[It];if(yt==null&&(pt[It]=yt=mt.length,mt.push(It),mt.length>=300))break;Ct[ht]=yt}}}var Rt=mt.length;Rt<=256&&rt==!1&&(Rt<=2?lt=1:Rt<=4?lt=2:Rt<=16?lt=4:lt=8,lt=Math.max(lt,ot));for(var it=0;it<gt.length;it++){var Ot=gt[it];Ot.rect.x,Ot.rect.y;var wt=Ot.rect.width,kt=Ot.rect.height,jt=Ot.img;new Uint32Array(jt.buffer);var Ht=4*wt,Ft=4;if(Rt<=256&&rt==!1){Ht=Math.ceil(lt*wt/8);for(var _t=new Uint8Array(Ht*kt),Nt=ct[it],Mt=0;Mt<kt;Mt++){var ht=Mt*Ht,Lt=Mt*wt;if(lt==8)for(var $t=0;$t<wt;$t++)_t[ht+$t]=Nt[Lt+$t];else if(lt==4)for(var $t=0;$t<wt;$t++)_t[ht+($t>>1)]|=Nt[Lt+$t]<<4-($t&1)*4;else if(lt==2)for(var $t=0;$t<wt;$t++)_t[ht+($t>>2)]|=Nt[Lt+$t]<<6-($t&3)*2;else if(lt==1)for(var $t=0;$t<wt;$t++)_t[ht+($t>>3)]|=Nt[Lt+$t]<<7-($t&7)*1}jt=_t,st=3,Ft=1}else if(dt==!1&>.length==1){for(var _t=new Uint8Array(wt*kt*3),Pt=wt*kt,ht=0;ht<Pt;ht++){var St=ht*3,Dt=ht*4;_t[St]=jt[Dt],_t[St+1]=jt[Dt+1],_t[St+2]=jt[Dt+2]}jt=_t,st=2,Ft=3,Ht=3*wt}Ot.img=jt,Ot.bpl=Ht,Ot.bpp=Ft}return{ctype:st,depth:lt,plte:mt,frames:gt}},UPNG.encode.framize=function(a,s,$,_,_e,tt){for(var nt=[],at=0;at<a.length;at++){var ot=new Uint8Array(a[at]),rt=new Uint32Array(ot.buffer),st,lt=0,et=0,it=s,ut=$,ft=_?1:0;if(at!=0){for(var ht=tt||_||at==1||nt[at-2].dispose!=0?1:2,dt=0,gt=1e9,pt=0;pt<ht;pt++){for(var Ot=new Uint8Array(a[at-1-pt]),mt=new Uint32Array(a[at-1-pt]),ct=s,vt=$,At=-1,xt=-1,bt=0;bt<$;bt++)for(var Et=0;Et<s;Et++){var St=bt*s+Et;rt[St]!=mt[St]&&(Et<ct&&(ct=Et),Et>At&&(At=Et),bt<vt&&(vt=bt),bt>xt&&(xt=bt))}At==-1&&(ct=vt=At=xt=0),_e&&((ct&1)==1&&ct--,(vt&1)==1&&vt--);var Bt=(At-ct+1)*(xt-vt+1);Bt<gt&&(gt=Bt,dt=pt,lt=ct,et=vt,it=At-ct+1,ut=xt-vt+1)}var Ot=new Uint8Array(a[at-1-dt]);dt==1&&(nt[at-1].dispose=2),st=new Uint8Array(it*ut*4),UPNG._copyTile(Ot,s,$,st,it,ut,-lt,-et,0),ft=UPNG._copyTile(ot,s,$,st,it,ut,-lt,-et,3)?1:0,ft==1?UPNG.encode._prepareDiff(ot,s,$,st,{x:lt,y:et,width:it,height:ut}):UPNG._copyTile(ot,s,$,st,it,ut,-lt,-et,0)}else st=ot.slice(0);nt.push({rect:{x:lt,y:et,width:it,height:ut},img:st,blend:ft,dispose:0})}if(_)for(var at=0;at<nt.length;at++){var Tt=nt[at];if(Tt.blend!=1){var wt=Tt.rect,Ct=nt[at-1].rect,It=Math.min(wt.x,Ct.x),yt=Math.min(wt.y,Ct.y),Rt=Math.max(wt.x+wt.width,Ct.x+Ct.width),kt=Math.max(wt.y+wt.height,Ct.y+Ct.height),jt={x:It,y:yt,width:Rt-It,height:kt-yt};nt[at-1].dispose=1,at-1!=0&&UPNG.encode._updateFrame(a,s,$,nt,at-1,jt,_e),UPNG.encode._updateFrame(a,s,$,nt,at,jt,_e)}}var Ht=0;if(a.length!=1)for(var St=0;St<nt.length;St++){var Tt=nt[St];Ht+=Tt.rect.width*Tt.rect.height}return nt},UPNG.encode._updateFrame=function(a,s,$,_,_e,tt,nt){for(var at=Uint8Array,ot=Uint32Array,rt=new at(a[_e-1]),st=new ot(a[_e-1]),lt=_e+1<a.length?new at(a[_e+1]):null,et=new at(a[_e]),it=new ot(et.buffer),ut=s,ft=$,ht=-1,dt=-1,gt=0;gt<tt.height;gt++)for(var pt=0;pt<tt.width;pt++){var mt=tt.x+pt,ct=tt.y+gt,vt=ct*s+mt,At=it[vt];At==0||_[_e-1].dispose==0&&st[vt]==At&&(lt==null||lt[vt*4+3]!=0)||(mt<ut&&(ut=mt),mt>ht&&(ht=mt),ct<ft&&(ft=ct),ct>dt&&(dt=ct))}ht==-1&&(ut=ft=ht=dt=0),nt&&((ut&1)==1&&ut--,(ft&1)==1&&ft--),tt={x:ut,y:ft,width:ht-ut+1,height:dt-ft+1};var xt=_[_e];xt.rect=tt,xt.blend=1,xt.img=new Uint8Array(tt.width*tt.height*4),_[_e-1].dispose==0?(UPNG._copyTile(rt,s,$,xt.img,tt.width,tt.height,-tt.x,-tt.y,0),UPNG.encode._prepareDiff(et,s,$,xt.img,tt)):UPNG._copyTile(et,s,$,xt.img,tt.width,tt.height,-tt.x,-tt.y,0)},UPNG.encode._prepareDiff=function(a,s,$,_,_e){UPNG._copyTile(a,s,$,_,_e.width,_e.height,-_e.x,-_e.y,2)},UPNG.encode._filterZero=function(a,s,$,_,_e,tt,nt){var at=[],ot=[0,1,2,3,4];tt!=-1?ot=[tt]:(s*_>5e5||$==1)&&(ot=[0]);var rt;nt&&(rt={level:0});for(var st=nt&&UZIP!=null?UZIP:pako$1,lt=0;lt<ot.length;lt++){for(var et=0;et<s;et++)UPNG.encode._filterLine(_e,a,et,_,$,ot[lt]);at.push(st.deflate(_e,rt))}for(var it,ut=1e9,lt=0;lt<at.length;lt++)at[lt].length<ut&&(it=lt,ut=at[lt].length);return at[it]},UPNG.encode._filterLine=function(a,s,$,_,_e,tt){var nt=$*_,at=nt+$,ot=UPNG.decode._paeth;if(a[at]=tt,at++,tt==0)if(_<500)for(var rt=0;rt<_;rt++)a[at+rt]=s[nt+rt];else a.set(new Uint8Array(s.buffer,nt,_),at);else if(tt==1){for(var rt=0;rt<_e;rt++)a[at+rt]=s[nt+rt];for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt]-s[nt+rt-_e]+256&255}else if($==0){for(var rt=0;rt<_e;rt++)a[at+rt]=s[nt+rt];if(tt==2)for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt];if(tt==3)for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt]-(s[nt+rt-_e]>>1)+256&255;if(tt==4)for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt]-ot(s[nt+rt-_e],0,0)+256&255}else{if(tt==2)for(var rt=0;rt<_;rt++)a[at+rt]=s[nt+rt]+256-s[nt+rt-_]&255;if(tt==3){for(var rt=0;rt<_e;rt++)a[at+rt]=s[nt+rt]+256-(s[nt+rt-_]>>1)&255;for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt]+256-(s[nt+rt-_]+s[nt+rt-_e]>>1)&255}if(tt==4){for(var rt=0;rt<_e;rt++)a[at+rt]=s[nt+rt]+256-ot(0,s[nt+rt-_],0)&255;for(var rt=_e;rt<_;rt++)a[at+rt]=s[nt+rt]+256-ot(s[nt+rt-_e],s[nt+rt-_],s[nt+rt-_e-_])&255}}},UPNG.crc={table:function(){for(var a=new Uint32Array(256),s=0;s<256;s++){for(var $=s,_=0;_<8;_++)$&1?$=3988292384^$>>>1:$=$>>>1;a[s]=$}return a}(),update:function(a,s,$,_){for(var _e=0;_e<_;_e++)a=UPNG.crc.table[(a^s[$+_e])&255]^a>>>8;return a},crc:function(a,s,$){return UPNG.crc.update(4294967295,a,s,$)^4294967295}},UPNG.quantize=function(a,s){var $=new Uint8Array(a),_=$.slice(0),_e=new Uint32Array(_.buffer),tt=UPNG.quantize.getKDtree(_,s),nt=tt[0],at=tt[1];UPNG.quantize.planeDst;for(var ot=$,rt=_e,st=ot.length,lt=new Uint8Array($.length>>2),et=0;et<st;et+=4){var it=ot[et]*.00392156862745098,ut=ot[et+1]*(1/255),ft=ot[et+2]*(1/255),ht=ot[et+3]*(1/255),dt=UPNG.quantize.getNearest(nt,it,ut,ft,ht);lt[et>>2]=dt.ind,rt[et>>2]=dt.est.rgba}return{abuf:_.buffer,inds:lt,plte:at}},UPNG.quantize.getKDtree=function(a,s,$){$==null&&($=1e-4);var _=new Uint32Array(a.buffer),_e={i0:0,i1:a.length,bst:null,est:null,tdst:0,left:null,right:null};_e.bst=UPNG.quantize.stats(a,_e.i0,_e.i1),_e.est=UPNG.quantize.estats(_e.bst);for(var tt=[_e];tt.length<s;){for(var nt=0,at=0,ot=0;ot<tt.length;ot++)tt[ot].est.L>nt&&(nt=tt[ot].est.L,at=ot);if(nt<$)break;var rt=tt[at],st=UPNG.quantize.splitPixels(a,_,rt.i0,rt.i1,rt.est.e,rt.est.eMq255),lt=rt.i0>=st||rt.i1<=st;if(lt){rt.est.L=0;continue}var et={i0:rt.i0,i1:st,bst:null,est:null,tdst:0,left:null,right:null};et.bst=UPNG.quantize.stats(a,et.i0,et.i1),et.est=UPNG.quantize.estats(et.bst);var it={i0:st,i1:rt.i1,bst:null,est:null,tdst:0,left:null,right:null};it.bst={R:[],m:[],N:rt.bst.N-et.bst.N};for(var ot=0;ot<16;ot++)it.bst.R[ot]=rt.bst.R[ot]-et.bst.R[ot];for(var ot=0;ot<4;ot++)it.bst.m[ot]=rt.bst.m[ot]-et.bst.m[ot];it.est=UPNG.quantize.estats(it.bst),rt.left=et,rt.right=it,tt[at]=et,tt.push(it)}tt.sort(function(ut,ft){return ft.bst.N-ut.bst.N});for(var ot=0;ot<tt.length;ot++)tt[ot].ind=ot;return[_e,tt]},UPNG.quantize.getNearest=function(a,s,$,_,_e){if(a.left==null)return a.tdst=UPNG.quantize.dist(a.est.q,s,$,_,_e),a;var tt=UPNG.quantize.planeDst(a.est,s,$,_,_e),nt=a.left,at=a.right;tt>0&&(nt=a.right,at=a.left);var ot=UPNG.quantize.getNearest(nt,s,$,_,_e);if(ot.tdst<=tt*tt)return ot;var rt=UPNG.quantize.getNearest(at,s,$,_,_e);return rt.tdst<ot.tdst?rt:ot},UPNG.quantize.planeDst=function(a,s,$,_,_e){var tt=a.e;return tt[0]*s+tt[1]*$+tt[2]*_+tt[3]*_e-a.eMq},UPNG.quantize.dist=function(a,s,$,_,_e){var tt=s-a[0],nt=$-a[1],at=_-a[2],ot=_e-a[3];return tt*tt+nt*nt+at*at+ot*ot},UPNG.quantize.splitPixels=function(a,s,$,_,_e,tt){var nt=UPNG.quantize.vecDot;for(_-=4;$<_;){for(;nt(a,$,_e)<=tt;)$+=4;for(;nt(a,_,_e)>tt;)_-=4;if($>=_)break;var at=s[$>>2];s[$>>2]=s[_>>2],s[_>>2]=at,$+=4,_-=4}for(;nt(a,$,_e)>tt;)$-=4;return $+4},UPNG.quantize.vecDot=function(a,s,$){return a[s]*$[0]+a[s+1]*$[1]+a[s+2]*$[2]+a[s+3]*$[3]},UPNG.quantize.stats=function(a,s,$){for(var _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],_e=[0,0,0,0],tt=$-s>>2,nt=s;nt<$;nt+=4){var at=a[nt]*.00392156862745098,ot=a[nt+1]*(1/255),rt=a[nt+2]*(1/255),st=a[nt+3]*(1/255);_e[0]+=at,_e[1]+=ot,_e[2]+=rt,_e[3]+=st,_[0]+=at*at,_[1]+=at*ot,_[2]+=at*rt,_[3]+=at*st,_[5]+=ot*ot,_[6]+=ot*rt,_[7]+=ot*st,_[10]+=rt*rt,_[11]+=rt*st,_[15]+=st*st}return _[4]=_[1],_[8]=_[2],_[9]=_[6],_[12]=_[3],_[13]=_[7],_[14]=_[11],{R:_,m:_e,N:tt}},UPNG.quantize.estats=function(a){var s=a.R,$=a.m,_=a.N,_e=$[0],tt=$[1],nt=$[2],at=$[3],ot=_==0?0:1/_,rt=[s[0]-_e*_e*ot,s[1]-_e*tt*ot,s[2]-_e*nt*ot,s[3]-_e*at*ot,s[4]-tt*_e*ot,s[5]-tt*tt*ot,s[6]-tt*nt*ot,s[7]-tt*at*ot,s[8]-nt*_e*ot,s[9]-nt*tt*ot,s[10]-nt*nt*ot,s[11]-nt*at*ot,s[12]-at*_e*ot,s[13]-at*tt*ot,s[14]-at*nt*ot,s[15]-at*at*ot],st=rt,lt=UPNG.M4,et=[.5,.5,.5,.5],it=0,ut=0;if(_!=0)for(var ft=0;ft<10&&(et=lt.multVec(st,et),ut=Math.sqrt(lt.dot(et,et)),et=lt.sml(1/ut,et),!(Math.abs(ut-it)<1e-9));ft++)it=ut;var ht=[_e*ot,tt*ot,nt*ot,at*ot],dt=lt.dot(lt.sml(255,ht),et);return{Cov:rt,q:ht,e:et,L:it,eMq255:dt,eMq:lt.dot(et,ht),rgba:(Math.round(255*ht[3])<<24|Math.round(255*ht[2])<<16|Math.round(255*ht[1])<<8|Math.round(255*ht[0])<<0)>>>0}},UPNG.M4={multVec:function(a,s){return[a[0]*s[0]+a[1]*s[1]+a[2]*s[2]+a[3]*s[3],a[4]*s[0]+a[5]*s[1]+a[6]*s[2]+a[7]*s[3],a[8]*s[0]+a[9]*s[1]+a[10]*s[2]+a[11]*s[3],a[12]*s[0]+a[13]*s[1]+a[14]*s[2]+a[15]*s[3]]},dot:function(a,s){return a[0]*s[0]+a[1]*s[1]+a[2]*s[2]+a[3]*s[3]},sml:function(a,s){return[a*s[0],a*s[1],a*s[2],a*s[3]]}},UPNG.encode.concatRGBA=function(a){for(var s=0,$=0;$<a.length;$++)s+=a[$].byteLength;for(var _=new Uint8Array(s),_e=0,$=0;$<a.length;$++){for(var tt=new Uint8Array(a[$]),nt=tt.length,at=0;at<nt;at+=4){var ot=tt[at],rt=tt[at+1],st=tt[at+2],lt=tt[at+3];lt==0&&(ot=rt=st=0),_[_e+at]=ot,_[_e+at+1]=rt,_[_e+at+2]=st,_[_e+at+3]=lt}_e+=nt}return _.buffer};var PngType;(function(a){a.Greyscale="Greyscale",a.Truecolour="Truecolour",a.IndexedColour="IndexedColour",a.GreyscaleWithAlpha="GreyscaleWithAlpha",a.TruecolourWithAlpha="TruecolourWithAlpha"})(PngType||(PngType={}));const asEnum=(a,s)=>{if(a!==void 0)return s[a]};var NonFullScreenPageMode;(function(a){a.UseNone="UseNone",a.UseOutlines="UseOutlines",a.UseThumbs="UseThumbs",a.UseOC="UseOC"})(NonFullScreenPageMode||(NonFullScreenPageMode={}));var ReadingDirection;(function(a){a.L2R="L2R",a.R2L="R2L"})(ReadingDirection||(ReadingDirection={}));var PrintScaling;(function(a){a.None="None",a.AppDefault="AppDefault"})(PrintScaling||(PrintScaling={}));var Duplex;(function(a){a.Simplex="Simplex",a.DuplexFlipShortEdge="DuplexFlipShortEdge",a.DuplexFlipLongEdge="DuplexFlipLongEdge"})(Duplex||(Duplex={}));class ViewerPreferences{constructor(s){this.dict=s}lookupBool(s){const $=this.dict.lookup(PDFName.of(s));if($ instanceof PDFBool)return $}lookupName(s){const $=this.dict.lookup(PDFName.of(s));if($ instanceof PDFName)return $}HideToolbar(){return this.lookupBool("HideToolbar")}HideMenubar(){return this.lookupBool("HideMenubar")}HideWindowUI(){return this.lookupBool("HideWindowUI")}FitWindow(){return this.lookupBool("FitWindow")}CenterWindow(){return this.lookupBool("CenterWindow")}DisplayDocTitle(){return this.lookupBool("DisplayDocTitle")}NonFullScreenPageMode(){return this.lookupName("NonFullScreenPageMode")}Direction(){return this.lookupName("Direction")}PrintScaling(){return this.lookupName("PrintScaling")}Duplex(){return this.lookupName("Duplex")}PickTrayByPDFSize(){return this.lookupBool("PickTrayByPDFSize")}PrintPageRange(){const s=this.dict.lookup(PDFName.of("PrintPageRange"));if(s instanceof PDFArray)return s}NumCopies(){const s=this.dict.lookup(PDFName.of("NumCopies"));if(s instanceof PDFNumber)return s}getHideToolbar(){var s,$;return($=(s=this.HideToolbar())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getHideMenubar(){var s,$;return($=(s=this.HideMenubar())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getHideWindowUI(){var s,$;return($=(s=this.HideWindowUI())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getFitWindow(){var s,$;return($=(s=this.FitWindow())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getCenterWindow(){var s,$;return($=(s=this.CenterWindow())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getDisplayDocTitle(){var s,$;return($=(s=this.DisplayDocTitle())===null||s===void 0?void 0:s.asBoolean())!==null&&$!==void 0?$:!1}getNonFullScreenPageMode(){var s,$;const _=(s=this.NonFullScreenPageMode())===null||s===void 0?void 0:s.decodeText();return($=asEnum(_,NonFullScreenPageMode))!==null&&$!==void 0?$:NonFullScreenPageMode.UseNone}getReadingDirection(){var s,$;const _=(s=this.Direction())===null||s===void 0?void 0:s.decodeText();return($=asEnum(_,ReadingDirection))!==null&&$!==void 0?$:ReadingDirection.L2R}getPrintScaling(){var s,$;const _=(s=this.PrintScaling())===null||s===void 0?void 0:s.decodeText();return($=asEnum(_,PrintScaling))!==null&&$!==void 0?$:PrintScaling.AppDefault}getDuplex(){var s;const $=(s=this.Duplex())===null||s===void 0?void 0:s.decodeText();return asEnum($,Duplex)}getPickTrayByPDFSize(){var s;return(s=this.PickTrayByPDFSize())===null||s===void 0?void 0:s.asBoolean()}getPrintPageRange(){const s=this.PrintPageRange();if(!s)return[];const $=[];for(let _=0;_<s.size();_+=2){const _e=s.lookup(_,PDFNumber).asNumber(),tt=s.lookup(_+1,PDFNumber).asNumber();$.push({start:_e,end:tt})}return $}getNumCopies(){var s,$;return($=(s=this.NumCopies())===null||s===void 0?void 0:s.asNumber())!==null&&$!==void 0?$:1}setHideToolbar(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("HideToolbar"),$)}setHideMenubar(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("HideMenubar"),$)}setHideWindowUI(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("HideWindowUI"),$)}setFitWindow(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("FitWindow"),$)}setCenterWindow(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("CenterWindow"),$)}setDisplayDocTitle(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("DisplayDocTitle"),$)}setNonFullScreenPageMode(s){assertIsOneOf(s,"nonFullScreenPageMode",NonFullScreenPageMode);const $=PDFName.of(s);this.dict.set(PDFName.of("NonFullScreenPageMode"),$)}setReadingDirection(s){assertIsOneOf(s,"readingDirection",ReadingDirection);const $=PDFName.of(s);this.dict.set(PDFName.of("Direction"),$)}setPrintScaling(s){assertIsOneOf(s,"printScaling",PrintScaling);const $=PDFName.of(s);this.dict.set(PDFName.of("PrintScaling"),$)}setDuplex(s){assertIsOneOf(s,"duplex",Duplex);const $=PDFName.of(s);this.dict.set(PDFName.of("Duplex"),$)}setPickTrayByPDFSize(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("PickTrayByPDFSize"),$)}setPrintPageRange(s){Array.isArray(s)||(s=[s]);const $=[];for(let _e=0,tt=s.length;_e<tt;_e++)$.push(s[_e].start),$.push(s[_e].end);assertEachIs($,"printPageRange",["number"]);const _=this.dict.context.obj($);this.dict.set(PDFName.of("PrintPageRange"),_)}setNumCopies(s){assertRange(s,"numCopies",1,Number.MAX_VALUE),assertInteger(s,"numCopies");const $=this.dict.context.obj(s);this.dict.set(PDFName.of("NumCopies"),$)}}ViewerPreferences.fromDict=a=>new ViewerPreferences(a),ViewerPreferences.create=a=>{const s=a.obj({});return new ViewerPreferences(s)};const tfRegex=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+Tf/;class PDFAcroField{constructor(s,$){this.dict=s,this.ref=$}T(){return this.dict.lookupMaybe(PDFName.of("T"),PDFString,PDFHexString)}Ff(){const s=this.getInheritableAttribute(PDFName.of("Ff"));return this.dict.context.lookupMaybe(s,PDFNumber)}V(){const s=this.getInheritableAttribute(PDFName.of("V"));return this.dict.context.lookup(s)}Kids(){return this.dict.lookupMaybe(PDFName.of("Kids"),PDFArray)}DA(){const s=this.dict.lookup(PDFName.of("DA"));if(s instanceof PDFString||s instanceof PDFHexString)return s}setKids(s){this.dict.set(PDFName.of("Kids"),this.dict.context.obj(s))}getParent(){const s=this.dict.get(PDFName.of("Parent"));if(s instanceof PDFRef){const $=this.dict.lookup(PDFName.of("Parent"),PDFDict);return new PDFAcroField($,s)}}setParent(s){s?this.dict.set(PDFName.of("Parent"),s):this.dict.delete(PDFName.of("Parent"))}getFullyQualifiedName(){const s=this.getParent();return s?`${s.getFullyQualifiedName()}.${this.getPartialName()}`:this.getPartialName()}getPartialName(){var s;return(s=this.T())===null||s===void 0?void 0:s.decodeText()}setPartialName(s){s?this.dict.set(PDFName.of("T"),PDFHexString.fromText(s)):this.dict.delete(PDFName.of("T"))}setDefaultAppearance(s){this.dict.set(PDFName.of("DA"),PDFString.of(s))}getDefaultAppearance(){const s=this.DA();return s instanceof PDFHexString?s.decodeText():s==null?void 0:s.asString()}setFontSize(s){var $;const _=($=this.getFullyQualifiedName())!==null&&$!==void 0?$:"",_e=this.getDefaultAppearance();if(!_e)throw new MissingDAEntryError(_);const tt=findLastMatch(_e,tfRegex);if(!tt.match)throw new MissingTfOperatorError(_);const nt=_e.slice(0,tt.pos-tt.match[0].length),at=tt.pos<=_e.length?_e.slice(tt.pos):"",ot=tt.match[1],rt=`${nt} /${ot} ${s} Tf ${at}`;this.setDefaultAppearance(rt)}getFlags(){var s,$;return($=(s=this.Ff())===null||s===void 0?void 0:s.asNumber())!==null&&$!==void 0?$:0}setFlags(s){this.dict.set(PDFName.of("Ff"),PDFNumber.of(s))}hasFlag(s){return(this.getFlags()&s)!==0}setFlag(s){const $=this.getFlags();this.setFlags($|s)}clearFlag(s){const $=this.getFlags();this.setFlags($&~s)}setFlagTo(s,$){$?this.setFlag(s):this.clearFlag(s)}getInheritableAttribute(s){let $;return this.ascend(_=>{$||($=_.dict.get(s))}),$}ascend(s){s(this);const $=this.getParent();$&&$.ascend(s)}}class BorderStyle{constructor(s){this.dict=s}W(){const s=this.dict.lookup(PDFName.of("W"));if(s instanceof PDFNumber)return s}getWidth(){var s,$;return($=(s=this.W())===null||s===void 0?void 0:s.asNumber())!==null&&$!==void 0?$:1}setWidth(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("W"),$)}}BorderStyle.fromDict=a=>new BorderStyle(a);class PDFAnnotation{constructor(s){this.dict=s}Rect(){return this.dict.lookup(PDFName.of("Rect"),PDFArray)}AP(){return this.dict.lookupMaybe(PDFName.of("AP"),PDFDict)}F(){const s=this.dict.lookup(PDFName.of("F"));return this.dict.context.lookupMaybe(s,PDFNumber)}getRectangle(){var s;const $=this.Rect();return(s=$==null?void 0:$.asRectangle())!==null&&s!==void 0?s:{x:0,y:0,width:0,height:0}}setRectangle(s){const{x:$,y:_,width:_e,height:tt}=s,nt=this.dict.context.obj([$,_,$+_e,_+tt]);this.dict.set(PDFName.of("Rect"),nt)}getAppearanceState(){const s=this.dict.lookup(PDFName.of("AS"));if(s instanceof PDFName)return s}setAppearanceState(s){this.dict.set(PDFName.of("AS"),s)}setAppearances(s){this.dict.set(PDFName.of("AP"),s)}ensureAP(){let s=this.AP();return s||(s=this.dict.context.obj({}),this.dict.set(PDFName.of("AP"),s)),s}getNormalAppearance(){const $=this.ensureAP().get(PDFName.of("N"));if($ instanceof PDFRef||$ instanceof PDFDict)return $;throw new Error(`Unexpected N type: ${$==null?void 0:$.constructor.name}`)}setNormalAppearance(s){this.ensureAP().set(PDFName.of("N"),s)}setRolloverAppearance(s){this.ensureAP().set(PDFName.of("R"),s)}setDownAppearance(s){this.ensureAP().set(PDFName.of("D"),s)}removeRolloverAppearance(){const s=this.AP();s==null||s.delete(PDFName.of("R"))}removeDownAppearance(){const s=this.AP();s==null||s.delete(PDFName.of("D"))}getAppearances(){const s=this.AP();if(!s)return;const $=s.lookup(PDFName.of("N"),PDFDict,PDFStream),_=s.lookupMaybe(PDFName.of("R"),PDFDict,PDFStream),_e=s.lookupMaybe(PDFName.of("D"),PDFDict,PDFStream);return{normal:$,rollover:_,down:_e}}getFlags(){var s,$;return($=(s=this.F())===null||s===void 0?void 0:s.asNumber())!==null&&$!==void 0?$:0}setFlags(s){this.dict.set(PDFName.of("F"),PDFNumber.of(s))}hasFlag(s){return(this.getFlags()&s)!==0}setFlag(s){const $=this.getFlags();this.setFlags($|s)}clearFlag(s){const $=this.getFlags();this.setFlags($&~s)}setFlagTo(s,$){$?this.setFlag(s):this.clearFlag(s)}}PDFAnnotation.fromDict=a=>new PDFAnnotation(a);class AppearanceCharacteristics{constructor(s){this.dict=s}R(){const s=this.dict.lookup(PDFName.of("R"));if(s instanceof PDFNumber)return s}BC(){const s=this.dict.lookup(PDFName.of("BC"));if(s instanceof PDFArray)return s}BG(){const s=this.dict.lookup(PDFName.of("BG"));if(s instanceof PDFArray)return s}CA(){const s=this.dict.lookup(PDFName.of("CA"));if(s instanceof PDFHexString||s instanceof PDFString)return s}RC(){const s=this.dict.lookup(PDFName.of("RC"));if(s instanceof PDFHexString||s instanceof PDFString)return s}AC(){const s=this.dict.lookup(PDFName.of("AC"));if(s instanceof PDFHexString||s instanceof PDFString)return s}getRotation(){var s;return(s=this.R())===null||s===void 0?void 0:s.asNumber()}getBorderColor(){const s=this.BC();if(!s)return;const $=[];for(let _=0,_e=s==null?void 0:s.size();_<_e;_++){const tt=s.get(_);tt instanceof PDFNumber&&$.push(tt.asNumber())}return $}getBackgroundColor(){const s=this.BG();if(!s)return;const $=[];for(let _=0,_e=s==null?void 0:s.size();_<_e;_++){const tt=s.get(_);tt instanceof PDFNumber&&$.push(tt.asNumber())}return $}getCaptions(){const s=this.CA(),$=this.RC(),_=this.AC();return{normal:s==null?void 0:s.decodeText(),rollover:$==null?void 0:$.decodeText(),down:_==null?void 0:_.decodeText()}}setRotation(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("R"),$)}setBorderColor(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("BC"),$)}setBackgroundColor(s){const $=this.dict.context.obj(s);this.dict.set(PDFName.of("BG"),$)}setCaptions(s){const $=PDFHexString.fromText(s.normal);if(this.dict.set(PDFName.of("CA"),$),s.rollover){const _=PDFHexString.fromText(s.rollover);this.dict.set(PDFName.of("RC"),_)}else this.dict.delete(PDFName.of("RC"));if(s.down){const _=PDFHexString.fromText(s.down);this.dict.set(PDFName.of("AC"),_)}else this.dict.delete(PDFName.of("AC"))}}AppearanceCharacteristics.fromDict=a=>new AppearanceCharacteristics(a);class PDFWidgetAnnotation extends PDFAnnotation{MK(){const s=this.dict.lookup(PDFName.of("MK"));if(s instanceof PDFDict)return s}BS(){const s=this.dict.lookup(PDFName.of("BS"));if(s instanceof PDFDict)return s}DA(){const s=this.dict.lookup(PDFName.of("DA"));if(s instanceof PDFString||s instanceof PDFHexString)return s}P(){const s=this.dict.get(PDFName.of("P"));if(s instanceof PDFRef)return s}setP(s){this.dict.set(PDFName.of("P"),s)}setDefaultAppearance(s){this.dict.set(PDFName.of("DA"),PDFString.of(s))}getDefaultAppearance(){const s=this.DA();return s instanceof PDFHexString?s.decodeText():s==null?void 0:s.asString()}getAppearanceCharacteristics(){const s=this.MK();if(s)return AppearanceCharacteristics.fromDict(s)}getOrCreateAppearanceCharacteristics(){const s=this.MK();if(s)return AppearanceCharacteristics.fromDict(s);const $=AppearanceCharacteristics.fromDict(this.dict.context.obj({}));return this.dict.set(PDFName.of("MK"),$.dict),$}getBorderStyle(){const s=this.BS();if(s)return BorderStyle.fromDict(s)}getOrCreateBorderStyle(){const s=this.BS();if(s)return BorderStyle.fromDict(s);const $=BorderStyle.fromDict(this.dict.context.obj({}));return this.dict.set(PDFName.of("BS"),$.dict),$}getOnValue(){var s;const $=(s=this.getAppearances())===null||s===void 0?void 0:s.normal;if($ instanceof PDFDict){const _=$.keys();for(let _e=0,tt=_.length;_e<tt;_e++){const nt=_[_e];if(nt!==PDFName.of("Off"))return nt}}}}PDFWidgetAnnotation.fromDict=a=>new PDFWidgetAnnotation(a),PDFWidgetAnnotation.create=(a,s)=>{const $=a.obj({Type:"Annot",Subtype:"Widget",Rect:[0,0,0,0],Parent:s});return new PDFWidgetAnnotation($)};class PDFAcroTerminal extends PDFAcroField{FT(){const s=this.getInheritableAttribute(PDFName.of("FT"));return this.dict.context.lookup(s,PDFName)}getWidgets(){const s=this.Kids();if(!s)return[PDFWidgetAnnotation.fromDict(this.dict)];const $=new Array(s.size());for(let _=0,_e=s.size();_<_e;_++){const tt=s.lookup(_,PDFDict);$[_]=PDFWidgetAnnotation.fromDict(tt)}return $}addWidget(s){const{Kids:$}=this.normalizedEntries();$.push(s)}removeWidget(s){const $=this.Kids();if($){if(s<0||s>$.size())throw new IndexOutOfBoundsError(s,0,$.size());$.remove(s)}else{if(s!==0)throw new IndexOutOfBoundsError(s,0,0);this.setKids([])}}normalizedEntries(){let s=this.Kids();return s||(s=this.dict.context.obj([this.ref]),this.dict.set(PDFName.of("Kids"),s)),{Kids:s}}}PDFAcroTerminal.fromDict=(a,s)=>new PDFAcroTerminal(a,s);class PDFAcroButton extends PDFAcroTerminal{Opt(){return this.dict.lookupMaybe(PDFName.of("Opt"),PDFString,PDFHexString,PDFArray)}setOpt(s){this.dict.set(PDFName.of("Opt"),this.dict.context.obj(s))}getExportValues(){const s=this.Opt();if(!s)return;if(s instanceof PDFString||s instanceof PDFHexString)return[s];const $=[];for(let _=0,_e=s.size();_<_e;_++){const tt=s.lookup(_);(tt instanceof PDFString||tt instanceof PDFHexString)&&$.push(tt)}return $}removeExportValue(s){const $=this.Opt();if($)if($ instanceof PDFString||$ instanceof PDFHexString){if(s!==0)throw new IndexOutOfBoundsError(s,0,0);this.setOpt([])}else{if(s<0||s>$.size())throw new IndexOutOfBoundsError(s,0,$.size());$.remove(s)}}normalizeExportValues(){var s,$,_,_e;const tt=(s=this.getExportValues())!==null&&s!==void 0?s:[],nt=[],at=this.getWidgets();for(let ot=0,rt=at.length;ot<rt;ot++){const st=at[ot],lt=($=tt[ot])!==null&&$!==void 0?$:PDFHexString.fromText((_e=(_=st.getOnValue())===null||_===void 0?void 0:_.decodeText())!==null&&_e!==void 0?_e:"");nt.push(lt)}this.setOpt(nt)}addOpt(s,$){var _;this.normalizeExportValues();const _e=s.decodeText();let tt;if($){const at=(_=this.getExportValues())!==null&&_!==void 0?_:[];for(let ot=0,rt=at.length;ot<rt;ot++)at[ot].decodeText()===_e&&(tt=ot)}const nt=this.Opt();return nt.push(s),tt??nt.size()-1}addWidgetWithOpt(s,$,_){const _e=this.addOpt($,_),tt=PDFName.of(String(_e));return this.addWidget(s),tt}}class PDFAcroCheckBox extends PDFAcroButton{setValue(s){var $;const _=($=this.getOnValue())!==null&&$!==void 0?$:PDFName.of("Yes");if(s!==_&&s!==PDFName.of("Off"))throw new InvalidAcroFieldValueError;this.dict.set(PDFName.of("V"),s);const _e=this.getWidgets();for(let tt=0,nt=_e.length;tt<nt;tt++){const at=_e[tt],ot=at.getOnValue()===s?s:PDFName.of("Off");at.setAppearanceState(ot)}}getValue(){const s=this.V();return s instanceof PDFName?s:PDFName.of("Off")}getOnValue(){const[s]=this.getWidgets();return s==null?void 0:s.getOnValue()}}PDFAcroCheckBox.fromDict=(a,s)=>new PDFAcroCheckBox(a,s),PDFAcroCheckBox.create=a=>{const s=a.obj({FT:"Btn",Kids:[]}),$=a.register(s);return new PDFAcroCheckBox(s,$)};const flag$1=a=>1<<a;var AcroFieldFlags;(function(a){a[a.ReadOnly=flag$1(0)]="ReadOnly",a[a.Required=flag$1(1)]="Required",a[a.NoExport=flag$1(2)]="NoExport"})(AcroFieldFlags||(AcroFieldFlags={}));var AcroButtonFlags;(function(a){a[a.NoToggleToOff=flag$1(14)]="NoToggleToOff",a[a.Radio=flag$1(15)]="Radio",a[a.PushButton=flag$1(16)]="PushButton",a[a.RadiosInUnison=flag$1(25)]="RadiosInUnison"})(AcroButtonFlags||(AcroButtonFlags={}));var AcroTextFlags;(function(a){a[a.Multiline=flag$1(12)]="Multiline",a[a.Password=flag$1(13)]="Password",a[a.FileSelect=flag$1(20)]="FileSelect",a[a.DoNotSpellCheck=flag$1(22)]="DoNotSpellCheck",a[a.DoNotScroll=flag$1(23)]="DoNotScroll",a[a.Comb=flag$1(24)]="Comb",a[a.RichText=flag$1(25)]="RichText"})(AcroTextFlags||(AcroTextFlags={}));var AcroChoiceFlags;(function(a){a[a.Combo=flag$1(17)]="Combo",a[a.Edit=flag$1(18)]="Edit",a[a.Sort=flag$1(19)]="Sort",a[a.MultiSelect=flag$1(21)]="MultiSelect",a[a.DoNotSpellCheck=flag$1(22)]="DoNotSpellCheck",a[a.CommitOnSelChange=flag$1(26)]="CommitOnSelChange"})(AcroChoiceFlags||(AcroChoiceFlags={}));class PDFAcroChoice extends PDFAcroTerminal{setValues(s){if(this.hasFlag(AcroChoiceFlags.Combo)&&!this.hasFlag(AcroChoiceFlags.Edit)&&!this.valuesAreValid(s))throw new InvalidAcroFieldValueError;if(s.length===0&&this.dict.delete(PDFName.of("V")),s.length===1&&this.dict.set(PDFName.of("V"),s[0]),s.length>1){if(!this.hasFlag(AcroChoiceFlags.MultiSelect))throw new MultiSelectValueError;this.dict.set(PDFName.of("V"),this.dict.context.obj(s))}this.updateSelectedIndices(s)}valuesAreValid(s){const $=this.getOptions();for(let _=0,_e=s.length;_<_e;_++){const tt=s[_].decodeText();if(!$.find(nt=>tt===(nt.display||nt.value).decodeText()))return!1}return!0}updateSelectedIndices(s){if(s.length>1){const $=new Array(s.length),_=this.getOptions();for(let _e=0,tt=s.length;_e<tt;_e++){const nt=s[_e].decodeText();$[_e]=_.findIndex(at=>nt===(at.display||at.value).decodeText())}this.dict.set(PDFName.of("I"),this.dict.context.obj($.sort()))}else this.dict.delete(PDFName.of("I"))}getValues(){const s=this.V();if(s instanceof PDFString||s instanceof PDFHexString)return[s];if(s instanceof PDFArray){const $=[];for(let _=0,_e=s.size();_<_e;_++){const tt=s.lookup(_);(tt instanceof PDFString||tt instanceof PDFHexString)&&$.push(tt)}return $}return[]}Opt(){return this.dict.lookupMaybe(PDFName.of("Opt"),PDFString,PDFHexString,PDFArray)}setOptions(s){const $=new Array(s.length);for(let _=0,_e=s.length;_<_e;_++){const{value:tt,display:nt}=s[_];$[_]=this.dict.context.obj([tt,nt||tt])}this.dict.set(PDFName.of("Opt"),this.dict.context.obj($))}getOptions(){const s=this.Opt();if(s instanceof PDFString||s instanceof PDFHexString)return[{value:s,display:s}];if(s instanceof PDFArray){const $=[];for(let _=0,_e=s.size();_<_e;_++){const tt=s.lookup(_);if((tt instanceof PDFString||tt instanceof PDFHexString)&&$.push({value:tt,display:tt}),tt instanceof PDFArray&&tt.size()>0){const nt=tt.lookup(0,PDFString,PDFHexString),at=tt.lookupMaybe(1,PDFString,PDFHexString);$.push({value:nt,display:at||nt})}}return $}return[]}}class PDFAcroComboBox extends PDFAcroChoice{}PDFAcroComboBox.fromDict=(a,s)=>new PDFAcroComboBox(a,s),PDFAcroComboBox.create=a=>{const s=a.obj({FT:"Ch",Ff:AcroChoiceFlags.Combo,Kids:[]}),$=a.register(s);return new PDFAcroComboBox(s,$)};class PDFAcroNonTerminal extends PDFAcroField{addField(s){const{Kids:$}=this.normalizedEntries();$==null||$.push(s)}normalizedEntries(){let s=this.Kids();return s||(s=this.dict.context.obj([]),this.dict.set(PDFName.of("Kids"),s)),{Kids:s}}}PDFAcroNonTerminal.fromDict=(a,s)=>new PDFAcroNonTerminal(a,s),PDFAcroNonTerminal.create=a=>{const s=a.obj({}),$=a.register(s);return new PDFAcroNonTerminal(s,$)};class PDFAcroSignature extends PDFAcroTerminal{}PDFAcroSignature.fromDict=(a,s)=>new PDFAcroSignature(a,s);class PDFAcroText extends PDFAcroTerminal{MaxLen(){const s=this.dict.lookup(PDFName.of("MaxLen"));if(s instanceof PDFNumber)return s}Q(){const s=this.dict.lookup(PDFName.of("Q"));if(s instanceof PDFNumber)return s}setMaxLength(s){this.dict.set(PDFName.of("MaxLen"),PDFNumber.of(s))}removeMaxLength(){this.dict.delete(PDFName.of("MaxLen"))}getMaxLength(){var s;return(s=this.MaxLen())===null||s===void 0?void 0:s.asNumber()}setQuadding(s){this.dict.set(PDFName.of("Q"),PDFNumber.of(s))}getQuadding(){var s;return(s=this.Q())===null||s===void 0?void 0:s.asNumber()}setValue(s){this.dict.set(PDFName.of("V"),s)}removeValue(){this.dict.delete(PDFName.of("V"))}getValue(){const s=this.V();if(s instanceof PDFString||s instanceof PDFHexString)return s}}PDFAcroText.fromDict=(a,s)=>new PDFAcroText(a,s),PDFAcroText.create=a=>{const s=a.obj({FT:"Tx",Kids:[]}),$=a.register(s);return new PDFAcroText(s,$)};class PDFAcroPushButton extends PDFAcroButton{}PDFAcroPushButton.fromDict=(a,s)=>new PDFAcroPushButton(a,s),PDFAcroPushButton.create=a=>{const s=a.obj({FT:"Btn",Ff:AcroButtonFlags.PushButton,Kids:[]}),$=a.register(s);return new PDFAcroPushButton(s,$)};class PDFAcroRadioButton extends PDFAcroButton{setValue(s){if(!this.getOnValues().includes(s)&&s!==PDFName.of("Off"))throw new InvalidAcroFieldValueError;this.dict.set(PDFName.of("V"),s);const _=this.getWidgets();for(let _e=0,tt=_.length;_e<tt;_e++){const nt=_[_e],at=nt.getOnValue()===s?s:PDFName.of("Off");nt.setAppearanceState(at)}}getValue(){const s=this.V();return s instanceof PDFName?s:PDFName.of("Off")}getOnValues(){const s=this.getWidgets(),$=[];for(let _=0,_e=s.length;_<_e;_++){const tt=s[_].getOnValue();tt&&$.push(tt)}return $}}PDFAcroRadioButton.fromDict=(a,s)=>new PDFAcroRadioButton(a,s),PDFAcroRadioButton.create=a=>{const s=a.obj({FT:"Btn",Ff:AcroButtonFlags.Radio,Kids:[]}),$=a.register(s);return new PDFAcroRadioButton(s,$)};class PDFAcroListBox extends PDFAcroChoice{}PDFAcroListBox.fromDict=(a,s)=>new PDFAcroListBox(a,s),PDFAcroListBox.create=a=>{const s=a.obj({FT:"Ch",Kids:[]}),$=a.register(s);return new PDFAcroListBox(s,$)};const createPDFAcroFields=a=>{if(!a)return[];const s=[];for(let $=0,_=a.size();$<_;$++){const _e=a.get($),tt=a.lookup($);_e instanceof PDFRef&&tt instanceof PDFDict&&s.push([createPDFAcroField(tt,_e),_e])}return s},createPDFAcroField=(a,s)=>isNonTerminalAcroField(a)?PDFAcroNonTerminal.fromDict(a,s):createPDFAcroTerminal(a,s),isNonTerminalAcroField=a=>{const s=a.lookup(PDFName.of("Kids"));if(s instanceof PDFArray)for(let $=0,_=s.size();$<_;$++){const _e=s.lookup($);if(_e instanceof PDFDict&&_e.has(PDFName.of("T")))return!0}return!1},createPDFAcroTerminal=(a,s)=>{const $=getInheritableAttribute(a,PDFName.of("FT")),_=a.context.lookup($,PDFName);return _===PDFName.of("Btn")?createPDFAcroButton(a,s):_===PDFName.of("Ch")?createPDFAcroChoice(a,s):_===PDFName.of("Tx")?PDFAcroText.fromDict(a,s):_===PDFName.of("Sig")?PDFAcroSignature.fromDict(a,s):PDFAcroTerminal.fromDict(a,s)},createPDFAcroButton=(a,s)=>{var $;const _=getInheritableAttribute(a,PDFName.of("Ff")),_e=a.context.lookupMaybe(_,PDFNumber),tt=($=_e==null?void 0:_e.asNumber())!==null&&$!==void 0?$:0;return flagIsSet(tt,AcroButtonFlags.PushButton)?PDFAcroPushButton.fromDict(a,s):flagIsSet(tt,AcroButtonFlags.Radio)?PDFAcroRadioButton.fromDict(a,s):PDFAcroCheckBox.fromDict(a,s)},createPDFAcroChoice=(a,s)=>{var $;const _=getInheritableAttribute(a,PDFName.of("Ff")),_e=a.context.lookupMaybe(_,PDFNumber),tt=($=_e==null?void 0:_e.asNumber())!==null&&$!==void 0?$:0;return flagIsSet(tt,AcroChoiceFlags.Combo)?PDFAcroComboBox.fromDict(a,s):PDFAcroListBox.fromDict(a,s)},flagIsSet=(a,s)=>(a&s)!==0,getInheritableAttribute=(a,s)=>{let $;return ascend(a,_=>{$||($=_.get(s))}),$},ascend=(a,s)=>{s(a);const $=a.lookupMaybe(PDFName.of("Parent"),PDFDict);$&&ascend($,s)};class PDFAcroForm{constructor(s){this.dict=s}Fields(){const s=this.dict.lookup(PDFName.of("Fields"));if(s instanceof PDFArray)return s}getFields(){const{Fields:s}=this.normalizedEntries(),$=new Array(s.size());for(let _=0,_e=s.size();_<_e;_++){const tt=s.get(_),nt=s.lookup(_,PDFDict);$[_]=[createPDFAcroField(nt,tt),tt]}return $}getAllFields(){const s=[],$=_=>{if(_)for(let _e=0,tt=_.length;_e<tt;_e++){const nt=_[_e];s.push(nt);const[at]=nt;at instanceof PDFAcroNonTerminal&&$(createPDFAcroFields(at.Kids()))}};return $(this.getFields()),s}addField(s){const{Fields:$}=this.normalizedEntries();$==null||$.push(s)}removeField(s){const $=s.getParent(),_=$===void 0?this.normalizedEntries().Fields:$.Kids(),_e=_==null?void 0:_.indexOf(s.ref);if(_===void 0||_e===void 0)throw new Error(`Tried to remove inexistent field ${s.getFullyQualifiedName()}`);_.remove(_e),$!==void 0&&_.size()===0&&this.removeField($)}normalizedEntries(){let s=this.Fields();return s||(s=this.dict.context.obj([]),this.dict.set(PDFName.of("Fields"),s)),{Fields:s}}}PDFAcroForm.fromDict=a=>new PDFAcroForm(a),PDFAcroForm.create=a=>{const s=a.obj({Fields:[]});return new PDFAcroForm(s)};class PDFCatalog extends PDFDict{Pages(){return this.lookup(PDFName.of("Pages"),PDFDict)}AcroForm(){return this.lookupMaybe(PDFName.of("AcroForm"),PDFDict)}getAcroForm(){const s=this.AcroForm();if(s)return PDFAcroForm.fromDict(s)}getOrCreateAcroForm(){let s=this.getAcroForm();if(!s){s=PDFAcroForm.create(this.context);const $=this.context.register(s.dict);this.set(PDFName.of("AcroForm"),$)}return s}ViewerPreferences(){return this.lookupMaybe(PDFName.of("ViewerPreferences"),PDFDict)}getViewerPreferences(){const s=this.ViewerPreferences();if(s)return ViewerPreferences.fromDict(s)}getOrCreateViewerPreferences(){let s=this.getViewerPreferences();if(!s){s=ViewerPreferences.create(this.context);const $=this.context.register(s.dict);this.set(PDFName.of("ViewerPreferences"),$)}return s}insertLeafNode(s,$){const _=this.get(PDFName.of("Pages"));return this.Pages().insertLeafNode(s,$)||_}removeLeafNode(s){this.Pages().removeLeafNode(s)}}PDFCatalog.withContextAndPages=(a,s)=>{const $=new Map;return $.set(PDFName.of("Type"),PDFName.of("Catalog")),$.set(PDFName.of("Pages"),s),new PDFCatalog($,a)},PDFCatalog.fromMapWithContext=(a,s)=>new PDFCatalog(a,s);class PDFPageTree extends PDFDict{Parent(){return this.lookup(PDFName.of("Parent"))}Kids(){return this.lookup(PDFName.of("Kids"),PDFArray)}Count(){return this.lookup(PDFName.of("Count"),PDFNumber)}pushTreeNode(s){this.Kids().push(s)}pushLeafNode(s){const $=this.Kids();this.insertLeafKid($.size(),s)}insertLeafNode(s,$){const _=this.Kids(),_e=this.Count().asNumber();if($>_e)throw new InvalidTargetIndexError($,_e);let tt=$;for(let nt=0,at=_.size();nt<at;nt++){if(tt===0){this.insertLeafKid(nt,s);return}const ot=_.get(nt),rt=this.context.lookup(ot);if(rt instanceof PDFPageTree){if(rt.Count().asNumber()>tt)return rt.insertLeafNode(s,tt)||ot;tt-=rt.Count().asNumber()}rt instanceof PDFPageLeaf&&(tt-=1)}if(tt===0){this.insertLeafKid(_.size(),s);return}throw new CorruptPageTreeError($,"insertLeafNode")}removeLeafNode(s,$=!0){const _=this.Kids(),_e=this.Count().asNumber();if(s>=_e)throw new InvalidTargetIndexError(s,_e);let tt=s;for(let nt=0,at=_.size();nt<at;nt++){const ot=_.get(nt),rt=this.context.lookup(ot);if(rt instanceof PDFPageTree)if(rt.Count().asNumber()>tt){rt.removeLeafNode(tt,$),$&&rt.Kids().size()===0&&_.remove(nt);return}else tt-=rt.Count().asNumber();if(rt instanceof PDFPageLeaf)if(tt===0){this.removeKid(nt);return}else tt-=1}throw new CorruptPageTreeError(s,"removeLeafNode")}ascend(s){s(this);const $=this.Parent();$&&$.ascend(s)}traverse(s){const $=this.Kids();for(let _=0,_e=$.size();_<_e;_++){const tt=$.get(_),nt=this.context.lookup(tt);nt instanceof PDFPageTree&&nt.traverse(s),s(nt,tt)}}insertLeafKid(s,$){const _=this.Kids();this.ascend(_e=>{const tt=_e.Count().asNumber()+1;_e.set(PDFName.of("Count"),PDFNumber.of(tt))}),_.insert(s,$)}removeKid(s){const $=this.Kids();$.lookup(s)instanceof PDFPageLeaf&&this.ascend(_e=>{const tt=_e.Count().asNumber()-1;_e.set(PDFName.of("Count"),PDFNumber.of(tt))}),$.remove(s)}}PDFPageTree.withContext=(a,s)=>{const $=new Map;return $.set(PDFName.of("Type"),PDFName.of("Pages")),$.set(PDFName.of("Kids"),a.obj([])),$.set(PDFName.of("Count"),a.obj(0)),s&&$.set(PDFName.of("Parent"),s),new PDFPageTree($,a)},PDFPageTree.fromMapWithContext=(a,s)=>new PDFPageTree(a,s);const IsDigit=new Uint8Array(256);IsDigit[CharCodes$1.Zero]=1,IsDigit[CharCodes$1.One]=1,IsDigit[CharCodes$1.Two]=1,IsDigit[CharCodes$1.Three]=1,IsDigit[CharCodes$1.Four]=1,IsDigit[CharCodes$1.Five]=1,IsDigit[CharCodes$1.Six]=1,IsDigit[CharCodes$1.Seven]=1,IsDigit[CharCodes$1.Eight]=1,IsDigit[CharCodes$1.Nine]=1;const IsNumericPrefix=new Uint8Array(256);IsNumericPrefix[CharCodes$1.Period]=1,IsNumericPrefix[CharCodes$1.Plus]=1,IsNumericPrefix[CharCodes$1.Minus]=1;const IsNumeric=new Uint8Array(256);for(let a=0,s=256;a<s;a++)IsNumeric[a]=IsDigit[a]||IsNumericPrefix[a]?1:0;const{Space:Space$1,CarriageReturn,Newline}=CharCodes$1,stream=[CharCodes$1.s,CharCodes$1.t,CharCodes$1.r,CharCodes$1.e,CharCodes$1.a,CharCodes$1.m],endstream=[CharCodes$1.e,CharCodes$1.n,CharCodes$1.d,CharCodes$1.s,CharCodes$1.t,CharCodes$1.r,CharCodes$1.e,CharCodes$1.a,CharCodes$1.m];CharCodes$1.Percent,CharCodes$1.P,CharCodes$1.D,CharCodes$1.F,CharCodes$1.Dash,CharCodes$1.Percent,CharCodes$1.Percent,CharCodes$1.E,CharCodes$1.O,CharCodes$1.F,CharCodes$1.o,CharCodes$1.b,CharCodes$1.j,CharCodes$1.e,CharCodes$1.n,CharCodes$1.d,CharCodes$1.o,CharCodes$1.b,CharCodes$1.j,CharCodes$1.x,CharCodes$1.r,CharCodes$1.e,CharCodes$1.f,CharCodes$1.t,CharCodes$1.r,CharCodes$1.a,CharCodes$1.i,CharCodes$1.l,CharCodes$1.e,CharCodes$1.r,CharCodes$1.s,CharCodes$1.t,CharCodes$1.a,CharCodes$1.r,CharCodes$1.t,CharCodes$1.x,CharCodes$1.r,CharCodes$1.e,CharCodes$1.f,CharCodes$1.t,CharCodes$1.r,CharCodes$1.u,CharCodes$1.e,CharCodes$1.f,CharCodes$1.a,CharCodes$1.l,CharCodes$1.s,CharCodes$1.e,CharCodes$1.n,CharCodes$1.u,CharCodes$1.l,CharCodes$1.l,[...stream],[...stream],[...stream],[...stream],[...endstream],[...endstream],[...endstream];const flag=a=>1<<a;var AnnotationFlags;(function(a){a[a.Invisible=flag(0)]="Invisible",a[a.Hidden=flag(1)]="Hidden",a[a.Print=flag(2)]="Print",a[a.NoZoom=flag(3)]="NoZoom",a[a.NoRotate=flag(4)]="NoRotate",a[a.NoView=flag(5)]="NoView",a[a.ReadOnly=flag(6)]="ReadOnly",a[a.Locked=flag(7)]="Locked",a[a.ToggleNoView=flag(8)]="ToggleNoView",a[a.LockedContents=flag(9)]="LockedContents"})(AnnotationFlags||(AnnotationFlags={}));var RotationTypes;(function(a){a.Degrees="degrees",a.Radians="radians"})(RotationTypes||(RotationTypes={}));const degrees=a=>(assertIs(a,"degreeAngle",["number"]),{type:RotationTypes.Degrees,angle:a}),degreesToRadians=a=>a*Math.PI/180;var LineCapStyle;(function(a){a[a.Butt=0]="Butt",a[a.Round=1]="Round",a[a.Projecting=2]="Projecting"})(LineCapStyle||(LineCapStyle={}));var LineJoinStyle;(function(a){a[a.Miter=0]="Miter",a[a.Round=1]="Round",a[a.Bevel=2]="Bevel"})(LineJoinStyle||(LineJoinStyle={}));var FillRule;(function(a){a.NonZero="f",a.EvenOdd="f*"})(FillRule||(FillRule={}));var TextRenderingMode;(function(a){a[a.Fill=0]="Fill",a[a.Outline=1]="Outline",a[a.FillAndOutline=2]="FillAndOutline",a[a.Invisible=3]="Invisible",a[a.FillAndClip=4]="FillAndClip",a[a.OutlineAndClip=5]="OutlineAndClip",a[a.FillAndOutlineAndClip=6]="FillAndOutlineAndClip",a[a.Clip=7]="Clip"})(TextRenderingMode||(TextRenderingMode={}));var colorString$1={exports:{}},colorName={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},simpleSwizzle={exports:{}},isArrayish$1=function a(s){return!s||typeof s=="string"?!1:s instanceof Array||Array.isArray(s)||s.length>=0&&(s.splice instanceof Function||Object.getOwnPropertyDescriptor(s,s.length-1)&&s.constructor.name!=="String")},isArrayish=isArrayish$1,concat=Array.prototype.concat,slice$1=Array.prototype.slice,swizzle$1=simpleSwizzle.exports=function a(s){for(var $=[],_=0,_e=s.length;_<_e;_++){var tt=s[_];isArrayish(tt)?$=concat.call($,slice$1.call(tt)):$.push(tt)}return $};swizzle$1.wrap=function(a){return function(){return a(swizzle$1(arguments))}};var simpleSwizzleExports=simpleSwizzle.exports,colorNames=colorName,swizzle=simpleSwizzleExports,hasOwnProperty$f=Object.hasOwnProperty,reverseNames=Object.create(null);for(var name in colorNames)hasOwnProperty$f.call(colorNames,name)&&(reverseNames[colorNames[name]]=name);var cs=colorString$1.exports={to:{},get:{}};cs.get=function(a){var s=a.substring(0,3).toLowerCase(),$,_;switch(s){case"hsl":$=cs.get.hsl(a),_="hsl";break;case"hwb":$=cs.get.hwb(a),_="hwb";break;default:$=cs.get.rgb(a),_="rgb";break}return $?{model:_,value:$}:null},cs.get.rgb=function(a){if(!a)return null;var s=/^#([a-f0-9]{3,4})$/i,$=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,_=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,_e=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,tt=/^(\w+)$/,nt=[0,0,0,1],at,ot,rt;if(at=a.match($)){for(rt=at[2],at=at[1],ot=0;ot<3;ot++){var st=ot*2;nt[ot]=parseInt(at.slice(st,st+2),16)}rt&&(nt[3]=parseInt(rt,16)/255)}else if(at=a.match(s)){for(at=at[1],rt=at[3],ot=0;ot<3;ot++)nt[ot]=parseInt(at[ot]+at[ot],16);rt&&(nt[3]=parseInt(rt+rt,16)/255)}else if(at=a.match(_)){for(ot=0;ot<3;ot++)nt[ot]=parseInt(at[ot+1],0);at[4]&&(at[5]?nt[3]=parseFloat(at[4])*.01:nt[3]=parseFloat(at[4]))}else if(at=a.match(_e)){for(ot=0;ot<3;ot++)nt[ot]=Math.round(parseFloat(at[ot+1])*2.55);at[4]&&(at[5]?nt[3]=parseFloat(at[4])*.01:nt[3]=parseFloat(at[4]))}else return(at=a.match(tt))?at[1]==="transparent"?[0,0,0,0]:hasOwnProperty$f.call(colorNames,at[1])?(nt=colorNames[at[1]],nt[3]=1,nt):null:null;for(ot=0;ot<3;ot++)nt[ot]=clamp(nt[ot],0,255);return nt[3]=clamp(nt[3],0,1),nt},cs.get.hsl=function(a){if(!a)return null;var s=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,$=a.match(s);if($){var _=parseFloat($[4]),_e=(parseFloat($[1])%360+360)%360,tt=clamp(parseFloat($[2]),0,100),nt=clamp(parseFloat($[3]),0,100),at=clamp(isNaN(_)?1:_,0,1);return[_e,tt,nt,at]}return null},cs.get.hwb=function(a){if(!a)return null;var s=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,$=a.match(s);if($){var _=parseFloat($[4]),_e=(parseFloat($[1])%360+360)%360,tt=clamp(parseFloat($[2]),0,100),nt=clamp(parseFloat($[3]),0,100),at=clamp(isNaN(_)?1:_,0,1);return[_e,tt,nt,at]}return null},cs.to.hex=function(){var a=swizzle(arguments);return"#"+hexDouble(a[0])+hexDouble(a[1])+hexDouble(a[2])+(a[3]<1?hexDouble(Math.round(a[3]*255)):"")},cs.to.rgb=function(){var a=swizzle(arguments);return a.length<4||a[3]===1?"rgb("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+")":"rgba("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+", "+a[3]+")"},cs.to.rgb.percent=function(){var a=swizzle(arguments),s=Math.round(a[0]/255*100),$=Math.round(a[1]/255*100),_=Math.round(a[2]/255*100);return a.length<4||a[3]===1?"rgb("+s+"%, "+$+"%, "+_+"%)":"rgba("+s+"%, "+$+"%, "+_+"%, "+a[3]+")"},cs.to.hsl=function(){var a=swizzle(arguments);return a.length<4||a[3]===1?"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)":"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+a[3]+")"},cs.to.hwb=function(){var a=swizzle(arguments),s="";return a.length>=4&&a[3]!==1&&(s=", "+a[3]),"hwb("+a[0]+", "+a[1]+"%, "+a[2]+"%"+s+")"},cs.to.keyword=function(a){return reverseNames[a.slice(0,3)]};function clamp(a,s,$){return Math.min(Math.max(s,a),$)}function hexDouble(a){var s=Math.round(a).toString(16).toUpperCase();return s.length<2?"0"+s:s}var colorStringExports=colorString$1.exports,ColorTypes;(function(a){a.Grayscale="Grayscale",a.RGB="RGB",a.CMYK="CMYK"})(ColorTypes||(ColorTypes={}));const rgb=(a,s,$)=>(assertRange(a,"red",0,1),assertRange(s,"green",0,1),assertRange($,"blue",0,1),{type:ColorTypes.RGB,red:a,green:s,blue:$}),cmyk=(a,s,$,_)=>(assertRange(a,"cyan",0,1),assertRange(s,"magenta",0,1),assertRange($,"yellow",0,1),assertRange(_,"key",0,1),{type:ColorTypes.CMYK,cyan:a,magenta:s,yellow:$,key:_});var TextAlignment;(function(a){a[a.Left=0]="Left",a[a.Center=1]="Center",a[a.Right=2]="Right"})(TextAlignment||(TextAlignment={}));var ImageAlignment;(function(a){a[a.Left=0]="Left",a[a.Center=1]="Center",a[a.Right=2]="Right"})(ImageAlignment||(ImageAlignment={}));var StandardFonts;(function(a){a.Courier="Courier",a.CourierBold="Courier-Bold",a.CourierOblique="Courier-Oblique",a.CourierBoldOblique="Courier-BoldOblique",a.Helvetica="Helvetica",a.HelveticaBold="Helvetica-Bold",a.HelveticaOblique="Helvetica-Oblique",a.HelveticaBoldOblique="Helvetica-BoldOblique",a.TimesRoman="Times-Roman",a.TimesRomanBold="Times-Bold",a.TimesRomanItalic="Times-Italic",a.TimesRomanBoldItalic="Times-BoldItalic",a.Symbol="Symbol",a.ZapfDingbats="ZapfDingbats"})(StandardFonts||(StandardFonts={}));var ParseSpeeds;(function(a){a[a.Fastest=1/0]="Fastest",a[a.Fast=1500]="Fast",a[a.Medium=500]="Medium",a[a.Slow=100]="Slow"})(ParseSpeeds||(ParseSpeeds={}));var BlendMode;(function(a){a.Normal="Normal",a.Multiply="Multiply",a.Screen="Screen",a.Overlay="Overlay",a.Darken="Darken",a.Lighten="Lighten",a.ColorDodge="ColorDodge",a.ColorBurn="ColorBurn",a.HardLight="HardLight",a.SoftLight="SoftLight",a.Difference="Difference",a.Exclusion="Exclusion"})(BlendMode||(BlendMode={}));var dist={},lib$2={},namedReferences={};Object.defineProperty(namedReferences,"__esModule",{value:!0}),namedReferences.bodyRegExps={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},namedReferences.namedReferences={xml:{entities:{"<":"<",">":">",""":'"',"'":"'","&":"&"},characters:{"<":"<",">":">",'"':""","'":"'","&":"&"}},html4:{entities:{"'":"'"," ":" "," ":" ","¡":"¡","¡":"¡","¢":"¢","¢":"¢","£":"£","£":"£","¤":"¤","¤":"¤","¥":"¥","¥":"¥","¦":"¦","¦":"¦","§":"§","§":"§","¨":"¨","¨":"¨","©":"©","©":"©","ª":"ª","ª":"ª","«":"«","«":"«","¬":"¬","¬":"¬","­":"","­":"","®":"®","®":"®","¯":"¯","¯":"¯","°":"°","°":"°","±":"±","±":"±","²":"²","²":"²","³":"³","³":"³","´":"´","´":"´","µ":"µ","µ":"µ","¶":"¶","¶":"¶","·":"·","·":"·","¸":"¸","¸":"¸","¹":"¹","¹":"¹","º":"º","º":"º","»":"»","»":"»","¼":"¼","¼":"¼","½":"½","½":"½","¾":"¾","¾":"¾","¿":"¿","¿":"¿","À":"À","À":"À","Á":"Á","Á":"Á","Â":"Â","Â":"Â","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","Å":"Å","Å":"Å","Æ":"Æ","Æ":"Æ","Ç":"Ç","Ç":"Ç","È":"È","È":"È","É":"É","É":"É","Ê":"Ê","Ê":"Ê","Ë":"Ë","Ë":"Ë","Ì":"Ì","Ì":"Ì","Í":"Í","Í":"Í","Î":"Î","Î":"Î","Ï":"Ï","Ï":"Ï","Ð":"Ð","Ð":"Ð","Ñ":"Ñ","Ñ":"Ñ","Ò":"Ò","Ò":"Ò","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","Õ":"Õ","Õ":"Õ","Ö":"Ö","Ö":"Ö","×":"×","×":"×","Ø":"Ø","Ø":"Ø","Ù":"Ù","Ù":"Ù","Ú":"Ú","Ú":"Ú","Û":"Û","Û":"Û","Ü":"Ü","Ü":"Ü","Ý":"Ý","Ý":"Ý","Þ":"Þ","Þ":"Þ","ß":"ß","ß":"ß","à":"à","à":"à","á":"á","á":"á","â":"â","â":"â","ã":"ã","ã":"ã","ä":"ä","ä":"ä","å":"å","å":"å","æ":"æ","æ":"æ","ç":"ç","ç":"ç","è":"è","è":"è","é":"é","é":"é","ê":"ê","ê":"ê","ë":"ë","ë":"ë","ì":"ì","ì":"ì","í":"í","í":"í","î":"î","î":"î","ï":"ï","ï":"ï","ð":"ð","ð":"ð","ñ":"ñ","ñ":"ñ","ò":"ò","ò":"ò","ó":"ó","ó":"ó","ô":"ô","ô":"ô","õ":"õ","õ":"õ","ö":"ö","ö":"ö","÷":"÷","÷":"÷","ø":"ø","ø":"ø","ù":"ù","ù":"ù","ú":"ú","ú":"ú","û":"û","û":"û","ü":"ü","ü":"ü","ý":"ý","ý":"ý","þ":"þ","þ":"þ","ÿ":"ÿ","ÿ":"ÿ",""":'"',""":'"',"&":"&","&":"&","<":"<","<":"<",">":">",">":">","Œ":"Œ","œ":"œ","Š":"Š","š":"š","Ÿ":"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","‌":"","‍":"","‎":"","‏":"","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€","ƒ":"ƒ","Α":"Α","Β":"Β","Γ":"Γ","Δ":"Δ","Ε":"Ε","Ζ":"Ζ","Η":"Η","Θ":"Θ","Ι":"Ι","Κ":"Κ","Λ":"Λ","Μ":"Μ","Ν":"Ν","Ξ":"Ξ","Ο":"Ο","Π":"Π","Ρ":"Ρ","Σ":"Σ","Τ":"Τ","Υ":"Υ","Φ":"Φ","Χ":"Χ","Ψ":"Ψ","Ω":"Ω","α":"α","β":"β","γ":"γ","δ":"δ","ε":"ε","ζ":"ζ","η":"η","θ":"θ","ι":"ι","κ":"κ","λ":"λ","μ":"μ","ν":"ν","ξ":"ξ","ο":"ο","π":"π","ρ":"ρ","ς":"ς","σ":"σ","τ":"τ","υ":"υ","φ":"φ","χ":"χ","ψ":"ψ","ω":"ω","ϑ":"ϑ","ϒ":"ϒ","ϖ":"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘","ℑ":"ℑ","ℜ":"ℜ","™":"™","ℵ":"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","⟨":"〈","⟩":"〉","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"},characters:{"'":"'"," ":" ","¡":"¡","¢":"¢","£":"£","¤":"¤","¥":"¥","¦":"¦","§":"§","¨":"¨","©":"©",ª:"ª","«":"«","¬":"¬","":"­","®":"®","¯":"¯","°":"°","±":"±","²":"²","³":"³","´":"´",µ:"µ","¶":"¶","·":"·","¸":"¸","¹":"¹",º:"º","»":"»","¼":"¼","½":"½","¾":"¾","¿":"¿",À:"À",Á:"Á",Â:"Â",Ã:"Ã",Ä:"Ä",Å:"Å",Æ:"Æ",Ç:"Ç",È:"È",É:"É",Ê:"Ê",Ë:"Ë",Ì:"Ì",Í:"Í",Î:"Î",Ï:"Ï",Ð:"Ð",Ñ:"Ñ",Ò:"Ò",Ó:"Ó",Ô:"Ô",Õ:"Õ",Ö:"Ö","×":"×",Ø:"Ø",Ù:"Ù",Ú:"Ú",Û:"Û",Ü:"Ü",Ý:"Ý",Þ:"Þ",ß:"ß",à:"à",á:"á",â:"â",ã:"ã",ä:"ä",å:"å",æ:"æ",ç:"ç",è:"è",é:"é",ê:"ê",ë:"ë",ì:"ì",í:"í",î:"î",ï:"ï",ð:"ð",ñ:"ñ",ò:"ò",ó:"ó",ô:"ô",õ:"õ",ö:"ö","÷":"÷",ø:"ø",ù:"ù",ú:"ú",û:"û",ü:"ü",ý:"ý",þ:"þ",ÿ:"ÿ",'"':""","&":"&","<":"<",">":">",Œ:"Œ",œ:"œ",Š:"Š",š:"š",Ÿ:"Ÿ","ˆ":"ˆ","˜":"˜"," ":" "," ":" "," ":" ","":"‌","":"‍","":"‎","":"‏","–":"–","—":"—","‘":"‘","’":"’","‚":"‚","“":"“","”":"”","„":"„","†":"†","‡":"‡","‰":"‰","‹":"‹","›":"›","€":"€",ƒ:"ƒ",Α:"Α",Β:"Β",Γ:"Γ",Δ:"Δ",Ε:"Ε",Ζ:"Ζ",Η:"Η",Θ:"Θ",Ι:"Ι",Κ:"Κ",Λ:"Λ",Μ:"Μ",Ν:"Ν",Ξ:"Ξ",Ο:"Ο",Π:"Π",Ρ:"Ρ",Σ:"Σ",Τ:"Τ",Υ:"Υ",Φ:"Φ",Χ:"Χ",Ψ:"Ψ",Ω:"Ω",α:"α",β:"β",γ:"γ",δ:"δ",ε:"ε",ζ:"ζ",η:"η",θ:"θ",ι:"ι",κ:"κ",λ:"λ",μ:"μ",ν:"ν",ξ:"ξ",ο:"ο",π:"π",ρ:"ρ",ς:"ς",σ:"σ",τ:"τ",υ:"υ",φ:"φ",χ:"χ",ψ:"ψ",ω:"ω",ϑ:"ϑ",ϒ:"ϒ",ϖ:"ϖ","•":"•","…":"…","′":"′","″":"″","‾":"‾","⁄":"⁄","℘":"℘",ℑ:"ℑ",ℜ:"ℜ","™":"™",ℵ:"ℵ","←":"←","↑":"↑","→":"→","↓":"↓","↔":"↔","↵":"↵","⇐":"⇐","⇑":"⇑","⇒":"⇒","⇓":"⇓","⇔":"⇔","∀":"∀","∂":"∂","∃":"∃","∅":"∅","∇":"∇","∈":"∈","∉":"∉","∋":"∋","∏":"∏","∑":"∑","−":"−","∗":"∗","√":"√","∝":"∝","∞":"∞","∠":"∠","∧":"∧","∨":"∨","∩":"∩","∪":"∪","∫":"∫","∴":"∴","∼":"∼","≅":"≅","≈":"≈","≠":"≠","≡":"≡","≤":"≤","≥":"≥","⊂":"⊂","⊃":"⊃","⊄":"⊄","⊆":"⊆","⊇":"⊇","⊕":"⊕","⊗":"⊗","⊥":"⊥","⋅":"⋅","⌈":"⌈","⌉":"⌉","⌊":"⌊","⌋":"⌋","〈":"⟨","〉":"⟩","◊":"◊","♠":"♠","♣":"♣","♥":"♥","♦":"♦"}},html5:{entities:{"Æ":"Æ","Æ":"Æ","&":"&","&":"&","Á":"Á","Á":"Á","Ă":"Ă","Â":"Â","Â":"Â","А":"А","𝔄":"𝔄","À":"À","À":"À","Α":"Α","Ā":"Ā","⩓":"⩓","Ą":"Ą","𝔸":"𝔸","⁡":"","Å":"Å","Å":"Å","𝒜":"𝒜","≔":"≔","Ã":"Ã","Ã":"Ã","Ä":"Ä","Ä":"Ä","∖":"∖","⫧":"⫧","⌆":"⌆","Б":"Б","∵":"∵","ℬ":"ℬ","Β":"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","ℬ":"ℬ","≎":"≎","Ч":"Ч","©":"©","©":"©","Ć":"Ć","⋒":"⋒","ⅅ":"ⅅ","ℭ":"ℭ","Č":"Č","Ç":"Ç","Ç":"Ç","Ĉ":"Ĉ","∰":"∰","Ċ":"Ċ","¸":"¸","·":"·","ℭ":"ℭ","Χ":"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮","ℂ":"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","ⅅ":"ⅅ","⤑":"⤑","Ђ":"Ђ","Ѕ":"Ѕ","Џ":"Џ","‡":"‡","↡":"↡","⫤":"⫤","Ď":"Ď","Д":"Д","∇":"∇","Δ":"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","∯":"∯","¨":"¨","⇓":"⇓","⇐":"⇐","⇔":"⇔","⫤":"⫤","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","⇓":"⇓","𝒟":"𝒟","Đ":"Đ","Ŋ":"Ŋ","Ð":"Ð","Ð":"Ð","É":"É","É":"É","Ě":"Ě","Ê":"Ê","Ê":"Ê","Э":"Э","Ė":"Ė","𝔈":"𝔈","È":"È","È":"È","∈":"∈","Ē":"Ē","◻":"◻","▫":"▫","Ę":"Ę","𝔼":"𝔼","Ε":"Ε","⩵":"⩵","≂":"≂","⇌":"⇌","ℰ":"ℰ","⩳":"⩳","Η":"Η","Ë":"Ë","Ë":"Ë","∃":"∃","ⅇ":"ⅇ","Ф":"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀","ℱ":"ℱ","ℱ":"ℱ","Ѓ":"Ѓ",">":">",">":">","Γ":"Γ","Ϝ":"Ϝ","Ğ":"Ğ","Ģ":"Ģ","Ĝ":"Ĝ","Г":"Г","Ġ":"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫","Ъ":"Ъ","ˇ":"ˇ","^":"^","Ĥ":"Ĥ","ℌ":"ℌ","ℋ":"ℋ","ℍ":"ℍ","─":"─","ℋ":"ℋ","Ħ":"Ħ","≎":"≎","≏":"≏","Е":"Е","IJ":"IJ","Ё":"Ё","Í":"Í","Í":"Í","Î":"Î","Î":"Î","И":"И","İ":"İ","ℑ":"ℑ","Ì":"Ì","Ì":"Ì","ℑ":"ℑ","Ī":"Ī","ⅈ":"ⅈ","⇒":"⇒","∬":"∬","∫":"∫","⋂":"⋂","⁣":"","⁢":"","Į":"Į","𝕀":"𝕀","Ι":"Ι","ℐ":"ℐ","Ĩ":"Ĩ","І":"І","Ï":"Ï","Ï":"Ï","Ĵ":"Ĵ","Й":"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥","Ј":"Ј","Є":"Є","Х":"Х","Ќ":"Ќ","Κ":"Κ","Ķ":"Ķ","К":"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦","Љ":"Љ","<":"<","<":"<","Ĺ":"Ĺ","Λ":"Λ","⟪":"⟪","ℒ":"ℒ","↞":"↞","Ľ":"Ľ","Ļ":"Ļ","Л":"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⇐":"⇐","⇔":"⇔","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚","Ŀ":"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","⟸":"⟸","⟺":"⟺","⟹":"⟹","𝕃":"𝕃","↙":"↙","↘":"↘","ℒ":"ℒ","↰":"↰","Ł":"Ł","≪":"≪","⤅":"⤅","М":"М"," ":" ","ℳ":"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄","ℳ":"ℳ","Μ":"Μ","Њ":"Њ","Ń":"Ń","Ň":"Ň","Ņ":"Ņ","Н":"Н","​":"","​":"","​":"","​":"","≫":"≫","≪":"≪","
":`
|
126
126
|
`,"𝔑":"𝔑","⁠":""," ":" ","ℕ":"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩","Ñ":"Ñ","Ñ":"Ñ","Ν":"Ν","Œ":"Œ","Ó":"Ó","Ó":"Ó","Ô":"Ô","Ô":"Ô","О":"О","Ő":"Ő","𝔒":"𝔒","Ò":"Ò","Ò":"Ò","Ō":"Ō","Ω":"Ω","Ο":"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪","Ø":"Ø","Ø":"Ø","Õ":"Õ","Õ":"Õ","⨷":"⨷","Ö":"Ö","Ö":"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂","П":"П","𝔓":"𝔓","Φ":"Φ","Π":"Π","±":"±","ℌ":"ℌ","ℙ":"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∷":"∷","∝":"∝","𝒫":"𝒫","Ψ":"Ψ",""":'"',""":'"',"𝔔":"𝔔","ℚ":"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®","®":"®","Ŕ":"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖","Ř":"Ř","Ŗ":"Ŗ","Р":"Р","ℜ":"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯","ℜ":"ℜ","Ρ":"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓","⇒":"⇒","ℝ":"ℝ","⥰":"⥰","⇛":"⇛","ℛ":"ℛ","↱":"↱","⧴":"⧴","Щ":"Щ","Ш":"Ш","Ь":"Ь","Ś":"Ś","⪼":"⪼","Š":"Š","Ş":"Ş","Ŝ":"Ŝ","С":"С","𝔖":"𝔖","↓":"↓","←":"←","→":"→","↑":"↑","Σ":"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∋":"∋","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇","⋑":"⋑","Þ":"Þ","Þ":"Þ","™":"™","Ћ":"Ћ","Ц":"Ц","	":" ","Τ":"Τ","Ť":"Ť","Ţ":"Ţ","Т":"Т","𝔗":"𝔗","∴":"∴","Θ":"Θ","  ":" "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯","Ŧ":"Ŧ","Ú":"Ú","Ú":"Ú","↟":"↟","⥉":"⥉","Ў":"Ў","Ŭ":"Ŭ","Û":"Û","Û":"Û","У":"У","Ű":"Ű","𝔘":"𝔘","Ù":"Ù","Ù":"Ù","Ū":"Ū","_":"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎","Ų":"Ų","𝕌":"𝕌","↑":"↑","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","⇑":"⇑","⇕":"⇕","↖":"↖","↗":"↗","ϒ":"ϒ","Υ":"Υ","Ů":"Ů","𝒰":"𝒰","Ũ":"Ũ","Ü":"Ü","Ü":"Ü","⊫":"⊫","⫫":"⫫","В":"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪","Ŵ":"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛","Ξ":"Ξ","𝕏":"𝕏","𝒳":"𝒳","Я":"Я","Ї":"Ї","Ю":"Ю","Ý":"Ý","Ý":"Ý","Ŷ":"Ŷ","Ы":"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴","Ÿ":"Ÿ","Ж":"Ж","Ź":"Ź","Ž":"Ž","З":"З","Ż":"Ż","​":"","Ζ":"Ζ","ℨ":"ℨ","ℤ":"ℤ","𝒵":"𝒵","á":"á","á":"á","ă":"ă","∾":"∾","∾̳":"∾̳","∿":"∿","â":"â","â":"â","´":"´","´":"´","а":"а","æ":"æ","æ":"æ","⁡":"","𝔞":"𝔞","à":"à","à":"à","ℵ":"ℵ","ℵ":"ℵ","α":"α","ā":"ā","⨿":"⨿","&":"&","&":"&","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∠":"∠","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","Å":"Å","⍼":"⍼","ą":"ą","𝕒":"𝕒","≈":"≈","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'","≈":"≈","≊":"≊","å":"å","å":"å","𝒶":"𝒶","*":"*","≈":"≈","≍":"≍","ã":"ã","ã":"ã","ä":"ä","ä":"ä","∳":"∳","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⌅":"⌅","⎵":"⎵","⎶":"⎶","≌":"≌","б":"б","„":"„","∵":"∵","∵":"∵","⦰":"⦰","϶":"϶","ℬ":"ℬ","β":"β","ℶ":"ℶ","≬":"≬","𝔟":"𝔟","⋂":"⋂","◯":"◯","⋃":"⋃","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⋁":"⋁","⋀":"⋀","⤍":"⤍","⧫":"⧫","▪":"▪","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⊥":"⊥","⊥":"⊥","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","─":"─","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","‵":"‵","˘":"˘","¦":"¦","¦":"¦","𝒷":"𝒷","⁏":"⁏","∽":"∽","⋍":"⋍","\":"\\","⧅":"⧅","⟈":"⟈","•":"•","•":"•","≎":"≎","⪮":"⪮","≏":"≏","≏":"≏","ć":"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","ˇ":"ˇ","⩍":"⩍","č":"č","ç":"ç","ç":"ç","ĉ":"ĉ","⩌":"⩌","⩐":"⩐","ċ":"ċ","¸":"¸","¸":"¸","⦲":"⦲","¢":"¢","¢":"¢","·":"·","𝔠":"𝔠","ч":"ч","✓":"✓","✓":"✓","χ":"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","®":"®","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","≗":"≗","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣","♣":"♣",":":":","≔":"≔","≔":"≔",",":",","@":"@","∁":"∁","∘":"∘","∁":"∁","ℂ":"ℂ","≅":"≅","⩭":"⩭","∮":"∮","𝕔":"𝕔","∐":"∐","©":"©","©":"©","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋞":"⋞","⋟":"⋟","⋎":"⋎","⋏":"⋏","¤":"¤","¤":"¤","↶":"↶","↷":"↷","⋎":"⋎","⋏":"⋏","∲":"∲","∱":"∱","⌭":"⌭","⇓":"⇓","⥥":"⥥","†":"†","ℸ":"ℸ","↓":"↓","‐":"‐","⊣":"⊣","⤏":"⤏","˝":"˝","ď":"ď","д":"д","ⅆ":"ⅆ","‡":"‡","⇊":"⇊","⩷":"⩷","°":"°","°":"°","δ":"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","⇃":"⇃","⇂":"⇂","⋄":"⋄","⋄":"⋄","♦":"♦","♦":"♦","¨":"¨","ϝ":"ϝ","⋲":"⋲","÷":"÷","÷":"÷","÷":"÷","⋇":"⋇","⋇":"⋇","ђ":"ђ","⌞":"⌞","⌍":"⌍","$":"$","𝕕":"𝕕","˙":"˙","≐":"≐","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌆":"⌆","↓":"↓","⇊":"⇊","⇃":"⇃","⇂":"⇂","⤐":"⤐","⌟":"⌟","⌌":"⌌","𝒹":"𝒹","ѕ":"ѕ","⧶":"⧶","đ":"đ","⋱":"⋱","▿":"▿","▾":"▾","⇵":"⇵","⥯":"⥯","⦦":"⦦","џ":"џ","⟿":"⟿","⩷":"⩷","≑":"≑","é":"é","é":"é","⩮":"⩮","ě":"ě","≖":"≖","ê":"ê","ê":"ê","≕":"≕","э":"э","ė":"ė","ⅇ":"ⅇ","≒":"≒","𝔢":"𝔢","⪚":"⪚","è":"è","è":"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧","ℓ":"ℓ","⪕":"⪕","⪗":"⪗","ē":"ē","∅":"∅","∅":"∅","∅":"∅"," ":" "," ":" "," ":" ","ŋ":"ŋ"," ":" ","ę":"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱","ε":"ε","ε":"ε","ϵ":"ϵ","≖":"≖","≕":"≕","≂":"≂","⪖":"⪖","⪕":"⪕","=":"=","≟":"≟","≡":"≡","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱","ℯ":"ℯ","≐":"≐","≂":"≂","η":"η","ð":"ð","ð":"ð","ë":"ë","ë":"ë","€":"€","!":"!","∃":"∃","ℰ":"ℰ","ⅇ":"ⅇ","≒":"≒","ф":"ф","♀":"♀","ffi":"ffi","ff":"ff","ffl":"ffl","𝔣":"𝔣","fi":"fi","fj":"fj","♭":"♭","fl":"fl","▱":"▱","ƒ":"ƒ","𝕗":"𝕗","∀":"∀","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","½":"½","⅓":"⅓","¼":"¼","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","≧":"≧","⪌":"⪌","ǵ":"ǵ","γ":"γ","ϝ":"ϝ","⪆":"⪆","ğ":"ğ","ĝ":"ĝ","г":"г","ġ":"ġ","≥":"≥","⋛":"⋛","≥":"≥","≧":"≧","⩾":"⩾","⩾":"⩾","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤","≫":"≫","⋙":"⋙","ℷ":"ℷ","ѓ":"ѓ","≷":"≷","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪊":"⪊","⪈":"⪈","⪈":"⪈","≩":"≩","⋧":"⋧","𝕘":"𝕘","`":"`","ℊ":"ℊ","≳":"≳","⪎":"⪎","⪐":"⪐",">":">",">":">","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⪆":"⪆","⥸":"⥸","⋗":"⋗","⋛":"⋛","⪌":"⪌","≷":"≷","≳":"≳","≩︀":"≩︀","≩︀":"≩︀","⇔":"⇔"," ":" ","½":"½","ℋ":"ℋ","ъ":"ъ","↔":"↔","⥈":"⥈","↭":"↭","ℏ":"ℏ","ĥ":"ĥ","♥":"♥","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽","ℏ":"ℏ","ħ":"ħ","⁃":"⁃","‐":"‐","í":"í","í":"í","⁣":"","î":"î","î":"î","и":"и","е":"е","¡":"¡","¡":"¡","⇔":"⇔","𝔦":"𝔦","ì":"ì","ì":"ì","ⅈ":"ⅈ","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩","ij":"ij","ī":"ī","ℑ":"ℑ","ℐ":"ℐ","ℑ":"ℑ","ı":"ı","⊷":"⊷","Ƶ":"Ƶ","∈":"∈","℅":"℅","∞":"∞","⧝":"⧝","ı":"ı","∫":"∫","⊺":"⊺","ℤ":"ℤ","⊺":"⊺","⨗":"⨗","⨼":"⨼","ё":"ё","į":"į","𝕚":"𝕚","ι":"ι","⨼":"⨼","¿":"¿","¿":"¿","𝒾":"𝒾","∈":"∈","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳","∈":"∈","⁢":"","ĩ":"ĩ","і":"і","ï":"ï","ï":"ï","ĵ":"ĵ","й":"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿","ј":"ј","є":"є","κ":"κ","ϰ":"ϰ","ķ":"ķ","к":"к","𝔨":"𝔨","ĸ":"ĸ","х":"х","ќ":"ќ","𝕜":"𝕜","𝓀":"𝓀","⇚":"⇚","⇐":"⇐","⤛":"⤛","⤎":"⤎","≦":"≦","⪋":"⪋","⥢":"⥢","ĺ":"ĺ","⦴":"⦴","ℒ":"ℒ","λ":"λ","⟨":"⟨","⦑":"⦑","⟨":"⟨","⪅":"⪅","«":"«","«":"«","←":"←","⇤":"⇤","⤟":"⤟","⤝":"⤝","↩":"↩","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍","ľ":"ľ","ļ":"ļ","⌈":"⌈","{":"{","л":"л","⤶":"⤶","“":"“","„":"„","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","←":"←","↢":"↢","↽":"↽","↼":"↼","⇇":"⇇","↔":"↔","⇆":"⇆","⇋":"⇋","↭":"↭","⋋":"⋋","⋚":"⋚","≤":"≤","≦":"≦","⩽":"⩽","⩽":"⩽","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⪅":"⪅","⋖":"⋖","⋚":"⋚","⪋":"⪋","≶":"≶","≲":"≲","⥼":"⥼","⌊":"⌊","𝔩":"𝔩","≶":"≶","⪑":"⪑","↽":"↽","↼":"↼","⥪":"⥪","▄":"▄","љ":"љ","≪":"≪","⇇":"⇇","⌞":"⌞","⥫":"⥫","◺":"◺","ŀ":"ŀ","⎰":"⎰","⎰":"⎰","≨":"≨","⪉":"⪉","⪉":"⪉","⪇":"⪇","⪇":"⪇","≨":"≨","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟦":"⟦","⟵":"⟵","⟷":"⟷","⟼":"⟼","⟶":"⟶","↫":"↫","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","_":"_","◊":"◊","◊":"◊","⧫":"⧫","(":"(","⦓":"⦓","⇆":"⇆","⌟":"⌟","⇋":"⇋","⥭":"⥭","‎":"","⊿":"⊿","‹":"‹","𝓁":"𝓁","↰":"↰","≲":"≲","⪍":"⪍","⪏":"⪏","[":"[","‘":"‘","‚":"‚","ł":"ł","<":"<","<":"<","⪦":"⪦","⩹":"⩹","⋖":"⋖","⋋":"⋋","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⊴":"⊴","◂":"◂","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","≨︀":"≨︀","∺":"∺","¯":"¯","¯":"¯","♂":"♂","✠":"✠","✠":"✠","↦":"↦","↦":"↦","↧":"↧","↤":"↤","↥":"↥","▮":"▮","⨩":"⨩","м":"м","—":"—","∡":"∡","𝔪":"𝔪","℧":"℧","µ":"µ","µ":"µ","∣":"∣","*":"*","⫰":"⫰","·":"·","·":"·","−":"−","⊟":"⊟","∸":"∸","⨪":"⨪","⫛":"⫛","…":"…","∓":"∓","⊧":"⊧","𝕞":"𝕞","∓":"∓","𝓂":"𝓂","∾":"∾","μ":"μ","⊸":"⊸","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","≫̸":"≫̸","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","≪̸":"≪̸","⇏":"⇏","⊯":"⊯","⊮":"⊮","∇":"∇","ń":"ń","∠⃒":"∠⃒","≉":"≉","⩰̸":"⩰̸","≋̸":"≋̸","ʼn":"ʼn","≉":"≉","♮":"♮","♮":"♮","ℕ":"ℕ"," ":" "," ":" ","≎̸":"≎̸","≏̸":"≏̸","⩃":"⩃","ň":"ň","ņ":"ņ","≇":"≇","⩭̸":"⩭̸","⩂":"⩂","н":"н","–":"–","≠":"≠","⇗":"⇗","⤤":"⤤","↗":"↗","↗":"↗","≐̸":"≐̸","≢":"≢","⤨":"⤨","≂̸":"≂̸","∄":"∄","∄":"∄","𝔫":"𝔫","≧̸":"≧̸","≱":"≱","≱":"≱","≧̸":"≧̸","⩾̸":"⩾̸","⩾̸":"⩾̸","≵":"≵","≯":"≯","≯":"≯","⇎":"⇎","↮":"↮","⫲":"⫲","∋":"∋","⋼":"⋼","⋺":"⋺","∋":"∋","њ":"њ","⇍":"⇍","≦̸":"≦̸","↚":"↚","‥":"‥","≰":"≰","↚":"↚","↮":"↮","≰":"≰","≦̸":"≦̸","⩽̸":"⩽̸","⩽̸":"⩽̸","≮":"≮","≴":"≴","≮":"≮","⋪":"⋪","⋬":"⋬","∤":"∤","𝕟":"𝕟","¬":"¬","¬":"¬","∉":"∉","⋹̸":"⋹̸","⋵̸":"⋵̸","∉":"∉","⋷":"⋷","⋶":"⋶","∌":"∌","∌":"∌","⋾":"⋾","⋽":"⋽","∦":"∦","∦":"∦","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","⊀":"⊀","⋠":"⋠","⪯̸":"⪯̸","⊀":"⊀","⪯̸":"⪯̸","⇏":"⇏","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","↛":"↛","⋫":"⋫","⋭":"⋭","⊁":"⊁","⋡":"⋡","⪰̸":"⪰̸","𝓃":"𝓃","∤":"∤","∦":"∦","≁":"≁","≄":"≄","≄":"≄","∤":"∤","∦":"∦","⋢":"⋢","⋣":"⋣","⊄":"⊄","⫅̸":"⫅̸","⊈":"⊈","⊂⃒":"⊂⃒","⊈":"⊈","⫅̸":"⫅̸","⊁":"⊁","⪰̸":"⪰̸","⊅":"⊅","⫆̸":"⫆̸","⊉":"⊉","⊃⃒":"⊃⃒","⊉":"⊉","⫆̸":"⫆̸","≹":"≹","ñ":"ñ","ñ":"ñ","≸":"≸","⋪":"⋪","⋬":"⋬","⋫":"⋫","⋭":"⋭","ν":"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","↖":"↖","↖":"↖","⤧":"⤧","Ⓢ":"Ⓢ","ó":"ó","ó":"ó","⊛":"⊛","⊚":"⊚","ô":"ô","ô":"ô","о":"о","⊝":"⊝","ő":"ő","⨸":"⨸","⊙":"⊙","⦼":"⦼","œ":"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛","ò":"ò","ò":"ò","⧁":"⧁","⦵":"⦵","Ω":"Ω","∮":"∮","↺":"↺","⦾":"⦾","⦻":"⦻","‾":"‾","⧀":"⧀","ō":"ō","ω":"ω","ο":"ο","⦶":"⦶","⊖":"⊖","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","⊕":"⊕","∨":"∨","↻":"↻","⩝":"⩝","ℴ":"ℴ","ℴ":"ℴ","ª":"ª","ª":"ª","º":"º","º":"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛","ℴ":"ℴ","ø":"ø","ø":"ø","⊘":"⊘","õ":"õ","õ":"õ","⊗":"⊗","⨶":"⨶","ö":"ö","ö":"ö","⌽":"⌽","∥":"∥","¶":"¶","¶":"¶","∥":"∥","⫳":"⫳","⫽":"⫽","∂":"∂","п":"п","%":"%",".":".","‰":"‰","⊥":"⊥","‱":"‱","𝔭":"𝔭","φ":"φ","ϕ":"ϕ","ℳ":"ℳ","☎":"☎","π":"π","⋔":"⋔","ϖ":"ϖ","ℏ":"ℏ","ℎ":"ℎ","ℏ":"ℏ","+":"+","⨣":"⨣","⊞":"⊞","⨢":"⨢","∔":"∔","⨥":"⨥","⩲":"⩲","±":"±","±":"±","⨦":"⨦","⨧":"⨧","±":"±","⨕":"⨕","𝕡":"𝕡","£":"£","£":"£","≺":"≺","⪳":"⪳","⪷":"⪷","≼":"≼","⪯":"⪯","≺":"≺","⪷":"⪷","≼":"≼","⪯":"⪯","⪹":"⪹","⪵":"⪵","⋨":"⋨","≾":"≾","′":"′","ℙ":"ℙ","⪵":"⪵","⪹":"⪹","⋨":"⋨","∏":"∏","⌮":"⌮","⌒":"⌒","⌓":"⌓","∝":"∝","∝":"∝","≾":"≾","⊰":"⊰","𝓅":"𝓅","ψ":"ψ"," ":" ","𝔮":"𝔮","⨌":"⨌","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","ℍ":"ℍ","⨖":"⨖","?":"?","≟":"≟",""":'"',""":'"',"⇛":"⇛","⇒":"⇒","⤜":"⤜","⤏":"⤏","⥤":"⥤","∽̱":"∽̱","ŕ":"ŕ","√":"√","⦳":"⦳","⟩":"⟩","⦒":"⦒","⦥":"⦥","⟩":"⟩","»":"»","»":"»","→":"→","⥵":"⥵","⇥":"⇥","⤠":"⤠","⤳":"⤳","⤞":"⤞","↪":"↪","↬":"↬","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","ℚ":"ℚ","⤍":"⤍","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐","ř":"ř","ŗ":"ŗ","⌉":"⌉","}":"}","р":"р","⤷":"⤷","⥩":"⥩","”":"”","”":"”","↳":"↳","ℜ":"ℜ","ℛ":"ℛ","ℜ":"ℜ","ℝ":"ℝ","▭":"▭","®":"®","®":"®","⥽":"⥽","⌋":"⌋","𝔯":"𝔯","⇁":"⇁","⇀":"⇀","⥬":"⥬","ρ":"ρ","ϱ":"ϱ","→":"→","↣":"↣","⇁":"⇁","⇀":"⇀","⇄":"⇄","⇌":"⇌","⇉":"⇉","↝":"↝","⋌":"⋌","˚":"˚","≓":"≓","⇄":"⇄","⇌":"⇌","‏":"","⎱":"⎱","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⟧":"⟧","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","⇉":"⇉","›":"›","𝓇":"𝓇","↱":"↱","]":"]","’":"’","’":"’","⋌":"⋌","⋊":"⋊","▹":"▹","⊵":"⊵","▸":"▸","⧎":"⧎","⥨":"⥨","℞":"℞","ś":"ś","‚":"‚","≻":"≻","⪴":"⪴","⪸":"⪸","š":"š","≽":"≽","⪰":"⪰","ş":"ş","ŝ":"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓","≿":"≿","с":"с","⋅":"⋅","⊡":"⊡","⩦":"⩦","⇘":"⇘","⤥":"⤥","↘":"↘","↘":"↘","§":"§","§":"§",";":";","⤩":"⤩","∖":"∖","∖":"∖","✶":"✶","𝔰":"𝔰","⌢":"⌢","♯":"♯","щ":"щ","ш":"ш","∣":"∣","∥":"∥","­":"","­":"","σ":"σ","ς":"ς","ς":"ς","∼":"∼","⩪":"⩪","≃":"≃","≃":"≃","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","←":"←","∖":"∖","⨳":"⨳","⧤":"⧤","∣":"∣","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀","ь":"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","♠":"♠","∥":"∥","⊓":"⊓","⊓︀":"⊓︀","⊔":"⊔","⊔︀":"⊔︀","⊏":"⊏","⊑":"⊑","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊐":"⊐","⊒":"⊒","□":"□","□":"□","▪":"▪","▪":"▪","→":"→","𝓈":"𝓈","∖":"∖","⌣":"⌣","⋆":"⋆","☆":"☆","★":"★","ϵ":"ϵ","ϕ":"ϕ","¯":"¯","⊂":"⊂","⫅":"⫅","⪽":"⪽","⊆":"⊆","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⊂":"⊂","⊆":"⊆","⫅":"⫅","⊊":"⊊","⫋":"⫋","⫇":"⫇","⫕":"⫕","⫓":"⫓","≻":"≻","⪸":"⪸","≽":"≽","⪰":"⪰","⪺":"⪺","⪶":"⪶","⋩":"⋩","≿":"≿","∑":"∑","♪":"♪","¹":"¹","¹":"¹","²":"²","²":"²","³":"³","³":"³","⊃":"⊃","⫆":"⫆","⪾":"⪾","⫘":"⫘","⊇":"⊇","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⊃":"⊃","⊇":"⊇","⫆":"⫆","⊋":"⊋","⫌":"⫌","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤦":"⤦","↙":"↙","↙":"↙","⤪":"⤪","ß":"ß","ß":"ß","⌖":"⌖","τ":"τ","⎴":"⎴","ť":"ť","ţ":"ţ","т":"т","⃛":"⃛","⌕":"⌕","𝔱":"𝔱","∴":"∴","∴":"∴","θ":"θ","ϑ":"ϑ","ϑ":"ϑ","≈":"≈","∼":"∼"," ":" ","≈":"≈","∼":"∼","þ":"þ","þ":"þ","˜":"˜","×":"×","×":"×","⊠":"⊠","⨱":"⨱","⨰":"⨰","∭":"∭","⤨":"⤨","⊤":"⊤","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","⤩":"⤩","‴":"‴","™":"™","▵":"▵","▿":"▿","◃":"◃","⊴":"⊴","≜":"≜","▹":"▹","⊵":"⊵","◬":"◬","≜":"≜","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉","ц":"ц","ћ":"ћ","ŧ":"ŧ","≬":"≬","↞":"↞","↠":"↠","⇑":"⇑","⥣":"⥣","ú":"ú","ú":"ú","↑":"↑","ў":"ў","ŭ":"ŭ","û":"û","û":"û","у":"у","⇅":"⇅","ű":"ű","⥮":"⥮","⥾":"⥾","𝔲":"𝔲","ù":"ù","ù":"ù","↿":"↿","↾":"↾","▀":"▀","⌜":"⌜","⌜":"⌜","⌏":"⌏","◸":"◸","ū":"ū","¨":"¨","¨":"¨","ų":"ų","𝕦":"𝕦","↑":"↑","↕":"↕","↿":"↿","↾":"↾","⊎":"⊎","υ":"υ","ϒ":"ϒ","υ":"υ","⇈":"⇈","⌝":"⌝","⌝":"⌝","⌎":"⌎","ů":"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰","ũ":"ũ","▵":"▵","▴":"▴","⇈":"⇈","ü":"ü","ü":"ü","⦧":"⦧","⇕":"⇕","⫨":"⫨","⫩":"⫩","⊨":"⊨","⦜":"⦜","ϵ":"ϵ","ϰ":"ϰ","∅":"∅","ϕ":"ϕ","ϖ":"ϖ","∝":"∝","↕":"↕","ϱ":"ϱ","ς":"ς","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀","ϑ":"ϑ","⊲":"⊲","⊳":"⊳","в":"в","⊢":"⊢","∨":"∨","⊻":"⊻","≚":"≚","⋮":"⋮","|":"|","|":"|","𝔳":"𝔳","⊲":"⊲","⊂⃒":"⊂⃒","⊃⃒":"⊃⃒","𝕧":"𝕧","∝":"∝","⊳":"⊳","𝓋":"𝓋","⫋︀":"⫋︀","⊊︀":"⊊︀","⫌︀":"⫌︀","⊋︀":"⊋︀","⦚":"⦚","ŵ":"ŵ","⩟":"⩟","∧":"∧","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","℘":"℘","≀":"≀","≀":"≀","𝓌":"𝓌","⋂":"⋂","◯":"◯","⋃":"⋃","▽":"▽","𝔵":"𝔵","⟺":"⟺","⟷":"⟷","ξ":"ξ","⟸":"⟸","⟵":"⟵","⟼":"⟼","⋻":"⋻","⨀":"⨀","𝕩":"𝕩","⨁":"⨁","⨂":"⨂","⟹":"⟹","⟶":"⟶","𝓍":"𝓍","⨆":"⨆","⨄":"⨄","△":"△","⋁":"⋁","⋀":"⋀","ý":"ý","ý":"ý","я":"я","ŷ":"ŷ","ы":"ы","¥":"¥","¥":"¥","𝔶":"𝔶","ї":"ї","𝕪":"𝕪","𝓎":"𝓎","ю":"ю","ÿ":"ÿ","ÿ":"ÿ","ź":"ź","ž":"ž","з":"з","ż":"ż","ℨ":"ℨ","ζ":"ζ","𝔷":"𝔷","ж":"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","‍":"","‌":""},characters:{Æ:"Æ","&":"&",Á:"Á",Ă:"Ă",Â:"Â",А:"А","𝔄":"𝔄",À:"À",Α:"Α",Ā:"Ā","⩓":"⩓",Ą:"Ą","𝔸":"𝔸","":"⁡",Å:"Å","𝒜":"𝒜","≔":"≔",Ã:"Ã",Ä:"Ä","∖":"∖","⫧":"⫧","⌆":"⌆",Б:"Б","∵":"∵",ℬ:"ℬ",Β:"Β","𝔅":"𝔅","𝔹":"𝔹","˘":"˘","≎":"≎",Ч:"Ч","©":"©",Ć:"Ć","⋒":"⋒","ⅅ":"ⅅ",ℭ:"ℭ",Č:"Č",Ç:"Ç",Ĉ:"Ĉ","∰":"∰",Ċ:"Ċ","¸":"¸","·":"·",Χ:"Χ","⊙":"⊙","⊖":"⊖","⊕":"⊕","⊗":"⊗","∲":"∲","”":"”","’":"’","∷":"∷","⩴":"⩴","≡":"≡","∯":"∯","∮":"∮",ℂ:"ℂ","∐":"∐","∳":"∳","⨯":"⨯","𝒞":"𝒞","⋓":"⋓","≍":"≍","⤑":"⤑",Ђ:"Ђ",Ѕ:"Ѕ",Џ:"Џ","‡":"‡","↡":"↡","⫤":"⫤",Ď:"Ď",Д:"Д","∇":"∇",Δ:"Δ","𝔇":"𝔇","´":"´","˙":"˙","˝":"˝","`":"`","˜":"˜","⋄":"⋄","ⅆ":"ⅆ","𝔻":"𝔻","¨":"¨","⃜":"⃜","≐":"≐","⇓":"⇓","⇐":"⇐","⇔":"⇔","⟸":"⟸","⟺":"⟺","⟹":"⟹","⇒":"⇒","⊨":"⊨","⇑":"⇑","⇕":"⇕","∥":"∥","↓":"↓","⤓":"⤓","⇵":"⇵","̑":"̑","⥐":"⥐","⥞":"⥞","↽":"↽","⥖":"⥖","⥟":"⥟","⇁":"⇁","⥗":"⥗","⊤":"⊤","↧":"↧","𝒟":"𝒟",Đ:"Đ",Ŋ:"Ŋ",Ð:"Ð",É:"É",Ě:"Ě",Ê:"Ê",Э:"Э",Ė:"Ė","𝔈":"𝔈",È:"È","∈":"∈",Ē:"Ē","◻":"◻","▫":"▫",Ę:"Ę","𝔼":"𝔼",Ε:"Ε","⩵":"⩵","≂":"≂","⇌":"⇌",ℰ:"ℰ","⩳":"⩳",Η:"Η",Ë:"Ë","∃":"∃","ⅇ":"ⅇ",Ф:"Ф","𝔉":"𝔉","◼":"◼","▪":"▪","𝔽":"𝔽","∀":"∀",ℱ:"ℱ",Ѓ:"Ѓ",">":">",Γ:"Γ",Ϝ:"Ϝ",Ğ:"Ğ",Ģ:"Ģ",Ĝ:"Ĝ",Г:"Г",Ġ:"Ġ","𝔊":"𝔊","⋙":"⋙","𝔾":"𝔾","≥":"≥","⋛":"⋛","≧":"≧","⪢":"⪢","≷":"≷","⩾":"⩾","≳":"≳","𝒢":"𝒢","≫":"≫",Ъ:"Ъ","ˇ":"ˇ","^":"^",Ĥ:"Ĥ",ℌ:"ℌ",ℋ:"ℋ",ℍ:"ℍ","─":"─",Ħ:"Ħ","≏":"≏",Е:"Е",IJ:"IJ",Ё:"Ё",Í:"Í",Î:"Î",И:"И",İ:"İ",ℑ:"ℑ",Ì:"Ì",Ī:"Ī","ⅈ":"ⅈ","∬":"∬","∫":"∫","⋂":"⋂","":"⁣","":"⁢",Į:"Į","𝕀":"𝕀",Ι:"Ι",ℐ:"ℐ",Ĩ:"Ĩ",І:"І",Ï:"Ï",Ĵ:"Ĵ",Й:"Й","𝔍":"𝔍","𝕁":"𝕁","𝒥":"𝒥",Ј:"Ј",Є:"Є",Х:"Х",Ќ:"Ќ",Κ:"Κ",Ķ:"Ķ",К:"К","𝔎":"𝔎","𝕂":"𝕂","𝒦":"𝒦",Љ:"Љ","<":"<",Ĺ:"Ĺ",Λ:"Λ","⟪":"⟪",ℒ:"ℒ","↞":"↞",Ľ:"Ľ",Ļ:"Ļ",Л:"Л","⟨":"⟨","←":"←","⇤":"⇤","⇆":"⇆","⌈":"⌈","⟦":"⟦","⥡":"⥡","⇃":"⇃","⥙":"⥙","⌊":"⌊","↔":"↔","⥎":"⥎","⊣":"⊣","↤":"↤","⥚":"⥚","⊲":"⊲","⧏":"⧏","⊴":"⊴","⥑":"⥑","⥠":"⥠","↿":"↿","⥘":"⥘","↼":"↼","⥒":"⥒","⋚":"⋚","≦":"≦","≶":"≶","⪡":"⪡","⩽":"⩽","≲":"≲","𝔏":"𝔏","⋘":"⋘","⇚":"⇚",Ŀ:"Ŀ","⟵":"⟵","⟷":"⟷","⟶":"⟶","𝕃":"𝕃","↙":"↙","↘":"↘","↰":"↰",Ł:"Ł","≪":"≪","⤅":"⤅",М:"М"," ":" ",ℳ:"ℳ","𝔐":"𝔐","∓":"∓","𝕄":"𝕄",Μ:"Μ",Њ:"Њ",Ń:"Ń",Ň:"Ň",Ņ:"Ņ",Н:"Н","":"​","\n":"
","𝔑":"𝔑","":"⁠"," ":" ",ℕ:"ℕ","⫬":"⫬","≢":"≢","≭":"≭","∦":"∦","∉":"∉","≠":"≠","≂̸":"≂̸","∄":"∄","≯":"≯","≱":"≱","≧̸":"≧̸","≫̸":"≫̸","≹":"≹","⩾̸":"⩾̸","≵":"≵","≎̸":"≎̸","≏̸":"≏̸","⋪":"⋪","⧏̸":"⧏̸","⋬":"⋬","≮":"≮","≰":"≰","≸":"≸","≪̸":"≪̸","⩽̸":"⩽̸","≴":"≴","⪢̸":"⪢̸","⪡̸":"⪡̸","⊀":"⊀","⪯̸":"⪯̸","⋠":"⋠","∌":"∌","⋫":"⋫","⧐̸":"⧐̸","⋭":"⋭","⊏̸":"⊏̸","⋢":"⋢","⊐̸":"⊐̸","⋣":"⋣","⊂⃒":"⊂⃒","⊈":"⊈","⊁":"⊁","⪰̸":"⪰̸","⋡":"⋡","≿̸":"≿̸","⊃⃒":"⊃⃒","⊉":"⊉","≁":"≁","≄":"≄","≇":"≇","≉":"≉","∤":"∤","𝒩":"𝒩",Ñ:"Ñ",Ν:"Ν",Œ:"Œ",Ó:"Ó",Ô:"Ô",О:"О",Ő:"Ő","𝔒":"𝔒",Ò:"Ò",Ō:"Ō",Ω:"Ω",Ο:"Ο","𝕆":"𝕆","“":"“","‘":"‘","⩔":"⩔","𝒪":"𝒪",Ø:"Ø",Õ:"Õ","⨷":"⨷",Ö:"Ö","‾":"‾","⏞":"⏞","⎴":"⎴","⏜":"⏜","∂":"∂",П:"П","𝔓":"𝔓",Φ:"Φ",Π:"Π","±":"±",ℙ:"ℙ","⪻":"⪻","≺":"≺","⪯":"⪯","≼":"≼","≾":"≾","″":"″","∏":"∏","∝":"∝","𝒫":"𝒫",Ψ:"Ψ",'"':""","𝔔":"𝔔",ℚ:"ℚ","𝒬":"𝒬","⤐":"⤐","®":"®",Ŕ:"Ŕ","⟫":"⟫","↠":"↠","⤖":"⤖",Ř:"Ř",Ŗ:"Ŗ",Р:"Р",ℜ:"ℜ","∋":"∋","⇋":"⇋","⥯":"⥯",Ρ:"Ρ","⟩":"⟩","→":"→","⇥":"⇥","⇄":"⇄","⌉":"⌉","⟧":"⟧","⥝":"⥝","⇂":"⇂","⥕":"⥕","⌋":"⌋","⊢":"⊢","↦":"↦","⥛":"⥛","⊳":"⊳","⧐":"⧐","⊵":"⊵","⥏":"⥏","⥜":"⥜","↾":"↾","⥔":"⥔","⇀":"⇀","⥓":"⥓",ℝ:"ℝ","⥰":"⥰","⇛":"⇛",ℛ:"ℛ","↱":"↱","⧴":"⧴",Щ:"Щ",Ш:"Ш",Ь:"Ь",Ś:"Ś","⪼":"⪼",Š:"Š",Ş:"Ş",Ŝ:"Ŝ",С:"С","𝔖":"𝔖","↑":"↑",Σ:"Σ","∘":"∘","𝕊":"𝕊","√":"√","□":"□","⊓":"⊓","⊏":"⊏","⊑":"⊑","⊐":"⊐","⊒":"⊒","⊔":"⊔","𝒮":"𝒮","⋆":"⋆","⋐":"⋐","⊆":"⊆","≻":"≻","⪰":"⪰","≽":"≽","≿":"≿","∑":"∑","⋑":"⋑","⊃":"⊃","⊇":"⊇",Þ:"Þ","™":"™",Ћ:"Ћ",Ц:"Ц"," ":"	",Τ:"Τ",Ť:"Ť",Ţ:"Ţ",Т:"Т","𝔗":"𝔗","∴":"∴",Θ:"Θ"," ":"  "," ":" ","∼":"∼","≃":"≃","≅":"≅","≈":"≈","𝕋":"𝕋","⃛":"⃛","𝒯":"𝒯",Ŧ:"Ŧ",Ú:"Ú","↟":"↟","⥉":"⥉",Ў:"Ў",Ŭ:"Ŭ",Û:"Û",У:"У",Ű:"Ű","𝔘":"𝔘",Ù:"Ù",Ū:"Ū",_:"_","⏟":"⏟","⎵":"⎵","⏝":"⏝","⋃":"⋃","⊎":"⊎",Ų:"Ų","𝕌":"𝕌","⤒":"⤒","⇅":"⇅","↕":"↕","⥮":"⥮","⊥":"⊥","↥":"↥","↖":"↖","↗":"↗",ϒ:"ϒ",Υ:"Υ",Ů:"Ů","𝒰":"𝒰",Ũ:"Ũ",Ü:"Ü","⊫":"⊫","⫫":"⫫",В:"В","⊩":"⊩","⫦":"⫦","⋁":"⋁","‖":"‖","∣":"∣","|":"|","❘":"❘","≀":"≀"," ":" ","𝔙":"𝔙","𝕍":"𝕍","𝒱":"𝒱","⊪":"⊪",Ŵ:"Ŵ","⋀":"⋀","𝔚":"𝔚","𝕎":"𝕎","𝒲":"𝒲","𝔛":"𝔛",Ξ:"Ξ","𝕏":"𝕏","𝒳":"𝒳",Я:"Я",Ї:"Ї",Ю:"Ю",Ý:"Ý",Ŷ:"Ŷ",Ы:"Ы","𝔜":"𝔜","𝕐":"𝕐","𝒴":"𝒴",Ÿ:"Ÿ",Ж:"Ж",Ź:"Ź",Ž:"Ž",З:"З",Ż:"Ż",Ζ:"Ζ",ℨ:"ℨ",ℤ:"ℤ","𝒵":"𝒵",á:"á",ă:"ă","∾":"∾","∾̳":"∾̳","∿":"∿",â:"â",а:"а",æ:"æ","𝔞":"𝔞",à:"à",ℵ:"ℵ",α:"α",ā:"ā","⨿":"⨿","∧":"∧","⩕":"⩕","⩜":"⩜","⩘":"⩘","⩚":"⩚","∠":"∠","⦤":"⦤","∡":"∡","⦨":"⦨","⦩":"⦩","⦪":"⦪","⦫":"⦫","⦬":"⦬","⦭":"⦭","⦮":"⦮","⦯":"⦯","∟":"∟","⊾":"⊾","⦝":"⦝","∢":"∢","⍼":"⍼",ą:"ą","𝕒":"𝕒","⩰":"⩰","⩯":"⩯","≊":"≊","≋":"≋","'":"'",å:"å","𝒶":"𝒶","*":"*",ã:"ã",ä:"ä","⨑":"⨑","⫭":"⫭","≌":"≌","϶":"϶","‵":"‵","∽":"∽","⋍":"⋍","⊽":"⊽","⌅":"⌅","⎶":"⎶",б:"б","„":"„","⦰":"⦰",β:"β",ℶ:"ℶ","≬":"≬","𝔟":"𝔟","◯":"◯","⨀":"⨀","⨁":"⨁","⨂":"⨂","⨆":"⨆","★":"★","▽":"▽","△":"△","⨄":"⨄","⤍":"⤍","⧫":"⧫","▴":"▴","▾":"▾","◂":"◂","▸":"▸","␣":"␣","▒":"▒","░":"░","▓":"▓","█":"█","=⃥":"=⃥","≡⃥":"≡⃥","⌐":"⌐","𝕓":"𝕓","⋈":"⋈","╗":"╗","╔":"╔","╖":"╖","╓":"╓","═":"═","╦":"╦","╩":"╩","╤":"╤","╧":"╧","╝":"╝","╚":"╚","╜":"╜","╙":"╙","║":"║","╬":"╬","╣":"╣","╠":"╠","╫":"╫","╢":"╢","╟":"╟","⧉":"⧉","╕":"╕","╒":"╒","┐":"┐","┌":"┌","╥":"╥","╨":"╨","┬":"┬","┴":"┴","⊟":"⊟","⊞":"⊞","⊠":"⊠","╛":"╛","╘":"╘","┘":"┘","└":"└","│":"│","╪":"╪","╡":"╡","╞":"╞","┼":"┼","┤":"┤","├":"├","¦":"¦","𝒷":"𝒷","⁏":"⁏","\\":"\","⧅":"⧅","⟈":"⟈","•":"•","⪮":"⪮",ć:"ć","∩":"∩","⩄":"⩄","⩉":"⩉","⩋":"⩋","⩇":"⩇","⩀":"⩀","∩︀":"∩︀","⁁":"⁁","⩍":"⩍",č:"č",ç:"ç",ĉ:"ĉ","⩌":"⩌","⩐":"⩐",ċ:"ċ","⦲":"⦲","¢":"¢","𝔠":"𝔠",ч:"ч","✓":"✓",χ:"χ","○":"○","⧃":"⧃","ˆ":"ˆ","≗":"≗","↺":"↺","↻":"↻","Ⓢ":"Ⓢ","⊛":"⊛","⊚":"⊚","⊝":"⊝","⨐":"⨐","⫯":"⫯","⧂":"⧂","♣":"♣",":":":",",":",","@":"@","∁":"∁","⩭":"⩭","𝕔":"𝕔","℗":"℗","↵":"↵","✗":"✗","𝒸":"𝒸","⫏":"⫏","⫑":"⫑","⫐":"⫐","⫒":"⫒","⋯":"⋯","⤸":"⤸","⤵":"⤵","⋞":"⋞","⋟":"⋟","↶":"↶","⤽":"⤽","∪":"∪","⩈":"⩈","⩆":"⩆","⩊":"⩊","⊍":"⊍","⩅":"⩅","∪︀":"∪︀","↷":"↷","⤼":"⤼","⋎":"⋎","⋏":"⋏","¤":"¤","∱":"∱","⌭":"⌭","⥥":"⥥","†":"†",ℸ:"ℸ","‐":"‐","⤏":"⤏",ď:"ď",д:"д","⇊":"⇊","⩷":"⩷","°":"°",δ:"δ","⦱":"⦱","⥿":"⥿","𝔡":"𝔡","♦":"♦",ϝ:"ϝ","⋲":"⋲","÷":"÷","⋇":"⋇",ђ:"ђ","⌞":"⌞","⌍":"⌍",$:"$","𝕕":"𝕕","≑":"≑","∸":"∸","∔":"∔","⊡":"⊡","⌟":"⌟","⌌":"⌌","𝒹":"𝒹",ѕ:"ѕ","⧶":"⧶",đ:"đ","⋱":"⋱","▿":"▿","⦦":"⦦",џ:"џ","⟿":"⟿",é:"é","⩮":"⩮",ě:"ě","≖":"≖",ê:"ê","≕":"≕",э:"э",ė:"ė","≒":"≒","𝔢":"𝔢","⪚":"⪚",è:"è","⪖":"⪖","⪘":"⪘","⪙":"⪙","⏧":"⏧",ℓ:"ℓ","⪕":"⪕","⪗":"⪗",ē:"ē","∅":"∅"," ":" "," ":" "," ":" ",ŋ:"ŋ"," ":" ",ę:"ę","𝕖":"𝕖","⋕":"⋕","⧣":"⧣","⩱":"⩱",ε:"ε","ϵ":"ϵ","=":"=","≟":"≟","⩸":"⩸","⧥":"⧥","≓":"≓","⥱":"⥱",ℯ:"ℯ",η:"η",ð:"ð",ë:"ë","€":"€","!":"!",ф:"ф","♀":"♀",ffi:"ffi",ff:"ff",ffl:"ffl","𝔣":"𝔣",fi:"fi",fj:"fj","♭":"♭",fl:"fl","▱":"▱",ƒ:"ƒ","𝕗":"𝕗","⋔":"⋔","⫙":"⫙","⨍":"⨍","½":"½","⅓":"⅓","¼":"¼","⅕":"⅕","⅙":"⅙","⅛":"⅛","⅔":"⅔","⅖":"⅖","¾":"¾","⅗":"⅗","⅜":"⅜","⅘":"⅘","⅚":"⅚","⅝":"⅝","⅞":"⅞","⁄":"⁄","⌢":"⌢","𝒻":"𝒻","⪌":"⪌",ǵ:"ǵ",γ:"γ","⪆":"⪆",ğ:"ğ",ĝ:"ĝ",г:"г",ġ:"ġ","⪩":"⪩","⪀":"⪀","⪂":"⪂","⪄":"⪄","⋛︀":"⋛︀","⪔":"⪔","𝔤":"𝔤",ℷ:"ℷ",ѓ:"ѓ","⪒":"⪒","⪥":"⪥","⪤":"⪤","≩":"≩","⪊":"⪊","⪈":"⪈","⋧":"⋧","𝕘":"𝕘",ℊ:"ℊ","⪎":"⪎","⪐":"⪐","⪧":"⪧","⩺":"⩺","⋗":"⋗","⦕":"⦕","⩼":"⩼","⥸":"⥸","≩︀":"≩︀",ъ:"ъ","⥈":"⥈","↭":"↭",ℏ:"ℏ",ĥ:"ĥ","♥":"♥","…":"…","⊹":"⊹","𝔥":"𝔥","⤥":"⤥","⤦":"⤦","⇿":"⇿","∻":"∻","↩":"↩","↪":"↪","𝕙":"𝕙","―":"―","𝒽":"𝒽",ħ:"ħ","⁃":"⁃",í:"í",î:"î",и:"и",е:"е","¡":"¡","𝔦":"𝔦",ì:"ì","⨌":"⨌","∭":"∭","⧜":"⧜","℩":"℩",ij:"ij",ī:"ī",ı:"ı","⊷":"⊷",Ƶ:"Ƶ","℅":"℅","∞":"∞","⧝":"⧝","⊺":"⊺","⨗":"⨗","⨼":"⨼",ё:"ё",į:"į","𝕚":"𝕚",ι:"ι","¿":"¿","𝒾":"𝒾","⋹":"⋹","⋵":"⋵","⋴":"⋴","⋳":"⋳",ĩ:"ĩ",і:"і",ï:"ï",ĵ:"ĵ",й:"й","𝔧":"𝔧","ȷ":"ȷ","𝕛":"𝕛","𝒿":"𝒿",ј:"ј",є:"є",κ:"κ",ϰ:"ϰ",ķ:"ķ",к:"к","𝔨":"𝔨",ĸ:"ĸ",х:"х",ќ:"ќ","𝕜":"𝕜","𝓀":"𝓀","⤛":"⤛","⤎":"⤎","⪋":"⪋","⥢":"⥢",ĺ:"ĺ","⦴":"⦴",λ:"λ","⦑":"⦑","⪅":"⪅","«":"«","⤟":"⤟","⤝":"⤝","↫":"↫","⤹":"⤹","⥳":"⥳","↢":"↢","⪫":"⪫","⤙":"⤙","⪭":"⪭","⪭︀":"⪭︀","⤌":"⤌","❲":"❲","{":"{","[":"[","⦋":"⦋","⦏":"⦏","⦍":"⦍",ľ:"ľ",ļ:"ļ",л:"л","⤶":"⤶","⥧":"⥧","⥋":"⥋","↲":"↲","≤":"≤","⇇":"⇇","⋋":"⋋","⪨":"⪨","⩿":"⩿","⪁":"⪁","⪃":"⪃","⋚︀":"⋚︀","⪓":"⪓","⋖":"⋖","⥼":"⥼","𝔩":"𝔩","⪑":"⪑","⥪":"⥪","▄":"▄",љ:"љ","⥫":"⥫","◺":"◺",ŀ:"ŀ","⎰":"⎰","≨":"≨","⪉":"⪉","⪇":"⪇","⋦":"⋦","⟬":"⟬","⇽":"⇽","⟼":"⟼","↬":"↬","⦅":"⦅","𝕝":"𝕝","⨭":"⨭","⨴":"⨴","∗":"∗","◊":"◊","(":"(","⦓":"⦓","⥭":"⥭","":"‎","⊿":"⊿","‹":"‹","𝓁":"𝓁","⪍":"⪍","⪏":"⪏","‚":"‚",ł:"ł","⪦":"⪦","⩹":"⩹","⋉":"⋉","⥶":"⥶","⩻":"⩻","⦖":"⦖","◃":"◃","⥊":"⥊","⥦":"⥦","≨︀":"≨︀","∺":"∺","¯":"¯","♂":"♂","✠":"✠","▮":"▮","⨩":"⨩",м:"м","—":"—","𝔪":"𝔪","℧":"℧",µ:"µ","⫰":"⫰","−":"−","⨪":"⨪","⫛":"⫛","⊧":"⊧","𝕞":"𝕞","𝓂":"𝓂",μ:"μ","⊸":"⊸","⋙̸":"⋙̸","≫⃒":"≫⃒","⇍":"⇍","⇎":"⇎","⋘̸":"⋘̸","≪⃒":"≪⃒","⇏":"⇏","⊯":"⊯","⊮":"⊮",ń:"ń","∠⃒":"∠⃒","⩰̸":"⩰̸","≋̸":"≋̸",ʼn:"ʼn","♮":"♮","⩃":"⩃",ň:"ň",ņ:"ņ","⩭̸":"⩭̸","⩂":"⩂",н:"н","–":"–","⇗":"⇗","⤤":"⤤","≐̸":"≐̸","⤨":"⤨","𝔫":"𝔫","↮":"↮","⫲":"⫲","⋼":"⋼","⋺":"⋺",њ:"њ","≦̸":"≦̸","↚":"↚","‥":"‥","𝕟":"𝕟","¬":"¬","⋹̸":"⋹̸","⋵̸":"⋵̸","⋷":"⋷","⋶":"⋶","⋾":"⋾","⋽":"⋽","⫽⃥":"⫽⃥","∂̸":"∂̸","⨔":"⨔","↛":"↛","⤳̸":"⤳̸","↝̸":"↝̸","𝓃":"𝓃","⊄":"⊄","⫅̸":"⫅̸","⊅":"⊅","⫆̸":"⫆̸",ñ:"ñ",ν:"ν","#":"#","№":"№"," ":" ","⊭":"⊭","⤄":"⤄","≍⃒":"≍⃒","⊬":"⊬","≥⃒":"≥⃒",">⃒":">⃒","⧞":"⧞","⤂":"⤂","≤⃒":"≤⃒","<⃒":"<⃒","⊴⃒":"⊴⃒","⤃":"⤃","⊵⃒":"⊵⃒","∼⃒":"∼⃒","⇖":"⇖","⤣":"⤣","⤧":"⤧",ó:"ó",ô:"ô",о:"о",ő:"ő","⨸":"⨸","⦼":"⦼",œ:"œ","⦿":"⦿","𝔬":"𝔬","˛":"˛",ò:"ò","⧁":"⧁","⦵":"⦵","⦾":"⦾","⦻":"⦻","⧀":"⧀",ō:"ō",ω:"ω",ο:"ο","⦶":"⦶","𝕠":"𝕠","⦷":"⦷","⦹":"⦹","∨":"∨","⩝":"⩝",ℴ:"ℴ",ª:"ª",º:"º","⊶":"⊶","⩖":"⩖","⩗":"⩗","⩛":"⩛",ø:"ø","⊘":"⊘",õ:"õ","⨶":"⨶",ö:"ö","⌽":"⌽","¶":"¶","⫳":"⫳","⫽":"⫽",п:"п","%":"%",".":".","‰":"‰","‱":"‱","𝔭":"𝔭",φ:"φ",ϕ:"ϕ","☎":"☎",π:"π",ϖ:"ϖ",ℎ:"ℎ","+":"+","⨣":"⨣","⨢":"⨢","⨥":"⨥","⩲":"⩲","⨦":"⨦","⨧":"⨧","⨕":"⨕","𝕡":"𝕡","£":"£","⪳":"⪳","⪷":"⪷","⪹":"⪹","⪵":"⪵","⋨":"⋨","′":"′","⌮":"⌮","⌒":"⌒","⌓":"⌓","⊰":"⊰","𝓅":"𝓅",ψ:"ψ"," ":" ","𝔮":"𝔮","𝕢":"𝕢","⁗":"⁗","𝓆":"𝓆","⨖":"⨖","?":"?","⤜":"⤜","⥤":"⥤","∽̱":"∽̱",ŕ:"ŕ","⦳":"⦳","⦒":"⦒","⦥":"⦥","»":"»","⥵":"⥵","⤠":"⤠","⤳":"⤳","⤞":"⤞","⥅":"⥅","⥴":"⥴","↣":"↣","↝":"↝","⤚":"⤚","∶":"∶","❳":"❳","}":"}","]":"]","⦌":"⦌","⦎":"⦎","⦐":"⦐",ř:"ř",ŗ:"ŗ",р:"р","⤷":"⤷","⥩":"⥩","↳":"↳","▭":"▭","⥽":"⥽","𝔯":"𝔯","⥬":"⥬",ρ:"ρ",ϱ:"ϱ","⇉":"⇉","⋌":"⋌","˚":"˚","":"‏","⎱":"⎱","⫮":"⫮","⟭":"⟭","⇾":"⇾","⦆":"⦆","𝕣":"𝕣","⨮":"⨮","⨵":"⨵",")":")","⦔":"⦔","⨒":"⨒","›":"›","𝓇":"𝓇","⋊":"⋊","▹":"▹","⧎":"⧎","⥨":"⥨","℞":"℞",ś:"ś","⪴":"⪴","⪸":"⪸",š:"š",ş:"ş",ŝ:"ŝ","⪶":"⪶","⪺":"⪺","⋩":"⋩","⨓":"⨓",с:"с","⋅":"⋅","⩦":"⩦","⇘":"⇘","§":"§",";":";","⤩":"⤩","✶":"✶","𝔰":"𝔰","♯":"♯",щ:"щ",ш:"ш","":"­",σ:"σ",ς:"ς","⩪":"⩪","⪞":"⪞","⪠":"⪠","⪝":"⪝","⪟":"⪟","≆":"≆","⨤":"⨤","⥲":"⥲","⨳":"⨳","⧤":"⧤","⌣":"⌣","⪪":"⪪","⪬":"⪬","⪬︀":"⪬︀",ь:"ь","/":"/","⧄":"⧄","⌿":"⌿","𝕤":"𝕤","♠":"♠","⊓︀":"⊓︀","⊔︀":"⊔︀","𝓈":"𝓈","☆":"☆","⊂":"⊂","⫅":"⫅","⪽":"⪽","⫃":"⫃","⫁":"⫁","⫋":"⫋","⊊":"⊊","⪿":"⪿","⥹":"⥹","⫇":"⫇","⫕":"⫕","⫓":"⫓","♪":"♪","¹":"¹","²":"²","³":"³","⫆":"⫆","⪾":"⪾","⫘":"⫘","⫄":"⫄","⟉":"⟉","⫗":"⫗","⥻":"⥻","⫂":"⫂","⫌":"⫌","⊋":"⊋","⫀":"⫀","⫈":"⫈","⫔":"⫔","⫖":"⫖","⇙":"⇙","⤪":"⤪",ß:"ß","⌖":"⌖",τ:"τ",ť:"ť",ţ:"ţ",т:"т","⌕":"⌕","𝔱":"𝔱",θ:"θ",ϑ:"ϑ",þ:"þ","×":"×","⨱":"⨱","⨰":"⨰","⌶":"⌶","⫱":"⫱","𝕥":"𝕥","⫚":"⫚","‴":"‴","▵":"▵","≜":"≜","◬":"◬","⨺":"⨺","⨹":"⨹","⧍":"⧍","⨻":"⨻","⏢":"⏢","𝓉":"𝓉",ц:"ц",ћ:"ћ",ŧ:"ŧ","⥣":"⥣",ú:"ú",ў:"ў",ŭ:"ŭ",û:"û",у:"у",ű:"ű","⥾":"⥾","𝔲":"𝔲",ù:"ù","▀":"▀","⌜":"⌜","⌏":"⌏","◸":"◸",ū:"ū",ų:"ų","𝕦":"𝕦",υ:"υ","⇈":"⇈","⌝":"⌝","⌎":"⌎",ů:"ů","◹":"◹","𝓊":"𝓊","⋰":"⋰",ũ:"ũ",ü:"ü","⦧":"⦧","⫨":"⫨","⫩":"⫩","⦜":"⦜","⊊︀":"⊊︀","⫋︀":"⫋︀","⊋︀":"⊋︀","⫌︀":"⫌︀",в:"в","⊻":"⊻","≚":"≚","⋮":"⋮","𝔳":"𝔳","𝕧":"𝕧","𝓋":"𝓋","⦚":"⦚",ŵ:"ŵ","⩟":"⩟","≙":"≙","℘":"℘","𝔴":"𝔴","𝕨":"𝕨","𝓌":"𝓌","𝔵":"𝔵",ξ:"ξ","⋻":"⋻","𝕩":"𝕩","𝓍":"𝓍",ý:"ý",я:"я",ŷ:"ŷ",ы:"ы","¥":"¥","𝔶":"𝔶",ї:"ї","𝕪":"𝕪","𝓎":"𝓎",ю:"ю",ÿ:"ÿ",ź:"ź",ž:"ž",з:"з",ż:"ż",ζ:"ζ","𝔷":"𝔷",ж:"ж","⇝":"⇝","𝕫":"𝕫","𝓏":"𝓏","":"‍","":"‌"}}};var numericUnicodeMap={};Object.defineProperty(numericUnicodeMap,"__esModule",{value:!0}),numericUnicodeMap.numericUnicodeMap={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var surrogatePairs={};Object.defineProperty(surrogatePairs,"__esModule",{value:!0}),surrogatePairs.fromCodePoint=String.fromCodePoint||function(a){return String.fromCharCode(Math.floor((a-65536)/1024)+55296,(a-65536)%1024+56320)},surrogatePairs.getCodePoint=String.prototype.codePointAt?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536},surrogatePairs.highSurrogateFrom=55296,surrogatePairs.highSurrogateTo=56319;var __assign$9=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$9=Object.assign||function(a){for(var s,$=1,_=arguments.length;$<_;$++){s=arguments[$];for(var _e in s)Object.prototype.hasOwnProperty.call(s,_e)&&(a[_e]=s[_e])}return a},__assign$9.apply(this,arguments)};Object.defineProperty(lib$2,"__esModule",{value:!0});var named_references_1=namedReferences,numeric_unicode_map_1=numericUnicodeMap,surrogate_pairs_1=surrogatePairs,allNamedReferences=__assign$9(__assign$9({},named_references_1.namedReferences),{all:named_references_1.namedReferences.html5}),encodeRegExps={specialChars:/[<>'"&]/g,nonAscii:/[<>'"&\u0080-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintable:/[<>'"&\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,nonAsciiPrintableOnly:/[\x01-\x08\x11-\x15\x17-\x1F\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,extensive:/[\x01-\x0c\x0e-\x1f\x21-\x2c\x2e-\x2f\x3a-\x40\x5b-\x60\x7b-\x7d\x7f-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g},defaultEncodeOptions={mode:"specialChars",level:"all",numeric:"decimal"};function encode(a,s){var st=s===void 0?defaultEncodeOptions:s,lt=st.mode,$=lt===void 0?"specialChars":lt,_=st.numeric,_e=_===void 0?"decimal":_,tt=st.level,nt=tt===void 0?"all":tt;if(!a)return"";var at=encodeRegExps[$],ot=allNamedReferences[nt].characters,rt=_e==="hexadecimal";at.lastIndex=0;var st=at.exec(a),lt;if(st){lt="";var _=0;do{_!==st.index&&(lt+=a.substring(_,st.index));var tt=st[0],et=ot[tt];if(!et){var it=tt.length>1?surrogate_pairs_1.getCodePoint(tt,0):tt.charCodeAt(0);et=(rt?"&#x"+it.toString(16):"&#"+it)+";"}lt+=et,_=st.index+tt.length}while(st=at.exec(a));_!==a.length&&(lt+=a.substring(_))}else lt=a;return lt}lib$2.encode=encode;var defaultDecodeOptions={scope:"body",level:"all"},strict=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,attribute=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,baseDecodeRegExps={xml:{strict,attribute,body:named_references_1.bodyRegExps.xml},html4:{strict,attribute,body:named_references_1.bodyRegExps.html4},html5:{strict,attribute,body:named_references_1.bodyRegExps.html5}},decodeRegExps=__assign$9(__assign$9({},baseDecodeRegExps),{all:baseDecodeRegExps.html5}),fromCharCode=String.fromCharCode,outOfBoundsChar=fromCharCode(65533),defaultDecodeEntityOptions={level:"all"};function decodeEntity(a,s){var _=(s===void 0?defaultDecodeEntityOptions:s).level,$=_===void 0?"all":_;if(!a)return"";var _=a;a[a.length-1];{var _e=allNamedReferences[$].entities[a];if(_e)_=_e;else if(a[0]==="&"&&a[1]==="#"){var tt=a[2],nt=tt=="x"||tt=="X"?parseInt(a.substr(3),16):parseInt(a.substr(2));_=nt>=1114111?outOfBoundsChar:nt>65535?surrogate_pairs_1.fromCodePoint(nt):fromCharCode(numeric_unicode_map_1.numericUnicodeMap[nt]||nt)}}return _}lib$2.decodeEntity=decodeEntity;function decode(a,s){var $=s===void 0?defaultDecodeOptions:s,_=$.level,_e=_===void 0?"all":_,tt=$.scope,nt=tt===void 0?_e==="xml"?"strict":"body":tt;if(!a)return"";var at=decodeRegExps[_e][nt],ot=allNamedReferences[_e].entities,rt=nt==="attribute",st=nt==="strict";at.lastIndex=0;var lt=at.exec(a),et;if(lt){et="";var it=0;do{it!==lt.index&&(et+=a.substring(it,lt.index));var ut=lt[0],ft=ut,ht=ut[ut.length-1];if(rt&&ht==="=")ft=ut;else if(st&&ht!==";")ft=ut;else{var dt=ot[ut];if(dt)ft=dt;else if(ut[0]==="&"&&ut[1]==="#"){var gt=ut[2],pt=gt=="x"||gt=="X"?parseInt(ut.substr(3),16):parseInt(ut.substr(2));ft=pt>=1114111?outOfBoundsChar:pt>65535?surrogate_pairs_1.fromCodePoint(pt):fromCharCode(numeric_unicode_map_1.numericUnicodeMap[pt]||pt)}}et+=ft,it=lt.index+ut.length}while(lt=at.exec(a));it!==a.length&&(et+=a.substring(it))}else et=a;return et}lib$2.decode=decode,function(a){var s=commonjsGlobal&&commonjsGlobal.__extends||function(){var At=function(xt,bt){return At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Et,St){Et.__proto__=St}||function(Et,St){for(var Bt in St)Object.prototype.hasOwnProperty.call(St,Bt)&&(Et[Bt]=St[Bt])},At(xt,bt)};return function(xt,bt){if(typeof bt!="function"&&bt!==null)throw new TypeError("Class extends value "+String(bt)+" is not a constructor or null");At(xt,bt);function Et(){this.constructor=xt}xt.prototype=bt===null?Object.create(bt):(Et.prototype=bt.prototype,new Et)}}();Object.defineProperty(a,"__esModule",{value:!0}),a.isBlock=a.parse=a.Matcher=a.HTMLElement=a.CommentNode=a.TextNode=a.AbstractNode=a.NodeType=void 0;var $=lib$2,_;(function(At){At[At.ELEMENT_NODE=1]="ELEMENT_NODE",At[At.TEXT_NODE=3]="TEXT_NODE",At[At.COMMENT_NODE=8]="COMMENT_NODE"})(_=a.NodeType||(a.NodeType={}));var _e=function(){function At(){this.childNodes=[]}return Object.defineProperty(At.prototype,"text",{get:function(){return(0,$.decode)(this.rawText)},enumerable:!1,configurable:!0}),At.prototype.remove=function(){return this.parentNode&&this.parentNode.removeChild(this),this},At}();a.AbstractNode=_e;var tt=function(At){s(xt,At);function xt(bt){var Et=At.call(this)||this;return Et.nodeType=_.TEXT_NODE,Et.value=bt,Et}return Object.defineProperty(xt.prototype,"rawText",{get:function(){return this.value},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:!1,configurable:!0}),xt.prototype.toString=function(){return this.rawText},xt}(_e);a.TextNode=tt;var nt=function(At){s(xt,At);function xt(bt){var Et=At.call(this)||this;return Et.nodeType=_.COMMENT_NODE,Et.value=bt,Et}return Object.defineProperty(xt.prototype,"rawText",{get:function(){return this.value},enumerable:!1,configurable:!0}),xt.prototype.toString=function(){return"<!--".concat(this.rawText,"-->")},xt}(_e);a.CommentNode=nt;var at={div:!0,p:!0,li:!0,td:!0,section:!0,br:!0};function ot(At){return At[At.length-1]}var rt=function(At){s(xt,At);function xt(bt,Et,St){Et===void 0&&(Et=""),St===void 0&&(St=null);var Bt=At.call(this)||this;Bt.tagName=bt,Bt.rawAttrs=Et,Bt.classNames=[],Bt.nodeType=_.ELEMENT_NODE,Bt.rawAttrs=Et,Bt.parentNode=St,Bt.childNodes=[];for(var Ot={},Tt=void 0;Tt=ut.exec(Et);)Ot[Tt[2]]=Tt[4]||Tt[5]||Tt[6];return Ot.id&&(Bt.id=Ot.id),Ot.class&&(Bt.classNames=Ot.class.split(/\s+/)),Bt}return xt.prototype.removeChild=function(bt){this.childNodes=this.childNodes.filter(function(Et){return Et!==bt}),bt instanceof xt&&(bt.parentNode=null)},xt.prototype.exchangeChild=function(bt,Et){var St=this.childNodes.findIndex(function(Bt){return Bt===bt});St>=0&&(this.childNodes[St]=Et,bt instanceof xt&&(bt.parentNode=null))},Object.defineProperty(xt.prototype,"rawText",{get:function(){for(var bt="",Et=0;Et<this.childNodes.length;Et++)bt+=this.childNodes[Et].rawText;return bt},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"structuredText",{get:function(){var bt=[],Et=[bt];function St(Bt){if(Bt.nodeType===_.ELEMENT_NODE)at[Bt.tagName]?(bt.length>0&&Et.push(bt=[]),Bt.childNodes.forEach(St),bt.length>0&&Et.push(bt=[])):Bt.childNodes.forEach(St);else if(Bt.nodeType===_.TEXT_NODE)if(Bt.isWhitespace)bt.prependWhitespace=!0;else{var Ot=Bt.text;bt.prependWhitespace&&(Ot=" "+Ot,bt.prependWhitespace=!1),bt.push(Ot)}}return St(this),Et.map(function(Bt){return Bt.join("").trim().replace(/\s{2,}/g," ")}).join(`
|
127
127
|
`).replace(/\s+$/,"")},enumerable:!1,configurable:!0}),xt.prototype.toString=function(){var bt=this.tagName;if(bt){var Et=/^(img|br|hr|area|base|input|doctype|link|meta)$/i.test(bt),St=this.rawAttrs?" "+this.rawAttrs:"";return Et?"<".concat(bt).concat(St," />"):"<".concat(bt).concat(St,">").concat(this.innerHTML,"</").concat(bt,">")}else return this.innerHTML},Object.defineProperty(xt.prototype,"innerHTML",{get:function(){return this.childNodes.map(function(bt){return bt.toString()}).join("")},set:function(bt){var Et=this,St=mt(bt);this.childNodes.forEach(function(Bt){return Bt.remove()}),St.childNodes.forEach(function(Bt){return Et.appendChild(Bt)})},enumerable:!1,configurable:!0}),xt.prototype.set_content=function(bt){if(bt instanceof _e)bt=[bt];else if(typeof bt=="string"){var Et=mt(bt);bt=Et.childNodes.length?Et.childNodes:[new tt(bt)]}this.childNodes=bt},Object.defineProperty(xt.prototype,"outerHTML",{get:function(){return this.toString()},enumerable:!1,configurable:!0}),xt.prototype.trimRight=function(bt){for(var Et=0;Et<this.childNodes.length;Et++){var St=this.childNodes[Et];if(St.nodeType===_.ELEMENT_NODE)St.trimRight(bt);else{var Bt=St.rawText.search(bt);Bt>-1&&(St.value=St.rawText.substr(0,Bt),this.childNodes.length=Et+1)}}return this},Object.defineProperty(xt.prototype,"structure",{get:function(){var bt=[],Et=0;function St(Ot){bt.push(" ".repeat(Et)+Ot)}function Bt(Ot){var Tt=Ot.id?"#"+Ot.id:"",wt=Ot.classNames.length?"."+Ot.classNames.join("."):"";St(Ot.tagName+Tt+wt),Et++;for(var Ct=0;Ct<Ot.childNodes.length;Ct++){var It=Ot.childNodes[Ct];It.nodeType===_.ELEMENT_NODE?Bt(It):It.nodeType===_.TEXT_NODE&&(It.isWhitespace||St("#text"))}Et--}return Bt(this),bt.join(`
|
128
|
-
`)},enumerable:!1,configurable:!0}),xt.prototype.removeWhitespace=function(){for(var bt=0,Et=0;Et<this.childNodes.length;Et++){var St=this.childNodes[Et];if(St.nodeType===_.TEXT_NODE){if(St.isWhitespace)continue;St.value=St.rawText.trim()}else St.nodeType===_.ELEMENT_NODE&&St.removeWhitespace();this.childNodes[bt++]=St}return this.childNodes.length=bt,this},xt.prototype.querySelectorAll=function(bt){var Et=this,St;if(bt instanceof et)St=bt,St.reset();else{if(bt.includes(",")){var Bt=bt.split(",");return Array.from(Bt.reduce(function(yt,Rt){var kt=Et.querySelectorAll(Rt.trim());return kt.reduce(function(jt,Ht){return jt.add(Ht)},yt)},new Set))}St=new et(bt)}for(var Ot=[],Tt=[],wt=0;wt<this.childNodes.length;wt++)for(Tt.push([this.childNodes[wt],0,!1]);Tt.length;){var Ct=ot(Tt),It=Ct[0];if(Ct[1]===0){if(It.nodeType!==_.ELEMENT_NODE){Tt.pop();continue}if((Ct[2]=St.advance(It))&&St.matched){Ot.push(It),St.rewind(),Tt.pop();continue}}Ct[1]<It.childNodes.length?Tt.push([It.childNodes[Ct[1]++],0,!1]):(Ct[2]&&St.rewind(),Tt.pop())}return Ot},xt.prototype.querySelector=function(bt){var Et;bt instanceof et?(Et=bt,Et.reset()):Et=new et(bt);for(var St=[],Bt=0;Bt<this.childNodes.length;Bt++)for(St.push([this.childNodes[Bt],0,!1]);St.length;){var Ot=ot(St),Tt=Ot[0];if(Ot[1]===0){if(Tt.nodeType!==_.ELEMENT_NODE){St.pop();continue}if((Ot[2]=Et.advance(Tt))&&Et.matched)return Tt}Ot[1]<Tt.childNodes.length?St.push([Tt.childNodes[Ot[1]++],0,!1]):(Ot[2]&&Et.rewind(),St.pop())}return null},xt.prototype.appendChild=function(bt){return this.childNodes.push(bt),bt instanceof xt&&(bt.parentNode=this),bt},xt.prototype.prependChild=function(bt){return this.childNodes.unshift(bt),bt instanceof xt&&(bt.parentNode=this),bt},Object.defineProperty(xt.prototype,"firstChild",{get:function(){return this.childNodes[0]},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"lastChild",{get:function(){return ot(this.childNodes)},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"attributes",{get:function(){if(this._attrs)return this._attrs;this._attrs={};var bt=this.rawAttributes;for(var Et in bt)this._attrs[Et]=(0,$.decode)(bt[Et]);return this._attrs},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"rawAttributes",{get:function(){if(this._rawAttrs)return this._rawAttrs;var bt={};if(this.rawAttrs)for(var Et=void 0;Et=ft.exec(this.rawAttrs);)bt[Et[1]]=Et[4]||Et[5]||Et[6]||"";return this._rawAttrs=bt,bt},enumerable:!1,configurable:!0}),xt.prototype.setAttribute=function(bt,Et){bt==="id"?this.id=Et:bt==="class"&&(this.classNames=Et.split(/\s+/));var St=this.attributes;Et===void 0?delete St[bt]:St[bt]=Et+"",this._rawAttrs&&(Et===void 0?delete this._rawAttrs[bt]:this._rawAttrs[bt]=(0,$.encode)(Et+"")),this.rawAttrs=Object.keys(St).map(function(Bt){return Bt+(St[Bt]===""?"":'="'+(0,$.encode)(St[Bt])+'"')}).join(" ")},xt.prototype.removeAttribute=function(bt){this.setAttribute(bt,void 0)},xt.prototype.setAttributes=function(bt){var Et=this;bt.id?this.id=bt.id:bt.class&&(this.classNames=bt.class.split(/\s+/)),this.attributes&&(Object.keys(this.attributes).forEach(function(St){return delete Et.attributes[St]}),Object.keys(bt).forEach(function(St){return Et.attributes[St]=bt[St]+""})),this.rawAttributes&&(Object.keys(this.rawAttributes).forEach(function(St){return delete Et.rawAttributes[St]}),Object.keys(bt).forEach(function(St){return Et.rawAttributes[St]=(0,$.encode)(bt[St]+"")})),this.rawAttrs=Object.keys(bt).map(function(St){return St+(bt[St]===""?"":'="'+(0,$.encode)(bt[St]+"")+'"')}).join(" ")},xt}(_e);a.HTMLElement=rt;var st={},lt={f145:function(At,xt,bt,Et,St){if(xt=xt||"",bt=bt||[],At.id!=xt.substr(1))return!1;for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f45:function(At,xt,bt,Et,St){bt=bt||[];for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f15:function(At,xt,bt,Et,St){return xt=xt||"",At.id==xt.substr(1)},f1:function(At,xt,bt,Et,St){if(xt=xt||"",At.id!=xt.substr(1))return!1},f5:function(At,xt,bt,Et,St){return!0},f245:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f25:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f2:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f345:function(At,xt,bt,Et,St){if(xt=xt||"",bt=bt||[],At.tagName!=xt)return!1;for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f35:function(At,xt,bt,Et,St){return xt=xt||"",At.tagName==xt},f3:function(At,xt,bt,Et,St){if(xt=xt||"",At.tagName!=xt)return!1}},et=function(){function At(xt){this.nextMatch=0,lt.f5=lt.f5,this.matchers=xt.split(" ").map(function(bt){if(st[bt])return st[bt];var Et=bt.split("."),St=Et[0],Bt=Et.slice(1).sort(),Ot='"use strict";',Tt="f",wt="",Ct="";if(St&&St!="*"){var It;if(St[0]=="#")Ot+="if (el.id != "+JSON.stringify(St.substr(1))+") return false;",Tt+="1";else if(It=St.match(/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/)){wt=It[1];var yt=It[2];if(yt!=="="&&yt!=="!=")throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");yt==="="&&(yt="=="),Ct=It[7]||It[8],Ot+='let attrs = el.attributes;for (let key in attrs){const val = attrs[key]; if (key == "'.concat(wt,'" && val == "').concat(Ct,'"){return true;}} return false;'),Tt+="2"}else Ot+="if (el.tagName != "+JSON.stringify(St)+") return false;",Tt+="3"}Bt.length>0&&(Ot+="for (let cls = "+JSON.stringify(Bt)+", i = 0; i < cls.length; i++) if (el.classNames.indexOf(cls[i]) === -1) return false;",Tt+="4"),Ot+="return true;",Tt+="5";var Rt={func:lt[Tt],tagName:St||"",classes:Bt||"",attr_key:wt||"",value:Ct||""};return Ot=Ot||"",st[bt]=Rt})}return At.prototype.advance=function(xt){return this.nextMatch<this.matchers.length&&this.matchers[this.nextMatch].func(xt,this.matchers[this.nextMatch].tagName,this.matchers[this.nextMatch].classes,this.matchers[this.nextMatch].attr_key,this.matchers[this.nextMatch].value)?(this.nextMatch++,!0):!1},At.prototype.rewind=function(){this.nextMatch--},Object.defineProperty(At.prototype,"matched",{get:function(){return this.nextMatch==this.matchers.length},enumerable:!1,configurable:!0}),At.prototype.reset=function(){this.nextMatch=0},At.prototype.flushCache=function(){st={}},At}();a.Matcher=et;var it=/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)((\s+[a-z][-.:0-9_a-z]*(\s*=\s*("[^"]*"|'([^']*')|([^\s\/>]+)))?)*)\s*(\/?)>/ig,ut=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig,ft=/([a-z][-.:0-9_a-z]*)(\s*=\s*("([^"]*)"|'([^']*)'|(\S+)))?/ig,ht={area:!0,base:!0,br:!0,col:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,source:!0},dt={li:{li:!0},p:{p:!0,div:!0},b:{div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0},h1:{h1:!0},h2:{h2:!0},h3:{h3:!0},h4:{h4:!0},h5:{h5:!0},h6:{h6:!0}},gt={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},pt={script:!0,noscript:!0,style:!0,pre:!0};function mt(At,xt){var bt=new rt(null),Et=bt,St=[bt],Bt=0;xt=xt||{};for(var Ot;Ot=it.exec(At);){if(Bt+Ot[0].length<it.lastIndex){var Tt=At.substring(Bt,it.lastIndex-Ot[0].length);Et.appendChild(new tt(Tt))}if(Bt=it.lastIndex,Ot[0][1]=="!"){if(xt.comment){var Tt=At.substring(Bt-3,Bt-Ot[0].length+4);Et.appendChild(new nt(Tt))}continue}if(xt.lowerCaseTagName&&(Ot[2]=Ot[2].toLowerCase()),!Ot[1]&&(!Ot[9]&&dt[Et.tagName]&&dt[Et.tagName][Ot[2]]&&(St.pop(),Et=ot(St)),Et=Et.appendChild(new rt(Ot[2],Ot[3].trim())),St.push(Et),pt[Ot[2]])){var wt="</"+Ot[2]+">",Ct=At.indexOf(wt,it.lastIndex);if(xt[Ot[2]]){var Tt=void 0;Ct==-1?Tt=At.substr(it.lastIndex):Tt=At.substring(it.lastIndex,Ct),Tt.length>0&&Et.appendChild(new tt(Tt))}Ct==-1?Bt=it.lastIndex=At.length+1:(Bt=it.lastIndex=Ct+wt.length,Ot[1]="true")}if(Ot[1]||Ot[9]||ht[Ot[2]])for(;;)if(Et.tagName==Ot[2]){St.pop(),Et=ot(St);break}else{if(gt[Et.tagName]&>[Et.tagName][Ot[2]]){St.pop(),Et=ot(St);continue}break}}Bt<At.length&&bt.appendChild(new tt(At.substring(Bt))),bt.valid=St.length===1;for(var It=function(){var yt=St.pop(),Rt=ot(St);yt.parentNode&&yt.parentNode instanceof rt&&yt.parentNode.parentNode&&(yt.parentNode===Rt&&yt.tagName===Rt.tagName?(Rt.removeChild(yt),yt.childNodes.forEach(function(kt){Rt.parentNode.appendChild(kt)}),St.pop()):(Rt.removeChild(yt),yt.childNodes.forEach(function(kt){Rt.appendChild(kt)})))};St.length>1;)It();return bt}a.parse=mt;var ct=["html","body","address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","header","hr","li","main","nav","noscript","ol","p","pre","section","tfoot","table","tbody","ul","video","th","td","tr","h1","h2","h3","h4","h5","h6"];function vt(At){return At.nodeType===_.ELEMENT_NODE&&At.tagName&&ct.includes(At.tagName.toLowerCase())}a.isBlock=vt}(dist),LineCapStyle.Butt,LineCapStyle.Round,LineCapStyle.Projecting,FillRule.EvenOdd,FillRule.NonZero,LineJoinStyle.Bevel,LineJoinStyle.Miter,LineJoinStyle.Round;const convertForPdfLayoutProps=({schema:a,pageHeight:s,applyRotateTranslate:$=!0})=>{const{width:_,height:_e,position:tt,rotate:nt,opacity:at}=a,{x:ot,y:rt}=tt,st=nt?-nt:0,lt=mm2pt(_),et=mm2pt(_e);let it=mm2pt(ot),ut=s-mm2pt(rt)-et;if(st&&$){const ft={x:it+lt/2,y:s-mm2pt(rt)-et/2},ht=rotatePoint({x:it,y:ut},ft,st);it=ht.x,ut=ht.y}return{position:{x:it,y:ut},height:et,width:lt,rotate:degrees(st),opacity:at}},rotatePoint=(a,s,$)=>{const _=degreesToRadians($),_e=Math.cos(_)*(a.x-s.x)-Math.sin(_)*(a.y-s.y)+s.x,tt=Math.sin(_)*(a.x-s.x)+Math.cos(_)*(a.y-s.y)+s.y;return{x:_e,y:tt}},isEditable=(a,s)=>a==="designer"||a==="form"&&s.readOnly!==!0,hex2rgb=a=>(a.slice(0,1)==="#"&&(a=a.slice(1)),a.length===3&&(a=a.slice(0,1)+a.slice(0,1)+a.slice(1,2)+a.slice(1,2)+a.slice(2,3)+a.slice(2,3)),[a.slice(0,2),a.slice(2,4),a.slice(4,6)].map(s=>parseInt(s,16))),hex2RgbColor=a=>{if(a){if(!isHexValid(a))throw new Error(`Invalid hex color value ${a}`);const[$,_,_e]=hex2rgb(a);return rgb($/255,_/255,_e/255)}},hex2CmykColor=a=>{if(a){if(!isHexValid(a))throw new Error(`Invalid hex color value ${a}`);a=a.replace("#","");const $=a.substring(0,6),_=a.substring(6,8),_e=_?parseInt(_,16)/255:1;let tt=parseInt($.substring(0,2),16)/255,nt=parseInt($.substring(2,4),16)/255,at=parseInt($.substring(4,6),16)/255;tt=tt*_e+(1-_e),nt=nt*_e+(1-_e),at=at*_e+(1-_e);const ot=1-Math.max(tt,nt,at),rt=tt===0?0:(1-tt-ot)/(1-ot),st=nt===0?0:(1-nt-ot)/(1-ot),lt=at===0?0:(1-at-ot)/(1-ot);return cmyk(rt,st,lt,ot)}},hex2PrintingColor=(a,s)=>(s==null?void 0:s.toLocaleLowerCase())=="cmyk"?hex2CmykColor(a):hex2RgbColor(a),cloneDeep$1=a=>JSON.parse(JSON.stringify(a)),embedAndGetFontObj=async a=>{const{pdfDoc:s,font:$,_cache:_}=a;if(_.has(s))return _.get(s);const _e=await Promise.all(Object.values($).map(async nt=>{let at=nt.data;return typeof at=="string"&&at.startsWith("http")&&(at=await fetch(at).then(ot=>ot.arrayBuffer())),s.embedFont(at,{subset:typeof nt.subset>"u"?!0:nt.subset})})),tt=Object.keys($).reduce((nt,at,ot)=>Object.assign(nt,{[at]:_e[ot]}),{});return _.set(s,tt),tt},getFontProp=async({value:a,font:s,schema:$,colorType:_,_cache:_e})=>{const tt=$.dynamicFontSize?await calculateDynamicFontSize({textSchema:$,font:s,value:a,_cache:_e}):$.fontSize??DEFAULT_FONT_SIZE,nt=hex2PrintingColor($.fontColor||DEFAULT_FONT_COLOR,_);return{alignment:$.alignment??DEFAULT_ALIGNMENT,verticalAlignment:$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT,lineHeight:$.lineHeight??DEFAULT_LINE_HEIGHT,characterSpacing:$.characterSpacing??DEFAULT_CHARACTER_SPACING,fontSize:tt,color:nt}},pdfRender=async a=>{const{value:s,pdfDoc:$,pdfLib:_,page:_e,options:tt,schema:nt,_cache:at}=a;if(!s)return;const{font:ot=getDefaultFont(),colorType:rt}=tt,[st,lt,et]=await Promise.all([embedAndGetFontObj({pdfDoc:$,font:ot,_cache:at}),getFontKitFont(nt.fontName,ot,at),getFontProp({value:s,font:ot,schema:nt,_cache:at})]),{fontSize:it,color:ut,alignment:ft,verticalAlignment:ht,lineHeight:dt,characterSpacing:gt}=et,pt=nt.fontName?nt.fontName:getFallbackFontName(ot),mt=st&&st[pt],ct=_e.getHeight(),{width:vt,height:At,rotate:xt,position:{x:bt,y:Et},opacity:St}=convertForPdfLayoutProps({schema:nt,pageHeight:ct,applyRotateTranslate:!1});if(nt.backgroundColor){const yt=hex2PrintingColor(nt.backgroundColor,rt);_e.drawRectangle({x:bt,y:Et,width:vt,height:At,rotate:xt,color:yt})}_e.pushOperators(_.setCharacterSpacing(gt??DEFAULT_CHARACTER_SPACING));const Bt=heightOfFontAtSize(lt,it),Ot=getFontDescentInPt(lt,it),Tt=dt===0?0:(dt-1)*it/2,wt=splitTextToSize({value:s,characterSpacing:gt,fontSize:it,fontKitFont:lt,boxWidthInPt:vt});let Ct=0;if(ht===VERTICAL_ALIGN_TOP)Ct=Bt+Tt;else{const yt=dt*it*(wt.length-1);ht===VERTICAL_ALIGN_BOTTOM?Ct=At-yt+Ot-Tt:ht===VERTICAL_ALIGN_MIDDLE&&(Ct=(At-yt-Bt+Ot)/2+Bt)}const It={x:bt+vt/2,y:ct-mm2pt(nt.position.y)-At/2};wt.forEach((yt,Rt)=>{const kt=widthOfTextAtSize(yt,lt,it,gt),jt=dt*it*Rt;let Ht=bt;ft==="center"?Ht+=(vt-kt)/2:ft==="right"&&(Ht+=vt-kt);let Ft=ct-mm2pt(nt.position.y)-Ct-jt;if(xt.angle!==0){const _t=rotatePoint({x:Ht,y:Ft},It,xt.angle);Ht=_t.x,Ft=_t.y}_e.drawText(yt,{x:Ht,y:Ft,rotate:xt,size:it,color:ut,lineHeight:dt*it,font:mt,opacity:St})})},DEFAULT_OPACITY=1,HEX_COLOR_PATTERN="^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",UseDynamicFontSize=a=>{const{rootElement:s,changeSchemas:$,activeSchema:_,i18n:_e}=a,tt=document.createElement("input");tt.type="checkbox",tt.checked=!!(_!=null&&_.dynamicFontSize),tt.onchange=at=>{const ot=at.target.checked?{min:DEFAULT_DYNAMIC_MIN_FONT_SIZE,max:DEFAULT_DYNAMIC_MAX_FONT_SIZE,fit:DEFAULT_DYNAMIC_FIT}:void 0;$([{key:"dynamicFontSize",value:ot,schemaId:_.id}])};const nt=document.createElement("label");nt.innerText=_e("schemas.text.dynamicFontSize")||"",nt.style.cssText="display: flex; width: 100%;",nt.appendChild(tt),s.appendChild(nt)},propPanel={schema:({options:a,activeSchema:s,i18n:$})=>{const _=a.font||{[DEFAULT_FONT_NAME]:{data:"",fallback:!0}},_e=Object.keys(_),tt=getFallbackFontName(_),nt=!!(s!=null&&s.dynamicFontSize);return{fontName:{title:$("schemas.text.fontName"),type:"string",widget:"select",default:tt,props:{options:_e.map(ot=>({label:ot,value:ot}))},span:12},fontSize:{title:$("schemas.text.size"),type:"number",widget:"inputNumber",span:6,disabled:nt,props:{min:0}},characterSpacing:{title:$("schemas.text.spacing"),type:"number",widget:"inputNumber",span:6,props:{min:0}},alignment:{title:$("schemas.text.textAlign"),type:"string",widget:"select",props:{options:[{label:$("schemas.left"),value:DEFAULT_ALIGNMENT},{label:$("schemas.center"),value:ALIGN_CENTER},{label:$("schemas.right"),value:ALIGN_RIGHT}]},span:8},verticalAlignment:{title:$("schemas.text.verticalAlign"),type:"string",widget:"select",props:{options:[{label:$("schemas.top"),value:VERTICAL_ALIGN_TOP},{label:$("schemas.middle"),value:VERTICAL_ALIGN_MIDDLE},{label:$("schemas.bottom"),value:VERTICAL_ALIGN_BOTTOM}]},span:8},lineHeight:{title:$("schemas.text.lineHeight"),type:"number",widget:"inputNumber",props:{step:.1,min:0},span:8},useDynamicFontSize:{type:"boolean",widget:"UseDynamicFontSize",bind:!1,span:16},dynamicFontSize:{type:"object",widget:"card",column:3,properties:{min:{title:$("schemas.text.min"),type:"number",widget:"inputNumber",hidden:!nt,props:{min:0}},max:{title:$("schemas.text.max"),type:"number",widget:"inputNumber",hidden:!nt,props:{min:0}},fit:{title:$("schemas.text.fit"),type:"string",widget:"select",hidden:!nt,props:{options:[{label:$("schemas.horizontal"),value:DYNAMIC_FIT_HORIZONTAL},{label:$("schemas.vertical"),value:DYNAMIC_FIT_VERTICAL}]}}}},fontColor:{title:$("schemas.textColor"),type:"string",widget:"color",rules:[{pattern:HEX_COLOR_PATTERN,message:$("hexColorPrompt")}]},backgroundColor:{title:$("schemas.bgColor"),type:"string",widget:"color",rules:[{pattern:HEX_COLOR_PATTERN,message:$("hexColorPrompt")}]}}},widgets:{UseDynamicFontSize},defaultSchema:{type:"text",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',content:"Type Something...",position:{x:0,y:0},width:45,height:10,rotate:0,alignment:DEFAULT_ALIGNMENT,verticalAlignment:DEFAULT_VERTICAL_ALIGNMENT,fontSize:DEFAULT_FONT_SIZE,lineHeight:DEFAULT_LINE_HEIGHT,characterSpacing:DEFAULT_CHARACTER_SPACING,dynamicFontSize:void 0,fontColor:DEFAULT_FONT_COLOR,fontName:void 0,backgroundColor:"",opacity:DEFAULT_OPACITY}},mapVerticalAlignToFlex=a=>{switch(a){case VERTICAL_ALIGN_TOP:return"flex-start";case VERTICAL_ALIGN_MIDDLE:return"center";case VERTICAL_ALIGN_BOTTOM:return"flex-end"}return"flex-start"},getBackgroundColor=(a,s)=>!a||!s.backgroundColor?"transparent":s.backgroundColor,uiRender=async a=>{const{value:s,schema:$,rootElement:_,mode:_e,onChange:tt,stopEditing:nt,tabIndex:at,placeholder:ot,options:rt,_cache:st}=a,lt=(rt==null?void 0:rt.font)||getDefaultFont();let et;const it=At=>({textSchema:$,font:lt,value:At,startingFontSize:et,_cache:st});$.dynamicFontSize&&s&&(et=await calculateDynamicFontSize(it(s)));const ut=await getFontKitFont($.fontName,lt,st),{topAdj:ft,bottomAdj:ht}=getBrowserVerticalFontAdjustments(ut,et??$.fontSize??DEFAULT_FONT_SIZE,$.lineHeight??DEFAULT_LINE_HEIGHT,$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT),dt=ft.toString(),gt=ht.toString(),pt=document.createElement("div"),mt={padding:0,resize:"none",backgroundColor:getBackgroundColor(s,$),border:"none",display:"flex",flexDirection:"column",justifyContent:mapVerticalAlignToFlex($.verticalAlignment),width:"100%",height:"100%",cursor:isEditable(_e,$)?"text":"default"};Object.assign(pt.style,mt),_.innerHTML="",_.appendChild(pt);const ct={fontFamily:$.fontName?`'${$.fontName}'`:"inherit",color:$.fontColor?$.fontColor:DEFAULT_FONT_COLOR,fontSize:`${et??$.fontSize??DEFAULT_FONT_SIZE}pt`,letterSpacing:`${$.characterSpacing??DEFAULT_CHARACTER_SPACING}pt`,lineHeight:`${$.lineHeight??DEFAULT_LINE_HEIGHT}em`,textAlign:$.alignment??DEFAULT_ALIGNMENT,whiteSpace:"pre-wrap",wordBreak:"break-word",resize:"none",border:"none",outline:"none",marginBottom:`${gt}px`,paddingTop:`${dt}px`,backgroundColor:"transparent"},vt=document.createElement("div");if(Object.assign(vt.style,ct),isEditable(_e,$)){if(isFirefox()?(vt.contentEditable="true",vt.addEventListener("keydown",At=>{At.key==="Enter"&&!At.shiftKey&&(At.preventDefault(),document.execCommand("insertLineBreak",!1,void 0))}),vt.addEventListener("paste",At=>{var Et;At.preventDefault();const xt=(Et=At.clipboardData)==null?void 0:Et.getData("text"),bt=window.getSelection();bt!=null&&bt.rangeCount&&(bt.deleteFromDocument(),bt.getRangeAt(0).insertNode(document.createTextNode(xt||"")),bt.collapseToEnd())})):vt.contentEditable="plaintext-only",vt.tabIndex=at||0,vt.innerText=s,vt.addEventListener("blur",At=>{tt&&tt({key:"content",value:At.target.innerText}),nt&&nt()}),$.dynamicFontSize&&vt.addEventListener("keyup",()=>{setTimeout(()=>{(async()=>{if(!vt.textContent)return;et=await calculateDynamicFontSize(it(vt.textContent)),vt.style.fontSize=`${et}pt`;const{topAdj:At,bottomAdj:xt}=getBrowserVerticalFontAdjustments(ut,et??$.fontSize??DEFAULT_FONT_SIZE,$.lineHeight??DEFAULT_LINE_HEIGHT,$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT);vt.style.paddingTop=`${At}px`,vt.style.marginBottom=`${xt}px`})()},0)}),ot&&!s){if(vt.innerText=ot,vt.style.color=PLACEHOLDER_FONT_COLOR,$.dynamicFontSize){const At=await calculateDynamicFontSize(it(ot));vt.style.fontSize=`${At}pt`}vt.addEventListener("focus",()=>{vt.innerText===ot&&(vt.innerText="",vt.style.color=$.fontColor??DEFAULT_FONT_COLOR)})}pt.appendChild(vt),_e==="designer"&&setTimeout(()=>{vt.focus();const At=window.getSelection(),xt=document.createRange();xt.selectNodeContents(vt),xt.collapse(!1),At==null||At.removeAllRanges(),At==null||At.addRange(xt)})}else vt.innerHTML=s.split("").map((At,xt)=>`<span style="letter-spacing:${String(s).length===xt+1?0:"inherit"};">${At}</span>`).join(""),pt.appendChild(vt)},textSchema={pdf:pdfRender,ui:uiRender,propPanel},text=textSchema;textSchema.pdf,textSchema.ui,{...textSchema.propPanel,defaultSchema:{...textSchema.propPanel.defaultSchema}};const getBody$1=a=>JSON.parse(a||"[]"),getBodyWithRange=(a,s)=>{const $=getBody$1(a);return s?$.slice(s.start,s.end):$};let Cell$2=class{constructor(s,$,_){Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"section",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"contentWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"wrappedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minReadableWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.styles=$,this.section=_,this.raw=s;const _e=/\r\n|\r|\n/g;this.text=s.split(_e)}getContentHeight(){const s=Array.isArray(this.text)?this.text.length:1,$=pt2mm(this.styles.fontSize)*this.styles.lineHeight,_=this.padding("top")+this.padding("bottom"),_e=s*$+_;return Math.max(_e,this.styles.minCellHeight)}padding(s){return this.styles.cellPadding[s]}},Column$2=class{constructor(s){Object.defineProperty(this,"index",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"wrappedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minReadableWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.index=s}getMaxCustomCellWidth(s){let $=0;for(const _ of s.allRows()){const _e=_.cells[this.index];$=Math.max($,_e.styles.cellWidth)}return $}},Row$2=class{constructor(s,$,_,_e){Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"index",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"section",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cells",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.raw=s,this.index=$,this.section=_,this.cells=_e}getMaxCellHeight(s){return s.reduce(($,_)=>{var _e;return Math.max($,((_e=this.cells[_.index])==null?void 0:_e.height)||0)},0)}getMinimumRowHeight(s){return s.reduce(($,_)=>{const _e=this.cells[_.index];if(!_e)return 0;const nt=_e.padding("top")+_e.padding("bottom")+_e.styles.lineHeight;return nt>$?nt:$},0)}},Table$3=class ou{constructor(s,$){Object.defineProperty(this,"settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.settings=s.settings,this.styles=s.styles,this.columns=$.columns,this.head=$.head,this.body=$.body}static async create(s){const{input:$,content:_,font:_e,_cache:tt}=s,nt=new ou($,_);return await calculateWidths({table:nt,font:_e,_cache:tt}),nt}getHeadHeight(){return this.head.reduce((s,$)=>s+$.getMaxCellHeight(this.columns),0)}getBodyHeight(){return this.body.reduce((s,$)=>s+$.getMaxCellHeight(this.columns),0)}allRows(){return this.head.concat(this.body)}getWidth(){return this.settings.tableWidth}getHeight(){return(this.settings.showHead?this.getHeadHeight():0)+this.getBodyHeight()}};async function calculateWidths(a){const{table:s,font:$,_cache:_}=a,_e=ot=>getFontKitFont(ot,$,_);await calculate$1(s,_e);const tt=[];let nt=0;s.columns.forEach(ot=>{const rt=ot.getMaxCustomCellWidth(s);rt?ot.width=rt:(ot.width=ot.wrappedWidth,tt.push(ot)),nt+=ot.width});let at=s.getWidth()-nt;at&&(at=resizeColumns(tt,at,ot=>Math.max(ot.minReadableWidth,ot.minWidth))),at&&(at=resizeColumns(tt,at,ot=>ot.minWidth)),at=Math.abs(at),applyColSpans(s),await fitContent(s,_e),applyRowSpans(s)}function applyRowSpans(a){const s={};let $=1;const _=a.allRows();for(let _e=0;_e<_.length;_e++){const tt=_[_e];for(const nt of a.columns){const at=s[nt.index];if($>1)$--,delete tt.cells[nt.index];else if(at)at.cell.height+=tt.height,$=1,delete tt.cells[nt.index],at.left--,at.left<=1&&delete s[nt.index];else{const ot=tt.cells[nt.index];if(!ot)continue;ot.height=tt.height}}}}function applyColSpans(a){const s=a.allRows();for(let $=0;$<s.length;$++){const _=s[$];let _e=0,tt=0;for(let nt=0;nt<a.columns.length;nt++){const at=a.columns[nt];if(tt-=1,tt>1&&a.columns[nt+1])_e+=at.width,delete _.cells[at.index];else{const ot=_.cells[at.index];if(!ot)continue;tt=1,_e=0,ot.width=at.width+_e}}}}async function fitContent(a,s){const $={count:0,height:0};for(const _ of a.allRows()){for(const _e of a.columns){const tt=_.cells[_e.index];if(!tt)continue;const nt=await s(tt.styles.fontName);tt.text=splitTextToSize({value:tt.raw,characterSpacing:tt.styles.characterSpacing,boxWidthInPt:mm2pt(tt.width),fontSize:tt.styles.fontSize,fontKitFont:nt}),tt.contentHeight=tt.getContentHeight();let at=tt.contentHeight;$&&$.count>0&&$.height>at&&(at=$.height),at>_.height&&(_.height=at)}$.count--}}function resizeColumns(a,s,$){const _=s,_e=a.reduce((tt,nt)=>tt+nt.wrappedWidth,0);for(let tt=0;tt<a.length;tt++){const nt=a[tt],at=nt.wrappedWidth/_e,ot=_*at,rt=nt.width+ot,st=$(nt),lt=rt<st?st:rt;s-=lt-nt.width,nt.width=lt}if(s=Math.round(s*1e10)/1e10,s){const tt=a.filter(nt=>s<0?nt.width>$(nt):!0);tt.length&&(s=resizeColumns(tt,s,$))}return s}async function calculate$1(a,s){for(const $ of a.allRows())for(const _ of a.columns){const _e=$.cells[_.index];if(!_e)continue;const tt=_e.padding("right")+_e.padding("left"),nt=await s(_e.styles.fontName);_e.contentWidth=getStringWidth(_e,nt)+tt;const at=getStringWidth(Object.assign(_e,{text:_e.text.join(" ").split(/\s+/)}),nt);_e.minReadableWidth=at+tt,_e.minWidth=_e.styles.cellWidth,_e.wrappedWidth=_e.styles.cellWidth}for(const $ of a.allRows())for(const _ of a.columns){const _e=$.cells[_.index];if(_e)_.wrappedWidth=Math.max(_.wrappedWidth,_e.wrappedWidth),_.minWidth=Math.max(_.minWidth,_e.minWidth),_.minReadableWidth=Math.max(_.minReadableWidth,_e.minReadableWidth);else{const tt=a.styles.columnStyles[_.index]||{},nt=tt.cellWidth||tt.minCellWidth;nt&&(_.minWidth=nt,_.wrappedWidth=nt)}}}function getStringWidth(a,s){const $=a.text,_=Array.isArray($)?$:[$],_e=a.styles.fontSize,tt=a.styles.characterSpacing;return _.map(at=>widthOfTextAtSize(at,s,_e,tt)).reduce((at,ot)=>Math.max(at,ot),0)}function parseSection(a,s,$,_,_e){const tt={};return s.map((at,ot)=>{let rt=0;const st={};let lt=0,et=0;for(const it of $)if(tt[it.index]==null||tt[it.index].left===0)if(et===0){let ut;Array.isArray(at)?ut=at[it.index-lt-rt]:ut=at[it.index];const ft=cellStyles(a,it,ot,_,_e),ht=new Cell$2(ut,ft,a);st[it.index]=ht,et=0,tt[it.index]={left:0,times:et}}else et--,lt++;else tt[it.index].left--,et=tt[it.index].times,rt++;return new Row$2(at,ot,a,st)})}function parseContent4Table(a,s){const $=a.content,_=$.columns.map(tt=>new Column$2(tt)),_e=a.styles;return{columns:_,head:parseSection("head",$.head,_,_e,s),body:parseSection("body",$.body,_,_e,s)}}function cellStyles(a,s,$,_,_e){let tt;a==="head"?tt=_.headStyles:a==="body"&&(tt=_.bodyStyles);const nt=Object.assign({},_.styles,tt),at=_.columnStyles[s.index]||_.columnStyles[s.index]||{},ot=a==="body"&&$%2===0?Object.assign({},_.alternateRowStyles):{};return Object.assign({fontName:_e,backgroundColor:"",textColor:"#000000",lineHeight:1,characterSpacing:0,alignment:"left",verticalAlignment:"middle",fontSize:10,cellPadding:5,lineColor:"#000000",lineWidth:0,minCellHeight:0,minCellWidth:0},nt,ot,at)}function mapCellStyle(a){return{fontName:a.fontName,alignment:a.alignment,verticalAlignment:a.verticalAlignment,fontSize:a.fontSize,lineHeight:a.lineHeight,characterSpacing:a.characterSpacing,backgroundColor:a.backgroundColor,textColor:a.fontColor,lineColor:a.borderColor,lineWidth:a.borderWidth,cellPadding:a.padding}}function createTableWithAvailableHeight(a,s,$){let _=s;const _e=[];let tt=0;for(;_>0&&tt<a.length;){const nt=a.slice(0,tt+1).pop();if(!nt)break;const at=nt.height;if(_-at<0)break;_e.push(nt.raw),_-=at,tt++}return createSingleTable(_e,$)}function getTableOptions(a,s){const $=a.headWidthPercentages.reduce((nt,at,ot)=>({...nt,[ot]:{cellWidth:a.width*(at/100)}}),{}),_=Object.entries(a.columnStyles.alignment||{}).reduce((nt,[at,ot])=>({...nt,[at]:{alignment:ot}}),{}),_e=new Set([...Object.keys($).map(Number),...Object.keys(_).map(Number)]),tt=Array.from(_e).reduce((nt,at)=>{const ot=$[at]||{},rt=_[at]||{};return{...nt,[at]:{...ot,...rt}}},{});return{head:[a.head],body:s,showHead:a.showHead,startY:a.position.y,tableWidth:a.width,tableLineColor:a.tableStyles.borderColor,tableLineWidth:a.tableStyles.borderWidth,headStyles:mapCellStyle(a.headStyles),bodyStyles:mapCellStyle(a.bodyStyles),alternateRowStyles:{backgroundColor:a.bodyStyles.alternateBackgroundColor},columnStyles:tt,margin:{top:0,right:0,left:a.position.x,bottom:0}}}function parseStyles(a){const s={styles:{},headStyles:{},bodyStyles:{},alternateRowStyles:{},columnStyles:{}};for(const $ of Object.keys(s))if($==="columnStyles"){const _=a[$];s.columnStyles=Object.assign({},_)}else{const _e=[a].map(tt=>tt[$]||{});s[$]=Object.assign({},_e[0],_e[1],_e[2])}return s}function parseContent4Input(a){const s=a.head||[],$=a.body||[];return{columns:(s[0]||$[0]||[]).map((_e,tt)=>tt),head:s,body:$}}function parseInput(a,s){const $=getTableOptions(a,s),_=parseStyles($),_e={startY:$.startY,margin:$.margin,tableWidth:$.tableWidth,showHead:$.showHead,tableLineWidth:$.tableLineWidth??0,tableLineColor:$.tableLineColor??""};return{content:parseContent4Input($),styles:_,settings:_e}}function createSingleTable(a,s){const{options:$,_cache:_,basePdf:_e}=s;if(!isBlankPdf(_e))throw new Error("[@pdfme/schema/table] Blank PDF is not supported");const tt=parseInput(s.schema,a),nt=$.font||getDefaultFont(),at=getFallbackFontName(nt),ot=parseContent4Table(tt,at);return Table$3.create({input:tt,content:ot,font:nt,_cache:_})}async function createMultiTables(a,s){const{basePdf:$,schema:_}=s;if(!isBlankPdf($))throw new Error("[@pdfme/schema/table] Blank PDF is not supported");const _e=$.height,tt=$.padding[2],nt=$.padding[0];let at=_e-tt-_.position.y;const ot=await createSingleTable(a,s);let rt=ot.body;const st=[];for(;rt.length>0;){const lt=st.length===0?at-ot.getHeadHeight():at-nt,et=await createTableWithAvailableHeight(rt,lt,s);if(st.push(et),rt=rt.slice(et.body.length),rt.length>0){const it=cloneDeep$1(_);it.showHead=!1,it.position.y=nt,s.schema=it,at=_e-nt-tt}}return st}const modifyTemplateForTable=async a=>{const{template:s,input:$,options:_,_cache:_e}=a,tt=Object.assign(cloneDeep$1(s),{schemas:[]});let nt=0;for(const at of s.schemas){const ot=[];for(const[rt,st]of Object.entries(at))if(st.type==="table"){st.__bodyRange=void 0;const lt=JSON.parse(($==null?void 0:$[rt])||"[]"),et=await createMultiTables(lt,{schema:st,basePdf:tt.basePdf,options:_,_cache:_e});if(et.length>1){const it=et[0];st.__bodyRange={start:0,end:it.body.length};const ut=et.map(ht=>ht.body);et.slice(1).forEach((ht,dt)=>{const gt=nt+dt+1,pt={[rt]:{...st,position:{x:st.position.x,y:ht.settings.startY},height:ht.getHeight(),showHead:!1,__bodyRange:{start:ut.slice(0,dt+1).reduce((mt,ct)=>mt+ct.length,0),end:ut.slice(0,dt+2).reduce((mt,ct)=>mt+ct.length,0)},content:$[rt]}};ot[gt]=pt})}}tt.schemas.push(at),ot.forEach((rt,st)=>{tt.schemas[st]?tt.schemas[st]={...tt.schemas[st],...rt}:tt.schemas[st]=rt}),nt++}return tt},getDynamicHeightForTable=async(a,s)=>{var tt;if(s.schema.type!=="table")return Promise.resolve(s.schema.height);const $=s.schema,_=((tt=$.__bodyRange)==null?void 0:tt.start)===0?getBody$1(a):getBodyWithRange(a,$.__bodyRange);return(await createSingleTable(_,s)).getHeight()},builtInPlugins={Text:text};class BaseUIClass{constructor(s){this.lang=DEFAULT_LANG,this.font=getDefaultFont(),this.pluginsRegistry=builtInPlugins,this.options={},this.setSize=debounce$1(()=>{if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);this.size={height:this.domContainer.clientHeight||window.innerHeight,width:this.domContainer.clientWidth||window.innerWidth},this.render()},100),this.resizeObserver=new ResizeObserver(this.setSize),checkUIProps(s);const{domContainer:$,template:_,options:_e={},plugins:tt={}}=s;this.domContainer=$,this.template=cloneDeep$2(_),this.options=_e,this.size={height:this.domContainer.clientHeight||window.innerHeight,width:this.domContainer.clientWidth||window.innerWidth},this.resizeObserver.observe(this.domContainer);const{lang:nt,font:at}=_e;nt&&(this.lang=nt),at&&(this.font=at),Object.values(tt).length>0&&(this.pluginsRegistry=tt)}getLang(){return this.lang}getFont(){return this.font}getPluginsRegistry(){return this.pluginsRegistry}getOptions(){return this.options}getTemplate(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);return this.template}updateTemplate(s){if(checkTemplate(s),!this.domContainer)throw Error(DESTROYED_ERR_MSG);this.template=cloneDeep$2(s),this.render()}updateOptions(s){checkUIOptions(s);const{lang:$,font:_}=s||{};$&&(this.lang=$),_&&(this.font=_),this.options=Object.assign(this.options,s),this.render()}destroy(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);ReactDOM.unmountComponentAtNode(this.domContainer),this.resizeObserver.unobserve(this.domContainer),this.domContainer=null}}class PreviewUI extends BaseUIClass{constructor(s){super(s),checkPreviewProps(s),this.inputs=convertToStingObjectArray(cloneDeep$2(s.inputs))}getInputs(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);return this.inputs}setInputs(s){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);checkInputs(s),this.inputs=convertToStingObjectArray(s),this.render()}}function convertToStingObjectArray(a){return a.map(s=>{const $={};return Object.keys(s).forEach(_=>{const _e=s[_];Array.isArray(_e)?$[_]=JSON.stringify(_e):$[_]=_e}),$})}function useCombinedRefs(){for(var a=arguments.length,s=new Array(a),$=0;$<a;$++)s[$]=arguments[$];return reactExports.useMemo(()=>_=>{s.forEach(_e=>_e(_))},s)}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function isWindow$4(a){const s=Object.prototype.toString.call(a);return s==="[object Window]"||s==="[object global]"}function isNode$1(a){return"nodeType"in a}function getWindow$1(a){var s,$;return a?isWindow$4(a)?a:isNode$1(a)&&(s=($=a.ownerDocument)==null?void 0:$.defaultView)!=null?s:window:window}function isDocument(a){const{Document:s}=getWindow$1(a);return a instanceof s}function isHTMLElement(a){return isWindow$4(a)?!1:a instanceof getWindow$1(a).HTMLElement}function isSVGElement(a){return a instanceof getWindow$1(a).SVGElement}function getOwnerDocument(a){return a?isWindow$4(a)?a.document:isNode$1(a)?isDocument(a)?a:isHTMLElement(a)||isSVGElement(a)?a.ownerDocument:document:document:document}const useIsomorphicLayoutEffect$1=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function useEvent$1(a){const s=reactExports.useRef(a);return useIsomorphicLayoutEffect$1(()=>{s.current=a}),reactExports.useCallback(function(){for(var $=arguments.length,_=new Array($),_e=0;_e<$;_e++)_[_e]=arguments[_e];return s.current==null?void 0:s.current(..._)},[])}function useInterval(){const a=reactExports.useRef(null),s=reactExports.useCallback((_,_e)=>{a.current=setInterval(_,_e)},[]),$=reactExports.useCallback(()=>{a.current!==null&&(clearInterval(a.current),a.current=null)},[]);return[s,$]}function useLatestValue(a,s){s===void 0&&(s=[a]);const $=reactExports.useRef(a);return useIsomorphicLayoutEffect$1(()=>{$.current!==a&&($.current=a)},s),$}function useLazyMemo(a,s){const $=reactExports.useRef();return reactExports.useMemo(()=>{const _=a($.current);return $.current=_,_},[...s])}function useNodeRef(a){const s=useEvent$1(a),$=reactExports.useRef(null),_=reactExports.useCallback(_e=>{_e!==$.current&&(s==null||s(_e,$.current)),$.current=_e},[]);return[$,_]}function usePrevious$1(a){const s=reactExports.useRef();return reactExports.useEffect(()=>{s.current=a},[a]),s.current}let ids={};function useUniqueId(a,s){return reactExports.useMemo(()=>{if(s)return s;const $=ids[a]==null?0:ids[a]+1;return ids[a]=$,a+"-"+$},[a,s])}function createAdjustmentFn(a){return function(s){for(var $=arguments.length,_=new Array($>1?$-1:0),_e=1;_e<$;_e++)_[_e-1]=arguments[_e];return _.reduce((tt,nt)=>{const at=Object.entries(nt);for(const[ot,rt]of at){const st=tt[ot];st!=null&&(tt[ot]=st+a*rt)}return tt},{...s})}}const add$1=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function hasViewportRelativeCoordinates(a){return"clientX"in a&&"clientY"in a}function isKeyboardEvent(a){if(!a)return!1;const{KeyboardEvent:s}=getWindow$1(a.target);return s&&a instanceof s}function isTouchEvent(a){if(!a)return!1;const{TouchEvent:s}=getWindow$1(a.target);return s&&a instanceof s}function getEventCoordinates(a){if(isTouchEvent(a)){if(a.touches&&a.touches.length){const{clientX:s,clientY:$}=a.touches[0];return{x:s,y:$}}else if(a.changedTouches&&a.changedTouches.length){const{clientX:s,clientY:$}=a.changedTouches[0];return{x:s,y:$}}}return hasViewportRelativeCoordinates(a)?{x:a.clientX,y:a.clientY}:null}const CSS$1=Object.freeze({Translate:{toString(a){if(!a)return;const{x:s,y:$}=a;return"translate3d("+(s?Math.round(s):0)+"px, "+($?Math.round($):0)+"px, 0)"}},Scale:{toString(a){if(!a)return;const{scaleX:s,scaleY:$}=a;return"scaleX("+s+") scaleY("+$+")"}},Transform:{toString(a){if(a)return[CSS$1.Translate.toString(a),CSS$1.Scale.toString(a)].join(" ")}},Transition:{toString(a){let{property:s,duration:$,easing:_}=a;return s+" "+$+"ms "+_}}}),SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(a){return a.matches(SELECTOR)?a:a.querySelector(SELECTOR)}const hiddenStyles={display:"none"};function HiddenText(a){let{id:s,value:$}=a;return React$a.createElement("div",{id:s,style:hiddenStyles},$)}function LiveRegion(a){let{id:s,announcement:$,ariaLiveType:_="assertive"}=a;const _e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React$a.createElement("div",{id:s,style:_e,role:"status","aria-live":_,"aria-atomic":!0},$)}function useAnnouncement(){const[a,s]=reactExports.useState("");return{announce:reactExports.useCallback(_=>{_!=null&&s(_)},[]),announcement:a}}const DndMonitorContext=reactExports.createContext(null);function useDndMonitor(a){const s=reactExports.useContext(DndMonitorContext);reactExports.useEffect(()=>{if(!s)throw new Error("useDndMonitor must be used within a children of <DndContext>");return s(a)},[a,s])}function useDndMonitorProvider(){const[a]=reactExports.useState(()=>new Set),s=reactExports.useCallback(_=>(a.add(_),()=>a.delete(_)),[a]);return[reactExports.useCallback(_=>{let{type:_e,event:tt}=_;a.forEach(nt=>{var at;return(at=nt[_e])==null?void 0:at.call(nt,tt)})},[a]),s]}const defaultScreenReaderInstructions={draggable:`
|
128
|
+
`)},enumerable:!1,configurable:!0}),xt.prototype.removeWhitespace=function(){for(var bt=0,Et=0;Et<this.childNodes.length;Et++){var St=this.childNodes[Et];if(St.nodeType===_.TEXT_NODE){if(St.isWhitespace)continue;St.value=St.rawText.trim()}else St.nodeType===_.ELEMENT_NODE&&St.removeWhitespace();this.childNodes[bt++]=St}return this.childNodes.length=bt,this},xt.prototype.querySelectorAll=function(bt){var Et=this,St;if(bt instanceof et)St=bt,St.reset();else{if(bt.includes(",")){var Bt=bt.split(",");return Array.from(Bt.reduce(function(yt,Rt){var kt=Et.querySelectorAll(Rt.trim());return kt.reduce(function(jt,Ht){return jt.add(Ht)},yt)},new Set))}St=new et(bt)}for(var Ot=[],Tt=[],wt=0;wt<this.childNodes.length;wt++)for(Tt.push([this.childNodes[wt],0,!1]);Tt.length;){var Ct=ot(Tt),It=Ct[0];if(Ct[1]===0){if(It.nodeType!==_.ELEMENT_NODE){Tt.pop();continue}if((Ct[2]=St.advance(It))&&St.matched){Ot.push(It),St.rewind(),Tt.pop();continue}}Ct[1]<It.childNodes.length?Tt.push([It.childNodes[Ct[1]++],0,!1]):(Ct[2]&&St.rewind(),Tt.pop())}return Ot},xt.prototype.querySelector=function(bt){var Et;bt instanceof et?(Et=bt,Et.reset()):Et=new et(bt);for(var St=[],Bt=0;Bt<this.childNodes.length;Bt++)for(St.push([this.childNodes[Bt],0,!1]);St.length;){var Ot=ot(St),Tt=Ot[0];if(Ot[1]===0){if(Tt.nodeType!==_.ELEMENT_NODE){St.pop();continue}if((Ot[2]=Et.advance(Tt))&&Et.matched)return Tt}Ot[1]<Tt.childNodes.length?St.push([Tt.childNodes[Ot[1]++],0,!1]):(Ot[2]&&Et.rewind(),St.pop())}return null},xt.prototype.appendChild=function(bt){return this.childNodes.push(bt),bt instanceof xt&&(bt.parentNode=this),bt},xt.prototype.prependChild=function(bt){return this.childNodes.unshift(bt),bt instanceof xt&&(bt.parentNode=this),bt},Object.defineProperty(xt.prototype,"firstChild",{get:function(){return this.childNodes[0]},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"lastChild",{get:function(){return ot(this.childNodes)},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"attributes",{get:function(){if(this._attrs)return this._attrs;this._attrs={};var bt=this.rawAttributes;for(var Et in bt)this._attrs[Et]=(0,$.decode)(bt[Et]);return this._attrs},enumerable:!1,configurable:!0}),Object.defineProperty(xt.prototype,"rawAttributes",{get:function(){if(this._rawAttrs)return this._rawAttrs;var bt={};if(this.rawAttrs)for(var Et=void 0;Et=ft.exec(this.rawAttrs);)bt[Et[1]]=Et[4]||Et[5]||Et[6]||"";return this._rawAttrs=bt,bt},enumerable:!1,configurable:!0}),xt.prototype.setAttribute=function(bt,Et){bt==="id"?this.id=Et:bt==="class"&&(this.classNames=Et.split(/\s+/));var St=this.attributes;Et===void 0?delete St[bt]:St[bt]=Et+"",this._rawAttrs&&(Et===void 0?delete this._rawAttrs[bt]:this._rawAttrs[bt]=(0,$.encode)(Et+"")),this.rawAttrs=Object.keys(St).map(function(Bt){return Bt+(St[Bt]===""?"":'="'+(0,$.encode)(St[Bt])+'"')}).join(" ")},xt.prototype.removeAttribute=function(bt){this.setAttribute(bt,void 0)},xt.prototype.setAttributes=function(bt){var Et=this;bt.id?this.id=bt.id:bt.class&&(this.classNames=bt.class.split(/\s+/)),this.attributes&&(Object.keys(this.attributes).forEach(function(St){return delete Et.attributes[St]}),Object.keys(bt).forEach(function(St){return Et.attributes[St]=bt[St]+""})),this.rawAttributes&&(Object.keys(this.rawAttributes).forEach(function(St){return delete Et.rawAttributes[St]}),Object.keys(bt).forEach(function(St){return Et.rawAttributes[St]=(0,$.encode)(bt[St]+"")})),this.rawAttrs=Object.keys(bt).map(function(St){return St+(bt[St]===""?"":'="'+(0,$.encode)(bt[St]+"")+'"')}).join(" ")},xt}(_e);a.HTMLElement=rt;var st={},lt={f145:function(At,xt,bt,Et,St){if(xt=xt||"",bt=bt||[],At.id!=xt.substr(1))return!1;for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f45:function(At,xt,bt,Et,St){bt=bt||[];for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f15:function(At,xt,bt,Et,St){return xt=xt||"",At.id==xt.substr(1)},f1:function(At,xt,bt,Et,St){if(xt=xt||"",At.id!=xt.substr(1))return!1},f5:function(At,xt,bt,Et,St){return!0},f245:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f25:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f2:function(At,xt,bt,Et,St){Et=Et||"",St=St||"";var Bt=At.attributes;for(var Ot in Bt){var Tt=Bt[Ot];if(Ot==Et&&Tt==St)return!0}return!1},f345:function(At,xt,bt,Et,St){if(xt=xt||"",bt=bt||[],At.tagName!=xt)return!1;for(var Bt=bt,Ot=0;Ot<Bt.length;Ot++)if(At.classNames.indexOf(Bt[Ot])===-1)return!1;return!0},f35:function(At,xt,bt,Et,St){return xt=xt||"",At.tagName==xt},f3:function(At,xt,bt,Et,St){if(xt=xt||"",At.tagName!=xt)return!1}},et=function(){function At(xt){this.nextMatch=0,lt.f5=lt.f5,this.matchers=xt.split(" ").map(function(bt){if(st[bt])return st[bt];var Et=bt.split("."),St=Et[0],Bt=Et.slice(1).sort(),Ot='"use strict";',Tt="f",wt="",Ct="";if(St&&St!="*"){var It;if(St[0]=="#")Ot+="if (el.id != "+JSON.stringify(St.substr(1))+") return false;",Tt+="1";else if(It=St.match(/^\[\s*(\S+)\s*(=|!=)\s*((((["'])([^\6]*)\6))|(\S*?))\]\s*/)){wt=It[1];var yt=It[2];if(yt!=="="&&yt!=="!=")throw new Error("Selector not supported, Expect [key${op}value].op must be =,!=");yt==="="&&(yt="=="),Ct=It[7]||It[8],Ot+='let attrs = el.attributes;for (let key in attrs){const val = attrs[key]; if (key == "'.concat(wt,'" && val == "').concat(Ct,'"){return true;}} return false;'),Tt+="2"}else Ot+="if (el.tagName != "+JSON.stringify(St)+") return false;",Tt+="3"}Bt.length>0&&(Ot+="for (let cls = "+JSON.stringify(Bt)+", i = 0; i < cls.length; i++) if (el.classNames.indexOf(cls[i]) === -1) return false;",Tt+="4"),Ot+="return true;",Tt+="5";var Rt={func:lt[Tt],tagName:St||"",classes:Bt||"",attr_key:wt||"",value:Ct||""};return Ot=Ot||"",st[bt]=Rt})}return At.prototype.advance=function(xt){return this.nextMatch<this.matchers.length&&this.matchers[this.nextMatch].func(xt,this.matchers[this.nextMatch].tagName,this.matchers[this.nextMatch].classes,this.matchers[this.nextMatch].attr_key,this.matchers[this.nextMatch].value)?(this.nextMatch++,!0):!1},At.prototype.rewind=function(){this.nextMatch--},Object.defineProperty(At.prototype,"matched",{get:function(){return this.nextMatch==this.matchers.length},enumerable:!1,configurable:!0}),At.prototype.reset=function(){this.nextMatch=0},At.prototype.flushCache=function(){st={}},At}();a.Matcher=et;var it=/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.:0-9_a-z]*)((\s+[a-z][-.:0-9_a-z]*(\s*=\s*("[^"]*"|'([^']*')|([^\s\/>]+)))?)*)\s*(\/?)>/ig,ut=/(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig,ft=/([a-z][-.:0-9_a-z]*)(\s*=\s*("([^"]*)"|'([^']*)'|(\S+)))?/ig,ht={area:!0,base:!0,br:!0,col:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,source:!0},dt={li:{li:!0},p:{p:!0,div:!0},b:{div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0},h1:{h1:!0},h2:{h2:!0},h3:{h3:!0},h4:{h4:!0},h5:{h5:!0},h6:{h6:!0}},gt={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}},pt={script:!0,noscript:!0,style:!0,pre:!0};function mt(At,xt){var bt=new rt(null),Et=bt,St=[bt],Bt=0;xt=xt||{};for(var Ot;Ot=it.exec(At);){if(Bt+Ot[0].length<it.lastIndex){var Tt=At.substring(Bt,it.lastIndex-Ot[0].length);Et.appendChild(new tt(Tt))}if(Bt=it.lastIndex,Ot[0][1]=="!"){if(xt.comment){var Tt=At.substring(Bt-3,Bt-Ot[0].length+4);Et.appendChild(new nt(Tt))}continue}if(xt.lowerCaseTagName&&(Ot[2]=Ot[2].toLowerCase()),!Ot[1]&&(!Ot[9]&&dt[Et.tagName]&&dt[Et.tagName][Ot[2]]&&(St.pop(),Et=ot(St)),Et=Et.appendChild(new rt(Ot[2],Ot[3].trim())),St.push(Et),pt[Ot[2]])){var wt="</"+Ot[2]+">",Ct=At.indexOf(wt,it.lastIndex);if(xt[Ot[2]]){var Tt=void 0;Ct==-1?Tt=At.substr(it.lastIndex):Tt=At.substring(it.lastIndex,Ct),Tt.length>0&&Et.appendChild(new tt(Tt))}Ct==-1?Bt=it.lastIndex=At.length+1:(Bt=it.lastIndex=Ct+wt.length,Ot[1]="true")}if(Ot[1]||Ot[9]||ht[Ot[2]])for(;;)if(Et.tagName==Ot[2]){St.pop(),Et=ot(St);break}else{if(gt[Et.tagName]&>[Et.tagName][Ot[2]]){St.pop(),Et=ot(St);continue}break}}Bt<At.length&&bt.appendChild(new tt(At.substring(Bt))),bt.valid=St.length===1;for(var It=function(){var yt=St.pop(),Rt=ot(St);yt.parentNode&&yt.parentNode instanceof rt&&yt.parentNode.parentNode&&(yt.parentNode===Rt&&yt.tagName===Rt.tagName?(Rt.removeChild(yt),yt.childNodes.forEach(function(kt){Rt.parentNode.appendChild(kt)}),St.pop()):(Rt.removeChild(yt),yt.childNodes.forEach(function(kt){Rt.appendChild(kt)})))};St.length>1;)It();return bt}a.parse=mt;var ct=["html","body","address","article","aside","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","header","hr","li","main","nav","noscript","ol","p","pre","section","tfoot","table","tbody","ul","video","th","td","tr","h1","h2","h3","h4","h5","h6"];function vt(At){return At.nodeType===_.ELEMENT_NODE&&At.tagName&&ct.includes(At.tagName.toLowerCase())}a.isBlock=vt}(dist),LineCapStyle.Butt,LineCapStyle.Round,LineCapStyle.Projecting,FillRule.EvenOdd,FillRule.NonZero,LineJoinStyle.Bevel,LineJoinStyle.Miter,LineJoinStyle.Round;const convertForPdfLayoutProps=({schema:a,pageHeight:s,applyRotateTranslate:$=!0})=>{const{width:_,height:_e,position:tt,rotate:nt,opacity:at}=a,{x:ot,y:rt}=tt,st=nt?-nt:0,lt=mm2pt(_),et=mm2pt(_e);let it=mm2pt(ot),ut=s-mm2pt(rt)-et;if(st&&$){const ft={x:it+lt/2,y:s-mm2pt(rt)-et/2},ht=rotatePoint({x:it,y:ut},ft,st);it=ht.x,ut=ht.y}return{position:{x:it,y:ut},height:et,width:lt,rotate:degrees(st),opacity:at}},rotatePoint=(a,s,$)=>{const _=degreesToRadians($),_e=Math.cos(_)*(a.x-s.x)-Math.sin(_)*(a.y-s.y)+s.x,tt=Math.sin(_)*(a.x-s.x)+Math.cos(_)*(a.y-s.y)+s.y;return{x:_e,y:tt}},isEditable=(a,s)=>a==="designer"||a==="form"&&s.readOnly!==!0,hex2rgb=a=>(a.slice(0,1)==="#"&&(a=a.slice(1)),a.length===3&&(a=a.slice(0,1)+a.slice(0,1)+a.slice(1,2)+a.slice(1,2)+a.slice(2,3)+a.slice(2,3)),[a.slice(0,2),a.slice(2,4),a.slice(4,6)].map(s=>parseInt(s,16))),hex2RgbColor=a=>{if(a){if(!isHexValid(a))throw new Error(`Invalid hex color value ${a}`);const[$,_,_e]=hex2rgb(a);return rgb($/255,_/255,_e/255)}},hex2CmykColor=a=>{if(a){if(!isHexValid(a))throw new Error(`Invalid hex color value ${a}`);a=a.replace("#","");const $=a.substring(0,6),_=a.substring(6,8),_e=_?parseInt(_,16)/255:1;let tt=parseInt($.substring(0,2),16)/255,nt=parseInt($.substring(2,4),16)/255,at=parseInt($.substring(4,6),16)/255;tt=tt*_e+(1-_e),nt=nt*_e+(1-_e),at=at*_e+(1-_e);const ot=1-Math.max(tt,nt,at),rt=tt===0?0:(1-tt-ot)/(1-ot),st=nt===0?0:(1-nt-ot)/(1-ot),lt=at===0?0:(1-at-ot)/(1-ot);return cmyk(rt,st,lt,ot)}},hex2PrintingColor=(a,s)=>(s==null?void 0:s.toLocaleLowerCase())=="cmyk"?hex2CmykColor(a):hex2RgbColor(a),cloneDeep$1=a=>JSON.parse(JSON.stringify(a)),embedAndGetFontObj=async a=>{const{pdfDoc:s,font:$,_cache:_}=a;if(_.has(s))return _.get(s);const _e=await Promise.all(Object.values($).map(async nt=>{let at=nt.data;return typeof at=="string"&&at.startsWith("http")&&(at=await fetch(at).then(ot=>ot.arrayBuffer())),s.embedFont(at,{subset:typeof nt.subset>"u"?!0:nt.subset})})),tt=Object.keys($).reduce((nt,at,ot)=>Object.assign(nt,{[at]:_e[ot]}),{});return _.set(s,tt),tt},getFontProp=async({value:a,font:s,schema:$,colorType:_,_cache:_e})=>{const tt=$.dynamicFontSize?await calculateDynamicFontSize({textSchema:$,font:s,value:a,_cache:_e}):$.fontSize??DEFAULT_FONT_SIZE,nt=hex2PrintingColor($.fontColor||DEFAULT_FONT_COLOR,_);return{alignment:$.alignment??DEFAULT_ALIGNMENT,verticalAlignment:$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT,lineHeight:$.lineHeight??DEFAULT_LINE_HEIGHT,characterSpacing:$.characterSpacing??DEFAULT_CHARACTER_SPACING,fontSize:tt,color:nt}},pdfRender=async a=>{const{value:s,pdfDoc:$,pdfLib:_,page:_e,options:tt,schema:nt,_cache:at}=a;if(!s)return;const{font:ot=getDefaultFont(),colorType:rt}=tt,[st,lt,et]=await Promise.all([embedAndGetFontObj({pdfDoc:$,font:ot,_cache:at}),getFontKitFont(nt.fontName,ot,at),getFontProp({value:s,font:ot,schema:nt,_cache:at})]),{fontSize:it,color:ut,alignment:ft,verticalAlignment:ht,lineHeight:dt,characterSpacing:gt}=et,pt=nt.fontName?nt.fontName:getFallbackFontName(ot),mt=st&&st[pt],ct=_e.getHeight(),{width:vt,height:At,rotate:xt,position:{x:bt,y:Et},opacity:St}=convertForPdfLayoutProps({schema:nt,pageHeight:ct,applyRotateTranslate:!1});if(nt.backgroundColor){const yt=hex2PrintingColor(nt.backgroundColor,rt);_e.drawRectangle({x:bt,y:Et,width:vt,height:At,rotate:xt,color:yt})}_e.pushOperators(_.setCharacterSpacing(gt??DEFAULT_CHARACTER_SPACING));const Bt=heightOfFontAtSize(lt,it),Ot=getFontDescentInPt(lt,it),Tt=dt===0?0:(dt-1)*it/2,wt=splitTextToSize({value:s,characterSpacing:gt,fontSize:it,fontKitFont:lt,boxWidthInPt:vt});let Ct=0;if(ht===VERTICAL_ALIGN_TOP)Ct=Bt+Tt;else{const yt=dt*it*(wt.length-1);ht===VERTICAL_ALIGN_BOTTOM?Ct=At-yt+Ot-Tt:ht===VERTICAL_ALIGN_MIDDLE&&(Ct=(At-yt-Bt+Ot)/2+Bt)}const It={x:bt+vt/2,y:ct-mm2pt(nt.position.y)-At/2};wt.forEach((yt,Rt)=>{const kt=widthOfTextAtSize(yt,lt,it,gt),jt=heightOfFontAtSize(lt,it),Ht=dt*it*Rt;let Ft=bt;ft==="center"?Ft+=(vt-kt)/2:ft==="right"&&(Ft+=vt-kt);let _t=ct-mm2pt(nt.position.y)-Ct-Ht;if(nt.strikethrough&&kt>0){const Nt=Ft+kt+1,Mt=_t+jt/3;_e.drawLine({start:rotatePoint({x:Ft,y:Mt},It,xt.angle),end:rotatePoint({x:Nt,y:Mt},It,xt.angle),thickness:1/12*it,color:ut,opacity:St})}if(nt.underline&&kt>0){const Nt=Ft+kt+1,Mt=_t-jt/12;_e.drawLine({start:rotatePoint({x:Ft,y:Mt},It,xt.angle),end:rotatePoint({x:Nt,y:Mt},It,xt.angle),thickness:1/12*it,color:ut,opacity:St})}if(xt.angle!==0){const Nt=rotatePoint({x:Ft,y:_t},It,xt.angle);Ft=Nt.x,_t=Nt.y}_e.drawText(yt,{x:Ft,y:_t,rotate:xt,size:it,color:ut,lineHeight:dt*it,font:mt,opacity:St})})},DEFAULT_OPACITY=1,HEX_COLOR_PATTERN="^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$",TextStrikethroughIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28c.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85c-.29-.86-1.2-1.28-2.25-1.28c-1.86 0-2.34 1.02-2.34 1.7c0 .48.25.88.74 1.21c.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92zM21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97c0 1-.81 1.67-2.28 1.67c-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58c.81 2.29 3.29 3.3 5.67 3.3c2.27 0 5.3-.89 5.3-4.05c0-.3-.01-1.16-.48-1.94H21V12z" fill="currentColor"></path></svg>',TextUnderlineIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z" fill="currentColor"></path></svg>',TextAlignLeftIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" fill="currentColor"></path></svg>',TextAlignCenterIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" fill="currentColor"></path></svg>',TextAlignRightIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" fill="currentColor"></path></svg>',TextVerticalAlignTopIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M8 11h3v10h2V11h3l-4-4l-4 4zM4 3v2h16V3H4z" fill="currentColor"></path></svg>',TextVerticalAlignMiddleIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M8 19h3v4h2v-4h3l-4-4l-4 4zm8-14h-3V1h-2v4H8l4 4l4-4zM4 11v2h16v-2H4z" fill="currentColor"></path></svg>',TextVerticalAlignBottomIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M16 13h-3V3h-2v10H8l4 4l4-4zM4 19v2h16v-2H4z" fill="currentColor"></path></svg>';var Formatter;(function(a){a.STRIKETHROUGH="strikethrough",a.UNDERLINE="underline",a.ALIGNMENT="alignment",a.VERTICAL_ALIGNMENT="verticalAlignment"})(Formatter||(Formatter={}));function getExtraFormatterSchema(a){const s=[{key:Formatter.STRIKETHROUGH,icon:TextStrikethroughIcon,type:"boolean"},{key:Formatter.UNDERLINE,icon:TextUnderlineIcon,type:"boolean"},{key:Formatter.ALIGNMENT,icon:TextAlignLeftIcon,type:"select",value:DEFAULT_ALIGNMENT},{key:Formatter.ALIGNMENT,icon:TextAlignCenterIcon,type:"select",value:ALIGN_CENTER},{key:Formatter.ALIGNMENT,icon:TextAlignRightIcon,type:"select",value:ALIGN_RIGHT},{key:Formatter.VERTICAL_ALIGNMENT,icon:TextVerticalAlignTopIcon,type:"select",value:DEFAULT_VERTICAL_ALIGNMENT},{key:Formatter.VERTICAL_ALIGNMENT,icon:TextVerticalAlignMiddleIcon,type:"select",value:VERTICAL_ALIGN_MIDDLE},{key:Formatter.VERTICAL_ALIGNMENT,icon:TextVerticalAlignBottomIcon,type:"select",value:VERTICAL_ALIGN_BOTTOM}];return{title:a("schemas.text.format"),widget:"ButtonGroup",buttons:s,span:16}}const UseDynamicFontSize=a=>{const{rootElement:s,changeSchemas:$,activeSchema:_,i18n:_e}=a,tt=document.createElement("input");tt.type="checkbox",tt.checked=!!(_!=null&&_.dynamicFontSize),tt.onchange=at=>{const ot=at.target.checked?{min:DEFAULT_DYNAMIC_MIN_FONT_SIZE,max:DEFAULT_DYNAMIC_MAX_FONT_SIZE,fit:DEFAULT_DYNAMIC_FIT}:void 0;$([{key:"dynamicFontSize",value:ot,schemaId:_.id}])};const nt=document.createElement("label");nt.innerText=_e("schemas.text.dynamicFontSize")||"",nt.style.cssText="display: flex; width: 100%;",nt.appendChild(tt),s.appendChild(nt)},propPanel={schema:({options:a,activeSchema:s,i18n:$})=>{const _=a.font||{[DEFAULT_FONT_NAME]:{data:"",fallback:!0}},_e=Object.keys(_),tt=getFallbackFontName(_),nt=!!(s!=null&&s.dynamicFontSize);return{fontName:{title:$("schemas.text.fontName"),type:"string",widget:"select",default:tt,props:{options:_e.map(ot=>({label:ot,value:ot}))},span:12},fontSize:{title:$("schemas.text.size"),type:"number",widget:"inputNumber",span:6,disabled:nt,props:{min:0}},characterSpacing:{title:$("schemas.text.spacing"),type:"number",widget:"inputNumber",span:6,props:{min:0}},formatter:getExtraFormatterSchema($),lineHeight:{title:$("schemas.text.lineHeight"),type:"number",widget:"inputNumber",props:{step:.1,min:0},span:8},useDynamicFontSize:{type:"boolean",widget:"UseDynamicFontSize",bind:!1,span:16},dynamicFontSize:{type:"object",widget:"card",column:3,properties:{min:{title:$("schemas.text.min"),type:"number",widget:"inputNumber",hidden:!nt,props:{min:0}},max:{title:$("schemas.text.max"),type:"number",widget:"inputNumber",hidden:!nt,props:{min:0}},fit:{title:$("schemas.text.fit"),type:"string",widget:"select",hidden:!nt,props:{options:[{label:$("schemas.horizontal"),value:DYNAMIC_FIT_HORIZONTAL},{label:$("schemas.vertical"),value:DYNAMIC_FIT_VERTICAL}]}}}},fontColor:{title:$("schemas.textColor"),type:"string",widget:"color",rules:[{pattern:HEX_COLOR_PATTERN,message:$("hexColorPrompt")}]},backgroundColor:{title:$("schemas.bgColor"),type:"string",widget:"color",rules:[{pattern:HEX_COLOR_PATTERN,message:$("hexColorPrompt")}]}}},widgets:{UseDynamicFontSize},defaultSchema:{type:"text",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',content:"Type Something...",position:{x:0,y:0},width:45,height:10,rotate:0,alignment:DEFAULT_ALIGNMENT,verticalAlignment:DEFAULT_VERTICAL_ALIGNMENT,fontSize:DEFAULT_FONT_SIZE,lineHeight:DEFAULT_LINE_HEIGHT,characterSpacing:DEFAULT_CHARACTER_SPACING,dynamicFontSize:void 0,fontColor:DEFAULT_FONT_COLOR,fontName:void 0,backgroundColor:"",opacity:DEFAULT_OPACITY,strikethrough:!1,underline:!1}},mapVerticalAlignToFlex=a=>{switch(a){case VERTICAL_ALIGN_TOP:return"flex-start";case VERTICAL_ALIGN_MIDDLE:return"center";case VERTICAL_ALIGN_BOTTOM:return"flex-end"}return"flex-start"},getBackgroundColor=(a,s)=>!a||!s.backgroundColor?"transparent":s.backgroundColor,uiRender=async a=>{const{value:s,schema:$,rootElement:_,mode:_e,onChange:tt,stopEditing:nt,tabIndex:at,placeholder:ot,options:rt,_cache:st}=a,lt=(rt==null?void 0:rt.font)||getDefaultFont();let et;const it=xt=>({textSchema:$,font:lt,value:xt,startingFontSize:et,_cache:st});$.dynamicFontSize&&s&&(et=await calculateDynamicFontSize(it(s)));const ut=await getFontKitFont($.fontName,lt,st),{topAdj:ft,bottomAdj:ht}=getBrowserVerticalFontAdjustments(ut,et??$.fontSize??DEFAULT_FONT_SIZE,$.lineHeight??DEFAULT_LINE_HEIGHT,$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT),dt=ft.toString(),gt=ht.toString(),pt=document.createElement("div"),mt={padding:0,resize:"none",backgroundColor:getBackgroundColor(s,$),border:"none",display:"flex",flexDirection:"column",justifyContent:mapVerticalAlignToFlex($.verticalAlignment),width:"100%",height:"100%",cursor:isEditable(_e,$)?"text":"default"};Object.assign(pt.style,mt),_.innerHTML="",_.appendChild(pt);const ct=[];$.strikethrough&&ct.push("line-through"),$.underline&&ct.push("underline");const vt={fontFamily:$.fontName?`'${$.fontName}'`:"inherit",color:$.fontColor?$.fontColor:DEFAULT_FONT_COLOR,fontSize:`${et??$.fontSize??DEFAULT_FONT_SIZE}pt`,letterSpacing:`${$.characterSpacing??DEFAULT_CHARACTER_SPACING}pt`,lineHeight:`${$.lineHeight??DEFAULT_LINE_HEIGHT}em`,textAlign:$.alignment??DEFAULT_ALIGNMENT,whiteSpace:"pre-wrap",wordBreak:"break-word",resize:"none",border:"none",outline:"none",marginBottom:`${gt}px`,paddingTop:`${dt}px`,backgroundColor:"transparent",textDecoration:ct.join(" ")},At=document.createElement("div");if(Object.assign(At.style,vt),isEditable(_e,$)){if(isFirefox()?(At.contentEditable="true",At.addEventListener("keydown",xt=>{xt.key==="Enter"&&!xt.shiftKey&&(xt.preventDefault(),document.execCommand("insertLineBreak",!1,void 0))}),At.addEventListener("paste",xt=>{var St;xt.preventDefault();const bt=(St=xt.clipboardData)==null?void 0:St.getData("text"),Et=window.getSelection();Et!=null&&Et.rangeCount&&(Et.deleteFromDocument(),Et.getRangeAt(0).insertNode(document.createTextNode(bt||"")),Et.collapseToEnd())})):At.contentEditable="plaintext-only",At.tabIndex=at||0,At.innerText=s,At.addEventListener("blur",xt=>{tt&&tt({key:"content",value:xt.target.innerText}),nt&&nt()}),$.dynamicFontSize&&At.addEventListener("keyup",()=>{setTimeout(()=>{(async()=>{if(!At.textContent)return;et=await calculateDynamicFontSize(it(At.textContent)),At.style.fontSize=`${et}pt`;const{topAdj:xt,bottomAdj:bt}=getBrowserVerticalFontAdjustments(ut,et??$.fontSize??DEFAULT_FONT_SIZE,$.lineHeight??DEFAULT_LINE_HEIGHT,$.verticalAlignment??DEFAULT_VERTICAL_ALIGNMENT);At.style.paddingTop=`${xt}px`,At.style.marginBottom=`${bt}px`})()},0)}),ot&&!s){if(At.innerText=ot,At.style.color=PLACEHOLDER_FONT_COLOR,$.dynamicFontSize){const xt=await calculateDynamicFontSize(it(ot));At.style.fontSize=`${xt}pt`}At.addEventListener("focus",()=>{At.innerText===ot&&(At.innerText="",At.style.color=$.fontColor??DEFAULT_FONT_COLOR)})}pt.appendChild(At),_e==="designer"&&setTimeout(()=>{At.focus();const xt=window.getSelection(),bt=document.createRange();bt.selectNodeContents(At),bt.collapse(!1),xt==null||xt.removeAllRanges(),xt==null||xt.addRange(bt)})}else At.innerHTML=s.split("").map((xt,bt)=>`<span style="letter-spacing:${String(s).length===bt+1?0:"inherit"};">${xt}</span>`).join(""),pt.appendChild(At)},textSchema={pdf:pdfRender,ui:uiRender,propPanel},text=textSchema;textSchema.pdf,textSchema.ui,{...textSchema.propPanel,defaultSchema:{...textSchema.propPanel.defaultSchema}};const getBody$1=a=>JSON.parse(a||"[]"),getBodyWithRange=(a,s)=>{const $=getBody$1(a);return s?$.slice(s.start,s.end):$};let Cell$2=class{constructor(s,$,_){Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"section",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contentHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"contentWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"wrappedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minReadableWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.styles=$,this.section=_,this.raw=s;const _e=/\r\n|\r|\n/g;this.text=s.split(_e)}getContentHeight(){const s=Array.isArray(this.text)?this.text.length:1,$=pt2mm(this.styles.fontSize)*this.styles.lineHeight,_=this.padding("top")+this.padding("bottom"),_e=s*$+_;return Math.max(_e,this.styles.minCellHeight)}padding(s){return this.styles.cellPadding[s]}},Column$2=class{constructor(s){Object.defineProperty(this,"index",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"wrappedWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minReadableWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"minWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.index=s}getMaxCustomCellWidth(s){let $=0;for(const _ of s.allRows()){const _e=_.cells[this.index];$=Math.max($,_e.styles.cellWidth)}return $}},Row$2=class{constructor(s,$,_,_e){Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"index",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"section",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cells",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,writable:!0,value:0}),this.raw=s,this.index=$,this.section=_,this.cells=_e}getMaxCellHeight(s){return s.reduce(($,_)=>{var _e;return Math.max($,((_e=this.cells[_.index])==null?void 0:_e.height)||0)},0)}getMinimumRowHeight(s){return s.reduce(($,_)=>{const _e=this.cells[_.index];if(!_e)return 0;const nt=_e.padding("top")+_e.padding("bottom")+_e.styles.lineHeight;return nt>$?nt:$},0)}},Table$3=class ou{constructor(s,$){Object.defineProperty(this,"settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"styles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"columns",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"head",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.settings=s.settings,this.styles=s.styles,this.columns=$.columns,this.head=$.head,this.body=$.body}static async create(s){const{input:$,content:_,font:_e,_cache:tt}=s,nt=new ou($,_);return await calculateWidths({table:nt,font:_e,_cache:tt}),nt}getHeadHeight(){return this.head.reduce((s,$)=>s+$.getMaxCellHeight(this.columns),0)}getBodyHeight(){return this.body.reduce((s,$)=>s+$.getMaxCellHeight(this.columns),0)}allRows(){return this.head.concat(this.body)}getWidth(){return this.settings.tableWidth}getHeight(){return(this.settings.showHead?this.getHeadHeight():0)+this.getBodyHeight()}};async function calculateWidths(a){const{table:s,font:$,_cache:_}=a,_e=ot=>getFontKitFont(ot,$,_);await calculate$1(s,_e);const tt=[];let nt=0;s.columns.forEach(ot=>{const rt=ot.getMaxCustomCellWidth(s);rt?ot.width=rt:(ot.width=ot.wrappedWidth,tt.push(ot)),nt+=ot.width});let at=s.getWidth()-nt;at&&(at=resizeColumns(tt,at,ot=>Math.max(ot.minReadableWidth,ot.minWidth))),at&&(at=resizeColumns(tt,at,ot=>ot.minWidth)),at=Math.abs(at),applyColSpans(s),await fitContent(s,_e),applyRowSpans(s)}function applyRowSpans(a){const s={};let $=1;const _=a.allRows();for(let _e=0;_e<_.length;_e++){const tt=_[_e];for(const nt of a.columns){const at=s[nt.index];if($>1)$--,delete tt.cells[nt.index];else if(at)at.cell.height+=tt.height,$=1,delete tt.cells[nt.index],at.left--,at.left<=1&&delete s[nt.index];else{const ot=tt.cells[nt.index];if(!ot)continue;ot.height=tt.height}}}}function applyColSpans(a){const s=a.allRows();for(let $=0;$<s.length;$++){const _=s[$];let _e=0,tt=0;for(let nt=0;nt<a.columns.length;nt++){const at=a.columns[nt];if(tt-=1,tt>1&&a.columns[nt+1])_e+=at.width,delete _.cells[at.index];else{const ot=_.cells[at.index];if(!ot)continue;tt=1,_e=0,ot.width=at.width+_e}}}}async function fitContent(a,s){const $={count:0,height:0};for(const _ of a.allRows()){for(const _e of a.columns){const tt=_.cells[_e.index];if(!tt)continue;const nt=await s(tt.styles.fontName);tt.text=splitTextToSize({value:tt.raw,characterSpacing:tt.styles.characterSpacing,boxWidthInPt:mm2pt(tt.width),fontSize:tt.styles.fontSize,fontKitFont:nt}),tt.contentHeight=tt.getContentHeight();let at=tt.contentHeight;$&&$.count>0&&$.height>at&&(at=$.height),at>_.height&&(_.height=at)}$.count--}}function resizeColumns(a,s,$){const _=s,_e=a.reduce((tt,nt)=>tt+nt.wrappedWidth,0);for(let tt=0;tt<a.length;tt++){const nt=a[tt],at=nt.wrappedWidth/_e,ot=_*at,rt=nt.width+ot,st=$(nt),lt=rt<st?st:rt;s-=lt-nt.width,nt.width=lt}if(s=Math.round(s*1e10)/1e10,s){const tt=a.filter(nt=>s<0?nt.width>$(nt):!0);tt.length&&(s=resizeColumns(tt,s,$))}return s}async function calculate$1(a,s){for(const $ of a.allRows())for(const _ of a.columns){const _e=$.cells[_.index];if(!_e)continue;const tt=_e.padding("right")+_e.padding("left"),nt=await s(_e.styles.fontName);_e.contentWidth=getStringWidth(_e,nt)+tt;const at=getStringWidth(Object.assign(_e,{text:_e.text.join(" ").split(/\s+/)}),nt);_e.minReadableWidth=at+tt,_e.minWidth=_e.styles.cellWidth,_e.wrappedWidth=_e.styles.cellWidth}for(const $ of a.allRows())for(const _ of a.columns){const _e=$.cells[_.index];if(_e)_.wrappedWidth=Math.max(_.wrappedWidth,_e.wrappedWidth),_.minWidth=Math.max(_.minWidth,_e.minWidth),_.minReadableWidth=Math.max(_.minReadableWidth,_e.minReadableWidth);else{const tt=a.styles.columnStyles[_.index]||{},nt=tt.cellWidth||tt.minCellWidth;nt&&(_.minWidth=nt,_.wrappedWidth=nt)}}}function getStringWidth(a,s){const $=a.text,_=Array.isArray($)?$:[$],_e=a.styles.fontSize,tt=a.styles.characterSpacing;return _.map(at=>widthOfTextAtSize(at,s,_e,tt)).reduce((at,ot)=>Math.max(at,ot),0)}function parseSection(a,s,$,_,_e){const tt={};return s.map((at,ot)=>{let rt=0;const st={};let lt=0,et=0;for(const it of $)if(tt[it.index]==null||tt[it.index].left===0)if(et===0){let ut;Array.isArray(at)?ut=at[it.index-lt-rt]:ut=at[it.index];const ft=cellStyles(a,it,ot,_,_e),ht=new Cell$2(ut,ft,a);st[it.index]=ht,et=0,tt[it.index]={left:0,times:et}}else et--,lt++;else tt[it.index].left--,et=tt[it.index].times,rt++;return new Row$2(at,ot,a,st)})}function parseContent4Table(a,s){const $=a.content,_=$.columns.map(tt=>new Column$2(tt)),_e=a.styles;return{columns:_,head:parseSection("head",$.head,_,_e,s),body:parseSection("body",$.body,_,_e,s)}}function cellStyles(a,s,$,_,_e){let tt;a==="head"?tt=_.headStyles:a==="body"&&(tt=_.bodyStyles);const nt=Object.assign({},_.styles,tt),at=_.columnStyles[s.index]||_.columnStyles[s.index]||{},ot=a==="body"&&$%2===0?Object.assign({},_.alternateRowStyles):{};return Object.assign({fontName:_e,backgroundColor:"",textColor:"#000000",lineHeight:1,characterSpacing:0,alignment:"left",verticalAlignment:"middle",fontSize:10,cellPadding:5,lineColor:"#000000",lineWidth:0,minCellHeight:0,minCellWidth:0},nt,ot,at)}function mapCellStyle(a){return{fontName:a.fontName,alignment:a.alignment,verticalAlignment:a.verticalAlignment,fontSize:a.fontSize,lineHeight:a.lineHeight,characterSpacing:a.characterSpacing,backgroundColor:a.backgroundColor,textColor:a.fontColor,lineColor:a.borderColor,lineWidth:a.borderWidth,cellPadding:a.padding}}function createTableWithAvailableHeight(a,s,$){let _=s;const _e=[];let tt=0;for(;_>0&&tt<a.length;){const nt=a.slice(0,tt+1).pop();if(!nt)break;const at=nt.height;if(_-at<0)break;_e.push(nt.raw),_-=at,tt++}return createSingleTable(_e,$)}function getTableOptions(a,s){const $=a.headWidthPercentages.reduce((nt,at,ot)=>({...nt,[ot]:{cellWidth:a.width*(at/100)}}),{}),_=Object.entries(a.columnStyles.alignment||{}).reduce((nt,[at,ot])=>({...nt,[at]:{alignment:ot}}),{}),_e=new Set([...Object.keys($).map(Number),...Object.keys(_).map(Number)]),tt=Array.from(_e).reduce((nt,at)=>{const ot=$[at]||{},rt=_[at]||{};return{...nt,[at]:{...ot,...rt}}},{});return{head:[a.head],body:s,showHead:a.showHead,startY:a.position.y,tableWidth:a.width,tableLineColor:a.tableStyles.borderColor,tableLineWidth:a.tableStyles.borderWidth,headStyles:mapCellStyle(a.headStyles),bodyStyles:mapCellStyle(a.bodyStyles),alternateRowStyles:{backgroundColor:a.bodyStyles.alternateBackgroundColor},columnStyles:tt,margin:{top:0,right:0,left:a.position.x,bottom:0}}}function parseStyles(a){const s={styles:{},headStyles:{},bodyStyles:{},alternateRowStyles:{},columnStyles:{}};for(const $ of Object.keys(s))if($==="columnStyles"){const _=a[$];s.columnStyles=Object.assign({},_)}else{const _e=[a].map(tt=>tt[$]||{});s[$]=Object.assign({},_e[0],_e[1],_e[2])}return s}function parseContent4Input(a){const s=a.head||[],$=a.body||[];return{columns:(s[0]||$[0]||[]).map((_e,tt)=>tt),head:s,body:$}}function parseInput(a,s){const $=getTableOptions(a,s),_=parseStyles($),_e={startY:$.startY,margin:$.margin,tableWidth:$.tableWidth,showHead:$.showHead,tableLineWidth:$.tableLineWidth??0,tableLineColor:$.tableLineColor??""};return{content:parseContent4Input($),styles:_,settings:_e}}function createSingleTable(a,s){const{options:$,_cache:_,basePdf:_e}=s;if(!isBlankPdf(_e))throw new Error("[@pdfme/schema/table] Blank PDF is not supported");const tt=parseInput(s.schema,a),nt=$.font||getDefaultFont(),at=getFallbackFontName(nt),ot=parseContent4Table(tt,at);return Table$3.create({input:tt,content:ot,font:nt,_cache:_})}async function createMultiTables(a,s){const{basePdf:$,schema:_}=s;if(!isBlankPdf($))throw new Error("[@pdfme/schema/table] Blank PDF is not supported");const _e=$.height,tt=$.padding[2],nt=$.padding[0];let at=_e-tt-_.position.y;const ot=await createSingleTable(a,s);let rt=ot.body;const st=[];for(;rt.length>0;){const lt=st.length===0?at-ot.getHeadHeight():at-nt,et=await createTableWithAvailableHeight(rt,lt,s);if(st.push(et),rt=rt.slice(et.body.length),rt.length>0){const it=cloneDeep$1(_);it.showHead=!1,it.position.y=nt,s.schema=it,at=_e-nt-tt}}return st}const modifyTemplateForTable=async a=>{const{template:s,input:$,options:_,_cache:_e}=a,tt=Object.assign(cloneDeep$1(s),{schemas:[]});let nt=0;for(const at of s.schemas){const ot=[];for(const[rt,st]of Object.entries(at))if(st.type==="table"){st.__bodyRange=void 0;const lt=JSON.parse(($==null?void 0:$[rt])||"[]"),et=await createMultiTables(lt,{schema:st,basePdf:tt.basePdf,options:_,_cache:_e});if(et.length>1){const it=et[0];st.__bodyRange={start:0,end:it.body.length};const ut=et.map(ht=>ht.body);et.slice(1).forEach((ht,dt)=>{const gt=nt+dt+1,pt={[rt]:{...st,position:{x:st.position.x,y:ht.settings.startY},height:ht.getHeight(),showHead:!1,__bodyRange:{start:ut.slice(0,dt+1).reduce((mt,ct)=>mt+ct.length,0),end:ut.slice(0,dt+2).reduce((mt,ct)=>mt+ct.length,0)},content:$[rt]}};ot[gt]=pt})}}tt.schemas.push(at),ot.forEach((rt,st)=>{tt.schemas[st]?tt.schemas[st]={...tt.schemas[st],...rt}:tt.schemas[st]=rt}),nt++}return tt},getDynamicHeightForTable=async(a,s)=>{var tt;if(s.schema.type!=="table")return Promise.resolve(s.schema.height);const $=s.schema,_=((tt=$.__bodyRange)==null?void 0:tt.start)===0?getBody$1(a):getBodyWithRange(a,$.__bodyRange);return(await createSingleTable(_,s)).getHeight()},builtInPlugins={Text:text};class BaseUIClass{constructor(s){this.lang=DEFAULT_LANG,this.font=getDefaultFont(),this.pluginsRegistry=builtInPlugins,this.options={},this.setSize=debounce$1(()=>{if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);this.size={height:this.domContainer.clientHeight||window.innerHeight,width:this.domContainer.clientWidth||window.innerWidth},this.render()},100),this.resizeObserver=new ResizeObserver(this.setSize),checkUIProps(s);const{domContainer:$,template:_,options:_e={},plugins:tt={}}=s;this.domContainer=$,this.template=cloneDeep$2(_),this.options=_e,this.size={height:this.domContainer.clientHeight||window.innerHeight,width:this.domContainer.clientWidth||window.innerWidth},this.resizeObserver.observe(this.domContainer);const{lang:nt,font:at}=_e;nt&&(this.lang=nt),at&&(this.font=at),Object.values(tt).length>0&&(this.pluginsRegistry=tt)}getLang(){return this.lang}getFont(){return this.font}getPluginsRegistry(){return this.pluginsRegistry}getOptions(){return this.options}getTemplate(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);return this.template}updateTemplate(s){if(checkTemplate(s),!this.domContainer)throw Error(DESTROYED_ERR_MSG);this.template=cloneDeep$2(s),this.render()}updateOptions(s){checkUIOptions(s);const{lang:$,font:_}=s||{};$&&(this.lang=$),_&&(this.font=_),this.options=Object.assign(this.options,s),this.render()}destroy(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);ReactDOM.unmountComponentAtNode(this.domContainer),this.resizeObserver.unobserve(this.domContainer),this.domContainer=null}}class PreviewUI extends BaseUIClass{constructor(s){super(s),checkPreviewProps(s),this.inputs=convertToStingObjectArray(cloneDeep$2(s.inputs))}getInputs(){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);return this.inputs}setInputs(s){if(!this.domContainer)throw Error(DESTROYED_ERR_MSG);checkInputs(s),this.inputs=convertToStingObjectArray(s),this.render()}}function convertToStingObjectArray(a){return a.map(s=>{const $={};return Object.keys(s).forEach(_=>{const _e=s[_];Array.isArray(_e)?$[_]=JSON.stringify(_e):$[_]=_e}),$})}function useCombinedRefs(){for(var a=arguments.length,s=new Array(a),$=0;$<a;$++)s[$]=arguments[$];return reactExports.useMemo(()=>_=>{s.forEach(_e=>_e(_))},s)}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function isWindow$4(a){const s=Object.prototype.toString.call(a);return s==="[object Window]"||s==="[object global]"}function isNode$1(a){return"nodeType"in a}function getWindow$1(a){var s,$;return a?isWindow$4(a)?a:isNode$1(a)&&(s=($=a.ownerDocument)==null?void 0:$.defaultView)!=null?s:window:window}function isDocument(a){const{Document:s}=getWindow$1(a);return a instanceof s}function isHTMLElement(a){return isWindow$4(a)?!1:a instanceof getWindow$1(a).HTMLElement}function isSVGElement(a){return a instanceof getWindow$1(a).SVGElement}function getOwnerDocument(a){return a?isWindow$4(a)?a.document:isNode$1(a)?isDocument(a)?a:isHTMLElement(a)||isSVGElement(a)?a.ownerDocument:document:document:document}const useIsomorphicLayoutEffect$1=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function useEvent$1(a){const s=reactExports.useRef(a);return useIsomorphicLayoutEffect$1(()=>{s.current=a}),reactExports.useCallback(function(){for(var $=arguments.length,_=new Array($),_e=0;_e<$;_e++)_[_e]=arguments[_e];return s.current==null?void 0:s.current(..._)},[])}function useInterval(){const a=reactExports.useRef(null),s=reactExports.useCallback((_,_e)=>{a.current=setInterval(_,_e)},[]),$=reactExports.useCallback(()=>{a.current!==null&&(clearInterval(a.current),a.current=null)},[]);return[s,$]}function useLatestValue(a,s){s===void 0&&(s=[a]);const $=reactExports.useRef(a);return useIsomorphicLayoutEffect$1(()=>{$.current!==a&&($.current=a)},s),$}function useLazyMemo(a,s){const $=reactExports.useRef();return reactExports.useMemo(()=>{const _=a($.current);return $.current=_,_},[...s])}function useNodeRef(a){const s=useEvent$1(a),$=reactExports.useRef(null),_=reactExports.useCallback(_e=>{_e!==$.current&&(s==null||s(_e,$.current)),$.current=_e},[]);return[$,_]}function usePrevious$1(a){const s=reactExports.useRef();return reactExports.useEffect(()=>{s.current=a},[a]),s.current}let ids={};function useUniqueId(a,s){return reactExports.useMemo(()=>{if(s)return s;const $=ids[a]==null?0:ids[a]+1;return ids[a]=$,a+"-"+$},[a,s])}function createAdjustmentFn(a){return function(s){for(var $=arguments.length,_=new Array($>1?$-1:0),_e=1;_e<$;_e++)_[_e-1]=arguments[_e];return _.reduce((tt,nt)=>{const at=Object.entries(nt);for(const[ot,rt]of at){const st=tt[ot];st!=null&&(tt[ot]=st+a*rt)}return tt},{...s})}}const add$1=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function hasViewportRelativeCoordinates(a){return"clientX"in a&&"clientY"in a}function isKeyboardEvent(a){if(!a)return!1;const{KeyboardEvent:s}=getWindow$1(a.target);return s&&a instanceof s}function isTouchEvent(a){if(!a)return!1;const{TouchEvent:s}=getWindow$1(a.target);return s&&a instanceof s}function getEventCoordinates(a){if(isTouchEvent(a)){if(a.touches&&a.touches.length){const{clientX:s,clientY:$}=a.touches[0];return{x:s,y:$}}else if(a.changedTouches&&a.changedTouches.length){const{clientX:s,clientY:$}=a.changedTouches[0];return{x:s,y:$}}}return hasViewportRelativeCoordinates(a)?{x:a.clientX,y:a.clientY}:null}const CSS$1=Object.freeze({Translate:{toString(a){if(!a)return;const{x:s,y:$}=a;return"translate3d("+(s?Math.round(s):0)+"px, "+($?Math.round($):0)+"px, 0)"}},Scale:{toString(a){if(!a)return;const{scaleX:s,scaleY:$}=a;return"scaleX("+s+") scaleY("+$+")"}},Transform:{toString(a){if(a)return[CSS$1.Translate.toString(a),CSS$1.Scale.toString(a)].join(" ")}},Transition:{toString(a){let{property:s,duration:$,easing:_}=a;return s+" "+$+"ms "+_}}}),SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(a){return a.matches(SELECTOR)?a:a.querySelector(SELECTOR)}const hiddenStyles={display:"none"};function HiddenText(a){let{id:s,value:$}=a;return React$a.createElement("div",{id:s,style:hiddenStyles},$)}function LiveRegion(a){let{id:s,announcement:$,ariaLiveType:_="assertive"}=a;const _e={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React$a.createElement("div",{id:s,style:_e,role:"status","aria-live":_,"aria-atomic":!0},$)}function useAnnouncement(){const[a,s]=reactExports.useState("");return{announce:reactExports.useCallback(_=>{_!=null&&s(_)},[]),announcement:a}}const DndMonitorContext=reactExports.createContext(null);function useDndMonitor(a){const s=reactExports.useContext(DndMonitorContext);reactExports.useEffect(()=>{if(!s)throw new Error("useDndMonitor must be used within a children of <DndContext>");return s(a)},[a,s])}function useDndMonitorProvider(){const[a]=reactExports.useState(()=>new Set),s=reactExports.useCallback(_=>(a.add(_),()=>a.delete(_)),[a]);return[reactExports.useCallback(_=>{let{type:_e,event:tt}=_;a.forEach(nt=>{var at;return(at=nt[_e])==null?void 0:at.call(nt,tt)})},[a]),s]}const defaultScreenReaderInstructions={draggable:`
|
129
129
|
To pick up a draggable item, press the space bar.
|
130
130
|
While dragging, use the arrow keys to move the item.
|
131
131
|
Press space again to drop the item in its new position, or press escape to cancel.
|
@@ -586,7 +586,7 @@ html body {
|
|
586
586
|
${$}-eye,
|
587
587
|
${$}-download,
|
588
588
|
${$}-delete
|
589
|
-
`]:{zIndex:10,width:_,margin:`0 ${unit$1(a.marginXXS)}`,fontSize:_,cursor:"pointer",transition:`all ${a.motionDurationSlow}`,color:_e,"&:hover":{color:_e},svg:{verticalAlign:"baseline"}}},[`${at}-thumbnail, ${at}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${at}-name`]:{display:"none",textAlign:"center"},[`${at}-file + ${at}-name`]:{position:"absolute",bottom:a.margin,display:"block",width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`},[`${at}-uploading`]:{[`&${at}`]:{backgroundColor:a.colorFillAlter},[`&::before, ${$}-eye, ${$}-download, ${$}-delete`]:{display:"none"}},[`${at}-progress`]:{bottom:a.marginXL,width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${s}-wrapper${s}-picture-circle-wrapper`]:{[`${s}${s}-select`]:{borderRadius:"50%"}}}},genRtlStyle=a=>{const{componentCls:s}=a;return{[`${s}-rtl`]:{direction:"rtl"}}},genRtlStyle$1=genRtlStyle,genBaseStyle=a=>{const{componentCls:s,colorTextDisabled:$}=a;return{[`${s}-wrapper`]:Object.assign(Object.assign({},resetComponent(a)),{[s]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${s}-select`]:{display:"inline-block"},[`${s}-disabled`]:{color:$,cursor:"not-allowed"}})}},prepareComponentToken=a=>({actionsColor:a.colorTextDescription}),useStyle=genStyleHooks("Upload",a=>{const{fontSizeHeading3:s,fontHeight:$,lineWidth:_,controlHeightLG:_e,calc:tt}=a,nt=merge(a,{uploadThumbnailSize:tt(s).mul(2).equal(),uploadProgressOffset:tt(tt($).div(2)).add(_).equal(),uploadPicCardSize:tt(_e).mul(2.55).equal()});return[genBaseStyle(nt),genDraggerStyle$1(nt),genPictureStyle(nt),genPictureCardStyle(nt),genListStyle$1(nt),genMotionStyle$1(nt),genRtlStyle$1(nt),genCollapseMotion$1(nt)]},prepareComponentToken);var FileTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:$}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:s}}]}},name:"file",theme:"twotone"};const FileTwoToneSvg=FileTwoTone$2;var FileTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:FileTwoToneSvg}))};const FileTwoTone$1=reactExports.forwardRef(FileTwoTone);var PaperClipOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const PaperClipOutlinedSvg=PaperClipOutlined$2;var PaperClipOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PaperClipOutlinedSvg}))};const PaperClipOutlined$1=reactExports.forwardRef(PaperClipOutlined);var PictureTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:s}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:$}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:$}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:$}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:s}}]}},name:"picture",theme:"twotone"};const PictureTwoToneSvg=PictureTwoTone$2;var PictureTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PictureTwoToneSvg}))};const PictureTwoTone$1=reactExports.forwardRef(PictureTwoTone);function file2Obj(a){return Object.assign(Object.assign({},a),{lastModified:a.lastModified,lastModifiedDate:a.lastModifiedDate,name:a.name,size:a.size,type:a.type,uid:a.uid,percent:0,originFileObj:a})}function updateFileList(a,s){const $=_toConsumableArray$d(s),_=$.findIndex(_e=>{let{uid:tt}=_e;return tt===a.uid});return _===-1?$.push(a):$[_]=a,$}function getFileItem(a,s){const $=a.uid!==void 0?"uid":"name";return s.filter(_=>_[$]===a[$])[0]}function removeFileItem(a,s){const $=a.uid!==void 0?"uid":"name",_=s.filter(_e=>_e[$]!==a[$]);return _.length===s.length?null:_}const extname=function(){const s=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),_=s[s.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(_)||[""])[0]},isImageFileType=a=>a.indexOf("image/")===0,isImageUrl=a=>{if(a.type&&!a.thumbUrl)return isImageFileType(a.type);const s=a.thumbUrl||a.url||"",$=extname(s);return/^data:image\//.test(s)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test($)?!0:!(/^data:/.test(s)||$)},MEASURE_SIZE=200;function previewImage(a){return new Promise(s=>{if(!a.type||!isImageFileType(a.type)){s("");return}const $=document.createElement("canvas");$.width=MEASURE_SIZE,$.height=MEASURE_SIZE,$.style.cssText=`position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`,document.body.appendChild($);const _=$.getContext("2d"),_e=new Image;if(_e.onload=()=>{const{width:tt,height:nt}=_e;let at=MEASURE_SIZE,ot=MEASURE_SIZE,rt=0,st=0;tt>nt?(ot=nt*(MEASURE_SIZE/tt),st=-(ot-at)/2):(at=tt*(MEASURE_SIZE/nt),rt=-(at-ot)/2),_.drawImage(_e,rt,st,at,ot);const lt=$.toDataURL();document.body.removeChild($),window.URL.revokeObjectURL(_e.src),s(lt)},_e.crossOrigin="anonymous",a.type.startsWith("image/svg+xml")){const tt=new FileReader;tt.onload=()=>{tt.result&&(_e.src=tt.result)},tt.readAsDataURL(a)}else if(a.type.startsWith("image/gif")){const tt=new FileReader;tt.onload=()=>{tt.result&&s(tt.result)},tt.readAsDataURL(a)}else _e.src=window.URL.createObjectURL(a)})}var DownloadOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const DownloadOutlinedSvg=DownloadOutlined$2;var DownloadOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:DownloadOutlinedSvg}))};const DownloadOutlined$1=reactExports.forwardRef(DownloadOutlined),ListItem=reactExports.forwardRef((a,s)=>{let{prefixCls:$,className:_,style:_e,locale:tt,listType:nt,file:at,items:ot,progress:rt,iconRender:st,actionIconRender:lt,itemRender:et,isImgUrl:it,showPreviewIcon:ut,showRemoveIcon:ft,showDownloadIcon:ht,previewIcon:dt,removeIcon:gt,downloadIcon:pt,onPreview:mt,onDownload:ct,onClose:vt}=a;var At,xt;const{status:bt}=at,[Et,St]=reactExports.useState(bt);reactExports.useEffect(()=>{bt!=="removed"&&St(bt)},[bt]);const[Bt,Ot]=reactExports.useState(!1);reactExports.useEffect(()=>{const Dt=setTimeout(()=>{Ot(!0)},300);return()=>{clearTimeout(Dt)}},[]);const Tt=st(at);let wt=reactExports.createElement("div",{className:`${$}-icon`},Tt);if(nt==="picture"||nt==="picture-card"||nt==="picture-circle")if(Et==="uploading"||!at.thumbUrl&&!at.url){const Dt=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:Et!=="uploading"});wt=reactExports.createElement("div",{className:Dt},Tt)}else{const Dt=it!=null&&it(at)?reactExports.createElement("img",{src:at.thumbUrl||at.url,alt:at.name,className:`${$}-list-item-image`,crossOrigin:at.crossOrigin}):Tt,Ut=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:it&&!it(at)});wt=reactExports.createElement("a",{className:Ut,onClick:Vt=>mt(at,Vt),href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Dt)}const Ct=classnames(`${$}-list-item`,`${$}-list-item-${Et}`),It=typeof at.linkProps=="string"?JSON.parse(at.linkProps):at.linkProps,yt=ft?lt((typeof gt=="function"?gt(at):gt)||reactExports.createElement(DeleteOutlined$1,null),()=>vt(at),$,tt.removeFile,!0):null,Rt=ht&&Et==="done"?lt((typeof pt=="function"?pt(at):pt)||reactExports.createElement(DownloadOutlined$1,null),()=>ct(at),$,tt.downloadFile):null,kt=nt!=="picture-card"&&nt!=="picture-circle"&&reactExports.createElement("span",{key:"download-delete",className:classnames(`${$}-list-item-actions`,{picture:nt==="picture"})},Rt,yt),jt=classnames(`${$}-list-item-name`),Ht=at.url?[reactExports.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:jt,title:at.name},It,{href:at.url,onClick:Dt=>mt(at,Dt)}),at.name),kt]:[reactExports.createElement("span",{key:"view",className:jt,onClick:Dt=>mt(at,Dt),title:at.name},at.name),kt],Ft=ut&&(at.url||at.thumbUrl)?reactExports.createElement("a",{href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Dt=>mt(at,Dt),title:tt.previewFile},typeof dt=="function"?dt(at):dt||reactExports.createElement(EyeOutlined$1,null)):null,_t=(nt==="picture-card"||nt==="picture-circle")&&Et!=="uploading"&&reactExports.createElement("span",{className:`${$}-list-item-actions`},Ft,Et==="done"&&Rt,yt),{getPrefixCls:Nt}=reactExports.useContext(ConfigContext$1),Mt=Nt(),Lt=reactExports.createElement("div",{className:Ct},wt,Ht,_t,Bt&&reactExports.createElement(CSSMotion,{motionName:`${Mt}-fade`,visible:Et==="uploading",motionDeadline:2e3},Dt=>{let{className:Ut}=Dt;const Vt="percent"in at?reactExports.createElement(Progress$1,Object.assign({},rt,{type:"line",percent:at.percent,"aria-label":at["aria-label"],"aria-labelledby":at["aria-labelledby"]})):null;return reactExports.createElement("div",{className:classnames(`${$}-list-item-progress`,Ut)},Vt)})),$t=at.response&&typeof at.response=="string"?at.response:((At=at.error)===null||At===void 0?void 0:At.statusText)||((xt=at.error)===null||xt===void 0?void 0:xt.message)||tt.uploadError,Pt=Et==="error"?reactExports.createElement(_Tooltip,{title:$t,getPopupContainer:Dt=>Dt.parentNode},Lt):Lt;return reactExports.createElement("div",{className:classnames(`${$}-list-item-container`,_),style:_e,ref:s},et?et(Pt,at,ot,{download:ct.bind(null,at),preview:mt.bind(null,at),remove:vt.bind(null,at)}):Pt)}),ListItem$1=ListItem,InternalUploadList=(a,s)=>{const{listType:$="text",previewFile:_=previewImage,onPreview:_e,onDownload:tt,onRemove:nt,locale:at,iconRender:ot,isImageUrl:rt=isImageUrl,prefixCls:st,items:lt=[],showPreviewIcon:et=!0,showRemoveIcon:it=!0,showDownloadIcon:ut=!1,removeIcon:ft,previewIcon:ht,downloadIcon:dt,progress:gt={size:[-1,2],showInfo:!1},appendAction:pt,appendActionVisible:mt=!0,itemRender:ct,disabled:vt}=a,At=useForceUpdate(),[xt,bt]=reactExports.useState(!1);reactExports.useEffect(()=>{$!=="picture"&&$!=="picture-card"&&$!=="picture-circle"||(lt||[]).forEach(Ft=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Ft.originFileObj instanceof File||Ft.originFileObj instanceof Blob)||Ft.thumbUrl!==void 0||(Ft.thumbUrl="",_&&_(Ft.originFileObj).then(_t=>{Ft.thumbUrl=_t||"",At()}))})},[$,lt,_]),reactExports.useEffect(()=>{bt(!0)},[]);const Et=(Ft,_t)=>{if(_e)return _t==null||_t.preventDefault(),_e(Ft)},St=Ft=>{typeof tt=="function"?tt(Ft):Ft.url&&window.open(Ft.url)},Bt=Ft=>{nt==null||nt(Ft)},Ot=Ft=>{if(ot)return ot(Ft,$);const _t=Ft.status==="uploading",Nt=rt&&rt(Ft)?reactExports.createElement(PictureTwoTone$1,null):reactExports.createElement(FileTwoTone$1,null);let Mt=_t?reactExports.createElement(LoadingOutlined$1,null):reactExports.createElement(PaperClipOutlined$1,null);return $==="picture"?Mt=_t?reactExports.createElement(LoadingOutlined$1,null):Nt:($==="picture-card"||$==="picture-circle")&&(Mt=_t?at.uploading:Nt),Mt},Tt=(Ft,_t,Nt,Mt,Lt)=>{const $t={type:"text",size:"small",title:Mt,onClick:Pt=>{_t(),isValidElement(Ft)&&Ft.props.onClick&&Ft.props.onClick(Pt)},className:`${Nt}-list-item-action`};if(Lt&&($t.disabled=vt),isValidElement(Ft)){const Pt=cloneElement(Ft,Object.assign(Object.assign({},Ft.props),{onClick:()=>{}}));return reactExports.createElement(Button$2,Object.assign({},$t,{icon:Pt}))}return reactExports.createElement(Button$2,Object.assign({},$t),reactExports.createElement("span",null,Ft))};reactExports.useImperativeHandle(s,()=>({handlePreview:Et,handleDownload:St}));const{getPrefixCls:wt}=reactExports.useContext(ConfigContext$1),Ct=wt("upload",st),It=wt(),yt=classnames(`${Ct}-list`,`${Ct}-list-${$}`),Rt=_toConsumableArray$d(lt.map(Ft=>({key:Ft.uid,file:Ft})));let jt={motionDeadline:2e3,motionName:`${Ct}-${$==="picture-card"||$==="picture-circle"?"animate-inline":"animate"}`,keys:Rt,motionAppear:xt};const Ht=reactExports.useMemo(()=>{const Ft=Object.assign({},initCollapseMotion$1(It));return delete Ft.onAppearEnd,delete Ft.onEnterEnd,delete Ft.onLeaveEnd,Ft},[It]);return $!=="picture-card"&&$!=="picture-circle"&&(jt=Object.assign(Object.assign({},Ht),jt)),reactExports.createElement("div",{className:yt},reactExports.createElement(CSSMotionList,Object.assign({},jt,{component:!1}),Ft=>{let{key:_t,file:Nt,className:Mt,style:Lt}=Ft;return reactExports.createElement(ListItem$1,{key:_t,locale:at,prefixCls:Ct,className:Mt,style:Lt,file:Nt,items:lt,progress:gt,listType:$,isImgUrl:rt,showPreviewIcon:et,showRemoveIcon:it,showDownloadIcon:ut,removeIcon:ft,previewIcon:ht,downloadIcon:dt,iconRender:Ot,actionIconRender:Tt,itemRender:ct,onPreview:Et,onDownload:St,onClose:Bt})}),pt&&reactExports.createElement(CSSMotion,Object.assign({},jt,{visible:mt,forceRender:!0}),Ft=>{let{className:_t,style:Nt}=Ft;return cloneElement(pt,Mt=>({className:classnames(Mt.className,_t),style:Object.assign(Object.assign(Object.assign({},Nt),{pointerEvents:_t?"none":void 0}),Mt.style)}))}))},UploadList=reactExports.forwardRef(InternalUploadList),UploadList$1=UploadList;var __awaiter$1=function(a,s,$,_){function _e(tt){return tt instanceof $?tt:new $(function(nt){nt(tt)})}return new($||($=Promise))(function(tt,nt){function at(st){try{rt(_.next(st))}catch(lt){nt(lt)}}function ot(st){try{rt(_.throw(st))}catch(lt){nt(lt)}}function rt(st){st.done?tt(st.value):_e(st.value).then(at,ot)}rt((_=_.apply(a,s||[])).next())})};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,InternalUpload=(a,s)=>{const{fileList:$,defaultFileList:_,onRemove:_e,showUploadList:tt=!0,listType:nt="text",onPreview:at,onDownload:ot,onChange:rt,onDrop:st,previewFile:lt,disabled:et,locale:it,iconRender:ut,isImageUrl:ft,progress:ht,prefixCls:dt,className:gt,type:pt="select",children:mt,style:ct,itemRender:vt,maxCount:At,data:xt={},multiple:bt=!1,action:Et="",accept:St="",supportServerRender:Bt=!0,rootClassName:Ot}=a,Tt=reactExports.useContext(DisabledContext$1),wt=et??Tt,[Ct,It]=useMergedState(_||[],{value:$,postState:ur=>ur??[]}),[yt,Rt]=reactExports.useState("drop"),kt=reactExports.useRef(null);reactExports.useMemo(()=>{const ur=Date.now();($||[]).forEach((pr,yr)=>{!pr.uid&&!Object.isFrozen(pr)&&(pr.uid=`__AUTO__${ur}_${yr}__`)})},[$]);const jt=(ur,pr,yr)=>{let Er=_toConsumableArray$d(pr),br=!1;At===1?Er=Er.slice(-1):At&&(br=Er.length>At,Er=Er.slice(0,At)),reactDomExports.flushSync(()=>{It(Er)});const gr={file:ur,fileList:Er};yr&&(gr.event=yr),(!br||Er.some(Ar=>Ar.uid===ur.uid))&&reactDomExports.flushSync(()=>{rt==null||rt(gr)})},Ht=(ur,pr)=>__awaiter$1(void 0,void 0,void 0,function*(){const{beforeUpload:yr,transformFile:Er}=a;let br=ur;if(yr){const gr=yield yr(ur,pr);if(gr===!1)return!1;if(delete ur[LIST_IGNORE],gr===LIST_IGNORE)return Object.defineProperty(ur,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof gr=="object"&&gr&&(br=gr)}return Er&&(br=yield Er(br)),br}),Ft=ur=>{const pr=ur.filter(br=>!br.file[LIST_IGNORE]);if(!pr.length)return;const yr=pr.map(br=>file2Obj(br.file));let Er=_toConsumableArray$d(Ct);yr.forEach(br=>{Er=updateFileList(br,Er)}),yr.forEach((br,gr)=>{let Ar=br;if(pr[gr].parsedFile)br.status="uploading";else{const{originFileObj:Sr}=br;let Br;try{Br=new File([Sr],Sr.name,{type:Sr.type})}catch{Br=new Blob([Sr],{type:Sr.type}),Br.name=Sr.name,Br.lastModifiedDate=new Date,Br.lastModified=new Date().getTime()}Br.uid=br.uid,Ar=Br}jt(Ar,Er)})},_t=(ur,pr,yr)=>{try{typeof ur=="string"&&(ur=JSON.parse(ur))}catch{}if(!getFileItem(pr,Ct))return;const Er=file2Obj(pr);Er.status="done",Er.percent=100,Er.response=ur,Er.xhr=yr;const br=updateFileList(Er,Ct);jt(Er,br)},Nt=(ur,pr)=>{if(!getFileItem(pr,Ct))return;const yr=file2Obj(pr);yr.status="uploading",yr.percent=ur.percent;const Er=updateFileList(yr,Ct);jt(yr,Er,ur)},Mt=(ur,pr,yr)=>{if(!getFileItem(yr,Ct))return;const Er=file2Obj(yr);Er.error=ur,Er.response=pr,Er.status="error";const br=updateFileList(Er,Ct);jt(Er,br)},Lt=ur=>{let pr;Promise.resolve(typeof _e=="function"?_e(ur):_e).then(yr=>{var Er;if(yr===!1)return;const br=removeFileItem(ur,Ct);br&&(pr=Object.assign(Object.assign({},ur),{status:"removed"}),Ct==null||Ct.forEach(gr=>{const Ar=pr.uid!==void 0?"uid":"name";gr[Ar]===pr[Ar]&&!Object.isFrozen(gr)&&(gr.status="removed")}),(Er=kt.current)===null||Er===void 0||Er.abort(pr),jt(pr,br))})},$t=ur=>{Rt(ur.type),ur.type==="drop"&&(st==null||st(ur))};reactExports.useImperativeHandle(s,()=>({onBatchStart:Ft,onSuccess:_t,onProgress:Nt,onError:Mt,fileList:Ct,upload:kt.current}));const{getPrefixCls:Pt,direction:Dt,upload:Ut}=reactExports.useContext(ConfigContext$1),Vt=Pt("upload",dt),Qt=Object.assign(Object.assign({onBatchStart:Ft,onError:Mt,onProgress:Nt,onSuccess:_t},a),{data:xt,multiple:bt,action:Et,accept:St,supportServerRender:Bt,prefixCls:Vt,disabled:wt,beforeUpload:Ht,onChange:void 0});delete Qt.className,delete Qt.style,(!mt||wt)&&delete Qt.id;const qt=`${Vt}-wrapper`,[Zt,ar,Jt]=useStyle(Vt,qt),[rr]=useLocale$1("Upload",defaultLocale.Upload),{showRemoveIcon:Yt,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr}=typeof tt=="boolean"?{}:tt,cr=typeof Yt>"u"?!wt:!!Yt,or=(ur,pr)=>tt?reactExports.createElement(UploadList$1,{prefixCls:Vt,listType:nt,items:Ct,previewFile:lt,onPreview:at,onDownload:ot,onRemove:Lt,showRemoveIcon:cr,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr,iconRender:ut,locale:Object.assign(Object.assign({},rr),it),isImageUrl:ft,progress:ht,appendAction:ur,appendActionVisible:pr,itemRender:vt,disabled:wt}):ur,Xt=classnames(qt,gt,Ot,ar,Jt,Ut==null?void 0:Ut.className,{[`${Vt}-rtl`]:Dt==="rtl",[`${Vt}-picture-card-wrapper`]:nt==="picture-card",[`${Vt}-picture-circle-wrapper`]:nt==="picture-circle"}),Gt=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),ct);if(pt==="drag"){const ur=classnames(ar,Vt,`${Vt}-drag`,{[`${Vt}-drag-uploading`]:Ct.some(pr=>pr.status==="uploading"),[`${Vt}-drag-hover`]:yt==="dragover",[`${Vt}-disabled`]:wt,[`${Vt}-rtl`]:Dt==="rtl"});return Zt(reactExports.createElement("span",{className:Xt},reactExports.createElement("div",{className:ur,style:Gt,onDrop:$t,onDragOver:$t,onDragLeave:$t},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt,className:`${Vt}-btn`}),reactExports.createElement("div",{className:`${Vt}-drag-container`},mt))),or()))}const Wt=classnames(Vt,`${Vt}-select`,{[`${Vt}-disabled`]:wt}),lr=(ur=>reactExports.createElement("div",{className:Wt,style:ur},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt}))))(mt?void 0:{display:"none"});return Zt(nt==="picture-card"||nt==="picture-circle"?reactExports.createElement("span",{className:Xt},or(lr,!!mt)):reactExports.createElement("span",{className:Xt},lr,or()))},Upload$1=reactExports.forwardRef(InternalUpload),InternalUpload$1=Upload$1;var __rest$4=function(a,s){var $={};for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&s.indexOf(_)<0&&($[_]=a[_]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,_=Object.getOwnPropertySymbols(a);_e<_.length;_e++)s.indexOf(_[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,_[_e])&&($[_[_e]]=a[_[_e]]);return $};const Dragger=reactExports.forwardRef((a,s)=>{var{style:$,height:_}=a,_e=__rest$4(a,["style","height"]);return reactExports.createElement(InternalUpload$1,Object.assign({ref:s},_e,{type:"drag",style:Object.assign(Object.assign({},$),{height:_})}))}),Dragger$1=Dragger,Upload=InternalUpload$1;Upload.Dragger=Dragger$1,Upload.LIST_IGNORE=LIST_IGNORE;const _Upload=Upload;var ArrowLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const ArrowLeftOutlinedSvg=ArrowLeftOutlined$2;var ArrowLeftOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowLeftOutlinedSvg}))};const ArrowLeftOutlined$1=reactExports.forwardRef(ArrowLeftOutlined);var ArrowRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const ArrowRightOutlinedSvg=ArrowRightOutlined$2;var ArrowRightOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowRightOutlinedSvg}))};const ArrowRightOutlined$1=reactExports.forwardRef(ArrowRightOutlined);var ExclamationCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const ExclamationCircleOutlinedSvg=ExclamationCircleOutlined$2;var ExclamationCircleOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ExclamationCircleOutlinedSvg}))};const ExclamationCircleOutlined$1=reactExports.forwardRef(ExclamationCircleOutlined);var MenuOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const MenuOutlinedSvg=MenuOutlined$2;var MenuOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MenuOutlinedSvg}))};const MenuOutlined$1=reactExports.forwardRef(MenuOutlined);var MinusOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const MinusOutlinedSvg=MinusOutlined$2;var MinusOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MinusOutlinedSvg}))};const MinusOutlined$1=reactExports.forwardRef(MinusOutlined),dictEn={cancel:"Cancel",field:"field",fieldName:"Name",align:"Align",width:"Width",height:"Height",opacity:"Opacity",rotate:"Rotate",edit:"Edit",plsInputName:"Please input name",fieldMustUniq:"Name of field is not unique",notUniq:"(Not unique name)",noKeyName:"No name",fieldsList:"Field List",editField:"Edit Field",type:"Type",errorOccurred:"An error occurred",errorBulkUpdateFieldName:"Cannot commit the change because the number of items has been changed.",commitBulkUpdateFieldName:"Commit Changes",bulkUpdateFieldName:"Bulk update field names",addPageAfter:"Add Page After",removePage:"Remove Current Page",removePageConfirm:"Are you sure you want to delete this page? This action cannot be undone.",hexColorPrompt:"Please enter a valid hex color code.","schemas.color":"Color","schemas.borderWidth":"Border Width","schemas.borderColor":"Border Color","schemas.backgroundColor":"Background Color","schemas.textColor":"Text Color","schemas.bgColor":"Background Color","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Left","schemas.center":"Center","schemas.right":"Right","schemas.top":"Top","schemas.middle":"Middle","schemas.bottom":"Bottom","schemas.padding":"Padding","schemas.text.fontName":"Font Name","schemas.text.size":"Size","schemas.text.spacing":"Spacing","schemas.text.textAlign":"Text Align","schemas.text.verticalAlign":"Vertical Align","schemas.text.lineHeight":"Line Height","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Fit","schemas.text.dynamicFontSize":"Dynamic Font Size","schemas.barcodes.barColor":"Bar Color","schemas.barcodes.includetext":"Include Text","schemas.table.alternateBackgroundColor":"Alternate Background Color","schemas.table.tableStyle":"Table Style","schemas.table.headStyle":"Header Style","schemas.table.bodyStyle":"Body Style","schemas.table.columnStyle":"Column Style"},dictZh={cancel:"取消",field:"字段",fieldName:"名称",align:"对齐",width:"宽度",height:"高度",opacity:"透明度",rotate:"旋转",edit:"编辑",plsInputName:"请输入名称",fieldMustUniq:"字段名称必须唯一",notUniq:"(名称不唯一)",noKeyName:"无名称",fieldsList:"字段列表",editField:"编辑字段",type:"类型",errorOccurred:"发生错误",errorBulkUpdateFieldName:"由于项目数量已更改,无法提交更改。",commitBulkUpdateFieldName:"提交更改",bulkUpdateFieldName:"批量更新字段名称",addPageAfter:"在之后添加页面",removePage:"删除当前页面",removePageConfirm:"您确定要删除此页面吗?此操作无法撤销。",hexColorPrompt:"请输入有效的十六进制颜色代码。","schemas.color":"颜色","schemas.borderWidth":"边框宽度","schemas.borderColor":"边框颜色","schemas.backgroundColor":"背景颜色","schemas.textColor":"文字颜色","schemas.bgColor":"背景颜色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中","schemas.right":"右","schemas.top":"顶","schemas.middle":"中间","schemas.bottom":"底","schemas.padding":"填充","schemas.text.fontName":"字体名称","schemas.text.size":"大小","schemas.text.spacing":"间距","schemas.text.textAlign":"文本对齐","schemas.text.verticalAlign":"垂直对齐","schemas.text.lineHeight":"行高","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"适应","schemas.text.dynamicFontSize":"动态字体大小","schemas.barcodes.barColor":"条码颜色","schemas.barcodes.includetext":"包括文本","schemas.table.alternateBackgroundColor":"交替背景颜色","schemas.table.tableStyle":"表格样式","schemas.table.headStyle":"表头样式","schemas.table.bodyStyle":"表体样式","schemas.table.columnStyle":"列样式"},dictJa={cancel:"キャンセル",field:"入力項目",fieldName:"項目名",align:"整列",width:"幅",height:"高さ",opacity:"不透明度",rotate:"回転",edit:"編集する",plsInputName:"項目名を入力してください",fieldMustUniq:"他の入力項目名と被っています",notUniq:"(他の項目名と重複しています)",noKeyName:"項目名なし",fieldsList:"入力項目一覧",editField:"入力項目を編集",type:"タイプ",errorOccurred:"エラーが発生しました",errorBulkUpdateFieldName:"項目数が変更されているため変更をコミットできません。",commitBulkUpdateFieldName:"変更を反映",bulkUpdateFieldName:"項目名を一括変更",addPageAfter:"次にページを追加",removePage:"現在のページを削除",removePageConfirm:"ページを削除してもよろしいですか?この操作は元に戻せません。",hexColorPrompt:"有効な16進数のカラーコードを入力してください。","schemas.color":"色","schemas.borderWidth":"枠線の太さ","schemas.borderColor":"枠線の色","schemas.backgroundColor":"背景色","schemas.textColor":"テキストの色","schemas.bgColor":"背景色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中央","schemas.right":"右","schemas.top":"上","schemas.middle":"中間","schemas.bottom":"下","schemas.padding":"パディング","schemas.text.fontName":"フォント名","schemas.text.size":"サイズ","schemas.text.spacing":"間隔","schemas.text.textAlign":"テキストの揃え","schemas.text.verticalAlign":"垂直方向の揃え","schemas.text.lineHeight":"行の高さ","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"フィット","schemas.text.dynamicFontSize":"動的フォントサイズ","schemas.barcodes.barColor":"バーの色","schemas.barcodes.includetext":"テキストを含める","schemas.table.alternateBackgroundColor":"交互の背景色","schemas.table.tableStyle":"テーブルスタイル","schemas.table.headStyle":"ヘッダースタイル","schemas.table.bodyStyle":"ボディスタイル","schemas.table.columnStyle":"カラムスタイル"},dictKo={cancel:"취소",field:"필드",fieldName:"이름",align:"정렬",width:"너비",height:"높이",opacity:"투명도",rotate:"회전",edit:"편집",plsInputName:"이름을 입력하세요",fieldMustUniq:"필드 이름은 유일해야 합니다",notUniq:"(유일하지 않은 이름)",noKeyName:"이름 없음",fieldsList:"필드 목록",editField:"필드 편집",type:"유형",errorOccurred:"오류 발생",errorBulkUpdateFieldName:"항목 수가 변경되어 변경을 커밋할 수 없습니다.",commitBulkUpdateFieldName:"변경 사항 커밋",bulkUpdateFieldName:"필드 이름 일괄 업데이트",addPageAfter:"다음에 페이지 추가",removePage:"현재 페이지 제거",removePageConfirm:"이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",hexColorPrompt:"유효한 16진수 색상 코드를 입력하세요.","schemas.color":"색상","schemas.borderWidth":"테두리 너비","schemas.borderColor":"테두리 색상","schemas.backgroundColor":"배경색","schemas.textColor":"텍스트 색상","schemas.bgColor":"배경색","schemas.horizontal":"수평","schemas.vertical":"수직","schemas.left":"왼쪽","schemas.center":"중앙","schemas.right":"오른쪽","schemas.top":"상단","schemas.middle":"중간","schemas.bottom":"하단","schemas.padding":"패딩","schemas.text.fontName":"글꼴 이름","schemas.text.size":"크기","schemas.text.spacing":"간격","schemas.text.textAlign":"텍스트 정렬","schemas.text.verticalAlign":"수직 정렬","schemas.text.lineHeight":"줄 높이","schemas.text.min":"최소","schemas.text.max":"최대","schemas.text.fit":"맞춤","schemas.text.dynamicFontSize":"동적 폰트 크기","schemas.barcodes.barColor":"바코드 색상","schemas.barcodes.includetext":"텍스트 포함","schemas.table.alternateBackgroundColor":"대체 배경색","schemas.table.tableStyle":"테이블 스타일","schemas.table.headStyle":"헤더 스타일","schemas.table.bodyStyle":"본문 스타일","schemas.table.columnStyle":"열 스타일"},dictAr={cancel:"إلغاء",field:"الحقل",fieldName:"اسم الحقل",align:"محاذاة",width:"العرض",height:"الارتفاع",opacity:"الشفافية",rotate:"تدوير",edit:"تعديل",plsInputName:"الرجاء إدخال الاسم",fieldMustUniq:"يجب أن يكون الحقل فريداً",notUniq:"(غير فريد)",noKeyName:"لا يوجد اسم للحقل",fieldsList:"قائمة الحقول",editField:"تعديل الحقل",type:"النوع",errorOccurred:"حدث خطأ",errorBulkUpdateFieldName:"لا يمكن تنفيذ التغيير لأنه تم تغيير عدد العناصر.",commitBulkUpdateFieldName:"تنفيذ التغييرات",bulkUpdateFieldName:"تغيير الأسماء",addPageAfter:"إضافة صفحة بعد",removePage:"احذف الصفحة الحالية",removePageConfirm:"هل أنت متأكد من رغبتك في حذف هذه الصفحة؟ لا يمكن التراجع عن هذا الإجراء.",hexColorPrompt:"الرجاء إدخال رمز لون سداسي عشري صالح.","schemas.color":"اللون","schemas.borderWidth":"عرض الحدود","schemas.borderColor":"لون الحدود","schemas.backgroundColor":"لون الخلفية","schemas.textColor":"لون الخط","schemas.bgColor":"لون الخلفية","schemas.horizontal":"أفقي","schemas.vertical":"عمودي","schemas.left":"يسار","schemas.center":"مركز","schemas.right":"يمين","schemas.top":"أعلى","schemas.middle":"وسط","schemas.bottom":"أسفل","schemas.padding":"التبطين","schemas.text.fontName":"اسم الخط","schemas.text.size":"الحجم","schemas.text.spacing":"التباعد","schemas.text.textAlign":"محاذاة النص","schemas.text.verticalAlign":"محاذاة عمودية","schemas.text.lineHeight":"ارتفاع السطر","schemas.text.min":"الحد الأدنى","schemas.text.max":"الحد الأقصى","schemas.text.fit":"ملاءمة","schemas.text.dynamicFontSize":"حجم الخط الديناميكي","schemas.barcodes.barColor":"لون الشريط","schemas.barcodes.includetext":"تضمين النص","schemas.table.alternateBackgroundColor":"لون الخلفية البديل","schemas.table.tableStyle":"أسلوب الجدول","schemas.table.headStyle":"أسلوب الرأس","schemas.table.bodyStyle":"أسلوب الجسم","schemas.table.columnStyle":"أسلوب العمود"},dictTh={cancel:"ยกเลิก",field:"ฟิลด์",fieldName:"ชื่อฟิลด์",align:"จัดเรียง",width:"ความกว้าง",height:"ความสูง",opacity:"ความทึบ",rotate:"หมุน",edit:"แก้ไข",plsInputName:"กรุณาใส่ชื่อ",fieldMustUniq:"ชื่อฟิลด์ต้องไม่ซ้ำกัน",notUniq:"(ชื่อฟิลด์ซ้ำกัน)",noKeyName:"ไม่มีชื่อ",fieldsList:"รายการฟิลด์ทั้งหมด",editField:"แก้ไขฟิลด์",type:"ประเภท",errorOccurred:"เกิดข้อผิดพลาด",errorBulkUpdateFieldName:"ไม่สามารถยืนยันการแก้ไขได้เนื่องจากจำนวนรายการมีการเปลี่ยนแปลง",commitBulkUpdateFieldName:"ยืนยันการแก้ไข",bulkUpdateFieldName:"แก้ไขชื่อฟิลด์เป็นชุด",addPageAfter:"เพิ่มหน้าถัดไป",removePage:"ลบหน้าปัจจุบัน",removePageConfirm:"คุณแน่ใจหรือไม่ว่าต้องการลบหน้านี้? การกระทำนี้ไม่สามารถย้อนกลับได้",hexColorPrompt:"กรุณาใส่รหัสสีแบบฐานสิบหกที่ถูกต้อง","schemas.color":"สี","schemas.borderWidth":"ความกว้างของเส้นขอบ","schemas.borderColor":"สีขอบ","schemas.backgroundColor":"สีพื้นหลัง","schemas.textColor":"สีข้อความ","schemas.bgColor":"สีพื้นหลัง","schemas.horizontal":"แนวนอน","schemas.vertical":"แนวตั้ง","schemas.left":"ซ้าย","schemas.center":"ตรงกลาง","schemas.right":"ขวา","schemas.top":"ด้านบน","schemas.middle":"ตรงกลาง","schemas.bottom":"ด้านล่าง","schemas.padding":"การเพิ่มพื้นที่","schemas.text.fontName":"ชื่อแบบอักษร","schemas.text.size":"ขนาด","schemas.text.spacing":"ระยะห่าง","schemas.text.textAlign":"จัดแนวข้อความ","schemas.text.verticalAlign":"จัดแนวแนวตั้ง","schemas.text.lineHeight":"ความสูงของบรรทัด","schemas.text.min":"ต่ำสุด","schemas.text.max":"สูงสุด","schemas.text.fit":"พอดี","schemas.text.dynamicFontSize":"ขนาดตัวอักษรแบบไดนามิก","schemas.barcodes.barColor":"สีบาร์","schemas.barcodes.includetext":"รวมข้อความ","schemas.table.alternateBackgroundColor":"สีพื้นหลังสลับกัน","schemas.table.tableStyle":"สไตล์ตาราง","schemas.table.headStyle":"สไตล์หัวข้อ","schemas.table.bodyStyle":"สไตล์เนื้อหา","schemas.table.columnStyle":"สไตล์คอลัมน์"},dictIt={cancel:"Annulla",field:"Campo",fieldName:"Nome",align:"Allinea",width:"Larghezza",height:"Altezza",opacity:"Opacità",rotate:"Ruota",edit:"Modifica",plsInputName:"Inserisci il nome per favore",fieldMustUniq:"Il nome del campo non è univoco",notUniq:"(Nome non univoco)",noKeyName:"Nessun nome",fieldsList:"Lista campi",editField:"Modifica campo",type:"Tipo",errorOccurred:"Riscontrato errore",errorBulkUpdateFieldName:"Non è possibile salvare le modifiche perché il numero di elementi è cambiato.",commitBulkUpdateFieldName:"Salva cambiamenti",bulkUpdateFieldName:"Modifica nomi campi in blocco",addPageAfter:"Aggiungi pagina dopo",removePage:"Rimuovi la Pagina Corrente",removePageConfirm:"Sei sicuro di voler eliminare questa pagina? Questa azione non può essere annullata.",hexColorPrompt:"Inserisci un codice colore esadecimale valido.","schemas.color":"Colore","schemas.borderWidth":"Spessore bordo","schemas.borderColor":"Colore bordo","schemas.backgroundColor":"Colore di Sfondo","schemas.textColor":"Colore testo","schemas.bgColor":"Colore sfondo","schemas.horizontal":"Orizzontale","schemas.vertical":"Verticale","schemas.left":"Sinistra","schemas.center":"Centro","schemas.right":"Destra","schemas.top":"Sopra","schemas.middle":"Medio","schemas.bottom":"Sotto","schemas.padding":"Padding","schemas.text.fontName":"Nome del font","schemas.text.size":"Dimensione","schemas.text.spacing":"Spaziatura","schemas.text.textAlign":"Allineamento testo","schemas.text.verticalAlign":"Allineamento verticale","schemas.text.lineHeight":"Altezza della linea","schemas.text.min":"Minimo","schemas.text.max":"Massimo","schemas.text.fit":"Adatta","schemas.text.dynamicFontSize":"Dimensione font dinamica","schemas.barcodes.barColor":"Colore barra","schemas.barcodes.includetext":"Includi testo","schemas.table.alternateBackgroundColor":"Colore di Sfondo Alternato","schemas.table.tableStyle":"Stile della Tabella","schemas.table.headStyle":"Stile dell'Intestazione","schemas.table.bodyStyle":"Stile del Corpo","schemas.table.columnStyle":"Stile della Colonna"},dictPl={cancel:"Anuluj",field:"pole",fieldName:"Klucz pola",align:"Wyrównanie",width:"Szerokość",height:"Wysokość",opacity:"przezroczystość",rotate:"Obrót",edit:"Edytuj",plsInputName:"Wymagane wprowadzenie klucza pola",fieldMustUniq:"Klucz pola nie jest unikalny",notUniq:"(Klucz pola nie jest unikalny)",noKeyName:"Brak nazwy klucza pola",fieldsList:"Lista pól",editField:"Edytuj pole",type:"Typ pola",errorOccurred:"Wystąpił błąd",errorBulkUpdateFieldName:"Nie można wprowadzić zmian ponieważ liczba elementów uległa zmianie.",commitBulkUpdateFieldName:"Zaakceptuj zmiany",bulkUpdateFieldName:"Masowo aktualizuj klucze pól",addPageAfter:"Dodaj stronę po",removePage:"Usuń Bieżącą Stronę",removePageConfirm:"Czy na pewno chcesz usunąć tę stronę? Tej operacji nie można cofnąć.",hexColorPrompt:"Wprowadź poprawny kod koloru szesnastkowego.","schemas.color":"Kolor","schemas.borderWidth":"Szerokość obramowania","schemas.borderColor":"Kolor obramowania","schemas.backgroundColor":"Kolor tła","schemas.textColor":"Kolor tekstu","schemas.bgColor":"Kolor tła","schemas.horizontal":"Poziomo","schemas.vertical":"Pionowo","schemas.left":"Lewo","schemas.center":"Centrum","schemas.right":"Prawo","schemas.top":"Góra","schemas.middle":"Środek","schemas.bottom":"Dół","schemas.padding":"Odsadzenie","schemas.text.fontName":"Nazwa czcionki","schemas.text.size":"Rozmiar","schemas.text.spacing":"Odstępy","schemas.text.textAlign":"Wyrównanie tekstu","schemas.text.verticalAlign":"Wyrównanie pionowe","schemas.text.lineHeight":"Wysokość linii","schemas.text.min":"Minimum","schemas.text.max":"Maksimum","schemas.text.fit":"Dopasowanie","schemas.text.dynamicFontSize":"Dynamiczny rozmiar czcionki","schemas.barcodes.barColor":"Kolor paska","schemas.barcodes.includetext":"Dołącz tekst","schemas.table.alternateBackgroundColor":"Alternatywny kolor tła","schemas.table.tableStyle":"Styl tabeli","schemas.table.headStyle":"Styl nagłówka","schemas.table.bodyStyle":"Styl ciała","schemas.table.columnStyle":"Styl kolumny"},dictDe={cancel:"Abbrechen",field:"Feld",fieldName:"Name",align:"Ausrichten",width:"Breite",height:"Höhe",opacity:"Opazität",rotate:"Drehen",edit:"Bearbeiten",plsInputName:"Bitte geben Sie einen Namen ein",fieldMustUniq:"Feldname ist nicht eindeutig",notUniq:"(Nicht eindeutiger Name)",noKeyName:"Kein Name",fieldsList:"Feldliste",editField:"Feld bearbeiten",type:"Typ",errorOccurred:"Ein Fehler ist aufgetreten",errorBulkUpdateFieldName:"Die Änderung kann nicht übernommen werden, weil die Anzahl der Elemente geändert wurde.",commitBulkUpdateFieldName:"Änderungen übernehmen",bulkUpdateFieldName:"Mehrfachaktualisierung der Feldnamen",addPageAfter:"Seite danach hinzufügen",removePage:"Aktuelle Seite entfernen",removePageConfirm:"Sind Sie sicher, dass Sie diese Seite löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",hexColorPrompt:"Bitte geben Sie einen gültigen Hex-Farbcode ein.","schemas.color":"Farbe","schemas.borderWidth":"Rahmenbreite","schemas.borderColor":"Rahmenfarbe","schemas.backgroundColor":"Hintergrundfarbe","schemas.textColor":"Textfarbe","schemas.bgColor":"Hintergrundfarbe","schemas.horizontal":"Horizontal","schemas.vertical":"Vertikal","schemas.left":"Links","schemas.center":"Zentriert","schemas.right":"Rechts","schemas.top":"Oben","schemas.middle":"Mitte","schemas.bottom":"Unten","schemas.padding":"Polsterung","schemas.text.fontName":"Schriftart","schemas.text.size":"Größe","schemas.text.spacing":"Abstand","schemas.text.textAlign":"Ausrichtung","schemas.text.verticalAlign":"vert. Ausr.","schemas.text.lineHeight":"Zeilenhöhe","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Anpassen","schemas.text.dynamicFontSize":"Dynamische Schriftgröße","schemas.barcodes.barColor":"Strichcodefarbe","schemas.barcodes.includetext":"Text anzeigen","schemas.table.alternateBackgroundColor":"Wechselnde Hintergrundfarbe","schemas.table.tableStyle":"Tabellenstil","schemas.table.headStyle":"Kopfzeilenstil","schemas.table.bodyStyle":"Körperstil","schemas.table.columnStyle":"Spaltenstil"},dictEs={cancel:"Cancelar",field:"campo",fieldName:"Nombre",align:"Alinear",width:"Anchura",height:"Altura",opacity:"Opacidad",rotate:"Rotar",edit:"Editar",plsInputName:"Introduce el nombre",fieldMustUniq:"El nombre del campo no es único",notUniq:"(Nombre no único)",noKeyName:"Sin nombre",fieldsList:"Lista de campos",editField:"Editar campo",type:"Tipo",errorOccurred:"Ocurrió un error",errorBulkUpdateFieldName:"No se puede confirmar el cambio porque el número de elementos ha cambiado.",commitBulkUpdateFieldName:"Confirmar cambios",bulkUpdateFieldName:"Actualizar en bloque el nombre de los campos",addPageAfter:"Insertar página",removePage:"Eliminar página actual",removePageConfirm:"¿Estás seguro de que quieres eliminar esta página? Esta acción no se puede deshacer.",hexColorPrompt:"Introduce un código de color hexadecimal válido.","schemas.color":"Color","schemas.borderWidth":"Ancho del borde","schemas.borderColor":"Color del borde","schemas.backgroundColor":"Color de fondo","schemas.textColor":"Color del texto","schemas.bgColor":"Color del fondo","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Izquierda","schemas.center":"Centro","schemas.right":"Derecha","schemas.top":"Arriba","schemas.middle":"Medio","schemas.bottom":"Abajo","schemas.padding":"Relleno","schemas.text.fontName":"Nombre de la fuente","schemas.text.size":"Tamaño","schemas.text.spacing":"Espaciado","schemas.text.textAlign":"Alineación del texto","schemas.text.verticalAlign":"Alineación vertical","schemas.text.lineHeight":"Altura de línea","schemas.text.min":"Mín","schemas.text.max":"Máx","schemas.text.fit":"Ajustar","schemas.text.dynamicFontSize":"Tamaño de fuente dinámico","schemas.barcodes.barColor":"Color de la barra","schemas.barcodes.includetext":"Incluir texto","schemas.table.alternateBackgroundColor":"Color de fondo alternativo","schemas.table.tableStyle":"Estilo de tabla","schemas.table.headStyle":"Estilo de cabecera","schemas.table.bodyStyle":"Estilo de cuerpo","schemas.table.columnStyle":"Estilo de columna"},dictFr={cancel:"Annuler",field:"Champ",fieldName:"Nom",align:"Aligner",width:"Largeur",height:"Hauteur",opacity:"Opacité",rotate:"Rotation",edit:"Éditer",plsInputName:"Veuillez saisir le nom",fieldMustUniq:"Le nom du champ n'est pas unique",notUniq:"(Nombre non unique)",noKeyName:"Pas de nom",fieldsList:"Liste des champs",editField:"Éditer le champ",type:"Type",errorOccurred:" Une erreur est survenue",errorBulkUpdateFieldName:"Impossible de confirmer le changement car le nombre d'éléments a changé.",commitBulkUpdateFieldName:"Confirmer les changements",bulkUpdateFieldName:"Modifier les noms de champs en masse",addPageAfter:"Ajouter une page après",removePage:"Supprimer la page actuelle",removePageConfirm:"Êtes-vous sûr de vouloir supprimer cette page ? Cette action est irréversible.",hexColorPrompt:"Veuillez entrer un code couleur hexadécimal valide.","schemas.color":"Couleur","schemas.borderWidth":"Largeur de la bordure","schemas.borderColor":"Couleur de la bordure","schemas.backgroundColor":"Couleur de fond","schemas.textColor":"Couleur du texte","schemas.bgColor":"Couleur de fond","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Gauche","schemas.center":"Centre","schemas.right":"Droite","schemas.top":"Haut","schemas.middle":"Milieu","schemas.bottom":"Bas","schemas.padding":"Zone de remplissage","schemas.text.fontName":"Nom de la police","schemas.text.size":"Taille","schemas.text.spacing":"Espacement","schemas.text.textAlign":"Alignement du texte","schemas.text.verticalAlign":"Alignement vertical","schemas.text.lineHeight":"Hauteur de ligne","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Ajustement","schemas.text.dynamicFontSize":"Taille de police dynamique","schemas.barcodes.barColor":"Couleur de la barre","schemas.barcodes.includetext":"Inclure le texte","schemas.table.alternateBackgroundColor":"Couleur de fond alternative","schemas.table.tableStyle":"Style de tableau","schemas.table.headStyle":"Style d'en-tête","schemas.table.bodyStyle":"Style de corps","schemas.table.columnStyle":"Style de colonne"},dictionaries={en:dictEn,zh:dictZh,ja:dictJa,ko:dictKo,ar:dictAr,th:dictTh,it:dictIt,pl:dictPl,de:dictDe,es:dictEs,fr:dictFr},getDict=a=>dictionaries[a]||dictionaries[DEFAULT_LANG],i18n=(a,s)=>(s||getDict(DEFAULT_LANG))[a],I18nContext=reactExports.createContext(i18n),FontContext=reactExports.createContext(getDefaultFont()),PluginsRegistry=reactExports.createContext(builtInPlugins),OptionsContext=reactExports.createContext({});function arrayMove(a,s,$){const _=a.slice();return _.splice($<0?_.length+$:$,0,_.splice(s,1)[0]),_}function getSortedRects(a,s){return a.reduce(($,_,_e)=>{const tt=s.get(_);return tt&&($[_e]=tt),$},Array(a.length))}function isValidIndex(a){return a!==null&&a>=0}function itemsEqual(a,s){if(a===s)return!0;if(a.length!==s.length)return!1;for(let $=0;$<a.length;$++)if(a[$]!==s[$])return!1;return!0}function normalizeDisabled(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const rectSortingStrategy=a=>{let{rects:s,activeIndex:$,overIndex:_,index:_e}=a;const tt=arrayMove(s,_,$),nt=s[_e],at=tt[_e];return!at||!nt?null:{x:at.left-nt.left,y:at.top-nt.top,scaleX:at.width/nt.width,scaleY:at.height/nt.height}},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=a=>{var s;let{activeIndex:$,activeNodeRect:_,index:_e,rects:tt,overIndex:nt}=a;const at=(s=tt[$])!=null?s:_;if(!at)return null;if(_e===$){const rt=tt[nt];return rt?{x:0,y:$<nt?rt.top+rt.height-(at.top+at.height):rt.top-at.top,...defaultScale$1}:null}const ot=getItemGap$1(tt,_e,$);return _e>$&&_e<=nt?{x:0,y:-at.height-ot,...defaultScale$1}:_e<$&&_e>=nt?{x:0,y:at.height+ot,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};function getItemGap$1(a,s,$){const _=a[s],_e=a[s-1],tt=a[s+1];return _?$<s?_e?_.top-(_e.top+_e.height):tt?tt.top-(_.top+_.height):0:tt?tt.top-(_.top+_.height):_e?_.top-(_e.top+_e.height):0:0}const ID_PREFIX="Sortable",Context$1=React$a.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(a){let{children:s,id:$,items:_,strategy:_e=rectSortingStrategy,disabled:tt=!1}=a;const{active:nt,dragOverlay:at,droppableRects:ot,over:rt,measureDroppableContainers:st}=useDndContext(),lt=useUniqueId(ID_PREFIX,$),et=at.rect!==null,it=reactExports.useMemo(()=>_.map(vt=>typeof vt=="object"&&"id"in vt?vt.id:vt),[_]),ut=nt!=null,ft=nt?it.indexOf(nt.id):-1,ht=rt?it.indexOf(rt.id):-1,dt=reactExports.useRef(it),gt=!itemsEqual(it,dt.current),pt=ht!==-1&&ft===-1||gt,mt=normalizeDisabled(tt);useIsomorphicLayoutEffect$1(()=>{gt&&ut&&st(it)},[gt,it,ut,st]),reactExports.useEffect(()=>{dt.current=it},[it]);const ct=reactExports.useMemo(()=>({activeIndex:ft,containerId:lt,disabled:mt,disableTransforms:pt,items:it,overIndex:ht,useDragOverlay:et,sortedRects:getSortedRects(it,ot),strategy:_e}),[ft,lt,mt.draggable,mt.droppable,pt,it,ht,ot,et,_e]);return React$a.createElement(Context$1.Provider,{value:ct},s)}const defaultNewIndexGetter=a=>{let{id:s,items:$,activeIndex:_,overIndex:_e}=a;return arrayMove($,_,_e).indexOf(s)},defaultAnimateLayoutChanges=a=>{let{containerId:s,isSorting:$,wasDragging:_,index:_e,items:tt,newIndex:nt,previousItems:at,previousContainerId:ot,transition:rt}=a;return!rt||!_||at!==tt&&_e===nt?!1:$?!0:nt!==_e&&s===ot},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=CSS$1.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useDerivedTransform(a){let{disabled:s,index:$,node:_,rect:_e}=a;const[tt,nt]=reactExports.useState(null),at=reactExports.useRef($);return useIsomorphicLayoutEffect$1(()=>{if(!s&&$!==at.current&&_.current){const ot=_e.current;if(ot){const rt=getClientRect$1(_.current,{ignoreTransform:!0}),st={x:ot.left-rt.left,y:ot.top-rt.top,scaleX:ot.width/rt.width,scaleY:ot.height/rt.height};(st.x||st.y)&&nt(st)}}$!==at.current&&(at.current=$)},[s,$,_,_e]),reactExports.useEffect(()=>{tt&&nt(null)},[tt]),tt}function useSortable(a){let{animateLayoutChanges:s=defaultAnimateLayoutChanges,attributes:$,disabled:_,data:_e,getNewIndex:tt=defaultNewIndexGetter,id:nt,strategy:at,resizeObserverConfig:ot,transition:rt=defaultTransition}=a;const{items:st,containerId:lt,activeIndex:et,disabled:it,disableTransforms:ut,sortedRects:ft,overIndex:ht,useDragOverlay:dt,strategy:gt}=reactExports.useContext(Context$1),pt=normalizeLocalDisabled(_,it),mt=st.indexOf(nt),ct=reactExports.useMemo(()=>({sortable:{containerId:lt,index:mt,items:st},..._e}),[lt,_e,mt,st]),vt=reactExports.useMemo(()=>st.slice(st.indexOf(nt)),[st,nt]),{rect:At,node:xt,isOver:bt,setNodeRef:Et}=useDroppable({id:nt,data:ct,disabled:pt.droppable,resizeObserverConfig:{updateMeasurementsFor:vt,...ot}}),{active:St,activatorEvent:Bt,activeNodeRect:Ot,attributes:Tt,setNodeRef:wt,listeners:Ct,isDragging:It,over:yt,setActivatorNodeRef:Rt,transform:kt}=useDraggable({id:nt,data:ct,attributes:{...defaultAttributes,...$},disabled:pt.draggable}),jt=useCombinedRefs(Et,wt),Ht=!!St,Ft=Ht&&!ut&&isValidIndex(et)&&isValidIndex(ht),_t=!dt&&It,Nt=_t&&Ft?kt:null,Lt=Ft?Nt??(at??gt)({rects:ft,activeNodeRect:Ot,activeIndex:et,overIndex:ht,index:mt}):null,$t=isValidIndex(et)&&isValidIndex(ht)?tt({id:nt,items:st,activeIndex:et,overIndex:ht}):mt,Pt=St==null?void 0:St.id,Dt=reactExports.useRef({activeId:Pt,items:st,newIndex:$t,containerId:lt}),Ut=st!==Dt.current.items,Vt=s({active:St,containerId:lt,isDragging:It,isSorting:Ht,id:nt,index:mt,items:st,newIndex:Dt.current.newIndex,previousItems:Dt.current.items,previousContainerId:Dt.current.containerId,transition:rt,wasDragging:Dt.current.activeId!=null}),Qt=useDerivedTransform({disabled:!Vt,index:mt,node:xt,rect:At});return reactExports.useEffect(()=>{Ht&&Dt.current.newIndex!==$t&&(Dt.current.newIndex=$t),lt!==Dt.current.containerId&&(Dt.current.containerId=lt),st!==Dt.current.items&&(Dt.current.items=st)},[Ht,$t,lt,st]),reactExports.useEffect(()=>{if(Pt===Dt.current.activeId)return;if(Pt&&!Dt.current.activeId){Dt.current.activeId=Pt;return}const Zt=setTimeout(()=>{Dt.current.activeId=Pt},50);return()=>clearTimeout(Zt)},[Pt]),{active:St,activeIndex:et,attributes:Tt,data:ct,rect:At,index:mt,newIndex:$t,items:st,isOver:bt,isSorting:Ht,isDragging:It,listeners:Ct,node:xt,overIndex:ht,over:yt,setNodeRef:jt,setActivatorNodeRef:Rt,setDroppableNodeRef:Et,setDraggableNodeRef:wt,transform:Qt??Lt,transition:qt()};function qt(){if(Qt||Ut&&Dt.current.newIndex===mt)return disabledTransition;if(!(_t&&!isKeyboardEvent(Bt)||!rt)&&(Ht||Vt))return CSS$1.Transition.toString({...rt,property:transitionProperty})}}function normalizeLocalDisabled(a,s){var $,_;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:($=a==null?void 0:a.draggable)!=null?$:s.draggable,droppable:(_=a==null?void 0:a.droppable)!=null?_:s.droppable}}function hasSortableData(a){if(!a)return!1;const s=a.data.current;return!!(s&&"sortable"in s&&typeof s.sortable=="object"&&"containerId"in s.sortable&&"items"in s.sortable&&"index"in s.sortable)}const directions=[KeyboardCode.Down,KeyboardCode.Right,KeyboardCode.Up,KeyboardCode.Left],sortableKeyboardCoordinates=(a,s)=>{let{context:{active:$,collisionRect:_,droppableRects:_e,droppableContainers:tt,over:nt,scrollableAncestors:at}}=s;if(directions.includes(a.code)){if(a.preventDefault(),!$||!_)return;const ot=[];tt.getEnabled().forEach(lt=>{if(!lt||lt!=null&<.disabled)return;const et=_e.get(lt.id);if(et)switch(a.code){case KeyboardCode.Down:_.top<et.top&&ot.push(lt);break;case KeyboardCode.Up:_.top>et.top&&ot.push(lt);break;case KeyboardCode.Left:_.left>et.left&&ot.push(lt);break;case KeyboardCode.Right:_.left<et.left&&ot.push(lt);break}});const rt=closestCorners({active:$,collisionRect:_,droppableRects:_e,droppableContainers:ot,pointerCoordinates:null});let st=getFirstCollision(rt,"id");if(st===(nt==null?void 0:nt.id)&&rt.length>1&&(st=rt[1].id),st!=null){const lt=tt.get($.id),et=tt.get(st),it=et?_e.get(et.id):null,ut=et==null?void 0:et.node.current;if(ut&&it&<&&et){const ht=getScrollableAncestors(ut).some((vt,At)=>at[At]!==vt),dt=isSameContainer(lt,et),gt=isAfter(lt,et),pt=ht||!dt?{x:0,y:0}:{x:gt?_.width-it.width:0,y:gt?_.height-it.height:0},mt={x:it.left,y:it.top};return pt.x&&pt.y?mt:subtract(mt,pt)}}}};function isSameContainer(a,s){return!hasSortableData(a)||!hasSortableData(s)?!1:a.data.current.sortable.containerId===s.data.current.sortable.containerId}function isAfter(a,s){return!hasSortableData(a)||!hasSortableData(s)||!isSameContainer(a,s)?!1:a.data.current.sortable.index<s.data.current.sortable.index}const{Text:Text$4}=Typography$1,Item=React$a.memo(React$a.forwardRef(({value:a,status:s,title:$,style:_,dragOverlay:_e,onClick:tt,onMouseEnter:nt,onMouseLeave:at,dragging:ot,fadeIn:rt,listeners:st,sorting:lt,transition:et,transform:it,...ut},ft)=>{const ht=reactExports.useContext(I18nContext);reactExports.useEffect(()=>{if(_e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[_e]);const{x:dt,y:gt,scaleX:pt,scaleY:mt}=it||{x:0,y:0,scaleX:1,scaleY:1};return jsxRuntimeExports.jsx("li",{style:{marginTop:10,transition:et,transform:`translate(${dt}px, ${gt}px) scale(${pt}, ${mt})`},onMouseEnter:nt,onMouseLeave:at,ref:ft,children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",..._},...ut,onClick:()=>tt&&tt(),children:[jsxRuntimeExports.jsx(Button$2,{...st,style:{display:"flex",alignItems:"center",background:"none",boxShadow:"none",border:"none",paddingLeft:"0.25rem"},icon:jsxRuntimeExports.jsx(HolderOutlined$1,{style:{cursor:"grab"}})}),jsxRuntimeExports.jsx(Text$4,{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},title:$||"",children:s===void 0?a:jsxRuntimeExports.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(ExclamationCircleOutlined$1,{width:15,style:{marginRight:"0.5rem"}}),s==="is-warning"?ht("noKeyName"):a,s==="is-danger"?ht("notUniq"):""]})})]})})})),Item$1=Item,usePrevious=a=>{const s=reactExports.useRef(null);return reactExports.useEffect(()=>{s.current=a}),s.current},getScale=(a,s)=>Math.floor((a/s>1?1:a/s)*100)/100,useUIPreProcessor=({template:a,size:s,zoomLevel:$})=>{const[_,_e]=reactExports.useState([]),[tt,nt]=reactExports.useState([]),[at,ot]=reactExports.useState(0),[rt,st]=reactExports.useState(null),lt=async et=>{const{template:{basePdf:it,schemas:ut},size:ft}=et;let ht,dt,gt,pt;if(isBlankPdf(it)){const{width:ct,height:vt}=it;ht=ct*ZOOM,dt=vt*ZOOM,gt=ut.map(()=>"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII="),pt=ut.map(()=>({width:ct,height:vt}))}else{const ct=await getB64BasePdf(it),vt=b64toBlob(ct);pt=await getPdfPageSizes(vt),ht=pt[0].width*ZOOM,dt=pt[0].height*ZOOM,gt=await pdf2Pngs(vt,ht)}const mt=Math.min(getScale(ft.width,ht),getScale(ft.height-RULER_HEIGHT,dt));return{backgrounds:gt,pageSizes:pt,scale:mt}};return reactExports.useEffect(()=>{lt({template:a,size:s}).then(({pageSizes:et,scale:it,backgrounds:ut})=>{nt(et),ot(it),_e(ut)}).catch(et=>{st(et),console.error(`[@pdfme/ui] ${et}`)})},[a,s]),{backgrounds:_,pageSizes:tt,scale:at*$,error:rt,refresh:et=>lt({template:et,size:s}).then(({pageSizes:it,scale:ut,backgrounds:ft})=>{nt(it),ot(ut),_e(ft)})}},useScrollPageCursor=({ref:a,pageSizes:s,scale:$,pageCursor:_,onChangePageCursor:_e})=>{const tt=reactExports.useCallback(()=>{if(!s[0]||!a.current)return;const nt=a.current.scrollTop,{top:at}=a.current.getBoundingClientRect(),ot=s.reduce((st,lt,et)=>{let it=(lt.height*ZOOM+RULER_HEIGHT)*$;return et===0?it+=at-it/2:it+=st[et-1],st.concat(it)},[]);let rt=0;ot.forEach((st,lt)=>{nt>st&&(rt=lt+1>=ot.length?ot.length-1:lt+1)}),rt!==_&&_e(rt)},[_e,_,s,a,$]);reactExports.useEffect(()=>{var nt;return(nt=a.current)==null||nt.addEventListener("scroll",tt),()=>{var at;(at=a.current)==null||at.removeEventListener("scroll",tt)}},[a,tt])},useMountStatus=()=>{const[a,s]=reactExports.useState(!1);return reactExports.useEffect(()=>{const $=setTimeout(()=>s(!0),500);return()=>clearTimeout($)},[]),a},useInitEvents=({pageCursor:a,pageSizes:s,activeElements:$,template:_,schemasList:_e,changeSchemas:tt,commitSchemas:nt,removeSchemas:at,onSaveTemplate:ot,past:rt,future:st,setSchemasList:lt,onEdit:et,onEditEnd:it})=>{const ut=reactExports.useRef(null),ft=reactExports.useCallback(()=>{const dt=()=>{const pt=$.map(mt=>mt.id);return _e[a].filter(mt=>pt.includes(mt.id))},gt=pt=>{const mt=pt==="undo",ct=mt?rt:st;if(ct.current.length<=0)return;(mt?st:rt).current.push(cloneDeep$2(_e[a]));const vt=cloneDeep$2(_e);vt[a]=ct.current.pop(),lt(vt)};initShortCuts({move:(pt,mt)=>{const ct=s[a],vt=dt(),At=moveCommandToChangeSchemasArg({command:pt,activeSchemas:vt,pageSize:ct,isShift:mt});tt(At)},copy:()=>{const pt=dt();pt.length!==0&&(ut.current=pt)},paste:()=>{if(!ut.current||ut.current.length===0)return;const pt=_e[a],mt=[],ct=ut.current.map(vt=>{const At=uuid$6(),xt=getUniqSchemaKey({copiedSchemaKey:vt.key,schema:pt,stackUniqSchemaKeys:mt}),{height:bt,width:Et,position:St}=vt,Bt=s[a],Ot={x:St.x+10>Bt.width-Et?Bt.width-Et:St.x+10,y:St.y+10>Bt.height-bt?Bt.height-bt:St.y+10};return Object.assign(cloneDeep$2(vt),{id:At,key:xt,position:Ot})});nt(_e[a].concat(ct)),et(ct.map(vt=>document.getElementById(vt.id))),ut.current=ct},redo:()=>gt("redo"),undo:()=>gt("undo"),save:()=>ot&&ot(schemasList2template(_e,_.basePdf)),remove:()=>at(dt().map(pt=>pt.id)),esc:it,selectAll:()=>et(_e[a].map(pt=>document.getElementById(pt.id)))})},[_,$,a,s,tt,nt,_e,ot,at,rt,st,lt,ut,et,it]),ht=reactExports.useCallback(()=>{destroyShortCuts()},[]);reactExports.useEffect(()=>(ft(),ht),[ft,ht])},SelectableSortableItem=({isSelected:a,style:s,onSelect:$,onEdit:_,schema:_e,schemas:tt,onMouseEnter:nt,onMouseLeave:at})=>{const{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),{setNodeRef:st,listeners:lt,isDragging:et,isSorting:it,transform:ut,transition:ft}=useSortable({id:_e.id}),ht=useMountStatus(),dt=et&&!ht,gt={...lt,onClick:vt=>$(_e.id,vt.shiftKey)};let pt;_e.key?tt.find(vt=>_e.key&&vt.key===_e.key&&vt.id!==_e.id)&&(pt="is-danger"):pt="is-warning";let mt=rt("edit");pt==="is-warning"?mt=rt("plsInputName"):pt==="is-danger"&&(mt=rt("fieldMustUniq"));const ct=a?{background:ot.colorPrimary,opacity:it||et?.5:1}:{};return jsxRuntimeExports.jsx(Item$1,{ref:st,onMouseEnter:nt,onMouseLeave:at,onClick:()=>_(_e.id),value:_e.key,status:pt,title:mt,style:{...ct,...s},dragging:et,sorting:it,transition:ft,transform:ut,fadeIn:dt,listeners:gt})},SelectableSortableItem$1=SelectableSortableItem,SelectableSortableContainer=a=>{const{token:s}=theme.useToken(),{schemas:$,onEdit:_,onSortEnd:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt}=a,[at,ot]=reactExports.useState([]),[rt,st]=reactExports.useState(null),[lt,et]=reactExports.useState(null),it=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:15}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),ut=ht=>at.map(dt=>dt.id).includes(ht),ft=(ht,dt)=>{if(dt)if(ut(ht)){const gt=at.filter(pt=>pt.id!==ht);ot(gt)}else{const gt=$.find(mt=>mt.id===ht),pt=at.concat(gt);ot(pt)}else ot([])};return jsxRuntimeExports.jsx(DndContext,{sensors:it,collisionDetection:closestCorners,onDragStart:({active:ht})=>{et(String(ht.id)),st($),ut(String(ht.id))?at.length>0&&_e(at.reduce((dt,gt)=>gt.id===String(ht.id)?dt:dt.filter(pt=>pt!==gt),$)):ot([])},onDragEnd:({active:ht,over:dt})=>{const gt=(dt==null?void 0:dt.id)||"",pt=$.map(ct=>ct.id).indexOf(String(ht.id)),mt=$.map(ct=>ct.id).indexOf(String(gt));if(at.length){let ct=[...$];ct=arrayMove(ct,pt,mt),ct.splice(mt+1,0,...at.filter(vt=>vt.id!==lt)),_e(ct),ot([])}else pt!==mt&&_e(arrayMove($,pt,mt));et(null)},onDragCancel:()=>{rt&&_e(rt),et(null),st(null)},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{style:{height:"100%",overflowY:"auto"},children:jsxRuntimeExports.jsx(SortableContext,{items:$,strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",borderRadius:5},children:$.map(ht=>jsxRuntimeExports.jsx(SelectableSortableItem$1,{style:{border:`1px solid ${ht.id===tt?s.colorPrimary:"transparent"}`},schema:ht,schemas:$,isSelected:ut(ht.id)||lt===ht.id,onEdit:_,onSelect:ft,onMouseEnter:()=>nt(ht.id),onMouseLeave:()=>nt(null)},ht.id))})})}),reactDomExports.createPortal(jsxRuntimeExports.jsx(DragOverlay,{adjustScale:!0,children:lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:jsxRuntimeExports.jsx(Item$1,{value:$.find(ht=>ht.id===lt).key,style:{background:s.colorPrimary},dragOverlay:!0})}),jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:at.filter(ht=>ht.id!==lt).map(ht=>jsxRuntimeExports.jsx(Item$1,{value:ht.key,style:{background:s.colorPrimary},dragOverlay:!0},ht.id))})]}):null}),document.body)]})})},SelectableSortableContainer$1=SelectableSortableContainer,{Text:Text$3}=Typography$1,{TextArea:TextArea$2}=_Input,headHeight=40,ListView=a=>{const{schemas:s,onSortEnd:$,onEdit:_,size:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,changeSchemas:at}=a,{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),[st,lt]=reactExports.useState(!1),[et,it]=reactExports.useState(""),ut=getSidebarContentHeight(_e.height),ft=()=>{const dt=et.split(`
|
589
|
+
`]:{zIndex:10,width:_,margin:`0 ${unit$1(a.marginXXS)}`,fontSize:_,cursor:"pointer",transition:`all ${a.motionDurationSlow}`,color:_e,"&:hover":{color:_e},svg:{verticalAlign:"baseline"}}},[`${at}-thumbnail, ${at}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${at}-name`]:{display:"none",textAlign:"center"},[`${at}-file + ${at}-name`]:{position:"absolute",bottom:a.margin,display:"block",width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`},[`${at}-uploading`]:{[`&${at}`]:{backgroundColor:a.colorFillAlter},[`&::before, ${$}-eye, ${$}-download, ${$}-delete`]:{display:"none"}},[`${at}-progress`]:{bottom:a.marginXL,width:`calc(100% - ${unit$1(tt(a.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${s}-wrapper${s}-picture-circle-wrapper`]:{[`${s}${s}-select`]:{borderRadius:"50%"}}}},genRtlStyle=a=>{const{componentCls:s}=a;return{[`${s}-rtl`]:{direction:"rtl"}}},genRtlStyle$1=genRtlStyle,genBaseStyle=a=>{const{componentCls:s,colorTextDisabled:$}=a;return{[`${s}-wrapper`]:Object.assign(Object.assign({},resetComponent(a)),{[s]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${s}-select`]:{display:"inline-block"},[`${s}-disabled`]:{color:$,cursor:"not-allowed"}})}},prepareComponentToken=a=>({actionsColor:a.colorTextDescription}),useStyle=genStyleHooks("Upload",a=>{const{fontSizeHeading3:s,fontHeight:$,lineWidth:_,controlHeightLG:_e,calc:tt}=a,nt=merge(a,{uploadThumbnailSize:tt(s).mul(2).equal(),uploadProgressOffset:tt(tt($).div(2)).add(_).equal(),uploadPicCardSize:tt(_e).mul(2.55).equal()});return[genBaseStyle(nt),genDraggerStyle$1(nt),genPictureStyle(nt),genPictureCardStyle(nt),genListStyle$1(nt),genMotionStyle$1(nt),genRtlStyle$1(nt),genCollapseMotion$1(nt)]},prepareComponentToken);var FileTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:$}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:s}}]}},name:"file",theme:"twotone"};const FileTwoToneSvg=FileTwoTone$2;var FileTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:FileTwoToneSvg}))};const FileTwoTone$1=reactExports.forwardRef(FileTwoTone);var PaperClipOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const PaperClipOutlinedSvg=PaperClipOutlined$2;var PaperClipOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PaperClipOutlinedSvg}))};const PaperClipOutlined$1=reactExports.forwardRef(PaperClipOutlined);var PictureTwoTone$2={icon:function a(s,$){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:s}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:$}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:$}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:$}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:s}}]}},name:"picture",theme:"twotone"};const PictureTwoToneSvg=PictureTwoTone$2;var PictureTwoTone=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:PictureTwoToneSvg}))};const PictureTwoTone$1=reactExports.forwardRef(PictureTwoTone);function file2Obj(a){return Object.assign(Object.assign({},a),{lastModified:a.lastModified,lastModifiedDate:a.lastModifiedDate,name:a.name,size:a.size,type:a.type,uid:a.uid,percent:0,originFileObj:a})}function updateFileList(a,s){const $=_toConsumableArray$d(s),_=$.findIndex(_e=>{let{uid:tt}=_e;return tt===a.uid});return _===-1?$.push(a):$[_]=a,$}function getFileItem(a,s){const $=a.uid!==void 0?"uid":"name";return s.filter(_=>_[$]===a[$])[0]}function removeFileItem(a,s){const $=a.uid!==void 0?"uid":"name",_=s.filter(_e=>_e[$]!==a[$]);return _.length===s.length?null:_}const extname=function(){const s=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),_=s[s.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(_)||[""])[0]},isImageFileType=a=>a.indexOf("image/")===0,isImageUrl=a=>{if(a.type&&!a.thumbUrl)return isImageFileType(a.type);const s=a.thumbUrl||a.url||"",$=extname(s);return/^data:image\//.test(s)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test($)?!0:!(/^data:/.test(s)||$)},MEASURE_SIZE=200;function previewImage(a){return new Promise(s=>{if(!a.type||!isImageFileType(a.type)){s("");return}const $=document.createElement("canvas");$.width=MEASURE_SIZE,$.height=MEASURE_SIZE,$.style.cssText=`position: fixed; left: 0; top: 0; width: ${MEASURE_SIZE}px; height: ${MEASURE_SIZE}px; z-index: 9999; display: none;`,document.body.appendChild($);const _=$.getContext("2d"),_e=new Image;if(_e.onload=()=>{const{width:tt,height:nt}=_e;let at=MEASURE_SIZE,ot=MEASURE_SIZE,rt=0,st=0;tt>nt?(ot=nt*(MEASURE_SIZE/tt),st=-(ot-at)/2):(at=tt*(MEASURE_SIZE/nt),rt=-(at-ot)/2),_.drawImage(_e,rt,st,at,ot);const lt=$.toDataURL();document.body.removeChild($),window.URL.revokeObjectURL(_e.src),s(lt)},_e.crossOrigin="anonymous",a.type.startsWith("image/svg+xml")){const tt=new FileReader;tt.onload=()=>{tt.result&&(_e.src=tt.result)},tt.readAsDataURL(a)}else if(a.type.startsWith("image/gif")){const tt=new FileReader;tt.onload=()=>{tt.result&&s(tt.result)},tt.readAsDataURL(a)}else _e.src=window.URL.createObjectURL(a)})}var DownloadOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const DownloadOutlinedSvg=DownloadOutlined$2;var DownloadOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:DownloadOutlinedSvg}))};const DownloadOutlined$1=reactExports.forwardRef(DownloadOutlined),ListItem=reactExports.forwardRef((a,s)=>{let{prefixCls:$,className:_,style:_e,locale:tt,listType:nt,file:at,items:ot,progress:rt,iconRender:st,actionIconRender:lt,itemRender:et,isImgUrl:it,showPreviewIcon:ut,showRemoveIcon:ft,showDownloadIcon:ht,previewIcon:dt,removeIcon:gt,downloadIcon:pt,onPreview:mt,onDownload:ct,onClose:vt}=a;var At,xt;const{status:bt}=at,[Et,St]=reactExports.useState(bt);reactExports.useEffect(()=>{bt!=="removed"&&St(bt)},[bt]);const[Bt,Ot]=reactExports.useState(!1);reactExports.useEffect(()=>{const Dt=setTimeout(()=>{Ot(!0)},300);return()=>{clearTimeout(Dt)}},[]);const Tt=st(at);let wt=reactExports.createElement("div",{className:`${$}-icon`},Tt);if(nt==="picture"||nt==="picture-card"||nt==="picture-circle")if(Et==="uploading"||!at.thumbUrl&&!at.url){const Dt=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:Et!=="uploading"});wt=reactExports.createElement("div",{className:Dt},Tt)}else{const Dt=it!=null&&it(at)?reactExports.createElement("img",{src:at.thumbUrl||at.url,alt:at.name,className:`${$}-list-item-image`,crossOrigin:at.crossOrigin}):Tt,Ut=classnames(`${$}-list-item-thumbnail`,{[`${$}-list-item-file`]:it&&!it(at)});wt=reactExports.createElement("a",{className:Ut,onClick:Vt=>mt(at,Vt),href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Dt)}const Ct=classnames(`${$}-list-item`,`${$}-list-item-${Et}`),It=typeof at.linkProps=="string"?JSON.parse(at.linkProps):at.linkProps,yt=ft?lt((typeof gt=="function"?gt(at):gt)||reactExports.createElement(DeleteOutlined$1,null),()=>vt(at),$,tt.removeFile,!0):null,Rt=ht&&Et==="done"?lt((typeof pt=="function"?pt(at):pt)||reactExports.createElement(DownloadOutlined$1,null),()=>ct(at),$,tt.downloadFile):null,kt=nt!=="picture-card"&&nt!=="picture-circle"&&reactExports.createElement("span",{key:"download-delete",className:classnames(`${$}-list-item-actions`,{picture:nt==="picture"})},Rt,yt),jt=classnames(`${$}-list-item-name`),Ht=at.url?[reactExports.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:jt,title:at.name},It,{href:at.url,onClick:Dt=>mt(at,Dt)}),at.name),kt]:[reactExports.createElement("span",{key:"view",className:jt,onClick:Dt=>mt(at,Dt),title:at.name},at.name),kt],Ft=ut&&(at.url||at.thumbUrl)?reactExports.createElement("a",{href:at.url||at.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Dt=>mt(at,Dt),title:tt.previewFile},typeof dt=="function"?dt(at):dt||reactExports.createElement(EyeOutlined$1,null)):null,_t=(nt==="picture-card"||nt==="picture-circle")&&Et!=="uploading"&&reactExports.createElement("span",{className:`${$}-list-item-actions`},Ft,Et==="done"&&Rt,yt),{getPrefixCls:Nt}=reactExports.useContext(ConfigContext$1),Mt=Nt(),Lt=reactExports.createElement("div",{className:Ct},wt,Ht,_t,Bt&&reactExports.createElement(CSSMotion,{motionName:`${Mt}-fade`,visible:Et==="uploading",motionDeadline:2e3},Dt=>{let{className:Ut}=Dt;const Vt="percent"in at?reactExports.createElement(Progress$1,Object.assign({},rt,{type:"line",percent:at.percent,"aria-label":at["aria-label"],"aria-labelledby":at["aria-labelledby"]})):null;return reactExports.createElement("div",{className:classnames(`${$}-list-item-progress`,Ut)},Vt)})),$t=at.response&&typeof at.response=="string"?at.response:((At=at.error)===null||At===void 0?void 0:At.statusText)||((xt=at.error)===null||xt===void 0?void 0:xt.message)||tt.uploadError,Pt=Et==="error"?reactExports.createElement(_Tooltip,{title:$t,getPopupContainer:Dt=>Dt.parentNode},Lt):Lt;return reactExports.createElement("div",{className:classnames(`${$}-list-item-container`,_),style:_e,ref:s},et?et(Pt,at,ot,{download:ct.bind(null,at),preview:mt.bind(null,at),remove:vt.bind(null,at)}):Pt)}),ListItem$1=ListItem,InternalUploadList=(a,s)=>{const{listType:$="text",previewFile:_=previewImage,onPreview:_e,onDownload:tt,onRemove:nt,locale:at,iconRender:ot,isImageUrl:rt=isImageUrl,prefixCls:st,items:lt=[],showPreviewIcon:et=!0,showRemoveIcon:it=!0,showDownloadIcon:ut=!1,removeIcon:ft,previewIcon:ht,downloadIcon:dt,progress:gt={size:[-1,2],showInfo:!1},appendAction:pt,appendActionVisible:mt=!0,itemRender:ct,disabled:vt}=a,At=useForceUpdate(),[xt,bt]=reactExports.useState(!1);reactExports.useEffect(()=>{$!=="picture"&&$!=="picture-card"&&$!=="picture-circle"||(lt||[]).forEach(Ft=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(Ft.originFileObj instanceof File||Ft.originFileObj instanceof Blob)||Ft.thumbUrl!==void 0||(Ft.thumbUrl="",_&&_(Ft.originFileObj).then(_t=>{Ft.thumbUrl=_t||"",At()}))})},[$,lt,_]),reactExports.useEffect(()=>{bt(!0)},[]);const Et=(Ft,_t)=>{if(_e)return _t==null||_t.preventDefault(),_e(Ft)},St=Ft=>{typeof tt=="function"?tt(Ft):Ft.url&&window.open(Ft.url)},Bt=Ft=>{nt==null||nt(Ft)},Ot=Ft=>{if(ot)return ot(Ft,$);const _t=Ft.status==="uploading",Nt=rt&&rt(Ft)?reactExports.createElement(PictureTwoTone$1,null):reactExports.createElement(FileTwoTone$1,null);let Mt=_t?reactExports.createElement(LoadingOutlined$1,null):reactExports.createElement(PaperClipOutlined$1,null);return $==="picture"?Mt=_t?reactExports.createElement(LoadingOutlined$1,null):Nt:($==="picture-card"||$==="picture-circle")&&(Mt=_t?at.uploading:Nt),Mt},Tt=(Ft,_t,Nt,Mt,Lt)=>{const $t={type:"text",size:"small",title:Mt,onClick:Pt=>{_t(),isValidElement(Ft)&&Ft.props.onClick&&Ft.props.onClick(Pt)},className:`${Nt}-list-item-action`};if(Lt&&($t.disabled=vt),isValidElement(Ft)){const Pt=cloneElement(Ft,Object.assign(Object.assign({},Ft.props),{onClick:()=>{}}));return reactExports.createElement(Button$2,Object.assign({},$t,{icon:Pt}))}return reactExports.createElement(Button$2,Object.assign({},$t),reactExports.createElement("span",null,Ft))};reactExports.useImperativeHandle(s,()=>({handlePreview:Et,handleDownload:St}));const{getPrefixCls:wt}=reactExports.useContext(ConfigContext$1),Ct=wt("upload",st),It=wt(),yt=classnames(`${Ct}-list`,`${Ct}-list-${$}`),Rt=_toConsumableArray$d(lt.map(Ft=>({key:Ft.uid,file:Ft})));let jt={motionDeadline:2e3,motionName:`${Ct}-${$==="picture-card"||$==="picture-circle"?"animate-inline":"animate"}`,keys:Rt,motionAppear:xt};const Ht=reactExports.useMemo(()=>{const Ft=Object.assign({},initCollapseMotion$1(It));return delete Ft.onAppearEnd,delete Ft.onEnterEnd,delete Ft.onLeaveEnd,Ft},[It]);return $!=="picture-card"&&$!=="picture-circle"&&(jt=Object.assign(Object.assign({},Ht),jt)),reactExports.createElement("div",{className:yt},reactExports.createElement(CSSMotionList,Object.assign({},jt,{component:!1}),Ft=>{let{key:_t,file:Nt,className:Mt,style:Lt}=Ft;return reactExports.createElement(ListItem$1,{key:_t,locale:at,prefixCls:Ct,className:Mt,style:Lt,file:Nt,items:lt,progress:gt,listType:$,isImgUrl:rt,showPreviewIcon:et,showRemoveIcon:it,showDownloadIcon:ut,removeIcon:ft,previewIcon:ht,downloadIcon:dt,iconRender:Ot,actionIconRender:Tt,itemRender:ct,onPreview:Et,onDownload:St,onClose:Bt})}),pt&&reactExports.createElement(CSSMotion,Object.assign({},jt,{visible:mt,forceRender:!0}),Ft=>{let{className:_t,style:Nt}=Ft;return cloneElement(pt,Mt=>({className:classnames(Mt.className,_t),style:Object.assign(Object.assign(Object.assign({},Nt),{pointerEvents:_t?"none":void 0}),Mt.style)}))}))},UploadList=reactExports.forwardRef(InternalUploadList),UploadList$1=UploadList;var __awaiter$1=function(a,s,$,_){function _e(tt){return tt instanceof $?tt:new $(function(nt){nt(tt)})}return new($||($=Promise))(function(tt,nt){function at(st){try{rt(_.next(st))}catch(lt){nt(lt)}}function ot(st){try{rt(_.throw(st))}catch(lt){nt(lt)}}function rt(st){st.done?tt(st.value):_e(st.value).then(at,ot)}rt((_=_.apply(a,s||[])).next())})};const LIST_IGNORE=`__LIST_IGNORE_${Date.now()}__`,InternalUpload=(a,s)=>{const{fileList:$,defaultFileList:_,onRemove:_e,showUploadList:tt=!0,listType:nt="text",onPreview:at,onDownload:ot,onChange:rt,onDrop:st,previewFile:lt,disabled:et,locale:it,iconRender:ut,isImageUrl:ft,progress:ht,prefixCls:dt,className:gt,type:pt="select",children:mt,style:ct,itemRender:vt,maxCount:At,data:xt={},multiple:bt=!1,action:Et="",accept:St="",supportServerRender:Bt=!0,rootClassName:Ot}=a,Tt=reactExports.useContext(DisabledContext$1),wt=et??Tt,[Ct,It]=useMergedState(_||[],{value:$,postState:ur=>ur??[]}),[yt,Rt]=reactExports.useState("drop"),kt=reactExports.useRef(null);reactExports.useMemo(()=>{const ur=Date.now();($||[]).forEach((pr,yr)=>{!pr.uid&&!Object.isFrozen(pr)&&(pr.uid=`__AUTO__${ur}_${yr}__`)})},[$]);const jt=(ur,pr,yr)=>{let Er=_toConsumableArray$d(pr),br=!1;At===1?Er=Er.slice(-1):At&&(br=Er.length>At,Er=Er.slice(0,At)),reactDomExports.flushSync(()=>{It(Er)});const gr={file:ur,fileList:Er};yr&&(gr.event=yr),(!br||Er.some(Ar=>Ar.uid===ur.uid))&&reactDomExports.flushSync(()=>{rt==null||rt(gr)})},Ht=(ur,pr)=>__awaiter$1(void 0,void 0,void 0,function*(){const{beforeUpload:yr,transformFile:Er}=a;let br=ur;if(yr){const gr=yield yr(ur,pr);if(gr===!1)return!1;if(delete ur[LIST_IGNORE],gr===LIST_IGNORE)return Object.defineProperty(ur,LIST_IGNORE,{value:!0,configurable:!0}),!1;typeof gr=="object"&&gr&&(br=gr)}return Er&&(br=yield Er(br)),br}),Ft=ur=>{const pr=ur.filter(br=>!br.file[LIST_IGNORE]);if(!pr.length)return;const yr=pr.map(br=>file2Obj(br.file));let Er=_toConsumableArray$d(Ct);yr.forEach(br=>{Er=updateFileList(br,Er)}),yr.forEach((br,gr)=>{let Ar=br;if(pr[gr].parsedFile)br.status="uploading";else{const{originFileObj:Sr}=br;let Br;try{Br=new File([Sr],Sr.name,{type:Sr.type})}catch{Br=new Blob([Sr],{type:Sr.type}),Br.name=Sr.name,Br.lastModifiedDate=new Date,Br.lastModified=new Date().getTime()}Br.uid=br.uid,Ar=Br}jt(Ar,Er)})},_t=(ur,pr,yr)=>{try{typeof ur=="string"&&(ur=JSON.parse(ur))}catch{}if(!getFileItem(pr,Ct))return;const Er=file2Obj(pr);Er.status="done",Er.percent=100,Er.response=ur,Er.xhr=yr;const br=updateFileList(Er,Ct);jt(Er,br)},Nt=(ur,pr)=>{if(!getFileItem(pr,Ct))return;const yr=file2Obj(pr);yr.status="uploading",yr.percent=ur.percent;const Er=updateFileList(yr,Ct);jt(yr,Er,ur)},Mt=(ur,pr,yr)=>{if(!getFileItem(yr,Ct))return;const Er=file2Obj(yr);Er.error=ur,Er.response=pr,Er.status="error";const br=updateFileList(Er,Ct);jt(Er,br)},Lt=ur=>{let pr;Promise.resolve(typeof _e=="function"?_e(ur):_e).then(yr=>{var Er;if(yr===!1)return;const br=removeFileItem(ur,Ct);br&&(pr=Object.assign(Object.assign({},ur),{status:"removed"}),Ct==null||Ct.forEach(gr=>{const Ar=pr.uid!==void 0?"uid":"name";gr[Ar]===pr[Ar]&&!Object.isFrozen(gr)&&(gr.status="removed")}),(Er=kt.current)===null||Er===void 0||Er.abort(pr),jt(pr,br))})},$t=ur=>{Rt(ur.type),ur.type==="drop"&&(st==null||st(ur))};reactExports.useImperativeHandle(s,()=>({onBatchStart:Ft,onSuccess:_t,onProgress:Nt,onError:Mt,fileList:Ct,upload:kt.current}));const{getPrefixCls:Pt,direction:Dt,upload:Ut}=reactExports.useContext(ConfigContext$1),Vt=Pt("upload",dt),Qt=Object.assign(Object.assign({onBatchStart:Ft,onError:Mt,onProgress:Nt,onSuccess:_t},a),{data:xt,multiple:bt,action:Et,accept:St,supportServerRender:Bt,prefixCls:Vt,disabled:wt,beforeUpload:Ht,onChange:void 0});delete Qt.className,delete Qt.style,(!mt||wt)&&delete Qt.id;const qt=`${Vt}-wrapper`,[Zt,ar,Jt]=useStyle(Vt,qt),[rr]=useLocale$1("Upload",defaultLocale.Upload),{showRemoveIcon:Yt,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr}=typeof tt=="boolean"?{}:tt,cr=typeof Yt>"u"?!wt:!!Yt,or=(ur,pr)=>tt?reactExports.createElement(UploadList$1,{prefixCls:Vt,listType:nt,items:Ct,previewFile:lt,onPreview:at,onDownload:ot,onRemove:Lt,showRemoveIcon:cr,showPreviewIcon:Kt,showDownloadIcon:nr,removeIcon:tr,previewIcon:ir,downloadIcon:sr,iconRender:ut,locale:Object.assign(Object.assign({},rr),it),isImageUrl:ft,progress:ht,appendAction:ur,appendActionVisible:pr,itemRender:vt,disabled:wt}):ur,Xt=classnames(qt,gt,Ot,ar,Jt,Ut==null?void 0:Ut.className,{[`${Vt}-rtl`]:Dt==="rtl",[`${Vt}-picture-card-wrapper`]:nt==="picture-card",[`${Vt}-picture-circle-wrapper`]:nt==="picture-circle"}),Gt=Object.assign(Object.assign({},Ut==null?void 0:Ut.style),ct);if(pt==="drag"){const ur=classnames(ar,Vt,`${Vt}-drag`,{[`${Vt}-drag-uploading`]:Ct.some(pr=>pr.status==="uploading"),[`${Vt}-drag-hover`]:yt==="dragover",[`${Vt}-disabled`]:wt,[`${Vt}-rtl`]:Dt==="rtl"});return Zt(reactExports.createElement("span",{className:Xt},reactExports.createElement("div",{className:ur,style:Gt,onDrop:$t,onDragOver:$t,onDragLeave:$t},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt,className:`${Vt}-btn`}),reactExports.createElement("div",{className:`${Vt}-drag-container`},mt))),or()))}const Wt=classnames(Vt,`${Vt}-select`,{[`${Vt}-disabled`]:wt}),lr=(ur=>reactExports.createElement("div",{className:Wt,style:ur},reactExports.createElement(Upload$2,Object.assign({},Qt,{ref:kt}))))(mt?void 0:{display:"none"});return Zt(nt==="picture-card"||nt==="picture-circle"?reactExports.createElement("span",{className:Xt},or(lr,!!mt)):reactExports.createElement("span",{className:Xt},lr,or()))},Upload$1=reactExports.forwardRef(InternalUpload),InternalUpload$1=Upload$1;var __rest$4=function(a,s){var $={};for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&s.indexOf(_)<0&&($[_]=a[_]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,_=Object.getOwnPropertySymbols(a);_e<_.length;_e++)s.indexOf(_[_e])<0&&Object.prototype.propertyIsEnumerable.call(a,_[_e])&&($[_[_e]]=a[_[_e]]);return $};const Dragger=reactExports.forwardRef((a,s)=>{var{style:$,height:_}=a,_e=__rest$4(a,["style","height"]);return reactExports.createElement(InternalUpload$1,Object.assign({ref:s},_e,{type:"drag",style:Object.assign(Object.assign({},$),{height:_})}))}),Dragger$1=Dragger,Upload=InternalUpload$1;Upload.Dragger=Dragger$1,Upload.LIST_IGNORE=LIST_IGNORE;const _Upload=Upload;var ArrowLeftOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};const ArrowLeftOutlinedSvg=ArrowLeftOutlined$2;var ArrowLeftOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowLeftOutlinedSvg}))};const ArrowLeftOutlined$1=reactExports.forwardRef(ArrowLeftOutlined);var ArrowRightOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const ArrowRightOutlinedSvg=ArrowRightOutlined$2;var ArrowRightOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ArrowRightOutlinedSvg}))};const ArrowRightOutlined$1=reactExports.forwardRef(ArrowRightOutlined);var ExclamationCircleOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const ExclamationCircleOutlinedSvg=ExclamationCircleOutlined$2;var ExclamationCircleOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:ExclamationCircleOutlinedSvg}))};const ExclamationCircleOutlined$1=reactExports.forwardRef(ExclamationCircleOutlined);var MenuOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const MenuOutlinedSvg=MenuOutlined$2;var MenuOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MenuOutlinedSvg}))};const MenuOutlined$1=reactExports.forwardRef(MenuOutlined);var MinusOutlined$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const MinusOutlinedSvg=MinusOutlined$2;var MinusOutlined=function a(s,$){return reactExports.createElement(AntdIcon$1,_extends$2({},s,{ref:$,icon:MinusOutlinedSvg}))};const MinusOutlined$1=reactExports.forwardRef(MinusOutlined),dictEn={cancel:"Cancel",field:"field",fieldName:"Name",align:"Align",width:"Width",height:"Height",opacity:"Opacity",rotate:"Rotate",edit:"Edit",plsInputName:"Please input name",fieldMustUniq:"Name of field is not unique",notUniq:"(Not unique name)",noKeyName:"No name",fieldsList:"Field List",editField:"Edit Field",type:"Type",errorOccurred:"An error occurred",errorBulkUpdateFieldName:"Cannot commit the change because the number of items has been changed.",commitBulkUpdateFieldName:"Commit Changes",bulkUpdateFieldName:"Bulk update field names",addPageAfter:"Add Page After",removePage:"Remove Current Page",removePageConfirm:"Are you sure you want to delete this page? This action cannot be undone.",hexColorPrompt:"Please enter a valid hex color code.","schemas.color":"Color","schemas.borderWidth":"Border Width","schemas.borderColor":"Border Color","schemas.backgroundColor":"Background Color","schemas.textColor":"Text Color","schemas.bgColor":"Background Color","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Left","schemas.center":"Center","schemas.right":"Right","schemas.top":"Top","schemas.middle":"Middle","schemas.bottom":"Bottom","schemas.padding":"Padding","schemas.text.fontName":"Font Name","schemas.text.size":"Size","schemas.text.spacing":"Spacing","schemas.text.textAlign":"Text Align","schemas.text.verticalAlign":"Vertical Align","schemas.text.lineHeight":"Line Height","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Fit","schemas.text.dynamicFontSize":"Dynamic Font Size","schemas.text.format":"Format","schemas.barcodes.barColor":"Bar Color","schemas.barcodes.includetext":"Include Text","schemas.table.alternateBackgroundColor":"Alternate Background Color","schemas.table.tableStyle":"Table Style","schemas.table.headStyle":"Header Style","schemas.table.bodyStyle":"Body Style","schemas.table.columnStyle":"Column Style"},dictZh={cancel:"取消",field:"字段",fieldName:"名称",align:"对齐",width:"宽度",height:"高度",opacity:"透明度",rotate:"旋转",edit:"编辑",plsInputName:"请输入名称",fieldMustUniq:"字段名称必须唯一",notUniq:"(名称不唯一)",noKeyName:"无名称",fieldsList:"字段列表",editField:"编辑字段",type:"类型",errorOccurred:"发生错误",errorBulkUpdateFieldName:"由于项目数量已更改,无法提交更改。",commitBulkUpdateFieldName:"提交更改",bulkUpdateFieldName:"批量更新字段名称",addPageAfter:"在之后添加页面",removePage:"删除当前页面",removePageConfirm:"您确定要删除此页面吗?此操作无法撤销。",hexColorPrompt:"请输入有效的十六进制颜色代码。","schemas.color":"颜色","schemas.borderWidth":"边框宽度","schemas.borderColor":"边框颜色","schemas.backgroundColor":"背景颜色","schemas.textColor":"文字颜色","schemas.bgColor":"背景颜色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中","schemas.right":"右","schemas.top":"顶","schemas.middle":"中间","schemas.bottom":"底","schemas.padding":"填充","schemas.text.fontName":"字体名称","schemas.text.size":"大小","schemas.text.spacing":"间距","schemas.text.textAlign":"文本对齐","schemas.text.verticalAlign":"垂直对齐","schemas.text.lineHeight":"行高","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"适应","schemas.text.dynamicFontSize":"动态字体大小","schemas.text.format":"格式","schemas.barcodes.barColor":"条码颜色","schemas.barcodes.includetext":"包括文本","schemas.table.alternateBackgroundColor":"交替背景颜色","schemas.table.tableStyle":"表格样式","schemas.table.headStyle":"表头样式","schemas.table.bodyStyle":"表体样式","schemas.table.columnStyle":"列样式"},dictJa={cancel:"キャンセル",field:"入力項目",fieldName:"項目名",align:"整列",width:"幅",height:"高さ",opacity:"不透明度",rotate:"回転",edit:"編集する",plsInputName:"項目名を入力してください",fieldMustUniq:"他の入力項目名と被っています",notUniq:"(他の項目名と重複しています)",noKeyName:"項目名なし",fieldsList:"入力項目一覧",editField:"入力項目を編集",type:"タイプ",errorOccurred:"エラーが発生しました",errorBulkUpdateFieldName:"項目数が変更されているため変更をコミットできません。",commitBulkUpdateFieldName:"変更を反映",bulkUpdateFieldName:"項目名を一括変更",addPageAfter:"次にページを追加",removePage:"現在のページを削除",removePageConfirm:"ページを削除してもよろしいですか?この操作は元に戻せません。",hexColorPrompt:"有効な16進数のカラーコードを入力してください。","schemas.color":"色","schemas.borderWidth":"枠線の太さ","schemas.borderColor":"枠線の色","schemas.backgroundColor":"背景色","schemas.textColor":"テキストの色","schemas.bgColor":"背景色","schemas.horizontal":"水平","schemas.vertical":"垂直","schemas.left":"左","schemas.center":"中央","schemas.right":"右","schemas.top":"上","schemas.middle":"中間","schemas.bottom":"下","schemas.padding":"パディング","schemas.text.fontName":"フォント名","schemas.text.size":"サイズ","schemas.text.spacing":"間隔","schemas.text.textAlign":"テキストの揃え","schemas.text.verticalAlign":"垂直方向の揃え","schemas.text.lineHeight":"行の高さ","schemas.text.min":"最小","schemas.text.max":"最大","schemas.text.fit":"フィット","schemas.text.dynamicFontSize":"動的フォントサイズ","schemas.text.format":"書式","schemas.barcodes.barColor":"バーの色","schemas.barcodes.includetext":"テキストを含める","schemas.table.alternateBackgroundColor":"交互の背景色","schemas.table.tableStyle":"テーブルスタイル","schemas.table.headStyle":"ヘッダースタイル","schemas.table.bodyStyle":"ボディスタイル","schemas.table.columnStyle":"カラムスタイル"},dictKo={cancel:"취소",field:"필드",fieldName:"이름",align:"정렬",width:"너비",height:"높이",opacity:"투명도",rotate:"회전",edit:"편집",plsInputName:"이름을 입력하세요",fieldMustUniq:"필드 이름은 유일해야 합니다",notUniq:"(유일하지 않은 이름)",noKeyName:"이름 없음",fieldsList:"필드 목록",editField:"필드 편집",type:"유형",errorOccurred:"오류 발생",errorBulkUpdateFieldName:"항목 수가 변경되어 변경을 커밋할 수 없습니다.",commitBulkUpdateFieldName:"변경 사항 커밋",bulkUpdateFieldName:"필드 이름 일괄 업데이트",addPageAfter:"다음에 페이지 추가",removePage:"현재 페이지 제거",removePageConfirm:"이 페이지를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",hexColorPrompt:"유효한 16진수 색상 코드를 입력하세요.","schemas.color":"색상","schemas.borderWidth":"테두리 너비","schemas.borderColor":"테두리 색상","schemas.backgroundColor":"배경색","schemas.textColor":"텍스트 색상","schemas.bgColor":"배경색","schemas.horizontal":"수평","schemas.vertical":"수직","schemas.left":"왼쪽","schemas.center":"중앙","schemas.right":"오른쪽","schemas.top":"상단","schemas.middle":"중간","schemas.bottom":"하단","schemas.padding":"패딩","schemas.text.fontName":"글꼴 이름","schemas.text.size":"크기","schemas.text.spacing":"간격","schemas.text.textAlign":"텍스트 정렬","schemas.text.verticalAlign":"수직 정렬","schemas.text.lineHeight":"줄 높이","schemas.text.min":"최소","schemas.text.max":"최대","schemas.text.fit":"맞춤","schemas.text.dynamicFontSize":"동적 폰트 크기","schemas.text.format":"형식","schemas.barcodes.barColor":"바코드 색상","schemas.barcodes.includetext":"텍스트 포함","schemas.table.alternateBackgroundColor":"대체 배경색","schemas.table.tableStyle":"테이블 스타일","schemas.table.headStyle":"헤더 스타일","schemas.table.bodyStyle":"본문 스타일","schemas.table.columnStyle":"열 스타일"},dictAr={cancel:"إلغاء",field:"الحقل",fieldName:"اسم الحقل",align:"محاذاة",width:"العرض",height:"الارتفاع",opacity:"الشفافية",rotate:"تدوير",edit:"تعديل",plsInputName:"الرجاء إدخال الاسم",fieldMustUniq:"يجب أن يكون الحقل فريداً",notUniq:"(غير فريد)",noKeyName:"لا يوجد اسم للحقل",fieldsList:"قائمة الحقول",editField:"تعديل الحقل",type:"النوع",errorOccurred:"حدث خطأ",errorBulkUpdateFieldName:"لا يمكن تنفيذ التغيير لأنه تم تغيير عدد العناصر.",commitBulkUpdateFieldName:"تنفيذ التغييرات",bulkUpdateFieldName:"تغيير الأسماء",addPageAfter:"إضافة صفحة بعد",removePage:"احذف الصفحة الحالية",removePageConfirm:"هل أنت متأكد من رغبتك في حذف هذه الصفحة؟ لا يمكن التراجع عن هذا الإجراء.",hexColorPrompt:"الرجاء إدخال رمز لون سداسي عشري صالح.","schemas.color":"اللون","schemas.borderWidth":"عرض الحدود","schemas.borderColor":"لون الحدود","schemas.backgroundColor":"لون الخلفية","schemas.textColor":"لون الخط","schemas.bgColor":"لون الخلفية","schemas.horizontal":"أفقي","schemas.vertical":"عمودي","schemas.left":"يسار","schemas.center":"مركز","schemas.right":"يمين","schemas.top":"أعلى","schemas.middle":"وسط","schemas.bottom":"أسفل","schemas.padding":"التبطين","schemas.text.fontName":"اسم الخط","schemas.text.size":"الحجم","schemas.text.spacing":"التباعد","schemas.text.textAlign":"محاذاة النص","schemas.text.verticalAlign":"محاذاة عمودية","schemas.text.lineHeight":"ارتفاع السطر","schemas.text.min":"الحد الأدنى","schemas.text.max":"الحد الأقصى","schemas.text.fit":"ملاءمة","schemas.text.dynamicFontSize":"حجم الخط الديناميكي","schemas.text.format":"تنسيق","schemas.barcodes.barColor":"لون الشريط","schemas.barcodes.includetext":"تضمين النص","schemas.table.alternateBackgroundColor":"لون الخلفية البديل","schemas.table.tableStyle":"أسلوب الجدول","schemas.table.headStyle":"أسلوب الرأس","schemas.table.bodyStyle":"أسلوب الجسم","schemas.table.columnStyle":"أسلوب العمود"},dictTh={cancel:"ยกเลิก",field:"ฟิลด์",fieldName:"ชื่อฟิลด์",align:"จัดเรียง",width:"ความกว้าง",height:"ความสูง",opacity:"ความทึบ",rotate:"หมุน",edit:"แก้ไข",plsInputName:"กรุณาใส่ชื่อ",fieldMustUniq:"ชื่อฟิลด์ต้องไม่ซ้ำกัน",notUniq:"(ชื่อฟิลด์ซ้ำกัน)",noKeyName:"ไม่มีชื่อ",fieldsList:"รายการฟิลด์ทั้งหมด",editField:"แก้ไขฟิลด์",type:"ประเภท",errorOccurred:"เกิดข้อผิดพลาด",errorBulkUpdateFieldName:"ไม่สามารถยืนยันการแก้ไขได้เนื่องจากจำนวนรายการมีการเปลี่ยนแปลง",commitBulkUpdateFieldName:"ยืนยันการแก้ไข",bulkUpdateFieldName:"แก้ไขชื่อฟิลด์เป็นชุด",addPageAfter:"เพิ่มหน้าถัดไป",removePage:"ลบหน้าปัจจุบัน",removePageConfirm:"คุณแน่ใจหรือไม่ว่าต้องการลบหน้านี้? การกระทำนี้ไม่สามารถย้อนกลับได้",hexColorPrompt:"กรุณาใส่รหัสสีแบบฐานสิบหกที่ถูกต้อง","schemas.color":"สี","schemas.borderWidth":"ความกว้างของเส้นขอบ","schemas.borderColor":"สีขอบ","schemas.backgroundColor":"สีพื้นหลัง","schemas.textColor":"สีข้อความ","schemas.bgColor":"สีพื้นหลัง","schemas.horizontal":"แนวนอน","schemas.vertical":"แนวตั้ง","schemas.left":"ซ้าย","schemas.center":"ตรงกลาง","schemas.right":"ขวา","schemas.top":"ด้านบน","schemas.middle":"ตรงกลาง","schemas.bottom":"ด้านล่าง","schemas.padding":"การเพิ่มพื้นที่","schemas.text.fontName":"ชื่อแบบอักษร","schemas.text.size":"ขนาด","schemas.text.spacing":"ระยะห่าง","schemas.text.textAlign":"จัดแนวข้อความ","schemas.text.verticalAlign":"จัดแนวแนวตั้ง","schemas.text.lineHeight":"ความสูงของบรรทัด","schemas.text.min":"ต่ำสุด","schemas.text.max":"สูงสุด","schemas.text.fit":"พอดี","schemas.text.dynamicFontSize":"ขนาดตัวอักษรแบบไดนามิก","schemas.text.format":"รูปแบบ","schemas.barcodes.barColor":"สีบาร์","schemas.barcodes.includetext":"รวมข้อความ","schemas.table.alternateBackgroundColor":"สีพื้นหลังสลับกัน","schemas.table.tableStyle":"สไตล์ตาราง","schemas.table.headStyle":"สไตล์หัวข้อ","schemas.table.bodyStyle":"สไตล์เนื้อหา","schemas.table.columnStyle":"สไตล์คอลัมน์"},dictIt={cancel:"Annulla",field:"Campo",fieldName:"Nome",align:"Allinea",width:"Larghezza",height:"Altezza",opacity:"Opacità",rotate:"Ruota",edit:"Modifica",plsInputName:"Inserisci il nome per favore",fieldMustUniq:"Il nome del campo non è univoco",notUniq:"(Nome non univoco)",noKeyName:"Nessun nome",fieldsList:"Lista campi",editField:"Modifica campo",type:"Tipo",errorOccurred:"Riscontrato errore",errorBulkUpdateFieldName:"Non è possibile salvare le modifiche perché il numero di elementi è cambiato.",commitBulkUpdateFieldName:"Salva cambiamenti",bulkUpdateFieldName:"Modifica nomi campi in blocco",addPageAfter:"Aggiungi pagina dopo",removePage:"Rimuovi la Pagina Corrente",removePageConfirm:"Sei sicuro di voler eliminare questa pagina? Questa azione non può essere annullata.",hexColorPrompt:"Inserisci un codice colore esadecimale valido.","schemas.color":"Colore","schemas.borderWidth":"Spessore bordo","schemas.borderColor":"Colore bordo","schemas.backgroundColor":"Colore di Sfondo","schemas.textColor":"Colore testo","schemas.bgColor":"Colore sfondo","schemas.horizontal":"Orizzontale","schemas.vertical":"Verticale","schemas.left":"Sinistra","schemas.center":"Centro","schemas.right":"Destra","schemas.top":"Sopra","schemas.middle":"Medio","schemas.bottom":"Sotto","schemas.padding":"Padding","schemas.text.fontName":"Nome del font","schemas.text.size":"Dimensione","schemas.text.spacing":"Spaziatura","schemas.text.textAlign":"Allineamento testo","schemas.text.verticalAlign":"Allineamento verticale","schemas.text.lineHeight":"Altezza della linea","schemas.text.min":"Minimo","schemas.text.max":"Massimo","schemas.text.fit":"Adatta","schemas.text.dynamicFontSize":"Dimensione font dinamica","schemas.text.format":"Formato","schemas.barcodes.barColor":"Colore barra","schemas.barcodes.includetext":"Includi testo","schemas.table.alternateBackgroundColor":"Colore di Sfondo Alternato","schemas.table.tableStyle":"Stile della Tabella","schemas.table.headStyle":"Stile dell'Intestazione","schemas.table.bodyStyle":"Stile del Corpo","schemas.table.columnStyle":"Stile della Colonna"},dictPl={cancel:"Anuluj",field:"pole",fieldName:"Klucz pola",align:"Wyrównanie",width:"Szerokość",height:"Wysokość",opacity:"przezroczystość",rotate:"Obrót",edit:"Edytuj",plsInputName:"Wymagane wprowadzenie klucza pola",fieldMustUniq:"Klucz pola nie jest unikalny",notUniq:"(Klucz pola nie jest unikalny)",noKeyName:"Brak nazwy klucza pola",fieldsList:"Lista pól",editField:"Edytuj pole",type:"Typ pola",errorOccurred:"Wystąpił błąd",errorBulkUpdateFieldName:"Nie można wprowadzić zmian ponieważ liczba elementów uległa zmianie.",commitBulkUpdateFieldName:"Zaakceptuj zmiany",bulkUpdateFieldName:"Masowo aktualizuj klucze pól",addPageAfter:"Dodaj stronę po",removePage:"Usuń Bieżącą Stronę",removePageConfirm:"Czy na pewno chcesz usunąć tę stronę? Tej operacji nie można cofnąć.",hexColorPrompt:"Wprowadź poprawny kod koloru szesnastkowego.","schemas.color":"Kolor","schemas.borderWidth":"Szerokość obramowania","schemas.borderColor":"Kolor obramowania","schemas.backgroundColor":"Kolor tła","schemas.textColor":"Kolor tekstu","schemas.bgColor":"Kolor tła","schemas.horizontal":"Poziomo","schemas.vertical":"Pionowo","schemas.left":"Lewo","schemas.center":"Centrum","schemas.right":"Prawo","schemas.top":"Góra","schemas.middle":"Środek","schemas.bottom":"Dół","schemas.padding":"Odsadzenie","schemas.text.fontName":"Nazwa czcionki","schemas.text.size":"Rozmiar","schemas.text.spacing":"Odstępy","schemas.text.textAlign":"Wyrównanie tekstu","schemas.text.verticalAlign":"Wyrównanie pionowe","schemas.text.lineHeight":"Wysokość linii","schemas.text.min":"Minimum","schemas.text.max":"Maksimum","schemas.text.fit":"Dopasowanie","schemas.text.dynamicFontSize":"Dynamiczny rozmiar czcionki","schemas.text.format":"Format","schemas.barcodes.barColor":"Kolor paska","schemas.barcodes.includetext":"Dołącz tekst","schemas.table.alternateBackgroundColor":"Alternatywny kolor tła","schemas.table.tableStyle":"Styl tabeli","schemas.table.headStyle":"Styl nagłówka","schemas.table.bodyStyle":"Styl ciała","schemas.table.columnStyle":"Styl kolumny"},dictDe={cancel:"Abbrechen",field:"Feld",fieldName:"Name",align:"Ausrichten",width:"Breite",height:"Höhe",opacity:"Opazität",rotate:"Drehen",edit:"Bearbeiten",plsInputName:"Bitte geben Sie einen Namen ein",fieldMustUniq:"Feldname ist nicht eindeutig",notUniq:"(Nicht eindeutiger Name)",noKeyName:"Kein Name",fieldsList:"Feldliste",editField:"Feld bearbeiten",type:"Typ",errorOccurred:"Ein Fehler ist aufgetreten",errorBulkUpdateFieldName:"Die Änderung kann nicht übernommen werden, weil die Anzahl der Elemente geändert wurde.",commitBulkUpdateFieldName:"Änderungen übernehmen",bulkUpdateFieldName:"Mehrfachaktualisierung der Feldnamen",addPageAfter:"Seite danach hinzufügen",removePage:"Aktuelle Seite entfernen",removePageConfirm:"Sind Sie sicher, dass Sie diese Seite löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",hexColorPrompt:"Bitte geben Sie einen gültigen Hex-Farbcode ein.","schemas.color":"Farbe","schemas.borderWidth":"Rahmenbreite","schemas.borderColor":"Rahmenfarbe","schemas.backgroundColor":"Hintergrundfarbe","schemas.textColor":"Textfarbe","schemas.bgColor":"Hintergrundfarbe","schemas.horizontal":"Horizontal","schemas.vertical":"Vertikal","schemas.left":"Links","schemas.center":"Zentriert","schemas.right":"Rechts","schemas.top":"Oben","schemas.middle":"Mitte","schemas.bottom":"Unten","schemas.padding":"Polsterung","schemas.text.fontName":"Schriftart","schemas.text.size":"Größe","schemas.text.spacing":"Abstand","schemas.text.textAlign":"Ausrichtung","schemas.text.verticalAlign":"vert. Ausr.","schemas.text.lineHeight":"Zeilenhöhe","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Anpassen","schemas.text.dynamicFontSize":"Dynamische Schriftgröße","schemas.text.format":"Format","schemas.barcodes.barColor":"Strichcodefarbe","schemas.barcodes.includetext":"Text anzeigen","schemas.table.alternateBackgroundColor":"Wechselnde Hintergrundfarbe","schemas.table.tableStyle":"Tabellenstil","schemas.table.headStyle":"Kopfzeilenstil","schemas.table.bodyStyle":"Körperstil","schemas.table.columnStyle":"Spaltenstil"},dictEs={cancel:"Cancelar",field:"campo",fieldName:"Nombre",align:"Alinear",width:"Anchura",height:"Altura",opacity:"Opacidad",rotate:"Rotar",edit:"Editar",plsInputName:"Introduce el nombre",fieldMustUniq:"El nombre del campo no es único",notUniq:"(Nombre no único)",noKeyName:"Sin nombre",fieldsList:"Lista de campos",editField:"Editar campo",type:"Tipo",errorOccurred:"Ocurrió un error",errorBulkUpdateFieldName:"No se puede confirmar el cambio porque el número de elementos ha cambiado.",commitBulkUpdateFieldName:"Confirmar cambios",bulkUpdateFieldName:"Actualizar en bloque el nombre de los campos",addPageAfter:"Insertar página",removePage:"Eliminar página actual",removePageConfirm:"¿Estás seguro de que quieres eliminar esta página? Esta acción no se puede deshacer.",hexColorPrompt:"Introduce un código de color hexadecimal válido.","schemas.color":"Color","schemas.borderWidth":"Ancho del borde","schemas.borderColor":"Color del borde","schemas.backgroundColor":"Color de fondo","schemas.textColor":"Color del texto","schemas.bgColor":"Color del fondo","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Izquierda","schemas.center":"Centro","schemas.right":"Derecha","schemas.top":"Arriba","schemas.middle":"Medio","schemas.bottom":"Abajo","schemas.padding":"Relleno","schemas.text.fontName":"Nombre de la fuente","schemas.text.size":"Tamaño","schemas.text.spacing":"Espaciado","schemas.text.textAlign":"Alineación del texto","schemas.text.verticalAlign":"Alineación vertical","schemas.text.lineHeight":"Altura de línea","schemas.text.min":"Mín","schemas.text.max":"Máx","schemas.text.fit":"Ajustar","schemas.text.dynamicFontSize":"Tamaño de fuente dinámico","schemas.text.format":"Formato","schemas.barcodes.barColor":"Color de la barra","schemas.barcodes.includetext":"Incluir texto","schemas.table.alternateBackgroundColor":"Color de fondo alternativo","schemas.table.tableStyle":"Estilo de tabla","schemas.table.headStyle":"Estilo de cabecera","schemas.table.bodyStyle":"Estilo de cuerpo","schemas.table.columnStyle":"Estilo de columna"},dictFr={cancel:"Annuler",field:"Champ",fieldName:"Nom",align:"Aligner",width:"Largeur",height:"Hauteur",opacity:"Opacité",rotate:"Rotation",edit:"Éditer",plsInputName:"Veuillez saisir le nom",fieldMustUniq:"Le nom du champ n'est pas unique",notUniq:"(Nombre non unique)",noKeyName:"Pas de nom",fieldsList:"Liste des champs",editField:"Éditer le champ",type:"Type",errorOccurred:"Une erreur est survenue",errorBulkUpdateFieldName:"Impossible de confirmer le changement car le nombre d'éléments a changé.",commitBulkUpdateFieldName:"Confirmer les changements",bulkUpdateFieldName:"Modifier les noms de champs en masse",addPageAfter:"Ajouter une page après",removePage:"Supprimer la page actuelle",removePageConfirm:"Êtes-vous sûr de vouloir supprimer cette page ? Cette action est irréversible.",hexColorPrompt:"Veuillez entrer un code couleur hexadécimal valide.","schemas.color":"Couleur","schemas.borderWidth":"Largeur de la bordure","schemas.borderColor":"Couleur de la bordure","schemas.backgroundColor":"Couleur de fond","schemas.textColor":"Couleur du texte","schemas.bgColor":"Couleur de fond","schemas.horizontal":"Horizontal","schemas.vertical":"Vertical","schemas.left":"Gauche","schemas.center":"Centre","schemas.right":"Droite","schemas.top":"Haut","schemas.middle":"Milieu","schemas.bottom":"Bas","schemas.padding":"Zone de remplissage","schemas.text.fontName":"Nom de la police","schemas.text.size":"Taille","schemas.text.spacing":"Espacement","schemas.text.textAlign":"Alignement du texte","schemas.text.verticalAlign":"Alignement vertical","schemas.text.lineHeight":"Hauteur de ligne","schemas.text.min":"Min","schemas.text.max":"Max","schemas.text.fit":"Ajustement","schemas.text.dynamicFontSize":"Taille de police dynamique","schemas.text.format":"Format","schemas.barcodes.barColor":"Couleur de la barre","schemas.barcodes.includetext":"Inclure le texte","schemas.table.alternateBackgroundColor":"Couleur de fond alternative","schemas.table.tableStyle":"Style de tableau","schemas.table.headStyle":"Style d'en-tête","schemas.table.bodyStyle":"Style de corps","schemas.table.columnStyle":"Style de colonne"},dictionaries={en:dictEn,zh:dictZh,ja:dictJa,ko:dictKo,ar:dictAr,th:dictTh,it:dictIt,pl:dictPl,de:dictDe,es:dictEs,fr:dictFr},getDict=a=>dictionaries[a]||dictionaries[DEFAULT_LANG],i18n=(a,s)=>(s||getDict(DEFAULT_LANG))[a],I18nContext=reactExports.createContext(i18n),FontContext=reactExports.createContext(getDefaultFont()),PluginsRegistry=reactExports.createContext(builtInPlugins),OptionsContext=reactExports.createContext({});function arrayMove(a,s,$){const _=a.slice();return _.splice($<0?_.length+$:$,0,_.splice(s,1)[0]),_}function getSortedRects(a,s){return a.reduce(($,_,_e)=>{const tt=s.get(_);return tt&&($[_e]=tt),$},Array(a.length))}function isValidIndex(a){return a!==null&&a>=0}function itemsEqual(a,s){if(a===s)return!0;if(a.length!==s.length)return!1;for(let $=0;$<a.length;$++)if(a[$]!==s[$])return!1;return!0}function normalizeDisabled(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const rectSortingStrategy=a=>{let{rects:s,activeIndex:$,overIndex:_,index:_e}=a;const tt=arrayMove(s,_,$),nt=s[_e],at=tt[_e];return!at||!nt?null:{x:at.left-nt.left,y:at.top-nt.top,scaleX:at.width/nt.width,scaleY:at.height/nt.height}},defaultScale$1={scaleX:1,scaleY:1},verticalListSortingStrategy=a=>{var s;let{activeIndex:$,activeNodeRect:_,index:_e,rects:tt,overIndex:nt}=a;const at=(s=tt[$])!=null?s:_;if(!at)return null;if(_e===$){const rt=tt[nt];return rt?{x:0,y:$<nt?rt.top+rt.height-(at.top+at.height):rt.top-at.top,...defaultScale$1}:null}const ot=getItemGap$1(tt,_e,$);return _e>$&&_e<=nt?{x:0,y:-at.height-ot,...defaultScale$1}:_e<$&&_e>=nt?{x:0,y:at.height+ot,...defaultScale$1}:{x:0,y:0,...defaultScale$1}};function getItemGap$1(a,s,$){const _=a[s],_e=a[s-1],tt=a[s+1];return _?$<s?_e?_.top-(_e.top+_e.height):tt?tt.top-(_.top+_.height):0:tt?tt.top-(_.top+_.height):_e?_.top-(_e.top+_e.height):0:0}const ID_PREFIX="Sortable",Context$1=React$a.createContext({activeIndex:-1,containerId:ID_PREFIX,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:rectSortingStrategy,disabled:{draggable:!1,droppable:!1}});function SortableContext(a){let{children:s,id:$,items:_,strategy:_e=rectSortingStrategy,disabled:tt=!1}=a;const{active:nt,dragOverlay:at,droppableRects:ot,over:rt,measureDroppableContainers:st}=useDndContext(),lt=useUniqueId(ID_PREFIX,$),et=at.rect!==null,it=reactExports.useMemo(()=>_.map(vt=>typeof vt=="object"&&"id"in vt?vt.id:vt),[_]),ut=nt!=null,ft=nt?it.indexOf(nt.id):-1,ht=rt?it.indexOf(rt.id):-1,dt=reactExports.useRef(it),gt=!itemsEqual(it,dt.current),pt=ht!==-1&&ft===-1||gt,mt=normalizeDisabled(tt);useIsomorphicLayoutEffect$1(()=>{gt&&ut&&st(it)},[gt,it,ut,st]),reactExports.useEffect(()=>{dt.current=it},[it]);const ct=reactExports.useMemo(()=>({activeIndex:ft,containerId:lt,disabled:mt,disableTransforms:pt,items:it,overIndex:ht,useDragOverlay:et,sortedRects:getSortedRects(it,ot),strategy:_e}),[ft,lt,mt.draggable,mt.droppable,pt,it,ht,ot,et,_e]);return React$a.createElement(Context$1.Provider,{value:ct},s)}const defaultNewIndexGetter=a=>{let{id:s,items:$,activeIndex:_,overIndex:_e}=a;return arrayMove($,_,_e).indexOf(s)},defaultAnimateLayoutChanges=a=>{let{containerId:s,isSorting:$,wasDragging:_,index:_e,items:tt,newIndex:nt,previousItems:at,previousContainerId:ot,transition:rt}=a;return!rt||!_||at!==tt&&_e===nt?!1:$?!0:nt!==_e&&s===ot},defaultTransition={duration:200,easing:"ease"},transitionProperty="transform",disabledTransition=CSS$1.Transition.toString({property:transitionProperty,duration:0,easing:"linear"}),defaultAttributes={roleDescription:"sortable"};function useDerivedTransform(a){let{disabled:s,index:$,node:_,rect:_e}=a;const[tt,nt]=reactExports.useState(null),at=reactExports.useRef($);return useIsomorphicLayoutEffect$1(()=>{if(!s&&$!==at.current&&_.current){const ot=_e.current;if(ot){const rt=getClientRect$1(_.current,{ignoreTransform:!0}),st={x:ot.left-rt.left,y:ot.top-rt.top,scaleX:ot.width/rt.width,scaleY:ot.height/rt.height};(st.x||st.y)&&nt(st)}}$!==at.current&&(at.current=$)},[s,$,_,_e]),reactExports.useEffect(()=>{tt&&nt(null)},[tt]),tt}function useSortable(a){let{animateLayoutChanges:s=defaultAnimateLayoutChanges,attributes:$,disabled:_,data:_e,getNewIndex:tt=defaultNewIndexGetter,id:nt,strategy:at,resizeObserverConfig:ot,transition:rt=defaultTransition}=a;const{items:st,containerId:lt,activeIndex:et,disabled:it,disableTransforms:ut,sortedRects:ft,overIndex:ht,useDragOverlay:dt,strategy:gt}=reactExports.useContext(Context$1),pt=normalizeLocalDisabled(_,it),mt=st.indexOf(nt),ct=reactExports.useMemo(()=>({sortable:{containerId:lt,index:mt,items:st},..._e}),[lt,_e,mt,st]),vt=reactExports.useMemo(()=>st.slice(st.indexOf(nt)),[st,nt]),{rect:At,node:xt,isOver:bt,setNodeRef:Et}=useDroppable({id:nt,data:ct,disabled:pt.droppable,resizeObserverConfig:{updateMeasurementsFor:vt,...ot}}),{active:St,activatorEvent:Bt,activeNodeRect:Ot,attributes:Tt,setNodeRef:wt,listeners:Ct,isDragging:It,over:yt,setActivatorNodeRef:Rt,transform:kt}=useDraggable({id:nt,data:ct,attributes:{...defaultAttributes,...$},disabled:pt.draggable}),jt=useCombinedRefs(Et,wt),Ht=!!St,Ft=Ht&&!ut&&isValidIndex(et)&&isValidIndex(ht),_t=!dt&&It,Nt=_t&&Ft?kt:null,Lt=Ft?Nt??(at??gt)({rects:ft,activeNodeRect:Ot,activeIndex:et,overIndex:ht,index:mt}):null,$t=isValidIndex(et)&&isValidIndex(ht)?tt({id:nt,items:st,activeIndex:et,overIndex:ht}):mt,Pt=St==null?void 0:St.id,Dt=reactExports.useRef({activeId:Pt,items:st,newIndex:$t,containerId:lt}),Ut=st!==Dt.current.items,Vt=s({active:St,containerId:lt,isDragging:It,isSorting:Ht,id:nt,index:mt,items:st,newIndex:Dt.current.newIndex,previousItems:Dt.current.items,previousContainerId:Dt.current.containerId,transition:rt,wasDragging:Dt.current.activeId!=null}),Qt=useDerivedTransform({disabled:!Vt,index:mt,node:xt,rect:At});return reactExports.useEffect(()=>{Ht&&Dt.current.newIndex!==$t&&(Dt.current.newIndex=$t),lt!==Dt.current.containerId&&(Dt.current.containerId=lt),st!==Dt.current.items&&(Dt.current.items=st)},[Ht,$t,lt,st]),reactExports.useEffect(()=>{if(Pt===Dt.current.activeId)return;if(Pt&&!Dt.current.activeId){Dt.current.activeId=Pt;return}const Zt=setTimeout(()=>{Dt.current.activeId=Pt},50);return()=>clearTimeout(Zt)},[Pt]),{active:St,activeIndex:et,attributes:Tt,data:ct,rect:At,index:mt,newIndex:$t,items:st,isOver:bt,isSorting:Ht,isDragging:It,listeners:Ct,node:xt,overIndex:ht,over:yt,setNodeRef:jt,setActivatorNodeRef:Rt,setDroppableNodeRef:Et,setDraggableNodeRef:wt,transform:Qt??Lt,transition:qt()};function qt(){if(Qt||Ut&&Dt.current.newIndex===mt)return disabledTransition;if(!(_t&&!isKeyboardEvent(Bt)||!rt)&&(Ht||Vt))return CSS$1.Transition.toString({...rt,property:transitionProperty})}}function normalizeLocalDisabled(a,s){var $,_;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:($=a==null?void 0:a.draggable)!=null?$:s.draggable,droppable:(_=a==null?void 0:a.droppable)!=null?_:s.droppable}}function hasSortableData(a){if(!a)return!1;const s=a.data.current;return!!(s&&"sortable"in s&&typeof s.sortable=="object"&&"containerId"in s.sortable&&"items"in s.sortable&&"index"in s.sortable)}const directions=[KeyboardCode.Down,KeyboardCode.Right,KeyboardCode.Up,KeyboardCode.Left],sortableKeyboardCoordinates=(a,s)=>{let{context:{active:$,collisionRect:_,droppableRects:_e,droppableContainers:tt,over:nt,scrollableAncestors:at}}=s;if(directions.includes(a.code)){if(a.preventDefault(),!$||!_)return;const ot=[];tt.getEnabled().forEach(lt=>{if(!lt||lt!=null&<.disabled)return;const et=_e.get(lt.id);if(et)switch(a.code){case KeyboardCode.Down:_.top<et.top&&ot.push(lt);break;case KeyboardCode.Up:_.top>et.top&&ot.push(lt);break;case KeyboardCode.Left:_.left>et.left&&ot.push(lt);break;case KeyboardCode.Right:_.left<et.left&&ot.push(lt);break}});const rt=closestCorners({active:$,collisionRect:_,droppableRects:_e,droppableContainers:ot,pointerCoordinates:null});let st=getFirstCollision(rt,"id");if(st===(nt==null?void 0:nt.id)&&rt.length>1&&(st=rt[1].id),st!=null){const lt=tt.get($.id),et=tt.get(st),it=et?_e.get(et.id):null,ut=et==null?void 0:et.node.current;if(ut&&it&<&&et){const ht=getScrollableAncestors(ut).some((vt,At)=>at[At]!==vt),dt=isSameContainer(lt,et),gt=isAfter(lt,et),pt=ht||!dt?{x:0,y:0}:{x:gt?_.width-it.width:0,y:gt?_.height-it.height:0},mt={x:it.left,y:it.top};return pt.x&&pt.y?mt:subtract(mt,pt)}}}};function isSameContainer(a,s){return!hasSortableData(a)||!hasSortableData(s)?!1:a.data.current.sortable.containerId===s.data.current.sortable.containerId}function isAfter(a,s){return!hasSortableData(a)||!hasSortableData(s)||!isSameContainer(a,s)?!1:a.data.current.sortable.index<s.data.current.sortable.index}const{Text:Text$4}=Typography$1,Item=React$a.memo(React$a.forwardRef(({value:a,status:s,title:$,style:_,dragOverlay:_e,onClick:tt,onMouseEnter:nt,onMouseLeave:at,dragging:ot,fadeIn:rt,listeners:st,sorting:lt,transition:et,transform:it,...ut},ft)=>{const ht=reactExports.useContext(I18nContext);reactExports.useEffect(()=>{if(_e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[_e]);const{x:dt,y:gt,scaleX:pt,scaleY:mt}=it||{x:0,y:0,scaleX:1,scaleY:1};return jsxRuntimeExports.jsx("li",{style:{marginTop:10,transition:et,transform:`translate(${dt}px, ${gt}px) scale(${pt}, ${mt})`},onMouseEnter:nt,onMouseLeave:at,ref:ft,children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",..._},...ut,onClick:()=>tt&&tt(),children:[jsxRuntimeExports.jsx(Button$2,{...st,style:{display:"flex",alignItems:"center",background:"none",boxShadow:"none",border:"none",paddingLeft:"0.25rem"},icon:jsxRuntimeExports.jsx(HolderOutlined$1,{style:{cursor:"grab"}})}),jsxRuntimeExports.jsx(Text$4,{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",width:"100%"},title:$||"",children:s===void 0?a:jsxRuntimeExports.jsxs("span",{style:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(ExclamationCircleOutlined$1,{width:15,style:{marginRight:"0.5rem"}}),s==="is-warning"?ht("noKeyName"):a,s==="is-danger"?ht("notUniq"):""]})})]})})})),Item$1=Item,usePrevious=a=>{const s=reactExports.useRef(null);return reactExports.useEffect(()=>{s.current=a}),s.current},getScale=(a,s)=>Math.floor((a/s>1?1:a/s)*100)/100,useUIPreProcessor=({template:a,size:s,zoomLevel:$})=>{const[_,_e]=reactExports.useState([]),[tt,nt]=reactExports.useState([]),[at,ot]=reactExports.useState(0),[rt,st]=reactExports.useState(null),lt=async et=>{const{template:{basePdf:it,schemas:ut},size:ft}=et;let ht,dt,gt,pt;if(isBlankPdf(it)){const{width:ct,height:vt}=it;ht=ct*ZOOM,dt=vt*ZOOM,gt=ut.map(()=>"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+P///38ACfsD/QVDRcoAAAAASUVORK5CYII="),pt=ut.map(()=>({width:ct,height:vt}))}else{const ct=await getB64BasePdf(it),vt=b64toBlob(ct);pt=await getPdfPageSizes(vt),ht=pt[0].width*ZOOM,dt=pt[0].height*ZOOM,gt=await pdf2Pngs(vt,ht)}const mt=Math.min(getScale(ft.width,ht),getScale(ft.height-RULER_HEIGHT,dt));return{backgrounds:gt,pageSizes:pt,scale:mt}};return reactExports.useEffect(()=>{lt({template:a,size:s}).then(({pageSizes:et,scale:it,backgrounds:ut})=>{nt(et),ot(it),_e(ut)}).catch(et=>{st(et),console.error(`[@pdfme/ui] ${et}`)})},[a,s]),{backgrounds:_,pageSizes:tt,scale:at*$,error:rt,refresh:et=>lt({template:et,size:s}).then(({pageSizes:it,scale:ut,backgrounds:ft})=>{nt(it),ot(ut),_e(ft)})}},useScrollPageCursor=({ref:a,pageSizes:s,scale:$,pageCursor:_,onChangePageCursor:_e})=>{const tt=reactExports.useCallback(()=>{if(!s[0]||!a.current)return;const nt=a.current.scrollTop,{top:at}=a.current.getBoundingClientRect(),ot=s.reduce((st,lt,et)=>{let it=(lt.height*ZOOM+RULER_HEIGHT)*$;return et===0?it+=at-it/2:it+=st[et-1],st.concat(it)},[]);let rt=0;ot.forEach((st,lt)=>{nt>st&&(rt=lt+1>=ot.length?ot.length-1:lt+1)}),rt!==_&&_e(rt)},[_e,_,s,a,$]);reactExports.useEffect(()=>{var nt;return(nt=a.current)==null||nt.addEventListener("scroll",tt),()=>{var at;(at=a.current)==null||at.removeEventListener("scroll",tt)}},[a,tt])},useMountStatus=()=>{const[a,s]=reactExports.useState(!1);return reactExports.useEffect(()=>{const $=setTimeout(()=>s(!0),500);return()=>clearTimeout($)},[]),a},useInitEvents=({pageCursor:a,pageSizes:s,activeElements:$,template:_,schemasList:_e,changeSchemas:tt,commitSchemas:nt,removeSchemas:at,onSaveTemplate:ot,past:rt,future:st,setSchemasList:lt,onEdit:et,onEditEnd:it})=>{const ut=reactExports.useRef(null),ft=reactExports.useCallback(()=>{const dt=()=>{const pt=$.map(mt=>mt.id);return _e[a].filter(mt=>pt.includes(mt.id))},gt=pt=>{const mt=pt==="undo",ct=mt?rt:st;if(ct.current.length<=0)return;(mt?st:rt).current.push(cloneDeep$2(_e[a]));const vt=cloneDeep$2(_e);vt[a]=ct.current.pop(),lt(vt)};initShortCuts({move:(pt,mt)=>{const ct=s[a],vt=dt(),At=moveCommandToChangeSchemasArg({command:pt,activeSchemas:vt,pageSize:ct,isShift:mt});tt(At)},copy:()=>{const pt=dt();pt.length!==0&&(ut.current=pt)},paste:()=>{if(!ut.current||ut.current.length===0)return;const pt=_e[a],mt=[],ct=ut.current.map(vt=>{const At=uuid$6(),xt=getUniqSchemaKey({copiedSchemaKey:vt.key,schema:pt,stackUniqSchemaKeys:mt}),{height:bt,width:Et,position:St}=vt,Bt=s[a],Ot={x:St.x+10>Bt.width-Et?Bt.width-Et:St.x+10,y:St.y+10>Bt.height-bt?Bt.height-bt:St.y+10};return Object.assign(cloneDeep$2(vt),{id:At,key:xt,position:Ot})});nt(_e[a].concat(ct)),et(ct.map(vt=>document.getElementById(vt.id))),ut.current=ct},redo:()=>gt("redo"),undo:()=>gt("undo"),save:()=>ot&&ot(schemasList2template(_e,_.basePdf)),remove:()=>at(dt().map(pt=>pt.id)),esc:it,selectAll:()=>et(_e[a].map(pt=>document.getElementById(pt.id)))})},[_,$,a,s,tt,nt,_e,ot,at,rt,st,lt,ut,et,it]),ht=reactExports.useCallback(()=>{destroyShortCuts()},[]);reactExports.useEffect(()=>(ft(),ht),[ft,ht])},SelectableSortableItem=({isSelected:a,style:s,onSelect:$,onEdit:_,schema:_e,schemas:tt,onMouseEnter:nt,onMouseLeave:at})=>{const{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),{setNodeRef:st,listeners:lt,isDragging:et,isSorting:it,transform:ut,transition:ft}=useSortable({id:_e.id}),ht=useMountStatus(),dt=et&&!ht,gt={...lt,onClick:vt=>$(_e.id,vt.shiftKey)};let pt;_e.key?tt.find(vt=>_e.key&&vt.key===_e.key&&vt.id!==_e.id)&&(pt="is-danger"):pt="is-warning";let mt=rt("edit");pt==="is-warning"?mt=rt("plsInputName"):pt==="is-danger"&&(mt=rt("fieldMustUniq"));const ct=a?{background:ot.colorPrimary,opacity:it||et?.5:1}:{};return jsxRuntimeExports.jsx(Item$1,{ref:st,onMouseEnter:nt,onMouseLeave:at,onClick:()=>_(_e.id),value:_e.key,status:pt,title:mt,style:{...ct,...s},dragging:et,sorting:it,transition:ft,transform:ut,fadeIn:dt,listeners:gt})},SelectableSortableItem$1=SelectableSortableItem,SelectableSortableContainer=a=>{const{token:s}=theme.useToken(),{schemas:$,onEdit:_,onSortEnd:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt}=a,[at,ot]=reactExports.useState([]),[rt,st]=reactExports.useState(null),[lt,et]=reactExports.useState(null),it=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:15}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),ut=ht=>at.map(dt=>dt.id).includes(ht),ft=(ht,dt)=>{if(dt)if(ut(ht)){const gt=at.filter(pt=>pt.id!==ht);ot(gt)}else{const gt=$.find(mt=>mt.id===ht),pt=at.concat(gt);ot(pt)}else ot([])};return jsxRuntimeExports.jsx(DndContext,{sensors:it,collisionDetection:closestCorners,onDragStart:({active:ht})=>{et(String(ht.id)),st($),ut(String(ht.id))?at.length>0&&_e(at.reduce((dt,gt)=>gt.id===String(ht.id)?dt:dt.filter(pt=>pt!==gt),$)):ot([])},onDragEnd:({active:ht,over:dt})=>{const gt=(dt==null?void 0:dt.id)||"",pt=$.map(ct=>ct.id).indexOf(String(ht.id)),mt=$.map(ct=>ct.id).indexOf(String(gt));if(at.length){let ct=[...$];ct=arrayMove(ct,pt,mt),ct.splice(mt+1,0,...at.filter(vt=>vt.id!==lt)),_e(ct),ot([])}else pt!==mt&&_e(arrayMove($,pt,mt));et(null)},onDragCancel:()=>{rt&&_e(rt),et(null),st(null)},children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{style:{height:"100%",overflowY:"auto"},children:jsxRuntimeExports.jsx(SortableContext,{items:$,strategy:verticalListSortingStrategy,children:jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none",borderRadius:5},children:$.map(ht=>jsxRuntimeExports.jsx(SelectableSortableItem$1,{style:{border:`1px solid ${ht.id===tt?s.colorPrimary:"transparent"}`},schema:ht,schemas:$,isSelected:ut(ht.id)||lt===ht.id,onEdit:_,onSelect:ft,onMouseEnter:()=>nt(ht.id),onMouseLeave:()=>nt(null)},ht.id))})})}),reactDomExports.createPortal(jsxRuntimeExports.jsx(DragOverlay,{adjustScale:!0,children:lt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:jsxRuntimeExports.jsx(Item$1,{value:$.find(ht=>ht.id===lt).key,style:{background:s.colorPrimary},dragOverlay:!0})}),jsxRuntimeExports.jsx("ul",{style:{margin:0,padding:0,listStyle:"none"},children:at.filter(ht=>ht.id!==lt).map(ht=>jsxRuntimeExports.jsx(Item$1,{value:ht.key,style:{background:s.colorPrimary},dragOverlay:!0},ht.id))})]}):null}),document.body)]})})},SelectableSortableContainer$1=SelectableSortableContainer,{Text:Text$3}=Typography$1,{TextArea:TextArea$2}=_Input,headHeight=40,ListView=a=>{const{schemas:s,onSortEnd:$,onEdit:_,size:_e,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,changeSchemas:at}=a,{token:ot}=theme.useToken(),rt=reactExports.useContext(I18nContext),[st,lt]=reactExports.useState(!1),[et,it]=reactExports.useState(""),ut=getSidebarContentHeight(_e.height),ft=()=>{const dt=et.split(`
|
590
590
|
`);dt.length!==s.length?alert(rt("errorBulkUpdateFieldName")):(at(dt.map((gt,pt)=>({key:"key",value:gt,schemaId:s[pt].id}))),lt(!1))},ht=()=>{it(s.map(dt=>dt.key).join(`
|
591
591
|
`)),lt(!0)};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{style:{height:headHeight,display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Text$3,{strong:!0,style:{textAlign:"center",width:"100%"},children:rt("fieldsList")})}),jsxRuntimeExports.jsx(Divider$1,{style:{marginTop:ot.marginXS,marginBottom:ot.marginXS}}),jsxRuntimeExports.jsxs("div",{style:{height:ut-headHeight},children:[st?jsxRuntimeExports.jsx(TextArea$2,{wrap:"off",value:et,onChange:dt=>it(dt.target.value),style:{paddingLeft:30,height:ut-headHeight,width:RIGHT_SIDEBAR_WIDTH-35,lineHeight:"2.75rem"}}):jsxRuntimeExports.jsx(SelectableSortableContainer$1,{schemas:s,hoveringSchemaId:tt,onChangeHoveringSchemaId:nt,onSortEnd:$,onEdit:_}),jsxRuntimeExports.jsx("div",{style:{paddingTop:"0.5rem",display:"flex",alignItems:"center",justifyContent:"flex-end"},children:st?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:ft,children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("commitBulkUpdateFieldName")]})}),jsxRuntimeExports.jsx("span",{style:{margin:"0 1rem"},children:"/"}),jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:()=>lt(!1),children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("cancel")]})})]}):jsxRuntimeExports.jsx(Button$2,{size:"small",type:"text",onClick:ht,children:jsxRuntimeExports.jsxs("u",{children:[" ",rt("bulkUpdateFieldName")]})})})]})]})},ListView$1=ListView;/*! *****************************************************************************
|
592
592
|
Copyright (c) Microsoft Corporation.
|
@@ -704,7 +704,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
704
704
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit$2(a,s){var $=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if($!=null){var _,_e,tt,nt,at=[],ot=!0,rt=!1;try{if(tt=($=$.call(a)).next,s===0){if(Object($)!==$)return;ot=!1}else for(;!(ot=(_=tt.call($)).done)&&(at.push(_.value),at.length!==s);ot=!0);}catch(st){rt=!0,_e=st}finally{try{if(!ot&&$.return!=null&&(nt=$.return(),Object(nt)!==nt))return}finally{if(rt)throw _e}}return at}}function _arrayWithHoles$2(a){if(Array.isArray(a))return a}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_unsupportedIterableToArray$2(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
705
705
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(a,s){if(a){if(typeof a=="string")return _arrayLikeToArray$2(a,s);var $=Object.prototype.toString.call(a).slice(8,-1);if($==="Object"&&a.constructor&&($=a.constructor.name),$==="Map"||$==="Set")return Array.from(a);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return _arrayLikeToArray$2(a,s)}}function _iterableToArray(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a))return _arrayLikeToArray$2(a)}function _arrayLikeToArray$2(a,s){(s==null||s>a.length)&&(s=a.length);for(var $=0,_=new Array(s);$<s;$++)_[$]=a[$];return _}var TabPaneContent=function a(s){var $=s.renderCore,_=s.name,_e=s.schema,tt=s.rootPath;return reactExports.useMemo(function(){return React$a.createElement("div",{style:{flex:1}},$({schema:_e,parentPath:[_],rootPath:[].concat(_toConsumableArray(tt),[_])}))},[JSON.stringify(s)])},TabList=function a(s){var $=s.schema,_=s.fields,_e=s.rootPath,tt=s.renderCore,nt=s.readOnly,at=s.delConfirmProps,ot=s.tabName,rt=s.hideDelete,st=s.hideAdd,lt=s.addItem,et=s.removeItem,it=s.tabItemProps,ut=it===void 0?{}:it,ft=s.activeKey,ht=__rest$3(s,["schema","fields","rootPath","renderCore","readOnly","delConfirmProps","tabName","hideDelete","hideAdd","addItem","removeItem","tabItemProps","activeKey"]),dt=reactExports.useState("0"),gt=_slicedToArray$2(dt,2),pt=gt[0],mt=gt[1],ct=reactExports.useContext(ThemeConfigProvider.ConfigContext),vt=translation(ct);reactExports.useEffect(function(){mt(ft||"0")},[ft]);var At=function(Bt){return ot instanceof Array?ot[Bt]||Bt+1:"".concat(ot||vt("item")," ").concat(Bt+1)},xt=function(Bt){et(Bt),mt("".concat(Bt>1?Bt-1:0))},bt=function(Bt,Ot){if(Ot==="add"&&(!$.max||_.length<$.max)&&!nt&&!st){lt();var Tt=_.length;mt("".concat(Tt))}},Et=function(Bt){return!nt&&!rt?React$a.createElement(_Popconfirm,Object.assign({onConfirm:function(){return xt(Bt)}},at),React$a.createElement(default_1$3,null)):React$a.createElement(React$a.Fragment,null)};return React$a.createElement(_Tabs,Object.assign({className:"fr-tab-list",type:"editable-card"},ht,{onChange:mt,activeKey:"".concat(pt),onEdit:bt,hideAdd:nt||st}),_.map(function(St){var Bt=St.key,Ot=St.name;return React$a.createElement(_Tabs.TabPane,Object.assign({key:Bt,className:"fr-list-item"},ut,{tab:At(Ot),closeIcon:Et(Ot)}),React$a.createElement(TabPaneContent,{name:Ot,rootPath:_e,schema:$,renderCore:tt}))}))};function _typeof(a){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_typeof(a)}function _defineProperty(a,s,$){return s=_toPropertyKey(s),s in a?Object.defineProperty(a,s,{value:$,enumerable:!0,configurable:!0,writable:!0}):a[s]=$,a}function _toPropertyKey(a){var s=_toPrimitive(a,"string");return _typeof(s)==="symbol"?s:String(s)}function _toPrimitive(a,s){if(_typeof(a)!=="object"||a===null)return a;var $=a[Symbol.toPrimitive];if($!==void 0){var _=$.call(a,s||"default");if(_typeof(_)!=="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}const index=function(a){var s=a.schema;return React$a.createElement("div",{className:classnames("fr-void-title",_defineProperty({},s==null?void 0:s.className,!!(s!=null&&s.className)))},s.title)};var ErrorSchema=function a(s){var $=reactExports.useContext(ThemeConfigProvider.ConfigContext),_=translation($);return React$a.createElement("div",null,React$a.createElement("div",{style:{color:"red"}},_("schema_not_match")),React$a.createElement("div",null,JSON.stringify(s)))};const defaultWidgets=Object.freeze(Object.defineProperty({__proto__:null,Card:BoxCard,CardList,Checkbox,Checkboxes:Checkboxes$1,Collapse:BoxCollapse,Color,DatePicker,DateRange:DateRange$1,DrawerList:TableList,ErrorSchema,Html:html,ImageInput:ImageInput$1,Input,InputNumber,LineTitle:FLineTitle,MultiSelect,PercentSlider,Radio,Rate:index$2,Select:MultiSelect,SimpleList,Slider,SubInline:BoxSubInline,Switch,TabList,TableList:TableList$1,TextArea:TextArea$1,TimePicker,TimeRange,TreeSelect,Upload:FrUpload,UrlInput:UrlInput$1,VirtualList,VoidTitle:index},Symbol.toStringTag,{value:"Module"}));function _slicedToArray$1(a,s){return _arrayWithHoles$1(a)||_iterableToArrayLimit$1(a,s)||_unsupportedIterableToArray$1(a,s)||_nonIterableRest$1()}function _nonIterableRest$1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
706
706
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(a,s){if(a){if(typeof a=="string")return _arrayLikeToArray$1(a,s);var $=Object.prototype.toString.call(a).slice(8,-1);if($==="Object"&&a.constructor&&($=a.constructor.name),$==="Map"||$==="Set")return Array.from(a);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return _arrayLikeToArray$1(a,s)}}function _arrayLikeToArray$1(a,s){(s==null||s>a.length)&&(s=a.length);for(var $=0,_=new Array(s);$<s;$++)_[$]=a[$];return _}function _iterableToArrayLimit$1(a,s){var $=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if($!=null){var _,_e,tt,nt,at=[],ot=!0,rt=!1;try{if(tt=($=$.call(a)).next,s===0){if(Object($)!==$)return;ot=!1}else for(;!(ot=(_=tt.call($)).done)&&(at.push(_.value),at.length!==s);ot=!0);}catch(st){rt=!0,_e=st}finally{try{if(!ot&&$.return!=null&&(nt=$.return(),Object(nt)!==nt))return}finally{if(rt)throw _e}}return at}}function _arrayWithHoles$1(a){if(Array.isArray(a))return a}function flattenSchema(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0,$=arguments.length>2?arguments[2]:void 0,_=arguments.length>3?arguments[3]:void 0,_e=_||{},tt=_cloneDeep(a)||{},nt=s||"#";tt.$id||(tt.$id=nt);var at=[];return isObjType(tt)&&(sortProperties(Object.entries(tt.properties)).forEach(function(ot){var rt=_slicedToArray$1(ot,2),st=rt[0],lt=rt[1],et=isListType(lt)?st+"[]":st,it=nt==="#"?et:nt+"."+et;at.push(it),flattenSchema(lt,it,nt,_e)}),tt.properties={}),isListType(tt)&&(sortProperties(Object.entries(tt.items.properties)).forEach(function(ot){var rt=_slicedToArray$1(ot,2),st=rt[0],lt=rt[1],et=isListType(lt)?st+"[]":st,it=nt==="#"?et:nt+"."+et;at.push(it),flattenSchema(lt,it,nt,_e)}),tt.items.properties={}),tt.type&&(_e[nt]={parent:$,schema:tt,children:at}),_e}function _slicedToArray(a,s){return _arrayWithHoles(a)||_iterableToArrayLimit(a,s)||_unsupportedIterableToArray(a,s)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
707
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(a,s){if(a){if(typeof a=="string")return _arrayLikeToArray(a,s);var $=Object.prototype.toString.call(a).slice(8,-1);if($==="Object"&&a.constructor&&($=a.constructor.name),$==="Map"||$==="Set")return Array.from(a);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return _arrayLikeToArray(a,s)}}function _arrayLikeToArray(a,s){(s==null||s>a.length)&&(s=a.length);for(var $=0,_=new Array(s);$<s;$++)_[$]=a[$];return _}function _iterableToArrayLimit(a,s){var $=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if($!=null){var _,_e,tt,nt,at=[],ot=!0,rt=!1;try{if(tt=($=$.call(a)).next,s===0){if(Object($)!==$)return;ot=!1}else for(;!(ot=(_=tt.call($)).done)&&(at.push(_.value),at.length!==s);ot=!0);}catch(st){rt=!0,_e=st}finally{try{if(!ot&&$.return!=null&&(nt=$.return(),Object(nt)!==nt))return}finally{if(rt)throw _e}}return at}}function _arrayWithHoles(a){if(Array.isArray(a))return a}var updateSchemaByPath=function a(s,$,_){var _e=getSchemaFullPath(s,_),tt=_get(_,_e,{}),nt=isFunction$2($)?$(tt):$,at=Object.assign(Object.assign({},tt),nt);nt.props&&(at.props=Object.assign(Object.assign({},tt==null?void 0:tt.props),nt.props)),_set(_,_e,at)},getFieldName=function a(s){if(s){if(typeof s=="boolean")return s;var $=[];return isArray$3(s)&&($=s.map(function(_){return _.split(".").map(function(_e){return isNaN(Number(_e))?_e:_e*1})})),$=s.split(".").map(function(_){return isNaN(Number(_))?_:_*1}),$=$.map(function(_){return typeof _=="string"&&(_==null?void 0:_.indexOf("["))===0&&(_==null?void 0:_.indexOf("]"))===(_==null?void 0:_.length)-1?Number(_.substring(1,_.length-1)):_}),$}},useForm=function a(){var s=Form$3.useForm(),$=_slicedToArray(s,1),_=$[0],_e=reactExports.useRef({}),tt=reactExports.useRef(),nt=reactExports.useRef({}),at=reactExports.useRef({});_.getFieldError;var ot=_.getFieldsError,rt=_.getFieldInstance,st=_.setFieldsValue,lt=_.setFields,et=_.scrollToField,it=_.isFieldsTouched,ut=_.isFieldTouched,ft=_.isFieldValidating,ht=_.resetFields,dt=_.validateFields,gt=__rest$3(_,["getFieldError","getFieldsError","getFieldInstance","setFieldsValue","setFields","scrollToField","isFieldsTouched","isFieldTouched","isFieldValidating","resetFields","validateFields"]),pt=gt,mt=function(At){var xt=tt.current.setState;xt||setTimeout(function(){xt({schema:nt.current,flattenSchema:_e.current})},0),xt(At)},ct=function(At){_e.current=flattenSchema(At)||{},nt.current=At,mt({schema:At,flattenSchema:_e.current})};return pt.setSchema=function(vt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(isObject$6(vt)){if(At){ct(vt);return}var xt=cloneDeep(nt.current);Object.keys(vt||{}).forEach(function(bt){updateSchemaByPath(bt,vt[bt],xt)}),ct(xt)}},pt.setSchemaByPath=function(vt,At){if(!(!hasFuncProperty(At)&&_isMatch(At,pt.getSchemaByPath(vt)))){var xt=cloneDeep(nt.current);updateSchemaByPath(vt,At,xt),ct(xt)}},pt.setValues=function(vt){var At=parseBindToValues(vt,_e.current);st(At)},pt.getValues=function(vt,At){var xt,bt=cloneDeep(_.getFieldsValue(getFieldName(vt),At)),Et=((xt=tt.current)===null||xt===void 0?void 0:xt.getState())||{},St=Et.removeHiddenData;return St&&(bt=filterValuesHidden(bt,_e.current)),bt=filterValuesUndefined(bt),parseValuesToBind(bt,_e.current)},pt.getValueByPath=function(vt){var At=getFieldName(vt);return _.getFieldValue(At)},pt.setValueByPath=function(vt,At){if(!_.setFieldValue){var xt=_.getFieldsValue();_set(xt,vt,At),pt.setValues(xt);return}var bt=getFieldName(vt);_.setFieldValue(bt,At);try{JSON.stringify(_.getFieldValue(bt))!==JSON.stringify(At)&&_.setFieldValue(bt,At)}catch{}},pt.getSchemaByPath=function(vt){typeof vt!="string"&&console.warn("请输入正确的路径");var At=getSchemaFullPath(vt,nt.current);return _get(nt.current,At)},pt.getSchema=function(){return nt.current},pt.setErrorFields=function(vt){var At=transformFieldsData(vt,getFieldName);At&<(At)},pt.removeErrorField=function(vt){lt([{name:getFieldName(vt),errors:[]}])},pt.getFieldError=function(vt){var At=getFieldName(vt);return _.getFieldError(At)},pt.getFieldsError=function(vt){var At=getFieldName(vt);return ot(At)},pt.getFieldInstance=function(vt){var At=getFieldName(vt);return rt(At)},pt.getHiddenValues=function(){var vt=pt.getValues(),At=pt.getValues(!0),xt={},bt=function Et(St,Bt,Ot){Object.keys(St).forEach(function(Tt){var wt=St[Tt],Ct=Ot?"".concat(Ot,".").concat(Tt):Tt;if(!Bt.hasOwnProperty(Tt)){_set(xt,Ct,wt);return}isObject$6(wt)&&Et(wt,Bt[Tt],Ct),isArray$3(wt)&&wt.map(function(It,yt){Et(It,_get(Bt,"".concat(Tt,"[").concat(yt,"]"),[]),"".concat(Ct,"[").concat(yt,"]"))})})};return bt(At,vt,null),xt},pt.setFields=function(vt){var At=transformFieldsData(vt,getFieldName);At&<(At)},pt.__initStore=function(vt){tt.current=vt},pt.scrollToPath=function(vt){for(var At=getFieldName(vt),xt=arguments.length,bt=new Array(xt>1?xt-1:0),Et=1;Et<xt;Et++)bt[Et-1]=arguments[Et];et.apply(void 0,[At].concat(bt))},pt.isFieldsTouched=function(vt,At){var xt=(vt||[]).map(function(bt){return getFieldName(bt)});return it(xt,At)},pt.isFieldTouched=function(vt){var At=getFieldName(vt);return ut(At)},pt.isFieldValidating=function(vt){var At=getFieldName(vt);return ft(At)},pt.resetFields=function(vt){var At=(vt||[]).map(function(xt){return getFieldName(xt)});At.length>0?ht(At):ht()},pt.validateFields=function(vt){var At=(vt||[]).map(function(xt){return getFieldName(xt)});return At.length>0?dt(At):dt()},pt.getFlattenSchema=function(vt){var At;return vt?(At=_e.current)===null||At===void 0?void 0:At[vt]:_e.current},pt.onItemChange=pt.setValueByPath,pt.setFieldRef=function(vt,At){vt&&(at.current[vt]=At)},pt.getFieldRef=function(vt){return at.current[vt]},pt};const FormRender=withProvider(FormCore,defaultWidgets),svgBaseProp={style:{width:"90%",height:"90%"},xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},createSvgIcon=a=>jsxRuntimeExports.jsxs("svg",{...svgBaseProp,children:[jsxRuntimeExports.jsx("rect",{fill:"none",height:"24",width:"24"}),a]}),createButtonConfig=(a,s,$)=>({id:a,icon:createSvgIcon(s),onClick:$}),AlignWidget=a=>{const{activeElements:s,changeSchemas:$,schemas:_,pageSize:_e,schema:tt}=a,nt=rt=>{const st=s.map(ct=>ct.id),lt=_.filter(ct=>st.includes(ct.id)),et=["left","center","right"].includes(rt),it=et?"x":"y",ut=et?"width":"height",ft=lt.length===1,ht=_e[ut],dt=ft?0:Math.min(...lt.map(ct=>ct.position[it])),gt=ft?ht:Math.max(...lt.map(ct=>ct.position[it]+ct[ut]));let pt=dt,mt=ct=>0;["center","middle"].includes(rt)?(pt=(dt+gt)/2,mt=ct=>ct/2):["right","bottom"].includes(rt)&&(pt=gt,mt=ct=>ct),$(lt.map(ct=>({key:`position.${it}`,value:round(pt-mt(ct[ut]),2),schemaId:ct.id})))},at=rt=>{const st=s.map(At=>At.id),lt=_.filter(At=>st.includes(At.id)),et=rt==="vertical",it=et?"y":"x",ut=et?"height":"width",ft=Math.min(...lt.map(At=>At.position[it])),ht=Math.max(...lt.map(At=>At.position[it]+At[ut]));if(lt.length<3)return;const dt=ft,gt=ht-ft,pt=lt.reduce((At,xt)=>At+xt[ut],0),ct=(gt-pt)/(lt.length-1);let vt=0;$(lt.map((At,xt)=>{vt+=xt===0?0:lt[xt-1][ut]+ct;const bt=round(dt+vt,2);return{key:`position.${it}`,value:bt,schemaId:At.id}}))},ot=[createButtonConfig("left",jsxRuntimeExports.jsx("path",{d:"M4,22H2V2h2V22z M22,7H6v3h16V7z M16,14H6v3h10V14z"}),()=>nt("left")),createButtonConfig("center",jsxRuntimeExports.jsx("polygon",{points:"11,2 13,2 13,7 21,7 21,10 13,10 13,14 18,14 18,17 13,17 13,22 11,22 11,17 6,17 6,14 11,14 11,10 3,10 3,7 11,7"}),()=>nt("center")),createButtonConfig("right",jsxRuntimeExports.jsx("path",{d:"M20,2h2v20h-2V2z M2,10h16V7H2V10z M8,17h10v-3H8V17z"}),()=>nt("right")),createButtonConfig("top",jsxRuntimeExports.jsx("path",{d:"M22,2v2H2V2H22z M7,22h3V6H7V22z M14,16h3V6h-3V16z"}),()=>nt("top")),createButtonConfig("middle",jsxRuntimeExports.jsx("polygon",{points:"22,11 17,11 17,6 14,6 14,11 10,11 10,3 7,3 7,11 1.84,11 1.84,13 7,13 7,21 10,21 10,13 14,13 14,18 17,18 17,13 22,13"}),()=>nt("middle")),createButtonConfig("bottom",jsxRuntimeExports.jsx("path",{d:"M22,22H2v-2h20V22z M10,2H7v16h3V2z M17,8h-3v10h3V8z"}),()=>nt("bottom")),createButtonConfig("vertical",jsxRuntimeExports.jsx("path",{d:"M22,2v2H2V2H22z M7,10.5v3h10v-3H7z M2,20v2h20v-2H2z"}),()=>at("vertical")),createButtonConfig("horizontal",jsxRuntimeExports.jsx("path",{d:"M4,22H2V2h2V22z M22,2h-2v20h2V2z M13.5,7h-3v10h3V7z"}),()=>at("horizontal"))];return jsxRuntimeExports.jsx(Form$3.Item,{label:tt.title,children:jsxRuntimeExports.jsx(Button$2.Group,{children:ot.map(rt=>jsxRuntimeExports.jsx(Button$2,{style:{padding:7},disabled:s.length<=2&&["vertical","horizontal"].includes(rt.id),...rt},rt.id))})})},AlignWidget$1=AlignWidget,WidgetRenderer=a=>{const{widget:s,...$}=a,_=reactExports.useRef(null);return reactExports.useEffect(()=>(_.current&&(_.current.innerHTML="",s({...$,rootElement:_.current})),()=>{_.current&&(_.current.innerHTML="")}),[a.activeSchema]),jsxRuntimeExports.jsx("div",{ref:_})},WidgetRenderer$1=WidgetRenderer,{Text:Text$2}=Typography$1,DetailView=a=>{const{token:s}=theme.useToken(),{size:$,changeSchemas:_,deselectSchema:_e,activeSchema:tt,activeElements:nt}=a,at=useForm(),ot=reactExports.useContext(I18nContext),rt=reactExports.useContext(PluginsRegistry),st=reactExports.useContext(OptionsContext),[lt,et]=reactExports.useState({});reactExports.useEffect(()=>{const pt={AlignWidget:mt=>jsxRuntimeExports.jsx(AlignWidget$1,{...mt,...a,options:st}),Divider:()=>jsxRuntimeExports.jsx(Divider$1,{style:{marginTop:s.marginXS,marginBottom:s.marginXS}})};for(const mt of Object.values(rt)){const ct=(mt==null?void 0:mt.propPanel.widgets)||{};Object.entries(ct).forEach(([vt,At])=>{pt[vt]=xt=>jsxRuntimeExports.jsx(WidgetRenderer$1,{...xt,...a,options:st,theme:s,i18n:ot,widget:At})})}et(pt)},[tt,nt,rt,JSON.stringify(st)]),reactExports.useEffect(()=>{const pt={...tt};pt.x=pt.position.x,pt.y=pt.position.y,delete pt.position,pt.key!==(at.getValues()||{}).key&&at.resetFields(),at.setValues(pt)},[at,tt]);const it=pt=>{const mt=[];for(let ct in pt)if(!["id","content"].includes(ct)&&pt[ct]!==tt[ct]){let vt=pt[ct];vt===null&&["rotate","opacity"].includes(ct)&&(vt=void 0),ct==="x"&&(ct="position.x"),ct==="y"&&(ct="position.y"),mt.push({key:ct,value:vt,schemaId:tt.id})}mt.length&&_(mt)},ut=Object.values(rt).find(pt=>(pt==null?void 0:pt.propPanel.defaultSchema.type)===tt.type),ft=ut==null?void 0:ut.propPanel.schema;ft||console.error(`[@pdfme/ui] No propPanel.schema for ${tt.type}.
|
707
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(a,s){if(a){if(typeof a=="string")return _arrayLikeToArray(a,s);var $=Object.prototype.toString.call(a).slice(8,-1);if($==="Object"&&a.constructor&&($=a.constructor.name),$==="Map"||$==="Set")return Array.from(a);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return _arrayLikeToArray(a,s)}}function _arrayLikeToArray(a,s){(s==null||s>a.length)&&(s=a.length);for(var $=0,_=new Array(s);$<s;$++)_[$]=a[$];return _}function _iterableToArrayLimit(a,s){var $=a==null?null:typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if($!=null){var _,_e,tt,nt,at=[],ot=!0,rt=!1;try{if(tt=($=$.call(a)).next,s===0){if(Object($)!==$)return;ot=!1}else for(;!(ot=(_=tt.call($)).done)&&(at.push(_.value),at.length!==s);ot=!0);}catch(st){rt=!0,_e=st}finally{try{if(!ot&&$.return!=null&&(nt=$.return(),Object(nt)!==nt))return}finally{if(rt)throw _e}}return at}}function _arrayWithHoles(a){if(Array.isArray(a))return a}var updateSchemaByPath=function a(s,$,_){var _e=getSchemaFullPath(s,_),tt=_get(_,_e,{}),nt=isFunction$2($)?$(tt):$,at=Object.assign(Object.assign({},tt),nt);nt.props&&(at.props=Object.assign(Object.assign({},tt==null?void 0:tt.props),nt.props)),_set(_,_e,at)},getFieldName=function a(s){if(s){if(typeof s=="boolean")return s;var $=[];return isArray$3(s)&&($=s.map(function(_){return _.split(".").map(function(_e){return isNaN(Number(_e))?_e:_e*1})})),$=s.split(".").map(function(_){return isNaN(Number(_))?_:_*1}),$=$.map(function(_){return typeof _=="string"&&(_==null?void 0:_.indexOf("["))===0&&(_==null?void 0:_.indexOf("]"))===(_==null?void 0:_.length)-1?Number(_.substring(1,_.length-1)):_}),$}},useForm=function a(){var s=Form$3.useForm(),$=_slicedToArray(s,1),_=$[0],_e=reactExports.useRef({}),tt=reactExports.useRef(),nt=reactExports.useRef({}),at=reactExports.useRef({});_.getFieldError;var ot=_.getFieldsError,rt=_.getFieldInstance,st=_.setFieldsValue,lt=_.setFields,et=_.scrollToField,it=_.isFieldsTouched,ut=_.isFieldTouched,ft=_.isFieldValidating,ht=_.resetFields,dt=_.validateFields,gt=__rest$3(_,["getFieldError","getFieldsError","getFieldInstance","setFieldsValue","setFields","scrollToField","isFieldsTouched","isFieldTouched","isFieldValidating","resetFields","validateFields"]),pt=gt,mt=function(At){var xt=tt.current.setState;xt||setTimeout(function(){xt({schema:nt.current,flattenSchema:_e.current})},0),xt(At)},ct=function(At){_e.current=flattenSchema(At)||{},nt.current=At,mt({schema:At,flattenSchema:_e.current})};return pt.setSchema=function(vt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(isObject$6(vt)){if(At){ct(vt);return}var xt=cloneDeep(nt.current);Object.keys(vt||{}).forEach(function(bt){updateSchemaByPath(bt,vt[bt],xt)}),ct(xt)}},pt.setSchemaByPath=function(vt,At){if(!(!hasFuncProperty(At)&&_isMatch(At,pt.getSchemaByPath(vt)))){var xt=cloneDeep(nt.current);updateSchemaByPath(vt,At,xt),ct(xt)}},pt.setValues=function(vt){var At=parseBindToValues(vt,_e.current);st(At)},pt.getValues=function(vt,At){var xt,bt=cloneDeep(_.getFieldsValue(getFieldName(vt),At)),Et=((xt=tt.current)===null||xt===void 0?void 0:xt.getState())||{},St=Et.removeHiddenData;return St&&(bt=filterValuesHidden(bt,_e.current)),bt=filterValuesUndefined(bt),parseValuesToBind(bt,_e.current)},pt.getValueByPath=function(vt){var At=getFieldName(vt);return _.getFieldValue(At)},pt.setValueByPath=function(vt,At){if(!_.setFieldValue){var xt=_.getFieldsValue();_set(xt,vt,At),pt.setValues(xt);return}var bt=getFieldName(vt);_.setFieldValue(bt,At);try{JSON.stringify(_.getFieldValue(bt))!==JSON.stringify(At)&&_.setFieldValue(bt,At)}catch{}},pt.getSchemaByPath=function(vt){typeof vt!="string"&&console.warn("请输入正确的路径");var At=getSchemaFullPath(vt,nt.current);return _get(nt.current,At)},pt.getSchema=function(){return nt.current},pt.setErrorFields=function(vt){var At=transformFieldsData(vt,getFieldName);At&<(At)},pt.removeErrorField=function(vt){lt([{name:getFieldName(vt),errors:[]}])},pt.getFieldError=function(vt){var At=getFieldName(vt);return _.getFieldError(At)},pt.getFieldsError=function(vt){var At=getFieldName(vt);return ot(At)},pt.getFieldInstance=function(vt){var At=getFieldName(vt);return rt(At)},pt.getHiddenValues=function(){var vt=pt.getValues(),At=pt.getValues(!0),xt={},bt=function Et(St,Bt,Ot){Object.keys(St).forEach(function(Tt){var wt=St[Tt],Ct=Ot?"".concat(Ot,".").concat(Tt):Tt;if(!Bt.hasOwnProperty(Tt)){_set(xt,Ct,wt);return}isObject$6(wt)&&Et(wt,Bt[Tt],Ct),isArray$3(wt)&&wt.map(function(It,yt){Et(It,_get(Bt,"".concat(Tt,"[").concat(yt,"]"),[]),"".concat(Ct,"[").concat(yt,"]"))})})};return bt(At,vt,null),xt},pt.setFields=function(vt){var At=transformFieldsData(vt,getFieldName);At&<(At)},pt.__initStore=function(vt){tt.current=vt},pt.scrollToPath=function(vt){for(var At=getFieldName(vt),xt=arguments.length,bt=new Array(xt>1?xt-1:0),Et=1;Et<xt;Et++)bt[Et-1]=arguments[Et];et.apply(void 0,[At].concat(bt))},pt.isFieldsTouched=function(vt,At){var xt=(vt||[]).map(function(bt){return getFieldName(bt)});return it(xt,At)},pt.isFieldTouched=function(vt){var At=getFieldName(vt);return ut(At)},pt.isFieldValidating=function(vt){var At=getFieldName(vt);return ft(At)},pt.resetFields=function(vt){var At=(vt||[]).map(function(xt){return getFieldName(xt)});At.length>0?ht(At):ht()},pt.validateFields=function(vt){var At=(vt||[]).map(function(xt){return getFieldName(xt)});return At.length>0?dt(At):dt()},pt.getFlattenSchema=function(vt){var At;return vt?(At=_e.current)===null||At===void 0?void 0:At[vt]:_e.current},pt.onItemChange=pt.setValueByPath,pt.setFieldRef=function(vt,At){vt&&(at.current[vt]=At)},pt.getFieldRef=function(vt){return at.current[vt]},pt};const FormRender=withProvider(FormCore,defaultWidgets),svgBaseProp={style:{width:"90%",height:"90%"},xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"#000000"},createSvgIcon=a=>jsxRuntimeExports.jsxs("svg",{...svgBaseProp,children:[jsxRuntimeExports.jsx("rect",{fill:"none",height:"24",width:"24"}),a]}),createButtonConfig=(a,s,$)=>({id:a,icon:createSvgIcon(s),onClick:$}),AlignWidget=a=>{const{activeElements:s,changeSchemas:$,schemas:_,pageSize:_e,schema:tt}=a,nt=rt=>{const st=s.map(ct=>ct.id),lt=_.filter(ct=>st.includes(ct.id)),et=["left","center","right"].includes(rt),it=et?"x":"y",ut=et?"width":"height",ft=lt.length===1,ht=_e[ut],dt=ft?0:Math.min(...lt.map(ct=>ct.position[it])),gt=ft?ht:Math.max(...lt.map(ct=>ct.position[it]+ct[ut]));let pt=dt,mt=ct=>0;["center","middle"].includes(rt)?(pt=(dt+gt)/2,mt=ct=>ct/2):["right","bottom"].includes(rt)&&(pt=gt,mt=ct=>ct),$(lt.map(ct=>({key:`position.${it}`,value:round(pt-mt(ct[ut]),2),schemaId:ct.id})))},at=rt=>{const st=s.map(At=>At.id),lt=_.filter(At=>st.includes(At.id)),et=rt==="vertical",it=et?"y":"x",ut=et?"height":"width",ft=Math.min(...lt.map(At=>At.position[it])),ht=Math.max(...lt.map(At=>At.position[it]+At[ut]));if(lt.length<3)return;const dt=ft,gt=ht-ft,pt=lt.reduce((At,xt)=>At+xt[ut],0),ct=(gt-pt)/(lt.length-1);let vt=0;$(lt.map((At,xt)=>{vt+=xt===0?0:lt[xt-1][ut]+ct;const bt=round(dt+vt,2);return{key:`position.${it}`,value:bt,schemaId:At.id}}))},ot=[createButtonConfig("left",jsxRuntimeExports.jsx("path",{d:"M4,22H2V2h2V22z M22,7H6v3h16V7z M16,14H6v3h10V14z"}),()=>nt("left")),createButtonConfig("center",jsxRuntimeExports.jsx("polygon",{points:"11,2 13,2 13,7 21,7 21,10 13,10 13,14 18,14 18,17 13,17 13,22 11,22 11,17 6,17 6,14 11,14 11,10 3,10 3,7 11,7"}),()=>nt("center")),createButtonConfig("right",jsxRuntimeExports.jsx("path",{d:"M20,2h2v20h-2V2z M2,10h16V7H2V10z M8,17h10v-3H8V17z"}),()=>nt("right")),createButtonConfig("top",jsxRuntimeExports.jsx("path",{d:"M22,2v2H2V2H22z M7,22h3V6H7V22z M14,16h3V6h-3V16z"}),()=>nt("top")),createButtonConfig("middle",jsxRuntimeExports.jsx("polygon",{points:"22,11 17,11 17,6 14,6 14,11 10,11 10,3 7,3 7,11 1.84,11 1.84,13 7,13 7,21 10,21 10,13 14,13 14,18 17,18 17,13 22,13"}),()=>nt("middle")),createButtonConfig("bottom",jsxRuntimeExports.jsx("path",{d:"M22,22H2v-2h20V22z M10,2H7v16h3V2z M17,8h-3v10h3V8z"}),()=>nt("bottom")),createButtonConfig("vertical",jsxRuntimeExports.jsx("path",{d:"M22,2v2H2V2H22z M7,10.5v3h10v-3H7z M2,20v2h20v-2H2z"}),()=>at("vertical")),createButtonConfig("horizontal",jsxRuntimeExports.jsx("path",{d:"M4,22H2V2h2V22z M22,2h-2v20h2V2z M13.5,7h-3v10h3V7z"}),()=>at("horizontal"))];return jsxRuntimeExports.jsx(Form$3.Item,{label:tt.title,children:jsxRuntimeExports.jsx(Button$2.Group,{children:ot.map(rt=>jsxRuntimeExports.jsx(Button$2,{style:{padding:7},disabled:s.length<=2&&["vertical","horizontal"].includes(rt.id),...rt},rt.id))})})},AlignWidget$1=AlignWidget,WidgetRenderer=a=>{const{widget:s,...$}=a,_=reactExports.useRef(null);return reactExports.useEffect(()=>(_.current&&(_.current.innerHTML="",s({...$,rootElement:_.current})),()=>{_.current&&(_.current.innerHTML="")}),[a.activeSchema]),jsxRuntimeExports.jsx("div",{ref:_})},WidgetRenderer$1=WidgetRenderer,ButtonGroupWidget=a=>{const{activeElements:s,changeSchemas:$,schemas:_,schema:_e}=a,tt=ot=>{const rt=ot.key,st=ot.type,lt=s.map(it=>it.id),et=_.filter(it=>lt.includes(it.id));$(et.map(it=>{const ut=it[rt]??!1,ft=st==="boolean"?!ut:ot.value;return{key:rt,value:ft,schemaId:it.id}}))},nt=ot=>{const rt=ot.key,st=ot.type;let lt=!1;const et=s.map(ut=>ut.id);return _.filter(ut=>et.includes(ut.id)).forEach(ut=>{lt=st==="boolean"?ut[rt]??!1:ut[rt]===ot.value}),lt},at=ot=>{const rt=`data:image/svg+xml;utf8,${encodeURIComponent(ot)}`;return jsxRuntimeExports.jsx("img",{width:17,height:17,src:rt})};return jsxRuntimeExports.jsx(Form$3.Item,{children:jsxRuntimeExports.jsx(Button$2.Group,{children:_e.buttons.map((ot,rt)=>{const st=nt(ot);return jsxRuntimeExports.jsx(Button$2,{type:st?"primary":void 0,ghost:st,onClick:()=>tt(ot),style:{padding:7,zIndex:st?2:0},icon:at(ot.icon)},rt)})})})},ButtonGroupWidget$1=ButtonGroupWidget,{Text:Text$2}=Typography$1,DetailView=a=>{const{token:s}=theme.useToken(),{size:$,changeSchemas:_,deselectSchema:_e,activeSchema:tt,activeElements:nt}=a,at=useForm(),ot=reactExports.useContext(I18nContext),rt=reactExports.useContext(PluginsRegistry),st=reactExports.useContext(OptionsContext),[lt,et]=reactExports.useState({});reactExports.useEffect(()=>{const pt={AlignWidget:mt=>jsxRuntimeExports.jsx(AlignWidget$1,{...mt,...a,options:st}),Divider:()=>jsxRuntimeExports.jsx(Divider$1,{style:{marginTop:s.marginXS,marginBottom:s.marginXS}}),ButtonGroup:mt=>jsxRuntimeExports.jsx(ButtonGroupWidget$1,{...mt,...a,options:st})};for(const mt of Object.values(rt)){const ct=(mt==null?void 0:mt.propPanel.widgets)||{};Object.entries(ct).forEach(([vt,At])=>{pt[vt]=xt=>jsxRuntimeExports.jsx(WidgetRenderer$1,{...xt,...a,options:st,theme:s,i18n:ot,widget:At})})}et(pt)},[tt,nt,rt,JSON.stringify(st)]),reactExports.useEffect(()=>{const pt={...tt};pt.x=pt.position.x,pt.y=pt.position.y,delete pt.position,pt.key!==(at.getValues()||{}).key&&at.resetFields(),at.setValues(pt)},[at,tt]);const it=pt=>{const mt=[];for(let ct in pt)if(!["id","content"].includes(ct)&&pt[ct]!==tt[ct]){let vt=pt[ct];vt===null&&["rotate","opacity"].includes(ct)&&(vt=void 0),ct==="x"&&(ct="position.x"),ct==="y"&&(ct="position.y"),mt.push({key:ct,value:vt,schemaId:tt.id})}mt.length&&_(mt)},ut=Object.values(rt).find(pt=>(pt==null?void 0:pt.propPanel.defaultSchema.type)===tt.type),ft=ut==null?void 0:ut.propPanel.schema;ft||console.error(`[@pdfme/ui] No propPanel.schema for ${tt.type}.
|
708
708
|
Check this document: https://pdfme.com/docs/custom-schemas`);const ht=Object.entries(rt).map(([pt,mt])=>({label:pt,value:mt==null?void 0:mt.propPanel.defaultSchema.type})),dt=ut.propPanel.defaultSchema,gt={type:"object",column:2,properties:{type:{title:ot("type"),type:"string",widget:"select",props:{options:ht},required:!0,span:10},key:{title:ot("fieldName"),type:"string",required:!0,span:14},"-":{type:"void",widget:"Divider"},align:{title:ot("align"),type:"void",widget:"AlignWidget"},x:{title:"X",type:"number",widget:"inputNumber",required:!0,span:8,min:0},y:{title:"Y",type:"number",widget:"inputNumber",required:!0,span:8,min:0},rotate:{title:ot("rotate"),type:"number",widget:"inputNumber",disabled:(dt==null?void 0:dt.rotate)===void 0,max:360,props:{min:0},span:8},width:{title:ot("width"),type:"number",widget:"inputNumber",required:!0,span:8,props:{min:0}},height:{title:ot("height"),type:"number",widget:"inputNumber",required:!0,span:8,props:{min:0}},opacity:{title:ot("opacity"),type:"number",widget:"inputNumber",disabled:(dt==null?void 0:dt.opacity)===void 0,props:{step:.1,min:0,max:1},span:8}}};if(typeof ft=="function"){const pt=ft({...a,options:st,theme:s,i18n:ot})||{};gt.properties={...gt.properties,...Object.keys(pt).length===0?{}:{"--":{type:"void",widget:"Divider"}},...pt}}else{const pt=ft||{};gt.properties={...gt.properties,...Object.keys(pt).length===0?{}:{"--":{type:"void",widget:"Divider"}},...pt}}return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{style:{height:40,display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(Button$2,{style:{position:"absolute",zIndex:100,display:"flex",alignItems:"center",justifyContent:"center"},onClick:_e,icon:jsxRuntimeExports.jsx(MenuOutlined$1,{})}),jsxRuntimeExports.jsx(Text$2,{strong:!0,style:{textAlign:"center",width:"100%"},children:ot("editField")})]}),jsxRuntimeExports.jsx(Divider$1,{style:{marginTop:s.marginXS,marginBottom:s.marginXS}}),jsxRuntimeExports.jsx("div",{style:{height:getSidebarContentHeight($.height),overflowY:"auto",overflowX:"hidden"},children:jsxRuntimeExports.jsx(FormRender,{form:at,schema:gt,widgets:lt,watch:{"#":it},locale:"en-US"})})]})},DetailView$1=DetailView,Sidebar=a=>{const{sidebarOpen:s,setSidebarOpen:$,activeElements:_,schemas:_e}=a,{token:tt}=theme.useToken(),nt=()=>_e.filter(ot=>_.map(rt=>rt.id).includes(ot.id)),at=()=>{const ot=nt();return ot[ot.length-1]};return jsxRuntimeExports.jsx("div",{style:{position:"absolute",right:0,zIndex:1,height:"100%",width:s?RIGHT_SIDEBAR_WIDTH:0},children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(Button$2,{style:{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"1rem",right:"1rem",zIndex:100},icon:s?jsxRuntimeExports.jsx(ArrowRightOutlined$1,{}):jsxRuntimeExports.jsx(ArrowLeftOutlined$1,{}),onClick:()=>$(!s)}),jsxRuntimeExports.jsx("div",{style:{width:RIGHT_SIDEBAR_WIDTH,height:"100%",display:s?"block":"none",top:0,right:0,position:"absolute",padding:"0.7rem 1rem",overflowY:"auto",fontFamily:"'Open Sans', sans-serif",boxSizing:"border-box",background:tt.colorBgLayout},children:jsxRuntimeExports.jsx("div",{children:nt().length===0?jsxRuntimeExports.jsx(ListView$1,{...a}):jsxRuntimeExports.jsx(DetailView$1,{...a,activeSchema:at()})})})]})})},RightSidebar=Sidebar,Wrapper=({children:a,outline:s,onChangeHoveringSchemaId:$,schema:_})=>jsxRuntimeExports.jsx("div",{title:_.key,onMouseEnter:()=>$&&$(_.id),onMouseLeave:()=>$&&$(null),className:SELECTABLE_CLASSNAME,id:_.id,style:{position:"absolute",cursor:_.readOnly?"initial":"pointer",height:_.height*ZOOM,width:_.width*ZOOM,top:_.position.y*ZOOM,left:_.position.x*ZOOM,transform:`rotate(${_.rotate??0}deg)`,opacity:_.opacity??1,outline:s},children:a}),Renderer=a=>{const s=reactExports.useContext(PluginsRegistry),$=reactExports.useContext(OptionsContext),_=reactExports.useContext(I18nContext),{token:_e}=theme.useToken(),{schema:tt,basePdf:nt,value:at,mode:ot,onChange:rt,stopEditing:st,tabIndex:lt,placeholder:et,scale:it}=a,ut=reactExports.useRef(null),ft=reactExports.useRef(new Map);return reactExports.useEffect(()=>{var ht;if(ut.current&&tt.type){const dt=(ht=Object.values(s).find(gt=>(gt==null?void 0:gt.propPanel.defaultSchema.type)===tt.type))==null?void 0:ht.ui;if(!dt){console.error(`[@pdfme/ui] Renderer for type ${tt.type} not found.
|
709
709
|
Check this document: https://pdfme.com/docs/custom-schemas`);return}ut.current.innerHTML="",dt({key:tt.key,value:at,schema:tt,basePdf:nt,rootElement:ut.current,mode:ot,onChange:rt,stopEditing:st,tabIndex:lt,placeholder:et,options:$,theme:_e,i18n:_,pdfJs,_cache:ft.current})}return()=>{ut.current&&(ut.current.innerHTML="")}},[at,JSON.stringify(tt),JSON.stringify($),ot,it]),jsxRuntimeExports.jsx(Wrapper,{...a,children:jsxRuntimeExports.jsx("div",{style:{height:"100%",width:"100%"},ref:ut})})},Renderer$1=Renderer,Draggable$1=a=>{const{scale:s,basePdf:$,plugin:_}=a,{token:_e}=theme.useToken(),tt=_.propPanel.defaultSchema,nt=useDraggable({id:tt.type,data:tt}),{listeners:at,setNodeRef:ot,attributes:rt,transform:st,isDragging:lt}=nt,et={transform:CSS$1.Translate.toString(st)};return jsxRuntimeExports.jsxs("div",{ref:ot,style:et,...at,...rt,children:[lt&&jsxRuntimeExports.jsx("div",{style:{transform:`scale(${s})`},children:jsxRuntimeExports.jsx(Renderer$1,{schema:{...tt,id:tt.type,key:tt.type},basePdf:$,value:tt.content||"",onChangeHoveringSchemaId:()=>{},mode:"viewer",outline:`1px solid ${_e.colorPrimary}`,scale:s},tt.type)}),jsxRuntimeExports.jsx("div",{style:{visibility:lt?"hidden":"visible"},children:a.children})]})},LeftSidebar=({height:a,scale:s,basePdf:$})=>{const{token:_}=theme.useToken(),_e=reactExports.useContext(PluginsRegistry);return jsxRuntimeExports.jsx("div",{style:{left:0,position:"absolute",right:0,zIndex:1,height:a,background:_.colorBgLayout,textAlign:"center",width:45},children:Object.entries(_e).map(([tt,nt])=>nt!=null&&nt.propPanel.defaultSchema?jsxRuntimeExports.jsx(Draggable$1,{scale:s,basePdf:$,plugin:nt,children:jsxRuntimeExports.jsx(Button$2,{title:tt,style:{width:35,height:35,marginTop:"0.25rem",padding:"0.25rem"},children:nt.propPanel.defaultSchema.icon?jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:nt.propPanel.defaultSchema.icon}}):jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:tt})})},tt):null)})},LeftSidebar$1=LeftSidebar,Paper=a=>{const{paperRefs:s,scale:$,size:_,schemasList:_e,pageSizes:tt,backgrounds:nt,renderPaper:at,renderSchema:ot,hasRulers:rt}=a,st=reactExports.useContext(FontContext),lt=rt?RULER_HEIGHT:0;return tt.length!==nt.length||tt.length!==_e.length?null:jsxRuntimeExports.jsx("div",{style:{transform:`scale(${$})`,transformOrigin:"top left",height:$,width:$},children:nt.map((et,it)=>{const ut=tt[it],ft={width:ut.width*ZOOM,height:ut.height*ZOOM},ht=ft.width*$+lt<_.width?`${(_.width/$-ft.width)/2}px`:`${lt}px`;let dt=it>0?(lt+PAGE_GAP)*(it+1):lt;return rt||(dt+=PAGE_GAP*2),jsxRuntimeExports.jsxs("div",{ref:gt=>{gt&&(s.current[it]=gt)},onMouseDown:gt=>{gt.currentTarget===gt.target&&document&&document.hasFocus()&&document.activeElement instanceof HTMLElement&&document.activeElement.blur()},style:{fontFamily:`'${getFallbackFontName(st)}'`,top:`${dt}px`,left:ht,position:"relative",backgroundImage:`url(${et})`,backgroundSize:`${ft.width}px ${ft.height}px`,...ft},children:[at&&at({paperSize:ft,index:it}),_e[it].map((gt,pt)=>jsxRuntimeExports.jsx("div",{children:ot({schema:gt,index:it===0?pt:pt+_e[it-1].length})},gt.id))]},String(it)+JSON.stringify(ft))})})},Paper$1=Paper;var FUNCTION="function",OBJECT="object",STRING="string",UNDEFINED="undefined",doc=typeof document!==UNDEFINED&&document,OPEN_CLOSED_CHARACTERS=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],TINY_NUM$1=1e-7,DEFAULT_UNIT_PRESETS={cm:function(a){return a*96/2.54},mm:function(a){return a*96/254},in:function(a){return a*96},pt:function(a){return a*96/72},pc:function(a){return a*96/6},"%":function(a,s){return a*s/100},vw:function(a,s){return s===void 0&&(s=window.innerWidth),a/100*s},vh:function(a,s){return s===void 0&&(s=window.innerHeight),a/100*s},vmax:function(a,s){return s===void 0&&(s=Math.max(window.innerWidth,window.innerHeight)),a/100*s},vmin:function(a,s){return s===void 0&&(s=Math.min(window.innerWidth,window.innerHeight)),a/100*s}};/*! *****************************************************************************
|
710
710
|
Copyright (c) Microsoft Corporation.
|