@syncfusion/ej2-docx-renderer 0.0.0-stage → 35.2.15

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.
Files changed (129) hide show
  1. package/README.md +2 -2
  2. package/base.d.ts +4 -0
  3. package/base.js +4 -0
  4. package/dist/ej2-docx-renderer.umd.min.js +2 -0
  5. package/dist/ej2-docx-renderer.umd.min.js.map +1 -0
  6. package/dist/es6/ej2-docx-renderer.es2015.js +52432 -0
  7. package/dist/es6/ej2-docx-renderer.es2015.js.map +1 -0
  8. package/dist/es6/ej2-docx-renderer.es5.js +54425 -0
  9. package/dist/es6/ej2-docx-renderer.es5.js.map +1 -0
  10. package/dist/global/ej2-docx-renderer.min.js +2 -0
  11. package/dist/global/ej2-docx-renderer.min.js.map +1 -0
  12. package/dist/global/index.d.ts +5 -0
  13. package/format.d.ts +4 -0
  14. package/format.js +4 -0
  15. package/helper.d.ts +4 -0
  16. package/helper.js +4 -0
  17. package/index.d.ts +4 -0
  18. package/index.js +4 -0
  19. package/license +10 -0
  20. package/list.d.ts +4 -0
  21. package/list.js +4 -0
  22. package/package.json +26 -4
  23. package/parser.d.ts +4 -0
  24. package/parser.js +4 -0
  25. package/src/base/constants.d.ts +2 -0
  26. package/src/base/constants.js +2 -0
  27. package/src/base/dictionary.d.ts +52 -0
  28. package/src/base/dictionary.js +137 -0
  29. package/src/base/index.d.ts +9 -0
  30. package/src/base/index.js +9 -0
  31. package/src/base/keywords.d.ts +422 -0
  32. package/src/base/keywords.js +422 -0
  33. package/src/base/types.d.ts +2590 -0
  34. package/src/base/types.js +1056 -0
  35. package/src/base/unique-format.d.ts +87 -0
  36. package/src/base/unique-format.js +858 -0
  37. package/src/base/unique-formats.d.ts +32 -0
  38. package/src/base/unique-formats.js +87 -0
  39. package/src/document-canvas.d.ts +61 -0
  40. package/src/document-canvas.js +221 -0
  41. package/src/docx-renderer.d.ts +941 -0
  42. package/src/docx-renderer.js +2251 -0
  43. package/src/format/border.d.ts +53 -0
  44. package/src/format/border.js +600 -0
  45. package/src/format/borders.d.ts +44 -0
  46. package/src/format/borders.js +314 -0
  47. package/src/format/cell-format.d.ts +42 -0
  48. package/src/format/cell-format.js +309 -0
  49. package/src/format/character-format.d.ts +152 -0
  50. package/src/format/character-format.js +1224 -0
  51. package/src/format/index.d.ts +14 -0
  52. package/src/format/index.js +14 -0
  53. package/src/format/list-format.d.ts +32 -0
  54. package/src/format/list-format.js +238 -0
  55. package/src/format/paragraph-format.d.ts +103 -0
  56. package/src/format/paragraph-format.js +854 -0
  57. package/src/format/row-format.d.ts +119 -0
  58. package/src/format/row-format.js +545 -0
  59. package/src/format/section-format.d.ts +89 -0
  60. package/src/format/section-format.js +689 -0
  61. package/src/format/shading.d.ts +24 -0
  62. package/src/format/shading.js +137 -0
  63. package/src/format/style.d.ts +106 -0
  64. package/src/format/style.js +286 -0
  65. package/src/format/table-format.d.ts +51 -0
  66. package/src/format/table-format.js +395 -0
  67. package/src/global.js +1 -0
  68. package/src/helper/document-editor-helper.d.ts +515 -0
  69. package/src/helper/document-editor-helper.js +1302 -0
  70. package/src/helper/document-editor-settings.d.ts +293 -0
  71. package/src/helper/document-editor-settings.js +94 -0
  72. package/src/helper/index.d.ts +5 -0
  73. package/src/helper/index.js +5 -0
  74. package/src/helper/layout-helper-methods.d.ts +539 -0
  75. package/src/helper/layout-helper-methods.js +1065 -0
  76. package/src/helper/renderer-hooks.d.ts +74 -0
  77. package/src/helper/renderer-hooks.js +14 -0
  78. package/src/helper/revision-helper-methods.d.ts +199 -0
  79. package/src/helper/revision-helper-methods.js +362 -0
  80. package/src/index.d.ts +18 -0
  81. package/src/index.js +18 -0
  82. package/src/layout-helper.d.ts +190 -0
  83. package/src/layout-helper.js +1368 -0
  84. package/src/layout.d.ts +779 -0
  85. package/src/layout.js +17232 -0
  86. package/src/list/abstract-list.d.ts +25 -0
  87. package/src/list/abstract-list.js +67 -0
  88. package/src/list/index.d.ts +7 -0
  89. package/src/list/index.js +7 -0
  90. package/src/list/level-override.d.ts +22 -0
  91. package/src/list/level-override.js +43 -0
  92. package/src/list/list-level.d.ts +57 -0
  93. package/src/list/list-level.js +249 -0
  94. package/src/list/list.d.ts +30 -0
  95. package/src/list/list.js +100 -0
  96. package/src/page.d.ts +4155 -0
  97. package/src/page.js +11342 -0
  98. package/src/parser/index.d.ts +1 -0
  99. package/src/parser/index.js +1 -0
  100. package/src/parser/sfdt-reader.d.ts +254 -0
  101. package/src/parser/sfdt-reader.js +4569 -0
  102. package/src/render.d.ts +226 -0
  103. package/src/render.js +4222 -0
  104. package/src/text-helper.d.ts +144 -0
  105. package/src/text-helper.js +1079 -0
  106. package/src/text-helpers/index.d.ts +2 -0
  107. package/src/text-helpers/index.js +2 -0
  108. package/src/text-helpers/optimized.d.ts +45 -0
  109. package/src/text-helpers/optimized.js +121 -0
  110. package/src/text-helpers/regular.d.ts +37 -0
  111. package/src/text-helpers/regular.js +93 -0
  112. package/src/themes/font-scheme.d.ts +28 -0
  113. package/src/themes/font-scheme.js +107 -0
  114. package/src/themes/index.d.ts +6 -0
  115. package/src/themes/index.js +6 -0
  116. package/src/themes/major-minor-font-scheme.d.ts +14 -0
  117. package/src/themes/major-minor-font-scheme.js +45 -0
  118. package/src/themes/themes.d.ts +11 -0
  119. package/src/themes/themes.js +31 -0
  120. package/src/utility/index.d.ts +1 -0
  121. package/src/utility/index.js +1 -0
  122. package/src/utility/path-util.d.ts +133 -0
  123. package/src/utility/path-util.js +639 -0
  124. package/text-helpers.d.ts +4 -0
  125. package/text-helpers.js +4 -0
  126. package/themes.d.ts +4 -0
  127. package/themes.js +4 -0
  128. package/utility.d.ts +4 -0
  129. package/utility.js +4 -0
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-compression"),require("@syncfusion/ej2-office-chart")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-compression","@syncfusion/ej2-office-chart"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Compression,e.ej2OfficeChart)}(this,function(j,G,f,m){"use strict";Object.defineProperty(y.prototype,"length",{get:function(){return this.keysInternal.length},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"keys",{get:function(){return this.keysInternal},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"values",{get:function(){return this.valuesInternal},enumerable:!0,configurable:!0}),y.prototype.add=function(e,t){if(G.isNullOrUndefined(e))throw new ReferenceError("Provided key or value is not valid.");return this.keysInternal.indexOf(e)<0&&(this.keysInternal.push(e),this.valuesInternal.push(t)),1},y.prototype.get=function(e){if(G.isNullOrUndefined(e))throw new ReferenceError("Provided key is not valid.");e=this.keysInternal.indexOf(e);if(!(e<0||e>this.keysInternal.length-1))return this.valuesInternal[e]},y.prototype.set=function(e,t){if(G.isNullOrUndefined(e))throw new ReferenceError("Provided key is not valid.");e=this.keysInternal.indexOf(e);if(e<0||e>this.keysInternal.length-1)throw new RangeError("No item with the specified key has been added.");this.valuesInternal[e]=t},y.prototype.remove=function(e){if(G.isNullOrUndefined(e))throw new ReferenceError("Provided key is not valid.");e=this.keysInternal.indexOf(e);if(e<0||e>this.keysInternal.length-1)throw new RangeError("No item with the specified key has been added.");return this.keysInternal.splice(e,1),this.valuesInternal.splice(e,1),!0},y.prototype.containsKey=function(e){if(G.isNullOrUndefined(e))throw new ReferenceError("Provided key is not valid.");e=this.keysInternal.indexOf(e);return!(e<0||e>this.keysInternal.length-1)},y.prototype.clear=function(){this.keysInternal=[],this.valuesInternal=[]},y.prototype.destroy=function(){this.clear(),this.keysInternal=void 0,this.valuesInternal=void 0};var N=y;function y(){this.keysInternal=[],this.valuesInternal=[]}v.prototype.isEqual=function(e,t,i){var r=!1;switch(this.uniqueFormatType){case 1:r=this.isBorderEqual(e,t,i);break;case 2:r=this.isCharacterFormatEqual(e,t,i);break;case 3:r=this.isParagraphFormatEqual(e,t,i);break;case 4:r=this.isCellFormatEqual(e,t,i);break;case 5:r=this.isShadingEqual(e,t,i);break;case 6:r=this.isRowFormatEqual(e,t,i);break;case 7:r=this.isListFormatEqual(e,t,i);break;case 8:r=this.isTableFormatEqual(e,t,i);break;case 9:r=this.isListLevelEqual(e,t,i);break;case 10:r=this.isSectionFormatEqual(e,t,i);break;case 11:r=this.isColumnFormatEqual(e,t,i)}return r},v.prototype.isNotEqual=function(e,t,i,r,n){var o=void 0,n=v.getPropertyType(n,e),a=(this.propertiesHash.containsKey(n)&&(o=this.propertiesHash.get(n)),void 0);return e===i?a=r:t.containsKey(n)&&(a=t.get(n)),!(o===a||!G.isNullOrUndefined(o)&&!G.isNullOrUndefined(a)&&o===a)},v.getPropertyType=function(e,t){var i=0;switch(e){case 1:i=this.getBorderPropertyType(t);break;case 2:i=this.getCharacterFormatPropertyType(t);break;case 3:i=this.getParaFormatPropertyType(t);break;case 4:i=this.getCellFormatPropertyType(t);break;case 5:i=this.getShadingPropertyType(t);break;case 6:i=this.getRowFormatType(t);break;case 7:i=this.getListFormatType(t);break;case 8:i=this.getTableFormatType(t);break;case 9:i=this.getListLevelType(t);break;case 10:i=this.getSectionFormatType(t);break;case 11:i=this.getColumnFormatType(t)}return i},v.getRowFormatType=function(e){switch(e){case"allowBreakAcrossPages":return 1;case"isHeader":return 2;case"height":return 3;case"heightType":return 4;case"gridBefore":return 5;case"gridBeforeWidth":return 6;case"gridBeforeWidthType":return 7;case"gridAfter":return 8;case"gridAfterWidth":return 9;case"gridAfterWidthType":return 10;case"leftMargin":return 11;case"topMargin":return 12;case"bottomMargin":return 13;case"rightMargin":return 14;case"leftIndent":return 15;case"verticallyMergedCellsLeftMargin":return 16;case"verticallyMergedCellsRightMargin":return 17;case"verticallyMergedCellsTopMargin":return 18;case"verticallyMergedCellsBottomMargin":return 19;default:return 0}},v.getListFormatType=function(e){switch(e){case"listId":return 1;case"listLevelNumber":return 2;case"nsid":return 3;default:return 0}},v.getTableFormatType=function(e){switch(e){case"leftMargin":return 1;case"rightMargin":return 2;case"topMargin":return 3;case"bottomMargin":return 4;case"cellSpacing":return 5;case"leftIndent":return 6;case"tableAlignment":return 7;case"preferredWidth":return 8;case"preferredWidthType":return 9;case"bidi":return 10;case"allowAutoFit":return 11;case"horizontalPositionAbs":return 12;case"horizontalPosition":return 13;default:return 0}},v.getListLevelType=function(e){switch(e){case"listLevelPattern":return 1;case"startAt":return 2;case"followCharacter":return 3;case"numberFormat":return 4;case"restartLevel":return 5;case"isLegalStyleNumbering":return 6;case"paraStyleName":return 7;case"numberAlignment":return 8;default:return 0}},v.getShadingPropertyType=function(e){switch(e){case"backgroundColor":return 1;case"foregroundColor":return 2;case"textureStyle":return 3;default:return 0}},v.getCellFormatPropertyType=function(e){switch(e){case"leftMargin":return 1;case"rightMargin":return 2;case"topMargin":return 3;case"bottomMargin":return 4;case"columnSpan":return 5;case"rowSpan":return 6;case"verticalAlignment":return 7;case"preferredWidthType":return 8;case"preferredWidth":return 9;case"cellWidth":return 10;default:return 0}},v.getBorderPropertyType=function(e){switch(e){case"color":return 1;case"lineStyle":return 2;case"lineWidth":return 3;case"shadow":return 4;case"space":return 5;case"hasNoneStyle":return 6;default:return 0}},v.getCharacterFormatPropertyType=function(e){switch(e){case"fontColor":return 1;case"fontFamily":return 2;case"fontSize":return 3;case"bold":return 4;case"italic":return 5;case"underline":return 6;case"strikethrough":return 7;case"baselineAlignment":return 8;case"highlightColor":return 9;case"bidi":return 10;case"bdo":return 11;case"boldBidi":return 12;case"italicBidi":return 13;case"fontFamilyBidi":return 14;case"fontSizeBidi":return 15;case"allCaps":return 16;case"localeIdBidi":return 17;case"complexScript":return 18;case"fontFamilyFarEast":return 19;case"fontFamilyAscii":return 20;case"fontFamilyNonFarEast":return 21;case"localeIdAscii":return 22;case"localeIdFarEast":return 23;case"characterSpacing":return 24;case"scaling":return 25;case"hidden":return 26;case"underlineColor":return 27;case"fontHintType":return 28;case"ligature":return 29;case"specVanish":return 30;case"isKernFont":return 31;case"kern":return 32;default:return 0}},v.getParaFormatPropertyType=function(e){switch(e){case"leftIndent":return 1;case"rightIndent":return 2;case"firstLineIndent":return 3;case"textAlignment":return 4;case"beforeSpacing":return 5;case"afterSpacing":return 6;case"lineSpacing":return 7;case"lineSpacingType":return 8;case"outlineLevel":return 9;case"bidi":return 10;case"contextualSpacing":return 11;case"keepWithNext":return 12;case"keepLinesTogether":return 13;case"widowControl":return 14;case"spaceBeforeAuto":return 15;case"spaceAfterAuto":return 16;default:return 0}},v.getColumnFormatType=function(e){switch(e){case"width":return 1;case"space":return 2;default:return 0}},v.getSectionFormatType=function(e){switch(e){case"headerDistance":return 1;case"footerDistance":return 2;case"differentFirstPage":return 3;case"differentOddAndEvenPages":return 4;case"pageWidth":return 5;case"pageHeight":return 6;case"leftMargin":return 7;case"topMargin":return 8;case"rightMargin":return 9;case"bottomMargin":return 10;case"bidi":return 11;case"restartPageNumbering":return 12;case"pageStartingNumber":return 13;case"endnoteNumberFormat":return 14;case"endnotePosition":return 15;case"footNoteNumberFormat":return 16;case"footnotePosition":return 17;case"restartIndexForEndnotes":return 18;case"restartIndexForFootnotes":return 19;case"initialFootNoteNumber":return 20;case"initialEndNoteNumber":return 21;case"pageNumberStyle":return 22;case"numberOfColumns":return 23;case"equalWidth":return 24;case"lineBetweenColumns":return 25;case"columns":return 26;case"breakCode":return 27;default:return 0}},v.prototype.isBorderEqual=function(e,t,i){return!this.isNotEqual("color",e,t,i,1)&&!this.isNotEqual("lineStyle",e,t,i,1)&&!(this.isNotEqual("lineWidth",e,t,i,1)||this.isNotEqual("shadow",e,t,i,1)||this.isNotEqual("space",e,t,i,1)||this.isNotEqual("hasNoneStyle",e,t,i,1))},v.prototype.isCharacterFormatEqual=function(e,t,i){return!this.isNotEqual("fontColor",e,t,i,2)&&!this.isNotEqual("fontFamily",e,t,i,2)&&!(this.isNotEqual("fontSize",e,t,i,2)||this.isNotEqual("bold",e,t,i,2)||this.isNotEqual("italic",e,t,i,2)||this.isNotEqual("underline",e,t,i,2)||this.isNotEqual("strikethrough",e,t,i,2)||this.isNotEqual("baselineAlignment",e,t,i,2)||this.isNotEqual("highlightColor",e,t,i,2)||this.isNotEqual("bidi",e,t,i,2)||this.isNotEqual("bdo",e,t,i,2)||this.isNotEqual("fontColor",e,t,i,2)||this.isNotEqual("fontFamilyBidi",e,t,i,2)||this.isNotEqual("fontSizeBidi",e,t,i,2)||this.isNotEqual("boldBidi",e,t,i,2)||this.isNotEqual("italicBidi",e,t,i,2)||this.isNotEqual("allCaps",e,t,i,2)||this.isNotEqual("localeIdBidi",e,t,i,2)||this.isNotEqual("localeIdAscii",e,t,i,2)||this.isNotEqual("localeIdFarEast",e,t,i,2)||this.isNotEqual("complexScript",e,t,i,2)||this.isNotEqual("hidden",e,t,i,2)||this.isNotEqual("specVanish",e,t,i,2)||this.isNotEqual("isKernFont",e,t,i,2)||this.isNotEqual("kern",e,t,i,2)||this.isNotEqual("fontFamilyFarEast",e,t,i,2)||this.isNotEqual("fontFamilyAscii",e,t,i,2)||this.isNotEqual("fontFamilyNonFarEast",e,t,i,2)||this.isNotEqual("characterSpacing",e,t,i,2)||this.isNotEqual("scaling",e,t,i,2)||this.isNotEqual("underlineColor",e,t,i,2)||this.isNotEqual("ligature",e,t,i,2)||this.isNotEqual("fontHintType",e,t,i,2))},v.prototype.isParagraphFormatEqual=function(e,t,i){return!(this.isNotEqual("leftIndent",e,t,i,3)||this.isNotEqual("rightIndent",e,t,i,3)||this.isNotEqual("firstLineIndent",e,t,i,3)||this.isNotEqual("textAlignment",e,t,i,3)||this.isNotEqual("beforeSpacing",e,t,i,3)||this.isNotEqual("afterSpacing",e,t,i,3)||this.isNotEqual("spaceBeforeAuto",e,t,i,3)||this.isNotEqual("spaceAfterAuto",e,t,i,3)||this.isNotEqual("lineSpacing",e,t,i,3)||this.isNotEqual("lineSpacingType",e,t,i,3)||this.isNotEqual("outlineLevel",e,t,i,3)||this.isNotEqual("bidi",e,t,i,3)||this.isNotEqual("contextualSpacing",e,t,i,3)||this.isNotEqual("keepWithNext",e,t,i,3)||this.isNotEqual("keepLinesTogether",e,t,i,3)||this.isNotEqual("widowControl",e,t,i,3))},v.prototype.isCellFormatEqual=function(e,t,i){return!this.isNotEqual("leftMargin",e,t,i,4)&&!(this.isNotEqual("rightMargin",e,t,i,4)||this.isNotEqual("topMargin",e,t,i,4)||this.isNotEqual("bottomMargin",e,t,i,4)||this.isNotEqual("columnSpan",e,t,i,4)||this.isNotEqual("rowSpan",e,t,i,4)||this.isNotEqual("verticalAlignment",e,t,i,4)||this.isNotEqual("preferredWidthType",e,t,i,4)||this.isNotEqual("preferredWidth",e,t,i,4)||this.isNotEqual("cellWidth",e,t,i,4)||this.isNotEqual("verticallyMergedCellsKeepWithNext",e,t,i,4))},v.prototype.isShadingEqual=function(e,t,i){return!this.isNotEqual("backgroundColor",e,t,i,5)&&!this.isNotEqual("foregroundColor",e,t,i,5)&&!this.isNotEqual("textureStyle",e,t,i,5)},v.prototype.isRowFormatEqual=function(e,t,i){return!(this.isNotEqual("allowBreakAcrossPages",e,t,i,6)||this.isNotEqual("isHeader",e,t,i,6)||this.isNotEqual("height",e,t,i,6)||this.isNotEqual("heightType",e,t,i,6)||this.isNotEqual("gridBefore",e,t,i,6)||this.isNotEqual("gridBeforeWidth",e,t,i,6)||this.isNotEqual("gridBeforeWidthType",e,t,i,6)||this.isNotEqual("gridAfter",e,t,i,6)||this.isNotEqual("gridAfterWidth",e,t,i,6)||this.isNotEqual("gridAfterWidthType",e,t,i,6)||this.isNotEqual("leftMargin",e,t,i,6)||this.isNotEqual("topMargin",e,t,i,6)||this.isNotEqual("bottomMargin",e,t,i,6)||this.isNotEqual("rightMargin",e,t,i,6)||this.isNotEqual("leftIndent",e,t,i,6)||this.isNotEqual("verticallyMergedCellsLeftMargin",e,t,i,6)||this.isNotEqual("verticallyMergedCellsRightMargin",e,t,i,6)||this.isNotEqual("verticallyMergedCellsTopMargin",e,t,i,6)||this.isNotEqual("verticallyMergedCellsBottomMargin",e,t,i,6))},v.prototype.isListFormatEqual=function(e,t,i){return!this.isNotEqual("listId",e,t,i,7)&&!this.isNotEqual("listLevelNumber",e,t,i,7)&&!this.isNotEqual("nsid",e,t,i,7)},v.prototype.isTableFormatEqual=function(e,t,i){return!(this.isNotEqual("leftMargin",e,t,i,8)||this.isNotEqual("rightMargin",e,t,i,8)||this.isNotEqual("topMargin",e,t,i,8)||this.isNotEqual("bottomMargin",e,t,i,8)||this.isNotEqual("cellSpacing",e,t,i,8)||this.isNotEqual("leftIndent",e,t,i,8)||this.isNotEqual("tableAlignment",e,t,i,8)||this.isNotEqual("preferredWidth",e,t,i,8)||this.isNotEqual("preferredWidthType",e,t,i,8)||this.isNotEqual("bidi",e,t,i,8)||this.isNotEqual("allowAutoFit",e,t,i,8)||this.isNotEqual("horizontalPositionAbs",e,t,i,8)||this.isNotEqual("horizontalPosition",e,t,i,8))},v.prototype.isListLevelEqual=function(e,t,i){return!this.isNotEqual("listLevelPattern",e,t,i,9)&&!(this.isNotEqual("startAt",e,t,i,9)||this.isNotEqual("followCharacter",e,t,i,9)||this.isNotEqual("numberFormat",e,t,i,9)||this.isNotEqual("paraStyleName",e,t,i,9)||this.isNotEqual("restartLevel",e,t,i,9)||this.isNotEqual("isLegalStyleNumbering",e,t,i,9)||this.isNotEqual("numberAlignment",e,t,i,9))},v.prototype.isSectionFormatEqual=function(e,t,i){return!this.isNotEqual("headerDistance",e,t,i,10)&&!(this.isNotEqual("footerDistance",e,t,i,10)||this.isNotEqual("differentFirstPage",e,t,i,10)||this.isNotEqual("differentOddAndEvenPages",e,t,i,10)||this.isNotEqual("pageWidth",e,t,i,10)||this.isNotEqual("pageHeight",e,t,i,10)||this.isNotEqual("leftMargin",e,t,i,10)||this.isNotEqual("topMargin",e,t,i,10)||this.isNotEqual("rightMargin",e,t,i,10)||this.isNotEqual("bottomMargin",e,t,i,10)||this.isNotEqual("bidi",e,t,i,10)||this.isNotEqual("restartPageNumbering",e,t,i,10)||this.isNotEqual("pageStartingNumber",e,t,i,10)||this.isNotEqual("endnoteNumberFormat",e,t,i,10)||this.isNotEqual("endnotePosition",e,t,i,10)||this.isNotEqual("footNoteNumberFormat",e,t,i,10)||this.isNotEqual("footnotePosition",e,t,i,10)||this.isNotEqual("restartIndexForEndnotes",e,t,i,10)||this.isNotEqual("restartIndexForFootnotes",e,t,i,10)||this.isNotEqual("initialFootNoteNumber",e,t,i,10)||this.isNotEqual("initialEndNoteNumber",e,t,i,10)||this.isNotEqual("pageNumberStyle",e,t,i,10)||this.isNotEqual("numberOfColumns",e,t,i,10)||this.isNotEqual("equalWidth",e,t,i,10)||this.isNotEqual("lineBetweenColumns",e,t,i,10)||this.isNotEqual("breakCode",e,t,i,10))},v.prototype.isColumnFormatEqual=function(e,t,i){return!this.isNotEqual("width",e,t,i,11)&&!this.isNotEqual("space",e,t,i,11)},v.prototype.cloneItems=function(e,t,i,r){for(var n=v.getPropertyType(r,t),o=e.propertiesHash.keys,a=0;a<o.length;a++)o[a]===n?this.propertiesHash.add(n,i):this.propertiesHash.add(o[a],e.propertiesHash.get(o[a]));e.propertiesHash.containsKey(n)||this.propertiesHash.add(n,i)},v.prototype.mergeProperties=function(e){for(var t=e.cloneProperties(),i=this.propertiesHash.keys,r=0;r<i.length;r++)t.containsKey(i[r])||t.add(i[r],this.propertiesHash.get(i[r]));return t},v.prototype.cloneProperties=function(){for(var e=new N,t=this.propertiesHash.keys,i=0;i<t.length;i++)e.add(t[i],this.propertiesHash.get(t[i]));return e},v.prototype.destroy=function(){G.isNullOrUndefined(this.propertiesHash)||this.propertiesHash.destroy(),this.propertiesHash=void 0,this.referenceCount=void 0,this.uniqueFormatType=void 0};var l=v;function v(e){this.referenceCount=0,this.uniqueFormatType=e,this.propertiesHash=new N}b.prototype.addUniqueFormat=function(e,t){for(var i=void 0,r=0;r<this.items.length;r++)if(this.items[r].isEqual(e,void 0,void 0)){i=this.items[r];break}return G.isNullOrUndefined(i)?((i=new l(t)).propertiesHash=e,i.referenceCount=1,this.items.push(i)):i.referenceCount++,i},b.prototype.updateUniqueFormat=function(e,t,i){for(var r=void 0,n=0;n<this.items.length;n++)if(this.items[n].isEqual(e.propertiesHash,t,i)){r=this.items[n];break}return G.isNullOrUndefined(r)?((r=new l(e.uniqueFormatType)).cloneItems(e,t,i,e.uniqueFormatType),r.referenceCount=1,this.items.push(r)):r.referenceCount++,this.remove(e),r},b.prototype.remove=function(e){e.referenceCount--,e.referenceCount<=0&&(this.items.splice(this.items.indexOf(e),1),e.destroy())},b.prototype.clear=function(){if(G.isNullOrUndefined(this.items))for(var e=0;e<this.items.length;e++)this.items[e].destroy();this.items=[]},b.prototype.destroy=function(){this.clear(),this.items=void 0};var W=b;function b(){this.items=[]}Object.defineProperty(w.prototype,"color",{get:function(){return this.getPropertyValue("color")},set:function(e){this.setPropertyValue("color",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"lineStyle",{get:function(){return this.getPropertyValue("lineStyle")},set:function(e){this.setPropertyValue("lineStyle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"lineWidth",{get:function(){return this.getPropertyValue("lineWidth")},set:function(e){this.setPropertyValue("lineWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"shadow",{get:function(){return this.getPropertyValue("shadow")},set:function(e){this.setPropertyValue("shadow",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"space",{get:function(){return this.getPropertyValue("space")},set:function(e){this.setPropertyValue("space",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"hasNoneStyle",{get:function(){return this.getPropertyValue("hasNoneStyle")},set:function(e){this.setPropertyValue("hasNoneStyle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"isBorderDefined",{get:function(){return"None"!==this.lineStyle||this.hasNoneStyle&&this.hasValue("hasNoneStyle")},enumerable:!0,configurable:!0}),w.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(w.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueBorderFormat)){t=this.uniqueBorderFormat.propertiesHash.get(t);if(!G.isNullOrUndefined(t))return t}}return w.getPropertyDefaultValue(e)},w.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=w.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueBorderFormat)?this.initializeUniqueBorder(e,t):(i=l.getPropertyType(this.uniqueBorderFormat.uniqueFormatType,e),this.uniqueBorderFormat.propertiesHash.containsKey(i)&&this.uniqueBorderFormat.propertiesHash.get(i)===t||(this.uniqueBorderFormat=w.uniqueBorderFormats.updateUniqueFormat(this.uniqueBorderFormat,e,t)))},w.prototype.initializeUniqueBorder=function(e,t){var i=new N;this.addUniqueBorderFormat("color",e,t,i),this.addUniqueBorderFormat("lineStyle",e,t,i),this.addUniqueBorderFormat("lineWidth",e,t,i),this.addUniqueBorderFormat("shadow",e,t,i),this.addUniqueBorderFormat("space",e,t,i),this.addUniqueBorderFormat("hasNoneStyle",e,t,i),this.uniqueBorderFormat=w.uniqueBorderFormats.addUniqueFormat(i,w.uniqueFormatType)},w.prototype.addUniqueBorderFormat=function(e,t,i,r){var n=l.getPropertyType(w.uniqueFormatType,e);e===t&&r.add(n,i)},w.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"color":t="#000000";break;case"lineStyle":t="None";break;case"lineWidth":t=0;break;case"shadow":t=!1;break;case"space":t=0;break;case"hasNoneStyle":t=!1}return t},w.prototype.getLineWidth=function(){switch(this.lineStyle){case"None":case"Cleared":return 0;case"Triple":case"Double":case"ThinThickSmallGap":case"ThickThinSmallGap":case"ThinThickThinSmallGap":case"ThinThickMediumGap":case"ThickThinMediumGap":case"ThinThickThinMediumGap":case"ThinThickLargeGap":case"ThickThinLargeGap":case"ThinThickThinLargeGap":case"Emboss3D":case"Engrave3D":for(var e=this.getBorderLineWidthArray(this.lineStyle,this.lineWidth),t=0,i=0;i<e.length;i++)t+=e[i];return t;case"Single":case"DashLargeGap":case"DashSmallGap":case"Dot":case"DashDot":case"DashDotDot":case"Thick":return.5<=this.lineWidth?this.lineWidth:.5;case"SingleWavy":return 1.5===this.lineWidth?3:2.5;case"DoubleWavy":return 6.75;case"DashDotStroked":case"Outset":return.5<=this.lineWidth?this.lineWidth:.5}return.5<=this.lineWidth?this.lineWidth:.5},w.prototype.getBorderLineWidthArray=function(e,t){var i=[t];switch(e){case"Double":i=[1,1,1];break;case"ThinThickSmallGap":i=[1,-.75,-.75];break;case"ThickThinSmallGap":i=[-.75,-.75,1];break;case"ThinThickMediumGap":i=[1,.5,.5];break;case"ThickThinMediumGap":i=[.5,.5,1];break;case"ThinThickLargeGap":i=[-1.5,1,-.75];break;case"ThickThinLargeGap":i=[-.75,1,-1.5];break;case"Triple":i=[1,1,1,1,1];break;case"ThinThickThinSmallGap":i=[-.75,-.75,1,-.75,-.75];break;case"ThinThickThinMediumGap":i=[.5,.5,1,.5,.5];break;case"ThinThickThinLargeGap":i=[-.75,1,-1.5,1,-.75];break;case"Emboss3D":case"Engrave3D":i=[.25,0,1,0,.25]}if(1===i.length)return[t];for(var r=0;r<i.length;r++)0<=i[parseInt(r.toString(),10)]?i[parseInt(r.toString(),10)]=i[parseInt(r.toString(),10)]*t:i[parseInt(r.toString(),10)]=Math.abs(i[parseInt(r.toString(),10)]);return i},w.prototype.getBorderWeight=function(){var e=0,t=this.getBorderNumber();switch(this.lineStyle){case"Single":case"DashSmallGap":case"DashDot":case"DashDotDot":case"Double":case"Triple":case"ThinThickSmallGap":case"ThickThinSmallGap":case"ThinThickThinSmallGap":case"ThinThickMediumGap":case"ThickThinMediumGap":case"ThinThickThinMediumGap":case"ThinThickLargeGap":case"ThickThinLargeGap":case"ThinThickThinLargeGap":case"SingleWavy":case"DoubleWavy":case"DashDotStroked":case"Emboss3D":case"Engrave3D":case"Outset":case"Inset":case"Thick":e=this.lineWidth*t;break;case"Dot":case"DashLargeGap":e=1}return e},w.prototype.getBorderNumber=function(){var e=0;switch(this.lineStyle){case"Single":e=1;break;case"Thick":e=2;break;case"Double":e=3;break;case"Dot":e=4;break;case"DashLargeGap":e=5;break;case"DashDot":e=6;break;case"DashDotDot":e=7;break;case"Triple":e=8;break;case"ThinThickSmallGap":e=9;break;case"ThickThinSmallGap":e=10;break;case"ThinThickThinSmallGap":e=11;break;case"ThinThickMediumGap":e=12;break;case"ThickThinMediumGap":e=13;break;case"ThinThickThinMediumGap":e=14;break;case"ThinThickLargeGap":e=15;break;case"ThickThinLargeGap":e=16;break;case"ThinThickThinLargeGap":e=17;break;case"SingleWavy":e=18;break;case"DoubleWavy":e=19;break;case"DashSmallGap":e=20;break;case"DashDotStroked":e=21;break;case"Emboss3D":e=22;break;case"Engrave3D":e=23;break;case"Outset":e=24;break;case"Inset":e=25}return e},w.prototype.getNumberOfLines=function(){var e=0;switch(this.lineStyle){case"Single":case"Dot":case"DashSmallGap":case"DashLargeGap":case"DashDot":case"DashDotDot":e=1;break;case"Double":e=3;break;case"Triple":e=5;break;case"ThinThickSmallGap":case"ThickThinSmallGap":e=3;break;case"ThinThickThinSmallGap":e=5;break;case"ThinThickMediumGap":case"ThickThinMediumGap":e=3;break;case"ThinThickThinMediumGap":e=5;break;case"ThinThickLargeGap":case"ThickThinLargeGap":e=3;break;case"ThinThickThinLargeGap":e=5;break;case"SingleWavy":e=1;break;case"DoubleWavy":e=2;break;case"DashDotStroked":e=1;break;case"Emboss3D":case"Engrave3D":e=3;break;case"Outset":case"Inset":case"Thick":e=1}return e},w.prototype.getPrecedence=function(){var e=0;switch(this.lineStyle){case"Single":e=1;break;case"Thick":e=2;break;case"Double":e=3;break;case"Dot":e=4;break;case"DashLargeGap":e=5;break;case"DashDot":e=6;break;case"DashDotDot":e=7;break;case"Triple":e=8;break;case"ThinThickSmallGap":e=9;break;case"ThickThinSmallGap":e=10;break;case"ThinThickThinSmallGap":e=11;break;case"ThinThickMediumGap":e=12;break;case"ThickThinMediumGap":e=13;break;case"ThinThickThinMediumGap":e=14;break;case"ThinThickLargeGap":e=15;break;case"ThickThinLargeGap":e=16;break;case"ThinThickThinLargeGap":e=17;break;case"SingleWavy":e=18;break;case"DoubleWavy":e=19;break;case"DashSmallGap":e=20;break;case"DashDotStroked":e=21;break;case"Emboss3D":e=22;break;case"Engrave3D":e=23;break;case"Outset":e=24;break;case"Inset":e=25}return e},w.prototype.hasValues=function(){return this.hasValue("color")||this.hasValue("lineStyle")||this.hasValue("lineWidth")||this.hasValue("shadow")||this.hasValue("space")||this.hasValue("hasNoneStyle")},w.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueBorderFormat)&&(e=l.getPropertyType(this.uniqueBorderFormat.uniqueFormatType,e),this.uniqueBorderFormat.propertiesHash.containsKey(e))},w.prototype.cloneFormat=function(){var e=new w(void 0);return e.color=this.color,e.lineStyle=this.lineStyle,e.lineWidth=this.lineWidth,e.shadow=this.shadow,e.space=this.space,e},w.prototype.clearFormat=function(){G.isNullOrUndefined(this.uniqueBorderFormat)||w.uniqueBorderFormats.remove(this.uniqueBorderFormat),this.uniqueBorderFormat=void 0},w.prototype.destroy=function(){this.clearFormat(),this.ownerBase=void 0},w.prototype.isEqualFormat=function(e){var t=!1;return t=this.color===e.color&&this.lineStyle===e.lineStyle&&this.lineWidth===e.lineWidth&&this.shadow===e.shadow&&this.space===e.space?!0:t},w.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||G.isNullOrUndefined(e.uniqueBorderFormat)||(e.hasValue("color")&&(this.color=e.color),e.hasValue("lineStyle")&&(this.lineStyle=e.lineStyle),e.hasValue("lineWidth")&&(this.lineWidth=e.lineWidth),e.hasValue("shadow")&&(this.shadow=e.shadow),e.hasValue("space")&&(this.space=e.space),e.hasValue("hasNoneStyle")&&(this.hasNoneStyle=e.hasNoneStyle))},w.clear=function(){this.uniqueBorderFormats.clear()},w.uniqueBorderFormats=new W,w.uniqueFormatType=1;var x=w;function w(e){this.uniqueBorderFormat=void 0,this.ownerBase=void 0,this.ownerBase=e}Object.defineProperty(o.prototype,"headerDistance",{get:function(){return this.getPropertyValue("headerDistance")},set:function(e){this.setPropertyValue("headerDistance",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"footerDistance",{get:function(){return this.getPropertyValue("footerDistance")},set:function(e){this.setPropertyValue("footerDistance",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"differentFirstPage",{get:function(){return this.getPropertyValue("differentFirstPage")},set:function(e){this.setPropertyValue("differentFirstPage",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"differentOddAndEvenPages",{get:function(){return this.getPropertyValue("differentOddAndEvenPages")},set:function(e){this.setPropertyValue("differentOddAndEvenPages",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pageHeight",{get:function(){return this.getPropertyValue("pageHeight")},set:function(e){this.setPropertyValue("pageHeight",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rightMargin",{get:function(){return this.getPropertyValue("rightMargin")},set:function(e){this.setPropertyValue("rightMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pageWidth",{get:function(){return this.getPropertyValue("pageWidth")},set:function(e){this.setPropertyValue("pageWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"leftMargin",{get:function(){return this.getPropertyValue("leftMargin")},set:function(e){this.setPropertyValue("leftMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"bottomMargin",{get:function(){return this.getPropertyValue("bottomMargin")},set:function(e){this.setPropertyValue("bottomMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"topMargin",{get:function(){return this.getPropertyValue("topMargin")},set:function(e){this.setPropertyValue("topMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"bidi",{get:function(){return this.getPropertyValue("bidi")},set:function(e){this.setPropertyValue("bidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"restartPageNumbering",{get:function(){return this.getPropertyValue("restartPageNumbering")},set:function(e){this.setPropertyValue("restartPageNumbering",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pageStartingNumber",{get:function(){return this.getPropertyValue("pageStartingNumber")},set:function(e){this.setPropertyValue("pageStartingNumber",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"endnoteNumberFormat",{get:function(){return this.getPropertyValue("endnoteNumberFormat")},set:function(e){this.setPropertyValue("endnoteNumberFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"restartIndexForEndnotes",{get:function(){return this.getPropertyValue("restartIndexForEndnotes")},set:function(e){this.setPropertyValue("restartIndexForEndnotes",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"restartIndexForFootnotes",{get:function(){return this.getPropertyValue("restartIndexForFootnotes")},set:function(e){this.setPropertyValue("restartIndexForFootnotes",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"footNoteNumberFormat",{get:function(){return this.getPropertyValue("footNoteNumberFormat")},set:function(e){this.setPropertyValue("footNoteNumberFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"initialFootNoteNumber",{get:function(){return this.getPropertyValue("initialFootNoteNumber")},set:function(e){this.setPropertyValue("initialFootNoteNumber",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"initialEndNoteNumber",{get:function(){return this.getPropertyValue("initialEndNoteNumber")},set:function(e){this.setPropertyValue("initialEndNoteNumber",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pageNumberStyle",{get:function(){return this.getPropertyValue("pageNumberStyle")},set:function(e){this.setPropertyValue("pageNumberStyle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"numberOfColumns",{get:function(){return this.getPropertyValue("numberOfColumns")},set:function(e){this.setPropertyValue("numberOfColumns",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"equalWidth",{get:function(){return this.getPropertyValue("equalWidth")},set:function(e){this.setPropertyValue("equalWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"lineBetweenColumns",{get:function(){return this.getPropertyValue("lineBetweenColumns")},set:function(e){this.setPropertyValue("lineBetweenColumns",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"breakCode",{get:function(){return this.getPropertyValue("breakCode")},set:function(e){this.setPropertyValue("breakCode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"firstPageHeader",{get:function(){return this.getPropertyValue("firstPageHeader")},set:function(e){this.setPropertyValue("firstPageHeader",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"firstPageFooter",{get:function(){return this.getPropertyValue("firstPageFooter")},set:function(e){this.setPropertyValue("firstPageFooter",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"oddPageHeader",{get:function(){return this.getPropertyValue("oddPageHeader")},set:function(e){this.setPropertyValue("oddPageHeader",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"oddPageFooter",{get:function(){return this.getPropertyValue("oddPageFooter")},set:function(e){this.setPropertyValue("oddPageFooter",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"evenPageHeader",{get:function(){return this.getPropertyValue("evenPageHeader")},set:function(e){this.setPropertyValue("evenPageHeader",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"evenPageFooter",{get:function(){return this.getPropertyValue("evenPageFooter")},set:function(e){this.setPropertyValue("evenPageFooter",e)},enumerable:!0,configurable:!0}),o.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueSectionFormat)||o.uniqueSectionFormats.remove(this.uniqueSectionFormat),this.uniqueSectionFormat=void 0,this.ownerBase=void 0,this.columns=void 0,this.removedHeaderFooters=void 0},o.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueSectionFormat)&&(e=l.getPropertyType(this.uniqueSectionFormat.uniqueFormatType,e),this.uniqueSectionFormat.propertiesHash.containsKey(e))},o.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"headerDistance":case"footerDistance":t=36;break;case"differentFirstPage":case"differentOddAndEvenPages":t=!1;break;case"pageWidth":t=612;break;case"pageHeight":t=792;break;case"leftMargin":case"topMargin":case"rightMargin":case"bottomMargin":t=72;break;case"bidi":case"restartPageNumbering":t=!1;break;case"pageStartingNumber":t=1;break;case"footnotePosition":t="PrintAtBottomOfPage";break;case"endnoteNumberFormat":t="LowerCaseRoman";break;case"endnotePosition":t="DisplayEndOfDocument";break;case"restartIndexForEndnotes":case"restartIndexForFootnotes":t="DoNotRestart";break;case"footNoteNumberFormat":t="Arabic";break;case"initialFootNoteNumber":case"initialEndNoteNumber":t=1;break;case"pageNumberStyle":t="Arabic";break;case"numberOfColumns":t=1;break;case"equalWidth":t=!0;break;case"lineBetweenColumns":t=!1;break;case"breakCode":t="NewPage";break;case"firstPageHeader":case"firstPageFooter":case"oddPageHeader":case"oddPageFooter":case"evenPageHeader":case"evenPageFooter":t=void 0}return t},o.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(o.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueSectionFormat)&&this.uniqueSectionFormat.propertiesHash.containsKey(t))return this.uniqueSectionFormat.propertiesHash.get(t)}return o.getPropertyDefaultValue(e)},o.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=o.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueSectionFormat)?this.initializeUniqueSectionFormat(e,t):(i=l.getPropertyType(this.uniqueSectionFormat.uniqueFormatType,e),this.uniqueSectionFormat.propertiesHash.containsKey(i)&&this.uniqueSectionFormat.propertiesHash.get(i)===t||(this.uniqueSectionFormat=o.uniqueSectionFormats.updateUniqueFormat(this.uniqueSectionFormat,e,t)))},o.prototype.initializeUniqueSectionFormat=function(e,t){var i=new N;this.addUniqueSectionFormat("headerDistance",e,t,i),this.addUniqueSectionFormat("footerDistance",e,t,i),this.addUniqueSectionFormat("differentFirstPage",e,t,i),this.addUniqueSectionFormat("differentOddAndEvenPages",e,t,i),this.addUniqueSectionFormat("pageWidth",e,t,i),this.addUniqueSectionFormat("pageHeight",e,t,i),this.addUniqueSectionFormat("leftMargin",e,t,i),this.addUniqueSectionFormat("topMargin",e,t,i),this.addUniqueSectionFormat("rightMargin",e,t,i),this.addUniqueSectionFormat("bottomMargin",e,t,i),this.addUniqueSectionFormat("bidi",e,t,i),this.addUniqueSectionFormat("restartPageNumbering",e,t,i),this.addUniqueSectionFormat("pageStartingNumber",e,t,i),this.addUniqueSectionFormat("endnoteNumberFormat",e,t,i),this.addUniqueSectionFormat("endnotePosition",e,t,i),this.addUniqueSectionFormat("footNoteNumberFormat",e,t,i),this.addUniqueSectionFormat("footnotePosition",e,t,i),this.addUniqueSectionFormat("restartIndexForEndnotes",e,t,i),this.addUniqueSectionFormat("restartIndexForFootnotes",e,t,i),this.addUniqueSectionFormat("initialFootNoteNumber",e,t,i),this.addUniqueSectionFormat("initialEndNoteNumber",e,t,i),this.addUniqueSectionFormat("pageNumberStyle",e,t,i),this.addUniqueSectionFormat("numberOfColumns",e,t,i),this.addUniqueSectionFormat("equalWidth",e,t,i),this.addUniqueSectionFormat("lineBetweenColumns",e,t,i),this.addUniqueSectionFormat("breakCode",e,t,i),this.uniqueSectionFormat=o.uniqueSectionFormats.addUniqueFormat(i,o.uniqueFormatType)},o.prototype.addUniqueSectionFormat=function(e,t,i,r){var n=l.getPropertyType(o.uniqueFormatType,e);e===t?r.add(n,i):r.add(n,o.getPropertyDefaultValue(e))},o.prototype.copyFormat=function(e,t){t&&(t.isUndoing||t.isRedoing)?(this.uniqueSectionFormat=e.uniqueSectionFormat,this.columns=e.columns,this.removedHeaderFooters=e.removedHeaderFooters):G.isNullOrUndefined(e)||(this.removedHeaderFooters=e.removedHeaderFooters,!G.isNullOrUndefined(e.uniqueSectionFormat)&&e.uniqueSectionFormat.propertiesHash&&(this.updateUniqueSectionFormat(e),this.columns=e.columns))},o.prototype.updateUniqueSectionFormat=function(e){var t=void 0;this.uniqueSectionFormat&&(t=this.uniqueSectionFormat.mergeProperties(e.uniqueSectionFormat),0===this.uniqueSectionFormat.referenceCount)&&(o.uniqueSectionFormats.remove(this.uniqueSectionFormat),this.uniqueSectionFormat=void 0),this.uniqueSectionFormat=new l(o.uniqueFormatType),G.isNullOrUndefined(t)&&(t=this.uniqueSectionFormat.mergeProperties(e.uniqueSectionFormat)),this.uniqueSectionFormat=o.uniqueSectionFormats.addUniqueFormat(t,o.uniqueFormatType)},o.prototype.cloneFormat=function(){var e=new o;return e.uniqueSectionFormat=this.uniqueSectionFormat,e.columns=this.columns,e},o.clear=function(){this.uniqueSectionFormats.clear()},o.uniqueSectionFormats=new W,o.uniqueFormatType=10;var C=o;function o(e){this.uniqueSectionFormat=void 0,this.columns=[],this.ownerBase=e,this.columns=[],this.removedHeaderFooters=[]}O.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueColumnFormat)||O.uniqueColumnFormats.remove(this.uniqueColumnFormat),this.uniqueColumnFormat=void 0,this.ownerBase=void 0},O.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueColumnFormat)&&(e=l.getPropertyType(this.uniqueColumnFormat.uniqueFormatType,e),this.uniqueColumnFormat.propertiesHash.containsKey(e))},Object.defineProperty(O.prototype,"index",{get:function(){return this.indexIn},set:function(e){this.indexIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"width",{get:function(){return this.getPropertyValue("width")},set:function(e){this.setPropertyValue("width",e)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"space",{get:function(){return this.getPropertyValue("space")},set:function(e){this.setPropertyValue("space",e)},enumerable:!0,configurable:!0}),O.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(O.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueColumnFormat)&&this.uniqueColumnFormat.propertiesHash.containsKey(t))return this.uniqueColumnFormat.propertiesHash.get(t)}return O.getPropertyDefaultValue(e)},O.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"width":t=36;break;case"space":t=0}return t},O.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=O.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueColumnFormat)?this.initializeUniqueColumnFormat(e,t):(i=l.getPropertyType(this.uniqueColumnFormat.uniqueFormatType,e),this.uniqueColumnFormat.propertiesHash.containsKey(i)&&this.uniqueColumnFormat.propertiesHash.get(i)===t||(this.uniqueColumnFormat=O.uniqueColumnFormats.updateUniqueFormat(this.uniqueColumnFormat,e,t)))},O.prototype.initializeUniqueColumnFormat=function(e,t){var i=new N;this.addUniqueColumnFormat("width",e,t,i),this.addUniqueColumnFormat("space",e,t,i),this.uniqueColumnFormat=O.uniqueColumnFormats.addUniqueFormat(i,O.uniqueFormatType)},O.prototype.addUniqueColumnFormat=function(e,t,i,r){var n=l.getPropertyType(O.uniqueFormatType,e);e===t?r.add(n,i):r.add(n,O.getPropertyDefaultValue(e))},O.prototype.updateUniqueColumnFormat=function(e){var t=void 0;this.uniqueColumnFormat&&(t=this.uniqueColumnFormat.mergeProperties(e.uniqueColumnFormat),0===this.uniqueColumnFormat.referenceCount)&&(O.uniqueColumnFormats.remove(this.uniqueColumnFormat),this.uniqueColumnFormat=void 0),this.uniqueColumnFormat=new l(O.uniqueFormatType),G.isNullOrUndefined(t)&&(t=this.uniqueColumnFormat.mergeProperties(e.uniqueColumnFormat)),this.uniqueColumnFormat=O.uniqueColumnFormats.addUniqueFormat(t,O.uniqueFormatType)},O.prototype.cloneFormat=function(){var e=new O(void 0);return e.width=this.width,e.space=this.space,e},O.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||G.isNullOrUndefined(e.uniqueColumnFormat)||(this.width=e.width,this.space=e.space)},O.clear=function(){this.uniqueColumnFormats.clear()},O.uniqueColumnFormats=new W,O.uniqueFormatType=11;var T=O;function O(e){this.uniqueColumnFormat=void 0,this.ownerBase=e}Object.defineProperty(a.prototype,"gridBefore",{get:function(){return this.getPropertyValue("gridBefore")},set:function(e){this.setPropertyValue("gridBefore",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridBeforeWidth",{get:function(){return this.getPropertyValue("gridBeforeWidth")},set:function(e){this.setPropertyValue("gridBeforeWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridBeforeWidthType",{get:function(){return this.getPropertyValue("gridBeforeWidthType")},set:function(e){this.setPropertyValue("gridBeforeWidthType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridAfter",{get:function(){return this.getPropertyValue("gridAfter")},set:function(e){this.setPropertyValue("gridAfter",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridAfterWidth",{get:function(){return this.getPropertyValue("gridAfterWidth")},set:function(e){this.setPropertyValue("gridAfterWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"gridAfterWidthType",{get:function(){return this.getPropertyValue("gridAfterWidthType")},set:function(e){this.setPropertyValue("gridAfterWidthType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"allowBreakAcrossPages",{get:function(){return this.getPropertyValue("allowBreakAcrossPages")},set:function(e){this.setPropertyValue("allowBreakAcrossPages",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"isHeader",{get:function(){return this.getPropertyValue("isHeader")},set:function(e){this.setPropertyValue("isHeader",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"rightMargin",{get:function(){return this.getPropertyValue("rightMargin")},set:function(e){this.setPropertyValue("rightMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"height",{get:function(){return this.getPropertyValue("height")},set:function(e){0!==e||"AtLeast"!==this.heightType&&"Exactly"!==this.heightType?"Auto"===this.heightType&&(e=0):e=1,this.setPropertyValue("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"heightType",{get:function(){return this.getPropertyValue("heightType")},set:function(e){this.height="AtLeast"===e||"Exactly"===e?1:0,this.setPropertyValue("heightType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"bottomMargin",{get:function(){return this.getPropertyValue("bottomMargin")},set:function(e){this.setPropertyValue("bottomMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"leftIndent",{get:function(){return this.getPropertyValue("leftIndent")},set:function(e){this.setPropertyValue("leftIndent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"topMargin",{get:function(){return this.getPropertyValue("topMargin")},set:function(e){this.setPropertyValue("topMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"leftMargin",{get:function(){return this.getPropertyValue("leftMargin")},set:function(e){this.setPropertyValue("leftMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"verticallyMergedCellsLeftMargin",{get:function(){return this.getPropertyValue("verticallyMergedCellsLeftMargin")},set:function(e){this.setPropertyValue("verticallyMergedCellsLeftMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"verticallyMergedCellsRightMargin",{get:function(){return this.getPropertyValue("verticallyMergedCellsRightMargin")},set:function(e){this.setPropertyValue("verticallyMergedCellsRightMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"verticallyMergedCellsTopMargin",{get:function(){return this.getPropertyValue("verticallyMergedCellsTopMargin")},set:function(e){this.setPropertyValue("verticallyMergedCellsTopMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"verticallyMergedCellsBottomMargin",{get:function(){return this.getPropertyValue("verticallyMergedCellsBottomMargin")},set:function(e){this.setPropertyValue("verticallyMergedCellsBottomMargin",e)},enumerable:!0,configurable:!0}),a.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(a.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueRowFormat)&&this.uniqueRowFormat.propertiesHash.containsKey(t))return this.uniqueRowFormat.propertiesHash.get(t)}return a.getPropertyDefaultValue(e)},a.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=a.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueRowFormat)?this.initializeUniqueRowFormat(e,t):(i=l.getPropertyType(this.uniqueRowFormat.uniqueFormatType,e),this.uniqueRowFormat.propertiesHash.containsKey(i)&&this.uniqueRowFormat.propertiesHash.get(i)===t||(this.uniqueRowFormat=a.uniqueRowFormats.updateUniqueFormat(this.uniqueRowFormat,e,t)))},a.prototype.initializeUniqueRowFormat=function(e,t){var i=new N;this.addUniqueRowFormat("allowBreakAcrossPages",e,t,i),this.addUniqueRowFormat("isHeader",e,t,i),this.addUniqueRowFormat("height",e,t,i),this.addUniqueRowFormat("heightType",e,t,i),this.addUniqueRowFormat("gridBefore",e,t,i),this.addUniqueRowFormat("gridBeforeWidth",e,t,i),this.addUniqueRowFormat("gridBeforeWidthType",e,t,i),this.addUniqueRowFormat("gridAfter",e,t,i),this.addUniqueRowFormat("gridAfterWidth",e,t,i),this.addUniqueRowFormat("gridgridAfterWidth",e,t,i),this.addUniqueRowFormat("gridBeforeWidthType",e,t,i),this.addUniqueRowFormat("leftMargin",e,t,i),this.addUniqueRowFormat("rightMargin",e,t,i),this.addUniqueRowFormat("topMargin",e,t,i),this.addUniqueRowFormat("bottomMargin",e,t,i),this.addUniqueRowFormat("leftIndent",e,t,i),this.addUniqueRowFormat("verticallyMergedCellsLeftMargin",e,t,i),this.addUniqueRowFormat("verticallyMergedCellsRightMargin",e,t,i),this.addUniqueRowFormat("verticallyMergedCellsTopMargin",e,t,i),this.addUniqueRowFormat("verticallyMergedCellsBottomMargin",e,t,i),this.uniqueRowFormat=a.uniqueRowFormats.addUniqueFormat(i,a.uniqueFormatType)},a.prototype.addUniqueRowFormat=function(e,t,i,r){var n=l.getPropertyType(a.uniqueFormatType,e);e===t&&r.add(n,i)},a.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"allowBreakAcrossPages":t=!0;break;case"isHeader":t=!1;break;case"height":t=0;break;case"heightType":t="Auto";break;case"gridBefore":case"gridBeforeWidth":t=0;break;case"gridBeforeWidthType":t="Point";break;case"gridAfter":case"gridAfterWidth":t=0;break;case"gridAfterWidthType":t="Point";break;case"leftMargin":case"topMargin":case"bottomMargin":case"rightMargin":t=void 0;break;case"leftIndent":t=0;break;case"verticallyMergedCellsLeftMargin":case"verticallyMergedCellsRightMargin":case"verticallyMergedCellsTopMargin":case"verticallyMergedCellsBottomMargin":t=void 0}return t},a.prototype.containsMargins=function(){return!(G.isNullOrUndefined(this.leftMargin)&&G.isNullOrUndefined(this.rightMargin)&&G.isNullOrUndefined(this.bottomMargin)&&G.isNullOrUndefined(this.topMargin))},a.prototype.cloneFormat=function(){var e=new a;return e.allowBreakAcrossPages=this.allowBreakAcrossPages,e.heightType=this.heightType,e.height=this.height,e.isHeader=this.isHeader,e.gridBefore=this.gridBefore,e.gridBeforeWidth=this.gridBeforeWidth,e.gridBeforeWidthType=this.gridBeforeWidthType,e.gridAfter=this.gridAfter,e.gridAfterWidth=this.gridAfterWidth,e.gridAfterWidthType=this.gridAfterWidthType,e.leftMargin=this.leftMargin,e.rightMargin=this.rightMargin,e.topMargin=this.topMargin,e.bottomMargin=this.bottomMargin,e.leftIndent=this.leftIndent,e.verticallyMergedCellsLeftMargin=this.verticallyMergedCellsLeftMargin,e.verticallyMergedCellsRightMargin=this.verticallyMergedCellsRightMargin,e.verticallyMergedCellsTopMargin=this.verticallyMergedCellsTopMargin,e.verticallyMergedCellsBottomMargin=this.verticallyMergedCellsBottomMargin,0<this.revisions.length?e.removedIds=H.cloneRevisions(this.revisions):e.removedIds=this.removedIds.slice(),e},a.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueRowFormat)&&(e=l.getPropertyType(this.uniqueRowFormat.uniqueFormatType,e),this.uniqueRowFormat.propertiesHash.containsKey(e))},a.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e.uniqueRowFormat)||(this.allowBreakAcrossPages=e.allowBreakAcrossPages,this.isHeader=e.isHeader,this.heightType=e.heightType,this.height=e.height,this.gridBefore=e.gridBefore,this.gridBeforeWidth=e.gridBeforeWidth,this.gridBeforeWidthType=e.gridBeforeWidthType,this.gridAfter=e.gridAfter,this.gridAfterWidth=e.gridAfterWidth,this.gridAfterWidthType=e.gridAfterWidthType,this.leftMargin=e.leftMargin,this.topMargin=e.topMargin,this.rightMargin=e.rightMargin,this.bottomMargin=e.bottomMargin,this.leftIndent=e.leftIndent,this.verticallyMergedCellsLeftMargin=e.verticallyMergedCellsLeftMargin,this.verticallyMergedCellsRightMargin=e.verticallyMergedCellsRightMargin,this.verticallyMergedCellsTopMargin=e.verticallyMergedCellsTopMargin,this.verticallyMergedCellsBottomMargin=e.verticallyMergedCellsBottomMargin,this.revisions=e.revisions),G.isNullOrUndefined(e.borders)||(this.borders=new Wl(this),this.borders.ownerBase=e,this.borders.copyFormat(e.borders)),0<e.revisions.length?this.removedIds=H.cloneRevisions(e.revisions):this.removedIds=e.removedIds.slice())},a.prototype.destroy=function(){G.isNullOrUndefined(this.borders)||this.borders.destroy(),G.isNullOrUndefined(this.uniqueRowFormat)||a.uniqueRowFormats.remove(this.uniqueRowFormat),this.beforeWidth=void 0,this.afterWidth=void 0,this.borders=void 0,this.uniqueRowFormat=void 0},a.clear=function(){this.uniqueRowFormats.clear()},Object.defineProperty(a.prototype,"revisionLength",{get:function(){return G.isNullOrUndefined(this.revisions)?0:this.revisions.length},enumerable:!0,configurable:!0}),a.prototype.getRevision=function(e){if(!G.isNullOrUndefined(this.revisions))return this.revisions[e]},a.prototype.addRevision=function(e){-1===this.revisions.indexOf(e)&&this.revisions.push(e),e.hasChanges=!0},a.prototype.insertRevisionAt=function(e,t){this.revisions.splice(e,0,t),t.hasChanges=!0},a.prototype.removeRevision=function(e){this.revisions.splice(e,1)[0].hasChanges=!0},a.prototype.getAllRevision=function(){return this.revisions},a.prototype.getRevisionRange=function(e){var t=[];return-1!==this.revisions.indexOf(e)&&t.push(this),t},a.uniqueRowFormats=new W,a.uniqueFormatType=6;var S=a;function a(e){this.uniqueRowFormat=void 0,this.borders=new Wl(this),this.ownerBase=void 0,this.beforeWidth=0,this.afterWidth=0,this.revisions=[],this.removedIds=[],this.ownerBase=e}Object.defineProperty(k.prototype,"backgroundColor",{get:function(){return this.getPropertyValue("backgroundColor")},set:function(e){this.setPropertyValue("backgroundColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"foregroundColor",{get:function(){return this.getPropertyValue("foregroundColor")},set:function(e){this.setPropertyValue("foregroundColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"textureStyle",{get:function(){return this.getPropertyValue("textureStyle")},set:function(e){this.setPropertyValue("textureStyle",e)},enumerable:!0,configurable:!0}),k.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(k.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueShadingFormat)&&this.uniqueShadingFormat.propertiesHash.containsKey(t))return this.uniqueShadingFormat.propertiesHash.get(t)}return k.getPropertyDefaultValue(e)},k.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=k.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueShadingFormat)?this.initializeUniqueShading(e,t):(i=l.getPropertyType(this.uniqueShadingFormat.uniqueFormatType,e),this.uniqueShadingFormat.propertiesHash.containsKey(i)&&this.uniqueShadingFormat.propertiesHash.get(i)===t||(this.uniqueShadingFormat=k.uniqueShadingFormats.updateUniqueFormat(this.uniqueShadingFormat,e,t)))},k.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"backgroundColor":case"foregroundColor":t="empty";break;case"textureStyle":t="TextureNone"}return t},k.prototype.initializeUniqueShading=function(e,t){var i=new N;this.addUniqueShading("backgroundColor",e,t,i),this.addUniqueShading("foregroundColor",e,t,i),this.addUniqueShading("textureStyle",e,t,i),this.uniqueShadingFormat=k.uniqueShadingFormats.addUniqueFormat(i,k.uniqueFormatType)},k.prototype.addUniqueShading=function(e,t,i,r){var n=l.getPropertyType(k.uniqueFormatType,e);e===t?r.add(n,i):r.add(n,k.getPropertyDefaultValue(e))},k.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueShadingFormat)||k.uniqueShadingFormats.remove(this.uniqueShadingFormat),this.uniqueShadingFormat=void 0},k.prototype.cloneFormat=function(){var e=new k(void 0);return e.backgroundColor=this.backgroundColor,e.foregroundColor=this.foregroundColor,e.textureStyle=this.textureStyle,e},k.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||G.isNullOrUndefined(e.uniqueShadingFormat)||(this.backgroundColor=e.backgroundColor,this.foregroundColor=e.foregroundColor,this.textureStyle=e.textureStyle)},k.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueShadingFormat)&&(e=l.getPropertyType(this.uniqueShadingFormat.uniqueFormatType,e),this.uniqueShadingFormat.propertiesHash.containsKey(e))},k.clear=function(){this.uniqueShadingFormats.clear()},k.uniqueShadingFormats=new W,k.uniqueFormatType=5;var I=k;function k(e){this.uniqueShadingFormat=void 0,this.ownerBase=void 0,this.ownerBase=e}Object.defineProperty(L.prototype,"leftMargin",{get:function(){return this.getPropertyValue("leftMargin")},set:function(e){this.setPropertyValue("leftMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"rightMargin",{get:function(){return this.getPropertyValue("rightMargin")},set:function(e){this.setPropertyValue("rightMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"topMargin",{get:function(){return this.getPropertyValue("topMargin")},set:function(e){this.setPropertyValue("topMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"bottomMargin",{get:function(){return this.getPropertyValue("bottomMargin")},set:function(e){this.setPropertyValue("bottomMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"cellWidth",{get:function(){return this.getPropertyValue("cellWidth")},set:function(e){this.setPropertyValue("cellWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"columnSpan",{get:function(){return this.getPropertyValue("columnSpan")},set:function(e){this.setPropertyValue("columnSpan",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"rowSpan",{get:function(){return this.getPropertyValue("rowSpan")},set:function(e){this.setPropertyValue("rowSpan",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"preferredWidth",{get:function(){return this.getPropertyValue("preferredWidth")},set:function(e){this.setPropertyValue("preferredWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"verticalAlignment",{get:function(){return this.getPropertyValue("verticalAlignment")},set:function(e){this.setPropertyValue("verticalAlignment",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"preferredWidthType",{get:function(){return this.getPropertyValue("preferredWidthType")},set:function(e){this.setPropertyValue("preferredWidthType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(L.prototype,"verticallyMergedCellsKeepWithNext",{get:function(){return this.getPropertyValue("verticallyMergedCellsKeepWithNext")},set:function(e){this.setPropertyValue("verticallyMergedCellsKeepWithNext",e)},enumerable:!0,configurable:!0}),L.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(L.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueCellFormat)&&this.uniqueCellFormat.propertiesHash.containsKey(t))return this.uniqueCellFormat.propertiesHash.get(t)}return L.getPropertyDefaultValue(e)},L.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=L.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueCellFormat)?this.initializeUniqueCellFormat(e,t):(i=l.getPropertyType(this.uniqueCellFormat.uniqueFormatType,e),this.uniqueCellFormat.propertiesHash.containsKey(i)&&this.uniqueCellFormat.propertiesHash.get(i)===t||(this.uniqueCellFormat=L.uniqueCellFormats.updateUniqueFormat(this.uniqueCellFormat,e,t)))},L.prototype.initializeUniqueCellFormat=function(e,t){var i=new N;this.addUniqueCellFormat("leftMargin",e,t,i),this.addUniqueCellFormat("topMargin",e,t,i),this.addUniqueCellFormat("bottomMargin",e,t,i),this.addUniqueCellFormat("rightMargin",e,t,i),this.addUniqueCellFormat("cellWidth",e,t,i),this.addUniqueCellFormat("columnSpan",e,t,i),this.addUniqueCellFormat("rowSpan",e,t,i),this.addUniqueCellFormat("preferredWidth",e,t,i),this.addUniqueCellFormat("verticalAlignment",e,t,i),this.addUniqueCellFormat("preferredWidthType",e,t,i),this.addUniqueCellFormat("verticallyMergedCellsKeepWithNext",e,t,i),this.uniqueCellFormat=L.uniqueCellFormats.addUniqueFormat(i,L.uniqueFormatType)},L.prototype.addUniqueCellFormat=function(e,t,i,r){var n=l.getPropertyType(L.uniqueFormatType,e);e===t&&r.add(n,i)},L.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"leftMargin":case"topMargin":case"bottomMargin":case"rightMargin":t=void 0;break;case"cellWidth":t=0;break;case"columnSpan":case"rowSpan":t=1;break;case"preferredWidth":t=0;break;case"verticalAlignment":t="Top";break;case"preferredWidthType":t="Point";break;case"verticallyMergedCellsKeepWithNext":t=!1}return t},L.prototype.containsMargins=function(){return!(G.isNullOrUndefined(this.leftMargin)&&G.isNullOrUndefined(this.rightMargin)&&G.isNullOrUndefined(this.bottomMargin)&&G.isNullOrUndefined(this.topMargin))},L.prototype.destroy=function(){G.isNullOrUndefined(this.borders)||this.borders.destroy(),G.isNullOrUndefined(this.shading)||this.shading.destroy(),G.isNullOrUndefined(this.uniqueCellFormat)||L.uniqueCellFormats.remove(this.uniqueCellFormat),this.uniqueCellFormat=void 0,this.borders=void 0,this.shading=void 0},L.prototype.cloneFormat=function(){var e=new L(void 0);return e.verticalAlignment=this.verticalAlignment,e.leftMargin=this.leftMargin,e.rightMargin=this.rightMargin,e.topMargin=this.topMargin,e.bottomMargin=this.bottomMargin,e.preferredWidth=this.preferredWidth,e.preferredWidthType=this.preferredWidthType,e.verticallyMergedCellsKeepWithNext=this.verticallyMergedCellsKeepWithNext,e.cellWidth=this.cellWidth,e.borders=G.isNullOrUndefined(this.borders)?void 0:this.borders.cloneFormat(),e.shading=G.isNullOrUndefined(this.shading)?void 0:this.shading.cloneFormat(),e},L.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueCellFormat)&&(e=l.getPropertyType(this.uniqueCellFormat.uniqueFormatType,e),this.uniqueCellFormat.propertiesHash.containsKey(e))},L.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e.uniqueCellFormat)||(this.cellWidth=e.cellWidth,this.leftMargin=e.leftMargin,this.topMargin=e.topMargin,this.rightMargin=e.rightMargin,this.bottomMargin=e.bottomMargin,this.preferredWidth=e.preferredWidth,this.columnSpan=e.columnSpan,this.rowSpan=e.rowSpan,this.preferredWidthType=e.preferredWidthType,this.verticalAlignment=e.verticalAlignment,this.verticallyMergedCellsKeepWithNext=e.verticallyMergedCellsKeepWithNext),G.isNullOrUndefined(e.shading)||(this.shading=new I(this),this.shading.copyFormat(e.shading)),G.isNullOrUndefined(e.borders))||(this.borders=new Wl(this),this.borders.copyFormat(e.borders))},L.prototype.initializeCellBorders=function(){this.borders.left.lineStyle="Single",this.borders.left.lineWidth=.5,this.borders.right.lineStyle="Single",this.borders.right.lineWidth=.5,this.borders.top.lineStyle="Single",this.borders.top.lineWidth=.5,this.borders.bottom.lineStyle="Single",this.borders.bottom.lineWidth=.5,this.borders.horizontal.lineStyle="Single",this.borders.horizontal.lineWidth=.5,this.borders.vertical.lineStyle="Single",this.borders.vertical.lineWidth=.5},L.clear=function(){this.uniqueCellFormats.clear()},L.uniqueCellFormats=new W,L.uniqueFormatType=4;var A=L;function L(e){this.uniqueCellFormat=void 0,this.initialCellWidth=0,this.borders=new Wl(this),this.shading=new I(this),this.ownerBase=e,this.borders=new Wl(this),this.shading=new I(this)}U=function(e,t){return(U=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var U,B=function(e,t){function i(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},H=(R.prototype.destroy=function(){this.author=void 0,this.revisionID=void 0,this.date=void 0,this.ownerNode=void 0,this.customData=void 0,this.range=[],this.range=void 0,this.hasChanges=void 0},R.cloneRevisions=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].revisionID);return t},R);function R(){this.author=null,this.date=null,this.customData=null,this.revisionID="",this.hasChanges=!1}B(M,q=H),M.prototype.destroy=function(){this.owner=void 0,q.prototype.destroy.call(this)},M.prototype.cloneRevision=function(){var e=new M(this.owner,this.author,this.date);return e.revisionID=this.revisionID,e.revisionType=this.revisionType,e.author=this.author,e.date=this.date,e.customData=this.customData,e},M.prototype.getRange=function(e){return this.ownerNode instanceof Z?((G.isNullOrUndefined(this.range)||G.isNullOrUndefined(e)||e||!G.isNullOrUndefined(this.owner)&&!G.isNullOrUndefined(this.owner.editorProperties)&&this.owner.editorProperties.hasChanges||this.hasChanges)&&(this.range=this.ownerNode.getRevisionRange(this),this.hasChanges=!1),this.range):this.ownerNode.getRevisionRange(this)};var q,E=M;function M(e,t,i,r){var n=q.call(this)||this;return n.author=t,G.isNullOrUndefined(n.author)&&(n.author="Unknown"),n.date=i,n.owner=e,n.ownerNode=r,n}D.prototype.clear=function(){this.changes=[]},D.prototype.destroy=function(){if(this.changes){for(var e=0;e<this.changes.length;e++)this.changes[parseInt(e.toString(),10)].destroy();this.changes=[]}};var V=D;function D(){this.changes=[]}B(le,z=V),le.prototype.clear=function(){this.changes=[]},le.prototype.destroy=function(){if(this.changes){for(var e=0;e<this.changes.length;e++)this.changes[e].destroy();this.changes=[]}};var z,B=le;function le(){var e=null!==z&&z.apply(this,arguments)||this;return e.changes=[],e}he.prototype.destroy=function(){this.documentHelper=void 0},he.prototype.retrieveRevisionByType=function(e,t){for(var i=0;i<e.revisionLength;i++)if(e.revisions[i].revisionType===t)return e.revisions[i]},he.prototype.insertRevision=function(e,t,i,r,n,o,a){var s,l;if(!this.documentHelper.editorProperties.isRemoteAction||!G.isNullOrUndefined(this.documentHelper.editorProperties.revisionData)||this.documentHelper.parser.isPaste)return G.isNullOrUndefined(n)&&!G.isNullOrUndefined(this.documentHelper.editorProperties.revisionData)&&0<this.documentHelper.editorProperties.revisionData.length&&(i=(l=this.documentHelper.editorProperties.revisionData[0]).author,r=l.date),G.isNullOrUndefined(a)||(s=a),i=G.isNullOrUndefined(i)?this.documentHelper.editorProperties.currentUser||"Guest user":i,l=G.isNullOrUndefined(r)?K.getUtcDate():r,this.documentHelper.editorProperties.revision=new E(this.documentHelper,i,l,this.getOwnerNodeForRevision(e)),this.documentHelper.editorProperties.revision.revisionType=t,this.documentHelper.documentEditorSettings.revisionSettings&&this.documentHelper.documentEditorSettings.revisionSettings.customData&&(this.documentHelper.editorProperties.revision.customData=this.documentHelper.documentEditorSettings.revisionSettings.customData),this.documentHelper.editorProperties.enableCollaborativeEditing&&this.documentHelper.editorProperties.isRemoteAction&&!G.isNullOrUndefined(s)&&""!=s?this.documentHelper.editorProperties.revision.revisionID=s:this.documentHelper.editorProperties.revision.revisionID=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),!G.isNullOrUndefined(n)&&0<n.length&&(this.clearAndUpdateRevisions(n,this.documentHelper.editorProperties.revision,n.indexOf(e)),this.documentHelper.editorProperties.isupdateCurrentTrackChanges=!0),G.isNullOrUndefined(e)||-1===e.getAllRevision().indexOf(this.documentHelper.editorProperties.revision)&&e.addRevision(this.documentHelper.editorProperties.revision),this.documentHelper.editorProperties.isRemoteAction&&this.documentHelper.parser.isPaste?this.documentHelper.editorProperties.remotePasteRevision.push(this.documentHelper.editorProperties.revision):0<this.documentHelper.editorProperties.revision.getRange().length&&this.documentHelper.parser.isPaste,this.documentHelper.editorProperties.revisionItem=e,this.documentHelper.editorProperties.revision},he.prototype.getOwnerNodeForRevision=function(e){return e instanceof ld?e.paragraph.getSplitWidgets()[0]:e},he.prototype.clearAndUpdateRevisions=function(e,t,i){for(var r=i;r<e.length;r++)if(e[r]instanceof ld||e[r]instanceof ce){var n=e[r];if(n instanceof ie&&""===n.text)n.removeRevision(n.revisionLength-1);else for(var o=0;o<n.revisionLength;o++){var a=n.getRevision(o);this.compareTwoRevisions(a,t)&&(n.removeRevision(o),n.insertRevisionAt(o,t))}}},he.prototype.compareTwoRevisions=function(e,t){return e.revisionType===t.revisionType&&e.author===t.author};var de=he;function he(e){this.documentHelper=void 0,this.documentHelper=e}Object.defineProperty(s.prototype,"bold",{get:function(){return this.getPropertyValue("bold")},set:function(e){this.setPropertyValue("bold",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"italic",{get:function(){return this.getPropertyValue("italic")},set:function(e){this.setPropertyValue("italic",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontSize",{get:function(){return this.getPropertyValue("fontSize")},set:function(e){this.setPropertyValue("fontSize",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"characterSpacing",{get:function(){return this.getPropertyValue("characterSpacing")},set:function(e){this.setPropertyValue("characterSpacing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"scaling",{get:function(){return this.getPropertyValue("scaling")},set:function(e){this.setPropertyValue("scaling",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontFamily",{get:function(){return this.getPropertyValue("fontFamily")},set:function(e){this.setPropertyValue("fontFamily",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"underline",{get:function(){return this.getPropertyValue("underline")},set:function(e){this.setPropertyValue("underline",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"underlineColor",{get:function(){return this.getPropertyValue("underlineColor")},set:function(e){this.setPropertyValue("underlineColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontHintType",{get:function(){return this.getPropertyValue("fontHintType")},set:function(e){this.setPropertyValue("fontHintType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"strikethrough",{get:function(){return this.getPropertyValue("strikethrough")},set:function(e){this.setPropertyValue("strikethrough",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"baselineAlignment",{get:function(){return this.getPropertyValue("baselineAlignment")},set:function(e){this.setPropertyValue("baselineAlignment",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"highlightColor",{get:function(){return this.getPropertyValue("highlightColor")},set:function(e){this.setPropertyValue("highlightColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontColor",{get:function(){return this.getPropertyValue("fontColor")},set:function(e){this.setPropertyValue("fontColor",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"ligature",{get:function(){return this.getPropertyValue("ligature")},set:function(e){this.setPropertyValue("ligature",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"bidi",{get:function(){return this.getPropertyValue("bidi")},set:function(e){this.setPropertyValue("bidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"localeIdBidi",{get:function(){return this.getPropertyValue("localeIdBidi")},set:function(e){this.setPropertyValue("localeIdBidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"localeIdFarEast",{get:function(){return this.getPropertyValue("localeIdFarEast")},set:function(e){this.setPropertyValue("localeIdFarEast",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"localeIdAscii",{get:function(){return this.getPropertyValue("localeIdAscii")},set:function(e){this.setPropertyValue("localeIdAscii",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"bdo",{get:function(){return this.getPropertyValue("bdo")},set:function(e){this.setPropertyValue("bdo",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"boldBidi",{get:function(){return this.getPropertyValue("boldBidi")},set:function(e){this.setPropertyValue("boldBidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"italicBidi",{get:function(){return this.getPropertyValue("italicBidi")},set:function(e){this.setPropertyValue("italicBidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontSizeBidi",{get:function(){return this.getPropertyValue("fontSizeBidi")},set:function(e){this.setPropertyValue("fontSizeBidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontFamilyBidi",{get:function(){return this.getPropertyValue("fontFamilyBidi")},set:function(e){this.setPropertyValue("fontFamilyBidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"allCaps",{get:function(){return this.getPropertyValue("allCaps")},set:function(e){this.setPropertyValue("allCaps",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"Lowercase",{get:function(){return this.getPropertyValue("Lowercase")},set:function(e){this.setPropertyValue("Lowercase",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"Uppercase",{get:function(){return this.getPropertyValue("Uppercase")},set:function(e){this.setPropertyValue("Uppercase",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"SentenceCase",{get:function(){return this.getPropertyValue("SentenceCase")},set:function(e){this.setPropertyValue("SentenceCase",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"ToggleCase",{get:function(){return this.getPropertyValue("ToggleCase")},set:function(e){this.setPropertyValue("ToggleCase",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"CapitalizeEachWord",{get:function(){return this.getPropertyValue("CapitalizeEachWord")},set:function(e){this.setPropertyValue("CapitalizeEachWord",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"complexScript",{get:function(){return this.getPropertyValue("complexScript")},set:function(e){this.setPropertyValue("complexScript",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hidden",{get:function(){return this.getPropertyValue("hidden")},set:function(e){this.setPropertyValue("hidden",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"specVanish",{get:function(){return this.getPropertyValue("specVanish")},set:function(e){this.setPropertyValue("specVanish",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"kern",{get:function(){return this.getPropertyValue("kern")},set:function(e){this.setPropertyValue("kern",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isKernFont",{get:function(){return this.getPropertyValue("isKernFont")},set:function(e){this.setPropertyValue("isKernFont",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontFamilyFarEast",{get:function(){return this.getPropertyValue("fontFamilyFarEast")},set:function(e){this.setPropertyValue("fontFamilyFarEast",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontFamilyAscii",{get:function(){return this.getPropertyValue("fontFamilyAscii")},set:function(e){this.setPropertyValue("fontFamilyAscii",e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"fontFamilyNonFarEast",{get:function(){return this.getPropertyValue("fontFamilyNonFarEast")},set:function(e){this.setPropertyValue("fontFamilyNonFarEast",e)},enumerable:!0,configurable:!0}),s.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(s.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueCharacterFormat)&&this.uniqueCharacterFormat.propertiesHash.containsKey(t))return this.uniqueCharacterFormat.propertiesHash.get(t)}else{t=this.checkCharacterStyle(e);if(!G.isNullOrUndefined(t))return t;if(!G.isNullOrUndefined(this.baseCharStyle)){var t=void 0,i=void 0;if(G.isNullOrUndefined(this.ownerBase)||(t=this.ownerBase.paragraph,i=this.ownerBase.line),!G.isNullOrUndefined(t)&&!G.isNullOrUndefined(i))for(var r=i.children.length,n=0;n<r;n++){var o=this.ownerBase.line.children[n];o instanceof ie&&((o=o.text).startsWith("HYPERLINK")||o.startsWith(" HYPERLINK"))&&-1!==o.indexOf("_Toc")&&(this.baseCharStyle=this.ownerBase.paragraph.paragraphFormat.baseStyle)}}t=this.checkBaseStyle(e);if(!G.isNullOrUndefined(t))return t}return this.getDefaultValue(e)},s.prototype.getDefaultValue=function(e){var t,i=l.getPropertyType(s.uniqueFormatType,e),r=this.documentCharacterFormat();return G.isNullOrUndefined(r)?s.getPropertyDefaultValue(e):(t=r.documentFormat,G.isNullOrUndefined(t)||G.isNullOrUndefined(t.uniqueCharacterFormat)||!t.uniqueCharacterFormat.propertiesHash.containsKey(i)?(r=r.editorFormat,!G.isNullOrUndefined(r)&&r.hasOwnProperty(e)?r[e]:s.getPropertyDefaultValue(e)):t.uniqueCharacterFormat.propertiesHash.get(i))},s.prototype.documentCharacterFormat=function(){if(!G.isNullOrUndefined(this.ownerBase)){if(!G.isNullOrUndefined(this.owner))return{editorFormat:this.owner.editorCharacterFormat,documentFormat:this.owner.characterFormat};if(this.ownerBase instanceof ld?e=this.ownerBase.paragraph:this.ownerBase instanceof Z&&(e=this.ownerBase),e){var e=e.bodyWidget;if(e&&e.page&&e.page.documentHelper)return e=e.page.documentHelper,{editorFormat:(this.owner=e).editorCharacterFormat,documentFormat:e.characterFormat}}}},s.prototype.checkBaseStyle=function(e){var t,i;for(G.isNullOrUndefined(this.ownerBase)||(G.isNullOrUndefined(this.ownerBase.paragraph)||G.isNullOrUndefined(this.ownerBase.paragraph.paragraphFormat)?this.ownerBase instanceof Z&&!G.isNullOrUndefined(this.ownerBase.paragraphFormat)?t=this.ownerBase.paragraphFormat.baseStyle:G.isNullOrUndefined(this.ownerBase instanceof nl)||(t=this.ownerBase.basedOn):t=this.ownerBase.paragraph.paragraphFormat.baseStyle);!G.isNullOrUndefined(t)&&!t.characterFormat.hasValue(e);){if(!G.isNullOrUndefined(t.link)&&G.isNullOrUndefined(t.basedOn)&&"Character"==t.link.type&&t.link.characterFormat.hasValue(e)&&"Normal"!=t.name){t=t.link;break}t=t.basedOn}if(!G.isNullOrUndefined(t))return i=l.getPropertyType(s.uniqueFormatType,e),t.characterFormat.uniqueCharacterFormat.propertiesHash.get(i)},s.prototype.checkCharacterStyle=function(e){var t,i=this.baseCharStyle;if(!G.isNullOrUndefined(i))for(;!G.isNullOrUndefined(i)&&"Default Paragraph Font"!==i.name;){if(i.characterFormat.hasValue(e))return"bold"===e&&!G.isNullOrUndefined(this.ownerBase)&&this.ownerBase instanceof ie&&!G.isNullOrUndefined(this.ownerBase.paragraph)&&!G.isNullOrUndefined(this.ownerBase.paragraph.paragraphFormat.baseStyle)&&this.ownerBase.paragraph.paragraphFormat.baseStyle instanceof nl&&this.ownerBase.paragraph.paragraphFormat.baseStyle.characterFormat&&i.name!==this.ownerBase.paragraph.paragraphFormat.baseStyle.name&&i.characterFormat.hasValue(e)===this.ownerBase.paragraph.paragraphFormat.baseStyle.characterFormat.hasValue(e)?this.hasValue(e):(t=l.getPropertyType(s.uniqueFormatType,e),i.characterFormat.uniqueCharacterFormat.propertiesHash.get(t));i=i.basedOn}},s.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=s.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueCharacterFormat)||G.isNullOrUndefined(this.uniqueCharacterFormat.propertiesHash)&&G.isNullOrUndefined(this.uniqueCharacterFormat.uniqueFormatType)&&G.isNullOrUndefined(this.uniqueCharacterFormat.referenceCount)?this.initializeUniqueCharacterFormat(e,t):(i=l.getPropertyType(this.uniqueCharacterFormat.uniqueFormatType,e),this.uniqueCharacterFormat.propertiesHash.containsKey(i)&&this.uniqueCharacterFormat.propertiesHash.get(i)===t||(this.uniqueCharacterFormat=s.uniqueCharacterFormats.updateUniqueFormat(this.uniqueCharacterFormat,e,t)))},s.prototype.initializeUniqueCharacterFormat=function(e,t){var i=new N;this.addUniqueCharacterFormat("fontColor",e,t,i),this.addUniqueCharacterFormat("fontFamily",e,t,i),this.addUniqueCharacterFormat("fontSize",e,t,i),this.addUniqueCharacterFormat("bold",e,t,i),this.addUniqueCharacterFormat("italic",e,t,i),this.addUniqueCharacterFormat("underline",e,t,i),this.addUniqueCharacterFormat("underlineColor",e,t,i),this.addUniqueCharacterFormat("ligature",e,t,i),this.addUniqueCharacterFormat("fontHintType",e,t,i),this.addUniqueCharacterFormat("strikethrough",e,t,i),this.addUniqueCharacterFormat("baselineAlignment",e,t,i),this.addUniqueCharacterFormat("highlightColor",e,t,i),this.addUniqueCharacterFormat("styleName",e,t,i),this.addUniqueCharacterFormat("bidi",e,t,i),this.addUniqueCharacterFormat("bdo",e,t,i),this.addUniqueCharacterFormat("fontFamilyBidi",e,t,i),this.addUniqueCharacterFormat("fontSizeBidi",e,t,i),this.addUniqueCharacterFormat("boldBidi",e,t,i),this.addUniqueCharacterFormat("italicBidi",e,t,i),this.addUniqueCharacterFormat("allCaps",e,t,i),this.addUniqueCharacterFormat("Uppercase",e,t,i),this.addUniqueCharacterFormat("Lowercase",e,t,i),this.addUniqueCharacterFormat("SentenceCase",e,t,i),this.addUniqueCharacterFormat("ToggleCase",e,t,i),this.addUniqueCharacterFormat("CapitalizeEachWord",e,t,i),this.addUniqueCharacterFormat("localeIdAscii",e,t,i),this.addUniqueCharacterFormat("localeIdFarEast",e,t,i),this.addUniqueCharacterFormat("localeIdBidi",e,t,i),this.addUniqueCharacterFormat("fontFamilyFarEast",e,t,i),this.addUniqueCharacterFormat("fontFamilyAscii",e,t,i),this.addUniqueCharacterFormat("fontFamilyNonFarEast",e,t,i),this.addUniqueCharacterFormat("complexScript",e,t,i),this.addUniqueCharacterFormat("characterSpacing",e,t,i),this.addUniqueCharacterFormat("scaling",e,t,i),this.addUniqueCharacterFormat("hidden",e,t,i),this.addUniqueCharacterFormat("specVanish",e,t,i),this.addUniqueCharacterFormat("isKernFont",e,t,i),this.addUniqueCharacterFormat("kern",e,t,i),this.uniqueCharacterFormat=s.uniqueCharacterFormats.addUniqueFormat(i,s.uniqueFormatType)},s.prototype.addUniqueCharacterFormat=function(e,t,i,r){var n=l.getPropertyType(s.uniqueFormatType,e);e===t&&r.add(n,i)},s.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"bold":case"italic":t=!1;break;case"fontSize":t=11;break;case"underline":t="None";break;case"underlineColor":t=void 0;break;case"ligature":t="None";break;case"fontHintType":t="Default";break;case"strikethrough":t="None";break;case"baselineAlignment":t="Normal";break;case"highlightColor":t="NoColor";break;case"fontColor":t="#00000000";break;case"fontFamily":t="Calibri";break;case"styleName":t="Default Paragraph Font";break;case"bidi":t=!1;break;case"bdo":t="None";break;case"boldBidi":case"italicBidi":t=!1;break;case"fontSizeBidi":t=11;break;case"fontFamilyBidi":t="Calibri";break;case"allCaps":case"Uppercase":case"Lowercase":case"CapitalizeEachWord":case"SentenceCase":case"ToggleCase":t=!1;break;case"localeIdAscii":case"localeIdFarEast":case"localeIdBidi":t=0;break;case"complexScript":t=!1;break;case"hidden":case"specVanish":case"isKernFont":t=!1;break;case"fontFamilyFarEast":case"fontFamilyAscii":case"fontFamilyNonFarEast":t=void 0;break;case"characterSpacing":case"kern":t=0;break;case"scaling":t=100}return t},s.prototype.isEqualFormat=function(e){return this.fontSize===e.fontSize&&this.fontFamily===e.fontFamily&&this.bold===e.bold&&this.italic===e.italic&&this.baselineAlignment===e.baselineAlignment&&this.underline===e.underline&&this.fontColor===e.fontColor&&this.strikethrough===e.strikethrough&&this.highlightColor===e.highlightColor&&this.bidi===e.bidi&&this.bdo===e.bdo&&this.allCaps===e.allCaps&&this.Uppercase===e.Uppercase&&this.Lowercase===e.Lowercase&&this.ToggleCase===e.ToggleCase&&this.SentenceCase===e.SentenceCase&&this.CapitalizeEachWord===e.CapitalizeEachWord&&this.localeIdBidi===e.localeIdBidi&&this.localeIdAscii===e.localeIdAscii&&this.localeIdFarEast===e.localeIdFarEast&&this.complexScript===e.complexScript&&this.fontFamilyAscii===e.fontFamilyAscii&&this.fontFamilyBidi===e.fontFamilyBidi&&this.fontFamilyFarEast===e.fontFamilyFarEast&&this.characterSpacing===e.characterSpacing&&this.scaling===e.scaling&&this.fontFamilyNonFarEast===e.fontFamilyNonFarEast&&this.hidden===e.hidden&&this.specVanish===e.specVanish&&this.isKernFont===e.isKernFont&&this.kern===e.kern&&this.ligature===e.ligature},s.prototype.isSameFormat=function(e){return this.baseCharStyle===e.baseCharStyle&&this.uniqueCharacterFormat===e.uniqueCharacterFormat},s.prototype.cloneFormat=function(){var e=new s(void 0,this.owner);return e.uniqueCharacterFormat=this.uniqueCharacterFormat,e.baseCharStyle=this.baseCharStyle,0<this.revisions.length?e.removedIds=H.cloneRevisions(this.revisions):e.removedIds=this.removedIds.slice(),e},s.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueCharacterFormat)&&!G.isNullOrUndefined(this.uniqueCharacterFormat.propertiesHash)&&(e=l.getPropertyType(this.uniqueCharacterFormat.uniqueFormatType,e),this.uniqueCharacterFormat.propertiesHash.containsKey(e))},s.prototype.clearFormat=function(){G.isNullOrUndefined(this.uniqueCharacterFormat)||0!==this.uniqueCharacterFormat.referenceCount||s.uniqueCharacterFormats.remove(this.uniqueCharacterFormat),this.uniqueCharacterFormat=void 0,this.baseCharStyle=void 0},s.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueCharacterFormat)||s.uniqueCharacterFormats.remove(this.uniqueCharacterFormat),this.uniqueCharacterFormat=void 0,this.baseCharStyle=void 0,this.ownerBase=void 0,this.owner=void 0},s.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(!G.isNullOrUndefined(e.uniqueCharacterFormat)&&e.uniqueCharacterFormat.propertiesHash&&this.updateUniqueCharacterFormat(e),G.isNullOrUndefined(e.baseCharStyle)||(this.baseCharStyle=e.baseCharStyle),0<e.revisions.length?this.removedIds=H.cloneRevisions(e.revisions):this.removedIds=e.removedIds.slice())},s.prototype.isEqualTocFormat=function(e){return this.fontFamily===e.fontFamily&&this.bold===e.bold&&this.italic===e.italic&&this.strikethrough===e.strikethrough&&this.highlightColor===e.highlightColor&&this.fontFamilyAscii===e.fontFamilyAscii&&this.fontFamilyFarEast===e.fontFamilyFarEast&&this.fontFamilyNonFarEast===e.fontFamilyNonFarEast},s.prototype.copyTocFormat=function(e){G.isNullOrUndefined(e.bold)||(this.bold=e.bold),G.isNullOrUndefined(e.italic)||(this.italic=e.italic),G.isNullOrUndefined(e.strikethrough)||(this.strikethrough=e.strikethrough),G.isNullOrUndefined(e.highlightColor)||(this.highlightColor=e.highlightColor),G.isNullOrUndefined(e.fontFamily)||(this.fontFamily=e.fontFamily,this.fontFamilyAscii=e.fontFamily,this.fontFamilyFarEast=e.fontFamily,this.fontFamilyNonFarEast=e.fontFamily)},s.prototype.updateUniqueCharacterFormat=function(e){var t=void 0;this.uniqueCharacterFormat&&(t=this.uniqueCharacterFormat.mergeProperties(e.uniqueCharacterFormat),0===this.uniqueCharacterFormat.referenceCount)&&(s.uniqueCharacterFormats.remove(this.uniqueCharacterFormat),this.uniqueCharacterFormat=void 0),this.uniqueCharacterFormat=new l(s.uniqueFormatType),G.isNullOrUndefined(t)&&(t=this.uniqueCharacterFormat.mergeProperties(e.uniqueCharacterFormat)),this.uniqueCharacterFormat=s.uniqueCharacterFormats.addUniqueFormat(t,s.uniqueFormatType)},s.clear=function(){this.uniqueCharacterFormats.clear()},s.prototype.applyStyle=function(e){this.baseCharStyle=e},s.prototype.getValue=function(e){return this.hasValue(e)?this.getPropertyValue(e):void 0},s.prototype.mergeFormat=function(e){G.isNullOrUndefined(this.getValue("bold"))&&(this.bold=e.getValue("bold")),G.isNullOrUndefined(this.getValue("italic"))&&(this.italic=e.getValue("italic")),G.isNullOrUndefined(this.getValue("fontSize"))&&(this.fontSize=e.getValue("fontSize")),G.isNullOrUndefined(this.getValue("boldBidi"))&&(this.boldBidi=e.getValue("boldBidi")),G.isNullOrUndefined(this.getValue("italicBidi"))&&(this.italicBidi=e.getValue("italicBidi")),G.isNullOrUndefined(this.getValue("fontSizeBidi"))&&(this.fontSizeBidi=e.getValue("fontSizeBidi")),G.isNullOrUndefined(this.getValue("characterSpacing"))&&(this.characterSpacing=e.getValue("characterSpacing")),G.isNullOrUndefined(this.getValue("scaling"))&&(this.scaling=e.getValue("scaling")),G.isNullOrUndefined(this.getValue("kern"))&&(this.kern=e.getValue("kern")),G.isNullOrUndefined(this.getValue("isKernFont"))&&(this.isKernFont=e.getValue("isKernFont")),G.isNullOrUndefined(this.getValue("fontFamily"))?this.fontFamily=e.getValue("fontFamily"):(G.isNullOrUndefined(this.getValue("fontFamilyAscii"))&&(this.fontFamilyAscii=e.getValue("fontFamily")),G.isNullOrUndefined(this.getValue("fontFamilyFarEast"))&&(this.fontFamilyFarEast=e.getValue("fontFamily")),G.isNullOrUndefined(this.getValue("fontFamilyNonFarEast"))&&(this.fontFamilyNonFarEast=e.getValue("fontFamily"))),G.isNullOrUndefined(this.getValue("underline"))&&(this.underline=e.getValue("underline")),G.isNullOrUndefined(this.getValue("fontHintType"))&&(this.fontHintType=e.getValue("fontHintType")),G.isNullOrUndefined(this.getValue("strikethrough"))&&(this.strikethrough=e.getValue("strikethrough")),G.isNullOrUndefined(this.getValue("baselineAlignment"))&&(this.baselineAlignment=e.getValue("baselineAlignment")),G.isNullOrUndefined(this.getValue("highlightColor"))&&(this.highlightColor=e.getValue("highlightColor")),G.isNullOrUndefined(this.getValue("fontColor"))&&(this.fontColor=e.getValue("fontColor")),G.isNullOrUndefined(this.getValue("ligature"))&&(this.ligature=e.getValue("ligature")),G.isNullOrUndefined(this.getValue("bidi"))&&(this.bidi=e.getValue("bidi")),G.isNullOrUndefined(this.getValue("bdo"))&&(this.bdo=e.getValue("bdo")),G.isNullOrUndefined(this.getValue("allCaps"))&&(this.allCaps=e.getValue("allCaps")),G.isNullOrUndefined(this.getValue("Lowercase"))&&(this.Lowercase=e.getValue("Lowercase")),G.isNullOrUndefined(this.getValue("SentenceCase"))&&(this.SentenceCase=e.getValue("SentenceCase")),G.isNullOrUndefined(this.getValue("ToggleCase"))&&(this.ToggleCase=e.getValue("ToggleCase")),G.isNullOrUndefined(this.getValue("CapitalizeEachWord"))&&(this.CapitalizeEachWord=e.getValue("CapitalizeEachWord")),G.isNullOrUndefined(this.getValue("Uppercase"))&&(this.Uppercase=e.getValue("Uppercase")),G.isNullOrUndefined(this.getValue("localeIdBidi"))&&(this.localeIdBidi=e.getValue("localeIdBidi")),G.isNullOrUndefined(this.getValue("localeIdAscii"))&&(this.localeIdAscii=e.getValue("localeIdAscii")),G.isNullOrUndefined(this.getValue("localeIdFarEast"))&&(this.localeIdFarEast=e.getValue("localeIdFarEast")),G.isNullOrUndefined(this.getValue("complexScript"))&&(this.complexScript=e.getValue("complexScript")),G.isNullOrUndefined(this.getValue("fontFamilyAscii"))&&(this.fontFamilyAscii=e.getValue("fontFamilyAscii")),G.isNullOrUndefined(this.getValue("fontFamilyBidi"))&&(this.fontFamilyBidi=e.getValue("fontFamilyBidi")),G.isNullOrUndefined(this.getValue("fontFamilyFarEast"))&&(this.fontFamilyFarEast=e.getValue("fontFamilyFarEast")),G.isNullOrUndefined(this.getValue("fontFamilyNonFarEast"))&&(this.fontFamilyNonFarEast=e.getValue("fontFamilyNonFarEast"))},s.prototype.assignFormat=function(e){e.hasValue("bold")&&(this.bold=e.getValue("bold")),e.hasValue("italic")&&(this.italic=e.getValue("italic")),e.hasValue("fontSize")&&(this.fontSize=e.getValue("fontSize")),e.hasValue("characterSpacing")&&(this.characterSpacing=e.getValue("characterSpacing")),e.hasValue("scaling")&&(this.scaling=e.getValue("scaling")),e.hasValue("kern")&&(this.kern=e.getValue("kern")),e.hasValue("isKernFont")&&(this.isKernFont=e.getValue("isKernFont")),e.hasValue("fontFamily")&&(this.fontFamily=e.getValue("fontFamily"),this.fontFamilyFarEast=e.getValue("fontFamily"),this.fontFamilyAscii=e.getValue("fontFamily"),this.fontFamilyNonFarEast=e.getValue("fontFamily"),this.fontFamilyBidi=e.getValue("fontFamily")),e.hasValue("underline")&&(this.underline=e.getValue("underline")),e.hasValue("fontHintType")&&(this.fontHintType=e.getValue("fontHintType")),e.hasValue("strikethrough")&&(this.strikethrough=e.getValue("strikethrough")),e.hasValue("baselineAlignment")&&(this.baselineAlignment=e.getValue("baselineAlignment")),e.hasValue("highlightColor")&&(this.highlightColor=e.getValue("highlightColor")),e.hasValue("fontColor")&&(this.fontColor=e.getValue("fontColor")),e.hasValue("ligature")&&(this.ligature=e.getValue("ligature")),e.hasValue("bidi")&&(this.bidi=e.getValue("bidi")),e.hasValue("bdo")&&(this.bdo=e.getValue("bdo")),e.hasValue("allCaps")&&(this.allCaps=e.getValue("allCaps")),e.hasValue("Lowercase")&&(this.Lowercase=e.getValue("Lowercase")),e.hasValue("SentenceCase")&&(this.SentenceCase=e.getValue("SentenceCase")),e.hasValue("ToggleCase")&&(this.ToggleCase=e.getValue("ToggleCase")),e.hasValue("CapitalizeEachWord")&&(this.CapitalizeEachWord=e.getValue("CapitalizeEachWord")),e.hasValue("Uppercase")&&(this.Uppercase=e.getValue("Uppercase")),e.hasValue("localeIdBidi")&&(this.localeIdBidi=e.getValue("localeIdBidi")),e.hasValue("localeIdAscii")&&(this.localeIdAscii=e.getValue("localeIdAscii")),e.hasValue("localeIdFarEast")&&(this.localeIdFarEast=e.getValue("localeIdFarEast")),e.hasValue("complexScript")&&(this.complexScript=e.getValue("complexScript"))},s.prototype.hasValueWithParent=function(e){var t=this.hasValue(e),i=(!t&&!G.isNullOrUndefined(this.baseCharStyle)&&this.baseCharStyle instanceof sl&&(t=this.baseCharStyle.characterFormat.hasValue(e)),this.documentCharacterFormat());return t=t||G.isNullOrUndefined(i)||G.isNullOrUndefined(i.documentFormat)?t:i.documentFormat.hasValue(e)},Object.defineProperty(s.prototype,"revisionLength",{get:function(){return G.isNullOrUndefined(this.revisions)?0:this.revisions.length},enumerable:!0,configurable:!0}),s.prototype.getRevision=function(e){if(!G.isNullOrUndefined(this.revisions))return this.revisions[e]},s.prototype.getListDocumentHelper=function(){var e=this.ownerBase instanceof Z?this.ownerBase.bodyWidget:void 0;if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.page)&&!G.isNullOrUndefined(e.page.documentHelper)&&"function"==typeof e.page.documentHelper.getListById)return e.page.documentHelper;if(!G.isNullOrUndefined(this.owner)){if("function"==typeof this.owner.getListById)return this.owner;if(!G.isNullOrUndefined(this.owner)&&"function"==typeof this.owner.getListById)return this.owner}},s.prototype.markFollowedListLayout=function(){var e,t;this.ownerBase instanceof Z&&!G.isNullOrUndefined(this.ownerBase.paragraphFormat)&&!G.isNullOrUndefined(this.ownerBase.paragraphFormat.listFormat)&&(e=this.ownerBase.paragraphFormat.listFormat,t=this.getListDocumentHelper(),G.isNullOrUndefined(t)||G.isNullOrUndefined(t.getListById(e.listId))||G.isNullOrUndefined(e.listLevel)||"Bullet"===e.listLevel.listLevelPattern||(t.isFollowedListLayoutRequired=!0))},s.prototype.addRevision=function(e){-1===this.revisions.indexOf(e)&&this.revisions.push(e),this.markFollowedListLayout(),e.hasChanges=!0},s.prototype.insertRevisionAt=function(e,t){this.revisions.splice(e,0,t),this.markFollowedListLayout(),t.hasChanges=!0},s.prototype.removeRevision=function(e){e=this.revisions.splice(e,1)[0];return this.markFollowedListLayout(),e.hasChanges=!0,e},s.prototype.getAllRevision=function(){return this.revisions},s.prototype.clearRevision=function(){this.revisions=[]},s.prototype.getRevisionRange=function(e){var t=[];return-1!==this.revisions.indexOf(e)&&t.push(this),t},s.uniqueCharacterFormats=new W,s.uniqueFormatType=2;var ce=s;function s(e,t){this.uniqueCharacterFormat=void 0,this.ownerBase=void 0,this.baseCharStyle=void 0,this.owner=void 0,this.removedIds=[],this.revisions=[],this.ownerBase=e,G.isNullOrUndefined(t)?(e=void 0,this.ownerBase instanceof ld?e=this.ownerBase.paragraph:this.ownerBase instanceof Z&&(e=this.ownerBase),G.isNullOrUndefined(e)||(e=e.bodyWidget)&&e.page&&e.page.documentHelper&&(this.owner=e.page.documentHelper)):this.owner=t}var ge=["sections","sec"],pe=["fontSubstitutionTable","fst"],ue=["characterFormat","cf"],fe=["paragraphFormat","pf"],me=["lists","li"],ye=["abstractLists","al"],ve=["background","bg"],We=["styles","sty"],be=["comments","cm"],xe=["revisions","r"],we=["customXml","cx"],Fe=["defaultTabWidth","dtw"],Ce=["formatting","fmt"],Pe=["trackChanges","tc"],Te=["protectionType","pt"],Oe=["enforcement","enf"],Se=["hashValue","hv"],Ne=["saltValue","sv"],Ie=["cryptAlgorithmClass","cac"],ke=["cryptAlgorithmType","cat"],Ae=["cryptAlgorithmSid","cas"],Le=["dontUseHTMLParagraphAutoSpacing","dhtml"],Ue=["alignTablesRowByRow","atrr"],Be=["formFieldShading","ffs"],He=["lastParagraphMarkCopied","lpmc"],Re=["footnotes","fn"],qe=["endnotes","en"],Ee=["compatibilityMode","comp"],Me=["themeFontLanguages","tfl"],Ve=["themes","thm"],De=["name","n"],ze=["basedOn","b"],_e=["next","nx"],je=["link","l"],Ge=["localeId","id"],Ke=["localeIdFarEast","idfe"],Ye=["localeIdBidi","idbi"],Xe=["bold","b"],Je=["italic","i"],Ze=["ligature","lig"],Qe=["underline","u"],$e=["underlineColor","uc"],et=["fontHintType","fht"],tt=["baselineAlignment","ba"],it=["strikethrough","st"],rt=["highlightColor","hc"],nt=["fontSize","fsz"],ot=["fontColor","fc"],at=["fontFamily","ff"],st=["styleName","stn"],lt=["bidi","bi"],dt=["bdo","bdo"],ht=["breakClearType","bct"],ct=["fontSizeBidi","fszbi"],gt=["fontFamilyBidi","ffbi"],pt=["boldBidi","bbi"],ut=["italicBidi","ibi"],ft=["allCaps","ac"],mt=["complexScript","cs"],yt=["fontFamilyAscii","ffa"],vt=["fontFamilyFarEast","fffe"],Wt=["fontFamilyNonFarEast","ffnfe"],bt=["revisionIds","rids"],xt=["listId","lid"],wt=["characterSpacing","csp"],Ft=["scaling","sc"],Ct=["listLevelNumber","lilno"],Pt=["leftIndent","lin"],Tt=["rightIndent","rin"],Ot=["firstLineIndent","fin"],St=["textAlignment","ta"],Nt=["afterSpacing","as"],It=["beforeSpacing","bs"],kt=["spaceAfterAuto","saa"],At=["spaceBeforeAuto","sba"],Lt=["lineSpacing","ls"],Ut=["lineSpacingType","lst"],Bt=["listFormat","lif"],Ht=["keepWithNext","kwn"],Rt=["widowControl","wc"],qt=["keepLinesTogether","klt"],Et=["outlineLevel","ol"],Mt=["contextualSpacing","cs"],Vt=["borders","bdrs"],Dt=["tabs","tb"],zt=["headerDistance","hd"],_t=["footerDistance","fd"],jt=["differentFirstPage","dfp"],Gt=["differentOddAndEvenPages","doep"],Kt=["pageWidth","pw"],Yt=["pageHeight","ph"],Xt=["leftMargin","lm"],Jt=["rightMargin","rm"],Zt=["topMargin","tm"],Qt=["bottomMargin","bm"],$t=["restartPageNumbering","rpn"],ei=["pageStartingNumber","psn"],ti=["endnoteNumberFormat","enf"],ii=["footNoteNumberFormat","fnf"],ri=["restartIndexForFootnotes","rif"],ni=["restartIndexForEndnotes","rie"],oi=["initialFootNoteNumber","ifn"],ai=["initialEndNoteNumber","ien"],si=["pageNumberStyle","pgns"],li=["columns","cols"],di=["numberOfColumns","ncols"],hi=["equalWidth","eqw"],ci=["lineBetweenColumns","lbtc"],gi=["breakCode","bc"],pi=["cellWidth","cw"],ui=["columnSpan","colsp"],fi=["rowSpan","rwsp"],mi=["verticalAlignment","va"],yi=["allowBreakAcrossPages","abrk"],vi=["isHeader","hdr"],Wi=["heightType","ht"],bi=["gridBefore","gb"],xi=["gridBeforeWidth","gbw"],wi=["gridBeforeWidthType","gbwt"],Fi=["gridAfter","ga"],Ci=["gridAfterWidth","gaw"],Pi=["gridAfterWidthType","gawt"],Ti=["allowAutoFit","auft"],Oi=["cellSpacing","csp"],Si=["shading","sd"],Ni=["tableAlignment","ta"],Ii=["preferredWidth","pw"],ki=["preferredWidthType","pwt"],Ai=["verticallyMergedCellsKeepWithNext","vkwn"],Li=["verticallyMergedCellsLeftMargin","vlm"],Ui=["verticallyMergedCellsRightMargin","vrm"],Bi=["verticallyMergedCellsTopMargin","vtm"],Hi=["verticallyMergedCellsBottomMargin","vbm"],Ri=["horizontalPositionAbs","hpa"],qi=["texture","t"],Ei=["backgroundColor","bgc"],Mi=["foregroundColor","fgc"],Vi=["shadow","sh"],Di=["hasNoneStyle","hns"],zi=["vertical","v"],_i=["horizontal","h"],ji=["diagonalUp","du"],Gi=["diagonalDown","dd"],Ki=["lineStyle","ls"],Yi=["lineWidth","lw"],Xi=["layout","l"],Ji=["dataFormat","df"],Zi=["yValue","y"],Qi=["chartData","chd"],$i=["categoryXName","cx"],er=["line","l"],tr=["foreColor","fc"],ir=["layoutX","x"],rr=["layoutY","y"],nr=["direction","dir"],or=["endStyle","est"],ar=["numberValue","no"],sr=["markerStyle","mst"],lr=["markerColor","mc"],dr=["markerSize","msz"],hr=["forward","fw"],cr=["backward","bw"],gr=["intercept","itr"],pr=["isDisplayRSquared","idrs"],ur=["isDisplayEquation","ideq"],fr=["seriesName","sn"],mr=["dataLabel","sl"],yr=["errorBar","eb"],vr=["seriesFormat","sf"],Wr=["trendLines","tl"],br=["dataPoints","dp"],xr=["firstSliceAngle","fsa"],wr=["holeSize","hsz"],Fr=["isLegendKey","lk"],Cr=["isBubbleSize","bsz"],Pr=["isCategoryName","icn"],Tr=["isSeriesName","isn"],Or=["isValue","iv"],Sr=["isPercentage","ip"],Nr=["isLeaderLines","il"],Ir=["showSeriesKeys","sk"],kr=["hasHorzBorder","hhbdr"],Ar=["hasVertBorder","hvbdr"],Lr=["hasBorders","hbdr"],Ur=["categoryType","ct"],Br=["chartCategory","c"],Hr=["chartSeries","cs"],Rr=["chartArea","ca"],qr=["chartTitleArea","cta"],Er=["plotArea","pa"],Mr=["chartLegend","cl"],Vr=["chartPrimaryCategoryAxis","cpca"],Dr=["chartPrimaryValueAxis","cpva"],zr=["chartTitle","ctt"],_r=["chartType","ct"],jr=["gapWidth","gw"],Gr=["overlap","o"],Kr=["chartDataTable","cdt"],Yr=["text","tlp"],Xr=["shapeId","sid"],Jr=["alternativeText","at"],Zr=["visible","v"],Qr=["belowText","b"],$r=["horizontalRule","ihr"],en=["width","w"],tn=["height","h"],rn=["widthScale","ws"],nn=["heightScale","hs"],on=["lineFormat","lf"],an=["fillFormat","ff"],sn=["textWrappingStyle","tws"],ln=["textWrappingType","twt"],dn=["verticalRelativePercent","vrp"],hn=["horizontalRelativePercent","hrp"],cn=["heightRelativePercent","hrp"],gn=["widthRelativePercent","wrp"],pn=["zOrderPosition","z"],un=["layoutInCell","lc"],fn=["lockAnchor","la"],mn=["autoShapeType","ast"],yn=["textFrame","tf"],vn=["color","c"],Wn=["fill","f"],bn=["isDefaultFill","idf"],xn=["fillType","ft"],wn=["textVerticalAlignment","tva"],Fn=["imageString","img"],Cn=["metaFileImageString","mtimg"],Pn=["isInlineImage","inimg"],Tn=["isMetaFile","imf"],On=["hasImageReference","hir"],Sn=["top","tp"],Nn=["bottom","bt"],In=["right","rg"],kn=["left","lt"],An=["getimageheight","gih"],Ln=["getimagewidth","giw"],Un=["hasFieldEnd","hfe"],Bn=["formFieldData","ffd"],Hn=["fieldType","ft"],Rn=["enabled","e"],qn=["helpText","h"],En=["statusText","st"],Mn=["textInput","ti"],Vn=["checkBox","c"],Dn=["dropDownList","ddl"],zn=["maxLength","ml"],_n=["defaultValue","dv"],jn=["format","f"],Gn=["sizeType","szt"],Kn=["size","sz"],Yn=["checked","chk"],Xn=["dropDownItems","ddi"],Jn=["selectedIndex","si"],Zn=["commentId","cid"],Qn=["commentCharacterType","cct"],$n=["author","a"],eo=["initial","i"],to=["date","dt"],io=["done","dn"],ro=["replyComments","rc"],no=["revisionType","rt"],oo=["revisionId","rid"],ao=["customData","cd"],so=["itemID","iid"],lo=["xml","x"],ho=["footnoteType","fnt"],co=["symbolCode","sc"],go=["symbolFontName","sfn"],po=["customMarker","cm"],uo=["inlines","i"],fo=["contentControlProperties","ccp"],mo=["cellContentControl","ccc"],yo=["lockContentControl","lcc"],vo=["lockContents","lc"],Wo=["isInsertRevision","iir"],bo=["isDeleteRevision","idr"],xo=["authorName","an"],wo=["revDateTime","rdt"],Fo=["tag","tg"],Co=["title","tt"],Po=["hasPlaceHolderText","hpt"],To=["multiline","mul"],Oo=["isTemporary","it"],So=["dateCalendarType","dtct"],No=["dateStorageFormat","dtsf"],Io=["dateDisplayLocale","dtdl"],ko=["dateDisplayFormat","dtdf"],Ao=["isChecked","ichk"],Lo=["uncheckedState","uchk"],Uo=["checkedState","chks"],Bo=["contentControlListItems","ccli"],Ho=["xmlMapping","x"],Ro=["font","f"],qo=["value","v"],Eo=["displayText","dt"],Mo=["isMapped","imap"],Vo=["isWordMl","iwml"],Do=["prefixMapping","pmap"],zo=["xPath","xp"],_o=["storeItemId","siid"],jo=["customXmlPart","cxp"],Go=["id","i"],Ko=["cellFormat","tcpr"],Yo=["rowFormat","trpr"],Xo=["cells","c"],Jo=["rows","r"],Zo=["description","desc"],Qo=["wrapTextAround","wta"],$o=["isLegalStyleNumbering","isLgl"],ea=["positioning","p"],ta=["tableFormat","tblpr"],ia=["allowOverlap","ao"],ra=["distanceTop","dt"],na=["distanceRight","dr"],oa=["distanceLeft","dl"],aa=["distanceBottom","db"],sa=["verticalOrigin","vo"],la=["verticalPosition","vp"],da=["horizontalOrigin","ho"],ha=["horizontalAlignment","ha"],ca=["horizontalPosition","hp"],ga=["blocks","b"],pa=["header","h"],ua=["footer","f"],fa=["evenHeader","eh"],ma=["evenFooter","ef"],ya=["firstPageHeader","fph"],va=["firstPageFooter","fpf"],Wa=["headersFooters","hf"],ba=["sectionFormat","secpr"],xa=["listLevelPattern","lilp"],wa=["followCharacter","fchar"],Fa=["numberAlignment","nalign"],Ca=["startAt","sa"],Pa=["restartLevel","rl"],Ta=["levelNumber","lvlno"],Oa=["numberFormat","nf"],Sa=["paraStyleName","psty"],Na=["abstractListId","alid"],Ia="nsid",ka=["levels","lvl"],Aa=["overrideListLevel","o"],La=["levelOverrides","lo"],Ua=["separator","s"],Ba=["continuationSeparator","cs"],Ha=["continuationNotice","cn"],Ra=["bookmarkType","bkt"],qa=["properties","p"],Ea=["tabJustification","tj"],Ma=["position","p"],Va=["deletePosition","dp"],Da=["tabLeader","tl"],za=["editRangeId","erid"],_a=["columnFirst","cft"],ja=["columnLast","clt"],Ga=["user","u"],Ka=["group","g"],Ya=["editableRangeStart","ers"],Xa=["space","sp"],Ja=["fontScheme","fsc"],Za=["fontSchemeName","fscn"],Qa=["majorFontScheme","majfs"],$a=["minorFontScheme","minfs"],es=["fontSchemeList","fsl"],ts=["fontTypeface","ft"],is=["typeface","t"],rs=["panose","p"],ns=["type","t"],os=["majorUnit","maju"],as=["isAutoMajor","iam"],ss=["maximumValue","maxv"],ls=["minimumValue","minv"],ds=["hasMajorGridLines","hmajgl"],hs=["hasMinorGridLines","hmingl"],cs=["majorTickMark","majtm"],gs=["minorTickMark","mintm"],ps=["tickLabelPosition","tlp"],us=["rgb","rgb"],fs=["appearance","a"],ms=["lineFormatType","lft"],ys=["allowSpaceOfSameStyleInTable","stytbl"],vs=["weight","w"],Ws=["inlineFormat","inf"],bs=["fontName","fn"],xs=["isCompressed","comp"],ws=["columnIndex","ci"],Fs=["images","imgs"],Cs=["isAfterParagraphMark","apm"],Ps=["isAfterCellMark","acm"],Ts=["isAfterRowMark","arm"],Os=["isAfterTableMark","atm"],Ss=["iOps"],Ns=["hidden","hdn"],Is=["specVanish","spv"],ks=["kern","krn"],As=["isKernFont","ikf"],Ls=["editingpoints","ep"],Us=["childShapes","csh"],Bs=["offsetXValue","oxv"],Hs=["offsetYValue","oyv"],Rs=["extentXValue","exv"],qs=["extentYValue","eyv"],Es=["coordinateXOrigin","cxo"],Ms=["coordinateYOrigin","cyo"],Vs=["coordinateSize","cos"],Ds=["is2007Shape","i2007s"],zs=["lineFromXPosition","lfx"],_s=["lineFromYPosition","lfy"],js=["lineToXPosition","ltx"],Gs=["lineToYPosition","lty"],K=(g.containsUnderlinedImage=function(e){for(var t=!1,i=0;i<e.children.length;i++){var r=e.children[i];if(r instanceof ie||r instanceof se||r instanceof te)return!1;r instanceof ae&&(t=0<r.getAllRevision().length&&"Insertion"===r.getRevision(0).revisionType||r.characterFormat&&"None"!==r.characterFormat.underline)}return t},g.checkTextFormat=function(e){return!(!/^(M{0,3})(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/i.test(e)&&!/^[0-9]+$/.test(e))},g.convertRgbToHex=function(e){e=e.toString(16);return 1===e.length?"0"+e:e},g.getHighlightColorCode=function(e){var t="#ffffff";switch(e){case"Yellow":t="#ffff00";break;case"BrightGreen":t="#00ff00";break;case"Turquoise":t="#00ffff";break;case"Pink":t="#ff00ff";break;case"Blue":t="#0000ff";break;case"Red":t="#ff0000";break;case"DarkBlue":t="#000080";break;case"Teal":t="#008080";break;case"Green":t="#008000";break;case"Violet":t="#800080";break;case"DarkRed":t="#800000";break;case"DarkYellow":t="#808000";break;case"Gray50":t="#808080";break;case"Gray25":t="#c0c0c0";break;case"Black":t="#000000"}return t},g.isVeryDark=function(e){e=e.substring(1);return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3<=60},g.getColor=function(e){return 0<e.length&&"#"===e[0]&&7<e.length?e.substr(0,7):e},g.getSfdtDocument=function(e){var t;return e=e instanceof Object?e:JSON.parse(e),G.isNullOrUndefined(e.sfdt)||((t=new f.ZipArchive).open(JSON.stringify(e.sfdt)),t=t.items[0],t=new Uint8Array(t.data),t=new TextDecoder("utf-8").decode(t),e=JSON.parse(t)),e},g.indexOfAny=function(e,t){for(var i=void 0,r=0;r<t.length;r++){var n=e.indexOf(t[parseInt(r.toString(),10)]);(-1!==n&&G.isNullOrUndefined(i)||-1!==n&&n<i)&&(i=n)}return G.isNullOrUndefined(i)?-1:i},g.convertHexToRgb=function(e){var t,i,r,n;if(e)return e=e.replace(/[^0-9A-‌​F]/gi,""),n=parseInt(e,16),8===e.length?(t=n>>32&255,i=n>>16&255,r=n>>8&255):6===e.length&&(t=n>>16&255,i=n>>8&255,r=255&n),{r:t,g:i,b:r}},g.convertPointToPixel=function(e){e=g.round(void 0!==e?e:0,5);return g.round(96*e/72,5)},g.convertPixelToPoint=function(e){return g.round(72*(void 0!==e?e:0)/96,5)},g.isLinkedFieldCharacter=function(e){return e instanceof te&&0===e.fieldType?!G.isNullOrUndefined(e.fieldEnd):e instanceof te&&2===e.fieldType?!G.isNullOrUndefined(e.fieldBegin)&&!G.isNullOrUndefined(e.fieldEnd):!G.isNullOrUndefined(e.fieldBegin)},g.removeSpace=function(e){if(!G.isNullOrUndefined(e)&&0!==e.length)for(var t=0;t<e.length;t++)" "===e.charAt(t)&&(e=e.replace(" ",""));return e},g.trimStart=function(e){for(var t=0;t<e.length&&" "===e[parseInt(t.toString(),10)];t++);return e.substring(t,e.length)},g.trimEnd=function(e){for(var t=e.length-1;0<=t&&" "===e[parseInt(t.toString(),10)];t--);return e.substring(0,t+1)},g.endsWith=function(e){return!G.isNullOrUndefined(e)&&0!==e.length&&" "===e[e.length-1]},g.addSpace=function(e){var t="";if(0<e)for(var i=0;i<e;i++)t+=" ";return t},g.getBoolValue=function(e){return e?1:0},g.getBoolInfo=function(e,t){return 1===t?this.getBoolValue(e):e},g.parseBoolValue=function(e){return e instanceof String?!G.isNullOrUndefined(e)&&"f"!==e&&"0"!==e&&"off"!==e&&"false"!==e:1==e},g.getBaselineAlignmentEnumValue=function(e){switch(e){case"Normal":return 0;case"Superscript":return 1;case"Subscript":return 2}},g.getFontHintTypeEnumValue=function(e){switch(e){case"Default":return 0;case"EastAsia":return 1;case"CS":return 2}},g.getUnderlineEnumValue=function(e){switch(e){case"None":return 0;case"Single":return 1;case"Words":return 2;case"Double":return 3;case"Dotted":return 4;case"Thick":return 5;case"Dash":return 6;case"DashLong":return 7;case"DotDash":return 8;case"DotDotDash":return 9;case"Wavy":return 10;case"DottedHeavy":return 11;case"DashHeavy":return 12;case"DashLongHeavy":return 13;case"DotDashHeavy":return 14;case"DotDotDashHeavy":return 15;case"WavyHeavy":return 16;case"WavyDouble":return 17}},g.getStrikeThroughEnumValue=function(e){switch(e){case"None":return 0;case"SingleStrike":return 1;case"DoubleStrike":return 2}},g.getHighlightColorEnumValue=function(e){switch(e){case"NoColor":return 0;case"Yellow":return 1;case"BrightGreen":return 2;case"Turquoise":return 3;case"Pink":return 4;case"Blue":return 5;case"Red":return 6;case"DarkBlue":return 7;case"Teal":return 8;case"Green":return 9;case"Violet":return 10;case"DarkRed":return 11;case"DarkYellow":return 12;case"Gray50":return 13;case"Gray25":return 14;case"Black":return 15;default:return e}},g.getBiDirectionalOverride=function(e){switch(e){case"None":return 0;case"LTR":return 1;case"RTL":return 2}},g.getOutlineLevelEnumValue=function(e){switch(e){case"BodyText":return 0;case"Level1":return 1;case"Level2":return 2;case"Level3":return 3;case"Level4":return 4;case"Level5":return 5;case"Level6":return 6;case"Level7":return 7;case"Level8":return 8;case"Level9":return 9}},g.getTextAlignmentEnumValue=function(e){switch(e){case"Left":return 0;case"Center":return 1;case"Right":return 2;case"Justify":return 3}},g.getLineStyleEnumValue=function(e){switch(e){case"Single":return 0;case"None":return 1;case"Dot":return 2;case"DashSmallGap":return 3;case"DashLargeGap":return 4;case"DashDot":return 5;case"DashDotDot":return 6;case"Double":return 7;case"Triple":return 8;case"ThinThickSmallGap":return 9;case"ThickThinSmallGap":return 10;case"ThinThickThinSmallGap":return 11;case"ThinThickMediumGap":return 12;case"ThickThinMediumGap":return 13;case"ThinThickThinMediumGap":return 14;case"ThinThickLargeGap":return 15;case"ThickThinLargeGap":return 16;case"ThinThickThinLargeGap":return 17;case"SingleWavy":return 18;case"DoubleWavy":return 19;case"DashDotStroked":return 20;case"Emboss3D":return 21;case"Engrave3D":return 22;case"Outset":return 23;case"Inset":return 24;case"Thick":return 25;case"Cleared":return 26}},g.getLineSpacingTypeEnumValue=function(e){switch(e){case"Multiple":return 0;case"AtLeast":return 1;case"Exactly":return 2;case"Single":return 3;case"Double":return 4}},g.writeBorder=function(e,t){var i={};return i[vn[t]]=e.hasValue("color")?e.color:void 0,i[Di[t]]=e.hasValue("hasNoneStyle")?g.getBoolInfo(e.hasNoneStyle,t):void 0,i[Ki[t]]=e.hasValue("lineStyle")?1==t?this.getLineStyleEnumValue(e.lineStyle):e.lineStyle:void 0,i[Yi[t]]=e.hasValue("lineWidth")?e.lineWidth:void 0,i[Vi[t]]=e.hasValue("shadow")?g.getBoolInfo(e.shadow,t):void 0,i[Xa[t]]=e.hasValue("space")?e.space:void 0,i},g.writeBorders=function(e,t){var i={};return i[Sn[t]]=this.writeBorder(e.getBorder("top"),t),i[kn[t]]=this.writeBorder(e.getBorder("left"),t),i[In[t]]=this.writeBorder(e.getBorder("right"),t),i[Nn[t]]=this.writeBorder(e.getBorder("bottom"),t),i[_i[t]]=this.writeBorder(e.getBorder("horizontal"),t),i[zi[t]]=this.writeBorder(e.getBorder("vertical"),t),i},g.writeParagraphFormat=function(e,t,i,r){r=G.isNullOrUndefined(r)?0:r,e[Vt[r]]=this.writeBorders(i.borders,r),e[Pt[r]]=t?i.leftIndent:i.getValue("leftIndent"),e[Tt[r]]=t?i.rightIndent:i.getValue("rightIndent"),e[Ot[r]]=t?i.firstLineIndent:i.getValue("firstLineIndent"),e[St[r]]=t?1==r?this.getTextAlignmentEnumValue(i.textAlignment):i.textAlignment:1==r?this.getTextAlignmentEnumValue(i.getValue("textAlignment")):i.getValue("textAlignment"),e[It[r]]=t?i.beforeSpacing:i.getValue("beforeSpacing"),e[Nt[r]]=t?i.afterSpacing:i.getValue("afterSpacing"),e[At[r]]=t?g.getBoolInfo(i.spaceBeforeAuto,r):i.getValue("spaceBeforeAuto"),e[kt[r]]=t?g.getBoolInfo(i.spaceAfterAuto,r):i.getValue("spaceAfterAuto"),e[Lt[r]]=t?i.lineSpacing:i.getValue("lineSpacing"),e[Ut[r]]=t?1==r?this.getLineSpacingTypeEnumValue(i.lineSpacingType):i.lineSpacingType:1==r?this.getLineSpacingTypeEnumValue(i.getValue("lineSpacingType")):i.getValue("lineSpacingType"),e[st[r]]=G.isNullOrUndefined(i.baseStyle)?void 0:i.baseStyle.name,e[Et[r]]=t?1==r?this.getOutlineLevelEnumValue(i.outlineLevel):i.outlineLevel:1==r?this.getOutlineLevelEnumValue(i.getValue("outlineLevel")):i.getValue("outlineLevel"),e[lt[r]]=t?g.getBoolInfo(i.bidi,r):i.getValue("bidi"),e[qt[r]]=t?g.getBoolInfo(i.keepLinesTogether,r):i.getValue("keepLinesTogether"),e[Ht[r]]=t?g.getBoolInfo(i.keepWithNext,r):i.getValue("keepWithNext"),e[Mt[r]]=t?g.getBoolInfo(i.contextualSpacing,r):i.getValue("contextualSpacing"),e[Rt[r]]=t?g.getBoolInfo(i.widowControl,r):i.getValue("widowControl")},g.writeCharacterFormat=function(e,t,i,r,n){r=G.isNullOrUndefined(r)?0:r,e[Xe[r]]=n||t?g.getBoolInfo(i.bold,r):i.getValue("bold"),e[Je[r]]=n||t?g.getBoolInfo(i.italic,r):i.getValue("italic"),e[nt[r]]=n?i.fontSize:t?this.toWriteInline(i,"fontSize"):i.getValue("fontSize"),e[at[r]]=n?i.fontFamily:t?this.toWriteInline(i,"fontFamily"):i.getValue("fontFamily"),e[Qe[r]]=n?i.underline:t?1==r?g.getUnderlineEnumValue(i.underline):i.underline:1==r?g.getUnderlineEnumValue(i.getValue("underline")):i.getValue("underline"),e[$e[r]]=n?i.underlineColor:t?this.toWriteInline(i,"underlineColor"):i.getValue("underlineColor"),e[et[r]]=n?i.fontHintType:t?1==r?g.getFontHintTypeEnumValue(i.fontHintType):i.fontHintType:1==r?g.getFontHintTypeEnumValue(i.getValue("fontHintType")):i.getValue("fontHintType"),e[it[r]]=n?i.strikethrough:t?1==r?g.getStrikeThroughEnumValue(i.strikethrough):i.strikethrough:1==r?g.getStrikeThroughEnumValue(i.getValue("strikethrough")):i.getValue("strikethrough"),e[tt[r]]=n?i.baselineAlignment:t?1==r?g.getBaselineAlignmentEnumValue(i.baselineAlignment):i.baselineAlignment:1==r?g.getBaselineAlignmentEnumValue(i.getValue("baselineAlignment")):i.getValue("baselineAlignment"),e[rt[r]]=n?i.highlightColor:t?1==r?g.getHighlightColorEnumValue(i.highlightColor):i.highlightColor:1==r?g.getHighlightColorEnumValue(i.getValue("highlightColor")):i.getValue("highlightColor"),e[ot[r]]=n?i.fontColor:t?this.toWriteInline(i,"fontColor"):i.getValue("fontColor"),e[st[r]]=G.isNullOrUndefined(i.baseCharStyle)?void 0:i.baseCharStyle.name,e[lt[r]]=n?i.bidi:t?g.getBoolInfo(i.bidi,r):i.getValue("bidi"),e[dt[r]]=n?i.bdo:t?1==r?g.getBiDirectionalOverride(i.bdo):i.bdo:1==r?g.getBiDirectionalOverride(i.getValue("bdo")):i.getValue("bdo"),e[pt[r]]=n?i.boldBidi:t?g.getBoolInfo(i.boldBidi,r):i.getValue("boldBidi"),e[ut[r]]=n?i.italicBidi:t?g.getBoolInfo(i.italicBidi,r):i.getValue("italicBidi"),e[ct[r]]=n||t?i.fontSizeBidi:i.getValue("fontSizeBidi"),e[gt[r]]=n||t?i.fontFamilyBidi:i.getValue("fontFamilyBidi"),e[ft[r]]=n?i.allCaps:t?g.getBoolInfo(i.allCaps,r):i.getValue("allCaps"),e[Ye[r]]=n||t?i.localeIdBidi:i.getValue("localeIdBidi"),e[Ze[r]]=n||t?i.ligature:i.getValue("ligature"),e[Ge[r]]=n?i.localeIdBidi:t?i.localeIdAscii:i.getValue("localeIdAscii"),e[Ke[r]]=n||t?i.localeIdFarEast:i.getValue("localeIdFarEast"),e[mt[r]]=n?i.complexScript:t?g.getBoolInfo(i.complexScript,r):i.getValue("complexScript"),i.hasValue("hidden")&&(e[Ns[r]]=n?i.hidden:t?g.getBoolInfo(i.hidden,r):i.getValue("hidden")),i.hasValue("specVanish")&&(e[Is[r]]=n?i.specVanish:t?g.getBoolInfo(i.specVanish,r):i.getValue("specVanish")),e[yt[r]]=n?i.fontFamilyAscii:t?this.toWriteInline(i,"fontFamilyAscii"):i.getValue("fontFamilyAscii"),e[Wt[r]]=n?i.fontFamilyNonFarEast:t?this.toWriteInline(i,"fontFamilyNonFarEast"):i.getValue("fontFamilyNonFarEast"),e[vt[r]]=n?i.fontFamilyFarEast:t?this.toWriteInline(i,"fontFamilyFarEast"):i.getValue("fontFamilyFarEast"),e[wt[r]]=n?i.characterSpacing:t?this.toWriteInline(i,"characterSpacing"):i.getValue("characterSpacing"),e[Ft[r]]=n?i.scaling:t?this.toWriteInline(i,"scaling"):i.getValue("scaling"),(i.hasValue("fontFamily")||n)&&(G.isNullOrUndefined(e[yt[r]])&&(e[yt[r]]=i.fontFamily),G.isNullOrUndefined(e[Wt[r]]))&&(e[Wt[r]]=i.fontFamily)},g.isThemeFont=function(e){return"majorAscii"==e||"majorBidi"==e||"majorEastAsia"==e||"majorHAnsi"==e||"minorAscii"==e||"minorBidi"==e||"minorEastAsia"==e||"minorHAnsi"==e},g.toWriteInline=function(e,t){return G.isNullOrUndefined(e.ownerBase)||!(e.ownerBase instanceof ld)||e.hasValue(t)?e[t]:e.getValue(t)},g.round=function(e,t){for(var i=e,r=0;r<t;r++)i*=10;for(i=Math.round(i),r=0;r<t;r++)i/=10;return i},g.reverseString=function(e){return e=G.isNullOrUndefined(e)||""===e?e:e.split("").reverse().join("")},g.formatClippedString=function(e){var t="",i="";return this.startsWith(e,"data:image/svg+xml;base64,")?(t=".svg",i=e.replace("data:image/svg+xml;base64,","")):this.startsWith(e,"data:image/svg+xml;utf8,")?(t=".svg",i=e.replace("data:image/svg+xml;utf8,","")):this.startsWith(e,"data:image/bmp;base64,")?(t=".bmp",i=e.replace("data:image/bmp;base64,","")):this.startsWith(e,"data:image/x-emf;base64,")?(t=".emf",i=e.replace("data:image/x-emf;base64,","")):this.startsWith(e,"data:image/exif;base64,")?(t=".exif",i=e.replace("data:image/exif;base64,","")):this.startsWith(e,"data:image/gif;base64,")?(t=".gif",i=e.replace("data:image/gif;base64,","")):this.startsWith(e,"data:image/icon;base64,")?(t=".ico",i=e.replace("data:image/icon;base64,","")):this.startsWith(e,"data:image/jpeg;base64,")?(t=".jpeg",i=e.replace("data:image/jpeg;base64,","")):this.startsWith(e,"data:image/jpg;base64,")?(t=".jpg",i=e.replace("data:image/jpg;base64,","")):this.startsWith(e,"data:image/png;base64,")?(t=".png",i=e.replace("data:image/png;base64,","")):this.startsWith(e,"data:image/tiff;base64,")?(t=".tif",i=e.replace("data:image/tiff;base64,","")):this.startsWith(e,"data:image/x-wmf;base64,")?(t=".wmf",i=e.replace("data:image/x-wmf;base64,","")):t=".jpeg",{extension:t,formatClippedString:i}},g.startsWith=function(e,t){return 0<t.length&&e.substring(0,t.length)===t},g.getUtcDate=function(e){return G.isNullOrUndefined(e)&&(e=new Date),new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString()},g.splitSpaceInTextElementBox=function(e,t){var i=e.text,r="";if(t)for(;g.startsWith(i," ");)r+=" ",i=i.substring(1);else for(;g.endsWith(i);)r+=" ",i=i.slice(0,-1);if(""!=r){var n=new ie,o=(n.characterFormat.copyFormat(e.characterFormat),n.line=e.line,n.line.children);if(t?(e.text=r,n.text=i):(e.text=i,n.text=r),o.splice(o.indexOf(e)+1,0,n),0<e.revisionLength)for(var a=0;a<e.revisionLength;a++){var s=e.getRevision(a);n.addRevision(s)}}},g.getTextIndexAfterWhitespace=function(e,t){var i=e.length,r=e.indexOf(" ",t)+1;if(0!==r&&r!==i)for(;" "===e[r]&&++r!==i;);return r},g.splitWordByMaxLength=function(e,t,i){for(var r=e.text,n=0,o=r.length,a=e.characterFormat,s=t.children.indexOf(e);n<o;){var l=n+90,d=g.getTextIndexAfterWhitespace(r,l=o<l?o:l);if((0===d||o<d)&&(d=l),l=r.substring(n,d),0===n)e.text=l,e.isWidthUpdated=!1;else{var h=new ie;if(h.text=l,h.line=t,h.characterFormat.copyFormat(a),i?t.children.push(h):(t.children.splice(s+1,0,h),s++),0<e.revisionLength)for(var c=0;c<e.revisionLength;c++)h.addRevision(e.getRevision(c))}n=d}},g);function g(){}Object.defineProperty(Ys.prototype,"x",{get:function(){return this.xIn},set:function(e){this.xIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(Ys.prototype,"y",{get:function(){return this.yIn},set:function(e){this.yIn=e},enumerable:!0,configurable:!0}),Ys.prototype.copy=function(e){this.xIn=e.xIn,this.yIn=e.yIn},Ys.prototype.destroy=function(){this.xIn=void 0,this.yIn=void 0};var Ks=Ys;function Ys(e,t){this.xIn=0,this.yIn=0,this.xIn=e,this.yIn=t}Object.defineProperty(Js.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0});var Xs=Js;function Js(e,t){this.x=0,this.width=0,this.x=e,this.width=t}Object.defineProperty(Qs.prototype,"left",{get:function(){return this.leftIn},set:function(e){this.leftIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(Qs.prototype,"width",{get:function(){return this.widthIn},set:function(e){this.widthIn=e},enumerable:!0,configurable:!0}),Qs.prototype.destroy=function(){this.widthIn=void 0,this.leftIn=void 0,this.floatingItems=[],this.floatingItems=void 0};var Zs=Qs;function Qs(e,t){this.leftIn=0,this.widthIn=0,this.color="",this.leftIn=e,this.widthIn=t}Object.defineProperty(el.prototype,"left",{get:function(){return this.leftInternal},set:function(e){this.leftInternal=e},enumerable:!0,configurable:!0}),Object.defineProperty(el.prototype,"width",{get:function(){return this.widthInternal},set:function(e){this.widthInternal=e},enumerable:!0,configurable:!0});var $s=el;function el(e,t){this.leftInternal=0,this.widthInternal=0,this.leftInternal=e,this.widthInternal=t}function tl(){}il=function(e,t){return(il=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var il,rl,e=function(e,t){function i(){this.constructor=e}il(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},nl=(e(ol,rl=tl),ol.prototype.clear=function(){this.characterFormat&&this.characterFormat.clearFormat(),this.paragraphFormat&&this.paragraphFormat.clearFormat()},ol.prototype.destroy=function(){this.characterFormat&&(this.characterFormat.destroy(),this.characterFormat=void 0),this.paragraphFormat&&(this.paragraphFormat.destroy(),this.paragraphFormat=void 0),this.ownerBase=void 0,this.name=void 0,this.next=void 0,this.basedOn=void 0,this.link=void 0},ol.prototype.copyStyle=function(e){this.name=e.name,this.ownerBase=e.ownerBase,this.type=e.type,this.next=e.next,this.basedOn=e.basedOn,this.link=e.link,this.characterFormat.copyFormat(e.characterFormat),this.paragraphFormat.copyFormat(e.paragraphFormat)},ol);function ol(e){var t=rl.call(this)||this;return t.ownerBase=e,t.paragraphFormat=new vl(t),t.characterFormat=new ce(t),t}e(ll,al=tl),ll.prototype.clear=function(){this.characterFormat&&this.characterFormat.clearFormat()},ll.prototype.destroy=function(){this.characterFormat&&(this.characterFormat.destroy(),this.characterFormat=void 0),this.ownerBase=void 0,this.name=void 0,this.next=void 0,this.basedOn=void 0,this.link=void 0},ll.prototype.copyStyle=function(e){this.name=e.name,this.ownerBase=e.ownerBase,this.type=e.type,this.next=e.next,this.basedOn=e.basedOn,this.characterFormat.copyFormat(e.characterFormat)};var al,sl=ll;function ll(e){var t=al.call(this)||this;return t.ownerBase=e,t.characterFormat=new ce(t),t}e(cl,dl=tl),cl.prototype.destroy=function(){this.ownerBase=void 0,this.name=void 0,this.next=void 0,this.basedOn=void 0,this.link=void 0};var dl,hl=cl;function cl(e){var t=dl.call(this)||this;return t.ownerBase=e,t}Object.defineProperty(pl.prototype,"length",{get:function(){return this.collection.length},enumerable:!0,configurable:!0}),pl.prototype.remove=function(t){this.collection=this.collection.filter(function(e){return e.name!==t.name})},pl.prototype.push=function(e){return null!=e&&void 0!==e&&this.collection.push(e),1},pl.prototype.getItem=function(e){return this.collection.length>e?this.collection[parseInt(e.toString(),10)]:null},pl.prototype.indexOf=function(e){return this.collection.indexOf(e)},pl.prototype.contains=function(e){e=this.collection.indexOf(e);return-1<e&&e<this.collection.length},pl.prototype.clear=function(){if(this.collection&&0<this.collection.length)for(var e=0;e<this.collection.length;e++){var t=this.collection[parseInt(e.toString(),10)];(t instanceof sl||t instanceof nl)&&t.clear()}this.collection=[]},pl.prototype.findByName=function(e,t){for(var i,r=0,n=this.collection;r<n.length;r++){var o=n[r];o.name===e&&(i=o,G.isNullOrUndefined(t)||o.type!==t&&(i=void 0))}return i},pl.prototype.getStyleNames=function(t){return this.collection.filter(function(e){return e.type===t}).map(function(e){return e.name})},pl.prototype.getStyles=function(t){for(var e=[],i=0,r=this.collection.filter(function(e){return e.type===t}).map(function(e){return e});i<r.length;i++){var n=r[i],o={},a={};"Paragraph"===t&&(a.paragraphFormat={},K.writeParagraphFormat(a.paragraphFormat,!0,n.paragraphFormat)),"Table"!==t&&(a.characterFormat={},K.writeCharacterFormat(a.characterFormat,!0,n.characterFormat)),o.name=n.name,o.style=JSON.stringify(a),G.isNullOrUndefined(t)||(o.type=t,"Paragraph"!==o.type)||G.isNullOrUndefined(n.link)||(o.type="Linked"),e.push(o)}return e},pl.prototype.destroy=function(){if(this.collection&&0<this.collection.length)for(var e=0;e<this.collection.length;e++){var t=this.collection[parseInt(e.toString(),10)];(t instanceof sl||t instanceof nl||t instanceof hl)&&t.destroy()}this.collection=[],this.collection=void 0};var gl=pl;function pl(){this.collection=[]}Object.defineProperty(fl.prototype,"nsid",{get:function(){return this.getPropertyValue("nsid")},set:function(e){this.setPropertyValue("nsid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(fl.prototype,"listId",{get:function(){return this.getPropertyValue("listId")},set:function(e){var t;0<=e?G.isNullOrUndefined(this.ownerBase)||(t=this.ownerBase.getDocumentHelperObject(),G.isNullOrUndefined(t))||(this.list=t.getListById(e)):!G.isNullOrUndefined(this.list)&&e<0&&(this.list=void 0),this.setPropertyValue("listId",e)},enumerable:!0,configurable:!0}),Object.defineProperty(fl.prototype,"listLevelNumber",{get:function(){return this.getPropertyValue("listLevelNumber")},set:function(e){this.setPropertyValue("listLevelNumber",e)},enumerable:!0,configurable:!0}),Object.defineProperty(fl.prototype,"listLevel",{get:function(){var e=void 0;if(G.isNullOrUndefined(this.list))for(var t=this.baseStyle;!G.isNullOrUndefined(t)&&t instanceof nl;){if(t.paragraphFormat.listFormat.list){e=t.paragraphFormat.listFormat.list;break}t=t.basedOn}else e=this.list;if(!G.isNullOrUndefined(e))return e.getListLevel(this.listLevelNumber)},enumerable:!0,configurable:!0}),fl.prototype.getPropertyValue=function(e){if(this.hasValue(e)){t=l.getPropertyType(fl.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueListFormat)&&this.uniqueListFormat.propertiesHash.containsKey(t))return this.uniqueListFormat.propertiesHash.get(t)}else if(this.baseStyle instanceof nl){for(var t,i=this.baseStyle;!G.isNullOrUndefined(i)&&!i.paragraphFormat.listFormat.hasValue(e);)i=i.basedOn;if(!G.isNullOrUndefined(i))return t=l.getPropertyType(fl.uniqueFormatType,e),i.paragraphFormat.listFormat.uniqueListFormat.propertiesHash.get(t)}return fl.getPropertyDefaultValue(e)},fl.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=fl.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueListFormat)?this.initializeUniqueListFormat(e,t):(i=l.getPropertyType(this.uniqueListFormat.uniqueFormatType,e),this.uniqueListFormat.propertiesHash.containsKey(i)&&this.uniqueListFormat.propertiesHash.get(i)===t||(this.uniqueListFormat=fl.uniqueListFormats.updateUniqueFormat(this.uniqueListFormat,e,t)))},fl.prototype.initializeUniqueListFormat=function(e,t){var i=new N;this.addUniqueListFormat("listId",e,t,i),this.addUniqueListFormat("listLevelNumber",e,t,i),this.addUniqueListFormat("nsid",e,t,i),this.uniqueListFormat=fl.uniqueListFormats.addUniqueFormat(i,fl.uniqueFormatType)},fl.prototype.addUniqueListFormat=function(e,t,i,r){var n=l.getPropertyType(fl.uniqueFormatType,e);e===t&&r.add(n,i)},fl.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"listId":t=-1;break;case"listLevelNumber":t=0;break;case"nsid":t=-1}return t},fl.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e.uniqueListFormat)&&(G.isNullOrUndefined(e.baseStyle)||G.isNullOrUndefined(e.baseStyle.paragraphFormat.listFormat)||G.isNullOrUndefined(e.baseStyle.paragraphFormat.listFormat.uniqueListFormat)||!G.isNullOrUndefined(e.list))||(this.listId=e.listId,this.listLevelNumber=e.listLevelNumber,this.nsid=e.nsid),G.isNullOrUndefined(e.baseStyle)||(this.baseStyle=e.baseStyle),G.isNullOrUndefined(e.list))||(this.list=e.list)},fl.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueListFormat)&&(e=l.getPropertyType(this.uniqueListFormat.uniqueFormatType,e),this.uniqueListFormat.propertiesHash.containsKey(e))},fl.prototype.clearFormat=function(){G.isNullOrUndefined(this.uniqueListFormat)||0!==this.uniqueListFormat.referenceCount||fl.uniqueListFormats.remove(this.uniqueListFormat),this.uniqueListFormat=void 0,this.list=void 0},fl.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueListFormat)||fl.uniqueListFormats.remove(this.uniqueListFormat),this.uniqueListFormat=void 0,this.list=void 0,this.ownerBase=void 0,this.baseStyle=void 0},fl.clear=function(){this.uniqueListFormats.clear()},fl.prototype.applyStyle=function(e){this.baseStyle=e},fl.prototype.getValue=function(e){return this.hasValue(e)?this.getPropertyValue(e):void 0},fl.prototype.cloneListFormat=function(){var e=new fl(void 0);return e.list=this.list,e.listId=this.listId,e.nsid=this.nsid,e.baseStyle=this.baseStyle,e.listLevelNumber=this.listLevelNumber,e.uniqueListFormat=this.uniqueListFormat,e},fl.uniqueListFormats=new W,fl.uniqueFormatType=7;var ul=fl;function fl(e){this.uniqueListFormat=void 0,this.ownerBase=void 0,this.baseStyle=void 0,this.list=void 0,this.ownerBase=e}Object.defineProperty(yl.prototype,"position",{get:function(){return this.positionIn},set:function(e){this.positionIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(yl.prototype,"deletePosition",{get:function(){return this.deletePositionIn},set:function(e){this.deletePositionIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(yl.prototype,"tabJustification",{get:function(){return this.justification},set:function(e){this.justification=e},enumerable:!0,configurable:!0}),Object.defineProperty(yl.prototype,"tabLeader",{get:function(){return this.leader},set:function(e){this.leader=e},enumerable:!0,configurable:!0}),yl.prototype.clone=function(){var e=new yl;return e.deletePosition=this.deletePosition,e.position=this.position,e.tabJustification=this.tabJustification,e.tabLeader=this.tabLeader,e},yl.prototype.equals=function(e){return this.position===e.position&&this.deletePosition===e.deletePosition&&this.tabJustification===e.tabJustification&&this.tabLeader===e.tabLeader},yl.prototype.destroy=function(){this.position=void 0,this.deletePosition=void 0,this.tabJustification=void 0,this.leader=void 0};var ml=yl;function yl(){}d.prototype.getUpdatedTabs=function(){for(var e=[],t=new N,i=0,r=this.getTabStopsFromListFormat();i<r.length;i++){var n=r[i];t.containsKey(n.position)||t.add(n.position,n)}if(!G.isNullOrUndefined(this.baseStyle)&&this.baseStyle instanceof nl){for(var o=this.baseStyle;!G.isNullOrUndefined(o);){for(var a=0,s=o.paragraphFormat.tabs;a<s.length;a++){var l=s[a];t.containsKey(l.position)||t.add(l.position,l)}o=o.basedOn}var d=[];t.keys.forEach(function(e){d.push(t.get(e))});for(var h=0;h<d.length;h++){n=d[h];this.isValidTabStop(d,n)||t.remove(n.position)}for(var c=0,g=t.keys;c<g.length;c++){var p=g[c];this.hasTabStop(parseFloat(p.toFixed(4)))||e.push(t.get(p))}}return e=(e=e.concat(this.tabs.filter(function(e){return 0!==e.position&&0===e.deletePosition}))).sort(function(e,t){return e.position-t.position})},d.prototype.getTabStopsFromListFormat=function(){if(-1<this.listFormat.listId&&-1<this.listFormat.listLevelNumber){var e=this.listFormat.listLevel;if(e&&e.paragraphFormat)return e.paragraphFormat.tabs}return[]},d.prototype.isValidTabStop=function(e,t){for(var i=0;i<e.length;i++)if(!G.isNullOrUndefined(e[i].position)&&!G.isNullOrUndefined(e[i].deletePosition)&&!G.isNullOrUndefined(t.position)&&t!=e[i]&&(parseFloat(e[i].position.toFixed(4))===parseFloat(t.position.toFixed(4))||0!==parseFloat(e[i].deletePosition.toFixed(4))&&parseFloat(e[i].deletePosition.toFixed(4))===parseFloat(t.position.toFixed(4))))return!1;return!0},d.prototype.hasTabStop=function(e){for(var t=0;t<this.tabs.length;t++)if(!(G.isNullOrUndefined(this.tabs[t].position)||G.isNullOrUndefined(this.tabs[t].deletePosition)||parseFloat(this.tabs[t].position.toFixed(4))!==e&&parseFloat(this.tabs[t].deletePosition.toFixed(4))!==e))return!0;return!1},Object.defineProperty(d.prototype,"leftIndent",{get:function(){return this.getPropertyValue("leftIndent")},set:function(e){this.setPropertyValue("leftIndent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"rightIndent",{get:function(){return this.getPropertyValue("rightIndent")},set:function(e){this.setPropertyValue("rightIndent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"firstLineIndent",{get:function(){return this.getPropertyValue("firstLineIndent")},set:function(e){this.setPropertyValue("firstLineIndent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"beforeSpacing",{get:function(){return this.getPropertyValue("beforeSpacing")},set:function(e){this.setPropertyValue("beforeSpacing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"afterSpacing",{get:function(){return this.getPropertyValue("afterSpacing")},set:function(e){this.setPropertyValue("afterSpacing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"spaceBeforeAuto",{get:function(){return this.getPropertyValue("spaceBeforeAuto")},set:function(e){this.setPropertyValue("spaceBeforeAuto",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"spaceAfterAuto",{get:function(){return this.getPropertyValue("spaceAfterAuto")},set:function(e){this.setPropertyValue("spaceAfterAuto",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"lineSpacing",{get:function(){return this.getPropertyValue("lineSpacing")},set:function(e){this.setPropertyValue("lineSpacing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"lineSpacingType",{get:function(){return this.getPropertyValue("lineSpacingType")},set:function(e){this.setPropertyValue("lineSpacingType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"textAlignment",{get:function(){var e=this.getPropertyValue("textAlignment");return this.bidi&&("Left"===e?e="Right":"Right"===e&&(e="Left")),e},set:function(e){this.setPropertyValue("textAlignment",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"keepWithNext",{get:function(){return this.getPropertyValue("keepWithNext")},set:function(e){this.setPropertyValue("keepWithNext",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"keepLinesTogether",{get:function(){return this.getPropertyValue("keepLinesTogether")},set:function(e){this.setPropertyValue("keepLinesTogether",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"widowControl",{get:function(){return this.getPropertyValue("widowControl")},set:function(e){this.setPropertyValue("widowControl",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"outlineLevel",{get:function(){return this.getPropertyValue("outlineLevel")},set:function(e){this.setPropertyValue("outlineLevel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"bidi",{get:function(){return this.getPropertyValue("bidi")},set:function(e){this.setPropertyValue("bidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"contextualSpacing",{get:function(){return this.getPropertyValue("contextualSpacing")},set:function(e){this.setPropertyValue("contextualSpacing",e)},enumerable:!0,configurable:!0}),d.prototype.getListFormatParagraphFormat=function(e){var t=this.getListPargaraphFormat(e);if(!G.isNullOrUndefined(t))return t.uniqueParagraphFormat.propertiesHash.get(l.getPropertyType(d.uniqueFormatType,e))},d.prototype.getListPargaraphFormat=function(e){var t,i;return this.listFormat.hasValue("listId")&&-1<this.listFormat.listId&&-1<this.listFormat.listLevelNumber?(t=this.listFormat.listLevel,i=l.getPropertyType(d.uniqueFormatType,e),G.isNullOrUndefined(t)||G.isNullOrUndefined(t.paragraphFormat.uniqueParagraphFormat)||!t.paragraphFormat.uniqueParagraphFormat.propertiesHash.containsKey(i)?void 0:t.paragraphFormat):!this.listFormat.hasValue("listId")||-1!==this.listFormat.listId||"leftIndent"!==e&&"firstLineIndent"!==e?void 0:(i=new d,this.hasValue("leftIndent")||(i.leftIndent=0),this.hasValue("firstLineIndent")||(i.firstLineIndent=0),i)},d.prototype.getPropertyValue=function(e){if(this.hasValue(e)){s=l.getPropertyType(d.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueParagraphFormat)&&this.uniqueParagraphFormat.propertiesHash.containsKey(s))return this.uniqueParagraphFormat.propertiesHash.get(s)}else{var t=this.getListFormatParagraphFormat(e),i=this.listFormat.hasValue("listId")&&-1===this.listFormat.listId&&("leftIndent"===e||"firstLineIndent"===e);if(this.baseStyle instanceof nl&&!i){for(var r=this,n=this.baseStyle;!G.isNullOrUndefined(n);){var o=void 0;if(this.listFormat.hasValue("listId")||(o=n.paragraphFormat.getListPargaraphFormat(e)),n.paragraphFormat.hasValue(e)){r=n.paragraphFormat;break}if(!G.isNullOrUndefined(o)&&o.hasValue(e)){if(n.paragraphFormat.listFormat.listLevelNumber!==this.listFormat.listLevelNumber){var a=this.listFormat.listLevel,s=l.getPropertyType(d.uniqueFormatType,e);if(!G.isNullOrUndefined(a)&&!G.isNullOrUndefined(a.paragraphFormat.uniqueParagraphFormat)&&a.paragraphFormat.uniqueParagraphFormat.propertiesHash.containsKey(s)){r=a.paragraphFormat;break}}r=o;break}n=n.basedOn}if(!G.isNullOrUndefined(n))return!G.isNullOrUndefined(t)&&this.listFormat.hasValue("listId")&&-1===r.listFormat.listId&&r.listFormat.listLevelNumber<=1||!G.isNullOrUndefined(t)&&this.listFormat.listId!==r.listFormat.listId&&r.listFormat.listLevelNumber<=1?t:(s=l.getPropertyType(d.uniqueFormatType,e),r.uniqueParagraphFormat.propertiesHash.get(s))}if(!G.isNullOrUndefined(t))return t}return this.getDefaultValue(e)},d.prototype.getDefaultValue=function(e){var t=l.getPropertyType(d.uniqueFormatType,e),i=this.getDocumentParagraphFormat(),r=i.docParagraphFormat,i=i.editorFormat;if(!G.isNullOrUndefined(r)&&!G.isNullOrUndefined(r.uniqueParagraphFormat)){var n=this.ownerBase,o=!1;if(o=n&&n instanceof Z?(n=n.containerWidget)instanceof Vl||n instanceof P||n instanceof ee:o){n=r.uniqueParagraphFormat.propertiesHash.get(t);if(!G.isNullOrUndefined(n))return n}}return!G.isNullOrUndefined(i)&&i.hasOwnProperty(e)?i[e]:d.getPropertyDefaultValue(e)},d.prototype.getDocumentParagraphFormat=function(){var e,t,i=new d,r=!1;return G.isNullOrUndefined(this.ownerBase)||(t=this.getDocumentHelperObject(),G.isNullOrUndefined(t))||(i=t.paragraphFormat,!G.isNullOrUndefined(t)&&t.isEditorModule&&(r=t.editorProperties.isPaste,e=t.editorParagraphFormat)),{docParagraphFormat:i,editorFormat:e,isPaste:r}},d.prototype.getDocumentHelperObject=function(){var e,t;return this.ownerBase instanceof Z&&(t=this.ownerBase.bodyWidget,G.isNullOrUndefined(t)||G.isNullOrUndefined(t.page)||G.isNullOrUndefined(t.page.documentHelper)||(e=t.page.documentHelper)),e},d.prototype.setPropertyValue=function(e,t,i){(G.isNullOrUndefined(t)||""===t&&!i)&&(t=d.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueParagraphFormat)||G.isNullOrUndefined(this.uniqueParagraphFormat.propertiesHash)&&G.isNullOrUndefined(this.uniqueParagraphFormat.uniqueFormatType)&&G.isNullOrUndefined(this.uniqueParagraphFormat.referenceCount)?this.initializeUniqueParagraphFormat(e,t):(i=l.getPropertyType(this.uniqueParagraphFormat.uniqueFormatType,e),this.uniqueParagraphFormat.propertiesHash.containsKey(i)&&this.uniqueParagraphFormat.propertiesHash.get(i)===t||(this.uniqueParagraphFormat=d.uniqueParagraphFormats.updateUniqueFormat(this.uniqueParagraphFormat,e,t)))},d.prototype.initializeUniqueParagraphFormat=function(e,t){var i=new N;this.addUniqueParaFormat("leftIndent",e,t,i),this.addUniqueParaFormat("rightIndent",e,t,i),this.addUniqueParaFormat("firstLineIndent",e,t,i),this.addUniqueParaFormat("textAlignment",e,t,i),this.addUniqueParaFormat("beforeSpacing",e,t,i),this.addUniqueParaFormat("afterSpacing",e,t,i),this.addUniqueParaFormat("spaceBeforeAuto",e,t,i),this.addUniqueParaFormat("spaceAfterAuto",e,t,i),this.addUniqueParaFormat("lineSpacing",e,t,i),this.addUniqueParaFormat("lineSpacingType",e,t,i),this.addUniqueParaFormat("outlineLevel",e,t,i),this.addUniqueParaFormat("bidi",e,t,i),this.addUniqueParaFormat("contextualSpacing",e,t,i),this.addUniqueParaFormat("keepWithNext",e,t,i),this.addUniqueParaFormat("keepLinesTogether",e,t,i),this.addUniqueParaFormat("widowControl",e,t,i),this.uniqueParagraphFormat=d.uniqueParagraphFormats.addUniqueFormat(i,d.uniqueFormatType)},d.prototype.addUniqueParaFormat=function(e,t,i,r){var n=l.getPropertyType(d.uniqueFormatType,e);e===t&&r.add(n,i)},d.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"leftIndent":case"rightIndent":case"firstLineIndent":t=0;break;case"textAlignment":t="Left";break;case"beforeSpacing":case"afterSpacing":t=0;break;case"spaceBeforeAuto":case"spaceAfterAuto":t=!1;break;case"lineSpacing":t=1;break;case"lineSpacingType":t="Multiple";break;case"styleName":t="Normal";break;case"outlineLevel":t="BodyText";break;case"bidi":case"contextualSpacing":case"keepWithNext":case"keepLinesTogether":t=!1;break;case"widowControl":t=!0}return t},d.prototype.clearIndent=function(){this.clearPropertyValue("leftIndent"),this.clearPropertyValue("firstLineIndent")},d.prototype.clearPropertyValue=function(e){var t,i,r;this.setPropertyValue(e,void 0,!0),G.isNullOrUndefined(this.uniqueParagraphFormat)||(t=l.getPropertyType(this.uniqueParagraphFormat.uniqueFormatType,e),i=new l(this.uniqueParagraphFormat.uniqueFormatType),r=d.getPropertyDefaultValue(e),i.cloneItems(this.uniqueParagraphFormat,e,r,this.uniqueParagraphFormat.uniqueFormatType),i.propertiesHash.containsKey(t)&&i.propertiesHash.remove(t),this.uniqueParagraphFormat=i)},d.prototype.clearFormat=function(){G.isNullOrUndefined(this.listFormat)||this.listFormat.clearFormat(),G.isNullOrUndefined(this.borders)||this.borders.clearFormat(),G.isNullOrUndefined(this.uniqueParagraphFormat)||0!==this.uniqueParagraphFormat.referenceCount||d.uniqueParagraphFormats.remove(this.uniqueParagraphFormat),this.uniqueParagraphFormat=void 0,G.isNullOrUndefined(this.getDocumentHelperObject())||(this.baseStyle=this.getDocumentHelperObject().styles.findByName("Normal"))},d.prototype.destroy=function(){if(G.isNullOrUndefined(this.uniqueParagraphFormat)||d.uniqueParagraphFormats.remove(this.uniqueParagraphFormat),this.uniqueParagraphFormat=void 0,G.isNullOrUndefined(this.listFormat)||this.listFormat.destroy(),this.listFormat=void 0,this.tabs&&0<this.tabs.length){for(var e=0;e<this.tabs.length;e++)this.tabs[e].destroy();this.tabs=[],this.tabs=void 0}G.isNullOrUndefined(this.borders)||this.borders.destroy(),this.borders=void 0,this.baseStyle=void 0,this.ownerBase=void 0},d.prototype.copyFormat=function(e){if(!G.isNullOrUndefined(e)&&(G.isNullOrUndefined(e.uniqueParagraphFormat)||this.updateUniqueParagraphFormat(e),G.isNullOrUndefined(e.borders)||(G.isNullOrUndefined(this.borders)&&(this.borders=new Wl(this)),this.borders.copyFormat(e.borders)),G.isNullOrUndefined(e.listFormat)||(G.isNullOrUndefined(this.listFormat)&&(this.listFormat=new ul(this)),this.listFormat.copyFormat(e.listFormat)),G.isNullOrUndefined(e.baseStyle)||(this.baseStyle=e.baseStyle),!G.isNullOrUndefined(e.tabs)))for(var t=0;t<e.tabs.length;t++)this.tabs[t]=e.tabs[t]},d.prototype.updateUniqueParagraphFormat=function(e){var t=void 0;this.uniqueParagraphFormat&&(t=this.uniqueParagraphFormat.mergeProperties(e.uniqueParagraphFormat),0===this.uniqueParagraphFormat.referenceCount)&&(d.uniqueParagraphFormats.remove(this.uniqueParagraphFormat),this.uniqueParagraphFormat=void 0),this.uniqueParagraphFormat=new l(d.uniqueFormatType),G.isNullOrUndefined(t)&&(t=this.uniqueParagraphFormat.mergeProperties(e.uniqueParagraphFormat)),this.uniqueParagraphFormat=d.uniqueParagraphFormats.addUniqueFormat(t,d.uniqueFormatType)},d.prototype.cloneFormat=function(){var e=new d(void 0);if(e.uniqueParagraphFormat=this.uniqueParagraphFormat,e.baseStyle=this.baseStyle,G.isNullOrUndefined(this.listFormat)?e.listFormat=void 0:(e.listFormat=this.listFormat.cloneListFormat(),e.listFormat.ownerBase=e),e.borders=G.isNullOrUndefined(this.borders)?void 0:this.borders.cloneFormat(),!G.isNullOrUndefined(this.tabs)&&0<this.tabs.length){e.tabs=[];for(var t=0;t<this.tabs.length;t++)e.tabs.push(this.tabs[t].clone())}return e},d.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueParagraphFormat)&&!G.isNullOrUndefined(this.uniqueParagraphFormat.propertiesHash)&&(e=l.getPropertyType(this.uniqueParagraphFormat.uniqueFormatType,e),this.uniqueParagraphFormat.propertiesHash.containsKey(e))},d.clear=function(){this.uniqueParagraphFormats.clear()},d.prototype.applyStyle=function(e){this.baseStyle=e,this.listFormat.applyStyle(this.baseStyle)},d.prototype.getValue=function(e){return this.hasValue(e)?this.getPropertyValue(e):void 0},d.prototype.assignFormat=function(e,t){t=!G.isNullOrUndefined(t)&&t,e.hasValue("leftIndent")&&(this.leftIndent=e.getValue("leftIndent")),e.hasValue("rightIndent")&&(this.rightIndent=e.getValue("rightIndent")),e.hasValue("firstLineIndent")&&(this.firstLineIndent=e.getValue("firstLineIndent")),e.hasValue("beforeSpacing")&&(this.beforeSpacing=e.getValue("beforeSpacing")),e.hasValue("afterSpacing")&&(this.afterSpacing=e.getValue("afterSpacing")),e.hasValue("spaceBeforeAuto")&&(this.spaceBeforeAuto=e.getValue("spaceBeforeAuto")),e.hasValue("spaceAfterAuto")&&(this.spaceAfterAuto=e.getValue("spaceAfterAuto")),e.hasValue("lineSpacing")&&(this.lineSpacing=e.getValue("lineSpacing")),e.hasValue("lineSpacingType")&&(this.lineSpacingType=e.getValue("lineSpacingType")),e.hasValue("textAlignment")&&(this.textAlignment=e.getValue("textAlignment")),e.hasValue("outlineLevel")&&(this.outlineLevel=e.getValue("outlineLevel")),!t&&e.hasValue("bidi")&&(this.bidi=e.getValue("bidi")),e.hasValue("contextualSpacing")&&(this.contextualSpacing=e.getValue("contextualSpacing")),e.hasValue("keepWithNext")&&(this.keepWithNext=e.getValue("keepWithNext")),e.hasValue("keepLinesTogether")&&(this.keepLinesTogether=e.getValue("keepLinesTogether")),e.hasValue("widowControl")&&(this.widowControl=e.getValue("widowControl"))},d.prototype.isSameFormat=function(e){return this.baseStyle===e.baseStyle&&this.uniqueParagraphFormat===e.uniqueParagraphFormat},d.uniqueParagraphFormats=new W,d.uniqueFormatType=3;var vl=d;function d(e){this.uniqueParagraphFormat=void 0,this.ownerBase=void 0,this.baseStyle=void 0,this.tabs=void 0,this.ownerBase=e,this.listFormat=new ul(this),this.borders=new Wl(this),this.tabs=[]}Object.defineProperty(bl.prototype,"left",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("left"):this.leftIn},set:function(e){this.leftIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"right",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("right"):this.rightIn},set:function(e){this.rightIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"top",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("top"):this.topIn},set:function(e){this.topIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"bottom",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("bottom"):this.bottomIn},set:function(e){this.bottomIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"horizontal",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("horizontal"):this.horizontalIn},set:function(e){this.horizontalIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"vertical",{get:function(){return this.ownerBase instanceof vl?this.getPropertyValue("vertical"):this.verticalIn},set:function(e){this.verticalIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"diagonalUp",{get:function(){return this.diagonalUpIn},set:function(e){this.diagonalUpIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(bl.prototype,"diagonalDown",{get:function(){return this.diagonalDownIn},set:function(e){this.diagonalDownIn=e},enumerable:!0,configurable:!0}),bl.prototype.getPropertyValue=function(e){var t=this.getBorder(e);if(this.isParsing)return t;if(t.hasValues())return t;var i=this.ownerBase.baseStyle;if(!G.isNullOrUndefined(i)){for(var r=this;!G.isNullOrUndefined(i);){var n=void 0;if(this.ownerBase.listFormat.hasValue("listId")||(n=i.paragraphFormat.getListPargaraphFormat(e)),i.paragraphFormat.borders.getBorder(e).hasValues()){r=i.paragraphFormat.borders;break}if(!G.isNullOrUndefined(n)&&n.borders.getBorder(e).hasValues()){r=n.borders;break}i=i.basedOn}if(!G.isNullOrUndefined(i))return r.getBorder(e)}return this.getDefaultValue(e)},bl.prototype.getDefaultValue=function(e){var t,i=this.documentParagraphFormat();return t=G.isNullOrUndefined(i)||G.isNullOrUndefined(i.borders)?t:i.borders.getBorder(e)},bl.prototype.documentParagraphFormat=function(){var e;return e=this.ownerBase instanceof vl?this.ownerBase.getDocumentParagraphFormat().docParagraphFormat:e},bl.prototype.getBorder=function(e){switch(e){case"left":return this.leftIn;case"right":return this.rightIn;case"top":return this.topIn;case"bottom":return this.bottomIn;case"vertical":return this.verticalIn;case"horizontal":return this.horizontalIn}},bl.prototype.clearFormat=function(){G.isNullOrUndefined(this.leftIn)||this.leftIn.clearFormat(),G.isNullOrUndefined(this.topIn)||this.topIn.clearFormat(),G.isNullOrUndefined(this.bottomIn)||this.bottomIn.clearFormat(),G.isNullOrUndefined(this.rightIn)||this.rightIn.clearFormat(),G.isNullOrUndefined(this.horizontalIn)||this.horizontalIn.clearFormat(),G.isNullOrUndefined(this.verticalIn)||this.verticalIn.clearFormat(),G.isNullOrUndefined(this.diagonalDown)||this.diagonalDown.clearFormat(),G.isNullOrUndefined(this.diagonalUp)||this.diagonalUp.clearFormat()},bl.prototype.destroy=function(){G.isNullOrUndefined(this.leftIn)||this.leftIn.destroy(),G.isNullOrUndefined(this.topIn)||this.topIn.destroy(),G.isNullOrUndefined(this.bottomIn)||this.bottomIn.destroy(),G.isNullOrUndefined(this.rightIn)||this.rightIn.destroy(),G.isNullOrUndefined(this.horizontalIn)||this.horizontalIn.destroy(),G.isNullOrUndefined(this.verticalIn)||this.verticalIn.destroy(),G.isNullOrUndefined(this.diagonalDown)||this.diagonalDown.destroy(),G.isNullOrUndefined(this.diagonalUp)||this.diagonalUp.destroy(),this.topIn=void 0,this.bottomIn=void 0,this.leftIn=void 0,this.rightIn=void 0,this.horizontalIn=void 0,this.verticalIn=void 0,this.diagonalDownIn=void 0,this.diagonalUpIn=void 0,this.ownerBase=void 0},bl.prototype.cloneFormat=function(){var e=new bl(void 0);return e.top=G.isNullOrUndefined(this.topIn)?void 0:this.topIn.cloneFormat(),e.bottom=G.isNullOrUndefined(this.bottomIn)?void 0:this.bottomIn.cloneFormat(),e.left=G.isNullOrUndefined(this.leftIn)?void 0:this.leftIn.cloneFormat(),e.right=G.isNullOrUndefined(this.rightIn)?void 0:this.rightIn.cloneFormat(),e.horizontal=G.isNullOrUndefined(this.horizontalIn)?void 0:this.horizontalIn.cloneFormat(),e.vertical=G.isNullOrUndefined(this.verticalIn)?void 0:this.verticalIn.cloneFormat(),e.diagonalUp=G.isNullOrUndefined(this.diagonalUp)?void 0:this.diagonalUp.cloneFormat(),e.diagonalDown=G.isNullOrUndefined(this.diagonalDown)?void 0:this.diagonalDown.cloneFormat(),e},bl.prototype.copyFormat=function(e){var t;!G.isNullOrUndefined(e.getBorder("left"))&&e.getBorder("left")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("left")),this.left=t),!G.isNullOrUndefined(e.getBorder("right"))&&e.getBorder("right")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("right")),this.right=t),!G.isNullOrUndefined(e.getBorder("top"))&&e.getBorder("top")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("top")),this.top=t),!G.isNullOrUndefined(e.getBorder("bottom"))&&e.getBorder("bottom")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("bottom")),this.bottom=t),!G.isNullOrUndefined(e.getBorder("horizontal"))&&e.getBorder("horizontal")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("horizontal")),this.horizontal=t),!G.isNullOrUndefined(e.getBorder("vertical"))&&e.getBorder("vertical")instanceof x&&((t=new x(this)).copyFormat(e.getBorder("vertical")),this.vertical=t),!G.isNullOrUndefined(e.diagonalDown)&&e.diagonalDown instanceof x&&(this.diagonalDown=new x(this),this.diagonalDown.copyFormat(e.diagonalDown)),!G.isNullOrUndefined(e.diagonalUp)&&e.diagonalUp instanceof x&&(this.diagonalUp=new x(this),this.diagonalUp.copyFormat(e.diagonalUp))};var Wl=bl;function bl(e){this.leftIn=new x(this),this.rightIn=new x(this),this.topIn=new x(this),this.bottomIn=new x(this),this.horizontalIn=new x(this),this.verticalIn=new x(this),this.diagonalUpIn=new x(this),this.diagonalDownIn=new x(this),this.isParsing=!1,this.ownerBase=e}Object.defineProperty(h.prototype,"title",{get:function(){return this._title},set:function(e){this._title=e},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"description",{get:function(){return this._description},set:function(e){this._description=e},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"allowAutoFit",{get:function(){return this.getPropertyValue("allowAutoFit")},set:function(e){this.setPropertyValue("allowAutoFit",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"cellSpacing",{get:function(){return this.getPropertyValue("cellSpacing")},set:function(e){if(e<0||264.6<e)throw new RangeError("The measurement must be between 0 px and 264.6 px.");this.setPropertyValue("cellSpacing",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"leftMargin",{get:function(){return this.getPropertyValue("leftMargin")},set:function(e){this.setPropertyValue("leftMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"topMargin",{get:function(){return this.getPropertyValue("topMargin")},set:function(e){this.setPropertyValue("topMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"rightMargin",{get:function(){return this.getPropertyValue("rightMargin")},set:function(e){this.setPropertyValue("rightMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"bottomMargin",{get:function(){return this.getPropertyValue("bottomMargin")},set:function(e){this.setPropertyValue("bottomMargin",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"tableAlignment",{get:function(){return this.getPropertyValue("tableAlignment")},set:function(e){this.setPropertyValue("tableAlignment",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"leftIndent",{get:function(){return this.getPropertyValue("leftIndent")},set:function(e){if(e<-1440||1440<e)throw new RangeError("The measurement must be between -1440 px and 1440 px.");this.setPropertyValue("leftIndent",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"preferredWidth",{get:function(){return this.getPropertyValue("preferredWidth")},set:function(e){this.setPropertyValue("preferredWidth",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"preferredWidthType",{get:function(){return this.getPropertyValue("preferredWidthType")},set:function(e){this.setPropertyValue("preferredWidthType",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"bidi",{get:function(){return this.getPropertyValue("bidi")},set:function(e){this.setPropertyValue("bidi",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"horizontalPositionAbs",{get:function(){return this.getPropertyValue("horizontalPositionAbs")},set:function(e){this.setPropertyValue("horizontalPositionAbs",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"horizontalPosition",{get:function(){return this.getPropertyValue("horizontalPosition")},set:function(e){this.setPropertyValue("horizontalPosition",e)},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"styleName",{get:function(){return this._styleName},set:function(e){this._styleName=e},enumerable:!0,configurable:!0}),h.prototype.getPropertyValue=function(e){if(this.hasValue(e)){var t=l.getPropertyType(h.uniqueFormatType,e);if(!G.isNullOrUndefined(this.uniqueTableFormat)&&this.uniqueTableFormat.propertiesHash.containsKey(t))return this.uniqueTableFormat.propertiesHash.get(t)}return h.getPropertyDefaultValue(e)},h.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=h.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueTableFormat)?this.initializeUniqueTableFormat(e,t):(i=l.getPropertyType(this.uniqueTableFormat.uniqueFormatType,e),this.uniqueTableFormat.propertiesHash.containsKey(i)&&this.uniqueTableFormat.propertiesHash.get(i)===t||(this.uniqueTableFormat=h.uniqueTableFormats.updateUniqueFormat(this.uniqueTableFormat,e,t)))},h.prototype.initializeUniqueTableFormat=function(e,t){var i=new N;this.addUniqueTableFormat("allowAutoFit",e,t,i),this.addUniqueTableFormat("cellSpacing",e,t,i),this.addUniqueTableFormat("leftMargin",e,t,i),this.addUniqueTableFormat("topMargin",e,t,i),this.addUniqueTableFormat("bottomMargin",e,t,i),this.addUniqueTableFormat("rightMargin",e,t,i),this.addUniqueTableFormat("leftIndent",e,t,i),this.addUniqueTableFormat("tableAlignment",e,t,i),this.addUniqueTableFormat("preferredWidth",e,t,i),this.addUniqueTableFormat("preferredWidthType",e,t,i),this.addUniqueTableFormat("bidi",e,t,i),this.addUniqueTableFormat("horizontalPositionAbs",e,t,i),this.addUniqueTableFormat("horizontalPosition",e,t,i),this.uniqueTableFormat=h.uniqueTableFormats.addUniqueFormat(i,h.uniqueFormatType)},h.prototype.addUniqueTableFormat=function(e,t,i,r){var n=l.getPropertyType(h.uniqueFormatType,e);e===t&&r.add(n,i)},h.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"allowAutoFit":t=!1;break;case"cellSpacing":t=0;break;case"leftMargin":t=5.4;break;case"topMargin":case"bottomMargin":t=0;break;case"rightMargin":t=5.4;break;case"leftIndent":t=0;break;case"tableAlignment":t="Left";break;case"preferredWidth":t=0;break;case"preferredWidthType":t="Point";break;case"bidi":t=!1;break;case"horizontalPositionAbs":t=null;break;case"horizontalPosition":t=0}return t},h.prototype.assignTableMarginValue=function(e,t,i,r){this.leftMargin=e,this.topMargin=t,this.rightMargin=i,this.bottomMargin=r},h.prototype.initializeTableBorders=function(){this.borders.left.lineStyle="Single",this.borders.left.lineWidth=.5,this.borders.right.lineStyle="Single",this.borders.right.lineWidth=.5,this.borders.top.lineStyle="Single",this.borders.top.lineWidth=.5,this.borders.bottom.lineStyle="Single",this.borders.bottom.lineWidth=.5,this.borders.horizontal.lineStyle="Single",this.borders.horizontal.lineWidth=.5,this.borders.vertical.lineStyle="Single",this.borders.vertical.lineWidth=.5},h.prototype.destroy=function(){G.isNullOrUndefined(this.borders)||this.borders.destroy(),G.isNullOrUndefined(this.shading)||this.shading.destroy(),G.isNullOrUndefined(this.uniqueTableFormat)||h.uniqueTableFormats.remove(this.uniqueTableFormat),this.uniqueTableFormat=void 0,this.ownerBase=void 0,this.borders=void 0,this.shading=void 0},h.prototype.cloneFormat=function(){var e=new h(void 0);return e.leftIndent=this.leftIndent,e.tableAlignment=this.tableAlignment,e.cellSpacing=this.cellSpacing,e.leftMargin=this.leftMargin,e.rightMargin=this.rightMargin,e.topMargin=this.topMargin,e.bottomMargin=this.bottomMargin,e.preferredWidth=this.preferredWidth,e.preferredWidthType=this.preferredWidthType,e.horizontalPositionAbs=this.horizontalPositionAbs,e.horizontalPosition=this.horizontalPosition,e.borders=G.isNullOrUndefined(this.borders)?void 0:this.borders.cloneFormat(),e.shading=G.isNullOrUndefined(this.shading)?void 0:this.shading.cloneFormat(),e.bidi=this.bidi,e.allowAutoFit=this.allowAutoFit,e.styleName=this.styleName,e.title=this.title,e.description=this.description,e},h.prototype.hasValue=function(e){return!G.isNullOrUndefined(this.uniqueTableFormat)&&(e=l.getPropertyType(this.uniqueTableFormat.uniqueFormatType,e),this.uniqueTableFormat.propertiesHash.containsKey(e))},h.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e.uniqueTableFormat)||(this.cellSpacing=e.cellSpacing,this.leftMargin=e.leftMargin,this.topMargin=e.topMargin,this.rightMargin=e.rightMargin,this.bottomMargin=e.bottomMargin,this.leftIndent=e.leftIndent,this.tableAlignment=e.tableAlignment,this.preferredWidth=e.preferredWidth,this.preferredWidthType=e.preferredWidthType,this.bidi=e.bidi,this.allowAutoFit=e.allowAutoFit,this.horizontalPosition=e.horizontalPosition,this.horizontalPositionAbs=e.horizontalPositionAbs,this.styleName=e.styleName),G.isNullOrUndefined(e.borders)||(this.borders=new Wl(this),this.borders.copyFormat(e.borders)),G.isNullOrUndefined(e.shading)||(this.shading=new I(this),this.shading.copyFormat(e.shading)),G.isNullOrUndefined(e.title)||(this.title=e.title),G.isNullOrUndefined(e.description)||(this.description=e.description),this.isRTFTable=e.isRTFTable)},h.clear=function(){this.uniqueTableFormats.clear()},h.uniqueTableFormats=new W,h.uniqueFormatType=8;var xl=h;function h(e){this.uniqueTableFormat=void 0,this.borders=new Wl(this),this.shading=new I(this),this._title=void 0,this._description=void 0,this.ownerBase=void 0,this._styleName=void 0,this.isRTFTable=!1,this.ownerBase=e,this.assignTableMarginValue(5.4,0,5.4,0)}(e=j.CharacterRangeType||(j.CharacterRangeType={}))[e.LeftToRight=0]="LeftToRight",e[e.RightToLeft=1]="RightToLeft",e[e.WordSplit=2]="WordSplit",e[e.Number=4]="Number",e[e.Tab=6]="Tab",(e=j.FontScriptType||(j.FontScriptType={}))[e.English=0]="English",e[e.Hindi=1]="Hindi",e[e.Korean=2]="Korean",e[e.Chinese=3]="Chinese",e[e.Arabic=4]="Arabic",e[e.Hebrew=5]="Hebrew",e[e.Japanese=6]="Japanese",e[e.Thai=7]="Thai",e[e.SpecialCharacter=8]="SpecialCharacter",(e=j.LocaleId||(j.LocaleId={}))[e.af_ZA=1078]="af_ZA",e[e.sq_AL=1052]="sq_AL",e[e.am_ET=1118]="am_ET",e[e.gsw_FR=1156]="gsw_FR",e[e.ar_DZ=5121]="ar_DZ",e[e.ar_BH=15361]="ar_BH",e[e.ar_EG=3073]="ar_EG",e[e.ar_IQ=2049]="ar_IQ",e[e.ar_JO=11265]="ar_JO",e[e.ar_KW=13313]="ar_KW",e[e.ar_LB=12289]="ar_LB",e[e.ar_LY=4097]="ar_LY",e[e.ar_MA=6145]="ar_MA",e[e.ar_OM=8193]="ar_OM",e[e.ar_QA=16385]="ar_QA",e[e.ar_SA=1025]="ar_SA",e[e.ar_SY=10241]="ar_SY",e[e.ar_TN=7169]="ar_TN",e[e.ar_AE=14337]="ar_AE",e[e.ar_YE=9217]="ar_YE",e[e.hy_AM=1067]="hy_AM",e[e.as_IN=1101]="as_IN",e[e.az_Cyrl_AZ=2092]="az_Cyrl_AZ",e[e.az_Latn_AZ=1068]="az_Latn_AZ",e[e.ba_RU=1133]="ba_RU",e[e.eu_ES=1069]="eu_ES",e[e.be_BY=1059]="be_BY",e[e.bn_BD=2117]="bn_BD",e[e.bn_IN=1093]="bn_IN",e[e.bs_Cyrl_BA=8218]="bs_Cyrl_BA",e[e.bs_Latn_BA=5146]="bs_Latn_BA",e[e.bg_BG=1026]="bg_BG",e[e.br_FR=1150]="br_FR",e[e.my_MM=1109]="my_MM",e[e.ca_ES=1027]="ca_ES",e[e.chr_US=1116]="chr_US",e[e.zh_HK=3076]="zh_HK",e[e.zh_MO=5124]="zh_MO",e[e.zh_CN=2052]="zh_CN",e[e.zh_SG=4100]="zh_SG",e[e.zh_TW=1028]="zh_TW",e[e.co_FR=1155]="co_FR",e[e.hr_BA=4122]="hr_BA",e[e.hr_HR=1050]="hr_HR",e[e.cs_CZ=1029]="cs_CZ",e[e.da_DK=1030]="da_DK",e[e.prs_AF=1164]="prs_AF",e[e.dv_MV=1125]="dv_MV",e[e.nl_BE=2067]="nl_BE",e[e.nl_NL=1043]="nl_NL",e[e.bin_NG=1126]="bin_NG",e[e.et_EE=1061]="et_EE",e[e.en_AU=3081]="en_AU",e[e.en_BZ=10249]="en_BZ",e[e.en_CA=4105]="en_CA",e[e.en_029=9225]="en_029",e[e.en_HK=15369]="en_HK",e[e.en_IN=16393]="en_IN",e[e.en_ID=14345]="en_ID",e[e.en_IE=6153]="en_IE",e[e.en_JM=8201]="en_JM",e[e.en_MY=17417]="en_MY",e[e.en_NZ=5129]="en_NZ",e[e.en_PH=13321]="en_PH",e[e.en_SG=18441]="en_SG",e[e.en_ZA=7177]="en_ZA",e[e.en_TT=11273]="en_TT",e[e.en_GB=2057]="en_GB",e[e.en_US=1033]="en_US",e[e.en_ZW=12297]="en_ZW",e[e.fo_FO=1080]="fo_FO",e[e.fil_PH=1124]="fil_PH",e[e.fi_FI=1035]="fi_FI",e[e.fr_BE=2060]="fr_BE",e[e.fr_CM=11276]="fr_CM",e[e.fr_CA=3084]="fr_CA",e[e.fr_CD=9228]="fr_CD",e[e.fr_CI=12300]="fr_CI",e[e.fr_FR=1036]="fr_FR",e[e.fr_HT=15372]="fr_HT",e[e.fr_LU=5132]="fr_LU",e[e.fr_ML=13324]="fr_ML",e[e.fr_MC=6156]="fr_MC",e[e.fr_MA=14348]="fr_MA",e[e.fr_RE=8204]="fr_RE",e[e.fr_SN=10252]="fr_SN",e[e.fr_CH=4108]="fr_CH",e[e.fy_NL=1122]="fy_NL",e[e.ff_NG=1127]="ff_NG",e[e.gd_GB=1084]="gd_GB",e[e.gl_ES=1110]="gl_ES",e[e.ka_GE=1079]="ka_GE",e[e.de_AT=3079]="de_AT",e[e.de_DE=1031]="de_DE",e[e.de_LI=5127]="de_LI",e[e.de_LU=4103]="de_LU",e[e.de_CH=2055]="de_CH",e[e.el_GR=1032]="el_GR",e[e.gn_PY=1140]="gn_PY",e[e.gu_IN=1095]="gu_IN",e[e.kl_GL=1135]="kl_GL",e[e.ha_Latn_NG=1128]="ha_Latn_NG",e[e.haw_US=1141]="haw_US",e[e.he_IL=1037]="he_IL",e[e.hi_IN=1081]="hi_IN",e[e.hu_HU=1038]="hu_HU",e[e.ibb_NG=1129]="ibb_NG",e[e.is_IS=1039]="is_IS",e[e.ig_NG=1136]="ig_NG",e[e.id_ID=1057]="id_ID",e[e.iu_Latn_CA=2141]="iu_Latn_CA",e[e.iu_Cans_CA=1117]="iu_Cans_CA",e[e.it_IT=1040]="it_IT",e[e.it_CH=2064]="it_CH",e[e.ga_IE=2108]="ga_IE",e[e.xh_ZA=1076]="xh_ZA",e[e.zu_ZA=1077]="zu_ZA",e[e.kn_IN=1099]="kn_IN",e[e.kr_NG=1137]="kr_NG",e[e.ks_Deva=2144]="ks_Deva",e[e.ks_Arab=1120]="ks_Arab",e[e.kk_KZ=1087]="kk_KZ",e[e.km_KH=1107]="km_KH",e[e.kok_IN=1111]="kok_IN",e[e.ko_KR=1042]="ko_KR",e[e.ky_KG=1088]="ky_KG",e[e.qut_GT=1158]="qut_GT",e[e.rw_RW=1159]="rw_RW",e[e.lo_LA=1108]="lo_LA",e[e.la_Latn=1142]="la_Latn",e[e.lv_LV=1062]="lv_LV",e[e.lt_LT=1063]="lt_LT",e[e.dsb_DE=2094]="dsb_DE",e[e.lb_LU=1134]="lb_LU",e[e.mk_MK=1071]="mk_MK",e[e.ms_BN=2110]="ms_BN",e[e.ms_MY=1086]="ms_MY",e[e.ml_IN=1100]="ml_IN",e[e.mt_MT=1082]="mt_MT",e[e.mni_IN=1112]="mni_IN",e[e.mi_NZ=1153]="mi_NZ",e[e.mr_IN=1102]="mr_IN",e[e.arn_CL=1146]="arn_CL",e[e.mn_MN=1104]="mn_MN",e[e.mn_Mong_CN=2128]="mn_Mong_CN",e[e.ne_NP=1121]="ne_NP",e[e.ne_IN=2145]="ne_IN",e[e.nb_NO=1044]="nb_NO",e[e.nn_NO=2068]="nn_NO",e[e.oc_FR=1154]="oc_FR",e[e.or_IN=1096]="or_IN",e[e.om_Ethi_ET=1138]="om_Ethi_ET",e[e.pap_AN=1145]="pap_AN",e[e.ps_AF=1123]="ps_AF",e[e.fa_IR=1065]="fa_IR",e[e.pl_PL=1045]="pl_PL",e[e.pt_BR=1046]="pt_BR",e[e.pt_PT=2070]="pt_PT",e[e.pa_IN=1094]="pa_IN",e[e.pa_PK=2118]="pa_PK",e[e.quz_BO=1131]="quz_BO",e[e.guz_EC=2155]="guz_EC",e[e.guz_PE=3179]="guz_PE",e[e.ro_RO=1048]="ro_RO",e[e.ro_MO=2072]="ro_MO",e[e.rm_CH=1047]="rm_CH",e[e.ru_RU=1049]="ru_RU",e[e.ru_MO=2073]="ru_MO",e[e.smn_FI=9275]="smn_FI",e[e.smj_NO=4155]="smj_NO",e[e.smj_SE=5179]="smj_SE",e[e.se_FI=3131]="se_FI",e[e.se_NO=1083]="se_NO",e[e.se_SE=2107]="se_SE",e[e.sms_FI=8251]="sms_FI",e[e.sma_NO=6203]="sma_NO",e[e.sma_SE=7227]="sma_SE",e[e.sa_IN=1103]="sa_IN",e[e.sr_Cyrl_BA=7194]="sr_Cyrl_BA",e[e.sr_Cyrl_CS=3098]="sr_Cyrl_CS",e[e.sr_Latn_BA=6170]="sr_Latn_BA",e[e.sr_Latn_CS=2074]="sr_Latn_CS",e[e.nso_ZA=1132]="nso_ZA",e[e.tn_ZA=1074]="tn_ZA",e[e.sd_Arab_PK=2137]="sd_Arab_PK",e[e.sd_Deva_IN=1113]="sd_Deva_IN",e[e.si_LK=1115]="si_LK",e[e.sk_SK=1051]="sk_SK",e[e.sl_SI=1060]="sl_SI",e[e.so_SO=1143]="so_SO",e[e.es_AR=11274]="es_AR",e[e.es_BO=16394]="es_BO",e[e.es_CL=13322]="es_CL",e[e.es_CO=9226]="es_CO",e[e.es_CR=5130]="es_CR",e[e.es_DO=7178]="es_DO",e[e.es_EC=12298]="es_EC",e[e.es_SV=17418]="es_SV",e[e.es_GT=4106]="es_GT",e[e.es_HN=18442]="es_HN",e[e.es_MX=2058]="es_MX",e[e.es_NI=19466]="es_NI",e[e.es_PA=6154]="es_PA",e[e.es_PY=15370]="es_PY",e[e.es_PE=10250]="es_PE",e[e.es_PR=20490]="es_PR",e[e.es_ES=3082]="es_ES",e[e.es_ES_tradnl=1034]="es_ES_tradnl",e[e.es_US=21514]="es_US",e[e.es_UY=14346]="es_UY",e[e.es_VE=8202]="es_VE",e[e.st_ZA=1072]="st_ZA",e[e.sw_KE=1089]="sw_KE",e[e.sv_FI=2077]="sv_FI",e[e.sv_SE=1053]="sv_SE",e[e.syr_SY=1114]="syr_SY",e[e.tg_Cyrl_TJ=1064]="tg_Cyrl_TJ",e[e.tzm_Arab_MA=1119]="tzm_Arab_MA",e[e.tzm_Latn_DZ=2143]="tzm_Latn_DZ",e[e.ta_IN=1097]="ta_IN",e[e.tt_RU=1092]="tt_RU",e[e.te_IN=1098]="te_IN",e[e.th_TH=1054]="th_TH",e[e.bo_CN=1105]="bo_CN",e[e.ti_ER=2163]="ti_ER",e[e.ti_ET=1139]="ti_ET",e[e.ts_ZA=1073]="ts_ZA",e[e.tr_TR=1055]="tr_TR",e[e.tk_TM=1090]="tk_TM",e[e.ug_CN=1152]="ug_CN",e[e.uk_UA=1058]="uk_UA",e[e.hsb_DE=1070]="hsb_DE",e[e.ur_PK=1056]="ur_PK",e[e.uz_Cyrl_UZ=2115]="uz_Cyrl_UZ",e[e.uz_Latn_UZ=1091]="uz_Latn_UZ",e[e.ve_ZA=1075]="ve_ZA",e[e.vi_VN=1066]="vi_VN",e[e.cy_GB=1106]="cy_GB",e[e.wo_SN=1160]="wo_SN",e[e.sah_RU=1157]="sah_RU",e[e.ii_CN=1144]="ii_CN",e[e.yi_Hebr=1085]="yi_Hebr",e[e.yo_NG=1130]="yo_NG",e[e.ja_JP=1041]="ja_JP",(e=j.SectionBreakType||(j.SectionBreakType={})).EvenPage="EvenPage",e.NewPage="NewPage",e.Continuous="NoBreak",e.OddPage="OddPage";wl=function(e,t){return(wl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var wl,e=function(e,t){function i(){this.constructor=e}wl(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},Fl=(Cl.prototype.updateClientArea=function(e,t,i){G.isNullOrUndefined(e)||(r=e.sectionFormat,this.columnLayoutArea.setColumns(r));var r,n,o,a,s,l,d,h,c=0,g=0;this instanceof Nl?((c=(this.documentHelper.visibleBounds.width-4*this.padding.right-2*this.padding.left)/this.documentHelper.zoomFactor)<0&&(c=0),g=Number.POSITIVE_INFINITY,this.clientArea=new _(this.padding.left/this.documentHelper.zoomFactor,0,c,g)):(n=0,h=s=48,o=K.convertPointToPixel(r.pageHeight),a=K.convertPointToPixel(r.bottomMargin),G.isNullOrUndefined(r)||(n=K.convertPointToPixel(r.topMargin),s=K.convertPointToPixel(r.headerDistance),h=K.convertPointToPixel(r.footerDistance)),d=!1,G.isNullOrUndefined(t.headerWidget)||(d=t.headerWidget.isEmpty,0<=n?d&&!this.documentHelper.editorProperties.enableHeaderAndFooter||(n="Word2013"===this.documentHelper.compatibilityMode?Math.max(s+t.headerWidget.height,n):Math.min(Math.max(s+t.headerWidget.height,n),o/100*40)):n=Math.abs(n)),s=.667+a,G.isNullOrUndefined(t.footerWidget)||(d=t.footerWidget.isEmpty,l=G.isNullOrUndefined(t.footnoteWidget)?0:t.footnoteWidget.height,l=Math.min(l,(o-n-s)/100*90),0<=s?d&&!this.documentHelper.editorProperties.enableHeaderAndFooter||(s=.667+Math.min(o/100*40,Math.max(h+t.footerWidget.height,a))):s=Math.abs(s),s+=l),G.isNullOrUndefined(r)||(c=K.convertPointToPixel(r.pageWidth-r.leftMargin-r.rightMargin),g=o-n-s),c<0&&(c=0),d=new _(K.convertPointToPixel(r.leftMargin),n,c,o-n-s),t.footnoteWidget&&i&&!this.documentHelper.editorProperties.isFootNote&&0!==t.footnoteWidget.y&&this.clientArea.y+this.clientArea.height>t.footnoteWidget.y&&(h=this.clientArea.y+this.clientArea.height-t.footnoteWidget.y,this.clientArea.height-=h/2),0!==e.page.bodyWidgets[0].columnIndex&&this.documentHelper.layout.updateColumnIndex(e,!1,!0),this.setClientArea(e,d)),this.clientActiveArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height)},Cl.prototype.setClientArea=function(e,t){this.clientArea=this.columnLayoutArea.getColumnBoundsByBodyWidget(e,t),e.x=this.clientArea.x,e.width=this.clientArea.width},Cl.prototype.updateClientAreaTopOrLeft=function(e,t){t&&(this.clientActiveArea.y=this.clientActiveArea.y+e.topBorderWidth,this.clientActiveArea.x=this.clientActiveArea.x+e.leftBorderWidth)},Cl.prototype.updateClientAreaForTable=function(e){this.clientActiveArea.x=this.clientArea.x=e.x,this.clientActiveArea.width=this.clientArea.width=e.width},Cl.prototype.updateClientAreaForRow=function(e,t){e=e.ownerTable;t||(this.clientActiveArea.x=this.clientArea.x=e.x,this.clientActiveArea.width=this.clientArea.width=e.width,this.clientArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height),this.clientActiveArea=new _(this.clientActiveArea.x,this.clientActiveArea.y,this.clientActiveArea.width,this.clientActiveArea.height))},Cl.prototype.updateClientAreaForCell=function(e,t){var i=e.ownerRow,r=e;t?(this.clientActiveArea.x=this.clientArea.x=r.x,this.clientActiveArea.y=r.y,this.clientActiveArea.width=this.clientArea.width=0<r.width?r.width:0,this instanceof Tl&&(this.clientActiveArea.height=Number.POSITIVE_INFINITY)):(this.clientActiveArea.x=this.clientArea.x=r.x+r.width+r.margin.right,i.x+i.width-this.clientArea.x<0?this.clientActiveArea.width=this.clientArea.width=0:this.clientActiveArea.width=this.clientArea.width=i.x+i.width-this.clientArea.x,this.clientActiveArea.y=r.y-r.margin.top-K.convertPointToPixel(e.ownerTable.tableFormat.cellSpacing),e.ownerTable.isInsideTable||(this.clientActiveArea.height=0<this.clientArea.bottom-i.y?this.clientArea.bottom-i.y:0,!e.ownerTable.wrapTextAround&&0<this.documentHelper.layout.existFootnoteHeight&&(t=this.clientActiveArea.height-this.documentHelper.layout.existFootnoteHeight,this.clientActiveArea.height=t<0?0:t))),this.clientArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height),this.clientActiveArea=new _(this.clientActiveArea.x,this.clientActiveArea.y,this.clientActiveArea.width,this.clientActiveArea.height)},Cl.prototype.updateClientAreaForTextBoxShape=function(e,t,i){var r,n,o,a;"Inline"===e.textWrappingStyle&&!i&&G.isNullOrUndefined(e.containerShape)&&(e.y=this.clientActiveArea.y,e.x=this.clientActiveArea.x),t&&(i=e.textFrame.marginLeft,t=e.textFrame.marginRight,r=e.textFrame.marginTop,n=e.textFrame.marginBottom,o=e.width,a=Number.POSITIVE_INFINITY,this.clientArea=new _(e.x+i,e.y+r,o-i-t,a-r-n),this.clientActiveArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height))},Cl.prototype.updateClientAreaByWidgetFootNote=function(e){this.clientArea.x=e.x,this.clientArea.y=e.y,this.clientActiveArea.x=e.x,this.clientActiveArea.y=e.y},Cl.prototype.updateClientAreaForTextWrap=function(e){this.clientActiveArea=new _(e.x,e.y,e.width,e.height)},Cl.prototype.updateBoundsBasedOnTextWrap=function(e){var t=e-this.clientActiveArea.y;this.clientActiveArea.y=e,this.clientActiveArea.height=this.clientActiveArea.height-t},Cl.prototype.updateBoundsBasedOnTextWrapTable=function(e){var t;e>this.clientArea.bottom?this.clientActiveArea=new _(this.clientArea.x,e,this.clientArea.width,this.clientArea.bottom-e):(t=e-this.clientArea.y,this.clientArea.y=e,this.clientArea.height=this.clientArea.height-t,this.clientActiveArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height))},Cl.prototype.updateClientAreaByWidget=function(e){this.clientArea.x=e.x,this.clientArea.y=e.y,this.clientActiveArea.x=e.x,this.clientActiveArea.y=e.y},Cl.prototype.updateClientAreaLocation=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width},Cl.prototype.updateClientAreaForBlock=function(e,t,i,r,n){var o,a,s=K.convertPointToPixel(e.leftIndent),l=K.convertPointToPixel(e.rightIndent),d=e.bidi,h=0;t?e instanceof Q&&i?(t=i[0],e.bodyWidget.sectionFormat.columns.length<=1&&(this.clientActiveArea.x=this.clientArea.x=t.x,this.clientActiveArea.width=this.clientArea.width=t.width,n)&&this.documentHelper.getFirstParagraphInFirstCell(e)&&this.updateTableXPositionBasedOnTextWrap(e),(t=i[i.length-1]).x=this.clientActiveArea.x,t.y=this.clientActiveArea.y):(e instanceof Q&&!G.isNullOrUndefined(e.tableFormat)&&(e.isGridUpdated||(e.buildTableColumns(),e.isGridUpdated=!0),"Left"===(o=this.tableAlignmentForBidi(e,d))||G.isNullOrUndefined(this.documentHelper)||!this.documentHelper.isEditorModule||this.documentHelper.editorProperties.isAutofitToWindow||(i=(i=0)===(i=K.convertPointToPixel(e.tableHolder.getTotalWidth(0)))?0===e.tableHolder.tableWidth?e.getTableClientWidth(e.getOwnerWidth(!1)):e.tableHolder.tableWidth:i,"Center"===o?(this.documentHelper.isRowOrCellResizing||(i=e.getTableCellWidth()),this.documentHelper.viewer instanceof Tl&&(s=(this.clientArea.width-i)/2)):s=this.clientArea.width-i,d&&(l=s-=K.convertPointToPixel(e.leftIndent)),e.isInsideTable,this.documentHelper.tableLefts.push(s))),h=this.clientArea.width-(s+K.convertPointToPixel(e.rightIndent)),a=this.clientArea.x+(d?l:s),h=0<h||e instanceof Z&&e.paragraphFormat.firstLineIndent<0?h:0,this.clientActiveArea.x=this.clientArea.x=a,this.clientActiveArea.width=this.clientArea.width=h,r&&this.updateParagraphYPositionBasedonTextWrap(e,new _(this.clientActiveArea.x,this.clientActiveArea.y,this.clientActiveArea.width,this.clientActiveArea.height)),n&&(e instanceof Z?this.updateParagraphXPositionBasedOnTextWrap(e):this.updateTableXPositionBasedOnTextWrap(e))):(e instanceof Q&&!G.isNullOrUndefined(e.tableFormat)&&(o=this.tableAlignmentForBidi(e,d),e.isGridUpdated||(e.buildTableColumns(),e.isGridUpdated=!0),"Left"!==o)&&0<this.documentHelper.tableLefts.length&&(s=this.documentHelper.tableLefts.pop(),d)&&(l=s),h=this.clientArea.width+s+K.convertPointToPixel(e.rightIndent),a=this.clientArea.x-(d?l:s),h=0<h||e instanceof Z&&e.paragraphFormat.firstLineIndent<0?h:0,this.clientActiveArea.x=this.clientArea.x=a,this.clientActiveArea.width=this.clientArea.width=h),this.clientArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height),this.clientActiveArea=new _(this.clientActiveArea.x,this.clientActiveArea.y,this.clientActiveArea.width,this.clientActiveArea.height)},Cl.prototype.updateParagraphYPositionBasedonTextWrap=function(e,t){var i=e.bodyWidget,r=this.clientActiveArea;if(i&&0<i.floatingElements.length&&e instanceof Z&&!(e.containerWidget instanceof P)&&!e.isInsideTable&&!(e.containerWidget instanceof J)){var n="Word2013"===this.documentHelper.compatibilityMode,o=e,a=o.isEmpty(),s=o.height;if(0===s&&(s=this.documentHelper.textHelper.getParagraphMarkSize(o.characterFormat).Height),!o.isInHeaderFooter||o.isInsideTable||n)for(var l=t.y,d=!1,h=o.previousRenderedWidget,c=0;c<i.floatingElements.length;c++){var g=i.floatingElements[c],p=!1,p=g instanceof re?g.paragraph.isInHeaderFooter:g.bodyWidget instanceof X;if(!(o.isInsideTable&&g instanceof Q)||g.isInsideTable){var u=this.getTextWrappingBound(g),f=g instanceof Q?"Square":g.textWrappingStyle,m=g instanceof Q?"Both":g.textWrappingType;if(!(r.x>u.right+24||r.right<u.x-24))if((t.y+(g instanceof Q&&!a&&0===o.floatingElements.length?s:o.height)>u.y||d)&&t.y<u.bottom&&"Inline"!==f&&"TopAndBottom"!==f&&"InFrontOfText"!==f&&"Behind"!==f){var y=0,v=K.convertPointToPixel(o.paragraphFormat.rightIndent),y=(K.convertPointToPixel(o.paragraphFormat.firstLineIndent),a||o.childWidgets[0].isFirstLine(),(y=t.x>=u.x&&"Left"!==m?v:y)<0?y:0);g&&g instanceof Q&&g.wrapTextAround&&!a&&!o.isContainsShapeAlone()&&n&&t.y<u.bottom&&(t.y=u.bottom),t.x<u.x&&t.x>u.x&&"Left"!==m?(t.right>u.x&&(t.width=t.width-(t.right-u.right)),t.width<24?(!n&&g instanceof Q&&h===g||(this.updateBoundsBasedOnTextWrap(u.bottom),t=this.clientActiveArea),((!a&&o.childWidgets[0].isFirstLine()||a)&&n||!p)&&(o.y=this.clientActiveArea.y)):t.x=u.right):t.x>=u.x&&t.x<u.right?(t.width=t.width-(u.right-t.x)-y,(t.width<24||d)&&(t.width=this.clientActiveArea.right-u.right-y,v=!1,t.width<24||d)?(this.clientActiveArea.x+24<u.x&&(m=this.getIntersectingItemBounds(i.floatingElements,g,l),!G.isNullOrUndefined(m))&&m.bottom<=u.bottom&&(this.updateBoundsBasedOnTextWrap(m.bottom),t=this.clientActiveArea,v=!0,o.x=m.x),n&&!v&&(g instanceof Q&&h===g?this.updateBoundsBasedOnTextWrapTable(u.bottom):this.updateBoundsBasedOnTextWrap(u.bottom),t=this.clientActiveArea),((!a&&o.childWidgets[0].isFirstLine()||a)&&n||!p)&&(o.y=this.clientActiveArea.y)):t.x=u.right):u.x>t.x&&t.right>u.x&&(t.width=u.x-t.x,t.width<24)&&(t.width=this.clientActiveArea.right-u.right-y,t.width<24?(!n&&g instanceof Q&&h===g||(this.updateBoundsBasedOnTextWrap(u.bottom),t=this.clientActiveArea),((!a&&o.childWidgets[0].isFirstLine()||a)&&n||!p)&&(o.y=this.clientActiveArea.y)):t.x=u.right)}else if(0<i.floatingElements.length&&(t.y>=u.y&&t.y<u.bottom||t.y+s>=u.y&&t.y+s<u.bottom)&&"TopAndBottom"===f){if(n||!(g instanceof Q&&h===g)){m=this.documentHelper.textHelper.getParagraphMarkWidth(o.characterFormat);if("Word2007"===this.documentHelper.compatibilityMode&&a&&!o.bidi&&!G.isNullOrUndefined(o.paragraphFormat)&&"Left"!==o.paragraphFormat.textAlignment&&"Center"!==o.paragraphFormat.textAlignment&&this.clientActiveArea.x+m<u.x)continue;this.updateBoundsBasedOnTextWrap(u.bottom),!n&&(!a&&o.childWidgets[0].isFirstLine()||a)&&(d=!0)}((!a&&o.childWidgets[0].isFirstLine()||a)&&n||!p)&&(o.y=this.clientActiveArea.y)}}}}},Cl.prototype.updateParagraphXPositionBasedOnTextWrap=function(e){var t="Word2013"===this.documentHelper.compatibilityMode,i=e.containerWidget,r=this.clientActiveArea;if(this instanceof Tl&&!G.isNullOrUndefined(i)&&e instanceof Z&&!G.isNullOrUndefined(i.page)&&!G.isNullOrUndefined(i.page.headerWidget)){var n=i.page.headerWidget.floatingElements;if(0<n.length&&(!e.isInHeaderFooter||e.isInsideTable||t)&&!(e.containerWidget instanceof J)&&!(e.bodyWidget instanceof P))for(var o=e,a=0;a<n.length;a++){var s,l,d=n[a];o.isInsideTable&&d instanceof Q&&!d.isInsideTable||(s=this.getTextWrappingBound(d),l=d instanceof Q?"Square":d.textWrappingStyle,d instanceof Q||d.textWrappingType,o.isInsideTable)||r.x>s.right+24||r.right<s.x-24||0<n.length&&r.y+o.height>s.y&&r.y<s.bottom&&"Inline"!==l&&"TopAndBottom"!==l&&"InFrontOfText"!==l&&"Behind"!==l&&(d=K.convertPointToPixel(o.paragraphFormat.rightIndent),"Left"!=o.paragraphFormat.textAlignment&&r.x<s.x&&r.x+o.width>s.x?o.x=r.x:r.x>=s.x&&r.x<s.right&&!o.paragraphFormat.bidi?(r.width=r.width-(s.right-r.x)-d,r.width<24?(r.width=this.clientActiveArea.right-s.right-d,r.width<24?(l=s.bottom>r.y?s.bottom-r.y:0,d=r.height-l,o.x=r.x,r.width=this.clientArea.width,r.height=d<0?0:d,r.y=s.bottom):r.x=s.right):("Word2007"===this.documentHelper.compatibilityMode||r.y<=s.bottom)&&K.convertPointToPixel(o.paragraphFormat.leftIndent)+K.convertPointToPixel(o.paragraphFormat.firstLineIndent)+r.x<s.right&&(r.x=s.right)):(s.x-24>r.x&&r.right>s.x||r.x>s.x&&r.x>s.right)&&(o.x=r.x))}}},Cl.prototype.updateTableXPositionBasedOnTextWrap=function(e){var t=K.convertPointToPixel(e.childWidgets[0].getFirstRowWidth()),i=e.bodyWidget;if(this instanceof Tl&&!G.isNullOrUndefined(i)&&!G.isNullOrUndefined(i.page)&&!G.isNullOrUndefined(i.page.headerWidget)){var r=i.page.headerWidget.floatingElements;if(!(!(0<r.length)||e.isInHeaderFooter&&e.isInsideTable&&"Word2013"!==this.documentHelper.compatibilityMode||e.containerWidget instanceof P))for(var n=this.clientActiveArea,o=0;o<r.length;o++){var a=r[o],s=this.getTextWrappingBound(a),l=a instanceof Q?"Square":a.textWrappingStyle,a=(a instanceof Q?a.positioning:a).allowOverlap,d=this.documentHelper.getFirstParagraphInFirstCell(e),d=this.documentHelper.textHelper.getParagraphMarkSize(d.characterFormat).Height,h=e.childWidgets[0]instanceof $?e.childWidgets[0].height:0,h=(d<h&&(d=h),K.convertPointToPixel(e.getTableClientWidth(e.getContainerWidth())));this.clientArea.x>s.right+24||this.clientArea.right<s.x-24||this.isFloatingItemIntersect(e,n,s,l,a,d,h)&&n.x>=s.x&&n.x<s.right&&(n.width=n.width-(s.right-n.x),(n.width<24||n.width<t&&0<t)&&(n.width=this.clientActiveArea.right-s.right,n.width<24||n.width<t&&0<t&&this.clientArea.right<=t+s.right)?(l=s.bottom>n.y?s.bottom-n.y:0,n.y=s.bottom,n.width=this.clientArea.width,n.height=n.height-l):n.x=s.right,this.updateClientAreaForTextWrap(n))}}},Cl.prototype.isFloatingItemIntersect=function(e,t,i,r,n,o,a){return(Math.round(t.y+o)>=Math.round(i.y)&&Math.round(t.y)<Math.round(i.bottom)||Math.round(t.y+o)<=Math.round(i.bottom)&&Math.round(t.y+o)>=Math.round(i.y))&&"Inline"!==r&&"TopAndBottom"!==r&&"InFrontOfText"!==r&&"Behind"!==r&&!(n&&null!==e.tableFormat&&e.wrapTextAround&&e.positioning.allowOverlap)},Cl.prototype.getIntersectingItemBounds=function(e,t,i){e=this.getMinBottomFloatingItem(e,this.getIntersectingFloatingItems(e,t,i));if(!G.isNullOrUndefined(e))return this.getTextWrappingBound(e)},Cl.prototype.getMinBottomFloatingItem=function(e,t){var i=-1,r=Number.MAX_VALUE,n=0;e.sort(function(e,t){return e.x-t.x});for(var o=0;o<t.length;o++){var a=e[o],s=this.getTextWrappingBound(a);r>s.bottom&&(a&&t.indexOf(a)+1<t.length?n++:(r=s.bottom,i=t.indexOf(a)))}return i-n==0?t[i]:null},Cl.prototype.getIntersectingFloatingItems=function(e,t,i){for(var r=[],n=0;n<e.length;n++){var o=e[n],a=this.getTextWrappingBound(o),s=this.getTextWrappingBound(t);i<=a.bottom&&s.bottom>=a.bottom&&a.right>this.clientActiveArea.x&&a.x<s.x&&r.push(o)}return r},Cl.prototype.getTextWrappingBound=function(e){var t=0,i=0,r=0,n=0,o=0;return e instanceof re?(t=e.distanceLeft,i=e.distanceTop,r=e.distanceRight,n=e.distanceBottom,o=e.width):(o=e.getTableCellWidth(),t=e.positioning.distanceLeft,i=e.positioning.distanceTop,r=e.positioning.distanceRight,n=e.positioning.distanceBottom),new _(e.x-t,e.y-i,o+t+r,e.height+i+n)},Cl.prototype.tableAlignmentForBidi=function(e,t){e=e.tableFormat.tableAlignment;return t&&("Left"===e?e="Right":"Right"===e&&(e="Left")),e},Cl.prototype.cutFromLeft=function(e){(e=e<this.clientActiveArea.x?this.clientActiveArea.x:e)>this.clientActiveArea.right&&this.textWrap&&(e=this.clientActiveArea.right),this.clientActiveArea.width=this.clientActiveArea.right>e?this.clientActiveArea.right-e:0,this.clientActiveArea.x=e},Cl.prototype.cutFromTop=function(e){(e=e<this.clientActiveArea.y?this.clientActiveArea.y:e)>this.clientActiveArea.bottom&&(e=this.clientActiveArea.bottom),this.clientActiveArea.height=this.clientActiveArea.bottom-e,this.clientActiveArea.x=this.clientArea.x,this.clientActiveArea.width=this.clientArea.width,this.clientActiveArea.y=e},Cl.prototype.updateClientWidth=function(e){this.clientActiveArea.x-=e,0<this.clientActiveArea.width+e?this.clientActiveArea.width+=e:this.clientActiveArea.width=0},Cl.prototype.destroy=function(){this.clientArea=void 0,this.clientActiveArea=void 0},Cl.prototype.componentDestroy=function(){this.clientArea=void 0,this.clientActiveArea=void 0},Cl);function Cl(e){this.visiblePages=[],this.padding=new Bl(10,10,30,10),this.textWrap=!0,this.containerTop=0,this.containerWidth=0,this.containerLeft=0,this.isWebPrinting=!1,this.documentHelper=e,this.columnLayoutArea=new kl(this)}e(Ol,Pl=Fl),Object.defineProperty(Ol.prototype,"pageGap",{get:function(){return 20},enumerable:!0,configurable:!0}),Ol.prototype.createNewPage=function(e,t){var i=this.pageGap,r=(0<this.documentHelper.pages.length&&(i=this.documentHelper.pages[this.documentHelper.pages.length-1].boundingRectangle.bottom+this.pageGap),new cc(this.documentHelper));return this.updatePageBoundingRectangle(e,r,i),G.isNullOrUndefined(t)?this.documentHelper.pages.push(r):this.documentHelper.pages.splice(t,0,r),r.bodyWidgets.push(e),r.bodyWidgets[r.bodyWidgets.length-1].page=r,this.updateClientArea(e,r),this.documentHelper.layout.layoutHeaderFooter(e,this,r),this.updateClientArea(e,r),this.documentHelper.layout.footnoteHeight=0,r},Ol.prototype.updatePageBoundingRectangle=function(e,t,i){var r=G.isNullOrUndefined(e.sectionFormat)?816:K.convertPointToPixel(e.sectionFormat.pageWidth),e=G.isNullOrUndefined(e.sectionFormat)?1056:K.convertPointToPixel(e.sectionFormat.pageHeight),n=(this.documentHelper.visibleBounds.width-r*this.documentHelper.zoomFactor)/2;n<this.pageLeft&&(n=this.pageLeft),t.boundingRectangle=new _(n,i,r,e)},Ol.prototype.getCurrentPageHeaderFooter=function(e,t){return this.getCurrentHeaderFooter(this.getHeaderFooterType(e,t),e.index)},Ol.prototype.isFirstPageOfSection=function(e,t){var i=e.previousPage,e=e.bodyWidgets[0].sectionIndex;return i.bodyWidgets[i.bodyWidgets.length-1].sectionIndex!==e||!(!t||(t=this.documentHelper.headersFooters[e],G.isNullOrUndefined(t))||G.isNullOrUndefined(t[this.getHeaderFooter("FirstPageHeader")])&&G.isNullOrUndefined(t[this.getHeaderFooter("FirstPageFooter")])||G.isNullOrUndefined(i.headerWidget)||"FirstPageHeader"!==i.headerWidget.headerFooterType||i.bodyWidgets[0].sectionIndex===e)},Ol.prototype.getHeaderFooterType=function(e,t){var i=t?"OddHeader":"OddFooter",r=e.page;return e.sectionFormat.differentFirstPage&&(G.isNullOrUndefined(r.previousPage)||!G.isNullOrUndefined(r.previousPage)&&r.sectionIndex!==r.previousPage.sectionIndex&&this.isFirstPageOfSection(r,t))?i=t?"FirstPageHeader":"FirstPageFooter":e.sectionFormat.differentOddAndEvenPages&&(r.index+1)%2==0&&(i=t?"EvenHeader":"EvenFooter"),i},Ol.prototype.getCurrentHeaderFooter=function(e,t){if(this.documentHelper.headersFooters[t]){var i=this.getHeaderFooter(e),r=this.documentHelper.headersFooters[t][i];if(!r){for(var n=0<t?t-1:t;!r&&-1!==n;)r=this.documentHelper.headersFooters[n][i],n--;r||((r=this.createHeaderFooterWidget(e)).isEmpty=!0),0==t&&(this.documentHelper.headersFooters[t][i]=r)}return r}if(0<t)return this.getCurrentHeaderFooter(e,t-1)},Ol.prototype.createHeaderFooterWidget=function(e){var t=new X(e),i=new Z;return i.childWidgets.push(new ad(i)),e=-1!==e.indexOf("Header")?this.documentHelper.styles.findByName("Header"):this.documentHelper.styles.findByName("Footer"),i.paragraphFormat.baseStyle=e,i.paragraphFormat.listFormat.baseStyle=e,t.childWidgets.push(i),i.containerWidget=t},Ol.prototype.getHeaderFooter=function(e){switch(e){case"OddHeader":return 0;case"OddFooter":return 1;case"EvenHeader":return 2;case"EvenFooter":return 3;case"FirstPageHeader":return 4;case"FirstPageFooter":return 5}},Ol.prototype.updateHFClientArea=function(e,t){var i=K.convertPointToPixel(e.pageWidth-e.leftMargin-e.rightMargin);i<0&&(i=0),this.clientArea=new _(K.convertPointToPixel(e.leftMargin),t?K.convertPointToPixel(e.headerDistance):K.convertPointToPixel(e.pageHeight-e.footerDistance),i,Number.POSITIVE_INFINITY),this.clientActiveArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,this.clientArea.height)},Ol.prototype.updateHeaderFooterClientAreaWithTop=function(e,t,i){this.updateHFClientArea(e,t),t||i.footerWidget.y<this.clientActiveArea.y&&(this.clientActiveArea.y=i.footerWidget.y,this.clientActiveArea.height=Number.POSITIVE_INFINITY)},Ol.prototype.updateFootnoteClientArea=function(e,t,i,r){var n=K.convertPointToPixel(e.pageWidth-e.leftMargin-e.rightMargin),o=K.convertPointToPixel(e.leftMargin),a=K.convertPointToPixel(e.bottomMargin),s=K.convertPointToPixel(e.footerDistance),e=K.convertPointToPixel(e.pageHeight)-Math.max(s+t.page.footerWidget.height,a);this.clientArea=new _(o,e,n,Number.POSITIVE_INFINITY),this.clientActiveArea=new _(this.clientArea.x,this.clientArea.y,this.clientArea.width,Number.POSITIVE_INFINITY)};var Pl,Tl=Ol;function Ol(e){var t=Pl.call(this,e)||this;return t.pageLeft=30,t.owner=e,t}e(Il,Sl=Fl),Object.defineProperty(Il.prototype,"pageGap",{get:function(){return 0},enumerable:!0,configurable:!0}),Il.prototype.createNewPage=function(e,t){var i,r=0;return 0<this.documentHelper.pages.length&&(r=this.documentHelper.pages[this.documentHelper.pages.length-1].boundingRectangle.bottom),i=new cc(this.documentHelper),0===this.documentHelper.pages.length?i.boundingRectangle=new _(10,r,this.documentHelper.visibleBounds.width,this.documentHelper.visibleBounds.height):i.boundingRectangle=new _(10,r-20,this.documentHelper.visibleBounds.width,this.documentHelper.visibleBounds.height),this.documentHelper.pages.push(i),this.updateClientArea(void 0,i),i.bodyWidgets.push(e),i.bodyWidgets[i.bodyWidgets.length-1].page=i};var Sl,Nl=Il;function Il(e){return Sl.call(this,e)||this}Object.defineProperty(Al.prototype,"currentIndex",{get:function(){return this.currentIndexIn},set:function(e){0<=e&&(this.currentIndexIn=e)},enumerable:!0,configurable:!0}),Object.defineProperty(Al.prototype,"columnCount",{get:function(){var e;return e=0<(e=G.isNullOrUndefined(this.columnIn)?e:this.numberOfColumnsIn)?e:1},enumerable:!0,configurable:!0}),Al.prototype.setColumns=function(e){if(this.pageWidth=K.convertPointToPixel(e.pageWidth-e.leftMargin-e.rightMargin),this.numberOfColumnsIn=e.numberOfColumns,!G.isNullOrUndefined(e.columns)){for(var t=e.columns,i=[],r=0;r<e.numberOfColumns;r++){var n=this.defaultSpaceIn,o=0,o=(!G.isNullOrUndefined(t)&&0<t.length&&(n=t[r].space,o=t[r].width),this.getColumnObj(o,n,e.numberOfColumns,e.equalWidth));o.index=r,i.push(o)}this.columnIn=i}},Al.prototype.clear=function(){this.currentIndexIn=0,this.defaultSpaceIn=36,this.columnIn=null,this.pageWidth=0},Al.prototype.reset=function(){this.currentIndex=0},Al.prototype.getColumnBounds=function(e,t){var i=this.currentIndexIn;return this.getColumnBoundsByIndex(i,t)},Al.prototype.getColumnBoundsByBodyWidget=function(e,t){e=e.columnIndex;return this.getColumnBoundsByIndex(e,t)},Al.prototype.getNextColumnByBodyWidget=function(e){e=e.columnIndex;return this.getColumnByIndex(e+1)},Al.prototype.getColumnByIndex=function(e){if(0<=e&&e<this.columnCount&&!G.isNullOrUndefined(this.columnIn)&&0<this.columnIn.length)return this.columnIn[e]},Al.prototype.getColumnObj=function(e,t,i,r){var n=(i-1)*t,o=new T;return!r&&0!==e||G.isNullOrUndefined(this.pageWidth)||(e=(this.pageWidth-n)/i),o.width=e,o.space=t,o},Al.prototype.getColumnBoundsByIndex=function(e,t){var i=new _(t.x,t.y,t.width,t.height);if(0<=e&&0<this.columnIn.length){var r;if(!G.isNullOrUndefined(this.columnIn[e])){t=this.getColumnByIndex(e),i.width=t.width;for(var n=0;n<e;n++)r=this.columnIn[n],i.x+=r.width,i.x+=r.space}}return i};var kl=Al;function Al(e){this.layoutHelperIn=e,this.clear()}Ll=function(e,t){return(Ll=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Ll,e=function(e,t){function i(){this.constructor=e}Ll(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},_=(Object.defineProperty(Ul.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(Ul.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Ul.prototype.isIntersecting=function(e){return!(e.y>this.bottom||this.y>e.bottom||e.x>this.right||this.x>e.right)},Ul.prototype.isTableIntersecting=function(e){return!(!(e.y+e.height>this.y&&e.y<this.bottom)||e.x>this.right||this.x>e.right)},Ul.prototype.clone=function(){return new Ul(this.x,this.y,this.width,this.height)},Ul);function Ul(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}var Bl=function(e,t,i,r){this.right=10,this.left=10,this.top=10,this.bottom=10,this.right=e,this.left=t,this.top=i,this.bottom=r},Hl=(Rl.prototype.clone=function(){return new Rl(this.left,this.top,this.right,this.bottom)},Rl.prototype.destroy=function(){this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0},Rl);function Rl(e,t,i,r){this.left=e,this.top=t,this.right=i,this.bottom=r}Object.defineProperty(El.prototype,"indexInOwner",{get:function(){return this instanceof Y&&this.page?(this.containerWidget instanceof J?this.containerWidget:this.page).bodyWidgets.indexOf(this):this.containerWidget&&this.containerWidget.childWidgets?this.containerWidget.childWidgets.indexOf(this):this instanceof J?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"firstChild",{get:function(){return this.childWidgets&&0<this.childWidgets.length?this.childWidgets[0]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"lastChild",{get:function(){return this.childWidgets&&0<this.childWidgets.length?this.childWidgets[this.childWidgets.length-1]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"previousWidget",{get:function(){var e=this,t=this.indexInOwner;return e=e instanceof Y?0<t?e.page.bodyWidgets[t-1]:void 0:0<t?e.containerWidget.childWidgets[t-1]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"nextWidget",{get:function(){var e=this,t=this.indexInOwner;if(-1!==t)return e=e instanceof Y?t<e.page.bodyWidgets.length-1?e.page.bodyWidgets[t+1]:void 0:t<e.containerWidget.childWidgets.length-1?e.containerWidget.childWidgets[t+1]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"previousRenderedWidget",{get:function(){var e=this,t=this.indexInOwner;if(!(t<0)){if(e instanceof Y)e=0<t&&!(e.containerWidget instanceof J)?e.page.bodyWidgets[t-1]:e.containerWidget instanceof J&&!e.page.documentHelper.editorProperties.isDeleteOrBackSpace?!("Endnote"===e.containerWidget.footNoteType)||!(0===t)||G.isNullOrUndefined(e.page.previousPage)||G.isNullOrUndefined(e.page.previousPage.endnoteWidget)||G.isNullOrUndefined(e.page.previousPage.endnoteWidget.bodyWidgets[e.page.previousPage.endnoteWidget.bodyWidgets.length-1])?t<=0?void 0:e.containerWidget.bodyWidgets[t-1]:e.page.previousPage.endnoteWidget.bodyWidgets[e.page.previousPage.endnoteWidget.bodyWidgets.length-1]:(i=e.page.previousPage)&&0<i.bodyWidgets.length?i.bodyWidgets[i.bodyWidgets.length-1]:void 0;else if(e instanceof J)for(var i=e.page;i.previousPage&&(e=(i=i.previousPage).footnoteWidget,G.isNullOrUndefined(e)););else if(0<t)e=e.containerWidget.childWidgets[t-1];else{var r=void 0;for(e.containerWidget instanceof ee?r=e.containerWidget.getPreviousSplitWidget():e.containerWidget&&e.containerWidget.containerWidget instanceof J&&"Endnote"===e.containerWidget.containerWidget.footNoteType?r=e.containerWidget.previousWidget||e.containerWidget.previousRenderedWidget:e.containerWidget instanceof $||e.containerWidget instanceof X||e.containerWidget&&e.containerWidget.containerWidget instanceof J||(r=e.containerWidget.previousRenderedWidget);r&&0===r.childWidgets.length&&(r=r.previousRenderedWidget,!G.isNullOrUndefined(r)););e=r&&r.constructor===e.containerWidget.constructor?r.lastChild:void 0}return e}},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"nextRenderedWidget",{get:function(){var e,t,i=this,r=this.indexInOwner;if(!(r<0)){if(i instanceof Y)i=r<i.page.bodyWidgets.length-1&&!(i.containerWidget instanceof J)?i.page.bodyWidgets[r+1]:i.containerWidget instanceof J?(e="Endnote"===i.containerWidget.footNoteType,t=r===i.containerWidget.bodyWidgets.length-1,!e||!t||G.isNullOrUndefined(i.page.nextPage)||G.isNullOrUndefined(i.page.nextPage.endnoteWidget)||G.isNullOrUndefined(i.page.nextPage.endnoteWidget.bodyWidgets[0])?r>=i.containerWidget.bodyWidgets.length-1&&!i.page.documentHelper.editorProperties.isDeleteOrBackSpace?void 0:i.containerWidget.bodyWidgets[r+1]:i.page.nextPage.endnoteWidget.bodyWidgets[0]):i.page.allowNextPageRendering&&(n=i.page.nextPage)&&0<n.bodyWidgets.length?n.bodyWidgets[0]:void 0;else if(i instanceof J)for(var n=i.page;n.allowNextPageRendering&&n.nextPage&&(i=(n=n.nextPage).footnoteWidget,G.isNullOrUndefined(i)););else if(r<i.containerWidget.childWidgets.length-1)i=i.containerWidget.childWidgets[r+1];else{var o=void 0;for(i.containerWidget instanceof ee?o=i.containerWidget.getNextSplitWidget():i.containerWidget&&i.containerWidget.containerWidget instanceof J&&"Endnote"===i.containerWidget.containerWidget.footNoteType?o=i.containerWidget.nextWidget||i.containerWidget.nextRenderedWidget:i.containerWidget instanceof $||i.containerWidget instanceof X||i.containerWidget&&i.containerWidget.containerWidget instanceof J||(o=i.containerWidget.nextRenderedWidget);o&&0===o.childWidgets.length&&!(o instanceof ee)&&(o=o.nextRenderedWidget,!G.isNullOrUndefined(o)););i=o&&o.constructor===i.containerWidget.constructor?o.firstChild:void 0}return i}},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"previousSplitWidget",{get:function(){var e,t=this;return t instanceof ee?t.getPreviousSplitWidget():(e=t.previousRenderedWidget,t instanceof Y&&e instanceof Y&&t.equals(e)?t.containerWidget instanceof J&&"Endnote"===t.containerWidget.footNoteType&&t.index!==e.index?void 0:e:e instanceof Yl&&t.index===e.index&&t.equals(e)?e:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(El.prototype,"nextSplitWidget",{get:function(){var e,t=this;return t instanceof ee?t.getNextSplitWidget():(e=t.nextRenderedWidget,t instanceof Y&&e instanceof Y&&t.equals(e)?t.containerWidget instanceof J&&"Endnote"===t.containerWidget.footNoteType&&t.index!==e.index?void 0:e:e instanceof Yl&&t.index===e.index&&t.equals(e)?e:void 0)},enumerable:!0,configurable:!0}),El.prototype.getPreviousSplitWidgets=function(){for(var e=[],t=this.previousSplitWidget;t&&(e.unshift(t),!(t=t.previousSplitWidget)||t!=t.previousSplitWidget););return e},El.prototype.getSplitWidgets=function(){for(var e=this.getPreviousSplitWidgets(),t=this;t;)e.push(t),t=t.nextSplitWidget;return e},El.prototype.combineWidget=function(e){var t=this,i=this.getSplitWidgets();if(1<i.length)for(t=i.shift();0<i.length;){var r=i.shift();t.combine(r,e)}return t instanceof Q&&t.combineRows(e),t},El.prototype.combine=function(e,t){var i,r;0<e.childWidgets.length&&((i=this.lastChild)instanceof Q?i.combineWidget(t):(r=e.firstChild,!(e instanceof Q)&&i instanceof El&&r instanceof El&&i.index===r.index&&i.combine(e.childWidgets.shift(),t)),this.addWidgets(e.childWidgets),e.childWidgets=[]),e.destroyInternal(t)},El.prototype.addWidgets=function(e){for(;0<e.length;){var t,i=e.shift();if(i instanceof ad&&this instanceof Z?(i.paragraph=this).height+=i.height:i instanceof El&&(t=this.lastChild,i.containerWidget=this,i.y=t instanceof El?t.y+t.height:this.y,this.height+=i.height),i instanceof $)for(var r=this.childWidgets[this.childWidgets.length-1],n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];if(1<o.cellFormat.rowSpan)for(var a=0;a<i.childWidgets.length;a++){var s=i.childWidgets[a];if(s.columnIndex===o.columnIndex&&s.isSplittedCell&&s.cellFormat.rowSpan===o.cellFormat.rowSpan){for(var l=0;l<s.childWidgets.length;l++){var d=s.childWidgets[l];s.childWidgets.splice(d.indexInOwner,1),o.childWidgets.push(d),d.containerWidget=o,l--}s.ownerRow.childWidgets.splice(s.indexInOwner,1),s.containerWidget=void 0,a--}}}this.childWidgets.push(i)}},El.prototype.removeChild=function(e){-1<e&&e<this.childWidgets.length&&this.childWidgets.splice(e,1)},El.prototype.destroy=function(){if(this.childWidgets)for(;0<this.childWidgets.length;){var e=this.childWidgets.pop();(e instanceof ad||e instanceof El)&&e.destroy()}this.childWidgets=void 0,this.containerWidget&&this.containerWidget.removeChild(this.indexInOwner),this.containerWidget=void 0,this.margin=void 0,this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.index=void 0},El.prototype.componentDestroy=function(){if(this.childWidgets)for(;0<this.childWidgets.length;){var e=this.childWidgets.pop();(e instanceof ad||e instanceof El)&&e.componentDestroy()}this.childWidgets=void 0,this.margin&&this.margin.destroy(),this.margin=void 0,this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.index=void 0,this.containerWidget=void 0};var ql=El;function El(){this.childWidgets=[],this.x=0,this.y=0,this.width=0,this.height=0,this.index=0}e(Dl,Ml=ql),Object.defineProperty(Dl.prototype,"sectionFormat",{get:function(){var e=this;return e instanceof Y?e.sectionFormatIn:e.page&&!G.isNullOrUndefined(e.page.bodyWidgets)?e.page.bodyWidgets[0].sectionFormat:void 0},set:function(e){this instanceof Y&&(this.sectionFormatIn=e)},enumerable:!0,configurable:!0}),Object.defineProperty(Dl.prototype,"sectionIndex",{get:function(){var e=0;return this instanceof Y?e=this.index:this.page&&(e=this.page.bodyWidgets[0].index),e},enumerable:!0,configurable:!0}),Dl.prototype.getHierarchicalIndex=function(e){if(!G.isNullOrUndefined(this.page)){var t,i=this.page.documentHelper,r=this;if(e=r instanceof Y?r.index+";"+e:r instanceof J?"Footnote"===r.footNoteType?"FN;"+e:"EN;"+e:i.enableLayout?-1!==r.headerFooterType.indexOf("Header")?"H;"+e:"F;"+e:(t=this.getHeaderFooterIndex(r).toString(),-1!==r.headerFooterType.indexOf("Header")?"H;"+t+";"+e:"F;"+t+";"+e),!G.isNullOrUndefined(r.page)){if(i.enableLayout)return i.pages.indexOf(this.page)+";"+e;if(r instanceof X)return r.headerSectionIndex+";"+e}}return e},Dl.prototype.getHeaderFooterIndex=function(e){for(var t=this.documentHelper.headersFooters,i=0;i<t.length;i++){var r,n=t[i];for(r in n)if(n.hasOwnProperty(r))if(n[r]===e)return parseInt(r,10)}return-1},Dl.prototype.componentDestroy=function(){this.sectionFormatIn&&this.sectionFormatIn.destroy(),this.sectionFormatIn=void 0,this.floatingElements=[],this.removedHeaderFooters=[],this.footNoteReference=void 0,this.page=void 0,Ml.prototype.componentDestroy.call(this)};var Ml,Vl=Dl;function Dl(){var e=null!==Ml&&Ml.apply(this,arguments)||this;return e.floatingElements=[],e.footNoteReference=void 0,e.sectionFormatIn=void 0,e.columnIndex=0,e.headerSectionIndex=0,e.isWord2010NextColumn=!1,e}e(_l,zl=Vl),_l.prototype.equals=function(e){return e instanceof _l&&e.sectionFormat===this.sectionFormat},_l.prototype.getHierarchicalIndex=function(e){var t=this;return e=t.containerWidget instanceof J?(e=t.containerWidget.bodyWidgets.indexOf(t)+";"+e,"Footnote"===t.containerWidget.footNoteType?"FN;"+e:"EN;"+e):this.page&&-1!==this.page.bodyWidgets.indexOf(this)?this.page.bodyWidgets.indexOf(this)+";"+e:t.index+";"+e,G.isNullOrUndefined(t.page)?e:this.page.documentHelper.pages.indexOf(this.page)+";"+e},_l.prototype.getTableCellWidget=function(e){for(var t=0;t<this.childWidgets.length;t++)if(this.childWidgets[t]instanceof Q){var i=this.childWidgets[t],r=0;if(i.wrapTextAround&&(r=i.getTableCellWidth()),!i.wrapTextAround&&i.y<=e.y&&i.y+i.height>=e.y)return i.getTableCellWidget(e);if(i.wrapTextAround&&i.x<=e.x&&i.x+r>=e.x&&i.y<=e.y&&i.y+i.height>=e.y)return i.getTableCellWidget(e)}var n=void 0;return n=0<this.childWidgets.length?(this.childWidgets[0].y<=e.y?this.childWidgets[this.childWidgets.length-1]:this.childWidgets[0]).getTableCellWidget(e):n},_l.prototype.destroyInternal=function(e){var t;this.height;if(!G.isNullOrUndefined(this.childWidgets)){for(var i=0;i<this.childWidgets.length;i++){var r=this.childWidgets[i];if(0 instanceof Z,r.destroyInternal(e),G.isNullOrUndefined(this.childWidgets))break;i--}this.childWidgets=void 0}G.isNullOrUndefined(this.page)||(t=this.indexInOwner,-1<this.indexInOwner&&(this.page.bodyWidgets.splice(t,1),0===this.page.bodyWidgets.length?this.page.destroy():this instanceof X&&this.page.headerWidget===this?this.page.headerWidget=void 0:this instanceof X&&this.page.footerWidget===this&&(this.page.footerWidget=void 0),this.page=void 0)),this.destroy()},_l.prototype.destroy=function(){this.sectionFormatIn=void 0,this.page&&this.page.headerWidgetIn&&(this.page.headerWidgetIn.page=void 0),this.page&&this.page.footerWidgetIn&&(this.page.footerWidgetIn.page=void 0),this.page=void 0,zl.prototype.destroy.call(this)},_l.prototype.componentDestroy=function(){zl.prototype.componentDestroy.call(this)};var zl,Y=_l;function _l(){return zl.call(this)||this}e(Gl,jl=Vl),Gl.prototype.getTableCellWidget=function(e){for(var t=0;t<this.childWidgets.length;t++)if(this.childWidgets[t]instanceof Q){var i=this.childWidgets[t],r=0;if(i.wrapTextAround&&(r=i.getTableCellWidth()),!i.wrapTextAround&&i.y<=e.y&&i.y+i.height>=e.y)return i.getTableCellWidget(e);if(i.wrapTextAround&&i.x<=e.x&&i.x+r>=e.x&&i.y<=e.y&&i.y+i.height>=e.y)return i.getTableCellWidget(e)}var n=void 0;return n=0<this.childWidgets.length?(this.childWidgets[0].y<=e.y?this.childWidgets[this.childWidgets.length-1]:this.childWidgets[0]).getTableCellWidget(e):n},Gl.prototype.equals=function(e){return e instanceof Gl&&e.containerWidget===this.containerWidget},Gl.prototype.clone=function(){for(var e=new Gl(this.headerFooterType),t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t].clone();e.childWidgets.push(i),i.index=t,i.containerWidget=e}return e.isEmpty=this.isEmpty,e.x=this.x,e.y=this.y,e.height=0,e.width=0,e},Gl.prototype.destroyInternal=function(e){this.page=void 0,jl.prototype.destroy.call(this)},Gl.prototype.componentDestroy=function(){jl.prototype.componentDestroy.call(this),this.parentHeaderFooter=void 0};var jl,X=Gl;function Gl(e){var t=jl.call(this)||this;return t.isEmpty=!1,t.headerFooterType=e,t}e(Xl,Kl=ql),Object.defineProperty(Xl.prototype,"bodyWidget",{get:function(){for(var e=this;e.containerWidget;){if(e.containerWidget instanceof P){var t=void 0;if(e.containerWidget.containerShape instanceof ne){for(var i=e.containerWidget.containerShape;!G.isNullOrUndefined(i.containerShape);)i=i.containerShape;G.isNullOrUndefined(i.line)||(t=i.line.paragraph)}else G.isNullOrUndefined(e.containerWidget.containerShape.line)||(t=e.containerWidget.containerShape.line.paragraph);if(t)return t.bodyWidget}else if(e.containerWidget instanceof Vl)return e.containerWidget;e=e.containerWidget}},enumerable:!0,configurable:!0}),Object.defineProperty(Xl.prototype,"leftIndent",{get:function(){var e=this;return e instanceof Z&&e.paragraphFormat instanceof vl?e.paragraphFormat.leftIndent:e instanceof Q&&e.tableFormat instanceof xl?e.tableFormat.leftIndent:0},enumerable:!0,configurable:!0}),Object.defineProperty(Xl.prototype,"rightIndent",{get:function(){return this instanceof Z&&this.paragraphFormat instanceof vl?this.paragraphFormat.rightIndent:0},enumerable:!0,configurable:!0}),Object.defineProperty(Xl.prototype,"isInsideTable",{get:function(){return this.containerWidget instanceof ee},enumerable:!0,configurable:!0}),Object.defineProperty(Xl.prototype,"isInHeaderFooter",{get:function(){return this.bodyWidget instanceof X},enumerable:!0,configurable:!0}),Object.defineProperty(Xl.prototype,"associatedCell",{get:function(){if(this.containerWidget instanceof ee)return this.containerWidget},enumerable:!0,configurable:!0}),Xl.prototype.isPageBreak=function(){var e=!1;return e=this instanceof Z&&null!=this&&1===this.childWidgets.length&&1===this.firstChild.children.length?this.firstChild.children[0].isPageBreak:e},Xl.prototype.isColumnBreak=function(){var e=!1;return e=this instanceof Z&&null!=this&&1===this.childWidgets.length&&1===this.firstChild.children.length?this.firstChild.children[0].isColumnBreak:e},Xl.prototype.getHierarchicalIndex=function(e){var t=this;if(!G.isNullOrUndefined(t.containerWidget)&&!G.isNullOrUndefined(t.containerWidget.childWidgets)&&(e=t.containerWidget.childWidgets.indexOf(t)+";"+e,!G.isNullOrUndefined(t.containerWidget))){if(t.containerWidget instanceof P)return t.containerWidget.getHierarchicalIndex(e);if(t.containerWidget instanceof Xl)return t.containerWidget.getHierarchicalIndex(e);t.containerWidget instanceof Vl&&(e=t.containerWidget.getHierarchicalIndex(e))}return e},Xl.prototype.getIndex=function(){return this instanceof Z||this instanceof Q?this.containerWidget.childWidgets.indexOf(this):this instanceof $?this.ownerTable.childWidgets.indexOf(this):this instanceof ee?this.ownerRow.childWidgets.indexOf(this):0},Xl.prototype.getContainerWidth=function(){if(this.isInsideTable){var e=this;if(e instanceof Q&&"Auto"===e.tableFormat.preferredWidthType&&this.associatedCell.ownerTable.isGridUpdated){for(var t=0,i=this.associatedCell.cellFormat.columnSpan,r=this.associatedCell.columnIndex,n=0;n<i;n++)t+=this.associatedCell.ownerTable.tableHolder.columns[r].preferredWidth,r++;if(0<t)return t}var o=this.associatedCell.getCellWidth(this),a=this.associatedCell,a=G.isNullOrUndefined(a.ownerRow)||G.isNullOrUndefined(a.ownerRow.ownerTable)?0:a.ownerRow.ownerTable.tableFormat.cellSpacing;return e instanceof Q&&0<a&&(o-=2*a+e.tableFormat.borders.left.getLineWidth()+(2*a+e.tableFormat.borders.right.getLineWidth())),o}var s;return this.containerWidget instanceof P?(a=this.containerWidget.containerShape,K.convertPixelToPoint(a.width)-K.convertPixelToPoint(a.textFrame.marginLeft)-K.convertPixelToPoint(a.textFrame.marginRight)):(o=(e=this.bodyWidget).sectionFormat,a=0,!G.isNullOrUndefined(e.page)&&!G.isNullOrUndefined(e.page.documentHelper)&&"Word2013"!==e.page.documentHelper.compatibilityMode&&!this.isInsideTable&&this instanceof Q&&(a=(s=this.firstChild).firstChild.leftMargin+s.lastChild.rightMargin),e instanceof Y&&1<o.columns.length?(s=e.columnIndex,K.convertPixelToPoint(o.columns[s].width)):o.pageWidth-(o.leftMargin+o.rightMargin)+a)},Object.defineProperty(Xl.prototype,"bidi",{get:function(){return this instanceof Z&&this.paragraphFormat instanceof vl?this.paragraphFormat.bidi:this instanceof Q&&this.tableFormat instanceof xl&&this.tableFormat.bidi},enumerable:!0,configurable:!0}),Xl.prototype.componentDestroy=function(){Kl.prototype.componentDestroy.call(this),this.contentControlProperties=void 0};var Kl,Yl=Xl;function Xl(){var e=null!==Kl&&Kl.apply(this,arguments)||this;return e.isLayouted=!1,e.isFieldCodeBlock=!1,e.locked=!1,e.lockedBy="",e}e(Zl,Jl=Vl),Zl.prototype.getMinimumAndMaximumWordWidth=function(e,t,i){throw new Error("Method not implemented.")},Zl.prototype.getTableCellWidget=function(e){},Zl.prototype.equals=function(e){return e instanceof Zl&&e.containerWidget===this.containerWidget},Zl.prototype.clone=function(){for(var e=new Zl,t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t].clone();e.childWidgets.push(i),i.index=t,i.containerWidget=e}return e.block=this.block,e},Zl.prototype.destroyInternal=function(e){this.block=void 0,Jl.prototype.destroy.call(this)},Zl.prototype.componentDestroy=function(){if(this.bodyWidgets&&0<this.bodyWidgets.length){for(var e=0;e<this.bodyWidgets.length;e++)this.bodyWidgets[e].componentDestroy();this.bodyWidgets=[]}this.bodyWidgets=void 0,this.block=void 0,Jl.prototype.componentDestroy.call(this)};var Jl,J=Zl;function Zl(){var e=null!==Jl&&Jl.apply(this,arguments)||this;return e.bodyWidgets=[],e}e($l,Ql=Yl),Object.defineProperty($l.prototype,"isEndsWithPageBreak",{get:function(){return 0<this.childWidgets.length&&this.lastChild.isEndsWithPageBreak},enumerable:!0,configurable:!0}),Object.defineProperty($l.prototype,"isEndsWithColumnBreak",{get:function(){return 0<this.childWidgets.length&&this.lastChild.isEndsWithColumnBreak},enumerable:!0,configurable:!0}),$l.prototype.getRevisionRange=function(e){for(var t=this.getSplitWidgets(),i=[],r=0;r<t.length;r++)for(var n=t[r],o=0;o<n.childWidgets.length;o++)for(var a=n.childWidgets[o],s=0;s<a.children.length;s++){var l=a.children[s];G.isNullOrUndefined(l.getAllRevision())||-1===l.getAllRevision().indexOf(e)||i.push(l)}return i},$l.prototype.getAllRevisions=function(e){for(var t=[],i=0;i<this.childWidgets.length;i++)for(var r=this.childWidgets[i],n=0;n<r.children.length;n++)for(var o=r.children[n],a=0;a<o.revisionLength;a++){var s=o.getRevision(a);-1===t.indexOf(s)&&(t.push(s),e)&&(s.ownerNode=this)}for(var l=0;l<this.characterFormat.revisionLength;l++){var d=this.characterFormat.getRevision(l);-1===t.indexOf(d)&&(t.push(d),e)&&(d.ownerNode=this.characterFormat)}return t},$l.prototype.equals=function(e){return e instanceof $l&&e.paragraphFormat===this.paragraphFormat},$l.prototype.isContainsShapeAlone=function(){for(var e=!1,t=0;t<this.childWidgets.length;t++)for(var i=this.childWidgets[t],r=0;r<i.children.length;r++){var n=i.children[r];if(!(n instanceof re)||n instanceof re&&"Inline"===n.textWrappingStyle)return!1;e=!0}return!!e},$l.prototype.isEmptyInternal=function(e){if(!G.isNullOrUndefined(this.childWidgets)&&0!==this.childWidgets.length)for(var t=0;t<this.childWidgets.length;t++)for(var i=this.childWidgets[t],r=0;r<i.children.length;r++){var n=i.children[r];if(0!==n.length&&(!(n instanceof ie&&0!==n.text.length&&this.isZeroWidthText(n.text))&&(n instanceof ie||n instanceof ae||n instanceof Md||n instanceof xh||n instanceof Ch||n instanceof Oh||n instanceof ne||n instanceof oe||n instanceof zd||n instanceof ac&&!e||n instanceof te&&K.isLinkedFieldCharacter(n))))return!1}return!0},$l.prototype.isZeroWidthText=function(e){for(var t=0,i=0;i<e.length;i++){var r=e.charCodeAt(i);8203!==r&&8204!==r&&8205!==r&&65279!==r||t++}return t===e.length},$l.prototype.isEmpty=function(){return this.isEmptyInternal(!1)},$l.prototype.getInline=function(e,t){for(var i=void 0,r=0,n=!1,o=this.getSplitWidgets(),a=0;a<o.length;a++)for(var s=o[a],l=0;l<s.childWidgets.length;l++)for(var d=s.childWidgets[l],h=0;h<d.children.length;h++)if(!((i=d.children[h])instanceof se)){if((n=!n&&(i instanceof ie||i instanceof ae||i instanceof ne||i instanceof oe||i instanceof Md||i instanceof te&&K.isLinkedFieldCharacter(i))||i instanceof Oh||i instanceof zd||i instanceof ac?!0:n)&&e<=r+i.length)return{element:i,index:t=e-r};r+=i.length}return{element:i,index:t=r<e?G.isNullOrUndefined(i)?e:i.length:t}},$l.prototype.getLength=function(){var e=0;if(!G.isNullOrUndefined(this.childWidgets))for(var t=0;t<this.childWidgets.length;t++)for(var i=this.childWidgets[t],r=0;r<i.children.length;r++){var n=i.children[r];n instanceof se||(e+=n.length)}return e},$l.prototype.getTotalLength=function(){for(var e=0,t=this.getSplitWidgets(),i=0;i<t.length;i++)e+=t[i].getLength();return e},$l.prototype.getTableCellWidget=function(e){},$l.prototype.getMinimumAndMaximumWordWidth=function(e,t,i){if(void 0===i&&(i=0),e=K.convertPointToPixel(e),t=K.convertPointToPixel(t),i=K.convertPointToPixel(i),0<this.childWidgets.length){for(var r,n=this.childWidgets[0].children[0],o="",a=new N,s=[],l=!1,d=!1,h=!1;;){if(n instanceof ie&&""!==n.text?(a.add(n,o.length),o+=n.text):n instanceof te&&0===n.fieldType?(r=n,G.isNullOrUndefined(r.fieldEnd)||(n=G.isNullOrUndefined(r.fieldSeparator)?r.fieldEnd:r.fieldSeparator)):n instanceof ae&&s.push(n.width),G.isNullOrUndefined(n)||G.isNullOrUndefined(n.nextNode))break;n=n.nextNode}this.isInsideTable&&this.containerWidget instanceof ee&&this.containerWidget.ownerTable&&this.containerWidget.ownerTable.bodyWidget&&this.containerWidget.ownerTable.bodyWidget.page&&this.containerWidget.ownerTable.bodyWidget.page.documentHelper&&this.containerWidget.ownerTable.bodyWidget.page.documentHelper.layout&&this.bodyWidget.page.documentHelper.layout.isAllColumnHasAutoWidthType&&(d=!0),this.containerWidget instanceof ee&&this.containerWidget.ownerTable&&("Auto"===this.containerWidget.ownerTable.tableFormat.preferredWidthType||"Point"===this.containerWidget.ownerTable.tableFormat.preferredWidthType&&0===this.containerWidget.ownerTable.tableFormat.preferredWidth)&&(l=!0),this.containerWidget instanceof ee&&this.containerWidget.ownerTable&&!this.containerWidget.ownerTable.isInsideTable&&this.containerWidget.ownerTable.tableFormat.allowAutoFit&&("Percent"===this.containerWidget.ownerTable.tableFormat.preferredWidthType||"Auto"===this.containerWidget.ownerTable.tableFormat.preferredWidthType&&"Percent"===this.containerWidget.cellFormat.preferredWidthType)&&(h=!0);var c=[];this.bodyWidget.page.documentHelper.textHelper.position=0;do{var g,p=this.bodyWidget.page.documentHelper.textHelper.position}while((g=this.bodyWidget.page.documentHelper.textHelper.readWord(o,a,l,h,d))&&c.push({value:g,index:p}),this.bodyWidget.page.documentHelper.textHelper.position<o.length);for(var u=0,f=0;f<c.length;f++){for(var m,y=c[f].value,v=c[f].index,W=0,o="",b="",x=v,w=v,F=0;F<a.keys.length;F++){var C=a.keys[F],P=a.get(C),T=C.length;if(w<=P+T&&(m=w-P,v+y.length<=P+T?x=v+y.length-(P+m):w+=x=T-m,b+=o=C.text.substring(m,m+x)),""!==o&&(W+=this.bodyWidget.page.documentHelper.textHelper.getWidth(o,C.characterFormat,C.scriptType)),b===y)break}0!==W&&((0===e||e<W)&&(e=W),u<W)&&(u=W)}var O=0,O=(0<s.length&&(O=Math.max.apply(null,s)),(0===e||e<O)&&(e=O),0<(u=u<O?O:u)&&(u+=(0<this.leftIndent?this.paragraphFormat.firstLineIndent<0?this.leftIndent+this.paragraphFormat.firstLineIndent:this.leftIndent:0)+(0<this.rightIndent?this.rightIndent:0)),t<u&&(t=u),this.measureParagraph());i<O&&(i=O)}var S,O=0;return this.isEmpty()||0!=this.floatingElements.length||G.isNullOrUndefined(this.paragraphFormat)||!(0<this.paragraphFormat.leftIndent)||G.isNullOrUndefined(this.associatedCell)||G.isNullOrUndefined(this.associatedCell.cellFormat)||"Point"!==this.associatedCell.cellFormat.preferredWidthType||(S=this.paragraphFormat.leftIndent+this.paragraphFormat.firstLineIndent)+e>this.associatedCell.cellFormat.preferredWidth&&(O=S),{maximumWordWidth:K.convertPixelToPoint(t),minimumWordWidth:K.convertPixelToPoint(e)+O,maxParaWidth:K.convertPixelToPoint(i)}},$l.prototype.measureParagraph=function(){for(var e,t=0,i=this.childWidgets[0].children[0];i instanceof ie&&""!==i.text?i.isWidthUpdated&&" "!==i.text[i.text.length-1]?t+=i.trimEndWidth:t+=this.bodyWidget.page.documentHelper.textHelper.getWidth(i.text,i.characterFormat,i.scriptType):i instanceof te&&0===i.fieldType?null!=(e=i).fieldEnd&&(i=G.isNullOrUndefined(e.fieldSeparator)?e.fieldEnd:e.fieldSeparator):i instanceof ae&&(t+=i.width),!G.isNullOrUndefined(i)&&!G.isNullOrUndefined(i.nextNode);)i=i.nextNode;return 0<this.leftIndent&&(t+=this.leftIndent),0<this.rightIndent&&(t+=this.rightIndent),t},$l.prototype.isArabicChar=function(e){return e>=String.fromCharCode(1536)&&e<=String.fromCharCode(1791)||e>=String.fromCharCode(1872)&&e<=String.fromCharCode(1919)||e>=String.fromCharCode(2208)&&e<=String.fromCharCode(2303)||e>=String.fromCharCode(64336)&&e<=String.fromCharCode(65023)||e>=String.fromCharCode(65136)&&e<=String.fromCharCode(65279)},$l.prototype.isHebrewChar=function(e){return e>=String.fromCharCode(1424)&&e<=String.fromCharCode(1535)||e>=String.fromCharCode(64285)&&e<=String.fromCharCode(64335)},$l.prototype.isHindiChar=function(e){return e>=String.fromCharCode(2304)&&e<=String.fromCharCode(2431)||e>=String.fromCharCode(43232)&&e<=String.fromCharCode(43263)||e>=String.fromCharCode(7376)&&e<=String.fromCharCode(7423)},$l.prototype.isKoreanChar=function(e){return e>=String.fromCharCode(44032)&&e<=String.fromCharCode(55203)||e>=String.fromCharCode(4352)&&e<=String.fromCharCode(4607)||e>=String.fromCharCode(12592)&&e<=String.fromCharCode(12687)||e>=String.fromCharCode(43360)&&e<=String.fromCharCode(43391)||e>=String.fromCharCode(55216)&&e<=String.fromCharCode(55295)||e>=String.fromCharCode(44032)&&e<=String.fromCharCode(55215)},$l.prototype.isJapanese=function(e){return e>=String.fromCharCode(12448)&&e<=String.fromCharCode(12543)||e>=String.fromCharCode(12352)&&e<=String.fromCharCode(12447)},$l.prototype.isThaiCharacter=function(e){return e>=String.fromCharCode(3584)&&e<=String.fromCharCode(3711)},$l.prototype.isChineseChar=function(e){return e>=String.fromCharCode(19968)&&e<=String.fromCharCode(40959)||e>=String.fromCharCode(13312)&&e<=String.fromCharCode(19903)||e>=String.fromCharCode(55360)&&e<=String.fromCharCode(55401)||e>=String.fromCharCode(56320)&&e<=String.fromCharCode(57055)||e>=String.fromCharCode(43360)&&e<=String.fromCharCode(43391)||e>=String.fromCharCode(65280)&&e<=String.fromCharCode(65519)||e>=String.fromCharCode(12288)&&e<=String.fromCharCode(12351)||e>=String.fromCharCode(63744)&&e<=String.fromCharCode(64255)},$l.prototype.isSpecialCharacters=function(e){return e>=String.fromCharCode(8192)&&e<=String.fromCharCode(10175)},$l.prototype.getFontScriptType=function(e,t){return this.isHindiChar(e)?j.FontScriptType.Hindi:this.isKoreanChar(e)?j.FontScriptType.Korean:this.isJapanese(e)?j.FontScriptType.Japanese:this.isChineseChar(e)?j.FontScriptType.Chinese:this.isArabicChar(e)?j.FontScriptType.Arabic:this.isHebrewChar(e)?j.FontScriptType.Hebrew:this.isThaiCharacter(e)?j.FontScriptType.Thai:this.isSpecialCharacters(e)&&t?j.FontScriptType.SpecialCharacter:j.FontScriptType.English},$l.prototype.splitTextByFontScriptType=function(e,t,i){var r=[];if(!G.isNullOrUndefined(e)&&(G.isNullOrUndefined(e)||""!==e)){for(var n="",o=j.FontScriptType.English,a=j.FontScriptType.English,s=/[\uD800-\uDFFF]/,l=0;l<e.length;l++)e[l]==String.fromCharCode(32)||s.test(e[l])||(a=this.getFontScriptType(e[l],i)),""!=n&&a!==o&&(r.push(n),t.push(o),n=""),n+=e[l],o=a;""!=n&&(r.push(n),t.push(a),n="")}return r},$l.prototype.splitTextRangeByScriptType=function(e){var t=!1,i=1;if(0<this.childWidgets.length){for(var r=this.childWidgets[e],n=e+1;n<this.childWidgets.length;n++){for(var o=this.childWidgets[n],a=0;a<o.children.length;a++){var s=o.children[a];r.children.push(s),s.line=r}this.childWidgets.splice(n,1),n--}for(n=0;n<r.children.length;n+=i){var l=r.children[n],i=1,d=void 0;if(l instanceof ie&&(d=l),l instanceof te&&0==l.fieldType?t=!0:l instanceof te&&2===l.fieldType&&(t=!1),null!=d&&!t){var l="EastAsia"===d.characterFormat.fontHintType&&d.characterFormat.hasValue("fontFamilyFarEast"),h=[],c=this.splitTextByFontScriptType(d.text,h,l);if(1<c.length)for(var g=0;g<c.length;g++){var p,u=c[g];0<g?((p=d.clone()).text=u,p.scriptType=h[g],r.children.splice(n+g,0,p),p.line=r,i++,0<d.revisionLength&&this.updateTextElementInRevisionRange(d,p)):(d.text=u,d.scriptType=h[g],d.isWidthUpdated=!1)}else 0<c.length&&(d.scriptType=h[0]);h.length=0}}}},$l.prototype.splitLtrAndRtlText=function(e){var t={value:null},i={value:null},r={value:null},n=1,o={value:null},a=[],s=!1,l=this.bodyWidget.page.documentHelper.textHelper;if(0<this.childWidgets.length){for(var d=this.childWidgets[e],h=0;h<d.children.length;h+=n){var c=d.children[h],n=1,g=void 0;if(c instanceof ie&&(g=c),c instanceof te&&0==c.fieldType?s=!0:c instanceof te&&2===c.fieldType&&(s=!1),null!=g&&!s){var p=g.text,u=g.characterFormat.bidi,f=!1,m=a.length,y=(u&&(f=l.isRightToLeftLanguage(c.characterFormat.localeIdBidi)),l.splitTextByConsecutiveLtrAndRtl(p,u,f,a,t,o,i,r));if(1<y.length)for(var v=0;v<y.length;v++){var W,p=y[v];0<v?((W=g.clone()).text=p,W.characterRange=a[v+m],d.children.splice(h+v,0,W),W.line=d,n++,0<g.revisionLength&&this.updateTextElementInRevisionRange(g,W)):(g.text=p,g.characterRange=a[m])}else 0<y.length&&(g.characterRange=a[m])}}a.length=0}},$l.prototype.updateTextElementInRevisionRange=function(e,t){for(var i=0;i<e.revisionLength;i++){var r=e.getRevision(i);t.addRevision(r),t.removedIds=[]}},$l.prototype.combineconsecutiveRTL=function(e){for(var t=!1,i=this.bodyWidget.page.documentHelper,r=i.textHelper,n=e;n<this.childWidgets.length;n++)for(var o=this.childWidgets[n],a=0;a<=o.children.length-2;a++){var s,l=o.children[a];l instanceof te&&0===l.fieldType?t=!0:l instanceof te&&2===l.fieldType&&(t=!1),!t&&l instanceof ie&&o.children[a+1]instanceof ie&&(s=o.children[a+1],((l=l).characterFormat.complexScript&&l.scriptType==s.scriptType||l.characterFormat.bidi&&l.scriptType!==j.FontScriptType.Hebrew&&l.characterRange==j.CharacterRangeType.RightToLeft&&s.characterRange==j.CharacterRangeType.RightToLeft)&&0<l.text.length&&0<s.text.length&&!r.isWordSplitChar(l.text[l.text.length-1])&&!r.isWordSplitChar(s.text[0])&&l.characterFormat.isEqualFormat(s.characterFormat)&&this.compareRevisions(l.getAllRevision(),s.getAllRevision())||l.characterRange==j.CharacterRangeType.RightToLeft&&s.characterRange==j.CharacterRangeType.RightToLeft&&0<l.text.length&&0<s.text.length&&r.isWordSplitChar(l.text[l.text.length-1])&&r.isWordSplitChar(s.text[0])&&l.characterFormat.isEqualFormat(s.characterFormat)&&this.compareRevisions(l.getAllRevision(),s.getAllRevision())?(l.text=l.text+s.text,o.children.splice(a+1,1),a--,l.isWidthUpdated=!1):"Word2013"!==i.compatibilityMode&&l.characterFormat.bidi&&!r.isRightToLeftLanguage(l.characterFormat.localeIdBidi)&&l.characterRange===j.CharacterRangeType.Number&&this.combineConsecutiveRTLDateFormatText(o,a))}},$l.prototype.combineConsecutiveRTLDateFormatText=function(e,t){var i=e.children[t],r=e.children[t+1];if(r&&i.characterFormat.isEqualFormat(r.characterFormat)&&("/"===r.text||"."===r.text)){for(var n=i.text+r.text,o=1,a=t+2,s=!0;a<e.children.length&&(r=e.children[a],i.characterFormat.isEqualFormat(r.characterFormat))&&(r.characterRange===j.CharacterRangeType.Number||!("/"!==r.text&&"."!==r.text||s));){var s=r.characterRange===j.CharacterRangeType.WordSplit,l=e.children[a+1];if(!(!s||l&&i.characterFormat.isEqualFormat(l.characterFormat)&&l.characterRange===j.CharacterRangeType.Number))break;n+=r.text,o++,a++}1<o&&(i.text=n,e.children.splice(t+1,o),i.isWidthUpdated=!1)}},$l.prototype.compareRevisions=function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},$l.prototype.clone=function(){var e=new $l;e.paragraphFormat.copyFormat(this.paragraphFormat),e.characterFormat.copyFormat(this.characterFormat);for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t].clone();e.childWidgets.push(i);for(var r=0;r<i.children.length;r++){var n=i.children[r];(n instanceof ae&&"Inline"!==n.textWrappingStyle||n instanceof ne||n instanceof oe)&&e.floatingElements.push(n)}i.paragraph=e}return e.x=this.x,e.y=this.y,e.height=this.height,e.width=this.width,e.absoluteXPosition=G.isNullOrUndefined(this.absoluteXPosition)?void 0:{width:this.absoluteXPosition.width,x:this.absoluteXPosition.x},this.contentControlProperties&&(e.contentControlProperties=this.contentControlProperties),e},$l.prototype.destroyInternal=function(e){var t=this.height;if(!G.isNullOrUndefined(this.childWidgets)){for(var i=0;i<this.childWidgets.length;i++){if(this.childWidgets[i].destroy(),1===this.childWidgets.length&&G.isNullOrUndefined(this.childWidgets[0].children)&&(this.childWidgets=void 0),G.isNullOrUndefined(this.childWidgets))break;i--}this.childWidgets=void 0}G.isNullOrUndefined(this.containerWidget)||G.isNullOrUndefined(this.containerWidget.childWidgets)||-1===this.containerWidget.childWidgets.indexOf(this)||(this.containerWidget.childWidgets.splice(this.containerWidget.childWidgets.indexOf(this),1),this.containerWidget.height-=t,this.containerWidget=void 0),this.hasOwnProperty("absoluteXPosition")&&delete this.absoluteXPosition,this.destroy()},$l.prototype.destroy=function(){this.paragraphFormat=void 0,this.characterFormat=void 0,Ql.prototype.destroy.call(this)},$l.prototype.componentDestroy=function(){this.paragraphFormat&&this.paragraphFormat.destroy(),this.paragraphFormat=void 0,this.characterFormat&&this.characterFormat.destroy(),this.characterFormat=void 0,Ql.prototype.componentDestroy.call(this)};var Ql,Z=$l;function $l(){var e=Ql.call(this)||this;return e.isSectionBreak=!1,e.isChangeDetected=!1,e.isUpdateBookmarkEnd=!1,e.ischildContentControl=!1,e.textWrapWidth=!1,e.clientX=void 0,e.isRender=!0,e.floatingElements=[],e.paragraphFormat=new vl(e),e.characterFormat=new ce(e),e}td.prototype.clone=function(){var e=new td;return e.allowOverlap=this.allowOverlap,e.distanceTop=this.distanceTop,e.distanceRight=this.distanceRight,e.distanceLeft=this.distanceLeft,e.distanceBottom=this.distanceBottom,e.verticalAlignment=this.verticalAlignment,e.verticalOrigin=this.verticalOrigin,e.verticalPosition=this.verticalPosition,e.horizontalAlignment=this.horizontalAlignment,e.horizontalOrigin=this.horizontalOrigin,e.horizontalPosition=this.horizontalPosition,e};var ed=td;function td(){}e(c,id=Yl),Object.defineProperty(c.prototype,"isGridUpdated",{get:function(){return(4&this.flags)>>2!=0},set:function(e){this.flags=251&this.flags|(e?1:0)<<2},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"continueHeader",{get:function(){return(2&this.flags)>>1!=0},set:function(e){this.flags=253&this.flags|(e?1:0)<<1},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"header",{get:function(){return 0!=(1&this.flags)},set:function(e){this.flags=254&this.flags|(e?1:0)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isBidiTable",{get:function(){return(16&this.flags)>>4!=0},set:function(e){this.flags=239&this.flags|(e?1:0)<<4},enumerable:!0,configurable:!0}),c.prototype.equals=function(e){return e instanceof c&&e.tableFormat===this.tableFormat},c.prototype.combineRows=function(e){for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t];if(!G.isNullOrUndefined(i.firstChild)&&0!==i.firstChild.index&&1===i.getSplitWidgets().length)for(var r=0;r<i.childWidgets.length;r++)i.childWidgets[r].index--;0===i.childWidgets.length?(i.destroy(),t--):i.combineCells(e)}},c.prototype.contains=function(e){if(this.equals(e.ownerTable))return!0;for(;!G.isNullOrUndefined(e.ownerTable)&&e.ownerTable.isInsideTable;){if(this.equals(e.ownerTable))return!0;e=e.ownerTable.associatedCell}return this.equals(e.ownerTable)},c.prototype.getOwnerWidth=function(e){var t=this.getContainerWidth();return 0<=(t="Auto"===this.tableFormat.preferredWidthType?t-this.leftIndent-this.rightIndent:t)?t:0},c.prototype.getTableWidth=function(){for(var e=0,t=0;t<this.childWidgets.length;t++){for(var i=0,r=this.childWidgets[t],n=0;n<r.childWidgets.length;n++)i+=r.childWidgets[n].cellFormat.cellWidth;e<i&&(e=i)}return e},c.prototype.getTableCellWidth=function(){for(var e=0,t=0;t<this.childWidgets.length;t++){for(var i=0,r=this.childWidgets[t],n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n],a=o.width,s=0===a;0===a&&(a=o.cellFormat.cellWidth,"Center"!==this.tableFormat.tableAlignment||this.tableFormat.allowAutoFit||"Percent"===this.tableFormat.preferredWidthType||0===this.tableFormat.preferredWidth||this.tableFormat.preferredWidth!==a||(e=K.convertPointToPixel(this.tableFormat.preferredWidth)),a>o.cellFormat.preferredWidth&&"Percent"!==this.tableFormat.preferredWidthType&&0!==o.cellFormat.preferredWidth&&"Percent"!==o.cellFormat.preferredWidthType&&(a=o.cellFormat.preferredWidth),a=K.convertPointToPixel(a-(o.margin.left+o.margin.right))),i+=a+o.margin.left+o.margin.right,s&&n===r.childWidgets.length-1&&"Center"===this.tableFormat.tableAlignment&&"Percent"===this.tableFormat.preferredWidthType&&(i-=K.convertPointToPixel(this.tableFormat.borders.right.getLineWidth()))}e<i&&(e=i)}return e},c.prototype.getTableClientWidth=function(e){return"Point"===this.tableFormat.preferredWidthType&&0<this.tableFormat.preferredWidth?e=this.tableFormat.preferredWidth:"Percent"===this.tableFormat.preferredWidthType&&0<this.tableFormat.preferredWidth&&(e=e*this.tableFormat.preferredWidth/100),e},c.prototype.getCellWidth=function(e,t,i,r){var n=e;return"Percent"===t?n=e*i/100:"Point"===t?n=e:G.isNullOrUndefined(r)||(n=this.getMinimumPreferredWidth(r)),n},c.prototype.getMinimumPreferredWidth=function(e){return 0!==e.cellFormat.preferredWidth||0===e.cellFormat.cellWidth||e.ownerTable&&e.ownerTable.bodyWidget&&e.ownerTable.bodyWidget.page&&e.ownerTable.bodyWidget.page.documentHelper&&e.ownerTable.bodyWidget.page.documentHelper.layout&&this.bodyWidget.page.documentHelper.layout.isAllColumnHasAutoWidthType?e.getMinimumPreferredWidth():e.cellFormat.cellWidth},c.prototype.fitCellsToClientArea=function(e){for(var t=e/this.getTableWidth(),i=0;i<this.childWidgets.length;i++){var r=this.childWidgets[i];r.rowFormat.gridAfterWidth*=t,r.rowFormat.gridBeforeWidth*=t;for(var n=0;n<r.childWidgets.length;n++)r.childWidgets[n].cellFormat.cellWidth*=t,r.childWidgets[n].cellFormat.preferredWidth*=t}},c.prototype.getTableCellWidget=function(e){for(var t=void 0,i=G.isNullOrUndefined(this.bodyWidget)||G.isNullOrUndefined(this.bodyWidget.page)||G.isNullOrUndefined(this.bodyWidget.page.documentHelper)?0:this.bodyWidget.page.documentHelper.resizerBoundaryWidth,r=0;r<this.childWidgets.length;r++)if(this.childWidgets[r].y<=e.y&&this.childWidgets[r].y+this.childWidgets[r].height+this.childWidgets[r].topBorderWidth>=e.y-i){t=this.childWidgets[r].getTableCellWidget(e);break}return t},c.prototype.calculateGrid=function(e,t){var i=[],r=[],n=[],o=this.getOwnerWidth(!0),a=this.getTableClientWidth(o);this.tableCellInfo=new N;for(var s=0;s<this.childWidgets.length;s++){var l=this.childWidgets[s],d=new N,h=l.rowFormat,c=l.rowFormat.gridBefore,g=0,p=(i.indexOf(g)<0&&(i.push(g),r.push(g)),g+=this.getCellWidth(h.gridBeforeWidth,h.gridBeforeWidthType,a,null),parseFloat(g.toFixed(2)));i.indexOf(p)<0&&(i.push(p),r.push(g));for(var u=0;u<l.childWidgets.length;u++){for(var f,m,y=l.childWidgets[u],v=0,W=0;W<n.length;W++)n[W].columnIndex<c||(f=n[W].cellFormat.rowSpan,m=!0,n[W].columnIndex>c?(m=!1,u===l.childWidgets.length-1&&0<l.rowFormat.gridAfter&&(this.updateValidPreferredWidth(n[W]),v+=this.getCellWidth(n[W].cellFormat.preferredWidth,n[W].cellFormat.preferredWidthType,a,null))):(this.updateValidPreferredWidth(n[W]),g+=this.getCellWidth(n[W].cellFormat.preferredWidth,n[W].cellFormat.preferredWidthType,a,null),c=n[W].columnIndex+n[W].cellFormat.columnSpan),(m=m||u!==l.childWidgets.length-1?m:!0)&&s-n[W].ownerRow.rowIndex==f-1&&(n.splice(W,1),W--));if(1<y.cellFormat.rowSpan)if(0===n.length||n[n.length-1].columnIndex<=c)n.push(y);else for(var b=n.length;0<b;b--)n[b-1].columnIndex>c&&n.splice(b-1,0,y);d.containsKey(y.cellIndex)||d.add(y.cellIndex,parseFloat((g-p).toFixed(2))),c+=y.cellFormat.columnSpan,this.updateValidPreferredWidth(y),g+=this.getCellWidth(y.cellFormat.preferredWidth,y.cellFormat.preferredWidthType,a,null);var x=parseFloat(g.toFixed(2));i.indexOf(x)<0&&(i.push(x),r.push(g)),0<v&&(g+=v,x=parseFloat(g.toFixed(2)),i.indexOf(x)<0)&&(i.push(x),r.push(g)),u===l.childWidgets.length-1&&0<h.gridAfter&&(g+=this.getCellWidth(h.gridAfterWidth,"Point",a,null),i.indexOf(parseFloat(g.toFixed(2)))<0&&(i.push(parseFloat(g.toFixed(2))),r.push(g)),c+=h.gridAfter),this.tableCellInfo.containsKey(l.rowIndex)||this.tableCellInfo.add(l.rowIndex,d)}}i.sort(function(e,t){return e-t}),r.sort(function(e,t){return e-t}),(0<this.tableHolder.columns.length||e)&&this.updateColumnSpans(i,a,r,t),this.tableCellInfo.clear(),this.tableCellInfo=void 0},c.prototype.updateValidPreferredWidth=function(e){var t;"Point"===e.cellFormat.preferredWidthType&&e.cellFormat.preferredWidth!==e.cellFormat.cellWidth&&e.cellFormat.preferredWidth<K.round(e.getMinimumPreferredWidth(),2)&&(0===e.indexInOwner?e.cellFormat.preferredWidth=e.ownerColumn.endOffset:(t=e.ownerRow.childWidgets[e.indexInOwner-1]).ownerColumn&&(e.cellFormat.preferredWidth=e.ownerColumn.endOffset-t.ownerColumn.endOffset))},c.prototype.updateColumnSpans=function(e,t,i,r){for(var n=0;n<this.childWidgets.length;n++){var o=this.childWidgets[n];0<=o.rowFormat.gridBeforeWidth&&(o.rowFormat.gridBefore=o.getGridCount(e,void 0,-1,t,i));for(var a=0;a<o.childWidgets.length;a++){var s=o.childWidgets[a],l=o.getGridCount(e,s,s.getIndex(),t,i);0<l&&s.cellFormat.columnSpan!==l&&!r&&(s.cellFormat.columnSpan=l)}0<=o.rowFormat.gridAfterWidth&&(o.rowFormat.gridAfter=o.getGridCount(e,void 0,o.childWidgets.length,t,i))}},c.prototype.getMinimumAndMaximumWordWidth=function(e,t,i){void 0===i&&(i=0),this.checkTableColumns();var r=this.tableHolder.isAllColumnHasPointWidthType(),n=r?this.tableHolder.getTotalWidth(0):this.tableHolder.getTotalWidth(1),n=(e<n&&(e=n),t<(n=r?n:this.tableHolder.getTotalWidth(2))&&(t=n),r?this.tableHolder.getTotalWidth(0):this.tableHolder.getTotalWidth(4));return{minimumWordWidth:e,maximumWordWidth:t,maxParaWidth:i=i<n?n:i}},c.prototype.checkTableColumns=function(){this.isGridUpdated||(!this.isAutoFit()&&0!==this.tableHolder.columns.length||this.buildTableColumns(),this.isGridUpdated=!1)},c.prototype.isAutoFit=function(){var e=this.bodyWidget;return!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.page)&&e.page.documentHelper.layout.getParentTable(this).tableFormat.allowAutoFit},c.prototype.updateRowSpan=function(){for(var e=this.childWidgets.length,t=0;t<e;t++)for(var i=this.childWidgets[t],r=0;r<i.childWidgets.length;r++){var n,o=i.childWidgets[r];1<o.cellFormat.rowSpan&&(n=e-i.rowIndex,o.cellFormat.rowSpan>n)&&(o.cellFormat.rowSpan=n)}},c.prototype.assignCellColumnIndexes=function(){for(var e=[],t=0;t<this.childWidgets.length;t++){for(var i=this.childWidgets[t],r=i.rowFormat?i.rowFormat.gridBefore:0,n=0;n<i.childWidgets.length;n++){for(var o=i.childWidgets[n],a=0;a<e.length;a++){var s=(l=e[a]).columnIndex+l.cellFormat.columnSpan;l.columnIndex<=r&&r<s&&(r=s)}o.columnIndex=r,1<o.cellFormat.rowSpan&&e.push(o),r+=0<o.cellFormat.columnSpan?o.cellFormat.columnSpan:1}for(var l,a=e.length-1;0<=a;a--)t-(l=e[a]).ownerRow.rowIndex>=l.cellFormat.rowSpan-1&&e.splice(a,1)}},c.prototype.updateCellFormatPreferredWidth=function(){for(var e=0,t=0;t<this.tableHolder.columns.length;t++){var i=this.tableHolder.columns[t];0===t?e=i.endOffset/i.preferredWidth:i.endOffset<this.tableHolder.columns[t-1].endOffset&&(i.endOffset=this.tableHolder.columns[t-1].endOffset+i.preferredWidth*e)}for(t=0;t<this.childWidgets.length;t++)for(var r=this.childWidgets[t],n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];"Point"===o.cellFormat.preferredWidthType&&this.tableHolder&&this.tableHolder.columns&&0<this.tableHolder.columns.length&&this.tableHolder.columns[o.columnIndex+o.cellFormat.columnSpan-1]&&(o.cellFormat.preferredWidth=this.tableHolder.columns[o.columnIndex+o.cellFormat.columnSpan-1].endOffset-(0<o.columnIndex?this.tableHolder.columns[o.columnIndex-1].endOffset:0))}},c.prototype.buildTableColumns=function(){if(!this.isGridUpdated){this.tableHolder.resetColumns();for(var e=0,t=[],i=!1,r="Auto"===this.tableFormat.preferredWidthType||"Point"===this.tableFormat.preferredWidthType&&0===this.tableFormat.preferredWidth,n=this.tableFormat.allowAutoFit,o=(!n&&!G.isNullOrUndefined(this.bodyWidget.page)&&this.bodyWidget.page.documentHelper&&this.bodyWidget.page.documentHelper&&this.bodyWidget.page.documentHelper.editorProperties.isTableMarkerDragging&&(r=!0),e=G.isNullOrUndefined(this.bodyWidget.page)||!(this.bodyWidget.page.viewer instanceof Nl)||!n&&"Percent"!==this.tableFormat.preferredWidthType||this.isInsideTable||this.containerWidget instanceof P?this.getOwnerWidth(!0):K.convertPixelToPoint(this.bodyWidget.page.viewer.clientArea.width-3*this.bodyWidget.page.viewer.padding.right),!G.isNullOrUndefined(this.bodyWidget.page)&&this.bodyWidget.page.documentHelper&&this.bodyWidget.page.documentHelper.layout&&(this.bodyWidget.page.documentHelper.layout.isAllColumnHasAutoWidthType=this.bodyWidget.page.documentHelper.layout.isAuto(this)),"Percent"!==this.tableFormat.preferredWidthType&&(e=this.tableFormat.preferredWidth>e?this.tableFormat.preferredWidth:e),r&&0===this.tableFormat.preferredWidth&&!n),a=this.getTableClientWidth(e),s=this.getContainerWidth(),l=(o&&!this.isDefaultFormatUpdated&&n&&this.splitWidthToTableCells(a,o),!1),d=!1,h=0;h<this.childWidgets.length;h++){var c=this.childWidgets[h],g=c.rowFormat,p=0,u=0,f=new bc,m=0;0<g.gridBefore&&(0!==c.rowFormat.beforeWidth||0!==c.rowFormat.gridBeforeWidth)&&(!this.bodyWidget.page.documentHelper.alignTablesRowByRow||"Left"===c.ownerTable.tableFormat.tableAlignment||"Word2003"===this.bodyWidget.page.documentHelper.compatibilityMode&&0<c.ownerTable.firstChild.rowFormat.gridAfter)&&(i=!0,u=this.getCellWidth(g.gridBeforeWidth,c.rowFormat.gridAfterWidthType,a,null),f.minimumWidth=u,this.tableHolder.addColumns(p,p=g.gridBefore,u,f,m=u,"Point",r));for(var y=0;y<c.childWidgets.length;y++){var v=c.childWidgets[y];(1<v.cellFormat.rowSpan||1<v.cellFormat.columnSpan)&&(l=!0),0===t.length&&(v.columnIndex=p);for(var W=0;W<t.length;W++){var b,x,w=t[W];w.columnIndex<p?v.columnIndex=p:(x=1,b=!0,x=w.cellFormat.rowSpan,w.columnIndex>p?(v.columnIndex=p,b=!1):(f=w.getCellSizeInfo(n),u=this.getCellWidth(w.cellFormat.preferredWidth,w.cellFormat.preferredWidthType,a,w),0<this.tableHolder.columns.length?this.tableHolder.addColumns(p,p=this.tableHolder.columns.indexOf(w.ownerColumn)+w.cellFormat.columnSpan,u,f,m+=u,v.cellFormat.preferredWidthType,r):this.tableHolder.addColumns(p,p=w.columnIndex+w.cellFormat.columnSpan,u,f,m+=u,v.cellFormat.preferredWidthType,r),v.columnIndex=p),(b=b||y!==c.childWidgets.length-1?b:!0)&&h-w.ownerRow.rowIndex==x-1&&(t.splice(W,1),W--))}if(1<v.cellFormat.rowSpan)if(0===t.length||t[t.length-1].columnIndex<=p)t.push(v);else{for(var F=0,C=t.length;0<C;C--)t[C-1].columnIndex>p&&(F=C-1);t.splice(F,0,v)}f=v.getCellSizeInfo(n),(u=this.getCellWidth(v.cellFormat.preferredWidth,v.cellFormat.preferredWidthType,a,v))<f.minimumWordWidth&&n&&"Point"==v.cellFormat.preferredWidthType&&Math.round(u)<Math.round(v.cellFormat.cellWidth)&&(d=!0),this.tableHolder.addColumns(p,p+=v.cellFormat.columnSpan,u,f,m+=u,v.cellFormat.preferredWidthType,r),y===c.childWidgets.length-1&&0<g.gridAfterWidth&&(u=this.getCellWidth(g.gridAfterWidth,"Point",a,null),f.minimumWordWidth=f.maximumWordWidth=f.minimumWidth=u,f.maxParaWidth=0,this.tableHolder.addColumns(p,p+=g.gridAfter,u,f,m+=u,"Point",r))}}l&&d&&"Auto"===this.tableFormat.preferredWidthType&&!this.isContainInsideTable&&!this.isInsideTable&&(l=!1),!G.isNullOrUndefined(this.bodyWidget.page)&&this.bodyWidget.page.documentHelper&&this.bodyWidget.page.documentHelper.layout&&this.bodyWidget.page.documentHelper.layout.isAllColumnHasAutoWidthType&&(this.bodyWidget.page.documentHelper.layout.isAllColumnHasAutoWidthType=!1),o&&!this.isDefaultFormatUpdated&&(this.isDefaultFormatUpdated=!0),this.tableHolder.validateColumnWidths(),n&&this.isAutoTableCellPctWidthExceedsHundred(r,l,e)?this.tableHolder.resizeColumnsToWidestParaWidth():n?this.tableHolder.autoFitColumn(e,a,r,this.isInsideTable,n,l,this.bodyWidget.page.viewer.clientArea.width,this.leftIndent+this.rightIndent,s,this.tableFormat.preferredWidthType,i):(o=!1,!G.isNullOrUndefined(this.bodyWidget.page)&&this.bodyWidget.page.documentHelper.isRowOrCellResizing&&(o=!0),this.tableHolder.fitColumns(e,a,r,n,this.leftIndent+this.rightIndent,o)),this.setWidthToCells(a,r)}},c.prototype.isAutoTableCellPctWidthExceedsHundred=function(e,t,i){var r=this.tableHolder.columns.length;if(this.isInsideTable||t||!e||"Auto"!==this.tableFormat.preferredWidthType||0!==this.tableFormat.preferredWidth||0===r||this.tableHolder.getTotalWidth(2)>=i)return!1;for(var n=0;n<this.childWidgets.length;n++){var o=this.childWidgets[n];if(0<o.rowFormat.gridBefore||0<o.rowFormat.gridAfter||o.childWidgets.length!==r)return!1;for(var a=0,s=0;s<o.childWidgets.length;s++){var l=o.childWidgets[s];if("Percent"!==l.cellFormat.preferredWidthType||l.childWidgets.some(function(e){return e instanceof c}))return!1;a+=l.cellFormat.preferredWidth}if(a<=100)return!1}return!0},c.prototype.setWidthToCells=function(e,t){var i=!1;this.containerWidget instanceof Y&&this.containerWidget.page&&this.containerWidget.page.documentHelper&&(this.containerWidget.page.documentHelper.editorProperties.isTableMarkerDragging||this.containerWidget.page.documentHelper.isRowOrCellResizing)&&(i=!0);for(var r=0;r<this.childWidgets.length;r++){var n=this.childWidgets[r],o=n.rowFormat;0<o.gridBefore&&(o.beforeWidth=this.tableHolder.getCellWidth(0,o.gridBefore,e));for(var a,s=0;s<n.childWidgets.length;s++){var l=n.childWidgets[s];G.isNullOrUndefined(l)||("Auto"===l.cellFormat.preferredWidthType&&(l.cellFormat.initialCellWidth=l.cellFormat.cellWidth),l.cellFormat.cellWidth=this.tableHolder.getCellWidth(l.columnIndex,l.cellFormat.columnSpan,e,i))}0<o.gridAfter&&(a=this.tableHolder.columns.length-o.gridAfter,o.afterWidth=this.tableHolder.getCellWidth(a,o.gridAfter,e))}},c.prototype.updateProperties=function(e,t,i){if(e&&(this.tableFormat.allowAutoFit="FixedColumnWidth"!==i),this!==t)t.updateProperties(!1,t,i);else if("FixedColumnWidth"===i){this.tableFormat.preferredWidth=0,this.tableFormat.preferredWidthType="Auto";for(var r=0;r<this.childWidgets.length;r++)for(var n=this.childWidgets[r],o=0;o<n.childWidgets.length;o++){var a=n.childWidgets[o];a.cellFormat.preferredWidthType="Point",a.cellFormat.preferredWidth=a.cellFormat.cellWidth}}else if("FitToWindow"===i){var s=this.tableHolder.getTotalWidth(0);this.tableFormat.leftIndent=0,this.tableFormat.preferredWidth=100,this.tableFormat.preferredWidthType="Percent";for(r=0;r<this.childWidgets.length;r++)for(var l=this.childWidgets[r],d=0;d<l.childWidgets.length;d++)"Percent"!==(h=l.childWidgets[d]).cellFormat.preferredWidthType&&(h.cellFormat.preferredWidthType="Percent",h.cellFormat.preferredWidth=h.cellFormat.cellWidth/s*100)}else{this.tableFormat.preferredWidth=0,this.tableFormat.preferredWidthType="Auto";for(r=0;r<this.childWidgets.length;r++){(l=this.childWidgets[r]).rowFormat.beforeWidth=0,l.rowFormat.gridBefore=0,l.rowFormat.gridBeforeWidth=0,l.rowFormat.gridBeforeWidthType="Auto",l.rowFormat.afterWidth=0,l.rowFormat.gridAfter=0,l.rowFormat.gridAfterWidth=0,l.rowFormat.gridAfterWidthType="Auto";for(var h,o=0;o<l.childWidgets.length;o++)(h=l.childWidgets[o]).cellFormat.preferredWidth=0,h.cellFormat.preferredWidthType="Auto"}}},c.prototype.getMaxRowWidth=function(e){for(var t=0,i=0;i<this.childWidgets.length;i++){for(var r=this.childWidgets[i],n=0,o=0;o<r.childWidgets.length;o++){var a=r.childWidgets[o];n+=this.getCellWidth(a.cellFormat.preferredWidth,a.cellFormat.preferredWidthType,e,a)}t<n&&(t=n)}return t},c.prototype.updateWidth=function(e,t,i){var r=this.tableHolder.getTotalWidth(0),n=this.getOwnerWidth(!0),o=(G.isNullOrUndefined(this.bodyWidget)||G.isNullOrUndefined(this.bodyWidget.page)||!(this.bodyWidget.page.viewer instanceof Nl)||"Percent"!==this.tableFormat.preferredWidthType||this.isInsideTable||this.containerWidget instanceof P||(n=K.convertPixelToPoint(this.bodyWidget.page.viewer.clientArea.width-3*this.bodyWidget.page.viewer.padding.right)),this.getTableClientWidth(n));"Auto"!==this.tableFormat.preferredWidthType&&("Point"===this.tableFormat.preferredWidthType?this.tableFormat.preferredWidth=this.getMaxRowWidth(o):(r=this.getMaxRowWidth(o),this.tableFormat.preferredWidth=r/n*100)),i&&t&&"Auto"===this.tableFormat.preferredWidthType&&this.tableFormat.preferredWidth<this.getMaxRowWidth(o)&&(this.tableFormat.preferredWidth=this.getMaxRowWidth(o))},c.prototype.convertPointToPercent=function(e,t){e=e/t*100;return(e=Math.round(e))<100?e:100},c.prototype.updateChildWidgetLeft=function(e){for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t];i.x=e,i.updateChildWidgetLeft(e)}},c.prototype.shiftWidgetsForRtlTable=function(e,t){var i=t.x,r=e.right,n=0;t.tableFormat&&0<t.tableFormat.cellSpacing&&(n=t.tableFormat.cellSpacing);for(var o=0;o<t.childWidgets.length;o++)for(var a=t.childWidgets[o],s=r-(a.x-i),l=0;l<a.childWidgets.length;l++){var d=a.childWidgets[l];s-=d.width+d.margin.left+d.margin.right-d.rightBorderWidth+n,d.updateWidgetLeft(s+d.margin.left)}},c.prototype.clone=function(e){var t=new c;if(t.tableHolder=this.tableHolder.clone(),t.tableFormat.copyFormat(this.tableFormat),this.wrapTextAround&&(t.wrapTextAround=this.wrapTextAround,t.positioning=this.positioning.clone()),!e)for(var i=0;i<this.childWidgets.length;i++){var r=this.childWidgets[i].clone();t.childWidgets.push(r),r.containerWidget=t,r.index=i}return t.x=this.x,t.y=this.y,t.height=this.height,t.width=this.width,t.isBidiTable=this.isBidiTable,t.isGridUpdated=this.isGridUpdated,t.containerWidget=this.containerWidget,this.contentControlProperties&&(t.contentControlProperties=this.contentControlProperties),t},c.getTableOf=function(e){var t;if(e instanceof Wl)return t=$.getRowOf(e),G.isNullOrUndefined(t)?e.ownerBase instanceof xl&&e.ownerBase.ownerBase instanceof c?e.ownerBase.ownerBase:void 0:t.ownerTable},c.prototype.fitChildToClientArea=function(){var e=this.getContainerWidth();Math.round(e)<Math.round(this.getTableWidth())&&this.fitCellsToClientArea(e);for(var t=0;t<this.childWidgets.length;t++)for(var i=this.childWidgets[t],r=0;r<i.childWidgets.length;r++)for(var n=i.childWidgets[r],o=0;o<n.childWidgets.length;o++)n.childWidgets[o]instanceof c&&n.childWidgets[o].fitChildToClientArea()},c.prototype.getColumnCellsForSelection=function(e,t){for(var i=[],r=e.columnIndex,n=t.columnIndex+t.cellFormat.columnSpan,o=0;o<this.childWidgets.length;o++)for(var a=this.childWidgets[o],s=0;s<a.childWidgets.length;s++){var l=a.childWidgets[s],d=l.columnIndex,h=l.cellFormat.columnSpan;r<d+h&&d+h<n||r<d&&d<n?i.indexOf(l)<0&&i.push(l):(r<d&&d<n&&d+h<n||d<r&&n<d+h||d===r||d+h===n)&&i.indexOf(l)<0&&i.push(l)}return i},c.prototype.splitWidthToTableCells=function(e,t){for(var i=0;i<this.childWidgets.length;i++)this.childWidgets[i].splitWidthToRowCells(e,t)},c.prototype.insertTableRowsInternal=function(e,t,i,r,n){for(var o=e.length-1;0<=o;o--){var a=e.splice(o,1)[0];if(a.containerWidget=this,r)for(var s=0;s<a.childWidgets.length;s++)a.childWidgets[s].cellFormat.initializeCellBorders();this.childWidgets.splice(t,0,a)}this.updateRowIndex(t),this.isGridUpdated=!1,i&&(this.calculateGrid(!0,n),this.buildTableColumns()),this.isGridUpdated=!0},c.prototype.updateRowIndex=function(e){for(var t=e;t<this.childWidgets.length;t++){var i=this.childWidgets[t];i.index=t;for(var r=0;r<i.childWidgets.length;r++)i.childWidgets[r].index=r,i.childWidgets[r].rowIndex=i.rowIndex;e++}},c.prototype.getCellStartOffset=function(e){var t,i=0;return i=e&&this.tableCellInfo&&this.tableCellInfo.containsKey(e.ownerRow.rowIndex)&&(t=this.tableCellInfo.get(e.ownerRow.rowIndex)).containsKey(e.cellIndex)?t.get(e.cellIndex):i},c.prototype.destroyInternal=function(e){var t=this.height;if(!G.isNullOrUndefined(this.childWidgets)){for(var i=0;i<this.childWidgets.length;i++){var r=void 0,r=this.childWidgets[i];if(G.isNullOrUndefined(r)||r.destroyInternal(e),G.isNullOrUndefined(this.childWidgets))break;i--}this.childWidgets=void 0}G.isNullOrUndefined(this.containerWidget)||(this.containerWidget instanceof Y&&-1!==this.containerWidget.floatingElements.indexOf(this)&&this.containerWidget.floatingElements.splice(this.containerWidget.floatingElements.indexOf(this),1),G.isNullOrUndefined(this.containerWidget.childWidgets)||(-1!==this.containerWidget.childWidgets.indexOf(this)&&this.containerWidget.childWidgets.splice(this.containerWidget.childWidgets.indexOf(this),1),this.containerWidget.height-=t),this.containerWidget=void 0),this.destroy()},c.prototype.destroy=function(){this.tableFormat=void 0,this.spannedRowCollection&&this.spannedRowCollection.destroy(),this.spannedRowCollection=void 0,this.tableHolder=void 0,this.flags=void 0,this.leftMargin=void 0,this.topMargin=void 0,this.rightMargin=void 0,this.bottomMargin=void 0,this.headerHeight=void 0,this.isDefaultFormatUpdated=void 0,id.prototype.destroy.call(this)},c.prototype.componentDestroy=function(){this.tableFormat&&this.tableFormat.destroy(),this.tableFormat=void 0,this.spannedRowCollection&&this.spannedRowCollection.destroy(),this.spannedRowCollection=void 0,this.tableHolder&&this.tableHolder.destroy(),this.tableHolder=void 0,this.flags=void 0,this.leftMargin=void 0,this.topMargin=void 0,this.rightMargin=void 0,this.bottomMargin=void 0,this.headerHeight=void 0,this.isDefaultFormatUpdated=void 0,id.prototype.componentDestroy.call(this)};var id,Q=c;function c(){var e=id.call(this)||this;return e.flags=0,e.leftMargin=0,e.topMargin=0,e.rightMargin=0,e.bottomMargin=0,e.isDefaultFormatUpdated=!1,e.isContainInsideTable=!1,e.isHeaderNotRepeatForAllPages=!1,e.footnoteElement=[],e.isRender=!0,e.margin=new Hl(e.leftMargin,e.topMargin,e.rightMargin,e.bottomMargin),e.leftBorderWidth=0,e.rightBorderWidth=0,e.topBorderWidth=0,e.bottomBorderWidth=0,e.tableFormat=new xl(e),e.tableHolder=new pc,e.spannedRowCollection=new N,e}e(nd,rd=Yl),Object.defineProperty(nd.prototype,"rowIndex",{get:function(){return this.containerWidget?this.containerWidget.childWidgets.indexOf(this):-1},enumerable:!0,configurable:!0}),Object.defineProperty(nd.prototype,"ownerTable",{get:function(){if(this.containerWidget instanceof Q)return this.containerWidget},enumerable:!0,configurable:!0}),Object.defineProperty(nd.prototype,"nextRow",{get:function(){var e=this.indexInOwner;if(-1<e&&e<this.ownerTable.childWidgets.length-1)return this.ownerTable.childWidgets[e+1]},enumerable:!0,configurable:!0}),nd.prototype.equals=function(e){return e instanceof nd&&e.rowFormat===this.rowFormat},nd.prototype.combineCells=function(e){for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t];i.combineWidget(e),G.isNullOrUndefined(i.cellFormat)||1!==i.cellFormat.rowSpan?G.isNullOrUndefined(i.cellFormat)&&t--:(i.height,i.margin.top,i.margin.bottom,this.height-this.ownerTable.tableFormat.cellSpacing<i.height&&(this.height=this.ownerTable.tableFormat.cellSpacing+i.height))}},nd.getRowOf=function(e){var t;if(e instanceof Wl)return t=ee.getCellOf(e),G.isNullOrUndefined(t)?e.ownerBase instanceof S&&e.ownerBase.ownerBase instanceof nd?e.ownerBase.ownerBase:void 0:t.ownerRow},nd.prototype.getCell=function(e,t,i){for(var r=0;r<this.childWidgets.length;r++){var n=this.childWidgets[r];if(n.rowIndex===e&&(G.isNullOrUndefined(i)?n.columnIndex===t:n.cellIndex===i))return n}},nd.prototype.getCellUsingColumnIndex=function(e,t){for(var i,r=0;r<this.childWidgets.length;r++)if((i=this.childWidgets[r]).rowIndex===e&&i.columnIndex===t)return i;if(i=this.getCell(e,t),!G.isNullOrUndefined(i))return i},nd.prototype.splitWidthToRowCells=function(e,t){for(var i=this.childWidgets,r=e/i.length,n=0;n<i.length;n++)if(t&&0===i[n].cellFormat.preferredWidth)i[n].cellFormat.preferredWidth=r,this.ownerTable.isDefaultFormatUpdated=!1;else{if(t){this.ownerTable.isDefaultFormatUpdated=!0;break}i[n].cellFormat.preferredWidth=r}},nd.prototype.getGridCount=function(e,t,i,r,n){var o=0,a=0,s=this.ownerTable,l=this.rowFormat,a=-1===i?s.getCellWidth(l.gridBeforeWidth,l.gridBeforeWidthType,r,null):(o+=s.getCellWidth(l.gridBeforeWidth,l.gridBeforeWidthType,r,null),0<=i&&(o+=s.getCellStartOffset(t)),i<this.childWidgets.length?s.getCellWidth(t.cellFormat.preferredWidth,t.cellFormat.preferredWidthType,r,null):s.getCellWidth(l.gridAfterWidth,l.gridAfterWidthType,r,null)),i=n[e.indexOf(o)],t=this.getOffsetIndex(e,o),s=parseFloat((a+o).toFixed(2)),l=parseFloat((a+i).toFixed(2))===s||G.isNullOrUndefined(i)?this.getOffsetIndex(e,o+a):this.getOffsetIndex(e,i+a);return l-t},nd.prototype.getOffsetIndex=function(e,t){t=parseFloat(t.toFixed(2));var i=0;if(0<=e.indexOf(t))i=e.indexOf(t);else{for(var r=0;r<e.length;r++)if(e[r]>t)return r;i=e.length-1}return i},nd.prototype.getCellOffset=function(e,t){for(var i=0,r=this.ownerTable,n=0;n<this.childWidgets.length;n++){var o=this.childWidgets[n].cellFormat;if(n===e)break;i+=r.getCellWidth(o.preferredWidth,o.preferredWidthType,t,null)}return i},nd.prototype.updateRowBySpannedCells=function(){for(var e=this.getPreviousRowSpannedCells(),t=this.rowIndex,i=0;i<e.length;i++){var r=e[i];t<=r.ownerRow.rowIndex+r.cellFormat.rowSpan-1&&--r.cellFormat.rowSpan}},nd.prototype.getPreviousRowSpannedCells=function(e){for(var t=[],i=e?this:this.previousWidget;!G.isNullOrUndefined(i);){for(var r=0;r<i.childWidgets.length;r++){var n=i.childWidgets[r];1<n.cellFormat.rowSpan&&t.splice(0,0,n)}i=i.previousWidget}return t},nd.prototype.isCellsHaveSameWidthUnit=function(){if(0<this.childWidgets.length)for(var e=this.childWidgets[0].cellFormat.preferredWidthType,t=1;t<this.childWidgets.length;t++)if(e!=this.childWidgets[t].cellFormat.preferredWidthType)return!1;return!0},nd.prototype.updateUniformWidthUnitForCells=function(){var e=!1;this.ownerTable&&this.ownerTable.tableHolder&&this.ownerTable.tableHolder.columns&&this.childWidgets.length!==this.ownerTable.tableHolder.columns.length&&this.ownerTable.tableFormat.allowAutoFit&&(e=!0);for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t];"Point"!==i.cellFormat.preferredWidthType&&("Auto"===i.cellFormat.preferredWidthType&&(i.cellFormat.cellWidth=i.cellFormat.initialCellWidth),i.cellFormat.preferredWidthType="Point",i.cellFormat.preferredWidth=e?i.getMinimumPreferredWidth():i.cellFormat.cellWidth)}},nd.prototype.getTableCellWidget=function(e){for(var t=this.ownerTable.isBidiTable,i=G.isNullOrUndefined(this.bodyWidget)||G.isNullOrUndefined(this.bodyWidget.page)||G.isNullOrUndefined(this.bodyWidget.page.documentHelper)?0:this.bodyWidget.page.documentHelper.resizerBoundaryWidth,r=0;r<this.childWidgets.length;r++){var n=Math.round(this.childWidgets[r].x)-i;if(n-this.childWidgets[r].margin.left-1<=e.x&&(t?n+this.childWidgets[r].width+this.childWidgets[r].margin.left+this.childWidgets[r].margin.right>=e.x:n+this.childWidgets[r].width>=e.x))return this.childWidgets[r];if(r===this.childWidgets.length-1&&this.childWidgets[r].x+this.childWidgets[r].width+1<=e.x)return this.childWidgets[r]}var o=void 0;return o=0<this.childWidgets.length?(this.childWidgets[0].x<=e.x?this.childWidgets[this.childWidgets.length-1]:this.childWidgets[0]).getTableCellWidget(e):o},nd.prototype.getFirstRowWidth=function(){for(var e=0,t=0;t<this.childWidgets.length;t++)e+=this.childWidgets[t].getCellWidth(this.ownerTable);return e},nd.prototype.getCellWidget=function(e,t){var i=this.ownerTable.tableHolder.getValidColumnIndex(e),r=(e<i&&(t-=i-e,e=i),0);0<this.rowFormat.gridBefore&&(r+=this.rowFormat.gridBefore);for(var n=0;n<this.childWidgets.length;n++){var o=this.childWidgets[n],a=o.cellFormat.columnSpan;if(r<o.columnIndex&&(r<=e||r<e+t)&&o.columnIndex>e)return null;if((o.columnIndex<=e||o.columnIndex<e+t)&&o.columnIndex+a>e)return o;if(o.columnIndex>e)break;r+=a}return null},nd.prototype.getVerticalMergeStartCell=function(e,t){var i,r,n=this.ownerTable.tableHolder.columns;return 0<this.rowFormat.gridBefore&&this.rowFormat.gridBefore>e+t?null:(i=this.getCellWidget(e,t),G.isNullOrUndefined(i)?e+this.rowFormat.gridAfter!==n.length&&(n=this.previousWidget,G.isNullOrUndefined(n)||(r=n.getVerticalMergeStartCell(e,t)),!G.isNullOrUndefined(r))&&1<r.cellFormat.rowSpan&&this.index===r.rowIndex+r.cellFormat.rowSpan-1?r:null:i)},nd.prototype.getMinimumAndMaximumWordWidth=function(e,t,i){return{minimumWordWidth:e,maximumWordWidth:t,maxParaWidth:i=void 0===i?0:i}},nd.prototype.destroyInternal=function(e){var t=this.height;if(!G.isNullOrUndefined(this.childWidgets)){for(var i=0;i<this.childWidgets.length;i++){if(this.childWidgets[i].destroyInternal(e),G.isNullOrUndefined(this.childWidgets))break;i--}this.childWidgets=void 0}G.isNullOrUndefined(this.containerWidget)||G.isNullOrUndefined(this.containerWidget.childWidgets)||(this.containerWidget.childWidgets.splice(this.containerWidget.childWidgets.indexOf(this),1),(G.isNullOrUndefined(this.containerWidget.childWidgets)||0===this.containerWidget.childWidgets.length)&&this.containerWidget instanceof Q?this.containerWidget.destroyInternal(e):this.containerWidget.containerWidget instanceof Y&&(this.containerWidget.containerWidget.height-=t),this.containerWidget.height-=t),this.destroy()},nd.prototype.clone=function(e){var t=new nd;t.rowFormat.copyFormat(this.rowFormat),t.topBorderWidth=this.topBorderWidth,t.bottomBorderWidth=this.bottomBorderWidth,t.isRenderBookmarkEnd=this.isRenderBookmarkEnd;for(var i=0;i<this.childWidgets.length;i++){var r=this.childWidgets[i].clone(e);t.childWidgets.push(r),r.containerWidget=t,r.index=i,r.rowIndex=this.rowIndex}return t.x=this.x,t.y=this.y,t.height=this.height,t.width=this.width,this.contentControlProperties&&(t.contentControlProperties=this.contentControlProperties),t},nd.prototype.updateChildWidgetLeft=function(e,t){var i=0;0<this.ownerTable.tableFormat.cellSpacing&&(i=this.ownerTable.tableFormat.cellSpacing);for(var r=0;r<this.childWidgets.length;r++){var n=this.childWidgets[r];e+=i+n.margin.left,n.x=e,n.updateChildWidgetLeft(n.x),e+=n.width+n.margin.right}},nd.prototype.shiftWidgetForRtlTable=function(){for(var e=this.ownerTable,t=e.x,i=0,r=(null!=e.tableFormat&&0<e.tableFormat.cellSpacing&&(i=e.tableFormat.cellSpacing),e=K.convertPointToPixel(e.getTableWidth()),this.x),n=t+e-(r-t),o=0,a=0;a<this.childWidgets.length;a++){var s=this.childWidgets[a],l=0;(l=G.isNullOrUndefined(s.previousWidget)?l:s.previousWidget.columnIndex+s.previousWidget.cellFormat.columnSpan)<s.columnIndex&&(o+=K.convertPointToPixel(s.ownerTable.tableHolder.getPreviousSpannedCellWidth(l,s.columnIndex)),0===l)&&(o-=i/2),n-=s.width+s.margin.left+s.margin.right+i,s.updateWidgetLeft(n+s.margin.left-o)}},nd.prototype.destroy=function(){this.rowFormat=void 0,this.topBorderWidth=void 0,this.bottomBorderWidth=void 0,rd.prototype.destroy.call(this)},nd.prototype.componentDestroy=function(){this.rowFormat&&this.rowFormat.destroy(),this.rowFormat=void 0,this.topBorderWidth=void 0,this.bottomBorderWidth=void 0,this.isRenderBookmarkEnd=void 0,rd.prototype.componentDestroy.call(this)};var rd,$=nd;function nd(){var e=rd.call(this)||this;return e.isRenderBookmarkEnd=!1,e.topBorderWidth=0,e.bottomBorderWidth=0,e.rowFormat=new S(e),e.editRangeID=new N,e}e(p,od=Yl),Object.defineProperty(p.prototype,"ownerColumn",{get:function(){return this.ownerTable.tableHolder.columns[this.columnIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"leftMargin",{get:function(){return this.cellFormat&&this.cellFormat.hasValue("leftMargin")?this.cellFormat.leftMargin:!G.isNullOrUndefined(this.ownerRow)&&this.ownerRow.rowFormat.hasValue("leftMargin")?this.ownerRow.rowFormat.leftMargin:G.isNullOrUndefined(this.ownerTable)||G.isNullOrUndefined(this.ownerTable.tableFormat)||!this.ownerTable.tableFormat.hasValue("leftMargin")?0:this.ownerTable.tableFormat.leftMargin},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"topMargin",{get:function(){return this.cellFormat&&this.cellFormat.hasValue("topMargin")?this.cellFormat.topMargin:!G.isNullOrUndefined(this.ownerRow)&&this.ownerRow.rowFormat.hasValue("topMargin")?this.ownerRow.rowFormat.topMargin:G.isNullOrUndefined(this.ownerTable)||G.isNullOrUndefined(this.ownerTable.tableFormat)||!this.ownerTable.tableFormat.hasValue("topMargin")?0:this.ownerTable.tableFormat.topMargin},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"rightMargin",{get:function(){return this.cellFormat&&this.cellFormat.hasValue("rightMargin")?this.cellFormat.rightMargin:!G.isNullOrUndefined(this.ownerRow)&&this.ownerRow.rowFormat.hasValue("rightMargin")?this.ownerRow.rowFormat.rightMargin:G.isNullOrUndefined(this.ownerTable)||G.isNullOrUndefined(this.ownerTable.tableFormat)||!this.ownerTable.tableFormat.hasValue("rightMargin")?0:this.ownerTable.tableFormat.rightMargin},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"bottomMargin",{get:function(){return this.cellFormat&&this.cellFormat.hasValue("bottomMargin")?this.cellFormat.bottomMargin:!G.isNullOrUndefined(this.ownerRow)&&this.ownerRow.rowFormat.hasValue("bottomMargin")?this.ownerRow.rowFormat.bottomMargin:G.isNullOrUndefined(this.ownerTable)||G.isNullOrUndefined(this.ownerTable.tableFormat)||!this.ownerTable.tableFormat.hasValue("bottomMargin")?0:this.ownerTable.tableFormat.bottomMargin},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"cellIndex",{get:function(){return this.ownerRow?this.ownerRow.childWidgets.indexOf(this):-1},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"ownerTable",{get:function(){if(this.containerWidget instanceof $)return this.containerWidget.ownerTable},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"ownerRow",{get:function(){return this.containerWidget},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"sizeInfo",{get:function(){return this.sizeInfoInternal},enumerable:!0,configurable:!0}),p.prototype.equals=function(e){return e instanceof p&&e.cellFormat===this.cellFormat},p.prototype.getContainerTable=function(){for(var e=this.ownerTable;e instanceof Q&&e.associatedCell instanceof p;)e=e.associatedCell.getContainerTable();return e},p.prototype.getPreviousSplitWidget=function(){if(this.containerWidget instanceof $){var e=this.containerWidget;do{if(e=e.previousRenderedWidget,G.isNullOrUndefined(e)||e.index<this.rowIndex)break;var t=e.getCell(this.rowIndex,this.columnIndex);if(t&&this.equals(t))return t}while(e)}},p.prototype.isEmpty=function(){var e;return!(1<this.childWidgets.length)&&(e=this.childWidgets[0])instanceof Z&&e.isEmpty()},p.prototype.getNextSplitWidget=function(){var e=this.cellFormat.rowSpan;if(this.containerWidget instanceof $){var t=this.containerWidget;do{if(t=t.nextRenderedWidget,G.isNullOrUndefined(t)||t.index>this.rowIndex+e)break;var i=t.getCell(this.rowIndex,this.columnIndex);if(i&&this.equals(i))return i}while(t)}},p.prototype.getTableCellWidget=function(e){for(var t=0;t<this.childWidgets.length;t++)if(this.childWidgets[t].y<=e.y&&this.childWidgets[t].y+this.childWidgets[t].height>=e.y)return this.childWidgets[t].getTableCellWidget(e);var i=void 0;return i=0<this.childWidgets.length?(this.childWidgets[0].y<=e.y?this.childWidgets[this.childWidgets.length-1]:this.childWidgets[0]).getTableCellWidget(e):i},p.prototype.updateWidth=function(e){"Point"===this.cellFormat.preferredWidthType?this.cellFormat.preferredWidth=e:"Percent"===this.cellFormat.preferredWidthType&&(this.cellFormat.preferredWidth=this.convertPointToPercent(e)),this.cellFormat.cellWidth=e},p.prototype.getCellWidth=function(e){var t=this.ownerTable,i=t?t.getTableClientWidth(t.getOwnerWidth(!0)):0,r=i,n=G.isNullOrUndefined(this.leftMargin)?0:this.leftMargin,o=G.isNullOrUndefined(this.rightMargin)?0:this.rightMargin;return t&&"Auto"===t.tableFormat.preferredWidthType&&t.tableFormat.allowAutoFit?0===this.cellFormat.preferredWidth?r=i:"Percent"===this.cellFormat.preferredWidthType?r=this.cellFormat.preferredWidth*i/100-n-o:i<(r=this.cellFormat.preferredWidth-n-o)&&(r=i):"Percent"===this.cellFormat.preferredWidthType?r=this.cellFormat.preferredWidth*i/100-n-o:"Point"===this.cellFormat.preferredWidthType?r=e instanceof Q&&"Percent"===e.tableFormat.preferredWidthType?this.cellFormat.cellWidth-n-o:this.cellFormat.preferredWidth-n-o:!G.isNullOrUndefined(t)&&"Percent"===t.tableFormat.preferredWidthType&&t.tableFormat.allowAutoFit&&"Auto"===this.cellFormat.preferredWidthType&&e instanceof Q&&"Percent"===e.tableFormat.preferredWidthType&&e.tableFormat.allowAutoFit&&(r=this.cellFormat.cellWidth-n-o),r},p.prototype.convertPointToPercent=function(e){var t=this.ownerTable.getOwnerWidth(!0),e=e/this.ownerTable.getTableClientWidth(t)*100;return(e=Math.round(e))<100?e:100},p.getCellLeftBorder=function(e){var t=void 0,i=e.cellFormat.borders,r=G.isNullOrUndefined(e.ownerRow)?void 0:e.ownerRow.rowFormat.borders,n=G.isNullOrUndefined(e.ownerTable)?void 0:e.ownerTable.tableFormat.borders;return G.isNullOrUndefined(i.left)||(t=i.left),G.isNullOrUndefined(t)&&(t=e.getLeftBorderToRenderByHierarchy(t,r,n)),t=0<e.ownerTable.tableFormat.cellSpacing?e.getLeftBorderToRenderByHierarchy(t,r,n):(i=this.getPreviousCell(e),e.getPreviousCellLeftBorder(t,i)),t=G.isNullOrUndefined(t)?new x(e.cellFormat.borders):t},p.getPreviousCell=function(e){var t,i=void 0;return G.isNullOrUndefined(e.previousWidget)||(t=e.previousWidget).columnIndex+t.cellFormat.columnSpan===e.columnIndex&&(i=t),i},p.prototype.getLeftBorderWidth=function(){var e=0;return e=null!==this.cellFormat&&null!==this.cellFormat.borders?p.getCellLeftBorder(this).getLineWidth():e},p.prototype.getRightBorderWidth=function(){var e=0;this.ownerTable;return e=null!==this.cellFormat&&null!==this.cellFormat.borders?p.getCellRightBorder(this).getLineWidth():e},p.prototype.getCellSpacing=function(){var e=this.ownerTable&&this.ownerTable.tableFormat?this.ownerTable.tableFormat.cellSpacing:0;return 1===this.ownerRow.childWidgets.length?2*e:0===this.cellIndex||this.cellIndex===this.ownerRow.childWidgets.length-1?e+e/2:e},p.prototype.getCellSizeInfo=function(e){var t=!0,i=void 0,e=(G.isNullOrUndefined(this.bodyWidget)||G.isNullOrUndefined(this.bodyWidget.page)||G.isNullOrUndefined(this.bodyWidget.page.documentHelper)||(i=this.bodyWidget.page.documentHelper.layout),G.isNullOrUndefined(i)||G.isNullOrUndefined(i.currentCell)||(t=!1,this===i.currentCell&&(t=!0)),t&&!this.sizeInfo.hasMinimumWidth&&(this.sizeInfo.minimumWidth=this.getMinimumPreferredWidth()),e&&t&&!this.sizeInfo.hasMinimumWordWidth&&(i=this.getMinimumAndMaximumWordWidth(0,0),this.sizeInfo.minimumWordWidth=i.minimumWordWidth+this.sizeInfo.minimumWidth,this.sizeInfo.maximumWordWidth=i.maximumWordWidth+this.sizeInfo.minimumWidth,this.sizeInfo.maxParaWidth=i.maxParaWidth+this.sizeInfo.minimumWidth,"Point"===this.cellFormat.preferredWidthType)&&0<this.cellFormat.preferredWidth&&this.sizeInfo.minimumWordWidth>this.cellFormat.preferredWidth&&this.childWidgets.some(function(e){return e instanceof Q})&&K.round(i.minimumWordWidth+this.leftMargin+this.rightMargin,2)===K.round(this.cellFormat.preferredWidth,2)&&(this.sizeInfo.minimumWordWidth-=this.getLeftBorderWidth()+this.getRightBorderWidth()),new bc);return e.minimumWidth=this.sizeInfo.minimumWidth,e.minimumWordWidth=this.sizeInfo.minimumWordWidth,e.maximumWordWidth=this.sizeInfo.maximumWordWidth,e.maxParaWidth=this.sizeInfo.maxParaWidth,e},p.prototype.getMinimumPreferredWidth=function(){return this.leftMargin+this.rightMargin+this.getLeftBorderWidth()+this.getRightBorderWidth()+this.getCellSpacing()},p.prototype.getPreviousCellLeftBorder=function(e,t){var i,r=!1;return!G.isNullOrUndefined(t)&&(G.isNullOrUndefined(e)||"None"!==e.lineStyle||e.hasNoneStyle)||G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||(e=this.getLeftBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders),r=!0),G.isNullOrUndefined(t)?e:(i=void 0,G.isNullOrUndefined(t.cellFormat.borders)||G.isNullOrUndefined(t.cellFormat.borders.right)||"None"===t.cellFormat.borders.right.lineStyle||(i=t.cellFormat.borders.right),G.isNullOrUndefined(i)||"None"===i.lineStyle?G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||r?e:this.getLeftBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders):this.getBorderBasedOnPriority(i,e))},p.prototype.getBorderBasedOnPriority=function(e,t){var i,r,n,o,a,s,l,d,h,c;return G.isNullOrUndefined(e)?t:G.isNullOrUndefined(t)?e:(i=e.getBorderWeight())===(r=t.getBorderWeight())?(n=e.getPrecedence())===(o=t.getPrecedence())?(h=(s=K.convertHexToRgb(e.color)).r,a=s.g,s=s.b,d=(c=K.convertHexToRgb(t.color)).r,l=c.g,(h=h+s+2*a)===(c=d+(d=c.b)+2*l)&&(h=s+2*a)===(c=d+2*l)?a!==l&&l<a?t:e:c<h?t:e):o<n?e:t:r<i?e:t},p.prototype.getLeftBorderToRenderByHierarchy=function(e,t,i){var r,n,o,a=p.getCellOf(e.ownerBase);return!G.isNullOrUndefined(a)&&(o=n=r=!1,(r=0===a.columnIndex||0===a.cellIndex&&0<a.ownerRow.rowFormat.gridBefore?!0:r)&&!G.isNullOrUndefined(t.left)?o=t.left.hasNoneStyle:r||G.isNullOrUndefined(t.vertical)||(o=t.vertical.hasNoneStyle),G.isNullOrUndefined(t.left)||"None"===t.left.lineStyle||!t.left.isBorderDefined||o||G.isNullOrUndefined(e)||"None"!==e.lineStyle||!e.isBorderDefined||e.hasValue("color")||(n=!0),!G.isNullOrUndefined(e)&&"None"===e.lineStyle&&(!e.isBorderDefined&&!o||n)||G.isNullOrUndefined(e))&&(r?(e=t.left,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.left)):(e=t.vertical,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.vertical))),e},p.getCellRightBorder=function(e){var t=void 0,i=e.cellFormat.borders,r=G.isNullOrUndefined(e.ownerRow)?void 0:e.ownerRow.rowFormat.borders,n=G.isNullOrUndefined(e.ownerTable)?void 0:e.ownerTable.tableFormat.borders;return G.isNullOrUndefined(i.right)||(t=i.right),G.isNullOrUndefined(t)&&(t=e.getRightBorderToRenderByHierarchy(t,r,n)),t=0<e.ownerTable.tableFormat.cellSpacing?e.getRightBorderToRenderByHierarchy(t,r,n):(i=this.getNextCell(e),e.getAdjacentCellRightBorder(t,i)),t=G.isNullOrUndefined(t)?new x(e.cellFormat.borders):t},p.getNextCell=function(e){var t,i=void 0,r=e.cellFormat.columnSpan;return G.isNullOrUndefined(e.nextWidget)||(t=e.nextWidget,e.columnIndex+r===t.columnIndex&&(i=t)),i},p.prototype.getAdjacentCellRightBorder=function(e,t){var i,r=!1;return!G.isNullOrUndefined(t)&&(G.isNullOrUndefined(e)||"None"!==e.lineStyle||e.hasNoneStyle)||G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||(e=this.getRightBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders),r=!0),G.isNullOrUndefined(t)?e:(i=void 0,G.isNullOrUndefined(t.cellFormat.borders)||G.isNullOrUndefined(t.cellFormat.borders.left)||"None"===t.cellFormat.borders.left.lineStyle||(i=t.cellFormat.borders.left),G.isNullOrUndefined(i)||"None"===i.lineStyle?G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||r?e:this.getRightBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders):this.getBorderBasedOnPriority(e,i))},p.prototype.getRightBorderToRenderByHierarchy=function(e,t,i){var r,n,o,a=p.getCellOf(e.ownerBase);return!G.isNullOrUndefined(a)&&(o=n=r=!1,(r=a.columnIndex+a.cellFormat.columnSpan===a.ownerTable.tableHolder.columns.length||a.cellIndex===a.ownerRow.childWidgets.length-1&&0<a.ownerRow.rowFormat.gridAfter&&a.columnIndex+a.cellFormat.columnSpan+a.ownerRow.rowFormat.gridAfter===a.ownerTable.tableHolder.columns.length?!0:r)&&!G.isNullOrUndefined(t.right)?o=t.right.hasNoneStyle:r||G.isNullOrUndefined(t.vertical)||(o=t.vertical.hasNoneStyle),G.isNullOrUndefined(t.right)||"None"===t.right.lineStyle||!t.right.isBorderDefined||o||G.isNullOrUndefined(e)||"None"!==e.lineStyle||!e.isBorderDefined||e.hasValue("color")||(n=!0),!G.isNullOrUndefined(e)&&"None"===e.lineStyle&&(!e.isBorderDefined&&!o||n)||G.isNullOrUndefined(e))&&(r?(e=t.right,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.right)):(e=t.vertical,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.vertical))),e},p.getCellTopBorder=function(e){var t=void 0,i=e.cellFormat.borders,r=G.isNullOrUndefined(e.ownerRow)?void 0:e.ownerRow.rowFormat.borders,n=G.isNullOrUndefined(e.ownerTable)?void 0:e.ownerTable.tableFormat.borders;return G.isNullOrUndefined(i.top)||(t=i.top),G.isNullOrUndefined(t)&&(t=e.getTopBorderToRenderByHierarchy(t,r,n)),t=0<e.ownerTable.tableFormat.cellSpacing?e.getTopBorderToRenderByHierarchy(t,r,n):(i=e.getTopAdjacentCell(),e.getPreviousCellTopBorder(t,i)),t=G.isNullOrUndefined(t)?new x(e.cellFormat.borders):t},p.prototype.getTopAdjacentCell=function(){var e,t=this.ownerRow.previousWidget;return this.ownerTable.previousSplitWidget&&this.ownerTable.bodyWidget&&this.ownerTable.bodyWidget.page&&this.ownerTable.bodyWidget.page.repeatHeaderRowTableWidget&&!this.ownerRow.previousWidget&&(t=this.ownerTable.bodyWidget.page.documentHelper.layout.getHeader(this.ownerTable)),e=G.isNullOrUndefined(t)?e:t.getVerticalMergeStartCell(this.columnIndex,this.cellFormat.columnSpan)},p.prototype.getPreviousCellTopBorder=function(e,t){var i,r=!1;return!G.isNullOrUndefined(t)&&(G.isNullOrUndefined(e)||"None"!==e.lineStyle||e.hasNoneStyle)||G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||(e=this.getTopBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders),r=!0),G.isNullOrUndefined(t)?e:(i=void 0,G.isNullOrUndefined(t.cellFormat.borders)||G.isNullOrUndefined(t.cellFormat.borders.bottom)||(i=this.getBottomBorderToRenderByHierarchy(t.cellFormat.borders.bottom,t.ownerRow.rowFormat.borders,t.ownerTable.tableFormat.borders)),G.isNullOrUndefined(i)||"None"===i.lineStyle?G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||r?e:this.getTopBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders):this.getBorderBasedOnPriority(e,i))},p.prototype.getTopBorderToRenderByHierarchy=function(e,t,i){var r,n,o=p.getCellOf(e.ownerBase);return!G.isNullOrUndefined(o)&&(n=r=!1,(o=G.isNullOrUndefined(o.ownerRow.previousWidget))&&!G.isNullOrUndefined(t.top)?n=t.top.hasNoneStyle:o||G.isNullOrUndefined(t.horizontal)||(n=t.horizontal.hasNoneStyle),G.isNullOrUndefined(t.top)||"None"===t.top.lineStyle||!t.top.isBorderDefined||n||G.isNullOrUndefined(e)||"None"!==e.lineStyle||!e.isBorderDefined||e.hasValue("color")||(r=!0),!G.isNullOrUndefined(e)&&"None"===e.lineStyle&&(!e.isBorderDefined&&!n||r)||G.isNullOrUndefined(e))&&(o?(e=t.top,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.top)):(e=t.horizontal,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.horizontal))),e},p.getCellBottomBorder=function(e){var t=void 0,i=e.cellFormat.borders,r=G.isNullOrUndefined(e.ownerRow)?void 0:e.ownerRow.rowFormat.borders,n=G.isNullOrUndefined(e.ownerTable)?void 0:e.ownerTable.tableFormat.borders;if(G.isNullOrUndefined(i.bottom)||(t=i.bottom),G.isNullOrUndefined(t)&&(t=e.getBottomBorderToRenderByHierarchy(t,r,n)),0<e.ownerTable.tableFormat.cellSpacing)t=e.getBottomBorderToRenderByHierarchy(t,r,n);else{var i=void 0,o=void 0,a=e.cellFormat.rowSpan;if(1===a)o=e.ownerRow.nextWidget;else if(1<a){var s=e.containerWidget;do{if(s=s.nextWidget,G.isNullOrUndefined(s))break;if(s.index===e.rowIndex+a){o=s;break}}while(s)}G.isNullOrUndefined(o)||(i=o.getCellWidget(e.columnIndex,e.cellFormat.columnSpan)),t=e.getAdjacentCellBottomBorder(t,i)}return t=G.isNullOrUndefined(t)?new x(e.cellFormat.borders):t},p.prototype.getAdjacentCellBottomBorder=function(e,t){var i,r=!1;return!G.isNullOrUndefined(t)&&(G.isNullOrUndefined(e)||"None"!==e.lineStyle||e.hasNoneStyle)||G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||(e=this.getBottomBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders),r=!0),G.isNullOrUndefined(t)?e:(i=void 0,G.isNullOrUndefined(t.cellFormat.borders)||G.isNullOrUndefined(t.cellFormat.borders.top)||"None"===t.cellFormat.borders.top.lineStyle||(i=t.cellFormat.borders.top),G.isNullOrUndefined(i)||"None"===i.lineStyle?G.isNullOrUndefined(e)||e.ownerBase.ownerBase instanceof xl||r?e:this.getBottomBorderToRenderByHierarchy(e,$.getRowOf(e.ownerBase).rowFormat.borders,Q.getTableOf(e.ownerBase).tableFormat.borders):this.getBorderBasedOnPriority(e,i))},p.prototype.getBottomBorderToRenderByHierarchy=function(e,t,i){var r,n,o=p.getCellOf(e.ownerBase);return!G.isNullOrUndefined(o)&&(n=r=!1,(o=G.isNullOrUndefined(o.ownerRow.nextWidget))&&!G.isNullOrUndefined(t.bottom)?n=t.bottom.hasNoneStyle:o||G.isNullOrUndefined(t.horizontal)||(n=t.horizontal.hasNoneStyle),G.isNullOrUndefined(t.bottom)||"None"===t.bottom.lineStyle||!t.bottom.isBorderDefined||n||G.isNullOrUndefined(e)||"None"!==e.lineStyle||!e.isBorderDefined||e.hasValue("color")||(r=!0),!G.isNullOrUndefined(e)&&"None"===e.lineStyle&&(!e.isBorderDefined&&!n||r)||G.isNullOrUndefined(e))&&(o?(e=t.bottom,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.bottom)):(e=t.horizontal,(!G.isNullOrUndefined(e)&&"None"===e.lineStyle||G.isNullOrUndefined(e))&&(e=i.horizontal))),e},p.getCellOf=function(e){return e instanceof Wl&&e.ownerBase instanceof A&&e.ownerBase.ownerBase instanceof p?e.ownerBase.ownerBase:void 0},p.prototype.updateWidgetLeft=function(e){this.x=e,this.updateChildWidgetLeft(e)},p.prototype.updateChildWidgetLeft=function(e){for(var t=0;t<this.childWidgets.length;t++){var i,r,n,o,a=this.childWidgets[t];a.x=e,a instanceof Z&&(i=K.convertPointToPixel(a.leftIndent),r=K.convertPointToPixel(a.rightIndent),a.isInsideTable&&a.associatedCell.ownerTable.isBidiTable&&this.bodyWidget.page.documentHelper.layout.isNeedToUpdateXPositionForEmptyParagraph(a)?(n=a.associatedCell.width,o=this.bodyWidget.page.documentHelper.textHelper.getParagraphMarkWidth(a.characterFormat),a.x+=n-o-i):a.x=e+(a.bidi?r:i)),a instanceof Q&&((n=a).updateChildWidgetLeft(e),n.isBidiTable)&&(o=new _(n.x,n.y,n.width,n.height),n.shiftWidgetsForRtlTable(o,n))}},p.prototype.getMinimumAndMaximumWordWidth=function(e,t,i){void 0===i&&(i=0);for(var r=0;r<this.childWidgets.length;r++){var n=this.childWidgets[r].getMinimumAndMaximumWordWidth(e,t,i);e=n.minimumWordWidth,t=n.maximumWordWidth,i=n.maxParaWidth}return{minimumWordWidth:e,maximumWordWidth:t,maxParaWidth:i}},p.prototype.destroyInternal=function(e){if(!G.isNullOrUndefined(this.childWidgets)){for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t];0 instanceof Z,i.destroyInternal(e),t--}this.childWidgets=void 0,G.isNullOrUndefined(e.documentHelper)||e.documentHelper.editorProperties.selectedWidgets.containsKey(this)&&e.documentHelper.editorProperties.selectedWidgets.remove(this)}this.destroy()},p.prototype.clone=function(e){for(var t=new p,i=(t.cellFormat.copyFormat(this.cellFormat),0),r=0;r<this.childWidgets.length&&!(e&&i>this.height);r++){var n=this.childWidgets[r].clone();t.childWidgets.push(n),n.containerWidget=t,n.index=r,i+=n.height}return t.leftBorderWidth=this.leftBorderWidth,t.rightBorderWidth=this.rightBorderWidth,t.isRenderBookmarkEnd=this.isRenderBookmarkEnd,t.isRenderBookmarkStart=this.isRenderBookmarkStart,this.margin&&(t.margin=this.margin.clone()),t.columnIndex=this.columnIndex,t.x=this.x,t.y=this.y,t.height=this.height,t.width=this.width,this.contentControlProperties&&(t.contentControlProperties=this.contentControlProperties),t},p.prototype.destroy=function(){this.cellFormat=void 0,this.rowIndex=void 0,this.columnIndex=void 0,this.isSplittedCell=void 0,od.prototype.destroy.call(this)},p.prototype.componentDestroy=function(){this.cellFormat&&this.cellFormat.destroy(),this.cellFormat=void 0,this.contentControlProperties=void 0,this.rowIndex=void 0,this.columnIndex=void 0,this.isRenderBookmarkStart=void 0,this.isRenderBookmarkEnd=void 0,od.prototype.componentDestroy.call(this)};var od,ee=p;function p(){var e=od.call(this)||this;return e.rowIndex=-1,e.sizeInfoInternal=new bc,e.updatedTopBorders=[],e.isRenderBookmarkStart=!1,e.isRenderBookmarkEnd=!1,e.isRenderEditRangeStart=!1,e.isRenderEditRangeEnd=!1,e.isSplittedCell=!1,e.margin=new Hl(e.leftMargin,e.topMargin,e.rightMargin,e.bottomMargin),e.leftBorderWidth=0,e.rightBorderWidth=0,e.cellFormat=new A(e),e}Object.defineProperty(sd.prototype,"renderedElements",{get:function(){return G.isNullOrUndefined(this.layoutedElements)?this.children:this.layoutedElements},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"indexInOwner",{get:function(){return this.paragraph&&this.paragraph.childWidgets?this.paragraph.childWidgets.indexOf(this):-1},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"nextLine",{get:function(){var e=this.paragraph,t=this.indexInOwner;if(t<=e.childWidgets.length-2)return e.childWidgets[t+1];if(e.nextSplitWidget){t=e.nextSplitWidget.firstChild;if(t instanceof sd&&t.paragraph.equals(this.paragraph))return t}},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"previousLine",{get:function(){var e=this.paragraph,t=this.indexInOwner,i=e.previousSplitWidget;if(0<t)return e.childWidgets[t-1];if(i instanceof Z){e=i.lastChild;if(e instanceof sd&&e.paragraph.equals(this.paragraph))return e}},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"isEndsWithPageBreak",{get:function(){if(0<this.children.length){var e=this.children[this.children.length-1];if(e instanceof ie)return e.isPageBreak;for(var t=this.children.length-1;0<=t;t--)if(this.children[t]instanceof ie)return this.children[t].isPageBreak}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"isEndsWithColumnBreak",{get:function(){if(0<this.children.length){var e=this.children[this.children.length-1];if(e instanceof ie)return e.isColumnBreak}return!1},enumerable:!0,configurable:!0}),Object.defineProperty(sd.prototype,"isEndsWithLineBreak",{get:function(){if(0<this.children.length){var e=this.children[this.children.length-1];if(e instanceof ie)return"\v"===e.text}return!1},enumerable:!0,configurable:!0}),sd.prototype.isFirstLine=function(){var e=this.indexInOwner,t=this.paragraph.previousSplitWidget;return!!(-1<e&&(void 0===t||t instanceof Z&&(t.isEndsWithColumnBreak||t.isEndsWithPageBreak)))&&0===e},sd.prototype.isLastLine=function(){var e=this.indexInOwner;return-1<e&&void 0===this.paragraph.nextSplitWidget&&e===this.paragraph.childWidgets.length-1},sd.prototype.getOffset=function(e,t){if(G.isNullOrUndefined(e))return t;for(var i=t,r=e.line,n=0;n<r.children.length;n++){var o=r.children[n];if(e===o)break;o instanceof se||(i+=o.length)}return i},sd.prototype.getEndOffset=function(){for(var e=0,t=0,i=0;i<this.children.length;i++){var r=this.children[i];0===r.length||r instanceof se||(r.characterFormat.hidden||(r instanceof ie||r instanceof ac||r instanceof Ch||r instanceof ae||r instanceof xh||r instanceof Md||r instanceof zd||r instanceof te&&K.isLinkedFieldCharacter(r))&&(e=t+r.length),t+=r.length)}return e},sd.prototype.getInline=function(e,t,i,r){G.isNullOrUndefined(i)&&!G.isNullOrUndefined(this.paragraph)&&(i=this.paragraph.bidi);var n=void 0,o=0,a=!1;if(0===this.children.length&&this.previousLine){i=this.previousLine.children[this.previousLine.children.length-1];if(i instanceof ie&&"\v"===i.text)return{element:n=this.previousLine.children[this.previousLine.children.length-1],index:t=1}}for(var s,l=0;l<this.children.length;l++)if(!((n=this.children[l])instanceof se)){if((a=!a&&(n instanceof ie||n instanceof ae||n instanceof ne||n instanceof zd||n instanceof oe||n instanceof Md||n instanceof xh||n instanceof Ch||n instanceof ac||n instanceof te&&K.isLinkedFieldCharacter(n))?!0:a)&&e<=o+n.length)return n instanceof ie&&" "===n.text&&0===n.revisionLength&&r?(s=this.getNextTextElement(this,l+1),{element:n=G.isNullOrUndefined(s)?n:s,index:t=G.isNullOrUndefined(s)?e-o:0}):e===n.length&&this.children[l+1]instanceof Sd?{element:this.children[l+1],index:t}:{element:n,index:t=e-o};o+=n.length}return{element:n,index:t=o<e?G.isNullOrUndefined(n)?e:n.length:t}},sd.prototype.isEndnoteLineWidget=function(){return!G.isNullOrUndefined(this.paragraph.containerWidget)&&this.paragraph.containerWidget.containerWidget instanceof J&&"Endnote"===this.paragraph.containerWidget.containerWidget.footNoteType},sd.prototype.getNextTextElement=function(e,t){return t<e.children.length-1&&e.children[t]?e.children[t]:null},sd.prototype.getHierarchicalIndex=function(e){var t=this;return!G.isNullOrUndefined(t.paragraph)&&!G.isNullOrUndefined(t.paragraph.childWidgets)&&(e=t.paragraph.childWidgets.indexOf(t)+";"+e,t.paragraph instanceof Yl)?t.paragraph.getHierarchicalIndex(e):e},sd.prototype.clone=function(){for(var e=new sd(void 0),t=0;t<this.children.length;t++){var i=this.children[t].clone();e.children.push(i),i.line=e,i instanceof oe&&this.updateLineForGroupChildren(i,e)}return e.width=this.width,e.height=this.height,G.isNullOrUndefined(this.margin)||(e.margin=this.margin.clone()),e},sd.prototype.updateLineForGroupChildren=function(e,t){for(var i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];r.line=t,r instanceof oe&&this.updateLineForGroupChildren(r,t)}},sd.prototype.destroy=function(){if(!G.isNullOrUndefined(this.children)){for(var e=0;e<this.children.length;e++)this.children[e].destroy();this.children=[]}this.children=void 0,this.paragraph&&this.paragraph.removeChild(this.indexInOwner),this.paragraph=void 0,this.x=void 0,this.y=void 0,this.width=void 0},sd.prototype.componentDestroy=function(){if(!G.isNullOrUndefined(this.children)){for(var e=0;e<this.children.length;e++)this.children[e].componentDestroy();this.children=[]}this.children=void 0,this.paragraph=void 0,this.layoutedElements=[],this.layoutedElements=void 0,this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0};var ad=sd;function sd(e){this.children=[],this.x=0,this.y=0,this.width=0,this.height=0,this.marginTop=0,this.maxBaseLine=0,this.skipClipImage=!1,this.paragraph=e}Object.defineProperty(dd.prototype,"isPageBreak",{get:function(){return this instanceof ie&&"\f"===this.text},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"isColumnBreak",{get:function(){return this instanceof ie&&this.text===String.fromCharCode(14)},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"isValidNodeForTracking",{get:function(){return!(this instanceof Md||this instanceof ac||this instanceof Ch||this instanceof xh||this instanceof zd)},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"isCheckBoxElement",{get:function(){var e=this;return e instanceof ie&&!G.isNullOrUndefined(e.text)&&(e.text===String.fromCharCode(9746)||e.text===String.fromCharCode(9745)||e.text===String.fromCharCode(9744))},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"revisionLength",{get:function(){return G.isNullOrUndefined(this.revisions)?0:this.revisions.length},enumerable:!0,configurable:!0}),dd.prototype.getRevision=function(e){if(!G.isNullOrUndefined(this.revisions))return this.revisions[e]},dd.prototype.addRevision=function(e){-1===this.revisions.indexOf(e)&&this.revisions.push(e),e.hasChanges=!0},dd.prototype.insertRevisionAt=function(e,t){this.revisions.splice(e,0,t),t.hasChanges=!0},dd.prototype.removeRevision=function(e){this.revisions.splice(e,1)[0].hasChanges=!0},dd.prototype.getAllRevision=function(){return this.revisions},dd.prototype.setRevision=function(e,t){this.revisions&&(this.revisions[e]=t)},dd.prototype.clearRevision=function(){this.revisions=[]},dd.prototype.linkFieldCharacter=function(e){var t;this instanceof te&&(0===this.fieldType?G.isNullOrUndefined((t=this).fieldEnd)&&(this.linkFieldTraversingForward(this.line,t,t),-1===e.fields.indexOf(t)&&e.fields.push(t),G.isNullOrUndefined(t.formFieldData)||-1!==e.formFields.indexOf(t)||e.layout.isInsertFormField||e.formFields.push(t)):2===this.fieldType?(G.isNullOrUndefined((e=this).fieldBegin)&&this.linkFieldTraversingBackwardSeparator(this.line,e,e),G.isNullOrUndefined(e.fieldBegin)||(e.fieldBegin.fieldSeparator=e,G.isNullOrUndefined(e.fieldEnd)&&this.linkFieldTraversingForward(this.line,e.fieldBegin,e)&&(e.fieldEnd=e.fieldBegin.fieldEnd),e.fieldEnd&&(e.fieldEnd.fieldSeparator=e))):G.isNullOrUndefined(this.fieldBegin)&&this.linkFieldTraversingBackward(this.line,this,this))},dd.prototype.linkFieldTraversingBackward=function(e,t,i){for(var r=e.children.length-1,n=r=-1<e.children.indexOf(i)?e.children.indexOf(i)-1:r;0<=n;n--){var o=e.children[n];if(o instanceof te)if(0===o.fieldType){if(G.isNullOrUndefined(o.fieldEnd))return t.fieldBegin=o,G.isNullOrUndefined(o.fieldEnd)&&(o.fieldEnd=t),t.fieldSeparator&&G.isNullOrUndefined(t.fieldSeparator.fieldBegin)&&(t.fieldSeparator.fieldBegin=o,G.isNullOrUndefined(o.fieldSeparator))&&(o.fieldSeparator=t.fieldSeparator),!G.isNullOrUndefined(t.fieldBegin)}else 2===o.fieldType&&G.isNullOrUndefined(o.fieldEnd)&&((t.fieldSeparator=o).fieldEnd=t,G.isNullOrUndefined(o.fieldBegin)||(t.fieldBegin=o.fieldBegin,t&&G.isNullOrUndefined(t.fieldBegin.fieldEnd)&&(t.fieldBegin.fieldEnd=t)))}return e.previousLine?this.linkFieldTraversingBackward(e.previousLine,t,this):e.paragraph.previousRenderedWidget instanceof Z&&0<e.paragraph.previousRenderedWidget.childWidgets.length&&(i=e.paragraph.previousRenderedWidget,this.linkFieldTraversingBackward(i.childWidgets[i.childWidgets.length-1],t,this)),!0},dd.prototype.linkFieldTraversingForward=function(e,t,i,r){var n=0;G.isNullOrUndefined(r)&&(r=0);for(var o=n=-1<e.children.indexOf(i)?e.children.indexOf(i)+1:n;o<e.children.length;o++){var a=e.children[o];if(a instanceof te)if(0===a.fieldType&&r++,1===a.fieldType){if(0===r)return G.isNullOrUndefined(a.fieldBegin)&&(t.fieldEnd=a),t.fieldEnd&&G.isNullOrUndefined(t.fieldEnd.fieldBegin)&&(t.fieldEnd.fieldBegin=t),!0;r--}else if(G.isNullOrUndefined(t.fieldSeparator)){if(2!==a.fieldType||!G.isNullOrUndefined(a.fieldBegin))return!1;if(t.fieldSeparator=a,t.fieldSeparator&&G.isNullOrUndefined(t.fieldSeparator.fieldBegin)&&(t.fieldSeparator.fieldBegin=t),!G.isNullOrUndefined(a.fieldEnd))return t.fieldEnd=a.fieldEnd,t.fieldSeparator.fieldEnd=t.fieldEnd,!0}}return e.nextLine?this.linkFieldTraversingForward(e.nextLine,t,this,r):e.paragraph.nextRenderedWidget instanceof Z&&0<e.paragraph.nextRenderedWidget.childWidgets.length?this.linkFieldTraversingForward(e.paragraph.nextRenderedWidget.childWidgets[0],t,this,r):e.paragraph.nextRenderedWidget instanceof Q&&(i=(i=e.paragraph.nextRenderedWidget).getSplitWidgets().pop(),!G.isNullOrUndefined(i.nextRenderedWidget))&&i.nextRenderedWidget instanceof Z&&0<i.nextRenderedWidget.childWidgets.length&&this.linkFieldTraversingForward(i.nextRenderedWidget.childWidgets[0],t,this,r),!0},dd.prototype.linkFieldTraversingBackwardSeparator=function(e,t,i){for(var r=e.children.length-1,n=r=-1<e.children.indexOf(i)?e.children.indexOf(i)-1:r;0<=n;n--){var o=e.children[n];if(o instanceof te&&o instanceof te&&0===o.fieldType)return G.isNullOrUndefined(o.fieldSeparator)&&(t.fieldBegin=o),!G.isNullOrUndefined(t.fieldBegin)}if(e.previousLine)this.linkFieldTraversingBackwardSeparator(e.previousLine,t,this);else{if(!(e.paragraph.previousRenderedWidget instanceof Z&&0<e.paragraph.previousRenderedWidget.childWidgets.length))return!0;e=e.paragraph.previousRenderedWidget.childWidgets[e.paragraph.previousRenderedWidget.childWidgets.length-1],this.linkFieldTraversingBackwardSeparator(e,t,this)}return!0},Object.defineProperty(dd.prototype,"length",{get:function(){return this.getLength()},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"indexInOwner",{get:function(){return(this instanceof ne||this instanceof oe||this instanceof ae||this instanceof Oh)&&this.containerShape?this.containerShape.childWidgets.indexOf(this):this.line instanceof ad&&this.line.children?this.line.children.indexOf(this):-1},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"previousElement",{get:function(){var e=this.indexInOwner;return(this instanceof ne||this instanceof oe||this instanceof ae||this instanceof Oh)&&this.containerShape?0<e&&e<this.containerShape.childWidgets.length?this.containerShape.childWidgets[e-1]:void 0:0<e&&e<this.line.children.length?this.line.children[e-1]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"nextElement",{get:function(){var e=this.indexInOwner;return(this instanceof ne||this instanceof oe||this instanceof ae||this instanceof Oh)&&this.containerShape?-1<e&&e<this.containerShape.childWidgets.length-1?this.containerShape.childWidgets[e+1]:void 0:-1<e&&e<this.line.children.length-1?this.line.children[e+1]:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"nextNode",{get:function(){if((this instanceof ne||this instanceof oe||this instanceof ae||this instanceof Oh)&&this.containerShape)return(e=this.containerShape.childWidgets.indexOf(this))<this.containerShape.childWidgets.length-1?this.containerShape.childWidgets[e+1]:void 0;if(!G.isNullOrUndefined(this.line)&&!G.isNullOrUndefined(this.line.paragraph)){var e=this.line.children.indexOf(this),t=this.line.paragraph.childWidgets.indexOf(this.line);if(e<this.line.children.length-1)return this.line.children[e+1];if(t<this.line.paragraph.childWidgets.length-1){e=this.line.paragraph.childWidgets[t+1];if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.children)&&0<e.children.length)return e.children[0]}}},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"nextValidNodeForTracking",{get:function(){for(var e=this;!G.isNullOrUndefined(e)&&(e instanceof Md||e instanceof ac||e instanceof Ch||e instanceof xh);)e=e.nextNode;return e},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"previousValidNodeForTracking",{get:function(){for(var e=this;!G.isNullOrUndefined(e)&&(e instanceof Md||e instanceof ac||e instanceof Ch||e instanceof xh);)e=e.previousNode;return e},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"previousNode",{get:function(){var e,t;return(this instanceof ne||this instanceof oe||this instanceof ae||this instanceof Oh)&&this.containerShape?0<(t=this.containerShape.childWidgets.indexOf(this))?this.containerShape.childWidgets[t-1]:void 0:(t=this.line.children.indexOf(this),e=this.line.paragraph.childWidgets.indexOf(this.line),0<t?this.line.children[t-1]:0<e?(t=this.line.paragraph.childWidgets[e-1]).children[t.children.length-1]:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(dd.prototype,"paragraph",{get:function(){if(this.line)return this.line.paragraph},enumerable:!0,configurable:!0}),dd.prototype.destroy=function(){var e;!G.isNullOrUndefined(this.line)&&this.line.children&&-1<this.line.children.indexOf(this)&&(e=this.line.children.indexOf(this),this.line.children.splice(e,1)),this.line=void 0,this.characterFormat&&this.characterFormat.destroy(),this.characterFormat=void 0,this.margin&&this.margin.destroy(),this.margin=void 0,this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0},dd.prototype.componentDestroy=function(){this.characterFormat&&this.characterFormat.destroy(),this.characterFormat=void 0,this.margin&&this.margin.destroy(),this.margin=void 0,this.padding&&this.padding.destroy(),this.padding=void 0,this.contentControlProperties=void 0,this.line=void 0,this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0},dd.objectCharacter=String.fromCharCode(65532);var ld=dd;function dd(){this.x=0,this.y=0,this.width=0,this.height=0,this.isWidthUpdated=!1,this.isWrappedBreak=!1,this.margin=new Hl(0,0,0,0),this.padding=new Hl(0,0,0,0),this.characterFormat=void 0,this.isRightToLeft=!1,this.canTrigger=!1,this.isChangeDetected=!1,this.isVisible=!1,this.isSpellChecked=!1,this.isSpellCheckTriggered=!1,this.revisions=[],this.canTrack=!1,this.removedIds=[],this.skipformFieldLength=!1,this.characterRange=void 0,this.currentUser=void 0,this.characterFormat=new ce(this),this.margin=new Hl(0,0,0,0)}e(cd,hd=ld),Object.defineProperty(cd.prototype,"fieldBegin",{get:function(){return this.fieldBeginInternal},set:function(e){this.fieldBeginInternal=e},enumerable:!0,configurable:!0}),Object.defineProperty(cd.prototype,"fieldSeparator",{get:function(){return this.fieldSeparatorInternal},set:function(e){this.fieldSeparatorInternal=e},enumerable:!0,configurable:!0}),Object.defineProperty(cd.prototype,"fieldEnd",{get:function(){return this.fieldEndInternal},set:function(e){this.fieldEndInternal=e},enumerable:!0,configurable:!0}),Object.defineProperty(cd.prototype,"resultText",{get:function(){if(!G.isNullOrUndefined(this.formFieldData)&&0===this.fieldType&&!G.isNullOrUndefined(this.fieldSeparator)&&!G.isNullOrUndefined(this.fieldEnd)){var e=this.fieldSeparator.nextElement,t="";do{if(e instanceof ie&&(t+=e.text),(e=e.nextNode)===this.fieldEnd)break}while(e);return t}},enumerable:!0,configurable:!0}),cd.prototype.getLength=function(){return 1},cd.prototype.clone=function(){var e=new cd(this.fieldType);return 0!==this.fieldType||G.isNullOrUndefined(this.formFieldData)||(e.formFieldData=this.formFieldData.clone()),e.characterFormat.copyFormat(this.characterFormat),this.margin&&(e.margin=this.margin.clone()),e.width=this.width,e.height=this.height,0<this.revisionLength?(e.removedIds=H.cloneRevisions(this.getAllRevision()),this.fieldEnd&&(e.hasFieldEnd=this.hasFieldEnd)):(e.removedIds=this.removedIds.slice(),!G.isNullOrUndefined(this.paragraph)&&this.paragraph.isInHeaderFooter||G.isNullOrUndefined(this.fieldEnd)||G.isNullOrUndefined(this.fieldEnd.paragraph)||this.fieldEnd.paragraph.containerWidget instanceof ee||(e.hasFieldEnd=this.hasFieldEnd)),e.fieldCodeType=this.fieldCodeType,e},cd.prototype.destroy=function(){this.fieldType=void 0,this.hasFieldEnd=void 0,this.fieldBeginInternal=void 0,this.fieldEndInternal=void 0,this.fieldSeparatorInternal=void 0,hd.prototype.destroy.call(this)},cd.prototype.componentDestroy=function(){this.formFieldData&&this.formFieldData.destroy(),this.formFieldData=void 0,this.fieldCodeType=void 0,this.fieldBeginInternal=void 0,this.fieldEndInternal=void 0,this.fieldSeparatorInternal=void 0,hd.prototype.componentDestroy.call(this)};var hd,te=cd;function cd(e){var t=hd.call(this)||this;return t.fieldType=0,t.fieldCodeType="",t.hasFieldEnd=!1,t.fieldBeginInternal=void 0,t.fieldSeparatorInternal=void 0,t.fieldEndInternal=void 0,t.fieldType=e,t}pd.prototype.destroy=function(){this.name=void 0,this.helpText=void 0,this.statusText=void 0};var gd=pd;function pd(){this.name="",this.enabled=!0,this.helpText="",this.statusText=""}e(md,ud=gd),md.prototype.clone=function(){var e=new md;return e.type=this.type,e.name=this.name,e.enabled=this.enabled,e.helpText=this.helpText,e.statusText=this.statusText,e.maxLength=this.maxLength,e.defaultValue=this.defaultValue,e.format=this.format,e},md.prototype.getFormFieldInfo=function(){return{defaultValue:this.defaultValue,enabled:this.enabled,format:this.format,helpText:this.helpText,maxLength:this.maxLength,type:this.type,name:this.name}},md.prototype.copyFieldInfo=function(e){G.isNullOrUndefined(e.defaultValue)||(this.defaultValue=e.defaultValue),G.isNullOrUndefined(e.enabled)||(this.enabled=e.enabled),G.isNullOrUndefined(e.format)||(this.format=e.format),G.isNullOrUndefined(e.helpText)||(this.helpText=e.helpText),G.isNullOrUndefined(e.maxLength)||(this.maxLength=e.maxLength),G.isNullOrUndefined(e.type)||(this.type=e.type)},md.prototype.destroy=function(){this.format=void 0,this.defaultValue=void 0,ud.prototype.destroy.call(this)};var ud,fd=md;function md(){var e=null!==ud&&ud.apply(this,arguments)||this;return e.type="Text",e.maxLength=0,e.defaultValue="",e.format="",e}e(Wd,yd=gd),Wd.prototype.clone=function(){var e=new Wd;return e.name=this.name,e.enabled=this.enabled,e.helpText=this.helpText,e.statusText=this.statusText,e.sizeType=this.sizeType,e.size=this.size,e.defaultValue=this.defaultValue,e.checked=this.checked,e},Wd.prototype.getFormFieldInfo=function(){return{defaultValue:this.defaultValue,enabled:this.enabled,helpText:this.helpText,size:this.size,sizeType:this.sizeType,name:this.name}},Wd.prototype.copyFieldInfo=function(e){G.isNullOrUndefined(e.defaultValue)||(this.defaultValue=e.defaultValue,this.checked=e.defaultValue),G.isNullOrUndefined(e.enabled)||(this.enabled=e.enabled),G.isNullOrUndefined(e.size)||(this.size=e.size),G.isNullOrUndefined(e.helpText)||(this.helpText=e.helpText),G.isNullOrUndefined(e.sizeType)||(this.sizeType=e.sizeType)},Wd.prototype.destroy=function(){yd.prototype.destroy.call(this)};var yd,vd=Wd;function Wd(){var e=null!==yd&&yd.apply(this,arguments)||this;return e.sizeType="Auto",e.size=11,e.defaultValue=!1,e.checked=!1,e}e(wd,bd=gd),wd.prototype.clone=function(){var e=new wd;return e.name=this.name,e.enabled=this.enabled,e.helpText=this.helpText,e.statusText=this.statusText,e.dropdownItems=this.dropdownItems.slice(),e.selectedIndex=this.selectedIndex,e},wd.prototype.getFormFieldInfo=function(){return{dropdownItems:this.dropdownItems.slice(),enabled:this.enabled,helpText:this.helpText,name:this.name}},wd.prototype.copyFieldInfo=function(e){G.isNullOrUndefined(e.dropdownItems)||(this.dropdownItems=e.dropdownItems),G.isNullOrUndefined(e.enabled)||(this.enabled=e.enabled),G.isNullOrUndefined(e.helpText)||(this.helpText=e.helpText)},wd.prototype.destroy=function(){this.dropdownItems=[],this.dropdownItems=void 0,bd.prototype.destroy.call(this)};var bd,xd=wd;function wd(){var e=null!==bd&&bd.apply(this,arguments)||this;return e.dropdownItems=[],e.selectedIndex=0,e}e(Cd,Fd=ld),Cd.prototype.getLength=function(){return this.text?this.text.length:0},Cd.prototype.clone=function(){var e=new Cd;if(e.characterFormat.copyFormat(this.characterFormat),e.text=this.text,this.margin&&(e.margin=this.margin.clone()),!G.isNullOrUndefined(this.paragraph)&&this.paragraph.isInHeaderFooter){for(var t=0;t<this.ignoreOnceItems.length;t++)e.ignoreOnceItems.push(this.ignoreOnceItems[t]);e.isChangeDetected=this.isChangeDetected}return e.baselineOffset=this.baselineOffset,this.paragraph&&this.paragraph.isInsideTable&&this.paragraph.containerWidget instanceof ee&&this.paragraph.containerWidget.ownerRow.rowFormat.isHeader?e.revisions=this.revisions:0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.width=this.width,e.height=this.height,e.errorCollection=this.errorCollection,this.contentControlProperties&&(e.contentControlProperties=this.contentControlProperties),e},Cd.prototype.destroy=function(){this.text=void 0,Fd.prototype.destroy.call(this)},Cd.prototype.componentDestroy=function(){this.text=void 0,Fd.prototype.componentDestroy.call(this)};var Fd,ie=Cd;function Cd(){var e=Fd.call(this)||this;return e.baselineOffset=0,e.text="",e.trimEndWidth=0,e.ignoreOnceItems=[],e.istextCombined=!1,e.scriptType=j.FontScriptType.English,e.isCombinedRTLText=!1,e.renderedFontFamily=void 0,e.errorCollection=[],e}Td.prototype.clear=function(){if(this.separator){for(var e=0;e<this.separator.length;e++)this.separator[e].destroy();this.separator=[]}if(this.continuationSeparator){for(e=0;e<this.continuationSeparator.length;e++)this.continuationSeparator[e].destroy();this.continuationSeparator=[]}if(this.continuationNotice){for(e=0;e<this.continuationNotice.length;e++)this.continuationNotice[e].destroy();this.continuationNotice=[]}},Td.prototype.destroy=function(){this.separator=[],this.continuationSeparator=[],this.continuationNotice=[]},Td.prototype.componentDestroy=function(){if(this.separator){for(var e=0;e<this.separator.length;e++)this.separator[e].componentDestroy();this.separator=[]}if(this.separator=void 0,this.continuationSeparator){for(e=0;e<this.continuationSeparator.length;e++)this.continuationSeparator[e].componentDestroy();this.continuationSeparator=[]}if(this.continuationSeparator=void 0,this.continuationNotice){for(e=0;e<this.continuationNotice.length;e++)this.continuationNotice[e].componentDestroy();this.continuationNotice=[]}this.continuationNotice=void 0};var Pd=Td;function Td(){this.separator=[],this.continuationNotice=[],this.continuationSeparator=[]}e(Nd,Od=ie),Nd.prototype.clone=function(){var e=new Nd;e.text=this.text,e.characterFormat.copyFormat(this.characterFormat),e.height=this.height,e.footnoteType=this.footnoteType,e.width=this.width,e.symbolCode=this.symbolCode;for(var t=0;t<this.bodyWidget.childWidgets.length;t++){var i=this.bodyWidget.childWidgets[t];(i instanceof Z||i instanceof Q)&&(i=this.bodyWidget.childWidgets[t].clone()),e.bodyWidget.childWidgets.push(i)}return e.bodyWidget.page=this.bodyWidget.page,0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),this.margin&&(e.margin=this.margin.clone()),e},Nd.prototype.getLength=function(){return 1},Nd.prototype.destroy=function(){this.symbolCode="",this.symbolFontName="",this.customMarker=""},Nd.prototype.componentDestroy=function(){this.characterFormat&&(this.characterFormat.destroy(),this.characterFormat=void 0),this.symbolCode="",this.symbolFontName="",this.customMarker="",this.bodyWidget&&this.bodyWidget.componentDestroy(),this.bodyWidget=void 0,Od.prototype.componentDestroy.call(this)};var Od,Sd=Nd;function Nd(){var e=Od.call(this)||this;return e.isLayout=!1,e.bodyWidget=new Y,e.bodyWidget.footNoteReference=e}e(Ad,Id=ie),Object.defineProperty(Ad.prototype,"start",{get:function(){return this.startIn},set:function(e){this.startIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(Ad.prototype,"end",{get:function(){return this.endIn},set:function(e){this.endIn=e},enumerable:!0,configurable:!0}),Ad.prototype.destroy=function(){this.start=void 0,this.end=void 0},Ad.prototype.componentDestroy=function(){this.startIn&&this.startIn.destroy(),this.startIn=void 0,this.endIn&&this.endIn.destroy(),this.endIn=void 0,Id.prototype.componentDestroy.call(this)};var Id,kd=Ad;function Ad(){var e=Id.call(this)||this;return e.startIn=void 0,e.endIn=void 0,e}e(Bd,Ld=ie),Object.defineProperty(Bd.prototype,"text",{get:function(){return this.fieldText},set:function(e){this.fieldText=e},enumerable:!0,configurable:!0}),Bd.prototype.clone=function(){var e=new Bd;return e.characterFormat.copyFormat(this.characterFormat),e.fieldBegin=this.fieldBegin,e.text=this.text,this.margin&&(e.margin=this.margin.clone()),0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.width=this.width,e.height=this.height,e},Bd.prototype.componentDestroy=function(){this.fieldText=void 0,this.fieldBegin=void 0,Ld.prototype.componentDestroy.call(this)};var Ld,Ud=Bd;function Bd(){var e=Ld.call(this)||this;return e.fieldText="",e.isRtlPageNumber=!1,e}e(qd,Hd=ie),qd.prototype.destroy=function(){this.tabText=void 0,this.tabLeader=void 0},qd.prototype.componentDestroy=function(){this.tabText=void 0,this.tabLeader=void 0,Hd.prototype.componentDestroy.call(this)},qd.prototype.clone=function(){var e=new qd;return e.characterFormat.copyFormat(this.characterFormat),e.tabText=this.tabText,e.tabLeader=this.tabLeader,e.text=this.text,this.margin&&(e.margin=this.margin.clone()),e.width=this.width,e.height=this.height,0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e};var Hd,Rd=qd;function qd(){var e=Hd.call(this)||this;return e.tabText="",e.tabLeader="None",e}e(Vd,Ed=ld),Object.defineProperty(Vd.prototype,"bookmarkType",{get:function(){return this.bookmarkTypeIn},enumerable:!0,configurable:!0}),Object.defineProperty(Vd.prototype,"properties",{get:function(){return this.propertiesIn},set:function(e){this.propertiesIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(Vd.prototype,"name",{get:function(){return this.nameIn},set:function(e){this.nameIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(Vd.prototype,"reference",{get:function(){return this.refereneceIn},set:function(e){this.refereneceIn=e},enumerable:!0,configurable:!0}),Vd.prototype.getLength=function(){return 1},Vd.prototype.destroy=function(){this.name=void 0,this.reference=void 0,this.bookmarkTypeIn=void 0},Vd.prototype.componentDestroy=function(){this.name=void 0,this.reference=void 0,this.bookmarkTypeIn=void 0,Ed.prototype.componentDestroy.call(this)},Vd.prototype.clone=function(){var e=new Vd(this.bookmarkType);return e.name=this.name,e.reference=this.reference,e.properties=this.properties,this.margin&&(e.margin=this.margin.clone()),0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.width=this.width,e.height=this.height,this.contentControlProperties&&(e.contentControlProperties=this.contentControlProperties),e};var Ed,Md=Vd;function Vd(e){var t=Ed.call(this)||this;return t.bookmarkTypeIn=0,t.refereneceIn=void 0,t.nameIn="",t.bookmarkTypeIn=e,t}e(_d,Dd=ld),_d.prototype.getLength=function(){return 1},_d.prototype.clone=function(){var e=new _d(this.contentControlWidgetType);return e.characterFormat.copyFormat(this.characterFormat),e.contentControlProperties=this.contentControlProperties,e.contentControlWidgetType=this.contentControlWidgetType,this.margin&&(e.margin=this.margin.clone()),0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.type=this.type,e.width=this.width,e.height=this.height,e.reference=this.reference,e},_d.prototype.destroy=function(){this.contentControlProperties=void 0,this.contentControlWidgetType=void 0,Dd.prototype.destroy.call(this)},_d.prototype.componentDestroy=function(){this.contentControlProperties&&(this.contentControlProperties.destroy(),this.contentControlProperties=void 0),this.contentControlWidgetType=void 0,Dd.prototype.componentDestroy.call(this)};var Dd,zd=_d;function _d(e){var t=Dd.call(this)||this;return t.isInsertRevision=!1,t.isDeleteRevision=!1,t.authorName="",t.revDateTime="",t.contentControlWidgetType=e,t.contentControlProperties=new jd(e),t}Gd.prototype.destroy=function(){this.characterFormat&&(this.characterFormat.destroy(),this.characterFormat=void 0),this.xmlMapping&&(this.xmlMapping.destroy(),this.xmlMapping=void 0),this.lockContentControl=void 0,this.lockContents=void 0,this.tag=void 0,this.color=void 0,this.title=void 0,this.appearance=void 0,this.type=void 0,this.hasPlaceHolderText=void 0,this.multiline=void 0,this.isTemporary=void 0,this.isChecked=void 0,this.dateCalendarType=void 0,this.dateStorageFormat=void 0,this.dateDisplayLocale=void 0,this.dateDisplayFormat=void 0},Gd.prototype.clone=function(){var e=new Gd(this.contentControlWidgetType);if(e.lockContentControl=this.lockContentControl,e.lockContents=this.lockContents,e.tag=this.tag,e.color=this.color,e.title=this.title,e.appearance=this.appearance,e.type=this.type,e.hasPlaceHolderText=this.hasPlaceHolderText,e.multiline=this.multiline,e.isTemporary=this.isTemporary,e.isChecked=this.isChecked,e.dateCalendarType=this.dateCalendarType,e.dateStorageFormat=this.dateStorageFormat,e.dateDisplayLocale=this.dateDisplayLocale,e.dateDisplayFormat=this.dateDisplayFormat,0<this.contentControlListItems.length)for(var t=0;t<this.contentControlListItems.length;t++)e.contentControlListItems.push(this.contentControlListItems[t].clone());return this.checkedState&&(e.checkedState=this.checkedState.clone()),this.uncheckedState&&(e.uncheckedState=this.uncheckedState.clone()),this.xmlMapping&&(e.xmlMapping=this.xmlMapping.clone()),e};var jd=Gd;function Gd(e){this.contentControlListItems=[],this.contentControlWidgetType=e,this.characterFormat=new ce}Yd.prototype.destroy=function(){this.displayText=void 0,this.value=void 0},Yd.prototype.clone=function(){var e=new Yd;return e.displayText=this.displayText,e.value=this.value,e};var Kd=Yd;function Yd(){}Jd.prototype.destroy=function(){this.font=void 0,this.value=void 0},Jd.prototype.clone=function(){var e=new Jd;return e.font=this.font,e.value=this.value,e};var Xd=Jd;function Jd(){}Qd.prototype.destroy=function(){this.isMapped=void 0,this.isWordMl=void 0,this.prefixMapping=void 0,this.xPath=void 0,this.storeItemId=void 0,this.customXmlPart=void 0},Qd.prototype.clone=function(){var e=new Qd;return e.isMapped=this.isMapped,e.isWordMl=this.isWordMl,e.prefixMapping=this.prefixMapping,e.xPath=this.xPath,e.storeItemId=this.storeItemId,this.customXmlPart&&(e.customXmlPart=this.customXmlPart.clone()),e};var Zd=Qd;function Qd(){}eh.prototype.destroy=function(){this.id=void 0,this.xml=void 0},eh.prototype.clone=function(){var e=new eh;return e.id=this.id,e.xml=this.xml,e};var $d=eh;function eh(){}e(rh,th=ld),rh.prototype.getLength=function(){return 1},rh.prototype.clone=function(){return new(this instanceof oe?oe:ne)};var th,ih=rh;function rh(){var e=null!==th&&th.apply(this,arguments)||this;return e.name="",e.alternateText="",e.title="",e}e(oh,nh=ih);var nh,re=oh;function oh(){var e=null!==nh&&nh.apply(this,arguments)||this;return e.topMargin=0,e.leftMargin=0,e.coordinateSize="",e.coordinateXOrigin=0,e.coordinateYOrigin=0,e.is2007Shape=!1,e.lineFromXPosition=0,e.lineFromYPosition=0,e.lineToXPosition=0,e.lineToYPosition=0,e.verticalPosition=0,e.horizontalPosition=0,e.textWrappingStyle="Inline",e.distanceBottom=0,e.distanceLeft=0,e.distanceRight=0,e.distanceTop=0,e}e(sh,ah=re),sh.prototype.clone=function(){var e=new sh;return e.characterFormat.copyFormat(this.characterFormat),e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e.leftMargin=this.leftMargin,e.topMargin=this.topMargin,e.coordinateSize=this.coordinateSize,e.coordinateXOrigin=this.coordinateXOrigin,e.coordinateYOrigin=this.coordinateYOrigin,e.is2007Shape=this.is2007Shape,e.shapeId=this.shapeId,e.name=this.name,e.alternateText=this.alternateText,e.title=this.title,e.widthScale=this.widthScale,e.heightScale=this.heightScale,e.visible=this.visible,e.verticalPosition=this.verticalPosition,e.verticalAlignment=this.verticalAlignment,e.verticalOrigin=this.verticalOrigin,e.verticalRelativePercent=this.verticalRelativePercent,e.horizontalPosition=this.horizontalPosition,e.horizontalAlignment=this.horizontalAlignment,e.horizontalOrigin=this.horizontalOrigin,e.horizontalRelativePercent=this.horizontalRelativePercent,e.heightRelativePercent=this.heightRelativePercent,e.isHorizontalRule=this.isHorizontalRule,e.widthRelativePercent=this.widthRelativePercent,e.zOrderPosition=this.zOrderPosition,e.allowOverlap=this.allowOverlap,e.textWrappingStyle=this.textWrappingStyle,e.textWrappingType=this.textWrappingType,e.distanceBottom=this.distanceBottom,e.distanceLeft=this.distanceLeft,e.distanceRight=this.distanceRight,e.distanceTop=this.distanceTop,e.editingPoints=this.editingPoints,e.layoutInCell=this.layoutInCell,e.lockAnchor=this.lockAnchor,e.autoShapeType=this.autoShapeType,e.shapeX=this.shapeX,e.shapeY=this.shapeY,e.shapeHeight=this.shapeHeight,e.shapeWidth=this.shapeWidth,this.lineFormat&&(e.lineFormat=this.lineFormat.clone()),this.fillFormat&&(e.fillFormat=this.fillFormat.clone()),this.textFrame&&(e.textFrame=this.textFrame.clone(),e.textFrame.containerShape=e),this.margin&&(e.margin=this.margin.clone()),0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e};var ah,ne=sh;function sh(){return null!==ah&&ah.apply(this,arguments)||this}e(dh,lh=re),dh.prototype.clone=function(){var e=new dh;if(e.characterFormat.copyFormat(this.characterFormat),e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e.leftMargin=this.leftMargin,e.topMargin=this.topMargin,e.coordinateSize=this.coordinateSize,e.coordinateXOrigin=this.coordinateXOrigin,e.coordinateYOrigin=this.coordinateYOrigin,e.is2007Shape=this.is2007Shape,e.shapeId=this.shapeId,e.name=this.name,e.alternateText=this.alternateText,e.title=this.title,e.widthScale=this.widthScale,e.heightScale=this.heightScale,e.visible=this.visible,e.verticalPosition=this.verticalPosition,e.verticalAlignment=this.verticalAlignment,e.verticalOrigin=this.verticalOrigin,e.verticalRelativePercent=this.verticalRelativePercent,e.horizontalPosition=this.horizontalPosition,e.horizontalAlignment=this.horizontalAlignment,e.horizontalOrigin=this.horizontalOrigin,e.horizontalRelativePercent=this.horizontalRelativePercent,e.heightRelativePercent=this.heightRelativePercent,e.widthRelativePercent=this.widthRelativePercent,e.zOrderPosition=this.zOrderPosition,e.allowOverlap=this.allowOverlap,e.textWrappingStyle=this.textWrappingStyle,e.textWrappingType=this.textWrappingType,e.distanceBottom=this.distanceBottom,e.distanceLeft=this.distanceLeft,e.distanceRight=this.distanceRight,e.distanceTop=this.distanceTop,e.editingPoints=this.editingPoints,e.layoutInCell=this.layoutInCell,e.lockAnchor=this.lockAnchor,e.isZeroHeight=this.isZeroHeight,e.autoShapeType=this.autoShapeType,e.offsetXValue=this.offsetXValue,e.offsetYValue=this.offsetYValue,e.extentXValue=this.extentXValue,e.extentYValue=this.extentYValue,e.shapeX=this.shapeX,e.shapeY=this.shapeY,e.shapeHeight=this.shapeHeight,e.shapeWidth=this.shapeWidth,this.lineFormat&&(e.lineFormat=this.lineFormat.clone()),this.fillFormat&&(e.fillFormat=this.fillFormat.clone()),this.margin&&(e.margin=this.margin.clone()),!G.isNullOrUndefined(this.paragraph)&&this.paragraph.isInHeaderFooter){if(0<this.revisions.length)for(var t=0;t<this.revisions.length;t++){var i=this.revisions[t];e.revisions.push(i.clone())}}else 0<this.revisions.length?e.removedIds=H.cloneRevisions(this.revisions):e.removedIds=this.removedIds.slice();for(t=0;t<this.childWidgets.length;t++){var r=(r=this.childWidgets[t]).clone();G.isNullOrUndefined(r.line)&&(r.line=this.line),(r.containerShape=e).childWidgets.push(r)}return e},dh.prototype.destroy=function(){this.isZeroHeight=void 0,this.autoShapeType=void 0,this.childWidgets=void 0,this.offsetXValue=void 0,this.offsetYValue=void 0,this.extentXValue=void 0,this.extentYValue=void 0,lh.prototype.destroy.call(this)};var lh,oe=dh;function dh(){var e=null!==lh&&lh.apply(this,arguments)||this;return e.childWidgets=[],e}e(ch,hh=ql),ch.prototype.equals=function(){return!1},ch.prototype.destroyInternal=function(){},ch.prototype.getHierarchicalIndex=function(e){var t=this.containerShape.line,i=t.getOffset(this.containerShape,0).toString();return t.getHierarchicalIndex(i)},ch.prototype.getTableCellWidget=function(){},ch.prototype.clone=function(){var e=new ch;e.textVerticalAlignment=this.textVerticalAlignment,e.marginBottom=this.marginBottom,e.marginLeft=this.marginLeft,e.marginRight=this.marginRight,e.marginTop=this.marginTop;for(var t=0;t<this.childWidgets.length;t++){var i=this.childWidgets[t].clone();e.childWidgets.push(i),i.index=t,i.containerWidget=e}return e};var hh,P=ch;function ch(){var e=null!==hh&&hh.apply(this,arguments)||this;return e.marginLeft=0,e.marginRight=0,e.marginTop=0,e.marginBottom=0,e}ph.prototype.clone=function(){var e=new ph;return e.lineFormatType=this.lineFormatType,e.color=this.color,e.weight=this.weight,e.dashStyle=this.dashStyle,e.line=this.line,e};var gh=ph;function ph(){}fh.prototype.clone=function(){var e=new fh;return e.color=this.color,e.fill=this.fill,e.isDefaultFill=this.isDefaultFill,e.foreColor=this.foreColor,e.fillType=this.fillType,e};var uh=fh;function fh(){}e(yh,mh=re),Object.defineProperty(yh.prototype,"isCrop",{get:function(){return this.crop},set:function(e){var t;(this.crop=e)&&((t=e=0)!==this.left?this.cropX=this.left*this.cropWidthScale/100:this.cropX=0,0!==this.top?this.cropY=this.top*this.cropHeightScale/100:this.cropY=0,0!==this.right&&(e=this.right*this.cropWidthScale/100),0!==this.bottom&&(t=this.bottom*this.cropHeightScale/100),this.cropWidth=this.cropWidthScale-(this.cropX+e),this.cropHeight=this.cropHeightScale-(this.cropY+t))},enumerable:!0,configurable:!0}),Object.defineProperty(yh.prototype,"isInlineImage",{get:function(){return this.isInlineImageIn},enumerable:!0,configurable:!0}),Object.defineProperty(yh.prototype,"element",{get:function(){return G.isNullOrUndefined(this.imgElement)&&(this.imgElement=document.createElement("img")),this.imgElement},enumerable:!0,configurable:!0}),Object.defineProperty(yh.prototype,"length",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(yh.prototype,"imageString",{get:function(){return this.imageStr},set:function(e){this.imageStr=e},enumerable:!0,configurable:!0}),yh.prototype.getLength=function(){return 1},yh.prototype.clone=function(){var e=new yh(this.isInlineImage);return e.characterFormat.copyFormat(this.characterFormat),e.imageString=this.imageString,e.element.src=this.element.src,e.isMetaFile=this.isMetaFile,e.isCompressed=this.isCompressed,e.metaFileImageString=this.metaFileImageString,e.width=this.width,e.height=this.height,e.top=this.top,e.left=this.left,e.bottom=this.bottom,e.right=this.right,e.cropHeightScale=this.cropHeightScale,e.cropWidthScale=this.cropWidthScale,e.cropX=this.cropX,e.cropY=this.cropY,e.isCrop=this.isCrop,e.x=this.x,e.y=this.y,e.shapeX=this.shapeX,e.shapeY=this.shapeY,e.shapeHeight=this.shapeHeight,e.shapeWidth=this.shapeWidth,e.is2007Shape=this.is2007Shape,e.coordinateSize=this.coordinateSize,e.coordinateXOrigin=this.coordinateXOrigin,e.coordinateYOrigin=this.coordinateYOrigin,e.distanceBottom=this.distanceBottom,e.distanceLeft=this.distanceLeft,e.distanceRight=this.distanceRight,e.distanceTop=this.distanceTop,e.leftMargin=this.leftMargin,e.topMargin=this.topMargin,this.margin&&(e.margin=this.margin.clone()),0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.name=this.name,e.alternateText=this.alternateText,e.title=this.title,e.visible=this.visible,e.widthScale=this.widthScale,e.heightScale=this.heightScale,e.verticalPosition=this.verticalPosition,e.verticalOrigin=this.verticalOrigin,e.verticalAlignment=this.verticalAlignment,e.horizontalPosition=this.horizontalPosition,e.horizontalOrigin=this.horizontalOrigin,e.horizontalAlignment=this.horizontalAlignment,e.allowOverlap=this.allowOverlap,e.textWrappingStyle=this.textWrappingStyle,e.textWrappingType=this.textWrappingType,e.layoutInCell=this.layoutInCell,e.zOrderPosition=this.zOrderPosition,e},yh.prototype.destroy=function(){this.imgElement=void 0,this.imageString=void 0,this.isInlineImageIn=void 0,mh.prototype.destroy.call(this)};var mh,ae=yh;function yh(e){var t=mh.call(this)||this;return t.imageStr="",t.imgElement=void 0,t.isInlineImageIn=!0,t.crop=!1,t.left=0,t.top=0,t.right=0,t.bottom=0,t.isMetaFile=!1,t.isCompressed=!1,t.isInlineImageIn=e,t}e(Wh,vh=ld),Wh.prototype.getLength=function(){return this.text?this.text.length:0},Wh.prototype.clone=function(){var e=new Wh(this.listLevel,this.isFollowCharacter);return e.text=this.text,e.baselineOffset=this.baselineOffset,e.alignmentShift=this.alignmentShift,this.margin&&(e.margin=this.margin.clone()),e.width=this.width,e.height=this.height,e},Wh.prototype.destroy=function(){this.text=void 0,vh.prototype.destroy.call(this)};var vh,se=Wh;function Wh(e,t){var i=vh.call(this)||this;return i.baselineOffset=0,i.trimEndWidth=0,i.isFollowCharacter=!1,i.alignmentShift=0,i.listLevel=e,i.isFollowCharacter=t,i}e(wh,bh=ld),wh.prototype.getLength=function(){return 1},wh.prototype.destroy=function(){this.editRangeStart=void 0},wh.prototype.clone=function(){var e=new wh;return this.editRangeStart&&(this.editRangeStart.editRangeEnd=e),e.editRangeStart=this.editRangeStart,e.editRangeId=this.editRangeId,e};var bh,xh=wh;function wh(){var e=bh.call(this)||this;return e.editRangeStart=void 0,e.editRangeId=-1,e}e(Ph,Fh=ld),Ph.prototype.getLength=function(){return 1},Ph.prototype.removeEditRangeMark=function(){this.editRangeMark&&(this.editRangeMark.parentElement.removeChild(this.editRangeMark),this.editRangeMark=void 0)},Ph.prototype.destroy=function(){this.user=void 0,this.columnFirst=void 0,this.columnLast=void 0},Ph.prototype.clone=function(){var e=new Ph;return e.columnFirst=this.columnFirst,e.columnLast=this.columnLast,e.user=this.user,e.group=this.group,this.editRangeEnd&&(this.editRangeEnd.editRangeStart=e),e.editRangeEnd=this.editRangeEnd,e.editRangeId=this.editRangeId,e};var Fh,Ch=Ph;function Ph(){var e=Fh.call(this)||this;return e.columnFirst=-1,e.columnLast=-1,e.user="",e.group="",e.editRangeId=-1,e}e(Sh,Th=ae),Sh.prototype.getLength=function(){return 1},Object.defineProperty(Sh.prototype,"title",{get:function(){return this.chartTitle},set:function(e){this.chartTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(Sh.prototype,"type",{get:function(){return this.chartType},set:function(e){this.chartType=e},enumerable:!0,configurable:!0}),Object.defineProperty(Sh.prototype,"chartGapWidth",{get:function(){return this.gapWidth},set:function(e){this.gapWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(Sh.prototype,"chartOverlap",{get:function(){return this.overlap},set:function(e){this.overlap=e},enumerable:!0,configurable:!0}),Object.defineProperty(Sh.prototype,"targetElement",{get:function(){return G.isNullOrUndefined(this.div)&&(this.div=G.createElement("div")),this.div},enumerable:!0,configurable:!0}),Object.defineProperty(Sh.prototype,"officeChart",{get:function(){return this.officeChartInternal},set:function(e){e&&(this.officeChartInternal=e,this.officeChartInternal.chart.loaded=this.onChartLoaded.bind(this))},enumerable:!0,configurable:!0}),Sh.prototype.onChartLoaded=function(){var t=this;G.isNullOrUndefined(this.officeChart.chart)||G.isNullOrUndefined(this.width)||G.isNullOrUndefined(this.height)||this.officeChart.convertChartToImage(this.officeChart.chart,this.width,this.height).then(function(e){t.imageString=e,t.element.src=e})},Sh.prototype.clone=function(){var e=new Sh;e.x=this.x,e.y=this.y,e.chartTitle=this.chartTitle,e.chartType=this.chartType,e.height=this.height,e.width=this.width,e.gapWidth=this.gapWidth,e.overlap=this.overlap,e.imageString=this.imageString,e.element.src=this.imageString,e.officeChart=this.officeChart,e.shapeX=this.shapeX,e.shapeY=this.shapeY,e.shapeHeight=this.shapeHeight,e.shapeWidth=this.shapeWidth;for(var t=0;t<this.chartCategory.length;t++){var i=this.chartCategory[t].clone();e.chartCategory.push(i)}for(t=0;t<this.chartSeries.length;t++){var r=this.chartSeries[t].clone();e.chartSeries.push(r)}return e.chartArea=this.chartArea.clone(),e.chartPlotArea=this.chartPlotArea.clone(),e.chartLegend=this.chartLegend.clone(),e.chartTitleArea=this.chartTitleArea.clone(),e.chartPrimaryCategoryAxis=this.chartPrimaryCategoryAxis.clone(),e.chartPrimaryValueAxis=this.chartPrimaryValueAxis.clone(),e.chartDataTable=this.chartDataTable.clone(),e},Sh.prototype.destroy=function(){Th.prototype.destroy.call(this),G.isNullOrUndefined(this.officeChartInternal)||(this.officeChartInternal.chart.loaded=void 0,this.officeChartInternal.destroy(),this.officeChartInternal=void 0),this.div&&(this.div=void 0),this.chartTitle=void 0,this.chartType=void 0,this.chartArea=void 0,this.chartPlotArea=void 0,this.chartCategory=[],this.chartSeries=[],this.chartTitleArea=void 0,this.chartLegend=void 0,this.chartPrimaryCategoryAxis=void 0,this.chartPrimaryValueAxis=void 0,this.chartDataTable=void 0,this.chartElement=void 0};var Th,Oh=Sh;function Sh(){var e=Th.call(this)||this;return e.chartTitle="",e.chartType="",e.chartElement=void 0,e.chartCategory=[],e.chartSeries=[],e.chartArea=new Nh,e.chartPlotArea=new Nh,e.chartTitleArea=new Kh,e.chartLegend=new Bh,e.chartPrimaryCategoryAxis=new tc,e.chartPrimaryValueAxis=new tc,e.chartDataTable=new rc,e}Object.defineProperty(Ih.prototype,"chartForeColor",{get:function(){return this.foreColor},set:function(e){this.foreColor=e},enumerable:!0,configurable:!0}),Ih.prototype.clone=function(){var e=new Ih;return e.foreColor=this.foreColor,e},Ih.prototype.destroy=function(){this.foreColor=void 0};var Nh=Ih;function Ih(){}Object.defineProperty(Ah.prototype,"xName",{get:function(){return this.categoryXName},set:function(e){this.categoryXName=e},enumerable:!0,configurable:!0}),Ah.prototype.clone=function(){var e=new Ah;e.categoryXName=this.categoryXName;for(var t=0;t<this.chartData.length;t++){var i=this.chartData[t].clone();e.chartData.push(i)}return e},Ah.prototype.destroy=function(){this.categoryXName=void 0,this.chartData=[]};var kh=Ah;function Ah(){this.categoryXName="",this.chartData=[]}Object.defineProperty(Uh.prototype,"yAxisValue",{get:function(){return this.yValue},set:function(e){this.yValue=e},enumerable:!0,configurable:!0}),Object.defineProperty(Uh.prototype,"xAxisValue",{get:function(){return this.xValue},set:function(e){this.xValue=e},enumerable:!0,configurable:!0}),Object.defineProperty(Uh.prototype,"bubbleSize",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0}),Uh.prototype.clone=function(){var e=new Uh;return e.yValue=this.yValue,e.xValue=this.xValue,e.size=this.size,e},Uh.prototype.destroy=function(){this.xValue=void 0,this.yValue=void 0,this.size=void 0};var Lh=Uh;function Uh(){}Object.defineProperty(Hh.prototype,"chartLegendPostion",{get:function(){return this.legendPostion},set:function(e){this.legendPostion=e},enumerable:!0,configurable:!0}),Hh.prototype.clone=function(){var e=new Hh;return e.legendPostion=this.legendPostion,e.chartTitleArea=this.chartTitleArea.clone(),e},Hh.prototype.destroy=function(){this.legendPostion=void 0,this.chartTitleArea=void 0};var Bh=Hh;function Hh(){this.chartTitleArea=new Kh}Object.defineProperty(qh.prototype,"seriesName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!0,configurable:!0}),Object.defineProperty(qh.prototype,"firstSliceAngle",{get:function(){return this.sliceAngle},set:function(e){this.sliceAngle=e},enumerable:!0,configurable:!0}),Object.defineProperty(qh.prototype,"doughnutHoleSize",{get:function(){return this.holeSize},set:function(e){this.holeSize=e},enumerable:!0,configurable:!0}),qh.prototype.clone=function(){var e=new qh;e.name=this.name,e.sliceAngle=this.sliceAngle,e.holeSize=this.holeSize,e.errorBar=this.errorBar.clone(),e.dataLabels=this.dataLabels.clone(),e.seriesFormat=this.seriesFormat.clone();for(var t=0;t<this.chartDataFormat.length;t++){var i=this.chartDataFormat[t].clone();e.chartDataFormat.push(i)}for(t=0;t<this.trendLines.length;t++){var r=this.trendLines[t].clone();e.trendLines.push(r)}return e},qh.prototype.destroy=function(){this.name=void 0,this.errorBar=void 0,this.trendLines=void 0,this.chartDataFormat=[]};var Rh=qh;function qh(){this.chartDataFormat=[],this.trendLines=[],this.errorBar=new Eh,this.dataLabels=new zh,this.seriesFormat=new Vh}Object.defineProperty(Mh.prototype,"errorType",{get:function(){return this.type},set:function(e){this.type=e},enumerable:!0,configurable:!0}),Object.defineProperty(Mh.prototype,"errorDirection",{get:function(){return this.direction},set:function(e){this.direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(Mh.prototype,"errorEndStyle",{get:function(){return this.endStyle},set:function(e){this.endStyle=e},enumerable:!0,configurable:!0}),Object.defineProperty(Mh.prototype,"numberValue",{get:function(){return this.errorValue},set:function(e){this.errorValue=e},enumerable:!0,configurable:!0}),Mh.prototype.clone=function(){var e=new Mh;return e.type=this.type,e.errorDirection=this.errorDirection,e.endStyle=this.endStyle,e.errorValue=this.errorValue,e},Mh.prototype.destroy=function(){this.type=void 0,this.errorDirection=void 0,this.endStyle=void 0};var Eh=Mh;function Mh(){}Object.defineProperty(Dh.prototype,"markerStyle",{get:function(){return this.style},set:function(e){this.style=e},enumerable:!0,configurable:!0}),Object.defineProperty(Dh.prototype,"markerColor",{get:function(){return this.color},set:function(e){this.color=e},enumerable:!0,configurable:!0}),Object.defineProperty(Dh.prototype,"numberValue",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0}),Dh.prototype.clone=function(){var e=new Dh;return e.style=this.style,e.color=this.color,e.size=this.size,e},Dh.prototype.destroy=function(){this.style=void 0,this.color=void 0,this.size=void 0};var Vh=Dh;function Dh(){}Object.defineProperty(_h.prototype,"labelPosition",{get:function(){return this.position},set:function(e){this.position=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"fontName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"fontColor",{get:function(){return this.color},set:function(e){this.color=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"fontSize",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isLegendKey",{get:function(){return this.isLegend},set:function(e){this.isLegend=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isBubbleSize",{get:function(){return this.isBubble},set:function(e){this.isBubble=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isCategoryName",{get:function(){return this.isCategory},set:function(e){this.isCategory=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isSeriesName",{get:function(){return this.isSeries},set:function(e){this.isSeries=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isValue",{get:function(){return this.isValueEnabled},set:function(e){this.isValueEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isPercentage",{get:function(){return this.isPercentageEnabled},set:function(e){this.isPercentageEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(_h.prototype,"isLeaderLines",{get:function(){return this.showLeaderLines},set:function(e){this.showLeaderLines=e},enumerable:!0,configurable:!0}),_h.prototype.clone=function(){var e=new _h;return e.position=this.position,e.name=this.name,e.color=this.color,e.size=this.size,e.isBubble=this.isBubble,e.isLegend=this.isLegend,e.isCategory=this.isCategory,e.isSeries=this.isSeries,e.isValueEnabled=this.isValueEnabled,e.isPercentageEnabled=this.isPercentageEnabled,e.showLeaderLines=this.showLeaderLines,e},_h.prototype.destroy=function(){this.position=void 0};var zh=_h;function _h(){}Object.defineProperty(Gh.prototype,"trendLineType",{get:function(){return this.type},set:function(e){this.type=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"trendLineName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"interceptValue",{get:function(){return this.intercept},set:function(e){this.intercept=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"forwardValue",{get:function(){return this.forward},set:function(e){this.forward=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"backwardValue",{get:function(){return this.backward},set:function(e){this.backward=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"isDisplayRSquared",{get:function(){return this.displayRSquared},set:function(e){this.displayRSquared=e},enumerable:!0,configurable:!0}),Object.defineProperty(Gh.prototype,"isDisplayEquation",{get:function(){return this.displayEquation},set:function(e){this.displayEquation=e},enumerable:!0,configurable:!0}),Gh.prototype.clone=function(){var e=new Gh;return e.type=this.type,e.name=this.name,e.forward=this.forward,e.backward=this.backward,e.intercept=this.intercept,e.displayEquation=this.displayEquation,e.displayRSquared=this.displayRSquared,e},Gh.prototype.destroy=function(){this.type=void 0,this.name=void 0,this.forward=void 0,this.backward=void 0};var jh=Gh;function Gh(){}Object.defineProperty(Yh.prototype,"chartfontName",{get:function(){return this.fontName},set:function(e){this.fontName=e},enumerable:!0,configurable:!0}),Object.defineProperty(Yh.prototype,"chartFontSize",{get:function(){return this.fontSize},set:function(e){this.fontSize=e},enumerable:!0,configurable:!0}),Yh.prototype.clone=function(){var e=new Yh;return e.fontName=this.fontName,e.fontSize=this.fontSize,e.dataFormat=this.dataFormat.clone(),e.layout=this.layout.clone(),e},Yh.prototype.destroy=function(){this.fontName=void 0,this.fontSize=void 0,this.dataFormat=void 0,this.layout=void 0};var Kh=Yh;function Yh(){this.dataFormat=new Xh,this.layout=new $h}Jh.prototype.clone=function(){var e=new Jh;return e.fill=this.fill.clone(),e.line=this.line.clone(),e},Jh.prototype.destroy=function(){this.fill=void 0,this.line=void 0};var Xh=Jh;function Jh(){this.fill=new Zh,this.line=new Zh}Object.defineProperty(Qh.prototype,"color",{get:function(){return this.fillColor},set:function(e){this.fillColor=e},enumerable:!0,configurable:!0}),Object.defineProperty(Qh.prototype,"rgb",{get:function(){return this.fillRGB},set:function(e){this.fillRGB=e},enumerable:!0,configurable:!0}),Qh.prototype.clone=function(){var e=new Qh;return e.fillColor=this.fillColor,e.fillRGB=this.fillRGB,e},Qh.prototype.destroy=function(){this.fillColor=void 0,this.fillRGB=void 0};var Zh=Qh;function Qh(){}Object.defineProperty(ec.prototype,"chartLayoutLeft",{get:function(){return this.layoutX},set:function(e){this.layoutX=e},enumerable:!0,configurable:!0}),Object.defineProperty(ec.prototype,"chartLayoutTop",{get:function(){return this.layoutY},set:function(e){this.layoutY=e},enumerable:!0,configurable:!0}),ec.prototype.clone=function(){var e=new ec;return e.layoutX=this.layoutX,e.layoutY=this.layoutY,e},ec.prototype.destroy=function(){this.layoutX=void 0,this.layoutY=void 0};var $h=ec;function ec(){}Object.defineProperty(ic.prototype,"majorTick",{get:function(){return this.majorTickMark},set:function(e){this.majorTickMark=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"minorTick",{get:function(){return this.minorTickMark},set:function(e){this.minorTickMark=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"tickPosition",{get:function(){return this.tickLabelPostion},set:function(e){this.tickLabelPostion=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"minorGridLines",{get:function(){return this.hasMinorGridLines},set:function(e){this.hasMinorGridLines=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"majorGridLines",{get:function(){return this.hasMajorGridLines},set:function(e){this.hasMajorGridLines=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"interval",{get:function(){return this.majorUnit},set:function(e){this.majorUnit=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"isAutoInternal",{get:function(){return this.isAutoMajor},set:function(e){this.isAutoMajor=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"max",{get:function(){return this.maximumValue},set:function(e){this.maximumValue=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"min",{get:function(){return this.minimumValue},set:function(e){this.minimumValue=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"categoryAxisTitle",{get:function(){return this.title},set:function(e){this.title=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"categoryAxisType",{get:function(){return this.categoryType},set:function(e){this.categoryType=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"categoryNumberFormat",{get:function(){return this.numberFormat},set:function(e){this.numberFormat=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"axisFontSize",{get:function(){return this.fontSize},set:function(e){this.fontSize=e},enumerable:!0,configurable:!0}),Object.defineProperty(ic.prototype,"axisFontName",{get:function(){return this.fontName},set:function(e){this.fontName=e},enumerable:!0,configurable:!0}),ic.prototype.clone=function(){var e=new ic;return e.title=this.title,e.categoryType=this.categoryType,e.numberFormat=this.numberFormat,e.fontSize=this.fontSize,e.fontName=this.fontName,e.hasMajorGridLines=this.hasMajorGridLines,e.hasMinorGridLines=this.hasMinorGridLines,e.minimumValue=this.minimumValue,e.maximumValue=this.maximumValue,e.majorUnit=this.majorUnit,e.isAutoMajor=this.isAutoMajor,e.majorTickMark=this.majorTickMark,e.minorTickMark=this.minorTickMark,e.tickLabelPostion=this.tickLabelPostion,e.chartTitleArea=this.chartTitleArea.clone(),e},ic.prototype.destroy=function(){this.title=void 0,this.categoryType=void 0,this.numberFormat=void 0,this.chartTitleArea=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.fontSize=void 0,this.fontName=void 0,this.majorUnit=void 0,this.majorTickMark=void 0,this.minorTickMark=void 0,this.tickLabelPostion=void 0};var tc=ic;function ic(){this.chartTitleArea=new Kh}Object.defineProperty(nc.prototype,"showSeriesKeys",{get:function(){return this.isSeriesKeys},set:function(e){this.isSeriesKeys=e},enumerable:!0,configurable:!0}),Object.defineProperty(nc.prototype,"hasHorzBorder",{get:function(){return this.isHorzBorder},set:function(e){this.isHorzBorder=e},enumerable:!0,configurable:!0}),Object.defineProperty(nc.prototype,"hasVertBorder",{get:function(){return this.isVertBorder},set:function(e){this.isVertBorder=e},enumerable:!0,configurable:!0}),Object.defineProperty(nc.prototype,"hasBorders",{get:function(){return this.isBorders},set:function(e){this.isBorders=e},enumerable:!0,configurable:!0}),nc.prototype.clone=function(){var e=new nc;return e.isSeriesKeys=this.isSeriesKeys,e.isHorzBorder=this.isHorzBorder,e.isVertBorder=this.isVertBorder,e.isBorders=this.isBorders,e},nc.prototype.destroy=function(){this.isSeriesKeys=void 0,this.isHorzBorder=void 0,this.isVertBorder=void 0,this.isBorders=void 0};var rc=nc;function nc(){}e(sc,oc=ld),Object.defineProperty(sc.prototype,"comment",{get:function(){return this.commentInternal},set:function(e){this.commentInternal=e},enumerable:!0,configurable:!0}),sc.prototype.getLength=function(){return 1},sc.prototype.clone=function(){var e=new sc(this.commentType);return e.commentId=this.commentId,e.commentType=this.commentType,G.isNullOrUndefined(this.commentInternal)||(e.commentInternal=this.commentInternal.clone()),e},sc.prototype.renderCommentMark=function(e,t){for(var i,r,n=this,o=this.line.paragraph.bodyWidget.page.documentHelper,a=o.render.commentMarkDictionary,s=(0===this.commentType&&G.isNullOrUndefined(this.commentMark)&&(this.commentMark=document.createElement("div"),this.commentMark.style.display="none",this.commentMark.classList.add("e-de-cmt-mark"),(i=document.createElement("span")).classList.add("e-icons"),i.classList.add("e-de-cmt-mark-icon"),this.commentMarkSpan=i,this.commentMark.appendChild(i),o.documentEditorSettings.commentSettings)&&o.documentEditorSettings.commentSettings.highlightCommentsByAuthor&&(i=((i=this.getFirstCommentInLine())&&i.comment?i:this).comment.author,i=o.getAuthorColor(i),this.commentMarkSpan.style.color=o.convertColorToRGBA(i,.6),this.onCommentMarkMouseEnter=function(){n.getFirstCommentInLine().updateCommentMarkColorOnHover()},this.onCommentMarkMouseLeave=function(){n.getFirstCommentInLine().updateCommentMarkColorOnUnhover()},this.commentMarkSpan.addEventListener("mouseenter",this.onCommentMarkMouseEnter),this.commentMarkSpan.addEventListener("mouseleave",this.onCommentMarkMouseLeave)),o.documentEditorSettings.commentSettings&&o.documentEditorSettings.commentSettings.highlightCommentsByAuthor&&0===this.commentType&&this.commentMarkSpan&&!G.isNullOrUndefined(this.commentMark)&&this.refreshCommentMarkAppearance(o,a),this.line&&G.isNullOrUndefined(this.commentMark.parentElement)&&(o.pageContainer.appendChild(this.commentMark),this.commentMark.addEventListener("click",this.selectComment.bind(this))),!1),l=0;l<a.length;l++)if(this.elementsOverlap(a.keys[l],e,t)){s=!0,r=a.keys[l];break}if(s){for(var d=!0,l=0;l<a.get(r).length;l++)if(a.get(r)[l]===this){d=!1;break}d&&(a.get(r).push(this),o.documentEditorSettings.commentSettings)&&o.documentEditorSettings.commentSettings.highlightCommentsByAuthor&&this.commentMarkSpan&&(this.commentMarkSpan.style.color="transparent",this.commentMarkSpan.style.textShadow="")}else a.add(this.commentMark,[this]);for(l=0;l<a.length;l++){var h=a.keys[l];if(1==a.get(h).length&&a.get(h)[0].commentMark&&(a.get(h)[0].commentMark.firstElementChild.classList.contains("e-de-multi-cmt-mark")?G.classList(a.get(h)[0].commentMark.firstElementChild,["e-de-cmt-mark-icon"],["e-de-multi-cmt-mark"]):a.get(h)[0].commentInternal.isResolved&&a.get(h)[0].commentMark.firstElementChild.classList.contains("e-de-cmt-mark-icon")?G.classList(a.get(h)[0].commentMark.firstElementChild,["e-de-cmt-resolve-icon"],["e-de-cmt-mark-icon"]):!a.get(h)[0].commentInternal.isResolved&&a.get(h)[0].commentMark.firstElementChild.classList.contains("e-de-cmt-resolve-icon")&&G.classList(a.get(h)[0].commentMark.firstElementChild,["e-de-cmt-mark-icon"],["e-de-cmt-resolve-icon"])),1<a.get(h).length)for(var c=0;c<a.get(h).length;c++){for(var g=!0,p=0;p<a.get(h).length;p++)if(a.get(h)[p].commentInternal&&!a.get(h)[p].commentInternal.isResolved){g=!1;break}a.get(h)[c].commentMark&&(a.get(h)[c].commentMark.firstElementChild.classList.contains("e-de-cmt-mark-icon")?G.classList(a.get(h)[c].commentMark.firstElementChild,["e-de-multi-cmt-mark"],["e-de-cmt-mark-icon"]):!g&&a.get(h)[c].commentMark.firstElementChild.classList.contains("e-de-multi-cmt-resolve")?G.classList(a.get(h)[c].commentMark.firstElementChild,["e-de-multi-cmt-mark"],["e-de-multi-cmt-resolve"]):g&&G.classList(a.get(h)[c].commentMark.firstElementChild,["e-de-multi-cmt-resolve"],["e-de-multi-cmt-mark"]))}}},sc.prototype.elementsOverlap=function(e,t,i){var r=e.offsetWidth,n=e.offsetHeight,o=parseFloat(e.style.top),e=parseFloat(e.style.left),a=o+n,s=e+r,t=parseFloat(t),i=parseFloat(i);return!(t+n<o||s<i||a<t||i+r<e)},sc.prototype.getFirstCommentInLine=function(){if(!G.isNullOrUndefined(this.line)&&!G.isNullOrUndefined(this.line.children))for(var e=0;e<this.line.children.length;e++){var t=this.line.children[e];if(t instanceof sc&&0===t.commentType)return t}return this},sc.prototype.refreshCommentMarkAppearance=function(e,t){for(var i,r=e.editorProperties.currentSelectedComment,n=this.getFirstCommentInLine(),n=(n&&n.comment?n:this).comment.author,n=e.getAuthorColor(n),o=this.commentMark.style.top,a=this.commentMark.style.left,s=[],l=0;l<t.length;l++)if(this.elementsOverlap(t.keys[l],o,a)){i=t.keys[l],s=t.get(i);break}if(1<s.length)if(s[0]===this){var d,h=!1;if(r)for(var c=0;c<s.length;c++)if(s[c].comment===r){h=!0;break}h?(d=e.getAuthorColor(r.author),this.commentMarkSpan.style.color=d,this.commentMarkSpan.style.textShadow="0 0 2px "+d):(this.commentMarkSpan.style.color=e.convertColorToRGBA(n,.6),this.commentMarkSpan.style.textShadow="")}else this.commentMarkSpan.style.color="transparent",this.commentMarkSpan.style.textShadow="";else this.commentMark.classList.contains("e-de-cmt-mark-selected")&&r&&r===this.comment?(d=e.getAuthorColor(r.author),this.commentMarkSpan.style.color=d,this.commentMarkSpan.style.textShadow="0 0 2px "+d):(this.commentMarkSpan.style.color=e.convertColorToRGBA(n,.6),this.commentMarkSpan.style.textShadow="")},sc.prototype.updateCommentMarkColorOnHover=function(){var e=this.line.paragraph.bodyWidget.page.documentHelper,t=e.render.commentMarkDictionary.get(this.commentMark);if(t&&0!==t.length){var i,r=t[0],n=e.editorProperties.currentSelectedComment,o=e.getAuthorColor(r.comment.author);n&&(i=n.commentStart.getFirstCommentInLine())&&i.comment===r.comment&&(o=e.getAuthorColor(n.author)),t[0]&&t[0].commentMarkSpan&&(t[0].commentMarkSpan.style.color=o,t[0].commentMarkSpan.style.textShadow="0 0 2px "+o);for(var a=1;a<t.length;a++){var s=t[a];s&&s.commentMarkSpan&&(s.commentMarkSpan.style.color="transparent",s.commentMarkSpan.style.textShadow="")}}},sc.prototype.updateCommentMarkColorOnUnhover=function(){var e=this.line.paragraph.bodyWidget.page.documentHelper,t=e.render.commentMarkDictionary.get(this.commentMark);if(t&&0!==t.length){var i,r=t[0],n=e.editorProperties.currentSelectedComment,o=e.getAuthorColor(r.comment.author),a=!1;n&&(a=((i=n.commentStart.getFirstCommentInLine())?i.comment:null)===r.comment),t[0]&&t[0].commentMarkSpan&&(a?(i=e.getAuthorColor(n.author),t[0].commentMarkSpan.style.color=i,t[0].commentMarkSpan.style.textShadow="0 0 2px "+i):(t[0].commentMarkSpan.style.color=e.convertColorToRGBA(o,.6),t[0].commentMarkSpan.style.textShadow=""));for(var s=1;s<t.length;s++){var l=t[s];l&&l.commentMarkSpan&&(l.commentMarkSpan.style.color="transparent",l.commentMarkSpan.style.textShadow="")}}},sc.prototype.selectComment=function(){for(var e,t=this.line.paragraph.bodyWidget.page.documentHelper,i=t.render.commentMarkDictionary,r=this.commentMark.style.top,n=this.commentMark.style.left,o=0,a=[],s=0;s<i.keys.length;s++)if(this.elementsOverlap(i.keys[s],r,n)){a=i.get(i.keys[s]);break}if(t.editorProperties.currentSelectedComment){for(s=0;s<a.length;s++)if(a[s].comment===t.editorProperties.currentSelectedComment){o=s;break}o<a.length-1?o+=1:o=0}else o=0;t&&0<a.length&&(e=a[o].comment,t.hooks.onCommentSelected)&&t.hooks.onCommentSelected(e)},sc.prototype.removeCommentMark=function(){this.commentMark&&this.commentMark.parentElement&&(this.commentMark.removeEventListener("click",this.selectComment.bind(this)),this.commentMark.parentElement.removeChild(this.commentMark))},sc.prototype.destroy=function(){this.commentMarkSpan&&(this.onCommentMarkMouseEnter&&this.commentMarkSpan.removeEventListener("mouseenter",this.onCommentMarkMouseEnter),this.onCommentMarkMouseLeave)&&this.commentMarkSpan.removeEventListener("mouseleave",this.onCommentMarkMouseLeave),this.commentMark&&this.removeCommentMark(),this.commentMark=void 0,this.commentInternal=void 0,this.commentId=void 0,oc.prototype.componentDestroy.call(this)};var oc,ac=sc;function sc(e){var t=oc.call(this)||this;return t.commentType=0,t.commentId="",t.commentType=e,t}e(hc,lc=ac),Object.defineProperty(hc.prototype,"commentStart",{get:function(){return this.commentStartIn},set:function(e){this.commentStartIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"commentEnd",{get:function(){return this.commentEndIn},set:function(e){this.commentEndIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"author",{get:function(){return this.authorIn},set:function(e){this.authorIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"initial",{get:function(){return this.initialIn},set:function(e){this.initialIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"isResolved",{get:function(){return this.done},set:function(e){this.done=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"date",{get:function(){return this.createdDate},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"text",{get:function(){return this.textIn},set:function(e){this.textIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"mentions",{get:function(){return this.mentionsIn},set:function(e){this.mentionsIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(hc.prototype,"isPosted",{get:function(){return this.posted},set:function(e){this.posted=e},enumerable:!0,configurable:!0}),hc.prototype.getLength=function(){return 1},hc.prototype.clone=function(){var e=new hc(this.date);return e.author=this.author,e.initial=this.initial,e.commentId=this.commentId,e.replyComments=this.replyComments,e.isResolved=this.isResolved,e.text=this.text,e},hc.prototype.destroy=function(){if(this.replyComments&&0<this.replyComments.length){for(var e=0;e<this.replyComments.length;e++)this.replyComments[e].destroy();this.replyComments=[]}this.replyComments=void 0,this.commentStartIn&&(this.commentStartIn.destroy(),this.commentStartIn=void 0),this.commentEndIn&&(this.commentEndIn.destroy(),this.commentEndIn=void 0),this.commentId=void 0,this.createdDate=void 0,this.initialIn=void 0,this.textIn=void 0,this.authorIn=void 0,this.ownerComment=void 0,lc.prototype.destroy.call(this)};var lc,dc=hc;function hc(e){var t=lc.call(this,0)||this;return t.authorIn="",t.initialIn="",t.done=!1,t.posted=!1,t.textIn="",t.isReply=!1,t.ownerComment=void 0,t.mentionsIn=[],t.createdDate=e,t.replyComments=[],t}Object.defineProperty(gc.prototype,"headerWidget",{get:function(){return!G.isNullOrUndefined(this.headerWidgetIn)&&this.headerWidgetIn.parentHeaderFooter?this.headerWidgetIn.parentHeaderFooter:this.headerWidgetIn},set:function(e){this.headerWidgetIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"footerWidget",{get:function(){return!G.isNullOrUndefined(this.footerWidgetIn)&&this.footerWidgetIn.parentHeaderFooter?this.footerWidgetIn.parentHeaderFooter:this.footerWidgetIn},set:function(e){this.footerWidgetIn=e},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"index",{get:function(){return this.documentHelper?this.documentHelper.pages.indexOf(this):-1},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"previousPage",{get:function(){var e=this.index;if(0<e)return this.documentHelper.pages[e-1]},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"nextPage",{get:function(){var e=this.index;if(e<this.documentHelper.pages.length-1)return this.documentHelper.pages[e+1]},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"sectionIndex",{get:function(){return 0<this.bodyWidgets.length?this.bodyWidgets[0].index:-1},enumerable:!0,configurable:!0}),Object.defineProperty(gc.prototype,"viewer",{get:function(){return this.documentHelper.viewer},enumerable:!0,configurable:!0}),gc.prototype.destroy=function(){this.headerWidget&&this.headerWidget.page===this&&(this.headerWidget.page=void 0),this.footerWidget&&this.footerWidget.page===this&&(this.footerWidget.page=void 0),this.headerWidgetIn&&!G.isNullOrUndefined(this.headerWidgetIn.parentHeaderFooter)&&(G.isNullOrUndefined(this.documentHelper)||G.isNullOrUndefined(this.documentHelper.pages)||(this.documentHelper.editorProperties.removeFieldInWidget(this.headerWidgetIn),this.documentHelper.editorProperties.removeFieldInWidget(this.headerWidgetIn,!1,!0)),this.headerWidgetIn.destroy(),this.headerWidget=void 0),this.footerWidgetIn&&!G.isNullOrUndefined(this.footerWidgetIn.parentHeaderFooter)&&(G.isNullOrUndefined(this.documentHelper)||G.isNullOrUndefined(this.documentHelper.pages)||(this.documentHelper.editorProperties.removeFieldInWidget(this.footerWidgetIn),this.documentHelper.editorProperties.removeFieldInWidget(this.footerWidgetIn,!1,!0)),this.footerWidgetIn.destroy(),this.footerWidgetIn=void 0),this.bodyWidgets=[],this.bodyWidgets=void 0,G.isNullOrUndefined(this.documentHelper)||G.isNullOrUndefined(this.documentHelper.pages)||this.documentHelper.removePage(this),this.documentHelper=void 0},gc.prototype.componentDestroy=function(){if(this.headerWidgetIn&&(this.headerWidgetIn.componentDestroy(),this.headerWidgetIn=void 0),this.footerWidgetIn&&(this.footerWidgetIn.componentDestroy(),this.footerWidgetIn=void 0),this.bodyWidgets){for(var e=0;e<this.bodyWidgets.length;e++)this.bodyWidgets[e].componentDestroy();this.bodyWidgets=[],this.bodyWidgets=void 0}this.documentHelper=void 0};var cc=gc;function gc(e){this.boundingRectangle=new _(96,96,816,1056),this.repeatHeaderRowTableWidget=!1,this.bodyWidgets=[],this.headerWidgetIn=void 0,this.footerWidgetIn=void 0,this.footnoteWidget=void 0,this.endnoteWidget=void 0,this.currentPageNum=1,this.allowNextPageRendering=!0,this.documentHelper=e}Object.defineProperty(uc.prototype,"columns",{get:function(){return this.tableColumns},enumerable:!0,configurable:!0}),uc.prototype.resetColumns=function(){for(var e=0;e<this.tableColumns.length;e++)this.tableColumns[e].destroy();this.tableColumns=[]},uc.prototype.getPreviousSpannedCellWidth=function(e,t){for(var i=0,r=e;r<t;r++)i+=this.tableColumns[r].preferredWidth;return i},uc.prototype.addColumns=function(e,t,i,r,n,o,a){for(var s=this.columns.length;s<t;s++)this.columns.push(new fc);for(var l=0,d=e;d<t;d++)l+=this.columns[d].preferredWidth;var h=t-e,a=!(a&&1<h&&"Auto"!==o),c=(!(1<h)&&l<i&&(this.columns[t-1].preferredWidth+=i-l),0),g=0,p=0;if(1<h)for(var u=e;u<t-1;u++)c+=this.columns[u].minimumWordWidth,g+=this.columns[u].maximumWordWidth,p+=this.columns[u].maxParaWidth;a&&r.minimumWordWidth-c>this.columns[t-1].minimumWordWidth&&(this.columns[t-1].minimumWordWidth=r.minimumWordWidth-c),a&&r.maximumWordWidth-g>this.columns[t-1].maximumWordWidth&&(this.columns[t-1].maximumWordWidth=r.maximumWordWidth-g),a&&r.maxParaWidth-p>this.columns[t-1].maxParaWidth&&(this.columns[t-1].maxParaWidth=r.maxParaWidth-p),r.minimumWidth>this.columns[t-1].minimumWidth&&(this.columns[t-1].minimumWidth=r.minimumWidth),n>this.columns[t-1].endOffset&&(this.columns[t-1].endOffset=n),this.columns[t-1].widthType=o},uc.prototype.getTotalWidth=function(e){for(var t=0,i=0;i<this.columns.length;i++){var r=this.columns[i];t+=0===e?r.preferredWidth:1===e?r.minimumWordWidth:2===e?r.maximumWordWidth:4===e?r.maxParaWidth:r.minimumWidth}return t},uc.prototype.isFitColumns=function(e,t,i){var r=this.getTotalWidth(0);if(this.tableWidth=i&&r<t?r:t,r!==this.tableWidth)for(var n=this.tableWidth/r,n=isNaN(n)||n==1/0?1:n,o=0;o<this.columns.length;o++){var a=this.columns[o];if(n*a.preferredWidth<a.minWidth)return!1}return!0},uc.prototype.isAllColumnHasPointWidthType=function(){for(var e=!0,t=0;t<this.columns.length;t++)"Point"!=this.columns[t].widthType&&(e=!1);return e},uc.prototype.autoFitColumn=function(e,t,i,r,n,o,a,s,H,l,d){for(var R=this,h=0,c=0,g=0,p=this.columns.every(function(e){return"Point"===e.widthType}),u=!i&&"Percent"===l,f=0,m=[],y=0;y<this.columns.length;y++)this.columns[y].maxParaWidth>this.columns[y].maximumWordWidth&&(this.columns[y].maximumWordWidth=this.columns[y].maxParaWidth);for(var v=this.getTotalWidth(0),W=!i&&"Point"===l&&p&&!o&&K.round(t,2)<K.round(v,2),y=0;y<this.columns.length;y++){0===(F=this.columns[y]).minimumWordWidth&&0===F.maximumWordWidth&&0===F.minWidth&&(p?(F.minimumWordWidth=F.minimumWidth>F.preferredWidth?F.minimumWidth:F.preferredWidth,F.maximumWordWidth=F.minimumWidth>F.preferredWidth?F.minimumWidth:F.preferredWidth,F.minWidth=F.minimumWidth>F.preferredWidth?F.minimumWidth:F.preferredWidth):(F.minimumWordWidth=0<F.minimumWidth?F.minimumWidth:F.preferredWidth,F.maximumWordWidth=0<F.minimumWidth?F.minimumWidth:F.preferredWidth,F.minWidth=0<F.minimumWidth?F.minimumWidth:F.preferredWidth)),W&&(this.columns[y].preferredWidth=this.columns[y].preferredWidth/v*t);var b=0,q=(h+=F.preferredWidth>F.maximumWordWidth?F.preferredWidth:F.maximumWordWidth,c+=F.preferredWidth>F.minimumWordWidth?F.preferredWidth:F.minimumWordWidth,0!==F.preferredWidth&&F.preferredWidth>F.minimumWordWidth?F.preferredWidth:F.minimumWordWidth);g+=0<(b=F.maximumWordWidth-q)?b:0,F.preferredWidth<F.minimumWordWidth?f+=F.minimumWordWidth-F.preferredWidth:m.push(y)}if(u&&!o&&!r&&1<this.columns.length&&this.columns.every(function(e){return"Auto"===e.widthType&&0<e.maximumWordWidth&&K.round(e.preferredWidth,2)===K.round(R.columns[0].preferredWidth,2)})&&this.columns.reduce(function(e,t){return e+t.maximumWordWidth},0)<=.85*t&&Math.max.apply(Math,this.columns.map(function(e){return e.maximumWordWidth}))>=.5*this.columns.reduce(function(e,t){return e+t.maximumWordWidth},0)){for(y=0;y<this.columns.length;y++)this.columns[y].preferredWidth=this.columns[y].maximumWordWidth;this.fitColumns(e,t,i,n)}else if(h<=t){for(y=0;y<this.columns.length;y++)"Point"===(F=this.columns[y]).widthType?F.preferredWidth<F.minimumWordWidth&&(F.preferredWidth=F.minimumWordWidth):F.preferredWidth<F.maximumWordWidth&&(F.preferredWidth=F.maximumWordWidth);i||this.fitColumns(e,t,i,n)}else{var x=this.getTotalWidth(0);if(p&&!o&&e<c&&(x<e&&(f-=e-x),0<m.length)&&0<f){for(var w=f/this.columns.length,y=0;y<this.columns.length;y++){var F=this.columns[y];-1===m.indexOf(y)?x>F.minimumWordWidth&&(F.preferredWidth=F.minimumWordWidth):(F.preferredWidth=F.preferredWidth-w,F.preferredWidth<F.minimumWordWidth&&(F.preferredWidth=F.minimumWordWidth))}W=!i&&"Point"===l&&K.round(t,2)<=K.round(v,2),x=this.getTotalWidth(0)}if(!i){s=t<c&&c+(G.isNullOrUndefined(s)?0:s)<e;if(s&&o&&p&&"Point"===l&&K.round(v,2)===K.round(t,2)&&(s=!1),W&&s){if(t<c&&0<f){x<t&&(f-=t-x);for(w=f/m.length,y=0;y<this.columns.length;y++){F=this.columns[y];-1===m.indexOf(y)?F.preferredWidth=F.minimumWordWidth:F.preferredWidth=F.preferredWidth-w}x=this.getTotalWidth(0)}return}if(this.fitColumns(e,s?c:t,i,n),u&&!o&&!r){for(var C=0,P=0,T=[],O=[],y=0;y<this.columns.length;y++)(F=this.columns[y]).preferredWidth<F.minimumWordWidth?(C+=F.minimumWordWidth-F.preferredWidth,T.push(y)):F.preferredWidth>F.minimumWordWidth&&(P+=F.preferredWidth-F.minimumWordWidth,O.push(y));if(0<Math.floor(C)&&C<=P){for(y=0;y<T.length;y++){var S=this.columns[T[y]];S.preferredWidth=S.minimumWordWidth}for(y=0;y<O.length;y++){var N=this.columns[O[y]],E=N.preferredWidth-N.minimumWordWidth;N.preferredWidth=Math.max(N.minimumWordWidth,N.preferredWidth-C*E/P)}}}return void(this.tableWidth=this.getTotalWidth(0))}if(c<=t||c<=e){var I=t<e?e:t;I-=c;for(y=0;y<this.columns.length;y++)"Point"!==(F=this.columns[y]).widthType&&((0===F.preferredWidth||F.preferredWidth<F.minimumWordWidth)&&(F.preferredWidth=F.minimumWordWidth),B=I*((b=0<(b=F.maximumWordWidth-F.preferredWidth)?b:0)/g),F.preferredWidth+=isNaN(B)?0:B)}else{var k=this.getTotalWidth(1),l=this.getTotalWidth(3),s=this.getTotalWidth(2);if(2112<l)for(var M=2112/this.columns.length,y=0;y<this.columns.length;y++)this.columns[y].preferredWidth=M;else{I=0;if(l<e&&1<=e-l&&!p||p&&!o&&e<k||o&&Math.round(x)>Math.round(e)&&a<s||o&&i&&x<k&&Math.round(e)>Math.round(x)&&!d&&k<a)if(!r&&o&&p){if(k<=t||k<=e)for(var V=(t<e?e:t)-k,D=Math.abs(x-k),y=0;y<this.columns.length;y++){(0===(F=this.columns[y]).preferredWidth||F.preferredWidth<F.minimumWordWidth)&&(F.preferredWidth=F.minimumWordWidth);B=V*(F.preferredWidth-F.minimumWordWidth)/D;B=isNaN(B)?0:B,F.preferredWidth=F.minimumWordWidth+B}else if(e<x||x<k){I=e-l;for(var A=[],L=0,y=0;y<this.columns.length;y++){var U=this.columns[y],U=U.minimumWordWidth-U.minimumWidth==0?U.minimumWidth:Math.abs(U.minimumWordWidth-U.minimumWidth);L+=A[y]=U}for(y=0;y<this.columns.length;y++){F=this.columns[y],B=I*A[y]/L;B=isNaN(B)?0:B,F.preferredWidth=(0==F.minimumWidth?1:F.minimumWidth)+B}}}else{I=e-l;for(y=0;y<this.columns.length;y++){var B=I*(F=this.columns[y]).minimumWordWidth/k;B=isNaN(B)?0:B,F.preferredWidth=(0==F.minimumWidth?1:F.minimumWidth)+B}}else if(e<x)for(B=e/x,y=0;y<this.columns.length;y++)(F=this.columns[y]).preferredWidth=F.preferredWidth*B}}}this.tableWidth=this.getTotalWidth(0)},uc.prototype.resizeColumnsToWidestParaWidth=function(){for(var e=this.columns[0],t=0;t<this.columns.length;t++){var i=this.columns[t];i.preferredWidth=i.maximumWordWidth,i.maxParaWidth>e.maxParaWidth&&(e=i)}for(var r=0,t=0;t<this.columns.length;t++)this.columns[t]!==e&&(r+=this.columns[t].preferredWidth);var n=e.maxParaWidth-r;n>e.preferredWidth&&(e.preferredWidth=n),this.tableWidth=this.getTotalWidth(0)},uc.prototype.getValidColumnIndex=function(e){for(var t=0,i=0;i<this.columns.length;i++){var r=this.columns[i];if(i<e)t=r.endOffset;else{if(t!==r.endOffset)break;e++}}return e},uc.prototype.fitColumns=function(e,t,i,r,n,o){G.isNullOrUndefined(n)&&(n=0);var a=this.getTotalWidth(0);if(i&&(a-=n),this.tableWidth=i||o&&t<a?a:t,a!==this.tableWidth)for(var s=this.tableWidth/a,s=isNaN(s)||s==1/0?1:s,l=0;l<this.columns.length;l++){var d,h=this.columns[l];"Percent"===h.widthType&&!i&&!r&&a>this.tableWidth?0!==l&&K.round(h.endOffset,2)>K.round(this.tableWidth,2)&&(d=this.getCellWidth(0,l+1,t))>this.tableWidth&&(h.preferredWidth-=d-this.tableWidth,0===h.preferredWidth||h.preferredWidth<h.minimumWidth)&&(h.preferredWidth=0<h.minimumWidth?h.minimumWidth:1,this.columns[0].preferredWidth-=h.preferredWidth):h.preferredWidth=s*h.preferredWidth}},uc.prototype.getCellWidth=function(e,t,i,r){for(var n=0,o=0;o<t;o++)G.isNullOrUndefined(this.tableColumns[o+e])||(n+=r?K.round(this.tableColumns[o+e].preferredWidth,2):this.tableColumns[o+e].preferredWidth);return n},uc.prototype.validateColumnWidths=function(){for(var e=0;e<this.columns.length;e++)0===e?this.columns[e].preferredWidth!==this.columns[e].endOffset&&(this.columns[e].preferredWidth=this.columns[e].endOffset):this.columns[e-1].endOffset+this.columns[e].preferredWidth<this.columns[e].endOffset&&(0===this.columns[e-1].endOffset?this.columns[e].preferredWidth=this.columns[e].endOffset-this.getPreviousValidOffset(e-2):this.columns[e].preferredWidth=this.columns[e].endOffset-this.columns[e-1].endOffset)},uc.prototype.getPreviousValidOffset=function(e){for(var t=e;0<=t;t--)if(0!==this.columns[t].endOffset)return this.columns[t].endOffset;return 0},uc.prototype.clone=function(){var e=new uc;e.tableWidth=this.tableWidth;for(var t=0;t<this.columns.length;t++)e.columns.push(this.columns[t].clone());return e},uc.prototype.destroy=function(){if(!G.isNullOrUndefined(this.tableColumns))for(var e=0;e<this.tableColumns.length;e++)this.tableColumns[e].destroy();this.tableColumns=[],this.tableColumns=void 0,this.tableWidth=void 0};var pc=uc;function uc(){this.tableColumns=[],this.tableWidth=0}mc.prototype.clone=function(){var e=new mc;return e.preferredWidth=this.preferredWidth,e.minWidth=this.minWidth,e.maxWidth=this.maxWidth,e},mc.prototype.destroy=function(){this.preferredWidth=void 0,this.minWidth=void 0,this.maxWidth=void 0};var fc=mc;function mc(){this.preferredWidth=0,this.minWidth=0,this.maxWidth=0,this.endOffset=0,this.minimumWordWidth=0,this.maximumWordWidth=0,this.maxParaWidth=0,this.minimumWidth=0}function yc(){}function vc(){}var Wc,bc=function(){this.minimumWordWidth=0,this.maximumWordWidth=0,this.maxParaWidth=0,this.minimumWidth=0,this.hasMinimumWidth=!1,this.hasMinimumWordWidth=!1,this.hasMaximumWordWidth=!1},xc=(e(wc,Wc=ie),wc.prototype.clone=function(){var e=Wc.prototype.clone.call(this);return e.breakClearType=this.breakClearType,e},wc.prototype.destroy=function(){this.breakClearType=void 0,Wc.prototype.destroy.call(this)},wc.prototype.componentDestroy=function(){this.breakClearType=void 0,Wc.prototype.componentDestroy.call(this)},wc);function wc(){return Wc.call(this)||this}function Fc(){}e(Tc,Cc=ie),Tc.prototype.getLength=function(){return 1},Tc.prototype.clone=function(){var e=new Tc;return e.characterFormat.copyFormat(this.characterFormat),e.text=this.text,this.margin&&(e.margin=this.margin.clone()),e.baselineOffset=this.baselineOffset,0<this.revisionLength?e.removedIds=H.cloneRevisions(this.getAllRevision()):e.removedIds=this.removedIds.slice(),e.width=this.width,e.height=this.height,this.contentControlProperties&&(e.contentControlProperties=this.contentControlProperties),e};var Cc,Pc=Tc;function Tc(){return null!==Cc&&Cc.apply(this,arguments)||this}Sc.generateNsid=function(){return(Math.floor(373e7*Math.random())+27e7).toString(16).toUpperCase()},Object.defineProperty(Sc.prototype,"abstractListId",{get:function(){return this.abstractListIdIn},set:function(e){this.abstractListIdIn=e},enumerable:!0,configurable:!0}),Sc.prototype.clear=function(){if(!G.isNullOrUndefined(this.levels)){for(var e=0;e<this.levels.length;e++){var t=this.levels[parseInt(e.toString(),10)];t.clearFormat(),this.levels.splice(this.levels.indexOf(t),1),e--}this.levels=[]}},Sc.prototype.destroy=function(){if(!G.isNullOrUndefined(this.levels)){for(var e=0;e<this.levels.length;e++){var t=this.levels[parseInt(e.toString(),10)];t.destroy(),this.levels.splice(this.levels.indexOf(t),1),e--}this.levels=[]}this.levels=void 0},Sc.prototype.clone=function(){for(var e=new Sc,t=0;t<this.levels.length;t++)e.levels.push(this.levels[parseInt(t.toString(),10)].clone(e));return e};var Oc=Sc;function Sc(){this.abstractListIdIn=-1,this.nsid=-1,this.levels=[],this.nsid=parseInt(Sc.generateNsid(),16)}Object.defineProperty(Ic.prototype,"listLevelPattern",{get:function(){return this.getPropertyValue("listLevelPattern")},set:function(e){this.setPropertyValue("listLevelPattern",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"followCharacter",{get:function(){return this.getPropertyValue("followCharacter")},set:function(e){this.setPropertyValue("followCharacter",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"numberAlignment",{get:function(){return this.getPropertyValue("numberAlignment")},set:function(e){this.setPropertyValue("numberAlignment",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"startAt",{get:function(){return this.getPropertyValue("startAt")},set:function(e){this.setPropertyValue("startAt",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"numberFormat",{get:function(){return this.getPropertyValue("numberFormat")},set:function(e){this.setPropertyValue("numberFormat",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"paraStyleName",{get:function(){return this.getPropertyValue("paraStyleName")},set:function(e){this.setPropertyValue("paraStyleName",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"restartLevel",{get:function(){return this.getPropertyValue("restartLevel")},set:function(e){this.setPropertyValue("restartLevel",e)},enumerable:!0,configurable:!0}),Object.defineProperty(Ic.prototype,"isLegalStyleNumbering",{get:function(){return this.getPropertyValue("isLegalStyleNumbering")},set:function(e){this.setPropertyValue("isLegalStyleNumbering",e)},enumerable:!0,configurable:!0}),Ic.prototype.getPropertyValue=function(e){var t=l.getPropertyType(Ic.uniqueFormatType,e);return!G.isNullOrUndefined(this.uniqueListLevel)&&this.uniqueListLevel.propertiesHash.containsKey(t)?this.uniqueListLevel.propertiesHash.get(t):Ic.getPropertyDefaultValue(e)},Ic.prototype.setPropertyValue=function(e,t){var i;!G.isNullOrUndefined(t)&&""!==t||(t=Ic.getPropertyDefaultValue(e)),G.isNullOrUndefined(this.uniqueListLevel)?this.initializeUniqueWListLevel(e,t):(i=l.getPropertyType(this.uniqueListLevel.uniqueFormatType,e),this.uniqueListLevel.propertiesHash.containsKey(i)&&this.uniqueListLevel.propertiesHash.get(i)===t||(this.uniqueListLevel=Ic.uniqueListLevels.updateUniqueFormat(this.uniqueListLevel,e,t)))},Ic.prototype.initializeUniqueWListLevel=function(e,t){var i=new N;this.addUniqueWListLevel("listLevelPattern",e,t,i),this.addUniqueWListLevel("startAt",e,t,i),this.addUniqueWListLevel("followCharacter",e,t,i),this.addUniqueWListLevel("numberFormat",e,t,i),this.addUniqueWListLevel("paraStyleName",e,t,i),this.addUniqueWListLevel("restartLevel",e,t,i),this.addUniqueWListLevel("isLegalStyleNumbering",e,t,i),this.addUniqueWListLevel("numberAlignment",e,t,i),this.uniqueListLevel=Ic.uniqueListLevels.addUniqueFormat(i,Ic.uniqueFormatType)},Ic.prototype.addUniqueWListLevel=function(e,t,i,r){var n=l.getPropertyType(Ic.uniqueFormatType,e);e===t?r.add(n,i):r.add(n,Ic.getPropertyDefaultValue(e))},Ic.getPropertyDefaultValue=function(e){var t=void 0;switch(e){case"listLevelPattern":t="Arabic";break;case"startAt":t=0;break;case"followCharacter":t="Tab";break;case"numberAlignment":t="Left";break;case"paraStyleName":case"numberFormat":t="";break;case"restartLevel":t=0;break;case"isLegalStyleNumbering":t=!1}return t},Ic.prototype.destroy=function(){G.isNullOrUndefined(this.uniqueListLevel)||Ic.uniqueListLevels.remove(this.uniqueListLevel),this.uniqueListLevel=void 0,G.isNullOrUndefined(this.characterFormat)||(this.characterFormat.destroy(),this.characterFormat=void 0),G.isNullOrUndefined(this.paragraphFormat)||(this.paragraphFormat.destroy(),this.paragraphFormat=void 0)},Ic.prototype.clearFormat=function(){G.isNullOrUndefined(this.uniqueListLevel)||Ic.uniqueListLevels.remove(this.uniqueListLevel),this.uniqueListLevel=void 0,this.characterFormat&&this.characterFormat.clearFormat(),this.characterFormat=void 0,this.paragraphFormat&&this.paragraphFormat.clearFormat(),this.paragraphFormat=void 0},Ic.clear=function(){this.uniqueListLevels.clear()},Ic.prototype.clone=function(e){e=new Ic(e);return e.paragraphFormat=this.paragraphFormat.cloneFormat(),e.characterFormat=this.characterFormat.cloneFormat(),this.uniqueListLevel&&(e.uniqueListLevel=this.uniqueListLevel,e.uniqueListLevel.referenceCount++),e},Ic.dotBullet=String.fromCharCode(61623),Ic.squareBullet=String.fromCharCode(61607),Ic.arrowBullet=String.fromCharCode(10148),Ic.circleBullet=String.fromCharCode(61551)+String.fromCharCode(32),Ic.uniqueListLevels=new W,Ic.uniqueFormatType=9;var Nc=Ic;function Ic(e){this.uniqueListLevel=void 0,this.paragraphFormat=void 0,this.characterFormat=void 0,0 instanceof Oc,this.ownerBase=e,this.characterFormat=new ce(void 0),this.paragraphFormat=new vl(void 0)}var kc="Times New Roman",Ac=function(){return(Ac=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},Lc=(Object.defineProperty(F.prototype,"position",{get:function(){return this._position},set:function(e){this._position=e},enumerable:!0,configurable:!0}),Object.defineProperty(F.prototype,"paragraphMark",{get:function(){return"¶"},enumerable:!0,configurable:!0}),Object.defineProperty(F.prototype,"lineBreakMark",{get:function(){return"↲"},enumerable:!0,configurable:!0}),F.prototype.getEnSpaceCharacter=function(){return String.fromCharCode(8194)},F.prototype.repeatChar=function(e,t){for(var i="",r=0;r<t;r++)i+=e;return i},F.prototype.getParagraphMarkWidth=function(e){return this.getParagraphMarkSize(e).Width},F.prototype.getParagraphMarkSize=function(e){var t,i=this.getFormatText(e);return this.paragraphMarkInfo[""+i]||(t={Width:this.getWidth(this.paragraphMark,e),Height:(t=this.getHeight(e)).Height,BaselineOffset:t.BaselineOffset},e.hidden?t:this.paragraphMarkInfo[""+i]=t)},F.prototype.getTextSize=function(e,t){var i=0,r=t.bidi||this.isRTLText(e.text),r=this.setText(e.text,r,t.bdo),n=("\r"===r&&(r=String.fromCharCode(182)),e.nextElement),i=n&&e.scriptType!==j.FontScriptType.Hebrew&&this.documentHelper.layout.checkFormatToCombineText(e.characterFormat,n.characterFormat)&&!K.startsWith(e.text," ")&&!K.endsWith(n.text)&&e.characterFormat.bidi&&n.characterFormat.bidi&&e.characterRange===j.CharacterRangeType.RightToLeft&&n.characterRange===j.CharacterRangeType.RightToLeft?this.getWidthWithZWJ(r+="‍","‍",n.text,t,e.scriptType):this.getWidth(r,t,e.scriptType),n=(e.width=i,this.getHeight(t,e.scriptType));return"Word2003"===this.documentHelper.compatibilityMode&&e.isColumnBreak||(e.height=n.Height),e.baselineOffset=n.BaselineOffset," "===e.text[e.text.length-1]&&(i=this.getWidth(K.trimEnd(e.text),t,e.scriptType)),e.trimEndWidth=i},F.prototype.getHeight=function(e,t){var t=this.getFontNameToRender(t,e),i=this.getFormatText(e,t);return G.isNullOrUndefined(this.documentHelper.heightInfoCollection[""+i])?(t=this.documentHelper.textMeasureHelper.getHeightInternal(e,t),this.documentHelper.heightInfoCollection[""+i]=Ac({},t),e.hidden&&(t.Height=0),t):e.hidden?((t=Ac({},this.documentHelper.heightInfoCollection[""+i])).Height&&(t.Height=0),t):this.documentHelper.heightInfoCollection[""+i]},F.prototype.getFormatText=function(e,t){var i="",i=(G.isNullOrUndefined(t)?e.fontFamily:t).toLocaleLowerCase(),t=e.bidi||e.complexScript;return i+=";"+(t?e.fontSizeBidi:e.fontSize),(t?e.boldBidi:e.bold)&&(i+=";bold"),(t?e.italicBidi:e.italic)&&(i+=";italic"),i},F.prototype.measureTextExcludingSpaceAtEnd=function(e,t,i){return this.getWidth(K.trimEnd(e),t,i)},F.prototype.getWidth=function(e,t,i){if(t.hidden)return 0;e.match("\v")&&e.replace("\v",this.lineBreakMark);var r=t.bidi||t.complexScript,n=r?t.fontSizeBidi:t.fontSize,o=r?t.boldBidi?"bold":"":t.bold?"bold":"",r=r?t.italicBidi?"italic":"":t.italic?"italic":"",i=this.getFontNameToRender(i,t),n=0===n?.5:n/("Normal"===t.baselineAlignment?1:1.5),o=(this.context.font=o+" "+r+" "+n+'pt "'+i+'"',this.context.letterSpacing=t.characterSpacing+"pt",this.context.fontKerning="auto",!t.isKernFont&&/(?:AV|VA|AW|WA|To|Ta|Te|Ty|Yo)/.test(e)&&(this.context.fontKerning="none"),t.scaling/100);return"̶"===(e=t.allCaps?e.toUpperCase():e)&&(e+="A"),Math.abs(this.context.measureText(e).width*o)},F.prototype.getWidthWithZWJ=function(e,t,i,r,n){return r.hidden?0:this.getWidth(e+t+i,r,n)-this.getWidth(i,r,n)},F.prototype.setText=function(e,t,i,r){return G.isNullOrUndefined(r)&&(r=!1),G.isNullOrUndefined(e)||0!==e.length?(!(t=t)&&"RTL"===i||t&&"LTR"===i?e=K.reverseString(e):r&&t&&K.endsWith(e)&&(i=e.length-K.trimEnd(e).length,e=K.addSpace(i)+K.trimEnd(e)),e):""},F.prototype.measureText=function(e,t,i){e=this.getWidth(e,t,i),t=this.getHeight(t,i);return{Width:e,Height:t.Height,BaselineOffset:t.BaselineOffset}},F.prototype.updateTextSize=function(e,t){var i,r,n,o,a;e.characterFormat.hidden&&0===t.height||(i=new ce(void 0,this.documentHelper),o=e.listLevel.characterFormat,t=t.characterFormat,i.fontSize=(o.hasValue("fontSize")?o:t).fontSize,i.fontFamily=(o.hasValue("fontFamily")?o:t).fontFamily,n=r="",a=("Normal"===o.baselineAlignment?t:o).baselineAlignment,r=o.hasValue("bold")?o.bold?"bold":"":t.bold?"bold":"",n=o.hasValue("italic")?o.italic?"italic":"":t.italic?"italic":"",i.baselineAlignment=a,r&&(i.bold=!0),n&&(i.italic=!0),o=i.bidi||this.isRTLText(e.text),t=this.setText(e.text,o,i.bdo),e.width=this.getWidth(t,i),a=this.getHeight(i),e.height=a.Height,e.baselineOffset=a.BaselineOffset,i.destroy())},F.prototype.containsSpecialCharAlone=function(e){for(var t=0;t<e.length;t++)if(-1==="*|.:[]{}-`;()@&$#%!~?, '".indexOf(e.charAt(t)))return!1;return!0},F.prototype.containsNumberAlone=function(e){if(""===e)return!1;for(var t=0;t<e.length;t++)if(-1==="0123456789".indexOf(e.charAt(t)))return!1;return!0},F.prototype.containsCombinationText=function(e){return!(!e.text.match(/^[0-9]+$/)||!e.paragraph.bidi)},F.prototype.inverseCharacter=function(e){if(G.isNullOrUndefined(e)||0===e.length)return e;if(1===e.length)switch(e){case"(":return")";case")":return"(";case"<":return">";case">":return"<";case"{":return"}";case"}":return"{";case"[":return"]";case"]":return"[";default:return e}for(var t=!0,i=0;i<e.length;i++)if(!this.isWordSplitChar(e[i])){t=!1;break}if(!t)return e;for(var r="",i=e.length-1;0<=i;i--)r+=this.inverseCharacter(e[i]);return r},F.prototype.containsSpecialChar=function(e){for(var t=0;t<e.length;t++)if(-1!=="*|.:[]{}-`;()@&$#%!~? ".indexOf(e.charAt(t)))return!0;return!1},F.prototype.isRTLText=function(e){var t=!1;if(!G.isNullOrUndefined(e))for(var i=0;i<e.length;i++){var r=e[i];if(r>=String.fromCharCode(1424)&&r<=String.fromCharCode(1535)||r>=String.fromCharCode(64285)&&r<=String.fromCharCode(64335)||r>=String.fromCharCode(1536)&&r<=String.fromCharCode(1791)||r>=String.fromCharCode(1872)&&r<=String.fromCharCode(1919)||r>=String.fromCharCode(2208)&&r<=String.fromCharCode(2303)||r>=String.fromCharCode(64336)&&r<=String.fromCharCode(65023)||r>=String.fromCharCode(65136)&&r<=String.fromCharCode(65279)||r>=String.fromCharCode(43392)&&r<=String.fromCharCode(43487)||r>=String.fromCharCode(1792)&&r<=String.fromCharCode(1871)||r>=String.fromCharCode(1920)&&r<=String.fromCharCode(1983)||r>=String.fromCharCode(2112)&&r<=String.fromCharCode(2143)||r>=String.fromCharCode(1984)&&r<=String.fromCharCode(2047)||r>=String.fromCharCode(2048)&&r<=String.fromCharCode(2111)||r>=String.fromCharCode(11568)&&r<=String.fromCharCode(11647)){t=!0;break}}return t},F.prototype.isUnicodeText=function(e,t,i){void 0===i&&(i=!1);var r=!1;if(!G.isNullOrUndefined(e))for(var n=0;n<e.length;n++){var o=e[n];if((" "<=o&&o<="ヿ"||"＀"<=o&&o<="￯"||"一"<=o&&o<="龯"||"㐀"<=o&&o<="䶿"||"가"<=o&&o<="￯"&&!("ﹰ"<=o&&o<="\ufeff")||"඀"<=o&&o<="෿"||i&&("֐"<=o&&o<="׿"||"Ѐ"<=o&&o<="ӿ"||"À"<=o&&o<="ÿ"||"Ā"<=o&&o<="ſ"||"ƀ"<=o&&o<="ɏ"||"Ḁ"<=o&&o<="ỿ"||"฀"<=o&&o<="๿"||"؀"<=o&&o<="ۿ"))&&(i||0!==t)){r=!0;break}}return r},F.prototype.readWord=function(e,t,i,r,n){for(var o,a=this._position,s=e.length,l="";a<s;){var d=!1,h=(l=e[a]).charCodeAt(0);switch((" "===l||"‌"===l||" "===l&&!i||n&&19968<=h&&h<=40959)&&(d=!0),"/"!==l&&"."!==l&&","!==l&&"="!==l&&"*"!==l&&"«"!==l&&"»"!==l&&"?"!==l&&">"!==l&&"<"!==l||n||r||(d=!0),l){case" ":case"\t":case"\n":case"\r":case"\v":case"\f":case"\\":case":":case"-":d=!0}if(d){if(" "===l&&a<K.trimEnd(e).length&&this.isTextContainsNonBreakingSpaceCharacter(e)&&this.isNonBreakingCharacterCombinedWithSpace(e,a)){a++;continue}a!==this._position&&"-"!==l||a++;h=e.substring(this._position,a);return this._position=a,h}var h=this.getElementBoxOfChar(a,t);if(this.isUnicodeText(l,h.scriptType,!n))if(a===this._position&&a++,a>this._position)return h=e.substring(this._position,a),this._position=a,h;a++}return a>this._position?(o=e.substring(this._position,a),this._position=a,o):""},F.prototype.getElementBoxOfChar=function(e,t){for(var i=t.keys,r=t.values,n=0,o=r.length-1;n<=o;){var a=Math.floor((n+o)/2),s=r[a],l=i[a];if(s<=e&&e<s+l.text.length)return l;e<s?o=a-1:n=a+1}},F.prototype.isTextContainsNonBreakingSpaceCharacter=function(e){return("Word2013"===this.documentHelper.compatibilityMode||"Word2010"===this.documentHelper.compatibilityMode)&&0<=e.indexOf(" ")},F.prototype.isNonBreakingCharacterCombinedWithSpace=function(e,t){for(var i=t+1;i<e.length;i++){if(" "==e[i])return!0;if(" "!=e[i])break}for(i=t-1;0<=i;i--){if(" "==e[i])return!0;if(" "!=e[i])return!1}return!1},F.prototype.getRtlLanguage=function(e){return G.isNullOrUndefined(e)||""===e?{isRtl:!1,id:0}:e>=String.fromCharCode(1424)&&e<=String.fromCharCode(1535)?{isRtl:!0,id:1}:e>=String.fromCharCode(1536)&&e<=String.fromCharCode(1791)||e>=String.fromCharCode(1872)&&e<=String.fromCharCode(1919)||e>=String.fromCharCode(2208)&&e<=String.fromCharCode(2303)||e>=String.fromCharCode(64336)&&e<=String.fromCharCode(65023)||e>=String.fromCharCode(65136)&&e<=String.fromCharCode(65279)?{isRtl:!0,id:2}:e>=String.fromCharCode(43392)&&e<=String.fromCharCode(43487)?{isRtl:!0,id:3}:e>=String.fromCharCode(1792)&&e<=String.fromCharCode(1871)?{isRtl:!0,id:4}:e>=String.fromCharCode(1920)&&e<=String.fromCharCode(1983)?{isRtl:!0,id:5}:e>=String.fromCharCode(2112)&&e<=String.fromCharCode(2143)?{isRtl:!0,id:6}:e>=String.fromCharCode(1984)&&e<=String.fromCharCode(2047)?{isRtl:!0,id:7}:e>=String.fromCharCode(2048)&&e<=String.fromCharCode(2111)?{isRtl:!0,id:8}:e>=String.fromCharCode(11568)&&e<=String.fromCharCode(11647)?{isRtl:!0,id:9}:{isRtl:!1,id:0}},F.prototype.splitTextByConsecutiveLtrAndRtl=function(e,t,i,r,n,o,a,s){var l=r.length,d=[];if(!G.isNullOrUndefined(e)&&""!==e){for(var h=-1,c="",g="",p="",u="",f=!G.isNullOrUndefined(s)&&s.value,m=function(e){return f&&"-"===e},y=!G.isNullOrUndefined(n.value)&&n.value&&t&&/^\d+(\.\d+)+$/.test(e),v=0;v<e.length;v++){var W=0,b=!1;(G.isNullOrUndefined(n.value)?t:!n.value||!G.isNullOrUndefined(a.value)&&!a.value&&t&&!y)&&this.isNumber(e[v])?(u+=e[v],W=4):this.isWordSplitChar(e[v])?(W=2,b=t||32==e.charCodeAt(v)&&""==p,p+=e[v]):this.isRTLText(e[v])&&!this.isNumber(e[v])?(n.value=!1,o.value=!0,G.isNullOrUndefined(s)||(s.value=/[\u0590-\u05FF\uFB1D-\uFB4F]/.test(e[v])),g+=e[v],W=1):(n.value=!0,a.value=t,c+=e[v]),""!=u&&4!=W&&(d.push(u),r.push(j.CharacterRangeType.Number),u=""),""!=g&&1!=W&&(d.push(g),r.push(j.CharacterRangeType.RightToLeft),g=""),""!=c&&0!=W&&(d.push(c),h=d.length-1,r.push(j.CharacterRangeType.LeftToRight),c=""),""==p||2==W&&!b||(d.push(p),r.push(j.CharacterRangeType.WordSplit),p="")}if(""!=u?(d.push(u),r.push(j.CharacterRangeType.Number)):""!=g?(d.push(g),r.push(j.CharacterRangeType.RightToLeft)):""!=c?(d.push(c),h=d.length-1,r.push(j.CharacterRangeType.LeftToRight)):""!=p&&(d.push(p),r.push(j.CharacterRangeType.WordSplit)),o.value||!G.isNullOrUndefined(n.value)&&!n.value)for(v=1;v<d.length;v++)(w=r[v+l])==j.CharacterRangeType.WordSplit&&1==d[v].length&&v+l+1<r.length&&r[v+l-1]!=j.CharacterRangeType.WordSplit&&(r[v+l-1]!=j.CharacterRangeType.Number||F.isNumberNonReversingCharacter(d[v],t)||m(d[v]))&&r[v+l-1]==r[v+l+1]&&(d[v-1]=d[v-1]+d[v]+d[v+1],d.splice(v,1),d.splice(v,1),r.splice(v+l,1),r.splice(v+l,1),v--);else if(-1!=h)if(t){for(v=1;v<h;v++)if((w=r[v+l])==j.CharacterRangeType.WordSplit&&v<h&&r[v+l-1]==j.CharacterRangeType.LeftToRight){for(var c="",x=v+1;x<=h;x++)c+=d[x],d.splice(x,1),r.splice(x+l,1),x--,h--;d[v-1]=d[v-1]+d[v]+c,d.splice(v,1),r.splice(v+l,1),v--,h--}}else d.length=0,d.push(e);else t||(d.length=0,d.push(e));if(t)for(var w,v=1;v<d.length;v++)(w=r[v+l])==j.CharacterRangeType.WordSplit&&1==d[v].length&&v+l+1<r.length&&r[v+l-1]!=j.CharacterRangeType.WordSplit&&(r[v+l-1]!=j.CharacterRangeType.Number||F.isNumberNonReversingCharacter(d[v],t)||!i||m(d[v]))&&r[v+l-1]==r[v+l+1]?(d[v-1]=d[v-1]+d[v]+d[v+1],d.splice(v,1),d.splice(v,1),r.splice(v+l,1),r.splice(v+l,1),v--):w==j.CharacterRangeType.WordSplit&&r[v+l-1]==j.CharacterRangeType.Number&&this.isNonWordSplitCharacter(d[v])&&!i?(d[v-1]=d[v-1]+d[v],d.splice(v,1),r.splice(v+l,1),v--):w!=j.CharacterRangeType.LeftToRight||f&&/\d-\d$/.test(d[v-1])||r[v+l-1]!=j.CharacterRangeType.Number&&r[v+l-1]!=j.CharacterRangeType.LeftToRight||(d[v-1]=d[v-1]+d[v],r[v+l-1]=j.CharacterRangeType.LeftToRight,d.splice(v,1),r.splice(v+l,1),v--)}return d},F.prototype.isRightToLeftLanguage=function(e){return 14337==e||15361==e||5121==e||3073==e||2049==e||11265==e||13313==e||12289==e||4097==e||8193==e||16385==e||1025==e||10241==e||7169==e||9217==e||10655==e},F.prototype.isNumber=function(e){return!isNaN(parseInt(e,10))||e>=String.fromCharCode(1632)&&e<=String.fromCharCode(1641)||e>=String.fromCharCode(1776)&&e<=String.fromCharCode(1785)},F.prototype.isWordSplitChar=function(e){for(var t=0;t<F.wordSplitCharacters.length;t++)if(F.wordSplitCharacters[t]===e)return!0;return!1},F.isNumberNonReversingCharacter=function(e,t){for(var i=0;i<F.numberNonReversingCharacters.length;i++){var r=F.numberNonReversingCharacters[i];if(e[0]==r&&(47!=r.charCodeAt(0)||!t))return!0}return!1},F.prototype.isNonWordSplitCharacter=function(e){for(var t=!1,i=0;i<e.length;i++){var r=e.charCodeAt(i);if(35!=r&&36!=r&&37!=r){t=!1;break}t=!0}return t},F.prototype.getFontNameToRender=function(e,t){return G.isNullOrUndefined(e)?t.fontFamily:t.bidi||t.complexScript?this.getFontNameBidiToRender(e,t):(this.isEastAsiaScript(e)||"EastAsia"===t.fontHintType&&e===j.FontScriptType.SpecialCharacter)&&!G.isNullOrUndefined(t.fontFamilyFarEast)?this.getFontNameEAToRender(e,t):this.getFontNameAsciiToRender(e,t)},F.prototype.isEastAsiaScript=function(e){return e==j.FontScriptType.Japanese||e==j.FontScriptType.Korean||e==j.FontScriptType.Chinese},F.prototype.getFontNameEAToRender=function(e,t){var i=t.fontFamilyFarEast;return G.isNullOrUndefined(i)||K.isThemeFont(i)?this.getFontNameFromTheme(t,i,e,"EastAsia"):i},F.prototype.getFontNameAsciiToRender=function(e,t){var i=t.fontFamilyAscii;return K.isThemeFont(i)?this.getFontNameFromTheme(t,i,e,"Default"):t.fontFamily},F.prototype.getFontNameBidiToRender=function(e,t){var i=t.fontFamilyBidi;return!G.isNullOrUndefined(i)||K.isThemeFont(i)?this.getFontNameFromTheme(t,i,e,"CS"):i},F.prototype.getFontNameFromTheme=function(e,t,i,r){var n,o;return!this.documentHelper.hasThemes||G.isNullOrUndefined(this.documentHelper.themes)||G.isUndefined(this.documentHelper.themes.fontScheme)||(n=this.documentHelper.themes.fontScheme),"majorAscii"==t||"majorBidi"==t||"majorEastAsia"==t||"majorHAnsi"==t?(o=void 0,null!=n&&null!=n.majorFontScheme&&(o=n.majorFontScheme),t=this.updateFontNameFromTheme(e,o,i,t,r)):"minorAscii"!=t&&"minorBidi"!=t&&"minorEastAsia"!=t&&"minorHAnsi"!=t||(o=void 0,null!=n&&null!=n.majorFontScheme&&(o=n.minorFontScheme),t=this.updateFontNameFromTheme(e,o,i,t,r)),t=G.isNullOrUndefined(t)||K.isThemeFont(t)?kc:t},F.prototype.updateFontNameFromTheme=function(e,t,i,r,n){var o="";if(null!=t&&null!=t.fontSchemeList&&0<t.fontSchemeList.length&&t.fontSchemeList.forEach(function(e){("cs"!=e.name||"majorBidi"!=r&&"minorBidi"!=r)&&("ea"!=e.name||"majorEastAsia"!=r&&"minorEastAsia"!=r)&&("latin"!=e.name||"majorAscii"!=r&&"majorHAnsi"!=r&&"minorAscii"!=r&&"minorHAnsi"!=r)||(o=e.typeface)}),null!=t&&null!=t.fontTypeface)if("CS"==n)(e.complexScript||e.bidi||"majorAscii"!==r&&"majorHAnsi"!==r&&"minorAscii"!==r&&"minorHAnsi"!==r)&&(!e.bidi||"majorHAnsi"!==r&&"minorHAnsi"!==r)?t.fontTypeface.containsKey("Arab")&&(o=t.fontTypeface.get("Arab")):r=o;else if("EastAsia"==n)G.isNullOrUndefined(this.documentHelper.themeFontLanguage)||(r=this.getFontNameWithFontScript(t,this.documentHelper.themeFontLanguage.localeIdFarEast,n),G.isNullOrUndefined(r))||(o=r);else if(G.isNullOrUndefined(o)&&!G.isNullOrUndefined(this.documentHelper.themeFontLanguage)&&("minorBidi"===r||"majorBidi"===r))return r=this.getFontNameWithFontScript(t,this.documentHelper.themeFontLanguage.localeIdBidi,n);return G.isNullOrUndefined(o)&&(o=kc),r=o},F.prototype.getFontNameWithFontScript=function(e,t,i){var r=null,n=t.toString(),e=e.fontTypeface;return("gu_IN"!=n&&1095!=t||!e.containsKey("Gujr"))&&("hi_IN"!=n&&"mr_IN"!=n&&1081!=t&&1102!=t||!e.containsKey("Deva"))&&("ko_KR"!=n&&1042!=t||!e.containsKey("Hang"))?"zh_CN"!=n&&"zh_SG"!=n&&2052!=t||!e.containsKey("Hans")?("zh_TW"!=n&&"zh_HK"!=n&&"zh_MO"!=n||!e.containsKey("Hant"))&&!(("ja_JP"==n||1041==t)&&e.containsKey("Jpan")||("ta_IN"==n||1097==t)&&e.containsKey("Taml")||("te_IN"==n||1098==t)&&e.containsKey("Telu")||("he_IL"==n||"yi_Hebr"==n||1037==t)&&e.containsKey("Hebr"))?"th_TH"!=n&&1054!=t||!e.containsKey("Thai")?"CS"==i&&e.containsKey("Arab")&&(r=e.get("Arab")):r=e.get("Thai"):r=e.get("Arab"):r=e.get("Hans"):r=e.get("Arab"),r},F.prototype.destroy=function(){this.documentHelper=void 0,this.context=void 0,this.paragraphMarkInfo={},this.paragraphMarkInfo=void 0},F.wordSplitCharacters=[String.fromCharCode(32),String.fromCharCode(33),String.fromCharCode(34),String.fromCharCode(35),String.fromCharCode(36),String.fromCharCode(37),String.fromCharCode(38),String.fromCharCode(39),String.fromCharCode(40),String.fromCharCode(41),String.fromCharCode(42),String.fromCharCode(43),String.fromCharCode(44),String.fromCharCode(45),String.fromCharCode(46),String.fromCharCode(47),String.fromCharCode(58),String.fromCharCode(59),String.fromCharCode(60),String.fromCharCode(61),String.fromCharCode(62),String.fromCharCode(63),String.fromCharCode(64),String.fromCharCode(91),String.fromCharCode(92),String.fromCharCode(93),String.fromCharCode(94),String.fromCharCode(95),String.fromCharCode(96),String.fromCharCode(123),String.fromCharCode(124),String.fromCharCode(125),String.fromCharCode(126),String.fromCharCode(1548),String.fromCharCode(1563),String.fromCharCode(8211),String.fromCharCode(8212),String.fromCharCode(8216),String.fromCharCode(8217),String.fromCharCode(8221),String.fromCharCode(12288),String.fromCharCode(8207),String.fromCharCode(169),String.fromCharCode(160)],F.numberNonReversingCharacters=[String.fromCharCode(44),String.fromCharCode(46),String.fromCharCode(47),String.fromCharCode(58),String.fromCharCode(1548)],F);function F(e){this.paragraphMarkInfo={},this._position=0,this.documentHelper=e;e=document.createElement("canvas").getContext("2d");if(!e)throw new Error("Failed to get 2D context");this.context=e}var Uc=function(o,a,s,l){return new(s=s||Promise)(function(e,t){function i(e){try{n(l.next(e))}catch(e){t(e)}}function r(e){try{n(l.throw(e))}catch(e){t(e)}}function n(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(i,r)}n((l=l.apply(o,a||[])).next())})},Bc=function(r,n){var o,a,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(i){return function(e){var t=[i,e];if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,a=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=n.call(r,l)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Hc=1.4,Rc=(Object.defineProperty(t.prototype,"owner",{get:function(){if(this.documentHelper)return this.documentHelper},enumerable:!0,configurable:!0}),t.prototype.isSameStyle=function(e,t){var i=void 0;if(t?e.nextWidget instanceof Z&&(i=e.nextWidget):e.previousWidget instanceof Z&&(i=e.previousWidget),G.isNullOrUndefined(i)){if(e.paragraphFormat.contextualSpacing&&e.isInsideTable&&(!this.documentHelper.allowSpaceOfSameStyleInTable||"Word2013"===this.documentHelper.compatibilityMode))if(0===e.index)i=this.updateFirstParagraphSpacingBasedOnContextualSpacing(e,t);else if(e.index===e.associatedCell.childWidgets.length-1&&(i=this.updateLastParagraphSpacingBasedOnContextualSpacing(e))===e)return!0;if(G.isNullOrUndefined(i))return!1}if(!(i instanceof Z&&e.paragraphFormat.baseStyle===i.paragraphFormat.baseStyle)||e.isInsideTable&&this.documentHelper.allowSpaceOfSameStyleInTable)return!1;if(0<=e.paragraphFormat.listFormat.listId&&0<=i.paragraphFormat.listFormat.listId&&!e.paragraphFormat.contextualSpacing){if(t&&e.paragraphFormat.spaceAfterAuto)return!0;if(!t&&e.paragraphFormat.spaceBeforeAuto)return!0}return e.paragraphFormat.contextualSpacing},t.prototype.updateFirstParagraphSpacingBasedOnContextualSpacing=function(e,t){var i,r=e.associatedCell,n=r.ownerRow,o=n.ownerTable;if(t){if(i=G.isNullOrUndefined(e.nextRenderedWidget)?G.isNullOrUndefined(r.nextRenderedWidget)?void 0:r.nextRenderedWidget.firstChild:e.nextRenderedWidget,r.index===n.childWidgets.length-1&&e.index===r.childWidgets.length-1&&"Normal"===e.paragraphFormat.baseStyle.name&&e.paragraphFormat.listFormat.listId<0)return e}else i=G.isNullOrUndefined(e.previousRenderedWidget)?G.isNullOrUndefined(r.previousRenderedWidget)?void 0:r.previousRenderedWidget.firstChild:e.previousRenderedWidget;if(0===r.index&&0===e.index){if(0!==n.index)return G.isNullOrUndefined(i)&&"Normal"===e.paragraphFormat.baseStyle.name&&e.paragraphFormat.listFormat.listId<0?e:i;if(!o.isInsideTable||0!=o.index)return G.isNullOrUndefined(e.nextRenderedWidget)&&!G.isNullOrUndefined(r.nextRenderedWidget)&&0<r.nextRenderedWidget.childWidgets.length&&r.nextRenderedWidget.firstChild instanceof Z?r.nextRenderedWidget.firstChild:r.index===n.childWidgets.length-1&&e.index===r.childWidgets.length-1&&"Normal"===e.paragraphFormat.baseStyle.name&&e.paragraphFormat.listFormat.listId<0?e:o.previousRenderedWidget;i=this.checkOwnerTablePrevItem(o,e)}else if(0===e.index&&!t){o=n.childWidgets[r.index-1];if(o.childWidgets[o.childWidgets.length-1]instanceof Q&&"Normal"===e.paragraphFormat.baseStyle.name&&e.paragraphFormat.listFormat.listId<0)return e}return i},t.prototype.updateLastParagraphSpacingBasedOnContextualSpacing=function(e){var t,i=e.associatedCell,r=i.ownerRow;if(i.index===r.childWidgets.length-1&&e.index===i.childWidgets.length-1){if("Normal"===e.paragraphFormat.baseStyle.name&&e.paragraphFormat.listFormat.listId<0)return e}else if(e.index===i.childWidgets.length-1){e=r.childWidgets[i.index+1];for(G.isNullOrUndefined(e)||G.isNullOrUndefined(e.firstChild)||(t=e.firstChild);t instanceof Q;)t=t.childWidgets[0].childWidgets[0].childWidgets[0]}return t},t.prototype.checkOwnerTablePrevItem=function(e,t){e=e.associatedCell.ownerRow;if(0<e.index){if("Normal"===t.paragraphFormat.baseStyle.name&&t.paragraphFormat.listFormat.listId<0)return t}else{if(!e.ownerTable.isInsideTable||0!==e.ownerTable.index)return e.ownerTable.previousRenderedWidget;this.checkOwnerTablePrevItem(e.ownerTable,t)}},Object.defineProperty(t.prototype,"viewer",{get:function(){return this.documentHelper.viewer},enumerable:!0,configurable:!0}),t.prototype.layout=function(){},t.prototype.destroy=function(){this.documentHelper=void 0,this.value=void 0,this.allowLayout=void 0,this.isInitialLoad=void 0,this.fieldBegin=void 0,this.maxTextHeight=void 0,this.maxBaseline=void 0,this.maxTextBaseline=void 0,this.isSkipFirstLineIndent=void 0,this.isFieldCode=void 0,this.footnoteHeight=void 0,this.isMultiColumnDoc=void 0,this.isIFfield=void 0,this.isPastingContent=void 0},t.prototype.layoutItems=function(w,e,F,C){function t(){return Uc(i,void 0,void 0,function(){var t,i,r,n,o,a,s,l,d,h,c,g,p,u,f,m,y,v,W,b,x;return Bc(this,function(e){switch(e.label){case 0:x=r=i=0,e.label=1;case 1:if(!(x<w.length))return[3,6];if(n=w[x],this.documentHelper.enableLayout)return[3,2];if(this.viewer.createNewPage(n),o=this.documentHelper.headersFooters[n.index])for(a in o)o.hasOwnProperty(a)&&((s=o[a]).page=n.page,s.headerSectionIndex=n.index);return[3,5];case 2:if(1<n.sectionFormat.numberOfColumns&&(this.isMultiColumnDoc=!0),l=w[x+1],this.viewer.columnLayoutArea.setColumns(n.sectionFormat),d=this.documentHelper.pages[this.documentHelper.pages.length-1],p=void 0,G.isNullOrUndefined(d)||G.isNullOrUndefined(d.bodyWidgets[d.bodyWidgets.length-1])||0!==d.bodyWidgets[d.bodyWidgets.length-1].childWidgets.length||G.isNullOrUndefined(d.bodyWidgets[d.bodyWidgets.length-1].previousSplitWidget)||(p=d.bodyWidgets[d.bodyWidgets.length-1].previousSplitWidget),!(0<x)||G.isNullOrUndefined(p)||G.isNullOrUndefined(p.lastChild)||p.lastChild instanceof Q||(p=p.lastChild,g=p.previousRenderedWidget,p instanceof Z&&p.isSectionBreak&&g instanceof Z&&g.isEndsWithPageBreak&&(p=g),"Word2013"===this.documentHelper.compatibilityMode&&(p.isEndsWithPageBreak||p.isEndsWithColumnBreak)&&0===d.bodyWidgets[0].childWidgets.length&&(this.documentHelper.pages.splice(this.documentHelper.pages.length-1,1)[0].destroy(),d=this.documentHelper.pages[this.documentHelper.pages.length-1])),p=n.sectionFormat.breakCode,h=void 0,0!==x&&"Word2010"===this.documentHelper.compatibilityMode&&"NewColumn"===p&&(c=w[x-1].getSplitWidgets(),1<(h=c[c.length-1]).sectionFormat.columns.length)&&1<n.sectionFormat.columns.length&&h.sectionFormat.columns.length===n.sectionFormat.columns.length&&h.sectionFormat.columns.length-1!==h.columnIndex&&!(h.lastChild instanceof Z&&h.lastChild.isEndsWithPageBreak)&&(c=this.viewer.columnLayoutArea.getNextColumnByBodyWidget(h),G.isNullOrUndefined(c)||(n.columnIndex=c.index,n.isWord2010NextColumn=!0,n.y=h.y,this.viewer.clientActiveArea.height-=n.y-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=n.y)),n.isWord2010NextColumn||"NoBreak"===p||(p="NewPage"),c=void 0,0!==x&&(c=d.bodyWidgets[d.bodyWidgets.length-1].lastChild)&&(g=c.previousRenderedWidget,c instanceof Z)&&c.isSectionBreak&&g instanceof Z&&(c=g),0===x&&!F||0!==x&&!n.isWord2010NextColumn&&(G.isNullOrUndefined(p)||"NewPage"===p||i!==n.sectionFormat.pageHeight||r!==n.sectionFormat.pageWidth||!G.isNullOrUndefined(c)&&c.isEndsWithPageBreak)?t=this.viewer.createNewPage(n):(p=this.documentHelper.viewer.clientActiveArea.y,u=this.documentHelper.viewer.clientActiveArea.height,F&&(W=this.getBodyWidget(d.bodyWidgets[d.bodyWidgets.length-1],!0),b=this.getNextWidgetHeight(W),this.viewer.updateClientArea(W,W.page),u=this.viewer.clientActiveArea.height-(b-this.viewer.clientActiveArea.y),p=b,F=!1),(t=d).bodyWidgets.push(n),t.bodyWidgets[t.bodyWidgets.length-1].page=t,this.documentHelper.viewer.updateClientArea(n,t),this.documentHelper.viewer.clientActiveArea.y=p,this.documentHelper.viewer.clientActiveArea.height=u),i=n.sectionFormat.pageHeight,r=n.sectionFormat.pageWidth,this.addBodyWidget(this.viewer.clientActiveArea,n),1<this.documentHelper.pages.length){for(m=f=0;m<this.documentHelper.pages.length&&(y=this.documentHelper.pages[m],v=y.sectionIndex,!(n.index<v||y===t));m++)f++;f<this.documentHelper.pages.length-1&&this.documentHelper.insertPage(f,t)}return(W=this.layoutSection(n,0,l,C))instanceof Promise?[4,W]:[3,4];case 3:e.sent(),e.label=4;case 4:n.isWord2010NextColumn&&!G.isNullOrUndefined(h)&&(b=this.getNextWidgetHeight(h),this.viewer.clientActiveArea.y<b)&&(this.viewer.updateClientArea(h,h.page),this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.height-(b-this.viewer.clientActiveArea.y),this.viewer.clientActiveArea.y=b),e.label=5;case 5:return x++,[3,1];case 6:if(this.documentHelper.enableLayout)this.updateFieldElements();else if("Pages"===this.documentHelper.layoutType)for(x=0;x<this.documentHelper.footnoteCollection.length;x++)this.layoutFootEndNoteElement(this.documentHelper.footnoteCollection[x]);return"Pages"===this.documentHelper.layoutType&&this.layoutEndNoteElement(),[2]}})})}var i=this;if(C)return t();t()},t.prototype.shouldScrollUpdateIn=function(){var e=this.documentHelper.pages.length,t=this.owner.documentEditorSettings.openAsyncSettings,i=G.isNullOrUndefined(t.initialPageLoadCount)||t.initialPageLoadCount<0?3:t.initialPageLoadCount,t=G.isNullOrUndefined(t.incrementalPageLoadCount)||t.incrementalPageLoadCount<0?5:t.incrementalPageLoadCount;return(e===i||i<e&&(e-i)%t==0)&&e!==this.lastScrollUpdatePageIndex&&(this.lastScrollUpdatePageIndex=e,!0)},t.prototype.layoutSection=function(a,s,l,d){function i(){return Uc(e,void 0,void 0,function(){var t,i,r,n,o=this;return Bc(this,function(e){switch(e.label){case 0:return c?(!this.isLayoutWhole&&c instanceof Q&&"Auto"===c.tableFormat.preferredWidthType&&!c.tableFormat.allowAutoFit&&c.calculateGrid(),G.isNullOrUndefined(c)?[3,4]:(this.viewer.updateClientAreaForBlock(c,!0,void 0,!0,!0),(t=this.layoutBlock(c,s,void 0,d))instanceof Promise?[4,t]:[3,2])):[3,7];case 1:return h=e.sent(),[3,3];case 2:h=t,e.label=3;case 3:s=0,this.viewer.updateClientAreaForBlock(c,!1),c=h,e.label=4;case 4:return d?this.shouldScrollUpdateIn()?(this.documentHelper.hooks.onProcessAsyncPageUpdate&&this.documentHelper.hooks.onProcessAsyncPageUpdate(a),this.documentHelper.isUpdatedWhileLoadAsync||(this.documentHelper.hooks.onPerformUpdateAfterLoad&&this.documentHelper.hooks.onPerformUpdateAfterLoad(!0),this.documentHelper.isUpdatedWhileLoadAsync=!0),[4,new Promise(function(e){e=setTimeout(e,0);o.documentHelper.currentDocumentLoadId&&o.documentHelper.storeTimeoutId(o.documentHelper.currentDocumentLoadId,e)})]):[3,6]:[3,6];case 5:e.sent(),e.label=6;case 6:return[3,0];case 7:for(c=a.firstChild,this.viewer instanceof Tl&&1<a.sectionFormat.numberOfColumns&&!G.isNullOrUndefined(l)&&"NoBreak"===l.sectionFormat.breakCode&&("NoBreak"===a.sectionFormat.breakCode||a.sectionIndex===a.page.bodyWidgets[0].sectionIndex)&&(this.getColumnBreak(a)?(i=a.getSplitWidgets(),i=i[i.length-1],G.isNullOrUndefined(a.page.nextPage)?(r=this.getBodyWidget(i,!0),this.viewer.updateClientArea(r,r.page),r=this.getNextWidgetHeight(r),this.viewer.clientActiveArea.height-=r-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=r):this.splitBodyWidgetBasedOnColumn(i)):(G.isNullOrUndefined(a.page.nextPage)||(a=this.documentHelper.pages[this.documentHelper.pages.length-1].bodyWidgets[0]),this.splitBodyWidgetBasedOnColumn(a))),c&&c.bodyWidget&&c.bodyWidget.page&&(n=c.bodyWidget.page);n;)n.footnoteWidget&&this.layoutfootNote(n.footnoteWidget),n=n.nextPage;return[2]}})})}var h,e=this,c=a.firstChild;if(d)return new Promise(function(t){return Uc(e,void 0,void 0,function(){return Bc(this,function(e){switch(e.label){case 0:return[4,i()];case 1:return e.sent(),t(),[2]}})})});i()},t.prototype.reLayoutMultiColumn=function(e,t,i){this.isInitialLoad=!0,e=e.getSplitWidgets()[0],this.combineMultiColumnForRelayout(e),1<e.sectionFormat.numberOfColumns&&(this.isMultiColumnDoc=!0),this.isMultiColumnSplit=!1;var r=e.previousRenderedWidget,n=e.nextRenderedWidget,o=!1;if(!t&&!G.isNullOrUndefined(e.firstChild)&&e.firstChild instanceof Z&&e.y!==e.firstChild.y&&(e.y=e.firstChild.y),t&&n&&e.page!==n.page&&e.firstChild instanceof Z){var t=0,a=(t=(s=e.firstChild).isEmpty()?this.documentHelper.textHelper.getParagraphMarkSize(s.characterFormat).Height:(a=s.childWidgets[0],this.getMaxElementHeight(a)),s.previousRenderedWidget);e.y===this.viewer.clientActiveArea.y&&t>this.viewer.clientActiveArea.height&&(a=G.isNullOrUndefined(a)?s:a,this.moveBlocksToNextPage(a),this.viewer.columnLayoutArea.setColumns(e.sectionFormat),this.viewer.updateClientArea(e,e.page),o=!0)}else if(!G.isNullOrUndefined(r)&&r.page!==e.page&&e.firstChild instanceof Z&&r.lastChild instanceof Z){var t=r.lastChild,s=e.firstChild;if(e instanceof Y&&r.lastChild&&t instanceof Z&&"NoBreak"===r.sectionFormat.breakCode&&e.page.index!==r.page.index&&e.index!==r.index){a=r,t=(1<a.sectionFormat.columns.length&&(a=this.getBodyWidget(a,!0)),K.round(this.getNextWidgetHeight(a)+s.height,2));if(!r.lastChild.isEndsWithPageBreak&&!r.lastChild.isEndsWithColumnBreak&&t<=K.round(this.viewer.clientActiveArea.bottom,2)){for(var l=r.page,d=e.page,h=0;h<d.bodyWidgets.length;h++){var c=d.bodyWidgets[h];d.bodyWidgets.splice(d.bodyWidgets.indexOf(c),1),l.bodyWidgets.splice(l.bodyWidgets.length,0,c),c.page=l,h--}e.y=this.viewer.clientActiveArea.y,this.documentHelper.removeEmptyPages()}}}o||(this.viewer.columnLayoutArea.setColumns(e.sectionFormat),this.viewer.updateClientArea(e,e.page),this.viewer.clientActiveArea.height-=e.y-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=e.y),this.addBodyWidget(this.viewer.clientActiveArea,e),this.clearBlockWidget(e.childWidgets,!0,!0,!0),this.isMultiColumnLayout=!0,this.reLayoutMultiColumnBlock(e,n,i),this.isMultiColumnLayout=!1,this.isInitialLoad=!1;a=e.getSplitWidgets(),s=a[a.length-1],t=this.getBodyWidget(s,!0),this.viewer.updateClientArea(t,t.page),r=this.getNextWidgetHeight(t);this.viewer.clientActiveArea.height-=r-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=r,G.isNullOrUndefined(s)||G.isNullOrUndefined(s.nextRenderedWidget)||(n=s.nextRenderedWidget,o=this.documentHelper.viewer.clientActiveArea.y,i=this.documentHelper.viewer.clientActiveArea.height,this.documentHelper.viewer.updateClientArea(n,n.page),this.documentHelper.viewer.clientActiveArea.y=o,this.documentHelper.viewer.clientActiveArea.height=i,this.documentHelper.blockToShift=n.firstChild),(G.isNullOrUndefined(s.nextRenderedWidget)||!G.isNullOrUndefined(s.nextRenderedWidget)&&"NoBreak"!==s.sectionFormat.breakCode&&s.nextRenderedWidget.sectionFormat.pageHeight!==s.sectionFormat.pageHeight&&s.nextRenderedWidget.sectionFormat.pageWidth!==s.sectionFormat.pageWidth)&&(this.documentHelper.blockToShift=void 0)},t.prototype.combineMultiColumnForRelayout=function(e){var t=e.getSplitWidgets(),i=t[0];for(e=t[t.length-1];e!==i;){for(var r=e.previousRenderedWidget,n=!1,o=0;o<e.childWidgets.length;o++)e.childWidgets[o]instanceof Yl&&!G.isNullOrUndefined(e.childWidgets[o].previousSplitWidget)&&!G.isNullOrUndefined(e.childWidgets[o].previousSplitWidget.previousSplitWidget)&&e.childWidgets[o].previousSplitWidget.bodyWidget.page!==e.childWidgets[o].previousSplitWidget.previousSplitWidget.bodyWidget.page&&(n=!0),e.childWidgets[o]instanceof Yl&&!G.isNullOrUndefined(e.childWidgets[o].previousSplitWidget)&&e.childWidgets[o].previousSplitWidget.bodyWidget.page===e.childWidgets[o].bodyWidget.page&&!n?(e.childWidgets[o].combineWidget(this.viewer),r.lastChild instanceof Q&&this.updateCellHeightInCombinedTable(r.lastChild)):(r.childWidgets.push(e.childWidgets[o]),e.childWidgets[o].containerWidget=r,e.childWidgets[o].containerWidget.page=r.page,e.childWidgets.splice(0,1)),o--;e=e.previousRenderedWidget}this.documentHelper.removeEmptyPages()},t.prototype.reLayoutMultiColumnBlock=function(e,t,i){for(var r,n,o=e.firstChild;o instanceof Q&&"Auto"===o.tableFormat.preferredWidthType&&!o.tableFormat.allowAutoFit&&o.calculateGrid(),G.isNullOrUndefined(o)||(this.viewer.updateClientAreaForBlock(o,!0,void 0,!0),r=this.layoutBlock(o,0,o.index<i),this.viewer.updateClientAreaForBlock(o,!1),o=r),o&&-1!==e.getSplitWidgets().indexOf(o.bodyWidget););o=e.firstChild,this.viewer instanceof Tl&&1<e.sectionFormat.numberOfColumns&&!G.isNullOrUndefined(t)&&"NoBreak"===t.sectionFormat.breakCode&&("NoBreak"===e.sectionFormat.breakCode||e.sectionIndex===e.page.bodyWidgets[0].sectionIndex)&&(t=(t=e.getSplitWidgets())[t.length-1],this.getColumnBreak(e)?e.page!==t.page?this.splitBodyWidgetBasedOnColumn(t):(n=this.getBodyWidget(t,!0),this.viewer.updateClientArea(n,n.page),n=this.getNextWidgetHeight(n),this.viewer.clientActiveArea.height-=n-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=n):G.isNullOrUndefined(e.page.nextPage)||this.splitBodyWidgetBasedOnColumn(t))},t.prototype.splitBodyWidgetBasedOnColumn=function(e){var t,i=e=this.getBodyWidget(e,!0);this.isMultiColumnSplit=!0,!this.isInitialLoad&&e.sectionFormat.equalWidth&&this.documentHelper.hooks.getSelectionOffsets&&this.documentHelper.hooks.selectRange&&(t=this.documentHelper.hooks.getSelectionOffsets(),this.combineMultiColumn(e),this.layoutMultiColumnBody(e,!1),r=this.documentHelper.hooks.getSelectionOffsets(),t.start!==r.start)&&this.documentHelper.hooks.selectRange(t.start,t.end),this.combineMultiColumn(e);for(var r=this.getCountOrLine(e,void 0,void 0,!0).lineCount,n=Math.round(r/e.sectionFormat.numberOfColumns);e;){var o=this.getCountOrLine(e,n,!0,!1),a=o.lineWidget,o=o.lineCount;if(!G.isNullOrUndefined(a)){if(a.paragraph.containerWidget instanceof Y)this.moveToNextLine(a,!0,a.indexInOwner);else if(a.paragraph.containerWidget instanceof ee){for(var s=[a.paragraph.containerWidget.ownerTable],l=[a.paragraph.containerWidget.ownerRow],d=a.paragraph.containerWidget.index,o=(s[s.length-1].isInsideTable&&(s[s.length-1]=this.getParentTable(s[s.length-1]),l[l.length-1]=this.getParentRow(l[l.length-1])),this.updateWidgetsToTable(s,l,l[l.length-1],!1,o,d,!0),s[s.length-1]),h=l[l.length-1].nextRenderedWidget;h;)this.clearRowWidget(h,!0,!0,!1),h=(h=this.layoutRow(s,h)).nextRenderedWidget;!G.isNullOrUndefined(o.nextRenderedWidget)&&e.sectionFormat.equalWidth&&(this.documentHelper.blockToShift=o.nextRenderedWidget,this.documentHelper.layout.shiftLayoutedItems(!1))}d=this.getBodyWidget(a.paragraph.bodyWidget,!0),l=this.getBodyWidget(d,!1);!d.sectionFormat.equalWidth&&l.sectionFormat.numberOfColumns-1===l.columnIndex&&G.isNullOrUndefined(l.nextSplitWidget)&&(a=this.getCountOrLine(o=d).lineCount,this.layoutMultiColumnBody(o,!0),a!==this.getCountOrLine(d).lineCount)&&this.splitBodyWidgetBasedOnColumn(d),G.isNullOrUndefined(l.nextSplitWidget)&&(this.viewer.updateClientArea(d,d.page),o=this.getNextWidgetHeight(d),this.viewer.clientActiveArea.height-=o-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=o,this.viewer.clientArea.y=this.viewer.clientActiveArea.y,this.viewer.clientArea.height=this.viewer.clientActiveArea.height)}if(e=e.nextRenderedWidget,!G.isNullOrUndefined(e)&&e.columnIndex===e.sectionFormat.numberOfColumns-1)break}this.isMultiColumnSplit=!1,this.isInitialLoad||(e=this.getBodyWidget(i,!1),G.isNullOrUndefined(e.nextRenderedWidget))||(this.documentHelper.blockToShift=e.nextRenderedWidget.firstChild)},t.prototype.getColumnBreak=function(e){var t=this.getBodyWidget(e,!0);if(!(t.sectionFormat.numberOfColumns<=1))for(;t;){if(t.lastChild instanceof Z&&t.lastChild.isEndsWithColumnBreak)return!0;if(G.isNullOrUndefined(t.nextRenderedWidget)||t.index!==t.nextRenderedWidget.index)break;t=t.nextRenderedWidget}return!1},t.prototype.layoutMultiColumnBody=function(e,t){for(var i=!1;e;){i||(this.viewer.updateClientArea(e,e.page),this.viewer.clientActiveArea.height-=e.y-this.viewer.clientActiveArea.y,e instanceof J?(this.viewer.clientArea.height=Number.POSITIVE_INFINITY,this.viewer.clientActiveArea.height=Number.POSITIVE_INFINITY):this.viewer.clientActiveArea.y=e.y);for(var i=!t,r=0;r<e.childWidgets.length;r++){var n=e.childWidgets[r],o=(n instanceof Q&&this.clearTableWidget(n,!0,!0,!0),this.viewer.updateClientAreaForBlock(n,!0),!1);n instanceof Z&&!G.isNullOrUndefined(n.paragraphFormat)&&-1!==n.paragraphFormat.listFormat.listId&&(o=0===n.paragraphFormat.listFormat.listLevelNumber),this.layoutBlock(n,0,o),this.viewer.updateClientAreaForBlock(n,!1)}if(e.columnIndex===e.sectionFormat.numberOfColumns-1||!G.isNullOrUndefined(e.nextRenderedWidget)&&e.sectionIndex!==e.nextRenderedWidget.sectionIndex)break;e=e.nextRenderedWidget}},t.prototype.getNextWidgetHeight=function(e){for(var t=0,i=0;e&&0<e.childWidgets.length;){var r,n=e.lastChild;if((n=n instanceof Z&&n.isSectionBreak&&n.previousRenderedWidget instanceof Q&&"Word2013"!==this.documentHelper.compatibilityMode?n.previousRenderedWidget:n)instanceof Z&&this.isFirstElementWithPageBreak(n)&&n.isEndsWithColumnBreak&&((r=n.previousWidget)instanceof Z&&0===i&&"Word2013"!==this.documentHelper.compatibilityMode?n=r:r instanceof Q&&r.wrapTextAround&&r.previousWidget instanceof Z&&(n=r.previousWidget)),t=n.height,n instanceof Q&&(t=this.getHeight(n)),i<(t+=n.y)&&(i=t),!G.isNullOrUndefined(e)&&e.columnIndex===e.sectionFormat.numberOfColumns-1||0===e.sectionFormat.numberOfColumns||!G.isNullOrUndefined(e.nextRenderedWidget)&&e.sectionIndex!==e.nextRenderedWidget.sectionIndex)break;e=e.nextRenderedWidget}return i},t.prototype.getHeight=function(e){for(var t=0,i=0;i<e.childWidgets.length;i++)t+=e.childWidgets[i].height;return t},t.prototype.getBookmarkMargin=function(e){for(var t=0,i=0;i<e.children.length;i++){var r=e.children[i];if(!G.isNullOrUndefined(r.margin)&&r instanceof Md){t=r.margin.top+r.margin.bottom;break}}return t},t.prototype.getCountOrLine=function(e,t,i,r){for(var n,o,a=0,s=!1,l=0,d=0,h=0;e;){for(var c=0;c<e.childWidgets.length;c++){var g=e.childWidgets[c];if(g instanceof Z){if(g.isSectionBreak)continue;for(var p=0;p<g.childWidgets.length;p++){var u=g.childWidgets[p],h=0;if(G.isNullOrUndefined(u.margin)||(h=u.margin.top+u.margin.bottom+this.getBookmarkMargin(u)),i){if(l+=u.height-h,Math.round(t)<Math.round(l)){n=g.childWidgets[p],s=!0;break}}else a++,l+=u.height-h}}else g instanceof Q&&(o=this.getCountOrLineTable(g,t,i,l,!1,r),r?l+=o.lineCount:i?G.isNullOrUndefined(o.lineWidget)?l=o.lineCount:(n=o.lineWidget,d=o.lineCount,s=!0):a+=o.lineCount);if(s&&i)break}if(s&&i)break;if(!G.isNullOrUndefined(e.nextRenderedWidget)&&e.index!==e.nextRenderedWidget.index)break;e=e.nextRenderedWidget}return r?{lineWidget:void 0,lineCount:l}:i?{lineWidget:n,lineCount:d}:{lineWidget:void 0,lineCount:a}},t.prototype.getCountOrLineTable=function(e,t,i,r,n,o){for(var a,s,l=0,d=!1,h=0,c=0,g=0,p=0,u=0,f=0,m=0;m<e.childWidgets.length;m++){for(var y=e.childWidgets[m],v=void 0,W=void 0,g=0,p=0,u=0,f=0,b=0;b<y.childWidgets.length;b++){for(var x=y.childWidgets[b],w=0;w<x.childWidgets.length;w++)if((C=x.childWidgets[w])instanceof Z&&0<C.childWidgets.length)for(var F=0;F<C.childWidgets.length;F++)g++,v=x,u+=C.childWidgets[F].height;else g+=(s=this.getCountOrLineTable(C,t,i,r,!0,o)).lineCount,u+=s.lineCount;p<g&&(p=g),f<u&&(f=u,W=v),u=g=0}if(!i||n)h+=p,c+=f;else for(var C,P=0,T=0;T<W.childWidgets.length;T++){if((C=W.childWidgets[T])instanceof Z)for(b=0;b<C.childWidgets.length;b++){if(r+=C.childWidgets[b].height,Math.round(t)<Math.round(r)){a=C.childWidgets[b],d=!0,r=0,l=P;break}if(P++,d&&i)break}else{if(s=this.getCountOrLineTable(C,t,i,r,!1,o),!G.isNullOrUndefined(s.lineWidget)){d=!0,r=0,a=s.lineWidget,l=P+=s.lineCount;break}P+=s.lineCount,r+=C.height}if(d&&i)break}if(p=0,d&&i)break}return o?{lineWidget:void 0,lineCount:c}:!i||G.isNullOrUndefined(a)&&n?{lineWidget:void 0,lineCount:h}:i&&G.isNullOrUndefined(a)&&!n?{lineWidget:void 0,lineCount:r}:{lineWidget:a,lineCount:l}},t.prototype.combineMultiColumn=function(e){for(e=this.getBodyWidget(e,!1);e&&0!==e.columnIndex;){var t=e.previousRenderedWidget;if(t.lastChild instanceof Z&&t.lastChild.isEndsWithColumnBreak)break;for(var i=!1,r=0;r<e.childWidgets.length;r++){if(e.childWidgets[r]instanceof Yl&&!G.isNullOrUndefined(e.childWidgets[r].previousSplitWidget)&&!G.isNullOrUndefined(e.childWidgets[r].previousSplitWidget.previousSplitWidget)&&e.childWidgets[r].previousSplitWidget.bodyWidget.page!==e.childWidgets[r].previousSplitWidget.previousSplitWidget.bodyWidget.page){if(i=!0,e.childWidgets[r]instanceof Q&&t.lastChild instanceof Q)for(var n=e.childWidgets[r],o=t.lastChild,a=o.childWidgets[o.childWidgets.length-1].index,s=0;s<n.childWidgets.length;s++){var l=n.childWidgets[s];l.index!==a?(o.childWidgets.push(l),l.containerWidget=o):n.combineRows(this.viewer)}else if(e.childWidgets[r]instanceof Z&&t.lastChild instanceof Z){var d=e.childWidgets[r],h=t.lastChild;if(d.index==h.index)for(s=0;s<d.childWidgets.length;s++){var c=d.childWidgets[s];h.childWidgets.push(c),c.paragraph=h}}e.childWidgets.splice(r,1)}else e.childWidgets[r]instanceof Yl&&!G.isNullOrUndefined(e.childWidgets[r].previousSplitWidget)&&e.childWidgets[r].previousSplitWidget.bodyWidget.page===e.childWidgets[r].bodyWidget.page&&!i?(e.childWidgets[r].combineWidget(this.viewer),t.lastChild instanceof Q&&this.updateCellHeightInCombinedTable(t.lastChild)):(t.childWidgets.push(e.childWidgets[r]),e.childWidgets[r].containerWidget=t,e.childWidgets[r].containerWidget.page=t.page,e.childWidgets.splice(0,1));r--}e=e.previousRenderedWidget}this.documentHelper.removeEmptyPages()},t.prototype.updateCellHeightInCombinedTable=function(e){for(var t=0,i=0,r=0;r<e.childWidgets.length;r++){for(var n=e.childWidgets[r],o=0;o<n.childWidgets.length;o++){for(var a=n.childWidgets[o],s=0;s<a.childWidgets.length;s++)i+=a.childWidgets[s].height;t<i&&(t=i);for(var i=0,l=0;l<n.childWidgets.length;l++)n.childWidgets[l].height=t}t=0}},t.prototype.layoutHeaderFooter=function(e,t,i){var r=this.documentHelper.renderedLists,n=this.documentHelper.renderedLevelOverrides;this.documentHelper.renderedLists=new N,this.documentHelper.renderedLevelOverrides=[];try{this.layoutHeaderFooterInternal(e,t,i)}finally{this.documentHelper.renderedLists=r,this.documentHelper.renderedLevelOverrides=n}},t.prototype.layoutHeaderFooterInternal=function(e,t,i){var r,n,o=t.getCurrentPageHeaderFooter(e,!0);o&&(r=o,G.isNullOrUndefined(o.page)&&(o.page=i,o.height=0,this.clearBlockWidget(o.childWidgets,!0,!0,!0),t.updateHFClientArea(e.sectionFormat,!0),this.layoutHeaderFooterItems(t,o),this.skip2003=!1,e.sectionFormat.topMargin<i.boundingRectangle.bottom)&&0<o.floatingElements.length&&"Behind"!==o.floatingElements[0].textWrappingStyle&&o.floatingElements.some(function(e){return"TopMargin"===e.verticalOrigin&&"Bottom"===e.verticalAlignment})&&this.shiftItemsForVerticalAlignment(o),(o=r.clone()).parentHeaderFooter=r,this.clearBlockWidget(o.childWidgets,!0,!0,!0),(n=o).page=i,n.height=0,this.updateRevisionsToHeaderFooter(n,i),t.updateHFClientArea(e.sectionFormat,!0),i.headerWidget=this.layoutHeaderFooterItems(t,n),this.skip2003=!1,e.sectionFormat.topMargin<i.boundingRectangle.bottom)&&0<i.headerWidget.floatingElements.length&&"Behind"!==i.headerWidget.floatingElements[0].textWrappingStyle&&(i.headerWidget=this.shiftItemsForVerticalAlignment(n)),(o=t.getCurrentPageHeaderFooter(e,!1))&&(r=o,G.isNullOrUndefined(o.page)&&(o.page=i,o.height=0,this.clearBlockWidget(o.childWidgets,!0,!0,!0),t.updateHFClientArea(e.sectionFormat,!1),this.layoutHeaderFooterItems(t,o),this.skip2003=!1),(o=r.clone()).parentHeaderFooter=r,this.clearBlockWidget(o.childWidgets,!0,!0,!0),(n=o).page=i,n.height=0,t.updateHFClientArea(e.sectionFormat,!1),this.updateRevisionsToHeaderFooter(n,i),i.footerWidget=this.layoutHeaderFooterItems(t,n),this.skip2003=!1)},t.prototype.shiftItemsForVerticalAlignment=function(e){for(var t=e.floatingElements,i=0;i<t.length;i++){var r,n=t[i],o=n.verticalOrigin,a=n.paragraph;if("Margin"!==o||a.isInsideTable)"TopMargin"!==o||"Bottom"!==n.verticalAlignment||a.isInsideTable||(r=e.y+e.height-n.height)>n.y&&(n.y=r,n instanceof ne)&&this.updateChildLocationForCellOrShape(n.y+n.textFrame.marginTop,n);else if(0!=(r=n.verticalPosition)){var s=(r+=this.viewer.clientActiveArea.y)-n.y;if(n.y=r,n instanceof ne)for(var l=0;l<n.textFrame.childWidgets.length;l++){var d=n.textFrame.childWidgets[l];d instanceof Z&&(d.y=d.y+s)}}}return e},t.prototype.updateHeaderFooterToParent=function(e){var t=e.page.sectionIndex,i=this.viewer.getHeaderFooter(e.headerFooterType),r=e.clone();this.documentHelper.headersFooters[t][i]=r;for(var n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];o instanceof Q&&this.clearTableWidget(o,!1,!0)}return r},t.prototype.updateRevisionsToHeaderFooter=function(e,t){var i=e.childWidgets;if(e instanceof X&&0<i.length)for(var r=0;r<i.length;r++)i[r]instanceof Z?this.updateRevisionsToHeaderFooterParagraph(i[r],t):i[r]instanceof Q&&this.updateRevisionsToHeaderFooterTable(i[r],t)},t.prototype.updateRevisionRange=function(e,t){for(var i=0;i<e.getRange().length;i++){var r=e.getRange()[i];r instanceof ld&&!G.isNullOrUndefined(r.line.paragraph.bodyWidget)&&!G.isNullOrUndefined(r.line.paragraph.bodyWidget.page)?r.line.paragraph.bodyWidget.page=t:(r instanceof ce&&!G.isNullOrUndefined(r.ownerBase.bodyWidget)&&!G.isNullOrUndefined(r.ownerBase.bodyWidget.page)||r instanceof S&&!G.isNullOrUndefined(r.ownerBase.bodyWidget)&&!G.isNullOrUndefined(r.ownerBase.bodyWidget.page))&&(r.ownerBase.bodyWidget.page=t)}},t.prototype.updateRevisionsToHeaderFooterParagraph=function(e,t){if(0<e.childWidgets.length)for(var i=0;i<e.childWidgets.length;i++)for(var r=e.childWidgets[i],n=0;n<r.children.length;n++){var o=r.children[n];if(0<o.removedIds.length)for(var a=o.removedIds,s=0;s<a.length;s++){var l=this.documentHelper.revisionsInternal.get(a[s]);o.insertRevisionAt(s,l),a.splice(s,1),s--,this.updateRevisionRange(l,t)}}if(0<e.characterFormat.removedIds.length)for(a=e.characterFormat.removedIds,i=0;i<a.length;i++){l=this.documentHelper.revisionsInternal.get(a[i]);e.characterFormat.insertRevisionAt(i,l),a.splice(i,1),i--,this.updateRevisionRange(l,t)}},t.prototype.updateRevisionsToHeaderFooterTable=function(e,t){for(var i=0;i<e.childWidgets.length;i++){for(var r=e.childWidgets[i],n=0;n<r.childWidgets.length;n++)for(var o=r.childWidgets[n],a=0;a<o.childWidgets.length;a++)o.childWidgets[a]instanceof Z?this.updateRevisionsToHeaderFooterParagraph(o.childWidgets[a],t):o.childWidgets[a]instanceof Q&&this.updateRevisionsToHeaderFooterTable(o.childWidgets[a],t);if(0<r.rowFormat.removedIds.length)for(var s=r.rowFormat.removedIds,l=0;l<s.length;l++){var d=this.documentHelper.revisionsInternal.get(s[l]);r.rowFormat.insertRevisionAt(l,d),s.splice(l,1),l--,this.updateRevisionRange(d,t)}}},t.prototype.linkFieldInHeaderFooter=function(e){for(var t=e.firstChild;t instanceof Z?this.linkFieldInParagraph(t):this.linkFieldInTable(t),t=t.nextWidget;);},t.prototype.linkFieldInParagraph=function(e){for(var t=0;t<e.childWidgets.length;t++)for(var i=e.childWidgets[t],r=0;r<i.children.length;r++){var n,o=i.children[r];if(o instanceof te&&(0!==o.fieldType||0===o.fieldType&&-1===this.documentHelper.fields.indexOf(o))&&o.linkFieldCharacter(this.documentHelper),o instanceof Ud&&!G.isNullOrUndefined(o.previousElement)&&o.previousElement instanceof te&&o.fieldBegin!==o.previousElement.fieldBegin&&(o.fieldBegin=o.previousElement.fieldBegin),o instanceof ne){var a=o.textFrame.firstChild;if(a)for(;a instanceof Z?this.linkFieldInParagraph(a):this.linkFieldInTable(a),a=a.nextWidget;);}else o instanceof ac&&(n=this.getCommentById(this.documentHelper.comments,o.commentId),G.isNullOrUndefined(n)||(0===o.commentType?n.commentStart=o:n.commentEnd=o,o.comment=n))}},t.prototype.getCommentById=function(e,t){for(var i=0;i<e.length;i++){var r=e[i];if(r.commentId===t)return r}},t.prototype.linkFieldInTable=function(e){for(var t=0;t<e.childWidgets.length;t++)for(var i=e.childWidgets[t],r=0;r<i.childWidgets.length;r++)for(var n=i.childWidgets[r],o=0;o<n.childWidgets.length;o++){var a=n.childWidgets[o];a instanceof Z?this.linkFieldInParagraph(a):this.linkFieldInTable(a)}},t.prototype.layoutHeaderFooterItems=function(e,t){var i;this.viewer.updateClientAreaLocation(t,e.clientActiveArea),0===t.childWidgets.length&&(i=new Z,o=new ad(i),i.childWidgets.push(o),t.childWidgets.push(i),i.containerWidget=t),this.linkFieldInHeaderFooter(t);for(var r=0;r<t.childWidgets.length;r++){var n=t.childWidgets[r];n instanceof Q&&"Auto"===n.tableFormat.preferredWidthType&&!n.tableFormat.allowAutoFit&&!n.isGridUpdated&&n.calculateGrid(),e.updateClientAreaForBlock(n,!0),this.layoutBlock(n,0),e.updateClientAreaForBlock(n,!1)}var o=t.headerFooterType;return this.skip2003=!1,"OddFooter"!==o&&"EvenFooter"!==o&&"FirstPageFooter"!==o||this.shiftChildLocation(e.clientArea.y-e.clientActiveArea.y,t),t},t.prototype.shiftChildLocation=function(e,t){for(var i=t.y+e,r=t.page.boundingRectangle.height-t.page.boundingRectangle.height/100*40,n=("Word2003"===this.documentHelper.compatibilityMode&&(r=t.page.boundingRectangle.height-t.page.boundingRectangle.height/100*50),e=(i=Math.max(i,r))-t.y,t.y=i,0);n<t.childWidgets.length;n++){var o=t.childWidgets[n];if(o instanceof Z){o.x=o.x,o.y=o.y+e,o.height;for(var a=0;a<o.childWidgets.length;a++)for(var s=o.childWidgets[a],l=0;l<s.children.length;l++){var d,h,c,g=s.children[l];g instanceof re&&"Inline"!==g.textWrappingStyle?("Paragraph"===g.verticalOrigin||"Line"===g.verticalOrigin?("Word2013"===this.documentHelper.compatibilityMode&&o.y+o.height-g.y!==Math.abs(g.verticalPosition)?g.y+=e:g.y=o.y+g.verticalPosition,"Paragraph"===g.verticalOrigin&&"TopAndBottom"==g.textWrappingStyle&&(h=new _(g.x,g.y,g.width,g.height),d=new _(o.x,o.y,o.width,o.height),h.isIntersecting(d))&&(g.y=o.y-g.height)):(h=this.getFloatingItemPoints(g),g.y=h.y),g instanceof ne&&(c=g.textFrame.marginTop,this.updateChildLocationForCellOrShape(g.y+c,g))):g instanceof ne&&"Inline"===g.textWrappingStyle&&(g.y+=e,c=g.textFrame.marginTop,this.updateChildLocationForCellOrShape(g.y+c,g))}}else this.shiftChildLocationForTableWidget(o,e),o.height}return e},t.prototype.shiftChildLocationForTableWidget=function(e,t){e.y=e.y+t;for(var i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];r instanceof $&&this.shiftChildLocationForTableRowWidget(r,t)}},t.prototype.shiftChildLocationForTableRowWidget=function(e,t){e.y=e.y+t;for(var i=0;i<e.childWidgets.length;i++)this.shiftChildLocationForTableCellWidget(e.childWidgets[i],t)},t.prototype.shiftChildLocationForTableCellWidget=function(e,t){e.y=e.y+t;for(var i=0;i<e.childWidgets.length;i++)if(e.childWidgets[i]instanceof Z){e.childWidgets[i].x=e.childWidgets[i].x,e.childWidgets[i].y=e.childWidgets[i].y+t;var r=e.childWidgets[i].floatingElements;if(!G.isNullOrUndefined(r)&&0<r.length)for(var n=0;n<r.length;n++)"Inline"===r[n].textWrappingStyle&&r[n]instanceof ne&&(r[n].y+=t,this.updateChildLocationForCellOrShape(r[n].y,r[n]))}else this.shiftChildLocationForTableWidget(e.childWidgets[i],t)},t.prototype.layoutBlock=function(t,e,i,r){var n,o=this;if(t instanceof Z){if((this.isInitialLoad||!this.isRelayout||t.paragraphFormat.bidi||"Justify"===t.paragraphFormat.textAlignment&&this.isRelayout||this.isDocumentContainsRtl)&&(t.splitTextRangeByScriptType(0),t.splitLtrAndRtlText(0),t.combineconsecutiveRTL(0)),(n=this.layoutParagraph(t,e,i,r))instanceof Promise)return n.then(function(e){a=e;e=o.checkAndRelayoutPreviousOverlappingBlock(t);return(a=e?e:a).nextRenderedWidget});var a=n,i=this.checkAndRelayoutPreviousOverlappingBlock(t);i&&(a=i)}else{if((n=this.layoutTable(t,e,r))instanceof Promise)return n.then(function(e){return a=e,o.checkAndRelayoutPreviousOverlappingBlock(t),o.updateTableYPositionBasedonTextWrap(a),a.nextRenderedWidget});a=n,this.checkAndRelayoutPreviousOverlappingBlock(t),this.isFloatTableSplitOnPageThatFits(t)&&(a=this.layoutFloatTableOnNextPage(t)),this.updateTableYPositionBasedonTextWrap(a)}return a.nextRenderedWidget},t.prototype.updateTableYPositionBasedonTextWrap=function(i){var r,n,o=this;G.isNullOrUndefined(i.bodyWidget)||i.containerWidget instanceof P||(r=i.y,n=new _(i.x,i.y,i.width,i.height),i.bodyWidget.floatingElements.forEach(function(e){var t;e instanceof ne&&!e.paragraph.isInsideTable&&(o.isRelayout&&("Paragraph"===e.verticalOrigin||"Line"===e.verticalOrigin)&&o.documentHelper.hooks.isBlockExistAfter(e.paragraph,i)||(t=new _(e.x,e.y,e.width,e.height),"TopAndBottom"!==e.textWrappingStyle&&"Square"!==e.textWrappingStyle)||!n.isIntersecting(t)||(i.y=e.y+e.height+e.distanceBottom,o.updateChildLocationForTable(i.y,i),t=i.y-r,o.viewer.cutFromTop(o.viewer.clientActiveArea.y+t)))}))},t.prototype.shiftWrapStyle=function(e){return"InFrontOfText"===e.textWrappingStyle||"Behind"===e.textWrappingStyle||"Inline"===e.textWrappingStyle},t.prototype.checkAndRelayoutPreviousOverlappingBlock=function(e){if(!(e.containerWidget instanceof P||this.isRelayoutOverlap)){var t,i,r=e.previousWidget;if(e instanceof Z){if(0<e.floatingElements.length)for(var n=0,o=0;o<e.floatingElements.length;o++){var a=e.floatingElements[o];if(!this.shiftWrapStyle(a)){for(var s,l=new _(a.x,a.y,a.width,a.height);r;){if(e.isInsideTable&&n>this.viewer.clientArea.height){this.startOverlapWidget=void 0,this.endOverlapWidget=void 0;break}r instanceof Z&&(s=new _(r.x,r.y,r.width,r.height),l.isIntersecting(s))&&this.startOverlapWidget!==r&&(this.startOverlapWidget=r,this.endOverlapWidget=e),n+=r.height,r=r.previousWidget}r=e.previousWidget}}else if(p=e.getSplitWidgets())return p[p.length-1]}else{var d=e;if(!d.wrapTextAround||d.isFieldCodeBlock)return d;for(var h,c,g=d.positioning?new _(d.x-d.positioning.distanceLeft,d.y-d.positioning.distanceTop,d.getTableCellWidth()+d.positioning.distanceLeft+d.positioning.distanceRight,d.height+d.positioning.distanceTop+d.positioning.distanceBottom):new _(d.x,d.y,d.getTableCellWidth(),d.height);r;)r instanceof Z&&(c=K.convertPointToPixel(r.paragraphFormat.afterSpacing),h=0<r.paragraphFormat.lineSpacing?K.convertPointToPixel(r.paragraphFormat.lineSpacing):0,c=new _(r.x,r.y,r.width,r.height-(c+h)),g.isTableIntersecting(c))&&this.startOverlapWidget!==r&&(this.startOverlapWidget=r,this.endOverlapWidget=e),r=r.previousWidget;r=e.previousWidget}e instanceof Z&&e.containerWidget instanceof Y&&0<e.floatingElements.length&&!this.shiftWrapStyle(e.floatingElements[0])&&e.containerWidget.firstChild!=e&&e.y+e.floatingElements[0].height>this.viewer.clientArea.bottom&&(d=e.previousWidget)&&d instanceof Z&&d.y+d.height+this.getLineHeigth(e,e.floatingElements[0].line)+e.floatingElements[0].height>this.viewer.clientArea.bottom&&(this.moveToNextPage(this.viewer,e.floatingElements[0].line,!1,!1,!0),this.startOverlapWidget=e,this.endOverlapWidget=e),this.startOverlapWidget&&(d=!1,e instanceof Q&&e.wrapTextAround&&!e.isInsideTable&&(i=e.positioning?e.positioning.distanceBottom:0,t=e.positioning?e.positioning.distanceTop:0,e.y+e.height+i+t>this.viewer.clientArea.bottom)&&(this.moveBlocksToNextPage(e.previousRenderedWidget),this.reLayoutTable(e),d=!0),d||(this.isRelayoutOverlap=!0,this.skipRelayoutOverlap=!0,(i=e instanceof Z&&e.isInsideTable)&&this.viewer.updateClientAreaForBlock(e,!1),this.layoutStartEndBlocks(this.startOverlapWidget,e),i&&this.viewer.updateClientAreaForBlock(e,!0),this.isRelayoutOverlap=!1,this.skipRelayoutOverlap=!1)),this.startOverlapWidget=void 0,this.endOverlapWidget=void 0}var p;return e instanceof Z&&e.isEndsWithColumnBreak&&(p=e.getSplitWidgets())?p[p.length-1]:e},t.prototype.getLineHeigth=function(e,t){for(var i=0,r=0;r<e.childWidgets.length;r++)t!=e.childWidgets[r]&&(i+=e.childWidgets[r].height);return i},t.prototype.addParagraphWidget=function(e,t){if(this.isNeedToUpdateXPositionForEmptyParagraph(t))this.updateXPositionForEmptyParagraph(e,t),t.y=e.y;else{this.viewer.clientActiveArea.width<=0&&this.viewer instanceof Nl?t.x=this.previousPara:(t.x=e.x,this.previousPara=t.x),t.width=e.width,t.y=e.y;var i=0;if(this.viewer instanceof Nl&&!G.isNullOrUndefined(t.previousWidget)&&t.previousWidget instanceof Z&&t.previousWidget.isEndsWithPageBreak&&!t.previousWidget.isInsideTable&&0<t.bodyWidget.floatingElements.length){for(var r=0;r<t.bodyWidget.floatingElements.length;r++)i<t.bodyWidget.floatingElements[r].height+t.bodyWidget.floatingElements[r].y&&(i=t.bodyWidget.floatingElements[r].height+t.bodyWidget.floatingElements[r].y);t.y<i&&(t.y=i,e.y=i)}t.clientX=void 0,t.hasOwnProperty("absoluteXPosition")&&delete t.absoluteXPosition}return t},t.prototype.isNeedToUpdateXPositionForEmptyParagraph=function(e){return e.isEmpty()&&!G.isNullOrUndefined(e.paragraphFormat)&&("Center"===e.paragraphFormat.textAlignment||"Right"===e.paragraphFormat.textAlignment||"Justify"===e.paragraphFormat.textAlignment&&e.paragraphFormat.bidi)&&-1===e.paragraphFormat.listFormat.listId},t.prototype.updateXPositionForEmptyParagraph=function(e,t){var i,r;t.isEmpty()&&!G.isNullOrUndefined(t.paragraphFormat)&&(i=this.documentHelper.textHelper.getParagraphMarkWidth(t.characterFormat),t.clientX=e.x,r=e.x,t.absoluteXPosition={width:e.width,x:e.x},"Center"===t.paragraphFormat.textAlignment?r+=(e.width-i)/2:"Right"!==t.paragraphFormat.textAlignment||t.bidi?r+=e.width-i:r+=e.width,t.width=i,t.x=r)},t.prototype.addLineWidget=function(e){var t=void 0;return(t=new ad(e)).width=e.width,e.childWidgets.push(t),t.paragraph=e,t},t.prototype.isFirstElementWithPageBreak=function(e){var t=!1;if(this.viewer instanceof Tl){e=e.childWidgets[0];if(e)for(var i=e.children[0];i;){if(!(i instanceof Md&&0<=i.name.indexOf("_"))){i instanceof ie&&("\f"===i.text||i.text===String.fromCharCode(14))&&(t=!0);break}i=i.nextElement}}return t},t.prototype.layoutfootNote=function(e){if("Pages"===this.documentHelper.layoutType){for(var t,i,r,n,o=e.page.index,a=this.viewer.clientActiveArea.clone(),s=this.viewer.clientArea.clone(),l=("Footnote"===e.footNoteType&&1<e.sectionFormat.columns.length&&!this.isInitialLoad&&(this.updateColumnIndex(e.bodyWidgets[0],!1),this.layoutMultiColumnBody(e.bodyWidgets[0],!0)),"Endnote"===e.footNoteType&&1<e.bodyWidgets[0].sectionFormat.numberOfColumns&&(this.isInitialLoad||this.updateColumnIndex(e.bodyWidgets[0],!1),this.layoutMultiColumnBody(e.bodyWidgets[0],!0),this.viewer.clientActiveArea=a),0),d=(1<e.sectionFormat.columns.length&&"Footnote"===e.footNoteType&&(this.viewer.updateClientArea(e,e.page),l=this.viewer.clientActiveArea.width),"Footnote"===e.footNoteType&&(this.viewer.updateFootnoteClientArea(e.sectionFormat,e),1<e.sectionFormat.columns.length)&&(this.viewer.clientActiveArea.width=l,this.viewer.clientArea.width=l),void(e.height=0)),h=0,c=(this.isRelayoutFootnote=!1,0),g=(this.viewer instanceof Tl&&0<e.bodyWidgets.length&&("Footnote"===e.footNoteType&&1<e.sectionFormat.columns.length||"Endnote"===e.footNoteType&&1<e.bodyWidgets[0].sectionFormat.columns.length)&&(this.isLayoutWhole&&this.updateColumnIndex(e.bodyWidgets[0],!1),this.splitFootNoteWidgetBasedOnColumn(e.bodyWidgets[0])),e.bodyWidgets[0]),p=0;p<e.bodyWidgets.length;p++){e.bodyWidgets[p].columnIndex!==g.columnIndex&&("Footnote"===e.footNoteType&&1<e.sectionFormat.columns.length||"Endnote"===e.footNoteType&&1<e.bodyWidgets[p].sectionFormat.columns.length)&&(this.viewer.updateClientArea(e.bodyWidgets[p],e.bodyWidgets[p].page),l=this.viewer.clientActiveArea.width,t=this.viewer.clientActiveArea.x,"Footnote"===e.footNoteType&&this.viewer.updateFootnoteClientArea(e.sectionFormat,e),this.viewer.clientActiveArea.x=t,this.viewer.clientArea.x=t,this.viewer.clientActiveArea.width=l,this.viewer.clientArea.width=l,this.viewer.cutFromTop(e.y+h)),0===p&&((t=new Z).characterFormat=new ce(void 0,this.documentHelper),t.paragraphFormat=new vl,t.index=0,i=new ad(t),t.childWidgets.push(i),h=this.documentHelper.textHelper.getParagraphMarkSize(t.characterFormat).Height,e.height+=h,e.y=this.viewer.clientActiveArea.y,"Endnote"===e.footNoteType&&this.viewer.updateClientArea(e.bodyWidgets[p],e.bodyWidgets[p].page,!0),this.viewer.cutFromTop(e.y+h),e.margin=new Hl(0,h,0,0));for(var c="Endnote"===e.footNoteType?0:c,u=0;u<e.bodyWidgets[p].childWidgets.length&&(d=e.bodyWidgets[p].childWidgets[u],"Footnote"!==e.footNoteType&&1!==e.bodyWidgets[p].getSplitWidgets().length||(d.index=c,c++),d.containerWidget=e.bodyWidgets[p],d.containerWidget.page=e.page,d.containerWidget.containerWidget=e,this.viewer.updateClientAreaForBlock(d,!0),d instanceof Q&&(this.clearTableWidget(d,!0,!0,!0),this.isRelayoutFootnote=!0,"Footnote"===e.footNoteType)&&(this.viewer.clientArea.height=Number.POSITIVE_INFINITY,this.viewer.clientActiveArea.height=Number.POSITIVE_INFINITY),this.layoutBlock(d,0),!G.isNullOrUndefined(e.bodyWidgets[p]));u++)e.bodyWidgets[p].columnIndex===g.columnIndex&&(e.height+=d.height),this.viewer.updateClientAreaForBlock(d,!1);g=e.bodyWidgets[p]}1<e.sectionFormat.columns.length&&(r=this.getFootNoteBodyHeight(e.bodyWidgets[0]),e.height=r+h),"Footnote"===e.footNoteType&&this.shiftChildWidgetInFootnote(e),"Footnote"===e.footNoteType&&1<e.sectionFormat.columns.length&&1<e.page.bodyWidgets[e.page.bodyWidgets.length-1].sectionFormat.columns.length&&(r=this.getBodyWidget(e.page.bodyWidgets[e.page.bodyWidgets.length-1],!0),this.getNextWidgetHeight(r)>e.y)&&(this.footnoteHeight=e.height,n=this.isLayoutWhole,this.isLayoutWhole=!1,this.layoutMultiColumnBody(r,!0),this.isLayoutWhole=n),this.viewer.clientActiveArea=a,this.viewer.clientArea=s,this.islayoutFootnote||this.viewer.clientActiveArea.y+this.viewer.clientActiveArea.height>e.y&&(this.viewer.clientActiveArea.height-=e.height,r=this.viewer.clientActiveArea.y+this.viewer.clientActiveArea.height-e.y,this.viewer.clientActiveArea.height-=r),"Endnote"===e.footNoteType&&(n=void 0,G.isNullOrUndefined(e.page.nextPage)||G.isNullOrUndefined(e.page.nextPage.endnoteWidget)?e.page.index!==o&&(n=e):n=e.page.nextPage.endnoteWidget,G.isNullOrUndefined(n)||(a=this.getBodyWidget(n.page.bodyWidgets[n.page.bodyWidgets.length-1],!0),this.viewer.updateClientArea(a,a.page),this.layoutfootNote(n)))}return this.footnoteHeight=0,e},t.prototype.getFootNoteBodyHeight=function(e){for(var t=0;e&&0===e.columnIndex;){for(var i=0;i<e.childWidgets.length;i++)t+=e.childWidgets[i].height;e=e.nextRenderedWidget}return t},t.prototype.splitFootNoteWidgetBasedOnColumn=function(e){for(var t=this.getCountOrLine(e,void 0,void 0,!0).lineCount,i=Math.round(t/e.sectionFormat.numberOfColumns);e;){var r,n=this.getCountOrLine(e,i,!0,!1),o=this.viewer.clientActiveArea.clone(),a=this.viewer.clientArea.clone();if(0===n.lineWidget.paragraph.indexInOwner&&0===n.lineWidget.indexInOwner?this.updateColumnIndex(n.lineWidget.paragraph.bodyWidget,!0):(this.splitParagraph(n.lineWidget.paragraph,n.lineWidget.indexInOwner,void 0),r=this.moveBlocksToNextPage(n.lineWidget.paragraph.previousRenderedWidget),this.viewer.clientActiveArea=o,this.viewer.clientArea=a,G.isNullOrUndefined(r.nextRenderedWidget)||this.updateColumnIndex(r.nextRenderedWidget,!0)),n.lineWidget.paragraph.bodyWidget.columnIndex===n.lineWidget.paragraph.bodyWidget.sectionFormat.numberOfColumns-1)break;e=e.nextRenderedWidget}},t.prototype.updateColumnIndex=function(e,t,i){if(i)for(var r=e;(t||0!==r.columnIndex)&&(t?r.columnIndex++:r.columnIndex--,G.isNullOrUndefined(r.nextRenderedWidget)||r.sectionIndex===r.nextRenderedWidget.sectionIndex)&&(r=r.nextRenderedWidget););else for(;e;)t?e.columnIndex++:e.columnIndex=0,e=e.nextRenderedWidget},t.prototype.shiftChildWidgetInFootnote=function(e){for(var t,i=e.page,r=e.y-e.height,n=(1===i.bodyWidgets[0].childWidgets.length&&i.bodyWidgets[0].firstChild&&r<(t=i.bodyWidgets[0].firstChild.y)+(i=this.getBodyWidgetHeight(i.bodyWidgets[0]))&&(r=t+i),e.y=r,r+=e.margin.top),o=e.bodyWidgets[0],a=0;a<e.bodyWidgets.length;a++){e.bodyWidgets[a].columnIndex!==o.columnIndex&&(r=n);for(var o=e.bodyWidgets[a],s=0;s<e.bodyWidgets[a].childWidgets.length;s++){var l=e.bodyWidgets[a].childWidgets[s];l instanceof Z?l.y=r:this.shiftChildLocationForTableWidget(l,r-l.y),r+=l.height}}},t.prototype.getBodyWidgetHeight=function(e){for(var t=0,i=0;i<e.childWidgets.length;i++)t+=e.childWidgets[i].height;return t},t.prototype.checkBlockHasField=function(e){if(!(e instanceof Z))return this.checkTableHasField(e);for(var t=0,i=e.childWidgets;t<i.length;t++)for(var r=0,n=i[t].children;r<n.length;r++){var o=n[r];if(o instanceof te&&(2===o.fieldType||1===o.fieldType)&&0<this.documentHelper.fieldStacks.length&&o.fieldBegin===this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1])return!0}return!1},t.prototype.checkTableHasField=function(e){for(var t=0,i=e.childWidgets;t<i.length;t++)for(var r=0,n=i[t].childWidgets;r<n.length;r++)for(var o=0,a=n[r].childWidgets;o<a.length;o++){var s=a[o];if(this.checkBlockHasField(s))return!0}return!1},t.prototype.layoutParagraph=function(r,e,t,i){var n=this;if(!this.documentHelper.enableLayout)return null;if(this.isFieldCode&&!this.checkBlockHasField(r))return 0===r.childWidgets.length&&this.addLineWidget(r),r.isFieldCodeBlock=!0,r;if(r.isSectionBreak&&r.previousRenderedWidget instanceof Q&&"Word2013"!==this.documentHelper.compatibilityMode)return 0===r.childWidgets.length&&this.addLineWidget(r),r;r.x=0,r.textWrapWidth=!1,this.addParagraphWidget(this.viewer.clientActiveArea,r);function o(){return n.normalizeBookmarkEndForParagraph(r),n.updateWidgetToPage(n.viewer,r),n.isMergedWithNextParagraph(r)&&(r.height=0,n.viewer.clientActiveArea.y=r.y),r.isLayouted=!0,r.isFieldCodeBlock=!1,r}var a=r.previousWidget,s=(0===e&&a instanceof Z&&this.isMergedWithNextParagraph(a)&&(a=Math.max(0,this.getMergedParagraphOffset(r)),r.x+=a,this.mergedParagraph=r,this.mergedParagraphOffset=a,this.viewer.updateClientWidth(-a)),!0),l=(this.isFirstElementWithPageBreak(r)||(this.layoutListItems(r,t),s=!1),e<r.childWidgets.length?r.childWidgets[e]:void 0);if(r.isEmptyInternal(!0)&&!this.checkIsFieldParagraph(r))this.layoutEmptyLineWidget(r,!0);else{this.isRelayoutOverlap||r.containerWidget instanceof P||this.layoutFloatElements(r);var d=function(){var e;return!G.isNullOrUndefined(l)&&(r!==l.paragraph&&0===l.indexInOwner&&s&&(l.previousLine.isEndsWithColumnBreak?(n.viewer.updateClientAreaForBlock(r,!0),n.layoutListItems(l.paragraph),n.viewer.updateClientAreaForBlock(r,!1)):n.layoutListItems(l.paragraph)),l.isFirstLine()&&G.isNullOrUndefined(n.fieldBegin)&&(G.isNullOrUndefined(r.paragraphFormat)||(e=-K.convertPointToPixel(r.paragraphFormat.firstLineIndent),n.viewer.updateClientWidth(e))),(l.marginTop=0)===(l=n.layoutLine(l,0)).height&&!l.paragraph.characterFormat.hidden&&n.checkIsHiddenElement(l)&&n.layoutEmptyLineWidget(l.paragraph,!1,l),r=l.paragraph,l=l.nextLine,!0)};if(i)return new Promise(function(t){function i(){var e;d()?n.shouldScrollUpdateIn()?(e=void 0,r.bodyWidget instanceof Y&&(e=r.bodyWidget.getSplitWidgets()[0]),n.documentHelper.hooks.onProcessAsyncPageUpdate&&n.documentHelper.hooks.onProcessAsyncPageUpdate(e),n.documentHelper.isUpdatedWhileLoadAsync||(n.documentHelper.hooks.onPerformUpdateAfterLoad&&n.documentHelper.hooks.onPerformUpdateAfterLoad(!0),n.documentHelper.isUpdatedWhileLoadAsync=!0),e=setTimeout(i,0),n.documentHelper.currentDocumentLoadId&&n.documentHelper.storeTimeoutId(n.documentHelper.currentDocumentLoadId,e)):i():t(o())}i()});for(;d(););}return o()},t.prototype.normalizeBookmarkEndForParagraph=function(e){if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.childWidgets)&&0!==e.childWidgets.length){e=e.childWidgets[0];if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.children)&&0!==e.children.length){var t=e.children[0];if(t instanceof Md&&1===t.bookmarkType&&G.isNullOrUndefined(t.properties)&&!G.isNullOrUndefined(t.line)&&!G.isNullOrUndefined(t.line.paragraph)&&-1!=e.children.indexOf(t)&&0===e.children.indexOf(t)&&!K.startsWith(t.name,"_")){e=t.reference;if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.line)&&!G.isNullOrUndefined(e.line.paragraph)){e=e.line.paragraph;if(e!==t.line.paragraph&&(G.isNullOrUndefined(e.bodyWidget)||G.isNullOrUndefined(e.bodyWidget.page)))return}var i,r,n,o,a,e=t.line.paragraph.previousRenderedWidget;G.isNullOrUndefined(e)||(e instanceof Q?(r=this.documentHelper.getLastParagraphInLastCell(e),i="isAfterRowMark"):e instanceof Z&&(r=e,i="isAfterParagraphMark"),G.isNullOrUndefined(r))||(e=r.lastChild,G.isNullOrUndefined(e))||-1!==(n=(r=t.line).children.indexOf(t))&&(!G.isNullOrUndefined(t.margin)&&0<t.margin.left&&(o=t.margin.left,n+1<r.children.length&&(a=r.children[n+1],G.isNullOrUndefined(a)||(G.isNullOrUndefined(a.margin)&&(a.margin=new Hl(0,0,0,0)),a.margin.left=o)),t.margin.left=0),r.children.splice(n,1),e.children.push(t),t.line=e,t.properties={},t.properties="isAfterRowMark"===i?{isAfterRowMark:!0}:{isAfterParagraphMark:!0})}}}},t.prototype.checkIsFieldParagraph=function(e){if(!G.isNullOrUndefined(e.childWidgets)&&0!==e.childWidgets.length)for(var t=0;t<e.childWidgets.length;t++)for(var i=e.childWidgets[t],r=0;r<i.children.length;r++){var n=i.children[r];if(n instanceof te&&n.hasFieldEnd)return!0}return!1},t.prototype.checkIsHiddenElement=function(e){if(!G.isNullOrUndefined(e.children)&&0!==e.children.length)for(var t=0;t<e.children.length;t++){var i=e.children[t];if(i instanceof ie&&i.characterFormat.hidden)return!0}return!1},t.prototype.clearLineMeasures=function(){this.maxBaseline=0,this.maxTextBaseline=0,this.maxTextHeight=0},t.prototype.layoutFloatElements=function(e){var t=this;e.floatingElements.forEach(function(e){e instanceof re&&"Inline"!==e.textWrappingStyle&&(t.isRelayoutOverlap||t.layoutShape(e))})},t.prototype.layoutShape=function(e,t){if(!(e instanceof oe&&e.childWidgets&&e.childWidgets.length<=0)){"Inline"!==e.textWrappingStyle?(t?(i=(t=e.paragraph).bodyWidget,e.x=i.x,e.y=t.y):(i=this.getFloatingItemPoints(e),e.x=i.x,e.y=i.y),!G.isNullOrUndefined(e.paragraph)&&!e.paragraph.isInsideTable&&0!==e.paragraph.indexInOwner&&0<=e.verticalPosition&&Math.round(e.paragraph.y)>=Math.round(e.y)&&this.viewer.clientArea.bottom<=e.y+e.height&&("Line"==e.verticalOrigin||"Paragraph"==e.verticalOrigin)&&"InFrontOfText"!==e.textWrappingStyle&&"Behind"!==e.textWrappingStyle&&(this.moveToNextPage(this.viewer,e.line),this.updateShapeBaseLocation(e.line.paragraph)),t=e.paragraph?e.paragraph.bodyWidget:void 0,G.isNullOrUndefined(t)||-1!==t.floatingElements.indexOf(e)||(t.floatingElements.push(e),t.floatingElements.sort(function(e,t){return e.y-t.y}),!G.isNullOrUndefined(e.paragraph)&&e.paragraph.containerWidget instanceof ee&&(i=e.paragraph.containerWidget.ownerTable,r=void 0,!G.isNullOrUndefined(i.previousSplitWidget)&&i.previousSplitWidget instanceof Q&&!G.isNullOrUndefined(i.previousSplitWidget.bodyWidget)&&(r=i.previousSplitWidget.bodyWidget.floatingElements),!G.isNullOrUndefined(r))&&-1<r.indexOf(e)&&(i=e.paragraph.containerWidget.bodyWidget.previousSplitWidget,G.isNullOrUndefined(i)||-1===i.floatingElements.indexOf(e)||i.floatingElements.splice(i.floatingElements.indexOf(e),1),G.isNullOrUndefined(r)||-1===r.indexOf(e)||r.splice(r.indexOf(e),1)),G.isNullOrUndefined(t.nextRenderedWidget))||(i=t.nextRenderedWidget,G.isNullOrUndefined(i.floatingElements))||-1!==(r=i.floatingElements.indexOf(e))&&i.floatingElements.splice(r,1),-1===e.paragraph.floatingElements.indexOf(e)&&e.paragraph.floatingElements.push(e)):0===e.width&&0!==e.widthScale&&(t=K.convertPointToPixel(e.line.paragraph.getContainerWidth()),e.width=t/100*e.widthScale);var i=this.viewer.clientArea,r=this.viewer.clientActiveArea;if(e instanceof ne){var n=e.textFrame.childWidgets;this.viewer.updateClientAreaForTextBoxShape(e,!0);for(var o=0;o<n.length;o++){var a=n[o];this.viewer.updateClientAreaForBlock(a,!0),a instanceof Q&&this.clearTableWidget(a,!0,!0),this.layoutBlock(a,0),this.viewer.updateClientAreaForBlock(a,!1)}}else e instanceof oe&&this.layoutGroupShape(e);this.viewer.clientActiveArea=r,this.viewer.clientArea=i}},t.prototype.layoutGroupShape=function(e){for(var t=this.viewer.clientArea,i=this.viewer.clientActiveArea,r=("Inline"===e.textWrappingStyle&&(e.y=this.viewer.clientActiveArea.y,e.x=this.viewer.clientActiveArea.x),e.childWidgets),n=0;n<r.length;n++)this.updateChildShapePosition(e,r[n]),r[n]instanceof oe&&this.updateNestedShapePosition(r[n]);this.updateShapeTextPosition(e),this.viewer.clientActiveArea=i,this.viewer.clientArea=t},t.prototype.getExtentXValue=function(e){for(var t,i=0,r=e.coordinateXOrigin,n=e.childWidgets,o=0;o<n.length;o++)(n[o]instanceof ne||n[o]instanceof ae)&&i<(t=n[o].leftMargin-r+n[o].shapeWidth)&&(i=t);return i},t.prototype.getExtentYValue=function(e){for(var t,i=0,r=e.coordinateYOrigin,n=e.childWidgets,o=0;o<n.length;o++)(n[o]instanceof ne||n[o]instanceof ae)&&i<(t=n[o].topMargin-r+n[o].shapeHeight)&&(i=t);return i},t.prototype.updateShapeTextPosition=function(e){for(var t=0;t<e.childWidgets.length;t++){var i=e.childWidgets[t];if(i instanceof ne){this.viewer.updateClientAreaForTextBoxShape(i,!0);for(var r=i.textFrame.childWidgets,n=0;n<r.length;n++){var o=r[n];o instanceof Z?this.linkFieldInParagraph(o):o instanceof Q&&this.linkFieldInTable(o),this.viewer.updateClientAreaForBlock(o,!0),o instanceof Q&&this.clearTableWidget(o,!0,!0),this.layoutBlock(o,0),this.viewer.updateClientAreaForBlock(o,!1)}}else i instanceof oe&&this.updateShapeTextPosition(i)}},t.prototype.updateChildShapePosition=function(e,t){var i=0,r=0,r=t.is2007Shape?(i=t.leftMargin-e.coordinateXOrigin,t.topMargin-e.coordinateYOrigin):t instanceof oe?(i=t.offsetXValue-e.shapeX,t.offsetYValue-e.shapeY):(i=t.shapeX-e.shapeX,t.shapeY-e.shapeY),n=(e.extentXValue=e.is2007Shape?this.getExtentXValue(e):e.extentXValue,e.extentYValue=e.is2007Shape?this.getExtentYValue(e):e.extentYValue,e.height/e.extentYValue),o=e.width/e.extentXValue;t.x=e.x+i*o,t.y=e.y+r*n,t.height=t.shapeHeight*n,t.width=t.shapeWidth*o},t.prototype.updateNestedShapePosition=function(e){for(var t=0;t<e.childWidgets.length;t++)if(e.childWidgets[t]instanceof oe)this.updateChildShapePosition(e,e.childWidgets[t]),this.updateNestedShapePosition(e.childWidgets[t]);else for(var i=0;i<e.childWidgets.length;i++)this.updateChildShapePosition(e,e.childWidgets[i])},t.prototype.splitFirstWordFromElement=function(e,t,i){var r=i.text,n=r.indexOf(" "),o=r.substring(0,n),a=r[n],r=r.substring(n+1),n=new ie,o=(n.text=o,n.characterFormat.copyFormat(i.characterFormat),n.height=i.height,n.baselineOffset=i.baselineOffset,n.characterRange=i.characterRange,n.scriptType=i.scriptType,n.width=this.documentHelper.textHelper.getWidth(o,i.characterFormat,i.scriptType),n.trimEndWidth=n.width,new ie);o.text=a,o.characterFormat.copyFormat(i.characterFormat),o.height=i.height,o.baselineOffset=i.baselineOffset,o.characterRange=i.characterRange,o.scriptType=i.scriptType,o.width=this.documentHelper.textHelper.getWidth(a,i.characterFormat,i.scriptType),(o.trimEndWidth=0)===r.length?t.children.splice(0,0,o):(i.text=r,i.width=this.documentHelper.textHelper.getWidth(r,i.characterFormat,i.scriptType)," "===r[r.length-1]?i.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(r),i.characterFormat,i.scriptType):i.trimEndWidth=i.width),(n.line=e).children.push(n),(o.line=e).children.push(o)},t.prototype.moveElementFromNextLine=function(e){var t=e.nextLine,i=e.paragraph.bodyWidget;for(t&&!i.sectionFormat.equalWidth&&i.columnIndex!==t.paragraph.bodyWidget.columnIndex&&(t=void 0);t instanceof ad;)if(0<t.children.length){t.layoutedElements=void 0;for(var r=t.children[0],n=!0;n;){if(r instanceof ie&&"Justify"===t.paragraph.paragraphFormat.textAlignment&&r.characterFormat.bidi&&0<r.text.indexOf(" ")&&0<r.text.trim().length){this.splitFirstWordFromElement(e,t,r),n=!1;break}t.children.splice(0,1),e.children.push(r),r.line=e,n=!1,r.nextNode&&r.nextNode instanceof ie&&t.paragraph.bidi&&0!==r.nextNode.text.indexOf(" ")&&0<r.nextNode.text.trim().length&&(n=!0,r=r.nextNode)}if(!n)break}else 1===t.paragraph.childWidgets.length?t.paragraph.destroy():(t.paragraph.childWidgets.splice(t.paragraph.childWidgets.indexOf(t),1),this.documentHelper.editorProperties&&this.documentHelper.editorProperties.selectedWidgets.containsKey(t)&&t.indexInOwner<0&&this.documentHelper.editorProperties.selectedWidgets.remove(t)),t=e.nextLine},t.prototype.layoutLine=function(e,t){var i=e.paragraph,r=(0===e.children.length&&this.moveElementFromNextLine(e),e.children[t]),n=!0;if(r instanceof te&&e.children[e.children.length-1]instanceof te)for(var n=!1,o=0;o<e.children.length;o++)if(2==e.children[o].fieldType&&null!=e.children[o].nextElement&&!(e.children[o].nextElement instanceof te)){n=!0;break}for(this.clearLineMeasures(),e.marginTop=0;r instanceof ld;){if(r instanceof se||(r.padding.left=0),n?this.layoutElement(r,i):(this.layoutElement(r,i,!0),n=!0),e=r.line,r instanceof ie){var a=r,s=this.owner.editorProperties.enableSpellCheck;if(!(s&&this.owner.editorProperties.skipChangeDetection||G.isNullOrUndefined(a.errorCollection))&&0<a.errorCollection.length&&(a.isChangeDetected=!0),s&&!G.isNullOrUndefined(a.errorCollection)&&0<a.errorCollection.length)for(var l=0;l<a.errorCollection.length;l++)-1===a.errorCollection[l].start.currentWidget.indexInOwner&&(a.errorCollection[l].start.currentWidget=e),-1===a.errorCollection[l].end.currentWidget.indexInOwner&&(a.errorCollection[l].end.currentWidget=e)}if(this.isRTLLayout)r=void 0,this.isRTLLayout=!1;else{s=i.childWidgets.indexOf(r.line);if(0<s&&this.hasFloatingElement)this.hasFloatingElement=!1,0<i.bodyWidget.floatingElements.length&&r instanceof ie&&!(i.containerWidget instanceof ee)&&(r=i.childWidgets[s].children[0]);else{if(this.hasFloatingElement=!1,!this.is2013Justification||G.isNullOrUndefined(this.nextElementToLayout)||!G.isNullOrUndefined(r.paragraph.containerWidget.containerShape)&&r.paragraph.containerWidget.containerShape===this.nextElementToLayout){if((r=r.nextElement)instanceof ie&&0==r.text.indexOf(" ")&&2<r.text.length&&G.isNullOrUndefined(r.nextElement)&&0<r.text.trim().length){r.text=r.text.substring(1,r.text.length),r.isWidthUpdated=!1;var d=r.line.children.indexOf(r);if(r.line.children.splice(d,1),(a=new ie).text=" ",a.line=r.line,a.characterFormat.copyFormat(r.characterFormat),0<r.revisionLength)for(var h=0;h<r.revisionLength;h++){var c=r.getRevision(h);a.addRevision(c)}r.line.children.splice(d,0,a),r.line.children.splice(d+1,0,r),r=a}}else r=this.nextElementToLayout;this.nextElementToLayout=void 0}}}return e},t.prototype.checkFormatToCombineText=function(e,t){return e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.bold===t.bold&&e.italic===t.italic&&e.baselineAlignment===t.baselineAlignment&&e.bidi===t.bidi&&e.bdo===t.bdo&&e.allCaps===t.allCaps&&e.complexScript===t.complexScript&&e.fontFamilyAscii===t.fontFamilyAscii&&e.fontFamilyBidi===t.fontFamilyBidi&&e.fontFamilyFarEast===t.fontFamilyFarEast&&e.characterSpacing===t.characterSpacing&&e.scaling===t.scaling&&e.fontFamilyNonFarEast===t.fontFamilyNonFarEast&&e.hidden===t.hidden},t.prototype.getWholeTextWidth=function(e,t){for(var i=e.nextNode,r=e.width;!G.isNullOrUndefined(i)&&i instanceof ie&&(e.characterFormat.isEqualFormat(i.characterFormat)||this.documentHelper.textHelper.isWordSplitChar(i.text)&&this.checkFormatToCombineText(e.characterFormat,i.characterFormat));)i=i.text.includes(" ")?void 0:(t?(i.isCombinedRTLText=!0,r+=i.isWidthUpdated?i.width:this.documentHelper.textHelper.getTextSize(i,i.characterFormat)):i.isCombinedRTLText=!1,i.nextNode);return r},t.prototype.layoutElement=function(e,t,i){if(!e.isColumnBreak&&!e.isPageBreak||!t.isInHeaderFooter){var r=e.line,n="",o=e.indexInOwner;if(this.documentHelper.editorProperties.isRedoing&&!G.isNullOrUndefined(e.paragraph)&&!G.isNullOrUndefined(e.paragraph.containerWidget.footNoteReference)&&this.documentHelper.enableTrackChanges&&0<e.removedIds.length&&this.documentHelper.editorProperties.constructRevisionFromID(e),e instanceof te)0===e.fieldType&&(-1===this.documentHelper.fields.indexOf(e)&&this.documentHelper.fields.push(e),G.isNullOrUndefined(e.formFieldData)||-1!==this.documentHelper.formFields.indexOf(e)||this.isInsertFormField||this.documentHelper.formFields.push(e)),this.layoutFieldCharacters(e),e.line.isLastLine()&&G.isNullOrUndefined(e.nextNode)&&!this.isFieldCode?(!G.isNullOrUndefined(t.containerWidget)&&0<t.floatingElements.length&&!(t.containerWidget instanceof P)&&this.isConsiderAsEmptyLineWidget(e.line)&&this.layoutEmptyLineWidget(t,!1,e.line),this.moveToNextLine(r)):G.isNullOrUndefined(e.nextElement)&&0<this.viewer.clientActiveArea.width&&!e.line.isLastLine()?(this.moveElementFromNextLine(r),e.line.isLastLine()&&G.isNullOrUndefined(e.nextNode)&&!this.isFieldCode&&(2!==e.fieldType&&G.isNullOrUndefined(e.fieldSeparator)&&this.layoutEmptyLineWidget(t,!1,e.line),this.moveToNextLine(r))):G.isNullOrUndefined(e.nextElement)&&0===this.viewer.clientActiveArea.width?(this.moveToNextLine(r),r.paragraph.lastChild===r&&!G.isNullOrUndefined(r.nextLine)&&0<=this.viewer.clientActiveArea.height&&this.moveFromNextPage(r)):i&&(i=this.documentHelper.textHelper.getHeight(t.characterFormat),e.height=i.Height);else if(e instanceof se||this.isFieldCode||e instanceof Md||e instanceof xh||e instanceof Ch||e instanceof zd||e instanceof re&&"Inline"!==e.textWrappingStyle){if(!this.isInitialLoad&&e instanceof zd&&0===e.type&&"Block"===e.contentControlWidgetType&&!G.isNullOrUndefined(e.paragraph)&&e.paragraph.firstChild.children[0]===e&&!G.isNullOrUndefined(e.reference)&&!G.isNullOrUndefined(e.reference.paragraph)&&e.reference.paragraph.lastChild.children[e.reference.paragraph.lastChild.children.length-1]!==e.reference){e.contentControlWidgetType="Inline",e.reference.contentControlWidgetType="Inline",e.contentControlProperties.contentControlWidgetType="Inline";var a=e.paragraph;for(a===e.reference.paragraph&&e.reference.paragraph.contentControlProperties&&(e.reference.paragraph.contentControlProperties=void 0);a instanceof Z&&a&&a.contentControlProperties&&a!==e.reference.paragraph;)a.contentControlProperties=void 0,a=a.nextRenderedWidget}if(e instanceof Md)if(0===e.bookmarkType)!this.isInitialLoad&&this.documentHelper.isEditorModule?this.documentHelper.hooks.onUpdateBookmarkCollection(e.name,e):this.documentHelper.bookmarks.containsKey(e.name)||this.documentHelper.bookmarks.add(e.name,e),G.isNullOrUndefined(e.properties)||(x=parseInt(e.properties.columnFirst),e.paragraph.isInsideTable&&(c=(b=e.paragraph.associatedCell.ownerRow).getCellUsingColumnIndex(b.rowIndex,x),G.isNullOrUndefined(c)||(c.isRenderBookmarkStart=!0)));else if(1===e.bookmarkType&&this.documentHelper.bookmarks.containsKey(e.name)){var i=this.documentHelper.bookmarks.get(e.name);if((G.isNullOrUndefined(i.reference)||G.isNullOrUndefined(i.reference.paragraph)||G.isNullOrUndefined(i.reference.paragraph.bodyWidget))&&((i.reference=e).reference=i),G.isNullOrUndefined(i.properties))G.isNullOrUndefined(this.documentHelper)||(c=i.reference.paragraph.associatedCell,G.isNullOrUndefined(c))||(c.isRenderBookmarkEnd=!1,this.documentHelper.editorProperties.isRenderBookmarkAtEnd(i.reference)&&(c.isRenderBookmarkEnd=!0));else if(!G.isNullOrUndefined(e.paragraph.associatedCell)&&!G.isNullOrUndefined(this.documentHelper)){var s=this.documentHelper.editorProperties.getLastParagraph(e.paragraph.associatedCell).lastChild;if(!G.isNullOrUndefined(s))if(s.children[s.children.length-1]==e){for(var i=parseInt(e.reference.properties.columnLast),l=e.paragraph.associatedCell.ownerRow,d=void 0,h=i;G.isNullOrUndefined(d)&&-1<h;)d=l.getCellUsingColumnIndex(e.paragraph.associatedCell.rowIndex,h),G.isNullOrUndefined(d)&&h--;G.isNullOrUndefined(d)||(l.isRenderBookmarkEnd=!0)}}}else 0===e.bookmarkType&&this.documentHelper.bookmarks.containsKey(e.name)&&(G.isNullOrUndefined(e.reference)&&this.documentHelper.bookmarks.remove(e.name),G.isNullOrUndefined(e.properties)||(x=parseInt(e.properties.columnFirst),e.paragraph.isInsideTable&&(c=(b=e.paragraph.associatedCell.ownerRow).getCellUsingColumnIndex(b.rowIndex,x),G.isNullOrUndefined(c)||(c.isRenderBookmarkStart=!0))));if(e instanceof Ch||e instanceof xh)if(e instanceof Ch&&(i=""!==e.user?e.user:e.group,this.documentHelper.editRanges.containsKey(i)?-1===(x=this.documentHelper.editRanges.get(i)).indexOf(e)&&x.push(e):((x=[]).push(e),this.documentHelper.editRanges.add(i,x))),e instanceof Ch&&(this.documentHelper.editorProperties.currentUser===e.user||"Everyone"===e.group&&""===e.user))-1!=e.columnFirst&&-1!=e.columnLast&&(c=(b=e.paragraph.associatedCell.ownerRow).getCellUsingColumnIndex(b.rowIndex,e.columnFirst),G.isNullOrUndefined(c)||(c.isRenderEditRangeStart=!0,b.editRangeID.add(e.editRangeId,e)));else if(e instanceof xh&&!G.isNullOrUndefined(e.editRangeStart)&&(this.documentHelper.editorProperties.currentUser===e.editRangeStart.user||"Everyone"===e.editRangeStart.group&&""===e.editRangeStart.user))if(-1!=e.editRangeStart.columnFirst&&-1!=e.editRangeStart.columnLast)if((b=e.paragraph.associatedCell.ownerRow).editRangeID.containsKey(e.editRangeStart.editRangeId)){var c=b.getCellUsingColumnIndex(b.rowIndex,e.editRangeStart.columnFirst);G.isNullOrUndefined(c)||c.isRenderEditRangeStart&&(c.isRenderEditRangeEnd=!0)}else for(var g=e.paragraph.associatedCell.ownerTable,p=b.rowIndex-1;0<=p;p--){var u=g.childWidgets[p];if(u.editRangeID.containsKey(e.editRangeStart.editRangeId)){u=u.getCellUsingColumnIndex(u.rowIndex,e.editRangeStart.columnFirst);if(!G.isNullOrUndefined(u)&&u.isRenderEditRangeStart){u.isRenderEditRangeEnd=!0;break}}}if(e instanceof re&&"Inline"!==e.textWrappingStyle&&-1==t.floatingElements.indexOf(e)&&(e instanceof ne||e instanceof oe)&&(-1===t.floatingElements.indexOf(e)&&t.floatingElements.push(e),-1===t.bodyWidget.floatingElements.indexOf(e)&&t.bodyWidget.floatingElements.push(e),!this.documentHelper.isEditorModule)&&this.documentHelper.editorProperties.isPaste&&0===e.x&&0===e.y&&this.layoutShape(e,!0),e instanceof zd&&-1===this.documentHelper.contentControlCollection.indexOf(e)){i=!1;if(e.paragraph.isInHeaderFooter&&(c=(x=e.paragraph.containerWidget)instanceof ee?this.documentHelper.editorProperties.getContainerWidget(x):x,G.isNullOrUndefined(c.parentHeaderFooter)||(i=!0)),!i){if(0===e.type)this.isInitialLoad?this.documentHelper.contentControlCollection.push(e):this.documentHelper.hooks.onInsertContentControl&&this.documentHelper.hooks.onInsertContentControl(e);else if(1===e.type)for(var f=e.paragraph.bodyWidget.page,p=0;p<this.documentHelper.contentControlCollection.length;p++){var m=this.documentHelper.contentControlCollection[p],y=m.line.paragraph.isInHeaderFooter;(!y||e.contentControlProperties!==m.contentControlProperties||f!==m.line.paragraph.bodyWidget.page)&&(y||e.contentControlProperties!==m.contentControlProperties)||((e.reference=m).reference=e)}e instanceof zd&&0<t.bodyWidget.floatingElements.length&&this.adjustPosition(e,e.line.paragraph.bodyWidget)}}G.isNullOrUndefined(e.nextElement)&&0<this.viewer.clientActiveArea.width&&!e.line.isLastLine()&&this.moveElementFromNextLine(r),e.line.isLastLine()&&G.isNullOrUndefined(e.nextElement)?(!this.hasValidElement(r.paragraph)||t.isContainsShapeAlone())&&(this.isInitialLoad||this.hasValidElement(r.paragraph)||!r.paragraph.paragraphFormat.bidi||-1===r.paragraph.paragraphFormat.listFormat.listId)?this.layoutEmptyLineWidget(r.paragraph,!1,r,!1):this.moveToNextLine(r):G.isNullOrUndefined(e.nextElement)&&0===this.viewer.clientActiveArea.width&&(this.moveToNextLine(r),r.paragraph.lastChild===r)&&!G.isNullOrUndefined(r.nextLine)&&0<=this.viewer.clientActiveArea.height&&this.moveFromNextPage(r),e.nextElement&&e.nextElement instanceof ne&&"Inline"===e.nextElement.textWrappingStyle&&e instanceof ne&&this.layoutShape(e)}else{e instanceof ie&&"NoColor"!=e.characterFormat.highlightColor&&""!=e.text.trim()&&e.text!=e.text.trim()&&(b=t.firstChild,s=t.lastChild,!G.isNullOrUndefined(b)&&b instanceof ad&&0<b.children.length&&e===b.children[0]&&K.splitSpaceInTextElementBox(e,!0),!G.isNullOrUndefined(s))&&s instanceof ad&&0<s.children.length&&e===s.children[s.children.length-1]&&K.splitSpaceInTextElementBox(e,!1);var v,W,b,x=e.width,c=(e instanceof Ud&&!this.isTocField(e.fieldBegin)?""===(n=this.documentHelper.getFieldResult(e.fieldBegin,e.paragraph.bodyWidget.page))||""===e.text&&e.nextNode instanceof Ud?n=e.text:e.text=n:e instanceof Sd?""!==(n=this.startAt(e,n))&&(e.text=n):e instanceof ie&&(!G.isNullOrUndefined(e.paragraph)&&!G.isNullOrUndefined(e.paragraph.containerWidget.footNoteReference)&&e.line.isFirstLine()&&0===e.paragraph.index&&0===e.indexInOwner&&!G.isNullOrUndefined(this.documentHelper.isEditorModule)&&!this.documentHelper.editorProperties.handledEnter&&e instanceof Pc&&(e.text=e.paragraph.containerWidget.footNoteReference.text),this.checkAndSplitTabOrLineBreakCharacter(e.text,e),n=e.text),e instanceof ie&&(!e.isWidthUpdated||0===e.width||this.isInitialLoad||this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.isMeasureParaWidth?(x=this.documentHelper.textHelper.getTextSize(e,e.characterFormat),e.isWidthUpdated=!0):x=e.trimEndWidth,"\t"===e.text?(x=this.getTabWidth(t,this.viewer,o,r,e),e.width=x):e.text!==String.fromCharCode(31)&&e.text!==String.fromCharCode(14)||(e.width=x=0)),t.bodyWidget),i=(0<c.floatingElements.length?v=c.floatingElements:c instanceof Y&&0<this.getPriorColumnFloatingTables(c).length?v=this.getPriorColumnFloatingTables(c):!G.isNullOrUndefined(c.page)&&!G.isNullOrUndefined(c.page.headerWidget)&&0<c.page.headerWidget.floatingElements.length&&!t.paragraphFormat.bidi&&(v=c.page.headerWidget.floatingElements),!1),w=(this.isFirstElementWithPageBreak(t)&&t.isEndsWithColumnBreak&&(b=t.previousWidget)instanceof Q&&b.wrapTextAround&&b.previousWidget instanceof Z&&(i=!0),G.isNullOrUndefined(t.containerWidget)||G.isNullOrUndefined(v)||!(0<v.length)||i||(e instanceof ne||e instanceof oe)&&"Inline"==e.textWrappingStyle||t.containerWidget instanceof P||e instanceof ac||t.containerWidget instanceof ee&&t.containerWidget.ownerTable.containerWidget instanceof P||(this.adjustPosition(e,e.line.paragraph.bodyWidget),v.sort(function(e,t){return e.y-t.y}),t.textWrapWidth&&(t.x-=e.padding.left,t.textWrapWidth=!1)),0);if(r.isFirstLine())for(p=0;p<r.children.length;p++){var F=r.children[p];if(0<F.width&&!(F instanceof se)){F===e&&(w=this.getBeforeSpacing(t));break}}if(this.viewer instanceof Tl&&((e instanceof ne||e instanceof oe)&&"Inline"===e.textWrappingStyle||!(e instanceof ne||e instanceof oe))&&this.viewer.clientActiveArea.height<w+e.height&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y&&(!(e instanceof ie&&("\f"!==e.text&&e.text!==String.fromCharCode(14)||"\f"===e.text&&t.isPageBreak()&&"Word2013"===this.documentHelper.compatibilityMode))&&e instanceof ie||this.moveToNextPage(this.viewer,r),e instanceof Ud&&this.updateFieldText(e),!e.previousElement||this.hasPreviousListElement(e)&&e.paragraph.paragraphFormat.firstLineIndent<0||(!(e.previousElement instanceof ne||e.previousElement instanceof oe)||"Inline"!==e.previousElement.textWrappingStyle)&&(e.previousElement instanceof ne||e.previousElement instanceof oe)||this.cutClientWidth(e.previousElement,void 0,e instanceof ie&&"\f"===e.text||e instanceof ae)),e instanceof ne&&"Inline"===e.textWrappingStyle&&e.isHorizontalRule&&e.previousElement?(this.splitElementForClientArea(t,e),this.checkLineWidgetWithClientArea(r,e),C=this.is2013Justification,this.layoutShape(e),this.is2013Justification=C):e.previousElement instanceof ne&&"Inline"===e.previousElement.textWrappingStyle&&e.previousElement.isHorizontalRule&&(this.splitElementForClientArea(t,e),this.checkLineWidgetWithClientArea(r,e)),!(e instanceof ne||e instanceof oe)||"Inline"!==e.textWrappingStyle||e.isHorizontalRule&&!G.isNullOrUndefined(e.previousElement)||(-1===t.floatingElements.indexOf(e)&&t.floatingElements.push(e),e.width>this.viewer.clientActiveArea.width&&(this.splitElementForClientArea(t,e),this.checkLineWidgetWithClientArea(r,e)),C=this.is2013Justification,this.layoutShape(e),this.is2013Justification=C),e instanceof Sd&&(!e.isLayout||this.isLayoutWhole)&&"Pages"===this.documentHelper.layoutType&&(C=this.is2013Justification,s=this.nextElementToLayout,this.layoutFootEndNoteElement(e),this.is2013Justification=C,this.nextElementToLayout=s),e instanceof Sd&&(this.isfootMove&&(this.moveToNextPage(this.viewer,e.line),e.previousElement&&((e.previousElement instanceof ne||e.previousElement instanceof oe)&&"Inline"===e.previousElement.textWrappingStyle||!(e.previousElement instanceof ne||e.previousElement instanceof oe))&&this.cutClientWidth(e.previousElement),this.isfootMove=!1),t.paragraphFormat.keepWithNext)&&t.paragraphFormat.keepLinesTogether&&e.isLayout&&!this.isLayoutWhole&&!G.isNullOrUndefined(t.bodyWidget.page.footnoteWidget)&&0!==t.bodyWidget.page.footnoteWidget.y&&t.bodyWidget.page.footnoteWidget.y<this.viewer.clientActiveArea.y+this.viewer.clientActiveArea.height&&(c=this.viewer.clientActiveArea.y+this.viewer.clientActiveArea.height-t.bodyWidget.page.footnoteWidget.y,this.viewer.clientActiveArea.height-=c),parseFloat(x.toFixed(4))<=parseFloat(this.viewer.clientActiveArea.width.toFixed(4))||parseFloat(x.toFixed(3))<=parseFloat(this.viewer.clientActiveArea.width.toFixed(3))&&t.isInsideTable||!this.viewer.textWrap||e instanceof ie&&"\v"===e.text||this.isTextAfterTabToRetainInLine(e))"Justify"===t.paragraphFormat.textAlignment&&e instanceof ie&&e.characterFormat.bidi&&!e.isCombinedRTLText&&(""===e.text.trim()||(b=this.getWholeTextWidth(e,!0),i=!1,i=parseFloat(b.toFixed(4))>parseFloat(this.viewer.clientActiveArea.width.toFixed(4))?this.isWordFittedByJustification(e,b,!0):i)||(this.getWholeTextWidth(e,!1),this.effectiveJustifyWidth=0)),this.addElementToLine(t,e),G.isNullOrUndefined(e.nextElement)&&!e.line.isLastLine()&&(v=e.line.nextLine.children[0])instanceof ie&&0==v.text.indexOf(" ")&&this.moveElementFromNextLine(r),G.isNullOrUndefined(e.nextElement)&&0<this.viewer.clientActiveArea.width&&!e.line.isLastLine()?this.moveElementFromNextLine(r):!e.line.isLastLine()&&G.isNullOrUndefined(e.nextElement)&&0===this.viewer.clientActiveArea.width&&(this.moveToNextLine(r),r.paragraph.lastChild===r)&&0<=this.viewer.clientActiveArea.height&&this.moveFromNextPage(r);else if(e instanceof ie){if("\t"===e.text){var C=e.line,s=!1;if(0!==e.indexInOwner&&e instanceof Rd?(s=!0,this.addSplittedLineWidget(C,C.children.indexOf(e)-1)):(this.isWrapText&&this.viewer.clientActiveArea.x+this.viewer.clientActiveArea.width===this.viewer.clientActiveArea.right&&(this.isWrapText=!1),this.addSplittedLineWidget(C,C.children.indexOf(e))),this.moveToNextLine(C,void 0,void 0,!0),0<C.paragraph.bodyWidget.floatingElements.length&&s)return this.nextElementToLayout=e,void(this.hasFloatingElement=!0);e.width=this.getTabWidth(t,this.viewer,o,e.line,e),s&&(this.addElementToLine(t,e),G.isNullOrUndefined(e.nextElement))&&0<this.viewer.clientActiveArea.width&&!e.line.isLastLine()&&this.moveElementFromNextLine(e.line)}else do{if(r=e.line,e.previousElement instanceof te&&2==e.previousElement.fieldType&&!G.isNullOrUndefined(e.previousElement.fieldBeginInternal)&&e.previousElement.fieldBeginInternal.formFieldData instanceof xd||this.splitTextForClientArea(r,e,e.text,e.trimEndWidth,e.characterFormat),this.checkLineWidgetWithClientArea(r,e),e instanceof Ud&&!this.isInitialLoad&&this.updateFieldText(e),e.line!==r&&!G.isNullOrUndefined(this.nextElementToLayout)&&this.is2013Justification)return}while(e.line!==r&&this.cutClientWidth(e))}else for(;r=e.line,this.splitElementForClientArea(t,e),this.checkLineWidgetWithClientArea(r,e),e instanceof Ud&&this.updateFieldText(e),e.line!==r&&this.cutClientWidth(e,!0););if("\f"===n&&!G.isNullOrUndefined(e.nextNode)&&e.nextNode instanceof zd&&(W=e.nextNode),"\v"!==n&&"\f"!==n&&"\r"!==n&&n!==String.fromCharCode(14)||W||-1<(c=r.children.indexOf(e))&&("\v"!==n||!e.isWrappedBreak)&&this.addSplittedLineWidget(r,c),e.line.isLastLine()&&G.isNullOrUndefined(e.nextElement)||"\v"===n||"\f"===n||"\r"===n||n===String.fromCharCode(14)){if(this.isXPositionUpdated)return void(this.isXPositionUpdated=!1);"\v"===n&&e.isWrappedBreak||this.moveToNextLine(e.line),e.isWrappedBreak=!1,"\v"===n&&G.isNullOrUndefined(e.nextNode)?this.layoutEmptyLineWidget(r.paragraph,!0,r,!0):"\f"!==n&&n!==String.fromCharCode(14)||!(this.viewer instanceof Tl)||e.line.paragraph.containerWidget instanceof ee||(x=this.isRTLLayout,this.isRTLLayout=!1,G.isNullOrUndefined(e.nextNode)||e.nextNode instanceof zd?n===String.fromCharCode(14)?(this.moveToNextPage(this.viewer,e.line.nextLine,!1),this.layoutEmptyLineWidget(e.line.nextLine.paragraph,!1,e.line.nextLine,!0)):(b=t.nextWidget,"\f"===n&&b instanceof Z&&b.isSectionBreak||this.moveToNextPage(this.viewer,e.line,!0)):G.isNullOrUndefined(e.line.nextLine)||this.moveToNextPage(this.viewer,e.line.nextLine,!1),this.isRTLLayout=x)}this.isXPositionUpdated=!1,this.documentHelper.isEditorModule&&!G.isNullOrUndefined(this.documentHelper.editorProperties.isPaste)&&this.documentHelper.editorProperties.isPaste&&(e.line.paragraph.containerWidget instanceof Y||e.line.paragraph.containerWidget instanceof X)&&e instanceof ie&&"\v"!==e.text&&"\t"!==e.text&&"\f"!==e.text&&(this.documentHelper.editorProperties.lastElementForPasteIcon=e)}}},t.prototype.hasPreviousListElement=function(e){for(var t=e.previousElement;t instanceof Md||t instanceof xh||t instanceof Ch;)t=t.previousElement;return t instanceof se},t.prototype.adjustPosition=function(e,t,i){var r=this.viewer.clientActiveArea,n=this.viewer.clientActiveArea.x,o=this.viewer.clientActiveArea.y,a=this.viewer.clientActiveArea.width,r=this.adjustClientAreaBasedOnTextWrap(e,new _(r.x,r.y,r.width,r.height),i),i=(this.viewer.clientActiveArea.width=r.width,this.viewer.clientActiveArea.x-n),n=(e.line.isFirstLine()&&this.getFirstElement(e.line)===e&&0<i&&!this.isSkipFirstLineIndent&&(r=e.line.paragraph.paragraphFormat.firstLineIndent,i+=K.convertPointToPixel(0<r?r:0)),this.isSkipFirstLineIndent=!1,e.padding.left=0<i?i:0,this.isRtlShapeWrapAtStart&&e.line.paragraph.bidi&&0===i);if(this.isRtlShapeWrapAtStart=!1,a===this.viewer.clientActiveArea.width||n||(r=new Xs(this.viewer.clientActiveArea.x,this.viewer.clientActiveArea.width),this.updateWrapPosition(r)),0===this.viewer.clientActiveArea.width&&(this.isWrapText=!1),this.isYPositionUpdated){if(e.line.isFirstLine()?(G.isNullOrUndefined(e.line.paragraph.associatedCell)||(i=e.line.paragraph.previousRenderedWidget,G.isNullOrUndefined(i)?e.line.paragraph.associatedCell.height+=this.viewer.clientActiveArea.y-o:e.line.paragraph.associatedCell.height+=this.viewer.clientActiveArea.y-i.y+i.height),e.line.paragraph.y=this.viewer.clientActiveArea.y,this.isXPositionUpdated&&(e.line.paragraph.x=this.viewer.clientActiveArea.x,this.isXPositionUpdated=!1)):this.isContinuationAtColumnStart(e.line)?e.line.paragraph.y=this.viewer.clientActiveArea.y:e.line.children[0]===e&&(e.line.marginTop+=this.viewer.clientActiveArea.y-o),e.line.paragraph.containerWidget instanceof X){var s=!1;if(!this.skipRelayoutOverlap)for(var l=0;l<e.line.paragraph.containerWidget.floatingElements.length;l++){var d=e.line.paragraph.containerWidget.floatingElements[l];if(d instanceof re&&"TopAndBottom"===d.textWrappingStyle)for(var h=e.line.paragraph.previousWidget,c=new _(d.x,d.y,d.width,d.height);h;){if(h instanceof Z&&!h.isInsideTable){var g=new _(h.x,h.y,h.width,h.height);if(c.isIntersecting(g)){s=!0;break}}h=h.previousWidget}}!s&&e.line.isFirstLine()&&(a=e.line.paragraph.containerWidget,!this.skipRelayoutOverlap||this.viewer.clientActiveArea.y>a.y+a.height)&&(a.height+=this.viewer.clientActiveArea.y-o)}e instanceof se||(this.isYPositionUpdated=!1)}},t.prototype.hasPrecedingContentInLine=function(e){for(var t=e.line.children,i=0;i<t.length&&t[i]!==e;i++){var r=t[i];if(!(r instanceof re&&"Inline"!==r.textWrappingStyle)&&0<r.width)return!0}return!1},t.prototype.getFirstElement=function(e){for(var t=0;t<e.children.length;t++){var i=e.children[t];if(!(i instanceof re&&"Inline"!==i.textWrappingStyle))return i}},t.prototype.updateWrapPosition=function(e){for(var t=0;t<this.wrapPosition.length;t++){var i=this.wrapPosition[t];if(!(1<Math.abs(i.right-e.right)))return}this.wrapPosition.push(e)},t.prototype.isFirstitemInPage=function(e,t){return!e.line.paragraph.isInHeaderFooter&&Math.round(t)===this.viewer.clientArea.y},t.prototype.isNeedToWrapParaMarkToRightSide=function(e,t,i,r,n,o,a){return!(!t||t.isInsideTable||"Both"!==o||n.right<=i.x||n.x>=i.x||i.right>=n.right-a||i.x-n.x<a||e instanceof xc)&&i.y<=r&&i.bottom>=n.y},t.prototype.isTextFitBelow=function(e,t,i){return!1},t.prototype.isNeedToWrapForTopAndBottom=function(e,t,i,r,n,o,a,s,l,d,h,c,g){if(e.isInsideTable&&"TopAndBottom"===n&&!(l instanceof Q)){var p=l.paragraph;if(!G.isNullOrUndefined(p)&&!G.isNullOrUndefined(p.associatedCell)){var u=p.isInsideTable,p=p.associatedCell,e=e.associatedCell;if(!G.isNullOrUndefined(p)&&!G.isNullOrUndefined(e)&&p!==e||!u&&"Word2013"!==this.documentHelper.compatibilityMode)return!1}}return i!==s&&r!==s&&"TopAndBottom"===n&&(h.y>=o.y&&h.y<o.bottom||(h.y+g>K.round(o.y,0)||this.isTextFitBelow(o,h.y+g,l))&&h.y+g<o.bottom||h.y<o.y&&h.y+g>o.bottom&&0<o.height)&&!(a&&(d||t instanceof ae&&"Inline"!==t.textWrappingStyle&&t.allowOverlap))},t.prototype.isNeedToWrapForSquareTightAndThrough=function(e,t,i,r,n,o,a,s,l,d,h,c,g){var p;return 0<e.floatingElements.length?p=e.floatingElements:e instanceof Y&&0<this.getPriorColumnFloatingTables(e).length?p=this.getPriorColumnFloatingTables(e):!G.isNullOrUndefined(e.page)&&!G.isNullOrUndefined(e.page.headerWidget)&&0<e.page.headerWidget.floatingElements.length&&(p=e.page.headerWidget.floatingElements),0<p.length&&i!==s&&r!==s&&"Inline"!==n&&"Behind"!==n&&"TopAndBottom"!==n&&"InFrontOfText"!==n&&(Math.round(h.y+g)>Math.round(o.y)||this.isTextFitBelow(o,h.y+g,l))&&Math.round(h.y)<Math.round(o.y+o.height)&&!(a&&(d||t instanceof ae&&"Inline"!==t.textWrappingStyle&&t.allowOverlap))},t.prototype.isNeedToWrapForSquareTightAndThroughForTable=function(e,t,i,r,n,o,a,s,l,d,h,c,g){var p;return 0<e.floatingElements.length?p=e.floatingElements:!G.isNullOrUndefined(e.page)&&!G.isNullOrUndefined(e.page.headerWidget)&&0<e.page.headerWidget.floatingElements.length&&(p=e.page.headerWidget.floatingElements),0<p.length&&i!==s&&r!==s&&"Inline"!==n&&"Behind"!==n&&"TopAndBottom"!==n&&"InFrontOfText"!==n&&(Math.round(h.y+g)>=Math.round(o.y)&&Math.round(h.y)<Math.round(o.bottom)||Math.round(h.y+g)<=Math.round(o.bottom)&&Math.round(h.y+g)>=Math.round(o.y))&&!(a&&d)},t.prototype.isContinuationAtColumnStart=function(e){var t=e.paragraph,i=t.containerWidget;return 0===e.indexInOwner&&!G.isNullOrUndefined(t.previousSplitWidget)&&i instanceof Y&&0<i.columnIndex&&0===i.floatingElements.length&&i.firstChild===t},t.prototype.getPriorColumnFloatingTables=function(e){var t=[];if(e instanceof Y&&!G.isNullOrUndefined(e.page)&&!G.isNullOrUndefined(e.sectionFormat)&&!(e.sectionFormat.numberOfColumns<2))for(var i=e.page.bodyWidgets,r=0;r<i.length&&i[r]!==e;r++)if(i[r].sectionIndex===e.sectionIndex)for(var n=0;n<i[r].floatingElements.length;n++){var o=i[r].floatingElements[n];o instanceof Q&&o.x+o.getTableCellWidth()>e.x&&t.push(o)}return t},t.prototype.isNeedToWrapLeafWidget=function(e,t){var i=[],e=e.bodyWidget,i=0<e.floatingElements.length?i.concat(e.floatingElements):i.concat(this.getPriorColumnFloatingTables(e));return!(e instanceof X||G.isNullOrUndefined(e.page)||G.isNullOrUndefined(e.page.headerWidget))&&0<e.page.headerWidget.floatingElements.length&&(i=i.concat(e.page.headerWidget.floatingElements)),!G.isNullOrUndefined(i)&&0<i.length&&!(t instanceof re&&("InFrontOfText"===t.textWrappingStyle||"Behind"===t.textWrappingStyle))},t.prototype.getMinWidth=function(e,t,i,r){var n=e.text,o=n.split(" "),n=(""!==n&&""===n.trim()&&e&&e.line.paragraph&&e.previousNode&&e.nextNode&&e.line.paragraph.isEmpty&&(o=[""]),this.documentHelper.textHelper.measureText(o[0],e.characterFormat,e.scriptType).Width),e=this.getNextSibling(e);return 1===o.length&&e&&(o=e.text,n+=this.getNextTextRangeWidth(e,o,t,i,r)),n},t.prototype.getNextTextRangeWidth=function(e,t,i,r,n){for(var o=e,a=new _(0,0,0,0),s=this.isNextSibligSizeNeedToBeMeasure(a,e,n,i,r);s&&this.isLeafWidgetNextSiblingIsTextRange(o)&&i+a.width<n.width&&(o=this.getNextSibling(o),this.isNextSibligSizeNeedToBeMeasure(a,o,n,i,r));)o.text;return a.width},t.prototype.isLeafWidgetNextSiblingIsTextRange=function(e){e=this.getNextSibling(e);return!!(e&&e instanceof ie)},t.prototype.isNextSibligSizeNeedToBeMeasure=function(e,t,i,r,n){var o,a=null;if(t){if(-1!==(a=t.text).indexOf(" ")||-1!==a.indexOf("-")||-1!==a.indexOf("_")&&r+e.width+this.documentHelper.textHelper.measureText(a.split("-")[0],t.characterFormat,t.scriptType).Width<i.width||"\t"===t.text)return o=t.width,a!==a.split(" ")[0]&&(o=this.documentHelper.textHelper.measureText(a.split(" ")[0],t.characterFormat,t.scriptType).Width),r+e.width+o>i.width&&a.indexOf("-")&&a!==a.split("-")[0]+"-"&&(o=this.documentHelper.textHelper.measureText(a.split("-")[0]+"-",t.characterFormat,t.scriptType).Width),e.width+=o,!1;0<t.text.length&&(r=this.documentHelper.textHelper.measureText(t.text,t.characterFormat,t.scriptType),e.height+=r.Height,e.width+=r.Width)}return!0},t.prototype.isNeedDoIntermediateWrapping=function(e,t,i,r,n,o,a,s,l){return l<e&&((Math.round(i.width)<=Math.round(s)||i.width<r&&a.paragraph.isInsideTable)&&"Left"!==t&&"Largest"!==t||"Right"===t||i.width<e&&"Largest"===t)||(Math.round(o.x-n.x+n.leftIndent)<l||a instanceof ie&&this.isFloatingItemOnLeft(i,s,o))&&("Left"!==t||e<l)},t.prototype.isFloatingItemOnLeft=function(e,t,i){return!1},t.prototype.getNextSibling=function(e){for(var t=e.nextNode,i=!1;t;){if(t instanceof te||t instanceof Md||i||t instanceof se)t instanceof te&&(0===t.fieldType?i=!0:2===t.fieldType&&(i=!1));else if(t instanceof ie)break;t=t.nextNode}return t},t.prototype.getIntersectingSquareItemBounds=function(e,t,i){for(var r=[],n=0,o=0,a=0,s=0,l=0;l<t.length;l++){var d=t[l],s=(d instanceof re?(n=d.distanceLeft,o=d.distanceTop,a=d.distanceRight,d):(n=d.positioning.distanceLeft,o=d.positioning.distanceTop,a=d.positioning.distanceRight,d.positioning)).distanceBottom;d===e||d instanceof re&&"Square"!==d.textWrappingStyle||(d=new _(d.x-n,d.y-o,d.width+n+a,d.height+o+s)).y<=i.y&&d.bottom>=i.y&&r.push(d)}return r},t.prototype.getXPositionOfIntersectionFloatingItemBasedOnHorizontally=function(e,t){for(var i=Number.POSITIVE_INFINITY,r=0;r<e.length;r++)e[r].x>=t&&(i=Math.min(i,e[r].x));return i},t.prototype.getBottomPositionOfIntersectionFloatingItemBasedOnHorizontally=function(e){return Math.min.apply(Math,e.map(function(e){return e.bottom}))},t.prototype.adjustClientAreaBasedOnTextWrap=function(e,t,i){var r=e.line.paragraph,n=r.bodyWidget,o=this.viewer,a=t.y;this.isFirstitemInPage(e,a),G.isNullOrUndefined(r.previousWidget);if(this.isNeedToWrapLeafWidget(r,e)){var s=o.clientArea,l=[];if(0<n.floatingElements.length||0<this.getPriorColumnFloatingTables(n).length)for(var d=n.page,h=0;h<d.bodyWidgets.length;h++){if(!(n instanceof Y&&d.bodyWidgets[h]!==n)){n.floatingElements.sort(function(e,t){return e.y-t.y}),n.floatingElements.sort(function(e,t){return e.x-t.x}),l=l.concat(n.floatingElements);break}l=l.concat(d.bodyWidgets[h].floatingElements)}!(n instanceof X||G.isNullOrUndefined(n.page)||G.isNullOrUndefined(n.page.headerWidget))&&0<n.page.headerWidget.floatingElements.length&&(n.page.headerWidget.floatingElements.sort(function(e,t){return e.y-t.y}),n.page.headerWidget.floatingElements.sort(function(e,t){return e.x-t.x}),l=l.concat(n.page.headerWidget.floatingElements));for(h=0;h<l.length;h++){var c,g,p,u,f,m,y,v,W,b,x,w,F,C,P,T,O,S,N,I,k,A,L=l[h],U=!1,U=(L instanceof re?L:L.positioning).allowOverlap;r.isInsideTable&&L instanceof Q&&!L.isInsideTable||(g=L instanceof Q?L:L.line.paragraph,this.isRelayout&&this.documentHelper.hooks.isBlockExistAfter&&(!this.isRelayoutOverlap&&this.documentHelper.hooks.isBlockExistAfter(g,e.line.paragraph)||this.isRelayoutOverlap&&this.documentHelper.hooks.isBlockExistAfter(g,this.endOverlapWidget)))||r.isInsideTable&&L instanceof re&&"Paragraph"===L.verticalOrigin&&0<=L.verticalPosition&&L.paragraph!==r&&L.paragraph.containerWidget===r.containerWidget&&r.indexInOwner<L.paragraph.indexInOwner||(L.x,c=u=p=f=g=0,L instanceof re?(g=L.distanceLeft,f=L.distanceTop,p=L.distanceRight,u=L.distanceBottom,c=L.width):(c=L.getTableCellWidth(),g=L.positioning.distanceLeft,f=L.positioning.distanceTop,p=L.positioning.distanceRight,u=L.positioning.distanceBottom),c=new _(L.x-g,L.y-f,c+g+p,L.height+f+u),g=L instanceof Q?"Square":L.textWrappingStyle,p=L instanceof Q?"Both":L.textWrappingType,f=o.clientArea.y+L.height,s.x>c.right+(u=24))||s.right<c.x-u||"Word2003"===this.documentHelper.compatibilityMode&&!G.isNullOrUndefined(n.page)&&r.isInHeaderFooter&&(L instanceof Q&&!L.isInsideTable||L instanceof ne&&!L.paragraph.isInsideTable)||(this.isNeedToWrapForSquareTightAndThrough(n,e,-1,-1,g,c,U,1,L,!1,t,e.width,e.height)?(e instanceof ie&&"\v"===e.text&&this.isNeedToWrapParaMarkToRightSide(e,r,c,f,t,p,u)&&(e.isWrappedBreak=!0,t.width-=c.right-t.x,t.x=c.right,this.viewer.updateClientAreaForTextWrap(t)),I=m=f=0,A=K.convertPointToPixel(e.paragraph.paragraphFormat.firstLineIndent),P=K.convertPointToPixel(r.paragraphFormat.leftIndent),T=K.convertPointToPixel(r.paragraphFormat.rightIndent),A=e.line.isFirstLine()&&0<A?A:0,y=e instanceof ie||e instanceof se?e:null,v=(L instanceof Q?L:L.line.paragraph).containerWidget,S=!1,e.line.paragraph&&(t.x>=c.x&&"Left"!==p&&0<T&&(f=T),t.x<c.x&&"Right"!==p&&(m=P),b=r.paragraphFormat.listFormat,W=this.getListLevel(b.list,b.listLevelNumber),t.x===s.x+P)&&b&&b.baseStyle&&W&&0!==W.paragraphFormat.leftIndent&&(I=P,S=!0),b=!1,x=void(W=0),F=void(w=0),L instanceof Q&&(F=(x=L).positioning.horizontalAlignment,W=this.getMaximumRightCellBorderWidth(L),b=this.getDefaultBorderSpacingValue(W,b,F),w=L.tableFormat.borders.left.lineWidth/2),O=r.bidi&&!r.isInsideTable&&L instanceof re&&"Square"===g&&"Both"===p&&c.x<=s.x,t.x+w>=c.x&&t.x<=c.right&&"Left"!==p?(t.width=t.width-(c.right-t.x)-f,this.isWrapText=!0,G.isNullOrUndefined(x)||(u=this.getMinimumWidthRequiredForTable(b,F,W)),Math.round(t.width)<u||t.width<e.width&&"\t"===e.text||c.x<r.x+P?(t.width=this.viewer.clientArea.right-c.right-(S?I:0),N=0,N=G.isNullOrUndefined(y)?e.width:this.getMinWidth(e,e.width,e.height,t),Math.round(t.width)<u||t.width<N?(c.x-(r.x+r.leftIndent)>u&&r.x+n.width-T-c.right>u||(k=0,"Word2013"===this.documentHelper.compatibilityMode&&"Square"===g&&e instanceof ie&&this.hasPrecedingContentInLine(e)&&0<N&&t.width<N&&0<e.text.trim().length&&c.right+N>this.viewer.clientArea.right&&!G.isNullOrUndefined(n)&&1===n.sectionFormat.numberOfColumns)?t.width=0:(this.isYPositionUpdated=!0,t.width=this.viewer.clientArea.width,t.height-=c.bottom+k-t.y,t.y=c.bottom+k,this.viewer.clientArea.x+this.viewer.clientArea.width-t.x<N&&(t.x=this.viewer.clientArea.x,this.isXPositionUpdated=!0)),this.viewer.updateClientAreaForTextWrap(t),this.isWrapText=!1):(C=t.x,O?(t.width=this.viewer.clientArea.right-c.right,this.isRtlShapeWrapAtStart=!0):(t.x=c.right+(S?I:0)+A,t.width-=A,this.isSkipFirstLineIndent=!0),"Square"===g&&L instanceof re&&1==(P=this.getIntersectingSquareItemBounds(L,l,t)).length&&(T=this.getXPositionOfIntersectionFloatingItemBasedOnHorizontally(P,c.right))!==Number.POSITIVE_INFINITY&&T-c.right<u&&t.right-P[0].right<u&&(T=this.getBottomPositionOfIntersectionFloatingItemBasedOnHorizontally(P),this.isYPositionUpdated=!0,t.height-=T-t.y,t.y=T,t.width=this.viewer.clientArea.right-t.x),"Square"===g&&t.width<0&&0<e.width&&(this.isYPositionUpdated=!(k=0),t.width=this.viewer.clientArea.width,t.height-=c.bottom+k-t.y,t.y=c.bottom+k,t.x=C),this.viewer.updateClientAreaForTextWrap(t))):(C=t.x,O?(t.width=this.viewer.clientArea.right-c.right,this.isRtlShapeWrapAtStart=!0):(t.x=c.right+(S?I:0)+A,t.width=this.viewer.clientArea.right-c.right-(S?I:0)-A,this.isSkipFirstLineIndent=!0),"Square"===g&&t.width<0&&0<e.width&&(this.isYPositionUpdated=!(k=0),t.width=this.viewer.clientArea.width,t.height-=c.bottom+k-t.y,t.y=c.bottom+k,t.x=C),this.isWrapText=!0,this.viewer.updateClientAreaForTextWrap(t))):c.x>=t.x&&t.right>c.x?(t.width=c.x-t.x-f,P=0<(P=this.viewer.clientArea.right-c.right)?P:0,T=!(this.isWrapText=!0),N=0,N=G.isNullOrUndefined(y)?e.width:this.getMinWidth(y,e.width,e.height,t),G.isNullOrUndefined(x)||(u=this.getMinimumWidthRequiredForTable(b,F,W)),this.isNeedDoIntermediateWrapping(P,p,t,e.width,e.paragraph,c,e,N,u)?(t.width=P,this.isWrapText=!0,(t.x+N>c.x||"Right"===p||s.x>c.x-24)&&(t.x=c.right,t.width>N||"Right"===p?this.viewer.updateClientAreaForTextWrap(t):t.width<N&&e.line.children[0]!==e&&"Both"===p&&L instanceof re&&(this.viewer.updateClientAreaForTextWrap(t),T=!0)),(t.width<u&&!(N<P&&"Tight"===g)||t.width<N&&Math.round(t.right)===Math.round(this.viewer.clientArea.right)&&"Both"===p)&&(O=c,Math.round(t.x)===Math.round(n.sectionFormat.leftMargin+r.paragraphFormat.leftIndent)?(t.y=O.bottom+(k=0),this.isYPositionUpdated=!0,t.width=this.viewer.clientArea.width,t.height=t.height-(O.height+k),this.viewer.updateClientAreaForTextWrap(t),this.isWrapText=!1):!T&&Math.round(t.right)>=Math.round(this.viewer.clientArea.right)&&"Both"===p?(t.y=O.bottom+(k=0),t.width=this.viewer.clientArea.width,t.height=t.height-(O.height+k),t.x=this.viewer.clientArea.x+m,this.viewer.updateClientAreaForTextWrap(t),this.isYPositionUpdated=!0,this.isWrapText=!1):(t.width=0,this.viewer.updateClientAreaForTextWrap(t)))):((e.line.isFirstLine()&&0===e.indexInOwner||0==P&&e.line.children[0]===e)&&"Square"===g&&Math.round(t.width)<=Math.round(N)&&r.containerWidget===v?(t.x=s.x,t.y=c.bottom,t.width=s.width,t.height-=c.bottom-t.y,this.isYPositionUpdated=!0):Math.round(t.width)<=Math.round(N)&&Math.round(t.x-m)!==Math.round(this.viewer.clientArea.x)&&(t.width=0),this.viewer.updateClientAreaForTextWrap(t))):"Left"===p&&t.x+w>=c.x&&t.x<=c.right&&(S=t.width-(c.right-t.x)-f,N=0,N=G.isNullOrUndefined(y)?e.width:this.getMinWidth(e,e.width,e.height,t),Math.round(S)<u||S<N)&&(this.isYPositionUpdated=!(k=0),t.height-=c.bottom+k-t.y,t.y=c.bottom+k,this.viewer.updateClientAreaForTextWrap(t)),"Both"!==p&&(this.isWrapText=!1)):this.isNeedToWrapForTopAndBottom(r,e,-1,-1,g,c,U,1,L,!1,t,e.width,e.height)&&(I=this.documentHelper.textHelper.getParagraphMarkWidth(r.characterFormat),"Word2007"===this.documentHelper.compatibilityMode&&i&&!r.bidi&&!G.isNullOrUndefined(r.paragraphFormat)&&"Right"!==r.paragraphFormat.textAlignment&&"Center"!==r.paragraphFormat.textAlignment&&r.x+e.margin.left+I<c.x||(A=t.y,t.y=c.bottom+(k=0),this.isYPositionUpdated=!0,t.height=t.height-(c.bottom-A+k),t.y!==a&&e instanceof ie&&!(L instanceof Q)&&e.line.isFirstLine()&&(t.y+=e.margin.top,a=t.y),this.viewer.updateClientAreaForTextWrap(t))))}}return t},t.prototype.isShapeInsideTable=function(e,t){for(var i=e.line?e.line.paragraph:void 0;i&&!(i instanceof Vl);){if(i===t)return!0;i=i.containerWidget}return!1},t.prototype.adjustClientAreaBasedOnTextWrapForTable=function(e,t){if(!G.isNullOrUndefined(e.containerWidget)&&!G.isNullOrUndefined(e.bodyWidget)){var i=e.bodyWidget,r=this.viewer,n=(t.y,G.isNullOrUndefined(e.previousWidget),[]);if(0<i.floatingElements.length&&(n=n.concat(i.floatingElements)),!(i instanceof X||G.isNullOrUndefined(i.page)||G.isNullOrUndefined(i.page.headerWidget))&&0<i.page.headerWidget.floatingElements.length&&(n=n.concat(i.page.headerWidget.floatingElements)),!G.isNullOrUndefined(n)&&0<n.length){var o=r.clientActiveArea;n.sort(function(e,t){return e.y-t.y}),n.sort(function(e,t){return e.x-t.x});for(var a=0;a<n.length;a++){var s,l,d,h,c,g,p,u,f,m=n[a];m instanceof Q&&m.wrapTextAround&&-1!==e.getSplitWidgets().indexOf(m)||m instanceof re&&this.isShapeInsideTable(m,e)||(f=!1,f=(m instanceof re?m:m.positioning).allowOverlap,e.isInsideTable&&m instanceof Q&&!m.isInsideTable)||m instanceof Q&&m.wrapTextAround&&m.positioning.allowOverlap&&e.wrapTextAround&&e.positioning.allowOverlap||(s=e.getTableCellWidth(),d=((l=m instanceof re)?m:m.positioning).distanceLeft,u=(l?m:m.positioning).distanceTop,h=(l?m:m.positioning).distanceRight,c=(l?m:m.positioning).distanceBottom,l=l?m.width:m.getTableCellWidth(),l=new _(m.x-d,m.y-u,l+d+h,m.height+u+c),d=m instanceof Q?"Square":m.textWrappingStyle,h=m instanceof Q?"Both":m.textWrappingType,u=0<e.childWidgets.length?e.childWidgets[0].rowFormat.height:0,c=this.getNestedTable(e).firstChild.firstChild.firstChild.characterFormat,u<(c=this.documentHelper.textHelper.measureText(" ",c)).Height&&(u=c.Height),o.x>l.right+24)||o.right<l.x-24||!this.isNeedToWrapForSquareTightAndThroughForTable(i,e,-1,-1,d,l,f,1,m,!1,t,s,u)||this.isRelayout&&m instanceof Q&&"Paragraph"===m.positioning.verticalOrigin&&e.index<m.index||(t.x>=l.x&&t.x<l.right&&"Left"!==h?(t.width=t.width-(l.right-t.x),this.isWrapText=!0,Math.round(t.width)<24||t.width<s||l.x<e.x?(t.width=this.viewer.clientArea.right-l.right,c=s,Math.round(t.width)<24||t.width<c?(24<l.x-e.x&&24<this.viewer.clientArea.right-l.right?t.width=0:(this.isYPositionUpdated=!(p=0),t.width=this.viewer.clientArea.width,t.height-=l.bottom+p-t.y,this.istableYpositionChange||"Word2003"!==this.documentHelper.compatibilityMode||(this.textWrappingBottom=t.y,this.istableYpositionChange=!0),t.y=l.bottom+p),this.viewer.updateClientAreaForTextWrap(t),this.isWrapText=!1):(g=t.x,t.x=l.right,"Square"===d&&t.width<0&&0<s&&(this.isYPositionUpdated=!0,t.height-=l.bottom+0-t.y,t.width=this.viewer.clientArea.width,t.y=l.bottom+0,t.x=g),this.viewer.updateClientAreaForTextWrap(t))):(g=t.x,t.x=l.right+e.firstChild.firstChild.leftMargin,t.width=this.viewer.clientArea.right-l.right,"Square"===d&&t.width<0&&0<s&&(this.isYPositionUpdated=!(p=0),t.width=this.viewer.clientArea.width,t.height-=l.bottom+p-t.y,t.y=l.bottom+p,t.x=g),this.viewer.updateClientAreaForTextWrap(t))):l.x>t.x&&t.right>l.x&&l.bottom>t.y&&!e.wrapTextAround&&(f=this.getTableWidth(e),e.x+f<l.x||(u=l.bottom>t.y?l.bottom-t.y:0,t.y=l.bottom,t.height=t.height-u,this.viewer.updateClientAreaForTextWrap(t))))}}}return t},t.prototype.getNestedTable=function(e){for(var t=e;t.firstChild.firstChild.firstChild instanceof Q;)t=t.firstChild.firstChild.firstChild;return t},t.prototype.startAt=function(e,t){return"Footnote"===e.footnoteType?(this.startat=e.paragraph.bodyWidget.sectionFormat.initialFootNoteNumber,this.getFootEndNote(e.paragraph.bodyWidget.sectionFormat.footNoteNumberFormat,this.documentHelper.footnoteCollection.indexOf(e)+this.startat)):(this.startat=e.paragraph.bodyWidget.sectionFormat.initialEndNoteNumber,this.getFootEndNote(e.paragraph.bodyWidget.sectionFormat.endnoteNumberFormat,this.documentHelper.endnoteCollection.indexOf(e)+this.startat))},t.prototype.layoutFootEndNoteElement=function(e){var t,i=!(this.isFootnoteContentChanged=!0),r=this.documentHelper.footnoteCollection.indexOf(e),n=1,o=(this.islayoutFootnote=!0,new _(this.viewer.clientArea.x,this.viewer.clientArea.y,this.viewer.clientArea.width,this.viewer.clientArea.height)),a=new _(this.viewer.clientActiveArea.x,this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.width,this.viewer.clientActiveArea.height),s=e.paragraph.bodyWidget,l=!1,d=0;if(s.page.footnoteWidget)for(var h=0;h<s.page.footnoteWidget.bodyWidgets.length;h++){var n=s.page.footnoteWidget.bodyWidgets.length,c=this.documentHelper.footnoteCollection.indexOf(s.page.footnoteWidget.bodyWidgets[h].footNoteReference);if(r<c&&c-r==1){n=h,i=!0;break}}if(e.isLayout=!0,"Footnote"===e.footnoteType){s.page.footnoteWidget&&s.page.footnoteWidget instanceof J?t=s.page.footnoteWidget:(l=!0,(t=new J).footNoteType="Footnote",t.page=s.page,(u=new Z).characterFormat=new ce(void 0,this.documentHelper),u.paragraphFormat=new vl,u.index=0,g=new ad(u),u.childWidgets.push(g),d=this.documentHelper.textHelper.getParagraphMarkSize(u.characterFormat).Height,t.margin=new Hl(0,d,0,0)),this.isFootNoteLayoutStart=!0,l&&(s.page.footnoteWidget=t);var g,p=e.bodyWidget;this.viewer.updateClientArea(t,t.page),this.viewer.clientArea.y=o.y,this.viewer.clientActiveArea.y=a.y;for(var u,f=0;f<e.bodyWidget.childWidgets.length;f++){var m=e.bodyWidget.childWidgets[f];(m.containerWidget=p).page=s.page,p.sectionFormat=t.sectionFormat,m.containerWidget.containerWidget=t,this.viewer.updateClientAreaForBlock(m,!0),m instanceof Q&&this.clearTableWidget(m,!0,!0),this.layoutBlock(m,0),d+=m.height,m.y=0,this.viewer.updateClientAreaForBlock(m,!1),p.height+=m.height}1<t.sectionFormat.columns.length&&!(0===t.bodyWidgets.length&&p.childWidgets.length<=1&&p.childWidgets[0].childWidgets.length<=1)&&(d/=t.sectionFormat.numberOfColumns),g=this.isFootNoteLayoutStart=!1,d>=a.height&&(this.isfootMove=!0),i?t.bodyWidgets.splice(n,0,p):t.bodyWidgets.push(p),e.line.paragraph.isInsideTable&&(u=this.getParentTable(e.line.paragraph.associatedCell.ownerTable),G.isNullOrUndefined(u.footnoteElement)&&(u.footnoteElement=[]),-1==u.footnoteElement.indexOf(e))&&(u.footnoteElement.push(e),this.layoutedFootnoteElement.push(e),-1==(l=e.line.paragraph.containerWidget.ownerTable).footnoteElement.indexOf(e))&&l.footnoteElement.push(e),t.height+=d,g=!0,this.viewer.clientActiveArea=a,this.viewer.clientActiveArea.height-=d,this.footnoteHeight+=d,this.viewer.clientArea=o}return g},t.prototype.layoutEndNoteElement=function(){var e=this.documentHelper.pages.length;if(0<this.documentHelper.endnoteCollection.length){var t,i=void 0,r=void 0,e=this.documentHelper.pages[e-1],n=e.bodyWidgets[0],e=e.bodyWidgets[e.bodyWidgets.length-1];this.viewer instanceof Tl&&1<e.sectionFormat.numberOfColumns&&(e=this.getBodyWidget(e,!0),this.splitBodyWidgetBasedOnColumn(e));for(var o,a=0;a<this.documentHelper.endnoteCollection.length;a++){t=this.documentHelper.endnoteCollection[a],n.page.endnoteWidget instanceof J&&"Endnote"===n.page.endnoteWidget.footNoteType?i=n.page.endnoteWidget:(r=!0,(i=new J).footNoteType="Endnote",i.page=n.page);var s=t.bodyWidget;s.page=i.page;for(var l=0;l<t.bodyWidget.childWidgets.length;l++){var d=t.bodyWidget.childWidgets[l];d.containerWidget=s,d.containerWidget.containerWidget=i}-1===i.bodyWidgets.indexOf(s)&&(s.index=i.bodyWidgets.length,i.bodyWidgets.push(s),s.sectionFormat=i.page.bodyWidgets[i.page.bodyWidgets.length-1].sectionFormat),r&&(n.page.endnoteWidget=i)}G.isNullOrUndefined(i)||G.isNullOrUndefined(i.page)?this.layoutfootNote(i):(e=this.viewer.clientActiveArea.clone(),o=this.getBodyWidget(i.page.bodyWidgets[i.page.bodyWidgets.length-1],!0),this.viewer.updateClientArea(o,o.page),0<(o=this.getNextWidgetHeight(o))&&(this.viewer.clientActiveArea.height-=o-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=o),this.layoutfootNote(i),this.viewer.clientActiveArea=e)}},t.prototype.hasValidElement=function(e){var t=e.firstChild;if(t)for(var i=t.children[0];i;){if(i instanceof te&&(i=this.documentHelper.getNextValidElementForField(i),!G.isNullOrUndefined(i))&&!i.line.paragraph.equals(e))return!1;if(i instanceof ie||i instanceof ae)return!0;G.isNullOrUndefined(i)||(i=i.nextNode)}return!1},t.prototype.isConsiderAsEmptyLineWidget=function(e){for(var t=0;t<e.children.length;t++){var i=e.children[t];if(!(i instanceof re&&"Inline"!==i.textWrappingStyle)&&0<i.width)return!1}return!0},t.prototype.updateFieldText=function(e){var t=this.documentHelper.getFieldResult(e.fieldBegin,e.paragraph.bodyWidget.page);""!==t&&(e.text=t,this.documentHelper.textHelper.getTextSize(e,e.characterFormat))},t.prototype.checkLineWidgetWithClientArea=function(e,t){var i,r=!1;(e!==t.line||t.line===e&&G.isNullOrUndefined(t.nextElement)&&!t.line.isLastLine())&&(r=this.is2013Justification&&0<this.viewer.clientActiveArea.width,this.moveToNextLine(e),"Word2013"!==this.documentHelper.compatibilityMode&&this.isOverlapFloatTable&&(i=void 0,t.line.paragraph.previousRenderedWidget instanceof Q&&t.line.paragraph.previousRenderedWidget.wrapTextAround&&(i=t.line.paragraph.previousRenderedWidget,this.viewer.clientActiveArea.x=this.viewer.clientActiveArea.x-K.convertPointToPixel(i.firstChild.firstChild.leftMargin)),this.viewer.clientActiveArea.x+=e.paragraph.leftIndent,this.isOverlapFloatTable=!1),e!==t.line)&&(this.isRTLLayout=!1),t.line!==e&&this.viewer instanceof Tl&&this.viewer.clientActiveArea.height<t.height&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y?(this.moveToNextPage(this.viewer,t.line),this.viewer.clientActiveArea.height<t.height&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y&&this.moveToNextPage(this.viewer,t.line)):r&&G.isNullOrUndefined(t.nextElement)&&"Exactly"===t.line.paragraph.paragraphFormat.lineSpacingType&&!G.isNullOrUndefined(t.line.nextLine)&&this.viewer.clientActiveArea.height<t.line.height&&this.viewer instanceof Tl&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y?this.moveToNextPage(this.viewer,t.line.nextLine):t.line===e&&G.isNullOrUndefined(t.nextElement)&&e.paragraph.lastChild===e&&!e.isLastLine()&&0<=this.viewer.clientActiveArea.height&&this.moveFromNextPage(e)},t.prototype.checkAndSplitTabOrLineBreakCharacter=function(e,t){var i,r=K.indexOfAny(e,["\t","\v","\f"]);-1<r&&("\t"===(i=e[r])&&"\t"!==e||"\v"===i&&"\v"!==e||"\f"===i&&"\f"!==e)&&this.splitByLineBreakOrTab(this.viewer,t,r,i)},t.prototype.moveFromNextPage=function(e){var t,i=e.nextLine;i&&-1===e.paragraph.childWidgets.indexOf(i)&&(t=i.paragraph,i.paragraph.childWidgets.splice(i.indexInOwner,1),e.paragraph.childWidgets.push(i),i.paragraph=e.paragraph,0===t.childWidgets.length)&&t.destroy()},t.prototype.cutClientWidth=function(e,t,i){if(this.is2013Justification)return!1;this.clearLineMeasures();for(var r=e.line,n=r.marginTop=0,o=0;o<r.children.length;o++){var a=r.children[o];if(t&&(a instanceof ne||a instanceof oe)&&"Inline"===a.textWrappingStyle&&this.layoutShape(a),!this.isRelayoutOverlap&&a instanceof Rd&&"\t"===a.text&&(a.width=this.getTabWidth(r.paragraph,this.viewer,0,r,a)),n+=a.width,e===a)break}var s=this.viewer.clientActiveArea.width-n<0,l=e.line.paragraph.bodyWidget;return l&&0<l.floatingElements.length?(this.hasFloatingElement=!0,i||(this.isXPositionUpdated=!0),!1):(s?e.previousElement&&this.cutClientWidth(e.previousElement):(this.viewer.cutFromLeft(this.viewer.clientActiveArea.x+n),"Justify"===e.line.paragraph.paragraphFormat.textAlignment&&e instanceof ie&&this.splitTextElementWordByWord(e),G.isNullOrUndefined(e.nextElement)&&0<this.viewer.clientActiveArea.width&&!e.line.isLastLine()&&this.moveElementFromNextLine(r)),s)},t.prototype.layoutFieldCharacters=function(e){var t,i;0===e.fieldType?(!G.isNullOrUndefined(e.formFieldData)&&this.isInitialLoad&&this.checkAndUpdateFieldData(e),this.isFieldCode||G.isNullOrUndefined(e.fieldEnd)&&!e.hasFieldEnd||(-1===this.documentHelper.fieldStacks.indexOf(e)&&this.documentHelper.fieldStacks.push(e),this.isRelayout&&(t=K.trimEnd(this.documentHelper.editorProperties.getFieldCode(e)),this.isIFfield=K.startsWith(t,"IF")),this.isFieldCode=!0,e.hasFieldEnd=!0)):0<this.documentHelper.fieldStacks.length&&(2===e.fieldType?(i=this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1]).fieldSeparator!==e||G.isNullOrUndefined(i.fieldEnd)&&!i.hasFieldEnd||(this.isFieldCode=!1):e===(i=this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1]).fieldEnd&&(this.documentHelper.fieldStacks.pop(),this.isFieldCode=!1,this.isIFfield=!1))},t.prototype.getCheckBoxText=function(){return"Cross"===this.owner.documentEditorSettings.defaultCheckBoxOption?String.fromCharCode(9746):String.fromCharCode(9745)},t.prototype.checkAndUpdateFieldData=function(e){var t,i,r;e.hasFieldEnd&&!G.isNullOrUndefined(e.fieldEnd)&&(G.isNullOrUndefined(e.fieldSeparator)&&((t=new te(2)).fieldBegin=e,t.fieldEnd=e.fieldEnd,t.line=e.line,e.line.children.splice(e.fieldEnd.indexInOwner,0,t),e.fieldSeparator=t,e.fieldEnd.fieldSeparator=t),(t=e.fieldEnd.previousNode)instanceof te)&&2===t.fieldType&&((t=e.formFieldData)instanceof vd?((i=new ie).skipformFieldLength=!0,i.line=e.line,r=e.line.children.indexOf(e.fieldEnd),e.line.children.splice(r,0,i),i.characterFormat.copyFormat(e.characterFormat),t.checked?i.text=this.getCheckBoxText():i.text=String.fromCharCode(9744),this.setCheckBoxFontSize(t,i.characterFormat)):t instanceof xd&&((i=new ie).characterFormat.copyFormat(e.characterFormat),i.skipformFieldLength=!0,i.line=e.line,0<t.dropdownItems.length?G.isNullOrUndefined(t.selectedIndex)?i.text=t.dropdownItems[0]:i.text=t.dropdownItems[t.selectedIndex]:i.text=this.documentHelper.textHelper.repeatChar(this.documentHelper.textHelper.getEnSpaceCharacter(),5),r=e.line.children.indexOf(e.fieldEnd),e.line.children.splice(r,0,i)))},t.prototype.setCheckBoxFontSize=function(e,t){t.ownerBase instanceof ie&&(t.ownerBase.paragraph&&t.ownerBase.paragraph.isInsideTable||G.isNullOrUndefined(t.ownerBase.paragraph))&&(Hc=1.35),"Auto"!==e.sizeType?t.fontSize=e.size*Hc:t.fontSize=t.fontSize*Hc,Hc=1.4},t.prototype.layoutEmptyLineWidget=function(e,t,i,r){this.clearLineMeasures();for(var n,o=e.paragraphFormat,a=0,s=(r=!G.isNullOrUndefined(r)&&r,o.borders),l=this.documentHelper.canRenderBorder(e),d=this.documentHelper.textHelper.getParagraphMarkSize(e.characterFormat).Height,h=0,c=(0<e.childWidgets.length&&!r?(this.isUpdateMarginForCurrentLine(i),0<(n=e.childWidgets[e.childWidgets.length-1]).children.length&&((o.bidi||this.isContainsRtl(n))&&this.shiftElementsForRTLLayouting(n,o.bidi),x=n.isFirstLine(),m=n.isLastLine(),c=0,x&&(h=this.getBeforeSpacing(e),c=K.convertPointToPixel(o.firstLineIndent)),"Left"!==(W=o.textAlignment))&&this.viewer.textWrap&&("Justify"!==W||!m||"Justify"===W&&o.bidi)&&(a=(x=this.getSubWidth(n,"Justify"===W,0,c,m))[0].subWidth,x[0].spaceCount)):n=t?this.addLineWidget(e):i,n.isFirstLine()&&(h=this.getBeforeSpacing(e)),G.isNullOrUndefined(e.containerWidget)||!(0<e.bodyWidget.floatingElements.length)||e.containerWidget instanceof P||e.containerWidget instanceof ee&&e.containerWidget.ownerTable.containerWidget instanceof P||(((o=new ie).line=n).children.push(o),o.text="¶",o.characterFormat=e.characterFormat,o.width=this.documentHelper.textHelper.getTextSize(o,o.characterFormat),this.adjustPosition(o,e.bodyWidget,!0),r||(e.x+=o.padding.left),0!==o.padding.left&&(e.textWrapWidth=!0),t&&this.checkInbetweenShapeOverlap(n),n.children.splice(o.indexInOwner,1)),!(this.viewer instanceof Tl&&this.viewer.clientActiveArea.height<h+d&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y)||n.isFirstLine()&&G.isNullOrUndefined(n.paragraph.previousWidget)&&!n.isEndnoteLineWidget()||e.isSectionBreak||e.bodyWidget instanceof X||this.moveToNextPage(this.viewer,n),this.getLineSpacing(e,d)),g=("Word2003"===this.documentHelper.compatibilityMode&&c<0&&"Exactly"===e.paragraphFormat.lineSpacingType&&(c=Math.abs(c)),0),p=0,u=0,f=d=!isNaN(this.maxTextHeight)&&d<this.maxTextHeight?this.maxTextHeight:d,m=e.paragraphFormat.lineSpacingType,y=("Multiple"===m?d<c?p+=c-d:g+=c-d:("Exactly"===m||g+f+p<c)&&(g+=c-(g+f+p)),g+=h,p+=K.convertPointToPixel(this.getAfterSpacing(e)),"Multiple"!==m||!e.isEmpty()||G.isNullOrUndefined(e.bodyWidget)||this.viewer.clientActiveArea.y!==this.viewer.clientArea.y||0===e.bodyWidget.page.index||e.bodyWidget instanceof X||e.isSectionBreak||0!==e.bodyWidget.columnIndex||G.isNullOrUndefined(e.bodyWidget.previousSplitWidget)||(g-=h),"None"!=s.top.lineStyle&&n.isFirstLine()&&!l.skipTopBorder&&(g+=K.convertPointToPixel(s.top.lineWidth+s.top.space)),"None"!=s.bottom.lineStyle&&n.isLastLine()&&!l.skipBottomBorder&&(p+=K.convertPointToPixel(s.bottom.lineWidth+s.bottom.space)),n.renderedElements),v=0;v<y.length;v++){var W,b=y[v];(b instanceof se||e.paragraphFormat.bidi&&y[y.length-1]instanceof se)&&(u=0,"Right"===(W=e.paragraphFormat.textAlignment)&&0===v?u=a:"Center"===W&&0===v&&(u=a/2),b.margin=new Hl(u,g,0,p),(b.line=n).height=g+f+p)}n.margin=new Hl(0,g,0,p),n.height=g+f+p,this.adjustPositionBasedOnTopAndBottom(n);var x=K.convertPointToPixel(this.getAfterSpacing(e)),o=(0<x&&r&&!G.isNullOrUndefined(i)&&t&&n.isLastLine()&&(i.margin.bottom=Math.max(0,i.margin.bottom-x),i.height=Math.max(0,i.height-x),this.viewer.clientActiveArea.y-=x,this.viewer.clientActiveArea.height+=x),(G.isNullOrUndefined(e.nextRenderedWidget)&&e.isInsideTable&&e.previousRenderedWidget instanceof Q&&1==e.childWidgets.length||e.characterFormat.hidden)&&(n.height=0),e.previousRenderedWidget);e.isSectionBreak&&o instanceof Z&&0<e.index?(this.layoutSectionBreakParagraph(e,o),o.isEndsWithPageBreak&&this.moveToNextPage(this.viewer,n,!0)):(this.viewer.cutFromTop(this.viewer.clientActiveArea.y+n.height),(d=e.previousRenderedWidget)&&(c=d.getSplitWidgets(),e.isSectionBreak)&&0<c.length&&c[c.length-1]instanceof Q&&c[c.length-1].wrapTextAround&&this.viewer.cutFromTop(c[c.length-1].y+c[c.length-1].height)),this.wrapPosition=[]},t.prototype.layoutSectionBreakParagraph=function(e,t){var i=t.lastChild,r=e.firstChild;i.margin&&(r.margin=new Hl(0,i.margin.top,0,i.margin.bottom)),r.height=i.height,e.height=i.height,e.y=this.getLineYPosition(t),e.width=t.width,e.x=this.getLineXPosition(t)},t.prototype.getLineYPosition=function(e){for(var t=e.y,i=0;i<e.childWidgets.length-1;i++)t+=e.childWidgets[i].height;return t},t.prototype.hasVisibleElement=function(e){for(var t=0;t<e.children.length;t++)if(e.children[t]instanceof ie&&!e.children[t].characterFormat.hidden)return!0;return!1},t.prototype.getMergedParagraphOffset=function(e){var t=e.previousWidget,i=t.x+K.convertPointToPixel(t.paragraphFormat.firstLineIndent),e=e.x+K.convertPointToPixel(e.paragraphFormat.firstLineIndent);return i+this.getLineWidth(t.lastChild)+this.getHiddenParagraphMarkWidth(t)-e},t.prototype.getHiddenParagraphMarkWidth=function(e){for(var t=e.lastChild,i=t.children.length-1;0<=i;i--){var r,n,o=t.children[i];if(o instanceof ie)return r=(o=o.characterFormat).hidden,o.hidden=!1,n=this.documentHelper.textHelper.getParagraphMarkSize(o).Width,o.hidden=r,n}return 0},t.prototype.isMergedWithNextParagraph=function(e){var t=e.nextWidget;return e.characterFormat.hidden&&e.characterFormat.specVanish&&!e.isInsideTable&&1===e.childWidgets.length&&!e.isEmpty()&&this.hasVisibleElement(e.childWidgets[0])&&!e.isEndsWithPageBreak&&!e.isEndsWithColumnBreak&&t instanceof Z&&!t.isSectionBreak&&!t.isEmpty()},t.prototype.getLineXPosition=function(e){var t=e.lastChild,i=this.documentHelper.textHelper.getParagraphMarkSize(e.characterFormat);return e.x+this.getLineWidth(t)+i.Width},t.prototype.getLineWidth=function(e){for(var t=0,i=0;i<e.children.length;i++)e.children[i]instanceof ne||(t+=e.children[i].width);return t},t.prototype.isUpdateMarginForCurrentLine=function(e){var t=!0;if(!G.isNullOrUndefined(e)&&!e.isFirstLine()){for(var i=0;i<e.children.length;i++)if(!(e.children[i]instanceof Ch||e.children[i]instanceof xh)){t=!1;break}t&&(e.margin=new Hl(0,0,0,0))}},t.prototype.adjustPositionBasedOnTopAndBottom=function(e){!G.isNullOrUndefined(e.paragraph.bodyWidget)&&!G.isNullOrUndefined(e.paragraph.bodyWidget.page.headerWidget)&&0<e.paragraph.bodyWidget.page.headerWidget.floatingElements.length&&e.paragraph===e.paragraph.bodyWidget.childWidgets[0]&&0===e.indexInOwner&&this.checkInbetweenShapeOverlap(e,e.paragraph.bodyWidget.page.headerWidget.floatingElements)},t.prototype.layoutListItems=function(e,t){this.isFieldCode||(!G.isNullOrUndefined(e.paragraphFormat)&&!G.isNullOrUndefined(e.paragraphFormat.listFormat)&&!G.isNullOrUndefined(this.documentHelper.getListById(e.paragraphFormat.listFormat.listId))&&0<=e.paragraphFormat.listFormat.listLevelNumber&&e.paragraphFormat.listFormat.listLevelNumber<9&&!t?(this.clearListElementBox(e),this.layoutList(e,this.documentHelper)):e.paragraphFormat.listFormat&&-1===e.paragraphFormat.listFormat.listId&&this.clearListElementBox(e))},t.prototype.layoutList=function(e,t){var i=t.getListById(e.paragraphFormat.listFormat.listId),r=e.paragraphFormat.listFormat.listLevelNumber,n=this.getListLevel(i,r);if(!G.isNullOrUndefined(n)&&!G.isNullOrUndefined(n.numberFormat)){var o=e.childWidgets[0],a=(G.isNullOrUndefined(o)&&(o=new ad(e),e.childWidgets.push(o)),new se(n,!1)),s=!1;if(e.characterFormat.hidden){if(e.isEmpty())s=!0;else for(var l=o.children[0];l;){if(l.isValidNodeForTracking&&!l.characterFormat.hidden){s=!1;break}s=!0,l=l.nextNode}s&&(a.characterFormat.hidden=!0)}a.line=o,"Bullet"===n.listLevelPattern?(a.text=n.numberFormat,this.updateListValues(i,r)):a.text=this.getListNumber(e);var d,i="None"!==n.listLevelPattern&&0!==e.paragraphFormat.firstLineIndent&&"None"!==n.followCharacter;""===n.numberFormat&&!i||(this.viewer.updateClientWidth(-K.convertPointToPixel(e.paragraphFormat.firstLineIndent)),(this.documentHelper.isIosDevice||this.documentHelper.isLinuxOS)&&(r=(r=a.text)===String.fromCharCode(61623)?String.fromCharCode(9679):r===String.fromCharCode(61551)+String.fromCharCode(32)?String.fromCharCode(9675):r)!==a.text&&(a.text=r),t.textHelper.updateTextSize(a,e),a.text&&-1<a.text.indexOf("")?2===(i=a.text.split("")).length&&(r=t.textHelper.getWidth(i[0],e.characterFormat),i=t.textHelper.getWidth(i[1],e.characterFormat),a.dualWidths={w1:r,w2:i},a.width=r+i):a.dualWidths=void 0,this.applyListNumberAlignment(a,n,e),this.viewer instanceof Tl&&this.viewer.clientActiveArea.height<a.height&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y&&(d=!0),this.viewer.cutFromLeft(this.viewer.clientActiveArea.x+a.width),r=a,o.children.splice(0,0,a),"None"!==n.followCharacter&&(a=new se(n,!0),s&&(a.characterFormat.hidden=!0),"Tab"===n.followCharacter?(a.text="\t",i=o.children.indexOf(a),i=this.getTabWidth(e,this.viewer,i,o,a),"Right"!==n.numberAlignment||0!==e.paragraphFormat.firstLineIndent||e.paragraphFormat.bidi||"Word2003"===t.compatibilityMode||(i=0),t.textHelper.updateTextSize(a,e),s||(a.width=i)):(a.text=" ",t.textHelper.updateTextSize(a,e)),this.viewer.cutFromLeft(this.viewer.clientActiveArea.x+a.width),o.children.splice(1,0,a),a.line=o),G.isNullOrUndefined(e.containerWidget)||!(0<e.bodyWidget.floatingElements.length)||r instanceof ne||e.containerWidget instanceof P||(this.adjustPosition(r,r.line.paragraph.bodyWidget),r instanceof se&&r.padding&&0<r.padding.left&&e.paragraphFormat.firstLineIndent<0&&(r.padding.left-=K.convertPointToPixel(r.line.paragraph.paragraphFormat.firstLineIndent)),this.isYPositionUpdated&&(this.viewer.clientActiveArea.width>r.width+a.width&&(this.viewer.clientActiveArea.width-=r.width+a.width),this.isYPositionUpdated=!1)),d?(this.moveToNextPage(this.viewer,o,void 0,!0),this.cutClientWidth(a),this.hasFloatingElement=!1,this.isXPositionUpdated=!1):"None"!==n.followCharacter&&this.viewer.updateClientWidth(K.convertPointToPixel(e.paragraphFormat.firstLineIndent)))}},t.prototype.applyListNumberAlignment=function(e,t,i){e.alignmentShift=0,"Left"!==t.numberAlignment&&!i.paragraphFormat.bidi&&0<e.width&&(i="Center"===t.numberAlignment?e.width/2:0,e.alignmentShift=e.width-i,e.width=i)},t.prototype.addBodyWidget=function(e,t){t=t||new Y;return t.width=e.width,t.x=e.x,t.y=e.y,t},t.prototype.addListLevels=function(e){for(var t=e.levels.length;t<9;t++){var i=new Nc(e),r=t%3;"Bullet"===e.levels[0].listLevelPattern?(i.listLevelPattern="Bullet",i.numberFormat=0==r?String.fromCharCode(61623):1==r?String.fromCharCode(61551)+String.fromCharCode(32):String.fromCharCode(61607),i.characterFormat.fontFamily=i.numberFormat===String.fromCharCode(61607)?"Wingdings":"Symbol"):(i.listLevelPattern=this.getListLevelPattern(r),i.numberFormat="%"+(t+1).toString()+".",i.startAt=1,i.restartLevel=t),i.paragraphFormat=new vl(void 0),i.paragraphFormat.leftIndent=48*(t+1),i.paragraphFormat.firstLineIndent=-24,e.levels.push(i)}},t.prototype.addSplittedLineWidget=function(e,t,i){var r=t;if(this.isWrapText)G.isNullOrUndefined(i)||(e.children.splice(r+1,0,i),i.line=e);else{var t=!1,n=e.paragraph,o=[],a=n.childWidgets.indexOf(e),s=(G.isNullOrUndefined(i)||o.push(i),void 0),l=e.children[r];if(G.isNullOrUndefined(l))G.isNullOrUndefined(i)||(e.children.splice(e.children.length,0,i),i.line=e);else{l instanceof ac&&0===l.commentType&&0!=r?r-=1:l.isColumnBreak&&G.isNullOrUndefined(l.nextNode)&&(t=!0);for(var d=e.children[r];0<r&&d instanceof Md&&0===d.bookmarkType&&G.isNullOrUndefined(d.properties);)d=e.children[--r];for(var h=r+1;h<e.children.length;h++)o.push(e.children[h]);if(0<o.length||t){for(var s=a===n.childWidgets.length-1?new ad(n):n.childWidgets[a+1],c=0;c<o.length;c++)o[c].line=s;0<o.length&&(e.children.splice(r+1,e.children.length-1),!G.isNullOrUndefined(e.layoutedElements)&&0<e.layoutedElements.length&&e.layoutedElements.splice(r+1,e.layoutedElements.length-1),s.children=o.concat(s.children)),-1===n.childWidgets.indexOf(s)&&n.childWidgets.splice(a+1,0,s)}}}},t.prototype.addElementToLine=function(e,t){t instanceof re&&"Inline"!==t.textWrappingStyle||(this.isWrapText&&(this.isWrapText=!1,this.viewer.clientActiveArea.width=this.viewer.clientArea.right-this.viewer.clientActiveArea.x),this.viewer.cutFromLeft(this.viewer.clientActiveArea.x+t.width)),"Justify"===e.paragraphFormat.textAlignment&&t instanceof ie&&this.splitTextElementWordByWord(t),t instanceof ae&&(t.line.skipClipImage=!t.isInlineImage)},t.prototype.splitElementForClientArea=function(e,t){var i,r;0<t.line.children.length&&(i=t.previousElement,r=t.indexInOwner,1<t.line.children.length&&i&&this.viewer.clientActiveArea.x!==this.viewer.clientArea.x&&--r,this.addSplittedLineWidget(t.line,r))},t.prototype.splitByWord=function(e,t,i,r,n,o){var a,s,n=this.getSplitIndexByWord(this.viewer.clientActiveArea.width,r,n,o,i.scriptType);0<n&&n<i.length&&(s=e.children.indexOf(i),a=new ie,r=r.substring(n)," "===(a.text=r)[0]&&(n+=r.length-(r=K.trimStart(r)).length),a.characterFormat.copyFormat(i.characterFormat),a.width=this.documentHelper.textHelper.getWidth(a.text,o,a.scriptType)," "===a.text[a.text.length-1]?a.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(a.text),o,a.scriptType):a.trimEndWidth=a.width,a.characterRange=i.characterRange,a.scriptType=i.scriptType,i.text=i.text.substr(0,n)," "!==i.text&&K.endsWith(i.text)&&o.bidi&&i.characterRange===j.CharacterRangeType.RightToLeft&&!this.isWrapText&&(r=this.spitTextElementByWhitespace(i,o),s=e.children.indexOf(r)),i.width=this.documentHelper.textHelper.getWidth(i.text,i.characterFormat,i.scriptType)," "===i.text[i.text.length-1]?i.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(i.text),i.characterFormat,i.scriptType):i.trimEndWidth=i.width,0<i.revisionLength&&this.updateRevisionForSplittedElement(i,a,!0),a.height=i.height,a.baselineOffset=i.baselineOffset,this.splitErrorCollection(i,a),this.addSplittedLineWidget(e,s,a),this.addElementToLine(t,i),0===i.width)&&e.children.splice(s,1)},t.prototype.spitTextElementByWhitespace=function(e,t){var i=e.line,r=i.children.indexOf(e),n=e.text,o=new ie,a=n.length-1;return e.text=n.substring(0,a),o.text=n.substring(a),o.characterFormat.copyFormat(e.characterFormat),o.line=i,o.characterRange=j.CharacterRangeType.WordSplit,o.scriptType=e.scriptType,o.height=e.height,o.baselineOffset=e.baselineOffset,o.width=this.documentHelper.textHelper.getWidth(o.text,t,o.scriptType),i.children.splice(r+1,0,o),0<e.revisionLength&&this.updateRevisionForSplittedElement(e,o,0<a,!0),o},t.prototype.splitErrorCollection=function(e,t){if(0<e.errorCollection.length){for(var i=[],r=e.ignoreOnceItems,n=0;n<e.errorCollection.length;n++)i.push(e.errorCollection[n]);for(var o=0;o<e.errorCollection.length;o++){var a=e.text.indexOf(e.errorCollection[o].text),s=e.errorCollection[o];a<0?(i.splice(0,1),t.errorCollection.push(s)):0<t.text.indexOf(s.text)&&t.errorCollection.push(s)}t.ignoreOnceItems=r,e.ignoreOnceItems=[],e.errorCollection=i}},t.prototype.splitByCharacter=function(e,t,i,r,n){var o,a=e.paragraph,s="AtLeast"===a.paragraphFormat.lineSpacingType?a.paragraphFormat.afterSpacing:0,r=this.getTextSplitIndexByCharacter(this.viewer.clientArea.width,this.viewer.clientActiveArea.width,i,r,n,t.scriptType);0===r&&t.previousNode instanceof ae&&"Right"===t.previousNode.textWrappingType||((r=(o=0)===r&&!G.isNullOrUndefined(t)&&0<t.length&&Math.max(t.height,s)<=this.viewer.clientArea.height&&0===this.viewer.clientActiveArea.width&&0===e.children.indexOf(t)?1:r)<t.length&&(o=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(i.substring(0,r),n,t.scriptType),i=i.substring(r)),o>this.viewer.clientActiveArea.width&&0<t.indexInOwner?this.addSplittedLineWidget(e,t.indexInOwner-1):(s=e.children.indexOf(t),r<t.length?((o=new ie).text=i,o.errorCollection=t.errorCollection,o.canTrigger=t.canTrigger,o.scriptType=t.scriptType,t.text=t.text.substr(0,r),o.characterFormat.copyFormat(t.characterFormat),o.width=this.documentHelper.textHelper.getWidth(o.text,n,o.scriptType)," "===o.text[o.text.length-1]?o.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(o.text),n,o.scriptType):o.trimEndWidth=o.width,o.characterRange=t.characterRange,t.width=this.documentHelper.textHelper.getWidth(t.text,n,t.scriptType)," "===t.text[t.text.length-1]?t.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(t.text),n,t.scriptType):t.trimEndWidth=t.width,o.height=t.height,o.baselineOffset=t.baselineOffset,e.children.splice(t.indexInOwner+1,0,o),0<t.revisionLength&&this.updateRevisionForSplittedElement(t,o,0<r),this.addElementToLine(a,t),this.addSplittedLineWidget(e,s),0===t.width&&e.children.splice(s,1)):(this.addSplittedLineWidget(e,s),this.addElementToLine(a,t))))},t.prototype.updateRevisionForSplittedElement=function(e,t,i,r){if(0<e.revisionLength)for(var n=0;n<e.revisionLength;n++){var o=e.getRevision(n);t.addRevision(o)}},t.prototype.splitTextElementWordByWord=function(e){var t=e.line,i=a=t.children.indexOf(e),r=e.padding.left;if((e.padding.left=0)<=(s=e.text).trim().indexOf(" ")){t.children.splice(a,1);for(var n,o,a,s,l=e.characterFormat,d=e.length-K.trimStart(s).length;d<e.length&&0!==(d=this.getTextIndexAfterSpace(s,d))&&d!==e.length;)d<e.length&&(n=new ie,o=s.substring(0,d)," "===(s=s.substring(d)).substring(0,1)&&(d+=s.length-K.trimStart(s).length),n.text=o,n.characterFormat.copyFormat(e.characterFormat),n.line=t,n.height=e.height,n.baselineOffset=e.baselineOffset,n.characterRange=e.characterRange,n.scriptType=e.scriptType,t.children.splice(a,0,n),0<e.revisionLength&&this.updateRevisionForSplittedElement(e,n,0<d,!0)," "!==n.text&&K.endsWith(n.text)&&l.bidi&&n.characterRange===j.CharacterRangeType.RightToLeft&&(o=this.spitTextElementByWhitespace(n,l),a=t.children.indexOf(o)),n.width=this.documentHelper.textHelper.getWidth(n.text,l,n.scriptType)," "===n.text[n.text.length-1]?n.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(n.text),l,n.scriptType):n.trimEndWidth=n.width,e.text=s,e.width=this.documentHelper.textHelper.getWidth(e.text,e.characterFormat,e.scriptType)," "===e.text[e.text.length-1]?e.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(e.text),e.characterFormat,e.scriptType):e.trimEndWidth=e.width,0===e.width&&-1!==t.children.indexOf(e)&&t.children.splice(t.children.indexOf(e),1),d=0,a++);e.text=s,t.children.splice(a,0,e)}t.children[i].padding.left=r},t.prototype.isSplitByHyphen=function(e,t){if(!G.isNullOrUndefined(e.previousElement)&&(e.previousElement instanceof ie||e.previousElement instanceof se))return e=e.previousElement.text,"-"===t.substring(0,1)&&" "!==e.substring(e.length-1,e.length);return"-"===t.substring(0,1)},t.prototype.splitTextForClientArea=function(e,t,i,r,n){var o=e.paragraph,a=!0,s=-1;if(" "===i.substring(0,1)||this.isSplitByHyphen(t,i))s=1;else{var l=r,d=K.trimEnd(i),h=d.indexOf(" "),d=d.indexOf("-"),s=-1!==h&&-1!==d?Math.min(h,d)+1:-1!==h?h+1:-1!==d?d+1:0;if(0<s&&(l=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(i.slice(0,s),n,t.scriptType)),K.round(this.viewer.clientActiveArea.width,4)<K.round(l,4)&&!this.documentHelper.textHelper.isUnicodeText(i,t.scriptType)&&!this.isWordFittedByJustification(t,l,!1)&&(a=this.checkPreviousElement(e,e.children.indexOf(t))))return}h=!0,this.documentHelper.textHelper.isUnicodeText(i,t.scriptType)&&3===t.scriptType&&i.length-1===i.indexOf(" ")&&(h=!1),this.documentHelper.textHelper.isUnicodeText(i,t.scriptType)&&"Word2013"===this.documentHelper.compatibilityMode&&"Justify"!==t.paragraph.paragraphFormat.textAlignment&&(a=!1),d=!0;r>this.viewer.clientActiveArea.width&&1<i.length&&/^-+$/.test(i)&&0===this.getSplitIndexByWord(this.viewer.clientActiveArea.width,i,r,n,t.scriptType)&&(d=!1),r<=this.viewer.clientActiveArea.width?this.addElementToLine(o,t):a&&(0<s||-1!==i.indexOf(" ")&&h||-1!==i.indexOf("-"))&&d?this.splitByWord(e,o,t,i,r,n):this.isRtlNonBreakableNumeric(t,i)?this.addSplittedLineWidget(e,e.children.indexOf(t)-1):this.splitByCharacter(e,t,i,r,n)},t.prototype.isRtlNonBreakableNumeric=function(e,t){t=/^(?!.*\\).*?\d+(?:[./-]\d*)+(?:[a-zA-Z]+)?\b.*$/.test(t);return"Word2013"!==this.documentHelper.compatibilityMode&&e.characterFormat.bidi&&!this.documentHelper.textHelper.isRightToLeftLanguage(e.characterFormat.localeIdBidi)&&t},t.prototype.splitByLineBreakOrTab=function(e,t,i,r){var n,o=t.line.children.indexOf(t),a=t.text,s=a.substring(i),l=new("\t"===r?Rd:ie);l.line=t.line,this.updateRevisionForSplittedElement(t,l,!0),l.characterFormat.copyFormat(t.characterFormat),l.characterRange=t.characterRange,t.line.children.splice(o+1,0,l),t.isWidthUpdated=!1,0<i&&1===s.length?(l.text=a.substring(i),t.text=a.substring(0,i)):0<i?(l.text=r,(n=new ie).line=t.line,n.text=a.substring(i+1),this.updateRevisionForSplittedElement(t,n,!0),n.characterFormat.copyFormat(t.characterFormat),n.characterRange=t.characterRange,t.line.children.splice(o+2,0,n),t.text=a.substring(0,i)):""!==s&&(l.text=a.substring(i+1),t.text=r)},t.prototype.updateMargin=function(e){for(var t,i=e.paragraph,r=i.paragraphFormat,n=e.isFirstLine(),o=e.isLastLine(),a=0,s=0,l=0,d=0,h=0,c=0,g=r.borders,p=(this.clearLineMeasures(),this.updateLineWidget(e,r),s=(a=this.maxTextHeight)-this.maxTextBaseline,0),u=this.documentHelper.canRenderBorder(i),f=(!i.bodyWidget||i.bodyWidget instanceof X||(p=this.documentHelper.pages.indexOf(i.bodyWidget.page)),n&&(d=this.getBeforeSpacing(i,!0),c=K.convertPointToPixel(r.firstLineIndent)),o&&(l=K.convertPointToPixel(this.getAfterSpacing(i))),(r.bidi||this.isContainsRtl(e))&&(this.shiftElementsForRTLLayouting(e,r.bidi),this.isRTLLayout=!0),s=isNaN(this.maxTextHeight)?(a=(n=this.documentHelper.textHelper.measureText("a",i.characterFormat)).Height)-n.BaselineOffset:(a=this.maxTextHeight)-this.maxTextBaseline,h=this.getLineSpacing(i,a),0===a&&"Multiple"===r.lineSpacingType&&this.isImageOnlyLine(e)&&(a=this.documentHelper.textHelper.measureText("a",i.characterFormat).Height,h=this.getLineSpacing(i,a)),(e.skipClipImage||14<=i.paragraphFormat.lineSpacing||h<0)&&"Exactly"===r.lineSpacingType&&h<s+this.maxBaseline&&(h=s+this.maxBaseline),0),m=0,y=r.textAlignment,v=("Left"!==y&&this.viewer.textWrap&&("Justify"!==y||!o||"Justify"===y&&r.bidi||this.is2013Justification&&o)&&(f=(t=this.getSubWidth(e,"Justify"===y,m,c,o))[0].subWidth,m=t[0].spaceCount,t[0].totalSpaceCount,t[0].trimmedSpaceWidth,e.isEndsWithPageBreak||e.isEndsWithColumnBreak||e.isEndsWithLineBreak||e.paragraph.bidi||this.isRTLLayout),!1),W=0,b=r.lineSpacingType,x=!1,w=e.renderedElements,F=this.viewer.clientArea.x,C=!0,P=0;P<w.length;P++){var T=0,O=0,S=w[P];if(C&&!S.characterFormat.hidden&&(C=!1),!G.isNullOrUndefined(t)&&x&&0<S.padding.left&&t.length>W+1&&(N=f,"Justify"===y?N=f*t[W].spaceCount:"Center"===y&&(N=f/2),S.padding.left=S.padding.left-N,f=(N=t[++W]).subWidth,m=N.spaceCount),!(S instanceof re&&"Inline"!==S.textWrappingStyle)){var x=!0,N=this.alignLineElements(S,T,O,s,v,f,y,m,P===w.length-1);if("Justify"===y&&S instanceof re&&"Inline"===S.textWrappingStyle&&0!==f&&(S.x=F,S instanceof ne))for(var I=0;I<S.textFrame.childWidgets.length;I++){var k=S.textFrame.childWidgets[I],A=k.bidi?k.rightIndent:k.leftIndent;k.x=F+K.convertPointToPixel(A+S.textFrame.marginLeft)}F+=S.width,e.maxBaseLine=this.maxBaseline,T=N.topMargin,O=N.bottomMargin,v=N.addSubWidth,m=N.whiteSpaceCount,"Multiple"===b?a<h?O+=h-a:T+=h-a:("Exactly"===b||h>T+S.height+O)&&(T+=h-(T+S.height+O)),0<p&&i===i.bodyWidget.childWidgets[0]&&this.documentHelper.pages[p].sectionIndex===this.documentHelper.pages[p-1].sectionIndex?T+=0:T+=d,"None"!=g.top.lineStyle&&e.isFirstLine()&&!u.skipTopBorder&&(T+=K.convertPointToPixel(g.top.lineWidth+g.top.space)),"None"!=g.bottom.lineStyle&&e.isLastLine()&&!u.skipBottomBorder&&(O+=K.convertPointToPixel(g.bottom.lineWidth+g.bottom.space)),O+=l,S.margin=new Hl(0,T,0,O),S.line=e}}},t.prototype.moveToNextLine=function(e,t,i,r){var n,o=e.paragraph,a=o.paragraphFormat,s=e.isFirstLine(),l=e.isLastLine(),d=0,h=0,c=0,g=0,p=0,u=0,f=a.borders,m=(this.updateLineWidget(e,a),h=(d=this.maxTextHeight)-this.maxTextBaseline,0),y=!1,H=this.documentHelper.canRenderBorder(o),v=(!o.bodyWidget||o.bodyWidget instanceof X||(m=this.documentHelper.pages.indexOf(o.bodyWidget.page)),s&&(g=this.getBeforeSpacing(o,!0),u=K.convertPointToPixel(a.firstLineIndent)),l&&(c=K.convertPointToPixel(this.getAfterSpacing(o))),(a.bidi||this.isContainsRtl(e))&&(this.shiftElementsForRTLLayouting(e,a.bidi),this.isRTLLayout=!0),h=isNaN(this.maxTextHeight)?(d=(s=this.documentHelper.textHelper.measureText("a",o.characterFormat)).Height)-s.BaselineOffset:(d=this.maxTextHeight)-this.maxTextBaseline,p=this.getLineSpacing(o,d),0===d&&"Multiple"===a.lineSpacingType&&this.isImageOnlyLine(e)&&(d=this.documentHelper.textHelper.measureText("a",o.characterFormat).Height,p=this.getLineSpacing(o,d)),(e.skipClipImage||14<=o.paragraphFormat.lineSpacing||p<0)&&"Exactly"===a.lineSpacingType&&p<h+this.maxBaseline&&(p=h+this.maxBaseline),0),W=0,b=a.textAlignment,s=0,x=0;if("Left"!==b&&this.viewer.textWrap&&("Justify"!==b||!l||"Justify"===b&&(a.bidi||e.isEndsWithLineBreak)||this.is2013Justification&&l)&&(v=(n=this.getSubWidth(e,"Justify"===b,W,u,l))[0].subWidth,W=n[0].spaceCount,s=n[0].totalSpaceCount,x=n[0].trimmedSpaceWidth,y=e.isEndsWithPageBreak||e.isEndsWithColumnBreak||e.isEndsWithLineBreak||e.paragraph.bidi||this.isRTLLayout),!r&&!y&&n&&1===n.length&&0<this.viewer.clientActiveArea.width&&!l&&!this.is2013Justification&&"Justify"===b&&"Word2013"===this.documentHelper.compatibilityMode)u=this.viewer.clientActiveArea.width,r=this.getTotalSpaceWidth(e),y=0,this.viewer.clientActiveArea.x-=y=u/s/(r/s)*100<=33?r/8:r/4,this.viewer.clientActiveArea.width+=y,this.is2013Justification=!0,t?this.splitParagraphForMultiColumn(e,i):(this.moveElementFromNextLine(e),this.nextElementToLayout=e.children[e.children.length-1]);else{this.is2013Justification&&l&&0<v&&(W=v=0),this.is2013Justification=!1,this.nextElementToLayout=void 0;for(var R=!1,w=0,q=a.lineSpacingType,E=!1,F=e.renderedElements,M=0,V=0,D=0,z=this.viewer.clientArea.x,C=!0,P=0;P<F.length;P++){var T=0,O=0,S=0,N=F[P];if(C&&!N.characterFormat.hidden&&(C=!1),!G.isNullOrUndefined(n)&&E&&0<N.padding.left&&n.length>w+1&&(I=v,"Justify"===b?I=v*n[w].spaceCount:"Center"===b&&(I=v/2),N.padding.left=N.padding.left-I,v=(I=n[++w]).subWidth,W=I.spaceCount),!(N instanceof re&&"Inline"!==N.textWrappingStyle)){var E=!0,I=this.alignLineElements(N,T,O,h,R,v,b,W,P===F.length-1);if("Justify"===b&&N instanceof re&&"Inline"===N.textWrappingStyle&&0!==v&&(N.x=z,e.paragraph.firstChild===e&&e.paragraph.paragraphFormat.firstLineIndent<0&&(N.x+=K.convertPointToPixel(e.paragraph.paragraphFormat.firstLineIndent)),N instanceof ne))for(var k=0;k<N.textFrame.childWidgets.length;k++){var _=(U=N.textFrame.childWidgets[k]).bidi?U.rightIndent:U.leftIndent;U.x=N.x+K.convertPointToPixel(_+N.textFrame.marginLeft)}z+=N.width,e.maxBaseLine=this.maxBaseline,T=I.topMargin,O=I.bottomMargin,R=I.addSubWidth,W=I.whiteSpaceCount,"Multiple"===q?d<p?O+=p-d:T+=p-d:("Exactly"===q||p>T+N.height+O)&&(T+=p-(T+N.height+O)),0<m&&o===o.bodyWidget.childWidgets[0]&&this.documentHelper.pages[m].sectionIndex===this.documentHelper.pages[m-1].sectionIndex?T+=0:T+=g,"None"!=f.top.lineStyle&&e.isFirstLine()&&!H.skipTopBorder&&(T+=K.convertPointToPixel(f.top.lineWidth+f.top.space)),"None"!=f.bottom.lineStyle&&e.isLastLine()&&!H.skipBottomBorder&&(O+=K.convertPointToPixel(f.bottom.lineWidth+f.bottom.space)),O+=c;var A=0<P?F[P-1]:void 0;if((0===P||!(N instanceof re&&"Inline"!==N.textWrappingStyle)&&A instanceof re&&"Inline"!==A.textWrappingStyle&&A.indexInOwner<N.indexInOwner&&this.checkPrevElementTextWrappingStyle(e,P)||0<N.padding.left)&&(e.height=T+N.height+O,"Right"===b||"Justify"===b&&a.bidi&&(l||x<0)?S=x<0?x:v:"Center"===b&&(S=v<0?v:v/2)),N.margin=new Hl(S,T,0,O),N.line=e,M<N.height&&(M=N.height,V=N.margin.bottom,D=N.margin.top),(N instanceof ne||N instanceof oe)&&"Inline"===N.textWrappingStyle){if(0!==P||0<N.margin.left){var L=F[0].margin.left;if(N.x+=L,N instanceof oe)this.updateNestedGroupShapeX(N,L);else for(var U,j=N.textFrame.childWidgets,B=0;B<j.length;B++)(U=j[B])instanceof Q?U.updateChildWidgetLeft(U.x+L):U.x+=L}this.updateShapeYPosition(N)}}}C&&(e.height=0),e.margin=new Hl(0,D,0,V),this.adjustPositionBasedOnTopAndBottom(e),this.checkInbetweenShapeOverlap(e),!t&&e.isLastLine()&&0===e.indexInOwner&&e.paragraph.paragraphFormat.widowControl?(u=e.paragraph.previousSplitWidget,G.isNullOrUndefined(u)||u.isEndsWithPageBreak||u.isEndsWithColumnBreak||0===u.indexInOwner||(s=u.childWidgets.length-1,2===u.childWidgets.length&&(s=0),this.splitParagraph(u,s,e.paragraph),this.updateClientAreaForNextBlock(e,e.paragraph))):t&&this.splitParagraphForMultiColumn(e,i),t||this.viewer.cutFromTop(this.viewer.clientActiveArea.y+e.height),this.wrapPosition=[]}},t.prototype.isImageOnlyLine=function(e){for(var t=!1,i=0;i<e.children.length;i++){var r=e.children[i];if(r instanceof ae&&"Inline"===r.textWrappingStyle)t=!0;else if(!(r instanceof ie&&0===r.text.length))return!1}return t},t.prototype.checkPrevElementTextWrappingStyle=function(e,t){for(var i=t-1;0<=i;i--){var r=e.children[i];if(!(r instanceof re&&"Inline"!==r.textWrappingStyle))return!1}return!0},t.prototype.updateNestedGroupShapeX=function(e,t){for(var i=e.childWidgets,r=0;r<i.length;r++){var n=i[r];if(n.x+=t,n instanceof ne)for(var o=0;o<n.textFrame.childWidgets.length;o++){var a=n.textFrame.childWidgets[o];a instanceof Q?a.updateChildWidgetLeft(a.x+t):a.x+=t}else n instanceof oe&&this.updateNestedGroupShapeX(n,t)}},t.prototype.updateNestedGroupShapeY=function(e,t){for(var i=e.childWidgets,r=0;r<i.length;r++){var n=i[r];if(n.y+=t,n instanceof ne)for(var o=0;o<n.textFrame.childWidgets.length;o++){var a=n.textFrame.childWidgets[o];a.y+=t,a instanceof Q&&(this.updateChildLocationForTable(a.y,a),this.updateWidgetsToPage([a],[],a,!0))}else n instanceof oe&&this.updateNestedGroupShapeY(n,t)}},t.prototype.updateShapeYPosition=function(e){if(e.y+=e.margin.top,e instanceof oe)this.updateNestedGroupShapeY(e,e.margin.top);else for(var t=e.textFrame.childWidgets,i=0;i<t.length;i++){var r=t[i];r.y+=e.margin.top,r instanceof Q&&(this.updateChildLocationForTable(r.y,r),this.updateWidgetsToPage([r],[],r,!0))}},t.prototype.getBodyWidget=function(e,t){if(t)for(;e&&0!==e.columnIndex;)e=e.previousRenderedWidget;else for(;e&&!G.isNullOrUndefined(e.nextRenderedWidget)&&e.columnIndex!==e.sectionFormat.numberOfColumns-1&&e.index===e.nextRenderedWidget.index;)e=e.nextRenderedWidget;return e},t.prototype.splitParagraphForMultiColumn=function(e,t){this.splitParagraph(e.paragraph,t,void 0),G.isNullOrUndefined(e.paragraph.previousRenderedWidget)&&0==t||!G.isNullOrUndefined(e.paragraph.previousRenderedWidget)&&e.paragraph.previousRenderedWidget.bodyWidget.sectionIndex!==e.paragraph.bodyWidget.sectionIndex?this.moveBlocksToNextPage(e.paragraph):this.moveBlocksToNextPage(e.paragraph.previousRenderedWidget);var t=this.viewer.clientActiveArea.height;this.viewer.updateClientArea(e.paragraph.bodyWidget,e.paragraph.bodyWidget.page),this.viewer.clientActiveArea.y=e.paragraph.bodyWidget.y,this.viewer.clientActiveArea.height=t,!e.paragraph.bodyWidget.sectionFormat.equalWidth&&e.paragraph.bodyWidget.sectionFormat.numberOfColumns-1!==e.paragraph.bodyWidget.columnIndex||(t=e.paragraph,this.documentHelper.blockToShift=t,this.shiftLayoutedItems(!1,!0))},t.prototype.checkInbetweenShapeOverlap=function(o,e){var a,s,l,d,h,c=this;o.paragraph.containerWidget instanceof P||!o.paragraph.bodyWidget||(s=this.getLineY(o),l=o.paragraph.isInsideTable,d=o.paragraph.y,h=!0,G.isNullOrUndefined(e)&&(h=!1,e=o.paragraph.bodyWidget.floatingElements),e.sort(function(e,t){return e.y-t.y}),e.forEach(function(e){var t,i,r,n;l&&e.line&&!e.line.paragraph.isInsideTable||G.isNullOrUndefined(e.line)||(t="TopAndBottom"===e.textWrappingStyle&&e instanceof ae&&!o.paragraph.isEmpty()?new _(o.paragraph.x,c.viewer.clientActiveArea.y,o.paragraph.width,o.children[0].height):new _(o.paragraph.x,c.viewer.clientActiveArea.y,o.paragraph.width,o.height),i=new _(e.x,e.y-e.distanceTop,e.width,e.height),e.line&&c.isRelayout&&c.documentHelper.hooks.isBlockExistAfter&&(!c.isRelayoutOverlap&&c.documentHelper.hooks.isBlockExistAfter(e.line.paragraph,o.paragraph)||c.isRelayoutOverlap&&c.documentHelper.hooks.isBlockExistAfter(e.line.paragraph,c.endOverlapWidget)))||(r="TopAndBottom"===e.textWrappingStyle,n=e.y+e.height+e.distanceBottom-s,a&&r&&a.y+a.height+a.distanceBottom+o.height>e.y-e.distanceTop&&a.y-a.distanceTop<e.y-e.distanceTop&&e.y+e.height+e.distanceBottom>a.y+a.height+a.distanceBottom?(a=e,o.paragraph.isEmpty()&&h?(o.paragraph.y=d,o.paragraph.y+=n):o.marginTop=n):r&&!a&&t.isIntersecting(i)&&(a=e,o.paragraph.isEmpty()&&h?o.paragraph.y+=n:o.marginTop=n))}),a?this.viewer.cutFromTop(a.y+a.height+a.distanceBottom):!this.isRelayoutOverlap||o.paragraph.containerWidget instanceof X&&0<o.marginTop||(o.marginTop=0))},t.prototype.getLineY=function(e){var t=e.paragraph,i=t.y;if(!t.isEmpty())for(var r=t.firstChild;!G.isNullOrUndefined(r)&&r!==e;)i=i+r.height+r.marginTop,r=r.nextLine;return i},t.prototype.isFormFieldCheckBox=function(e){return!!e.isCheckBoxElement&&!!((e=e.previousNode)instanceof te&&2===e.fieldType&&e.fieldBegin&&e.fieldBegin.formFieldData instanceof vd)},t.prototype.updateLineWidget=function(e,t){for(var i,r=0,n=0,o=!1,a=!1,s=0;s<e.children.length;s++){var l,d,h,c=e.children[s];(a=c instanceof te&&2===c.fieldType?!1:a)||c.characterFormat.hidden||(c instanceof te&&0===c.fieldType&&(a=!0),c instanceof re&&"Inline"!==c.textWrappingStyle)||(c instanceof ie&&0===c.text.replace(/\s+/g,"").length&&c.text!==String.fromCharCode(160)?r<c.height&&(r=c.height,n=c.baselineOffset):c instanceof ie||c instanceof se?(l=c.height,d=c.baselineOffset,h=!1,c instanceof ie&&c.isCheckBoxElement&&!G.isNullOrUndefined(c.previousNode)&&c.previousNode instanceof zd&&("Cell"===c.previousNode.contentControlWidgetType||"Inline"===c.previousNode.contentControlWidgetType)&&(h=!0),c instanceof ie&&c.isCheckBoxElement&&!h&&this.isFormFieldCheckBox(c)&&(l/=Hc=c.paragraph.isInsideTable?1.35:Hc,d/=Hc,Hc=1.4),this.maxTextHeight<l&&(this.maxTextHeight=l,this.maxTextBaseline=d),this.maxBaseline<this.maxTextBaseline&&(this.maxBaseline=this.maxTextBaseline)):this.maxBaseline<c.height&&(c instanceof ae&&"Exactly"===t.lineSpacingType&&0<t.lineSpacing?(h=this.getLineSpacing(e.paragraph,c.height),this.maxBaseline<h&&(this.maxBaseline=h)):this.maxBaseline=c.height,c instanceof ae)&&(o=!0))}0===this.maxTextHeight&&0!==r&&(o?(this.maxTextHeight=0,this.maxTextBaseline=0):(e.isLastLine()?(i=this.getParagraphMarkSize(e.paragraph,0,0),this.maxTextHeight=i.height):this.maxTextHeight=r,this.maxTextBaseline=n,this.maxBaseline<this.maxTextBaseline&&(this.maxBaseline=this.maxTextBaseline))),K.containsUnderlinedImage(e)&&(i=this.documentHelper.textHelper.measureText("a",e.paragraph.characterFormat),this.maxTextHeight=i.Height,this.maxTextBaseline=i.BaselineOffset)},t.prototype.reLayoutEndnote=function(){var e,t,i=this.documentHelper.pages[this.documentHelper.pages.length-1];G.isNullOrUndefined(i)||G.isNullOrUndefined(i.endnoteWidget)||(e=this.viewer.clientActiveArea.clone(),t=this.getBodyWidget(i.bodyWidgets[i.bodyWidgets.length-1],!0),this.viewer.updateClientArea(t,t.page),0<(t=this.getNextWidgetHeight(t))&&(this.viewer.clientActiveArea.height-=t-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=t),this.layoutfootNote(i.endnoteWidget),this.viewer.clientActiveArea=e)},t.prototype.moveEndnoteToNextPage=function(e,t,i,r){if(i){var i=this.createSplitBody(t),n=this.viewer.createNewPage(i);this.viewer.updateClientArea(i,i.page),i.y=t.y=this.viewer.clientActiveArea.y;for(var o=0;o<e.bodyWidgets.length;o++)e.bodyWidgets[o].page=n,e.bodyWidgets[o].containerWidget=e;e.page.endnoteWidget=void 0,(n.endnoteWidget=e).page=n}else{var a=t.page;if(G.isNullOrUndefined(a.endnoteWidget)){var s=new J;s.footNoteType="Endnote",s.page=a,s.bodyWidgets.push(t),t.containerWidget=s;for(o=r+1;o<e.bodyWidgets.length;o++){var l=e.bodyWidgets[o];e.bodyWidgets.splice(o,1),s.bodyWidgets.push(l),l.containerWidget=s,l.page=a,o--}a.endnoteWidget=s}else{-1===a.endnoteWidget.bodyWidgets.indexOf(t)&&(a.endnoteWidget.bodyWidgets.splice(0,0,t),t.containerWidget=a.endnoteWidget);for(o=e.bodyWidgets.length-1;r<o;o--){l=e.bodyWidgets[o];a.endnoteWidget.bodyWidgets.unshift(l),l.containerWidget=a.endnoteWidget,l.page=a,e.bodyWidgets.splice(o,1)}}}},t.prototype.moveToNextPage=function(e,t,i,r,n){if(!this.isFootNoteLayoutStart){var o=t.paragraph,a=!1,s=!1,l=!1,d=0;if(o&&(G.isNullOrUndefined(o.containerWidget)||G.isNullOrUndefined(o.containerWidget.containerWidget)||!(o.containerWidget.containerWidget instanceof J)||"Footnote"!==o.containerWidget.containerWidget.footNoteType)){var h=0;if(o instanceof J)return;if(!G.isNullOrUndefined(o.containerWidget)&&!G.isNullOrUndefined(o.containerWidget.containerWidget)&&o.containerWidget.containerWidget instanceof J&&"Endnote"===o.containerWidget.containerWidget.footNoteType&&(l=!0),G.isNullOrUndefined(t)||(0===(h=o.childWidgets.indexOf(t))||(!o.paragraphFormat.keepLinesTogether||G.isNullOrUndefined(o.previousWidget)||t.previousLine.isEndsWithColumnBreak||t.previousLine.isEndsWithPageBreak)&&(1!=h||t.previousLine.isEndsWithPageBreak||t.previousLine.isEndsWithColumnBreak||!o.paragraphFormat.widowControl||G.isNullOrUndefined(o.previousWidget))||(a=!(h=0)),(0<h||i)&&(o.height=e.clientActiveArea.y-o.y),0!==h)||o.isEndsWithPageBreak||o.isEndsWithColumnBreak||(c=this.alignBlockElement(o),G.isNullOrUndefined(c.node))||(h=(g=c.node instanceof $?this.splitRow(c.node):c.node)instanceof Q?0:parseInt(c.position.index,10),s=!(a=!1),(o=g)instanceof Z?!this.documentHelper.editorProperties.isDocumentLoaded||o.paragraphFormat.keepWithNext||r||this.updateWholeListItems(o):this.documentHelper.editorProperties.isDocumentLoaded&&!r&&this.updateWholeListItems(o)),G.isNullOrUndefined(o.bodyWidget)||G.isNullOrUndefined(o.bodyWidget.containerWidget)||o.bodyWidget.containerWidget instanceof J||void 0===o.bodyWidget.page.footnoteWidget||this.layoutfootNote(o.bodyWidget.page.footnoteWidget),this.isMultiColumnSplit){var c=this.viewer.columnLayoutArea.getNextColumnByBodyWidget(o.bodyWidget);if(G.isNullOrUndefined(c))return}var g=o.bodyWidget.page;if(i&&0===h&&!G.isNullOrUndefined(o.bodyWidget.lastChild)&&o===o.bodyWidget.lastChild&&this.endOverlapWidget&&(this.isRelayoutOverlap=!1),l&&G.isNullOrUndefined(g.nextPage)&&0===o.bodyWidget.index&&0===o.index&&0===h)return p=o.containerWidget.containerWidget,void this.moveEndnoteToNextPage(p,o.bodyWidget,!0);var p,r=this.moveBlocksToNextPage(o,0===h,h,!1,l,void 0,i),c=(l&&(c=(p=o.containerWidget.containerWidget).bodyWidgets.indexOf(o.bodyWidget),r.footNoteReference=o.bodyWidget.footNoteReference,this.moveEndnoteToNextPage(p,r,!1,c)),g!==r.page&&this.viewer.updateClientArea(r,r.page),this.viewer.updateClientAreaForBlock(o,!0),!0),g=(0===o.indexInOwner&&0===o.bodyWidget.indexInOwner&&0===h&&G.isNullOrUndefined(o.previousRenderedWidget)&&(c=!1),!1);if(0<h){if(t.isLastLine()&&i)return;var u=void 0,u=r.firstChild instanceof Z&&r.firstChild.equals(o)?r.firstChild:new Z;(u=this.moveChildsToParagraph(o,h,u)).containerWidget=r;for(var f=0;f<u.floatingElements.length;f++)(W=u.floatingElements[f]).line.paragraph.bodyWidget!==o.bodyWidget&&"Inline"!==W.textWrappingStyle&&o.bodyWidget.floatingElements.splice(o.bodyWidget.floatingElements.indexOf(W),1);h=this.getFootNoteWidgetsOf(u);this.moveFootNotesToPage(h,o.bodyWidget,r),o=u,this.viewer.clientActiveArea.height-=this.getFootNoteHeight(h)}else if(!i&&c){if(o.containerWidget instanceof Y&&o instanceof Z&&!this.isImagePresent(o,!1)&&G.isNullOrUndefined(o.bodyWidget.containerWidget)&&o===o.containerWidget.lastChild&&o.bodyWidget.getSplitWidgets()[0].previousRenderedWidget&&o.bodyWidget.getSplitWidgets()[0].sectionIndex!==o.bodyWidget.getSplitWidgets()[0].previousRenderedWidget.sectionIndex){for(var m=this.getBeforeSpacing(o,!0),y=(o.childWidgets[0].height-=m,o.childWidgets[0].margin&&(o.childWidgets[0].margin.top-=m),o.childWidgets[0].children),v=0;v<y.length;v++)(W=y[v]).margin.top-=m;g=!0}o.containerWidget.removeChild(o.indexInOwner),o instanceof Z&&0<o.floatingElements.length&&this.addRemoveFloatElementsFromBody(o,o.containerWidget,!1),l&&0===o.containerWidget.childWidgets.length&&!G.isNullOrUndefined(o.containerWidget.containerWidget)&&o.containerWidget.containerWidget instanceof J&&((p=o.containerWidget.containerWidget).bodyWidgets.splice(p.bodyWidgets.indexOf(o.containerWidget),1),r.footNoteReference.bodyWidget=r,G.isNullOrUndefined(p.page.endnoteWidget)||0!==p.page.endnoteWidget.bodyWidgets.length||(p.page.endnoteWidget=void 0))}if(!i&&c){if(-1===r.childWidgets.indexOf(o)&&(r.childWidgets.splice(0,0,o),o instanceof Z)&&0<o.floatingElements.length&&this.addRemoveFloatElementsFromBody(o,r,!0),o.containerWidget=r,g)for(var W,m=this.getBeforeSpacing(o,!0),y=(o.childWidgets[0].height+=m,o.childWidgets[0].margin&&(o.childWidgets[0].margin.top+=m),o.childWidgets[0].children),v=0;v<y.length;v++)(W=y[v]).margin.top+=m;if(o instanceof Z?this.viewer.updateParagraphXPositionBasedOnTextWrap(o):this.viewer.updateTableXPositionBasedOnTextWrap(o),this.viewer.updateClientAreaLocation(o,this.viewer.clientActiveArea),a||s){o.bodyWidget.page.footnoteWidget&&this.layoutfootNote(o.bodyWidget.page.footnoteWidget),(t.paragraph!==o||o.paragraphFormat.widowControl&&this.isImagePresent(o,!0))&&(o instanceof Q&&this.clearTableWidget(o,!0,!0,!1),this.layoutBlock(o,0,!0),e.updateClientAreaForBlock(o,!1));var b=t.paragraph;if(s&&o!==b){var x=o.nextWidget;if(!G.isNullOrUndefined(x))do{if(e.updateClientAreaForBlock(x,!0),x===b){this.viewer.updateClientAreaLocation(x,this.viewer.clientActiveArea);break}}while(x instanceof Q&&this.clearTableWidget(x,!0,!0,!1),this.layoutBlock(x,0,!0),e.updateClientAreaForBlock(x,!1),x=x.nextWidget)}this.updateClientAreaForNextBlock(t,b)}!t.isFirstLine()||0!==t.indexInOwner||t.children[0]instanceof se||n||(d=-K.convertPointToPixel(t.paragraph.paragraphFormat.firstLineIndent),this.viewer.updateClientWidth(d))}}if(i||this.updateShapeBaseLocation(o),n&&this.viewer.updateClientWidth(d),this.isRelayoutOverlap&&this.endOverlapWidget&&(!this.skipRelayoutOverlap||this.endOverlapWidget instanceof Q&&this.endOverlapWidget.wrapTextAround)){var w=this.endOverlapWidget.previousRenderedWidget,F=t.paragraph;for(this.startOverlapWidget=F,F=(t=this.endOverlapWidget.childWidgets[0]).paragraph;F;)F.floatingElements.forEach(function(e){-1!==w.bodyWidget.floatingElements.indexOf(e)&&"Inline"!==e.textWrappingStyle&&(w.bodyWidget.floatingElements.splice(w.bodyWidget.floatingElements.indexOf(e),1),t.paragraph.bodyWidget.floatingElements.push(e))}),F=F!==this.endOverlapWidget?F.nextWidget:void 0;this.layoutStartEndBlocks(this.startOverlapWidget,this.endOverlapWidget),this.startOverlapWidget=void 0,this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.bottom-this.endOverlapWidget.y,this.viewer.clientActiveArea.y=this.endOverlapWidget.y}}},t.prototype.isImagePresent=function(e,t){for(var i=0;i<e.childWidgets.length;i++)for(var r=e.childWidgets[i],n=0;n<r.children.length;n++)if(r.children[n]instanceof ae&&(!t||"Inline"!==r.children[n].textWrappingStyle))return!0;return!1},t.prototype.updateShapeBaseLocation=function(e){if(e instanceof Z&&0<e.floatingElements.length)for(var t=0;t<e.floatingElements.length;t++){var i=e.floatingElements[t],r=this.getFloatingItemPoints(i);i.y=r.y,i.x=r.x,(i instanceof ne||i instanceof oe)&&this.updateChildLocationForCellOrShape(i.y,i)}},t.prototype.moveChildsToParagraph=function(e,t,i){i=this.addParagraphWidget(this.viewer.clientActiveArea,i);for(var r,n=0,o=t;o<e.childWidgets.length;o++)e!==i&&(((r=e.childWidgets[o]).paragraph=i).childWidgets.splice(n,0,r),r.paragraph=i,n++);i.paragraphFormat=e.paragraphFormat,i.characterFormat=e.characterFormat,i.index=e.index,e.childWidgets.splice(t);for(o=0;o<e.floatingElements.length;o++){var a=e.floatingElements[o];a.line.paragraph!==e&&(i.floatingElements.push(a),e.floatingElements.splice(e.floatingElements.indexOf(a),1),o--)}return i},t.prototype.addRemoveFloatElementsFromBody=function(e,t,i){if(0<e.floatingElements.length)for(var r=0;r<e.floatingElements.length;r++)i?-1===t.floatingElements.indexOf(e.floatingElements[r])&&"Inline"!==e.floatingElements[r].textWrappingStyle&&t.floatingElements.push(e.floatingElements[r]):-1!==t.floatingElements.indexOf(e.floatingElements[r])&&t.floatingElements.splice(t.floatingElements.indexOf(e.floatingElements[r]),1)},t.prototype.alignBlockElement=function(e){if(e instanceof Z&&(e.isEndsWithPageBreak||e.isEndsWithColumnBreak))return{node:void 0,position:{index:""}};for(var t,i=0,r=this.getPreviousBlock(e);r;){if(r instanceof Z){if(!r.paragraphFormat.keepWithNext||r.isEndsWithPageBreak||r.isEndsWithColumnBreak)break;if((t=r).paragraphFormat.keepLinesTogether)G.isNullOrUndefined(this.getPreviousBlock(r))?t=void 0:i=0;else if(G.isNullOrUndefined(this.getPreviousBlock(r))&&1===r.childWidgets.length)t=void 0;else if(r.paragraphFormat.widowControl){if(0!==(i=1===(i=r.lastChild.indexInOwner-1)||i<0?0:i))break}else if(0!==(i=r.lastChild.indexInOwner))break}else if(r instanceof $){var n=r.childWidgets[0];if(!(0<n.childWidgets.length))break;var o=!1,a=(0<n.columnIndex&&(o=!0),this.documentHelper.getFirstParagraphInCell(n));if(!(!G.isNullOrUndefined(a)&&a.paragraphFormat.keepWithNext&&0===n.columnIndex||o&&n.cellFormat&&n.cellFormat.verticallyMergedCellsKeepWithNext)&&(!(e instanceof $&&r.rowFormat.isHeader&&"Word2013"===this.documentHelper.compatibilityMode)||G.isNullOrUndefined(r.ownerTable.previousWidget)))break;G.isNullOrUndefined(this.getPreviousBlock(r))?t=void 0:i=(t=r).indexInOwner}r=this.getPreviousBlock(r)}return!G.isNullOrUndefined(t)&&t instanceof Z&&0===t.indexInOwner&&t.paragraphFormat.keepWithNext&&t.paragraphFormat.widowControl&&(t=e,i=0),{node:t,position:{index:i.toString()}}},t.prototype.getPreviousBlock=function(e){var t;return e instanceof Z?(t=e.previousWidget,!this.isInitialLoad&&G.isNullOrUndefined(t)&&e.containerWidget instanceof Y&&!G.isNullOrUndefined(e.containerWidget.previousRenderedWidget)&&e.containerWidget.sectionIndex===e.containerWidget.previousRenderedWidget.sectionIndex&&!G.isNullOrUndefined(e.previousRenderedWidget)&&e.previousRenderedWidget instanceof Z&&(t=e.previousRenderedWidget)):e instanceof $&&(t=e.previousWidget,G.isNullOrUndefined(t))&&(t=e.ownerTable.previousWidget),t=t instanceof Q?t.lastChild:t},t.prototype.splitRow=function(e){var t=e.ownerTable;if(0===e.indexInOwner)return t;for(var i=this.createTableWidget(t),r=e.indexInOwner;r<t.childWidgets.length;){var n=t.childWidgets.splice(r,1)[0];i.childWidgets.push(n),n.containerWidget=i,t.height-=n.height,i.height+=n.height}return t.containerWidget.childWidgets.splice(t.indexInOwner+1,0,i),i.containerWidget=t.containerWidget,i},t.prototype.splitParagraph=function(e,t,i){if(0===t&&G.isNullOrUndefined(i))return e;for(var r,n=!1,o=(G.isNullOrUndefined(i)?((i=new Z).containerWidget=e.containerWidget,e.containerWidget.childWidgets.splice(e.indexInOwner+1,0,i),i.paragraphFormat=e.paragraphFormat,i.characterFormat=e.characterFormat,i.index=e.index):0===t&&(n=!0,r=e,e=i,i=r),0),a=t;a<e.childWidgets.length;a++){var s=e.childWidgets[a];s.paragraph=i,n?i.childWidgets.push(s):i.childWidgets.splice(o,0,s),i.height+=s.height,e.height-=s.height,s.paragraph=i,o++}return i.width=e.width,n?(i.containerWidget.childWidgets.splice(i.indexInOwner,1),i.y=e.y,i.x=e.x,i.containerWidget=e.containerWidget,e.containerWidget.childWidgets.unshift(i)):e.childWidgets.splice(t),0!==e.childWidgets.length&&!n||e.containerWidget.childWidgets.splice(e.indexInOwner,1),i},t.prototype.updateClientPositionForBlock=function(e,t){var i=e instanceof $?e.ownerTable:e,r=!1;do{if(i instanceof Z){if(t instanceof Z&&t.equals(i)){r=!0;break}this.viewer.updateClientAreaForBlock(i,!0),this.addParagraphWidget(this.viewer.clientActiveArea,i),this.viewer.cutFromTop(this.viewer.clientActiveArea.y+i.height),this.viewer.updateClientAreaForBlock(i,!1)}else if(i instanceof Q){this.viewer.updateClientAreaForBlock(i,!0),"Word2013"===this.documentHelper.compatibilityMode||i.isInsideTable||(this.viewer.clientActiveArea.x=this.viewer.clientActiveArea.x-K.convertPointToPixel(i.firstChild.firstChild.leftMargin)),this.addTableWidget(this.viewer.clientActiveArea,[i]);var n=i.firstChild;if(t instanceof $&&i.equals(t.ownerTable)&&!G.isNullOrUndefined(n)){do{if(n.equals(t)){r=!0;break}}while(this.addTableRowWidget(this.viewer.clientActiveArea,[n]),this.updateChildLocationForRow(this.viewer.clientActiveArea.y,n),this.viewer.cutFromTop(this.viewer.clientActiveArea.y+n.height),i.height+=n.height,n=n.nextWidget)}else this.updateChildLocationForTable(i.y,i),this.viewer.cutFromTop(this.viewer.clientActiveArea.y+i.height),this.viewer.updateClientAreaForBlock(i,!1)}}while((i=i.nextWidget)&&!r)},t.prototype.updateClientAreaForNextBlock=function(e,t){for(var i=0;i<t.childWidgets.length;i++){var r=t.childWidgets[i];if(e===r)break;this.updateShapeBaseLocation(t),this.checkInbetweenShapeOverlap(r),this.viewer.cutFromTop(this.viewer.clientActiveArea.y+r.height)}},t.prototype.layoutStartEndBlocks=function(e,t){var i=e;for(this.isOverlapFloatTable=!0,this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.bottom-e.y,this.viewer.clientActiveArea.y=e.y,e=e instanceof Q?this.documentHelper.getFirstParagraphInFirstCell(e):e,this.documentHelper.editorProperties.isDocumentLoaded&&this.updateWholeListItems(e);i;){this.viewer.updateClientAreaForBlock(i,!0),i instanceof Z?this.layoutParagraph(i,0):(this.clearTableWidget(i,!0,!0,!0),this.layoutTable(i,0)),this.viewer.updateClientAreaForBlock(i,!1);var r=!G.isNullOrUndefined(i.nextWidget)&&i.nextWidget instanceof Q&&i.nextWidget===t&&"Paragraph"===i.nextWidget.positioning.verticalOrigin,i=i===t||r?void 0:i.nextWidget}},t.prototype.isTextFollowWithtab=function(e){var t=e.indexInOwner;if(0<=t)for(var i=t;i<e.line.children.length;i++)if(e.line.children[i]instanceof Rd)return!0;return!1},t.prototype.alignLineElements=function(e,t,i,r,n,o,a,s,l){var d,h,c;return(0<e.width||e instanceof se&&0<e.alignmentShift)&&(e instanceof ie||e instanceof se)?(d=e instanceof ie?e:void 0,h=(e instanceof ie?d:e).baselineOffset,t+=this.maxBaseline-h,i+=r-(e.height-h),!G.isNullOrUndefined(d)&&"Justify"===a&&0<s&&(!this.isTextFollowWithtab(e)||e.line.paragraph.paragraphFormat.bidi)&&(d.isWidthUpdated=!1,h=d.width,a=d.text,n=n||0<(a=K.trimStart(a)).length)&&(c=a.length-K.removeSpace(a).length,l&&(c-=a.length-K.trimEnd(a).length),s<c&&(h=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(a,d.characterFormat,d.scriptType),c=s),0<c)&&(d.width=h+o*c,s-=c)):(n=!0,t+=this.maxBaseline-e.height,i+=r),{topMargin:t,bottomMargin:i,addSubWidth:n,whiteSpaceCount:s}},t.prototype.updateWidgetToPage=function(e,t,i){if(t.isInsideTable){var r=t.associatedCell;if(t.height=e.clientActiveArea.y-t.y,G.isNullOrUndefined(t.associatedCell)||G.isNullOrUndefined(t.associatedCell.ownerRow)||G.isNullOrUndefined(t.associatedCell.ownerRow.rowFormat))return;var n=t.associatedCell.ownerRow.rowFormat.heightType;1<t.associatedCell.cellFormat.rowSpan&&t.associatedCell.ownerTable&&t.associatedCell.ownerRow&&(o=t.associatedCell.ownerTable.childWidgets[t.associatedCell.ownerRow.index+t.associatedCell.cellFormat.rowSpan-1],G.isNullOrUndefined(o)||(n=o.rowFormat.heightType)),"Exactly"===n?r.height=K.convertPointToPixel(t.associatedCell.ownerRow.rowFormat.height):[r].length<=1&&"AtLeast"===n&&!i?this.documentHelper.isRowOrCellResizing&&0!==this.documentHelper.editorProperties.resizeNode&&this.documentHelper.editorProperties.resizingRowFormat===t.associatedCell.ownerRow.rowFormat?r.height=Math.max(t.associatedCell.ownerRow.rowFormat.height,this.getCellContentHeight(r,!1,t.indexInOwner)):r.height=Math.max(K.convertPointToPixel(t.associatedCell.ownerRow.rowFormat.height),this.getCellContentHeight(r,!1,t.indexInOwner)):r.height=r.height+t.height,t.containerWidget=r}else(!t.isEndsWithPageBreak&&!t.isEndsWithColumnBreak||e instanceof Nl)&&(t.height=e.clientActiveArea.y-t.y);this.isRelayoutFootnote&&t.bodyWidget instanceof J&&(t.isInsideTable||(t.containerWidget.height+=t.height),this.shiftFootnoteChildLocation(t.bodyWidget,this.viewer)),t.bodyWidget instanceof X&&(t.isInsideTable||(!this.skipRelayoutOverlap||this.endOverlapWidget instanceof Q&&this.endOverlapWidget.wrapTextAround)&&(t.containerWidget instanceof X&&this.documentHelper&&"Word2003"===this.documentHelper.compatibilityMode?(n=((o=t.containerWidget)&&o.page?o.page.boundingRectangle:o).height,o.height+t.height<=.5*n&&!this.skip2003||t.containerWidget.firstChild===t?(o.height+=t.height,t.isRender=!0):(this.viewer.clientActiveArea.y-=t.height,this.skip2003=!0,t.isRender=!1)):t.containerWidget.height+=t.height),this.documentHelper.editorProperties.enableHeaderAndFooter)&&-1!==t.bodyWidget.headerFooterType.indexOf("Footer")&&(this.skip2003=!1,this.shiftFooterChildLocation(t.bodyWidget,this.viewer));var o,a=t.y+t.height,s=0;if(e instanceof Nl&&t.containerWidget instanceof Y){if(t.isEndsWithPageBreak&&0<t.bodyWidget.floatingElements.length&&!t.isInsideTable)for(var l=0;l<t.bodyWidget.floatingElements.length;l++)a<t.bodyWidget.floatingElements[l].height+t.bodyWidget.floatingElements[l].y&&(a=t.bodyWidget.floatingElements[l].height+t.bodyWidget.floatingElements[l].y,s=t.bodyWidget.floatingElements[l].height+t.bodyWidget.floatingElements[l].y-(t.y+t.height));t.containerWidget.height+=s,t.containerWidget.height+=t.height}},t.prototype.shiftFooterChildLocation=function(e,t){var i,r,n=e.page.bodyWidgets[0].sectionFormat.pageHeight;-1!==e.headerFooterType.indexOf("Footer")&&(i=e.page.bodyWidgets[0].sectionFormat.footerDistance,n=K.convertPointToPixel(n-i),e.y+e.height>n?r=n-(e.y+e.height):e.y+e.height<n&&(r=e.y+e.height-n),G.isNullOrUndefined(r)||(r=n-(e.y+e.height),r=this.shiftChildLocation(r,e),t.clientActiveArea.y+=r))},t.prototype.shiftFootnoteChildLocation=function(e,t){var i,r=e.page.bodyWidgets[0].sectionFormat.pageHeight,n=(e.page.bodyWidgets[0].sectionFormat.footerDistance,e.page.bodyWidgets[0].sectionFormat.bottomMargin),r=K.convertPointToPixel(r-n);e.y+e.height>r?i=r-(e.y+e.height):e.y+e.height<r&&(i=e.y+e.height-r),G.isNullOrUndefined(i)||(i=r-(e.y+e.height),this.shiftChildLocation(i,e),t.clientActiveArea.y+=i)},t.prototype.checkPreviousElement=function(e,t){for(var i=e.paragraph,r=!1,n=0,o="Justify"===i.paragraphFormat.textAlignment,a=t-1;0<=a;a--){var s=e.children[a];if(s instanceof ie&&(0<s.width||!o&&"\t"===s.text)){var l=s.text,n=a;if(0<l.length&&(" "===l[l.length-1]||"-"===l[l.length-1])){if(a===t-1)return this.isWrapText&&this.viewer.clientActiveArea.x+this.viewer.clientActiveArea.width===this.viewer.clientActiveArea.right&&(this.isWrapText=!1),this.addSplittedLineWidget(e,t-1),!0;r=!0;break}if(!this.isRelayoutOverlap&&!o&&s instanceof Rd&&"\t"===l&&0!==n){n--,r=!0;break}if("\t"===l||this.documentHelper.textHelper.isUnicodeText(l,s.scriptType))return!1;if(0<=l.indexOf(" ")){var r=!0,d=l.lastIndexOf(" ")+1,h=new ie;h.text=l.substr(d),h.characterFormat.copyFormat(s.characterFormat),h.characterRange=s.characterRange,0<s.revisionLength&&this.updateRevisionForSplittedElement(s,h,0<d),s.text=l.substr(0,d),this.documentHelper.textHelper.getTextSize(h,s.characterFormat),s.width-=h.width," "===s.text[s.text.length-1]?s.trimEndWidth=this.documentHelper.textHelper.getWidth(K.trimEnd(s.text),s.characterFormat,s.scriptType):s.trimEndWidth=s.width,s.height=h.height,0===s.width&&(e.children.splice(a,1),!G.isNullOrUndefined(e.layoutedElements))&&0<e.layoutedElements.length&&e.layoutedElements.splice(a,1),e.children.splice(a+1,0,h),G.isNullOrUndefined(e.layoutedElements)||e.layoutedElements.splice(a+1,0,h);break}}else if(!(s instanceof se||s instanceof te||s instanceof ie&&0===s.width||s instanceof ac||s instanceof zd)){n=a,r=!0;break}}if(r&&++n<e.children.length){for(var c=0,a=n;a<e.children.length;a++)c+=e.children[a].width,this.addSplittedLineWidget(e,a-1);"Justify"===i.paragraphFormat.textAlignment&&"Word2013"===this.documentHelper.compatibilityMode||this.viewer.updateClientWidth(c)}return r},t.prototype.clearListElementBox=function(e){if(0!==e.childWidgets.length){var t=e.childWidgets[0];if(!G.isNullOrUndefined(t.children)){for(var i=t.children.length-1;0<i&&t.children[i]instanceof se;i--)t.children.splice(i,1);for(i=0;i<t.children.length&&t.children[i]instanceof se;i++)t.children.splice(i,1),i--}}},t.prototype.clearInvalidList=function(e){e&&(-1===e.abstractListId&&-1!==this.documentHelper.abstractLists.indexOf(e.abstractList)&&this.documentHelper.abstractLists.splice(this.documentHelper.abstractLists.indexOf(e.abstractList),1),-1===e.listId)&&-1!==this.documentHelper.lists.indexOf(e)&&this.documentHelper.lists.splice(this.documentHelper.lists.indexOf(e),1)},t.prototype.getListNumber=function(e,t){var i,r=e.paragraphFormat.listFormat,n=this.documentHelper.getListById(r.listId),o=r.listLevelNumber,r=this.getListLevel(n,r.listLevelNumber),a=G.isNullOrUndefined(n.levelOverrides)?void 0:n.levelOverrides[o];return!G.isNullOrUndefined(a)&&-1===this.documentHelper.renderedLevelOverrides.indexOf(n)&&G.isNullOrUndefined(a.overrideListLevel)&&(this.documentHelper.renderedLevelOverrides.push(n),a=this.documentHelper.getAbstractListById(n.abstractListId),this.documentHelper.renderedLists.containsKey(a))&&(i=this.documentHelper.renderedLists.get(a)).containsKey(o)&&(i.remove(o),this.ClearSubListLevelValues(n,a,o)),G.isNullOrUndefined(t)&&this.updateListValues(n,o,e.characterFormat.getAllRevision()),this.getListText(n,o,r,e.characterFormat.localeIdAscii,e.characterFormat.getAllRevision())},t.prototype.ClearSubListLevelValues=function(e,t,i){for(var r=this.documentHelper.renderedLists.get(t),n=i+1;n<t.levels.length;){var o=this.getListLevel(e,n);r.containsKey(n)&&o.restartLevel>i&&r.remove(n),n++}},t.prototype.getListStartValue=function(e,t){var i=G.isNullOrUndefined(t.levelOverrides)?void 0:t.levelOverrides[e];return(G.isNullOrUndefined(i)||!G.isNullOrUndefined(i.overrideListLevel))&&(i=this.getListLevel(t,e),G.isNullOrUndefined(i))?0:i.startAt},t.prototype.getListValues=function(e,t,i){var r=e;return t&&i?(r--,e--):t&&!i?r--:!t&&i&&e--,[r,e]},t.prototype.updateListValues=function(e,t,i){var r=this.documentHelper.getAbstractListById(e.abstractListId),n=this.getListLevel(e,t),o=!1,a=!1;if(!G.isNullOrUndefined(i)&&0<i.length)for(var s=0,l=i;s<l.length;s++){var d=l[s];"Insertion"===d.revisionType?o=!0:"Deletion"===d.revisionType&&(a=!0)}if(this.documentHelper.renderedLists.containsKey(r)){var h=this.documentHelper.renderedLists.get(r);if(h.containsKey(t))for(var i=h.get(t),c=(o||a?o&&!a?i.second++:!o&&a&&i.first++:(i.first++,i.second++),h.set(t,i),t+1);c<this.documentHelper.getAbstractListById(e.abstractListId).levels.length;){p=this.getListLevel(e,c);h.containsKey(c)&&(p.restartLevel>t||"Bullet"===n.listLevelPattern)&&h.remove(c),c++}else{for(c=t;!h.containsKey(c-1)&&0<c;){p=this.getListLevel(e,c-1),f=this.getListStartValue(c-1,e);h.add(c-1,{first:f,second:f}),c--}i=this.getListStartValue(t,e),m=this.getListValues(i,o,a);h.add(t,{first:m[0],second:m[1]})}}else for(var g=new N,p=(this.documentHelper.renderedLists.add(r,g),this.getListLevel(e,t)),u=0;u<=t;u++){var f=this.getListStartValue(u,e),m=this.getListValues(f,o,a);g.add(u,{first:m[0],second:m[1]})}},t.prototype.getListText=function(e,t,i,r,n){var o=!1,a=!1;if(!G.isNullOrUndefined(n)&&0<n.length)for(var s=0,l=n;s<l.length;s++){var d=l[s];"Insertion"===d.revisionType?o=!0:"Deletion"===d.revisionType&&(a=!0)}n=i.numberFormat;if(o&&a)return"";var h=n,c=n,g=!1;if(this.documentHelper.renderedLists.containsKey(this.documentHelper.getAbstractListById(e.abstractListId)))for(var p=this.documentHelper.renderedLists.get(this.documentHelper.getAbstractListById(e.abstractListId)),u=p.keys,f=0;f<u.length;f++){var m,y,v=u[f],W="%"+(v+1).toString(),b=this.getListLevel(e,v),x=f<t?"LeadingZero"!==b.listLevelPattern?"Arabic":b.listLevelPattern:void 0;if(h.match(W)){if(t<v)return"";c=p.containsKey(v)&&!G.isNullOrUndefined(b)?(v=p.get(v),m=void 0,o&&!a?(m=v.second,y=this.getListTextListLevel(b,m,r,i.isLegalStyleNumbering?x:void 0),h=h.replace(W,y),c.replace(W,y)):!o&&a||v.first===v.second?(m=v.first,y=this.getListTextListLevel(b,m,r,i.isLegalStyleNumbering?x:void 0),h=h.replace(W,y),c.replace(W,y)):(g=!0,h=h.replace(W,this.getListTextListLevel(b,v.first,r,i.isLegalStyleNumbering?x:void 0)),c.replace(W,this.getListTextListLevel(b,v.second,r,i.isLegalStyleNumbering?x:void 0)))):(h=h.replace(W,"0"),c.replace(W,"0"))}}return g?h+""+c:h},t.prototype.getAsLetter=function(e){for(var t=e/26,e=e%26,i=(0===e&&(e=26,t--),String.fromCharCode(64+e)),r="";0<=t;)r+=i.toString(),t--;return r},t.prototype.getListTextListLevel=function(e,t,i,r){switch(G.isNullOrUndefined(r)?e.listLevelPattern:r){case"UpRoman":return this.getAsRoman(t).toUpperCase();case"LowRoman":return this.getAsRoman(t).toLowerCase();case"UpLetter":return this.getAsLetter(t).toUpperCase();case"LowLetter":return this.getAsLetter(t).toLowerCase();case"Arabic":return t.toString();case"LeadingZero":return this.getAsLeadingZero(t);case"Number":return t.toString();case"OrdinalText":return(3082===e.characterFormat.localeIdAscii||3082===i?this.getOrdinalTextInSpanish(!0,t.toString()):this.getOrdinalText(!0,t.toString())).toUpperCase();case"Ordinal":return this.getAsOrdinal(t,e.characterFormat).toString();case"FarEast":case"Special":return t.toString();case"Hebrew1":return this.getAsHebrewNumber(t);case"Hebrew2":return this.getAsAlphabet(t,"אבגדהוזחטיכלמנסעפצקרשת");case"Arabic1":return this.getAsAlphabet(t,"أبتثجحخدذرزسشصضطظعغفقكلمنهوي");case"Arabic2":return this.getAsAlphabet(t,"أبجدهوزحطيكلمنسعفصقرشتثخذضظغ");default:return""}},t.prototype.getAsAlphabet=function(e,t){if(e<=0)return"";for(var i=Math.floor((e-1)/t.length)+1,r=t.charAt((e-1)%t.length),n="",o=0;o<i;o++)n+=r;return n},t.prototype.getAsHebrewNumber=function(e){if(e<=0)return"";for(var t="",i=e;400<=i;)t+="ת",i-=400;return t+=["","ק","ר","ש","ת"][Math.floor(i/100)],15===(i%=100)||16===i?t+"ט"+(15===i?"ו":"ז"):t+["","י","כ","ל","מ","נ","ס","ע","פ","צ"][Math.floor(i/10)]+["","א","ב","ג","ד","ה","ו","ז","ח","ט"][i%10]},t.prototype.getFootEndNote=function(e,t){switch(e){case"UpperCaseRoman":return this.getAsRoman(t).toUpperCase();case"LowerCaseRoman":return this.getAsRoman(t).toLowerCase();case"UpperCaseLetter":return this.getAsLetter(t).toUpperCase();case"LowerCaseLetter":return this.getAsLetter(t).toLowerCase();default:return t.toString()}},t.prototype.generateNumber=function(e,t,i){for(var r="";t<=e;)r+=i,this.value=e-=t;return r.toString()},t.prototype.getAsLeadingZero=function(e){return e<10?"0"+e.toString():e.toString()},t.prototype.getAsRoman=function(e){var t="";return this.value=e,(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t+=this.generateNumber(this.value,1e3,"M"))+this.generateNumber(this.value,900,"CM"))+this.generateNumber(this.value,500,"D"))+this.generateNumber(this.value,400,"CD"))+this.generateNumber(this.value,100,"C"))+this.generateNumber(this.value,90,"XC"))+this.generateNumber(this.value,50,"L"))+this.generateNumber(this.value,40,"XL"))+this.generateNumber(this.value,10,"X"))+this.generateNumber(this.value,9,"IX"))+this.generateNumber(this.value,5,"V"))+this.generateNumber(this.value,4,"IV"))+this.generateNumber(this.value,1,"I")).toString()},t.prototype.getOrdinalText=function(e,t){if(e){t=t.trim();for(var i=0;i<t.length;i++)if(/[a-zA-Z]/.test(t.charAt(i))){e=!1;break}e&&(t=this.numberToWords(parseInt(t),!1))}return t},t.prototype.numberToWords=function(e,t){var i,r;return 0===e?"zero":(i="",0<Math.floor(e/1e6)&&(i+=this.numberToWords(Math.floor(e/1e6),t)+" million ",t||e%10!=0||(i+="th "),e%=1e6),0<Math.floor(e/1e3)&&(i+=this.numberToWords(Math.floor(e/1e3),t)+" thousand ",t||e%10!=0||(i+="th "),e%=1e3),0<Math.floor(e/100)&&(i+=this.numberToWords(Math.floor(e/100),t)+" hundred ",t||e%10!=0||(i+="th "),e%=100),0<e&&(""!==i&&t&&(i+="and "),r=null,r=t?["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"]:["","first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth","eleventh","twelfth","thirteenth","fourteenth","fifteenth","sixteenth","seventeenth","eighteenth","nineteenth"],e<20?i+=r[e]:((t||0<e%10)&&(i+=["","ten","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"][Math.floor(e/10)]),e%10!=0||t?0<e%10&&(i+="-"+r[e%10]):i+=["","tenth","twentieth","thirtieth","fortieth","fiftieth","sixtieth","seventieth","eightieth","ninetieth"][Math.floor(e/10)])),i)},t.prototype.getOrdinalTextInSpanish=function(e,t){if(e){t=t.trim();for(var i=0;i<t.length;i++)if(/[a-zA-Z]/.test(t.charAt(i))){e=!1;break}e&&(t=this.numberToSpanishWords(parseInt(t),!1))}return t},t.prototype.numberToSpanishWords=function(e,t){var i,r,n,o;return 0===e&&t?"cero":(i="",0<Math.floor(e/1e3)&&e<=1e4&&(i+=(t?["","mil","dos mil","tres mil","cuatro mil","cinco mil","seis mil","siete mil","ocho mil","nueve mil","diez mil"]:["","milésimo","dosmilésimo","tresmilésimo","cuatromilésimo","cincomilésimo","seismilésimo","sietemilésimo","ochomilésimo","nuevemilésimo","diezmilésimo"])[Math.floor(e/1e3)],e%=1e3),0<Math.floor(e/100)&&(""!==i&&(i+=" "),i+=(t?["","ciento","doscientos","trescientos","cuatrocientos","quinientos","seiscientos","setecientos","ochocientos","novecientos"]:["","centésimo","ducentésimo","tricentésimo","cuadringentésimo","quingentésimo","sexcentésimo","septingentésimo","octingentésimo","noningentésimo"])[Math.floor(e/100)],e%=100),0<e&&e<100&&(""!==i&&(i+=" "),r=null,r=t?["","uno","dos","tres","cuatro","cinco","seis","siete","ocho","nueve","diez","once","doce","trece","catorce","quince","dieciséis","diecisiete","dieciocho","diecinueve"]:["","primero","segundo","tercero","cuarto","quinto","sexto","séptimo","octavo","noveno","décimo","undécimo","duodécimo","decimotercero","decimocuarto","decimoquinto","decimosexto","decimoséptimo","decimoctavo","decimonoveno"],n=["","diez","veinte","treinta","cuarenta","cincuenta","sesenta","setenta","ochenta","noventa"],o=["","décimo","vigésimo","trigésimo","cuadragésimo","quincuagésimo","sexagésimo","septuagésimo","octogésimo","nonagésimo"],e<20?i+=r[e]:20<e&&e<30&&t?i+=["","veintiuno","veintidós","veintitrés","veinticuatro","veinticinco","veintiséis","veintisiete","veintiocho","veintinueve"][e%10]:((t&&0<e%10||t&&e%10==0)&&(i+=n[Math.floor(e/10)]),0<e%10&&!t&&(i+=o[Math.floor(e/10)]),e%10!=0||t?0<e%10&&(i+=t?" y "+r[e%10]:" "+r[e%10]):i+=o[Math.floor(e/10)])),i)},t.prototype.isHighestTabStopReachesClientArea=function(e){var t=e.paragraphFormat.getUpdatedTabs();return 0!==t.length&&!this.documentHelper.editorProperties.isTocStyle(e)&&(e=K.convertPointToPixel(e.paragraphFormat.leftIndent),e=this.viewer.clientArea.right-(this.viewer.clientArea.x-e),K.convertPointToPixel(t[t.length-1].position)>=e-.01)},t.prototype.isTabStopBeyondRightMargin=function(e,t,i){for(var r=i.paragraphFormat.getUpdatedTabs(),n=K.convertPointToPixel(i.paragraphFormat.leftIndent),o=0,a=0;a<t;a++)o+=e[a].width;e[t].line.isFirstLine()&&(o+=K.convertPointToPixel(i.paragraphFormat.firstLineIndent)),o+=n;for(var s=0;s<r.length;s++){var l=K.convertPointToPixel(r[s].position);if(o<l)return l>=this.viewer.clientArea.right-(this.viewer.clientArea.x-n)}return!1},t.prototype.isTextAfterTabToRetainInLine=function(e){if(e instanceof ie&&"Word2013"!==this.documentHelper.compatibilityMode&&this.isHighestTabStopReachesClientArea(e.paragraph)){if("\t"===e.text)return e instanceof Rd&&0<e.indexInOwner;if(!(1<this.viewer.clientActiveArea.width)&&-1===e.text.trim().indexOf(" "))for(var t=e.line.children,i=t.indexOf(e)-1;0<=i;i--)if(t[i]instanceof Rd&&this.isTabStopBeyondRightMargin(t,i,e.paragraph))return!0}return!1},t.prototype.getAsOrdinal=function(e,t){switch(t.localeIdAscii){case 1069:case 8218:case 5146:case 4122:case 1050:case 1029:case 1061:case 1035:case 3079:case 1031:case 5127:case 4103:case 2055:case 1038:case 1060:case 1055:case 1044:case 2068:case 1045:case 6170:case 2074:return e.toString()+".";case 2060:case 11276:case 3084:case 9228:case 12300:case 1036:case 15372:case 5132:case 13324:case 6156:case 14348:case 8204:case 10252:case 4108:return 1==e?e.toString()+"er":e.toString()+"e";case 2067:case 1043:return e.toString()+"e";case 1032:return e.toString()+"o";case 1040:case 2064:return e.toString()+String.fromCharCode(176);case 5130:case 7178:case 12298:case 17418:case 4106:case 1046:case 2070:case 11274:case 16394:case 13322:case 9226:case 18442:case 2058:case 19466:case 6154:case 15370:case 10250:case 20490:case 3082:case 1034:case 21514:case 14346:case 8202:return e.toString()+String.fromCharCode(186);case 1049:case 2073:return e.toString()+"-"+String.fromCharCode(1081);case 2077:case 1053:return this.getOrdinalInSwedish(e);case 1027:return this.getOrdinalInCatalan(e);case 1030:return this.getOrdinalInDanish(e);default:return this.getOrdinalInEnglish(e)}},t.prototype.getOrdinalInEnglish=function(e){switch(e%100){case 11:case 12:case 13:return e.toString()+"th"}switch(e%10){case 1:return e.toString()+"st";case 2:return e.toString()+"nd";case 3:return e.toString()+"rd";default:return e.toString()+"th"}},t.prototype.getOrdinalInSwedish=function(e){return 11!=e&&12!=e&&(e%10==1||e%10==2)?e.toString()+":a":e.toString()+":e"},t.prototype.getOrdinalInCatalan=function(e){switch(e){case 1:return e.toString()+".";case 2:return e.toString()+"n";case 3:return e.toString()+"r";case 4:return e.toString()+"t";case 14:return e.toString()+String.fromCharCode(232)+"h";default:return e.toString()+String.fromCharCode(232)}},t.prototype.getOrdinalInDanish=function(e){if(0==e)return e.toString()+"te";switch(e%100){case 0:return e.toString()+"ende";case 1:return e.toString()+"ste";case 2:return e.toString()+"nden";case 3:return e.toString()+"dje";case 4:return e.toString()+"rde";case 5:case 6:case 11:case 12:case 30:return e.toString()+"te";default:return e.toString()+"nde"}},t.prototype.getListLevel=function(e,t){if(!G.isNullOrUndefined(e)){var i=this.documentHelper.getAbstractListById(e.abstractListId),r=(!G.isNullOrUndefined(e)&&i.levels.length<=t&&0<=t&&t<9&&this.addListLevels(i),void 0);if(!G.isNullOrUndefined(e.levelOverrides)&&!G.isNullOrUndefined(r=this.getOverrideListLevel(e.levelOverrides,t))&&!G.isNullOrUndefined(r.overrideListLevel))return G.isNullOrUndefined(r.startAt)&&(r.overrideListLevel.startAt=i.levels[t].startAt),r.overrideListLevel;if(!G.isNullOrUndefined(i)&&0<=t&&t<i.levels.length)return i.levels[t]}},t.prototype.getOverrideListLevel=function(e,t){for(var i=0;i<e.length;i++)if(e[i].levelNumber==t)return e[i]},t.prototype.isNeedToConsiderTabStopPosition=function(e,t,i){return!(e.paragraphFormat.firstLineIndent<0&&0!==t.length&&(1!==t.length||0!==t[0].position)&&t[0].position<Math.abs(e.paragraphFormat.firstLineIndent)&&i)},t.prototype.getTabWidth=function(e,t,i,r,n){if(n.characterFormat.hidden)return 0;var o=0,a=!1,s=e.paragraphFormat.getUpdatedTabs(),l=!1,d=e.bodyWidget.sectionFormat,d=K.convertPointToPixel(d.leftMargin),h=!1,c=(G.isNullOrUndefined(e.paragraphFormat.listFormat.listLevel)||G.isNullOrUndefined(e.paragraphFormat.listFormat.listLevel.paragraphFormat)||(c=e.paragraphFormat.listFormat.listLevel.paragraphFormat,e.paragraphFormat.leftIndent===c.leftIndent&&e.paragraphFormat.firstLineIndent===c.firstLineIndent)||(l=!0),0),g=t.clientActiveArea.x,p=K.convertPointToPixel(e.paragraphFormat.firstLineIndent),u=K.convertPointToPixel(e.paragraphFormat.leftIndent);if(!G.isNullOrUndefined(n)&&r.isFirstLine()?(c=this.viewer.clientArea.x+p,l&&(g+=p)):c=this.viewer.clientArea.x,g<c&&this.isNeedToConsiderTabStopPosition(e,s,l))return t.clientArea.x-t.clientActiveArea.x;for(var f=t.clientActiveArea.x-(t.clientArea.x-K.convertPointToPixel(e.paragraphFormat.leftIndent)),m=0;m<s.length;m++){var y=s[m],v=K.convertPointToPixel(y.position);v<u&&(h=parseFloat(f.toFixed(2))<parseFloat(v.toFixed(2)))}if(r.isFirstLine()&&0<u&&p<0&&(n instanceof se||!h)){if(0<t.clientArea.x-t.clientActiveArea.x&&this.isNeedToConsiderTabStopPosition(e,s,l))return t.clientArea.x-t.clientActiveArea.x;0===s.length&&e.paragraphFormat.listFormat&&e.paragraphFormat.listFormat.listLevel&&(s=e.paragraphFormat.listFormat.listLevel.paragraphFormat.tabs)}var p=e.paragraphFormat.firstLineIndent<0?e.paragraphFormat.leftIndent:0,W=K.convertPointToPixel(this.documentHelper.defaultTabWidth);if(0===s.length&&(0<f&&W>Math.round(f)&&l||W===this.defaultTabWidthPixel&&W>Math.round(f)&&0<f))return W-f;if(e.paragraphFormat.firstLineIndent<0&&0===u&&this.viewer.clientActiveArea.x-d<p&&!(0<s.length&&e.paragraphFormat.firstLineIndent<0&&0===s[0].position&&0<p&&this.viewer.clientActiveArea.x<d))return g=p-(this.viewer.clientActiveArea.x-d),"Word2013"!==this.documentHelper.compatibilityMode&&0<s.length&&g<K.convertPointToPixel(s[0].position)&&(g+=K.convertPointToPixel(s[0].position)),e.paragraphFormat.firstLineIndent<0&&r.isFirstLine()&&u<0&&e.containerWidget instanceof Y&&(g+=e.margin.left),g;var b=!1;if(0<s.length){for(m=s.length-1;-1<m;m--){var y=s[m],x=K.convertPointToPixel(y.position);if(!(parseFloat(x.toFixed(2))>parseFloat(f.toFixed(2))||0<m&&K.convertPointToPixel(s[m-1].position)>parseFloat(f.toFixed(2)))){m!=s.length-1&&(W=(x=this.getJustificationTabWidth(s[m+1],n,r,e,W,f,o)).defaultTabWidth,o=x.fPosition,f=x.position,a=!0),b=!0;break}}b||(W=(c=this.getJustificationTabWidth(s[0],n,r,e,W,f,o)).defaultTabWidth,o=c.fPosition,f=c.position,a=!0)}return a||((t=parseFloat((100*f%(100*W)/100).toFixed(2)))<0&&l&&(t+=W),o=(1+(f-t)/W)*W),parseFloat(o.toFixed(1))!==parseFloat(f.toFixed(1))&&0<o-f?o-f:W},t.prototype.getJustificationTabWidth=function(e,t,i,r,n,o,a){var s,l,d=t?this.documentHelper.textHelper.getTextSize(t,t.characterFormat):0;return a="Left"===e.tabJustification||"List"===e.tabJustification?K.convertPointToPixel(e.position):(s=K.convertPointToPixel(e.position)-o,(i=this.getRightTabWidth(t.indexInOwner+1,i,r))<s&&"Decimal"!=e.tabJustification?"Right"===e.tabJustification?(n=s-i,r=K.convertPointToPixel(r.rightIndent),l=this.viewer.clientActiveArea.width+r-n,this.viewer.clientActiveArea.width+=r,l<0?n+=l-i:l<i&&(n-=i-l)):n=s-i/2:n="Center"===e.tabJustification&&i/2<s?s-i/2:"Decimal"===e.tabJustification?!G.isNullOrUndefined(t.nextElement)&&t.nextElement instanceof ie?-1!=(r=t.nextElement).text.indexOf(".")?(l=r.text.indexOf("."),l=r.text.substring(0,l),s-this.documentHelper.textHelper.getWidth(l,r.characterFormat,r.scriptType)):i<s?s-i:s:s:"Right"===e.tabJustification?0:d,o),t instanceof Rd&&(t.tabLeader=e.tabLeader,t.tabText=""),{defaultTabWidth:n,fPosition:a,position:o}},t.prototype.getRightTabWidth=function(e,t,i){for(var r,n=0,o=!1,a=t.children[e];a;){if(a instanceof te||a instanceof Md||o?(a instanceof te&&(0===a.fieldType?o=!0:2===a.fieldType&&(o=!1)),a.width=0):(a instanceof Ud&&!this.isTocField(a.fieldBegin)&&""!==(r=this.documentHelper.getFieldResult(a.fieldBegin,a.paragraph.bodyWidget.page))&&(a.text=r),a instanceof ie&&this.documentHelper.textHelper.getTextSize(a,a.characterFormat)),a instanceof ie&&"\t"===a.text)return n;n=a instanceof ne&&"Inline"!==a.textWrappingStyle?n:n+a.width,a=a.nextNode}return n},t.prototype.getSplitIndexByWord=function(e,t,i,r,n){for(var o=0,a=t.length;o<a;){var s=this.getTextIndexAfterSpace(t,o),l=i;if(((s=0!==s&&s!==a?s:a-1)<a-1||s===a-1&&" "===t[s-1])&&o!==s&&(l=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(t.slice(0,s),r,n)),!(K.round(l,4)<=K.round(e,4))){0===o&&" "===t[0]&&(o=this.getTextIndexAfterSpace(t,0));break}o=s}return o},t.prototype.getTextSplitIndexByCharacter=function(e,t,i,r,n,o){for(var a=i.length,s=0;s<a;s++){var l=r;if(t<(l=s+1<a?this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(i.substring(0,s+1),n,o):l))return 0===s&&e<l?1<a&&" "===i[1]?this.getTextIndexAfterSpace(i,1):1:" "===i[s]?this.getTextIndexAfterSpace(i,s):s}return 0},t.prototype.getSubWidth=function(e,t,i,r,n){var o=0,a=!0,s="",l=0,d=e.paragraph.paragraphFormat.bidi;if(0<this.wrapPosition.length&&!(e.paragraph.containerWidget instanceof P)){var h=this.getSubWidthBasedOnTextWrap(e,t,i,r,n);if(0<h.length)return h}for(var c=e.renderedElements,g=c.length-1;0<=g;g--){var p,u=c[g];0<u.width&&u instanceof ie&&(this.isInitialLoad||!u.characterFormat.bidi||u.isWidthUpdated)?(p=u.text,t&&this.isTextFollowWithtab(u)&&!d||(s=p+s),!(a=t&&d?" "===p&&0<=g-1&&" "===c[g-1].text:a)||""===p.trim()&&"\t"!==p?a?l+=u.width:o+=u.width:(K.endsWith(p)?(o+=p=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(p,u.characterFormat,u.scriptType),l+=u.width-p):o+=u.width,a=!1)):(s="a"+s,a=!1,u instanceof re&&"Inline"!==u.textWrappingStyle||(o+=u.width))}t||(o=Math.round(o));var h=s.length-K.removeSpace(s).length,f=(i=(s=s.trim()).length-K.removeSpace(s).length,e.paragraph===this.mergedParagraph&&e.isFirstLine()?this.mergedParagraphOffset:0),m=this.viewer.clientArea.width-f-r-o,f=this.viewer.clientArea.width-f-r-(o+l);return d&&t&&(f<0?l=-l:m=f),d&&!t&&m<0&&"Right"===e.paragraph.paragraphFormat.textAlignment&&0===l&&this.isOverflowOnlyByTrailingSpaces(e,o,r)?(m=this.viewer.clientArea.width-r-this.getUnroundedLineWidth(e),i=0):m<=0&&!this.is2013Justification||0===i&&t&&!d?m=i=0:t?(!n||e.isEndsWithLineBreak)&&0<i||n&&this.is2013Justification&&0<i?m/=i:i=0:0<l&&d&&n&&(m-=l),[{trimmedSpaceWidth:l,subWidth:m,spaceCount:i,totalSpaceCount:h}]},t.prototype.getUnroundedLineWidth=function(e){for(var t=0,i=0;i<e.children.length;i++){var r=e.children[i];r instanceof re&&"Inline"!==r.textWrappingStyle||(t+=r.width)}return t},t.prototype.isOverflowOnlyByTrailingSpaces=function(e,t,i){for(var r=0,n=0,o=e.children.length-1;0<=o;o--){var a=e.children[o];if(a instanceof ie&&0<a.text.length&&""===a.text.trim())r+=a.width,n+=a.text.length;else if(!(a instanceof ie)||0<a.text.length)break}return 1<n&&t-r<=this.viewer.clientArea.width-i},t.prototype.getSubWidthBasedOnTextWrap=function(e,t,i,r,n){for(var o=[],a=0,s="",l=this.wrapPosition.length-1,d=!0,h=e.children.length-1;0<=h;h--){var c=e.children[h];if(0<c.width&&c instanceof ie?(s=(p=c.text)+s,!d||""===p.trim()&&"\t"!==p?d||(a+=c.width):(K.endsWith(p)?a+=this.documentHelper.textHelper.measureTextExcludingSpaceAtEnd(p,c.characterFormat,c.scriptType):a+=c.width,d=!1)):(s="a"+s,d=!1,c instanceof re&&"Inline"!==c.textWrappingStyle||(a+=c.width)),(0<c.padding.left||0===h)&&0<=l){for(var g=this.wrapPosition[l--];g.width<=0&&0<=l;)g=this.wrapPosition[l--];var p=this.getSubWidthInfo(e,g.width,a,s,i,t,n);G.isNullOrUndefined(p)||(a=0,s="",o.unshift(p))}}return o},t.prototype.isWordFittedByJustification=function(e,t,i){var r=e.line,n=r.paragraph,o=n.paragraphFormat,a=o.textAlignment,n=(o.bidi&&(G.isNullOrUndefined(e.nextElement)||n.isInsideTable)&&n.splitTextRangeByScriptType(r.indexInOwner),r.isLastLine()),s=0,l=(r.isFirstLine()&&(s=K.convertPointToPixel(o.firstLineIndent)),this.viewer.clientActiveArea.width);if(!i&&e.characterFormat.bidi&&e.isCombinedRTLText&&l<t/2&&(l+=this.effectiveJustifyWidth,this.viewer.clientActiveArea.width=l),e.isCombinedRTLText=!1,(this.effectiveJustifyWidth=0)!=t&&t/2<=l){var e=void 0,d=0;if("Left"!==a&&this.viewer.textWrap&&("Justify"!==a||!n||"Justify"===a&&o.bidi||this.is2013Justification&&n)&&((e=this.getSubWidth(r,"Justify"===a,0,s,n))[0].spaceCount,d=e[0].totalSpaceCount),!G.isNullOrUndefined(e)&&1==e.length&&0<l&&"Justify"===a&&"Word2013"===this.documentHelper.compatibilityMode&&!this.is2013Justification&&0===o.rightIndent&&0===o.leftIndent){s=0,n=this.getTotalSpaceWidth(r,d),e=n/d;if(t<=l+(s=((l+n)/d-e)/e*100<=33?n/8:n/4))return i||(this.viewer.clientActiveArea.x-=s,this.viewer.clientActiveArea.width+=s,this.is2013Justification=!0),this.effectiveJustifyWidth=i?s:0,!0}}return!1},t.prototype.getTotalSpaceWidth=function(e,t){for(var i=0,r=0,n=-1,o=e.children.length-1;0<=o;o--)if(e.children[o]instanceof Rd){n=o;break}if(e)for(o=-1!==n?n+1:0;o<e.children.length;o++){var a,s=e.children[o];if(s instanceof ie&&0<(a=s.text.length-K.removeSpace(s.text).length)&&(i+=a*this.documentHelper.textHelper.getWidth(" ",s.characterFormat,s.scriptType),r+=a),!G.isNullOrUndefined(t)&&t<=r)break}return i},t.prototype.getSubWidthInfo=function(e,t,i,r,n,o,a){if(0<t)return t=t-i,n=(r=r.trim()).length-K.removeSpace(r).length,(i=t)<=0||0===n&&o&&!e.paragraph.paragraphFormat.bidi?i=n=0:o&&(!a&&0<n?i/=n:n=0),{trimmedSpaceWidth:0,subWidth:i,spaceCount:n,totalSpaceCount:n}},t.prototype.getBeforeSpacing=function(e,t){var i,r,n,o,a=0;return this.documentHelper.dontUseHtmlParagraphAutoSpacing?a=e.paragraphFormat.beforeSpacing:(r=e.previousWidget)instanceof Z?(n=this.getAfterSpacing(r),o=e.paragraphFormat.beforeSpacing,n<(o=e.paragraphFormat.spaceBeforeAuto?14:o)&&(a=o-n)):r instanceof Q?a=e.paragraphFormat.spaceBeforeAuto?14:e.paragraphFormat.beforeSpacing:!(t&&e.bodyWidget instanceof Y&&G.isNullOrUndefined(e.bodyWidget.containerWidget)&&e===e.bodyWidget.childWidgets[0]&&G.isNullOrUndefined(e.bodyWidget.childWidgets[0].previousSplitWidget))||(t=(r=e.bodyWidget).previousRenderedWidget,G.isNullOrUndefined(t))||G.isNullOrUndefined(t.lastChild)?a=e.paragraphFormat.spaceBeforeAuto?0:e.paragraphFormat.beforeSpacing:(i=r.sectionIndex===t.sectionIndex&&r.columnIndex!==t.columnIndex&&r.getSplitWidgets()[0].previousRenderedWidget&&r.sectionIndex!==r.getSplitWidgets()[0].previousRenderedWidget.sectionIndex&&this.documentHelper.pages.indexOf(r.page)===this.documentHelper.pages.indexOf(r.getSplitWidgets()[0].previousRenderedWidget.page),r.sectionIndex===t.sectionIndex&&!i||((r=t.lastChild)instanceof Z?(n=this.getAfterSpacing(r),o=e.paragraphFormat.beforeSpacing,n<(o=e.paragraphFormat.spaceBeforeAuto?14:o)&&(a=o-n)):r instanceof Q&&(a=e.paragraphFormat.spaceBeforeAuto?14:e.paragraphFormat.beforeSpacing))),this.isSameStyle(e,!1)||"Word2013"===this.documentHelper.compatibilityMode&&this.isFirstElementWithPageBreak(e)?0:K.convertPointToPixel(a)},t.prototype.getAfterSpacing=function(e){var t=e.paragraphFormat.afterSpacing;return!this.documentHelper.dontUseHtmlParagraphAutoSpacing&&e.paragraphFormat.spaceAfterAuto&&(t=G.isNullOrUndefined(e.nextWidget)&&e.isInsideTable&&-1===e.paragraphFormat.listFormat.listId?0:14),this.isSameStyle(e,!0)?0:t},t.prototype.getLineSpacing=function(e,t,i){if(G.isNullOrUndefined(e.paragraphFormat))return 0;var r=0;switch(e.paragraphFormat.lineSpacingType){case"AtLeast":case"Exactly":r=K.convertPointToPixel(e.paragraphFormat.lineSpacing);break;default:r=e.paragraphFormat.lineSpacing,i&&(r-=1),r*=t}return r},t.prototype.isParagraphFirstLine=function(e,t){var i=e;return!(!G.isNullOrUndefined(i.childWidgets)&&0!==i.childWidgets.indexOf(t)||0<t.children.length&&!G.isNullOrUndefined(e.previousWidget)&&e.previousWidget instanceof Z&&t.paragraph.index===e.previousWidget.index)},t.prototype.isParagraphLastLine=function(e){var t=e.line.paragraph,t=t.childWidgets[t.childWidgets.length-1],t=t.children[t.children.length-1];return e===t&&(t instanceof te||!(t instanceof ie&&"\v"===t.text))},t.prototype.getTextIndexAfterSpace=function(e,t){var i=e.length,r=0,n=0,r=e.indexOf(" ",t)+1,o=(0<(n=1==(n=e.indexOf("-",t)+1)&&(n=e.indexOf("-",n+1)+1,"-"==e[0])&&(0==n||0<r&&r<n)?1:n)&&0<r?r=Math.min(r,n):0<n&&0==r&&(r=n),r);if(0!==o&&o!==i)for(;" "===e[o]&&++o!==i;);return o},t.prototype.moveNextWidgetsToTable=function(e,t,i){for(var r=t.indexInOwner,n=e[e.length-1],o=(i&&(r+=1),t.containerWidget.childWidgets.splice(r)),a=0;a<o.length;a++)n.childWidgets.push(o[a]),o[a].containerWidget=n},t.prototype.addTableCellWidget=function(e,t,i,r){var n,o=0,a=0,s=0,l=(G.isNullOrUndefined(e.cellFormat)||(s=e.cellFormat.containsMargins()?(a=G.isNullOrUndefined(e.cellFormat.leftMargin)?K.convertPointToPixel(e.ownerTable.tableFormat.leftMargin):K.convertPointToPixel(e.cellFormat.leftMargin),G.isNullOrUndefined(e.cellFormat.rightMargin)?K.convertPointToPixel(e.ownerTable.tableFormat.rightMargin):K.convertPointToPixel(e.cellFormat.rightMargin)):(a=0===e.columnIndex&&e.ownerRow.rowFormat.hasValue("leftMargin")?K.convertPointToPixel(e.ownerRow.rowFormat.leftMargin):K.convertPointToPixel(e.ownerTable.tableFormat.leftMargin),e.columnIndex===e.ownerTable.tableHolder.columns.length-1&&e.ownerRow.rowFormat.hasValue("rightMargin")?K.convertPointToPixel(e.ownerRow.rowFormat.rightMargin):K.convertPointToPixel(e.ownerTable.tableFormat.rightMargin))),0===(n=G.isNullOrUndefined(e.ownerTable)||G.isNullOrUndefined(e.ownerTable.tableFormat)?0:K.convertPointToPixel(e.ownerTable.tableFormat.cellSpacing))&&e.ownerTable.isContainInsideTable&&!e.ownerTable.header&&(l=ee.getCellTopBorder(e),0===e.topMargin&&.75===l.lineWidth&&(i+=K.convertPointToPixel(.5)),l=ee.getCellLeftBorder(e),e.leftMargin<=.5)&&.75===l.lineWidth&&(a+=K.convertPointToPixel(.8)),e.margin=new Hl(a,i,s,r),e.ownerTable.tableFormat.allowAutoFit,e.cellFormat.cellWidth),i=("Percent"===e.cellFormat.preferredWidthType&&0!==e.cellFormat.preferredWidth&&l<=0&&(a=K.convertPointToPixel(e.ownerTable.getTableClientWidth(e.ownerTable.getContainerWidth())),l=e.ownerTable.getCellWidth(e.cellFormat.preferredWidth,e.cellFormat.preferredWidthType,a,e)),e.width=K.convertPointToPixel(l),0),s=((o=G.isNullOrUndefined(e.previousWidget)?o:e.previousWidget.columnIndex+e.previousWidget.cellFormat.columnSpan)<e.columnIndex&&(i=K.convertPointToPixel(e.ownerTable.tableHolder.getPreviousSpannedCellWidth(o,e.columnIndex)),0===o)&&(i-=n/2),e.x=t.x+i+e.margin.left,e.y=t.y+e.margin.top+n,e.width=e.width-e.margin.left-e.margin.right,0<n&&(e.x+=n,1===e.ownerTable.tableHolder.columns.length?e.width-=2*n:0===e.columnIndex||e.columnIndex===e.ownerTable.tableHolder.columns.length-1?e.width-=2*n-n/2:e.width-=n),K.convertPointToPixel(ee.getCellLeftBorder(e).getLineWidth())),r=K.convertPointToPixel(ee.getCellRightBorder(e).getLineWidth()),a=!1,l=(e.leftBorderWidth=e.ownerTable.isBidiTable?r:s,"None"===e.cellFormat.borders.left.lineStyle),o="None"===e.cellFormat.borders.right.lineStyle;e.x+=!l||0<e.leftBorderWidth?0:e.leftBorderWidth,e.width-=!l||0<e.leftBorderWidth?0:e.leftBorderWidth,e.ownerTable.isBidiTable?e.cellIndex:(e.cellIndex,e.ownerRow.childWidgets.length);return(0<n||e.columnIndex===e.ownerTable.tableHolder.columns.length-1||e.index===e.containerWidget.childWidgets.length-1)&&(e.rightBorderWidth=e.ownerTable.isBidiTable?s:r,e.ownerTable.tableFormat.allowAutoFit||(e.width-=e.rightBorderWidth),this.isInsertTable()||(a=this.checkPreviousMargins(e.ownerTable))),e.margin.right+=o&&!a||0<e.ownerTable.tableFormat.cellSpacing&&e.ownerTable.tableFormat.allowAutoFit||e.ownerTable.tableFormat.isRTFTable?0:e.rightBorderWidth,e},t.prototype.checkPreviousMargins=function(e){for(var t=0;t<e.childWidgets.length;t++)for(var i=e.childWidgets[t],r=0;r<i.childWidgets.length;r++)if("None"!==i.childWidgets[i.childWidgets.length-1].cellFormat.borders.right.lineStyle)return!0;return!1},t.prototype.addWidgetToTable=function(e,t,i,r,n,o,a,s,l){var d=t[0],h=d.childWidgets.length,c=void 0,g=i.indexOf(r),p=[];if(0<g?c=i[g-1]:r.previousRenderedWidget instanceof $&&r.previousRenderedWidget.ownerTable.equals(r.ownerTable)&&(c=r.previousRenderedWidget),G.isNullOrUndefined(c)||(h=(d=c.containerWidget).childWidgets.indexOf(c)+1,Math.round(r.y)!==Math.round(c.y+c.height)&&((c=t.indexOf(d))+1>=t.length&&(this.addTableWidget(e.clientActiveArea,t,!0).containerWidget=d.containerWidget),h=(d=t[c+1]).childWidgets.length),0<g&&(h=0)),this.updateRowHeightBySpannedCell(d,r,h),this.updateRowHeightByCellSpacing(t,r,e),0!==g&&(r.containerWidget&&r.containerWidget!==d&&-1!==r.containerWidget.childWidgets.indexOf(r)&&r.containerWidget.childWidgets.splice(r.containerWidget.childWidgets.indexOf(r),1),-1===d.childWidgets.indexOf(r)&&(d.childWidgets.splice(h,0,r),l)&&(d.bodyWidget.page.repeatHeaderRowTableWidget=!0),r.containerWidget=d),!r.ownerTable.isInsideTable){if(0<n.length)G.isNullOrUndefined(n)||(p=this.getFootnoteBody(n));else if(!G.isNullOrUndefined(r))for(var u=0;u<r.childWidgets.length;u++)for(var f=r.childWidgets[u],m=0;m<f.childWidgets.length;m++)for(var y=this.getFootNoteWidgetsOf(f.childWidgets[m],!0),v=0;v<y.length;v++)p.splice(p.length,0,y[v]);0<p.length&&G.isNullOrUndefined(p[0].containerWidget)?this.layoutFootnoteInSplittedRow(r,p):!G.isNullOrUndefined(p)&&0<p.length&&void 0!==r.bodyWidget.previousRenderedWidget&&s!==r.bodyWidget.page.index&&p[0].containerWidget.page.index!==r.bodyWidget.page.index?this.moveFootNotesToPage(p,p[0].containerWidget.page.bodyWidgets[0],r.bodyWidget):0<p.length&&!this.isInitialLoad&&!G.isNullOrUndefined(r.bodyWidget.page.footnoteWidget)&&this.layoutfootNote(r.bodyWidget.page.footnoteWidget),n.length=0}this.updateRowHeightByFloatingElements(r),d.height=d.height+r.height,this.viewer instanceof Tl&&(G.isNullOrUndefined(d.containerWidget)||!(0<=d.containerWidget.childWidgets.indexOf(d))||d.containerWidget instanceof X||(d.containerWidget.height+=r.height)),this.updateHeightForRowWidget(e,!1,t,i,r,!1,o,a),e.cutFromTop(r.y+r.height),this.viewer.clientActiveArea.height-=this.getFootNoteHeight(p),r.ownerTable.isInsideTable||(this.existFootnoteHeight=0)},t.prototype.updateRowHeightByFloatingElements=function(e){if("Exactly"!==e.rowFormat.heightType&&!e.ownerTable.isInsideTable&&!G.isNullOrUndefined(e.ownerTable.previousSplitWidget)){for(var t=0,i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];if(!(1<r.cellFormat.rowSpan))for(var n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];if(o instanceof Z)for(var a=0;a<o.floatingElements.length;a++){var s=o.floatingElements[a],l=s.textWrappingStyle;"InFrontOfText"===l||"Behind"===l||"Inline"===l||"Word2013"!==this.documentHelper.compatibilityMode&&!s.layoutInCell||(t=Math.max(t,s.y+s.height+r.margin.bottom-(e.y+e.height)))}}}0<t&&(e.height+=t)}},t.prototype.layoutFootnoteInSplittedRow=function(e,t){if(t&&0<t.length){G.isNullOrUndefined(e.ownerTable.bodyWidget.page.footnoteWidget)&&this.addEmptyFootNoteToBody(e.ownerTable.bodyWidget);var i=e.ownerTable.bodyWidget.page.footnoteWidget;if(i){for(var r=0;r<t.length;r++)i.bodyWidgets.push(t[r]),t[r].containerWidget=i;this.layoutfootNote(i)}}},t.prototype.getFootNoteHeight=function(e){var t=0;if(Array.isArray(e))for(var i=0;i<e.length;i++)t+=this.getFootnoteHeightInternal(e[i],i);else t=this.getFootnoteHeightInternal(e,0);return t},t.prototype.getFootnoteHeightInternal=function(e,t){for(var i=0,r=0;r<e.childWidgets.length;r++)i+=e.childWidgets[r].height,(0===e.indexInOwner||-1!==e.indexInOwner&&e.containerWidget&&0===this.existFootnoteHeight&&0===t)&&0===r&&(i+=e.containerWidget.margin.top);return i},t.prototype.updateRowHeightBySpannedCell=function(e,t,i){var r=1;if(0===e.childWidgets.length||0===i)this.updateRowHeight(t,t);else{for(var n=0;n<t.childWidgets.length;n++){var o=t.childWidgets[n],r=G.isNullOrUndefined(o)||G.isNullOrUndefined(o.cellFormat)?r:o.cellFormat.rowSpan;this.updateSpannedRowCollection(r,t,o)}if(!G.isNullOrUndefined(t.ownerTable))for(n=0;n<t.ownerTable.spannedRowCollection.length;n++)if(t.ownerTable.spannedRowCollection.keys[n]===t.index){for(var a=0;a<i;a++){var s=e.childWidgets[a];this.updateRowHeight(s,t)}t.ownerTable.spannedRowCollection.remove(t.ownerTable.spannedRowCollection.keys[n]);break}}},t.prototype.updateRowHeight=function(e,t){for(var i=t.index,r=1,n=0;n<e.childWidgets.length;n++){var o=e.childWidgets[n],r=G.isNullOrUndefined(o)||G.isNullOrUndefined(o.cellFormat)?r:o.cellFormat.rowSpan;this.updateSpannedRowCollection(r,t,o),i-o.rowIndex==r-1&&(o=o.y+o.height+o.margin.bottom-t.y,"Exactly"!==t.rowFormat.heightType||"Exactly"===t.rowFormat.heightType&&t.rowFormat.height>o)&&t.height<o&&(t.height=o)}},t.prototype.updateSpannedRowCollection=function(e,t,i){1<e&&!G.isNullOrUndefined(t.ownerTable)&&(t.ownerTable.spannedRowCollection.containsKey(i.rowIndex+e-1)||t.ownerTable.spannedRowCollection.add(i.rowIndex+e-1,i.rowIndex))},t.prototype.updateRowHeightByCellSpacing=function(e,t,i){0<t.ownerTable.tableFormat.cellSpacing&&1<e.length&&t.y===i.clientArea.y&&i instanceof Tl&&(t.height=t.height-K.convertPointToPixel(t.ownerTable.tableFormat.cellSpacing)/2)},t.prototype.removeStaleSplittedCellWidgets=function(e){if(!e.ownerTable.isInsideTable)for(var t=this.documentHelper.splittedCellWidgets,i=t.length-1;0<=i;i--){var r=t[i].ownerTable;G.isNullOrUndefined(r)||r.equals(e.ownerTable)||t.splice(i,1)}},t.prototype.isRowSpanEnd=function(e,t){for(var i=e.index,r=1,n=0;n<this.documentHelper.splittedCellWidgets.length;n++){var o=this.documentHelper.splittedCellWidgets[n],r=G.isNullOrUndefined(o)||G.isNullOrUndefined(o.cellFormat)?r:o.cellFormat.rowSpan;if(i-o.rowIndex==r-1)return!0}return!1},t.prototype.isVerticalMergedCellContinue=function(e){for(var t=0,i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];if(t<r.columnIndex)return!0;t+=r.cellFormat.columnSpan}return t<e.ownerTable.tableHolder.columns.length},t.prototype.splitWidgets=function(e,t,i,r,n,o,a,s,l,d,h){if((!d||0!==s)&&this.isFirstLineFitForRow(t.clientArea.bottom,e)&&0<e.childWidgets.length){if(n=this.getSplittedWidgetForRow(t.clientArea.bottom,i,r,e,a,s,d,void 0,h),a=[],0<this.documentHelper.splittedCellWidgets.length||n!==e){if(o&&!G.isNullOrUndefined(n))for(var c=0;c<n.childWidgets.length;c++)n.childWidgets[c].rowIndex!==n.index&&(n.childWidgets.splice(c,1),c--);this.insertSplittedCellWidgets(t,i,n,e.index-1)}}else this.insertSplittedCellWidgets(t,i,n,e.index-1);return n},t.prototype.getSplittedWidgetForRow=function(e,t,i,r,n,o,a,s,l){for(var d=void 0,h=r.index,c=this.isRelayoutneed=!1,g=r.height,p=g,u=0,f=0;f<r.childWidgets.length;f++){var m=r.childWidgets[f];if(0===f&&0<m.childWidgets.length&&0===m.columnIndex&&1===m.cellFormat.rowSpan&&"Word2013"===this.documentHelper.compatibilityMode&&0===this.documentHelper.splittedCellWidgets.length&&1===i.length){var y=this.documentHelper.getFirstParagraphInCell(m);if((!G.isNullOrUndefined(y)&&y.paragraphFormat.keepWithNext||r.rowFormat.isHeader)&&!G.isNullOrUndefined(this.getPreviousBlock(r)))return r}var v=this.getSplittedWidget(e,!0,t,i,m,n,o,a,s);if(a&&!G.isNullOrUndefined(v)&&0!==v.childWidgets.length&&g>m.height&&(g=m.height),!G.isNullOrUndefined(n)&&0<n.length)for(var W=0;W<n.length;W++)-1===n[W].paragraph.containerWidget.indexInOwner&&n.splice(W,1);if(G.isNullOrUndefined(v)&&m===r.childWidgets[r.childWidgets.length-1]&&this.isRowSpanEnd(r,this.viewer)&&0<this.documentHelper.splittedCellWidgets.length&&l&&(d=this.getSplittedWidgetForSpannedRow(e,r,t,i,n),v=void 0),m.height>u&&!m.ownerTable.isInsideTable&&(u=m.height),!G.isNullOrUndefined(v)){if(v===m)return 1<i.length&&this.combineSplittedRowWidgets(i,p),r;var b=0;if(m.ownerTable.isInsideTable)for(var x=0;x<m.childWidgets.length;x++)b+=m.childWidgets[x].height;m.ownerTable.isInsideTable&&u<b&&(u=b),-1!==r.childWidgets.indexOf(v)&&r.childWidgets.splice(r.childWidgets.indexOf(v),1),r.height-=v.height,(0===f||r.height<u+m.margin.top+m.margin.bottom)&&(r.height=u+m.margin.top+m.margin.bottom),G.isNullOrUndefined(d)&&((d=new $).containerWidget=r.containerWidget,d.index=r.index,d.rowFormat=r.rowFormat,d.isRenderBookmarkEnd=r.isRenderBookmarkEnd,this.updateWidgetLocation(r,d),i.push(d));y=G.isNullOrUndefined(v)||G.isNullOrUndefined(v.cellFormat)?1:v.cellFormat.rowSpan;h-v.rowIndex==y-1&&d.height<v.height+v.margin.top+v.margin.bottom?d.height=v.height+v.margin.top+v.margin.bottom:("Exactly"===r.rowFormat.heightType||"AtLeast"===r.rowFormat.heightType&&d.height<r.rowFormat.height)&&(d.height=r.rowFormat.height),d.childWidgets.push(v),v.containerWidget=d,this.isRelayoutneed=!0;for(var w=f;0<w&&!c;){var F=r.childWidgets[w-1],v=this.getSplittedWidget(e,!0,t,i,F,n);d.childWidgets.splice(0,0,v),v.containerWidget=d,w--}c=!0}}if(a&&g!==p){for(f=0;f<r.childWidgets.length;f++)r.childWidgets[f].height=g;r.height=g}return d},t.prototype.combineSplittedRowWidgets=function(e,t){for(var i=e[0],r=1;r<e.length;r++){for(var n=e[r],o=0;o<n.childWidgets.length;o++){var a=i.childWidgets[o],s=n.childWidgets[o];if(0<s.childWidgets.length)for(var l=0;l<s.childWidgets.length;l++){var d=s.childWidgets[l];if(d instanceof Z){var h=a.childWidgets[l];if(G.isNullOrUndefined(h)||h.index!==d.index)a.childWidgets.push(d),d.containerWidget=a;else{var c=d;if(0<c.childWidgets.length)for(var g=0;g<c.childWidgets.length;g++){var p=c.childWidgets[g];h.childWidgets.push(p),(p.paragraph=h).height+=p.height}}a.height+=d.height}else d instanceof Q&&(a.childWidgets.push(d),(d.containerWidget=a).height+=d.height)}}e.splice(r,1)}i.height=t},t.prototype.getSplittedWidgetForSpannedRow=function(e,t,i,r,n){for(var o=void 0,a=void 0,s=!1,l=!1,d=0;d<this.documentHelper.splittedCellWidgets.length;d++){for(var a=this.documentHelper.splittedCellWidgets[d],h=this.documentHelper.splittedCellWidgets[d+1],c=G.isNullOrUndefined(h)?0:h.columnIndex,g=this.documentHelper.splittedCellWidgets[d].columnIndex,p=this.documentHelper.splittedCellWidgets[d];p&&p.cellFormat.rowSpan===this.documentHelper.splittedCellWidgets[d].cellFormat.rowSpan&&0<g&&!s;)g=p.columnIndex,p=(f=p.containerWidget).getCell(f.rowIndex,g-1);var u=this.documentHelper.splittedCellWidgets[d].columnIndex;for(p=this.documentHelper.splittedCellWidgets[d];p&&p.cellFormat.rowSpan===this.documentHelper.splittedCellWidgets[d].cellFormat.rowSpan&&u<p.containerWidget.childWidgets.length-1&&(!s||l);){var f,u=p.columnIndex;p=(f=p.containerWidget).getCell(f.rowIndex,u+1)}for(G.isNullOrUndefined(o)&&((o=new $).containerWidget=t.containerWidget,o.index=t.index,o.rowFormat=t.rowFormat,o.isRenderBookmarkEnd=t.isRenderBookmarkEnd,this.updateWidgetLocation(t,o),r.push(o)),o.childWidgets.push(a),a.containerWidget=o,this.isRelayoutneed=!0;0<g&&!s;){var m=t.getCell(t.index,g-1);G.isNullOrUndefined(m)?g--:(a=this.getSplittedWidget(e,!0,i,r,m,n),o.childWidgets.splice(0,0,a),a.index===a.containerWidget.childWidgets.length-1&&(a.width+=a.rightBorderWidth),a.rightBorderWidth=0,a.containerWidget=o,g--)}for(;u<t.childWidgets[t.childWidgets.length-1].columnIndex&&(!s||l);){m=t.getCell(t.index,u+1);if(G.isNullOrUndefined(m));else{if(h&&m.columnIndex>c){l=!0;break}a=this.getSplittedWidget(e,!0,i,r,m,n),o.childWidgets.push(a),a.containerWidget=o}u++}s=!0}return o},t.prototype.getFootNoteHeightInLine=function(e){for(var t=0,i=0;i<e.children.length;i++){var r=e.children[i];r instanceof Sd&&(t+=this.getFootNoteHeight(r.bodyWidget))}return t},t.prototype.getFootnoteFromLine=function(e,t){for(var i=0;i<e.children.length;i++)e.children[i]instanceof Sd&&t.push(e.children[i])},t.prototype.updateWidgetsToTable=function(e,t,i,H,r,n,o){for(var R=this,q=i.bodyWidget.page.index,a=this.getRowHeight(i,[i]),s=this.viewer,l=i.rowFormat.isHeader,d=i.rowFormat.allowBreakAcrossPages,h=i.rowFormat.heightType,c=0,g=i,p=!1,u=this.layoutedFootnoteElement,f=!1,m=(void 0!==g.bodyWidget.page.footnoteWidget?(this.footHeight=this.getFootNoteHeight(g.bodyWidget.page.footnoteWidget.bodyWidgets),0===this.footnoteHeight&&(this.footnoteHeight=this.footHeight)):this.footHeight=0,i.ownerTable.continueHeader&&!l&&(i.ownerTable.continueHeader=!1),i.ownerTable.isInsideTable),y=!1,v=function(){return 0<R.documentHelper.splittedCellWidgets.length&&(i.ownerTable.isInsideTable||R.documentHelper.splittedCellWidgets.some(function(e){return e.ownerTable.equals(i.ownerTable)}))},W=G.isNullOrUndefined(i.ownerTable)||G.isNullOrUndefined(i.ownerTable.tableFormat)?0:K.convertPointToPixel(i.ownerTable.tableFormat.cellSpacing);c<t.length;){if(c=t.length,this.removeStaleSplittedCellWidgets(i),this.isRowSpanEnd(i,s)&&"Exactly"===i.rowFormat.heightType&&1===this.documentHelper.splittedCellWidgets.length&&(this.documentHelper.splittedCellWidgets=[]),!o&&(i.ownerTable.isInsideTable||i.bodyWidget instanceof X||!v()&&g.y+g.height+W+this.footHeight<=s.clientArea.bottom)){i.ownerTable.isHeaderNotRepeatForAllPages=!1,!this.isVerticalMergedCellContinue(i)||g.y!==s.clientArea.y&&g.y!==this.viewer.clientArea.y+g.ownerTable.headerHeight||this.insertSplittedCellWidgets(s,e,g,g.index-1),this.addWidgetToTable(s,e,t,g,u,void 0,m,q,f);var b=!(!(0<this.documentHelper.splittedCellWidgets.length&&i.ownerTable.isInsideTable)||i.ownerTable.equals(this.documentHelper.splittedCellWidgets[0].ownerTable));!G.isNullOrUndefined(i.bodyWidget)&&i.bodyWidget instanceof Y&&v()&&!b&&G.isNullOrUndefined(t[t.length-1].nextRow)?(c--,y=!0):!G.isNullOrUndefined(i.bodyWidget)&&i.bodyWidget instanceof Y&&v()&&!b&&!G.isNullOrUndefined(t[t.length-1].nextRow)&&!this.isRowSpanEnd(t[t.length-1].nextRow,s)&&c--,m=!1}else{u=[],m=!1;if(0<this.documentHelper.splittedCellWidgets.length&&g.y+g.height+this.footHeight<=s.clientArea.bottom)if(!this.isRowSpanEnd(i,s)){this.isVerticalMergedCellContinue(i)&&(g.y===s.clientArea.y||g.y===this.viewer.clientArea.y+g.ownerTable.headerHeight&&!l)&&(this.insertSplittedCellWidgets(s,e,g,g.index-1,!0),this.updateChildLocationForRow(g.y,g)),this.addWidgetToTable(s,e,t,g,u);continue}var x=g,b=e[e.length-1];if(o||a+g.y+this.footHeight>s.clientArea.bottom)if(!d||l&&i.ownerTable.continueHeader||"AtLeast"===h&&K.convertPointToPixel(i.rowFormat.height)<s.clientArea.bottom){var w=!d&&G.isNullOrUndefined(g.previousWidget)&&1<e.length;"AtLeast"===h&&K.convertPointToPixel(i.rowFormat.height)<s.clientActiveArea.height&&(d||w)||"Exactly"!==h&&g.y===s.clientArea.y||"Auto"===h&&d?(x=this.splitWidgets(g,s,e,t,x,y,u,r,n,o),G.isNullOrUndefined(x)&&g.y===s.clientArea.y?this.addWidgetToTable(s,e,t,g,u):G.isNullOrUndefined(x)&&"AtLeast"===h&&g.containerWidget.lastChild!==g&&(x=g)):"AtLeast"===h&&K.convertPointToPixel(i.rowFormat.height)>s.clientActiveArea.height&&0<this.documentHelper.splittedCellWidgets.length&&this.isRowSpanEnd(i,s)&&this.insertSplittedCellWidgets(s,e,g,g.index-1),"Exactly"===h&&g.y===s.clientArea.y&&(this.addWidgetToTable(s,e,t,g,u),c++),this.updateHeader(i,l,s)}else if("Auto"!==h&&"AtLeast"!==h||!d){if("Exactly"===h&&g.y===s.clientArea.y){this.addWidgetToTable(s,e,t,g,u),c++;continue}}else if(K.convertPointToPixel(i.rowFormat.height)>s.clientArea.bottom&&g.y!==s.clientArea.y){if("AtLeast"===h&&K.convertPointToPixel(i.rowFormat.height)>s.clientArea.bottom&&g.ownerTable.wrapTextAround&&g.y-K.convertPointToPixel(g.ownerTable.positioning.verticalPosition)===s.clientArea.y&&g.bodyWidget.firstChild===g.ownerTable&&(x=this.splitWidgets(g,s,e,t,x,y,u,r,n,o),G.isNullOrUndefined(x))){this.addWidgetToTable(s,e,t,g,u),c++;continue}}else x=this.splitWidgets(g,s,e,t,x,y,u,r,n,o),G.isNullOrUndefined(x)&&g.y===s.clientArea.y&&this.addWidgetToTable(s,e,t,g,u);else{var w=!1,F=0;if(G.isNullOrUndefined(g.ownerTable.headerHeight)||(F=g.ownerTable.headerHeight),this.isVerticalMergedCellContinue(i)&&(d||(w=g.y===s.clientArea.y||g.y===this.viewer.clientArea.y+F)))if(!(w&&g.height+g.y+this.footHeight<s.clientArea.bottom)||l&&G.isNullOrUndefined(g.previousWidget)){if(x=this.splitWidgets(g,s,e,t,x,y,u,void 0,void 0,void 0,!0),G.isNullOrUndefined(x)){if(w=g.y===s.clientArea.y||g.y===this.viewer.clientArea.y+F){this.insertSplittedCellWidgets(s,e,g,g.indexInOwner-1),c--;continue}this.isRowSpanEnd(i,s)&&(x=g)}}else this.insertSplittedCellWidgets(s,e,x,g.indexInOwner-1);else y&&!d?x=this.splitWidgets(g,s,e,t,x,y,u):this.isRowSpanEnd(i,s)&&!d?("AtLeast"===h&&0<i.ownerTable.spannedRowCollection.keys.length&&(x=this.splitWidgets(g,s,e,t,x,y,u,r,n,o,!0)),G.isNullOrUndefined(x)&&this.addWidgetToTable(s,e,t,g,u)):g.y===s.clientArea.y&&g.height+g.y+this.footHeight>s.clientArea.bottom&&d?x=this.splitWidgets(g,s,e,t,x,y,u):"Exactly"===h&&g.y===s.clientArea.y&&g.height+g.y+this.footHeight>s.clientArea.bottom&&g.height>s.clientActiveArea.height&&!G.isNullOrUndefined(x)&&(x=!d&&G.isNullOrUndefined(g.previousWidget)&&1<e.length?this.splitWidgets(g,s,e,t,x,y,u):x,G.isNullOrUndefined(x))&&this.addWidgetToTable(s,e,t,g,u);this.updateHeader(i,l,s)}if(!(G.isNullOrUndefined(x)||this.documentHelper.editorProperties.isTableInsert||x.bodyWidget.containerWidget instanceof J)){if(b.isHeaderNotRepeatForAllPages=!1,x!==g)this.addWidgetToTable(s,e,t,g,u,g.nextRow,void 0,void 0,f),this.updateWidgetsToPage(e,t,i.ownerTable,H,g.nextRow),e.indexOf(g.containerWidget)+1>=e.length&&this.addTableWidget(s.clientActiveArea,e,!0),g=x;else{if(0<i.index)this.updateWidgetsToPage(e,t,i.ownerTable,H,i),i.previousRenderedWidget instanceof $&&(P=i.previousRenderedWidget,K.round(g.y,2)===K.round(P.y+P.height,2))&&!(e.indexOf(P.containerWidget)+1>=e.length)||this.addTableWidget(s.clientActiveArea,e,!0);else if("Exactly"===h&&a+g.y+this.footHeight<s.clientArea.bottom&&g.y>=s.clientArea.y){this.addWidgetToTable(s,e,t,g,u),c++;continue}p=!0,c--}var C,b=e[e.length-1],P=i,T=!1,O=(i.ownerTable.containerWidget.index,!1),S=void 0,N=void 0,I=(N=p&&1===e.length?e[e.length-1]:e[e.length-2],!0),k=(p&&1===t.length&&(k=this.alignBlockElement(i),G.isNullOrUndefined(k.node)||((C=k.node)instanceof $&&0===C.indexInOwner?1<e.length&&0===e[e.length-1].childWidgets.length&&(e.pop(),(b=e[e.length-1]).height=0):k.node instanceof Z&&(N=this.splitParagraph(k.node,parseInt(k.position.index,10)),1<e.length&&0===e[e.length-1].childWidgets.length&&(e.pop(),b=e[e.length-1]),I=!1),C instanceof $&&(O=0===C.indexInOwner,(P=C).ownerTable.equals(i.ownerTable)||(N=P.ownerTable,I=!1)),T=!0)),S=this.moveBlocksToNextPage(!(N instanceof Z)&&(!T||!O||G.isNullOrUndefined(N.previousWidget))?N:N.previousWidget,T,void 0,void 0,void 0,!0),e[e.length-1]),O=(p&&I&&(0===P.index||1===e.length&&0===P.indexInOwner)&&k.containerWidget&&-1!==k.containerWidget.childWidgets.indexOf(k)&&k.containerWidget.childWidgets.splice(k.containerWidget.childWidgets.indexOf(k),1),I&&(-1!==S.childWidgets.indexOf(k)&&S.childWidgets.splice(S.childWidgets.indexOf(k),1),S.childWidgets.unshift(k),this.shiftFloatingItemsFromTable(k,S)),k.containerWidget=S,(p&&0<P.index||1<t.length)&&(C=p?t[t.length-1]:t[t.length-2],T&&(C=P),K.convertPointToPixel(C.rowFormat.height)+b.headerHeight>this.viewer.clientArea.height?b.isHeaderNotRepeatForAllPages=!0:b.isHeaderNotRepeatForAllPages=!1,this.moveNextWidgetsToTable(e,C,!p),P=i),S.firstChild instanceof Z&&this.updateParaOnBeforeSpacing(S.firstChild,S,!0),T&&this.updateClientPositionForBlock(I?k:N,i),p=!1),N=this.documentHelper.viewer.clientArea.bottom-g.bottomBorderWidth-W;if(P.ownerTable.header&&(x.x=x.x,x.y=this.viewer.clientArea.y+b.headerHeight,this.updateChildLocationForRow(x.y,x),O=this.isFirstLineFitForRow(N,x)),!O||!P.ownerTable.header||T||"Word2013"===this.documentHelper.compatibilityMode&&b.isHeaderNotRepeatForAllPages){if(s.updateClientAreaForBlock(P.ownerTable,!0,e,void 0,!0),1<x.bodyWidget.sectionFormat.columns.length){for(var N=new _(this.viewer.clientArea.x,this.viewer.clientArea.y,this.viewer.clientArea.width,this.viewer.clientArea.height),O=new _(this.viewer.clientActiveArea.x,this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.width,this.viewer.clientActiveArea.height),E=(x.x=this.viewer.clientActiveArea.x,x.y=this.viewer.clientActiveArea.y,this.getMaxTopCellMargin(x)),M=this.getMaxBottomCellMargin(x),A=0;A<x.childWidgets.length;A++){var L=x.childWidgets[A];L.height=0,this.addTableCellWidget(L,this.viewer.clientActiveArea,E+x.topBorderWidth,M+x.bottomBorderWidth),this.viewer.updateClientAreaForCell(L,!0);for(var V=0;V<L.childWidgets.length;V++){var U=L.childWidgets[V];s.updateClientAreaForBlock(U,!0),U.containerWidget=L,this.layoutBlock(U,0),s.updateClientAreaForBlock(U,!1)}this.viewer.updateClientAreaForCell(L,!1)}this.viewer.clientActiveArea=O,this.viewer.clientArea=N}x.x=x.x,x.y=b.y,this.updateChildLocationForRow(b.y-W/2,x,b.containerWidget,!0)}else{s instanceof Tl&&(f=S.page.repeatHeaderRowTableWidget=!0),s.updateClientAreaForBlock(P.ownerTable,!0,e);T=1<x.bodyWidget.sectionFormat.columns.length?b.x-x.x:0;x.y=b.y+P.ownerTable.headerHeight,this.updateChildLocationForRow(b.y+P.ownerTable.headerHeight,x,b.containerWidget),0!=T&&this.shiftXPosition(x,T)}if(I&&0<this.shiftedFloatingItemsFromTable.length){for(A=0;A<this.shiftedFloatingItemsFromTable.length;A++){var B=this.shiftedFloatingItemsFromTable[A],D=this.getFloatingItemPoints(B);B.y=D.y,B.x=D.x,(B instanceof ne||B instanceof oe)&&this.updateChildLocationForCellOrShape(B.y,B)}this.shiftedFloatingItemsFromTable=[]}}y=!1}if(l)if(i.ownerTable.continueHeader&&(i.ownerTable.header=!0,i.ownerTable.headerHeight=a+i.ownerTable.headerHeight),O=this.getHeader(i.ownerTable),!G.isNullOrUndefined(O)&&i.index===O.index)if(((F=this.getHeaderHeight(i.ownerTable,i,t))>i.ownerTable.headerHeight||F>i.ownerTable.headerHeight)&&(i.ownerTable.headerHeight=F),i.ownerTable.headerHeight>s.clientArea.height){i.ownerTable.header=!1,i.ownerTable.continueHeader=!1,i.ownerTable.headerHeight=0;for(var z=this.documentHelper.pages,A=0;A<z.length;A++)z[A].repeatHeaderRowTableWidget&&(z[A].repeatHeaderRowTableWidget=!1)}o=!1,2<e.length&&i.ownerTable.header&&g.height<s.clientActiveArea.bottom&&!s.documentHelper.currentRenderingPage.repeatHeaderRowTableWidget&&(s.documentHelper.currentRenderingPage.repeatHeaderRowTableWidget=!0)}},t.prototype.updateHeader=function(e,t,i){if(t&&e.ownerTable.continueHeader){e.ownerTable.header=!1;var r=void(e.ownerTable.headerHeight=0);if(i instanceof Tl&&(r=this.documentHelper.pages),!G.isNullOrUndefined(r))for(var n=0;n<r.length;n++)!r[n].repeatHeaderRowTableWidget||G.isNullOrUndefined(r[n].bodyWidgets[0].firstChild)||r[n].bodyWidgets[0].firstChild instanceof Q&&r[n].bodyWidgets[0].firstChild.header||(r[n].repeatHeaderRowTableWidget=!1,e.ownerTable.continueHeader=!1)}},t.prototype.getHeader=function(e){var t=void 0,i=!0;e=e.getSplitWidgets()[0];for(var r=0;r<e.childWidgets.length;r++){var n=e.childWidgets[r];if(n.rowFormat.isHeader?t=n:i=!1,!i)break}return t},t.prototype.getHeaderHeight=function(e,t,i){var r=0;if(0<t.ownerTable.childWidgets.length&&e.childWidgets[0].rowFormat.isHeader)for(var n=0;n<e.childWidgets.length;n++){var o=e.childWidgets[n];if(!o.rowFormat.isHeader)break;r+=o.height}return r},t.prototype.getHeaderHeightForSpannedRow=function(e){for(var t=0,i=1,r=this.getHeader(e),n=0;n<e.childWidgets.length;n++){var o=e.childWidgets[n];if(o.rowFormat.isHeader&&(t+=o.height,o==r)){for(var a=0;a<r.childWidgets.length;a++)var s=r.childWidgets[a],i=Math.max(i,s.cellFormat.rowSpan);if(1<i&&n+i<e.childWidgets.length)for(var l=1;l<i;l++){var d=e.childWidgets[n+l];G.isNullOrUndefined(d)||(t+=d.height)}}}return t},t.prototype.updateWidgetToRow=function(e){var t,i=e.ownerRow;e.containerWidget=i,!G.isNullOrUndefined(e.ownerRow)&&"Exactly"!==e.ownerRow.rowFormat.heightType&&0<K.convertPointToPixel(e.ownerRow.rowFormat.height)&&0===e.cellIndex&&(this.documentHelper.isRowOrCellResizing&&0!==this.documentHelper.editorProperties.resizeNode&&this.documentHelper.editorProperties.resizingRowFormat===e.ownerRow.rowFormat?i.height=i.height+e.ownerRow.rowFormat.height:i.height=i.height+K.convertPointToPixel(e.ownerRow.rowFormat.height)),1===e.cellFormat.rowSpan&&(t=void 0,t="Exactly"===i.rowFormat.heightType?e.height+e.margin.bottom:e.height+e.margin.top+e.margin.bottom,i.height-K.convertPointToPixel(e.ownerTable.tableFormat.cellSpacing)<t)&&(i.height=t+K.convertPointToPixel(e.ownerTable.tableFormat.cellSpacing))},t.prototype.updateHeightForRowWidget=function(e,t,i,r,n,o,a,s){for(var l=0;l<n.childWidgets.length;l++){var d,h,c,g,p=0,u=void 0,f=(u=n.childWidgets[l]).cellFormat.rowSpan,p=K.convertPointToPixel(u.ownerTable.tableFormat.cellSpacing);1<f?(f=(d=n.containerWidget.childWidgets.indexOf(n))+f-1-(n.index-u.rowIndex),!G.isNullOrUndefined(n.rowFormat)&&n.rowFormat.isHeader&&!G.isNullOrUndefined(n.ownerTable)&&!G.isNullOrUndefined(n.ownerTable.previousWidget)&&e.clientArea.bottom<u.y+u.height+u.margin.bottom&&(y=void 0,g=c=!1,y=i[i.length-1],h=this.alignBlockElement(n),G.isNullOrUndefined(h.node)||((h=h.node)instanceof $&&0===h.indexInOwner&&1<i.length&&0===i[i.length-1].childWidgets.length&&(i.pop(),i[i.length-1].height=0),h instanceof $&&(c=0===h.indexInOwner,G.isNullOrUndefined((h=h).ownerTable)||h.ownerTable.equals(n.ownerTable)||(y=h.ownerTable)),g=!0),this.moveBlocksToNextPage(!(y instanceof Z)&&(!g||!c||G.isNullOrUndefined(y.previousWidget))?y:y.previousWidget,g,void 0,void 0,void 0,!0),this.updateClientPositionForBlock(y,n),this.addTableRowWidget(this.viewer.clientActiveArea,[n]),this.updateChildLocationForRow(this.viewer.clientActiveArea.y,n)),!s&&(e.clientArea.bottom<u.y+u.height+u.margin.bottom||d+1<=f)&&(1===r.length||1<=r.length&&n===r[r.length-1])&&(h=this.footHeight,this.footHeight=this.existFootnoteHeight=G.isNullOrUndefined(n.bodyWidget.page.footnoteWidget)?0:n.bodyWidget.page.footnoteWidget.height,this.splitSpannedCellWidget(u,i,r,e),this.footHeight=this.existFootnoteHeight=h),c=n,0<f&&(f<n.containerWidget.childWidgets.length?(g=n.containerWidget.childWidgets[f])instanceof $&&(c=g)===a&&(c=n):c=n.containerWidget.childWidgets[n.containerWidget.childWidgets.length-1]),u.y+u.height+u.margin.bottom<c.y+c.height?u.height=c.y+c.height-c.bottomBorderWidth-u.y-u.margin.bottom:o&&c&&0!==c.y&&0!==c.height&&u.y+u.height+u.margin.bottom>c.y+c.height&&("Exactly"!==c.rowFormat.heightType||"Exactly"===c.rowFormat.heightType&&c.rowFormat.height>u.y+u.height+u.margin.bottom-c.y?c.height=u.y+u.height+u.margin.bottom-c.y:u.height=c.y-u.y+c.height)):(0<p&&!n.rowFormat.isHeader&&1<i.length&&n.y===e.clientArea.y&&e instanceof Tl&&(p/=2),u.height=n.height-u.margin.top-u.margin.bottom-p),this.updateHeightForCellWidget(e,i,r,u);for(var m=n.containerWidget;m.containerWidget instanceof ql;)m=m.containerWidget;var y=void 0;m instanceof Y&&(y=m.page),(e instanceof Tl&&-1!==e.visiblePages.indexOf(y)||t)&&this.updateCellVerticalPosition(u,!1,u.ownerTable.isInsideTable)}},t.prototype.updateHeightForCellWidget=function(e,t,i,r){for(var n=0;n<r.childWidgets.length;n++)r.childWidgets[n]instanceof Q&&this.updateHeightForTableWidget(t,i,r.childWidgets[n])},t.prototype.getRowHeight=function(e,t){var i=0;if("Exactly"===e.rowFormat.heightType)i=e.rowFormat.height;else{for(var r=0;r<t.length;r++)t[r]instanceof $&&(i=t[r].height+i);i=Math.max(i,e.rowFormat.height)}return i},t.prototype.splitSpannedCellWidget=function(e,t,i,r){t=this.getSplittedWidget(r.clientArea.bottom,!1,t,i,e,void 0,void 0,void 0,void 0,!0);G.isNullOrUndefined(t)||(this.documentHelper.splittedCellWidgets.push(t),t.isSplittedCell=!0,G.isNullOrUndefined(t.ownerTable))||!t.ownerTable.isInsideTable||G.isNullOrUndefined(t.ownerTable.nextSplitWidget)||(i=t.ownerTable.nextSplitWidget,G.isNullOrUndefined(i.firstChild))||(e=i.firstChild,this.insertSplittedCellWidgets(r,[i],e,e.index-1,!0))},t.prototype.insertSplittedCellWidgets=function(e,t,i,r,n){if(!G.isNullOrUndefined(i)){for(var o=i.x,a=!1,s=K.convertPointToPixel(i.ownerTable.tableHolder.tableWidth),l=0;l<i.childWidgets.length;l++){var d=i.childWidgets[l],h="None"===d.cellFormat.borders.right.lineStyle,c=G.isNullOrUndefined(d.ownerTable)||G.isNullOrUndefined(d.ownerTable.tableFormat)?0:K.convertPointToPixel(d.ownerTable.tableFormat.cellSpacing);if(Math.round(o)<Math.round(d.x-d.margin.left-c)){if(this.insertRowSpannedWidget(i,e,o,l,n)){l--;continue}if(1===t.length&&0===this.documentHelper.splittedCellWidgets.length)break;var g=i.childWidgets.length;if(this.insertEmptySplittedCellWidget(i,t,o,l,r),g<i.childWidgets.length){l--;continue}}o+=d.margin.left+d.width+d.margin.right,(0<c||d.columnIndex===d.ownerTable.tableHolder.columns.length-1||d.index===d.containerWidget.childWidgets.length-1)&&(d.ownerTable.tableFormat.allowAutoFit||(g=K.convertPointToPixel(ee.getCellLeftBorder(d).getLineWidth()),c=K.convertPointToPixel(ee.getCellRightBorder(d).getLineWidth()),d.rightBorderWidth=d.ownerTable.isBidiTable?g:c,o+=d.rightBorderWidth),this.isInsertTable()||(a=this.checkPreviousMargins(d.ownerTable))),o-=h&&!a?0:d.rightBorderWidth,l===i.childWidgets.length-1&&Math.round(o)<Math.round(i.x+s)&&(this.insertRowSpannedWidget(i,e,o,l+1)||this.insertEmptySplittedCellWidget(i,t,o,l+1,r))}if((G.isNullOrUndefined(i.childWidgets)||0===i.childWidgets.length)&&0<this.documentHelper.splittedCellWidgets.length)for(var p=0;p<this.documentHelper.splittedCellWidgets.length;p++){var u=this.documentHelper.splittedCellWidgets[p];if(Math.round(o)<=Math.round(u.x-u.margin.left)){if(this.insertRowSpannedWidget(i,e,o,p)){p--;continue}var f=i.childWidgets.length;if(this.insertEmptySplittedCellWidget(i,t,o,p,r),f<i.childWidgets.length){p--;continue}}o+=u.margin.left+u.width+u.margin.right,p===i.childWidgets.length-1&&Math.round(o)<Math.round(i.x+s)&&(this.insertRowSpannedWidget(i,e,o,p+1)||this.insertEmptySplittedCellWidget(i,t,o,p+1,r))}0<this.documentHelper.splittedCellWidgets.length&&(this.documentHelper.splittedCellWidgets=[])}},t.prototype.insertRowSpannedWidget=function(e,t,i,r,n){var o=0;0<e.ownerTable.tableFormat.cellSpacing&&(o=K.convertPointToPixel(e.ownerTable.tableFormat.cellSpacing));for(var a=0;a<this.documentHelper.splittedCellWidgets.length;a++){var s=this.documentHelper.splittedCellWidgets[a];if(Math.round(i)===Math.round(s.x-s.margin.left))return e.childWidgets.splice(r,0,s),s.containerWidget=e,!n&&s.height>e.height&&(e.height=s.height),s.y!==e.y+s.margin.top+o&&this.updateChildLocationForRow(e.y,e),this.documentHelper.splittedCellWidgets.splice(a,1),!0}return!1},t.prototype.insertEmptySplittedCellWidget=function(e,t,i,r,n){for(var o,a=t[t.length-1],s=t.length-1;0<=s;s--)for(var l=t[s],d=l.childWidgets.length-1;0<=d;d--){var h=l.childWidgets[d];if(h.index===n){o=h;break}}o&&(a=o.ownerTable,n=o.indexInOwner);for(var c=n;0<=c;c--)for(var g=a.childWidgets[c],p=g.x,s=0;s<g.childWidgets.length;s++){var u=g.childWidgets[s],f=G.isNullOrUndefined(u.ownerTable)||G.isNullOrUndefined(u.ownerTable.tableFormat)?0:K.convertPointToPixel(u.ownerTable.tableFormat.cellSpacing);if(Math.round(p)!==Math.round(u.x-u.margin.left-f)&&(p=u.x-u.margin.left-f),Math.round(i)===Math.round(p)||e.lastChild.x+e.lastChild.width===u.x&&Math.abs(i-p)<=5)if(1<(G.isNullOrUndefined(u)||G.isNullOrUndefined(u.cellFormat)?1:u.cellFormat.rowSpan)&&!this.isColumnExistsInCurrentRow(e,u.columnIndex))return this.isVerticalMergedCellContinue(e)&&"Exactly"!==e.rowFormat.heightType&&!G.isNullOrUndefined(e.previousRenderedWidget)&&e.previousRenderedWidget instanceof $&&e.previousRenderedWidget.y+e.previousRenderedWidget.height<u.y+u.height?(this.isRelayoutneed=!0,f=this.getSplittedWidget(e.previousRenderedWidget.y+e.previousRenderedWidget.height,!0,t,void 0,u,void 0,void 0,void 0,void 0,!0),this.isRelayoutneed=!1,e.childWidgets.splice(r,0,f),f.containerWidget=e):(f=this.createCellWidget(u),e.childWidgets.splice(r,0,f),f.containerWidget=e),void this.updateChildLocationForRow(e.y,e);p+=u.margin.left+u.width+u.margin.right}},t.prototype.isColumnExistsInCurrentRow=function(e,t){for(var i=0;i<e.childWidgets.length;i++)if(e.childWidgets[i].columnIndex===t)return!0;return!1},t.prototype.getSplittedWidget=function(e,t,i,r,n,o,a,s,l,d){var h=void 0;if(s||n.y+n.height>e-this.footHeight-n.margin.bottom)for(var c=0,g=(n.ownerTable.isInsideTable&&(c=l),!1),p=0;p<n.childWidgets.length;p++)if(n.childWidgets[p]instanceof Z){var u=n.childWidgets[p],f=u;if(g||(f=this.getSplittedWidgetForPara(e-n.margin.bottom,u,o,a,s,c)),s&&(c+=u.childWidgets.length),!G.isNullOrUndefined(f)){if(g=!0,0===p&&f===u&&!d)return n;-1!==n.childWidgets.indexOf(f)&&(n.childWidgets.splice(n.childWidgets.indexOf(f),1),p--),n.height-=f.height,(h=G.isNullOrUndefined(h)?this.createCellWidget(n):h).height+=f.height,h.childWidgets.push(f),f.containerWidget=h}}else{var m=n.childWidgets[p],u=[m],y=0;if(!G.isNullOrUndefined(m.footnoteElement))for(var v=0;v<m.footnoteElement.length;v++)y+=this.getFootNoteHeight(m.footnoteElement[v].bodyWidget);var W=this.existFootnoteHeight+y;if(!G.isNullOrUndefined(o))for(v=0;v<o.length;v++)W+=this.getFootNoteHeight(o[v].bodyWidget);if(s||e-n.margin.bottom<m.y+m.height+W){var f=m.height,b=void 0,b=g?m:this.getSplittedWidgetForTable(e-n.margin.bottom,u,m,o,a,s,c);if(G.isNullOrUndefined(b)&&!m.childWidgets[0].rowFormat.allowBreakAcrossPages&&(b=m),!G.isNullOrUndefined(b)){if(0===p&&b===m)return n;-1!==n.childWidgets.indexOf(b)?(n.childWidgets.splice(n.childWidgets.indexOf(b),1),p--,n.height-=b.height):n.height-=f-m.height,(h=G.isNullOrUndefined(h)?this.createCellWidget(n):h).height+=b.height,h.childWidgets.push(b),b.containerWidget=h}}else if(0<m.footnoteElement.length)for(v=0;v<m.footnoteElement.length;v++)o.push(m.footnoteElement[v])}else this.updateFootHeight(n,o);return h=G.isNullOrUndefined(h)&&t&&this.isRelayoutneed?this.createCellWidget(n):h},t.prototype.getNextFootNoteHeight=function(e,t){var i=0;if(!G.isNullOrUndefined(e.ownerTable.footnoteElement)&&0<e.ownerTable.footnoteElement.length){for(var r=e.indexInOwner+1;r<e.ownerRow.childWidgets.length;r++)for(var n,o=e.ownerRow.childWidgets[r],a=0;a<o.childWidgets.length;a++)o.childWidgets[a]instanceof Z?i+=this.getFootHeightFromPara(o.childWidgets[a],t):o.childWidgets[a]instanceof Q&&(n=o.childWidgets[a],i+=this.getFootHeightFromTable(n,t));e.ownerTable.isInsideTable&&(i+=this.getNextFootNoteHeight(e.ownerTable.containerWidget,t))}return i},t.prototype.getFootHeightFromTable=function(e,t){for(var i=0,r=0;r<e.childWidgets.length;r++)for(var n=e.childWidgets[r],o=0;o<n.childWidgets.length;o++)for(var a=n.childWidgets[o],s=0;s<a.childWidgets.length;s++)a.childWidgets[s]instanceof Z?i+=this.getFootHeightFromPara(a.childWidgets[s],t):a.childWidgets[s]instanceof Q&&(i+=this.getFootHeightFromTable(a.childWidgets[s],t));return i},t.prototype.getFootHeightFromPara=function(e,t){for(var i=0,r=0;r<e.childWidgets.length;r++){var n=e.childWidgets[r],o=this.getFootNoteHeightInLine(n);t>n.height+e.y&&(i+=o)}return i},t.prototype.updateFootHeight=function(e,t){if(!G.isNullOrUndefined(t))for(var i=0;i<e.childWidgets.length;i++)if(e.childWidgets[i]instanceof Z)for(var r=e.childWidgets[i],n=0;n<r.childWidgets.length;n++)this.getFootnoteFromLine(r.childWidgets[n],t);else e.childWidgets[i]instanceof Q&&this.updateFootHeightForTable(e.childWidgets[i],t)},t.prototype.updateFootHeightForTable=function(e,t){for(var i=0;i<e.childWidgets.length;i++)for(var r=e.childWidgets[i],n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];this.updateFootHeight(o,t)}},t.prototype.getListLevelPattern=function(e){switch(e){case 0:return"Arabic";case 1:return"LowLetter";case 2:return"LowRoman";case 3:return"UpLetter";case 4:return"UpRoman";case 5:return"Ordinal";case 6:return"Number";case 7:return"OrdinalText";case 8:return"LeadingZero";case 9:return"Bullet";case 10:return"FarEast";case 11:return"Special";default:return"None"}},t.prototype.createCellWidget=function(e){var t=new ee;return t.cellFormat=e.cellFormat,t.index=e.index,t.rowIndex=e.rowIndex,t.columnIndex=e.columnIndex,t.containerWidget=e.containerWidget,this.updateWidgetLocation(e,t),t.margin=e.margin,t.leftBorderWidth=e.leftBorderWidth,t.rightBorderWidth=e.rightBorderWidth,t},t.prototype.createTableWidget=function(e){var t,i=new Q;return e.header&&(i.header=e.header,t=this.getHeaderHeightForSpannedRow(e),i.headerHeight=t>e.headerHeight?t:e.headerHeight),i.index=e.index,i.tableFormat=e.tableFormat,i.tableHolder=e.tableHolder,i.footnoteElement=e.footnoteElement,i.isGridUpdated=e.isGridUpdated,i.wrapTextAround=e.wrapTextAround,i.positioning=e.positioning,i.isContainInsideTable=e.isContainInsideTable,i.isBidiTable=e.isBidiTable,i},t.prototype.getSplittedWidgetForPara=function(e,t,i,r,n,o){for(var a=t.y,s=void 0,l=!1,d=!1,h=0,c=0;c<t.childWidgets.length;c++){var g=this.getNextFootNoteHeight(t.containerWidget,t.y+h),p=t.childWidgets[c],u=this.getFootNoteHeightInLine(p);if(u+=this.existFootnoteHeight+g,!G.isNullOrUndefined(i))for(var f=0;f<i.length;f++)u+=this.getFootNoteHeight(i[f].bodyWidget);g=0;if(h+=g=(p.children[0]instanceof re?p.children[0]:p).height,n&&r<=o||e<a+u+g){if(t.paragraphFormat.keepLinesTogether&&(0!==t.index||0===t.index&&!G.isNullOrUndefined(t.associatedCell.ownerRow.previousWidget)))l=!0,p=t.childWidgets[c=0];else if(t.paragraphFormat.widowControl){if(!G.isNullOrUndefined(t.associatedCell)&&1===c&&e<a+g&&!d){var m=t.associatedCell.ownerRow.containerWidget,y=t.height-t.childWidgets[0].height;if(!(m.indexInOwner<=0&&t.associatedCell.ownerRow.indexInOwner<=0&&(t.indexInOwner<=0||e<y)||"Word2013"!==this.documentHelper.compatibilityMode))return t;d=!0}1!==c||d?"Word2013"===this.documentHelper.compatibilityMode&&3===c&&c+1===t.childWidgets.length&&G.isNullOrUndefined(s)&&(p=t.childWidgets[c-1],c--):(l=!0,p=t.childWidgets[c=0])}if(0===c){if(p.paragraph.containerWidget instanceof ee&&!l&&!n&&0===t.indexInOwner&&e<a+g&&p.paragraph.associatedCell.ownerRow.y===this.viewer.clientArea.y){a+=p.height;continue}s=t;break}-1!==t.childWidgets.indexOf(p)&&(t.childWidgets.splice(t.childWidgets.indexOf(p),1),c--),t.height-=p.height,G.isNullOrUndefined(s)?((s=new Z).characterFormat=t.characterFormat,s.paragraphFormat=t.paragraphFormat,s.index=t.index,this.updateWidgetLocation(t,s),s.height=p.height):s.height+=p.height,s.childWidgets.push(p),p.paragraph=s}this.getFootnoteFromLine(p,i),a+=p.height,o++}return s},t.prototype.getSplittedWidgetForTable=function(e,t,i,r,n,o,a){for(var s=i.y,l=void 0,d=0;d<i.childWidgets.length;d++){var h=void 0,c=(h=i.childWidgets[d]).height,g=c,p=this.existFootnoteHeight;if(s+c+p<e&&G.isNullOrUndefined(l))for(var u=0;u<h.childWidgets.length;u++)this.updateFootHeight(h.childWidgets[u],r);if(!G.isNullOrUndefined(r))for(var f=0;f<r.length;f++)p+=this.getFootNoteHeight(r[f].bodyWidget);for(var m=0,y=h.childWidgets;m<y.length;m++){var v=y[m],W=v.cellFormat.rowSpan;if(!G.isNullOrUndefined(v.cellFormat)&&1<W){for(var b=c,x=0,w=i.childWidgets.slice(d+1,Math.min(d+W,i.childWidgets.length));x<w.length;x++)b+=w[x].height;g<b&&(g=b)}}if(o||e<s+g+p||!G.isNullOrUndefined(l)){var F=void 0,C=!0,F=(C=G.isNullOrUndefined(h)||G.isNullOrUndefined(h.rowFormat)?C:h.rowFormat.allowBreakAcrossPages)?G.isNullOrUndefined(l)&&this.isFirstLineFitForRow(e,h)?this.getSplittedWidgetForRow(e,t,[h],h,r,n,o,a):h:G.isNullOrUndefined(i.containerWidget.containerWidget.previousWidget)&&this.isFirstLineFitForRow(e,h)||i.isInsideTable&&!i.containerWidget.containerWidget.rowFormat.allowBreakAcrossPages?this.getSplittedWidgetForRow(e,t,[h],h,r,n,o,a):h;if(!G.isNullOrUndefined(F)){if(0===d&&F===h)return i;-1!==i.childWidgets.indexOf(F)?(i.childWidgets.splice(i.childWidgets.indexOf(F),1),d--,i.height-=F.height):i.height-=c-h.height,G.isNullOrUndefined(l)?(l=this.createTableWidget(i),this.updateWidgetLocation(i,l),l.height=F.height):l.height+=F.height,l.childWidgets.push(F),F.containerWidget=l}}s+=h.height}return l},t.prototype.isFirstLineFitForPara=function(e,t){var i=t.childWidgets[0],r=i.height,n=this.getFootNoteHeightInLine(i),n=(r+=n+=this.existFootnoteHeight,i.paragraph.containerWidget);if(t.paragraphFormat.keepLinesTogether&&Math.floor(n.containerWidget.y)!==this.viewer.clientArea.y&&(r=t.height),this.documentHelper.isFirstLineFitInShiftWidgets){if(this.viewer.clientActiveArea.y===this.viewer.clientArea.y&&t.y+r>=e)return!0}else if(!n.ownerTable.isInsideTable&&n.containerWidget.y===this.viewer.clientArea.y&&t.y+r>=e)return!0;return t.y+r<=e},t.prototype.isFirstLineFitForTable=function(e,t){var i=!1,t=t.childWidgets[0];return i=G.isNullOrUndefined(t=t)?i:this.isFirstLineFitForRow(e,t)},t.prototype.isFirstLineFitForRow=function(e,t){for(var i=0;i<t.childWidgets.length;i++){var r=t.childWidgets[i];if(!this.isFirstLineFitForCell(e,r))return!1}return!0},t.prototype.isFirstLineFitForCell=function(e,t){var i;return 0===t.childWidgets.length||(t.childWidgets[0]instanceof Z?(i=t.childWidgets[0],this.isFirstLineFitForPara(e-t.margin.bottom,i)):(i=t.childWidgets[0],this.isFirstLineFitForTable(e-t.margin.bottom,i)))},t.prototype.updateWidgetLocation=function(e,t){t.x=e.x,t.y=e.y,t.width=e.width},t.prototype.updateChildLocationForTable=function(e,t,i,r,n){for(var o=0;o<t.childWidgets.length;o++){var a=t.childWidgets[o];a.x=(n?t:a).x,a.y=e,this.updateChildLocationForRow(e,a,i,r,n),e+=a.height}},t.prototype.shiftXPosition=function(e,t){e.x+=t;for(var i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];r instanceof ad||this.shiftXPosition(r,t)}},t.prototype.updateChildLocationForRow=function(e,t,i,r,n){for(var o=0,a=(0<t.ownerTable.tableFormat.cellSpacing&&(o=K.convertPointToPixel(t.ownerTable.tableFormat.cellSpacing)),t.x+(n&&0<t.childWidgets.length?t.childWidgets[0].margin.left:0)),s=0;s<t.childWidgets.length;s++){var l=t.childWidgets[s];l.x=n?a:l.x,l.index=l.cellIndex,l.y=e+l.margin.top+o,this.updateChildLocationForCellOrShape(l.y,l,i,r,n),a=a+l.width+l.margin.right+ +o+l.margin.left}},t.prototype.updateChildLocationForCellOrShape=function(e,t,i,r,n){if(t instanceof oe)this.layoutGroupShape(t);else{var o=t;t instanceof ne&&(o=t.textFrame);for(var a=0;a<o.childWidgets.length;a++){var s=!1;if(o.childWidgets[a]instanceof Q&&o.childWidgets[a].wrapTextAround&&!G.isNullOrUndefined(o.childWidgets[a+1])&&o.childWidgets[a+1].y>o.childWidgets[a].y&&o.childWidgets[a+1].y<o.childWidgets[a].y+o.childWidgets[a].height&&(s=!0),!G.isNullOrUndefined(o.childWidgets[a].floatingElements)&&0<o.childWidgets[a].floatingElements.length&&r&&(this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.bottom-e,this.viewer.clientActiveArea.y=e),o.childWidgets[a].x=o.childWidgets[a].x,o.childWidgets[a].y=e,t instanceof ne&&"Inline"==t.textWrappingStyle&&n&&this.updateShapeYPosition(t),t instanceof oe&&"Inline"==t.textWrappingStyle&&n&&this.layoutGroupShape(t),!G.isNullOrUndefined(i)&&t instanceof ee&&o.childWidgets[a]instanceof Z){var l=o.childWidgets[a],d=t.ownerTable.bodyWidget.floatingElements,h=!1;if(t.ownerTable.bodyWidget!==i||G.isNullOrUndefined(t.ownerTable.previousSplitWidget)||(d=t.ownerTable.previousSplitWidget.bodyWidget.floatingElements,h=!0),0<l.floatingElements.length)for(var c=0;c<l.floatingElements.length;c++){var g=l.floatingElements[c],p=this.viewer.clientActiveArea.x;if(this.viewer.clientActiveArea.x=g.x,this.layoutShape(g),this.viewer.clientActiveArea.x=p,!G.isNullOrUndefined(l.firstChild))for(var u=l.childWidgets[0],f=0;f<u.children.length;f++){var m=u.children[f];m instanceof re&&"Inline"==m.textWrappingStyle&&(this.adjustPosition(m,t.ownerTable.bodyWidget),e=l.y)}-1<d.indexOf(g)&&"Inline"!==g.textWrappingStyle&&(h||(i.floatingElements.push(g),p=i.previousSplitWidget,G.isNullOrUndefined(p))||-1===p.floatingElements.indexOf(g)||p.floatingElements.splice(p.floatingElements.indexOf(g),1),-1!==d.indexOf(g))&&d.splice(d.indexOf(g),1)}}o.childWidgets[a]instanceof Q&&this.updateChildLocationForTable(e,o.childWidgets[a],i,r),s||(e+=o.childWidgets[a].height)}}},t.prototype.updateCellVerticalPosition=function(e,t,i){var r=e.ownerTable.containerWidget,n=0;(r instanceof Vl||r instanceof P||i)&&(i=this.getDisplacement(e,t),r instanceof ee&&(n=this.getDisplacement(r,t)),this.updateCellContentVerticalPosition(e,i,n,t))},t.prototype.updateCellContentVerticalPosition=function(e,t,i,r){if(0!==i||0!==t)for(var n,o=e.y+t,a=0;a<e.childWidgets.length;a++)e.childWidgets[a]instanceof Z?((n=e.childWidgets[a]).y=o,this.updateShapeInsideCell(n,t)):this.updateTableWidgetLocation(e.childWidgets[a],o,r),o+=e.childWidgets[a].height},t.prototype.updateShapeInsideCell=function(e,t){for(var i=0;i<e.floatingElements.length;i++){var r=e.floatingElements[i];r.y+=t,(r instanceof ne||r instanceof oe)&&this.updateChildLocationForCellOrShape(r.y,r)}},t.prototype.updateTableWidgetLocation=function(e,t,i){e.y=t+=e.topBorderWidth;for(var r=0;r<e.childWidgets.length;r++){var n=e.childWidgets[r];n.y=t;for(var o=0;o<n.childWidgets.length;o++){var a=n.childWidgets[o];a.y=t+a.margin.top+0,this.updateCellVerticalPosition(a,i,!0)}t+=n.height}return t},t.prototype.getDisplacement=function(e,t){var i=0,r=e.containerWidget,n=e.margin.top+e.margin.bottom,i=!G.isNullOrUndefined(e.cellFormat)&&1<e.cellFormat.rowSpan?e.height:(G.isNullOrUndefined(r)?0:r.height)-n,r=this.getCellContentHeight(e,!0),n=0;return r<i&&i<=this.viewer.clientArea.height&&!e.isSplittedCell&&(n=i-r,"Center"===e.cellFormat.verticalAlignment?n/=2:"Top"!==e.cellFormat.verticalAlignment&&!t||(n=0)),n},t.prototype.getCellContentHeight=function(e,t,i){if(G.isNullOrUndefined(e.childWidgets))return 0;for(var r=0,n=e.y,o=0,a=0,s=!1,l=!1,d=0;d<e.childWidgets.length;d++)if(e.childWidgets[d]instanceof Z){var h=e.childWidgets[d],c=h.y+h.height,g=e.childWidgets[e.childWidgets.length-1],p=g.y+g.height;(a<c||a<p||h.isInHeaderFooter)&&(r+=e.childWidgets[d].height),!t&&0<h.floatingElements.length&&i===h.indexInOwner&&(r+=this.getFloatingItemsHeight(h,e));for(var u=0;u<h.floatingElements.length;u++){var s=!0,f=h.floatingElements[u],m=f.textWrappingStyle,y=f.y+f.height,v=h.y+h.height;y<n+(e.height>e.containerWidget.height&&1<e.cellFormat.rowSpan?e:e.containerWidget).height&&a<y?(o=Math.abs(n-y),a=y,l=!1):p<y&&h.x+h.width>f.x&&a<y&&"InFrontOfText"!==m&&"Behind"!==m&&("Word2013"===this.documentHelper.compatibilityMode||h.floatingElements[u].layoutInCell)?(r+=0===a?y-v:y-a,a=y):l=!0}}else this.considerPositionTableHeight(e,e.childWidgets[d])&&(r+=e.childWidgets[d].height);return a<n+r&&(s=!1),t&&s?o:t&&l?e.ownerRow.height:r},t.prototype.getFloatingItemsHeight=function(e,t){for(var i=0,r=0,n=0;n<e.floatingElements.length;n++){var o=e.floatingElements[n],a=o.textWrappingStyle,s=o.y+o.height,l=e.y+e.height;s<this.viewer.clientArea.bottom&&o.y!==e.y&&s<l&&e.x+e.width>o.x&&i<s&&"InFrontOfText"!==a&&"Behind"!==a&&"Inline"!==a&&("Word2013"===this.documentHelper.compatibilityMode||e.floatingElements[n].layoutInCell)&&(r+=0===i?s-t.y:s-i,i=s)}return r},t.prototype.considerPositionTableHeight=function(e,t){var i=!0;if(t.isLayouted&&t.wrapTextAround){for(var r=0;r<e.childWidgets.length;r++){var n=e.childWidgets[r];t!==n&&(n.y===t.y||n.y+n.height<t.y)&&(i=!1)}t.nextWidget&&t.nextWidget.y+t.nextWidget.height>t.y+t.height&&(i=!0)}return i},t.prototype.getTableLeftBorder=function(e){var t;return G.isNullOrUndefined(e.left)?((t=new x(e)).lineStyle="Single",t.lineWidth=.66,t):e.left},t.prototype.getTableRightBorder=function(e){var t;return G.isNullOrUndefined(e.right)?((t=new x(e)).lineStyle="Single",t.lineWidth=.66,t):e.right},t.prototype.getTableTopBorder=function(e){var t;return G.isNullOrUndefined(e.top)?((t=new x(e)).lineStyle="Single",t.lineWidth=.66,t):e.top},t.prototype.getTableBottomBorder=function(e){var t;return G.isNullOrUndefined(e.bottom)?((t=new x(e)).lineStyle="Single",t.lineWidth=.66,t):e.bottom},t.prototype.getCellDiagonalUpBorder=function(e){return e.cellFormat.borders.diagonalUp},t.prototype.getCellDiagonalDownBorder=function(e){return e.cellFormat.borders.diagonalDown},t.prototype.getTableWidth=function(e){for(var t=0,i=0;i<e.childWidgets.length;i++){for(var r=e.childWidgets[i],n=0,o=0;o<r.childWidgets.length;o++){var a=r.childWidgets[o];n+=K.convertPointToPixel(a.cellFormat.cellWidth)}t<n&&(t=n)}return t},t.prototype.layoutNextItemsBlock=function(e,t,i,r){for(var n=e.bodyWidget.sectionIndex,o=(d=e).getSplitWidgets(),a=o[o.length-1].nextRenderedWidget,s=(!G.isNullOrUndefined(a)&&this.documentHelper.blockToShift!==d||(this.documentHelper.blockToShift=void 0),!0);a instanceof Yl&&(a.bodyWidget.sectionIndex===n||"NoBreak"===a.bodyWidget.sectionFormat.breakCode&&d.bodyWidget.sectionFormat.pageWidth===a.bodyWidget.sectionFormat.pageWidth&&d.bodyWidget.sectionFormat.pageHeight===a.bodyWidget.sectionFormat.pageHeight)&&(G.isNullOrUndefined(i)||!i||a.isLayouted||!this.isInitialLoad);){var l=d.getSplitWidgets(),l=l[l.length-1],d=a,s=(this.documentHelper.blockToShift===d&&(this.documentHelper.blockToShift=void 0),!1),h=d.getSplitWidgets()[0];if(0===this.documentHelper.fieldStacks.length&&!G.isNullOrUndefined(h)&&l.containerWidget===h.containerWidget&&!this.documentHelper.isFollowedListLayoutRequired&&K.round(h.y,2)===K.round(l.y+l.height,2)){!G.isNullOrUndefined(this.documentHelper.blockToShift)||this.documentHelper.editorProperties.isFootnoteElementRemoved?this.documentHelper.blockToShift=d:h.bodyWidget&&(0<(h=h.bodyWidget.floatingElements.length)&&this.owner.isShiftingEnabled||0===h&&G.isNullOrUndefined(this.documentHelper.blockToShift)&&r?this.documentHelper.blockToShift=d:G.isNullOrUndefined(this.documentHelper.blockToShift)&&a.nextRenderedWidget&&a.nextRenderedWidget.containerWidget===a.containerWidget&&this.documentHelper.isShiftingEnabled&&K.round(a.nextRenderedWidget.y,2)!==K.round(a.y+a.height,2)&&(this.documentHelper.blockToShift=a));break}if(s=!0,this.documentHelper.isShiftingEnabled&&!this.documentHelper.isFollowedListLayoutRequired&&(0===this.documentHelper.fieldStacks.length||this.documentHelper.editorProperties.isInsertingTOC)||this.isIFfield&&!this.checkBlockHasField(d)){if(!d.isFieldCodeBlock){this.documentHelper.blockToShift=d;break}}else this.documentHelper.editorProperties.isInsertingTOC||(d=d.combineWidget(this.viewer),l.containerWidget===d.containerWidget||l instanceof Z&&(!(l instanceof Z)||l.isEndsWithPageBreak||l.isEndsWithColumnBreak||l.containerWidget.page===d.containerWidget.page||d.bodyWidget instanceof Y&&"NoBreak"===d.bodyWidget.sectionFormat.breakCode)||this.updateContainerWidget(d,l.containerWidget,l.indexInOwner+1,!1),d instanceof Q&&(this.clearTableWidget(d,!0,!0),d.isGridUpdated=!1),t.updateClientAreaForBlock(d,!0),(this.viewer instanceof Nl||d.bodyWidget instanceof X)&&(d.containerWidget.height-=d.height),this.documentHelper.layout.layoutBlock(d,0),t.updateClientAreaForBlock(d,!1));a=(o=a.getSplitWidgets())[o.length-1].nextRenderedWidget}this.documentHelper.isShiftingEnabled&&this.documentHelper.blockToShift===d||this.isPastingContent||this.documentHelper.isFollowedListLayoutRequired||this.updateListItemsTillEnd(d,s),this.documentHelper.isFollowedListLayoutRequired=!1},t.prototype.updateClientAreaForLine=function(e){e.marginTop=0;var e=this.documentHelper.editorProperties.getTop(e),t=this.viewer.clientArea.x;this.viewer.cutFromTop(e),this.viewer.cutFromLeft(t)},t.prototype.isAuto=function(e){var t=!1;if("Auto"!==e.tableFormat.preferredWidthType||0!==e.tableFormat.preferredWidth||!e.tableFormat.allowAutoFit)return!1;for(var i=0;i<e.childWidgets.length;i++)for(var r=e.childWidgets[i],n=0;n<r.childWidgets.length;n++){var o=r.childWidgets[n];if("Auto"!==o.cellFormat.preferredWidthType||0!==o.cellFormat.preferredWidth)return!1;t=!0}return t=t&&e.isInsideTable&&e.containerWidget instanceof ee?this.isAuto(e.containerWidget.ownerTable):t},t.prototype.getParentTable=function(e){for(var t=e;t.containerWidget;){if(t.containerWidget instanceof Vl||t.containerWidget instanceof P)return t;t=t.containerWidget}},t.prototype.reLayoutParagraph=function(e,t,i,r,n,o){if(!(this.isReplaceAll||this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.restrictLayout)&&this.documentHelper.enableLayout){this.isRelayout=!0,e.containerWidget instanceof P&&"Inline"===e.containerWidget.containerShape.textWrappingStyle&&G.isNullOrUndefined(e.containerWidget.containerShape.containerShape)&&(t=e.containerWidget.containerShape.line.indexInOwner,e=e.containerWidget.containerShape.paragraph),r=!G.isNullOrUndefined(r)&&r;var a=!(this.isRelayout=!0),s=(this.documentHelper.blockToShift===e?(this.layoutBodyWidgetCollection(e.index,e.containerWidget,e,!1),a=this.isBidiReLayout=!0):this.isBidiReLayout&&(this.isBidiReLayout=!1),!1);if(!a)if(e.isInsideTable){this.isBidiReLayout=!0,o&&(s=!0);a=this.getParentTable(e),o=a.containerWidget;if(!this.isReplacingAll&&s&&o instanceof Y&&G.isNullOrUndefined(o.containerWidget)){var l,d=a.tableHolder.clone(),h=!0;if(a.tableFormat.allowAutoFit){e=e.getSplitWidgets()[0];var c=a;if((c=c.combineWidget(this.viewer)).isGridUpdated=!1,c.buildTableColumns(),c.isGridUpdated=!0,d.columns.length===c.tableHolder.columns.length){for(var g=0;g<c.tableHolder.columns.length;g++)if(c.tableHolder.columns[g].preferredWidth!==d.columns[g].preferredWidth){h=!1;break}}else h=!1}h?(e.associatedCell.ownerTable.footnoteElement&&0<e.associatedCell.ownerTable.footnoteElement.length&&this.clearFootnoteReference(e.associatedCell.ownerTable,!0),this.viewer.updateClientAreaForCell(e.associatedCell,!0),this.viewer.updateClientAreaForBlock(e,!0),this.documentHelper.editorProperties.isDocumentLoaded&&this.updateWholeListItems(e),this.layoutParagraph(e,0),this.viewer.updateClientAreaForBlock(e,!1),s=0,(o=this.getParentTable(e)).containerWidget instanceof Y&&(s=(l=o.getSplitWidgets())[l.length-1].containerWidget.page.index),o=(a=o.combineWidget(this.viewer)).containerWidget,this.viewer instanceof Nl&&(o.height-=a.height),this.viewer.updateClientArea(o,o.page),this.documentHelper.editorProperties.isDocumentLoaded&&(o=this.documentHelper.getFirstParagraphInFirstCell(a),this.updateWholeListItems(o)),this.viewer.updateClientAreaForBlock(a,!0),a.x-=a.leftBorderWidth,a.y-=a.topBorderWidth,o=this.getYPosition(a),this.viewer.cutFromTop(o),this.clearTableWidget(a,!0,!0,!1,!0,!0),this.shiftTableWidget(a,this.viewer),this.viewer.updateClientAreaForBlock(a,!1),o=0,a.containerWidget instanceof Y&&(o=(l=a.getSplitWidgets())[l.length-1].containerWidget.page.index),this.documentHelper.editorProperties.isDocumentLoaded&&a.nextRenderedWidget&&this.updateWholeListItems(a.nextRenderedWidget),this.layoutNextItemsBlock(a,this.viewer,void 0,s!==o)):this.isReplacingAll||this.reLayoutTable(e)}else this.isReplacingAll||this.reLayoutTable(e);!this.isFootnoteContentChanged||G.isNullOrUndefined(e.bodyWidget)||G.isNullOrUndefined(e.bodyWidget.page.footnoteWidget)||(l=e.bodyWidget.page.footnoteWidget,this.layoutfootNote(l)),this.isBidiReLayout=!1}else this.reLayoutLine(e,t,r,n,void 0,i);e.bodyWidget instanceof X&&-1!==e.bodyWidget.headerFooterType.indexOf("Footer")&&this.shiftFooterChildLocation(e.bodyWidget,this.viewer),this.normalizeBookmarkEndForParagraph(e)}},t.prototype.getParentRow=function(e){return this.getParentCell(e).ownerRow},t.prototype.getParentCell=function(e){for(var t=e;null!==t.ownerTable&&t.ownerTable.isInsideTable;)t=t.ownerTable.associatedCell;return t},t.prototype.reLayoutRow=function(e){e instanceof Z&&(e=e.associatedCell);var t=this.getParentRow(e).getSplitWidgets()[0];if(G.isNullOrUndefined(t)||t.ownerTable.tableFormat.allowAutoFit)this.currentCell=e,this.reLayoutTable(e),this.currentCell=void 0;else{for(var i=t.ownerTable.getSplitWidgets()[0].combineWidget(this.viewer),r=t;this.isVerticalMergedCellContinue(r);){var n=r.previousWidget;if(G.isNullOrUndefined(n))break;r=n}var o=i.containerWidget,e=(this.viewer instanceof Nl&&(o.height-=i.height),!this.documentHelper.editorProperties.enableHeaderAndFooter&&!e.isInHeaderFooter||o instanceof P?o instanceof P?this.viewer.updateClientAreaForTextBoxShape(o.containerShape,!0):this.viewer.updateClientArea(o,o.page):(e.bodyWidget.isEmpty=!1,o.height-=i.height,this.viewer.updateHeaderFooterClientAreaWithTop(i.bodyWidget.sectionFormat,this.documentHelper.isBlockInHeader(i),o.page)),new _(this.viewer.clientArea.x,this.viewer.clientArea.y,this.viewer.clientArea.width,this.viewer.clientArea.height)),o=new _(e.x,e.y,e.width,e.height);for(this.documentHelper.editorProperties.isDocumentLoaded&&(e=this.documentHelper.getFirstParagraphInFirstCell(i),this.updateWholeListItems(e)),this.viewer.updateClientAreaForBlock(i,!0),this.viewer.cutFromTop(r.y),this.viewer.clientActiveArea.height=Number.POSITIVE_INFINITY,i.height=0;this.clearRowWidget(t,!0,!0,!0),this.layoutRow([i],t,!0),r!==t&&(r=r.nextRow)&&r!==t;);this.updateChildLocationForTable(i.y,i),this.viewer.clientArea=o,this.viewer.clientActiveArea=new _(o.x,o.y,o.width,o.height),this.viewer.updateClientAreaForBlock(i,!0),i.x-=i.leftBorderWidth,i.y-=i.topBorderWidth,this.viewer.cutFromTop(i.y),this.shiftTableWidget(i,this.viewer,!0),this.layoutNextItemsBlock(i,this.viewer)}},t.prototype.reLayoutTable=function(e,t){if(this.documentHelper.enableLayout){var i=this.getParentTable(e);if(i.header)for(var r=i.getSplitWidgets(),n=1;n<r.length;n++)r[n].bodyWidget.page.repeatHeaderRowTableWidget=!1;var o,a=0,s=(i.containerWidget instanceof Y&&(a=(o=i.getSplitWidgets())[o.length-1].containerWidget.page.index),i.combineWidget(this.viewer)),l=s.containerWidget,i=(this.viewer instanceof Nl&&(l.height-=s.height),!this.documentHelper.editorProperties.enableHeaderAndFooter&&!e.isInHeaderFooter||l instanceof P?l instanceof P?(this.viewer.clientActiveArea.y=l.containerShape.y,this.viewer.clientActiveArea.x=l.containerShape.x,this.viewer.updateClientAreaForTextBoxShape(l.containerShape,!0)):this.viewer.updateClientArea(l,l.page):(e.bodyWidget.isEmpty=!1,l.height-=s.height,this.viewer.updateHeaderFooterClientAreaWithTop(i.bodyWidget.sectionFormat,this.documentHelper.isBlockInHeader(i),l.page)),this.documentHelper.editorProperties.isDocumentLoaded&&(e=this.documentHelper.getFirstParagraphInFirstCell(s),this.updateWholeListItems(e)),this.viewer.updateClientAreaForBlock(s,!0),s.x-=s.leftBorderWidth,s.y-=s.topBorderWidth,this.getYPosition(s)),l=(this.viewer.cutFromTop(i),this.clearTableWidget(s,!0,!0,!0,!0),this.isBidiReLayout=!0,this.isRelayout=!0,this.layoutBlock(s,0),this.isRelayout=!1,this.viewer.updateClientAreaForBlock(s,!1),0);s.containerWidget instanceof Y&&(l=(o=s.getSplitWidgets())[o.length-1].containerWidget.page.index),this.layoutNextItemsBlock(s,this.viewer,t,a!==l)}},t.prototype.getYPosition=function(e){if(e.wrapTextAround){for(var t=e.previousWidget;t;){if(t.y>e.y)return e.y;if(t instanceof Z)return t.y+t.height;if(t instanceof Q){if(!t.wrapTextAround)return t.y+t.height;t=t.previousWidget}}return this.viewer.clientActiveArea.y}return e.y},t.prototype.clearFootnoteReference=function(e,t){if(e.footnoteElement&&0<e.footnoteElement.length){for(var i=e.bodyWidget.page,r=e.footnoteElement.length-1;0<=r;r--){var n,o=e.footnoteElement[r],a=(o.isLayout=!1,o.bodyWidget.containerWidget);a&&-1!==a.bodyWidgets.indexOf(o.bodyWidget)&&(n=this.getFootNoteHeight(o.bodyWidget),a.height-=n,a.bodyWidgets.splice(o.bodyWidget.indexInOwner,1),t)&&a.page===i&&(this.viewer.clientActiveArea.height+=n,this.viewer.clientArea.height+=n),a&&0===a.bodyWidgets.length&&a.page&&(a.page.footnoteWidget=void 0),o.bodyWidget.containerWidget=void 0}e.footnoteElement=[]}},t.prototype.clearTableWidget=function(e,t,i,r,n,o){e.height=0,this.isLayoutSwitch&&(e.width=0),r&&(e.isGridUpdated=!1),t&&(e.y=0,e.x=0,e.footnoteElement)&&0<e.footnoteElement.length&&this.clearFootnoteReference(e,n),e.leftBorderWidth=0,e.rightBorderWidth=0,e.topBorderWidth=0;for(var a=e.bottomBorderWidth=0;a<e.childWidgets.length;a++){var s=e.childWidgets[a];this.clearRowWidget(s,t,i,r,o)}},t.prototype.clearRowWidget=function(e,t,i,r,n){e.height=0,this.isLayoutSwitch&&(e.width=0),t&&(e.y=0,e.x=0),e.topBorderWidth=0;for(var o=e.bottomBorderWidth=0;o<e.childWidgets.length;o++){var a=e.childWidgets[o];this.clearCellWidget(a,t,i,r,n)}},t.prototype.clearCellWidget=function(e,t,i,r,n){e.height=0,this.isLayoutSwitch&&(e.width=0),t&&(e.y=0,e.x=0),e.leftBorderWidth=0,e.rightBorderWidth=0,this.clearBlockWidget(e.childWidgets,t,i,r,n)},t.prototype.clearBlockWidget=function(e,t,i,r,n){for(var o=0;o<e.length;o++){var a=e[o];a instanceof Z?(t&&!n&&(a.y=0,a.x=0),i&&!n&&(a.height=0)):this.clearTableWidget(a,t,i,r,void 0,n)}},t.prototype.layoutBodyWidgetCollection=function(e,t,i,r,n,o){if(G.isNullOrUndefined(i)||!i.isFieldCodeBlock){if(!G.isNullOrUndefined(this.documentHelper)&&this.documentHelper.isLayoutEnabled){if(this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.restrictLayout||!this.documentHelper.enableLayout)return;if(t instanceof Vl||t instanceof P){i=this.checkAndGetBlock(t,e);if(t instanceof Y&&G.isNullOrUndefined(i)&&!G.isNullOrUndefined(t.nextRenderedWidget)&&"NoBreak"===t.nextRenderedWidget.sectionFormat.breakCode&&(i=t.nextRenderedWidget.firstChild,t=t.nextRenderedWidget),G.isNullOrUndefined(i))return;if(this.viewer instanceof Nl&&(i.containerWidget.height-=i.height),t instanceof X)t.isEmpty=!1,this.viewer.updateHeaderFooterClientAreaWithTop(t.sectionFormat,-1!==t.headerFooterType.indexOf("Header"),t.page),i.containerWidget.height-=i.height;else if(t instanceof P)this.viewer.updateClientAreaForTextBoxShape(t.containerShape,!0,!r);else if(!G.isNullOrUndefined(t.containerWidget)&&t.containerWidget instanceof J){if(this.viewer.updateClientArea(t,t.page,!0),"Footnote"!==t.containerWidget.footNoteType)return this.viewer.cutFromTop(t.containerWidget.y),void this.layoutfootNote(t.containerWidget);this.isRelayoutFootnote=!0,this.viewer.clientArea.height=Number.POSITIVE_INFINITY,this.viewer.clientActiveArea.height=Number.POSITIVE_INFINITY,this.viewer.clientActiveArea.y=i.containerWidget.containerWidget.y}else G.isNullOrUndefined(t.page.footnoteWidget)||t.page.footnoteWidget.footNoteType,this.viewer.updateClientArea(t,t.page,!0);var a=0,s=0;if(i.containerWidget instanceof Y&&(a=(c=i.getSplitWidgets())[c.length-1].containerWidget.page.index),0<e||"NoBreak"===i.bodyWidget.sectionFormat.breakCode&&0!==i.bodyWidget.index&&i===t.firstChild){var e=i.nextSplitWidget,l=(G.isNullOrUndefined(e)||(h=e.containerWidget,(e=this.getFootNoteWidgetsOf(e))&&0<e.length&&this.moveFootNotesToPage(e,h,i.containerWidget)),(i=i.combineWidget(this.viewer)).getSplitWidgets()[0].previousRenderedWidget);for(!G.isNullOrUndefined(l)&&l.wrapTextAround&&!G.isNullOrUndefined(l.getSplitWidgets()[0].previousRenderedWidget)&&l.bodyWidget.index===l.getSplitWidgets()[0].previousRenderedWidget.bodyWidget.index&&l.bodyWidget.page.index===l.getSplitWidgets()[0].previousRenderedWidget.bodyWidget.page.index&&l.y<l.getSplitWidgets()[0].previousRenderedWidget.y&&(l=l.getSplitWidgets()[0].previousRenderedWidget);l instanceof Yl&&l.isFieldCodeBlock;)l=l.getSplitWidgets()[0].previousRenderedWidget;!(G.isNullOrUndefined(l)||l instanceof Z)||l instanceof Z&&!l.isEndsWithPageBreak&&!l.isEndsWithColumnBreak?n||i.containerWidget===l.containerWidget?(l instanceof Z&&l.height<=0&&this.isMultiColumnDoc&&(e=l,this.viewer.updateClientAreaForBlock(e,!0),this.layoutParagraph(e,0),this.viewer.updateClientArea(e.bodyWidget,e.bodyWidget.page,!0)),this.viewer.cutFromTop(l.y+l.height)):(h=i.containerWidget,n=l.containerWidget,d=this.getFootNoteWidgetsOf(i),this.moveFootNotesToPage(d,h,n),"NoBreak"!==i.bodyWidget.sectionFormat.breakCode||i.bodyWidget.index===l.bodyWidget.index?(this.viewer.updateClientArea(l.bodyWidget,l.bodyWidget.page,!0),this.viewer.cutFromTop(l.y+l.height),this.updateContainerWidget(i,n,l.indexInOwner+1,!1)):i.bodyWidget.sectionIndex!==l.bodyWidget.sectionIndex&&1<l.bodyWidget.sectionFormat.numberOfColumns&&i.bodyWidget.page===l.bodyWidget.page?(e=this.getBodyWidget(l.bodyWidget,!0),h=this.getNextWidgetHeight(e),this.viewer.clientActiveArea.height-=h-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=h,this.viewer.clientArea.y=this.viewer.clientActiveArea.y,this.viewer.clientArea.height=this.viewer.clientActiveArea.height):(this.viewer.updateClientArea(i.bodyWidget,i.bodyWidget.page,!0),this.viewer.cutFromTop(l.y+l.height))):l instanceof Z&&(l.isEndsWithPageBreak||l.isEndsWithColumnBreak)&&l.containerWidget===i.containerWidget&&this.moveBlocksToNextPage(l,!1)}var d,h,c,n=void 0,n=(i=i.combineWidget(this.viewer))instanceof Q?(this.clearTableWidget(i,!0,!0),i.isGridUpdated=!1,this.documentHelper.getFirstParagraphInFirstCell(i)):i,e=(this.documentHelper.editorProperties.isDocumentLoaded&&this.updateWholeListItems(n),this.viewer.updateClientAreaForBlock(i,!0,void 0,!1,!0),this.isRelayout=!0,this.documentHelper.layout.layoutBlock(i,0),this.isRelayout=!1,this.viewer.updateClientAreaForBlock(i,!1),!G.isNullOrUndefined(t.containerWidget)&&t.containerWidget instanceof J&&"Footnote"===t.containerWidget.footNoteType&&this.layoutfootNote(t.containerWidget),t);!G.isNullOrUndefined(t.containerWidget)||t instanceof P||G.isNullOrUndefined(e.page)||(d=this.getFootNoteWidgetsOf(i),G.isNullOrUndefined(e.page.footnoteWidget)||"Footnote"!==e.page.footnoteWidget.footNoteType?0<d.length&&(n=(h=i.getSplitWidgets())[h.length-1].nextRenderedWidget,this.moveFootNotesToPage(d,n.containerWidget,i.bodyWidget)):(this.layoutfootNote(e.page.footnoteWidget),this.layoutfootNote(e.page.footnoteWidget))),i.containerWidget instanceof Y&&(s=(c=i.getSplitWidgets())[c.length-1].containerWidget.page.index),r?this.shiftNextWidgets(i):this.layoutNextItemsBlock(i,this.viewer,void 0,a!==s)}else t instanceof ee&&!o&&this.reLayoutTable(t.ownerTable)}this.isRelayoutFootnote=!1}},t.prototype.checkAndGetBlock=function(e,t){if(e instanceof P)return e.childWidgets[t];var i=e.indexInOwner;if(e.page.bodyWidgets.length<=1)for(;e&&e.indexInOwner===i;){if(0<e.childWidgets.length&&e.firstChild.index<=t&&e.lastChild.index>=t)for(var r=0;r<e.childWidgets.length;r++)if((n=e.childWidgets[r]).index===t)return n;if(!(e instanceof Y))break;e=e.nextRenderedWidget}else for(;e;){if(0<e.childWidgets.length)for(var n,r=0;r<e.childWidgets.length;r++)if((n=e.childWidgets[r]).index===t)return n;if(!(e instanceof Y))break;e=e.nextRenderedWidget}},t.prototype.layoutTable=function(r,e,t){var n=this;if(r.tableFormat.borders=(r.tableFormat.isRTFTable?r.firstChild.rowFormat:r.tableFormat).borders,this.isFieldCode&&!this.checkTableHasField(r)&&!this.isRelayout)return r.isFieldCodeBlock=!0,r;!G.isNullOrUndefined(r.previousWidget)&&this.viewer.clientActiveArea.height<0&&!r.wrapTextAround&&this.moveBlocksToNextPage(r.previousWidget,!1),r.isBidiTable=r.bidi,r.isGridUpdated||(r.buildTableColumns(),r.isGridUpdated=!0),"Word2013"===this.documentHelper.compatibilityMode||r.isInsideTable||G.isNullOrUndefined(r.firstChild.firstChild.leftMargin)||(this.viewer.clientActiveArea.x=this.viewer.clientActiveArea.x-K.convertPointToPixel(r.firstChild.firstChild.leftMargin));function o(){return n.updateFootnoteHeight(r,!1),n.documentHelper.viewer instanceof Tl&&r.wrapTextAround&&("Bottom"===r.positioning.verticalAlignment||"Center"===r.positioning.verticalAlignment||"Outside"===r.positioning.verticalAlignment)&&(n.updateTableFloatPoints(r),n.updateChildLocationForTable(r.y,r)),n.updateWidgetsToPage(d,[],r,!0),0<h&&(n.viewer.clientArea.x-=h),r.wrapTextAround&&n.updateClientAreaForWrapTable(d,r,!1,i,s),d[d.length-1].isLayouted=!0,d[d.length-1].isFieldCodeBlock=!1,"Word2013"===n.documentHelper.compatibilityMode||r.isInsideTable||r.wrapTextAround||G.isNullOrUndefined(r.firstChild.firstChild.leftMargin)||(n.viewer.clientArea.x+=K.convertPointToPixel(r.firstChild.firstChild.leftMargin)),d[d.length-1]}function a(){c=(c=n.layoutRow(d,c)).nextRow}var i,s,l,d=[r],h=(this.addTableWidget(this.viewer.clientActiveArea,d),this.viewer.updateClientAreaTopOrLeft(r,!0),0),c=(r.wrapTextAround?(i=this.viewer.clientActiveArea.clone(),s=this.viewer.clientArea.clone(),this.updateClientAreaForWrapTable(d,r,!0,i,s)):r.containerWidget instanceof P||(this.adjustClientAreaBasedOnTextWrapForTable(r,this.viewer.clientActiveArea),this.isWrapText&&(h=this.viewer.clientActiveArea.x-this.viewer.clientArea.x,this.isWrapText=!1,r.x=this.viewer.clientActiveArea.x)),0<r.childWidgets.length&&(l=r.childWidgets[0].rowFormat.isHeader,r.header=l,r.continueHeader=l,r.headerHeight=0),r.childWidgets[e]);this.updateFootnoteHeight(r,!0);if(t)return new Promise(function(t){function i(){var e;G.isNullOrUndefined(c)?t(o()):(a(),n.shouldScrollUpdateIn()?(e=void 0,r.bodyWidget instanceof Y&&(e=r.bodyWidget.getSplitWidgets()[0]),n.documentHelper.hooks.onProcessAsyncPageUpdate&&n.documentHelper.hooks.onProcessAsyncPageUpdate(e),n.documentHelper.isUpdatedWhileLoadAsync||(n.documentHelper.hooks.onPerformUpdateAfterLoad&&n.documentHelper.hooks.onPerformUpdateAfterLoad(!0),n.documentHelper.isUpdatedWhileLoadAsync=!0),e=setTimeout(i,0),n.documentHelper.currentDocumentLoadId&&n.documentHelper.storeTimeoutId(n.documentHelper.currentDocumentLoadId,e)):i())}i()});for(;c;)a();return o()},t.prototype.isFloatTableSplitOnPageThatFits=function(e){if(!e.wrapTextAround||e.isInsideTable||G.isNullOrUndefined(e.previousWidget)||!(e.containerWidget instanceof Y)||!(this.viewer instanceof Tl))return!1;var t=e.getSplitWidgets();if(t.length<2)return!1;for(var i=0,r=!1,n=0;n<t.length;n++){i+=t[n].height;for(var o=n+1;o<t.length;o++)t[n].containerWidget===t[o].containerWidget&&(r=!0)}return r&&i<=this.viewer.clientArea.height},t.prototype.layoutFloatTableOnNextPage=function(e){var t=e.previousWidget,e=e.combineWidget(this.viewer),i=e.containerWidget,r=i.childWidgets.indexOf(e),r=(-1!==r&&i.childWidgets.splice(r,1),i.floatingElements.indexOf(e)),r=(-1!==r&&i.floatingElements.splice(r,1),i.childWidgets.indexOf(t));return i.childWidgets.splice(r+1,0,e),e.containerWidget=i,this.viewer.updateClientArea(i,i.page),t.y=this.viewer.clientActiveArea.y,this.clearTableWidget(e,!0,!0,!0),this.layoutStartEndBlocks(t,e),e.isLayouted||(this.viewer.updateClientAreaForBlock(e,!0),this.layoutTable(e,0),this.viewer.updateClientAreaForBlock(e,!1)),e.getSplitWidgets().pop()},t.prototype.updateFootnoteHeight=function(e,t,i){if((!this.isInitialLoad||i)&&!e.isInsideTable&&!G.isNullOrUndefined(e.bodyWidget)&&!G.isNullOrUndefined(e.bodyWidget.page.footnoteWidget)&&"Footnote"===e.bodyWidget.page.footnoteWidget.footNoteType){var e=e.bodyWidget.page,r=e.bodyWidgets[0],n=K.convertPointToPixel(r.sectionFormat.pageHeight),o=K.convertPointToPixel(r.sectionFormat.topMargin),a=K.convertPointToPixel(r.sectionFormat.bottomMargin),s=.667+a,l=!1,d=48,h=48;if(G.isNullOrUndefined(r.sectionFormat)||(o=K.convertPointToPixel(r.sectionFormat.topMargin),d=K.convertPointToPixel(r.sectionFormat.headerDistance),h=K.convertPointToPixel(r.sectionFormat.footerDistance)),G.isNullOrUndefined(e.headerWidget)||(l=e.headerWidget.isEmpty,0<=o?l&&!this.documentHelper.editorProperties.enableHeaderAndFooter||(o=Math.min(Math.max(d+e.headerWidget.height,o),n/100*40)):o=Math.abs(o)),G.isNullOrUndefined(e.footerWidget)||(l=e.footerWidget.isEmpty,c=G.isNullOrUndefined(e.footnoteWidget)?0:e.footnoteWidget.height,c=Math.min(c,(n-o-s)/100*90),0<=s?l&&!this.documentHelper.editorProperties.enableHeaderAndFooter||(s=.667+Math.min(n/100*40,Math.max(h+e.footerWidget.height,a))):s=Math.abs(s),i)||(s+=c),!G.isNullOrUndefined(e.footnoteWidget)){var c=G.isNullOrUndefined(e.footnoteWidget)?0:e.footnoteWidget.height,r=n-o-s;if(i)return r+this.viewer.clientArea.y;t&&r===this.viewer.clientArea.height?this.viewer.clientArea.height+=c:r+c===this.viewer.clientArea.height&&(this.viewer.clientArea.height-=c)}}return 0},t.prototype.updateClientAreaForWrapTable=function(e,t,i,r,n){if(i)t.wrapTextAround&&(this.updateTableFloatPoints(t),i=this.viewer.clientActiveArea.clone(),l=this.adjustClientAreaBasedOnTextWrapForTable(t,this.viewer.clientActiveArea),i.x!==l.x&&(t.x=this.viewer.clientActiveArea.x),i.y!==l.y)&&(t.y=this.viewer.clientActiveArea.y);else if(t.wrapTextAround&&t.bodyWidget)if(1==e.length)!G.isNullOrUndefined(t.previousRenderedWidget)&&t.previousRenderedWidget.bodyWidget.page===t.bodyWidget.page||t.isInHeaderFooter||t.isInsideTable?(i=r.clone(),l=n.clone(),t.bodyWidget.lastChild!==e[e.length-1]&&(this.viewer.clientActiveArea=i,this.viewer.clientArea=l),!t.isLayouted&&i.height<t.height&&t.width>=i.width&&(s=this.moveBlocksToNextPage(t,!1),(n=t).containerWidget&&-1!==n.containerWidget.childWidgets.indexOf(n)&&n.containerWidget.childWidgets.splice(n.containerWidget.childWidgets.indexOf(n),1),-1!==s.childWidgets.indexOf(n)&&s.childWidgets.splice(s.childWidgets.indexOf(n),1),s.childWidgets.unshift(n),this.shiftFloatingItemsFromTable(n,s),n.containerWidget=s)):(this.documentHelper.tableLefts.pop(),this.viewer.updateClientArea(t.bodyWidget,t.bodyWidget.page)),-1===t.bodyWidget.floatingElements.indexOf(t)&&t.bodyWidget.floatingElements.push(t);else{if(!G.isNullOrUndefined(t.previousWidget)&&!t.isLayouted&&r.height<t.height&&t.width>=r.width)for(var o=t;this.moveBlocksToNextPage(o.previousWidget,!1),o=o.nextSplitWidget;);this.documentHelper.tableLefts.pop(),this.viewer.updateClientArea(t.bodyWidget,t.bodyWidget.page);for(var a=0;a<e.length;a++){var s=e[a].bodyWidget;G.isNullOrUndefined(s)||-1!==s.floatingElements.indexOf(e[a])||s.floatingElements.push(e[a])}var l=e[e.length-1];this.viewer.cutFromTop(this.viewer.clientActiveArea.y+l.height+l.tableFormat.borders.bottom.lineWidth)}},t.prototype.addTableWidget=function(e,t,i){var r=t[t.length-1];return i&&(r=this.createTableWidget(r),t.push(r)),r.width=e.width,r.x=e.x,r.y=e.y,0<r.tableFormat.cellSpacing&&(r.height=r.height+K.convertPointToPixel(r.tableFormat.cellSpacing),r.isBidiTable?(r.leftBorderWidth=K.convertPointToPixel(this.getTableRightBorder(r.tableFormat.borders).getLineWidth()),r.rightBorderWidth=K.convertPointToPixel(this.getTableLeftBorder(r.tableFormat.borders).getLineWidth())):(r.leftBorderWidth=K.convertPointToPixel(this.getTableLeftBorder(r.tableFormat.borders).getLineWidth()),r.rightBorderWidth=K.convertPointToPixel(this.getTableRightBorder(r.tableFormat.borders).getLineWidth())),r.topBorderWidth=K.convertPointToPixel(this.getTableTopBorder(r.tableFormat.borders).getLineWidth()),r.bottomBorderWidth=K.convertPointToPixel(this.getTableBottomBorder(r.tableFormat.borders).getLineWidth()),r.x+=r.leftBorderWidth,r.y+=r.topBorderWidth,r.width-=r.leftBorderWidth,r.width-=r.rightBorderWidth,r.height+=r.bottomBorderWidth),r},t.prototype.updateWidgetsToPage=function(e,t,i,r,n){var o=this.viewer,a=e[e.length-1];if(!i.isInsideTable){for(var s=0;s<e.length;s++)this.updateHeightForTableWidget(e,t,e[s],n);0<a.childWidgets.length&&a.y!==a.childWidgets[0].y&&(a.y=a.childWidgets[0].y)}if(i.isBidiTable&&r)for(s=0;s<e.length;s++)for(var l=e[s],d=0;d<l.childWidgets.length;d++)l.childWidgets[d].shiftWidgetForRtlTable();0<i.tableFormat.cellSpacing&&(a.y+a.height+K.convertPointToPixel(i.tableFormat.cellSpacing)>o.clientArea.bottom&&o instanceof Nl&&(a.height=a.height-K.convertPointToPixel(i.tableFormat.cellSpacing)/2),o.cutFromTop(a.y+a.height)),this.viewer instanceof Nl&&(i.containerWidget.height+=i.height),i.bodyWidget instanceof X&&!i.wrapTextAround&&((r=i.containerWidget)&&r instanceof X&&this.documentHelper&&"Word2003"===this.documentHelper.compatibilityMode?(a=((o=i.containerWidget)&&o.page?o.page.boundingRectangle:o).height,o.height+i.height<=.5*a&&!this.skip2003||i.containerWidget.firstChild===i?(o.height+=i.height,i.isRender=!0):(this.viewer.clientActiveArea.y-=i.height,this.skip2003=!0,i.isRender=!1,this.istableYpositionChange&&(this.viewer.clientActiveArea.y=this.textWrappingBottom,this.istableYpositionChange=!1))):i.containerWidget.height+=i.height,this.documentHelper.editorProperties.enableHeaderAndFooter)&&-1!==i.bodyWidget.headerFooterType.indexOf("Footer")&&(this.skip2003=!1,this.shiftFooterChildLocation(i.bodyWidget,this.viewer))},t.prototype.updateHeightForTableWidget=function(e,t,i,r){for(var n=0;n<i.childWidgets.length;n++){var o=i.childWidgets[n];if(o===r)break;this.updateHeightForRowWidget(this.viewer,!0,e,t,o,!1,r)}},t.prototype.layoutRow=function(e,t,i){for(var r=t.ownerTable.isInsideTable,n=(r||this.updateExistingFootnoteHeight(t),this.viewer),o=(this.addTableRowWidget(n.clientActiveArea,[t]),n.updateClientAreaForRow(t,!0),this.getMaxTopCellMargin(t)),a=this.getMaxBottomCellMargin(t),s=0;s<t.childWidgets.length;s++){var l=t.childWidgets[s];this.layoutCell(l,o+t.topBorderWidth,a+t.bottomBorderWidth)}n.updateClientAreaForRow(t,!1);n=[t];return i||this.updateWidgetsToTable(e,n,t,!1),r||(this.layoutedFootnoteElement=[]),n[n.length-1]},t.prototype.updateExistingFootnoteHeight=function(e){this.layoutedFootnoteElement=[],G.isNullOrUndefined(e.bodyWidget.page.footnoteWidget)||0===e.bodyWidget.page.footnoteWidget.bodyWidgets.length?this.existFootnoteHeight=0:this.existFootnoteHeight=e.bodyWidget.page.footnoteWidget.height},t.prototype.isIntersecting=function(e,t,i,r){return(K.round(i,2)<=K.round(e,2)||K.round(i,2)<K.round(t,2))&&K.round(r,2)>K.round(e,2)},t.prototype.getAdjacentRowCell=function(e,t,i,r){var n=[],o=e.ownerTable.tableHolder.columns.length,a=e.ownerTable.childWidgets[r];if(!G.isNullOrUndefined(a)){var s=0,l=0,d=e.cellFormat.columnSpan,h=e.columnIndex;if(0<a.rowFormat.gridBefore){if(a.rowFormat.gridBefore>h+d)return n;s=a.rowFormat.beforeWidth,l=a.rowFormat.gridBefore}for(var c=0;c<a.childWidgets.length;c++){var g=a.childWidgets[c],p=g.x-g.margin.left,u=g.x+g.width+g.margin.right,f=g.columnIndex+g.cellFormat.columnSpan;if(c==a.childWidgets.length-1||K.round(p,2)>K.round(s,2)&&K.round(p,2)>K.round(t,2)){if(c==a.childWidgets.length-1&&0<a.rowFormat.gridAfter&&f+a.rowFormat.gridAfter===o)return n;if(this.isIntersecting(t,i,s,p))for(;0<d;){var m,y=a.getVerticalMergeStartCell(h,d);if(G.isNullOrUndefined(y))break;var v=y.cellFormat.columnSpan;if(n.push(y),m=y.x+y.width+y.margin.right,d-=(l=y.columnIndex+v)-h,h=l,K.round(t=m,2)>=K.round(i,2))break}}if(this.isIntersecting(t,i,p,u)&&(n.push(g),t=u,d-=f-h,h=f),K.round(u,2)>=K.round(i,2))break;s=u,l=f}}return n},t.prototype.addTableRowWidget=function(e,t){var i=t[t.length-1],r=(0===i.rowFormat.beforeWidth&&0===i.rowFormat.gridBeforeWidth||this.documentHelper.alignTablesRowByRow&&"Left"!==i.ownerTable.tableFormat.tableAlignment?i.x=e.x:i.x+=0!==i.rowFormat.beforeWidth?i.rowFormat.beforeWidth:i.rowFormat.gridBeforeWidth,i.y=e.y,i.width=e.width,0);if(!G.isNullOrUndefined(i.ownerTable)&&!G.isNullOrUndefined(i.ownerTable.tableFormat)&&0<i.ownerTable.tableFormat.cellSpacing){i.height=0<i.height?i.height:i.height+K.convertPointToPixel(i.ownerTable.tableFormat.cellSpacing);for(var n,o=0;o<i.childWidgets.length;o++)G.isNullOrUndefined(i.childWidgets[o].cellFormat)||G.isNullOrUndefined(i.childWidgets[o].cellFormat.borders)||r<(n=ee.getCellBottomBorder(i.childWidgets[o]).getLineWidth())&&(r=n);if(i.bottomBorderWidth=K.convertPointToPixel(r),0<i.index&&!G.isNullOrUndefined(i.previousWidget)){for(var a,s=i.previousWidget,r=0,l=0;l<s.childWidgets.length;l++)G.isNullOrUndefined(s.childWidgets[l].cellFormat)||G.isNullOrUndefined(s.childWidgets[l].cellFormat.borders)||r<(a=ee.getCellBottomBorder(s.childWidgets[l]).getLineWidth())&&(r=a);i.topBorderWidth=K.convertPointToPixel(r)}}if(!G.isNullOrUndefined(i.childWidgets))for(var d,l=0;l<i.childWidgets.length;l++)G.isNullOrUndefined(i.childWidgets[l].cellFormat)||G.isNullOrUndefined(i.childWidgets[l].cellFormat.borders)||r<(d=ee.getCellTopBorder(i.childWidgets[l]).getLineWidth())&&(r=d);if(i.topBorderWidth=K.convertPointToPixel(r),!G.isNullOrUndefined(i.ownerTable)&&!G.isNullOrUndefined(i.ownerTable.tableFormat)&&i.ownerTable.tableFormat.cellSpacing<=0&&i.rowIndex===i.ownerTable.childWidgets.length-1){for(var h,l=0;l<i.childWidgets.length;l++)G.isNullOrUndefined(i.childWidgets[l].cellFormat)||G.isNullOrUndefined(i.childWidgets[l].cellFormat.borders)||r<(h=ee.getCellBottomBorder(i.childWidgets[l]).getLineWidth())&&(r=h);i.bottomBorderWidth=K.convertPointToPixel(r)}return i},t.prototype.getMaxTopCellMargin=function(e){if(G.isNullOrUndefined(e.childWidgets))return 0;for(var t=0,i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i],n=0;t<(n=r.cellFormat.hasValue("topMargin")?K.convertPointToPixel(r.cellFormat.topMargin):e.rowFormat.hasValue("topMargin")?K.convertPointToPixel(e.rowFormat.topMargin):K.convertPointToPixel(e.ownerTable.tableFormat.topMargin))&&(t=n)}return t=e.rowFormat.hasValue("verticallyMergedCellsTopMargin")?Math.max(t,K.convertPointToPixel(e.rowFormat.verticallyMergedCellsTopMargin)):t},t.prototype.getMaxBottomCellMargin=function(e){if(G.isNullOrUndefined(e.childWidgets))return 0;for(var t=0,i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i],n=0;t<(n=r.cellFormat.hasValue("bottomMargin")?K.convertPointToPixel(r.cellFormat.bottomMargin):e.rowFormat.hasValue("bottomMargin")?K.convertPointToPixel(e.rowFormat.bottomMargin):K.convertPointToPixel(e.ownerTable.tableFormat.bottomMargin))&&(t=n)}return t=e.rowFormat.hasValue("verticallyMergedCellsBottomMargin")?Math.max(t,K.convertPointToPixel(e.rowFormat.verticallyMergedCellsBottomMargin)):t},t.prototype.layoutCell=function(e,t,i){var r=this.viewer;this.addTableCellWidget(e,r.clientActiveArea,t,i),this.updateTopBorders(e),r.updateClientAreaForCell(e,!0),0===e.childWidgets.length&&((t=new Z).characterFormat=new ce(void 0,this.documentHelper),t.paragraphFormat=new vl,t.index=0,i=new ad(t),t.childWidgets.push(i),e.childWidgets.push(t),t.paragraphFormat.borders=new Wl);for(var n=0;n<e.childWidgets.length;n++){var o=e.childWidgets[n];r.updateClientAreaForBlock(o,!0),o.containerWidget=e,this.layoutBlock(o,0),r.updateClientAreaForBlock(o,!1)}this.updateWidgetToRow(e),r.updateClientAreaForCell(e,!1)},t.prototype.isInsertTable=function(){return"InsertTable"===this.owner.editorProperties.action},t.prototype.updateTopBorders=function(e){if(e.updatedTopBorders=[],0===e.ownerTable.tableFormat.cellSpacing)for(var t=e.cellFormat.borders.top,i=((t=!t.isBorderDefined||t.isBorderDefined&&"None"===t.lineStyle&&0===t.lineWidth&&t.hasValue("color")?e.ownerRow.rowFormat.borders.horizontal:t).isBorderDefined||(t=e.ownerRow.ownerTable.tableFormat.borders.horizontal),e.x-e.margin.left),r=e.x+e.width+e.margin.right,n=this.getAdjacentRowCell(e,i,r,e.ownerRow.indexInOwner-1),o=0;o<n.length;o++){var a,s=n[o],l=s.cellFormat.borders.bottom,d=((l=!l.isBorderDefined||l.isBorderDefined&&"None"===l.lineStyle&&0===l.lineWidth&&l.hasValue("color")?s.ownerRow.rowFormat.borders.horizontal:l).isBorderDefined||(l=s.ownerRow.ownerTable.tableFormat.borders.horizontal),void 0),d="None"===t.lineStyle||"Cleared"===t.lineStyle?l:"Cleared"===l.lineStyle||"None"===l.lineStyle?t:e.getBorderBasedOnPriority(t,l),l=s.x-s.margin.left,s=s.x+s.width+s.margin.right;0===o&&i<l&&e.updatedTopBorders.push({border:t,width:l-i}),d&&(a=0,(a=K.round(s,2)===K.round(r,2)&&K.round(l,2)===K.round(i,2)?r-i:K.round(l,2)>=K.round(i,2)&&K.round(s,2)>=K.round(r,2)?r-l:K.round(l,2)>=K.round(i,2)&&K.round(s,2)<=K.round(r,2)?s-l:K.round(l,2)<=K.round(i,2)&&K.round(s,2)<=K.round(r,2)?s-i:(K.round(l,2)<=K.round(i,2)&&(K.round(s,2),K.round(r,2)),r-i))<0&&(a=0),e.updatedTopBorders.push({border:d,width:a})),o===n.length-1&&s<r&&e.updatedTopBorders.push({border:t,width:r-s})}},t.prototype.isMultiColumnStartUnchanged=function(e,t){var i=t.bodyWidget,e=e.getSplitWidgets(),e=e[e.length-1];return this.viewer instanceof Tl&&1<i.sectionFormat.columns.length&&0===i.columnIndex&&t===i.firstChild&&G.isNullOrUndefined(t.previousSplitWidget)&&G.isNullOrUndefined(i.previousSplitWidget)&&e.bodyWidget instanceof Y&&e.bodyWidget.page===i.page&&K.round(i.y,2)===K.round(this.viewer.clientActiveArea.y,2)},t.prototype.shiftLayoutedItems=function(e,t,i){if(G.isNullOrUndefined(this.documentHelper.blockToShift)||G.isNullOrUndefined(this.documentHelper.blockToShift.containerWidget)||this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.restrictLayout||!this.documentHelper.enableLayout)this.documentHelper.blockToShift=void 0,this.checkAndShiftEndnote(),e||this.documentHelper.removeEmptyPages();else{var r=this.documentHelper.blockToShift,n=this.getColumnBreak(r.bodyWidget),o=(!n&&this.viewer instanceof Tl&&!this.isMultiColumnSplit&&r===r.bodyWidget.firstChild&&!G.isNullOrUndefined(r.bodyWidget.previousRenderedWidget)&&r.bodyWidget.sectionIndex!==r.bodyWidget.previousRenderedWidget.sectionIndex&&1<r.bodyWidget.previousRenderedWidget.sectionFormat.columns.length&&(y=r.bodyWidget.previousRenderedWidget,a=this.getBodyWidget(y,!1),G.isNullOrUndefined(a.nextRenderedWidget)||a.page!==a.nextRenderedWidget.page||this.splitBodyWidgetBasedOnColumn(y)),!1),a=this.documentHelper.pages[this.documentHelper.pages.length-1];a.bodyWidgets[a.bodyWidgets.length-1];if((!n||e&&this.isSectionEndsWithColumnBreak(r.bodyWidget))&&this.viewer instanceof Tl&&!this.isMultiColumnSplit&&1<r.bodyWidget.sectionFormat.columns.length){if(0!==r.bodyWidget.columnIndex||r!==r.bodyWidget.firstChild||G.isNullOrUndefined(r.previousRenderedWidget)||r.bodyWidget.page!==r.previousRenderedWidget.bodyWidget.page||(r.bodyWidget.y=this.viewer.clientActiveArea.y),o=r===r.bodyWidget.firstChild,this.reLayoutMultiColumn(r.bodyWidget,o,r.index),G.isNullOrUndefined(this.documentHelper.blockToShift))return void this.documentHelper.hooks.onUpdateScrollBars();r=this.documentHelper.blockToShift}for(var s=r.bodyWidget.index,l=(this.reLayoutOrShiftWidgets(r,this.viewer,t),!0),d=r.getSplitWidgets(),h=d[d.length-1].nextRenderedWidget,c=[],g=[r];h instanceof Yl&&(h.bodyWidget.index===s||"NoBreak"===h.bodyWidget.sectionFormat.breakCode&&r.bodyWidget.sectionFormat.pageWidth===h.bodyWidget.sectionFormat.pageWidth&&r.bodyWidget.sectionFormat.pageHeight===h.bodyWidget.sectionFormat.pageHeight)&&-1===g.indexOf(h);){if(g.push(h),t&&0===h.bodyWidget.sectionFormat.columns.length)return;if(n=this.getColumnBreak(h.bodyWidget),!this.isMultiColumnSplit&&!this.documentHelper.editorProperties.isFootnoteElementRemoved&&this.isMultiColumnStartUnchanged(r,h))break;if((!n||e&&this.isSectionEndsWithColumnBreak(h.bodyWidget))&&this.viewer instanceof Tl&&!this.isMultiColumnSplit&&1<h.bodyWidget.sectionFormat.columns.length){if(0!==h.bodyWidget.columnIndex||h!==h.bodyWidget.firstChild||G.isNullOrUndefined(h.previousRenderedWidget)||h.bodyWidget.page!==h.previousRenderedWidget.bodyWidget.page||(h.bodyWidget.y=this.viewer.clientActiveArea.y),o=h===h.bodyWidget.firstChild,this.reLayoutMultiColumn(h.bodyWidget,o,h.index),G.isNullOrUndefined(this.documentHelper.blockToShift))return;h=this.documentHelper.blockToShift}var p=(f=r.getSplitWidgets())[f.length-1],l=!1,u=void 0,f=(r=h).getSplitWidgets(),m=!1;if((u=r instanceof Z||r instanceof Q?f[0]:u)instanceof Z&&u.isEmpty()&&!u.isInsideTable&&u.previousWidget instanceof Z&&u.nextRenderedWidget instanceof Yl&&u===u.bodyWidget.lastChild&&u.bodyWidget.index!==u.nextRenderedWidget.bodyWidget.index&&u.nextRenderedWidget.bodyWidget.page===u.bodyWidget.page&&(m=!0),!this.documentHelper.editorProperties.isFootnoteElementRemoved&&p.containerWidget===u.containerWidget&&K.round(u.y,2)===K.round(this.viewer.clientActiveArea.y,2)&&G.isNullOrUndefined(u.nextWidget)&&!m)break;if(G.isNullOrUndefined(p.floatingElements),l=!0,r.isFieldCodeBlock||this.reLayoutOrShiftWidgets(r,this.viewer,t,c),this.keepWithNext&&(r=this.documentHelper.blockToShift,this.keepWithNext=!1),!this.isMultiColumnSplit&&n&&1<r.bodyWidget.sectionFormat.numberOfColumns&&r.bodyWidget.nextWidget&&r.nextRenderedWidget&&r.bodyWidget.index!==r.nextRenderedWidget.bodyWidget.index&&(f=this.viewer.clientActiveArea.y,u=this.viewer.clientActiveArea.height,this.viewer.updateClientArea(r.bodyWidget.nextWidget,r.bodyWidget.nextWidget.page),this.viewer.clientActiveArea.height=u,this.viewer.clientActiveArea.y=f),this.isMultiColumnSplit&&1<r.bodyWidget.sectionFormat.numberOfColumns&&r===r.bodyWidget.lastChild&&!G.isNullOrUndefined(r.bodyWidget.nextRenderedWidget)&&r.bodyWidget.sectionIndex!==r.bodyWidget.nextRenderedWidget.sectionIndex&&r.bodyWidget.page===r.bodyWidget.nextRenderedWidget.page)return;h=(d=r.getSplitWidgets())[d.length-1].nextRenderedWidget}this.updateListItemsTillEnd(r,l),this.documentHelper.blockToShift=void 0;this.viewer;this.documentHelper.editorProperties.isFootnoteElementRemoved&&(a=(y=this.documentHelper.pages[this.documentHelper.pages.length-1]).bodyWidgets[y.bodyWidgets.length-1],y=y.endnoteWidget,G.isNullOrUndefined(y)||(v=this.viewer.clientArea.clone(),W=this.viewer.clientActiveArea.clone(),b=a.y,0<a.childWidgets.length&&(b=(a=a.childWidgets[a.childWidgets.length-1]).y+a.height),this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.bottom-b,this.viewer.clientActiveArea.x=this.viewer.clientArea.x,this.viewer.clientActiveArea.width=this.viewer.clientArea.width,this.viewer.clientActiveArea.y=b,this.layoutfootNote(y),this.viewer.clientArea=v,this.viewer.clientActiveArea=W)),this.documentHelper.removeEmptyPages(),this.updateFieldElements(e);var y,v,W,b,x=this.documentHelper.pages[0];if(0<x.bodyWidgets[0].sectionIndex){for(var w=x;this.documentHelper.layout.layoutHeaderFooter(w.bodyWidgets[0],this.viewer,w),w=w.nextPage;);for(;0<x.bodyWidgets[0].sectionIndex;)this.updateSectionIndex(void 0,x.bodyWidgets[0],!1)}r.bodyWidget instanceof J||this.isRelayoutFootnote||!r.bodyWidget.page.endnoteWidget||this.checkAndShiftEndnote(!0),(this.documentHelper.enableLockAndEdit||this.documentHelper.editorProperties.enableHeaderAndFooter)&&e||this.isMultiColumnSplit||i||this.documentHelper.hooks.onUpdateScrollBars()}},t.prototype.updateSectionIndex=function(e,t,i){for(var r=t.sectionIndex,n=t;n.index===r&&e&&(n.sectionFormat=e),i?n.index++:n.index--,n=n.nextRenderedWidget;);},t.prototype.isSectionEndsWithColumnBreak=function(e){return!G.isNullOrUndefined(e)&&0<e.childWidgets.length&&e.lastChild instanceof Z&&e.lastChild.isEndsWithColumnBreak},t.prototype.checkAndShiftEndnote=function(e){var t,i=this.documentHelper.selectionEndParagraph;G.isNullOrUndefined(i)||(!(i=i.isInsideTable?this.getParentTable(i):i)||i.isInHeaderFooter||i.bodyWidget.containerWidget instanceof J||!G.isNullOrUndefined(i.nextRenderedWidget)&&!e?(this.isEndnoteContentChanged&&e&&!this.isRelayoutFootnote||i.bodyWidget.containerWidget instanceof J&&"Footnote"===i.bodyWidget.containerWidget.footNoteType)&&this.reLayoutEndnote():i.bodyWidget instanceof J||this.isRelayoutFootnote||(e=this.documentHelper.pages[this.documentHelper.pages.length-1])&&e.endnoteWidget&&(i=this.viewer.clientActiveArea.clone(),t=this.getBodyWidget(e.bodyWidgets[e.bodyWidgets.length-1],!0),this.viewer.updateClientArea(t,t.page),0<(t=this.getNextWidgetHeight(t))&&(this.viewer.clientActiveArea.height-=t-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=t),this.layoutfootNote(e.endnoteWidget),this.viewer.clientActiveArea=i))},t.prototype.updateFieldElements=function(e){for(var t=0;t<this.documentHelper.fields.length;t++){var i,r,n,o,a,s,l=this.documentHelper.fields[t];!(this.viewer instanceof Tl||this.viewer instanceof Nl&&!(l.line.paragraph.containerWidget instanceof P||l.line.paragraph.bodyWidget instanceof X))||G.isNullOrUndefined(this.documentHelper)||(a=this.documentHelper.editorProperties.getFieldCode(l),o=/^(?!.*\bhyperlink\b)(?!.*\bnumpages\b).*\bpage\b.*$/,G.isNullOrUndefined(a))||!(a.toLowerCase().match("numpages")||a.toLowerCase().match("sectionpages")||o.test(a.toLowerCase())&&e)||G.isNullOrUndefined(l.fieldSeparator)||(i=l.fieldSeparator.nextNode,G.isNullOrUndefined(i))||(r=i.text,n=l.line.paragraph,!G.isNullOrUndefined(n.containerWidget)&&n.containerWidget instanceof Y&&-1===n.containerWidget.indexInOwner)||(s=n.bodyWidget,G.isNullOrUndefined(s))||G.isNullOrUndefined(s.page)||-1===s.page.index||(o.test(a.toLowerCase())?(o=n.bodyWidget.page.index+1,i.text!==o.toString()?i.text=this.documentHelper.getFieldResult(l,s.page):i.text=o.toString()):i.text=this.documentHelper.pages.length.toString(),r!==i.text&&(i.isWidthUpdated=!1,a=n.childWidgets.indexOf(l.line),s=l.line.children.indexOf(i),n.isInsideTable?this.reLayoutParagraph(n,a,s):this.reLayoutLine(n,a,!1,!1,!0)))}},t.prototype.reLayoutOrShiftWidgets=function(e,t,i,r){var n=e,o=!1;if(this.isNeedToRelayout(e.bodyWidget)||this.isPageBreakInsideContentControl(e)||e instanceof Z&&0<e.floatingElements.length?(this.isMultiColumnSplit||this.updateContainerForTable(n,t),n instanceof Q&&(n=n.combineWidget(this.viewer),this.clearTableWidget(n,!0,!0,!0)),t.updateClientAreaForBlock(n,!0,void 0,!1,!0),n.wrapTextAround&&(n.isLayouted=!1),this.isRelayout=!0,this.layoutBlock(n,0),this.isRelayout=!1,t.updateClientAreaForBlock(n,!1),o=!0):this.shiftWidgetsBlock(n,t,r),0<this.documentHelper.pages.indexOf(n.bodyWidget.page)&&n===n.bodyWidget.childWidgets[0]&&n instanceof Z)for(var a=n.bodyWidget.childWidgets[0].childWidgets[0].children,s=0;s<a.length;s++){var l=a[s];0<l.margin.top&&l.margin.top===this.getBeforeSpacing(l.paragraph)&&(l.margin.top-=this.getBeforeSpacing(l.paragraph))}o||i||this.updateRenderedListItems(n),!this.isRelayoutFootnote&&n.bodyWidget.page.footnoteWidget&&(this.islayoutFootnote=!0,this.layoutfootNote(n.bodyWidget.page.footnoteWidget))},t.prototype.isNeedToRelayout=function(e){for(var t=0;t<e.floatingElements.length;t++){var i=e.floatingElements[t];if(i instanceof Q||i instanceof re&&("Square"===i.textWrappingStyle||"TopAndBottom"===i.textWrappingStyle))return!0}return!1},t.prototype.updateParaOnBeforeSpacing=function(e,t,i){if(!(e.bodyWidget instanceof X||e instanceof Q||G.isNullOrUndefined(e.firstChild)||G.isNullOrUndefined(e.firstChild.margin))){var r=e,n=0,e=!G.isNullOrUndefined(r.previousRenderedWidget)&&r.previousRenderedWidget instanceof Z,o=(e&&r.previousRenderedWidget.paragraphFormat.afterSpacing<=r.paragraphFormat.beforeSpacing&&(n=r.paragraphFormat.beforeSpacing-r.previousRenderedWidget.paragraphFormat.afterSpacing),e||(n=r.paragraphFormat.beforeSpacing),n=K.convertPointToPixel(n),r.firstChild);if(i){if(G.isNullOrUndefined(r.previousSplitWidget)&&0===t.indexInOwner&&0<t.page.index&&0===r.indexInOwner&&0<o.margin.top){r.height-=n,o.height-=n;for(var a=0;a<o.children.length;a++){var s=o.children[a],l=K.convertPointToPixel(r.paragraphFormat.beforeSpacing);0<o.paragraph.paragraphFormat.lineSpacing&&0<o.paragraph.paragraphFormat.beforeSpacing&&s.margin.top>l?(s.margin.top-=l,0===a&&(o.margin.top-=l)):0<o.paragraph.paragraphFormat.beforeSpacing&&(s.margin.top=0)===a&&(o.margin.top=0)}}}else if(G.isNullOrUndefined(r.previousSplitWidget)&&0<n&&0===o.margin.top){r.height+=n,o.height+=n,o.margin.top=n;for(a=0;a<o.children.length;a++)(s=o.children[a]).margin.top=n}}},t.prototype.shiftWidgetsBlock=function(e,t,i){e instanceof Z?this.shiftWidgetsForPara(e,t,i):e instanceof Q&&(!G.isNullOrUndefined(i)&&0<i.length&&e.previousRenderedWidget&&e.previousRenderedWidget.y+e.previousRenderedWidget.height+e.height>this.viewer.clientArea.bottom&&(i.length=0),this.shiftWidgetsForTable(e,t))},t.prototype.shiftWidgetsForPara=function(e,t,i){if(!(e.height>t.clientArea.height+t.clientArea.y)||this.documentHelper.editorProperties.enableHeaderAndFooter){e.bodyWidget;for(var r=this.getBodyWidgetOfPreviousBlock(e,0),n=r.bodyWidget,o=r.index,a=void 0,s=!1,l=!0,d=0;d<e.getSplitWidgets().length;d++){var h=e.getSplitWidgets()[d],c=h instanceof Z&&h.isEmpty()&&!0===h.isSectionBreak,g=this.getBodyWidget(h.bodyWidget,!0);if(!this.isMultiColumnSplit||h===e){if(l&&!G.isNullOrUndefined(a)){var p=!!a.lastChild&&a.lastChild.isEndsWithPageBreak,u=!!a.lastChild&&a.lastChild.isEndsWithColumnBreak;if(this.shiftToPreviousWidget(h,t,a,p,u),this.updateFloatingElementPosition(a),(G.isNullOrUndefined(h.childWidgets)||0===h.childWidgets.length)&&!p&&!u){d--;continue}n!==h.containerWidget&&(n=h.containerWidget,p)&&a!==h.previousSplitWidget&&t.updateClientAreaByWidget(h),a=void 0}var f,m,y,v=[],W=(s||(v=this.getFootNoteWidgetsOf(h)),0),b=!1;if(!this.isMultiColumnSplit&&!h.isInsideTable&&!G.isNullOrUndefined(i)&&0<i.length&&this.isFitInClientArea(h,t,v)&&h.previousRenderedWidget&&h.bodyWidget.page===h.previousRenderedWidget.bodyWidget.page&&(W=this.getFootNoteHeight(i),m=this.updateFootnoteHeight(h,!1,!0),h.previousRenderedWidget.y+h.previousRenderedWidget.height+W+h.firstChild.height>m)&&this.viewer.clientArea.bottom<=m&&(b=!0),s=!1,this.viewer.clientActiveArea.y===this.viewer.clientArea.y&&0===h.indexInOwner||this.updateParaOnBeforeSpacing(h,h.bodyWidget,!1),this.isFitInClientArea(h,t,v)&&!b||t.clientActiveArea.height<h.firstChild.height&&this.viewer.clientActiveArea.y===this.viewer.clientArea.y||this.isMultiColumnSplit&&h.bodyWidget.sectionFormat.numberOfColumns-1!==h.bodyWidget.columnIndex){if(!G.isNullOrUndefined(i)&&!G.isNullOrUndefined(v)&&0<v.length)for(var x=0;x<v.length;x++)i.push(v[x]);if(this.keepWithNext&&(this.updateClientPositionForBlock(h.containerWidget.firstChild,h),this.keepWithNext=!1),t.updateClientAreaForBlock(a=h,!0,void 0,!1,!0),this.isNeedToUpdateXPositionForEmptyParagraph(h)?this.updateXPositionForEmptyParagraph(t.clientActiveArea,h):(h.x=t.clientActiveArea.x,f=h.previousWidget,!h.previousSplitWidget&&f instanceof Z&&this.isMergedWithNextParagraph(f)&&(h.x+=Math.max(0,this.getMergedParagraphOffset(h)))),t.updateClientAreaForBlock(h,!1),h.y=t.clientActiveArea.y,this.updateFloatingElementPosition(h),!c||G.isNullOrUndefined(h.previousRenderedWidget)||h.previousRenderedWidget instanceof Q?t.cutFromTop(t.clientActiveArea.y+h.height):t.cutFromTop(t.clientActiveArea.y),G.isNullOrUndefined(n)||n===h.containerWidget||this.isMultiColumnSplit)h.containerWidget instanceof Y&&h.containerWidget.firstChild===h&&h.previousRenderedWidget&&h.previousRenderedWidget instanceof Z&&h.containerWidget.page.index!==h.previousRenderedWidget.containerWidget.page.index&&h.containerWidget.index!==h.previousRenderedWidget.containerWidget.index&&(y=(f=h.previousRenderedWidget.bodyWidget).sectionFormat.breakCode,1<f.sectionFormat.columns.length&&(f=this.getBodyWidget(f,!0)),G.isNullOrUndefined(f.previousRenderedWidget)||"NoBreak"!==f.sectionFormat.breakCode||"NewPage"!==f.previousRenderedWidget.sectionFormat.breakCode||f.page.index!==f.previousRenderedWidget.page.index?"NewPage"===f.sectionFormat.breakCode&&"NoBreak"===h.containerWidget.sectionFormat.breakCode&&(y=h.containerWidget.sectionFormat.breakCode):y=f.previousRenderedWidget.sectionFormat.breakCode,m=K.round(this.getNextWidgetHeight(f)+h.height,2),this.shiftBodyWidget(h,m,y));else if(o++,n.lastChild.isEndsWithPageBreak||n.lastChild.isEndsWithColumnBreak||this.isPageBreakInsideContentControl(n.lastChild)||this.updateContainerWidget(h,n,o,!0,v),0<v.length&&n.page.footnoteWidget)for(x=0;x<v.length;x++)-1===n.page.footnoteWidget.bodyWidgets.indexOf(v[x])&&h.bodyWidget.page.index!=v[x].page.index&&(n.page.footnoteWidget.bodyWidgets.push(v[x]),n.page.footnoteWidget.height+=v[x].height);!this.isInitialLoad&&l&&1<h.bodyWidget.sectionFormat.columns.length&&h===h.bodyWidget.firstChild&&!G.isNullOrUndefined(g.previousWidget)&&g.page===g.previousWidget.page&&(this.viewer.updateClientArea(h.bodyWidget,h.bodyWidget.page),g=this.getBodyWidget(g.previousWidget,!0),y=this.getNextWidgetHeight(g),h.bodyWidget.y=y,this.viewer.clientActiveArea.height-=y-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=y,l=!1,d--),(h.isEndsWithPageBreak&&!this.isPageBreakInsideField(h)||h.isEndsWithColumnBreak||this.isPageBreakInsideContentControl(h))&&this.viewer instanceof Tl&&(g=this.createOrGetNextBodyWidget(n,this.viewer),g=this.moveBlocksToNextPage(h,!0,void 0,void 0,void 0,void 0,h.isEndsWithPageBreak),t.updateClientArea(g,g.page))}else{G.isNullOrUndefined(i)||(i.length=0);g=h.previousRenderedWidget,p=!1,u=!1,g=(g instanceof Z&&g.isEndsWithPageBreak&&this.viewer instanceof Tl&&(p=!0),g instanceof Z&&g.isEndsWithColumnBreak&&this.viewer instanceof Tl&&(u=!0),!1);c||(g=this.splitWidget(h,t,n,o+1,p,v,u,b?W:0)),h.containerWidget instanceof Y&&h.containerWidget.firstChild===h&&h.previousRenderedWidget&&h.previousRenderedWidget instanceof Z&&h.previousRenderedWidget.containerWidget instanceof Y&&"NewPage"===h.previousRenderedWidget.containerWidget.sectionFormat.breakCode&&h.containerWidget.page.index!==h.previousRenderedWidget.containerWidget.page.index&&h.containerWidget.index!==h.previousRenderedWidget.containerWidget.index&&(c=K.round(this.getNextWidgetHeight(h.previousRenderedWidget.bodyWidget)+h.height,2),this.shiftBodyWidget(h,c,h.containerWidget.sectionFormat.breakCode)),this.updateFloatingElementPosition(h),a=void 0,n!==h.containerWidget&&(n=h.containerWidget,d--,0<v.length)&&(s=!0),0===(o=n.childWidgets.indexOf(h))&&this.updateParaOnBeforeSpacing(h,h.bodyWidget,!0),g&&(n=e.getSplitWidgets()[d+1].containerWidget)}}}this.skipUpdateContainerWidget=!1,e.isEmpty()&&(r=e.previousRenderedWidget,e.isSectionBreak)&&0<e.index&&(r instanceof Z?(this.layoutSectionBreakParagraph(e,r),!r.isEndsWithPageBreak&&this.viewer.clientActiveArea.y<=e.y&&this.viewer.cutFromTop(e.y+e.height)):r instanceof Q&&this.documentHelper.compatibilityMode)}},t.prototype.shiftBodyWidget=function(e,t,i){if(!e.previousRenderedWidget.containerWidget.lastChild.isEndsWithPageBreak&&!e.previousRenderedWidget.containerWidget.lastChild.isEndsWithColumnBreak&&t<=K.round(this.viewer.clientArea.bottom,2)&&"NoBreak"===i){for(var r=e.previousRenderedWidget.bodyWidget.page,n=e.containerWidget.page,o=0;o<n.bodyWidgets.length;o++){var a=n.bodyWidgets[o];n.bodyWidgets.splice(n.bodyWidgets.indexOf(a),1),r.bodyWidgets.splice(r.bodyWidgets.length,0,a),a.page=r,o--}e.containerWidget.y=this.viewer.clientActiveArea.y,this.documentHelper.removeEmptyPages()}},t.prototype.updateFloatingElementPosition=function(e){if(0<e.floatingElements.length)for(var t=0;t<e.floatingElements.length;t++){var i=e.floatingElements[t],r=0;if(i instanceof ne&&"Inline"===i.textWrappingStyle){for(var n=i.line.indexInOwner,o=0,r=K.convertPointToPixel(i.textFrame.marginTop),a=0;a<n;a++)G.isNullOrUndefined(e.childWidgets[a])||(o+=e.childWidgets[a].height);i.y=e.y+o}else{var s=this.getFloatingItemPoints(i);i.y=s.y,i.x=s.x}(i instanceof ne||i instanceof oe)&&this.updateChildLocationForCellOrShape(i.y+r,i,void 0,!1,!0)}},t.prototype.isPageBreakInsideField=function(e){for(var t=!1,i=!1,r=0,n=0;n<e.childWidgets.length;n++){var o=e.childWidgets[n];r+=o.height;for(var a=0;a<o.children.length;a++){var s=o.children[a];s instanceof te&&(0===s.fieldType?i=!0:2!==s.fieldType&&1!==s.fieldType||(i=!1)),t=!(!i&&"\f"===s.text)}}return t&&0===e.height&&this.viewer.cutFromTop(this.viewer.clientActiveArea.y+r),t},t.prototype.isPageBreakInsideContentControl=function(e){var t=!1;return t=e instanceof Z&&0<e.childWidgets.length&&0<(e=e.childWidgets[e.childWidgets.length-1]).children.length&&(e=e.children[e.children.length-1])instanceof zd&&"Block"===e.contentControlWidgetType&&!G.isNullOrUndefined(e.previousElement)&&e.previousElement instanceof ie&&"\f"===e.previousElement.text?!0:t},t.prototype.getFootNotesOfBlock=function(e,t){if(G.isNullOrUndefined(t)&&(t=[]),0<e.childWidgets.length)for(var i=0;i<this.documentHelper.footnoteCollection.length;i++)this.documentHelper.footnoteCollection[i].line.paragraph===e&&t.push(this.documentHelper.footnoteCollection[i]);return t},t.prototype.getFootnoteElementsOfParagraph=function(e){var t=[],i=e.childWidgets;if(!G.isNullOrUndefined(i)&&0!==i.length)for(var r=0;r<i.length;r++)for(var n=i[r],o=0;o<n.children.length;o++){var a=n.children[o];a instanceof Sd&&t.push(a)}return t},t.prototype.getFootNotesWidgetsInLine=function(e){for(var t=[],i=0;i<e.children.length;i++){var r=e.children[i];r instanceof Sd&&t.push(r)}return this.getFootNoteWidgetsBy(e.paragraph,t)},t.prototype.getFootNoteWidgetsBy=function(e,t){var i=[];if(e.bodyWidget.page.footnoteWidget)for(var r=0;r<e.bodyWidget.page.footnoteWidget.bodyWidgets.length;r++)for(var n=0;n<t.length;n++)e.bodyWidget.page.footnoteWidget.bodyWidgets[r].footNoteReference===t[n]&&i.push(e.bodyWidget.page.footnoteWidget.bodyWidgets[r]);if(0===i.length&&!G.isNullOrUndefined(e.previousRenderedWidget)&&e.previousRenderedWidget.bodyWidget.page.footnoteWidget)for(r=0;r<e.previousRenderedWidget.bodyWidget.page.footnoteWidget.bodyWidgets.length;r++)for(n=0;n<t.length;n++)e.previousRenderedWidget.bodyWidget.page.footnoteWidget.bodyWidgets[r].footNoteReference===t[n]&&i.push(e.previousRenderedWidget.bodyWidget.page.footnoteWidget.bodyWidgets[r]);if(0===i.length&&!G.isNullOrUndefined(e.bodyWidget.previousRenderedWidget)&&e.bodyWidget.previousRenderedWidget.page.footnoteWidget)for(r=0;r<e.bodyWidget.previousRenderedWidget.page.footnoteWidget.bodyWidgets.length;r++)for(n=0;n<t.length;n++)e.bodyWidget.previousRenderedWidget.page.footnoteWidget.bodyWidgets[r].footNoteReference===t[n]&&i.push(e.bodyWidget.previousRenderedWidget.page.footnoteWidget.bodyWidgets[r]);if(0===i.length&&!G.isNullOrUndefined(e.bodyWidget.nextRenderedWidget)&&e.bodyWidget.nextRenderedWidget.page.footnoteWidget)for(r=0;r<e.bodyWidget.nextRenderedWidget.page.footnoteWidget.bodyWidgets.length;r++)for(n=0;n<t.length;n++)e.bodyWidget.nextRenderedWidget.page.footnoteWidget.bodyWidgets[r].footNoteReference===t[n]&&i.push(e.bodyWidget.nextRenderedWidget.page.footnoteWidget.bodyWidgets[r]);return i},t.prototype.getFootNoteWidgetsOf=function(e,t){var i=[],r=[];if(e instanceof Q)for(var n=0;n<e.childWidgets.length;n++)for(var o=e.childWidgets[n],a=0;a<o.childWidgets.length;a++)for(var s=o.childWidgets[a],l=0;l<s.childWidgets.length;l++){var d=s.childWidgets[l];if(d instanceof Q)for(var h=this.getFootNoteWidgetsOf(d,t),c=0;c<h.length;c++)-1===i.indexOf(h[c])&&i.push(h[c]);else r=this.getFootNotesOfBlock(d,r);if(0<r.length){var g=this.getFootNoteWidgetsBy(d,r);if(t&&0===g.length)for(var p=0;p<r.length;p++)-1===i.indexOf(r[p].bodyWidget)&&i.push(r[p].bodyWidget);else for(c=0;c<g.length;c++)-1===i.indexOf(g[c])&&i.push(g[c])}}else if(0<(r=this.getFootNotesOfBlock(e)).length&&(i=this.getFootNoteWidgetsBy(e,r)),t&&0===i.length)for(var u=0;u<r.length;u++)i.push(r[u].bodyWidget);return i},t.prototype.getFootNodeWidgetsToShiftToPage=function(e){for(var t,i=e.getSplitWidgets(),r=[],n=e.containerWidget,o=0;o<i.length;o++)for(var a=this.getFootNoteWidgetsOf(i[o]),s=0;s<a.length;s++)n!==(t=a[s].containerWidget)&&r.push(a[s]);return{footNoteWidgets:r,fromBodyWidget:t,toBodyWidget:n}},t.prototype.shiftTableWidget=function(e,t,i){void 0===i&&(i=!1),e.isBidiTable=e.bidi,"Word2013"===this.documentHelper.compatibilityMode||e.isInsideTable||G.isNullOrUndefined(e.firstChild.firstChild.leftMargin)||(this.viewer.clientActiveArea.x=this.viewer.clientActiveArea.x-K.convertPointToPixel(e.firstChild.firstChild.leftMargin));var r,n,o,a=[e],s=(this.addTableWidget(this.viewer.clientActiveArea,a),this.viewer.updateClientAreaTopOrLeft(e,!0),0),l=(e.wrapTextAround?(r=this.viewer.clientActiveArea.clone(),n=this.viewer.clientArea.clone(),this.updateClientAreaForWrapTable(a,e,!0,r,n)):e.containerWidget instanceof P||(this.adjustClientAreaBasedOnTextWrapForTable(e,this.viewer.clientActiveArea),this.isWrapText&&(s=this.viewer.clientActiveArea.x-this.viewer.clientArea.x,this.isWrapText=!1,e.x=this.viewer.clientActiveArea.x)),0<e.childWidgets.length&&(o=e.childWidgets[0].rowFormat.isHeader,e.header=o,e.continueHeader=o,e.headerHeight=0),e.childWidgets[0]);for(this.updateFootnoteHeight(e,!0),this.documentHelper.viewer instanceof Tl&&e.wrapTextAround&&("Bottom"===e.positioning.verticalAlignment||"Center"===e.positioning.verticalAlignment||"Outside"===e.positioning.verticalAlignment)&&(this.updateTableFloatPoints(e),this.updateChildLocationForTable(e.y,e));l;)l=(l=this.shiftRowWidget(a,l,i)).nextRow;return this.updateFootnoteHeight(e,!1),this.updateWidgetsToPage(a,[],e,!0),0<s&&(this.viewer.clientArea.x=this.viewer.clientArea.x-s),e.wrapTextAround&&this.updateClientAreaForWrapTable(a,e,!1,r,n),"Word2013"===this.documentHelper.compatibilityMode||e.isInsideTable||e.wrapTextAround||G.isNullOrUndefined(e.firstChild.firstChild.leftMargin)||(this.viewer.clientArea.x=this.viewer.clientArea.x+K.convertPointToPixel(e.firstChild.firstChild.leftMargin)),a[a.length-1]},t.prototype.shiftRowWidget=function(e,t,i){var r=this.viewer,n=((i=void 0===i?!1:i)&&(t.height=0),t.ownerTable.isInsideTable),o=(n||this.updateExistingFootnoteHeight(t),[t]);this.addTableRowWidget(r.clientActiveArea,o),r.updateClientAreaForRow(t,!0);for(var a=0;a<t.childWidgets.length;a++){var s=t.childWidgets[a];i&&(s.height=0),this.shiftCellWidget(s,this.getMaxTopCellMargin(t)+t.topBorderWidth,this.getMaxBottomCellMargin(t)+t.bottomBorderWidth,i)}return r.updateClientAreaForRow(t,!1),n||(r=this.footnoteHeight,this.updateFootnoteToBody(t,this.layoutedFootnoteElement),this.footnoteHeight=r),this.updateWidgetsToTable(e,o,t,!1),n||(this.layoutedFootnoteElement=[]),o[o.length-1]},t.prototype.updateFootnoteToBody=function(e,t){this.layoutFootnoteInSplittedRow(e,this.getFootnoteBody(t)),G.isNullOrUndefined(e.ownerTable.footnoteElement)&&(e.ownerTable.footnoteElement=[]);for(var i=0;i<t.length;i++)e.ownerTable.footnoteElement.push(t[i])},t.prototype.getFootnoteBody=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i].bodyWidget);return t},t.prototype.shiftCellWidget=function(e,t,i,r){G.isNullOrUndefined(r)&&(r=!1);var n=this.viewer,t=(this.addTableCellWidget(e,n.clientActiveArea,t,i),this.viewer.clientActiveArea.height);n.updateClientAreaForCell(e,!0);for(var o=0;o<e.childWidgets.length;o++){var a=e.childWidgets[o],s=o!==e.childWidgets.length-1;n.updateClientAreaForBlock(a,!0),a instanceof Z?this.shiftParagraphWidget(a,s):this.shiftTableWidget(a,n,r),n.updateClientAreaForBlock(a,!1)}this.updateWidgetToRow(e),n.updateClientAreaForCell(e,!1),e.ownerTable.isInsideTable||(this.viewer.clientActiveArea.height=t)},t.prototype.shiftParagraphWidget=function(e,t){this.addParagraphWidget(this.viewer.clientActiveArea,e);var i=e.previousWidget;if(i instanceof Z&&!e.previousSplitWidget&&this.isMergedWithNextParagraph(i)&&(e.x+=Math.max(0,this.getMergedParagraphOffset(e))),0<e.floatingElements.length)for(var r=0;r<e.floatingElements.length;r++){var n=e.floatingElements[r],o=0;if(n instanceof ne&&"Inline"===n.textWrappingStyle){for(var a=n.line.indexInOwner,s=0,o=K.convertPointToPixel(n.textFrame.marginTop),l=0;l<a;l++)s+=e.childWidgets[l].height;n.y=e.y+s}else{var d=this.getFloatingItemPoints(n);n.y=d.y,n.x=d.x}(n instanceof ne||n instanceof oe)&&this.updateChildLocationForCellOrShape(n.y+o,n,void 0,!1,!0)}this.viewer.cutFromTop(this.viewer.clientActiveArea.y+e.height);for(var h=this.getFootNoteWidgetsOf(e,!0),c=0;c<h.length;c++)this.layoutedFootnoteElement.push(h[c].footNoteReference);this.footnoteHeight+=this.getFootNoteHeight(h),this.updateWidgetToPage(this.viewer,e,t)},t.prototype.updateContainerForTable=function(e,t){var i=this.getBodyWidgetOfPreviousBlock(e,0),r=i.bodyWidget,i=i.index,n=!G.isNullOrUndefined(r.lastChild)&&!G.isNullOrUndefined(r.lastChild.lastChild)&&r.lastChild.lastChild.isEndsWithPageBreak,o=!G.isNullOrUndefined(r.lastChild)&&!G.isNullOrUndefined(r.lastChild.lastChild)&&r.lastChild.lastChild.isEndsWithColumnBreak;r!==e.containerWidget&&(n||o?t.updateClientArea(e.bodyWidget,e.bodyWidget.page):this.updateContainerWidget(e,r,i+1,!0)),(e.isInHeaderFooter||this.viewer instanceof Nl)&&(e.containerWidget.height-=e.height)},t.prototype.shiftWidgetsForTable=function(e,t){this.updateContainerForTable(e,t),this.viewer.updateClientAreaForBlock(e,!0,void 0,!1,!0),this.updateVerticalPositionToTop(e,!0);var i,t=e.combineWidget(this.viewer);this.documentHelper.layout.updateChildLocationForTable(t.y,t),this.clearTableWidget(t,!0,!1,!1,!0),this.shiftTableWidget(t,this.viewer),t.containerWidget instanceof Y&&t.containerWidget.firstChild===t&&t.previousRenderedWidget&&t.previousRenderedWidget instanceof Z&&t.previousRenderedWidget.containerWidget instanceof Y&&t.containerWidget.page.index!==t.previousRenderedWidget.containerWidget.page.index&&t.containerWidget.index!==t.previousRenderedWidget.containerWidget.index&&(i=K.round(this.getNextWidgetHeight(t.previousRenderedWidget.bodyWidget)+t.height,2),this.shiftBodyWidget(t,i,t.containerWidget.sectionFormat.breakCode)),this.updateVerticalPositionToTop(e,!1),this.viewer.updateClientAreaForBlock(e,!1)},t.prototype.updateVerticalPositionToTop=function(e,t){for(var i=0;i<e.getSplitWidgets().length;i++)for(var r=e.getSplitWidgets()[i],n=0;n<r.childWidgets.length;n++)for(var o=r.childWidgets[n],a=0;a<o.childWidgets.length;a++){var s=o.childWidgets[a];this.documentHelper.layout.updateCellVerticalPosition(s,t,!1)}},t.prototype.splitWidget=function(e,t,i,r,n,o,a,s){var l=e.childWidgets[0],d=e.paragraphFormat.keepLinesTogether&&this.viewer.clientActiveArea.y!==this.viewer.clientArea.y?e.height:this.getMaxElementHeight(l),h=e.getSplitWidgets(),c=e.containerWidget,d=this.getMaximumLineHeightToSplit(e,d,t),g=this.getFootNotesWidgetsInLine(l);if(G.isNullOrUndefined(e.previousWidget)&&0<g.length)for(var p=0;p<g.length;p++)for(var u=0;u<g[p].childWidgets.length;u++)d+=g[p].childWidgets[u].height;l=0;if(!G.isNullOrUndefined(s)&&0<s&&(l=s),t.clientActiveArea.height>=d+l&&!n&&!a){var f=void 0,s=h.indexOf(e);s<h.length-1?c=(f=h[s+1]).containerWidget:((f=new Z).index=e.index,f.characterFormat=e.characterFormat,f.paragraphFormat=e.paragraphFormat,f.width=e.width,f.x=e.x,f.y=e.y,h.push(f)),i===e.containerWidget||this.skipUpdateContainerWidget||this.updateContainerWidget(e,i,r,!0,o);for(p=e.childWidgets.length-1;0<p;p--){var m=e.childWidgets[p];if(this.isFitInClientArea(e,t,void 0)){1===f.childWidgets.length&&(this.updateParagraphWidgetInternal(m,f,0),this.skipUpdateContainerWidget=!0);break}m=e.childWidgets[p];this.updateParagraphWidgetInternal(m,f,0)}if(G.isNullOrUndefined(f.containerWidget)&&0<f.childWidgets.length){var l=t.clientActiveArea.y,n=new _(t.clientArea.x,t.clientArea.y,t.clientArea.width,t.clientArea.height),a=new _(t.clientActiveArea.x,t.clientActiveArea.y,t.clientActiveArea.width,t.clientActiveArea.height),y=e.bodyWidget.page,c=this.moveBlocksToNextPage(e,!1,-1);if((f.containerWidget=c).childWidgets.splice(0,0,f),y===c.page)return e.x!==e.containerWidget.x&&(e.x=e.containerWidget.x),e.y=l,t.updateClientArea(c,c.page),f=this.addParagraphWidget(this.viewer.clientActiveArea,f),!0;c.height+=f.height;s=this.getFootNoteWidgetsOf(f);if(c!=i&&this.moveFootNotesToPage(s,i,c),1===c.childWidgets.length&&c.firstChild instanceof Z&&c.firstChild.equals(e))return e.y=l,!0;t.clientArea=n,t.clientActiveArea=a}}else{h=!1,r=0,s=(t.columnLayoutArea.setColumns(i.sectionFormat),c=this.createOrGetNextBodyWidget(i,this.viewer),this.alignBlockElement(e));if(this.isInitialLoad||G.isNullOrUndefined(s.node)||e.isEndsWithPageBreak||e.isEndsWithColumnBreak||!G.isNullOrUndefined(e.previousSplitWidget)||(l=s.node instanceof $?this.splitRow(s.node):s.node).containerWidget instanceof Y&&l.containerWidget==i&&l.containerWidget.firstChild!==l&&(r=l instanceof Q?0:parseInt(s.position.index,10),h=!0,!G.isNullOrUndefined((e=l).nextRenderedWidget))&&e.nextRenderedWidget instanceof Z&&(this.keepWithNext=!0,this.documentHelper.blockToShift=e.nextRenderedWidget),e.containerWidget!==c||h){y=e.bodyWidget.page;if(e.height=this.getHeight(e),i!==(c=this.moveBlocksToNextPage(e,!0))){if(t.updateClientArea(c,c.page),0<r&&this.keepWithNext){this.viewer.updateClientAreaForBlock(e,!0);var v=void 0;e instanceof Q?this.addTableWidget(this.viewer.clientActiveArea,[e]):v=c.firstChild instanceof Z&&c.firstChild.equals(e)?c.firstChild:new Z,(v=this.moveChildsToParagraph(e,r,v)).containerWidget=c;for(var W=0;W<v.floatingElements.length;W++){var b=v.floatingElements[W];b.line.paragraph.bodyWidget!==e.bodyWidget&&"Inline"!==b.textWrappingStyle&&e.bodyWidget.floatingElements.splice(e.bodyWidget.floatingElements.indexOf(b),1)}e=v,-1===c.childWidgets.indexOf(e)&&c.childWidgets.splice(0,0,e),this.viewer.updateClientAreaLocation(e,this.viewer.clientActiveArea),this.layoutBlock(e,0,!0),this.viewer.updateClientAreaForBlock(e,!1)}else this.updateContainerWidget(e,c,0,!0),e instanceof Q?this.addTableWidget(this.viewer.clientActiveArea,[e]):this.addParagraphWidget(this.viewer.clientActiveArea,e);this.moveFootNotesToPage(o,i,c)}if(i.page===c.page)return i!==c||(t.updateClientArea(c,c.page),!1)}}return i===e.containerWidget?(e.y=t.clientActiveArea.y,t.cutFromTop(t.clientActiveArea.y+e.height)):t.updateClientArea(c,c.page),!1},t.prototype.getMaximumLineHeightToSplit=function(e,t,i){if(i.clientActiveArea.height>=t&&!e.paragraphFormat.keepLinesTogether&&e.paragraphFormat.widowControl&&!G.isNullOrUndefined(e.previousWidget)&&G.isNullOrUndefined(e.previousSplitWidget))for(var r=e.height,n=e.childWidgets.length-1;0<=n;n--){var o=e.childWidgets[n],a=this.getMaxElementHeight(o);if(o.height>a&&(r-=o.height-a),i.clientActiveArea.height>=r){0===n&&(t=e.height);break}r-=o.height}return t},t.prototype.moveFootNotesToPage=function(e,t,i){if(0<e.length&&t.page.footnoteWidget&&t.page!==i.page){for(var r=void 0,n=0,o=!1,a=0;a<e.length;a++)if(r=e[a],0<=(s=t.page.footnoteWidget.bodyWidgets.indexOf(r))){void 0===i.page.footnoteWidget&&this.addEmptyFootNoteToBody(i);for(var s,l,d=0;d<i.page.footnoteWidget.bodyWidgets.length;d++)i.page.footnoteWidget.bodyWidgets[d].footNoteReference===r.footNoteReference&&(o=!0);t.page.footnoteWidget.bodyWidgets.splice(s,1),i.page.footnoteWidget.bodyWidgets.indexOf(r)<0&&!o&&(i.page.footnoteWidget.bodyWidgets.length,s=this.documentHelper.pages.indexOf(t.page),l=this.documentHelper.pages.indexOf(i.page),r.containerWidget=i.page.footnoteWidget,r.page=i.page,l<s?(i.page.footnoteWidget.bodyWidgets.push(r),n++):i.page.footnoteWidget.bodyWidgets.splice(n++,0,r),i.page.footnoteWidget.height+=r.height),t.page.footnoteWidget.height-=r.height}t.page.footnoteWidget&&0===t.page.footnoteWidget.bodyWidgets.length&&(t.page.footnoteWidget=void 0),void 0!==t.page.footnoteWidget&&this.layoutfootNote(t.page.footnoteWidget),void 0!==i.page.footnoteWidget&&this.layoutfootNote(i.page.footnoteWidget)}},t.prototype.addEmptyFootNoteToBody=function(e){var t=new J,i=(t.footNoteType="Footnote",t.page=e.page,new Z),r=(i.characterFormat=new ce(void 0,this.documentHelper),i.paragraphFormat=new vl,i.index=0,new ad(i));i.childWidgets.push(r),t.height=this.documentHelper.textHelper.getParagraphMarkSize(i.characterFormat).Height,t.margin=new Hl(0,t.height,0,0),e.page.footnoteWidget=t},t.prototype.getMaxElementHeight=function(e){var t=0;if(G.isNullOrUndefined(e)||G.isNullOrUndefined(e.children))return 0;if(0===e.children.length||1===e.children.length&&e.children[0]instanceof se||2===e.children.length&&e.children[0]instanceof se&&e.children[1]instanceof se){t=this.getParagraphMarkSize(e.paragraph,0,0).height;t+=0,0<e.children.length&&t<(i=e.children[0]).margin.top+i.height&&(t=i.margin.top+i.height)}else for(var i,r=0;r<e.children.length;r++)t<(i=e.children[r]).margin.top+i.height&&(t=i.margin.top+i.height);return t},t.prototype.getParagraphMarkSize=function(e,t,i){var r,n,o=this.documentHelper.textHelper.getParagraphMarkSize(e.characterFormat),a=o.BaselineOffset,s=o.Height,l=a;return e instanceof Z&&(0<e.childWidgets.length&&e.childWidgets[0],r=this.getLineSpacing(e,s),n=this.getBeforeSpacing(e),t=l-a,i=s-l-(o.Height-a),"Multiple"===(l=e.paragraphFormat.lineSpacingType)?s<r?i+=r-s:t+=r-s:("Exactly"===l||r>t+o.Height+i)&&(t+=r-(t+o.Height+i)),t+=n,i+=this.getAfterSpacing(e)),{width:o.Width,height:o.Height,topMargin:t,bottomMargin:i}},t.prototype.createOrGetNextBodyWidget=function(e,t){t.columnLayoutArea.setColumns(e.sectionFormat);var i,r,n,o=t.columnLayoutArea.getNextColumnByBodyWidget(e);return G.isNullOrUndefined(o)?(o=0,o=this.documentHelper.pages.indexOf(e.page),n=i=void 0,n=e.index,(o===this.documentHelper.pages.length-1||this.documentHelper.pages[o+1].sectionIndex!==n?((r=new Y).sectionFormat=e.sectionFormat,r.index=e.index,i=t.createNewPage(r),this.documentHelper.pages[o+1].sectionIndex!==n&&this.documentHelper.insertPage(o+1,i),i):i=this.documentHelper.pages[o+1]).bodyWidgets[0]):this.createOrGetNextColumnBody(e)},t.prototype.isFitInClientArea=function(e,t,i){var r=e.childWidgets[e.childWidgets.length-1],e=e.height,n=this.getMaxElementHeight(r),o=(r.height>n&&(e-=r.height-n),0);if(!G.isNullOrUndefined(i)&&0<i.length){i[0].containerWidget instanceof J&&(o=i[0].containerWidget.margin.top);for(var a=0;a<i.length;a++)for(var s=0;s<i[a].childWidgets.length;s++)o+=i[a].childWidgets[s].height}return t.clientActiveArea.height>=e+o},t.prototype.isLineInFootNote=function(e,t){for(var i=0;i<t.length;i++)if(t[i].line===e)return!0;return!1},t.prototype.shiftToPreviousWidget=function(e,t,i,r,n){var o=e.containerWidget,a=i.containerWidget,s=[],l=[];a!==o&&(s=this.getFootNotesOfBlock(e));for(var d=0;d<e.childWidgets.length;d++){var h=e.childWidgets[d],c=this.getMaxElementHeight(h);if(this.isLineInFootNote(h,s)){for(var g=this.getFootNoteWidgetsBy(h.paragraph,s),p=0,u=0;u<g.length;u++)for(var f=g[u],m=0;m<f.childWidgets.length;m++)p+=f.childWidgets[m].height;0<g.length&&g[0].containerWidget&&(p+=g[0].containerWidget.margin.top),c+=p}if(!(t.clientActiveArea.height>=c)||r||n){var c=i.containerWidget,y=(t.updateClientArea(c,c.page),this.createOrGetNextBodyWidget(c,t));c!==(y=e.containerWidget!==y?this.moveBlocksToNextPage(e,!0):y)&&(0<(s=this.getFootNotesOfBlock(e)).length&&(l=l.concat(this.getFootNoteWidgetsBy(e,s)),a=y),this.updateContainerWidget(e,y,0,!0)),t.updateClientArea(y,y.page);break}if(0<s.length&&this.isLineInFootNote(h,s)&&(l=l.concat(this.getFootNoteWidgetsBy(h.paragraph,s))),this.updateParagraphWidgetInternal(h,i,i.childWidgets.length),d--,t.cutFromTop(t.clientActiveArea.y+h.height),G.isNullOrUndefined(e.childWidgets))break}!G.isNullOrUndefined(l)&&0<l.length&&o.page.footnoteWidget&&o!=a&&this.moveFootNotesToPage(l,o,a)},t.prototype.updateParagraphWidgetInternal=function(e,t,i){!G.isNullOrUndefined(e.paragraph)&&(e.paragraph.childWidgets.splice(e.paragraph.childWidgets.indexOf(e),1),e.paragraph.height-=e.height,G.isNullOrUndefined(e.paragraph.containerWidget)||(e.paragraph.containerWidget.height-=e.height),G.isNullOrUndefined(e.paragraph.childWidgets)||0===e.paragraph.childWidgets.length)&&e.paragraph.destroyInternal(this.viewer),!G.isNullOrUndefined(e.paragraph)&&0<e.paragraph.floatingElements.length&&this.shiftFloatingElements(e,t),t.childWidgets.splice(i,0,e),(e.paragraph=t).height+=e.height,G.isNullOrUndefined(t.containerWidget)||(t.containerWidget.height+=e.height)},t.prototype.shiftFloatingElements=function(e,t){for(var i,r=0;r<e.children.length;r++)((e.children[r]instanceof ne||e.children[r]instanceof oe)&&"Inline"===e.children[r].textWrappingStyle||"Inline"===e.children[r].textWrappingStyle)&&0<=(i=e.paragraph.floatingElements.indexOf(e.children[r]))&&(e.paragraph.floatingElements.splice(i,1),t.floatingElements.splice(i,0,e.children[r]))},t.prototype.shiftNextWidgets=function(e){for(var t=e;t.nextWidget instanceof Yl;){if(t=t.nextWidget,this.viewer instanceof Tl&&!this.isMultiColumnSplit&&1<t.bodyWidget.sectionFormat.columns.length){var i=this.getBodyWidget(t.bodyWidget,!1);if(!G.isNullOrUndefined(i.nextRenderedWidget)&&i.page===i.nextRenderedWidget.page){this.splitBodyWidgetBasedOnColumn(t.bodyWidget);break}}this.reLayoutOrShiftWidgets(t,this.viewer)}},t.prototype.updateContainerWidget=function(e,t,i,r,n){if(!(e.containerWidget&&e.containerWidget.containerWidget instanceof J)){var o=e.containerWidget;if(G.isNullOrUndefined(e.containerWidget)||(e.containerWidget.childWidgets.splice(e.containerWidget.childWidgets.indexOf(e),1),e.containerWidget.height-=t.height,o&&o.page&&o.page.footnoteWidget&&n&&0<n.length&&this.moveFootNotesToPage(n,o,t),(G.isNullOrUndefined(e.containerWidget.childWidgets)||0===e.containerWidget.childWidgets.length)&&e.containerWidget instanceof Y&&e.containerWidget!==t&&r&&(n=e.containerWidget.page,this.documentHelper.pages[this.documentHelper.pages.length-1]===n&&-1!==this.viewer.visiblePages.indexOf(n)&&this.documentHelper.scrollToBottom(this.documentHelper.selectionPage),G.isNullOrUndefined(n.endnoteWidget))&&(G.isNullOrUndefined(n.nextPage)||n.nextPage.bodyWidgets[0].index!==e.containerWidget.index)&&(o=e.containerWidget,!G.isNullOrUndefined(o.nextRenderedWidget)&&1<o.nextRenderedWidget.sectionFormat.columns.length&&(o.nextRenderedWidget.columnIndex=o.columnIndex),e.containerWidget.destroyInternal(this.viewer))),t.childWidgets.splice(i,0,e),e instanceof Z&&!G.isNullOrUndefined(e.floatingElements))for(var a=0;a<e.floatingElements.length;a++){var s=e.floatingElements[a];"Inline"!==s.textWrappingStyle&&(t.floatingElements.push(s),e.bodyWidget.floatingElements.splice(e.bodyWidget.floatingElements.indexOf(s),1),t.floatingElements.sort(function(e,t){return e.y-t.y}))}e instanceof Q&&e.wrapTextAround&&-1!==e.bodyWidget.floatingElements.indexOf(e)&&e.bodyWidget.floatingElements.splice(e.bodyWidget.floatingElements.indexOf(e),1),t.height+=t.height,e.containerWidget=t,e instanceof Z&&this.updateParaOnBeforeSpacing(e,e.bodyWidget,!0)}},t.prototype.getBodyWidgetOfPreviousBlock=function(e,t){var i=void 0,r=e.previousRenderedWidget,i=r&&r.containerWidget.equals(e.containerWidget)?r.containerWidget:e instanceof Q&&!G.isNullOrUndefined(e.containerWidget.previousRenderedWidget)&&e.containerWidget.index===e.containerWidget.previousRenderedWidget.index?e.containerWidget.previousRenderedWidget:e.containerWidget;return t=r&&r.containerWidget.equals(e.containerWidget)?i.childWidgets.indexOf(r):e.containerWidget.childWidgets.indexOf(e),{bodyWidget:i,index:t}},t.prototype.moveBlocksToNextPage=function(e,t,i,r,n,o,a){var s=e.bodyWidget,l=(this.viewer.columnLayoutArea.setColumns(s.sectionFormat),this.viewer.columnLayoutArea.getNextColumnByBodyWidget(e.bodyWidget)),d=void 0,h=void 0;if(!(G.isNullOrUndefined(l)||a&&e instanceof Z&&e.isEndsWithPageBreak)&&((h=this.moveToNextColumnByBodyWidget(e,i)).columnIndex=l.index,h.y=e.bodyWidget.y,this.viewer.updateClientArea(h,h.page),this.viewer.clientActiveArea.height-=h.y-this.viewer.clientActiveArea.y,this.viewer.clientActiveArea.y=h.y,1<e.bodyWidget.sectionFormat.columns.length))for(var a=e.bodyWidget.columnIndex,c=e.bodyWidget.x+e.bodyWidget.sectionFormat.columns[a].width+e.bodyWidget.sectionFormat.columns[a].space,g=0;g<e.bodyWidget.floatingElements.length;g++)(e.bodyWidget.floatingElements[g]instanceof ne||e.bodyWidget.floatingElements[g]instanceof oe)&&c<e.bodyWidget.floatingElements[g].x+e.bodyWidget.floatingElements[g].width&&h.floatingElements.push(e.bodyWidget.floatingElements[g]);if(G.isNullOrUndefined(h)){i=!1,l=s.page,a=l.index+1;if(this.documentHelper.pages.length>a&&!this.isMultiColumnLayout&&(d=this.documentHelper.pages[a],!n||G.isNullOrUndefined(d)||G.isNullOrUndefined(d.endnoteWidget)?!G.isNullOrUndefined(d)&&0!==d.bodyWidgets.length&&s.equals(d.bodyWidgets[0])&&"NoBreak"===s.sectionFormat.breakCode?d.bodyWidgets[0].index===s.index?(h=d.bodyWidgets[0],this.viewer.updateClientArea(h,h.page)):(h=this.createSplitBody(s),d.bodyWidgets.splice(0,0,h),h.page=d,this.viewer.updateClientArea(h,h.page),h.y=this.viewer.clientActiveArea.y):0===d.bodyWidgets.length||!s.equals(d.bodyWidgets[0])||s.sectionIndex!==d.bodyWidgets[0].sectionIndex&&("NewPage"===s.sectionFormat.breakCode||!s.isWord2010NextColumn&&"NoBreak"!==s.sectionFormat.breakCode)?i=!(d=void 0):(h=d.bodyWidgets[0],this.viewer.updateClientArea(h,h.page)):d.endnoteWidget.bodyWidgets[0].index===s.index?(h=d.endnoteWidget.bodyWidgets[0],this.viewer.updateClientArea(h,h.page)):(h=this.createSplitBody(s),(u=new J).footNoteType="Endnote",u.page=d,u.bodyWidgets.push(h),h.containerWidget=u,h.page=d,this.viewer.updateClientArea(h,h.page),h.y=this.viewer.clientActiveArea.y)),this.isMultiColumnLayout&&(i=!0),G.isNullOrUndefined(d)&&(h=this.createSplitBody(s),(this.documentHelper.editorProperties.isRedoing&&"SectionBreakContinuous"===this.documentHelper.editorProperties.action&&"NoBreak"===e.bodyWidget.sectionFormat.breakCode||r)&&e.bodyWidget.sectionFormat.numberOfColumns<=1||(n?(u=l.bodyWidgets[s.page.bodyWidgets.length-1],r=this.createSplitBody(u),d=this.viewer.createNewPage(r,a),this.viewer.updateClientArea(r,r.page),r.y=h.y=this.viewer.clientActiveArea.y,h.page=d):(n=this.isRTLLayout,this.isRTLLayout=!1,d=this.viewer.createNewPage(h,a),this.isRTLLayout=n,this.viewer.updateClientArea(h,h.page),h.y=this.viewer.clientActiveArea.y)),i&&!G.isNullOrUndefined(d)&&this.documentHelper.insertPage(a,d),this.clearLineMeasures()),d)for(;;){var p=s.page.bodyWidgets[s.page.bodyWidgets.length-1];if(this.isSectionBreakCont||s===p||s.containerWidget instanceof J)break;s.page.bodyWidgets.splice(s.page.bodyWidgets.indexOf(p),1),d.bodyWidgets.splice(1,0,p),p.page=d}}if(this.isTextFormat){var l=s.childWidgets.indexOf(e)+1,u=s.childWidgets.slice(l);s.childWidgets.splice(l);for(var f=0,m=u;f<m.length;f++){var y=m[f];h.childWidgets.push(y),y.containerWidget=h}}else{var v=s.lastChild;if(!this.isRelayout&&G.isNullOrUndefined(v.nextSplitWidget)&&v instanceof Z){for(var W=0,g=0;g<v.childWidgets.length;g++)W+=v.childWidgets[g].height;v.height<W&&(v.height=W)}for(;;){var b,x=void 0,x=s.lastChild instanceof J?s.lastChild.previousWidget:s.lastChild;if((t||o&&e!==x&&!(x instanceof Q)&&x.isLayouted)&&(b=this.getFootNoteWidgetsOf(x),this.moveFootNotesToPage(b,s,h)),e===x)break;if(s.childWidgets.splice(s.childWidgets.indexOf(x),1),h.childWidgets.splice(0,0,x),x instanceof Q&&-1!==s.floatingElements.indexOf(x)&&s.floatingElements.splice(s.floatingElements.indexOf(x),1),x instanceof Z&&0<x.floatingElements.length)for(var w=0;w<x.floatingElements.length;w++)-1!==s.floatingElements.indexOf(x.floatingElements[w])&&"Inline"!==x.floatingElements[w].textWrappingStyle&&(s.floatingElements.splice(s.floatingElements.indexOf(x.floatingElements[w]),1),h.floatingElements.push(x.floatingElements[w]));(x.containerWidget=h).height+=x.height}}return h},t.prototype.createSplitBody=function(e){var t=this.addBodyWidget(this.viewer.clientActiveArea);return t.sectionFormat=e.sectionFormat,t.index=e.index,t},t.prototype.createOrGetNextColumnBody=function(e){var t;return e.nextRenderedWidget&&e.columnIndex+1===e.nextRenderedWidget.columnIndex&&(t=e.nextRenderedWidget),G.isNullOrUndefined(t)&&((t=new Y).sectionFormat=e.sectionFormat,t.index=e.index,t.page=e.page,t.y=e.y,e.containerWidget instanceof J?(e.containerWidget.bodyWidgets.splice(e.containerWidget.bodyWidgets.indexOf(e)+1,0,t),t.containerWidget=e.containerWidget):e.page.bodyWidgets.splice(e.page.bodyWidgets.indexOf(e)+1,0,t)),t},t.prototype.getParagraphBaseX=function(e){var t=e.containerWidget,e=K.convertPointToPixel(e.bidi?e.rightIndent:e.leftIndent);return t.x+e},t.prototype.reLayoutParagraphAfterHidden=function(e){var t,i;e.nextSplitWidget||(t=e.nextWidget)instanceof Z&&!t.isEmpty()&&0!==t.childWidgets.length&&!t.isInsideTable&&(i=t.x!==this.getParagraphBaseX(t),this.isMergedWithNextParagraph(e)||i)&&this.reLayoutLine(t,0,!1,!0,!0)},t.prototype.moveToNextColumnByBodyWidget=function(e,t){e=e.containerWidget;return this.createOrGetNextColumnBody(e)},t.prototype.reLayoutLine=function(e,t,i,r,n,o){this.documentHelper.editorProperties.isFootnoteElementRemoved||(this.isFootnoteContentChanged=!1),this.documentHelper.editorProperties.isDocumentLoaded&&!n&&this.updateWholeListItems(e),n=e.paragraphFormat.listFormat&&-1!==e.paragraphFormat.listFormat.listId?e.getSplitWidgets()[0].firstChild:e.childWidgets[t],e.containerWidget instanceof Y&&1<e.containerWidget.sectionFormat.numberOfColumns&&e.containerWidget.sectionFormat.equalWidth&&(a=n.previousLine),G.isNullOrUndefined(a)&&(a=!G.isNullOrUndefined(o)&&!G.isNullOrUndefined(n.previousLine)&&n.previousLine.indexInOwner<n.indexInOwner?n.previousLine:n),!this.allowLayout||this.owner.editorProperties.enableSpellCheck&&this.owner.editorProperties.skipChangeDetection||(a.paragraph.splitTextRangeByScriptType(a.indexInOwner),a.paragraph.splitLtrAndRtlText(a.indexInOwner),a.paragraph.combineconsecutiveRTL(a.indexInOwner));var a,t=e.containerWidget,o=(t.height-=e.height,!this.documentHelper.editorProperties.enableHeaderAndFooter&&!e.isInHeaderFooter||t instanceof P?t instanceof P?this.viewer.updateClientAreaForTextBoxShape(t.containerShape,!0):this.viewer.updateClientArea(t,t.page,!0):(e.bodyWidget.isEmpty=!1,this.viewer.updateHeaderFooterClientAreaWithTop(e.bodyWidget.sectionFormat,this.documentHelper.isBlockInHeader(e),t.page)),this.viewer.updateClientAreaForBlock(e,!0),0);if(e.containerWidget instanceof Y&&(o=(l=e.getSplitWidgets())[l.length-1].containerWidget.page.index),!G.isNullOrUndefined(e.containerWidget)&&!G.isNullOrUndefined(e.containerWidget.containerWidget)&&e.containerWidget.containerWidget instanceof J)d=e.bodyWidget.containerWidget.y,this.viewer.cutFromTop(d),this.documentHelper.editorProperties.isFootNoteInsert=!0,this.layoutfootNote(e.containerWidget.containerWidget),this.documentHelper.editorProperties.isFootNoteInsert=!1;else{if(a.paragraph.isEmptyInternal(!0)&&G.isNullOrUndefined(a.paragraph.nextSplitWidget))this.viewer.cutFromTop(e.y),this.layoutParagraph(e,0);else{if(0===a.children.length&&a.isLastLine()&&!G.isNullOrUndefined(a.previousLine)&&a.previousLine.isEndsWithLineBreak)this.updateClientAreaForLine(a),this.layoutEmptyLineWidget(e,!0,a);else{this.updateClientAreaForLine(a),this.layoutListItems(a.paragraph),a.isFirstLine()&&!G.isNullOrUndefined(e.paragraphFormat)&&(n=-K.convertPointToPixel(e.paragraphFormat.firstLineIndent),this.viewer.updateClientWidth(n));t=e.previousWidget;for(a.isFirstLine()&&!e.previousSplitWidget&&t instanceof Z&&this.isMergedWithNextParagraph(t)&&(e.x=this.viewer.clientActiveArea.x,n=Math.max(0,this.getMergedParagraphOffset(e)),e.x+=n,this.mergedParagraph=e,this.mergedParagraphOffset=n,this.viewer.updateClientWidth(-n));e=(a=this.layoutLine(a,0)).paragraph,a=a.nextLine;);}this.updateWidgetToPage(this.viewer,e)}this.isMergedWithNextParagraph(e)&&(e.height=0,this.viewer.clientActiveArea.y=e.y),this.viewer.updateClientAreaForBlock(e,!1);var s,l,d,t=0,n=(e.containerWidget instanceof Y&&(t=(l=e.getSplitWidgets())[l.length-1].containerWidget.page.index),this.layoutNextItemsBlock(e,this.viewer,void 0,o!==t),this.reLayoutParagraphAfterHidden(e),e.getSplitWidgets()[0].previousRenderedWidget),n=(G.isNullOrUndefined(n)||e.isEndsWithPageBreak||e.isEndsWithColumnBreak||n instanceof Z&&(!(n instanceof Z)||n.isEndsWithPageBreak||n.isEndsWithColumnBreak)||(this.viewer.cutFromTop(e.y+e.height),e.containerWidget===n.containerWidget)||G.isNullOrUndefined(n.containerWidget)||(l=e.containerWidget,o=n.containerWidget,t=this.getFootNoteWidgetsOf(e),G.isNullOrUndefined(o.page.footnoteWidget))||this.moveFootNotesToPage(t,o,l),this.documentHelper.pages.length),t=this.documentHelper.pages[n-1],o=t.bodyWidgets[t.bodyWidgets.length-1];!this.documentHelper.editorProperties.isFootnoteElementRemoved&&!this.isFootnoteContentChanged||G.isNullOrUndefined(e.bodyWidget.page.footnoteWidget)||(s=e.bodyWidget.page.footnoteWidget,this.layoutfootNote(s)),this.documentHelper.editorProperties.isRedoing&&!G.isNullOrUndefined(o.page.endnoteWidget)&&(this.isEndnoteContentChanged=!0),!this.documentHelper.editorProperties.isEndnoteElementRemoved&&!this.isEndnoteContentChanged||G.isNullOrUndefined(o.page.endnoteWidget)||(s=o.page.endnoteWidget,l=this.viewer.clientArea.clone(),n=this.viewer.clientActiveArea.clone(),d=o.y,0<o.childWidgets.length&&(d=(t=o.childWidgets[o.childWidgets.length-1]).y+t.height),this.viewer.clientActiveArea.height=this.viewer.clientActiveArea.bottom-d,this.viewer.clientActiveArea.x=this.viewer.clientArea.x,this.viewer.clientActiveArea.width=this.viewer.clientArea.width,this.viewer.clientActiveArea.y=d,this.layoutfootNote(s),this.viewer.clientArea=l,this.viewer.clientActiveArea=n),this.documentHelper.editorProperties.isRedoing&&(this.isEndnoteContentChanged=!1)}},t.prototype.isContainsRtl=function(e){if(this.documentHelper.editorProperties.isSelectionChangedOnMouseMoved&&!this.isDocumentContainsRtl)return!1;for(var t=!1,i=0;i<e.children.length;i++)if(e.children[i]instanceof ie&&(t=e.children[i].characterFormat.bidi||"RTL"===e.children[i].characterFormat.bdo||this.documentHelper.textHelper.isRTLText(e.children[i].text))){this.isDocumentContainsRtl||(this.isDocumentContainsRtl=t);break}return t},t.prototype.shiftElementsForRTLLayouting=function(e,t){var i=this.hasTextRangeBidi(e);if(this.isContainsRTLText(e)||t||i){for(var r=[],n=[],o=0;o<e.children.length;o++){var a,s,l,d=e.children[o];d instanceof ie&&0<d.height&&!d.isPageBreak&&"\v"!==d.text?(n.push((l=d).characterFormat.bidi),"\t"==l.text?r.push(j.CharacterRangeType.Tab):r.push(l.characterRange),d.isRightToLeft=r[r.length-1]==j.CharacterRangeType.RightToLeft||r[r.length-1]==j.CharacterRangeType.WordSplit&&l.characterFormat.bidi):d instanceof ac||d instanceof Md||d instanceof Ch||d instanceof xh||d instanceof zd||d instanceof te?(s=this.isStartMarker(d),a=this.isEndMarker(d),s&&o<e.children.length-1?(s=this.getNextValidWidget(o+1,e),!G.isNullOrUndefined(s)&&s instanceof ie&&0<s.height?(n.push((l=s).characterFormat.bidi),"\t"===s.text?r.push(j.CharacterRangeType.Tab):r.push(l.characterRange)):(n.push(!1),r.push(j.CharacterRangeType.LeftToRight))):!a&&0<o?(n.push(n[n.length-1]),r.push(r[r.length-1])):(n.push(!1),r.push(j.CharacterRangeType.LeftToRight))):d instanceof se&&t?(n.push(t),r.push(j.CharacterRangeType.RightToLeft)):(n.push(!1),r.push(j.CharacterRangeType.LeftToRight))}for(var h=-1,c=void 0,o=0;o<r.length;o++)if(o+1<n.length&&n[o]!=n[o+1])-1!=h&&(this.updateCharacterRange(e,o,h,n,r),h=-1),c=null;else{if(0<o&&o!=r.length-1&&r[o]==j.CharacterRangeType.WordSplit&&n[o]&&r[o-1]==j.CharacterRangeType.Number&&n[o-1]&&r[o+1]==j.CharacterRangeType.Number&&n[o+1]&&this.isNumberNonReversingCharacter(e.children[o]))r[o]=j.CharacterRangeType.Number;else if(r[o]==j.CharacterRangeType.RightToLeft||r[o]==j.CharacterRangeType.LeftToRight||r[o]==j.CharacterRangeType.Number&&-1!=h||(G.isNullOrUndefined(c)||!c)&&n[o])if(-1==h&&r[o]!=j.CharacterRangeType.LeftToRight)h=o;else{if(-1==h){r[o]==j.CharacterRangeType.LeftToRight?c=!0:r[o]==j.CharacterRangeType.RightToLeft&&(c=!1);continue}r[o]==j.CharacterRangeType.LeftToRight&&(this.updateCharacterRange(e,o,h,n,r),h=r[o]==j.CharacterRangeType.RightToLeft||r[o]==j.CharacterRangeType.Number&&-1!=h?o:-1)}r[o]==j.CharacterRangeType.LeftToRight?c=!0:r[o]==j.CharacterRangeType.RightToLeft&&(c=!1)}if(-1!=h&&h<r.length-1&&(this.updateCharacterRange(e,r.length-1,h,n,r),h=-1),r.length!=e.children.length)throw new Error("Splitted Widget count mismatch while reordering layouted child widgets of a line");i=this.reorderElements(e,r,n,t);(r.length=n.length=0)<e.children.length&&(e.layoutedElements=i)}return t},t.prototype.isNumberNonReversingCharacter=function(e){if(e instanceof ie){if(!e.characterFormat.hasValueWithParent("localeIdBidi"))return Lc.isNumberNonReversingCharacter(e.text,e.characterFormat.bidi);var t=e.text.charCodeAt(0);if(47==t&&!this.isNumberReverseLangForSlash(e.characterFormat.localeIdBidi)||(35==t||36==t||37==t||43==t||45==t)&&!this.isNumberReverseLangForOthers(e.characterFormat.localeIdBidi)||44==t||46==t||58==t||1548==t)return!0}return!1},t.prototype.isNumberReverseLangForSlash=function(e){return this.isNumberReverseLangForOthers(e)||6145==e||1164==e||1125==e||1120==e||1123==e||1065==e||2137==e||1114==e||1119==e||1152==e||1056==e},t.prototype.isNumberReverseLangForOthers=function(e){return 14337==e||15361==e||5121==e||3073==e||2049==e||11265==e||13313==e||12289==e||4097==e||8193==e||16385==e||1025==e||10241==e||7169==e||9217==e},t.prototype.isStartMarker=function(e){return e instanceof ac?0===e.commentType:e instanceof Md?0===e.bookmarkType:e instanceof Ch||(e instanceof zd?0===e.type:e instanceof te&&0===e.fieldType)},t.prototype.isEndMarker=function(e){return e instanceof ac?1===e.commentType:e instanceof Md?1===e.bookmarkType:e instanceof Ch||(e instanceof zd?1===e.type:e instanceof te&&1===e.fieldType)},t.prototype.getNextValidWidget=function(e,t){for(var i=e;i<t.children.length;i++){var r=t.children[i];if(!(r instanceof ac||r instanceof Md||r instanceof Ch||r instanceof xh||r instanceof zd||r instanceof te))return r[i]}return null},t.prototype.hasTextRangeBidi=function(e){for(var t=0;t<e.children.length;t++){var i=e.children[t];if(i instanceof ie)if(i.characterFormat.bidi)return!0}return!1},t.prototype.isContainsRTLText=function(e){for(var t=e.paragraph.bodyWidget.page.documentHelper.textHelper,i=!1,r=0;r<e.children.length&&!(e.children[r]instanceof ie&&(i=e.children[r].characterFormat.bidi||1==e.children[r].characterFormat.bidi||t.isRTLText(e.children[r].text)));r++);return i},t.prototype.updateCharacterRange=function(e,t,i,r,n){var o=t;if(!r[t]&&(n[t]===j.CharacterRangeType.LeftToRight&&o--,"StandardContextual"!==this.documentHelper.characterFormat.ligature))for(var a=o;i<=a;a--)if(n[a]!=j.CharacterRangeType.WordSplit){o=a;break}for(var s,l,a=i;a<=o;a++)n[a]==j.CharacterRangeType.WordSplit&&(n[a]=j.CharacterRangeType.RightToLeft|j.CharacterRangeType.WordSplit,l=a+1,0<=(s=a-1))&&l<n.length&&n[s]==j.CharacterRangeType.RightToLeft&&(n[l]==j.CharacterRangeType.RightToLeft||n[l]==j.CharacterRangeType.Number)&&e.children[a]instanceof ie&&"Times New Roman"==(s=e.children[a]).characterFormat.fontFamilyBidi&&(l=s.text.split("").reverse().join(""),s.text=l)},t.prototype.isPageOrNumPageField=function(e){function t(e){return!!e&&void 0!==e.fieldType}var i;if(t(e))i=0===e.fieldType?e:e.fieldBegin;else for(var r=e.previousElement,n=0;r;){if(t(r))if(1===r.fieldType)n++;else if(0===r.fieldType){if(0===n){i=r;break}n--}r=r.previousElement}if(!i)return!1;for(var o="",a=i.nextElement;a&&!t(a);)"string"==typeof a.text&&(o+=a.text),a=a.nextElement;return/^\s*(NUMPAGES|PAGE)(\s|$)/i.test(o)},t.prototype.isNeedToConsiderPagefieldAsBidi=function(e,t,i){e=e.paragraph;return!G.isNullOrUndefined(e)&&e.isInHeaderFooter&&t&&this.isPageOrNumPageField(i)},t.prototype.reorderElements=function(e,t,i,r){for(var n=0,o=-1,a=0,s=0,l=[],d=j.CharacterRangeType.LeftToRight,h=!1,c=0;c<e.children.length;c++){var g,p=e.children[c],u=p,f=(u.characterRange=t[c],(u.characterRange&j.CharacterRangeType.RightToLeft)==j.CharacterRangeType.RightToLeft||u.characterRange==j.CharacterRangeType.Number),m=this.isNeedToConsiderPagefieldAsBidi(e,h,p),y=i[c]||m,m=(p instanceof Ud&&(p.isRtlPageNumber=m&&!i[c]),u.text);if(G.isNullOrUndefined(m)||0==(u.characterRange&j.CharacterRangeType.WordSplit)||(g=-1!==m.indexOf("‏"),m=m.replace(/[\u200E\u200F]/g,"").trim(),/[.,\u060C]/.test(m)&&d!==j.CharacterRangeType.Number&&g&&(f=d==j.CharacterRangeType.RightToLeft)),t[c]==j.CharacterRangeType.Tab){if(r){d=j.CharacterRangeType.LeftToRight,h=!(o=-1),l.splice(n=0,a=0,p);continue}y=y&&!1}0<c&&h!=y&&(r?(o=-1,a=n=0):o=l.length-1,s=0),y||f?f||y&&u.characterRange==j.CharacterRangeType.WordSplit&&(d==j.CharacterRangeType.RightToLeft||this.isInsertWordSplitToLeft(t,i,c))?(a++,n=o+1,u.characterRange==j.CharacterRangeType.Number&&(d==j.CharacterRangeType.Number&&(n+=s),s++),l.splice(n,0,p)):(l.splice(n,0,p),n++,a=0):(r?(0<a&&h==y&&(n+=a),l.splice(n,0,p),n++):(l.push(p),n=c+1),a=0,o=r?n-1:l.length-1),u.characterRange!=j.CharacterRangeType.Number&&(s=0),u.characterRange!=j.CharacterRangeType.WordSplit&&(d=u.characterRange),h=y}return l},t.prototype.isInsertWordSplitToLeft=function(e,t,i){for(var r=i+1;r<e.length;r++){if((e[r]&j.CharacterRangeType.RightToLeft)==j.CharacterRangeType.RightToLeft)return!0;if(e[r]==j.CharacterRangeType.LeftToRight)return!t[r]}return!0},t.prototype.shiftLayoutFloatingItems=function(e){for(var t=0;t<e.floatingElements.length;t++){var i=e.floatingElements[t],r=this.getFloatingItemPoints(i),n=r.y-i.y;if(i.x=r.x,i.y=r.y,i instanceof ne)for(var o=0;o<i.textFrame.childWidgets.length;o++){var a=i.textFrame.childWidgets[o];a instanceof Z?a.y=a.y+n:a instanceof Q&&this.shiftChildLocationForTableWidget(a,n)}}},t.prototype.getFloatingItemPoints=function(e){var t=e.line.paragraph;if(G.isNullOrUndefined(t)||G.isNullOrUndefined(t.bodyWidget)||G.isNullOrUndefined(t.bodyWidget.sectionFormat))return new Ks(0,0);var i=t.bodyWidget.sectionFormat,r=0,n=0;if(t){var o=K.convertPointToPixel(i.leftMargin),a=K.convertPointToPixel(i.rightMargin),s=K.convertPointToPixel(i.topMargin),l=0<i.bottomMargin?K.convertPointToPixel(i.bottomMargin):48,d=K.convertPointToPixel(i.headerDistance),h=K.convertPointToPixel(i.footerDistance),c=K.convertPointToPixel(i.pageWidth),g=K.convertPointToPixel(i.pageHeight),p=c-(o+a),u=g-s-l,s=t.isInHeaderFooter&&i.topMargin<=0?0<Math.abs(s)?Math.abs(s):K.convertPointToPixel(i.headerDistance)+t.height:0<s?s:48,f=(!t.isInHeaderFooter&&s<this.viewer.clientArea.y&&(s=this.viewer.clientArea.y),"InFrontOfText"),m=!1,y=e.verticalOrigin,v=e.horizontalOrigin,W=e.horizontalAlignment,b=e.verticalAlignment,x=e.verticalRelativePercent,w=(e.horizontalRelativePercent,e.height),F=e.width,C=e.verticalPosition,P=e.horizontalPosition,T=e.layoutInCell,O=e.heightRelativePercent,S=e.widthRelativePercent,N=void 0;if((e instanceof ne||e instanceof oe)&&(N=e.autoShapeType),t.isInsideTable&&T)m=!0,n=this.getVerticalPosition(e,C,y,f),r=this.getHorizontalPosition(e.width,e,W,v,P,f,t.associatedCell.cellFormat.cellWidth);else if(this.documentHelper.viewer instanceof Nl)n="Line"===y?this.documentHelper.editorProperties.getTop(e.line):this.viewer.clientActiveArea.y,r="Character"===v?this.viewer.clientActiveArea.x:"Center"===W?this.viewer.clientArea.width/2-e.width/2:this.viewer.clientArea.x;else{switch(y){case"Page":case"TopMargin":switch(n=C,b){case"Top":n=C;break;case"Center":"TopMargin"===y?n=(s-w)/2:0<O&&0<S?(n=(g-g*(O/100))/2,e.height=g*(O/100)):n=(g-w)/2;break;case"Outside":case"Bottom":n="Page"===y&&"Bottom"===b?g-w:"TopMargin"===y?s-w:(t.bodyWidget.page.index+1)%2!=0?g-w-h/2:d/2;break;case"Inside":"Page"===y?n=(t.bodyWidget.page.index+1)%2==0?g-w-h/2:d/2:(t.bodyWidget.page.index+1)%2==0&&(n=(s-w)/2-d);break;case"None":n=0<x&&Math.abs(x)<=1e3?g*(x/100):C}break;case"Line":switch(n=C,b){case"Inside":case"Top":n=this.viewer.clientActiveArea.y;break;case"Center":n=this.viewer.clientActiveArea.y-w/2;break;case"Outside":case"Bottom":n=this.viewer.clientActiveArea.y-w;break;case"None":n=this.viewer.clientActiveArea.y+C}break;case"BottomMargin":switch(n=C,b){case"Inside":case"Top":n=g-l;break;case"Center":n=g-l+(l-w)/2;break;case"Outside":case"Bottom":n=t.bodyWidget.page.index+1!==0&&"Outside"===b?g-l:g-w;break;case"None":n=g-l+C}break;case"InsideMargin":case"OutsideMargin":switch(n=C,b){case"Inside":n="InsideMargin"===y?t.bodyWidget.page.index+1===0?g-w:0:(t.bodyWidget.page.index+1)%2!=0?g-l:s-w;break;case"Top":n="InsideMargin"===y?(t.bodyWidget.page.index+1)%2==0?g-l:0:(t.bodyWidget.page.index+1)%2!=0?g-l:0;break;case"Center":n="OutsideMargin"===y?(t.bodyWidget.page.index+1)%2!=0?g-l+(l-w)/2:(s-w)/2:(t.bodyWidget.page.index+1)%2==0?g-l+(l-w)/2:(s-w)/2;break;case"Outside":n="InsideMargin"===y?(t.bodyWidget.page.index+1)%2==0?g-l:s-w:(t.bodyWidget.page.index+1)%2!=0?s-w:g-l;break;case"Bottom":n="OutsideMargin"===y?t.bodyWidget.page.index+1!==0?g-w:s-w:(t.bodyWidget.page.index+1)%2==0?g-w:s-w}break;case"Paragraph":n=Math.round(t.y)+0+C;break;case"Margin":switch(n=t.isInHeaderFooter&&s<d?d+t.height+C:s+C,b){case"Top":n=s;break;case"Center":n=s+(u-w)/2;break;case"Outside":case"Bottom":n=(t.bodyWidget.page.index+1)%2!=0?s+u-w:s;break;case"Inside":n=(t.bodyWidget.page.index+1)%2==0?s+u-w:s}break;default:n=this.viewer.clientArea.y-C}switch(v){case"Page":switch(r=P,W){case"Center":m?r=(t.associatedCell.cellFormat.cellWidth-F)/2:0<O&&0<S?(r=(c-c*(S/100))/2,e.width=c*(S/100)):r=(c-F)/2;break;case"Left":r=0;break;case"Outside":case"Right":r=m?t.associatedCell.cellFormat.cellWidth-F:c-F;break;case"None":r=m?t.associatedCell.x+P:(e instanceof ne||0 instanceof oe,P)}r<0&&m&&(r=t.associatedCell.x);break;case"Column":var I=!1,r=!(this.viewer.clientActiveArea.x<t.x)&&!e.paragraph.isInsideTable&&("StraightConnector"===N||"Rectangle"===N||e instanceof ae)?(I=!0,P+t.bodyWidget.x):t.x+P;switch(t.paragraphFormat.leftIndent&&!I&&(r-=K.convertPointToPixel(t.leftIndent)),W){case"Center":r=this.viewer.clientActiveArea.x+(this.viewer.clientActiveArea.width-F)/2;break;case"Left":r=this.viewer.clientActiveArea.x;break;case"Right":r=this.viewer.clientActiveArea.x+this.viewer.clientActiveArea.width-F}break;case"Margin":if(t.bodyWidget){switch(r=o+P,W){case"Center":r=o+(p-F)/2;break;case"Left":r=o;break;case"Outside":(t.bodyWidget.page.index+1)%2!=0&&(r=o+p-F);break;case"Right":r=o+p-F;break;case"Inside":(t.bodyWidget.page.index+1)%2==0&&(r=o+p-F)}(e instanceof ae||e instanceof ne||e instanceof oe)&&t.bodyWidget.floatingElements&&"InFrontOfText"!==e.textWrappingStyle&&"Behind"!==e.textWrappingStyle&&(r=(I=this.adjustPositionForFloatingTableCollision(r,n,e,c)).x,n=I.y)}else r=this.viewer.clientArea.x+P;break;case"Character":r="Right"===W||"Center"===W?this.getLeftMarginHorizPosition(o,W,P,F,f):this.viewer.clientActiveArea.x+P;break;case"LeftMargin":r=this.getLeftMarginHorizPosition(o,W,P,F,f);break;case"RightMargin":r=this.getRightMarginHorizPosition(c,a,W,P,F,f);break;case"InsideMargin":r=(t.bodyWidget.page.index+1)%2==0?this.getRightMarginHorizPosition(c,a,W,P,F,f):this.getLeftMarginHorizPosition(o,W,P,F,f);break;case"OutsideMargin":r=(t.bodyWidget.page.index+1)%2==0?this.getLeftMarginHorizPosition(o,W,P,F,f):this.getRightMarginHorizPosition(c,a,W,P,F,f);break;default:r=this.viewer.clientArea.x+P}}!t||"Paragraph"!==y&&"Line"!==y||"InFrontOfText"===e.textWrappingStyle||"Behind"===e.textWrappingStyle||"Word2013"!==this.documentHelper.compatibilityMode||t.isInHeaderFooter||(n=n+e.height>this.viewer.clientArea.bottom?this.viewer.clientArea.bottom-e.height:n)<i.topMargin&&(n=i.topMargin)}return new Ks(r,n)},t.prototype.adjustPositionForFloatingTableCollision=function(e,t,i,r){var n={x:e,y:t},o=i.paragraph.bodyWidget;if(o.floatingElements&&0!==o.floatingElements.length)for(var a=0;a<o.floatingElements.length;a++){var s=o.floatingElements[a];if(s instanceof Q&&!(i.allowOverlap&&s instanceof Q&&s.positioning.allowOverlap)){var l=this.viewer.clientArea.y,d=this.viewer.clientArea.bottom,h=s.x,c=s.y,g=this.getTableWidth(s),p=s.height,h={x:h-s.positioning.distanceLeft,y:c-s.positioning.distanceTop,right:h+g+s.positioning.distanceRight,bottom:c+p+s.positioning.distanceBottom},g=h.x,c=h.y-l,p=d-h.bottom,s=e+i.width,l=t+i.height;if(e<h.right&&h.x<s&&(t<h.bottom&&h.y<l))return r-h.right>=i.width?n.x=h.right:g>=i.width?n.x=h.x-i.width:p>=i.height?n.y=h.bottom:c>=i.height&&(n.y=h.y-i.height),n}}return n},t.prototype.getLeftMarginHorizPosition=function(e,t,i,r,n){var o=i;switch(t){case"Center":o=(e-r)/2;break;case"Left":o=0;break;case"Right":o=e-r}return o=o<0&&"InFrontOfText"!==n&&"Behind"!==n?0:o},t.prototype.getRightMarginHorizPosition=function(e,t,i,r,n,o){var a=e-t,s=a+r;switch(i){case"Center":s=a+(t-n)/2;break;case"Left":s=a;break;case"Right":s=e-n}return s=(s<0||e<s+n)&&"InFrontOfText"!==o&&"Behind"!==o?e-n:s},t.prototype.getVerticalPosition=function(e,t,i,r){var n=e.line.paragraph,o=e,a=0,s=n.associatedCell.y;switch(i){case"Page":case"Margin":case"TopMargin":case"InsideMargin":case"BottomMargin":case"OutsideMargin":a=s+t;break;case"Line":case"Paragraph":a=n.y+t+0;"Square"==o.textWrappingStyle&&(a=a<=n.associatedCell.y?n.associatedCell.y:a);break;default:a=this.viewer.clientActiveArea.y+t}return a},t.prototype.getHorizontalPosition=function(e,t,i,r,n,o,a){var s=0,t=t.line.paragraph.associatedCell,l=a-t.leftMargin-t.rightMargin,d=t.width,h=t.x,c=h-t.leftMargin;switch(r){case"Page":switch(s=n,i){case"Center":s=c+(l-e)/2;break;case"Left":s=c;break;case"Right":s=l-e+c;break;case"None":s=c+n}break;case"Column":case"Margin":switch(i){case"Center":s=h+(d-e)/2;break;case"Left":s=h;break;case"Right":s=h+(d-e);break;case"None":s=h+n}break;default:s=h+n}return s},t.prototype.updateTableFloatPoints=function(e){var t,i,r,n,o,a;e.wrapTextAround&&(t=e.getTableCellWidth(),i=e.positioning,r=e.bodyWidget.sectionFormat,this.documentHelper.viewer instanceof Nl?"Margin"!==i.horizontalOrigin&&"Page"!==i.horizontalOrigin&&"Column"!==i.horizontalOrigin||("Right"===i.horizontalAlignment||"Outside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=this.viewer.clientArea.width-t:this.viewer.clientActiveArea.x=this.viewer.clientArea.x):e.containerWidget instanceof P||e.isInsideTable?e.isInsideTable&&(n=(a=e.containerWidget).cellFormat,"Page"===i.verticalOrigin?(this.viewer.clientActiveArea.y=a.y,this.viewer.clientActiveArea.y+=K.convertPointToPixel(i.verticalPosition)):"Margin"===i.verticalOrigin?(this.viewer.clientActiveArea.y+=K.convertPointToPixel(i.verticalPosition),(this.viewer.clientActiveArea.y<a.y||"Top"===i.verticalAlignment)&&(this.viewer.clientActiveArea.y=a.y)):this.viewer.clientActiveArea.y+K.convertPointToPixel(i.verticalPosition)<a.y?this.viewer.clientActiveArea.y=a.y:this.viewer.clientActiveArea.y+=K.convertPointToPixel(i.verticalPosition),"Page"===i.horizontalOrigin?"Left"===i.horizontalAlignment||"Inside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=a.x:"Right"!==i.horizontalAlignment&&"Outside"!==i.horizontalAlignment||(this.viewer.clientActiveArea.x=a.x+n.preferredWidth-t):"Margin"!==i.horizontalOrigin&&"Column"!==i.horizontalOrigin||("Left"===i.horizontalAlignment||"Inside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=a.x+a.leftMargin:"Right"!==i.horizontalAlignment&&"Outside"!==i.horizontalAlignment||(this.viewer.clientActiveArea.x=a.x+n.preferredWidth-(t+a.rightMargin))),0<Math.round(i.horizontalPosition)&&(this.viewer.clientActiveArea.x=a.x,"Margin"===i.horizontalOrigin&&(this.viewer.clientActiveArea.x+=a.leftMargin),this.viewer.clientActiveArea.x+=K.convertPointToPixel(i.horizontalPosition)),"Center"===i.horizontalAlignment)&&(n=a.width,o=a.x+(n-t)/2,a=a.x+a.margin.left,this.viewer.clientActiveArea.x=n<t?a:Math.max(a,o)):("Page"===i.verticalOrigin?"Top"===i.verticalAlignment||"Inside"===i.verticalAlignment?this.viewer.clientActiveArea.y=0:!G.isNullOrUndefined(i.verticalAlignment)&&"None"!==i.verticalAlignment||(this.viewer.clientActiveArea.y=K.convertPointToPixel(i.verticalPosition)):"Margin"===i.verticalOrigin?"Top"===i.verticalAlignment||"Inside"===i.verticalAlignment?this.viewer.clientActiveArea.y=K.convertPointToPixel(r.topMargin):0==Math.round(i.verticalPosition)||G.isNullOrUndefined(r.topMargin)?1<r.numberOfColumns&&!G.isNullOrUndefined(r.topMargin)?this.viewer.clientActiveArea.y=K.convertPointToPixel(r.topMargin):this.viewer.clientActiveArea.y=K.convertPointToPixel(i.verticalPosition):this.viewer.clientActiveArea.y=K.convertPointToPixel(r.topMargin+i.verticalPosition):"Paragraph"===i.verticalOrigin&&("Bottom"===i.verticalAlignment||"Center"===i.verticalAlignment||"Top"===i.verticalAlignment||"Inside"===i.verticalAlignment||"Outside"===i.verticalAlignment?this.viewer.clientActiveArea.y=e.y:!G.isNullOrUndefined(i.verticalAlignment)&&"None"!==i.verticalAlignment||(this.viewer.clientActiveArea.y+=K.convertPointToPixel(i.verticalPosition))),"Page"===i.horizontalOrigin?"Left"===i.horizontalAlignment||"Inside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=0:"Right"===i.horizontalAlignment||"Outside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=K.convertPointToPixel(r.pageWidth)-t:"Center"===i.horizontalAlignment&&(this.viewer.clientActiveArea.x=(K.convertPointToPixel(r.pageWidth)-t)/2):"Margin"!==i.horizontalOrigin&&"Column"!==i.horizontalOrigin||("Left"===i.horizontalAlignment?(this.viewer.clientActiveArea.x=K.convertPointToPixel(r.leftMargin),"Word2013"===this.documentHelper.compatibilityMode||e.isInsideTable||(this.viewer.clientActiveArea.x=this.viewer.clientActiveArea.x-K.convertPointToPixel(e.firstChild.firstChild.leftMargin))):"Inside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=K.convertPointToPixel(r.leftMargin):"Right"===i.horizontalAlignment||"Outside"===i.horizontalAlignment?this.viewer.clientActiveArea.x=K.convertPointToPixel(r.pageWidth)-(K.convertPointToPixel(r.rightMargin)+t):"Center"===i.horizontalAlignment&&(this.viewer.clientActiveArea.x=K.convertPointToPixel(r.leftMargin)+(K.convertPointToPixel(r.pageWidth-r.rightMargin-r.leftMargin)-t)/2)),(0<Math.round(i.horizontalPosition)||("Margin"===i.horizontalOrigin||"Column"===i.horizontalOrigin)&&"Left"===i.horizontalAlignment)&&(this.viewer.clientActiveArea.x+=K.convertPointToPixel(i.horizontalPosition)))),e.x=this.viewer.clientActiveArea.x,e.y=this.viewer.clientActiveArea.y},t.prototype.isTocField=function(e){if(e instanceof te){var t=e.nextNode;if(e instanceof te&&0===e.fieldType&&t instanceof ie&&-1!==t.text.trim().toLowerCase().indexOf("toc"))return!0}return!1},t.prototype.getTotalColumnSpan=function(e){for(var t=e,i=0,r=0;r<t.childWidgets.length;r++)i+=t.childWidgets[r].cellFormat.columnSpan;return i},t.prototype.getMaximumRightCellBorderWidth=function(e){for(var t=0,i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i],r=r.childWidgets[r.childWidgets.length-1].cellFormat.borders.right.lineWidth;t<r&&(t=r)}return t},t.prototype.getDefaultBorderSpacingValue=function(e,t,i){return 0==e?(e="Word2013"!=this.documentHelper.compatibilityMode&&"Center"==i?1.5:.75,!0):t},t.prototype.getMinimumWidthRequiredForTable=function(e,t,i){var r=0,r="Word2013"==this.documentHelper.compatibilityMode?"Center"==t?e?18.5+Math.round(.375):18.5+Math.round(i/2):e?19.25:18.5+i:"Center"==t?e?19.25:18.5+i/2:.25==i?18.5:19.3;return K.convertPointToPixel(r)},t.prototype.shiftFloatingItemsFromTable=function(e,t){if(e.containerWidget instanceof Y)for(var i=0;i<e.containerWidget.floatingElements.length;i++){var r=e.containerWidget.floatingElements[i];!(r instanceof Q)&&r.paragraph.containerWidget instanceof ee&&r.paragraph.containerWidget.ownerTable.containerWidget.ownerTable==e&&(t.floatingElements.push(e.containerWidget.floatingElements[i]),e.containerWidget.floatingElements.splice(e.containerWidget.floatingElements.indexOf(e.containerWidget.floatingElements[i]),1),this.shiftedFloatingItemsFromTable.push(r),i--)}},t.prototype.updateWholeListItems=function(e,t,i){if(this.documentHelper.renderedLists.clear(),this.documentHelper.renderedLevelOverrides=[],!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.bodyWidget)){e.bodyWidget.index;for(var r,n=0;n<this.documentHelper.pages.length;n++){for(var o=this.documentHelper.pages[n],a=0;a<o.bodyWidgets.length&&(r=this.getNextBlockForList(o.bodyWidgets[a].firstChild),G.isNullOrUndefined(r));a++);if(!G.isNullOrUndefined(r))break}do{if(!r)break;var s=t?{paragraph:null,listId:i}:null;if(this.updateListItems(r,e,s)){if(G.isNullOrUndefined(s))break;return s.paragraph==e?null:s.paragraph}}while(r=r.getSplitWidgets().pop().nextRenderedWidget,r=G.isNullOrUndefined(r)?r:this.getNextBlockForList(r))}return null},t.prototype.getNextBlockForList=function(e){if(e instanceof Z&&this.isFirstElementWithPageBreak(e)){var t=e.nextRenderedWidget;if(!G.isNullOrUndefined(t)&&t.equals(e))return t}return e},t.prototype.updateListItems=function(e,t,i){return e instanceof Z?this.updateListItemsForPara(e,t,i):this.updateListItemsForTable(e,t,i)},t.prototype.updateListItemsForTable=function(e,t,i){if(G.isNullOrUndefined(i)&&t instanceof Q&&e.equals(t))return!0;var r=e.firstChild;do{if(this.updateListItemsForRow(r,t,i))return!0}while(r=r.getSplitWidgets().pop().nextRenderedWidget);return!1},t.prototype.updateListItemsForRow=function(e,t,i){if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.firstChild)){var r=e.firstChild;do{var n=this.updateListItemsForCell(r,t,i);if(!G.isNullOrUndefined(i)&&!G.isNullOrUndefined(i.paragraph))return!0;if(n)return!0}while(r=r.nextRenderedWidget)}return!1},t.prototype.updateListItemsForCell=function(e,t,i){if(0!==e.childWidgets.length){var r=e.firstChild;do{var n=this.updateListItems(r,t,i);if(!G.isNullOrUndefined(i)&&!G.isNullOrUndefined(i.paragraph))return!0;if(n)return!0}while(r=r.getSplitWidgets().pop().nextRenderedWidget)}return!1},t.prototype.updateRenderedListItems=function(e){e instanceof Z?(e.isEndsWithColumnBreak&&(e=e.nextRenderedWidget),this.updateRenderedListItemsForPara(e)):this.updateRenderedListItemsForTable(e)},t.prototype.updateRenderedListItemsForTable=function(e){for(var t=e.firstChild;this.updateRenderedListItemsForRow(t),t=t.getSplitWidgets().pop().nextRenderedWidget;);},t.prototype.updateRenderedListItemsForRow=function(e){for(var t=e.firstChild;this.updateRenderedListItemsForCell(t),t=t.nextRenderedWidget;);},t.prototype.updateRenderedListItemsForCell=function(e){if(0!==e.childWidgets.length)for(var t=e.firstChild;this.updateRenderedListItems(t),t=t.getSplitWidgets().pop().nextRenderedWidget;);},t.prototype.updateListItemsForPara=function(e,t,i){if(e.equals(t))return G.isNullOrUndefined(i)||(i.paragraph=e),!0;var t=void 0,r=0;if(!G.isNullOrUndefined(e.paragraphFormat)&&!G.isNullOrUndefined(e.paragraphFormat.listFormat)){if(!G.isNullOrUndefined(i)&&e.paragraphFormat.listFormat.listId===i.listId)return i.paragraph=e,!0;t=this.documentHelper.getListById(e.paragraphFormat.listFormat.listId),r=e.paragraphFormat.listFormat.listLevelNumber}return G.isNullOrUndefined(t)||G.isNullOrUndefined(this.documentHelper.getAbstractListById(t.abstractListId))||G.isNullOrUndefined(this.documentHelper.getAbstractListById(t.abstractListId).levels[r])||(i=this.getListLevel(t,r),this.updateListNumber(i,e,!1)),!1},t.prototype.updateRenderedListItemsForPara=function(e){var t,i;G.isNullOrUndefined(this.documentHelper.getListById(e.paragraphFormat.listFormat.listId))||(i=this.documentHelper.getListById(e.paragraphFormat.listFormat.listId),t=e.paragraphFormat.listFormat.listLevelNumber,G.isNullOrUndefined(i))||G.isNullOrUndefined(this.documentHelper.getAbstractListById(i.abstractListId))||G.isNullOrUndefined(this.documentHelper.getAbstractListById(i.abstractListId).levels[e.paragraphFormat.listFormat.listLevelNumber])||(i=this.getListLevel(i,t),this.updateListNumber(i,e,!0))},t.prototype.updateListNumber=function(e,t,i){var r,n,o,a,s=void 0,l=(0<t.childWidgets.length&&0<(l=t.childWidgets[0]).children.length&&(s=l.children[0]),t.paragraphFormat.listFormat);!G.isNullOrUndefined(s)&&s.nextElement instanceof se&&(r=s.width+s.nextElement.width),!G.isNullOrUndefined(s)&&s instanceof se?(n=this.getListNumber(t),i&&(i=s.width,s.text=n,(this.documentHelper.isIosDevice||this.documentHelper.isLinuxOS)&&(n=(n=s.text)===String.fromCharCode(61623)?String.fromCharCode(9679):n===String.fromCharCode(61551)+String.fromCharCode(32)?String.fromCharCode(9675):n)!==s.text&&(s.text=n),n=this.documentHelper.textHelper.getTextSize(s,s.characterFormat),s.text&&-1<s.text.indexOf("")?2===(a=s.text.split("")).length&&(o=this.documentHelper.textHelper.getWidth(a[0],t.characterFormat),a=this.documentHelper.textHelper.getWidth(a[1],t.characterFormat),s.dualWidths={w1:o,w2:a},n=o+a):s.dualWidths=void 0,i<n&&(s.width=n),this.documentHelper.textHelper.updateTextSize(s,t),this.applyListNumberAlignment(s,e,t),!G.isNullOrUndefined(r))&&s.width<r&&(s.nextElement.width=r-s.width)):G.isNullOrUndefined(l)||-1===l.listId||G.isNullOrUndefined(s)||!s.isVisible||this.getListNumber(t)},t.prototype.updateListItemsTillEnd=function(e,t){var i=e.getSplitWidgets(),i=i[i.length-1].nextRenderedWidget;if(!G.isNullOrUndefined(i))for(var r=t?this.documentHelper.editorProperties.getNextRenderedBlock(e):e;!G.isNullOrUndefined(r)&&!this.documentHelper.isTextInput;)this.updateRenderedListItems(r),r=r.getSplitWidgets().pop().nextRenderedWidget},t);function t(e){this.islayoutFootnote=!1,this.isMultiColumnDoc=!1,this.allowLayout=!0,this.isReplaceAll=!1,this.isTextFormat=!1,this.isSectionBreakCont=!1,this.isReplacingAll=!1,this.footHeight=0,this.existFootnoteHeight=0,this.isfootMove=!1,this.footnoteHeight=0,this.isTableFootNote=!1,this.isRelayout=!1,this.isRelayoutneed=!1,this.isOverlapFloatTable=!1,this.isInitialLoad=!0,this.isInsertFormField=!1,this.fieldBegin=void 0,this.maxTextHeight=0,this.maxBaseline=0,this.maxTextBaseline=0,this.isFieldCode=!1,this.isRtlFieldCode=!1,this.isRTLLayout=!1,this.isSkipFirstLineIndent=!1,this.currentCell=void 0,this.isFootnoteContentChanged=!1,this.isEndnoteContentChanged=!1,this.keepWithNext=!1,this.effectiveJustifyWidth=0,this.mergedParagraphOffset=0,this.is2013Justification=!1,this.nextElementToLayout=void 0,this.endNoteHeight=0,this.isMultiColumnSplit=!1,this.isMultiColumnLayout=!1,this.skipUpdateContainerWidget=!1,this.isIFfield=!1,this.skip2003=!1,this.textWrappingBottom=0,this.istableYpositionChange=!1,this.isLayoutWhole=!1,this.isBidiReLayout=!1,this.defaultTabWidthPixel=48,this.isRelayoutFootnote=!1,this.isRelayoutOverlap=!1,this.skipRelayoutOverlap=!1,this.isWrapText=!1,this.isYPositionUpdated=!1,this.isXPositionUpdated=!1,this.hasFloatingElement=!1,this.isFootNoteLayoutStart=!1,this.wrapPosition=[],this.isRtlShapeWrapAtStart=!1,this.shiftedFloatingItemsFromTable=[],this.isDocumentContainsRtl=!1,this.isPastingContent=!1,this.layoutedFootnoteElement=[],this.lastScrollUpdatePageIndex=-1,this.isAllColumnHasAutoWidthType=!1,this.isLayoutSwitch=!1,this.documentHelper=e}Ec.prototype.clear=function(){G.isNullOrUndefined(this.overrideListLevel)||this.overrideListLevel.clearFormat(),this.overrideListLevel=void 0},Ec.prototype.destroy=function(){G.isNullOrUndefined(this.overrideListLevel)||this.overrideListLevel.destroy(),this.levelNumber=void 0,this.startAt=void 0,this.overrideListLevel=void 0},Ec.prototype.clone=function(){var e=new Ec;return e.startAt=this.startAt,e.levelNumber=this.levelNumber,G.isNullOrUndefined(this.overrideListLevel)||(e.overrideListLevel=this.overrideListLevel.clone(e)),e};var qc=Ec;function Ec(){}Vc.prototype.getListLevel=function(e){var t=this.getLevelOverride(e);return G.isNullOrUndefined(t)||G.isNullOrUndefined(t.overrideListLevel)?this.abstractList.levels[parseInt(e.toString(),10)]:t.overrideListLevel},Vc.prototype.getLevelOverride=function(e){for(var t=0;t<this.levelOverrides.length;t++)if(this.levelOverrides[parseInt(t.toString(),10)]instanceof qc){var i=this.levelOverrides[parseInt(t.toString(),10)];if(i.levelNumber===e)return i}},Vc.prototype.clear=function(){if(!G.isNullOrUndefined(this.levelOverrides)){for(var e=0;e<this.levelOverrides.length;e++)this.levelOverrides[parseInt(e.toString(),10)].clear();this.levelOverrides=[]}this.abstractList&&this.abstractList.clear(),this.abstractList=void 0},Vc.prototype.destroy=function(){if(!G.isNullOrUndefined(this.levelOverrides)){for(var e=0;e<this.levelOverrides.length;e++)this.levelOverrides[parseInt(e.toString(),10)].destroy();this.levelOverrides=[]}this.levelOverrides=void 0,this.abstractList&&(this.abstractList.destroy(),this.abstractList=void 0),this.abstractListId=void 0,this.listId=void 0,this.sourceListId=void 0},Vc.prototype.mergeList=function(e){G.isNullOrUndefined(this.abstractListId)||-1===this.abstractListId||(this.abstractListId=e.abstractListId),G.isNullOrUndefined(this.listId)||-1===this.listId||(this.listId=e.listId),G.isNullOrUndefined(this.sourceListId)||-1===this.sourceListId||(this.sourceListId=e.sourceListId),G.isNullOrUndefined(this.levelOverrides)||0===this.levelOverrides.length||(this.levelOverrides=e.levelOverrides)},Vc.prototype.clone=function(){for(var e=new Vc,t=0;t<this.levelOverrides.length;t++)e.levelOverrides.push(this.levelOverrides[parseInt(t.toString(),10)].clone());return e};var Mc=Vc;function Vc(){this.nsid=-1,this.listId=-1,this.sourceListId=-1,this.abstractListId=-1,this.abstractList=void 0,this.levelOverrides=[]}Object.defineProperty(zc.prototype,"fontTypeface",{get:function(){return this.fntTypeface},set:function(e){this.fntTypeface=e},enumerable:!0,configurable:!0}),Object.defineProperty(zc.prototype,"fontSchemeList",{get:function(){return this.fntSchemeList},set:function(e){this.fntSchemeList=e},enumerable:!0,configurable:!0}),zc.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(this.fntTypeface=e.fntTypeface,this.fntSchemeList=e.fntSchemeList)},zc.prototype.destroy=function(){this.fntTypeface=void 0,this.fntSchemeList=void 0};var Dc=zc;function zc(){this.fntTypeface=new N,this.fntSchemeList=[],this.fntTypeface=new N,this.fntSchemeList=[]}Object.defineProperty(jc.prototype,"fontSchemeName",{get:function(){return this.schemeName},set:function(e){this.schemeName=e},enumerable:!0,configurable:!0}),Object.defineProperty(jc.prototype,"majorFontScheme",{get:function(){return this.majFontScheme},set:function(e){this.majFontScheme=e},enumerable:!0,configurable:!0}),Object.defineProperty(jc.prototype,"minorFontScheme",{get:function(){return this.minFontScheme},set:function(e){this.minFontScheme=e},enumerable:!0,configurable:!0}),jc.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(this.schemeName=e.schemeName,this.majFontScheme.copyFormat(e.majFontScheme),this.minFontScheme.copyFormat(e.minFontScheme))},jc.prototype.destroy=function(){this.schemeName=void 0,this.majFontScheme=void 0,this.minFontScheme=void 0};var _c=jc;function jc(e){this.majFontScheme=new Dc,this.minFontScheme=new Dc}Object.defineProperty(Kc.prototype,"name",{get:function(){return this.fontName},set:function(e){this.fontName=e},enumerable:!0,configurable:!0}),Object.defineProperty(Kc.prototype,"typeface",{get:function(){return this.fontTypeface},set:function(e){this.fontTypeface=e},enumerable:!0,configurable:!0}),Object.defineProperty(Kc.prototype,"panose",{get:function(){return this.pnose},set:function(e){this.pnose=e},enumerable:!0,configurable:!0}),Kc.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||(this.fontName=e.fontName,this.fontTypeface=e.fontTypeface,this.pnose=e.panose)},Kc.prototype.destroy=function(){this.fontName=void 0,this.fontTypeface=void 0,this.pnose=void 0};var Gc=Kc;function Kc(){}Object.defineProperty(Xc.prototype,"fontScheme",{get:function(){return this.fntScheme},set:function(e){this.fntScheme=e},enumerable:!0,configurable:!0}),Xc.prototype.copyFormat=function(e){G.isNullOrUndefined(e)||this.fntScheme.copyFormat(e.fntScheme)},Xc.prototype.destroy=function(){this.fntScheme=void 0};var Yc=Xc;function Xc(e){this.fntScheme=new _c}Object.defineProperty(i.prototype,"viewer",{get:function(){return this.documentHelper.viewer},enumerable:!0,configurable:!0}),i.prototype.convertJsonToDocument=function(e,t){this.commentStarts=new N,this.commentEnds=new N,this.commentsCollection=new N,this.revisionCollection=new N,this.fontInfoCollection=new N,this.keywordIndex=0,this.footnotes=new Pd,this.endnotes=new Pd;var i=[],e=K.getSfdtDocument(e);if(!G.isNullOrUndefined(e.optimizeSfdt)&&e.optimizeSfdt&&(this.keywordIndex=1),G.isNullOrUndefined(e[pe[this.keywordIndex]])||this.parseFontSubstitutionTable(e[pe[this.keywordIndex]]),G.isNullOrUndefined(e[ue[this.keywordIndex]])?this.parseCharacterFormat(0,this.documentHelper.editorCharacterFormat,this.documentHelper.characterFormat):(this.documentHelper.characterFormat.clearFormat(),this.parseCharacterFormat(this.keywordIndex,e[ue[this.keywordIndex]],this.documentHelper.characterFormat)),G.isNullOrUndefined(this.documentHelper.documentCharacterFormat)||this.parseCharacterFormat(0,this.documentHelper.documentCharacterFormat,this.documentHelper.characterFormat),G.isNullOrUndefined(e[fe[this.keywordIndex]])?this.parseParagraphFormat(0,this.documentHelper.editorParagraphFormat,this.documentHelper.paragraphFormat):(this.documentHelper.paragraphFormat.clearFormat(),this.parseParagraphFormat(this.keywordIndex,e[fe[this.keywordIndex]],this.documentHelper.paragraphFormat)),G.isNullOrUndefined(this.documentHelper.documentParagraphFormat)||this.parseParagraphFormat(0,this.documentHelper.documentParagraphFormat,this.documentHelper.paragraphFormat),G.isNullOrUndefined(e[Me[this.keywordIndex]])||this.parseCharacterFormat(this.keywordIndex,e[Me[this.keywordIndex]],this.documentHelper.themeFontLanguage),this.parseDocumentProtection(e),G.isNullOrUndefined(e[Fe[this.keywordIndex]])||(this.documentHelper.defaultTabWidth=e[Fe[this.keywordIndex]]),G.isNullOrUndefined(e[Pe[this.keywordIndex]])||(this.documentHelper.enableTrackChanges!==K.parseBoolValue(e[Pe[this.keywordIndex]])&&(this.documentHelper.skipSettingsOps=!0),this.documentHelper.enableTrackChanges=K.parseBoolValue(e[Pe[this.keywordIndex]])),G.isNullOrUndefined(e[Le[this.keywordIndex]])||(this.documentHelper.dontUseHtmlParagraphAutoSpacing=K.parseBoolValue(e[Le[this.keywordIndex]])),G.isNullOrUndefined(e[ys[this.keywordIndex]])||(this.documentHelper.allowSpaceOfSameStyleInTable=K.parseBoolValue(e[ys[this.keywordIndex]])),G.isNullOrUndefined(e[Ue[this.keywordIndex]])||(this.documentHelper.alignTablesRowByRow=K.parseBoolValue(e[Ue[this.keywordIndex]])),G.isNullOrUndefined(e[ve[this.keywordIndex]])||(this.documentHelper.backgroundColor=this.getColor(e[ve[this.keywordIndex]][vn[this.keywordIndex]])),G.isNullOrUndefined(e[Ee[this.keywordIndex]])||(this.documentHelper.compatibilityMode=this.getCompatibilityMode(e[Ee[this.keywordIndex]]),G.isNullOrUndefined(this.documentHelper.documentSettings))||(this.documentHelper.documentSettings.compatibilityMode=this.getCompatibilityMode(e[Ee[this.keywordIndex]])),G.isNullOrUndefined(e[ye[this.keywordIndex]])||this.parseAbstractList(e,this.documentHelper.abstractLists),G.isNullOrUndefined(e[me[this.keywordIndex]])||this.parseList(e,this.documentHelper.lists),G.isNullOrUndefined(e[We[this.keywordIndex]])||this.parseStyles(e,this.documentHelper.styles),G.isNullOrUndefined(e[be[this.keywordIndex]])||this.parseComments(e,this.documentHelper.comments),G.isNullOrUndefined(e[xe[this.keywordIndex]])||this.parseRevisions(e,[]),G.isNullOrUndefined(e[Fs[this.keywordIndex]])||this.parseImages(e[Fs[this.keywordIndex]]),G.isNullOrUndefined(e[ge[this.keywordIndex]])||this.parseSections(e[ge[this.keywordIndex]],i),G.isNullOrUndefined(e[we[this.keywordIndex]])||this.parseCustomXml(e),G.isNullOrUndefined(e[Be[this.keywordIndex]])||(this.documentHelper.documentEditorSettings.formFieldSettings.applyShading=K.parseBoolValue(e[Be[this.keywordIndex]])),G.isNullOrUndefined(e[Re[this.keywordIndex]])||this.parseFootnotes(e[Re[this.keywordIndex]],this.documentHelper.footnotes),G.isNullOrUndefined(e[qe[this.keywordIndex]])||this.parseEndtnotes(e[qe[this.keywordIndex]],this.documentHelper.endnotes),G.isNullOrUndefined(e[Ve[this.keywordIndex]])||this.parseThemes(e[Ve[this.keywordIndex]],this.documentHelper.themes),this.removeUnmappedBookmark(),G.isNullOrUndefined(e[Ss[0]])||(t[Ss[0]]=e[Ss[0]]),this.documentHelper.fieldStacks&&0<this.documentHelper.fieldStacks.length){for(var r=this.documentHelper.fieldStacks.length-1;0<=r;r--){var n,o=this.documentHelper.fieldStacks[r];G.isNullOrUndefined(o.fieldSeparator)&&G.isNullOrUndefined(o.fieldEnd)&&(G.isNullOrUndefined(o.line)||-1!==(n=o.line.children.indexOf(o))&&o.line.children.splice(n,1),-1!==(n=this.documentHelper.fields.indexOf(o))&&this.documentHelper.fields.splice(n,1),-1!==(o=this.documentHelper.fieldStacks.indexOf(o)))&&this.documentHelper.fieldStacks.splice(o,1)}this.documentHelper.fieldStacks=[]}return this.revisionMap&&(this.revisionMap.clear(),this.revisionMap=void 0),this.revisionCollection&&(this.revisionCollection.clear(),this.revisionMap=void 0),i},i.prototype.parseFontSubstitutionTable=function(e){if(!G.isNullOrUndefined(this.documentHelper)&&!G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)&&0<Object.keys(e).length)for(var t=0,i=Object.keys(e);t<i.length;t++){var r=i[t];this.documentHelper.fontSubstitutionTable.add(r,e[r])}},i.prototype.removeUnmappedBookmark=function(){for(var e,t=this.documentHelper.bookmarks.keys,i=this.documentHelper.endBookmarksUpdated,r=0;r<t.length;r++)-1===i.indexOf(t[r])&&((e=this.documentHelper.bookmarks.get(t[r]))&&e.line.children.splice(e.line.children.indexOf(e),1),this.documentHelper.bookmarks.remove(t[r]));this.documentHelper.endBookmarksUpdated=[]},i.prototype.parseFootnotes=function(e,t){G.isNullOrUndefined(e[Ua[this.keywordIndex]])||this.parseBody(e[Ua[this.keywordIndex]],t.separator),G.isNullOrUndefined(e[Ha[this.keywordIndex]])||this.parseBody(e[Ha[this.keywordIndex]],t.continuationNotice),G.isNullOrUndefined(e[Ba[this.keywordIndex]])||this.parseBody(e[Ba[this.keywordIndex]],t.continuationSeparator)},i.prototype.parseImages=function(e){for(var t in e){var i;Array.isArray(e[""+t])?this.documentHelper.images.add(parseInt(t),e[""+t]):((i=[]).push(e[""+t]),this.documentHelper.images.add(parseInt(t),i))}},i.prototype.parseEndtnotes=function(e,t){G.isNullOrUndefined(e[Ua[this.keywordIndex]])||this.parseBody(e[Ua[this.keywordIndex]],t.separator),G.isNullOrUndefined(e[Ha[this.keywordIndex]])||this.parseBody(e[Ha[this.keywordIndex]],t.continuationNotice),G.isNullOrUndefined(e[Ba[this.keywordIndex]])||this.parseBody(e[Ba[this.keywordIndex]],t.continuationSeparator)},i.prototype.parseCustomXml=function(e){for(var t=0;t<e[we[this.keywordIndex]].length;t++){var i=e[we[this.keywordIndex]][t];this.documentHelper.customXmlData.containsKey(i[so[this.keywordIndex]])||this.documentHelper.customXmlData.add(i[so[this.keywordIndex]],i[lo[this.keywordIndex]])}},i.prototype.parseDocumentProtection=function(e){G.isNullOrUndefined(e[Ce[this.keywordIndex]])||(this.documentHelper.restrictFormatting=K.parseBoolValue(e[Ce[this.keywordIndex]])),G.isNullOrUndefined(e[Oe[this.keywordIndex]])||(this.documentHelper.isDocumentProtected=K.parseBoolValue(e[Oe[this.keywordIndex]])),G.isNullOrUndefined(e[Te[this.keywordIndex]])||(this.documentHelper.protectionType=this.getProtectionType(e[Te[this.keywordIndex]])),G.isNullOrUndefined(e[Se[this.keywordIndex]])||(this.documentHelper.hashValue=e[Se[this.keywordIndex]]),G.isNullOrUndefined(e[Ne[this.keywordIndex]])||(this.documentHelper.saltValue=e[Ne[this.keywordIndex]]),G.isNullOrUndefined(e[Ae[this.keywordIndex]])||(this.documentHelper.cryptAlgorithmSid=e[Ae[this.keywordIndex]]),G.isNullOrUndefined(e[ke[this.keywordIndex]])||(this.documentHelper.cryptAlgorithmType=e[ke[this.keywordIndex]]),G.isNullOrUndefined(e[Ie[this.keywordIndex]])||(this.documentHelper.cryptAlgorithmClass=e[Ie[this.keywordIndex]])},i.prototype.parseStyles=function(e,t){for(var i=0;i<e[We[this.keywordIndex]].length;i++){var r=this.documentHelper.isEditorModule,n=this.documentHelper.styles.findByName(e[We[this.keywordIndex]][i][De[this.keywordIndex]]);!G.isNullOrUndefined(n)&&this.stylesCollection.indexOf(e[We[this.keywordIndex]][i])<0&&n.type===this.getStyleType(n[ns[this.keywordIndex]])&&t.remove(n),(G.isNullOrUndefined(r)||!this.documentHelper.editorProperties.isRemoteAction)&&t.contains(n)||this.parseStyle(e,e[We[this.keywordIndex]][i],t)}this.stylesCollection=[]},i.prototype.toEditorRevision=function(e){return G.isNullOrUndefined(this.revisionFactory)||G.isNullOrUndefined(e)?e:this.revisionFactory(e)},i.prototype.parseRevisions=function(e,t){for(var i=0;i<e[xe[this.keywordIndex]].length;i++){var r=e[xe[this.keywordIndex]][i];if(!G.isNullOrUndefined(r[oo[this.keywordIndex]])&&!G.isNullOrUndefined(r[no[this.keywordIndex]])){var n=this.toEditorRevision(this.parseRevision(r)),o=!0;if(!this.documentHelper.copyWithTrackChange&&this.isPaste){if("Insertion"===this.getRevisionType(r[no[this.keywordIndex]])&&this.isPaste&&this.documentHelper.enableTrackChanges&&!this.documentHelper.editorProperties.isRemoteAction)continue;this.revisionCollection.containsKey(r[oo[this.keywordIndex]])||this.revisionCollection.add(r[oo[this.keywordIndex]],n)}else this.revisionCollection.add(r[oo[this.keywordIndex]],n);for(var a=0;a<t.length;a++)t[a].revisionID===n.revisionID&&(o=!1);o&&!this.documentHelper.editorProperties.isRemoteAction&&t.push(n)}}this.documentHelper.isSfdtExportModule&&(this.documentHelper.copyWithTrackChange=!1)},i.prototype.parseRevision=function(e){var t;if(!G.isNullOrUndefined(e))return(t=new E(this.documentHelper,e[$n[this.keywordIndex]],e[to[this.keywordIndex]])).revisionID=e[oo[this.keywordIndex]],t.revisionType=this.getRevisionType(e[no[this.keywordIndex]]),t.customData=e[ao[this.keywordIndex]],t},i.prototype.checkAndApplyRevision=function(e,t,i,r){var n=t[bt[e]];if(n&&0!==n.length){var o=this.isPaste&&this.documentHelper.editorProperties.isRemoteAction&&i instanceof S;if(!G.isNullOrUndefined(n)&&0<n.length)for(var a=0;a<n.length;a++){var s=n[a],l=this.revisionCollection.get(s);if(l){if(0<i.revisionLength&&i.getRevision(0).author==l.author&&i.getRevision(0).revisionType==l.revisionType)return;var d=this.documentHelper.editorProperties.revisionsInternal?this.documentHelper.editorProperties.revisionsInternal.changes:void 0;G.isNullOrUndefined(d)||-1!==d.indexOf(l)||(d.push(l),this.documentHelper.revisionsInternal.add(s,l)),l=this.checkAndCreateNewRevision(l,r,i),G.isNullOrUndefined(l)||i.revisions.push(l),o&&this.documentHelper.editorProperties.remotePasteRevision.push(l)}}}},i.prototype.checkAndCreateNewRevision=function(e,t,i){G.isNullOrUndefined(this.revisionMap)&&(this.revisionMap=new N);var r,n,o=e.revisionID,a=this.revisionMap.get(t),s=a||void 0,l=s?s.get(o):void 0,d=!1;if(i instanceof ld&&!G.isNullOrUndefined(i.previousElement)&&!G.isNullOrUndefined(l)&&((r=i.previousElement)instanceof ie||r instanceof ac)){0===r.revisionLength&&(d=!0);for(var h=0;h<r.revisionLength;h++){var c=r.getRevision(h);c.revisionType===e.revisionType&&c.author===e.author||(d=!0)}}return(!G.isNullOrUndefined(e.ownerNode)&&e.ownerNode!==t||d)&&(G.isNullOrUndefined(l)||d?(i=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),(e=this.toEditorRevision(e.cloneRevision())).revisionID=i,n=this.revisionCollection.values.indexOf(e),this.revisionCollection.keys.splice(n+1,0,i),this.revisionCollection.values.splice(n+1,0,e),i=this.documentHelper.editorProperties.revisionsInternal?this.documentHelper.editorProperties.revisionsInternal.changes:void 0,G.isNullOrUndefined(i)||-1!==i.indexOf(e)||(i.push(e),this.documentHelper.revisionsInternal.add(e.revisionID,e))):e=l),(G.isNullOrUndefined(s)||s&&G.isNullOrUndefined(l))&&(a?a.add(o,e):((n=new N).add(o,e),this.revisionMap.add(t,n))),(e=!d&&r&&0<r.revisionLength&&(i=this.revisionHelper.retrieveRevisionByType(r,e.revisionType),this.documentHelper.revisionsInternal.containsKey(e.revisionID))&&!G.isNullOrUndefined(i)&&i!==e?this.revisionCollection.get(i.revisionID):e).ownerNode=t,e},i.prototype.parseComments=function(e,t){for(var i=0,r=0;r<e[be[this.keywordIndex]].length;r++){for(var n=e[be[this.keywordIndex]][r],o=void 0,o=this.parseComment(n,void 0);i<n[ro[this.keywordIndex]].length;){var a=void 0;(a=this.parseComment(n[ro[this.keywordIndex]][i],void 0)).ownerComment=o,a.isReply=!0,o.replyComments.push(a),this.commentsCollection.add(a.commentId,a),i++}this.commentsCollection.add(o.commentId,o),t.push(o),i=0}},i.prototype.parseComment=function(e,t){return(t=new dc(e[to[this.keywordIndex]])).author=e[$n[this.keywordIndex]],t.initial=e[eo[this.keywordIndex]],t.commentId=e[Zn[this.keywordIndex]],t.isResolved=K.parseBoolValue(e[io[this.keywordIndex]]),t.text=this.parseCommentText(e[ga[this.keywordIndex]]),t.mentions=this.parseCommentMentions(e[ga[this.keywordIndex]]),t.isPosted=!0,t},i.prototype.parseCommentText=function(e){for(var t="",i=!1,r=0;r<e.length;r++){if(0!==r&&(t+="<div>"),0<e[r][uo[this.keywordIndex]].length)for(var n=e[r][uo[this.keywordIndex]],o=0;o<n.length;o++){var a=n[o];0===a[Hn[this.keywordIndex]]||1===a[Hn[this.keywordIndex]]||2===a[Hn[this.keywordIndex]]?0===a[Hn[this.keywordIndex]]?o++:2===a[Hn[this.keywordIndex]]&&(i=!0):(a=a[Yr[this.keywordIndex]],i?(t=t+'<span contenteditable="false" class="e-mention-chip">'+(a&&a.replace(/</g,"&lt;").replace(/>/g,"&gt;"))+"</span>",i=!1):a&&(t+=a.replace(/</g,"&lt;").replace(/>/g,"&gt;")))}else t+=0===r?"<div><br></div>":"<br>";0!==r&&(t+="</div>")}return t},i.prototype.parseCommentMentions=function(e){for(var t=[],i=!1,r=!1,n=0;n<e.length;n++)for(var o=e[n][uo[this.keywordIndex]],a={},s=0;s<o.length;s++){var l,d=o[s];0===d[Hn[this.keywordIndex]]||1===d[Hn[this.keywordIndex]]||2===d[Hn[this.keywordIndex]]?0===d[Hn[this.keywordIndex]]?i=!0:2===d[Hn[this.keywordIndex]]&&(r=!0):(d=d[Yr[this.keywordIndex]],i?(l=(l=d.replace(/.*"(.*)".*/,"$1")).replace("mailto:",""),a.value=l,i=!1):r&&(a.text=d,r=!1,t.push(a),a={}))}return t},i.prototype.parseStyle=function(e,t,i,r){var n,o,a,s,l,d=0,h=this.documentHelper.isEditorModule;!G.isNullOrUndefined(r)&&r&&(d=this.keywordIndex,this.keywordIndex=0),G.isNullOrUndefined(t)||G.isNullOrUndefined(t[ns[this.keywordIndex]])||("Paragraph"===this.getStyleType(t[ns[this.keywordIndex]])&&((n=new nl).type="Paragraph"),"Character"===this.getStyleType(t[ns[this.keywordIndex]])&&((n=new sl).type="Character"),"Table"===this.getStyleType(t[ns[this.keywordIndex]])&&((n=new hl).type="Table"),G.isNullOrUndefined(t[De[this.keywordIndex]])||(n.name=t[De[this.keywordIndex]]),i.push(n),this.stylesCollection.push(t),G.isNullOrUndefined(t[ze[this.keywordIndex]])||(o=void 0,o=(h&&this.documentHelper.editorProperties.isRemoteAction?this.documentHelper.styles:i).findByName(t[ze[this.keywordIndex]]),G.isNullOrUndefined(o)?(l=this.getStyle(t[ze[this.keywordIndex]],e),s=void 0,G.isNullOrUndefined(l)||this.getStyleType(l[ns[this.keywordIndex]])!==n.type?"Paragraph"===n.type?s=JSON.parse('{"type":"Paragraph","name":"Normal","next":"Normal"}'):"Character"===n.type&&(s=JSON.parse('{"type": "Character","name": "Default Paragraph Font"}')):s=l,this.parseStyle(e,s,i),h&&this.documentHelper.editorProperties.isRemoteAction?n.basedOn=this.documentHelper.styles.findByName(s[De[this.keywordIndex]]):G.isNullOrUndefined(s)||n===i.findByName(s[De[this.keywordIndex]]).basedOn||(n.basedOn=i.findByName(s[De[this.keywordIndex]]))):o.type===n.type&&o.name!==n.name&&(n.basedOn=o,l=this.getStyle(t[ze[this.keywordIndex]],e),this.isPaste)&&!G.isNullOrUndefined(l)&&"Paragraph"===n.type&&"Paragraph"===this.getStyleType(l[ns[this.keywordIndex]])&&this.updateParagraphFormatFromBaseStyle(t,l)),G.isNullOrUndefined(t[je[this.keywordIndex]])||(o=i.findByName(t[je[this.keywordIndex]]),l=this.getStyle(t[je[this.keywordIndex]],e),s=void(h&&this.documentHelper.editorProperties.isRemoteAction&&(o=this.documentHelper.styles.findByName(t[je[this.keywordIndex]]))),G.isNullOrUndefined(o)?(s=G.isNullOrUndefined(l)?((a={})[ue[this.keywordIndex]]=t[ue[this.keywordIndex]],a[De[this.keywordIndex]]=t[De[this.keywordIndex]]+" Char",a[ns[this.keywordIndex]]="Character",a[ze[this.keywordIndex]]="Normal"===t[ze[this.keywordIndex]]?"Default Paragraph Font":t[ze[this.keywordIndex]]+" Char",a):l,a=void this.parseStyle(e,s,i),a=(h&&this.documentHelper.editorProperties.isRemoteAction?this.documentHelper.styles:i).findByName(s[De[this.keywordIndex]]),n.link=G.isNullOrUndefined(a)?t[je[this.keywordIndex]]:a):n.link=o),G.isNullOrUndefined(t[ue[this.keywordIndex]])||this.parseCharacterFormat(this.keywordIndex,t[ue[this.keywordIndex]],n.characterFormat),G.isNullOrUndefined(t[fe[this.keywordIndex]])||this.parseParagraphFormat(this.keywordIndex,t[fe[this.keywordIndex]],n.paragraphFormat),G.isNullOrUndefined(t[_e[this.keywordIndex]]))||(t[_e[this.keywordIndex]]===t[De[this.keywordIndex]]?n.next=n:(l=void 0,l=(h&&this.documentHelper.editorProperties.isRemoteAction?this.documentHelper.styles:i).findByName(t[_e[this.keywordIndex]]),G.isNullOrUndefined(l)||l.type!==n.type?(s=this.getStyle(t[_e[this.keywordIndex]],e),G.isNullOrUndefined(s)?n.next=n:(this.parseStyle(e,s,i),h&&this.documentHelper.editorProperties.isRemoteAction?n.next=this.documentHelper.styles.findByName(s.name):n.next=i.findByName(s.name))):n.next=l)),!G.isNullOrUndefined(r)&&r&&(this.keywordIndex=d),G.isNullOrUndefined(n)||"Table"===n.type||this.documentHelper.addToStylesMap(n)},i.prototype.updateParagraphFormatFromBaseStyle=function(e,t){G.isNullOrUndefined(e[fe[this.keywordIndex]])||G.isNullOrUndefined(t[fe[this.keywordIndex]])||(e=e[fe[this.keywordIndex]],t=t[fe[this.keywordIndex]],!e.hasOwnProperty(Pt[this.keywordIndex])&&t.hasOwnProperty(Pt[this.keywordIndex])&&(e[Pt[this.keywordIndex]]=t[Pt[this.keywordIndex]]),!e.hasOwnProperty(Tt[this.keywordIndex])&&t.hasOwnProperty(Tt[this.keywordIndex])&&(e[Tt[this.keywordIndex]]=t[Tt[this.keywordIndex]]),!e.hasOwnProperty(It[this.keywordIndex])&&t.hasOwnProperty(It[this.keywordIndex])&&(e[It[this.keywordIndex]]=t[It[this.keywordIndex]]),!e.hasOwnProperty(Nt[this.keywordIndex])&&t.hasOwnProperty(Nt[this.keywordIndex])&&(e[Nt[this.keywordIndex]]=t[Nt[this.keywordIndex]]),!e.hasOwnProperty(Lt[this.keywordIndex])&&t.hasOwnProperty(Lt[this.keywordIndex])&&(e[Lt[this.keywordIndex]]=t[Lt[this.keywordIndex]]),!e.hasOwnProperty(Ut[this.keywordIndex])&&t.hasOwnProperty(Ut[this.keywordIndex])&&(e[Ut[this.keywordIndex]]=t[Ut[this.keywordIndex]]),!e.hasOwnProperty(St[this.keywordIndex])&&t.hasOwnProperty(St[this.keywordIndex])&&(e[St[this.keywordIndex]]=t[St[this.keywordIndex]]),!e.hasOwnProperty(Et[this.keywordIndex])&&t.hasOwnProperty(Et[this.keywordIndex])&&(e[Et[this.keywordIndex]]=t[Et[this.keywordIndex]]),!e.hasOwnProperty(Mt[this.keywordIndex])&&t.hasOwnProperty(Mt[this.keywordIndex])&&(e[Mt[this.keywordIndex]]=t[Mt[this.keywordIndex]]),!e.hasOwnProperty(Ht[this.keywordIndex])&&t.hasOwnProperty(Ht[this.keywordIndex])&&(e[Ht[this.keywordIndex]]=t[Ht[this.keywordIndex]]),!e.hasOwnProperty(qt[this.keywordIndex])&&t.hasOwnProperty(qt[this.keywordIndex])&&(e[qt[this.keywordIndex]]=t[qt[this.keywordIndex]]),!e.hasOwnProperty(Rt[this.keywordIndex])&&t.hasOwnProperty(Rt[this.keywordIndex])&&(e[Rt[this.keywordIndex]]=t[Rt[this.keywordIndex]]))},i.prototype.getStyle=function(e,t){for(var i=0;i<t[We[this.keywordIndex]].length;i++)if(t[We[this.keywordIndex]][i][De[this.keywordIndex]]===e)return t[We[this.keywordIndex]][i]},i.prototype.parseAbstractList=function(e,t){for(var i=new N,r=0;r<e[ye[this.keywordIndex]].length;r++){var n,o=new Oc,a=e[ye[this.keywordIndex]][r];if(!G.isNullOrUndefined(a)&&(G.isNullOrUndefined(a[Na[this.keywordIndex]])||(o.abstractListId=a[Na[this.keywordIndex]]),G.isNullOrUndefined(a[Ia])||(o.nsid=a[Ia]),!G.isNullOrUndefined(a[ka[this.keywordIndex]])))for(var s=0;s<a[ka[this.keywordIndex]].length;s++){var l=a[ka[this.keywordIndex]][s];G.isNullOrUndefined(l)||(l=this.parseListLevel(l,o),o.levels.push(l))}i.containsKey(o.abstractListId)&&0<=(n=t.indexOf(i.get(o.abstractListId)))&&(t.splice(n,1),i.remove(o.abstractListId)),i.add(o.abstractListId,o),t.push(o)}},i.prototype.parseListLevel=function(e,t){t=new Nc(t);return"Bullet"===this.getListLevelPattern(e[xa[this.keywordIndex]])?(t.listLevelPattern="Bullet",t.numberFormat=G.isNullOrUndefined(e[Oa[this.keywordIndex]])?"":e[Oa[this.keywordIndex]]):(t.listLevelPattern=this.getListLevelPattern(e[xa[this.keywordIndex]]),t.startAt=e[Ca[this.keywordIndex]],t.numberFormat=G.isNullOrUndefined(e[Oa[this.keywordIndex]])?"":e[Oa[this.keywordIndex]],0<=e[Pa[this.keywordIndex]]?t.restartLevel=e[Pa[this.keywordIndex]]:t.restartLevel=e[Ta[this.keywordIndex]]),t.paraStyleName=G.isNullOrUndefined(e[Sa[this.keywordIndex]])?"":e[Sa[this.keywordIndex]],t.isLegalStyleNumbering=!G.isNullOrUndefined(e[$o[this.keywordIndex]])&&K.parseBoolValue(e[$o[this.keywordIndex]]),t.followCharacter=this.getFollowCharacterType(e[wa[this.keywordIndex]]),t.numberAlignment=this.getListNumberAlignment(e[Fa[this.keywordIndex]]),this.parseCharacterFormat(this.keywordIndex,e[ue[this.keywordIndex]],t.characterFormat),this.parseParagraphFormat(this.keywordIndex,e[fe[this.keywordIndex]],t.paragraphFormat),t},i.prototype.parseList=function(e,t){for(var i=0;i<e[me[this.keywordIndex]].length;i++){var r=new Mc,n=e[me[this.keywordIndex]][i];G.isNullOrUndefined(n[Na[this.keywordIndex]])||(r.abstractListId=n[Na[this.keywordIndex]],r.abstractList=this.documentHelper.getAbstractListById(n[Na[this.keywordIndex]])),t.push(r),G.isNullOrUndefined(n[xt[this.keywordIndex]])||(r.listId=n[xt[this.keywordIndex]]),G.isNullOrUndefined(n[Ia])?r.nsid=r.abstractList.nsid:r.nsid=n[Ia],n.hasOwnProperty(La[this.keywordIndex])&&this.parseLevelOverride(n[La[this.keywordIndex]],r)}},i.prototype.parseLevelOverride=function(e,t){if(!G.isNullOrUndefined(e))for(var i=0;i<e.length;i++){var r=new qc,n=e[i];r.startAt=n[Ca[this.keywordIndex]],r.levelNumber=n[Ta[this.keywordIndex]],G.isNullOrUndefined(n[Aa[this.keywordIndex]])||(r.overrideListLevel=this.parseListLevel(n[Aa[this.keywordIndex]],r)),t.levelOverrides.push(r)}},i.prototype.parseSections=function(e,t){for(var i=0;i<e.length;i++){var r=new Y,n=(r.sectionFormat=new C(r),e[r.index=i]),o=e[i+1],o=o&&o[ba[this.keywordIndex]]?o[ba[this.keywordIndex]]:void 0,o=o&&o[gi[this.keywordIndex]]?o[gi[this.keywordIndex]]:"NewPage";G.isNullOrUndefined(n[ba[this.keywordIndex]])||this.parseSectionFormat(this.keywordIndex,n[ba[this.keywordIndex]],r.sectionFormat),G.isNullOrUndefined(n[Wa[this.keywordIndex]])&&(n[Wa[this.keywordIndex]]={}),this.documentHelper.headersFooters.push(this.parseHeaderFooter(n[Wa[this.keywordIndex]],this.documentHelper.headersFooters)),this.isParseHeader=!1,this.parseTextBody(n[ga[this.keywordIndex]],r,i+1<e.length,o);for(var a=0;a<r.childWidgets.length;a++)r.childWidgets[a].containerWidget=r;t.push(r)}},i.prototype.parseHeaderFooter=function(e,t){this.isParseHeader=!0;var i,r={};return G.isNullOrUndefined(e[pa[this.keywordIndex]])||(i=new X("OddHeader"),this.parseTextBody(e[pa[this.keywordIndex]][ga[this.keywordIndex]],r[0]=i)),G.isNullOrUndefined(e[ua[this.keywordIndex]])||(i=new X("OddFooter"),this.parseTextBody(e[ua[this.keywordIndex]][ga[this.keywordIndex]],r[1]=i)),G.isNullOrUndefined(e[fa[this.keywordIndex]])||(i=new X("EvenHeader"),this.parseTextBody(e[fa[this.keywordIndex]][ga[this.keywordIndex]],r[2]=i)),G.isNullOrUndefined(e[ma[this.keywordIndex]])||(i=new X("EvenFooter"),this.parseTextBody(e[ma[this.keywordIndex]][ga[this.keywordIndex]],r[3]=i)),G.isNullOrUndefined(e[ya[this.keywordIndex]])||(i=new X("FirstPageHeader"),this.parseTextBody(e[ya[this.keywordIndex]][ga[this.keywordIndex]],r[4]=i)),G.isNullOrUndefined(e[va[this.keywordIndex]])||(i=new X("FirstPageFooter"),this.parseTextBody(e[va[this.keywordIndex]][ga[this.keywordIndex]],r[5]=i)),r},i.prototype.parseTextBody=function(e,t,i,r){this.parseBody(e,t.childWidgets,t,i,void 0,void 0,r)},i.prototype.addCustomStyles=function(e){if(!G.isNullOrUndefined(e[We[this.keywordIndex]]))for(var t=0;t<e[We[this.keywordIndex]].length;t++)void 0!==this.documentHelper.styles.findByName(e[We[this.keywordIndex]][t][De[this.keywordIndex]])||this.isPaste&&"Normal (Web)"===e[We[this.keywordIndex]][t][De[this.keywordIndex]]||this.parseStyle(e,e[We[this.keywordIndex]][t],this.documentHelper.styles)},i.prototype.isHtmlConvertedWebStyle=function(e){if(!G.isNullOrUndefined(e))for(var t,i=0;i<e.length;i++)if("Normal (Web)"===e[i][De[this.keywordIndex]])return t=e[i][ue[this.keywordIndex]],G.isNullOrUndefined(t)||0===Object.keys(t).length;return!0},i.prototype.parseBody=function(e,t,i,r,n,o,a,s){if(!G.isNullOrUndefined(e))for(var l=0;l<e.length;l++){var d=e[l],h=!1;if(d.hasOwnProperty(uo[this.keywordIndex])){var c,g=new Z,p=(g.characterFormat=new ce(g,this.documentHelper),g.paragraphFormat=new vl(g),this.documentHelper.layout.addLineWidget(g)),p=(0<d[uo[this.keywordIndex]].length&&(h=this.parseParagraph(d[uo[this.keywordIndex]],g,!1,p,s&&0===l)),d[ue[this.keywordIndex]]);!r||d!==e[e.length-1]||0!==d[uo[this.keywordIndex]].length||h?(this.parseCharacterFormat(this.keywordIndex,p,g.characterFormat),this.parseParagraphFormat(this.keywordIndex,d[fe[this.keywordIndex]],g.paragraphFormat),h=void 0,c="Normal",G.isNullOrUndefined(d[fe[this.keywordIndex]])||G.isNullOrUndefined(d[fe[this.keywordIndex]][st[this.keywordIndex]])||(c=d[fe[this.keywordIndex]][st[this.keywordIndex]]),h=this.documentHelper.styles.findByName(c,"Paragraph"),this.isPaste&&"Normal (Web)"===c&&this.isHtmlConvertedWebStyle(o)?h=this.selectedBaseStyle instanceof nl?this.selectedBaseStyle:this.documentHelper.styles.findByName("Normal","Paragraph"):this.isPaste&&G.isNullOrUndefined(h)&&"Normal (Web)"===c&&(h=this.documentHelper.styles.findByName("Normal","Paragraph")),G.isNullOrUndefined(h)||g.paragraphFormat.applyStyle(h)):(G.isNullOrUndefined(p)||!G.isNullOrUndefined(p[bt[this.keywordIndex]])&&0<p[bt[this.keywordIndex]].length&&this.checkAndApplyRevision(this.keywordIndex,p,g.characterFormat,g.characterFormat),r&&1===e.length||(g.isSectionBreak=!0)),t.push(g),g.index=t.length-1,g.containerWidget=i}else if(d.hasOwnProperty(Jo[this.keywordIndex]))this.parseTable(d,t,t.length,i);else if(d.hasOwnProperty(fo[this.keywordIndex])){var u=new zd("Block"),f=new zd("Block");this.parseContentControlProperties(d[fo[this.keywordIndex]],u.contentControlProperties),f.contentControlProperties=u.contentControlProperties,u.type=0,f.type=1,d.hasOwnProperty(xo[this.keywordIndex])&&(u.authorName=d[xo[this.keywordIndex]],f.authorName=d[xo[this.keywordIndex]]),d.hasOwnProperty(wo[this.keywordIndex])&&(u.revDateTime=d[wo[this.keywordIndex]],f.revDateTime=d[wo[this.keywordIndex]]),d.hasOwnProperty(Wo[this.keywordIndex])&&(u.isInsertRevision=K.parseBoolValue(d[Wo[this.keywordIndex]]),f.isInsertRevision=K.parseBoolValue(d[Wo[this.keywordIndex]])),d.hasOwnProperty(bo[this.keywordIndex])&&(u.isDeleteRevision=K.parseBoolValue(d[bo[this.keywordIndex]]),f.isDeleteRevision=K.parseBoolValue(d[bo[this.keywordIndex]])),this.parseBody(d[ga[this.keywordIndex]],t,i,r&&l===e.length-1,u.contentControlProperties);for(var m=0;m<2;m++){var y=t.length<d[ga[this.keywordIndex]].length?t[0]:0===m?t[t.length-d[ga[this.keywordIndex]].length]:t[t.length-1],v=void 0;y instanceof Z?v=y:y instanceof Q&&(v=0===m?y.firstChild.firstChild.firstChild:y.lastChild.lastChild.lastChild),G.isNullOrUndefined(v)||0!==v.childWidgets.length||(y=new ad(v),v.childWidgets.push(y)),0!==m||G.isNullOrUndefined(v)||G.isNullOrUndefined(v.firstChild)||G.isNullOrUndefined(v.firstChild.children)?G.isNullOrUndefined(v)||G.isNullOrUndefined(v.lastChild)||G.isNullOrUndefined(v.lastChild.children)||(v.lastChild.children.push(f),f.line=v.lastChild):(v.firstChild.children.splice(0,0,u),u.line=v.firstChild)}}G.isNullOrUndefined(n)||(t[t.length-1].contentControlProperties=n)}},i.prototype.parseTable=function(e,t,i,r){var n=new Q,o=!1;n.index=i,G.isNullOrUndefined(e[ta[this.keywordIndex]])||this.parseTableFormat(e[ta[this.keywordIndex]],n.tableFormat,this.keywordIndex),n.tableFormat.title=e[Co[this.keywordIndex]],n.tableFormat.description=e[Zo[this.keywordIndex]],this.parseTablePositioning(e,n);for(var a=0;a<e[Jo[this.keywordIndex]].length;a++){var s=new $,l=(s.rowFormat=new S(s),e[Jo[this.keywordIndex]][a]);if(G.isNullOrUndefined(l[fo[this.keywordIndex]])||(s.contentControlProperties=new jd("Row"),this.parseContentControlProperties(l[fo[this.keywordIndex]],s.contentControlProperties)),l.hasOwnProperty(Yo[this.keywordIndex])){this.parseRowFormat(l[Yo[this.keywordIndex]],s.rowFormat,this.keywordIndex),s.index=a;for(var d=0;d<l[Xo[this.keywordIndex]].length;d++){for(var h,c,g,p=new ee,u=(p.cellFormat=new A(p),l[Xo[this.keywordIndex]][d]),f=(G.isNullOrUndefined(u[fo[this.keywordIndex]])||(p.contentControlProperties=new jd("Cell"),this.parseContentControlProperties(u[fo[this.keywordIndex]],p.contentControlProperties)),s.childWidgets.push(p),p.containerWidget=s,p.index=d,p.rowIndex=a,u.hasOwnProperty(ws[this.keywordIndex])&&!G.isNullOrUndefined(u[ws[this.keywordIndex]])?(p.columnIndex=u[ws[this.keywordIndex]],o=!0):p.columnIndex=d,u.hasOwnProperty(Ko[this.keywordIndex])&&this.parseCellFormat(u[Ko[this.keywordIndex]],p.cellFormat,this.keywordIndex),u[ga[this.keywordIndex]]),m=0;m<f.length;m++)f[m].hasOwnProperty([Jo[this.keywordIndex]])&&(n.isContainInsideTable=!0);this.isPageBreakInsideTable=!0,this.parseTextBody(u[ga[this.keywordIndex]],p,!1),G.isNullOrUndefined(p.contentControlProperties)||(c=new zd("Cell"),h=new zd("Cell"),c.contentControlProperties=p.contentControlProperties,h.contentControlProperties=p.contentControlProperties,(u=u[mo[this.keywordIndex]])&&u.hasOwnProperty(xo[this.keywordIndex])&&(c.authorName=u[xo[this.keywordIndex]],h.authorName=u[xo[this.keywordIndex]]),u&&u.hasOwnProperty(wo[this.keywordIndex])&&(c.revDateTime=u[wo[this.keywordIndex]],h.revDateTime=u[wo[this.keywordIndex]]),u&&u.hasOwnProperty(Wo[this.keywordIndex])&&(c.isInsertRevision=u[Wo[this.keywordIndex]],h.isInsertRevision=u[Wo[this.keywordIndex]]),u&&u.hasOwnProperty(bo[this.keywordIndex])&&(c.isDeleteRevision=u[bo[this.keywordIndex]],h.isDeleteRevision=u[bo[this.keywordIndex]]),c.type=0,h.type=1,0===p.firstChild.childWidgets.length&&(g=new ad(p.firstChild),p.firstChild.childWidgets.push(g)),c.line=p.firstChild.firstChild,p.firstChild.firstChild.children.splice(0,0,c),0===p.lastChild.childWidgets.length&&(g=new ad(p.lastChild),p.lastChild.childWidgets.push(g)),h.line=p.lastChild.lastChild,p.lastChild.lastChild.children.push(h)),G.isNullOrUndefined(s.contentControlProperties)||(s.firstChild===p?((u=new zd("Row")).contentControlProperties=s.contentControlProperties,(u.type=0)===p.firstChild.childWidgets.length&&(g=new ad(p.firstChild),p.firstChild.childWidgets.push(g)),u.line=p.firstChild.firstChild,p.firstChild.firstChild.children.splice(0,0,u)):s.lastChild===p&&((c=new zd("Row")).contentControlProperties=s.contentControlProperties,c.type=1,0===p.lastChild.childWidgets.length&&(g=new ad(p.lastChild),p.lastChild.childWidgets.push(g)),c.line=p.lastChild.lastChild,p.lastChild.lastChild.children.push(c))),this.isPageBreakInsideTable=!1}}0<s.childWidgets.length&&(n.childWidgets.push(s),s.containerWidget=n)}n.containerWidget=r,0<n.childWidgets.length&&t.push(n),n.isGridUpdated=!1,n.updateRowSpan(),o||n.assignCellColumnIndexes()},i.prototype.parseTablePositioning=function(e,t){t.wrapTextAround=!G.isNullOrUndefined(e[Qo[this.keywordIndex]])&&K.parseBoolValue(e[Qo[this.keywordIndex]]),t.wrapTextAround&&(t.positioning=new ed,t.positioning.allowOverlap=K.parseBoolValue(e[ea[this.keywordIndex]][ia[this.keywordIndex]]),G.isNullOrUndefined(e[ea[this.keywordIndex]][aa[this.keywordIndex]])||(t.positioning.distanceBottom=K.convertPointToPixel(e[ea[this.keywordIndex]][aa[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][oa[this.keywordIndex]])||(t.positioning.distanceLeft=K.convertPointToPixel(e[ea[this.keywordIndex]][oa[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][na[this.keywordIndex]])||(t.positioning.distanceRight=K.convertPointToPixel(e[ea[this.keywordIndex]][na[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][ra[this.keywordIndex]])||(t.positioning.distanceTop=K.convertPointToPixel(e[ea[this.keywordIndex]][ra[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][mi[this.keywordIndex]])||(t.positioning.verticalAlignment=this.getTableVerticalPosition(e[ea[this.keywordIndex]][mi[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][sa[this.keywordIndex]])||(t.positioning.verticalOrigin=this.getTableVerticalRelation(e[ea[this.keywordIndex]][sa[this.keywordIndex]])),t.positioning.verticalPosition=e[ea[this.keywordIndex]][la[this.keywordIndex]],G.isNullOrUndefined(e[ea[this.keywordIndex]][ha[this.keywordIndex]])||(t.positioning.horizontalAlignment=this.getTableHorizontalPosition(e[ea[this.keywordIndex]][ha[this.keywordIndex]])),G.isNullOrUndefined(e[ea[this.keywordIndex]][da[this.keywordIndex]])||(t.positioning.horizontalOrigin=this.getTableHorizontalRelation(e[ea[this.keywordIndex]][da[this.keywordIndex]])),t.positioning.horizontalPosition=e[ea[this.keywordIndex]][ca[this.keywordIndex]])},i.prototype.parseRowGridValues=function(e,t,i){G.isNullOrUndefined(e[bi[i]])||(t.gridBefore=e[bi[i]]),G.isNullOrUndefined(e[xi[i]])||(t.gridBeforeWidth=e[xi[i]]),G.isNullOrUndefined(e[wi[i]])||(t.gridBeforeWidthType=this.getWidthType(e[wi[i]])),G.isNullOrUndefined(e[Fi[i]])||(t.gridAfter=e[Fi[i]]),G.isNullOrUndefined(e[Ci[i]])||(t.gridAfterWidth=e[Ci[i]]),G.isNullOrUndefined(e[Pi[i]])||(t.gridAfterWidthType=this.getWidthType(e[Pi[i]]))},i.prototype.parseContentControlProperties=function(e,t,i){if(G.isNullOrUndefined(i)&&(i=this.keywordIndex),G.isNullOrUndefined(e[yo[i]])||(t.lockContentControl=K.parseBoolValue(e[yo[i]])),G.isNullOrUndefined(e[vo[i]])||(t.lockContents=K.parseBoolValue(e[vo[i]])),G.isNullOrUndefined(e[Fo[i]])?t.tag=void 0:t.tag=e[Fo[i]],G.isNullOrUndefined(e[vn[i]])||(t.color=e[vn[i]]),G.isNullOrUndefined(e[Co[i]])?t.title=void 0:t.title=e[Co[i]],G.isNullOrUndefined(e[fs[i]])||(t.appearance=this.getContentControlAppearance(e[fs[i]])),G.isNullOrUndefined(e[ns[i]])||(t.type=this.getContentControlType(e[ns[i]])),G.isNullOrUndefined(e[Po[i]])||(t.hasPlaceHolderText=K.parseBoolValue(e[Po[i]])),G.isNullOrUndefined(e[To[i]])||(t.multiline=K.parseBoolValue(e[To[i]])),G.isNullOrUndefined(e[Oo[i]])||(t.isTemporary=K.parseBoolValue(e[Oo[i]])),G.isNullOrUndefined(e[ue[i]])||this.parseCharacterFormat(i,e[ue[i]],t.characterFormat),"CheckBox"===t.type)G.isNullOrUndefined(e[Ao[i]])||(t.isChecked=K.parseBoolValue(e[Ao[i]])),G.isNullOrUndefined(e[Lo[i]])||(t.uncheckedState=new Xd,t.uncheckedState.font=e[Lo[i]][Ro[i]],t.uncheckedState.value=e[Lo[i]][qo[i]]),G.isNullOrUndefined(e[Uo[i]])||(t.checkedState=new Xd,t.checkedState.font=e[Uo[i]][Ro[i]],t.checkedState.value=e[Uo[i]][qo[i]]);else if("Date"===t.type)G.isNullOrUndefined(e[So[i]])||(t.dateCalendarType=this.getDateCalendarType(e[So[i]])),G.isNullOrUndefined(e[No[i]])||(t.dateStorageFormat=this.getDateStorageFormat(e[No[i]])),G.isNullOrUndefined(e[Io[i]])||(t.dateDisplayLocale=e[Io[i]]),G.isNullOrUndefined(e[ko[i]])||(t.dateDisplayFormat=e[ko[i]]);else if(("ComboBox"===t.type||"DropDownList"===t.type)&&!G.isNullOrUndefined(e[Bo[i]])){t.contentControlListItems=[];for(var r=0;r<e[Bo[i]].length;r++){var n=new Kd;n.displayText=e[Bo[i]][r][Eo[i]],n.value=e[Bo[i]][r][qo[i]],t.contentControlListItems.push(n)}}G.isNullOrUndefined(e[Ho[i]])||(t.xmlMapping=new Zd,t.xmlMapping.isMapped=K.parseBoolValue(e[Ho[i]][Mo[i]]),t.xmlMapping.isWordMl=K.parseBoolValue(e[Ho[i]][Vo[i]]),G.isNullOrUndefined(e[Ho[i]][Do[i]])||(t.xmlMapping.prefixMapping=e[Ho[i]][Do[i]]),t.xmlMapping.xPath=e[Ho[i]][zo[i]],t.xmlMapping.storeItemId=e[Ho[i]][_o[i]],G.isNullOrUndefined(e[Ho[i]][jo[i]]))||(t.xmlMapping.customXmlPart=new $d,t.xmlMapping.customXmlPart.id=e[Ho[i]][jo[i]][Go[i]],t.xmlMapping.customXmlPart.xml=e[Ho[i]][jo[i]][lo[i]])},i.prototype.parseSymbol=function(e,t){var i=e.split(" "),e=i.indexOf("SYMBOL");if(-1!==e){var e=i[e+1],r=new ie,e=(r.characterFormat=new ce(r,this.documentHelper),r.text=String.fromCharCode(parseInt(e)),i.indexOf("\\f"));if(-1!==e){for(var n="",o=e+1;o<i.length&&"\\s"!==i[o];o++)n+=i[o]+" ";null!==n&&(n=(n=n.replace(/"/g,"")).trim(),r.characterFormat.fontFamily=n)}e=i.indexOf("\\s");-1!==e&&(r.characterFormat.fontSize=parseInt(i[e+1])),(r.line=t).children.push(r)}},i.prototype.parseParagraph=function(e,t,i,r,n){for(var o,a=!1,s=(G.isNullOrUndefined(r)?r=new ad(t):a=!0,!1),l=this.documentHelper.enableTrackChanges,d=!1,h=!1,c=void 0,g=0;g<e.length;g++){var p=e[g],d=!1;if((d=p.hasOwnProperty([Hn[this.keywordIndex]])&&(2!==p[Hn[this.keywordIndex]]||g!==e.length-1&&e[g+1].hasOwnProperty(Yr[this.keywordIndex])||(this.hasFieldSeparator=!0),1===p[Hn[this.keywordIndex]])&&this.hasFieldSeparator?!0:d)&&this.documentHelper.isPageField)(O=new Ud).characterFormat=new ce(O,this.documentHelper),O.text="",(O.line=r).children.push(O),s=!(this.hasFieldSeparator=!1),g--;else if(d&&!G.isNullOrUndefined(c)&&-1!==c.indexOf("SYMBOL")&&(this.parseSymbol(c,r),c=void 0,d=!1),!p.hasOwnProperty(Yr[this.keywordIndex])&&!p.hasOwnProperty(ht[this.keywordIndex])||p.hasOwnProperty(ho[this.keywordIndex])){if(p.hasOwnProperty(ho[this.keywordIndex])){var u=new Sd;u.line=r,u.footnoteType=this.getFootnoteType(p[ho[this.keywordIndex]]),("Footnote"===u.footnoteType?this.documentHelper.footnoteCollection:this.documentHelper.endnoteCollection).push(u),u.symbolCode=p[co[this.keywordIndex]],u.symbolFontName=p[go[this.keywordIndex]],u.customMarker=p[po[this.keywordIndex]],u.characterFormat=new ce(u,this.documentHelper),this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],u.characterFormat,i),this.applyCharacterStyle(p,u),this.checkAndApplyRevision(this.keywordIndex,p,u,t),this.parseBody(p[ga[this.keywordIndex]],u.bodyWidget.childWidgets,u.bodyWidget,!1,void 0,void 0,void 0,!0),r.children.push(u),s=!0}else if(p.hasOwnProperty(_r[this.keywordIndex]))this.documentHelper.isEditorModule&&(this.documentHelper.editorProperties.chartType=!0),this.parseChart(p,r,!1),s=!0;else if(p.hasOwnProperty(Fn[this.keywordIndex])){new ae(K.parseBoolValue(p[Pn[this.keywordIndex]]));u=this.parseImage(p,r,!1);"Inline"!==this.getTextWrappingStyle(u.textWrappingStyle)&&t.floatingElements.push(u),this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],u.characterFormat),s=!0}else if(p.hasOwnProperty(Un[this.keywordIndex])||p.hasOwnProperty(Hn[this.keywordIndex])&&0===p[Hn[this.keywordIndex]]){var h=!0,f=new te(0);this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],f.characterFormat,i),this.applyCharacterStyle(p,f),f.fieldCodeType=p.fieldCodeType,f.hasFieldEnd=p[Un[this.keywordIndex]],p.hasOwnProperty(Bn[this.keywordIndex])&&(m=this.parseFormFieldData(this.keywordIndex,p,m=void 0),f.formFieldData=m,this.isContextBasedPaste||this.documentHelper.formFields.push(f)),this.documentHelper.fieldStacks.push(f),this.checkAndApplyRevision(this.keywordIndex,p,f,t),f.line=r,this.isContextBasedPaste||this.documentHelper.fields.push(f),r.children.push(f)}else if(p.hasOwnProperty([Hn[this.keywordIndex]])){var m=void 0;2===p[Hn[this.keywordIndex]]||1===p[Hn[this.keywordIndex]]&&h?(m=new te(2),this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],m.characterFormat,i),this.checkAndApplyRevision(this.keywordIndex,p,m,t),this.fieldSeparator=m,0<this.documentHelper.fieldStacks.length&&(m.fieldBegin=this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1],m.fieldBegin.fieldSeparator=m,2<=r.children.length)&&(f=this.containsFieldBegin(r),!G.isNullOrUndefined(f))&&f instanceof ie&&(f.text.match("PAGE")||f.text.match("page"))&&(f.text.replace(/^\s+/g,"").startsWith("HYPERLINK")||(this.documentHelper.isPageField=!0)),1===p[Hn[this.keywordIndex]]&&h&&(g--,this.hasFieldSeparator=!0),h=!1):1===p[Hn[this.keywordIndex]]&&(m=new te(1),this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],m.characterFormat,i),this.applyCharacterStyle(p,m),this.checkAndApplyRevision(this.keywordIndex,p,m,t),0<this.documentHelper.fieldStacks.length&&(m.fieldBegin=this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1],m.fieldBegin.fieldEnd=m),!G.isNullOrUndefined(m.fieldBegin)&&m.fieldBegin.fieldSeparator&&(m.fieldSeparator=m.fieldBegin.fieldSeparator,m.fieldBegin.fieldSeparator.fieldEnd=m,s=!0),this.documentHelper.fieldStacks.splice(this.documentHelper.fieldStacks.length-1,1),this.fieldSeparator=void 0,this.documentHelper.isPageField=!1,this.isContextBasedPaste||this.documentHelper.fieldCollection.push(m.fieldBegin),c=void 0),(m.line=r).children.push(m)}else if(p.hasOwnProperty([Ra[this.keywordIndex]])){var y,v,W,b=void 0;(b=new Md(p[Ra[this.keywordIndex]])).name=p[De[this.keywordIndex]],G.isNullOrUndefined(this.documentHelper)||this.documentHelper.documentEditorSettings.allowHyphensInBookmarkNames||(y=b.name.replace("-","_"),b.name=y),b.properties=p[qa[this.keywordIndex]],G.isNullOrUndefined(p[qa[this.keywordIndex]])||(G.isNullOrUndefined(p[qa[this.keywordIndex]][Cs[this.keywordIndex]])||(b.properties.isAfterParagraphMark=K.parseBoolValue(p[qa[this.keywordIndex]][Cs[this.keywordIndex]])),G.isNullOrUndefined(p[qa[this.keywordIndex]][Os[this.keywordIndex]])||(b.properties.isAfterTableMark=K.parseBoolValue(p[qa[this.keywordIndex]][Os[this.keywordIndex]])),G.isNullOrUndefined(p[qa[this.keywordIndex]][Ts[this.keywordIndex]])||(b.properties.isAfterRowMark=K.parseBoolValue(p[qa[this.keywordIndex]][Ts[this.keywordIndex]])),G.isNullOrUndefined(p[qa[this.keywordIndex]][Ps[this.keywordIndex]])||(b.properties.isAfterCellMark=K.parseBoolValue(p[qa[this.keywordIndex]][Ps[this.keywordIndex]])),G.isNullOrUndefined(p[qa[this.keywordIndex]][_a[this.keywordIndex]])||(b.properties.columnFirst=p[qa[this.keywordIndex]][_a[this.keywordIndex]]),G.isNullOrUndefined(p[qa[this.keywordIndex]][ja[this.keywordIndex]]))||(b.properties.columnLast=p[qa[this.keywordIndex]][ja[this.keywordIndex]]),this.checkAndApplyRevision(this.keywordIndex,p,b,t),r.children.push(b),b.line=r,this.isParseHeader&&!this.isPaste||(y=!1,this.isPaste&&(y=-1!==this.documentHelper.editorProperties.selectedBookmarks.indexOf(b.name)),0===p[Ra[this.keywordIndex]]?(v=this.isPaste&&!this.documentHelper.bookmarks.containsKey(b.name),this.isPaste?v||y||r.children.splice(r.children.indexOf(b),1):this.documentHelper.bookmarks.add(b.name,b)):1===p[Ra[this.keywordIndex]]&&this.documentHelper.bookmarks.containsKey(b.name)&&(v=this.documentHelper.bookmarks.get(b.name),W=this.isPaste&&G.isNullOrUndefined(v.reference),!this.isPaste||W&&!this.isContextBasedPaste?((v.reference=b).reference=v,this.documentHelper.endBookmarksUpdated.push(b.name)):W||y||r.children.splice(r.children.indexOf(b),1))),0!==b.name.indexOf("_")&&(s=!0)}else if(p.hasOwnProperty([za[this.keywordIndex]]))p.hasOwnProperty(Ya[this.keywordIndex])?(W=new xh,this.editableRanges.containsKey(p[za[this.keywordIndex]])&&(b=this.editableRanges.get(p[za[this.keywordIndex]]),(W.editRangeStart=b).editRangeEnd=W,G.isNullOrUndefined(p[za[this.keywordIndex]])||(W.editRangeId=p[za[this.keywordIndex]]),this.editableRanges.remove(p[za[this.keywordIndex]])),r.children.push(W),W.line=r):(w=this.parseEditableRangeStart(p),r.children.push(w),w.line=r,this.editableRanges.containsKey(p[za[this.keywordIndex]])||this.editableRanges.add(p[za[this.keywordIndex]],w)),s=!0;else if(p.hasOwnProperty([Zn[this.keywordIndex]])&&!this.isParseHeader){var x,w=p[Zn[this.keywordIndex]],F=void 0;this.commentStarts.containsKey(w)&&this.commentStarts.get(w);this.commentEnds.containsKey(w)&&this.commentEnds.get(w),p.hasOwnProperty([Qn[this.keywordIndex]])&&(0===p[Qn[this.keywordIndex]]?((x=new ac(0)).commentId=w,this.commentStarts.containsKey(w)||this.commentStarts.add(w,x),(x.line=r).children.push(x),F=this.commentsCollection.get(w),G.isNullOrUndefined(F)||((F.commentStart=x).comment=F)):((x=new ac(1)).commentId=w,this.commentEnds.containsKey(w)||this.commentEnds.add(w,x),(x.line=r).children.push(x),F=this.commentsCollection.get(w),G.isNullOrUndefined(F)||((F.commentEnd=x).comment=F)),!G.isNullOrUndefined(F))&&F.isReply&&(G.isNullOrUndefined(F.ownerComment.commentStart)&&(F.ownerComment.commentStart=F.commentStart),G.isNullOrUndefined(F.ownerComment.commentEnd))&&(F.ownerComment.commentEnd=F.commentEnd)}else if(p.hasOwnProperty([Xr[this.keywordIndex]])){F=this.parseShape(p,r);F.line=r,this.checkAndApplyRevision(this.keywordIndex,p,F,t),r.children.push(F),t.floatingElements.push(F)}else if(p.hasOwnProperty(fo[this.keywordIndex])){for(var C=new zd("Inline"),P=new zd("Inline"),T=(this.parseContentControlProperties(p[fo[this.keywordIndex]],C.contentControlProperties),P.contentControlProperties=C.contentControlProperties,C.line=r,P.line=r,C.type=0,P.type=1,p.hasOwnProperty(xo[this.keywordIndex])&&(C.authorName=p[xo[this.keywordIndex]],P.authorName=p[xo[this.keywordIndex]]),p.hasOwnProperty(wo[this.keywordIndex])&&(C.revDateTime=p[wo[this.keywordIndex]],P.revDateTime=p[wo[this.keywordIndex]]),p.hasOwnProperty(Wo[this.keywordIndex])&&(C.isInsertRevision=K.parseBoolValue(p[Wo[this.keywordIndex]]),P.isInsertRevision=K.parseBoolValue(p[Wo[this.keywordIndex]])),p.hasOwnProperty(bo[this.keywordIndex])&&(C.isDeleteRevision=K.parseBoolValue(p[bo[this.keywordIndex]]),P.isDeleteRevision=K.parseBoolValue(p[bo[this.keywordIndex]])),r.children.push(C),this.parseParagraph(p[uo[this.keywordIndex]],t,i,r),r.children[r.children.length-1]);!(T instanceof zd);)T.contentControlProperties=C.contentControlProperties,T=T.previousElement;r.children.push(P),s=!0}}else{var O=void 0;if(this.documentHelper.isPageField){var P=this.documentHelper.fieldStacks[this.documentHelper.fieldStacks.length-1],S=r.children[r.children.length-1];if(this.isParseHeader&&S instanceof Ud&&S.fieldBegin===P)continue;(O=new Ud).fieldBegin=P}else if("\t"===p[Yr[this.keywordIndex]])O=new Rd;else{if("\f"===p[Yr[this.keywordIndex]]&&this.isPageBreakInsideTable)continue;if(p.hasOwnProperty(ht[this.keywordIndex]))(O=new xc).breakClearType=this.getBreakClearType(p[ht[this.keywordIndex]]);else if(""===p[Yr[this.keywordIndex]]||K.checkTextFormat(p[Yr[this.keywordIndex]])&&0===r.children.length&&0===g&&n)O=new Pc;else if(O=new ie,0===p[Yr[this.keywordIndex]].length&&!G.isNullOrUndefined(p[bt[this.keywordIndex]]))continue}O.characterFormat=new ce(O,this.documentHelper),this.parseCharacterFormat(this.keywordIndex,p[ue[this.keywordIndex]],O.characterFormat,i),this.applyCharacterStyle(p,O),O.text=O instanceof xc?"\v":p[Yr[this.keywordIndex]].replace(/\n/g," "),c=O.text,this.isHtmlPaste&&(O instanceof ie||O instanceof xc)&&(S=void 0,0<r.children.length&&(S=r.children[r.children.length-1]),this.documentHelper.textHelper.isRTLText(O.text)?(O.characterFormat.bidi=!0,S instanceof ie&&" "===S.text&&(S.characterFormat.bidi=!0)):" "===O.text&&S&&S.characterFormat.bidi&&(O.characterFormat.bidi=!0));for(var N=(O.line=r).children,I=N.length-1;0<N.length&&N[I]instanceof Md&&!G.isNullOrUndefined(N[I].properties)&&!0===N[I].properties.isAfterParagraphMark;)I--;if(I!==N.length-1?N.splice(I+1,0,O):N.push(O),this.documentHelper.parser.isPaste&&!this.isCutPerformed){if(!G.isNullOrUndefined(p[bt[this.keywordIndex]]))for(var k=0;k<p[bt[this.keywordIndex]].length;k++)this.revisionCollection.containsKey(p[bt[this.keywordIndex]][k])&&(l&&(o=this.revisionCollection.get(p[bt[this.keywordIndex]][k])),G.isNullOrUndefined(o)||!(1<r.children.length)||G.isNullOrUndefined(r.children[g-1].getRevision(k))||l&&"Deletion"!==o.revisionType||o.revisionID!==p[bt[this.keywordIndex]][k]?(l||(o=(this.documentHelper.revisionsInternal.containsKey(p[bt[this.keywordIndex]][k])?this.documentHelper.revisionsInternal:this.revisionCollection).get(p[bt[this.keywordIndex]][k])),this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.isRemoteAction?this.revisionHelper.insertRevision(O,o.revisionType,o.author,void 0,void 0,!1,o.revisionID):this.revisionHelper.insertRevision(O,o.revisionType,o.author,void 0,void 0,!1),p[bt[this.keywordIndex]][k]=O.revisions[k].revisionID):(p[bt[this.keywordIndex]][k]=r.children[g-1].getRevision(k).revisionID,this.checkAndApplyRevision(this.keywordIndex,p,O,t)));this.documentHelper.textHelper.isRTLText(O.text)&&(this.documentHelper.layout.isDocumentContainsRtl=!0)}else this.checkAndApplyRevision(this.keywordIndex,p,O,t);O instanceof ie&&90<O.text.length&&K.splitWordByMaxLength(O,r,!0),s=!0}}return this.isCutPerformed=!1,a||t.childWidgets.push(r),s},i.prototype.parseShape=function(e,t){var i;if(e.hasOwnProperty(Fn[this.keywordIndex]))return this.parseImage(e,t,!0);if(e.hasOwnProperty(_r[this.keywordIndex]))return this.parseChart(e,t,!0);if(i=new(e[Us[this.keywordIndex]]?oe:ne),(i=this.ParseChildShape(e,i))instanceof oe){for(var r=0;r<e[Us[this.keywordIndex]].length;r++){var n=e[Us[this.keywordIndex]][r],o=this.parseShape(n,t);o.line=t,o.containerShape=i,o instanceof oe||(o.shapeX=K.convertPointToPixel(n.x),o.shapeY=K.convertPointToPixel(n.y),o.shapeWidth=K.convertPointToPixel(n[en[this.keywordIndex]]),o.shapeHeight=K.convertPointToPixel(n[tn[this.keywordIndex]])),this.checkAndApplyRevision(this.keywordIndex,n,o,t.paragraph),i.childWidgets.push(o)}i.shapeX=K.convertPointToPixel(e.x),i.shapeY=K.convertPointToPixel(e.y),i.shapeWidth=K.convertPointToPixel(e[en[this.keywordIndex]]),i.shapeHeight=K.convertPointToPixel(e[tn[this.keywordIndex]]),i.offsetXValue=K.convertPointToPixel(e[Bs[this.keywordIndex]]),i.offsetYValue=K.convertPointToPixel(e[Hs[this.keywordIndex]]),i.extentXValue=K.convertPointToPixel(e[Rs[this.keywordIndex]]),i.extentYValue=K.convertPointToPixel(e[qs[this.keywordIndex]]),i.is2007Shape=K.parseBoolValue(e[Ds[this.keywordIndex]]),i.coordinateSize=e[Vs[this.keywordIndex]],i.coordinateXOrigin=K.convertPointToPixel(e[Es[this.keywordIndex]]),i.coordinateYOrigin=K.convertPointToPixel(e[Ms[this.keywordIndex]]),i.leftMargin=K.convertPointToPixel(e[Xt[this.keywordIndex]]),i.topMargin=K.convertPointToPixel(e[Zt[this.keywordIndex]])}return i},i.prototype.ParseChildShape=function(e,t){var i;return t.shapeId=e[Xr[this.keywordIndex]],t.name=e[De[this.keywordIndex]],t.alternateText=e[Jr[this.keywordIndex]],t.title=e[Co[this.keywordIndex]],t.visible=K.parseBoolValue(e[Zr[this.keywordIndex]]),t.width=K.convertPointToPixel(e[en[this.keywordIndex]]),t.height=K.convertPointToPixel(e[tn[this.keywordIndex]]),t.is2007Shape=K.parseBoolValue(e[Ds[this.keywordIndex]]),t.coordinateSize=e[Vs[this.keywordIndex]],t.coordinateXOrigin=K.convertPointToPixel(e[Es[this.keywordIndex]]),t.coordinateYOrigin=K.convertPointToPixel(e[Ms[this.keywordIndex]]),t.leftMargin=K.convertPointToPixel(e[Xt[this.keywordIndex]]),t.topMargin=K.convertPointToPixel(e[Zt[this.keywordIndex]]),t.lineFromXPosition=e[zs[this.keywordIndex]],t.lineFromYPosition=e[_s[this.keywordIndex]],t.lineToXPosition=e[js[this.keywordIndex]],t.lineToYPosition=e[Gs[this.keywordIndex]],0===t.height&&(t.isZeroHeight=!0),t.widthScale=e[rn[this.keywordIndex]],t.heightScale=e[nn[this.keywordIndex]],t.verticalPosition=K.convertPointToPixel(e[la[this.keywordIndex]]),t.verticalOrigin=this.getVerticalOrigin(e[sa[this.keywordIndex]]),t.verticalAlignment=this.getShapeVerticalAlignment(e[mi[this.keywordIndex]]),t.verticalRelativePercent=e[dn[this.keywordIndex]],t.horizontalPosition=K.convertPointToPixel(e[ca[this.keywordIndex]]),t.horizontalOrigin=this.getHorizontalOrigin(e[da[this.keywordIndex]]),t.horizontalAlignment=this.getShapeHorizontalAlignment(e[ha[this.keywordIndex]]),t.horizontalRelativePercent=e[hn[this.keywordIndex]],t.heightRelativePercent=e[cn[this.keywordIndex]],t.widthRelativePercent=e[gn[this.keywordIndex]],t.zOrderPosition=e[pn[this.keywordIndex]],t.allowOverlap=K.parseBoolValue(e[ia[this.keywordIndex]]),t.textWrappingStyle=this.getTextWrappingStyle(e[sn[this.keywordIndex]]),t.textWrappingType=this.getTextWrappingType(e[ln[this.keywordIndex]]),t.isBelowText=K.parseBoolValue(e[Qr[this.keywordIndex]]),t.isHorizontalRule=K.parseBoolValue(e[$r[this.keywordIndex]]),G.isNullOrUndefined(e[aa[this.keywordIndex]])||(t.distanceBottom=K.convertPointToPixel(e[aa[this.keywordIndex]])),G.isNullOrUndefined(e[oa[this.keywordIndex]])||(t.distanceLeft=K.convertPointToPixel(e[oa[this.keywordIndex]])),G.isNullOrUndefined(e[na[this.keywordIndex]])||(t.distanceRight=K.convertPointToPixel(e[na[this.keywordIndex]])),G.isNullOrUndefined(e[ra[this.keywordIndex]])||(t.distanceTop=K.convertPointToPixel(e[ra[this.keywordIndex]])),t.layoutInCell=K.parseBoolValue(e[un[this.keywordIndex]]),t.lockAnchor=K.parseBoolValue(e[fn[this.keywordIndex]]),t.autoShapeType=this.getAutoShapeType(e[mn[this.keywordIndex]]),t.editingPoints=e[Ls[this.keywordIndex]],e.hasOwnProperty(on[this.keywordIndex])&&((i=new gh).line=K.parseBoolValue(e[on[this.keywordIndex]][er[this.keywordIndex]]),i.lineFormatType=this.getLineFormatType(e[on[this.keywordIndex]][ms[this.keywordIndex]]),i.color=e[on[this.keywordIndex]][vn[this.keywordIndex]],i.weight=e[on[this.keywordIndex]][vs[this.keywordIndex]],i.dashStyle=this.getLineDashStyle(e[on[this.keywordIndex]][Ki[this.keywordIndex]]),t.lineFormat=i),e.hasOwnProperty(an[this.keywordIndex])&&((i=new uh).color=e[an[this.keywordIndex]][vn[this.keywordIndex]],i.fill=K.parseBoolValue(e[an[this.keywordIndex]][Wn[this.keywordIndex]]),i.isDefaultFill=K.parseBoolValue(e[an[this.keywordIndex]][bn[this.keywordIndex]]),i.foreColor=e[an[this.keywordIndex]][tr[this.keywordIndex]],i.fillType=this.getFillType(e[an[this.keywordIndex]][xn[this.keywordIndex]]),t.fillFormat=i),t instanceof ne&&e.hasOwnProperty(yn[this.keywordIndex])&&((i=new P).textVerticalAlignment=this.getTextVerticalAlignment(e[yn[this.keywordIndex]][wn[this.keywordIndex]]),i.marginLeft=K.convertPointToPixel(e[yn[this.keywordIndex]][Xt[this.keywordIndex]]),i.marginRight=K.convertPointToPixel(e[yn[this.keywordIndex]][Jt[this.keywordIndex]]),i.marginTop=K.convertPointToPixel(e[yn[this.keywordIndex]][Zt[this.keywordIndex]]),i.marginBottom=K.convertPointToPixel(e[yn[this.keywordIndex]][Qt[this.keywordIndex]]),0==e[yn[this.keywordIndex]][ga[this.keywordIndex]].length&&e[yn[this.keywordIndex]][ga[this.keywordIndex]].push({i:[]}),this.parseBody(e[yn[this.keywordIndex]][ga[this.keywordIndex]],i.childWidgets,i),(t.textFrame=i).containerShape=t),t},i.prototype.parseImage=function(e,t,i){var r=this,n=new ae(K.parseBoolValue(e[Pn[this.keywordIndex]])),i=(n.isMetaFile=K.parseBoolValue(e[Tn[this.keywordIndex]]),n.isCompressed=e[xs[this.keywordIndex]],n.metaFileImageString=e[Cn[this.keywordIndex]],n.characterFormat=new ce(n,this.documentHelper),n.line=t,i||(this.checkAndApplyRevision(this.keywordIndex,e,n,t.paragraph),t.children.push(n)),K.formatClippedString(e[Fn[this.keywordIndex]]).formatClippedString);return this.validateImageUrl(i)?this.isPaste&&!G.isNullOrUndefined(this.documentHelper.editorProperties.pasteImageIndex)?(n.imageString=this.documentHelper.editorProperties.pasteImageIndex.get(e[Fn[this.keywordIndex]]),G.isNullOrUndefined(e[Cn[this.keywordIndex]])||(n.metaFileImageString=this.documentHelper.editorProperties.pasteImageIndex.get(e[Cn[this.keywordIndex]]))):n.imageString=e[Fn[this.keywordIndex]]:n.imageString="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEX///8AAADgAADY2Njl5eVcXFxjY2NZWVl/f3+wsLCmpqb4+PiioqKpqam7u7vV1dX2uLj2wsLhFRXzpKT3vb30sbHhCwv74+P40dH+9vbkIyO2trbBwcHLy8tsbGycnJz529v4zMzrbGzlLS3qZmblNzfrdXXoRkbvi4vvgYHlHh7CZsBOAAADpUlEQVR4nO3da1faQBSF4ekAUQlUEFs14AXxVv7/D6yaQiZx5mSEYXF2ut+PNKzyyK5diYDmR9czx34AB49C/CjE759w3jvvWr15Tdgz3atXE54f++EcIArxoxA/CvGjED8K8aMQPwrxoxA/CvGLEeZ9jPJdhfk4GyCUjb3ECGE/Q6m/q3DwfudjP0ERZYN9hKdn2hvd3+0jHJz5/kBVuTk96bbQUEjhYR9ckiikUH8UUqg/CinUH4UU6o9CCvVHIYX6o5BC/VFIof4opFB/FFKoPwop1B+FFOqPQgrjyxfjVC38Lxk9tnAxGqZqdKtSOE4GHA5/fuNJpDCtcNHbv4VqYYqPLjgfUViPQgrjozA2CptRSGF8/59w+Wrt+rr1btNna1cPzg0wwuXavncxabnX7PfHYYXzlYARvlobQZyUR9mXm+1NMEK7SSLONgcVV9vb8IQXv4J3KSeKKlxXxNCzONkeYp8AV3p9UT1+P3FWHVAsq5thhGZSEb1DrSZq7dS5HUdoLiuBZ6jORG3tCwAkNJfCUJ2Jrqe1P0ESCkMNTdSACYNDDU7UoAkDQw1P1MAJvUMVJmrwhJ6hShM1gMIvQxUnahCFjaHKEzWQQneoxR95ogZTWBuqPFEDKnSHKk/UoArdoYoTNbDC5lBDEzW4QjMpYiZqgIXG/S76JhwHK5zVVipcnkIVuv/RW/HyFKhwYhuFr6NiCmdNoDBUSGFjovJQEYXuRN9ahwoorJ8uSZenPsMTNk+X2q6jwgm/ntHL11HhhL4zenmoYEL/Gb04VCxh6KKTNFQoYfiikzBUJKF00Sk8VCChfF00OFQcYdt10dBQYYRT5xn0n9G7Q0X8GfCzNNEyZ6iPgD/HlydaVg11DfhajJaJlm2HugIUrlomWrYZKuJKHz6vHhbSM/hROdRnxNe1meuXYvW0DB6+aflYrB7dlzDiCM3N1dVN6GDhMCDhjlHYjEIK46MwNgqbUUhhfJ/vA07wO8N1vw94ONo/3e/lTpVOYfc/UyG//ZmqW52fi/FuTNW3/lZ+eguF+qOQQv1RSKH+KKRQfxRSqD8KKdQfhRTqj0IK9UchhfqjkEL9UUih/iikUH8UUqg/CmXh6Hsv3jlK+wnvD/vgkrSHMMuyu1P9ZdmuwnycDQYn+svG3n9KEUKT9zHyf6+IEWJHIX4U4kchfhTiRyF+FOJHIX4U4kchfnVhijeZa6sunCf4ZdPamteEHY5C/CjEr/vCv0ec0g+AtS1QAAAAAElFTkSuQmCC","NaN"===parseInt(e[Fn[this.keywordIndex]]).toString()&&this.documentHelper.addBase64StringInCollection(n),n.width=K.convertPointToPixel(e[en[this.keywordIndex]]),n.height=K.convertPointToPixel(e[tn[this.keywordIndex]]),this.isContextBasedPaste||(t=this.documentHelper.getImageString(n),G.isNullOrUndefined(t)||!K.startsWith(t,"http://")&&!K.startsWith(t,"https://")||(n.element.crossOrigin="Anonymous",this.viewer.documentHelper.getBase64(t,n.width,n.height).then(function(e){r.viewer.documentHelper.images.get(parseInt(n.imageString))[1]=e,n.element.src=e})),n.element.src=t),n.top=e[Sn[this.keywordIndex]],n.left=e[kn[this.keywordIndex]],n.bottom=e[Nn[this.keywordIndex]],n.right=e[In[this.keywordIndex]],n.cropHeightScale=e[An[this.keywordIndex]],n.cropWidthScale=e[Ln[this.keywordIndex]],n.name=e[De[this.keywordIndex]],n.alternateText=e[Jr[this.keywordIndex]],n.title=e[Co[this.keywordIndex]],n.visible=K.parseBoolValue(e[Zr[this.keywordIndex]]),n.widthScale=e[rn[this.keywordIndex]],n.heightScale=e[nn[this.keywordIndex]],n.verticalPosition=K.convertPointToPixel(e[la[this.keywordIndex]]),n.verticalOrigin=this.getVerticalOrigin(e[sa[this.keywordIndex]]),n.verticalAlignment=this.getShapeVerticalAlignment(e[mi[this.keywordIndex]]),n.horizontalPosition=K.convertPointToPixel(e[ca[this.keywordIndex]]),n.horizontalOrigin=this.getHorizontalOrigin(e[da[this.keywordIndex]]),n.horizontalAlignment=this.getShapeHorizontalAlignment(e[ha[this.keywordIndex]]),n.allowOverlap=K.parseBoolValue(e[ia[this.keywordIndex]]),G.isNullOrUndefined(e[On[this.keywordIndex]])||(n.hasImageReference=K.parseBoolValue(e[On[this.keywordIndex]])),G.isNullOrUndefined(e[sn[this.keywordIndex]])||(n.textWrappingStyle=this.getTextWrappingStyle(e[sn[this.keywordIndex]])),G.isNullOrUndefined(e[ln[this.keywordIndex]])||(n.textWrappingType=this.getTextWrappingType(e[ln[this.keywordIndex]])),n.isBelowText=K.parseBoolValue(e[Qr[this.keywordIndex]]),G.isNullOrUndefined(e[aa[this.keywordIndex]])||(n.distanceBottom=K.convertPointToPixel(e[aa[this.keywordIndex]])),G.isNullOrUndefined(e[oa[this.keywordIndex]])||(n.distanceLeft=K.convertPointToPixel(e[oa[this.keywordIndex]])),G.isNullOrUndefined(e[na[this.keywordIndex]])||(n.distanceRight=K.convertPointToPixel(e[na[this.keywordIndex]])),G.isNullOrUndefined(e[ra[this.keywordIndex]])||(n.distanceTop=K.convertPointToPixel(e[ra[this.keywordIndex]])),n.is2007Shape=K.parseBoolValue(e[Ds[this.keywordIndex]]),n.coordinateSize=e[Vs[this.keywordIndex]],n.coordinateXOrigin=K.convertPointToPixel(e[Es[this.keywordIndex]]),n.coordinateYOrigin=K.convertPointToPixel(e[Ms[this.keywordIndex]]),n.leftMargin=K.convertPointToPixel(e[Xt[this.keywordIndex]]),n.topMargin=K.convertPointToPixel(e[Zt[this.keywordIndex]]),n.lineFromXPosition=e[zs[this.keywordIndex]],n.lineFromYPosition=e[_s[this.keywordIndex]],n.lineToXPosition=e[js[this.keywordIndex]],n.lineToYPosition=e[Gs[this.keywordIndex]],n.zOrderPosition=e[pn[this.keywordIndex]],n.layoutInCell=K.parseBoolValue(e[un[this.keywordIndex]]),n.is2007Shape=K.parseBoolValue(e[Ds[this.keywordIndex]]),n.coordinateSize=e[Vs[this.keywordIndex]],n.coordinateXOrigin=K.convertPointToPixel(e[Es[this.keywordIndex]]),n.coordinateYOrigin=K.convertPointToPixel(e[Ms[this.keywordIndex]]),n.leftMargin=K.convertPointToPixel(e[Xt[this.keywordIndex]]),n.topMargin=K.convertPointToPixel(e[Zt[this.keywordIndex]]),n.lineFromXPosition=e[zs[this.keywordIndex]],n.lineFromYPosition=e[_s[this.keywordIndex]],n.lineToXPosition=e[js[this.keywordIndex]],n.lineToYPosition=e[Gs[this.keywordIndex]],(!G.isNullOrUndefined(e[Sn[this.keywordIndex]])&&0!==e[Sn[this.keywordIndex]]||!G.isNullOrUndefined(e[Nn[this.keywordIndex]])&&0!==e[Nn[this.keywordIndex]]||!G.isNullOrUndefined(e[kn[this.keywordIndex]])&&0!==e[kn[this.keywordIndex]]||!G.isNullOrUndefined(e[In[this.keywordIndex]])&&0!==e[In[this.keywordIndex]])&&(n.isCrop=!0),n},i.prototype.parseChart=function(e,t,i){var r=new Oh,i=(r.line=t,i||(this.checkAndApplyRevision(this.keywordIndex,e,r,t.paragraph),t.children.push(r)),r.title=e[zr[this.keywordIndex]],r.type=e[_r[this.keywordIndex]],r.chartGapWidth=e[jr[this.keywordIndex]],r.chartOverlap=e[Gr[this.keywordIndex]],this.parseChartTitleArea(e[qr[this.keywordIndex]],r.chartTitleArea),this.parseChartArea(e[Rr[this.keywordIndex]],r.chartArea),this.parseChartArea(e[Er[this.keywordIndex]],r.chartPlotArea),this.parseChartLegend(e[Mr[this.keywordIndex]],r.chartLegend),this.parseChartData(e,r),this.parseChartCategoryAxis(e[Vr[this.keywordIndex]],r.chartPrimaryCategoryAxis),this.parseChartCategoryAxis(e[Dr[this.keywordIndex]],r.chartPrimaryValueAxis),null!=e[Kr[this.keywordIndex]]&&this.parseChartDataTable(e[Kr[this.keywordIndex]],r.chartDataTable),r.height=K.convertPointToPixel(e[tn[this.keywordIndex]]),r.width=K.convertPointToPixel(e[en[this.keywordIndex]]),new m.ChartComponent);return i.chartRender(e,this.keywordIndex),(r.officeChart=i).chart.appendTo(r.targetElement),r},i.prototype.parseFormFieldData=function(e,t,i){if(i instanceof fd||i instanceof vd||i instanceof xd)i instanceof vd?(i.sizeType=t.sizeType,i.size=t.size,i.defaultValue=t.defaultValue,i.checked=t.checked):i instanceof fd?(i.type=t.type,i.maxLength=t.maxLength,i.defaultValue=t.defaultValue,i.format=t.format):(i.dropdownItems=t.dropdownItems,i.selectedIndex=t.selectedIndex),i.name=t.name,i.enabled=t.enabled,i.helpText=t.helpText,i.statusText=t.statusText;else{if(t[Bn[e]].hasOwnProperty(Mn[e]))(i=new fd).type=this.getTextFormFieldType(t[Bn[e]][Mn[e]][ns[e]]),i.maxLength=t[Bn[e]][Mn[e]][zn[e]],i.defaultValue=t[Bn[e]][Mn[e]][_n[e]],i.format=this.getTextFormFieldFormat(t[Bn[e]][Mn[e]][jn[e]]);else if(t[Bn[e]].hasOwnProperty(Vn[e]))(i=new vd).sizeType=this.getCheckBoxSizeType(t[Bn[e]][Vn[e]][Gn[e]]),i.size=t[Bn[e]][Vn[e]][Kn[e]],i.defaultValue=K.parseBoolValue(t[Bn[e]][Vn[e]][_n[e]]),i.checked=K.parseBoolValue(t[Bn[e]][Vn[e]][Yn[e]]);else{i=new xd;for(var r=t[Bn[e]][Dn[e]][Xn[e]],n=0;n<r.length&&!(24<i.dropdownItems.length);n++)i.dropdownItems.push(r[n]);var o=t[Bn[e]][Dn[e]][Jn[e]];"string"==typeof o&&-1!==r.indexOf(o)?i.selectedIndex=r.indexOf(o):0<=o&&o<i.dropdownItems.length?i.selectedIndex=o:i.selectedIndex=0}i.name=t[Bn[e]][De[e]],i.enabled=K.parseBoolValue(t[Bn[e]][Rn[e]]),i.helpText=t[Bn[e]][qn[e]],i.statusText=t[Bn[e]][En[e]]}return i},i.prototype.applyCharacterStyle=function(e,t){G.isNullOrUndefined(e[ue[this.keywordIndex]])||G.isNullOrUndefined(e[ue[this.keywordIndex]][st[this.keywordIndex]])||(e=this.documentHelper.styles.findByName(e[ue[this.keywordIndex]][st[this.keywordIndex]],"Character"),t.characterFormat.applyStyle(e))},i.prototype.parseEditableRangeStart=function(e){var t=new Ch,i=(G.isNullOrUndefined(e[_a[this.keywordIndex]])||(t.columnFirst=e[_a[this.keywordIndex]]),G.isNullOrUndefined(e[ja[this.keywordIndex]])||(t.columnLast=e[ja[this.keywordIndex]]),G.isNullOrUndefined(e[za[this.keywordIndex]])||(t.editRangeId=e[za[this.keywordIndex]]),G.isNullOrUndefined(e[Ga[this.keywordIndex]])?"":e[Ga[this.keywordIndex]]),e=G.isNullOrUndefined(e[Ka[this.keywordIndex]])?"":e[Ka[this.keywordIndex]];return"everyone"===e&&(e="Everyone"),""!==i&&(t.user=i,-1===this.documentHelper.userCollection.indexOf(t.user)&&this.documentHelper.userCollection.push(t.user),this.addEditRangeCollection(t.user,t)),""!==e&&(t.group=e,-1===this.documentHelper.userCollection.indexOf(t.group)&&this.documentHelper.userCollection.push(t.group),this.addEditRangeCollection(t.group,t)),""===i&&""===e&&(t.group="Everyone",-1===this.documentHelper.userCollection.indexOf("Everyone")&&this.documentHelper.userCollection.push("Everyone"),this.addEditRangeCollection("Everyone",t)),t},i.prototype.addEditRangeCollection=function(e,t){var i;this.documentHelper.editRanges.containsKey(e)?this.documentHelper.editRanges.get(e).push(t):((i=[]).push(t),this.documentHelper.editRanges.add(e,i))},i.prototype.parseChartTitleArea=function(e,t){t.chartfontName=e[bs[this.keywordIndex]],t.chartFontSize=e[nt[this.keywordIndex]],this.parseChartDataFormat(e[Ji[this.keywordIndex]],t.dataFormat),this.parseChartLayout(e[Xi[this.keywordIndex]],t.layout)},i.prototype.parseChartDataFormat=function(e,t){t.fill.color=e[Wn[this.keywordIndex]][tr[this.keywordIndex]],t.fill.rgb=e[Wn[this.keywordIndex]][us[this.keywordIndex]],t.line.color=e[er[this.keywordIndex]][vn[this.keywordIndex]],t.line.rgb=e[er[this.keywordIndex]][us[this.keywordIndex]]},i.prototype.parseChartLayout=function(e,t){t.chartLayoutLeft=e[ir[this.keywordIndex]],t.chartLayoutTop=e[rr[this.keywordIndex]]},i.prototype.parseChartLegend=function(e,t){t.chartLegendPostion=e[Ma[this.keywordIndex]],this.parseChartTitleArea(e[qr[this.keywordIndex]],t.chartTitleArea)},i.prototype.parseChartCategoryAxis=function(e,t){t.categoryAxisType=e[Ur[this.keywordIndex]],t.categoryNumberFormat=e[Oa[this.keywordIndex]],e.hasOwnProperty(as[this.keywordIndex])&&(t.isAutoInternal=K.parseBoolValue(e[as[this.keywordIndex]])),t.interval=e[os[this.keywordIndex]],t.axisFontSize=e[nt[this.keywordIndex]],t.axisFontName=e[bs[this.keywordIndex]],t.max=e[ss[this.keywordIndex]],t.min=e[ls[this.keywordIndex]],t.majorGridLines=K.parseBoolValue(e[ds[this.keywordIndex]]),t.minorGridLines=K.parseBoolValue(e[hs[this.keywordIndex]]),t.majorTick=e[cs[this.keywordIndex]],t.minorTick=e[gs[this.keywordIndex]],t.tickPosition=e[ps[this.keywordIndex]],t.categoryAxisTitle=e[zr[this.keywordIndex]],null!=e[zr[this.keywordIndex]]&&this.parseChartTitleArea(e[qr[this.keywordIndex]],t.chartTitleArea)},i.prototype.parseChartDataTable=function(e,t){t.showSeriesKeys=K.parseBoolValue(e[Ir[this.keywordIndex]]),t.hasHorzBorder=K.parseBoolValue(e[kr[this.keywordIndex]]),t.hasVertBorder=K.parseBoolValue(e[Ar[this.keywordIndex]]),t.hasBorders=K.parseBoolValue(e[Lr[this.keywordIndex]])},i.prototype.parseChartArea=function(e,t){t.chartForeColor=e[tr[this.keywordIndex]]},i.prototype.parseChartData=function(e,t){for(var i=0;i<e[Br[this.keywordIndex]].length;i++){var r=new kh,n=e[Br[this.keywordIndex]][i];n.hasOwnProperty($i[this.keywordIndex])&&(r.xName=n[$i[this.keywordIndex]]);for(var o=0;o<n[Qi[this.keywordIndex]].length;o++){var a=new Lh,s=n[Qi[this.keywordIndex]][o];a.yAxisValue=s[Zi[this.keywordIndex]],"Bubble"===e[_r[this.keywordIndex]]&&(a.bubbleSize=s[Kn[this.keywordIndex]]),r.chartData.push(a)}t.chartCategory.push(r)}this.parseChartSeries(e,t)},i.prototype.parseChartSeries=function(e,t){for(var i=e[_r[this.keywordIndex]],r="Pie"===i||"Doughnut"===i,n=0;n<e[Hr[this.keywordIndex]].length;n++){var o,a,s=new Rh,l=e[Hr[this.keywordIndex]][n];l.hasOwnProperty(fr[this.keywordIndex])&&(s.seriesName=l[fr[this.keywordIndex]],r&&(l.hasOwnProperty(xr[this.keywordIndex])&&(s.firstSliceAngle=l[xr[this.keywordIndex]]),"Doughnut"===i)&&(s.doughnutHoleSize=l[wr[this.keywordIndex]]),l.hasOwnProperty(mr[this.keywordIndex])&&this.parseChartDataLabels(l[mr[this.keywordIndex]],s),l.hasOwnProperty(vr[this.keywordIndex])&&(o=new Vh,a=l[vr[this.keywordIndex]],o.markerStyle=a[sr[this.keywordIndex]],o.markerColor=a[lr[this.keywordIndex]],o.numberValue=a[dr[this.keywordIndex]],s.seriesFormat=o),l.hasOwnProperty(yr[this.keywordIndex])&&((a=s.errorBar).errorType=l[yr[this.keywordIndex]][ns[this.keywordIndex]],a.errorDirection=l[yr[this.keywordIndex]][nr[this.keywordIndex]],a.errorEndStyle=l[yr[this.keywordIndex]][or[this.keywordIndex]],a.numberValue=l[yr[this.keywordIndex]][ar[this.keywordIndex]]),l.hasOwnProperty(Wr[this.keywordIndex])&&this.parseChartTrendLines(l[Wr[this.keywordIndex]],s),this.parseChartSeriesDataPoints(l[br[this.keywordIndex]],s)),t.chartSeries.push(s)}},i.prototype.parseChartDataLabels=function(e,t){var i=new zh;i.labelPosition=e[Ma[this.keywordIndex]],i.fontName=e[bs[this.keywordIndex]],i.fontColor=e[ot[this.keywordIndex]],i.fontSize=e[nt[this.keywordIndex]],i.isLegendKey=K.parseBoolValue(e[Fr[this.keywordIndex]]),i.isBubbleSize=K.parseBoolValue(e[Cr[this.keywordIndex]]),i.isCategoryName=K.parseBoolValue(e[Pr[this.keywordIndex]]),i.isSeriesName=K.parseBoolValue(e[Tr[this.keywordIndex]]),i.isValue=K.parseBoolValue(e[Or[this.keywordIndex]]),i.isPercentage=K.parseBoolValue(e[Sr[this.keywordIndex]]),i.isLeaderLines=K.parseBoolValue(e[Nr[this.keywordIndex]]),t.dataLabels=i},i.prototype.parseChartSeriesDataPoints=function(e,t){for(var i=0;i<e.length;i++){var r=new Xh;e[i].hasOwnProperty(Go[this.keywordIndex])&&(r.id=e[i][Go[this.keywordIndex]]),this.parseChartDataFormat(e[i],r),t.chartDataFormat.push(r)}},i.prototype.parseChartTrendLines=function(e,t){for(var i=0;i<e.length;i++){var r=e[i],n=new jh;n.trendLineName=r[De[this.keywordIndex]],n.trendLineType=r[ns[this.keywordIndex]],n.forwardValue=r[hr[this.keywordIndex]],n.backwardValue=r[cr[this.keywordIndex]],n.interceptValue=r[gr[this.keywordIndex]],n.isDisplayEquation=K.parseBoolValue(r[ur[this.keywordIndex]]),n.isDisplayRSquared=K.parseBoolValue(r[pr[this.keywordIndex]]),t.trendLines.push(n)}},i.prototype.parseTableFormat=function(e,t,i){this.parseBorders(i,e[Vt[i]],t.borders),G.isNullOrUndefined(e[Ti[i]])||(t.allowAutoFit=K.parseBoolValue(e[Ti[i]])),G.isNullOrUndefined(e[Oi[i]])||(t.cellSpacing=e[Oi[i]]),G.isNullOrUndefined(e[Xt[i]])||(t.leftMargin=e[Xt[i]]),G.isNullOrUndefined(e[Zt[i]])||(t.topMargin=e[Zt[i]]),G.isNullOrUndefined(e[Jt[i]])||(t.rightMargin=e[Jt[i]]),G.isNullOrUndefined(e[Qt[i]])||(t.bottomMargin=e[Qt[i]]),G.isNullOrUndefined(e[Pt[i]])||(t.leftIndent=e[Pt[i]]),this.parseShading(e[Si[i]],t.shading,i),G.isNullOrUndefined(e[Ni[i]])||(t.tableAlignment=this.getTableAlignment(e[Ni[i]])),G.isNullOrUndefined(e[Ii[i]])||(t.preferredWidth=e[Ii[i]]),G.isNullOrUndefined(e[ki[i]])||(t.preferredWidthType=this.getWidthType(e[ki[i]])),G.isNullOrUndefined(e[lt[i]])||(t.bidi=K.parseBoolValue(e[lt[i]])),G.isNullOrUndefined(e[Ri[i]])||(t.horizontalPositionAbs=this.getHorizontalPositionAbs(e[Ri[i]])),G.isNullOrUndefined(e[ca[i]])||(t.horizontalPosition=e[ca[i]]),G.isNullOrUndefined(e[st[i]])||(t.styleName=e[st[i]]),this.documentHelper.editorProperties.enableCollaborativeEditing&&!G.isNullOrUndefined(e[Co[i]])&&(t.title=e[Co[i]]),this.documentHelper.editorProperties.enableCollaborativeEditing&&!G.isNullOrUndefined(e[Zo[i]])&&(t.description=e[Zo[i]]),!this.isPaste||G.isNullOrUndefined(this.documentHelper.isEditorModule)||G.isNullOrUndefined(e[He[i]])||(this.documentHelper.editorProperties.isLastParaMarkCopied=e[He[i]])},i.prototype.parseCellFormat=function(e,t,i){G.isNullOrUndefined(e)||(this.parseBorders(i,e[Vt[i]],t.borders),e.isSamePaddingAsTable||this.parseCellMargin(e,t,i),G.isNullOrUndefined(e[pi[i]])||(t.cellWidth=e[pi[i]]),G.isNullOrUndefined(e[ui[i]])||(t.columnSpan=e[ui[i]]),G.isNullOrUndefined(e[fi[i]])||(t.rowSpan=e[fi[i]]),this.parseShading(e[Si[i]],t.shading,i),G.isNullOrUndefined(e[mi[i]])||(t.verticalAlignment=this.getCellVerticalAlignment(e[mi[i]])),G.isNullOrUndefined(e[ki[i]])||(t.preferredWidthType=this.getWidthType(e[ki[i]])),G.isNullOrUndefined(e[Ii[i]])||(t.preferredWidth=e[Ii[i]]),G.isNullOrUndefined(e[Ai[i]]))||(t.verticallyMergedCellsKeepWithNext=e[Ai[i]])},i.prototype.parseCellMargin=function(e,t,i){G.isNullOrUndefined(e[Xt[i]])||(t.leftMargin=e[Xt[i]]),G.isNullOrUndefined(e[Jt[i]])||(t.rightMargin=e[Jt[i]]),G.isNullOrUndefined(e[Zt[i]])||(t.topMargin=e[Zt[i]]),G.isNullOrUndefined(e[Qt[i]])||(t.bottomMargin=e[Qt[i]])},i.prototype.parseRowFormat=function(e,t,i){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e[yi[i]])||(t.allowBreakAcrossPages=K.parseBoolValue(e[yi[this.keywordIndex]])),G.isNullOrUndefined(e[vi[i]])||(t.isHeader=K.parseBoolValue(e[vi[i]])),G.isNullOrUndefined(e[Wi[i]])||(t.heightType=this.getHeightType(e[Wi[i]])),G.isNullOrUndefined(e[tn[i]])||(t.height=e[tn[i]]),G.isNullOrUndefined(e[Xt[i]])||(t.leftMargin=e[Xt[i]]),G.isNullOrUndefined(e[Zt[i]])||(t.topMargin=e[Zt[i]]),G.isNullOrUndefined(e[Jt[i]])||(t.rightMargin=e[Jt[i]]),G.isNullOrUndefined(e[Qt[i]])||(t.bottomMargin=e[Qt[i]]),G.isNullOrUndefined(e[Pt[i]])||(t.leftIndent=e[Pt[i]]),G.isNullOrUndefined(e[Li[i]])||(t.verticallyMergedCellsLeftMargin=e[Li[i]]),G.isNullOrUndefined(e[Ui[i]])||(t.verticallyMergedCellsRightMargin=e[Ui[i]]),G.isNullOrUndefined(e[Bi[i]])||(t.verticallyMergedCellsTopMargin=e[Bi[i]]),G.isNullOrUndefined(e[Hi[i]])||(t.verticallyMergedCellsBottomMargin=e[Hi[i]]),!G.isNullOrUndefined(e[bt[i]])&&0<e[bt[i]].length&&this.checkAndApplyRevision(i,e,t,t),this.parseRowGridValues(e,t,i),this.parseBorders(i,e[Vt[i]],t.borders))},i.prototype.parseBorders=function(e,t,i){G.isNullOrUndefined(t)||(i.isParsing=!0,this.parseBorder(e,t[kn[e]],i.left),this.parseBorder(e,t[In[e]],i.right),this.parseBorder(e,t[Sn[e]],i.top),this.parseBorder(e,t[Nn[e]],i.bottom),this.parseBorder(e,t[zi[e]],i.vertical),this.parseBorder(e,t[_i[e]],i.horizontal),this.parseBorder(e,t[Gi[e]],i.diagonalDown),this.parseBorder(e,t[ji[e]],i.diagonalUp),i.isParsing=!1)},i.prototype.parseBorder=function(e,t,i){G.isNullOrUndefined(t)||(G.isNullOrUndefined(t[vn[e]])||(i.color=this.getColor(t[vn[e]])),G.isNullOrUndefined(t[Ki[e]])||(i.lineStyle=this.getLineStyle(t[Ki[e]])),G.isNullOrUndefined(t[Yi[e]])||(i.lineWidth=t[Yi[e]]),G.isNullOrUndefined(t[Di[e]])||(i.hasNoneStyle=K.parseBoolValue(t[Di[e]])),G.isNullOrUndefined(t[Xa[e]])||(i.space=t[Xa[e]]),G.isNullOrUndefined(t[Vi[e]]))||(i.shadow=K.parseBoolValue(t[Vi[e]]))},i.prototype.parseShading=function(e,t,i){G.isNullOrUndefined(e)||(G.isNullOrUndefined(e[Ei[i]])||(t.backgroundColor=this.getColor(e[Ei[i]])),G.isNullOrUndefined(e[Mi[i]])||(t.foregroundColor=this.getColor(e[Mi[i]])),G.isNullOrUndefined(e[qi[i]])&&G.isNullOrUndefined(e.textureStyle))||(t.textureStyle=G.isNullOrUndefined(e[qi[i]])?this.getTextureStyle(e.textureStyle):this.getTextureStyle(e[qi[i]]))},i.prototype.parseCharacterFormat=function(e,t,i,r){var n;G.isNullOrUndefined(t)||(r&&t.hasOwnProperty(Ws[e])?this.parseCharacterFormat(e,t.inlineFormat,i):(G.isNullOrUndefined(t[tt[e]])||(i.baselineAlignment=this.getBaseAlignment(t[tt[e]])),G.isNullOrUndefined(t[Qe[e]])||(i.underline=this.getUnderline(t[Qe[e]])),G.isNullOrUndefined(t[$e[e]])||(i.underlineColor=this.getColor(t[$e[e]])),G.isNullOrUndefined(t[et[e]])||(i.fontHintType=this.getFontHintType(t[et[e]])),G.isNullOrUndefined(t[it[e]])||(i.strikethrough=this.getStrikethrough(t[it[e]])),G.isNullOrUndefined(t[nt[e]])||(t[nt[e]]=parseFloat(t[nt[e]]),10*t[nt[e]]%10!=0&&(r=10*t[nt[e]].toFixed(1),t[nt[e]]=r%5==0?t[nt[e]].toFixed(1):Math.round(t[nt[e]])),n=parseFloat(t[nt[e]]),i.fontSize=n<0?0:n),G.isNullOrUndefined(t[at[e]])||(-1!==t[at[e]].indexOf('"')&&(t[at[e]]=t[at[e]].replace('"',"")),r=t[at[e]],G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)||!this.documentHelper.fontSubstitutionTable.containsKey(r)||this.isFontInstalled(r)||(r=this.documentHelper.fontSubstitutionTable.get(r)),i.fontFamily=r,G.isNullOrUndefined(t[yt[e]])&&(i.fontFamilyAscii=r),G.isNullOrUndefined(t[Wt[e]])&&(i.fontFamilyNonFarEast=r)),G.isNullOrUndefined(t[Xe[e]])||(i.bold=K.parseBoolValue(t[Xe[e]])),G.isNullOrUndefined(t[Je[e]])||(i.italic=K.parseBoolValue(t[Je[e]])),G.isNullOrUndefined(t[rt[e]])||(i.highlightColor=this.getHighlightColor(t[rt[e]])),G.isNullOrUndefined(t[ot[e]])||(i.fontColor=this.getColor(t[ot[e]])),G.isNullOrUndefined(t[lt[e]])||(i.bidi=K.parseBoolValue(t[lt[e]])),G.isNullOrUndefined(t[dt[e]])||(i.bdo=this.getBiDirectionalOverride(t[dt[e]])),G.isNullOrUndefined(t[ct[e]])||(n=parseFloat(t[ct[e]]),i.fontSizeBidi=n<0?0:n),G.isNullOrUndefined(t[gt[e]])||(-1!==t[gt[e]].indexOf('"')&&(t[gt[e]]=t[gt[e]].replace('"',"")),r=t[gt[e]],G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)||!this.documentHelper.fontSubstitutionTable.containsKey(r)||this.isFontInstalled(r)||(r=this.documentHelper.fontSubstitutionTable.get(r)),i.fontFamilyBidi=r),G.isNullOrUndefined(t[pt[e]])||(i.boldBidi=K.parseBoolValue(t[pt[e]])),G.isNullOrUndefined(t[ut[e]])||(i.italicBidi=K.parseBoolValue(t[ut[e]])),!G.isNullOrUndefined(t[bt[e]])&&0<t[bt[e]].length&&this.checkAndApplyRevision(e,t,i,i),G.isNullOrUndefined(t[ft[e]])||(i.allCaps=K.parseBoolValue(t[ft[e]])),G.isNullOrUndefined(t[Ye[e]])||(i.localeIdBidi=t[Ye[e]]),G.isNullOrUndefined(t[Ge[e]])||(i.localeIdAscii=t[Ge[e]]),G.isNullOrUndefined(t[Ke[e]])||(i.localeIdFarEast=t[Ke[e]]),G.isNullOrUndefined(t[Ze[e]])||(i.ligature=this.getLigature(t[Ze[e]])),G.isNullOrUndefined(t[mt[e]])||(i.complexScript=K.parseBoolValue(t[mt[e]])),G.isNullOrUndefined(t[Ns[e]])||(i.hidden=K.parseBoolValue(t[Ns[e]])),G.isNullOrUndefined(t[Is[e]])||(i.specVanish=K.parseBoolValue(t[Is[e]])),G.isNullOrUndefined(t[ks[e]])||(i.kern=t[ks[e]]),G.isNullOrUndefined(t[As[e]])||(i.isKernFont=K.parseBoolValue(t[As[e]])),G.isNullOrUndefined(t[vt[e]])||(-1!==t[vt[e]].indexOf('"')&&(t[vt[e]]=t[vt[e]].replace('"',"")),n=t[vt[e]],G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)||!this.documentHelper.fontSubstitutionTable.containsKey(n)||this.isFontInstalled(n)||(n=this.documentHelper.fontSubstitutionTable.get(n)),i.fontFamilyFarEast=n),G.isNullOrUndefined(t[yt[e]])||(-1!==t[yt[e]].indexOf('"')&&(t[yt[e]]=t[yt[e]].replace('"',"")),r=t[yt[e]],G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)||!this.documentHelper.fontSubstitutionTable.containsKey(r)||this.isFontInstalled(r)||(r=this.documentHelper.fontSubstitutionTable.get(r)),i.fontFamilyAscii=r),G.isNullOrUndefined(t[Wt[e]])||(-1!==t[Wt[e]].indexOf('"')&&(t[Wt[e]]=t[Wt[e]].replace('"',"")),n=t[Wt[e]],G.isNullOrUndefined(this.documentHelper.fontSubstitutionTable)||!this.documentHelper.fontSubstitutionTable.containsKey(n)||this.isFontInstalled(n)||(n=this.documentHelper.fontSubstitutionTable.get(n)),i.fontFamilyNonFarEast=n),G.isNullOrUndefined(t[wt[e]])||(i.characterSpacing=t[wt[e]]),G.isNullOrUndefined(t[Ft[e]])||(i.scaling=t[Ft[e]])))},i.prototype.isFontInstalled=function(e){var t,i,r;return this.fontInfoCollection&&this.fontInfoCollection.containsKey(e)?this.fontInfoCollection.get(e):(r=this.getWidth("monospace"),t=this.getWidth("sans-serif"),i=this.getWidth("serif"),r=r!==this.getWidth(e+", monospace",r)||t!==this.getWidth(e+", sans-serif",t)||i!==this.getWidth(e+", serif",i),this.fontInfoCollection&&this.fontInfoCollection.add(e,r),r)},i.prototype.getWidth=function(e,t){var i=document.createElement("span");return i.innerHTML=Array(100).join("wi"),i.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;"),i.style.fontFamily=e,document.body.appendChild(i),e=i.clientWidth,""!==i.style.fontFamily||G.isNullOrUndefined(t)||(e=t),document.body.removeChild(i),e},i.prototype.getColor=function(e){return e||"#ffffff"},i.prototype.parseThemes=function(e,t){this.parseFontScheme(e[Ja[this.keywordIndex]],t)},i.prototype.parseFontScheme=function(e,t){G.isNullOrUndefined(e[Za[this.keywordIndex]])||(t.fontScheme.fontSchemeName=e[Za[this.keywordIndex]]),G.isNullOrUndefined(e[Qa[this.keywordIndex]])||this.parseMajorMinorFontScheme(e[Qa[this.keywordIndex]],t.fontScheme.majorFontScheme),G.isNullOrUndefined(e[$a[this.keywordIndex]])||this.parseMajorMinorFontScheme(e[$a[this.keywordIndex]],t.fontScheme.minorFontScheme)},i.prototype.parseMajorMinorFontScheme=function(e,t){if(!G.isNullOrUndefined(e[ts[this.keywordIndex]])&&0<Object.keys(e[ts[this.keywordIndex]]).length){for(var i=0,r=Object.keys(e[ts[this.keywordIndex]]);i<r.length;i++){var n=r[i];t.fontTypeface.add(n,e[ts[this.keywordIndex]][n])}this.documentHelper.hasThemes=!0}if(!G.isNullOrUndefined(e[es[this.keywordIndex]])&&0<e[es[this.keywordIndex]].length){for(var o=0;o<e[es[this.keywordIndex]].length;o++){var a=e[es[this.keywordIndex]][o],s=new Gc;s.name=G.isNullOrUndefined(a.fontName)?a[De[this.keywordIndex]]:a[bs[this.keywordIndex]],s.typeface=G.isNullOrUndefined(a.fontTypeface)?a[is[this.keywordIndex]]:a.fontTypeface,s.panose=G.isNullOrUndefined(a.pnose)?a[rs[this.keywordIndex]]:a.pnose,t.fontSchemeList.push(s)}this.documentHelper.hasThemes=!0}},i.prototype.parseParagraphFormat=function(e,t,i){G.isNullOrUndefined(t)||(G.isNullOrUndefined(t[Vt[e]])||this.parseBorders(e,t[Vt[e]],i.borders),G.isNullOrUndefined(t[lt[e]])||(i.bidi=K.parseBoolValue(t[lt[e]])),G.isNullOrUndefined(t[Pt[e]])||(i.leftIndent=t[Pt[e]]),G.isNullOrUndefined(t[Tt[e]])||(i.rightIndent=t[Tt[e]]),G.isNullOrUndefined(t[Ot[e]])||(i.firstLineIndent=t[Ot[e]]),G.isNullOrUndefined(t[Nt[e]])?!this.isPaste||G.isNullOrUndefined(t[Ws[e]])||G.isNullOrUndefined(t[Ws[e]][Nt[e]])||(i.afterSpacing=t[Ws[e]][Nt[e]]):i.afterSpacing=t[Nt[e]],G.isNullOrUndefined(t[It[e]])?!this.isPaste||G.isNullOrUndefined(t[Ws[e]])||G.isNullOrUndefined(t[Ws[e]][It[e]])||(i.beforeSpacing=t[Ws[e]][It[e]]):i.beforeSpacing=t[It[e]],G.isNullOrUndefined(t[At[e]])||(i.spaceBeforeAuto=K.parseBoolValue(t[At[e]])),G.isNullOrUndefined(t[kt[e]])||(i.spaceAfterAuto=K.parseBoolValue(t[kt[e]])),G.isNullOrUndefined(t[Lt[e]])||(i.lineSpacing=t[Lt[e]]),G.isNullOrUndefined(t[Ut[e]])?G.isNullOrUndefined(t[Lt[e]])||(i.lineSpacingType="Multiple"):i.lineSpacingType=this.getLineSpacingType(t[Ut[e]]),G.isNullOrUndefined(t[St[e]])||(i.textAlignment=this.getTextAlignment(t[St[e]])),G.isNullOrUndefined(t[Et[e]])||(i.outlineLevel=this.getOutlineLevel(t[Et[e]])),G.isNullOrUndefined(t[Mt[e]])||(i.contextualSpacing=K.parseBoolValue(t[Mt[e]])),G.isNullOrUndefined(t[Ht[e]])||(i.keepWithNext=K.parseBoolValue(t[Ht[e]])),G.isNullOrUndefined(t[qt[e]])||(i.keepLinesTogether=K.parseBoolValue(t[qt[e]])),G.isNullOrUndefined(t[Rt[e]])||(i.widowControl=K.parseBoolValue(t[Rt[e]])),i.listFormat=new ul(i),t.hasOwnProperty(Bt[e])&&this.parseListFormat(e,t,i.listFormat),t.hasOwnProperty(Dt[e])&&this.parseTabStop(e,t[Dt[e]],i.tabs))},i.prototype.parseListFormat=function(e,t,i){var r,n;G.isNullOrUndefined(t[Bt[e]])||(G.isNullOrUndefined(t[Bt[e]][xt[e]])||(r=t[Bt[e]][xt[e]],n=this.documentHelper.getListById(r),G.isNullOrUndefined(n)&&-1!==r)||(i.listId=r,i.list=n),G.isNullOrUndefined(t[Bt[e]][Ia])?G.isNullOrUndefined(i.list)||(i.nsid=i.list.nsid):i.nsid=t[Bt[e]][Ia],G.isNullOrUndefined(t[Bt[e]][Ct[e]]))||(i.listLevelNumber=t[Bt[e]][Ct[e]])},i.prototype.parseSectionFormat=function(e,t,i,r){if(G.isNullOrUndefined(t[Kt[e]])||(i.pageWidth=t[Kt[e]]),G.isNullOrUndefined(t[Yt[e]])||(i.pageHeight=t[Yt[e]]),G.isNullOrUndefined(t[Xt[e]])||(i.leftMargin=t[Xt[e]]),G.isNullOrUndefined(t[Zt[e]])||(i.topMargin=t[Zt[e]]),G.isNullOrUndefined(t[Jt[e]])||(i.rightMargin=t[Jt[e]]),G.isNullOrUndefined(t[Qt[e]])||(i.bottomMargin=t[Qt[e]]),G.isNullOrUndefined(t[zt[e]])||(i.headerDistance=t[zt[e]]),G.isNullOrUndefined(t[_t[e]])||(i.footerDistance=t[_t[e]]),G.isNullOrUndefined(t[jt[e]])||(i.differentFirstPage=K.parseBoolValue(t[jt[e]])),G.isNullOrUndefined(t[Gt[e]])||(i.differentOddAndEvenPages=K.parseBoolValue(t[Gt[e]])),G.isNullOrUndefined(t[lt[e]])||(i.bidi=K.parseBoolValue(t[lt[e]])),G.isNullOrUndefined(t[$t[e]])||(i.restartPageNumbering=K.parseBoolValue(t[$t[e]])),G.isNullOrUndefined(t[ei[e]])||(i.pageStartingNumber=t[ei[e]]),G.isNullOrUndefined(t[ti[e]])||(i.endnoteNumberFormat=this.getFootEndNoteNumberFormat(t[ti[e]])),G.isNullOrUndefined(t[ii[e]])||(i.footNoteNumberFormat=this.getFootEndNoteNumberFormat(t[ii[e]])),G.isNullOrUndefined(t[ri[e]])||(i.restartIndexForFootnotes=this.getFootnoteRestartIndex(t[ri[e]])),G.isNullOrUndefined(t[ni[e]])||(i.restartIndexForEndnotes=this.getFootnoteRestartIndex(t[ni[e]])),G.isNullOrUndefined(t[oi[e]])||(i.initialFootNoteNumber=t[oi[e]]),G.isNullOrUndefined(t[ai[e]])||(i.initialEndNoteNumber=t[ai[e]]),G.isNullOrUndefined(t[si[e]])||(i.pageNumberStyle=t[si[e]]),!G.isNullOrUndefined(t[li[e]])&&!G.isNullOrUndefined(t[di[e]])&&1<t[di[e]]&&(i.numberOfColumns=t[di[e]],i.equalWidth=K.parseBoolValue(t[hi[e]]),i.lineBetweenColumns=K.parseBoolValue(t[ci[e]]),t[li[e]]))for(var n=0;n<t[li[e]].length;n++){var o=new T;r?(o.width=t[li[e]][n][en[e]],o.space=t[li[e]][n][Xa[e]]):(o.width=K.convertPointToPixel(t[li[e]][n][en[e]]),o.space=K.convertPointToPixel(t[li[e]][n][Xa[e]])),o.index=n,i.columns.push(o)}G.isNullOrUndefined(t[gi[e]])||(i.breakCode=t[gi[e]])},i.prototype.parseColumns=function(e,t){if(t=[],e)for(var i=0;i<e.length;i++){var r=new T;r.width=K.convertPointToPixel(e[i][en[this.keywordIndex]]),r.space=K.convertPointToPixel(e[i][Xa[this.keywordIndex]]),r.index=i,t.push(r)}},i.prototype.parseTabStop=function(e,t,i){if(t)for(var r=0;r<t.length;r++){var n=!1,o=t[r];if(0<Object.keys(o).length){var a=new ml;a.position=o[Ma[e]],a.tabLeader=this.getTabLeader(o[Da[e]]),a.deletePosition=o[Va[e]],a.tabJustification=this.getTabJustification(o[Ea[e]]);for(var s=0;s<i.length;s++){var l=i[s];if(l.position===a.position&&l.tabLeader===a.tabLeader&&l.deletePosition===a.deletePosition&&l.tabJustification===a.tabJustification){n=!0;break}}n||i.push(a)}}},i.prototype.validateImageUrl=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;return e.charAt(e.length-1)===t.charAt(64)&&i--,e.charAt(e.length-2)===t.charAt(64)&&i--,i%1==0},i.prototype.containsFieldBegin=function(e){for(var t=void 0,i=e.children.length-1;0<=i;i--){if((t=e.children[i])instanceof te&&t.hasFieldEnd&&t.nextElement instanceof ie)return t.nextElement;if(t instanceof te)return}return t},i.prototype.getBaseAlignment=function(e){switch(e){case 0:return"Normal";case 1:return"Superscript";case 2:return"Subscript";default:return e}},i.prototype.getUnderline=function(e){switch(e){case 0:return"None";case 1:return"Single";case 2:return"Words";case 3:return"Double";case 4:return"Dotted";case 5:return"Thick";case 6:return"Dash";case 7:return"DashLong";case 8:return"DotDash";case 9:return"DotDotDash";case 10:return"Wavy";case 11:return"DottedHeavy";case 12:return"DashHeavy";case 13:return"DashLongHeavy";case 14:return"DotDashHeavy";case 15:return"DotDotDashHeavy";case 16:return"WavyHeavy";case 17:return"WavyDouble";default:return e}},i.prototype.getFontHintType=function(e){switch(e){case 0:return"Default";case 1:return"EastAsia";case 2:return"CS";default:return e}},i.prototype.getStrikethrough=function(e){switch(e){case 0:return"None";case 1:return"SingleStrike";case 2:return"DoubleStrike";default:return e}},i.prototype.getHighlightColor=function(e){switch(e){case 0:return"NoColor";case 1:return"Yellow";case 2:return"BrightGreen";case 3:return"Turquoise";case 4:return"Pink";case 5:return"Blue";case 6:return"Red";case 7:return"DarkBlue";case 8:return"Teal";case 9:return"Green";case 10:return"Violet";case 11:return"DarkRed";case 12:return"DarkYellow";case 13:return"Gray50";case 14:return"Gray25";case 15:return"Black";default:return e}},i.prototype.getLineSpacingType=function(e){switch(e){case 0:return"Multiple";case 1:return"AtLeast";case 2:return"Exactly";default:return e}},i.prototype.getOutlineLevel=function(e){switch(e){case 0:return"BodyText";case 1:return"Level1";case 2:return"Level2";case 3:return"Level3";case 4:return"Level4";case 5:return"Level5";case 6:return"Level6";case 7:return"Level7";case 8:return"Level8";case 9:return"Level9";default:return e}},i.prototype.getTextAlignment=function(e){switch(e){case 0:return"Left";case 1:return"Center";case 2:return"Right";case 3:return"Justify";default:return e}},i.prototype.getWidthType=function(e){switch(e){case 0:return"Auto";case 1:return"Percent";case 2:return"Point";default:return e}},i.prototype.getTableAlignment=function(e){switch(e){case 0:return"Left";case 1:return"Center";case 2:return"Right";default:return e}},i.prototype.getLineStyle=function(e){switch(e){case 0:return"Single";case 1:return"None";case 2:return"Dot";case 3:return"DashSmallGap";case 4:return"DashLargeGap";case 5:return"DashDot";case 6:return"DashDotDot";case 7:return"Double";case 8:return"Triple";case 9:return"ThinThickSmallGap";case 10:return"ThickThinSmallGap";case 11:return"ThinThickThinSmallGap";case 12:return"ThinThickMediumGap";case 13:return"ThickThinMediumGap";case 14:return"ThinThickThinMediumGap";case 15:return"ThinThickLargeGap";case 16:return"ThickThinLargeGap";case 17:return"ThinThickThinLargeGap";case 18:return"SingleWavy";case 19:return"DoubleWavy";case 20:return"DashDotStroked";case 21:return"Emboss3D";case 22:return"Engrave3D";case 23:return"Outset";case 24:return"Inset";case 25:return"Thick";case 26:return"Cleared";default:return e}},i.prototype.getTextureStyle=function(e){switch(e){case 0:return"TextureNone";case 1:return"Texture2Pt5Percent";case 2:return"Texture5Percent";case 3:return"Texture7Pt5Percent";case 4:return"Texture10Percent";case 5:return"Texture12Pt5Percent";case 6:return"Texture15Percent";case 7:return"Texture17Pt5Percent";case 8:return"Texture20Percent";case 9:return"Texture22Pt5Percent";case 10:return"Texture25Percent";case 11:return"Texture27Pt5Percent";case 12:return"Texture30Percent";case 13:return"Texture32Pt5Percent";case 14:return"Texture35Percent";case 15:return"Texture37Pt5Percent";case 16:return"Texture40Percent";case 17:return"Texture42Pt5Percent";case 18:return"Texture45Percent";case 19:return"Texture47Pt5Percent";case 20:return"Texture50Percent";case 21:return"Texture52Pt5Percent";case 22:return"Texture55Percent";case 23:return"Texture57Pt5Percent";case 24:return"Texture60Percent";case 25:return"Texture62Pt5Percent";case 26:return"Texture65Percent";case 27:return"Texture67Pt5Percent";case 28:return"Texture70Percent";case 29:return"Texture72Pt5Percent";case 30:return"Texture75Percent";case 31:return"Texture77Pt5Percent";case 32:return"Texture80Percent";case 33:return"Texture82Pt5Percent";case 34:return"Texture85Percent";case 35:return"Texture87Pt5Percent";case 36:return"Texture90Percent";case 37:return"Texture92Pt5Percent";case 38:return"Texture95Percent";case 39:return"Texture97Pt5Percent";case 40:return"TextureSolid";case 41:return"TextureDarkHorizontal";case 42:return"TextureDarkVertical";case 43:return"TextureDarkDiagonalDown";case 44:return"TextureDarkDiagonalUp";case 45:return"TextureDarkCross";case 46:return"TextureDarkDiagonalCross";case 47:return"TextureHorizontal";case 48:return"TextureVertical";case 49:return"TextureDiagonalDown";case 50:return"TextureDiagonalUp";case 51:return"TextureCross";case 52:return"TextureDiagonalCross";default:return e}},i.prototype.getLigature=function(e){switch(e){case 0:return"None";case 1:return"Standard";case 2:return"Contextual";case 3:return"StandardContextual";case 4:return"Historical";case 5:return"StandardHistorical";case 6:return"ContextualHistorical";case 7:return"StandardContextualHistorical";case 8:return"Discretional";case 9:return"StandardDiscretional";case 10:return"ContextualDiscretional";case 11:return"StandardContextualDiscretional";case 12:return"HistoricalDiscretional";case 13:return"StandardHistoricalDiscretional";case 14:return"ContextualHistoricalDiscretional";case 15:return"All";default:return e}},i.prototype.getHeightType=function(e){switch(e){case 0:return"AtLeast";case 1:return"Exactly";default:return e}},i.prototype.getCellVerticalAlignment=function(e){switch(e){case 0:return"Top";case 1:return"Center";case 2:return"Bottom";default:return e}},i.prototype.getListLevelPattern=function(e){switch(e){case 0:return"None";case 1:case 13:case"KanjiDigit":return"Arabic";case 2:return"UpRoman";case 3:return"LowRoman";case 4:return"UpLetter";case 5:return"LowLetter";case 6:return"Ordinal";case 7:return"Number";case 8:return"OrdinalText";case 9:return"LeadingZero";case 10:return"Bullet";case 11:return"FarEast";case 12:return"Special";case 14:return"Hebrew1";case 15:return"Hebrew2";case 16:return"Arabic1";case 17:return"Arabic2";default:return e}},i.prototype.getListNumberAlignment=function(e){switch(e){case 1:return"Center";case 2:return"Right";case"Center":case"Right":return e;default:return"Left"}},i.prototype.getFollowCharacterType=function(e){switch(e){case 0:return"Tab";case 1:return"Space";case 2:return"None";default:return e}},i.prototype.getStyleType=function(e){switch(e){case 0:return"Paragraph";case 1:return"Character";case 2:return"Table";default:return e}},i.prototype.getProtectionType=function(e){switch(e){case 0:return"NoProtection";case 1:return"ReadOnly";case 2:return"FormFieldsOnly";case 3:return"CommentsOnly";case 4:return"RevisionsOnly";default:return e}},i.prototype.getRevisionType=function(e){switch(e){case 1:return"Insertion";case 2:return"Deletion";case 3:return"MoveTo";case 4:return"MoveFrom";default:return e}},i.prototype.getFootnoteType=function(e){switch(e){case 0:return"Footnote";case 1:return"Endnote";default:return e}},i.prototype.getFootnoteRestartIndex=function(e){switch(e){case 0:return"DoNotRestart";case 1:return"RestartForEachSection";case 2:return"RestartForEachPage";default:return e}},i.prototype.getFootEndNoteNumberFormat=function(e){switch(e){case 0:return"Arabic";case 1:return"UpperCaseRoman";case 2:return"LowerCaseRoman";case 3:return"UpperCaseLetter";case 4:return"LowerCaseLetter";default:return e}},i.prototype.getBiDirectionalOverride=function(e){switch(e){case 0:return"None";case 1:return"LTR";case 2:return"RTL";default:return e}},i.prototype.getBreakClearType=function(e){switch(e){case 0:return"None";case 1:return"Left";case 2:return"Right";case 3:return"All";default:return e}},i.prototype.getTextVerticalAlignment=function(e){switch(e){case 0:return"Top";case 1:return"Center";case 2:return"Bottom";default:return e}},i.prototype.getShapeVerticalAlignment=function(e){switch(e){case 0:return"None";case 1:return"Top";case 2:return"Center";case 3:return"Bottom";case 4:return"Inline";case 5:return"Inside";case 6:return"Outside";default:return e}},i.prototype.getShapeHorizontalAlignment=function(e){switch(e){case 0:return"None";case 1:return"Center";case 2:return"Inside";case 3:return"Left";case 4:return"Outside";case 5:return"Right";default:return e}},i.prototype.getVerticalOrigin=function(e){switch(e){case 0:return"Paragraph";case 1:return"BottomMargin";case 2:return"InsideMargin";case 3:return"Line";case 4:return"Margin";case 5:return"OutsideMargin";case 6:return"Page";case 7:return"TopMargin";default:return e}},i.prototype.getHorizontalOrigin=function(e){switch(e){case 0:return"Column";case 1:return"Character";case 2:return"InsideMargin";case 3:return"LeftMargin";case 4:return"Margin";case 5:return"OutsideMargin";case 6:return"Page";case 7:return"RightMargin";default:return e}},i.prototype.getTableVerticalRelation=function(e){switch(e){case 0:return"Paragraph";case 1:return"Margin";case 2:return"Page";default:return e}},i.prototype.getTableHorizontalRelation=function(e){switch(e){case 0:return"Column";case 1:return"Margin";case 2:return"Page";default:return e}},i.prototype.getTableVerticalPosition=function(e){switch(e){case 0:return"None";case 1:return"Top";case 2:return"Center";case 3:return"Bottom";case 4:return"Inside";case 5:return"Outside";default:return e}},i.prototype.getTableHorizontalPosition=function(e){switch(e){case 0:return"Left";case 1:return"Center";case 2:return"Inside";case 3:return"Outside";case 4:return"Right";default:return e}},i.prototype.getLineDashStyle=function(e){switch(e){case 0:return"Solid";case 1:return"Dash";case 2:return"DashDot";case 3:return"DashDotDot";case 4:return"DashDotGEL";case 5:return"DashGEL";case 6:return"Dot";case 7:return"DotGEL";case 8:return"LongDashDotDotGEL";case 9:return"LongDashDotGEL";case 10:return"LongDashGEL";default:return e}},i.prototype.getFillType=function(e){switch(e){case 0:return"FillSolid";case 1:return"FillPatterned";case 2:return"FillGradient";case 3:return"FillTextured";case 4:return"FillBackground";case 5:return"FillPicture";case 6:return"None";case 7:return"FillMixed";default:return e}},i.prototype.getHorizontalPositionAbs=function(e){switch(e){case 0:return"Left";case 1:return"Center";case 2:return"Right";case 3:return"Inside";case 4:return"Outside";default:return e}},i.prototype.getTabJustification=function(e){switch(e){case 0:return"Left";case 1:return"Bar";case 2:return"Center";case 3:return"Decimal";case 4:return"List";case 5:return"Right";default:return e}},i.prototype.getTabLeader=function(e){switch(e){case 0:return"None";case 1:return"Single";case 2:return"Dot";case 3:return"Hyphen";case 4:return"Underscore";default:return e}},i.prototype.getTextFormFieldType=function(e){switch(e){case 0:return"Text";case 1:return"Number";case 2:return"Date";case 3:return"Calculation";default:return e}},i.prototype.getTextFormFieldFormat=function(e){switch(e){case 0:return"None";case 1:return"FirstCapital";case 2:return"Lowercase";case 3:return"Uppercase";case 4:return"Titlecase";default:return e}},i.prototype.getCheckBoxSizeType=function(e){switch(e){case 0:return"Auto";case 1:return"Exactly";default:return e}},i.prototype.getContentControlAppearance=function(e){switch(e){case 1:return"BoundingBox";case 2:return"Hidden";case 3:return"Tags";default:return e}},i.prototype.getContentControlType=function(e){switch(e){case 0:return"RichText";case 1:return"BuildingBlockGallery";case 2:return"CheckBox";case 3:return"ComboBox";case 4:return"Date";case 5:return"DropDownList";case 6:return"Group";case 7:return"Picture";case 8:return"RepeatingSection";case 9:return"Text";default:return e}},i.prototype.getDateCalendarType=function(e){switch(e){case 0:return"Gregorian";case 1:return"GregorianArabic";case 2:return"GregorianEnglish";case 3:return"GregorianMiddleEastFrench";case 4:return"GregorianTransliteratedEnglish";case 5:return"GregorianTransliteratedFrench";case 6:return"Hebrew";case 7:return"Hijri";case 8:return"Japan";case 9:return"Korean";case 10:return"Saka";case 11:return"Taiwan";case 12:return"Thai";default:return e}},i.prototype.getDateStorageFormat=function(e){switch(e){case 1:return"DateStorageDate";case 2:return"DateStorageDateTime";case 3:return"DateStorageText";default:return e}},i.prototype.getTextWrappingStyle=function(e){switch(e){case 0:return"Inline";case 1:return"InFrontOfText";case 2:return"Square";case 3:return"TopAndBottom";case 4:return"Behind";default:return e}},i.prototype.getTextWrappingType=function(e){switch(e){case 0:return"Both";case 1:return"Left";case 2:return"Right";case 3:return"Largest";default:return e}},i.prototype.getCompatibilityMode=function(e){switch(e){case 0:return"Word2013";case 1:return"Word2003";case 2:return"Word2007";case 3:return"Word2010";default:return e}},i.prototype.getLineFormatType=function(e){switch(e){case 0:return"Solid";case 1:return"Patterned";case 2:return"Gradient";case 3:return"None";default:return e}},i.prototype.getAutoShapeType=function(e){switch(e){case 1:return"Rectangle";case 2:return"RoundedRectangle";case 3:return"StraightConnector";case 4:return"Oval";case 5:return"IsoscelesTriangle";case 6:return"RightTriangle";case 7:return"Parallelogram";case 8:return"Trapezoid";case 9:return"Diamond";case 10:return"RegularPentagon";case 11:return"Hexagon";case 12:return"Heptagon";case 13:return"Octagon";case 14:return"Decagon";case 15:return"Dodecagon";case 16:return"Chord";case 17:return"Teardrop";case 18:return"Frame";case 19:return"HalfFrame";case 20:return"L_Shape";case 21:return"Pie";case 22:return"DiagonalStripe";case 23:return"Cross";case 24:return"Plaque";case 25:return"Can";case 26:return"Cube";case 27:return"Bevel";case 28:return"Donut";case 29:return"NoSymbol";case 30:return"BlockArc";case 31:return"FoldedCorner";case 32:return"SmileyFace";case 33:return"Heart";case 34:return"LightningBolt";case 35:return"Sun";case 36:return"Moon";case 37:return"Cloud";case 38:return"Arc";case 39:return"DoubleBracket";case 40:return"DoubleBrace";case 41:return"LeftBracket";case 42:return"RightBracket";case 43:return"LeftBrace";case 44:return"RightBrace";case 45:return"FlowChartProcess";case 46:return"FlowChartAlternateProcess";case 47:return"FlowChartDecision";case 48:return"FlowChartData";case 49:return"FlowChartPredefinedProcess";case 50:return"FlowChartInternalStorage";case 51:return"FlowChartDocument";case 52:return"FlowChartMultiDocument";case 53:return"FlowChartTerminator";case 54:return"FlowChartPreparation";case 55:return"FlowChartManualInput";case 56:return"FlowChartManualOperation";case 57:return"FlowChartConnector";case 58:return"FlowChartOffPageConnector";case 59:return"FlowChartCard";case 60:return"FlowChartPunchedTape";case 61:return"FlowChartSummingJunction";case 62:return"FlowChartOr";case 63:return"FlowChartCollate";case 64:return"FlowChartSort";case 65:return"FlowChartExtract";case 66:return"FlowChartMerge";case 67:return"FlowChartStoredData";case 68:return"FlowChartDelay";case 69:return"FlowChartSequentialAccessStorage";case 70:return"FlowChartMagneticDisk";case 71:return"FlowChartDirectAccessStorage";case 72:return"FlowChartDisplay";case 73:return"RightArrow";case 74:return"LeftArrow";case 75:return"UpArrow";case 76:return"DownArrow";case 77:return"LeftRightArrow";case 78:return"UpDownArrow";case 79:return"QuadArrow";case 80:return"LeftRightUpArrow";case 81:return"BentArrow";case 82:return"UTurnArrow";case 83:return"LeftUpArrow";case 84:return"BentUpArrow";case 85:return"CurvedRightArrow";case 86:return"CurvedLeftArrow";case 87:return"CurvedUpArrow";case 88:return"CurvedDownArrow";case 89:return"StripedRightArrow";case 90:return"NotchedRightArrow";case 91:return"Pentagon";case 92:return"Chevron";case 93:return"RightArrowCallout";case 94:return"DownArrowCallout";case 95:return"LeftArrowCallout";case 96:return"UpArrowCallout";case 97:return"LeftRightArrowCallout";case 98:return"QuadArrowCallout";case 99:return"CircularArrow";case 100:return"MathPlus";case 101:return"MathMinus";case 102:return"MathMultiply";case 103:return"MathDivision";case 104:return"MathEqual";case 105:return"MathNotEqual";case 106:return"Explosion1";case 107:return"Explosion2";case 108:return"Star4Point";case 109:return"Star5Point";case 110:return"Star6Point";case 111:return"Star7Point";case 112:return"Star8Point";case 113:return"Star10Point";case 114:return"Star12Point";case 115:return"Star16Point";case 116:return"Star24Point";case 117:return"Star32Point";case 118:return"UpRibbon";case 119:return"DownRibbon";case 120:return"CurvedUpRibbon";case 121:return"CurvedDownRibbon";case 122:return"VerticalScroll";case 123:return"HorizontalScroll";case 124:return"Wave";case 125:return"DoubleWave";case 126:return"SnipSingleCornerRectangle";case 127:return"SnipSameSideCornerRectangle";case 128:return"SnipDiagonalCornerRectangle";case 129:return"SnipAndRoundSingleCornerRectangle";case 130:return"RoundSingleCornerRectangle";case 131:return"RoundSameSideCornerRectangle";case 132:return"RoundDiagonalCornerRectangle";case 133:return"Unknown";case 134:return"ElbowConnector";case 135:return"CurvedConnector";case 136:return"RectangularCallout";case 137:return"CloudCallout";case 138:return"LineCallout1NoBorder";default:return e}},i.prototype.destroy=function(){this.footnotes&&this.footnotes.destroy(),this.footnotes=void 0,this.endnotes&&this.endnotes.destroy(),this.endnotes=void 0,this.editableRanges&&this.editableRanges.destroy(),this.editableRanges=void 0,this.commentEnds&&this.commentEnds.destroy(),this.commentEnds=void 0,this.commentStarts&&this.commentStarts.destroy(),this.commentStarts=void 0,this.commentsCollection&&this.commentsCollection.destroy(),this.commentsCollection=void 0,this.revisionCollection&&this.revisionCollection.destroy(),this.revisionCollection=void 0,this.fontInfoCollection&&this.fontInfoCollection.destroy(),this.revisionMap&&this.revisionMap.destroy(),this.revisionHelper=void 0,this.revisionMap=void 0,this.stylesCollection=void 0,this.fontInfoCollection=void 0,this.documentHelper=void 0,this.keywordIndex=void 0};var Jc=i;function i(e){this.documentHelper=void 0,this.commentStarts=void 0,this.commentEnds=void 0,this.commentsCollection=void 0,this.revisionCollection=void 0,this.isPageBreakInsideTable=!1,this.isParseHeader=!1,this.footnotes=void 0,this.endnotes=void 0,this.keywordIndex=void 0,this.themes=void 0,this.stylesCollection=[],this.isCutPerformed=!1,this.isPaste=!1,this.isContextBasedPaste=!1,this.isHtmlPaste=!1,this.hasFieldSeparator=!1,this.revisionFactory=void 0,this.documentHelper=e,this.revisionHelper=new de(this.documentHelper),this.editableRanges=new N}function Zc(e){var t,i=[],r=eg(e);if(0<r.length)for(var n=0;n<r.length;n++){var o=r[parseInt(n.toString(),10)],a="";switch((a=o[0]).toLowerCase()){case"m":for(t=1;t<o.length;t++)i.push({command:a,x:o[parseInt(t.toString(),10)],y:o[t+1]}),t+=1,"m"===a?a="l":"M"===a&&(a="L");break;case"l":case"t":for(t=1;t<o.length;t++)i.push({command:a,x:o[parseInt(t.toString(),10)],y:o[t+1]}),t+=1;break;case"h":for(t=1;t<o.length;t++)i.push({command:a,x:o[parseInt(t.toString(),10)]});break;case"v":for(t=1;t<o.length;t++)i.push({command:a,y:o[parseInt(t.toString(),10)]});break;case"z":i.push({command:a});break;case"c":for(t=1;t<o.length;t++)i.push({command:a,x1:o[parseInt(t.toString(),10)],y1:o[t+1],x2:o[t+2],y2:o[t+3],x:o[t+4],y:o[t+5]}),t+=5;break;case"s":for(t=1;t<o.length;t++)i.push({command:a,x2:o[parseInt(t.toString(),10)],y2:o[t+1],x:o[t+2],y:o[t+3]}),t+=3;break;case"q":for(t=1;t<o.length;t++)i.push({command:a,x1:o[parseInt(t.toString(),10)],y1:o[t+1],x:o[t+2],y:o[t+3]}),t+=3;break;case"a":for(t=1;t<o.length;t++)i.push({command:a,r1:o[parseInt(t.toString(),10)],r2:o[t+1],angle:o[t+2],largeArc:o[t+3],sweep:o[t+4],x:o[t+5],y:o[t+6]}),t+=6}}return i}function Qc(e){for(var t="",i=0;i<e.length;i++)t+=0===i?$c(e[parseInt(i.toString(),10)]):" "+$c(e[parseInt(i.toString(),10)]);return t}function $c(e){var t="";switch(e.command){case"Z":case"z":t=e.command;break;case"M":case"m":case"L":case"l":t=e.command+" "+e.x+" "+e.y;break;case"C":case"c":t=e.command+" "+e.x1+" "+e.y1+" "+e.x2+" "+e.y2+" "+e.x+" "+e.y;break;case"Q":case"q":t=e.command+" "+e.x1+" "+e.y1+" "+e.x+" "+e.y;break;case"A":case"a":var i=e.command,r=e.angle,n=e.largeArc?"1":"0",o=e.sweep?"1":"0",t=i+" "+e.r1+" "+e.r2+" "+r+" "+n+" "+o+" "+e.x+" "+e.y;break;case"H":case"h":t=e.command+" "+e.x;break;case"V":case"v":t=e.command+" "+e.y;break;case"S":case"s":t=e.command+" "+e.x2+" "+e.y2+" "+e.x+" "+e.y;break;case"T":case"t":t=e.command+" "+e.x+" "+e.y}return t}function eg(e){for(var t=/([a-z]+)|([+-]?(?:\d+\.?\d*|\.\d+))/gi,i=[],r=[],n={},o=(t.lastIndex=0,!1),n=t.exec(e);n;)o="e"===n[1]||(n[1]?i="zm"===n[1].toLowerCase()?(i.length&&r.push(i),r.push(["Z"]),[n[1].substring(1,2)]):(i.length&&r.push(i),[n[1]]):(i.length||(i=[]),o||i.push(Number(n[2]))),!1),n=t.exec(e);return i.length&&r.push(i),r}function tg(e){for(var t,i,r,n,o,a,s=0,l=0,d=0,h=e.length;d<h;++d){var c=e[parseInt(d.toString(),10)],g=c.command;if(/[MLHVCSQTA]/.test(g))"x"in c&&(c.x=s=c.x),"y"in c&&(c.y=l=c.y);else{"x1"in c&&(c.x1=r=s+c.x1),"x2"in c&&(c.x2=o=s+c.x2),"y1"in c&&(c.y1=n=l+c.y1),"y2"in c&&(c.y2=a=l+c.y2),"x"in c&&(c.x=s+=c.x),"y"in c&&(c.y=l+=c.y);var p=void 0;switch(g){case"m":case"M":p={command:"M",x:s,y:l};break;case"l":case"L":p={command:"L",x:s,y:l};break;case"h":case"H":p={command:"H",x:s};break;case"v":case"V":p={command:"V",y:l};break;case"c":case"C":p={command:"C",x:s,y:l,x1:r,y1:n,x2:o,y2:a};break;case"s":case"S":p={command:"S",x:s,y:l,x2:o,y2:a};break;case"q":case"Q":p={command:"Q",x:s,y:l,x1:r,y1:n};break;case"t":case"T":p={command:"T",x:s,y:l};break;case"a":case"A":(p={command:"A",x:s,y:l}).r1=c.r1,p.r2=c.r2,p.angle=c.angle,p.largeArc=c.largeArc,p.sweep=c.sweep;break;case"z":case"Z":p={command:"Z"},s=t,l=i,p=e[parseInt(d.toString(),10)]}p&&(e[parseInt(d.toString(),10)]=p)}"M"!==g&&"m"!==g||(t=s,i=l)}return e}function ig(e,t,i,r,n,o,a,s){for(var l,d,h,c,g=0,p=0,u=0,f=e.length;u<f;++u){var m=e[u],y=m.command;"x"in m&&(g=m.x),"y"in m&&(p=m.y),"y1"in m&&(d=m.y1),"y2"in m&&(c=m.y2),"x1"in m&&(l=m.x1),"x2"in m&&(h=m.x2),r?(void 0!==g&&(g=ng(g,t,n,a)),void 0!==p&&(p=ng(p,i,o,s)),void 0!==l&&(l=ng(l,t,n,a)),void 0!==d&&(d=ng(d,i,o,s)),void 0!==h&&(h=ng(h,t,n,a)),void 0!==c&&(c=ng(c,i,o,s))):(void 0!==g&&(g=Number((g+t).toFixed(2))),void 0!==p&&(p=Number((p+i).toFixed(2))),void 0!==l&&(l=Number((l+t).toFixed(2))),void 0!==d&&(d=Number((d+i).toFixed(2))),void 0!==h&&(h=Number((h+t).toFixed(2))),void 0!==c&&(c=Number((c+i).toFixed(2)))),(y=rg(m,y,{x:g,y:p,x1:l,y1:d,x2:h,y2:c,r1:m.r1,r2:m.r2},r,t,i))&&(e[u]=y)}return Qc(e)}function rg(e,t,i,r,n,o){switch(t){case"M":case"L":e.x=i.x,e.y=i.y;break;case"H":e.x=i.x;break;case"V":e.y=i.y;break;case"C":e.x=i.x,e.y=i.y,e.x1=i.x1,e.y1=i.y1,e.x2=i.x2,e.y2=i.y2;break;case"S":e.x=i.x,e.y=i.y,e.x2=i.x2,e.y2=i.y2;break;case"Q":e.x=i.x,e.y=i.y,e.x1=i.x1,e.y1=i.y1;break;case"T":e.x=i.x,e.y=i.y;break;case"A":var a=i.r1,s=i.r2;r&&(i.r1=a*=n,i.r2=s*=o),e.x=i.x,e.y=i.y,e.r1=i.r1,e.r2=i.r2;break;case"z":case"Z":e={command:"Z"}}return e}function ng(e,t,i,r){return e!==i?e=r!==i?e*t-(Number(i)*t-Number(i))+(r-Number(i)):Number(e)*t-(Number(i)*t-Number(i)):r!==i&&(e=r),Number(e.toFixed(2))}function og(e){for(var t,i,r,n,o,a,s=[],l=0,d=0,h=0,c=e.length;h<c;++h){var g,p,u=e[h],f=u.command,m=("y1"in u&&(n=u.y1),"y2"in u&&(a=u.y2),"x1"in u&&(r=u.x1),"x2"in u&&(o=u.x2),"x"in u&&(l=u.x),"y"in u&&(d=u.y),s[s.length-1]);switch(f){case"M":s.push({command:"M",x:l,y:d});break;case"L":s.push({command:"L",x0:t,y0:i,x:l,y:d});break;case"H":s.push({command:"L",x0:t,y0:i,x:l,y:i});break;case"V":s.push({command:"L",x0:t,y0:i,x:t,y:d});break;case"C":s.push({command:"C",x0:t,y0:i,x1:r,y1:n,x2:o,y2:a,x:l,y:d});break;case"S":m&&(g=void 0,p={x:2*t-(g="C"===m.command||"S"===m.command?{x:m.x2,y:m.y2}:{x:t,y:i}).x,y:2*i-g.y},s.push({command:"C",x0:t,y0:i,x1:p.x,y1:p.y,x2:o,y2:a,x:l,y:d}));break;case"Q":s.push({command:"Q",x0:t,y0:i,x1:r,y1:n,x:l,y:d});break;case"T":m&&(g=void 0,p={x:2*t-(g="Q"===m.command?{x:m.x1,y:m.y1}:{x:t,y:i}).x,y:2*i-g.y},s.push({command:"Q",x0:t,y0:i,x1:p.x,y1:p.y,x:l,y:d}));break;case"A":var y=u;y.command="A",s.push(y);break;case"Z":case"z":s.push({command:"Z"}),l=t,d=i}t=l,i=d}return s}sg.prototype.getContext=function(e,t){return this.context},sg.prototype.toDataURL=function(e,t){return this.context.renderedPath};var ag=sg;function sg(){this.style={},this.context=new lg}Object.defineProperty(dg.prototype,"globalAlpha",{set:function(e){this.renderedPath+="GA:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"globalCompositeOperation",{set:function(e){this.renderedPath+="GCP:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"fillStyle",{set:function(e){this.renderedPath+="FS:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"strokeStyle",{set:function(e){this.renderedPath+="SS:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"direction",{set:function(e){this.renderedPath+="Dir:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"font",{set:function(e){this.renderedPath+="Fn:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"textAlign",{set:function(e){this.renderedPath+="TA:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"textBaseline",{set:function(e){this.renderedPath+="TBL:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"lineWidth",{set:function(e){this.renderedPath+="LW:"+e+";"},enumerable:!0,configurable:!0}),Object.defineProperty(dg.prototype,"lineCap",{set:function(e){this.renderedPath+="LC:"+e+";"},enumerable:!0,configurable:!0}),dg.prototype.drawImage=function(e,t,i,r,n,o,a,s,l){this.renderedPath+="LC:"+e.src+";",this.renderedPath+="sx:"+t+";",this.renderedPath+="sy:"+i+";",this.renderedPath+="sw:"+r+";",this.renderedPath+="sh:"+n+";",o&&(this.renderedPath+="dx:"+o+";"),a&&(this.renderedPath+="dy:"+a+";"),s&&(this.renderedPath+="dw:"+s+";"),l&&(this.renderedPath+="dh:"+l+";")},dg.prototype.beginPath=function(){this.renderedPath+="BP;"},dg.prototype.clip=function(e){this.renderedPath+="Cl;"},dg.prototype.fill=function(e){this.renderedPath+="Fl;"},dg.prototype.stroke=function(){this.renderedPath+="Stk;"},dg.prototype.closePath=function(){this.renderedPath+="CP;"},dg.prototype.lineTo=function(e,t){this.renderedPath+="LT:x:"+e+";y:"+t+";"},dg.prototype.moveTo=function(e,t){this.renderedPath+="MT:x:"+e+";y:"+t+";"},dg.prototype.rect=function(e,t,i,r){this.renderedPath+="Rt:x:"+e+";y:"+t+";w:"+i+";h:"+r+";"},dg.prototype.setLineDash=function(e){this.renderedPath+="Sgm:"+e.toString()+";"},dg.prototype.clearRect=function(e,t,i,r){this.renderedPath+="CR:x:"+e+";y:"+t+";w:"+i+";h:"+r+";"},dg.prototype.fillRect=function(e,t,i,r){this.renderedPath+="FR:x:"+e+";y:"+t+";w:"+i+";h:"+r+";"},dg.prototype.strokeRect=function(e,t,i,r){this.renderedPath+="SR:x:"+e+";y:"+t+";w:"+i+";h:"+r+";"},dg.prototype.restore=function(){this.renderedPath+="RES;"},dg.prototype.save=function(){this.renderedPath+="S;"},dg.prototype.fillText=function(e,t,i,r){this.renderedPath+="FT:"+e+";x:"+t+";y:"+i+";",r&&(this.renderedPath+="MW:"+r+";")},dg.prototype.measureText=function(e){return{width:30}},dg.prototype.strokeText=function(e,t,i,r){this.renderedPath+="ST:"+e+";x:"+t+";y:"+i+";",r&&(this.renderedPath+="MW:"+r+";")},dg.prototype.scale=function(e,t){this.renderedPath+="SC:x:"+e+";y:"+t+";"};var lg=dg;function dg(){this.renderedPath=""}var hg=function(){return(hg=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},cg=(Object.defineProperty(r.prototype,"pageCanvas",{get:function(){return this.isPrinting?(G.isNullOrUndefined(this.pageCanvasIn)&&(this.pageCanvasIn=document.createElement("canvas"),this.pageCanvasIn.getContext("2d").save()),this.pageCanvasIn):this.isExporting?(G.isNullOrUndefined(this.exportPageCanvas)&&(this.exportPageCanvas=new ag),this.exportPageCanvas):G.isNullOrUndefined(this.viewer)?void 0:this.documentHelper.containerCanvas},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectionCanvas",{get:function(){return G.isNullOrUndefined(this.viewer)?void 0:this.documentHelper.selectionCanvas},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pageContext",{get:function(){return this.pageCanvas.getContext("2d")},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectionContext",{get:function(){return this.selectionCanvas.getContext("2d")},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"viewer",{get:function(){return this.documentHelper.viewer},enumerable:!0,configurable:!0}),r.prototype.renderWidgets=function(e,t,i,r,n){if(!(G.isNullOrUndefined(this.pageCanvas)||G.isNullOrUndefined(e)||G.isNullOrUndefined(e.bodyWidgets))&&this.documentHelper.enableLayout){var o;this.pageContext.fillStyle=K.getColor(this.documentHelper.backgroundColor),this.pageContext.beginPath(),this.viewer instanceof Nl?(n=n>this.documentHelper.visibleBounds.height?n:this.documentHelper.visibleBounds.height,o=i,0===e.index&&(o=i-this.viewer.padding.top),this.pageContext.fillRect(t-this.viewer.padding.left,o,r+this.viewer.padding.left,n+this.viewer.padding.top)):this.pageContext.fillRect(t,i,r,n),this.pageContext.closePath(),this.viewer instanceof Tl&&(this.pageContext.strokeStyle=this.documentHelper.pageOutline,this.pageContext.strokeRect(t,i,r,n)),this.pageLeft=t,this.pageTop=i,this.pageIndex=e.index,this.isPrinting?this.setPageSize(e):(this.pageContext.beginPath(),this.pageContext.save(),this.pageContext.rect(t,i,r,n),this.pageContext.clip()),this.height=n,e.headerWidget&&this.renderHFWidgets(e,e.headerWidgetIn,r,!0),e.footerWidget&&this.renderHFWidgets(e,e.footerWidgetIn,r,!1);for(var a=0;a<e.bodyWidgets.length;a++)G.isNullOrUndefined(e.bodyWidgets[a].floatingElements)||this.renderFloatingItems(e,e.bodyWidgets[a].floatingElements,"Behind");for(a=0;a<e.bodyWidgets.length;a++)this.render(e,e.bodyWidgets[parseInt(a.toString(),10)]),e.footnoteWidget&&"Pages"===this.documentHelper.layoutType&&this.renderfootNoteWidget(e,e.footnoteWidget,r);e.endnoteWidget&&"Pages"===this.documentHelper.layoutType&&this.renderfootNoteWidget(e,e.endnoteWidget,r),this.documentHelper.editorProperties.enableHeaderAndFooter&&!this.isPrinting&&this.renderHeaderSeparator(e,this.pageLeft,this.pageTop,e.headerWidgetIn),this.pageLeft=0,this.pageTop=0,this.pageContext.restore()}},r.prototype.setPageSize=function(e){this.pageContext.clearRect(0,0,this.pageCanvas.width,this.pageCanvas.height),this.selectionContext.clearRect(0,0,this.selectionCanvas.width,this.selectionCanvas.height),this.pageContext.restore(),this.selectionContext.restore();var t=e.boundingRectangle.width,e=e.boundingRectangle.height,i=Math.max(window.devicePixelRatio,this.documentHelper.documentEditorSettings.printDevicePixelRatio);this.pageCanvas.width===t*i&&this.pageCanvas.height===e*i||(this.pageCanvas.height=e*i,this.pageCanvas.width=t*i,this.pageCanvas.style.height=e+"px",this.pageCanvas.style.width=t+"px",this.pageContext.globalAlpha=1,this.pageContext.scale(i,i)),this.pageContext.fillStyle="#FFFFFF",this.pageContext.fillRect(0,0,this.pageCanvas.width,this.pageCanvas.height),this.pageContext.fillStyle="#000000"},r.prototype.renderHFWidgets=function(e,t,i,r){this.isFieldCode&&(this.isFieldCode=!1),this.isPrinting||(this.pageContext.globalAlpha=this.documentHelper.editorProperties.enableHeaderAndFooter?1:.65);var n,o=!1,a="Word2013"===this.documentHelper.compatibilityMode&&e.headerWidget.height+e.footerWidget.height<e.boundingRectangle.height/100*80?e.boundingRectangle.height/100*80:e.boundingRectangle.height/100*40;if("Word2003"===this.documentHelper.compatibilityMode&&(a=this.getScaledValue(e.boundingRectangle.height)/100*50),!(G.isNullOrUndefined(e.bodyWidgets)||0===e.bodyWidgets.length||G.isNullOrUndefined(e.bodyWidgets[0])||G.isNullOrUndefined(e.bodyWidgets[0].sectionFormat))){r?(n=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.topMargin),a<Math.max(t.y+t.height,n)&&(o=!0,this.pageContext.beginPath(),this.pageContext.save(),this.pageContext.rect(this.pageLeft,this.pageTop,i,this.getScaledValue(a)),this.pageContext.clip())):(n=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.footerDistance),i=void 0,G.isNullOrUndefined(e.footerWidgetIn.sectionFormat),i=e.boundingRectangle.height-Math.max(e.footerWidgetIn.height+n,K.convertPointToPixel(e.footerWidgetIn.sectionFormat.bottomMargin)),Math.max(e.boundingRectangle.height-a,i)),this.renderFloatingItems(e,t.floatingElements,"Behind");for(var s=0;s<t.childWidgets.length;s++){var l=t.childWidgets[parseInt(s.toString(),10)];r||l.height,this.renderWidget(e,l)}this.renderFloatingItems(e,t.floatingElements,"InFrontOfText"),o&&this.pageContext.restore(),this.isPrinting||(this.pageContext.globalAlpha=this.documentHelper.editorProperties.enableHeaderAndFooter?.5:1)}},r.prototype.renderHeaderSeparator=function(e,t,i,r){var n,o,a,s,l,d=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.topMargin),d=this.getScaledValue(Math.max(r.y+r.height,Math.abs(d))),h=this.getScaledValue(e.boundingRectangle.width),c=this.pageContext,g=(c.save(),c.globalAlpha=.85,"Word2013"===this.documentHelper.compatibilityMode&&e.headerWidget.height+e.footerWidget.height<e.boundingRectangle.height/100*80?this.getScaledValue(e.boundingRectangle.height)/100*80:this.getScaledValue(e.boundingRectangle.height)/100*40),p=("Word2003"===this.documentHelper.compatibilityMode&&(g=this.getScaledValue(e.boundingRectangle.height)/100*50),d=Math.min(d,g),this.renderDashLine(c,t,i+d,h,"#000000",!1),this.getHeaderFooterType(e,!0)),r=this.viewer.getHeaderFooter(r.headerFooterType),u=e.sectionIndex,f=new G.L10n("documenteditor",this.documentHelper.defaultLocale),m=(f.setLocale(this.documentHelper.locale),1<this.documentHelper.headersFooters.length&&(n=u+1,p=p+" -"+f.getConstant("Section")+" "+n+"-"),c.font="9pt Arial",c.letterSpacing="0pt",c.measureText(p).width);this.renderHeaderFooterMark(c,t+5,i+d,m+10,20),this.renderHeaderFooterMarkText(c,p,t+10,d+i+15),this.documentHelper.headersFooters[parseInt(u.toString(),10)]&&(o=this.documentHelper.headersFooters[parseInt(u.toString(),10)][parseInt(r.toString(),10)]),0===u||o||(s=f.getConstant("Same as Previous"),p=c.measureText(s).width,l=this.viewer.containerWidth-p-75+t,this.renderHeaderFooterMark(c,l,i+d,p+10,20),this.renderHeaderFooterMarkText(c,s,l+5,d+i+15)),e.footerWidget&&(r=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.footerDistance),u="Word2013"===this.documentHelper.compatibilityMode&&e.footerWidgetIn.y+e.footerWidgetIn.height>e.boundingRectangle.height?e.footerWidgetIn.y:this.getScaledValue(e.boundingRectangle.height)-this.getScaledValue(Math.max(e.footerWidgetIn.height+r,Math.abs(K.convertPointToPixel(e.footerWidgetIn.sectionFormat.bottomMargin)))),u=Math.max(this.getScaledValue(e.boundingRectangle.height)-g,u),this.renderDashLine(c,t,i+u,h,"#000000",!1),o=this.getHeaderFooterType(e,!1),p=e.sectionIndex,1<this.documentHelper.headersFooters.length&&(n=p+1,o=o+" -"+f.getConstant("Section")+" "+n+"-"),m=c.measureText(o).width,this.renderHeaderFooterMark(c,t+5,i+u-20,m+10,20),this.renderHeaderFooterMarkText(c,o,t+10,i+u-5),d=this.viewer.getHeaderFooter(e.footerWidget.headerFooterType),this.documentHelper.headersFooters[parseInt(p.toString(),10)]&&(a=this.documentHelper.headersFooters[parseInt(p.toString(),10)][parseInt(d.toString(),10)]),0===p||a||(s=f.getConstant("Same as Previous"),r=c.measureText(s).width,l=this.viewer.containerWidth-r-75+t,this.renderHeaderFooterMark(c,l,i+u-20,r+10,20),this.renderHeaderFooterMarkText(c,s,l+5,i+u-5)),c.restore())},r.prototype.getFooterHeight=function(e){var t=e.boundingRectangle.height/100*40,i=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.footerDistance),i=e.boundingRectangle.height-Math.max(e.footerWidgetIn.height+i,K.convertPointToPixel(e.footerWidgetIn.sectionFormat.bottomMargin));return Math.max(e.boundingRectangle.height-t,i)},r.prototype.getHeaderFooterType=function(e,t){var i,r=new G.L10n("documenteditor",this.documentHelper.defaultLocale);return r.setLocale(this.documentHelper.locale),i=t?r.getConstant("Header"):r.getConstant("Footer"),e.bodyWidgets[0].sectionFormat.differentFirstPage&&(G.isNullOrUndefined(e.previousPage)||e.sectionIndex!==e.previousPage.sectionIndex)?i=t?r.getConstant("First Page Header"):r.getConstant("First Page Footer"):e.bodyWidgets[0].sectionFormat.differentOddAndEvenPages&&(i=(this.documentHelper.pages.indexOf(e)+1)%2==0?t?r.getConstant("Even Page Header"):r.getConstant("Even Page Footer"):t?r.getConstant("Odd Page Header"):r.getConstant("Odd Page Footer")),i},r.prototype.renderDashLine=function(e,t,i,r,n,o){e.beginPath(),e.strokeStyle=n,e.lineWidth=1,o?e.setLineDash([3,2]):e.setLineDash([6,4]),e.moveTo(t,i),e.lineTo(t+r,i),e.stroke(),e.setLineDash([]),e.closePath()},r.prototype.renderSolidLine=function(e,t,i,r,n){e.beginPath(),e.strokeStyle=n,e.lineWidth=.5,e.moveTo(t,i),e.lineTo(t+r,i),e.stroke(),e.closePath()},r.prototype.renderHeaderFooterMark=function(e,t,i,r,n){e.beginPath(),e.fillStyle="lightgray",e.fillRect(t,i,r,n),e.strokeStyle="black",e.strokeRect(t,i,r,n),e.closePath()},r.prototype.renderHeaderFooterMarkText=function(e,t,i,r){e.beginPath(),e.fillStyle="#000000",e.textBaseline="alphabetic",e.fillText(t,i,r),e.closePath()},r.prototype.render=function(e,t){this.isFieldCode&&(this.isFieldCode=!1);var i,r,n,o=!1;G.isNullOrUndefined(t.nextRenderedWidget)||t.columnIndex+1!==t.nextRenderedWidget.columnIndex||(r=t.nextRenderedWidget),this.viewer instanceof Nl||!(1<t.sectionFormat.columns.length)||G.isNullOrUndefined(r)||(r=e.bodyWidgets.indexOf(t),n=0===t.columnIndex?(i=e.bodyWidgets[r].x-K.convertPointToPixel(e.bodyWidgets[r].sectionFormat.leftMargin),K.convertPointToPixel(e.bodyWidgets[r].sectionFormat.leftMargin)+t.sectionFormat.columns[t.columnIndex].width+t.sectionFormat.columns[t.columnIndex].space/2):r===t.sectionFormat.columns.length-1?(i=e.bodyWidgets[r].x-t.sectionFormat.columns[t.columnIndex-1].space/2,K.convertPointToPixel(e.bodyWidgets[r].sectionFormat.rightMargin)+t.sectionFormat.columns[t.columnIndex].width+t.sectionFormat.columns[t.columnIndex-1].space/2):(i=e.bodyWidgets[r].x-t.sectionFormat.columns[t.columnIndex].space/2,t.sectionFormat.columns[t.columnIndex].width+t.sectionFormat.columns[t.columnIndex].space),this.clipRect(i,e.bodyWidgets[r].y,this.getScaledValue(n),this.getScaledValue(e.boundingRectangle.height)),o=!0);for(var a=0;a<t.childWidgets.length;a++){var s=t.childWidgets[parseInt(a.toString(),10)];0===a&&t.childWidgets[0]instanceof Q&&0<t.childWidgets[0].childWidgets.length&&e.repeatHeaderRowTableWidget&&this.renderHeader(e,s,this.documentHelper.layout.getHeader(t.childWidgets[0])),o&&s instanceof Q&&s.wrapTextAround&&(this.pageContext.restore(),o=!1),this.renderWidget(e,s),!o&&i&&n&&(this.clipRect(i,e.bodyWidgets[e.bodyWidgets.indexOf(t)].y,this.getScaledValue(n),this.getScaledValue(e.boundingRectangle.height)),o=!0)}o&&this.pageContext.restore();for(a=0;a<e.bodyWidgets.length;a++)G.isNullOrUndefined(e.bodyWidgets[a].floatingElements)||this.renderFloatingItems(e,e.bodyWidgets[a].floatingElements,"InFrontOfText");for(var l,d,h,c,a=0;a<e.bodyWidgets.length;a++)!0===e.bodyWidgets[parseInt(a.toString(),10)].sectionFormat.lineBetweenColumns&&0!==e.bodyWidgets[parseInt(a.toString(),10)].columnIndex&&1<e.bodyWidgets.length&&(d=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.topMargin),d=this.getScaledValue(Math.max(e.headerWidgetIn.y+e.headerWidgetIn.height,d)),l=this.getScaledValue(e.boundingRectangle.height)/100*40,c=K.convertPointToPixel(e.bodyWidgets[0].sectionFormat.footerDistance),c=this.getScaledValue(e.boundingRectangle.height)-this.getScaledValue(Math.max(e.footerWidgetIn.height+c,K.convertPointToPixel(e.footerWidgetIn.sectionFormat.bottomMargin))),c=Math.max(this.getScaledValue(e.boundingRectangle.height)-l,c),l=(e.bodyWidgets[parseInt(a.toString(),10)].x-(e.bodyWidgets[parseInt(a.toString(),10)].previousRenderedWidget.x+e.bodyWidgets[parseInt(a.toString(),10)].previousRenderedWidget.width))/2+(e.bodyWidgets[parseInt(a.toString(),10)].previousRenderedWidget.x+e.bodyWidgets[parseInt(a.toString(),10)].previousRenderedWidget.width),c=d/this.documentHelper.zoomFactor,d=l,e.footnoteWidget?(e.footerWidgetIn.height,e.footnoteWidget.height,this.documentHelper.zoomFactor,this.documentHelper.zoomFactor):(e.footerWidgetIn.height,this.documentHelper.zoomFactor),h=this.documentHelper.layout.getBodyWidget(e.bodyWidgets[parseInt(a.toString(),10)],!0),h=this.documentHelper.layout.getNextWidgetHeight(h),c=e.bodyWidgets[parseInt(a.toString(),10)].y,this.renderSingleBorder("#000000",l,c,d,h,.5,"Single"))},r.prototype.renderFloatingItems=function(e,t,i){if(!G.isNullOrUndefined(t)&&0<t.length){var r=new N;t.sort(function(e,t){return e instanceof Q||t instanceof Q?0:e.zOrderPosition-t.zOrderPosition});for(var n=0;n<t.length;n++)t[n]instanceof Q||(o=t[n],"Behind"===i&&"Behind"!==o.textWrappingStyle)||"Behind"!==i&&"Behind"===o.textWrappingStyle||(!this.isOverLappedShapeWidget(o)||r.containsKey(o.zOrderPosition)?o instanceof ae?this.renderImageElementBox(o,o.x,o.y,0):o instanceof ne?(a=this.getScaledValue(o.x,1),s=this.getScaledValue(o.y,2),this.renderShapeElementBox(o,a,s,e)):o instanceof oe&&this.renderGroupShapeElementBox(o,e):r.containsKey(o.zOrderPosition)||r.add(o.zOrderPosition,o));if(0<r.length)for(var o,a,s,l=r.keys.sort(),d=0;d<l.length;d++)(o=r.get(l[d]))instanceof ae?this.renderImageElementBox(o,o.x,o.y,0):o instanceof ne?(a=this.getScaledValue(o.x,1),s=this.getScaledValue(o.y,2),this.renderShapeElementBox(o,a,s,e)):o instanceof oe&&this.renderGroupShapeElementBox(o,e)}},r.prototype.isOverLappedShapeWidget=function(e){return e instanceof ae&&"Inline"!==e.textWrappingStyle&&"Behind"!==e.textWrappingStyle&&!("Word2013"!==this.documentHelper.compatibilityMode&&e.isBelowText&&"InFrontOfText"!==e.textWrappingStyle)||(e instanceof ne||e instanceof oe)&&"Inline"!==e.textWrappingStyle&&"Behind"!==e.textWrappingStyle&&!("Word2013"!==this.documentHelper.compatibilityMode&&e.isBelowText&&"InFrontOfText"!==e.textWrappingStyle)},r.prototype.renderGroupShapeElementBox=function(e,t){for(var i=0;i<e.childWidgets.length;i++){var r,n,o=e.childWidgets[i];o instanceof oe?this.renderGroupShapeElementBox(o,t):o instanceof ae?this.renderImageElementBox(o,o.x,o.y,0):o instanceof ne&&(r=this.getScaledValue(o.x,1),n=this.getScaledValue(o.y,2),this.renderShapeElementBox(o,r,n,t))}},r.prototype.renderShapeElementBox=function(e,t,i,r){var n=0===e.height,o=e.autoShapeType,a=e.textFrame.childWidgets,s=(this.pageContext.beginPath(),this.pageContext.globalAlpha),s=(e.fillFormat&&e.fillFormat.color&&e.fillFormat.fill&&"StraightConnector"!==o?(this.pageContext.globalAlpha=1,this.pageContext.fillStyle=e.fillFormat.color,"Rectangle"===o?this.pageContext.fillRect(t,i,this.getScaledValue(e.width),this.getScaledValue(e.height)):this.renderPathElement(e,t,i)):e.fillFormat&&e.fillFormat.color&&"Oval"===o&&(this.pageContext.fillStyle=e.fillFormat.color,this.renderPathElement(e,t,i)),this.pageContext.globalAlpha=s,G.isNullOrUndefined(o)||e.lineFormat.line&&"None"!==e.lineFormat.lineFormatType&&(this.pageContext.lineWidth=e.lineFormat.weight,this.pageContext.strokeStyle=K.getColor(e.lineFormat.color),this.setShapeLineDash(e),"Rectangle"===o?this.pageContext.strokeRect(t,i,this.getScaledValue(e.width),this.getScaledValue(e.height)):"StraightConnector"===o&&(this.pageContext.moveTo(t,i),this.pageContext.lineTo(t+this.getScaledValue(e.width),i+this.getScaledValue(e.height)),this.pageContext.stroke()),this.pageContext.setLineDash([])),this.pageContext.closePath(),!1);0!=e.width&&0!=e.height&&(s=!0,this.clipRect(e.x,e.y,this.getScaledValue(e.width),this.getScaledValue(e.height)));for(var l=0;l<a.length;l++)this.renderWidget(r,a[l]),n&&"StraightConnector"!==o&&(e.height=K.round(e.height+a[l].height,5));n=n&&!1,s&&this.pageContext.restore()},r.prototype.renderPathElement=function(e,t,i){var r,n;if(e.autoShapeType&&"Unknown"!=e.autoShapeType)switch(e.autoShapeType){case"ElbowConnector":r=this.getConnectorPathData(e);break;case"CurvedConnector":r=this.getCurvedPathData(e);break;default:r=this.getShape(e.autoShapeType)}else e.autoShapeType&&(r=this.constructPath(e));r&&(n=this.calculatePathBounds(r),n=this.updatePath(r,n,e),this.drawPath(n,e,t,i))},r.prototype.renderWidget=function(e,t){if(this.documentHelper.enableLockAndEdit&&this.renderLockRegionBorder(e,t),"Word2003"===this.documentHelper.compatibilityMode)if(t instanceof Z){if(!1===t.isRender)return}else if(t instanceof Q&&!1===t.isRender)return;t instanceof Z?this.renderParagraphWidget(e,t):this.renderTableWidget(e,t)},r.prototype.getConnectorPathData=function(e){var t=e.distanceTop,i=e.distanceLeft,r=e.distanceTop+this.getScaledValue(e.width),e=e.distanceLeft+this.getScaledValue(e.height),n=t+(r-t)/2,t="M "+t+","+i+" ";return(t+="L "+n+","+i+" ")+("L "+n+","+e+" ")+("L "+r+","+e)},r.prototype.getCurvedPathData=function(e){var t=e.distanceTop,i=e.distanceLeft,r=e.distanceTop+this.getScaledValue(e.width),n=e.distanceLeft+this.getScaledValue(e.height);return"M "+t+","+i+" C "+(t+this.getScaledValue(e.width)/1.5)+","+i+" "+(r-this.getScaledValue(e.width)/1.5)+","+n+" "+r+","+n},r.prototype.constructPath=function(e){var t,i=e.editingPoints,r={};for(t in i)i.hasOwnProperty(t)&&(r[t]=this.calculateCoord(i[t],400,400));return"\n M "+r.connsiteX0+","+r.connsiteY0+"\n L "+r.connsiteX1+","+r.connsiteY1+"\n L "+r.connsiteX2+","+r.connsiteY2+"\n L "+r.connsiteX3+","+r.connsiteY3+"\n L "+r.connsiteX4+","+r.connsiteY4+"\n Z\n "},r.prototype.calculateCoord=function(e,t,i){var e=e.split(" "),r=e[0],n=parseFloat(e[1]),t="w"===e[2]?t:i,i=parseFloat(e[3]);return"*/"===r?n/i*t:0},r.prototype.drawPath=function(e,t,i,r){e=og(Zc(e)),this.setStyle(t);var n=this.pageContext;n.translate&&(n.save(),n.beginPath(),n.translate(i,r),this.renderPath(n,e),n.fill(),t.lineFormat.line&&"None"!==t.lineFormat.lineFormatType&&(n.translate(-i,-r),n.stroke()),n.restore(),n.setLineDash([]))},r.prototype.renderPath=function(e,t){for(var i,r,n,o,a,s,l=e,d=t,h=0,c=0,g=0,p=d.length;g<p;++g){var u=d[parseInt(g.toString(),10)],f=u.command;switch("x1"in u&&(n=u.x1),"x2"in u&&(a=u.x2),"y1"in u&&(o=u.y1),"y2"in u&&(s=u.y2),"x"in u&&(h=u.x),"y"in u&&(c=u.y),f){case"M":l.moveTo(h,c),u.x=h,u.y=c;break;case"L":l.lineTo(h,c),u.x=h,u.y=c;break;case"C":l.bezierCurveTo(n,o,a,s,h,c),u.x=h,u.y=c,u.x1=n,u.y1=o,u.x2=a,u.y2=s;break;case"Q":l.quadraticCurveTo(n,o,h,c),u.x=h,u.y=c,u.x1=n,u.y1=o;break;case"A":var m=i,y=r,v=u.r1,W=u.r2,b=u.angle*(Math.PI/180),x=u.largeArc,w=u.sweep,F=h,C=c,P={x:Math.cos(b)*(m-F)/2+Math.sin(b)*(y-C)/2,y:-Math.sin(b)*(m-F)/2+Math.cos(b)*(y-C)/2},T=Math.pow(P.x,2)/Math.pow(v,2)+Math.pow(P.y,2)/Math.pow(W,2),T=(1<T&&(v*=Math.sqrt(T),W*=Math.sqrt(T)),Math.pow(W,2)*Math.pow(P.x,2)),x=(x===w?-1:1)*Math.sqrt((Math.pow(v,2)*Math.pow(W,2)-Math.pow(v,2)*Math.pow(P.y,2)-T)/(Math.pow(v,2)*Math.pow(P.y,2)+Math.pow(W,2)*Math.pow(P.x,2))),T=(x=isNaN(x)?0:x)*v*P.y/W,x=x*-W*P.x/v,m={x:(m+F)/2+Math.cos(b)*T-Math.sin(b)*x,y:(y+C)/2+Math.sin(b)*T+Math.cos(b)*x},F=this.a([1,0],[(P.x-T)/v,(P.y-x)/W]),y=[(P.x-T)/v,(P.y-x)/W],C=[(-P.x-T)/v,(-P.y-x)/W],T=this.a(y,C),P=(this.r(y,C)<=-1&&(T=Math.PI),w?1:-1),x=F+(T=1<=this.r(y,C)?0:T)/2*P;Math.cos(x),Math.sin(x);u.centp=m,u.xAxisRotation=b,u.rx=v,u.ry=W,u.a1=F,u.ad=T,u.sweep=w,null!=l&&(y=W<v?v:W,C=W<v?1:v/W,P=W<v?W/v:1,l.save(),l.translate(m.x,m.y),l.rotate(b),l.scale(C,P),l.arc(0,0,y,F,F+T,!w),l.scale(1/C,1/P),l.rotate(-b),l.translate(-m.x,-m.y),l.restore());break;case"Z":case"z":l.closePath(),h=i,c=r}i=h,r=c}},r.prototype.m=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2))},r.prototype.r=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(this.m(e)*this.m(t))},r.prototype.a=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(this.r(e,t))},r.prototype.updatePath=function(e,t,i){var r=!1,n="",o=-t.x,a=-t.y;return this.getScaledValue(i.width)===t.width&&this.getScaledValue(i.height)===t.height||(o=this.getScaledValue(i.width)/Number(t.width||1),a=this.getScaledValue(i.height)/Number(t.height||1),r=!0),i=tg(Zc(e)),n=r?ig(i,o,a,r,t.x,t.y,0,0):Qc(i),r=!1,n},r.prototype.calculatePathBounds=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=(document.body.appendChild(t),document.createElementNS("http://www.w3.org/2000/svg","path")),e=(i.setAttribute("d",e),t.appendChild(i),i.getBBox());return t.remove(),new _(e.x,e.y,e.width,e.height)},r.prototype.setStyle=function(e){var t=this.pageContext;"none"===e.lineFormat.color&&(e.lineFormat.color="transparent"),t.strokeStyle=K.getColor(e.lineFormat.color),t.lineWidth=e.lineFormat.weight,0===e.lineFormat.weight&&(t.strokeStyle="transparent"),this.setShapeLineDash(e)},r.prototype.setShapeLineDash=function(e){var t=e.lineFormat.weight,i=3*t,r=[];switch(e.lineFormat.dashStyle){case"Dot":r=[1.25*t,t];break;case"DotGEL":r=[4.5*t,3*t];break;case"Dash":r=[4*t,1.5*t];break;case"DashGEL":r=[4.5*t,3.5*t];break;case"DashDot":case"DashDotGEL":r=[4.5*t,1.25*i,t,1.25*i];break;case"DashDotDot":r=[4.5*t,i,t,i,t,i];break;case"LongDashGEL":r=[9*t,i];break;case"LongDashDotGEL":r=[9.5*t,1.25*i,t,1.25*i];break;case"LongDashDotDotGEL":r=[9.5*t,i,t,1.25*i,t,1.25*i]}this.pageContext.setLineDash(0<t?r:[])},r.prototype.renderLockRegionBorder=function(e,t){var i,r,n,o,a,s;!t.isInsideTable&&t instanceof Yl&&t.locked&&(o=this.documentHelper.documentEditorSettings.collaborativeEditingSettings,e=e.bodyWidgets[0].sectionFormat,i=K.convertPointToPixel(e.leftMargin)-5,e=e.pageWidth-e.leftMargin-e.rightMargin,e=K.convertPointToPixel(e)+10,this.viewer instanceof Nl&&(i=t.x-5,e=(this.documentHelper.visibleBounds.width-5*this.viewer.padding.right)/this.documentHelper.zoomFactor),r=t.previousRenderedWidget,n=t.nextRenderedWidget,o=t.lockedBy===this.documentHelper.editorProperties.currentUser?o.editableRegionColor:o.lockedRegionColor,a=t.y,s=t.y+t.height,this.renderSingleBorder(o,i,a,i,s,1,"Single"),!G.isNullOrUndefined(r)&&r.locked&&t.lockedBy===r.lockedBy||this.renderSingleBorder(o,i,a,i+e,a,1,"Single"),this.renderSingleBorder(o,i+e,a,i+e,s,1,"Single"),!G.isNullOrUndefined(n)&&n.locked&&t.lockedBy===n.lockedBy||this.renderSingleBorder(o,i,s,i+e,s,1,"Single"))},r.prototype.renderHeader=function(e,t,i){if(!G.isNullOrUndefined(i)){e.viewer.updateClientArea(e.bodyWidgets[0],e);var r=!1,n=((r=t.containerWidget instanceof Y&&1<t.containerWidget.sectionFormat.columns.length?!0:r)?t.containerWidget:e.viewer.clientArea).y,o=i.ownerTable.getSplitWidgets()[0];if(0!==o.childWidgets.length&&-1===t.childWidgets.indexOf(i)){var a=o.clone(!0);this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.constructRevisionsForTable(a,!0),a.childWidgets=[],e.viewer.updateClientAreaLocation(a,new _((r?t:e.viewer.clientArea).x,n,a.width,a.height)),this.updateTableHeaderRows(i,a,e,n,(r?t:e.viewer.clientArea).x,r),this.isRenderHeader=!0;for(var s=0;s<a.childWidgets.length;s++){for(var l,d=a.childWidgets[s],h=0;h<d.childWidgets.length;h++)l=d.childWidgets[h],this.renderTableCellWidget(e,l);n+=d.height}this.isRenderHeader=!1,t.y!==n&&e.documentHelper.layout.updateChildLocationForTable(n,t,void 0,!1,r)}}},r.prototype.updateClonedRowLocation=function(e,t,i,r){for(var n=[],o=0;o<t.childWidgets.length;o++)n.push(t.childWidgets[o].x);if(e.documentHelper.layout.updateChildLocationForRow(i,t,void 0,!1,r),r&&0!==t.childWidgets.length)for(var a=t.x+t.childWidgets[0].margin.left-n[0],o=0;o<t.childWidgets.length;o++){var s=t.childWidgets[o];s.x=n[o]+a;for(var l=0;l<s.childWidgets.length;l++)e.documentHelper.layout.shiftXPosition(s.childWidgets[l],a)}},r.prototype.updateTableHeaderRows=function(e,t,i,r,n,o){for(var a=e.ownerTable,s=1,l=0;l<a.childWidgets.length;l++){var d=a.childWidgets[l];if(d.rowFormat.isHeader){var h=d.clone(!0);if(this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.constructRevisionFromID(h.rowFormat),t.childWidgets.push(h),h.containerWidget=t,i.viewer.updateClientAreaLocation(h,new _(n,r,h.width,h.height)),this.updateClonedRowLocation(i,h,r,o),r+=h.height,d==e){for(var c=0;c<e.childWidgets.length;c++)var g=e.childWidgets[c],s=Math.max(s,g.cellFormat.rowSpan);if(1<s&&l+s<a.childWidgets.length)for(var p=1;p<s;p++){var u=a.childWidgets[l+p];G.isNullOrUndefined(u)||(u=u.clone(),this.documentHelper.isEditorModule&&this.documentHelper.editorProperties.constructRevisionFromID(u.rowFormat),t.childWidgets.push(u),u.containerWidget=t,i.viewer.updateClientAreaLocation(u,new _(n,r,u.width,u.height)),this.updateClonedRowLocation(i,u,r,o),r+=u.height)}}}}},r.prototype.renderParagraphWidget=function(e,t){if(!this.isFieldCode||!t.isFieldCodeBlock){var i=t.y,r=t.x,n=!1,o=t.firstChild,a=0;if(!G.isNullOrUndefined(o))for(var s=0;s<o.children.length;s++){var l=o.children[s];if(l instanceof ie){a=l.padding.left;break}}0<a&&(this.clipRect(t.x+a,this.getScaledValue(e.boundingRectangle.y),this.getScaledValue(e.boundingRectangle.width),this.getScaledValue(e.boundingRectangle.height)),n=!0),t.containerWidget instanceof X&&t.containerWidget.isEmpty&&!this.documentHelper.isSelectionInHeaderFooter||this.renderParagraphBorder(e,t),n&&this.pageContext.restore();for(s=0;s<t.childWidgets.length;s++){var d=t.childWidgets[s];i+=d.marginTop,!d.isFirstLine()&&t.previousRenderedWidget&&t.previousRenderedWidget instanceof Z&&this.documentHelper.layout.isMergedWithNextParagraph(t.previousRenderedWidget)&&(r=e.viewer.clientArea.x),this.renderLine(d,e,r,i),i+=d.height}}},r.prototype.renderParagraphBorder=function(e,t){for(var i=t.paragraphFormat.borders.left,r=t.paragraphFormat.borders.top,n=t.paragraphFormat.borders.right,o=t.paragraphFormat.borders.bottom,a=0,s=0,l=0,d=0,h=0,c=t.firstChild,g=t.lastChild,p=this.getBottomMargin(t),u=0,f=0;f<t.childWidgets.length;f++)u+=t.childWidgets[f].height;var m,y=Number(t.height.toFixed(2)),y=(y<(u=Number(u.toFixed(2)))&&(p-=u-y),this.documentHelper.canRenderBorder(t));G.isNullOrUndefined(i)||"None"===i.lineStyle||(a=this.documentHelper.getParagraphLeftPosition(t)-K.convertPointToPixel(i.space+i.lineWidth),t.containerWidget instanceof P&&(m=t.containerWidget.containerShape).x>a&&(a+=K.convertPointToPixel(i.lineWidth)),l=a,d=s+t.height,d="None"!==r.lineStyle&&c.isFirstLine()&&!y.skipTopBorder?(s=t.y+this.getTopMargin(t)-K.convertPointToPixel(r.lineWidth+r.space))+t.height-(this.getTopMargin(t)-K.convertPointToPixel(r.lineWidth+r.space)):(s=t.y)+t.height,"None"!==o.lineStyle&&g.isLastLine()&&!y.skipBottomBorder&&(d=d+K.convertPointToPixel(o.lineWidth+o.space)-p),h=K.convertPointToPixel(i.lineWidth),this.renderSingleBorder(i.color,a,s,l,d,h,i.lineStyle)),G.isNullOrUndefined(r)||"None"===r.lineStyle||!c.isFirstLine()||y.skipTopBorder||(l=(a=this.documentHelper.getParagraphLeftPosition(t))+this.getContainerWidth(t,e),d=s=t.y+this.getTopMargin(t)-K.convertPointToPixel(r.lineWidth+r.space),"None"!==i.lineStyle&&(a-=K.convertPointToPixel(i.space+i.lineWidth)),"None"!==n.lineStyle&&(l+=K.convertPointToPixel(n.space+n.lineWidth)),h=K.convertPointToPixel(r.lineWidth),this.renderSingleBorder(r.color,a,s,l,d,h,r.lineStyle)),G.isNullOrUndefined(n)||"None"===n.lineStyle||(a=this.documentHelper.getParagraphLeftPosition(t)+this.getContainerWidth(t,e)+K.convertPointToPixel(n.space+n.lineWidth),t.containerWidget instanceof P&&(m=t.containerWidget.containerShape).x+m.width<a&&(a-=K.convertPointToPixel(n.lineWidth)),l=a,d=(s=d)+t.height,d="None"!==r.lineStyle&&c.isFirstLine()&&!y.skipTopBorder?(s=t.y+this.getTopMargin(t)-K.convertPointToPixel(r.lineWidth+r.space))+t.height-(this.getTopMargin(t)-K.convertPointToPixel(r.lineWidth+r.space)):(s=t.y)+t.height,"None"!==o.lineStyle&&g.isLastLine()&&!y.skipBottomBorder&&(d=d+K.convertPointToPixel(o.lineWidth+o.space)-p),h=K.convertPointToPixel(n.lineWidth),this.renderSingleBorder(n.color,a,s,l,d,h,n.lineStyle)),G.isNullOrUndefined(o)||"None"===o.lineStyle||!g.isLastLine()||y.skipBottomBorder||(l=(a=this.documentHelper.getParagraphLeftPosition(t))+this.getContainerWidth(t,e),d=s=t.y+t.height+K.convertPointToPixel(o.lineWidth+o.space)-p,"None"!==i.lineStyle&&(a-=K.convertPointToPixel(i.space+i.lineWidth)),"None"!==n.lineStyle&&(l+=K.convertPointToPixel(n.space+n.lineWidth)),h=K.convertPointToPixel(o.lineWidth),this.renderSingleBorder(o.color,a,s,l,d,h,o.lineStyle))},r.prototype.renderImgBorder=function(e,t,i,r,n,o,a,s){var l,d=e.width/this.documentHelper.zoomFactor,o=K.convertPointToPixel(o),h=this.documentHelper.editorProperties.getNextTextElement(e),c=this.documentHelper.editorProperties.getPreviousTextElement(e),g="Subscript"===a?e.margin.top+(e.height-e.height/1.5):e.margin.top,a=e.height/("Normal"===a?1:1.5)+15,p=0,u=0,p=i+=0<g?g:0,u=i;this.renderSingleBorder(r,g=t,p,l=t+d,u,o,n),this.renderSingleBorder(r,g,u=p=i+a,l,u,o,n),p=i,l=t,c instanceof ie&&(n=c.line!==e.line||null==c.contentControlProperties?"Solid":"None"),this.renderSingleBorder(r,g,p,l,u,o,n),l=g=t+d,n=!(h instanceof ie)||h.line!==e.line||null==h.contentControlProperties?"Solid":"None",this.renderSingleBorder(r,g,p,l,u,o,n)},r.prototype.getContainerWidth=function(e,t){var i,r,n=0;return e.paragraphFormat.firstLineIndent<0&&(n=Math.abs(e.paragraphFormat.firstLineIndent)),e.isInsideTable?(i=e.associatedCell).width+i.margin.left+i.margin.right-i.leftBorderWidth:e.containerWidget instanceof P?e.width:this.viewer instanceof Nl?(i=K.convertPointToPixel(e.leftIndent+e.rightIndent),(this.documentHelper.visibleBounds.width-i-4*this.viewer.padding.right-2*this.viewer.padding.left)/this.documentHelper.zoomFactor):(i=e.bodyWidget)instanceof Y&&1<i.sectionFormat.columns.length?(r=i.columnIndex,i.sectionFormat.columns[r].width+K.convertPointToPixel(n-(e.rightIndent+e.leftIndent))):(r=i.sectionFormat.pageWidth-i.sectionFormat.leftMargin-i.sectionFormat.rightMargin,K.convertPointToPixel(r+n-(e.rightIndent+e.leftIndent)))},r.prototype.getTopMargin=function(e){var t;return e.isEmpty()?e.childWidgets[0].margin.top:(e=e.childWidgets[0],t=0,G.isNullOrUndefined(e.margin)?t:e.margin.top)},r.prototype.getBottomMargin=function(e){var e=e.childWidgets[e.childWidgets.length-1],t=0;return t=G.isNullOrUndefined(e.margin)?t:e.margin.bottom},r.prototype.renderfootNoteWidget=function(e,t,i){1!==t.page.bodyWidgets.length||1===t.page.bodyWidgets[0].childWidgets.length&&null!=t.page.bodyWidgets[0].childWidgets[0].isEmpty&&t.page.bodyWidgets[0].childWidgets[0].isEmpty()||t.page.bodyWidgets[0].childWidgets.length;var r=this.getFooterHeight(e),n=t.y+t.height;r<n&&(n=r-t.y),this.pageContext.beginPath(),this.pageContext.save(),this.pageContext.rect(this.pageLeft,this.getScaledValue(t.y,2),this.getScaledValue(i),this.getScaledValue(n)),this.pageContext.clip();for(var o=0;o<t.bodyWidgets.length;o++)for(var a=t.bodyWidgets[o],s=a.footNoteReference,l=0;l<a.childWidgets.length;l++){var d,h,c,g,p=a.childWidgets[l];0===o&&0===l&&(g=this.pageContext,c=e.bodyWidgets[0].x,1<e.bodyWidgets.length&&!G.isNullOrUndefined(a.nextWidget)&&"NoBreak"!==a.nextWidget.sectionFormat.breakCode?(d=e.bodyWidgets[0].width,this.renderSolidLine(g,this.getScaledValue(c,1),this.getScaledValue(t.y+t.margin.top/2+1,2),d*this.documentHelper.zoomFactor,"#000000")):(d=!1,0<this.documentHelper.footnotes.separator.length&&this.documentHelper.footnotes.separator[0]instanceof Z&&(!(h=this.documentHelper.footnotes.separator[0]).paragraphFormat.bidi&&"Right"!==h.paragraphFormat.textAlignment||(d=!0)),h=d?c+e.bodyWidgets[0].width-210*this.documentHelper.zoomFactor:c,this.renderSolidLine(g,this.getScaledValue(h,1),this.getScaledValue(t.y+t.margin.top/2+1,2),210*this.documentHelper.zoomFactor,"#000000"))),G.isNullOrUndefined(s)||G.isNullOrUndefined(this.documentHelper.editorProperties)||this.documentHelper.editorProperties.isFootNoteInsert||(c=this.documentHelper.getFirstParagraphBlock(p)).firstChild.children[0]instanceof ie&&""===(g=c.firstChild.children[0]).text&&(g.text=g.text.replace(g.text,s.text),g.width=s.width),this.renderWidget(e,p)}this.pageContext.restore()},r.prototype.renderTableWidget=function(e,t){if(!this.isFieldCode&&!G.isNullOrUndefined(t))for(var i=0;i<t.childWidgets.length;i++){var r,n,o,a=t.childWidgets[i];this.renderTableRowWidget(e,a),0<t.tableFormat.cellSpacing&&this.renderTableOutline(e,t),a.isRenderBookmarkEnd&&this.documentHelper.documentEditorSettings.showBookmarks&&(n=(r=a.lastChild).ownerTable.isBidiTable?ee.getCellLeftBorder(r):ee.getCellRightBorder(r),n=K.convertPointToPixel(n.getLineWidth()),o=(a=this.documentHelper.editorProperties.getLastParagraph(a.lastChild)).lastChild.height-a.lastChild.margin.bottom,this.renderBookmark(this.getScaledValue(r.x+r.width+r.margin.right-n/2+this.documentHelper.textHelper.getParagraphMarkWidth(a.characterFormat),1),this.getScaledValue(r.y-r.margin.top,2),this.getScaledValue(o),1))}},r.prototype.renderTableRowWidget=function(e,t){for(var i=0;i<t.childWidgets.length;i++){var r,n,o=t.childWidgets[i];this.renderTableCellWidget(e,o),o.isRenderBookmarkEnd&&this.documentHelper.documentEditorSettings.showBookmarks&&(r=(o=this.documentHelper.editorProperties.getLastParagraph(o)).lastChild,n=this.documentHelper.editorProperties.getEndPosition(o),o=o.y+r.margin.top,this.renderBookmark(this.getScaledValue(n.x,1),this.getScaledValue(o,2),this.getScaledValue(r.height-(r.margin.bottom+r.margin.top))-2,1))}},r.prototype.renderTableCellWidget=function(e,t){if(!this.isPrinting&&!this.isExporting){var i=t.margin.top-t.containerWidget.topBorderWidth,r=t.margin.bottom-t.containerWidget.bottomBorderWidth;if((this.getScaledValue(t.y,2)+t.height+r*this.documentHelper.zoomFactor<0||this.getScaledValue(t.y,2)-i>this.documentHelper.visibleBounds.height)&&!this.documentHelper.isSpellCheck)return}this.renderSelectionHighlightOnTable(e,t),this.renderTableCellOutline(e.documentHelper,t);for(var n,o,a=0;a<t.childWidgets.length;a++){var s=t.childWidgets[a],l=t.width+t.margin.left+t.margin.right-t.leftBorderWidth;this.isPrinting||s instanceof Q&&l===s.width&&"Word2007"===this.documentHelper.compatibilityMode||this.clipRect(t.x-t.margin.left,t.y,this.getScaledValue(l),this.height),this.renderWidget(e,s),this.pageContext.restore()}t.isRenderEditRangeStart&&(i=(r=this.documentHelper.editorProperties.getFirstParagraph(t).firstChild).paragraph.x,0<r.children.length&&!G.isNullOrUndefined(r.children[0].margin)&&0<r.children[0].margin.left&&(i+=r.children[0].margin.left),n=r.paragraph.y,this.documentHelper.documentEditorSettings.highlightEditableRanges)&&(o=this.documentHelper.editorProperties.editRegionHighlighters,o=G.isNullOrUndefined(o)?[]:o.get(r),o=G.isNullOrUndefined(o)||G.isNullOrUndefined(o[0])?"ffff00":o[0].color,this.renderBookmark(this.getScaledValue(i,1),this.getScaledValue(n,2),this.getScaledValue(r.height-r.margin.bottom),0,o))},r.prototype.isSameLinePositionInTextFrame=function(e,t){var i=e.paragraph,r=t.paragraph;return!(i.containerWidget instanceof P&&r.containerWidget instanceof P)||i.childWidgets.indexOf(e)===r.childWidgets.indexOf(t)&&i.containerWidget.childWidgets.indexOf(i)===r.containerWidget.childWidgets.indexOf(r)},r.prototype.checkHeaderFooterLineWidget=function(e,t){if(e instanceof ad?i=e.paragraph.bodyWidget:e instanceof ee&&(i=e.bodyWidget),!G.isNullOrUndefined(i.parentHeaderFooter))for(var i=i.parentHeaderFooter,r=0;r<t.length;r++){var n=t[r];if(n instanceof ad&&e instanceof ad){var o=n.getHierarchicalIndex(""),a=e.getHierarchicalIndex("");if(n.paragraph.isInHeaderFooter&&i===n.paragraph.bodyWidget&&o.substring(o.indexOf(";"))===a.substring(a.indexOf(";"))&&this.isSameLinePositionInTextFrame(n,e))return n}else if(n instanceof ee&&e instanceof ee){o=n.getHierarchicalIndex(""),a=e.getHierarchicalIndex("");if(n.ownerTable.isInHeaderFooter&&i===n.ownerTable.bodyWidget&&o.substring(o.indexOf(";"))===a.substring(a.indexOf(";")))return n}}},r.prototype.renderContentControlBorder=function(e,t,i){if(this.documentHelper.isEditorModule&&!G.isNullOrUndefined(e.documentHelper.editorProperties.contentControleditRegionHighlighters)){var r=e.documentHelper.editorProperties.contentControls;if(!G.isNullOrUndefined(r))for(var n=0;n<r.length;n++){var o=r[n],a=this.documentHelper.editorProperties.contentControleditRegionHighlighters.get(o);if(!G.isNullOrUndefined(a)){this.documentHelper.editorProperties.enableHeaderAndFooter&&(o.paragraph.containerWidget instanceof ee?this.documentHelper.editorProperties.getContainerWidget(o.paragraph.containerWidget):o.paragraph.containerWidget)==(t.paragraph.containerWidget instanceof ee?this.documentHelper.editorProperties.getContainerWidget(t.paragraph.containerWidget):t.paragraph.containerWidget).parentHeaderFooter&&o.paragraph.index==t.paragraph.index&&o.line.indexInOwner==t.indexInOwner&&(t=o.line);var s=a.keys.indexOf(t);if(-1!==s)for(var l=o.contentControlProperties.color,d=("#00000000"===l&&(l="#939393"),a.get(t)),h=0;h<d.length;h++){var c,g,p,u,f=t.paragraph,m=0,y=f.firstChild===t?K.convertPointToPixel(f.paragraphFormat.firstLineIndent):0,v=K.convertPointToPixel(f.leftIndent),v=(-1!==f.paragraphFormat.listFormat.listId&&(y=0),o.line===t&&(f.x+y!==d[h].left||o.reference&&o.reference.line===t)&&(v=y=0),m=d[h].left-v-y-2,d[h].left+d[h].width+2),y=(a.length-1>s&&(v=this.documentHelper.getParagraphLeftPosition(f)+this.getContainerWidth(f,e)+K.convertPointToPixel(f.paragraphFormat.borders.right.space)),i),W=i+t.height;this.renderSingleBorder(l,m,y,m,W,1,"single"),0===s||t===o.line?(this.renderSingleBorder(l,m,y,v,y,1,"single"),(1===a.length||G.isNullOrUndefined(f.nextWidget)&&t===f.lastChild)&&this.renderSingleBorder(l,m,W,v,W,1,"single")):t!==o.line&&t!==o.reference.line?(G.isNullOrUndefined(f.previousWidget)&&t===f.firstChild?this.renderSingleBorder(l,m,y,v,y,1,"single"):"Block"!==o.contentControlWidgetType&&(c=a.get(a.keys[s-1]),this.renderSingleBorder(l,m,y,c[h].left-2,y,1,"single")),G.isNullOrUndefined(f.nextWidget)&&t===f.lastChild&&(v=this.documentHelper.getParagraphLeftPosition(f)+this.getContainerWidth(f,e)+K.convertPointToPixel(f.paragraphFormat.borders.right.space),this.renderSingleBorder(l,m,W,v,W,1,"single"))):s===a.length-1&&t===o.reference.line&&(c=a.get(a.keys[s-1]),G.isNullOrUndefined(f.previousWidget)&&t===f.firstChild?(v=this.documentHelper.getParagraphLeftPosition(f)+this.getContainerWidth(f,e)+K.convertPointToPixel(f.paragraphFormat.borders.right.space),this.renderSingleBorder(l,m,y,v,y,1,"single")):m>c[h].left&&this.renderSingleBorder(l,c[h].left-2,y,m,y,1,"single"),u=f.lastChild,G.isNullOrUndefined(u)||G.isNullOrUndefined(e.nextPage)&&G.isNullOrUndefined(f.nextWidget)||t!==u||!(u.children[u.children.length-1]instanceof zd)||u.children[u.children.length-1]!==o.reference||"Block"!==o.contentControlWidgetType?(this.renderSingleBorder(l,m,W,v,W,1,"single"),1<a.length&&(u=a.get(a.keys[s-1]),g=this.documentHelper.getParagraphLeftPosition(f)+this.getContainerWidth(f,e)+K.convertPointToPixel(f.paragraphFormat.borders.right.space),p=!1,1===s&&v<u[h].left-2&&(p=!0),this.renderSingleBorder(l,p?u[h].left-2:v,y,g,y,1,"single"),m<u[h].left-2)&&"Block"!==o.contentControlWidgetType&&this.renderSingleBorder(l,p?v:u[h].left-2,y,m,y,1,"single")):(v=this.documentHelper.getParagraphLeftPosition(f)+this.getContainerWidth(f,e)+K.convertPointToPixel(f.paragraphFormat.borders.right.space),this.renderSingleBorder(l,m,W,v,W,1,"single"))),this.renderSingleBorder(l,v,y,v,W,1,"single"),t!==o.reference.line||G.isNullOrUndefined(o)||"ComboBox"!==o.contentControlProperties.type&&"DropDownList"!==o.contentControlProperties.type&&"Date"!==o.contentControlProperties.type||((g=this.documentHelper.element.querySelector("#contenticon"))?(g.style.display="block",m=this.getScaledValue(v,1),y=this.getScaledValue(y,2),g.style.left=m+"px",g.style.top=y+"px",g.style.border="0.5px solid #7F7F7F",g.style.backgroundColor="#D3D3D3",g.style.height=t.height+"px"):((p=document.createElement("div")).id="contenticon",p.style.display="block",p.style.position="sticky",m=this.getScaledValue(v,1),y=this.getScaledValue(y,2),p.style.left=m+"px",p.style.top=y+"px",p.style.border="0.5px solid #7F7F7F",p.style.backgroundColor="#D3D3D3",p.style.height=t.height+"px",p.classList.add("e-de-cmt-mark"),(u=document.createElement("span")).classList.add("e-icons"),u.classList.add("e-chevron-down-fill"),p.appendChild(u),this.documentHelper.pageContainer.appendChild(p)))}}}}},r.prototype.renderEditRegionHighlight=function(e,t,i){if(!this.isPrinting&&!G.isNullOrUndefined(e.documentHelper.editorProperties.editRegionHighlighters)){var r,e=this.documentHelper.editorProperties.editRegionHighlighters.containsKey(t);if(!e&&t.paragraph.isInHeaderFooter&&(r=this.documentHelper.editorProperties.editRegionHighlighters.keys,t=this.checkHeaderFooterLineWidget(t,r),G.isNullOrUndefined(t)||(e=!0)),e)for(var n=this.documentHelper.editorProperties.editRegionHighlighters.get(t),o=0;o<n.length;o++)this.pageContext.fillStyle=""!==n[o].color?n[o].color:"#add8e6",this.pageContext.fillRect(this.getScaledValue(n[o].left,1),this.getScaledValue(i,2),this.getScaledValue(n[o].width),this.getScaledValue(t.height))}},r.prototype.renderSearchHighlight=function(e,t,i){if(this.documentHelper&&!G.isNullOrUndefined(e.documentHelper.editorProperties.searchHighlighters)){var r,n=e.documentHelper.editorProperties.searchHighlighters.containsKey(t);if(this.validateRemoveSearchHighlighters(e),!n&&t.paragraph.isInHeaderFooter&&(r=e.documentHelper.editorProperties.searchHighlighters.keys,t=this.checkHeaderFooterLineWidget(t,r),G.isNullOrUndefined(t)||(n=!0)),n)for(var o=e.documentHelper.editorProperties.searchHighlighters.get(t),a=0;a<o.length;a++)this.pageContext.fillStyle=this.documentHelper.documentEditorSettings.searchHighlightColor,this.pageContext.fillRect(this.getScaledValue(o[a].left,1),this.getScaledValue(i,2),this.getScaledValue(o[a].width),this.getScaledValue(t.height))}},r.prototype.validateRemoveSearchHighlighters=function(e){for(var t=e.documentHelper.editorProperties.searchHighlighters.keys,i=t.length-1;0<=i;i--){var r=t[i];r instanceof ad&&!G.isNullOrUndefined(r.paragraph)&&!G.isNullOrUndefined(r.paragraph.containerWidget)||e.documentHelper.editorProperties.searchHighlighters.keys.splice(i,1)}},r.prototype.renderSelectionHighlight=function(e,t,i){var r,n;!this.isPrinting&&e.documentHelper&&!this.documentHelper.editorProperties.isScrollToSpellCheck&&e.documentHelper.editorProperties&&e.documentHelper.editorProperties.selectedWidgets&&0<e.documentHelper.editorProperties.selectedWidgets.length&&(!(r=e.documentHelper.editorProperties.selectedWidgets.containsKey(t))&&t.paragraph.isInHeaderFooter&&(n=e.documentHelper.editorProperties.selectedWidgets.keys,t=this.checkHeaderFooterLineWidget(t,n),G.isNullOrUndefined(t)||(r=!0)),r)&&!e.documentHelper.isUpdatedWhileLoadAsync&&e.documentHelper.editorProperties.addSelectionHighlight(this.selectionContext,t,i,e)},r.prototype.renderSelectionHighlightOnTable=function(e,t){var i,r;!this.isPrinting&&e.documentHelper&&0<e.documentHelper.editorProperties.selectedWidgets.length&&(!(i=e.documentHelper.editorProperties.selectedWidgets.containsKey(t))&&t.ownerTable.isInHeaderFooter&&(r=e.documentHelper.editorProperties.selectedWidgets.keys,t=this.checkHeaderFooterLineWidget(t,r),G.isNullOrUndefined(t)||(i=!0)),i)&&e.documentHelper.editorProperties.addSelectionHighlightTable(this.selectionContext,t,e)},r.prototype.renderLine=function(e,t,i,r){if(!G.isNullOrUndefined(e)&&!G.isNullOrUndefined(e.paragraph)){this.renderSelectionHighlight(t,e,r);var n=e.paragraph.paragraphFormat,o=i;if(e.isFirstLine()&&!n.bidi&&(i+=K.convertPointToPixel(n.firstLineIndent)),this.documentHelper&&this.documentHelper&&!G.isNullOrUndefined(this.documentHelper.editorProperties.formFieldHighlighters)&&this.documentHelper.editorProperties.formFieldHighlighters.containsKey(e)&&this.documentHelper.documentEditorSettings&&this.documentHelper.documentEditorSettings.formFieldSettings.applyShading)for(var a=t.documentHelper.editorProperties.formFieldHighlighters.get(e),s=0;s<a.length;s++){this.pageContext.fillStyle=this.documentHelper.documentEditorSettings.formFieldSettings.shadingColor;var l,H,d=e.height,R=!1;e.isLastLine()&&(d-=K.convertPointToPixel(this.documentHelper.layout.getAfterSpacing(e.paragraph)),1<e.paragraph.paragraphFormat.lineSpacing)&&(l=this.getFormfieldInLine(e),G.isNullOrUndefined(l)||(H=(l=this.documentHelper.textHelper.getHeight(l.characterFormat)).Height,"Multiple"===e.paragraph.paragraphFormat.lineSpacingType?d-=K.convertPointToPixel(this.documentHelper.layout.getLineSpacing(e.paragraph,H,!0)):(r+=K.convertPointToPixel(e.paragraph.paragraphFormat.beforeSpacing),d=l.Height,R=!0))),this.pageContext.fillRect(this.getScaledValue(a[s].left,1),this.getScaledValue(r,2),this.getScaledValue(a[s].width),this.getScaledValue(d)),R&&(R=!1,r-=K.convertPointToPixel(e.paragraph.paragraphFormat.beforeSpacing))}this.renderSearchHighlight(t,e,r),this.renderEditRegionHighlight(t,e,r);var q=[],h=e.renderedElements,E=this.getUnderlineYPosition(e),c=[];!G.isNullOrUndefined(e.paragraph.associatedCell)&&e.paragraph.associatedCell.isRenderBookmarkStart&&e.paragraph.associatedCell.firstChild.firstChild==e&&c.push({x:i,y:r,height:e.height-e.margin.bottom,type:0});for(s=0;s<h.length;s++){var g,p,u,f,m,M,V,y=h[s];if(!(y instanceof re&&"Inline"!==y.textWrappingStyle)){if((y instanceof ac||y instanceof Ch)&&(f=0,this.viewer instanceof Tl&&(f=this.viewer.pageGap),m="display:block;position:absolute;",f=this.getScaledValue(r+(t.boundingRectangle.y-f*(t.index+1)))+f*(t.index+1)+"px;",y instanceof Ch&&(this.documentHelper.editorProperties.currentUser===y.user||"Everyone"===y.group&&""===y.user)?(this.documentHelper.documentEditorSettings.highlightEditableRanges&&-1==y.columnFirst&&(W=y.line.height-y.line.margin.bottom,b=i,!G.isNullOrUndefined(y.margin)&&0<y.margin.left&&(b+=y.margin.left),x=r,p=this.documentHelper.editorProperties.editRegionHighlighters,a=G.isNullOrUndefined(p)?[]:p.get(e),I=G.isNullOrUndefined(a)||G.isNullOrUndefined(a[0])?"ffff00":a[0].color,this.renderBookmark(this.getScaledValue(b,1),this.getScaledValue(x,2),this.getScaledValue(e.height-e.margin.bottom),0,I)),this.documentHelper.enableLockAndEdit?((N=new G.L10n("documenteditor",this.documentHelper.defaultLocale)).setLocale(this.documentHelper.locale),this.renderLockMark(y,this.documentHelper.editorProperties.currentUser,N),g=this.documentHelper.documentEditorSettings.collaborativeEditingSettings,m+="color:"+(I=y.user===this.documentHelper.editorProperties.currentUser?g.editableRegionColor:g.lockedRegionColor)+";",g=K.convertPointToPixel(t.bodyWidgets[0].sectionFormat.leftMargin),g=t.boundingRectangle.x+this.getScaledValue(g-20)+"px;",this.viewer instanceof Nl&&(g=e.paragraph.x-5+"px;"),G.updateCSSText(y.editRangeMark,m=m+"left:"+g+"top:"+f)):y.editRangeMark&&G.updateCSSText(y.editRangeMark,"display:none")):y instanceof ac&&0===y.commentType&&this.documentHelper&&(this.documentHelper.enableComment?(u=K.convertPointToPixel(t.bodyWidgets[0].sectionFormat.rightMargin),v=K.convertPointToPixel(t.bodyWidgets[0].sectionFormat.pageWidth),g=t.boundingRectangle.x+this.getScaledValue(v-u+u/4)+"px;",m=m+"left:"+(g=this.viewer instanceof Nl?t.boundingRectangle.width-2*this.viewer.padding.right-2*this.viewer.padding.left+"px;":g)+"top:"+f,-1!==q.indexOf(y.commentId)||G.isNullOrUndefined(y.comment)||y.comment.isReply||(q.push(y.commentId),y.renderCommentMark(f,g),G.updateCSSText(y.commentMark,m))):y.commentMark&&G.updateCSSText(y.commentMark,"display:none"))),y instanceof xh&&!G.isNullOrUndefined(y.editRangeStart)&&(this.documentHelper.editorProperties.currentUser===y.editRangeStart.user||"Everyone"===y.editRangeStart.group&&""===y.editRangeStart.user)&&-1==y.editRangeStart.columnFirst&&this.documentHelper.documentEditorSettings.highlightEditableRanges&&(W=y.line.height-y.line.margin.bottom,b=i,x=r,p=this.documentHelper.editorProperties.editRegionHighlighters,a=G.isNullOrUndefined(p)?[]:p.get(e),I=G.isNullOrUndefined(a)||G.isNullOrUndefined(a[0])?"ffff00":a[0].color,this.renderBookmark(this.getScaledValue(b,1),this.getScaledValue(x,2),this.getScaledValue(e.height-e.margin.bottom),1,I)),y instanceof Md&&this.documentHelper.documentEditorSettings.showBookmarks&&!K.startsWith(y.name,"_")){G.isNullOrUndefined(y.line.margin)&&(y.line.margin=new Hl(0,0,0,0));var v,W=y.line.height-(y.line.margin.bottom+y.line.margin.top),b=i,x=(!G.isNullOrUndefined(y.margin)&&0<y.margin.left&&(b+=y.margin.left),r+y.line.margin.top);if(1==y.bookmarkType){if(this.isBookmarkEndAtStart(y)&&G.isNullOrUndefined(y.properties)){for(var w=y.paragraph,F=void 0,C=!1;!C&&!G.isNullOrUndefined(w);){for(var D=0<=w.childWidgets.indexOf(y.line)?w.childWidgets.indexOf(y.line):w.childWidgets.length-1;0<=D;D--){for(var P=w.childWidgets[D],T=0<=P.children.indexOf(y)?P.children.indexOf(y):P.children.length-1;0<=T;T--){if(this.isRenderable(P.children[T])){F=P.children[T],C=!0;break}if(P.children[T]instanceof Md&&0===P.children[T].bookmarkType&&P.children[T].name===y.name){C=!0;break}}if(C)break}C||(w=this.documentHelper.editorProperties.getPreviousParagraphBlock(w))}G.isNullOrUndefined(F)||(w.containerWidget instanceof ee?b+=w.x+this.documentHelper.editorProperties.getWidth(F.line,!1)+this.documentHelper.textHelper.getParagraphMarkWidth(y.line.paragraph.characterFormat):G.isNullOrUndefined(w.paragraphFormat.listFormat.list)?b+=this.documentHelper.editorProperties.getWidth(F.line,!1)+this.documentHelper.textHelper.getParagraphMarkWidth(y.line.paragraph.characterFormat):b=w.x+this.documentHelper.editorProperties.getWidth(F.line,!1)+this.documentHelper.textHelper.getParagraphMarkWidth(y.line.paragraph.characterFormat),x=this.documentHelper.editorProperties.getTop(F.line)+F.line.margin.top)}G.isNullOrUndefined(y.properties)||(y.properties.isAfterParagraphMark&&(b+=this.documentHelper.textHelper.getParagraphMarkWidth(y.line.paragraph.characterFormat)),y.properties.isAfterCellMark&&(b+=this.documentHelper.textHelper.getWidth(String.fromCharCode(164),e.paragraph.characterFormat)))}1==y.bookmarkType?G.isNullOrUndefined(y.reference)||(G.isNullOrUndefined(y.reference.properties)?this.documentHelper.editorProperties.isRenderBookmarkAtEnd(y)||c.push({x:b,y:x,height:W,type:y.bookmarkType}):(v=y.paragraph.associatedCell,G.isNullOrUndefined(v)&&c.push({x:b,y:x,height:W,type:y.bookmarkType}))):G.isNullOrUndefined(y.properties)&&c.push({x:b,y:x,height:W,type:y.bookmarkType})}y instanceof te||this.isFieldCode||0===y.width&&0===y.height?(u=y.width,this.isFieldCode&&(y instanceof ae||(y.width=0),u=0),i+=u+y.margin.left,this.toSkipFieldCode(y)):!this.isPrinting&&(this.getScaledValue(r+y.margin.top,2)+y.height*this.documentHelper.zoomFactor<0||this.getScaledValue(r+y.margin.top,2)>this.documentHelper.visibleBounds.height)&&(i+=y.width+y.margin.left,y instanceof ie&&(this.documentHelper.isSpellCheck&&(y.canTrigger=!0),y.isVisible=!1,(y.isSpellChecked||y.isSpellCheckTriggered)&&!y.line.paragraph.isChangeDetected||(y.isChangeDetected=!0)),!this.isExporting)||(y instanceof se?(i+=y.padding.left,this.renderListTextElementBox(y,i,r,E)):y instanceof ae?(i+=y.padding.left,this.renderImageElementBox(y,i,r,E)):y instanceof ne?(f=y.margin.left,m=y.margin.top,M=this.getScaledValue(i+f,1),V=this.getScaledValue(r+m,2),this.renderShapeElementBox(y,M,V,t)):y instanceof oe?this.renderGroupShapeElementBox(y,t):(y.isVisible=!0,i+=y.padding.left,this.renderTextElementBox(y,i,r,E)),i+=y.width+y.margin.left,e.paragraph.bidi?o+=y.margin.left:o=i)}}if(this.renderContentControlBorder(t,e,r),this.documentHelper.documentEditorSettings.showBookmarks&&0<c.length)for(s=0;s<c.length;s++){var z=c[s];this.renderBookmark(this.getScaledValue(z.x,1),this.getScaledValue(z.y,2),this.getScaledValue(z.height)-2,z.type)}var O,S,N,I,k,A,L,U,B=e.paragraph.paragraphFormat,_=e.paragraph.isInHeaderFooter&&e.paragraph.isEmpty()&&G.isNullOrUndefined(e.paragraph.nextWidget)&&G.isNullOrUndefined(e.paragraph.previousWidget),_=this.documentHelper.editorProperties.enableHeaderAndFooter||!_||_&&!G.isNullOrUndefined(B.uniqueParagraphFormat);this.documentHelper.documentEditorSettings.showHiddenMarks&&!this.isPrinting&&(B="",O=e.paragraph.characterFormat,S=0,k=this.retriveCharacterformat(O),(N=new G.L10n("documenteditor",this.documentHelper.defaultLocale)).setLocale(this.documentHelper.locale),this.pageContext.fillStyle=K.getColor(O.fontColor),!e.paragraph.bodyWidget||e.paragraph.bodyWidget instanceof X||this.documentHelper.pages.indexOf(e.paragraph.bodyWidget.page),0!=h.length||e.isEndsWithLineBreak||G.isNullOrUndefined(e.paragraph)?S=1===e.paragraph.childWidgets.length&&0==e.maxBaseLine?r+this.documentHelper.textHelper.getHeight(O).BaselineOffset+(G.isNullOrUndefined(e.margin)?0:e.margin.top):e.margin&&0<e.margin.top?r+e.maxBaseLine+e.margin.top:r+e.maxBaseLine:(S=e.paragraph.y+this.documentHelper.textHelper.getHeight(O).BaselineOffset+(G.isNullOrUndefined(e.margin)?0:e.margin.top),!e.isEndsWithLineBreak&&0<e.indexInOwner&&0==h.length&&(S=r+e.previousLine.maxBaseLine)),0<O.revisionLength&&(I=0<(A=this.checkRevisionType(O)).length?this.getRevisionColor(A):O.fontColor,this.pageContext.fillStyle=K.getColor(I)),e.isEndsWithColumnBreak?(k=this.retriveCharacterformat(O,.7),B="....."+N.getConstant("Column Break")+"....."):e.isEndsWithPageBreak?(k=this.retriveCharacterformat(O,.7),B=this.getPageBreakText(e.paragraph,N),L=this.documentHelper.textHelper.getWidth(B,O,j.FontScriptType.English),this.viewer instanceof Tl?e.paragraph.bidi?o<L+this.viewer.clientActiveArea.x&&(B="....."):o>this.viewer.clientActiveArea.width&&(B="....."):e.paragraph.bidi?o-L<this.viewer.clientActiveArea.x&&(B="....."):o+L>this.viewer.clientActiveArea.width+this.viewer.clientActiveArea.x&&(B=".....")):e.isEndsWithLineBreak?B=e.paragraph.bidi?String.fromCharCode(8627):String.fromCharCode(8629):e.paragraph.isInsideTable&&G.isNullOrUndefined(e.nextLine)&&G.isNullOrUndefined(e.paragraph.nextWidget)?0!=e.height&&(B=String.fromCharCode(164)):G.isNullOrUndefined(e.nextLine)&&_&&(B=String.fromCharCode(182)),e.paragraph.containerWidget instanceof Y&&!G.isNullOrUndefined(e.paragraph.nextRenderedWidget)&&e.paragraph.containerWidget.sectionIndex!==e.paragraph.nextRenderedWidget.containerWidget.sectionIndex&&e.isLastLine()&&(B="NoBreak"===e.paragraph.nextRenderedWidget.containerWidget.sectionFormat.breakCode&&e.paragraph.containerWidget.index!==e.paragraph.nextRenderedWidget.containerWidget.index?":::::"+N.getConstant("Section Break Continuous")+":::::":":::::"+N.getConstant("Section Break Next Page")+":::::",k=this.retriveCharacterformat(O,.7),(A=e.paragraph.previousRenderedWidget)instanceof Z&&A.isEndsWithPageBreak&&e.paragraph.isSectionBreak?(U=this.getPageBreakText(A,N),o=(o+=.7*this.documentHelper.textHelper.getWidth(U,A.characterFormat,j.FontScriptType.English))-this.documentHelper.textHelper.getParagraphMarkSize(A.characterFormat).Width):e.isEndsWithPageBreak&&(B=e.paragraph.bidi?B+String.fromCharCode(182)+"....."+N.getConstant("Page Break")+".....":"....."+N.getConstant("Page Break")+"....."+String.fromCharCode(182)+B),L=this.documentHelper.textHelper.getWidth(B,O,j.FontScriptType.English),this.viewer instanceof Tl?e.paragraph.bidi?o<L+this.viewer.clientActiveArea.x&&(B=":::::",e.isEndsWithPageBreak)&&(B=":::::....."):o+L-this.viewer.clientActiveArea.x>this.viewer.clientActiveArea.width&&(B=":::::",e.isEndsWithPageBreak)&&(B=".....:::::"):e.paragraph.bidi?o-L<this.viewer.clientActiveArea.x&&(B=":::::",e.isEndsWithPageBreak)&&(B=":::::....."):o+L-this.documentHelper.pages[0].boundingRectangle.x>this.viewer.clientActiveArea.width&&(B=":::::",e.isEndsWithPageBreak)&&(B=".....:::::")),0<B.length)&&(!e.paragraph.characterFormat.hidden||0!==e.paragraph.height)&&(e.paragraph.bidi&&!e.paragraph.isEmpty()&&(o-=this.documentHelper.textHelper.getWidth(B,O,j.FontScriptType.English)),(0<n.firstLineIndent||n.firstLineIndent<0&&e.paragraph.isEmpty()&&_)&&(o=i),this.pageContext.font=k,this.pageContext.fontKerning="auto",!O.isKernFont&&/(?:AV|VA|AW|WA|To|Ta|Te|Ty|Yo)/.test(B)&&(this.pageContext.fontKerning="none"),U=O.scaling<100?1:O.scaling/100,this.pageContext.letterSpacing=O.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(U,1),this.pageContext.fillText(B,this.getScaledValue(o,1)/U,this.getScaledValue(S,2)),this.pageContext.restore())}},r.prototype.getPageBreakText=function(e,t){return e.bidi?String.fromCharCode(182)+"....."+t.getConstant("Page Break")+".....":"....."+t.getConstant("Page Break")+"....."+String.fromCharCode(182)},r.prototype.isBookmarkEndAtStart=function(e){for(var t=e.paragraph,i=0,r=t.childWidgets[i],n=!0;-1==r.children.indexOf(e)&&(r=t.childWidgets[++i],i!=t.childWidgets.length););if(e.line!=r)return!1;for(var o=0<=r.children.indexOf(e)?r.children.indexOf(e):-1;0<=o;o--){var a=r.children[o];this.isRenderable(a)&&(n=!1)}return!!n},r.prototype.isRenderable=function(e){return!(e instanceof Md||e instanceof Ch||e instanceof xh)},r.prototype.combineHexColors=function(e,t){var e=e.replace("#",""),t=t.replace("#",""),i=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),e=parseInt(e.substring(4,6),16),n=parseInt(t.substring(0,2),16),o=parseInt(t.substring(2,4),16),t=parseInt(t.substring(4,6),16),i=Math.round(.35*i+.65*n),n=Math.round(.35*r+.65*o),r=Math.round(.35*e+.65*t);return"#"+i.toString(16)+n.toString(16)+r.toString(16)},r.prototype.renderBookmark=function(e,t,i,r,n){this.isPrinting||(this.pageContext.beginPath(),this.pageContext.lineWidth=1.5,0==r&&(this.pageContext.moveTo(e+3,t),this.pageContext.lineTo(e,t),this.pageContext.lineTo(e,t+i),this.pageContext.lineTo(e+3,t+i)),1==r&&(this.pageContext.moveTo(e-3,t),this.pageContext.lineTo(e,t),this.pageContext.lineTo(e,t+i),this.pageContext.lineTo(e-3,t+i)),this.pageContext.strokeStyle="#7F7F7F",this.pageContext.stroke(),this.pageContext.closePath(),G.isNullOrUndefined(n))||(r=this.combineHexColors(n,"#7F7F7F"),this.pageContext.fillStyle=r,this.pageContext.fillRect(e,t,1.5,i))},r.prototype.retriveCharacterformat=function(e,t){G.isNullOrUndefined(t)&&(t=1);this.pageContext.textBaseline="alphabetic";var i=e.bold?"bold":"",r=e.italic?"italic":"",n=0===e.fontSize?.5:e.fontSize/("Normal"===e.baselineAlignment?1:1.5);return i+" "+r+" "+(this.isPrinting?n*t:n*this.documentHelper.zoomFactor*t)+'pt "'+e.fontFamily+'"'},r.prototype.toSkipFieldCode=function(e){e instanceof te&&(0===e.fieldType?this.isFieldCode||G.isNullOrUndefined(e.fieldEnd)&&!e.hasFieldEnd||(this.fieldStacks.push(e),this.isFieldCode=!0):2!==e.fieldType&&1!==e.fieldType||0<this.fieldStacks.length&&e.fieldBegin===this.fieldStacks[this.fieldStacks.length-1]&&(this.fieldStacks.pop(),this.isFieldCode=!1))},r.prototype.getUnderlineYPosition=function(e){for(var t=0,i=0,r=0;r<e.children.length;r++){var n=e.children[r];n instanceof te||0===n.width&&0===n.height||n instanceof ne||n instanceof ae&&"Inline"!==n.textWrappingStyle||t<n.height+n.margin.top&&(t=n.margin.top+n.height,i=n instanceof ae?.9:n.height/20)}return K.containsUnderlinedImage(e)?t+2*i:t-2*i},r.prototype.renderListTextElementBox=function(e,t,i,r){var n=e.alignmentShift;0<n?(e.width+=n,this.renderListTextElement(e,t-n,i,r),e.width-=n):this.renderListTextElement(e,t,i,r)},r.prototype.renderListTextElement=function(e,t,i,r){var n=e.margin.top,o=e.margin.left,a=e.listLevel.characterFormat,s=e.line.paragraph.characterFormat,l=(a.hasValue("fontColor")?a:s).fontColor,d=1<s.revisionLength,h=(0<s.revisionLength?(h=this.checkRevisionType(s),l=this.getRevisionColor(h)):0===s.revisionLength&&(-1<e.text.indexOf("")||e.previousElement instanceof se&&-1<e.previousElement.text.indexOf("")&&"\t"===e.text)&&(l="#0f3d57"),this.pageContext.textBaseline="alphabetic",""),c="",g=(a.hasValue("fontFamily")?a:s).fontFamily,p=(!this.documentHelper.isIosDevice&&!this.documentHelper.isLinuxOS||e.text!==String.fromCharCode(9679)&&e.text!==String.fromCharCode(9675)||(g=""),(a.hasValue("fontSize")?a:s).fontSize),u=(a.hasValue("baselineAlignment")?a:s).baselineAlignment,h=a.hasValue("bold")?a.bold?"bold":"":s.bold?"bold":"",c=a.hasValue("italic")?a.italic?"italic":"":s.italic?"italic":"",p=(G.isNullOrUndefined(e.paragraph.paragraphFormat.listFormat.listLevel)||"Bullet"!==e.paragraph.paragraphFormat.listFormat.listLevel.listLevelPattern||a.bold||(h=""),G.isNullOrUndefined(e.paragraph.paragraphFormat.listFormat.listLevel)||"Bullet"!==e.paragraph.paragraphFormat.listFormat.listLevel.listLevelPattern||a.italic||(c=""),p=0===p?.5:p/("Normal"===u?1:1.5),this.isPrinting?p:p*this.documentHelper.zoomFactor),f=(a.hasValue("strikethrough")?a:s).strikethrough,m=(a.hasValue("highlightColor")?a:s).highlightColor,m=("NoColor"!==m&&("#"!==m.substring(0,1)?this.pageContext.fillStyle=K.getHighlightColorCode(m):this.pageContext.fillStyle=K.getColor(m),this.pageContext.fillRect(Math.floor(this.getScaledValue(t+o,1)),Math.floor(this.getScaledValue(i+n,2)-1),Math.ceil(this.getScaledValue(e.width)+1),Math.ceil(this.getScaledValue(e.height)+1))),this.pageContext.font=h+" "+c+" "+p+'pt "'+g+'"',this.pageContext.fontKerning="auto",!a.isKernFont&&/(?:AV|VA|AW|WA|To|Ta|Te|Ty|Yo)/.test(e.text)&&(this.pageContext.fontKerning="none"),"Subscript"===u&&(n+=e.height-e.height/1.5),e.baselineOffset),n="Normal"===a.baselineAlignment?n+m:n+m/1.5,h=e.text,y=e.paragraph.paragraphFormat.bidi,v=(y&&(this.pageContext.direction="rtl",t+=e.width),"empty"===l||"#00000000"===l?(c=this.getBackgroundColorHeirachy(e),this.pageContext.fillStyle=this.getDefaultFontColor(c)):this.pageContext.fillStyle=K.getColor(l),a.scaling<100?1:a.scaling/100);if(h&&-1<h.indexOf("")&&!G.isNullOrUndefined(e.dualWidths)){var W=h.split(""),b=e.dualWidths.w1,x=e.dualWidths.w2,w=y?t-e.width+o:t+o;this.pageContext.letterSpacing=a.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(v,1);for(var F=0;F<W.length;F++){var C=W[F],P=0===F?b:x,T=0===F,O=void 0,O=y?w+P:w,C=(this.pageContext.fillText(C,this.getScaledValue(O,1)/v,this.getScaledValue(i+n,2)),w);T?this.renderStrikeThrough(hg({},e,{width:P}),C,i,a.strikethrough,l,u,{type:"Deletion",color:l}):this.renderUnderline(hg({},e,{width:P}),C,i,r,l,a.underline,u,{type:"Insertion",color:l}),w+=P}this.pageContext.restore(),y&&(this.pageContext.direction="ltr",t-=e.width)}else{this.documentHelper.documentEditorSettings.showHiddenMarks&&!this.isPrinting?(e instanceof se&&"\t"===e.text&&this.tabMark(e,a,t,i,o,n),this.pageContext.letterSpacing=a.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(v,1),this.pageContext.fillText(this.replaceSpace(h),this.getScaledValue(t+o,1)/v,this.getScaledValue(i+n,2),this.getScaledValue(e.width))):(this.pageContext.letterSpacing=a.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(v,1),this.pageContext.fillText(h,this.getScaledValue(t+o,1)/v,this.getScaledValue(i+n,2),this.getScaledValue(e.width))),this.pageContext.restore(),y&&(this.pageContext.direction="ltr",t-=e.width);p=this.checkRevisionType(s),g=this.getRevisionType(p,!0);("None"!==a.underline&&!G.isNullOrUndefined(a.underline)||!G.isNullOrUndefined(g)&&!d&&("Insertion"===g.type||"MoveTo"===g.type)||e.previousElement instanceof se&&-1<e.previousElement.text.indexOf("")&&"\t"===e.text)&&this.renderUnderline(e,t,i,r,l,a.underline,u,g),g=this.getRevisionType(p,!1),"None"===f&&(G.isNullOrUndefined(g)||"Deletion"!==g.type&&"MoveFrom"!==g.type)||this.renderStrikeThrough(e,t,i,a.strikethrough,l,u,g)}},r.prototype.getDefaultFontColor=function(e){return K.isVeryDark(e)?"#FFFFFF":"#000000"},r.prototype.isElementAllWordSplit=function(e){if(G.isNullOrUndefined(e)||G.isNullOrUndefined(e.text))return!1;for(var t=0;t<e.text.length;t++)if(!this.documentHelper.textHelper.isWordSplitChar(e.text[t]))return!1;return!0},r.prototype.isSkippableElement=function(e){return!(G.isNullOrUndefined(e)||G.isNullOrUndefined(e.text)||!this.isElementAllWordSplit(e)&&!this.documentHelper.textHelper.containsNumberAlone(e.text))},r.prototype.prevIsRTL=function(e){if(G.isNullOrUndefined(e))return!1;if(this.isSkippableElement(e)){for(var t=e.previousElement instanceof ie?e.previousElement:void 0;t&&this.isSkippableElement(t);)t=t.previousElement instanceof ie?t.previousElement:void 0;return!G.isNullOrUndefined(t)&&this.documentHelper.textHelper.isRTLText(t.text)}return this.documentHelper.textHelper.isRTLText(e.text)},r.prototype.nextIsRTL=function(e){if(G.isNullOrUndefined(e))return!1;if(this.isSkippableElement(e)){for(var t=e.nextElement instanceof ie?e.nextElement:void 0;t&&this.isSkippableElement(t);)t=t.nextElement instanceof ie?t.nextElement:void 0;return!G.isNullOrUndefined(t)&&this.documentHelper.textHelper.isRTLText(t.text)}return this.documentHelper.textHelper.isRTLText(e.text)},r.prototype.checkFormatToCombineText=function(e,t){return e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.bold===t.bold&&e.italic===t.italic&&e.baselineAlignment===t.baselineAlignment&&e.bidi===t.bidi&&e.bdo===t.bdo&&e.allCaps===t.allCaps&&e.complexScript===t.complexScript&&e.fontFamilyAscii===t.fontFamilyAscii&&e.fontFamilyBidi===t.fontFamilyBidi&&e.fontFamilyFarEast===t.fontFamilyFarEast&&e.characterSpacing===t.characterSpacing&&e.scaling===t.scaling&&e.isKernFont===t.isKernFont&&e.kern===t.kern&&e.fontFamilyNonFarEast===t.fontFamilyNonFarEast&&e.hidden===t.hidden},r.prototype.renderTextElementBox=function(e,t,i,r){var n=!1,o=e.line.paragraph.containerWidget,a=(o instanceof ee&&(n="Exactly"===o.ownerRow.rowFormat.heightType,1<o.cellFormat.rowSpan)&&o.ownerTable&&o.ownerRow&&(a=o.ownerTable.childWidgets[o.ownerRow.index+o.cellFormat.rowSpan-1],G.isNullOrUndefined(a)||(n="Exactly"===a.rowFormat.heightType)),e.margin.top),s=e.margin.left,l=(n&&o instanceof ee&&(l=o.width+o.margin.left+o.margin.right-o.leftBorderWidth,this.clipRect(o.x-o.margin.left,o.y,this.getScaledValue(l),this.getScaledValue(o.height))),e.characterFormat),d=!0,h=("NoColor"!=l.highlightColor&&""==e.text.trim()&&(h=e.line.paragraph.firstChild,c=e.line.paragraph.lastChild,!G.isNullOrUndefined(h)&&h instanceof ad&&0<h.children.length&&e===h.children[0]&&(d=!1),!G.isNullOrUndefined(c))&&c instanceof ad&&0<c.children.length&&e===c.children[c.children.length-1]&&(d=!1),!this.isPrinting&&this.documentHelper&&!G.isNullOrUndefined(this.documentHelper.editorProperties.editRegionHighlighters)&&this.documentHelper.editorProperties.editRegionHighlighters.containsKey(e.line)),c=("NoColor"!==l.highlightColor&&d&&!h&&("#"!==l.highlightColor.substring(0,1)?this.pageContext.fillStyle=K.getHighlightColorCode(l.highlightColor):this.pageContext.fillStyle=K.getColor(l.highlightColor),this.pageContext.fillRect(Math.floor(this.getScaledValue(t+s,1)),Math.floor(this.getScaledValue(i+a,2)-1),Math.ceil(this.getScaledValue(e.width)+1),Math.ceil(this.getScaledValue(e.height)+1))),this.checkRevisionType(e)),d=0<c.length?this.getRevisionColor(c):l.fontColor,h=(this.pageContext.textBaseline="alphabetic",l.bidi||this.documentHelper.textHelper.isRTLText(e.text)),g=h||l.complexScript,p=g?l.boldBidi?"bold":"":l.bold?"bold":"",u=g?l.italicBidi?"italic":"":l.italic?"italic":"",g=0===l.fontSize?.5:(g?l.fontSizeBidi:l.fontSize)/("Normal"===l.baselineAlignment?1:1.5),f=(g=this.isPrinting?g:g*this.documentHelper.zoomFactor,this.documentHelper.textHelper.getFontNameToRender(e.scriptType,l)),p=(this.pageContext.font=p+" "+u+" "+g+'pt "'+f+'"',this.pageContext.fontKerning="auto",!l.isKernFont&&/(?:AV|VA|AW|WA|To|Ta|Te|Ty|Yo)/.test(e.text)&&(this.pageContext.fontKerning="none"),"Subscript"===l.baselineAlignment&&(a+=e.height-e.height/1.5),e.baselineOffset),a="Normal"===l.baselineAlignment?a+p:a+p/1.5,g=("empty"===d||"#00000000"===d?(u=this.getBackgroundColorHeirachy(e),this.pageContext.fillStyle=this.getDefaultFontColor(u)):this.pageContext.fillStyle=K.getColor(d),this.getScaledValue(e.width)),f=e.text,u=(e instanceof Rd&&(""!==(p=e).tabText||G.isNullOrUndefined(p.tabLeader)||"None"===p.tabLeader?""!==p.tabText&&(f=p.tabText):(f=this.getTabLeader(e),p.tabText=f)),f=this.documentHelper.textHelper.setText(f,h,l.bdo,!0),e instanceof Ud&&e.isRtlPageNumber&&(f=K.reverseString(f)),e.line),p=u.renderedElements.indexOf(e),p=(0<p&&(u=u.renderedElements[p-1])&&e.scriptType!==j.FontScriptType.Hebrew&&this.checkFormatToCombineText(e.characterFormat,u.characterFormat)&&!K.startsWith(e.text," ")&&!K.endsWith(u.text)&&e.characterFormat.bidi&&u.characterFormat.bidi&&e.characterRange===j.CharacterRangeType.RightToLeft&&u.characterRange===j.CharacterRangeType.RightToLeft&&(f+="‍"),l.allCaps&&(f=f.toUpperCase()),e.characterRange),u=e.previousElement instanceof ie?e.previousElement:void 0,m=e.nextElement instanceof ie?e.nextElement:void 0,u=this.prevIsRTL(u)&&(this.nextIsRTL(m)||G.isNullOrUndefined(m)),m=(((p==j.CharacterRangeType.WordSplit||(p&j.CharacterRangeType.WordSplit)==j.CharacterRangeType.WordSplit&&(p&j.CharacterRangeType.RightToLeft)==j.CharacterRangeType.RightToLeft)&&l.bidi||"StandardContextual"===this.documentHelper.characterFormat.ligature&&u)&&(f=this.documentHelper.textHelper.inverseCharacter(f)),l.scaling<100?1:l.scaling/100);if(p!==j.CharacterRangeType.RightToLeft||K.startsWith(f," ")||(this.pageContext.direction="rtl",t+=e.width),this.documentHelper.documentEditorSettings.showHiddenMarks&&!this.isPrinting)(e instanceof Rd||e instanceof ie)&&"\t"===e.text&&this.tabMark(e,l,t,i,s,a),"\r"===f&&(f=String.fromCharCode(182)),this.pageContext.letterSpacing=l.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(m,1),this.pageContext.fillText(this.replaceSpace(f),this.getScaledValue(t+s,1)/m,this.getScaledValue(i+a,2),g);else if(this.pageContext.letterSpacing=l.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),this.pageContext.scale(m,1),e.paragraph.containerWidget.containerShape&&"Center"==e.paragraph.containerWidget.textVerticalAlignment){var y=e.paragraph.containerWidget.containerShape.height,v=0;if(e.paragraph.containerWidget.childWidgets&&0<e.paragraph.containerWidget.childWidgets.length)for(var W=0;W<e.paragraph.containerWidget.childWidgets.length;W++)v+=e.paragraph.containerWidget.childWidgets[W].height;var u=this.getScaledValue(y)-(e.paragraph.containerWidget.marginTop+e.paragraph.containerWidget.marginBottom),b=this.getScaledValue(i+a,2)+(u-v)/2;v<this.getScaledValue(y)?this.pageContext.fillText(f,this.getScaledValue(t+s,1)/m,b,g):this.pageContext.fillText(f,this.getScaledValue(t+s,1)/m,this.getScaledValue(i+a,2),g)}else if(e.paragraph.containerWidget.containerShape&&"Bottom"==e.paragraph.containerWidget.textVerticalAlignment){y=e.paragraph.containerWidget.containerShape.height,b=this.getScaledValue(i+a,2)+this.getScaledValue(y)/2,v=0;if(e.paragraph.containerWidget.childWidgets&&0<e.paragraph.containerWidget.childWidgets.length)for(W=0;W<e.paragraph.containerWidget.childWidgets.length;W++)v+=e.paragraph.containerWidget.childWidgets[W].height;v+this.getScaledValue(y)/2<this.getScaledValue(y)?this.pageContext.fillText(f,this.getScaledValue(t+s,1)/m,b,g):this.pageContext.fillText(f,this.getScaledValue(t+s,1)/m,this.getScaledValue(i+a,2),g)}else this.pageContext.fillText(f,this.getScaledValue(t+s,1)/m,this.getScaledValue(i+a,2),g);this.pageContext.restore(),p!==j.CharacterRangeType.RightToLeft||K.startsWith(f," ")||(this.pageContext.direction="ltr",t-=e.width),this.documentHelper.isSpellCheck&&this.documentHelper.hooks.onTriggerSpellChecker&&this.documentHelper.hooks.onTriggerSpellChecker(e,o,h,t,i,r,l.baselineAlignment);u=this.getRevisionType(c,!0);("None"===l.underline||G.isNullOrUndefined(l.underline))&&(G.isNullOrUndefined(u)||"Insertion"!==u.type&&"MoveTo"!==u.type)||this.renderUnderline(e,t,i,r,d,l.underline,l.baselineAlignment,u),u=this.getRevisionType(c,!1),("None"===l.strikethrough||G.isNullOrUndefined(l.strikethrough))&&(G.isNullOrUndefined(u)||"Deletion"!==u.type&&"MoveFrom"!==u.type)||this.renderStrikeThrough(e,t,i,l.strikethrough,d,l.baselineAlignment,u),n&&this.pageContext.restore()},r.prototype.tabMark=function(e,t,i,r,n,o){var a=e.paragraph.bidi?String.fromCharCode(8592):String.fromCharCode(8594),s=this.documentHelper.textHelper.getWidth(a,t,e.scriptType),l=e.width/2,d=s/2,t=(this.pageContext.font=this.retriveCharacterformat(e.characterFormat),this.pageContext.fontKerning="auto",!t.isKernFont&&/(?:AV|VA|AW|WA|To|Ta|Te|Ty|Yo)/.test(e.text)&&(this.pageContext.fontKerning="none"),this.pageContext.letterSpacing=t.characterSpacing*this.documentHelper.zoomFactor+"pt",this.pageContext.save(),t.scaling<100?1:t.scaling/100);this.pageContext.scale(t,1),s<l?e.paragraph.bidi?this.pageContext.fillText(a,this.getScaledValue(i+n+d-l,1)/t,this.getScaledValue(r+o,2)):this.pageContext.fillText(a,this.getScaledValue(i+n+l-d,1)/t,this.getScaledValue(r+o,2)):this.pageContext.fillText(a,this.getScaledValue(i+n,1)/t,this.getScaledValue(r+o,2),this.getScaledValue(e.width)),this.pageContext.restore()},r.prototype.replaceSpace=function(e){return e=(e=e.replace(new RegExp(String.fromCharCode(32),"g"),String.fromCharCode(183))).replace(new RegExp(String.fromCharCode(160),"g"),String.fromCharCode(176))},r.prototype.inverseCharacter=function(e){switch(e){case String.fromCharCode(40):return String.fromCharCode(41);case String.fromCharCode(41):return String.fromCharCode(40);case String.fromCharCode(60):return String.fromCharCode(62);case String.fromCharCode(62):return String.fromCharCode(60);case String.fromCharCode(123):return String.fromCharCode(125);case String.fromCharCode(125):return String.fromCharCode(123);case String.fromCharCode(91):return String.fromCharCode(93);case String.fromCharCode(93):return String.fromCharCode(91);default:return e}},r.prototype.getBackgroundColorHeirachy=function(e){if(e.paragraph.isInsideTable){var t=e.paragraph.containerWidget,i=t.cellFormat.shading.backgroundColor,r=t.cellFormat.shading.foregroundColor;if(t.cellFormat.shading.hasValue("textureStyle")&&"empty"===r&&("empty"===i||"#00000000"===i))return this.drawTextureStyle(t.cellFormat.shading.textureStyle,K.getColor(r),K.getColor(i),!0,!0);if("empty"!==i&&"#00000000"!==i)return i;if("empty"!==(i=t.ownerTable.tableFormat.shading.backgroundColor)&&"#00000000"!==i)return i}else if(e.paragraph.containerWidget instanceof P&&!G.isNullOrUndefined(e.paragraph.containerWidget.containerShape)&&!G.isNullOrUndefined(e.paragraph.containerWidget.containerShape.fillFormat)&&"#000000FF"===e.paragraph.containerWidget.containerShape.fillFormat.color)return e.paragraph.containerWidget.containerShape.fillFormat.color;return this.documentHelper.backgroundColor},r.prototype.drawWavy=function(e,t,i,r,n,o,a,s,l){this.pageContext.save(),this.pageContext.fillStyle=G.isNullOrUndefined(s)||"empty"===s?this.documentHelper.backgroundColor:s,this.pageContext.fillRect(e.x,e.y-r,t.x-e.x,3*r),this.pageContext.restore(),this.pageContext.lineWidth=1,this.pageContext.lineCap="round",this.pageContext.strokeStyle=o,this.pageContext.beginPath();for(var d,h,s=e.x,o=e.y,c=t.x,t=t.y,g=0,p=Math.atan2(t-o,c-s),u=Math.sqrt((s-c)*(s-c)+(o-t)*(o-t)),f=+r,m=Math.PI*i;g<=u;g+=n)h=Math.sin(g/u*m)*f,d=e.x+Math.cos(p)*g+Math.cos(p-Math.PI/2)*h,h=e.y+Math.sin(p)*g+Math.sin(p-Math.PI/2)*h,0<g?this.pageContext.lineTo(d,h):this.pageContext.moveTo(d,h);this.pageContext.stroke()},r.prototype.getTabLeader=function(e){var t=this.getTabLeaderString(e.tabLeader),i=t,r=this.documentHelper.textHelper.getWidth(i,e.characterFormat,e.scriptType),n=Math.floor(e.width/r);0==r&&(n=0);for(var o=0;o<=n;o++)i+=t;return i.slice(0,-1)},r.prototype.getTabLeaderString=function(e){var t="";switch(e){case"Dot":t=".";break;case"Hyphen":t="-";break;case"Underscore":case"Single":t="_"}return t},r.prototype.clipRect=function(e,t,i,r){this.pageContext.beginPath(),this.pageContext.save(),this.pageContext.rect(this.getScaledValue(e,1),this.getScaledValue(t,2),i,r),this.pageContext.clip()},r.prototype.getTrimmedWidth=function(e){var t=e.width;return t=e instanceof ie&&!(e instanceof Rd)&&G.isNullOrUndefined(e.nextNode)?this.documentHelper.textHelper.getWidth(K.trimEnd(e.text),e.characterFormat,e.scriptType):t},r.prototype.renderUnderline=function(e,t,i,r,n,o,a,s){var l=e.height/("Normal"===a?1:1.5),d=e.margin.top,h=l/20,c=0,g=l/20,p=("Subscript"===a||e instanceof se?(c=l-2*h+i,c+=0<(d+=e.height-l)?d:0):c=r+i,0);for(G.isNullOrUndefined(s)||(o="MoveTo"===s.type?"Double":"Single"),e instanceof ae||"Double"!==o||(c-=g),e instanceof ae&&(g=h=.9);p<("Double"===o?2:1);){p++;var u=this.getTrimmedWidth(e);this.pageContext.fillRect(this.getScaledValue(t+e.margin.left,1),this.getScaledValue(c,2),this.getScaledValue(u),this.getScaledValue(h)),c+=2*g}},r.prototype.renderStrikeThrough=function(e,t,i,r,n,o,a){var s=e.height/("Normal"===o?1:1.5),l=e.margin.top,d=("Subscript"===o&&(l+=e.height-s),i+=0<l?l:0,s/20),h=s/2+.5*d,c=0;for(G.isNullOrUndefined(a)||(r="Deletion"===a.type?"SingleStrike":"DoubleStrike"),e instanceof ae&&(d=.9),"DoubleStrike"===r&&(h-=d);c<("DoubleStrike"===r?2:1);){c++;var g=this.getTrimmedWidth(e);this.pageContext.fillRect(this.getScaledValue(t+e.margin.left,1),this.getScaledValue(h+i,2),this.getScaledValue(g),this.getScaledValue(d)),h+=2*d}},r.prototype.renderImageElementBox=function(i,t,r,e){var n=this,o=i.margin.top,a=i.margin.left,s=this.checkRevisionType(i),l=0<s.length?this.getRevisionColor(s):"black",d=!(this.pageContext.textBaseline="top"),h=i.line.paragraph.containerWidget,c=!1,g=this.getScaledValue(t+a,1),p=this.getScaledValue(r+o,2),u=this.getScaledValue(i.width),f=this.getScaledValue(i.height);if(h instanceof ee&&(c="Exactly"===h.ownerRow.rowFormat.heightType),"Inline"===i.textWrappingStyle&&((o<0||i.line.paragraph.width<i.width)&&!c?"Exactly"===i.line.paragraph.paragraphFormat.lineSpacingType&&0<i.line.paragraph.paragraphFormat.lineSpacing?h instanceof ee||(d=!0,this.clipRect(i.line.paragraph.x,i.line.paragraph.y,this.getScaledValue(i.line.paragraph.width),this.getScaledValue(i.line.paragraph.height))):h instanceof ee&&(h.childWidgets[W=0]instanceof Z&&(W=h.childWidgets[0].paragraphFormat.leftIndent),v=h.width+h.margin.left-h.leftBorderWidth-W,d=!0,this.clipRect(t+a,r+o,this.getScaledValue(v),this.getScaledValue(h.height))):c&&(h.childWidgets[W=0]instanceof Z&&(W=h.childWidgets[0].paragraphFormat.leftIndent),v=h.width+h.margin.left-h.leftBorderWidth-W,d=!0,this.clipRect(t+a,h.y,this.getScaledValue(v),this.getScaledValue(h.height)))),i.isMetaFile&&!G.isNullOrUndefined(i.metaFileImageString))i.isCrop&&i.cropWidth<u&&i.cropHeight<f?this.pageContext.drawImage(i.element,i.cropX,i.cropY,i.cropWidth,i.cropHeight,g,p,u,f):this.pageContext.drawImage(i.element,g,p,u,f);else{var m="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAgVBMVEX///8AAADgAADY2Njl5eVcXFxjY2NZWVl/f3+wsLCmpqb4+PiioqKpqam7u7vV1dX2uLj2wsLhFRXzpKT3vb30sbHhCwv74+P40dH+9vbkIyO2trbBwcHLy8tsbGycnJz529v4zMzrbGzlLS3qZmblNzfrdXXoRkbvi4vvgYHlHh7CZsBOAAADpUlEQVR4nO3da1faQBSF4ekAUQlUEFs14AXxVv7/D6yaQiZx5mSEYXF2ut+PNKzyyK5diYDmR9czx34AB49C/CjE759w3jvvWr15Tdgz3atXE54f++EcIArxoxA/CvGjED8K8aMQPwrxoxA/CvGLEeZ9jPJdhfk4GyCUjb3ECGE/Q6m/q3DwfudjP0ERZYN9hKdn2hvd3+0jHJz5/kBVuTk96bbQUEjhYR9ckiikUH8UUqg/CinUH4UU6o9CCvVHIYX6o5BC/VFIof4opFB/FFKoPwop1B+FFOqPQgrjyxfjVC38Lxk9tnAxGqZqdKtSOE4GHA5/fuNJpDCtcNHbv4VqYYqPLjgfUViPQgrjozA2CptRSGF8/59w+Wrt+rr1btNna1cPzg0wwuXavncxabnX7PfHYYXzlYARvlobQZyUR9mXm+1NMEK7SSLONgcVV9vb8IQXv4J3KSeKKlxXxNCzONkeYp8AV3p9UT1+P3FWHVAsq5thhGZSEb1DrSZq7dS5HUdoLiuBZ6jORG3tCwAkNJfCUJ2Jrqe1P0ESCkMNTdSACYNDDU7UoAkDQw1P1MAJvUMVJmrwhJ6hShM1gMIvQxUnahCFjaHKEzWQQneoxR95ogZTWBuqPFEDKnSHKk/UoArdoYoTNbDC5lBDEzW4QjMpYiZqgIXG/S76JhwHK5zVVipcnkIVuv/RW/HyFKhwYhuFr6NiCmdNoDBUSGFjovJQEYXuRN9ahwoorJ8uSZenPsMTNk+X2q6jwgm/ntHL11HhhL4zenmoYEL/Gb04VCxh6KKTNFQoYfiikzBUJKF00Sk8VCChfF00OFQcYdt10dBQYYRT5xn0n9G7Q0X8GfCzNNEyZ6iPgD/HlydaVg11DfhajJaJlm2HugIUrlomWrYZKuJKHz6vHhbSM/hROdRnxNe1meuXYvW0DB6+aflYrB7dlzDiCM3N1dVN6GDhMCDhjlHYjEIK46MwNgqbUUhhfJ/vA07wO8N1vw94ONo/3e/lTpVOYfc/UyG//ZmqW52fi/FuTNW3/lZ+eguF+qOQQv1RSKH+KKRQfxRSqD8KKdQfhRTqj0IK9UchhfqjkEL9UUih/iikUH8UUqg/CmXh6Hsv3jlK+wnvD/vgkrSHMMuyu1P9ZdmuwnycDQYn+svG3n9KEUKT9zHyf6+IEWJHIX4U4kchfhTiRyF+FOJHIX4U4kchfnVhijeZa6sunCf4ZdPamteEHY5C/CjEr/vCv0ec0g+AtS1QAAAAAElFTkSuQmCC";try{var y=this;i.element.onload=function(){var e=i.element.getAttribute("lastLoaded");G.isNullOrUndefined(y.documentHelper)||e===i.element.src||(i.isCrop?y.pageContext.drawImage(i.element,i.cropX,i.cropY,i.cropWidth,i.cropHeight,g,p,u,f):(y.pageContext.drawImage(i.element,g,p,u,f),y.documentHelper.editorProperties.enableHeaderAndFooter&&y.documentHelper.hooks.onUpdateScrollBars&&y.documentHelper.hooks.onUpdateScrollBars()))},i.element.onerror=function(){var e=m,t=n.documentHelper.getImageString(i);t&&(K.startsWith(t,"http://")||K.startsWith(t,"https://"))&&(t=n.viewer.documentHelper.images.get(parseInt(i.imageString)))&&1<t.length&&(e=t[1]),i.element.src=e},i.isCrop?this.pageContext.drawImage(i.element,i.cropX,i.cropY,i.cropWidth,i.cropHeight,g,p,u,f):this.pageContext.drawImage(i.element,g,p,u,f)}catch(e){c=this.documentHelper.getImageString(i);c&&(K.startsWith(c,"http://")||K.startsWith(c,"https://"))?(W=this.viewer.documentHelper.images.get(parseInt(i.imageString)))&&1<W.length?i.element.src=W[1]:i.element.src=m:(i.imageString=m,this.documentHelper.addBase64StringInCollection(i),i.element.src=this.documentHelper.getImageString(i)),this.pageContext.drawImage(i.element,this.getScaledValue(t+a,1),this.getScaledValue(r+o,2),this.getScaledValue(i.width),this.getScaledValue(i.height))}}this.pageContext.fillStyle=K.getColor(l);var v=this.getRevisionType(s,!1),h=(G.isNullOrUndefined(v)||"Deletion"!==v.type&&"MoveFrom"!==v.type||this.renderStrikeThrough(i,t,r,"SingleStrike",l,"Normal",v),v=this.getRevisionType(s,!0),i.characterFormat),W=(("Inline"!==i.textWrappingStyle||"None"===h.underline||G.isNullOrUndefined(h.underline))&&(G.isNullOrUndefined(v)||"Insertion"!==v.type&&"MoveTo"!==v.type)||(c=this.getUnderlineYPosition(i.line),this.renderUnderline(i,t,r,c,l,h.underline,h.baselineAlignment)),this.documentHelper.picturePositionY=this.getScaledValue(r+o,2),this.documentHelper.lockedPictureContentControl);G.isNullOrUndefined(W)||W.line!==i.line||"Picture"!==W.contentControlProperties.type||(a=i.characterFormat,s=W.contentControlProperties.color,this.renderImgBorder(i,t,r,s="#00000000"===s?"#939393":s,"Solid",.5,a.baselineAlignment)),d&&this.pageContext.restore()},r.prototype.renderTableOutline=function(e,t){var i,r=new Rc(this.documentHelper),n=t,o=(t.width=this.documentHelper.layout.getTableWidth(n),(n.tableFormat.isRTFTable?n.firstChild.rowFormat:n.tableFormat).borders),a=n.isBidiTable?r.getTableRightBorder(o):r.getTableLeftBorder(o),s=K.convertPointToPixel(a.getLineWidth()),l=0;if((i=n.containerWidget instanceof Y?n.containerWidget:i)&&i.firstChild===t&&0<i.childWidgets[0].childWidgets.length&&e.repeatHeaderRowTableWidget)for(var d=this.documentHelper.layout.getHeader(i.childWidgets[0]);d&&d.rowFormat.isHeader;)l+=d.height,d=d.previousWidget;this.renderSingleBorder(a.color,t.x-t.margin.left-s/2,t.y-l,t.x-t.margin.left-s/2,t.y+t.height,s,a.lineStyle),a=r.getTableTopBorder(o),s=K.convertPointToPixel(a.getLineWidth()),this.renderSingleBorder(a.color,t.x-t.margin.left-s,t.y-s/2-l,t.x+t.width+s+t.margin.right,t.y-s/2-l,s,a.lineStyle),a=n.isBidiTable?r.getTableLeftBorder(o):r.getTableRightBorder(o),s=K.convertPointToPixel(a.getLineWidth()),this.renderSingleBorder(a.color,t.x+t.width+t.margin.right+s/2,t.y-l,t.x+t.width+t.margin.right+s/2,t.y+t.height,s,a.lineStyle),a=r.getTableBottomBorder(o),s=K.convertPointToPixel(a.getLineWidth()),this.renderSingleBorder(a.color,t.x-t.margin.left-s,t.y+t.height-s/2,t.x+t.width+s+t.margin.right,t.y+t.height-s/2,s,a.lineStyle)},r.prototype.renderTableCellOutline=function(e,t){this.isRenderingCellBorders=!0;try{this.renderTableCellOutlineBorders(e,t)}finally{this.isRenderingCellBorders=!1}this.renderCellMultiLineBorders(t)},r.prototype.renderTableCellOutlineBorders=function(e,t){var e=e.layout,i=t,r=0,n=0,o=0,a=0,s=0,l=t.ownerTable.isBidiTable,a=(i.cellFormat.borders,t.containerWidget instanceof $&&(n=t.margin.bottom-t.containerWidget.bottomBorderWidth,r=t.margin.top-t.containerWidget.topBorderWidth),o=t.margin.left-t.leftBorderWidth,t.margin.right-t.rightBorderWidth),s=G.isNullOrUndefined(i.ownerRow)||"Exactly"!==i.ownerRow.rowFormat.heightType?t.height+r+n:K.convertPointToPixel(i.ownerRow.rowFormat.height)+r+n,d=l?ee.getCellRightBorder(i):ee.getCellLeftBorder(i),h=0,s=(h=K.convertPointToPixel(d.getLineWidth()),this.renderCellBackground(s,t,o,a,h),h);if(0===i.index||1===i.cellFormat.rowSpan||1<i.cellFormat.rowSpan&&(l?i.columnIndex===i.ownerRow.childWidgets.length-1:0===i.columnIndex))this.renderSingleBorder(d.color,t.x-o-h,t.y-t.margin.top,t.x-o-h,t.y+t.height+n,h,d.lineStyle);else for(var c=0;c<i.ownerTable.childWidgets.length;c++){for(var g=i.ownerTable.childWidgets[c],p=void 0,u=0;u<g.childWidgets.length;u++){var f=g.childWidgets[u];if(l?f.columnIndex===i.columnIndex+i.cellFormat.columnSpan:f.columnIndex+f.cellFormat.columnSpan-1==i.columnIndex-1){p=f;break}if(!l&&f.columnIndex>=i.columnIndex&&f.previousWidget){p=f.previousWidget;break}}if(p&&(l?p.columnIndex===i.columnIndex+i.cellFormat.columnSpan:p.columnIndex+p.cellFormat.columnSpan-1==i.columnIndex-1)){var m=l?ee.getCellLeftBorder(p):ee.getCellRightBorder(p),y=K.convertPointToPixel(m.getLineWidth()),o=i.margin.left-y;if(!(p.y+p.height<i.y))if(p.y<i.y&&p.y+p.height>i.y)this.renderSingleBorder(m.color,i.x-o-y,i.y-r,i.x-o-y,p.y+p.height+p.margin.bottom,y,m.lineStyle);else if(p.y===i.y||p.y>i.y&&p.y+p.height<i.y+i.height)this.renderSingleBorder(m.color,i.x-o-y,p.y-p.margin.top,i.x-o-y,p.y+p.height+p.margin.bottom,y,m.lineStyle);else if(p.y<i.y+i.height&&p.y+p.height>=i.y+i.height)this.renderSingleBorder(m.color,i.x-o-y,p.y-p.margin.top,i.x-o-y,p.y+p.height+n,y,m.lineStyle);else if(p.y>i.y+i.height)break}}if(i.updatedTopBorders&&1<i.updatedTopBorders.length)for(var v=l?t.x+t.width+t.margin.right-s/2:t.x-t.margin.left-s/2,W=t.y-t.margin.top,b=0;b<i.updatedTopBorders.length;b++){var x=i.updatedTopBorders[b];"None"!==(d=x.border).lineStyle&&d.lineWidth<ee.getCellTopBorder(i).lineWidth&&(d.lineWidth=ee.getCellTopBorder(i).lineWidth),G.isNullOrUndefined(d)||(h=K.convertPointToPixel(d.getLineWidth()),this.renderSingleBorder(d.color,v,W+h/2,v+(l?-x.width:x.width),W+h/2,h,d.lineStyle),v+=l?-x.width:x.width)}else{d=ee.getCellTopBorder(i);var h=K.convertPointToPixel(d.getLineWidth()),w=t.x-t.margin.left-s/2;!l&&0===i.columnIndex&&0<i.ownerRow.rowIndex&&(w+=s),this.renderSingleBorder(d.color,w,t.y-t.margin.top+h/2,t.x+t.width+t.margin.right+0,t.y-t.margin.top+h/2,h,d.lineStyle)}for(var w=!1,w=l?0===i.columnIndex:i.cellIndex===i.ownerRow.childWidgets.length-1,F=i.containerWidget.getPreviousRowSpannedCells(),C=!1,P=0;P<F.length;P++){var T=F[P];if(i.rowIndex<T.rowIndex+T.cellFormat.rowSpan&&i.columnIndex<T.columnIndex){C=!0;break}}!(0<i.ownerTable.tableFormat.cellSpacing||w)||!l&&i.columnIndex+i.cellFormat.columnSpan!==i.ownerTable.tableHolder.columns.length&&C||(d=l?ee.getCellLeftBorder(i):ee.getCellRightBorder(i),h=K.convertPointToPixel(d.getLineWidth()),this.renderSingleBorder(d.color,t.x+t.width+t.margin.right-h/2,t.y-t.margin.top,t.x+t.width+t.margin.right-h/2,t.y+t.height+n,h,d.lineStyle));var O=i.ownerRow.nextWidget,S=!1,N=void 0,I=(G.isNullOrUndefined(O)||(I=void(O.lastChild&&(N=(I=O.lastChild).columnIndex+I.cellFormat.columnSpan)),(I=O)instanceof $&&t.containerWidget instanceof $&&t.containerWidget.containerWidget instanceof Q&&(S=-1!==t.containerWidget.containerWidget.childWidgets.indexOf(I))),!G.isNullOrUndefined(O)&&w&&!(0<O.rowFormat.gridAfter||0<O.rowFormat.gridBefore)&&O.lastChild.columnIndex+O.lastChild.cellFormat.columnSpan>i.ownerRow.lastChild.columnIndex&&O.lastChild.columnIndex+O.lastChild.cellFormat.columnSpan<i.ownerRow.lastChild.columnIndex+i.ownerRow.lastChild.cellFormat.columnSpan&&!G.isNullOrUndefined(O.childWidgets)&&O.childWidgets.length<i.ownerRow.childWidgets.length+i.cellFormat.columnSpan-1&&t.x+t.width>O.lastChild.x+O.lastChild.width+O.lastChild.margin.right&&"Cleared"!==i.cellFormat.borders.bottom.lineStyle);(0<i.ownerTable.tableFormat.cellSpacing||i.ownerRow.rowIndex===i.ownerTable.childWidgets.length-1||1<i.cellFormat.rowSpan&&i.ownerRow.rowIndex+i.cellFormat.rowSpan>=i.ownerTable.childWidgets.length||!S||this.isRenderHeader||N&&O.childWidgets.length<i.ownerRow.childWidgets.length&&N<i.columnIndex+i.cellFormat.columnSpan||!G.isNullOrUndefined(i.cellFormat.borders.bottom)&&"Cleared"!==i.cellFormat.borders.bottom.lineStyle&&1===i.cellFormat.rowSpan&&!l&&(!G.isNullOrUndefined(O)&&t.x<O.firstChild.x-O.firstChild.margin.left&&0<O.rowFormat.gridBefore&&(0!==O.rowFormat.beforeWidth||0!==O.rowFormat.gridBeforeWidth)||!G.isNullOrUndefined(O)&&t.x+t.width>O.lastChild.x+O.lastChild.width+O.lastChild.margin.right&&0<O.rowFormat.gridAfter&&(0!==O.rowFormat.afterWidth||0!==O.rowFormat.gridAfterWidth))||I)&&(w=i.cellFormat.borders.bottom,d=(G.isNullOrUndefined(w)||"Cleared"!==w.lineStyle)&&1<i.cellFormat.rowSpan&&i.ownerRow.rowIndex+i.cellFormat.rowSpan===i.ownerTable.childWidgets.length?i.getBorderBasedOnPriority(i.getBorderBasedOnPriority(i.cellFormat.borders.bottom,i.ownerRow.rowFormat.borders.bottom),i.ownerTable.tableFormat.borders.bottom):ee.getCellBottomBorder(i),S=t.x-t.margin.left-s/2,w=t.x+t.width+t.margin.right,(!(N&&O.childWidgets.length<i.ownerRow.childWidgets.length&&N<i.columnIndex+i.cellFormat.columnSpan||G.isNullOrUndefined(O)||l||!(0<O.rowFormat.gridAfter)||0===O.rowFormat.afterWidth&&0===O.rowFormat.gridAfterWidth||G.isNullOrUndefined(O.lastChild)||G.isNullOrUndefined(ee.getCellTopBorder(O.lastChild))||"None"===ee.getCellTopBorder(O.lastChild).lineStyle)&&t.x<O.lastChild.x+O.lastChild.width+O.lastChild.margin.right||I)&&(S=O.lastChild.x+O.lastChild.width+O.lastChild.margin.right),!(N&&O.childWidgets.length<i.ownerRow.childWidgets.length&&N<i.columnIndex+i.cellFormat.columnSpan||G.isNullOrUndefined(O)||l||!(0<O.rowFormat.gridBefore)||0===O.rowFormat.beforeWidth&&0===O.rowFormat.gridBeforeWidth||G.isNullOrUndefined(O.firstChild)||G.isNullOrUndefined(ee.getCellTopBorder(O.firstChild))||"None"===ee.getCellTopBorder(O.firstChild).lineStyle)&&t.x+t.width>O.firstChild.x-O.firstChild.margin.left&&(w=O.firstChild.x-O.firstChild.margin.left),h=K.convertPointToPixel(d.getLineWidth()),this.renderSingleBorder(d.color,S,t.y+t.height+n+h/2,w,t.y+t.height+n+h/2,h,d.lineStyle)),d=e.getCellDiagonalUpBorder(i),0<(h=K.convertPointToPixel(d.getLineWidth()))&&this.renderSingleBorder(d.color,t.x-o,t.y+t.height+n,t.x+t.width+a,t.y-r,h,d.lineStyle),d=e.getCellDiagonalDownBorder(i),0<(h=K.convertPointToPixel(d.getLineWidth()))&&this.renderSingleBorder(d.color,t.x-o,t.y-r,t.x+t.width+a,t.y+t.height+n,h,d.lineStyle)},r.prototype.renderCellMultiLineBorders=function(e){for(var t=e.ownerTable,i=t.isBidiTable,r=e.ownerRow,n=t.tableHolder.columns.length,o=e.columnIndex+e.cellFormat.columnSpan,a=e.columnIndex<=r.rowFormat.gridBefore,o=o>=n-r.rowFormat.gridAfter,n=r.rowIndex+e.cellFormat.rowSpan-1,s=e.x-e.margin.left,l=e.x+e.width+e.margin.right,d=function(e){var t=[];if(!G.isNullOrUndefined(e))for(var i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];1<Math.min(l,r.x+r.width+r.margin.right)-Math.max(s,r.x-r.margin.left)&&t.push(r)}return t},h=function(e,t,i){e=e.cellFormat.borders[i],i=G.isNullOrUndefined(e)?"None":e.lineStyle;return!(G.isNullOrUndefined(t)||"Double"!==t.lineStyle&&"Triple"!==t.lineStyle||"Double"!==i&&"Triple"!==i&&"None"!==i)},c=function(e,t,i){for(var r=d(e),n=0;n<r.length;n++){var o="top"===t?ee.getCellTopBorder(r[n]):ee.getCellBottomBorder(r[n]);if(h(r[n],o,t))return!1}return!0},g=n<t.childWidgets.length?t.childWidgets[n].nextWidget:void 0,p=ee.getCellBottomBorder(e),u=(1<e.cellFormat.rowSpan&&n==t.childWidgets.length-1&&(!e.cellFormat.borders.bottom||"Cleared"!==e.cellFormat.borders.bottom.lineStyle)&&(p=e.getBorderBasedOnPriority(e.getBorderBasedOnPriority(e.cellFormat.borders.bottom,r.rowFormat.borders.bottom),t.tableFormat.borders.bottom)),[i?ee.getCellRightBorder(e):ee.getCellLeftBorder(e),ee.getCellTopBorder(e),i?ee.getCellLeftBorder(e):ee.getCellRightBorder(e),p]),f=[i?o:a,c(r.previousWidget,"bottom"),i?a:o,c(g,"top")],m=[],y=[],v=[],W=!1,b=0;b<4;b++){var x=G.isNullOrUndefined(u[b])?"None":u[b].lineStyle;1!==b&&3!==b||f[b]||h(e,u[b],1===b?"top":"bottom")||(x="None"),m[b]="Double"===x?2:"Triple"===x?3:0,y[b]=0<m[b]?K.convertPointToPixel(u[b].getLineWidth()):0,v[b]=0<m[b]?y[b]/(2*m[b]-1):0,W=W||0<m[b]}if(W){var n=e.margin.bottom-(e.containerWidget instanceof $?e.containerWidget.bottomBorderWidth:0),t=e.x+e.width+e.margin.right,w=(i||f[2]||(t=e.x+e.width+e.margin.left),[e.x-e.margin.left-(f[0]?y[0]/2:y[0]),e.y-e.margin.top,t-y[2],e.y+e.height+n]),F=function(e,t){return m[e]>t&&(f[e]||0<t)},C=function(e,t){t=F(e,t)?2*t*v[e]:0;return e<2?w[e]+t:w[e]+y[e]-t},P=this.pageContext;P.setLineDash([]);for(b=0;b<4;b++)for(var T,O,S,N,I=0;I<m[b];I++)F(b,I)&&(T=function(e,t){t=(2*t+.5)*v[e];return e<2?w[e]+t:w[e]+y[e]-t}(b,I),S=C((O=b%2==0)?1:0,I),N=C(O?3:2,I),P.beginPath(),O?(P.moveTo(this.getScaledValue(T,1),this.getScaledValue(S,2)),P.lineTo(this.getScaledValue(T,1),this.getScaledValue(N,2))):(P.moveTo(this.getScaledValue(S,1),this.getScaledValue(T,2)),P.lineTo(this.getScaledValue(N,1),this.getScaledValue(T,2))),P.lineWidth=this.getScaledValue(v[b]),P.strokeStyle=K.getColor(u[b].color),P.stroke(),P.closePath())}},r.prototype.renderCellBackground=function(e,t,i,r,n){var o,a,s=t.cellFormat,l=t.x-i-n/2,d=t.margin.top-t.containerWidget.topBorderWidth,d=t.y-d,i=t.width+i+r+n/2,r=t.ownerTable.tableFormat.shading.backgroundColor,n=s.shading.backgroundColor;0<t.ownerRow.rowFormat.revisionLength&&(o=t.ownerRow.rowFormat.getRevision(t.ownerRow.rowFormat.revisionLength-1),n=this.resolveRowRevisionFillColor(o)),"empty"!==n&&(o=ee.getCellLeftBorder(t),a=ee.getCellTopBorder(t),t===t.ownerRow.lastChild||"None"!==o.lineStyle&&"Cleared"!==o.lineStyle||(i+=.5),t.ownerRow.ownerTable.lastChild===t.ownerRow||"None"!==a.lineStyle&&"Cleared"!==a.lineStyle||(e+=.5)),0<t.ownerTable.tableFormat.cellSpacing&&this.renderBackgroundColor(r,l,d,i,e),this.renderBackgroundColor(n,l,d,i,e),s.shading.hasValue("foregroundColor")&&"TextureNone"!==s.shading.textureStyle&&(this.pageContext.beginPath(),this.pageContext.fillStyle=this.drawTextureStyle(s.shading.textureStyle,K.getColor(s.shading.foregroundColor),K.getColor(s.shading.backgroundColor),"empty"===s.shading.foregroundColor,"empty"===s.shading.backgroundColor),this.pageContext.fillRect(this.getScaledValue(l,1),this.getScaledValue(d,2),this.getScaledValue(i),this.getScaledValue(e)),this.pageContext.closePath())},r.prototype.renderBackgroundColor=function(e,t,i,r,n){this.pageContext.beginPath(),"empty"!==e&&(this.pageContext.fillStyle=K.getColor(e),this.pageContext.fillRect(this.getScaledValue(t,1),this.getScaledValue(i,2),this.getScaledValue(r),this.getScaledValue(n)),this.pageContext.closePath())},r.prototype.drawTextureStyle=function(e,t,i,r,n){var o;return n&&(i="#ffffff"),r&&(t="#000000"),-1<e.indexOf("Percent")?(o=e.replace("Texture","").replace("Percent","").replace("Pt","."),o=parseInt(o),this.getForeColor(t,i,o,r,n)):"TextureSolid"===e?t:"#FFFFFF"},r.prototype.getForeColor=function(e,t,i,r,n){var e=K.convertHexToRgb(e),t=K.convertHexToRgb(t),o=this.getColorValue(e.r,t.r,i,r,n),a=this.getColorValue(e.g,t.g,i,r,n),e=this.getColorValue(e.b,t.b,i,r,n);return"#"+K.convertRgbToHex(o)+K.convertRgbToHex(a)+K.convertRgbToHex(e)},r.prototype.getColorValue=function(e,t,i,r,n){return 100==i?e:r?n?Math.round(255*(1-i/100)):Math.round(t*(1-i/100)):n?Math.round(e*(i/100)):t+Math.round(e*(i/100))-Math.round(t*(i/100))},r.prototype.setLineDashBasedOnStyle=function(e,t){var i=this.getScaledValue(t);switch(e){case"Dot":this.pageContext.setLineDash([this.getScaledValue(1)*i,this.getScaledValue(1)*i]);break;case"DashSmallGap":this.pageContext.setLineDash([this.getScaledValue(4)*i,this.getScaledValue(2)*i]);break;case"DashLargeGap":this.pageContext.setLineDash([this.getScaledValue(4)*i,this.getScaledValue(4)*i])}},r.prototype.renderMultipleLineBorder=function(e,t,i,r,n,o,a){var s=Math.sqrt(Math.pow(r-t,2)+Math.pow(n-i,2));if(0!==s){var l=Math.max(o/(a+1),.5),o=Math.max(o,2),d=-(n-i)/s,h=(r-t)/s,s=2===a?[-o/2,o/2]:[-o,0,o];this.pageContext.setLineDash([]);for(var c=0,g=s;c<g.length;c++){var p=g[c];this.pageContext.beginPath(),this.pageContext.moveTo(this.getScaledValue(t+d*p,1),this.getScaledValue(i+h*p,2)),this.pageContext.lineTo(this.getScaledValue(r+d*p,1),this.getScaledValue(n+h*p,2)),this.pageContext.lineWidth=this.getScaledValue(l),this.pageContext.strokeStyle=K.getColor(e),this.pageContext.stroke(),this.pageContext.closePath()}}},r.prototype.renderSingleBorder=function(e,t,i,r,n,o,a){if("Double"===a||"Triple"===a)return this.isRenderingCellBorders?void 0:void this.renderMultipleLineBorder(e,t,i,r,n,o,"Double"===a?2:3);this.setLineDashBasedOnStyle(a,o),this.pageContext.beginPath(),this.pageContext.moveTo(this.getScaledValue(t,1),this.getScaledValue(i,2)),this.pageContext.lineTo(this.getScaledValue(r,1),this.getScaledValue(n,2)),this.pageContext.lineWidth=this.getScaledValue(o),this.pageContext.strokeStyle=K.getColor(e),"None"!==a&&"Cleared"!==a&&this.pageContext.stroke(),this.pageContext.closePath(),"Dot"!==a&&"DashSmallGap"!==a&&"DashLargeGap"!==a||this.pageContext.setLineDash([])},r.prototype.getScaledValue=function(e,t){return this.isPrinting?e:(G.isNullOrUndefined(t)&&(t=0),e*this.documentHelper.zoomFactor+(1===t?this.pageLeft:2===t?this.pageTop:0))},r.prototype.checkRevisionType=function(e){for(var t=[],i=e.revisionLength,r=0;r<i;r++){var n=e.getRevision(r),o=this.resolveRevisionDisplayColor(n);t.push({type:n.revisionType,color:o})}return t},r.prototype.resolveRevisionDisplayColor=function(e){return this.resolveTypedRevisionColor(e,!1)},r.prototype.resolveRowRevisionFillColor=function(e){return this.tintColor(this.resolveTypedRevisionColor(e,!0),10)},r.prototype.tintColor=function(e,t){var i,r;return G.isNullOrUndefined(e)||""===e||"empty"===e||(9===(r="#"===e.charAt(0)?e:"#"+e).length&&(r="#"+r.substring(3)),r=K.convertHexToRgb(r),G.isNullOrUndefined(r))?e:(e=Math.max(0,Math.min(100,t))/100,t=Math.round(r.r*e+255*(1-e)),i=Math.round(r.g*e+255*(1-e)),r=Math.round(r.b*e+255*(1-e)),"#"+K.convertRgbToHex(t)+K.convertRgbToHex(i)+K.convertRgbToHex(r))},r.prototype.resolveTypedRevisionColor=function(e,t){var i=this.documentHelper&&this.documentHelper.documentEditorSettings?this.documentHelper.documentEditorSettings.revisionSettings:void 0,r="Insertion"===e.revisionType||"MoveTo"===e.revisionType,n="Deletion"===e.revisionType||"MoveFrom"===e.revisionType;if(!G.isNullOrUndefined(i)){var o=t?i.insertedRowColor:i.insertRevisionColor,t=t?i.deletedRowColor:i.deleteRevisionColor;if(r&&!G.isNullOrUndefined(o)&&""!==o&&"byauthor"!==o.toLowerCase())return o;if(n&&!G.isNullOrUndefined(t)&&""!==t&&"byauthor"!==t.toLowerCase())return t}i=this.documentHelper.authors.get(e.author);return i=G.isNullOrUndefined(i)?this.documentHelper.getAuthorColor(e.author):i},r.prototype.getRevisionColor=function(e){if(1===e.length)return e[0].color;for(var t=0;t<e.length;t++)if("Deletion"===e[t].type||"MoveFrom"===e[t].type)return e[t].color;return 0<e.length?e[0].color:void 0},r.prototype.getRevisionType=function(e,t){if(0!==e.length)for(var i=0;i<e.length;i++){var r=void 0;if(t&&("Insertion"===e[i].type||"MoveTo"===e[i].type))return r=e[i],this.pageContext.fillStyle=K.getColor(r.color),e.splice(i,1),r;if(!t&&("Deletion"===e[i].type||"MoveFrom"===e[i].type))return r=e[i],this.pageContext.fillStyle=K.getColor(r.color),e.splice(i,1),r}},r.prototype.getFormfieldInLine=function(e){for(var t=0;t<e.children.length;t++)if(e.children[t]instanceof te&&!G.isNullOrUndefined(e.children[t].formFieldData))return e.children[t]},r.prototype.renderLockMark=function(e,t,i){var r;G.isNullOrUndefined(e.editRangeMark)&&(t=t===e.user?"you":e.user,e.editRangeMark=document.createElement("div"),e.editRangeMark.style.display="none",e.editRangeMark.classList.add("e-de-lock-mark"),(r=document.createElement("span")).className="e-icons e-de-ctnr-lock",e.editRangeMark.appendChild(r),e.editRangeMark.title=i.getConstant("This region is locked by")+" "+t),e.line&&G.isNullOrUndefined(e.editRangeMark.parentElement)&&e.line.paragraph.bodyWidget.page.documentHelper.pageContainer.appendChild(e.editRangeMark)},r.prototype.getShape=function(e){return this.shapes[e.toString()]},r.prototype.destroy=function(){this.documentHelper=void 0,this.shapes=null,G.isNullOrUndefined(this.pageCanvasIn)||(this.pageCanvasIn.innerHTML=""),this.pageCanvasIn=void 0},r);function r(e){this.commentMarkDictionary=new N,this.isPrinting=!1,this.skipRenderWavyLine=!1,this.isExporting=!1,this.pageLeft=0,this.pageTop=0,this.pageIndex=-1,this.isFieldCode=!1,this.isRenderHeader=!1,this.height=0,this.fieldStacks=[],this.isRenderingCellBorders=!1,this.shapes={Rectangle:"M0,0 L50,0 L50,50 L0,50 z",Oval:"M80.5,12.5 C80.5,19.127417 62.59139,24.5 40.5,24.5 C18.40861,24.5 0.5,19.127417 0.5,12.5C0.5,5.872583 18.40861,0.5 40.5,0.5 C62.59139,0.5 80.5,5.872583 80.5,12.5 z",IsoscelesTriangle:"M45,0 L90,45 L0,45 L45,0 z",RightTriangle:"M836.293,292.9238 L776.293,292.9238 L776.293,254.8408 L836.293,292.9238 z",Parallelogram:"M30,0 L60,0 L45,30 L15,30 z",Trapezoid:"M 1873 358 l -506 1332 h -686 l -506 -1332 z",Diamond:"M397.784,287.875 L369.5,316.159 L341.216,287.875 L369.5,259.591 L397.784,287.875 z",RegularPentagon:"M30,0 L60,30 L50,70 L10,70 L0,30 L30,0 z",Hexagon:"M30,0 L60,0 L90,30 L60,60 L30,60 L0,30 L30,0 z",Heptagon:"M223.7783,195.7134 L207.1303,174.8364 L213.0713,148.8034 L237.1303,137.2174 L261.1883,148.8034 L267.1303,174.8364L250.4813,195.7134 L223.7783,195.7134 z",Octagon:"M98.7319,196.4653 L81.1579,178.8923 L81.1579,154.0393 L98.7319,136.4653 L123.5849,136.4653L141.1579,154.0393 L141.1579,178.8923 L123.5849,196.4653 L98.7319,196.4653 z",Decagon:"M657.3379,302.4141 L642.3369,291.5161 L636.6089,273.8821 L642.3369,256.2481 L657.3379,245.3511 L675.8789,245.3511L690.8789,256.2481 L696.6089,273.8821L690.8789,291.5161 L675.8789,302.4141 L657.3379,302.4141 z",Dodecagon:"M-69.20000457763672,-17.685555555555553L-50.656966313962585,-48.31444444444445L-18.543038263674127,-66L18.543038263674134,-66L50.656966313962585,-48.31444444444445L69.20000457763672,-17.685555555555553L69.20000457763672,17.685555555555553L50.656966313962585,48.31444444444445L18.543038263674134,66L-18.543038263674127,66L-50.656966313962585,48.31444444444445L-69.20000457763672,17.685555555555553Z",Pie:"M 1024 1894 q -120 0 -231 -31 q -111 -31 -208 -88 q -97 -57 -176 -136 q -79 -79 -136 -176 q -57 -97 -88 -208 q -31 -111 -31 -231 q 0 -109 26 -212 q 26 -102 75 -194 q 48 -92 117 -170 q 68 -78 153 -138 q 84 -59 183 -98 q 99 -39 207 -52 l 58 -7 v 922 h 922 l -7 58 q -13 109 -52 207 q -39 99 -98 183 q -60 85 -138 153 q -78 69 -170 117 q -92 49 -194 75 q -103 26 -212 26 z",Chord:"M 1024 1894 q -120 0 -231 -31 q -111 -31 -208 -88 q -97 -57 -176 -136 q -79 -79 -136 -176 q -57 -97 -88 -208 q -31 -111 -31 -231 q 0 -116 29 -224 q 29 -108 82 -203 q 53 -94 128 -173 q 75 -79 167 -137 q 92 -57 198 -92 q 106 -34 222 -40 l 23 -1 l 891 891 l -1 23 q -6 116 -40 222 q -35 106 -92 198 q -58 92 -137 167 q -79 75 -173 128 q -95 53 -203 82 q -108 29 -224 29 z",Teardrop:"M 1024 1894 q -120 0 -231 -31 q -111 -31 -208 -88 q -97 -57 -176 -136 q -79 -79 -136 -176 q -57 -97 -88 -208 q -31 -111 -31 -231 q 0 -120 31 -231 q 31 -111 88 -208 q 57 -97 136 -176 q 79 -79 176 -136 q 97 -57 208 -88 q 111 -31 231 -31 h 870 v 870 q 0 120 -31 231 q -31 111 -88 208 q -57 97 -136 176 q -79 79 -176 136 q -97 57 -208 88 q -111 31 -231 31 z",Frame:"M 1894 154 v 1740 h -1740 v -1740 m 1433 307 h -1126 v 1126 h 1126 z",HalfFrame:"M 154 154 h 1668 l -307 307 h -1054 v 1054 l -307 307 z",L_Shape:"M 870 154 v 1024 h 1024 v 716 h -1740 v -1740 z",DiagonalStripe:"M 154 943 l 789 -789 h 879 l -1668 1668 z",Cross:"M 666 1894 v -512 h -512 v -716 h 512 v -512 h 716 v 512 h 512 v 716 h -512 v 512 z",Plaque:"M 563 1894 v -51 q 0 -66 -31 -131 q -31 -64 -81 -115 q -51 -50 -115 -81 q -65 -31 -131 -31 h -51 v -922 h 51 q 66 0 131 -31 q 64 -31 115 -82 q 50 -50 81 -115 q 31 -64 31 -130 v -51 h 922 v 51 q 0 66 31 130 q 31 65 82 115 q 50 51 115 82 q 64 31 130 31 h 51 v 922 h -51 q -66 0 -130 31 q -65 31 -115 81 q -51 51 -82 115 q -31 65 -31 131 v 51 z",Cube:"M 1946 102 v 1280 l -564 564 h -1280 v -1280 l 564 -564 m 665 615 h -1126 v 1126 h 1126 m 51 -1229 l 410 -409 h -1075 l -410 409 m 1536 -307 l -409 410 v 1024 l 409 -410 z",Bevel:"M 1946 102 v 1844 h -1844 v -1844 m 175 103 l 205 205 h 1084 l 205 -205 m -235 1331 v -1024 h -1024 v 1024 m -307 235 l 205 -205 v -1084 l -205 -205 m 1566 1566 l -205 -205 h -1084 l -205 205 m 1566 -1566 l -205 205 v 1084 l 205 205 z",Donut:"M 1024 154 q 120 0 231 31 q 111 31 208 88 q 97 57 176 136 q 79 79 136 176 q 57 97 88 208 q 31 111 31 231 q 0 120 -31 231 q -31 111 -88 208 q -57 97 -136 176 q -79 79 -176 136 q -97 57 -208 88 q -111 31 -231 31 q -120 0 -231 -31 q -111 -31 -208 -88 q -97 -57 -176 -136 q -79 -79 -136 -176 q -57 -97 -88 -208 q -31 -111 -31 -231 q 0 -120 31 -231 q 31 -111 88 -208 q 57 -97 136 -176 q 79 -79 176 -136 q 97 -57 208 -88 q 111 -31 231 -31 m 0 1331 q 95 0 179 -37 q 84 -36 147 -99 q 62 -62 99 -146 q 36 -84 36 -179 q 0 -95 -36 -179 q -37 -84 -99 -147 q -63 -62 -147 -99 q -84 -36 -179 -36 q -95 0 -179 36 q -84 37 -146 99 q -63 63 -99 147 q -37 84 -37 179 q 0 95 37 179 q 36 84 99 146 q 62 63 146 99 q 84 37 179 37 z",NoSymbol:"M 1024 154 q 124 0 237 30 q 112 30 209 85 q 96 56 175 134 q 78 79 134 175 q 55 97 85 209 q 30 113 30 237 q 0 124 -30 236 q -30 113 -85 209 q -56 97 -134 175 q -79 79 -175 134 q -97 56 -209 86 q -113 30 -237 30 q -124 0 -236 -30 q -113 -30 -209 -86 q -97 -55 -175 -134 q -79 -78 -134 -175 q -56 -96 -86 -209 q -30 -112 -30 -236 q 0 -124 30 -237 q 30 -112 86 -209 q 55 -96 134 -175 q 78 -78 175 -134 q 96 -55 209 -85 q 112 -30 236 -30 m 273 1369 l -772 -772 l -28 74 q -36 96 -36 199 q 0 116 45 218 q 44 103 121 179 q 76 77 179 121 q 102 45 218 45 q 103 0 199 -36 m 328 -328 q 36 -96 36 -199 q 0 -116 -44 -219 q -45 -102 -121 -179 q -77 -76 -179 -121 q -103 -44 -219 -44 q -103 0 -199 36 l -74 28 l 772 772 z",BlockArc:"M 1485 1485 v -51 q 0 -96 -36 -180 q -37 -84 -99 -147 q -63 -62 -147 -98 q -84 -36 -179 -36 q -95 0 -179 36 q -84 36 -146 98 q -63 63 -99 147 q -37 84 -37 180 v 51 h -409 v -51 q 0 -120 31 -231 q 31 -111 88 -208 q 57 -97 136 -177 q 79 -79 176 -136 q 97 -57 208 -88 q 111 -31 231 -31 q 120 0 231 31 q 111 31 208 88 q 97 57 176 136 q 79 80 136 177 q 57 97 88 208 q 31 111 31 231 v 51 z",FoldedCorner:"M 1946 102 v 1229 l -615 615 h -1229 v -1844 m 1229 1699 l 470 -470 h -470 m 512 -1126 h -1638 v 1638 h 1024 v -614 h 614 zM 154 1894 v -1740 h 1740 v 1156 l -584 584 z",SmileyFace:"M 1024 102 q 127 0 245 33 q 118 33 221 93 q 102 60 186 144 q 84 84 144 186 q 60 103 93 221 q 33 118 33 245 q 0 127 -33 245 q -33 118 -93 220 q -60 103 -144 187 q -84 84 -186 144 q -103 60 -221 93 q -118 33 -245 33 q -127 0 -245 -33 q -118 -33 -220 -93 q -103 -60 -187 -144 q -84 -84 -144 -187 q -60 -102 -93 -220 q -33 -118 -33 -245 q 0 -127 33 -245 q 33 -118 93 -221 q 60 -102 144 -186 q 84 -84 187 -144 q 102 -60 220 -93 q 118 -33 245 -33 m 0 1741 q 113 0 218 -30 q 104 -29 195 -82 q 91 -53 166 -128 q 75 -75 128 -166 q 53 -91 83 -196 q 29 -104 29 -217 q 0 -113 -29 -218 q -30 -104 -83 -195 q -53 -91 -128 -166 q -75 -75 -166 -128 q -91 -53 -195 -83 q -105 -29 -218 -29 q -113 0 -217 29 q -105 30 -196 83 q -91 53 -166 128 q -75 75 -128 166 q -53 91 -82 195 q -30 105 -30 218 q 0 113 30 217 q 29 105 82 196 q 53 91 128 166 q 75 75 166 128 q 91 53 196 82 q 104 30 217 30 m 358 -1331 q 32 0 60 12 q 28 12 49 33 q 21 21 33 49 q 12 28 12 60 q 0 32 -12 59 q -12 28 -33 49 q -21 21 -49 33 q -28 12 -60 12 q -32 0 -59 -12 q -28 -12 -49 -33 q -21 -21 -33 -49 q -12 -27 -12 -59 q 0 -32 12 -60 q 12 -28 33 -49 q 21 -21 49 -33 q 27 -12 59 -12 m 52 102 h -103 v 103 h 103 m -768 -205 q 31 0 59 12 q 28 12 49 33 q 21 21 33 49 q 12 28 12 60 q 0 32 -12 59 q -12 28 -33 49 q -21 21 -49 33 q -28 12 -59 12 q -32 0 -60 -12 q -28 -12 -49 -33 q -21 -21 -33 -49 q -12 -27 -12 -59 q 0 -32 12 -60 q 12 -28 33 -49 q 21 -21 49 -33 q 28 -12 60 -12 m 51 102 h -103 v 103 h 103 m 823 512 q -18 87 -66 162 q -48 75 -117 130 q -69 55 -154 86 q -86 31 -179 31 q -93 0 -178 -31 q -86 -31 -155 -86 q -69 -55 -117 -130 q -48 -75 -66 -162 h 106 q 17 66 57 122 q 39 56 94 97 q 55 42 122 65 q 66 23 137 23 q 71 0 138 -23 q 66 -23 121 -65 q 55 -41 95 -97 q 39 -56 56 -122 z",Heart:"M 997 1758 q -401 -286 -612 -551 q -212 -265 -231 -504 v -101 q 9 -106 45 -187 q 35 -80 87 -135 q 52 -55 114 -85 q 62 -30 122 -36 q 21 -2 41 -3 q 19 -1 38 -1 q 67 0 119 12 q 51 13 96 38 q 44 26 85 65 q 40 39 84 91 l 39 46 l 39 -46 q 44 -52 85 -91 q 40 -39 85 -65 q 44 -25 96 -38 q 51 -12 118 -12 q 19 0 39 1 q 19 1 40 3 q 60 6 122 36 q 62 31 114 86 q 51 56 87 137 q 36 82 45 189 v 100 q -19 240 -229 503 q -211 264 -609 548 l -30 21 z",LightningBolt:"M-8,-55L7,-24L1,-20L19,6L13,11L36,55L-3,21L5,16L-19,-6L-11,-12L-36,-35Z",Sun:"M69.60002899169922,0L41.51352437242167,8.416795119701419L41.51352437242167,-8.416795119701426ZM49.209798275982905,-41.47314036934465L36.41601824906962,-18.783766017986338L22.290725499983694,-30.686752034954836ZM0,-58.64998245239259L9.988224375410937,-34.982276749768076L-9.988224375410944,-34.982276749768076ZM-49.216242723111755,-41.47314036934465L-22.290725499983694,-30.686752034954836L-36.416018249069616,-18.783766017986338ZM-69.60002899169922,0L-41.51352437242167,-8.416795119701426L-41.51352437242167,8.416795119701419ZM-49.216242723111755,41.46770981541388L-36.416018249069616,18.783766017986338L-22.290725499983694,30.68675203495485ZM0,58.64998245239259L-9.988224375410944,34.98227674976806L9.988224375410937,34.98227674976806ZM49.209798275982905,41.46770981541388L22.290725499983694,30.68675203495485L36.41601824906962,18.783766017986338ZM-34.80001449584961,0Q-34.800014495849624,-12.14680908236253,-24.607326235405417,-20.735900154279413Q-14.414637974961238,-29.32499122619629,-1.4210854715202004e-14,-29.324991226196296Q14.414637974961224,-29.324991226196293,24.60732623540541,-20.735900154279413Q34.80001449584961,-12.146809082362545,34.80001449584961,-7.105427357601002e-15Q34.80001449584961,12.146809082362523,24.60732623540541,20.735900154279406Q14.414637974961224,29.32499122619629,0,29.32499122619629Q-14.414637974961217,29.32499122619629,-24.607326235405388,20.73590015427945Q-34.8000144958496,12.146809082362552,-34.80001449584961,7.105427357601002e-15Z",Moon:"M36.80000305175781,60.90000915527344Q6.313882332939066,60.90000915527344,-15.243060359409363,43.06280944801668Q-36.80000305175781,25.22560974075992,-36.80000305175781,7.105427357601002e-15Q-36.800003051757834,-25.225609740759907,-15.243060359409384,-43.062809448016665Q6.3138823329390235,-60.90000915527342,36.8000030517578,-60.90000915527344Q6.313882332939052,-41.98080184970351,0.9246466598519447,-10.765702362004177Q-4.464589013235177,20.449397125695157,18.400001525878878,45.67500686645508Q26.28571646554125,54.375008174351294,36.800003051757784,60.90000915527344Z",Cloud:"M 1024 1792 q -60 0 -115 -20 q -55 -19 -100 -54 q -46 -34 -79 -83 q -34 -48 -50 -106 l -24 -86 l -62 65 q -37 38 -83 58 q -47 21 -101 21 q -54 0 -101 -21 q -47 -20 -81 -55 q -35 -35 -54 -83 q -20 -47 -20 -100 q 0 -48 18 -91 q 18 -42 50 -78 l 25 -28 l -19 -32 q -38 -64 -56 -135 q -18 -71 -18 -145 q 0 -116 44 -219 q 44 -102 121 -179 q 76 -76 179 -121 q 102 -44 219 -44 q 106 0 206 38 q 99 39 177 113 l 39 37 l 35 -41 q 61 -72 140 -110 q 79 -37 171 -37 q 85 0 160 32 q 74 33 130 88 q 55 56 87 130 q 32 75 32 160 q 0 70 -23 135 q -23 66 -71 123 l -28 34 l 30 32 q 45 51 69 112 q 23 61 23 127 q 0 74 -28 139 q -28 65 -76 114 q -49 49 -114 77 q -66 28 -140 28 q -63 0 -126 -24 l -44 -17 l -20 43 q -23 47 -56 84 q -34 38 -76 64 q -42 27 -90 41 q -48 14 -100 14 z",Arc:"M-1.4210854715202004e-14,-45.200008392333984Q15.408730615404892,-45.200008392334,26.304348523034477,-31.96123244390823Q37.19996643066406,-18.722456495482472,37.19996643066406,-2.1316282072803006e-14Q37.19996643066406,-1.4210854715202004e-14,37.19996643066406,-1.4210854715202004e-14",DoubleBracket:"M 717 1843 v 103 h -307 q -63 0 -119 -25 q -56 -24 -98 -66 q -42 -42 -66 -98 q -25 -56 -25 -119 v -1228 q 0 -63 25 -119 q 24 -56 66 -98 q 42 -42 98 -67 q 56 -24 119 -24 h 307 v 103 h -307 q -42 0 -79 16 q -38 16 -66 44 q -28 28 -44 65 q -16 38 -16 80 v 1228 q 0 42 16 79 q 16 38 44 66 q 28 28 66 44 q 37 16 79 16 m 1228 -1741 q 63 0 119 24 q 56 25 98 67 q 42 42 67 98 q 24 56 24 119 v 1228 q 0 63 -24 119 q -25 56 -67 98 q -42 42 -98 66 q -56 25 -119 25 h -307 v -103 h 307 q 42 0 80 -16 q 37 -16 65 -44 q 28 -28 44 -66 q 16 -37 16 -79 v -1228 q 0 -42 -16 -80 q -16 -37 -44 -65 q -28 -28 -65 -44 q -38 -16 -80 -16 h -307 v -103 z",DoubleBrace:"M 1843 1126 q -38 0 -75 8 q -37 9 -66 32 q -29 23 -46 62 q -18 40 -18 103 v 410 q 0 77 -22 118 q -23 42 -55 61 q -33 20 -68 23 q -35 3 -59 3 h -103 v -103 q 14 -1 25 -1 q 10 0 18 0 q 15 0 27 0 q 11 1 33 1 q 38 0 59 -16 q 20 -15 30 -35 q 11 -22 13 -51 v -410 q 0 -62 18 -113 q 17 -51 46 -90 q 29 -39 66 -66 q 36 -26 75 -38 q -39 -12 -75 -40 q -37 -27 -66 -67 q -29 -40 -46 -91 q -18 -50 -18 -109 v -410 q 0 -38 -16 -59 q -16 -20 -35 -30 q -23 -11 -51 -13 h -103 v -103 h 103 q 57 3 102 26 q 19 10 38 24 q 18 15 32 37 q 14 22 23 51 q 9 29 9 67 v 410 q 0 59 18 98 q 17 39 46 63 q 29 24 66 34 q 37 10 75 10 m -1638 0 q 38 0 75 -10 q 37 -10 66 -34 q 29 -24 47 -63 q 17 -39 17 -98 v -410 q 0 -38 9 -67 q 9 -29 23 -51 q 14 -22 33 -37 q 18 -14 37 -24 q 45 -23 102 -26 h 103 v 103 h -103 q -29 2 -51 13 q -20 10 -35 30 q -16 21 -16 59 v 410 q 0 59 -17 109 q -18 51 -47 91 q -29 40 -65 67 q -37 28 -76 40 q 39 12 76 38 q 36 27 65 66 q 29 39 47 90 q 17 51 17 113 v 410 q 2 29 13 51 q 10 20 31 35 q 20 16 58 16 q 22 0 33 -1 q 11 0 27 0 q 8 0 19 0 q 10 0 24 1 v 103 h -103 q -24 0 -59 -3 q -35 -3 -67 -23 q -33 -19 -55 -61 q -23 -41 -23 -118 v -410 q 0 -63 -17 -103 q -18 -39 -47 -62 q -29 -23 -66 -32 q -37 -8 -75 -8 z",LeftBracket:"M 1331 1843 v 103 h -307 q -63 0 -119 -25 q -56 -24 -98 -66 q -42 -42 -66 -98 q -24 -56 -24 -119 v -1228 q 0 -63 24 -119 q 24 -56 66 -98 q 42 -42 98 -67 q 56 -24 119 -24 h 307 v 103 h -307 q -42 0 -79 16 q -38 16 -66 44 q -28 28 -44 65 q -16 38 -16 80 v 1228 q 0 42 16 79 q 16 38 44 66 q 28 28 66 44 q 37 16 79 16 z",RightBracket:"M 1024 102 q 63 0 119 24 q 56 25 98 67 q 42 42 66 98 q 24 56 24 119 v 1228 q 0 63 -24 119 q -24 56 -66 98 q -42 42 -98 66 q -56 25 -119 25 h -307 v -103 h 307 q 42 0 80 -16 q 37 -16 65 -44 q 28 -28 44 -66 q 16 -37 16 -79 v -1228 q 0 -42 -16 -80 q -16 -37 -44 -65 q -28 -28 -65 -44 q -38 -16 -80 -16 h -307 v -103 z",LeftBrace:"M 717 922 q 38 0 75 -10 q 37 -10 66 -34 q 29 -24 47 -63 q 17 -39 17 -98 v -410 q 0 -38 9 -67 q 9 -29 23 -51 q 14 -22 33 -37 q 18 -14 37 -24 q 45 -23 102 -26 h 103 v 103 h -103 q -29 2 -51 13 q -20 10 -35 30 q -16 21 -16 59 v 410 q 0 59 -17 109 q -18 51 -47 91 q -29 40 -65 67 q -37 28 -76 40 q 39 12 76 38 q 36 27 65 66 q 29 39 47 90 q 17 51 17 113 v 410 q 2 29 13 51 q 10 20 31 35 q 20 16 58 16 q 22 0 33 -1 q 11 0 27 0 q 8 0 19 0 q 10 0 24 1 v 103 h -103 q -24 0 -59 -3 q -35 -3 -67 -23 q -33 -19 -55 -61 q -23 -41 -23 -118 v -410 q 0 -63 -17 -103 q -18 -39 -47 -62 q -29 -23 -66 -32 q -37 -8 -75 -8 z",RightBrace:"M 1229 1126 q -39 0 -75 8 q -37 9 -66 32 q -29 23 -46 62 q -18 40 -18 103 v 410 q 0 51 -10 86 q -11 35 -28 58 q -18 23 -40 35 q -22 13 -44 18 q -23 6 -45 7 q -22 1 -38 1 h -102 v -103 q 14 -1 25 -1 q 10 0 18 0 q 15 0 26 0 q 11 1 33 1 q 38 0 59 -16 q 21 -15 31 -35 q 11 -22 13 -51 v -410 q 0 -62 18 -113 q 17 -51 46 -90 q 28 -39 65 -66 q 36 -26 75 -38 q -39 -12 -75 -40 q -37 -27 -65 -67 q -29 -40 -46 -91 q -18 -50 -18 -109 v -410 q 0 -38 -16 -59 q -16 -20 -36 -30 q -23 -11 -51 -13 h -102 v -103 h 102 q 57 3 102 26 q 19 10 38 24 q 18 15 33 37 q 14 22 23 51 q 9 29 9 67 v 410 q 0 59 18 98 q 17 39 46 63 q 29 24 66 34 q 36 10 75 10 z",Plus:"M696.6084,158.2656 L674.8074,158.2656 L674.8074,136.4656 L658.4084,136.4656 L658.4084,158.2656 L636.6084,158.2656L636.6084,174.6646 L658.4084,174.6646 L658.4084,196.4656 L674.8074,196.4656 L674.8074,174.6646 L696.6084,174.6646L696.6084,158.2656 z",Star:"M540.3643,137.9336 L546.7973,159.7016 L570.3633,159.7296 L550.7723,171.9366 L558.9053,194.9966 L540.3643,179.4996L521.8223,194.9966 L529.9553,171.9366 L510.3633,159.7296 L533.9313,159.7016 L540.3643,137.9336 z",Can:"M 542.802,362.009C 542.802,368.452 525.341,373.676 503.802,373.676C 482.263,373.676 464.802,368.452 464.802,362.009L 464.802,466.484C 464.802,472.928 482.263,478.151 503.802,478.151C 525.341,478.151 542.802,472.928 542.802,466.484L 542.802,362.016C 542.802,368.459 525.341,373.534 503.802,373.534C 482.263,373.534 464.802,368.31 464.802,361.867L 464.802,362.016C 464.802,355.572 482.263,350.349 503.802,350.349C 525.341,350.349 542.802,355.572 542.802,362.016",FlowChartProcess:"M419.511,76.687L359.511,76.687L359.511,43.086L419.511,43.086z",FlowChartAlternateProcess:"M 456 1690 q -62 0 -117 -24 q -55 -24 -96 -65 q -41 -41 -65 -96 q -24 -55 -24 -118 v -726 q 0 -63 24 -118 q 24 -55 65 -96 q 41 -41 96 -65 q 55 -24 117 -24 h 1136 q 62 0 117 24 q 55 24 96 65 q 41 41 65 96 q 24 55 24 118 v 726 q 0 63 -24 118 q -24 55 -65 96 q -41 41 -96 65 q -55 24 -117 24 z",FlowChartPunchedTape:"M 563 1894 q -94 0 -169 -15 q -76 -15 -129 -38 q -54 -23 -82 -50 q -29 -27 -29 -50 v -1276 q 69 45 175 71 q 105 27 234 27 q 109 0 203 -20 q 94 -19 163 -54 q 68 -34 107 -81 q 39 -46 39 -101 q 0 -23 29 -50 q 29 -27 83 -50 q 53 -23 129 -38 q 75 -15 169 -15 q 94 0 170 15 q 75 15 128 38 q 53 23 82 50 q 29 27 29 50 v 1276 q -69 -45 -174 -72 q -106 -26 -235 -26 q -110 0 -203 19 q -94 20 -162 54 q -69 35 -108 81 q -39 47 -39 102 q 0 23 -29 50 q -29 27 -82 50 q -54 23 -129 38 q -76 15 -170 15 Z",FlowChartDecision:"M 253.005,115.687L 200.567,146.071L 148.097,115.687L 200.534,85.304L 253.005,115.687 Z",FlowChartDocument:"M 60 31.9 c 0 0 -11 -7.7 -30 0 s -30 0 -30 0 V 0 h 60 V 31.9 Z",FlowChartPredefinedProcess:"M 0,0 L 50,0 L 50,50 L 0,50 Z M 8.334,0 L 8.334,50 M 41.667,0 L 41.667,50",FlowChartTerminator:"M 269.711,29.33C 269.71,44.061 257.77,56 243.04,56L 158.058,56C 143.33,56 131.39,44.061 131.39,29.33L 131.39,29.33C 131.391,14.6057 143.33,2.669 158.058,2.669L 243.044,2.669C 257.772,2.669 269.711,14.6057 269.711,29.333 Z",PaperTap:"M0.0009,17.2042 L0.0009,47.165 C0.001,47.165 14.403,53.5455 25.00,47.165 C35.599,40.7852 44.403,43.5087 50.00,47.165L50.001,17.2042 M50.001,32.7987 L50.001,2.8405 C50.001,2.8405 35.599,-3.5427 25.001,2.8405C14.403,9.2237 5.599,6.494 0.0009,2.8405 L0.0009,32.7987",DirectData:"M 132.62 0 L 17.38 0 C 7.78 0 0 13.43 0 30 C 0 46.57 7.78 60 17.38 60 L 132.62 60 M 132.62 0C 123.02 0 115.24 13.43 115.24 30 C 115.24 46.57 123.02 60 132.62 60 C 142.22 60 150 46.57 150 30 C 150 13.43 142.22 0 132.62 0 z ",SequentialData:"M0.0029,24.999 C0.0029,11.1922 10.433,0.0021 23.295,0.0021 C36.159,0.00216 46.585,11.1922 46.585,24.999C46.585,38.8057 36.159,49.9979 23.295,49.9979 C10.433,49.9979 0.0029,38.8057 0.0029,24.999 z M23.294,49.999 L50.002,49.999",FlowChartSort:"M50.001,24.9971 L25.001,49.9971 L0.00097,24.9971 L25.001,-0.00286865 L50.001,24.9971 z M0.000976562,24.9971 L50.001,24.9971",FlowChartMultiDocument:"M43.6826,40 C44.8746,40.6183 45.8586,41.3502 46.8366,42.1122 L46.8366,4.74487 L3.09857,4.74487 L3.09857,10.9544 M46.837,35.143 C48.027,35.765 49.025,36.604 50.003,37.369 L50.003,0.002 L6.264,0.002 L6.264,4.744 M43.682,47.113 L43.682,10.765 L0.0025,10.7652 L0.0025,47.1132 C0.0025,47.1132 12.5846,53.6101 21.8426,47.1132 C31.1006,40.6163 38.792,43.393 43.6826,47.1132 z",FlowChartCollate:"M50.001,0.0028 L25.001,25.0029 L0.00097,0.0028 L50.001,0.002 z M0.0009,50.002 L25.001,25.002L50.001,50.002 L0.0009,50.0029 z",FlowChartSummingJunction:"M7.3252,42.6768 L42.6772,7.3247 M42.6768,42.6768 L7.3248,7.3247 M0.0009,25.001 C0.0009,11.193 11.197,0.0009 25.001,0.0009 C38.809,0.0009 50.001,11.193 50.001,25.001 C50.001,38.809 38.809,50.001 25.001,50.001 C11.197,50.00 0.0009,38.809 0.0009,25.00 z",FlowChartOr:"M 0 50 L 100 50 M 50 100 L 50 0.0 M 0 50 C 0 22.384 22.392 0 50 0 C 77.616 0 100 22.384 100 50 C 100 77.616 77.616 100 50 100 C 22.392 100 0 77.616 0 50 Z",FlowChartInternalStorage:"M 0 3.81946A 2.5,3.81946 0 0,1 2.5,0L 47.5 0A 2.5,3.81946 0 0,1 50,3.81946L 50 45.836A 2.5,3.819446 0 0,1 47.5,49.652778L 2.5 49.652778A 2.5,3.819446 0 0,1 0,45.8336L 0 3.819446ZM 0 11.45834L 50 11.4583334M 12.5 0L 12.5 49.652778",FlowChartExtract:"M0,35 L30,0 L60,35 Z",FlowChartManualOperation:"M46.4,28.8 L14.8,28.8 L0,0 L60,0 Z",FlowChartMagneticDisk:"M 1024 1690 q -128 0 -242 -13 q -115 -12 -211 -34 q -97 -22 -174 -52 q -78 -30 -131 -64 q -54 -34 -83 -71 q -29 -37 -29 -74 v -716 q 0 -36 29 -74 q 29 -37 83 -71 q 53 -34 131 -64 q 77 -30 174 -52 q 96 -22 211 -35 q 114 -12 242 -12 q 128 0 243 12 q 114 13 211 35 q 96 22 174 52 q 77 30 131 64 q 53 34 82 71 q 29 38 29 74 v 716 q 0 37 -29 74 q -29 37 -82 71 q -54 34 -131 64 q -78 30 -174 52 q -97 22 -211 34 q -115 13 -243 13 Z",FlowChartConnector:"M 973 1792 q -113 0 -217 -30 q -105 -29 -196 -82 q -91 -53 -166 -128 q -75 -75 -128 -166 q -53 -91 -82 -196 q -30 -104 -30 -217 q 0 -113 30 -218 q 29 -104 82 -195 q 53 -91 128 -166 q 75 -75 166 -128 q 91 -53 196 -83 q 104 -29 217 -29 q 113 0 218 29 q 104 30 195 83 q 91 53 166 128 q 75 75 128 166 q 53 91 83 195 q 29 105 29 218 q 0 113 -29 217 q -30 105 -83 196 q -53 91 -128 166 q -75 75 -166 128 q -91 53 -195 82 q -105 30 -218 30 Z",FlowChartOffPageConnector:"M 358 1407 v -1253 h 1332 v 1253 l -666 476 Z",FlowChartDirectAccessStorage:"M 358 1024 q 0 -128 13 -243 q 12 -114 34 -211 q 22 -96 52 -174 q 30 -77 64 -131 q 34 -53 71 -82 q 37 -29 74 -29 h 716 q 36 0 74 29 q 37 29 71 82 q 34 54 64 131 q 30 78 52 174 q 22 97 35 211 q 12 115 12 243 q 0 128 -12 242 q -13 115 -35 211 q -22 97 -52 174 q -30 78 -64 131 q -34 54 -71 83 q -38 29 -74 29 h -716 q -37 0 -74 -29 q -37 -29 -71 -83 q -34 -53 -64 -131 q -30 -77 -52 -174 q -22 -96 -34 -211 q -13 -114 -13 -242 Z",FlowChartMerge:"M60,0 L30,35 L0,0 Z",OffPageReference:"M60,33.3 L30.1,39 L0,33.3 L0,0 L60,0 Z",FlowChartSequentialAccessStorage:"M 60 30 C 60 13.4 46.6 0 30 0 S 0 13.4 0 30 s 13.4 30 30 30 h 28.6 v -6.5 h -9.9C 55.5 48 60 39.5 60 30 Z",Annotation:"M49.9984,50.0029 L-0.00271199,50.0029 L-0.00271199,0.00286865 L49.9984,0.00286865",Annotation2:"M49.9977,50.0029 L25.416,50.0029 L25.416,0.00286865 L49.9977,0.00286865 M25.4166,25.0029 L-0.00227869,25.0029",FlowChartData:"M 10 0 L 40 0 L 30 40 L 0 40 Z",FlowChartCard:"M275,60 L400,60 L400,110 L260,110 L260,75 Z",FlowChartDelay:"M0,0 L12.029,0 C14.212999,0 16,1.7869979 16,3.9709952 C16,6.1549926 14.212999,7.9409904 12.029,7.9409904 L0,7.9409904 z",FlowChartPreparation:"M 1048.17 572 C 1051.06 568.86 1055.17 567.05 1059.5 567 L 1094.51 567 C 1098.84 567.05 1102.95 568.86 1105.84 572 L 1126.43 595 C 1127.01 596.28 1127.01 597.72 1126.43 599 L 1105.84 622 C 1102.95 625.14 1098.84 626.95 1094.51 627 L 1059.5 627 C 1055.17 626.95 1051.06 625.14 1048.17 622 L 1027.58 599 C 1027 597.72 1027 596.28 1027.58 595 L 1048.17 572 Z",FlowChartDisplay:"M47.8809,19.2914 L32.7968,-0.00594145 L11.3902,-0.00594145 C7.93166,-0.00594145 0.00124586,11.187 0.00124586,24.9968C0.00124586,38.8032 7.93166,49.9962 11.3902,49.9962 L32.7968,49.99 L47.615,31.038 C47.615,31.0388 52.798,24.9968 47.880,19.2914 z",FlowChartManualInput:"M 912 732 L 1006.85 707 C 1008.2 707 1009.5 707.53 1010.46 708.46 C 1011.41 709.4 1011.95 710.67 1011.95 712 L 1011.95 762C 1012 764.41 1010.28 766.52 1007.87 767 L 917.1 767 C 915.75 767 914.45 766.47 913.49 765.54 C 912.54 764.6 912 763.33 912 762 L 912 732 Z",LoopLimit:"M 8 9 L 27 9 L 33 15 L 33 26 C 33 27 33 27 32 27 L 4 27 C 3 27 2 27 2 26 L 2 15 L 8 9 Z",FlowChartStoredData:"M 5.55 0L 50 0A 1.5,30 0 0,1 50,0A 5.555,25 0 0,0 50,50A 1.5,30 0 0,1 50,50L 5.555 50A 5.55,25 0 0,1 5.555,0Z",RightArrow:"M 1178 1382 h -1024 v -716 h 1024 v -338 l 695 696 l -695 696 z",LeftArrow:"M 870 666 h 1024 v 716 h -1024 v 338 l -695 -696 l 695 -696 z",UpArrow:"M 1382 870 v 1024 h -716 v -1024 h -338 l 696 -695 l 696 695 z",DownArrow:"M 666 1178 v -1024 h 716 v 1024 h 338 l -696 695 l -696 -695 z",LeftRightArrow:"M 1382 1280 h -716 v 235 l -491 -491 l 491 -491 v 235 h 716 v -235 l 491 491 l -491 491 z",UpDownArrow:"M 768 1382 v -716 h -235 l 491 -491 l 491 491 h -235 v 716 h 235 l -491 491 l -491 -491 z",QuadArrow:"M 738 1587 h 132 v -409 h -409 v 132 l -286 -286 l 286 -286 v 132 h 409 v -409 h -132 l 286 -286 l 286 286 h -132 v 409 h 409 v -132 l 286 286 l -286 286 v -132 h -409 v 409 h 132 l -286 286 z",LeftRightUpArrow:"M 461 1485 v 132 l -286 -286 l 286 -286 v 133 h 409 v -615 h -132 l 286 -286 l 286 286 h -132 v 615 h 409 v -133 l 286 286 l -286 286 v -132 z",BentArrow:"M 154 1894 v -1126 q 0 -63 24 -119 q 24 -56 66 -98 q 41 -42 97 -66 q 56 -24 120 -24 h 1024 v -235 l 388 388 l -388 389 v -235 h -768 q -53 0 -99 20 q -47 20 -82 55 q -35 35 -55 81 q -20 47 -20 100 v 870 z",UTurnArrow:"M 154 1894 v -1075 q 0 -92 24 -177 q 24 -85 67 -159 q 43 -73 104 -134 q 61 -61 135 -104 q 73 -43 158 -67 q 85 -24 177 -24 h 103 q 92 0 177 24 q 85 24 159 67 q 73 43 134 104 q 61 61 104 134 q 43 74 67 159 q 24 85 24 177 v 359 h 235 l -388 388 l -389 -388 h 235 v -359 q 0 -74 -28 -139 q -28 -65 -77 -114 q -49 -49 -114 -77 q -65 -28 -139 -28 h -103 q -74 0 -139 28 q -65 28 -114 77 q -49 49 -77 114 q -28 65 -28 139 v 1075 z",LeftUpArrow:"M 175 1434 l 388 -389 v 235 h 717 v -717 h -235 l 389 -388 l 388 388 h -235 v 1024 h -1024 v 235 z",BentUpArrow:"M 154 1894 v -307 h 1126 v -1024 h -235 l 389 -388 l 388 388 h -235 v 1331 z",CurvedRightArrow:"M 1280 1587 h -205 q -99 0 -190 -26 q -92 -25 -171 -72 q -80 -47 -145 -112 q -66 -65 -113 -145 q -47 -80 -72 -172 q -26 -91 -26 -190 q 0 -99 26 -191 q 25 -91 72 -171 q 47 -79 113 -145 q 65 -65 145 -112 q 79 -46 171 -72 q 91 -25 190 -25 h 205 v 307 h -205 q -108 0 -208 31 q -101 31 -187 88 q -87 57 -155 137 q -68 81 -110 180 l -10 25 l 14 23 q 50 79 116 141 q 66 62 144 105 q 78 43 166 66 q 87 23 179 23 h 256 v -235 l 388 389 l -388 388 z",CurvedLeftArrow:"M 768 1822 l -388 -388 l 388 -389 v 235 h 256 q 92 0 180 -23 q 87 -23 165 -66 q 78 -43 144 -105 q 66 -62 116 -141 l 14 -23 l -10 -25 q -42 -99 -110 -180 q -68 -80 -154 -137 q -87 -57 -187 -88 q -101 -31 -209 -31 h -205 v -307 h 205 q 99 0 191 25 q 91 26 171 72 q 79 47 145 112 q 65 66 112 145 q 47 80 73 171 q 25 92 25 191 q 0 99 -25 190 q -26 92 -73 172 q -47 80 -112 145 q -66 65 -145 112 q -80 47 -171 72 q -92 26 -191 26 h -205 z",CurvedUpArrow:"M 1587 768 v 205 q 0 99 -25 190 q -26 92 -73 171 q -47 80 -112 145 q -65 66 -145 113 q -80 47 -171 72 q -92 26 -191 26 q -99 0 -190 -26 q -92 -25 -171 -72 q -80 -47 -145 -113 q -66 -65 -112 -145 q -47 -79 -72 -171 q -26 -91 -26 -190 v -205 h 307 v 205 q 0 108 31 208 q 31 101 88 187 q 57 87 138 155 q 80 68 179 110 l 25 10 l 23 -14 q 79 -50 141 -116 q 62 -66 105 -144 q 43 -78 66 -166 q 23 -87 23 -179 v -256 h -235 l 389 -388 l 388 388 z",CurvedDownArrow:"M 1822 1280 l -388 388 l -389 -388 h 235 v -256 q 0 -92 -23 -180 q -23 -87 -66 -165 q -43 -78 -105 -144 q -62 -66 -141 -116 l -23 -14 l -25 10 q -99 42 -179 110 q -81 68 -138 154 q -57 87 -88 187 q -31 101 -31 209 v 205 h -307 v -205 q 0 -99 26 -191 q 25 -91 72 -171 q 46 -79 112 -145 q 65 -65 145 -112 q 79 -47 171 -73 q 91 -25 190 -25 q 99 0 191 25 q 91 26 171 73 q 80 47 145 112 q 65 66 112 145 q 47 80 73 171 q 25 92 25 191 v 205 z",StripedRightArrow:"M 102 614 h 103 v 820 h -103 m 205 -820 h 103 v 820 h -103 m 819 409 v -409 h -614 v -820 h 614 v -409 l 820 819 m -717 307 v 265 l 572 -572 l -572 -572 v 265 h -615 v 614 z",NotchedRightArrow:"M 1126 1843 v -409 h -1024 l 512 -410 l -512 -410 h 1024 v -409 l 820 819 m -717 307 v 265 l 572 -572 l -572 -572 v 265 h -835 l 384 307 l -384 307 z",Pentagon:"M 154 1690 v -1434 h 1002 l 717 717 l -717 717 z",Chevron:"M 226 1690 l 717 -717 l -717 -717 h 930 l 717 717 l -717 717 z",RightArrowCallout:"M 154 154 h 1024 v 716 h 307 v -234 l 388 388 l -388 388 v -234 h -307 v 716 h -1024 z",DownArrowCallout:"M 154 154 h 1740 v 1024 h -716 v 307 h 234 l -388 388 l -388 -388 h 234 v -307 h -716 z",LeftArrowCallout:"M 1894 154 v 1740 h -1024 v -716 h -307 v 234 l -388 -388 l 388 -388 v 234 h 307 v -716 z",UpArrowCallout:"M 1894 1894 h -1740 v -1024 h 716 v -307 h -234 l 388 -388 l 388 388 h -234 v 307 h 716 z",LeftRightArrowCallout:"M 666 1894 v -716 h -205 v 132 l -286 -286 l 286 -286 v 132 h 205 v -716 h 716 v 716 h 205 v -132 l 286 286 l -286 286 v -132 h -205 v 716 z",QuadArrowCallout:"M 738 1587 h 132 v -205 h -204 v -204 h -205 v 132 l -286 -286 l 286 -286 v 132 h 205 v -204 h 204 v -205 h -132 l 286 -286 l 286 286 h -132 v 205 h 204 v 204 h 205 v -132 l 286 286 l -286 286 v -132 h -205 v 204 h -204 v 205 h 132 l -286 286 z",CircularArrow:"M 1045 1382 h 235 v -460 q 0 -74 -28 -140 q -28 -65 -77 -114 q -49 -48 -114 -77 q -65 -28 -139 -28 h -103 q -74 0 -139 28 q -65 29 -114 77 q -49 49 -77 114 q -28 66 -28 140 v 665 h -307 v -665 q 0 -92 24 -177 q 24 -85 67 -159 q 43 -74 104 -135 q 61 -60 135 -104 q 73 -43 158 -67 q 85 -24 177 -24 h 103 q 92 0 177 24 q 85 24 159 67 q 73 44 134 104 q 61 61 104 135 q 43 74 67 159 q 24 85 24 177 v 460 h 235 l -388 389 z",Explosion1:"M 833 1509 l -270 225 v -352 h -282 l 309 -193 l -374 -421 h 450 v -337 l 260 260 l 354 -443 v 418 h 361 l -226 317 l 381 297 h -394 l 228 457 l -479 -218 l -134 312 z",Explosion2:"M 591 1480 l -324 -1 l 208 -249 l -270 -360 h 492 l -135 -270 l 247 82 l 39 -239 l 187 281 l 168 -418 l 35 281 l 417 -186 l -135 408 l 253 42 l -215 172 l 246 206 h -300 l 174 346 l -347 -173 v 353 l -305 -175 l -416 270 z",Star4Point:"M 848 1200 l -572 -176 l 572 -176 l 176 -572 l 176 572 l 572 176 l -572 176 l -176 572 z",Star5Point:"M 1219 768 h 603 l -446 446 l 175 612 l -527 -352 l -527 352 l 175 -612 l -446 -446 h 598 l 202 -521 z",Star6Point:"M 786 1485 h -580 l 350 -461 l -350 -461 h 580 l 238 -367 l 238 367 h 580 l -350 461 l 350 461 h -580 l -238 367 z",Star7Point:"M 1024 1541 l -395 307 l -42 -422 l -396 -176 l 314 -314 l -207 -373 h 461 l 265 -372 l 265 372 h 461 l -207 373 l 314 314 l -396 176 l -42 422 z",Star8Point:"M 738 1587 h -277 v -277 l -286 -286 l 286 -286 v -277 h 282 l 281 -286 l 286 286 h 277 v 277 l 286 286 l -286 286 v 277 h -277 l -286 286 z",Star10Point:"M 828 1635 l -367 48 v -286 l -277 -93 l 198 -280 l -198 -280 l 277 -93 v -286 l 367 48 l 196 -231 l 196 231 l 370 -48 v 286 l 274 92 l -198 281 l 198 280 l -277 93 v 286 l -367 -48 l -196 231 z",Star12Point:"M 868 1611 l -305 231 v -357 h -357 l 231 -305 l -241 -156 l 241 -156 l -231 -305 h 357 v -357 l 305 231 l 156 -241 l 156 241 l 305 -231 v 357 h 357 l -231 305 l 241 156 l -241 156 l 231 305 h -357 v 357 l -305 -231 l -156 241 z",Star16Point:"M-51.20001220703125,0L-37.66234497940063,-6.9061855534744225L-47.302667277832036,-18.06249483215332L-31.9284556123352,-19.667176728401184L-36.204040631713866,-33.375589842071534L-21.333893086395264,-29.434036096916195L-19.593220671386717,-43.60713318054199L-7.491457786102288,-34.71996375514984L0,-47.19999694824219L7.491457786102288,-34.71996375514984L19.593220671386717,-43.60713318054199L21.33389308639528,-29.434036096916195L36.20404063171388,-33.375589842071534L31.928455612335213,-19.667176728401184L47.30266727783204,-18.06249483215332L37.66234497940066,-6.9061855534744225L51.20001220703125,0L37.66234497940066,6.9061855534744225L47.30266727783204,18.06249483215332L31.928455612335213,19.667176728401188L36.20404063171388,33.37558984207155L21.33389308639528,29.434036096916202L19.593220671386717,43.60713318054199L7.491457786102288,34.71996375514985L0,47.19999694824219L-7.491457786102288,34.71996375514985L-19.593220671386717,43.60713318054199L-21.333893086395264,29.434036096916202L-36.204040631713866,33.37558984207155L-31.9284556123352,19.667176728401188L-47.302667277832036,18.06249483215332L-37.66234497940063,6.9061855534744225Z",Star24Point:"M-51.20001220703125,0L-38.071305076904295,-4.620761701240539L-49.45541409708704,-12.216258138985935L-35.47700045837402,-13.546871124114986L-44.34051124536243,-23.599998474121094L-30.464647263336182,-21.55010260665893L-36.20387582842581,-33.3754379140864L-23.37638957336425,-28.084588184165955L-25.600006103515625,-40.87639641572571L-14.694915503540031,-32.70534988540649L-13.251538268661228,-45.59169605307234L-5.012353195037839,-35.096973730773925L0,-47.19999694824219L5.012353195037846,-35.096973730773925L13.251538268661236,-45.59169605307234L14.694915503540045,-32.70534988540649L25.600006103515625,-40.87639641572571L23.37638957336425,-28.084588184165955L36.20387582842582,-33.3754379140864L30.464647263336204,-21.55010260665893L44.340511245362435,-23.599998474121094L35.47700045837402,-13.546871124114986L49.45541409708704,-12.216258138985935L38.07130507690431,-4.620761701240539L51.20001220703125,0L38.07130507690431,4.620761701240539L49.45541409708704,12.216258138985935L35.47700045837402,13.546871124114993L44.340511245362435,23.599998474121094L30.464647263336204,21.550102606658925L36.20387582842582,33.375437914086405L23.37638957336425,28.084588184165966L25.600006103515625,40.87639641572571L14.694915503540045,32.70534988540649L13.251538268661236,45.59169605307234L5.012353195037846,35.096973730773925L0,47.19999694824219L-5.012353195037839,35.096973730773925L-13.251538268661228,45.59169605307234L-14.694915503540031,32.70534988540649L-25.600006103515625,40.87639641572571L-23.37638957336425,28.084588184165966L-36.20387582842581,33.375437914086405L-30.464647263336182,21.550102606658925L-44.34051124536243,23.599998474121094L-35.47700045837402,13.546871124114993L-49.45541409708704,12.216258138985935L-38.071305076904295,4.620761701240539Z",Star32Point:"M-54,0L-40.30479,-3.52872L-52.96266,-9.36432L-38.75607,-10.45008L-49.889520000000005,-18.368640000000003L-35.71776,-16.9704L-44.89938,-26.667360000000002L-31.306905,-22.838040000000007L-38.18376618407357,-33.94112549695428L-25.692795000000004,-27.828360000000004L-30.00078,-39.910560000000004L-19.091700000000003,-31.749120000000005L-20.664719999999996,-44.34624L-11.756339999999994,-34.44984L-10.534859999999995,-47.077920000000006L-3.9698099999999954,-35.82648L0,-48L3.9698100000000025,-35.82648L10.534860000000009,-47.077920000000006L11.756340000000009,-34.44984L20.664720000000003,-44.34624L19.091700000000003,-31.749120000000005L30.000780000000006,-39.910560000000004L25.692795000000004,-27.828360000000004L38.183766184073576,-33.94112549695428L31.306905000000015,-22.838040000000007L44.89938000000001,-26.667360000000002L35.71776000000001,-16.9704L49.889520000000005,-18.368640000000003L38.75607000000001,-10.45008L52.962660000000014,-9.36432L40.30479000000001,-3.52872L54,0L40.30479000000001,3.52872L52.962660000000014,9.36432L38.75607000000001,10.45008L49.889520000000005,18.36864L35.71776000000001,16.970399999999998L44.89938000000001,26.667359999999988L31.306905000000015,22.838039999999992L38.183766184073576,33.941125496954285L25.692795000000004,27.828360000000004L30.000780000000006,39.91055999999999L19.091700000000003,31.749120000000005L20.664720000000003,44.346239999999995L11.756340000000009,34.449839999999995L10.534860000000009,47.077920000000006L3.9698100000000025,35.826480000000004L0,48L-3.9698099999999954,35.826480000000004L-10.534859999999995,47.077920000000006L-11.756339999999994,34.449839999999995L-20.664719999999996,44.346239999999995L-19.091700000000003,31.749120000000005L-30.00078,39.91055999999999L-25.692795000000004,27.828360000000004L-38.18376618407357,33.941125496954285L-31.306905,22.838039999999992L-44.89938,26.667359999999988L-35.71776,16.970399999999998L-49.889520000000005,18.36864L-38.75607,10.45008L-52.96266,9.36432L-40.30479,3.52872Z",UpRibbon:"M 1741 1075 l 205 461 h -717 v -205 h -410 v 205 h -717 l 205 -461 l -205 -461 h 410 v -204 h 1024 v 204 h 410 m -512 615 v -717 h -820 v 717 m -102 -512 h -252 l 159 358 l -159 359 h 252 m 1117 -359 l 159 -358 h -252 v 717 h 252 m -1071 -103 h -103 v 103 h 103 m 717 0 v -103 h -103 v 103 z",DownRibbon:"M 1946 410 l -205 460 l 205 461 h -410 v 205 h -1024 v -205 h -410 l 205 -461 l -205 -460 h 717 v 204 h 410 v -204 m -615 307 v 717 h 820 v -717 m 102 512 h 252 l -159 -359 l 159 -358 h -252 m -1117 358 l -159 359 h 252 v -717 h -252 m 1174 0 h -103 v 102 h 103 m -820 -102 v 102 h 103 v -102 z",CurvedUpRibbon:"M 1741 1075 l 205 666 q -62 -57 -130 -102 q -29 -19 -62 -38 q -34 -18 -70 -33 q -36 -14 -73 -23 q -38 -9 -75 -9 h -307 v -256 q 0 -10 -16 -20 q -16 -9 -44 -16 q -28 -7 -65 -11 q -38 -4 -80 -4 q -42 0 -79 4 q -38 4 -66 11 q -28 7 -44 16 q -16 10 -16 20 v 256 h -307 q -38 0 -75 9 q -38 9 -74 23 q -36 15 -69 33 q -33 19 -62 38 q -69 45 -130 102 l 205 -666 l -205 -461 q 60 -75 122 -117 q 62 -41 119 -62 q 56 -20 104 -25 q 47 -4 78 -4 q 19 -43 65 -80 q 45 -37 111 -64 q 66 -27 149 -42 q 82 -15 174 -15 q 92 0 175 15 q 82 15 148 42 q 66 27 112 64 q 45 37 64 80 q 31 0 79 4 q 47 5 104 25 q 56 21 118 62 q 62 42 122 117 m -1659 876 q 116 -56 225 -56 v -926 l -8 -1 q -21 0 -51 4 q -30 4 -65 16 q -35 12 -73 34 q -39 22 -78 58 l 184 456 m 296 256 h -103 v 103 h 103 m 307 -308 q 72 0 124 8 q 52 9 87 23 q 35 15 55 33 q 20 19 30 39 h 114 v -773 l -4 -9 q -9 -21 -41 -46 q -32 -24 -83 -45 q -52 -21 -123 -35 q -71 -14 -159 -14 q -88 0 -159 14 q -71 14 -123 35 q -52 21 -83 45 q -32 25 -41 46 l -4 9 v 773 h 114 q 10 -20 30 -39 q 20 -18 55 -33 q 35 -14 87 -23 q 52 -8 124 -8 m 410 308 v -103 h -103 v 103 m 296 -380 l 184 -435 q -39 -36 -77 -58 q -39 -22 -74 -34 q -35 -12 -64 -16 q -30 -4 -51 -4 h -9 v 927 q 109 0 225 56 z",CurvedDownRibbon:"M 307 870 l -205 -665 q 61 58 130 103 q 29 19 62 37 q 33 19 69 33 q 36 14 74 23 q 37 9 75 9 h 307 v 256 q 0 11 16 20 q 16 9 44 16 q 28 7 66 11 q 37 4 79 4 q 42 0 80 -4 q 37 -4 65 -11 q 28 -7 44 -16 q 16 -9 16 -20 v -256 h 307 q 37 0 75 -9 q 37 -9 73 -23 q 36 -14 70 -33 q 33 -18 62 -37 q 68 -45 130 -103 l -205 665 l 205 461 q -55 69 -112 110 q -57 41 -110 63 q -54 23 -100 30 q -47 7 -80 7 q -6 0 -11 -1 q -5 0 -10 0 q -19 43 -64 80 q -46 37 -112 64 q -66 27 -148 42 q -83 15 -175 15 q -92 0 -174 -15 q -83 -15 -149 -42 q -66 -27 -111 -64 q -46 -37 -65 -80 q -5 0 -10 0 q -6 1 -11 1 q -33 0 -79 -7 q -47 -7 -100 -30 q -54 -22 -111 -63 q -57 -41 -112 -110 m 1659 -875 q -120 56 -225 56 v 926 h 8 q 21 0 51 -4 q 30 -4 65 -16 q 35 -12 74 -34 q 38 -22 77 -58 l -184 -456 m -296 -256 h 103 v -102 h -103 m -307 307 q -72 0 -124 -9 q -52 -8 -87 -22 q -35 -14 -55 -33 q -20 -18 -30 -38 h -114 v 773 l 4 9 q 9 21 41 45 q 31 25 83 45 q 52 21 123 35 q 71 14 159 14 q 88 0 159 -14 q 71 -14 123 -35 q 51 -20 83 -45 q 32 -24 41 -45 l 4 -9 v -773 h -114 q -10 20 -30 38 q -20 19 -55 33 q -35 14 -87 22 q -52 9 -124 9 m -410 -307 v 102 h 103 v -102 m -296 380 l -184 434 q 39 36 78 58 q 38 22 73 34 q 35 12 65 16 q 29 4 50 4 h 9 v -926 q -105 0 -225 -56 z",VerticalScroll:"M 1690 102 q 53 0 100 20 q 46 20 81 55 q 35 35 55 81 q 20 47 20 100 q 0 53 -20 100 q -20 47 -55 81 q -35 35 -81 55 q -47 20 -100 20 h -52 v 1178 q 0 32 -12 60 q -12 28 -32 49 q -21 21 -49 33 q -28 12 -60 12 h -1178 q -42 0 -79 -17 q -38 -16 -65 -44 q -28 -27 -44 -65 q -17 -37 -17 -79 q 0 -42 17 -80 q 16 -37 44 -65 q 27 -28 65 -44 q 37 -16 79 -16 h 103 v -1280 q 0 -32 12 -60 q 12 -28 33 -49 q 20 -21 48 -33 q 28 -12 60 -12 m 51 308 q 0 -41 16 -78 q 15 -36 42 -64 q 26 -28 62 -45 q 35 -16 76 -18 h -247 q -21 0 -36 15 q -15 15 -15 36 v 1587 h 973 q 21 0 36 -15 q 15 -15 15 -36 v -1178 h -717 q -42 0 -79 -16 q -38 -16 -66 -44 q -28 -27 -44 -65 q -16 -37 -16 -79 m 1076 102 q 31 0 59 -12 q 28 -12 49 -33 q 21 -21 33 -49 q 12 -28 12 -60 q 0 -31 -12 -59 q -12 -28 -33 -49 q -21 -21 -49 -33 q -28 -12 -59 -12 h -863 q 41 2 77 18 q 36 17 63 45 q 26 28 42 64 q 15 37 15 78 q 0 28 -7 53 q -7 26 -20 49 m -587 1126 h -103 q -21 0 -39 8 q -19 8 -33 22 q -14 14 -22 33 q -8 19 -8 40 q 0 21 8 39 q 8 19 22 33 q 14 14 33 22 q 18 8 39 8 h 103 m 409 -1331 q 21 0 40 -8 q 19 -8 33 -22 q 14 -14 22 -33 q 8 -18 8 -39 q 0 -21 -8 -40 q -8 -19 -22 -33 q -14 -14 -33 -22 q -19 -8 -40 -8 q -21 0 -39 8 q -19 8 -33 22 q -14 14 -22 33 q -8 19 -8 40 q 0 21 8 39 q 8 19 22 33 q 14 14 33 22 q 18 8 39 8 z",HorizontalScroll:"M 1741 102 q 42 0 80 16 q 37 17 65 44 q 27 28 44 65 q 16 38 16 80 v 1178 q 0 32 -12 60 q -12 28 -33 48 q -21 21 -49 33 q -28 12 -60 12 h -1178 v 52 q 0 53 -20 99 q -20 47 -54 82 q -35 35 -82 55 q -47 20 -100 20 q -53 0 -99 -20 q -47 -20 -82 -55 q -35 -35 -55 -82 q -20 -46 -20 -99 v -1127 q 0 -32 12 -60 q 12 -28 33 -49 q 21 -20 49 -32 q 28 -12 60 -12 h 1280 v -103 q 0 -42 16 -80 q 16 -37 44 -65 q 28 -27 66 -44 q 37 -16 79 -16 m 102 410 h -1587 q -21 0 -36 15 q -15 15 -15 36 v 248 q 1 -41 18 -77 q 17 -36 45 -63 q 27 -26 64 -42 q 37 -15 78 -15 q 42 0 80 16 q 37 16 65 44 q 27 28 43 65 q 16 38 16 80 v 717 h 1178 q 21 0 36 -15 q 15 -15 15 -36 m -1433 -461 q -41 0 -78 -16 q -37 -15 -64 -42 q -28 -26 -45 -62 q -17 -35 -18 -76 v 862 q 0 32 12 59 q 12 28 33 49 q 21 21 49 33 q 27 12 59 12 q 32 0 60 -12 q 28 -12 49 -33 q 21 -21 33 -49 q 12 -27 12 -59 v -693 q -23 13 -48 20 q -26 7 -54 7 m 1433 -717 q 0 -21 -8 -40 q -8 -18 -22 -32 q -14 -14 -32 -22 q -19 -8 -40 -8 q -21 0 -40 8 q -19 8 -33 22 q -14 14 -22 32 q -8 19 -8 40 v 103 h 205 m -1331 409 q 0 -21 -8 -40 q -8 -18 -22 -32 q -14 -14 -32 -22 q -19 -8 -40 -8 q -21 0 -40 8 q -19 8 -33 22 q -14 14 -22 32 q -8 19 -8 40 q 0 21 8 40 q 8 19 22 33 q 14 14 33 22 q 19 8 40 8 q 21 0 40 -8 q 18 -8 32 -22 q 14 -14 22 -33 q 8 -19 8 -40 z",Wave:"M 1383 1894 q -42 0 -84 -8 q -43 -7 -77 -16 q -34 -9 -55 -17 q -22 -7 -23 -7 q -8 -5 -26 -17 q -18 -11 -39 -25 q -21 -13 -41 -27 q -20 -13 -32 -24 l -38 -33 q -40 -35 -89 -76 q -49 -41 -106 -77 q -58 -35 -123 -59 q -66 -23 -138 -23 q -68 0 -122 10 q -55 10 -99 27 q -44 17 -78 39 q -34 23 -59 47 v -1275 q 24 -16 77 -47 q 52 -30 126 -59 q 73 -29 165 -51 q 91 -22 195 -22 q 72 0 130 17 q 57 18 104 47 q 46 29 85 65 q 38 37 74 75 q 35 39 70 75 q 34 37 72 66 q 38 29 83 46 q 44 18 99 18 q 78 0 147 -24 q 69 -23 127 -59 q 57 -36 104 -80 q 47 -44 82 -85 v 1356 q -16 18 -57 55 q -41 38 -105 75 q -64 37 -149 65 q -86 28 -191 28 z",DoubleWave:"M 1690 1894 q -58 0 -100 -19 q -42 -19 -75 -48 q -33 -28 -62 -61 q -29 -33 -61 -62 q -32 -28 -71 -47 q -39 -19 -92 -19 q -51 0 -92 19 q -42 19 -77 47 q -35 29 -65 62 q -30 33 -59 61 q -29 29 -57 48 q -29 19 -60 19 q -35 0 -73 -19 q -39 -19 -79 -48 q -40 -28 -80 -61 q -40 -33 -79 -62 q -40 -28 -78 -47 q -38 -19 -72 -19 q -26 0 -52 10 q -27 11 -53 27 q -27 17 -52 38 q -25 22 -47 44 v -1480 q 19 -20 45 -42 q 26 -21 54 -39 q 27 -18 55 -30 q 27 -12 50 -12 q 24 0 55 19 q 31 19 67 47 q 36 29 77 62 q 41 33 84 61 q 43 29 88 48 q 45 19 90 19 q 48 0 87 -19 q 38 -19 71 -48 q 33 -28 63 -61 q 29 -33 59 -62 q 30 -28 62 -47 q 31 -19 68 -19 q 36 0 68 19 q 31 19 63 47 q 31 29 64 62 q 33 33 72 61 q 39 29 87 48 q 47 19 107 19 q 70 0 120 -17 q 50 -16 84 -40 v 1477 q -5 6 -17 17 q -12 11 -35 21 q -24 11 -61 18 q -37 8 -91 8 z",MathPlus:"M 1894 1280 h -614 v 614 h -512 v -614 h -614 v -512 h 614 v -614 h 512 v 614 h 614 z",MathMinus:"M 154 768 h 1740 v 512 h -1740 z",MathMultiply:"M 1409 1771 l -435 -435 l -434 435 l -362 -362 l 434 -435 l -434 -434 l 362 -362 l 434 434 l 435 -434 l 362 362 l -435 434 l 435 435 z",MathDivision:"M 1024 1792 q -32 0 -60 -12 q -28 -12 -49 -33 q -21 -21 -33 -49 q -12 -28 -12 -60 q 0 -31 12 -59 q 12 -28 33 -49 q 21 -21 49 -33 q 28 -12 60 -12 q 32 0 60 12 q 28 12 49 33 q 21 21 33 49 q 12 28 12 59 q 0 32 -12 60 q -12 28 -33 49 q -21 21 -49 33 q -28 12 -60 12 m 0 -1229 q -32 0 -60 -12 q -28 -12 -49 -33 q -21 -21 -33 -49 q -12 -27 -12 -59 q 0 -32 12 -60 q 12 -28 33 -49 q 21 -21 49 -33 q 28 -12 60 -12 q 32 0 60 12 q 28 12 49 33 q 21 21 33 49 q 12 28 12 60 q 0 32 -12 59 q -12 28 -33 49 q -21 21 -49 33 q -28 12 -60 12 m -870 205 h 1740 v 512 h -1740 z",MathEqual:"M 154 358 h 1740 v 512 h -1740 m 0 205 h 1740 v 512 h -1740 z",MathNotEqual:"M 1372 870 l -136 205 h 658 v 512 h -1000 l -205 307 h -389 l 205 -307 h -351 v -512 h 693 l 136 -205 h -829 v -512 h 1170 l 137 -204 h 389 l -137 204 h 181 v 512 z",RoundedRectangle:"M 20,0 h 160 a 20,20 0 0 1 20,20 v 60 a 20,20 0 0 1 -20,20 h -160 a 20,20 0 0 1 -20,-20 v -60 a 20,20 0 0 1 20,-20 z",SnipSingleCornerRectangle:"M 154 1690 v -1332 h 1258 l 482 482 v 850 z",SnipSameSideCornerRectangle:"M 154 1690 v -850 l 482 -482 h 776 l 482 482 v 850 z",SnipDiagonalCornerRectangle:"M 636 1690 l -482 -482 v -850 h 1258 l 482 482 v 850 z",SnipAndRoundSingleCornerRectangle:"M 154 1690 v -1029 q 0 -63 24 -118 q 24 -55 65 -96 q 41 -41 96 -65 q 55 -24 117 -24 h 956 l 482 482 v 850 z",RoundSingleCornerRectangle:"M 154 1690 v -1332 h 1438 q 62 0 117 24 q 55 24 96 65 q 41 41 65 96 q 24 55 24 118 v 1029 z",RoundSameSideCornerRectangle:"M 154 1690 v -1029 q 0 -63 24 -118 q 24 -55 65 -96 q 41 -41 96 -65 q 55 -24 117 -24 h 1136 q 62 0 117 24 q 55 24 96 65 q 41 41 65 96 q 24 55 24 118 v 1029 z",RoundDiagonalCornerRectangle:"M 200 0 L 1800 0 L 1800 1300 A 200 200 0 0 1 1600 1500 L 0 1500 L 0 200 A 200 200 0 0 1 200 0 Z"},this.documentHelper=e}var gg=function(){this.printDevicePixelRatio=1,this.collaborativeEditingSettings={roomName:"",editableRegionColor:"#22b24b",lockedRegionColor:"#f44336"},this.showBookmarks=!1,this.highlightEditableRanges=!0,this.commentSettings={highlightCommentsByAuthor:!1},this.searchHighlightColor="#FFE97F",this.formFieldSettings={shadingColor:"#cfcfcf",applyShading:!0,selectionColor:"#cccccc",formFillingMode:"Popup"},this.showHiddenMarks=!1,this.revisionSettings={customData:"",showCustomDataWithAuthor:!1,revisionColors:["#b5082e","#0e76b1","#bb00ff","#c14f16","#128317","#881824","#a26400","#50565e"],insertRevisionColor:"byAuthor",deleteRevisionColor:"byAuthor",insertedRowColor:"byAuthor",deletedRowColor:"byAuthor"},this.openAsyncSettings={enable:!1,initialPageLoadCount:5,incrementalPageLoadCount:3},this.defaultCheckBoxOption="Tick",this.allowHyphensInBookmarkNames=!1},pg=function(){this.compatibilityMode="Word2013"},ug=function(){},fg=(n.prototype.getNextParagraphBlock=function(e){return e.nextRenderedWidget instanceof Z?e.nextRenderedWidget:e.nextRenderedWidget instanceof Q?this.owner.getFirstParagraphInFirstCell(e.nextRenderedWidget):e.containerWidget instanceof ee?this.getNextParagraphCell(e.containerWidget):e.containerWidget instanceof Y?this.getNextParagraph(e.containerWidget):e.containerWidget instanceof X&&this.isMoveDownOrMoveUp?this.getFirstBlockInNextHeaderFooter(e):void 0},n.prototype.getNextParagraphCell=function(e){if(e.nextRenderedWidget&&e.nextRenderedWidget instanceof ee){if(e.rowIndex!==e.nextRenderedWidget.rowIndex)return e=e.nextRenderedWidget,this.getNextParagraphCell(e);if((e=e.nextRenderedWidget).getSplitWidgets()[0]instanceof ee)for(var t=0,i=e.getSplitWidgets();t<i.length;t++)if((e=i[t]).firstChild)break;var r=e.firstChild;return r?this.owner.getFirstParagraphBlock(r):this.getNextParagraphCell(e)}return e.nextSplitWidget&&0===e.nextSplitWidget.childWidgets.length&&(e=e.getSplitWidgets().pop()),this.getNextParagraphRow(e.containerWidget)},n.prototype.getNextParagraph=function(e){if(e.nextRenderedWidget instanceof Y)return e=e.nextRenderedWidget.childWidgets[0],this.owner.getFirstParagraphBlock(e)},n.prototype.getFirstBlockInNextHeaderFooter=function(e){var t,e=e.containerWidget;if(-1!==e.headerFooterType.indexOf("Header"))t=e.page.footerWidget.firstChild;else{if(!e.page.nextPage)return;var e=e.page.nextPage,i=e.headerWidget;(i.page=e).footerWidget&&(e.footerWidget.page=e),t=i.firstChild}return t instanceof Z?t:this.getFirstBlockInFirstCell(t)},n.prototype.getNextParagraphRow=function(e){if(G.isNullOrUndefined(e.nextRenderedWidget))return this.getNextParagraphBlock(e.ownerTable);for(var t=e.nextRenderedWidget.childWidgets[0];0===t.childWidgets.length&&!G.isNullOrUndefined(t.previousSplitWidget)&&!G.isNullOrUndefined(t.nextRenderedWidget)&&t.nextRenderedWidget instanceof ee;)t=t.nextRenderedWidget;e=t.childWidgets[0];return G.isNullOrUndefined(e)?this.getNextParagraphCell(t):this.owner.getFirstParagraphBlock(e)},n.prototype.getFirstBlockInFirstCell=function(e){if(0<e.childWidgets.length)for(var t=e.childWidgets[0],i=0;i<t.childWidgets.length;i++){var r=t.childWidgets[i];if(0<r.childWidgets.length)return r.childWidgets[0]}},n.prototype.getLastParagraph=function(e){for(;e.nextSplitWidget&&0<e.nextSplitWidget.childWidgets.length;)e=e.nextSplitWidget;var t=void 0;return 0<e.childWidgets.length?t=e.lastChild:G.isNullOrUndefined(e.previousSplitWidget)||(t=e.previousSplitWidget.lastChild),this.owner.getLastParagraphBlock(t)},n.prototype.getFieldCode=function(e,t){var i="";if(!(G.isNullOrUndefined(e)||e.fieldEnd instanceof te))return i;for(var r=e.paragraph,n=e.fieldEnd.paragraph,o=(e.fieldSeparator instanceof te&&(n=e.fieldSeparator.paragraph),e.line.indexInOwner),a=e.indexInOwner;i+=this.getFieldCodeInternal(r,o,a),r!==n&&(a=o=0,(r=this.getNextParagraphBlock(r))instanceof Z););return t?i:i.trim()},n.prototype.getFieldCodeInternal=function(e,t,i){for(var r="",n=t;n<e.childWidgets.length;n++){for(var o=e.childWidgets[n],a=i;a<o.children.length;a++){var s=o.children[a];if(s instanceof ie&&(r+=s.text),s instanceof te&&(2===s.fieldType||1===s.fieldType))return r}i=0}return r},n.prototype.getEndPosition=function(e){var t=e.x,i=e.y,r=void 0,r=(0<e.childWidgets.length&&(r=e.childWidgets[e.childWidgets.length-1],e.paragraphFormat.bidi?t=this.getLeft(r):t+=this.getWidth(r,!1)),G.isNullOrUndefined(r)||(i=this.getTop(r)),this.getParagraphMarkSize(e,0,0));return new Ks(t,i+r.topMargin)},n.prototype.getLeft=function(e){for(var t=e.paragraph.x,i=e.paragraph.paragraphFormat,r=(this.isParagraphFirstLine(e)&&!i.bidi&&"Right"!==i.textAlignment&&(t+=K.convertPointToPixel(i.firstLineIndent)),e.renderedElements),n=0;n<r.length;n++){var o=r[n];if(!(o instanceof se)||i.bidi){t+=o.margin.left;break}0===n?(t+=o.margin.left+o.width,o.padding&&(t+=o.padding.left)):t+=o.width}return t},n.prototype.getWidth=function(e,t){var i=0,r=e.paragraph.paragraphFormat;this.isParagraphFirstLine(e)&&!r.bidi&&(i+=K.convertPointToPixel(r.firstLineIndent));for(var n=0;n<e.children.length;n++){var o=e.children[n];o instanceof re&&"Inline"!==o.textWrappingStyle||(i+=o.margin.left+o.width+o.padding.left)}return t&&e.paragraph.childWidgets.indexOf(e)===e.paragraph.childWidgets.length-1&&G.isNullOrUndefined(e.paragraph.nextSplitWidget)&&(i+=this.owner.textHelper.getParagraphMarkWidth(e.paragraph.characterFormat)),i},n.prototype.getTop=function(e){if(G.isNullOrUndefined(e)||G.isNullOrUndefined(e.paragraph))return 0;for(var t=e.paragraph.y,i=e.paragraph.childWidgets.indexOf(e),r=0;r<i;r++)var n=e.paragraph.childWidgets[r],t=t+n.height+n.marginTop;return t+=e.marginTop},n.prototype.getParagraphMarkSize=function(e,t,i){var r,n,o=this.owner.textHelper.getParagraphMarkSize(e.characterFormat),a=o.BaselineOffset,s=o.Height,l=a;return e instanceof Z&&(0<e.childWidgets.length&&e.childWidgets[0],r=this.owner.layout.getLineSpacing(e,s),n=this.owner.layout.getBeforeSpacing(e),t=l-a,i=s-l-(o.Height-a),"Multiple"===(l=e.paragraphFormat.lineSpacingType)?s<r?i+=r-s:t+=r-s:("Exactly"===l||r>t+o.Height+i)&&(t+=r-(t+o.Height+i)),t+=n,i+=this.owner.layout.getAfterSpacing(e)),{width:o.Width,height:o.Height,topMargin:t,bottomMargin:i}},n.prototype.isParagraphFirstLine=function(e){return!(!G.isNullOrUndefined(e.paragraph.previousSplitWidget)||e!==e.paragraph.firstChild)},n.prototype.getFirstParagraph=function(e){for(;e.previousSplitWidget&&0<e.previousSplitWidget.childWidgets.length;)e=e.previousSplitWidget;var t=e.firstChild;return this.owner.getFirstParagraphBlock(t)},n.prototype.getContainerWidget=function(e){var t;if(e.containerWidget instanceof P)t=e.containerWidget.containerShape.line.paragraph.bodyWidget;else if(e.containerWidget instanceof Vl)t=(!G.isNullOrUndefined(e.containerWidget.containerWidget)&&e.containerWidget.containerWidget instanceof J?e.containerWidget:e).containerWidget;else for(t=e.containerWidget;!(t instanceof Vl||(t instanceof P&&(t=t.containerShape.line.paragraph),G.isNullOrUndefined(t))||G.isNullOrUndefined(t.containerWidget));)t=t.containerWidget;return t},n.prototype.getNextRenderedBlock=function(e){return G.isNullOrUndefined(e.nextWidget)?e.nextRenderedWidget:e.nextWidget},n.prototype.isRenderBookmarkAtEnd=function(e){var t,i=1===e.bookmarkType?e.reference:e;return!(!i||!G.isNullOrUndefined(i.properties)||(t=i.reference?i.reference.paragraph.associatedCell:void 0,G.isNullOrUndefined(t))||(i=(i=i.reference?i.reference.paragraph.associatedCell.ownerRow:void 0)?i.childWidgets[i.childWidgets.length-1]:void 0,G.isNullOrUndefined(i))||(t!==i||1===e.bookmarkType&&!G.isNullOrUndefined(e.line)&&e.line.children.indexOf(e)!==e.line.children.length-1))},n.prototype.addSelectionHighlight=function(e,t,i,r){if(this.selectedWidgets.containsKey(t)){var n=this.owner.render.getScaledValue(t.height),o=this.selectedWidgets.get(t),a=void 0;if(o instanceof Zs?(a=[]).push(o):a=o,!G.isNullOrUndefined(a))for(var s=0;s<a.length;s++){var l=a[s],d=this.owner.render.getScaledValue(a[s].width),h=this.owner.render.getScaledValue(a[s].left,1);if(G.isNullOrUndefined(r)&&(r=this.getPage(t.paragraph)),this.clipSelection(r,this.getPageTop(r)),this.isComposingIME)this.renderDashLine(e,r,t,h,i,d,n);else{e.clearRect(h,this.owner.render.getScaledValue(i,2),d,n),e.globalAlpha=.4;var c,g="gray";if(this.owner.documentEditorSettings.commentSettings&&this.owner.documentEditorSettings.commentSettings.highlightCommentsByAuthor&&(c=this.getSelectedCommentHighlightColor(),G.isNullOrUndefined(c)||(g=c)),e.fillStyle=g,e.fillRect(h,this.owner.render.getScaledValue(i,2),d,n),l.floatingItems&&0<l.floatingItems.length)for(var p=0;p<l.floatingItems.length;p++){var u=l.floatingItems[p],d=this.owner.render.getScaledValue(u.width),h=this.owner.render.getScaledValue(u.x,1),f=this.owner.render.getScaledValue(u.y,2);e.fillRect(h,f,d,this.owner.render.getScaledValue(u.height))}}e.restore()}}},n.prototype.addSelectionHighlightTable=function(e,t,i){if(this.selectedWidgets.containsKey(t)){var r=this.selectedWidgets.get(t),n=void 0;if(r instanceof Zs?(n=[]).push(r):n=r,!G.isNullOrUndefined(n))for(var o=0;o<n.length;o++){var a=this.owner.render.getScaledValue(n[o].left,1),s=this.owner.render.getScaledValue(t.y,2),l=this.owner.render.getScaledValue(n[o].width),d=this.owner.render.getScaledValue(t.height);e.clearRect(a,s,l,d),e.fillStyle="gray",G.isNullOrUndefined(i)&&(i=this.getPage(t)),this.clipSelection(i,this.getPageTop(i)),e.fillRect(a,s,l,d),e.restore()}}},n.prototype.getPage=function(e){var t,i=void 0;return e.containerWidget instanceof P?(t=e.containerWidget.containerShape).line&&(i=this.getPage(t.line.paragraph)):e.containerWidget instanceof Vl?(e.containerWidget,i=e.containerWidget.page):G.isNullOrUndefined(e.containerWidget)||(i=this.getPage(e.containerWidget)),i},n.prototype.clipSelection=function(e,t){var i,r=this.owner.viewer instanceof Nl&&this.owner.zoomFactor<1?(i=e.boundingRectangle.width/this.owner.zoomFactor,e.boundingRectangle.height/this.owner.zoomFactor):(i=e.boundingRectangle.width*this.owner.zoomFactor,e.boundingRectangle.height*this.owner.zoomFactor),e=e.boundingRectangle.x;this.owner.selectionContext.beginPath(),this.owner.selectionContext.save(),this.owner.selectionContext.rect(e-this.owner.viewer.containerLeft,t-this.owner.viewer.containerTop,i,r),this.owner.selectionContext.clip()},n.prototype.getSelectedCommentHighlightColor=function(){var e;return this.isCommentSelected&&(e=this.currentSelectedComment)&&e.author?(e=this.owner.getAuthorColor(e.author),this.owner.convertColorToRGBA(e,.6)):null},n.prototype.getPageTop=function(e){return G.isNullOrUndefined(e.boundingRectangle)?0:(e.boundingRectangle.y-this.owner.viewer.pageGap*(this.owner.pages.indexOf(e)+1))*this.owner.zoomFactor+this.owner.viewer.pageGap*(this.owner.pages.indexOf(e)+1)},n.prototype.renderDashLine=function(e,t,i,r,n,o,a){var s=this.owner.characterFormat.fontColor,s=s?K.getColor(s):"#000000",l=(e.globalAlpha=1,this.copyInsertFormat(new ce(void 0,this.owner),!1)),l=this.owner.textHelper.getHeight(l),t=this.getPageTop(t),l=l.Height-l.BaselineOffset;n=this.owner.render.getUnderlineYPosition(i)+n+4-l,this.owner.render.renderDashLine(e,r,t-this.owner.viewer.containerTop+n*this.owner.zoomFactor,o,s,!0)},n.prototype.getNextTextElement=function(e){return e.nextNode instanceof ie?e.nextNode:G.isNullOrUndefined(e.nextNode)?void 0:this.getNextTextElement(e.nextNode)},n.prototype.getPreviousTextElement=function(e){return e.previousNode instanceof ie?e.previousNode:G.isNullOrUndefined(e.previousNode)?void 0:this.getPreviousTextElement(e.previousNode)},n.prototype.getPreviousParagraphBlock=function(e,t){return e.previousRenderedWidget instanceof Z?e.previousRenderedWidget:e.previousRenderedWidget instanceof Q?this.owner.getLastParagraphInLastCell(e.previousRenderedWidget):e.containerWidget instanceof ee?this.getPreviousParagraphCell(e.containerWidget):e.containerWidget instanceof Y?this.getPreviousParagraph(e.containerWidget):e.containerWidget instanceof X&&this.isMoveDownOrMoveUp&&!t?this.getLastBlockInPreviousHeaderFooter(e):void 0},n.prototype.getPreviousParagraphCell=function(e){var t;return!G.isNullOrUndefined(e.previousRenderedWidget)&&e.previousRenderedWidget instanceof ee?(t=(e=e.previousRenderedWidget).lastChild,this.owner.getLastParagraphBlock(t)):this.getPreviousParagraphRow(e.ownerRow)},n.prototype.getPreviousParagraphRow=function(e){return G.isNullOrUndefined(e.previousRenderedWidget)?this.getPreviousParagraphBlock(e.ownerTable):(e=(e=e.previousRenderedWidget.lastChild).lastChild||e.previousSplitWidget.lastChild,this.owner.getLastParagraphBlock(e))},n.prototype.getPreviousParagraph=function(e){if(e.previousRenderedWidget instanceof Y)return e=(e=e.previousRenderedWidget).childWidgets[e.childWidgets.length-1],this.owner.getLastParagraphBlock(e)},n.prototype.getLastBlockInPreviousHeaderFooter=function(e){var t,e=e.containerWidget;if(-1!==e.headerFooterType.indexOf("Footer"))t=e.page.headerWidget.lastChild;else{if(!e.page.previousPage)return;var e=e.page.previousPage,i=e.footerWidget;(i.page=e).headerWidget&&(e.headerWidget.page=e),t=i.lastChild}return t instanceof Z?t:this.getFirstBlockInFirstCell(t)},n.prototype.isTocStyle=function(e){e=e.paragraphFormat.baseStyle;return void 0!==e&&-1!==e.name.toLowerCase().indexOf("toc")},n.prototype.constructRevisionsForTable=function(e,t){for(var i=0;i<e.childWidgets.length;i++){var r=e.childWidgets[i];if(t){this.canConstructRevision(r.rowFormat)&&this.constructRevisionFromID(r.rowFormat);for(var n=0;n<r.childWidgets.length;n++)for(var o=r.childWidgets[n],a=0;a<o.childWidgets.length;a++)o.childWidgets[a]instanceof Z?this.constructRevisionsForBlock(o.childWidgets[a],t):o.childWidgets[a]instanceof Q&&this.constructRevisionsForTable(o.childWidgets[a],!0)}}},n.prototype.canConstructRevision=function(e){return!!(0<e.revisionLength&&(G.isNullOrUndefined(e.getRevision(0).ownerNode)||0===e.getRevision(0).getRange().length)||0<e.removedIds.length)},n.prototype.constructRevisionsForBlock=function(e,t){for(var i=0;i<e.childWidgets.length;i++)for(var r=e.childWidgets[i],n=0;n<r.children.length;n++)t&&(r.children[n]instanceof ld&&this.canConstructRevision(r.children[n])&&this.constructRevisionFromID(r.children[n]),r.children[n]instanceof Sd)&&this.constructRevisionForFootnote(r.children[n],t);this.canConstructRevision(e.characterFormat)&&this.constructRevisionFromID(e.characterFormat)},n.prototype.constructRevisionForFootnote=function(e,t){for(var i=0;i<e.bodyWidget.childWidgets.length;i++)e.bodyWidget.childWidgets[i]instanceof Z&&this.constructRevisionsForBlock(e.bodyWidget.childWidgets[i],t)},n.prototype.constructRevisionFromID=function(e){if(0<e.removedIds.length){for(var t,i=0;i<e.removedIds.length;i++)this.owner.revisionsInternal.containsKey(e.removedIds[i])&&((t=this.owner.revisionsInternal.get(e.removedIds[i])).ownerNode=e instanceof ld?e.paragraph:e,e.addRevision(t),G.isNullOrUndefined(this.owner.hooks.onRevisionConstructed)||this.owner.hooks.onRevisionConstructed(t,e));e.removedIds=[]}else for(i=0;i<e.revisionLength;i++){var r=e.getRevision(i);this.owner.revisionsInternal.containsKey(r.revisionID)&&((r=this.owner.revisionsInternal.get(r.revisionID)).ownerNode=e instanceof ld?e.paragraph:e,e.removeRevision(i),e.insertRevisionAt(i,r),G.isNullOrUndefined(this.owner.hooks.onRevisionConstructed)||this.owner.hooks.onRevisionConstructed(r,e))}},n.prototype.copyInsertFormat=function(e,t,i){var i=new ce(i||void 0,this.owner),r=this.owner.selectionCharacterFormat;return G.isNullOrUndefined(r)?t?i:e:(t&&i.copyFormat(e),G.isNullOrUndefined(r.bidi)||e.bidi===r.bidi||(i.bidi=r.bidi),G.isNullOrUndefined(r.bold)||e.bold===r.bold||(i.bold=r.bold),G.isNullOrUndefined(r.italic)||e.italic===r.italic||(i.italic=r.italic),0<r.fontSize&&e.fontSize!==r.fontSize&&(i.fontSize=r.fontSize),G.isNullOrUndefined(r.fontFamily)||e.fontFamily===r.fontFamily||(i.fontFamily=r.fontFamily),G.isNullOrUndefined(r.highlightColor)||e.highlightColor===r.highlightColor||(i.highlightColor=r.highlightColor),G.isNullOrUndefined(r.baselineAlignment)||e.baselineAlignment===r.baselineAlignment||(i.baselineAlignment=r.baselineAlignment),G.isNullOrUndefined(r.fontColor)||e.fontColor===r.fontColor||(i.fontColor=r.fontColor),G.isNullOrUndefined(r.underline)||e.underline===r.underline||(i.underline=r.underline),G.isNullOrUndefined(r.strikethrough)||e.strikethrough===r.strikethrough||(i.strikethrough=r.strikethrough),G.isNullOrUndefined(r.boldBidi)||e.boldBidi===r.boldBidi||(i.boldBidi=r.boldBidi),G.isNullOrUndefined(r.italicBidi)||e.italicBidi===r.italicBidi||(i.italicBidi=r.italicBidi),0<r.fontSizeBidi&&e.fontSizeBidi!==r.fontSizeBidi&&(i.fontSizeBidi=r.fontSizeBidi),i)},n.prototype.removeFieldInWidget=function(e,t,i,r){G.isNullOrUndefined(t)&&(t=!1);for(var n=0;n<e.childWidgets.length;n++)this.removeFieldInBlock(e.childWidgets[n],t,i,r)},n.prototype.removeFieldInBlock=function(e,t,i,r){var n;if(e instanceof Q)e.wrapTextAround&&!G.isNullOrUndefined(e.bodyWidget)&&-1!==(n=e.bodyWidget.floatingElements.indexOf(e))&&e.bodyWidget.floatingElements.splice(n,1),this.removeFieldTable(e,t,i,r);else if(e instanceof $)for(var o=0;o<e.childWidgets.length;o++)this.removeFieldInWidget(e.childWidgets[o],t,i,r);else this.removeField(e,t,i,r)},n.prototype.removeFieldTable=function(e,t,i,r){for(var n=0;n<e.childWidgets.length;n++)for(var o=e.childWidgets[n],a=0;a<o.childWidgets.length;a++)this.removeFieldInWidget(o.childWidgets[a],t,i,r)},n.prototype.removeField=function(e,t,i,r){var n=this.owner.fields;if(t?n=this.owner.bookmarks.keys:i&&(n=this.owner.contentControlCollection),0<e.floatingElements.length)for(var o=0;o<e.floatingElements.length;o++){var a=e.floatingElements[o];if(a instanceof ne&&a.textFrame&&0<a.textFrame.childWidgets.length)for(var s=0;s<a.textFrame.childWidgets.length;s++){var l=a.textFrame.childWidgets[s];this.removeFieldInBlock(l,t,i)}this.removeAutoShape(a),o--}for(s=0;s<n.length;s++)((c=t?this.owner.bookmarks.get(n[s]):n[s]).line.paragraph===e||c instanceof Md&&!G.isNullOrUndefined(c.reference)&&c.reference.line.paragraph===e)&&(i?this.owner.contentControlCollection.splice(s,1):(this.owner.fields.splice(s,1),-1!==this.owner.formFields.indexOf(c)&&this.owner.formFields.splice(this.owner.formFields.indexOf(c),1)),s--);if(0<this.owner.footnoteCollection.length)for(s=0;s<this.owner.footnoteCollection.length;s++)if((c=this.owner.footnoteCollection[s]).line.paragraph===e){if(c.paragraph.bodyWidget.page.footnoteWidget){for(var d=c.paragraph.bodyWidget.page.footnoteWidget,h=0;h<d.bodyWidgets.length;h++)c===d.bodyWidgets[h].footNoteReference&&(d.height-=d.bodyWidgets[h].height,d.bodyWidgets.splice(h,1),h--);0===d.bodyWidgets.length&&(c.paragraph.bodyWidget.page.footnoteWidget=void 0)}this.owner.footnoteCollection.splice(s,1),s--}if(0<this.owner.endnoteCollection.length)for(var c,s=0;s<this.owner.endnoteCollection.length;s++)if((c=this.owner.endnoteCollection[s]).line.paragraph===e){if(c.paragraph.bodyWidget.page.endnoteWidget){for(var g=c.paragraph.bodyWidget.page.endnoteWidget,h=0;h<g.bodyWidgets.length;h++)c===g.bodyWidgets[h].footNoteReference&&(g.height-=g.bodyWidgets[h].height,g.bodyWidgets.splice(h,1),h--);0===g.bodyWidgets.length&&(c.paragraph.bodyWidget.page.endnoteWidget=void 0)}this.owner.endnoteCollection.splice(s,1),s--}},n.prototype.removeAutoShape=function(e){var t=e.line.paragraph.floatingElements.indexOf(e),i=e.line.paragraph.bodyWidget.floatingElements.indexOf(e);-1<i&&e.line.paragraph.bodyWidget.floatingElements.splice(i,1),e.line.paragraph.floatingElements.splice(t,1)},n.prototype.destroy=function(){this.owner=void 0},n);function n(e){this.enableHeaderAndFooter=!1,this.isDocumentLoaded=!1,this.currentUser="",this.isRedoing=!1,this.isSelectionChangedOnMouseMoved=!1,this.isEndnoteElementRemoved=!1,this.isFootnoteElementRemoved=!1,this.isFootNoteInsert=!1,this.isPaste=!1,this.isRemoteAction=!1,this.remotePasteRevision=[],this.chartType=!1,this.pasteImageIndex=void 0,this.isLastParaMarkCopied=!1,this.revisionData=void 0,this.isFootNote=!1,this.isAutofitToWindow=!1,this.isDeleteOrBackSpace=!1,this.handledEnter=!1,this.isMeasureParaWidth=!1,this.lastElementForPasteIcon=void 0,this.isTableInsert=!1,this.isInsertingTOC=!1,this.skipChangeDetection=!1,this.enableSpellCheck=!1,this.restrictLayout=!1,this.action=void 0,this.selectedBookmarks=[],this.isMoveDownOrMoveUp=!1,this.editRegionHighlighters=new N,this.contentControls=[],this.contentControleditRegionHighlighters=new N,this.searchHighlighters=new N,this.selectedWidgets=new N,this.formFieldHighlighters=new N,this.isCommentSelected=!1,this.isTableMarkerDragging=!1,this.isComposingIME=!1,this.resizeNode=0,this.resizingRowFormat=void 0,this.hasChanges=!1,this.isCommentEditMode=!1,this.currentSelectedComment=void 0,this.owner=e}var mg=function(o,a,s,l){return new(s=s||Promise)(function(e,t){function i(e){try{n(l.next(e))}catch(e){t(e)}}function r(e){try{n(l.throw(e))}catch(e){t(e)}}function n(t){t.done?e(t.value):new s(function(e){e(t.value)}).then(i,r)}n((l=l.apply(o,a||[])).next())})},yg=function(r,n){var o,a,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(i){return function(e){var t=[i,e];if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,a=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))l.label=t[1];else if(6===t[0]&&l.label<s[1])l.label=s[1],s=t;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(t)}}t=n.call(r,l)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},e=(Object.defineProperty(u.prototype,"element",{get:function(){return this.hostElement||this.elementIn},set:function(e){this.elementIn=e},enumerable:!0,configurable:!0}),u.prototype.getSections=function(){return this.sections},u.prototype.getInsertedRevision=function(){return this.editorProperties.revision},u.prototype.getRevisionItem=function(){return this.editorProperties.revisionItem},Object.defineProperty(u.prototype,"currentRenderingPage",{get:function(){if(0!==this.pages.length)return this.pages[this.pages.length-1]},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"visibleBounds",{get:function(){return this.visibleBoundsIn},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectionCanvas",{get:function(){return G.isNullOrUndefined(this.selectionCanvasIn)&&(this.selectionCanvasIn=document.createElement("canvas"),this.selectionCanvas.getContext("2d").save()),G.isNullOrUndefined(this.pageContainer)||this.selectionCanvasIn.parentElement===this.pageContainer||(this.pageContainer.appendChild(this.selectionCanvasIn),this.syncFormatPainterCursor(this.selectionCanvasIn)),this.selectionCanvasIn},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"containerCanvas",{get:function(){return G.isNullOrUndefined(this.containerCanvasIn)&&(this.containerCanvasIn=document.createElement("canvas"),this.containerCanvasIn.getContext("2d").save()),G.isNullOrUndefined(this.pageContainer)||this.containerCanvasIn.parentElement===this.pageContainer||(this.pageContainer.appendChild(this.containerCanvasIn),this.syncFormatPainterCursor(this.containerCanvasIn)),this.containerCanvasIn},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"selectionContext",{get:function(){return this.selectionCanvas.getContext("2d")},enumerable:!0,configurable:!0}),u.prototype.initalizeStyles=function(){this.preDefinedStyles.add("Normal",'{"type":"Paragraph","name":"Normal","next":"Normal"}'),this.preDefinedStyles.add("Heading 1",'{"type":"Paragraph","name":"Heading 1","basedOn":"Normal","next":"Normal","link":"Heading 1 Char","characterFormat":{"fontSize":16.0,"fontFamily":"Calibri Light","fontColor":"#2F5496"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":12.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level1"}}'),this.preDefinedStyles.add("Heading 2",'{"type":"Paragraph","name":"Heading 2","basedOn":"Normal","next":"Normal","link":"Heading 2 Char","characterFormat":{"fontSize":13.0,"fontFamily":"Calibri Light","fontColor":"#2F5496"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level2"}}'),this.preDefinedStyles.add("Heading 3",'{"type":"Paragraph","name":"Heading 3","basedOn":"Normal","next":"Normal","link":"Heading 3 Char","characterFormat":{"fontSize":12.0,"fontFamily":"Calibri Light","fontColor":"#1F3763"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level3"}}'),this.preDefinedStyles.add("Heading 4",'{"type":"Paragraph","name":"Heading 4","basedOn":"Normal","next":"Normal","link":"Heading 4 Char","characterFormat":{"italic":true,"fontFamily":"Calibri Light","fontColor":"#2F5496"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level4"}}'),this.preDefinedStyles.add("Heading 5",'{"type":"Paragraph","name":"Heading 5","basedOn":"Normal","next":"Normal","link":"Heading 5 Char","characterFormat":{"fontFamily":"Calibri Light","fontColor":"#2F5496"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level5"}}'),this.preDefinedStyles.add("Heading 6",'{"type":"Paragraph","name":"Heading 6","basedOn":"Normal","next":"Normal","link":"Heading 6 Char","characterFormat":{"fontFamily":"Calibri Light","fontColor":"#1F3763"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level6"}}'),this.preDefinedStyles.add("Heading 7",'{"type":"Paragraph","name":"Heading 7","basedOn":"Normal","next":"Normal","link":"Heading 7 Char","characterFormat":{"italic":true,"fontFamily":"Calibri Light","fontColor":"#1F3763"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level7"}}'),this.preDefinedStyles.add("Heading 8",'{"type":"Paragraph","name":"Heading 8","basedOn":"Normal","next":"Normal","link":"Heading 8 Char","characterFormat":{"fontSize":10.5,"fontFamily":"Calibri Light","fontColor":"#333333"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level8"}}'),this.preDefinedStyles.add("Heading 9",'{"type":"Paragraph","name":"Heading 9","basedOn":"Normal","next":"Normal","link":"Heading 9 Char","characterFormat":{"fontSize":10.5,"italic":true,"fontFamily":"Calibri Light","fontColor":"#333333"},"paragraphFormat":{"leftIndent":0.0,"rightIndent":0.0,"firstLineIndent":0.0,"beforeSpacing":2.0,"afterSpacing":0.0,"lineSpacing":1.0791666507720947,"lineSpacingType":"Multiple","textAlignment":"Left","outlineLevel":"Level9"}}'),this.preDefinedStyles.add("Default Paragraph Font",'{"type":"Character","name":"Default Paragraph Font"}'),this.preDefinedStyles.add("Heading 1 Char",'{"type":"Character","name":"Heading 1 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontSize":16.0,"fontFamily":"Calibri Light","fontColor":"#2F5496"}}'),this.preDefinedStyles.add("Heading 2 Char",'{"type":"Character","name":"Heading 2 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontSize":13.0,"fontFamily":"Calibri Light","fontColor":"#2F5496"}}'),this.preDefinedStyles.add("Heading 3 Char",'{"type":"Character","name":"Heading 3 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontSize":12.0,"fontFamily":"Calibri Light","fontColor": "#1F3763"}}'),this.preDefinedStyles.add("Heading 4 Char",'{"type":"Character","name":"Heading 4 Char","basedOn":"Default Paragraph Font","characterFormat":{"italic":true,"fontFamily":"Calibri Light","fontColor":"#2F5496"}}'),this.preDefinedStyles.add("Heading 5 Char",'{"type":"Character","name":"Heading 5 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontFamily":"Calibri Light","fontColor":"#2F5496"}}'),this.preDefinedStyles.add("Heading 6 Char",'{"type":"Character","name":"Heading 6 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontFamily":"Calibri Light","fontColor":"#1F3763"}}'),this.preDefinedStyles.add("Heading 7 Char",'{"type":"Character","name":"Heading 7 Char","basedOn":"Default Paragraph Font","characterFormat":{"italic":true,"fontFamily":"Calibri Light","fontColor":"#1F3763"}}'),this.preDefinedStyles.add("Heading 8 Char",'{"type":"Character","name":"Heading 8 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontSize":10.5,"fontFamily":"Calibri Light","fontColor":"#333333"}}'),this.preDefinedStyles.add("Heading 9 Char",'{"type":"Character","name":"Heading 9 Char","basedOn":"Default Paragraph Font","characterFormat":{"fontSize":10.5,"italic":true,"fontFamily":"Calibri Light","fontColor":"#333333"}}'),this.preDefinedStyles.add("Hyperlink",'{"type":"Character","name":"Hyperlink","basedOn":"Default Paragraph Font","next":"Normal","characterFormat":{"fontColor":"#0563C1","underline": "Single"}}'),this.preDefinedStyles.add("TOC 1",'{"type":"Paragraph","name":"TOC 1","basedOn":"Normal","next":"Normal","paragraphFormat":{"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 2",'{"type":"Paragraph","name":"TOC 2","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :11.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 3",'{"type":"Paragraph","name":"TOC 3","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :22.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 4",'{"type":"Paragraph","name":"TOC 4","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :33.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 5",'{"type":"Paragraph","name":"TOC 5","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :44.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 6",'{"type":"Paragraph","name":"TOC 6","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :55.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 7",'{"type":"Paragraph","name":"TOC 7","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :66.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 8",'{"type":"Paragraph","name":"TOC 8","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :77.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("TOC 9",'{"type":"Paragraph","name":"TOC 9","basedOn":"Normal","next":"Normal","paragraphFormat":{"leftIndent" :88.0,"afterSpacing":5.0}}'),this.preDefinedStyles.add("Header",'{"type":"Paragraph","name":"Header","basedOn":"Normal","next":"Header","paragraphFormat":{"afterSpacing":0,"lineSpacing":1,"lineSpacingType":"Multiple"}}'),this.preDefinedStyles.add("Footer",'{"type":"Paragraph","name":"Footer","basedOn":"Normal","next":"Footer","paragraphFormat":{"afterSpacing":0,"lineSpacing":1,"lineSpacingType":"Multiple"}}')},u.prototype.open=function(e){G.isNullOrUndefined(e)||"string"!=typeof e&&"object"!=typeof e||(e instanceof Blob?this.handleBlobOpen(e):(this.setDefaultDocumentFormat(),this.sections=this.parser.convertJsonToDocument(e,{})))},u.prototype.handleBlobOpen=function(e){var t=this,i=new FileReader;i.onload=function(){try{var e=i.result;JSON.parse(e),t.open(e)}catch(e){console.error("Failed to parse blob as SFDT:",e)}},i.onerror=function(){console.error("Failed to read blob")},i.readAsText(e)},u.prototype.syncFormatPainterCursor=function(e){G.isNullOrUndefined(e)||G.isNullOrUndefined(this.isFormatPainterModule)||!this.formatPainterActive||(e.style.cursor=this.viewerContainer&&this.viewerContainer.style.cursor?this.viewerContainer.style.cursor:this.formatPainterCursor)},u.prototype.clearDocumentItems=function(){this.editRanges.clear(),this.headersFooters=[],this.fields=[],this.layout.lastScrollUpdatePageIndex=-1,this.formFields=[];for(var e=0;e<this.comments.length;e++){var t=this.comments[e].commentStart;t&&t.destroy()}if(this.comments=[],this.bookmarks.clear(),this.endBookmarksUpdated=[],this.styles.clear(),this.stylesMap.clear(),this.pages&&0<this.pages.length){for(e=0;e<this.pages.length;e++)this.pages[e].componentDestroy();this.pages=[]}if(this.authors.clear(),this.revisionsInternal.clear(),this.characterFormat.clearFormat(),this.themeFontLanguage.clearFormat(),this.paragraphFormat.clearFormat(),this.setDefaultCharacterValue(this.characterFormat),this.setDefaultParagraphValue(this.paragraphFormat),this.defaultTabWidth=36,this.userCollection=[],this.customXmlData.clear(),this.fontSubstitutionTable.clear(),this.images.clear(),this.contentControlCollection=[],this.splittedCellWidgets=[],this.endnotes.clear(),this.footnotes.clear(),this.footnoteCollection=[],this.endnoteCollection=[],this.lists&&0<this.lists.length)for(e=0;e<this.lists.length;e++)this.lists[Number(e)].clear();this.lists=[],this.abstractLists=[],this.sections=[],this.themes=new Yc,this.hasThemes=!1,this.isRestartNumbering=!1,this.isUpdatedWhileLoadAsync=!1,this.isFollowedListLayoutRequired=!1},u.prototype.setDefaultDocumentFormat=function(){G.isNullOrUndefined(this.editorCharacterFormat)||this.parser.parseCharacterFormat(0,this.editorCharacterFormat,this.characterFormat),G.isNullOrUndefined(this.editorParagraphFormat)||this.parser.parseParagraphFormat(0,this.editorParagraphFormat,this.paragraphFormat),G.isNullOrUndefined(this.documentCharacterFormat)||this.parser.parseCharacterFormat(0,this.documentCharacterFormat,this.characterFormat),G.isNullOrUndefined(this.documentParagraphFormat)||this.parser.parseParagraphFormat(0,this.documentParagraphFormat,this.paragraphFormat)},u.prototype.initializeComponents=function(){this.layout=new Rc(this),this.textHelper=new Lc(this)},u.prototype.setDefaultCharacterValue=function(e){e.bold=!1,e.italic=!1,e.fontFamily="Calibri",e.fontSize=11,e.underline="None",e.strikethrough="None",e.fontSizeBidi=11,e.fontFamilyBidi="Calibri",e.baselineAlignment="Normal",e.highlightColor="NoColor",e.allCaps=!1},u.prototype.setDefaultParagraphValue=function(e){e.leftIndent=0,e.rightIndent=0,e.firstLineIndent=0,e.textAlignment="Left",e.beforeSpacing=0,e.afterSpacing=0,e.lineSpacing=1,e.lineSpacingType="Multiple",e.bidi=!1,e.keepWithNext=!1,e.keepLinesTogether=!1,e.widowControl=!0,e.outlineLevel="BodyText"},u.prototype.getAbstractListById=function(e,t){if(!G.isNullOrUndefined(this.abstractLists))for(var i=0;i<this.abstractLists.length;i++){var r=this.abstractLists[i];if(!G.isNullOrUndefined(r)){if(t&&r.nsid===e)return r;if(r.abstractListId===e)return r}}},u.prototype.getListById=function(e,t){if(!G.isNullOrUndefined(this.lists))for(var i=0;i<this.lists.length;i++){var r=this.lists[i];if(!G.isNullOrUndefined(r)){if(t&&r.nsid===e)return r;if(r.listId===e)return r}}},u.getListLevelNumber=function(e){return e.ownerBase instanceof qc?e.ownerBase.levelNumber:e.ownerBase instanceof Oc&&!G.isNullOrUndefined(e.ownerBase.levels)?e.ownerBase.levels.indexOf(e):-1},u.prototype.getImageString=function(e){var t=this.images.get(parseInt(e.imageString,10));return G.isNullOrUndefined(t)||0===t.length?"":e.isMetaFile&&".svg"!==K.formatClippedString(t[0]).extension||".tif"===K.formatClippedString(t[0]).extension?t[1]:t[0]},u.prototype.addBase64StringInCollection=function(s){return mg(this,void 0,void 0,function(){var t,i,r,n,o,a;return yg(this,function(e){for(t=0<this.images.length?Math.max.apply(Math,this.images.keys)+1:0,i=!0,r=[],n=0;n<this.images.length;n++){if(o=this.images.keys[parseInt(n.toString(),10)],a=this.images.get(o),s.isMetaFile&&s.metaFileImageString===a[0]){t=o,i=!1;break}if(s.imageString===a[0]){t=o,i=!1;break}}return i&&(s.isMetaFile?(r.push(G.isNullOrUndefined(s.metaFileImageString)?s.imageString:s.metaFileImageString),r.push(""===s.imageString?s.metaFileImageString:s.imageString)):r.push(s.imageString),this.images.add(t,r)),s.isMetaFile&&!G.isNullOrUndefined(s.metaFileImageString)&&(s.metaFileImageString=t.toString()),s.imageString=t.toString(),[2]})})},u.prototype.getBookmarks=function(e){for(var t=[],i=0;i<this.bookmarks.keys.length;i++){var r=this.bookmarks.keys[Number(i)];!e&&0===r.indexOf("_")||t.push(r)}return t},u.prototype.getBase64=function(r,e,t){return mg(this,void 0,void 0,function(){return yg(this,function(e){return[2,new Promise(function(t,e){var i=new Image;i.onload=function(){var e=document.createElement("canvas");e.width=i.naturalWidth,e.height=i.naturalHeight;e.getContext("2d").drawImage(i,0,0,i.naturalWidth,i.naturalHeight);e=e.toDataURL("image/png",1);t(e)},i.onerror=function(){e()},r&&(K.startsWith(r,"http://")||K.startsWith(r,"https://"))&&fetch(r,{cache:"no-cache"}).then(function(e){return e.blob()}).then(function(r){return new Promise(function(e,t){var i=new FileReader;i.onloadend=function(){return e(i.result)},i.onerror=t,i.readAsDataURL(r)})}).then(function(e){i.src=e}).catch(function(){e()})})]})})},u.prototype.storeTimeoutId=function(e,t){this.scheduledTimeouts[e]||(this.scheduledTimeouts[e]=[]),this.scheduledTimeouts[e].push(t)},u.prototype.convertColorToRGBA=function(e,t){e=e.replace("#","");return"rgba("+parseInt(e.substring(0,2),16)+", "+parseInt(e.substring(2,4),16)+", "+parseInt(e.substring(4,6),16)+", "+Math.max(0,Math.min(1,t))+")"},u.prototype.getAuthorColor=function(e){var t;return this.authors.containsKey(e)?this.authors.get(e):(t=this.generateRandomColor(),this.authors.add(e,t),t)},u.prototype.generateRandomColor=function(){var e=["#b5082e","#0e76b1","#bb00ff","#c14f16","#128317","#881824","#a26400","#50565e"],t=this.documentEditorSettings.revisionSettings;return(e=!G.isNullOrUndefined(t)&&!G.isNullOrUndefined(t.revisionColors)&&0<t.revisionColors.length&&0<(t=t.revisionColors.filter(function(e){return!G.isNullOrUndefined(e)&&""!==e})).length?t:e)[this.authors.length%e.length]},u.prototype.getPageWidth=function(e){return e.boundingRectangle.width},u.prototype.removePage=function(e){this.currentPage===e&&(this.currentPage=void 0),e.headerWidgetIn&&(e.headerWidgetIn.page=void 0),e.footerWidgetIn&&(e.footerWidgetIn.page=void 0),e.headerWidget&&e.headerWidget.page===e&&(e.headerWidget.page=void 0),e.footerWidget&&e.footerWidget.page===e&&(e.footerWidget.page=void 0);for(var t,i=this.pages.indexOf(e),r=(-1<i&&this.pages.splice(i,1),G.isNullOrUndefined(this.viewer.visiblePages)||-1<this.viewer.visiblePages.indexOf(e)&&(t=this.viewer.visiblePages.indexOf(e),this.viewer.visiblePages.splice(t,1)),0);r<this.pages.length;r++)this.pages[r].boundingRectangle.height;e.boundingRectangle.height;var n=20;if(0<i&&(n+=this.pages[i-1].boundingRectangle.bottom),-1!==i)for(r=i;r<this.pages.length;r++)(e=this.pages[r]).boundingRectangle=new _(e.boundingRectangle.x,n,e.boundingRectangle.width,e.boundingRectangle.height),n=e.boundingRectangle.bottom+20,!(0<e.bodyWidgets.length)||G.isNullOrUndefined(e.bodyWidgets[0].firstChild)||e.bodyWidgets[0].firstChild instanceof Q&&e.bodyWidgets[0].firstChild.header||(e.repeatHeaderRowTableWidget=!1)},u.prototype.insertPage=function(e,t){var i=!1,r=(this.pages.indexOf(t)!==e&&(i=!0),-1<this.pages.indexOf(t)&&this.pages.splice(this.pages.indexOf(t),1),this.pages.splice(e,0,t),20);0<e&&(r+=this.pages[e-1].boundingRectangle.bottom);for(var n=e;n<this.pages.length;n++)t=this.pages[n],i&&(t.currentPageNum=1),t.boundingRectangle=new _(t.boundingRectangle.x,r,t.boundingRectangle.width,t.boundingRectangle.height),r=t.boundingRectangle.bottom+20},u.prototype.removeEmptyPages=function(e){for(var t=!1,i=!1,r=G.isNullOrUndefined(this.editorProperties.selectionStartPage)?-1:this.editorProperties.selectionStartPage-1,n=0;n<this.pages.length;n++){for(var o=this.pages[Number(n)],a=0;a<o.bodyWidgets.length;a++){var s,l=o.bodyWidgets[Number(a)];0!==o.bodyWidgets.length&&0!==l.childWidgets.length||1<=o.bodyWidgets.length&&(s=o.bodyWidgets.indexOf(l),o.bodyWidgets.splice(s,1),a--)}if(o.bodyWidgets.length<=0){if(n===this.pages.length-1&&-1!==this.viewer.visiblePages.indexOf(o)&&(t=!0),!G.isNullOrUndefined(o.endnoteWidget)&&0<o.endnoteWidget.bodyWidgets.length){var d=o.endnoteWidget,h=o.previousPage;if(!G.isNullOrUndefined(h)){G.isNullOrUndefined(h.endnoteWidget)&&(h.endnoteWidget=new J,h.endnoteWidget.footNoteType="Endnote",h.endnoteWidget.page=h);for(var c=0;c<d.bodyWidgets.length;c++){var g,l=d.bodyWidgets[c],p=!1;0<h.endnoteWidget.bodyWidgets.length&&(g=h.endnoteWidget.bodyWidgets[h.endnoteWidget.bodyWidgets.length-1],l.index===g.index)&&l.footNoteReference===g.footNoteReference&&(g.combineWidget(this.viewer),d.bodyWidgets.splice(c,1),p=!0),p||(d.bodyWidgets.splice(c,1),l.index=h.endnoteWidget.bodyWidgets.length,h.endnoteWidget.bodyWidgets.push(l),l.containerWidget=h.endnoteWidget,l.page=h),c--}G.isNullOrUndefined(o.endnoteWidget)||0!==o.endnoteWidget.bodyWidgets.length||(o.endnoteWidget=void 0),t=!(i=!0)}}-1===this.pages.indexOf(o)||G.isNullOrUndefined(this.pages[n])||this.removePage(this.pages[n]),n--}}G.isNullOrUndefined(this.pages[r])||((o=this.pages[r]).headerWidget&&(o.headerWidget.page=o),o.footerWidget&&(o.footerWidget.page=o)),i&&!e&&this.layout.reLayoutEndnote(),t&&this.scrollToBottom(this.selectionPage)},u.prototype.scrollToBottom=function(e){var t;G.isNullOrUndefined(e)||G.isNullOrUndefined(e.boundingRectangle)||(t=this.visibleBounds.height,this.viewerContainer.scrollTop=e.boundingRectangle.bottom-t)},u.prototype.getFieldResult=function(e,t){if(!G.isNullOrUndefined(t)&&!G.isNullOrUndefined(e)){var e=this.editorProperties.getFieldCode(e).split("*"),i=e[0].replace(/[^\w\s]/gi,"").trim().toLowerCase(),r="";switch(""===(r=1<e.length&&" MERGEFORMAT"!==e[1]?e[1].replace(/[^\w\s]/gi,"").trim():r)&&(r=t.bodyWidgets[0].sectionFormat.pageNumberStyle),i=-1!==i.indexOf(" ")?i.split(" ")[0]:i){case"page":if(t.bodyWidgets[0].sectionFormat.restartPageNumbering&&0!==t.sectionIndex)s=t.sectionIndex,a=t.previousPage,this.isRestartNumbering=!0,s!==a.sectionIndex&&a.bodyWidgets[a.bodyWidgets.length-1].sectionIndex!==s?t.currentPageNum=t.bodyWidgets[0].sectionFormat.pageStartingNumber:((1===a.currentPageNum&&s!==a.sectionIndex||s===a.sectionIndex&&"FirstPageFooter"===a.footerWidget.headerFooterType)&&(a.currentPageNum=t.bodyWidgets[0].sectionFormat.pageStartingNumber),t.currentPageNum=a.currentPageNum+1);else if(t.bodyWidgets[0].sectionFormat.restartPageNumbering&&0===t.sectionIndex)t.currentPageNum=t.bodyWidgets[0].sectionFormat.pageStartingNumber+t.index;else{var n=t.previousPage,o=-1,a=!1;if(G.isNullOrUndefined(t.previousPage)||(a=t.previousPage.bodyWidgets[0].sectionFormat.restartPageNumbering),n&&t.sectionIndex!==n.sectionIndex&&n.bodyWidgets[0].sectionFormat.restartPageNumbering&&1===n.currentPageNum)for(;n&&!G.isNullOrUndefined(n.previousPage)&&n.sectionIndex===n.previousPage.sectionIndex;)o=(n=n.previousPage).index;if(!a&&0<=o&&t.previousPage.bodyWidgets[0].sectionFormat.pageStartingNumber+(t.previousPage.index-o)!==t.previousPage.currentPageNum)t.currentPageNum=t.index+1;else if(!G.isNullOrUndefined(t.previousPage)&&(t.previousPage.bodyWidgets[0].sectionFormat.restartPageNumbering&&1!==t.previousPage.currentPageNum||this.isRestartNumbering&&1!==t.previousPage.currentPageNum))t.previousPage.bodyWidgets[0].sectionFormat.restartPageNumbering&&(this.isRestartNumbering=!0),t.currentPageNum=t.previousPage.currentPageNum+1;else if(G.isNullOrUndefined(n))t.currentPageNum=t.index+1;else{for(;n.previousPage&&(n&&1===n.currentPageNum&&!n.bodyWidgets[0].sectionFormat.restartPageNumbering||n.bodyWidgets[0].sectionFormat.restartPageNumbering&&n.bodyWidgets[0].sectionFormat===n.previousPage.bodyWidgets[0].sectionFormat);)n=n.previousPage;n&&n.bodyWidgets[0].sectionFormat.restartPageNumbering&&1===n.currentPageNum?t.currentPageNum=n.bodyWidgets[0].sectionFormat.pageStartingNumber+(t.index-n.index):n&&1!==n.currentPageNum?t.currentPageNum=n.currentPageNum+(t.index-n.index):t.currentPageNum=t.index+1}}return this.getFieldText(r,t.currentPageNum);case"numpages":return this.getFieldText(r,t.documentHelper.pages.length);case"sectionpages":for(var s=t.sectionIndex,l=0,d=0;d<t.documentHelper.pages.length;d++)if(t.documentHelper.pages[d].sectionIndex===s)l++;else if(0!==l)break;return this.getFieldText(r,l)}}return""},u.prototype.getFieldText=function(e,t){switch(e){case"ALPHABETIC":return this.layout.getAsLetter(t).toUpperCase();case"alphabetic":return this.layout.getAsLetter(t).toLowerCase();case"roman":return this.layout.getAsRoman(t).toLowerCase();case"ROMAN":case"RomanUpper":return this.layout.getAsRoman(t).toUpperCase();case"RomanLower":return this.layout.getAsRoman(t).toLowerCase();case"LetterUpper":return this.layout.getAsLetter(t).toUpperCase();case"LetterLower":return this.layout.getAsLetter(t).toLowerCase();default:return t.toString()}},u.prototype.getNextParagraphBlock=function(e){return e.nextRenderedWidget instanceof Z?e.nextRenderedWidget:e.nextRenderedWidget instanceof Q?this.getFirstParagraphInFirstCell(e.nextRenderedWidget):e.containerWidget instanceof ee?this.getNextParagraphCell(e.containerWidget):e.containerWidget instanceof Y?this.getNextParagraph(e.containerWidget):e.containerWidget instanceof X&&this.editorProperties.isMoveDownOrMoveUp?this.getFirstBlockInNextHeaderFooter(e):void 0},u.prototype.getNextParagraphCell=function(e){if(e.nextRenderedWidget&&e.nextRenderedWidget instanceof ee){if(e.rowIndex!==e.nextRenderedWidget.rowIndex)return e=e.nextRenderedWidget,this.getNextParagraphCell(e);if((e=e.nextRenderedWidget).getSplitWidgets()[0]instanceof ee)for(var t=0,i=e.getSplitWidgets();t<i.length;t++)if((e=i[t]).firstChild)break;var r=e.firstChild;return r?this.getFirstParagraphBlock(r):this.getNextParagraphCell(e)}return e.nextSplitWidget&&0===e.nextSplitWidget.childWidgets.length&&(e=e.getSplitWidgets().pop()),this.getNextParagraphRow(e.containerWidget)},u.prototype.getNextParagraph=function(e){if(e.nextRenderedWidget instanceof Y)return e=e.nextRenderedWidget.childWidgets[0],this.getFirstParagraphBlock(e)},u.prototype.getFirstBlockInNextHeaderFooter=function(e){var t,e=e.containerWidget;if(-1!==e.headerFooterType.indexOf("Header"))t=e.page.footerWidget.firstChild;else{if(!e.page.nextPage)return;var e=e.page.nextPage,i=e.headerWidget;(i.page=e).footerWidget&&(e.footerWidget.page=e),t=i.firstChild}return t instanceof Z?t:this.getFirstBlockInFirstCell(t)},u.prototype.getNextParagraphRow=function(e){if(G.isNullOrUndefined(e.nextRenderedWidget))return this.getNextParagraphBlock(e.ownerTable);for(var t=e.nextRenderedWidget.childWidgets[0];0===t.childWidgets.length&&!G.isNullOrUndefined(t.previousSplitWidget)&&!G.isNullOrUndefined(t.nextRenderedWidget)&&t.nextRenderedWidget instanceof ee;)t=t.nextRenderedWidget;e=t.childWidgets[0];return G.isNullOrUndefined(e)?this.getNextParagraphCell(t):this.getFirstParagraphBlock(e)},u.prototype.getFirstBlockInFirstCell=function(e){if(0<e.childWidgets.length)for(var t=e.childWidgets[0],i=0;i<t.childWidgets.length;i++){var r=t.childWidgets[i];if(0<r.childWidgets.length)return r.childWidgets[0]}},u.prototype.destroy=function(){if(this.styles&&(this.styles.destroy(),this.styles=void 0),this.stylesMap&&(this.stylesMap.destroy(),this.stylesMap=void 0),this.characterFormat&&(this.characterFormat.destroy(),this.characterFormat=void 0),this.themeFontLanguage&&(this.themeFontLanguage.destroy(),this.themeFontLanguage=void 0),this.paragraphFormat&&(this.paragraphFormat.destroy(),this.paragraphFormat=void 0),this.pages&&0<this.pages.length){for(var e=0;e<this.pages.length;e++)this.pages[e].componentDestroy();this.pages=[]}if(this.pages=void 0,this.lists&&0<this.lists.length){for(e=0;e<this.lists.length;e++)this.lists[Number(e)].destroy();this.lists=[]}if(this.lists=void 0,this.abstractLists&&0<this.abstractLists.length)for(e=0;e<this.abstractLists.length;e++){var t=this.abstractLists[Number(e)];G.isNullOrUndefined(t)||t.destroy()}if(this.abstractLists=[],this.abstractLists=void 0,this.fieldStacks=[],this.fieldStacks=void 0,this.splittedCellWidgets=[],this.splittedCellWidgets=void 0,this.fields=[],this.fields=void 0,G.isNullOrUndefined(this.renderedLists)||this.renderedLists.destroy(),this.renderedLists=void 0,G.isNullOrUndefined(this.authors)||this.authors.destroy(),this.authors=void 0,G.isNullOrUndefined(this.revisionsInternal)||this.revisionsInternal.destroy(),this.revisionsInternal=void 0,G.isNullOrUndefined(this.preDefinedStyles)||this.preDefinedStyles.destroy(),this.preDefinedStyles=void 0,G.isNullOrUndefined(this.bookmarks)||this.bookmarks.destroy(),this.bookmarks=void 0,G.isNullOrUndefined(this.editRanges)||this.editRanges.destroy(),this.editRanges=void 0,G.isNullOrUndefined(this.customXmlData)||this.customXmlData.destroy(),G.isNullOrUndefined(this.images)||this.images.destroy(),G.isNullOrUndefined(this.fontSubstitutionTable)||this.fontSubstitutionTable.destroy(),this.fontSubstitutionTable=void 0,this.customXmlData=void 0,this.images=void 0,this.blockToShift=void 0,this.comments&&0<this.comments.length){for(e=0;e<this.comments.length;e++)this.comments[Number(e)].destroy();this.comments=[]}if(this.comments=void 0,this.contentControlCollection&&0<this.contentControlCollection.length)for(e=0;e<this.contentControlCollection.length;e++){var i=this.contentControlCollection[Number(e)];G.isNullOrUndefined(i)||i.destroy()}this.contentControlCollection=[],this.contentControlCollection=void 0,this.renderedLevelOverrides=[],this.renderedLevelOverrides=void 0,this.headersFooters=[],this.headersFooters=void 0,this.listParagraphs=[],this.listParagraphs=void 0,this.formFields=[],this.formFields=void 0,this.fieldCollection=[],this.fieldCollection=void 0,this.userCollection=[],this.userCollection=void 0,this.footnotes&&(this.footnotes.componentDestroy(),this.footnotes=void 0),this.endnotes&&(this.endnotes.componentDestroy(),this.endnotes=void 0),this.footnoteCollection=[],this.footnoteCollection=void 0,this.endnoteCollection=[],this.endnoteCollection=void 0,this.layout&&this.layout.destroy(),this.layout=void 0,this.textHelper&&this.textHelper.destroy(),this.textHelper=void 0,G.isNullOrUndefined(this.textMeasureHelper)||(this.textMeasureHelper.destroy(),this.textMeasureHelper=void 0),G.isNullOrUndefined(this.parser)||(this.parser.destroy(),this.parser=void 0),G.isNullOrUndefined(this.render)||(this.render.destroy(),this.render=void 0),G.isNullOrUndefined(this.viewer)||(this.viewer.destroy(),this.viewer=void 0),G.isNullOrUndefined(this.revisionHelper)||(this.revisionHelper.destroy(),this.revisionHelper=void 0),G.isNullOrUndefined(this.themes)||(this.themes.destroy(),this.themes=void 0),G.isNullOrUndefined(this.selectionCanvasIn)||G.isNullOrUndefined(this.selectionCanvasIn.parentElement)||this.selectionCanvasIn.parentElement.removeChild(this.selectionCanvasIn),this.selectionCanvasIn=void 0,G.isNullOrUndefined(this.containerCanvasIn)||G.isNullOrUndefined(this.containerCanvasIn.parentElement)||this.containerCanvasIn.parentElement.removeChild(this.containerCanvasIn),this.containerCanvasIn=void 0,this.sections=[],this.sections=void 0,this.tableLefts=[],this.tableLefts=void 0,this.endBookmarksUpdated=[],this.endBookmarksUpdated=void 0,this.cachedPages=[],this.cachedPages=void 0,this.scheduledTimeouts={},this.scheduledTimeouts=void 0,this.visibleBoundsIn=void 0,this.editorProperties=void 0,this.documentEditorSettings=void 0,this.documentSettings=void 0,this.viewerContainer=void 0,this.pageContainer=void 0,this.elementIn=void 0,this.hostElement=void 0,this.selectionPage=void 0,this.selectionEndParagraph=void 0,this.selectionCharacterFormat=void 0,this.editorCharacterFormat=void 0,this.editorParagraphFormat=void 0,this.documentCharacterFormat=void 0,this.documentParagraphFormat=void 0,this.lockedPictureContentControl=void 0,this.L10n=void 0,this.defaultLocale=void 0,this.hooks.onRevisionConstructed=void 0,this.hooks.onUpdateScrollBars=void 0,this.hooks.onProcessAsyncPageUpdate=void 0,this.hooks.onPerformUpdateAfterLoad=void 0,this.hooks.onUpdateBookmarkCollection=void 0,this.hooks.onInsertContentControl=void 0,this.hooks.onCommentSelected=void 0,this.hooks.isBlockExistAfter=void 0,this.hooks.getSelectionOffsets=void 0,this.hooks.selectRange=void 0,this.hooks.onTriggerSpellChecker=void 0,this.hooks=void 0,this.heightInfoCollection=void 0,this.isRestartNumbering=!1,this.currentDocumentLoadId=0},u.prototype.canRenderBorder=function(e){var t,i,r,n,o,a,s,l,d,h,c=!1,g=!1,p=e.previousRenderedWidget,u=e.nextRenderedWidget,f=e.previousSplitWidget,f=(G.isNullOrUndefined(p)||G.isNullOrUndefined(f)||p!==f||(c=!0),e.nextSplitWidget);return G.isNullOrUndefined(u)||G.isNullOrUndefined(f)||u!==f||(g=!0),c&&g||c&&G.isNullOrUndefined(u)||g&&G.isNullOrUndefined(p)||(f=this.getParagraphLeftPosition(e),t=h=0,!c&&!G.isNullOrUndefined(p)&&p instanceof Z&&(h=this.getParagraphLeftPosition(p)),!g&&!G.isNullOrUndefined(u)&&u instanceof Z&&(t=this.getParagraphLeftPosition(u)),i=e.paragraphFormat.borders.top,r=e.paragraphFormat.borders.bottom,n=e.paragraphFormat.borders.left,o=e.paragraphFormat.borders.right,!c&&!G.isNullOrUndefined(p)&&p instanceof Z&&f===h&&(a=this.checkEqualBorder(i,p.paragraphFormat.borders.top),s=this.checkEqualBorder(r,p.paragraphFormat.borders.bottom),l=this.checkEqualBorder(n,p.paragraphFormat.borders.left),d=this.checkEqualBorder(o,p.paragraphFormat.borders.right),h=p.paragraphFormat.borders.horizontal,a)&&s&&l&&d&&!G.isNullOrUndefined(h)&&"None"===h.lineStyle&&(c=!0),!g&&!G.isNullOrUndefined(u)&&u instanceof Z&&(f===t||this.layout.isInitialLoad&&this.skipBottomBorder(e,u))&&(a=this.checkEqualBorder(i,u.paragraphFormat.borders.top),s=this.checkEqualBorder(r,u.paragraphFormat.borders.bottom),l=this.checkEqualBorder(n,u.paragraphFormat.borders.left),d=this.checkEqualBorder(o,u.paragraphFormat.borders.right),s)&&a&&l&&d&&(g=!0)),{skipTopBorder:c,skipBottomBorder:g}},u.prototype.checkEqualBorder=function(e,t){return G.isNullOrUndefined(e)||G.isNullOrUndefined(t)?!(!G.isNullOrUndefined(e)||!G.isNullOrUndefined(t)):e.isEqualFormat(t)},u.prototype.getParagraphLeftPosition=function(e){var t=0,i=0,r=e.paragraphFormat.firstLineIndent,r=(r<0&&(t=K.convertPointToPixel(Math.abs(r)),t=parseFloat(t.toFixed(5))),e.paragraphFormat.textAlignment),i=e.isEmpty()&&("Left"!==r&&"Justify"!==r||"Justify"===r&&e.paragraphFormat.bidi)?e.clientX>t?e.clientX-t:e.clientX:e.x>t?e.x-t:e.x;return i=G.isNullOrUndefined(i)?i:parseFloat(i.toFixed(2))},u.prototype.skipBottomBorder=function(e,t){var i,r;return e.paragraphFormat.leftIndent===t.paragraphFormat.leftIndent||(i=e.paragraphFormat.firstLineIndent<0?Math.abs(e.paragraphFormat.firstLineIndent):0,r=t.paragraphFormat.firstLineIndent<0?Math.abs(t.paragraphFormat.firstLineIndent):0,(e.paragraphFormat.leftIndent>i?e.paragraphFormat.leftIndent-i:0)==(t.paragraphFormat.leftIndent>r?t.paragraphFormat.leftIndent-r:0))},u.prototype.getFirstParagraphInCell=function(e){e=e.childWidgets[0];return e instanceof Z?e:this.getFirstParagraphInFirstCell(e)},u.prototype.getFirstParagraphInFirstCell=function(e){if(!G.isNullOrUndefined(e.childWidgets)&&0<e.childWidgets.length)return e=e.childWidgets[0].childWidgets[0].childWidgets[0],this.getFirstParagraphBlock(e)},u.prototype.getLastParagraphInLastCell=function(e){if(!G.isNullOrUndefined(e.childWidgets)&&0<e.childWidgets.length)return e=e.lastChild.lastChild.lastChild,this.getLastParagraphBlock(e)},u.prototype.getFirstParagraphBlock=function(e){return e instanceof Z?e:e instanceof Q?this.getFirstParagraphInFirstCell(e):void 0},u.prototype.getLastParagraphBlock=function(e){return e instanceof Z?e:e instanceof Q?this.getLastParagraphInLastCell(e):void 0},u.prototype.getLastParagraphInFirstRow=function(e){if(0<e.childWidgets.length)return e=e.firstChild.lastChild.lastChild,this.getLastParagraphBlock(e)},u.prototype.getFirstParagraphInLastRow=function(e){if(0<e.childWidgets.length)return e=e.childWidgets[e.childWidgets.length-1].childWidgets[0].childWidgets[0],this.getFirstParagraphBlock(e)},u.prototype.addToStylesMap=function(e){var t,i={},r={};G.isNullOrUndefined(e)||(t=this.L10n?this.L10n.getConstant(e.name):e.name,i.StyleName=""===t?e.name:t,"Paragraph"==e.type&&(r.paragraphFormat={},K.writeParagraphFormat(r.paragraphFormat,!0,e.paragraphFormat)),r.characterFormat={},K.writeCharacterFormat(r.characterFormat,!0,e.characterFormat),i.Style=this.parseStyle(JSON.stringify(r)),G.isNullOrUndefined(e.type)||(i.type=e.type,"Paragraph"!=i.type)||G.isNullOrUndefined(e.link)||(i.type="Linked"),i.IconClass="Paragraph"==i.type?"e-list-icon e-de-listview-icon e-de-e-paragraph-style-mark e-icons":"Character"==i.type?"e-list-icon e-de-listview-icon e-de-e-character-style-mark e-icons":"e-list-icon e-de-listview-icon e-de-e-linked-style-mark e-icons",this.stylesMap.get(i.type)?this.stylesMap.get(i.type).push(i):this.stylesMap.add(i.type,[i]))},u.prototype.parseStyle=function(e){var t="",e=JSON.parse(e),i="";if(!G.isNullOrUndefined(e.characterFormat.baselineAlignment)&&"Normal"!==e.characterFormat.baselineAlignment){var r="";switch(e.characterFormat.baselineAlignment){case"Superscript":r="super";break;case"Subscript":r="sub"}1<r.length&&(t+="vertical-align:"+r+";")}return G.isNullOrUndefined(e.characterFormat.underline)||"None"===e.characterFormat.underline||(i+="underline "),G.isNullOrUndefined(e.characterFormat.strikethrough)||"None"===e.characterFormat.strikethrough||(i+="line-through "),G.isNullOrUndefined(e.characterFormat.fontSize)||(t+="font-size:"+e.characterFormat.fontSize+"px;"),G.isNullOrUndefined(e.characterFormat.fontFamily)||(t+="font-family:"+e.characterFormat.fontFamily+";"),!G.isNullOrUndefined(e.characterFormat.bold)&&e.characterFormat.bold&&(t+="font-weight:bold;"),!G.isNullOrUndefined(e.characterFormat.italic)&&e.characterFormat.italic&&(t+="font-style:italic;"),G.isNullOrUndefined(e.characterFormat.fontColor)||("#00000000"===e.characterFormat.fontColor?t+="color: #000000;":t+="color: "+e.characterFormat.fontColor+";"),1<i.length&&(t+="text-decoration:"+i+";"),t},u.prototype.getNextValidElement=function(e){var t=void 0;if(e instanceof Md&&1===e.bookmarkType)return e;for(;e instanceof te;){if(0===e.fieldType&&!G.isNullOrUndefined(e.fieldEnd))return G.isNullOrUndefined(t)?e:t;1!==e.fieldType||G.isNullOrUndefined(e.fieldBegin)||(t=e),e=e.nextNode}return G.isNullOrUndefined(t)?e:t},u.prototype.getNextValidElementForField=function(e){e instanceof te&&0===e.fieldType&&K.isLinkedFieldCharacter(e)&&(t=e,e=G.isNullOrUndefined(t.fieldSeparator)?t.fieldEnd:t.fieldSeparator);var t=void 0;return t=G.isNullOrUndefined(e.nextNode)?t:this.getNextValidElement(e.nextNode)},u.prototype.combineSection=function(){var e=[],t=this.pages[0].bodyWidgets[0];for(this.isSelectionModule&&this.removeEmptyPages(!0);t=this.combineSectionChild(t,e,!1););for(var i=0;i<this.pages.length;i++)this.pages[i].destroy(),i--;return e},u.prototype.combineSectionChild=function(e,t,i){var r=e,n=new Y,o=!1;n.sectionFormat=e.sectionFormat,n.index=r.index;do{o=!1,(r=e).lastChild&&(e.lastChild.combineWidget(this.viewer),this.layout.isMultiColumnDoc)&&this.removeEmptyPages(),e=e.nextRenderedWidget;for(var a=0;a<r.childWidgets.length;a++){var s=r.childWidgets[a];s instanceof Q?this.layout.clearTableWidget(s,!0,!0,!0):(s.x=0,s.y=0,s.width=0,s.height=0),n.childWidgets.push(s),r.childWidgets.splice(a,1),a--,s.containerWidget=n}for(var l=0;l<r.page.bodyWidgets.length;l++){if(0!==r.page.bodyWidgets[l].childWidgets.length){o=!1;break}o=!0}}while(o&&i&&r.page.destroy(),e&&r.index===e.index);return t.push(n),e},u.prototype.isBlockInHeader=function(e){for(;!(e.containerWidget instanceof X);){if(!e.containerWidget)return!1;(e=e.containerWidget)instanceof P&&(e=e.containerShape.paragraph)}return-1!==e.containerWidget.headerFooterType.indexOf("Header")},u);function u(){this.enableLayout=!0,this.layoutType="Pages",this.isLayoutEnabled=!0,this.isShiftingEnabled=!1,this.isEditorModule=!1,this.isSfdtExportModule=!1,this.isSelectionModule=!1,this.isFormatPainterModule=!1,this.formatPainterCursor="text",this.formatPainterActive=!1,this.viewerContainer=void 0,this.isSelectionInHeaderFooter=!1,this.isSpellCheck=!1,this.pageOutline="#000000",this.copyWithTrackChange=!1,this.currentPage=void 0,this.backgroundColor="#FFFFFF",this.enableTrackChanges=!1,this.restrictFormatting=!1,this.protectionType="NoProtection",this.isDocumentProtected=!1,this.hashValue="",this.saltValue="",this.cryptAlgorithmSid="",this.cryptAlgorithmType="",this.cryptAlgorithmClass="",this.skipSettingsOps=!1,this.fieldStacks=[],this.splittedCellWidgets=[],this.tableLefts=[],this.isFirstLineFitInShiftWidgets=!1,this.zoomFactor=1,this.fields=[],this.heightInfoCollection={},this.defaultTabWidth=36,this.dontUseHtmlParagraphAutoSpacing=!1,this.allowSpaceOfSameStyleInTable=!1,this.alignTablesRowByRow=!1,this.compatibilityMode="Word2013",this.lists=[],this.comments=[],this.authors=new N,this.revisionsInternal=new N,this.abstractLists=[],this.styles=new gl,this.stylesMap=new N,this.preDefinedStyles=void 0,this.isRowOrCellResizing=!1,this.endBookmarksUpdated=[],this.formFields=[],this.fieldCollection=[],this.isPageField=!1,this.isTextInput=!1,this.userCollection=[],this.cachedPages=[],this.isIosDevice=!1,this.isMobileDevice=!1,this.isLinuxOS=!1,this.isFormFilling=!1,this.fontSubstitutionTable=void 0,this.themes=new Yc,this.hasThemes=!1,this.footnotes=new Pd,this.endnotes=new Pd,this.isFootnoteWidget=!1,this.isUpdatedWhileLoadAsync=!1,this.isRestartNumbering=!1,this.visibleBoundsIn=new _(0,0,816,1056),this.currentDocumentLoadId=0,this.scheduledTimeouts={},this.resizerBoundaryWidth=0,this.isFollowedListLayoutRequired=!1,this.externalFonts=[],this.locale="",this.defaultLocale={Header:"Header",Footer:"Footer","First Page Header":"First Page Header","First Page Footer":"First Page Footer","Even Page Header":"Even Page Header","Even Page Footer":"Even Page Footer","Odd Page Header":"Odd Page Header","Odd Page Footer":"Odd Page Footer","Same as Previous":"Same as Previous",Section:"Section","Page Break":"Page Break","Column Break":"Column Break","Section Break Continuous":"Section Break Continuous","Section Break Next Page":"Section Break Next Page","This region is locked by":"This region is locked by"},this.editorProperties=new fg(this),this.documentEditorSettings=new gg,this.documentSettings=new pg,this.hooks=new ug,this.parser=new Jc(this),this.pages=[],this.lists=[],this.abstractLists=[],this.characterFormat=new ce(this),this.themeFontLanguage=new ce(this),this.paragraphFormat=new vl(this),this.renderedLists=new N,this.renderedLevelOverrides=[],this.headersFooters=[],this.styles=new gl,this.stylesMap=new N,this.preDefinedStyles=new N,this.initalizeStyles(),this.bookmarks=new N,this.editRanges=new N,this.isIosDevice="undefined"!=typeof window&&/Mac|iPad|iPod/i.test(navigator.userAgent),this.isMobileDevice="undefined"!=typeof window&&/Android|Windows Phone|webOS/i.test(navigator.userAgent),this.isLinuxOS="undefined"!=typeof window&&/Linux/i.test(navigator.userAgent),this.customXmlData=new N,this.fontSubstitutionTable=new N,this.contentControlCollection=[],this.footnoteCollection=[],this.endnoteCollection=[],this.themes=new Yc,this.images=new N,this.textMeasureHelper=new bg(this),this.viewer=new Tl(this),this.render=new cg(this),this.initializeComponents()}Wg.prototype.getModuleName=function(){return"Regular"},Wg.prototype.getHeightInternal=function(e,t){var i=document.createElement("span"),r=(i.innerText="m",G.createElement("iframe")),e=(document.body.appendChild(r),G.isNullOrUndefined(r.contentDocument)||(r.contentDocument.open(),r.contentDocument.write("<!DOCTYPE html><html><head></head><body></body></html>"),r.contentDocument.close()),this.applyStyle(i,e,t),document.createElement("div")),t=(e.style.cssText="display:inline-block;position:absolute;",document.createElement("div")),i=(t.style.cssText="display:inline-block;width: 1px; height: 0px;vertical-align: baseline;",e.appendChild(i),e.appendChild(t),r.contentDocument.body.appendChild(e),e=i.offsetHeight,i.offsetTop),t=t.offsetTop-i;return document.body.removeChild(r),{Height:e,BaselineOffset:t}},Wg.prototype.applyStyle=function(e,t,i){var r;G.isNullOrUndefined(e)||G.isNullOrUndefined(t)||(r="white-space:nowrap;",G.isNullOrUndefined(i)||""===i?r+="font-family:"+t.fontFamily+";":r+="font-family:"+i+";",r+="font-size:"+(i=(i=t.bidi||t.complexScript?t.fontSizeBidi:t.fontSize)<=.5?.5:i).toString()+"pt;",t.bold&&(r+="font-weight:bold;"),t.italic&&(r+="font-style:italic;"),G.updateCSSText(e,r))},Wg.prototype.destroy=function(){this.documentHelper=void 0};var vg=Wg;function Wg(e){this.documentHelper=e}xg.prototype.getModuleName=function(){return"Optimized"},xg.prototype.getkeyFromCharFormat=function(e){var t=e.fontFamily.toLocaleLowerCase();return e.bold&&(t+=";bold"),e.italic&&(t+=";italic"),t},xg.prototype.getFontInfo=function(e){var t=G.createElement("iframe"),i=(document.body.appendChild(t),"<!DOCTYPE html><html><head></head><body></body></html>"),r=this.documentHelper.externalFonts,r=(r&&0<r.length&&r.forEach(function(e){e.src&&(i+="<style>@font-face {font-family: '"+e.fontFamily+"'; src: "+e.src+"; }</style>")}),G.isNullOrUndefined(t.contentDocument)||(t.contentDocument.open(),t.contentDocument.write(i),t.contentDocument.close()),document.createElement("div")),n=(G.updateCSSText(r,"position:absolute;top:-1000px;left:-1000px;opacity:0;font-size:0px;line-height:normal"),1/window.devicePixelRatio),n=(r.style.transform="scale("+n.toString()+","+n.toString()+")",r.innerHTML="",document.createElement("span")),o=(n.className="e-de-font-info",n.style.cssText="font-size: 0; font-family: '"+e.fontFamily+"'; display: inline-block;",n.textContent="m",document.createElement("span")),e=(o.className="e-de-font-info",o.style.cssText="font-size: 288pt; font-family: '"+e.fontFamily+"'; "+(e.bold?"font-weight: bold; ":"")+(e.italic?"font-style: italic; ":"")+"display: inline-block;",o.textContent="m",r.appendChild(n),r.appendChild(o),t.contentDocument.body.appendChild(r),r.firstChild.offsetTop/r.lastChild.offsetHeight),n=parseFloat((r.lastChild.offsetHeight/288).toFixed(2));return document.body.removeChild(t),{HeightFactor:n,BaselineFactor:e}},xg.prototype.getHeightInternal=function(e){var t,i,r=this.getkeyFromCharFormat(e),n=e.bidi||e.complexScript;return G.isNullOrUndefined(this.optimizedHeightCollection[""+r])?(t=this.getFontInfo(e),{Height:i=(this.optimizedHeightCollection[""+r]=t).HeightFactor*(n?e.fontSizeBidi:e.fontSize),BaselineOffset:t.BaselineFactor*i}):{Height:i=(t=this.optimizedHeightCollection[""+r]).HeightFactor*(n?e.fontSizeBidi:e.fontSize),BaselineOffset:t.BaselineFactor*i}},xg.prototype.destroy=function(){this.documentHelper=void 0,this.optimizedHeightCollection=void 0};var bg=xg;function xg(e){this.documentHelper=e,this.optimizedHeightCollection={}}j.BlockContainer=Vl,j.BlockWidget=Yl,j.BodyWidget=Y,j.BookmarkElementBox=Md,j.BreakElementBox=xc,j.CONTROL_CHARACTERS={Tab:"\t",Paragraph:"\n",LineBreak:"\v",PageBreak:"\f",ColumnBreak:"",Image:"",Table:"",Row:"",Cell:"",Marker_Start:"",Marker_End:"",Field_Separator:"",Section_Break:""},j.ChartArea=Nh,j.ChartCategory=kh,j.ChartCategoryAxis=tc,j.ChartData=Lh,j.ChartDataFormat=Xh,j.ChartDataLabels=zh,j.ChartDataTable=rc,j.ChartElementBox=Oh,j.ChartErrorBar=Eh,j.ChartFill=Zh,j.ChartLayout=$h,j.ChartLegend=Bh,j.ChartSeries=Rh,j.ChartSeriesFormat=Vh,j.ChartTitleArea=Kh,j.ChartTrendLines=jh,j.CheckBoxFormField=vd,j.CheckBoxState=Xd,j.ColumnLayout=kl,j.ColumnSizeInfo=bc,j.CommentCharacterElementBox=ac,j.CommentEditInfo=yc,j.CommentElementBox=dc,j.ContentControl=zd,j.ContentControlListItems=Kd,j.ContentControlProperties=jd,j.CustomXmlPart=$d,j.Dictionary=N,j.DocumentCanvasElement=ag,j.DocumentCanvasRenderingContext2D=lg,j.DocumentEditorSettingsModel=gg,j.DocumentSettingsModel=pg,j.DocxRenderer=e,j.DocxRevision=E,j.DocxRevisionCollection=B,j.DropDownFormField=xd,j.EditRangeEndElementBox=xh,j.EditRangeStartElementBox=Ch,j.EditorProperties=fg,j.ElementBox=ld,j.ErrorTextElementBox=kd,j.FieldElementBox=te,j.FieldTextElementBox=Ud,j.FillFormat=uh,j.FontScheme=_c,j.FontSchemeStruct=Gc,j.FootNoteWidget=J,j.Footnote=Pd,j.FootnoteElementBox=Sd,j.FootnoteEndnoteMarkerElementBox=Pc,j.FormField=gd,j.GroupShapeElementBox=oe,j.HeaderFooterWidget=X,j.ImageElementBox=ae,j.Layout=Rc,j.LayoutHelper=Fl,j.LayoutHelperMethods=K,j.LineFormat=gh,j.LineWidget=ad,j.ListTextElementBox=se,j.MajorMinorFontScheme=Dc,j.Margin=Hl,j.MentionDataEditInfo=vc,j.Optimized=bg,j.Padding=Bl,j.Page=cc,j.PageLayoutHelper=Tl,j.ParagraphWidget=Z,j.Point=Ks,j.Rect=_,j.Regular=vg,j.Renderer=cg,j.RendererHooks=ug,j.RevisionBase=H,j.RevisionCollectionBase=V,j.RevisionHelperMethods=de,j.SearchWidgetInfo=$s,j.SelectionWidgetInfo=Zs,j.SfdtReader=Jc,j.ShapeBase=re,j.ShapeCommon=ih,j.ShapeElementBox=ne,j.TabElementBox=Rd,j.TabStopListInfo=Fc,j.TableCellWidget=ee,j.TablePosition=ed,j.TableRowWidget=$,j.TableWidget=Q,j.TextElementBox=ie,j.TextFormField=fd,j.TextFrame=P,j.TextHelper=Lc,j.Themes=Yc,j.WAbstractList=Oc,j.WBorder=x,j.WBorders=Wl,j.WCellFormat=A,j.WCharacterFormat=ce,j.WCharacterStyle=sl,j.WColumn=fc,j.WColumnFormat=T,j.WLevelOverride=qc,j.WList=Mc,j.WListFormat=ul,j.WListLevel=Nc,j.WParagraphFormat=vl,j.WParagraphStyle=nl,j.WRowFormat=S,j.WSectionFormat=C,j.WShading=I,j.WStyle=tl,j.WStyles=gl,j.WTabStop=ml,j.WTableFormat=xl,j.WTableHolder=pc,j.WTableStyle=hl,j.WUniqueFormat=l,j.WUniqueFormats=W,j.WebLayoutHelper=Nl,j.Widget=ql,j.WrapPosition=Xs,j.XmlMapping=Zd,j.abstractListIdProperty=Na,j.abstractListsProperty=ye,j.afterSpacingProperty=Nt,j.afterWidthProperty=["afterWidth","aw"],j.alignTablesRowByRowProperty=Ue,j.allCapsProperty=ft,j.allowAutoFitProperty=Ti,j.allowBreakAcrossPagesProperty=yi,j.allowHyphensInBookmarkNamesProperty=["allowHyphensInBookmarkNames","ahb"],j.allowOverlapProperty=ia,j.allowSpaceOfSameStyleInTableProperty=ys,j.alternativeTextProperty=Jr,j.appearanceProperty=fs,j.authorNameProperty=xo,j.authorProperty=$n,j.autoShapeTypeProperty=mn,j.backgroundColorProperty=Ei,j.backgroundProperty=ve,j.backwardProperty=cr,j.basedOnProperty=ze,j.baselineAlignmentProperty=tt,j.bdoProperty=dt,j.beforeSpacingProperty=It,j.beforeWidthProperty=["beforeWidth","bw"],j.belowTextProperty=Qr,j.bidiProperty=lt,j.blocksProperty=ga,j.boldBidiProperty=pt,j.boldProperty=Xe,j.bookmarkTypeProperty=Ra,j.bordersProperty=Vt,j.bottomMarginProperty=Qt,j.bottomProperty=Nn,j.breakClearTypeProperty=ht,j.breakCodeProperty=gi,j.categoryTypeProperty=Ur,j.categoryXNameProperty=$i,j.cellContentControlProperty=mo,j.cellFormatProperty=Ko,j.cellSpacingProperty=Oi,j.cellWidthProperty=pi,j.cellsProperty=Xo,j.characterFormatProperty=ue,j.characterSpacingProperty=wt,j.chartAreaProperty=Rr,j.chartCategoryProperty=Br,j.chartDataProperty=Qi,j.chartDataTableProperty=Kr,j.chartLegendProperty=Mr,j.chartPrimaryCategoryAxisProperty=Vr,j.chartPrimaryValueAxisProperty=Dr,j.chartSeriesProperty=Hr,j.chartTitleAreaProperty=qr,j.chartTitleProperty=zr,j.chartTypeProperty=_r,j.checkBoxProperty=Vn,j.checkedProperty=Yn,j.checkedStateProperty=Uo,j.childShapeProperty=Us,j.colorProperty=vn,j.columnCountProperty=["columnCount","colc"],j.columnFirstProperty=_a,j.columnIndexProperty=ws,j.columnLastProperty=ja,j.columnSpanProperty=ui,j.columnsProperty=li,j.commentCharacterTypeProperty=Qn,j.commentIdProperty=Zn,j.commentsProperty=be,j.compatibilityModeProperty=Ee,j.complexScriptProperty=mt,j.contentControlListItemsProperty=Bo,j.contentControlPropertiesProperty=fo,j.contextualSpacingProperty=Mt,j.continuationNoticeProperty=Ha,j.continuationSeparatorProperty=Ba,j.coordinateSize=Vs,j.coordinateXOrigin=Es,j.coordinateYOrigin=Ms,j.cryptAlgorithmClassProperty=Ie,j.cryptAlgorithmSidProperty=Ae,j.cryptAlgorithmTypeProperty=ke,j.cryptProviderTypeProperty=["cryptProviderType","cpt"],j.cryptSpinCountProperty=["cryptSpinCount","csc"],j.customDataProperty=ao,j.customMarkerProperty=po,j.customXmlPartProperty=jo,j.customXmlProperty=we,j.dataFormatProperty=Ji,j.dataLabelProperty=mr,j.dataPointsProperty=br,j.dateCalendarTypeProperty=So,j.dateDisplayFormatProperty=ko,j.dateDisplayLocaleProperty=Io,j.dateProperty=to,j.dateStorageFormatProperty=No,j.defaultFont=kc,j.defaultTabWidthProperty=Fe,j.defaultValueProperty=_n,j.deletePositionProperty=Va,j.descriptionProperty=Zo,j.diagonalDownProperty=Gi,j.diagonalUpProperty=ji,j.differentFirstPageProperty=jt,j.differentOddAndEvenPagesProperty=Gt,j.directionProperty=nr,j.displayTextProperty=Eo,j.distanceBottomProperty=aa,j.distanceLeftProperty=oa,j.distanceRightProperty=na,j.distanceTopProperty=ra,j.doNotUseHTMLParagraphAutoSpacingProperty=Le,j.doneProperty=io,j.dropDownItemsProperty=Xn,j.dropDownListProperty=Dn,j.editRangeIdProperty=za,j.editableRangeStartProperty=Ya,j.editingPointsProperty=Ls,j.enabledProperty=Rn,j.endStyleProperty=or,j.endnoteNumberFormatProperty=ti,j.endnotesProperty=qe,j.enforcementProperty=Oe,j.equalWidthProperty=hi,j.errorBarProperty=yr,j.evenFooterProperty=ma,j.evenHeaderProperty=fa,j.extentXValue=Rs,j.extentYValue=qs,j.fieldTypeProperty=Hn,j.fillFormatProperty=an,j.fillProperty=Wn,j.fillTypeProperty=xn,j.firstLineIndentProperty=Ot,j.firstPageFooterProperty=va,j.firstPageHeaderProperty=ya,j.firstSliceAngleProperty=xr,j.followCharacterProperty=wa,j.fontColorProperty=ot,j.fontFamilyAsciiProperty=yt,j.fontFamilyBidiProperty=gt,j.fontFamilyFarEastProperty=vt,j.fontFamilyNonFarEastProperty=Wt,j.fontFamilyProperty=at,j.fontHintTypeProperty=et,j.fontNameProperty=bs,j.fontProperty=Ro,j.fontSchemeListProperty=es,j.fontSchemeNameProperty=Za,j.fontSchemeProperty=Ja,j.fontSizeBidiProperty=ct,j.fontSizeProperty=nt,j.fontSubstitutionTableProperty=pe,j.fontTypefaceProperty=ts,j.footNoteNumberFormatProperty=ii,j.footerDistanceProperty=_t,j.footerProperty=ua,j.footnoteTypeProperty=ho,j.footnotesProperty=Re,j.foreColorProperty=tr,j.foregroundColorProperty=Mi,j.formFieldDataProperty=Bn,j.formFieldShadingProperty=Be,j.formatProperty=jn,j.formattingProperty=Ce,j.forwardProperty=hr,j.gapWidthProperty=jr,j.getImageHeightProperty=An,j.getImageWidthProperty=Ln,j.getPathString=Qc,j.getString=$c,j.gridAfterProperty=Fi,j.gridAfterWidthProperty=Ci,j.gridAfterWidthTypeProperty=Pi,j.gridBeforeProperty=bi,j.gridBeforeWidthProperty=xi,j.gridBeforeWidthTypeProperty=wi,j.gridProperty=["grid","grd"],j.groupProperty=Ka,j.hasBordersProperty=Lr,j.hasFieldEndProperty=Un,j.hasHorizontalBorderProperty=kr,j.hasImageReferenceProperty=On,j.hasMajorGridLinesProperty=ds,j.hasMinorGridLinesProperty=hs,j.hasNoneStyleProperty=Di,j.hasPlaceHolderTextProperty=Po,j.hasVerticalBorderProperty=Ar,j.hashValueProperty=Se,j.headerDistanceProperty=zt,j.headerProperty=pa,j.headersFootersProperty=Wa,j.heightProperty=tn,j.heightRelativePercentProperty=cn,j.heightScaleProperty=nn,j.heightTypeProperty=Wi,j.helpTextProperty=qn,j.hiddenProperty=Ns,j.highlightColorProperty=rt,j.holeSizeProperty=wr,j.horizontalAlignmentProperty=ha,j.horizontalOriginProperty=da,j.horizontalPositionAbsProperty=Ri,j.horizontalPositionProperty=ca,j.horizontalProperty=_i,j.horizontalRelativePercentProperty=hn,j.horizontalRuleProperty=$r,j.idProperty=Go,j.imageStringProperty=Fn,j.imagesProperty=Fs,j.incrementalOps=Ss,j.initialEndNoteNumberProperty=ai,j.initialFootNoteNumberProperty=oi,j.initialProperty=eo,j.inlineFormatProperty=Ws,j.inlinesProperty=uo,j.interceptProperty=gr,j.is2007Shape=Ds,j.isAfterCellMarkProperty=Ps,j.isAfterParagraphMarkProperty=Cs,j.isAfterRowMarkProperty=Ts,j.isAfterTableMarkProperty=Os,j.isAutoMajorProperty=as,j.isBubbleSizeProperty=Cr,j.isCategoryNameProperty=Pr,j.isCheckedProperty=Ao,j.isCompressedProperty=xs,j.isCreatedUsingHtmlSpanTagProperty=["isCreatedUsingHtmlSpanTag","ishst"],j.isDefaultFillProperty=bn,j.isDeleteRevisionProperty=bo,j.isDisplayEquationProperty=ur,j.isDisplayRSquaredProperty=pr,j.isHeaderProperty=vi,j.isInlineImageProperty=Pn,j.isInsertRevisionProperty=Wo,j.isKernFontProperty=As,j.isLeaderLinesProperty=Nr,j.isLegalStyleNumberingProperty=$o,j.isLegendKeyProperty=Fr,j.isMappedProperty=Mo,j.isMetaFileProperty=Tn,j.isPercentageProperty=Sr,j.isSeriesNameProperty=Tr,j.isTemporaryProperty=Oo,j.isValueProperty=Or,j.isWordMlProperty=Vo,j.italicBidiProperty=ut,j.italicProperty=Je,j.itemIDProperty=so,j.keepLinesTogetherProperty=qt,j.keepWithNextProperty=Ht,j.kernProperty=ks,j.lastParagraphMarkCopiedProperty=He,j.layoutInCellProperty=un,j.layoutProperty=Xi,j.layoutXProperty=ir,j.layoutYProperty=rr,j.leaderProperty=["leader","l"],j.leftIndentProperty=Pt,j.leftMarginProperty=Xt,j.leftProperty=kn,j.lengthProperty=["length","l"],j.levelNumberProperty=Ta,j.levelOverridesProperty=La,j.levelsProperty=ka,j.ligatureProperty=Ze,j.lineBetweenColumnsProperty=ci,j.lineFormatProperty=on,j.lineFormatTypeProperty=ms,j.lineFromXPosition=zs,j.lineFromYPosition=_s,j.lineProperty=er,j.lineSpacingProperty=Lt,j.lineSpacingTypeProperty=Ut,j.lineStyleProperty=Ki,j.lineToXPosition=js,j.lineToYPosition=Gs,j.lineWidthProperty=Yi,j.linkProperty=je,j.listFormatProperty=Bt,j.listIdProperty=xt,j.listLevelNumberProperty=Ct,j.listLevelPatternProperty=xa,j.listsProperty=me,j.localeIdBidiProperty=Ye,j.localeIdFarEastProperty=Ke,j.localeIdProperty=Ge,j.lockAnchorProperty=fn,j.lockContentControlProperty=yo,j.lockContentsProperty=vo,j.majorFontSchemeProperty=Qa,j.majorTickMarkProperty=cs,j.majorUnitProperty=os,j.markerColorProperty=lr,j.markerSizeProperty=dr,j.markerStyleProperty=sr,j.maxLengthProperty=zn,j.maximumValueProperty=ss,j.metaFileImageStringProperty=Cn,j.minimumValueProperty=ls,j.minorFontSchemeProperty=$a,j.minorTickMarkProperty=gs,j.multiLineProperty=To,j.nameProperty=De,j.nextProperty=_e,j.nsidProperty=Ia,j.numberAlignmentProperty=Fa,j.numberFormatProperty=Oa,j.numberOfColumnsProperty=di,j.numberValueProperty=ar,j.offsetXValue=Bs,j.offsetYValue=Hs,j.outlineLevelProperty=Et,j.overlapProperty=Gr,j.overrideListLevelProperty=Aa,j.pageHeightProperty=Yt,j.pageNumberStyleProperty=si,j.pageStartingNumberProperty=ei,j.pageWidthProperty=Kt,j.panoseProperty=rs,j.paraStyleNameProperty=Sa,j.paragraphFormatProperty=fe,j.parsePathData=eg,j.pathSegmentCollection=og,j.patternProperty=["pattern","pt"],j.plotAreaProperty=Er,j.positionProperty=Ma,j.positioningProperty=ea,j.preferredWidthProperty=Ii,j.preferredWidthTypeProperty=ki,j.prefixMappingProperty=Do,j.processPathData=Zc,j.propertiesProperty=qa,j.protectionTypeProperty=Te,j.replyCommentsProperty=ro,j.restartIndexForEndnotesProperty=ni,j.restartIndexForFootnotesProperty=ri,j.restartLevelProperty=Pa,j.restartPageNumberingProperty=$t,j.revDateTimeProperty=wo,j.revisionIdProperty=oo,j.revisionIdsProperty=bt,j.revisionTypeProperty=no,j.revisionsProperty=xe,j.rgbProperty=us,j.rightIndentProperty=Tt,j.rightMarginProperty=Jt,j.rightProperty=In,j.rowFormatProperty=Yo,j.rowSpanProperty=fi,j.rowsProperty=Jo,j.saltValueProperty=Ne,j.scalePathData=ng,j.scalingProperty=Ft,j.sectionFormatProperty=ba,j.sectionsProperty=ge,j.selectedIndexProperty=Jn,j.separatorProperty=Ua,j.seriesFormatProperty=vr,j.seriesNameProperty=fr,j.shadingProperty=Si,j.shadowProperty=Vi,j.shapeIdProperty=Xr,j.showSeriesKeysProperty=Ir,j.sizeProperty=Kn,j.sizeTypeProperty=Gn,j.spaceAfterAutoProperty=kt,j.spaceBeforeAutoProperty=At,j.spaceProperty=Xa,j.specVanishProperty=Is,j.splitArrayCollection=tg,j.startAtProperty=Ca,j.statusTextProperty=En,j.storeItemIdProperty=_o,j.strikethroughProperty=it,j.styleNameProperty=st,j.stylesProperty=We,j.symbolCodeProperty=co,j.symbolFontNameProperty=go,j.tabJustificationProperty=Ea,j.tabLeaderProperty=Da,j.tableAlignmentProperty=Ni,j.tableFormatProperty=ta,j.tabsProperty=Dt,j.tagProperty=Fo,j.textAlignmentProperty=St,j.textFrameProperty=yn,j.textInputProperty=Mn,j.textProperty=Yr,j.textVerticalAlignmentProperty=wn,j.textWrappingStyleProperty=sn,j.textWrappingTypeProperty=ln,j.textureProperty=qi,j.themeFontLanguagesProperty=Me,j.themesProperty=Ve,j.tickLabelPositionProperty=ps,j.titleProperty=Co,j.topMarginProperty=Zt,j.topProperty=Sn,j.trackChangesProperty=Pe,j.transformPath=ig,j.trendLinesProperty=Wr,j.typeProperty=ns,j.typefaceProperty=is,j.uncheckedStateProperty=Lo,j.underlineColorProperty=$e,j.underlineProperty=Qe,j.updatedSegment=rg,j.userProperty=Ga,j.valueProperty=qo,j.verticalAlignmentProperty=mi,j.verticalOriginProperty=sa,j.verticalPositionProperty=la,j.verticalProperty=zi,j.verticalRelativePercentProperty=dn,j.verticallyMergedCellsBottomMarginProperty=Hi,j.verticallyMergedCellsKeepWithNext=Ai,j.verticallyMergedCellsLeftMarginProperty=Li,j.verticallyMergedCellsRightMarginProperty=Ui,j.verticallyMergedCellsTopMarginProperty=Bi,j.visibleProperty=Zr,j.weightProperty=vs,j.widowControlProperty=Rt,j.widthProperty=en,j.widthRelativePercentProperty=gn,j.widthScaleProperty=rn,j.wrapTextAroundProperty=Qo,j.xPathProperty=zo,j.xmlMappingProperty=Ho,j.xmlProperty=lo,j.yValueProperty=Zi,j.zOrderPositionProperty=pn,Object.defineProperty(j,"__esModule",{value:!0})});
2
+ //# sourceMappingURL=ej2-docx-renderer.umd.min.js.map