UNPKG

@mescius/dspdfviewer

Version:
1 lines 71.9 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.dspdfviewer=e():t.dspdfviewer=e()}(self,(()=>(()=>{"use strict";var t={63590:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ChoiceWidget=e.ButtonWidget=e.TextWidget=e.WidgetAnnotation=e.SoundAnnotation=e.FileAttachmentAnnotation=e.StampAnnotation=e.SignatureAnnotation=e.FreeTextAnnotation=e.TextAnnotation=e.LinkAnnotation=e.InkAnnotation=e.ReplaceTextAnnotation=e.RedactAnnotation=e.StrikeOutAnnotation=e.SquigglyAnnotation=e.UnderlineAnnotation=e.HighlightAnnotation=e.SquareAnnotation=e.CircleAnnotation=e.PolygonAnnotation=e.PolyLineAnnotation=e.LineAnnotation=e.MarkupAnnotation=e.PopupAnnotation=e.AnnotationBase=e.edtorModeToButtonKey=e.getAnnotationOptionsKeyName=e.findAnnotationSubType=e.findFieldObjectType=e.isRadioButtonFieldWidget=e.isFormFieldWidget=e.isStatusTextAnnotation=e.TextAlignmentType=e.AnnotationTypeCode=void 0;var i,a=n(4699),s="Helvetica";!function(t){t[t.TEXT=1]="TEXT",t[t.LINK=2]="LINK",t[t.FREETEXT=3]="FREETEXT",t[t.LINE=4]="LINE",t[t.SQUARE=5]="SQUARE",t[t.CIRCLE=6]="CIRCLE",t[t.POLYGON=7]="POLYGON",t[t.POLYLINE=8]="POLYLINE",t[t.HIGHLIGHT=9]="HIGHLIGHT",t[t.UNDERLINE=10]="UNDERLINE",t[t.SQUIGGLY=11]="SQUIGGLY",t[t.STRIKEOUT=12]="STRIKEOUT",t[t.STAMP=13]="STAMP",t[t.CARET=14]="CARET",t[t.INK=15]="INK",t[t.POPUP=16]="POPUP",t[t.FILEATTACHMENT=17]="FILEATTACHMENT",t[t.SOUND=18]="SOUND",t[t.MOVIE=19]="MOVIE",t[t.WIDGET=20]="WIDGET",t[t.SCREEN=21]="SCREEN",t[t.PRINTERMARK=22]="PRINTERMARK",t[t.TRAPNET=23]="TRAPNET",t[t.WATERMARK=24]="WATERMARK",t[t.THREED=25]="THREED",t[t.REDACT=26]="REDACT",t[t.SIGNATURE=27]="SIGNATURE",t[t.RICHMEDIA=90]="RICHMEDIA",t[t.THREADBEAD=150]="THREADBEAD",t[t.REPLACETEXT=500]="REPLACETEXT"}(i=e.AnnotationTypeCode||(e.AnnotationTypeCode={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(e.TextAlignmentType||(e.TextAlignmentType={})),e.isStatusTextAnnotation=function(t){return"Review"===t.stateModel&&("Accepted"===t.state||"Cancelled"===t.state||"Completed"===t.state||"Rejected"===t.state)},e.isFormFieldWidget=function(t){return!!t&&(t.annotationType===i.WIDGET||t.annotationType===i.SIGNATURE)},e.isRadioButtonFieldWidget=function(t){if(!t)return!1;var e=t;return e.annotationType===i.WIDGET&&"Btn"===e.fieldType&&!0===e.radioButton},e.findFieldObjectType=function(t){return t.annotationType===i.SIGNATURE?"signature":"Tx"===t.fieldType?(t.comb||t.multiLine||t.hasPasswordFlag,"text"):"Btn"===t.fieldType?t.checkBox?"checkbox":t.radioButton?"radiobutton":(t.submitForm||t.resetForm||t.pushButton,"button"):"Ch"===t.fieldType?t.combo?"combobox":"listbox":""},e.findAnnotationSubType=function(t,e){switch(t){case i.TEXT:return"Text";case i.CARET:return"Caret";case i.CIRCLE:return"Circle";case i.FILEATTACHMENT:return"FileAttachment";case i.FREETEXT:return"FreeText";case i.INK:return"Ink";case i.LINE:return"Line";case i.LINK:return"Link";case i.MOVIE:return"Movie";case i.POLYGON:return"Polygon";case i.POLYLINE:return"PolyLine";case i.POPUP:return"Popup";case i.PRINTERMARK:return"PrinterMark";case i.REDACT:return"Redact";case i.REPLACETEXT:return"ReplaceText";case i.SCREEN:return"Screen";case i.SIGNATURE:return"Signature";case i.SOUND:return"Sound";case i.SQUARE:return"Square";case i.HIGHLIGHT:return"Highlight";case i.UNDERLINE:return"Underline";case i.SQUIGGLY:return"Squiggly";case i.STRIKEOUT:return"StrikeOut";case i.STAMP:return"Stamp";case i.THREADBEAD:return"ThreadBead";case i.THREED:return"Threed";case i.WATERMARK:return"WaterMark";case i.WIDGET:return"Widget";case i.RICHMEDIA:return"RichMedia"}return e},e.getAnnotationOptionsKeyName=function(t){if(!t)return"unknownAnnotation";switch(t.annotationType){case i.FREETEXT:return"freeTextAnnotation";case i.TEXT:return"textAnnotation";case i.INK:return"inkAnnotation";case i.SQUARE:return"squareAnnotation";case i.LINK:return"linkAnnotation";case i.REDACT:return"redactAnnotation";case i.REPLACETEXT:return"replaceTextAnnotation";case i.CIRCLE:return"circleAnnotation";case i.LINE:return"lineAnnotation";case i.POLYLINE:return"polyLineAnnotation";case i.POLYGON:return"polygonAnnotation";case i.FILEATTACHMENT:return"fileAttachmentAnnotation";case i.RICHMEDIA:return"richMediaAnnotation";case i.SOUND:return"soundAnnotation";case i.STAMP:return"stampAnnotation";case i.WIDGET:switch(t.fieldType){case"Tx":return t.comb?"combTextField":t.multiLine?"textArea":t.hasPasswordFlag?"passwordField":"textField";case"Ch":return t.combo?"comboChoice":"listBoxChoice";case"Btn":return t.submitForm?"submitButton":t.resetForm?"resetButton":t.checkBox?"checkBoxButton":t.radioButton?"radioButton":"pushButton"}break;case i.POPUP:return"popupAnnotation";case i.SIGNATURE:return"signatureField";case i.HIGHLIGHT:return"highlightAnnotation";case i.UNDERLINE:return"underlineAnnotation";case i.SQUIGGLY:return"squigglyAnnotation";case i.STRIKEOUT:return"strikeOutAnnotation";case i.RICHMEDIA:return"richMediaAnnotation"}return"unknownAnnotation"},e.edtorModeToButtonKey=function(t){switch(t){case a.EditMode.CheckBoxButtonWidget:return"edit-widget-btn-checkbox";case a.EditMode.Circle:return"edit-circle";case a.EditMode.ComboChoiceWidget:return"edit-widget-ch-combo";case a.EditMode.CombTextFieldWidget:return"edit-widget-tx-comb";case a.EditMode.Erase:return"edit-erase";case a.EditMode.FileAttachment:return"edit-file-attachment";case a.EditMode.FreeText:return"edit-free-text";case a.EditMode.Ink:return"edit-ink";case a.EditMode.Line:return"edit-line";case a.EditMode.Link:return"edit-link";case a.EditMode.ListBoxChoiceWidget:return"edit-widget-ch-list-box";case a.EditMode.PasswordFieldWidget:return"edit-widget-tx-password";case a.EditMode.Polygon:return"edit-polygon";case a.EditMode.Polyline:return"edit-polyline";case a.EditMode.PushButtonWidget:return"edit-widget-btn-push";case a.EditMode.RadioButtonWidget:return"edit-widget-btn-radio";case a.EditMode.Redact:return"edit-redact";case a.EditMode.ReplaceText:return"edit-replace-text";case a.EditMode.ResetButtonWidget:return"edit-widget-btn-reset";case a.EditMode.Select:return"edit-select";case a.EditMode.Sound:return"edit-sound";case a.EditMode.Square:return"edit-square";case a.EditMode.Stamp:return"edit-stamp";case a.EditMode.Highlight:return"edit-highlight";case a.EditMode.Underline:return"edit-underline";case a.EditMode.Squiggly:return"edit-squiggly";case a.EditMode.StrikeOut:return"edit-strike-out";case a.EditMode.Caret:return"edit-caret";case a.EditMode.Movie:return"edit-movie";case a.EditMode.PrinterMark:return"edit-printer-mark";case a.EditMode.TrapNet:return"edit-trap-net";case a.EditMode.Watermark:return"edit-watermark";case a.EditMode.ThreeDimension:return"edit-3d";case a.EditMode.Projection:return"edit-projection";case a.EditMode.RichMedia:return"edit-rich-media";case a.EditMode.SubmitButtonWidget:return"edit-widget-btn-submit";case a.EditMode.Text:return"edit-text";case a.EditMode.TextAreaWidget:return"edit-widget-tx-text-area";case a.EditMode.TextFieldWidget:return"edit-widget-tx-field"}return"key_not-found_error"};var c=function(){this.annotationFlags=0,this.useCustomAppearance=!0,this.opacity=1,this.printableFlag=!0};e.AnnotationBase=c;var u=function(t){function e(){var e=t.call(this)||this;return e.subtype="Popup",e}return o(e,t),e}(c);e.PopupAnnotation=u;var l=function(t){function e(){return t.call(this)||this}return o(e,t),e}(c);e.MarkupAnnotation=l;var d=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.LINE,e.subtype="Line",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#000000",e}return o(e,t),e}(l);e.LineAnnotation=d;var f=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.POLYLINE,e.subtype="PolyLine",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#000000",e}return o(e,t),e}(l);e.PolyLineAnnotation=f;var h=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.POLYGON,e.subtype="Polygon",e}return o(e,t),e}(f);e.PolygonAnnotation=h;var p=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.CIRCLE,e.subtype="Circle",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#000000",e}return o(e,t),e}(l);e.CircleAnnotation=p;var g=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.SQUARE,e.subtype="Square",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#000000",e}return o(e,t),e}(l);e.SquareAnnotation=g;var m=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.HIGHLIGHT,e.subtype="Highlight",e.color="#fff066",e}return o(e,t),e}(l);e.HighlightAnnotation=m;var y=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.UNDERLINE,e.subtype="Underline",e.color="#000000",e}return o(e,t),e}(l);e.UnderlineAnnotation=y;var v=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.SQUIGGLY,e.subtype="Squiggly",e.color="#ff0000",e}return o(e,t),e}(l);e.SquigglyAnnotation=v;var w=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.STRIKEOUT,e.subtype="StrikeOut",e.color="#000000",e}return o(e,t),e}(l);e.StrikeOutAnnotation=w;var b=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.REDACT,e.subtype="Redact",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.markBorderColor="#ff0000",e.overlayFillColor="#ffffff",e}return o(e,t),e}(l);e.RedactAnnotation=b;var T=function(t){function e(e){var n=t.call(this)||this;if(n.annotationType=i.REPLACETEXT,n.subtype="ReplaceText",n.replaceData=e,e){var r=e.selectedCoords;if(r){var o=r.outerRect;o&&(n.rect=o),n.quadPoints=r.quadPoints}}return n}return o(e,t),e}(l);e.ReplaceTextAnnotation=T;var A=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.INK,e.subtype="Ink",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#000000",e}return o(e,t),e}(l);e.InkAnnotation=A;var M=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.LINK,e.subtype="Link",e.borderStyle={width:0,style:5,horizontalCornerRadius:0,verticalCornerRadius:0},e.color="#2196f3",e}return o(e,t),e}(l);e.LinkAnnotation=M;var E=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.TEXT,e.subtype="Text",e.borderStyle={width:0,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.open=!1,e.name="Note",e}return o(e,t),e.DEFAULT_WIDTH=22,e.DEFAULT_HEIGHT=22,e}(l);e.TextAnnotation=E;var R=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.FREETEXT,e.subtype="FreeText",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.fontSize=12,e.fontName=s,e}return o(e,t),e}(l);e.FreeTextAnnotation=R;var C=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.SIGNATURE,e.subtype="Widget",e.fieldType="Sig",e}return o(e,t),e}(l);e.SignatureAnnotation=C;var S=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.STAMP,e.subtype="Stamp",e}return o(e,t),e}(l);e.StampAnnotation=S;var I=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.FILEATTACHMENT,e.subtype="FileAttachment",e.name="Paperclip",e.isNew=!0,e}return o(e,t),e}(l);e.FileAttachmentAnnotation=I;var x=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.SOUND,e.subtype="Sound",e.name="Speaker",e}return o(e,t),e}(l);e.SoundAnnotation=x;var L=function(t){function e(){var e=t.call(this)||this;return e.annotationType=i.WIDGET,e.subtype="Widget",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.fieldValue="",e.fontSize=12,e.fontName=s,e.printableFlag=!0,e.readOnly=!1,e}return o(e,t),e}(c);e.WidgetAnnotation=L;var N=function(t){function e(){var e=t.call(this)||this;return e.fieldType="Tx",e.borderStyle={width:1,style:1,horizontalCornerRadius:0,verticalCornerRadius:0},e.borderColor="#000000",e}return o(e,t),e}(L);e.TextWidget=N;var P=function(t){function e(){var e=t.call(this)||this;return e.fieldType="Btn",e}return o(e,t),Object.defineProperty(e.prototype,"buttonValue",{get:function(){return this.exportValue},set:function(t){this.exportValue=t},enumerable:!1,configurable:!0}),e}(L);e.ButtonWidget=P;var D=function(t){function e(){var e=t.call(this)||this;return e.fieldType="Ch",e.options=[],e}return o(e,t),e}(L);e.ChoiceWidget=D},4699:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EditMode=e.LayoutMode=void 0,function(t){t[t.Viewer=0]="Viewer",t[t.AnnotationEditor=1]="AnnotationEditor",t[t.FormEditor=2]="FormEditor"}(e.LayoutMode||(e.LayoutMode={})),function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.FreeText=2]="FreeText",t[t.Ink=3]="Ink",t[t.Square=4]="Square",t[t.Erase=5]="Erase",t[t.Line=6]="Line",t[t.Circle=7]="Circle",t[t.Polyline=8]="Polyline",t[t.Polygon=9]="Polygon",t[t.FileAttachment=10]="FileAttachment",t[t.Sound=11]="Sound",t[t.Highlight=12]="Highlight",t[t.Underline=13]="Underline",t[t.Squiggly=14]="Squiggly",t[t.StrikeOut=15]="StrikeOut",t[t.Stamp=16]="Stamp",t[t.Redact=17]="Redact",t[t.Select=18]="Select",t[t.TextFieldWidget=19]="TextFieldWidget",t[t.CombTextFieldWidget=20]="CombTextFieldWidget",t[t.TextAreaWidget=21]="TextAreaWidget",t[t.PasswordFieldWidget=22]="PasswordFieldWidget",t[t.CheckBoxButtonWidget=23]="CheckBoxButtonWidget",t[t.RadioButtonWidget=24]="RadioButtonWidget",t[t.PushButtonWidget=25]="PushButtonWidget",t[t.ResetButtonWidget=26]="ResetButtonWidget",t[t.SubmitButtonWidget=27]="SubmitButtonWidget",t[t.ComboChoiceWidget=28]="ComboChoiceWidget",t[t.ListBoxChoiceWidget=29]="ListBoxChoiceWidget",t[t.Link=30]="Link",t[t.Caret=31]="Caret",t[t.Movie=32]="Movie",t[t.Screen=33]="Screen",t[t.PrinterMark=34]="PrinterMark",t[t.TrapNet=35]="TrapNet",t[t.Watermark=36]="Watermark",t[t.ThreeDimension=37]="ThreeDimension",t[t.Projection=38]="Projection",t[t.RichMedia=39]="RichMedia",t[t.ReplaceText=40]="ReplaceText",t[t.TableDataExtraction=41]="TableDataExtraction"}(e.EditMode||(e.EditMode={}))},40829:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WasmSupportApiBase=void 0;var i=n(99346),a=n(83173),s=n(5688),c=n(87288),u="JVBERi0xLjMNCiXi48/TDQoxIDAgb2JqDQo8PA0KL0NyZWF0b3IgKEdyYXBlQ2l0eS5Eb2N1bWVudHMuUGRmLTMuMS4wLjUwMSkNCj4+DQplbmRvYmoNCjIgMCBvYmoNCjw8DQovVHlwZSAvTWV0YWRhdGENCi9TdWJ0eXBlIC9YTUwNCi9MZW5ndGggOTI0DQo+Pg0Kc3RyZWFtDQrvu788P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pg0KPHg6eG1wbWV0YSB4OnhtcHRrPSJHcmFwZUNpdHkuRG9jdW1lbnRzLlBkZi0zLjEuMC41MDEiIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIj4NCiAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4NCiAgICA8cmRmOkRlc2NyaXB0aW9uIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgcmRmOmFib3V0PSIiPg0KICAgICAgPGRjOmZvcm1hdD5hcHBsaWNhdGlvbi9wZGY8L2RjOmZvcm1hdD4NCiAgICA8L3JkZjpEZXNjcmlwdGlvbj4NCiAgICA8cmRmOkRlc2NyaXB0aW9uIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgcmRmOmFib3V0PSIiPg0KICAgICAgPHhtcDpDcmVhdGVEYXRlPjIwMjAtMDItMDFUMDg6NDc6MjcrMDA6MDA8L3htcDpDcmVhdGVEYXRlPg0KICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMjAtMDItMDFUMDg6NDc6MjcrMDA6MDA8L3htcDpNb2RpZnlEYXRlPg0KICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAyMC0wMi0wMVQwODo0NzoyNyswMDowMDwveG1wOk1ldGFkYXRhRGF0ZT4NCiAgICA8L3JkZjpEZXNjcmlwdGlvbj4NCiAgICA8cmRmOkRlc2NyaXB0aW9uIHhtbG5zOnBkZj0iaHR0cDovL25zLmFkb2JlLmNvbS9wZGYvMS4zLyIgcmRmOmFib3V0PSIiPg0KICAgICAgPHBkZjpQcm9kdWNlcj5HcmFwZUNpdHkuRG9jdW1lbnRzLlBkZi0zLjEuMC41MDE8L3BkZjpQcm9kdWNlcj4NCiAgICAgIDxwZGY6UERGVmVyc2lvbj4xLjM8L3BkZjpQREZWZXJzaW9uPg0KICAgIDwvcmRmOkRlc2NyaXB0aW9uPg0KICA8L3JkZjpSREY+DQo8L3g6eG1wbWV0YT4NCjw/eHBhY2tldCBlbmQ9J3cnPz4NCmVuZHN0cmVhbQ0KZW5kb2JqDQozIDAgb2JqDQo8PA0KL1R5cGUgL1BhZ2VzDQovQ291bnQgMQ0KL01lZGlhQm94IFswIDAgNjEyIDc5Ml0NCi9LaWRzIFs0IDAgUl0NCj4+DQplbmRvYmoNCjQgMCBvYmoNCjw8DQovVHlwZSAvUGFnZQ0KL1BhcmVudCAzIDAgUg0KL1Jlc291cmNlcyA1IDAgUg0KPj4NCmVuZG9iag0KNSAwIG9iag0KPDwNCi9Qcm9jU2V0IFsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQ0KPj4NCmVuZG9iag0KNiAwIG9iag0KPDwNCi9UeXBlIC9DYXRhbG9nDQovUGFnZXMgMyAwIFINCi9NZXRhZGF0YSAyIDAgUg0KL1BhZ2VNb2RlIC9Vc2VOb25lDQo+Pg0KZW5kb2JqDQp4cmVmDQowIDcNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAwMDAxNyAwMDAwMCBuDQowMDAwMDAwMDg4IDAwMDAwIG4NCjAwMDAwMDExMDMgMDAwMDAgbg0KMDAwMDAwMTE5MiAwMDAwMCBuDQowMDAwMDAxMjYzIDAwMDAwIG4NCjAwMDAwMDEzMzUgMDAwMDAgbg0KdHJhaWxlcg0KPDwNCi9TaXplIDcNCi9Sb290IDYgMCBSDQovSW5mbyAxIDAgUg0KL0lEIFs8MURCMTA3QUJGMjU4MDU0QUExRTg3MzM1QjIyODQ0Q0M+IDwxREIxMDdBQkYyNTgwNTRBQTFFODczMzVCMjI4NDRDQz5dDQo+Pg0Kc3RhcnR4cmVmDQoxNDI3DQolJUVPRg0K",l=function(){function t(t){this.clientId=(0,c.generateUid)("wasm_client"),this.isDocumentShared=!1,this.isConnected=!1,this.isOpened=!1}return Object.defineProperty(t.prototype,"isConnected",{get:function(){return this._isConnected},set:function(t){var e=this;this._isConnected=t,this.viewer&&(t?this.serverVersion().then((function(t){e.viewer.plugin.onSupportApiConnected(t,!1)})):this.viewer.plugin.onSupportApiDisconnected())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportApiType",{get:function(){return"DsPdfWasm"},enumerable:!1,configurable:!0}),t.prototype.applyOptions=function(t){this.viewerOptions=t},t.prototype.setViewer=function(t){this.viewer=t},t.prototype.canEditAnnotation=function(t){return this.isOpened},t.prototype.checkDocumentLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.isOpened]}))}))},t.prototype.closeDocumentLoader=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return this.isOpened&&(this.isOpened=!1,this.wasmModule._close_document()),[2,!0]}))}))},t.prototype.close=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return this.isOpened&&(this.isOpened=!1,this.wasmModule._close_document()),[2,"ok"]}))}))},t.prototype.connect=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this._connectInternal(t)]}))}))},t.prototype.dispose=function(){this.isConnected&&(this.isConnected=!1,this.isOpened=!1,this.wasmModule._free_globals())},t.prototype.getDisabledFeatures=function(){return["CustomFonts","Redact","ConvertToContent","ReplaceText","ESign","SaveToPng","SaveToSvg","Collaboration","Linearization","RichText","TableDataExtraction"]},t.prototype.getDownloadUrl=function(t,e,n){var r;if(void 0===e&&(e="PDF"),this.isOpened){var o=this.wasmModule._malloc(10);this.wasmModule.writeTime(o);var a=this.wasmModule._download_modified(o),s=this.wasmModule.getValue(a,"i32")-4,c=new Uint8Array(this.wasmModule.HEAPU8.buffer,a+4,s);(r=new Uint8Array(s)).set(c),this.wasmModule._free(a)}else r=(0,i.base64ToBytes)(u);var l=new Blob([r],{type:"application/pdf"});return window.URL.createObjectURL(l)},t.prototype.getDownloadUnmodifiedUrl=function(t){var e;if(this.isOpened){var n=this.wasmModule._download_unmodified(),r=this.wasmModule.getValue(n,"i32")-4,o=new Uint8Array(this.wasmModule.HEAPU8.buffer,n+4,r);(e=new Uint8Array(r)).set(o)}else e=(0,i.base64ToBytes)(u);var a=new Blob([e],{type:"application/pdf"});return window.URL.createObjectURL(a)},t.prototype.uploadFiles=function(t,e){return r(this,void 0,void 0,(function(){var e,n,r,i,a,s,c,u;return o(this,(function(o){if(this.isOpened){if(!t||!t.length)return[2,!0];for(e=this.viewer.storage,n=0,r=t.length;n<r;n++)if(i=t[n],a=this.wasmModule.stringToNewUTF8(i),!this.wasmModule._is_uploaded_file(a)){if(!(s=e.getItem(i))){this.viewer.logError("uploadFiles","There is no data in local storage for the file with id '".concat(i,"'. Ignoring the file."));continue}c=s.length,u=this.wasmModule._malloc(c),new Uint8Array(this.wasmModule.HEAPU8.buffer,u,c).set(s),this.wasmModule._upload_file(a,u,c)}return[2,!0]}return[2,!1]}))}))},t.prototype.getLastError=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,""]}))}))},t.prototype.getStampCategories=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,fetch("".concat(this._getResourcesUrl(),"images/stamps.json"))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}}))}))},t.prototype.getStampImageUrl=function(t,e,n){var r="Stamps",o=this.viewer.language;return["ja","cn"].includes(o)&&(r="Stamps_"+o),n?"".concat(this._getResourcesUrl(),"images/").concat(r,"/").concat(t,"/").concat(e):"".concat(this._getResourcesUrl(),"images/").concat(r,"/").concat(t,"/").concat(e,"?ts=").concat((new Date).getTime())},t.prototype.modify=function(t,e){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){return this.isOpened&&t&&(e=JSON.stringify(t),n=this.wasmModule.stringToNewUTF8(e),this.wasmModule._modify(n)),[2,"ok"]}))}))},t.prototype.openBinary=function(t){return r(this,void 0,void 0,(function(){var e,n,r,i;return o(this,(function(o){return e="",this.viewerOptions&&(e=this.viewerOptions.supportApiPassword||this.viewerOptions.password),n=this.wasmModule.stringToNewUTF8(e),r=t.length,i=this.wasmModule._malloc(r+4),this.wasmModule.setValue(i,r+4,"i32"),new Uint8Array(this.wasmModule.HEAPU8.buffer,i+4,r).set(t),this.wasmModule._open_document(i,n)&&(this.isOpened=!0),[2]}))}))},t.prototype.serverVersion=function(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(e){if(!this.isConnected)throw this._connectInternal(!0),new Error("Wasm not loaded yet.");return t=this.wasmModule._server_version(),[2,this.wasmModule.UTF8ToString(t)]}))}))},t.prototype.setOptions=function(t,e){return r(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){return this.isConnected&&(t?(e=JSON.stringify(t),n=this.wasmModule.stringToNewUTF8(e),this.wasmModule._set_save_settings(n)):this.wasmModule._set_save_settings(0)),[2,"ok"]}))}))},t.prototype.verifySignature=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,!1]}))}))},t.prototype.extractTableData=function(t){return r(this,void 0,void 0,(function(){return o(this,(function(t){return[2,null]}))}))},t.prototype.initWasmModule=function(){return r(this,void 0,void 0,(function(){var t,e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.loadWasmModule()];case 1:return(t=r.sent()).preRun=[],t.postRun=[],t.writeTime=function(e){var n=new Uint8Array(t.HEAPU8.buffer,e,10),r=new Date,o=r.getFullYear();n[0]=o>>8,n[1]=255&o,n[2]=r.getMonth()+1,n[3]=r.getDate(),n[4]=r.getHours(),n[5]=r.getMinutes(),n[6]=r.getSeconds();var i=r.getMilliseconds();n[7]=255&i;var a=1200-r.getTimezoneOffset();n[8]=i>>2&192|a>>8,n[9]=255&a},window.onerror=function(t){},e=t._malloc(42),(n=new Float32Array(t.HEAPU8.buffer,e,8))[1]=Math.random(),n[2]=Math.random(),n[3]=Math.random(),n[4]=Math.random(),n[5]=Math.random(),n[6]=Math.random(),n[7]=293.71,t.setValue(e,4294967295&Date.now(),"*"),t.writeTime(e+32),t._init_random(e),[2,t]}}))}))},t.prototype._connectInternal=function(t){return r(this,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:if(this.isConnected)return[3,4];if(this._connectPromiseCapability)return[2,this._connectPromiseCapability.promise];this._connectPromiseCapability=(0,a.createPromiseCapability)(),n.label=1;case 1:return n.trys.push([1,3,,4]),(t=document.querySelector(".wasm-debugger-outer"))&&(t.style.display="block"),e=this,[4,this.initWasmModule()];case 2:return e.wasmModule=n.sent(),this.isConnected=!0,this._connectPromiseCapability.resolve(!0),delete this._connectPromiseCapability,[3,4];case 3:return n.sent(),this._connectPromiseCapability&&(this._connectPromiseCapability.resolve(!1),delete this._connectPromiseCapability),[2,!1];case 4:return[2,!0]}}))}))},t.prototype._getResourcesUrl=function(){return"".concat(this._findBaseUrl(),"resources/")},t.prototype._findBaseUrl=function(){var t=(this.viewer.options.baseUrl||"").trim();return t||(t=(0,s.findBaseScriptUrl)()),!t||t.endsWith("/")||t.endsWith("\\")||(t+="/"),t},t}();e.WasmSupportApiBase=l},38030:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WasmSupportApiExtenal=void 0;var s=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.loadWasmModule=function(){return i(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,window.createDsPdfModule()];case 1:return[2,t.sent()]}}))}))},e}(n(40829).WasmSupportApiBase);e.WasmSupportApiExtenal=s,window.WasmSupportApi=s},21249:function(t,e){var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};function r(t){var e=null;return t&&t.getRootNode&&(e=t.getRootNode()),e||(e=document),e}function o(t,e){return t&&(" "+t.className+" ").indexOf(" "+e+" ")>-1}function i(){var t=(window.top||window).navigator,e=Number.isFinite(t.maxTouchPoints)?t.maxTouchPoints:t.msMaxTouchPoints;return Number.isFinite(e)?e>0&&256!==e:"ontouchstart"in window}function a(t,e){var n=document.createEvent("MouseEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeHTML=e.triggerFullStackClick=e.triggerMouseEvent=e.reversePopupRotation=e.getEventCoordinates=e.isTouchEventsEnabled=e.findElementIndex=e.findSelfOrAncestorAttr=e.findSelfOrAncestor=e.classListContains=e.isInputArea=e.getEventTarget=e.isDescendant=e.closestShadowRootOrBody=e.getShadowRootOrDocument=void 0,e.getShadowRootOrDocument=r,e.closestShadowRootOrBody=function(t){var e=r(t);return e.body?e.body:e},e.isDescendant=function(t,e){for(var n=t.parentNode;n;){if(n===e)return!0;n=n.parentNode}return!1},e.getEventTarget=function(t){return(t.path||t.composedPath&&t.composedPath()||[])[0]||t.target},e.isInputArea=function(t){if(!t)return!1;for(var e="INPUT"===t.tagName||"TEXTAREA"===t.tagName||"SELECT"===t.tagName;t&&!e&&(e=t.hasAttribute&&t.hasAttribute("contenteditable")&&"true"===t.getAttribute("contenteditable"),"SECTION"!==t.tagName&&"BODY"!==t.tagName&&"HTML"!==t.tagName);)t=t.parentNode;return e},e.classListContains=o,e.findSelfOrAncestor=function(t,e){if(t&&!o(t,e))for(;(t=t.parentNode)&&!o(t,e););return t},e.findSelfOrAncestorAttr=function(t,e){if(t&&(!t.hasAttribute||!t.hasAttribute(e)))for(;(t=t.parentNode)&&t&&(!t.hasAttribute||!t.hasAttribute(e)););return t},e.findElementIndex=function(t){return t&&t.parentNode?n([],Array.from(t.parentNode.children),!0).indexOf(t):-1},e.isTouchEventsEnabled=i,e.getEventCoordinates=function(t){if(i()&&t.touches&&t.touches.length>0){var e=t.touches[0];return{pageX:e.pageX||0,pageY:e.pageY||0,clientX:e.clientX||0,clientY:e.clientY||0}}return{pageX:t.pageX||0,pageY:t.pageY||0,clientX:t.clientX||0,clientY:t.clientY||0}},e.reversePopupRotation=function(t,e,n){if(360===e&&(e=0),t){if(!t.parentNode)return;if(e){var r=parseInt((t.style.left||"").toString().replace("px",""))||0,o=Math.round(r/2);t.style.transform="rotate(-"+e+"deg)";var i="left";switch(e){case 90:case 180:case 270:i="-"+o+"px -"+o+"px"}t.style.transformOrigin=i}else t.style.transform="",t.style.transformOrigin=""}n&&(n.style.transform=e?"rotate(-"+e+"deg)":"")},e.triggerMouseEvent=a,e.triggerFullStackClick=function(t){t&&(a(t,"mouseover"),a(t,"mousedown"),a(t,"mouseup"),a(t,"click"))},e.sanitizeHTML=function(t){return t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,"")}},99346:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.toCamelCase=e.htmlDecode=e.unicodeToChar=e.fasterBytesToBase64=e.base64ToBytes=e.bytesToBase64=e.base64ToUtf8=e.utf8ToBase64=void 0,e.unicodeToChar=function(t){return t.replace(/\\u[\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))}))},e.htmlDecode=function(t){var e;if(window.DOMParser){e=(new window.DOMParser).parseFromString(t,"text/html").documentElement.textContent||""}else{var n=document.createElement("textarea");n.innerHTML=t,e=(0===n.childNodes.length?"":n.childNodes[0].nodeValue)||""}return e=e.replace("","•")};var n=function(){for(var t=[],e="A".charCodeAt(0),n="a".charCodeAt(0),r="0".charCodeAt(0),o=0;o<26;++o)t.push(String.fromCharCode(e+o));for(o=0;o<26;++o)t.push(String.fromCharCode(n+o));for(o=0;o<10;++o)t.push(String.fromCharCode(r+o));return t.push("+"),t.push("/"),t}();e.fasterBytesToBase64=function(t){for(var e,n="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(t),i=o.byteLength,a=i%3,s=i-a,c=0;c<s;c+=3)n+=r[(16515072&(e=o[c]<<16|o[c+1]<<8|o[c+2]))>>18]+r[(258048&e)>>12]+r[(4032&e)>>6]+r[63&e];return 1==a?n+=r[(252&(e=o[s]))>>2]+r[(3&e)<<4]+"==":2==a&&(n+=r[(64512&(e=o[s]<<8|o[s+1]))>>10]+r[(1008&e)>>4]+r[(15&e)<<2]+"="),n},e.bytesToBase64=function(t){var e,r="",o=t.length;for(e=2;e<o;e+=3)r+=n[t[e-2]>>2],r+=n[(3&t[e-2])<<4|t[e-1]>>4],r+=n[(15&t[e-1])<<2|t[e]>>6],r+=n[63&t[e]];return e===o+1&&(r+=n[t[e-2]>>2],r+=n[(3&t[e-2])<<4],r+="=="),e===o&&(r+=n[t[e-2]>>2],r+=n[(3&t[e-2])<<4|t[e-1]>>4],r+=n[(15&t[e-1])<<2],r+="="),r},e.base64ToBytes=function(t){for(var e=";base64,",n=t.indexOf(e),r=-1!==n?t.substring(n+8):t,o=window.atob(r),i=o.length,a=new Uint8Array(new ArrayBuffer(i)),s=0;s<i;s++)a[s]=o.charCodeAt(s);return a},e.utf8ToBase64=function(t){return window.btoa(unescape(encodeURIComponent(t)))},e.base64ToUtf8=function(t){return decodeURIComponent(escape(window.atob(t)))},e.toCamelCase=function(t){return void 0===t?"":t.toString().replace(/[-_]+(.)?/g,(function(t,e){return e?e.toUpperCase():""})).replace(/^./,(function(t){return t.toLowerCase()}))}},51090:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GcMeasurement=void 0;var n=function(){function t(){}return t.fitWithAspectRatio=function(t,e){var n=t.width,r=t.height,o=n/r;return n>e.width&&(r=(n=e.width)/o),r>e.height&&(n=(r=e.height)*o),{width:n,height:r}},t.measureDomText=function(t,e,n){var r=document.createElement("div");r.style.fontFamily=e,r.style.fontSize=n,r.style.whiteSpace="nowrap",r.style.width="auto",r.style.height="auto",r.style.visibility="hidden",r.style.position="absolute",r.style.zIndex="-10",r.style.left="-1000px",r.innerHTML=t,document.body.appendChild(r);var o={w:r.clientWidth,h:r.clientHeight};return r.remove(),o},t.getElementOuterSize=function(t){try{var e=getComputedStyle(t),n=void 0,r=void 0;return"BODY"===t.tagName?(n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth):(n=t.offsetHeight,r=t.offsetWidth),n+=parseFloat(e.marginTop?e.marginTop:"0")+parseFloat(e.marginBottom?e.marginBottom:"0"),{w:r+=parseFloat(e.marginLeft?e.marginLeft:"0")+parseFloat(e.marginRight?e.marginRight:"0"),h:n}}catch(e){return{w:t.offsetWidth,h:t.offsetHeight}}},t.getElementInnerSize=function(t){try{var e=getComputedStyle(t),n=void 0,r=void 0;return"BODY"===t.tagName?(n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0,n-=parseFloat(e.marginTop?e.marginTop:"0")+parseFloat(e.marginBottom?e.marginBottom:"0"),r-=parseFloat(e.marginLeft?e.marginLeft:"0")+parseFloat(e.marginRight?e.marginRight:"0")):(n=t.offsetHeight,r=t.offsetWidth),n-=parseFloat(e.paddingTop?e.paddingTop:"0")+parseFloat(e.paddingBottom?e.paddingBottom:"0"),{w:r-=parseFloat(e.paddingLeft?e.paddingLeft:"0")+parseFloat(e.paddingRight?e.paddingRight:"0"),h:n}}catch(e){return{w:t.offsetWidth,h:t.offsetHeight}}},t.intersectRect=function(t,e){return!(e.x>t.x+t.w||e.x+e.w<t.x||e.y>t.y+t.h||e.y+e.h<t.y)},t.isPointInBounds=function(t,e){var n=e.x+e.w,r=e.y+e.h;return e.x<=t.x&&t.x<=n&&e.y<=t.y&&t.y<=r},t.getWindowScrollOffsets=function(){var t=document.documentElement;return{left:(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0),top:(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}},t.getWindowSize=function(){return{w:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},t.getAbsoluteOffsetLeft=function(t){for(var e=0;t;)Number.isNaN(t.offsetLeft)||(e+=t.offsetLeft),t=t.offsetParent;return e},t.getAbsoluteOffsetTop=function(t){for(var e=0;t;)Number.isNaN(t.offsetTop)||(e+=t.offsetTop),t=t.offsetParent;return e},t}();e.GcMeasurement=n},84073:(t,e)=>{function n(t,e,n){return void 0===n||0==+n?Math[t](e):(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0?NaN:(e=e.toString().split("e"),+((e=(e=Math[t](+(e[0]+"e"+(e[1]?+e[1]-n:-n)))).toString().split("e"))[0]+"e"+(e[1]?+e[1]+n:n))))}function r(t,e){return n("round",t,e)}function o(t){var e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}function i(t,e,n,o,i,a){void 0===a&&(a=!0);var s=a?Math.PI/180*i:i,c=Math.cos(s),u=Math.sin(s),l=c*(o-e)-u*(n-t)+e;return[r(c*(n-t)+u*(o-e)+t,-1),r(l,-1)]}function a(t,e,n,r){var o=Math.atan2(r-e,n-t)*(180/Math.PI);return o<0&&(o=360+o),o}function s(t,e,n,r){if(void 0===r&&(r=!0),!e){var a=Math.abs(t[2]-t[0]),s=Math.abs(t[3]-t[1]);e=[t[0]+a/2,t[1]+s/2]}var c=i(e[0],e[1],t[0],t[1],n,r),u=i(e[0],e[1],t[2],t[3],n,r);return o([c[0],c[1],u[0],u[1]])}Object.defineProperty(e,"__esModule",{value:!0}),e.findLinesIntersection=e.rotateRectAndFillBoth=e.getAngle=e.getDistance=e.reverseRotateRect=e.rotateRect=e.deg2rad=e.rad2Deg=e.findVectorsAngle=e.rotatePoint=e.normalizeRect=e.round10=e.ceil10=e.floor10=void 0,e.floor10=function(t,e){return n("floor",t,e)},e.ceil10=function(t,e){return n("ceil",t,e)},e.round10=r,e.normalizeRect=o,e.rotatePoint=i,e.findVectorsAngle=function(t,e,n){var r=a(n[0],n[1],t[0],t[1]);return(360+a(n[0],n[1],e[0],e[1])-r)%360},e.rad2Deg=function(t){return 180*t/Math.PI},e.deg2rad=function(t){return t*(Math.PI/180)},e.rotateRect=s,e.reverseRotateRect=function(t,e,n){var r=0;return[{a:-360,sect:1},{a:-321,sect:2},{a:-270,sect:1},{a:-269,sect:2},{a:-232,sect:1},{a:-141,sect:2},{a:-90,sect:1},{a:-89,sect:2},{a:-52,sect:1},{a:39,sect:2},{a:90,sect:1},{a:91,sect:2},{a:128,sect:1},{a:219,sect:2},{a:270,sect:1},{a:271,sect:2},{a:308,sect:1}].forEach((function(t){t.a<=n&&(r=t.sect)})),s(1===r?t:[t[2],t[1],t[0],t[3]],e,-n,!0)},e.getDistance=function(t,e,n,r){var o=n-t,i=r-e;return Math.sqrt(i*i+o*o)},e.getAngle=function(t,e,n,r){var o=n-t,i=r-e;return Math.atan2(i,o)},e.rotateRectAndFillBoth=function(t,e,n,r){void 0===r&&(r=!0);var i=s(t=o(t),e,n,r),a=s([t[2],t[1],t[0],t[3]],e,n,r),c=[Math.min(i[0],a[0]),Math.min(i[1],a[1]),Math.max(i[2],a[2]),Math.max(i[3],a[3])];return{rotatedRect:o([Math.max(t[0],c[0]),Math.min(t[1],c[1]),Math.min(t[2],c[2]),Math.max(t[3],c[3])]),transformedRect:i}},e.findLinesIntersection=function(t,e,n,r){var o=e[1]-t[1],i=t[0]-e[0],a=o*t[0]+i*t[1],s=r[1]-n[1],c=n[0]-r[0],u=s*n[0]+c*n[1],l=o*c-s*i;return l?[(c*a-i*u)/l,(o*u-s*a)/l]:null}},83173:function(t,e){var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.PromiseQueue=e.AsyncLock=e.createPromiseCapabilityWithTimeout=e.createPromiseCapability=void 0,e.createPromiseCapability=function(){var t={};return t.promise=new Promise((function(e,n){t.resolve=e,t.reject=n})),t},e.createPromiseCapabilityWithTimeout=function(t,e){void 0===t&&(t=-1),void 0===e&&(e="Timeout");var n={resolved:!1,rejected:!1,rejectTimeout:-1};return n.promise=new Promise((function(t,e){n.resolve=function(e){-1!==n.rejectTimeout&&(clearTimeout(n.rejectTimeout),n.rejectTimeout=-1),n.resolved=!0,t(e)},n.reject=function(t){-1!==n.rejectTimeout&&(clearTimeout(n.rejectTimeout),n.rejectTimeout=-1),n.rejected=!1,e(t)}})),t>0&&(n.rejectTimeout=setTimeout((function(){n.rejectTimeout=-1,n.resolved||n.rejected||n.reject(e)}),t)),n};var o=function(){function t(){this._queue=[],this._isLocked=!1}return Object.defineProperty(t.prototype,"locked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),t.prototype.lock=function(){return n(this,void 0,void 0,(function(){var t=this;return r(this,(function(e){return[2,new Promise((function(e){t._isLocked?t._queue.push((function(){e(),t._isLocked=!0})):(t._isLocked=!0,e())}))]}))}))},t.prototype.unlock=function(){if(this._isLocked){var t=this._queue.shift();t?t():this._isLocked=!1}},t}();e.AsyncLock=o;var i=function(){function t(){this._queue=Promise.resolve(!0),this._queueId=0}return t.prototype.enqueue=function(t){var e=this;return t.___queueId||(t.___queueId=this._queueId),new Promise((function(o,i){t.___queueId===e._queueId&&(e._queue=e._queue.then((function(){return n(e,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return t.___queueId!==this._queueId?[2]:[4,t()];case 1:return e.sent(),[2]}}))}))})).then(o).catch(i))}))},t.prototype.clear=function(){this._queueId++,isNaN(this._queueId)&&(this._queueId=0),this._queue=Promise.resolve(!0)},t}();e.PromiseQueue=i},13395:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedRef=void 0;var n="___gcpdfviewer_shared_ref",r="___gcpdfviewer_shared_ref18n",o=function(){function t(t,e,n){this.viewer=t,this.moment=e,this.i18n=n,this.i18n}return t.onViewerInitialize=function(e,r){window[n]||(window[n]={}),window[n][e.instanceId]=new t(e,r,e.in17n)},t.get=function(t,e){if(void 0===e&&(e=!1),window[n]||(window[n]={}),!window[n][t]&&e)for(var r in window[n])return window[n][r];if(!t&&!e)throw new Error("Missing instanceId");return window[n][t]},t.dispose=function(e){t.get(e)&&(t.get(e).dispose(),delete window[n][e])},Object.defineProperty(t,"moment",{get:function(){return t.get("",!0).moment},enumerable:!1,configurable:!0}),Object.defineProperty(t,"i18n",{get:function(){var e,n;return null!==(n=null===(e=t.get("",!0))||void 0===e?void 0:e.i18n)&&void 0!==n?n:window[r]},set:function(t){window[r]=t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"count",{get:function(){return window[n]?Object.keys(window[n]).length:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.viewer.storage},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.releaseResources()},t.prototype.releaseResources=function(){this.storage.releaseResources()},t}();e.SharedRef=o},5688:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createObjectURL=e.addLinkAttributes=e.LinkTarget=e.removeNullCharacters=e.getFilenameFromUrl=e.makeAbsoluteUrl=e.findBaseScriptUrl=void 0;var n=function(){var t="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:{};if(!t.document)return"";for(var e=t.document.getElementsByTagName("script"),n=e.length-1;n>=0;n--)if(e[n].src)return e[n].src.toString();return""}();function r(){var t=-1!==n.indexOf("/js")?n.lastIndexOf("/js"):n.lastIndexOf("/");return n.substr(0,t)}e.findBaseScriptUrl=r,e.makeAbsoluteUrl=function(t,e){return 0===t.indexOf("http://")||0===t.indexOf("https://")?t:(e||(e=r()),e.lastIndexOf("/")!==e.length-1&&(e="".concat(e,"/")),"".concat(e).concat(t))},e.getFilenameFromUrl=function(t){if(!t)return"";var e=t.indexOf("#"),n=t.indexOf("?"),r=Math.min(e>0?e:t.length,n>0?n:t.length),o=t.substring(t.lastIndexOf("/",r)+1,r).substring(t.lastIndexOf("\\",r)+1,r);if(n>0&&-1===(o+"").toLowerCase().indexOf(".pdf")){var i=t.substr(n)||"",a=i.toLowerCase().indexOf(".pdf");if(i&&a>0){var s=(i=i.substring(0,a+4)).replace(/[\\?#=]/g,"/").lastIndexOf("/");s>=0&&s<a&&(o=i.substr(s+1))}}return o};var o=/\x00/g;function i(t){return"string"!=typeof t?t:t.replace(o,"")}e.removeNullCharacters=i;var a,s=["","_self","_blank","_parent","_top"];!function(t){t[t.NONE=0]="NONE",t[t.SELF=1]="SELF",t[t.BLANK=2]="BLANK",t[t.PARENT=3]="PARENT",t[t.TOP=4]="TOP"}(a=e.LinkTarget||(e.LinkTarget={})),e.addLinkAttributes=function(t,e){var n=e.url,r=e.target,o=e.rel;if(t.href=t.title=n?i(n):"",n){var c=Object.values(a).includes(r)?r:a.NONE;t.target=s[c],t.rel="string"==typeof o?o:"noopener noreferrer nofollow"}},e.createObjectURL=function(t,e,n){return void 0===n&&(n=!1),(r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",function(t,e,n){if(void 0===n&&(n=!1),!n&&URL.createObjectURL){var o=function(t,e){if(void 0===e&&(e=""),"undefined"!=typeof Blob)return new Blob([t],{type:e});throw new Error('The "Blob" constructor is not supported.')}(t,e);return URL.createObjectURL(o)}for(var i="data:"+e+";base64,",a=0,s=t.length;a<s;a+=3){var c=255&t[a],u=255&t[a+1],l=255&t[a+2],d=(3&c)<<4|u>>4,f=a+1<s?(15&u)<<2|l>>6:64,h=a+2<s?63&l:64;i+=r[c>>2]+r[d]+r[f]+r[h]}return i})(t,e,n);var r}},87288:function(t,e,n){var r,o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.getStandardizedLanguageKey=e.isAnnotationAllowsSelectTextBehind=e.updateRotationInit=e.findRotationInit=e.calcRotationRectangles=e.initAnnotationRotateSupport=e.insertFirst=e.applyAnnotationRotate=e.applyAnnotationRotate2=e.clearAnnotationRotate=e.updateAnnotationContentPosition=e.updateInputCheckedAppearance=e.setInputCheckedState=e.logError=e.logMessage=e.isEditorModeEnabled=e.sortedIndex=e.getAccentTextColor=e.moveInkLists=e.detachHeadCss=e.detachHeadJs=e.attachHeadCss=e.cleanseRichText=e.stripHtmlTags=e.attachHeadJs=e.setActiveUserName=e.getActiveUserName=e.getDefaultUserName=e.humanReadableFileSize=e.formatDateTime=e.formatRelativeDate=e.dateToPdfDateString=e.pdfDateStringToDate=e.changeOriginToTop=e.changeOriginToBottom=e.changeRectangleOrigin=e.convertToPdfPoint=e.convertToViewportPoint=e.inverseTransform=e.applyInverseTransform=e.applyTransform=e.getAxialAlignedBoundingBox=e.adjustCoordinates=e.getTransformMatrix=e.cloneObject=e.mergeObject=e.isTypedArray=e.resetStampAspectRatio=e.updateInitialRectPosition=e.generateUid=void 0,e.getFontFormatFromUrl=e.loadFileData=e.getValueFromCssText=e.setImageFileFromCanvas=e.generateRichMediaPoster=e.injectSerializableFile=void 0;var s=n(63590),c=n(21249),u=n(51090),l=n(84073),d=n(13395),f=n(5688);function h(t){return(t||"")+Date.now().toString(36)+Math.random().toString(36).substr(2)}function p(t,e){if(t.rotationInit){var n=t.rect,r=t.rotationInit.initRect,o=Math.abs(n[2]-n[0]),i=Math.abs(n[3]-n[1]),a=Math.abs(r[2]-r[0]),s=Math.abs(r[3]-r[1]),c=a-o,u=s-i;e&&(n[0]=e[0],n[1]=e[1],n[2]=n[0]+o,n[3]=n[1]+i);var d=t.rotate||0;switch(d){case 0:case 90:case 180:case 270:var f=(0,l.rotateRect)(n,null,d);r[0]=f[0],r[1]=f[1],r[2]=f[2],r[3]=f[3];break;default:r[0]=n[0]+c/2,r[1]=n[1]-u/2,r[2]=r[0]+a,r[3]=r[1]+s}}}function g(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function m(t,e,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===e||n&&void 0!==t&&(o=t)!==Object(o))return t;var o;if(g(e))return e;if(void 0===t){if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array)t=[];else{if(!e||"object"!=typeof e)return e;t={}}}if(e){if(e instanceof Array){if(t&&t instanceof Array){for(var i=[],a=0;a<e.length;a++)t.length>a?i[a]=m(t[a],e[a]):i[a]=m(void 0,e[a]);return i}return e}if("object"==typeof e&&t&&"object"==typeof t){if(t instanceof Array&&(t={}),r)for(var s in t)e.hasOwnProperty(s)||(t[s]=e[s]);for(var s in e)t[s]="implementation"===s||"i