@foxitsoftware/foxit-pdf-sdk-for-web-library 8.2.0 → 8.2.1--

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.
@@ -18,7 +18,7 @@ var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t
18
18
  /*! art-template@runtime | https://github.com/aui/art-template */
19
19
  var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=Object.create(n),i=/["&'<>]/;r.$escape=function(e){return function(e){var t=""+e,n=i.exec(t);if(!n)return e;var r="",o=void 0,a=void 0,c=void 0;for(o=n.index,a=0;o<t.length;o++){switch(t.charCodeAt(o)){case 34:c="&#34;";break;case 38:c="&#38;";break;case 39:c="&#39;";break;case 60:c="&#60;";break;case 62:c="&#62;";break;default:continue}a!==o&&(r+=t.substring(a,o)),a=o+1,r+=c}return a!==o?r+t.substring(a,o):r}(function e(t){return"string"!=typeof t&&(t=null==t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t)),t}(e))},r.$each=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t(e[n],n);else for(var i in e)t(e[i],i)},e.exports=r}).call(this,n(5))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){n(0),e.exports=function(e){"use strict";return e=e||{},'<ribbon-button @tooltip @controller="selection:SelectionDropdownController" name="create-shapeObject-dropdown" icon-class="fx-icon-ribbon_edit_add_shapes-32" text="edit-pageobjects:dropdown-tooltip" not-immediately="true">\r\n<dropdown @aria:label.caret="aria:labels.toolbar.path-object" class="fv__ui-dropdown-direction-row fv__ui-dropdown-hide-text" separate="false">\r\n <dropdown-button @tooltip name="add-pathObject-line" icon-class="fv__icon-toolbar-path-line" tabindex="0">toolbar.buttons.line</dropdown-button>\r\n <dropdown-button @tooltip name="add-pathObject-square" icon-class="fv__icon-toolbar-path-square" tabindex="0">toolbar.buttons.square</dropdown-button>\r\n <dropdown-button @tooltip name="add-pathObject-circle" icon-class="fv__icon-toolbar-path-circle" tabindex="0">toolbar.buttons.circle</dropdown-button>\r\n <dropdown-button @tooltip name="add-pathObject-roundRect" icon-class="fv__icon-toolbar-path-round-rectangle" tabindex="0">toolbar.buttons.roundRect</dropdown-button>\r\n</dropdown>\r\n</ribbon-button>'}},function(e,t){e.exports=null},function(e,t,n){}]).default)},function(e,t,n){var r,i;self,e.exports=(r=n(3),i=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),a=(r=n(29))&&r.__esModule?r:{default:r},c=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddTextButtonController"},t.getSHName=function(){return"add-fill-text"},t.getFSType=function(){return""},i(t,null,[{key:"permission",get:function(){return o.PDFViewCtrl.Consts.PDFDocPermission.ModifyDocument}}]),t.prototype.postlink=function(){var e=this;this.addDestroyHook(this.getPDFUI().addViewerEventListener({"switch-state-handler":function(t,n){t.getStateName()===e.constructor.getSHName()?e.component.active():n.getStateName()===e.constructor.getSHName()&&e.component.deactive()},"annotation-removed":function(){e.getPDFUI().getCurrentPDFDoc().then((function(t){t.PDFForm.isEmpty()?e.component.unlock():e.component.lock()}))}}))},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.getPDFUI(),r=n.addViewerEventListener(o.UIEvents.renderFileSuccess,(function(e){e.PDFForm.isEmpty()||t.component.lock()})),i=n.addViewerEventListener(a.default.fieldAdded,(function(e){t.component.lock()})),c=n.addViewerEventListener(a.default.filedRemove,(function(e){n.getCurrentPDFDoc().then((function(e){e.getPDFForm().isEmpty()?t.component.unlock():t.component.lock()}))}));this.addDestroyHook(r),this.addDestroyHook(i),this.addDestroyHook(c)},t.prototype.handle=function(){var e=this;this.getPDFUI().getStateHandlerManager().then((function(t){t.switchTo(e.constructor.getSHName(),e.constructor.getFSType())}))},t}(o.Controller);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClientX=function(e){if("clientX"in e)return e.clientX;switch(e.type){case"touchstart":case"touchmove":return e.touches[0].clientX;case"touchend":case"touchcancel":return e.changedTouches[0].clientX}},t.getClientY=function(e){if("clientY"in e)return e.clientY;switch(e.type){case"touchstart":case"touchmove":return e.touches[0].clientY;case"touchend":case"touchcancel":return e.changedTouches[0].clientY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(15)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=n(3),a=n(6),c=l(n(7)),u=l(n(10)),s=l(n(25));function l(e){return e&&e.__esModule?e:{default:e}}var d=i.Deps.Hammer,p=null,f="checkMark",g=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-tick",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.setAddon=function(e){p=e},t.getStateName=function(){return"add-fill-checkmark"},t.setParams=function(e){switch(e){case"tick":f=a.FillSignType.checkMark;break;case"cross":f=a.FillSignType.crossMark;break;case"line":f=a.FillSignType.line;break;case"dot":f=a.FillSignType.dot;break;case"rectangle":f=a.FillSignType.roundRectangle;break;default:f=a.FillSignType.checkMark}},t.prototype.pageHandler=function(e){var t=this;this.pageRender=e;var n=e.$handler;n.addClass(this.cursorStyle);var r=n[0];(this.hammer=new d.Manager(r,{recognizers:[[d.Tap]]})).on("tap",(function(n){t.resetHandler();var i={},o=h(r,n),a=24,l=24;e.getPDFPage().then((function(n){var r=n.reverseDevicePoint([o.x,o.y],e.getScale(),e.getRotation()),d=e.getRotation(),g=3*a/n.getPxWidth(),h=3*l/n.getPxHeight();if(g>1||h>1){var M=Math.max(g,h);M>1&&(M=1/M),a*=M,l*=M}if(90===d||270===d){var m=a;a=l,l=m}i.top=o.y-l/2,i.left=o.x-a/2,i.right=i.left+a,i.bottom=i.top+l;var y=n.reverseDeviceRect(i,e.getScale(),d);t.fillSign||(t.fillSign=new c.default(n));var v=e.getRotation(),b=v?v/90+n.getRotation():n.getRotation();t.fillSign.getObjectAtPoint({x:r[0],y:r[1]}).then((function(n){return n?0==n.info.type?new s.default(n,e,p,t):new u.default(n,e,p,t):t.fillSign.addPath(f,y,b).then((function(n){return new u.default(n,e,p,t)}))})).then((function(e){t.currentComponent=e,e instanceof u.default?(e.active(),e.showToolbar()):e.activeFillSignInput()})).catch((function(e){e&&console.error(e),t.currentComponent=null,t.pdfViewer.activeElement()}))}))}))},t.prototype.destroyPageHandler=function(){this.currentComponent&&this.currentComponent.removeToolbar(),this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(this.cursorStyle),this.resetHandler()},t.prototype.out=function(){this.destroyPageHandler()},t.prototype.resetHandler=function(){this.currentComponent&&(this.currentComponent.textCharSure&&this.currentComponent.textCharSure(),this.currentComponent.unActive())},t.prototype.resetType=function(e,t,n,r){var i=this;if(e&&n){var o=Promise.resolve(),a=n.getRect();this.currentComponent&&(this.currentComponent.unActive(),this.currentComponent.removeToolbar(),o=this.currentComponent.remove());var c=t.getRotation(),s=c?c/90+t.page.getRotation():t.page.getRotation();o.then((function(t){return e.addPath(r,a,s)})).then((function(e){var n=i.currentComponent=new u.default(e,t,p,i);n.active(),n.showToolbar()}))}},t}(r.default);t.default=g;var h=function(e,t){var n=e.getBoundingClientRect(),r=t.srcEvent,i=(0,o.getClientX)(r),a=(0,o.getClientY)(r);return{x:i-n.left-t.deltaX,y:a-n.top-t.deltaY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),i=(n(12),o(n(34)),o(n(21)));function o(e){return e&&e.__esModule?e:{default:e}}var a=r.Deps.jQuery,c=r.shared.browser.getPtPxRatio,u=r.Events,s=(r.shared.activation.ActivationGroup,r.keyboard),l=s.BuiltinShortcutContext,d=s.BuiltinCommand,p=function(e){function t(n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this));return o.isDestroyed=!1,o.graphicsObject=n,o.pageRender=r,o.dependences=i,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.doActive=function(){var e=this.$handler,t=this.dependences.pdfViewer;if(!e){e=this.initUI(),this.$handler=e;var n=this.getContextMenuConfig();n&&!this.contextmenu&&(this.contextmenu=t.viewerUI.createContextMenu(this,e.get(0),n))}e.addClass("fwr__active"),this.updateShapeControl(),this.bindEvent()},t.prototype.getContextMenuConfig=function(){},t.prototype.getContextMenuComponentName=function(){(0,i.default)()},t.prototype.removeGraphicObject=function(){this.remove()},t.prototype.remove=function(){var e=this;if(this.isActive){this.removeToolbar&&this.removeToolbar();var t=this.dependences.pdfViewer;t.getAllActiveElements().forEach((function(t){t.unActive(),t!==e&&t.remove&&t.remove()})),0===t.getAllActiveElements().length&&t.activeElement()}},t.prototype.bindEvent=function(){var e=this;this.dependences.pdfViewer.getKeyboard().withContext(l.ACTIVATION_ANY,(function(t){e.isDestroyed||(e.__off__delete__event__=t.keydown(d.DELETE_SELECTED_OBJECT,(function(t){e.removeGraphicObject(),e.__off__delete__event__()})),e.__off__esc__event__=t.keydown(d.UNSELECT_OBJECT,(function(t){e.unActive(!0)})))}))},t.prototype.unBindEvent=function(){this.__off__delete__event__&&this.__off__delete__event__(),this.__off__delete__event__=function(){},this.__off__esc__event__&&this.__off__esc__event__(),this.__off__esc__event__=function(){},this.__off_active_escape_event&&this.__off_active_escape_event(),delete this.__off_active_escape_event},t.prototype.translateContextMenuName=function(e){for(var t in e)switch(t){case"items":var n=e[t],r=this.dependences.pdfViewer.i18n;for(var i in n){var o=n[i];o.nameI18nKey&&(o.name=r.t(o.nameI18nKey))}}return e},t.prototype.updateShapeControl=function(){var e=this.getBoundary(),t=this._getShapeControllerBoundaryBox();this.shapeControl&&this.shapeControl.active(this.$handler,e,t)},t.prototype.unActive=function(){this.isActive&&(e.prototype.unActive.call(this),this.$handler&&(this.$handler.removeClass("fwr__active"),this.shapeControl&&this.shapeControl.deactive(),this.dependences.pdfViewer.eventEmitter.off(u.zoomToSuccess,this.afterZoom),this.$handler&&this.$handler.remove(),this.$handler=null,this.unBindEvent(),this.$charEditContainer&&this.$charEditContainer.off("focus"),this.removeToolbar&&this.removeToolbar()))},t.prototype.doDeactive=function(){},t.prototype.destroy=function(){this.isDestroyed=!0,this.unActive(),this.shapeControl&&this.shapeControl.destroy(),this.contextmenu&&this.contextmenu.destroy()},t.prototype.getModel=function(){return this.graphicsObject},t.prototype._getShapeControllerBoundaryBox=function(){var e=this.pageRender.page,t=c()*this.pageRender.getScale(),n=e.getPxWidth()*t,r=e.getPxHeight()*t;if(this.pageRender.rotate%180!=0){var i=[n,r];r=i[0],n=i[1]}return{left:0,top:0,width:n,height:r}},t.prototype.getBoundary=function(){var e=this.pageRender.page,t=this.graphicsObject.getRect(),n=e.getDeviceRect(t,this.pageRender.getScale(),this.pageRender.getRotation());return{left:n.left,top:n.top,width:n.right-n.left,height:n.bottom-n.top}},t.prototype.initUI=function(){var e=this;if(!this.$handler){var t=this.$handler=a('<div class="fwr__graphics-object-handler"\n ></div>');this.pageRender.pageHandler.$handler.append(t),t.get(0).__graphics_object_component=this;var n=!0;this.predefineTextObject&&(n=!1),this.shapeControl=new r.ShapeControl({prestart:function(){return e.onPrestart()},start:function(t,n,r){return e.onStartUpdateShape(t,n,r)},moving:function(t,n,r){var i=r.offsetX,o=r.offsetY;return e.onShapeMoving(t,n,i,o)},update:function(t,n){return e.onShapeUpdating(t,n)},end:function(t,n,r,i){return e.onShapeUpdateEnd(t,n,r,i)},afterEnd:function(t){return e.onAfterShapeCtrlEnd(t)},resizable:n,enableDiagonally:!0,enableFrame:!0,previewer:!0});var i=this;return this.dependences.pdfViewer.eventEmitter.on(u.zoomToSuccess,this.afterZoom=function(){i.updateShapeControl()}),this.$handler}},t.prototype.onPrestart=function(){var e=this;this.dependences.pdfViewer.getAllActiveElements().forEach((function(n){n!==e&&n instanceof t&&e.shapeControl.companion(n.shapeControl)}))},t.prototype.onAfterShapeCtrlEnd=function(e){this.shapeControl.clearCompanions()},t.prototype.onStartUpdateShape=function(e,t,n){var r=this;this.dependences.pdfViewer.getAllActiveElements().length>1||!this.graphicsObject.getBitmap||(a(this.shapeControl.ui.querySelector(".fv__shape-control-previewer")).show(),this.graphicsObject.getBitmap(this.pageRender.getScale(),this.pageRender.getRotation()).then((function(e){if(e){var t=r.shapeControl.getPreviewerContext();a(t.canvas).attr({width:e.width,height:e.height});var n=t.createImageData(e.width,e.height+1),i=new(Uint8ClampedArray||Uint8Array)(e.buffer);n.data.set(i),t.putImageData(n,0,0)}})))},t.prototype.onShapeMoving=function(e,t){},t.prototype.onShapeUpdating=function(e,t){},t.prototype.onShapeUpdateEnd=function(e,t,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=Object.assign({},e);o.right=o.left+o.width,o.bottom=o.top+o.height,o=this.pageRender.page.reverseDeviceRect(o,this.pageRender.getScale(),this.pageRender.getRotation()),this.graphicsObject.setRect(o,i).then((function(e){a(r.shapeControl.ui.querySelector(".fv__shape-control-previewer")).hide(),r.updateShapeControl()}))},t.prototype.setColor=function(e){return this.graphicsObject.setBorderColor(e)},t.prototype.setBorderStyle=function(e,t){var n=this;return this.graphicsObject.setBorderStyle(e,t).then((function(e){n.updateShapeControl()}))},t.prototype.setOpacity=function(e){return this.graphicsObject.setOpacity(e)},t.prototype.setFillColor=function(e){return this.graphicsObject.setFillColor(e)},t.prototype.setBorderWidth=function(e){var t=this;return this.graphicsObject.setBorderWidth(e).then((function(e){t.updateShapeControl()}))},t.prototype.moveToPosition=function(e,t){var n=this;return this.graphicsObject.moveToPosition(e,t).then((function(e){n.updateShapeControl()}))},t}(r.shared.activation.Activatable);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NameTreeType=t.PosType=t.FillSignType=t.MK_Properties=t.Graphics_ObjectType=t.Graphics_FillMode=t.Font_CIDCharset=t.Font_Charset=t.Font_Styles=t.Font_StandardID=t.Text_Mode=t.Box_Type=t.Calc_Margin_Mode=t.Action_Trigger=t.Signature_Ap_Flags=t.Signature_State=t.Error_Code=t.Font_Descriptor_Flags=t.page_Number_Format=t.date_Format=t.Rendering_Usage=t.Rendering_Content=t.Range_Filter=t.Saving_Flag=t.Search_Flag=t.Rotation_Degree=t.Rotation=t.Standard_Font=t.Watermark_Flag=t.Position=t.Flatten_Option=t.File_Type=t.Relationship=t.Highlight_Mode=t.Action_Type=t.Point_Type=t.Alignment=t.Ending_Style=t.Note_Icon=t.FileAttachment_Icon=t.Border_Style=t.Font_Style=t.Additional_Permission=void 0;var r,i=(r=n(39))&&r.__esModule?r:{default:r};t.Additional_Permission={download:1},t.Font_Style={normal:0,italic:1,bold:2},t.Border_Style={solid:0,dashed:1,underline:2,beveled:3,inset:4,cloudy:5},t.FileAttachment_Icon={graph:"Graph",pushPin:"PushPin",paperclip:"Paperclip",tag:"Tag"},t.Note_Icon={Check:"Check",Circle:"Circle",Comment:"Comment",Cross:"Cross",Help:"Help",Insert:"Insert",Key:"Key",NewParagraph:"NewParagraph",Note:"Note",Paragraph:"Paragraph",RightArrow:"RightArrow",RightPointer:"RightPointer",Star:"Star",UpArrow:"UpArrow",UpLeftArrow:"UpLeftArrow"},t.Ending_Style={None:0,Square:1,Circle:2,Diamond:3,OpenArrow:4,ClosedArrow:5,Butt:6,ReverseOpenArrow:7,ReverseClosedArrow:8,Slash:9},t.Alignment={left:0,center:1,right:2},t.Point_Type={moveTo:1,lineTo:2,lineToCloseFigure:3,bezierTo:4,bezierToCloseFigure:5},t.Action_Type={goto:"TypeGoto",launch:"TypeLaunch",uri:"TypeURI",named:"TypeNamed",thread:"TypeThread",submitForm:"TypeSubmitForm",resetForm:"TypeResetForm",javaScript:"TypeJavaScript",importData:"TypeImportData",hide:"TypeHide"},t.Highlight_Mode={none:0,invert:1,outline:2,push:3,toggle:4},t.Relationship={firstChild:0,lastChild:1,previousSibling:2,nextSibling:3,firstSibling:4,lastSibling:5},t.File_Type={fdf:0,xfdf:1,xml:2,csv:3,txt:4},t.Flatten_Option={all:0,field:1,annot:2},t.Position={topLeft:"TopLeft",topCenter:"TopCenter",topRight:"TopRight",centerLeft:"CenterLeft",center:"Center",centerRight:"CenterRight",bottomLeft:"BottomLeft",bottomCenter:"BottomCenter",bottomRight:"BottomRight"},t.Watermark_Flag={asContent:0,asAnnot:1,onTop:2,unprintable:4,display:8},t.Standard_Font={courier:0,courierBold:1,courierBoldOblique:2,courierOblique:3,helvetica:4,helveticaBold:5,helveticaBoldOblique:6,helveticaOblique:7,timesRoman:8,timesBold:9,timesBoldItalic:10,timesItalic:11,symbol:12,zapfDingbats:13},t.Rotation={rotation0:0,rotation1:1,rotation2:2,rotation3:3},t.Rotation_Degree={rotation0:0,rotation90:90,rotation180:180,rotation270:270},t.Search_Flag={caseSensitive:1,wholeWord:2,consecutively:4},t.Saving_Flag={normal:0,incremental:1,noOriginal:2,XRefStream:8,linearized:4096,removeRedundantObjects:16},t.Range_Filter={all:0,even:1,odd:2},t.Rendering_Content={page:"page",annot:"annot"},t.Rendering_Usage={print:"print",view:"view"},t.date_Format={MSlashD:0,MSlashDSlashYY:1,MSlashDSlashYYYY:2,MMSlashDDSlashYY:3,MMSlashDDSlashYYYY:4,DSlashMSlashYY:5,DSlashMSlashYYYY:6,DDSlashMMSlashYY:7,DDSlashMMSlashYYYY:8,MMSlashYY:9,MMSlashYYYY:10,MDotDDotYY:11,MDotDDotYYYY:12,MMDotDDDotYY:13,MMDotDDDotYYYY:14,MMDotYY:15,DDotMDotYYYY:16,DDDotMMDotYY:17,DDDotMMDotYYYY:18,YYHyphenMMHyphenDD:19,YYYYHyphenMMHyphenDD:20},t.page_Number_Format={default:0,numberOfCount:1,numberSlashCount:2,pageNumber:3,pageNumberOfCount:4},t.Font_Descriptor_Flags={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144},t.Error_Code=i.default,t.Signature_State={verifyChange:128,verifyIncredible:256,verifyNoChange:1024,stateVerifyIssueUnknown:2048,verifyIssueValid:4096,verifyIssueUnknown:8192,verifyIssueRevoke:16384,verifyIssueExpire:32768,verifyIssueUncheck:65536,verifyIssueCurrent:131072,verifyTimestampNone:262144,verifyTimestampDoc:524288,verifyTimestampValid:1048576,verifyTimestampInvalid:2097152,verifyTimestampExpire:4194304,verifyTimestampIssueUnknown:8388608,verifyTimestampIssueValid:16777216,verifyTimestampTimeBefore:33554432,verifyChangeLegal:134217728,verifyChangeIllegal:268435456},t.Signature_Ap_Flags={showTagImage:1,showLabel:2,showReason:4,showDate:8,showDistinguishName:16,showLocation:32,showSigner:64,showBitmap:128,showText:256},t.Action_Trigger={click:-1,keyStroke:7,format:8,validate:9,calculate:10,mouseEnter:11,mouseExit:12,mouseDown:13,mouseUp:14,onFocus:15,onBlur:16},t.Calc_Margin_Mode={CalcContentsBox:0,CalcDetection:1},t.Box_Type={MediaBox:0,CropBox:1,TrimBox:2,ArtBox:3,BleedBox:4},t.Text_Mode={Fill:0,Stroke:1,FillStroke:2,Invisible:3,FillClip:4,StrokeClip:5,FillStrokeClip:6,Clip:7},t.Font_StandardID={Courier:0,CourierB:1,CourierBI:2,CourierI:3,Helvetica:4,HelveticaB:5,HelveticaBI:6,HelveticaI:7,Times:8,TimesB:9,TimesBI:10,TimesI:11,Symbol:12,ZapfDingbats:13},t.Font_Styles={FixedPitch:1,Serif:2,Symbolic:4,Script:8,NonSymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,Bold:262144},t.Font_Charset={ANSI:0,Default:1,Symbol:2,Shift_JIS:128,Hangeul:129,GB2312:134,ChineseBig5:136,Thai:222,EastEurope:238,Russian:204,Greek:161,Turkish:162,Hebrew:177,Arabic:178,Baltic:186},t.Font_CIDCharset={Unknown:0,GB1:1,CNS1:2,JAPAN1:3,KOREA1:4,UNICODE:5},t.Graphics_FillMode={None:0,Alternate:1,Winding:2},t.Graphics_ObjectType={All:0,Text:1,Path:2,Image:3,Shading:4,FormXObject:5},t.MK_Properties={borderColor:"borderColor",fillColor:"fillColor",normalCaption:"normalCaption",downCaption:"downCaption",rolloverCaption:"rolloverCaption"},t.FillSignType={crossMark:1,checkMark:2,roundRectangle:3,line:4,dot:5},t.PosType={first:0,last:1,after:2,before:3},t.NameTreeType={Dests:1,JavaScript:2,EmbeddedFiles:3,Templates:4,Pages:5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(16)),i=c(n(9)),o=c(n(56)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.page=t,this.doc=t.doc}return e.prototype.addPath=function(e,t,n){if((e-1|5-e)<0)throw new error("FillSign type error.");var o=this.doc,a=this.page,c=o.getId(),u=a.getId();return o.api.workerPromise.emit("addPathFillSignObject",{docId:c,pageId:u,type:e,rect:t,rotation:n}).then((function(e){return o.engine.eventEmitter.emit(r.default.graphicsUpdated,a),new i.default(o,a,e)}))},e.prototype.addText=function(e,t,n,i,o){var c=this.doc,u=this.page,s=c.getId(),l=u.getId();return c.api.workerPromise.emit("addTextFillSignObject",{docId:s,pageId:l,rect:t,text:e,isComb:i,textState:n,rotation:o}).then((function(t){return e.length&&c.engine.eventEmitter.emit(r.default.graphicsUpdated,u),new a.default(c,u,t)}))},e.prototype.addSignature=function(e){var t=this.doc,n=this.page,i=t.getId(),a=n.getId();return t.api.workerPromise.emit("addSignatureFillSignObject",{docId:i,pageId:a,rect:rect,url:e}).then((function(e){return t.engine.eventEmitter.emit(r.default.graphicsUpdated,n),new o.default(t,n,e)}))},e.prototype.getObjectAtPoint=function(e){var t=this.doc,n=this.page,r=t.getId(),c=n.getId();return t.api.workerPromise.emit("getFillSignObject",{docId:r,pageId:c,point:e}).then((function(e){if(e.empty)return null;switch(e.type){case 0:return new a.default(t,n,e);case 6:return new o.default(t,n,e);default:return new i.default(t,n,e)}}))},e}();t.default=u},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t)}function i(e){return"number"==typeof e}function o(e){return i(e)&&Math.floor(e)===e}function a(e){return Math.pow(Math.floor(e),2)!==e}function c(e){return(e%360+360)%360%90==0}function u(e,t,n,r,i){return void 0===r&&(r=!1),void 0===i&&(i=!1),(r?e>=t:e>t)&&(i?e<=n:e<n)}function s(e,t,n){return void 0===n&&(n=.01),Math.abs(e-t)<n}function l(e,t,n){return void 0===n&&(n=.01),s(e.x,t.x)&&s(e.y,t.y)}function d(e){return null!=e}function p(e){return"function"==typeof e}n.r(t),n.d(t,"assertThat",(function(){return r})),n.d(t,"isNumber",(function(){return i})),n.d(t,"isInteger",(function(){return o})),n.d(t,"isSquaredNumber",(function(){return a})),n.d(t,"isValidRotationAngle",(function(){return c})),n.d(t,"isNumberInRange",(function(){return u})),n.d(t,"isSamePoint",(function(){return l})),n.d(t,"isDefined",(function(){return d})),n.d(t,"isFunction",(function(){return p}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(16))&&r.__esModule?r:{default:r},o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=t,this.page=n,this.info=r}return e.prototype.getRect=function(){return this.info.rect},e.prototype.getPDFPage=function(){return this.page},e.prototype.getPDFDoc=function(){return this.doc},e.prototype.setRect=function(e){var t=this,n=this.doc,r=this.page,o=n.getId(),a=r.getId();return n.api.workerPromise.emit("moveFillSignObject",{docId:o,pageId:a,id:this.info.id,rect:e,rotate:r.getRotation()}).then((function(e){t.info=e,n.engine.eventEmitter.emit(i.default.graphicsUpdated,r)}))},e.prototype.remove=function(){var e=this,t=this.doc,n=this.page,r=t.getId(),o=n.getId();return t.api.workerPromise.emit("removeFillSignObject",{docId:r,pageId:o,id:this.info.id}).then((function(r){e.info=r,t.engine.eventEmitter.emit(i.default.graphicsUpdated,n)}))},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(24)),i=c(n(26)),o=n(6),a=c(n(7));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var c=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r,i));return c.pageRender=r,c.pathObject=n,c.rect=c.pathObject.getRect(),c.fillSign=new a.default(r.page),c.handler=o,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.getContextMenuConfig=function(){},t.prototype.removeToolbar=function(){this.toolbarObject&&this.toolbarObject.removeToolbar()},t.prototype.showToolbar=function(){var e=this,t=this.pageRender.pageHandler.$handler;this.toolbarObject||(this.toolbarObject=new i.default(this.pageRender,this.pathObject,!1)),this.toolbarObject.setFillSignObject(this.pathObject);var n=this.toolbarObject.showToolbar(t);this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-decrease",(function(t){var n=e.pathObject.getRect();n.top-n.bottom>2&&n.right-n.left>2&&(n.bottom+=2,n.right-=2,e.pathObject.setRect(n).then((function(){e.updateShapeControl()})))})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-increase",(function(t){var n=e.pathObject.getRect();n.bottom-=2,n.right+=2,e.pathObject.setRect(n).then((function(){e.updateShapeControl()}))})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-delete",(function(t){e.pathObject.remove(),n.remove(),e.unActive()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-more",(function(e){var t=n.find(".fv__text-fill-sign-toolbar-exp");n.find(".fv__text-fill-sign-toolbar-base").hide(),t.css({display:"flex"})})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-base-button",(function(e){var t=n.find(".fv__text-fill-sign-toolbar-exp"),r=n.find(".fv__text-fill-sign-toolbar-base");t.hide(),r.css({display:"flex"})})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-tick",(function(t){e.resetType(o.FillSignType.checkMark)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-cross",(function(t){e.resetType(o.FillSignType.crossMark)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-dot",(function(t){e.resetType(o.FillSignType.dot)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-line",(function(t){e.resetType(o.FillSignType.line)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-rectangle",(function(t){e.resetType(o.FillSignType.roundRectangle)}))},t.prototype.updateShapeControl=function(){e.prototype.updateShapeControl.call(this),this.showToolbar()},t.prototype.resetType=function(e){this.handler.resetType(this.fillSign,this.pageRender,this.pathObject,e)},t}(r.default);t.default=u},function(e,t,n){"use strict";e.exports=n(79)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY_MAP_SELECT_ALL_ANNOTATIONS="selectAllAnnotations",t.KEY_MAP_POLYLINE_DELETE_LAST_POINT="createPolyline_DeleteLastPoint",t.KEY_MAP_ATTACHMENT_SIDEBAR_DELETE="attachment-sidebar-delete",t.KEY_MAP_DOCUMENT_UNDO="undo",t.KEY_MAP_DOCUMENT_REDO="redo",t.KEY_MAP_ZOOM_IN="pageZoomIn",t.KEY_MAP_ZOOM_OUT="pageZoomOut",t.KEY_MAP_DELETE_ANNOTATION="delete-annotation",t.KEY_MAP_ESC_CREATING_DRAWING="cancel-creating-drawing-annot",t.KEY_MAP_UNACTIVE_ANNOTATION="unactive-annotation",t.KEY_MAP_UNFOCUS_FROM_EDITTING_TEXT_OBJECT="unfocus-from-editting-text-object",t.KEY_MAP_FIELD_TAB_NEXT="FIELD_TAB_ACTION",t.KEY_MAP_FIELD_TAB_PREVIOUS="FIELD_TAB_PREVIOUS_ACTION",t.KEY_MAP_FIELD_LEFT="FIELD_LEFT_ACTION",t.KEY_MAP_FIELD_RIGHT="FIELD_RIGHT_ACTION",t.KEY_MAP_FIELD_DOWN="FIELD_DOWN_ACTION",t.KEY_MAP_FIELD_UP="FIELD_UP_ACTION",t.KEY_MAP_FIELD_ENTER="FIELD_ENTER_ACTION",t.KEY_MAP_COPY_TEXT_IMAGE="copy-text-image",t.KEY_MAP_SELECT_ALL_TEXT="select-all-text",t.KEY_MAP_ADD_BOOKMARK="add-bookmark",t.GLOBAL_SHORTCUT_CONTEXT="global-keyboard-event-binder",t.VIEWER_BINDER="pdf-viewer-keyboard-event-binder",t.ANNOTATION_PROPERTIES_BINDER="annotation-properties-keyboard-event-binder",t.ACTIVATION_ANNOTATION_BINDER="activation-annotation-keyboard-event-binder",t.DOCUMENT_PROPERTIES_BINDER="document-properties-keyboard-event-binder",t.FOCUS_ELEMENT_BINDER="focus-element-keyboard-event-binder",t.EDIT_TEXT_OBJECT_BINDER="focus-text-object-event-binder",t.ANNOTATION_CREATING_BINDER="create-annotation-keyboard-event-binder",t.SELECT_TEXT_IMAGE_BINDER="select-text-image-keyboard-event-binder",t.CUSTOM_COMMAND="custom-command"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(r(this,e),t instanceof e){var u=t;t=u.a,n=u.b,i=u.c,o=u.d,a=u.e,c=u.f}else if(Array.isArray(t)){var s=t;t=s[0],n=s[1],i=s[2],o=s[3],a=s[4],c=s[5]}this.a=t,this.b=n,this.c=i,this.d=o,this.e=a,this.f=c}return e.Concat2mt=function(t,n){return new e(t.a*n.a+t.b*n.c,t.a*n.b+t.b*n.d,t.c*n.a+t.d*n.c,t.c*n.b+t.d*n.d,t.e*n.a+t.f*n.c+n.e,t.e*n.b+t.f*n.d+n.f)},e.prototype.set=function(e,t,n,r,i,o){this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=o},e.prototype.reset=function(){this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0},e.prototype.reverse=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,n=t.a*t.d-t.b*t.c;if(0==n)return t;var r=-n,i=t.d/n,o=t.b/r,a=t.c/r,c=t.a/n,u=(t.c*t.f-t.d*t.e)/n,s=(t.a*t.f-t.b*t.e)/r;return new e(i,o,a,c,u,s)},e.prototype.setReverse=function(e){var t=this.reverse(e);this.set(t.a,t.b,t.c,t.d,t.e,t.f)},e.prototype.rotate=function(t,n){var r,i=Math.cos(t),o=Math.sin(t),a=new e(i,o,-o,i,0,0);r=n?e.Concat2mt(a,this):e.Concat2mt(this,a),this.set(r.a,r.b,r.c,r.d,r.e,r.f)},e.prototype.rotateAt=function(e,t,n,r){this.translate(e,t,r),this.rotate(n,r),this.translate(-e,-t,r)},e.prototype.translate=function(e,t,n){n?(this.e+=e*this.a+t*this.c,this.f+=t*this.d+e*this.b):(this.e+=e,this.f+=t)},e.prototype.concat=function(t,n,r,i,o,a,c){var u,s=void 0;t instanceof e?(s=t,c=n):s=new e(t,n,r,i,o,a),u=c?e.Concat2mt(s,this):e.Concat2mt(this,s),this.set(u.a,u.b,u.c,u.d,u.e,u.f)},e.prototype.is90Rotated=function(){var e=1e3*this.a;e<0&&(e*=-1);var t=1e3*this.d;t<0&&(t*=-1);var n=this.b;n<0&&(n*=-1);var r=this.c;return r<0&&(r*=-1),e<n&&t<r},e.prototype.isScaled=function(){var e=1e3*this.b;e<0&&(e*=-1);var t=1e3*this.c;t<0&&(t*=-1);var n=this.a;n<0&&(n*=-1);var r=this.d;return r<0&&(r*=-1),e<n&&t<r},e.prototype.getA=function(){return this.a},e.prototype.getB=function(){return this.b},e.prototype.getC=function(){return this.c},e.prototype.getD=function(){return this.d},e.prototype.getE=function(){return this.e},e.prototype.getF=function(){return this.f},e.prototype.scale=function(e,t,n){this.a*=e,this.d*=t,n?(this.b*=e,this.c*=t):(this.b*=t,this.c*=e,this.e*=e,this.f*=t)},e.prototype.transformXDistance=function(e){var t=this.a*e,n=this.b*e;return Math.sqrt(t*t+n*n)},e.prototype.transformYDistance=function(e){var t=this.c*e,n=this.d*e;return Math.sqrt(t*t+n*n)},e.prototype.transformDistance=function(e,t){var n=this.a*e+this.c*t,r=this.b*e+this.d*t;return Math.sqrt(n*n+r*r)},e.prototype.transformPoint=function(e,t){return[this.a*e+this.c*t+this.e,this.b*e+this.d*t+this.f]},e.prototype.transformRect=function(e,t,n,r){for(var i=[e,e,n,n],o=[t,r,t,r],a=void 0,c=0;c<4;c++)a=this.transformPoint(i[c],o[c]),i[c]=a[0],o[c]=a[1];for(var u=[i[0],i[0],o[0],o[0]],s=1;s<4;s++)u[0]>i[s]&&(u[0]=i[s]),u[1]<i[s]&&(u[1]=i[s]),u[2]>o[s]&&(u[2]=o[s]),u[3]<o[s]&&(u[3]=o[s]);return[u[0],u[2],u[1],u[3]]},e.prototype.getXUnit=function(){var e=this.a,t=this.b;return 0===t?Math.abs(e):0===e?Math.abs(t):Math.sqrt(e*e+t*t)},e.prototype.getYUnit=function(){var e=this.c,t=this.d;return 0===e?Math.abs(t):0===t?Math.abs(e):Math.sqrt(e*e+t*t)},e.prototype.getUnitRect=function(){return this.transformRect(0,0,1,1)},e.prototype.matchRect=function(e,t){var n=t[0]-t[2];this.a=Math.abs(n)<.001?1:(e[0]-e[2])/n,n=t[3]-t[1],this.d=Math.abs(n)<.001?1:(e[3]-e[1])/n,this.e=e[0]-t[0]*this.a,this.f=e[3]-t[3]*this.d,this.b=0,this.c=0},e.prototype.getAngle=function(){return Math.atan2(this.b,this.a)},e.prototype.toArray=function(){return[this.a,this.b,this.c,this.d,this.e,this.f]},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={textObjectActive:"text-object-active",textObjectUnActive:"text-object-unactive",addTextObjectParamTransfer:"add-text-object-param-transfer"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(21))&&r.__esModule?r:{default:r},o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pdfViewer=t}return e.getStateName=function(){(0,i.default)()},e.getKeyboardBinderName=function(){return null},e.setParams=function(e){},e.prototype.docHandler=function(e){},e.prototype.destroyDocHandler=function(){},e.prototype.pageHandler=function(e){},e.prototype.destroyPageHandler=function(){},e.prototype.out=function(){this.pdfViewer.keyboard.activeDefaultBinde&&this.pdfViewer.keyboard.activeDefaultBinder()},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(19))&&r.__esModule?r:{default:r};t.default=Object.assign({jrLicenseSuccess:"jr-license-success",srLicenseSuccess:"sr-license-success",beforeOpenFile:"before-open-file",openingFile:"opening-file",beforeLoadPDFDoc:"before-load-pdf-document",startConvert:"start-convert",finishConvert:"finish-convert",openFileSuccess:"open-file-success",openFileFailed:"open-file-failed",willCloseDocument:"will-close-document",renderFileSuccess:"render-file-success",renderFileFailed:"render-file-error",beforeRenderPage:"before-render-page",renderPageSuccess:"render-page-success",beforeZoomTo:"before-zoom-to",zoomToSuccess:"zoom-to-success",zoomToFailed:"zoom-to-failed",startChangeViewMode:"start-change-view-mode",changeViewModeSuccess:"change-view-mode-success",changeViewModeFailed:"change-view-mode-failed",pagesLayoutRedrawBegin:"pages-layout-redraw-begin",pageLayoutRedraw:"page-layout-redraw",pagesLayoutRedrawEnd:"pages-layout-redraw-end",copyTextSuccess:"copy-text-success",copyTextFailed:"copy-text-failed",tapPage:"tap-page",tapAnnotation:"tap-annotation",pressPage:"press-page",pressAnnotation:"press-annotation",pressText:"press-text",rightClickPage:"right-click-page",rightClickAnnotation:"right-click-annotation",doubleTapPage:"double-tap-page",doubleTapAnnotation:"double-tap-annotation",activeAnnotationBefore:"active-annotation-before",activeAnnotation:"active-annotation",activeAnnotationAfter:"active-annotation-after",panActiveAnnotation:"pan-active-annotation",doubleTapActiveAnnotation:"double-tap-active-annotation",contextMenuActiveAnnotation:"contextmenu-action-annotation",unActiveAnnotation:"unactive-annotation",updateActiveAnnotation:"update-action-annotation",updateActionAnnotation:"update-action-annotation",removeActiveAnnotationBefore:"remove-action-annotation-before",removeActionAnnotationBefore:"remove-action-annotation-before",removeActiveAnnotationSuccess:"remove-action-annotation-success",removeActionAnnotationSuccess:"remove-action-annotation-success",removeActiveAnnotationFailed:"remove-action-annotation-failed",removeActionAnnotationFailed:"remove-action-annotation-failed",switchStateHandler:"switch-state-handler",deactiveStateHandler:"deactive-state-handler",redactAnnotRendered:"redact-annot-rendered",redactAnnotAllApplyed:"applyed-all-redaction",redactAnnotApplyed:"applyed-redaction",pageNumberChange:"page-number-change",beforeDocumentRotation:"before-document-rotation",afterDocumentRotation:"after-document-rotation",snapModeChanged:"snap-mode-changed",createPageAreaRenderer:"create-page-area-renderer",destroyPageAreaRenderer:"destroy-page-area-renderer",startUpdatePageAreaRenderer:"start-update-page-area-renderer",createSnapshotArea:"create-snapshot-area",updateSnapshotArea:"update-snapshot-area",stabilizedSnapshotArea:"stabilized-snapshot-area",switchPageAreaRenderer:"switch-page-area-renderer",fitWidthResizeViewport:"fit-width-resize-viewport",signatureFieldMouseLButtonDown:"signature-field-Lbutton-down",signatureFieldMouseLButtonUp:"signature-field-LButton-up",signatureFieldMouseEnter:"signature-field-mouse-enter",signatureFieldMouseExit:"signature-field-mouse-exit",visiblePagesRenderCompleted:"completed-render-visible-pages",marqueeZoomIn:"marquee-zoom-in",marqueeZoomOut:"marquee-zoom-out",inkSignAdded:"inkSign-added",inkSignDeleted:"inkSign-deleted",pageMoved:"page-moved",pageRemoved:"page-removed",pageAdded:"page-added",customDataAdd:"custom-data-add",customDataImported:"custom-data-imported",customDataRemoved:"custom-data-removed",customDataUpdated:"custom-data-updated",securityTypeChanged:"security-type-changed",distanceAnnotCreationStart:"distance-creation-start",updateDistanceAnnot:"update-distance-annot",distanceAnnotCreationEnd:"distance-creation-end",distanceAnnotCreationCancel:"distance-creation-cancel",addEditImage:"add-edit-image",InkImageSelected:"ink-image-selected",checkTheSearch:"check-the-search",activeElementChanged:"active-element-changed",cancelCreatingDistance:"cancel-creating-measurement",completeCreatingDistance:"complete-creating-measurement",eraserSuccess:"eraser-success",addAnnotSuccess:"add-annot-success",cancelAddAnnot:"cancel-add-annot",globalAnnotFlagChanged:"global-annot-flag-changed",toolbarTabsClicked:"toolbar-tabs-clicked",disableScroll:"disable-scroll",enableScroll:"enable-scroll",updateScrollableStatus:"update-scrollable-status",selectText:"select-text",changeEnableJS:"change-enable-js",toggleEngineSr2JrSuccess:"toggle-engine-sr-to-jr-success",iconInited:"iconInited",iconAdded:"iconAdded",iconRemoved:"iconRemoved",annotationPermissionChanged:"annotation-premission-changed",startScrollingPage:"pdfui-start-scrolling-page",scrollingPage:"pdfui-scrolling-page",endScrollingPage:"pdfui-end-scrolling-page",designerAssistantStatusChanged:"form-designer-assistant-status-changed",mouseEnter:"mouse-enter",mouseLeave:"mouse-leave",setFromFieldHighlight:"set_form_field_highlight",AddFontMaps:"set_font_map",thumbnailClicked:"thumbnail-clicked",layerActionActived:"layer-action-actived",redeModeShowSidebar:"rede-mode-show-sidebar",gridToggle:"grid-toggle",snapGridToggle:"snap-grid-toggle",toggleCollaborationMode:"toggleCollaborationMode",findReplaceDialogVisibleChange:"find-replace-dialog-visible-change",showAllComments:"show-all-comments",hideAllComments:"hide-all-comments",focusInObject:"focus-in-object",blurFromObject:"blur-from-object"},i.default)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(16)),i=o(n(13));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){return a(this,t),c(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.update=function(e){var t=this,n=this.doc,i=this.page,o=n.getId(),a=i.getId();return this.info.id?n.api.workerPromise.emit("updateTextFillSign",{docId:o,pageId:a,id:this.info.id,property:e}).then((function(e){t.info=e,n.engine.eventEmitter.emit(r.default.graphicsUpdated,i)})):Promise.resolve()},t.prototype.getFillColor=function(){return 0},t.prototype.getMatrix=function(){var e=this.info.matrix;return new i.default(e[0],e[1],e[2],e[3],0,0)},t.prototype.setRect=function(e){return this.update({key:"rect",value:e})},t.prototype.getFontSize=function(){return this.info.textState.fontSize},t.prototype.getText=function(){return this.info.text},t.prototype.setStdFont=function(e){return this.update({key:"font",value:e})},t.prototype.setFontSize=function(e){return this.info.text.length?this.update({key:"fontSize",value:e}):(this.info.textState.fontSize=e,Promise.resolve())},t.prototype.setCharspace=function(e){return this.update({key:"charspace",value:e})},t.prototype.setTextMode=function(e){return this.update({key:"textMode",value:e})},t.prototype.setWordspace=function(e){return this.update({key:"wordspace",value:e})},t.prototype.setText=function(e,t){return this.update([{key:"text",value:e},{key:"rect",value:t},{key:"fontSize",value:this.info.textState.fontSize}])},t}(o(n(9)).default);t.default=u},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),i={annotationUpdated:"annotation-updated",annotationIDUpdated:"annotation-id-updated",annotationAppearanceUpdated:"annotation-appearance-updated",annotationReplyAdd:"annotation-reply-add",annotationReviewStateAnnotAdd:"annotation-review-state-annot-add",annotationMarkedStateAnnotAdd:"annotation-marked-state-annot-add",annotationStatesCleared:"annotation-states-cleared",annotationRemoved:"annotation-removed",annotationMovedPosition:"annotation-moved-position",annotationAdded:"annotation-add",annotationAdd:"annotation-add",moveAnnotsToPages:"moveAnnotsToPages",annotationImported:"annotation-imported",annotationImportedEx:"annotation-imported-ex",annotationLoaded:"annotation-loaded",actionUpdated:"action-updated",actionAdd:"action-add",actionRemove:"action-remove",layerVisibleChange:"layer-visible-change",layerRemoved:"layer-removed",layerMerged:"layer-merged",bookmarkAdded:"bookmark-added",structureBookmarkAdded:"structure-bookmark-added",bookmarkUpdated:"bookmark-updated",bookmarkRemoved:"bookmark-removed",stateAnnotNameUpdated:"state-annot-name-updated",pageInfoChange:"page-info-change",pageRotationChange:"page-rotation-change",imageAdded:"image-added",watermarkAdded:"watermark-added",graphicsUpdated:"graphics-updated",permissionChanged:"permission-changed",docPasswordChanged:(0,r.identity)("doc-password-changed"),drmEncryptSuccess:"drm-encrypt-success",drmEncryptFailed:"drm-encrypt-failed",removePwdAndPerm:(0,r.identity)("remove-password-and-permission"),pageMoved:"page-moved",pageRemoved:"page-removed",pageAdded:"page-added",insertPages:"import-pages",importPages:"import-pages",documentAttachmentAdd:"document-attachment-add",documentAttachmentModify:"document-attachment-modify",documentAttachmentRemove:"document-attachment-remove",applyRedaction:"apply-redaction",removeReviewState:"remove-review-state",removeMarkedState:"remove-marked-state",formValueChanged:"form-value-changed",metaDataChanged:"meta-data-changed",docModified:"doc-modified",flattened:"flattened",headerFooterUpdated:"headerFooterUpdated",headerFooterAdded:"headerFooterAdded",COChange:"COChange",pagesReversed:"pages-reversed",pagesMoved:"pages-moved",pagesRemoved:"pages-removed",pagesRotated:"pages-rotated",obtainsPageFromEngine:"obtains-page-from-engine",pagesBoxChange:"pages-box-changed",pagesLabelChange:"pages-label-change",pagesLabelNeedUpdate:"pages-label-need-change",pagesReplace:"pages-replace",recognitionForm:"recognition-form",removeEmbeddedPageThumbnail:"remove-embedded-page-thumbnail",articleThreadAdded:"article-thread-added",articleThreadUpdated:"article-thread-updated",articleThreadRemoved:"article-thread-removed",articleBeadAdded:"article-bead-added",articleBeadRemoved:"article-bead-removed",articleBeadUpdated:"article-bead-updated",articleEnterReadMode:"article-enter-read-mode",articleOutReadMode:"article-out-read-mode"};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(navigator.appVersion.match(/iphone/gi),"undefined"!=typeof devicePixelRatio?devicePixelRatio:1),o=void 0,a=void 0,c=void 0;function u(){return o||(o=function(){if("undefined"!=typeof screen&&screen.deviceXDPI)return{x:screen.deviceXDPI,y:screen.deviceYDPI};if("undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="width:1in;height:1in;position:absolute;top:20in;border:none;padding:0;",document.body.appendChild(e);var t={x:parseInt(e.offsetWidth),y:parseInt(e.offsetHeight)};return e.parentNode.removeChild(e),t}return{x:96,y:96}}()),o}var s=void 0;t.getDPI=u,t.getPtPxRatio=function(){if(void 0===a){var e=u();a=e.x/72}return a},t.getPxPtRatio=function(){if(void 0===c){var e=u();c=72/e.x}return c},t.dpr=i,t.copyText=function(e){var t=s||((s=document.createElement("textarea")).style.opacity="0",s.style.top="-999px",s.style["z-index"]=-1,s.style.position="absolute",document.body.appendChild(s),s);t.value=e,t.select(),t.focus(),t.setSelectionRange(0,t.value.length);var n=document.execCommand("copy",!1,t.value);return t.blur(),n},t.eventPath=function(e){var t=void 0;try{0==(t=e.composedPath&&e.composedPath()).length&&(t=e.path)}catch(e){t=null}var n=e.target;return null!=t?t.indexOf(window)<0?t.concat(window):t:n===window?[window]:[n].concat(function e(t,n){n=n||[];var r=t.parentNode;return r?e(r,n.concat(r)):n}(n),window)},t.isIE10=function(){var e=navigator.userAgent.toLowerCase(),t=void 0;return!(!("ActiveXObject"in self)||!(t=e.match(/msie ([\d\.]+)/)))&&10===parseInt(t[1])},t.getCanvasPixelRatio=function(){if("object"!==("undefined"==typeof window?"undefined":r(window)))return 1;var e=window.devicePixelRatio||1,t=document.createElement("canvas").getContext("2d");return e/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)},t.isRunningInWorker=function(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope},t.isRunningInBrowser=function(){return"undefined"!=typeof window}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){throw new Error("Method not implemented"+(e?":"+e:""))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=l(n(5)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),a=l(n(14)),c=n(40),u=(n(12),n(23)),s=n(41);function l(e){return e&&e.__esModule?e:{default:e}}var d=o.Deps.jQuery,p=o.shared.browser.getPtPxRatio,f=o.ViewerEvents.beforeZoomTo,g=o.ViewerEvents.renderPageSuccess,h=o.ViewerEvents.switchStateHandler,M=o.keyboard,m=M.BuiltinCommand,y=M.BuiltinShortcutContext,v=function(e){function t(n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r,i));return o.fillSign=!1,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.initUI=function(){var e=this,t=this.$handler=d('<div class="fwr__graphics-object-handler fwr__text-object-edit"\n ></div>');return this.pageRender.pageHandler.$handler.after(t),t.get(0).__graphics_object_component=this,this.shapeControl=new o.ShapeControl({prestart:function(){return e.onPrestart()},start:function(t,n,r){return e.onStartUpdateShape(t,n,r)},moving:function(t,n,r){var i=r.offsetX,o=r.offsetY;return e.onShapeMoving(t,n,i,o)},update:function(t,n){return e.onShapeUpdating(t,n)},rotate:function(t,n){return e.onRotate(t,n)},end:function(t,n,r,i){return e.onShapeUpdateEnd(t,n,r,i)},afterEnd:function(t){return e.onAfterShapeCtrlEnd(t)},resizable:!0,enableDiagonally:!0,enableFrame:!0,previewer:!0}),t.on("dblclick",(function(){e.unActive(),e.activeCharEdit()})),this.$handler},t.prototype.reActive=function(){},t.prototype.active=function(){var t=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.prototype.active.call(this),this.reActive=function(){t.unActive(),t.active()};var r=this.pageRender.pdfViewer,i=r.getEventEmitter();n&&i.emit(a.default.textObjectActive,this),i.once(f,this.beforeZoomToBind=e.prototype.unActive.bind(this)),this.pageRedrawBind&&i.off(g,this.pageRedrawBind),i.on(g,this.pageRedrawBind=function(e){e.index===t.getModel().getPDFPage().getIndex()&&t.reActive()}),i.on(h,this.switchStateHandlerBind=function(){t.eCharInput&&t.applyEdit()})},t.prototype.unActive=function(){this.dependences.pdfViewer._setSaveBefore(),e.prototype.unActive.call(this),this.unActiveCharEdit();var t=this.pageRender.pdfViewer.getEventEmitter();t.off(f,this.beforeZoomToBind),t.off(g,this.pageRedrawBind),t.off(h,this.switchStateHandlerBind),t.emit(a.default.textObjectUnActive,this)},t.prototype.unActiveCharEdit=function(){this.$charEditContainer&&this.$charEditContainer.remove(),this.$charEditContainer=null,this.unswitchBinder&&this.unswitchBinder()},t.prototype.applyEdit=function(){var e=this;if(!this.eCharInput)return Promise.reject(new Error("text input box has not been initialized!"));var t=this.eCharInput.innerText;return"string"!=typeof t&&(t=this.eCharInput.textContent),this.isApplyEdit=!0,this.setTextChar(t).then((function(){e.unActive()})).finally((function(){e.isApplyEdit=!1}))},t.prototype.initCharEditContainer=function(){var e=this,t=void 0;t=this.fillSign?d('<div class="fv__text-object-edit-char-container"><div class="fv__text-object-edit-char-mask-layer"></div><div><span class="fv_fillsign-moving"></span><span class="fv__text-object-edit-char-input " contenteditable></span></div></div>'):d('<div class="fv__text-object-edit-char-container"><div class="fv__text-object-edit-char-mask-layer"></div><span class="fv__text-object-edit-char-input " contenteditable></span></div>'),this.pageRender.$handler.after(t);var n=t.find(".fv__text-object-edit-char-input"),r=n[0];return this.eCharInput=r,n.on("keydown",(function(r){if(!r.shiftKey&&(13===r.keyCode&&(r.preventDefault(),e.applyEdit()),e.fillSign)){var i=t.find(".fv__text-object-edit-char-mask-layer"),o=n[0].getBoundingClientRect().width;i.width()<o+15&&i.css("width",o+15+"px")}})),this.fillSign&&this.bindMovingEvent(t),t},t.prototype.activeCharEdit=function(e){var t=this;this.isActive=!0;var n=this.$charEditContainer=this.$charEditContainer||this.initCharEditContainer(),i=n.find(".fv__text-object-edit-char-mask-layer"),l=n.find(".fv__text-object-edit-char-input");this.dependences.pdfViewer._setSaveBefore((function(){return t.applyEdit()}));var d=this.graphicsObject,M=d.getRect(),v=this.pageRender,b=v.pdfViewer;return l.off("focus").on("focus",(function(){var e=b.getKeyboard(),n=e.activeContext(y.EDIT_TEXT_OBJECT),r=void 0,i=!1;e.withContext(y.EDIT_TEXT_OBJECT,(function(e){i||(r=e.keyup(m.BLUR_EDITTING_TEXT_OBJECT,(function(){var e=t.eCharInput.innerText;"string"!=typeof e&&(e=t.eCharInput.textContent),t.setTextChar(e).then((function(){t.unActive()})),b.getStateHandlerManager().switchTo(s.STATE_HANDLER_HAND)})))})),t.unswitchBinder=function(){i||(i=!0,n(),r&&r())}})),b.getEventEmitter().on(h,this.switchStateHandlerBind=function(){t.eCharInput&&t.applyEdit()}),Promise.all([v.getPDFPage(),v.getScale(),v.getRotation()]).then((function(e){var t=r(e,3),n=t[0],i=t[1],o=t[2];return[n.getDeviceRect(M,i,o),n,i,o]})).then((function(s){var l=r(s,4),h=l[0],M=l[1],m=l[2],y=l[3];n.css({left:h.left+"px",top:h.bottom+"px"});var v=n.find(".fv__text-object-edit-char-input"),b=v[0];i.css({width:h.right-h.left+"px",height:h.bottom-h.top+"px"});var D=d.getText();void 0===e&&(e=D),"string"==typeof b.innerText?b.innerText=D:b.textContent=D;var A=d.getFontSize(),N=d.getMatrix().toArray().slice(0,4);A*p()<12&&(A*=12,N[0]/=12,N[1]/=12,N[2]/=12,N[3]/=12),N[0]*=m,N[1]*=-m,N[2]*=-m,N[3]*=m;var I,j,T,w=new o.Matrix(N[0],N[1],N[2],N[3],0,0),x=M.getRotationAngle()+y;w.rotate(x/180*Math.PI),t.fillSign?v.css((I={fontSize:A+"pt",transform:"matrix("+w.toArray().join(",")+")",color:(0,u.colorConvertor)(16777215&d.getFillColor(),"#")},j="transform",T="matrix("+w.toArray().join(",")+")",j in I?Object.defineProperty(I,j,{value:T,enumerable:!0,configurable:!0,writable:!0}):I[j]=T,I)):(d.info.textState.font.baseName,v.css({fontFamily:'"'+[d.info.textState.font.baseName,d.info.textState.font.familyName,d.info.textState.font.nameKey,d.info.textState.font.name,"FoxitPDFSDKForWeb"].join('","')+'"',fontSize:A+"pt",fontWeight:d.info.textState.font.isBold?700:400,fontStyle:d.info.textState.font.isItalic?"italic":"",transform:"matrix("+w.toArray().join(",")+")",color:(0,u.colorConvertor)(16777215&d.getFillColor(),"#")}));var O=v.height(),E=v.width(),_=w.transformPoint(E,O),k=_[0],z=_[1],C=void 0,S=void 0;t.fillSign&&t.showToolbar(Math.abs(z)),k>=0&&z>0?(C=-w.transformPoint(E,0)[1]-O,S=0):k<0&&z>=0?(C=-w.transformPoint(E,0)[1]-O,S=-w.transformPoint(0,E)[1]):k<=0&&z<0?(C=w.transformPoint(0,O)[1]-O,S=-k+w.transformPoint(0,O)[0]):k>0&&z<=0&&(C=-w.transformPoint(0,O)[1]-O,S=k-w.transformPoint(E,0)[0]),v.css({top:C+"px",left:S+"px",transformOrigin:"left "+O+"px",bottom:"auto"}),e!==D&&("string"==typeof b.innerText?b.innerText=e:b.textContent=e),t.fillSign||(0,c.addFont)(d.info.textState.font.nameKey||d.info.textState.font.name,d.getWoff.bind(d)).catch((function(){})),t.reActive=function(e){t.unActive(),t.activeCharEdit(e)};var L=t.pageRender.pdfViewer.getEventEmitter();t.fillSign||L.emit(a.default.textObjectActive,t),document.activeElement!==b&&b.focus(),t.beforeZoomToBind&&L.off(f,t.beforeZoomToBind),t.pageRedrawBind&&L.off(g,t.pageRedrawBind),L.once(f,t.beforeZoomToBind=t.unActiveCharEdit.bind(t)),L.on(g,t.pageRedrawBind=function(n){n.index===t.getModel().getPDFPage().getIndex()&&(e="string"==typeof b.innerText?b.innerText:b.textContent,t.reActive(e))})}))},t.prototype.showToolbar=function(e){},t.prototype.setTextChar=function(e){return this.graphicsObject.setText(e)},t.prototype.getContextMenuConfig=function(){},t.prototype.getTextChar=function(){if(this.$charEditContainer){var e=this.$charEditContainer.find(".fv__text-object-edit-char-input")[0],t=e.innerText;return"string"!=typeof t&&(t=e.textContent),t}return this.getModel().getText()},t.prototype.textCharSure=function(){if(!this.isApplyEdit&&this.$charEditContainer){var e=this.$charEditContainer.find(".fv__text-object-edit-char-input")[0],t=e.textContent;return"string"!=typeof t&&(t=e.innerText),this.fillSign?this.saveFillSign():this.getModel().setText(t)}return Promise.resolve()},t.prototype.remove=function(){return e.prototype.remove.call(this),this.dependences.pdfViewer.unActiveElement(this),this.destroy(),this.graphicsObject.remove()},t}(i.default);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.convertFromNumberToHex=function(e){if("number"!=typeof e)throw new TypeError("Unexpected color value:"+e);if(e<0)return-1;var t=e.toString(16),n=6;for(e>16777215&&(n=8);t.length<n;)t="0"+t;return"#"+t},t.convertFromNumberToRGBA=function(e){var t=void 0;return e<16777216?t=255:(t=e/i&255,e&=16777215),{r:e>>16&255,g:e>>8&255,b:255&e,a:t}},t.colorConvertor=o,t.standardColorAsARGBNumber=function(e){if(e<=16777215)return 4278190080+e;if(e>16777215)return e;if("string"==typeof e){if((e=e.replace("#","").trim()).match(/^[0-9A-F]{8}$/i))return parseInt(e,16);if(e.match(/^[0-9A-F]{6}$/i))return 4278190080+parseInt(e,16);if(e.match(/^rgb\(\d{1,3}(,\d{1,3}){2}\)$/i)){var t=e.split(/\D+/).map((function(e){return parseInt(e)})),n=r(t,4);return 4278190080+(n[1]<<16)+(n[2]<<8)+n[3]}if(e.match(/^rgba\(\d{1,3}(,\d{1,3}){3}\)$/i)){var i=e.split(/\D+/).map((function(e){return parseInt(e)})),o=r(i,5),a=o[1],c=o[2],u=o[3],s=o[4];return Math.floor(4278190080*s)+(a<<16)+(c<<8)+u}}throw new Error('incorrect color format: "'+e+'"')},t.convertFromNumberToJSColor=function(e){return["RGB",((16711680&e)>>16)/255,((65280&e)>>8)/255,(255&e)/255]},t.getTransparentOrColor=function(e){return 0===e?"transparent":o(16777215&e,"#")};var i=Math.pow(2,24);function o(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HTML",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a="",c=void 0;switch("number"==typeof e&&(e=["int",e]),e[0]){case"int":t=(16711680&e[1])>>16,n=(65280&e[1])>>8,r=255&e[1];break;case"T":t=0,n=0,r=0,o=0;break;case"G":t=n=r=255*e[1];break;case"RGB":t=255*e[1],n=255*e[2],r=255*e[3];break;case"CMYK":t=(1-e[4])*(1-e[1])*255,n=(1-e[4])*(1-e[2])*255,r=(1-e[4])*(1-e[3])*255;break;case"r":t=+(c=e.match(/rgba?\((\d*),\s*(\d*),\s*(\d*),?\s*([\.0-9]*)?\)/))[1],n=+c[2],r=+c[3];var u=c[4];void 0!==u&&(o=+u);break;case"#":var s=4==e.length?/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/:/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;c=e.match(s),t=parseInt(c[1],16),n=parseInt(c[2],16),r=parseInt(c[3],16);break;default:throw new Error("Unsupported color format")}switch(i){case"HTML":a=t===n&&n===r&&-1===r?"transparent":"rgba("+parseInt(t)+","+parseInt(n)+","+parseInt(r)+","+o+")";break;case"RGB":a=["RGB",t/255,n/255,r/255];break;case"#":a+=t<16?"#0"+t.toString(16):"#"+t.toString(16),a+=n<16?"0"+n.toString(16):n.toString(16),a+=r<16?"0"+r.toString(16):r.toString(16);break;case"int":a=0,a|=(o*=255)<<24,a|=t<<16,a|=n<<8,a|=r,a>>>=0}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(5))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),a=n(3),c=n(23),u=o.Deps.jQuery,s=function(e){function t(n,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.active=function(){e.prototype.active.call(this)},t.prototype.getPropertyOptions=function(){var e=this.graphicsObject,t=e.getBorderColor();t=this.graphicsObject.needStroke()?(0,c.colorConvertor)(t||4278190080,"#"):0;var n=e.getFillColor();0==e.getFillMode()&&(n=0);var r=e.getBorderWidth();return{color:t,borderTransparent:!0,opacity:e.getOpacity(),fillColor:n,borderWidth:r}},t.prototype.initUI=function(){var t=this;e.prototype.initUI.call(this),this.$tip=u('<div class="fwr__path-object-tip"></div>'),this.$tip.appendTo(this.$handler);var n=this.rectHammer=new Hammer.Manager(this.$handler[0],{recognizers:[[Hammer.Press]]});return this.$handler.on("mousemove",(function(e){t.$tip.hide()})),n.on("press",(function(e){if(!u(".fv__ui-mobile").length){var n=t.graphicsObject.getRect(),r=l(t.$handler.parent()[0],e),i={left:r.x+"px",top:r.y+20+"px"};r=t.pageRender.page.reverseDevicePoint([r.x,r.y],t.pageRender.getScale(),t.pageRender.getRotation()),t.$tip.show().css(i).html("object : x:"+n.left.toFixed(2)+",y:"+n.bottom.toFixed(2)+"<br/>mouse: x:"+r[0].toFixed(2)+",y:"+r[1].toFixed(2))}})),this.$handler},t.prototype.showPropertiesDialog=function(e){var t=this.dependences.pdfViewer.activePropertiesDialog;this.dependences.pdfViewer.activePropertiesDialog?(t.show(e),t.setViewerComponent(this),this.activePropertiesDialog=t):this.propertiesControl=new o.PropertiesControl(this)},t.prototype.getContextMenuComponentName=function(){return"fv--path-graphics-object-contextmenu"},t.prototype.getContextMenuConfig=function(){var e=this;return{selector:"div.fv__shape-control",items:{properties:{name:"properties",nameI18nKey:"viewer_:contextmenu.annot.properties",callback:function(t,n,r){e.showPropertiesDialog(r)}},remove:{name:"delete",nameI18nKey:"viewer_:contextmenu.annot.delete",callback:function(){e.remove()}}}}},t.prototype.unActive=function(t){var n=this.activePropertiesDialog;n&&n.viewerComponent===this&&n.hide(),e.prototype.unActive.call(this,t)},t.prototype.remove=function(){return e.prototype.remove.call(this),this.dependences.pdfViewer.unActiveElement(this),this.destroy(),this.graphicsObject.remove()},t.prototype.destroy=function(){this.contextmenu&&this.contextmenu.destroy(),this.propertiesControl&&this.propertiesControl.close(),this.propertiesControl=null,this.rectHammer&&this.rectHammer.destroy(),e.prototype.destroy.call(this)},t}(i.default);t.default=s;var l=function(e,t){var n=e.getBoundingClientRect(),r=t.srcEvent,i=(0,a.getClientX)(r),o=(0,a.getClientY)(r);return{x:i-n.left-t.deltaX,y:o-n.top-t.deltaY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(22)),i=n(6),o=u(n(10)),a=u(n(26)),c=u(n(7));function u(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r,i));return a.pageRender=r,a.dependences=i,a.fillTextObject=n,a.fillSign=!0,a.handler=o,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.saveFillSign=function(){var e=this.eCharInput.innerText;"string"!=typeof e&&(e=this.eCharInput.textContent);var t=this.graphicsObject;t.update([{key:"text",value:this.getTextChar()},{key:"fontSize",value:t.getFontSize()}])},t.prototype.activeFillSignInput=function(){this.activeCharEdit()},t.prototype.unActiveFillSignInput=function(){},t.prototype.moveFillSign=function(){var e=this,t=this.getModel(),n=this.getTextChar(),r=this.eCharInput.getBoundingClientRect();return r=this.pageRender.getPDFRectFromClientRect(r),t.update([{key:"text",value:n},{key:"fontSize",value:t.getFontSize()},{key:"rect",value:r}]).then((function(t){return e.reActive(n)}))},t.prototype.removeToolbar=function(){this.toolbarObject&&this.toolbarObject.removeToolbar()},t.prototype.showToolbar=function(e){var t=this;this.$charEditContainer||this.activeCharEdit();var n=this.$charEditContainer.find(".fv__text-object-edit-char-mask-layer");this.toolbarObject||(this.toolbarObject=new a.default(this.pageRender,this.fillTextObject,!1)),this.toolbarObject.setFillSignObject(this.fillTextObject);var r=this.toolbarObject.showToolbar(n,e);this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-decrease",(function(e){var n=t.getModel(),r=n.getFontSize()-1;if(!(r<6)){var i=t.getTextChar();return Promise.resolve(!i||""==i).then((function(e){return e?Promise.resolve():n.setText(i)})).then((function(){return n.setFontSize(r)})).then((function(e){return t.reActive()}))}t.reActive()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-increase",(function(e){var n=t.getModel(),r=n.getFontSize()+1;if(!(r>40)){var i=t.getTextChar();return Promise.resolve(!i||""==i).then((function(e){return e?Promise.resolve():n.setText(i)})).then((function(){return n.setFontSize(r)})).then((function(e){return t.reActive()}))}t.reActive()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-delete",(function(e){t.remove(),t.handler.saveCurrentComponent()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-more",(function(e){var n=r.find(".fv__text-fill-sign-toolbar-exp");r.find(".fv__text-fill-sign-toolbar-base").hide(),n.css({display:"flex"}),t.eCharInput.focus()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-base-button",(function(e){var n=r.find(".fv__text-fill-sign-toolbar-exp"),i=r.find(".fv__text-fill-sign-toolbar-base");n.hide(),i.css({display:"flex"}),t.eCharInput.focus()})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-tick",(function(e){t.addPath(i.FillSignType.checkMark)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-cross",(function(e){t.addPath(i.FillSignType.crossMark)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-dot",(function(e){t.addPath(i.FillSignType.dot)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-line",(function(e){t.addPath(i.FillSignType.line)})),this.toolbarObject.registerCallback(".fv__text-fill-sign-toolbar-rectangle",(function(e){t.addPath(i.FillSignType.roundRectangle)}))},t.prototype.addPath=function(e){var t=this,n=this.eCharInput.getBoundingClientRect(),r=this.pageRender.getPDFRectFromClientRect(n);r.right=r.left+12,this.unActiveCharEdit(),this.remove().then((function(n){var i=t.pageRender.page,a=new c.default(i),u=t.pageRender.getRotation(),s=u?u/90+i.getRotation():i.getRotation();a.addPath(e,r,s).then((function(e){var n=new o.default(e,t.pageRender,t.dependences,t.handler);n.active(),t.handler.resetCurrentComponent(n)})).catch((function(e){e&&console.error(e)}))}))},t.prototype.bindMovingEvent=function(e){var t=this,n=e.find(".fv__text-object-edit-char-input"),r=void 0,i=void 0,o=this.pageRender.$handler,a=e.find(".fv_fillsign-moving"),c=function(t){var o={};o.left=i.left+t.clientX-r.x,o.top=i.top+t.clientY-r.y,a.parent().offset(o),e.css("z-index","29"),n.addClass("moving")};a.on("mousedown",(function(t){r={x:t.clientX,y:t.clientY},o.addClass("fv__ui-draggable-action"),i=a.parent().offset(),e.find(".fv__text-fill-sign-toolbar").hide(),o.on("mousemove",c)}));var u=function(i){o.removeClass("fv__ui-draggable-action"),o.off("mousemove",c),n.removeClass("moving"),r&&t.moveFillSign(),r=null,e.css("z-index","31"),e.find(".fv__text-fill-sign-toolbar").show()};o.on("mouseup",u),a.on("mouseup",u),n.on("mouseup",u)},t}(r.default);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=c(n(7)),o=c(n(17)),a=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)).Deps.jQuery,s=null,l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pageRender=t,this.fillSignObject=n,this.isPredefined=r,this.rect=null,this.fillSign=new i.default(t.page)}return e.prototype.removeToolbar=function(){s&&s.remove()},e.prototype.showToolbar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;s&&s.remove();var n=5,i=u('<div class="fv__text-fill-sign-toolbar">\n <div class="fv__text-fill-sign-toolbar-base">\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-decrease"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-increase"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-delete"></div>\n \x3c!--<div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-combo-filed"></div>--\x3e\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-more"></div>\n </div>\n <div class="fv__text-fill-sign-toolbar-exp">\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-tick"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-cross"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-dot"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-line"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-rectangle"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-base-button"></div>\n </div>\n </div>'),c=this.fillSignObject.getRect(),l=this.pageRender.page,d=l.getDeviceRect(c,this.pageRender.getScale(),this.pageRender.getRotation());if(this.fillSignObject instanceof o.default)if(this.isPredefined){if(i=u('<div class="fv__text-fill-sign-toolbar">\n <div class="fv__text-fill-sign-toolbar-base">\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-decrease"></div>\n <div class="fv__text-fill-sign-toolbar-icon fv__text-fill-sign-toolbar-increase"></div>\n </div>\n </div>'),e.after(i),i.css({top:d.top+"px",left:d.left-n+"px"}),d.top<30){var p=d.bottom-d.top;i.css({transform:"translatey("+(p+n)+"px)"})}}else e.after(i),d.top<30&&t?i.css({transform:"translatey("+(i.height()+4*n)+"px)"}):i.css({transform:"translatey(-"+t+"px)"});else if(this.fillSignObject instanceof a.default){i.find(".fv__text-fill-sign-toolbar-combo-filed").remove();var f=this.fillSignObject.info.type;switch(f){case r.FillSignType.checkMark:i.find(".fv__text-fill-sign-toolbar-tick").remove();break;case r.FillSignType.crossMark:i.find(".fv__text-fill-sign-toolbar-cross").remove();break;case r.FillSignType.line:i.find(".fv__text-fill-sign-toolbar-line").remove();break;case r.FillSignType.dot:i.find(".fv__text-fill-sign-toolbar-dot").remove();break;case r.FillSignType.roundRectangle:i.find(".fv__text-fill-sign-toolbar-roundRectangle").remove();break;default:throw new Error("No checkmark typeValue!")}if(e.after(i),i.css({top:d.top+"px",left:d.left-5+"px"}),d.top<30){var g=d.bottom-d.top;i.css({transform:"translatey("+(g+n)+"px)"})}}var h=this.pageRender.$handler.width(),M=u(".fv__ui-sidebar"),m=M[0].getBoundingClientRect(),y=i[0].getBoundingClientRect();if(y.right-m.right>h){var v=y.right-m.right-h;t?i.css({left:-5-v-5+"px"}):i.css({left:d.left-v-5+"px"})}return s=this.$toolbar=i,i},e.prototype.registerCallback=function(e,t){this.$toolbar.find(e).on("click",t)},e.prototype.setFillSignObject=function(e){this.fillSignObject=e},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(15)),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=a(n(10));function a(e){return e&&e.__esModule?e:{default:e}}var c=i.Deps.Hammer,u=i.Deps.jQuery,s=i.DeviceInfo.isTouchDevice,l=i.shared,d=l.getClientX,p=l.getClientY,f=i.ViewerEvents,g=null,h=u('<span class="fv__ui-predefined-cursor-img"/></span>'),M=void 0,m=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-text",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.setAddon=function(e){g=e},t.getStateName=function(){return"add-fill-predefined-text"},t.setParams=function(e){"predefined-text"!==e&&e.content&&(M=e.content,h.html(M))},t.prototype.resetCurrentComponent=function(e){this.currentComponet=e},t.prototype.resetType=function(e,t,n,r){var i=this;if(e&&n){var a=Promise.resolve(),c=n.getRect();this.currentComponent&&(this.currentComponent.unActive(),this.currentComponent.removeToolbar(),a=this.currentComponent.remove()),a.then((function(t){return e.addPath(r,c)})).then((function(e){var n=i.currentComponent=new o.default(e,t,g,i);n.active(),n.showToolbar()}))}},t.prototype.pageHandler=function(e){var t=this;this.pageRender=e;var n=e.$handler;n.addClass(this.cursorStyle);var r=n[0],i=this.hammer=new c.Manager(r,{recognizers:[[c.Tap]]});this.addEvent(n,"mousemove",(function(t){var i=r.getBoundingClientRect(),o=t.clientX-i.left,a=t.clientY-i.top;s||(h.css({transform:"scale("+e.getScale()+")",top:a-38/3,left:o-10}).show(),n.append(h))})),i.on("tap",(function(e){t.resetHandler();var n=r.getBoundingClientRect(),i=e.srcEvent,o=d(i),a=p(i),c=[o-n.left,a-n.top],u=t.pageRender,s=u.page,l=s.reverseDevicePoint([c[0]+-11,c[1]+-16],u.getScale(),u.getRotation()),g={type:"freetext",intent:"FreeTextTypewriter",subject:"FreeTextTypewriter",rect:{left:l[0],bottom:l[1]-10,right:l[0]+10,top:l[1]},contents:M,rotation:((360-90*s.getRotation()-u.getRotation())%360+360)%360,flags:4};s.addAnnot(g).then((function(e){var n=e[0];t.pdfViewer.eventEmitter.emit(f.addAnnotSuccess,n),t.pdfViewer.getStateHandlerManager().switchTo();var r=u.annotsRender;r&&r.activeAnnot(n.getId())}))}))},t.prototype.destroyPageHandler=function(){h.hide(),this.destroyList.map((function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e,3),n=t[0],r=t[1],i=t[2];n.off(r,i)})),this.currentComponet&&(this.currentComponet.unActive(),this.currentComponet&&this.currentComponet.removeToolbar(),this.currentComponet=null),this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(this.cursorStyle),this.addParams=null,this.resetHandler()},t.prototype.out=function(){this.destroyPageHandler()},t.prototype.resetHandler=function(){h.hide(),this.pdfViewer.activeElement()},t.prototype.addEvent=function(e,t,n){this.destroyList=this.destroyList||[],e.on(t,n),this.destroyList.push([e,t,n])},t}(r.default);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(64);Object.defineProperty(t,"MARKUP_ANNOTATION_STATE",{enumerable:!0,get:function(){return(e=r,e&&e.__esModule?e:{default:e}).default;var e}}),t.BORDER_STYLE={SOLID:0,DASHED:1,UNDERLINE:2,BEVELED:3,INSET:4,CLOUDY:5},t.POINT_TYPE={MOVE_TO:1,LINE_TO:2,LINE_TO_CLOSE_FIGURE:3,BEZIER_TO:4,BEZIER_TO_CLOSE_FIGURE:5},t.Intents={LINE_ARROW:"LineArrow",LINE_DIMENSION:"LineDimension",POLYGON_CLOUD:"PolygonCloud",POLYGON_DIMENSION:"PolygonDimension",POLYLINE_DIMENSION:"PolyLineDimension",CIRCLE_DIMENSION:"CircleDimension",FREETEXT_TYPEWRITER:"FreeTextTypewriter",FREETEXT_CALLOUT:"FreeTextCallout",STRIKEOUT_TEXTEDIT:"StrikeOutTextEdit"};var i=t.LineEndingName={0:"None",1:"Square",2:"Circle",3:"Diamond",4:"OpenArrow",5:"ClosedArrow",6:"Butt",7:"ROpenArrow",8:"RClosedArrow",9:"Slash"};t.LineEndingStyle=Object.keys(i).reduce((function(e,t){return e[i[t]]=Number(t),e}),{}),t.LINE_CAPTION_POSITION={POS_INLINE:0,POS_TOP:1},t.AnnotFlagsName={0:"invisible",1:"hidden",2:"print",3:"nozoom",4:"norotate",5:"noview",6:"readonly",7:"locked",8:"togglenoview"},t.PDFDocPermission={PrintLowQuality:4,ModifyDocument:8,Extract:16,AnnotForm:32,FillForm:256,ExtractAccess:512,Assemble:1024,PrintHighQuality:2048},t.MeasureType={MeasureTypeX:0,MeasureTypeY:1,MeasureTypeD:2,MeasureTypeA:3,MeasureTypeT:4,MeasureTypeS:5},t.STORE_NAMES={SELECTION_INFO:"viewer--store-selection-info"},t.CREATING_MEASUREMENT_CONTEXTMENU="creating-measurement-contextmenu",t.HIGHLIGHTING_MODE={NONE:0,INVERT:1,OUTLINE:2,PUSH:3,TOGGLE:4},t.RESOLVED_PROMISE_VOID=Promise.resolve(),t.DISTANCE_TOLERANCE=2,t.POINT_TOLERANCE=.01,t.POS_TYPE={FIRST:0,LAST:1,AFTER:2,BEFORE:3},t.STANDARD_HTML_ELEMENTS=["html","a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],t.EMPTY_STR="",t.DB_PREFIX="FoxitPDFSDKForWeb_",t.SET_FORM_CREATION_CONTINUOUSLY="set_form_creation_continuously",t.HIDE_FORM_FIELD_PROPERTY_BOX="hideFormFieldPropertyBox",t.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX="hideFormFieldSimplePropertyBox",t.MEASUREMENT_INFO="measurementInfo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={fieldAdded:"fieldAdded",fieldActivated:"fieldActivated",fieldDeativated:"fieldDeativated",fieldFontSizeChanged:"fieldFontSizeChanged",filedRemove:"filedRemove"};var r=t.g_csMoneyFormat=["$"," DM","€","fl"," F"," kr","Lit. "," Pts","£","$A. ","$NZ. ","Руб ","ESC. ","HK$ ","P. ","RMB¥","NT$ ","S.$ ","W","¥","zł","SEK ","kr ","C$ "];t.g_csDateFormat=["m/d","m/d/yy","m/d/yyyy","mm/dd/yy","mm/dd/yyyy","mm/yy","mm/yyyy","d-mmm","d-mmm-yy","d-mmm-yyyy","dd-mmm-yy","dd-mmm-yyyy","yy-mm-dd","yyyy-mm-dd","mmm-yy","mmm-yyyy","mmmm-yy","mmmm-yyyy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yyyy h:MM tt","m/d/yy HH:MM","m/d/yyyy HH:MM","Custom"],t.g_csTimeFormat=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt","Custom"],t.g_csSpecialFormat=["zipCode","zipCode4","phoneNumber","socialSecurityNumber","arbitraryMask"],t.CFD_Utils=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.GetSeperatorString=function(e,t){var n=""+e,r=n.length;return r>3?0==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+"."+n.substr(r-3):1==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+","+n.substr(r-3):this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+" "+n.substr(r-3):n},e.GetSampNumberFormat=function(e,t,n,r,i,o){var a="",c="",u=[];if(t>=0&&n>=0&&r>=0&&o>=0){var s="",l="",d=(c=""+e.toFixed(parseInt(t))).indexOf(".");d>0?(l=c.substr(0,d),s=c.substr(d)):(l=c,s="");var p="";for(0==n&&(p=this.GetSeperatorString(parseInt(l),1)+s),1==n&&(p=c),2==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),0)+s),3==n&&(p=(p=c).replace(".",",")),4==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),2)+s);;){if(0==i){a="$";break}if(1==i){a="DM";break}if(2==i){a="€";break}if(3==i){a="f";break}if(4==i){a="F";break}if(5==i){a="kr";break}if(6==i){a="Lit.";break}if(7==i){a="Pts";break}if(8==i){u[0]=163,a=String.fromCharCode.apply(String,u);break}if(9==i){a="$A.";break}if(10==i){a="$NZ.";break}if(11==i){u[0]=1056,u[1]=1091,u[2]=1073,a=String.fromCharCode.apply(String,u);break}if(12==i){a="ESC.";break}if(13==i){a="HK$";break}if(14==i){a="P.";break}if(15==i){u[0]=65509,a=String.fromCharCode.apply(String,u);break}if(16==i){a="NT$";break}if(17==i){a="S.$";break}if(18==i){u[0]=8361,a=String.fromCharCode.apply(String,u);break}if(19==i){u[0]=165,a=String.fromCharCode.apply(String,u);break}if(20==i){u[0]=122,u[1]=322,a=String.fromCharCode.apply(String,u);break}if(21==i){a="SEK";break}if(22==i){a="kr";break}if(23==i){u[0]=67,u[1]=36,a=String.fromCharCode.apply(String,u);break}if(i>23||i<0)break}c=2&r?0==o?"("+p+" "+a+")":"("+a+p+")":0==o?p+a:a+p}return c},e.GetSampPercentFormat=function(e,t,n){var r="";if(t>=0&&n>=0){r=""+(100*e).toFixed(parseInt(t));var i="",o="",a=(r+="%").indexOf(".");a>0?(o=r.substr(0,a),i=r.substr(a)):(o=r,i="");var c="";0==n&&(c=this.GetSeperatorString(parseInt(o),1)+i),1==n&&(c=r),2==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),0)+i),3==n&&(c=(c=r).replace(".",",")),4==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),2)+i),r=c}return r},e.GetFormatStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Format")?1:0==e.indexOf("AFPercent_Format")?2:0==e.indexOf("AFDate_FormatEx")?3:0==e.indexOf("AFTime_Format")?4:0==e.indexOf("AFSpecial_Format")?5:-1:0},e.GetKeystrokeStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Keystroke")?1:0==e.indexOf("AFPercent_Keystroke")?2:0==e.indexOf("AFDate_KeystrokeEx")?3:0==e.indexOf("AFTime_Keystroke")?4:0==e.indexOf("AFSpecial_Keystroke")?5:-1:0},e.GetPercentageValues=function(e){var t,n=-1,r=e.length,i=e.indexOf("("),o=r-i-3,a=e.substr(i+1,o),c=a.split(","),u=a[0];t=Number(u);for(var s=0;s<c.length&&!(++s>=2)&&""!=(u=c[s]);)1==s&&(n=Number(u));return{iDec:t,iSep:n}},e.StringFromUnicode=function(e){for(var t=!1,n="0x",r="",i=0;i<e.length;i++){var o=e[i];"\\"==e[i]&&i+1<e.length&&("u"==e[i+1]||"U"==e[i+1])?(i+=1,t&&(r+=String.fromCharCode(n),n="0x"),t=!0):t?n+=o:(r+=o,t=!1)}return t&&(r+=String.fromCharCode(n)),r},e.GetNumberValues=function(e){var t,n=1,i=-1,o=-1,a=-1,c=-1,u=e.length,s=e.indexOf("("),l=u-s-3,d=e.substr(s+1,l).split(",");t=Number(d[0]);for(var p=0;p<d.length&&!(++p>=6);){var f=d[p];if(""==f)break;if(1!=p)if(2!=p)if(3!=p)if(4!=p)5==p&&(c=f.indexOf("false")>=0?0:1);else{var g=f;if(""==g){a=-1;continue}g=(g=(g=(g=g.replace(/"/g,"")).replace(/'/g,"")).replace("\\u0020"," ")).trim(),g=this.StringFromUnicode(g);for(var h=0;h<24;h++){var M=r[h];if(g==(M=(M=M.replace(" "," ")).trim())){a=h;break}}h>23&&(a=-1)}else o=0;else{var m=Number(f);0!=m&&1!=m&&2!=m&&3!=m||(i=m)}else n=Number(f)}return{iDec:t,iSep:n,iNeg:i,iDef:o,iMoney:a,iPre:c}},e.GetRangeValues=function(e){for(var t=!1,n=!1,r="",i="",o=e.indexOf("("),a=e.indexOf(")"),c=void 0,u=e.substr(o+1,a-o-1).split(","),s=0;s<u.length;)c=(c=u[s]).trim(),0==s||2==s?"true"==c.toLowerCase()?0==s?t=!0:n=!0:0==s?t=!1:n=!1:1!=s&&3!=s||(1==s?r=c:i=c),s++;return{bFrom:t,bTo:n,csiFrom:r,csiTo:i}},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));n(18);var i=n(31),o=f(n(62)),a=f(n(63)),c=f(n(65)),u=f(n(66)),s=f(n(67)),l=f(n(68)),d=f(n(92)),p=f(n(93));function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var M=function(e){function t(){return g(this,t),h(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"edit-graphics"},t.getLoader=function(){return o.default},t.initOnLoad=function(){var e=r.modular.module("edit-graphics",[]);e.registerController(u.default),e.registerController(a.default),e.registerController(c.default),e.registerController(s.default),e.registerComponent(p.default),e.getRegistry().registerDirective(d.default),e.registerPreConfiguredComponent("contextmenu-item-properties",{template:'<contextmenu-item @controller="edit-graphics:ShowGraphicsObjectPropertiesController">ega:contextmenu.properties</contextmenu-item>'}),e.registerPreConfiguredComponent("contextmenu-item-set-to-front",{template:'<contextmenu-item @controller="edit-graphics:MoveFrontGraphicsObjectController">ega:contextmenu.set-to-front</contextmenu-item>'}),e.registerPreConfiguredComponent("contextmenu-item-set-to-back",{template:'<contextmenu-item @controller="edit-graphics:MoveBackGraphicsObjectController">ega:contextmenu.set-to-back</contextmenu-item>'}),e.registerPreConfiguredComponent("contextmenu-item-delete",{template:'<contextmenu-item @controller="edit-graphics:DeleteGraphicsObjectController">ega:contextmenu.delete</contextmenu-item>'}),e.registerPreConfiguredComponent("image-contextmenu",{template:'\n <contextmenu name="fv--image-graphics-object-contextmenu" @edit-graphics:check-activates>\n <edit-graphics:contextmenu-item-set-to-front name="fv--contextmenu-item-image-graphics-object-set-to-front"></edit-graphics:contextmenu-item-set-to-front>\n <edit-graphics:contextmenu-item-set-to-back name="fv--contextmenu-item-image-graphics-object-set-to-back"></edit-graphics:contextmenu-item-set-to-back>\n <edit-graphics:contextmenu-separator></edit-graphics:contextmenu-separator>\n <edit-graphics:contextmenu-item-delete name="fv--contextmenu-item-image-graphics-object-delete"></edit-graphics:contextmenu-item-delete>\n <edit-graphics:contextmenu-separator></edit-graphics:contextmenu-separator>\n <edit-graphics:contextmenu-item-properties name="fv--contextmenu-item-image-graphics-object-properties"></edit-graphics:contextmenu-item-properties>\n </contextmenu>\n '}),(0,l.default)(r.modular)},t.prototype.init=function(t){var n=this;e.prototype.init.call(this,t),t.getPDFViewer().then((function(e){(n.addon=new i.EditGraphicsAddon(e)).init()}))},t.prototype.receiveAction=function(e,t){if("getGraphicsObjectComponent"===e){var n=t.graphicsObject,r=t.pageRender;return new(this.addon.getGraphicsManager().get(n))(n,r,this.addon)}},t}(r.UIXAddon);t.default=M},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditGraphicsAddonEvents=t.EditGraphicsAddon=void 0;var r=o(n(32)),i=o(n(14));function o(e){return e&&e.__esModule?e:{default:e}}t.EditGraphicsAddon=r.default,t.EditGraphicsAddonEvents=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);t.default=e}(n(0));var r=y(n(33)),i=y(n(46)),o=y(n(47));n(18);var a=y(n(48)),c=y(n(51)),u=y(n(52)),s=y(n(53)),l=y(n(55)),d=y(n(4)),p=y(n(27)),f=y(n(57)),g=y(n(58)),h=y(n(59)),M=y(n(60)),m=y(n(61));function y(e){return e&&e.__esModule?e:{default:e}}var v=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pdfViewer=t,this.graphicsManager=new r.default,this.pdfViewer.addon=this}return e.prototype.init=function(){var e=this,t=(0,o.default)(this),n=(0,i.default)(this,2),r=(0,i.default)(this,3),y=(0,s.default)(this),v=(0,u.default)(this),b=this.pdfViewer.getStateHandlerManager();[t,n,r,y,a.default,v,c.default,l.default,d.default,p.default,f.default,g.default,h.default,M.default,m.default].forEach((function(t){t.setAddon&&t.setAddon(e),b.register(t)})),this.pdfViewer.addDestroyHook((function(){a.default.setAddon(null),c.default.setAddon(null),l.default.setAddon(null),d.default.setAddon(null)}))},e.prototype.getGraphicsManager=function(){return this.graphicsManager},e}();t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(5)),i=c(n(22)),o=c(n(24)),a=c(n(43));function c(e){return e&&e.__esModule?e:{default:e}}c(n(45));var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchRules=[]}return e.prototype.registerMatchRule=function(e){return this.matchRules.push(e),e},e.prototype.unRegisterMatchRule=function(e){var t=this.matchRules.indexOf(e);-1!==t&&this.matchRules.splice(t,1)},e.prototype.get=function(e){for(var t=this.matchRules,n=this.getDefault(e),r=t.length;r--;){var i=t[r];if("function"==typeof i){var o=i(e,n);if(o)return o}}return n},e.prototype.getDefault=function(e){switch(e.getType()){case 1:return i.default;case 2:return o.default;case 3:return a.default;default:return r.default}},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(19)),i=n(20),o=s(n(36)),a=s(n(13)),c=n(37),u=n(6);function s(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.page=n,this.doc=n.doc,this.engine=r,this.info=t}return e.prototype.destroy=function(){this.page=null,this.doc=null,this.engine=null,this.info=null},e.prototype.getId=function(){return this.info.id},e.prototype.getPDFPage=function(){return this.page},e.prototype.getBitmap=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getPDFPage();return n.doc.api.getGraphicsObjectBitmap(n.getPDFDoc().getId(),n.getId(),this.getId(),e*(0,i.getPtPxRatio)(),t)},e.prototype.getRect=function(){return this.info.rect},e.prototype.setRect=function(e){var t=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var n=this.getPDFPage();this.info.rect=e;var i=arguments[1];return n.doc.api.setGraphicsObjectRect(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e,i&&t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.setMatrix=function(e){var t=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var n=this.getPDFPage();return this.info.matrix=e,n.doc.api.setGraphicsObjectMatrix(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e,t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.getMatrix=function(){var e=this.info.matrix;return new a.default(e.a,e.b,e.c,e.d,e.e,e.f)},e.prototype.getDeviceMatrix=function(){var e=this.getMatrix();e.translate(0,-this.getPDFPage().getHeight());var t=(0,c.pt2px)(1);return e.scale(t,-t),e},e.prototype.getType=function(){return this.info.type},e.prototype.getBorderDashes=function(){return d(this.getType()),this.info.graphState.dashes},e.prototype.getBorderStyle=function(){return d(this.getType()),this.info.graphState.dashes.length>0?1:0},e.prototype.setBorderStyle=function(e,t){var n=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");d(this.getType());var i=this.getPDFPage();return this.info.graphState.dashes=t,i.doc.api.setGraphicsObjectBorderStyle(i.getPDFDoc().getId(),i.getId(),this.getId(),e,t).then((function(e){n.info=e,n.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,i)}))},e.prototype.getBorderWidth=function(){return d(this.getType()),this.info.graphState.lineWidth},e.prototype.setBorderWidth=function(e){var t=this;if(d(this.getType()),!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var n=this.getPDFPage();return this.info.graphState.lineWidth=e,n.doc.api.setGraphicsObjectBorderWidth(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e,t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.getBorderColor=function(){return d(this.getType()),(4278190080|this.info.strokeColor)>>>0},e.prototype.setBorderColor=function(e){var t=this;if(d(this.getType()),!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var n=this.getPDFPage();return n.doc.api.setGraphicsObjectBorderColor(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e||t.info,t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.getFillColor=function(){return d(this.getType()),(4278190080|this.info.fillColor)>>>0},e.prototype.setFillColor=function(e){var t=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");d(this.getType());var n=this.getPDFPage();return n.doc.api.setGraphicsObjectFillColor(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e,t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.getOpacity=function(){return((4278190080&this.info.strokeColor)>>>0)/4278190080},e.prototype.setOpacity=function(e){var t=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var n=this.getPDFPage();return n.doc.api.setGraphicsObjectOpacity(n.getPDFDoc().getId(),n.getId(),this.getId(),e).then((function(e){t.info=e,t.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,n)}))},e.prototype.remove=function(){if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");return this.getPDFPage().removeGraphicsObject(this)},e.prototype.moveToPosition=function(e,t){var n=this;if(!this.doc.checkPermission(o.default.modify))throw new Error("Permission error");var i=this.getPDFPage();if(-1===Object.values(u.PosType).findIndex((function(t){return t==e})))throw new Error("Type error");var a=null;return e!=u.PosType.first&&e!=u.PosType.last&&(a=t.getId()),i.doc.api.moveGraphicsObjectByPosition(i.getPDFDoc().getId(),i.getId(),this.getId(),e,a).then((function(e){n.doc.engine.eventEmitter.emit(r.default.graphicsUpdated,i)}))},e}();t.default=l;var d=function(e){if(1!=e&&2!=e&&5!=e)throw new Error("only text, path object are supported")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.T=function(){return!0},t.F=function(){return!1},t.identity=function(e){return e},t.prop=function(e,t){return t[e]},t.curry=function(e){return function t(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=e.length?e.apply(void 0,r):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(void 0,r.concat(n))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={print:4,modify:8,extract:16,annotForm:32,fillForm:256,extractAccess:512,assemble:1024,printHigh:2048}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRotatedRect=t.getSmartScale=t.getWHByMatrix=t.pxDPRpt=t.ptDPRpx=t.multiDPR=t.px2pt=t.pt2px=void 0;var r,i=n(20),o=(n(38),(r=n(97))&&r.__esModule?r:{default:r}),a=n(8),c=void 0;function u(e){return function(){if(!c){var e=(0,i.getDPI)();c=[e.x,e.y]}return c}()[e]}t.pt2px=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e*u(t)/72},t.px2pt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return 72*e/u(t)},t.multiDPR=function(e){return e*i.dpr},t.ptDPRpx=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i.dpr*e*u(t)/72},t.pxDPRpt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e/i.dpr/u(t)*72},t.getWHByMatrix=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new o.default(e,t,0).scale(n).rotateZ(r);return[Math.round(Math.abs(i.a)),Math.round(Math.abs(i.b))]},t.getSmartScale=function(e,t,n){return Math.min(Math.max(Math.ceil(4*e)/4,t),n)},t.getRotatedRect=function(e,t,n,r){switch((0,a.assertThat)((0,a.isValidRotationAngle)(r),"Illegal rotation value: "+r),r=(r%360+360)%360){case 0:return e;case 90:return{left:e.bottom,right:e.top,top:e.left,bottom:e.right};case 180:return{left:t-e.right,right:t-e.left,top:n-e.bottom,bottom:n-e.top};case 270:return{left:e.top,right:e.bottom,top:e.right,bottom:e.left}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pageMatrix=void 0;var r,i=(r=n(13))&&r.__esModule?r:{default:r};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.pageMatrix=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=void 0;switch(r%360){case 0:a=[n,0,0,n,0,0];break;case 90:a=[0,n,-n,0,n*t,0];break;case 180:a=[-n,0,0,-1,n*e,n*t];break;case 270:a=[0,-n,n,0,0,n*e];break;default:throw new Error("Unsupported rotation value: "+r)}return new(Function.prototype.bind.apply(i.default,[null].concat(o(a))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={success:0,file:1,format:2,password:3,handle:4,certificate:5,unknown:6,invalidLicense:7,param:8,unsupported:9,outOfMemory:10,securityHandler:11,notParsed:12,notFound:13,invalidType:14,conflict:15,unknownState:16,dataNotReady:17,invalidData:18,xFALoadError:19,notLoaded:20,invalidState:21,notCDRM:22,canNotConnectToServer:23,invalidUserToken:24,noRights:25,rightsExpired:26,deviceLimitation:27,canNotRemoveSecurityFromServer:28,canNotGetACL:29,canNotSetACL:30,isAlreadyCPDF:31,isAlreadyCDRM:32,canNotUploadDocInfo:33,canNotUploadCDRMInfo:34,invalidWrapper:35,canNotGetClientID:36,canNotGetUserToken:37,invalidACL:38,invalidClientID:39,OCREngineNotInit:40,diskFull:41,OCRTrialIsEnd:42,filePathNotExist:43,complianceEngineNotInit:44,complianceEngineInvalidUnlockCode:45,complianceEngineInitFailed:46,timeStampServerMgrNotInit:47,LTVVerifyModeNotSet:48,LTVRevocationCallbackNotSet:49,LTVCannotSwitchVersion:50,LTVCannotCheckDTS:51,LTVCannotLoadDSS:52,LTVCannotLoadDTS:53,needSigned:54,complianceResourceFile:55,timeStampServerMgrNoDefaltServer:56,defaultTimeStampServer:57,noConnectedPDFModuleRight:58,noXFAModuleRight:59,noRedactionModuleRight:60,noRMSModuleRight:61,noOCRModuleRight:62,noComparisonModuleRight:63,noComplianceModuleRight:64,noOptimizerModuleRight:65,noConversionModuleRight:66,collaborationSession:1400}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,i=void 0,o={};"function"==typeof FontFace?(t.addFont=r=function(e,t){return o[e]?o[e]:o[e]=new Promise((function(n,r){t().then((function(t){if(!t)return r(),void o[e];var i=new FontFace(e,t.buffer||t.url);i.load().then((function(){document.fonts.add(i),n(i)}),(function(){r(),delete o[e]}))}),(function(){r(),delete o[e]}))}))},t.removeFont=i=function(e){o[e]&&o[e].then((function(t){delete o[e],document.fonts.delete(t)}))}):(t.addFont=r=function(e,t){return o[e]?o[e]:o[e]=new Promise((function(n,r){t().then((function(t){return t?t.buffer?URL.createObjectURL(new Blob([t.buffer],"application/x-font-woff")):t.url:(r("woff is invalid"),void delete o[e])})).then((function(t){if(!t)return r();var i=document.createElement("style");i.innerHTML='@font-face{font-family:"'+e+'"; src:url("'+t+'");}',document.head.appendChild(i),n(i)}))}))},t.removeFont=i=function(e){o[e]&&o[e].then((function(t){delete o[e],t.parentNode.removeChild(t)}))}),t.addFont=r,t.removeFont=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.StateNameFieldTypeMap=t.StateNameAnnotTypeMap=t.STATE_HANDLER_CREATE_ARTICLE_BUTTON=t.STATE_HANDLER_CREATE_RADIO_BUTTON=t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON=t.STATE_HANDLER_CREATE_FIELD_SIGNATURE=t.STATE_HANDLER_CREATE_FIELD_TEXT=t.STATE_HANDLER_CREATE_CROP_PAGES=t.STATE_HANDLER_SNAPSHOT_TOOL=t.STATE_HANDLER_CREATE_FREETEXT_BOX=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT=t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER=t.STATE_HANDLER_SELECT_ANNOTATION=t.STATE_HANDLER_SELECT_TEXT_IMAGE=t.STATE_HANDLER_SELECT_TEXT_ANNOTATION=t.STATE_HANDLER_LOUPE=t.STATE_HANDLER_ERASER=t.STATE_HANDLER_MARQUEE=t.STATE_HANDLER_CREATE_UNDERLINE=t.STATE_HANDLER_CREATE_TEXT=t.STATE_HANDLER_CREATE_STRIKE_OUT=t.STATE_HANDLER_CREATE_STAMP=t.STATE_HANDLER_CREATE_SQUIGGLY=t.STATE_HANDLER_CREATE_SQUARE_CROP=t.STATE_HANDLER_CREATE_SQUARE=t.STATE_HANDLER_CREATE_REPLACE=t.STATE_HANDLER_CREATE_POLYLINE=t.STATE_HANDLER_CREATE_POLYGON=t.STATE_HANDLER_CREATE_POLYGON_CLOUD=t.STATE_HANDLER_CREATE_PENCIL=t.STATE_HANDLER_CREATE_CIRCLE_AREA=t.STATE_HANDLER_CREATE_AREA=t.STATE_HANDLER_CREATE_PERIMETER=t.STATE_HANDLER_CREATE_DISTANCE=t.STATE_HANDLER_CREATE_LINE=t.STATE_HANDLER_CREATE_LINK=t.STATE_HANDLER_CREATE_EDIT_IMAGE=t.STATE_HANDLER_CREATE_IMAGE=t.STATE_HANDLER_CREATE_HIGHLIGHT=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT=t.STATE_HANDLER_CREATE_CIRCLE=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT=t.STATE_HANDLER_CREATE_ARROW=t.STATE_HANDLER_CREATE_CARET=t.STATE_HANDLER_CHECK_THE_SEARCH=t.STATE_HANDLER_HAND=void 0;var i=n(42);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.STATE_HANDLER_HAND="hand",t.STATE_HANDLER_CHECK_THE_SEARCH="checkTheSearch";var a=t.STATE_HANDLER_CREATE_CARET="createCaret",c=t.STATE_HANDLER_CREATE_ARROW="createArrow",u=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT="createAreaHighlight",s=t.STATE_HANDLER_CREATE_CIRCLE="createCircle",l=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT="createFileAttachment",d=t.STATE_HANDLER_CREATE_HIGHLIGHT="createHighlight",p=t.STATE_HANDLER_CREATE_IMAGE="createImage",f=(t.STATE_HANDLER_CREATE_EDIT_IMAGE="createEditImage",t.STATE_HANDLER_CREATE_LINK="createLink"),g=t.STATE_HANDLER_CREATE_LINE="createLine",h=t.STATE_HANDLER_CREATE_DISTANCE="createDistance",M=t.STATE_HANDLER_CREATE_PERIMETER="createPerimeter",m=t.STATE_HANDLER_CREATE_AREA="createArea",y=t.STATE_HANDLER_CREATE_CIRCLE_AREA="createCircleArea",v=t.STATE_HANDLER_CREATE_PENCIL="createPencil",b=t.STATE_HANDLER_CREATE_POLYGON_CLOUD="createPolygonCloud",D=t.STATE_HANDLER_CREATE_POLYGON="createPolygon",A=t.STATE_HANDLER_CREATE_POLYLINE="createPolyline",N=t.STATE_HANDLER_CREATE_REPLACE="createReplace",I=t.STATE_HANDLER_CREATE_SQUARE="createSquare",j=(t.STATE_HANDLER_CREATE_SQUARE_CROP="createSquareCrop",t.STATE_HANDLER_CREATE_SQUIGGLY="createSquiggly"),T=t.STATE_HANDLER_CREATE_STAMP="createStamp",w=t.STATE_HANDLER_CREATE_STRIKE_OUT="createStrikeOut",x=t.STATE_HANDLER_CREATE_TEXT="createText",O=t.STATE_HANDLER_CREATE_UNDERLINE="createUnderline",E=(t.STATE_HANDLER_MARQUEE="marquee",t.STATE_HANDLER_ERASER="eraser",t.STATE_HANDLER_LOUPE="loupe",t.STATE_HANDLER_SELECT_TEXT_ANNOTATION="select-text-annotation",t.STATE_HANDLER_SELECT_TEXT_IMAGE="select-text-image",t.STATE_HANDLER_SELECT_ANNOTATION="select-annotation",t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER="CreateFreeTextTypewriterHandler"),_=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT="createFreeTextCallout",k=t.STATE_HANDLER_CREATE_FREETEXT_BOX="createFreeTextBox",z=(t.STATE_HANDLER_SNAPSHOT_TOOL="snapshot-tool",t.STATE_HANDLER_CREATE_CROP_PAGES="create-crop-pages",t.STATE_HANDLER_CREATE_FIELD_TEXT="CreateTextFieldHandler",t.STATE_HANDLER_CREATE_FIELD_SIGNATURE="CreateSignatureFieldHandler",t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON="CreatePushButtonFieldHandler",t.STATE_HANDLER_CREATE_RADIO_BUTTON="CreateRadioButtonStateHandler",t.STATE_HANDLER_CREATE_ARTICLE_BUTTON="CreateArticleButtonStateHandler",o(r={},x,"text"),o(r,d,"highlight"),o(r,w,"strikeout"),o(r,O,"underline"),o(r,j,"squiggly"),o(r,N,"strikeout"),o(r,a,"caret"),o(r,E,"freetext"),o(r,_,"freetext"),o(r,k,"freetext"),o(r,I,"square"),o(r,s,"circle"),o(r,g,"line"),o(r,c,"line"),o(r,D,"polygon"),o(r,A,"polyline"),o(r,b,"polygon"),o(r,u,"highlight"),o(r,v,"ink"),o(r,T,"stamp"),o(r,h,"line"),o(r,M,"polyline"),o(r,m,"polygon"),o(r,y,"circle"),o(r,l,"fileattachment"),o(r,p,"screen"),o(r,f,"link"),o(r,"create-multi-media-state","screen"),o(r,"create-redaction-text-image-state","redact"),o(r,"create-redaction-state","redact"),r),C={CreatePushButtonStateHandler:i.FieldType.PushButton,CreateCheckBoxStateHandler:i.FieldType.CheckBox,CreateRadioButtonStateHandler:i.FieldType.RadioButton,CreateComboBoxStateHandler:i.FieldType.ComboBox,CreateListBoxStateHandler:i.FieldType.ListBox,CreateTextStateHandler:i.FieldType.Text,CreateSignStateHandler:i.FieldType.Sign,CreateDateStateHandler:i.FieldType.Text,CreateImageStateHandler:i.FieldType.PushButton};t.StateNameAnnotTypeMap=z,t.StateNameFieldTypeMap=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ReadOnly:1,Required:2,NoExport:4,Hidden:8,ButtonNoToggleToOff:16384,ButtonRadiosInUnison:33554432,TextMultiline:4096,TextPassword:8192,TextDoNotSpellCheck:4194304,TextDoNotScroll:8388608,TextComb:16777216,ComboEdit:262144,ChoiceMultiSelect:2097152,CommitOnSelChange:67108864,inUnison:function(e){return e&r.ButtonRadiosInUnison},isHidden:function(e){return e&r.Hidden},isReadOnly:function(e){return e&r.ReadOnly},isRequired:function(e){return e&r.Required},isNoExport:function(e){return e&r.NoExport},isMultiline:function(e){return e&r.TextMultiline},isPassword:function(e){return e&r.TextPassword},isComb:function(e){return e&r.TextComb},isNoSpellCheck:function(e){return e&r.TextDoNotSpellCheck},isNoScroll:function(e){return e&r.TextDoNotScroll},isComboEdit:function(e){return e&r.ComboEdit},isChoiceMultiSelect:function(e){return e&r.ChoiceMultiSelect}},i={FlagExclude:1,FlagIncludeNoValueFields:2,FlagExportFormat:4,FlagGetMethod:8,FlagWithCoordinates:16,FlagAsXFDF:32,FlagIncludeAppendSaves:64,FlagIncludeAnnotations:128,FlagSubmitAsPDF:256,FlagCanonicalFormat:512,FlagExclNonUserAnnots:1024,FlagExclFKey:2048,FlagEmbedForm:8192,isExclude:function(e){return e&i.FlagExclude},isIncludeNoValueFields:function(e){return e&i.FlagIncludeNoValueFields},isHTML:function(e){return e&i.FlagExportFormat},isGetMethod:function(e){return e&i.FlagGetMethod},isXFDF:function(e){return e&i.FlagAsXFDF},isPDF:function(e){return e&i.FlagSubmitAsPDF},getType:function(e){var t=i.isHTML(e);if(t)return"HTML";var n=i.isXFDF(e);if(n)return"XFDF";var r=i.isXFDF(e);return r?"PDF":t||n||r?void 0:"FDF"}},o=r;t.FieldType={Unknown:0,PushButton:1,CheckBox:2,RadioButton:3,Text:6,ListBox:5,ComboBox:4,Sign:7,Barcode:8},t.FieldFlag=o,t.FormActionFlags=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(5))&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),a=n(44);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}var l=o.Deps.jQuery,d=o.Events,p=function(e){function t(){return c(this,t),u(this,e.apply(this,arguments))}return s(t,e),t.prototype._resize=function(t,n,r){t==a.DIR_NORTH||t==a.DIR_SOUTH||t==a.DIR_EAST||t==a.DIR_WEST?this.enableUniform=!1:this.enableUniform=!0,e.prototype._resize.call(this,t,n,r)},t}(o.ShapeControl),f=function(e){function t(n,r,i){return c(this,t),u(this,e.call(this,n,r,i))}return s(t,e),t.getDefaultContextMenuConfig=function(){return defaultContextMenuConfig},t.setContextMenuConfig=function(e){},t.prototype.initUI=function(){var e=this,t=this,n=this.$handler=l('<div class="fwr__graphics-object-handler" \n ></div>');return this.pageRender.pageHandler.$handler.append(n),n.get(0).__graphics_object_component=this,this.shapeControl=new p({prestart:function(){return e.onPrestart()},start:function(t,n,r){return e.onStartUpdateShape(t,n,r)},moving:function(t,n,r){var i=r.offsetX,o=r.offsetY;return e.onShapeMoving(t,n,i,o)},update:function(t,n){return e.onShapeUpdating(t,n)},beforeRotateStart:function(){return e.onBeforeRotateStart()},rotateEnd:function(t,n,r,i){return e.onRotate(t)},afterRotateEnd:function(){return e.onAfterRotateEnd()},rotateStart:function(){return e.onRotateStart()},end:function(t,n,r,i){return e.onShapeUpdateEnd(t,n,r,i)},afterEnd:function(t){return e.onAfterShapeCtrlEnd(t)},resizable:!0,rotatable:!0,enableDiagonally:!0,enableFrame:!0,enableUniform:!0,previewer:!0,enableSizeBox:!0}),this.dependences.pdfViewer.eventEmitter.on(d.zoomToSuccess,this.afterZoom=function(){t.updateShapeControl()}),this.$handler},t.prototype.onBeforeRotateStart=function(){var e=this;this.dependences.pdfViewer.getAllActiveElements().forEach((function(n){n!==e&&n instanceof t&&e.shapeControl.companion(n.shapeControl)}))},t.prototype.onAfterRotateEnd=function(){this.shapeControl.clearCompanions(),this.shapeControl.rotateDegree=0},t.prototype.onRotate=function(e){var t=this;return this.pageRender.$handler.get(0).classList.remove("fv__cursor-rotation"),this.graphicsObject.setRotation(e).then((function(e){t.updateShapeControl()}))},t.prototype.updateShapeControl=function(){e.prototype.updateShapeControl.call(this),this.shapeControl.ui.style.transform=""},t.prototype.onRotateStart=function(){this.pageRender.$handler.get(0).classList.add("fv__cursor-rotation")},t.prototype.getContextMenuConfig=function(){var e=this;return{selector:"div.fv__shape-control",items:{properties:{name:"properties",nameI18nKey:"viewer_:contextmenu.annot.properties",callback:function(t,n,r){e.showPropertiesDialog(r)}},remove:{name:"delete",nameI18nKey:"viewer_:contextmenu.annot.delete",callback:function(){var t=e.dependences.pdfViewer;if(t.getAllActiveElements().forEach((function(e){e.remove&&e.remove()})),0===t.getAllActiveElements().length){var n=t.getCurrentActivatable();n&&t.unActiveElement(n)}}}}}},t.prototype.getContextMenuComponentName=function(){return"fv--image-graphics-object-contextmenu"},t.prototype.getPropertyOptions=function(){return{opacity:this.graphicsObject.getOpacity(),borderStyle:!1}},t.prototype.showPropertiesDialog=function(e){var t=this.dependences.pdfViewer.activePropertiesDialog;this.dependences.pdfViewer.activePropertiesDialog?(t.show(e),t.setViewerComponent(this),this.activePropertiesDialog=t):this.$propertiesControl=new o.PropertiesControl(this)},t.prototype.hidePropertiesDialog=function(){this.$propertiesControl&&this.$propertiesControl.close()},t.prototype.destroy=function(){this.contextmenu&&this.contextmenu.destroy(),this.dependences.pdfViewer.eventEmitter.off(d.zoomToSuccess,this.afterZoom),e.prototype.destroy.call(this)},t.prototype.setOpacity=function(e){this.graphicsObject.setOpacity(e)},t.prototype.remove=function(){e.prototype.remove.call(this),this.graphicsObject.remove(),this.dependences.pdfViewer.unActiveElement(this),this.destroy()},t.prototype.unActive=function(t){var n=this.activePropertiesDialog;n&&n.viewerComponent===this&&n.hide(),e.prototype.unActive.call(this,t)},t}(i.default);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DIR_NORTH="north",t.DIR_SOUTH="south",t.DIR_EAST="east",t.DIR_WEST="west",t.DIR_NORTH_WEST="north-west",t.DIR_NORTH_EAST="north-east",t.DIR_SOUTH_WEST="south-west",t.DIR_SOUTH_EAST="south-east"},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n,r,i){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.active=function(){},t.prototype.getContextMenuConfig=function(){},t}(((r=n(5))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e,t){var n=e.graphicsManager,o=["","text","path","image","shading","all"][t],u=o?["fv__edit-",o,"-state-handler"].join(""):"";return u+=" fv__edit-graphics-state-handler",function(i){function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(s,i),s.getStateName=function(){return"edit-"+o},s.prototype.pageHandler=function(i){var o=this;this.pageRender=i;var s=i.getPDFPage(),l=i.$handler,d=l[0];l.addClass(u),(this.hammer=new a(d)).on("tap",(function(a){if(-1!=a.target.className.indexOf("fv__shape-control-move-area"))return Promise.resolve();o.resetHandler();var u=c(d,a);s.then((function(e){return[e,e.reverseDevicePoint([u.x,u.y],i.getScale(),i.getRotation())]})).then((function(e){var n=r(e,2),i=n[0],o=r(n[1],2),a=o[0],c=o[1];return 5===t?i.getGraphicsObjectAtPoint([a,c],5,0):i.getGraphicsObjectAtPoint([a,c],3,t)})).then((function(e){return!e||e.type<1||e.type>3?Promise.reject():[n.get(e),e]})).then((function(t){var n=r(t,2);return new(0,n[0])(n[1],i,e)})).then((function(e){return o.currentComponent=e,e.active()})).catch((function(e){e&&console.error(e),o.currentComponent=null,o.pdfViewer.activeElement()}))}))},s.prototype.destroyPageHandler=function(){this.unregisterKeyEvent&&this.unregisterKeyEvent(),this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(u),this.resetHandler()},s.prototype.out=function(){this.destroyPageHandler()},s.prototype.resetHandler=function(){this.currentComponent&&(this.currentComponent.textCharSure&&this.currentComponent.textCharSure(),this.currentComponent.unActive())},s}(i.IStateHandler)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=n(3),a=i.Deps.Hammer,c=function(e,t){var n=e.getBoundingClientRect(),r=t.srcEvent,i=(0,o.getClientX)(r),a=(0,o.getClientY)(r);return{x:i-n.left-t.deltaX,y:a-n.top-t.deltaY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.graphicsManager,n="text",a=n?["fv__edit-",n,"-state-handler"].join(""):"";return a+=" fv__edit-graphics-state-handler",function(i){function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,i.call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(c,i),c.getStateName=function(){return"edit-"+n},c.prototype.pageHandler=function(n){var i=this;this.pageRender=n;var c=n.$handler,u=c[0];c.addClass(a);var s=this.hammer=new o.Manager(u,{recognizers:[[o.Pan,{direction:o.DIRECTION_ALL}]]});s.add(new o.Tap({event:"doubletap",taps:2})),s.add(new o.Tap({event:"singletap"})),s.get("doubletap").recognizeWith("singletap"),s.get("singletap").requireFailure("doubletap"),s.on("singletap",(function(o){i.resetHandler();var a=o.changedPointers[0];n.getPDFPage().then((function(e){return[e,e.reverseDevicePoint([a.offsetX,a.offsetY],n.getScale(),n.getRotation())]})).then((function(e){var t=r(e,2),n=t[0],i=r(t[1],2),o=i[0],a=i[1];return n.getGraphicsObjectAtPoint([o,a],3,1)})).then((function(e){return e?[t.get(e),e]:Promise.reject(new Error("Text object not found at this position: ["+a.offsetX+", "+a.offsetY+"]"))})).then((function(t){var i=r(t,2);return new(0,i[0])(i[1],n,e)})).then((function(e){return i.currentComponet=e,e.active()})).catch((function(e){e&&console.error(e),i.currentComponet=null,i.pdfViewer.activeElement()}))})),s.on("doubletap",(function(o){i.resetHandler();var a=o.changedPointers[0];n.getPDFPage().then((function(e){return[e,e.reverseDevicePoint([a.offsetX,a.offsetY],n.getScale(),n.getRotation())]})).then((function(e){var t=r(e,2),n=t[0],i=r(t[1],2),o=i[0],a=i[1];return n.getGraphicsObjectAtPoint([o,a],3,1)})).then((function(e){return e?[t.get(e),e]:Promise.reject(new Error("Text object not found at this position: ["+a.offsetX+", "+a.offsetY+"]"))})).then((function(t){var i=r(t,2);return new(0,i[0])(i[1],n,e)})).then((function(e){return i.currentComponet=e,e.activeCharEdit()})).catch((function(e){e&&console.error(e),i.currentComponet=null,i.pdfViewer.activeElement()}))}))},c.prototype.destroyPageHandler=function(){this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(a),this.resetHandler()},c.prototype.out=function(){this.destroyPageHandler()},c.prototype.resetHandler=function(){this.currentComponet&&(this.currentComponet.textCharSure&&this.currentComponet.textCharSure(),this.currentComponet.unActive())},c}(i.IStateHandler)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=i.Deps.Hammer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=(r=n(49))&&r.__esModule?r:{default:r},a=n(50),c=n(3),u=i.Deps.Hammer,s=null,l=0,d=i.IStateHandler,p=!1,f=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.destroyHooks=[],r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.addDestroyHook=function(){var e;(e=this.destroyHooks).push.apply(e,arguments)},t.prototype.addEventTo=function(e,t,n){return e.on(t,n),function(){e.off(t,n)}},t.setAddon=function(e){s=e},t.getStateName=function(){return"add-path-object"},t.setPathType=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;l=e},t.prototype.pageHandler=function(e){var t=this;this.pageRender=e;var n=e.$handler;n.addClass("fv__create-callout-state-handler "+this.cursorStyle),this.shapeDom=(0,a.getShapeDom)(n);var r=n[0],i=this.hammer=new u.Manager(r,{recognizers:[[u.Pan,{direction:u.DIRECTION_ALL}]]}),c=void 0,d=void 0,f=function(e){p=-1!=e.target.className.indexOf("fv__pdf-page-handler-container")};this.addDestroyHook(this.addEventTo(n,"mousedown",f),this.addEventTo(n,"touchstart",f),(function(){i.destroy()})),i.on("panstart",(function(e){p&&(c=g(r,e))})).on("panend",(function(n){if(c){d={x:c.x+n.deltaX,y:c.y+n.deltaY};var r=t.pageRender.page.reverseDevicePoint([c.x,c.y],t.pageRender.getScale(),t.pageRender.getRotation()),i=t.pageRender.page.reverseDevicePoint([d.x,d.y],t.pageRender.getScale(),t.pageRender.getRotation()),a={x:r[0],y:r[1]},u={x:i[0],y:i[1]},p=o.default.generatePoints(a,u,l),f=o.default.pointsToRect(a,u);t.pageRender.page.addGraphicsObject({type:2,points:p,rect:f}).then((function(e){return c=null,t.shapeDom.hide(),e})).then((function(e){return e?[s.graphicsManager.get(e),e]:Promise.reject(new Error("Graphics object was not created!"))})).then((function(t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(t,2);return new(0,n[0])(n[1],e,s)})).then((function(e){t.currentComponet=e,t.pdfViewer.activeElement(e)})).catch((function(e){throw t.currentComponet=null,t.pdfViewer.activeElement(),e}))}})).on("panmove",(function(e){if(c){d={x:c.x+e.deltaX,y:c.y+e.deltaY};var n=o.default.pointsToRect(c,d,!0),r=o.default.generatePoints(c,d,l);(0,a.drawShape)(r,n,t.shapeDom)}}))},t.prototype.destroyPageHandler=function(){this.destroyHooks.forEach((function(e){return e()})),this.resetHandler()},t.prototype.out=function(){this.destroyPageHandler()},t.prototype.resetHandler=function(){this.currentComponet&&this.currentComponet.destroy()},t}(d);t.default=f;var g=function(e,t){var n=e.getBoundingClientRect(),r=t.srcEvent,i=(0,c.getClientX)(r),o=(0,c.getClientY)(r);return{x:i-n.left-t.deltaX,y:o-n.top-t.deltaY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.pointsToRect=function(e,t,n){var r=e.x>t.x?t.x:e.x,i=e.x<t.x?t.x:e.x,o=e.y>t.y?t.y:e.y,a=e.y<t.y?t.y:e.y;if(n){var c=o;(o=a)-(a=c)<1&&(o=a+1,a-=1)}else a-o<1&&(a=o+1,o-=1);return i-r<1&&(i=r+1,r-=1),{left:r-2,top:a+1,right:i+2,bottom:o-1}},e.generatePoints=function(t,n,r){var i=t.x,o=t.y,a=n.x-i,c=n.y-o;switch(r){case"line":return e.genLinePoints(i,o,a,c);case"square":return e.genSquarePoints(i,o,a,c);case"circle":return e.genOvalPoints(i,o,a,c);case"roundRect":return e.genRoundRectPoints(i,o,a,c)}},e.genLinePoints=function(e,t,n,r){var i=[];return i.push(["m",e,t]),i.push(["l",e+n,t+r]),i},e.genOvalPoints=function(e,t,n,r){var o=[];return o.push(["m",e+n/2,t]),(o=(o=(o=(o=o.concat(i(e+n/2,t,n/2,r/2,1))).concat(i(e+n,t+r/2,-n/2,r/2,0))).concat(i(e+n/2,t+r,-n/2,-r/2,1))).concat(i(e,t+r/2,n/2,-r/2,0))).push(["h",o[0][1],o[0][2]]),o},e.genRoundRectPoints=function(e,t,n,r){var o=[],a=.2*n,c=.2*r,u=.8*n,s=.8*r;return o.push(["m",e+a,t]),o.push(["l",e+u,t]),(o=o.concat(i(e+u,t,a,c,1))).push(["l",e+n,t+s]),(o=o.concat(i(e+n,t+s,-a,c,0))).push(["l",e+a,t+r]),(o=o.concat(i(e+a,t+r,-a,-c,1))).push(["l",e,t+c]),(o=o.concat(i(e,t+c,a,-c,0))).push(["l",o[0][1],o[0][2]]),o.push(["h"]),o},e.genSquarePoints=function(e,t,n,r){var i=[];return i.push(["m",e,t]),i.push(["l",e+n,t]),i.push(["l",e+n,t+r]),i.push(["l",e,t+r]),i.push(["h",e,t]),i},e}();function i(e,t,n,r,i){var o=[],a=.5522847498308;return i?(o.push(["c",e+a*n,t]),o.push(["c",e+n,t+a*r]),o.push(["c",e+n,t+r])):(o.push(["c",e,t+a*r]),o.push(["c",e+a*n,t+r]),o.push(["c",e+n,t+r])),o}t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.drawShape=t.getShapeDom=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)).Deps.jQuery;t.getShapeDom=function(e){var t=e.find(".fv__add-path-preview");return 0==t.length&&(t=r('<canvas class="fv__add-path-preview" style="position: absolute;display:none"></canvas>'),e.append(t)),t},t.drawShape=function(e,t,n){var r=n[0],i=r.getContext("2d");i.clearRect(0,0,n.width(),n.height()),r.width=t.right-t.left+4,r.height=t.bottom-t.top+4,i.clearRect(0,0,n.width(),n.height()),i.beginPath(),i.lineWidth=2,i.strokeStyle="#5aa",i.transform(1,0,0,1,2-t.left,2-t.top);for(var o=[],a=0;a<e.length;a++)switch(e[a][0]){case"m":i.moveTo(e[a][1],e[a][2]);break;case"l":i.lineTo(e[a][1],e[a][2]);break;case"c":o.push(e[a][1],e[a][2]),6===o.length&&(i.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]),o=[]);break;case"h":4===o.length?(i.bezierCurveTo(o[0],o[1],o[2],o[3],e[a][1],e[a][2]),o=[]):i.lineTo(e[a][1],e[a][2]),i.closePath()}i.stroke(),n.css({left:t.left,top:t.top}).show()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),i=n(3),o=r.Deps.jQuery,a=r.IStateHandler,c=r.Events,u=null,s=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.setAddon=function(e){u=e},t.getStateName=function(){return"add-image-object"},t.prototype.pageHandler=function(e){var t=this,n=this;this.pageRender=e;var r=this.$handler=e.$handler,i=r[0],a=this.hammer=new Hammer.Manager(i,{recognizers:[[Hammer.Tap],[Hammer.Pan,{direction:Hammer.DIRECTION_ALL}]]}),s=void 0,d=void 0;function p(){return d||(d=o('<img style="position: absolute;top:200%;left:0;border:2px solid transparent;" src="'+s+'"/>'),r.append(d),d)}this.pdfViewer.eventEmitter.on(c.addEditImage,this.loadFile=function(e){s=e}),r.off("mouseenter").on("mouseenter",(function(e){s&&p().show()})),r.off("mousemove mousewheel").on("mousemove mousewheel",(function(e){if(s){var t=i.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;p().css({top:r,left:n})}})),r.off("mouseleave").on("mouseleave",(function(e){s&&p().hide()}));var f=!0;a.on("tap",(function(r){if(f&&(f=!1,s)){var o={},a=l(i,r),c=p(),d=c.width(),g=c.height();e.getPDFPage().then((function(r){var i,l=e.getRotation(),p=3*d/r.getPxWidth(),h=3*g/r.getPxHeight();if(p>1||h>1){var M=Math.max(p,h);M>1&&(M=1/M),d*=M,g*=M}if(90===l||270===l){var m=d;d=g,g=m}o.top=a.y,o.left=a.x,o.right=o.left+d,o.bottom=o.top+g,(i=s,new Promise((function(e,t){var n=new XMLHttpRequest;n.open("GET",i),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300||304===n.status?e(n.response):t())},n.onerror=function(){t()},n.send()}))).then((function(i){var a=r.reverseDeviceRect(o,e.getScale(),l);r.addImage(i,a,l).then((function(n){var r=new(u.graphicsManager.get(n))(n,e,u);t.pdfViewer.getStateHandlerManager().switchTo("edit-all"),t.currentComponet=r,c.remove(),f=!0,t.pdfViewer.activeElement(r)})).catch((function(e){e&&console.error(e),n.currentComponet=null,n.pdfViewer.activeElement()}))}))}))}}))},t.prototype.destroyPageHandler=function(){this.$handler.off("mousemove mousewheel mouseleave"),this.$handler.empty(),this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(this.cursorStyle),this.pdfViewer.eventEmitter.off(c.addEditImage,this.loadFile)},t.prototype.out=function(){this.destroyPageHandler()},t}(a);t.default=s;var l=function(e,t){var n=e.getBoundingClientRect(),r=t.srcEvent,o=(0,i.getClientX)(r),a=(0,i.getClientY)(r);return{x:o-n.left-t.deltaX,y:a-n.top-t.deltaY}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.graphicsManager;return function(n){function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(i,n),i.getStateName=function(){return"add-text-object"},i.prototype.pageHandler=function(n){var i=this;this.pageRender=n;var s=n.getPDFPage(),l=n.$handler,d=l[0];l.addClass(c),(this.hammer=new u(d)).on("tap",(function(a){i.resetHandler();var c=a.changedPointers[0];s.then((function(e){return[e,e.reverseDevicePoint([c.offsetX,c.offsetY],n.getScale(),n.getRotation())]})).then((function(e){var t=r(e,2),a=t[0],c=r(t[1],2),u=c[0],s=c[1],l=a.getRotationAngle(),d=new o.Matrix;return d.rotate((l+n.getRotation())/180*Math.PI),d.translate(u,s),a.addGraphicsObject(Object.assign({},i.addParams,{originPosition:{x:u,y:s}},{type:1,matrix:d.toArray()}))})).then((function(e){return e?[t.get(e),e]:Promise.reject(new Error("Graphics object was not created!"))})).then((function(t){var i=r(t,2);return new(0,i[0])(i[1],n,e)})).then((function(e){return i.currentComponet=e,e.activeCharEdit()})).catch((function(e){e&&console.error(e),i.currentComponet=null,i.pdfViewer.activeElement()}))})),this.pdfViewer.getEventEmitter().on(a.default.addTextObjectParamTransfer,this.addTextObjectParamTransferBind=function(e){i.addParams=e})},i.prototype.destroyPageHandler=function(){this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(c),this.addParams=null,this.pdfViewer.getEventEmitter().off(a.default.addTextObjectParamTransfer,this.addTextObjectParamTransferBind),this.resetHandler()},i.prototype.out=function(){this.destroyPageHandler()},i.prototype.resetHandler=function(){this.currentComponet&&(this.currentComponet.textCharSure&&this.currentComponet.textCharSure(),this.currentComponet.unActive())},i}(o.IStateHandler)};var i,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),a=(i=n(14))&&i.__esModule?i:{default:i},c="fv__add-text-object-state-handler",u=o.Deps.Hammer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=e.graphicsManager,n="fv__edit-all-state-handler fv__edit-graphics-state-handler";return function(c){function m(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,c.call(this,e));return t.destroyHooks=[],t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(m,c),m.getStateName=function(){return"edit-all"},m.prototype.pageHandler=function(c){var m=this,y=new f;this.pageRender=c;var v=c.getPDFPage(),b=c.$handler,D=b[0];b.addClass(n);var A=new h;this.selections=new u({anchorElement:D,borderStyle:d.DOTTED}),this.selections.reducer(l(D)),this.selections.reducer((function(e){var t=D.getBoundingClientRect();return Object.assign({left:e.clientLeft-t.left,top:e.clientTop-t.top},e)})),this.selections.eventInterceptor((function(e){return e.target===D}));var N=!1;this.selections.eventInterceptor((function(e){return N}));var I=function(e){N=e.target===D};D.addEventListener("mousedown",I),D.addEventListener("touchstart",I),this.destroyHooks.push((function(){D.removeEventListener("mousedown",I),D.removeEventListener("touchstart",I)})),this.selections.on(s.END,(function(n){A.exec((function(){return v.then((function(r){var o=m.pageRender.scale,u=m.pageRender.getRotation(),s=r.reverseDeviceRect({left:n.left,right:n.left+n.width,top:n.top,bottom:n.top+n.height},o,u),l=Math.min(2/m.pageRender.scale,2);return r.getGraphicsObjectsInRect(s,l,a.GraphicsObjectType.ALL).then((function(n){!n||n.length<1||(T()||y.clear(),m.pdfViewer.activeElement(y),n.forEach((function(n){var r=n.getRect();if(!(r.right-r.left<1||r.top-r.bottom<1)){var i=new(t.get(n))(n,c,e);y.add(i),i.$handler.get(0).addEventListener("click",(function(e){0===e.button&&T()&&y.remove(i)}),!0)}})),m.pdfViewer.eventEmitter.emit(i.Events.activeElementChanged))}))}))}))}));var j=this.hammer=new p(D);j.on("tap",(function(n){if(-1!=n.target.className.indexOf("fv__shape-control-move-area"))return Promise.resolve();m.resetHandler();var i,a,u,s,l,d=(i=n,a=D.getBoundingClientRect(),u=i.srcEvent,s=(0,o.getClientX)(u),l=(0,o.getClientY)(u),{x:s-a.left-i.deltaX,y:l-a.top-i.deltaY});v.then((function(e){return[e,e.reverseDevicePoint([d.x,d.y],c.getScale(),c.getRotation())]})).then((function(e){var t=r(e,2),n=t[0],i=r(t[1],2),o=i[0],a=i[1];return n.getGraphicsObjectAtPoint([o,a],5,0)})).then((function(e){return e?e.type<1||e.type>3?Promise.reject():[t.get(e),e]:Promise.reject(M)})).then((function(t){var n=r(t,2);return new(0,n[0])(n[1],c,e)})).then((function(e){m.currentComponent=e,T()||y.clear(),y.add(e),m.pdfViewer.activeElement(y),e.$handler.get(0).addEventListener("click",(function(t){0===t.button&&T()&&y.remove(e)}),!0)})).catch((function(e){e===M&&T()||(e!==M&&e&&console.error(e),m.currentComponent=null,m.pdfViewer.activeElement())}))})),this.destroyHooks.push((function(){return j.destroy()}),(function(){return m.selections.destroy()}),(function(){y.clear(),m.pdfViewer.unActiveElement(y)}));var T=function(){return!!m.pdfViewer.isShortcutKeyEnabled()&&(i.DeviceInfo.isMac?g.isWin:g.isCtrl)}},m.prototype.destroyPageHandler=function(){this.hammer&&this.hammer.destroy(),this.destroyHooks.forEach((function(e){return e()})),this.pageRender.$handler.removeClass(n),this.resetHandler(),this.pageRender=null,this.destroyHooks=null},m.prototype.out=function(){this.destroyPageHandler()},m.prototype.resetHandler=function(){this.currentComponent&&this.currentComponent.textCharSure&&this.currentComponent.textCharSure()},m}(i.IStateHandler)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),o=n(3),a=(n(12),n(54)),c=i.shared.areaSelections,u=c.Selections,s=c.SelectionEventType,l=c.createAreaLimitationReducer,d=c.BorderStyle,p=i.Deps.Hammer,f=i.shared.activation.ActivationGroup,g=i.shared.keyboardStatus,h=i.shared.QueuedAsyncTaskExecutor,M={}},function(e,t,n){"use strict";var r;n.r(t),n.d(t,"GraphicsObjectType",(function(){return r})),function(e){e[e.ALL=0]="ALL",e[e.TEXT=1]="TEXT",e[e.PATH=2]="PATH",e[e.IMAGE=3]="IMAGE",e[e.SHADING=4]="SHADING",e[e.FORM_X_OBJECT=5]="FORM_X_OBJECT"}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(15)),i=s(n(7)),o=s(n(17)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0)),c=s(n(25)),u=s(n(10));function s(e){return e&&e.__esModule?e:{default:e}}var l=a.Deps.Hammer,d=null,p={fontSize:12,charspace:0,textMode:0,wordspace:0,matrix:[1,0,0,1]},f=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-text",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.setAddon=function(e){d=e},t.getStateName=function(){return"add-fill-text"},t.prototype.pageHandler=function(e){var t=this;this.pageRender=e;var n=e.$handler;n.addClass(this.cursorStyle);var r=n[0];(this.hammer=new l.Manager(r,{recognizers:[[l.Tap]]})).on("tap",(function(n){var r=t.resetHandler(),a=n.changedPointers[0],s=t.pageRender.page,l=s.reverseDevicePoint([a.offsetX,a.offsetY],e.getScale(),e.getRotation());if(t.fillSign||(t.fillSign=new i.default(s)),!t.currentComponent)return r.then((function(e){return t.fillSign.getObjectAtPoint({x:l[0],y:l[1]})})).then((function(n){if(!n){var r={};r.left=l[0],r.top=l[1],r.bottom=l[1],r.right=l[0];var i=t.pageRender.getRotation(),a=i?i/90+s.getRotation():s.getRotation();return t.fillSign.addText("",r,p,!1,a).then((function(n){return new c.default(n,e,d,t)}))}return t.pdfViewer.activeElement(),n instanceof o.default?(t.isCheckmark=!1,new c.default(n,e,d,t)):(t.isCheckmark=!0,new u.default(n,e,d,t))})).then((function(e){t.isCheckmark?(t.currentComponent=e,e.active(),e.showToolbar()):(t.currentComponent=e,e.activeFillSignInput())})).catch((function(e){e&&console.error(e),t.currentComponent=null,t.pdfViewer.activeElement()}));t.saveCurrentComponent()}))},t.prototype.saveCurrentComponent=function(){this.currentComponent.textCharSure&&this.currentComponent.textCharSure(),this.currentComponent.unActiveFillSignInput&&this.currentComponent.unActiveFillSignInput(),this.currentComponent.unActive(),this.currentComponent.removeToolbar(),this.currentComponent=null},t.prototype.destroyPageHandler=function(){this.currentComponent&&this.saveCurrentComponent(),this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(this.cursorStyle),this.resetHandler()},t.prototype.addFillSign=function(){var e=this.currentComponent.graphicsObject.info,t=this.currentComponent.eCharInput,n=t.textContent;if(0==n.length)return Promise.resolve();var r=t.getBoundingClientRect();return r=this.pageRender.getPDFRectFromClientRect(r),this.fillSign.addText(n,r,e.textState,!1)},t.prototype.out=function(){this.destroyPageHandler()},t.prototype.resetHandler=function(){var e=Promise.resolve();return this.currentComponent&&(this.currentComponent.textCharSure&&this.currentComponent.textCharSure(),this.currentComponent.unActive()),e},t.prototype.resetCurrentComponent=function(e){this.currentComponent=e},t.prototype.resetType=function(e,t,n,r){var i=this;if(e&&n){var o=Promise.resolve(),a=n.getRect();this.currentComponent&&(this.currentComponent.unActive(),this.currentComponent.removeToolbar(),o=this.currentComponent.remove());var c=t.getRotation(),s=c?c/90+t.page.getRotation():t.page.getRotation();o.then((function(t){return e.addPath(r,a,s)})).then((function(e){var n=i.currentComponent=new u.default(e,t,d,i);n.active(),n.showToolbar()}))}},t}(r.default);t.default=f},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.setBitmap=function(e){var t=this.doc,n=this.page,r=t.getId(),i=n.getId();return t.api.workerPromise.emit("updateFillSign",{docId:r,pageId:i,id:this.info.id,property:{url:e}})},t}(((r=n(9))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-cross",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getStateName=function(){return"add-fill-cross"},t}(((r=n(4))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-dot",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getStateName=function(){return"add-fill-dot"},t}(((r=n(4))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-line",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getStateName=function(){return"add-fill-line"},t}(((r=n(4))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-rectangle",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getStateName=function(){return"add-fill-rectangle"},t}(((r=n(4))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.cursorStyle="fv__cursor-fill-tick",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getStateName=function(){return"add-fill-tick"},t}(((r=n(4))&&r.__esModule?r:{default:r}).default);t.default=i},function(e,t){e.exports=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),i=n(28);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"MoveFrontGraphicsObjectController"},t.prototype.handle=function(e){var t=this.component.parent.getCurrentTarget();t.moveToPosition&&t.moveToPosition(i.POS_TYPE.FIRST,null)},t}(r.Controller);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={MARKED:"marked",UNMARKED:"unmarked",ACCEPTED:"accepted",REJECTED:"rejected",CANCELLED:"cancelled",COMPLETED:"completed",DEFERRED:"deferred",FUTURE:"future",NONE:"none"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),i=n(28);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"MoveBackGraphicsObjectController"},t.prototype.handle=function(e){var t=this.component.parent.getCurrentTarget();t.moveToPosition&&t.moveToPosition(i.POS_TYPE.LAST,null)},t}(r.Controller);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"ShowGraphicsObjectPropertiesController"},t.prototype.handle=function(e){var t=this.component.parent,n=t.getCurrentTarget(),r=t.getRoot().querySelector("fv--graphics-object-properties-dialog");console.log(n),console.log(r),r.showAt(e.pageX,e.pageY)},t}(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)).Controller);t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"DeleteGraphicsObjectController"},t.prototype.handle=function(){var e=this.component.parent.getCurrentTarget();e.remove&&e.remove()},t}(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)).Controller);t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=M(n(69)),i=M(n(2)),o=M(n(70)),a=M(n(71)),c=M(n(72)),u=M(n(73)),s=M(n(74)),l=M(n(75)),d=M(n(76)),p=M(n(81)),f=M(n(82)),g=M(n(83)),h=M(n(88));function M(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.module("fill-sign",[]);[r.default,a.default,c.default,u.default,s.default,l.default,i.default,o.default].forEach((function(e){return t.registerController(e)})),[d.default,p.default,f.default].forEach((function(e){return t.registerPreConfiguredComponent(e.name,e.fragment)})),(0,g.default)(t),(0,h.default)(t)}},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddCheckmarkDropdownController"},t.getSHName=function(){return"add-fill-checkmark"},t.getFSType=function(){return"checkMark"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddComboFieldButtonController"},t.getSHName=function(){return""},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddFillTickController"},t.getSHName=function(){return"add-fill-tick"},t.getFSType=function(){return"tick"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddFillCrossController"},t.getSHName=function(){return"add-fill-cross"},t.getFSType=function(){return"cross"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddFillDotController"},t.getSHName=function(){return"add-fill-dot"},t.getFSType=function(){return"dot"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddFillLineController"},t.getSHName=function(){return"add-fill-line"},t.getFSType=function(){return"line"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";var r;function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddFillRectangleController"},t.getSHName=function(){return"add-fill-rectangle"},t.getFSType=function(){return"rectangle"},t}(((r=n(2))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(77);var r,i=(r=n(78))&&r.__esModule?r:{default:r};t.default={name:"add-checkmark-dropdown",fragment:{template:(0,i.default)(),config:[{target:"add-checkmark-dropdown",attrs:{"tooltip-title":"toolbar.tooltip.checkmark.title"}}]}}},function(e,t,n){},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<ribbon-button icon-class="fx-icon-ribbon_fill_sign_add_check_mark-32" @tooltip @controller="fill-sign:AddCheckmarkDropdownController" name="add-checkmark-dropdown" @var.self="$component">\r\n<dropdown separate="false">\r\n <div name="add-checkmark-dropdown-list" class="fv__ui-add-checkmark-dropdown-list">\r\n <xbutton @controller="fill-sign:AddFillTickController" name="fill-sign-add-tick" @tooltip tooltip-title="toolbar.tooltip.addTick.title" icon-class="fv__icon-toolbar-tick" class="fv_ui-add-checkmark-btn"></xbutton>\r\n <xbutton @controller="fill-sign:AddFillCrossController" name="fill-sign-add-cross" @tooltip tooltip-title="toolbar.tooltip.addCross.title" icon-class="fv__icon-toolbar-cross" class="fv_ui-add-checkmark-btn"></xbutton>\r\n <xbutton @controller="fill-sign:AddFillLineController" name="fill-sign-add-line" @tooltip tooltip-title="toolbar.tooltip.addLine.title" icon-class="fv__icon-toolbar-line" class="fv_ui-add-checkmark-btn"></xbutton>\r\n <xbutton @controller="fill-sign:AddFillDotController" name="fill-sign-add-dot" @tooltip tooltip-title="toolbar.tooltip.addDot.title" icon-class="fv__icon-toolbar-dot" class="fv_ui-add-checkmark-btn"></xbutton>\r\n <xbutton @controller="fill-sign:AddFillRectangleController" name="fill-sign-add-rectangle" @tooltip tooltip-title="toolbar.tooltip.addRectangle.title" icon-class="fv__icon-toolbar-rectangle" class="fv_ui-add-checkmark-btn"></xbutton>\r\n </div>\r\n</dropdown>\r\n</ribbon-button>'}},function(e,t,n){"use strict";(function(t){
20
20
  /*! art-template@runtime | https://github.com/aui/art-template */
21
- var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=Object.create(n),i=/["&'<>]/;r.$escape=function(e){return function(e){var t=""+e,n=i.exec(t);if(!n)return e;var r="",o=void 0,a=void 0,c=void 0;for(o=n.index,a=0;o<t.length;o++){switch(t.charCodeAt(o)){case 34:c="&#34;";break;case 38:c="&#38;";break;case 39:c="&#39;";break;case 60:c="&#60;";break;case 62:c="&#62;";break;default:continue}a!==o&&(r+=t.substring(a,o)),a=o+1,r+=c}return a!==o?r+t.substring(a,o):r}(function e(t){return"string"!=typeof t&&(t=null==t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t)),t}(e))},r.$each=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t(e[n],n);else for(var i in e)t(e[i],i)},e.exports=r}).call(this,n(80))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"add-text-button",fragment:{template:'<ribbon-button text="toolbar.tooltip.addText.title" @controller="fill-sign:AddTextButtonController" name="add-text" @tooltip icon-class="fv__icon-toolbar-add-text"></ribbon-button>',config:[{target:"add-text",attrs:{"tooltip-title":"toolbar.tooltip.addText.title"}}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"combo-field-button",fragment:{template:'<ribbon-button text="toolbar.tooltip.comboField.title" @controller="fill-sign:AddComboFieldButtonController" name="combo-field" @tooltip icon-class="fv__icon-toolbar-combo-field"></ribbon-button>',config:[{target:"combo-field",attrs:{"tooltip-title":"toolbar.tooltip.comboField.title"}}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=function(e){function t(){c(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return u(this,e.call.apply(e,[this].concat(r)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"set-predefined-text-dialog"},t.prototype.active=function(){e.prototype.active.call(this),this.controller.predefinedTextListDia=this.getLocalList(),this.controller.digest()},t.prototype.show=function(){e.prototype.show.call(this),this.active()},t.prototype.getLocalList=function(){var e=[],t=localStorage.getItem("predefinedTextList");if(t)try{e=JSON.parse(t)}catch(t){e=[]}return e},t.prototype.saveLocalList=function(e){var t="";try{t=JSON.stringify(e)}catch(e){console.error(e)}localStorage.setItem("predefinedTextList",t)},t.prototype.postlink=function(){e.prototype.postlink.call(this),this.lastInputEle=this.getComponentByName("predefined-text-last-input")},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.on("hidden",(function(){t.clickCancel()}))},t.prototype.activeInput=function(){this.lastInputEle.element.removeAttribute("readonly"),this.lastInputEle.element.focus()},t.prototype.onInputBlur=function(e){var t=e.getValue(),n=this.controller.predefinedTextListDia||[],r=n.length;if(t&&0!==t.length){var i={id:r,content:t};this.controller.predefinedTextListDia=n.concat(i),this.lastInputEle.element.setAttribute("readonly",!0),e.setValue("")}this.controller.digest()},t.prototype.onchange=function(e){var t=e[0],n=this.controller.predefinedTextListDia,r=n.findIndex((function(e){return e.id===t.id}));r>-1&&(n[r].content&&""!==n[r].content?n[r].content=t.content:n.splice(r,1)),this.controller.predefinedTextListDia=n},t.prototype.clickOK=function(){this.saveLocalList(this.controller.predefinedTextListDia),this.hide()},t.prototype.clickCancel=function(){this.controller.predefinedTextListDia=this.getLocalList(),this.controller.digest()},t.prototype.showIdentity=function(){var e=this.getPDFUI();e.customs&&e.customs.showPreferences&&e.customs.showPreferences("identityTab")},t}(r.SeniorComponentFactory.createSuperClass({template:(0,i.default)()}));e.registerComponent(t)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),i=a(n(84));n(85);var o=a(n(86));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<layer \r\n name="set-predefined-text-dialog"\r\n class="fv__ui-predefined-layer center" \r\n append-to="body" \r\n modal\r\n @draggable\r\n @controller.alias="fillSignDialogCtrl"\r\n>\r\n <div class="fv__ui-predefined-dialog-main" @stop-drag>\r\n <layer-header title="dialog.fillDialog.title"></layer-header>\r\n <div class="fv__ui-predefined-dialog-body" >\r\n <div class="fv__ui-predefined-identity">\r\n <div class="fv__ui-predefined-identity-description" data-i18n="dialog.fillDialog.identityInformation"></div>\r\n <div class="fv__ui-predefined-identity-set">\r\n <button class="fv__ui-predefined-identity-btn fv__ui-dialog-button" data-i18n="dialog.fillDialog.setIdentity" name="predefined-dialog-set-identity" @on.click="fillSignDialogCtrl.component.showIdentity()"></button>\r\n </div>\r\n </div>\r\n <div class="fv__ui-predefined-text-list">\r\n <div class="fv__ui-predefined-text-list-description" data-i18n="dialog.fillDialog.listDescription"></div>\r\n <div class="fv__ui-predefined-text-list-container">\r\n <ul class="fv__ui-predefined-text-list-ul">\r\n <fill-sign:predefined-text-dialog-list-item\r\n @foreach="predefinedText in fillSignDialogCtrl.predefinedTextListDia"\r\n @sync.predefined-text="predefinedText"\r\n @on.change="fillSignDialogCtrl.component.onchange($args)"></fill-sign:predefined-text-dialog-list-item>\r\n <li class="fv__ui-predefined-text-item-last">\r\n <input\r\n name="predefined-text-last-input"\r\n data-i18n="[placeholder]dialog.fillDialog.placeholder"\r\n type="text"\r\n readonly\r\n class="fv__ui-predefined-text-item-editor"\r\n @on.native.dblclick = "fillSignDialogCtrl.component.activeInput()"\r\n @on.blur="fillSignDialogCtrl.component.onInputBlur($component)"\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="fv__ui-predefined-dialog-footer">\r\n <div class="fv__ui-predefined-dialog-btn footer">\r\n <button\r\n class="fv__ui-predefined-btn fv__ui-predefined-dialog-ok fv__ui-dialog-button fv__ui-dialog-ok-button"\r\n data-i18n="dialog.ok"\r\n name="predefined-dialog-ok-btn"\r\n @on.click="fillSignDialogCtrl.component.clickOK()"\r\n ></button>\r\n <button class="fv__ui-predefined-btn fv__ui-predefined-dialog-cancel fv__ui-dialog-button fv__ui-dialog-cancel-button" data-i18n="dialog.cancel" name="predefined-dialog-close-btn" @on.click="fillSignDialogCtrl.component.hide()"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"predefined-text-dialog-list-item"},t.prototype.createDOMElement=function(){return document.createElement("li")},t.prototype.postlink=function(){e.prototype.postlink.call(this),this.controller.isEditMode=!1,this.inputElement=this.getComponentByName("predefined-text-item-input")},t.prototype.switchToEditMode=function(){this.controller.isEditMode=!0,this.controller.digest(),this.inputElement.element.focus()},t.prototype.onInputBlur=function(e){this.controller.isEditMode=!1,this.controller.textObject.content=e.getValue(),this.controller.digest(),this.trigger("change",this.controller.textObject)},t.prototype.addElementEventListener=function(e,t,n){e.addEventListener(t,n),this.addDestroyHook((function(){e.removeEventListener(t,n)}))},t.prototype.sync=function(t,n){var r=e.prototype.sync.call(this,t,n);if(r)return r;switch(t){case"predefined-text":return this.controller.textObject=n,this.controller.digest(),!0}return!1},t}(r.SeniorComponentFactory.createSuperClass({template:'\n <li \n class="fv__ui-predefined-text-item" \n @class="{\'fv__ui-predefined-text-item-edit-mode\':ctrl.isEditMode}" \n @controller.alias="ctrl"\n >\n <div \n name="predefined-text-item-text" \n class="fv__ui-predefined-text-item-text"\n @on.native.dblclick = "ctrl.component.switchToEditMode()"\n >\n <text @sync.text="ctrl.textObject.content"></text>\n </div> \n <input \n @sync.value="ctrl.textObject.content" \n name="predefined-text-item-input" \n type="text" \n class="fv__ui-predefined-text-item-editor"\n @on.blur="ctrl.component.onInputBlur($component)"\n >\n </li>\n '}));e.registerComponent(t)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n(87)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){e.registerController(o.default);var t=function(e){function t(){l(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return d(this,e.call.apply(e,[this].concat(r)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"predefined-text-dropdown"},r(t,null,[{key:"permission",get:function(){return i.PDFViewCtrl.Consts.PDFDocPermission.ModifyDocument}}]),t.prototype.active=function(){e.prototype.active.call(this);var t=this.getPDFUI();this.controller.defaultPredefinedTextList=t.customs&&t.customs.getDefaultPredefinedText&&t.customs.getDefaultPredefinedText()||[],this.controller.customPredefinedTextList=this.getLocalList(),this.controller.digest()},t.prototype.mounted=function(){var t,n=this;e.prototype.mounted.call(this),this.addDestroyHook(this.getPDFUI().addViewerEventListener("open-file-success",(function(e){return n.changePeimission(e)}))),this.addDestroyHook(this.getPDFUI().addViewerEventListener("permission-changed",(function(e){return n.changePeimission(e)}))),this.getRoot().querySelector("@fill-sign:set-predefined-text-dialog").on("hidden",(function(){n.controller.customPredefinedTextList=n.getLocalList(),n.controller.digest()}));var r=this.getPDFUI(),o=r.addViewerEventListener(i.UIEvents.renderFileSuccess,(function(e){e.PDFForm.isEmpty()||n.controller.component.lock()})),a=r.addViewerEventListener((s(t={},c.default.fieldAdded,(function(e){n.controller.component.lock()})),s(t,c.default.filedRemove,(function(e){r.getCurrentPDFDoc().then((function(e){e.getPDFForm().isEmpty()?n.controller.component.unlock():n.controller.component.lock()}))})),s(t,"annotation-removed",(function(){n.getPDFUI().getCurrentPDFDoc().then((function(e){e.PDFForm.isEmpty()?n.controller.component.unlock():n.controller.component.lock()}))})),t));this.addDestroyHook(o),this.addDestroyHook(a)},t.prototype.changePeimission=function(e){var t=this;this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()})).then((function(e){e&t.constructor.permission?t.controller.component.lock&&t.controller.component.unlock():t.controller.component.lock&&t.controller.component.lock()}))},t.prototype.getLocalList=function(){var e=[],t=localStorage.getItem("predefinedTextList");if(t)try{e=JSON.parse(t)}catch(t){e=[]}return e},t.prototype.showPredefinedDialog=function(){this.getRoot().querySelector("@fill-sign:set-predefined-text-dialog").show()},t}(i.SeniorComponentFactory.createSuperClass({template:(0,a.default)()}));e.registerComponent(t)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),o=u(n(89)),a=u(n(90));n(91);var c=u(n(29));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(2)),i=o(n(27));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){return a(this,t),c(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddPredefinedTextController"},t.getSHName=function(){return"add-fill-predefined-text"},t.getFSType=function(){return"predefined-text"},t.prototype.handle=function(){var t=this.data.defaultText||this.data.customText;return i.default.setParams(t),e.prototype.handle.call(this)},t}(r.default);t.default=u},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<dropdown\r\n name="predefined-text-dropdown"\r\n icon-class="fv__icon-toolbar-predefined-text"\r\n class="fv__ui-predefined-text-dropdown"\r\n separate="false"\r\n @tooltip\r\n @controller.alias="predefinedTextDropdownCtrl"\r\n tooltip-title="toolbar.tooltip.predefinedText.title"\r\n >\r\n <div class="fv__ui-predefined-text-category" @if="predefinedTextDropdownCtrl.defaultPredefinedTextList&&predefinedTextDropdownCtrl.defaultPredefinedTextList.length"><text>toolbar.category.Default</text></div>\r\n <div class="fv__ui-predefined-text-list fv__ui-predefined-default-list">\r\n <dropdown-button\r\n @foreach="defaultText in predefinedTextDropdownCtrl.defaultPredefinedTextList"\r\n @sync.text="defaultText.content"\r\n @controller="fill-sign:AddPredefinedTextController"\r\n ></dropdown-button>\r\n </div>\r\n <div class="fv__ui-predefined-text-category" @if="predefinedTextDropdownCtrl.customPredefinedTextList&&predefinedTextDropdownCtrl.customPredefinedTextList.length"><text>toolbar.category.Custom</text></div>\r\n <div class="fv__ui-predefined-text-list fv__ui-predefined-custom-list">\r\n <dropdown-button\r\n @foreach="customText in predefinedTextDropdownCtrl.customPredefinedTextList"\r\n @sync.text="customText.content"\r\n @controller="fill-sign:AddPredefinedTextController"\r\n ></dropdown-button>\r\n </div>\r\n <div class="fv__ui-predefined-text-footer">\r\n <xbutton\r\n class="fv__ui-set-predefined-text-content"\r\n text="toolbar.buttons.setPredefinedText"\r\n name="set-predefined-text"\r\n @on.click="predefinedTextDropdownCtrl.component.showPredefinedDialog()"\r\n ></xbutton>\r\n </div>\r\n</dropdown>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"check-activates"},t.prototype.init=function(t){var n=this;e.prototype.init.call(this,t);var i=t.getPDFUI();i.getPDFViewer().then((function(e){n.addDestroyHook(i.addViewerEventListener(r.PDFViewCtrl.Events.activeElementChanged,(function(){e.getAllActivatedElements().some((function(e){return e.graphicsObject&&1===e.graphicsObject.info.type}))?t.deactive():t.active()})))}))},t}(r.Directive);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),o=c(n(94));n(95);var a=c(n(96));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=i.PDFViewCtrl,d=l.DeviceInfo.isMobile,p=l.ViewerEvents,f=function(e){function t(){return u(this,t),s(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"graphic-object-properties-dialog"},t.services=function(){return{graphicsObjectService:a.default}},t.prototype.init=function(){e.prototype.init.call(this),this.properties={},this.digest()},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.getPDFUI(),i=this.graphicsObjectService;this.addDestroyHook(n.addViewerEventListener(p.activeElementChanged,(function(){t.isVisible&&t.updateActivatedElements()})),this.watch("$component.properties.fillColor",(function(e){var n="string"==typeof e?e:"transparent";t.fillColorMaskElement.style.backgroundColor=n,"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyFillColorChange(e,t)}))})),this.watch("$component.properties.borderColor",(function(e){var n="string"==typeof e?e:"transparent";t.borderColorMaskElement.style.backgroundColor=n,"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderColorChange(e,t)}))})),this.watch("$component.properties.opacity",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyOpacityChange(e/100,t)}))})),this.watch("$component.properties.borderWidth",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderWidthChange(e,t)}))})),this.watch("$component.properties.borderStyle",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderStyleChange(e,t)}))})))},t.prototype.forEachGraphicObject=function(e){return this.getPDFUI().getAllActivatedElements().then((function(t){t.forEach((function(t){t.graphicsObject&&e(t)}))}))},t.prototype.showAt=function(t,n){e.prototype.show.call(this),this.updateActivatedElements(),d||this.resetPosition(t,n)},t.prototype.resetPosition=function(e,t){var n=this.getRoot().element,r=this.element,i=r.offsetWidth,o=r.offsetHeight;e+i>n.offsetWidth?r.style.left=n.offsetWidth-i+"px":r.style.left=e+"px",t+o>n.offsetHeight?r.style.top=n.offsetHeight-o+"px":r.style.top=t+"px"},t.prototype.updateActivatedElements=function(){var e=this;this.getPDFUI().getAllActivatedElements().then((function(t){var n=e.graphicsObjectService.getMergedPropertiesOfActivateElements(t);e.correctPropertyKeys=Object.keys(n),e.properties=n,e.digest(),e.updateUIByProperties(n)}))},t.prototype.updateUIByProperties=function(e){this.updateBorderWidthUI(e),this.updateBorderStyleUI(e),this.updateBorderColorUI(e),this.updateFillColorUI(e),this.updateOpacityUI(e)},t.prototype.updateBorderWidthUI=function(e){"borderWidth"in e?(this.borderWidthFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderWidth")||(this.borderWidthElement.element.value="")):this.borderWidthFieldset.hide()},t.prototype.updateBorderStyleUI=function(e){"borderStyle"in e?(this.borderStyleFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderStyle")?this.borderStyleChoice.setValue(e.borderStyle):this.borderStyleChoice.element.querySelector(".fv__ui-select-lable").className="fv__ui-select-lable"):this.borderStyleFieldset.hide()},t.prototype.updateBorderColorUI=function(e){"borderColor"in e?(this.borderColorFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderColor")||(this.borderColorMaskElement.style.backgroundColor="transparent")):this.borderColorFieldset.hide()},t.prototype.updateFillColorUI=function(e){"fillColor"in e?(this.fillColorFieldset.show(),this.graphicsObjectService.isAllSame(e,"fillColor")||(this.fillColorMaskElement.style.backgroundColor="transparent")):this.fillColorFieldset.hide()},t.prototype.updateOpacityUI=function(e){"opacity"in e?(this.opacityInputFieldset.show(),this.opacitySlider.show(),this.graphicsObjectService.isAllSame(e,"opacity")||(this.opacityInput.element.value="")):(this.opacityInputFieldset.hide(),this.opacitySlider.hide())},t.prototype.toggleLock=function(e){e?this.appearanceTabBody.lock():this.appearanceTabBody.unlock()},t.prototype.borderStyleChanged=function(e){this.properties.borderStyle=e,this.digest()},t.prototype.showColorPicker=function(e,t){var n=this,i=this.getPDFUI().colorSpectrum;switch(e){case"fillColor":var o=this.properties.fillColor;"object"===(void 0===o?"undefined":r(o))&&(o=0),i.showTransparent(!0).setDefaultColor(o),i.show(t.element,(function(e){n.properties.fillColor=e,n.digest()}));break;case"borderColor":var a=this.properties.borderColor;"object"===(void 0===a?"undefined":r(a))&&(a=0),i.showTransparent(!0).setDefaultColor(a),i.show(t.element,(function(e){n.properties.borderColor=e,n.digest()}))}},t}(i.SeniorComponentFactory.createSuperClass({template:(0,o.default)(),fragments:[{target:"graphics-property-borderStyle",config:{iconclass:"fv__ui-property-icon-border-style",noOptionLable:!0,selectorClass:"fv__ui-border-style-selector",options:Array(7).fill(0).map((function(e,t){return{value:t,class:"fv__ui-line-style-"+t}}))}}]}));t.default=f},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<layer class="fv__ui-annot-properties-dialog fv__ui-graphics-object-properties-dialog" @var.dialog="$component" @isolate>\r\n <layer-header\r\n title="ega:graphics-properties.dialog.title"\r\n @draggable="{type: \'parent\'}">\r\n </layer-header>\r\n <layer-view class="body">\r\n <div class="tabPanel">\r\n <gtab\r\n group="graphics-properties-dialog-tab"\r\n body="graphics-properties-dialog-appearance-tab-body"\r\n text="sidebar.layers.importDialog.appearance"\r\n active\r\n ></gtab>\r\n </div>\r\n <div\r\n name="graphics-properties-dialog-appearance-tab-body"\r\n class="tabBody annot-properties-dialog-body"\r\n @init="dialog.appearanceTabBody=$component"\r\n >\r\n <div class="input-component borderWidth" @init="dialog.borderWidthFieldset = $component">\r\n <span>dialog.actionDialog.appearance.thickness</span>\r\n <number\r\n min="0" max="12" step="1" \r\n @aria:labelledby="::previousSiblings()"\r\n @model="dialog.properties.borderWidth"\r\n @init="dialog.borderWidthElement = $component"\r\n ></number>\r\n </div>\r\n <div class="input-component borderStyle" @init="dialog.borderStyleFieldset = $component">\r\n <span>annotPropertiesDialog.borderStyle</span>\r\n <choice\r\n class="fv__property-component"\r\n name="graphics-property-borderStyle"\r\n @aria:labelledby="::previousSiblings()"\r\n @on.change="dialog.borderStyleChanged($component.getValue())"\r\n @init="dialog.borderStyleChoice = $component"\r\n ></choice>\r\n </div>\r\n <div class="input-component fillColor" @init="dialog.fillColorFieldset = $component">\r\n <span>dialog.formPropertiesDialog.appearance.fillColor</span>\r\n <button class="color-picker" @aria:labelledby="::previousSiblings()" @on.native.click="dialog.showColorPicker(\'fillColor\',$component, $event)">\r\n <div>\r\n <div class="label">?</div>\r\n <div class="mask" @init="dialog.fillColorMaskElement = $component.element"></div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class="input-component color" @init="dialog.borderColorFieldset = $component">\r\n <span>dialog.actionDialog.appearance.color</span>\r\n <button class="color-picker" @aria:labelledby="::previousSiblings()" @on.native.click="dialog.showColorPicker(\'borderColor\',$component, $event)">\r\n <div>\r\n <div class="label">?</div>\r\n <div class="mask" @init="dialog.borderColorMaskElement = $component.element"></div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class="input-component opacity" @init="dialog.opacityInputFieldset = $component">\r\n <span>sidebar.layers.importDialog.opacity</span>\r\n <number\r\n min="0" max="100" step="1"\r\n @aria:labelledby="::previousSiblings()"\r\n @model="dialog.properties.opacity"\r\n @init="dialog.opacityInput = $component"\r\n ></number>\r\n <label>%</label>\r\n </div>\r\n <slider\r\n class="fv__property-component opacity-slider"\r\n unit=\'%\'\r\n max="100"\r\n min="0"\r\n step="1"\r\n @model="dialog.properties.opacity"\r\n name="annot-property-opacitySlider"\r\n @stop-drag\r\n hideinput="true"\r\n @aria:labelledby="::previousSiblings()::childAt(0)"\r\n @init="dialog.opacitySlider = $component"\r\n ></slider>\r\n </div>\r\n </layer-view>\r\n <div class="footer">\r\n <div class="fv__left-buttons">\r\n <checkbox \r\n @cannotBeDisabled\r\n text="sidebar.layers.properties.locked"\r\n @on.change="dialog.toggleLock($component.getValue())"\r\n ></checkbox>\r\n </div>\r\n <xbutton\r\n text="dialog.close"\r\n class="fv__ui-dialog-button fv__ui-dialog-ok-button fv__ui-annot-property-close"\r\n @on.click="dialog.hide()"\r\n @cannotBeDisabled\r\n ></xbutton>\r\n </div>\r\n</layer>\r\n'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)).PDFViewCtrl.shared.colorConvertor,i={},o=[[],[2,2,2,2],[3,3,3,3],[4,4,4,4],[4,3,2,3],[8,4,4,4],[4,3,16,3]],a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getMergedPropertiesOfActivateElements=function(e){var t=this,n=e.filter((function(e){return!!e.graphicsObject})).map((function(e){switch(e.graphicsObject.info.type){case 3:return t.exportImageProperties(e);case 2:return t.exportPathProperties(e)}})).filter(Boolean);return this.mergeAllProperties(n)},e.prototype.mergeAllProperties=function(e){if(0===e.length)return{};var t=e.map((function(e){return Object.keys(e)}));return t.sort((function(e,t){return e.length>t.length?1:-1})),t[0].reduce((function(t,n){return t[n]=function(t){var n=e[0][t];return e.slice(1).some((function(e){return e[t]!==n}))?i:n}(n),t}),{})},e.prototype.exportImageProperties=function(e){return{opacity:100*e.getPropertyOptions().opacity}},e.prototype.exportPathProperties=function(e){var t=e.graphicsObject,n=e.getPropertyOptions(),i=n.color,o=n.opacity,a=n.fillColor;return{borderWidth:n.borderWidth,borderStyle:function(e){var t=e.getBorderStyle(),n=0,r=e.getBorderDashes();if(1==t&&r.length>0){var i=Math.max.apply(Math,r),o=Math.min.apply(Math,r);n=o==i?o>3?3:o>2?2:o<2||2==o?1:3:i>8?6:i>4?5:4}return n}(t),borderColor:i,fillColor:0===a?0:r(a,"#"),opacity:100*o}},e.prototype.applyOpacityChange=function(e,t){e!==t.graphicsObject.getOpacity()&&t.setOpacity(e)},e.prototype.applyBorderWidthChange=function(e,t){e!==t.graphicsObject.getBorderWidth()&&t.setBorderWidth(e)},e.prototype.applyBorderColorChange=function(e,t){var n=0===e?0:r(e,"int");n!==t.graphicsObject.getBorderColor()&&t.setColor(n)},e.prototype.applyFillColorChange=function(e,t){var n=0==e?0:r(e,"int");n!==t.graphicsObject.getFillColor()&&t.setFillColor(n)},e.prototype.applyBorderStyleChange=function(e,t){var n,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([0===(n=e)?0:1,o[n]],2),i=r[0],a=r[1];t.setBorderStyle(i,a)},e.prototype.isAllSame=function(e,t){return e[t]!==i},e}();t.default=a},function(e,t,n){"use strict";n.r(t);var r=n(8),i=function(){function e(e){Object(r.assertThat)(Array.isArray(e),"Illegal Matrix values, it should be an array! But actual: "+e),Object(r.assertThat)(16===e.length,"Incorrect matrix values size, it must be 16!"),this.values=e,this.cols=Math.sqrt(e.length)}return e.prototype.multiVec4=function(e,t,n,r){return void 0===r&&(r=1),[this.getAt(0,0)*e+this.getAt(0,1)*t+this.getAt(0,2)*n+this.getAt(0,3)*r,this.getAt(1,0)*e+this.getAt(1,1)*t+this.getAt(1,2)*n+this.getAt(1,3)*r,this.getAt(2,0)*e+this.getAt(2,1)*t+this.getAt(2,2)*n+this.getAt(2,3)*r,this.getAt(3,0)*e+this.getAt(3,1)*t+this.getAt(3,2)*n+this.getAt(3,3)*r]},e.prototype.getAt=function(e,t){var n=e*this.cols+t;return Object(r.assertThat)(n<this.values.length,"Cannot access value at ("+e+","+t+"), it out bound of this matrix!"),this.values[n]},e}(),o=function(){function e(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=1),this.a=e,this.b=t,this.c=n,this.d=r}return e.prototype.transform=function(t){var n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t.multiVec4(this.a,this.b,this.c,this.d),4);return new e(n[0],n[1],n[2],n[3])},e.prototype.scale=function(e,t,n){return void 0===t&&(t=e),void 0===n&&(n=t),this.transform(function(e,t,n){return void 0===t&&(t=e),void 0===n&&(n=t),new i([e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1])}(e,t,n))},e.prototype.rotateZ=function(e){return this.transform(function(e){void 0===e&&(e=0);var t=e/180*Math.PI,n=Math.cos(t),r=Math.sin(t);return new i([n,r,0,0,-r,n,0,0,0,0,1,0,0,0,0,1])}(e))},e.prototype.translate=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),this.transform(function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),new i([1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1])}(e,t,n))},e}();t.default=o}]).default)},function(module,exports,__webpack_require__){var t;self,t=function(__WEBPACK_EXTERNAL_MODULE__5__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.StateNameFieldTypeMap=t.StateNameAnnotTypeMap=t.STATE_HANDLER_CREATE_ARTICLE_BUTTON=t.STATE_HANDLER_CREATE_RADIO_BUTTON=t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON=t.STATE_HANDLER_CREATE_FIELD_SIGNATURE=t.STATE_HANDLER_CREATE_FIELD_TEXT=t.STATE_HANDLER_CREATE_CROP_PAGES=t.STATE_HANDLER_SNAPSHOT_TOOL=t.STATE_HANDLER_CREATE_FREETEXT_BOX=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT=t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER=t.STATE_HANDLER_SELECT_ANNOTATION=t.STATE_HANDLER_SELECT_TEXT_IMAGE=t.STATE_HANDLER_SELECT_TEXT_ANNOTATION=t.STATE_HANDLER_LOUPE=t.STATE_HANDLER_ERASER=t.STATE_HANDLER_MARQUEE=t.STATE_HANDLER_CREATE_UNDERLINE=t.STATE_HANDLER_CREATE_TEXT=t.STATE_HANDLER_CREATE_STRIKE_OUT=t.STATE_HANDLER_CREATE_STAMP=t.STATE_HANDLER_CREATE_SQUIGGLY=t.STATE_HANDLER_CREATE_SQUARE_CROP=t.STATE_HANDLER_CREATE_SQUARE=t.STATE_HANDLER_CREATE_REPLACE=t.STATE_HANDLER_CREATE_POLYLINE=t.STATE_HANDLER_CREATE_POLYGON=t.STATE_HANDLER_CREATE_POLYGON_CLOUD=t.STATE_HANDLER_CREATE_PENCIL=t.STATE_HANDLER_CREATE_CIRCLE_AREA=t.STATE_HANDLER_CREATE_AREA=t.STATE_HANDLER_CREATE_PERIMETER=t.STATE_HANDLER_CREATE_DISTANCE=t.STATE_HANDLER_CREATE_LINE=t.STATE_HANDLER_CREATE_LINK=t.STATE_HANDLER_CREATE_EDIT_IMAGE=t.STATE_HANDLER_CREATE_IMAGE=t.STATE_HANDLER_CREATE_HIGHLIGHT=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT=t.STATE_HANDLER_CREATE_CIRCLE=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT=t.STATE_HANDLER_CREATE_ARROW=t.STATE_HANDLER_CREATE_CARET=t.STATE_HANDLER_CHECK_THE_SEARCH=t.STATE_HANDLER_HAND=void 0;var i=n(14);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.STATE_HANDLER_HAND="hand",t.STATE_HANDLER_CHECK_THE_SEARCH="checkTheSearch";var a=t.STATE_HANDLER_CREATE_CARET="createCaret",c=t.STATE_HANDLER_CREATE_ARROW="createArrow",u=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT="createAreaHighlight",s=t.STATE_HANDLER_CREATE_CIRCLE="createCircle",l=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT="createFileAttachment",d=t.STATE_HANDLER_CREATE_HIGHLIGHT="createHighlight",p=t.STATE_HANDLER_CREATE_IMAGE="createImage",f=(t.STATE_HANDLER_CREATE_EDIT_IMAGE="createEditImage",t.STATE_HANDLER_CREATE_LINK="createLink"),g=t.STATE_HANDLER_CREATE_LINE="createLine",h=t.STATE_HANDLER_CREATE_DISTANCE="createDistance",M=t.STATE_HANDLER_CREATE_PERIMETER="createPerimeter",m=t.STATE_HANDLER_CREATE_AREA="createArea",y=t.STATE_HANDLER_CREATE_CIRCLE_AREA="createCircleArea",v=t.STATE_HANDLER_CREATE_PENCIL="createPencil",b=t.STATE_HANDLER_CREATE_POLYGON_CLOUD="createPolygonCloud",D=t.STATE_HANDLER_CREATE_POLYGON="createPolygon",A=t.STATE_HANDLER_CREATE_POLYLINE="createPolyline",N=t.STATE_HANDLER_CREATE_REPLACE="createReplace",I=t.STATE_HANDLER_CREATE_SQUARE="createSquare",j=(t.STATE_HANDLER_CREATE_SQUARE_CROP="createSquareCrop",t.STATE_HANDLER_CREATE_SQUIGGLY="createSquiggly"),T=t.STATE_HANDLER_CREATE_STAMP="createStamp",w=t.STATE_HANDLER_CREATE_STRIKE_OUT="createStrikeOut",x=t.STATE_HANDLER_CREATE_TEXT="createText",O=t.STATE_HANDLER_CREATE_UNDERLINE="createUnderline",E=(t.STATE_HANDLER_MARQUEE="marquee",t.STATE_HANDLER_ERASER="eraser",t.STATE_HANDLER_LOUPE="loupe",t.STATE_HANDLER_SELECT_TEXT_ANNOTATION="select-text-annotation",t.STATE_HANDLER_SELECT_TEXT_IMAGE="select-text-image",t.STATE_HANDLER_SELECT_ANNOTATION="select-annotation",t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER="CreateFreeTextTypewriterHandler"),_=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT="createFreeTextCallout",k=t.STATE_HANDLER_CREATE_FREETEXT_BOX="createFreeTextBox",z=(t.STATE_HANDLER_SNAPSHOT_TOOL="snapshot-tool",t.STATE_HANDLER_CREATE_CROP_PAGES="create-crop-pages",t.STATE_HANDLER_CREATE_FIELD_TEXT="CreateTextFieldHandler",t.STATE_HANDLER_CREATE_FIELD_SIGNATURE="CreateSignatureFieldHandler",t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON="CreatePushButtonFieldHandler",t.STATE_HANDLER_CREATE_RADIO_BUTTON="CreateRadioButtonStateHandler",t.STATE_HANDLER_CREATE_ARTICLE_BUTTON="CreateArticleButtonStateHandler",o(r={},x,"text"),o(r,d,"highlight"),o(r,w,"strikeout"),o(r,O,"underline"),o(r,j,"squiggly"),o(r,N,"strikeout"),o(r,a,"caret"),o(r,E,"freetext"),o(r,_,"freetext"),o(r,k,"freetext"),o(r,I,"square"),o(r,s,"circle"),o(r,g,"line"),o(r,c,"line"),o(r,D,"polygon"),o(r,A,"polyline"),o(r,b,"polygon"),o(r,u,"highlight"),o(r,v,"ink"),o(r,T,"stamp"),o(r,h,"line"),o(r,M,"polyline"),o(r,m,"polygon"),o(r,y,"circle"),o(r,l,"fileattachment"),o(r,p,"screen"),o(r,f,"link"),o(r,"create-multi-media-state","screen"),o(r,"create-redaction-text-image-state","redact"),o(r,"create-redaction-state","redact"),r),C={CreatePushButtonStateHandler:i.FieldType.PushButton,CreateCheckBoxStateHandler:i.FieldType.CheckBox,CreateRadioButtonStateHandler:i.FieldType.RadioButton,CreateComboBoxStateHandler:i.FieldType.ComboBox,CreateListBoxStateHandler:i.FieldType.ListBox,CreateTextStateHandler:i.FieldType.Text,CreateSignStateHandler:i.FieldType.Sign,CreateDateStateHandler:i.FieldType.Text,CreateImageStateHandler:i.FieldType.PushButton};t.StateNameAnnotTypeMap=z,t.StateNameFieldTypeMap=C},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";n.r(t),n.d(t,"BuiltinCommand",(function(){return p})),n.d(t,"BuiltinShortcutContext",(function(){return f}));var r,i,o,a,c,u,s,l,d,p,f,g=n(0);!function(e){e.SELECT_ALL="builtin-command-select-all-annotations",e.CREATION_UNDO_LAST="builtin-command-creation-undo-last",e.DELETE_SELECTED_OBJECT="builtin-command-delete-selected-object",e.UNSELECT_OBJECT="builtin-command-unselect-object",e.UNDO_OPERATION="builtin-command-undo",e.REDO_OPERATION="builtin-command-redo",e.CANCEL_CREATING_ANNOTATION_OPERATION="builtin-command-cancel-creating-annotation",e.CLOSE_LAYER="builtin-command-close-closable-layer",e.ARROW_UP="builtin-command-arrow-up",e.ARROW_DOWN="builtin-command-arrow-down",e.ARROW_LEFT="builtin-command-arrow-left",e.ARROW_RIGHT="builtin-command-arrow-right",e.SWITCH_TO_HAND_STATE="builtin-command-switch-hand-state",e.COPY_ACTIVATE_ELEMENT="builtin-command-copy-activate-element",e.CUT_ACTIVATE_ELEMENT="builtin-command-cut-activate-element",e.ADD_BOOKMARK="builtin-command-add-bookmark",e.COPY_TEXT_IMAGE="builtin-command-copy-text-image",e.BLUR_EDITTING_TEXT_OBJECT="builtin-command-blur-editting-text-object",e.ALIGNMENT_REDUCE_WIDTH="builtin-command-alignment-reduce-width",e.ALIGNMENT_RAISE_WIDTH="builtin-command-alignment-raise-width",e.ALIGNMENT_REDUCE_HEIGHT="builtin-command-alignment-reduce-height",e.ALIGNMENT_RAISE_HEIGHT="builtin-command-alignment-raise-height",e.ALIGNMENT_REDUCE_STEP_WIDTH="builtin-command-alignment-reduce-step-width",e.ALIGNMENT_RAISE_STEP_WIDTH="builtin-command-alignment-raise-step-width",e.ALIGNMENT_REDUCE_STEP_HEIGHT="builtin-command-alignment-reduce-step-height",e.ALIGNMENT_RAISE_STEP_HEIGHT="builtin-command-alignment-raise-step-height",e.TAB_NEXT_OPERATION="builtin-command-tab-next",e.TAB_PREVIOUS_OPERATION="builtin-command-tab-previous",e.DELETE_ATTACHMENT="builtin-command-delete-attachment",e.JUMP_TO_NEXT_PAGE="builtin-command-jump-to-next-page",e.JUMP_TO_PREVIOUS_PAGE="builtin-command-jump-to-previsous-page"}(p||(p={})),function(e){e.GLOBAL="builtin-shortcut-context-global",e.SELECTION="builtin-shortcut-context-selection",e.BASIC_STATE_HANDLER="builtin-shortcut-context-state-hander",e.ANNOTATION_PROPERTIES="builtin-shortcut-context-annot-properties",e.ACTIVATION_ANY="builtin-shortcut-context-activation-any",e.ACTIVATION_ANNOTATION="builtin-shortcut-context-activation-annot",e.ACTIVATION_WIDGET="builtin-shortcut-context-activation-widget",e.ACTIVATION_GRAPH_OBJ="builtin-shortcut-context-activation-graph_obj",e.VIEWER="builtin-shortcut-context-viewer",e.CREATING_ANNOTATION="builtin-shortcut-context-creating-annotation",e.CLOSABLE_LAYER="builtin-shortcut-context-closable-layer",e.EDIT_TEXT_OBJECT="builtin-shortcut-context-edit-text-object"}(f||(f={})),t.default=[{context:f.GLOBAL,topLayers:[],extends:[],shortcuts:{}},{context:f.CLOSABLE_LAYER,topLayers:[f.GLOBAL],extends:[],shortcuts:(r={},r[p.CLOSE_LAYER]="Escape",r)},{context:f.VIEWER,topLayers:[f.GLOBAL],extends:[],shortcuts:(i={},i[p.UNDO_OPERATION]="Mod+Z",i[p.REDO_OPERATION]="Mod+Y",i[p.ADD_BOOKMARK]="Mod+B",i[p.DELETE_ATTACHMENT]="Delete",i[p.JUMP_TO_PREVIOUS_PAGE]="LeftArrow",i[p.JUMP_TO_NEXT_PAGE]="RightArrow",i[p.ARROW_UP]="UpArrow",i[p.ARROW_DOWN]="DownArrow",i)},{context:f.EDIT_TEXT_OBJECT,topLayers:[f.GLOBAL],extends:[],shortcuts:(o={},o[p.BLUR_EDITTING_TEXT_OBJECT]="Escape",o)},{context:f.CREATING_ANNOTATION,topLayers:[f.VIEWER],extends:[],shortcuts:(a={},a[p.CANCEL_CREATING_ANNOTATION_OPERATION]="Escape",a)},{context:f.SELECTION,topLayers:[],extends:[],shortcuts:(c={},c[p.SELECT_ALL]="Mod+A",c)},{context:f.ACTIVATION_ANY,topLayers:[f.VIEWER],extends:[f.SELECTION],shortcuts:(u={},u[p.DELETE_SELECTED_OBJECT]="Delete",u[p.UNSELECT_OBJECT]="Escape",u[p.COPY_ACTIVATE_ELEMENT]="Mod+C",u[p.CUT_ACTIVATE_ELEMENT]="Mod+X",u)},{context:f.ACTIVATION_ANNOTATION,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.ACTIVATION_WIDGET,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:(s={},s[p.ALIGNMENT_REDUCE_WIDTH]="Mod+LeftArrow",s[p.ALIGNMENT_RAISE_WIDTH]="Mod+RightArrow",s[p.ALIGNMENT_REDUCE_HEIGHT]="Mod+UpArrow",s[p.ALIGNMENT_RAISE_HEIGHT]="Mod+DownArrow",s[p.ALIGNMENT_REDUCE_STEP_WIDTH]="Mod+Shift+LeftArrow",s[p.ALIGNMENT_RAISE_STEP_WIDTH]="Mod+Shift+RightArrow",s[p.ALIGNMENT_REDUCE_STEP_HEIGHT]="Mod+Shift+UpArrow",s[p.ALIGNMENT_RAISE_STEP_HEIGHT]="Mod+Shift+DownArrow",s)},{context:f.ACTIVATION_GRAPH_OBJ,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.BASIC_STATE_HANDLER,topLayers:[f.VIEWER],extends:[],shortcuts:(l={},l[p.SWITCH_TO_HAND_STATE]="Escape",l)},{context:g.STATE_HANDLER_CREATE_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_HAND,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STRIKE_OUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_UNDERLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUIGGLY,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_REPLACE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CARET,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_CALLOUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_BOX,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUARE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_ARROW,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON_CLOUD,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PENCIL,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STAMP,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_DISTANCE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PERIMETER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FILE_ATTACHMENT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINK,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-multi-media-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-text-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreatePushButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateCheckBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateRadioButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateComboBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateListBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateTextStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateSignStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateDateStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateImageStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CHECK_THE_SEARCH,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_EDIT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_MARQUEE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_ERASER,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_LOUPE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:(d={},d[p.COPY_TEXT_IMAGE]="Mod+C",d[p.ADD_BOOKMARK]="Mod+B",d)},{context:g.STATE_HANDLER_SELECT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SNAPSHOT_TOOL,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_SIGNATURE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_RADIO_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}}]},function(e,t,n){"use strict";function r(e){return function(t,n){if(e.indexOf(t.command))return n(t)}}function i(e){return function(t,n){if(-1===e.indexOf(t.command))return n(t)}}function o(e,t){if(!(e&&e instanceof Element))return!1;var n=t||{},r=n.visible,i=void 0===r||r,o=n.enable,a=void 0===o||o,c=n.readonly,u=void 0===c||c;if(i){var s=e.getClientRects();if(0===s.length)return!1;var l=s[0];if(l.width*l.height==0)return!1}switch(e.tagName.toLowerCase()){case"input":case"select":case"textarea":var d=e;return!(a&&d.disabled||u&&(d.disabled||d.readOnly))}switch(e.contentEditable){case"true":case"plaintext-only":return!0}return!1}function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(n,r){t.length>0&&t.indexOf(n.command)>-1?r(n):o(n.native.target,e)||r(n)}}function c(e){return function(t,n){e&&t.command!==e||t.preventDefault(),n(t)}}function u(e,t){return void 0===t&&(t=!1),function(n,r){var i;i=t?function(e){return e===document.activeElement||e.contains(document.activeElement)}:function(e){return e===document.activeElement},e.find(i)&&r(n)}}n.r(t),n.d(t,"includeCommandInterceptor",(function(){return r})),n.d(t,"excludeCommandInterceptor",(function(){return i})),n.d(t,"excludeEditableElementInterceptor",(function(){return a})),n.d(t,"preventDefaultInterceptor",(function(){return c})),n.d(t,"focusNeedBeOn",(function(){return u}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={fieldAdded:"fieldAdded",fieldActivated:"fieldActivated",fieldDeativated:"fieldDeativated",fieldFontSizeChanged:"fieldFontSizeChanged",filedRemove:"filedRemove"};var r=t.g_csMoneyFormat=["$"," DM","€","fl"," F"," kr","Lit. "," Pts","£","$A. ","$NZ. ","Руб ","ESC. ","HK$ ","P. ","RMB¥","NT$ ","S.$ ","W","¥","zł","SEK ","kr ","C$ "];t.g_csDateFormat=["m/d","m/d/yy","m/d/yyyy","mm/dd/yy","mm/dd/yyyy","mm/yy","mm/yyyy","d-mmm","d-mmm-yy","d-mmm-yyyy","dd-mmm-yy","dd-mmm-yyyy","yy-mm-dd","yyyy-mm-dd","mmm-yy","mmm-yyyy","mmmm-yy","mmmm-yyyy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yyyy h:MM tt","m/d/yy HH:MM","m/d/yyyy HH:MM","Custom"],t.g_csTimeFormat=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt","Custom"],t.g_csSpecialFormat=["zipCode","zipCode4","phoneNumber","socialSecurityNumber","arbitraryMask"],t.CFD_Utils=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.GetSeperatorString=function(e,t){var n=""+e,r=n.length;return r>3?0==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+"."+n.substr(r-3):1==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+","+n.substr(r-3):this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+" "+n.substr(r-3):n},e.GetSampNumberFormat=function(e,t,n,r,i,o){var a="",c="",u=[];if(t>=0&&n>=0&&r>=0&&o>=0){var s="",l="",d=(c=""+e.toFixed(parseInt(t))).indexOf(".");d>0?(l=c.substr(0,d),s=c.substr(d)):(l=c,s="");var p="";for(0==n&&(p=this.GetSeperatorString(parseInt(l),1)+s),1==n&&(p=c),2==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),0)+s),3==n&&(p=(p=c).replace(".",",")),4==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),2)+s);;){if(0==i){a="$";break}if(1==i){a="DM";break}if(2==i){a="€";break}if(3==i){a="f";break}if(4==i){a="F";break}if(5==i){a="kr";break}if(6==i){a="Lit.";break}if(7==i){a="Pts";break}if(8==i){u[0]=163,a=String.fromCharCode.apply(String,u);break}if(9==i){a="$A.";break}if(10==i){a="$NZ.";break}if(11==i){u[0]=1056,u[1]=1091,u[2]=1073,a=String.fromCharCode.apply(String,u);break}if(12==i){a="ESC.";break}if(13==i){a="HK$";break}if(14==i){a="P.";break}if(15==i){u[0]=65509,a=String.fromCharCode.apply(String,u);break}if(16==i){a="NT$";break}if(17==i){a="S.$";break}if(18==i){u[0]=8361,a=String.fromCharCode.apply(String,u);break}if(19==i){u[0]=165,a=String.fromCharCode.apply(String,u);break}if(20==i){u[0]=122,u[1]=322,a=String.fromCharCode.apply(String,u);break}if(21==i){a="SEK";break}if(22==i){a="kr";break}if(23==i){u[0]=67,u[1]=36,a=String.fromCharCode.apply(String,u);break}if(i>23||i<0)break}c=2&r?0==o?"("+p+" "+a+")":"("+a+p+")":0==o?p+a:a+p}return c},e.GetSampPercentFormat=function(e,t,n){var r="";if(t>=0&&n>=0){r=""+(100*e).toFixed(parseInt(t));var i="",o="",a=(r+="%").indexOf(".");a>0?(o=r.substr(0,a),i=r.substr(a)):(o=r,i="");var c="";0==n&&(c=this.GetSeperatorString(parseInt(o),1)+i),1==n&&(c=r),2==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),0)+i),3==n&&(c=(c=r).replace(".",",")),4==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),2)+i),r=c}return r},e.GetFormatStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Format")?1:0==e.indexOf("AFPercent_Format")?2:0==e.indexOf("AFDate_FormatEx")?3:0==e.indexOf("AFTime_Format")?4:0==e.indexOf("AFSpecial_Format")?5:-1:0},e.GetKeystrokeStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Keystroke")?1:0==e.indexOf("AFPercent_Keystroke")?2:0==e.indexOf("AFDate_KeystrokeEx")?3:0==e.indexOf("AFTime_Keystroke")?4:0==e.indexOf("AFSpecial_Keystroke")?5:-1:0},e.GetPercentageValues=function(e){var t,n=-1,r=e.length,i=e.indexOf("("),o=r-i-3,a=e.substr(i+1,o),c=a.split(","),u=a[0];t=Number(u);for(var s=0;s<c.length&&!(++s>=2)&&""!=(u=c[s]);)1==s&&(n=Number(u));return{iDec:t,iSep:n}},e.StringFromUnicode=function(e){for(var t=!1,n="0x",r="",i=0;i<e.length;i++){var o=e[i];"\\"==e[i]&&i+1<e.length&&("u"==e[i+1]||"U"==e[i+1])?(i+=1,t&&(r+=String.fromCharCode(n),n="0x"),t=!0):t?n+=o:(r+=o,t=!1)}return t&&(r+=String.fromCharCode(n)),r},e.GetNumberValues=function(e){var t,n=1,i=-1,o=-1,a=-1,c=-1,u=e.length,s=e.indexOf("("),l=u-s-3,d=e.substr(s+1,l).split(",");t=Number(d[0]);for(var p=0;p<d.length&&!(++p>=6);){var f=d[p];if(""==f)break;if(1!=p)if(2!=p)if(3!=p)if(4!=p)5==p&&(c=f.indexOf("false")>=0?0:1);else{var g=f;if(""==g){a=-1;continue}g=(g=(g=(g=g.replace(/"/g,"")).replace(/'/g,"")).replace("\\u0020"," ")).trim(),g=this.StringFromUnicode(g);for(var h=0;h<24;h++){var M=r[h];if(g==(M=(M=M.replace(" "," ")).trim())){a=h;break}}h>23&&(a=-1)}else o=0;else{var m=Number(f);0!=m&&1!=m&&2!=m&&3!=m||(i=m)}else n=Number(f)}return{iDec:t,iSep:n,iNeg:i,iDef:o,iMoney:a,iPre:c}},e.GetRangeValues=function(e){for(var t=!1,n=!1,r="",i="",o=e.indexOf("("),a=e.indexOf(")"),c=void 0,u=e.substr(o+1,a-o-1).split(","),s=0;s<u.length;)c=(c=u[s]).trim(),0==s||2==s?"true"==c.toLowerCase()?0==s?t=!0:n=!0:0==s?t=!1:n=!1:1!=s&&3!=s||(1==s?r=c:i=c),s++;return{bFrom:t,bTo:n,csiFrom:r,csiTo:i}},e}()},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NameTreeType=t.PosType=t.FillSignType=t.MK_Properties=t.Graphics_ObjectType=t.Graphics_FillMode=t.Font_CIDCharset=t.Font_Charset=t.Font_Styles=t.Font_StandardID=t.Text_Mode=t.Box_Type=t.Calc_Margin_Mode=t.Action_Trigger=t.Signature_Ap_Flags=t.Signature_State=t.Error_Code=t.Font_Descriptor_Flags=t.page_Number_Format=t.date_Format=t.Rendering_Usage=t.Rendering_Content=t.Range_Filter=t.Saving_Flag=t.Search_Flag=t.Rotation_Degree=t.Rotation=t.Standard_Font=t.Watermark_Flag=t.Position=t.Flatten_Option=t.File_Type=t.Relationship=t.Highlight_Mode=t.Action_Type=t.Point_Type=t.Alignment=t.Ending_Style=t.Note_Icon=t.FileAttachment_Icon=t.Border_Style=t.Font_Style=t.Additional_Permission=void 0;var r,i=(r=n(37))&&r.__esModule?r:{default:r};t.Additional_Permission={download:1},t.Font_Style={normal:0,italic:1,bold:2},t.Border_Style={solid:0,dashed:1,underline:2,beveled:3,inset:4,cloudy:5},t.FileAttachment_Icon={graph:"Graph",pushPin:"PushPin",paperclip:"Paperclip",tag:"Tag"},t.Note_Icon={Check:"Check",Circle:"Circle",Comment:"Comment",Cross:"Cross",Help:"Help",Insert:"Insert",Key:"Key",NewParagraph:"NewParagraph",Note:"Note",Paragraph:"Paragraph",RightArrow:"RightArrow",RightPointer:"RightPointer",Star:"Star",UpArrow:"UpArrow",UpLeftArrow:"UpLeftArrow"},t.Ending_Style={None:0,Square:1,Circle:2,Diamond:3,OpenArrow:4,ClosedArrow:5,Butt:6,ReverseOpenArrow:7,ReverseClosedArrow:8,Slash:9},t.Alignment={left:0,center:1,right:2},t.Point_Type={moveTo:1,lineTo:2,lineToCloseFigure:3,bezierTo:4,bezierToCloseFigure:5},t.Action_Type={goto:"TypeGoto",launch:"TypeLaunch",uri:"TypeURI",named:"TypeNamed",thread:"TypeThread",submitForm:"TypeSubmitForm",resetForm:"TypeResetForm",javaScript:"TypeJavaScript",importData:"TypeImportData",hide:"TypeHide"},t.Highlight_Mode={none:0,invert:1,outline:2,push:3,toggle:4},t.Relationship={firstChild:0,lastChild:1,previousSibling:2,nextSibling:3,firstSibling:4,lastSibling:5},t.File_Type={fdf:0,xfdf:1,xml:2,csv:3,txt:4},t.Flatten_Option={all:0,field:1,annot:2},t.Position={topLeft:"TopLeft",topCenter:"TopCenter",topRight:"TopRight",centerLeft:"CenterLeft",center:"Center",centerRight:"CenterRight",bottomLeft:"BottomLeft",bottomCenter:"BottomCenter",bottomRight:"BottomRight"},t.Watermark_Flag={asContent:0,asAnnot:1,onTop:2,unprintable:4,display:8},t.Standard_Font={courier:0,courierBold:1,courierBoldOblique:2,courierOblique:3,helvetica:4,helveticaBold:5,helveticaBoldOblique:6,helveticaOblique:7,timesRoman:8,timesBold:9,timesBoldItalic:10,timesItalic:11,symbol:12,zapfDingbats:13},t.Rotation={rotation0:0,rotation1:1,rotation2:2,rotation3:3},t.Rotation_Degree={rotation0:0,rotation90:90,rotation180:180,rotation270:270},t.Search_Flag={caseSensitive:1,wholeWord:2,consecutively:4},t.Saving_Flag={normal:0,incremental:1,noOriginal:2,XRefStream:8,linearized:4096,removeRedundantObjects:16},t.Range_Filter={all:0,even:1,odd:2},t.Rendering_Content={page:"page",annot:"annot"},t.Rendering_Usage={print:"print",view:"view"},t.date_Format={MSlashD:0,MSlashDSlashYY:1,MSlashDSlashYYYY:2,MMSlashDDSlashYY:3,MMSlashDDSlashYYYY:4,DSlashMSlashYY:5,DSlashMSlashYYYY:6,DDSlashMMSlashYY:7,DDSlashMMSlashYYYY:8,MMSlashYY:9,MMSlashYYYY:10,MDotDDotYY:11,MDotDDotYYYY:12,MMDotDDDotYY:13,MMDotDDDotYYYY:14,MMDotYY:15,DDotMDotYYYY:16,DDDotMMDotYY:17,DDDotMMDotYYYY:18,YYHyphenMMHyphenDD:19,YYYYHyphenMMHyphenDD:20},t.page_Number_Format={default:0,numberOfCount:1,numberSlashCount:2,pageNumber:3,pageNumberOfCount:4},t.Font_Descriptor_Flags={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144},t.Error_Code=i.default,t.Signature_State={verifyChange:128,verifyIncredible:256,verifyNoChange:1024,stateVerifyIssueUnknown:2048,verifyIssueValid:4096,verifyIssueUnknown:8192,verifyIssueRevoke:16384,verifyIssueExpire:32768,verifyIssueUncheck:65536,verifyIssueCurrent:131072,verifyTimestampNone:262144,verifyTimestampDoc:524288,verifyTimestampValid:1048576,verifyTimestampInvalid:2097152,verifyTimestampExpire:4194304,verifyTimestampIssueUnknown:8388608,verifyTimestampIssueValid:16777216,verifyTimestampTimeBefore:33554432,verifyChangeLegal:134217728,verifyChangeIllegal:268435456},t.Signature_Ap_Flags={showTagImage:1,showLabel:2,showReason:4,showDate:8,showDistinguishName:16,showLocation:32,showSigner:64,showBitmap:128,showText:256},t.Action_Trigger={click:-1,keyStroke:7,format:8,validate:9,calculate:10,mouseEnter:11,mouseExit:12,mouseDown:13,mouseUp:14,onFocus:15,onBlur:16},t.Calc_Margin_Mode={CalcContentsBox:0,CalcDetection:1},t.Box_Type={MediaBox:0,CropBox:1,TrimBox:2,ArtBox:3,BleedBox:4},t.Text_Mode={Fill:0,Stroke:1,FillStroke:2,Invisible:3,FillClip:4,StrokeClip:5,FillStrokeClip:6,Clip:7},t.Font_StandardID={Courier:0,CourierB:1,CourierBI:2,CourierI:3,Helvetica:4,HelveticaB:5,HelveticaBI:6,HelveticaI:7,Times:8,TimesB:9,TimesBI:10,TimesI:11,Symbol:12,ZapfDingbats:13},t.Font_Styles={FixedPitch:1,Serif:2,Symbolic:4,Script:8,NonSymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,Bold:262144},t.Font_Charset={ANSI:0,Default:1,Symbol:2,Shift_JIS:128,Hangeul:129,GB2312:134,ChineseBig5:136,Thai:222,EastEurope:238,Russian:204,Greek:161,Turkish:162,Hebrew:177,Arabic:178,Baltic:186},t.Font_CIDCharset={Unknown:0,GB1:1,CNS1:2,JAPAN1:3,KOREA1:4,UNICODE:5},t.Graphics_FillMode={None:0,Alternate:1,Winding:2},t.Graphics_ObjectType={All:0,Text:1,Path:2,Image:3,Shading:4,FormXObject:5},t.MK_Properties={borderColor:"borderColor",fillColor:"fillColor",normalCaption:"normalCaption",downCaption:"downCaption",rolloverCaption:"rolloverCaption"},t.FillSignType={crossMark:1,checkMark:2,roundRectangle:3,line:4,dot:5},t.PosType={first:0,last:1,after:2,before:3},t.NameTreeType={Dests:1,JavaScript:2,EmbeddedFiles:3,Templates:4,Pages:5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);Object.defineProperty(t,"MARKUP_ANNOTATION_STATE",{enumerable:!0,get:function(){return(e=r,e&&e.__esModule?e:{default:e}).default;var e}}),t.BORDER_STYLE={SOLID:0,DASHED:1,UNDERLINE:2,BEVELED:3,INSET:4,CLOUDY:5},t.POINT_TYPE={MOVE_TO:1,LINE_TO:2,LINE_TO_CLOSE_FIGURE:3,BEZIER_TO:4,BEZIER_TO_CLOSE_FIGURE:5},t.Intents={LINE_ARROW:"LineArrow",LINE_DIMENSION:"LineDimension",POLYGON_CLOUD:"PolygonCloud",POLYGON_DIMENSION:"PolygonDimension",POLYLINE_DIMENSION:"PolyLineDimension",CIRCLE_DIMENSION:"CircleDimension",FREETEXT_TYPEWRITER:"FreeTextTypewriter",FREETEXT_CALLOUT:"FreeTextCallout",STRIKEOUT_TEXTEDIT:"StrikeOutTextEdit"};var i=t.LineEndingName={0:"None",1:"Square",2:"Circle",3:"Diamond",4:"OpenArrow",5:"ClosedArrow",6:"Butt",7:"ROpenArrow",8:"RClosedArrow",9:"Slash"};t.LineEndingStyle=Object.keys(i).reduce((function(e,t){return e[i[t]]=Number(t),e}),{}),t.LINE_CAPTION_POSITION={POS_INLINE:0,POS_TOP:1},t.AnnotFlagsName={0:"invisible",1:"hidden",2:"print",3:"nozoom",4:"norotate",5:"noview",6:"readonly",7:"locked",8:"togglenoview"},t.PDFDocPermission={PrintLowQuality:4,ModifyDocument:8,Extract:16,AnnotForm:32,FillForm:256,ExtractAccess:512,Assemble:1024,PrintHighQuality:2048},t.MeasureType={MeasureTypeX:0,MeasureTypeY:1,MeasureTypeD:2,MeasureTypeA:3,MeasureTypeT:4,MeasureTypeS:5},t.STORE_NAMES={SELECTION_INFO:"viewer--store-selection-info"},t.CREATING_MEASUREMENT_CONTEXTMENU="creating-measurement-contextmenu",t.HIGHLIGHTING_MODE={NONE:0,INVERT:1,OUTLINE:2,PUSH:3,TOGGLE:4},t.RESOLVED_PROMISE_VOID=Promise.resolve(),t.DISTANCE_TOLERANCE=2,t.POINT_TOLERANCE=.01,t.POS_TYPE={FIRST:0,LAST:1,AFTER:2,BEFORE:3},t.STANDARD_HTML_ELEMENTS=["html","a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],t.EMPTY_STR="",t.DB_PREFIX="FoxitPDFSDKForWeb_",t.SET_FORM_CREATION_CONTINUOUSLY="set_form_creation_continuously",t.HIDE_FORM_FIELD_PROPERTY_BOX="hideFormFieldPropertyBox",t.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX="hideFormFieldSimplePropertyBox",t.MEASUREMENT_INFO="measurementInfo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44),i={annotationUpdated:"annotation-updated",annotationIDUpdated:"annotation-id-updated",annotationAppearanceUpdated:"annotation-appearance-updated",annotationReplyAdd:"annotation-reply-add",annotationReviewStateAnnotAdd:"annotation-review-state-annot-add",annotationMarkedStateAnnotAdd:"annotation-marked-state-annot-add",annotationStatesCleared:"annotation-states-cleared",annotationRemoved:"annotation-removed",annotationMovedPosition:"annotation-moved-position",annotationAdded:"annotation-add",annotationAdd:"annotation-add",moveAnnotsToPages:"moveAnnotsToPages",annotationImported:"annotation-imported",annotationImportedEx:"annotation-imported-ex",annotationLoaded:"annotation-loaded",actionUpdated:"action-updated",actionAdd:"action-add",actionRemove:"action-remove",layerVisibleChange:"layer-visible-change",layerRemoved:"layer-removed",layerMerged:"layer-merged",bookmarkAdded:"bookmark-added",structureBookmarkAdded:"structure-bookmark-added",bookmarkUpdated:"bookmark-updated",bookmarkRemoved:"bookmark-removed",stateAnnotNameUpdated:"state-annot-name-updated",pageInfoChange:"page-info-change",pageRotationChange:"page-rotation-change",imageAdded:"image-added",watermarkAdded:"watermark-added",graphicsUpdated:"graphics-updated",permissionChanged:"permission-changed",docPasswordChanged:(0,r.identity)("doc-password-changed"),drmEncryptSuccess:"drm-encrypt-success",drmEncryptFailed:"drm-encrypt-failed",removePwdAndPerm:(0,r.identity)("remove-password-and-permission"),pageMoved:"page-moved",pageRemoved:"page-removed",pageAdded:"page-added",insertPages:"import-pages",importPages:"import-pages",documentAttachmentAdd:"document-attachment-add",documentAttachmentModify:"document-attachment-modify",documentAttachmentRemove:"document-attachment-remove",applyRedaction:"apply-redaction",removeReviewState:"remove-review-state",removeMarkedState:"remove-marked-state",formValueChanged:"form-value-changed",metaDataChanged:"meta-data-changed",docModified:"doc-modified",flattened:"flattened",headerFooterUpdated:"headerFooterUpdated",headerFooterAdded:"headerFooterAdded",COChange:"COChange",pagesReversed:"pages-reversed",pagesMoved:"pages-moved",pagesRemoved:"pages-removed",pagesRotated:"pages-rotated",obtainsPageFromEngine:"obtains-page-from-engine",pagesBoxChange:"pages-box-changed",pagesLabelChange:"pages-label-change",pagesLabelNeedUpdate:"pages-label-need-change",pagesReplace:"pages-replace",recognitionForm:"recognition-form",removeEmbeddedPageThumbnail:"remove-embedded-page-thumbnail",articleThreadAdded:"article-thread-added",articleThreadUpdated:"article-thread-updated",articleThreadRemoved:"article-thread-removed",articleBeadAdded:"article-bead-added",articleBeadRemoved:"article-bead-removed",articleBeadUpdated:"article-bead-updated",articleEnterReadMode:"article-enter-read-mode",articleOutReadMode:"article-out-read-mode"};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.convertFromNumberToHex=function(e){if("number"!=typeof e)throw new TypeError("Unexpected color value:"+e);if(e<0)return-1;var t=e.toString(16),n=6;for(e>16777215&&(n=8);t.length<n;)t="0"+t;return"#"+t},t.convertFromNumberToRGBA=function(e){var t=void 0;return e<16777216?t=255:(t=e/i&255,e&=16777215),{r:e>>16&255,g:e>>8&255,b:255&e,a:t}},t.colorConvertor=o,t.standardColorAsARGBNumber=function(e){if(e<=16777215)return 4278190080+e;if(e>16777215)return e;if("string"==typeof e){if((e=e.replace("#","").trim()).match(/^[0-9A-F]{8}$/i))return parseInt(e,16);if(e.match(/^[0-9A-F]{6}$/i))return 4278190080+parseInt(e,16);if(e.match(/^rgb\(\d{1,3}(,\d{1,3}){2}\)$/i)){var t=e.split(/\D+/).map((function(e){return parseInt(e)})),n=r(t,4);return 4278190080+(n[1]<<16)+(n[2]<<8)+n[3]}if(e.match(/^rgba\(\d{1,3}(,\d{1,3}){3}\)$/i)){var i=e.split(/\D+/).map((function(e){return parseInt(e)})),o=r(i,5),a=o[1],c=o[2],u=o[3],s=o[4];return Math.floor(4278190080*s)+(a<<16)+(c<<8)+u}}throw new Error('incorrect color format: "'+e+'"')},t.convertFromNumberToJSColor=function(e){return["RGB",((16711680&e)>>16)/255,((65280&e)>>8)/255,(255&e)/255]},t.getTransparentOrColor=function(e){return 0===e?"transparent":o(16777215&e,"#")};var i=Math.pow(2,24);function o(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HTML",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a="",c=void 0;switch("number"==typeof e&&(e=["int",e]),e[0]){case"int":t=(16711680&e[1])>>16,n=(65280&e[1])>>8,r=255&e[1];break;case"T":t=0,n=0,r=0,o=0;break;case"G":t=n=r=255*e[1];break;case"RGB":t=255*e[1],n=255*e[2],r=255*e[3];break;case"CMYK":t=(1-e[4])*(1-e[1])*255,n=(1-e[4])*(1-e[2])*255,r=(1-e[4])*(1-e[3])*255;break;case"r":t=+(c=e.match(/rgba?\((\d*),\s*(\d*),\s*(\d*),?\s*([\.0-9]*)?\)/))[1],n=+c[2],r=+c[3];var u=c[4];void 0!==u&&(o=+u);break;case"#":var s=4==e.length?/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/:/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;c=e.match(s),t=parseInt(c[1],16),n=parseInt(c[2],16),r=parseInt(c[3],16);break;default:throw new Error("Unsupported color format")}switch(i){case"HTML":a=t===n&&n===r&&-1===r?"transparent":"rgba("+parseInt(t)+","+parseInt(n)+","+parseInt(r)+","+o+")";break;case"RGB":a=["RGB",t/255,n/255,r/255];break;case"#":a+=t<16?"#0"+t.toString(16):"#"+t.toString(16),a+=n<16?"0"+n.toString(16):n.toString(16),a+=r<16?"0"+r.toString(16):r.toString(16);break;case"int":a=0,a|=(o*=255)<<24,a|=t<<16,a|=n<<8,a|=r,a>>>=0}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PageOpened:0,PageClosed:1,DocWillClose:2,DocWillSave:3,DocSaved:4,DocWillPrint:5,DocPrinted:6,FieldKeyStroke:7,FieldWillFormat:8,FieldValueChanged:9,FieldRecalculateValue:10,AnnotCursorEnter:11,AnnotCursorExit:12,AnnotMouseButtonPressed:13,AnnotMouseButtonReleased:14,AnnotReceiveInputFocus:15,AnnotLoseInputFocus:16,AnnotPageOpened:17,AnnotPageClosed:18,AnnotPageVisible:19,AnnotPageInvisible:20}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=l(n(42)),o=(l(n(43)),l(n(8))),a=n(9),c=l(n(45)),u=l(n(46)),s=l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}l(n(47));var d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isEmpty=!t,this.info=t||{},this.page=n,this.api=n.api;var r=this.engine=n.engine;this.eventEmitter=r.eventEmitter,this.id=t.id,this.objectNumber=t.objectNumber,this.isDestroyed=!1}return e.prototype.destroy=function(){this.isDestroyed=!0,this.info=null,this.page=null,this.api=null,this.eventEmitter=null},e.prototype.checkModidyPerm=function(){if("widget"!=this.info.type){if(!this.page.doc.checkPermission(u.default.annotForm))throw new Error("Permission error")}else if(!this.page.doc.checkPermission(u.default.fillForm|u.default.annotForm))throw new Error("Permission error")},e.prototype.hasModifyPermission=function(){return"widget"==this.info.type?this.page.doc.checkPermission(u.default.fillForm|u.default.annotForm):this.page.doc.checkPermission(u.default.annotForm)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype.getInfo=function(){return this.info},e.prototype.getId=function(){return this.info.objectNumber},e.prototype.getObjectNumber=function(){return this.info.objectNumber},e.prototype.getUniqueID=function(){return this.info.name},e.prototype.setUniqueID=function(e){var t=this,n=this.getPDFPage(),r=n.getPDFDoc(),i=this.getUniqueID();return this.page.doc.api.setUniqueId(r.getId(),n.getId(),this.getId(),e).then((function(r){return r?(t.info.name=e,t.update(s.default.uniqueIDUpdated).then((function(){return t.eventEmitter.emit(o.default.annotationIDUpdated,e,i,t,n),r}))):r}))},e.prototype.getName=function(){return this.info.name},e.prototype.getPDFPage=function(){return this.page},e.prototype.getPage=function(){return this.getPDFPage()},e.prototype.getType=function(){return this.info.type},e.prototype.getTitle=function(){return this.info.title},e.prototype.isMarkup=function(){return this.info.isMarkup},e.prototype.isDeleted=function(){return this.info.isDeleted},e.prototype.getRect=function(){var e=this.info.rect;return new c.default(e.left,e.bottom,e.right,e.top)},e.prototype._setRect=function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.info.rect=e;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotRect(i.getId(),r.getId(),this.getId(),e).then((function(e){return e&&n?t.update(s.default.rectUpdated).then((function(){return t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],t.getPDFPage()),e})):e}))},e.prototype.setRect=function(e){var t=this;this.info.rect=e;var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotRect(r.getId(),n.getId(),this.getId(),e).then((function(e){return e?t.update(s.default.rectUpdated).then((function(e){return t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],t.getPDFPage()),!0})):e}))},e.prototype.setRectAndInnerRect=function(e,t){var n=this;this.info.rect=e,this.info.innerRect=t;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotRectAndInnerRect(i.getId(),r.getId(),this.getId(),e,t).then((function(e){return e?n.update(s.default.rectUpdated).then((function(e){return n.eventEmitter.emit(o.default.annotationAppearanceUpdated,[n],n.getPDFPage()),!0})):e}))},e.prototype.moveTo=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.left,r=t.top,i=t.action,a=Object.assign({},this.info.rect),c=a.right,u=a.bottom,l=n-a.left,d=r-a.top;this.info.rect={left:n,top:r,right:c+l,bottom:u+d};var p=this.getPDFPage(),f=p.getPDFDoc(),g=f.getId(),h=p.getId(),M=this.getId();return this.page.doc.api.moveAnnotTo(g,h,M,{left:n,top:r}).then((function(e){return p.getAnnotsByObjectNumArray(e)})).then((function(t){return Promise.all(t.map((function(e){return e._update()}))).then((function(n){e.eventEmitter.emit(o.default.annotationUpdated,t,p,s.default.rectUpdated),"move"==i&&e.eventEmitter.emit(o.default.annotationMovedPosition,t,p,e)}))}))},e.prototype.getDeviceRect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.page.getDeviceRect(this.getRect(),e,t);if(16&this.info.flag){var r=this.page.getDevicePoint([this.info.rect.left,this.info.rect.top],e,t);return{left:r[0],top:r[1],right:r[0]+n.right-n.left,bottom:r[1]+n.bottom-n.top}}return n},e.prototype.getDeviceInnerRect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.page.getDeviceRect(this.getInnerRect(),e,t)},e.prototype.getContent=function(){return this.info.content},e.prototype.setContent=function(e){var t=this;return this.checkModidyPerm(),this._setContent(e).then((function(n){return t.info.content=e,t.eventEmitter.emit(o.default.annotationUpdated,[t],t.getPDFPage(),s.default.contentUpdated),t}))},e.prototype._setContent=function(e){var t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.setAnnotContent(n.getId(),t.getId(),this.getId(),e)},e.prototype.getBorderColor=function(){return this.info.borderColor},e.prototype.setBorderColor=function(e){var t=this;this.checkModidyPerm(),isNaN(e)&&(e=(0,a.colorConvertor)(e,"int",1));var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotBorderColor(r.getId(),n.getId(),this.getId(),e).then((function(r){return r?(0===e&&(t.info.hasBorderColor=!1),t.update(s.default.borderColorUpdated).then((function(){return t.isGrouped&&t.isGrouped()&&t.getGroupElements().map((function(e){e!=t&&t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[e],n)})),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],n),r}))):r}))},e.prototype.getBorderStyle=function(){return this.info.borderInfo.style},e.prototype.getBorderStyleWithParam=function(){var e=this.info.borderInfo,t=e.style,n=e.cloudIntensity,i=e.dashes,o=void 0;switch(t){case r.BORDER_STYLE.SOLID:o=[];break;case r.BORDER_STYLE.CLOUDY:o=n;break;case r.BORDER_STYLE.DASHED:o=i}return{style:t,param:o}},e.prototype.getBorderInfo=function(){return Object.assign({},this.info.borderInfo)},e.prototype.setBorderInfo=function(e){var t=this;this.checkModidyPerm();var n=this.getType();if(this.getQuadPoints||"caret"===n||"text"===n)return Promise.resolve();var r=JSON.parse(JSON.stringify(this.info.borderInfo||{}));e=this.info.borderInfo=Object.assign(r,e);var i=this.getPDFPage(),a=i.getPDFDoc();return 1===e.style&&0===e.dashes.length&&(e.dashes=[2,2]),5===e.style&&e.cloudIntensity>2&&(e.cloudIntensity=2),this.page.doc.api.setAnnotBorderInfo(a.getId(),i.getId(),this.getId(),e).then((function(e){if(5===t.info.borderInfo.style)return t._update()})).then((function(e){return t.eventEmitter.emit(o.default.annotationUpdated,[t],i,s.default.borderInfoUpdated),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],i),!0}))},e.prototype.setBorderStyle=function(e,t){var n=this,r=this.info.borderInfo;switch(r.style=e,e){case 1:r.dashes=t;break;case 5:r.cloudIntensity=t}var i=this.getPDFPage(),a=i.getPDFDoc();return this.page.doc.api.setAnnotBorderStyle(a.getId(),i.getId(),this.getId(),e,t).then((function(e){return i.getAnnotsByObjectNumArray(e)})).then((function(e){for(var t=[],n=e.length;n--;)t.push(e[n]._update());return Promise.all(t)})).then((function(e){return n.eventEmitter.emit(o.default.annotationUpdated,e,i,s.default.borderStyleUpdated),n.eventEmitter.emit(o.default.annotationAppearanceUpdated,e,i),!0}))},e.prototype.getBorderDashes=function(){return Object.assign([],this.info.borderInfo.dashes)},e.prototype.getBorderWidth=function(){var e=this.info.borderInfo.width;return void 0===e?1:+e},e.prototype.setBorderWidth=function(e){var t=this,n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotBorderWidth(r.getId(),n.getId(),this.getId(),e).then((function(e){return t._update().then((function(t){return e}))})).then((function(e){return e&&(t.eventEmitter.emit(o.default.annotationUpdated,[t],n,s.default.borderWidthUpdated),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],n)),e}))},e.prototype.getCloudIntensity=function(){return this.info.borderInfo.cloudIntensity||0},e.prototype.reviseSummary=function(e){return Promise.resolve(this)},e.prototype.rectIsEmpty=function(){return this.info.rectIsEmpty},e.prototype.update=function(e){var t=this;return this._update().then((function(){return e&&t.eventEmitter.emit(o.default.annotationUpdated,[t],t.getPDFPage(),e),t}))},e.prototype._update=function(){var e=this,t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.getAnnot(n.getId(),t.getId(),this.getId()).then((function(t){return e.updateInfo(t),e}))},e.prototype._updateMore=function(){},e.prototype.getFlags=function(){return this.info.flag},e.prototype.getIndex=function(){return this.info.index},e.prototype.setFlags=function(e,t){var n=this;this.checkModidyPerm(),this.info.flag=e;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotFlag(i.getId(),r.getId(),this.getId(),e).then((function(i){return i&&("widget"==n.getType()&&n.updateUI({type:"display",value:e}),t||(n.eventEmitter.emit(o.default.annotationUpdated,[n],r,s.default.flagsUpdated),n.eventEmitter.emit(o.default.annotationAppearanceUpdated,[n],r))),i}))},e.prototype.setFlagValue=function(e,t){return this.setFlags(e,t)},e.prototype.getModifiedDateTime=function(){var e=this.info.modifiedTimestamp;return e<0?null:new Date(e)},e.prototype.setModifiedDateTime=function(e){var t=this;this.checkModidyPerm();var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setModifiedDateTime(r.getId(),n.getId(),this.getId(),e).then((function(e){return t.update(s.default.modifiedDateTimeUpdated)}))},e.prototype.exportToJSON=function(){var e=(0,a.colorConvertor)(16777215&this.info.borderColor,"#"),t=this.info.flag,n=[];for(var o in r.AnnotFlagsName)t&1<<parseInt(o)&&n.push(r.AnnotFlagsName[o]);n=n.join(",");var c=(0,i.default)(new Date(this.info.modifiedTimestamp),"D:yyyyMMddhhmmssTZ","'"),u=this.info.name,s=this.page.getIndex(),l=this.info.rect,d=l.left+","+l.bottom+","+l.right+","+l.top,p=this.info.content,f=this.info.borderInfo,g=this.info.type,h=this.info.customEntries,M={type:g,color:e,flags:n,date:c,name:u,page:s,rect:d,contents:p,width:f.width,customEntries:h,objectNumber:this.info.objectNumber};switch(f.style){case r.BORDER_STYLE.SOLID:M.style="solid";break;case r.BORDER_STYLE.DASHED:M.style="dashed",M.dashPhase=f.dashPhase,M.dashes=f.dashes.join(",");break;case r.BORDER_STYLE.UNDERLINE:M.style="underline";break;case r.BORDER_STYLE.BEVELED:M.style="beveled";break;case r.BORDER_STYLE.INSET:M.style="inset";break;case r.BORDER_STYLE.CLOUDY:M.style="cloudy",M.intensity=f.cloudIntensity}return M},e.prototype.updateInfo=function(e){this._isEmpty=!e,this.info=e,this._updateMore(),this.action&&e.action&&(this.action.info=e.action)},e.prototype.getIntent=function(){return""},e.prototype.setCustomEntries=function(e,t){this.info.customEntries=this.info.customEntries||{},this.info.customEntries[e]=t},e.prototype.setDictionaryEntry=function(e,t){var n=this;return this._setDictionaryEntry(e,t).then((function(e){return e&&n.eventEmitter.emit(o.default.annotationUpdated,[n],n.getPDFPage(),s.default.addDictionary),e}))},e.prototype._setDictionaryEntry=function(e,t){var n=this,r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setDictionaryEntry(i.getId(),r.getId(),this.getId(),e,t).then((function(r){return r&&n.setCustomEntries(e,t),r}))},e.prototype.getDictionaryEntry=function(e){return this._getDictionaryEntry(e)},e.prototype._getDictionaryEntry=function(e){var t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.getDictionaryEntry(n.getId(),t.getId(),this.getId(),e)},e.prototype.resetAppearanceStream=function(){var e=this.getPDFPage(),t=e.getPDFDoc();return this.page.doc.api.resetAppearanceStream(t.getId(),e.getId(),this.getId())},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={contentUpdated:"content-updated",borderInfoUpdated:"borderInfo-updated",borderStyleUpdated:"borderStyle-updated",borderWidthUpdated:"borderWidth-updated",borderColorUpdated:"borderColor-updated",modifiedDateTimeUpdated:"modifiedDateTime-updated",uniqueIDUpdated:"uniqueID-updated",flagsUpdated:"flags-updated",rectUpdated:"rect-updated",innerRectUpdated:"innerRect-updated",iconNameUpdated:"iconName-updated",rotationUpdated:"rotation-updated",defaultAppearanceUpdated:"defaultAppearance-updated",calloutLineEndingStyleUpdated:"calloutLineEndingStyle-updated",calloutLinePointsUpdated:"calloutLinePoints-updated",fillColorUpdated:"fillColor-updated",textColorUpdated:"textColor-updated",alignmentUpdated:"alignment-updated",inkListUpdated:"inkList-updated",endPointUpdated:"endPoint-updated",startPointUpdated:"startPoint-updated",endingStyleUpdated:"endingStyle-updated",enableCaptionUpdated:"enableCaption-updated",leaderCaptionOffsetUpdated:"leaderCaptionOffset-updated",styleFillColorUpdated:"styleFillColor-updated",leaderLineLengthUpdated:"leaderLineLength-updated",leaderLineExtendUpdated:"leaderLineExtend-updated",leaderLineOffsetUpdated:"leaderLineOffset-updated",measureRatioUpdated:"measureRatio-updated",measureUnitUpdated:"measureUnit-updated",measureConversionFactorUpdated:"measureConversionFactor-updated",removeAction:"remove-action",actionDataUpdated:"actionData-updated",addAction:"add-action",highlightingModeUpdated:"highlightingMode-updated",subjectUpdated:"subject-updated",titleUpdated:"title-updated",createDateTimeUpdated:"createDateTime-updated",opacityUpdated:"opacity-updated",intentUpdated:"intent-updated",vertexesUpdated:"vertexes-updated",applyFillColorUpdated:"applyFillColor-updated",quadPointsUpdated:"quadPoints-updated",reviewStateUpdated:"review-state-updated",markedStateUpdated:"marked-state-updated",statesCleared:"state-cleared",replyAdded:"add-replies",addDictionary:"add-dictionary",formFieldValueUpdated:"form-field-value",formFieldsMaxLengthUpdated:"maxLength",formFieldItemsUpdated:"setItems",formFieldIconUpdated:"icon",formFieldInsertedItem:"insertItemAt",formFieldExportValueUpdated:"form-field-export-value",formFieldMKPropertyUpdated:"form-field-mk-property",formFieldAlternateName:"form-field-alternate-name",formFieldActionUpdated:"form-field-action"}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ReadOnly:1,Required:2,NoExport:4,Hidden:8,ButtonNoToggleToOff:16384,ButtonRadiosInUnison:33554432,TextMultiline:4096,TextPassword:8192,TextDoNotSpellCheck:4194304,TextDoNotScroll:8388608,TextComb:16777216,ComboEdit:262144,ChoiceMultiSelect:2097152,CommitOnSelChange:67108864,inUnison:function(e){return e&r.ButtonRadiosInUnison},isHidden:function(e){return e&r.Hidden},isReadOnly:function(e){return e&r.ReadOnly},isRequired:function(e){return e&r.Required},isNoExport:function(e){return e&r.NoExport},isMultiline:function(e){return e&r.TextMultiline},isPassword:function(e){return e&r.TextPassword},isComb:function(e){return e&r.TextComb},isNoSpellCheck:function(e){return e&r.TextDoNotSpellCheck},isNoScroll:function(e){return e&r.TextDoNotScroll},isComboEdit:function(e){return e&r.ComboEdit},isChoiceMultiSelect:function(e){return e&r.ChoiceMultiSelect}},i={FlagExclude:1,FlagIncludeNoValueFields:2,FlagExportFormat:4,FlagGetMethod:8,FlagWithCoordinates:16,FlagAsXFDF:32,FlagIncludeAppendSaves:64,FlagIncludeAnnotations:128,FlagSubmitAsPDF:256,FlagCanonicalFormat:512,FlagExclNonUserAnnots:1024,FlagExclFKey:2048,FlagEmbedForm:8192,isExclude:function(e){return e&i.FlagExclude},isIncludeNoValueFields:function(e){return e&i.FlagIncludeNoValueFields},isHTML:function(e){return e&i.FlagExportFormat},isGetMethod:function(e){return e&i.FlagGetMethod},isXFDF:function(e){return e&i.FlagAsXFDF},isPDF:function(e){return e&i.FlagSubmitAsPDF},getType:function(e){var t=i.isHTML(e);if(t)return"HTML";var n=i.isXFDF(e);if(n)return"XFDF";var r=i.isXFDF(e);return r?"PDF":t||n||r?void 0:"FDF"}},o=r;t.FieldType={Unknown:0,PushButton:1,CheckBox:2,RadioButton:3,Text:6,ListBox:5,ComboBox:4,Sign:7,Barcode:8},t.FieldFlag=o,t.FormActionFlags=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORM_FIELD_STATE_HANDLER_NAMES=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=t.FORM_FIELD_STATE_HANDLER_NAMES=[],c=r.PDFViewCtrl.ViewerEvents,u=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"assistant-button"},t.prototype.init=function(){e.prototype.init.call(this),this.taskExecutor=new r.PDFViewCtrl.shared.QueuedAsyncTaskExecutor,this.isAssistantEnabled=!1},t.prototype.onclick=function(){var e=this,t=this.getPDFUI();this.taskExecutor.exec((function(){return e.isAssistantEnabled?t.stopFormDesginerAssist():t.startFormDesginerAssist()}))},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.getPDFUI();this.addDestroyHook(n.addViewerEventListener(c.designerAssistantStatusChanged,(function(e){t.isAssistantEnabled=e,e?t.active():t.deactive()})),n.addViewerEventListener(c.switchStateHandler,(function(e,n){e&&t.handleStateHandlerChange(e,n)})),n.addViewerEventListener(c.openFileSuccess,(function(){n.getStateHandlerManager().then((function(e){var n=e.getCurrentStates();n&&t.handleStateHandlerChange(n)}))})))},t.prototype.handleStateHandlerChange=function(e,t){var n=this,r=this.getPDFUI(),i=e.getStateName();if(a.indexOf(i)>-1){if(t){var o=t.getStateName();if(a.indexOf(o)>-1)return}if(this.enable(),this.isAssistantEnabled)return void this.active();this.taskExecutor.exec((function(){return r.startFormDesginerAssist()}))}else this.taskExecutor.exec((function(){return r.stopFormDesginerAssist().then((function(){n.disable()}))}))},t}(r.SeniorComponentFactory.createSuperClass({template:'\n <ribbon-button\n text="form-designer:assistant.button-text" \n icon-class="fv__icon-toolbar-designer-assistant"\n name="form-assistant-button"\n @tooltip \n tooltip-title="form-designer:assistant.button-tooltip"\n @on.click="$component.onclick()"\n ></ribbon-button>\n '}));t.default=u},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.destroyHooks=[],this.isDestroyed=!1}return e.prototype.addDestroyHook=function(){for(var t,n=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return(t=this.destroyHooks).push.apply(t,r(o.filter((function(t){if("function"!=typeof t&&!(t instanceof e))throw new Error("[Illegal Argument] Invalid destroy hook:"+t+", It's not a function!");return!0})))),function(){o.forEach((function(e){var t=n.destroyHooks.indexOf(e);t>-1&&n.destroyHooks.splice(t,1)}))}},e.prototype.destroy=function(){this.destroyHooks.forEach((function(t){"function"==typeof t?t():t instanceof e&&t.destroy()})),this.destroyHooks=[],this.isDestroyed=!0},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),a=I(n(18)),c=I(n(19)),u=I(n(61)),s=I(n(64)),l=I(n(68)),d=I(n(71)),p=I(n(74)),f=I(n(75)),g=I(n(76)),h=I(n(4)),M=I(n(79)),m=n(0),y=I(n(86)),v=I(n(87)),b=I(n(88)),D=n(89),A=n(7);n(90);var N=I(n(15));function I(e){return e&&e.__esModule?e:{default:e}}function j(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,n){return function r(i,o){try{var a=t[i](o),c=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function O(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}var E=o.shared.replaceRibbonButton2XButton,_=PDFViewCtrl.PDF.form.constant.Field_Flag,k=PDFViewCtrl.ViewerEvents,z=PDFViewCtrl.PDF.constant.AnnotUpdatedType,C=PDFViewCtrl.AnnotComponent,S={MultipleCopy:s.default,Duplicate:l.default,PickField:o.FieldsPickDialog,JSInput:o.ScriptInputDialog},L=o.vendors,R=L.jQuery,P=(L.i18next,L.i18nextChainedBackend,L.i18nextLocalStorageBackend,L.i18nextXHRBackend,L.dialogPolyfill,L.Hammer,L.EventEmitter,R),U=o.StatefulController,Q=PDFViewCtrl.PDF.constant.User_Permissions,Y=PDFViewCtrl,G=Y.IStateHandler,F=Y.ShapeControl,Z=(PDFViewCtrl.PDF.form.constant.Field_Type,[{name:"CreateUnknown",type:0},{name:"CreatePushButton",type:1},{name:"CreateCheckBox",type:2},{name:"CreateRadioButton",type:3},{name:"CreateComboBox",type:4},{name:"CreateListBox",type:5},{name:"CreateText",type:6},{name:"CreateSign",type:7},{name:"CreateDate",type:6},{name:"CreateImage",type:1}]),B=function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"FormDesigner"},t.getLoader=function(){return a.default},t.isBlockedFeature=function(){return!1},t.initOnLoad=function(){if(!t.isBlockedFeature()){for(var e=o.modular.module("form-designer",[]),n=[],r=1;r<Z.length;r++){var a=(0,g.default)(G,F,Z[r].name+"StateHandler",Z[r].type),c=(0,p.default)(Z[r].name+"Controller",U,a,Q);n.push(Z[r].name+"StateHandler"),e.registerController(c)}e.registerComponent(N.default),e.registerController(f.default),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"ShowPropertiesController"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.component;n.parent.on("shown",(function(){t.getPDFUI().getAllActiveElements().then((function(e){e.length>1?n.disable():n.enable()}))}))},t.prototype.handle=function(){var e=this.component.parent.getCurrentTarget(),t=this.getPDFUI().formDesignDialog;t.setAnnot(e),t.show()},t}(o.Controller)),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"Delete"},t.prototype.handle=function(){var e=this;this.getPDFUI().getPDFViewer().then((function(t){t.getAllActiveElements().forEach((function(t){t instanceof C?t.removeAnnot():(e.getPDFUI().editingMgr.removeAnnot(t.widget),e.getPDFUI().formDesignDialog.lockedHandler(!0))}))}))},t}(o.Controller)),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"SetAsDefaultPropertiesController"},t.prototype.handle=function(){var e=this.component.parent.getCurrentTarget();this.pdfUI.getStore().then((function(t){if(!e||"widget"!==e.info.type)throw new Error("set default properties: invalid parameters!");var n=e,r=n.getField(),i=r.info.type,o=n.getFlags(),a=r.getFlags(),c=r.getAlignment(),u=r.getBorderColor(),s=r.getBorderStyle(),l=D.BorderWidthMap[r.getBorderWidth()]||0,d=r.getFillColor(),p=n.getDefaultAppearance(),f=n.getDAFontColor(),g=p.fontName,h=p.textSize,M={fieldType:i,value:{annotFlags:o,fieldFlags:a,alignment:c,DA:{textColor:f,fontName:D.FoxitFontMap[g]?D.FoxitFontMap[g]:g,textSize:h},fillColor:d,border:{borderColor:u,borderStyle:s,borderWidth:l}}};t.dispatch("get-form-field-default-props",M)}))},t}(o.Controller)),Z.forEach((function(t){var n=t.name.replace(/[A-Z]/g,(function(e,t){return 0===t?e.toLowerCase():"-"+e.toLowerCase()})),r={template:'<ribbon-button name="fv--form-designer-'+n+'-btn" icon-class="fv__icon-toolbar-form-'+n+'" @tooltip tooltip-title="form-designer:tips.'+t.name+'" @controller="form-designer:'+t.name+'Controller">form-designer:tips.'+t.name+"</ribbon-button>"};e.registerPreConfiguredComponent(n+"-ribbon",r),e.registerPreConfiguredComponent(n,Object.assign({},r,{template:E(r.template)}))})),e.controller("Copy",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){this.getPDFUI().getPDFViewer().then((function(e){return e.copy()}))}}),e.controller("Cut",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.component.parent.getCurrentTarget(),t=this.getPDFUI().formDesignDialog;t.setAnnot(e),t.show()}}),e.controller("MultipleCopy",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.getPDFUI(),t=e.addonInstanceMap.FormDesignerUIXAddon.getDialog("MultipleCopy"),n=this.component.parent.getCurrentTarget();if(n.getField().controls.length>1)return e.alert({message:"form-designer:dialog.numberError",level:"warning"});e.editingMgr.enableShortcut(0),t.show(n,(function(t,n,r,i,o){if(e.editingMgr.enableShortcut(1),t&&!t.isDeleted()){var a=t.getField(),c=t.getPage();return n?a.form.copyControls(t,c,o.map((function(e){return{rect:e,fieldName:a.getName(),srcObjectNumber:t.getObjNum()}}))):a.form.duplicateField(a.getName(),t,r,i,o).then((function(n){return e.editingMgr.updateLabel(t)}))}}))}}),e.controller("CopyToPage",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.getPDFUI(),t=e.addonInstanceMap.FormDesignerUIXAddon.getDialog("Duplicate"),n=this.component.parent.getCurrentTarget();e.editingMgr.enableShortcut(0),t.show(n,n.page.doc.getPageCount(),[],(function(t,r){e.editingMgr.enableShortcut(1),t&&e.getPDFDocRender().then((function(e){if(!n.isDeleted()){var i=e.getPDFDoc().pageCache,o=[];i.forEach((function(e){e&&o.push(e.getIndex())}));var a=n.page.getIndex();r=r.filter((function(e){return e!=a})),t.getField().form.duplicateWidget(r,t.getField().getName(),t.getObjNum(),o)}}))}))}}),e.controller("SetTabOrder",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.component.parent.getCurrentTarget();this.pdfUI.eventEmitter.emit("set-tab-order",e)}}),e.registerPreConfiguredComponent("keep-tool-selected-checkbox",{template:'<checkbox @tooltip name="keep-tool-selected-checkbox" @controller="form-designer:KeepToolSelectedController" class="fv__icon-toolbar-keep-tool-selected noWarp"></checkbox>',config:{target:"keep-tool-selected-checkbox",tooltip:{title:"form-designer:tips.KeepToolSelected"},text:"form-designer:tips.KeepToolSelected",checked:!1,callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"keep-tool-selected"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.component.disable(),this.$keepToolSelectedCheckbox=P(this.component.element).find("input[type='checkbox']"),this.getPDFUI().getPDFViewer().then((function(e){t.$keepToolSelectedCheckbox.change((function(){e.setFormCreationContinuously(t.$keepToolSelectedCheckbox.prop("checked"))})),e.eventEmitter.on(k.switchStateHandler,(function(e,r){n.indexOf(e.getStateName())>-1?t.component.enable():t.component.disable()}))}))},t}(o.Controller)}}),e.registerPreConfiguredComponent("highlight-fields-checkbox",{template:'<checkbox @tooltip name="highlight-fields-checkbox" @controller="form-designer:HighlightFieldsController" tooltip-title="form-designer:tips.HighlightFields" text="form-designer:tips.HighlightFields" class="fv__icon-toolbar-highlight-fields noWarp"></checkbox>',config:{target:"highlight-fields-checkbox",checked:!0,callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"HighlightFieldsController"},t.prototype.mounted=function(){var t,r=this;e.prototype.mounted.call(this);var i=this.getPDFUI();this.addDestroyHook(i.addViewerEventListener((T(t={},PDFViewCtrl.ViewerEvents.openFileSuccess,(function(e){r.changePermission(e),r.getPDFUI().getPDFViewer().then((function(e){var t=e.highlightControls();e.setHighlightControlsUI(t)}))})),T(t,h.default.fieldAdded,(function(e,t,n){i.getCurrentPDFDoc().then((function(e){r.changePermission(e)}))})),T(t,k.annotationRemoved,(function(e){i.getCurrentPDFDoc().then((function(e){r.changePermission(e)}))})),t))),this.$highlightFieldsCheckbox=P(this.component.element).find("input[type='checkbox']"),this.getPDFUI().getPDFViewer().then((function(e){var t=!0,o=e.highlightControls();r.$highlightFieldsCheckbox[0].checked=o,r.$highlightFieldsCheckbox.change((function(){var n=r.$highlightFieldsCheckbox[0].checked;t?e.highlightForm(n):e.setHighlightControlsUI(n)})),e.eventEmitter.on(k.switchStateHandler,(function(o,a){var c=i.customs.isAccountExpired;c&&c(!1)||setTimeout((function(){n.indexOf(o.getStateName())>-1||o.getStateName()===m.STATE_HANDLER_SELECT_ANNOTATION?e.highlightForm(t=!1):(t=!0,e.highlightForm(r.$highlightFieldsCheckbox[0].checked))}),100)})),e.eventEmitter.on(k.setFromFieldHighlight,(function(e){t&&r.$highlightFieldsCheckbox.prop("checked",e)}))}))},t.prototype.changePermission=function(e){var t=this,n=this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()}));Promise.all([e.hasForm(),n]).then((function(e){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e,2),r=n[0];n[1]&t.constructor.permission&&r?t.component.lock&&t.component.unlock():t.component.lock&&t.component.lock()}))},i(t,null,[{key:"permission",get:function(){return Q.modify+Q.annotForm+Q.fillForm}}]),t}(o.Controller)}}),e.registerController(v.default),e.registerPreConfiguredComponent("reset-form",{template:'<ribbon-button @tooltip name="fv--reset-field-btn" @controller="form-designer:ResetFormController" tooltip-title="form-designer:tips.ResetForm" icon-class="fv__icon-toolbar-reset-field">form-designer:tips.ResetForm</ribbon-button>'}),e.registerController(b.default),e.registerPreConfiguredComponent("add-tooltip",{template:'<ribbon-button @tooltip name="fv--add-tooltip-btn" @controller="form-designer:AddTooltipController" tooltip-title="form-designer:tips.AddTooltip" icon-class="fv__icon-toolbar-add-tooltip">form-designer:tips.AddTooltip</ribbon-button>'}),e.registerPreConfiguredComponent("showCO",{template:'<ribbon-button name="fv--showCO-btn" icon-class="fv__icon-toolbar-form-CO" @tooltip tooltip-title="form-designer:tips.showCO" @controller="form-designer:showCODialogController">form-designer:tips.showCO</ribbon-button>'}),e.controller("showCODialogController",{mounted:function(){var e,t=this;this.getPDFUI().addViewerEventListener((T(e={},PDFViewCtrl.ViewerEvents.renderFileSuccess,(function(e){e.getPDFForm(),e.getPDFForm().getCO().length?t.component.enable():t.component.disable()})),T(e,PDFViewCtrl.ViewerEvents.COChange,(function(e){e.length?t.component.enable():t.component.disable()})),e))},handle:function(){var e=this.getPDFUI(),t=e.CODialog;t||(t=e.CODialog=new d.default(e),e.eventEmitter.emit("showCODialog"),e.getRootComponent().then((function(e){e.append(t.dialog)}))),e.getCurrentPDFDoc().then((function(e){var n=e.getPDFForm(),r=e.getPDFForm().getCO();t.show(r,(function(e){n.setCO(e)}))}))}}),e.registerController(y.default),e.registerPreConfiguredComponent("alignment-menu",{template:'<div name="alignment-menu" @controller="form-designer:AlignmentMenuController as acl">\n <dropdown name="dropdown-align" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.align.title">\n <xbutton @on.click="acl.align(\'left\')">form-designer:contextMenu.align.left</xbutton>\n <xbutton @on.click="acl.align(\'right\')">form-designer:contextMenu.align.right</xbutton>\n <xbutton @on.click="acl.align(\'top\')">form-designer:contextMenu.align.top</xbutton>\n <xbutton @on.click="acl.align(\'bottom\')">form-designer:contextMenu.align.bottom</xbutton>\n <contextmenu-separator></contextmenu-separator>\n <xbutton @on.click="acl.align(\'vertically\')">form-designer:contextMenu.align.vertically</xbutton>\n <xbutton @on.click="acl.align(\'horizontally\')">form-designer:contextMenu.align.horizontally</xbutton>\n </dropdown>\n <dropdown name="dropdown-center" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.center.title">\n <xbutton @on.click="acl.center(\'vertically\')">form-designer:contextMenu.center.vertically</xbutton>\n <xbutton @on.click="acl.center(\'horizontally\')">form-designer:contextMenu.center.horizontally</xbutton>\n <xbutton @on.click="acl.center(\'both\')">form-designer:contextMenu.center.both</xbutton>\n </dropdown>\n <dropdown name="dropdown-distribute" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.distribute.title">\n <xbutton @on.click="acl.distribute(\'vertically\')">form-designer:contextMenu.distribute.vertically</xbutton>\n <xbutton @on.click="acl.distribute(\'horizontally\')">form-designer:contextMenu.distribute.horizontally</xbutton>\n </dropdown>\n <dropdown name="dropdown-size" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.size.title">\n <xbutton @on.click="acl.size(\'height\')">form-designer:contextMenu.size.height</xbutton>\n <xbutton @on.click="acl.size(\'width\')">form-designer:contextMenu.size.width</xbutton>\n <xbutton @on.click="acl.size(\'both\')">form-designer:contextMenu.size.both</xbutton>\n </dropdown>\n </div>',config:{target:"alignment-menu",callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n,r=this.getPDFUI(),i=this.component.$container.$children,o=["strikeout","underline","caret","squiggly","highlight"],a=["polygon","polyline","PolygonCloud","LineArrow","ink","Line","LineDimension","freetext","fileattachment","FreeTextCallout","text","PolygonDimension","PolyLineDimension"].map((function(e){return e.toLowerCase()}));this.addDestroyHook(this.component.parent.on("shown",(n=j(regeneratorRuntime.mark((function e(n,c,u){var s,l,d,p,f,g,h,M,m=(s=j(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>=f.length)){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,M(f[t]);case 4:if(!e.sent){e.next=9;break}return e.abrupt("return",m(t+1));case 9:return e.abrupt("return",!0);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)});return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M=function(e){return h.getPermission(e.annot).then((function(e){return e.ignorable()||e.isModifiable()}))},l=!1,d=!1,p=!1,e.next=6,r.getAllActiveElements();case 6:return f=e.sent,g=!0,e.next=10,Promise.all(f.map(function(){var e=j(regeneratorRuntime.mark((function e(n){var c,u,s,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=n.annot,e.next=3,r.getAnnotAuthorityManager(c);case 3:return u=e.sent,e.next=6,u.getPermission(c);case 6:if(e.sent.isModifiable()||(g=!1),c){e.next=10;break}return e.abrupt("return");case 10:s=(c.getIntent()||c.getType()||"").toLowerCase(),((h=n.getAnnotFlag()).checkReadOnly()||h.checkLocked())&&(l=!0),o.indexOf(s)>-1&&(d=!0),a.indexOf(s)>-1&&(p=!0),i.forEach((function(e){switch(e.name){case"dropdown-align":l||d||f.length<=1?e.disable():e.enable();break;case"dropdown-center":l||d||!g?e.disable():e.enable();break;case"dropdown-distribute":l||d||f.length<=2?e.disable():e.enable();break;case"dropdown-size":l||d||f.length<=1?e.disable():e.enable(),p?e.hide():e.show()}}));case 16:case"end":return e.stop()}}),e,t)})));return function(t){return e.apply(this,arguments)}}()));case 10:return e.next=12,r.getAnnotAuthorityManager();case 12:return h=e.sent,e.next=15,r.getPDFDocRender();case 15:if(e.sent.noInteraction&&(l=!0),l){e.next=21;break}return e.next=20,m(0);case 20:l=e.sent;case 21:i.forEach((function(e){if(d)e.hide();else switch(e.show(),e.name){case"dropdown-align":l||f.length<=1?e.disable():e.enable();break;case"dropdown-center":l?e.disable():e.enable();break;case"dropdown-distribute":l||f.length<=2?e.disable():e.enable();break;case"dropdown-size":l||f.length<=1?e.disable():e.enable(),p?e.hide():e.show()}})),setTimeout((function(){var e=t.component.nextSiblings();e&&(d?e.hide():e.show())}),20);case 23:case"end":return e.stop()}}),e,t)}))),function(e,t,r){return n.apply(this,arguments)}))),this.parentMenu=this.component.parent},t.prototype.handle=function(e){var t=this.component;t.disabled||t.isContainer()&&t.children().length>1||this.parentMenu.hide()},t}(y.default)}})}function u(){var e=this.component,t=e.parent;if(t){var n=this.getPDFUI();this.addDestroyHook(t.on("shown",(function(){n.getAllActiveElements().then((function(t){var n=t.some((function(e){return!e.annot||"widget"!==e.annot.getType()})),r=t.filter((function(e){return e.annot&&"widget"===e.annot.getType()})).length;n||r>1?e.hide():e.show()}))})))}}},t.prototype.getDialog=function(e){return this.dialogs[e]||(this.dialogs[e]=new S[e](this.pdfUI))},t.prototype.init=function(e){var n,i=this;if(!t.isBlockedFeature()){this.pdfUI=e,this.destroyHooks=[],this.callbacks={},this.defaultFormFieldProps={};var o=e.formDesignDialog=new c.default(e,this),a=e.simplePropertiesDialog=new u.default(e,this);this.dialogs={zFieldProperty:o},this.destroyHooks.push(e.addViewerEventListener((T(n={},h.default.fieldAddedFailed,(function(t){e.alert({message:"form-designer:tips.CreateFailed",level:"error"})})),T(n,h.default.fieldAdded,(function(t,n,r){var c=!1,u=function(){c||(c=!0,e.editingMgr.activeElementByAnnotId(t.index,n.getId()),setTimeout((function(){i.hideFormFieldProperty||(o.isOpened()?o.setAnnot(n):(a.setAnnot(n),a.show(r)))})))},s=n,l=s.getField(),d=s.info.fieldType,p=i.defaultFormFieldProps[d];if(void 0!==p){var f=[],g=p.DA,h=p.annotFlags,M=p.alignment,m=p.fieldFlags,y=p.fillColor,v=p.border;f.push(s.setFlagValue(h,!0)),f.push(l.setAlignment(M)),f.push(l.setReadonly(!!_.isReadOnly(m))),f.push(l.setRequired(!!_.isRequired(m))),f.push(l.setBorderStyle(v.borderStyle)),f.push(l.setBorderColor(v.borderColor)),f.push(l.setBorderWidth(v.borderWidth)),f.push(l.setFillColor(y)),f.push(s.setDefaultAppearance(g).then((function(){Object.keys(g).forEach((function(e){var t={type:e,value:g[e]};s.updateUI(t)})),s.updateUI({type:"borderStyle",value:v.borderStyle}),s.updateUI({type:"borderWidth",value:v.borderWidth}),s.updateUI({type:"display",value:h}),i.pdfUI.eventEmitter.emit(k.annotationUpdated,[s],s.getPDFPage(),z.flagsUpdated),i.pdfUI.eventEmitter.emit(k.annotationAppearanceUpdated,[s],s.getPDFPage())}))),Promise.all(f).then((function(){u()})).catch((function(e){u(),console.log("FormDesigner -> on fieldAdded -> err",e)}))}else u()})),T(n,"switch-state-handler",(function(t){var n=pdfui.customs.isAccountExpired;if(!n||!n(!1)){var r=t.getStateName();a.hide(),pdfui.getCurrentPDFDoc().then((function(e){return e.isStaticXFA()})).then((function(t){return!t&&e.editingMgr&&e.editingMgr.startEditingMode(r)}))}})),T(n,"render-page-success",(function(t){e.editingMgr.showAllEditingWidget([t.index])})),T(n,"will-close-document",(function(){a.hide(),o.hide(),e.editingMgr.clearEditingWidgets(),e.editingMgr.restoreHighlight()})),T(n,"annotation-add",(function(t,n){t=t.filter((function(e){return"widget"===e.getType()})),e.editingMgr.afterWidgetsAdded(n.getIndex(),t)})),T(n,PDFViewCtrl.ViewerEvents.annotationUpdated,(function(t,n,r){e.editingMgr.updateAnnots(t,n,r),o.isOpened()&&o.setValue()})),T(n,PDFViewCtrl.ViewerEvents.tapPage,(function(){e.formDesignDialog.lockedHandler(!0)})),T(n,"zoom-to-success",(function(t,n){e.editingMgr.zoom(t)})),T(n,"page-rotation-change",(function(t){e.getStateHandlerManager().then((function(e){e.switchTo()}))})),T(n,"fit-width-resize-viewport",(function(){e.editingMgr.zoom(1)})),T(n,"tab-active",(function(t){var n=t.id,r=t.getPage().getIndex();e.editingMgr.annots[n]&&e.getRootComponent().then((function(t){var i=t.querySelector("@field");i&&(i.controller.component.isStartResetNumber=!1),e.editingMgr.activeElementByAnnotId(r,n)}))})),T(n,"active-widgets-for-multi-select",(function(t){var n=t.widgets,r=void 0===n?[]:n,i=t.activationGroup;r.length&&i&&e.getPDFViewer().then((function(t){r.forEach((function(t){var n=e.editingMgr.annots[t.getId()];n&&i.add(n)})),t.bindMultiSelectActiveEvents(i),t.activationManager.active(i),t.getPDFDocRender().setCurrentAnnotHandler(),t.eventEmitter.emit(k.activeElementChanged)}))})),n))),e.getPDFViewer().then((function(t){e.editingMgr=new M.default(e,t,i.dialogs,o,a)})),this.destroyHooks.push((function(){var t=e.editingMgr;for(var n in t.destroy(),e.formDesignDialog.destroy(),e.formDesignDialog=null,e.simplePropertiesDialog.destroy(),e.simplePropertiesDialog=null,i.dialogs){var r=i.dialogs[n];!r.isDestroyed&&r.destroy()}i.dialogs={}})),e.getStore().then((function(e){e.subscribe("update-form-field-default-props",(function(e){i.defaultFormFieldProps=r({},e)})),e.subscribe("get-form-field-default-props",(function(e){var t=r({},i.defaultFormFieldProps);t[e.fieldType]=e.value,i.callbacks&&i.callbacks.onFormFieldPropsChanged&&i.callbacks.onFormFieldPropsChanged(t)})),e.subscribe(A.HIDE_FORM_FIELD_PROPERTY_BOX,(function(e){i.hideFormFieldProperty=e}))}));var s=e.customs&&e.customs.supportFormAsDefaultProps?'<contextmenu-item name="fv--contextmenu-item-field-store-props" @controller="form-designer:SetAsDefaultPropertiesController">contextmenu.annot.as-default</contextmenu-item>':"";e.getRootComponent().then((function(e){e.append('\n <template>\n <contextmenu name="contextmenu-form-designer">\n <contextmenu-item @controller="form-designer:Copy">contextmenu.annot.copyAnnot</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item name="deleteTarget" @controller="form-designer:Delete">contextmenu.annot.delete</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item name="propertiesMenu" @controller="form-designer:ShowPropertiesController">contextmenu.annot.properties</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item @controller="form-designer:MultipleCopy">form-designer:contextMenu.multipleCopy</contextmenu-item>\n <contextmenu-item name="copyToPage" @controller="form-designer:CopyToPage">form-designer:contextMenu.copyToPage</contextmenu-item>\n <contextmenu-item name="setTabOrdern" @controller="form-designer:SetTabOrder">form-designer:contextMenu.setTabOrder</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <form-designer:alignment-menu></form-designer:alignment-menu>\n '+s+"\n </contextmenu>\n </template>\n ")}))}},t.prototype.destroy=function(){this.destroyHooks.forEach((function(e){return e()})),this.destroyHooks=[]},t.prototype.getAnnotRenderById=function(e,t){return this.pdfUI.getPDFPageRender(t).then((function(t){return t?{annot:t.page.annotIdMap[e],pageRender:t}:Promise.reject(new Error("cannot found widget by id:"+e))}))},t.prototype.receiveAction=function(e,n){var i=this;if(!t.isBlockedFeature()){var o=this.pdfUI,a=n.id,c=n.pageIndex;switch(e){case"activeWidget":pdfui.getPDFPageRender(c).then((function(e){return e.isRendered?Promise.resolve():o.goToPage(c,0,0,!1)})).then((function(){return o.getStateHandlerManager()})).then((function(e){return o.getComponentByName(m.STATE_HANDLER_SELECT_ANNOTATION).then((function(t){var n=pdfui.customs.isAccountExpired;return!!n&&n(!1)||t.isLocked||e.switchTo(m.STATE_HANDLER_SELECT_ANNOTATION),i.getAnnotRenderById(a,c)}))})).then((function(e){var t=e.annot,n=e.pageRender,r=t.getDeviceRect(n.getScale(),n.getRotation()),i=r.left,u=r.top;o.goToPage(c,u,i,!1).then((function(){!function e(){var t=o.editingMgr;t.type?t.activeElementByAnnotId(0,a):setTimeout(e,200)}()}))}));break;case"showPropertiesDialog":var u=o.formDesignDialog;this.getAnnotRenderById(n.id,n.pageIndex).then((function(e){var t=e.annot;u.setAnnot(t),u.show()}));break;case"removeWidget":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot;o.editingMgr.removeAnnot(t)}));break;case"multipleCopy":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot,n=o.multipleCopyDialog;if(n||(n=o.multipleCopyDialog=new s.default(o)),t.getField().controls.length>1)return o.alert({message:"form-designer:dialog.numberError",level:"warning"});o.editingMgr.enableShortcut(0),n.show(t,(function(e,t,n,r,i){if(o.editingMgr.enableShortcut(1),e){var a=e.getField(),c=e.getPage();return t?a.form.copyControls(e,c,i.map((function(t){return{rect:t,fieldName:a.getName(),srcObjectNumber:e.getObjNum()}}))):a.form.duplicateField(a.getName(),e,n,r,i).then((function(t){return o.editingMgr.updateLabel(e)}))}}))}));break;case"duplicate":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot;o.editingMgr.enableShortcut(0),i.getDialog("Duplicate").show(t,t.page.doc.getPageCount(),[],(function(e,t){if(o.editingMgr.enableShortcut(1),e){var n=e.page.getIndex();t=t.filter((function(e){return e!=n})),o.getPDFDocRender().then((function(n){var r=n.getPDFDoc().pageCache,i=[];r.forEach((function(e){e&&i.push(e.getIndex())})),e.getField().form.duplicateWidget(t,e.getField().getName(),e.getObjNum(),i)}))}}))}))}this.pdfUI.getStore().then((function(t){switch(e){case"ev-receive-form-field-default-props":if(!i.callbacks)return;var o=function(){};"function"==typeof n?o=n:n&&n.length>0&&"function"==typeof n[0]&&(o=n[0]),i.callbacks.onFormFieldPropsChanged=o;break;case"ev-update-form-field-default-props":var a=r({},n);t.dispatch("update-form-field-default-props",a)}}))}},t}(o.UIXAddon);t.default=B},function(e,t){e.exports=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=M(n(20));n(33);var i=M(n(34)),o=M(n(36)),a=M(n(48)),c=M(n(49)),u=M(n(52)),s=M(n(53)),l=M(n(55)),d=M(n(57)),p=M(n(58)),f=M(n(60)),g=n(6),h=n(4);function M(e){return e&&e.__esModule?e:{default:e}}var m=UIExtension.EditActionsTab,y=UIExtension.vendors.jQuery,v=PDFViewCtrl.PDF.form.constant.Field_Flag,b=PDFViewCtrl.PDF.form.constant.Field_Type,D=PDFViewCtrl.PDF.annots.constant.Annot_Flags,A=PDFViewCtrl.ViewerEvents,N=PDFViewCtrl.PDF.constant.AnnotUpdatedType,I=PDFViewCtrl.shared.colorConvertor,j=PDFViewCtrl.FontUtil,T=j.stdFontMap,w=(j.FoxitFontMap,j.FontFamilies),x=UIExtension.PDFViewCtrl._internal.consts.ADD_FONT_MAP_LIST,O=UIExtension.PDFViewCtrl._internal.shared.stopPropagationOnShortcutEvent,E=UIExtension.PDFViewCtrl.keyboard.KeyboardUtils.matchers.Escape,_=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.PDFUI=t,this.addon=n,this.initDialog()}return e.prototype.initDialog=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.PDFUI,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addon;if(!this.dialog){this.isDestroyed=!1;var g=(0,r.default)({fontFamilies:w,dateOptions:[{name:"m/d",value:"m/d"},{name:"m/d/yy",value:"m/d/yy"},{name:"m/d/yyyy",value:"m/d/yyyy"},{name:"mm/dd/yy",value:"mm/dd/yy"},{name:"mm/dd/yyyy",value:"mm/dd/yyyy"},{name:"mm/yy",value:"mm/yy"},{name:"mm/yyyy",value:"mm/yyyy"},{name:"d-mmm",value:"d-mmm"},{name:"d-mmm-yy",value:"d-mmm-yy"},{name:"d-mmm-yyyy",value:"d-mmm-yyyy"},{name:"dd-mmm-yy",value:"dd-mmm-yy"},{name:"dd-mmm-yyyy",value:"dd-mmm-yyyy"},{name:"yy-mm-dd",value:"yy-mm-dd"},{name:"yyyy-mm-dd",value:"yyyy-mm-dd"},{name:"mmm-yy",value:"mmm-yy"},{name:"mmm-yyyy",value:"mmm-yyyy"},{name:"mmmm-yy",value:"mmmm-yy"},{name:"mmmm-yyyy",value:"mmmm-yyyy"},{name:"mmm d, yyyy",value:"mmm d, yyyy"},{name:"mmmm d, yyyy",value:"mmmm d, yyyy"},{name:"m/d/yy h:MM tt",value:"m/d/yy h:MM tt"},{name:"m/d/yyyy h:MM tt",value:"m/d/yyyy h:MM tt"},{name:"m/d/yy HH:MM",value:"m/d/yy HH:MM"},{name:"m/d/yyyy HH:MM",value:"m/d/yyyy HH:MM"}],timeOptions:[{name:"HH:MM",value:"HH:MM"},{name:"h:MM tt",value:"h:MM tt"},{name:"HH:MM:ss",value:"HH:MM:ss"},{name:"h:MM:ss tt",value:"h:MM:ss tt"}]});this.dialog=t.parseTemplate(g),this.dialog.localize(),this.dialog.mounted(),this.$dialog=y(this.dialog.element),this.$tabNav=y(".fv__ui-form-tab-nav > div",this.$dialog),this.$closeDialog=y("[name=closeDialog]",this.$dialog),this.$locked=y("input[name=locked]",this.$dialog),this.$name=y("input[name=name]",this.$dialog),this.$tooltip=y("input[name=tooltip]",this.$dialog),this.$visibleType=y("select[name=visibleType]",this.$dialog),this.$readOnly=y("input[name=readOnly]",this.$dialog),this.$required=y("input[name=required]",this.$dialog),this.$orientation=y("select[name=fieldOrientation]",this.$dialog),this.$borderStyle=y("select[name=borderStyle]",this.$dialog),this.$borderWidth=y("select[name=borderWidth]",this.$dialog),this.$borderColor=y(".border-color-picker",this.$dialog),this.$fillColor=y(".fill-color-picker",this.$dialog),this.$textColor=y(".text-color-picker",this.$dialog),this.$fontName=y("select[name=fontName]",this.$dialog),this.$orientation=y("select[name=fieldOrientation]",this.$dialog),this.$directionRTL=y("[name=directionRTL]",this.$dialog),this.$calculateRadio=y("[name=calculateRadio]",this.$dialog),this.dialog.on("hidden",(function(e){return t.colorSpectrum.hide()})),this.tabs=[new p.default(this.$dialog,t,n),new i.default(this.$dialog,t,n),new o.default(this.$dialog,t,n),new s.default(this.$dialog,t,n),new c.default(this.$dialog,t,n),new m(this,t,"widget"),new u.default(this.$dialog,t,n),new a.default(this.$dialog,t,n),new l.default(this,t,n),new f.default(this.$dialog,t,n),new d.default(this,t,n)],this.bindEvent(),t.getStore().then((function(n){var r=n.subscribe(x,(function(t){var n=t.new,r="",i=[];n.slice(0).forEach((function(e){r+='<option value="'+e.name+'">'+e.name+"</option>",i.push({name:e.name,value:e.name})})),e.$fontName.append(r),e.customFontFamilies=i}));t.getPDFViewer().then((function(e){e.addDestroyHook((function(){r()}))}))})),t.getRootComponent().then((function(t){t.append(e.dialog)}))}},e.prototype.localize=function(){return this.dialog.localize()},e.prototype.setAnnot=function(e){var t=this;this.dialog||this.initDialog(),this.annot=e;var n=this.PDFUI.colorSpectrum;n&&n.isActive&&n.hide(),this.tabs.forEach((function(t){return t.setAnnot&&t.setAnnot(e)}));var r=(Object.keys(b).find((function(t){return b[t]===e.getField().getType()}))||"").toLowerCase();Object.keys(b).forEach((function(e){return t.$dialog.removeClass("fv__ui-form-"+e.toLowerCase())})),this.$dialog.addClass("fv__ui-form-"+r),this.$dialog.find("[show-in-types]").each((function(e,t){y(t).toggle(y(t).attr("show-in-types").indexOf(r)>-1)})),this.$dialog.find("[hide-in-types]").each((function(e,t){y(t).toggle(y(t).attr("hide-in-types").indexOf(r)<0)})),this.$dialog.find("[disabled-in-types]").each((function(e,t){y(t).prop("disabled",y(t).attr("disabled-in-types").indexOf(r)>-1)})),this.setValue();var i=y(".fv__ui-form-tab-nav .active",this.$dialog);if(i.length){var o=i.attr("show-in-types"),a=i.attr("hide-in-types"),c=!o||o.indexOf(r)>-1,u=a&&a.indexOf(r)>-1;c&&!u||this.$tabNav.eq(0).click()}return this},e.prototype.show=function(e){var t=this;return this.addon.dialogs.goto=this.PDFUI.activeActionsDialog,this.PDFUI.getRootComponent().then((function(e){t.dialog.open(e.element),t.tabs.forEach((function(e){return e.show&&e.show()}));var n=t.dialog.element.querySelectorAll('[tabindex]:not([tabindex="-1"])'),r=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n)).filter((function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0!==n&&0!==r}));if(!(r&&r.length>0&&-1!==r.indexOf(document.activeElement))){var i=y(".fv__ui-form-tab-nav .active",t.$dialog);3==t.annot.getField().getType()?(t.$fontName.parent().parent().css({position:"relative"}),t.$textColor.parent().addClass("disabled")):t.$textColor.parent().remove("disabled"),i.length||(i=t.$tabNav.eq(0)).click(),i.focus()}})),this},e.prototype.hide=function(){if(this.dialog)return this.dialog.hide(),this},e.prototype.isOpened=function(){return this.dialog&&this.dialog.isVisible},e.prototype.destroy=function(){if(!this.isDestroyed){for(var e in this.tabs.forEach((function(e){return e.offEvent&&e.offEvent()})),this.dialog.destroy(),this.$tabNav.off("click"),this.$closeDialog.off("click"),this.$name.off("blur"),this.$tooltip.off("blur"),this.$visibleType.off("change"),this.$readOnly.off("change"),this.$required.off("change"),this.$borderStyle.off("change"),this.$borderWidth.off("change"),this.$orientation.off("change"),this.$borderColor.off("click"),this.$fillColor.off("click"),this.$textColor.off("click"),this.$locked.off("change"),this)delete this[e];this.isDestroyed=!0}},e.prototype.bindEvent=function(){var e=this;this.$dialog.find("select").each((function(t,n){e.dialog.addDestroyHook(O(n,"keyup",E))})),y(".fv__ui-form-tab-nav, .fv__ui-form-tab-body",this.$dialog).on("pointerdown",(function(e){return e.stopPropagation()})),this.$tabNav.on("click",(function(t){e.$tabNav.removeClass("active"),y(t.target).addClass("active");var n=y(t.target).index(),r=y(".fv__ui-form-tab-body > div",e.$dialog).not(".lock-mask");r.hide(),r.eq(n).show(),e.tabs.forEach((function(e){return e.active&&e.annot&&e.annot.getField()&&e.active()}));var i=e.PDFUI.colorSpectrum;i&&i.hide()})),this.$closeDialog.on("click",(function(t){e.hide()})),this.$name.on("blur",(function(t){var n=y(t.target).val().trim(),r=e.annot.getField().getName(),i=e.annot.objectNumber;n&&n!==r&&e.PDFUI.getPDFViewer().then((function(t){t.getCurrentPDFDoc().loadPDFForm().then((function(t){t.validateFieldName(n,e.annot.info.fieldType).then((function(o){o?t.moveControl(r,n,i).then((function(t){if(!t)throw e.$name.val(r),new Error("Rename field error.");e.setLabel(e.annot),e.emitAnnotUpdateEvent(N.titleUpdated,!1)})):(e.$name.val(r),e.PDFUI.alert("dialog.error.validateFieldNameError"))}))}))}))})),this.$tooltip.on("blur",(function(t){var n=y(t.target).val().trim();e.annot.getField().setAlternateName(n)})),this.$visibleType.on("change",(function(t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(y(t.target).val().split("_"),3),r=n[0],i=n[1],o=n[2],a=e.annot.getFlags(),c=a;a&D.hidden&&(c-=D.hidden),a&D.print&&(c-=D.print),a&D.noView&&(c-=D.noView),c=c+Number(r)+Number(i)+Number(o),e.annot.setFlagValue(c).then((function(){e.annot.updateUI({type:"display",value:c}),e.annot.updateUI({})}))})),this.$readOnly.on("change",(function(t){e.annot.getField().setReadonly(y(t.target).prop("checked")),e.emitAnnotUpdateEvent(N.flagsUpdated,!0)})),this.$required.on("change",(function(t){e.annot.getField().setRequired(y(t.target).prop("checked")),e.emitAnnotUpdateEvent(N.flagsUpdated,!0)})),this.$directionRTL.on("change",(function(t){e.annot.setDirectionRTL(Number(y(t.target).val())).then((function(){e.emitAnnotUpdateEvent(N.alignmentUpdated,!0)}))})),this.$borderStyle.on("change",(function(t){var n=y(t.target).val(),r={solid:0,dashed:1,underline:2,beveled:3,inset:4}[n];e.annot.setBorderStyle(r,[3,3]).then((function(t){e.annot.updateUI({type:"borderStyle",value:n})}))})),this.$borderWidth.on("change",(function(t){var n={thin:1,medium:2,thick:3}[y(t.target).val()];e.annot.setBorderWidth(n).then((function(t){e.annot.updateUI({type:"borderWidth",value:n})}))})),this.$orientation.on("change",(function(t){var n=0;switch(y(t.target).val()){case"90":n=1;break;case"180":n=2;break;case"270":n=3}e.annot.setMKProperty("rotation",n).then((function(t){e.annot.updateUI({type:"orientation",value:n})}))})),this.$borderColor.on("click",(function(t){if(!e.$borderColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getMKProperty("borderColor");n.showTransparent(!0).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("border",t)}))}})),this.$fillColor.on("click",(function(t){if(!e.$borderColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getMKProperty("fillColor");n.showTransparent(!0).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("fill",t)}))}})),this.$textColor.on("click",(function(t){if(!e.$textColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getDefaultAppearance().textColor;n.showTransparent(!1).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("textColor",t)}))}})),this.$fontName.on("change",(function(t){var n=y(t.target).val(),r=e.annot;void 0===T[n]&&(n=n.replace(" ","").replace("-","")),r.setDefaultAppearance({fontName:n});var i={type:"fontName",value:n};r.updateUI(i)})),this.$locked.on("change",(function(t){var n=e.annot.getFlags()+(y(t.target).prop("checked")?+D.locked:-D.locked);e.annot.setFlagValue(n),e.lockedHandler(y(t.target).prop("checked"))})),this.$calculateRadio.on("change",(function(e){y(e.target).val()})),this.tabs.forEach((function(e){return e.onEvent&&e.onEvent()}))},e.prototype.setColor=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r="number"==typeof t?t:I(t,"int"),i=void 0,o=void 0,a=this.annot,c={value:r};switch(e){case"fill":i=this.$fillColor,n&&(a.setMKProperty("fillColor",r),c.type="fillColor",a.updateUI(c),this.emitAnnotUpdateEvent(N.fillColorUpdated,!0));break;case"textColor":i=this.$textColor,n&&a.setDefaultAppearance({textColor:r}).then((function(){c.type="textColor",a.updateUI(c)}));break;default:i=this.$borderColor,n&&(a.setMKProperty("borderColor",r),c.type="borderColor",a.updateUI(c),this.emitAnnotUpdateEvent(N.borderColorUpdated,!0))}o=i.find(".label"),t?(i.css("border-color",t?I(t,"HTML"):"transparent"),o.hide()):(i.css("border-top-color","blue"),i.css("border-right-color","green"),o.show())},e.prototype.setValue=function(){var e=this.annot.getField(),t=this.annot.getBorderInfo(),n=this.annot.getFlags(),r=e.getFlags();this.$name.val(e.getName()),this.$tooltip.val(e.getAlternateName());var i=n&D.hidden,o=n&D.print,a=n&D.noView;this.$visibleType.val(i+"_"+o+"_"+a),this.$readOnly.prop("checked",!!v.isReadOnly(r)),this.$required.prop("checked",!!v.isRequired(r)),this.$borderStyle.val({0:"solid",1:"dashed",2:"underline",3:"beveled",4:"inset"}[t.style]||"solid"),this.$borderWidth.val({1:"thin",2:"medium",3:"thick"}[t.width]||"thick");var c=this.annot.getMKProperty("rotation");this.$orientation.val({0:"0",1:"90",2:"180",3:"270"}[c<0||c>3?0:c]);var u=this.annot.getMKProperty("borderColor");this.setColor("border",u,!1);var s=this.annot.getMKProperty("fillColor");this.setColor("fill",s,!1);var l=this.annot.getDAFontColor(),d=void 0,p=e.getAction(g.Action_Trigger.format);if(p&&"TypeJavaScript"==p.info.type)if(d=p.info.javascript,1==h.CFD_Utils.GetFormatStringType(d)){var f=1&h.CFD_Utils.GetNumberValues(d).iNeg?1:0,M=e.getDefaultValue(),m=e.getValue();(M&&0!=M.length||m&&0!=m.length)&&(l=f&&(M<0||m<0)?"#FF0000":l),this.$textColor.prop("disabled",f)}else this.$textColor.prop("disabled",!1);else this.$textColor.prop("disabled",!1);this.setColor("textColor",l,!1);var y=!!(n&D.locked);this.$locked.prop("checked",y),this.lockedHandler(y);var b=this.annot.getDefaultAppearance(),A=T[b.fontName],N=b.fontName;if(void 0===A){var I=w.find((function(e){return e.value===b.fontName}));I||(I=this.customFontFamilies&&this.customFontFamilies.find((function(e){return e.value.replace(" ","").replace("-","")===b.fontName}))),I||(I=this.customFontFamilies&&this.customFontFamilies.find((function(e){return e.value.replace(" ","").replace("-","")===b.fullName}))),N=I?I.value:"Times-Roman"}this.$fontName.val(N),this.$directionRTL.filter("[value="+(this.annot.getDirectionRTL()||0)+"]").prop("checked",!0),this.tabs.forEach((function(e){return e.setValue&&e.setValue()}))},e.prototype.lockedHandler=function(e){y(".lock-mask",this.$dialog).toggle(e)},e.prototype.emitAnnotUpdateEvent=function(e,t){this.PDFUI.eventEmitter.emit(A.annotationUpdated,[this.annot],this.annot.getPDFPage(),e),t&&this.PDFUI.eventEmitter.emit(A.annotationAppearanceUpdated,[this.annot],this.annot.getPDFPage())},e}();t.default=_},function(e,t,n){n(1),e.exports=function(e){"use strict";e=e||{};var t="",r=function(e){return t+=e};return t+='<layer name="form-properties-dialog" class="fv__ui-form-properties-dialog" @draggable>\r\n <div class="fv_ui_dialog_title">\r\n <div show-in-types="pushbutton" data-i18n="form-designer:dialog.pushButtonTitle"></div>\r\n <div show-in-types="checkbox" data-i18n="form-designer:dialog.checkBoxTitle"></div>\r\n <div show-in-types="radiobutton" data-i18n="form-designer:dialog.radioButtonTitle"></div>\r\n <div show-in-types="combobox" data-i18n="form-designer:dialog.comboBoxTitle"></div>\r\n <div show-in-types="listbox" data-i18n="form-designer:dialog.listBoxTitle"></div>\r\n <div show-in-types="text" data-i18n="form-designer:dialog.textFieldTitle"></div>\r\n <div show-in-types="sign" data-i18n="form-designer:dialog.signatureTitle"></div>\r\n <button href="javascript:;" class="fv__ui-layer-header-button" name="closeDialog" type="button">\r\n <i class="fv__icon-layer-close"></i>\r\n </button>\r\n </div>\r\n <div class="fv__ui-form-tab-nav">\r\n <div data-i18n="form-designer:dialog.tabNav.general"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.appearance"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.position"></div>\r\n <div hide-in-types="sign" data-i18n="form-designer:dialog.tabNav.options"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.format"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.validate"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.calculate"></div>\r\n <div show-in-types="listbox" data-i18n="form-designer:dialog.tabNav.selectionChange"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.action"></div>\r\n <div show-in-types="sign" data-i18n="form-designer:dialog.tabNav.signed"></div>\r\n </div>\r\n <div class="fv__ui-form-tab-body">\r\n ',r(n(23)(e)),t+="\r\n ",r(n(24)(e)),t+="\r\n ",r(n(25)(e)),t+="\r\n ",r(n(26)(e)),t+="\r\n ",r(n(27)(e)),t+="\r\n ",r(n(28)(e)),t+="\r\n ",r(n(29)(e)),t+="\r\n ",r(n(30)(e)),t+="\r\n ",r(n(31)(e)),t+="\r\n ",r(n(32)(e)),t+='\r\n <div class="lock-mask"></div>\r\n </div>\r\n <div class="d_f ai_c jc_sb footer">\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="locked"/>\r\n <div data-i18n="form-designer:dialog.footer.locked"></div>\r\n </label>\r\n <div class="fv__ui-dialog-button fv__ui-dialog-cancel-button" @stop-drag name="closeDialog" tabindex="0" @aria:role="button">dialog.close</div>\r\n </div>\r\n</layer>'}},function(e,t,n){"use strict";(function(t){
21
+ var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=Object.create(n),i=/["&'<>]/;r.$escape=function(e){return function(e){var t=""+e,n=i.exec(t);if(!n)return e;var r="",o=void 0,a=void 0,c=void 0;for(o=n.index,a=0;o<t.length;o++){switch(t.charCodeAt(o)){case 34:c="&#34;";break;case 38:c="&#38;";break;case 39:c="&#39;";break;case 60:c="&#60;";break;case 62:c="&#62;";break;default:continue}a!==o&&(r+=t.substring(a,o)),a=o+1,r+=c}return a!==o?r+t.substring(a,o):r}(function e(t){return"string"!=typeof t&&(t=null==t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t)),t}(e))},r.$each=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t(e[n],n);else for(var i in e)t(e[i],i)},e.exports=r}).call(this,n(80))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"add-text-button",fragment:{template:'<ribbon-button text="toolbar.tooltip.addText.title" @controller="fill-sign:AddTextButtonController" name="add-text" @tooltip icon-class="fv__icon-toolbar-add-text"></ribbon-button>',config:[{target:"add-text",attrs:{"tooltip-title":"toolbar.tooltip.addText.title"}}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"combo-field-button",fragment:{template:'<ribbon-button text="toolbar.tooltip.comboField.title" @controller="fill-sign:AddComboFieldButtonController" name="combo-field" @tooltip icon-class="fv__icon-toolbar-combo-field"></ribbon-button>',config:[{target:"combo-field",attrs:{"tooltip-title":"toolbar.tooltip.comboField.title"}}]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=function(e){function t(){c(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return u(this,e.call.apply(e,[this].concat(r)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"set-predefined-text-dialog"},t.prototype.active=function(){e.prototype.active.call(this),this.controller.predefinedTextListDia=this.getLocalList(),this.controller.digest()},t.prototype.show=function(){e.prototype.show.call(this),this.active()},t.prototype.getLocalList=function(){var e=[],t=localStorage.getItem("predefinedTextList");if(t)try{e=JSON.parse(t)}catch(t){e=[]}return e},t.prototype.saveLocalList=function(e){var t="";try{t=JSON.stringify(e)}catch(e){console.error(e)}localStorage.setItem("predefinedTextList",t)},t.prototype.postlink=function(){e.prototype.postlink.call(this),this.lastInputEle=this.getComponentByName("predefined-text-last-input")},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.on("hidden",(function(){t.clickCancel()}))},t.prototype.activeInput=function(){this.lastInputEle.element.removeAttribute("readonly"),this.lastInputEle.element.focus()},t.prototype.onInputBlur=function(e){var t=e.getValue(),n=this.controller.predefinedTextListDia||[],r=n.length;if(t&&0!==t.length){var i={id:r,content:t};this.controller.predefinedTextListDia=n.concat(i),this.lastInputEle.element.setAttribute("readonly",!0),e.setValue("")}this.controller.digest()},t.prototype.onchange=function(e){var t=e[0],n=this.controller.predefinedTextListDia,r=n.findIndex((function(e){return e.id===t.id}));r>-1&&(n[r].content&&""!==n[r].content?n[r].content=t.content:n.splice(r,1)),this.controller.predefinedTextListDia=n},t.prototype.clickOK=function(){this.saveLocalList(this.controller.predefinedTextListDia),this.hide()},t.prototype.clickCancel=function(){this.controller.predefinedTextListDia=this.getLocalList(),this.controller.digest()},t.prototype.showIdentity=function(){var e=this.getPDFUI();e.customs&&e.customs.showPreferences&&e.customs.showPreferences("identityTab")},t}(r.SeniorComponentFactory.createSuperClass({template:(0,i.default)()}));e.registerComponent(t)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),i=a(n(84));n(85);var o=a(n(86));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<layer \r\n name="set-predefined-text-dialog"\r\n class="fv__ui-predefined-layer center" \r\n append-to="body" \r\n modal\r\n @draggable\r\n @controller.alias="fillSignDialogCtrl"\r\n>\r\n <div class="fv__ui-predefined-dialog-main" @stop-drag>\r\n <layer-header title="dialog.fillDialog.title"></layer-header>\r\n <div class="fv__ui-predefined-dialog-body" >\r\n <div class="fv__ui-predefined-identity">\r\n <div class="fv__ui-predefined-identity-description" data-i18n="dialog.fillDialog.identityInformation"></div>\r\n <div class="fv__ui-predefined-identity-set">\r\n <button class="fv__ui-predefined-identity-btn fv__ui-dialog-button" data-i18n="dialog.fillDialog.setIdentity" name="predefined-dialog-set-identity" @on.click="fillSignDialogCtrl.component.showIdentity()"></button>\r\n </div>\r\n </div>\r\n <div class="fv__ui-predefined-text-list">\r\n <div class="fv__ui-predefined-text-list-description" data-i18n="dialog.fillDialog.listDescription"></div>\r\n <div class="fv__ui-predefined-text-list-container">\r\n <ul class="fv__ui-predefined-text-list-ul">\r\n <fill-sign:predefined-text-dialog-list-item\r\n @foreach="predefinedText in fillSignDialogCtrl.predefinedTextListDia"\r\n @sync.predefined-text="predefinedText"\r\n @on.change="fillSignDialogCtrl.component.onchange($args)"></fill-sign:predefined-text-dialog-list-item>\r\n <li class="fv__ui-predefined-text-item-last">\r\n <input\r\n name="predefined-text-last-input"\r\n data-i18n="[placeholder]dialog.fillDialog.placeholder"\r\n type="text"\r\n readonly\r\n class="fv__ui-predefined-text-item-editor"\r\n @on.native.dblclick = "fillSignDialogCtrl.component.activeInput()"\r\n @on.blur="fillSignDialogCtrl.component.onInputBlur($component)"\r\n >\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="fv__ui-predefined-dialog-footer">\r\n <div class="fv__ui-predefined-dialog-btn footer">\r\n <button\r\n class="fv__ui-predefined-btn fv__ui-predefined-dialog-ok fv__ui-dialog-button fv__ui-dialog-ok-button"\r\n data-i18n="dialog.ok"\r\n name="predefined-dialog-ok-btn"\r\n @on.click="fillSignDialogCtrl.component.clickOK()"\r\n ></button>\r\n <button class="fv__ui-predefined-btn fv__ui-predefined-dialog-cancel fv__ui-dialog-button fv__ui-dialog-cancel-button" data-i18n="dialog.cancel" name="predefined-dialog-close-btn" @on.click="fillSignDialogCtrl.component.hide()"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"predefined-text-dialog-list-item"},t.prototype.createDOMElement=function(){return document.createElement("li")},t.prototype.postlink=function(){e.prototype.postlink.call(this),this.controller.isEditMode=!1,this.inputElement=this.getComponentByName("predefined-text-item-input")},t.prototype.switchToEditMode=function(){this.controller.isEditMode=!0,this.controller.digest(),this.inputElement.element.focus()},t.prototype.onInputBlur=function(e){this.controller.isEditMode=!1,this.controller.textObject.content=e.getValue(),this.controller.digest(),this.trigger("change",this.controller.textObject)},t.prototype.addElementEventListener=function(e,t,n){e.addEventListener(t,n),this.addDestroyHook((function(){e.removeEventListener(t,n)}))},t.prototype.sync=function(t,n){var r=e.prototype.sync.call(this,t,n);if(r)return r;switch(t){case"predefined-text":return this.controller.textObject=n,this.controller.digest(),!0}return!1},t}(r.SeniorComponentFactory.createSuperClass({template:'\n <li \n class="fv__ui-predefined-text-item" \n @class="{\'fv__ui-predefined-text-item-edit-mode\':ctrl.isEditMode}" \n @controller.alias="ctrl"\n >\n <div \n name="predefined-text-item-text" \n class="fv__ui-predefined-text-item-text"\n @on.native.dblclick = "ctrl.component.switchToEditMode()"\n >\n <text @sync.text="ctrl.textObject.content"></text>\n </div> \n <input \n @sync.value="ctrl.textObject.content" \n name="predefined-text-item-input" \n type="text" \n class="fv__ui-predefined-text-item-editor"\n @on.blur="ctrl.component.onInputBlur($component)"\n >\n </li>\n '}));e.registerComponent(t)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}n(87)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){e.registerController(o.default);var t=function(e){function t(){l(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return d(this,e.call.apply(e,[this].concat(r)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"predefined-text-dropdown"},r(t,null,[{key:"permission",get:function(){return i.PDFViewCtrl.Consts.PDFDocPermission.ModifyDocument}}]),t.prototype.active=function(){e.prototype.active.call(this);var t=this.getPDFUI();this.controller.defaultPredefinedTextList=t.customs&&t.customs.getDefaultPredefinedText&&t.customs.getDefaultPredefinedText()||[],this.controller.customPredefinedTextList=this.getLocalList(),this.controller.digest()},t.prototype.mounted=function(){var t,n=this;e.prototype.mounted.call(this),this.addDestroyHook(this.getPDFUI().addViewerEventListener("open-file-success",(function(e){return n.changePeimission(e)}))),this.addDestroyHook(this.getPDFUI().addViewerEventListener("permission-changed",(function(e){return n.changePeimission(e)}))),this.getRoot().querySelector("@fill-sign:set-predefined-text-dialog").on("hidden",(function(){n.controller.customPredefinedTextList=n.getLocalList(),n.controller.digest()}));var r=this.getPDFUI(),o=r.addViewerEventListener(i.UIEvents.renderFileSuccess,(function(e){e.PDFForm.isEmpty()||n.controller.component.lock()})),a=r.addViewerEventListener((s(t={},c.default.fieldAdded,(function(e){n.controller.component.lock()})),s(t,c.default.filedRemove,(function(e){r.getCurrentPDFDoc().then((function(e){e.getPDFForm().isEmpty()?n.controller.component.unlock():n.controller.component.lock()}))})),s(t,"annotation-removed",(function(){n.getPDFUI().getCurrentPDFDoc().then((function(e){e.PDFForm.isEmpty()?n.controller.component.unlock():n.controller.component.lock()}))})),t));this.addDestroyHook(o),this.addDestroyHook(a)},t.prototype.changePeimission=function(e){var t=this;this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()})).then((function(e){e&t.constructor.permission?t.controller.component.lock&&t.controller.component.unlock():t.controller.component.lock&&t.controller.component.lock()}))},t.prototype.getLocalList=function(){var e=[],t=localStorage.getItem("predefinedTextList");if(t)try{e=JSON.parse(t)}catch(t){e=[]}return e},t.prototype.showPredefinedDialog=function(){this.getRoot().querySelector("@fill-sign:set-predefined-text-dialog").show()},t}(i.SeniorComponentFactory.createSuperClass({template:(0,a.default)()}));e.registerComponent(t)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),o=u(n(89)),a=u(n(90));n(91);var c=u(n(29));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(2)),i=o(n(27));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){return a(this,t),c(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddPredefinedTextController"},t.getSHName=function(){return"add-fill-predefined-text"},t.getFSType=function(){return"predefined-text"},t.prototype.handle=function(){var t=this.data.defaultText||this.data.customText;return i.default.setParams(t),e.prototype.handle.call(this)},t}(r.default);t.default=u},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<dropdown\r\n name="predefined-text-dropdown"\r\n icon-class="fv__icon-toolbar-predefined-text"\r\n class="fv__ui-predefined-text-dropdown"\r\n separate="false"\r\n @tooltip\r\n @controller.alias="predefinedTextDropdownCtrl"\r\n tooltip-title="toolbar.tooltip.predefinedText.title"\r\n >\r\n <div class="fv__ui-predefined-text-category" @if="predefinedTextDropdownCtrl.defaultPredefinedTextList&&predefinedTextDropdownCtrl.defaultPredefinedTextList.length"><text>toolbar.category.Default</text></div>\r\n <div class="fv__ui-predefined-text-list fv__ui-predefined-default-list">\r\n <dropdown-button\r\n @foreach="defaultText in predefinedTextDropdownCtrl.defaultPredefinedTextList"\r\n @sync.text="defaultText.content"\r\n @controller="fill-sign:AddPredefinedTextController"\r\n ></dropdown-button>\r\n </div>\r\n <div class="fv__ui-predefined-text-category" @if="predefinedTextDropdownCtrl.customPredefinedTextList&&predefinedTextDropdownCtrl.customPredefinedTextList.length"><text>toolbar.category.Custom</text></div>\r\n <div class="fv__ui-predefined-text-list fv__ui-predefined-custom-list">\r\n <dropdown-button\r\n @foreach="customText in predefinedTextDropdownCtrl.customPredefinedTextList"\r\n @sync.text="customText.content"\r\n @controller="fill-sign:AddPredefinedTextController"\r\n ></dropdown-button>\r\n </div>\r\n <div class="fv__ui-predefined-text-footer">\r\n <xbutton\r\n class="fv__ui-set-predefined-text-content"\r\n text="toolbar.buttons.setPredefinedText"\r\n name="set-predefined-text"\r\n @on.click="predefinedTextDropdownCtrl.component.showPredefinedDialog()"\r\n ></xbutton>\r\n </div>\r\n</dropdown>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"check-activates"},t.prototype.init=function(t){var n=this;e.prototype.init.call(this,t);var i=t.getPDFUI();i.getPDFViewer().then((function(e){n.addDestroyHook(i.addViewerEventListener(r.PDFViewCtrl.Events.activeElementChanged,(function(){e.getAllActivatedElements().some((function(e){return e.graphicsObject&&1===e.graphicsObject.info.type}))?t.deactive():t.active()})))}))},t}(r.Directive);t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)),o=c(n(94));n(95);var a=c(n(96));function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=i.PDFViewCtrl,d=l.DeviceInfo.isMobile,p=l.ViewerEvents,f=function(e){function t(){return u(this,t),s(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"graphic-object-properties-dialog"},t.services=function(){return{graphicsObjectService:a.default}},t.prototype.init=function(){e.prototype.init.call(this),this.properties={},this.digest()},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.getPDFUI(),i=this.graphicsObjectService;this.addDestroyHook(n.addViewerEventListener(p.activeElementChanged,(function(){t.isVisible&&t.updateActivatedElements()})),this.watch("$component.properties.fillColor",(function(e){var n="string"==typeof e?e:"transparent";t.fillColorMaskElement.style.backgroundColor=n,"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyFillColorChange(e,t)}))})),this.watch("$component.properties.borderColor",(function(e){var n="string"==typeof e?e:"transparent";t.borderColorMaskElement.style.backgroundColor=n,"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderColorChange(e,t)}))})),this.watch("$component.properties.opacity",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyOpacityChange(e/100,t)}))})),this.watch("$component.properties.borderWidth",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderWidthChange(e,t)}))})),this.watch("$component.properties.borderStyle",(function(e){"object"!==(void 0===e?"undefined":r(e))&&t.forEachGraphicObject((function(t){i.applyBorderStyleChange(e,t)}))})))},t.prototype.forEachGraphicObject=function(e){return this.getPDFUI().getAllActivatedElements().then((function(t){t.forEach((function(t){t.graphicsObject&&e(t)}))}))},t.prototype.showAt=function(t,n){e.prototype.show.call(this),this.updateActivatedElements(),d||this.resetPosition(t,n)},t.prototype.resetPosition=function(e,t){var n=this.getRoot().element,r=this.element,i=r.offsetWidth,o=r.offsetHeight;e+i>n.offsetWidth?r.style.left=n.offsetWidth-i+"px":r.style.left=e+"px",t+o>n.offsetHeight?r.style.top=n.offsetHeight-o+"px":r.style.top=t+"px"},t.prototype.updateActivatedElements=function(){var e=this;this.getPDFUI().getAllActivatedElements().then((function(t){var n=e.graphicsObjectService.getMergedPropertiesOfActivateElements(t);e.correctPropertyKeys=Object.keys(n),e.properties=n,e.digest(),e.updateUIByProperties(n)}))},t.prototype.updateUIByProperties=function(e){this.updateBorderWidthUI(e),this.updateBorderStyleUI(e),this.updateBorderColorUI(e),this.updateFillColorUI(e),this.updateOpacityUI(e)},t.prototype.updateBorderWidthUI=function(e){"borderWidth"in e?(this.borderWidthFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderWidth")||(this.borderWidthElement.element.value="")):this.borderWidthFieldset.hide()},t.prototype.updateBorderStyleUI=function(e){"borderStyle"in e?(this.borderStyleFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderStyle")?this.borderStyleChoice.setValue(e.borderStyle):this.borderStyleChoice.element.querySelector(".fv__ui-select-lable").className="fv__ui-select-lable"):this.borderStyleFieldset.hide()},t.prototype.updateBorderColorUI=function(e){"borderColor"in e?(this.borderColorFieldset.show(),this.graphicsObjectService.isAllSame(e,"borderColor")||(this.borderColorMaskElement.style.backgroundColor="transparent")):this.borderColorFieldset.hide()},t.prototype.updateFillColorUI=function(e){"fillColor"in e?(this.fillColorFieldset.show(),this.graphicsObjectService.isAllSame(e,"fillColor")||(this.fillColorMaskElement.style.backgroundColor="transparent")):this.fillColorFieldset.hide()},t.prototype.updateOpacityUI=function(e){"opacity"in e?(this.opacityInputFieldset.show(),this.opacitySlider.show(),this.graphicsObjectService.isAllSame(e,"opacity")||(this.opacityInput.element.value="")):(this.opacityInputFieldset.hide(),this.opacitySlider.hide())},t.prototype.toggleLock=function(e){e?this.appearanceTabBody.lock():this.appearanceTabBody.unlock()},t.prototype.borderStyleChanged=function(e){this.properties.borderStyle=e,this.digest()},t.prototype.showColorPicker=function(e,t){var n=this,i=this.getPDFUI().colorSpectrum;switch(e){case"fillColor":var o=this.properties.fillColor;"object"===(void 0===o?"undefined":r(o))&&(o=0),i.showTransparent(!0).setDefaultColor(o),i.show(t.element,(function(e){n.properties.fillColor=e,n.digest()}));break;case"borderColor":var a=this.properties.borderColor;"object"===(void 0===a?"undefined":r(a))&&(a=0),i.showTransparent(!0).setDefaultColor(a),i.show(t.element,(function(e){n.properties.borderColor=e,n.digest()}))}},t}(i.SeniorComponentFactory.createSuperClass({template:(0,o.default)(),fragments:[{target:"graphics-property-borderStyle",config:{iconclass:"fv__ui-property-icon-border-style",noOptionLable:!0,selectorClass:"fv__ui-border-style-selector",options:Array(7).fill(0).map((function(e,t){return{value:t,class:"fv__ui-line-style-"+t}}))}}]}));t.default=f},function(e,t,n){n(11),e.exports=function(e){"use strict";return e=e||{},'<layer class="fv__ui-annot-properties-dialog fv__ui-graphics-object-properties-dialog" @var.dialog="$component" @isolate>\r\n <layer-header\r\n title="ega:graphics-properties.dialog.title"\r\n @draggable="{type: \'parent\'}">\r\n </layer-header>\r\n <layer-view class="body">\r\n <div class="tabPanel">\r\n <gtab\r\n group="graphics-properties-dialog-tab"\r\n body="graphics-properties-dialog-appearance-tab-body"\r\n text="sidebar.layers.importDialog.appearance"\r\n active\r\n ></gtab>\r\n </div>\r\n <div\r\n name="graphics-properties-dialog-appearance-tab-body"\r\n class="tabBody annot-properties-dialog-body"\r\n @init="dialog.appearanceTabBody=$component"\r\n >\r\n <div class="input-component borderWidth" @init="dialog.borderWidthFieldset = $component">\r\n <span>dialog.actionDialog.appearance.thickness</span>\r\n <number\r\n min="0" max="12" step="1" \r\n @aria:labelledby="::previousSiblings()"\r\n @model="dialog.properties.borderWidth"\r\n @init="dialog.borderWidthElement = $component"\r\n ></number>\r\n </div>\r\n <div class="input-component borderStyle" @init="dialog.borderStyleFieldset = $component">\r\n <span>annotPropertiesDialog.borderStyle</span>\r\n <choice\r\n class="fv__property-component"\r\n name="graphics-property-borderStyle"\r\n @aria:labelledby="::previousSiblings()"\r\n @on.change="dialog.borderStyleChanged($component.getValue())"\r\n @init="dialog.borderStyleChoice = $component"\r\n ></choice>\r\n </div>\r\n <div class="input-component fillColor" @init="dialog.fillColorFieldset = $component">\r\n <span>dialog.formPropertiesDialog.appearance.fillColor</span>\r\n <button class="color-picker" @aria:labelledby="::previousSiblings()" @on.native.click="dialog.showColorPicker(\'fillColor\',$component, $event)">\r\n <div>\r\n <div class="label">?</div>\r\n <div class="mask" @init="dialog.fillColorMaskElement = $component.element"></div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class="input-component color" @init="dialog.borderColorFieldset = $component">\r\n <span>dialog.actionDialog.appearance.color</span>\r\n <button class="color-picker" @aria:labelledby="::previousSiblings()" @on.native.click="dialog.showColorPicker(\'borderColor\',$component, $event)">\r\n <div>\r\n <div class="label">?</div>\r\n <div class="mask" @init="dialog.borderColorMaskElement = $component.element"></div>\r\n </div>\r\n </button>\r\n </div>\r\n <div class="input-component opacity" @init="dialog.opacityInputFieldset = $component">\r\n <span>sidebar.layers.importDialog.opacity</span>\r\n <number\r\n min="0" max="100" step="1"\r\n @aria:labelledby="::previousSiblings()"\r\n @model="dialog.properties.opacity"\r\n @init="dialog.opacityInput = $component"\r\n ></number>\r\n <label>%</label>\r\n </div>\r\n <slider\r\n class="fv__property-component opacity-slider"\r\n unit=\'%\'\r\n max="100"\r\n min="0"\r\n step="1"\r\n @model="dialog.properties.opacity"\r\n name="annot-property-opacitySlider"\r\n @stop-drag\r\n hideinput="true"\r\n @aria:labelledby="::previousSiblings()::childAt(0)"\r\n @init="dialog.opacitySlider = $component"\r\n ></slider>\r\n </div>\r\n </layer-view>\r\n <div class="footer">\r\n <div class="fv__left-buttons">\r\n <checkbox \r\n @cannotBeDisabled\r\n text="sidebar.layers.properties.locked"\r\n @on.change="dialog.toggleLock($component.getValue())"\r\n ></checkbox>\r\n </div>\r\n <xbutton\r\n text="dialog.close"\r\n class="fv__ui-dialog-button fv__ui-dialog-ok-button fv__ui-annot-property-close"\r\n @on.click="dialog.hide()"\r\n @cannotBeDisabled\r\n ></xbutton>\r\n </div>\r\n</layer>\r\n'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1)).PDFViewCtrl.shared.colorConvertor,i={},o=[[],[2,2,2,2],[3,3,3,3],[4,4,4,4],[4,3,2,3],[8,4,4,4],[4,3,16,3]],a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getMergedPropertiesOfActivateElements=function(e){var t=this,n=e.filter((function(e){return!!e.graphicsObject})).map((function(e){switch(e.graphicsObject.info.type){case 3:return t.exportImageProperties(e);case 2:return t.exportPathProperties(e)}})).filter(Boolean);return this.mergeAllProperties(n)},e.prototype.mergeAllProperties=function(e){if(0===e.length)return{};var t=e.map((function(e){return Object.keys(e)}));return t.sort((function(e,t){return e.length>t.length?1:-1})),t[0].reduce((function(t,n){return t[n]=function(t){var n=e[0][t];return e.slice(1).some((function(e){return e[t]!==n}))?i:n}(n),t}),{})},e.prototype.exportImageProperties=function(e){return{opacity:100*e.getPropertyOptions().opacity}},e.prototype.exportPathProperties=function(e){var t=e.graphicsObject,n=e.getPropertyOptions(),i=n.color,o=n.opacity,a=n.fillColor;return{borderWidth:n.borderWidth,borderStyle:function(e){var t=e.getBorderStyle(),n=0,r=e.getBorderDashes();if(1==t&&r.length>0){var i=Math.max.apply(Math,r),o=Math.min.apply(Math,r);n=o==i?o>3?3:o>2?2:o<2||2==o?1:3:i>8?6:i>4?5:4}return n}(t),borderColor:i,fillColor:0===a?0:r(a,"#"),opacity:100*o}},e.prototype.applyOpacityChange=function(e,t){e!==t.graphicsObject.getOpacity()&&t.setOpacity(e)},e.prototype.applyBorderWidthChange=function(e,t){e!==t.graphicsObject.getBorderWidth()&&t.setBorderWidth(e)},e.prototype.applyBorderColorChange=function(e,t){var n=0===e?0:r(e,"int");n!==t.graphicsObject.getBorderColor()&&t.setColor(n)},e.prototype.applyFillColorChange=function(e,t){var n=0==e?0:r(e,"int");n!==t.graphicsObject.getFillColor()&&t.setFillColor(n)},e.prototype.applyBorderStyleChange=function(e,t){var n,r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}([0===(n=e)?0:1,o[n]],2),i=r[0],a=r[1];t.setBorderStyle(i,a)},e.prototype.isAllSame=function(e,t){return e[t]!==i},e}();t.default=a},function(e,t,n){"use strict";n.r(t);var r=n(8),i=function(){function e(e){Object(r.assertThat)(Array.isArray(e),"Illegal Matrix values, it should be an array! But actual: "+e),Object(r.assertThat)(16===e.length,"Incorrect matrix values size, it must be 16!"),this.values=e,this.cols=Math.sqrt(e.length)}return e.prototype.multiVec4=function(e,t,n,r){return void 0===r&&(r=1),[this.getAt(0,0)*e+this.getAt(0,1)*t+this.getAt(0,2)*n+this.getAt(0,3)*r,this.getAt(1,0)*e+this.getAt(1,1)*t+this.getAt(1,2)*n+this.getAt(1,3)*r,this.getAt(2,0)*e+this.getAt(2,1)*t+this.getAt(2,2)*n+this.getAt(2,3)*r,this.getAt(3,0)*e+this.getAt(3,1)*t+this.getAt(3,2)*n+this.getAt(3,3)*r]},e.prototype.getAt=function(e,t){var n=e*this.cols+t;return Object(r.assertThat)(n<this.values.length,"Cannot access value at ("+e+","+t+"), it out bound of this matrix!"),this.values[n]},e}(),o=function(){function e(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=1),this.a=e,this.b=t,this.c=n,this.d=r}return e.prototype.transform=function(t){var n=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t.multiVec4(this.a,this.b,this.c,this.d),4);return new e(n[0],n[1],n[2],n[3])},e.prototype.scale=function(e,t,n){return void 0===t&&(t=e),void 0===n&&(n=t),this.transform(function(e,t,n){return void 0===t&&(t=e),void 0===n&&(n=t),new i([e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1])}(e,t,n))},e.prototype.rotateZ=function(e){return this.transform(function(e){void 0===e&&(e=0);var t=e/180*Math.PI,n=Math.cos(t),r=Math.sin(t);return new i([n,r,0,0,-r,n,0,0,0,0,1,0,0,0,0,1])}(e))},e.prototype.translate=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),this.transform(function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),new i([1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1])}(e,t,n))},e}();t.default=o}]).default)},function(module,exports,__webpack_require__){var t;self,t=function(__WEBPACK_EXTERNAL_MODULE__5__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.StateNameFieldTypeMap=t.StateNameAnnotTypeMap=t.STATE_HANDLER_CREATE_ARTICLE_BUTTON=t.STATE_HANDLER_CREATE_RADIO_BUTTON=t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON=t.STATE_HANDLER_CREATE_FIELD_SIGNATURE=t.STATE_HANDLER_CREATE_FIELD_TEXT=t.STATE_HANDLER_CREATE_CROP_PAGES=t.STATE_HANDLER_SNAPSHOT_TOOL=t.STATE_HANDLER_CREATE_FREETEXT_BOX=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT=t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER=t.STATE_HANDLER_SELECT_ANNOTATION=t.STATE_HANDLER_SELECT_TEXT_IMAGE=t.STATE_HANDLER_SELECT_TEXT_ANNOTATION=t.STATE_HANDLER_LOUPE=t.STATE_HANDLER_ERASER=t.STATE_HANDLER_MARQUEE=t.STATE_HANDLER_CREATE_UNDERLINE=t.STATE_HANDLER_CREATE_TEXT=t.STATE_HANDLER_CREATE_STRIKE_OUT=t.STATE_HANDLER_CREATE_STAMP=t.STATE_HANDLER_CREATE_SQUIGGLY=t.STATE_HANDLER_CREATE_SQUARE_CROP=t.STATE_HANDLER_CREATE_SQUARE=t.STATE_HANDLER_CREATE_REPLACE=t.STATE_HANDLER_CREATE_POLYLINE=t.STATE_HANDLER_CREATE_POLYGON=t.STATE_HANDLER_CREATE_POLYGON_CLOUD=t.STATE_HANDLER_CREATE_PENCIL=t.STATE_HANDLER_CREATE_CIRCLE_AREA=t.STATE_HANDLER_CREATE_AREA=t.STATE_HANDLER_CREATE_PERIMETER=t.STATE_HANDLER_CREATE_DISTANCE=t.STATE_HANDLER_CREATE_LINE=t.STATE_HANDLER_CREATE_LINK=t.STATE_HANDLER_CREATE_EDIT_IMAGE=t.STATE_HANDLER_CREATE_IMAGE=t.STATE_HANDLER_CREATE_HIGHLIGHT=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT=t.STATE_HANDLER_CREATE_CIRCLE=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT=t.STATE_HANDLER_CREATE_ARROW=t.STATE_HANDLER_CREATE_CARET=t.STATE_HANDLER_CHECK_THE_SEARCH=t.STATE_HANDLER_HAND=void 0;var i=n(14);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.STATE_HANDLER_HAND="hand",t.STATE_HANDLER_CHECK_THE_SEARCH="checkTheSearch";var a=t.STATE_HANDLER_CREATE_CARET="createCaret",c=t.STATE_HANDLER_CREATE_ARROW="createArrow",u=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT="createAreaHighlight",s=t.STATE_HANDLER_CREATE_CIRCLE="createCircle",l=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT="createFileAttachment",d=t.STATE_HANDLER_CREATE_HIGHLIGHT="createHighlight",p=t.STATE_HANDLER_CREATE_IMAGE="createImage",f=(t.STATE_HANDLER_CREATE_EDIT_IMAGE="createEditImage",t.STATE_HANDLER_CREATE_LINK="createLink"),g=t.STATE_HANDLER_CREATE_LINE="createLine",h=t.STATE_HANDLER_CREATE_DISTANCE="createDistance",M=t.STATE_HANDLER_CREATE_PERIMETER="createPerimeter",m=t.STATE_HANDLER_CREATE_AREA="createArea",y=t.STATE_HANDLER_CREATE_CIRCLE_AREA="createCircleArea",v=t.STATE_HANDLER_CREATE_PENCIL="createPencil",b=t.STATE_HANDLER_CREATE_POLYGON_CLOUD="createPolygonCloud",D=t.STATE_HANDLER_CREATE_POLYGON="createPolygon",A=t.STATE_HANDLER_CREATE_POLYLINE="createPolyline",N=t.STATE_HANDLER_CREATE_REPLACE="createReplace",I=t.STATE_HANDLER_CREATE_SQUARE="createSquare",j=(t.STATE_HANDLER_CREATE_SQUARE_CROP="createSquareCrop",t.STATE_HANDLER_CREATE_SQUIGGLY="createSquiggly"),T=t.STATE_HANDLER_CREATE_STAMP="createStamp",w=t.STATE_HANDLER_CREATE_STRIKE_OUT="createStrikeOut",x=t.STATE_HANDLER_CREATE_TEXT="createText",O=t.STATE_HANDLER_CREATE_UNDERLINE="createUnderline",E=(t.STATE_HANDLER_MARQUEE="marquee",t.STATE_HANDLER_ERASER="eraser",t.STATE_HANDLER_LOUPE="loupe",t.STATE_HANDLER_SELECT_TEXT_ANNOTATION="select-text-annotation",t.STATE_HANDLER_SELECT_TEXT_IMAGE="select-text-image",t.STATE_HANDLER_SELECT_ANNOTATION="select-annotation",t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER="CreateFreeTextTypewriterHandler"),_=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT="createFreeTextCallout",k=t.STATE_HANDLER_CREATE_FREETEXT_BOX="createFreeTextBox",z=(t.STATE_HANDLER_SNAPSHOT_TOOL="snapshot-tool",t.STATE_HANDLER_CREATE_CROP_PAGES="create-crop-pages",t.STATE_HANDLER_CREATE_FIELD_TEXT="CreateTextFieldHandler",t.STATE_HANDLER_CREATE_FIELD_SIGNATURE="CreateSignatureFieldHandler",t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON="CreatePushButtonFieldHandler",t.STATE_HANDLER_CREATE_RADIO_BUTTON="CreateRadioButtonStateHandler",t.STATE_HANDLER_CREATE_ARTICLE_BUTTON="CreateArticleButtonStateHandler",o(r={},x,"text"),o(r,d,"highlight"),o(r,w,"strikeout"),o(r,O,"underline"),o(r,j,"squiggly"),o(r,N,"strikeout"),o(r,a,"caret"),o(r,E,"freetext"),o(r,_,"freetext"),o(r,k,"freetext"),o(r,I,"square"),o(r,s,"circle"),o(r,g,"line"),o(r,c,"line"),o(r,D,"polygon"),o(r,A,"polyline"),o(r,b,"polygon"),o(r,u,"highlight"),o(r,v,"ink"),o(r,T,"stamp"),o(r,h,"line"),o(r,M,"polyline"),o(r,m,"polygon"),o(r,y,"circle"),o(r,l,"fileattachment"),o(r,p,"screen"),o(r,f,"link"),o(r,"create-multi-media-state","screen"),o(r,"create-redaction-text-image-state","redact"),o(r,"create-redaction-state","redact"),r),C={CreatePushButtonStateHandler:i.FieldType.PushButton,CreateCheckBoxStateHandler:i.FieldType.CheckBox,CreateRadioButtonStateHandler:i.FieldType.RadioButton,CreateComboBoxStateHandler:i.FieldType.ComboBox,CreateListBoxStateHandler:i.FieldType.ListBox,CreateTextStateHandler:i.FieldType.Text,CreateSignStateHandler:i.FieldType.Sign,CreateDateStateHandler:i.FieldType.Text,CreateImageStateHandler:i.FieldType.PushButton};t.StateNameAnnotTypeMap=z,t.StateNameFieldTypeMap=C},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";n.r(t),n.d(t,"BuiltinCommand",(function(){return p})),n.d(t,"BuiltinShortcutContext",(function(){return f}));var r,i,o,a,c,u,s,l,d,p,f,g=n(0);!function(e){e.SELECT_ALL="builtin-command-select-all-annotations",e.CREATION_UNDO_LAST="builtin-command-creation-undo-last",e.DELETE_SELECTED_OBJECT="builtin-command-delete-selected-object",e.UNSELECT_OBJECT="builtin-command-unselect-object",e.UNDO_OPERATION="builtin-command-undo",e.REDO_OPERATION="builtin-command-redo",e.CANCEL_CREATING_ANNOTATION_OPERATION="builtin-command-cancel-creating-annotation",e.CLOSE_LAYER="builtin-command-close-closable-layer",e.ARROW_UP="builtin-command-arrow-up",e.ARROW_DOWN="builtin-command-arrow-down",e.ARROW_LEFT="builtin-command-arrow-left",e.ARROW_RIGHT="builtin-command-arrow-right",e.SWITCH_TO_HAND_STATE="builtin-command-switch-hand-state",e.COPY_ACTIVATE_ELEMENT="builtin-command-copy-activate-element",e.CUT_ACTIVATE_ELEMENT="builtin-command-cut-activate-element",e.ADD_BOOKMARK="builtin-command-add-bookmark",e.COPY_TEXT_IMAGE="builtin-command-copy-text-image",e.BLUR_EDITTING_TEXT_OBJECT="builtin-command-blur-editting-text-object",e.ALIGNMENT_REDUCE_WIDTH="builtin-command-alignment-reduce-width",e.ALIGNMENT_RAISE_WIDTH="builtin-command-alignment-raise-width",e.ALIGNMENT_REDUCE_HEIGHT="builtin-command-alignment-reduce-height",e.ALIGNMENT_RAISE_HEIGHT="builtin-command-alignment-raise-height",e.ALIGNMENT_REDUCE_STEP_WIDTH="builtin-command-alignment-reduce-step-width",e.ALIGNMENT_RAISE_STEP_WIDTH="builtin-command-alignment-raise-step-width",e.ALIGNMENT_REDUCE_STEP_HEIGHT="builtin-command-alignment-reduce-step-height",e.ALIGNMENT_RAISE_STEP_HEIGHT="builtin-command-alignment-raise-step-height",e.TAB_NEXT_OPERATION="builtin-command-tab-next",e.TAB_PREVIOUS_OPERATION="builtin-command-tab-previous",e.DELETE_ATTACHMENT="builtin-command-delete-attachment",e.JUMP_TO_NEXT_PAGE="builtin-command-jump-to-next-page",e.JUMP_TO_PREVIOUS_PAGE="builtin-command-jump-to-previsous-page"}(p||(p={})),function(e){e.GLOBAL="builtin-shortcut-context-global",e.SELECTION="builtin-shortcut-context-selection",e.BASIC_STATE_HANDLER="builtin-shortcut-context-state-hander",e.ANNOTATION_PROPERTIES="builtin-shortcut-context-annot-properties",e.ACTIVATION_ANY="builtin-shortcut-context-activation-any",e.ACTIVATION_ANNOTATION="builtin-shortcut-context-activation-annot",e.ACTIVATION_WIDGET="builtin-shortcut-context-activation-widget",e.ACTIVATION_GRAPH_OBJ="builtin-shortcut-context-activation-graph_obj",e.VIEWER="builtin-shortcut-context-viewer",e.CREATING_ANNOTATION="builtin-shortcut-context-creating-annotation",e.CLOSABLE_LAYER="builtin-shortcut-context-closable-layer",e.EDIT_TEXT_OBJECT="builtin-shortcut-context-edit-text-object"}(f||(f={})),t.default=[{context:f.GLOBAL,topLayers:[],extends:[],shortcuts:{}},{context:f.CLOSABLE_LAYER,topLayers:[f.GLOBAL],extends:[],shortcuts:(r={},r[p.CLOSE_LAYER]="Escape",r)},{context:f.VIEWER,topLayers:[f.GLOBAL],extends:[],shortcuts:(i={},i[p.UNDO_OPERATION]="Mod+Z",i[p.REDO_OPERATION]="Mod+Y",i[p.ADD_BOOKMARK]="Mod+B",i[p.DELETE_ATTACHMENT]="Delete",i[p.JUMP_TO_PREVIOUS_PAGE]="LeftArrow",i[p.JUMP_TO_NEXT_PAGE]="RightArrow",i[p.ARROW_UP]="UpArrow",i[p.ARROW_DOWN]="DownArrow",i)},{context:f.EDIT_TEXT_OBJECT,topLayers:[f.GLOBAL],extends:[],shortcuts:(o={},o[p.BLUR_EDITTING_TEXT_OBJECT]="Escape",o)},{context:f.CREATING_ANNOTATION,topLayers:[f.VIEWER],extends:[],shortcuts:(a={},a[p.CANCEL_CREATING_ANNOTATION_OPERATION]="Escape",a)},{context:f.SELECTION,topLayers:[],extends:[],shortcuts:(c={},c[p.SELECT_ALL]="Mod+A",c)},{context:f.ACTIVATION_ANY,topLayers:[f.VIEWER],extends:[f.SELECTION],shortcuts:(u={},u[p.DELETE_SELECTED_OBJECT]="Delete",u[p.UNSELECT_OBJECT]="Escape",u[p.COPY_ACTIVATE_ELEMENT]="Mod+C",u[p.CUT_ACTIVATE_ELEMENT]="Mod+X",u)},{context:f.ACTIVATION_ANNOTATION,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.ACTIVATION_WIDGET,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:(s={},s[p.ALIGNMENT_REDUCE_WIDTH]="Mod+LeftArrow",s[p.ALIGNMENT_RAISE_WIDTH]="Mod+RightArrow",s[p.ALIGNMENT_REDUCE_HEIGHT]="Mod+UpArrow",s[p.ALIGNMENT_RAISE_HEIGHT]="Mod+DownArrow",s[p.ALIGNMENT_REDUCE_STEP_WIDTH]="Mod+Shift+LeftArrow",s[p.ALIGNMENT_RAISE_STEP_WIDTH]="Mod+Shift+RightArrow",s[p.ALIGNMENT_REDUCE_STEP_HEIGHT]="Mod+Shift+UpArrow",s[p.ALIGNMENT_RAISE_STEP_HEIGHT]="Mod+Shift+DownArrow",s)},{context:f.ACTIVATION_GRAPH_OBJ,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.BASIC_STATE_HANDLER,topLayers:[f.VIEWER],extends:[],shortcuts:(l={},l[p.SWITCH_TO_HAND_STATE]="Escape",l)},{context:g.STATE_HANDLER_CREATE_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_HAND,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STRIKE_OUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_UNDERLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUIGGLY,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_REPLACE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CARET,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_CALLOUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_BOX,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUARE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_ARROW,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON_CLOUD,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PENCIL,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STAMP,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_DISTANCE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PERIMETER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FILE_ATTACHMENT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINK,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-multi-media-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-text-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreatePushButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateCheckBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateRadioButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateComboBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateListBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateTextStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateSignStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateDateStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateImageStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CHECK_THE_SEARCH,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_EDIT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_MARQUEE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_ERASER,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_LOUPE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:(d={},d[p.COPY_TEXT_IMAGE]="Mod+C",d[p.ADD_BOOKMARK]="Mod+B",d)},{context:g.STATE_HANDLER_SELECT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SNAPSHOT_TOOL,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_SIGNATURE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_RADIO_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}}]},function(e,t,n){"use strict";function r(e){return function(t,n){if(e.indexOf(t.command))return n(t)}}function i(e){return function(t,n){if(-1===e.indexOf(t.command))return n(t)}}function o(e,t){if(!(e&&e instanceof Element))return!1;var n=t||{},r=n.visible,i=void 0===r||r,o=n.enable,a=void 0===o||o,c=n.readonly,u=void 0===c||c;if(i){var s=e.getClientRects();if(0===s.length)return!1;var l=s[0];if(l.width*l.height==0)return!1}switch(e.tagName.toLowerCase()){case"input":case"select":case"textarea":var d=e;return!(a&&d.disabled||u&&(d.disabled||d.readOnly))}switch(e.contentEditable){case"true":case"plaintext-only":return!0}return!1}function a(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(n,r){t.length>0&&t.indexOf(n.command)>-1?r(n):o(n.native.target,e)||r(n)}}function c(e){return function(t,n){e&&t.command!==e||t.preventDefault(),n(t)}}function u(e,t){return void 0===t&&(t=!1),function(n,r){var i;i=t?function(e){return e===document.activeElement||e.contains(document.activeElement)}:function(e){return e===document.activeElement},e.find(i)&&r(n)}}n.r(t),n.d(t,"includeCommandInterceptor",(function(){return r})),n.d(t,"excludeCommandInterceptor",(function(){return i})),n.d(t,"excludeEditableElementInterceptor",(function(){return a})),n.d(t,"preventDefaultInterceptor",(function(){return c})),n.d(t,"focusNeedBeOn",(function(){return u}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={fieldAdded:"fieldAdded",fieldActivated:"fieldActivated",fieldDeativated:"fieldDeativated",fieldFontSizeChanged:"fieldFontSizeChanged",filedRemove:"filedRemove"};var r=t.g_csMoneyFormat=["$"," DM","€","fl"," F"," kr","Lit. "," Pts","£","$A. ","$NZ. ","Руб ","ESC. ","HK$ ","P. ","RMB¥","NT$ ","S.$ ","W","¥","zł","SEK ","kr ","C$ "];t.g_csDateFormat=["m/d","m/d/yy","m/d/yyyy","mm/dd/yy","mm/dd/yyyy","mm/yy","mm/yyyy","d-mmm","d-mmm-yy","d-mmm-yyyy","dd-mmm-yy","dd-mmm-yyyy","yy-mm-dd","yyyy-mm-dd","mmm-yy","mmm-yyyy","mmmm-yy","mmmm-yyyy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yyyy h:MM tt","m/d/yy HH:MM","m/d/yyyy HH:MM","Custom"],t.g_csTimeFormat=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt","Custom"],t.g_csSpecialFormat=["zipCode","zipCode4","phoneNumber","socialSecurityNumber","arbitraryMask"],t.CFD_Utils=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.GetSeperatorString=function(e,t){var n=""+e,r=n.length;return r>3?0==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+"."+n.substr(r-3):1==t?this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+","+n.substr(r-3):this.GetSeperatorString(parseInt(n.substr(0,r-3)),t)+" "+n.substr(r-3):n},e.GetSampNumberFormat=function(e,t,n,r,i,o){var a="",c="",u=[];if(t>=0&&n>=0&&r>=0&&o>=0){var s="",l="",d=(c=""+e.toFixed(parseInt(t))).indexOf(".");d>0?(l=c.substr(0,d),s=c.substr(d)):(l=c,s="");var p="";for(0==n&&(p=this.GetSeperatorString(parseInt(l),1)+s),1==n&&(p=c),2==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),0)+s),3==n&&(p=(p=c).replace(".",",")),4==n&&(s=s.replace(".",","),p=this.GetSeperatorString(parseInt(l),2)+s);;){if(0==i){a="$";break}if(1==i){a="DM";break}if(2==i){a="€";break}if(3==i){a="f";break}if(4==i){a="F";break}if(5==i){a="kr";break}if(6==i){a="Lit.";break}if(7==i){a="Pts";break}if(8==i){u[0]=163,a=String.fromCharCode.apply(String,u);break}if(9==i){a="$A.";break}if(10==i){a="$NZ.";break}if(11==i){u[0]=1056,u[1]=1091,u[2]=1073,a=String.fromCharCode.apply(String,u);break}if(12==i){a="ESC.";break}if(13==i){a="HK$";break}if(14==i){a="P.";break}if(15==i){u[0]=65509,a=String.fromCharCode.apply(String,u);break}if(16==i){a="NT$";break}if(17==i){a="S.$";break}if(18==i){u[0]=8361,a=String.fromCharCode.apply(String,u);break}if(19==i){u[0]=165,a=String.fromCharCode.apply(String,u);break}if(20==i){u[0]=122,u[1]=322,a=String.fromCharCode.apply(String,u);break}if(21==i){a="SEK";break}if(22==i){a="kr";break}if(23==i){u[0]=67,u[1]=36,a=String.fromCharCode.apply(String,u);break}if(i>23||i<0)break}c=2&r?0==o?"("+p+" "+a+")":"("+a+p+")":0==o?p+a:a+p}return c},e.GetSampPercentFormat=function(e,t,n){var r="";if(t>=0&&n>=0){r=""+(100*e).toFixed(parseInt(t));var i="",o="",a=(r+="%").indexOf(".");a>0?(o=r.substr(0,a),i=r.substr(a)):(o=r,i="");var c="";0==n&&(c=this.GetSeperatorString(parseInt(o),1)+i),1==n&&(c=r),2==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),0)+i),3==n&&(c=(c=r).replace(".",",")),4==n&&(i=i.replace(".",","),c=this.GetSeperatorString(parseInt(o),2)+i),r=c}return r},e.GetFormatStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Format")?1:0==e.indexOf("AFPercent_Format")?2:0==e.indexOf("AFDate_FormatEx")?3:0==e.indexOf("AFTime_Format")?4:0==e.indexOf("AFSpecial_Format")?5:-1:0},e.GetKeystrokeStringType=function(e){return e&&""!=e?0==e.indexOf("AFNumber_Keystroke")?1:0==e.indexOf("AFPercent_Keystroke")?2:0==e.indexOf("AFDate_KeystrokeEx")?3:0==e.indexOf("AFTime_Keystroke")?4:0==e.indexOf("AFSpecial_Keystroke")?5:-1:0},e.GetPercentageValues=function(e){var t,n=-1,r=e.length,i=e.indexOf("("),o=r-i-3,a=e.substr(i+1,o),c=a.split(","),u=a[0];t=Number(u);for(var s=0;s<c.length&&!(++s>=2)&&""!=(u=c[s]);)1==s&&(n=Number(u));return{iDec:t,iSep:n}},e.StringFromUnicode=function(e){for(var t=!1,n="0x",r="",i=0;i<e.length;i++){var o=e[i];"\\"==e[i]&&i+1<e.length&&("u"==e[i+1]||"U"==e[i+1])?(i+=1,t&&(r+=String.fromCharCode(n),n="0x"),t=!0):t?n+=o:(r+=o,t=!1)}return t&&(r+=String.fromCharCode(n)),r},e.GetNumberValues=function(e){var t,n=1,i=-1,o=-1,a=-1,c=-1,u=e.length,s=e.indexOf("("),l=u-s-3,d=e.substr(s+1,l).split(",");t=Number(d[0]);for(var p=0;p<d.length&&!(++p>=6);){var f=d[p];if(""==f)break;if(1!=p)if(2!=p)if(3!=p)if(4!=p)5==p&&(c=f.indexOf("false")>=0?0:1);else{var g=f;if(""==g){a=-1;continue}g=(g=(g=(g=g.replace(/"/g,"")).replace(/'/g,"")).replace("\\u0020"," ")).trim(),g=this.StringFromUnicode(g);for(var h=0;h<24;h++){var M=r[h];if(g==(M=(M=M.replace(" "," ")).trim())){a=h;break}}h>23&&(a=-1)}else o=0;else{var m=Number(f);0!=m&&1!=m&&2!=m&&3!=m||(i=m)}else n=Number(f)}return{iDec:t,iSep:n,iNeg:i,iDef:o,iMoney:a,iPre:c}},e.GetRangeValues=function(e){for(var t=!1,n=!1,r="",i="",o=e.indexOf("("),a=e.indexOf(")"),c=void 0,u=e.substr(o+1,a-o-1).split(","),s=0;s<u.length;)c=(c=u[s]).trim(),0==s||2==s?"true"==c.toLowerCase()?0==s?t=!0:n=!0:0==s?t=!1:n=!1:1!=s&&3!=s||(1==s?r=c:i=c),s++;return{bFrom:t,bTo:n,csiFrom:r,csiTo:i}},e}()},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NameTreeType=t.PosType=t.FillSignType=t.MK_Properties=t.Graphics_ObjectType=t.Graphics_FillMode=t.Font_CIDCharset=t.Font_Charset=t.Font_Styles=t.Font_StandardID=t.Text_Mode=t.Box_Type=t.Calc_Margin_Mode=t.Action_Trigger=t.Signature_Ap_Flags=t.Signature_State=t.Error_Code=t.Font_Descriptor_Flags=t.page_Number_Format=t.date_Format=t.Rendering_Usage=t.Rendering_Content=t.Range_Filter=t.Saving_Flag=t.Search_Flag=t.Rotation_Degree=t.Rotation=t.Standard_Font=t.Watermark_Flag=t.Position=t.Flatten_Option=t.File_Type=t.Relationship=t.Highlight_Mode=t.Action_Type=t.Point_Type=t.Alignment=t.Ending_Style=t.Note_Icon=t.FileAttachment_Icon=t.Border_Style=t.Font_Style=t.Additional_Permission=void 0;var r,i=(r=n(37))&&r.__esModule?r:{default:r};t.Additional_Permission={download:1},t.Font_Style={normal:0,italic:1,bold:2},t.Border_Style={solid:0,dashed:1,underline:2,beveled:3,inset:4,cloudy:5},t.FileAttachment_Icon={graph:"Graph",pushPin:"PushPin",paperclip:"Paperclip",tag:"Tag"},t.Note_Icon={Check:"Check",Circle:"Circle",Comment:"Comment",Cross:"Cross",Help:"Help",Insert:"Insert",Key:"Key",NewParagraph:"NewParagraph",Note:"Note",Paragraph:"Paragraph",RightArrow:"RightArrow",RightPointer:"RightPointer",Star:"Star",UpArrow:"UpArrow",UpLeftArrow:"UpLeftArrow"},t.Ending_Style={None:0,Square:1,Circle:2,Diamond:3,OpenArrow:4,ClosedArrow:5,Butt:6,ReverseOpenArrow:7,ReverseClosedArrow:8,Slash:9},t.Alignment={left:0,center:1,right:2},t.Point_Type={moveTo:1,lineTo:2,lineToCloseFigure:3,bezierTo:4,bezierToCloseFigure:5},t.Action_Type={goto:"TypeGoto",launch:"TypeLaunch",uri:"TypeURI",named:"TypeNamed",thread:"TypeThread",submitForm:"TypeSubmitForm",resetForm:"TypeResetForm",javaScript:"TypeJavaScript",importData:"TypeImportData",hide:"TypeHide"},t.Highlight_Mode={none:0,invert:1,outline:2,push:3,toggle:4},t.Relationship={firstChild:0,lastChild:1,previousSibling:2,nextSibling:3,firstSibling:4,lastSibling:5},t.File_Type={fdf:0,xfdf:1,xml:2,csv:3,txt:4},t.Flatten_Option={all:0,field:1,annot:2},t.Position={topLeft:"TopLeft",topCenter:"TopCenter",topRight:"TopRight",centerLeft:"CenterLeft",center:"Center",centerRight:"CenterRight",bottomLeft:"BottomLeft",bottomCenter:"BottomCenter",bottomRight:"BottomRight"},t.Watermark_Flag={asContent:0,asAnnot:1,onTop:2,unprintable:4,display:8},t.Standard_Font={courier:0,courierBold:1,courierBoldOblique:2,courierOblique:3,helvetica:4,helveticaBold:5,helveticaBoldOblique:6,helveticaOblique:7,timesRoman:8,timesBold:9,timesBoldItalic:10,timesItalic:11,symbol:12,zapfDingbats:13},t.Rotation={rotation0:0,rotation1:1,rotation2:2,rotation3:3},t.Rotation_Degree={rotation0:0,rotation90:90,rotation180:180,rotation270:270},t.Search_Flag={caseSensitive:1,wholeWord:2,consecutively:4},t.Saving_Flag={normal:0,incremental:1,noOriginal:2,XRefStream:8,linearized:4096,removeRedundantObjects:16},t.Range_Filter={all:0,even:1,odd:2},t.Rendering_Content={page:"page",annot:"annot"},t.Rendering_Usage={print:"print",view:"view"},t.date_Format={MSlashD:0,MSlashDSlashYY:1,MSlashDSlashYYYY:2,MMSlashDDSlashYY:3,MMSlashDDSlashYYYY:4,DSlashMSlashYY:5,DSlashMSlashYYYY:6,DDSlashMMSlashYY:7,DDSlashMMSlashYYYY:8,MMSlashYY:9,MMSlashYYYY:10,MDotDDotYY:11,MDotDDotYYYY:12,MMDotDDDotYY:13,MMDotDDDotYYYY:14,MMDotYY:15,DDotMDotYYYY:16,DDDotMMDotYY:17,DDDotMMDotYYYY:18,YYHyphenMMHyphenDD:19,YYYYHyphenMMHyphenDD:20},t.page_Number_Format={default:0,numberOfCount:1,numberSlashCount:2,pageNumber:3,pageNumberOfCount:4},t.Font_Descriptor_Flags={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144},t.Error_Code=i.default,t.Signature_State={verifyChange:128,verifyIncredible:256,verifyNoChange:1024,stateVerifyIssueUnknown:2048,verifyIssueValid:4096,verifyIssueUnknown:8192,verifyIssueRevoke:16384,verifyIssueExpire:32768,verifyIssueUncheck:65536,verifyIssueCurrent:131072,verifyTimestampNone:262144,verifyTimestampDoc:524288,verifyTimestampValid:1048576,verifyTimestampInvalid:2097152,verifyTimestampExpire:4194304,verifyTimestampIssueUnknown:8388608,verifyTimestampIssueValid:16777216,verifyTimestampTimeBefore:33554432,verifyChangeLegal:134217728,verifyChangeIllegal:268435456},t.Signature_Ap_Flags={showTagImage:1,showLabel:2,showReason:4,showDate:8,showDistinguishName:16,showLocation:32,showSigner:64,showBitmap:128,showText:256},t.Action_Trigger={click:-1,keyStroke:7,format:8,validate:9,calculate:10,mouseEnter:11,mouseExit:12,mouseDown:13,mouseUp:14,onFocus:15,onBlur:16},t.Calc_Margin_Mode={CalcContentsBox:0,CalcDetection:1},t.Box_Type={MediaBox:0,CropBox:1,TrimBox:2,ArtBox:3,BleedBox:4},t.Text_Mode={Fill:0,Stroke:1,FillStroke:2,Invisible:3,FillClip:4,StrokeClip:5,FillStrokeClip:6,Clip:7},t.Font_StandardID={Courier:0,CourierB:1,CourierBI:2,CourierI:3,Helvetica:4,HelveticaB:5,HelveticaBI:6,HelveticaI:7,Times:8,TimesB:9,TimesBI:10,TimesI:11,Symbol:12,ZapfDingbats:13},t.Font_Styles={FixedPitch:1,Serif:2,Symbolic:4,Script:8,NonSymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,Bold:262144},t.Font_Charset={ANSI:0,Default:1,Symbol:2,Shift_JIS:128,Hangeul:129,GB2312:134,ChineseBig5:136,Thai:222,EastEurope:238,Russian:204,Greek:161,Turkish:162,Hebrew:177,Arabic:178,Baltic:186},t.Font_CIDCharset={Unknown:0,GB1:1,CNS1:2,JAPAN1:3,KOREA1:4,UNICODE:5},t.Graphics_FillMode={None:0,Alternate:1,Winding:2},t.Graphics_ObjectType={All:0,Text:1,Path:2,Image:3,Shading:4,FormXObject:5},t.MK_Properties={borderColor:"borderColor",fillColor:"fillColor",normalCaption:"normalCaption",downCaption:"downCaption",rolloverCaption:"rolloverCaption"},t.FillSignType={crossMark:1,checkMark:2,roundRectangle:3,line:4,dot:5},t.PosType={first:0,last:1,after:2,before:3},t.NameTreeType={Dests:1,JavaScript:2,EmbeddedFiles:3,Templates:4,Pages:5}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);Object.defineProperty(t,"MARKUP_ANNOTATION_STATE",{enumerable:!0,get:function(){return(e=r,e&&e.__esModule?e:{default:e}).default;var e}}),t.BORDER_STYLE={SOLID:0,DASHED:1,UNDERLINE:2,BEVELED:3,INSET:4,CLOUDY:5},t.POINT_TYPE={MOVE_TO:1,LINE_TO:2,LINE_TO_CLOSE_FIGURE:3,BEZIER_TO:4,BEZIER_TO_CLOSE_FIGURE:5},t.Intents={LINE_ARROW:"LineArrow",LINE_DIMENSION:"LineDimension",POLYGON_CLOUD:"PolygonCloud",POLYGON_DIMENSION:"PolygonDimension",POLYLINE_DIMENSION:"PolyLineDimension",CIRCLE_DIMENSION:"CircleDimension",FREETEXT_TYPEWRITER:"FreeTextTypewriter",FREETEXT_CALLOUT:"FreeTextCallout",STRIKEOUT_TEXTEDIT:"StrikeOutTextEdit"};var i=t.LineEndingName={0:"None",1:"Square",2:"Circle",3:"Diamond",4:"OpenArrow",5:"ClosedArrow",6:"Butt",7:"ROpenArrow",8:"RClosedArrow",9:"Slash"};t.LineEndingStyle=Object.keys(i).reduce((function(e,t){return e[i[t]]=Number(t),e}),{}),t.LINE_CAPTION_POSITION={POS_INLINE:0,POS_TOP:1},t.AnnotFlagsName={0:"invisible",1:"hidden",2:"print",3:"nozoom",4:"norotate",5:"noview",6:"readonly",7:"locked",8:"togglenoview"},t.PDFDocPermission={PrintLowQuality:4,ModifyDocument:8,Extract:16,AnnotForm:32,FillForm:256,ExtractAccess:512,Assemble:1024,PrintHighQuality:2048},t.MeasureType={MeasureTypeX:0,MeasureTypeY:1,MeasureTypeD:2,MeasureTypeA:3,MeasureTypeT:4,MeasureTypeS:5},t.STORE_NAMES={SELECTION_INFO:"viewer--store-selection-info"},t.CREATING_MEASUREMENT_CONTEXTMENU="creating-measurement-contextmenu",t.HIGHLIGHTING_MODE={NONE:0,INVERT:1,OUTLINE:2,PUSH:3,TOGGLE:4},t.RESOLVED_PROMISE_VOID=Promise.resolve(),t.DISTANCE_TOLERANCE=2,t.POINT_TOLERANCE=.01,t.POS_TYPE={FIRST:0,LAST:1,AFTER:2,BEFORE:3},t.STANDARD_HTML_ELEMENTS=["html","a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],t.EMPTY_STR="",t.DB_PREFIX="FoxitPDFSDKForWeb_",t.SET_FORM_CREATION_CONTINUOUSLY="set_form_creation_continuously",t.HIDE_FORM_FIELD_PROPERTY_BOX="hideFormFieldPropertyBox",t.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX="hideFormFieldSimplePropertyBox",t.MEASUREMENT_INFO="measurementInfo"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(44),i={annotationUpdated:"annotation-updated",annotationIDUpdated:"annotation-id-updated",annotationAppearanceUpdated:"annotation-appearance-updated",annotationReplyAdd:"annotation-reply-add",annotationReviewStateAnnotAdd:"annotation-review-state-annot-add",annotationMarkedStateAnnotAdd:"annotation-marked-state-annot-add",annotationStatesCleared:"annotation-states-cleared",annotationRemoved:"annotation-removed",annotationMovedPosition:"annotation-moved-position",annotationAdded:"annotation-add",annotationAdd:"annotation-add",moveAnnotsToPages:"moveAnnotsToPages",annotationImported:"annotation-imported",annotationImportedEx:"annotation-imported-ex",annotationLoaded:"annotation-loaded",actionUpdated:"action-updated",actionAdd:"action-add",actionRemove:"action-remove",layerVisibleChange:"layer-visible-change",layerRemoved:"layer-removed",layerMerged:"layer-merged",bookmarkAdded:"bookmark-added",structureBookmarkAdded:"structure-bookmark-added",bookmarkUpdated:"bookmark-updated",bookmarkRemoved:"bookmark-removed",stateAnnotNameUpdated:"state-annot-name-updated",pageInfoChange:"page-info-change",pageRotationChange:"page-rotation-change",imageAdded:"image-added",watermarkAdded:"watermark-added",graphicsUpdated:"graphics-updated",permissionChanged:"permission-changed",docPasswordChanged:(0,r.identity)("doc-password-changed"),drmEncryptSuccess:"drm-encrypt-success",drmEncryptFailed:"drm-encrypt-failed",removePwdAndPerm:(0,r.identity)("remove-password-and-permission"),pageMoved:"page-moved",pageRemoved:"page-removed",pageAdded:"page-added",insertPages:"import-pages",importPages:"import-pages",documentAttachmentAdd:"document-attachment-add",documentAttachmentModify:"document-attachment-modify",documentAttachmentRemove:"document-attachment-remove",applyRedaction:"apply-redaction",removeReviewState:"remove-review-state",removeMarkedState:"remove-marked-state",formValueChanged:"form-value-changed",metaDataChanged:"meta-data-changed",docModified:"doc-modified",flattened:"flattened",headerFooterUpdated:"headerFooterUpdated",headerFooterAdded:"headerFooterAdded",COChange:"COChange",pagesReversed:"pages-reversed",pagesMoved:"pages-moved",pagesRemoved:"pages-removed",pagesRotated:"pages-rotated",obtainsPageFromEngine:"obtains-page-from-engine",pagesBoxChange:"pages-box-changed",pagesLabelChange:"pages-label-change",pagesLabelNeedUpdate:"pages-label-need-change",pagesReplace:"pages-replace",recognitionForm:"recognition-form",removeEmbeddedPageThumbnail:"remove-embedded-page-thumbnail",articleThreadAdded:"article-thread-added",articleThreadUpdated:"article-thread-updated",articleThreadRemoved:"article-thread-removed",articleBeadAdded:"article-bead-added",articleBeadRemoved:"article-bead-removed",articleBeadUpdated:"article-bead-updated",articleEnterReadMode:"article-enter-read-mode",articleOutReadMode:"article-out-read-mode"};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.convertFromNumberToHex=function(e){if("number"!=typeof e)throw new TypeError("Unexpected color value:"+e);if(e<0)return-1;var t=e.toString(16),n=6;for(e>16777215&&(n=8);t.length<n;)t="0"+t;return"#"+t},t.convertFromNumberToRGBA=function(e){var t=void 0;return e<16777216?t=255:(t=e/i&255,e&=16777215),{r:e>>16&255,g:e>>8&255,b:255&e,a:t}},t.colorConvertor=o,t.standardColorAsARGBNumber=function(e){if(e<=16777215)return 4278190080+e;if(e>16777215)return e;if("string"==typeof e){if((e=e.replace("#","").trim()).match(/^[0-9A-F]{8}$/i))return parseInt(e,16);if(e.match(/^[0-9A-F]{6}$/i))return 4278190080+parseInt(e,16);if(e.match(/^rgb\(\d{1,3}(,\d{1,3}){2}\)$/i)){var t=e.split(/\D+/).map((function(e){return parseInt(e)})),n=r(t,4);return 4278190080+(n[1]<<16)+(n[2]<<8)+n[3]}if(e.match(/^rgba\(\d{1,3}(,\d{1,3}){3}\)$/i)){var i=e.split(/\D+/).map((function(e){return parseInt(e)})),o=r(i,5),a=o[1],c=o[2],u=o[3],s=o[4];return Math.floor(4278190080*s)+(a<<16)+(c<<8)+u}}throw new Error('incorrect color format: "'+e+'"')},t.convertFromNumberToJSColor=function(e){return["RGB",((16711680&e)>>16)/255,((65280&e)>>8)/255,(255&e)/255]},t.getTransparentOrColor=function(e){return 0===e?"transparent":o(16777215&e,"#")};var i=Math.pow(2,24);function o(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HTML",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a="",c=void 0;switch("number"==typeof e&&(e=["int",e]),e[0]){case"int":t=(16711680&e[1])>>16,n=(65280&e[1])>>8,r=255&e[1];break;case"T":t=0,n=0,r=0,o=0;break;case"G":t=n=r=255*e[1];break;case"RGB":t=255*e[1],n=255*e[2],r=255*e[3];break;case"CMYK":t=(1-e[4])*(1-e[1])*255,n=(1-e[4])*(1-e[2])*255,r=(1-e[4])*(1-e[3])*255;break;case"r":t=+(c=e.match(/rgba?\((\d*),\s*(\d*),\s*(\d*),?\s*([\.0-9]*)?\)/))[1],n=+c[2],r=+c[3];var u=c[4];void 0!==u&&(o=+u);break;case"#":var s=4==e.length?/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/:/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;c=e.match(s),t=parseInt(c[1],16),n=parseInt(c[2],16),r=parseInt(c[3],16);break;default:throw new Error("Unsupported color format")}switch(i){case"HTML":a=t===n&&n===r&&-1===r?"transparent":"rgba("+parseInt(t)+","+parseInt(n)+","+parseInt(r)+","+o+")";break;case"RGB":a=["RGB",t/255,n/255,r/255];break;case"#":a+=t<16?"#0"+t.toString(16):"#"+t.toString(16),a+=n<16?"0"+n.toString(16):n.toString(16),a+=r<16?"0"+r.toString(16):r.toString(16);break;case"int":a=0,a|=(o*=255)<<24,a|=t<<16,a|=n<<8,a|=r,a>>>=0}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PageOpened:0,PageClosed:1,DocWillClose:2,DocWillSave:3,DocSaved:4,DocWillPrint:5,DocPrinted:6,FieldKeyStroke:7,FieldWillFormat:8,FieldValueChanged:9,FieldRecalculateValue:10,AnnotCursorEnter:11,AnnotCursorExit:12,AnnotMouseButtonPressed:13,AnnotMouseButtonReleased:14,AnnotReceiveInputFocus:15,AnnotLoseInputFocus:16,AnnotPageOpened:17,AnnotPageClosed:18,AnnotPageVisible:19,AnnotPageInvisible:20}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),i=l(n(42)),o=(l(n(43)),l(n(8))),a=n(9),c=l(n(45)),u=l(n(46)),s=l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}l(n(47));var d=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isEmpty=!t,this.info=t||{},this.page=n,this.api=n.api;var r=this.engine=n.engine;this.eventEmitter=r.eventEmitter,this.id=t.id,this.objectNumber=t.objectNumber,this.isDestroyed=!1}return e.prototype.destroy=function(){this.isDestroyed=!0,this.info=null,this.page=null,this.api=null,this.eventEmitter=null},e.prototype.checkModidyPerm=function(){if("widget"!=this.info.type){if(!this.page.doc.checkPermission(u.default.annotForm))throw new Error("Permission error")}else if(!this.page.doc.checkPermission(u.default.fillForm|u.default.annotForm))throw new Error("Permission error")},e.prototype.hasModifyPermission=function(){return"widget"==this.info.type?this.page.doc.checkPermission(u.default.fillForm|u.default.annotForm):this.page.doc.checkPermission(u.default.annotForm)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype.getInfo=function(){return this.info},e.prototype.getId=function(){return this.info.objectNumber},e.prototype.getObjectNumber=function(){return this.info.objectNumber},e.prototype.getUniqueID=function(){return this.info.name},e.prototype.setUniqueID=function(e){var t=this,n=this.getPDFPage(),r=n.getPDFDoc(),i=this.getUniqueID();return this.page.doc.api.setUniqueId(r.getId(),n.getId(),this.getId(),e).then((function(r){return r?(t.info.name=e,t.update(s.default.uniqueIDUpdated).then((function(){return t.eventEmitter.emit(o.default.annotationIDUpdated,e,i,t,n),r}))):r}))},e.prototype.getName=function(){return this.info.name},e.prototype.getPDFPage=function(){return this.page},e.prototype.getPage=function(){return this.getPDFPage()},e.prototype.getType=function(){return this.info.type},e.prototype.getTitle=function(){return this.info.title},e.prototype.isMarkup=function(){return this.info.isMarkup},e.prototype.isDeleted=function(){return this.info.isDeleted},e.prototype.getRect=function(){var e=this.info.rect;return new c.default(e.left,e.bottom,e.right,e.top)},e.prototype._setRect=function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.info.rect=e;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotRect(i.getId(),r.getId(),this.getId(),e).then((function(e){return e&&n?t.update(s.default.rectUpdated).then((function(){return t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],t.getPDFPage()),e})):e}))},e.prototype.setRect=function(e){var t=this;this.info.rect=e;var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotRect(r.getId(),n.getId(),this.getId(),e).then((function(e){return e?t.update(s.default.rectUpdated).then((function(e){return t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],t.getPDFPage()),!0})):e}))},e.prototype.setRectAndInnerRect=function(e,t){var n=this;this.info.rect=e,this.info.innerRect=t;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotRectAndInnerRect(i.getId(),r.getId(),this.getId(),e,t).then((function(e){return e?n.update(s.default.rectUpdated).then((function(e){return n.eventEmitter.emit(o.default.annotationAppearanceUpdated,[n],n.getPDFPage()),!0})):e}))},e.prototype.moveTo=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.left,r=t.top,i=t.action,a=Object.assign({},this.info.rect),c=a.right,u=a.bottom,l=n-a.left,d=r-a.top;this.info.rect={left:n,top:r,right:c+l,bottom:u+d};var p=this.getPDFPage(),f=p.getPDFDoc(),g=f.getId(),h=p.getId(),M=this.getId();return this.page.doc.api.moveAnnotTo(g,h,M,{left:n,top:r}).then((function(e){return p.getAnnotsByObjectNumArray(e)})).then((function(t){return Promise.all(t.map((function(e){return e._update()}))).then((function(n){e.eventEmitter.emit(o.default.annotationUpdated,t,p,s.default.rectUpdated),"move"==i&&e.eventEmitter.emit(o.default.annotationMovedPosition,t,p,e)}))}))},e.prototype.getDeviceRect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.page.getDeviceRect(this.getRect(),e,t);if(16&this.info.flag){var r=this.page.getDevicePoint([this.info.rect.left,this.info.rect.top],e,t);return{left:r[0],top:r[1],right:r[0]+n.right-n.left,bottom:r[1]+n.bottom-n.top}}return n},e.prototype.getDeviceInnerRect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.page.getDeviceRect(this.getInnerRect(),e,t)},e.prototype.getContent=function(){return this.info.content},e.prototype.setContent=function(e){var t=this;return this.checkModidyPerm(),this._setContent(e).then((function(n){return t.info.content=e,t.eventEmitter.emit(o.default.annotationUpdated,[t],t.getPDFPage(),s.default.contentUpdated),t}))},e.prototype._setContent=function(e){var t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.setAnnotContent(n.getId(),t.getId(),this.getId(),e)},e.prototype.getBorderColor=function(){return this.info.borderColor},e.prototype.setBorderColor=function(e){var t=this;this.checkModidyPerm(),isNaN(e)&&(e=(0,a.colorConvertor)(e,"int",1));var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotBorderColor(r.getId(),n.getId(),this.getId(),e).then((function(r){return r?(0===e&&(t.info.hasBorderColor=!1),t.update(s.default.borderColorUpdated).then((function(){return t.isGrouped&&t.isGrouped()&&t.getGroupElements().map((function(e){e!=t&&t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[e],n)})),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],n),r}))):r}))},e.prototype.getBorderStyle=function(){return this.info.borderInfo.style},e.prototype.getBorderStyleWithParam=function(){var e=this.info.borderInfo,t=e.style,n=e.cloudIntensity,i=e.dashes,o=void 0;switch(t){case r.BORDER_STYLE.SOLID:o=[];break;case r.BORDER_STYLE.CLOUDY:o=n;break;case r.BORDER_STYLE.DASHED:o=i}return{style:t,param:o}},e.prototype.getBorderInfo=function(){return Object.assign({},this.info.borderInfo)},e.prototype.setBorderInfo=function(e){var t=this;this.checkModidyPerm();var n=this.getType();if(this.getQuadPoints||"caret"===n||"text"===n)return Promise.resolve();var r=JSON.parse(JSON.stringify(this.info.borderInfo||{}));e=this.info.borderInfo=Object.assign(r,e);var i=this.getPDFPage(),a=i.getPDFDoc();return 1===e.style&&0===e.dashes.length&&(e.dashes=[2,2]),5===e.style&&e.cloudIntensity>2&&(e.cloudIntensity=2),this.page.doc.api.setAnnotBorderInfo(a.getId(),i.getId(),this.getId(),e).then((function(e){if(5===t.info.borderInfo.style)return t._update()})).then((function(e){return t.eventEmitter.emit(o.default.annotationUpdated,[t],i,s.default.borderInfoUpdated),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],i),!0}))},e.prototype.setBorderStyle=function(e,t){var n=this,r=this.info.borderInfo;switch(r.style=e,e){case 1:r.dashes=t;break;case 5:r.cloudIntensity=t}var i=this.getPDFPage(),a=i.getPDFDoc();return this.page.doc.api.setAnnotBorderStyle(a.getId(),i.getId(),this.getId(),e,t).then((function(e){return i.getAnnotsByObjectNumArray(e)})).then((function(e){for(var t=[],n=e.length;n--;)t.push(e[n]._update());return Promise.all(t)})).then((function(e){return n.eventEmitter.emit(o.default.annotationUpdated,e,i,s.default.borderStyleUpdated),n.eventEmitter.emit(o.default.annotationAppearanceUpdated,e,i),!0}))},e.prototype.getBorderDashes=function(){return Object.assign([],this.info.borderInfo.dashes)},e.prototype.getBorderWidth=function(){var e=this.info.borderInfo.width;return void 0===e?1:+e},e.prototype.setBorderWidth=function(e){var t=this,n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setAnnotBorderWidth(r.getId(),n.getId(),this.getId(),e).then((function(e){return t._update().then((function(t){return e}))})).then((function(e){return e&&(t.eventEmitter.emit(o.default.annotationUpdated,[t],n,s.default.borderWidthUpdated),t.eventEmitter.emit(o.default.annotationAppearanceUpdated,[t],n)),e}))},e.prototype.getCloudIntensity=function(){return this.info.borderInfo.cloudIntensity||0},e.prototype.reviseSummary=function(e){return Promise.resolve(this)},e.prototype.rectIsEmpty=function(){return this.info.rectIsEmpty},e.prototype.update=function(e){var t=this;return this._update().then((function(){return e&&t.eventEmitter.emit(o.default.annotationUpdated,[t],t.getPDFPage(),e),t}))},e.prototype._update=function(){var e=this,t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.getAnnot(n.getId(),t.getId(),this.getId()).then((function(t){return e.updateInfo(t),e}))},e.prototype._updateMore=function(){},e.prototype.getFlags=function(){return this.info.flag},e.prototype.getIndex=function(){return this.info.index},e.prototype.setFlags=function(e,t){var n=this;this.checkModidyPerm(),this.info.flag=e;var r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setAnnotFlag(i.getId(),r.getId(),this.getId(),e).then((function(i){return i&&("widget"==n.getType()&&n.updateUI({type:"display",value:e}),t||(n.eventEmitter.emit(o.default.annotationUpdated,[n],r,s.default.flagsUpdated),n.eventEmitter.emit(o.default.annotationAppearanceUpdated,[n],r))),i}))},e.prototype.setFlagValue=function(e,t){return this.setFlags(e,t)},e.prototype.getModifiedDateTime=function(){var e=this.info.modifiedTimestamp;return e<0?null:new Date(e)},e.prototype.setModifiedDateTime=function(e){var t=this;this.checkModidyPerm();var n=this.getPDFPage(),r=n.getPDFDoc();return this.page.doc.api.setModifiedDateTime(r.getId(),n.getId(),this.getId(),e).then((function(e){return t.update(s.default.modifiedDateTimeUpdated)}))},e.prototype.exportToJSON=function(){var e=(0,a.colorConvertor)(16777215&this.info.borderColor,"#"),t=this.info.flag,n=[];for(var o in r.AnnotFlagsName)t&1<<parseInt(o)&&n.push(r.AnnotFlagsName[o]);n=n.join(",");var c=(0,i.default)(new Date(this.info.modifiedTimestamp),"D:yyyyMMddhhmmssTZ","'"),u=this.info.name,s=this.page.getIndex(),l=this.info.rect,d=l.left+","+l.bottom+","+l.right+","+l.top,p=this.info.content,f=this.info.borderInfo,g=this.info.type,h=this.info.customEntries,M={type:g,color:e,flags:n,date:c,name:u,page:s,rect:d,contents:p,width:f.width,customEntries:h,objectNumber:this.info.objectNumber};switch(f.style){case r.BORDER_STYLE.SOLID:M.style="solid";break;case r.BORDER_STYLE.DASHED:M.style="dashed",M.dashPhase=f.dashPhase,M.dashes=f.dashes.join(",");break;case r.BORDER_STYLE.UNDERLINE:M.style="underline";break;case r.BORDER_STYLE.BEVELED:M.style="beveled";break;case r.BORDER_STYLE.INSET:M.style="inset";break;case r.BORDER_STYLE.CLOUDY:M.style="cloudy",M.intensity=f.cloudIntensity}return M},e.prototype.updateInfo=function(e){this._isEmpty=!e,this.info=e,this._updateMore(),this.action&&e.action&&(this.action.info=e.action)},e.prototype.getIntent=function(){return""},e.prototype.setCustomEntries=function(e,t){this.info.customEntries=this.info.customEntries||{},this.info.customEntries[e]=t},e.prototype.setDictionaryEntry=function(e,t){var n=this;return this._setDictionaryEntry(e,t).then((function(e){return e&&n.eventEmitter.emit(o.default.annotationUpdated,[n],n.getPDFPage(),s.default.addDictionary),e}))},e.prototype._setDictionaryEntry=function(e,t){var n=this,r=this.getPDFPage(),i=r.getPDFDoc();return this.page.doc.api.setDictionaryEntry(i.getId(),r.getId(),this.getId(),e,t).then((function(r){return r&&n.setCustomEntries(e,t),r}))},e.prototype.getDictionaryEntry=function(e){return this._getDictionaryEntry(e)},e.prototype._getDictionaryEntry=function(e){var t=this.getPDFPage(),n=t.getPDFDoc();return this.page.doc.api.getDictionaryEntry(n.getId(),t.getId(),this.getId(),e)},e.prototype.resetAppearanceStream=function(){var e=this.getPDFPage(),t=e.getPDFDoc();return this.page.doc.api.resetAppearanceStream(t.getId(),e.getId(),this.getId())},e}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={contentUpdated:"content-updated",borderInfoUpdated:"borderInfo-updated",borderStyleUpdated:"borderStyle-updated",borderWidthUpdated:"borderWidth-updated",borderColorUpdated:"borderColor-updated",modifiedDateTimeUpdated:"modifiedDateTime-updated",uniqueIDUpdated:"uniqueID-updated",flagsUpdated:"flags-updated",rectUpdated:"rect-updated",innerRectUpdated:"innerRect-updated",iconNameUpdated:"iconName-updated",rotationUpdated:"rotation-updated",defaultAppearanceUpdated:"defaultAppearance-updated",calloutLineEndingStyleUpdated:"calloutLineEndingStyle-updated",calloutLinePointsUpdated:"calloutLinePoints-updated",fillColorUpdated:"fillColor-updated",textColorUpdated:"textColor-updated",alignmentUpdated:"alignment-updated",inkListUpdated:"inkList-updated",endPointUpdated:"endPoint-updated",startPointUpdated:"startPoint-updated",endingStyleUpdated:"endingStyle-updated",enableCaptionUpdated:"enableCaption-updated",leaderCaptionOffsetUpdated:"leaderCaptionOffset-updated",styleFillColorUpdated:"styleFillColor-updated",leaderLineLengthUpdated:"leaderLineLength-updated",leaderLineExtendUpdated:"leaderLineExtend-updated",leaderLineOffsetUpdated:"leaderLineOffset-updated",measureRatioUpdated:"measureRatio-updated",measureUnitUpdated:"measureUnit-updated",measureConversionFactorUpdated:"measureConversionFactor-updated",removeAction:"remove-action",actionDataUpdated:"actionData-updated",addAction:"add-action",highlightingModeUpdated:"highlightingMode-updated",subjectUpdated:"subject-updated",titleUpdated:"title-updated",createDateTimeUpdated:"createDateTime-updated",opacityUpdated:"opacity-updated",intentUpdated:"intent-updated",vertexesUpdated:"vertexes-updated",applyFillColorUpdated:"applyFillColor-updated",quadPointsUpdated:"quadPoints-updated",reviewStateUpdated:"review-state-updated",markedStateUpdated:"marked-state-updated",statesCleared:"state-cleared",replyAdded:"add-replies",addDictionary:"add-dictionary",formFieldValueUpdated:"form-field-value",formFieldsMaxLengthUpdated:"maxLength",formFieldItemsUpdated:"setItems",formFieldIconUpdated:"icon",formFieldInsertedItem:"insertItemAt",formFieldExportValueUpdated:"form-field-export-value",formFieldMKPropertyUpdated:"form-field-mk-property",formFieldAlternateName:"form-field-alternate-name",formFieldActionUpdated:"form-field-action"}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ReadOnly:1,Required:2,NoExport:4,Hidden:8,ButtonNoToggleToOff:16384,ButtonRadiosInUnison:33554432,TextMultiline:4096,TextPassword:8192,TextDoNotSpellCheck:4194304,TextDoNotScroll:8388608,TextComb:16777216,ComboEdit:262144,ChoiceMultiSelect:2097152,CommitOnSelChange:67108864,inUnison:function(e){return e&r.ButtonRadiosInUnison},isHidden:function(e){return e&r.Hidden},isReadOnly:function(e){return e&r.ReadOnly},isRequired:function(e){return e&r.Required},isNoExport:function(e){return e&r.NoExport},isMultiline:function(e){return e&r.TextMultiline},isPassword:function(e){return e&r.TextPassword},isComb:function(e){return e&r.TextComb},isNoSpellCheck:function(e){return e&r.TextDoNotSpellCheck},isNoScroll:function(e){return e&r.TextDoNotScroll},isComboEdit:function(e){return e&r.ComboEdit},isChoiceMultiSelect:function(e){return e&r.ChoiceMultiSelect}},i={FlagExclude:1,FlagIncludeNoValueFields:2,FlagExportFormat:4,FlagGetMethod:8,FlagWithCoordinates:16,FlagAsXFDF:32,FlagIncludeAppendSaves:64,FlagIncludeAnnotations:128,FlagSubmitAsPDF:256,FlagCanonicalFormat:512,FlagExclNonUserAnnots:1024,FlagExclFKey:2048,FlagEmbedForm:8192,isExclude:function(e){return e&i.FlagExclude},isIncludeNoValueFields:function(e){return e&i.FlagIncludeNoValueFields},isHTML:function(e){return e&i.FlagExportFormat},isGetMethod:function(e){return e&i.FlagGetMethod},isXFDF:function(e){return e&i.FlagAsXFDF},isPDF:function(e){return e&i.FlagSubmitAsPDF},getType:function(e){var t=i.isHTML(e);if(t)return"HTML";var n=i.isXFDF(e);if(n)return"XFDF";var r=i.isXFDF(e);return r?"PDF":t||n||r?void 0:"FDF"}},o=r;t.FieldType={Unknown:0,PushButton:1,CheckBox:2,RadioButton:3,Text:6,ListBox:5,ComboBox:4,Sign:7,Barcode:8},t.FieldFlag=o,t.FormActionFlags=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FORM_FIELD_STATE_HANDLER_NAMES=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5));function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=t.FORM_FIELD_STATE_HANDLER_NAMES=[],c=r.PDFViewCtrl.ViewerEvents,u=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"assistant-button"},t.prototype.init=function(){e.prototype.init.call(this),this.taskExecutor=new r.PDFViewCtrl.shared.QueuedAsyncTaskExecutor,this.isAssistantEnabled=!1},t.prototype.onclick=function(){var e=this,t=this.getPDFUI();this.taskExecutor.exec((function(){return e.isAssistantEnabled?t.stopFormDesginerAssist():t.startFormDesginerAssist()}))},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.getPDFUI();this.addDestroyHook(n.addViewerEventListener(c.designerAssistantStatusChanged,(function(e){t.isAssistantEnabled=e,e?t.active():t.deactive()})),n.addViewerEventListener(c.switchStateHandler,(function(e,n){e&&t.handleStateHandlerChange(e,n)})),n.addViewerEventListener(c.openFileSuccess,(function(){n.getStateHandlerManager().then((function(e){var n=e.getCurrentStates();n&&t.handleStateHandlerChange(n)}))})))},t.prototype.handleStateHandlerChange=function(e,t){var n=this,r=this.getPDFUI(),i=e.getStateName();if(a.indexOf(i)>-1){if(t){var o=t.getStateName();if(a.indexOf(o)>-1)return}if(this.enable(),this.isAssistantEnabled)return void this.active();this.taskExecutor.exec((function(){return r.startFormDesginerAssist()}))}else this.taskExecutor.exec((function(){return r.stopFormDesginerAssist().then((function(){n.disable()}))}))},t}(r.SeniorComponentFactory.createSuperClass({template:'\n <ribbon-button\n text="form-designer:assistant.button-text" \n icon-class="fv__icon-toolbar-designer-assistant"\n name="form-assistant-button"\n @tooltip \n tooltip-title="form-designer:assistant.button-tooltip"\n @on.click="$component.onclick()"\n ></ribbon-button>\n '}));t.default=u},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.destroyHooks=[],this.isDestroyed=!1}return e.prototype.addDestroyHook=function(){for(var t,n=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return(t=this.destroyHooks).push.apply(t,r(o.filter((function(t){if("function"!=typeof t&&!(t instanceof e))throw new Error("[Illegal Argument] Invalid destroy hook:"+t+", It's not a function!");return!0})))),function(){o.forEach((function(e){var t=n.destroyHooks.indexOf(e);t>-1&&n.destroyHooks.splice(t,1)}))}},e.prototype.destroy=function(){this.destroyHooks.forEach((function(t){"function"==typeof t?t():t instanceof e&&t.destroy()})),this.destroyHooks=[],this.isDestroyed=!0},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),a=I(n(18)),c=I(n(19)),u=I(n(61)),s=I(n(64)),l=I(n(68)),d=I(n(71)),p=I(n(74)),f=I(n(75)),g=I(n(76)),h=I(n(4)),M=I(n(79)),m=n(0),y=I(n(86)),v=I(n(87)),b=I(n(88)),D=n(89),A=n(7);n(90);var N=I(n(15));function I(e){return e&&e.__esModule?e:{default:e}}function j(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,n){return function r(i,o){try{var a=t[i](o),c=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function O(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}var E=o.shared.replaceRibbonButton2XButton,_=PDFViewCtrl.PDF.form.constant.Field_Flag,k=PDFViewCtrl.ViewerEvents,z=PDFViewCtrl.PDF.constant.AnnotUpdatedType,C=PDFViewCtrl.AnnotComponent,S={MultipleCopy:s.default,Duplicate:l.default,PickField:o.FieldsPickDialog,JSInput:o.ScriptInputDialog},L=o.vendors,R=L.jQuery,P=(L.i18next,L.i18nextChainedBackend,L.i18nextLocalStorageBackend,L.i18nextXHRBackend,L.dialogPolyfill,L.Hammer,L.EventEmitter,R),U=o.StatefulController,Q=PDFViewCtrl.PDF.constant.User_Permissions,Y=PDFViewCtrl,G=Y.IStateHandler,F=Y.ShapeControl,Z=(PDFViewCtrl.PDF.form.constant.Field_Type,[{name:"CreateUnknown",type:0},{name:"CreatePushButton",type:1},{name:"CreateCheckBox",type:2},{name:"CreateRadioButton",type:3},{name:"CreateComboBox",type:4},{name:"CreateListBox",type:5},{name:"CreateText",type:6},{name:"CreateSign",type:7},{name:"CreateDate",type:6},{name:"CreateImage",type:1}]),B=function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"FormDesigner"},t.getLoader=function(){return a.default},t.isBlockedFeature=function(){return!1},t.initOnLoad=function(){if(!t.isBlockedFeature()){for(var e=o.modular.module("form-designer",[]),n=[],r=1;r<Z.length;r++){var a=(0,g.default)(G,F,Z[r].name+"StateHandler",Z[r].type),c=(0,p.default)(Z[r].name+"Controller",U,a,Q);n.push(Z[r].name+"StateHandler"),e.registerController(c)}e.registerComponent(N.default),e.registerController(f.default),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"ShowPropertiesController"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n=this.component;n.parent.on("shown",(function(){t.getPDFUI().getAllActiveElements().then((function(e){e.length>1?n.disable():n.enable()}))}))},t.prototype.handle=function(){var e=this.component.parent.getCurrentTarget(),t=this.getPDFUI().formDesignDialog;t.setAnnot(e),t.show()},t}(o.Controller)),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"Delete"},t.prototype.handle=function(){var e=this;this.getPDFUI().getPDFViewer().then((function(t){t.getAllActiveElements().forEach((function(t){t instanceof C?t.removeAnnot():(e.getPDFUI().editingMgr.removeAnnot(t.widget),e.getPDFUI().formDesignDialog.lockedHandler(!0))}))}))},t}(o.Controller)),e.registerController(function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"SetAsDefaultPropertiesController"},t.prototype.handle=function(){var e=this.component.parent.getCurrentTarget();this.pdfUI.getStore().then((function(t){if(!e||"widget"!==e.info.type)throw new Error("set default properties: invalid parameters!");var n=e,r=n.getField(),i=r.info.type,o=n.getFlags(),a=r.getFlags(),c=r.getAlignment(),u=r.getBorderColor(),s=r.getBorderStyle(),l=D.BorderWidthMap[r.getBorderWidth()]||0,d=r.getFillColor(),p=n.getDefaultAppearance(),f=n.getDAFontColor(),g=p.fontName,h=p.textSize,M={fieldType:i,value:{annotFlags:o,fieldFlags:a,alignment:c,DA:{textColor:f,fontName:D.FoxitFontMap[g]?D.FoxitFontMap[g]:g,textSize:h},fillColor:d,border:{borderColor:u,borderStyle:s,borderWidth:l}}};t.dispatch("get-form-field-default-props",M)}))},t}(o.Controller)),Z.forEach((function(t){var n=t.name.replace(/[A-Z]/g,(function(e,t){return 0===t?e.toLowerCase():"-"+e.toLowerCase()})),r={template:'<ribbon-button name="fv--form-designer-'+n+'-btn" icon-class="fv__icon-toolbar-form-'+n+'" @tooltip tooltip-title="form-designer:tips.'+t.name+'" @controller="form-designer:'+t.name+'Controller">form-designer:tips.'+t.name+"</ribbon-button>"};e.registerPreConfiguredComponent(n+"-ribbon",r),e.registerPreConfiguredComponent(n,Object.assign({},r,{template:E(r.template)}))})),e.controller("Copy",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){this.getPDFUI().getPDFViewer().then((function(e){return e.copy()}))}}),e.controller("Cut",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.component.parent.getCurrentTarget(),t=this.getPDFUI().formDesignDialog;t.setAnnot(e),t.show()}}),e.controller("MultipleCopy",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.getPDFUI(),t=e.addonInstanceMap.FormDesignerUIXAddon.getDialog("MultipleCopy"),n=this.component.parent.getCurrentTarget();if(n.getField().controls.length>1)return e.alert({message:"form-designer:dialog.numberError",level:"warning"});e.editingMgr.enableShortcut(0),t.show(n,(function(t,n,r,i,o){if(e.editingMgr.enableShortcut(1),t&&!t.isDeleted()){var a=t.getField(),c=t.getPage();return n?a.form.copyControls(t,c,o.map((function(e){return{rect:e,fieldName:a.getName(),srcObjectNumber:t.getObjNum()}}))):a.form.duplicateField(a.getName(),t,r,i,o).then((function(n){return e.editingMgr.updateLabel(t)}))}}))}}),e.controller("CopyToPage",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.getPDFUI(),t=e.addonInstanceMap.FormDesignerUIXAddon.getDialog("Duplicate"),n=this.component.parent.getCurrentTarget();e.editingMgr.enableShortcut(0),t.show(n,n.page.doc.getPageCount(),[],(function(t,r){e.editingMgr.enableShortcut(1),t&&e.getPDFDocRender().then((function(e){if(!n.isDeleted()){var i=e.getPDFDoc().pageCache,o=[];i.forEach((function(e){e&&o.push(e.getIndex())}));var a=n.page.getIndex();r=r.filter((function(e){return e!=a})),t.getField().form.duplicateWidget(r,t.getField().getName(),t.getObjNum(),o)}}))}))}}),e.controller("SetTabOrder",{mounted:function(){o.Controller.prototype.mounted.apply(this,arguments),u.call(this)},handle:function(){var e=this.component.parent.getCurrentTarget();this.pdfUI.eventEmitter.emit("set-tab-order",e)}}),e.registerPreConfiguredComponent("keep-tool-selected-checkbox",{template:'<checkbox @tooltip name="keep-tool-selected-checkbox" @controller="form-designer:KeepToolSelectedController" class="fv__icon-toolbar-keep-tool-selected noWarp"></checkbox>',config:{target:"keep-tool-selected-checkbox",tooltip:{title:"form-designer:tips.KeepToolSelected"},text:"form-designer:tips.KeepToolSelected",checked:!1,callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"keep-tool-selected"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.component.disable(),this.$keepToolSelectedCheckbox=P(this.component.element).find("input[type='checkbox']"),this.getPDFUI().getPDFViewer().then((function(e){t.$keepToolSelectedCheckbox.change((function(){e.setFormCreationContinuously(t.$keepToolSelectedCheckbox.prop("checked"))})),e.eventEmitter.on(k.switchStateHandler,(function(e,r){n.indexOf(e.getStateName())>-1?t.component.enable():t.component.disable()}))}))},t}(o.Controller)}}),e.registerPreConfiguredComponent("highlight-fields-checkbox",{template:'<checkbox @tooltip name="highlight-fields-checkbox" @controller="form-designer:HighlightFieldsController" tooltip-title="form-designer:tips.HighlightFields" text="form-designer:tips.HighlightFields" class="fv__icon-toolbar-highlight-fields noWarp"></checkbox>',config:{target:"highlight-fields-checkbox",checked:!0,callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.getName=function(){return"HighlightFieldsController"},t.prototype.mounted=function(){var t,r=this;e.prototype.mounted.call(this);var i=this.getPDFUI();this.addDestroyHook(i.addViewerEventListener((T(t={},PDFViewCtrl.ViewerEvents.openFileSuccess,(function(e){r.changePermission(e),r.getPDFUI().getPDFViewer().then((function(e){var t=e.highlightControls();e.setHighlightControlsUI(t)}))})),T(t,h.default.fieldAdded,(function(e,t,n){i.getCurrentPDFDoc().then((function(e){r.changePermission(e)}))})),T(t,k.annotationRemoved,(function(e){i.getCurrentPDFDoc().then((function(e){r.changePermission(e)}))})),t))),this.$highlightFieldsCheckbox=P(this.component.element).find("input[type='checkbox']"),this.getPDFUI().getPDFViewer().then((function(e){var t=!0,o=e.highlightControls();r.$highlightFieldsCheckbox[0].checked=o,r.$highlightFieldsCheckbox.change((function(){var n=r.$highlightFieldsCheckbox[0].checked;t?e.highlightForm(n):e.setHighlightControlsUI(n)})),e.eventEmitter.on(k.switchStateHandler,(function(o,a){var c=i.customs.isAccountExpired;c&&c(!1)||setTimeout((function(){n.indexOf(o.getStateName())>-1||o.getStateName()===m.STATE_HANDLER_SELECT_ANNOTATION?e.highlightForm(t=!1):(t=!0,e.highlightForm(r.$highlightFieldsCheckbox[0].checked))}),100)})),e.eventEmitter.on(k.setFromFieldHighlight,(function(e){t&&r.$highlightFieldsCheckbox.prop("checked",e)}))}))},t.prototype.changePermission=function(e){var t=this,n=this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()}));Promise.all([e.hasForm(),n]).then((function(e){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e,2),r=n[0];n[1]&t.constructor.permission&&r?t.component.lock&&t.component.unlock():t.component.lock&&t.component.lock()}))},i(t,null,[{key:"permission",get:function(){return Q.modify+Q.annotForm+Q.fillForm}}]),t}(o.Controller)}}),e.registerController(v.default),e.registerPreConfiguredComponent("reset-form",{template:'<ribbon-button @tooltip name="fv--reset-field-btn" @controller="form-designer:ResetFormController" tooltip-title="form-designer:tips.ResetForm" icon-class="fv__icon-toolbar-reset-field">form-designer:tips.ResetForm</ribbon-button>'}),e.registerController(b.default),e.registerPreConfiguredComponent("add-tooltip",{template:'<ribbon-button @tooltip name="fv--add-tooltip-btn" @controller="form-designer:AddTooltipController" tooltip-title="form-designer:tips.AddTooltip" icon-class="fv__icon-toolbar-add-tooltip">form-designer:tips.AddTooltip</ribbon-button>'}),e.registerPreConfiguredComponent("showCO",{template:'<ribbon-button name="fv--showCO-btn" icon-class="fv__icon-toolbar-form-CO" @tooltip tooltip-title="form-designer:tips.showCO" @controller="form-designer:showCODialogController">form-designer:tips.showCO</ribbon-button>'}),e.controller("showCODialogController",{mounted:function(){var e,t=this;this.getPDFUI().addViewerEventListener((T(e={},PDFViewCtrl.ViewerEvents.renderFileSuccess,(function(e){e.getPDFForm(),e.getPDFForm().getCO().length?t.component.enable():t.component.disable()})),T(e,PDFViewCtrl.ViewerEvents.COChange,(function(e){e.length?t.component.enable():t.component.disable()})),e))},handle:function(){var e=this.getPDFUI(),t=e.CODialog;t||(t=e.CODialog=new d.default(e),e.eventEmitter.emit("showCODialog"),e.getRootComponent().then((function(e){e.append(t.dialog)}))),e.getCurrentPDFDoc().then((function(e){var n=e.getPDFForm(),r=e.getPDFForm().getCO();t.show(r,(function(e){n.setCO(e)}))}))}}),e.registerController(y.default),e.registerPreConfiguredComponent("alignment-menu",{template:'<div name="alignment-menu" @controller="form-designer:AlignmentMenuController as acl">\n <dropdown name="dropdown-align" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.align.title">\n <xbutton @on.click="acl.align(\'left\')">form-designer:contextMenu.align.left</xbutton>\n <xbutton @on.click="acl.align(\'right\')">form-designer:contextMenu.align.right</xbutton>\n <xbutton @on.click="acl.align(\'top\')">form-designer:contextMenu.align.top</xbutton>\n <xbutton @on.click="acl.align(\'bottom\')">form-designer:contextMenu.align.bottom</xbutton>\n <contextmenu-separator></contextmenu-separator>\n <xbutton @on.click="acl.align(\'vertically\')">form-designer:contextMenu.align.vertically</xbutton>\n <xbutton @on.click="acl.align(\'horizontally\')">form-designer:contextMenu.align.horizontally</xbutton>\n </dropdown>\n <dropdown name="dropdown-center" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.center.title">\n <xbutton @on.click="acl.center(\'vertically\')">form-designer:contextMenu.center.vertically</xbutton>\n <xbutton @on.click="acl.center(\'horizontally\')">form-designer:contextMenu.center.horizontally</xbutton>\n <xbutton @on.click="acl.center(\'both\')">form-designer:contextMenu.center.both</xbutton>\n </dropdown>\n <dropdown name="dropdown-distribute" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.distribute.title">\n <xbutton @on.click="acl.distribute(\'vertically\')">form-designer:contextMenu.distribute.vertically</xbutton>\n <xbutton @on.click="acl.distribute(\'horizontally\')">form-designer:contextMenu.distribute.horizontally</xbutton>\n </dropdown>\n <dropdown name="dropdown-size" separate="false" align="out-right" valign="top" text="form-designer:contextMenu.size.title">\n <xbutton @on.click="acl.size(\'height\')">form-designer:contextMenu.size.height</xbutton>\n <xbutton @on.click="acl.size(\'width\')">form-designer:contextMenu.size.width</xbutton>\n <xbutton @on.click="acl.size(\'both\')">form-designer:contextMenu.size.both</xbutton>\n </dropdown>\n </div>',config:{target:"alignment-menu",callback:function(e){function t(){return w(this,t),x(this,e.apply(this,arguments))}return O(t,e),t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this);var n,r=this.getPDFUI(),i=this.component.$container.$children,o=["strikeout","underline","caret","squiggly","highlight"],a=["polygon","polyline","PolygonCloud","LineArrow","ink","Line","LineDimension","freetext","fileattachment","FreeTextCallout","text","PolygonDimension","PolyLineDimension"].map((function(e){return e.toLowerCase()}));this.addDestroyHook(this.component.parent.on("shown",(n=j(regeneratorRuntime.mark((function e(n,c,u){var s,l,d,p,f,g,h,M,m=(s=j(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>=f.length)){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,M(f[t]);case 4:if(!e.sent){e.next=9;break}return e.abrupt("return",m(t+1));case 9:return e.abrupt("return",!0);case 10:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)});return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M=function(e){return h.getPermission(e.annot).then((function(e){return e.ignorable()||e.isModifiable()}))},l=!1,d=!1,p=!1,e.next=6,r.getAllActiveElements();case 6:return f=e.sent,g=!0,e.next=10,Promise.all(f.map(function(){var e=j(regeneratorRuntime.mark((function e(n){var c,u,s,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=n.annot,e.next=3,r.getAnnotAuthorityManager(c);case 3:return u=e.sent,e.next=6,u.getPermission(c);case 6:if(e.sent.isModifiable()||(g=!1),c){e.next=10;break}return e.abrupt("return");case 10:s=(c.getIntent()||c.getType()||"").toLowerCase(),((h=n.getAnnotFlag()).checkReadOnly()||h.checkLocked())&&(l=!0),o.indexOf(s)>-1&&(d=!0),a.indexOf(s)>-1&&(p=!0),i.forEach((function(e){switch(e.name){case"dropdown-align":l||d||f.length<=1?e.disable():e.enable();break;case"dropdown-center":l||d||!g?e.disable():e.enable();break;case"dropdown-distribute":l||d||f.length<=2?e.disable():e.enable();break;case"dropdown-size":l||d||f.length<=1?e.disable():e.enable(),p?e.hide():e.show()}}));case 16:case"end":return e.stop()}}),e,t)})));return function(t){return e.apply(this,arguments)}}()));case 10:return e.next=12,r.getAnnotAuthorityManager();case 12:return h=e.sent,e.next=15,r.getPDFDocRender();case 15:if(e.sent.noInteraction&&(l=!0),l){e.next=21;break}return e.next=20,m(0);case 20:l=e.sent;case 21:i.forEach((function(e){if(d)e.hide();else switch(e.show(),e.name){case"dropdown-align":l||f.length<=1?e.disable():e.enable();break;case"dropdown-center":l?e.disable():e.enable();break;case"dropdown-distribute":l||f.length<=2?e.disable():e.enable();break;case"dropdown-size":l||f.length<=1?e.disable():e.enable(),p?e.hide():e.show()}})),setTimeout((function(){var e=t.component.nextSiblings();e&&(d?e.hide():e.show())}),20);case 23:case"end":return e.stop()}}),e,t)}))),function(e,t,r){return n.apply(this,arguments)}))),this.parentMenu=this.component.parent},t.prototype.handle=function(e){var t=this.component;t.disabled||t.isContainer()&&t.children().length>1||this.parentMenu.hide()},t}(y.default)}})}function u(){var e=this.component,t=e.parent;if(t){var n=this.getPDFUI();this.addDestroyHook(t.on("shown",(function(){n.getAllActiveElements().then((function(t){var n=t.some((function(e){return!e.annot||"widget"!==e.annot.getType()})),r=t.filter((function(e){return e.annot&&"widget"===e.annot.getType()})).length;n||r>1?e.hide():e.show()}))})))}}},t.prototype.getDialog=function(e){return this.dialogs[e]||(this.dialogs[e]=new S[e](this.pdfUI))},t.prototype.init=function(e){var n,i=this;if(!t.isBlockedFeature()){this.pdfUI=e,this.destroyHooks=[],this.callbacks={},this.defaultFormFieldProps={};var o=e.formDesignDialog=new c.default(e,this),a=e.simplePropertiesDialog=new u.default(e,this);this.dialogs={zFieldProperty:o},this.destroyHooks.push(e.addViewerEventListener((T(n={},h.default.fieldAddedFailed,(function(t){e.alert({message:"form-designer:tips.CreateFailed",level:"error"})})),T(n,h.default.fieldAdded,(function(t,n,r){var c=!1,u=function(){c||(c=!0,e.editingMgr.activeElementByAnnotId(t.index,n.getId()),setTimeout((function(){i.hideFormFieldProperty||(o.isOpened()?o.setAnnot(n):(a.setAnnot(n),a.show(r)))})))},s=n,l=s.getField(),d=s.info.fieldType,p=i.defaultFormFieldProps[d];if(void 0!==p){var f=[],g=p.DA,h=p.annotFlags,M=p.alignment,m=p.fieldFlags,y=p.fillColor,v=p.border;f.push(s.setFlagValue(h,!0)),f.push(l.setAlignment(M)),f.push(l.setReadonly(!!_.isReadOnly(m))),f.push(l.setRequired(!!_.isRequired(m))),f.push(l.setBorderStyle(v.borderStyle)),f.push(l.setBorderColor(v.borderColor)),f.push(l.setBorderWidth(v.borderWidth)),f.push(l.setFillColor(y)),f.push(s.setDefaultAppearance(g).then((function(){Object.keys(g).forEach((function(e){var t={type:e,value:g[e]};s.updateUI(t)})),s.updateUI({type:"borderStyle",value:v.borderStyle}),s.updateUI({type:"borderWidth",value:v.borderWidth}),s.updateUI({type:"display",value:h}),i.pdfUI.eventEmitter.emit(k.annotationUpdated,[s],s.getPDFPage(),z.flagsUpdated),i.pdfUI.eventEmitter.emit(k.annotationAppearanceUpdated,[s],s.getPDFPage())}))),Promise.all(f).then((function(){u()})).catch((function(e){u(),console.log("FormDesigner -> on fieldAdded -> err",e)}))}else u()})),T(n,"switch-state-handler",(function(t){var n=e.customs.isAccountExpired;if(!n||!n(!1)){var r=t.getStateName();a.hide(),e.getCurrentPDFDoc().then((function(e){return e.isStaticXFA()})).then((function(t){return!t&&e.editingMgr&&e.editingMgr.startEditingMode(r)}))}})),T(n,"render-page-success",(function(t){e.editingMgr.showAllEditingWidget([t.index])})),T(n,"will-close-document",(function(){a.hide(),o.hide(),e.editingMgr.clearEditingWidgets(),e.editingMgr.restoreHighlight()})),T(n,"annotation-add",(function(t,n){t=t.filter((function(e){return"widget"===e.getType()})),e.editingMgr.afterWidgetsAdded(n.getIndex(),t)})),T(n,PDFViewCtrl.ViewerEvents.annotationUpdated,(function(t,n,r){e.editingMgr.updateAnnots(t,n,r),o.isOpened()&&o.setValue()})),T(n,PDFViewCtrl.ViewerEvents.tapPage,(function(){e.formDesignDialog.lockedHandler(!0)})),T(n,"zoom-to-success",(function(t,n){e.editingMgr.zoom(t)})),T(n,"page-rotation-change",(function(t){e.getStateHandlerManager().then((function(e){e.switchTo()}))})),T(n,"fit-width-resize-viewport",(function(){e.editingMgr.zoom(1)})),T(n,"tab-active",(function(t){var n=t.id,r=t.getPage().getIndex();e.editingMgr.annots[n]&&e.getRootComponent().then((function(t){var i=t.querySelector("@field");i&&(i.controller.component.isStartResetNumber=!1),e.editingMgr.activeElementByAnnotId(r,n)}))})),T(n,"active-widgets-for-multi-select",(function(t){var n=t.widgets,r=void 0===n?[]:n,i=t.activationGroup;r.length&&i&&e.getPDFViewer().then((function(t){r.forEach((function(t){var n=e.editingMgr.annots[t.getId()];n&&i.add(n)})),t.bindMultiSelectActiveEvents(i),t.activationManager.active(i),t.getPDFDocRender().setCurrentAnnotHandler(),t.eventEmitter.emit(k.activeElementChanged)}))})),n))),e.getPDFViewer().then((function(t){e.editingMgr=new M.default(e,t,i.dialogs,o,a)})),this.destroyHooks.push((function(){var t=e.editingMgr;for(var n in t.destroy(),e.formDesignDialog.destroy(),e.formDesignDialog=null,e.simplePropertiesDialog.destroy(),e.simplePropertiesDialog=null,i.dialogs){var r=i.dialogs[n];!r.isDestroyed&&r.destroy()}i.dialogs={}})),e.getStore().then((function(e){e.subscribe("update-form-field-default-props",(function(e){i.defaultFormFieldProps=r({},e)})),e.subscribe("get-form-field-default-props",(function(e){var t=r({},i.defaultFormFieldProps);t[e.fieldType]=e.value,i.callbacks&&i.callbacks.onFormFieldPropsChanged&&i.callbacks.onFormFieldPropsChanged(t)})),e.subscribe(A.HIDE_FORM_FIELD_PROPERTY_BOX,(function(e){i.hideFormFieldProperty=e}))}));var s=e.customs&&e.customs.supportFormAsDefaultProps?'<contextmenu-item name="fv--contextmenu-item-field-store-props" @controller="form-designer:SetAsDefaultPropertiesController">contextmenu.annot.as-default</contextmenu-item>':"";e.getRootComponent().then((function(e){e.append('\n <template>\n <contextmenu name="contextmenu-form-designer">\n <contextmenu-item @controller="form-designer:Copy">contextmenu.annot.copyAnnot</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item name="deleteTarget" @controller="form-designer:Delete">contextmenu.annot.delete</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item name="propertiesMenu" @controller="form-designer:ShowPropertiesController">contextmenu.annot.properties</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <contextmenu-item @controller="form-designer:MultipleCopy">form-designer:contextMenu.multipleCopy</contextmenu-item>\n <contextmenu-item name="copyToPage" @controller="form-designer:CopyToPage">form-designer:contextMenu.copyToPage</contextmenu-item>\n <contextmenu-item name="setTabOrdern" @controller="form-designer:SetTabOrder">form-designer:contextMenu.setTabOrder</contextmenu-item>\n <contextmenu-separator></contextmenu-separator>\n <form-designer:alignment-menu></form-designer:alignment-menu>\n '+s+"\n </contextmenu>\n </template>\n ")}))}},t.prototype.destroy=function(){this.destroyHooks.forEach((function(e){return e()})),this.destroyHooks=[]},t.prototype.getAnnotRenderById=function(e,t){return this.pdfUI.getPDFPageRender(t).then((function(t){return t?{annot:t.page.annotIdMap[e],pageRender:t}:Promise.reject(new Error("cannot found widget by id:"+e))}))},t.prototype.receiveAction=function(e,n){var i=this;if(!t.isBlockedFeature()){var o=this.pdfUI,a=n.id,c=n.pageIndex;switch(e){case"activeWidget":o.getPDFPageRender(c).then((function(e){return e.isRendered?Promise.resolve():o.goToPage(c,0,0,!1)})).then((function(){return o.getStateHandlerManager()})).then((function(e){return o.getComponentByName(m.STATE_HANDLER_SELECT_ANNOTATION).then((function(t){var n=o.customs.isAccountExpired;return!!n&&n(!1)||t.isLocked||e.switchTo(m.STATE_HANDLER_SELECT_ANNOTATION),i.getAnnotRenderById(a,c)}))})).then((function(e){var t=e.annot,n=e.pageRender,r=t.getDeviceRect(n.getScale(),n.getRotation()),i=r.left,u=r.top;o.goToPage(c,u,i,!1).then((function(){!function e(){var t=o.editingMgr;t.type?t.activeElementByAnnotId(0,a):setTimeout(e,200)}()}))}));break;case"showPropertiesDialog":var u=o.formDesignDialog;this.getAnnotRenderById(n.id,n.pageIndex).then((function(e){var t=e.annot;u.setAnnot(t),u.show()}));break;case"removeWidget":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot;o.editingMgr.removeAnnot(t)}));break;case"multipleCopy":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot,n=o.multipleCopyDialog;if(n||(n=o.multipleCopyDialog=new s.default(o)),t.getField().controls.length>1)return o.alert({message:"form-designer:dialog.numberError",level:"warning"});o.editingMgr.enableShortcut(0),n.show(t,(function(e,t,n,r,i){if(o.editingMgr.enableShortcut(1),e){var a=e.getField(),c=e.getPage();return t?a.form.copyControls(e,c,i.map((function(t){return{rect:t,fieldName:a.getName(),srcObjectNumber:e.getObjNum()}}))):a.form.duplicateField(a.getName(),e,n,r,i).then((function(t){return o.editingMgr.updateLabel(e)}))}}))}));break;case"duplicate":this.getAnnotRenderById(a,c).then((function(e){var t=e.annot;o.editingMgr.enableShortcut(0),i.getDialog("Duplicate").show(t,t.page.doc.getPageCount(),[],(function(e,t){if(o.editingMgr.enableShortcut(1),e){var n=e.page.getIndex();t=t.filter((function(e){return e!=n})),o.getPDFDocRender().then((function(n){var r=n.getPDFDoc().pageCache,i=[];r.forEach((function(e){e&&i.push(e.getIndex())})),e.getField().form.duplicateWidget(t,e.getField().getName(),e.getObjNum(),i)}))}}))}))}this.pdfUI.getStore().then((function(t){switch(e){case"ev-receive-form-field-default-props":if(!i.callbacks)return;var o=function(){};"function"==typeof n?o=n:n&&n.length>0&&"function"==typeof n[0]&&(o=n[0]),i.callbacks.onFormFieldPropsChanged=o;break;case"ev-update-form-field-default-props":var a=r({},n);t.dispatch("update-form-field-default-props",a)}}))}},t}(o.UIXAddon);t.default=B},function(e,t){e.exports=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=M(n(20));n(33);var i=M(n(34)),o=M(n(36)),a=M(n(48)),c=M(n(49)),u=M(n(52)),s=M(n(53)),l=M(n(55)),d=M(n(57)),p=M(n(58)),f=M(n(60)),g=n(6),h=n(4);function M(e){return e&&e.__esModule?e:{default:e}}var m=UIExtension.EditActionsTab,y=UIExtension.vendors.jQuery,v=PDFViewCtrl.PDF.form.constant.Field_Flag,b=PDFViewCtrl.PDF.form.constant.Field_Type,D=PDFViewCtrl.PDF.annots.constant.Annot_Flags,A=PDFViewCtrl.ViewerEvents,N=PDFViewCtrl.PDF.constant.AnnotUpdatedType,I=PDFViewCtrl.shared.colorConvertor,j=PDFViewCtrl.FontUtil,T=j.stdFontMap,w=(j.FoxitFontMap,j.FontFamilies),x=UIExtension.PDFViewCtrl._internal.consts.ADD_FONT_MAP_LIST,O=UIExtension.PDFViewCtrl._internal.shared.stopPropagationOnShortcutEvent,E=UIExtension.PDFViewCtrl.keyboard.KeyboardUtils.matchers.Escape,_=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.PDFUI=t,this.addon=n,this.initDialog()}return e.prototype.initDialog=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.PDFUI,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.addon;if(!this.dialog){this.isDestroyed=!1;var g=(0,r.default)({fontFamilies:w,dateOptions:[{name:"m/d",value:"m/d"},{name:"m/d/yy",value:"m/d/yy"},{name:"m/d/yyyy",value:"m/d/yyyy"},{name:"mm/dd/yy",value:"mm/dd/yy"},{name:"mm/dd/yyyy",value:"mm/dd/yyyy"},{name:"mm/yy",value:"mm/yy"},{name:"mm/yyyy",value:"mm/yyyy"},{name:"d-mmm",value:"d-mmm"},{name:"d-mmm-yy",value:"d-mmm-yy"},{name:"d-mmm-yyyy",value:"d-mmm-yyyy"},{name:"dd-mmm-yy",value:"dd-mmm-yy"},{name:"dd-mmm-yyyy",value:"dd-mmm-yyyy"},{name:"yy-mm-dd",value:"yy-mm-dd"},{name:"yyyy-mm-dd",value:"yyyy-mm-dd"},{name:"mmm-yy",value:"mmm-yy"},{name:"mmm-yyyy",value:"mmm-yyyy"},{name:"mmmm-yy",value:"mmmm-yy"},{name:"mmmm-yyyy",value:"mmmm-yyyy"},{name:"mmm d, yyyy",value:"mmm d, yyyy"},{name:"mmmm d, yyyy",value:"mmmm d, yyyy"},{name:"m/d/yy h:MM tt",value:"m/d/yy h:MM tt"},{name:"m/d/yyyy h:MM tt",value:"m/d/yyyy h:MM tt"},{name:"m/d/yy HH:MM",value:"m/d/yy HH:MM"},{name:"m/d/yyyy HH:MM",value:"m/d/yyyy HH:MM"}],timeOptions:[{name:"HH:MM",value:"HH:MM"},{name:"h:MM tt",value:"h:MM tt"},{name:"HH:MM:ss",value:"HH:MM:ss"},{name:"h:MM:ss tt",value:"h:MM:ss tt"}]});this.dialog=t.parseTemplate(g),this.dialog.localize(),this.dialog.mounted(),this.$dialog=y(this.dialog.element),this.$tabNav=y(".fv__ui-form-tab-nav > div",this.$dialog),this.$closeDialog=y("[name=closeDialog]",this.$dialog),this.$locked=y("input[name=locked]",this.$dialog),this.$name=y("input[name=name]",this.$dialog),this.$tooltip=y("input[name=tooltip]",this.$dialog),this.$visibleType=y("select[name=visibleType]",this.$dialog),this.$readOnly=y("input[name=readOnly]",this.$dialog),this.$required=y("input[name=required]",this.$dialog),this.$orientation=y("select[name=fieldOrientation]",this.$dialog),this.$borderStyle=y("select[name=borderStyle]",this.$dialog),this.$borderWidth=y("select[name=borderWidth]",this.$dialog),this.$borderColor=y(".border-color-picker",this.$dialog),this.$fillColor=y(".fill-color-picker",this.$dialog),this.$textColor=y(".text-color-picker",this.$dialog),this.$fontName=y("select[name=fontName]",this.$dialog),this.$orientation=y("select[name=fieldOrientation]",this.$dialog),this.$directionRTL=y("[name=directionRTL]",this.$dialog),this.$calculateRadio=y("[name=calculateRadio]",this.$dialog),this.dialog.on("hidden",(function(e){return t.colorSpectrum.hide()})),this.tabs=[new p.default(this.$dialog,t,n),new i.default(this.$dialog,t,n),new o.default(this.$dialog,t,n),new s.default(this.$dialog,t,n),new c.default(this.$dialog,t,n),new m(this,t,"widget"),new u.default(this.$dialog,t,n),new a.default(this.$dialog,t,n),new l.default(this,t,n),new f.default(this.$dialog,t,n),new d.default(this,t,n)],this.bindEvent(),t.getStore().then((function(n){var r=n.subscribe(x,(function(t){var n=t.new,r="",i=[];n.slice(0).forEach((function(e){r+='<option value="'+e.name+'">'+e.name+"</option>",i.push({name:e.name,value:e.name})})),e.$fontName.append(r),e.customFontFamilies=i}));t.getPDFViewer().then((function(e){e.addDestroyHook((function(){r()}))}))})),t.getRootComponent().then((function(t){t.append(e.dialog)}))}},e.prototype.localize=function(){return this.dialog.localize()},e.prototype.setAnnot=function(e){var t=this;this.dialog||this.initDialog(),this.annot=e;var n=this.PDFUI.colorSpectrum;n&&n.isActive&&n.hide(),this.tabs.forEach((function(t){return t.setAnnot&&t.setAnnot(e)}));var r=(Object.keys(b).find((function(t){return b[t]===e.getField().getType()}))||"").toLowerCase();Object.keys(b).forEach((function(e){return t.$dialog.removeClass("fv__ui-form-"+e.toLowerCase())})),this.$dialog.addClass("fv__ui-form-"+r),this.$dialog.find("[show-in-types]").each((function(e,t){y(t).toggle(y(t).attr("show-in-types").indexOf(r)>-1)})),this.$dialog.find("[hide-in-types]").each((function(e,t){y(t).toggle(y(t).attr("hide-in-types").indexOf(r)<0)})),this.$dialog.find("[disabled-in-types]").each((function(e,t){y(t).prop("disabled",y(t).attr("disabled-in-types").indexOf(r)>-1)})),this.setValue();var i=y(".fv__ui-form-tab-nav .active",this.$dialog);if(i.length){var o=i.attr("show-in-types"),a=i.attr("hide-in-types"),c=!o||o.indexOf(r)>-1,u=a&&a.indexOf(r)>-1;c&&!u||this.$tabNav.eq(0).click()}return this},e.prototype.show=function(e){var t=this;return this.addon.dialogs.goto=this.PDFUI.activeActionsDialog,this.PDFUI.getRootComponent().then((function(e){t.dialog.open(e.element),t.tabs.forEach((function(e){return e.show&&e.show()}));var n=t.dialog.element.querySelectorAll('[tabindex]:not([tabindex="-1"])'),r=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n)).filter((function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0!==n&&0!==r}));if(!(r&&r.length>0&&-1!==r.indexOf(document.activeElement))){var i=y(".fv__ui-form-tab-nav .active",t.$dialog);3==t.annot.getField().getType()?(t.$fontName.parent().parent().css({position:"relative"}),t.$textColor.parent().addClass("disabled")):t.$textColor.parent().remove("disabled"),i.length||(i=t.$tabNav.eq(0)).click(),i.focus()}})),this},e.prototype.hide=function(){if(this.dialog)return this.dialog.hide(),this},e.prototype.isOpened=function(){return this.dialog&&this.dialog.isVisible},e.prototype.destroy=function(){if(!this.isDestroyed){for(var e in this.tabs.forEach((function(e){return e.offEvent&&e.offEvent()})),this.dialog.destroy(),this.$tabNav.off("click"),this.$closeDialog.off("click"),this.$name.off("blur"),this.$tooltip.off("blur"),this.$visibleType.off("change"),this.$readOnly.off("change"),this.$required.off("change"),this.$borderStyle.off("change"),this.$borderWidth.off("change"),this.$orientation.off("change"),this.$borderColor.off("click"),this.$fillColor.off("click"),this.$textColor.off("click"),this.$locked.off("change"),this)delete this[e];this.isDestroyed=!0}},e.prototype.bindEvent=function(){var e=this;this.$dialog.find("select").each((function(t,n){e.dialog.addDestroyHook(O(n,"keyup",E))})),y(".fv__ui-form-tab-nav, .fv__ui-form-tab-body",this.$dialog).on("pointerdown",(function(e){return e.stopPropagation()})),this.$tabNav.on("click",(function(t){e.$tabNav.removeClass("active"),y(t.target).addClass("active");var n=y(t.target).index(),r=y(".fv__ui-form-tab-body > div",e.$dialog).not(".lock-mask");r.hide(),r.eq(n).show(),e.tabs.forEach((function(e){return e.active&&e.annot&&e.annot.getField()&&e.active()}));var i=e.PDFUI.colorSpectrum;i&&i.hide()})),this.$closeDialog.on("click",(function(t){e.hide()})),this.$name.on("blur",(function(t){var n=y(t.target).val().trim(),r=e.annot.getField().getName(),i=e.annot.objectNumber;n&&n!==r&&e.PDFUI.getPDFViewer().then((function(t){t.getCurrentPDFDoc().loadPDFForm().then((function(t){t.validateFieldName(n,e.annot.info.fieldType).then((function(o){o?t.moveControl(r,n,i).then((function(t){if(!t)throw e.$name.val(r),new Error("Rename field error.");e.setLabel(e.annot),e.emitAnnotUpdateEvent(N.titleUpdated,!1)})):(e.$name.val(r),e.PDFUI.alert("dialog.error.validateFieldNameError"))}))}))}))})),this.$tooltip.on("blur",(function(t){var n=y(t.target).val().trim();e.annot.getField().setAlternateName(n)})),this.$visibleType.on("change",(function(t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(y(t.target).val().split("_"),3),r=n[0],i=n[1],o=n[2],a=e.annot.getFlags(),c=a;a&D.hidden&&(c-=D.hidden),a&D.print&&(c-=D.print),a&D.noView&&(c-=D.noView),c=c+Number(r)+Number(i)+Number(o),e.annot.setFlagValue(c).then((function(){e.annot.updateUI({type:"display",value:c}),e.annot.updateUI({})}))})),this.$readOnly.on("change",(function(t){e.annot.getField().setReadonly(y(t.target).prop("checked")),e.emitAnnotUpdateEvent(N.flagsUpdated,!0)})),this.$required.on("change",(function(t){e.annot.getField().setRequired(y(t.target).prop("checked")),e.emitAnnotUpdateEvent(N.flagsUpdated,!0)})),this.$directionRTL.on("change",(function(t){e.annot.setDirectionRTL(Number(y(t.target).val())).then((function(){e.emitAnnotUpdateEvent(N.alignmentUpdated,!0)}))})),this.$borderStyle.on("change",(function(t){var n=y(t.target).val(),r={solid:0,dashed:1,underline:2,beveled:3,inset:4}[n];e.annot.setBorderStyle(r,[3,3]).then((function(t){e.annot.updateUI({type:"borderStyle",value:n})}))})),this.$borderWidth.on("change",(function(t){var n={thin:1,medium:2,thick:3}[y(t.target).val()];e.annot.setBorderWidth(n).then((function(t){e.annot.updateUI({type:"borderWidth",value:n})}))})),this.$orientation.on("change",(function(t){var n=0;switch(y(t.target).val()){case"90":n=1;break;case"180":n=2;break;case"270":n=3}e.annot.setMKProperty("rotation",n).then((function(t){e.annot.updateUI({type:"orientation",value:n})}))})),this.$borderColor.on("click",(function(t){if(!e.$borderColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getMKProperty("borderColor");n.showTransparent(!0).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("border",t)}))}})),this.$fillColor.on("click",(function(t){if(!e.$borderColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getMKProperty("fillColor");n.showTransparent(!0).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("fill",t)}))}})),this.$textColor.on("click",(function(t){if(!e.$textColor.prop("disabled")){var n=e.PDFUI.colorSpectrum,r=e.annot.getDefaultAppearance().textColor;n.showTransparent(!1).setDefaultColor(r?I(r,"#"):"#ffffff"),n.show(t.target,(function(t){return e.setColor("textColor",t)}))}})),this.$fontName.on("change",(function(t){var n=y(t.target).val(),r=e.annot;void 0===T[n]&&(n=n.replace(" ","").replace("-","")),r.setDefaultAppearance({fontName:n});var i={type:"fontName",value:n};r.updateUI(i)})),this.$locked.on("change",(function(t){var n=e.annot.getFlags()+(y(t.target).prop("checked")?+D.locked:-D.locked);e.annot.setFlagValue(n),e.lockedHandler(y(t.target).prop("checked"))})),this.$calculateRadio.on("change",(function(e){y(e.target).val()})),this.tabs.forEach((function(e){return e.onEvent&&e.onEvent()}))},e.prototype.setColor=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r="number"==typeof t?t:I(t,"int"),i=void 0,o=void 0,a=this.annot,c={value:r};switch(e){case"fill":i=this.$fillColor,n&&(a.setMKProperty("fillColor",r),c.type="fillColor",a.updateUI(c),this.emitAnnotUpdateEvent(N.fillColorUpdated,!0));break;case"textColor":i=this.$textColor,n&&a.setDefaultAppearance({textColor:r}).then((function(){c.type="textColor",a.updateUI(c)}));break;default:i=this.$borderColor,n&&(a.setMKProperty("borderColor",r),c.type="borderColor",a.updateUI(c),this.emitAnnotUpdateEvent(N.borderColorUpdated,!0))}o=i.find(".label"),t?(i.css("border-color",t?I(t,"HTML"):"transparent"),o.hide()):(i.css("border-top-color","blue"),i.css("border-right-color","green"),o.show())},e.prototype.setValue=function(){var e=this.annot.getField(),t=this.annot.getBorderInfo(),n=this.annot.getFlags(),r=e.getFlags();this.$name.val(e.getName()),this.$tooltip.val(e.getAlternateName());var i=n&D.hidden,o=n&D.print,a=n&D.noView;this.$visibleType.val(i+"_"+o+"_"+a),this.$readOnly.prop("checked",!!v.isReadOnly(r)),this.$required.prop("checked",!!v.isRequired(r)),this.$borderStyle.val({0:"solid",1:"dashed",2:"underline",3:"beveled",4:"inset"}[t.style]||"solid"),this.$borderWidth.val({1:"thin",2:"medium",3:"thick"}[t.width]||"thick");var c=this.annot.getMKProperty("rotation");this.$orientation.val({0:"0",1:"90",2:"180",3:"270"}[c<0||c>3?0:c]);var u=this.annot.getMKProperty("borderColor");this.setColor("border",u,!1);var s=this.annot.getMKProperty("fillColor");this.setColor("fill",s,!1);var l=this.annot.getDAFontColor(),d=void 0,p=e.getAction(g.Action_Trigger.format);if(p&&"TypeJavaScript"==p.info.type)if(d=p.info.javascript,1==h.CFD_Utils.GetFormatStringType(d)){var f=1&h.CFD_Utils.GetNumberValues(d).iNeg?1:0,M=e.getDefaultValue(),m=e.getValue();(M&&0!=M.length||m&&0!=m.length)&&(l=f&&(M<0||m<0)?"#FF0000":l),this.$textColor.prop("disabled",f)}else this.$textColor.prop("disabled",!1);else this.$textColor.prop("disabled",!1);this.setColor("textColor",l,!1);var y=!!(n&D.locked);this.$locked.prop("checked",y),this.lockedHandler(y);var b=this.annot.getDefaultAppearance(),A=T[b.fontName],N=b.fontName;if(void 0===A){var I=w.find((function(e){return e.value===b.fontName}));I||(I=this.customFontFamilies&&this.customFontFamilies.find((function(e){return e.value.replace(" ","").replace("-","")===b.fontName}))),I||(I=this.customFontFamilies&&this.customFontFamilies.find((function(e){return e.value.replace(" ","").replace("-","")===b.fullName}))),N=I?I.value:"Times-Roman"}this.$fontName.val(N),this.$directionRTL.filter("[value="+(this.annot.getDirectionRTL()||0)+"]").prop("checked",!0),this.tabs.forEach((function(e){return e.setValue&&e.setValue()}))},e.prototype.lockedHandler=function(e){y(".lock-mask",this.$dialog).toggle(e)},e.prototype.emitAnnotUpdateEvent=function(e,t){this.PDFUI.eventEmitter.emit(A.annotationUpdated,[this.annot],this.annot.getPDFPage(),e),t&&this.PDFUI.eventEmitter.emit(A.annotationAppearanceUpdated,[this.annot],this.annot.getPDFPage())},e}();t.default=_},function(e,t,n){n(1),e.exports=function(e){"use strict";e=e||{};var t="",r=function(e){return t+=e};return t+='<layer name="form-properties-dialog" class="fv__ui-form-properties-dialog" @draggable>\r\n <div class="fv_ui_dialog_title">\r\n <div show-in-types="pushbutton" data-i18n="form-designer:dialog.pushButtonTitle"></div>\r\n <div show-in-types="checkbox" data-i18n="form-designer:dialog.checkBoxTitle"></div>\r\n <div show-in-types="radiobutton" data-i18n="form-designer:dialog.radioButtonTitle"></div>\r\n <div show-in-types="combobox" data-i18n="form-designer:dialog.comboBoxTitle"></div>\r\n <div show-in-types="listbox" data-i18n="form-designer:dialog.listBoxTitle"></div>\r\n <div show-in-types="text" data-i18n="form-designer:dialog.textFieldTitle"></div>\r\n <div show-in-types="sign" data-i18n="form-designer:dialog.signatureTitle"></div>\r\n <button href="javascript:;" class="fv__ui-layer-header-button" name="closeDialog" type="button">\r\n <i class="fv__icon-layer-close"></i>\r\n </button>\r\n </div>\r\n <div class="fv__ui-form-tab-nav">\r\n <div data-i18n="form-designer:dialog.tabNav.general"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.appearance"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.position"></div>\r\n <div hide-in-types="sign" data-i18n="form-designer:dialog.tabNav.options"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.format"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.validate"></div>\r\n <div show-in-types="combobox,text" data-i18n="form-designer:dialog.tabNav.calculate"></div>\r\n <div show-in-types="listbox" data-i18n="form-designer:dialog.tabNav.selectionChange"></div>\r\n <div data-i18n="form-designer:dialog.tabNav.action"></div>\r\n <div show-in-types="sign" data-i18n="form-designer:dialog.tabNav.signed"></div>\r\n </div>\r\n <div class="fv__ui-form-tab-body">\r\n ',r(n(23)(e)),t+="\r\n ",r(n(24)(e)),t+="\r\n ",r(n(25)(e)),t+="\r\n ",r(n(26)(e)),t+="\r\n ",r(n(27)(e)),t+="\r\n ",r(n(28)(e)),t+="\r\n ",r(n(29)(e)),t+="\r\n ",r(n(30)(e)),t+="\r\n ",r(n(31)(e)),t+="\r\n ",r(n(32)(e)),t+='\r\n <div class="lock-mask"></div>\r\n </div>\r\n <div class="d_f ai_c jc_sb footer">\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="locked"/>\r\n <div data-i18n="form-designer:dialog.footer.locked"></div>\r\n </label>\r\n <div class="fv__ui-dialog-button fv__ui-dialog-cancel-button" @stop-drag name="closeDialog" tabindex="0" @aria:role="button">dialog.close</div>\r\n </div>\r\n</layer>'}},function(e,t,n){"use strict";(function(t){
22
22
  /*! art-template@runtime | https://github.com/aui/art-template */
23
23
  var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=Object.create(n),i=/["&'<>]/;r.$escape=function(e){return function(e){var t=""+e,n=i.exec(t);if(!n)return e;var r="",o=void 0,a=void 0,c=void 0;for(o=n.index,a=0;o<t.length;o++){switch(t.charCodeAt(o)){case 34:c="&#34;";break;case 38:c="&#38;";break;case 39:c="&#39;";break;case 60:c="&#60;";break;case 62:c="&#62;";break;default:continue}a!==o&&(r+=t.substring(a,o)),a=o+1,r+=c}return a!==o?r+t.substring(a,o):r}(function e(t){return"string"!=typeof t&&(t=null==t?"":"function"==typeof t?e(t.call(t)):JSON.stringify(t)),t}(e))},r.$each=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t(e[n],n);else for(var i in e)t(e[i],i)},e.exports=r}).call(this,n(22))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.general.name"></div>\r\n <input type="text" class="f_1 h_24" name="name">\r\n <div class="w_120"></div>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.general.tooltip"></div>\r\n <input type="text" class="f_1 h_24" name="tooltip">\r\n <div class="w_120"></div>\r\n </label>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.general.commonProperties"></legend>\r\n <div class="bg-wrap">\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.general.formField"></div>\r\n <select class="f_1 h_24" name="visibleType" @aria:labelledby="::parent()::first()">\r\n <option data-i18n="form-designer:dialog.general.visible" value="0_4_0"></option>\r\n <option data-i18n="form-designer:dialog.general.hidden" value="2_4_0"></option>\r\n <option data-i18n="form-designer:dialog.general.visibleButUnprintable" value="0_0_0"></option>\r\n <option data-i18n="form-designer:dialog.general.hiddenButPrintable" value="0_4_32"></option>\r\n </select>\r\n <div class="pl_20 pr_10">\r\n <div class="w_160 pl_10">\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="readOnly"/>\r\n <div data-i18n="form-designer:dialog.general.readOnly"></div>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.general.orientation"></div>\r\n <select class="f_1 h_24" name="fieldOrientation" @aria:labelledby="::parent()::first()">\r\n <option value="0">0</option>\r\n <option value="90">90</option>\r\n <option value="180">180</option>\r\n <option value="270">270</option>\r\n </select>\r\n <div data-i18n="form-designer:dialog.general.degrees" class="pl_10"></div>\r\n <div class="pl_20 pr_10">\r\n <div class="w_160 pl_10">\r\n <label class="d_f ai_c">\r\n <input disabled-in-types="pushbutton,listbox" type="checkbox" name="required"/>\r\n <div data-i18n="form-designer:dialog.general.required"></div>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n</div>'}},function(e,t,n){var r=n(1);e.exports=function(e){"use strict";e=e||{};var t="",n=r.$each,i=e.fontFamilies,o=(e.value,e.index,r.$escape);return t+='<div>\r\n <fieldset class="d_f ai_c mb_10 fv__ui-form-designer-fieldset">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.appearance.bordersAndColors"></legend>\r\n <div class="bg-wrap">\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.borderColor"></div>\r\n <div class="color-picker">\r\n <div class="border-color-picker" tabindex="0" @aria:role="button" @aria:labelledby="::parent()::previousSiblings()">\r\n <div class="label">?</div>\r\n <div class="mask"></div>\r\n </div>\r\n </div>\r\n <div class="w_60"></div>\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.lineStyle"></div>\r\n <select class="f_1 h_24 mr_20" name="borderStyle" @aria:labelledby="::previousSiblings()">\r\n <option data-i18n="form-designer:dialog.appearance.solid" value="solid"></option>\r\n <option data-i18n="form-designer:dialog.appearance.dashed" value="dashed"></option>\r\n <option data-i18n="form-designer:dialog.appearance.underline" value="underline"></option>\r\n <option data-i18n="form-designer:dialog.appearance.beveled" value="beveled"></option>\r\n <option data-i18n="form-designer:dialog.appearance.inset" value="inset"></option>\r\n </select>\r\n </div>\r\n <div class="d_f ai_c">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.fillColor"></div>\r\n <div class="color-picker">\r\n <div class="fill-color-picker" tabindex="0" @aria:role="button" @aria:labelledby="::parent()::previousSiblings()">\r\n <div class="label">?</div>\r\n <div class="mask"></div>\r\n </div>\r\n </div>\r\n <div class="w_60"></div>\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.thickness"></div>\r\n <select class="f_1 h_24 mr_20" name="borderWidth" @aria:labelledby="::previousSiblings()">\r\n <option data-i18n="form-designer:dialog.appearance.thin" value="thin"></option>\r\n <option data-i18n="form-designer:dialog.appearance.medium" value="medium"></option>\r\n <option data-i18n="form-designer:dialog.appearance.thick" value="thick"></option>\r\n </select>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.appearance.text"></legend>\r\n <div class="bg-wrap">\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.fontSize"></div>\r\n <dropdown name="textSize" selectable="false" class="f_1 h_24" @controller="form-designer:FieldPropertiesAppearanceController as fpc" editable="true" @aria:labelledby="::previousSiblings()">\r\n <dropdown-button @foreach="size in fpc.textSizeList" @sync.text="size" @on.click="fpc.selectFontSize(size)"></dropdown-button>\r\n </dropdown>\r\n <div class="w_60"></div>\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.textColor"></div>\r\n <div class="color-picker mr_20">\r\n <div class="text-color-picker" tabindex="0" @aria:role="button" @aria:labelledby="::parent()::previousSiblings()">\r\n <div class="label">?</div>\r\n <div class="mask"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.font"></div>\r\n <select disabled-in-types="sign,checkbox,radiobutton" class="f_1 h_24 mr_20" name="fontName" @aria:labelledby="::previousSiblings()">\r\n ',n(i,(function(e,n){t+='\r\n <option value="',t+=o(e.value),t+='">',t+=o(e.name),t+="</option>\r\n "})),t+='\r\n </select>\r\n </div>\r\n <div class="d_f ai_c">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.appearance.direction"></div>\r\n <div class="d_f ai_c jc_sb f_1" @aria:role="radiogroup" @aria:labelledby="::previousSiblings()">\r\n <div class="d_f ai_c fv__ui-form-properties-label">\r\n <input disabled-in-types="sign,checkbox,radiobutton" type="radio" value="0" name="directionRTL" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.appearance.leftToRight"></div>\r\n </div>\r\n <div class="d_f ai_c mr_20 fv__ui-form-properties-label">\r\n <input disabled-in-types="sign,checkbox,radiobutton" type="radio" value="1" name="directionRTL" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.appearance.rightToLeft"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div class="form-properties-dialog-position-tab">\r\n <label class="item">\r\n <div class="title-label" data-i18n="form-designer:dialog.position.units"></div>\r\n <select name="units" class="title-md-control">\r\n <option data-i18n="form-designer:dialog.position.points" value="pt"></option>\r\n <option data-i18n="form-designer:dialog.position.inches" value="inch"></option>\r\n <option data-i18n="form-designer:dialog.position.centimeters" value="cm"></option>\r\n <option data-i18n="form-designer:dialog.position.picas" value="pica"></option>\r\n <option data-i18n="form-designer:dialog.position.millimeters" value="mm"></option>\r\n </select>\r\n </label>\r\n <fieldset class="item fv__ui-form-designer-fieldset">\r\n <legend class="title" data-i18n="form-designer:dialog.position.name"></legend>\r\n <div class="item inputContainer">\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.left"></div>\r\n <number name="left" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.bottom"></div>\r\n <number name="bottom" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.right"></div>\r\n <number name="right" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.top"></div>\r\n <number name="top" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.width"></div>\r\n <number name="width" class="positionWidth" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n <div class="inlineItem" text-content-after="*">\r\n <div data-i18n="form-designer:dialog.position.height"></div>\r\n <number name="height" class="positionHeight" min="0" step="0.01"></number>\r\n <span class="unit"></span>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <div class="item">\r\n <div class="title-label"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="lockWidthHeight"/>\r\n <div data-i18n="form-designer:dialog.position.required"></div>\r\n </label>\r\n </div>\r\n</div>\r\n'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div>\r\n <div hide-in-types="sign">\r\n <div show-in-types="pushbutton">\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.pushButton.layout"></div>\r\n <select class="f_1 h_24" name="layout">\r\n <option data-i18n="form-designer:dialog.options.pushButton.labelOnly" value="e_MKRelationNoIcon"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.iconOnly" value="e_MKRelationNoCaption"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.iconTopLabelBottom" value="e_MKRelationCaptionBelowIcon"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.labelTopIconBottom" value="e_MKRelationCaptionAboveIcon"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.iconLeftLabelRight" value="e_MKRelationCaptionRight"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.labelLeftIconRight" value="e_MKRelationCaptionLeft"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.labelOverIcon" value="e_MKRelationCaptionOvrlayOnIcon"></option>\r\n </select>\r\n <div class="pl_20 pr_10">\r\n <div class="fv__ui-dialog-button small w_100" name="advanced" @aria:button>form-designer:dialog.options.pushButton.advanced</div>\r\n </div>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.pushButton.behavior"></div>\r\n <select class="f_1 h_24" name="behavior">\r\n <option data-i18n="form-designer:dialog.options.pushButton.none" value="e_HighlightingNone"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.push" value="e_HighlightingPush"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.outline" value="e_HighlightingOutline"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.invert" value="e_HighlightingInvert"></option>\r\n </select>\r\n <div class="pl_20 pr_10"><div class="w_100"></div></div>\r\n </label>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.options.pushButton.iconAndLabel"></legend>\r\n <div class="bg-wrap">\r\n <div class="d_f ai_c mb_10">\r\n <div class="ml_20 w_160" data-i18n="form-designer:dialog.options.pushButton.state"></div>\r\n <div class="mr_10 w_50 ta_r" data-i18n="form-designer:dialog.options.pushButton.label"></div>\r\n <input type="text" class="f_1 h_24 mr_20 b_1s bc_ddd" name="stateLabel" @aria:labelledby="::previousSiblings()">\r\n </div>\r\n <div class="d_f">\r\n <select class="ml_20 h_100 w_130 state-position" name="position" multiple @aria:labelledby="::parent()::previousSiblings()::childAt(0)">\r\n <option data-i18n="form-designer:dialog.options.pushButton.up" value="up"></option>\r\n \x3c!-- <option data-i18n="form-designer:dialog.options.pushButton.down" value="down"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.rollover" value="rollover"></option> --\x3e\r\n </select>\r\n <div class="mr_10 w_70 ta_r ml_10" data-i18n="form-designer:dialog.options.pushButton.icon"></div>\r\n <div class="w_100 h_100 b_1s bc_ddd b_fff wrap-icon">\r\n <img class="icon-img" @aria:labelledby="::parent()::previousSiblings()"/>\r\n </div>\r\n <div class="d_f fd_c jc_c ai_c f_1">\r\n <label @aria:button for="chooseIconFile" class="fv__ui-dialog-button small w_120 plpr_0" name="chooseIcon">form-designer:dialog.options.pushButton.chooseIcon</label>\r\n <input id="chooseIconFile" type="file" accept="image/jpg,image/jpeg,image/bmp,image/png" style="display: none;" @aria:labelledby="::previousSiblings()">\r\n <div class="fv__ui-dialog-button small w_120 mt_20" name="clearIcon" @aria:button>form-designer:dialog.options.pushButton.clear</div>\r\n </div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n \x3c!-- Advanced弹窗 --\x3e\r\n <div class="fv__ui-form-properties-dialog fv__ui-layer fv__advanced-dialog" @aria:role="dialog" tabindex="-1" @aria:labelledby="fv--form-designer-pushbutton-advance-title" @aria:describedby="fv--form-designer-pushbutton-advance-tip">\r\n <div class="fv_ui_dialog_title">\r\n <div data-i18n="form-designer:dialog.options.pushButton.advancedDialog.title" name="fv--form-designer-pushbutton-advance-title"></div>\r\n <i class="fv__icon-layer-close" @aria:button></i>\r\n </div>\r\n <div class="fv__advanced-body">\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.labelScaleType"></div>\r\n <select class="f_1 h_24" name="scaleType">\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionAlways" value="e_ScaleWayAlways"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionNever" value="e_ScaleWayNever"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionBig" value="e_ScaleWayBigger"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionSmall" value="e_ScaleWaySmaller"></option>\r\n </select>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.labelScale"></div>\r\n <select class="f_1 h_24" name="scale">\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionProportionally" value="true"></option>\r\n <option data-i18n="form-designer:dialog.options.pushButton.advancedDialog.optionNonProportionally" value="false"></option>\r\n </select>\r\n </label>\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_150 ta_r">\r\n <label class="d_f ai_c jc_fe">\r\n <input type="checkbox" name="fit"/>\r\n <div data-i18n="form-designer:dialog.options.pushButton.advancedDialog.checkFit"></div>\r\n </label>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_90 ta_r" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.labelButton" name="fv--form-designer-pushbutton-advance-bounds-label"></div>\r\n <div class="wrap-icon w_100 h_100 b_1s bc_ddd">\r\n <div class="icon w_60 h_60 b_1s bc_ddd d_f ai_c jc_c" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.icon"></div>\r\n </div>\r\n <div class="p_r w_14 h_100 ml_10">\r\n <input class="slider-y" type="range" step="1" min="0" max="100" @aria:labelledby="::parent()::parent()::childAt(0)">\r\n </div>\r\n </div>\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_90 ta_r"></div>\r\n <div class="p_r w_100 h_14">\r\n <input class="slider-x" type="range" step="1" min="0" max="100" @aria:labelledby="::parent()::parent()::previousSiblings()::childAt(0)">\r\n </div>\r\n <div class="fraction ml_5" @aria:attr.live="\'assertive\'" @aria:labelledby="::parent()::previousSiblings()::childAt(0)">(0,0)</div>\r\n </div>\r\n <div class="d_f ai_c mb_10" name="fv--form-designer-pushbutton-advance-tip" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.tip"></div>\r\n </div>\r\n <div class="d_f ai_c jc_sb footer">\r\n <div @aria:button class="fv__ui-dialog-button fv__ui-dialog-cancel-button reset-button" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.buttonReset"></div>\r\n <div @aria:button class="fv__ui-dialog-button fv__ui-dialog-cancel-button confirm-button" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.buttonOk"></div>\r\n <div @aria:button class="fv__ui-dialog-button fv__ui-dialog-cancel-button cancel-button" data-i18n="form-designer:dialog.options.pushButton.advancedDialog.buttonCancel"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div show-in-types="combobox,listbox" class="fv__comboListOptions_tab">\r\n <div class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.comboListBox.item"></div>\r\n <input type="text" class="f_1 h_24" name="itemLabel" @aria:labelledby="::previousSiblings()">\r\n <div class="fv__ui-dialog-button small w_100 mlmr_20" name="addItemBtn" @aria:button>form-designer:dialog.options.comboListBox.add</div>\r\n </div>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.comboListBox.exportValue"></div>\r\n <input type="text" class="f_1 h_24" name="itemValue">\r\n <div class="w_100 mlmr_20"></div>\r\n </label>\r\n <div class="d_f mb_10">\r\n <div class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.comboListBox.itemList"></div>\r\n <select class="f_1 h_200" multiple name="items" @aria:labelledby="::previousSiblings()"></select>\r\n <div class="d_f fd_c">\r\n <div class="fv__ui-dialog-button small w_100 mlmr_20" name="deleteItemBtn" @aria:button>form-designer:dialog.options.comboListBox.delete</div>\r\n <div class="fv__ui-dialog-button small w_100 mlmr_20 mt_20" name="upItemBtn" @aria:button>form-designer:dialog.options.comboListBox.up</div>\r\n <div class="fv__ui-dialog-button small w_100 mlmr_20 mt_20" name="downItemBtn" @aria:button>form-designer:dialog.options.comboListBox.down</div>\r\n </div>\r\n </div>\r\n \x3c!-- GSDK未提供支持,暂时隐藏\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="xxx"/>\r\n <div data-i18n="form-designer:dialog.options.comboListBox.sortItems"></div>\r\n </label>\r\n </div>\r\n --\x3e\r\n <div hide-in-types="listbox" class="d_f ai_c h_24 mb_10">\r\n <div class="w_120"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="allowUserEnter"/>\r\n <div data-i18n="form-designer:dialog.options.comboListBox.allowUserEnter"></div>\r\n </label>\r\n </div>\r\n <div hide-in-types="combobox" class="d_f ai_c h_24 mb_10">\r\n <div class="w_120"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="multiSelect"/>\r\n <div data-i18n="form-designer:dialog.options.comboListBox.multipleSelection"></div>\r\n </label>\r\n </div>\r\n \x3c!-- GSDK未提供支持,暂时隐藏\r\n <div class="d_f ai_c h_24">\r\n <div class="w_120"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="xxx"/>\r\n <div data-i18n="form-designer:dialog.options.comboListBox.commitSelectedValue"></div>\r\n </label>\r\n </div>\r\n --\x3e\r\n </div>\r\n <div show-in-types="checkbox,radiobutton">\r\n <label class="d_f ai_c mb_10">\r\n <div show-in-types="checkbox" class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.choice.checkboxStyle"></div>\r\n <div show-in-types="radiobutton" class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.choice.buttonStyle"></div>\r\n <select class="f_1 h_24" name="buttonStyle">\r\n <option data-i18n="form-designer:dialog.options.choice.check" value="4"></option>\r\n <option data-i18n="form-designer:dialog.options.choice.circle" value="l"></option>\r\n <option data-i18n="form-designer:dialog.options.choice.cross" value="8"></option>\r\n <option data-i18n="form-designer:dialog.options.choice.diamond" value="u"></option>\r\n <option data-i18n="form-designer:dialog.options.choice.square" value="n"></option>\r\n <option data-i18n="form-designer:dialog.options.choice.star" value="H"></option>\r\n </select>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_130 ta_r" data-i18n="form-designer:dialog.options.choice.exportValue"></div>\r\n <input type="text" class="f_1 h_24" name="exportValue">\r\n </label>\r\n <div class="d_f ai_c h_24">\r\n <div class="w_130 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="selectedByDefault"/>\r\n <div data-i18n="form-designer:dialog.options.choice.checkedByDefault"></div>\r\n </label>\r\n </div>\r\n <div hide-in-types="checkbox" class="d_f ai_c h_24 mt_10">\r\n <div class="w_130 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="radioButtonsValue"/>\r\n <div data-i18n="form-designer:dialog.options.choice.radioSameNameValueUnison"></div>\r\n </label>\r\n </div>\r\n </div>\r\n <div show-in-types="text">\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.textField.alignment"></div>\r\n <select class="f_1 h_24" name="alignment">\r\n <option data-i18n="form-designer:dialog.options.textField.left" value="0"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.center" value="1"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.right" value="2"></option>\r\n </select>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.textField.defaultValue"></div>\r\n <textarea class="h_60 f_1" name="defaultValue"></textarea>\r\n </label>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="scrollLongText"/>\r\n <div data-i18n="form-designer:dialog.options.textField.scrollLongText"></div>\r\n </label>\r\n </div>\r\n \x3c!-- 暂时隐藏,等待GSDK提供支持\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="richText"/>\r\n <div data-i18n="form-designer:dialog.options.textField.allowRichTextFormatting"></div>\r\n </label>\r\n </div>\r\n --\x3e\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="textLimit" @aria:labelledby="::nextSiblings(),::parent()::allAfter()"/>\r\n <div data-i18n="form-designer:dialog.options.textField.limitOf"></div>\r\n </label>\r\n <input type="text" class="w_60 h_24 mlmr_10" name="maxLengthTextLimit" @aria:labelledby="::nextSiblings()">\r\n <div data-i18n="form-designer:dialog.options.textField.characters"></div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="textPassword"/>\r\n <div data-i18n="form-designer:dialog.options.textField.password"></div>\r\n </label>\r\n </div>\r\n \x3c!-- 暂时隐藏,等待GSDK提供支持 \r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="fileSelect"/>\r\n <div data-i18n="form-designer:dialog.options.textField.fieldIsUsedForFileSelection"></div>\r\n </label>\r\n </div>\r\n --\x3e\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="checkSpell"/>\r\n <div data-i18n="form-designer:dialog.options.textField.checkSpelling"></div>\r\n </label>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="textComb" @aria:describedby="::nextSiblings(),::parent()::allAfter()"/>\r\n <div data-i18n="form-designer:dialog.options.textField.combOf"></div>\r\n </label>\r\n <input type="text" class="w_60 h_24 mlmr_10" name="maxLengthTextComb" @aria:labelledby="::nextSiblings()">\r\n <div data-i18n="form-designer:dialog.options.textField.characters"></div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_5">\r\n <div class="w_120 fs_0"></div>\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="multiLine"/>\r\n <div data-i18n="form-designer:dialog.options.textField.multiLine"></div>\r\n </label>\r\n </div>\r\n \x3c!-- 暂时隐藏,等待GSDK提供支持\r\n <div class="d_f ai_c h_24 mb_5">\r\n <div class="w_120 fs_0"></div>\r\n <div data-i18n="form-designer:dialog.options.textField.lineSpacing" class="pr_10 w_120 ta_r"></div>\r\n <select class="w_120 h_24" name="lineSpace">\r\n <option data-i18n="form-designer:dialog.options.textField.single" value="0,0"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.lines1_5" value="1,0"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.doubleLines" value="2,0"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.exactly" value="3,0"></option>\r\n <option data-i18n="form-designer:dialog.options.textField.auto" value="auto"></option>\r\n </select>\r\n </div>\r\n --\x3e\r\n <div class="d_f ai_c h_24">\r\n <div class="w_120 fs_0"></div>\r\n <div class="pr_10 w_120 ta_r" data-i18n="form-designer:dialog.options.textField.at"></div>\r\n <input type="text" class="w_90 h_24" name="lineSpaceExactlyValue" @aria:labelledby="::parent()"/>\r\n <div class="w_30 ta_c" data-i18n="form-designer:dialog.options.textField.pt"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n'}},function(e,t,n){var r=n(1);e.exports=function(e){"use strict";var t="",n=(e=e||{}).i,i=r.$escape,o=r.$each,a=e.dateOptions,c=(e.item,e.index,e.timeOptions);for(t+='<div>\r\n <div show-in-types="combobox,text">\r\n <label class="d_f ai_c">\r\n <div data-i18n="form-designer:dialog.format.selectFormatCategory"></div>\r\n <select class="w_180 h_24 ml_10" name="category">\r\n <option data-i18n="form-designer:dialog.format.none" value="none"></option>\r\n <option data-i18n="form-designer:dialog.format.number" value="number"></option>\r\n <option data-i18n="form-designer:dialog.format.percentage" value="percentage"></option>\r\n <option data-i18n="form-designer:dialog.format.date" value="date"></option>\r\n <option data-i18n="form-designer:dialog.format.time" value="time"></option>\r\n <option data-i18n="form-designer:dialog.format.special" value="special"></option>\r\n <option data-i18n="form-designer:dialog.format.custom" value="custom"></option>\r\n </select>\r\n </label>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="number">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.optionTitle.number"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.decimalPlaces"></div>\r\n <select class="f_1 h_24" name="decimalPlaces">\r\n ',n=0;n<=10;n++)t+='\r\n <option value="',t+=i(n),t+='">',t+=i(n),t+="</option>\r\n ";for(t+='\r\n </select>\r\n <div class="w_120"></div>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.separatorStyle"></div>\r\n <select class="f_1 h_24" name="separatorStyle">\r\n <option value="0">1,234.56</option>\r\n <option value="1">1234.56</option>\r\n <option value="2">1.234,56</option>\r\n <option value="3">1234,56</option>\r\n <option value="4">1 234,56</option>\r\n </select>\r\n <div class="w_120"></div>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.currencySymbol"></div>\r\n <select class="f_1 h_24" name="currencySymbol">\r\n <option value="0" data-i18n="form-designer:dialog.format.none"></option>\r\n <option value="1" data-i18n="form-designer:dialog.format.currencySymbolList.USDollar"></option>\r\n <option value="2" data-i18n="form-designer:dialog.format.currencySymbolList.DeutschMark"></option>\r\n <option value="3" data-i18n="form-designer:dialog.format.currencySymbolList.Euro"></option>\r\n <option value="4" data-i18n="form-designer:dialog.format.currencySymbolList.DutchGuilder"></option>\r\n <option value="5" data-i18n="form-designer:dialog.format.currencySymbolList.Franc"></option>\r\n <option value="6" data-i18n="form-designer:dialog.format.currencySymbolList.DanishKrone"></option>\r\n <option value="7" data-i18n="form-designer:dialog.format.currencySymbolList.ItalianLira"></option>\r\n <option value="8" data-i18n="form-designer:dialog.format.currencySymbolList.SpanishPeseta"></option>\r\n <option value="9" data-i18n="form-designer:dialog.format.currencySymbolList.Pound"></option>\r\n <option value="10" data-i18n="form-designer:dialog.format.currencySymbolList.AustralianDollar"></option>\r\n <option value="11" data-i18n="form-designer:dialog.format.currencySymbolList.NewZealandDollar"></option>\r\n <option value="12" data-i18n="form-designer:dialog.format.currencySymbolList.RussianRuble"></option>\r\n <option value="13" data-i18n="form-designer:dialog.format.currencySymbolList.PortugueseEscudo"></option>\r\n <option value="14" data-i18n="form-designer:dialog.format.currencySymbolList.HongKongDollar"></option>\r\n <option value="15" data-i18n="form-designer:dialog.format.currencySymbolList.MacaoPataca"></option>\r\n <option value="16" data-i18n="form-designer:dialog.format.currencySymbolList.RenminbiYuan"></option>\r\n <option value="17" data-i18n="form-designer:dialog.format.currencySymbolList.NewTaiwanDollar"></option>\r\n <option value="18" data-i18n="form-designer:dialog.format.currencySymbolList.SingaporeDollar"></option>\r\n <option value="19" data-i18n="form-designer:dialog.format.currencySymbolList.KoreanWon"></option>\r\n <option value="20" data-i18n="form-designer:dialog.format.currencySymbolList.JapaneseYen"></option>\r\n <option value="21" data-i18n="form-designer:dialog.format.currencySymbolList.PolishZloty"></option>\r\n <option value="22" data-i18n="form-designer:dialog.format.currencySymbolList.Krona"></option>\r\n <option value="23" data-i18n="form-designer:dialog.format.currencySymbolList.NorwegianKrone"></option>\r\n <option value="24" data-i18n="form-designer:dialog.format.currencySymbolList.CanadianDollar"></option>\r\n </select>\r\n <div class="w_120"></div>\r\n </label>\r\n <div class="d_f">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.negativeNumberStyle"></div>\r\n <div>\r\n <label class="lh_24 d_f ai_c">\r\n <input type="checkbox" name="showParentheses"/>\r\n <div data-i18n="form-designer:dialog.format.showParentheses"></div>\r\n </label>\r\n <label class="lh_24 d_f ai_c">\r\n <input type="checkbox" name="useRedText"/>\r\n <div data-i18n="form-designer:dialog.format.useRedText"></div>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="percentage">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.format.percentage"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.decimalPlaces"></div>\r\n <select class="f_1 h_24" name="percentDecimalPlaces">\r\n ',n=0;n<=10;n++)t+='\r\n <option value="',t+=i(n),t+='">',t+=i(n),t+="</option>\r\n ";return t+='\r\n </select>\r\n <div class="w_120"></div>\r\n </label>\r\n <label class="d_f ai_c mb_10">\r\n <div class="lh_24 pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.separatorStyle"></div>\r\n <select class="f_1 h_24" name="percentSeparatorStyle">\r\n <option value="0">1,234.56</option>\r\n <option value="1">1234.56</option>\r\n <option value="2">1.234,56</option>\r\n <option value="3">1234,56</option>\r\n <option value="4">1 234,56</option>\r\n </select>\r\n <div class="w_120"></div>\r\n </label>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="date">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.format.date"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div>\r\n <div class="d_f jc_c ai_c mb_10">\r\n <select class="w_300 h_150" multiple name="dateFormatOptions">\r\n ',o(a,(function(e,n){t+='\r\n <option value="',t+=i(e.value),t+='">',t+=i(e.name),t+="</option>\r\n "})),t+='\r\n <option value="Custom" data-i18n="form-designer:dialog.format.custom"></option>\r\n </select>\r\n </div>\r\n <div class="d_f jc_c ai_c" name="dateCustomFormat">\r\n <input type="text" class="w_300 h_24" name="dateCustomFormatText" @aria:labelledby="::parent()::previousSiblings()::childAt(0)">\r\n </div>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="time">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.format.time"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div>\r\n <div class="d_f jc_c ai_c mb_10">\r\n <select class="w_300 h_150" multiple name="timeFormatOptions">\r\n ',o(c,(function(e,n){t+='\r\n <option value="',t+=i(e.value),t+='">',t+=i(e.name),t+="</option>\r\n "})),t+='\r\n <option value="Custom" data-i18n="form-designer:dialog.format.custom"></option>\r\n </select>\r\n </div>\r\n <div class="d_f jc_c ai_c" name="timeCustomFormat">\r\n <input type="text" class="w_300 h_24" name="timeCustomFormatText" @aria:labelledby="::parent()::previousSiblings()::childAt(0)">\r\n </div>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="special">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.format.special"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div>\r\n <div class="d_f jc_c ai_c mb_10">\r\n <select class="w_300 h_150" multiple name="specialFormatOptions">\r\n <option value="zipCode" data-i18n="form-designer:dialog.format.zipCode"></option>\r\n <option value="zipCode4" data-i18n="form-designer:dialog.format.zipCode4"></option>\r\n <option value="phoneNumber" data-i18n="form-designer:dialog.format.phoneNumber"></option>\r\n <option value="socialSecurityNumber" data-i18n="form-designer:dialog.format.socialSecurityNumber"></option>\r\n <option value="arbitraryMask" data-i18n="form-designer:dialog.format.arbitraryMask"></option>\r\n </select>\r\n </div>\r\n <div class="d_f jc_c ai_c" name="specialArbitraryFormat">\r\n <input type="text" class="w_300 h_24" name="specialArbitraryFormatText" @aria:labelledby="::parent()::previousSiblings()::childAt(0)">\r\n </div>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="custom">\r\n <legend class="d_f ai_c" data-i18n="form-designer:dialog.format.custom"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div class="plpr_20">\r\n <div class="mtmb_10" data-i18n="form-designer:dialog.format.customFormatScript"></div>\r\n <div class="d_f">\r\n <textarea class="f_1 mr_20 h_70" name="editFormat" @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div @aria:button class="fv__ui-dialog-button small w_80 plpr_0" name="btnEditFormat" @aria:describedby="::parent()::previousSiblings()">form-designer:dialog.format.edit</div>\r\n </div>\r\n <div class="mtmb_10" data-i18n="form-designer:dialog.format.customKeystrokeScript"></div>\r\n <div class="d_f">\r\n <textarea class="f_1 mr_20 h_70" name="editKeystroke" @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div @aria:button class="fv__ui-dialog-button small w_80 plpr_0" name="btnEditKeystroke" @aria:describedby="::parent()::previousSiblings()">form-designer:dialog.format.edit</div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c h_30" name="categoryExample" aria-live="polite">\r\n <div class="pr_10 w_200 ta_r" data-i18n="form-designer:dialog.format.exampleOfCurrentFormat"></div>\r\n <div name="exampleText"></div>\r\n </div>\r\n </div>\r\n </fieldset>\r\n <fieldset class="d_f ai_c mb_10 mt_22 fv__ui-form-designer-fieldset" categoryValue="none">\r\n <legend class="d_f ai_c"></legend>\r\n <div class="bg-wrap h_250 d_f fd_c jc_sb">\r\n <div></div>\r\n </div>\r\n </fieldset>\r\n <div class="mt_10" name="categoryInfo"></div>\r\n </div>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div>\r\n <div show-in-types="combobox,text" @aria:role="radiogroup">\r\n <div class="d_f ai_c h_24 mb_10" >\r\n <input type="radio" value="0" name="validateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.validate.fieldValueIsNotValidated" class="ml_5"></div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10" name="validate-child-1">\r\n <input type="radio" value="1" name="validateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.validate.fieldValueIsInRange" class="ml_5"></div>\r\n </div>\r\n <div class="d_f ai_c mb_10 pl_30 disabled" name="validate-child-2">\r\n <div data-i18n="form-designer:dialog.validate.from"></div>\r\n <input type="text" name="editFrom" class="w_120 h_24 ml_10" @aria:labelledby="::previousSiblings()" @aria:describedby="::parent()::previousSiblings()::childAt(1),::parent()>*"/>\r\n <div class="w_80"></div>\r\n <div data-i18n="form-designer:dialog.validate.to"></div>\r\n <input type="text" name="editTo" class="w_120 h_24 ml_10" @aria:labelledby="::previousSiblings()" @aria:describedby="::parent()::previousSiblings()::childAt(1),::parent()>*"/>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <input type="radio" value="2" name="validateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.validate.runCustomValidationScript" class="ml_5"></div>\r\n </div>\r\n <div class="d_f pl_30 disabled" name="validate-child-3">\r\n <textarea class="f_1 mr_20 h_70" disabled name="textScript" @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div class="fv__ui-dialog-button small w_80 plpr_0" name="btnEditScript" @aria:button>form-designer:dialog.validate.edit</div>\r\n </div>\r\n </div>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div>\r\n <div show-in-types="combobox,text" class="fv__calculate-tab" @aria:role="radio">\r\n <div class="d_f ai_c h_24 mb_10">\r\n <input id="noCalc" type="radio" value="0" name="calculateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.calculate.valueIsNotCalculated" class="ml_5"></div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <input type="radio" id="simpleCalc" value="1" name="calculateRadio" @aria:labelledby="::parent()"/>\r\n <div data-i18n="form-designer:dialog.calculate.valueIsThe" class="ml_5"></div>\r\n <select id="simpleOp" class="w_100 mlmr_5 h_24" @aria:labelledby="::parent()>*">\r\n <option value="SUM" data-i18n="form-designer:dialog.calculate.sum"></option>\r\n <option value="PRD" data-i18n="form-designer:dialog.calculate.product"></option>\r\n <option value="AVG" data-i18n="form-designer:dialog.calculate.average"></option>\r\n <option value="MIN" data-i18n="form-designer:dialog.calculate.minimum"></option>\r\n <option value="MAX" data-i18n="form-designer:dialog.calculate.maximum"></option>\r\n </select>\r\n <div data-i18n="form-designer:dialog.calculate.ofTheFollowFields"></div>\r\n </div>\r\n <div class="d_f pl_30 mb_10 disabled" name="calculate-child-2">\r\n <textarea id="simpleFields" class="f_1 mr_20 h_70" readonly @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div class="fv__ui-dialog-button small w_100 plpr_0 disabled" id="pickFields" @aria:button>form-designer:dialog.calculate.pick</div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <input type="radio" id="notationInput" value="2" name="calculateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.calculate.simplifiedFieldNotation" class="ml_5"></div>\r\n </div>\r\n <div class="d_f pl_30 mb_10 disabled" name="calculate-child-3">\r\n <textarea id="notations" class="f_1 mr_20 h_70" readonly @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div class="fv__ui-dialog-button small w_100 plpr_0 disabled" id="editNotations" @aria:button>form-designer:dialog.calculate.edit</div>\r\n </div>\r\n <div class="d_f ai_c h_24 mb_10">\r\n <input type="radio" id="customInput" value="3" name="calculateRadio" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.calculate.customCalculateScript" class="ml_5"></div>\r\n </div>\r\n <div class="d_f pl_30 disabled" name="calculate-child-4">\r\n <textarea id="COCustomScript" class="f_1 mr_20 h_70" readonly @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <div class="fv__ui-dialog-button small w_100 plpr_0 disabled" id="editCustomScript" @aria:button>form-designer:dialog.calculate.edit</div>\r\n </div>\r\n </div>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div>\r\n <div show-in-types="listbox" class="fv_list-action">\r\n <div class="d_f ai-c mb-10">\r\n <div class="d_f ai-c" data-i18n="form-designer:dialog.selection.title"></div>\r\n </div>\r\n <div class="fv_list-action-options" @aria:role="radiogroup" @aria:labelledby="::previousSiblings()::childAt(0)">\r\n <div class="d_f ai-c h-24">\r\n <div class="w-20"></div>\r\n <div class="d_f ai-c fv__ui-form-properties-label">\r\n <input type="radio" value="no" name="selectAction" data-id="0" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.selection.noSelection"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai-c h-24">\r\n <div class="w-20"></div>\r\n <div class="d_f ai-c fv__ui-form-properties-label">\r\n <input type="radio" value="customJS" name="selectAction" data-id="1" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.selection.selectAction"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai-c customJS">\r\n <textarea id="keyStrokeJS" cols="30" rows="5" readOnly @aria:labelledby="::parent()::previousSiblings()"></textarea>\r\n <button class="btn-edit">form-designer:dialog.validate.edit</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";e=e||{};var t="";return t+='<div>\r\n <div class="fv__action_tab">\r\n <div class="fv__action_title" data-i18n="editActions.add"></div>\r\n <div class="fv__action_upper tabActionBox">\r\n <div class="d_f ai_c fv__action_line">\r\n <div class="fv__action_label" data-i18n="editActions.trigger"></div>\r\n <select class="w_180 h_24 ml_10" name="actionTrigger" @aria:labelledby="::previousSiblings()">\r\n <option data-i18n="editActions.mouseUp" show-in-host-types="link" value="14" ></option>\r\n <option data-i18n="editActions.mouseUp" show-in-host-types="bookmark" value="14" ></option>\r\n <option data-i18n="editActions.mouseUp" show-in-host-types="widget" value="14" ></option>\r\n <option show-in-host-types="widget" data-i18n="editActions.mouseDown" value="13"></option>\r\n <option show-in-host-types="widget" data-i18n="editActions.mouseEnter" value="11"></option>\r\n <option show-in-host-types="widget" data-i18n="editActions.mouseExit" value="12"></option>\r\n <option show-in-host-types="widget" data-i18n="editActions.focus" value="15"></option>\r\n <option show-in-host-types="widget" data-i18n="editActions.blur" value="16"></option>\r\n <option show-in-host-types="page" data-i18n="editActions.pageOpen" value="17"></option>\r\n <option show-in-host-types="page" data-i18n="editActions.pageClose" value="18"></option>\r\n <option show-in-host-types="screen" data-i18n="editActions.pageOpen" value="17"></option>\r\n <option show-in-host-types="screen" data-i18n="editActions.pageClose" value="18"></option>\r\n <option show-in-host-types="screen" data-i18n="editActions.pageVisible" value="19"></option>\r\n <option show-in-host-types="screen" data-i18n="editActions.pageInvisible" value="20"></option>\r\n </select>\r\n </div>\r\n <div class="d_f ai_c fv__action_line">\r\n <div class="fv__action_label" data-i18n="editActions.action"></div>\r\n <select class="w_180 h_24 ml_10" name="actionType" @aria:labelledby="::previousSiblings()">\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.webLink" value="TypeURI"></option>\r\n ',t+='\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.field" value="TypeHide"></option>\r\n ',(t+='\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.goto" value="TypeGoto"></option>\r\n ')+'\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.file" value="TypeLaunch"></option>\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.submit" value="TypeSubmitForm"></option>\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.run" value="TypeJavaScript"></option>\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.reset" value="TypeResetForm"></option>\r\n <option data-i18n="ui_:dialog.actionDialog.selectAction.import" value="TypeImportData"></option>\r\n </select>\r\n\r\n <div id="actionAddButton" class="fv__ui-dialog-ok-button fv__action_add ml-20" data-i18n="ui_:stamp.dialog.add" tabindex="0" @aria:role="button"></div>\r\n </div>\r\n </div>\r\n <div class="fv__action_lower">\r\n <div class="fv__action_title" data-i18n="ui_:contextmenu.annot.actions"></div>\r\n <div class="fv__action_list">\r\n\r\n </div>\r\n <div class="d_f fv__action_buttons">\r\n <div class="fv__ui-dialog-ok-button fv__action-up disabled" data-i18n="editActions.buttonUP" id="upAction" @aria:role="button"></div>\r\n <div class="fv__ui-dialog-ok-button fv__action-down disabled" data-i18n="editActions.buttonDown" id="downAction" @aria:role="button"></div>\r\n <div class="fv__ui-dialog-ok-button fv__action-edit disabled" id="editAction" data-i18n="ui_:toolbar.tabs.edit.title" @aria:role="button"></div>\r\n <div class="fv__ui-dialog-ok-button fv__action-delete disabled" id="deleteAction" data-i18n="ui_:stamp.dialog.delete" @aria:role="button"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>'}},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<div class="fv_sign-tab">\r\n <label class="d_f ai_c fv_signed-label">\r\n <input type="radio" id="noAction" name="signAction" value="noAction"/>\r\n <div data-i18n="form-designer:dialog.signed.nothing"></div>\r\n </label>\r\n <div class="d_f ai_c fv_signed-label fv_sign_fieldAction">\r\n <label class="d_f">\r\n <input type="radio" id="fieldsFlag" name="signAction" class="fv_input-pickfield" value="fieldsFlag"/>\r\n <div data-i18n="form-designer:dialog.signed.mark"></div>\r\n </label>\r\n <select class="fv_sign-fields-category" @aria:labelledby="::previousSiblings()">\r\n <option data-i18n="form-designer:dialog.signed.all" value="all"></option>\r\n <option data-i18n="form-designer:dialog.signed.exclude" value="exclude"></option>\r\n <option data-i18n="form-designer:dialog.signed.include" value="include"></option>\r\n </select>\r\n <div class="fv_sign-fields">\r\n <input readOnly="1" class="fv_-fields-list" @aria:labelledby="::parent()::previousSiblings()::previousSiblings(),::parent()::previousSiblings()"></input>\r\n <div class="fv__ui-dialog-ok-button" id="pickField" data-i18n="form-designer:dialog.signed.pick" @aria:button></div>\r\n </div>\r\n </div>\r\n \r\n <div class="d_f ai_c fv_signed-label fv_sign-script">\r\n <label class="d_f">\r\n <input type="radio" id="customScript" name="signAction" value="customScript"/>\r\n <div data-i18n="form-designer:dialog.signed.custom"></div>\r\n </label>\r\n <div @aria:button class="fv__ui-dialog-ok-button" id="editScript" data-i18n="form-designer:dialog.signed.edit"></div>\r\n <textarea resizeable=false readOnly="1" class=\'fv_sign-script-input\' @aria:labelledby="::parent()::childAt(0)"></textarea>\r\n </div>\r\n</div>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(35);var r=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.pdfUI=n,this.addon=r}return e.prototype.setAnnot=function(e){this.annot=e,this.show()},e.prototype.resetTab=function(){var e=this.$dialog;e.find(".interactive").removeClass("interactive"),e.find(".fv_-fields-list").val(""),e.find(".fv_sign-fields-category").val("all"),e.find(".fv_sign-script-input").val("")},e.prototype.onEvent=function(){var e=this,t=this.$dialog;t.find("input:radio").on("change",(function(n){var r=e.annot.getField();switch(e.resetTab(),n.target.value){case"noAction":r.setLockAction(0);break;case"fieldsFlag":t.find(".fv_sign-fields-category,.fv_-fields-list").addClass("interactive"),e.fillFieldNames().then((function(t){e.annot.getField().setLockAction(1,t).then((function(t){return e.annot.removeAction(8)}))}));break;case"customScript":r.setLockAction(0),t.find("#editScript,.fv_sign-script-input").addClass("interactive")}})),t.find(".fv_sign-fields-category").on("change",(function(n){var r=t.find("#pickField");switch(n.target.value){case"all":e.fillFieldNames(),r.removeClass("interactive");break;case"exclude":r.addClass("interactive"),t.find(".fv_-fields-list").val(""),t.find("#pickField").trigger("click");break;case"include":r.addClass("interactive"),e.fillFieldNames(".fv_-fields-list",2),t.find("#pickField").trigger("click")}e.annot.removeAction(8)})),t.find("#pickField").on("click",(function(n){var r=e.addon.getDialog("PickField");e.pdfUI.getCurrentPDFDoc().then((function(n){var i=t.find(".fv_-fields-list").val().split(","),o=Object.keys(n.getPDFForm().fieldsNameMap);r.show({type:3,params:[o,i]},(function(n){if(n){t.find(".fv_-fields-list").val(n.join(","));var i=e.annot.getField(),o=0;switch(t.find(".fv_sign-fields-category").val()){case"all":o=1;break;case"exclude":o=3;break;case"include":o=2}i.setLockAction(o,n).then((function(t){e.annot.removeAction(8)})),r.callback=null}}))}))})),t.find("#editScript").on("click",(function(n){var r=e.addon.getDialog("JSInput"),i=e.annot.getAdditionalAction(8);r.show(i&&i.getScript(),(function(n){t.find(".fv_sign-script-input").val(n);var r=new PDFViewCtrl.PDF.actions.JavaScriptAction;r.setScript(n.replace("\n","\r\n")),e.annot.getField().setAction(8,r)}))}))},e.prototype.show=function(){var e=this.annot,t=e.getField();if(7==t.getType()){var n=e.getAdditionalAction(8),r=this.$dialog;if(r.find("#noAction")[0].checked=!0,this.resetTab(),n&&"TypeJavaScript"==n.getType()){setTimeout((function(){r.find("#customScript")[0].checked=!0}),0),r.find("#editScript,.fv_sign-script-input").addClass("interactive");var i=n.getScript();r.find(".fv_sign-script-input").val(i)}else{var o=t.getLockAction();if(o.type>0){r.find(".fv_sign-fields-category,.fv_-fields-list").addClass("interactive"),r.find("#fieldsFlag")[0].checked=!0;var a=r.find(".fv_sign-fields-category");switch(o.type){case 1:a.val("all"),this.fillFieldNames();break;case 2:a.val("include");case 3:2!=o.type&&a.val("exclude"),r.find("#pickField").addClass("interactive"),r.find(".fv_-fields-list").val(o.fields.join(","))}}}}},e.prototype.offEvent=function(){var e=this.$dialog;e.find("input:radio").off("change"),e.find(".fv_sign-fields-category").off("change")},e.prototype.fillFieldNames=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".fv_-fields-list";return this.pdfUI.getCurrentPDFDoc().then((function(n){var r="";return n.getPDFForm().enumFields([],0,(function(e,t){r+=t+","}),!1,!0),e.$dialog.find(t).val(r),r}))},e}();t.default=r},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(4),o=n(38),a=s(n(39)),c=s(n(10)),u=n(9);function s(e){return e&&e.__esModule?e:{default:e}}var l=UIExtension.vendors.jQuery,d=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.PDFUI=n,this.$category=l("select[name=category]",this.$dialog),this.$categoryOptionTitle=l("[name=categoryOptionTitle]",this.$dialog),this.$categoryValue=l("[categoryValue]",this.$dialog),this.$categoryExample=l("[name=categoryExample]",this.$dialog),this.$categoryInfo=l("[name=categoryInfo]",this.$dialog),this.$dateFormatOptions=l("[name=dateFormatOptions]",this.$dialog),this.$dateCustomFormat=l("[name=dateCustomFormat]",this.$dialog),this.$dateCustomFormatText=l("[name=dateCustomFormatText]",this.$dialog),this.$timeFormatOptions=l("[name=timeFormatOptions]",this.$dialog),this.$timeCustomFormat=l("[name=timeCustomFormat]",this.$dialog),this.$timeCustomFormatText=l("[name=timeCustomFormatText]",this.$dialog),this.$specialFormatOptions=l("[name=specialFormatOptions]",this.$dialog),this.$specialArbitraryFormat=l("[name=specialArbitraryFormat]",this.$dialog),this.$specialArbitraryFormatText=l("[name=specialArbitraryFormatText]",this.$dialog),this.$editKeystroke=l("[name=editKeystroke]",this.$dialog),this.$editKeystroke.attr("disabled",!0),this.$editFormat=l("[name=editFormat]",this.$dialog),this.$editFormat.attr("disabled",!0),this.$decimalPlaces=l("[name=decimalPlaces]",this.$dialog),this.$separatorStyle=l("[name=separatorStyle]",this.$dialog),this.$currencySymbol=l("[name=currencySymbol]",this.$dialog),this.$showParentheses=l("[name=showParentheses]",this.$dialog),this.$useRedText=l("[name=useRedText]",this.$dialog),this.$percentDecimalPlaces=l("[name=percentDecimalPlaces]",this.$dialog),this.$percentSeparatorStyle=l("[name=percentSeparatorStyle]",this.$dialog),this.$exampleText=l("[name=exampleText]",this.$dialog),this.addon=r}return e.prototype.setAnnot=function(e){this.annot=e,this.initTab()},e.prototype.updateSampleText=function(e){var t=this.annot.getField().getValue();if(isNaN(t)&&e>=1&&e<=5)this.lastCategoryVal="none";else switch(this.$exampleText.css("color",""),e){case 1:var n=this.$decimalPlaces.val(),r=this.$separatorStyle.val(),a=this.$currencySymbol.val(),c=this.$showParentheses.prop("checked"),u=this.$useRedText.prop("checked"),s=(c?2:0)|(u?1:0),l=this.$currencySymbol.prop("selectedIndex"),d=0==l||2==l||5==l||6==l||8==l||12==l?0:1,f=i.CFD_Utils.GetSampNumberFormat(4123.0345,n,r,s,a-1,d);u&&this.$exampleText.css("color","red"),this.$exampleText.html(f);break;case 2:var g=this.$percentDecimalPlaces.val(),h=this.$percentSeparatorStyle.val(),M=i.CFD_Utils.GetSampPercentFormat(4123.0345,g,h);this.$exampleText.html(M);break;case 3:var m=this.$dateFormatOptions.val()[0];"Custom"==m&&(m=this.$dateCustomFormatText.val());var y=o.CFR_Utils.FormatDateTimeString(t,m,p(this.annot));this.$exampleText.html(y);break;case 4:var v=this.$timeFormatOptions.val(),b=v[0];"Custom"==v[0]&&(b=this.$timeCustomFormatText.val());var D=o.CFR_Utils.FormatDateTimeString(t,b,p(this.annot));this.$exampleText.html(D);break;default:this.$exampleText.html("")}},e.prototype.onUpdateCategoryUI=function(){var e=this.$category.val();this.$categoryOptionTitle.text("none"===e?"":this.PDFUI.i18n.t("form-designer:dialog.optionTitle."+e)),this.$categoryInfo.text(this.PDFUI.i18n.t("form-designer:dialog.format."+e+"Info")),this.$categoryValue.each((function(t,n){l(n).toggle(l(n).attr("categoryValue").indexOf(e)>-1)})),this.$categoryExample.toggle("none"!==e&&"special"!==e&&"custom"!==e)},e.prototype.initTab=function(){this.$category.val("none"),this.$decimalPlaces.val(2),this.$percentDecimalPlaces.val(2),this.$dateFormatOptions.val(i.g_csDateFormat[0]),this.$timeFormatOptions.val(i.g_csTimeFormat[0]),this.$specialFormatOptions.val(i.g_csSpecialFormat[0]),this.$dateCustomFormat.toggle(!1),this.$dateCustomFormatText.val(""),this.$timeCustomFormat.toggle(!1),this.$timeCustomFormatText.val(""),this.$specialArbitraryFormat.toggle(!1),this.$showParentheses.prop("checked",!1),this.$useRedText.prop("checked",!1);var e,t=this.annot.getField(),n=void 0,o=void 0,a=t.getAction(r.Action_Trigger.keyStroke);switch(a&&"TypeJavaScript"==a.info.type&&(n=a.info.javascript),(a=t.getAction(r.Action_Trigger.format))&&"TypeJavaScript"==a.info.type&&(o=a.info.javascript),e=o?i.CFD_Utils.GetFormatStringType(o):n?i.CFD_Utils.GetKeystrokeStringType(n):0){case 1:if(this.$category.val("number"),!o)break;var c=i.CFD_Utils.GetNumberValues(o),u=c.iDec,s=c.iSep,d=c.iNeg,p=(c.iDef,c.iMoney);c.iPre,this.$decimalPlaces.val(u),this.$separatorStyle.val(s),this.$currencySymbol.val(p+1);var f=2&d?1:0,g=1&d?1:0;this.$showParentheses.prop("checked",f),this.$useRedText.prop("checked",g);break;case 2:if(this.$category.val("percentage"),!o)break;var h=i.CFD_Utils.GetPercentageValues(o),M=h.iDec,m=h.iSep;this.$percentDecimalPlaces.val(M),this.$percentSeparatorStyle.val(m);break;case 3:if(this.$category.val("date"),!o)break;var y=o.length,v=o.indexOf("("),b=y-v-5,D=-1;if(b>0){for(var A=o.substr(v+2,b),N=0;N<i.g_csDateFormat.length;N++)if(A==i.g_csDateFormat[N]){this.$dateFormatOptions.val(A),D=N;break}-1==D&&(this.$dateFormatOptions.val("Custom"),this.$dateCustomFormatText.val(A))}this.$dateCustomFormat.toggle(-1==D);break;case 4:if(this.$category.val("time"),!o)break;var I=-1,j=o.length,T=o.indexOf("(");if(o.indexOf("AFTime_FormatEx")>=0){var w=j-T-5;if(w>0){for(var x=o.substr(T+2,w),O=0;O<i.g_csTimeFormat.length;O++)if(x==i.g_csTimeFormat[O]){this.$timeFormatOptions.val(x),I=O;break}-1==I&&(this.$timeFormatOptions.val("Custom"),this.$timeCustomFormatText.val(x))}}else{var E=j-T-3;if(E>0){var _=o.substr(T+1,E),k=parseInt(_);k>=0&&k<i.g_csTimeFormat.length?(I=k,this.$timeFormatOptions.val(i.g_csTimeFormat[k])):(this.$timeFormatOptions.val("Custom"),this.$timeCustomFormatText.val(_))}}this.$timeCustomFormat.toggle(-1==I);break;case 5:if(this.$category.val("special"),!n)break;if(n.indexOf("AFSpecial_KeystrokeEx")>=0){var z=n.length,C=n.indexOf("("),S=z-C-5;if(S>0){var L=n.substr(C+2,S);this.$specialArbitraryFormatText.val(L)}this.$specialFormatOptions.val("arbitraryMask"),this.$specialArbitraryFormat.toggle(!0)}else{var R=n.length,P=n.indexOf("("),U=R-P-3;if(U>0){var Q=n.substr(P+1,U),Y=parseInt(Q);Y>-1&&this.$specialFormatOptions.prop("selectedIndex",Y)}this.$specialArbitraryFormat.toggle(!1)}break;case-1:this.$category.val("custom"),o||(o=""),l("[name=editFormat]",this.$dialog).val(o),n||(n=""),l("[name=editKeystroke]",this.$dialog).val(n);break;default:this.$category.val("none")}this.updateSampleText(e),this.onUpdateCategoryUI()},e.prototype.resetTab=function(){},e.prototype.resetFieldColor=function(){var e=this.annot.getField(),t=e.getAction(r.Action_Trigger.format);if(t&&"TypeJavaScript"==t.info.type){var n=t.info.javascript;if(1==i.CFD_Utils.GetFormatStringType(n)){var o=i.CFD_Utils.GetNumberValues(n),a=(o.wcJS,o.iDec,o.iSep,o.iNeg);if(o.iDef,o.iMoney,o.iPre,1&a)return e.setDAFontColorAsync(["RGB",0,0,0])}}return Promise.resolve()},e.prototype.onEvent=function(){var e=this;this.$dialog,this.lastCategoryVal=this.$category.val(),this.$category.on("change",(function(t){e.isChangeCategory=!0,e.onUpdateCategoryUI(),e.resetFieldColor().then((function(){return e.changeCurrentCatgory(),Promise.resolve()})).then((function(){e.lastCategoryVal=e.$category.val()}))})),this.$decimalPlaces.on("change",(function(t){return e.changeCurrentCatgory()})),this.$separatorStyle.on("change",(function(t){return e.changeCurrentCatgory()})),this.$currencySymbol.on("change",(function(t){return e.changeCurrentCatgory()})),this.$showParentheses.on("change",(function(t){return e.changeCurrentCatgory()})),this.$useRedText.on("change",(function(t){e.changeCurrentCatgory();var n=e.annot.getField(),r=n.getDefaultValue(),i=n.getValue(),o=e.$useRedText.prop("checked"),a="#000";(r&&0!=r.length||i&&0!=i.length)&&(a=o&&(r<0||i<0)?"#FF0000":"#000");var c=(0,u.colorConvertor)(a,"int");e.annot.setDefaultAppearance({textColor:c}).then((function(){e.annot.updateUI({value:c,type:"textColor"})}))})),this.$percentDecimalPlaces.on("change",(function(t){return e.changeCurrentCatgory()})),this.$percentSeparatorStyle.on("change",(function(t){return e.changeCurrentCatgory()})),this.$dateCustomFormatText.on("blur",(function(t){return e.changeCustomFormat(0)})),this.$timeCustomFormatText.on("blur",(function(t){return e.changeCustomFormat(1)})),this.$specialArbitraryFormatText.on("blur",(function(t){return e.changeCustomFormat(2)})),this.$dateFormatOptions.on("change",(function(t){var n=e.$dateFormatOptions.val();n&&n.length>1&&e.$dateFormatOptions.val([n.slice(-1)]),e.$dateCustomFormat.toggle(n.indexOf("Custom")>-1),e.changeCurrentCatgory()})),this.$timeFormatOptions.on("change",(function(t){var n=e.$timeFormatOptions.val();n&&n.length>1&&e.$timeFormatOptions.val([n.slice(-1)]),e.$timeCustomFormat.toggle(n.indexOf("Custom")>-1),e.changeCurrentCatgory()})),this.$specialFormatOptions.on("change",(function(t){var n=e.$specialFormatOptions.val();n&&n.length>1&&e.$specialFormatOptions.val([n.slice(-1)]),e.$specialArbitraryFormat.toggle(n.indexOf("arbitraryMask")>-1),e.changeCurrentCatgory()})),this.$dialog.find("[name=btnEditFormat]").on("click",(function(t){var n=e.annot.getField(),i=n.getAction(8);e.addon.getDialog("JSInput").show(i&&i.getScript(),(function(t){t&&""!=t&&(n.setAction(r.Action_Trigger.format,t).then((function(){e.PDFUI.eventEmitter.emit(PDFViewCtrl.ViewerEvents.annotationAppearanceUpdated,[e.annot],e.annot.getPDFPage())})),l("[name=editFormat]",e.$dialog).val(t))}))})),this.$dialog.find("[name=btnEditKeystroke]").on("click",(function(t){var n=e.annot.getField(),i=n.getAction(7);e.addon.getDialog("JSInput").show(i&&i.getScript(),(function(t){t&&""!=t&&(n.setAction(r.Action_Trigger.keyStroke,t).then((function(){e.PDFUI.eventEmitter.emit(PDFViewCtrl.ViewerEvents.annotationAppearanceUpdated,[e.annot],e.annot.getPDFPage())})),l("[name=editKeystroke]",e.$dialog).val(t))}))}))},e.prototype.show=function(){},e.prototype.offEvent=function(){this.$category.off("change"),this.$dateFormatOptions.off("change"),this.$timeFormatOptions.off("change"),this.$specialFormatOptions.off("change"),this.$decimalPlaces.off("change"),this.$separatorStyle.off("change"),this.$currencySymbol.off("change"),this.$showParentheses.off("change"),this.$useRedText.off("change"),this.$percentDecimalPlaces.off("change"),this.$percentSeparatorStyle.off("change"),this.$dateCustomFormatText.off("blur"),this.$timeCustomFormatText.off("blur"),this.$specialArbitraryFormatText.off("blur")},e.prototype.updateActions=function(e,t){var n=this,r=this.annot.getField(),i=r.info.defaultValue,o=r.getAction(c.default.FieldWillFormat),u=this.lastCategoryVal;return i&&0!=i.length&&o?new Promise((function(e){return setTimeout(e,0)})).then((function(){return n.PDFUI.getPDFDocRender()})).then((function(i){var o=new a.default;if(o.setScript(e),i.getFormRender().execAction("Field",o,null,r,c.default.FieldWillFormat).rc)return n.isChangeCategory&&(n.resetCategorySelections(u),n.isChangeCategory=!1),n.updateActionsEx(r,e,t);n.isChangeCategory&&(n.isChangeCategory=!1),n.$category.val(u),n.$category.trigger("change")})):(this.isChangeCategory&&(this.isChangeCategory=!1,this.resetCategorySelections(u)),this.updateActionsEx(r,e,t))},e.prototype.updateActionsEx=function(e,t,n){return Promise.resolve().then((function(){return t&&""!=t?e.setAction(r.Action_Trigger.format,t):e.removeAction(r.Action_Trigger.format)})).then((function(){return n&&""!=n?e.setAction(r.Action_Trigger.keyStroke,n):e.removeAction(r.Action_Trigger.keyStroke)})).then((function(){if(""!==e.info.value){var t=e.info.value;e.info.value="",e.setValue(t)}}))},e.prototype.selectNone=function(){var e=this.annot.getField();return e.setValue(e.getValue()).then((function(){return e.removeAction(r.Action_Trigger.format)})).then((function(){return e.removeAction(r.Action_Trigger.keyStroke)})).then((function(){return e.removeAction(r.Action_Trigger.validate)}))},e.prototype.selectNumber=function(e){var t=e?this.$percentDecimalPlaces.prop("selectedIndex"):this.$decimalPlaces.prop("selectedIndex"),n=e?this.$percentSeparatorStyle.prop("selectedIndex"):this.$separatorStyle.prop("selectedIndex"),o=this.$currencySymbol.prop("selectedIndex"),a=this.$showParentheses.is(":checked"),c=(this.$useRedText.is(":checked")?1:0)|(a?2:0),u=o>0?i.g_csMoneyFormat[o-1]:"",s=0==o||2==o||5==o||6==o||8==o||12==o?"false":"true",l=void 0,d=void 0;e?(l="AFPercent_Format("+t+","+n+");",d="AFPercent_Keystroke("+t+","+n+");"):(l="AFNumber_Format("+t+","+n+","+c+',0,"'+u+'",'+s+");",d="AFNumber_Keystroke("+t+","+n+","+c+',0,"'+u+'",'+s+");");var p=this.annot.getField();return this.updateActions(l,d).then((function(){return p.removeAction(r.Action_Trigger.validate)}))},e.prototype.changeCustomFormat=function(e){var t="",n="";if(0==e){var i=this.$dateCustomFormatText.val();t='AFDate_KeystrokeEx("'+i+'");',n='AFDate_FormatEx("'+i+'");',this.updateSampleText(3)}else if(1==e){var o=this.$timeCustomFormatText.val();t='AFTime_Keystroke("'+o+'");',n='AFTime_FormatEx("'+o+'");',this.updateSampleText(4)}else 2==e&&(t='AFSpecial_KeystrokeEx("'+this.$specialArbitraryFormatText.val()+'");',n="",this.updateSampleText(5));var a=this.annot.getField();return this.updateActions(n,t).then((function(){return a.removeAction(r.Action_Trigger.validate)}))},e.prototype.selectDate=function(e){var t=e?this.$dateFormatOptions.prop("selectedIndex"):this.$timeFormatOptions.prop("selectedIndex"),n=this.annot.getField(),o=void 0,a=void 0;if(e){if(t==i.g_csDateFormat.length-1)return;var c=i.g_csDateFormat[t];o='AFDate_KeystrokeEx("'+c+'");',a='AFDate_FormatEx("'+c+'");'}else{if(t==i.g_csTimeFormat.length-1)return;o='AFTime_Keystroke("'+i.g_csTimeFormat[t]+'");',a="AFTime_Format("+t+");"}return this.updateActions(a,o).then((function(){return n.removeAction(r.Action_Trigger.validate)}))},e.prototype.selectSpecial=function(){var e=this.$specialFormatOptions.prop("selectedIndex");if(4==e)return this.changeCustomFormat(2);var t="AFSpecial_Format("+e+");",n="AFSpecial_Keystroke("+e+");",i=this.annot.getField();return this.updateActions(t,n).then((function(){return i.removeAction(r.Action_Trigger.validate)}))},e.prototype.resetCategorySelections=function(e){var t=this;switch(e){case"none":break;case"number":this.$decimalPlaces.val(2),this.$separatorStyle.val(0),this.$currencySymbol.val(0),this.$showParentheses.prop("checked",!1),this.$useRedText.prop("checked")&&this.annot.setDefaultAppearance({textColor:0}).then((function(){t.annot.updateUI({value:0,type:"textColor"})})),this.$useRedText.prop("checked",!1);break;case"percentage":this.$percentDecimalPlaces.val(2),this.$percentSeparatorStyle.val(0);break;case"date":this.$dateFormatOptions.val(i.g_csDateFormat[0]);break;case"time":this.$timeFormatOptions.val(i.g_csTimeFormat[0]);break;case"special":this.$specialFormatOptions.val(i.g_csSpecialFormat[0]);break;case"custom":this.$editFormat.val(""),this.$editKeystroke.val("")}},e.prototype.changeCurrentCatgory=function(){switch(this.$category.val()){case"none":this.selectNone(),this.updateSampleText(0);break;case"number":this.updateSampleText(1),this.selectNumber(!1);break;case"percentage":this.updateSampleText(2),this.selectNumber(!0);break;case"date":this.updateSampleText(3),this.selectDate(!0);break;case"time":this.updateSampleText(4),this.selectDate(!1);break;case"special":this.selectSpecial(),this.updateSampleText(0)}},e}(),p=function(e){var t=e.getField().getAction(r.Action_Trigger.format);if(t){var n=t.getScript(),o=void 0;if(-1!==n.indexOf("AFDate_Format")){o=/AFDate_Format(?:Ex)?\("([\s\S]*?)"\)/;var a=n.match(o);if(a&&2==a.length)return a[1].trim()}else if(-1!==n.indexOf("AFTime_Format")){o=/AFTime_Format(?:Ex)?\(([\s\S]*?)\)/;var c=n.match(o);if(c&&2==c.length)return i.g_csTimeFormat[c[1]]||c[1].replace(/"/g,"")}}};t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={success:0,file:1,format:2,password:3,handle:4,certificate:5,unknown:6,invalidLicense:7,param:8,unsupported:9,outOfMemory:10,securityHandler:11,notParsed:12,notFound:13,invalidType:14,conflict:15,unknownState:16,dataNotReady:17,invalidData:18,xFALoadError:19,notLoaded:20,invalidState:21,notCDRM:22,canNotConnectToServer:23,invalidUserToken:24,noRights:25,rightsExpired:26,deviceLimitation:27,canNotRemoveSecurityFromServer:28,canNotGetACL:29,canNotSetACL:30,isAlreadyCPDF:31,isAlreadyCDRM:32,canNotUploadDocInfo:33,canNotUploadCDRMInfo:34,invalidWrapper:35,canNotGetClientID:36,canNotGetUserToken:37,invalidACL:38,invalidClientID:39,OCREngineNotInit:40,diskFull:41,OCRTrialIsEnd:42,filePathNotExist:43,complianceEngineNotInit:44,complianceEngineInvalidUnlockCode:45,complianceEngineInitFailed:46,timeStampServerMgrNotInit:47,LTVVerifyModeNotSet:48,LTVRevocationCallbackNotSet:49,LTVCannotSwitchVersion:50,LTVCannotCheckDTS:51,LTVCannotLoadDSS:52,LTVCannotLoadDTS:53,needSigned:54,complianceResourceFile:55,timeStampServerMgrNoDefaltServer:56,defaultTimeStampServer:57,noConnectedPDFModuleRight:58,noXFAModuleRight:59,noRedactionModuleRight:60,noRMSModuleRight:61,noOCRModuleRight:62,noComparisonModuleRight:63,noComplianceModuleRight:64,noOptimizerModuleRight:65,noConversionModuleRight:66,collaborationSession:1400}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=["Jan","Feb","Mar","Apr","May","Jun","Ju","Aug","Sep","Oct","Nov","Dec"],i=["January","February","March","April","May","June","July","August","September","October","November","December"];t.CFR_Utils=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.MakeFixed=function(e,t){return(Array(t).join("0")+e).slice(-t)},e.FormatDateTimeString=function(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n,a=e.GetDate(t,o);n&&""!=n||(a=new Date),"Invalid Date"==a.toString()&&(a=new Date);for(var c="",u="",s=a.getFullYear(),l=a.getMonth()+1,d=a.getDate(),p=a.getHours(),f=a.getMinutes(),g=a.getSeconds(),h=0,M=0;h<n.length;){switch(u="",M=n[h]){case"y":case"m":case"d":case"H":case"h":case"M":case"s":case"t":if(n[h+1]!=M){switch(M){case"y":u+=M;break;case"m":u=l;break;case"d":u=d;break;case"H":u=p;break;case"h":u=p>12?p-12:p;break;case"M":u=f;break;case"s":u=g;break;case"t":u+=p>=12?"p":"a"}h++}else if(n[h+1]==M&&n[h+2]!=M){switch(M){case"y":u=this.MakeFixed(s-100*parseInt(s/100),2);break;case"m":u=this.MakeFixed(l,2);break;case"d":u=this.MakeFixed(d,2);break;case"H":u=this.MakeFixed(p,2);break;case"h":u=this.MakeFixed(p>12?p-12:p,2);break;case"M":u=this.MakeFixed(f,2);break;case"s":u=this.MakeFixed(g,2);break;case"t":u=p>=12?"pm":"am"}h+=2}else if(n[h+1]==M&&n[h+2]==M&&n[h+3]!=M)switch(M){case"m":h+=3,u+=r[l-1];break;default:h+=3,u+=M,u+=M,u+=M}else if(n[h+1]==M&&n[h+2]==M&&n[h+3]==M&&n[h+4]!=M)switch(M){case"y":u=s,h+=4;break;case"m":h+=4,u+=i[l-1];break;default:h+=4,u+=M,u+=M,u+=M,u+=M}else h++,u+=M;break;default:h++,u+=M}c+=u}return c},e.GetDate=function(e,t,n){t=(t=(t=t.replace("MM","ii")).replace("M","i")).toLowerCase();for(var o=new Date(e),a=new Date,c=a.getFullYear(),u=a.getMonth(),s=a.getDate(),l=0,d=0;d<t.length&&l<e.length;)switch(t[d]){case"y":for(var p="";"0"<=e[l]&&e[l]<="9";)p+=e[l],l++;for(;"y"==t[d];)d++;switch(p.length){case 2:p="20"+p}c=parseInt(p);break;case"m":var f="";if("A"<=e[l]&&e[l]<="Z")for(;l<e.length&&e[l].match(/[a-zA-Z]/);)f+=e[l],l++;else for(;"0"<=e[l]&&e[l]<="9";)f+=e[l],l++;for(;"m"==t[d];)d++;switch(f.length){case 1:case 2:u=parseInt(f)-1;break;case 3:u=r.indexOf(f);break;case 4:u=i.indexOf(f)}break;case"d":for(var g="";"0"<=e[l]&&e[l]<="9";)g+=e[l],l++;for(;"d"==t[d];)d++;s=parseInt(g);break;case"i":for(var h="";"0"<=e[l]&&e[l]<="9";)h+=e[l],l++;for(;"i"==t[d];)d++;a.setMinutes(parseInt(h));break;case"h":for(var M="";"0"<=e[l]&&e[l]<="9";)M+=e[l],l++;for(;"h"==t[d];)d++;a.setHours(parseInt(M));break;case"s":for(var m="";"0"<=e[l]&&e[l]<="9";)m+=e[l],l++;for(;"s"==t[d];)d++;a.setSeconds(parseInt(m));break;case"t":for(var y="";e[l]&&e[l].match(/[AaPpMm]/);)y+=e[l],l++;for(;"t"==t[d];)d++;if("pm"==y.toLowerCase()){var v=a.getHours();v<12&&(v+=12),a.setHours(v)}else 12==a.getHours()&&a.setHours(0);break;default:l++,d++}1==u&&29==s&&c%4!=0&&(c&=4294967292),a.setFullYear(c),a.setMonth(u),a.setDate(s);var b=new Date;return Math.abs(o.getFullYear()-b.getFullYear())<Math.abs(a.getFullYear()-b.getFullYear())||Math.abs(o.getMonth()-b.getMonth())<Math.abs(a.getMonth()-b.getMonth())||Math.abs(o.getDate()-b.getDate())<Math.abs(a.getDate()-b.getDate())?o:a},e.getMonth=function(e,t){switch(t){case"m":return e;case"F":return i[e];case"M":return r[e]}},e.switchFormat=function(e,t){return"toLib"==t?e.replace("yyyy","Y").replace("yy","y").replace("dd","d").replace("HH","H").replace("hh","h").replace("MM","i").replace("M","i").replace("mmmm","F").replace("mmm","M").replace("mm","m").replace("ss","S").replace("tt","K"):e.replace("Y","yyyy").replace("y","yy").replace("d","dd").replace("H","HH").replace("h","hh").replace("i","MM").replace("F","mmmm").replace("M","mmm").replace("m","mm").replace("S","ss").replace("K","tt")},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(40)),i=(o(n(11)),o(n(8)),n(6));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(n,r,o,u,s,l){if(a(this,t),0==arguments.length){var d=c(this,e.call(this,i.Action_Type.javaScript));return c(d)}return(d=c(this,e.call(this,n,r,o,u,s,l))).info.script&&(d.info.javascript=d.info.script),c(d)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.getScript=function(){return this.info.javascript},t.prototype.checkOutData=function(e){return e&&e.javascript},t.prototype.setScript=function(e){var t=this;return this.doc?this.doc.api.setActionScript(this.doc.getId(),this.info.objNumber,e).then((function(e){return t.updateAction(e),e})):(this.info.javascript=e,Promise.resolve())},t.prototype.exportToJson=function(){var t=e.prototype.exportToJson.call(this);return Object.assign(t,{script:this.getScript()})},t}(r.default);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(11)),i=a(n(8)),o=a(n(12));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=function(){function e(){c(this,e),this.init.apply(this,arguments)}return e.prototype.init=function(){if(1==arguments.length)this.info={type:arguments[0]};else{var e=Array.prototype.slice.call(arguments),t=e[0],n=e[1],r=e[2],i=(e[3],e[4]),o=e[5];this.info=t,this.factory=n,this.doc=r,this.host=o,this.eventEmitter=i}this.initSubAction()},e.prototype.checkInserted=function(){if(!this.doc.api)throw new Error("Please insert this action to a host first.")},e.prototype.initSubAction=function(){var e=this;this.subAction=[],this.info.subAction&&this.info.subAction.forEach((function(t){e.subAction.push(e.factory.createAction(t,e.doc,e.doc.api,e.eventEmitter,e.host))}))},e.prototype.appendSubAction=function(e){this.subAction.push(e),this.info.subAction=this.info.subAction||[],this.info.subAction.push(e.info)},e.prototype.getType=function(){return this.info.type},e.prototype.getSubActionCount=function(){return this.info.subAction.length||0},e.prototype.getSubAction=function(e){return this.subAction[e]},e.prototype.insertSubAction=function(t,n){var r=this;if(this.checkInserted(),"number"!=typeof t)throw new Error("param error. Only number is available.");return t=Math.max(0,Math.min(t,this.getSubActionCount())),n instanceof e&&(n=n.getType()),this.doc.api.insertSubAction(this.doc.getId(),this.info.objNumber,t,n).then((function(e){return r.updateAction(e),e}))},e.prototype.setSubAction=function(t,n){var r=this;if(this.checkInserted(),"number"!=typeof t)throw new Error("param error. Only number is available.");var i=this.getSubActionCount();if(0===i)throw new Error("Cannot be set without sub action.");return t=Math.max(0,Math.min(t,i-1)),n instanceof e&&(n=n.getType()),this.doc.api.setSubAction(this.doc.getId(),this.info.objNumber,t,n).then((function(e){return r.updateAction(e),e}))},e.prototype.removeAllSubActions=function(){var e=this;if(this.doc.api)return this.doc.api.removeAllSubActions(this.doc.getId(),this.info.objNumber).then((function(t){e.updateAction(t)}))},e.prototype.removeSubAction=function(e){var t=this;if(this.doc.api){if("number"!=typeof e)throw new Error("param error. Only number is available.");var n=this.getSubActionCount();if(0===n)throw new Error("Cannot be remove without sub action.");return e=Math.max(0,Math.min(e,n-1)),this.doc.api.removeSubAction(this.doc.getId(),this.info.objNumber,e).then((function(e){t.updateAction(e)}))}},e.prototype.setActionData=function(e){var t=this;return this.doc.api.setActionData(this.doc.getId(),this.info.objNumber,e).then((function(e){t.updateAction(e)}))},e.prototype.updateAction=function(e){Object.assign(this.info,e),this.initSubAction(),this.host&&(this.eventEmitter.emit(i.default.actionUpdated,this.host),this.host instanceof r.default&&this.eventEmitter.emit(i.default.annotationUpdated,[this.host],this.host.getPDFPage(),o.default.actionDataUpdated))},e.prototype.checkOutData=function(e){return!0},e.prototype.exportToJson=function(){return{type:this.getType()}},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={MARKED:"marked",UNMARKED:"unmarked",ACCEPTED:"accepted",REJECTED:"rejected",CANCELLED:"cancelled",COMPLETED:"completed",DEFERRED:"deferred",FUTURE:"future",NONE:"none"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};if(/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(TZ)/.test(t)){var i=-parseInt(e.getTimezoneOffset()/60);i=i>9?"+"+i:"+0"+i,i+=n+"00"+n,t=t.replace("TZ",i)}for(var o in r)new RegExp("("+o+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[o]:("00"+r[o]).substr((""+r[o]).length)));return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNameEncode=t.xfdfJsonToAddJson=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(7),o=n(6);function a(e){return{unknowntype:"UnKnownType",text:"Text",link:"Link",freetext:"FreeText",line:"Line",square:"Square",circle:"Circle",polygon:"Polygon",polyline:"PolyLine",highlight:"Highlight",underline:"Underline",squiggly:"Squiggly",strikeout:"StrikeOut",stamp:"Stamp",caret:"Caret",ink:"Ink",psink:"PsInk",fileattachment:"FileAttachment",sound:"Sound",movie:"Movie",widget:"Widget",screen:"Screen",printermark:"PrinterMark",trapnet:"TrapNet",watermark:"Watermark","3d":"3D",popup:"Popup",redact:"Redact"}[e.toString().toLowerCase()]}var c="WRRRRRRRRWWRWWRRRRRRRRRRRRRRRRRRWRRRRDRRDDRNRNNDNNNNNNNNNNRRDRDRRRRRRRRRRRRRRRRRRRRRRRRRRRRDRDRRRRRRRRRRRRRRRRRRRRRRRRRRRRRDRDRRWRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRW";function u(e){var t=e.length,n=0,r=void 0;for(r=0;r<t;r++){var i=e.charCodeAt(r);i>=128||"W"==c[i]||"#"==e[r]||"D"==c[i]?n+=3:n++}if(n==t)return e;var o="";for(r=0;r<t;r++){var a=e.charCodeAt(r);if(a>=128||"W"==c[a]||"#"==e[r]||"D"==c[a]){if("W"==c[a]&&0==a)continue;o+="#",o+="0123456789ABCDEF"[parseInt(a/16)],o+="0123456789ABCDEF"[a%16]}else o+=e[r]}return o}function s(e){var t=void 0;for(t=0;t<e.length&&!(e.charCodeAt(t)>255);t++);if(t===e.length)return"("+e.replace(/([\(|\)])/g,"\\$1")+")";var n="<FEFF";for(t=0;t<e.length;t++){for(var r=e.charCodeAt(t).toString(16);r.length<4;)r="0"+r;n+=r}return n+">"}function l(e){for(var t=[],n=0;n<e.length;n++)t.push(e.charCodeAt(n));return new Uint8Array(t)}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.JSONToFDF=function(t){for(var n={next:2,annotRef:[],file:"%FDF-1.2\n1 0 obj<</FDF<</Annots[{annotsRefArray}]>>/Type/Catalog>>endobj\n"},r=[],i=0,o=t.length;i<o;i++){var a=t[i];a.type&&(a.deleted?r.push({name:a.name,page:a.page}):e.singleAnnotJSONToFDF(n,a,!1))}return new Blob([l(n.file.replace(/\{annotsRefArray\}/,n.annotRef.join(" "))+"trailer\n<</Root 1 0 R>>\n%%EOF")],{type:"application/fdf"})},e.singleAnnotJSONToFDF=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0,c=t.next;if(r?o="Popup":r="popup"==(o=a(n&&n.type&&n.type.toLowerCase()||"")).toLowerCase(),!o||"link"==o.toLowerCase()||"screen"==o.toLowerCase()||"sound"==o.toLowerCase())return 0;var l=n.style||"S";l=l.toUpperCase()[0];var d=n.width,f=n.color||"",h="C"==l?"C":"S",M=n.intensity,m=0===n.opacity?0:n.opacity||1,y=s(n.contents||""),v=n.flags||"print",b=v.split(",");for(var D in v=0,i.AnnotFlagsName)-1!=b.indexOf(i.AnnotFlagsName[D])&&(v|=1<<parseInt(D));var A=n.creationdate,N=n.date,I=n.name||"",j=n.page,T=(n.rect||"").replace(/,/g," "),w=s(n.subject||"subject"),x=s(n.title||"title"),O=n["interior-color"]||n.interiorColor,E=c+" 0 obj\n<</Rect ["+T+"]/Subtype /"+o+"/NM ("+I+")";for(var _ in n.customEntries)E+="/"+_+" "+s(n.customEntries[_])+"\n";if(t.annotRef.push(c+" 0 R "),t.next++,!r){if(E+="/M ("+N+")/CA "+m+"/Contents "+y+"/CreationDate ("+A+")/F "+v+"/Page "+j+"/Subj "+w+"/T "+x+"/Type /Annot",n.replyType){var k=void 0;E+="/RT /"+((k="string"==typeof n.replyType&&n.replyType||"Group")[0].toUpperCase()+k.substr(1))}n.inreplyto&&(E+="/IRT ("+n.inreplyto+")"),n.measureRatio&&(E+="/Measure<</R("+n.measureRatio+")/X[<</C "+n.measureConversionFactor+"/U("+n.measureUnit+")>>]/Type/Measure/Subtype/RL>>")}if(l||d){l=l||"S",d=d||"0",M=M||"0",h=h||"S";var z=(n.dashes||"").replace(/,/g," ");E+="/BS <</S /"+l+" /W "+d+" /D ["+z+"]>>/BE <</S /"+h+" /I "+M+">>"}"FreeText"!=o?(f&&(E+="/C "+g(f)),O&&(E+="/IC "+g(O))):(O&&(E+="/C "+g(O)),f&&(E+="/IC "+g(f),E+="/DS (color:"+n.fontColor+")")),void 0!==n.rotation&&(E+="/Rotate "+n.rotation);var C="";switch(o){case"Text":case"Note":E=E.replace(/\/Subtype\s?\/Note/,"/Subtype /Text"),n.icon&&(E+="/Name/"+u(n.icon));var S=void 0;(S=n.state)&&(E+="/State("+S+")/StateModel("+n.statemodel+")");break;case"Link":return"";case"FreeText":E=E.replace(/\/C\s?\[[\s\S]*?\]/,""),O&&(E+="/C "+g(O));var L=n.defaultappearance,R=n.justification,P="/DA ("+L+")/Q "+R,U=n.intent||n.IT;if(U&&(P+="/IT /"+U),n.callout){var Q=n.callout.replace(/,/g," ");P+="/CL ["+Q+"]",P+="/LE/"+n.head}if(n.fringe){var Y=n.fringe.replace(/,/g," ");P+="/RD ["+Y+"]"}C=P;break;case"Line":var G="yes"===n.caption,F=n.head,Z=n.tail,B="[/"+F+"/"+Z+"]",V=n.leaderLength,W=n.start.replace(/,/g," "),H=n.end.replace(/,/g," "),J=W+" "+H,$=n.leaderExtend,X=n.leaderOffset,K=n.captionOffset?n.captionOffset.x+" "+n.captionOffset.y:"",q=n.intent,ee="/Cap "+G+"/LE "+B+"/LL "+V+"/L ["+J+"]/LLE "+$+"/LLO "+X;K&&(ee+="/CO ["+K+"]"),q&&(ee+="/IT /"+q),C=ee;break;case"Square":case"Circle":var te=n.intent,ne=n.fringe.replace(/,/g," "),re="/RD ["+ne+"]";te&&(re+="/IT /"+te),n.measureRatio&&n.measureUnit&&void 0!==n.measureConversionFactor&&(re+="/Measure<</R("+n.measureRatio+")/X[<</C "+n.measureConversionFactor+"/U("+n.measureUnit+")>>]/Type/Measure/Subtype/RL>>"),C=re;break;case"Polygon":case"PolyLine":var ie=n.vertices.replace(/[,|;]/g," "),oe=n.intent,ae="/Vertices ["+ie+"]";if(oe&&(ae+="/IT /"+oe),"PolygonDimension"===oe&&n.measureRatio&&n.measureUnit&&void 0!==n.measureConversionFactor&&(ae+="/Measure<</R("+n.measureRatio+")/X[<</C "+n.measureConversionFactor+"/U("+n.measureUnit+")>>]/Type/Measure/Subtype/RL>>"),"PolyLine"==o){var ce=n.head,ue=n.tail,se="[/"+ce+"/"+ue+"]";ae+="/LE "+se}C=ae;break;case"Redact":if(C+="/OC "+g(f),"Redact"==o){C+="/OverlayText"+s(n["overlay-text"]||n.overlaText||"");var le=n.defaultappearance;C+="/DA ("+le+")",C+="/Q "+(n.justification||0)}case"StrikeOut":case"Highlight":case"Squiggly":case"Underline":if(n.coords){var de=n.coords.replace(/,/g," ");C+="/QuadPoints ["+de+"]"}break;case"Caret":var pe=n.fringe.replace(/,/g," "),fe="/RD ["+pe+"]";C=fe;break;case"Stamp":if(n.icon&&(C="/Name/"+u(n.icon)),n.raw&&n.raw.N){var ge=p(t,n.raw,n.raw.N);C+="/AP<</N "+ge+" 0 R>>\n"}break;case"Ink":if("["===n.inklist[0]){var he=n.inklist.substr(1,n.inklist.length-2).split("],["),Me="";he.map((function(e){Me+="["+e.replace(/[,|;]/g," ")+"]"}));var me="/InkList ["+Me+"]";C=me}else C="/InkList [["+n.inklist.replace(/[,|;]/g," ")+"]]";break;case"Popup":C="/Open "+("yes"==n.open?"true":"false");break;case"Sound":var ye=p(t,n,{Filter:"/ASCIIHexDecode",R:n.rate,Type:"/Sound",stream:n.soundStream});C+="/Sound "+ye+" 0 R";case"FileAttachment":if(n.icon&&(C+="/Name/"+u(n.icon)),n.raw){var ve=p(t,n.raw,n.raw.FS);C+="/FS "+ve+" 0 R "}}if(n.popup){var be=e.singleAnnotJSONToFDF(t,n.popup,!0);C+="/Popup "+be+" 0 R"}return t.file+=E+C+">>\nendobj\n",c},e}(),p=function(e,t,n){var r=e.next;e.next++;var i="";if(i+=r+" 0 obj\n","string"==typeof n)i+=n;else if(n instanceof Array)i+="["+n.map((function(n){return f(e,t,n)})).join(" ")+"]";else{for(var o in i+="<<\n",n)"stream"!=o&&(i+="/"+o+" "+f(e,t,n[o]));if(i+=">>",n.stream){for(var a="",c=0;c<n.stream.length;c+=2){var u=parseInt(n.stream[c],16),s=parseInt(n.stream[c+1],16);a+=String.fromCharCode((u<<4)+s)}i+="stream\n"+a+"\nendstream"}}return i+="\nendobj\n",e.file+=i,r},f=function e(t,n,i){if(null===i)return"null";var o,a=void 0===i?"undefined":r(i);if("number"==a)return i;if("string"==a)return"/"==i[0]?"/"+u(i.replace("/","")):"<"==i[0]?i:(o=i.match(/^(\d*)R$/))?p(t,n,n[o[1]])+" 0 R":"("+i+")";if("boolean"==a)return i?"true":"false";if(i instanceof Array)return"["+i.map((function(r){return e(t,n,r)})).join(" ")+"]";var c="<<";for(var s in i)c+="/"+s+" "+e(t,n,i[s]);return c+">>"},g=function(e){var t=e.match(/\#?(\w{2})(\w{2})(\w{2})/),n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,i=parseInt(t[3],16)/255;return"["+n.toFixed(2)+" "+r.toFixed(2)+" "+i.toFixed(2)+"]"},h=function(e){for(var t in i.LineEndingName)if(i.LineEndingName[t]==e)return+t;return 0};t.default=d,t.xfdfJsonToAddJson=function(e){var t={type:e.type,opacity:e.opacity,name:e.name,contents:e.contents,subject:e.subject,title:e.title,icon:e.icon,intent:e.intent||e.IT,DA:e.defaultappearance,alignment:e.justification,enableCaption:"yes"==e.caption},n=e.fontColor;n&&(t.fontColor=parseInt(n.replace("#",""),16));var r=void 0;(r=e.color)&&(t.color=parseInt(r.replace("#",""),16));var a=e["interior-color"]||e.interiorColor;a&&(t.styleFillColor=t.fillColor=parseInt(a.replace("#",""),16));var c=e.flags||"print",u=c.split(",");for(var s in c=0,i.AnnotFlagsName)-1!=u.indexOf(i.AnnotFlagsName[s])&&(c|=1<<parseInt(s));t.flag=c;var l=(e.rect||"").split(",");l.length&&(t.rect={left:+l[0],top:+l[3],right:+l[2],bottom:+l[1]});var d=(e.fringe||"").split(",");4===d.length&&(t.innerRect={left:t.rect.left+ +d[0],top:t.rect.top-+d[3],right:t.rect.right-+d[2],bottom:t.rect.bottom+ +d[1]});var p=e.coords;if(p){p=p.split(","),t.coords=[];for(var f=0,g=p.length;f<g;f+=8){var M=Math.min(+p[0],+p[2],+p[4],+p[6]),m=Math.max(+p[0],+p[2],+p[4],+p[6]),y=Math.max(+p[1],+p[3],+p[5],+p[7]),v=Math.min(+p[1],+p[3],+p[5],+p[7]);t.coords.push({left:M,right:m,top:y,bottom:v})}}var b=e.callout;if(b){b=b.split(","),t.calloutLinePoints=[];for(var D=0,A=b.length;D<A;D+=2)t.calloutLinePoints.push({x:+b[D],y:+b[D+1]})}var N=e.head;N&&(t.startStyle=h(N));var I=e.tail;I&&(t.endStyle=h(I));var j=e.vertices;if(j){t.vertexes=[],j=j.split(";");for(var T=0;T<j.length;T++){var w=j[T].split(",");t.vertexes.push({x:+w[0],y:+w[1]})}}var x=e.inklist;if(x){t.inkList=[],x=JSON.parse("["+x.replace(/;/g,",")+"]");for(var O=0;O<x.length;O++)for(var E=x[O],_=0;_<E.length;_+=2){var k=E[_],z=0==_?1:2;t.inkList.push({x:k,y:E[_+1],type:z})}}var C=o.Border_Style[e.style||"solid"];t.borderInfo={style:C,width:e.width||1};var S=e.dashes;S&&(t.borderInfo.dashes=JSON.parse("["+S+"]"));var L=e.intensity;L&&(t.borderInfo.cloudIntensity=L);var R=e.start;R&&(R=R.split(","),t.startPoint={x:+R[0],y:+R[1]});var P=e.end;return P&&(P=P.split(","),t.endPoint={x:+P[0],y:+P[1]}),t},t.PDFNameEncode=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.T=function(){return!0},t.F=function(){return!1},t.identity=function(e){return e},t.prop=function(e,t){return t[e]},t.curry=function(e){return function t(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=e.length?e.apply(void 0,r):function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(void 0,r.concat(n))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.left=t,this.bottom=n,this.right=r,this.top=i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={print:4,modify:8,extract:16,annotForm:32,fillForm:256,extractAccess:512,assemble:1024,printHigh:2048}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={invisible:1,hidden:2,print:4,noZoom:8,noRotate:16,noView:32,readOnly:64,locked:128,toggleNoView:256,lockedContents:512}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(4);n(13);var o=UIExtension.vendors.jQuery,a=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.PDFUI=n,this.addon=r,this.$validateRadio=o("[name=validateRadio]",this.$dialog),this.$editFrom=o("[name=editFrom]",this.$dialog),this.$editTo=o("[name=editTo]",this.$dialog),this.$textScript=o("[name=textScript]",this.$dialog),this.$btnEditScript=o("[name=btnEditScript]",this.$dialog),this.$child1=o("[name=validate-child-1]",this.$dialog),this.$child2=o("[name=validate-child-2]",this.$dialog),this.$child3=o("[name=validate-child-3]",this.$dialog)}return e.prototype.setAnnot=function(e){this.annot=e,this.initTab()},e.prototype.initTab=function(){this.$editFrom.attr("disabled",!0),this.$editFrom.val(""),this.$editTo.attr("disabled",!0),this.$editTo.val(""),this.$textScript.attr("disabled",!0),this.$textScript.val(""),this.$btnEditScript.attr("disabled",!0),this.$btnEditScript.off("click"),this.$validateRadio.filter("[value=0]").prop("checked",!0),this.$validateRadio.filter("[value=1]").attr("disabled",!0),this.$child2.addClass("disabled"),this.$child3.addClass("disabled"),this.$child1.addClass("disabled");var e,t=this.annot.getField(),n=void 0,o=t.getAction(r.Action_Trigger.format);if(o&&"TypeJavaScript"==o.info.type&&(n=o.info.javascript),1!=(e=n?i.CFD_Utils.GetFormatStringType(n):0)&&2!=e||(this.$validateRadio.filter("[value=1]").attr("disabled",!1),this.$child1.removeClass("disabled")),(o=t.getAction(r.Action_Trigger.validate))&&"TypeJavaScript"==o.info.type){var a=o.info.javascript;if(a&&""!=a)if(-1!=a.indexOf("AFRange_Validate")){var c=i.CFD_Utils.GetRangeValues(a),u=(c.bFrom,c.bTo,c.csiFrom),s=c.csiTo;this.$editFrom.val(u),this.$editFrom.attr("disabled",!1),this.$editTo.val(s),this.$editTo.attr("disabled",!1),this.$child2.removeClass("disabled"),this.$child1.removeClass("disabled"),this.$validateRadio.filter("[value=1]").prop("checked",!0)}else this.$child3.removeClass("disabled"),this.$validateRadio.filter("[value=2]").prop("checked",!0),this.$btnEditScript.attr("disabled",!1),this.editScriptEvent&&this.$btnEditScript.on("click",this.editScriptEvent),this.$textScript.val(a);else this.$validateRadio.filter("[value=0]").prop("checked",!0)}else this.$validateRadio.filter("[value=0]").prop("checked",!0)},e.prototype.resetTab=function(){},e.prototype.isNumber=function(e){return!(!/^-?[0-9]+\.([0-9]+)$/.test(e)&&!/^-?([0-9]+)\.?$/.test(e))},e.prototype.onSetRange=function(){var e=this.$editFrom.val();e=e.trim();var t=this.$editTo.val();if(t=t.trim(),""!=e||""!=t)if(""!=e&&""!=t){var n=void 0,o=void 0,a=this.annot.getField(),c=a.getAction(r.Action_Trigger.validate);if(c&&"TypeJavaScript"==c.info.type){var u=c.info.javascript;if(-1!=u.indexOf("AFRange_Validate")){var s=i.CFD_Utils.GetRangeValues(u),l=(s.bFrom,s.bTo,s.csiFrom),d=s.csiTo;n=Number(l),o=Number(d)}}if(!this.isNumber(e))return this.$editFrom.val(n||"0.0"),void this.PDFUI.alert({message:"dialog.error.validateRange",level:"error"});if(!this.isNumber(t))return this.$editTo.val(e||"0.0"),void this.PDFUI.alert({message:"dialog.error.validateRange",level:"error"});if(Number(e)>Number(t))return this.$editFrom.val(n||"0.0"),this.$editTo.val(o||"0.0"),void this.PDFUI.alert({message:"dialog.error.validateRange",level:"error"});var p="AFRange_Validate(true,"+e+",true,"+t+")";a.setAction(r.Action_Trigger.validate,p)}else{var f=""==e?t:e;this.isNumber(f)||(this.PDFUI.alert({message:"dialog.error.validateRange",level:"error"}),""==e?this.$editTo.val("0.0"):this.$editFrom.val("0.0"))}},e.prototype.onEvent=function(){var e=this;this.$dialog,this.$editFrom.on("blur",(function(t){return e.onSetRange()})),this.$editTo.on("blur",(function(t){return e.onSetRange()})),this.$validateRadio.on("change",(function(t){var n=o(t.target).val();switch(e.$editFrom.attr("disabled",!0),e.$editTo.attr("disabled",!0),e.$textScript.attr("disabled",!0),e.$btnEditScript.attr("disabled",!0),e.$btnEditScript.off("click"),e.$child2.addClass("disabled"),e.$child3.addClass("disabled"),Number(n)){case 0:break;case 1:e.$child2.removeClass("disabled"),e.$child1.removeClass("disabled"),e.$editFrom.attr("disabled",!1),e.$editTo.attr("disabled",!1);break;case 2:e.$child3.removeClass("disabled"),e.$btnEditScript.attr("disabled",!1),e.editScriptEvent&&e.$btnEditScript.on("click",e.editScriptEvent)}e.$editFrom.val(""),e.$editTo.val(""),e.$textScript.val("");var i=e.annot.getField();i.getAction(r.Action_Trigger.validate)&&i.removeAction(r.Action_Trigger.validate)})),this.editScriptEvent=function(t){e.formatJSDlg||(e.formatJSDlg=e.addon.getDialog("JSInput"));var n=e.annot.getField(),i=n.getAction(r.Action_Trigger.validate);e.formatJSDlg.show(i&&i.getScript(),(function(t){t&&""!=t&&(n.setAction(r.Action_Trigger.validate,t).then((function(){e.PDFUI.eventEmitter.emit(PDFViewCtrl.ViewerEvents.annotationAppearanceUpdated,[e.annot],e.annot.getPDFPage())})),e.$textScript.val(t))}))},this.$btnEditScript.on("click",this.editScriptEvent)},e.prototype.active=function(){this.initTab()},e.prototype.show=function(){},e.prototype.offEvent=function(){this.$validateRadio.off("change"),this.$editFrom.off("blur"),this.$editTo.off("blur"),this.$btnEditScript.off("click")},e}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=a(n(50)),o=a(n(51));function a(e){return e&&e.__esModule?e:{default:e}}var c=UIExtension.vendors.jQuery,u=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.pdfUI=n,n.pdfViewerPromise.then((function(e){r.pdfViewer=e})),this.$layout=c("select[name=layout]",this.$dialog),this.$advanced=c(".fv__ui-dialog-button[name=advanced]",this.$dialog),this.$behavior=c("select[name=behavior]",this.$dialog),this.$stateLabel=c("input[name=stateLabel]",this.$dialog),this.$statePosition=c(".state-position",this.$dialog),this.$iconImg=c(".icon-img",this.$dialog),this.$chooseIcon=c(".fv__ui-dialog-button[name=chooseIcon]",this.$dialog),this.$clearIcon=c(".fv__ui-dialog-button[name=clearIcon]",this.$dialog),this.$chooseIconFile=c("#chooseIconFile",this.$dialog),this.$advancedDialog=c(".fv__advanced-dialog",this.$dialog),this.$advancedDialogClose=c(".fv__icon-layer-close",this.$advancedDialog),this.$scaleType=c("select[name=scaleType]",this.$advancedDialog),this.$scale=c("select[name=scale]",this.$advancedDialog),this.$checkFit=c("input[name=fit]",this.$advancedDialog),this.$checkFit=c("input[name=fit]",this.$advancedDialog),this.$icon=c(".icon",this.$advancedDialog),this.$sliderX=c(".slider-x",this.$advancedDialog),this.$sliderY=c(".slider-y",this.$advancedDialog),this.$fraction=c(".fraction",this.$advancedDialog),this.$reset=c(".reset-button",this.$advancedDialog),this.$confirm=c(".confirm-button",this.$advancedDialog),this.$cancel=c(".cancel-button",this.$advancedDialog)}return e.prototype.setAnnot=function(e){this.annot=e,this.isOpened()&&this.show()},e.prototype.onEvent=function(){var e=this;this.$layout.on("change",(function(t){var n=c(t.target).val();e.setOptionProperty({layout:n}),e.annot.setWidgetIconCaptionRelation(n)})),this.$advanced.on("click",(function(t){c(t.target).hasClass("disabled")||e.annot.getWidgetIconFitOption().then((function(t){e.setAdvancedProperty({scale_way_type:t.scale_way_type,is_proportional_scaling:t.is_proportional_scaling,fit_bounds:t.fit_bounds,horizontal_fraction:t.horizontal_fraction,vertical_fraction:t.vertical_fraction}),e.$advancedDialog.show()}))})),this.$behavior.on("change",(function(t){var n=c(t.target).val();e.setOptionProperty({behavior:n}),e.annot.setWidgetHighlighting(n)})),this.$statePosition.on("change",(function(t){var n=c(t.target).val().pop();e.setOptionProperty({statePosition:n})})),this.$stateLabel.on("blur",(function(t){var n=c(t.target).val(),r=e.$statePosition.val()[0],i=e.$stateLabel.data("labelIcon");i[r].label=n,e.$stateLabel.data("labelIcon",i),e.annot.setWidgetMkCaption(r,n)})),this.$chooseIconFile.on("change",(function(t){var n=t.target.files[0];if(n){var r=e.pdfViewer.resourceGenerator(i.default.PDF_DOCUMENT_CLOSING,o.default.OBJECT_URL).expose().URL.createObjectURL(n),a=new FileReader;a.readAsArrayBuffer(n),a.onload=function(t){var n=a.result,i=e.$statePosition.val()[0];e.annot.setWidgetMkIcon(i,n).then((function(){var t=e.$stateLabel.data("labelIcon");t[i].icon=r,e.$stateLabel.data("labelIcon",t),e.$iconImg.attr("src",r),e.$clearIcon.removeClass("disabled"),e.$clearIcon.attr("tabindex","0")}))}}})),this.$chooseIcon.on("click",(function(t){e.$chooseIconFile.val(""),c(t.target).hasClass("disabled")&&t.preventDefault()})),this.$clearIcon.on("click",(function(t){if(!c(t.target).hasClass("disabled")){var n=e.$statePosition.val()[0],r=e.$stateLabel.data("labelIcon");r[n].icon="",e.$stateLabel.data("labelIcon",r),e.$iconImg.attr("src",""),e.annot.setWidgetMkIcon(n,null),c(t.target).addClass("disabled"),e.$chooseIconFile.val("")}})),this.$advancedDialogClose.on("click",(function(t){e.$advancedDialog.hide()})),this.$scaleType.on("change",(function(t){var n=c(t.target).val();e.setAdvancedProperty({scale_way_type:n})})),this.$scale.on("change",(function(t){var n=c(t.target).val();e.setAdvancedProperty({is_proportional_scaling:n})})),this.$checkFit.on("change",(function(t){var n=c(t.target).prop("checked");e.setAdvancedProperty({fit_bounds:n})})),this.$sliderX.on("input",(function(t){var n=c(t.target).val();e.setAdvancedProperty({horizontal_fraction:n})})),this.$sliderY.on("input",(function(t){var n=c(t.target).val();e.setAdvancedProperty({vertical_fraction:n})})),this.$reset.on("click",(function(t){e.setAdvancedProperty({horizontal_fraction:50,vertical_fraction:50})})),this.$confirm.on("click",(function(t){e.annot.setWidgetIconFitOption({scale_way_type:e.$scaleType.val(),is_proportional_scaling:e.$scale.val(),fit_bounds:e.$checkFit.prop("checked"),horizontal_fraction:e.$sliderX.val(),vertical_fraction:e.$sliderY.val()}).then((function(t){e.$advancedDialog.hide()}))})),this.$cancel.on("click",(function(t){e.$advancedDialog.hide()}))},e.prototype.show=function(){var e=this;this.$advancedDialog.hide(),this.annot.getWidgetMkOption().then((function(t){e.$stateLabel.data("labelIcon",t.labelIcon),e.setOptionProperty({layout:t.layout,behavior:t.behavior})}))},e.prototype.offEvent=function(){this.$layout.off("change"),this.$behavior.off("change"),this.$advanced.off("click"),this.$statePosition.off("change"),this.$stateLabel.off("blur"),this.$chooseIcon.off("click"),this.$clearIcon.off("click"),this.$chooseIconFile.off("change")},e.prototype.setOptionProperty=function(e){if(e.hasOwnProperty("layout")){var t=e.layout;this.$layout.val(t),"e_MKRelationNoIcon"===t?(this.$advanced.addClass("disabled"),this.$chooseIcon.addClass("disabled"),this.$iconImg.attr("src",""),this.$advanced.attr("tabindex","-1"),this.$chooseIcon.attr("tabindex","-1")):"e_MKRelationNoIcon"!==t&&(this.$advanced.removeClass("disabled"),this.$chooseIcon.removeClass("disabled"),this.$advanced.attr("tabindex","0"),this.$chooseIcon.attr("tabindex","0")),"e_MKRelationNoCaption"===t?this.$stateLabel.attr("disabled",!0).val(""):"e_MKRelationNoCaption"!==t&&this.$stateLabel.removeAttr("disabled")}if(e.hasOwnProperty("behavior")){var n=e.behavior;this.$behavior.val(n),"e_HighlightingPush"===n?this.$statePosition.find("option").show():(this.$statePosition.find("option").hide(),this.$statePosition.find('option[value="up"]').show());var i=this.$statePosition.val();this.setOptionProperty({statePosition:i[0]||"up"})}if(e.hasOwnProperty("statePosition")){var o=e.statePosition;this.$statePosition.val([o]);var a=this.$stateLabel.data("labelIcon")[o],c=a.icon;if(this.$stateLabel.val(a.label),"object"===(void 0===c?"undefined":r(c))){var u=document.createElement("canvas");u.width=c.width,u.height=c.height;var s=u.getContext("2d"),l=new(Uint8ClampedArray||Uint8Array)(c.buffer),d=s.createImageData(c.width,c.height);d.data.set(l),s.putImageData(d,0,0),c=u.toDataURL()}this.$iconImg.attr("src",c),c?this.$clearIcon.removeClass("disabled").attr("tabindex","0"):this.$clearIcon.addClass("disabled").attr("tabindex","-1")}},e.prototype.setAdvancedProperty=function(e){if(e.hasOwnProperty("scale_way_type")){var t=e.scale_way_type;this.$scaleType.val(t),this.$scale.attr("disabled","e_ScaleWayNever"===t);var n="false"===this.$scale.val()&&"e_ScaleWayAlways"===t;this.$checkFit.attr("disabled",n),this.$sliderX.attr("disabled",n),this.$sliderY.attr("disabled",n)}if(e.hasOwnProperty("is_proportional_scaling")){var r=e.is_proportional_scaling;this.$scale.val(r);var i="false"===r&&"e_ScaleWayAlways"===this.$scaleType.val();this.$checkFit.attr("disabled",i),this.$sliderX.attr("disabled",i),this.$sliderY.attr("disabled",i)}if(e.hasOwnProperty("fit_bounds")){var o=e.fit_bounds;this.$checkFit.prop("checked",o)}if(e.hasOwnProperty("horizontal_fraction")){var a=e.horizontal_fraction;this.$sliderX.val(a),this.$fraction.text("("+a+","+this.$sliderY.val()+")");var c=(this.$icon.parent().width()-this.$icon.outerWidth())*a/100;this.$icon.css("left",c+"px")}if(e.hasOwnProperty("vertical_fraction")){var u=e.vertical_fraction;this.$sliderY.val(u),this.$fraction.text("("+this.$sliderX.val()+","+u+")");var s=(this.$icon.parent().height()-this.$icon.outerHeight())*u/100;this.$icon.css("bottom",s+"px")}},e.prototype.isOpened=function(){return this.$dialog.is(":visible")},e}();t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={PDF_VIEWER_ALIVE:"PDF-VIEWER-ALIVE",PDF_DOCUMENT_CLOSING:"PDF-DOCUMENT-CLOSING",BROWSER_RELOAD:"BROWSER-RELOAD"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={OBJECT_URL:"object-url-creation"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.pdfUI=n,n.pdfViewerPromise.then((function(e){r.pdfViewer=e}))}return e.prototype.setAnnot=function(e){this.annot=e,this.isOpened()&&this.show()},e.prototype.onEvent=function(){var e=this,t=this.$dialog;t.find("select[name=buttonStyle]").on("change",(function(t){var n=t.target.value;e.annot.setMKProperty("normalCaption",n).then((function(){e.annot.updateUI({type:"normalCaption",value:n})}))})),t.find("input[name=exportValue]").on("blur",(function(n){var r=n.target.value;r.trim()||(r="Yes");var i=e.annot.getField();e.annot.getField().setExportValue(e.annot.info.control,r).then((function(e){t.find("input[name=radioButtonsValue]").checked&&i.setValue(r).then((function(e){return i.setDefaultValue(r)}))}))})),t.find("input[name=selectedByDefault]").on("change",(function(t){var n=e.annot.getField(),r=t.target.checked?n.getExportValues()[0]:"Off";setTimeout((function(){n.setValue(r,e.annot).then((function(e){return n.setDefaultValue(r)}))}),100)})),t.find("input[name=radioButtonsValue]").on("change",(function(t){var n=t.target.checked;e.annot.getField().setInUnison(n,e.annot)}))},e.prototype.show=function(){if(2!=this.annot.getType()&&3!=this.annot.getType()){var e=this.annot.getControl().getWidget(),t=e.getMKProperty("normalCaption"),n=e.getControl().info.exportValue,i=this.annot.getField().getDefaultValue(),o=this.annot.getField().getFlags();this.$dialog.find("select[name=buttonStyle]")[0].value=""==t?"l":t,this.$dialog.find("input[name=exportValue]")[0].value=n,this.$dialog.find("input[name=selectedByDefault]")[0].checked="Off"!=i,this.$dialog.find("input[name=radioButtonsValue]")[0].checked=r.FieldFlag.inUnison(o)}},e.prototype.offEvent=function(){if(!this.annot||!this.annot.isDestroyed&&2!=this.annot.getType()&&3!=this.annot.getType()){var e=this.$dialog;e.find("input:radio").off("change"),e.find("select[name=buttonStyle]").off("change"),e.find("input[name=exportValue]").off("blur"),e.find("input[name=selectedByDefault]").off("change"),e.find("input[name=radioButtonsValue]").off("change")}},e.prototype.isOpened=function(){return this.$dialog.is(":visible")},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(54);var r=PDFViewCtrl.shared.getUnitByName,i=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.pdfUI=n,n.pdfViewerPromise.then((function(e){r.pdfViewer=e}))}return e.formatNum=function(e,t){return null==t&&(t=2),isNaN(e)?0:Number(parseFloat(e).toFixed(t))},e.getRadioButtonBoundary=function(e){var t=Object.assign({},e);return t.width=e.right-e.left,t.height=e.top-e.bottom,t},e.transformUnit=function(t,n){var i=0;if("pica"==t){var o=r("pt"),a=r("pica").convertTo(n,o),c=e.formatNum(a%12);i=parseInt(a/12)+"p"+c}else i=n;return i},e.reTransformUnit=function(e,t){return"pica"!==e?t:1==(t+="").split("p").length?t.split("p")[0]:t.split("p")[1]},e.validatePosition=function(t,n,i,o,a){var c={},u=e.transformUnit,s=e.formatNum,l=r("pt"),d=r(a),p="pt"!==a?l.convertTo(t.getWidth(),d):t.getWidth(),f="pt"!==a?l.convertTo(t.getHeight(),d):t.getHeight();switch(""===n.trim()&&(n=NaN),i){case"left":c.error=n>=0&&n<=o.right,c.info="the value must be between 0 and "+u(a,s(o.right));break;case"right":c.error=n>=o.left&&n<=p,c.info="the value must be between "+u(a,s(o.left))+" and "+u(a,s(p));break;case"top":c.error=n>=o.bottom&&n<=f,c.info="the value must be between "+u(a,s(o.bottom))+" and "+u(a,s(f));break;case"bottom":c.error=n>=0&&n<=o.top,c.info="the value must be between 0 and "+u(a,s(o.top));break;case"width":c.error=n>=0&&n<=p-o.left,c.info="the value must be between 0 and "+u(a,s(p-o.left));break;case"height":c.error=n>=0&&n<=f-o.bottom,c.info="the value must be between 0 and "+u(a,s(f-o.bottom))}return c},e.prototype.showTip=function(e,t){},e.prototype.setAnnot=function(e){this.annot=e,this.lastRect=e.getRect(),this.isOpened()&&this.show()},e.prototype.onEvent=function(){var t=this,n=this.$dialog,i=n.find("select[name=units]"),o=n.find(".inputContainer").find("input"),a="pt",c={},u=r("pt"),s=r(a);this.$dialog.find("input[name=lockWidthHeight]").on("change",(function(e){var n=e.target.checked;t.locked=n,localStorage.setItem("lockWidthHeightFlag",n),t.$dialog.find(".inputContainer").find(".positionWidth,.positionHeight").attr("disabled",n)})),i.on("change",(function(n){t.lastRect=e.getRadioButtonBoundary(t.annot.getRect()),c=t.lastRect,a=n.target.value,s=r("picas"==a?"pica":a),"pt"==a?c=Object.assign({},c,t.lastRect):Object.keys(t.lastRect).map((function(e){c[e]=u.convertTo(t.lastRect[e],s)})),c.width=c.right-c.left,c.height=c.top-c.bottom,t.resetPosition(o,c,a)})),o.on("change",(function(n){var r=t.pdfViewer.getPDFPageRender(t.annot.getPage().getIndex()).annotsRender.getAnnotRender(t.annot.getId()),i=n.target||n.srcElement,l={},d=e.validatePosition(t.annot.getPage(),e.reTransformUnit(a,i.value),i.name,c,a);if(!d.error)return i.value=e.transformUnit(a,e.formatNum(c[i.name])),void t.showTip(d.info,2e3);r.rotate;var p=e.formatNum(e.reTransformUnit(a,i.value))-c[i.name];"width"==i.name?c.right=c.left+e.formatNum(e.reTransformUnit(a,i.value)):"height"==i.name&&(c.top=c.bottom+e.formatNum(e.reTransformUnit(a,i.value))),t.locked?c=t.keepBoundayNoChange(i.name,p,c):c[i.name]=e.formatNum(e.reTransformUnit(a,i.value)),"pt"==a?l=c:Object.keys(c).map((function(e){l[e]=s.convertTo(c[e],u)})),t.resetPosition(o,c,a),l.left==l.right&&(l.right+=.01),l.bottom==l.top&&(l.top+=.01),t.annot.getField().setRect(l),t.annot.setRect(l).then((function(){}))}))},e.prototype.resetPosition=function(t,n,r){var i=this;n.width=e.formatNum(n.right-n.left),n.height=e.formatNum(n.top-n.bottom),t.each((function(t,o){var a=isNaN(n[o.name])?0:e.formatNum(n[o.name]);"pica"==r?(a=e.transformUnit(r,n[o.name]),o.setAttribute("type","text")):o.setAttribute("type","number");var c=i.pdfUI.i18n.t("measurement.units."+r);o.value=a,o.parentNode.setAttribute("text-content-after","pica"==r?"":c)})),this.$dialog.find(".inputContainer .unit").text("pica"==r?"":r)},e.prototype.show=function(){this.annot,this.$dialog.find("select[name=units]").trigger("change"),this.$dialog.find("input[name=lockWidthHeight]")[0].checked=!1;var e=localStorage.getItem("lockWidthHeightFlag");e=null!=e&&"false"!=e,this.$dialog.find("input[name=lockWidthHeight]")[0].checked=e,this.$dialog.find(".inputContainer").find(".positionWidth,.positionHeight").attr("disabled",e)},e.prototype.offEvent=function(){var e=this.$dialog;e.find("select[name=units]").off("change"),e.find(".inputContainer").find("input").off("change")},e.prototype.keepBoundayNoChange=function(t,n,r){var i=Object.assign({},r);return"left"==t||"right"==t?(i.left=r.left+n,i.right=r.right+n):"bottom"!=t&&"top"!=t||(i.bottom=r.bottom+n,i.top=r.top+n),this.$dialog.find(".inputContainer").find("input").each((function(n,r){"width"!=r.name&&"height"!=r.name&&r.name!=t&&(r.value=""+e.formatNum(i[r.name]))})),i},e.prototype.isOpened=function(){return this.$dialog.is(":visible")},e}();t.default=i},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(56),o=(r=n(10))&&r.__esModule?r:{default:r},a=UIExtension.vendors.jQuery,c=PDFViewCtrl.PDF.form.constant.Field_Flag,u=(PDFViewCtrl.PDF.form.constant.Field_Type,PDFViewCtrl.PDF.annots.constant.Annot_Flags,PDFViewCtrl.ViewerEvents,PDFViewCtrl.PDF.constant.AnnotUpdatedType,function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.main=t,this.$dialog=t.$dialog,this.pdfUI=n,this.$addItemBtn=a("[name=addItemBtn]",this.$dialog),this.$deleteItemBtn=a("[name=deleteItemBtn]",this.$dialog),this.$upItemBtn=a("[name=upItemBtn]",this.$dialog),this.$downItemBtn=a("[name=downItemBtn]",this.$dialog),this.$itemLabel=a("[name=itemLabel]",this.$dialog),this.$itemValue=a("[name=itemValue]",this.$dialog),this.$items=a("[name=items]",this.$dialog),this.$allowUserEnter=a("[name=allowUserEnter]",this.$dialog),this.$multiSelect=a("[name=multiSelect]",this.$dialog)}return e.prototype.setAnnot=function(e){this.annot=e},e.prototype.setValue=function(){var e=this.annot.getField(),t=e.getFlags();this.optionsReRender();var n=e.getOptions()||[];this.$addItemBtn.toggleClass("disabled",!0),this.$deleteItemBtn.toggleClass("disabled",!n.length),this.$allowUserEnter.prop("checked",!!c.isComboEdit(t)),this.$multiSelect.prop("checked",!!c.isChoiceMultiSelect(t))},e.prototype.onEvent=function(){var e=this;this.$addItemBtn.on("click",(function(t){a(t.target).hasClass("disabled")||(e.$itemLabel.focus(),e.pdfUI.getPDFViewer().then((function(n){var r=e.$itemLabel.val().trim(),i=e.$itemValue.val().trim(),c=n.getPDFDocRender().formRender,u=e.annot.getField(),s=u.getValue()||"",l=u.getAction(o.default.FieldWillFormat);if(0==r.length&&0==i.length||!l)c.setValue(e.annot,r).then((function(n){e.modifyOptions("add",r,i),a(t.target).addClass("disabled"),e.$deleteItemBtn.removeClass("disabled")}));else{var d=void 0,p=!1;0!=i.length&&(d=c.execAction("Field",l,null,u,o.default.FieldWillFormat,{value:i})),(!d||d&&d.rc)&&0!=r.length&&(p=!0,d=c.execAction("Field",l,null,u,o.default.FieldWillFormat,{value:r})),d&&d.rc?(p=!1,c.setValue(e.annot,r).then((function(n){e.modifyOptions("add",r,i),a(t.target).addClass("disabled"),e.$deleteItemBtn.removeClass("disabled")}))):(p&&u.showDisplayValue(""),e.$itemLabel.val(s),e.$itemValue.val(s))}})))})),this.$deleteItemBtn.on("click",(function(t){a(t.target).hasClass("disabled")||e.modifyOptions("delete")})),this.$upItemBtn.on("click",(function(t){a(t.target).hasClass("disabled")||e.modifyOptions("up")})),this.$downItemBtn.on("click",(function(t){a(t.target).hasClass("disabled")||e.modifyOptions("down")})),this.$itemValue.on("blur",(function(t){e.modifyOptions("modify-value")})),this.$itemLabel.on("keyup",(function(t){var n=a(t.target).val().trim(),r=e.annot.getField().getOptions()||[],i=e.$itemValue.val().trim();r.find((function(e){return e.value===i}))&&e.$itemValue.val("");var o=!!r.find((function(e){return e.label===n})),c=""===n||o;e.$addItemBtn.toggleClass("disabled",c)})),this.$items.on("change",(function(t){var n=a(t.target).val();n&&n.length>1&&a(t.target).val([n.slice(-1)]),e.modifyOptions("selected-change")})),this.$allowUserEnter.on("change",(function(t){var n=a(t.target).prop("checked");e.annot.getField().setComboEdit(n)})),this.$multiSelect.on("change",(function(t){var n=a(t.target).prop("checked");e.annot.getField().setChoiceMultiSelect(n)}))},e.prototype.offEvent=function(){},e.prototype.optionsReRender=function(){var e=this.annot.getField().getOptions()||[],t=[],n=void 0,r=void 0;e.forEach((function(e,o){t.push('<option value="'+e.value+'">'+(0,i.html2Escape)(e.label)+"</option>"),void 0===n&&void 0===r&&e.selected&&(n=o,r=e)})),this.$items.html(t.join("")),void 0!==n&&this.$items.find("option").eq(n).prop("selected",!0),this.$itemLabel.val(r?r.label:""),this.$itemValue.val(r?r.value:""),this.$upItemBtn.toggleClass("disabled",void 0===n||0===n),this.$downItemBtn.toggleClass("disabled",void 0===n||n===e.length-1)},e.prototype.modifyOptions=function(e,t,n){var r=this,i=this.annot.getField(),o=i.getOptions()||[],a=void 0===t?this.$itemLabel.val().trim():t,c=void 0===n?this.$itemValue.val().trim():n,u=this.$items.find("option:selected").index();if("add"===e)(o=o.map((function(e){return{label:e.label,value:e.value,selected:!1,defaultSelected:!1}}))).push({label:a,value:c||a,selected:!0,defaultSelected:!0});else if("delete"===e)o.splice(u,1),o.length&&(o[0].selected=!0,o[0].defaultSelected=!0);else if("modify-value"===e){if(!c||!o.find((function(e){return e.label===a})))return;o[u].value=c}else if("up"===e){var s=[o[u-1],o[u]];o[u]=s[0],o[u-1]=s[1]}else if("down"===e){var l=[o[u+1],o[u]];o[u]=l[0],o[u+1]=l[1]}else if("selected-change"===e){var d=o[u];this.$itemLabel.val(d.label),this.$itemValue.val(d.value),this.$upItemBtn.toggleClass("disabled",0===u),this.$downItemBtn.toggleClass("disabled",u===o.length-1),o=o.map((function(e,t){return{label:e.label,value:e.value,selected:t===u,defaultSelected:t===u}}))}var p=void 0;(o=o.map((function(e){return[e.label,e.value,e.selected,e.defaultSelected]}))).length?p=i.setItems(o):(p=Promise.resolve(i.clearItems()),this.$deleteItemBtn.addClass("disabled")),p.then((function(e){return r.optionsReRender()}))},e}());t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.html2Escape=function(e){return String(e).replace(/[<>&"]/g,(function(e){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[e]}))},t.htmlCharacter2Entity=function(e){return String(e).replace(/[<>&"\s]/g,(function(e){return{" ":"&nbsp;","<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[e]}))},t.jquerySelector2Escape=function(e){return String(e).replace(/([!\"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=a(n(10)),o=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}var c=UIExtension.vendors.jQuery,u=PDFViewCtrl.PDF.form.constant.Field_Flag,s=(PDFViewCtrl.PDF.form.constant.Field_Type,PDFViewCtrl.PDF.annots.constant.Annot_Flags,PDFViewCtrl.PDF.constant.AnnotUpdatedType),l=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.main=t,this.$dialog=t.$dialog,this.pdfUI=n,this.$alignment=c("[name=alignment]",this.$dialog),this.$defaultValue=c("[name=defaultValue]",this.$dialog),this.$scrollLongText=c("input[name=scrollLongText]",this.$dialog),this.$richText=c("input[name=richText]",this.$dialog),this.$textLimit=c("input[name=textLimit]",this.$dialog),this.$maxLengthTextLimit=c("input[name=maxLengthTextLimit]",this.$dialog),this.$textPassword=c("input[name=textPassword]",this.$dialog),this.$fileSelect=c("input[name=fileSelect]",this.$dialog),this.$checkSpell=c("input[name=checkSpell]",this.$dialog),this.$textComb=c("input[name=textComb]",this.$dialog),this.$maxLengthTextComb=c("input[name=maxLengthTextComb]",this.$dialog),this.$multiLine=c("input[name=multiLine]",this.$dialog),this.$lineSpace=c("select[name=lineSpace]",this.$dialog),this.$lineSpaceExactlyValue=c("[name=lineSpaceExactlyValue]",this.$dialog),this.pdfUI.addViewerEventListener(o.default.fieldFontSizeChanged,(function(e){r.noScrollLongTextAdjustHandler()}))}return e.prototype.setAnnot=function(e){this.annot=e},e.prototype.active=function(){this.annot&&this.$alignment.val(this.annot.getField().getAlignment()||0)},e.prototype.setValue=function(){var e=this.annot.getField(),t=e.getFlags();this.$alignment.val(e.getAlignment()||0),this.$defaultValue.val(e.getDefaultValue()||""),this.$scrollLongText.prop("checked",!u.isNoScroll(t)),this.$textPassword.prop("checked",!!u.isPassword(t)),this.$checkSpell.prop("checked",!u.isNoSpellCheck(t));var n=!!u.isComb(t),r=e.getMaxLength(),i=!n&&r>0;this.$textLimit.prop("checked",i),this.$maxLengthTextLimit.prop("disabled",!i).val(i&&r||0),this.$textComb.prop("checked",n),this.$maxLengthTextComb.prop("disabled",!n).val(n&&r||0);var o=!!u.isMultiline(t),a=this.annot.getLineSpace()||[];this.$multiLine.prop("checked",o),this.$lineSpace.prop("disabled",!o).val(o?2!==a.length?"auto":[a[0],0].join(","):"auto"),this.$lineSpaceExactlyValue.val(a[1]||"0.0").parent().toggle("3,0"===[a[0],0].join(",")),this.$dialog.find("input[name=locked]").prop("checked")||this.disabledCheckBoxHandler()},e.prototype.onEvent=function(){var e=this;this.$alignment.on("change",(function(t){e.annot.getField().setAlignment(c(t.target).val()).then((function(){e.main.emitAnnotUpdateEvent(s.alignmentUpdated,!0)}))})),this.$defaultValue.on("blur",(function(t){var n=c(t.target).val().trim(),o=e.annot.getField(),a=o.getValue()||"",u=o.getAction(i.default.FieldWillFormat);if(0!=n.length&&u)return new Promise((function(e){return setTimeout(e,0)})).then((function(){return e.pdfUI.getPDFDocRender()})).then((function(s){if(s.getFormRender().execAction("Field",u,null,o,i.default.FieldWillFormat,{value:n}).rc){var l=e.$dialog.find("select[name=category]");if(e.$useRedText=e.$dialog.find("[name=useRedText]"),e.$useRedText.prop("checked")&&"number"==l.val()){var d=parseInt(n)>0?"#000":"#FF0000",p=(0,r.colorConvertor)(d,"int");e.annot.setDefaultAppearance({textColor:p}).then((function(){e.annot.updateUI({value:p,type:"textColor"})}))}o.setDefaultValue(""===n?void 0:n);var f=o.getDefaultValue()||"";a&&a===f||o.setValue(n).then((function(){o.form.calculate(),e.noScrollLongTextAdjustHandler()}))}else c(t.target).val(a)}));o.setDefaultValue(""===n?void 0:n);var s=o.getDefaultValue()||"";a&&a===s||o.setValue(n).then((function(){o.form.calculate(),e.noScrollLongTextAdjustHandler()}))})),this.$scrollLongText.on("change",(function(t){var n=c(t.target).prop("checked");e.annot.getField().setNoScroll(!n),e.main.emitAnnotUpdateEvent(s.flagsUpdated,!0),e.disabledCheckBoxHandler(),e.noScrollLongTextAdjustHandler()})),this.$richText.on("change",(function(t){e.disabledCheckBoxHandler()})),this.$textPassword.on("change",(function(t){e.annot.getField().setPassword(c(t.target).prop("checked")),e.main.emitAnnotUpdateEvent(s.flagsUpdated,!0),e.disabledCheckBoxHandler()})),this.$fileSelect.on("change",(function(t){e.disabledCheckBoxHandler()})),this.$checkSpell.on("change",(function(t){var n=c(t.target).prop("checked");e.annot.getField().setNoSpellCheck(!n),e.main.emitAnnotUpdateEvent(s.flagsUpdated,!0),e.disabledCheckBoxHandler()})),this.$textLimit.on("change",(function(t){var n=c(t.target).prop("checked"),r=e.annot.getField(),i=String(r.getValue()).length||10;r.setMaxLength(n?i:void 0),e.$maxLengthTextLimit.prop("disabled",!n).val(n?i:1),e.disabledCheckBoxHandler()})),this.$textComb.on("change",(function(t){var n=c(t.target).prop("checked"),r=e.annot.getField();r.setComb(n);var i=String(r.getValue()).length||10;r.setMaxLength(n?i:void 0),e.$maxLengthTextComb.prop("disabled",!n).val(n?i:1),e.main.emitAnnotUpdateEvent(s.flagsUpdated,!0),e.disabledCheckBoxHandler()})),this.$maxLengthTextLimit.add(this.$maxLengthTextComb).on("blur",(function(t){var n=Math.floor(c(t.target).val().trim()),r=e.annot.getField();if(n>0){r.setMaxLength(n),c(t.target).val(n);var i=String(r.getValue());n<i.length&&r.setValue(i.substr(0,n))}else c(t.target).val(r.getMaxLength()||10)})),this.$multiLine.on("change",(function(t){var n=c(t.target).prop("checked");e.annot.getField().setMultiline(n),e.annot.setLineSpace(void 0).then((function(){return e.annot.updateUI({type:"lineSpace",value:void 0})})),e.$lineSpace.prop("disabled",!n).val("auto"),e.$lineSpaceExactlyValue.val("0.0").parent().hide(),e.disabledCheckBoxHandler()})),this.$lineSpace.on("change",(function(t){var n=c(t.target).val(),r=n.split(","),i="auto"===n?void 0:[Number(r[0]),Number(r[1])];e.annot.setLineSpace(i).then((function(){return e.annot.updateUI({type:"lineSpace",value:i})})),e.$lineSpaceExactlyValue.val("0.0").parent().toggle("3,0"===n)})),this.$lineSpaceExactlyValue.on("blur",(function(t){var n=Number(c(t.target).val().trim());if(n>=0){var r=[3,n];e.annot.setLineSpace(r).then((function(){return e.annot.updateUI({type:"lineSpace",value:r})})),c(t.target).val(n)}else c(t.target).val((e.annot.getLineSpace()||[])[1])}))},e.prototype.offEvent=function(){},e.prototype.disabledCheckBoxHandler=function(){var e=this,t=[this.$scrollLongText,this.$richText,this.$textLimit,this.$textPassword,this.$fileSelect,this.$checkSpell,this.$textComb,this.$multiLine],n=[];t.forEach((function(t){var r;(r=t).prop("checked")&&(e.$scrollLongText.is(r)?n.push(e.$textComb):e.$richText.is(r)?n.push(e.$textPassword,e.$fileSelect,e.$textComb):e.$textLimit.is(r)?n.push(e.$fileSelect,e.$textComb):e.$textPassword.is(r)?n.push(e.$richText,e.$fileSelect,e.$checkSpell,e.$textComb,e.$multiLine):e.$fileSelect.is(r)?n.push(e.$scrollLongText,e.$richText,e.$textLimit,e.$textPassword,e.$checkSpell,e.$textComb,e.$multiLine):e.$checkSpell.is(r)?n.push(e.$textPassword,e.$fileSelect,e.$textComb):e.$textComb.is(r)?n.push(e.$scrollLongText,e.$richText,e.$textLimit,e.$textPassword,e.$fileSelect,e.$checkSpell,e.$multiLine):e.$multiLine.is(r)&&n.push(e.$textPassword,e.$fileSelect,e.$textComb)),t.prop("disabled",!1)})),n.forEach((function(e){return e.prop("disabled",!0)}))},e.prototype.noScrollLongTextAdjustHandler=function(){var e=this,t=this.annot.getField();u.isNoScroll(t.getFlags())&&0!==this.annot.getDAFontSize()&&this.pdfUI.getPDFViewer().then((function(n){var r=n.getAnnotRender(e.annot.getPDFPage().getIndex(),e.annot.getId()).component;if(r)for(;;){var i=r.$textInput[0],o=i.scrollWidth,a=i.clientWidth,c=i.scrollHeight,u=i.clientHeight,s=r.$textInput.val();if(r.$textInput.is("textarea")){if(!(c>u)){t.setValue(s);break}r.$textInput.val(s.substr(0,s.length-1))}else{if(!(o>a)){t.setValue(s);break}r.$textInput.val(s.substr(0,s.length-1))}}}))},e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(59),UIExtension.vendors.jQuery;var r=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$dialog=t,this.pdfUI=n,this.addon=r,this.$dialog=t}return e.prototype.setAnnot=function(e){var t=this;this.annot=e;var n=this.annot.getAdditionalAction(7),r="";n&&n.getScript&&(r=n.getScript());var i=this.$dialog.find("input[name=selectAction]").eq(n?1:0);setTimeout((function(){t.$dialog.find("#keyStrokeJS").val(r),i[0].checked=!0}),10),this.$dialog.find(".btn-edit").prop("disabled",!n)},e.prototype.onEvent=function(){var e=this,t=this.$dialog;t.find(".btn-edit").bind("click",(function(t){var n=e.addon.getDialog("JSInput"),r=e.$dialog.find("#keyStrokeJS"),i=e.annot.getAdditionalAction(7),o="";i&&"TypeJavaScript"===i.getType()?o=i.getScript():i=null,n.show(o,(function(t){if(!t||0==t.length)return r.val(""),void(i&&e.annot.removeAction(7,i));i?i.setScript(t):((i=new PDFViewCtrl.PDF.actions.JavaScriptAction).setScript(t),e.annot.getField().setAction(7,i)),r.val(t)}))})),t.find("input[name=selectAction]").on("change",(function(t){var n=e.$dialog.find("#keyStrokeJS"),r=e.$dialog.find(".btn-edit");switch(t.target.value){case"no":e.annot.removeAction(7),n.val(""),r.prop("disabled",!0);break;case"customJS":n.val(""),r.prop("disabled",!1)}}))},e.prototype.show=function(){},e.prototype.offEvent=function(){this.$dialog.find(".btn-edit").off("click"),this.$dialog.find("input[name=selectAction]").off("change")},e}();t.default=r},function(e,t,n){},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_Constants=__webpack_require__(6);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}__webpack_require__(13);var $=UIExtension.vendors.jQuery,getParam=function(e,t){return[e,t]},parseSimpleNotation=function e(t){var n="",r=t.length;if(0==r)return"";for(var i=0,o="";r>i;){var a=t[i];switch(a){case"[":case"]":case"(":case")":case"{":case"}":case":":case";":case"<":case">":case"?":case"=":case"|":case"&":case"!":case"~":case"^":case"%":case"*":case"/":case"+":case"-":return 0==o.length?(i++,(n+=a)+e(t=t.substr(i))):(isNaN(o)?(o.trim(),o.length>0&&(n+='AFMakeNumber(getField("'+o+'").value)')):n=o,o="",t=t.substr(i),i++,n+e(t));default:i++,o+=a}}return isNaN(o)?(o.trim(),o.length>0&&(n+='AFMakeNumber(getField("'+o+'").value)')):n=o,o="",n},JavaScriptAction=PDFViewCtrl.PDF.actions.JavaScriptAction,CalculateTab=function(){function CalculateTab(e,t,n){_classCallCheck(this,CalculateTab),this.$dialog=e,this.pdfUI=t,this.addon=n,this.$calculateRadio=$("[name=calculateRadio]",this.$dialog),this.$pickBtn=e.find("#pickFields"),this.$editNotations=e.find("#editNotations"),this.$editCustomScript=e.find("#editCustomScript"),this.$child2=$("[name=calculate-child-2]",this.$dialog),this.$child3=$("[name=calculate-child-3]",this.$dialog),this.$child4=$("[name=calculate-child-4]",this.$dialog),this.setValue=this.setAnnot,this.calculateChanged=!1}return CalculateTab.prototype.setAnnot=function setAnnot(){var _this=this,annot=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.annot;if(!this.uiEvent){this.annot=annot;var action=annot.getAdditionalAction(10),$dialog=this.$dialog;if(!action||!action.getScript)return this.calculateChanged||setTimeout((function(){$dialog.find(".fv__calculate-tab .fv__ui-dialog-cancel-button").addClass("disabled"),$dialog.find(".fv__calculate-tab textarea").val(""),_this.$child2.addClass("disabled"),_this.$child3.addClass("disabled"),_this.$child4.addClass("disabled"),_this.$pickBtn.addClass("disabled"),_this.$editNotations.addClass("disabled"),_this.$editCustomScript.addClass("disabled"),$dialog.find("#simpleOp").attr("disabled","disabled"),$dialog.find("#noCalc")[0].checked=!0}),20),void(this.calculateChanged=!1);var js=action.getScript();if(-1!=js.indexOf("BVCALC")){var notation=js.match(/BVCALC([\s\S]+?)EVCALC/)[1].trim();$dialog.find("#notations").val(notation),setTimeout((function(){_this.$child3.removeClass("disabled"),_this.$editNotations.removeClass("disabled"),$dialog.find("#simpleOp").removeAttr("disabled"),$dialog.find("#notationInput")[0].checked=!0}),20),$dialog.find(".fv__calculate-tab #notations + div").removeClass("disabled")}else if(-1!=js.indexOf("AFSimple_Calculate")){var params=eval(js.replace("AFSimple_Calculate","getParam"));$dialog.find(".fv__calculate-tab #simpleFields + div").removeClass("disabled"),setTimeout((function(){_this.$child2.removeClass("disabled"),_this.$pickBtn.removeClass("disabled"),$dialog.find("#simpleOp").removeAttr("disabled"),$dialog.find("#simpleCalc")[0].checked=!0}),20),$dialog.find("#simpleOp").val(params[0]),$dialog.find("#simpleFields").val(params[1].join(", "))}else setTimeout((function(){_this.$child4.removeClass("disabled"),_this.$editCustomScript.removeClass("disabled"),$dialog.find("#customInput")[0].checked=!0}),20),$dialog.find("#COCustomScript").val(js),$dialog.find(".fv__calculate-tab #COCustomScript + div").removeClass("disabled")}},CalculateTab.prototype.resetTab=function(){},CalculateTab.prototype.onEvent=function onEvent(){var _this2=this,$dialog=this.$dialog;this.$calculateRadio.on("change",(function(e){_this2.calculateChanged=!0;var t=e.target.value;$dialog.find(".fv__calculate-tab textarea").val("");var n=_this2.annot.getField();switch(n.getAction(_Constants.Action_Trigger.calculate)&&n.removeAction(_Constants.Action_Trigger.calculate),$dialog.find(".fv__calculate-tab .fv__ui-dialog-cancel-button").addClass("disabled"),$dialog.find("#simpleOp").attr("disabled","disabled"),_this2.$child2.addClass("disabled"),_this2.$child3.addClass("disabled"),_this2.$child4.addClass("disabled"),_this2.$pickBtn.addClass("disabled"),_this2.$editNotations.addClass("disabled"),_this2.$editCustomScript.addClass("disabled"),t){case"0":$dialog.find("#pickFields").addClass("disabled"),$dialog.find("#editNotations").addClass("disabled"),$dialog.find("#editCustomScript").addClass("disabled");break;case"1":$dialog.find("#simpleOp").removeAttr("disabled"),$dialog.find(".fv__calculate-tab #simpleFields + div").removeClass("disabled"),$dialog.find("#editNotations").addClass("disabled"),$dialog.find("#editCustomScript").addClass("disabled"),_this2.$pickBtn.removeClass("disabled"),_this2.$child2.removeClass("disabled");break;case"2":$dialog.find(".fv__calculate-tab #notations + div").removeClass("disabled"),$dialog.find("#pickFields").addClass("disabled"),$dialog.find("#editCustomScript").addClass("disabled"),_this2.$editNotations.removeClass("disabled"),_this2.$child3.removeClass("disabled");break;case"3":$dialog.find("#pickFields").addClass("disabled"),$dialog.find("#editNotations").addClass("disabled"),$dialog.find(".fv__calculate-tab #COCustomScript + div").removeClass("disabled"),_this2.$editCustomScript.removeClass("disabled"),_this2.$child4.removeClass("disabled")}})),$dialog.find("#simpleOp").on("change",(function(e){var op=$dialog.find("#simpleOp").val(),action=_this2.annot.getAdditionalAction(10);if(action){var _eval=eval(action.getScript().replace("AFSimple_Calculate","getParam")),_eval2=_slicedToArray(_eval,2),_=_eval2[0],fields=_eval2[1],js='AFSimple_Calculate("'+op+'", new Array ("'+fields.join('", "')+'"));';action.setScript(js).then((function(e){return _this2.annot.getField().form.calculate()}))}})),$dialog.find("#pickFields").on("click",(function(e){var t=$dialog.find("#simpleFields").val().split(", ");_this2.uiEvent=!0,_this2.pdfUI.getCurrentPDFDoc().then((function(e){var n=[];e.getPDFForm().enumFields([],0,(function(e,t){1!=e&&7!==e&&n.push(t)}),!1,!0);var r=_this2.addon.getDialog("PickField");r.show({type:-1,params:[n,t]},(function(e){if(e&&(e.length||""!=t[0])){if(!e.length)return _this2.annot.getField().removeAction(_Constants.Action_Trigger.calculate),void $dialog.find("#simpleFields").val("");var n='AFSimple_Calculate("'+$dialog.find("#simpleOp").val()+'", new Array ("'+e.join('", "')+'"));';r.callback=null,_this2.setCalcJS(n).then((function(t){_this2.uiEvent=!1,$dialog.find("#simpleFields").val(e.join(", "))}))}}))}))})),$dialog.find("#editNotations").on("click",(function(e){_this2.uiEvent=!0,_this2.addon.getDialog("JSInput").show($dialog.find("#notations").val(),(function(e){var t="/** BVCALC "+e+" EVCALC **/event.value="+parseSimpleNotation(e);_this2.setCalcJS(t).then((function(t){$dialog.find("#notations").val(e),_this2.uiEvent=!1}))}))})),$dialog.find("#editCustomScript").on("click",(function(e){_this2.uiEvent=!0,_this2.addon.getDialog("JSInput").show($dialog.find("#COCustomScript").val(),(function(e){_this2.setCalcJS(e).then((function(t){$dialog.find("#COCustomScript").val(e),_this2.uiEvent=!1}))}))}))},CalculateTab.prototype.show=function(){},CalculateTab.prototype.offEvent=function(){var e=this.$dialog;e.find("#pickFields").off("click"),e.find("#editNotations").off("click"),e.find("#editCustomScript").off("click")},CalculateTab.prototype.fillFieldNames=function(){return this.pdfUI.getCurrentPDFDoc().then((function(e){var t="";return e.getPDFForm().enumFields([],0,(function(e,n){t+=n+","}),!1,!0),t}))},CalculateTab.prototype.setCalcJS=function(e){var t=this,n=new JavaScriptAction;return n.setScript(e),this.annot.getField().setAction(10,n).then((function(e){t.annot.getField().form.calculate()}))},CalculateTab}();exports.default=CalculateTab},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),o=(r=n(62))&&r.__esModule?r:{default:r};n(63);var a=n(7),c=i.vendors.jQuery,u=PDFViewCtrl.ViewerEvents,s=PDFViewCtrl.PDF.form.constant.Field_Flag,l=PDFViewCtrl.PDF.constant.AnnotUpdatedType,d=PDFViewCtrl.PDF.form.constant.Field_Type,p=i.PDFViewCtrl.shared.createDeferred,f=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.PDFUI=t,this.addon=n,this.initDialog(),this.PDFUI.getStore().then((function(e){var t=e.subscribe(a.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX,(function(e){r.hide()}));r.PDFUI.getPDFViewer().then((function(e){e.addDestroyHook((function(){t()}))}))}))}return e.prototype.initDialog=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.PDFUI;this.isDestroyed=!1;var n=(0,o.default)();this.dialog=this.PDFUI.parseTemplate(n),this.dialog.localize(),this.dialog.mounted(),this.$dialog=c(this.dialog.element),this.$name=c("input[name=Name]",this.$dialog),this.$label=c("input[name=Label]",this.$dialog),this.$exportValue=c("input[name=ExportValue]",this.$dialog),this.$required=c("input[name=Required]",this.$dialog),this.$allProperties=c("[name=AllProperties]",this.$dialog),t.getRootComponent().then((function(t){t.append(e.dialog)})),this.bindEvent()},e.prototype.show=function(e){var t=this;this.resetForm();var n=this.annot.getPage().getIndex();return this.$pageContainer=c('.fv__pdf-page-container[data-index="'+n+'"]').get(0),c(this.$pageContainer).on("mousedown",(function(e){return t.hide()})),setTimeout((function(){t.dialog.open(t.$pageContainer),t.setDialogPosition(e).then((function(){t.$name[0].focus({preventScroll:!0})}))}),0),this},e.prototype.setDialogPosition=function(e){var t=this,n=document.getElementsByClassName("fv__ui-simple-form-properties-dialog")[0],r=document.getElementsByClassName("fv__shape-control-move-area")[0].getBoundingClientRect().height,i=n.getBoundingClientRect().width,o=n.getBoundingClientRect().height,a=function(e){if(t.annot){var n=c(),a=n.width,u=n.height,s=t.PDFUI.pdfViewer.pdfViewerRender.getRotation(),l=t.annot.getDeviceRect(e,s),d=void 0,p=void 0;switch(s){case 0:d=l.left,u-(p=l.bottom+10)<o&&(p=l.top-o-10);break;default:d=l.left,u-(p=l.top+r+10)<o&&(p=l.bottom-o-r-10)}return a-d<i&&(d=a-i),d<0&&(d=0),{top:p,left:d}}},c=function(){return t.$pageContainer.getBoundingClientRect()},s=p(),l=function(e){var n=c(),r=n.width,i=n.height;t.annot&&(t.$dialog.css({top:e.top/i*100+"%",left:e.left/r*100+"%"}),s.resolve())};return this.PDFUI.getPDFViewerRender().then((function(e){e.getScaleRatio().then((function(e){l(a(e))}))})),this.PDFUI.getPDFViewer().then((function(e){t.removeZoomToSuccessEvent=e.addEventListener(u.beforeOpenFile,(function(e){delete t.annot})),t.removeZoomToSuccessEvent=e.addEventListener(u.zoomToSuccess,(function(e){l(a(e))})),t.removeResizeEvent=window.addEventListener("resize",(function(){t.annot&&t.PDFUI.getPDFViewerRender().then((function(e){e.getScaleRatio().then((function(e){l(a(e))}))}))}))})),s.promise},e.prototype.resetForm=function(){this.$label.val(""),this.$exportValue.val("Yes"),this.$required.prop("checked",!1)},e.prototype.hide=function(){if(this.dialog&&this.dialog.isVisible){var e=document.activeElement;return this.dialog.element.contains(document.activeElement)&&e&&e.blur&&e.blur(),this.dialog.hide(),this}},e.prototype.setAnnot=function(e){var t=this;this.annot=e,this.dialog||this.initDialog();var n=(Object.keys(d).find((function(t){return d[t]===e.getField().getType()}))||"").toLowerCase();return Object.keys(d).forEach((function(e){return t.$dialog.removeClass("fv__ui-form-"+e.toLowerCase())})),this.$dialog.addClass("fv__ui--simple-form-"+n),this.$dialog.find("[show-in-types]").each((function(e,t){c(t).toggle(c(t).attr("show-in-types").indexOf(n)>-1)})),this.$dialog.find("[disabled-in-types]").each((function(e,t){c(t).prop("disabled",c(t).attr("disabled-in-types").indexOf(n)>-1),c(t).prop("disabled")?c(t).parent().addClass("disabled"):c(t).parent().removeClass("disabled")})),this.setValue(),this},e.prototype.setValue=function(){var e=this.annot.getField(),t=e.getFlags();this.$name.val(e.getName()),this.$required.prop("checked",!!s.isRequired(t))},e.prototype.bindEvent=function(){var e=this;c(document).on("mousedown",(function(t){return e.hide()})),c(this.$dialog).on("mousedown",(function(e){return e.stopPropagation()})),this.$name.on("input",(function(t){var n=c(t.target).val().trim(),r=e.annot.getField().getName(),i=e.annot.objectNumber;n&&n!==r&&e.PDFUI.getPDFViewer().then((function(t){t.getCurrentPDFDoc().loadPDFForm().then((function(t){t.validateFieldName(n,e.annot.info.fieldType).then((function(o){o?t.moveControl(r,n,i).then((function(t){if(!t)throw e.$name.val(r),new Error("Rename field error.");e.setLabel(e.annot),e.emitAnnotUpdateEvent(l.titleUpdated,!1)})):(e.$name.val(r),e.PDFUI.alert("dialog.error.validateFieldNameError"))}))}))}))})),this.$exportValue.on("change",(function(t){var n=e.annot.getField(),r=c(t.target).val().trim();r||(e.$exportValue.val("Yes"),r="Yes"),e.annot.getField().setExportValue(e.annot.info.control,r).then((function(e){n.setValue(r).then((function(e){return n.setDefaultValue(r)}))}))})),this.$label.on("input",(function(t){var n=c(t.target).val().trim();e.annot.setWidgetMkCaption("",n)})),this.$required.on("input",(function(t){e.annot.getField().setRequired(c(t.target).prop("checked")),e.emitAnnotUpdateEvent(l.flagsUpdated,!0)})),this.$allProperties.on("click",(function(t){e.hide();var n=e.PDFUI.editingMgr.getAllActiveWidgets();n&&0!==n.length&&e.PDFUI.editingMgr.setFocusWidget(n[0],!0)})),this.$allProperties.on("keyup",(function(e){13==e.keyCode&&e.target.click()}))},e.prototype.destroy=function(){this.isDestroyed||(this.removeZoomToSuccessEvent&&this.removeZoomToSuccessEvent(),this.removeResizeEvent&&this.removeResizeEvent(),c(document).off("mousedown"),c(this.$pageContainer).off("mousedown"),this.$dialog.off("mousedown"),this.$required.off("change"),this.$allProperties.off("click"),this.dialog.destroy(),this.isDestroyed=!0)},e.prototype.emitAnnotUpdateEvent=function(e,t){this.PDFUI.eventEmitter.emit(u.annotationUpdated,[this.annot],this.annot.getPDFPage(),e),t&&this.PDFUI.eventEmitter.emit(u.annotationAppearanceUpdated,[this.annot],this.annot.getPDFPage())},e}();t.default=f},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<layer name="simple-form-properties-dialog" class="fv__ui-simple-form-properties-dialog">\r\n <layer-header class="fv_ui_simplePropertiesDialog_title" title="form-designer:simpleDialog.title"></layer-header>\r\n <div class="fv_ui_dialog_body">\r\n <label class="d_f fw_w mb_15">\r\n <div class="lh_14 pr_10 ta_r fv__ui-dialog_label" data-i18n="form-designer:simpleDialog.name"></div>\r\n <input class="h_24" type="text" name="Name"/>\r\n </label>\r\n <label show-in-types="pushbutton" class="d_f fw_w mb_15">\r\n <div class="lh_14 pr_10 ta_r fv__ui-dialog_label" name="labelText" data-i18n="form-designer:simpleDialog.label"></div>\r\n <input class="h_24" type="text" name="Label"/>\r\n </label>\r\n <label show-in-types="radiobutton" class="d_f fw_w mb_15">\r\n <div class="lh_14 pr_10 ta_r fv__ui-dialog_label" name="exportValueText" data-i18n="form-designer:simpleDialog.exportValue"></div>\r\n <input class="h_24" type="text" name="ExportValue"/>\r\n </label>\r\n </div>\r\n <div class="d_f ai_c jc_sb">\r\n <label class="d_f ai_c mr_10 fv__ui-dialog-required">\r\n <input type="checkbox" disabled-in-types="listbox pushbutton" name="Required"/>\r\n <div data-i18n="form-designer:simpleDialog.footer.required"></div>\r\n </label>\r\n <div class="fv__ui-dialog-allProperties" name="AllProperties" data-i18n="form-designer:simpleDialog.footer.allProperties" @aria:button></div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=a(n(65));n(66);var o=a(n(67));function a(e){return e&&e.__esModule?e:{default:e}}var c=UIExtension.vendors.jQuery,u=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.PDFUI=t;var r=(0,i.default)();this.dialog=t.parseTemplate(r),this.$element=c(this.dialog.element),this.PDFUI.getPDFViewer().then((function(e){n.PDFViewer=e,n.previewer=new o.default(e),n.onEvent()})),this.PDFUI.getRootComponent().then((function(e){e.append(n.dialog),n.dialog.localize(),n.dialog.mounted()})),this.destroyHooks=[]}return e.prototype.show=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return e.getPage(),this.target=e,this.callback=n,this.PDFUI.getRootComponent().then((function(n){var i=t.updateSize(t.target),o=r(i,2),a=o[0],c=o[1],u=t.$element.find("#columnSize").attr("max",a);a<2?u.val("1"):a=2;var s=t.$element.find("#rowSize").attr("max",c);c<2?s.val("1"):c=2,t.dialog.open(n.element),t.previewer.setTarget(e).drawShape({columns:a,rows:c,marginLeft:10,marginTop:5})})),this},e.prototype.onEvent=function(){var e=this,t=this.$element.find("#rowSize");t.on("change",(function(n){var r=n.target.value;isNaN(r)&&(r=e.maxColum<2?1:0,t.val(r)),(r=+r)<=0&&(r=1,t.val(1)),r>e.maxColum&&(r=e.maxColum,t.val(r)),e.previewer.drawShape({columns:r})}));var n=this.$element.find("#columnSize");n.on("change",(function(t){var r=t.target.value;isNaN(r)&&(r=e.maxRow<2?1:0,n.val(r)),(r=+r)<=0&&(n.val(1),r=1),r>e.maxRow&&(r=e.maxRow,n.val(r)),e.previewer.drawShape({rows:r})}));var i=this.$element.find("#marginHorizon"),o=this.$element.find("#marginVertical");i.on("change",(function(a){var c=a.target.value;isNaN(c)&&(c=10,i.val("10")),(c=+c)<0&&(c=0,i.val("0")),c&&(c=e.getMaxSpace(!0)[0],i.val(c));var u=e.updateSize(e.target,c,+o.val()),s=r(u,2),l=s[0],d=s[1];t.attr("max",l),n.attr("max",d),e.previewer.drawShape({marginLeft:c})})),o.on("change",(function(a){var c=a.target.value;isNaN(c)&&(c=5,o.val("5")),(c=+c)<0&&(c=0,o.val("0")),c&&(c=e.getMaxSpace()[1],o.val(c));var u=e.updateSize(e.target,+i.val(),c),s=r(u,2),l=s[0],d=s[1];t.attr("max",l),n.attr("max",d),e.previewer.drawShape({marginTop:c})})),this.$element.find("#moveLeft").on("click",(function(t){e.previewer.move("Left")})),this.$element.find("#moveRight").on("click",(function(t){e.previewer.move("Right")})),this.$element.find("#moveUp").on("click",(function(t){e.previewer.move("Up")})),this.$element.find("#moveDown").on("click",(function(t){e.previewer.move("Down")}));var a=this.$element.find(".fv__ui-dialog-cancel-button");a.on("click",(function(t){e.hide(),e.reset()}));var c=this.$element.find("#MPSubmit");c.on("click",(function(t){var n=e.$element.find("#sameName").is(":checked"),r=e.$element.find("#columnSize").val(),i=e.$element.find("#rowSize").val();e.callback(e.target,n,r,i,e.previewer.getPositions()),e.hide(),e.reset()}));var u=this.$element.find("#preview");u.on("change",(function(t){u.is(":checked")?e.previewer.show():e.previewer.invisible()})),this.dialog.on("hidden",(function(t){e.hide(),e.reset(),e.callback()})),this.destroyHooks.push((function(e){columnSize.off("change"),rowSize.off("change"),i.off("change"),o.off("change"),u.off("change"),a.off("click"),c.off("click")}))},e.prototype.reset=function(){this.$element.find("#rowSize").val(2),this.$element.find("#columnSize").val(2),this.$element.find("#marginHorizon").val(10),this.$element.find("#marginVertical").val(5),this.$element.find("#preview").attr("checked","1"),this.$element.find("#sameName")[0].checked=!1},e.prototype.hide=function(){this.dialog.hide(),this.previewer.hide()},e.prototype.updateSize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=e.getRect(),o=this.previewer.getMaxSize(e.getPage().getIndex(),i,t,n),a=r(o,2),c=a[0],u=a[1];return this.maxColum=c,this.maxRow=u,[c,u]},e.prototype.destroy=function(){delete this.PDFUI,this.dialog.destroy(),delete this.dialog,delete this.target,delete this.callback,this.shapes.destroy(),delete this.shapes,delete this.$element,delete this.PDFViewer,this.destroyHooks.forEach((function(e){return e()})),this.destroyHooks=[]},e.prototype.getMaxSpace=function(e){var t=this.target,n=t.getPage().getIndex(),r=this.PDFViewer.getPDFDocRender(),i=r.getPDFPageRender(n),o=r.getAnnotRender(n,t.getId()).component.getRect(),a=o.right-o.left,c=o.bottom-o.top,u=+this.$element.find("#columnSize").val(),s=+this.$element.find("#rowSize").val(),l=+this.$element.find("#marginHorizon").val(),d=+this.$element.find("#marginVertical").val();return e?o.left+a+(a+l)*(s-1)>i.getShowWidth()&&(l=Math.floor((i.getShowWidth()-a*s-o.left)/(s-1))):o.top+d*(u-1)+c*u>i.getShowHeight()&&(d=Math.floor((i.getShowHeight()-c*u-o.top)/(u-1))),[l,d]},e}();t.default=u},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<layer name=\'multiple-copy-dialog\' modal="true" class="center fv__ui-multiple-copy-dialog fv_form-design">\r\n <layer-header class="fv__ui-multiple-copy-header" title="form-designer:dialog.multipleCopyTitle"\r\n @draggable="{type: \'parent\'}"></layer-header>\r\n\r\n <div class="fv__ui-multiple-copy-body">\r\n <div class="fv__multiple-copy-catalog">form-designer:dialog.multipleCopy.number</div>\r\n <div class="bg-wrap p22">\r\n <div class="fv__multiple-copy-widget">\r\n <span>form-designer:dialog.multipleCopy.column</span>\r\n <input min="1" type="number" id="columnSize" value="2" @aria:role="textbox" @aria:labelledby="::previousSiblings()">\r\n </div>\r\n <div class="fv__multiple-copy-widget">\r\n <span>form-designer:dialog.multipleCopy.row</span>\r\n <input min="1" type="number" id="rowSize" value="2" @aria:role="textbox" @aria:labelledby="::previousSiblings()">\r\n </div>\r\n </div>\r\n\r\n <div class="fv__multiple-copy-catalog m22">form-designer:dialog.multipleCopy.size</div>\r\n <div class="bg-wrap p22">\r\n <div class="fv__multiple-copy-widget">\r\n <span>form-designer:dialog.multipleCopy.width</span>\r\n <input min="0" type="number" id="marginHorizon" value="10" @aria:role="textbox" @aria:labelledby="::previousSiblings()">\r\n </div>\r\n <div class="fv__multiple-copy-widget">\r\n <span>form-designer:dialog.multipleCopy.height</span>\r\n <input min="0" type="number" id="marginVertical" value="5" @aria:role="textbox" @aria:labelledby="::previousSiblings()">\r\n </div>\r\n </div>\r\n <div class="fv__multiple-copy-position">\r\n <div class="fv__multiple-copy-catalog m22">form-designer:dialog.multipleCopy.position</div>\r\n <div class="bg-wrap" @aria:role="application" @aria:labelledby="::previousSiblings()">\r\n <div class="left fv__ui-dialog-button fv__ui-dialog-ok-button" id="moveLeft" tabindex="0" @aria:button>\r\n form-designer:dialog.multipleCopy.left</div>\r\n <div class="up fv__ui-dialog-button fv__ui-dialog-ok-button" id="moveUp" tabindex="0" @aria:button>\r\n form-designer:dialog.multipleCopy.up</div>\r\n <div class="right fv__ui-dialog-button fv__ui-dialog-ok-button" id="moveRight" tabindex="0" @aria:button>\r\n form-designer:dialog.multipleCopy.right</div>\r\n <div class="down fv__ui-dialog-button fv__ui-dialog-ok-button" id="moveDown" tabindex="0" @aria:button>\r\n form-designer:dialog.multipleCopy.down</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c jc_sb fv_ui_multiple-copy-footer">\r\n <div class="d_f ai_c jc_sb">\r\n <label class="d_f ai_c">\r\n <input type="checkbox" name="preview" id="preview" checked @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.footer.preview"></div>\r\n </label>\r\n <label class="d_f ai_c fv__hidden">\r\n <input type="checkbox" name="sameName" id="sameName" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.footer.sameName"></div>\r\n </label>\r\n </div>\r\n <div class="d_f footer">\r\n <div class="fv__ui-dialog-button fv__ui-dialog-ok-button" id="MPSubmit" name="confirm" @aria:button>dialog.ok</div>\r\n <div class="fv__ui-dialog-button fv__ui-dialog-cancel-button" name="closeDialog" @aria:button>dialog.cancel</div>\r\n </div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=UIExtension.vendors.jQuery,i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pdfViewer=t,this.$ui=r('<canvas class="fv_shapes_ui"></canvas>')}return e.prototype.initPageShapes=function(e){if(!this.targetPage||this.targetPage.index!=e)return(this.targetPage=this.pdfViewer.getPDFDocRender().getPDFPageRender(e)).$ui.append(this.$ui.show()),this},e.prototype.setTarget=function(e){return this.target=e,this},e.prototype.getPositions=function(){var e=this.$ui.offset(),t=this.$ui.parent().offset(),n=this.pdfViewer.getPDFDocRender(),r=this.target.getPage(),i=n.getPDFPageRender(r.getIndex()),o=e.left+1-t.left,a=e.top+1-t.top;return this.rects.map((function(e){return r.reverseDeviceRect({left:e.left+o,top:e.top+a,right:e.right+o,bottom:e.bottom+a},i.scale,i.rotate)}))},e.prototype.drawShape=function(e){var t=e.columns,n=void 0===t?this.columns:t,r=e.rows,i=void 0===r?this.rows:r,o=e.marginLeft,a=void 0===o?this.marginLeft:o,c=e.marginTop,u=void 0===c?this.marginTop:c;this.$ui.show();var s=this.target.getPage().getIndex();this.initPageShapes(s),this.columns=n,this.rows=i,this.marginLeft=a,this.marginTop=u;var l=this.calculateRects(s,this.target,n,i,a,u);this.$ui.attr(l).css(l);var d=this.$ui[0],p=d.getContext("2d");p.clearRect(0,0,d.offsetWidth,d.offsetHeight),p.save(),p.beginPath(),p.strokeStyle="blue",p.lineWidth=2,this.rects.forEach((function(e){p.rect(e.left+1,e.top+1,e.width,e.height)})),p.stroke(),p.restore()},e.prototype.move=function(e){var t=this.$ui.offset(),n=this.$ui.width(),r=this.$ui.height(),i=this.$ui.parent().width(),o=this.$ui.parent().height(),a=this.$ui.parent().offset(),c=t.left-a.left,u=t.top-a.top;switch(e){case"Left":c-2<0?c=1:c-=2;break;case"Right":c+n+2>i?c=i-n-1:c+=2;break;case"Up":u-2<0?u=1:u-=2;break;case"Down":u+2+r>o?u=o-r-1:u+=2}this.$ui.css({left:c,top:u})},e.prototype.getMaxSize=function(e,t,n,r){var i=this.pdfViewer.getPDFDocRender().getPDFPageRender(e),o=(t=i.page.getDeviceRect(t,i.scale,i.rotate)).right-t.left,a=t.bottom-t.top;return[1+Math.floor((i.getShowWidth()-t.left-o)/(n+o)),1+Math.floor((i.getShowHeight()-t.top-a)/(r+a))]},e.prototype.calculateRects=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments[4],o=arguments[5],a=this.pdfViewer.getPDFDocRender(),c=a.getAnnotRender(e,t.getId()).component,u=c.getRect(),s=u.right-u.left,l=u.bottom-u.top,d=this.rects=[],p=0;p<n;p++)for(var f=u.left+(i+s)*p,g=0;g<r;g++){var h=u.top+(o+l)*g;d.push({left:f-u.left,right:f+s-u.left,width:s,top:h-u.top,bottom:h+l-u.top,height:l})}return{left:u.left-1,top:u.top-1,width:s+(s+i)*(n-1)+2,height:l+(l+o)*(r-1)+2}},e.prototype.show=function(){this.$ui.css("opacity",1).show()},e.prototype.hide=function(){this.targetPage=null,this.$ui.hide()},e.prototype.invisible=function(){return this.$ui.css("opacity",0),!1},e.prototype.destroy=function(){delete this.pdfViewer,this.$ui.remove(),delete this.$ui},e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(69))&&r.__esModule?r:{default:r};n(70);var o=UIExtension.vendors.jQuery,a=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.PDFUI=t;var r=(0,i.default)();this.dialog=t.parseTemplate(r),this.PDFUI.getRootComponent().then((function(e){e.append(n.dialog),n.dialog.localize(),n.dialog.mounted()})),this.onEvent()}return e.prototype.show=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return this.PDFUI.getRootComponent().then((function(e){n.dialog.open(e.element)})),this.PDFUI.getCurrentPDFDoc().then((function(e){var t=e.getPageCount();o(n.dialog.element).find(".fv_range-start").attr("max",t).val("1"),o(n.dialog.element).find(".fv_range-end").attr("max",t).val(t),o(n.dialog.element).find(".fv_range-page-count").text(t)})),this.target=e,this.callback=i,this.maxValue=t,this.except=r,this},e.prototype.onEvent=function(){var e=this,t=o(this.dialog.element);t.find(".duplicateChoice").on("change",(function(e){switch(e.target.value){case"range":t.find(".fv_range").removeAttr("disabled").removeClass("disabled");break;default:t.find(".fv_range").attr("disabled","1").addClass("disabled").val(""),t.find(".fv_duplicate-msg").html(""),t.find(".error").removeClass("error")}})),t.find(".fv__ui-dialog-cancel-button").on("click",(function(t){e.hide()})),t.find(".fv__ui-dialog-ok-button").on("click",(function(n){var r=t.find(".duplicateChoice:checked").val(),i=t.find(".fv_range-start").val();if(isNaN(i))t.find(".fv_range-start").addClass("error");else{var o=t.find(".fv_range-end").val();if(isNaN(i))t.find(".fv_range-end").addClass("error");else if("range"!=r||e.checkRange(t.find(".fv_range-start"),t.find(".fv_range-end"))){var a=[],c=e.maxValue,u=e.except;switch(r){case"all":for(var s=1;s<=c;s++)-1==u.indexOf(s)&&a.push(s-1);break;case"odd":for(var l=1;l<=c;l+=2)-1==u.indexOf(l)&&a.push(l-1);break;case"even":for(var d=2;d<=c;d+=2)-1==u.indexOf(d)&&a.push(d-1);break;case"range":for(var p=parseInt(i);p<=parseInt(o);p++)-1==u.indexOf(p)&&a.push(p-1)}e.hide(),e.callback(e.target,a)}}})),t.find(".fv_range").on("change",(function(n){var r=t.find(".fv_range-start"),i=t.find(".fv_range-end");r.val().length&&i.val().length&&e.checkRange(r,i)})),this.dialog.on("hidden",(function(t){e.callback()}))},e.prototype.hide=function(){o(this.dialog.element).find(".defaultOpt").click(),this.dialog.hide()},e.prototype.checkRange=function(e,t){var n=o(this.dialog.element);if(n.find(".error").removeClass("error"),+e.val()>+t.val())return n.find(".fv_duplicate-msg").html(this.PDFUI.i18n.t("form-designer:dialog.duplicate.errRange")),e.addClass("error"),t.addClass("error"),!1;for(var r=0;r<2;r++){var i=0==r?e:t,a=+i.val();if(a-1<0)return n.find(".fv_duplicate-msg").html(this.PDFUI.i18n.t("form-designer:dialog.duplicate.errRangeStart")),i.addClass("error"),!1;if(this.maxValue-a<0)return n.find(".fv_duplicate-msg").html(this.PDFUI.i18n.t("form-designer:dialog.duplicate.errRangeEnd").replace("{max}",this.maxValue)),i.addClass("error"),!1;i.removeClass("error")}return n.find(".fv_duplicate-msg").html(""),!0},e.prototype.destroy=function(){var e=o(this.dialog.element);e.find(".duplicateChoice").off("change"),e.find(".fv__ui-dialog-cancel-button").off("click"),e.find(".fv__ui-dialog-ok-button").off("click"),e.find(".fv_range").off("change"),delete this.PDFUI,this.dialog.destroy(),delete this.dialog,delete this.target,delete this.maxValue,delete this.except},e}();t.default=a},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<layer name=\'duplicate-dialog\' modal="true" class="center fv__ui-duplicate-dialog fv_form-design">\r\n <layer-header class="fv__ui-multiple-copy-header" title="form-designer:dialog.duplicateTitle"\r\n @draggable="{type: \'parent\'}"></layer-header>\r\n\r\n <div class="fv__ui-duplicate-body" @aria:role="radiogroup" @aria:labelledby="::childAt(0)">\r\n <div>form-designer:dialog.duplicate.question</div>\r\n <div class="fv__ui-duplicate-options">\r\n <div class="d_f ai_c"><div class="fv__ui-duplicate-options-label">\r\n <input type="radio" checked="1" name="duplicateOpts" value="all" class="duplicateChoice defaultOpt" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.duplicate.all"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c"><div class="fv__ui-duplicate-options-label">\r\n <input type="radio" name="duplicateOpts" value="odd" class="duplicateChoice" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.duplicate.odd"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c"><div class="fv__ui-duplicate-options-label">\r\n <input type="radio" name="duplicateOpts" value="even" class="duplicateChoice" @aria:labelledby="::nextSiblings()"/>\r\n <div data-i18n="form-designer:dialog.duplicate.even"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c">\r\n <div class="fv__ui-duplicate-options-label">\r\n <input type="radio" name="duplicateOpts" value="range" class="duplicateChoice" @aria:labelledby="::nextSiblings()"/>\r\n\r\n <span data-i18n="dialog.printDialog.from"></span>\r\n <input type=\'number\' min="1" disabled class="fv_range fv_range-start"></input>\r\n <span data-i18n="dialog.printDialog.to"></span>\r\n <input type=\'number\' min="1" disabled class="fv_range fv_range-end"></input>\r\n <span>/</span>\r\n <span class="fv_range-page-count"></span>\r\n </div>\r\n </div>\r\n <div class="fv_duplicate-msg"></div>\r\n </div>\r\n </div>\r\n <div class="d_f ai_c jc_sb fv__ui-duplicate-footer footer">\r\n\r\n <div class="fv__ui-dialog-button fv__ui-dialog-ok-button" name="confirm" @aria:button>dialog.ok</div>\r\n <div class="fv__ui-dialog-button fv__ui-dialog-cancel-button" name="closeDialog" @aria:button>dialog.cancel</div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(72))&&r.__esModule?r:{default:r};n(73);var o=UIExtension.vendors.jQuery,a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pdfUI=t,this.dialog=t.parseTemplate((0,i.default)({fields:[]})),this.dialog.localize(),this.dialog.mounted(),this.$element=o(this.dialog.element),this.bindEvent()}return e.prototype.show=function(e,t){var n=this,r=this.$element,i="";return this.oriOrder=e.join("\n"),e.forEach((function(e,t){i+='<div class="fv_CO-item '+(t?"":"active")+'">'+e+"</div>"})),r.find(".fv__fields-list")[0].innerHTML=i,r.find("#COOK,#upButton").addClass("disabled"),r.find("#downButton").toggleClass("disabled",e.length<2),this.pdfUI.getRootComponent().then((function(e){n.dialog.open(e.element)})),this.callback=t,this.last=e.length-1,this},e.prototype.hide=function(){this.dialog.hide()},e.prototype.bindEvent=function(){var e=this,t=this.$element;t.on("click",".fv_CO-item",(function(n){t.find(".active").removeClass("active");var r=o(n.target).addClass("active");e.updateBtn(r.index())})),t.on("click","#upButton",(function(n){var r=t.find(".active").index();e.moveItemTo(r,r-1)})),t.on("click","#downButton",(function(n){var r=t.find(".active").index();e.moveItemTo(r,r+1)})),t.on("click","#COCancel",(function(t){return e.dialog.hide()})),t.on("click","#COOK",(function(t){var n=[];e.$element.find(".fv__fields-list>div").each((function(e,t){n.push(t.innerText)})),e.callback(n),e.hide()}))},e.prototype.destroy=function(){},e.prototype.updateBtn=function(e){var t=this.$element;t.find("#upButton").toggleClass("disabled",0==e),t.find("#downButton").toggleClass("disabled",e==this.last)},e.prototype.moveItemTo=function(e,t){var n=this.$element.find(".fv__fields-list"),r=o(n.children()[e]),i=o(n.children()[t]);r.toggleClass("active"),i.toggleClass("active"),i.focus();var a=r.text();r.text(i.text()),i.text(a),this.updateBtn(t),this.$element.find("#COOK").toggleClass("disabled",n[0].innerText==this.oriOrder)},e}();t.default=a},function(e,t,n){n(1),e.exports=function(e){"use strict";return e=e||{},'<layer name="field-CO-dialog" modal="true" class="fv__ui-CO-dialog center" @draggable>\r\n <layer-header class="fv__ui-CO-header" title="form-designer:dialog.calculateOrder.title"\r\n @draggable="{type: \'parent\'}"></layer-header>\r\n <div class="fv__CO-main">\r\n <div class="fv__CO-subtitle">form-designer:dialog.calculateOrder.subtitle</div>\r\n <div class="fv__CO-body">\r\n <div class="fv__fields-list" @stop-drag @aria:role="listbox" tabindex="0" @aria:labelledby="::parent()::previousSiblings()">\r\n\r\n </div>\r\n <div class="fv__CO-buttons">\r\n <div id="upButton"class="fv__ui-dialog-button fv__ui-dialog-cancel-button disabled" @aria:role="button">form-designer:dialog.options.comboListBox.up</div>\r\n <div id="downButton"class="fv__ui-dialog-button fv__ui-dialog-cancel-button disabled" @aria:role="button">form-designer:dialog.options.comboListBox.down</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="fv__CO-footer d_f footer">\r\n\r\n <div id="COOK" class="fv__ui-dialog-button fv__ui-dialog-ok-button disabled" @aria:role="button">dialog.ok</div>\r\n <div id="COCancel" class="fv__ui-dialog-button fv__ui-dialog-cancel-button" @aria:role="button">dialog.cancel</div>\r\n </div>\r\n</layer>'}},function(e,t,n){},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,o){return function(e){function t(){return r(this,t),i(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.prototype.changePeimission=function(e){var t=this;this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()})).then((function(n){var r=e.checkPermission(o.annotForm)&&e.checkPermission(o.modify);n&t.constructor.permission&&r?t.component.lock&&t.component.unlock():t.component.lock&&t.component.lock()}))},t}(t.ext(n,e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),o=(r=n(4))&&r.__esModule?r:{default:r},a=PDFViewCtrl.PDF.form.constant.Field_Type,c=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.textSizeList=["auto","6","8","10","12","14","16","18","20","22","24","26","28","30","32"],r.fontNameList=["Times Roman","Times Bold","Times Italic","Times BoldItalic","Helvetica","Helvetica Bold","Helvetica Oblique","Helvetica BoldOblique","Courier","Courier Bold","Courier Oblique","Courier BoldOblique","Symbol","ZapfDingbats"],n.editElement&&(n.editElement.style["text-align"]="left",n.editElement.addEventListener("blur",(function(e){if(!n.disabled){var t=n.editElement.value;r.selectFontSize(t)}}))),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"FieldPropertiesAppearanceController"},t.prototype.postlink=function(){var e=this;this.addDestroyHook(this.getPDFUI().addViewerEventListener(o.default.fieldActivated,(function(t){if(e.widget=t,"textSize"==e.component.name){var n=e.widget.getDAFontSize();e.component.setEditValue(0==n?"auto":n)}var r=t.getField();!r||r.getType()!==a.Sign&&r.getType()!==a.CheckBox&&r.getType()!==a.RadioButton?e.component.enable():e.component.disable()})))},t.prototype.selectFontSize=function(e){var t=this;this.component.setEditValue(e),e=Number.parseFloat(e),Number.isNaN(e)&&(e=0),this.widget&&e!==this.widget.getDAFontSize()&&this.widget.setDefaultAppearance({textSize:e}).then((function(){var n={type:"textSize",value:e},r=t.widget.formControl.getField();r.info.DA.textSize=e,r.info.DA.flags|=4,t.widget.updateUI(n),t.pdfUI.eventEmitter.emit(o.default.fieldFontSizeChanged,e)}))},t.prototype.selectFontName=function(e){if(this.component.setEditValue(e),this.widget){this.widget.setDefaultAppearance({fontName:e});var t={type:"fontName",value:e};this.widget.updateUI(t)}},t}(i.Controller);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),o=(r=n(4))&&r.__esModule?r:{default:r},a=n(0),c=n(7),u=n(6),s=n(15);n(77);var l=i.PDFViewCtrl.ViewerEvents,d=i.vendors.Hammer;t.default=function(e,t,r,p){return s.FORM_FIELD_STATE_HANDLER_NAMES.push(r),function(e){function s(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,t));return n.cursorStyle="fv__cursor-crosshair",n.setStoreFirstCreateField(!0),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(s,e),s.getStateName=function(){return r},s.prototype.correctPosition=function(e){var t=this.pageRender.getShowWidth(),n=this.pageRender.getShowHeight();return{x:Math.max(0,Math.min(t,e.x)),y:Math.max(0,Math.min(n,e.y))}},s.prototype.start=function(e,n,r){var i=n.left,o=n.top,a=this.shapeControl;a||(a=this.shapeControl=new t({resizable:!1,enableDiagonally:!0})).active(e.$handler,e.$handler,{left:i,top:o,width:0,height:0}),a.setSnapGrid(r)},s.prototype.adjust=function(e,t,n){var r,i,o=t.x,a=t.y,c=n.x,u=n.y,s=Math.abs(o-c),l=Math.abs(a-u),d={left:r=Math.min(o,c),top:i=Math.min(a,u),width:s=Math.max(s,1),height:l=Math.max(l,1)},p={left:r,top:i,right:r+s,bottom:i+l};p=e.getSnapMaxRect(p),d.width=p.right-p.left,d.height=p.bottom-p.top,d.top=p.top,d.left=p.left,e._applyAnnotBoundary(d),e.shape.boundary=p,e.shape.shape=d,e._updatePreviewer()},s.prototype.pageHandler=function(e){var t=this;this.assistantExecutor=new i.PDFViewCtrl.shared.ThrottleAsyncTaskExecutor(20,!0);var n=!1;this.pageRender=e;var r=e.$handler.get(0);e.$handler.addClass(this.cursorStyle);var o=this.hammer=new d.Manager(r);o.add(new d.Pan({direction:d.DIRECTION_ALL})),o.add(new d.Tap),o.on("tap",(function(e){t.isAbleCreateField()&&(t.hideSimpleProperties(),n=!0,t.assistantExecutor.waitForLastTask(null).then((function(n){if(n&&(n.right-n.left)*(n.top-n.bottom)!=0)return t.removeDesignerRect(),t.create(n,e,!0)})).finally((function(){n=!1})))})),o.on("panstart",(function(n){if(t.hideSimpleProperties(),t.isAbleCreateField()){var r=e.getPDFPointFromClientPoint(n.srcEvent.clientX-n.deltaX,n.srcEvent.clientY-n.deltaY,!0);t.startPoint={x:r[0],y:r[1]};var i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.getPDFPointFromClientPoint(n.srcEvent.clientX-n.deltaX,n.srcEvent.clientY-n.deltaY),2),o=i[0],a=i[1],c=e.pdfViewer.getSnapGrid();c&&(c=e.formatGridOptions(c)),t.start(e,{left:o,top:a},c)}})),o.on("panmove",(function(e){return t.currentPoint=t.correctPosition({x:t.startPoint.x+e.deltaX,y:t.startPoint.y+e.deltaY}),t.adjust(t.shapeControl,t.startPoint,t.currentPoint)})),o.on("panend",(function(e){t.currentPoint=t.correctPosition({x:t.startPoint.x+e.deltaX,y:t.startPoint.y+e.deltaY}),t.adjust(t.shapeControl,t.startPoint,t.currentPoint),t.create(t.shapeControl.shape.boundary,e)})),o.on("pancancel",(function(e){t.shapeControl.destroy(),t.shapeControl=null})),this.designerAssistantStatusChangeListener=function(i){i?e.getPDFPage().then((function(i){var o=!1;t.mouseoutEventListener&&r.removeEventListener("mouseout",t.mouseoutEventListener),t.moveEventListener&&r.removeEventListener("mousemove",t.moveEventListener),t.moveEventListener=function(r){if(o=!1,n)t.removeDesignerRect();else{var a=t.pdfViewer.getCurrentPDFDoc();t.assistantExecutor.exec((function(){var n=r.offsetX,u=r.offsetY,s=i.reverseDevicePoint([n,u],e.scale,e.rotate);if(!i.isDestroyed)return a.getPDFForm().getFieldAtPosition(i.getIndex(),s[0],s[1])?(t.renderSuggestedFormDesignerRect(null),c.RESOLVED_PROMISE_VOID):i.getSuggestedFormDesignerRect(s).then((function(n){if(!o&&!i.isDestroyed){if(n){var r=i.getDeviceRect(n,e.scale,e.rotate);t.renderSuggestedFormDesignerRect(r)}else t.renderSuggestedFormDesignerRect(null);return n}}),(function(e){throw t.renderSuggestedFormDesignerRect(null),e}))}))}},t.mouseoutEventListener=function(){o=!0,t.removeDesignerRect(),t.assistantExecutor.cancel()},r.addEventListener("mousemove",t.moveEventListener),r.addEventListener("mouseout",t.mouseoutEventListener)})):(t.removeDesignerRect(),r.removeEventListener("mouseout",t.mouseoutEventListener),r.removeEventListener("mousemove",t.moveEventListener))},this.pdfViewer.isDesignerAssistantEnabled&&this.designerAssistantStatusChangeListener(!0),this.pdfViewer.eventEmitter.on(l.designerAssistantStatusChanged,this.designerAssistantStatusChangeListener);var a=this.pdfViewer.getStore().subscribe(c.SET_FORM_CREATION_CONTINUOUSLY,(function(e){e||t.setStoreFirstCreateField(!0)}));this.pdfViewer.addDestroyHook((function(){a()}))},s.prototype.create=function(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.pageRender,c=a.docRender,l=c.getPDFDoc();return l.loadPDFForm().then((function(c){return a.getPDFPage().then((function(l){var d=r.getFieldType(),f=r.autoFieldName(c,d),g=i?e:l.reverseDeviceRect(e,a.scale,a.rotate);if(7==d)return c.addSignature(a.index,g,f).then((function(e){return e.getControlByIndex(0).getWidget()})).then((function(e){return r.afterAdded(a,e,t)})).catch((function(e){throw r.afterAdded(a,null,t),new Error(e.message)})).catch((function(e){r.afterAdded(a,null,t,!0),r.pdfViewer.eventEmitter.emit(o.default.fieldAddedFailed,d)}));var h={mkRotate:((a.rotate/90||0)+l.getRotation())%4};return"CreateDateStateHandler"===s.getStateName()&&(h.stateName=s.getStateName()),"CreateImageStateHandler"===s.getStateName()&&(h.stateName=s.getStateName(),h.imagePath=n(78)),c.addControl(a.index,f,p,g,h).then((function(e){if(e.success){var t=c.getField(e.newFieldName);if("CreateDateStateHandler"==h.stateName)return t.setAction(u.Action_Trigger.format,'AFDate_FormatEx("m/d/yy");').then((function(){return t.setAction(u.Action_Trigger.keyStroke,'AFDate_KeystrokeEx("m/d/yy");')})).then((function(){var e=t.getLoadedWidgets();return e[e.length-1]}));var n=t.getLoadedWidgets();return n[n.length-1]}})).then((function(e){return r.afterAdded(a,e,t)}))}))}))},s.prototype.renderSuggestedFormDesignerRect=function(e){var t=this.pageRender.$handler.get(0);e?(this.eDesignerRect||(this.eDesignerRect=document.createElement("div"),this.eDesignerRect.classList.add("fv__form-designer-suggested-designer-rect")),this.eDesignerRect.style.cssText+="\n left: "+e.left+"px;\n top: "+e.top+"px;\n width: "+(e.right-e.left)+"px;\n height: "+(e.bottom-e.top)+"px;\n ",this.eDesignerRect.parentElement!=t&&t.appendChild(this.eDesignerRect)):this.removeDesignerRect()},s.prototype.afterAdded=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.shapeControl&&this.shapeControl.destroy(),this.shapeControl=null,!r&&t&&(this.pdfViewer.eventEmitter.emit(o.default.fieldAdded,e,t,n),this.setStoreFirstCreateField(!1))},s.prototype.getStoreFirstCreateField=function(){return this.pdfViewer.getStore().getCurrentValue("is-first-create-field")},s.prototype.setStoreFirstCreateField=function(e){this.pdfViewer.getStore().dispatch("is-first-create-field",e)},s.prototype.isAbleCreateField=function(){var e=this.pdfViewer,t=e.getStateHandlerManager(),n=e.getStore().getCurrentValue(c.SET_FORM_CREATION_CONTINUOUSLY);return!(!this.getStoreFirstCreateField()&&!n&&(t.switchTo(a.STATE_HANDLER_HAND),1))},s.prototype.hideSimpleProperties=function(){this.pdfViewer.getStore().dispatch(c.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX,!0)},s.prototype.destroyPageHandler=function(){this.hammer&&this.hammer.destroy(),this.pageRender.$handler.removeClass(this.cursorStyle);var e=this.pageRender.$handler.get(0);this.moveEventListener&&(e.removeEventListener("mousemove",this.moveEventListener),e.removeEventListener("mouseout",this.mouseoutEventListener)),this.pdfViewer.eventEmitter.off(l.designerAssistantStatusChanged,this.designerAssistantStatusChangeListener),this.removeDesignerRect(),this.pageRender.page&&this.pageRender.page.clearDesignerAssitCache()},s.prototype.out=function(){e.prototype.out.call(this),this.destroyPageHandler()},s.prototype.removeDesignerRect=function(){var e=this.pageRender.$handler.get(0);this.eDesignerRect&&this.eDesignerRect.parentElement===e&&e.removeChild(this.eDesignerRect)},s.prototype.getFieldType=function(){return p},s.prototype.getFieldName=function(e,t){for(var n=e.countField(t),r=this.pdfViewer.i18n.t("form-designer:prefix."+t),i=r+n;e.getField(i);)i=r+ ++n;return i},s.prototype.autoFieldName=function(e,t){var n,r=s.getStateName();n="CreateDateStateHandler"===r?this.pdfViewer.i18n.t("form-designer:prefix.9"):"CreateImageStateHandler"===r?this.pdfViewer.i18n.t("form-designer:prefix.8"):this.pdfViewer.i18n.t("form-designer:prefix."+t);var i="",o=e.countField(t),a="";do{a=n+o,i=e.fieldsNameMap[a],o+=1}while(i);return a},s}(e)}},function(e,t,n){},function(e,t){e.exports="data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAB9CAMAAACPvJFmAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAPBQTFRFAAAAnp6e////19fXvb29qqqq2NjY8vLyq6uroKCgoaGhra2t9PT06+vroqKi2dnZvr6+zs7OsLCw1tbWpKSk/f3939/fo6Oj6Ojo6enpn5+f09PTuLi4rq6u/Pz89fX17Ozs7e3tp6en4ODgr6+vyMjIt7e3wcHBy8vL1NTUqKio8/Pz+vr6+/v75eXltbW1wMDA3d3dysrKxcXFrKys3t7e+Pj46urq8PDw3Nzcurq6pqam1dXV9/f3u7u70tLS4uLitra2v7+/sbGx5ubmx8fHxMTE7+/v2tra5+fns7Oz0dHRxsbGvLy85OTktLS0Px/vGQAAAFB0Uk5TAP////////////////////////////////////////////////////////////////////////////////////////////////////////8MxOzIAAAC3klEQVR4nO3Z/1/SQBjAcW+AcAMn5OBsRhEZSmkpFWqWWpZFX////6ZBwG7HbezL88C96vn8eq/J27HdM2Bjg6IoiqIoiqIoiqJSxVZZep21ukhHOtKRzjRdoVgqlYqbRurKFT7Z2O1qzTzdljMfPPaWabqyI81FB/bs5ddVQmO7apauwEM6vm2Urqg889SN0pUUXSkjpHHPYN2Oy5rG6louE7sIOpDr7r5gzNtD0G0C3LM1e3zoAwSdVQ3p2hlwD73JoS6GribPCvtRBp0deSzAnO3YAe5xBlx3erB4gqGzatW/155oZzlz+/P/7SmKzrK26/7zXT3TEOsFd9U+ki57B9JV65mmOxTSLSUWrtr16voyjvGCUTp/fsXPmXXqdkUYx54ZpHvuKDjGj4zRHXsqjokXxujsBRxjDVN0XQ2OvTRE19bhmGOGrsf1urIJupOF23WqOzVAN4jAMfZq/bq+ugsHvV677o0biWPKH0fQDXdil8/icOIMWXfuuK2Y5XLkNTeO93F1Tf813IvIZc38CvUWVzd539zIL2n1+1zQJapuOgPcd/pl7fySs98j6q5m58a91i1XY2XjxA2ebhA8eAj1ecPvw7L31W+AptuUNwtxqC5/1D00qd1i6T6FZ4D4rJzY2L1kFkfS1dRTI+7k5b3o+RU66AuObvGVnINg9TRuRMjHfEXR6TYLuzhbHSXEMSb9R3C6b9qXsqd7f/z8CiV/tQulO4m4H+3eePVoyfyS847BdY3Ic8PHn2QS7HPzxAhadxFzP/Jb6zIFjnnfgXWd2M2Cqz8aLKkHqxumeeOWJ2B1SQZUiqRfUQF0leUvmCrRAtRFfHDO0Q843R3w+8rkX2Ty6hLO9nRB6W4wcKIDoztPPj5TFHy7nUvXxLD5/QTRJX4qSlkXQqf/hhAgPsyvuwLf6GaJX7l1Iyyb32+g/Q430pGOdP+8bpWl1lEURVEURVEURVH/eX8AbcRT1tWlp0EAAAAASUVORK5CYII="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(80);var r,i=(r=n(4))&&r.__esModule?r:{default:r},o=n(7),a=n(85);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var u=UIExtension.vendors.Hammer,s=(PDFViewCtrl.shared.activation.ActivationGroup,PDFViewCtrl.keyboard),l=s.BuiltinShortcutContext,d=s.BuiltinCommand,p=s.interceptors,f=PDFViewCtrl.shared.keyboardStatus,g=PDFViewCtrl.ViewerEvents,h=PDFViewCtrl.PDF.annots.constant.Annot_Flags,M=UIExtension.vendors.jQuery,m=function(){function e(t,n,r,i){var o=this;c(this,e),this.editingMgr=t,this.pdfViewer=t.pdfViewer,this.pageRender=n,this.widget=r,this.annot=r;var a=r.getField().getName(),u=this.$ui=M('<div class=\'fv_\'>\n <div class="fv_form-editing-label">\n <div class="fv_form-editting-label-text"></div>\n </div>\n </div>');n.$ui.find(".fv__pdf-form-designer-container").append(u),this.$label=u.find(".fv_form-editing-label"),this.$label.find(".fv_form-editting-label-text").text(a),this.shapeControl=new PDFViewCtrl.ShapeControl({emitter:this.pdfViewer.eventEmitter,prestart:function(e,t,n){return o.shapeControlOnStart(e,t,n)},moving:function(e,t){return o.shapeControlOnMoving(e,t)},end:function(e,t,n){return o.shapeControlOnEnd(e,t,n)},afterEnd:function(e){return o.onAfterShapeCtrlEnd(e)},resizable:!0,enableDiagonally:!0}),this.shapeControl.ui.setAttribute("tabindex",-1),this.bindEvent(),this.active(i)}return e.prototype.getAnnotFlag=function(){return this.pdfViewer.annotManager.getAnnotFlag(this.annot)},e.prototype.shapeControlOnStart=function(e,t,n){this.hideSimpleProperties()},e.prototype.shapeControlOnMoving=function(e,t){this.$label.css(e)},e.prototype.onAfterShapeCtrlEnd=function(){this.shapeControl.clearCompanions()},e.prototype.shapeControlOnEnd=function(e,t,n){e.right=e.left+e.width,e.bottom=e.top+e.height;var r=this.pageRender.getAnnotRender(this.widget.getId()).component;this.pageRender.reverseDeviceRect(e).then((function(e){return r.annot.setRect(e)})).then((function(e){return r.render(r.scale,r.rotate,!0)})),this.$label.css(e)},e.prototype.bindEvent=function(){var e=this,t=this.$ui,n=this.editingMgr,r=this.hammer=new u.Manager(t[0]);r.add(new u.Tap({event:"doubletap",taps:2})),r.add(new u.Tap({event:"singletap"})),r.get("doubletap").recognizeWith("singletap"),r.get("singletap").requireFailure("doubletap"),r.on("singletap",(function(t){e.pdfViewer.isMultiSelectActive()&&e.editingMgr.getAllActiveWidgets().find((function(t){return t===e}))&&!f.isShiftDown?n.unActiveElement(e):n.activeElement(e)})),r.on("doubletap",(function(t){var r=t.srcEvent.ctrlKey;n.activeElement(e,r),e.editingMgr.isMultipleSelection()||n.setFocusWidget(e,!0)})),t.on("contextmenu",(function(t){if(t.ctrlKey)return t.preventDefault(),void t.stopPropagation();var r=!1;return n.pdfui.getComponentByName("contextmenu-form-designer").then((function(i){!e.isActive&&n.activeElement(e),7==e.widget.getField().getType()?i.children().forEach((function(e){-1===["propertiesMenu","deleteTarget","setTabOrdern","alignment-menu","fv--contextmenu-item-field-store-props"].indexOf(e.name)&&e.hide()})):i.children().forEach((function(e){e.show()}));var o=e.widget.getFlags(),a=i.getComponentByName("deleteTarget");o&h.locked||o&h.readOnly?a&&a.disable():a&&a.enable(),a=i.getComponentByName("copyToPage"),1==e.widget.page.doc.getPageCount()?a.disable():a.enable(),i.setCurrentTarget(e.widget),i.showAt(t.clientX,t.clientY);var c=!0,u=!1,s=void 0;try{for(var l,d=e.editingMgr.getAllActiveWidgets()[Symbol.iterator]();!(c=(l=d.next()).done);c=!0)if(128&l.value.widget.getFlags()){r=!0;break}}catch(e){u=!0,s=e}finally{try{!c&&d.return&&d.return()}finally{if(u)throw s}}return n.pdfui.getComponentByName("dropdown-align")})).then((function(t){return t&&(r?t.disable():e.editingMgr.getAllActiveWidgets().length>1?t.enable():t.disable()),n.pdfui.getComponentByName("dropdown-distribute")})).then((function(t){return t&&(r?t.disable():e.editingMgr.getAllActiveWidgets().length>2?t.enable():t.disable()),n.pdfui.getComponentByName("dropdown-size")})).then((function(t){return t&&(r?t.disable():e.editingMgr.getAllActiveWidgets().length>1?t.enable():t.disable()),n.pdfui.getComponentByName("dropdown-center")})).then((function(e){e&&(r?e.disable():e.enable())})),!1}));var i=this.$ui[0],o=a.isIE10?"MSPointerDown":"pointerdown",c=function(t){e.hideSimpleProperties(),1!==t.which||e.pdfViewer.isMultiSelectActive()||e.isActive||(n.activeElement(e),function(){var e=i.querySelector(".fv__shape-control-move-area");if(e){var n=void 0;a.isIE?((n=document.createEvent("MouseEvent")).initMouseEvent(o,t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,null),n.pointerId=t.pointerId):n=new PointerEvent("pointerdown",t),e.dispatchEvent(n)}}())};i.addEventListener(o,c),this.pdfViewer.addDestroyHook((function(){i.removeEventListener(o,c)}))},e.prototype.hideSimpleProperties=function(){this.pdfViewer.getStore().dispatch(o.HIDE_FORM_FIELD_SIMPLE_PROPERTY_BOX,!0)},e.prototype.active=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(e&&(this.$label.addClass("active"),this.shapeControl.show(),this.shapeControl.ui.focus(),this.isActive=!0,this.editingMgr.setFocusWidget(this)),this.$ui.addClass("fv_form-editing"),this.updateSize(),h.locked&this.widget.getFlags()?this.shapeControl.disable():this.shapeControl.enable(),this.isActive){var t=this.widget.getId(),n=this.pageRender.getAnnotRender(t);n&&this.pdfViewer.eventEmitter.emit(g.activeAnnotation,n,t,n.parent())}},e.prototype.changeSize=function(){var e=this.pageRender,t=e.page;if(e&&t){var n=t.getDeviceRect(this.widget.getRect(),this.pageRender.scale,this.pageRender.rotate);if(this.shapeControl&&this.shapeControl.shape){var r=this.shapeControl.shape,i=r.boundary;n=r.freeBoundary||i}if(n.width=n.right-n.left,n.height=n.bottom-n.top,this.isActive){var o=this.shapeControl;o.active(this.$ui,n,{left:0,top:0,right:this.pageRender.getShowWidth(),bottom:this.pageRender.getShowHeight()});var a=e.pdfViewer.getSnapGrid();a&&(a=e.formatGridOptions(a),o.setSnapGrid(a))}this.$label.css(n)}},e.prototype.updateSize=function(){var e=this.pageRender,t=e.page;if(e&&t){var n=t.getDeviceRect(this.widget.getRect(),this.pageRender.scale,this.pageRender.rotate);if(n.width=n.right-n.left,n.height=n.bottom-n.top,this.$label.css(n),this.isActive){var r=this.shapeControl;r.active(this.$ui,n,{left:0,top:0,right:this.pageRender.getShowWidth(),bottom:this.pageRender.getShowHeight()});var i=e.pdfViewer.getSnapGrid();i&&(i=e.formatGridOptions(i),r.setSnapGrid(i))}}},e.prototype.unActive=function(){this.$label&&this.$label.removeClass("active"),this.shapeControl.hide(),this.isActive=!1;var e=this.widget.getId(),t=this.pageRender.getAnnotRender(e);t&&this.pdfViewer.eventEmitter.emit(g.unActiveAnnotation,t,e,t.parent())},e.prototype.out=function(){this.hammer.destroy(),this.$label.remove(),this.$ui.off("mouseup contextmenu"),this.shapeControl.destroy(),this.shapeControl=null,this.$label=null,this.editingMgr=null,this.pageRender=null,this.$ui=null,this.isActive=!1},e}(),y=function(){function e(t,n,r,i,o){var a=this;c(this,e),this.pdfui=t,this.pdfViewer=n,this.dialogs=r,this.annots={},this.pages={},this.propertyDialog=i,this.simplePropertiesDialog=o,this.simplePropertiesDialog.setLabel=this.propertyDialog.setLabel=function(e){e.getField().controls.forEach((function(e){a.updateLabel(e.getWidget())}))},this.shortcutEnable=!0;var u=n.getKeyboard(),s=function(e,t){a.shortcutEnable&&t(e)},f=function(e,t){a.getAllActiveWidgets().length&&t(e)};u.withContext(l.ACTIVATION_ANY,(function(e){e.keydown(d.DELETE_SELECTED_OBJECT,(function(){a.getAllActiveWidgets().forEach((function(e){var t=e.widget;a.removeAnnot(t)})),t.formDesignDialog.lockedHandler(!0)}),{interceptors:[s,p.excludeEditableElementInterceptor(),f,p.preventDefaultInterceptor()]})})),u.withContext(l.ACTIVATION_WIDGET,(function(e){e.keydown(d.UNSELECT_OBJECT,(function(){t.editingMgr.type&&Object.keys(a.dialogs).sort().some((function(e){var t=a.dialogs[e];t&&t.dialog.isVisible&&t.hide()}))}),{interceptors:[f]})})),this._onRenderPageSuccessListener=function(e){for(var t in a.annots){var n=a.annots[t];n.widget.page.getIndex()===e.index&&n.changeSize()}},this.pdfViewer.eventEmitter.on(PDFViewCtrl.ViewerEvents.renderPageSuccess,this._onRenderPageSuccessListener),this.pdfViewer.eventEmitter.on(PDFViewCtrl.ViewerEvents.copyTextSuccess,(function(){return a.copiedData=""})),this.pdfViewer.eventEmitter.on(PDFViewCtrl.ViewerEvents.copyTextFailed,(function(){return a.copiedData=""}))}return e.prototype.enableShortcut=function(e){this.shortcutEnable=e},e.prototype.updateAnnots=function(e,t,n){var r=this;if("rect-updated"!=n){var i=this.focusedEle;i&&e.forEach((function(e){e==i.widget&&(h.locked&e.getFlags()?i.shapeControl.disable():i.shapeControl.enable())}))}else e.forEach((function(e){var t=r.annots[e.getId()];t&&t.updateSize()}))},e.prototype.updateLabel=function(e){this.annots[e.getId()].$ui.find(".fv_form-editting-label-text").text(e.getField().getName())},e.prototype.destroy=function(){var e=this;this.pdfViewer.eventEmitter.off(PDFViewCtrl.ViewerEvents.renderPageSuccess,this._onRenderPageSuccessListener),this.clearEditingWidgets(),delete this.propertyDialog.setLabel,delete this.propertyDialog,this.pdfui=null,this.annots={},this.pages={},delete this.focusedEle,this.shortcuts&&(this.shortcuts.forEach((function(t){var n;(n=e.pdfViewer).offShortcutKey.apply(n,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))})),delete this.shortcuts),this.pdfViewer=null,delete this.pasteHandler,delete this.focusedEle},e.prototype.startEditingMode=function(e){var t=this.pdfViewer;try{t.getCurrentPDFDoc().getPDFForm().checkDesignPerm()}catch(e){return}switch(this.type,this.clearEditingWidgets(),e){case"select-annotation":this.type=8;break;case"CreatePushButtonStateHandler":this.type=1;break;case"CreateCheckBoxStateHandler":this.type=2;break;case"CreateRadioButtonStateHandler":this.type=3;break;case"CreateComboBoxStateHandler":this.type=4;break;case"CreateListBoxStateHandler":this.type=5;break;case"CreateTextStateHandler":this.type=6;break;case"CreateSignStateHandler":this.type=7;break;case"CreateDateStateHandler":this.type=6;break;case"CreateImageStateHandler":this.type=1;break;default:this.type=0,this.propertyDialog&&this.propertyDialog.hide()}this.showAllEditingWidget()},e.prototype.setFocusWidget=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.propertyDialog.lockedHandler(!1),this.propertyDialog.setAnnot(e.widget),t&&this.propertyDialog.show(),this.focusedEle=e},e.prototype.showAllFormHighLight=function(e){var t=this.pdfViewer.getPDFDocRender().formRender;t&&t.setRuntimeHighlight(e),this.pdfViewer.setHighlightControlsUI(!1)},e.prototype.showAllEditingWidget=function(e){var t=this;if(this.type){var n=this.pdfViewer.getPDFDocRender();e||(e=n.getContainerVisiblePageIndexes()),e.forEach((function(e){if(!t.pages[""+e+t.type]){t.pages[""+e+t.type]=1;var r=n.getPDFPageRender(e);r.$ui.find(".fv__pdf-form-designer-container").remove(),r.$ui.append("<div class='fv__pdf-form-designer-container'></div>"),n.doc.getPageByIndex(e).then((function(e){return e.getAnnots()})).then((function(e){e.forEach((function(e){if("widget"===e.getType()){var n=e.getField();(n&&n.getType()==t.type||8==t.type)&&t.showEditingWidget(r,e,!1)}}))}))}}))}},e.prototype.showEditingWidget=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t.getField()){var r=new m(this,e,t,n);return this.annots[t.getId()]=r,r}},e.prototype.afterWidgetsAdded=function(e,t){var n=this;if(this.type){var r=this.pdfViewer.getPDFDocRender();t.forEach((function(t){var i=r.getPDFPageRender(e);n.showEditingWidget(i,t,!1)}))}},e.prototype.removeElement=function(e){var t=this.pdfViewer.getCurrentActivatable();t&&(this.isMultipleSelection()?t.remove&&t.remove(e):(t.clear&&t.clear(),t.add&&t.add(e)))},e.prototype.activeElementByAnnotId=function(e,t){var n=this.annots[t];n&&this.activeElement(n)},e.prototype.activeElement=function(e){this.pdfViewer.keyboard.defaultDeleteBinderName="formDesigner",this.pdfViewer.activeElement(e),this.pdfViewer.eventEmitter.emit(i.default.fieldActivated,e.widget)},e.prototype.unActiveElement=function(e){this.pdfViewer.unActiveElement(e)},e.prototype.clearEditingWidgets=function(){this.type=0,this.pages={};var e=!0;for(var t in this.annots)e=!1;if(!e){this.pdfui.activeElement(),delete this.focusedEle;var n=this.pdfViewer.getCurrentActivatable();for(var r in n&&(n.unActive(),n.clear&&n.clear()),this.annots)this.annots[r].unActive(),this.annots[r].out();this.annots={}}},e.prototype.restoreHighlight=function(){},e.prototype.isMultipleSelection=function(){return!!this.pdfViewer.isShortcutKeyEnabled()&&(PDFViewCtrl.DeviceInfo.isMac?f.isWin:f.isCtrl||f.isShift||this.copying)},e.prototype.removeAnnot=function(e){if(!(128&e.getFlags())){this.pdfViewer.getCurrentPDFDoc().getPDFForm().removeControl(e.getField().getName(),e.getObjNum()),this.pdfui.getComponentByName("contextmenu-form-designer").then((function(e){return e.hide()}));var t=this.annots[e.getId()];t&&(t.unActive(),t.out(),delete this.annots[e.getId()]);var n=-1;if(this.getAllActiveWidgets().forEach((function(t,r){t.widget==e&&(n=t)})),-1!==n){var r=this.pdfViewer.getCurrentActivatable();r&&r.remove&&r.remove(n)}}},e.prototype.zoom=function(e){for(var t in this.annots)this.annots[t].updateSize()},e.prototype.getAllActiveWidgets=function(){return this.pdfViewer.getAllActiveElements().filter((function(e){return e instanceof m}))},e}();t.default=y},function(e,t,n){var r=n(81);"string"==typeof r&&(r=[[e.i,r,""]]),n(83)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(82)(!1)).push([e.i,".fv__pdf-form-designer-container{\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n z-index: 31;\r\n -ms-high-contrast-adjust: none;\r\n forced-color-adjust: none;\r\n}\r\n.fv_form-editing{\r\n z-index:31!important;\r\n}\r\n.fv_form-editing-label{\r\n display:flex;\r\n \r\n justify-content: center;\r\n align-items: center;\r\n position: absolute;\r\n}\r\n.fv_form-editing-label{\r\n outline:1px solid black;\r\n overflow: hidden;\r\n}\r\n.fv_form-editing-label.active{\r\n outline: none;\r\n}\r\n.fv_form-editing-label>div{\r\n background-color: black;\r\n color:white;\r\n white-space: nowrap;\r\n font-size: 12px;\r\n line-height: normal;\r\n}\r\n.fv_form-editing-label.active>div{\r\n background-color: #5aa;\r\n}\r\n\r\n.fv_form-editing-label > .tab-number {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n padding-left: 2px;\r\n padding-right: 3px;\r\n color: #ffffff;\r\n background-color: black;\r\n z-index: 1;\r\n}\r\n ",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),c=function(e){return document.querySelector(e)},u=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=c.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),s=null,l=0,d=[],p=n(84);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(v(r.parts[a],t))}else{var c=[];for(a=0;a<r.parts.length;a++)c.push(v(r.parts[a],t));o[r.id]={id:r.id,refs:1,parts:c}}}}function g(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],c={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function h(e,t){var n=u(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=u(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function M(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function v(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var a=l++;n=s||(s=m(t)),r=A.bind(null,n,a,!1),i=A.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=I.bind(null,n,t),i=function(){M(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=N.bind(null,n),i=function(){M(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=g(e,t);return f(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var a=n[i];(c=o[a.id]).refs--,r.push(c)}for(e&&f(g(e,t),t),i=0;i<r.length;i++){var c;if(0===(c=r[i]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete o[c.id]}}}};var b,D=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function A(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=D(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function N(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function I(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=p(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),c=e.href;e.href=URL.createObjectURL(a),c&&URL.revokeObjectURL(c)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=navigator.userAgent.toLowerCase(),o=/opera|opr/.test(i),a=/msie/.test(i),c=/trident/.test(i),u=/\sapplewebkit\//.test(i),s=/chrome/.test(i),l=/safari/.test(i),d=/firefox/.test(i),p=/edg\//.test(i),f=t.isIE=(c||a)&&!o&&"msSaveBlob"in navigator,g=(t.isIE10=f&&!!(r=i.match(/msie ([\d\.]+)/))&&10===parseInt(r[1]),t.isIEAtLeast11=!a&&c&&!o),h=t.isEdge=i.indexOf("edge")>-1,M=t.isOpera=o,m=t.isWebkit=u,y=t.isChromiumEdge=!M&&s&&!!window.chrome&&p,v=t.isChrome=!M&&s&&!!window.chrome&&!p,b=t.isSafari=!/huawei/.test(i)&&!M&&l&&!s,D=t.isGecko="Gecko"==navigator.product&&!m&&!M,A=t.isFirefox=!v&&!M&&!b&&d,N=t.isMaxthon=/maxthon/.test(i),I=t.isQuirksMode="BackCompact"==document.CompactMode,j=t.isQQ=/tencenttraveler/.test(i)||/qqbrowser/.test(i),T=t.isWeChat=/wechat/.test(i),w=t.isSougou=/metasr/.test(i)||/sogou/.test(i),x=t.isBaidu=/baidubrowser/.test(i),O=t.isUC=/ucbrowser/.test(i),E=t.isLiebao=/liebao/.test(i),_=t.isMiuiBrowser=/miuibrowser/.test(i),k=t.isHuaweiBrowser=/huaweibrowser/.test(i)||/huaweialp/.test(i),z=t.is360=function(){if(j||O||w||_||E||N)return!1;if(-1===i.indexOf("chrome"))return!1;var e=function(e,t){var n=navigator.mimeTypes;for(var r in n)if("application/vnd.chromium.remoting-viewer"==n[r].type)return!0;return!1}();return!window.chrome||e}();t.isIE8=!!document.documentMode&&document.documentMode<8,t.isIE8Compact=8==document.documentMode,t.isIE9Compact=9==document.documentMode,t.isIE10Compact=10==document.documentMode,t.BROWSER_DETECTION={ie:f,ieAtLeast11:g,edge:h,"chromium-edge":y,opera:M,webkit:m,chrome:v,safari:b,gecko:D,firefox:A,maxthon:N,quirksMode:I,"quirks-mode":I,qq:j,wechat:T,sougou:w,baidu:x,liebao:E,uc:O,miui:_,huawei:k,360:z}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),o=(n(2),n(3),(r=n(91))&&r.__esModule?r:{default:r});function a(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,n){return function r(i,o){try{var a=t[i](o),c=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}var c=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.pdfUI=n.pdfUI,r}var n,r,i,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AlignmentController"},t.services=function(){return{alignmentControllerService:o.default}},t.prototype.mounted=function(){var e=this;this.contextmenu=this.component.getClosestComponentByType("contextmenu"),this.pdfUI.getPDFViewer().then((function(t){var n;e.pdfViewer=t,t.addEventListener("alignment",(n=a(regeneratorRuntime.mark((function t(n){var r,i=n.offsetWidth,o=n.offsetHeight;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.pdfUI.getAllActiveElements();case 2:if((r=t.sent)&&0!==r.length){t.next=5;break}return t.abrupt("return");case 5:r.forEach((function(t){e.setWidgetDeviceWidthHeight(t,{offsetWidth:i,offsetHeight:o},!0)}));case 6:case"end":return t.stop()}}),t,e)}))),function(e){return n.apply(this,arguments)}))})),this.contextmenu.on("beforeshow",(function(t){e.pdfUI.getGroupCount().then((function(t){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(t,2),r=n[0],i=n[1];r+i<2&&e.contextmenu.getComponentByName("dropdown-align").disable(),r+i<3&&e.contextmenu.getComponentByName("dropdown-distribute").disable()}))})),this.alignmentControllerService.addListenerCallback((function(t,n){var r=t.getAllActiveElements();r&&0!==r.length&&r.forEach((function(t){e.setWidgetDeviceWidthHeight(t,n,!0)}),e)}))},t.prototype.align=(n=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,c=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.contextmenu.hide(),n=this.component.parent.currentTarget,e.next=4,this.pdfUI.getAllActiveElements();case 4:r=e.sent,i=this.parseWidgetToEditingWidget(n),o=this.getWidgetDeviceRect(i),a=this.getActiveGroupDeviceCenter([i]),r.forEach((function(e){if(e.annot.objectNumber!==i.annot.objectNumber)switch(t){case"left":c.moveToDevicePosition(e,o.left);break;case"right":var n=c.getWidgetDeviceRect(e),r=o.right-n.right+n.left;c.moveToDevicePosition(e,r);break;case"top":c.moveToDevicePosition(e,void 0,o.top);break;case"bottom":var u=c.getWidgetDeviceRect(e),s=o.bottom-u.bottom+u.top;c.moveToDevicePosition(e,void 0,s);break;case"vertically":var l=c.getActiveGroupDeviceCenter([e]),d={x:a.x-l.x,y:a.y-l.y};c.moveToDevicePoint(e,d.x,null);break;case"horizontally":var p=c.getActiveGroupDeviceCenter([e]),f={x:a.x-p.x,y:a.y-p.y};c.moveToDevicePoint(e,null,f.y)}else c.moveToDevicePoint(e,0,0)}));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)}),t.prototype.center=(r=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.contextmenu.hide(),e.next=3,this.pdfUI.getAllActiveElements();case 3:n=e.sent,r=this.getActiveGroupPageDeviceCenter(n[0].pageRender||n[0].annotsRender.pageRender),i=this.getActiveGroupDeviceCenter(n),o={x:r.x-i.x,y:r.y-i.y},n.forEach((function(e){switch(t){case"vertically":a.moveToDevicePoint(e,null,o.y);break;case"horizontally":a.moveToDevicePoint(e,o.x,null);break;case"both":a.moveToDevicePoint(e,o.x,o.y)}}));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)}),t.prototype.distribute=(i=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,c,u,s,l,d,p,f,g=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.contextmenu.hide(),e.next=3,this.pdfUI.getAllActiveElements();case 3:n=e.sent,r=[],i=[],o=[],n.forEach((function(e){var t=g.getActiveGroupDeviceCenter([e]);r.push(t.x),i.push(t.y),e.deviceCenter=t,o.push(e)})),a=Math.min.apply(Math,r),c=Math.max.apply(Math,r),u=Math.min.apply(Math,i),s=Math.max.apply(Math,i),l=(c-a)/(n.length-1),d=(s-u)/(n.length-1),e.t0=t,e.next="horizontally"===e.t0?10:"vertically"===e.t0?14:18;break;case 10:return o.sort((function(e,t){return e.deviceCenter.x-t.deviceCenter.x>0?1:-1})),p=1,o.forEach((function(e){var t=e.deviceCenter;if(t.x!==a&&t.x!==c){var n=a+l*p;g.moveToDevicePoint(e,n-t.x),p+=1}else g.moveToDevicePoint(e,0,0)})),e.abrupt("break",19);case 14:return o.sort((function(e,t){return e.deviceCenter.y-t.deviceCenter.y>0?1:-1})),f=1,o.forEach((function(e){var t=e.deviceCenter;if(t.y!==u&&t.y!==s){var n=u+d*f;g.moveToDevicePoint(e,void 0,n-t.y),f+=1}else g.moveToDevicePoint(e,0,0)})),e.abrupt("break",19);case 18:return e.abrupt("break",19);case 19:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)}),t.prototype.size=(c=a(regeneratorRuntime.mark((function e(t){var n,r,i,o,a,c,u=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.contextmenu.hide(),n=this.component.parent.currentTarget,e.next=4,this.pdfUI.getAllActiveElements();case 4:r=e.sent,i=this.parseWidgetToEditingWidget(n),o=this.getWidgetDeviceRect(i),a=o.right-o.left,c=o.bottom-o.top,r.forEach((function(e){if(e.annot.objectNumber!==i.annot.objectNumber)switch(t){case"height":u.setWidgetDeviceWidthHeight(e,{deviceHeight:c});break;case"width":u.setWidgetDeviceWidthHeight(e,{deviceWidth:a});break;case"both":u.setWidgetDeviceWidthHeight(e,{deviceWidth:a,deviceHeight:c})}else u.moveToDevicePoint(e,0,0)}));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)}),t.prototype.getWidgetDeviceRect=function(e){var t=e.annot,n=e.pageRender||e.annotsRender.pageRender,r=n.getScale(),i=n.getRotation();return t.getDeviceRect(r,i)},t.prototype.getActiveGroupDeviceCenter=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[],r=[],i=[],o=[];t.forEach((function(t){var a=e.getWidgetDeviceRect(t);n.push(a.left),r.push(a.top),i.push(a.right),o.push(a.bottom)}));var a={left:Math.min.apply(Math,n),top:Math.min.apply(Math,r),right:Math.max.apply(Math,i),bottom:Math.max.apply(Math,o)};return{x:(a.left+a.right)/2,y:(a.top+a.bottom)/2}},t.prototype.getActiveGroupPageDeviceCenter=function(e){var t=this.getPageDeviceInfo(e),n=t.deviceHeight;return{x:t.deviceWidth/2,y:n/2}},t.prototype.getPageDeviceInfo=function(e){return{deviceWidth:e.getShowWidth(),deviceHeight:e.getShowHeight()}},t.prototype.moveToDevicePoint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getWidgetDeviceRect(e),i=r.left,o=r.top,a=r.right,c=r.bottom;i+=t,o+=n,a+=t,c+=n,this.moveTo(e,{left:i,top:o,right:a,bottom:c})},t.prototype.moveToDevicePosition=function(e,t,n){var r=this.getWidgetDeviceRect(e);t=void 0===t?r.left:t,n=void 0===n?r.top:n;var i=t-r.left+r.right,o=n-r.top+r.bottom;this.moveTo(e,{left:t,top:n,right:i,bottom:o})},t.prototype.moveTo=function(e,t){var n=t.left,r=t.top,i=t.right,o=t.bottom,a=e.pageRender||e.annotsRender.pageRender,c=e.annot,u=c.page,s=a.getScale(),l=a.getRotation(),d=this.checkBoundsOut(a,{left:n,top:r,right:i,bottom:o}),p=u.reverseDeviceRect(d,s,l);"widget"===c.getType()?c.setRect(p).then((function(){c.updateUI({});var e=c.getField(),t=e.getDisplayValue();t&&e.showDisplayValue(t)})):e.moveTo(d.left,d.top,"move",!0).then((function(){e.active()}))},t.prototype.setWidgetDeviceWidthHeight=function(e,t){var n=t.deviceWidth,r=t.deviceHeight,i=t.offsetWidth,o=t.offsetHeight,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=e.pageRender||e.annotsRender.pageRender,u=e.annot,s=u.page,l=c.getScale(),d=c.getRotation(),p=this.getWidgetDeviceRect(e);if(void 0!==n?p.right=p.left+n:void 0!==i&&(p.right+=i),void 0!==r?p.bottom=p.top+r:void 0!==o&&(p.bottom+=o),!a||!this.isBoundsOut(c,p))if(p=this.checkBoundsOut(c,p),"widget"===u.getType()){var f=s.reverseDeviceRect(p,l,d);u.setRect(f).then((function(){if(u.updateUI){u.updateUI({});var e=u.getField(),t=e.getDisplayValue();t&&e.showDisplayValue(t)}}))}else{var g=c.getAnnotRender(u.getId()),h=g.component;h.setRect({left:p.left,top:p.top,width:p.right-p.left,height:p.bottom-p.top}).then((function(e){h.movedByOther()}))}},t.prototype.checkBoundsOut=function(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right,a=this.getPageDeviceInfo(e),c=a.deviceHeight,u=a.deviceWidth;return n<0&&(n=0),r<0&&(r=0),o>u?(r-=o-u,o=u):o-r<10&&(o=r+10),i>c?(n-=i-c,i=c):i-n<10&&(i=n+10),{top:n,left:r,bottom:i,right:o}},t.prototype.isBoundsOut=function(e,t){var n=t.top,r=t.left,i=t.bottom,o=t.right,a=this.getPageDeviceInfo(e),c=a.deviceHeight,u=a.deviceWidth;return n<0||r<0||i>c||o>u},t.prototype.parseWidgetToEditingWidget=function(e){var t=void 0;return e.getType&&"widget"===e.getType()?t=e.getPage():(t=e.getPDFPage(),e=e.annot),{widget:e,pageRender:this.pdfViewer.getPDFPageRender(t.getIndex()),annot:e}},t}(i.Controller);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5)),a=(r=n(4))&&r.__esModule?r:{default:r};function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(){},d=o.PDFViewCtrl.Events,p=PDFViewCtrl.PDF.constant.User_Permissions,f=function(e){function t(){return u(this,t),s(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"ResetFormController"},t.prototype.mounted=function(){var t,n=this;e.prototype.mounted.call(this);var r=this.getPDFUI();this.addDestroyHook(this.getPDFUI().addViewerEventListener((c(t={},PDFViewCtrl.ViewerEvents.openFileSuccess,(function(e){n.changePermission(e)})),c(t,a.default.fieldAdded,(function(e,t,i){r.getCurrentPDFDoc().then((function(e){n.changePermission(e)}))})),c(t,d.annotationRemoved,(function(e){r.getCurrentPDFDoc().then((function(e){n.changePermission(e)}))})),t)))},t.prototype.handle=function(){var e=this.getPDFUI();e.confirm({message:"form-designer:resetFieldsConfirm",level:"warning"}).then((function(){e.getPDFDocRender().then((function(e){var t=e.getPDFDoc().getPDFForm(),n=t.getFieldCount();if(n>0){for(var r=[],i=0;i<n;i++){var o=t.getFieldByIndex(i);r.push(o.getName())}Promise.resolve(e.formRender.blurControl()).then((function(e){t.resetForm(r)}))}}))}),l)},t.prototype.changePermission=function(e){var t=this,n=this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()}));Promise.all([e.hasForm(),n]).then((function(e){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e,2),r=n[0];n[1]&t.constructor.permission&&r?t.component.lock&&t.component.unlock():t.component.lock&&t.component.lock()}))},i(t,null,[{key:"permission",get:function(){return p.modify+p.annotForm+p.fillForm}}]),t}(o.Controller);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(5));function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=i.PDFViewCtrl.Events,u=PDFViewCtrl.PDF.constant.User_Permissions,s=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"AddTooltipController"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.addDestroyHook(this.pdfUI.addViewerEventListener(c.openFileSuccess,(function(e){t.changePermission(e)})))},t.prototype.handle=function(){this.getPDFUI().addTooltipsForAllFormFields()},t.prototype.changePermission=function(e){var t=this;this.getPDFUI().getPDFDocRender().then((function(e){return e.getUserPermission().getValue()})).then((function(e){e&t.constructor.permission?t.component.unlock&&t.component.unlock():t.component.lock&&t.component.lock()}))},r(t,null,[{key:"permission",get:function(){return u.modify}}]),t}(i.Controller);t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoxitFontMap={FoxitFixedOTF:"Courier",FoxitSansMM:"Courier","FoxitFixedOTF-Bold":"Courier-Bold","FoxitFixedOTF-Italic":"Courier-Oblique","FoxitFixedOTF-BoldItalic":"Courier-BoldOblique",FoxitSansOTF:"Helvetica","FoxitSansOTF-Italic":"Helvetica-Oblique","FoxitSansOTF-Bold":"Helvetica-Bold","FoxitSansOTF-BoldItalic":"Helvetica-BoldOblique","FoxitSansPS-BoldItalic":"Helvetica-BoldOblique",FoxitSerifOTF:"Times-Roman","FoxitSerifOTF-Italic":"Times-Italic","FoxitSerifOTF-Bold":"Times-Bold","FoxitSerifOTF-BoldItalic":"Times-BoldItalic",FoxitSymbolOTF:"Symbol",FoxitDingbatsOTF:"ZapfDingbats"},t.FontFamilies=[{name:"Times Roman",value:"Times-Roman"},{name:"Times Bold",value:"Times-Bold"},{name:"Times Italic",value:"Times-Italic"},{name:"Times BoldItalic",value:"Times-BoldItalic"},{name:"Helvetica",value:"Helvetica"},{name:"Helvetica Bold",value:"Helvetica-Bold"},{name:"Helvetica Oblique",value:"Helvetica-Oblique"},{name:"Helvetica BoldOblique",value:"Helvetica-BoldOblique"},{name:"Courier",value:"Courier"},{name:"Courier Bold",value:"Courier-Bold"},{name:"Courier Oblique",value:"Courier-Oblique"},{name:"Courier BoldOblique",value:"Courier-BoldOblique"},{name:"Symbol",value:"Symbol"},{name:"ZapfDingbats",value:"ZapfDingbats"}],t.BorderStyleMap={solid:0,dashed:1,underline:2,beveled:3,inset:4},t.BorderWidthMap={1:"thin",2:"medium",3:"thick"}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r,i=n(16),o=n.n(i),a=n(2),c=n(3);!function(e){e.SINGLETON="SINGLETON",e.SHARED_SINGLETON="GLOBAL",e.MULTI_CASE="MULTI-CASE",e.COMPONENT_TREE="component-tree"}(r||(r={}));var u,s=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.pdfui=t,n.listenerCallback=function(e,t){},n.caller={},n}return s(t,e),t.scope=function(){return r.SINGLETON},t.isLazy=function(){return!1},t.prototype.serviceInjected=function(){var e=this;this.pdfui.getPDFViewer().then((function(t){t.addEventListener("alignment",(function(n){var r=n.offsetWidth,i=n.offsetHeight;return function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}(e,void 0,void 0,(function(){return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}(this,(function(e){return this.listenerCallback.call(this.caller,t,{offsetWidth:r,offsetHeight:i}),[2]}))}))})),e.bindShortcut(t)}))},t.prototype.addListenerCallback=function(e,t){e&&(this.listenerCallback=e,this.caller=t)},t.prototype.bindShortcut=function(e){var t=this,n=function(t,n){var r=e.getAllActiveElements();r&&0!==r.length&&n(t)};e.getKeyboard().withContext(a.BuiltinShortcutContext.ACTIVATION_WIDGET,(function(r){t.addDestroyHook(r.keydown(a.BuiltinCommand.ALIGNMENT_REDUCE_HEIGHT,(function(){e.eventEmitter.emit("alignment",{offsetHeight:-1})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_RAISE_HEIGHT,(function(){e.eventEmitter.emit("alignment",{offsetHeight:1})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_REDUCE_WIDTH,(function(){e.eventEmitter.emit("alignment",{offsetWidth:-1})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_RAISE_WIDTH,(function(){e.eventEmitter.emit("alignment",{offsetWidth:1})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_REDUCE_STEP_HEIGHT,(function(){e.eventEmitter.emit("alignment",{offsetHeight:-10})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_RAISE_STEP_HEIGHT,(function(){e.eventEmitter.emit("alignment",{offsetHeight:10})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_REDUCE_STEP_WIDTH,(function(){e.eventEmitter.emit("alignment",{offsetWidth:-10})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}),r.keydown(a.BuiltinCommand.ALIGNMENT_RAISE_STEP_WIDTH,(function(){e.eventEmitter.emit("alignment",{offsetWidth:10})}),{interceptors:[n,Object(c.preventDefaultInterceptor)()]}))}))},t}(o.a);t.default=l}]).default},module.exports=t(__webpack_require__(0))},function(e,t,n){var r;self,e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.StateNameFieldTypeMap=t.StateNameAnnotTypeMap=t.STATE_HANDLER_CREATE_ARTICLE_BUTTON=t.STATE_HANDLER_CREATE_RADIO_BUTTON=t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON=t.STATE_HANDLER_CREATE_FIELD_SIGNATURE=t.STATE_HANDLER_CREATE_FIELD_TEXT=t.STATE_HANDLER_CREATE_CROP_PAGES=t.STATE_HANDLER_SNAPSHOT_TOOL=t.STATE_HANDLER_CREATE_FREETEXT_BOX=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT=t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER=t.STATE_HANDLER_SELECT_ANNOTATION=t.STATE_HANDLER_SELECT_TEXT_IMAGE=t.STATE_HANDLER_SELECT_TEXT_ANNOTATION=t.STATE_HANDLER_LOUPE=t.STATE_HANDLER_ERASER=t.STATE_HANDLER_MARQUEE=t.STATE_HANDLER_CREATE_UNDERLINE=t.STATE_HANDLER_CREATE_TEXT=t.STATE_HANDLER_CREATE_STRIKE_OUT=t.STATE_HANDLER_CREATE_STAMP=t.STATE_HANDLER_CREATE_SQUIGGLY=t.STATE_HANDLER_CREATE_SQUARE_CROP=t.STATE_HANDLER_CREATE_SQUARE=t.STATE_HANDLER_CREATE_REPLACE=t.STATE_HANDLER_CREATE_POLYLINE=t.STATE_HANDLER_CREATE_POLYGON=t.STATE_HANDLER_CREATE_POLYGON_CLOUD=t.STATE_HANDLER_CREATE_PENCIL=t.STATE_HANDLER_CREATE_CIRCLE_AREA=t.STATE_HANDLER_CREATE_AREA=t.STATE_HANDLER_CREATE_PERIMETER=t.STATE_HANDLER_CREATE_DISTANCE=t.STATE_HANDLER_CREATE_LINE=t.STATE_HANDLER_CREATE_LINK=t.STATE_HANDLER_CREATE_EDIT_IMAGE=t.STATE_HANDLER_CREATE_IMAGE=t.STATE_HANDLER_CREATE_HIGHLIGHT=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT=t.STATE_HANDLER_CREATE_CIRCLE=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT=t.STATE_HANDLER_CREATE_ARROW=t.STATE_HANDLER_CREATE_CARET=t.STATE_HANDLER_CHECK_THE_SEARCH=t.STATE_HANDLER_HAND=void 0;var i=n(11);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.STATE_HANDLER_HAND="hand",t.STATE_HANDLER_CHECK_THE_SEARCH="checkTheSearch";var a=t.STATE_HANDLER_CREATE_CARET="createCaret",c=t.STATE_HANDLER_CREATE_ARROW="createArrow",u=t.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT="createAreaHighlight",s=t.STATE_HANDLER_CREATE_CIRCLE="createCircle",l=t.STATE_HANDLER_CREATE_FILE_ATTACHMENT="createFileAttachment",d=t.STATE_HANDLER_CREATE_HIGHLIGHT="createHighlight",p=t.STATE_HANDLER_CREATE_IMAGE="createImage",f=(t.STATE_HANDLER_CREATE_EDIT_IMAGE="createEditImage",t.STATE_HANDLER_CREATE_LINK="createLink"),g=t.STATE_HANDLER_CREATE_LINE="createLine",h=t.STATE_HANDLER_CREATE_DISTANCE="createDistance",M=t.STATE_HANDLER_CREATE_PERIMETER="createPerimeter",m=t.STATE_HANDLER_CREATE_AREA="createArea",y=t.STATE_HANDLER_CREATE_CIRCLE_AREA="createCircleArea",v=t.STATE_HANDLER_CREATE_PENCIL="createPencil",b=t.STATE_HANDLER_CREATE_POLYGON_CLOUD="createPolygonCloud",D=t.STATE_HANDLER_CREATE_POLYGON="createPolygon",A=t.STATE_HANDLER_CREATE_POLYLINE="createPolyline",N=t.STATE_HANDLER_CREATE_REPLACE="createReplace",I=t.STATE_HANDLER_CREATE_SQUARE="createSquare",j=(t.STATE_HANDLER_CREATE_SQUARE_CROP="createSquareCrop",t.STATE_HANDLER_CREATE_SQUIGGLY="createSquiggly"),T=t.STATE_HANDLER_CREATE_STAMP="createStamp",w=t.STATE_HANDLER_CREATE_STRIKE_OUT="createStrikeOut",x=t.STATE_HANDLER_CREATE_TEXT="createText",O=t.STATE_HANDLER_CREATE_UNDERLINE="createUnderline",E=(t.STATE_HANDLER_MARQUEE="marquee",t.STATE_HANDLER_ERASER="eraser",t.STATE_HANDLER_LOUPE="loupe",t.STATE_HANDLER_SELECT_TEXT_ANNOTATION="select-text-annotation",t.STATE_HANDLER_SELECT_TEXT_IMAGE="select-text-image",t.STATE_HANDLER_SELECT_ANNOTATION="select-annotation",t.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER="CreateFreeTextTypewriterHandler"),_=t.STATE_HANDLER_CREATE_FREETEXT_CALLOUT="createFreeTextCallout",k=t.STATE_HANDLER_CREATE_FREETEXT_BOX="createFreeTextBox",z=(t.STATE_HANDLER_SNAPSHOT_TOOL="snapshot-tool",t.STATE_HANDLER_CREATE_CROP_PAGES="create-crop-pages",t.STATE_HANDLER_CREATE_FIELD_TEXT="CreateTextFieldHandler",t.STATE_HANDLER_CREATE_FIELD_SIGNATURE="CreateSignatureFieldHandler",t.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON="CreatePushButtonFieldHandler",t.STATE_HANDLER_CREATE_RADIO_BUTTON="CreateRadioButtonStateHandler",t.STATE_HANDLER_CREATE_ARTICLE_BUTTON="CreateArticleButtonStateHandler",o(r={},x,"text"),o(r,d,"highlight"),o(r,w,"strikeout"),o(r,O,"underline"),o(r,j,"squiggly"),o(r,N,"strikeout"),o(r,a,"caret"),o(r,E,"freetext"),o(r,_,"freetext"),o(r,k,"freetext"),o(r,I,"square"),o(r,s,"circle"),o(r,g,"line"),o(r,c,"line"),o(r,D,"polygon"),o(r,A,"polyline"),o(r,b,"polygon"),o(r,u,"highlight"),o(r,v,"ink"),o(r,T,"stamp"),o(r,h,"line"),o(r,M,"polyline"),o(r,m,"polygon"),o(r,y,"circle"),o(r,l,"fileattachment"),o(r,p,"screen"),o(r,f,"link"),o(r,"create-multi-media-state","screen"),o(r,"create-redaction-text-image-state","redact"),o(r,"create-redaction-state","redact"),r),C={CreatePushButtonStateHandler:i.FieldType.PushButton,CreateCheckBoxStateHandler:i.FieldType.CheckBox,CreateRadioButtonStateHandler:i.FieldType.RadioButton,CreateComboBoxStateHandler:i.FieldType.ComboBox,CreateListBoxStateHandler:i.FieldType.ListBox,CreateTextStateHandler:i.FieldType.Text,CreateSignStateHandler:i.FieldType.Sign,CreateDateStateHandler:i.FieldType.Text,CreateImageStateHandler:i.FieldType.PushButton};t.StateNameAnnotTypeMap=z,t.StateNameFieldTypeMap=C},function(e,t,n){"use strict";n.r(t),n.d(t,"BuiltinCommand",(function(){return p})),n.d(t,"BuiltinShortcutContext",(function(){return f}));var r,i,o,a,c,u,s,l,d,p,f,g=n(0);!function(e){e.SELECT_ALL="builtin-command-select-all-annotations",e.CREATION_UNDO_LAST="builtin-command-creation-undo-last",e.DELETE_SELECTED_OBJECT="builtin-command-delete-selected-object",e.UNSELECT_OBJECT="builtin-command-unselect-object",e.UNDO_OPERATION="builtin-command-undo",e.REDO_OPERATION="builtin-command-redo",e.CANCEL_CREATING_ANNOTATION_OPERATION="builtin-command-cancel-creating-annotation",e.CLOSE_LAYER="builtin-command-close-closable-layer",e.ARROW_UP="builtin-command-arrow-up",e.ARROW_DOWN="builtin-command-arrow-down",e.ARROW_LEFT="builtin-command-arrow-left",e.ARROW_RIGHT="builtin-command-arrow-right",e.SWITCH_TO_HAND_STATE="builtin-command-switch-hand-state",e.COPY_ACTIVATE_ELEMENT="builtin-command-copy-activate-element",e.CUT_ACTIVATE_ELEMENT="builtin-command-cut-activate-element",e.ADD_BOOKMARK="builtin-command-add-bookmark",e.COPY_TEXT_IMAGE="builtin-command-copy-text-image",e.BLUR_EDITTING_TEXT_OBJECT="builtin-command-blur-editting-text-object",e.ALIGNMENT_REDUCE_WIDTH="builtin-command-alignment-reduce-width",e.ALIGNMENT_RAISE_WIDTH="builtin-command-alignment-raise-width",e.ALIGNMENT_REDUCE_HEIGHT="builtin-command-alignment-reduce-height",e.ALIGNMENT_RAISE_HEIGHT="builtin-command-alignment-raise-height",e.ALIGNMENT_REDUCE_STEP_WIDTH="builtin-command-alignment-reduce-step-width",e.ALIGNMENT_RAISE_STEP_WIDTH="builtin-command-alignment-raise-step-width",e.ALIGNMENT_REDUCE_STEP_HEIGHT="builtin-command-alignment-reduce-step-height",e.ALIGNMENT_RAISE_STEP_HEIGHT="builtin-command-alignment-raise-step-height",e.TAB_NEXT_OPERATION="builtin-command-tab-next",e.TAB_PREVIOUS_OPERATION="builtin-command-tab-previous",e.DELETE_ATTACHMENT="builtin-command-delete-attachment",e.JUMP_TO_NEXT_PAGE="builtin-command-jump-to-next-page",e.JUMP_TO_PREVIOUS_PAGE="builtin-command-jump-to-previsous-page"}(p||(p={})),function(e){e.GLOBAL="builtin-shortcut-context-global",e.SELECTION="builtin-shortcut-context-selection",e.BASIC_STATE_HANDLER="builtin-shortcut-context-state-hander",e.ANNOTATION_PROPERTIES="builtin-shortcut-context-annot-properties",e.ACTIVATION_ANY="builtin-shortcut-context-activation-any",e.ACTIVATION_ANNOTATION="builtin-shortcut-context-activation-annot",e.ACTIVATION_WIDGET="builtin-shortcut-context-activation-widget",e.ACTIVATION_GRAPH_OBJ="builtin-shortcut-context-activation-graph_obj",e.VIEWER="builtin-shortcut-context-viewer",e.CREATING_ANNOTATION="builtin-shortcut-context-creating-annotation",e.CLOSABLE_LAYER="builtin-shortcut-context-closable-layer",e.EDIT_TEXT_OBJECT="builtin-shortcut-context-edit-text-object"}(f||(f={})),t.default=[{context:f.GLOBAL,topLayers:[],extends:[],shortcuts:{}},{context:f.CLOSABLE_LAYER,topLayers:[f.GLOBAL],extends:[],shortcuts:(r={},r[p.CLOSE_LAYER]="Escape",r)},{context:f.VIEWER,topLayers:[f.GLOBAL],extends:[],shortcuts:(i={},i[p.UNDO_OPERATION]="Mod+Z",i[p.REDO_OPERATION]="Mod+Y",i[p.ADD_BOOKMARK]="Mod+B",i[p.DELETE_ATTACHMENT]="Delete",i[p.JUMP_TO_PREVIOUS_PAGE]="LeftArrow",i[p.JUMP_TO_NEXT_PAGE]="RightArrow",i[p.ARROW_UP]="UpArrow",i[p.ARROW_DOWN]="DownArrow",i)},{context:f.EDIT_TEXT_OBJECT,topLayers:[f.GLOBAL],extends:[],shortcuts:(o={},o[p.BLUR_EDITTING_TEXT_OBJECT]="Escape",o)},{context:f.CREATING_ANNOTATION,topLayers:[f.VIEWER],extends:[],shortcuts:(a={},a[p.CANCEL_CREATING_ANNOTATION_OPERATION]="Escape",a)},{context:f.SELECTION,topLayers:[],extends:[],shortcuts:(c={},c[p.SELECT_ALL]="Mod+A",c)},{context:f.ACTIVATION_ANY,topLayers:[f.VIEWER],extends:[f.SELECTION],shortcuts:(u={},u[p.DELETE_SELECTED_OBJECT]="Delete",u[p.UNSELECT_OBJECT]="Escape",u[p.COPY_ACTIVATE_ELEMENT]="Mod+C",u[p.CUT_ACTIVATE_ELEMENT]="Mod+X",u)},{context:f.ACTIVATION_ANNOTATION,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.ACTIVATION_WIDGET,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:(s={},s[p.ALIGNMENT_REDUCE_WIDTH]="Mod+LeftArrow",s[p.ALIGNMENT_RAISE_WIDTH]="Mod+RightArrow",s[p.ALIGNMENT_REDUCE_HEIGHT]="Mod+UpArrow",s[p.ALIGNMENT_RAISE_HEIGHT]="Mod+DownArrow",s[p.ALIGNMENT_REDUCE_STEP_WIDTH]="Mod+Shift+LeftArrow",s[p.ALIGNMENT_RAISE_STEP_WIDTH]="Mod+Shift+RightArrow",s[p.ALIGNMENT_REDUCE_STEP_HEIGHT]="Mod+Shift+UpArrow",s[p.ALIGNMENT_RAISE_STEP_HEIGHT]="Mod+Shift+DownArrow",s)},{context:f.ACTIVATION_GRAPH_OBJ,topLayers:[f.VIEWER],extends:[f.ACTIVATION_ANY],shortcuts:{}},{context:f.BASIC_STATE_HANDLER,topLayers:[f.VIEWER],extends:[],shortcuts:(l={},l[p.SWITCH_TO_HAND_STATE]="Escape",l)},{context:g.STATE_HANDLER_CREATE_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_HAND,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STRIKE_OUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_UNDERLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUIGGLY,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_REPLACE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CARET,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_CALLOUT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FREETEXT_BOX,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_SQUARE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_ARROW,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYLINE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_POLYGON_CLOUD,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PENCIL,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_STAMP,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_DISTANCE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_PERIMETER,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_CIRCLE_AREA,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FILE_ATTACHMENT,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_LINK,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-multi-media-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-text-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"create-redaction-state",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreatePushButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateCheckBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateRadioButtonStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateComboBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateListBoxStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateTextStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateSignStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateDateStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:"CreateImageStateHandler",topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_CHECK_THE_SEARCH,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_EDIT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_MARQUEE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_ERASER,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_LOUPE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SELECT_TEXT_IMAGE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:(d={},d[p.COPY_TEXT_IMAGE]="Mod+C",d[p.ADD_BOOKMARK]="Mod+B",d)},{context:g.STATE_HANDLER_SELECT_ANNOTATION,topLayers:[f.BASIC_STATE_HANDLER],extends:[f.SELECTION],shortcuts:{}},{context:g.STATE_HANDLER_SNAPSHOT_TOOL,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_TEXT,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_SIGNATURE,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_FIELD_PUSH_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}},{context:g.STATE_HANDLER_CREATE_RADIO_BUTTON,topLayers:[f.BASIC_STATE_HANDLER],extends:[],shortcuts:{}}]},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=navigator.userAgent.toLowerCase(),o=/opera|opr/.test(i),a=/msie/.test(i),c=/trident/.test(i),u=/\sapplewebkit\//.test(i),s=/chrome/.test(i),l=/safari/.test(i),d=/firefox/.test(i),p=/edg\//.test(i),f=t.isIE=(c||a)&&!o&&"msSaveBlob"in navigator,g=(t.isIE10=f&&!!(r=i.match(/msie ([\d\.]+)/))&&10===parseInt(r[1]),t.isIEAtLeast11=!a&&c&&!o),h=t.isEdge=i.indexOf("edge")>-1,M=t.isOpera=o,m=t.isWebkit=u,y=t.isChromiumEdge=!M&&s&&!!window.chrome&&p,v=t.isChrome=!M&&s&&!!window.chrome&&!p,b=t.isSafari=!/huawei/.test(i)&&!M&&l&&!s,D=t.isGecko="Gecko"==navigator.product&&!m&&!M,A=t.isFirefox=!v&&!M&&!b&&d,N=t.isMaxthon=/maxthon/.test(i),I=t.isQuirksMode="BackCompact"==document.CompactMode,j=t.isQQ=/tencenttraveler/.test(i)||/qqbrowser/.test(i),T=t.isWeChat=/wechat/.test(i),w=t.isSougou=/metasr/.test(i)||/sogou/.test(i),x=t.isBaidu=/baidubrowser/.test(i),O=t.isUC=/ucbrowser/.test(i),E=t.isLiebao=/liebao/.test(i),_=t.isMiuiBrowser=/miuibrowser/.test(i),k=t.isHuaweiBrowser=/huaweibrowser/.test(i)||/huaweialp/.test(i),z=t.is360=function(){if(j||O||w||_||E||N)return!1;if(-1===i.indexOf("chrome"))return!1;var e=function(e,t){var n=navigator.mimeTypes;for(var r in n)if("application/vnd.chromium.remoting-viewer"==n[r].type)return!0;return!1}();return!window.chrome||e}();t.isIE8=!!document.documentMode&&document.documentMode<8,t.isIE8Compact=8==document.documentMode,t.isIE9Compact=9==document.documentMode,t.isIE10Compact=10==document.documentMode,t.BROWSER_DETECTION={ie:f,ieAtLeast11:g,edge:h,"chromium-edge":y,opera:M,webkit:m,chrome:v,safari:b,gecko:D,firefox:A,maxthon:N,quirksMode:I,"quirks-mode":I,qq:j,wechat:T,sougou:w,baidu:x,liebao:E,uc:O,miui:_,huawei:k,360:z}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o=t.isTouchDevice=(i=" -webkit- -moz- -o- -ms- ".split(" "),!!("ontouchstart"in window||navigator.maxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch)||(r=["(",i.join("touch-enabled),("),"heartz",")"].join(""),!!window.matchMedia&&window.matchMedia(r).matches)),a=navigator.userAgent.toLowerCase(),c=t.isMac=/macintosh|mac os x/.test(a),u=t.isIOS=/ipad|iphone|ipod/.test(a),s=t.isIPHONE=/iphone/.test(a),l=t.isIPAD=/ipad/.test(a),d=t.isIPOD=/ipod/.test(a),p=t.isAndroid=/android/.test(a),f=t.isBlackBerry=/blackberry/.test(a),g=t.isWebOS=/webos/.test(a),h=t.isKindle=/silk|kindle/.test(a),M=t.isAliAppBrowser=/aliapp/.test(a),m=t.isTablet=!M&&/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(a),y=t.isMobile=!m&&(/mobile/.test(a)||u||p||f||g||h),v=t.isDesktop=!(y||m||p||s||l||d||h||g),b=t.isMiPad=/(MI(.*|\s*)PAD).*/i.test(a),D=t.isXiaomi=!b&&/MI(\s+|\d+?|HM|xiaomi).*/i.test(a),A=t.isHuawei=/HUAWEI/i.test(navigator.userAgent),N=t.isLinux=/Linux/i.test(a),I=t.isWindows=!N&&/Windows(\s+NT)?/i.test(a),j=t.isMacOS=/MacIntosh|(mac os)/i.test(a);t.DEVICE_DETACTION={mac:c,ios:u,iphone:s,ipad:l,ipod:d,android:p,blackberry:f,webos:g,kindle:h,tablet:m,mobile:y,desktop:v,xiaomi:D,huawei:A,touch:o,linux:N,windows:I,macos:j}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2)),i=s(n(6)),o=s(n(7)),a=s(n(12)),c=s(n(16)),u=n(3);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}var f=r.shared.replaceRibbonButton2XButton,g=r.Controller,h=function(e){function t(){return l(this,t),d(this,e.apply(this,arguments))}return p(t,e),t.getName=function(){return"print"},t.getLoader=function(){return i.default},t.initOnLoad=function(){var e=r.modular.module("print",[]);e.registerController(o.default),e.registerPreConfiguredComponent("contextmenu-item-print",{template:'<contextmenu-item name="fv--contextmenu-item-print" @controller="print:ShowPrintDialogController" shortcut="Ctrl + P">print:button-tooltip.title</contextmenu-item>'});var t={template:'<ribbon-button text="print:button-tooltip.title" @tooltip name="print-button" icon-class="fv__icon-toolbar-print" @controller="print:ShowPrintDialogController">print:button-tooltip.title</ribbon-button>',config:[{target:"print-button",tooltip:{title:"print:button-tooltip.title"}}]};e.registerPreConfiguredComponent("print-ribbon-button",t),e.registerPreConfiguredComponent("print-button",Object.assign({},t,{template:f(t.template)}));var n=function(e){function t(){return l(this,t),d(this,e.apply(this,arguments))}return p(t,e),t.prototype.mounted=function(){var e=this.component.findClosestComponent((function(e){return"print-dialog"===e.name}));this.printDialogController=e.controller},t}(g);e.registerFragment("print-dialog",{template:(0,a.default)(),config:[{target:"print-dialog",callback:c.default},{target:"fv--print-hide-header-footer",callback:function(e){function t(){return l(this,t),d(this,e.apply(this,arguments))}return p(t,e),t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.component.setValue(this.printDialogController.hideHeaderFooter),this.component.on("change",(function(){t.printDialogController.hideHeaderFooter=t.component.getValue()}))},t}(n)}]})},t.prototype.init=function(e){this.pdfUI=e},t.prototype.fragments=function(){return[]},t.prototype.receiveAction=function(e,t){var n=this;switch(e){case"showPrintDialog":return this.pdfUI.activeElement(null),this.pdfUI.getPDFViewer().then((function(e){return n.pdfUI.getComponentByName("print-dialog").then((function(r){if(!r)return Promise.reject(new Error("print-dialog cannot be found, Please confirm this component has been defined in layout-template."));var i=r.getComponentByName("fv--print-header-footer-container");u.isChrome||u.isFirefox||u.isChromiumEdge?(i.show(),r.element.querySelector("[name=fv--print-hide-header-footer]").checked=e.getPrintSetting("showHeaderFooter")):i.hide(),r.getComponentByName("print-dropdown-quality").setValue(e.getPrintSetting("quality")),r.open(document.body),t&&n.pdfUI.eventEmitter.emit("print-controller",t)}))}))}},t}(r.UIXAddon);t.default=h},function(e,t){e.exports=null},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(2));n(8);var o=n(9),a=(n(4),n(3)),c=n(10),u=n(1),s=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return r.promiseBind=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}}(e,t))}(t,e),t.getName=function(){return"ShowPrintDialogController"},t.prototype.mounted=function(){var t=this;e.prototype.mounted.call(this),this.getPDFUI().getKeyboard().then((function(e){e.withContext(u.BuiltinShortcutContext.VIEWER,(function(e){e.keydown(c.BuiltinPDFUIShortcutCommand.SHOW_PRINT_DIALOG,(function(){t.component.isLocked||t.handle()}))}))}))},t.prototype.handle=function(){var e=this;(0,o.supportedPrint)()?(this.getPDFUI().activeElement(null),this.getPDFUI().getPDFViewer().then((function(t){var n=e.getComponentByName("print-dialog"),r=n.getComponentByName("fv--print-header-footer-container");a.isChrome||a.isFirefox||a.isChromiumEdge?(r.show(),n.element.querySelector("[name=fv--print-hide-header-footer]").checked=t.getPrintSetting("showHeaderFooter")):r.hide(),n.element.querySelector(".fv__ui-quality-alert").style.display="none",n.getComponentByName("print-dropdown-quality").setValue(t.getPrintSetting("quality")),n.open(document.body)}))):this.getPDFUI().alert("print:dialog.unsupported.message","print:dialog.unsupported.title")},t.prototype.destroy=function(){e.prototype.destroy.call(this)},r(t,null,[{key:"permission",get:function(){return 4}}]),t}(i.Controller);t.default=s},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportedPrint=function(){return!r.isMobile||i.isChrome||i.isSafari};var r=n(4),i=n(3)},function(e,t,n){"use strict";n.r(t),n.d(t,"BuiltinPDFUIShortcutCommand",(function(){return i})),n.d(t,"BuiltinPDFUIShortcutContext",(function(){return o}));var r,i,o,a=n(1);!function(e){e.CLOSE_LEFT_SIDEBAR="builtin-pdfui-shortcut-command-close-sidebar",e.OPEN_LEFT_SIDEBAR="builtin-pdfui-shortcut-command-open-sidebar",e.QUICK_SEARCH="builtin-pdfui-shortcut-command-quick-search",e.SHOW_PRINT_DIALOG="builtin-pdfui-shortcut-command-show-print-dialig",e.AUTO_SCROLL="builtin-pdfui-shortcut-command-auto-scroll"}(i||(i={})),function(e){e.TEXT_SELECTION_TOOLTIP="builtin-text-selection-tooltip-shortcut-context"}(o||(o={})),t.default=[{context:a.BuiltinShortcutContext.VIEWER,topLayer:[],extends:[],shortcuts:(r={},r[i.CLOSE_LEFT_SIDEBAR]="Mod+LeftArrow",r[i.OPEN_LEFT_SIDEBAR]="Mod+RightArrow",r[i.QUICK_SEARCH]="Mod+F",r[i.SHOW_PRINT_DIALOG]="Mod+P",r[i.AUTO_SCROLL]="Mod+Shift+H",r)},{context:o.TEXT_SELECTION_TOOLTIP,topLayers:[a.BuiltinShortcutContext.VIEWER,a.BuiltinShortcutContext.ACTIVATION_ANNOTATION],extends:[a.BuiltinShortcutContext.CLOSABLE_LAYER],shortcuts:[]}]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={ReadOnly:1,Required:2,NoExport:4,Hidden:8,ButtonNoToggleToOff:16384,ButtonRadiosInUnison:33554432,TextMultiline:4096,TextPassword:8192,TextDoNotSpellCheck:4194304,TextDoNotScroll:8388608,TextComb:16777216,ComboEdit:262144,ChoiceMultiSelect:2097152,CommitOnSelChange:67108864,inUnison:function(e){return e&r.ButtonRadiosInUnison},isHidden:function(e){return e&r.Hidden},isReadOnly:function(e){return e&r.ReadOnly},isRequired:function(e){return e&r.Required},isNoExport:function(e){return e&r.NoExport},isMultiline:function(e){return e&r.TextMultiline},isPassword:function(e){return e&r.TextPassword},isComb:function(e){return e&r.TextComb},isNoSpellCheck:function(e){return e&r.TextDoNotSpellCheck},isNoScroll:function(e){return e&r.TextDoNotScroll},isComboEdit:function(e){return e&r.ComboEdit},isChoiceMultiSelect:function(e){return e&r.ChoiceMultiSelect}},i={FlagExclude:1,FlagIncludeNoValueFields:2,FlagExportFormat:4,FlagGetMethod:8,FlagWithCoordinates:16,FlagAsXFDF:32,FlagIncludeAppendSaves:64,FlagIncludeAnnotations:128,FlagSubmitAsPDF:256,FlagCanonicalFormat:512,FlagExclNonUserAnnots:1024,FlagExclFKey:2048,FlagEmbedForm:8192,isExclude:function(e){return e&i.FlagExclude},isIncludeNoValueFields:function(e){return e&i.FlagIncludeNoValueFields},isHTML:function(e){return e&i.FlagExportFormat},isGetMethod:function(e){return e&i.FlagGetMethod},isXFDF:function(e){return e&i.FlagAsXFDF},isPDF:function(e){return e&i.FlagSubmitAsPDF},getType:function(e){var t=i.isHTML(e);if(t)return"HTML";var n=i.isXFDF(e);if(n)return"XFDF";var r=i.isXFDF(e);return r?"PDF":t||n||r?void 0:"FDF"}},o=r;t.FieldType={Unknown:0,PushButton:1,CheckBox:2,RadioButton:3,Text:6,ListBox:5,ComboBox:4,Sign:7,Barcode:8},t.FieldFlag=o,t.FormActionFlags=i},function(e,t,n){n(13),e.exports=function(e){"use strict";return e=e||{},'<layer name="print-dialog" class="fv__ui-print-layer center" append-to="body" @draggable>\r\n <layer-header title="print:dialog.printDialog.title"></layer-header>\r\n <div class="fv__ui-print-dialog" @stop-drag>\r\n <div class="fv__ui-print-dialog-body">\r\n <div class="fv__ui-print-item" name="range-item">\r\n <div class="fv__ui-print-item-title" data-i18n="print:dialog.printDialog.range"></div>\r\n <div class="fv__ui-print-range">\r\n <label><input name="print-range" type="radio" value="selectedPDF"/><span data-i18n="print:dialog.printDialog.selectedPDF" @aria:labelledby="::nextSiblings()"></span></label>\r\n </div>\r\n <div class="fv__ui-print-range">\r\n <label><input name="print-range" type="radio" value="allPDF"/><span data-i18n="print:dialog.printDialog.allPDF"></span></label>\r\n </div>\r\n <div class="fv__ui-print-range">\r\n <label><input name="print-range" type="radio" value="all"/><span data-i18n="print:dialog.printDialog.all"></span></label>\r\n </div>\r\n <div class="fv__ui-print-range">\r\n <label><input name="print-range" type="radio" value="current"/><span data-i18n="print:dialog.printDialog.current"></span></label>\r\n </div>\r\n <div class="fv__ui-print-range fv__ui-force-hide">\r\n <label>\r\n <input name="print-range" type="radio" value="fromTo"/>\r\n <span data-i18n="print:dialog.printDialog.from"></span>\r\n <input class="print-common-input" type="number" min="1" name="range-from"/>\r\n <span data-i18n="print:dialog.printDialog.to"></span>\r\n <input class="print-common-input" type="number" name="range-to"/>\r\n </label>\r\n </div>\r\n <div class="fv__ui-print-range" name="print-pages-field-container">\r\n <div class="fv__ui-print-range-label">\r\n <input name="print-range" type="radio" value="assign" @aria:labelledby="::nextSiblings()">\r\n <span data-i18n="print:dialog.printDialog.assign"></span>\r\n <input class="print-common-input" type="text" name="range-assign">\r\n <span>1,2,5-8</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="fv__ui-print-item">\r\n <div class="fv__ui-print-item-title" data-i18n="print:dialog.printDialog.comments"></div>\r\n <div class="fv__ui-print-comments">\r\n <label><input name="print-comments" type="checkbox" value=""/><span data-i18n="print:dialog.printDialog.printComments"></span></label>\r\n </div>\r\n </div>\r\n <div class="fv__ui-print-item">\r\n <div class="fv__ui-print-item-title" data-i18n="print:dialog.printDialog.moreOptions"></div>\r\n <div class="fv__ui-print-more-options" name="fv--print-page-size-container">\r\n <div class="fv__ui-print-item-title-sub" data-i18n="print:dialog.printDialog.quality"></div>\r\n <slider class="fv__print-quality" unit=\'%\' max="1000" min="100" step="1" value="100"\r\n name="print-dropdown-quality" @stop-drag></slider>\r\n </div>\r\n <div class="fv__ui-quality-alert" data-i18n="print:dialog.printDialog.alert"></div>\r\n <div name="fv--print-header-footer-container" class="fv__ui-print-more-options">\r\n <label>\r\n <input name="fv--print-hide-header-footer" type="checkbox">\r\n <span data-i18n="print:dialog.printDialog.headerAndFooter"></span>\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="fv__ui-print-dialog-footer">\r\n <div class="fv__ui-print-dialog-btns">\r\n <button class="fv__ui-print-btn fv__ui-print-dialog-ok" data-i18n="print:dialog.ok" name="print-dialog-ok-btn"></button>\r\n <button class="fv__ui-print-btn fv__ui-print-dialog-cancel" data-i18n="print:dialog.cancel" name="print-dialog-close-btn"></button>\r\n </div>\r\n </div>\r\n </div>\r\n</layer>'}},function(e,t,n){"use strict";e.exports=n(14)},function(e,t,n){"use strict";(function(t){
24
24
  /*! art-template@runtime | https://github.com/aui/art-template */