12345678910111213141516 |
- /** 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([[12],{442:function(ia,da,e){function ca(e){e.Ja();e.advance();var f=e.current.textContent;e.Za();return f}function y(e){var f=[];for(e.Ja();e.advance();){var h=e.Oa();"field"===h?f.push(String(e.ga("name"))):Object(x.j)("unrecognised field list element: "+h)}e.Za();return f}function ha(e,f){return f?"false"!==e:"true"===e}function ea(e,f){var h=e.Oa();switch(h){case "javascript":return{name:"JavaScript",javascript:e.current.textContent};
- case "uri":return{name:"URI",uri:e.ga("uri")};case "goto":h=null;e.Ja();if(e.advance()){var n=e.ga("fit");h={page:e.ga("page"),fit:n};if("0"===h.page)Object(x.j)("null page encountered in dest");else switch(f=f(Number(h.page)),n){case "Fit":case "FitB":break;case "FitH":case "FitBH":h.top=f.ra({x:0,y:e.ga("top")||0}).y;break;case "FitV":case "FitBV":h.left=f.ra({x:e.ga("left")||0,y:0}).x;break;case "FitR":n=f.ra({x:e.ga("left")||0,y:e.ga("top")||0});f=f.ra({x:e.ga("right")||0,y:e.ga("bottom")||0});
- f=new ua.d(n.x,n.y,f.x,f.y);h.top=f.ka;h.left=f.ma;h.bottom=f.la;h.right=f.oa;break;case "XYZ":n=f.ra({x:e.ga("left")||0,y:e.ga("top")||0});h.top=n.y;h.left=n.x;h.zoom=e.ga("zoom")||0;break;default:Object(x.j)("unknown dest fit: "+n)}h={name:"GoTo",dest:h}}else Object(x.j)("missing dest in GoTo action");e.Za();return h;case "submit-form":h={name:"SubmitForm",url:e.ga("url"),format:e.ga("format"),method:e.ga("method")||"POST",exclude:ha(e.ga("exclude"),!1)};f=e.ga("flags");h.flags=f?f.split(" "):[];
- for(e.Ja();e.advance();)switch(f=e.Oa(),f){case "fields":h.fields=y(e);break;default:Object(x.j)("unrecognised submit-form child: "+f)}e.Za();return h;case "reset-form":h={name:"ResetForm",exclude:ha(e.ga("exclude"),!1)};for(e.Ja();e.advance();)switch(f=e.Oa(),f){case "fields":h.fields=y(e);break;default:Object(x.j)("unrecognised reset-form child: "+f)}e.Za();return h;case "hide":h={name:"Hide",hide:ha(e.ga("hide"),!0)};for(e.Ja();e.advance();)switch(f=e.Oa(),f){case "fields":h.fields=y(e);break;
- default:Object(x.j)("unrecognised hide child: "+f)}e.Za();return h;case "named":return{name:"Named",action:e.ga("name")};default:Object(x.j)("Encountered unexpected action type: "+h)}return null}function fa(e,f,h){var n={};for(e.Ja();e.advance();){var r=e.Oa();switch(r){case "action":r=e.ga("trigger");if(f?-1!==f.indexOf(r):1){n[r]=[];for(e.Ja();e.advance();){var w=ea(e,h);Object(ka.isNull)(w)||n[r].push(w)}e.Za()}else Object(x.j)("encountered unexpected trigger on field: "+r);break;default:Object(x.j)("encountered unknown action child: "+
- r)}}e.Za();return n}function ba(e){return new oa.a(e.ga("r")||0,e.ga("g")||0,e.ga("b")||0,e.ga("a")||1)}function w(e,f){var h=e.ga("name"),n=e.ga("type")||"Type1",r=e.ga("size"),w=f.ra({x:0,y:0});r=f.ra({x:Number(r),y:0});f=w.x-r.x;w=w.y-r.y;h={name:h,type:n,size:Math.sqrt(f*f+w*w)||0,strokeColor:[0,0,0],fillColor:[0,0,0]};for(e.Ja();e.advance();)switch(n=e.Oa(),n){case "stroke-color":h.strokeColor=ba(e);break;case "fill-color":h.fillColor=ba(e);break;default:Object(x.j)("unrecognised font child: "+
- n)}e.Za();return h}function aa(e){return{value:e.ga("value"),displayValue:e.ga("display-value")||void 0}}function r(e){var f=[];for(e.Ja();e.advance();){var h=e.Oa();switch(h){case "option":f.push(aa(e));break;default:Object(x.j)("unrecognised options child: "+h)}}e.Za();return f}function h(e,f){var h=e.ga("name"),n={type:e.ga("type"),quadding:e.ga("quadding")||"Left-justified",maxLen:e.ga("max-len")||-1},y=e.ga("flags");Object(ka.isString)(y)&&(n.flags=y.split(" "));for(e.Ja();e.advance();)switch(y=
- e.Oa(),y){case "actions":n.actions=fa(e,["C","F","K","V"],function(){return f});break;case "default-value":n.defaultValue=ca(e);break;case "font":n.font=w(e,f);break;case "options":n.options=r(e);break;default:Object(x.j)("unknown field child: "+y)}e.Za();return new window.Annotations.ha.qa(h,n)}function n(e,f){switch(e.type){case "Tx":try{if(Object(ra.c)(e.actions))return new ja.a.DatePickerWidgetAnnotation(e,f)}catch(wa){Object(x.j)(wa)}return new ja.a.TextWidgetAnnotation(e,f);case "Ch":return e.flags.get(ma.WidgetFlags.COMBO)?
- new ja.a.ChoiceWidgetAnnotation(e,f):new ja.a.ListWidgetAnnotation(e,f);case "Btn":return e.flags.get(ma.WidgetFlags.PUSH_BUTTON)?new ja.a.PushButtonWidgetAnnotation(e,f):e.flags.get(ma.WidgetFlags.RADIO)?new ja.a.RadioButtonWidgetAnnotation(e,f):new ja.a.CheckButtonWidgetAnnotation(e,f);case "Sig":return new ja.a.SignatureWidgetAnnotation(e,f);default:Object(x.j)("Unrecognised field type: "+e.type)}return null}function f(e,f){var h={number:e.ga("number")};for(e.Ja();e.advance();){var n=e.Oa();switch(n){case "actions":h.actions=
- fa(e,["O","C"],f);break;default:Object(x.j)("unrecognised page child: "+n)}}e.Za();return h}function z(e,r,z,aa){var ca=[],ea={};e.Ja();var da=[],ha={},ia=[];Object(la.a)(function(){if(e.advance()){var z=e.Oa();switch(z){case "calculation-order":da="calculation-order"===e.Oa()?y(e):[];break;case "document-actions":ha=fa(e,["Init","Open"],r);break;case "pages":z=[];for(e.Ja();e.advance();){var aa=e.Oa();switch(aa){case "page":z.push(f(e,r));break;default:Object(x.j)("unrecognised page child: "+aa)}}e.Za();
- ia=z;break;case "field":aa=h(e,r(1));ea[aa.name]=aa;break;case "widget":z={border:{style:"Solid",width:1},backgroundColor:[],fieldName:e.ga("field"),page:e.ga("page"),index:e.ga("index")||0,rotation:e.ga("rotation")||0,flags:[],isImporting:!0};(aa=e.ga("appearance"))&&(z.appearance=aa);(aa=e.ga("flags"))&&(z.flags=aa.split(" "));for(e.Ja();e.advance();)switch(aa=e.Oa(),aa){case "rect":var ja=e,wa=r(Number(z.page));aa=wa.ra({x:ja.ga("x1")||0,y:ja.ga("y1")||0});ja=wa.ra({x:ja.ga("x2")||0,y:ja.ga("y2")||
- 0});aa=new ua.d(aa.x,aa.y,ja.x,ja.y);aa.normalize();z.rect={x1:aa.x1,y1:aa.y1,x2:aa.x2,y2:aa.y2};break;case "border":aa=e;ja={style:aa.ga("style")||"Solid",width:aa.ga("width")||1,color:[0,0,0]};for(aa.Ja();aa.advance();)switch(wa=aa.Oa(),wa){case "color":ja.color=ba(aa);break;default:Object(x.j)("unrecognised border child: "+wa)}aa.Za();z.border=ja;break;case "background-color":z.backgroundColor=ba(e);break;case "actions":z.actions=fa(e,"E X D U Fo Bl PO PC PV PI".split(" "),r);break;case "appearances":aa=
- e;ja=Object(ra.b)(z,"appearances");for(aa.Ja();aa.advance();)if(wa=aa.Oa(),"appearance"===wa){wa=aa.ga("name");var ma=Object(ra.b)(ja,wa);wa=aa;for(wa.Ja();wa.advance();){var ka=wa.Oa();switch(ka){case "Normal":Object(ra.b)(ma,"Normal").data=wa.current.textContent;break;default:Object(x.j)("unexpected appearance state: ",ka)}}wa.Za()}else Object(x.j)("unexpected appearances child: "+wa);aa.Za();break;case "extra":aa=e;ja=r;wa={};for(aa.Ja();aa.advance();)switch(ma=aa.Oa(),ma){case "font":wa.font=
- w(aa,ja(1));break;default:Object(x.j)("unrecognised extra child: "+ma)}aa.Za();aa=wa;aa.font&&(z.font=aa.font);break;case "captions":ja=e;aa={};(wa=ja.ga("Normal"))&&(aa.Normal=wa);(wa=ja.ga("Rollover"))&&(aa.Rollover=wa);(ja=ja.ga("Down"))&&(aa.Down=ja);z.captions=aa;break;default:Object(x.j)("unrecognised widget child: "+aa)}e.Za();(aa=ea[z.fieldName])?(z=n(aa,z),ca.push(z)):Object(x.j)("ignoring widget with no corresponding field data: "+z.fieldName);break;default:Object(x.j)("Unknown element encountered in PDFInfo: "+
- z)}return!0}return!1},function(){e.Za();z({calculationOrder:da,widgets:ca,fields:ea,documentActions:ha,pages:ia,custom:[]})},aa)}e.r(da);e.d(da,"parse",function(){return z});var x=e(2),ka=e(0);e.n(ka);var ja=e(116),ua=e(4),oa=e(7),la=e(20),ra=e(103),ma=e(17)}}]);}).call(this || window)
|