/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[7],{339:function(Ca,va,ba){ba.r(va);var pa=ba(2),ka=ba(365),la=ba(366),fa;(function(ca){ca[ca.EXTERNAL_XFDF_NOT_REQUESTED=0]="EXTERNAL_XFDF_NOT_REQUESTED";ca[ca.EXTERNAL_XFDF_NOT_AVAILABLE=1]="EXTERNAL_XFDF_NOT_AVAILABLE";ca[ca.EXTERNAL_XFDF_AVAILABLE=2]="EXTERNAL_XFDF_AVAILABLE"})(fa||(fa={}));Ca=function(){function ca(z){this.aa=z;this.state=fa.EXTERNAL_XFDF_NOT_REQUESTED}ca.prototype.M_=function(){var z=this;return function(r,
n,b){return Object(pa.b)(z,void 0,void 0,function(){var a,e,f,x,w,h,y,aa=this,ja;return Object(pa.d)(this,function(ha){switch(ha.label){case 0:if(this.state!==fa.EXTERNAL_XFDF_NOT_REQUESTED)return[3,2];a=this.aa.getDocument().Eo();return[4,this.uZ(a)];case 1:e=ha.ia(),f=this.cW(e),this.HB=null!==(ja=null===f||void 0===f?void 0:f.parse())&&void 0!==ja?ja:null,this.state=null===this.HB?fa.EXTERNAL_XFDF_NOT_AVAILABLE:fa.EXTERNAL_XFDF_AVAILABLE,ha.label=2;case 2:if(this.state===fa.EXTERNAL_XFDF_NOT_AVAILABLE)return b(r),
[2];x=new DOMParser;w=x.parseFromString(r,"text/xml");n.forEach(function(ia){aa.merge(w,aa.HB,ia-1)});h=new XMLSerializer;y=h.serializeToString(w);b(y);return[2]}})})}};ca.prototype.HE=function(z){this.uZ=z};ca.prototype.Ad=function(){this.HB=void 0;this.state=fa.EXTERNAL_XFDF_NOT_REQUESTED};ca.prototype.cW=function(z){return z?Array.isArray(z)?new ka.a(z):"string"!==typeof z?null:(new DOMParser).parseFromString(z,"text/xml").querySelector("xfdf > add")?new ka.a(z):new la.a(z):null};ca.prototype.merge=
function(z,r,n){var b=this;0===n&&(this.T1(z,r.Xl),this.V1(z,r.vB));var a=r.ba[n];a&&(this.W1(z,a.ek),this.Y1(z,a.qQ,r.tr),this.X1(z,a.page,n),this.U1(z,a.pJ));a=this.aa.nc();if(n===a-1){var e=r.tr;Object.keys(e).forEach(function(f){e[f].JC||b.oM(z,f,e[f])})}};ca.prototype.T1=function(z,r){null!==r&&(z=this.Oq(z),this.en(z,"calculation-order",r))};ca.prototype.V1=function(z,r){null!==r&&(z=this.Oq(z),this.en(z,"document-actions",r))};ca.prototype.W1=function(z,r){var n=this,b=this.Nq(z.querySelector("xfdf"),
"annots");Object.keys(r).forEach(function(a){n.en(b,'[name="'+a+'"]',r[a])})};ca.prototype.Y1=function(z,r,n){var b=this;if(0!==r.length){var a=this.Oq(z);r.forEach(function(e){var f=e.getAttribute("field"),x=n[f];x&&(b.oM(z,f,x),b.en(a,"null",e))})}};ca.prototype.oM=function(z,r,n){var b=this.Oq(z);null!==n.uw&&this.en(b,'ffield [name="'+r+'"]',n.uw);z=this.Nq(z.querySelector("xfdf"),"fields");r=r.split(".");this.aE(z,r,0,n.value);n.JC=!0};ca.prototype.X1=function(z,r,n){null!==r&&(z=this.Oq(z),
z=this.Nq(z,"pages"),this.en(z,'[number="'+(n+1)+'"]',r))};ca.prototype.U1=function(z,r){Object.keys(r).forEach(function(n){(n=z.querySelector('annots [name="'+n+'"]'))&&n.parentElement.removeChild(n)})};ca.prototype.aE=function(z,r,n,b){if(n===r.length)r=document.createElementNS("","value"),r.textContent=b,this.en(z,"value",r);else{var a=r[n];this.Nq(z,'[name="'+a+'"]',"field").setAttribute("name",a);z=z.querySelectorAll('[name="'+a+'"]');1===z.length?this.aE(z[0],r,n+1,b):(a=this.DY(z),this.aE(n===
r.length-1?a:this.R7(z,a),r,n+1,b))}};ca.prototype.DY=function(z){for(var r=null,n=0;n<z.length;n++){var b=z[n];if(0===b.childElementCount||1===b.childElementCount&&"value"===b.children[0].tagName){r=b;break}}return r};ca.prototype.R7=function(z,r){for(var n=0;n<z.length;n++)if(z[n]!==r)return z[n];return null};ca.prototype.en=function(z,r,n){r=z.querySelector(r);null!==r&&z.removeChild(r);z.appendChild(n)};ca.prototype.Oq=function(z){var r=z.querySelector("pdf-info");if(null!==r)return r;r=this.Nq(z.querySelector("xfdf"),
"pdf-info");r.setAttribute("xmlns","http://www.pdftron.com/pdfinfo");r.setAttribute("version","2");r.setAttribute("import-version","3");return r};ca.prototype.Nq=function(z,r,n){var b=z.querySelector(r);if(null!==b)return b;b=document.createElementNS("",n||r);z.appendChild(b);return b};return ca}();va["default"]=Ca},351:function(Ca,va){Ca=function(){function ba(){}ba.prototype.kv=function(pa){var ka={Xl:null,vB:null,tr:{},ba:{}};pa=(new DOMParser).parseFromString(pa,"text/xml");ka.Xl=pa.querySelector("pdf-info calculation-order");
ka.vB=pa.querySelector("pdf-info document-actions");ka.tr=this.S2(pa);ka.ba=this.e3(pa);return ka};ba.prototype.S2=function(pa){var ka=pa.querySelector("fields");pa=pa.querySelectorAll("pdf-info > ffield");if(null===ka&&null===pa)return{};var la={};this.eU(la,ka);this.bU(la,pa);return la};ba.prototype.eU=function(pa,ka){if(null!==ka&&ka.children){for(var la=[],fa=0;fa<ka.children.length;fa++){var ca=ka.children[fa];la.push({name:ca.getAttribute("name"),element:ca})}for(;0!==la.length;)for(ka=la.shift(),
fa=0;fa<ka.element.children.length;fa++)ca=ka.element.children[fa],"value"===ca.tagName?pa[ka.name]={value:ca.textContent,uw:null,JC:!1}:ca.children&&la.push({name:ka.name+"."+ca.getAttribute("name"),element:ca})}};ba.prototype.bU=function(pa,ka){ka.forEach(function(la){var fa=la.getAttribute("name");pa[fa]?pa[fa].uw=la:pa[fa]={value:null,uw:la,JC:!1}})};ba.prototype.e3=function(pa){var ka=this,la={};pa.querySelectorAll("pdf-info widget").forEach(function(fa){var ca=parseInt(fa.getAttribute("page"),
10)-1;ka.ox(la,ca);la[ca].qQ.push(fa)});pa.querySelectorAll("pdf-info page").forEach(function(fa){var ca=parseInt(fa.getAttribute("number"),10)-1;ka.ox(la,ca);la[ca].page=fa});this.FK(pa).forEach(function(fa){var ca=parseInt(fa.getAttribute("page"),10),z=fa.getAttribute("name");ka.ox(la,ca);la[ca].ek[z]=fa});this.rK(pa).forEach(function(fa){var ca=parseInt(fa.getAttribute("page"),10);fa=fa.textContent;ka.ox(la,ca);la[ca].pJ[fa]=!0});return la};ba.prototype.ox=function(pa,ka){pa[ka]||(pa[ka]={ek:{},
pJ:{},qQ:[],page:null})};return ba}();va.a=Ca},365:function(Ca,va,ba){var pa=ba(2),ka=ba(0);ba.n(ka);Ca=function(la){function fa(ca){var z=la.call(this)||this;z.sY=Array.isArray(ca)?ca:[ca];return z}Object(pa.c)(fa,la);fa.prototype.parse=function(){var ca=this,z={Xl:null,vB:null,tr:{},ba:{}};this.sY.forEach(function(r){z=Object(ka.merge)(z,ca.kv(r))});return z};fa.prototype.FK=function(ca){var z=[];ca.querySelectorAll("add > *").forEach(function(r){z.push(r)});ca.querySelectorAll("modify > *").forEach(function(r){z.push(r)});
return z};fa.prototype.rK=function(ca){return ca.querySelectorAll("delete > *")};return fa}(ba(351).a);va.a=Ca},366:function(Ca,va,ba){var pa=ba(2);Ca=function(ka){function la(fa){var ca=ka.call(this)||this;ca.tY=fa;return ca}Object(pa.c)(la,ka);la.prototype.parse=function(){return this.kv(this.tY)};la.prototype.FK=function(fa){return fa.querySelectorAll("annots > *")};la.prototype.rK=function(){return[]};return la}(ba(351).a);va.a=Ca}}]);}).call(this || window)
